import{a as hDe,b as qde,c as pDe,d as kO,e as Zde,f as Sj,g as mDe,h as fDe,i as Xde,j as Sp,k as Qde,l as A9,m as Jde,n as L_,o as Tj,p as gDe,q as IO,r as vDe,s as yDe,t as Tb,u as Dj,v as K2,w as eue,x as _De}from"./chunk-B5LWEZEW.js";import{$ as xO,$a as M9,$b as eu,$c as $M,A as dj,Aa as NTe,Ab as gt,Ac as qe,B as bh,Ba as fv,Bb as ZTe,Bc as Ze,C as uj,Ca as fy,Cb as mj,Cc as Xe,D as zM,Da as VTe,Db as et,Dc as as,E as ra,Ea as yn,Eb as Bs,Ec as xe,F as Ks,Fa as V,Fb as XTe,Fc as bn,G as Gde,Ga as B,Gb as QTe,Gc as sn,H as bb,Ha as $p,Hb as W,Hc as bs,I as D9,Ia as gy,Ib as fj,Ic as Qm,J as kTe,Ja as Wo,Jb as wh,Jc as Sb,K as _0,Ka as wp,Kb as Bn,Kc as yj,L as Wde,La as $o,Lb as b,Lc as _j,M as ic,Ma as BTe,Mb as mo,Mc as rDe,N as ITe,Na as SO,Nb as ki,Nc as sDe,O as E9,Oa as nt,Ob as gj,Oc as Ce,P as qg,Pa as pn,Pb as jr,Pc as tt,Q as g8,Qa as v8,Qb as _8,Qc as Nt,R as Jd,Ra as j2,Rb as Je,Rc as Xf,S as CO,Sa as br,Sb as JTe,Sc as $de,T as ATe,Ta as fi,Tb as sa,Tc as Cc,U as R_,Ua as o4,Ub as Kn,Uc as x8,V as HM,Va as zTe,Vb as Yn,Vc as oDe,W as W2,Wa as UM,Wb as h,Wc as Cj,X as GM,Xa as HTe,Xb as p,Xc as aDe,Y as WM,Ya as Fu,Yb as ee,Yc as xj,Z as ll,Za as Ic,Zb as vs,Zc as bj,_ as Fl,_a as TO,_b as ys,_c as Kde,a as na,aa as Mr,ab as jM,ac as re,ad as lDe,b as DTe,ba as PTe,bb as GTe,bc as Kp,bd as EO,c as Qa,ca as ac,cb as WTe,cc as _y,cd as Cy,d as zde,da as RTe,db as UTe,dc as eDe,dd as Yde,e as yO,ea as $n,eb as jTe,ec as gv,ed as Z0,f as Mi,fa as Cl,fb as $Te,fc as tDe,fd as MO,g as qs,ga as to,gb as KTe,gc as Xm,gd as Kt,h as b9,ha as wb,hb as YTe,hc as F,hd as xy,i as _O,ia as FTe,ib as $2,ic as C8,id as KM,j as lj,ja as _c,jb as Pi,jc as w,jd as cDe,k as ETe,ka as Et,kb as Ur,kc as gr,kd as dDe,l as Hde,la as Ji,lb as y8,lc as Ln,ld as uDe,m as pv,ma as LTe,mb as qTe,mc as _o,md as mn,n as w9,na as Ri,nb as vy,nc as ei,nd as xc,o as BM,oa as Ude,ob as k9,oc as Pt,od as vr,p as bp,pa as it,pb as I9,pc as Rt,pd as C0,q as Fr,qa as Ve,qb as g,qc as iDe,qd as qh,r as S9,ra as U2,rb as R,rc as nDe,rd as wj,s as T9,sa as mv,sb as DO,sc as pr,sd as me,t as MTe,ta as bO,tb as Ma,tc as y,u as Sn,ua as _e,ub as yy,uc as ye,v as lr,va as en,vb as hj,vc as Ke,w as P_,wa as mi,wb as Ac,wc as cn,x as Zf,xa as kr,xb as Na,xc as vv,y as cj,ya as wO,yb as pj,yc as F_,z as my,za as OTe,zb as jde,zc as vj}from"./chunk-JNNWGJ6E.js";import"./chunk-NMB2F4XD.js";import{a as ve,b as St,c as s4,d as al,e as Q,f as xr,g as Bde,h as Gs,i as py,j as O,k as VM}from"./chunk-4U6KYC5W.js";var Jm=xr((tue,YM)=>{(function(t,e){typeof tue=="object"&&typeof YM<"u"?YM.exports=e():typeof define=="function"&&define.amd?define(e):t.moment=e()})(tue,function(){"use strict";var t;function e(){return t.apply(null,arguments)}function n(S){t=S}function i(S){return S instanceof Array||Object.prototype.toString.call(S)==="[object Array]"}function r(S){return S!=null&&Object.prototype.toString.call(S)==="[object Object]"}function s(S,P){return Object.prototype.hasOwnProperty.call(S,P)}function o(S){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(S).length===0;var P;for(P in S)if(s(S,P))return!1;return!0}function a(S){return S===void 0}function l(S){return typeof S=="number"||Object.prototype.toString.call(S)==="[object Number]"}function c(S){return S instanceof Date||Object.prototype.toString.call(S)==="[object Date]"}function d(S,P){var U=[],J,fe=S.length;for(J=0;J<fe;++J)U.push(P(S[J],J));return U}function u(S,P){for(var U in P)s(P,U)&&(S[U]=P[U]);return s(P,"toString")&&(S.toString=P.toString),s(P,"valueOf")&&(S.valueOf=P.valueOf),S}function m(S,P,U,J){return Lo(S,P,U,J,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(S){return S._pf==null&&(S._pf=f()),S._pf}var x;Array.prototype.some?x=Array.prototype.some:x=function(S){var P=Object(this),U=P.length>>>0,J;for(J=0;J<U;J++)if(J in P&&S.call(this,P[J],J,P))return!0;return!1};function D(S){var P=null,U=!1,J=S._d&&!isNaN(S._d.getTime());if(J&&(P=_(S),U=x.call(P.parsedDateParts,function(fe){return fe!=null}),J=P.overflow<0&&!P.empty&&!P.invalidEra&&!P.invalidMonth&&!P.invalidWeekday&&!P.weekdayMismatch&&!P.nullInput&&!P.invalidFormat&&!P.userInvalidated&&(!P.meridiem||P.meridiem&&U),S._strict&&(J=J&&P.charsLeftOver===0&&P.unusedTokens.length===0&&P.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(S))S._isValid=J;else return J;return S._isValid}function E(S){var P=m(NaN);return S!=null?u(_(P),S):_(P).userInvalidated=!0,P}var M=e.momentProperties=[],I=!1;function z(S,P){var U,J,fe,Qe=M.length;if(a(P._isAMomentObject)||(S._isAMomentObject=P._isAMomentObject),a(P._i)||(S._i=P._i),a(P._f)||(S._f=P._f),a(P._l)||(S._l=P._l),a(P._strict)||(S._strict=P._strict),a(P._tzm)||(S._tzm=P._tzm),a(P._isUTC)||(S._isUTC=P._isUTC),a(P._offset)||(S._offset=P._offset),a(P._pf)||(S._pf=_(P)),a(P._locale)||(S._locale=P._locale),Qe>0)for(U=0;U<Qe;U++)J=M[U],fe=P[J],a(fe)||(S[J]=fe);return S}function G(S){z(this,S),this._d=new Date(S._d!=null?S._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),I===!1&&(I=!0,e.updateOffset(this),I=!1)}function A(S){return S instanceof G||S!=null&&S._isAMomentObject!=null}function Y(S){e.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+S)}function X(S,P){var U=!0;return u(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,S),U){var J=[],fe,Qe,Wt,rn=arguments.length;for(Qe=0;Qe<rn;Qe++){if(fe="",typeof arguments[Qe]=="object"){fe+=`
[`+Qe+"] ";for(Wt in arguments[0])s(arguments[0],Wt)&&(fe+=Wt+": "+arguments[0][Wt]+", ");fe=fe.slice(0,-2)}else fe=arguments[Qe];J.push(fe)}Y(S+`
Arguments: `+Array.prototype.slice.call(J).join("")+`
`+new Error().stack),U=!1}return P.apply(this,arguments)},P)}var ne={};function pe(S,P){e.deprecationHandler!=null&&e.deprecationHandler(S,P),ne[S]||(Y(P),ne[S]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function ce(S){return typeof Function<"u"&&S instanceof Function||Object.prototype.toString.call(S)==="[object Function]"}function ie(S){var P,U;for(U in S)s(S,U)&&(P=S[U],ce(P)?this[U]=P:this["_"+U]=P);this._config=S,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function le(S,P){var U=u({},S),J;for(J in P)s(P,J)&&(r(S[J])&&r(P[J])?(U[J]={},u(U[J],S[J]),u(U[J],P[J])):P[J]!=null?U[J]=P[J]:delete U[J]);for(J in S)s(S,J)&&!s(P,J)&&r(S[J])&&(U[J]=u({},U[J]));return U}function Se(S){S!=null&&this.set(S)}var je;Object.keys?je=Object.keys:je=function(S){var P,U=[];for(P in S)s(S,P)&&U.push(P);return U};var ze={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Ge(S,P,U){var J=this._calendar[S]||this._calendar.sameElse;return ce(J)?J.call(P,U):J}function Ae(S,P,U){var J=""+Math.abs(S),fe=P-J.length,Qe=S>=0;return(Qe?U?"+":"":"-")+Math.pow(10,Math.max(0,fe)).toString().substr(1)+J}var Ye=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ft=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ft={},Tt={};function at(S,P,U,J){var fe=J;typeof J=="string"&&(fe=function(){return this[J]()}),S&&(Tt[S]=fe),P&&(Tt[P[0]]=function(){return Ae(fe.apply(this,arguments),P[1],P[2])}),U&&(Tt[U]=function(){return this.localeData().ordinal(fe.apply(this,arguments),S)})}function yt(S){return S.match(/\[[\s\S]/)?S.replace(/^\[|\]$/g,""):S.replace(/\\/g,"")}function _t(S){var P=S.match(Ye),U,J;for(U=0,J=P.length;U<J;U++)Tt[P[U]]?P[U]=Tt[P[U]]:P[U]=yt(P[U]);return function(fe){var Qe="",Wt;for(Wt=0;Wt<J;Wt++)Qe+=ce(P[Wt])?P[Wt].call(fe,S):P[Wt];return Qe}}function Re(S,P){return S.isValid()?(P=ot(P,S.localeData()),Ft[P]=Ft[P]||_t(P),Ft[P](S)):S.localeData().invalidDate()}function ot(S,P){var U=5;function J(fe){return P.longDateFormat(fe)||fe}for(ft.lastIndex=0;U>=0&&ft.test(S);)S=S.replace(ft,J),ft.lastIndex=0,U-=1;return S}var jt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function zt(S){var P=this._longDateFormat[S],U=this._longDateFormat[S.toUpperCase()];return P||!U?P:(this._longDateFormat[S]=U.match(Ye).map(function(J){return J==="MMMM"||J==="MM"||J==="DD"||J==="dddd"?J.slice(1):J}).join(""),this._longDateFormat[S])}var qt="Invalid date";function ui(){return this._invalidDate}var _i="%d",ln=/\d{1,2}/;function Rn(S){return this._ordinal.replace("%d",S)}var bi={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Mn(S,P,U,J){var fe=this._relativeTime[U];return ce(fe)?fe(S,P,U,J):fe.replace(/%d/i,S)}function Fn(S,P){var U=this._relativeTime[S>0?"future":"past"];return ce(U)?U(P):U.replace(/%s/i,P)}var or={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function wn(S){return typeof S=="string"?or[S]||or[S.toLowerCase()]:void 0}function gn(S){var P={},U,J;for(J in S)s(S,J)&&(U=wn(J),U&&(P[U]=S[J]));return P}var ts={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function no(S){var P=[],U;for(U in S)s(S,U)&&P.push({unit:U,priority:ts[U]});return P.sort(function(J,fe){return J.priority-fe.priority}),P}var Ho=/\d/,kn=/\d\d/,Ts=/\d{3}/,ea=/\d{4}/,co=/[+-]?\d{6}/,Zn=/\d\d?/,gl=/\d\d\d\d?/,sc=/\d\d\d\d\d\d?/,Xl=/\d{1,3}/,Xs=/\d{1,4}/,Ya=/[+-]?\d{1,6}/,qa=/\d+/,Nl=/[+-]?\d+/,zh=/Z|[+-]\d\d:?\d\d/gi,Hh=/Z|[+-]\d\d(?::?\d\d)?/gi,Rf=/[+-]?\d+(\.\d{1,3})?/,Id=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,aa=/^[1-9]\d?/,jd=/^([1-9]\d|\d)/,du;du={};function $i(S,P,U){du[S]=ce(P)?P:function(J,fe){return J&&U?U:P}}function md(S,P){return s(du,S)?du[S](P._strict,P._locale):new RegExp(Vl(S))}function Vl(S){return Tl(S.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(P,U,J,fe,Qe){return U||J||fe||Qe}))}function Tl(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ja(S){return S<0?Math.ceil(S)||0:Math.floor(S)}function Dr(S){var P=+S,U=0;return P!==0&&isFinite(P)&&(U=ja(P)),U}var Ad={};function ds(S,P){var U,J=P,fe;for(typeof S=="string"&&(S=[S]),l(P)&&(J=function(Qe,Wt){Wt[P]=Dr(Qe)}),fe=S.length,U=0;U<fe;U++)Ad[S[U]]=J}function _a(S,P){ds(S,function(U,J,fe,Qe){fe._w=fe._w||{},P(U,fe._w,fe,Qe)})}function fd(S,P,U){P!=null&&s(Ad,S)&&Ad[S](P,U._a,U,S)}function fr(S){return S%4===0&&S%100!==0||S%400===0}var Qs=0,Nr=1,Ql=2,ro=3,Ra=4,Ta=5,$a=6,Da=7,Gh=8;at("Y",0,0,function(){var S=this.year();return S<=9999?Ae(S,4):"+"+S}),at(0,["YY",2],0,function(){return this.year()%100}),at(0,["YYYY",4],0,"year"),at(0,["YYYYY",5],0,"year"),at(0,["YYYYYY",6,!0],0,"year"),$i("Y",Nl),$i("YY",Zn,kn),$i("YYYY",Xs,ea),$i("YYYYY",Ya,co),$i("YYYYYY",Ya,co),ds(["YYYYY","YYYYYY"],Qs),ds("YYYY",function(S,P){P[Qs]=S.length===2?e.parseTwoDigitYear(S):Dr(S)}),ds("YY",function(S,P){P[Qs]=e.parseTwoDigitYear(S)}),ds("Y",function(S,P){P[Qs]=parseInt(S,10)});function Ti(S){return fr(S)?366:365}e.parseTwoDigitYear=function(S){return Dr(S)+(Dr(S)>68?1900:2e3)};var Hs=Mo("FullYear",!0);function Eo(){return fr(this.year())}function Mo(S,P){return function(U){return U!=null?(td(this,S,U),e.updateOffset(this,P),this):Js(this,S)}}function Js(S,P){if(!S.isValid())return NaN;var U=S._d,J=S._isUTC;switch(P){case"Milliseconds":return J?U.getUTCMilliseconds():U.getMilliseconds();case"Seconds":return J?U.getUTCSeconds():U.getSeconds();case"Minutes":return J?U.getUTCMinutes():U.getMinutes();case"Hours":return J?U.getUTCHours():U.getHours();case"Date":return J?U.getUTCDate():U.getDate();case"Day":return J?U.getUTCDay():U.getDay();case"Month":return J?U.getUTCMonth():U.getMonth();case"FullYear":return J?U.getUTCFullYear():U.getFullYear();default:return NaN}}function td(S,P,U){var J,fe,Qe,Wt,rn;if(!(!S.isValid()||isNaN(U))){switch(J=S._d,fe=S._isUTC,P){case"Milliseconds":return void(fe?J.setUTCMilliseconds(U):J.setMilliseconds(U));case"Seconds":return void(fe?J.setUTCSeconds(U):J.setSeconds(U));case"Minutes":return void(fe?J.setUTCMinutes(U):J.setMinutes(U));case"Hours":return void(fe?J.setUTCHours(U):J.setHours(U));case"Date":return void(fe?J.setUTCDate(U):J.setDate(U));case"FullYear":break;default:return}Qe=U,Wt=S.month(),rn=S.date(),rn=rn===29&&Wt===1&&!fr(Qe)?28:rn,fe?J.setUTCFullYear(Qe,Wt,rn):J.setFullYear(Qe,Wt,rn)}}function Ec(S){return S=wn(S),ce(this[S])?this[S]():this}function Wh(S,P){if(typeof S=="object"){S=gn(S);var U=no(S),J,fe=U.length;for(J=0;J<fe;J++)this[U[J].unit](S[U[J].unit])}else if(S=wn(S),ce(this[S]))return this[S](P);return this}function gd(S,P){return(S%P+P)%P}var eo;Array.prototype.indexOf?eo=Array.prototype.indexOf:eo=function(S){var P;for(P=0;P<this.length;++P)if(this[P]===S)return P;return-1};function Tu(S,P){if(isNaN(S)||isNaN(P))return NaN;var U=gd(P,12);return S+=(P-U)/12,U===1?fr(S)?29:28:31-U%7%2}at("M",["MM",2],"Mo",function(){return this.month()+1}),at("MMM",0,0,function(S){return this.localeData().monthsShort(this,S)}),at("MMMM",0,0,function(S){return this.localeData().months(this,S)}),$i("M",Zn,aa),$i("MM",Zn,kn),$i("MMM",function(S,P){return P.monthsShortRegex(S)}),$i("MMMM",function(S,P){return P.monthsRegex(S)}),ds(["M","MM"],function(S,P){P[Nr]=Dr(S)-1}),ds(["MMM","MMMM"],function(S,P,U,J){var fe=U._locale.monthsParse(S,J,U._strict);fe!=null?P[Nr]=fe:_(U).invalidMonth=S});var dp="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),vd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ch=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,T1=Id,Wm=Id;function ia(S,P){return S?i(this._months)?this._months[S.month()]:this._months[(this._months.isFormat||ch).test(P)?"format":"standalone"][S.month()]:i(this._months)?this._months:this._months.standalone}function Fa(S,P){return S?i(this._monthsShort)?this._monthsShort[S.month()]:this._monthsShort[ch.test(P)?"format":"standalone"][S.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function up(S,P,U){var J,fe,Qe,Wt=S.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],J=0;J<12;++J)Qe=m([2e3,J]),this._shortMonthsParse[J]=this.monthsShort(Qe,"").toLocaleLowerCase(),this._longMonthsParse[J]=this.months(Qe,"").toLocaleLowerCase();return U?P==="MMM"?(fe=eo.call(this._shortMonthsParse,Wt),fe!==-1?fe:null):(fe=eo.call(this._longMonthsParse,Wt),fe!==-1?fe:null):P==="MMM"?(fe=eo.call(this._shortMonthsParse,Wt),fe!==-1?fe:(fe=eo.call(this._longMonthsParse,Wt),fe!==-1?fe:null)):(fe=eo.call(this._longMonthsParse,Wt),fe!==-1?fe:(fe=eo.call(this._shortMonthsParse,Wt),fe!==-1?fe:null))}function vl(S,P,U){var J,fe,Qe;if(this._monthsParseExact)return up.call(this,S,P,U);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),J=0;J<12;J++){if(fe=m([2e3,J]),U&&!this._longMonthsParse[J]&&(this._longMonthsParse[J]=new RegExp("^"+this.months(fe,"").replace(".","")+"$","i"),this._shortMonthsParse[J]=new RegExp("^"+this.monthsShort(fe,"").replace(".","")+"$","i")),!U&&!this._monthsParse[J]&&(Qe="^"+this.months(fe,"")+"|^"+this.monthsShort(fe,""),this._monthsParse[J]=new RegExp(Qe.replace(".",""),"i")),U&&P==="MMMM"&&this._longMonthsParse[J].test(S))return J;if(U&&P==="MMM"&&this._shortMonthsParse[J].test(S))return J;if(!U&&this._monthsParse[J].test(S))return J}}function Jl(S,P){if(!S.isValid())return S;if(typeof P=="string"){if(/^\d+$/.test(P))P=Dr(P);else if(P=S.localeData().monthsParse(P),!l(P))return S}var U=P,J=S.date();return J=J<29?J:Math.min(J,Tu(S.year(),U)),S._isUTC?S._d.setUTCMonth(U,J):S._d.setMonth(U,J),S}function Du(S){return S!=null?(Jl(this,S),e.updateOffset(this,!0),this):Js(this,"Month")}function uo(){return Tu(this.year(),this.month())}function yl(S){return this._monthsParseExact?(s(this,"_monthsRegex")||zp.call(this),S?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=T1),this._monthsShortStrictRegex&&S?this._monthsShortStrictRegex:this._monthsShortRegex)}function Bp(S){return this._monthsParseExact?(s(this,"_monthsRegex")||zp.call(this),S?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Wm),this._monthsStrictRegex&&S?this._monthsStrictRegex:this._monthsRegex)}function zp(){function S(ar,Xr){return Xr.length-ar.length}var P=[],U=[],J=[],fe,Qe,Wt,rn;for(fe=0;fe<12;fe++)Qe=m([2e3,fe]),Wt=Tl(this.monthsShort(Qe,"")),rn=Tl(this.months(Qe,"")),P.push(Wt),U.push(rn),J.push(rn),J.push(Wt);P.sort(S),U.sort(S),J.sort(S),this._monthsRegex=new RegExp("^("+J.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+U.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+P.join("|")+")","i")}function id(S,P,U,J,fe,Qe,Wt){var rn;return S<100&&S>=0?(rn=new Date(S+400,P,U,J,fe,Qe,Wt),isFinite(rn.getFullYear())&&rn.setFullYear(S)):rn=new Date(S,P,U,J,fe,Qe,Wt),rn}function Bc(S){var P,U;return S<100&&S>=0?(U=Array.prototype.slice.call(arguments),U[0]=S+400,P=new Date(Date.UTC.apply(null,U)),isFinite(P.getUTCFullYear())&&P.setUTCFullYear(S)):P=new Date(Date.UTC.apply(null,arguments)),P}function ec(S,P,U){var J=7+P-U,fe=(7+Bc(S,0,J).getUTCDay()-P)%7;return-fe+J-1}function yd(S,P,U,J,fe){var Qe=(7+U-J)%7,Wt=ec(S,J,fe),rn=1+7*(P-1)+Qe+Wt,ar,Xr;return rn<=0?(ar=S-1,Xr=Ti(ar)+rn):rn>Ti(S)?(ar=S+1,Xr=rn-Ti(S)):(ar=S,Xr=rn),{year:ar,dayOfYear:Xr}}function bo(S,P,U){var J=ec(S.year(),P,U),fe=Math.floor((S.dayOfYear()-J-1)/7)+1,Qe,Wt;return fe<1?(Wt=S.year()-1,Qe=fe+ba(Wt,P,U)):fe>ba(S.year(),P,U)?(Qe=fe-ba(S.year(),P,U),Wt=S.year()+1):(Wt=S.year(),Qe=fe),{week:Qe,year:Wt}}function ba(S,P,U){var J=ec(S,P,U),fe=ec(S+1,P,U);return(Ti(S)-J+fe)/7}at("w",["ww",2],"wo","week"),at("W",["WW",2],"Wo","isoWeek"),$i("w",Zn,aa),$i("ww",Zn,kn),$i("W",Zn,aa),$i("WW",Zn,kn),_a(["w","ww","W","WW"],function(S,P,U,J){P[J.substr(0,1)]=Dr(S)});function Bl(S){return bo(S,this._week.dow,this._week.doy).week}var Yo={dow:0,doy:6};function dh(){return this._week.dow}function mc(){return this._week.doy}function Pd(S){var P=this.localeData().week(this);return S==null?P:this.add((S-P)*7,"d")}function ju(S){var P=bo(this,1,4).week;return S==null?P:this.add((S-P)*7,"d")}at("d",0,"do","day"),at("dd",0,0,function(S){return this.localeData().weekdaysMin(this,S)}),at("ddd",0,0,function(S){return this.localeData().weekdaysShort(this,S)}),at("dddd",0,0,function(S){return this.localeData().weekdays(this,S)}),at("e",0,0,"weekday"),at("E",0,0,"isoWeekday"),$i("d",Zn),$i("e",Zn),$i("E",Zn),$i("dd",function(S,P){return P.weekdaysMinRegex(S)}),$i("ddd",function(S,P){return P.weekdaysShortRegex(S)}),$i("dddd",function(S,P){return P.weekdaysRegex(S)}),_a(["dd","ddd","dddd"],function(S,P,U,J){var fe=U._locale.weekdaysParse(S,J,U._strict);fe!=null?P.d=fe:_(U).invalidWeekday=S}),_a(["d","e","E"],function(S,P,U,J){P[J]=Dr(S)});function hp(S,P){return typeof S!="string"?S:isNaN(S)?(S=P.weekdaysParse(S),typeof S=="number"?S:null):parseInt(S,10)}function Uh(S,P){return typeof S=="string"?P.weekdaysParse(S)%7||7:isNaN(S)?null:S}function $u(S,P){return S.slice(P,7).concat(S.slice(0,P))}var Um="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ff="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Hp="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Eu=Id,wo=Id,uh=Id;function rl(S,P){var U=i(this._weekdays)?this._weekdays:this._weekdays[S&&S!==!0&&this._weekdays.isFormat.test(P)?"format":"standalone"];return S===!0?$u(U,this._week.dow):S?U[S.day()]:U}function pp(S){return S===!0?$u(this._weekdaysShort,this._week.dow):S?this._weekdaysShort[S.day()]:this._weekdaysShort}function Gp(S){return S===!0?$u(this._weekdaysMin,this._week.dow):S?this._weekdaysMin[S.day()]:this._weekdaysMin}function d0(S,P,U){var J,fe,Qe,Wt=S.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],J=0;J<7;++J)Qe=m([2e3,1]).day(J),this._minWeekdaysParse[J]=this.weekdaysMin(Qe,"").toLocaleLowerCase(),this._shortWeekdaysParse[J]=this.weekdaysShort(Qe,"").toLocaleLowerCase(),this._weekdaysParse[J]=this.weekdays(Qe,"").toLocaleLowerCase();return U?P==="dddd"?(fe=eo.call(this._weekdaysParse,Wt),fe!==-1?fe:null):P==="ddd"?(fe=eo.call(this._shortWeekdaysParse,Wt),fe!==-1?fe:null):(fe=eo.call(this._minWeekdaysParse,Wt),fe!==-1?fe:null):P==="dddd"?(fe=eo.call(this._weekdaysParse,Wt),fe!==-1||(fe=eo.call(this._shortWeekdaysParse,Wt),fe!==-1)?fe:(fe=eo.call(this._minWeekdaysParse,Wt),fe!==-1?fe:null)):P==="ddd"?(fe=eo.call(this._shortWeekdaysParse,Wt),fe!==-1||(fe=eo.call(this._weekdaysParse,Wt),fe!==-1)?fe:(fe=eo.call(this._minWeekdaysParse,Wt),fe!==-1?fe:null)):(fe=eo.call(this._minWeekdaysParse,Wt),fe!==-1||(fe=eo.call(this._weekdaysParse,Wt),fe!==-1)?fe:(fe=eo.call(this._shortWeekdaysParse,Wt),fe!==-1?fe:null))}function jm(S,P,U){var J,fe,Qe;if(this._weekdaysParseExact)return d0.call(this,S,P,U);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),J=0;J<7;J++){if(fe=m([2e3,1]).day(J),U&&!this._fullWeekdaysParse[J]&&(this._fullWeekdaysParse[J]=new RegExp("^"+this.weekdays(fe,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[J]=new RegExp("^"+this.weekdaysShort(fe,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[J]=new RegExp("^"+this.weekdaysMin(fe,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[J]||(Qe="^"+this.weekdays(fe,"")+"|^"+this.weekdaysShort(fe,"")+"|^"+this.weekdaysMin(fe,""),this._weekdaysParse[J]=new RegExp(Qe.replace(".",""),"i")),U&&P==="dddd"&&this._fullWeekdaysParse[J].test(S))return J;if(U&&P==="ddd"&&this._shortWeekdaysParse[J].test(S))return J;if(U&&P==="dd"&&this._minWeekdaysParse[J].test(S))return J;if(!U&&this._weekdaysParse[J].test(S))return J}}function nd(S){if(!this.isValid())return S!=null?this:NaN;var P=Js(this,"Day");return S!=null?(S=hp(S,this.localeData()),this.add(S-P,"d")):P}function D1(S){if(!this.isValid())return S!=null?this:NaN;var P=(this.day()+7-this.localeData()._week.dow)%7;return S==null?P:this.add(S-P,"d")}function Lf(S){if(!this.isValid())return S!=null?this:NaN;if(S!=null){var P=Uh(S,this.localeData());return this.day(this.day()%7?P:P-7)}else return this.day()||7}function Yr(S){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||hh.call(this),S?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Eu),this._weekdaysStrictRegex&&S?this._weekdaysStrictRegex:this._weekdaysRegex)}function ps(S){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||hh.call(this),S?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=wo),this._weekdaysShortStrictRegex&&S?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function $m(S){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||hh.call(this),S?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=uh),this._weekdaysMinStrictRegex&&S?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hh(){function S(yc,yh){return yh.length-yc.length}var P=[],U=[],J=[],fe=[],Qe,Wt,rn,ar,Xr;for(Qe=0;Qe<7;Qe++)Wt=m([2e3,1]).day(Qe),rn=Tl(this.weekdaysMin(Wt,"")),ar=Tl(this.weekdaysShort(Wt,"")),Xr=Tl(this.weekdays(Wt,"")),P.push(rn),U.push(ar),J.push(Xr),fe.push(rn),fe.push(ar),fe.push(Xr);P.sort(S),U.sort(S),J.sort(S),fe.sort(S),this._weekdaysRegex=new RegExp("^("+fe.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+J.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+U.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+P.join("|")+")","i")}function Ku(){return this.hours()%12||12}function E1(){return this.hours()||24}at("H",["HH",2],0,"hour"),at("h",["hh",2],0,Ku),at("k",["kk",2],0,E1),at("hmm",0,0,function(){return""+Ku.apply(this)+Ae(this.minutes(),2)}),at("hmmss",0,0,function(){return""+Ku.apply(this)+Ae(this.minutes(),2)+Ae(this.seconds(),2)}),at("Hmm",0,0,function(){return""+this.hours()+Ae(this.minutes(),2)}),at("Hmmss",0,0,function(){return""+this.hours()+Ae(this.minutes(),2)+Ae(this.seconds(),2)});function Wp(S,P){at(S,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),P)})}Wp("a",!0),Wp("A",!1);function Dl(S,P){return P._meridiemParse}$i("a",Dl),$i("A",Dl),$i("H",Zn,jd),$i("h",Zn,aa),$i("k",Zn,aa),$i("HH",Zn,kn),$i("hh",Zn,kn),$i("kk",Zn,kn),$i("hmm",gl),$i("hmmss",sc),$i("Hmm",gl),$i("Hmmss",sc),ds(["H","HH"],ro),ds(["k","kk"],function(S,P,U){var J=Dr(S);P[ro]=J===24?0:J}),ds(["a","A"],function(S,P,U){U._isPm=U._locale.isPM(S),U._meridiem=S}),ds(["h","hh"],function(S,P,U){P[ro]=Dr(S),_(U).bigHour=!0}),ds("hmm",function(S,P,U){var J=S.length-2;P[ro]=Dr(S.substr(0,J)),P[Ra]=Dr(S.substr(J)),_(U).bigHour=!0}),ds("hmmss",function(S,P,U){var J=S.length-4,fe=S.length-2;P[ro]=Dr(S.substr(0,J)),P[Ra]=Dr(S.substr(J,2)),P[Ta]=Dr(S.substr(fe)),_(U).bigHour=!0}),ds("Hmm",function(S,P,U){var J=S.length-2;P[ro]=Dr(S.substr(0,J)),P[Ra]=Dr(S.substr(J))}),ds("Hmmss",function(S,P,U){var J=S.length-4,fe=S.length-2;P[ro]=Dr(S.substr(0,J)),P[Ra]=Dr(S.substr(J,2)),P[Ta]=Dr(S.substr(fe))});function M1(S){return(S+"").toLowerCase().charAt(0)==="p"}var Ca=/[ap]\.?m?\.?/i,la=Mo("Hours",!0);function oc(S,P,U){return S>11?U?"pm":"PM":U?"am":"AM"}var fc={calendar:ze,longDateFormat:jt,invalidDate:qt,ordinal:_i,dayOfMonthOrdinalParse:ln,relativeTime:bi,months:dp,monthsShort:vd,week:Yo,weekdays:Um,weekdaysMin:Hp,weekdaysShort:Ff,meridiemParse:Ca},Fs={},_d={},Go;function k1(S,P){var U,J=Math.min(S.length,P.length);for(U=0;U<J;U+=1)if(S[U]!==P[U])return U;return J}function H(S){return S&&S.toLowerCase().replace("_","-")}function te(S){for(var P=0,U,J,fe,Qe;P<S.length;){for(Qe=H(S[P]).split("-"),U=Qe.length,J=H(S[P+1]),J=J?J.split("-"):null;U>0;){if(fe=ke(Qe.slice(0,U).join("-")),fe)return fe;if(J&&J.length>=U&&k1(Qe,J)>=U-1)break;U--}P++}return Go}function ge(S){return!!(S&&S.match("^[^/\\\\]*$"))}function ke(S){var P=null,U;if(Fs[S]===void 0&&typeof YM<"u"&&YM&&YM.exports&&ge(S))try{P=Go._abbr,U=s4,U("./locale/"+S),He(P)}catch{Fs[S]=null}return Fs[S]}function He(S,P){var U;return S&&(a(P)?U=kt(S):U=Ne(S,P),U?Go=U:typeof console<"u"&&console.warn&&console.warn("Locale "+S+" not found. Did you forget to load it?")),Go._abbr}function Ne(S,P){if(P!==null){var U,J=fc;if(P.abbr=S,Fs[S]!=null)pe("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),J=Fs[S]._config;else if(P.parentLocale!=null)if(Fs[P.parentLocale]!=null)J=Fs[P.parentLocale]._config;else if(U=ke(P.parentLocale),U!=null)J=U._config;else return _d[P.parentLocale]||(_d[P.parentLocale]=[]),_d[P.parentLocale].push({name:S,config:P}),null;return Fs[S]=new Se(le(J,P)),_d[S]&&_d[S].forEach(function(fe){Ne(fe.name,fe.config)}),He(S),Fs[S]}else return delete Fs[S],null}function ct(S,P){if(P!=null){var U,J,fe=fc;Fs[S]!=null&&Fs[S].parentLocale!=null?Fs[S].set(le(Fs[S]._config,P)):(J=ke(S),J!=null&&(fe=J._config),P=le(fe,P),J==null&&(P.abbr=S),U=new Se(P),U.parentLocale=Fs[S],Fs[S]=U),He(S)}else Fs[S]!=null&&(Fs[S].parentLocale!=null?(Fs[S]=Fs[S].parentLocale,S===He()&&He(S)):Fs[S]!=null&&delete Fs[S]);return Fs[S]}function kt(S){var P;if(S&&S._locale&&S._locale._abbr&&(S=S._locale._abbr),!S)return Go;if(!i(S)){if(P=ke(S),P)return P;S=[S]}return te(S)}function Ht(){return je(Fs)}function hi(S){var P,U=S._a;return U&&_(S).overflow===-2&&(P=U[Nr]<0||U[Nr]>11?Nr:U[Ql]<1||U[Ql]>Tu(U[Qs],U[Nr])?Ql:U[ro]<0||U[ro]>24||U[ro]===24&&(U[Ra]!==0||U[Ta]!==0||U[$a]!==0)?ro:U[Ra]<0||U[Ra]>59?Ra:U[Ta]<0||U[Ta]>59?Ta:U[$a]<0||U[$a]>999?$a:-1,_(S)._overflowDayOfYear&&(P<Qs||P>Ql)&&(P=Ql),_(S)._overflowWeeks&&P===-1&&(P=Da),_(S)._overflowWeekday&&P===-1&&(P=Gh),_(S).overflow=P),S}var Li=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,nn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ii=/Z|[+-]\d\d(?::?\d\d)?/,Oi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],is=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Io=/^\/?Date\((-?\d+)/i,Ao=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,sl={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ea(S){var P,U,J=S._i,fe=Li.exec(J)||nn.exec(J),Qe,Wt,rn,ar,Xr=Oi.length,yc=is.length;if(fe){for(_(S).iso=!0,P=0,U=Xr;P<U;P++)if(Oi[P][1].exec(fe[1])){Wt=Oi[P][0],Qe=Oi[P][2]!==!1;break}if(Wt==null){S._isValid=!1;return}if(fe[3]){for(P=0,U=yc;P<U;P++)if(is[P][1].exec(fe[3])){rn=(fe[2]||" ")+is[P][0];break}if(rn==null){S._isValid=!1;return}}if(!Qe&&rn!=null){S._isValid=!1;return}if(fe[4])if(Ii.exec(fe[4]))ar="Z";else{S._isValid=!1;return}S._f=Wt+(rn||"")+(ar||""),Oe(S)}else S._isValid=!1}function $d(S,P,U,J,fe,Qe){var Wt=[rd(S),vd.indexOf(P),parseInt(U,10),parseInt(J,10),parseInt(fe,10)];return Qe&&Wt.push(parseInt(Qe,10)),Wt}function rd(S){var P=parseInt(S,10);return P<=49?2e3+P:P<=999?1900+P:P}function Ro(S){return S.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function gc(S,P,U){if(S){var J=Ff.indexOf(S),fe=new Date(P[0],P[1],P[2]).getDay();if(J!==fe)return _(U).weekdayMismatch=!0,U._isValid=!1,!1}return!0}function ho(S,P,U){if(S)return sl[S];if(P)return 0;var J=parseInt(U,10),fe=J%100,Qe=(J-fe)/100;return Qe*60+fe}function Fo(S){var P=Ao.exec(Ro(S._i)),U;if(P){if(U=$d(P[4],P[3],P[2],P[5],P[6],P[7]),!gc(P[1],U,S))return;S._a=U,S._tzm=ho(P[8],P[9],P[10]),S._d=Bc.apply(null,S._a),S._d.setUTCMinutes(S._d.getUTCMinutes()-S._tzm),_(S).rfc2822=!0}else S._isValid=!1}function zc(S){var P=Io.exec(S._i);if(P!==null){S._d=new Date(+P[1]);return}if(Ea(S),S._isValid===!1)delete S._isValid;else return;if(Fo(S),S._isValid===!1)delete S._isValid;else return;S._strict?S._isValid=!1:e.createFromInputFallback(S)}e.createFromInputFallback=X("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(S){S._d=new Date(S._i+(S._useUTC?" UTC":""))});function Cd(S,P,U){return S??P??U}function Mc(S){var P=new Date(e.now());return S._useUTC?[P.getUTCFullYear(),P.getUTCMonth(),P.getUTCDate()]:[P.getFullYear(),P.getMonth(),P.getDate()]}function K(S){var P,U,J=[],fe,Qe,Wt;if(!S._d){for(fe=Mc(S),S._w&&S._a[Ql]==null&&S._a[Nr]==null&&we(S),S._dayOfYear!=null&&(Wt=Cd(S._a[Qs],fe[Qs]),(S._dayOfYear>Ti(Wt)||S._dayOfYear===0)&&(_(S)._overflowDayOfYear=!0),U=Bc(Wt,0,S._dayOfYear),S._a[Nr]=U.getUTCMonth(),S._a[Ql]=U.getUTCDate()),P=0;P<3&&S._a[P]==null;++P)S._a[P]=J[P]=fe[P];for(;P<7;P++)S._a[P]=J[P]=S._a[P]==null?P===2?1:0:S._a[P];S._a[ro]===24&&S._a[Ra]===0&&S._a[Ta]===0&&S._a[$a]===0&&(S._nextDay=!0,S._a[ro]=0),S._d=(S._useUTC?Bc:id).apply(null,J),Qe=S._useUTC?S._d.getUTCDay():S._d.getDay(),S._tzm!=null&&S._d.setUTCMinutes(S._d.getUTCMinutes()-S._tzm),S._nextDay&&(S._a[ro]=24),S._w&&typeof S._w.d<"u"&&S._w.d!==Qe&&(_(S).weekdayMismatch=!0)}}function we(S){var P,U,J,fe,Qe,Wt,rn,ar,Xr;P=S._w,P.GG!=null||P.W!=null||P.E!=null?(Qe=1,Wt=4,U=Cd(P.GG,S._a[Qs],bo(Er(),1,4).year),J=Cd(P.W,1),fe=Cd(P.E,1),(fe<1||fe>7)&&(ar=!0)):(Qe=S._locale._week.dow,Wt=S._locale._week.doy,Xr=bo(Er(),Qe,Wt),U=Cd(P.gg,S._a[Qs],Xr.year),J=Cd(P.w,Xr.week),P.d!=null?(fe=P.d,(fe<0||fe>6)&&(ar=!0)):P.e!=null?(fe=P.e+Qe,(P.e<0||P.e>6)&&(ar=!0)):fe=Qe),J<1||J>ba(U,Qe,Wt)?_(S)._overflowWeeks=!0:ar!=null?_(S)._overflowWeekday=!0:(rn=yd(U,J,fe,Qe,Wt),S._a[Qs]=rn.year,S._dayOfYear=rn.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function Oe(S){if(S._f===e.ISO_8601){Ea(S);return}if(S._f===e.RFC_2822){Fo(S);return}S._a=[],_(S).empty=!0;var P=""+S._i,U,J,fe,Qe,Wt,rn=P.length,ar=0,Xr,yc;for(fe=ot(S._f,S._locale).match(Ye)||[],yc=fe.length,U=0;U<yc;U++)Qe=fe[U],J=(P.match(md(Qe,S))||[])[0],J&&(Wt=P.substr(0,P.indexOf(J)),Wt.length>0&&_(S).unusedInput.push(Wt),P=P.slice(P.indexOf(J)+J.length),ar+=J.length),Tt[Qe]?(J?_(S).empty=!1:_(S).unusedTokens.push(Qe),fd(Qe,J,S)):S._strict&&!J&&_(S).unusedTokens.push(Qe);_(S).charsLeftOver=rn-ar,P.length>0&&_(S).unusedInput.push(P),S._a[ro]<=12&&_(S).bigHour===!0&&S._a[ro]>0&&(_(S).bigHour=void 0),_(S).parsedDateParts=S._a.slice(0),_(S).meridiem=S._meridiem,S._a[ro]=mt(S._locale,S._a[ro],S._meridiem),Xr=_(S).era,Xr!==null&&(S._a[Qs]=S._locale.erasConvertYear(Xr,S._a[Qs])),K(S),hi(S)}function mt(S,P,U){var J;return U==null?P:S.meridiemHour!=null?S.meridiemHour(P,U):(S.isPM!=null&&(J=S.isPM(U),J&&P<12&&(P+=12),!J&&P===12&&(P=0)),P)}function vi(S){var P,U,J,fe,Qe,Wt,rn=!1,ar=S._f.length;if(ar===0){_(S).invalidFormat=!0,S._d=new Date(NaN);return}for(fe=0;fe<ar;fe++)Qe=0,Wt=!1,P=z({},S),S._useUTC!=null&&(P._useUTC=S._useUTC),P._f=S._f[fe],Oe(P),D(P)&&(Wt=!0),Qe+=_(P).charsLeftOver,Qe+=_(P).unusedTokens.length*10,_(P).score=Qe,rn?Qe<J&&(J=Qe,U=P):(J==null||Qe<J||Wt)&&(J=Qe,U=P,Wt&&(rn=!0));u(S,U||P)}function Bi(S){if(!S._d){var P=gn(S._i),U=P.day===void 0?P.date:P.day;S._a=d([P.year,P.month,U,P.hour,P.minute,P.second,P.millisecond],function(J){return J&&parseInt(J,10)}),K(S)}}function jn(S){var P=new G(hi(Vr(S)));return P._nextDay&&(P.add(1,"d"),P._nextDay=void 0),P}function Vr(S){var P=S._i,U=S._f;return S._locale=S._locale||kt(S._l),P===null||U===void 0&&P===""?E({nullInput:!0}):(typeof P=="string"&&(S._i=P=S._locale.preparse(P)),A(P)?new G(hi(P)):(c(P)?S._d=P:i(U)?vi(S):U?Oe(S):El(S),D(S)||(S._d=null),S))}function El(S){var P=S._i;a(P)?S._d=new Date(e.now()):c(P)?S._d=new Date(P.valueOf()):typeof P=="string"?zc(S):i(P)?(S._a=d(P.slice(0),function(U){return parseInt(U,10)}),K(S)):r(P)?Bi(S):l(P)?S._d=new Date(P):e.createFromInputFallback(S)}function Lo(S,P,U,J,fe){var Qe={};return(P===!0||P===!1)&&(J=P,P=void 0),(U===!0||U===!1)&&(J=U,U=void 0),(r(S)&&o(S)||i(S)&&S.length===0)&&(S=void 0),Qe._isAMomentObject=!0,Qe._useUTC=Qe._isUTC=fe,Qe._l=U,Qe._i=S,Qe._f=P,Qe._strict=J,jn(Qe)}function Er(S,P,U,J){return Lo(S,P,U,J,!1)}var yo=X("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var S=Er.apply(null,arguments);return this.isValid()&&S.isValid()?S<this?this:S:E()}),uu=X("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var S=Er.apply(null,arguments);return this.isValid()&&S.isValid()?S>this?this:S:E()});function zl(S,P){var U,J;if(P.length===1&&i(P[0])&&(P=P[0]),!P.length)return Er();for(U=P[0],J=1;J<P.length;++J)(!P[J].isValid()||P[J][S](U))&&(U=P[J]);return U}function Mu(){var S=[].slice.call(arguments,0);return zl("isBefore",S)}function Of(){var S=[].slice.call(arguments,0);return zl("isAfter",S)}var K0=function(){return Date.now?Date.now():+new Date},Hc=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rd(S){var P,U=!1,J,fe=Hc.length;for(P in S)if(s(S,P)&&!(eo.call(Hc,P)!==-1&&(S[P]==null||!isNaN(S[P]))))return!1;for(J=0;J<fe;++J)if(S[Hc[J]]){if(U)return!1;parseFloat(S[Hc[J]])!==Dr(S[Hc[J]])&&(U=!0)}return!0}function Nf(){return this._isValid}function jh(){return hn(NaN)}function $h(S){var P=gn(S),U=P.year||0,J=P.quarter||0,fe=P.month||0,Qe=P.week||P.isoWeek||0,Wt=P.day||0,rn=P.hour||0,ar=P.minute||0,Xr=P.second||0,yc=P.millisecond||0;this._isValid=Rd(P),this._milliseconds=+yc+Xr*1e3+ar*6e4+rn*1e3*60*60,this._days=+Wt+Qe*7,this._months=+fe+J*3+U*12,this._data={},this._locale=kt(),this._bubble()}function _l(S){return S instanceof $h}function kc(S){return S<0?Math.round(-1*S)*-1:Math.round(S)}function Y0(S,P,U){var J=Math.min(S.length,P.length),fe=Math.abs(S.length-P.length),Qe=0,Wt;for(Wt=0;Wt<J;Wt++)(U&&S[Wt]!==P[Wt]||!U&&Dr(S[Wt])!==Dr(P[Wt]))&&Qe++;return Qe+fe}function Up(S,P){at(S,0,0,function(){var U=this.utcOffset(),J="+";return U<0&&(U=-U,J="-"),J+Ae(~~(U/60),2)+P+Ae(~~U%60,2)})}Up("Z",":"),Up("ZZ",""),$i("Z",Hh),$i("ZZ",Hh),ds(["Z","ZZ"],function(S,P,U){U._useUTC=!0,U._tzm=Hl(Hh,S)});var Kg=/([\+\-]|\d\d)/gi;function Hl(S,P){var U=(P||"").match(S),J,fe,Qe;return U===null?null:(J=U[U.length-1]||[],fe=(J+"").match(Kg)||["-",0,0],Qe=+(fe[1]*60)+Dr(fe[2]),Qe===0?0:fe[0]==="+"?Qe:-Qe)}function ol(S,P){var U,J;return P._isUTC?(U=P.clone(),J=(A(S)||c(S)?S.valueOf():Er(S).valueOf())-U.valueOf(),U._d.setTime(U._d.valueOf()+J),e.updateOffset(U,!1),U):Er(S).local()}function jp(S){return-Math.round(S._d.getTimezoneOffset())}e.updateOffset=function(){};function F2(S,P,U){var J=this._offset||0,fe;if(!this.isValid())return S!=null?this:NaN;if(S!=null){if(typeof S=="string"){if(S=Hl(Hh,S),S===null)return this}else Math.abs(S)<16&&!U&&(S=S*60);return!this._isUTC&&P&&(fe=jp(this)),this._offset=S,this._isUTC=!0,fe!=null&&this.add(fe,"m"),J!==S&&(!P||this._changeInProgress?xd(this,hn(S-J,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?J:jp(this)}function I1(S,P){return S!=null?(typeof S!="string"&&(S=-S),this.utcOffset(S,P),this):-this.utcOffset()}function q0(S){return this.utcOffset(0,S)}function Mt(S){return this._isUTC&&(this.utcOffset(0,S),this._isUTC=!1,S&&this.subtract(jp(this),"m")),this}function li(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var S=Hl(zh,this._i);S!=null?this.utcOffset(S):this.utcOffset(0,!0)}return this}function wi(S){return this.isValid()?(S=S?Er(S).utcOffset():0,(this.utcOffset()-S)%60===0):!1}function Fe(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function dt(){if(!a(this._isDSTShifted))return this._isDSTShifted;var S={},P;return z(S,this),S=Vr(S),S._a?(P=S._isUTC?m(S._a):Er(S._a),this._isDSTShifted=this.isValid()&&Y0(S._a,P.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ht(){return this.isValid()?!this._isUTC:!1}function ci(){return this.isValid()?this._isUTC:!1}function Ni(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Qi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Br=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function hn(S,P){var U=S,J=null,fe,Qe,Wt;return _l(S)?U={ms:S._milliseconds,d:S._days,M:S._months}:l(S)||!isNaN(+S)?(U={},P?U[P]=+S:U.milliseconds=+S):(J=Qi.exec(S))?(fe=J[1]==="-"?-1:1,U={y:0,d:Dr(J[Ql])*fe,h:Dr(J[ro])*fe,m:Dr(J[Ra])*fe,s:Dr(J[Ta])*fe,ms:Dr(kc(J[$a]*1e3))*fe}):(J=Br.exec(S))?(fe=J[1]==="-"?-1:1,U={y:us(J[2],fe),M:us(J[3],fe),w:us(J[4],fe),d:us(J[5],fe),h:us(J[6],fe),m:us(J[7],fe),s:us(J[8],fe)}):U==null?U={}:typeof U=="object"&&("from"in U||"to"in U)&&(Wt=_r(Er(U.from),Er(U.to)),U={},U.ms=Wt.milliseconds,U.M=Wt.months),Qe=new $h(U),_l(S)&&s(S,"_locale")&&(Qe._locale=S._locale),_l(S)&&s(S,"_isValid")&&(Qe._isValid=S._isValid),Qe}hn.fn=$h.prototype,hn.invalid=jh;function us(S,P){var U=S&&parseFloat(S.replace(",","."));return(isNaN(U)?0:U)*P}function ns(S,P){var U={};return U.months=P.month()-S.month()+(P.year()-S.year())*12,S.clone().add(U.months,"M").isAfter(P)&&--U.months,U.milliseconds=+P-+S.clone().add(U.months,"M"),U}function _r(S,P){var U;return S.isValid()&&P.isValid()?(P=ol(P,S),S.isBefore(P)?U=ns(S,P):(U=ns(P,S),U.milliseconds=-U.milliseconds,U.months=-U.months),U):{milliseconds:0,months:0}}function xa(S,P){return function(U,J){var fe,Qe;return J!==null&&!isNaN(+J)&&(pe(P,"moment()."+P+"(period, number) is deprecated. Please use moment()."+P+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),Qe=U,U=J,J=Qe),fe=hn(U,J),xd(this,fe,S),this}}function xd(S,P,U,J){var fe=P._milliseconds,Qe=kc(P._days),Wt=kc(P._months);S.isValid()&&(J=J??!0,Wt&&Jl(S,Js(S,"Month")+Wt*U),Qe&&td(S,"Date",Js(S,"Date")+Qe*U),fe&&S._d.setTime(S._d.valueOf()+fe*U),J&&e.updateOffset(S,Qe||Wt))}var Gl=xa(1,"add"),bd=xa(-1,"subtract");function Fd(S){return typeof S=="string"||S instanceof String}function ss(S){return A(S)||c(S)||Fd(S)||l(S)||Vf(S)||hu(S)||S===null||S===void 0}function hu(S){var P=r(S)&&!o(S),U=!1,J=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],fe,Qe,Wt=J.length;for(fe=0;fe<Wt;fe+=1)Qe=J[fe],U=U||s(S,Qe);return P&&U}function Vf(S){var P=i(S),U=!1;return P&&(U=S.filter(function(J){return!l(J)&&Fd(S)}).length===0),P&&U}function Bf(S){var P=r(S)&&!o(S),U=!1,J=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],fe,Qe;for(fe=0;fe<J.length;fe+=1)Qe=J[fe],U=U||s(S,Qe);return P&&U}function K3(S,P){var U=S.diff(P,"days",!0);return U<-6?"sameElse":U<-1?"lastWeek":U<0?"lastDay":U<1?"sameDay":U<2?"nextDay":U<7?"nextWeek":"sameElse"}function Y3(S,P){arguments.length===1&&(arguments[0]?ss(arguments[0])?(S=arguments[0],P=void 0):Bf(arguments[0])&&(P=arguments[0],S=void 0):(S=void 0,P=void 0));var U=S||Er(),J=ol(U,this).startOf("day"),fe=e.calendarFormat(this,J)||"sameElse",Qe=P&&(ce(P[fe])?P[fe].call(this,U):P[fe]);return this.format(Qe||this.localeData().calendar(fe,this,Er(U)))}function Km(){return new G(this)}function Ym(S,P){var U=A(S)?S:Er(S);return this.isValid()&&U.isValid()?(P=wn(P)||"millisecond",P==="millisecond"?this.valueOf()>U.valueOf():U.valueOf()<this.clone().startOf(P).valueOf()):!1}function Yu(S,P){var U=A(S)?S:Er(S);return this.isValid()&&U.isValid()?(P=wn(P)||"millisecond",P==="millisecond"?this.valueOf()<U.valueOf():this.clone().endOf(P).valueOf()<U.valueOf()):!1}function mp(S,P,U,J){var fe=A(S)?S:Er(S),Qe=A(P)?P:Er(P);return this.isValid()&&fe.isValid()&&Qe.isValid()?(J=J||"()",(J[0]==="("?this.isAfter(fe,U):!this.isBefore(fe,U))&&(J[1]===")"?this.isBefore(Qe,U):!this.isAfter(Qe,U))):!1}function L2(S,P){var U=A(S)?S:Er(S),J;return this.isValid()&&U.isValid()?(P=wn(P)||"millisecond",P==="millisecond"?this.valueOf()===U.valueOf():(J=U.valueOf(),this.clone().startOf(P).valueOf()<=J&&J<=this.clone().endOf(P).valueOf())):!1}function um(S,P){return this.isSame(S,P)||this.isAfter(S,P)}function qm(S,P){return this.isSame(S,P)||this.isBefore(S,P)}function u0(S,P,U){var J,fe,Qe;if(!this.isValid())return NaN;if(J=ol(S,this),!J.isValid())return NaN;switch(fe=(J.utcOffset()-this.utcOffset())*6e4,P=wn(P),P){case"year":Qe=Kh(this,J)/12;break;case"month":Qe=Kh(this,J);break;case"quarter":Qe=Kh(this,J)/3;break;case"second":Qe=(this-J)/1e3;break;case"minute":Qe=(this-J)/6e4;break;case"hour":Qe=(this-J)/36e5;break;case"day":Qe=(this-J-fe)/864e5;break;case"week":Qe=(this-J-fe)/6048e5;break;default:Qe=this-J}return U?Qe:ja(Qe)}function Kh(S,P){if(S.date()<P.date())return-Kh(P,S);var U=(P.year()-S.year())*12+(P.month()-S.month()),J=S.clone().add(U,"months"),fe,Qe;return P-J<0?(fe=S.clone().add(U-1,"months"),Qe=(P-J)/(J-fe)):(fe=S.clone().add(U+1,"months"),Qe=(P-J)/(fe-J)),-(U+Qe)||0}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function q3(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Zm(S){if(!this.isValid())return null;var P=S!==!0,U=P?this.clone().utc():this;return U.year()<0||U.year()>9999?Re(U,P?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ce(Date.prototype.toISOString)?P?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Re(U,"Z")):Re(U,P?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Yh(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var S="moment",P="",U,J,fe,Qe;return this.isLocal()||(S=this.utcOffset()===0?"moment.utc":"moment.parseZone",P="Z"),U="["+S+'("]',J=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",fe="-MM-DD[T]HH:mm:ss.SSS",Qe=P+'[")]',this.format(U+J+fe+Qe)}function A1(S){S||(S=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var P=Re(this,S);return this.localeData().postformat(P)}function Yg(S,P){return this.isValid()&&(A(S)&&S.isValid()||Er(S).isValid())?hn({to:this,from:S}).locale(this.locale()).humanize(!P):this.localeData().invalidDate()}function hv(S){return this.from(Er(),S)}function J6(S,P){return this.isValid()&&(A(S)&&S.isValid()||Er(S).isValid())?hn({from:this,to:S}).locale(this.locale()).humanize(!P):this.localeData().invalidDate()}function zf(S){return this.to(Er(),S)}function ph(S){var P;return S===void 0?this._locale._abbr:(P=kt(S),P!=null&&(this._locale=P),this)}var La=X("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(S){return S===void 0?this.localeData():this.locale(S)});function T(){return this._locale}var N=1e3,Z=60*N,ue=60*Z,Pe=(365*400+97)*24*ue;function st(S,P){return(S%P+P)%P}function ti(S,P,U){return S<100&&S>=0?new Date(S+400,P,U)-Pe:new Date(S,P,U).valueOf()}function Ei(S,P,U){return S<100&&S>=0?Date.UTC(S+400,P,U)-Pe:Date.UTC(S,P,U)}function Ui(S){var P,U;if(S=wn(S),S===void 0||S==="millisecond"||!this.isValid())return this;switch(U=this._isUTC?Ei:ti,S){case"year":P=U(this.year(),0,1);break;case"quarter":P=U(this.year(),this.month()-this.month()%3,1);break;case"month":P=U(this.year(),this.month(),1);break;case"week":P=U(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":P=U(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":P=U(this.year(),this.month(),this.date());break;case"hour":P=this._d.valueOf(),P-=st(P+(this._isUTC?0:this.utcOffset()*Z),ue);break;case"minute":P=this._d.valueOf(),P-=st(P,Z);break;case"second":P=this._d.valueOf(),P-=st(P,N);break}return this._d.setTime(P),e.updateOffset(this,!0),this}function On(S){var P,U;if(S=wn(S),S===void 0||S==="millisecond"||!this.isValid())return this;switch(U=this._isUTC?Ei:ti,S){case"year":P=U(this.year()+1,0,1)-1;break;case"quarter":P=U(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":P=U(this.year(),this.month()+1,1)-1;break;case"week":P=U(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":P=U(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":P=U(this.year(),this.month(),this.date()+1)-1;break;case"hour":P=this._d.valueOf(),P+=ue-st(P+(this._isUTC?0:this.utcOffset()*Z),ue)-1;break;case"minute":P=this._d.valueOf(),P+=Z-st(P,Z)-1;break;case"second":P=this._d.valueOf(),P+=N-st(P,N)-1;break}return this._d.setTime(P),e.updateOffset(this,!0),this}function Wr(){return this._d.valueOf()-(this._offset||0)*6e4}function $s(){return Math.floor(this.valueOf()/1e3)}function qo(){return new Date(this.valueOf())}function q(){var S=this;return[S.year(),S.month(),S.date(),S.hour(),S.minute(),S.second(),S.millisecond()]}function oe(){var S=this;return{years:S.year(),months:S.month(),date:S.date(),hours:S.hours(),minutes:S.minutes(),seconds:S.seconds(),milliseconds:S.milliseconds()}}function he(){return this.isValid()?this.toISOString():null}function de(){return D(this)}function De(){return u({},_(this))}function Le(){return _(this).overflow}function xt(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}at("N",0,0,"eraAbbr"),at("NN",0,0,"eraAbbr"),at("NNN",0,0,"eraAbbr"),at("NNNN",0,0,"eraName"),at("NNNNN",0,0,"eraNarrow"),at("y",["y",1],"yo","eraYear"),at("y",["yy",2],0,"eraYear"),at("y",["yyy",3],0,"eraYear"),at("y",["yyyy",4],0,"eraYear"),$i("N",hr),$i("NN",hr),$i("NNN",hr),$i("NNNN",h0),$i("NNNNN",M_),ds(["N","NN","NNN","NNNN","NNNNN"],function(S,P,U,J){var fe=U._locale.erasParse(S,J,U._strict);fe?_(U).era=fe:_(U).invalidEra=S}),$i("y",qa),$i("yy",qa),$i("yyy",qa),$i("yyyy",qa),$i("yo",k_),ds(["y","yy","yyy","yyyy"],Qs),ds(["yo"],function(S,P,U,J){var fe;U._locale._eraYearOrdinalRegex&&(fe=S.match(U._locale._eraYearOrdinalRegex)),U._locale.eraYearOrdinalParse?P[Qs]=U._locale.eraYearOrdinalParse(S,fe):P[Qs]=parseInt(S,10)});function Dt(S,P){var U,J,fe,Qe=this._eras||kt("en")._eras;for(U=0,J=Qe.length;U<J;++U){switch(typeof Qe[U].since){case"string":fe=e(Qe[U].since).startOf("day"),Qe[U].since=fe.valueOf();break}switch(typeof Qe[U].until){case"undefined":Qe[U].until=1/0;break;case"string":fe=e(Qe[U].until).startOf("day").valueOf(),Qe[U].until=fe.valueOf();break}}return Qe}function Ut(S,P,U){var J,fe,Qe=this.eras(),Wt,rn,ar;for(S=S.toUpperCase(),J=0,fe=Qe.length;J<fe;++J)if(Wt=Qe[J].name.toUpperCase(),rn=Qe[J].abbr.toUpperCase(),ar=Qe[J].narrow.toUpperCase(),U)switch(P){case"N":case"NN":case"NNN":if(rn===S)return Qe[J];break;case"NNNN":if(Wt===S)return Qe[J];break;case"NNNNN":if(ar===S)return Qe[J];break}else if([Wt,rn,ar].indexOf(S)>=0)return Qe[J]}function Jt(S,P){var U=S.since<=S.until?1:-1;return P===void 0?e(S.since).year():e(S.since).year()+(P-S.offset)*U}function gi(){var S,P,U,J=this.localeData().eras();for(S=0,P=J.length;S<P;++S)if(U=this.clone().startOf("day").valueOf(),J[S].since<=U&&U<=J[S].until||J[S].until<=U&&U<=J[S].since)return J[S].name;return""}function Si(){var S,P,U,J=this.localeData().eras();for(S=0,P=J.length;S<P;++S)if(U=this.clone().startOf("day").valueOf(),J[S].since<=U&&U<=J[S].until||J[S].until<=U&&U<=J[S].since)return J[S].narrow;return""}function Tr(){var S,P,U,J=this.localeData().eras();for(S=0,P=J.length;S<P;++S)if(U=this.clone().startOf("day").valueOf(),J[S].since<=U&&U<=J[S].until||J[S].until<=U&&U<=J[S].since)return J[S].abbr;return""}function ae(){var S,P,U,J,fe=this.localeData().eras();for(S=0,P=fe.length;S<P;++S)if(U=fe[S].since<=fe[S].until?1:-1,J=this.clone().startOf("day").valueOf(),fe[S].since<=J&&J<=fe[S].until||fe[S].until<=J&&J<=fe[S].since)return(this.year()-e(fe[S].since).year())*U+fe[S].offset;return this.year()}function Ds(S){return s(this,"_erasNameRegex")||qu.call(this),S?this._erasNameRegex:this._erasRegex}function lo(S){return s(this,"_erasAbbrRegex")||qu.call(this),S?this._erasAbbrRegex:this._erasRegex}function Zo(S){return s(this,"_erasNarrowRegex")||qu.call(this),S?this._erasNarrowRegex:this._erasRegex}function hr(S,P){return P.erasAbbrRegex(S)}function h0(S,P){return P.erasNameRegex(S)}function M_(S,P){return P.erasNarrowRegex(S)}function k_(S,P){return P._eraYearOrdinalRegex||qa}function qu(){var S=[],P=[],U=[],J=[],fe,Qe,Wt,rn,ar,Xr=this.eras();for(fe=0,Qe=Xr.length;fe<Qe;++fe)Wt=Tl(Xr[fe].name),rn=Tl(Xr[fe].abbr),ar=Tl(Xr[fe].narrow),P.push(Wt),S.push(rn),U.push(ar),J.push(Wt),J.push(rn),J.push(ar);this._erasRegex=new RegExp("^("+J.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+P.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+S.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+U.join("|")+")","i")}at(0,["gg",2],0,function(){return this.weekYear()%100}),at(0,["GG",2],0,function(){return this.isoWeekYear()%100});function p0(S,P){at(0,[S,S.length],0,P)}p0("gggg","weekYear"),p0("ggggg","weekYear"),p0("GGGG","isoWeekYear"),p0("GGGGG","isoWeekYear"),$i("G",Nl),$i("g",Nl),$i("GG",Zn,kn),$i("gg",Zn,kn),$i("GGGG",Xs,ea),$i("gggg",Xs,ea),$i("GGGGG",Ya,co),$i("ggggg",Ya,co),_a(["gggg","ggggg","GGGG","GGGGG"],function(S,P,U,J){P[J.substr(0,2)]=Dr(S)}),_a(["gg","GG"],function(S,P,U,J){P[J]=e.parseTwoDigitYear(S)});function I_(S){return zC.call(this,S,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Kd(S){return zC.call(this,S,this.isoWeek(),this.isoWeekday(),1,4)}function A_(){return ba(this.year(),1,4)}function O2(){return ba(this.isoWeekYear(),1,4)}function fp(){var S=this.localeData()._week;return ba(this.year(),S.dow,S.doy)}function xS(){var S=this.localeData()._week;return ba(this.weekYear(),S.dow,S.doy)}function zC(S,P,U,J,fe){var Qe;return S==null?bo(this,J,fe).year:(Qe=ba(S,J,fe),P>Qe&&(P=Qe),bS.call(this,S,P,U,J,fe))}function bS(S,P,U,J,fe){var Qe=yd(S,P,U,J,fe),Wt=Bc(Qe.year,0,Qe.dayOfYear);return this.year(Wt.getUTCFullYear()),this.month(Wt.getUTCMonth()),this.date(Wt.getUTCDate()),this}at("Q",0,"Qo","quarter"),$i("Q",Ho),ds("Q",function(S,P){P[Nr]=(Dr(S)-1)*3});function wS(S){return S==null?Math.ceil((this.month()+1)/3):this.month((S-1)*3+this.month()%3)}at("D",["DD",2],"Do","date"),$i("D",Zn,aa),$i("DD",Zn,kn),$i("Do",function(S,P){return S?P._dayOfMonthOrdinalParse||P._ordinalParse:P._dayOfMonthOrdinalParseLenient}),ds(["D","DD"],Ql),ds("Do",function(S,P){P[Ql]=Dr(S.match(Zn)[0])});var HC=Mo("Date",!0);at("DDD",["DDDD",3],"DDDo","dayOfYear"),$i("DDD",Xl),$i("DDDD",Ts),ds(["DDD","DDDD"],function(S,P,U){U._dayOfYear=Dr(S)});function gp(S){var P=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return S==null?P:this.add(S-P,"d")}at("m",["mm",2],0,"minute"),$i("m",Zn,jd),$i("mm",Zn,kn),ds(["m","mm"],Ra);var SS=Mo("Minutes",!1);at("s",["ss",2],0,"second"),$i("s",Zn,jd),$i("ss",Zn,kn),ds(["s","ss"],Ta);var TS=Mo("Seconds",!1);at("S",0,0,function(){return~~(this.millisecond()/100)}),at(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),at(0,["SSS",3],0,"millisecond"),at(0,["SSSS",4],0,function(){return this.millisecond()*10}),at(0,["SSSSS",5],0,function(){return this.millisecond()*100}),at(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),at(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),at(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),at(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),$i("S",Xl,Ho),$i("SS",Xl,kn),$i("SSS",Xl,Ts);var hm,GC;for(hm="SSSS";hm.length<=9;hm+="S")$i(hm,qa);function DS(S,P){P[$a]=Dr(("0."+S)*1e3)}for(hm="S";hm.length<=9;hm+="S")ds(hm,DS);GC=Mo("Milliseconds",!1),at("z",0,0,"zoneAbbr"),at("zz",0,0,"zoneName");function Hf(){return this._isUTC?"UTC":""}function ES(){return this._isUTC?"Coordinated Universal Time":""}var xi=G.prototype;xi.add=Gl,xi.calendar=Y3,xi.clone=Km,xi.diff=u0,xi.endOf=On,xi.format=A1,xi.from=Yg,xi.fromNow=hv,xi.to=J6,xi.toNow=zf,xi.get=Ec,xi.invalidAt=Le,xi.isAfter=Ym,xi.isBefore=Yu,xi.isBetween=mp,xi.isSame=L2,xi.isSameOrAfter=um,xi.isSameOrBefore=qm,xi.isValid=de,xi.lang=La,xi.locale=ph,xi.localeData=T,xi.max=uu,xi.min=yo,xi.parsingFlags=De,xi.set=Wh,xi.startOf=Ui,xi.subtract=bd,xi.toArray=q,xi.toObject=oe,xi.toDate=qo,xi.toISOString=Zm,xi.inspect=Yh,typeof Symbol<"u"&&Symbol.for!=null&&(xi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),xi.toJSON=he,xi.toString=q3,xi.unix=$s,xi.valueOf=Wr,xi.creationData=xt,xi.eraName=gi,xi.eraNarrow=Si,xi.eraAbbr=Tr,xi.eraYear=ae,xi.year=Hs,xi.isLeapYear=Eo,xi.weekYear=I_,xi.isoWeekYear=Kd,xi.quarter=xi.quarters=wS,xi.month=Du,xi.daysInMonth=uo,xi.week=xi.weeks=Pd,xi.isoWeek=xi.isoWeeks=ju,xi.weeksInYear=fp,xi.weeksInWeekYear=xS,xi.isoWeeksInYear=A_,xi.isoWeeksInISOWeekYear=O2,xi.date=HC,xi.day=xi.days=nd,xi.weekday=D1,xi.isoWeekday=Lf,xi.dayOfYear=gp,xi.hour=xi.hours=la,xi.minute=xi.minutes=SS,xi.second=xi.seconds=TS,xi.millisecond=xi.milliseconds=GC,xi.utcOffset=F2,xi.utc=q0,xi.local=Mt,xi.parseZone=li,xi.hasAlignedHourOffset=wi,xi.isDST=Fe,xi.isLocal=ht,xi.isUtcOffset=ci,xi.isUtc=Ni,xi.isUTC=Ni,xi.zoneAbbr=Hf,xi.zoneName=ES,xi.dates=X("dates accessor is deprecated. Use date instead.",HC),xi.months=X("months accessor is deprecated. Use month instead",Du),xi.years=X("years accessor is deprecated. Use year instead",Hs),xi.zone=X("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",I1),xi.isDSTShifted=X("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",dt);function ku(S){return Er(S*1e3)}function MS(){return Er.apply(null,arguments).parseZone()}function WC(S){return S}var Vs=Se.prototype;Vs.calendar=Ge,Vs.longDateFormat=zt,Vs.invalidDate=ui,Vs.ordinal=Rn,Vs.preparse=WC,Vs.postformat=WC,Vs.relativeTime=Mn,Vs.pastFuture=Fn,Vs.set=ie,Vs.eras=Dt,Vs.erasParse=Ut,Vs.erasConvertYear=Jt,Vs.erasAbbrRegex=lo,Vs.erasNameRegex=Ds,Vs.erasNarrowRegex=Zo,Vs.months=ia,Vs.monthsShort=Fa,Vs.monthsParse=vl,Vs.monthsRegex=Bp,Vs.monthsShortRegex=yl,Vs.week=Bl,Vs.firstDayOfYear=mc,Vs.firstDayOfWeek=dh,Vs.weekdays=rl,Vs.weekdaysMin=Gp,Vs.weekdaysShort=pp,Vs.weekdaysParse=jm,Vs.weekdaysRegex=Yr,Vs.weekdaysShortRegex=ps,Vs.weekdaysMinRegex=$m,Vs.isPM=M1,Vs.meridiem=oc;function Z3(S,P,U,J){var fe=kt(),Qe=m().set(J,P);return fe[U](Qe,S)}function UC(S,P,U){if(l(S)&&(P=S,S=void 0),S=S||"",P!=null)return Z3(S,P,U,"month");var J,fe=[];for(J=0;J<12;J++)fe[J]=Z3(S,J,U,"month");return fe}function X3(S,P,U,J){typeof S=="boolean"?(l(P)&&(U=P,P=void 0),P=P||""):(P=S,U=P,S=!1,l(P)&&(U=P,P=void 0),P=P||"");var fe=kt(),Qe=S?fe._week.dow:0,Wt,rn=[];if(U!=null)return Z3(P,(U+Qe)%7,J,"day");for(Wt=0;Wt<7;Wt++)rn[Wt]=Z3(P,(Wt+Qe)%7,J,"day");return rn}function jC(S,P){return UC(S,P,"months")}function kS(S,P){return UC(S,P,"monthsShort")}function IS(S,P,U){return X3(S,P,U,"weekdays")}function ey(S,P,U){return X3(S,P,U,"weekdaysShort")}function N2(S,P,U){return X3(S,P,U,"weekdaysMin")}He("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(S){var P=S%10,U=Dr(S%100/10)===1?"th":P===1?"st":P===2?"nd":P===3?"rd":"th";return S+U}}),e.lang=X("moment.lang is deprecated. Use moment.locale instead.",He),e.langData=X("moment.langData is deprecated. Use moment.localeData instead.",kt);var Yd=Math.abs;function AS(){var S=this._data;return this._milliseconds=Yd(this._milliseconds),this._days=Yd(this._days),this._months=Yd(this._months),S.milliseconds=Yd(S.milliseconds),S.seconds=Yd(S.seconds),S.minutes=Yd(S.minutes),S.hours=Yd(S.hours),S.months=Yd(S.months),S.years=Yd(S.years),this}function ty(S,P,U,J){var fe=hn(P,U);return S._milliseconds+=J*fe._milliseconds,S._days+=J*fe._days,S._months+=J*fe._months,S._bubble()}function PS(S,P){return ty(this,S,P,1)}function vp(S,P){return ty(this,S,P,-1)}function Q3(S){return S<0?Math.floor(S):Math.ceil(S)}function Gf(){var S=this._milliseconds,P=this._days,U=this._months,J=this._data,fe,Qe,Wt,rn,ar;return S>=0&&P>=0&&U>=0||S<=0&&P<=0&&U<=0||(S+=Q3(iy(U)+P)*864e5,P=0,U=0),J.milliseconds=S%1e3,fe=ja(S/1e3),J.seconds=fe%60,Qe=ja(fe/60),J.minutes=Qe%60,Wt=ja(Qe/60),J.hours=Wt%24,P+=ja(Wt/24),ar=ja(wd(P)),U+=ar,P-=Q3(iy(ar)),rn=ja(U/12),U%=12,J.days=P,J.months=U,J.years=rn,this}function wd(S){return S*4800/146097}function iy(S){return S*146097/4800}function $C(S){if(!this.isValid())return NaN;var P,U,J=this._milliseconds;if(S=wn(S),S==="month"||S==="quarter"||S==="year")switch(P=this._days+J/864e5,U=this._months+wd(P),S){case"month":return U;case"quarter":return U/3;case"year":return U/12}else switch(P=this._days+Math.round(iy(this._months)),S){case"week":return P/7+J/6048e5;case"day":return P+J/864e5;case"hour":return P*24+J/36e5;case"minute":return P*1440+J/6e4;case"second":return P*86400+J/1e3;case"millisecond":return Math.floor(P*864e5)+J;default:throw new Error("Unknown unit "+S)}}function mh(S){return function(){return this.as(S)}}var m0=mh("ms"),pm=mh("s"),KC=mh("m"),RS=mh("h"),J3=mh("d"),FS=mh("w"),YC=mh("M"),Rl=mh("Q"),ny=mh("y"),qC=m0;function fh(){return hn(this)}function ry(S){return S=wn(S),this.isValid()?this[S+"s"]():NaN}function gh(S){return function(){return this.isValid()?this._data[S]:NaN}}var Wf=gh("milliseconds"),ZC=gh("seconds"),vc=gh("minutes"),sy=gh("hours"),LS=gh("days"),OS=gh("months"),NS=gh("years");function oy(){return ja(this.days()/7)}var yp=Math.round,vh={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function XC(S,P,U,J,fe){return fe.relativeTime(P||1,!!U,S,J)}function VS(S,P,U,J){var fe=hn(S).abs(),Qe=yp(fe.as("s")),Wt=yp(fe.as("m")),rn=yp(fe.as("h")),ar=yp(fe.as("d")),Xr=yp(fe.as("M")),yc=yp(fe.as("w")),yh=yp(fe.as("y")),_p=Qe<=U.ss&&["s",Qe]||Qe<U.s&&["ss",Qe]||Wt<=1&&["m"]||Wt<U.m&&["mm",Wt]||rn<=1&&["h"]||rn<U.h&&["hh",rn]||ar<=1&&["d"]||ar<U.d&&["dd",ar];return U.w!=null&&(_p=_p||yc<=1&&["w"]||yc<U.w&&["ww",yc]),_p=_p||Xr<=1&&["M"]||Xr<U.M&&["MM",Xr]||yh<=1&&["y"]||["yy",yh],_p[2]=P,_p[3]=+S>0,_p[4]=J,XC.apply(null,_p)}function BS(S){return S===void 0?yp:typeof S=="function"?(yp=S,!0):!1}function V2(S,P){return vh[S]===void 0?!1:P===void 0?vh[S]:(vh[S]=P,S==="s"&&(vh.ss=P-1),!0)}function zS(S,P){if(!this.isValid())return this.localeData().invalidDate();var U=!1,J=vh,fe,Qe;return typeof S=="object"&&(P=S,S=!1),typeof S=="boolean"&&(U=S),typeof P=="object"&&(J=Object.assign({},vh,P),P.s!=null&&P.ss==null&&(J.ss=P.s-1)),fe=this.localeData(),Qe=VS(this,!U,J,fe),U&&(Qe=fe.pastFuture(+this,Qe)),fe.postformat(Qe)}var ay=Math.abs;function mm(S){return(S>0)-(S<0)||+S}function B2(){if(!this.isValid())return this.localeData().invalidDate();var S=ay(this._milliseconds)/1e3,P=ay(this._days),U=ay(this._months),J,fe,Qe,Wt,rn=this.asSeconds(),ar,Xr,yc,yh;return rn?(J=ja(S/60),fe=ja(J/60),S%=60,J%=60,Qe=ja(U/12),U%=12,Wt=S?S.toFixed(3).replace(/\.?0+$/,""):"",ar=rn<0?"-":"",Xr=mm(this._months)!==mm(rn)?"-":"",yc=mm(this._days)!==mm(rn)?"-":"",yh=mm(this._milliseconds)!==mm(rn)?"-":"",ar+"P"+(Qe?Xr+Qe+"Y":"")+(U?Xr+U+"M":"")+(P?yc+P+"D":"")+(fe||J||S?"T":"")+(fe?yh+fe+"H":"")+(J?yh+J+"M":"")+(S?yh+Wt+"S":"")):"P0D"}var xs=$h.prototype;xs.isValid=Nf,xs.abs=AS,xs.add=PS,xs.subtract=vp,xs.as=$C,xs.asMilliseconds=m0,xs.asSeconds=pm,xs.asMinutes=KC,xs.asHours=RS,xs.asDays=J3,xs.asWeeks=FS,xs.asMonths=YC,xs.asQuarters=Rl,xs.asYears=ny,xs.valueOf=qC,xs._bubble=Gf,xs.clone=fh,xs.get=ry,xs.milliseconds=Wf,xs.seconds=ZC,xs.minutes=vc,xs.hours=sy,xs.days=LS,xs.weeks=oy,xs.months=OS,xs.years=NS,xs.humanize=zS,xs.toISOString=B2,xs.toString=B2,xs.toJSON=B2,xs.locale=ph,xs.localeData=T,xs.toIsoString=X("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",B2),xs.lang=La,at("X",0,0,"unix"),at("x",0,0,"valueOf"),$i("x",Nl),$i("X",Rf),ds("X",function(S,P,U){U._d=new Date(parseFloat(S)*1e3)}),ds("x",function(S,P,U){U._d=new Date(Dr(S))});return e.version="2.30.1",n(Er),e.fn=xi,e.min=Mu,e.max=Of,e.now=K0,e.utc=m,e.unix=ku,e.months=jC,e.isDate=c,e.locale=He,e.invalid=E,e.duration=hn,e.isMoment=A,e.weekdays=IS,e.parseZone=MS,e.localeData=kt,e.isDuration=_l,e.monthsShort=kS,e.weekdaysMin=N2,e.defineLocale=Ne,e.updateLocale=ct,e.locales=Ht,e.weekdaysShort=ey,e.normalizeUnits=wn,e.relativeTimeRounding=BS,e.relativeTimeThreshold=V2,e.calendarFormat=K3,e.prototype=xi,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});function CDe(t,e,n){let i="?";t&&t.constructor&&(i=t.constructor.name.replace(/(\S)([A-Z]{1})/g,"$1-$2").toUpperCase());let r="["+i+"] "+e;return n&&(n.message?r+=" - "+n.message:r+=`
`+JSON.stringify(n,null,4)),r}var xDe=Q(()=>{});var Es,Zh=Q(()=>{Es=class{static isDateOrNumber(e){return e&&(typeof e=="number"||typeof e.date=="function"||typeof e.getTime=="function")}static isDate(e){return typeof e?.getTime=="function"}static isDateString(e){return typeof e=="string"&&e.match(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/)!==null}static isString(e){return typeof e=="string"}static isNumber(e){return typeof e=="number"&&!Number.isNaN(e)}static isNumberAndNotNaN(e){return typeof e=="number"&&!Number.isNaN(e)}static is(e){return typeof e<"u"&&e!==null}static isFunction(e){return typeof e=="function"}static isArray(e){return this.is(e)&&Array.isArray(e)}static isNullOrUndefinedOrNAN(e){return typeof e>"u"||e===null||Number.isNaN(e)}}});function yv(t){return typeof t=="function"}var Ej=Q(()=>{});function Mj(t){let n=t(i=>{Error.call(i),i.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var iue=Q(()=>{});var kj,bDe=Q(()=>{iue();kj=Mj(t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:
${n.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
  `)}`:"",this.name="UnsubscriptionError",this.errors=n})});function AO(t,e){if(t){let n=t.indexOf(e);0<=n&&t.splice(n,1)}}var nue=Q(()=>{});function Ij(t){return t instanceof O_||t&&"closed"in t&&yv(t.remove)&&yv(t.add)&&yv(t.unsubscribe)}function wDe(t){yv(t)?t():t.unsubscribe()}var O_,rue,Aj=Q(()=>{Ej();bDe();nue();O_=class t{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let s of n)s.remove(this);else n.remove(this);let{initialTeardown:i}=this;if(yv(i))try{i()}catch(s){e=s instanceof kj?s.errors:[s]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let s of r)try{wDe(s)}catch(o){e=e??[],o instanceof kj?e=[...e,...o.errors]:e.push(o)}}if(e)throw new kj(e)}}add(e){var n;if(e&&e!==this)if(this.closed)wDe(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}}_hasParent(e){let{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){let{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&AO(n,e)}remove(e){let{_finalizers:n}=this;n&&AO(n,e),e instanceof t&&e._removeParent(this)}};O_.EMPTY=(()=>{let t=new O_;return t.closed=!0,t})();rue=O_.EMPTY});var by,PO=Q(()=>{by={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var qM,sue=Q(()=>{qM={setTimeout(t,e,...n){let{delegate:i}=qM;return i?.setTimeout?i.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){let{delegate:e}=qM;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0}});function SDe(t){qM.setTimeout(()=>{let{onUnhandledError:e}=by;if(e)e(t);else throw t})}var TDe=Q(()=>{PO();sue()});function oue(){}var DDe=Q(()=>{});function MDe(t){return aue("E",void 0,t)}function kDe(t){return aue("N",t,void 0)}function aue(t,e,n){return{kind:t,value:e,error:n}}var EDe,IDe=Q(()=>{EDe=aue("C",void 0,void 0)});function ZM(t){if(by.useDeprecatedSynchronousErrorHandling){let e=!P9;if(e&&(P9={errorThrown:!1,error:null}),t(),e){let{errorThrown:n,error:i}=P9;if(P9=null,n)throw i}}else t()}function ADe(t){by.useDeprecatedSynchronousErrorHandling&&P9&&(P9.errorThrown=!0,P9.error=t)}var P9,Pj=Q(()=>{PO();P9=null});function lue(t,e){return M5t.call(t,e)}function Rj(t){by.useDeprecatedSynchronousErrorHandling?ADe(t):SDe(t)}function k5t(t){throw t}function cue(t,e){let{onStoppedNotification:n}=by;n&&qM.setTimeout(()=>n(t,e))}var RO,M5t,due,XM,I5t,PDe=Q(()=>{Ej();Aj();PO();TDe();DDe();IDe();sue();Pj();RO=class extends O_{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Ij(e)&&e.add(this)):this.destination=I5t}static create(e,n,i){return new XM(e,n,i)}next(e){this.isStopped?cue(kDe(e),this):this._next(e)}error(e){this.isStopped?cue(MDe(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?cue(EDe,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},M5t=Function.prototype.bind;due=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(i){Rj(i)}}error(e){let{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(i){Rj(i)}else Rj(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){Rj(n)}}},XM=class extends RO{constructor(e,n,i){super();let r;if(yv(e)||!e)r={next:e??void 0,error:n??void 0,complete:i??void 0};else{let s;this&&by.useDeprecatedNextContext?(s=Object.create(e),s.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&lue(e.next,s),error:e.error&&lue(e.error,s),complete:e.complete&&lue(e.complete,s)}):r=e}this.destination=new due(r)}};I5t={closed:!0,next:oue,error:k5t,complete:oue}});var RDe,FDe=Q(()=>{RDe=typeof Symbol=="function"&&Symbol.observable||"@@observable"});function LDe(t){return t}var ODe=Q(()=>{});function NDe(t){return t.length===0?LDe:t.length===1?t[0]:function(n){return t.reduce((i,r)=>r(i),n)}}var VDe=Q(()=>{ODe()});function BDe(t){var e;return(e=t??by.Promise)!==null&&e!==void 0?e:Promise}function A5t(t){return t&&yv(t.next)&&yv(t.error)&&yv(t.complete)}function P5t(t){return t&&t instanceof RO||A5t(t)&&Ij(t)}var QM,uue=Q(()=>{PDe();Aj();FDe();VDe();PO();Ej();Pj();QM=(()=>{class t{constructor(n){n&&(this._subscribe=n)}lift(n){let i=new t;return i.source=this,i.operator=n,i}subscribe(n,i,r){let s=P5t(n)?n:new XM(n,i,r);return ZM(()=>{let{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(n){try{return this._subscribe(n)}catch(i){n.error(i)}}forEach(n,i){return i=BDe(i),new i((r,s)=>{let o=new XM({next:a=>{try{n(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(n){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(n)}[RDe](){return this}pipe(...n){return NDe(n)(this)}toPromise(n){return n=BDe(n),new n((i,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>i(s))})}}return t.create=e=>new t(e),t})()});var zDe,HDe=Q(()=>{iue();zDe=Mj(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"})});var JM,Fj,hue=Q(()=>{uue();Aj();HDe();nue();Pj();JM=(()=>{class t extends QM{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let i=new Fj(this,this);return i.operator=n,i}_throwIfClosed(){if(this.closed)throw new zDe}next(n){ZM(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(n)}})}error(n){ZM(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:i}=this;for(;i.length;)i.shift().error(n)}})}complete(){ZM(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:i,isStopped:r,observers:s}=this;return i||r?rue:(this.currentObservers=null,s.push(n),new O_(()=>{this.currentObservers=null,AO(s,n)}))}_checkFinalizedStatuses(n){let{hasError:i,thrownError:r,isStopped:s}=this;i?n.error(r):s&&n.complete()}asObservable(){let n=new QM;return n.source=this,n}}return t.create=(e,n)=>new Fj(e,n),t})(),Fj=class extends JM{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,e)}error(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,e)}complete(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)}_subscribe(e){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&i!==void 0?i:rue}}});var R9,GDe=Q(()=>{hue();R9=class extends JM{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){let{hasError:e,thrownError:n,_value:i}=this;if(e)throw n;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}}});var WDe=Q(()=>{});var Lj=Q(()=>{uue();hue();GDe();WDe()});var Db,pue=Q(()=>{Lj();Db=class extends JM{emit(e){super.next(e)}}});var X0,Gn,Ld=Q(()=>{Zh();pue();X0=class X0{static getStackTrace(e,n){return O(this,null,function*(){return new Promise((i,r)=>{i(e.split(`
`)),window&&window.sourceMappedStackTrace?window.sourceMappedStackTrace.mapStackTrace(e,s=>{i(s)},{cacheGlobally:!0,filter:s=>s.indexOf("main.js")>-1}):i([e])})})}static shrinkStack(e,n,i=!0){let r=[];return e.forEach(s=>{s=X0.modifyLine(s),s.length>0&&(i?r.push("["+s+"]"):r.push(s))}),r.length>n&&(r.length=n),r}static write(e,n,i){i||(i=[]);let r;if(e==="error"){if(Es.isArray(i)&&i.length>0&&i[0].name==="FirebaseError"&&i[0].message==="Missing or insufficient permissions.")return;this.isError(n)?(r=n,console.error(r,i),X0.onError.emit({message:r.message,stack:"",shrinkStack:"",optionalParams:i})):Es.isArray(i)&&(r=i.find(s=>this.isError(s)),i=i.filter(s=>!this.isError(s)),r?(console.error(n+`

`,r,...i),(r.isError||r.isNoError||r.isError===void 0)&&X0.onError.emit(r)):(console.error(n+`

`,...i),X0.onError.emit({message:n,stack:"",shrinkStack:"",optionalParams:i})))}else Es.isArray(i)?console[e].apply(console,[n,...i]):console[e].apply(console,n)}static log(e,...n){return X0.write("info",e,n)}static warn(e,...n){return X0.write("warn",e,n)}static info(e,...n){return X0.write("info",e,n)}static error(e,...n){return X0.write("error",e,n)}static debug(e,...n){return X0.write("debug",e,n)}static modifyLine(e){e=e.replace("at Function.<anonymous>",""),e=e.replace("at Socket.<anonymous>",""),e=e.replace(")",""),e=e.replace("(",""),e=e.trim(),e=e.replace("at Function.<anonymous>","");let n=e.match(/webpack:\/\/\/\.\/[^\]]+/);return n&&(e=n[0]),e.indexOf(".ts")===-1||e.indexOf("log.tools.ts")>-1?"":e}static getSourceFileFromCaller(e){if(e){let n=e.match(/[^\.\/]+\.([^\.]+\.)?ts/g);if(n)return n[0]}return""}static getColorFromCaller(e){let n=this.getSourceFileFromCaller(e);return(!n||n.length===0)&&(n="unknown"),this.colors[n]?this.colors[n]:(console.error("no console-color for "+n),"")}static isCallerInBlacklist(e){return this.callerBlacklist.indexOf(e)>-1}static setLogFunctions(e,n,i){this.debugFn=e,this.infoFn=n,this.errorFn=i}static isError(e){return e?.stack?!0:e?.constructor?.name?.includes("Error")||e?.name?.includes("Error")}};X0.onError=new Db,X0.onSocketError=new Db,X0.callerBlacklist=["NXT.FORM-CONTROL"],X0.lastLogTimestamp=0,X0.colors={unknown:"background: #2a2a2a; color: #a2a2a2","socket.service.ts":"background: #222; color: #bada55","app.component.ts":"background-color: #2a2a2a; color: orange","login.service.ts":"background-color: #2a2a2a; color: white","login.component.ts":"background-color: #2a2a2a; color: yellow","nxt.form-control.ts":"background-color: #2a2a2a; color: gold","auth-guard.ts":"background:blue; color: orange","iframe-message-manager-in-iframe.ts":"background:green; color: black","calendar-event-edit.component.ts":"background:yellow; color: black","payments.component.ts":"background:yellow; color: blue","input.component.ts":"background:yellow; color: brown"};Gn=X0});function mue(){if(!Oj&&(Oj=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Oj))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Oj(R5t)}var Oj,R5t,UDe=Q(()=>{R5t=new Uint8Array(16)});function jDe(t,e=0){return x0[t[e+0]]+x0[t[e+1]]+x0[t[e+2]]+x0[t[e+3]]+"-"+x0[t[e+4]]+x0[t[e+5]]+"-"+x0[t[e+6]]+x0[t[e+7]]+"-"+x0[t[e+8]]+x0[t[e+9]]+"-"+x0[t[e+10]]+x0[t[e+11]]+x0[t[e+12]]+x0[t[e+13]]+x0[t[e+14]]+x0[t[e+15]]}var x0,$De=Q(()=>{x0=[];for(let t=0;t<256;++t)x0.push((t+256).toString(16).slice(1))});var F5t,fue,KDe=Q(()=>{F5t=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),fue={randomUUID:F5t}});function L5t(t,e,n){if(fue.randomUUID&&!e&&!t)return fue.randomUUID();t=t||{};let i=t.random||(t.rng||mue)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(let r=0;r<16;++r)e[n+r]=i[r];return e}return jDe(i)}var Nj,YDe=Q(()=>{KDe();UDe();$De();Nj=L5t});var qDe=Q(()=>{YDe()});var ua,ef=Q(()=>{qDe();ua=class{static generate(){return Nj()}static generateNxt(){return"nxt"+Nj().substring(3)}}});var _v,P1,zi,a4=Q(()=>{xDe();Ld();me();ef();_v=function(t){return t.Show="show",t.Hide="hide",t.Unknown="unknown",t}(_v||{}),P1=function(t){return t.getWindow="window;",t.hideIframe=`document.querySelector("#iframeWrapper").style.top="10000px";document.querySelector("#iframeWrapper").style.position="fixed";window.iframeWrapperState='hide'`,t.hideIframeWhatsApp=`document.querySelector("#iframeWrapper").style.right="0px";document.querySelector("#iframeWrapper").style.width="300px";document.querySelector("#iframeWrapper").style.height="100vh";document.querySelector("#iframeWrapper").style.left="auto";document.querySelector("#iframeWrapper").style.zIndex=10000;document.querySelector("#iframeWrapper").style.position="fixed";window.iframeWrapperState='hide'`,t.showIframeWhatsApp=`document.querySelector("#iframeWrapper").style.top="0";const prevState = window.iframeWrapperState;document.querySelector("#iframeWrapper").style.left="150px";document.querySelector("#iframeWrapper").style.right="150px";document.querySelector("#iframeWrapper").style.position="fixed";window.iframeWrapperState='show';prevState;`,t.showIframe=`const prevState = window.iframeWrapperState;document.querySelector("#iframeWrapper").style.top="0";document.querySelector("#iframeWrapper").style.position="fixed";window.iframeWrapperState='show';prevState;`,t.whatsApp_getCurrentChatTitle=`document.querySelector('[data-testid="conversation-panel-wrapper"').querySelector('header').querySelectorAll('span')[1].innerText`,t.closeGoogleEvent="$('#xCancelBu').click();",t.Maximize=`$('#iframeWrapper').css({top:0, left:0, right:0, bottom:0, width:"", height:""});`,t}(P1||{}),zi=class t{constructor(e){this.socketService=e,this.messageFromElectron=new nt,this.requestHandlers=[],this.waitingRequests=[],this.isIframeVisible=!1,this.hiddenState=P1.hideIframe,this.nxtEval=eval,t.instance=this,this.registerMessageReceiver(),this.registerCalendarEventEditRequestListener(),this.registerUserIsActiveEvent(),this.addRequestListener("keepAlive",()=>this.socketService.state.value)}get postWindow(){return this.iframe?this.iframe.contentWindow:window.top!==window?window.top:null}uuidv4(){return Date.now().toString()}addRequestListener(e,n){let i=this.requestHandlers.find(r=>r.type===e);i&&(this.requestHandlers=this.requestHandlers.filter(r=>r!==i)),this.requestHandlers.push({type:e,handler:n})}getParentUrl(){return new Promise((e,n)=>{t.instance.send("eval","window.location.href;",i=>{e(i)})})}sendGet(e){return new Promise((n,i)=>{Gn.info("sendGet: "+e),this.send("eval",e,n)})}showIframe(e,n){return this.isIframeVisible?_v.Show:(this.isIframeVisible=!0,Gn.info("SHOW IFRAME: "+e),this.hideIframeTimeout&&clearTimeout(this.hideIframeTimeout),n==="WhatsApp"?this.sendEval(P1.showIframe):this.sendEval(P1.showIframe),_v.Hide)}hideIframe(e,n){n||(n=0),Gn.info("HIDE IFRAME: "+e),this.hideIframeTimeout=setTimeout(()=>{this.sendEval(P1.hideIframe),this.isIframeVisible=!1},n)}writeInWhatsAppChat(e){let n=e.replace(/\n/g,"$NL$");n=n.replace(/\"/g,'\\"');let i='window.write_in_chat("'+n+'", false, true)';this.send("eval",i)}sendEval(e,n){e===P1.hideIframe?this.send("eval",this.hiddenState,n):this.send("eval",e,n)}send(e,n,i){n||(n={});let r={id:ua.generate(),type:e,data:n,callback:i,from:"ng-nxtlvlink"};if(i&&this.waitingRequests.push(r),this.postWindow){let s={id:r.id,type:e,data:n,callback:!!i};this.postWindow.postMessage("iframe-request:"+JSON.stringify(s),"*")}}sendResponse(e){this.postWindow&&this.postWindow.postMessage("iframe-response:"+JSON.stringify(e),"*")}registerMessageReceiver(){Gn.info("registerMessageReceiver in ngNxtlvlink"),window.addEventListener("message",e=>O(this,null,function*(){try{if(e.data&&typeof e.data=="string"){if(e.data.indexOf("iframe-request:")===0){let n=JSON.parse(e.data.toString().substr(15));n.from==="extension"&&this.handleIframeMessageRequest(n)}else if(e.data.indexOf("iframe-response:")===0){let n=JSON.parse(e.data.toString().substr(16));this.handleIframeMessageResponse(n)}}}catch(n){Gn.error(CDe(this,n))}}))}handleIframeMessageRequest(e){return O(this,null,function*(){switch(e.type){case"sendToIframe":this.messageFromElectron.next(JSON.parse(e.data));break;case"eval":this.socketService.sendTelegramAdmin("EVAL im Frontend wird nicht ausgef\xFChrt: "+e.data),this.nxtEval(e.data);break;default:this.requestHandlers&&this.requestHandlers.filter(i=>i.type===e.type).map(i=>O(this,null,function*(){let r=yield i.handler(e.data),s={id:this.uuidv4(),requestId:e.id,type:e.type,data:r};this.sendResponse(s)}));break}})}handleIframeMessageResponse(e){let n=this.waitingRequests.findIndex(i=>i.id===e.requestId);n>-1&&(this.waitingRequests[n].callback(e.data),this.waitingRequests.splice(n,1))}setIframe(e){this.iframe=e}registerCalendarEventEditRequestListener(){}injectScript(e=""){this.send("eval",'function declarations-of-consent(){alert("geht");}declarations-of-consent();')}registerUserIsActiveEvent(){this.addRequestListener("userIsActive",e=>{this.socketService.userIsActive(e)})}userIsActiveTest(){this.socketService.userIsActive({href:"https://web.whatsapp.com"})}}});function Y2(t){return t!=null&&`${t}`!="false"}function Q0(t,e=0){return O5t(t)?Number(t):arguments.length===2?e:0}function O5t(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function F9(t){return Array.isArray(t)?t:[t]}function vm(t){return t==null?"":typeof t=="string"?t:`${t}px`}function Yp(t){return t instanceof fi?t.nativeElement:t}function ZDe(t,e=/\s+/){let n=[];if(t!=null){let i=Array.isArray(t)?t:`${t}`.split(e);for(let r of i){let s=`${r}`.trim();s&&n.push(s)}}return n}var J0=Q(()=>{me()});function N_(){return sEe}function oEe(t){sEe??=t}function lEe(t,e){if(t.length==0)return e;if(e.length==0)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,n==2?t+e.substring(1):n==1?t+e:t+"/"+e}function XDe(t){let e=t.match(/#|\?|$/),n=e&&e.index||t.length,i=n-(t[n-1]==="/"?1:0);return t.slice(0,i)+t.slice(n)}function L9(t){return t&&t[0]!=="?"?"?"+t:t}function z5t(){return new S8(it(ik))}function H5t(t,e){if(!t||!e.startsWith(t))return e;let n=e.substring(t.length);return n===""||["/",";","?","#"].includes(n[0])?n:e}function QDe(t){return t.replace(/\/index.html$/,"")}function G5t(t){if(new RegExp("^(https?:)?//").test(t)){let[,n]=t.split(/\/\/[^\/]+/);return n}return t}function W5t(t){return gv(t)[Xm.LocaleId]}function U5t(t,e,n){let i=gv(t),r=[i[Xm.DayPeriodsFormat],i[Xm.DayPeriodsStandalone]],s=Cv(r,e);return Cv(s,n)}function j5t(t,e,n){let i=gv(t),r=[i[Xm.DaysFormat],i[Xm.DaysStandalone]],s=Cv(r,e);return Cv(s,n)}function $5t(t,e,n){let i=gv(t),r=[i[Xm.MonthsFormat],i[Xm.MonthsStandalone]],s=Cv(r,e);return Cv(s,n)}function K5t(t,e){let i=gv(t)[Xm.Eras];return Cv(i,e)}function Vj(t,e){let n=gv(t);return Cv(n[Xm.DateFormat],e)}function Bj(t,e){let n=gv(t);return Cv(n[Xm.TimeFormat],e)}function zj(t,e){let i=gv(t)[Xm.DateTimeFormat];return Cv(i,e)}function Yj(t,e){let n=gv(t),i=n[Xm.NumberSymbols][e];if(typeof i>"u"){if(e===Eb.CurrencyDecimal)return n[Xm.NumberSymbols][Eb.Decimal];if(e===Eb.CurrencyGroup)return n[Xm.NumberSymbols][Eb.Group]}return i}function dEe(t){if(!t[Xm.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Xm.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function q5t(t){let e=gv(t);return dEe(e),(e[Xm.ExtraData][2]||[]).map(i=>typeof i=="string"?gue(i):[gue(i[0]),gue(i[1])])}function Z5t(t,e,n){let i=gv(t);dEe(i);let r=[i[Xm.ExtraData][0],i[Xm.ExtraData][1]],s=Cv(r,e)||[];return Cv(s,n)||[]}function Cv(t,e){for(let n=e;n>-1;n--)if(typeof t[n]<"u")return t[n];throw new Error("Locale data API: locale data undefined")}function gue(t){let[e,n]=t.split(":");return{hours:+e,minutes:+n}}function nf(t,e,n,i){let r=aCt(t);e=b8(n,e)||e;let o=[],a;for(;e;)if(a=Q5t.exec(e),a){o=o.concat(a.slice(1));let d=o.pop();if(!d)break;e=d}else{o.push(e);break}let l=r.getTimezoneOffset();i&&(l=hEe(i,l),r=oCt(r,i,!0));let c="";return o.forEach(d=>{let u=rCt(d);c+=u?u(r,n,l):d==="''"?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function Kj(t,e,n){let i=new Date(0);return i.setFullYear(t,e,n),i.setHours(0,0,0),i}function b8(t,e){let n=W5t(t);if(Hj[n]??={},Hj[n][e])return Hj[n][e];let i="";switch(e){case"shortDate":i=Vj(t,l4.Short);break;case"mediumDate":i=Vj(t,l4.Medium);break;case"longDate":i=Vj(t,l4.Long);break;case"fullDate":i=Vj(t,l4.Full);break;case"shortTime":i=Bj(t,l4.Short);break;case"mediumTime":i=Bj(t,l4.Medium);break;case"longTime":i=Bj(t,l4.Long);break;case"fullTime":i=Bj(t,l4.Full);break;case"short":let r=b8(t,"shortTime"),s=b8(t,"shortDate");i=Gj(zj(t,l4.Short),[r,s]);break;case"medium":let o=b8(t,"mediumTime"),a=b8(t,"mediumDate");i=Gj(zj(t,l4.Medium),[o,a]);break;case"long":let l=b8(t,"longTime"),c=b8(t,"longDate");i=Gj(zj(t,l4.Long),[l,c]);break;case"full":let d=b8(t,"fullTime"),u=b8(t,"fullDate");i=Gj(zj(t,l4.Full),[d,u]);break}return i&&(Hj[n][e]=i),i}function Gj(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(n,i){return e!=null&&i in e?e[i]:n})),t}function wy(t,e,n="-",i,r){let s="";(t<0||r&&t<=0)&&(r?t=-t+1:(t=-t,s=n));let o=String(t);for(;o.length<e;)o="0"+o;return i&&(o=o.slice(o.length-e)),s+o}function J5t(t,e){return wy(t,3).substring(0,e)}function tf(t,e,n=0,i=!1,r=!1){return function(s,o){let a=eCt(t,s);if((n>0||a>-n)&&(a+=n),t===Ed.Hours)a===0&&n===-12&&(a=12);else if(t===Ed.FractionalSeconds)return J5t(a,e);let l=Yj(o,Eb.MinusSign);return wy(a,e,l,i,r)}}function eCt(t,e){switch(t){case Ed.FullYear:return e.getFullYear();case Ed.Month:return e.getMonth();case Ed.Date:return e.getDate();case Ed.Hours:return e.getHours();case Ed.Minutes:return e.getMinutes();case Ed.Seconds:return e.getSeconds();case Ed.FractionalSeconds:return e.getMilliseconds();case Ed.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}function Zu(t,e,n=q2.Format,i=!1){return function(r,s){return tCt(r,s,t,e,n,i)}}function tCt(t,e,n,i,r,s){switch(n){case Dd.Months:return $5t(e,r,i)[t.getMonth()];case Dd.Days:return j5t(e,r,i)[t.getDay()];case Dd.DayPeriods:let o=t.getHours(),a=t.getMinutes();if(s){let c=q5t(e),d=Z5t(e,r,i),u=c.findIndex(m=>{if(Array.isArray(m)){let[f,_]=m,x=o>=f.hours&&a>=f.minutes,D=o<_.hours||o===_.hours&&a<_.minutes;if(f.hours<_.hours){if(x&&D)return!0}else if(x||D)return!0}else if(m.hours===o&&m.minutes===a)return!0;return!1});if(u!==-1)return d[u]}return U5t(e,r,i)[o<12?0:1];case Dd.Eras:return K5t(e,i)[t.getFullYear()<=0?0:1];default:let l=n;throw new Error(`unexpected translation type ${l}`)}}function Wj(t){return function(e,n,i){let r=-1*i,s=Yj(n,Eb.MinusSign),o=r>0?Math.floor(r/60):Math.ceil(r/60);switch(t){case w8.Short:return(r>=0?"+":"")+wy(o,2,s)+wy(Math.abs(r%60),2,s);case w8.ShortGMT:return"GMT"+(r>=0?"+":"")+wy(o,1,s);case w8.Long:return"GMT"+(r>=0?"+":"")+wy(o,2,s)+":"+wy(Math.abs(r%60),2,s);case w8.Extended:return i===0?"Z":(r>=0?"+":"")+wy(o,2,s)+":"+wy(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${t}"`)}}}function nCt(t){let e=Kj(t,iCt,1).getDay();return Kj(t,0,1+(e<=jj?jj:jj+7)-e)}function uEe(t){let e=t.getDay(),n=e===0?-3:jj-e;return Kj(t.getFullYear(),t.getMonth(),t.getDate()+n)}function vue(t,e=!1){return function(n,i){let r;if(e){let s=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,o=n.getDate();r=1+Math.floor((o+s)/7)}else{let s=uEe(n),o=nCt(s.getFullYear()),a=s.getTime()-o.getTime();r=1+Math.round(a/6048e5)}return wy(r,t,Yj(i,Eb.MinusSign))}}function Uj(t,e=!1){return function(n,i){let s=uEe(n).getFullYear();return wy(s,t,Yj(i,Eb.MinusSign),e)}}function rCt(t){if(yue[t])return yue[t];let e;switch(t){case"G":case"GG":case"GGG":e=Zu(Dd.Eras,Lu.Abbreviated);break;case"GGGG":e=Zu(Dd.Eras,Lu.Wide);break;case"GGGGG":e=Zu(Dd.Eras,Lu.Narrow);break;case"y":e=tf(Ed.FullYear,1,0,!1,!0);break;case"yy":e=tf(Ed.FullYear,2,0,!0,!0);break;case"yyy":e=tf(Ed.FullYear,3,0,!1,!0);break;case"yyyy":e=tf(Ed.FullYear,4,0,!1,!0);break;case"Y":e=Uj(1);break;case"YY":e=Uj(2,!0);break;case"YYY":e=Uj(3);break;case"YYYY":e=Uj(4);break;case"M":case"L":e=tf(Ed.Month,1,1);break;case"MM":case"LL":e=tf(Ed.Month,2,1);break;case"MMM":e=Zu(Dd.Months,Lu.Abbreviated);break;case"MMMM":e=Zu(Dd.Months,Lu.Wide);break;case"MMMMM":e=Zu(Dd.Months,Lu.Narrow);break;case"LLL":e=Zu(Dd.Months,Lu.Abbreviated,q2.Standalone);break;case"LLLL":e=Zu(Dd.Months,Lu.Wide,q2.Standalone);break;case"LLLLL":e=Zu(Dd.Months,Lu.Narrow,q2.Standalone);break;case"w":e=vue(1);break;case"ww":e=vue(2);break;case"W":e=vue(1,!0);break;case"d":e=tf(Ed.Date,1);break;case"dd":e=tf(Ed.Date,2);break;case"c":case"cc":e=tf(Ed.Day,1);break;case"ccc":e=Zu(Dd.Days,Lu.Abbreviated,q2.Standalone);break;case"cccc":e=Zu(Dd.Days,Lu.Wide,q2.Standalone);break;case"ccccc":e=Zu(Dd.Days,Lu.Narrow,q2.Standalone);break;case"cccccc":e=Zu(Dd.Days,Lu.Short,q2.Standalone);break;case"E":case"EE":case"EEE":e=Zu(Dd.Days,Lu.Abbreviated);break;case"EEEE":e=Zu(Dd.Days,Lu.Wide);break;case"EEEEE":e=Zu(Dd.Days,Lu.Narrow);break;case"EEEEEE":e=Zu(Dd.Days,Lu.Short);break;case"a":case"aa":case"aaa":e=Zu(Dd.DayPeriods,Lu.Abbreviated);break;case"aaaa":e=Zu(Dd.DayPeriods,Lu.Wide);break;case"aaaaa":e=Zu(Dd.DayPeriods,Lu.Narrow);break;case"b":case"bb":case"bbb":e=Zu(Dd.DayPeriods,Lu.Abbreviated,q2.Standalone,!0);break;case"bbbb":e=Zu(Dd.DayPeriods,Lu.Wide,q2.Standalone,!0);break;case"bbbbb":e=Zu(Dd.DayPeriods,Lu.Narrow,q2.Standalone,!0);break;case"B":case"BB":case"BBB":e=Zu(Dd.DayPeriods,Lu.Abbreviated,q2.Format,!0);break;case"BBBB":e=Zu(Dd.DayPeriods,Lu.Wide,q2.Format,!0);break;case"BBBBB":e=Zu(Dd.DayPeriods,Lu.Narrow,q2.Format,!0);break;case"h":e=tf(Ed.Hours,1,-12);break;case"hh":e=tf(Ed.Hours,2,-12);break;case"H":e=tf(Ed.Hours,1);break;case"HH":e=tf(Ed.Hours,2);break;case"m":e=tf(Ed.Minutes,1);break;case"mm":e=tf(Ed.Minutes,2);break;case"s":e=tf(Ed.Seconds,1);break;case"ss":e=tf(Ed.Seconds,2);break;case"S":e=tf(Ed.FractionalSeconds,1);break;case"SS":e=tf(Ed.FractionalSeconds,2);break;case"SSS":e=tf(Ed.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Wj(w8.Short);break;case"ZZZZZ":e=Wj(w8.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Wj(w8.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Wj(w8.Long);break;default:return null}return yue[t]=e,e}function hEe(t,e){t=t.replace(/:/g,"");let n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function sCt(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}function oCt(t,e,n){let i=n?-1:1,r=t.getTimezoneOffset(),s=hEe(e,r);return sCt(t,i*(s-r))}function aCt(t){if(JDe(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[r,s=1,o=1]=t.split("-").map(a=>+a);return Kj(r,s-1,o)}let n=parseFloat(t);if(!isNaN(t-n))return new Date(n);let i;if(i=t.match(X5t))return lCt(i)}let e=new Date(t);if(!JDe(e))throw new Error(`Unable to convert "${t}" into a date`);return e}function lCt(t){let e=new Date(0),n=0,i=0,r=t[8]?e.setUTCFullYear:e.setFullYear,s=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));let o=Number(t[4]||0)-n,a=Number(t[5]||0)-i,l=Number(t[6]||0),c=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return s.call(e,o,a,l,c),e}function JDe(t){return t instanceof Date&&!isNaN(t.valueOf())}function cCt(t,e,n,i){let r=`=${t}`;if(e.indexOf(r)>-1||(r=n.getPluralCategory(t,i),e.indexOf(r)>-1))return r;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}function Sue(t,e,n){return eDe(t,e,n)}function qj(t,e){e=encodeURIComponent(e);for(let n of t.split(";")){let i=n.indexOf("="),[r,s]=i==-1?[n,""]:[n.slice(0,i),n.slice(i+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}function tEe(t,e){t.context.$implicit=e.item}function iEe(t,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${t} must be a TemplateRef, but received '${FTe(e)}'.`)}function FO(t,e){return new to(2100,!1)}function vCt(t,e){return{key:t,value:e}}function nEe(t,e){let n=t.key,i=e.key;if(n===i)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(n===null)return 1;if(i===null)return-1;if(typeof n=="string"&&typeof i=="string")return n<i?-1:1;if(typeof n=="number"&&typeof i=="number")return n-i;if(typeof n=="boolean"&&typeof i=="boolean")return n<i?-1:1;let r=String(n),s=String(i);return r==s?0:r<s?-1:1}function Sy(t){return t===Tue}function Z2(t){return t===yCt}var sEe,$j,Lr,aEe,V5t,ik,B5t,cEe,S8,ek,q2,Lu,l4,Eb,Y5t,X5t,Hj,Q5t,w8,Ed,Dd,iCt,jj,yue,pEe,dCt,_ue,eEe,_s,Cue,Hi,Ct,xue,rr,rf,bue,wue,uCt,hCt,Xu,mEe,V_,pCt,mCt,fCt,Zj,gCt,Xj,nk,fEe,sd,Tue,yCt,tk,ri=Q(()=>{me();me();sEe=null;$j=class{},Lr=new Ri(""),aEe=(()=>{let e=class e{historyGo(i){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:()=>Ve(V5t),providedIn:"platform"});let t=e;return t})(),V5t=(()=>{let e=class e extends aEe{constructor(){super(),this._doc=Ve(Lr),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return N_().getBaseHref(this._doc)}onPopState(i){let r=N_().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",i,!1),()=>r.removeEventListener("popstate",i)}onHashChange(i){let r=N_().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",i,!1),()=>r.removeEventListener("hashchange",i)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(i){this._location.pathname=i}pushState(i,r,s){this._history.pushState(i,r,s)}replaceState(i,r,s){this._history.replaceState(i,r,s)}forward(){this._history.forward()}back(){this._history.back()}historyGo(i=0){this._history.go(i)}getState(){return this._history.state}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:()=>new e,providedIn:"platform"});let t=e;return t})();ik=(()=>{let e=class e{historyGo(i){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:()=>Ve(cEe),providedIn:"root"});let t=e;return t})(),B5t=new Ri(""),cEe=(()=>{let e=class e extends ik{constructor(i,r){super(),this._platformLocation=i,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??Ve(Lr).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(i){this._removeListenerFns.push(this._platformLocation.onPopState(i),this._platformLocation.onHashChange(i))}getBaseHref(){return this._baseHref}prepareExternalUrl(i){return lEe(this._baseHref,i)}path(i=!1){let r=this._platformLocation.pathname+L9(this._platformLocation.search),s=this._platformLocation.hash;return s&&i?`${r}${s}`:r}pushState(i,r,s,o){let a=this.prepareExternalUrl(s+L9(o));this._platformLocation.pushState(i,r,a)}replaceState(i,r,s,o){let a=this.prepareExternalUrl(s+L9(o));this._platformLocation.replaceState(i,r,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(i=0){this._platformLocation.historyGo?.(i)}};e.\u0275fac=function(r){return new(r||e)(it(aEe),it(B5t,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),S8=(()=>{let e=class e{constructor(i){this._subject=new nt,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=i;let r=this._locationStrategy.getBaseHref();this._basePath=G5t(XDe(QDe(r))),this._locationStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(i=!1){return this.normalize(this._locationStrategy.path(i))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(i,r=""){return this.path()==this.normalize(i+L9(r))}normalize(i){return e.stripTrailingSlash(H5t(this._basePath,QDe(i)))}prepareExternalUrl(i){return i&&i[0]!=="/"&&(i="/"+i),this._locationStrategy.prepareExternalUrl(i)}go(i,r="",s=null){this._locationStrategy.pushState(s,"",i,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(i+L9(r)),s)}replaceState(i,r="",s=null){this._locationStrategy.replaceState(s,"",i,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(i+L9(r)),s)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(i=0){this._locationStrategy.historyGo?.(i)}onUrlChange(i){return this._urlChangeListeners.push(i),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(i);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(i="",r){this._urlChangeListeners.forEach(s=>s(i,r))}subscribe(i,r,s){return this._subject.subscribe({next:i,error:r,complete:s})}};e.normalizeQueryParams=L9,e.joinWithSlash=lEe,e.stripTrailingSlash=XDe,e.\u0275fac=function(r){return new(r||e)(it(ik))},e.\u0275prov=Et({token:e,factory:()=>z5t(),providedIn:"root"});let t=e;return t})();ek=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}(ek||{}),q2=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}(q2||{}),Lu=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}(Lu||{}),l4=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}(l4||{}),Eb={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};Y5t=tDe;X5t=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Hj={},Q5t=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,w8=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}(w8||{}),Ed=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}(Ed||{}),Dd=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}(Dd||{});iCt=0,jj=4;yue={};pEe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:function(r){let s=null;return r?s=new r:s=(o=>new dCt(o))(it(Z0)),s},providedIn:"root"});let t=e;return t})();dCt=(()=>{let e=class e extends pEe{constructor(i){super(),this.locale=i}getPluralCategory(i,r){switch(Y5t(r||this.locale)(i)){case ek.Zero:return"zero";case ek.One:return"one";case ek.Two:return"two";case ek.Few:return"few";case ek.Many:return"many";default:return"other"}}};e.\u0275fac=function(r){return new(r||e)(it(Z0))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})();_ue=/\s+/,eEe=[],_s=(()=>{let e=class e{constructor(i,r){this._ngEl=i,this._renderer=r,this.initialClasses=eEe,this.stateMap=new Map}set klass(i){this.initialClasses=i!=null?i.trim().split(_ue):eEe}set ngClass(i){this.rawClass=typeof i=="string"?i.trim().split(_ue):i}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let i=this.rawClass;if(Array.isArray(i)||i instanceof Set)for(let r of i)this._updateState(r,!0);else if(i!=null)for(let r of Object.keys(i))this._updateState(r,!!i[r]);this._applyStateDiff()}_updateState(i,r){let s=this.stateMap.get(i);s!==void 0?(s.enabled!==r&&(s.changed=!0,s.enabled=r),s.touched=!0):this.stateMap.set(i,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let i of this.stateMap){let r=i[0],s=i[1];s.changed?(this._toggleClass(r,s.enabled),s.changed=!1):s.touched||(s.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),s.touched=!1}}_toggleClass(i,r){i=i.trim(),i.length>0&&i.split(_ue).forEach(s=>{r?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Ac))},e.\u0275dir=mi({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0});let t=e;return t})(),Cue=class{constructor(e,n,i,r){this.$implicit=e,this.ngForOf=n,this.index=i,this.count=r}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Hi=(()=>{let e=class e{set ngForOf(i){this._ngForOf=i,this._ngForOfDirty=!0}set ngForTrackBy(i){this._trackByFn=i}get ngForTrackBy(){return this._trackByFn}constructor(i,r,s){this._viewContainer=i,this._template=r,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(i){i&&(this._template=i)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let i=this._ngForOf;if(!this._differ&&i)if(0)try{}catch{}else this._differ=this._differs.find(i).create(this.ngForTrackBy)}if(this._differ){let i=this._differ.diff(this._ngForOf);i&&this._applyChanges(i)}}_applyChanges(i){let r=this._viewContainer;i.forEachOperation((s,o,a)=>{if(s.previousIndex==null)r.createEmbeddedView(this._template,new Cue(s.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)r.remove(o===null?void 0:o);else if(o!==null){let l=r.get(o);r.move(l,a),tEe(l,s)}});for(let s=0,o=r.length;s<o;s++){let l=r.get(s).context;l.index=s,l.count=o,l.ngForOf=this._ngForOf}i.forEachIdentityChange(s=>{let o=r.get(s.currentIndex);tEe(o,s)})}static ngTemplateContextGuard(i,r){return!0}};e.\u0275fac=function(r){return new(r||e)(R(Na),R(Ma),R(xy))},e.\u0275dir=mi({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let t=e;return t})();Ct=(()=>{let e=class e{constructor(i,r){this._viewContainer=i,this._context=new xue,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(i){this._context.$implicit=this._context.ngIf=i,this._updateView()}set ngIfThen(i){iEe("ngIfThen",i),this._thenTemplateRef=i,this._thenViewRef=null,this._updateView()}set ngIfElse(i){iEe("ngIfElse",i),this._elseTemplateRef=i,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(i,r){return!0}};e.\u0275fac=function(r){return new(r||e)(R(Na),R(Ma))},e.\u0275dir=mi({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let t=e;return t})(),xue=class{constructor(){this.$implicit=null,this.ngIf=null}};rr=(()=>{let e=class e{constructor(i,r,s){this._ngEl=i,this._differs=r,this._renderer=s,this._ngStyle=null,this._differ=null}set ngStyle(i){this._ngStyle=i,!this._differ&&i&&(this._differ=this._differs.find(i).create())}ngDoCheck(){if(this._differ){let i=this._differ.diff(this._ngStyle);i&&this._applyChanges(i)}}_setStyle(i,r){let[s,o]=i.split("."),a=s.indexOf("-")===-1?void 0:I9.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,s,o?`${r}${o}`:r,a):this._renderer.removeStyle(this._ngEl.nativeElement,s,a)}_applyChanges(i){i.forEachRemovedItem(r=>this._setStyle(r.key,null)),i.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),i.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(KM),R(Ac))},e.\u0275dir=mi({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});let t=e;return t})(),rf=(()=>{let e=class e{constructor(i){this._viewContainerRef=i,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(i){if(this._shouldRecreateView(i)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let s=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,s,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(i){return!!i.ngTemplateOutlet||!!i.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(i,r,s)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,s):!1,get:(i,r,s)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,s)}})}};e.\u0275fac=function(r){return new(r||e)(R(Na))},e.\u0275dir=mi({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[yn]});let t=e;return t})();bue=class{createSubscription(e,n){return C0(()=>e.subscribe({next:n,error:i=>{throw i}}))}dispose(e){C0(()=>e.unsubscribe())}},wue=class{createSubscription(e,n){return e.then(n,i=>{throw i})}dispose(e){}},uCt=new wue,hCt=new bue,Xu=(()=>{let e=class e{constructor(i){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=i}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(i){if(!this._obj){if(i)try{this.markForCheckOnValueUpdate=!1,this._subscribe(i)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return i!==this._obj?(this._dispose(),this.transform(i)):this._latestValue}_subscribe(i){this._obj=i,this._strategy=this._selectStrategy(i),this._subscription=this._strategy.createSubscription(i,r=>this._updateLatestValue(i,r))}_selectStrategy(i){if($M(i))return uCt;if(lDe(i))return hCt;throw FO(e,i)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(i,r){i===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}};e.\u0275fac=function(r){return new(r||e)(R(Kt,16))},e.\u0275pipe=kr({name:"async",type:e,pure:!1,standalone:!0});let t=e;return t})(),mEe=(()=>{let e=class e{transform(i){if(i==null)return null;if(typeof i!="string")throw FO(e,i);return i.toLowerCase()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"lowercase",type:e,pure:!0,standalone:!0});let t=e;return t})(),V_=(()=>{let e=class e{transform(i){if(i==null)return null;if(typeof i!="string")throw FO(e,i);return i.toUpperCase()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"uppercase",type:e,pure:!0,standalone:!0});let t=e;return t})(),pCt="mediumDate",mCt=new Ri(""),fCt=new Ri(""),Zj=(()=>{let e=class e{constructor(i,r,s){this.locale=i,this.defaultTimezone=r,this.defaultOptions=s}transform(i,r,s,o){if(i==null||i===""||i!==i)return null;try{let a=r??this.defaultOptions?.dateFormat??pCt,l=s??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return nf(i,a,o||this.locale,l)}catch(a){throw FO(e,a.message)}}};e.\u0275fac=function(r){return new(r||e)(R(Z0,16),R(mCt,24),R(fCt,24))},e.\u0275pipe=kr({name:"date",type:e,pure:!0,standalone:!0});let t=e;return t})(),gCt=/#/g,Xj=(()=>{let e=class e{constructor(i){this._localization=i}transform(i,r,s){if(i==null)return"";if(typeof r!="object"||r===null)throw FO(e,r);let o=cCt(i,Object.keys(r),this._localization,s);return r[o].replace(gCt,i.toString())}};e.\u0275fac=function(r){return new(r||e)(R(pEe,16))},e.\u0275pipe=kr({name:"i18nPlural",type:e,pure:!0,standalone:!0});let t=e;return t})(),nk=(()=>{let e=class e{transform(i){return JSON.stringify(i,null,2)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"json",type:e,pure:!1,standalone:!0});let t=e;return t})();fEe=(()=>{let e=class e{constructor(i){this.differs=i,this.keyValues=[],this.compareFn=nEe}transform(i,r=nEe){if(!i||!(i instanceof Map)&&typeof i!="object")return null;this.differ??=this.differs.find(i).create();let s=this.differ.diff(i),o=r!==this.compareFn;return s&&(this.keyValues=[],s.forEachItem(a=>{this.keyValues.push(vCt(a.key,a.currentValue))})),(s||o)&&(this.keyValues.sort(r),this.compareFn=r),this.keyValues}};e.\u0275fac=function(r){return new(r||e)(R(KM,16))},e.\u0275pipe=kr({name:"keyvalue",type:e,pure:!1,standalone:!0});let t=e;return t})();sd=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})(),Tue="browser",yCt="server";tk=class{}});function Mue(){if(rk)return rk;if(typeof document!="object"||!document)return rk=new Set(gEe),rk;let t=document.createElement("input");return rk=new Set(gEe.filter(e=>(t.setAttribute("type",e),t.type===e))),rk}function _Ct(){if(LO==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>LO=!0}))}finally{LO=LO||!1}return LO}function Sh(t){return _Ct()?t:!!t.capture}function Jj(){if(N9==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return N9=!1,N9;if("scrollBehavior"in document.documentElement.style)N9=!0;else{let t=Element.prototype.scrollTo;t?N9=!/\{\s*\[native code\]\s*\}/.test(t.toString()):N9=!1}}return N9}function sk(){if(typeof document!="object"||!document)return Ty.NORMAL;if(Qj==null){let t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let n=document.createElement("div"),i=n.style;i.width="2px",i.height="1px",t.appendChild(n),document.body.appendChild(t),Qj=Ty.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,Qj=t.scrollLeft===0?Ty.NEGATED:Ty.INVERTED),t.remove()}return Qj}function CCt(){if(Due==null){let t=typeof document<"u"?document.head:null;Due=!!(t&&(t.createShadowRoot||t.attachShadow))}return Due}function ok(t){if(CCt()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function B_(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}function sf(t){return t.composedPath?t.composedPath()[0]:t.target}function OO(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var Eue,Oo,rk,gEe,LO,Ty,Qj,N9,Due,Wc=Q(()=>{me();me();ri();try{Eue=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Eue=!1}Oo=(()=>{let e=class e{constructor(i){this._platformId=i,this.isBrowser=this._platformId?Sy(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||Eue)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};e.\u0275fac=function(r){return new(r||e)(it(Fu))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),gEe=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];Ty=function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t}(Ty||{})});function bCt(){return Ve(Lr)}function SCt(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?wCt.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var xCt,wCt,Va,xv,Th=Q(()=>{me();me();ri();xCt=new Ri("cdk-dir-doc",{providedIn:"root",factory:bCt});wCt=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;Va=(()=>{let e=class e{constructor(i){if(this.value="ltr",this.change=new nt,i){let r=i.body?i.body.dir:null,s=i.documentElement?i.documentElement.dir:null;this.value=SCt(r||s||"ltr")}}ngOnDestroy(){this.change.complete()}};e.\u0275fac=function(r){return new(r||e)(it(xCt,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),xv=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})()});function e$(t){return t&&typeof t.connect=="function"&&!(t instanceof yO)}var ak,NO,lk,ck,vEe,dk=Q(()=>{$n();me();me();ak=function(t){return t[t.REPLACED=0]="REPLACED",t[t.INSERTED=1]="INSERTED",t[t.MOVED=2]="MOVED",t[t.REMOVED=3]="REMOVED",t}(ak||{}),NO=new Ri("_ViewRepeater"),lk=class{applyChanges(e,n,i,r,s){e.forEachOperation((o,a,l)=>{let c,d;if(o.previousIndex==null){let u=i(o,a,l);c=n.createEmbeddedView(u.templateRef,u.context,u.index),d=ak.INSERTED}else l==null?(n.remove(a),d=ak.REMOVED):(c=n.get(a),n.move(c,l),d=ak.MOVED);s&&s({context:c?.context,operation:d,record:o})})}detach(){}},ck=class{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(e=!1,n,i=!0,r){this._multiple=e,this._emitChanges=i,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Mi,n&&n.length&&(e?n.forEach(s=>this._markSelected(s)):this._markSelected(n[0]),this._selectedToEmit.length=0)}select(...e){this._verifyValueAssignment(e),e.forEach(i=>this._markSelected(i));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}deselect(...e){this._verifyValueAssignment(e),e.forEach(i=>this._unmarkSelected(i));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}setSelection(...e){this._verifyValueAssignment(e);let n=this.selected,i=new Set(e);e.forEach(s=>this._markSelected(s)),n.filter(s=>!i.has(this._getConcreteValue(s,i))).forEach(s=>this._unmarkSelected(s));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(e){return this.isSelected(e)?this.deselect(e):this.select(e)}clear(e=!0){this._unmarkAll();let n=this._hasQueuedChanges();return e&&this._emitChangeEvent(),n}isSelected(e){return this._selection.has(this._getConcreteValue(e))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(e){this._multiple&&this.selected&&this._selected.sort(e)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(e){e=this._getConcreteValue(e),this.isSelected(e)||(this._multiple||this._unmarkAll(),this.isSelected(e)||this._selection.add(e),this._emitChanges&&this._selectedToEmit.push(e))}_unmarkSelected(e){e=this._getConcreteValue(e),this.isSelected(e)&&(this._selection.delete(e),this._emitChanges&&this._deselectedToEmit.push(e))}_unmarkAll(){this.isEmpty()||this._selection.forEach(e=>this._unmarkSelected(e))}_verifyValueAssignment(e){e.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(e,n){if(this.compareWith){n=n??this._selection;for(let i of n)if(this.compareWith(e,i))return i;return e}else return e}},vEe=(()=>{let e=class e{constructor(){this._listeners=[]}notify(i,r){for(let s of this._listeners)s(i,r)}listen(i){return this._listeners.push(i),()=>{this._listeners=this._listeners.filter(r=>i!==r)}}ngOnDestroy(){this._listeners=[]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var DCt,T8,t$,ECt,J2,Q2,V9,R1=Q(()=>{J0();me();$n();Cl();Wc();Wc();ri();Th();Th();DCt=20,T8=(()=>{let e=class e{constructor(i,r,s){this._ngZone=i,this._platform=r,this._scrolled=new Mi,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=s}register(i){this.scrollContainers.has(i)||this.scrollContainers.set(i,i.elementScrolled().subscribe(()=>this._scrolled.next(i)))}deregister(i){let r=this.scrollContainers.get(i);r&&(r.unsubscribe(),this.scrollContainers.delete(i))}scrolled(i=DCt){return this._platform.isBrowser?new Qa(r=>{this._globalSubscription||this._addGlobalListener();let s=i>0?this._scrolled.pipe(Gde(i)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{s.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Fr()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((i,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(i,r){let s=this.getAncestorScrollContainers(i);return this.scrolled(r).pipe(Ks(o=>!o||s.indexOf(o)>-1))}getAncestorScrollContainers(i){let r=[];return this.scrollContainers.forEach((s,o)=>{this._scrollableContainsElement(o,i)&&r.push(o)}),r}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(i,r){let s=Yp(r),o=i.getElementRef().nativeElement;do if(s==o)return!0;while(s=s.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let i=this._getWindow();return bh(i.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}};e.\u0275fac=function(r){return new(r||e)(it(pn),it(Oo),it(Lr,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),t$=(()=>{let e=class e{constructor(i,r,s,o){this.elementRef=i,this.scrollDispatcher=r,this.ngZone=s,this.dir=o,this._destroyed=new Mi,this._elementScrolled=new Qa(a=>this.ngZone.runOutsideAngular(()=>bh(this.elementRef.nativeElement,"scroll").pipe(Mr(this._destroyed)).subscribe(a)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(i){let r=this.elementRef.nativeElement,s=this.dir&&this.dir.value=="rtl";i.left==null&&(i.left=s?i.end:i.start),i.right==null&&(i.right=s?i.start:i.end),i.bottom!=null&&(i.top=r.scrollHeight-r.clientHeight-i.bottom),s&&sk()!=Ty.NORMAL?(i.left!=null&&(i.right=r.scrollWidth-r.clientWidth-i.left),sk()==Ty.INVERTED?i.left=i.right:sk()==Ty.NEGATED&&(i.left=i.right?-i.right:i.right)):i.right!=null&&(i.left=r.scrollWidth-r.clientWidth-i.right),this._applyScrollToOptions(i)}_applyScrollToOptions(i){let r=this.elementRef.nativeElement;Jj()?r.scrollTo(i):(i.top!=null&&(r.scrollTop=i.top),i.left!=null&&(r.scrollLeft=i.left))}measureScrollOffset(i){let r="left",s="right",o=this.elementRef.nativeElement;if(i=="top")return o.scrollTop;if(i=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let a=this.dir&&this.dir.value=="rtl";return i=="start"?i=a?s:r:i=="end"&&(i=a?r:s),a&&sk()==Ty.INVERTED?i==r?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:a&&sk()==Ty.NEGATED?i==r?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:i==r?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(T8),R(pn),R(Va,8))},e.\u0275dir=mi({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0});let t=e;return t})(),ECt=20,J2=(()=>{let e=class e{constructor(i,r,s){this._platform=i,this._change=new Mi,this._changeListener=o=>{this._change.next(o)},this._document=s,r.runOutsideAngular(()=>{if(i.isBrowser){let o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let i=this._getWindow();i.removeEventListener("resize",this._changeListener),i.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let i={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),i}getViewportRect(){let i=this.getViewportScrollPosition(),{width:r,height:s}=this.getViewportSize();return{top:i.top,left:i.left,bottom:i.top+s,right:i.left+r,height:s,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let i=this._document,r=this._getWindow(),s=i.documentElement,o=s.getBoundingClientRect(),a=-o.top||i.body.scrollTop||r.scrollY||s.scrollTop||0,l=-o.left||i.body.scrollLeft||r.scrollX||s.scrollLeft||0;return{top:a,left:l}}change(i=ECt){return i>0?this._change.pipe(Gde(i)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let i=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:i.innerWidth,height:i.innerHeight}:{width:0,height:0}}};e.\u0275fac=function(r){return new(r||e)(it(Oo),it(pn),it(Lr,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Q2=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})(),V9=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[xv,Q2,xv,Q2]});let t=e;return t})()});var VO,e2,of,kue,Mb,BO,yEe,w0,c4,bv=Q(()=>{me();me();ri();VO=class{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},e2=class extends VO{constructor(e,n,i,r,s){super(),this.component=e,this.viewContainerRef=n,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=s}},of=class extends VO{constructor(e,n,i,r){super(),this.templateRef=e,this.viewContainerRef=n,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,n=this.context){return this.context=n,super.attach(e)}detach(){return this.context=void 0,super.detach()}},kue=class extends VO{constructor(e){super(),this.element=e instanceof fi?e.nativeElement:e}},Mb=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof e2)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof of)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof kue)return this._attachedPortal=e,this.attachDomPortal(e)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},BO=class extends Mb{constructor(e,n,i,r,s){super(),this.outletElement=e,this._componentFactoryResolver=n,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=o=>{this._document;let a=o.element;a.parentNode;let l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=s}attachComponentPortal(e){let i=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),r;return e.viewContainerRef?(r=e.viewContainerRef.createComponent(i,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector,e.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(e.injector||this._defaultInjector||$o.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=e,r}attachTemplatePortal(e){let n=e.viewContainerRef,i=n.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=n.indexOf(i);r!==-1&&n.remove(r)}),this._attachedPortal=e,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}},yEe=(()=>{let e=class e extends of{constructor(i,r){super(i,r)}};e.\u0275fac=function(r){return new(r||e)(R(Ma),R(Na))},e.\u0275dir=mi({type:e,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],standalone:!0,features:[et]});let t=e;return t})(),w0=(()=>{let e=class e extends Mb{constructor(i,r,s){super(),this._componentFactoryResolver=i,this._viewContainerRef=r,this._isInitialized=!1,this.attached=new nt,this.attachDomPortal=o=>{this._document;let a=o.element;a.parentNode;let l=this._document.createComment("dom-portal");o.setAttachedHost(this),a.parentNode.insertBefore(l,a),this._getRootNode().appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=s}get portal(){return this._attachedPortal}set portal(i){this.hasAttached()&&!i&&!this._isInitialized||(this.hasAttached()&&super.detach(),i&&super.attach(i),this._attachedPortal=i||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(i){i.setAttachedHost(this);let r=i.viewContainerRef!=null?i.viewContainerRef:this._viewContainerRef,o=(i.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(i.component),a=r.createComponent(o,r.length,i.injector||r.injector,i.projectableNodes||void 0);return r!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),super.setDisposeFn(()=>a.destroy()),this._attachedPortal=i,this._attachedRef=a,this.attached.emit(a),a}attachTemplatePortal(i){i.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=i,this._attachedRef=r,this.attached.emit(r),r}_getRootNode(){let i=this._viewContainerRef.element.nativeElement;return i.nodeType===i.ELEMENT_NODE?i:i.parentNode}};e.\u0275fac=function(r){return new(r||e)(R(yy),R(Na),R(Lr))},e.\u0275dir=mi({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[et]});let t=e;return t})(),c4=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})()});function Pc(t,...e){return e.length?e.some(n=>t[n]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Zg=Q(()=>{});function Pue(t,e){return e.some(n=>{let i=t.bottom<n.top,r=t.top>n.bottom,s=t.right<n.left,o=t.left>n.right;return i||r||s||o})}function CEe(t,e){return e.some(n=>{let i=t.top<n.top,r=t.bottom>n.bottom,s=t.left<n.left,o=t.right>n.right;return i||r||s||o})}function xEe(t,e){let n=typeof ShadowRoot<"u"&&ShadowRoot,i=e;for(;i;){if(i===t)return!0;i=n&&i instanceof ShadowRoot?i.host:i.parentNode}return!1}function B9(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function wEe(t){if(typeof t!="number"&&t!=null){let[e,n]=t.split(ACt);return!n||n==="px"?parseFloat(e):null}return t||null}function SEe(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function PCt(t,e){return t===e?!0:t.isOriginClipped===e.isOriginClipped&&t.isOriginOutsideView===e.isOriginOutsideView&&t.isOverlayClipped===e.isOverlayClipped&&t.isOverlayOutsideView===e.isOverlayOutsideView}function OCt(t){return()=>t.scrollStrategies.reposition()}var _Ee,Iue,Aue,i$,Rue,MCt,Xg,Fue,DEe,kCt,ICt,hk,D8,bEe,ACt,zO,TEe,Lue,RCt,FCt,xl,LCt,EEe,z9,HO,NCt,T0,Qf=Q(()=>{R1();R1();R1();ri();ri();me();me();J0();Wc();Wc();Cl();Th();Th();bv();$n();Zg();_Ee=Jj(),Iue=class{constructor(e,n){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=n}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=vm(-this._previousScrollPosition.left),e.style.top=vm(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,n=this._document.body,i=e.style,r=n.style,s=i.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),_Ee&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),_Ee&&(i.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let n=this._document.body,i=this._viewportRuler.getViewportSize();return n.scrollHeight>i.height||n.scrollWidth>i.width}},Aue=class{constructor(e,n,i,r){this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Ks(n=>!n||!this._overlayRef.overlayElement.contains(n.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let n=this._viewportRuler.getViewportScrollPosition().top;Math.abs(n-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},i$=class{enable(){}disable(){}attach(){}};Rue=class{constructor(e,n,i,r){this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let n=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();Pue(n,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},MCt=(()=>{let e=class e{constructor(i,r,s,o){this._scrollDispatcher=i,this._viewportRuler=r,this._ngZone=s,this.noop=()=>new i$,this.close=a=>new Aue(this._scrollDispatcher,this._ngZone,this._viewportRuler,a),this.block=()=>new Iue(this._viewportRuler,this._document),this.reposition=a=>new Rue(this._scrollDispatcher,this._viewportRuler,this._ngZone,a),this._document=o}};e.\u0275fac=function(r){return new(r||e)(it(T8),it(J2),it(pn),it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Xg=class{constructor(e){if(this.scrollStrategy=new i$,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let n=Object.keys(e);for(let i of n)e[i]!==void 0&&(this[i]=e[i])}}},Fue=class{constructor(e,n){this.connectionPair=e,this.scrollableViewProperties=n}},DEe=(()=>{let e=class e{constructor(i){this._attachedOverlays=[],this._document=i}ngOnDestroy(){this.detach()}add(i){this.remove(i),this._attachedOverlays.push(i)}remove(i){let r=this._attachedOverlays.indexOf(i);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}};e.\u0275fac=function(r){return new(r||e)(it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),kCt=(()=>{let e=class e extends DEe{constructor(i,r){super(i),this._ngZone=r,this._keydownListener=s=>{let o=this._attachedOverlays;for(let a=o.length-1;a>-1;a--)if(o[a]._keydownEvents.observers.length>0){let l=o[a]._keydownEvents;this._ngZone?this._ngZone.run(()=>l.next(s)):l.next(s);break}}}add(i){super.add(i),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}};e.\u0275fac=function(r){return new(r||e)(it(Lr),it(pn,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ICt=(()=>{let e=class e extends DEe{constructor(i,r,s){super(i),this._platform=r,this._ngZone=s,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=sf(o)},this._clickListener=o=>{let a=sf(o),l=o.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:a;this._pointerDownEventTarget=null;let c=this._attachedOverlays.slice();for(let d=c.length-1;d>-1;d--){let u=c[d];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(xEe(u.overlayElement,a)||xEe(u.overlayElement,l))break;let m=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>m.next(o)):m.next(o)}}}add(i){if(super.add(i),!this._isAttached){let r=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(r)):this._addEventListeners(r),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let i=this._document.body;i.removeEventListener("pointerdown",this._pointerDownListener,!0),i.removeEventListener("click",this._clickListener,!0),i.removeEventListener("auxclick",this._clickListener,!0),i.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(i.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(i){i.addEventListener("pointerdown",this._pointerDownListener,!0),i.addEventListener("click",this._clickListener,!0),i.addEventListener("auxclick",this._clickListener,!0),i.addEventListener("contextmenu",this._clickListener,!0)}};e.\u0275fac=function(r){return new(r||e)(it(Lr),it(Oo),it(pn,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();hk=(()=>{let e=class e{constructor(i,r){this._platform=r,this._document=i}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let i="cdk-overlay-container";if(this._platform.isBrowser||OO()){let s=this._document.querySelectorAll(`.${i}[platform="server"], .${i}[platform="test"]`);for(let o=0;o<s.length;o++)s[o].remove()}let r=this._document.createElement("div");r.classList.add(i),OO()?r.setAttribute("platform","test"):this._platform.isBrowser||r.setAttribute("platform","server"),this._document.body.appendChild(r),this._containerElement=r}};e.\u0275fac=function(r){return new(r||e)(it(Lr),it(Oo))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),D8=class{constructor(e,n,i,r,s,o,a,l,c,d=!1,u){this._portalOutlet=e,this._host=n,this._pane=i,this._config=r,this._ngZone=s,this._keyboardDispatcher=o,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._injector=u,this._backdropElement=null,this._backdropClick=new Mi,this._attachments=new Mi,this._detachments=new Mi,this._locationChanges=na.EMPTY,this._backdropClickHandler=m=>this._backdropClick.next(m),this._backdropTransitionendHandler=m=>{this._disposeBackdrop(m.target)},this._keydownEvents=new Mi,this._outsidePointerEvents=new Mi,this._renders=new Mi,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=C0(()=>fj(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let n=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=wh(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof n?.onDestroy=="function"&&n.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),n}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=ve(ve({},this._config),e),this._updateElementSize()}setDirection(e){this._config=St(ve({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=vm(this._config.width),e.height=vm(this._config.height),e.minWidth=vm(this._config.minWidth),e.minHeight=vm(this._config.minHeight),e.maxWidth=vm(this._config.maxWidth),e.maxHeight=vm(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,n,i){let r=F9(n||[]).filter(s=>!!s);r.length&&(i?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(Mr(ra(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},bEe="cdk-overlay-connected-position-bounding-box",ACt=/([A-Za-z%]+)$/,zO=class{get positions(){return this._preferredPositions}constructor(e,n,i,r,s){this._viewportRuler=n,this._document=i,this._platform=r,this._overlayContainer=s,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Mi,this._resizeSubscription=na.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(bEe),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,n=this._overlayRect,i=this._viewportRect,r=this._containerRect,s=[],o;for(let a of this._preferredPositions){let l=this._getOriginPoint(e,r,a),c=this._getOverlayPoint(l,n,a),d=this._getOverlayFit(c,n,i,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(d,c,i)){s.push({position:a,origin:l,overlayRect:n,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!o||o.overlayFit.visibleArea<d.visibleArea)&&(o={overlayFit:d,overlayPoint:c,originPoint:l,position:a,overlayRect:n})}if(s.length){let a=null,l=-1;for(let c of s){let d=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);d>l&&(l=d,a=c)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(o.position,o.originPoint);return}this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&B9(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(bEe),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,n)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,n,i){let r;if(i.originX=="center")r=e.left+e.width/2;else{let o=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;r=i.originX=="start"?o:a}n.left<0&&(r-=n.left);let s;return i.originY=="center"?s=e.top+e.height/2:s=i.originY=="top"?e.top:e.bottom,n.top<0&&(s-=n.top),{x:r,y:s}}_getOverlayPoint(e,n,i){let r;i.overlayX=="center"?r=-n.width/2:i.overlayX==="start"?r=this._isRtl()?-n.width:0:r=this._isRtl()?0:-n.width;let s;return i.overlayY=="center"?s=-n.height/2:s=i.overlayY=="top"?0:-n.height,{x:e.x+r,y:e.y+s}}_getOverlayFit(e,n,i,r){let s=SEe(n),{x:o,y:a}=e,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(o+=l),c&&(a+=c);let d=0-o,u=o+s.width-i.width,m=0-a,f=a+s.height-i.height,_=this._subtractOverflows(s.width,d,u),x=this._subtractOverflows(s.height,m,f),D=_*x;return{visibleArea:D,isCompletelyWithinViewport:s.width*s.height===D,fitsInViewportVertically:x===s.height,fitsInViewportHorizontally:_==s.width}}_canFitWithFlexibleDimensions(e,n,i){if(this._hasFlexibleDimensions){let r=i.bottom-n.y,s=i.right-n.x,o=wEe(this._overlayRef.getConfig().minHeight),a=wEe(this._overlayRef.getConfig().minWidth),l=e.fitsInViewportVertically||o!=null&&o<=r,c=e.fitsInViewportHorizontally||a!=null&&a<=s;return l&&c}return!1}_pushOverlayOnScreen(e,n,i){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=SEe(n),s=this._viewportRect,o=Math.max(e.x+r.width-s.width,0),a=Math.max(e.y+r.height-s.height,0),l=Math.max(s.top-i.top-e.y,0),c=Math.max(s.left-i.left-e.x,0),d=0,u=0;return r.width<=s.width?d=c||-o:d=e.x<this._viewportMargin?s.left-i.left-e.x:0,r.height<=s.height?u=l||-a:u=e.y<this._viewportMargin?s.top-i.top-e.y:0,this._previousPushAmount={x:d,y:u},{x:e.x+d,y:e.y+u}}_applyPosition(e,n){if(this._setTransformOrigin(e),this._setOverlayElementStyles(n,e),this._setBoundingBoxStyles(n,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let i=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!PCt(this._lastScrollVisibility,i)){let r=new Fue(e,i);this._positionChanges.next(r)}this._lastScrollVisibility=i}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let n=this._boundingBox.querySelectorAll(this._transformOriginSelector),i,r=e.overlayY;e.overlayX==="center"?i="center":this._isRtl()?i=e.overlayX==="start"?"right":"left":i=e.overlayX==="start"?"left":"right";for(let s=0;s<n.length;s++)n[s].style.transformOrigin=`${i} ${r}`}_calculateBoundingBoxRect(e,n){let i=this._viewportRect,r=this._isRtl(),s,o,a;if(n.overlayY==="top")o=e.y,s=i.height-o+this._viewportMargin;else if(n.overlayY==="bottom")a=i.height-e.y+this._viewportMargin*2,s=i.height-a+this._viewportMargin;else{let f=Math.min(i.bottom-e.y+i.top,e.y),_=this._lastBoundingBoxSize.height;s=f*2,o=e.y-f,s>_&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.y-_/2)}let l=n.overlayX==="start"&&!r||n.overlayX==="end"&&r,c=n.overlayX==="end"&&!r||n.overlayX==="start"&&r,d,u,m;if(c)m=i.width-e.x+this._viewportMargin*2,d=e.x-this._viewportMargin;else if(l)u=e.x,d=i.right-e.x;else{let f=Math.min(i.right-e.x+i.left,e.x),_=this._lastBoundingBoxSize.width;d=f*2,u=e.x-f,d>_&&!this._isInitialRender&&!this._growAfterOpen&&(u=e.x-_/2)}return{top:o,left:u,bottom:a,right:m,width:d,height:s}}_setBoundingBoxStyles(e,n){let i=this._calculateBoundingBoxRect(e,n);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=vm(i.height),r.top=vm(i.top),r.bottom=vm(i.bottom),r.width=vm(i.width),r.left=vm(i.left),r.right=vm(i.right),n.overlayX==="center"?r.alignItems="center":r.alignItems=n.overlayX==="end"?"flex-end":"flex-start",n.overlayY==="center"?r.justifyContent="center":r.justifyContent=n.overlayY==="bottom"?"flex-end":"flex-start",s&&(r.maxHeight=vm(s)),o&&(r.maxWidth=vm(o))}this._lastBoundingBoxSize=i,B9(this._boundingBox.style,r)}_resetBoundingBoxStyles(){B9(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){B9(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,n){let i={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();B9(i,this._getExactOverlayY(n,e,d)),B9(i,this._getExactOverlayX(n,e,d))}else i.position="static";let a="",l=this._getOffset(n,"x"),c=this._getOffset(n,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),o.maxHeight&&(r?i.maxHeight=vm(o.maxHeight):s&&(i.maxHeight="")),o.maxWidth&&(r?i.maxWidth=vm(o.maxWidth):s&&(i.maxWidth="")),B9(this._pane.style,i)}_getExactOverlayY(e,n,i){let r={top:"",bottom:""},s=this._getOverlayPoint(n,this._overlayRect,e);if(this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),e.overlayY==="bottom"){let o=this._document.documentElement.clientHeight;r.bottom=`${o-(s.y+this._overlayRect.height)}px`}else r.top=vm(s.y);return r}_getExactOverlayX(e,n,i){let r={left:"",right:""},s=this._getOverlayPoint(n,this._overlayRect,e);this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i));let o;if(this._isRtl()?o=e.overlayX==="end"?"left":"right":o=e.overlayX==="end"?"right":"left",o==="right"){let a=this._document.documentElement.clientWidth;r.right=`${a-(s.x+this._overlayRect.width)}px`}else r.left=vm(s.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),n=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:CEe(e,i),isOriginOutsideView:Pue(e,i),isOverlayClipped:CEe(n,i),isOverlayOutsideView:Pue(n,i)}}_subtractOverflows(e,...n){return n.reduce((i,r)=>i-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,n=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+e-this._viewportMargin,bottom:i.top+n-this._viewportMargin,width:e-2*this._viewportMargin,height:n-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,n){return n==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&F9(e).forEach(n=>{n!==""&&this._appliedPanelClasses.indexOf(n)===-1&&(this._appliedPanelClasses.push(n),this._pane.classList.add(n))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof fi)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let n=e.width||0,i=e.height||0;return{top:e.y,bottom:e.y+i,left:e.x,right:e.x+n,height:i,width:n}}};TEe="cdk-global-overlay-wrapper",Lue=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let n=e.getConfig();this._overlayRef=e,this._width&&!n.width&&e.updateSize({width:this._width}),this._height&&!n.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(TEe),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:a}=i,l=(r==="100%"||r==="100vw")&&(!o||o==="100%"||o==="100vw"),c=(s==="100%"||s==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,m=this._overlayRef.getConfig().direction==="rtl",f="",_="",x="";l?x="flex-start":d==="center"?(x="center",m?_=u:f=u):m?d==="left"||d==="end"?(x="flex-end",f=u):(d==="right"||d==="start")&&(x="flex-start",_=u):d==="left"||d==="start"?(x="flex-start",f=u):(d==="right"||d==="end")&&(x="flex-end",_=u),e.position=this._cssPosition,e.marginLeft=l?"0":f,e.marginTop=c?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=l?"0":_,n.justifyContent=x,n.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,n=this._overlayRef.hostElement,i=n.style;n.classList.remove(TEe),i.justifyContent=i.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},RCt=(()=>{let e=class e{constructor(i,r,s,o){this._viewportRuler=i,this._document=r,this._platform=s,this._overlayContainer=o}global(){return new Lue}flexibleConnectedTo(i){return new zO(i,this._viewportRuler,this._document,this._platform,this._overlayContainer)}};e.\u0275fac=function(r){return new(r||e)(it(J2),it(Lr),it(Oo),it(hk))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),FCt=0,xl=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d,u,m,f,_){this.scrollStrategies=i,this._overlayContainer=r,this._componentFactoryResolver=s,this._positionBuilder=o,this._keyboardDispatcher=a,this._injector=l,this._ngZone=c,this._document=d,this._directionality=u,this._location=m,this._outsideClickDispatcher=f,this._animationsModuleType=_}create(i){let r=this._createHostElement(),s=this._createPaneElement(r),o=this._createPortalOutlet(s),a=new Xg(i);return a.direction=a.direction||this._directionality.value,new D8(o,r,s,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(fv))}position(){return this._positionBuilder}_createPaneElement(i){let r=this._document.createElement("div");return r.id=`cdk-overlay-${FCt++}`,r.classList.add("cdk-overlay-pane"),i.appendChild(r),r}_createHostElement(){let i=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalOutlet(i){return this._appRef||(this._appRef=this._injector.get(Cy)),new BO(i,this._componentFactoryResolver,this._appRef,this._injector,this._document)}};e.\u0275fac=function(r){return new(r||e)(it(MCt),it(hk),it(yy),it(RCt),it(kCt),it($o),it(pn),it(Lr),it(Va),it(S8),it(ICt),it(Ic,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),LCt=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],EEe=new Ri("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.reposition()}}),z9=(()=>{let e=class e{constructor(i){this.elementRef=i}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0});let t=e;return t})(),HO=(()=>{let e=class e{get offsetX(){return this._offsetX}set offsetX(i){this._offsetX=i,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(i){this._offsetY=i,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(i){this._disposeOnNavigation=i}constructor(i,r,s,o,a){this._overlay=i,this._dir=a,this._backdropSubscription=na.EMPTY,this._attachSubscription=na.EMPTY,this._detachSubscription=na.EMPTY,this._positionSubscription=na.EMPTY,this._disposeOnNavigation=!1,this._ngZone=Ve(pn),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new nt,this.positionChange=new nt,this.attach=new nt,this.detach=new nt,this.overlayKeydown=new nt,this.overlayOutsideClick=new nt,this._templatePortal=new of(r,s),this._scrollStrategyFactory=o,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(i){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),i.origin&&this.open&&this._position.apply()),i.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=LCt);let i=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=i.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=i.detachments().subscribe(()=>this.detach.emit()),i.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),r.keyCode===27&&!this.disableClose&&!Pc(r)&&(r.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{let s=this._getOriginElement(),o=sf(r);(!s||s!==o&&!s.contains(o))&&this.overlayOutsideClick.next(r)})}_buildConfig(){let i=this._position=this.positionStrategy||this._createPositionStrategy(),r=new Xg({direction:this._dir,positionStrategy:i,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(r.width=this.width),(this.height||this.height===0)&&(r.height=this.height),(this.minWidth||this.minWidth===0)&&(r.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(i){let r=this.positions.map(s=>({originX:s.originX,originY:s.originY,overlayX:s.overlayX,overlayY:s.overlayY,offsetX:s.offsetX||this.offsetX,offsetY:s.offsetY||this.offsetY,panelClass:s.panelClass||void 0}));return i.setOrigin(this._getOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let i=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(i),i}_getOrigin(){return this.origin instanceof z9?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof z9?this.origin.elementRef.nativeElement:this.origin instanceof fi?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(i=>{this.backdropClick.emit(i)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(PTe(()=>this.positionChange.observers.length>0)).subscribe(i=>{this._ngZone.run(()=>this.positionChange.emit(i)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(R(xl),R(Ma),R(Na),R(EEe),R(Va,8))},e.\u0275dir=mi({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",mn],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",mn],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",mn],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",mn],push:[2,"cdkConnectedOverlayPush","push",mn],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",mn]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[Bs,yn]});let t=e;return t})();NCt={provide:EEe,deps:[xl],useFactory:OCt},T0=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[xl,NCt],imports:[xv,c4,V9,V9]});let t=e;return t})()});function VCt(t){if(t.type==="characterData"&&t.target instanceof Comment)return!0;if(t.type==="childList"){for(let e=0;e<t.addedNodes.length;e++)if(!(t.addedNodes[e]instanceof Comment))return!1;for(let e=0;e<t.removedNodes.length;e++)if(!(t.removedNodes[e]instanceof Comment))return!1;return!0}return!1}var MEe,BCt,Oue,pk,GO=Q(()=>{J0();me();me();$n();Cl();MEe=(()=>{let e=class e{create(i){return typeof MutationObserver>"u"?null:new MutationObserver(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),BCt=(()=>{let e=class e{constructor(i){this._mutationObserverFactory=i,this._observedElements=new Map,this._ngZone=Ve(pn)}ngOnDestroy(){this._observedElements.forEach((i,r)=>this._cleanupObserver(r))}observe(i){let r=Yp(i);return new Qa(s=>{let a=this._observeElement(r).pipe(lr(l=>l.filter(c=>!VCt(c))),Ks(l=>!!l.length)).subscribe(l=>{this._ngZone.run(()=>{s.next(l)})});return()=>{a.unsubscribe(),this._unobserveElement(r)}})}_observeElement(i){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(i))this._observedElements.get(i).count++;else{let r=new Mi,s=this._mutationObserverFactory.create(o=>r.next(o));s&&s.observe(i,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(i,{observer:s,stream:r,count:1})}return this._observedElements.get(i).stream})}_unobserveElement(i){this._observedElements.has(i)&&(this._observedElements.get(i).count--,this._observedElements.get(i).count||this._cleanupObserver(i))}_cleanupObserver(i){if(this._observedElements.has(i)){let{observer:r,stream:s}=this._observedElements.get(i);r&&r.disconnect(),s.complete(),this._observedElements.delete(i)}}};e.\u0275fac=function(r){return new(r||e)(it(MEe))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Oue=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(i){this._disabled=i,this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(i){this._debounce=Q0(i),this._subscribe()}constructor(i,r){this._contentObserver=i,this._elementRef=r,this.event=new nt,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let i=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?i.pipe(_0(this.debounce)):i).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(R(BCt),R(fi))},e.\u0275dir=mi({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",mn],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],standalone:!0,features:[Bs]});let t=e;return t})(),pk=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[MEe]});let t=e;return t})()});function HCt(t,e){if(!kEe.has(t))try{H9||(H9=document.createElement("style"),e&&H9.setAttribute("nonce",e),H9.setAttribute("type","text/css"),document.head.appendChild(H9)),H9.sheet&&(H9.sheet.insertRule(`@media ${t} {body{ }}`,0),kEe.add(t))}catch(n){console.error(n)}}function GCt(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}function IEe(t){return t.map(e=>e.split(",")).reduce((e,n)=>e.concat(n)).map(e=>e.trim())}var kEe,H9,zCt,mk,n$,WO=Q(()=>{me();me();J0();$n();Cl();Wc();kEe=new Set,zCt=(()=>{let e=class e{constructor(i,r){this._platform=i,this._nonce=r,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):GCt}matchMedia(i){return(this._platform.WEBKIT||this._platform.BLINK)&&HCt(i,this._nonce),this._matchMedia(i)}};e.\u0275fac=function(r){return new(r||e)(it(Oo),it(TO,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();mk=(()=>{let e=class e{constructor(i,r){this._mediaMatcher=i,this._zone=r,this._queries=new Map,this._destroySubject=new Mi}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(i){return IEe(F9(i)).some(s=>this._registerQuery(s).mql.matches)}observe(i){let s=IEe(F9(i)).map(a=>this._registerQuery(a).observable),o=P_(s);return o=cj(o.pipe(ic(1)),o.pipe(WM(1),_0(0))),o.pipe(lr(a=>{let l={matches:!1,breakpoints:{}};return a.forEach(({matches:c,query:d})=>{l.matches=l.matches||c,l.breakpoints[d]=c}),l}))}_registerQuery(i){if(this._queries.has(i))return this._queries.get(i);let r=this._mediaMatcher.matchMedia(i),o={observable:new Qa(a=>{let l=c=>this._zone.run(()=>a.next(c));return r.addListener(l),()=>{r.removeListener(l)}}).pipe(ll(r),lr(({matches:a})=>({query:i,matches:a})),Mr(this._destroySubject)),mql:r};return this._queries.set(i,o),o}};e.\u0275fac=function(r){return new(r||e)(it(zCt),it(pn))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();n$={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"}});function _k(t,e,n){let i=a$(t,e);n=n.trim(),!i.some(r=>r.trim()===n)&&(i.push(n),t.setAttribute(e,i.join(LEe)))}function Ab(t,e,n){let i=a$(t,e);n=n.trim();let r=i.filter(s=>s!==n);r.length?t.setAttribute(e,r.join(LEe)):t.removeAttribute(e)}function a$(t,e){return t.getAttribute(e)?.match(/\S+/g)??[]}function Nue(t,e){return typeof t=="string"?`${e||""}/${t}`:t}function AEe(t,e){t.id||(t.id=`${OEe}-${e}-${Bue++}`)}function JCt(t){try{return t.frameElement}catch{return null}}function e8t(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function t8t(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function i8t(t){return r8t(t)&&t.type=="hidden"}function n8t(t){return s8t(t)&&t.hasAttribute("href")}function r8t(t){return t.nodeName.toLowerCase()=="input"}function s8t(t){return t.nodeName.toLowerCase()=="a"}function NEe(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function PEe(t){if(!NEe(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function o8t(t){let e=t.nodeName.toLowerCase(),n=e==="input"&&t.type;return n==="text"||n==="password"||e==="select"||e==="textarea"}function a8t(t){return i8t(t)?!1:t8t(t)||n8t(t)||t.hasAttribute("contenteditable")||NEe(t)}function l8t(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}function W9(t){return t.buttons===0||t.detail===0}function U9(t){let e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}function p8t(){return null}var LEe,OEe,r$,Bue,c$,QCt,zue,l$,gk,Ib,$O,Hue,KO,VEe,c8t,d8t,BEe,fk,u8t,h8t,m8t,f8t,d$,o$,g8t,s$,qp,YO,G9,REe,FEe,Vue,Uue,Ck,Xh=Q(()=>{ri();me();me();Wc();Wc();$n();Zg();Cl();GO();J0();WO();LEe=" ";OEe="cdk-describedby-message",r$="cdk-describedby-host",Bue=0,c$=(()=>{let e=class e{constructor(i,r){this._platform=r,this._messageRegistry=new Map,this._messagesContainer=null,this._id=`${Bue++}`,this._document=i,this._id=Ve(UM)+"-"+Bue++}describe(i,r,s){if(!this._canBeDescribed(i,r))return;let o=Nue(r,s);typeof r!="string"?(AEe(r,this._id),this._messageRegistry.set(o,{messageElement:r,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(r,s),this._isElementDescribedByMessage(i,o)||this._addMessageReference(i,o)}removeDescription(i,r,s){if(!r||!this._isElementNode(i))return;let o=Nue(r,s);if(this._isElementDescribedByMessage(i,o)&&this._removeMessageReference(i,o),typeof r=="string"){let a=this._messageRegistry.get(o);a&&a.referenceCount===0&&this._deleteMessageElement(o)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let i=this._document.querySelectorAll(`[${r$}="${this._id}"]`);for(let r=0;r<i.length;r++)this._removeCdkDescribedByReferenceIds(i[r]),i[r].removeAttribute(r$);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(i,r){let s=this._document.createElement("div");AEe(s,this._id),s.textContent=i,r&&s.setAttribute("role",r),this._createMessagesContainer(),this._messagesContainer.appendChild(s),this._messageRegistry.set(Nue(i,r),{messageElement:s,referenceCount:0})}_deleteMessageElement(i){this._messageRegistry.get(i)?.messageElement?.remove(),this._messageRegistry.delete(i)}_createMessagesContainer(){if(this._messagesContainer)return;let i="cdk-describedby-message-container",r=this._document.querySelectorAll(`.${i}[platform="server"]`);for(let o=0;o<r.length;o++)r[o].remove();let s=this._document.createElement("div");s.style.visibility="hidden",s.classList.add(i),s.classList.add("cdk-visually-hidden"),this._platform&&!this._platform.isBrowser&&s.setAttribute("platform","server"),this._document.body.appendChild(s),this._messagesContainer=s}_removeCdkDescribedByReferenceIds(i){let r=a$(i,"aria-describedby").filter(s=>s.indexOf(OEe)!=0);i.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(i,r){let s=this._messageRegistry.get(r);_k(i,"aria-describedby",s.messageElement.id),i.setAttribute(r$,this._id),s.referenceCount++}_removeMessageReference(i,r){let s=this._messageRegistry.get(r);s.referenceCount--,Ab(i,"aria-describedby",s.messageElement.id),i.removeAttribute(r$)}_isElementDescribedByMessage(i,r){let s=a$(i,"aria-describedby"),o=this._messageRegistry.get(r),a=o&&o.messageElement.id;return!!a&&s.indexOf(a)!=-1}_canBeDescribed(i,r){if(!this._isElementNode(i))return!1;if(r&&typeof r=="object")return!0;let s=r==null?"":`${r}`.trim(),o=i.getAttribute("aria-label");return s?!o||o.trim()!==s:!1}_isElementNode(i){return i.nodeType===this._document.ELEMENT_NODE}};e.\u0275fac=function(r){return new(r||e)(it(Lr),it(Oo))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();QCt=200,zue=class{constructor(e,n){this._letterKeyStream=new Mi,this._items=[],this._selectedItemIndex=-1,this._pressedLetters=[],this._selectedItem=new Mi,this.selectedItem=this._selectedItem;let i=typeof n?.debounceInterval=="number"?n.debounceInterval:QCt;n?.skipPredicate&&(this._skipPredicateFn=n.skipPredicate),this.setItems(e),this._setupKeyHandler(i)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(e){this._selectedItemIndex=e}setItems(e){this._items=e}handleKey(e){let n=e.keyCode;e.key&&e.key.length===1?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(e){this._letterKeyStream.pipe(ac(n=>this._pressedLetters.push(n)),_0(e),Ks(()=>this._pressedLetters.length>0),lr(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(n=>{for(let i=1;i<this._items.length+1;i++){let r=(this._selectedItemIndex+i)%this._items.length,s=this._items[r];if(!this._skipPredicateFn?.(s)&&s.getLabel?.().toLocaleUpperCase().trim().indexOf(n)===0){this._selectedItem.next(s);break}}this._pressedLetters=[]})}},l$=class{constructor(e,n){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._typeaheadSubscription=na.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=i=>i.disabled,this.tabOut=new Mi,this.change=new Mi,e instanceof o4?this._itemChangesSubscription=e.changes.subscribe(i=>this._itemsChanged(i.toArray())):jde(e)&&(this._effectRef=qh(()=>this._itemsChanged(e()),{injector:n}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){this._typeaheadSubscription.unsubscribe();let n=this._getItemsArray();return this._typeahead=new zue(n,{debounceInterval:typeof e=="number"?e:void 0,skipPredicate:i=>this._skipPredicateFn(i)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(i=>{this.setActiveItem(i)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(e=!0){return this._homeAndEnd=e,this}withPageUpDown(e=!0,n=10){return this._pageUpAndDown={enabled:e,delta:n},this}setActiveItem(e){let n=this._activeItem;this.updateActiveItem(e),this._activeItem!==n&&this.change.next(this._activeItemIndex)}onKeydown(e){let n=e.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(s=>!e[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(n){case 9:this.tabOut.next();return;case 40:if(this._vertical&&r){this.setNextItemActive();break}else return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&r){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&r){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&r){let s=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(s>0?s:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&r){let s=this._activeItemIndex+this._pageUpAndDown.delta,o=this._getItemsArray().length;this._setActiveItemByIndex(s<o?s:o-1,-1);break}else return;default:(r||Pc(e,"shiftKey"))&&this._typeahead?.handleKey(e);return}this._typeahead?.reset(),e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){let n=this._getItemsArray(),i=typeof e=="number"?e:n.indexOf(e),r=n[i];this._activeItem=r??null,this._activeItemIndex=i,this._typeahead?.setCurrentSelectedItemIndex(i)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){let n=this._getItemsArray();for(let i=1;i<=n.length;i++){let r=(this._activeItemIndex+e*i+n.length)%n.length,s=n[r];if(!this._skipPredicateFn(s)){this.setActiveItem(r);return}}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,n){let i=this._getItemsArray();if(i[e]){for(;this._skipPredicateFn(i[e]);)if(e+=n,!i[e])return;this.setActiveItem(e)}}_getItemsArray(){return jde(this._items)?this._items():this._items instanceof o4?this._items.toArray():this._items}_itemsChanged(e){if(this._typeahead?.setItems(e),this._activeItem){let n=e.indexOf(this._activeItem);n>-1&&n!==this._activeItemIndex&&(this._activeItemIndex=n,this._typeahead?.setCurrentSelectedItemIndex(n))}}},gk=class extends l${setActiveItem(e){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(e),this.activeItem&&this.activeItem.setActiveStyles()}},Ib=class extends l${constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}},$O=(()=>{let e=class e{constructor(i){this._platform=i}isDisabled(i){return i.hasAttribute("disabled")}isVisible(i){return e8t(i)&&getComputedStyle(i).visibility==="visible"}isTabbable(i){if(!this._platform.isBrowser)return!1;let r=JCt(l8t(i));if(r&&(PEe(r)===-1||!this.isVisible(r)))return!1;let s=i.nodeName.toLowerCase(),o=PEe(i);return i.hasAttribute("contenteditable")?o!==-1:s==="iframe"||s==="object"||this._platform.WEBKIT&&this._platform.IOS&&!o8t(i)?!1:s==="audio"?i.hasAttribute("controls")?o!==-1:!1:s==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||i.hasAttribute("controls"):i.tabIndex>=0}isFocusable(i,r){return a8t(i)&&!this.isDisabled(i)&&(r?.ignoreVisibility||this.isVisible(i))}};e.\u0275fac=function(r){return new(r||e)(it(Oo))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();Hue=class{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,n,i,r,s=!1,o){this._element=e,this._checker=n,this._ngZone=i,this._document=r,this._injector=o,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}destroy(){let e=this._startAnchor,n=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),n&&(n.removeEventListener("focus",this.endAnchorListener),n.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(n=>{this._executeOnStable(()=>n(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let n=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?n.length?n[0]:this._getFirstTabbableElement(this._element):n.length?n[n.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let n=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(n){if(!this._checker.isFocusable(n)){let i=this._getFirstTabbableElement(n);return i?.focus(e),!!i}return n.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let n=this._getRegionBoundary("start");return n&&n.focus(e),!!n}focusLastTabbableElement(e){let n=this._getRegionBoundary("end");return n&&n.focus(e),!!n}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let i=0;i<n.length;i++){let r=n[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(n[i]):null;if(r)return r}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let n=e.children;for(let i=n.length-1;i>=0;i--){let r=n[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(n[i]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,n){e?n.setAttribute("tabindex","0"):n.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?wh(e,{injector:this._injector}):setTimeout(e)}},KO=(()=>{let e=class e{constructor(i,r,s){this._checker=i,this._ngZone=r,this._injector=Ve($o),this._document=s}create(i,r=!1){return new Hue(i,this._checker,this._ngZone,this._document,r,this._injector)}};e.\u0275fac=function(r){return new(r||e)(it($O),it(pn),it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),VEe=(()=>{let e=class e{get enabled(){return this.focusTrap?.enabled||!1}set enabled(i){this.focusTrap&&(this.focusTrap.enabled=i)}constructor(i,r,s){this._elementRef=i,this._focusTrapFactory=r,this._previouslyFocusedElement=null,Ve(Oo).isBrowser&&(this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0))}ngOnDestroy(){this.focusTrap?.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap?.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap&&!this.focusTrap.hasAttached()&&this.focusTrap.attachAnchors()}ngOnChanges(i){let r=i.autoCapture;r&&!r.firstChange&&this.autoCapture&&this.focusTrap?.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=B_(),this.focusTrap?.focusInitialElementWhenReady()}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(KO),R(Lr))},e.\u0275dir=mi({type:e,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:[2,"cdkTrapFocus","enabled",mn],autoCapture:[2,"cdkTrapFocusAutoCapture","autoCapture",mn]},exportAs:["cdkTrapFocus"],standalone:!0,features:[Bs,yn]});let t=e;return t})();c8t=new Ri("cdk-input-modality-detector-options"),d8t={ignoreKeys:[18,17,224,91,16]},BEe=650,fk=Sh({passive:!0,capture:!0}),u8t=(()=>{let e=class e{get mostRecentModality(){return this._modality.value}constructor(i,r,s,o){this._platform=i,this._mostRecentTarget=null,this._modality=new qs(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(l=>l===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=sf(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs<BEe||(this._modality.next(W9(a)?"keyboard":"mouse"),this._mostRecentTarget=sf(a))},this._onTouchstart=a=>{if(U9(a)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=sf(a)},this._options=ve(ve({},d8t),o),this.modalityDetected=this._modality.pipe(WM(1)),this.modalityChanged=this.modalityDetected.pipe(qg()),i.isBrowser&&r.runOutsideAngular(()=>{s.addEventListener("keydown",this._onKeydown,fk),s.addEventListener("mousedown",this._onMousedown,fk),s.addEventListener("touchstart",this._onTouchstart,fk)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,fk),document.removeEventListener("mousedown",this._onMousedown,fk),document.removeEventListener("touchstart",this._onTouchstart,fk))}};e.\u0275fac=function(r){return new(r||e)(it(Oo),it(pn),it(Lr),it(c8t,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),h8t=new Ri("liveAnnouncerElement",{providedIn:"root",factory:p8t});m8t=new Ri("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),f8t=0,d$=(()=>{let e=class e{constructor(i,r,s,o){this._ngZone=r,this._defaultOptions=o,this._document=s,this._liveElement=i||this._createLiveElement()}announce(i,...r){let s=this._defaultOptions,o,a;return r.length===1&&typeof r[0]=="number"?a=r[0]:[o,a]=r,this.clear(),clearTimeout(this._previousTimeout),o||(o=s&&s.politeness?s.politeness:"polite"),a==null&&s&&(a=s.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(l=>this._currentResolve=l)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=i,typeof a=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let i="cdk-live-announcer-element",r=this._document.getElementsByClassName(i),s=this._document.createElement("div");for(let o=0;o<r.length;o++)r[o].remove();return s.classList.add(i),s.classList.add("cdk-visually-hidden"),s.setAttribute("aria-atomic","true"),s.setAttribute("aria-live","polite"),s.id=`cdk-live-announcer-${f8t++}`,this._document.body.appendChild(s),s}_exposeAnnouncerToModals(i){let r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let s=0;s<r.length;s++){let o=r[s],a=o.getAttribute("aria-owns");a?a.indexOf(i)===-1&&o.setAttribute("aria-owns",a+" "+i):o.setAttribute("aria-owns",i)}}};e.\u0275fac=function(r){return new(r||e)(it(h8t,8),it(pn),it(Lr),it(m8t,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),o$=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(o$||{}),g8t=new Ri("cdk-focus-monitor-default-options"),s$=Sh({passive:!0,capture:!0}),qp=(()=>{let e=class e{constructor(i,r,s,o,a){this._ngZone=i,this._platform=r,this._inputModalityDetector=s,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Mi,this._rootNodeFocusAndBlurListener=l=>{let c=sf(l);for(let d=c;d;d=d.parentElement)l.type==="focus"?this._onFocus(l,d):this._onBlur(l,d)},this._document=o,this._detectionMode=a?.detectionMode||o$.IMMEDIATE}monitor(i,r=!1){let s=Yp(i);if(!this._platform.isBrowser||s.nodeType!==1)return Fr();let o=ok(s)||this._getDocument(),a=this._elementInfo.get(s);if(a)return r&&(a.checkChildren=!0),a.subject;let l={checkChildren:r,subject:new Mi,rootNode:o};return this._elementInfo.set(s,l),this._registerGlobalListeners(l),l.subject}stopMonitoring(i){let r=Yp(i),s=this._elementInfo.get(r);s&&(s.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(s))}focusVia(i,r,s){let o=Yp(i),a=this._getDocument().activeElement;o===a?this._getClosestElementsInfo(o).forEach(([l,c])=>this._originChanged(l,r,c)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(s))}ngOnDestroy(){this._elementInfo.forEach((i,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(i){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(i)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:i&&this._isLastInteractionFromInputLabel(i)?"mouse":"program"}_shouldBeAttributedToTouch(i){return this._detectionMode===o$.EVENTUAL||!!i?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(i,r){i.classList.toggle("cdk-focused",!!r),i.classList.toggle("cdk-touch-focused",r==="touch"),i.classList.toggle("cdk-keyboard-focused",r==="keyboard"),i.classList.toggle("cdk-mouse-focused",r==="mouse"),i.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(i,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=i,this._originFromTouchInteraction=i==="touch"&&r,this._detectionMode===o$.IMMEDIATE){clearTimeout(this._originTimeoutId);let s=this._originFromTouchInteraction?BEe:1;this._originTimeoutId=setTimeout(()=>this._origin=null,s)}})}_onFocus(i,r){let s=this._elementInfo.get(r),o=sf(i);!s||!s.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),s)}_onBlur(i,r){let s=this._elementInfo.get(r);!s||s.checkChildren&&i.relatedTarget instanceof Node&&r.contains(i.relatedTarget)||(this._setClasses(r),this._emitOrigin(s,null))}_emitOrigin(i,r){i.subject.observers.length&&this._ngZone.run(()=>i.subject.next(r))}_registerGlobalListeners(i){if(!this._platform.isBrowser)return;let r=i.rootNode,s=this._rootNodeFocusListenerCount.get(r)||0;s||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,s$),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,s$)}),this._rootNodeFocusListenerCount.set(r,s+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Mr(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(i){let r=i.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let s=this._rootNodeFocusListenerCount.get(r);s>1?this._rootNodeFocusListenerCount.set(r,s-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,s$),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,s$),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(i,r,s){this._setClasses(i,r),this._emitOrigin(s,r),this._lastFocusOrigin=r}_getClosestElementsInfo(i){let r=[];return this._elementInfo.forEach((s,o)=>{(o===i||s.checkChildren&&o.contains(i))&&r.push([o,s])}),r}_isLastInteractionFromInputLabel(i){let{_mostRecentTarget:r,mostRecentModality:s}=this._inputModalityDetector;if(s!=="mouse"||!r||r===i||i.nodeName!=="INPUT"&&i.nodeName!=="TEXTAREA"||i.disabled)return!1;let o=i.labels;if(o){for(let a=0;a<o.length;a++)if(o[a].contains(r))return!0}return!1}};e.\u0275fac=function(r){return new(r||e)(it(pn),it(Oo),it(u8t),it(Lr,8),it(g8t,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),YO=(()=>{let e=class e{constructor(i,r){this._elementRef=i,this._focusMonitor=r,this._focusOrigin=null,this.cdkFocusChange=new nt}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let i=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(i,i.nodeType===1&&i.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(r=>{this._focusOrigin=r,this.cdkFocusChange.emit(r)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(qp))},e.\u0275dir=mi({type:e,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"],standalone:!0});let t=e;return t})(),G9=function(t){return t[t.NONE=0]="NONE",t[t.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",t[t.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",t}(G9||{}),REe="cdk-high-contrast-black-on-white",FEe="cdk-high-contrast-white-on-black",Vue="cdk-high-contrast-active",Uue=(()=>{let e=class e{constructor(i,r){this._platform=i,this._document=r,this._breakpointSubscription=Ve(mk).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return G9.NONE;let i=this._document.createElement("div");i.style.backgroundColor="rgb(1,2,3)",i.style.position="absolute",this._document.body.appendChild(i);let r=this._document.defaultView||window,s=r&&r.getComputedStyle?r.getComputedStyle(i):null,o=(s&&s.backgroundColor||"").replace(/ /g,"");switch(i.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return G9.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return G9.BLACK_ON_WHITE}return G9.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let i=this._document.body.classList;i.remove(Vue,REe,FEe),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===G9.BLACK_ON_WHITE?i.add(Vue,REe):r===G9.WHITE_ON_BLACK&&i.add(Vue,FEe)}}};e.\u0275fac=function(r){return new(r||e)(it(Oo),it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ck=(()=>{let e=class e{constructor(i){i._applyBodyHighContrastModeCssClasses()}};e.\u0275fac=function(r){return new(r||e)(it(Uue))},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[pk]});let t=e;return t})()});function v8t(t,e){}function jue(t,e){let n=t.length;for(;n--;)e(t[n])}var j9,$ue,Jf,y8t,_8t,C8t,x8t,Kue,zEe,E8=Q(()=>{Xh();Xh();Qf();Qf();Wc();bv();ri();me();me();Zg();$n();Th();Cl();j9=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}},$ue=(()=>{let e=class e extends Mb{constructor(i,r,s,o,a,l,c,d){super(),this._elementRef=i,this._focusTrapFactory=r,this._config=o,this._interactivityChecker=a,this._ngZone=l,this._overlayRef=c,this._focusMonitor=d,this._platform=Ve(Oo),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=Ve(Kt),this._injector=Ve($o),this._isDestroyed=!1,this.attachDomPortal=u=>{this._portalOutlet.hasAttached();let m=this._portalOutlet.attachDomPortal(u);return this._contentAttached(),m},this._document=s,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(i){this._ariaLabelledByQueue.push(i),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(i){let r=this._ariaLabelledByQueue.indexOf(i);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(i){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(i);return this._contentAttached(),r}attachTemplatePortal(i){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(i);return this._contentAttached(),r}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(i,r){this._interactivityChecker.isFocusable(i)||(i.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let s=()=>{i.removeEventListener("blur",s),i.removeEventListener("mousedown",s),i.removeAttribute("tabindex")};i.addEventListener("blur",s),i.addEventListener("mousedown",s)})),i.focus(r)}_focusByCssSelector(i,r){let s=this._elementRef.nativeElement.querySelector(i);s&&this._forceFocus(s,r)}_trapFocus(){this._isDestroyed||wh(()=>{let i=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||i.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let i=this._config.restoreFocus,r=null;if(typeof i=="string"?r=this._document.querySelector(i):typeof i=="boolean"?r=i?this._elementFocusedBeforeDialogWasOpened:null:i&&(r=i),this._config.restoreFocus&&r&&typeof r.focus=="function"){let s=B_(),o=this._elementRef.nativeElement;(!s||s===this._document.body||s===o||o.contains(s))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let i=this._elementRef.nativeElement,r=B_();return i===r||i.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=B_()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(KO),R(Lr,8),R(j9),R($O),R(pn),R(D8),R(qp))},e.\u0275cmp=_e({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,s){if(r&1&&ei(w0,7),r&2){let o;Pt(o=Rt())&&(s._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,s){r&2&&Bn("id",s._config.id||null)("role",s._config.role)("aria-modal",s._config.ariaModal)("aria-labelledby",s._config.ariaLabel?null:s._ariaLabelledByQueue[0])("aria-label",s._config.ariaLabel)("aria-describedby",s._config.ariaDescribedBy||null)},standalone:!0,features:[et,xe],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,s){r&1&&W(0,v8t,0,0,"ng-template",0)},dependencies:[w0],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2});let t=e;return t})(),Jf=class{constructor(e,n){this.overlayRef=e,this.config=n,this.closed=new Mi,this.disableClose=n.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=n.id,this.keydownEvents.subscribe(i=>{i.keyCode===27&&!this.disableClose&&!Pc(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{n.closeOnOverlayDetachments!==!1&&this.close()})}close(e,n){if(this.containerInstance){let i=this.closed;this.containerInstance._closeInteractionType=n?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(e),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",n=""){return this.overlayRef.updateSize({width:e,height:n}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},y8t=new Ri("DialogScrollStrategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.block()}}),_8t=new Ri("DialogData"),C8t=new Ri("DefaultDialogConfig"),x8t=0,Kue=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(i,r,s,o,a,l){this._overlay=i,this._injector=r,this._defaultOptions=s,this._parentDialog=o,this._overlayContainer=a,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Mi,this._afterOpenedAtThisLevel=new Mi,this._ariaHiddenElements=new Map,this.afterAllClosed=my(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(ll(void 0))),this._scrollStrategy=l}open(i,r){let s=this._defaultOptions||new j9;r=ve(ve({},s),r),r.id=r.id||`cdk-dialog-${x8t++}`,r.id&&this.getDialogById(r.id);let o=this._getOverlayConfig(r),a=this._overlay.create(o),l=new Jf(a,r),c=this._attachContainer(a,l,r);return l.containerInstance=c,this._attachDialogContent(i,l,c,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(l),l.closed.subscribe(()=>this._removeOpenDialog(l,!0)),this.afterOpened.next(l),l}closeAll(){jue(this.openDialogs,i=>i.close())}getDialogById(i){return this.openDialogs.find(r=>r.id===i)}ngOnDestroy(){jue(this._openDialogsAtThisLevel,i=>{i.config.closeOnDestroy===!1&&this._removeOpenDialog(i,!1)}),jue(this._openDialogsAtThisLevel,i=>i.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(i){let r=new Xg({positionStrategy:i.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:i.scrollStrategy||this._scrollStrategy(),panelClass:i.panelClass,hasBackdrop:i.hasBackdrop,direction:i.direction,minWidth:i.minWidth,minHeight:i.minHeight,maxWidth:i.maxWidth,maxHeight:i.maxHeight,width:i.width,height:i.height,disposeOnNavigation:i.closeOnNavigation});return i.backdropClass&&(r.backdropClass=i.backdropClass),r}_attachContainer(i,r,s){let o=s.injector||s.viewContainerRef?.injector,a=[{provide:j9,useValue:s},{provide:Jf,useValue:r},{provide:D8,useValue:i}],l;s.container?typeof s.container=="function"?l=s.container:(l=s.container.type,a.push(...s.container.providers(s))):l=$ue;let c=new e2(l,s.viewContainerRef,$o.create({parent:o||this._injector,providers:a}),s.componentFactoryResolver);return i.attach(c).instance}_attachDialogContent(i,r,s,o){if(i instanceof Ma){let a=this._createInjector(o,r,s,void 0),l={$implicit:o.data,dialogRef:r};o.templateContext&&(l=ve(ve({},l),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),s.attachTemplatePortal(new of(i,null,l,a))}else{let a=this._createInjector(o,r,s,this._injector),l=s.attachComponentPortal(new e2(i,o.viewContainerRef,a,o.componentFactoryResolver));r.componentRef=l,r.componentInstance=l.instance}}_createInjector(i,r,s,o){let a=i.injector||i.viewContainerRef?.injector,l=[{provide:_8t,useValue:i.data},{provide:Jf,useValue:r}];return i.providers&&(typeof i.providers=="function"?l.push(...i.providers(r,i,s)):l.push(...i.providers)),i.direction&&(!a||!a.get(Va,null,{optional:!0}))&&l.push({provide:Va,useValue:{value:i.direction,change:Fr()}}),$o.create({parent:a||o,providers:l})}_removeOpenDialog(i,r){let s=this.openDialogs.indexOf(i);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,a)=>{o?a.setAttribute("aria-hidden",o):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let i=this._overlayContainer.getContainerElement();if(i.parentElement){let r=i.parentElement.children;for(let s=r.length-1;s>-1;s--){let o=r[s];o!==i&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let i=this._parentDialog;return i?i._getAfterAllClosed():this._afterAllClosedAtThisLevel}};e.\u0275fac=function(r){return new(r||e)(it(xl),it($o),it(C8t,8),it(e,12),it(hk),it(y8t))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();zEe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[Kue],imports:[T0,c4,Ck,c4]});let t=e;return t})()});function T8t(t,e){if(t&1&&ee(0,"mat-pseudo-checkbox",1),t&2){let n=w();b("disabled",n.disabled)("state",n.selected?"checked":"unchecked")}}function D8t(t,e){if(t&1&&ee(0,"mat-pseudo-checkbox",3),t&2){let n=w();b("disabled",n.disabled)}}function E8t(t,e){if(t&1&&(h(0,"span",4),y(1),p()),t&2){let n=w();g(),Ke("(",n.group.label,")")}}function I8t(){return!0}function P8t(){return Ve(Z0)}function Yue(t,e){let n=Array(t);for(let i=0;i<t;i++)n[i]=e(i);return n}function O8t(t=L8t){return[{provide:Od,useClass:F8t},{provide:af,useValue:t}]}function V8t(t,e,n){let i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*r)}function p$(t,e,n){if(n.length){let i=e.toArray(),r=n.toArray(),s=0;for(let o=0;o<t+1;o++)i[o].group&&i[o].group===r[s]&&s++;return s}return 0}function m$(t,e,n,i){return t<n?t:t+e>n+i?Math.max(0,t-i+e):n}var b8t,w8t,S8t,M8t,k8t,qEe,ZEe,A8t,zr,M8,k8,Od,af,R8t,F8t,L8t,XEe,ig,Jue,tg,Xue,HEe,Que,GEe,N8t,WEe,UEe,jEe,qO,h$,$9,ym,D0,ehe,the,XO,QO,B8t,ZO,z_,bk,$Ee,KEe,que,Zue,YEe,u$,ihe,wk,bl=Q(()=>{me();me();Xh();Xh();Th();ri();Wc();Wc();J0();$n();Zg();b8t=["text"],w8t=[[["mat-icon"]],"*"],S8t=["mat-icon","*"];M8t=["mat-internal-form-field",""],k8t=["*"],qEe=(()=>{let e=class e{};e.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",e.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",e.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",e.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";let t=e;return t})(),ZEe=(()=>{let e=class e{};e.COMPLEX="375ms",e.ENTERING="225ms",e.EXITING="195ms";let t=e;return t})();A8t=new Ri("mat-sanity-checks",{providedIn:"root",factory:I8t}),zr=(()=>{let e=class e{constructor(i,r,s){this._sanityChecks=r,this._document=s,this._hasDoneGlobalChecks=!1,i._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(i){return OO()?!1:typeof this._sanityChecks=="boolean"?this._sanityChecks:!!this._sanityChecks[i]}};e.\u0275fac=function(r){return new(r||e)(it(Uue),it(A8t,8),it(Lr))},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[xv,xv]});let t=e;return t})(),M8=class{constructor(e,n,i,r,s){this._defaultMatcher=e,this.ngControl=n,this._parentFormGroup=i,this._parentForm=r,this._stateChanges=s,this.errorState=!1}updateErrorState(){let e=this.errorState,n=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,s=i?.isErrorState(r,n)??!1;s!==e&&(this.errorState=s,this._stateChanges.next())}},k8=new Ri("MAT_DATE_LOCALE",{providedIn:"root",factory:P8t});Od=class{constructor(){this._localeChanges=new Mi,this.localeChanges=this._localeChanges}getValidDateOrNull(e){return this.isDateInstance(e)&&this.isValid(e)?e:null}deserialize(e){return e==null||this.isDateInstance(e)&&this.isValid(e)?e:this.invalid()}setLocale(e){this.locale=e,this._localeChanges.next()}compareDate(e,n){return this.getYear(e)-this.getYear(n)||this.getMonth(e)-this.getMonth(n)||this.getDate(e)-this.getDate(n)}sameDate(e,n){if(e&&n){let i=this.isValid(e),r=this.isValid(n);return i&&r?!this.compareDate(e,n):i==r}return e==n}clampDate(e,n,i){return n&&this.compareDate(e,n)<0?n:i&&this.compareDate(e,i)>0?i:e}},af=new Ri("mat-date-formats"),R8t=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;F8t=(()=>{let e=class e extends Od{constructor(i){super(),this.useUtcForDisplay=!1,this._matDateLocale=Ve(k8,{optional:!0}),i!==void 0&&(this._matDateLocale=i),super.setLocale(this._matDateLocale)}getYear(i){return i.getFullYear()}getMonth(i){return i.getMonth()}getDate(i){return i.getDate()}getDayOfWeek(i){return i.getDay()}getMonthNames(i){let r=new Intl.DateTimeFormat(this.locale,{month:i,timeZone:"utc"});return Yue(12,s=>this._format(r,new Date(2017,s,1)))}getDateNames(){let i=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return Yue(31,r=>this._format(i,new Date(2017,0,r+1)))}getDayOfWeekNames(i){let r=new Intl.DateTimeFormat(this.locale,{weekday:i,timeZone:"utc"});return Yue(7,s=>this._format(r,new Date(2017,0,s+1)))}getYearName(i){let r=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._format(r,i)}getFirstDayOfWeek(){return 0}getNumDaysInMonth(i){return this.getDate(this._createDateWithOverflow(this.getYear(i),this.getMonth(i)+1,0))}clone(i){return new Date(i.getTime())}createDate(i,r,s){let o=this._createDateWithOverflow(i,r,s);return o.getMonth()!=r,o}today(){return new Date}parse(i,r){return typeof i=="number"?new Date(i):i?new Date(Date.parse(i)):null}format(i,r){if(!this.isValid(i))throw Error("NativeDateAdapter: Cannot format invalid date.");let s=new Intl.DateTimeFormat(this.locale,St(ve({},r),{timeZone:"utc"}));return this._format(s,i)}addCalendarYears(i,r){return this.addCalendarMonths(i,r*12)}addCalendarMonths(i,r){let s=this._createDateWithOverflow(this.getYear(i),this.getMonth(i)+r,this.getDate(i));return this.getMonth(s)!=((this.getMonth(i)+r)%12+12)%12&&(s=this._createDateWithOverflow(this.getYear(s),this.getMonth(s),0)),s}addCalendarDays(i,r){return this._createDateWithOverflow(this.getYear(i),this.getMonth(i),this.getDate(i)+r)}toIso8601(i){return[i.getUTCFullYear(),this._2digit(i.getUTCMonth()+1),this._2digit(i.getUTCDate())].join("-")}deserialize(i){if(typeof i=="string"){if(!i)return null;if(R8t.test(i)){let r=new Date(i);if(this.isValid(r))return r}}return super.deserialize(i)}isDateInstance(i){return i instanceof Date}isValid(i){return!isNaN(i.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(i,r,s){let o=new Date;return o.setFullYear(i,r,s),o.setHours(0,0,0,0),o}_2digit(i){return("00"+i).slice(-2)}_format(i,r){let s=new Date;return s.setUTCFullYear(r.getFullYear(),r.getMonth(),r.getDate()),s.setUTCHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),i.format(s)}};e.\u0275fac=function(r){return new(r||e)(it(k8,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),L8t={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},XEe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[O8t()]});let t=e;return t})();ig=(()=>{let e=class e{isErrorState(i,r){return!!(i&&i.invalid&&(i.touched||r&&r.submitted))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Jue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,zr]});let t=e;return t})(),tg=function(t){return t[t.FADING_IN=0]="FADING_IN",t[t.VISIBLE=1]="VISIBLE",t[t.FADING_OUT=2]="FADING_OUT",t[t.HIDDEN=3]="HIDDEN",t}(tg||{}),Xue=class{constructor(e,n,i,r=!1){this._renderer=e,this.element=n,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=tg.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}},HEe=Sh({passive:!0,capture:!0}),Que=class{constructor(){this._events=new Map,this._delegateEventHandler=e=>{let n=sf(e);n&&this._events.get(e.type)?.forEach((i,r)=>{(r===n||r.contains(n))&&i.forEach(s=>s.handleEvent(e))})}}addHandler(e,n,i,r){let s=this._events.get(n);if(s){let o=s.get(i);o?o.add(r):s.set(i,new Set([r]))}else this._events.set(n,new Map([[i,new Set([r])]])),e.runOutsideAngular(()=>{document.addEventListener(n,this._delegateEventHandler,HEe)})}removeHandler(e,n,i){let r=this._events.get(e);if(!r)return;let s=r.get(n);s&&(s.delete(i),s.size===0&&r.delete(n),r.size===0&&(this._events.delete(e),document.removeEventListener(e,this._delegateEventHandler,HEe)))}},GEe={enterDuration:225,exitDuration:150},N8t=800,WEe=Sh({passive:!0,capture:!0}),UEe=["mousedown","touchstart"],jEe=["mouseup","mouseleave","touchend","touchcancel"],qO=class qO{constructor(e,n,i,r){this._target=e,this._ngZone=n,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Yp(i))}fadeInRipple(e,n,i={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s=ve(ve({},GEe),i.animation);i.centered&&(e=r.left+r.width/2,n=r.top+r.height/2);let o=i.radius||V8t(e,n,r),a=e-r.left,l=n-r.top,c=s.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${a-o}px`,d.style.top=`${l-o}px`,d.style.height=`${o*2}px`,d.style.width=`${o*2}px`,i.color!=null&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),m=u.transitionProperty,f=u.transitionDuration,_=m==="none"||f==="0s"||f==="0s, 0s"||r.width===0&&r.height===0,x=new Xue(this,d,i,_);d.style.transform="scale3d(1, 1, 1)",x.state=tg.FADING_IN,i.persistent||(this._mostRecentTransientRipple=x);let D=null;return!_&&(c||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let E=()=>{D&&(D.fallbackTimer=null),clearTimeout(I),this._finishRippleTransition(x)},M=()=>this._destroyRipple(x),I=setTimeout(M,c+100);d.addEventListener("transitionend",E),d.addEventListener("transitioncancel",M),D={onTransitionEnd:E,onTransitionCancel:M,fallbackTimer:I}}),this._activeRipples.set(x,D),(_||!c)&&this._finishRippleTransition(x),x}fadeOutRipple(e){if(e.state===tg.FADING_OUT||e.state===tg.HIDDEN)return;let n=e.element,i=ve(ve({},GEe),e.config.animation);n.style.transitionDuration=`${i.exitDuration}ms`,n.style.opacity="0",e.state=tg.FADING_OUT,(e._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(e)}fadeOutAll(){this._getActiveRipples().forEach(e=>e.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(e=>{e.config.persistent||e.fadeOut()})}setupTriggerEvents(e){let n=Yp(e);!this._platform.isBrowser||!n||n===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=n,UEe.forEach(i=>{qO._eventManager.addHandler(this._ngZone,i,n,this)}))}handleEvent(e){e.type==="mousedown"?this._onMousedown(e):e.type==="touchstart"?this._onTouchStart(e):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{jEe.forEach(n=>{this._triggerElement.addEventListener(n,this,WEe)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(e){e.state===tg.FADING_IN?this._startFadeOutTransition(e):e.state===tg.FADING_OUT&&this._destroyRipple(e)}_startFadeOutTransition(e){let n=e===this._mostRecentTransientRipple,{persistent:i}=e.config;e.state=tg.VISIBLE,!i&&(!n||!this._isPointerDown)&&e.fadeOut()}_destroyRipple(e){let n=this._activeRipples.get(e)??null;this._activeRipples.delete(e),this._activeRipples.size||(this._containerRect=null),e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),e.state=tg.HIDDEN,n!==null&&(e.element.removeEventListener("transitionend",n.onTransitionEnd),e.element.removeEventListener("transitioncancel",n.onTransitionCancel),n.fallbackTimer!==null&&clearTimeout(n.fallbackTimer)),e.element.remove()}_onMousedown(e){let n=W9(e),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+N8t;!this._target.rippleDisabled&&!n&&!i&&(this._isPointerDown=!0,this.fadeInRipple(e.clientX,e.clientY,this._target.rippleConfig))}_onTouchStart(e){if(!this._target.rippleDisabled&&!U9(e)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let n=e.changedTouches;if(n)for(let i=0;i<n.length;i++)this.fadeInRipple(n[i].clientX,n[i].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(e=>{let n=e.state===tg.VISIBLE||e.config.terminateOnPointerUp&&e.state===tg.FADING_IN;!e.config.persistent&&n&&e.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let e=this._triggerElement;e&&(UEe.forEach(n=>qO._eventManager.removeHandler(n,e,this)),this._pointerUpEventsRegistered&&(jEe.forEach(n=>e.removeEventListener(n,this,WEe)),this._pointerUpEventsRegistered=!1))}};qO._eventManager=new Que;h$=qO;$9=new Ri("mat-ripple-global-options"),ym=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(i){i&&this.fadeOutAllNonPersistent(),this._disabled=i,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(i){this._trigger=i,this._setupTriggerEventsIfEnabled()}constructor(i,r,s,o,a){this._elementRef=i,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=o||{},this._rippleRenderer=new h$(this,r,i,s)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:ve(ve(ve({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(i,r=0,s){return typeof i=="number"?this._rippleRenderer.fadeInRipple(i,r,ve(ve({},this.rippleConfig),s)):this._rippleRenderer.fadeInRipple(0,0,ve(ve({},this.rippleConfig),i))}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(pn),R(Oo),R($9,8),R(Ic,8))},e.\u0275dir=mi({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,s){r&2&&ki("mat-ripple-unbounded",s.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0});let t=e;return t})(),D0=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,zr]});let t=e;return t})(),ehe=(()=>{let e=class e{constructor(i){this._animationMode=i,this.state="unchecked",this.disabled=!1,this.appearance="full"}};e.\u0275fac=function(r){return new(r||e)(R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,s){r&2&&ki("mat-pseudo-checkbox-indeterminate",s.state==="indeterminate")("mat-pseudo-checkbox-checked",s.state==="checked")("mat-pseudo-checkbox-disabled",s.disabled)("mat-pseudo-checkbox-minimal",s.appearance==="minimal")("mat-pseudo-checkbox-full",s.appearance==="full")("_mat-animation-noopable",s._animationMode==="NoopAnimations")},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[xe],decls:0,vars:0,template:function(r,s){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color, var(--mat-app-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color, var(--mat-app-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color, var(--mat-app-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0});let t=e;return t})(),the=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr]});let t=e;return t})(),XO=new Ri("MAT_OPTION_PARENT_COMPONENT"),QO=new Ri("MatOptgroup"),B8t=0,ZO=class{constructor(e,n=!1){this.source=e,this.isUserInput=n}},z_=(()=>{let e=class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(i){this._disabled=i}get disableRipple(){return!!(this._parent&&this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}constructor(i,r,s,o){this._element=i,this._changeDetectorRef=r,this._parent=s,this.group=o,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id=`mat-option-${B8t++}`,this.onSelectionChange=new nt,this._stateChanges=new Mi}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(i=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),i&&this._emitSelectionChangeEvent())}deselect(i=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),i&&this._emitSelectionChangeEvent())}focus(i,r){let s=this._getHostElement();typeof s.focus=="function"&&s.focus(r)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(i){(i.keyCode===13||i.keyCode===32)&&!Pc(i)&&(this._selectViaInteraction(),i.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let i=this.viewValue;i!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=i)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(i=!1){this.onSelectionChange.emit(new ZO(this,i))}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Kt),R(XO,8),R(QO,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-option"]],viewQuery:function(r,s){if(r&1&&ei(b8t,7),r&2){let o;Pt(o=Rt())&&(s._text=o.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(r,s){r&1&&F("click",function(){return s._selectViaInteraction()})("keydown",function(a){return s._handleKeydown(a)}),r&2&&(Kp("id",s.id),Bn("aria-selected",s.selected)("aria-disabled",s.disabled.toString()),ki("mdc-list-item--selected",s.selected)("mat-mdc-option-multiple",s.multiple)("mat-mdc-option-active",s.active)("mdc-list-item--disabled",s.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",mn]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[Bs,xe],ngContentSelectors:S8t,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(r,s){r&1&&(gr(w8t),W(0,T8t,1,2,"mat-pseudo-checkbox",1),Ln(1),h(2,"span",2,0),Ln(4,1),p(),W(5,D8t,1,1,"mat-pseudo-checkbox",3)(6,E8t,2,1,"span",4),ee(7,"div",5)),r&2&&(Je(s.multiple?0:-1),g(5),Je(!s.multiple&&s.selected&&!s.hideSingleSelectionIndicator?5:-1),g(),Je(s.group&&s.group._inert?6:-1),g(),b("matRippleTrigger",s._getHostElement())("matRippleDisabled",s.disabled||s.disableRipple))},dependencies:[ehe,ym],styles:['.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-app-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-app-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-app-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-app-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color);outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-app-on-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-app-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-app-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let t=e;return t})();bk=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[D0,zr,the]});let t=e;return t})(),$Ee={capture:!0},KEe=["focus","mousedown","mouseenter","touchstart"],que="mat-ripple-loader-uninitialized",Zue="mat-ripple-loader-class-name",YEe="mat-ripple-loader-centered",u$="mat-ripple-loader-disabled",ihe=(()=>{let e=class e{constructor(){this._document=Ve(Lr,{optional:!0}),this._animationMode=Ve(Ic,{optional:!0}),this._globalRippleOptions=Ve($9,{optional:!0}),this._platform=Ve(Oo),this._ngZone=Ve(pn),this._hosts=new Map,this._onInteraction=i=>{let r=sf(i);if(r instanceof HTMLElement){let s=r.closest(`[${que}="${this._globalRippleOptions?.namespace??""}"]`);s&&this._createRipple(s)}},this._ngZone.runOutsideAngular(()=>{for(let i of KEe)this._document?.addEventListener(i,this._onInteraction,$Ee)})}ngOnDestroy(){let i=this._hosts.keys();for(let r of i)this.destroyRipple(r);for(let r of KEe)this._document?.removeEventListener(r,this._onInteraction,$Ee)}configureRipple(i,r){i.setAttribute(que,this._globalRippleOptions?.namespace??""),(r.className||!i.hasAttribute(Zue))&&i.setAttribute(Zue,r.className||""),r.centered&&i.setAttribute(YEe,""),r.disabled&&i.setAttribute(u$,"")}getRipple(i){return this._hosts.get(i)||this._createRipple(i)}setDisabled(i,r){let s=this._hosts.get(i);if(s){s.disabled=r;return}r?i.setAttribute(u$,""):i.removeAttribute(u$)}_createRipple(i){if(!this._document)return;let r=this._hosts.get(i);if(r)return r;i.querySelector(".mat-ripple")?.remove();let s=this._document.createElement("span");s.classList.add("mat-ripple",i.getAttribute(Zue)),i.append(s);let o=new ym(new fi(s),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return o._isInitialized=!0,o.trigger=i,o.centered=i.hasAttribute(YEe),o.disabled=i.hasAttribute(u$),this.attachRipple(i,o),o}attachRipple(i,r){i.removeAttribute(que),this._hosts.set(i,r)}destroyRipple(i){let r=this._hosts.get(i);r&&(r.ngOnDestroy(),this._hosts.delete(i))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),wk=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(r,s){r&2&&ki("mdc-form-field--align-end",s.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[xe],attrs:M8t,ngContentSelectors:k8t,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},styles:[".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}"],encapsulation:2,changeDetection:0});let t=e;return t})()});function Nd(t,e){return{type:ka.Trigger,name:t,definitions:e,options:{}}}function Ml(t,e=null){return{type:ka.Animate,styles:e,timings:t}}function eN(t,e=null){return{type:ka.Group,steps:t,options:e}}function QEe(t,e=null){return{type:ka.Sequence,steps:t,options:e}}function So(t){return{type:ka.Style,styles:t,offset:null}}function bc(t,e,n){return{type:ka.State,name:t,styles:e,options:n}}function nhe(t){return{type:ka.Keyframes,steps:t}}function cl(t,e,n=null){return{type:ka.Transition,expr:t,animation:e,options:n}}function tN(t=null){return{type:ka.AnimateChild,options:t}}function iN(t,e,n=null){return{type:ka.Query,selector:t,animation:e,options:n}}var ka,H_,Pb,JO,g$,ng=Q(()=>{ka=function(t){return t[t.State=0]="State",t[t.Transition=1]="Transition",t[t.Sequence=2]="Sequence",t[t.Group=3]="Group",t[t.Animate=4]="Animate",t[t.Keyframes=5]="Keyframes",t[t.Style=6]="Style",t[t.Trigger=7]="Trigger",t[t.Reference=8]="Reference",t[t.AnimateChild=9]="AnimateChild",t[t.AnimateRef=10]="AnimateRef",t[t.Query=11]="Query",t[t.Stagger=12]="Stagger",t}(ka||{}),H_="*";Pb=class{constructor(e=0,n=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let n=e=="start"?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}},JO=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let n=0,i=0,r=0,s=this.players.length;s==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++n==s&&this._onFinish()}),o.onDestroy(()=>{++i==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let n=e*this.totalTime;this.players.forEach(i=>{let r=i.totalTime?Math.min(1,n/i.totalTime):1;i.setPosition(r)})}getPosition(){let e=this.players.reduce((n,i)=>n===null||i.totalTime>n.totalTime?i:n,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let n=e=="start"?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}},g$="!"});function z8t(t,e){}function iMe(t){return t==null?null:typeof t=="number"?t:t.endsWith("ms")?Q0(t.substring(0,t.length-2)):t.endsWith("s")?Q0(t.substring(0,t.length-1))*1e3:t==="0"?0:null}function U8t(t,e,n){return t._closeInteractionType=e,t.close(n)}var K9,rhe,JEe,eMe,H8t,G8t,W8t,tMe,v$,Gt,Ou,j8t,$8t,K8t,she,nMe,ji=Q(()=>{Qf();Qf();ri();ri();me();me();Xh();E8();J0();bv();$n();Cl();Zg();bl();K9=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},rhe="mdc-dialog--open",JEe="mdc-dialog--opening",eMe="mdc-dialog--closing",H8t=150,G8t=75,W8t=(()=>{let e=class e extends $ue{constructor(i,r,s,o,a,l,c,d,u){super(i,r,s,o,a,l,c,u),this._animationMode=d,this._animationStateChanged=new nt,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?iMe(this._config.enterAnimationDuration)??H8t:0,this._exitAnimationDuration=this._animationsEnabled?iMe(this._config.exitAnimationDuration)??G8t:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(tMe,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(JEe,rhe)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(rhe),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(rhe),this._animationsEnabled?(this._hostElement.style.setProperty(tMe,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(eMe)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(i){this._actionSectionCount+=i,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(JEe,eMe)}_waitForAnimationToComplete(i,r){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(r,i)}_requestAnimationFrame(i){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(i):i()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(i){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:i})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(i){let r=super.attachComponentPortal(i);return r.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),r}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(KO),R(Lr,8),R(K9),R($O),R(pn),R(D8),R(Ic,8),R(qp))},e.\u0275cmp=_e({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(r,s){r&2&&(Kp("id",s._config.id),Bn("aria-modal",s._config.ariaModal)("role",s._config.role)("aria-labelledby",s._config.ariaLabel?null:s._ariaLabelledByQueue[0])("aria-label",s._config.ariaLabel)("aria-describedby",s._config.ariaDescribedBy||null),ki("_mat-animation-noopable",!s._animationsEnabled)("mat-mdc-dialog-container-with-actions",s._actionSectionCount>0))},standalone:!0,features:[et,xe],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),W(2,z8t,0,0,"ng-template",2),p()())},dependencies:[w0],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, var(--mat-app-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-app-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-app-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-app-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-app-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-app-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-app-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-app-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-app-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-app-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-app-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-app-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-app-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2});let t=e;return t})(),tMe="--mat-dialog-transition-duration";v$=function(t){return t[t.OPEN=0]="OPEN",t[t.CLOSING=1]="CLOSING",t[t.CLOSED=2]="CLOSED",t}(v$||{}),Gt=class{constructor(e,n,i){this._ref=e,this._containerInstance=i,this._afterOpened=new Mi,this._beforeClosed=new Mi,this._state=v$.OPEN,this.disableClose=n.disableClose,this.id=e.id,e.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(Ks(r=>r.state==="opened"),ic(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(Ks(r=>r.state==="closed"),ic(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),e.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),ra(this.backdropClick(),this.keydownEvents().pipe(Ks(r=>r.keyCode===27&&!this.disableClose&&!Pc(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),U8t(this,r.type==="keydown"?"keyboard":"mouse"))})}close(e){this._result=e,this._containerInstance._animationStateChanged.pipe(Ks(n=>n.state==="closing"),ic(1)).subscribe(n=>{this._beforeClosed.next(e),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),n.totalTime+100)}),this._state=v$.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(e){let n=this._ref.config.positionStrategy;return e&&(e.left||e.right)?e.left?n.left(e.left):n.right(e.right):n.centerHorizontally(),e&&(e.top||e.bottom)?e.top?n.top(e.top):n.bottom(e.bottom):n.centerVertically(),this._ref.updatePosition(),this}updateSize(e="",n=""){return this._ref.updateSize(e,n),this}addPanelClass(e){return this._ref.addPanelClass(e),this}removePanelClass(e){return this._ref.removePanelClass(e),this}getState(){return this._state}_finishDialogClose(){this._state=v$.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};Ou=new Ri("MatMdcDialogData"),j8t=new Ri("mat-mdc-dialog-default-options"),$8t=new Ri("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.block()}}),K8t=0,she=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let i=this._parentDialog;return i?i._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(i,r,s,o,a,l,c,d){this._overlay=i,this._defaultOptions=o,this._scrollStrategy=a,this._parentDialog=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Mi,this._afterOpenedAtThisLevel=new Mi,this.dialogConfigClass=K9,this.afterAllClosed=my(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(ll(void 0))),this._dialog=r.get(Kue),this._dialogRefConstructor=Gt,this._dialogContainerType=W8t,this._dialogDataToken=Ou}open(i,r){let s;r=ve(ve({},this._defaultOptions||new K9),r),r.id=r.id||`mat-mdc-dialog-${K8t++}`,r.scrollStrategy=r.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(i,St(ve({},r),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:r},{provide:j9,useValue:r}]},templateContext:()=>({dialogRef:s}),providers:(a,l,c)=>(s=new this._dialogRefConstructor(a,r,c),s.updatePosition(r?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:l.data},{provide:this._dialogRefConstructor,useValue:s}])}));return s.componentRef=o.componentRef,s.componentInstance=o.componentInstance,this.openDialogs.push(s),this.afterOpened.next(s),s.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(s);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),s}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(i){return this.openDialogs.find(r=>r.id===i)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(i){let r=i.length;for(;r--;)i[r].close()}};e.\u0275fac=function(r){return new(r||e)(it(xl),it($o),it(S8,8),it(j8t,8),it($8t),it(e,12),it(hk),it(Ic,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),nMe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[she],imports:[zEe,T0,c4,zr,zr]});let t=e;return t})()});function Y8t(t,e){let n=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{let s=r.indexOf("="),[o,a]=s==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,s)),e.decodeValue(r.slice(s+1))],l=n.get(o)||[];l.push(a),n.set(o,l)}),n}function rMe(t){return encodeURIComponent(t).replace(q8t,(e,n)=>Z8t[n]??e)}function y$(t){return`${t}`}function X8t(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function sMe(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function oMe(t){return typeof Blob<"u"&&t instanceof Blob}function aMe(t){return typeof FormData<"u"&&t instanceof FormData}function Q8t(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function ohe(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}function lMe(t){if(t.url)return t.url;let e=txt.toLocaleLowerCase();return t.headers.get(e)}function dhe(){}function nxt(t){t.then(dhe,dhe)}function pMe(t,e){return e(t)}function rxt(t,e){return(n,i)=>e.intercept(n,{handle:r=>t(r,i)})}function sxt(t,e,n){return(i,r)=>fy(n,()=>e(i,s=>t(s,r)))}function lxt(){let t=null;return(e,n)=>{t===null&&(t=(Ve(oxt,{optional:!0})??[]).reduceRight(rxt,pMe));let i=Ve(SO);if(Ve(mMe)){let s=i.add();return t(e,n).pipe(g8(()=>i.remove(s)))}else return t(e,n)}}function dxt(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}function gxt(t,e){let n=t.url.toLowerCase();if(!Ve(fMe)||t.method==="GET"||t.method==="HEAD"||n.startsWith("http://")||n.startsWith("https://"))return e(t);let i=Ve(x$).getToken(),r=Ve(mxt);return i!=null&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),e(t)}function vxt(t,e){return{\u0275kind:t,\u0275providers:e}}function vMe(...t){let e=[Uc,dMe,cMe,{provide:rN,useExisting:cMe},{provide:_$,useFactory:()=>Ve(ixt,{optional:!0})??Ve(dMe)},{provide:uhe,useValue:gxt,multi:!0},{provide:fMe,useValue:!0},{provide:x$,useClass:fxt}];for(let n of t)e.push(...n.\u0275providers);return wO(e)}function yMe(){return vxt(gMe.LegacyInterceptors,[{provide:uMe,useFactory:lxt},{provide:uhe,useExisting:uMe,multi:!0}])}var rN,_$,I8,ahe,q8t,Z8t,Fb,lhe,nN,Lb,sN,C$,oN,Rb,hMe,J8t,Uc,ext,txt,ixt,che,oxt,uhe,axt,mMe,cMe,cxt,dMe,fMe,uxt,hxt,pxt,mxt,x$,fxt,gMe,uMe,L1=Q(()=>{me();me();$n();Cl();ri();ri();rN=class{},_$=class{},I8=class t{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
`).forEach(n=>{let i=n.indexOf(":");if(i>0){let r=n.slice(0,i),s=r.toLowerCase(),o=n.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((n,i)=>{this.setHeaderEntries(i,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([n,i])=>{this.setHeaderEntries(n,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let n=this.headers.get(e.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,n){return this.clone({name:e,value:n,op:"a"})}set(e,n){return this.clone({name:e,value:n,op:"s"})}delete(e,n){return this.clone({name:e,value:n,op:"d"})}maybeSetNormalizedName(e,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(n=>{this.headers.set(n,e.headers.get(n)),this.normalizedNames.set(n,e.normalizedNames.get(n))})}clone(e){let n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n}applyUpdate(e){let n=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,n);let r=(e.op==="a"?this.headers.get(n):void 0)||[];r.push(...i),this.headers.set(n,r);break;case"d":let s=e.value;if(!s)this.headers.delete(n),this.normalizedNames.delete(n);else{let o=this.headers.get(n);if(!o)return;o=o.filter(a=>s.indexOf(a)===-1),o.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,o)}break}}setHeaderEntries(e,n){let i=(Array.isArray(n)?n:[n]).map(s=>s.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>e(this.normalizedNames.get(n),this.headers.get(n)))}},ahe=class{encodeKey(e){return rMe(e)}encodeValue(e){return rMe(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};q8t=/%(\d[a-f0-9])/gi,Z8t={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};Fb=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new ahe,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Y8t(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(n=>{let i=e.fromObject[n],r=Array.isArray(i)?i.map(y$):[y$(i)];this.map.set(n,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let n=this.map.get(e);return n?n[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,n){return this.clone({param:e,value:n,op:"a"})}appendAll(e){let n=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(s=>{n.push({param:i,value:s,op:"a"})}):n.push({param:i,value:r,op:"a"})}),this.clone(n)}set(e,n){return this.clone({param:e,value:n,op:"s"})}delete(e,n){return this.clone({param:e,value:n,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let n=this.encoder.encodeKey(e);return this.map.get(e).map(i=>n+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(e),n}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let n=(e.op==="a"?this.map.get(e.param):void 0)||[];n.push(y$(e.value)),this.map.set(e.param,n);break;case"d":if(e.value!==void 0){let i=this.map.get(e.param)||[],r=i.indexOf(y$(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}},lhe=class{constructor(){this.map=new Map}set(e,n){return this.map.set(e,n),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};nN=class t{constructor(e,n,i,r){this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let s;if(X8t(this.method)||r?(this.body=i!==void 0?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new I8,this.context??=new lhe,!this.params)this.params=new Fb,this.urlWithParams=n;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=n;else{let a=n.indexOf("?"),l=a===-1?"?":a<n.length-1?"&":"";this.urlWithParams=n+l+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||sMe(this.body)||oMe(this.body)||aMe(this.body)||Q8t(this.body)?this.body:this.body instanceof Fb?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||aMe(this.body)?null:oMe(this.body)?this.body.type||null:sMe(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof Fb?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(e={}){let n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,s=e.transferCache??this.transferCache,o=e.body!==void 0?e.body:this.body,a=e.withCredentials??this.withCredentials,l=e.reportProgress??this.reportProgress,c=e.headers||this.headers,d=e.params||this.params,u=e.context??this.context;return e.setHeaders!==void 0&&(c=Object.keys(e.setHeaders).reduce((m,f)=>m.set(f,e.setHeaders[f]),c)),e.setParams&&(d=Object.keys(e.setParams).reduce((m,f)=>m.set(f,e.setParams[f]),d)),new t(n,i,o,{params:d,headers:c,context:u,reportProgress:l,responseType:r,withCredentials:a,transferCache:s})}},Lb=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(Lb||{}),sN=class{constructor(e,n=200,i="OK"){this.headers=e.headers||new I8,this.status=e.status!==void 0?e.status:n,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},C$=class t extends sN{constructor(e={}){super(e),this.type=Lb.ResponseHeader}clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},oN=class t extends sN{constructor(e={}){super(e),this.type=Lb.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Rb=class extends sN{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},hMe=200,J8t=204;Uc=(()=>{let e=class e{constructor(i){this.handler=i}request(i,r,s={}){let o;if(i instanceof nN)o=i;else{let c;s.headers instanceof I8?c=s.headers:c=new I8(s.headers);let d;s.params&&(s.params instanceof Fb?d=s.params:d=new Fb({fromObject:s.params})),o=new nN(i,r,s.body!==void 0?s.body:null,{headers:c,context:s.context,params:d,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let a=Fr(o).pipe(D9(c=>this.handler.handle(c)));if(i instanceof nN||s.observe==="events")return a;let l=a.pipe(Ks(c=>c instanceof oN));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return l.pipe(lr(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return l.pipe(lr(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return l.pipe(lr(c=>{if(c.body!==null&&typeof c.body!="string")throw new Error("Response is not a string.");return c.body}));case"json":default:return l.pipe(lr(c=>c.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${s.observe}}`)}}delete(i,r={}){return this.request("DELETE",i,r)}get(i,r={}){return this.request("GET",i,r)}head(i,r={}){return this.request("HEAD",i,r)}jsonp(i,r){return this.request("JSONP",i,{params:new Fb().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(i,r={}){return this.request("OPTIONS",i,r)}patch(i,r,s={}){return this.request("PATCH",i,ohe(s,r))}post(i,r,s={}){return this.request("POST",i,ohe(s,r))}put(i,r,s={}){return this.request("PUT",i,ohe(s,r))}};e.\u0275fac=function(r){return new(r||e)(it(rN))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),ext=/^\)\]\}',?\n/,txt="X-Request-URL";ixt=(()=>{let e=class e{constructor(){this.fetchImpl=Ve(che,{optional:!0})?.fetch??((...i)=>globalThis.fetch(...i)),this.ngZone=Ve(pn)}handle(i){return new Qa(r=>{let s=new AbortController;return this.doRequest(i,s.signal,r).then(dhe,o=>r.error(new Rb({error:o}))),()=>s.abort()})}doRequest(i,r,s){return O(this,null,function*(){let o=this.createRequestInit(i),a;try{let _=this.ngZone.runOutsideAngular(()=>this.fetchImpl(i.urlWithParams,ve({signal:r},o)));nxt(_),s.next({type:Lb.Sent}),a=yield _}catch(_){s.error(new Rb({error:_,status:_.status??0,statusText:_.statusText,url:i.urlWithParams,headers:_.headers}));return}let l=new I8(a.headers),c=a.statusText,d=lMe(a)??i.urlWithParams,u=a.status,m=null;if(i.reportProgress&&s.next(new C$({headers:l,status:u,statusText:c,url:d})),a.body){let _=a.headers.get("content-length"),x=[],D=a.body.getReader(),E=0,M,I,z=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>O(this,null,function*(){for(;;){let{done:A,value:Y}=yield D.read();if(A)break;if(x.push(Y),E+=Y.length,i.reportProgress){I=i.responseType==="text"?(I??"")+(M??=new TextDecoder).decode(Y,{stream:!0}):void 0;let X=()=>s.next({type:Lb.DownloadProgress,total:_?+_:void 0,loaded:E,partialText:I});z?z.run(X):X()}}}));let G=this.concatChunks(x,E);try{let A=a.headers.get("Content-Type")??"";m=this.parseBody(i,G,A)}catch(A){s.error(new Rb({error:A,headers:new I8(a.headers),status:a.status,statusText:a.statusText,url:lMe(a)??i.urlWithParams}));return}}u===0&&(u=m?hMe:0),u>=200&&u<300?(s.next(new oN({body:m,headers:l,status:u,statusText:c,url:d})),s.complete()):s.error(new Rb({error:m,headers:l,status:u,statusText:c,url:d}))})}parseBody(i,r,s){switch(i.responseType){case"json":let o=new TextDecoder().decode(r).replace(ext,"");return o===""?null:JSON.parse(o);case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:s});case"arraybuffer":return r.buffer}}createRequestInit(i){let r={},s=i.withCredentials?"include":void 0;if(i.headers.forEach((o,a)=>r[o]=a.join(",")),i.headers.has("Accept")||(r.Accept="application/json, text/plain, */*"),!i.headers.has("Content-Type")){let o=i.detectContentTypeHeader();o!==null&&(r["Content-Type"]=o)}return{body:i.serializeBody(),method:i.method,headers:r,credentials:s}}concatChunks(i,r){let s=new Uint8Array(r),o=0;for(let a of i)s.set(a,o),o+=a.length;return s}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),che=class{};oxt=new Ri(""),uhe=new Ri(""),axt=new Ri(""),mMe=new Ri("",{providedIn:"root",factory:()=>!0});cMe=(()=>{let e=class e extends rN{constructor(i,r){super(),this.backend=i,this.injector=r,this.chain=null,this.pendingTasks=Ve(SO),this.contributeToStability=Ve(mMe)}handle(i){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(uhe),...this.injector.get(axt,[])]));this.chain=r.reduceRight((s,o)=>sxt(s,o,this.injector),pMe)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(i,s=>this.backend.handle(s)).pipe(g8(()=>this.pendingTasks.remove(r)))}else return this.chain(i,r=>this.backend.handle(r))}};e.\u0275fac=function(r){return new(r||e)(it(_$),it(fv))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),cxt=/^\)\]\}',?\n/;dMe=(()=>{let e=class e{constructor(i){this.xhrFactory=i}handle(i){if(i.method==="JSONP")throw new to(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?bp(r.\u0275loadImpl()):Fr(null)).pipe(Fl(()=>new Qa(o=>{let a=r.build();if(a.open(i.method,i.urlWithParams),i.withCredentials&&(a.withCredentials=!0),i.headers.forEach((D,E)=>a.setRequestHeader(D,E.join(","))),i.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!i.headers.has("Content-Type")){let D=i.detectContentTypeHeader();D!==null&&a.setRequestHeader("Content-Type",D)}if(i.responseType){let D=i.responseType.toLowerCase();a.responseType=D!=="json"?D:"text"}let l=i.serializeBody(),c=null,d=()=>{if(c!==null)return c;let D=a.statusText||"OK",E=new I8(a.getAllResponseHeaders()),M=dxt(a)||i.url;return c=new C$({headers:E,status:a.status,statusText:D,url:M}),c},u=()=>{let{headers:D,status:E,statusText:M,url:I}=d(),z=null;E!==J8t&&(z=typeof a.response>"u"?a.responseText:a.response),E===0&&(E=z?hMe:0);let G=E>=200&&E<300;if(i.responseType==="json"&&typeof z=="string"){let A=z;z=z.replace(cxt,"");try{z=z!==""?JSON.parse(z):null}catch(Y){z=A,G&&(G=!1,z={error:Y,text:z})}}G?(o.next(new oN({body:z,headers:D,status:E,statusText:M,url:I||void 0})),o.complete()):o.error(new Rb({error:z,headers:D,status:E,statusText:M,url:I||void 0}))},m=D=>{let{url:E}=d(),M=new Rb({error:D,status:a.status||0,statusText:a.statusText||"Unknown Error",url:E||void 0});o.error(M)},f=!1,_=D=>{f||(o.next(d()),f=!0);let E={type:Lb.DownloadProgress,loaded:D.loaded};D.lengthComputable&&(E.total=D.total),i.responseType==="text"&&a.responseText&&(E.partialText=a.responseText),o.next(E)},x=D=>{let E={type:Lb.UploadProgress,loaded:D.loaded};D.lengthComputable&&(E.total=D.total),o.next(E)};return a.addEventListener("load",u),a.addEventListener("error",m),a.addEventListener("timeout",m),a.addEventListener("abort",m),i.reportProgress&&(a.addEventListener("progress",_),l!==null&&a.upload&&a.upload.addEventListener("progress",x)),a.send(l),o.next({type:Lb.Sent}),()=>{a.removeEventListener("error",m),a.removeEventListener("abort",m),a.removeEventListener("load",u),a.removeEventListener("timeout",m),i.reportProgress&&(a.removeEventListener("progress",_),l!==null&&a.upload&&a.upload.removeEventListener("progress",x)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(r){return new(r||e)(it(tk))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),fMe=new Ri(""),uxt="XSRF-TOKEN",hxt=new Ri("",{providedIn:"root",factory:()=>uxt}),pxt="X-XSRF-TOKEN",mxt=new Ri("",{providedIn:"root",factory:()=>pxt}),x$=class{},fxt=(()=>{let e=class e{constructor(i,r,s){this.doc=i,this.platform=r,this.cookieName=s,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let i=this.doc.cookie||"";return i!==this.lastCookieString&&(this.parseCount++,this.lastToken=qj(i,this.cookieName),this.lastCookieString=i),this.lastToken}};e.\u0275fac=function(r){return new(r||e)(it(Lr),it(Fu),it(hxt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})();gMe=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(gMe||{});uMe=new Ri("")});function _xt(){return aN=aN||document.querySelector("base"),aN?aN.getAttribute("href"):null}function Cxt(t){return new URL(t,document.baseURI).pathname}function Dxt(t){return wxt.replace(yhe,t)}function Ext(t){return bxt.replace(yhe,t)}function SMe(t,e){return e.map(n=>n.replace(yhe,t))}function _Me(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}function TMe(t,e){return dDe(ve({rootComponent:t},Rxt(e)))}function Rxt(t){return{appProviders:[...DMe,...t?.providers??[]],platformProviders:Nxt}}function Fxt(){fhe.makeCurrent()}function Lxt(){return new v8}function Oxt(){return zTe(document),document}var mhe,fhe,aN,ghe,xxt,b$,xMe,lN,hhe,bMe,phe,yhe,wMe,bxt,wxt,Sxt,Txt,w$,cN,vhe,dN,S$,Mxt,kxt,CMe,Ixt,Axt,Pxt,Nxt,Vxt,Bxt,DMe,_he,EMe,MMe,Uo,zxt,od=Q(()=>{ri();me();me();mhe=class extends $j{constructor(){super(...arguments),this.supportsDOMEvents=!0}},fhe=class t extends mhe{static makeCurrent(){oEe(new t)}onAndCancel(e,n,i){return e.addEventListener(n,i),()=>{e.removeEventListener(n,i)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.remove()}createElement(e,n){return n=n||this.getDefaultDocument(),n.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return n==="window"?window:n==="document"?e:n==="body"?e.body:null}getBaseHref(e){let n=_xt();return n==null?null:Cxt(n)}resetBaseElement(){aN=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return qj(document.cookie,e)}},aN=null;ghe=class{addToWindow(e){wb.getAngularTestability=(i,r=!0)=>{let s=e.findTestabilityInTree(i,r);if(s==null)throw new to(5103,!1);return s},wb.getAllAngularTestabilities=()=>e.getAllTestabilities(),wb.getAllAngularRootElements=()=>e.getAllRootElements();let n=i=>{let r=wb.getAllAngularTestabilities(),s=r.length,o=function(){s--,s==0&&i()};r.forEach(a=>{a.whenStable(o)})};wb.frameworkStabilizers||(wb.frameworkStabilizers=[]),wb.frameworkStabilizers.push(n)}findTestabilityInTree(e,n,i){if(n==null)return null;let r=e.getTestability(n);return r??(i?N_().isShadowRoot(n)?this.findTestabilityInTree(e,n.host,!0):this.findTestabilityInTree(e,n.parentElement,!0):null)}},xxt=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),b$=new Ri(""),xMe=(()=>{let e=class e{constructor(i,r){this._zone=r,this._eventNameToPlugin=new Map,i.forEach(s=>{s.manager=this}),this._plugins=i.slice().reverse()}addEventListener(i,r,s){return this._findPluginFor(r).addEventListener(i,r,s)}getZone(){return this._zone}_findPluginFor(i){let r=this._eventNameToPlugin.get(i);if(r)return r;if(r=this._plugins.find(o=>o.supports(i)),!r)throw new to(5101,!1);return this._eventNameToPlugin.set(i,r),r}};e.\u0275fac=function(r){return new(r||e)(it(b$),it(pn))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),lN=class{constructor(e){this._doc=e}},hhe="ng-app-id",bMe=(()=>{let e=class e{constructor(i,r,s,o={}){this.doc=i,this.appId=r,this.nonce=s,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Z2(o),this.resetHostNodes()}addStyles(i){for(let r of i)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(i){for(let r of i)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let i=this.styleNodesInDOM;i&&(i.forEach(r=>r.remove()),i.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(i){this.hostNodes.add(i);for(let r of this.getAllStyles())this.addStyleToHost(i,r)}removeHost(i){this.hostNodes.delete(i)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(i){for(let r of this.hostNodes)this.addStyleToHost(r,i)}onStyleRemoved(i){let r=this.styleRef;r.get(i)?.elements?.forEach(s=>s.remove()),r.delete(i)}collectServerRenderedStyles(){let i=this.doc.head?.querySelectorAll(`style[${hhe}="${this.appId}"]`);if(i?.length){let r=new Map;return i.forEach(s=>{s.textContent!=null&&r.set(s.textContent,s)}),r}return null}changeUsageCount(i,r){let s=this.styleRef;if(s.has(i)){let o=s.get(i);return o.usage+=r,o.usage}return s.set(i,{usage:r,elements:[]}),r}getStyleElement(i,r){let s=this.styleNodesInDOM,o=s?.get(r);if(o?.parentNode===i)return s.delete(r),o.removeAttribute(hhe),o;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(hhe,this.appId),i.appendChild(a),a}}addStyleToHost(i,r){let s=this.getStyleElement(i,r),o=this.styleRef,a=o.get(r)?.elements;a?a.push(s):o.set(r,{elements:[s],usage:1})}resetHostNodes(){let i=this.hostNodes;i.clear(),i.add(this.doc.head)}};e.\u0275fac=function(r){return new(r||e)(it(Lr),it(UM),it(TO,8),it(Fu))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),phe={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},yhe=/%COMP%/g,wMe="%COMP%",bxt=`_nghost-${wMe}`,wxt=`_ngcontent-${wMe}`,Sxt=!0,Txt=new Ri("",{providedIn:"root",factory:()=>Sxt});w$=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d=null){this.eventManager=i,this.sharedStylesHost=r,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=l,this.ngZone=c,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=Z2(l),this.defaultRenderer=new cN(i,a,c,this.platformIsServer)}createRenderer(i,r){if(!i||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===bO.ShadowDom&&(r=St(ve({},r),{encapsulation:bO.Emulated}));let s=this.getOrCreateRenderer(i,r);return s instanceof S$?s.applyToHost(i):s instanceof dN&&s.applyStyles(),s}getOrCreateRenderer(i,r){let s=this.rendererByCompId,o=s.get(r.id);if(!o){let a=this.doc,l=this.ngZone,c=this.eventManager,d=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,m=this.platformIsServer;switch(r.encapsulation){case bO.Emulated:o=new S$(c,d,r,this.appId,u,a,l,m);break;case bO.ShadowDom:return new vhe(c,d,i,r,a,l,this.nonce,m);default:o=new dN(c,d,r,u,a,l,m);break}s.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(r){return new(r||e)(it(xMe),it(bMe),it(UM),it(Txt),it(Lr),it(Fu),it(pn),it(TO))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),cN=class{constructor(e,n,i,r){this.eventManager=e,this.doc=n,this.ngZone=i,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,n){return n?this.doc.createElementNS(phe[n]||n,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,n){(_Me(e)?e.content:e).appendChild(n)}insertBefore(e,n,i){e&&(_Me(e)?e.content:e).insertBefore(n,i)}removeChild(e,n){n.remove()}selectRootElement(e,n){let i=typeof e=="string"?this.doc.querySelector(e):e;if(!i)throw new to(-5104,!1);return n||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,i,r){if(r){n=r+":"+n;let s=phe[r];s?e.setAttributeNS(s,n,i):e.setAttribute(n,i)}else e.setAttribute(n,i)}removeAttribute(e,n,i){if(i){let r=phe[i];r?e.removeAttributeNS(r,n):e.removeAttribute(`${i}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,i,r){r&(I9.DashCase|I9.Important)?e.style.setProperty(n,i,r&I9.Important?"important":""):e.style[n]=i}removeStyle(e,n,i){i&I9.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,i){e!=null&&(e[n]=i)}setValue(e,n){e.nodeValue=n}listen(e,n,i){if(typeof e=="string"&&(e=N_().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${n}`);return this.eventManager.addEventListener(e,n,this.decoratePreventDefault(i))}decoratePreventDefault(e){return n=>{if(n==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(n)):e(n))===!1&&n.preventDefault()}}};vhe=class extends cN{constructor(e,n,i,r,s,o,a,l){super(e,s,o,l),this.sharedStylesHost=n,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=SMe(r.id,r.styles);for(let d of c){let u=document.createElement("style");a&&u.setAttribute("nonce",a),u.textContent=d,this.shadowRoot.appendChild(u)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,i){return super.insertBefore(this.nodeOrShadowRoot(e),n,i)}removeChild(e,n){return super.removeChild(null,n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},dN=class extends cN{constructor(e,n,i,r,s,o,a,l){super(e,s,o,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=r,this.styles=l?SMe(l,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},S$=class extends dN{constructor(e,n,i,r,s,o,a,l){let c=r+"-"+i.id;super(e,n,i,s,o,a,l,c),this.contentAttr=Dxt(c),this.hostAttr=Ext(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,n){let i=super.createElement(e,n);return super.setAttribute(i,this.contentAttr,""),i}},Mxt=(()=>{let e=class e extends lN{constructor(i){super(i)}supports(i){return!0}addEventListener(i,r,s){return i.addEventListener(r,s,!1),()=>this.removeEventListener(i,r,s)}removeEventListener(i,r,s){return i.removeEventListener(r,s)}};e.\u0275fac=function(r){return new(r||e)(it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),kxt=(()=>{let e=class e extends lN{constructor(i){super(i),this.delegate=Ve(uDe,{optional:!0})}supports(i){return this.delegate?this.delegate.supports(i):!1}addEventListener(i,r,s){return this.delegate.addEventListener(i,r,s)}removeEventListener(i,r,s){return this.delegate.removeEventListener(i,r,s)}};e.\u0275fac=function(r){return new(r||e)(it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),CMe=["alt","control","meta","shift"],Ixt={"\b":"Backspace","	":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Axt={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},Pxt=(()=>{let e=class e extends lN{constructor(i){super(i)}supports(i){return e.parseEventName(i)!=null}addEventListener(i,r,s){let o=e.parseEventName(r),a=e.eventCallback(o.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>N_().onAndCancel(i,o.domEventName,a))}static parseEventName(i){let r=i.toLowerCase().split("."),s=r.shift();if(r.length===0||!(s==="keydown"||s==="keyup"))return null;let o=e._normalizeKey(r.pop()),a="",l=r.indexOf("code");if(l>-1&&(r.splice(l,1),a="code."),CMe.forEach(d=>{let u=r.indexOf(d);u>-1&&(r.splice(u,1),a+=d+".")}),a+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=s,c.fullKey=a,c}static matchEventFullKeyCode(i,r){let s=Ixt[i.key]||i.key,o="";return r.indexOf("code.")>-1&&(s=i.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),CMe.forEach(a=>{if(a!==s){let l=Axt[a];l(i)&&(o+=a+".")}}),o+=s,o===r)}static eventCallback(i,r,s){return o=>{e.matchEventFullKeyCode(o,i)&&s.runGuarded(()=>r(o))}}static _normalizeKey(i){return i==="esc"?"escape":i}};e.\u0275fac=function(r){return new(r||e)(it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})();Nxt=[{provide:Fu,useValue:Tue},{provide:HTe,useValue:Fxt,multi:!0},{provide:Lr,useFactory:Oxt,deps:[]}],Vxt=new Ri(""),Bxt=[{provide:xj,useClass:ghe,deps:[]},{provide:aDe,useClass:bj,deps:[pn,Kde,xj]},{provide:bj,useClass:bj,deps:[pn,Kde,xj]}],DMe=[{provide:NTe,useValue:"root"},{provide:v8,useFactory:Lxt,deps:[]},{provide:b$,useClass:Mxt,multi:!0,deps:[Lr,pn,Fu]},{provide:b$,useClass:Pxt,multi:!0,deps:[Lr]},{provide:b$,useClass:kxt,multi:!0},w$,bMe,xMe,{provide:hj,useExisting:w$},{provide:tk,useClass:xxt,deps:[]},[]],_he=(()=>{let e=class e{constructor(i){}static withServerTransition(i){return{ngModule:e,providers:[{provide:UM,useValue:i.appId}]}}};e.\u0275fac=function(r){return new(r||e)(it(Vxt,12))},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[...DMe,...Bxt],imports:[sd,cDe]});let t=e;return t})(),EMe=(()=>{let e=class e{constructor(i){this._doc=i}getTitle(){return this._doc.title}setTitle(i){this._doc.title=i||""}};e.\u0275fac=function(r){return new(r||e)(it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),MMe=new Ri("HammerLoader"),Uo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:function(r){let s=null;return r?s=new(r||e):s=it(zxt),s},providedIn:"root"});let t=e;return t})(),zxt=(()=>{let e=class e extends Uo{constructor(i){super(),this._doc=i}sanitize(i,r){if(r==null)return null;switch(i){case $2.NONE:return r;case $2.HTML:return jM(r,"HTML")?M9(r):YTe(this._doc,String(r)).toString();case $2.STYLE:return jM(r,"Style")?M9(r):r;case $2.SCRIPT:if(jM(r,"Script"))return M9(r);throw new to(5200,!1);case $2.URL:return jM(r,"URL")?M9(r):KTe(String(r));case $2.RESOURCE_URL:if(jM(r,"ResourceURL"))return M9(r);throw new to(5201,!1);default:throw new to(5202,!1)}}bypassSecurityTrustHtml(i){return GTe(i)}bypassSecurityTrustStyle(i){return WTe(i)}bypassSecurityTrustScript(i){return UTe(i)}bypassSecurityTrustUrl(i){return jTe(i)}bypassSecurityTrustResourceUrl(i){return $Te(i)}};e.\u0275fac=function(r){return new(r||e)(it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Or,ha=Q(()=>{me();od();Or=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i){return i?(i=i.replace(/\n/g,"<br/>").replace(/\t/g,"&nbsp;&nbsp;"),this.sanitizer.bypassSecurityTrustHtml(i)):""}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"safeHtml",type:e,pure:!0,standalone:!0});let t=e;return t})()});var Hxt,Gxt,Wxt,Uxt,jxt,$xt,Kxt,Yxt,kMe,G_,A8,Ob,P8=Q(()=>{Wc();me();me();Xh();bl();Hxt=["mat-button",""],Gxt=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],Wxt=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],Uxt=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",jxt=["mat-icon-button",""],$xt=["*"],Kxt=new Ri("MAT_BUTTON_CONFIG"),Yxt=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],kMe=(()=>{let e=class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(i){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,i)}get disableRipple(){return this._disableRipple}set disableRipple(i){this._disableRipple=i,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(i){this._disabled=i,this._updateRippleDisabled()}constructor(i,r,s,o){this._elementRef=i,this._platform=r,this._ngZone=s,this._animationMode=o,this._focusMonitor=Ve(qp),this._rippleLoader=Ve(ihe),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;let a=Ve(Kxt,{optional:!0}),l=i.nativeElement,c=l.classList;this.disabledInteractive=a?.disabledInteractive??!1,this.color=a?.color??null,this._rippleLoader?.configureRipple(l,{className:"mat-mdc-button-ripple"});for(let{attribute:d,mdcClasses:u}of Yxt)l.hasAttribute(d)&&c.add(...u)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(i="program",r){i?this._focusMonitor.focusVia(this._elementRef.nativeElement,i,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}};e.\u0275fac=function(r){DO()},e.\u0275dir=mi({type:e,inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",mn],disabled:[2,"disabled","disabled",mn],ariaDisabled:[2,"aria-disabled","ariaDisabled",mn],disabledInteractive:[2,"disabledInteractive","disabledInteractive",mn]},features:[Bs]});let t=e;return t})(),G_=(()=>{let e=class e extends kMe{constructor(i,r,s,o){super(i,r,s,o)}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Oo),R(pn),R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(r,s){r&2&&(Bn("disabled",s._getDisabledAttribute())("aria-disabled",s._getAriaDisabled()),jr(s.color?"mat-"+s.color:""),ki("mat-mdc-button-disabled",s.disabled)("mat-mdc-button-disabled-interactive",s.disabledInteractive)("_mat-animation-noopable",s._animationMode==="NoopAnimations")("mat-unthemed",!s.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[et,xe],attrs:Hxt,ngContentSelectors:Wxt,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,s){r&1&&(gr(Gxt),ee(0,"span",0),Ln(1),h(2,"span",1),Ln(3,1),p(),Ln(4,2),ee(5,"span",2)(6,"span",3)),r&2&&ki("mdc-button__ripple",!s._isFab)("mdc-fab__ripple",s._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 8px);height:var(--mdc-text-button-container-height);font-family:var(--mdc-text-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-app-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-filled-button-horizontal-padding, 16px);height:var(--mdc-filled-button-container-height);font-family:var(--mdc-filled-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-app-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-app-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-app-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-app-level1));height:var(--mdc-protected-button-container-height);font-family:var(--mdc-protected-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-app-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-app-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-app-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-app-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-app-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-app-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-outlined-button-horizontal-padding, 15px);height:var(--mdc-outlined-button-container-height);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-app-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-app-corner-full));border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-app-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-app-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0});let t=e;return t})(),A8=(()=>{let e=class e extends kMe{constructor(i,r,s,o){super(i,r,s,o),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Oo),R(pn),R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(r,s){r&2&&(Bn("disabled",s._getDisabledAttribute())("aria-disabled",s._getAriaDisabled()),jr(s.color?"mat-"+s.color:""),ki("mat-mdc-button-disabled",s.disabled)("mat-mdc-button-disabled-interactive",s.disabledInteractive)("_mat-animation-noopable",s._animationMode==="NoopAnimations")("mat-unthemed",!s.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[et,xe],attrs:jxt,ngContentSelectors:$xt,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,s){r&1&&(gr(),ee(0,"span",0),Ln(1),ee(2,"span",1)(3,"span",2))},styles:['.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 48px);height:var(--mdc-icon-button-state-layer-size, 48px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 48px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size);color:var(--mdc-icon-button-icon-color, var(--mat-app-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',Uxt],encapsulation:2,changeDetection:0});let t=e;return t})(),Ob=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,D0,zr]});let t=e;return t})()});function xhe(t){for(let e in t){let n=t[e]??"";switch(e){case"display":n==="flex"?t.display=["-webkit-flex","flex"]:n==="inline-flex"?t.display=["-webkit-inline-flex","inline-flex"]:t.display=n;break;case"align-items":case"align-self":case"align-content":case"flex":case"flex-basis":case"flex-flow":case"flex-grow":case"flex-shrink":case"flex-wrap":case"justify-content":t["-webkit-"+e]=n;break;case"flex-direction":t["-webkit-flex-direction"]=n,t["flex-direction"]=n;break;case"order":t.order=t["-webkit-"+e]=isNaN(+n)?"0":n;break}}return t}function T$(t){let[e,n,i]=IMe(t);return Zxt(e,n,i)}function IMe(t){t=t?.toLowerCase()??"";let[e,n,i]=t.split(" ");return uN.find(r=>r===e)||(e=uN[0]),n===Che&&(n=i!==Che?i:"",i=Che),[e,qxt(n),!!i]}function hN(t){let[e]=IMe(t);return e.indexOf("row")>-1}function qxt(t){if(t)switch(t.toLowerCase()){case"reverse":case"wrap-reverse":case"reverse-wrap":t="wrap-reverse";break;case"no":case"none":case"nowrap":t="nowrap";break;default:t="wrap";break}return t}function Zxt(t,e=null,n=!1){return{display:n?"inline-flex":"flex","box-sizing":"border-box","flex-direction":t,"flex-wrap":e||null}}function Dy(t,...e){if(t==null)throw TypeError("Cannot convert undefined or null to object");for(let n of e)if(n!=null)for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i]);return t}var Che,uN,bhe=Q(()=>{Che="inline",uN=["row","column","row-reverse","column-reverse"];});function Xxt(t,e){return()=>{if(Sy(e)){let n=Array.from(t.querySelectorAll(`[class*=${AMe}]`)),i=/\bflex-layout-.+?\b/g;n.forEach(r=>{r.classList.contains(`${AMe}ssr`)&&r.parentNode?r.parentNode.removeChild(r):r.className.replace(i,"")})}}}function GMe(t,e){return t=t?.clone()??new Y9,e&&(t.mqAlias=e.alias,t.mediaQuery=e.mediaQuery,t.suffix=e.suffix,t.priority=e.priority),t}function ebt(t,e){return WMe(t)[e]??""}function tbt(t,e,n){e=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();let i=WMe(t);i[e]=n??"",ibt(t,i)}function ibt(t,e){let n="";for(let i in e)e[i]&&(n+=`${i}:${e[i]};`);t.setAttribute("style",n)}function WMe(t){let e={},n=t.getAttribute("style");if(n){let i=n.split(/;+/g);for(let r=0;r<i.length;r++){let s=i[r].trim();if(s.length>0){let o=s.indexOf(":");if(o===-1)throw new Error(`Invalid CSS style: ${s}`);let a=s.substr(0,o).trim();e[a]=s.substr(o+1).trim()}}}return e}function pN(t,e){let n=t&&t.priority||0;return(e&&e.priority||0)-n}function nbt(t,e){let n=t.priority||0,i=e.priority||0;return n-i}function sbt(t,e){let n=t.filter(i=>!PMe[i]);if(n.length>0){let i=n.join(", ");try{let r=e.createElement("style");if(r.setAttribute("type","text/css"),!r.styleSheet){let s=`
/*
  ngx-flexible-layout - workaround for possible browser quirk with mediaQuery listeners
  see http://bit.ly/2sd4HMP
*/
@media ${i} {.fx-query-test{ }}
`;r.appendChild(e.createTextNode(s))}e.head.appendChild(r),n.forEach(s=>PMe[s]=r)}catch(r){console.error(r)}}}function obt(t){let e=new EventTarget;return e.matches=t==="all"||t==="",e.media=t,e.addListener=()=>{},e.removeListener=()=>{},e.addEventListener=()=>{},e.dispatchEvent=()=>!1,e.onchange=null,e}function abt(t,e){return e&&!!window.matchMedia("all").addListener?window.matchMedia(t):obt(t)}function cbt(t){let e=t.length>0?t.charAt(0):"",n=t.length>1?t.slice(1):"";return e.toUpperCase()+n}function dbt(t){return t.replace(lbt,"|").split("|").map(cbt).join("")}function ubt(t){return t.forEach(e=>{e.suffix||(e.suffix=dbt(e.alias),e.overlapping=!!e.overlapping)}),t}function hbt(t,e=[]){let n={};return t.forEach(i=>{n[i.alias]=i}),e.forEach(i=>{n[i.alias]?Dy(n[i.alias],i):n[i.alias]=i}),ubt(Object.keys(n).map(i=>n[i]))}function ybt(t){return t?.mediaQuery.startsWith(Sk)??!1}function BMe(t,e,n,i){if(i!==void 0){let r=t.get(e)??new Map;r.set(n,i),t.set(e,r)}}function She(t,e="1",n="1"){let i=[e,n,t],r=t.indexOf("calc");if(r>0){i[2]=zMe(t.substring(r).trim());let s=t.substr(0,r).trim().split(" ");s.length==2&&(i[0]=s[0],i[1]=s[1])}else if(r==0)i[2]=zMe(t.trim());else{let s=t.split(" ");i=s.length===3?s:[e,n,t]}return i}function zMe(t){return t.replace(/[\s]/g,"").replace(/[\/\*\+\-]/g," $& ")}function M$(t,e){if(e===void 0)return t;let n=i=>{let r=+i.slice(0,-HMe.length);return t.endsWith(HMe)&&!isNaN(r)?`${r*e.value}${e.unit}`:t};return t.includes(" ")?t.split(" ").map(n).join(" "):n(t)}var Qxt,AMe,Tk,Y9,Jxt,D$,u4,q9,E$,d4,h4,rbt,PMe,lbt,pbt,RMe,FMe,LMe,OMe,NMe,VMe,R8,mbt,fbt,UMe,Sk,gbt,vbt,whe,Sv,Tv,HMe,Nb=Q(()=>{me();me();ri();$n();bhe();Cl();Qxt={provide:EO,useFactory:Xxt,deps:[Lr,Fu],multi:!0},AMe="flex-layout-";Tk=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=en({type:t});static \u0275inj=Ji({providers:[Qxt]})}return t})(),Y9=class t{matches;mediaQuery;mqAlias;suffix;priority;property="";value;constructor(e=!1,n="all",i="",r="",s=0){this.matches=e,this.mediaQuery=n,this.mqAlias=i,this.suffix=r,this.priority=s}clone(){return new t(this.matches,this.mediaQuery,this.mqAlias,this.suffix)}};Jxt=(()=>{class t{stylesheet=new Map;addStyleToElement(n,i,r){let s=this.stylesheet.get(n);s?s.set(i,r):this.stylesheet.set(n,new Map([[i,r]]))}clearStyles(){this.stylesheet.clear()}getStyleForElement(n,i){let r=this.stylesheet.get(n),s="";if(r){let o=r.get(i);(typeof o=="number"||typeof o=="string")&&(s=o+"")}return s}static \u0275fac=function(i){return new(i||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();D$={addFlexToParent:!0,addOrientationBps:!1,disableDefaultBps:!1,disableVendorPrefixes:!1,serverLoaded:!1,useColumnBasisZero:!0,printWithBreakpoints:[],mediaTriggerAutoRestore:!0,ssrObserveBreakpoints:[],multiplier:void 0,defaultUnit:"px",detectLayoutDisplay:!1},u4=new Ri("Flex Layout token, config options for the library",{providedIn:"root",factory:()=>D$});q9=new Ri("FlexLayoutServerLoaded",{providedIn:"root",factory:()=>!1});E$=new Ri("Flex Layout token, collect all breakpoints into one provider",{providedIn:"root",factory:()=>null});d4=class{shouldCache=!0;sideEffect(e,n,i){}};h4=(()=>{class t{_serverStylesheet;_serverModuleLoaded;_platformId;layoutConfig;constructor(n,i,r,s){this._serverStylesheet=n,this._serverModuleLoaded=i,this._platformId=r,this.layoutConfig=s}applyStyleToElement(n,i,r=null){let s={};typeof i=="string"&&(s[i]=r,i=s),s=this.layoutConfig.disableVendorPrefixes?i:xhe(i),this._applyMultiValueStyleToElement(s,n)}applyStyleToElements(n,i=[]){let r=this.layoutConfig.disableVendorPrefixes?n:xhe(n);i.forEach(s=>{this._applyMultiValueStyleToElement(r,s)})}getFlowDirection(n){let i="flex-direction",r=this.lookupStyle(n,i),s=this.lookupInlineStyle(n,i)||Z2(this._platformId)&&this._serverModuleLoaded?r:"";return[r||"row",s]}hasWrap(n){return this.lookupStyle(n,"flex-wrap")==="wrap"}lookupAttributeValue(n,i){return n.getAttribute(i)??""}lookupInlineStyle(n,i){return Sy(this._platformId)?n.style.getPropertyValue(i):ebt(n,i)}lookupStyle(n,i,r=!1){let s="";return n&&((s=this.lookupInlineStyle(n,i))||(Sy(this._platformId)?r||(s=getComputedStyle(n).getPropertyValue(i)):this._serverModuleLoaded&&(s=this._serverStylesheet.getStyleForElement(n,i)))),s?s.trim():""}_applyMultiValueStyleToElement(n,i){Object.keys(n).sort().forEach(r=>{let s=n[r],o=Array.isArray(s)?s:[s];o.sort();for(let a of o)a=a?a+"":"",Sy(this._platformId)||!this._serverModuleLoaded?Sy(this._platformId)?i.style.setProperty(r,a):tbt(i,r,a):this._serverStylesheet.addStyleToElement(i,r,a)})}static \u0275fac=function(i){return new(i||t)(it(Jxt),it(q9),it(Fu),it(u4))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();rbt=(()=>{class t{_zone;_platformId;_document;source=new qs(new Y9(!0));registry=new Map;pendingRemoveListenerFns=[];constructor(n,i,r){this._zone=n,this._platformId=i,this._document=r}get activations(){let n=[];return this.registry.forEach((i,r)=>{i.matches&&n.push(r)}),n}isActive(n){return this.registry.get(n)?.matches??this.registerQuery(n).some(r=>r.matches)}observe(n,i=!1){if(n&&n.length){let r=this._observable$.pipe(Ks(o=>i?n.indexOf(o.mediaQuery)>-1:!0)),s=new Qa(o=>{let a=this.registerQuery(n);if(a.length){let l=a.pop();a.forEach(c=>{o.next(c)}),this.source.next(l)}o.complete()});return ra(s,r)}return this._observable$}registerQuery(n){let i=Array.isArray(n)?n:[n],r=[];return sbt(i,this._document),i.forEach(s=>{let o=l=>{this._zone.run(()=>this.source.next(new Y9(l.matches,s)))},a=this.registry.get(s);a||(a=this.buildMQL(s),a.addListener(o),this.pendingRemoveListenerFns.push(()=>a.removeListener(o)),this.registry.set(s,a)),a.matches&&r.push(new Y9(!0,s))}),r}ngOnDestroy(){let n;for(;n=this.pendingRemoveListenerFns.pop();)n()}buildMQL(n){return abt(n,Sy(this._platformId))}_observable$=this.source.asObservable();static \u0275fac=function(i){return new(i||t)(it(pn),it(Fu),it(Lr))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),PMe={};lbt=/(\.|-|_)/g;pbt=[{alias:"xs",mediaQuery:"screen and (min-width: 0px) and (max-width: 599.98px)",priority:1e3},{alias:"sm",mediaQuery:"screen and (min-width: 600px) and (max-width: 959.98px)",priority:900},{alias:"md",mediaQuery:"screen and (min-width: 960px) and (max-width: 1279.98px)",priority:800},{alias:"lg",mediaQuery:"screen and (min-width: 1280px) and (max-width: 1919.98px)",priority:700},{alias:"xl",mediaQuery:"screen and (min-width: 1920px) and (max-width: 4999.98px)",priority:600},{alias:"lt-sm",overlapping:!0,mediaQuery:"screen and (max-width: 599.98px)",priority:950},{alias:"lt-md",overlapping:!0,mediaQuery:"screen and (max-width: 959.98px)",priority:850},{alias:"lt-lg",overlapping:!0,mediaQuery:"screen and (max-width: 1279.98px)",priority:750},{alias:"lt-xl",overlapping:!0,priority:650,mediaQuery:"screen and (max-width: 1919.98px)"},{alias:"gt-xs",overlapping:!0,mediaQuery:"screen and (min-width: 600px)",priority:-950},{alias:"gt-sm",overlapping:!0,mediaQuery:"screen and (min-width: 960px)",priority:-850},{alias:"gt-md",overlapping:!0,mediaQuery:"screen and (min-width: 1280px)",priority:-750},{alias:"gt-lg",overlapping:!0,mediaQuery:"screen and (min-width: 1920px)",priority:-650}];RMe="(orientation: portrait) and (max-width: 599.98px)",FMe="(orientation: landscape) and (max-width: 959.98px)",LMe="(orientation: portrait) and (min-width: 600px) and (max-width: 839.98px)",OMe="(orientation: landscape) and (min-width: 960px) and (max-width: 1279.98px)",NMe="(orientation: portrait) and (min-width: 840px)",VMe="(orientation: landscape) and (min-width: 1280px)",R8={HANDSET:`${RMe}, ${FMe}`,TABLET:`${LMe} , ${OMe}`,WEB:`${NMe}, ${VMe} `,HANDSET_PORTRAIT:`${RMe}`,TABLET_PORTRAIT:`${LMe} `,WEB_PORTRAIT:`${NMe}`,HANDSET_LANDSCAPE:`${FMe}`,TABLET_LANDSCAPE:`${OMe}`,WEB_LANDSCAPE:`${VMe}`},mbt=[{alias:"handset",priority:2e3,mediaQuery:R8.HANDSET},{alias:"handset.landscape",priority:2e3,mediaQuery:R8.HANDSET_LANDSCAPE},{alias:"handset.portrait",priority:2e3,mediaQuery:R8.HANDSET_PORTRAIT},{alias:"tablet",priority:2100,mediaQuery:R8.TABLET},{alias:"tablet.landscape",priority:2100,mediaQuery:R8.TABLET_LANDSCAPE},{alias:"tablet.portrait",priority:2100,mediaQuery:R8.TABLET_PORTRAIT},{alias:"web",priority:2200,mediaQuery:R8.WEB,overlapping:!0},{alias:"web.landscape",priority:2200,mediaQuery:R8.WEB_LANDSCAPE,overlapping:!0},{alias:"web.portrait",priority:2200,mediaQuery:R8.WEB_PORTRAIT,overlapping:!0}];fbt=new Ri("Token (ngx-flexible-layout) Breakpoints",{providedIn:"root",factory:()=>{let t=Ve(E$),e=Ve(u4),n=[].concat.apply([],(t||[]).map(r=>Array.isArray(r)?r:[r])),i=(e.disableDefaultBps?[]:pbt).concat(e.addOrientationBps?mbt:[]);return hbt(i,n)}});UMe=(()=>{class t{items;constructor(n){this.items=[...n].sort(nbt)}findByAlias(n){return n?this.findWithPredicate(n,i=>i.alias===n):null}findByQuery(n){return this.findWithPredicate(n,i=>i.mediaQuery===n)}get overlappings(){return this.items.filter(n=>n.overlapping)}get aliases(){return this.items.map(n=>n.alias)}get suffixes(){return this.items.map(n=>n?.suffix??"")}findWithPredicate(n,i){let r=this.findByMap.get(n);return r||(r=this.items.find(i)??null,this.findByMap.set(n,r)),r??null}findByMap=new Map;static \u0275fac=function(i){return new(i||t)(it(fbt))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();Sk="print",gbt={alias:Sk,mediaQuery:Sk,priority:1e3},vbt=(()=>{class t{breakpoints;layoutConfig;_document;constructor(n,i,r){this.breakpoints=n,this.layoutConfig=i,this._document=r}withPrintQuery(n){return[...n,Sk]}isPrintEvent(n){return n.mediaQuery.startsWith(Sk)}get printAlias(){return[...this.layoutConfig.printWithBreakpoints??[]]}get printBreakPoints(){return this.printAlias.map(n=>this.breakpoints.findByAlias(n)).filter(n=>n!==null)}getEventBreakpoints({mediaQuery:n}){let i=this.breakpoints.findByQuery(n);return(i?[...this.printBreakPoints,i]:this.printBreakPoints).sort(pN)}updateEvent(n){let i=this.breakpoints.findByQuery(n.mediaQuery);return this.isPrintEvent(n)&&(i=this.getEventBreakpoints(n)[0],n.mediaQuery=i?.mediaQuery??""),GMe(n,i)}registeredBeforeAfterPrintHooks=!1;isPrintingBeforeAfterEvent=!1;beforePrintEventListeners=[];afterPrintEventListeners=[];formerActivations=null;registerBeforeAfterPrintHooks(n){if(!this._document.defaultView||this.registeredBeforeAfterPrintHooks)return;this.registeredBeforeAfterPrintHooks=!0;let i=()=>{this.isPrinting||(this.isPrintingBeforeAfterEvent=!0,this.startPrinting(n,this.getEventBreakpoints(new Y9(!0,Sk))),n.updateStyles())},r=()=>{this.isPrintingBeforeAfterEvent=!1,this.isPrinting&&(this.stopPrinting(n),n.updateStyles())};this._document.defaultView.addEventListener("beforeprint",i),this._document.defaultView.addEventListener("afterprint",r),this.beforePrintEventListeners.push(i),this.afterPrintEventListeners.push(r)}interceptEvents(n){return i=>{if(this.isPrintEvent(i)){i.matches&&!this.isPrinting?(this.startPrinting(n,this.getEventBreakpoints(i)),n.updateStyles()):!i.matches&&this.isPrinting&&!this.isPrintingBeforeAfterEvent&&(this.stopPrinting(n),n.updateStyles());return}this.collectActivations(n,i)}}blockPropagation(){return n=>!(this.isPrinting||this.isPrintEvent(n))}startPrinting(n,i){this.isPrinting=!0,this.formerActivations=n.activatedBreakpoints,n.activatedBreakpoints=this.queue.addPrintBreakpoints(i)}stopPrinting(n){n.activatedBreakpoints=this.deactivations,this.deactivations=[],this.formerActivations=null,this.queue.clear(),this.isPrinting=!1}collectActivations(n,i){if(!this.isPrinting||this.isPrintingBeforeAfterEvent){if(!this.isPrintingBeforeAfterEvent){this.deactivations=[];return}if(!i.matches){let r=this.breakpoints.findByQuery(i.mediaQuery);if(r){let s=this.formerActivations&&this.formerActivations.includes(r),o=!this.formerActivations&&n.activatedBreakpoints.includes(r);(s||o)&&(this.deactivations.push(r),this.deactivations.sort(pN))}}}}ngOnDestroy(){this._document.defaultView&&(this.beforePrintEventListeners.forEach(n=>this._document.defaultView.removeEventListener("beforeprint",n)),this.afterPrintEventListeners.forEach(n=>this._document.defaultView.removeEventListener("afterprint",n)))}isPrinting=!1;queue=new whe;deactivations=[];static \u0275fac=function(i){return new(i||t)(it(UMe),it(u4),it(Lr))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),whe=class{printBreakpoints=[];addPrintBreakpoints(e){return e.push(gbt),e.sort(pN),e.forEach(n=>this.addBreakpoint(n)),this.printBreakpoints}addBreakpoint(e){e&&this.printBreakpoints.find(i=>i.mediaQuery===e.mediaQuery)===void 0&&(this.printBreakpoints=ybt(e)?[e,...this.printBreakpoints]:[...this.printBreakpoints,e])}clear(){this.printBreakpoints=[]}};Sv=(()=>{class t{matchMedia;breakpoints;hook;_useFallbacks=!0;_activatedBreakpoints=[];elementMap=new Map;elementKeyMap=new WeakMap;watcherMap=new WeakMap;updateMap=new WeakMap;clearMap=new WeakMap;subject=new Mi;get activatedAlias(){return this.activatedBreakpoints[0]?.alias??""}set activatedBreakpoints(n){this._activatedBreakpoints=[...n]}get activatedBreakpoints(){return[...this._activatedBreakpoints]}set useFallbacks(n){this._useFallbacks=n}constructor(n,i,r){this.matchMedia=n,this.breakpoints=i,this.hook=r,this.observeActivations()}onMediaChange(n){let i=this.findByQuery(n.mediaQuery);if(i){n=GMe(n,i);let r=this.activatedBreakpoints.indexOf(i);n.matches&&r===-1?(this._activatedBreakpoints.push(i),this._activatedBreakpoints.sort(pN),this.updateStyles()):!n.matches&&r!==-1&&(this._activatedBreakpoints.splice(r,1),this._activatedBreakpoints.sort(pN),this.updateStyles())}}init(n,i,r,s,o=[]){BMe(this.updateMap,n,i,r),BMe(this.clearMap,n,i,s),this.buildElementKeyMap(n,i),this.watchExtraTriggers(n,i,o)}getValue(n,i,r){let s=this.elementMap.get(n);if(s){let o=r!==void 0?s.get(r):this.getActivatedValues(s,i);if(o)return o.get(i)}}hasValue(n,i){let r=this.elementMap.get(n);if(r){let s=this.getActivatedValues(r,i);if(s)return s.get(i)!==void 0||!1}return!1}setValue(n,i,r,s){let o=this.elementMap.get(n);if(!o)o=new Map().set(s,new Map().set(i,r)),this.elementMap.set(n,o);else{let l=(o.get(s)??new Map).set(i,r);o.set(s,l),this.elementMap.set(n,o)}let a=this.getValue(n,i);a!==void 0&&this.updateElement(n,i,a)}trackValue(n,i){return this.subject.asObservable().pipe(Ks(r=>r.element===n&&r.key===i))}updateStyles(){this.elementMap.forEach((n,i)=>{let r=new Set(this.elementKeyMap.get(i)),s=this.getActivatedValues(n);s&&s.forEach((o,a)=>{this.updateElement(i,a,o),r.delete(a)}),r.forEach(o=>{if(s=this.getActivatedValues(n,o),s){let a=s.get(o);this.updateElement(i,o,a)}else this.clearElement(i,o)})})}clearElement(n,i){let r=this.clearMap.get(n);if(r){let s=r.get(i);s&&(s(),this.subject.next({element:n,key:i,value:""}))}}updateElement(n,i,r){let s=this.updateMap.get(n);if(s){let o=s.get(i);o&&(o(r),this.subject.next({element:n,key:i,value:r}))}}releaseElement(n){let i=this.watcherMap.get(n);i&&(i.forEach(s=>s.unsubscribe()),this.watcherMap.delete(n));let r=this.elementMap.get(n);r&&(r.forEach((s,o)=>r.delete(o)),this.elementMap.delete(n))}triggerUpdate(n,i){let r=this.elementMap.get(n);if(r){let s=this.getActivatedValues(r,i);s&&(i?this.updateElement(n,i,s.get(i)):s.forEach((o,a)=>this.updateElement(n,a,o)))}}buildElementKeyMap(n,i){let r=this.elementKeyMap.get(n);r||(r=new Set,this.elementKeyMap.set(n,r)),r.add(i)}watchExtraTriggers(n,i,r){if(r&&r.length){let s=this.watcherMap.get(n);if(s||(s=new Map,this.watcherMap.set(n,s)),!s.get(i)){let a=ra(...r).subscribe(()=>{let l=this.getValue(n,i);this.updateElement(n,i,l)});s.set(i,a)}}}findByQuery(n){return this.breakpoints.findByQuery(n)}getActivatedValues(n,i){for(let s=0;s<this.activatedBreakpoints.length;s++){let o=this.activatedBreakpoints[s],a=n.get(o.alias);if(a&&(i===void 0||a.has(i)&&a.get(i)!=null))return a}if(!this._useFallbacks)return;let r=n.get("");return i===void 0||r&&r.has(i)?r:void 0}observeActivations(){let n=this.breakpoints.items.map(i=>i.mediaQuery);this.hook.registerBeforeAfterPrintHooks(this),this.matchMedia.observe(this.hook.withPrintQuery(n)).pipe(ac(this.hook.interceptEvents(this)),Ks(this.hook.blockPropagation())).subscribe(this.onMediaChange.bind(this))}static \u0275fac=function(i){return new(i||t)(it(rbt),it(UMe),it(vbt))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();Tv=(()=>{class t{elementRef;styleBuilder;styler;marshal;DIRECTIVE_KEY="";inputs=[];mru={};destroySubject=new Mi;currentValue;get parentElement(){return this.elementRef.nativeElement.parentElement}get nativeElement(){return this.elementRef.nativeElement}get activatedValue(){return this.marshal.getValue(this.nativeElement,this.DIRECTIVE_KEY)}set activatedValue(n){this.marshal.setValue(this.nativeElement,this.DIRECTIVE_KEY,n,this.marshal.activatedAlias)}styleCache=new Map;constructor(n,i,r,s){this.elementRef=n,this.styleBuilder=i,this.styler=r,this.marshal=s}ngOnChanges(n){Object.keys(n).forEach(i=>{if(this.inputs.indexOf(i)!==-1){let r=i.split(".").slice(1).join("."),s=n[i].currentValue;this.setValue(s,r)}})}ngOnDestroy(){this.destroySubject.next(),this.destroySubject.complete(),this.marshal.releaseElement(this.nativeElement)}init(n=[]){this.marshal.init(this.elementRef.nativeElement,this.DIRECTIVE_KEY,this.updateWithValue.bind(this),this.clearStyles.bind(this),n)}addStyles(n,i){let r=this.styleBuilder,s=r.shouldCache,o=this.styleCache.get(n);(!o||!s)&&(o=r.buildStyles(n,i),s&&this.styleCache.set(n,o)),this.mru=ve({},o),this.applyStyleToElement(o),r.sideEffect(n,o,i)}clearStyles(){Object.keys(this.mru).forEach(n=>{this.mru[n]=""}),this.applyStyleToElement(this.mru),this.mru={},this.currentValue=void 0}triggerUpdate(){this.marshal.triggerUpdate(this.nativeElement,this.DIRECTIVE_KEY)}getFlexFlowDirection(n,i=!1){if(n){let[r,s]=this.styler.getFlowDirection(n);if(!s&&i){let o=T$(r),a=[n];this.styler.applyStyleToElements(o,a)}return r.trim()}return"row"}hasWrap(n){return this.styler.hasWrap(n)}applyStyleToElement(n,i,r=this.nativeElement){this.styler.applyStyleToElement(r,n,i)}setValue(n,i){this.marshal.setValue(this.nativeElement,this.DIRECTIVE_KEY,n,i)}updateWithValue(n){this.currentValue!==n&&(this.addStyles(n),this.currentValue=n)}static \u0275fac=function(i){return new(i||t)(R(fi),R(d4),R(h4),R(Sv))};static \u0275dir=mi({type:t,features:[yn]})}return t})();HMe="x";});function YMe(t){let e=typeof t;return e==="object"?t.constructor===Array?"array":t.constructor===Set?"set":"object":e}function Sbt(t,e=";"){return String(t).trim().split(e).map(n=>n.trim()).filter(n=>n!=="")}function Tbt(t,e){let n=i=>(e&&(i.value=e(i.value)),i);return t.map(qMe).filter(i=>!!i).map(n).reduce(ZMe,{})}function $Me(t,e){let n=[];return YMe(t)==="set"?t.forEach(i=>n.push(i)):Object.keys(t).forEach(i=>{n.push(`${i}:${t[i]}`)}),Tbt(n,e)}function qMe(t){let[e,...n]=t.split(":");return new Dhe(e,n.join(":"))}function ZMe(t,e){return e.key&&(t[e.key]=e.value),t}function KMe(t,e){let n=i=>(e&&(i.value=e(i.value)),i);return t.map(qMe).filter(i=>!!i).map(n).reduce(ZMe,{})}var _bt,Cbt,No,xbt,bbt,The,wbt,Dv,Dhe,Dbt,Ebt,rs,Dn,An=Q(()=>{me();me();Nb();Nb();ri();ri();J0();Cl();od();_bt=(()=>{class t extends Tv{ngClassInstance;DIRECTIVE_KEY="ngClass";set klass(n){this.ngClassInstance.klass=n,this.setValue(n,"")}constructor(n,i,r,s,o,a,l){super(n,null,i,r),this.ngClassInstance=l,this.ngClassInstance||(this.ngClassInstance=new _s(n,a)),this.init(),this.setValue("","")}updateWithValue(n){this.ngClassInstance.ngClass=n,this.ngClassInstance.ngDoCheck()}ngDoCheck(){this.ngClassInstance.ngDoCheck()}static \u0275fac=function(i){return new(i||t)(R(fi),R(h4),R(Sv),R(xy),R(KM),R(Ac),R(_s,10))};static \u0275dir=mi({type:t,inputs:{klass:[0,"class","klass"]},features:[et]})}return t})(),Cbt=["ngClass","ngClass.xs","ngClass.sm","ngClass.md","ngClass.lg","ngClass.xl","ngClass.lt-sm","ngClass.lt-md","ngClass.lt-lg","ngClass.lt-xl","ngClass.gt-xs","ngClass.gt-sm","ngClass.gt-md","ngClass.gt-lg"],No=(()=>{class t extends _bt{inputs=Cbt;static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275dir=mi({type:t,selectors:[["","ngClass",""],["","ngClass.xs",""],["","ngClass.sm",""],["","ngClass.md",""],["","ngClass.lg",""],["","ngClass.xl",""],["","ngClass.lt-sm",""],["","ngClass.lt-md",""],["","ngClass.lt-lg",""],["","ngClass.lt-xl",""],["","ngClass.gt-xs",""],["","ngClass.gt-sm",""],["","ngClass.gt-md",""],["","ngClass.gt-lg",""]],inputs:{ngClass:"ngClass","ngClass.xs":"ngClass.xs","ngClass.sm":"ngClass.sm","ngClass.md":"ngClass.md","ngClass.lg":"ngClass.lg","ngClass.xl":"ngClass.xl","ngClass.lt-sm":"ngClass.lt-sm","ngClass.lt-md":"ngClass.lt-md","ngClass.lt-lg":"ngClass.lt-lg","ngClass.lt-xl":"ngClass.lt-xl","ngClass.gt-xs":"ngClass.gt-xs","ngClass.gt-sm":"ngClass.gt-sm","ngClass.gt-md":"ngClass.gt-md","ngClass.gt-lg":"ngClass.gt-lg"},features:[et]})}return t})();xbt=(()=>{class t extends d4{buildStyles(n,i){return{display:n==="true"?i.display||(i.isServer?"initial":""):"none"}}static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bbt=(()=>{class t extends Tv{layoutConfig;platformId;serverModuleLoaded;DIRECTIVE_KEY="show-hide";display="";hasLayout=!1;hasFlexChild=!1;constructor(n,i,r,s,o,a,l){super(n,i,r,s),this.layoutConfig=o,this.platformId=a,this.serverModuleLoaded=l}ngAfterViewInit(){this.trackExtraTriggers();let n=Array.from(this.nativeElement.children);for(let r=0;r<n.length;r++)if(this.marshal.hasValue(n[r],"flex")){this.hasFlexChild=!0;break}The.has(this.nativeElement)?this.display=The.get(this.nativeElement):(this.display=this.getDisplayStyle(),The.set(this.nativeElement,this.display)),this.init();let i=this.marshal.getValue(this.nativeElement,this.DIRECTIVE_KEY,"");i===void 0||i===""?this.setValue(!0,""):this.triggerUpdate()}ngOnChanges(n){Object.keys(n).forEach(i=>{if(this.inputs.indexOf(i)!==-1){let r=i.split("."),s=r.slice(1).join("."),o=n[i].currentValue,a=o!==""?o!==0?Y2(o):!1:!0;r[0]==="fxHide"&&(a=!a),this.setValue(a,s)}})}trackExtraTriggers(){this.hasLayout=this.marshal.hasValue(this.nativeElement,"layout"),["layout","layout-align"].forEach(n=>{this.marshal.trackValue(this.nativeElement,n).pipe(Mr(this.destroySubject)).subscribe(this.triggerUpdate.bind(this))})}getDisplayStyle(){return this.hasLayout||this.hasFlexChild&&this.layoutConfig.addFlexToParent?"flex":this.styler.lookupStyle(this.nativeElement,"display",!0)}updateWithValue(n=!0){if(n==="")return;let i=Z2(this.platformId);this.addStyles(n?"true":"false",{display:this.display,isServer:i}),i&&this.serverModuleLoaded&&this.nativeElement.style.setProperty("display",""),this.marshal.triggerUpdate(this.parentElement,"layout-gap")}static \u0275fac=function(i){return new(i||t)(R(fi),R(xbt),R(h4),R(Sv),R(u4),R(Fu),R(q9))};static \u0275dir=mi({type:t,features:[et,yn]})}return t})(),The=new WeakMap,wbt=["fxShow","fxShow.print","fxShow.xs","fxShow.sm","fxShow.md","fxShow.lg","fxShow.xl","fxShow.lt-sm","fxShow.lt-md","fxShow.lt-lg","fxShow.lt-xl","fxShow.gt-xs","fxShow.gt-sm","fxShow.gt-md","fxShow.gt-lg","fxHide","fxHide.print","fxHide.xs","fxHide.sm","fxHide.md","fxHide.lg","fxHide.xl","fxHide.lt-sm","fxHide.lt-md","fxHide.lt-lg","fxHide.lt-xl","fxHide.gt-xs","fxHide.gt-sm","fxHide.gt-md","fxHide.gt-lg"],Dv=(()=>{class t extends bbt{inputs=wbt;static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275dir=mi({type:t,selectors:[["","fxShow",""],["","fxShow.print",""],["","fxShow.xs",""],["","fxShow.sm",""],["","fxShow.md",""],["","fxShow.lg",""],["","fxShow.xl",""],["","fxShow.lt-sm",""],["","fxShow.lt-md",""],["","fxShow.lt-lg",""],["","fxShow.lt-xl",""],["","fxShow.gt-xs",""],["","fxShow.gt-sm",""],["","fxShow.gt-md",""],["","fxShow.gt-lg",""],["","fxHide",""],["","fxHide.print",""],["","fxHide.xs",""],["","fxHide.sm",""],["","fxHide.md",""],["","fxHide.lg",""],["","fxHide.xl",""],["","fxHide.lt-sm",""],["","fxHide.lt-md",""],["","fxHide.lt-lg",""],["","fxHide.lt-xl",""],["","fxHide.gt-xs",""],["","fxHide.gt-sm",""],["","fxHide.gt-md",""],["","fxHide.gt-lg",""]],inputs:{fxShow:"fxShow","fxShow.print":"fxShow.print","fxShow.xs":"fxShow.xs","fxShow.sm":"fxShow.sm","fxShow.md":"fxShow.md","fxShow.lg":"fxShow.lg","fxShow.xl":"fxShow.xl","fxShow.lt-sm":"fxShow.lt-sm","fxShow.lt-md":"fxShow.lt-md","fxShow.lt-lg":"fxShow.lt-lg","fxShow.lt-xl":"fxShow.lt-xl","fxShow.gt-xs":"fxShow.gt-xs","fxShow.gt-sm":"fxShow.gt-sm","fxShow.gt-md":"fxShow.gt-md","fxShow.gt-lg":"fxShow.gt-lg",fxHide:"fxHide","fxHide.print":"fxHide.print","fxHide.xs":"fxHide.xs","fxHide.sm":"fxHide.sm","fxHide.md":"fxHide.md","fxHide.lg":"fxHide.lg","fxHide.xl":"fxHide.xl","fxHide.lt-sm":"fxHide.lt-sm","fxHide.lt-md":"fxHide.lt-md","fxHide.lt-lg":"fxHide.lt-lg","fxHide.lt-xl":"fxHide.lt-xl","fxHide.gt-xs":"fxHide.gt-xs","fxHide.gt-sm":"fxHide.gt-sm","fxHide.gt-md":"fxHide.gt-md","fxHide.gt-lg":"fxHide.gt-lg"},features:[et]})}return t})();Dhe=class{key;value;constructor(e,n,i=!0){this.key=e,this.value=n,this.key=i?e.replace(/['"]/g,"").trim():e.trim(),this.value=i?n.replace(/['"]/g,"").trim():n.trim(),this.value=this.value.replace(/;/,"")}};Dbt=(()=>{class t extends Tv{sanitizer;ngStyleInstance;DIRECTIVE_KEY="ngStyle";fallbackStyles;isServer;constructor(n,i,r,s,o,a,l,c,d){super(n,null,i,r),this.sanitizer=s,this.ngStyleInstance=l,this.ngStyleInstance||(this.ngStyleInstance=new rr(n,o,a)),this.init();let u=this.nativeElement.getAttribute("style")??"";this.fallbackStyles=this.buildStyleMap(u),this.isServer=c&&Z2(d)}updateWithValue(n){let i=this.buildStyleMap(n);this.ngStyleInstance.ngStyle=ve(ve({},this.fallbackStyles),i),this.isServer&&this.applyStyleToElement(i),this.ngStyleInstance.ngDoCheck()}clearStyles(){this.ngStyleInstance.ngStyle=this.fallbackStyles,this.ngStyleInstance.ngDoCheck()}buildStyleMap(n){let i=r=>this.sanitizer.sanitize($2.STYLE,r)??"";if(n)switch(YMe(n)){case"string":return KMe(Sbt(n),i);case"array":return KMe(n,i);case"set":return $Me(n,i);default:return $Me(n,i)}return{}}ngDoCheck(){this.ngStyleInstance.ngDoCheck()}static \u0275fac=function(i){return new(i||t)(R(fi),R(h4),R(Sv),R(Uo),R(KM),R(Ac),R(rr,10),R(q9),R(Fu))};static \u0275dir=mi({type:t,features:[et]})}return t})(),Ebt=["ngStyle","ngStyle.xs","ngStyle.sm","ngStyle.md","ngStyle.lg","ngStyle.xl","ngStyle.lt-sm","ngStyle.lt-md","ngStyle.lt-lg","ngStyle.lt-xl","ngStyle.gt-xs","ngStyle.gt-sm","ngStyle.gt-md","ngStyle.gt-lg"],rs=(()=>{class t extends Dbt{inputs=Ebt;static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275dir=mi({type:t,selectors:[["","ngStyle",""],["","ngStyle.xs",""],["","ngStyle.sm",""],["","ngStyle.md",""],["","ngStyle.lg",""],["","ngStyle.xl",""],["","ngStyle.lt-sm",""],["","ngStyle.lt-md",""],["","ngStyle.lt-lg",""],["","ngStyle.lt-xl",""],["","ngStyle.gt-xs",""],["","ngStyle.gt-sm",""],["","ngStyle.gt-md",""],["","ngStyle.gt-lg",""]],inputs:{ngStyle:"ngStyle","ngStyle.xs":"ngStyle.xs","ngStyle.sm":"ngStyle.sm","ngStyle.md":"ngStyle.md","ngStyle.lg":"ngStyle.lg","ngStyle.xl":"ngStyle.xl","ngStyle.lt-sm":"ngStyle.lt-sm","ngStyle.lt-md":"ngStyle.lt-md","ngStyle.lt-lg":"ngStyle.lt-lg","ngStyle.lt-xl":"ngStyle.lt-xl","ngStyle.gt-xs":"ngStyle.gt-xs","ngStyle.gt-sm":"ngStyle.gt-sm","ngStyle.gt-md":"ngStyle.gt-md","ngStyle.gt-lg":"ngStyle.gt-lg"},features:[et]})}return t})();Dn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=en({type:t});static \u0275inj=Ji({imports:[Tk]})}return t})();});function kbt(){if(k$===void 0&&(k$=null,typeof window<"u")){let t=window;t.trustedTypes!==void 0&&(k$=t.trustedTypes.createPolicy("angular#components",{createHTML:e=>e}))}return k$}function mN(t){return kbt()?.createHTML(t)||t}function XMe(t){return Error(`Unable to find icon with the name "${t}"`)}function Ibt(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function QMe(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function JMe(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}function I$(t){return t.cloneNode(!0)}function eke(t,e){return t+":"+e}function Pbt(t){return!!(t.url&&t.options)}function Lbt(){let t=Ve(Lr),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}var Mbt,k$,F8,Abt,Rbt,Fbt,tke,Obt,Nbt,Zr,A$,Ja=Q(()=>{me();me();bl();ri();$n();Cl();L1();od();Mbt=["*"];F8=class{constructor(e,n,i){this.url=e,this.svgText=n,this.options=i}},Abt=(()=>{let e=class e{constructor(i,r,s,o){this._httpClient=i,this._sanitizer=r,this._errorHandler=o,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=s}addSvgIcon(i,r,s){return this.addSvgIconInNamespace("",i,r,s)}addSvgIconLiteral(i,r,s){return this.addSvgIconLiteralInNamespace("",i,r,s)}addSvgIconInNamespace(i,r,s,o){return this._addSvgIconConfig(i,r,new F8(s,null,o))}addSvgIconResolver(i){return this._resolvers.push(i),this}addSvgIconLiteralInNamespace(i,r,s,o){let a=this._sanitizer.sanitize($2.HTML,s);if(!a)throw JMe(s);let l=mN(a);return this._addSvgIconConfig(i,r,new F8("",l,o))}addSvgIconSet(i,r){return this.addSvgIconSetInNamespace("",i,r)}addSvgIconSetLiteral(i,r){return this.addSvgIconSetLiteralInNamespace("",i,r)}addSvgIconSetInNamespace(i,r,s){return this._addSvgIconSetConfig(i,new F8(r,null,s))}addSvgIconSetLiteralInNamespace(i,r,s){let o=this._sanitizer.sanitize($2.HTML,r);if(!o)throw JMe(r);let a=mN(o);return this._addSvgIconSetConfig(i,new F8("",a,s))}registerFontClassAlias(i,r=i){return this._fontCssClassesByAlias.set(i,r),this}classNameForFontAlias(i){return this._fontCssClassesByAlias.get(i)||i}setDefaultFontSetClass(...i){return this._defaultFontSetClass=i,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(i){let r=this._sanitizer.sanitize($2.RESOURCE_URL,i);if(!r)throw QMe(i);let s=this._cachedIconsByUrl.get(r);return s?Fr(I$(s)):this._loadSvgIconFromConfig(new F8(i,null)).pipe(ac(o=>this._cachedIconsByUrl.set(r,o)),lr(o=>I$(o)))}getNamedSvgIcon(i,r=""){let s=eke(r,i),o=this._svgIconConfigs.get(s);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(r,i),o)return this._svgIconConfigs.set(s,o),this._getSvgFromConfig(o);let a=this._iconSetConfigs.get(r);return a?this._getSvgFromIconSetConfigs(i,a):S9(XMe(s))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(i){return i.svgText?Fr(I$(this._svgElementFromConfig(i))):this._loadSvgIconFromConfig(i).pipe(lr(r=>I$(r)))}_getSvgFromIconSetConfigs(i,r){let s=this._extractIconWithNameFromAnySet(i,r);if(s)return Fr(s);let o=r.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(bb(l=>{let d=`Loading icon set URL: ${this._sanitizer.sanitize($2.RESOURCE_URL,a.url)} failed: ${l.message}`;return this._errorHandler.handleError(new Error(d)),Fr(null)})));return dj(o).pipe(lr(()=>{let a=this._extractIconWithNameFromAnySet(i,r);if(!a)throw XMe(i);return a}))}_extractIconWithNameFromAnySet(i,r){for(let s=r.length-1;s>=0;s--){let o=r[s];if(o.svgText&&o.svgText.toString().indexOf(i)>-1){let a=this._svgElementFromConfig(o),l=this._extractSvgIconFromSet(a,i,o.options);if(l)return l}}return null}_loadSvgIconFromConfig(i){return this._fetchIcon(i).pipe(ac(r=>i.svgText=r),lr(()=>this._svgElementFromConfig(i)))}_loadSvgIconSetFromConfig(i){return i.svgText?Fr(null):this._fetchIcon(i).pipe(ac(r=>i.svgText=r))}_extractSvgIconFromSet(i,r,s){let o=i.querySelector(`[id="${r}"]`);if(!o)return null;let a=o.cloneNode(!0);if(a.removeAttribute("id"),a.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(a,s);if(a.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(a),s);let l=this._svgElementFromString(mN("<svg></svg>"));return l.appendChild(a),this._setSvgAttributes(l,s)}_svgElementFromString(i){let r=this._document.createElement("DIV");r.innerHTML=i;let s=r.querySelector("svg");if(!s)throw Error("<svg> tag not found");return s}_toSvgElement(i){let r=this._svgElementFromString(mN("<svg></svg>")),s=i.attributes;for(let o=0;o<s.length;o++){let{name:a,value:l}=s[o];a!=="id"&&r.setAttribute(a,l)}for(let o=0;o<i.childNodes.length;o++)i.childNodes[o].nodeType===this._document.ELEMENT_NODE&&r.appendChild(i.childNodes[o].cloneNode(!0));return r}_setSvgAttributes(i,r){return i.setAttribute("fit",""),i.setAttribute("height","100%"),i.setAttribute("width","100%"),i.setAttribute("preserveAspectRatio","xMidYMid meet"),i.setAttribute("focusable","false"),r&&r.viewBox&&i.setAttribute("viewBox",r.viewBox),i}_fetchIcon(i){let{url:r,options:s}=i,o=s?.withCredentials??!1;if(!this._httpClient)throw Ibt();if(r==null)throw Error(`Cannot fetch icon from URL "${r}".`);let a=this._sanitizer.sanitize($2.RESOURCE_URL,r);if(!a)throw QMe(r);let l=this._inProgressUrlFetches.get(a);if(l)return l;let c=this._httpClient.get(a,{responseType:"text",withCredentials:o}).pipe(lr(d=>mN(d)),g8(()=>this._inProgressUrlFetches.delete(a)),W2());return this._inProgressUrlFetches.set(a,c),c}_addSvgIconConfig(i,r,s){return this._svgIconConfigs.set(eke(i,r),s),this}_addSvgIconSetConfig(i,r){let s=this._iconSetConfigs.get(i);return s?s.push(r):this._iconSetConfigs.set(i,[r]),this}_svgElementFromConfig(i){if(!i.svgElement){let r=this._svgElementFromString(i.svgText);this._setSvgAttributes(r,i.options),i.svgElement=r}return i.svgElement}_getIconConfigFromResolvers(i,r){for(let s=0;s<this._resolvers.length;s++){let o=this._resolvers[s](r,i);if(o)return Pbt(o)?new F8(o.url,null,o.options):new F8(o,null)}}};e.\u0275fac=function(r){return new(r||e)(it(Uc,8),it(Uo),it(Lr,8),it(v8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();Rbt=new Ri("MAT_ICON_DEFAULT_OPTIONS"),Fbt=new Ri("mat-icon-location",{providedIn:"root",factory:Lbt});tke=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Obt=tke.map(t=>`[${t}]`).join(", "),Nbt=/^url\(['"]?#(.*?)['"]?\)$/,Zr=(()=>{let e=class e{get color(){return this._color||this._defaultColor}set color(i){this._color=i}get svgIcon(){return this._svgIcon}set svgIcon(i){i!==this._svgIcon&&(i?this._updateSvgIcon(i):this._svgIcon&&this._clearSvgElement(),this._svgIcon=i)}get fontSet(){return this._fontSet}set fontSet(i){let r=this._cleanupFontValue(i);r!==this._fontSet&&(this._fontSet=r,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(i){let r=this._cleanupFontValue(i);r!==this._fontIcon&&(this._fontIcon=r,this._updateFontIconClasses())}constructor(i,r,s,o,a,l){this._elementRef=i,this._iconRegistry=r,this._location=o,this._errorHandler=a,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=na.EMPTY,l&&(l.color&&(this.color=this._defaultColor=l.color),l.fontSet&&(this.fontSet=l.fontSet)),s||i.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(i){if(!i)return["",""];let r=i.split(":");switch(r.length){case 1:return["",r[0]];case 2:return r;default:throw Error(`Invalid icon name: "${i}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let i=this._elementsWithExternalReferences;if(i&&i.size){let r=this._location.getPathname();r!==this._previousPath&&(this._previousPath=r,this._prependPathToReferences(r))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(i){this._clearSvgElement();let r=this._location.getPathname();this._previousPath=r,this._cacheChildrenWithExternalReferences(i),this._prependPathToReferences(r),this._elementRef.nativeElement.appendChild(i)}_clearSvgElement(){let i=this._elementRef.nativeElement,r=i.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();r--;){let s=i.childNodes[r];(s.nodeType!==1||s.nodeName.toLowerCase()==="svg")&&s.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let i=this._elementRef.nativeElement,r=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(s=>s.length>0);this._previousFontSetClass.forEach(s=>i.classList.remove(s)),r.forEach(s=>i.classList.add(s)),this._previousFontSetClass=r,this.fontIcon!==this._previousFontIconClass&&!r.includes("mat-ligature-font")&&(this._previousFontIconClass&&i.classList.remove(this._previousFontIconClass),this.fontIcon&&i.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(i){return typeof i=="string"?i.trim().split(" ")[0]:i}_prependPathToReferences(i){let r=this._elementsWithExternalReferences;r&&r.forEach((s,o)=>{s.forEach(a=>{o.setAttribute(a.name,`url('${i}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(i){let r=i.querySelectorAll(Obt),s=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<r.length;o++)tke.forEach(a=>{let l=r[o],c=l.getAttribute(a),d=c?c.match(Nbt):null;if(d){let u=s.get(l);u||(u=[],s.set(l,u)),u.push({name:a,value:d[1]})}})}_updateSvgIcon(i){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),i){let[r,s]=this._splitIconName(i);r&&(this._svgNamespace=r),s&&(this._svgName=s),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(s,r).pipe(ic(1)).subscribe(o=>this._setSvgElement(o),o=>{let a=`Error retrieving icon ${r}:${s}! ${o.message}`;this._errorHandler.handleError(new Error(a))})}}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Abt),wp("aria-hidden"),R(Fbt),R(v8),R(Rbt,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(r,s){r&2&&(Bn("data-mat-icon-type",s._usingFontIcon()?"font":"svg")("data-mat-icon-name",s._svgName||s.fontIcon)("data-mat-icon-namespace",s._svgNamespace||s.fontSet)("fontIcon",s._usingFontIcon()?s.fontIcon:null),jr(s.color?"mat-"+s.color:""),ki("mat-icon-inline",s.inline)("mat-icon-no-color",s.color!=="primary"&&s.color!=="accent"&&s.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",mn],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[Bs,xe],ngContentSelectors:Mbt,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let t=e;return t})(),A$=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,zr]});let t=e;return t})()});var P$,ike=Q(()=>{P$=class{static unsubscribe(e){e&&typeof e.unsubscribe=="function"&&e.unsubscribe()}}});var i2,Vb=Q(()=>{ike();i2=class{constructor(){this.subscriptions=[],this.socketSubscriptions=[]}set pushSubscription(e){this.subscriptions.push(e)}set pushSocketSubscription(e){this.socketSubscriptions.push(e)}onDestroy(){for(let e of this.subscriptions)e.unsubscribe();for(let e of this.socketSubscriptions)e.unsubscribe()}unsubscribe(e){for(let n of e)P$.unsubscribe(n)}}});var xn,jc=Q(()=>{xn=(()=>{let e=class e{constructor(){this.materialColorMapDetailed={}}static getLightOrDarkFontColorByBackground(i,r="#ffffff",s="#000000"){let o=parseInt(i.substring(1,3),16),a=parseInt(i.substring(3,5),16),l=parseInt(i.substring(5,7),16);return(o*299+a*587+l*114)/1e3>=128?s:r}static LightenDarkenColor(i,r){let s=!1;i[0]==="#"&&(i=i.slice(1),s=!0);let o=parseInt(i,16),a=(o>>16)+r;a>255?a=255:a<0&&(a=0);let l=(o>>8&255)+r;l>255?l=255:l<0&&(l=0);let c=(o&255)+r;return c>255?c=255:c<0&&(c=0),(s?"#":"")+(c|l<<8|a<<16).toString(16)}static replaceGoogleCalendarColor(i){switch(i.toUpperCase()){case"#CCA6AC":return"#AD1457";case"#FA573C":return"#F4511E";case"#FBE983":return"#E4C441";case"#16A765":return"#0B8043";case"#4986E7":return"#3F51B5";case"#CD74E6":return"#8E24AA";case"#F691B2":return"#D81B60";case"#FF7537":return"#EF6C00";case"#B3DC6C":return"#C0CA33";case"#42D692":return"#009688";case"#9A9CFF":return"#7986CB";case"#AC725E":return"#795548";case"#F83A22":return"#D50000";case"#FFAD46":return"#F09300";case"#7BD148":return"#7CB342";case"#9FE1E7":return"#039BE5";case"#B99AFF":return"#B39DDB";case"#C2C2C2":return"#616161";case"#D06B64":return"#E67C73";case"#FAD165":return"#F6BF26";case"#92E1C0":return"#33B679";case"#9FC6E7":return"#4285F4";case"#A47AE2":return"#9E69AF";case"#CABDBF":return"#A79B8E"}return i.toUpperCase()}};e.NxtGold="#b8860b",e.NxtGray="#3c3b3f",e.Red="#ff3737",e.RedDark="#792929",e.Green="#2b9100",e.GreenLight="#4bff4b",e.Orange="#ff8321",e.Orange2="#c0641b",e.OrangeDark="#694212",e.Blue="#2876ff",e.GridTextLighter="#939393";let t=e;return t})()});var bt,Gi=Q(()=>{Vb();jc();me();bt=(()=>{let e=class e extends i2{constructor(){super(...arguments),this.colorTools=xn}ngOnDestroy(){super.onDestroy(),this.nxtOnDestroy&&this.nxtOnDestroy()}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275cmp=_e({type:e,selectors:[["ng-component"]],features:[et],decls:0,vars:0,template:function(r,s){},encapsulation:2});let t=e;return t})()});function Tp(t,e){!e?.injector&&VTe(Tp);let n=e?.injector??Ve($o),i=new b9(1),r=qh(()=>{let s;try{s=t()}catch(o){C0(()=>i.error(o));return}C0(()=>i.next(s))},{injector:n,manualCleanup:!0});return n.get(BTe).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var W_=Q(()=>{me();$n();});var Z9,fN=Q(()=>{me();$n();me();Z9=(()=>{let e=class e{constructor(){this.isMobile=gt(!1),this.state=new qs({isPortrait:!1,isMobile:!1}),this.calc()}calc(){let i=!1,r=!1;window.innerWidth<window.innerHeight&&(i=!0),window.innerWidth<768&&(r=!0),(this.state.value.isMobile!==r||this.state.value.isPortrait!==i)&&(this.state.next({isPortrait:i,isMobile:r}),this.isMobile.set(r))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function Gbt(t,e){if(t&1&&(h(0,"mat-icon",2),y(1),p()),t&2){let n=w();g(),ye(n.iconLeft)}}function Wbt(t,e){if(t&1&&(h(0,"mat-icon",3),y(1),p()),t&2){let n=w();g(),ye(n.iconRight)}}var Vbt,Bbt,zbt,Hbt,Lt,Zi=Q(()=>{me();P8();An();ri();Ja();Gi();W_();me();fN();An();Vbt=["button"],Bbt=["*"],zbt=t=>({opacity:t}),Hbt=(t,e,n,i)=>({fontSize:t,height:e,padding:n,borderRadius:i});Lt=(()=>{let e=class e extends bt{constructor(i,r){super(),this.cdRef=i,this.screenService=r,this.smallButton=br(!1),this.bigButton=br(!1),this.disabled=br(!1),this.showSmallButton=vr(()=>this.smallButton()||this.screenService.isMobile()),this.useMinWidth=!1,this.noBorder=!1,this.nxtHTML="",this.iconLeft="",this.iconRight="",this.fontSize="14px",this.height="fit-content",this.padding="4px 10px",this.borderRadius="4px",this.noWrap=!0,this.color="#A2A2A2",this.opacity=1,this.pointerEvents="auto",this.type="NormalButton",qh(()=>{this.showSmallButton(),this.checkSmallButton()}),this.pushSubscription=Tp(this.bigButton).subscribe(()=>{this.bigButton()&&(this.fontSize="1.3rem",this.padding="8px 12px",this.borderRadius="10px",this.cdRef.detectChanges())}),this.pushSubscription=Tp(this.disabled).subscribe(()=>{this.pointerEvents=this.disabled()?"none":"auto",this.cdRef.detectChanges()})}ngOnInit(){}ngAfterViewInit(){this.button&&(this.button._elementRef.nativeElement.onfocus=i=>{i.target.blur()})}clicked(i){this.disabled()&&(i.stopPropagation(),i.preventDefault())}focus(){this.buttonElement.focus()}checkSmallButton(){this.showSmallButton()?(this.fontSize="12px",this.padding="4px 8px",this.borderRadius="4px"):(this.fontSize="14px",this.height="fit-content",this.padding="4px 10px",this.borderRadius="4px")}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(Z9))},e.\u0275cmp=_e({type:e,selectors:[["nxt-button"]],viewQuery:function(r,s){if(r&1&&(ei(G_,7),ei(Vbt,5)),r&2){let o;Pt(o=Rt())&&(s.button=o.first),Pt(o=Rt())&&(s.buttonElement=o.first)}},hostVars:2,hostBindings:function(r,s){r&2&&mo("pointer-events",s.pointerEvents)},inputs:{smallButton:[1,"smallButton"],bigButton:[1,"bigButton"],disabled:[1,"disabled"],useMinWidth:"useMinWidth",noBorder:"noBorder",nxtHTML:"nxtHTML",iconLeft:"iconLeft",iconRight:"iconRight",height:"height",padding:"padding",borderRadius:"borderRadius",noWrap:"noWrap",color:"color"},standalone:!0,features:[et,xe],ngContentSelectors:Bbt,decls:6,vars:21,consts:[["button",""],["mat-raised-button","",3,"click","ngStyle","disabled"],[1,"!mr-1"],[1,"!ml-1","!mr-0",2,"order","1"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"button",1,0),Ce(2,"async"),F("click",function(l){return V(o),B(s.clicked(l))}),W(3,Gbt,2,1,"mat-icon",2),Ln(4),W(5,Wbt,2,1,"mat-icon",3),p()}r&2&&(gj(sn(14,zbt,s.disabled()?.2:1)),ki("button-small",s.smallButton()||tt(2,12,s.screenService.state).isMobile)("no-wrap",s.noWrap)("no-border",s.noBorder),b("ngStyle",Sb(16,Hbt,s.fontSize,s.height,s.padding,s.borderRadius))("disabled",s.disabled()),g(3),Je(s.iconLeft?3:-1),g(2),Je(s.iconRight?5:-1))},dependencies:[G_,Dn,rs,Zr,Xu],styles:["[_nghost-%COMP%]{width:fit-content;height:fit-content}[_nghost-%COMP%]     .mat-mdc-button-touch-target{height:100%!important;width:100%!important}[_nghost-%COMP%]     .no-border{border:none!important}button[_ngcontent-%COMP%]:hover{border:1px solid #b7860f}button[_ngcontent-%COMP%]{touch-action:manipulation;background-color:transparent!important;min-width:inherit;width:inherit;text-transform:uppercase;color:var(--nxt-button-text-color)!important;border:1px solid #7a7a7a;font-size:inherit;font-weight:400!important;height:inherit!important;line-height:1.5!important}button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#bbb}button[_ngcontent-%COMP%]:not(.button-small){min-width:90px}.button-small[_ngcontent-%COMP%]{margin:0!important}"],changeDetection:0});let t=e;return t})()});function Ubt(t,e){if(t&1&&(h(0,"mat-icon",7),y(1),p()),t&2){let n=w(2);g(),ye(n.icon)}}function jbt(t,e){if(t&1){let n=re();h(0,"nxt-button",8),F("click",function(){V(n);let r=w(2);return B(r.close())}),ee(1,"div",9),Ce(2,"safeHtml"),p()}if(t&2){let n=w(2);b("disabled",n.okButtonDisabled),g(),b("innerHTML",tt(2,2,n.buttonText()),Pi)}}function $bt(t,e){if(t&1&&(h(0,"div",1)(1,"div"),W(2,Ubt,2,1,"mat-icon",2),ee(3,"div",3),Ce(4,"safeHtml"),p(),ee(5,"div",4),Ce(6,"safeHtml"),h(7,"div",5),W(8,jbt,3,4,"nxt-button",6),p()()),t&2){let n=w();g(2),b("ngIf",n.icon),g(),b("innerHTML",tt(4,4,n.titleText),Pi),g(2),b("innerHTML",tt(6,6,n.message()),Pi),g(3),b("ngIf",n.buttonText())}}var Mhe,nke=Q(()=>{me();ji();ha();Zi();Ja();ri();me();ji();Mhe=(()=>{let e=class e{constructor(i,r){this.dialogRef=i,this.data=r,this.message=gt(""),this.buttonText=gt(""),this.okButtonDisabled=!1,setTimeout(()=>this.load())}ngOnInit(){}load(){this.titleText=this.data.titleText,this.data.buttonText&&this.buttonText.set(this.data.buttonText.replace(/\n/g,"<br/>")),this.data.icon&&(this.icon=this.data.icon),this.data.showOkButtonTimeoutSeconds>-1&&(this.okButtonDisabled=!0,setTimeout(()=>this.okButtonDisabled=!1,this.data.showOkButtonTimeoutSeconds*1e3))}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Ou))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-ok"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","nxt-dialog-content",4,"ngIf"],[1,"nxt-dialog-content"],["aria-hidden","false",4,"ngIf"],[1,"titleText",3,"innerHTML"],[2,"margin-bottom","20px","margin-top","10px",3,"innerHTML"],[2,"justify-content","space-around","display","flex","padding","1px"],["style","margin: auto;",3,"disabled","click",4,"ngIf"],["aria-hidden","false"],[2,"margin","auto",3,"click","disabled"],[2,"min-width","50px",3,"innerHTML"]],template:function(r,s){r&1&&W(0,$bt,9,8,"div",0),r&2&&b("ngIf",s.message)},dependencies:[Ct,Zr,Lt,Or],styles:[".titleText[_ngcontent-%COMP%]{font-size:24px;justify-content:center;display:flex}"],changeDetection:0});let t=e;return t})()});function Xbt(t,e){if(t&1&&(h(0,"div",7)(1,"div",8),y(2),p()()),t&2){let n=w();g(),b("ngStyle",bs(2,rke,n.data.textAlign,n.data.fontSize)),g(),ye(n.data.title)}}var Kbt,Ybt,qbt,rke,Zbt,ske,oke=Q(()=>{Zi();ji();ha();An();ri();me();ji();An();Kbt=["yesButton"],Ybt=["noButton"],qbt=t=>({"more-button-padding":t}),rke=(t,e)=>({textAlign:t,fontSize:e}),Zbt=t=>({fontSize:t});ske=(()=>{let e=class e{constructor(i,r){this.dialogRef=i,this.data=r,this.buttonPadding="8px",r.message=r.message.replace(/\n/g,"<br/>"),r.title&&(r.title=r.title.replace(/\n/g,"<br/>")),r.textAlign||(r.textAlign="left"),r.fontSize?this.buttonPadding="30px":r.fontSize="100%"}yes(){this.dialogRef.close(!0)}no(){this.dialogRef.close(!1)}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Ou))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-yesno"]],viewQuery:function(r,s){if(r&1&&(ei(Kbt,7),ei(Ybt,7)),r&2){let o;Pt(o=Rt())&&(s.yesButton=o.first),Pt(o=Rt())&&(s.noButton=o.first)}},standalone:!0,features:[xe],decls:11,vars:21,consts:[[1,"wrapper",3,"ngClass"],["style","font-size: 22px",4,"ngIf"],[2,"margin-bottom","24px","margin-top","10px",3,"ngStyle","innerHTML"],[1,"flex","flex-row","justify-around","gap-3",3,"ngStyle"],[3,"click","useMinWidth"],[3,"innerHTML"],[3,"click"],[2,"font-size","22px"],[1,"title-text",3,"ngStyle"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,Xbt,3,5,"div",1),ee(2,"div",2),Ce(3,"safeHtml"),h(4,"div",3)(5,"nxt-button",4),F("click",function(){return s.no()}),ee(6,"div",5),Ce(7,"safeHtml"),p(),h(8,"nxt-button",6),F("click",function(){return s.yes()}),ee(9,"div",5),Ce(10,"safeHtml"),p()()()),r&2&&(b("ngClass",sn(14,qbt,s.data.fontSize!=="100%")),g(),b("ngIf",s.data.title),g(),b("ngStyle",bs(16,rke,s.data.textAlign,s.data.fontSize))("innerHTML",tt(3,8,s.data.message),Pi),g(2),b("ngStyle",sn(19,Zbt,s.data.fontSize)),g(),b("useMinWidth",!0),g(),b("innerHTML",tt(7,10,s.data.noText?s.data.noText.toUpperCase():"NEIN"),Pi),g(3),b("innerHTML",tt(10,12,s.data.yesText?s.data.yesText.toUpperCase():"JA"),Pi))},dependencies:[_s,Dn,No,rs,Ct,rr,Lt,Or],styles:["[_nghost-%COMP%]  .more-button-padding button{padding:32px!important;margin:10px!important}nxt-button[_ngcontent-%COMP%]{padding-top:15px}.wrapper[_ngcontent-%COMP%]{padding:5px 15px 0;max-width:80vw}.title-text[_ngcontent-%COMP%]{font-size:24px;padding:12px 0}"]});let t=e;return t})()});var Qu,sg=Q(()=>{me();me();Qu=(()=>{let e=class e{constructor(i){this.element=i,this.nxtMultiClick=2,this.nxtMultiTimeout=1500,this.nxtOnMultiClick=new nt,this.currentClickCounter=0}ngOnInit(){this.element.nativeElement.classList.add("none-selection")}ngOnDestroy(){}onMouseUp(i){}onMouseOut(i){}onMouseDown(i){this.currentClickCounter++,this.currentClickCounter===this.nxtMultiClick&&this.nxtOnMultiClick.emit(i),setTimeout(()=>{this.currentClickCounter=0},this.nxtMultiTimeout)}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","nxtMultiClick",""]],hostBindings:function(r,s){r&1&&F("mouseup",function(a){return s.onMouseUp(a)})("mouseout",function(a){return s.onMouseOut(a)})("mousedown",function(a){return s.onMouseDown(a)})},inputs:{nxtMultiClick:"nxtMultiClick",nxtMultiTimeout:"nxtMultiTimeout"},outputs:{nxtOnMultiClick:"nxtOnMultiClick"},standalone:!0});let t=e;return t})()});var lke=xr((ake,khe)=>{(function(t,e,n){function i(a){var l=this,c=o();l.next=function(){var d=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=d-(l.c=d|0)},l.c=1,l.s0=c(" "),l.s1=c(" "),l.s2=c(" "),l.s0-=c(a),l.s0<0&&(l.s0+=1),l.s1-=c(a),l.s1<0&&(l.s1+=1),l.s2-=c(a),l.s2<0&&(l.s2+=1),c=null}function r(a,l){return l.c=a.c,l.s0=a.s0,l.s1=a.s1,l.s2=a.s2,l}function s(a,l){var c=new i(a),d=l&&l.state,u=c.next;return u.int32=function(){return c.next()*4294967296|0},u.double=function(){return u()+(u()*2097152|0)*11102230246251565e-32},u.quick=u,d&&(typeof d=="object"&&r(d,c),u.state=function(){return r(c,{})}),u}function o(){var a=4022871197,l=function(c){c=String(c);for(var d=0;d<c.length;d++){a+=c.charCodeAt(d);var u=.02519603282416938*a;a=u>>>0,u-=a,u*=a,a=u>>>0,u-=a,a+=u*4294967296}return(a>>>0)*23283064365386963e-26};return l}e&&e.exports?e.exports=s:n&&n.amd?n(function(){return s}):this.alea=s})(ake,typeof khe=="object"&&khe,typeof define=="function"&&define)});var dke=xr((cke,Ihe)=>{(function(t,e,n){function i(o){var a=this,l="";a.x=0,a.y=0,a.z=0,a.w=0,a.next=function(){var d=a.x^a.x<<11;return a.x=a.y,a.y=a.z,a.z=a.w,a.w^=a.w>>>19^d^d>>>8},o===(o|0)?a.x=o:l+=o;for(var c=0;c<l.length+64;c++)a.x^=l.charCodeAt(c)|0,a.next()}function r(o,a){return a.x=o.x,a.y=o.y,a.z=o.z,a.w=o.w,a}function s(o,a){var l=new i(o),c=a&&a.state,d=function(){return(l.next()>>>0)/4294967296};return d.double=function(){do var u=l.next()>>>11,m=(l.next()>>>0)/4294967296,f=(u+m)/(1<<21);while(f===0);return f},d.int32=l.next,d.quick=d,c&&(typeof c=="object"&&r(c,l),d.state=function(){return r(l,{})}),d}e&&e.exports?e.exports=s:n&&n.amd?n(function(){return s}):this.xor128=s})(cke,typeof Ihe=="object"&&Ihe,typeof define=="function"&&define)});var hke=xr((uke,Ahe)=>{(function(t,e,n){function i(o){var a=this,l="";a.next=function(){var d=a.x^a.x>>>2;return a.x=a.y,a.y=a.z,a.z=a.w,a.w=a.v,(a.d=a.d+362437|0)+(a.v=a.v^a.v<<4^(d^d<<1))|0},a.x=0,a.y=0,a.z=0,a.w=0,a.v=0,o===(o|0)?a.x=o:l+=o;for(var c=0;c<l.length+64;c++)a.x^=l.charCodeAt(c)|0,c==l.length&&(a.d=a.x<<10^a.x>>>4),a.next()}function r(o,a){return a.x=o.x,a.y=o.y,a.z=o.z,a.w=o.w,a.v=o.v,a.d=o.d,a}function s(o,a){var l=new i(o),c=a&&a.state,d=function(){return(l.next()>>>0)/4294967296};return d.double=function(){do var u=l.next()>>>11,m=(l.next()>>>0)/4294967296,f=(u+m)/(1<<21);while(f===0);return f},d.int32=l.next,d.quick=d,c&&(typeof c=="object"&&r(c,l),d.state=function(){return r(l,{})}),d}e&&e.exports?e.exports=s:n&&n.amd?n(function(){return s}):this.xorwow=s})(uke,typeof Ahe=="object"&&Ahe,typeof define=="function"&&define)});var mke=xr((pke,Phe)=>{(function(t,e,n){function i(o){var a=this;a.next=function(){var c=a.x,d=a.i,u,m,f;return u=c[d],u^=u>>>7,m=u^u<<24,u=c[d+1&7],m^=u^u>>>10,u=c[d+3&7],m^=u^u>>>3,u=c[d+4&7],m^=u^u<<7,u=c[d+7&7],u=u^u<<13,m^=u^u<<9,c[d]=m,a.i=d+1&7,m};function l(c,d){var u,m,f=[];if(d===(d|0))m=f[0]=d;else for(d=""+d,u=0;u<d.length;++u)f[u&7]=f[u&7]<<15^d.charCodeAt(u)+f[u+1&7]<<13;for(;f.length<8;)f.push(0);for(u=0;u<8&&f[u]===0;++u);for(u==8?m=f[7]=-1:m=f[u],c.x=f,c.i=0,u=256;u>0;--u)c.next()}l(a,o)}function r(o,a){return a.x=o.x.slice(),a.i=o.i,a}function s(o,a){o==null&&(o=+new Date);var l=new i(o),c=a&&a.state,d=function(){return(l.next()>>>0)/4294967296};return d.double=function(){do var u=l.next()>>>11,m=(l.next()>>>0)/4294967296,f=(u+m)/(1<<21);while(f===0);return f},d.int32=l.next,d.quick=d,c&&(c.x&&r(c,l),d.state=function(){return r(l,{})}),d}e&&e.exports?e.exports=s:n&&n.amd?n(function(){return s}):this.xorshift7=s})(pke,typeof Phe=="object"&&Phe,typeof define=="function"&&define)});var gke=xr((fke,Rhe)=>{(function(t,e,n){function i(o){var a=this;a.next=function(){var c=a.w,d=a.X,u=a.i,m,f;return a.w=c=c+1640531527|0,f=d[u+34&127],m=d[u=u+1&127],f^=f<<13,m^=m<<17,f^=f>>>15,m^=m>>>12,f=d[u]=f^m,a.i=u,f+(c^c>>>16)|0};function l(c,d){var u,m,f,_,x,D=[],E=128;for(d===(d|0)?(m=d,d=null):(d=d+"\0",m=0,E=Math.max(E,d.length)),f=0,_=-32;_<E;++_)d&&(m^=d.charCodeAt((_+32)%d.length)),_===0&&(x=m),m^=m<<10,m^=m>>>15,m^=m<<4,m^=m>>>13,_>=0&&(x=x+1640531527|0,u=D[_&127]^=m+x,f=u==0?f+1:0);for(f>=128&&(D[(d&&d.length||0)&127]=-1),f=127,_=4*128;_>0;--_)m=D[f+34&127],u=D[f=f+1&127],m^=m<<13,u^=u<<17,m^=m>>>15,u^=u>>>12,D[f]=m^u;c.w=x,c.X=D,c.i=f}l(a,o)}function r(o,a){return a.i=o.i,a.w=o.w,a.X=o.X.slice(),a}function s(o,a){o==null&&(o=+new Date);var l=new i(o),c=a&&a.state,d=function(){return(l.next()>>>0)/4294967296};return d.double=function(){do var u=l.next()>>>11,m=(l.next()>>>0)/4294967296,f=(u+m)/(1<<21);while(f===0);return f},d.int32=l.next,d.quick=d,c&&(c.X&&r(c,l),d.state=function(){return r(l,{})}),d}e&&e.exports?e.exports=s:n&&n.amd?n(function(){return s}):this.xor4096=s})(fke,typeof Rhe=="object"&&Rhe,typeof define=="function"&&define)});var yke=xr((vke,Fhe)=>{(function(t,e,n){function i(o){var a=this,l="";a.next=function(){var d=a.b,u=a.c,m=a.d,f=a.a;return d=d<<25^d>>>7^u,u=u-m|0,m=m<<24^m>>>8^f,f=f-d|0,a.b=d=d<<20^d>>>12^u,a.c=u=u-m|0,a.d=m<<16^u>>>16^f,a.a=f-d|0},a.a=0,a.b=0,a.c=-1640531527,a.d=1367130551,o===Math.floor(o)?(a.a=o/4294967296|0,a.b=o|0):l+=o;for(var c=0;c<l.length+20;c++)a.b^=l.charCodeAt(c)|0,a.next()}function r(o,a){return a.a=o.a,a.b=o.b,a.c=o.c,a.d=o.d,a}function s(o,a){var l=new i(o),c=a&&a.state,d=function(){return(l.next()>>>0)/4294967296};return d.double=function(){do var u=l.next()>>>11,m=(l.next()>>>0)/4294967296,f=(u+m)/(1<<21);while(f===0);return f},d.int32=l.next,d.quick=d,c&&(typeof c=="object"&&r(c,l),d.state=function(){return r(l,{})}),d}e&&e.exports?e.exports=s:n&&n.amd?n(function(){return s}):this.tychei=s})(vke,typeof Fhe=="object"&&Fhe,typeof define=="function"&&define)});var _ke=xr(()=>{});var xke=xr((Cke,R$)=>{(function(t,e,n){var i=256,r=6,s=52,o="random",a=n.pow(i,r),l=n.pow(2,s),c=l*2,d=i-1,u;function m(I,z,G){var A=[];z=z==!0?{entropy:!0}:z||{};var Y=D(x(z.entropy?[I,M(e)]:I??E(),3),A),X=new f(A),ne=function(){for(var pe=X.g(r),ce=a,ie=0;pe<l;)pe=(pe+ie)*i,ce*=i,ie=X.g(1);for(;pe>=c;)pe/=2,ce/=2,ie>>>=1;return(pe+ie)/ce};return ne.int32=function(){return X.g(4)|0},ne.quick=function(){return X.g(4)/4294967296},ne.double=ne,D(M(X.S),e),(z.pass||G||function(pe,ce,ie,le){return le&&(le.S&&_(le,X),pe.state=function(){return _(X,{})}),ie?(n[o]=pe,ce):pe})(ne,Y,"global"in z?z.global:this==n,z.state)}function f(I){var z,G=I.length,A=this,Y=0,X=A.i=A.j=0,ne=A.S=[];for(G||(I=[G++]);Y<i;)ne[Y]=Y++;for(Y=0;Y<i;Y++)ne[Y]=ne[X=d&X+I[Y%G]+(z=ne[Y])],ne[X]=z;(A.g=function(pe){for(var ce,ie=0,le=A.i,Se=A.j,je=A.S;pe--;)ce=je[le=d&le+1],ie=ie*i+je[d&(je[le]=je[Se=d&Se+ce])+(je[Se]=ce)];return A.i=le,A.j=Se,ie})(i)}function _(I,z){return z.i=I.i,z.j=I.j,z.S=I.S.slice(),z}function x(I,z){var G=[],A=typeof I,Y;if(z&&A=="object")for(Y in I)try{G.push(x(I[Y],z-1))}catch{}return G.length?G:A=="string"?I:I+"\0"}function D(I,z){for(var G=I+"",A,Y=0;Y<G.length;)z[d&Y]=d&(A^=z[d&Y]*19)+G.charCodeAt(Y++);return M(z)}function E(){try{var I;return u&&(I=u.randomBytes)?I=I(i):(I=new Uint8Array(i),(t.crypto||t.msCrypto).getRandomValues(I)),M(I)}catch{var z=t.navigator,G=z&&z.plugins;return[+new Date,t,G,t.screen,M(e)]}}function M(I){return String.fromCharCode.apply(0,I)}if(D(n.random(),e),typeof R$=="object"&&R$.exports){R$.exports=m;try{u=_ke()}catch{}}else typeof define=="function"&&define.amd?define(function(){return m}):n["seed"+o]=m})(typeof self<"u"?self:Cke,[],Math)});var wke=xr((pan,bke)=>{var Qbt=lke(),Jbt=dke(),e7t=hke(),t7t=mke(),i7t=gke(),n7t=yke(),X9=xke();X9.alea=Qbt;X9.xor128=Jbt;X9.xorwow=e7t;X9.xorshift7=t7t;X9.xor4096=i7t;X9.tychei=n7t;bke.exports=X9});var Ske,fn,kl=Q(()=>{Ske=Gs(wke()),fn=class t{static test(){let e=t.randomFromBasedOn("51.2ax",3,4);console.log(e);let n=t.randomFromBasedOn("1.2",2,15);console.log(n);let i=t.randomFromBasedOn("51.2ax",1,2);console.log(i);let r=t.randomFromBasedOn("51.2abcx",3,4);console.log(r);let s=2e3*Math.log(1),o=2e3*Math.log(.5);console.log(s),console.log(s),console.log(o),console.log(o)}static randomFromBasedOn(e,n,i){let r=i-n,o=Ske.default(e).double()*r+n;return Math.round(o)}static random(e,n,i=!0,r=!0){i||e++,r||n--;let s=n-e+1,o=(Math.random()*s+e).toString();return parseInt(o,10)}static getRandomFromArray(e){return e[t.random(0,e.length-1)]}static getPercentage(e,n,i=0){return this.round(e/n*100)}static round(e,n=0){let i=10**n;return Math.round(e*i)/i}static roundMoney(e){return t.round(e,2)}static roundTo(e,n,i=!0){return i?e-e%n+10:e-e%n}};Object.defineProperty(Number.prototype,"roundMoney",{configurable:!0,writable:!0,value(){return fn.roundMoney(this)}});Object.defineProperty(Number.prototype,"round",{configurable:!0,writable:!0,value(t=0){return fn.round(this,t)}})});var Tke,Dke=Q(()=>{me();Gi();me();Tke=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-loading-cube"]],standalone:!0,features:[et,xe],decls:112,vars:0,consts:[[1,"container"],[1,"h1Container"],[1,"cube","h1","w1","l1"],[1,"face","top"],[1,"face","left"],[1,"face","right"],[1,"cube","h1","w1","l2"],[1,"cube","h1","w1","l3"],[1,"cube","h1","w2","l1"],[1,"cube","h1","w2","l2"],[1,"cube","h1","w2","l3"],[1,"cube","h1","w3","l1"],[1,"cube","h1","w3","l2"],[1,"cube","h1","w3","l3"],[1,"h2Container"],[1,"cube","h2","w1","l1"],[1,"cube","h2","w1","l2"],[1,"cube","h2","w1","l3"],[1,"cube","h2","w2","l1"],[1,"cube","h2","w2","l2"],[1,"cube","h2","w2","l3"],[1,"cube","h2","w3","l1"],[1,"cube","h2","w3","l2"],[1,"cube","h2","w3","l3"],[1,"h3Container"],[1,"cube","h3","w1","l1"],[1,"cube","h3","w1","l2"],[1,"cube","h3","w1","l3"],[1,"cube","h3","w2","l1"],[1,"cube","h3","w2","l2"],[1,"cube","h3","w2","l3"],[1,"cube","h3","w3","l1"],[1,"cube","h3","w3","l2"],[1,"cube","h3","w3","l3"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),ee(3,"div",3)(4,"div",4)(5,"div",5),p(),h(6,"div",6),ee(7,"div",3)(8,"div",4)(9,"div",5),p(),h(10,"div",7),ee(11,"div",3)(12,"div",4)(13,"div",5),p(),h(14,"div",8),ee(15,"div",3)(16,"div",4)(17,"div",5),p(),h(18,"div",9),ee(19,"div",3)(20,"div",4)(21,"div",5),p(),h(22,"div",10),ee(23,"div",3)(24,"div",4)(25,"div",5),p(),h(26,"div",11),ee(27,"div",3)(28,"div",4)(29,"div",5),p(),h(30,"div",12),ee(31,"div",3)(32,"div",4)(33,"div",5),p(),h(34,"div",13),ee(35,"div",3)(36,"div",4)(37,"div",5),p()(),h(38,"div",14)(39,"div",15),ee(40,"div",3)(41,"div",4)(42,"div",5),p(),h(43,"div",16),ee(44,"div",3)(45,"div",4)(46,"div",5),p(),h(47,"div",17),ee(48,"div",3)(49,"div",4)(50,"div",5),p(),h(51,"div",18),ee(52,"div",3)(53,"div",4)(54,"div",5),p(),h(55,"div",19),ee(56,"div",3)(57,"div",4)(58,"div",5),p(),h(59,"div",20),ee(60,"div",3)(61,"div",4)(62,"div",5),p(),h(63,"div",21),ee(64,"div",3)(65,"div",4)(66,"div",5),p(),h(67,"div",22),ee(68,"div",3)(69,"div",4)(70,"div",5),p(),h(71,"div",23),ee(72,"div",3)(73,"div",4)(74,"div",5),p()(),h(75,"div",24)(76,"div",25),ee(77,"div",3)(78,"div",4)(79,"div",5),p(),h(80,"div",26),ee(81,"div",3)(82,"div",4)(83,"div",5),p(),h(84,"div",27),ee(85,"div",3)(86,"div",4)(87,"div",5),p(),h(88,"div",28),ee(89,"div",3)(90,"div",4)(91,"div",5),p(),h(92,"div",29),ee(93,"div",3)(94,"div",4)(95,"div",5),p(),h(96,"div",30),ee(97,"div",3)(98,"div",4)(99,"div",5),p(),h(100,"div",31),ee(101,"div",3)(102,"div",4)(103,"div",5),p(),h(104,"div",32),ee(105,"div",3)(106,"div",4)(107,"div",5),p(),h(108,"div",33),ee(109,"div",3)(110,"div",4)(111,"div",5),p()()())},styles:["[_nghost-%COMP%]{padding:70px}.container[_ngcontent-%COMP%]{position:relative;height:100px;width:86px;transform:scale(.5)}.cube[_ngcontent-%COMP%]{position:absolute;width:86px;height:100px}.right[_ngcontent-%COMP%]{background:#333;transform:rotate(-30deg) skew(-30deg) translate(49px,65px) scaleY(.86)}.left[_ngcontent-%COMP%]{background:#3e3e3e;transform:rotate(90deg) skew(-30deg) scaleY(.86) translate(25px,-50px)}.top[_ngcontent-%COMP%]{background:#5a5a5a;transform:rotate(210deg) skew(-30deg) translate(-75px,-22px) scaleY(.86);z-index:2}.face[_ngcontent-%COMP%]{height:50px;width:50px;position:absolute;transform-origin:0 0}.h1.w1.l1[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w1l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w1l1{0%{transform:translateY(-100%)}14%{transform:translate(-50%,-125%)}28%{transform:translateY(-150%)}43%{transform:translateY(-200%)}57%{transform:translate(50%,-175%)}71%{transform:translateY(-150%)}85%{transform:translateY(-100%)}to{transform:translateY(-100%)}}.h1.w1.l2[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w1l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w1l2{0%{transform:translate(50%,-75%)}14%{transform:translate(50%,-75%)}28%{transform:translate(100%,-100%)}43%{transform:translate(100%,-150%)}57%{transform:translate(100%,-150%)}71%{transform:translate(50%,-125%)}85%{transform:translate(50%,-75%)}to{transform:translate(50%,-75%)}}.h1.w1.l3[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w1l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w1l3{0%{transform:translate(100%,-50%)}14%{transform:translate(150%,-25%)}28%{transform:translate(200%,-50%)}43%{transform:translate(200%,-100%)}57%{transform:translate(150%,-125%)}71%{transform:translate(100%,-100%)}85%{transform:translate(100%,-50%)}to{transform:translate(100%,-50%)}}.h1.w2.l1[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w2l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w2l1{0%{transform:translate(-50%,-75%)}14%{transform:translate(-100%,-100%)}28%{transform:translate(-100%,-100%)}43%{transform:translate(-100%,-150%)}57%{transform:translate(-50%,-125%)}71%{transform:translate(-50%,-125%)}85%{transform:translate(-50%,-75%)}to{transform:translate(-50%,-75%)}}.h1.w2.l2[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w2l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w2l2{0%{transform:translateY(-50%)}14%{transform:translateY(-50%)}28%{transform:translateY(-50%)}43%{transform:translateY(-100%)}57%{transform:translateY(-100%)}71%{transform:translateY(-100%)}85%{transform:translateY(-50%)}to{transform:translateY(-50%)}}.h1.w2.l3[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w2l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w2l3{0%{transform:translate(50%,-25%)}14%{transform:translate(100%)}28%{transform:translate(100%)}43%{transform:translate(100%,-50%)}57%{transform:translate(50%,-75%)}71%{transform:translate(50%,-75%)}85%{transform:translate(50%,-25%)}to{transform:translate(50%,-25%)}}.h1.w3.l1[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w3l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w3l1{0%{transform:translate(-100%,-50%)}14%{transform:translate(-150%,-75%)}28%{transform:translate(-200%,-50%)}43%{transform:translate(-200%,-100%)}57%{transform:translate(-150%,-75%)}71%{transform:translate(-100%,-100%)}85%{transform:translate(-100%,-50%)}to{transform:translate(-100%,-50%)}}.h1.w3.l2[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w3l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w3l2{0%{transform:translate(-50%,-25%)}14%{transform:translate(-50%,-25%)}28%{transform:translate(-100%)}43%{transform:translate(-100%,-50%)}57%{transform:translate(-100%,-50%)}71%{transform:translate(-50%,-75%)}85%{transform:translate(-50%,-25%)}to{transform:translate(-50%,-25%)}}.h1.w3.l3[_ngcontent-%COMP%]{z-index:-1;animation-name:_ngcontent-%COMP%_h1w3l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h1w3l3{0%{transform:translate(0)}14%{transform:translate(50%,25%)}28%{transform:translateY(50%)}43%{transform:translate(0)}57%{transform:translate(-50%,-25%)}71%{transform:translateY(-50%)}85%{transform:translate(0)}to{transform:translate(0)}}.h2.w1.l1[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w1l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w1l1{0%{transform:translateY(-50%)}14%{transform:translate(-50%,-75%)}28%{transform:translateY(-100%)}43%{transform:translateY(-100%)}57%{transform:translate(50%,-75%)}71%{transform:translateY(-50%)}85%{transform:translateY(-50%)}to{transform:translateY(-50%)}}.h2.w1.l2[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w1l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w1l2{0%{transform:translate(50%,-25%)}14%{transform:translate(50%,-25%)}28%{transform:translate(100%,-50%)}43%{transform:translate(100%,-50%)}57%{transform:translate(100%,-50%)}71%{transform:translate(50%,-25%)}85%{transform:translate(50%,-25%)}to{transform:translate(50%,-25%)}}.h2.w1.l3[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w1l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w1l3{0%{transform:translate(100%)}14%{transform:translate(150%,25%)}28%{transform:translate(200%)}43%{transform:translate(200%)}57%{transform:translate(150%,-25%)}71%{transform:translate(100%)}85%{transform:translate(100%)}to{transform:translate(100%)}}.h2.w2.l1[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w2l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w2l1{0%{transform:translate(-50%,-25%)}14%{transform:translate(-100%,-50%)}28%{transform:translate(-100%,-50%)}43%{transform:translate(-100%,-50%)}57%{transform:translate(-50%,-25%)}71%{transform:translate(-50%,-25%)}85%{transform:translate(-50%,-25%)}to{transform:translate(-50%,-25%)}}.h2.w2.l2[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w2l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w2l2{0%{transform:translate(0)}14%{transform:translate(0)}28%{transform:translate(0)}43%{transform:translate(0)}57%{transform:translate(0)}71%{transform:translate(0)}85%{transform:translate(0)}to{transform:translate(0)}}.h2.w2.l3[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w2l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w2l3{0%{transform:translate(50%,25%)}14%{transform:translate(100%,50%)}28%{transform:translate(100%,50%)}43%{transform:translate(100%,50%)}57%{transform:translate(50%,25%)}71%{transform:translate(50%,25%)}85%{transform:translate(50%,25%)}to{transform:translate(50%,25%)}}.h2.w3.l1[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w3l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w3l1{0%{transform:translate(-100%)}14%{transform:translate(-150%,-25%)}28%{transform:translate(-200%)}43%{transform:translate(-200%)}57%{transform:translate(-150%,25%)}71%{transform:translate(-100%)}85%{transform:translate(-100%)}to{transform:translate(-100%)}}.h2.w3.l2[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w3l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w3l2{0%{transform:translate(-50%,25%)}14%{transform:translate(-50%,25%)}28%{transform:translate(-100%,50%)}43%{transform:translate(-100%,50%)}57%{transform:translate(-100%,50%)}71%{transform:translate(-50%,25%)}85%{transform:translate(-50%,25%)}to{transform:translate(-50%,25%)}}.h2.w3.l3[_ngcontent-%COMP%]{z-index:-2;animation-name:_ngcontent-%COMP%_h2w3l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h2w3l3{0%{transform:translateY(50%)}14%{transform:translate(50%,75%)}28%{transform:translateY(100%)}43%{transform:translateY(100%)}57%{transform:translate(-50%,75%)}71%{transform:translateY(50%)}85%{transform:translateY(50%)}to{transform:translateY(50%)}}.h3.w1.l1[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w1l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w1l1{0%{transform:translate(0)}14%{transform:translate(-50%,-25%)}28%{transform:translateY(-50%)}43%{transform:translate(0)}57%{transform:translate(50%,25%)}71%{transform:translateY(50%)}85%{transform:translate(0)}to{transform:translate(0)}}.h3.w1.l2[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w1l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w1l2{0%{transform:translate(50%,25%)}14%{transform:translate(50%,25%)}28%{transform:translate(100%)}43%{transform:translate(100%,50%)}57%{transform:translate(100%,50%)}71%{transform:translate(50%,75%)}85%{transform:translate(50%,25%)}to{transform:translate(50%,25%)}}.h3.w1.l3[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w1l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w1l3{0%{transform:translate(100%,50%)}14%{transform:translate(150%,75%)}28%{transform:translate(200%,50%)}43%{transform:translate(200%,100%)}57%{transform:translate(150%,75%)}71%{transform:translate(100%,100%)}85%{transform:translate(100%,50%)}to{transform:translate(100%,50%)}}.h3.w2.l1[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w2l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w2l1{0%{transform:translate(-50%,25%)}14%{transform:translate(-100%)}28%{transform:translate(-100%)}43%{transform:translate(-100%,50%)}57%{transform:translate(-50%,75%)}71%{transform:translate(-50%,75%)}85%{transform:translate(-50%,25%)}to{transform:translate(-50%,25%)}}.h3.w2.l2[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w2l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w2l2{0%{transform:translateY(50%)}14%{transform:translateY(50%)}28%{transform:translateY(50%)}43%{transform:translateY(100%)}57%{transform:translateY(100%)}71%{transform:translateY(100%)}85%{transform:translateY(50%)}to{transform:translateY(50%)}}.h3.w2.l3[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w2l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w2l3{0%{transform:translate(50%,75%)}14%{transform:translate(100%,100%)}28%{transform:translate(100%,100%)}43%{transform:translate(100%,150%)}57%{transform:translate(50%,125%)}71%{transform:translate(50%,125%)}85%{transform:translate(50%,75%)}to{transform:translate(50%,75%)}}.h3.w3.l1[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w3l1;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w3l1{0%{transform:translate(-100%,50%)}14%{transform:translate(-150%,25%)}28%{transform:translate(-200%,50%)}43%{transform:translate(-200%,100%)}57%{transform:translate(-150%,125%)}71%{transform:translate(-100%,100%)}85%{transform:translate(-100%,50%)}to{transform:translate(-100%,50%)}}.h3.w3.l2[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w3l2;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w3l2{0%{transform:translate(-50%,75%)}14%{transform:translate(-50%,75%)}28%{transform:translate(-100%,100%)}43%{transform:translate(-100%,150%)}57%{transform:translate(-100%,150%)}71%{transform:translate(-50%,125%)}85%{transform:translate(-50%,75%)}to{transform:translate(-50%,75%)}}.h3.w3.l3[_ngcontent-%COMP%]{z-index:-3;animation-name:_ngcontent-%COMP%_h3w3l3;animation-timing-function:ease;animation-duration:3s;animation-iteration-count:infinite}@keyframes _ngcontent-%COMP%_h3w3l3{0%{transform:translateY(100%)}14%{transform:translate(50%,125%)}28%{transform:translateY(150%)}43%{transform:translateY(200%)}57%{transform:translate(-50%,175%)}71%{transform:translateY(150%)}85%{transform:translateY(100%)}to{transform:translateY(100%)}}"],changeDetection:0});let t=e;return t})()});var Eke,Mke=Q(()=>{me();Gi();me();Eke=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-loading-pacman"]],standalone:!0,features:[et,xe],decls:1,vars:0,consts:[[1,"pac-man"]],template:function(r,s){r&1&&ee(0,"div",0)},styles:['[_nghost-%COMP%]{padding-right:190px;border:0px solid red;height:75px}.pac-man[_ngcontent-%COMP%]{position:relative;top:-80px;margin:5em auto 0;border-radius:100em 100em 0 0;background:red;transform-origin:bottom;animation:_ngcontent-%COMP%_eating-top .5s infinite}.pac-man[_ngcontent-%COMP%], .pac-man[_ngcontent-%COMP%]:before{width:70px;height:35px;background:#fed75a}.pac-man[_ngcontent-%COMP%]:before{content:"";display:block;margin-top:35px;position:absolute;transform-origin:top;border-radius:0 0 100em 100em;transform:rotate(80deg);animation:_ngcontent-%COMP%_eating-bottom .5s infinite}.pac-man[_ngcontent-%COMP%]:after{position:absolute;border-radius:100em;content:"";display:block;height:20px;width:20px;margin-top:25px;margin-left:25px;transform-origin:center;animation:pacman-loading-ball .5s -.33s infinite linear,pacman-loading-center .5s infinite}@keyframes _ngcontent-%COMP%_eating-top{0%{transform:rotate(-40deg)}50%{transform:rotate(0)}to{transform:rotate(-40deg)}}@keyframes _ngcontent-%COMP%_eating-bottom{0%{transform:rotate(80deg)}50%{transform:rotate(0)}to{transform:rotate(80deg)}}'],changeDetection:0});let t=e;return t})()});var kke,Ike=Q(()=>{me();Gi();me();kke=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-loading-lines"]],standalone:!0,features:[et,xe],decls:5,vars:0,consts:[[1,"container"],[1,"dash","uno"],[1,"dash","dos"],[1,"dash","tres"],[1,"dash","cuatro"]],template:function(r,s){r&1&&(h(0,"div",0),ee(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),p())},styles:["[_nghost-%COMP%]{display:flex}.container[_ngcontent-%COMP%]{display:flex}.dash[_ngcontent-%COMP%]{margin:0 15px;width:35px;height:15px;border-radius:8px;background:#b7860f;box-shadow:0 0 10px #ffee5e}.uno[_ngcontent-%COMP%]{margin-right:-18px;transform-origin:center left;animation:_ngcontent-%COMP%_spin 3s linear infinite}.dos[_ngcontent-%COMP%]{transform-origin:center right;animation:_ngcontent-%COMP%_spin2 3s linear infinite;animation-delay:.2s}.tres[_ngcontent-%COMP%]{transform-origin:center right;animation:_ngcontent-%COMP%_spin3 3s linear infinite;animation-delay:.3s}.cuatro[_ngcontent-%COMP%]{transform-origin:center right;animation:_ngcontent-%COMP%_spin4 3s linear infinite;animation-delay:.4s}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}25%{transform:rotate(360deg)}30%{transform:rotate(370deg)}35%{transform:rotate(360deg)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_spin2{0%{transform:rotate(0)}20%{transform:rotate(0)}30%{transform:rotate(-180deg)}35%{transform:rotate(-190deg)}40%{transform:rotate(-180deg)}78%{transform:rotate(-180deg)}95%{transform:rotate(-360deg)}98%{transform:rotate(-370deg)}to{transform:rotate(-360deg)}}@keyframes _ngcontent-%COMP%_spin3{0%{transform:rotate(0)}27%{transform:rotate(0)}40%{transform:rotate(180deg)}45%{transform:rotate(190deg)}50%{transform:rotate(180deg)}62%{transform:rotate(180deg)}75%{transform:rotate(360deg)}80%{transform:rotate(370deg)}85%{transform:rotate(360deg)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_spin4{0%{transform:rotate(0)}38%{transform:rotate(0)}60%{transform:rotate(-360deg)}65%{transform:rotate(-370deg)}75%{transform:rotate(-360deg)}to{transform:rotate(-360deg)}}"],changeDetection:0});let t=e;return t})()});var Ake,Pke=Q(()=>{me();Gi();me();Ake=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.destroyed=!1}ngAfterViewInit(){this.start(this)}ngOnInit(){}nxtOnDestroy(){this.destroyed=!0}start(i){let r=[],a=document.getElementById("container").getContext("2d"),l=5,c=200,d=200,u=30;m();function m(){for(let I=0;I<u;I++)f();for(let I=0,z=r.length;I<z;I++){let G=r[I];I===0?r[I].buddy=r[r.length-1]:r[I].buddy=r[I-1]}M()}function f(){let I={x:Math.random()*c,y:Math.random()*d,vx:0,vy:0};I.vx=(Math.floor(Math.random())*2-1)*Math.random();let G=5-Math.pow(I.vx,2);I.vy=Math.sqrt(G)*(Math.random()*2-1),r.push(I)}function _(I,z,G){if(z==="x"){I.vx=G*Math.random();let Y=5-Math.pow(I.vx,2);I.vy=Math.sqrt(Y)*(Math.random()*2-1)}else{I.vy=G*Math.random();let Y=5-Math.pow(I.vy,2);I.vx=Math.sqrt(Y)*(Math.random()*2-1)}}function x(I,z){a.beginPath(),a.arc(I,z,l,0,2*Math.PI,!1),a.fillStyle="#b7860f",a.fill()}function D(I,z,G,A){a.beginPath(),a.moveTo(I,z),a.lineTo(G,A),a.strokeStyle="rgba(183,134,15,0.5)",a.stroke()}function E(){for(let I=0,z=r.length;I<z;I++){let G=r[I];G.x+=G.vx,G.y+=G.vy,x(G.x,G.y),D(G.x,G.y,G.buddy.x,G.buddy.y),G.x<0+l?_(G,"x",1):G.x>c-l?_(G,"x",-1):G.y<0+l?_(G,"y",1):G.y>d-l&&_(G,"y",-1)}}function M(){a.clearRect(0,0,200,200),E(),i.destroyed||requestAnimationFrame(M)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-loading-net"]],standalone:!0,features:[et,xe],decls:1,vars:0,consts:[["id","container","width","200","height","200"]],template:function(r,s){r&1&&ee(0,"canvas",0)},styles:["[_nghost-%COMP%]   #container[_ngcontent-%COMP%]{width:150px;height:150px;margin:auto;transform:rotate(45deg)}"],changeDetection:0});let t=e;return t})()});function r7t(t,e){t&1&&ee(0,"img",1)}function s7t(t,e){t&1&&(h(0,"div",2),ee(1,"div",5)(2,"div",6)(3,"div",7),p())}function o7t(t,e){t&1&&ee(0,"nxt-loading-cube")}function a7t(t,e){t&1&&ee(0,"nxt-loading-pacman")}function l7t(t,e){t&1&&ee(0,"nxt-loading-lines",3)}function c7t(t,e){t&1&&ee(0,"nxt-loading-net")}var Rke,Lhe=Q(()=>{me();ji();ha();sg();kl();Dke();Mke();Ike();Pke();me();ji();Rke=(()=>{let e=class e{constructor(i,r){this.data=i,this.dialogRef=r,this.showLoading=!0,this.allowCancelClick=!1,this.random=vr(()=>fn.random(1,6))}ngOnInit(){}allowCancel(){this.allowCancelClick=!0}multiClicked(){this.allowCancelClick&&this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Ou),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-loading"]],standalone:!0,features:[xe],decls:9,vars:5,consts:[[1,"flex","h-full","w-full","flex-col","items-center","justify-center","loading-container",3,"nxtOnMultiClick","nxtMultiClick"],["src","assets/logo-loading.svg"],[1,"loader"],[1,"m-4"],[1,"text-2xl","message","font-montserrat","center",3,"innerHTML"],[1,"inner","one"],[1,"inner","two"],[1,"inner","three"]],template:function(r,s){r&1&&(h(0,"div",0),F("nxtOnMultiClick",function(){return s.multiClicked()}),W(1,r7t,1,0,"img",1)(2,s7t,4,0,"div",2)(3,o7t,1,0,"nxt-loading-cube")(4,a7t,1,0,"nxt-loading-pacman")(5,l7t,1,0,"nxt-loading-lines",3)(6,c7t,1,0,"nxt-loading-net"),ee(7,"div",4),Ce(8,"safeHtml"),p()),r&2&&(b("nxtMultiClick",4),g(),Je(s.random()===1?1:s.random()===2?2:s.random()===3?3:s.random()===4?4:s.random()===5?5:s.random()===6?6:-1),g(6),b("innerHTML",tt(8,3,s.data),Pi))},dependencies:[Qu,Or,Tke,Eke,kke,Ake],styles:["[_nghost-%COMP%]{min-width:400px;--space: 45px;display:flex;background-color:#1f1f1f;border-radius:10px;padding:var(--space)}[_nghost-%COMP%]   img[_ngcontent-%COMP%]{max-width:280px}[_nghost-%COMP%]   .message[_ngcontent-%COMP%]{margin-top:var(--space)}",".loader[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:50%;perspective:800px}.inner[_ngcontent-%COMP%]{position:absolute;box-sizing:border-box;width:100%;height:100%;border-radius:50%}.inner.one[_ngcontent-%COMP%]{left:0%;top:0%;animation:_ngcontent-%COMP%_rotate-one 1s linear infinite;border-bottom:3px solid #b7860f}.inner.two[_ngcontent-%COMP%]{right:0%;top:0%;animation:_ngcontent-%COMP%_rotate-two 1s linear infinite;border-right:3px solid #b7860f}.inner.three[_ngcontent-%COMP%]{right:0%;bottom:0%;animation:_ngcontent-%COMP%_rotate-three 1s linear infinite;border-top:3px solid #b7860f}@keyframes _ngcontent-%COMP%_rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(360deg)}}@keyframes _ngcontent-%COMP%_rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0)}to{transform:rotateX(50deg) rotateY(10deg) rotate(360deg)}}@keyframes _ngcontent-%COMP%_rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0)}to{transform:rotateX(35deg) rotateY(55deg) rotate(360deg)}}"]});let t=e;return t})()});var Fke=xr((gN,Ohe)=>{(function(t,e){typeof gN=="object"&&typeof Ohe=="object"?Ohe.exports=e():typeof define=="function"&&define.amd?define([],e):typeof gN=="object"?gN.recursiveDiff=e():t.recursiveDiff=e()})(typeof self<"u"?self:gN,()=>{return t={182:n=>{let i={NUMBER:"NUMBER",BOOLEAN:"BOOLEAN",STRING:"STRING",NULL:"NULL",UNDEFINED:"UNDEFINED",DATE:"DATE",ARRAY:"ARRAY",MAP:"MAP",SET:"SET",ITERABLE_OBJECT:"ITERABLE_OBJECT",DEFAULT:"OBJECT"};n.exports={types:i,iterableTypes:[i.ITERABLE_OBJECT,i.MAP,i.ARRAY,i.SET],errors:{EMPTY_DIFF:"No diff object is provided, Nothing to apply",INVALID_DIFF_FORMAT:"Invalid diff format",INVALID_DIFF_OP:"Unsupported operation provided into diff object"}}},688:(n,i,r)=>{let{types:s,iterableTypes:o,errors:a}=r(182),l=r(555),c={[s.NUMBER]:l.isNumber,[s.BOOLEAN]:l.isBoolean,[s.STRING]:l.isString,[s.DATE]:l.isDate,[s.UNDEFINED]:l.isUndefined,[s.NULL]:l.isNull,[s.ARRAY]:l.isArray,[s.MAP]:l.isMap,[s.SET]:l.isSet,[s.ITERABLE_OBJECT]:l.isIterableObject},d={[s.DATE]:l.areDatesEqual};function u(x){let D=Object.keys(c),E=s.DEFAULT;for(let M=0;M<D.length;M+=1)if(c[D[M]](x)){E=D[M];break}return E}function m(x,D,E,M,I){let z={op:E,path:M};return E!=="add"&&E!=="update"||(z.val=D),I&&E!=="add"&&(z.oldVal=x),z}function f(x,D,E,M,I){let z=u(x),G=u(D),A=M||[],Y=I||[];if(function(X,ne){return X===ne&&o.indexOf(X)>=0}(z,G)){let X=function(ce,ie,le){if(le===s.ARRAY){let Se=ce.length>ie.length?new Array(ce.length):new Array(ie.length);return Se.fill(0),new Set(Se.map((je,ze)=>ze))}return new Set(Object.keys(ce).concat(Object.keys(ie)))}(x,D,z).values(),{value:ne,done:pe}=X.next();for(;!pe;){Object.prototype.hasOwnProperty.call(x,ne)?Object.prototype.hasOwnProperty.call(D,ne)?f(x[ne],D[ne],E,A.concat(ne),Y):Y.push(m(x[ne],D[ne],"delete",A.concat(ne),E)):Y.push(m(x[ne],D[ne],"add",A.concat(ne),E));let ce=X.next();ne=ce.value,pe=ce.done}}else{let X=function(ne,pe,ce,ie){let le;return ce===s.UNDEFINED&&ie!==s.UNDEFINED?le="add":ce!==s.UNDEFINED&&ie===s.UNDEFINED?le="delete":function(Se,je,ze,Ge){return ze===Ge&&(d[ze]?d[ze](Se,je):Se===je)}(ne,pe,ce,ie)?l.noop():le="update",le}(x,D,z,G);X!=null&&Y.push(m(x,D,X,M,E))}return Y}let _={add:l.setValueByPath,update:l.setValueByPath,delete:l.deleteValueByPath};n.exports={getDiff:(x,D,E=!1)=>f(x,D,E),applyDiff:(x,D,E)=>function(M,I,z){if(!(I instanceof Array))throw new Error(a.INVALID_DIFF_FORMAT);let G=M;return I.forEach(A=>{let{op:Y,val:X,path:ne}=A;if(!_[Y])throw new Error(a.INVALID_DIFF_OP);G=_[Y](G,ne,X,z)}),G}(x,D,E)}},555:n=>{let i=c=>d=>d instanceof c,r=i(Date),s=i(Array),o=i(Map),a=i(Set),l=c=>Object.prototype.toString.call(c)==="[object Object]";n.exports={isNumber:c=>typeof c=="number",isBoolean:c=>typeof c=="boolean",isString:c=>typeof c=="string",isDate:r,isUndefined:c=>c===void 0,isNull:c=>c===null,isArray:s,isMap:o,isSet:a,isIterableObject:l,noop:()=>{},areDatesEqual:(c,d)=>c.getTime()===d.getTime(),setValueByPath:function(c,d=[],u,m){if(!s(d))throw new Error(`Diff path: "${d}" is not valid`);let{length:f}=d;if(f===0)return u;let _=c;for(let x=0;x<f;x+=1){let D=d[x];if(!_)throw new Error(`Invalid path: "${d}" for object: ${JSON.stringify(c,null,2)}`);if(D==null)throw new Error(`Invalid path: "${d}" for object: ${JSON.stringify(c,null,2)}`);x!==f-1?(_=_[D],m&&m(_)):_[D]=u}return c},deleteValueByPath:function(c,d){let u=d||[];if(u.length===0)return;let m=c,{length:f}=u;for(let _=0;_<f;_+=1)if(_!==f-1){if(!m[u[_]])throw new Error(`Invalid path: "${d}" for object: ${JSON.stringify(c,null,2)}`);m=m[u[_]]}else if(l(m))delete m[u[_]];else{let x=parseInt(u[_],10);for(;m.length>x;)m.pop()}return c}}}},e={},function n(i){var r=e[i];if(r!==void 0)return r.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}(688);var t,e})});var Oke=xr((Yan,Lke)=>{"use strict";Lke.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var i,r,s;if(Array.isArray(e)){if(i=e.length,i!=n.length)return!1;for(r=i;r--!==0;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),i=s.length,i!==Object.keys(n).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=i;r--!==0;){var o=s[r];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}});var Q9=xr((Dk,vN)=>{(function(){var t,e="4.17.21",n=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",r="Expected a function",s="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",a=500,l="__lodash_placeholder__",c=1,d=2,u=4,m=1,f=2,_=1,x=2,D=4,E=8,M=16,I=32,z=64,G=128,A=256,Y=512,X=30,ne="...",pe=800,ce=16,ie=1,le=2,Se=3,je=1/0,ze=9007199254740991,Ge=17976931348623157e292,Ae=NaN,Ye=4294967295,ft=Ye-1,Ft=Ye>>>1,Tt=[["ary",G],["bind",_],["bindKey",x],["curry",E],["curryRight",M],["flip",Y],["partial",I],["partialRight",z],["rearg",A]],at="[object Arguments]",yt="[object Array]",_t="[object AsyncFunction]",Re="[object Boolean]",ot="[object Date]",jt="[object DOMException]",zt="[object Error]",qt="[object Function]",ui="[object GeneratorFunction]",_i="[object Map]",ln="[object Number]",Rn="[object Null]",bi="[object Object]",Mn="[object Promise]",Fn="[object Proxy]",or="[object RegExp]",wn="[object Set]",gn="[object String]",ts="[object Symbol]",no="[object Undefined]",Ho="[object WeakMap]",kn="[object WeakSet]",Ts="[object ArrayBuffer]",ea="[object DataView]",co="[object Float32Array]",Zn="[object Float64Array]",gl="[object Int8Array]",sc="[object Int16Array]",Xl="[object Int32Array]",Xs="[object Uint8Array]",Ya="[object Uint8ClampedArray]",qa="[object Uint16Array]",Nl="[object Uint32Array]",zh=/\b__p \+= '';/g,Hh=/\b(__p \+=) '' \+/g,Rf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Id=/&(?:amp|lt|gt|quot|#39);/g,aa=/[&<>"']/g,jd=RegExp(Id.source),du=RegExp(aa.source),$i=/<%-([\s\S]+?)%>/g,md=/<%([\s\S]+?)%>/g,Vl=/<%=([\s\S]+?)%>/g,Tl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ja=/^\w*$/,Dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,ds=RegExp(Ad.source),_a=/^\s+/,fd=/\s/,fr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qs=/\{\n\/\* \[wrapped with (.+)\] \*/,Nr=/,? & /,Ql=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ro=/[()=,{}\[\]\/\s]/,Ra=/\\(\\)?/g,Ta=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$a=/\w*$/,Da=/^[-+]0x[0-9a-f]+$/i,Gh=/^0b[01]+$/i,Ti=/^\[object .+?Constructor\]$/,Hs=/^0o[0-7]+$/i,Eo=/^(?:0|[1-9]\d*)$/,Mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Js=/($^)/,td=/['\n\r\u2028\u2029\\]/g,Ec="\\ud800-\\udfff",Wh="\\u0300-\\u036f",gd="\\ufe20-\\ufe2f",eo="\\u20d0-\\u20ff",Tu=Wh+gd+eo,dp="\\u2700-\\u27bf",vd="a-z\\xdf-\\xf6\\xf8-\\xff",ch="\\xac\\xb1\\xd7\\xf7",T1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Wm="\\u2000-\\u206f",ia=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fa="A-Z\\xc0-\\xd6\\xd8-\\xde",up="\\ufe0e\\ufe0f",vl=ch+T1+Wm+ia,Jl="['\u2019]",Du="["+Ec+"]",uo="["+vl+"]",yl="["+Tu+"]",Bp="\\d+",zp="["+dp+"]",id="["+vd+"]",Bc="[^"+Ec+vl+Bp+dp+vd+Fa+"]",ec="\\ud83c[\\udffb-\\udfff]",yd="(?:"+yl+"|"+ec+")",bo="[^"+Ec+"]",ba="(?:\\ud83c[\\udde6-\\uddff]){2}",Bl="[\\ud800-\\udbff][\\udc00-\\udfff]",Yo="["+Fa+"]",dh="\\u200d",mc="(?:"+id+"|"+Bc+")",Pd="(?:"+Yo+"|"+Bc+")",ju="(?:"+Jl+"(?:d|ll|m|re|s|t|ve))?",hp="(?:"+Jl+"(?:D|LL|M|RE|S|T|VE))?",Uh=yd+"?",$u="["+up+"]?",Um="(?:"+dh+"(?:"+[bo,ba,Bl].join("|")+")"+$u+Uh+")*",Ff="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Eu=$u+Uh+Um,wo="(?:"+[zp,ba,Bl].join("|")+")"+Eu,uh="(?:"+[bo+yl+"?",yl,ba,Bl,Du].join("|")+")",rl=RegExp(Jl,"g"),pp=RegExp(yl,"g"),Gp=RegExp(ec+"(?="+ec+")|"+uh+Eu,"g"),d0=RegExp([Yo+"?"+id+"+"+ju+"(?="+[uo,Yo,"$"].join("|")+")",Pd+"+"+hp+"(?="+[uo,Yo+mc,"$"].join("|")+")",Yo+"?"+mc+"+"+ju,Yo+"+"+hp,Hp,Ff,Bp,wo].join("|"),"g"),jm=RegExp("["+dh+Ec+Tu+up+"]"),nd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,D1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lf=-1,Yr={};Yr[co]=Yr[Zn]=Yr[gl]=Yr[sc]=Yr[Xl]=Yr[Xs]=Yr[Ya]=Yr[qa]=Yr[Nl]=!0,Yr[at]=Yr[yt]=Yr[Ts]=Yr[Re]=Yr[ea]=Yr[ot]=Yr[zt]=Yr[qt]=Yr[_i]=Yr[ln]=Yr[bi]=Yr[or]=Yr[wn]=Yr[gn]=Yr[Ho]=!1;var ps={};ps[at]=ps[yt]=ps[Ts]=ps[ea]=ps[Re]=ps[ot]=ps[co]=ps[Zn]=ps[gl]=ps[sc]=ps[Xl]=ps[_i]=ps[ln]=ps[bi]=ps[or]=ps[wn]=ps[gn]=ps[ts]=ps[Xs]=ps[Ya]=ps[qa]=ps[Nl]=!0,ps[zt]=ps[qt]=ps[Ho]=!1;var $m={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},hh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ku={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},E1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Wp=parseFloat,Dl=parseInt,M1=typeof global=="object"&&global&&global.Object===Object&&global,Ca=typeof self=="object"&&self&&self.Object===Object&&self,la=M1||Ca||Function("return this")(),oc=typeof Dk=="object"&&Dk&&!Dk.nodeType&&Dk,fc=oc&&typeof vN=="object"&&vN&&!vN.nodeType&&vN,Fs=fc&&fc.exports===oc,_d=Fs&&M1.process,Go=function(){try{var Fe=fc&&fc.require&&fc.require("util").types;return Fe||_d&&_d.binding&&_d.binding("util")}catch{}}(),k1=Go&&Go.isArrayBuffer,H=Go&&Go.isDate,te=Go&&Go.isMap,ge=Go&&Go.isRegExp,ke=Go&&Go.isSet,He=Go&&Go.isTypedArray;function Ne(Fe,dt,ht){switch(ht.length){case 0:return Fe.call(dt);case 1:return Fe.call(dt,ht[0]);case 2:return Fe.call(dt,ht[0],ht[1]);case 3:return Fe.call(dt,ht[0],ht[1],ht[2])}return Fe.apply(dt,ht)}function ct(Fe,dt,ht,ci){for(var Ni=-1,Qi=Fe==null?0:Fe.length;++Ni<Qi;){var Br=Fe[Ni];dt(ci,Br,ht(Br),Fe)}return ci}function kt(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length;++ht<ci&&dt(Fe[ht],ht,Fe)!==!1;);return Fe}function Ht(Fe,dt){for(var ht=Fe==null?0:Fe.length;ht--&&dt(Fe[ht],ht,Fe)!==!1;);return Fe}function hi(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length;++ht<ci;)if(!dt(Fe[ht],ht,Fe))return!1;return!0}function Li(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length,Ni=0,Qi=[];++ht<ci;){var Br=Fe[ht];dt(Br,ht,Fe)&&(Qi[Ni++]=Br)}return Qi}function nn(Fe,dt){var ht=Fe==null?0:Fe.length;return!!ht&&ho(Fe,dt,0)>-1}function Ii(Fe,dt,ht){for(var ci=-1,Ni=Fe==null?0:Fe.length;++ci<Ni;)if(ht(dt,Fe[ci]))return!0;return!1}function Oi(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length,Ni=Array(ci);++ht<ci;)Ni[ht]=dt(Fe[ht],ht,Fe);return Ni}function is(Fe,dt){for(var ht=-1,ci=dt.length,Ni=Fe.length;++ht<ci;)Fe[Ni+ht]=dt[ht];return Fe}function Io(Fe,dt,ht,ci){var Ni=-1,Qi=Fe==null?0:Fe.length;for(ci&&Qi&&(ht=Fe[++Ni]);++Ni<Qi;)ht=dt(ht,Fe[Ni],Ni,Fe);return ht}function Ao(Fe,dt,ht,ci){var Ni=Fe==null?0:Fe.length;for(ci&&Ni&&(ht=Fe[--Ni]);Ni--;)ht=dt(ht,Fe[Ni],Ni,Fe);return ht}function sl(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length;++ht<ci;)if(dt(Fe[ht],ht,Fe))return!0;return!1}var Ea=Mc("length");function $d(Fe){return Fe.split("")}function rd(Fe){return Fe.match(Ql)||[]}function Ro(Fe,dt,ht){var ci;return ht(Fe,function(Ni,Qi,Br){if(dt(Ni,Qi,Br))return ci=Qi,!1}),ci}function gc(Fe,dt,ht,ci){for(var Ni=Fe.length,Qi=ht+(ci?1:-1);ci?Qi--:++Qi<Ni;)if(dt(Fe[Qi],Qi,Fe))return Qi;return-1}function ho(Fe,dt,ht){return dt===dt?Up(Fe,dt,ht):gc(Fe,zc,ht)}function Fo(Fe,dt,ht,ci){for(var Ni=ht-1,Qi=Fe.length;++Ni<Qi;)if(ci(Fe[Ni],dt))return Ni;return-1}function zc(Fe){return Fe!==Fe}function Cd(Fe,dt){var ht=Fe==null?0:Fe.length;return ht?mt(Fe,dt)/ht:Ae}function Mc(Fe){return function(dt){return dt==null?t:dt[Fe]}}function K(Fe){return function(dt){return Fe==null?t:Fe[dt]}}function we(Fe,dt,ht,ci,Ni){return Ni(Fe,function(Qi,Br,hn){ht=ci?(ci=!1,Qi):dt(ht,Qi,Br,hn)}),ht}function Oe(Fe,dt){var ht=Fe.length;for(Fe.sort(dt);ht--;)Fe[ht]=Fe[ht].value;return Fe}function mt(Fe,dt){for(var ht,ci=-1,Ni=Fe.length;++ci<Ni;){var Qi=dt(Fe[ci]);Qi!==t&&(ht=ht===t?Qi:ht+Qi)}return ht}function vi(Fe,dt){for(var ht=-1,ci=Array(Fe);++ht<Fe;)ci[ht]=dt(ht);return ci}function Bi(Fe,dt){return Oi(dt,function(ht){return[ht,Fe[ht]]})}function jn(Fe){return Fe&&Fe.slice(0,jp(Fe)+1).replace(_a,"")}function Vr(Fe){return function(dt){return Fe(dt)}}function El(Fe,dt){return Oi(dt,function(ht){return Fe[ht]})}function Lo(Fe,dt){return Fe.has(dt)}function Er(Fe,dt){for(var ht=-1,ci=Fe.length;++ht<ci&&ho(dt,Fe[ht],0)>-1;);return ht}function yo(Fe,dt){for(var ht=Fe.length;ht--&&ho(dt,Fe[ht],0)>-1;);return ht}function uu(Fe,dt){for(var ht=Fe.length,ci=0;ht--;)Fe[ht]===dt&&++ci;return ci}var zl=K($m),Mu=K(hh);function Of(Fe){return"\\"+E1[Fe]}function K0(Fe,dt){return Fe==null?t:Fe[dt]}function Hc(Fe){return jm.test(Fe)}function Rd(Fe){return nd.test(Fe)}function Nf(Fe){for(var dt,ht=[];!(dt=Fe.next()).done;)ht.push(dt.value);return ht}function jh(Fe){var dt=-1,ht=Array(Fe.size);return Fe.forEach(function(ci,Ni){ht[++dt]=[Ni,ci]}),ht}function $h(Fe,dt){return function(ht){return Fe(dt(ht))}}function _l(Fe,dt){for(var ht=-1,ci=Fe.length,Ni=0,Qi=[];++ht<ci;){var Br=Fe[ht];(Br===dt||Br===l)&&(Fe[ht]=l,Qi[Ni++]=ht)}return Qi}function kc(Fe){var dt=-1,ht=Array(Fe.size);return Fe.forEach(function(ci){ht[++dt]=ci}),ht}function Y0(Fe){var dt=-1,ht=Array(Fe.size);return Fe.forEach(function(ci){ht[++dt]=[ci,ci]}),ht}function Up(Fe,dt,ht){for(var ci=ht-1,Ni=Fe.length;++ci<Ni;)if(Fe[ci]===dt)return ci;return-1}function Kg(Fe,dt,ht){for(var ci=ht+1;ci--;)if(Fe[ci]===dt)return ci;return ci}function Hl(Fe){return Hc(Fe)?I1(Fe):Ea(Fe)}function ol(Fe){return Hc(Fe)?q0(Fe):$d(Fe)}function jp(Fe){for(var dt=Fe.length;dt--&&fd.test(Fe.charAt(dt)););return dt}var F2=K(Ku);function I1(Fe){for(var dt=Gp.lastIndex=0;Gp.test(Fe);)++dt;return dt}function q0(Fe){return Fe.match(Gp)||[]}function Mt(Fe){return Fe.match(d0)||[]}var li=function Fe(dt){dt=dt==null?la:wi.defaults(la.Object(),dt,wi.pick(la,D1));var ht=dt.Array,ci=dt.Date,Ni=dt.Error,Qi=dt.Function,Br=dt.Math,hn=dt.Object,us=dt.RegExp,ns=dt.String,_r=dt.TypeError,xa=ht.prototype,xd=Qi.prototype,Gl=hn.prototype,bd=dt["__core-js_shared__"],Fd=xd.toString,ss=Gl.hasOwnProperty,hu=0,Vf=function(){var v=/[^.]+$/.exec(bd&&bd.keys&&bd.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""}(),Bf=Gl.toString,K3=Fd.call(hn),Y3=la._,Km=us("^"+Fd.call(ss).replace(Ad,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ym=Fs?dt.Buffer:t,Yu=dt.Symbol,mp=dt.Uint8Array,L2=Ym?Ym.allocUnsafe:t,um=$h(hn.getPrototypeOf,hn),qm=hn.create,u0=Gl.propertyIsEnumerable,Kh=xa.splice,q3=Yu?Yu.isConcatSpreadable:t,Zm=Yu?Yu.iterator:t,Yh=Yu?Yu.toStringTag:t,A1=function(){try{var v=z2(hn,"defineProperty");return v({},"",{}),v}catch{}}(),Yg=dt.clearTimeout!==la.clearTimeout&&dt.clearTimeout,hv=ci&&ci.now!==la.Date.now&&ci.now,J6=dt.setTimeout!==la.setTimeout&&dt.setTimeout,zf=Br.ceil,ph=Br.floor,La=hn.getOwnPropertySymbols,T=Ym?Ym.isBuffer:t,N=dt.isFinite,Z=xa.join,ue=$h(hn.keys,hn),Pe=Br.max,st=Br.min,ti=ci.now,Ei=dt.parseInt,Ui=Br.random,On=xa.reverse,Wr=z2(dt,"DataView"),$s=z2(dt,"Map"),qo=z2(dt,"Promise"),q=z2(dt,"Set"),oe=z2(dt,"WeakMap"),he=z2(hn,"create"),de=oe&&new oe,De={},Le=H2(Wr),xt=H2($s),Dt=H2(qo),Ut=H2(q),Jt=H2(oe),gi=Yu?Yu.prototype:t,Si=gi?gi.valueOf:t,Tr=gi?gi.toString:t;function ae(v){if(Oa(v)&&!Pr(v)&&!(v instanceof hr)){if(v instanceof Zo)return v;if(ss.call(v,"__wrapped__"))return NL(v)}return new Zo(v)}var Ds=function(){function v(){}return function(C){if(!wa(C))return{};if(qm)return qm(C);v.prototype=C;var k=new v;return v.prototype=t,k}}();function lo(){}function Zo(v,C){this.__wrapped__=v,this.__actions__=[],this.__chain__=!!C,this.__index__=0,this.__values__=t}ae.templateSettings={escape:$i,evaluate:md,interpolate:Vl,variable:"",imports:{_:ae}},ae.prototype=lo.prototype,ae.prototype.constructor=ae,Zo.prototype=Ds(lo.prototype),Zo.prototype.constructor=Zo;function hr(v){this.__wrapped__=v,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ye,this.__views__=[]}function h0(){var v=new hr(this.__wrapped__);return v.__actions__=qd(this.__actions__),v.__dir__=this.__dir__,v.__filtered__=this.__filtered__,v.__iteratees__=qd(this.__iteratees__),v.__takeCount__=this.__takeCount__,v.__views__=qd(this.__views__),v}function M_(){if(this.__filtered__){var v=new hr(this);v.__dir__=-1,v.__filtered__=!0}else v=this.clone(),v.__dir__*=-1;return v}function k_(){var v=this.__wrapped__.value(),C=this.__dir__,k=Pr(v),j=C<0,se=k?v.length:0,Te=hoe(0,se,this.__views__),We=Te.start,rt=Te.end,pt=rt-We,ni=j?rt:We-1,si=this.__iteratees__,pi=si.length,Ki=0,Tn=st(pt,this.__takeCount__);if(!k||!j&&se==pt&&Tn==pt)return oL(v,this.__actions__);var ir=[];e:for(;pt--&&Ki<Tn;){ni+=C;for(var Qr=-1,nr=v[ni];++Qr<pi;){var fs=si[Qr],As=fs.iteratee,Pu=fs.type,Td=As(nr);if(Pu==le)nr=Td;else if(!Td){if(Pu==ie)continue e;break e}}ir[Ki++]=nr}return ir}hr.prototype=Ds(lo.prototype),hr.prototype.constructor=hr;function qu(v){var C=-1,k=v==null?0:v.length;for(this.clear();++C<k;){var j=v[C];this.set(j[0],j[1])}}function p0(){this.__data__=he?he(null):{},this.size=0}function I_(v){var C=this.has(v)&&delete this.__data__[v];return this.size-=C?1:0,C}function Kd(v){var C=this.__data__;if(he){var k=C[v];return k===o?t:k}return ss.call(C,v)?C[v]:t}function A_(v){var C=this.__data__;return he?C[v]!==t:ss.call(C,v)}function O2(v,C){var k=this.__data__;return this.size+=this.has(v)?0:1,k[v]=he&&C===t?o:C,this}qu.prototype.clear=p0,qu.prototype.delete=I_,qu.prototype.get=Kd,qu.prototype.has=A_,qu.prototype.set=O2;function fp(v){var C=-1,k=v==null?0:v.length;for(this.clear();++C<k;){var j=v[C];this.set(j[0],j[1])}}function xS(){this.__data__=[],this.size=0}function zC(v){var C=this.__data__,k=Yd(C,v);if(k<0)return!1;var j=C.length-1;return k==j?C.pop():Kh.call(C,k,1),--this.size,!0}function bS(v){var C=this.__data__,k=Yd(C,v);return k<0?t:C[k][1]}function wS(v){return Yd(this.__data__,v)>-1}function HC(v,C){var k=this.__data__,j=Yd(k,v);return j<0?(++this.size,k.push([v,C])):k[j][1]=C,this}fp.prototype.clear=xS,fp.prototype.delete=zC,fp.prototype.get=bS,fp.prototype.has=wS,fp.prototype.set=HC;function gp(v){var C=-1,k=v==null?0:v.length;for(this.clear();++C<k;){var j=v[C];this.set(j[0],j[1])}}function SS(){this.size=0,this.__data__={hash:new qu,map:new($s||fp),string:new qu}}function TS(v){var C=o8(this,v).delete(v);return this.size-=C?1:0,C}function hm(v){return o8(this,v).get(v)}function GC(v){return o8(this,v).has(v)}function DS(v,C){var k=o8(this,v),j=k.size;return k.set(v,C),this.size+=k.size==j?0:1,this}gp.prototype.clear=SS,gp.prototype.delete=TS,gp.prototype.get=hm,gp.prototype.has=GC,gp.prototype.set=DS;function Hf(v){var C=-1,k=v==null?0:v.length;for(this.__data__=new gp;++C<k;)this.add(v[C])}function ES(v){return this.__data__.set(v,o),this}function xi(v){return this.__data__.has(v)}Hf.prototype.add=Hf.prototype.push=ES,Hf.prototype.has=xi;function ku(v){var C=this.__data__=new fp(v);this.size=C.size}function MS(){this.__data__=new fp,this.size=0}function WC(v){var C=this.__data__,k=C.delete(v);return this.size=C.size,k}function Vs(v){return this.__data__.get(v)}function Z3(v){return this.__data__.has(v)}function UC(v,C){var k=this.__data__;if(k instanceof fp){var j=k.__data__;if(!$s||j.length<n-1)return j.push([v,C]),this.size=++k.size,this;k=this.__data__=new gp(j)}return k.set(v,C),this.size=k.size,this}ku.prototype.clear=MS,ku.prototype.delete=WC,ku.prototype.get=Vs,ku.prototype.has=Z3,ku.prototype.set=UC;function X3(v,C){var k=Pr(v),j=!k&&G2(v),se=!k&&!j&&y0(v),Te=!k&&!j&&!se&&n4(v),We=k||j||se||Te,rt=We?vi(v.length,ns):[],pt=rt.length;for(var ni in v)(C||ss.call(v,ni))&&!(We&&(ni=="length"||se&&(ni=="offset"||ni=="parent")||Te&&(ni=="buffer"||ni=="byteLength"||ni=="byteOffset")||$f(ni,pt)))&&rt.push(ni);return rt}function jC(v){var C=v.length;return C?v[GS(0,C-1)]:t}function kS(v,C){return a8(qd(v),Gf(C,0,v.length))}function IS(v){return a8(qd(v))}function ey(v,C,k){(k!==t&&!Cp(v[C],k)||k===t&&!(C in v))&&vp(v,C,k)}function N2(v,C,k){var j=v[C];(!(ss.call(v,C)&&Cp(j,k))||k===t&&!(C in v))&&vp(v,C,k)}function Yd(v,C){for(var k=v.length;k--;)if(Cp(v[k][0],C))return k;return-1}function AS(v,C,k,j){return pm(v,function(se,Te,We){C(j,se,k(se),We)}),j}function ty(v,C){return v&&fm(C,tc(C),v)}function PS(v,C){return v&&fm(C,Xd(C),v)}function vp(v,C,k){C=="__proto__"&&A1?A1(v,C,{configurable:!0,enumerable:!0,value:k,writable:!0}):v[C]=k}function Q3(v,C){for(var k=-1,j=C.length,se=ht(j),Te=v==null;++k<j;)se[k]=Te?t:p9(v,C[k]);return se}function Gf(v,C,k){return v===v&&(k!==t&&(v=v<=k?v:k),C!==t&&(v=v>=C?v:C)),v}function wd(v,C,k,j,se,Te){var We,rt=C&c,pt=C&d,ni=C&u;if(k&&(We=se?k(v,j,se,Te):k(v)),We!==t)return We;if(!wa(v))return v;var si=Pr(v);if(si){if(We=moe(v),!rt)return qd(v,We)}else{var pi=Gc(v),Ki=pi==qt||pi==ui;if(y0(v))return cL(v,rt);if(pi==bi||pi==at||Ki&&!se){if(We=pt||Ki?{}:ML(v),!rt)return pt?noe(v,PS(We,v)):ioe(v,ty(We,v))}else{if(!ps[pi])return se?v:{};We=foe(v,pi,rt)}}Te||(Te=new ku);var Tn=Te.get(v);if(Tn)return Tn;Te.set(v,We),nO(v)?v.forEach(function(nr){We.add(wd(nr,C,k,nr,v,Te))}):tO(v)&&v.forEach(function(nr,fs){We.set(fs,wd(nr,C,k,fs,v,Te))});var ir=ni?pt?JS:QS:pt?Xd:tc,Qr=si?t:ir(v);return kt(Qr||v,function(nr,fs){Qr&&(fs=nr,nr=v[fs]),N2(We,fs,wd(nr,C,k,fs,v,Te))}),We}function iy(v){var C=tc(v);return function(k){return $C(k,v,C)}}function $C(v,C,k){var j=k.length;if(v==null)return!j;for(v=hn(v);j--;){var se=k[j],Te=C[se],We=v[se];if(We===t&&!(se in v)||!Te(We))return!1}return!0}function mh(v,C,k){if(typeof v!="function")throw new _r(r);return uy(function(){v.apply(t,k)},C)}function m0(v,C,k,j){var se=-1,Te=nn,We=!0,rt=v.length,pt=[],ni=C.length;if(!rt)return pt;k&&(C=Oi(C,Vr(k))),j?(Te=Ii,We=!1):C.length>=n&&(Te=Lo,We=!1,C=new Hf(C));e:for(;++se<rt;){var si=v[se],pi=k==null?si:k(si);if(si=j||si!==0?si:0,We&&pi===pi){for(var Ki=ni;Ki--;)if(C[Ki]===pi)continue e;pt.push(si)}else Te(C,pi,j)||pt.push(si)}return pt}var pm=mL(fh),KC=mL(ry,!0);function RS(v,C){var k=!0;return pm(v,function(j,se,Te){return k=!!C(j,se,Te),k}),k}function J3(v,C,k){for(var j=-1,se=v.length;++j<se;){var Te=v[j],We=C(Te);if(We!=null&&(rt===t?We===We&&!Au(We):k(We,rt)))var rt=We,pt=Te}return pt}function FS(v,C,k,j){var se=v.length;for(k=qr(k),k<0&&(k=-k>se?0:se+k),j=j===t||j>se?se:qr(j),j<0&&(j+=se),j=k>j?0:sO(j);k<j;)v[k++]=C;return v}function YC(v,C){var k=[];return pm(v,function(j,se,Te){C(j,se,Te)&&k.push(j)}),k}function Rl(v,C,k,j,se){var Te=-1,We=v.length;for(k||(k=voe),se||(se=[]);++Te<We;){var rt=v[Te];C>0&&k(rt)?C>1?Rl(rt,C-1,k,j,se):is(se,rt):j||(se[se.length]=rt)}return se}var ny=fL(),qC=fL(!0);function fh(v,C){return v&&ny(v,C,tc)}function ry(v,C){return v&&qC(v,C,tc)}function gh(v,C){return Li(C,function(k){return Kf(v[k])})}function Wf(v,C){C=g0(C,v);for(var k=0,j=C.length;v!=null&&k<j;)v=v[gm(C[k++])];return k&&k==j?v:t}function ZC(v,C,k){var j=C(v);return Pr(v)?j:is(j,k(v))}function vc(v){return v==null?v===t?no:Rn:Yh&&Yh in hn(v)?uoe(v):Soe(v)}function sy(v,C){return v>C}function LS(v,C){return v!=null&&ss.call(v,C)}function OS(v,C){return v!=null&&C in hn(v)}function NS(v,C,k){return v>=st(C,k)&&v<Pe(C,k)}function oy(v,C,k){for(var j=k?Ii:nn,se=v[0].length,Te=v.length,We=Te,rt=ht(Te),pt=1/0,ni=[];We--;){var si=v[We];We&&C&&(si=Oi(si,Vr(C))),pt=st(si.length,pt),rt[We]=!k&&(C||se>=120&&si.length>=120)?new Hf(We&&si):t}si=v[0];var pi=-1,Ki=rt[0];e:for(;++pi<se&&ni.length<pt;){var Tn=si[pi],ir=C?C(Tn):Tn;if(Tn=k||Tn!==0?Tn:0,!(Ki?Lo(Ki,ir):j(ni,ir,k))){for(We=Te;--We;){var Qr=rt[We];if(!(Qr?Lo(Qr,ir):j(v[We],ir,k)))continue e}Ki&&Ki.push(ir),ni.push(Tn)}}return ni}function yp(v,C,k,j){return fh(v,function(se,Te,We){C(j,k(se),Te,We)}),j}function vh(v,C,k){C=g0(C,v),v=PL(v,C);var j=v==null?v:v[gm(Ch(C))];return j==null?t:Ne(j,v,k)}function XC(v){return Oa(v)&&vc(v)==at}function VS(v){return Oa(v)&&vc(v)==Ts}function BS(v){return Oa(v)&&vc(v)==ot}function V2(v,C,k,j,se){return v===C?!0:v==null||C==null||!Oa(v)&&!Oa(C)?v!==v&&C!==C:zS(v,C,k,j,V2,se)}function zS(v,C,k,j,se,Te){var We=Pr(v),rt=Pr(C),pt=We?yt:Gc(v),ni=rt?yt:Gc(C);pt=pt==at?bi:pt,ni=ni==at?bi:ni;var si=pt==bi,pi=ni==bi,Ki=pt==ni;if(Ki&&y0(v)){if(!y0(C))return!1;We=!0,si=!1}if(Ki&&!si)return Te||(Te=new ku),We||n4(v)?TL(v,C,k,j,se,Te):coe(v,C,pt,k,j,se,Te);if(!(k&m)){var Tn=si&&ss.call(v,"__wrapped__"),ir=pi&&ss.call(C,"__wrapped__");if(Tn||ir){var Qr=Tn?v.value():v,nr=ir?C.value():C;return Te||(Te=new ku),se(Qr,nr,k,j,Te)}}return Ki?(Te||(Te=new ku),doe(v,C,k,j,se,Te)):!1}function ay(v){return Oa(v)&&Gc(v)==_i}function mm(v,C,k,j){var se=k.length,Te=se,We=!j;if(v==null)return!Te;for(v=hn(v);se--;){var rt=k[se];if(We&&rt[2]?rt[1]!==v[rt[0]]:!(rt[0]in v))return!1}for(;++se<Te;){rt=k[se];var pt=rt[0],ni=v[pt],si=rt[1];if(We&&rt[2]){if(ni===t&&!(pt in v))return!1}else{var pi=new ku;if(j)var Ki=j(ni,si,pt,v,C,pi);if(!(Ki===t?V2(si,ni,m|f,j,pi):Ki))return!1}}return!0}function B2(v){if(!wa(v)||_oe(v))return!1;var C=Kf(v)?Km:Ti;return C.test(H2(v))}function xs(v){return Oa(v)&&vc(v)==or}function S(v){return Oa(v)&&Gc(v)==wn}function P(v){return Oa(v)&&p8(v.length)&&!!Yr[vc(v)]}function U(v){return typeof v=="function"?v:v==null?Qd:typeof v=="object"?Pr(v)?ar(v[0],v[1]):rn(v):gO(v)}function J(v){if(!dy(v))return ue(v);var C=[];for(var k in hn(v))ss.call(v,k)&&k!="constructor"&&C.push(k);return C}function fe(v){if(!wa(v))return woe(v);var C=dy(v),k=[];for(var j in v)j=="constructor"&&(C||!ss.call(v,j))||k.push(j);return k}function Qe(v,C){return v<C}function Wt(v,C){var k=-1,j=Zd(v)?ht(v.length):[];return pm(v,function(se,Te,We){j[++k]=C(se,Te,We)}),j}function rn(v){var C=t9(v);return C.length==1&&C[0][2]?IL(C[0][0],C[0][1]):function(k){return k===v||mm(k,v,C)}}function ar(v,C){return n9(v)&&kL(C)?IL(gm(v),C):function(k){var j=p9(k,v);return j===t&&j===C?m9(k,v):V2(C,j,m|f)}}function Xr(v,C,k,j,se){v!==C&&ny(C,function(Te,We){if(se||(se=new ku),wa(Te))yc(v,C,We,k,Xr,j,se);else{var rt=j?j(s9(v,We),Te,We+"",v,C,se):t;rt===t&&(rt=Te),ey(v,We,rt)}},Xd)}function yc(v,C,k,j,se,Te,We){var rt=s9(v,k),pt=s9(C,k),ni=We.get(pt);if(ni){ey(v,k,ni);return}var si=Te?Te(rt,pt,k+"",v,C,We):t,pi=si===t;if(pi){var Ki=Pr(pt),Tn=!Ki&&y0(pt),ir=!Ki&&!Tn&&n4(pt);si=pt,Ki||Tn||ir?Pr(rt)?si=rt:Za(rt)?si=qd(rt):Tn?(pi=!1,si=cL(pt,!0)):ir?(pi=!1,si=dL(pt,!0)):si=[]:hy(pt)||G2(pt)?(si=rt,G2(rt)?si=oO(rt):(!wa(rt)||Kf(rt))&&(si=ML(pt))):pi=!1}pi&&(We.set(pt,si),se(si,pt,j,Te,We),We.delete(pt)),ey(v,k,si)}function yh(v,C){var k=v.length;if(k)return C+=C<0?k:0,$f(C,k)?v[C]:t}function _p(v,C,k){C.length?C=Oi(C,function(Te){return Pr(Te)?function(We){return Wf(We,Te.length===1?Te[0]:Te)}:Te}):C=[Qd];var j=-1;C=Oi(C,Vr(Xn()));var se=Wt(v,function(Te,We,rt){var pt=Oi(C,function(ni){return ni(Te)});return{criteria:pt,index:++j,value:Te}});return Oe(se,function(Te,We){return toe(Te,We,k)})}function Wse(v,C){return eL(v,C,function(k,j){return m9(v,j)})}function eL(v,C,k){for(var j=-1,se=C.length,Te={};++j<se;){var We=C[j],rt=Wf(v,We);k(rt,We)&&ly(Te,g0(We,v),rt)}return Te}function Use(v){return function(C){return Wf(C,v)}}function HS(v,C,k,j){var se=j?Fo:ho,Te=-1,We=C.length,rt=v;for(v===C&&(C=qd(C)),k&&(rt=Oi(v,Vr(k)));++Te<We;)for(var pt=0,ni=C[Te],si=k?k(ni):ni;(pt=se(rt,si,pt,j))>-1;)rt!==v&&Kh.call(rt,pt,1),Kh.call(v,pt,1);return v}function tL(v,C){for(var k=v?C.length:0,j=k-1;k--;){var se=C[k];if(k==j||se!==Te){var Te=se;$f(se)?Kh.call(v,se,1):jS(v,se)}}return v}function GS(v,C){return v+ph(Ui()*(C-v+1))}function jse(v,C,k,j){for(var se=-1,Te=Pe(zf((C-v)/(k||1)),0),We=ht(Te);Te--;)We[j?Te:++se]=v,v+=k;return We}function WS(v,C){var k="";if(!v||C<1||C>ze)return k;do C%2&&(k+=v),C=ph(C/2),C&&(v+=v);while(C);return k}function os(v,C){return o9(AL(v,C,Qd),v+"")}function $se(v){return jC(r4(v))}function Kse(v,C){var k=r4(v);return a8(k,Gf(C,0,k.length))}function ly(v,C,k,j){if(!wa(v))return v;C=g0(C,v);for(var se=-1,Te=C.length,We=Te-1,rt=v;rt!=null&&++se<Te;){var pt=gm(C[se]),ni=k;if(pt==="__proto__"||pt==="constructor"||pt==="prototype")return v;if(se!=We){var si=rt[pt];ni=j?j(si,pt,rt):t,ni===t&&(ni=wa(si)?si:$f(C[se+1])?[]:{})}N2(rt,pt,ni),rt=rt[pt]}return v}var iL=de?function(v,C){return de.set(v,C),v}:Qd,Yse=A1?function(v,C){return A1(v,"toString",{configurable:!0,enumerable:!1,value:g9(C),writable:!0})}:Qd;function qse(v){return a8(r4(v))}function _h(v,C,k){var j=-1,se=v.length;C<0&&(C=-C>se?0:se+C),k=k>se?se:k,k<0&&(k+=se),se=C>k?0:k-C>>>0,C>>>=0;for(var Te=ht(se);++j<se;)Te[j]=v[j+C];return Te}function Zse(v,C){var k;return pm(v,function(j,se,Te){return k=C(j,se,Te),!k}),!!k}function QC(v,C,k){var j=0,se=v==null?j:v.length;if(typeof C=="number"&&C===C&&se<=Ft){for(;j<se;){var Te=j+se>>>1,We=v[Te];We!==null&&!Au(We)&&(k?We<=C:We<C)?j=Te+1:se=Te}return se}return US(v,C,Qd,k)}function US(v,C,k,j){var se=0,Te=v==null?0:v.length;if(Te===0)return 0;C=k(C);for(var We=C!==C,rt=C===null,pt=Au(C),ni=C===t;se<Te;){var si=ph((se+Te)/2),pi=k(v[si]),Ki=pi!==t,Tn=pi===null,ir=pi===pi,Qr=Au(pi);if(We)var nr=j||ir;else ni?nr=ir&&(j||Ki):rt?nr=ir&&Ki&&(j||!Tn):pt?nr=ir&&Ki&&!Tn&&(j||!Qr):Tn||Qr?nr=!1:nr=j?pi<=C:pi<C;nr?se=si+1:Te=si}return st(Te,ft)}function nL(v,C){for(var k=-1,j=v.length,se=0,Te=[];++k<j;){var We=v[k],rt=C?C(We):We;if(!k||!Cp(rt,pt)){var pt=rt;Te[se++]=We===0?0:We}}return Te}function rL(v){return typeof v=="number"?v:Au(v)?Ae:+v}function Iu(v){if(typeof v=="string")return v;if(Pr(v))return Oi(v,Iu)+"";if(Au(v))return Tr?Tr.call(v):"";var C=v+"";return C=="0"&&1/v==-je?"-0":C}function f0(v,C,k){var j=-1,se=nn,Te=v.length,We=!0,rt=[],pt=rt;if(k)We=!1,se=Ii;else if(Te>=n){var ni=C?null:aoe(v);if(ni)return kc(ni);We=!1,se=Lo,pt=new Hf}else pt=C?[]:rt;e:for(;++j<Te;){var si=v[j],pi=C?C(si):si;if(si=k||si!==0?si:0,We&&pi===pi){for(var Ki=pt.length;Ki--;)if(pt[Ki]===pi)continue e;C&&pt.push(pi),rt.push(si)}else se(pt,pi,k)||(pt!==rt&&pt.push(pi),rt.push(si))}return rt}function jS(v,C){return C=g0(C,v),v=PL(v,C),v==null||delete v[gm(Ch(C))]}function sL(v,C,k,j){return ly(v,C,k(Wf(v,C)),j)}function JC(v,C,k,j){for(var se=v.length,Te=j?se:-1;(j?Te--:++Te<se)&&C(v[Te],Te,v););return k?_h(v,j?0:Te,j?Te+1:se):_h(v,j?Te+1:0,j?se:Te)}function oL(v,C){var k=v;return k instanceof hr&&(k=k.value()),Io(C,function(j,se){return se.func.apply(se.thisArg,is([j],se.args))},k)}function $S(v,C,k){var j=v.length;if(j<2)return j?f0(v[0]):[];for(var se=-1,Te=ht(j);++se<j;)for(var We=v[se],rt=-1;++rt<j;)rt!=se&&(Te[se]=m0(Te[se]||We,v[rt],C,k));return f0(Rl(Te,1),C,k)}function aL(v,C,k){for(var j=-1,se=v.length,Te=C.length,We={};++j<se;){var rt=j<Te?C[j]:t;k(We,v[j],rt)}return We}function KS(v){return Za(v)?v:[]}function YS(v){return typeof v=="function"?v:Qd}function g0(v,C){return Pr(v)?v:n9(v,C)?[v]:OL(po(v))}var Xse=os;function v0(v,C,k){var j=v.length;return k=k===t?j:k,!C&&k>=j?v:_h(v,C,k)}var lL=Yg||function(v){return la.clearTimeout(v)};function cL(v,C){if(C)return v.slice();var k=v.length,j=L2?L2(k):new v.constructor(k);return v.copy(j),j}function qS(v){var C=new v.constructor(v.byteLength);return new mp(C).set(new mp(v)),C}function Qse(v,C){var k=C?qS(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.byteLength)}function Jse(v){var C=new v.constructor(v.source,$a.exec(v));return C.lastIndex=v.lastIndex,C}function eoe(v){return Si?hn(Si.call(v)):{}}function dL(v,C){var k=C?qS(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.length)}function uL(v,C){if(v!==C){var k=v!==t,j=v===null,se=v===v,Te=Au(v),We=C!==t,rt=C===null,pt=C===C,ni=Au(C);if(!rt&&!ni&&!Te&&v>C||Te&&We&&pt&&!rt&&!ni||j&&We&&pt||!k&&pt||!se)return 1;if(!j&&!Te&&!ni&&v<C||ni&&k&&se&&!j&&!Te||rt&&k&&se||!We&&se||!pt)return-1}return 0}function toe(v,C,k){for(var j=-1,se=v.criteria,Te=C.criteria,We=se.length,rt=k.length;++j<We;){var pt=uL(se[j],Te[j]);if(pt){if(j>=rt)return pt;var ni=k[j];return pt*(ni=="desc"?-1:1)}}return v.index-C.index}function hL(v,C,k,j){for(var se=-1,Te=v.length,We=k.length,rt=-1,pt=C.length,ni=Pe(Te-We,0),si=ht(pt+ni),pi=!j;++rt<pt;)si[rt]=C[rt];for(;++se<We;)(pi||se<Te)&&(si[k[se]]=v[se]);for(;ni--;)si[rt++]=v[se++];return si}function pL(v,C,k,j){for(var se=-1,Te=v.length,We=-1,rt=k.length,pt=-1,ni=C.length,si=Pe(Te-rt,0),pi=ht(si+ni),Ki=!j;++se<si;)pi[se]=v[se];for(var Tn=se;++pt<ni;)pi[Tn+pt]=C[pt];for(;++We<rt;)(Ki||se<Te)&&(pi[Tn+k[We]]=v[se++]);return pi}function qd(v,C){var k=-1,j=v.length;for(C||(C=ht(j));++k<j;)C[k]=v[k];return C}function fm(v,C,k,j){var se=!k;k||(k={});for(var Te=-1,We=C.length;++Te<We;){var rt=C[Te],pt=j?j(k[rt],v[rt],rt,k,v):t;pt===t&&(pt=v[rt]),se?vp(k,rt,pt):N2(k,rt,pt)}return k}function ioe(v,C){return fm(v,i9(v),C)}function noe(v,C){return fm(v,DL(v),C)}function e8(v,C){return function(k,j){var se=Pr(k)?ct:AS,Te=C?C():{};return se(k,v,Xn(j,2),Te)}}function e4(v){return os(function(C,k){var j=-1,se=k.length,Te=se>1?k[se-1]:t,We=se>2?k[2]:t;for(Te=v.length>3&&typeof Te=="function"?(se--,Te):t,We&&Sd(k[0],k[1],We)&&(Te=se<3?t:Te,se=1),C=hn(C);++j<se;){var rt=k[j];rt&&v(C,rt,j,Te)}return C})}function mL(v,C){return function(k,j){if(k==null)return k;if(!Zd(k))return v(k,j);for(var se=k.length,Te=C?se:-1,We=hn(k);(C?Te--:++Te<se)&&j(We[Te],Te,We)!==!1;);return k}}function fL(v){return function(C,k,j){for(var se=-1,Te=hn(C),We=j(C),rt=We.length;rt--;){var pt=We[v?rt:++se];if(k(Te[pt],pt,Te)===!1)break}return C}}function roe(v,C,k){var j=C&_,se=cy(v);function Te(){var We=this&&this!==la&&this instanceof Te?se:v;return We.apply(j?k:this,arguments)}return Te}function gL(v){return function(C){C=po(C);var k=Hc(C)?ol(C):t,j=k?k[0]:C.charAt(0),se=k?v0(k,1).join(""):C.slice(1);return j[v]()+se}}function t4(v){return function(C){return Io(mO(pO(C).replace(rl,"")),v,"")}}function cy(v){return function(){var C=arguments;switch(C.length){case 0:return new v;case 1:return new v(C[0]);case 2:return new v(C[0],C[1]);case 3:return new v(C[0],C[1],C[2]);case 4:return new v(C[0],C[1],C[2],C[3]);case 5:return new v(C[0],C[1],C[2],C[3],C[4]);case 6:return new v(C[0],C[1],C[2],C[3],C[4],C[5]);case 7:return new v(C[0],C[1],C[2],C[3],C[4],C[5],C[6])}var k=Ds(v.prototype),j=v.apply(k,C);return wa(j)?j:k}}function soe(v,C,k){var j=cy(v);function se(){for(var Te=arguments.length,We=ht(Te),rt=Te,pt=i4(se);rt--;)We[rt]=arguments[rt];var ni=Te<3&&We[0]!==pt&&We[Te-1]!==pt?[]:_l(We,pt);if(Te-=ni.length,Te<k)return xL(v,C,t8,se.placeholder,t,We,ni,t,t,k-Te);var si=this&&this!==la&&this instanceof se?j:v;return Ne(si,this,We)}return se}function vL(v){return function(C,k,j){var se=hn(C);if(!Zd(C)){var Te=Xn(k,3);C=tc(C),k=function(rt){return Te(se[rt],rt,se)}}var We=v(C,k,j);return We>-1?se[Te?C[We]:We]:t}}function yL(v){return jf(function(C){var k=C.length,j=k,se=Zo.prototype.thru;for(v&&C.reverse();j--;){var Te=C[j];if(typeof Te!="function")throw new _r(r);if(se&&!We&&s8(Te)=="wrapper")var We=new Zo([],!0)}for(j=We?j:k;++j<k;){Te=C[j];var rt=s8(Te),pt=rt=="wrapper"?e9(Te):t;pt&&r9(pt[0])&&pt[1]==(G|E|I|A)&&!pt[4].length&&pt[9]==1?We=We[s8(pt[0])].apply(We,pt[3]):We=Te.length==1&&r9(Te)?We[rt]():We.thru(Te)}return function(){var ni=arguments,si=ni[0];if(We&&ni.length==1&&Pr(si))return We.plant(si).value();for(var pi=0,Ki=k?C[pi].apply(this,ni):si;++pi<k;)Ki=C[pi].call(this,Ki);return Ki}})}function t8(v,C,k,j,se,Te,We,rt,pt,ni){var si=C&G,pi=C&_,Ki=C&x,Tn=C&(E|M),ir=C&Y,Qr=Ki?t:cy(v);function nr(){for(var fs=arguments.length,As=ht(fs),Pu=fs;Pu--;)As[Pu]=arguments[Pu];if(Tn)var Td=i4(nr),Ru=uu(As,Td);if(j&&(As=hL(As,j,se,Tn)),Te&&(As=pL(As,Te,We,Tn)),fs-=Ru,Tn&&fs<ni){var Xa=_l(As,Td);return xL(v,C,t8,nr.placeholder,k,As,Xa,rt,pt,ni-fs)}var xp=pi?k:this,qf=Ki?xp[v]:v;return fs=As.length,rt?As=Toe(As,rt):ir&&fs>1&&As.reverse(),si&&pt<fs&&(As.length=pt),this&&this!==la&&this instanceof nr&&(qf=Qr||cy(qf)),qf.apply(xp,As)}return nr}function _L(v,C){return function(k,j){return yp(k,v,C(j),{})}}function i8(v,C){return function(k,j){var se;if(k===t&&j===t)return C;if(k!==t&&(se=k),j!==t){if(se===t)return j;typeof k=="string"||typeof j=="string"?(k=Iu(k),j=Iu(j)):(k=rL(k),j=rL(j)),se=v(k,j)}return se}}function ZS(v){return jf(function(C){return C=Oi(C,Vr(Xn())),os(function(k){var j=this;return v(C,function(se){return Ne(se,j,k)})})})}function n8(v,C){C=C===t?" ":Iu(C);var k=C.length;if(k<2)return k?WS(C,v):C;var j=WS(C,zf(v/Hl(C)));return Hc(C)?v0(ol(j),0,v).join(""):j.slice(0,v)}function ooe(v,C,k,j){var se=C&_,Te=cy(v);function We(){for(var rt=-1,pt=arguments.length,ni=-1,si=j.length,pi=ht(si+pt),Ki=this&&this!==la&&this instanceof We?Te:v;++ni<si;)pi[ni]=j[ni];for(;pt--;)pi[ni++]=arguments[++rt];return Ne(Ki,se?k:this,pi)}return We}function CL(v){return function(C,k,j){return j&&typeof j!="number"&&Sd(C,k,j)&&(k=j=t),C=Yf(C),k===t?(k=C,C=0):k=Yf(k),j=j===t?C<k?1:-1:Yf(j),jse(C,k,j,v)}}function r8(v){return function(C,k){return typeof C=="string"&&typeof k=="string"||(C=xh(C),k=xh(k)),v(C,k)}}function xL(v,C,k,j,se,Te,We,rt,pt,ni){var si=C&E,pi=si?We:t,Ki=si?t:We,Tn=si?Te:t,ir=si?t:Te;C|=si?I:z,C&=~(si?z:I),C&D||(C&=~(_|x));var Qr=[v,C,se,Tn,pi,ir,Ki,rt,pt,ni],nr=k.apply(t,Qr);return r9(v)&&RL(nr,Qr),nr.placeholder=j,FL(nr,v,C)}function XS(v){var C=Br[v];return function(k,j){if(k=xh(k),j=j==null?0:st(qr(j),292),j&&N(k)){var se=(po(k)+"e").split("e"),Te=C(se[0]+"e"+(+se[1]+j));return se=(po(Te)+"e").split("e"),+(se[0]+"e"+(+se[1]-j))}return C(k)}}var aoe=q&&1/kc(new q([,-0]))[1]==je?function(v){return new q(v)}:_9;function bL(v){return function(C){var k=Gc(C);return k==_i?jh(C):k==wn?Y0(C):Bi(C,v(C))}}function Uf(v,C,k,j,se,Te,We,rt){var pt=C&x;if(!pt&&typeof v!="function")throw new _r(r);var ni=j?j.length:0;if(ni||(C&=~(I|z),j=se=t),We=We===t?We:Pe(qr(We),0),rt=rt===t?rt:qr(rt),ni-=se?se.length:0,C&z){var si=j,pi=se;j=se=t}var Ki=pt?t:e9(v),Tn=[v,C,k,j,se,si,pi,Te,We,rt];if(Ki&&boe(Tn,Ki),v=Tn[0],C=Tn[1],k=Tn[2],j=Tn[3],se=Tn[4],rt=Tn[9]=Tn[9]===t?pt?0:v.length:Pe(Tn[9]-ni,0),!rt&&C&(E|M)&&(C&=~(E|M)),!C||C==_)var ir=roe(v,C,k);else C==E||C==M?ir=soe(v,C,rt):(C==I||C==(_|I))&&!se.length?ir=ooe(v,C,k,j):ir=t8.apply(t,Tn);var Qr=Ki?iL:RL;return FL(Qr(ir,Tn),v,C)}function wL(v,C,k,j){return v===t||Cp(v,Gl[k])&&!ss.call(j,k)?C:v}function SL(v,C,k,j,se,Te){return wa(v)&&wa(C)&&(Te.set(C,v),Xr(v,C,t,SL,Te),Te.delete(C)),v}function loe(v){return hy(v)?t:v}function TL(v,C,k,j,se,Te){var We=k&m,rt=v.length,pt=C.length;if(rt!=pt&&!(We&&pt>rt))return!1;var ni=Te.get(v),si=Te.get(C);if(ni&&si)return ni==C&&si==v;var pi=-1,Ki=!0,Tn=k&f?new Hf:t;for(Te.set(v,C),Te.set(C,v);++pi<rt;){var ir=v[pi],Qr=C[pi];if(j)var nr=We?j(Qr,ir,pi,C,v,Te):j(ir,Qr,pi,v,C,Te);if(nr!==t){if(nr)continue;Ki=!1;break}if(Tn){if(!sl(C,function(fs,As){if(!Lo(Tn,As)&&(ir===fs||se(ir,fs,k,j,Te)))return Tn.push(As)})){Ki=!1;break}}else if(!(ir===Qr||se(ir,Qr,k,j,Te))){Ki=!1;break}}return Te.delete(v),Te.delete(C),Ki}function coe(v,C,k,j,se,Te,We){switch(k){case ea:if(v.byteLength!=C.byteLength||v.byteOffset!=C.byteOffset)return!1;v=v.buffer,C=C.buffer;case Ts:return!(v.byteLength!=C.byteLength||!Te(new mp(v),new mp(C)));case Re:case ot:case ln:return Cp(+v,+C);case zt:return v.name==C.name&&v.message==C.message;case or:case gn:return v==C+"";case _i:var rt=jh;case wn:var pt=j&m;if(rt||(rt=kc),v.size!=C.size&&!pt)return!1;var ni=We.get(v);if(ni)return ni==C;j|=f,We.set(v,C);var si=TL(rt(v),rt(C),j,se,Te,We);return We.delete(v),si;case ts:if(Si)return Si.call(v)==Si.call(C)}return!1}function doe(v,C,k,j,se,Te){var We=k&m,rt=QS(v),pt=rt.length,ni=QS(C),si=ni.length;if(pt!=si&&!We)return!1;for(var pi=pt;pi--;){var Ki=rt[pi];if(!(We?Ki in C:ss.call(C,Ki)))return!1}var Tn=Te.get(v),ir=Te.get(C);if(Tn&&ir)return Tn==C&&ir==v;var Qr=!0;Te.set(v,C),Te.set(C,v);for(var nr=We;++pi<pt;){Ki=rt[pi];var fs=v[Ki],As=C[Ki];if(j)var Pu=We?j(As,fs,Ki,C,v,Te):j(fs,As,Ki,v,C,Te);if(!(Pu===t?fs===As||se(fs,As,k,j,Te):Pu)){Qr=!1;break}nr||(nr=Ki=="constructor")}if(Qr&&!nr){var Td=v.constructor,Ru=C.constructor;Td!=Ru&&"constructor"in v&&"constructor"in C&&!(typeof Td=="function"&&Td instanceof Td&&typeof Ru=="function"&&Ru instanceof Ru)&&(Qr=!1)}return Te.delete(v),Te.delete(C),Qr}function jf(v){return o9(AL(v,t,zL),v+"")}function QS(v){return ZC(v,tc,i9)}function JS(v){return ZC(v,Xd,DL)}var e9=de?function(v){return de.get(v)}:_9;function s8(v){for(var C=v.name+"",k=De[C],j=ss.call(De,C)?k.length:0;j--;){var se=k[j],Te=se.func;if(Te==null||Te==v)return se.name}return C}function i4(v){var C=ss.call(ae,"placeholder")?ae:v;return C.placeholder}function Xn(){var v=ae.iteratee||v9;return v=v===v9?U:v,arguments.length?v(arguments[0],arguments[1]):v}function o8(v,C){var k=v.__data__;return yoe(C)?k[typeof C=="string"?"string":"hash"]:k.map}function t9(v){for(var C=tc(v),k=C.length;k--;){var j=C[k],se=v[j];C[k]=[j,se,kL(se)]}return C}function z2(v,C){var k=K0(v,C);return B2(k)?k:t}function uoe(v){var C=ss.call(v,Yh),k=v[Yh];try{v[Yh]=t;var j=!0}catch{}var se=Bf.call(v);return j&&(C?v[Yh]=k:delete v[Yh]),se}var i9=La?function(v){return v==null?[]:(v=hn(v),Li(La(v),function(C){return u0.call(v,C)}))}:C9,DL=La?function(v){for(var C=[];v;)is(C,i9(v)),v=um(v);return C}:C9,Gc=vc;(Wr&&Gc(new Wr(new ArrayBuffer(1)))!=ea||$s&&Gc(new $s)!=_i||qo&&Gc(qo.resolve())!=Mn||q&&Gc(new q)!=wn||oe&&Gc(new oe)!=Ho)&&(Gc=function(v){var C=vc(v),k=C==bi?v.constructor:t,j=k?H2(k):"";if(j)switch(j){case Le:return ea;case xt:return _i;case Dt:return Mn;case Ut:return wn;case Jt:return Ho}return C});function hoe(v,C,k){for(var j=-1,se=k.length;++j<se;){var Te=k[j],We=Te.size;switch(Te.type){case"drop":v+=We;break;case"dropRight":C-=We;break;case"take":C=st(C,v+We);break;case"takeRight":v=Pe(v,C-We);break}}return{start:v,end:C}}function poe(v){var C=v.match(Qs);return C?C[1].split(Nr):[]}function EL(v,C,k){C=g0(C,v);for(var j=-1,se=C.length,Te=!1;++j<se;){var We=gm(C[j]);if(!(Te=v!=null&&k(v,We)))break;v=v[We]}return Te||++j!=se?Te:(se=v==null?0:v.length,!!se&&p8(se)&&$f(We,se)&&(Pr(v)||G2(v)))}function moe(v){var C=v.length,k=new v.constructor(C);return C&&typeof v[0]=="string"&&ss.call(v,"index")&&(k.index=v.index,k.input=v.input),k}function ML(v){return typeof v.constructor=="function"&&!dy(v)?Ds(um(v)):{}}function foe(v,C,k){var j=v.constructor;switch(C){case Ts:return qS(v);case Re:case ot:return new j(+v);case ea:return Qse(v,k);case co:case Zn:case gl:case sc:case Xl:case Xs:case Ya:case qa:case Nl:return dL(v,k);case _i:return new j;case ln:case gn:return new j(v);case or:return Jse(v);case wn:return new j;case ts:return eoe(v)}}function goe(v,C){var k=C.length;if(!k)return v;var j=k-1;return C[j]=(k>1?"& ":"")+C[j],C=C.join(k>2?", ":" "),v.replace(fr,`{
/* [wrapped with `+C+`] */
`)}function voe(v){return Pr(v)||G2(v)||!!(q3&&v&&v[q3])}function $f(v,C){var k=typeof v;return C=C??ze,!!C&&(k=="number"||k!="symbol"&&Eo.test(v))&&v>-1&&v%1==0&&v<C}function Sd(v,C,k){if(!wa(k))return!1;var j=typeof C;return(j=="number"?Zd(k)&&$f(C,k.length):j=="string"&&C in k)?Cp(k[C],v):!1}function n9(v,C){if(Pr(v))return!1;var k=typeof v;return k=="number"||k=="symbol"||k=="boolean"||v==null||Au(v)?!0:ja.test(v)||!Tl.test(v)||C!=null&&v in hn(C)}function yoe(v){var C=typeof v;return C=="string"||C=="number"||C=="symbol"||C=="boolean"?v!=="__proto__":v===null}function r9(v){var C=s8(v),k=ae[C];if(typeof k!="function"||!(C in hr.prototype))return!1;if(v===k)return!0;var j=e9(k);return!!j&&v===j[0]}function _oe(v){return!!Vf&&Vf in v}var Coe=bd?Kf:x9;function dy(v){var C=v&&v.constructor,k=typeof C=="function"&&C.prototype||Gl;return v===k}function kL(v){return v===v&&!wa(v)}function IL(v,C){return function(k){return k==null?!1:k[v]===C&&(C!==t||v in hn(k))}}function xoe(v){var C=u8(v,function(j){return k.size===a&&k.clear(),j}),k=C.cache;return C}function boe(v,C){var k=v[1],j=C[1],se=k|j,Te=se<(_|x|G),We=j==G&&k==E||j==G&&k==A&&v[7].length<=C[8]||j==(G|A)&&C[7].length<=C[8]&&k==E;if(!(Te||We))return v;j&_&&(v[2]=C[2],se|=k&_?0:D);var rt=C[3];if(rt){var pt=v[3];v[3]=pt?hL(pt,rt,C[4]):rt,v[4]=pt?_l(v[3],l):C[4]}return rt=C[5],rt&&(pt=v[5],v[5]=pt?pL(pt,rt,C[6]):rt,v[6]=pt?_l(v[5],l):C[6]),rt=C[7],rt&&(v[7]=rt),j&G&&(v[8]=v[8]==null?C[8]:st(v[8],C[8])),v[9]==null&&(v[9]=C[9]),v[0]=C[0],v[1]=se,v}function woe(v){var C=[];if(v!=null)for(var k in hn(v))C.push(k);return C}function Soe(v){return Bf.call(v)}function AL(v,C,k){return C=Pe(C===t?v.length-1:C,0),function(){for(var j=arguments,se=-1,Te=Pe(j.length-C,0),We=ht(Te);++se<Te;)We[se]=j[C+se];se=-1;for(var rt=ht(C+1);++se<C;)rt[se]=j[se];return rt[C]=k(We),Ne(v,this,rt)}}function PL(v,C){return C.length<2?v:Wf(v,_h(C,0,-1))}function Toe(v,C){for(var k=v.length,j=st(C.length,k),se=qd(v);j--;){var Te=C[j];v[j]=$f(Te,k)?se[Te]:t}return v}function s9(v,C){if(!(C==="constructor"&&typeof v[C]=="function")&&C!="__proto__")return v[C]}var RL=LL(iL),uy=J6||function(v,C){return la.setTimeout(v,C)},o9=LL(Yse);function FL(v,C,k){var j=C+"";return o9(v,goe(j,Doe(poe(j),k)))}function LL(v){var C=0,k=0;return function(){var j=ti(),se=ce-(j-k);if(k=j,se>0){if(++C>=pe)return arguments[0]}else C=0;return v.apply(t,arguments)}}function a8(v,C){var k=-1,j=v.length,se=j-1;for(C=C===t?j:C;++k<C;){var Te=GS(k,se),We=v[Te];v[Te]=v[k],v[k]=We}return v.length=C,v}var OL=xoe(function(v){var C=[];return v.charCodeAt(0)===46&&C.push(""),v.replace(Dr,function(k,j,se,Te){C.push(se?Te.replace(Ra,"$1"):j||k)}),C});function gm(v){if(typeof v=="string"||Au(v))return v;var C=v+"";return C=="0"&&1/v==-je?"-0":C}function H2(v){if(v!=null){try{return Fd.call(v)}catch{}try{return v+""}catch{}}return""}function Doe(v,C){return kt(Tt,function(k){var j="_."+k[0];C&k[1]&&!nn(v,j)&&v.push(j)}),v.sort()}function NL(v){if(v instanceof hr)return v.clone();var C=new Zo(v.__wrapped__,v.__chain__);return C.__actions__=qd(v.__actions__),C.__index__=v.__index__,C.__values__=v.__values__,C}function Eoe(v,C,k){(k?Sd(v,C,k):C===t)?C=1:C=Pe(qr(C),0);var j=v==null?0:v.length;if(!j||C<1)return[];for(var se=0,Te=0,We=ht(zf(j/C));se<j;)We[Te++]=_h(v,se,se+=C);return We}function Moe(v){for(var C=-1,k=v==null?0:v.length,j=0,se=[];++C<k;){var Te=v[C];Te&&(se[j++]=Te)}return se}function koe(){var v=arguments.length;if(!v)return[];for(var C=ht(v-1),k=arguments[0],j=v;j--;)C[j-1]=arguments[j];return is(Pr(k)?qd(k):[k],Rl(C,1))}var Ioe=os(function(v,C){return Za(v)?m0(v,Rl(C,1,Za,!0)):[]}),Aoe=os(function(v,C){var k=Ch(C);return Za(k)&&(k=t),Za(v)?m0(v,Rl(C,1,Za,!0),Xn(k,2)):[]}),Poe=os(function(v,C){var k=Ch(C);return Za(k)&&(k=t),Za(v)?m0(v,Rl(C,1,Za,!0),t,k):[]});function Roe(v,C,k){var j=v==null?0:v.length;return j?(C=k||C===t?1:qr(C),_h(v,C<0?0:C,j)):[]}function Foe(v,C,k){var j=v==null?0:v.length;return j?(C=k||C===t?1:qr(C),C=j-C,_h(v,0,C<0?0:C)):[]}function Loe(v,C){return v&&v.length?JC(v,Xn(C,3),!0,!0):[]}function Ooe(v,C){return v&&v.length?JC(v,Xn(C,3),!0):[]}function Noe(v,C,k,j){var se=v==null?0:v.length;return se?(k&&typeof k!="number"&&Sd(v,C,k)&&(k=0,j=se),FS(v,C,k,j)):[]}function VL(v,C,k){var j=v==null?0:v.length;if(!j)return-1;var se=k==null?0:qr(k);return se<0&&(se=Pe(j+se,0)),gc(v,Xn(C,3),se)}function BL(v,C,k){var j=v==null?0:v.length;if(!j)return-1;var se=j-1;return k!==t&&(se=qr(k),se=k<0?Pe(j+se,0):st(se,j-1)),gc(v,Xn(C,3),se,!0)}function zL(v){var C=v==null?0:v.length;return C?Rl(v,1):[]}function Voe(v){var C=v==null?0:v.length;return C?Rl(v,je):[]}function Boe(v,C){var k=v==null?0:v.length;return k?(C=C===t?1:qr(C),Rl(v,C)):[]}function zoe(v){for(var C=-1,k=v==null?0:v.length,j={};++C<k;){var se=v[C];j[se[0]]=se[1]}return j}function HL(v){return v&&v.length?v[0]:t}function Hoe(v,C,k){var j=v==null?0:v.length;if(!j)return-1;var se=k==null?0:qr(k);return se<0&&(se=Pe(j+se,0)),ho(v,C,se)}function Goe(v){var C=v==null?0:v.length;return C?_h(v,0,-1):[]}var Woe=os(function(v){var C=Oi(v,KS);return C.length&&C[0]===v[0]?oy(C):[]}),Uoe=os(function(v){var C=Ch(v),k=Oi(v,KS);return C===Ch(k)?C=t:k.pop(),k.length&&k[0]===v[0]?oy(k,Xn(C,2)):[]}),joe=os(function(v){var C=Ch(v),k=Oi(v,KS);return C=typeof C=="function"?C:t,C&&k.pop(),k.length&&k[0]===v[0]?oy(k,t,C):[]});function $oe(v,C){return v==null?"":Z.call(v,C)}function Ch(v){var C=v==null?0:v.length;return C?v[C-1]:t}function Koe(v,C,k){var j=v==null?0:v.length;if(!j)return-1;var se=j;return k!==t&&(se=qr(k),se=se<0?Pe(j+se,0):st(se,j-1)),C===C?Kg(v,C,se):gc(v,zc,se,!0)}function Yoe(v,C){return v&&v.length?yh(v,qr(C)):t}var qoe=os(GL);function GL(v,C){return v&&v.length&&C&&C.length?HS(v,C):v}function Zoe(v,C,k){return v&&v.length&&C&&C.length?HS(v,C,Xn(k,2)):v}function Xoe(v,C,k){return v&&v.length&&C&&C.length?HS(v,C,t,k):v}var Qoe=jf(function(v,C){var k=v==null?0:v.length,j=Q3(v,C);return tL(v,Oi(C,function(se){return $f(se,k)?+se:se}).sort(uL)),j});function Joe(v,C){var k=[];if(!(v&&v.length))return k;var j=-1,se=[],Te=v.length;for(C=Xn(C,3);++j<Te;){var We=v[j];C(We,j,v)&&(k.push(We),se.push(j))}return tL(v,se),k}function a9(v){return v==null?v:On.call(v)}function eae(v,C,k){var j=v==null?0:v.length;return j?(k&&typeof k!="number"&&Sd(v,C,k)?(C=0,k=j):(C=C==null?0:qr(C),k=k===t?j:qr(k)),_h(v,C,k)):[]}function tae(v,C){return QC(v,C)}function iae(v,C,k){return US(v,C,Xn(k,2))}function nae(v,C){var k=v==null?0:v.length;if(k){var j=QC(v,C);if(j<k&&Cp(v[j],C))return j}return-1}function rae(v,C){return QC(v,C,!0)}function sae(v,C,k){return US(v,C,Xn(k,2),!0)}function oae(v,C){var k=v==null?0:v.length;if(k){var j=QC(v,C,!0)-1;if(Cp(v[j],C))return j}return-1}function aae(v){return v&&v.length?nL(v):[]}function lae(v,C){return v&&v.length?nL(v,Xn(C,2)):[]}function cae(v){var C=v==null?0:v.length;return C?_h(v,1,C):[]}function dae(v,C,k){return v&&v.length?(C=k||C===t?1:qr(C),_h(v,0,C<0?0:C)):[]}function uae(v,C,k){var j=v==null?0:v.length;return j?(C=k||C===t?1:qr(C),C=j-C,_h(v,C<0?0:C,j)):[]}function hae(v,C){return v&&v.length?JC(v,Xn(C,3),!1,!0):[]}function pae(v,C){return v&&v.length?JC(v,Xn(C,3)):[]}var mae=os(function(v){return f0(Rl(v,1,Za,!0))}),fae=os(function(v){var C=Ch(v);return Za(C)&&(C=t),f0(Rl(v,1,Za,!0),Xn(C,2))}),gae=os(function(v){var C=Ch(v);return C=typeof C=="function"?C:t,f0(Rl(v,1,Za,!0),t,C)});function vae(v){return v&&v.length?f0(v):[]}function yae(v,C){return v&&v.length?f0(v,Xn(C,2)):[]}function _ae(v,C){return C=typeof C=="function"?C:t,v&&v.length?f0(v,t,C):[]}function l9(v){if(!(v&&v.length))return[];var C=0;return v=Li(v,function(k){if(Za(k))return C=Pe(k.length,C),!0}),vi(C,function(k){return Oi(v,Mc(k))})}function WL(v,C){if(!(v&&v.length))return[];var k=l9(v);return C==null?k:Oi(k,function(j){return Ne(C,t,j)})}var Cae=os(function(v,C){return Za(v)?m0(v,C):[]}),xae=os(function(v){return $S(Li(v,Za))}),bae=os(function(v){var C=Ch(v);return Za(C)&&(C=t),$S(Li(v,Za),Xn(C,2))}),wae=os(function(v){var C=Ch(v);return C=typeof C=="function"?C:t,$S(Li(v,Za),t,C)}),Sae=os(l9);function Tae(v,C){return aL(v||[],C||[],N2)}function Dae(v,C){return aL(v||[],C||[],ly)}var Eae=os(function(v){var C=v.length,k=C>1?v[C-1]:t;return k=typeof k=="function"?(v.pop(),k):t,WL(v,k)});function UL(v){var C=ae(v);return C.__chain__=!0,C}function Mae(v,C){return C(v),v}function l8(v,C){return C(v)}var kae=jf(function(v){var C=v.length,k=C?v[0]:0,j=this.__wrapped__,se=function(Te){return Q3(Te,v)};return C>1||this.__actions__.length||!(j instanceof hr)||!$f(k)?this.thru(se):(j=j.slice(k,+k+(C?1:0)),j.__actions__.push({func:l8,args:[se],thisArg:t}),new Zo(j,this.__chain__).thru(function(Te){return C&&!Te.length&&Te.push(t),Te}))});function Iae(){return UL(this)}function Aae(){return new Zo(this.value(),this.__chain__)}function Pae(){this.__values__===t&&(this.__values__=rO(this.value()));var v=this.__index__>=this.__values__.length,C=v?t:this.__values__[this.__index__++];return{done:v,value:C}}function Rae(){return this}function Fae(v){for(var C,k=this;k instanceof lo;){var j=NL(k);j.__index__=0,j.__values__=t,C?se.__wrapped__=j:C=j;var se=j;k=k.__wrapped__}return se.__wrapped__=v,C}function Lae(){var v=this.__wrapped__;if(v instanceof hr){var C=v;return this.__actions__.length&&(C=new hr(this)),C=C.reverse(),C.__actions__.push({func:l8,args:[a9],thisArg:t}),new Zo(C,this.__chain__)}return this.thru(a9)}function Oae(){return oL(this.__wrapped__,this.__actions__)}var Nae=e8(function(v,C,k){ss.call(v,k)?++v[k]:vp(v,k,1)});function Vae(v,C,k){var j=Pr(v)?hi:RS;return k&&Sd(v,C,k)&&(C=t),j(v,Xn(C,3))}function Bae(v,C){var k=Pr(v)?Li:YC;return k(v,Xn(C,3))}var zae=vL(VL),Hae=vL(BL);function Gae(v,C){return Rl(c8(v,C),1)}function Wae(v,C){return Rl(c8(v,C),je)}function Uae(v,C,k){return k=k===t?1:qr(k),Rl(c8(v,C),k)}function jL(v,C){var k=Pr(v)?kt:pm;return k(v,Xn(C,3))}function $L(v,C){var k=Pr(v)?Ht:KC;return k(v,Xn(C,3))}var jae=e8(function(v,C,k){ss.call(v,k)?v[k].push(C):vp(v,k,[C])});function $ae(v,C,k,j){v=Zd(v)?v:r4(v),k=k&&!j?qr(k):0;var se=v.length;return k<0&&(k=Pe(se+k,0)),m8(v)?k<=se&&v.indexOf(C,k)>-1:!!se&&ho(v,C,k)>-1}var Kae=os(function(v,C,k){var j=-1,se=typeof C=="function",Te=Zd(v)?ht(v.length):[];return pm(v,function(We){Te[++j]=se?Ne(C,We,k):vh(We,C,k)}),Te}),Yae=e8(function(v,C,k){vp(v,k,C)});function c8(v,C){var k=Pr(v)?Oi:Wt;return k(v,Xn(C,3))}function qae(v,C,k,j){return v==null?[]:(Pr(C)||(C=C==null?[]:[C]),k=j?t:k,Pr(k)||(k=k==null?[]:[k]),_p(v,C,k))}var Zae=e8(function(v,C,k){v[k?0:1].push(C)},function(){return[[],[]]});function Xae(v,C,k){var j=Pr(v)?Io:we,se=arguments.length<3;return j(v,Xn(C,4),k,se,pm)}function Qae(v,C,k){var j=Pr(v)?Ao:we,se=arguments.length<3;return j(v,Xn(C,4),k,se,KC)}function Jae(v,C){var k=Pr(v)?Li:YC;return k(v,h8(Xn(C,3)))}function ele(v){var C=Pr(v)?jC:$se;return C(v)}function tle(v,C,k){(k?Sd(v,C,k):C===t)?C=1:C=qr(C);var j=Pr(v)?kS:Kse;return j(v,C)}function ile(v){var C=Pr(v)?IS:qse;return C(v)}function nle(v){if(v==null)return 0;if(Zd(v))return m8(v)?Hl(v):v.length;var C=Gc(v);return C==_i||C==wn?v.size:J(v).length}function rle(v,C,k){var j=Pr(v)?sl:Zse;return k&&Sd(v,C,k)&&(C=t),j(v,Xn(C,3))}var sle=os(function(v,C){if(v==null)return[];var k=C.length;return k>1&&Sd(v,C[0],C[1])?C=[]:k>2&&Sd(C[0],C[1],C[2])&&(C=[C[0]]),_p(v,Rl(C,1),[])}),d8=hv||function(){return la.Date.now()};function ole(v,C){if(typeof C!="function")throw new _r(r);return v=qr(v),function(){if(--v<1)return C.apply(this,arguments)}}function KL(v,C,k){return C=k?t:C,C=v&&C==null?v.length:C,Uf(v,G,t,t,t,t,C)}function YL(v,C){var k;if(typeof C!="function")throw new _r(r);return v=qr(v),function(){return--v>0&&(k=C.apply(this,arguments)),v<=1&&(C=t),k}}var c9=os(function(v,C,k){var j=_;if(k.length){var se=_l(k,i4(c9));j|=I}return Uf(v,j,C,k,se)}),qL=os(function(v,C,k){var j=_|x;if(k.length){var se=_l(k,i4(qL));j|=I}return Uf(C,j,v,k,se)});function ZL(v,C,k){C=k?t:C;var j=Uf(v,E,t,t,t,t,t,C);return j.placeholder=ZL.placeholder,j}function XL(v,C,k){C=k?t:C;var j=Uf(v,M,t,t,t,t,t,C);return j.placeholder=XL.placeholder,j}function QL(v,C,k){var j,se,Te,We,rt,pt,ni=0,si=!1,pi=!1,Ki=!0;if(typeof v!="function")throw new _r(r);C=xh(C)||0,wa(k)&&(si=!!k.leading,pi="maxWait"in k,Te=pi?Pe(xh(k.maxWait)||0,C):Te,Ki="trailing"in k?!!k.trailing:Ki);function Tn(Xa){var xp=j,qf=se;return j=se=t,ni=Xa,We=v.apply(qf,xp),We}function ir(Xa){return ni=Xa,rt=uy(fs,C),si?Tn(Xa):We}function Qr(Xa){var xp=Xa-pt,qf=Xa-ni,vO=C-xp;return pi?st(vO,Te-qf):vO}function nr(Xa){var xp=Xa-pt,qf=Xa-ni;return pt===t||xp>=C||xp<0||pi&&qf>=Te}function fs(){var Xa=d8();if(nr(Xa))return As(Xa);rt=uy(fs,Qr(Xa))}function As(Xa){return rt=t,Ki&&j?Tn(Xa):(j=se=t,We)}function Pu(){rt!==t&&lL(rt),ni=0,j=pt=se=rt=t}function Td(){return rt===t?We:As(d8())}function Ru(){var Xa=d8(),xp=nr(Xa);if(j=arguments,se=this,pt=Xa,xp){if(rt===t)return ir(pt);if(pi)return lL(rt),rt=uy(fs,C),Tn(pt)}return rt===t&&(rt=uy(fs,C)),We}return Ru.cancel=Pu,Ru.flush=Td,Ru}var ale=os(function(v,C){return mh(v,1,C)}),lle=os(function(v,C,k){return mh(v,xh(C)||0,k)});function cle(v){return Uf(v,Y)}function u8(v,C){if(typeof v!="function"||C!=null&&typeof C!="function")throw new _r(r);var k=function(){var j=arguments,se=C?C.apply(this,j):j[0],Te=k.cache;if(Te.has(se))return Te.get(se);var We=v.apply(this,j);return k.cache=Te.set(se,We)||Te,We};return k.cache=new(u8.Cache||gp),k}u8.Cache=gp;function h8(v){if(typeof v!="function")throw new _r(r);return function(){var C=arguments;switch(C.length){case 0:return!v.call(this);case 1:return!v.call(this,C[0]);case 2:return!v.call(this,C[0],C[1]);case 3:return!v.call(this,C[0],C[1],C[2])}return!v.apply(this,C)}}function dle(v){return YL(2,v)}var ule=Xse(function(v,C){C=C.length==1&&Pr(C[0])?Oi(C[0],Vr(Xn())):Oi(Rl(C,1),Vr(Xn()));var k=C.length;return os(function(j){for(var se=-1,Te=st(j.length,k);++se<Te;)j[se]=C[se].call(this,j[se]);return Ne(v,this,j)})}),d9=os(function(v,C){var k=_l(C,i4(d9));return Uf(v,I,t,C,k)}),JL=os(function(v,C){var k=_l(C,i4(JL));return Uf(v,z,t,C,k)}),hle=jf(function(v,C){return Uf(v,A,t,t,t,C)});function ple(v,C){if(typeof v!="function")throw new _r(r);return C=C===t?C:qr(C),os(v,C)}function mle(v,C){if(typeof v!="function")throw new _r(r);return C=C==null?0:Pe(qr(C),0),os(function(k){var j=k[C],se=v0(k,0,C);return j&&is(se,j),Ne(v,this,se)})}function fle(v,C,k){var j=!0,se=!0;if(typeof v!="function")throw new _r(r);return wa(k)&&(j="leading"in k?!!k.leading:j,se="trailing"in k?!!k.trailing:se),QL(v,C,{leading:j,maxWait:C,trailing:se})}function gle(v){return KL(v,1)}function vle(v,C){return d9(YS(C),v)}function yle(){if(!arguments.length)return[];var v=arguments[0];return Pr(v)?v:[v]}function _le(v){return wd(v,u)}function Cle(v,C){return C=typeof C=="function"?C:t,wd(v,u,C)}function xle(v){return wd(v,c|u)}function ble(v,C){return C=typeof C=="function"?C:t,wd(v,c|u,C)}function wle(v,C){return C==null||$C(v,C,tc(C))}function Cp(v,C){return v===C||v!==v&&C!==C}var Sle=r8(sy),Tle=r8(function(v,C){return v>=C}),G2=XC(function(){return arguments}())?XC:function(v){return Oa(v)&&ss.call(v,"callee")&&!u0.call(v,"callee")},Pr=ht.isArray,Dle=k1?Vr(k1):VS;function Zd(v){return v!=null&&p8(v.length)&&!Kf(v)}function Za(v){return Oa(v)&&Zd(v)}function Ele(v){return v===!0||v===!1||Oa(v)&&vc(v)==Re}var y0=T||x9,Mle=H?Vr(H):BS;function kle(v){return Oa(v)&&v.nodeType===1&&!hy(v)}function Ile(v){if(v==null)return!0;if(Zd(v)&&(Pr(v)||typeof v=="string"||typeof v.splice=="function"||y0(v)||n4(v)||G2(v)))return!v.length;var C=Gc(v);if(C==_i||C==wn)return!v.size;if(dy(v))return!J(v).length;for(var k in v)if(ss.call(v,k))return!1;return!0}function Ale(v,C){return V2(v,C)}function Ple(v,C,k){k=typeof k=="function"?k:t;var j=k?k(v,C):t;return j===t?V2(v,C,t,k):!!j}function u9(v){if(!Oa(v))return!1;var C=vc(v);return C==zt||C==jt||typeof v.message=="string"&&typeof v.name=="string"&&!hy(v)}function Rle(v){return typeof v=="number"&&N(v)}function Kf(v){if(!wa(v))return!1;var C=vc(v);return C==qt||C==ui||C==_t||C==Fn}function eO(v){return typeof v=="number"&&v==qr(v)}function p8(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=ze}function wa(v){var C=typeof v;return v!=null&&(C=="object"||C=="function")}function Oa(v){return v!=null&&typeof v=="object"}var tO=te?Vr(te):ay;function Fle(v,C){return v===C||mm(v,C,t9(C))}function Lle(v,C,k){return k=typeof k=="function"?k:t,mm(v,C,t9(C),k)}function Ole(v){return iO(v)&&v!=+v}function Nle(v){if(Coe(v))throw new Ni(i);return B2(v)}function Vle(v){return v===null}function Ble(v){return v==null}function iO(v){return typeof v=="number"||Oa(v)&&vc(v)==ln}function hy(v){if(!Oa(v)||vc(v)!=bi)return!1;var C=um(v);if(C===null)return!0;var k=ss.call(C,"constructor")&&C.constructor;return typeof k=="function"&&k instanceof k&&Fd.call(k)==K3}var h9=ge?Vr(ge):xs;function zle(v){return eO(v)&&v>=-ze&&v<=ze}var nO=ke?Vr(ke):S;function m8(v){return typeof v=="string"||!Pr(v)&&Oa(v)&&vc(v)==gn}function Au(v){return typeof v=="symbol"||Oa(v)&&vc(v)==ts}var n4=He?Vr(He):P;function Hle(v){return v===t}function Gle(v){return Oa(v)&&Gc(v)==Ho}function Wle(v){return Oa(v)&&vc(v)==kn}var Ule=r8(Qe),jle=r8(function(v,C){return v<=C});function rO(v){if(!v)return[];if(Zd(v))return m8(v)?ol(v):qd(v);if(Zm&&v[Zm])return Nf(v[Zm]());var C=Gc(v),k=C==_i?jh:C==wn?kc:r4;return k(v)}function Yf(v){if(!v)return v===0?v:0;if(v=xh(v),v===je||v===-je){var C=v<0?-1:1;return C*Ge}return v===v?v:0}function qr(v){var C=Yf(v),k=C%1;return C===C?k?C-k:C:0}function sO(v){return v?Gf(qr(v),0,Ye):0}function xh(v){if(typeof v=="number")return v;if(Au(v))return Ae;if(wa(v)){var C=typeof v.valueOf=="function"?v.valueOf():v;v=wa(C)?C+"":C}if(typeof v!="string")return v===0?v:+v;v=jn(v);var k=Gh.test(v);return k||Hs.test(v)?Dl(v.slice(2),k?2:8):Da.test(v)?Ae:+v}function oO(v){return fm(v,Xd(v))}function $le(v){return v?Gf(qr(v),-ze,ze):v===0?v:0}function po(v){return v==null?"":Iu(v)}var Kle=e4(function(v,C){if(dy(C)||Zd(C)){fm(C,tc(C),v);return}for(var k in C)ss.call(C,k)&&N2(v,k,C[k])}),aO=e4(function(v,C){fm(C,Xd(C),v)}),f8=e4(function(v,C,k,j){fm(C,Xd(C),v,j)}),Yle=e4(function(v,C,k,j){fm(C,tc(C),v,j)}),qle=jf(Q3);function Zle(v,C){var k=Ds(v);return C==null?k:ty(k,C)}var Xle=os(function(v,C){v=hn(v);var k=-1,j=C.length,se=j>2?C[2]:t;for(se&&Sd(C[0],C[1],se)&&(j=1);++k<j;)for(var Te=C[k],We=Xd(Te),rt=-1,pt=We.length;++rt<pt;){var ni=We[rt],si=v[ni];(si===t||Cp(si,Gl[ni])&&!ss.call(v,ni))&&(v[ni]=Te[ni])}return v}),Qle=os(function(v){return v.push(t,SL),Ne(lO,t,v)});function Jle(v,C){return Ro(v,Xn(C,3),fh)}function ece(v,C){return Ro(v,Xn(C,3),ry)}function tce(v,C){return v==null?v:ny(v,Xn(C,3),Xd)}function ice(v,C){return v==null?v:qC(v,Xn(C,3),Xd)}function nce(v,C){return v&&fh(v,Xn(C,3))}function rce(v,C){return v&&ry(v,Xn(C,3))}function sce(v){return v==null?[]:gh(v,tc(v))}function oce(v){return v==null?[]:gh(v,Xd(v))}function p9(v,C,k){var j=v==null?t:Wf(v,C);return j===t?k:j}function ace(v,C){return v!=null&&EL(v,C,LS)}function m9(v,C){return v!=null&&EL(v,C,OS)}var lce=_L(function(v,C,k){C!=null&&typeof C.toString!="function"&&(C=Bf.call(C)),v[C]=k},g9(Qd)),cce=_L(function(v,C,k){C!=null&&typeof C.toString!="function"&&(C=Bf.call(C)),ss.call(v,C)?v[C].push(k):v[C]=[k]},Xn),dce=os(vh);function tc(v){return Zd(v)?X3(v):J(v)}function Xd(v){return Zd(v)?X3(v,!0):fe(v)}function uce(v,C){var k={};return C=Xn(C,3),fh(v,function(j,se,Te){vp(k,C(j,se,Te),j)}),k}function hce(v,C){var k={};return C=Xn(C,3),fh(v,function(j,se,Te){vp(k,se,C(j,se,Te))}),k}var pce=e4(function(v,C,k){Xr(v,C,k)}),lO=e4(function(v,C,k,j){Xr(v,C,k,j)}),mce=jf(function(v,C){var k={};if(v==null)return k;var j=!1;C=Oi(C,function(Te){return Te=g0(Te,v),j||(j=Te.length>1),Te}),fm(v,JS(v),k),j&&(k=wd(k,c|d|u,loe));for(var se=C.length;se--;)jS(k,C[se]);return k});function fce(v,C){return cO(v,h8(Xn(C)))}var gce=jf(function(v,C){return v==null?{}:Wse(v,C)});function cO(v,C){if(v==null)return{};var k=Oi(JS(v),function(j){return[j]});return C=Xn(C),eL(v,k,function(j,se){return C(j,se[0])})}function vce(v,C,k){C=g0(C,v);var j=-1,se=C.length;for(se||(se=1,v=t);++j<se;){var Te=v==null?t:v[gm(C[j])];Te===t&&(j=se,Te=k),v=Kf(Te)?Te.call(v):Te}return v}function yce(v,C,k){return v==null?v:ly(v,C,k)}function _ce(v,C,k,j){return j=typeof j=="function"?j:t,v==null?v:ly(v,C,k,j)}var dO=bL(tc),uO=bL(Xd);function Cce(v,C,k){var j=Pr(v),se=j||y0(v)||n4(v);if(C=Xn(C,4),k==null){var Te=v&&v.constructor;se?k=j?new Te:[]:wa(v)?k=Kf(Te)?Ds(um(v)):{}:k={}}return(se?kt:fh)(v,function(We,rt,pt){return C(k,We,rt,pt)}),k}function xce(v,C){return v==null?!0:jS(v,C)}function bce(v,C,k){return v==null?v:sL(v,C,YS(k))}function wce(v,C,k,j){return j=typeof j=="function"?j:t,v==null?v:sL(v,C,YS(k),j)}function r4(v){return v==null?[]:El(v,tc(v))}function Sce(v){return v==null?[]:El(v,Xd(v))}function Tce(v,C,k){return k===t&&(k=C,C=t),k!==t&&(k=xh(k),k=k===k?k:0),C!==t&&(C=xh(C),C=C===C?C:0),Gf(xh(v),C,k)}function Dce(v,C,k){return C=Yf(C),k===t?(k=C,C=0):k=Yf(k),v=xh(v),NS(v,C,k)}function Ece(v,C,k){if(k&&typeof k!="boolean"&&Sd(v,C,k)&&(C=k=t),k===t&&(typeof C=="boolean"?(k=C,C=t):typeof v=="boolean"&&(k=v,v=t)),v===t&&C===t?(v=0,C=1):(v=Yf(v),C===t?(C=v,v=0):C=Yf(C)),v>C){var j=v;v=C,C=j}if(k||v%1||C%1){var se=Ui();return st(v+se*(C-v+Wp("1e-"+((se+"").length-1))),C)}return GS(v,C)}var Mce=t4(function(v,C,k){return C=C.toLowerCase(),v+(k?hO(C):C)});function hO(v){return f9(po(v).toLowerCase())}function pO(v){return v=po(v),v&&v.replace(Mo,zl).replace(pp,"")}function kce(v,C,k){v=po(v),C=Iu(C);var j=v.length;k=k===t?j:Gf(qr(k),0,j);var se=k;return k-=C.length,k>=0&&v.slice(k,se)==C}function Ice(v){return v=po(v),v&&du.test(v)?v.replace(aa,Mu):v}function Ace(v){return v=po(v),v&&ds.test(v)?v.replace(Ad,"\\$&"):v}var Pce=t4(function(v,C,k){return v+(k?"-":"")+C.toLowerCase()}),Rce=t4(function(v,C,k){return v+(k?" ":"")+C.toLowerCase()}),Fce=gL("toLowerCase");function Lce(v,C,k){v=po(v),C=qr(C);var j=C?Hl(v):0;if(!C||j>=C)return v;var se=(C-j)/2;return n8(ph(se),k)+v+n8(zf(se),k)}function Oce(v,C,k){v=po(v),C=qr(C);var j=C?Hl(v):0;return C&&j<C?v+n8(C-j,k):v}function Nce(v,C,k){v=po(v),C=qr(C);var j=C?Hl(v):0;return C&&j<C?n8(C-j,k)+v:v}function Vce(v,C,k){return k||C==null?C=0:C&&(C=+C),Ei(po(v).replace(_a,""),C||0)}function Bce(v,C,k){return(k?Sd(v,C,k):C===t)?C=1:C=qr(C),WS(po(v),C)}function zce(){var v=arguments,C=po(v[0]);return v.length<3?C:C.replace(v[1],v[2])}var Hce=t4(function(v,C,k){return v+(k?"_":"")+C.toLowerCase()});function Gce(v,C,k){return k&&typeof k!="number"&&Sd(v,C,k)&&(C=k=t),k=k===t?Ye:k>>>0,k?(v=po(v),v&&(typeof C=="string"||C!=null&&!h9(C))&&(C=Iu(C),!C&&Hc(v))?v0(ol(v),0,k):v.split(C,k)):[]}var Wce=t4(function(v,C,k){return v+(k?" ":"")+f9(C)});function Uce(v,C,k){return v=po(v),k=k==null?0:Gf(qr(k),0,v.length),C=Iu(C),v.slice(k,k+C.length)==C}function jce(v,C,k){var j=ae.templateSettings;k&&Sd(v,C,k)&&(C=t),v=po(v),C=f8({},C,j,wL);var se=f8({},C.imports,j.imports,wL),Te=tc(se),We=El(se,Te),rt,pt,ni=0,si=C.interpolate||Js,pi="__p += '",Ki=us((C.escape||Js).source+"|"+si.source+"|"+(si===Vl?Ta:Js).source+"|"+(C.evaluate||Js).source+"|$","g"),Tn="//# sourceURL="+(ss.call(C,"sourceURL")?(C.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lf+"]")+`
`;v.replace(Ki,function(nr,fs,As,Pu,Td,Ru){return As||(As=Pu),pi+=v.slice(ni,Ru).replace(td,Of),fs&&(rt=!0,pi+=`' +
__e(`+fs+`) +
'`),Td&&(pt=!0,pi+=`';
`+Td+`;
__p += '`),As&&(pi+=`' +
((__t = (`+As+`)) == null ? '' : __t) +
'`),ni=Ru+nr.length,nr}),pi+=`';
`;var ir=ss.call(C,"variable")&&C.variable;if(!ir)pi=`with (obj) {
`+pi+`
}
`;else if(ro.test(ir))throw new Ni(s);pi=(pt?pi.replace(zh,""):pi).replace(Hh,"$1").replace(Rf,"$1;"),pi="function("+(ir||"obj")+`) {
`+(ir?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(rt?", __e = _.escape":"")+(pt?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+pi+`return __p
}`;var Qr=fO(function(){return Qi(Te,Tn+"return "+pi).apply(t,We)});if(Qr.source=pi,u9(Qr))throw Qr;return Qr}function $ce(v){return po(v).toLowerCase()}function Kce(v){return po(v).toUpperCase()}function Yce(v,C,k){if(v=po(v),v&&(k||C===t))return jn(v);if(!v||!(C=Iu(C)))return v;var j=ol(v),se=ol(C),Te=Er(j,se),We=yo(j,se)+1;return v0(j,Te,We).join("")}function qce(v,C,k){if(v=po(v),v&&(k||C===t))return v.slice(0,jp(v)+1);if(!v||!(C=Iu(C)))return v;var j=ol(v),se=yo(j,ol(C))+1;return v0(j,0,se).join("")}function Zce(v,C,k){if(v=po(v),v&&(k||C===t))return v.replace(_a,"");if(!v||!(C=Iu(C)))return v;var j=ol(v),se=Er(j,ol(C));return v0(j,se).join("")}function Xce(v,C){var k=X,j=ne;if(wa(C)){var se="separator"in C?C.separator:se;k="length"in C?qr(C.length):k,j="omission"in C?Iu(C.omission):j}v=po(v);var Te=v.length;if(Hc(v)){var We=ol(v);Te=We.length}if(k>=Te)return v;var rt=k-Hl(j);if(rt<1)return j;var pt=We?v0(We,0,rt).join(""):v.slice(0,rt);if(se===t)return pt+j;if(We&&(rt+=pt.length-rt),h9(se)){if(v.slice(rt).search(se)){var ni,si=pt;for(se.global||(se=us(se.source,po($a.exec(se))+"g")),se.lastIndex=0;ni=se.exec(si);)var pi=ni.index;pt=pt.slice(0,pi===t?rt:pi)}}else if(v.indexOf(Iu(se),rt)!=rt){var Ki=pt.lastIndexOf(se);Ki>-1&&(pt=pt.slice(0,Ki))}return pt+j}function Qce(v){return v=po(v),v&&jd.test(v)?v.replace(Id,F2):v}var Jce=t4(function(v,C,k){return v+(k?" ":"")+C.toUpperCase()}),f9=gL("toUpperCase");function mO(v,C,k){return v=po(v),C=k?t:C,C===t?Rd(v)?Mt(v):rd(v):v.match(C)||[]}var fO=os(function(v,C){try{return Ne(v,t,C)}catch(k){return u9(k)?k:new Ni(k)}}),ede=jf(function(v,C){return kt(C,function(k){k=gm(k),vp(v,k,c9(v[k],v))}),v});function tde(v){var C=v==null?0:v.length,k=Xn();return v=C?Oi(v,function(j){if(typeof j[1]!="function")throw new _r(r);return[k(j[0]),j[1]]}):[],os(function(j){for(var se=-1;++se<C;){var Te=v[se];if(Ne(Te[0],this,j))return Ne(Te[1],this,j)}})}function ide(v){return iy(wd(v,c))}function g9(v){return function(){return v}}function nde(v,C){return v==null||v!==v?C:v}var rde=yL(),sde=yL(!0);function Qd(v){return v}function v9(v){return U(typeof v=="function"?v:wd(v,c))}function ode(v){return rn(wd(v,c))}function ade(v,C){return ar(v,wd(C,c))}var lde=os(function(v,C){return function(k){return vh(k,v,C)}}),cde=os(function(v,C){return function(k){return vh(v,k,C)}});function y9(v,C,k){var j=tc(C),se=gh(C,j);k==null&&!(wa(C)&&(se.length||!j.length))&&(k=C,C=v,v=this,se=gh(C,tc(C)));var Te=!(wa(k)&&"chain"in k)||!!k.chain,We=Kf(v);return kt(se,function(rt){var pt=C[rt];v[rt]=pt,We&&(v.prototype[rt]=function(){var ni=this.__chain__;if(Te||ni){var si=v(this.__wrapped__),pi=si.__actions__=qd(this.__actions__);return pi.push({func:pt,args:arguments,thisArg:v}),si.__chain__=ni,si}return pt.apply(v,is([this.value()],arguments))})}),v}function dde(){return la._===this&&(la._=Y3),this}function _9(){}function ude(v){return v=qr(v),os(function(C){return yh(C,v)})}var hde=ZS(Oi),pde=ZS(hi),mde=ZS(sl);function gO(v){return n9(v)?Mc(gm(v)):Use(v)}function fde(v){return function(C){return v==null?t:Wf(v,C)}}var gde=CL(),vde=CL(!0);function C9(){return[]}function x9(){return!1}function yde(){return{}}function _de(){return""}function Cde(){return!0}function xde(v,C){if(v=qr(v),v<1||v>ze)return[];var k=Ye,j=st(v,Ye);C=Xn(C),v-=Ye;for(var se=vi(j,C);++k<v;)C(k);return se}function bde(v){return Pr(v)?Oi(v,gm):Au(v)?[v]:qd(OL(po(v)))}function wde(v){var C=++hu;return po(v)+C}var Sde=i8(function(v,C){return v+C},0),Tde=XS("ceil"),Dde=i8(function(v,C){return v/C},1),Ede=XS("floor");function Mde(v){return v&&v.length?J3(v,Qd,sy):t}function kde(v,C){return v&&v.length?J3(v,Xn(C,2),sy):t}function Ide(v){return Cd(v,Qd)}function Ade(v,C){return Cd(v,Xn(C,2))}function Pde(v){return v&&v.length?J3(v,Qd,Qe):t}function Rde(v,C){return v&&v.length?J3(v,Xn(C,2),Qe):t}var Fde=i8(function(v,C){return v*C},1),Lde=XS("round"),Ode=i8(function(v,C){return v-C},0);function Nde(v){return v&&v.length?mt(v,Qd):0}function Vde(v,C){return v&&v.length?mt(v,Xn(C,2)):0}return ae.after=ole,ae.ary=KL,ae.assign=Kle,ae.assignIn=aO,ae.assignInWith=f8,ae.assignWith=Yle,ae.at=qle,ae.before=YL,ae.bind=c9,ae.bindAll=ede,ae.bindKey=qL,ae.castArray=yle,ae.chain=UL,ae.chunk=Eoe,ae.compact=Moe,ae.concat=koe,ae.cond=tde,ae.conforms=ide,ae.constant=g9,ae.countBy=Nae,ae.create=Zle,ae.curry=ZL,ae.curryRight=XL,ae.debounce=QL,ae.defaults=Xle,ae.defaultsDeep=Qle,ae.defer=ale,ae.delay=lle,ae.difference=Ioe,ae.differenceBy=Aoe,ae.differenceWith=Poe,ae.drop=Roe,ae.dropRight=Foe,ae.dropRightWhile=Loe,ae.dropWhile=Ooe,ae.fill=Noe,ae.filter=Bae,ae.flatMap=Gae,ae.flatMapDeep=Wae,ae.flatMapDepth=Uae,ae.flatten=zL,ae.flattenDeep=Voe,ae.flattenDepth=Boe,ae.flip=cle,ae.flow=rde,ae.flowRight=sde,ae.fromPairs=zoe,ae.functions=sce,ae.functionsIn=oce,ae.groupBy=jae,ae.initial=Goe,ae.intersection=Woe,ae.intersectionBy=Uoe,ae.intersectionWith=joe,ae.invert=lce,ae.invertBy=cce,ae.invokeMap=Kae,ae.iteratee=v9,ae.keyBy=Yae,ae.keys=tc,ae.keysIn=Xd,ae.map=c8,ae.mapKeys=uce,ae.mapValues=hce,ae.matches=ode,ae.matchesProperty=ade,ae.memoize=u8,ae.merge=pce,ae.mergeWith=lO,ae.method=lde,ae.methodOf=cde,ae.mixin=y9,ae.negate=h8,ae.nthArg=ude,ae.omit=mce,ae.omitBy=fce,ae.once=dle,ae.orderBy=qae,ae.over=hde,ae.overArgs=ule,ae.overEvery=pde,ae.overSome=mde,ae.partial=d9,ae.partialRight=JL,ae.partition=Zae,ae.pick=gce,ae.pickBy=cO,ae.property=gO,ae.propertyOf=fde,ae.pull=qoe,ae.pullAll=GL,ae.pullAllBy=Zoe,ae.pullAllWith=Xoe,ae.pullAt=Qoe,ae.range=gde,ae.rangeRight=vde,ae.rearg=hle,ae.reject=Jae,ae.remove=Joe,ae.rest=ple,ae.reverse=a9,ae.sampleSize=tle,ae.set=yce,ae.setWith=_ce,ae.shuffle=ile,ae.slice=eae,ae.sortBy=sle,ae.sortedUniq=aae,ae.sortedUniqBy=lae,ae.split=Gce,ae.spread=mle,ae.tail=cae,ae.take=dae,ae.takeRight=uae,ae.takeRightWhile=hae,ae.takeWhile=pae,ae.tap=Mae,ae.throttle=fle,ae.thru=l8,ae.toArray=rO,ae.toPairs=dO,ae.toPairsIn=uO,ae.toPath=bde,ae.toPlainObject=oO,ae.transform=Cce,ae.unary=gle,ae.union=mae,ae.unionBy=fae,ae.unionWith=gae,ae.uniq=vae,ae.uniqBy=yae,ae.uniqWith=_ae,ae.unset=xce,ae.unzip=l9,ae.unzipWith=WL,ae.update=bce,ae.updateWith=wce,ae.values=r4,ae.valuesIn=Sce,ae.without=Cae,ae.words=mO,ae.wrap=vle,ae.xor=xae,ae.xorBy=bae,ae.xorWith=wae,ae.zip=Sae,ae.zipObject=Tae,ae.zipObjectDeep=Dae,ae.zipWith=Eae,ae.entries=dO,ae.entriesIn=uO,ae.extend=aO,ae.extendWith=f8,y9(ae,ae),ae.add=Sde,ae.attempt=fO,ae.camelCase=Mce,ae.capitalize=hO,ae.ceil=Tde,ae.clamp=Tce,ae.clone=_le,ae.cloneDeep=xle,ae.cloneDeepWith=ble,ae.cloneWith=Cle,ae.conformsTo=wle,ae.deburr=pO,ae.defaultTo=nde,ae.divide=Dde,ae.endsWith=kce,ae.eq=Cp,ae.escape=Ice,ae.escapeRegExp=Ace,ae.every=Vae,ae.find=zae,ae.findIndex=VL,ae.findKey=Jle,ae.findLast=Hae,ae.findLastIndex=BL,ae.findLastKey=ece,ae.floor=Ede,ae.forEach=jL,ae.forEachRight=$L,ae.forIn=tce,ae.forInRight=ice,ae.forOwn=nce,ae.forOwnRight=rce,ae.get=p9,ae.gt=Sle,ae.gte=Tle,ae.has=ace,ae.hasIn=m9,ae.head=HL,ae.identity=Qd,ae.includes=$ae,ae.indexOf=Hoe,ae.inRange=Dce,ae.invoke=dce,ae.isArguments=G2,ae.isArray=Pr,ae.isArrayBuffer=Dle,ae.isArrayLike=Zd,ae.isArrayLikeObject=Za,ae.isBoolean=Ele,ae.isBuffer=y0,ae.isDate=Mle,ae.isElement=kle,ae.isEmpty=Ile,ae.isEqual=Ale,ae.isEqualWith=Ple,ae.isError=u9,ae.isFinite=Rle,ae.isFunction=Kf,ae.isInteger=eO,ae.isLength=p8,ae.isMap=tO,ae.isMatch=Fle,ae.isMatchWith=Lle,ae.isNaN=Ole,ae.isNative=Nle,ae.isNil=Ble,ae.isNull=Vle,ae.isNumber=iO,ae.isObject=wa,ae.isObjectLike=Oa,ae.isPlainObject=hy,ae.isRegExp=h9,ae.isSafeInteger=zle,ae.isSet=nO,ae.isString=m8,ae.isSymbol=Au,ae.isTypedArray=n4,ae.isUndefined=Hle,ae.isWeakMap=Gle,ae.isWeakSet=Wle,ae.join=$oe,ae.kebabCase=Pce,ae.last=Ch,ae.lastIndexOf=Koe,ae.lowerCase=Rce,ae.lowerFirst=Fce,ae.lt=Ule,ae.lte=jle,ae.max=Mde,ae.maxBy=kde,ae.mean=Ide,ae.meanBy=Ade,ae.min=Pde,ae.minBy=Rde,ae.stubArray=C9,ae.stubFalse=x9,ae.stubObject=yde,ae.stubString=_de,ae.stubTrue=Cde,ae.multiply=Fde,ae.nth=Yoe,ae.noConflict=dde,ae.noop=_9,ae.now=d8,ae.pad=Lce,ae.padEnd=Oce,ae.padStart=Nce,ae.parseInt=Vce,ae.random=Ece,ae.reduce=Xae,ae.reduceRight=Qae,ae.repeat=Bce,ae.replace=zce,ae.result=vce,ae.round=Lde,ae.runInContext=Fe,ae.sample=ele,ae.size=nle,ae.snakeCase=Hce,ae.some=rle,ae.sortedIndex=tae,ae.sortedIndexBy=iae,ae.sortedIndexOf=nae,ae.sortedLastIndex=rae,ae.sortedLastIndexBy=sae,ae.sortedLastIndexOf=oae,ae.startCase=Wce,ae.startsWith=Uce,ae.subtract=Ode,ae.sum=Nde,ae.sumBy=Vde,ae.template=jce,ae.times=xde,ae.toFinite=Yf,ae.toInteger=qr,ae.toLength=sO,ae.toLower=$ce,ae.toNumber=xh,ae.toSafeInteger=$le,ae.toString=po,ae.toUpper=Kce,ae.trim=Yce,ae.trimEnd=qce,ae.trimStart=Zce,ae.truncate=Xce,ae.unescape=Qce,ae.uniqueId=wde,ae.upperCase=Jce,ae.upperFirst=f9,ae.each=jL,ae.eachRight=$L,ae.first=HL,y9(ae,function(){var v={};return fh(ae,function(C,k){ss.call(ae.prototype,k)||(v[k]=C)}),v}(),{chain:!1}),ae.VERSION=e,kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(v){ae[v].placeholder=ae}),kt(["drop","take"],function(v,C){hr.prototype[v]=function(k){k=k===t?1:Pe(qr(k),0);var j=this.__filtered__&&!C?new hr(this):this.clone();return j.__filtered__?j.__takeCount__=st(k,j.__takeCount__):j.__views__.push({size:st(k,Ye),type:v+(j.__dir__<0?"Right":"")}),j},hr.prototype[v+"Right"]=function(k){return this.reverse()[v](k).reverse()}}),kt(["filter","map","takeWhile"],function(v,C){var k=C+1,j=k==ie||k==Se;hr.prototype[v]=function(se){var Te=this.clone();return Te.__iteratees__.push({iteratee:Xn(se,3),type:k}),Te.__filtered__=Te.__filtered__||j,Te}}),kt(["head","last"],function(v,C){var k="take"+(C?"Right":"");hr.prototype[v]=function(){return this[k](1).value()[0]}}),kt(["initial","tail"],function(v,C){var k="drop"+(C?"":"Right");hr.prototype[v]=function(){return this.__filtered__?new hr(this):this[k](1)}}),hr.prototype.compact=function(){return this.filter(Qd)},hr.prototype.find=function(v){return this.filter(v).head()},hr.prototype.findLast=function(v){return this.reverse().find(v)},hr.prototype.invokeMap=os(function(v,C){return typeof v=="function"?new hr(this):this.map(function(k){return vh(k,v,C)})}),hr.prototype.reject=function(v){return this.filter(h8(Xn(v)))},hr.prototype.slice=function(v,C){v=qr(v);var k=this;return k.__filtered__&&(v>0||C<0)?new hr(k):(v<0?k=k.takeRight(-v):v&&(k=k.drop(v)),C!==t&&(C=qr(C),k=C<0?k.dropRight(-C):k.take(C-v)),k)},hr.prototype.takeRightWhile=function(v){return this.reverse().takeWhile(v).reverse()},hr.prototype.toArray=function(){return this.take(Ye)},fh(hr.prototype,function(v,C){var k=/^(?:filter|find|map|reject)|While$/.test(C),j=/^(?:head|last)$/.test(C),se=ae[j?"take"+(C=="last"?"Right":""):C],Te=j||/^find/.test(C);se&&(ae.prototype[C]=function(){var We=this.__wrapped__,rt=j?[1]:arguments,pt=We instanceof hr,ni=rt[0],si=pt||Pr(We),pi=function(fs){var As=se.apply(ae,is([fs],rt));return j&&Ki?As[0]:As};si&&k&&typeof ni=="function"&&ni.length!=1&&(pt=si=!1);var Ki=this.__chain__,Tn=!!this.__actions__.length,ir=Te&&!Ki,Qr=pt&&!Tn;if(!Te&&si){We=Qr?We:new hr(this);var nr=v.apply(We,rt);return nr.__actions__.push({func:l8,args:[pi],thisArg:t}),new Zo(nr,Ki)}return ir&&Qr?v.apply(this,rt):(nr=this.thru(pi),ir?j?nr.value()[0]:nr.value():nr)})}),kt(["pop","push","shift","sort","splice","unshift"],function(v){var C=xa[v],k=/^(?:push|sort|unshift)$/.test(v)?"tap":"thru",j=/^(?:pop|shift)$/.test(v);ae.prototype[v]=function(){var se=arguments;if(j&&!this.__chain__){var Te=this.value();return C.apply(Pr(Te)?Te:[],se)}return this[k](function(We){return C.apply(Pr(We)?We:[],se)})}}),fh(hr.prototype,function(v,C){var k=ae[C];if(k){var j=k.name+"";ss.call(De,j)||(De[j]=[]),De[j].push({name:C,func:k})}}),De[t8(t,x).name]=[{name:"wrapper",func:t}],hr.prototype.clone=h0,hr.prototype.reverse=M_,hr.prototype.value=k_,ae.prototype.at=kae,ae.prototype.chain=Iae,ae.prototype.commit=Aae,ae.prototype.next=Pae,ae.prototype.plant=Fae,ae.prototype.reverse=Lae,ae.prototype.toJSON=ae.prototype.valueOf=ae.prototype.value=Oae,ae.prototype.first=ae.prototype.head,Zm&&(ae.prototype[Zm]=Rae),ae},wi=li();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(la._=wi,define(function(){return wi})):fc?((fc.exports=wi)._=wi,oc._=wi):la._=wi}).call(Dk)});function oa(t){return Object.keys(t)}function so(t){return Sr.clone(t)}var Nhe,J9,Ek,Sr,pa=Q(()=>{Nhe=Gs(Fke()),J9=Gs(Oke()),Ek=Gs(Q9()),Sr=class t{constructor(){t.cloneTest()}static combineWithDefaultOptions(e,n){return Object.assign({},n,e)}static set(e,n,i){Ek.default.set(e,n,i)}static get(e,n){return Ek.default.get(e,n)}static delete(e,n){return Ek.default.unset(e,n)}static keysToCamelCase(e){for(let n of oa(e)){let i=Ek.default.camelCase(n);i!==n&&(e[i]=e[n],delete e[n])}}static clone(e){return Ek.default.cloneDeep(e)}static clone_old(e){let n={};for(let i in e)typeof e[i]=="object"?n[i]=this.clone(e[i]):n[i]=e[i];return n}static getDiffOld(e,n,i=!1){return t.parseDiffToOld((0,Nhe.getDiff)(e,n,i))}static getDiff(e,n,i=!1,r){let s=(0,Nhe.getDiff)(e,n,i);return r&&(s=s.filter(o=>!r?.includes(o.path.join(".")))),s}static compare(e,n){return J9.default.default?J9.default.default(e,n):(0,J9.default)(e,n)}static equal(e,n){return J9.default.default?J9.default.default(e,n):(0,J9.default)(e,n)}static sortKeys(e){return typeof e!="object"||!e?e:Array.isArray(e)?e.map(this.sortKeys.bind(this)):Object.keys(e).sort().reduce((n,i)=>St(ve({},n),{[i]:this.sortKeys(e[i])}),{})}static removeUndefined(e){Object.keys(e).forEach(n=>e[n]===void 0&&delete e[n])}static waitFor(e,n,i=5e3){return new Promise((r,s)=>{let o=Date.now(),a=()=>{let l=e();l?r(l):Date.now()-o>=i?s(new Error("Timeout exceeded at "+n)):setTimeout(a,100)};a()})}static waitForOld(e){return new Promise((n,i)=>{let r=e();r?n(r):setTimeout(()=>n(t.waitFor(e,"waitForOld")),100)})}static cloneTest(){let e={ebene1:{wert1:"wert1",ebene2:{wert2:"wert2"}}},n=t.clone(e);n.ebene1.wert1="neuer Wert 1",n.ebene1.ebene2.wert2="neuer Wert 2"}static parseDiffToOld(e){let n={};for(let i of e){let r="/"+i.path.join("/");n["/"+i.path.join("/")]={operation:i.op,value:i.val},(i.op==="delete"||i.op==="update")&&(n["/"+i.path.join("/")].oldValue=i.oldVal)}return n}}});function u7t(){let t=N_()?N_().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}function zb(t){return t==null||(typeof t=="string"||Array.isArray(t))&&t.length===0}function $ke(t){return t!=null&&typeof t.length=="number"}function m7t(t){return e=>{if(zb(e.value)||zb(t))return null;let n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}function f7t(t){return e=>{if(zb(e.value)||zb(t))return null;let n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}function g7t(t){return zb(t.value)?{required:!0}:null}function v7t(t){return t.value===!0?null:{required:!0}}function y7t(t){return zb(t.value)||p7t.test(t.value)?null:{email:!0}}function _7t(t){return e=>zb(e.value)||!$ke(e.value)?null:e.value.length<t?{minlength:{requiredLength:t,actualLength:e.value.length}}:null}function C7t(t){return e=>$ke(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function x7t(t){if(!t)return Kke;let e,n;return typeof t=="string"?(n="",t.charAt(0)!=="^"&&(n+="^"),n+=t,t.charAt(t.length-1)!=="$"&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),i=>{if(zb(i.value))return null;let r=i.value;return e.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}function Kke(t){return null}function Yke(t){return t!=null}function qke(t){return $M(t)?bp(t):t}function Zke(t){let e={};return t.forEach(n=>{e=n!=null?ve(ve({},e),n):e}),Object.keys(e).length===0?null:e}function Xke(t,e){return e.map(n=>n(t))}function b7t(t){return!t.validate}function Qke(t){return t.map(e=>b7t(e)?e:n=>e.validate(n))}function Jke(t){if(!t)return null;let e=t.filter(Yke);return e.length==0?null:function(n){return Zke(Xke(n,e))}}function Ghe(t){return t!=null?Jke(Qke(t)):null}function eIe(t){if(!t)return null;let e=t.filter(Yke);return e.length==0?null:function(n){let i=Xke(n,e).map(qke);return dj(i).pipe(lr(Zke))}}function Whe(t){return t!=null?eIe(Qke(t)):null}function Nke(t,e){return t===null?[e]:Array.isArray(t)?[...t,e]:[t,e]}function tIe(t){return t._rawValidators}function iIe(t){return t._rawAsyncValidators}function Vhe(t){return t?Array.isArray(t)?t:[t]:[]}function L$(t,e){return Array.isArray(t)?t.includes(e):t===e}function Vke(t,e){let n=Vhe(e);return Vhe(t).forEach(r=>{L$(n,r)||n.push(r)}),n}function Bke(t,e){return Vhe(e).filter(n=>!L$(t,n))}function Uhe(t){return(U$(t)?t.validators:t)||null}function S7t(t){return Array.isArray(t)?Ghe(t):t||null}function jhe(t,e){return(U$(e)?e.asyncValidators:t)||null}function T7t(t){return Array.isArray(t)?Whe(t):t||null}function U$(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function nIe(t,e,n){let i=t.controls;if(!(e?Object.keys(i):i).length)throw new to(1e3,"");if(!i[n])throw new to(1001,"")}function rIe(t,e,n){t._forEachChild((i,r)=>{if(n[r]===void 0)throw new to(1002,"")})}function D7t(t,e){return[...e.path,t]}function bN(t,e,n=j$){$he(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||n==="always")&&e.valueAccessor.setDisabledState?.(t.disabled),M7t(t,e),I7t(t,e),k7t(t,e),E7t(t,e)}function B$(t,e,n=!0){let i=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i)),H$(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function z$(t,e){t.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(e)})}function E7t(t,e){if(e.valueAccessor.setDisabledState){let n=i=>{e.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}function $he(t,e){let n=tIe(t);e.validator!==null?t.setValidators(Nke(n,e.validator)):typeof n=="function"&&t.setValidators([n]);let i=iIe(t);e.asyncValidator!==null?t.setAsyncValidators(Nke(i,e.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let r=()=>t.updateValueAndValidity();z$(e._rawValidators,r),z$(e._rawAsyncValidators,r)}function H$(t,e){let n=!1;if(t!==null){if(e.validator!==null){let r=tIe(t);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==e.validator);s.length!==r.length&&(n=!0,t.setValidators(s))}}if(e.asyncValidator!==null){let r=iIe(t);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==e.asyncValidator);s.length!==r.length&&(n=!0,t.setAsyncValidators(s))}}}let i=()=>{};return z$(e._rawValidators,i),z$(e._rawAsyncValidators,i),n}function M7t(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&oIe(t,e)})}function k7t(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&oIe(t,e),t.updateOn!=="submit"&&t.markAsTouched()})}function oIe(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function I7t(t,e){let n=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}function aIe(t,e){t==null,$he(t,e)}function A7t(t,e){return H$(t,e)}function lIe(t,e){if(!t.hasOwnProperty("model"))return!1;let n=t.model;return n.isFirstChange()?!0:!Object.is(e,n.currentValue)}function P7t(t){return Object.getPrototypeOf(t.constructor)===G$}function cIe(t,e){t._syncPendingControls(),e.forEach(n=>{let i=n.control;i.updateOn==="submit"&&i._pendingChange&&(n.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function dIe(t,e){if(!e)return null;Array.isArray(e);let n,i,r;return e.forEach(s=>{s.constructor===mu?n=s:P7t(s)?i=s:r=s}),r||i||n||null}function R7t(t,e){let n=t.indexOf(e);n>-1&&t.splice(n,1)}function zke(t,e){let n=t.indexOf(e);n>-1&&t.splice(n,1)}function Hke(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}function pIe(t,e){return t==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${t}: ${e}`.slice(0,50))}function H7t(t){return t.split(":")[0]}function Wke(t,e){return t==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${t}: ${e}`.slice(0,50))}function W7t(t){return t.split(":")[0]}function Uke(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var jke,G$,Dh,d7t,h7t,mu,Ev,W$,p7t,_m,O$,U_,p4,N$,w7t,hln,Ko,$_,yN,F$,Mk,_N,Hb,V$,xN,eT,kk,Bhe,zhe,Ik,Wl,sIe,Hhe,Ak,j$,F7t,CN,L8,Bb,uIe,L7t,O7t,Gke,Dp,N7t,Khe,hIe,V7t,$c,B7t,e1,z7t,$$,mIe,G7t,fIe,gIe,vIe,j_,yIe,tT,ad,ko,Ia,qn=Q(()=>{me();me();ri();$n();Cl();jke=(()=>{let e=class e{constructor(i,r){this._renderer=i,this._elementRef=r,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(i,r){this._renderer.setProperty(this._elementRef.nativeElement,i,r)}registerOnTouched(i){this.onTouched=i}registerOnChange(i){this.onChange=i}setDisabledState(i){this.setProperty("disabled",i)}};e.\u0275fac=function(r){return new(r||e)(R(Ac),R(fi))},e.\u0275dir=mi({type:e});let t=e;return t})(),G$=(()=>{let e=class e extends jke{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,features:[et]});let t=e;return t})(),Dh=new Ri(""),d7t={provide:Dh,useExisting:_c(()=>mu),multi:!0};h7t=new Ri(""),mu=(()=>{let e=class e extends jke{constructor(i,r,s){super(i,r),this._compositionMode=s,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!u7t())}writeValue(i){let r=i??"";this.setProperty("value",r)}_handleInput(i){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(i)}_compositionStart(){this._composing=!0}_compositionEnd(i){this._composing=!1,this._compositionMode&&this.onChange(i)}};e.\u0275fac=function(r){return new(r||e)(R(Ac),R(fi),R(h7t,8))},e.\u0275dir=mi({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,s){r&1&&F("input",function(a){return s._handleInput(a.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(a){return s._compositionEnd(a.target.value)})},features:[as([d7t]),et]});let t=e;return t})();Ev=new Ri(""),W$=new Ri(""),p7t=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_m=class{static min(e){return m7t(e)}static max(e){return f7t(e)}static required(e){return g7t(e)}static requiredTrue(e){return v7t(e)}static email(e){return y7t(e)}static minLength(e){return _7t(e)}static maxLength(e){return C7t(e)}static pattern(e){return x7t(e)}static nullValidator(e){return Kke(e)}static compose(e){return Jke(e)}static composeAsync(e){return eIe(e)}};O$=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Ghe(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Whe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,n){return this.control?this.control.hasError(e,n):!1}getError(e,n){return this.control?this.control.getError(e,n):null}},U_=class extends O${get formDirective(){return null}get path(){return null}},p4=class extends O${constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},N$=class{constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},w7t={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},hln=St(ve({},w7t),{"[class.ng-submitted]":"isSubmitted"}),Ko=(()=>{let e=class e extends N${constructor(i){super(i)}};e.\u0275fac=function(r){return new(r||e)(R(p4,2))},e.\u0275dir=mi({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,s){r&2&&ki("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},features:[et]});let t=e;return t})(),$_=(()=>{let e=class e extends N${constructor(i){super(i)}};e.\u0275fac=function(r){return new(r||e)(R(U_,10))},e.\u0275dir=mi({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,s){r&2&&ki("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)("ng-submitted",s.isSubmitted)},features:[et]});let t=e;return t})(),yN="VALID",F$="INVALID",Mk="PENDING",_N="DISABLED",Hb=class{},V$=class extends Hb{constructor(e,n){super(),this.value=e,this.source=n}},xN=class extends Hb{constructor(e,n){super(),this.pristine=e,this.source=n}},eT=class extends Hb{constructor(e,n){super(),this.touched=e,this.source=n}},kk=class extends Hb{constructor(e,n){super(),this.status=e,this.source=n}},Bhe=class extends Hb{constructor(e){super(),this.source=e}},zhe=class extends Hb{constructor(e){super(),this.source=e}};Ik=class{constructor(e,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=vr(()=>this.statusReactive()),this.statusReactive=gt(void 0),this._pristine=vr(()=>this.pristineReactive()),this.pristineReactive=gt(!0),this._touched=vr(()=>this.touchedReactive()),this.touchedReactive=gt(!1),this._events=new Mi,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return C0(this.statusReactive)}set status(e){C0(()=>this.statusReactive.set(e))}get valid(){return this.status===yN}get invalid(){return this.status===F$}get pending(){return this.status==Mk}get disabled(){return this.status===_N}get enabled(){return this.status!==_N}get pristine(){return C0(this.pristineReactive)}set pristine(e){C0(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return C0(this.touchedReactive)}set touched(e){C0(()=>this.touchedReactive.set(e))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(Vke(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Vke(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Bke(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Bke(e,this._rawAsyncValidators))}hasValidator(e){return L$(this._rawValidators,e)}hasAsyncValidator(e){return L$(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let n=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(St(ve({},e),{sourceControl:i})),n&&e.emitEvent!==!1&&this._events.next(new eT(!0,i))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(e))}markAsUntouched(e={}){let n=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),n&&e.emitEvent!==!1&&this._events.next(new eT(!1,i))}markAsDirty(e={}){let n=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(St(ve({},e),{sourceControl:i})),n&&e.emitEvent!==!1&&this._events.next(new xN(!1,i))}markAsPristine(e={}){let n=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),n&&e.emitEvent!==!1&&this._events.next(new xN(!0,i))}markAsPending(e={}){this.status=Mk;let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new kk(this.status,n)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(St(ve({},e),{sourceControl:n}))}disable(e={}){let n=this._parentMarkedDirty(e.onlySelf);this.status=_N,this.errors=null,this._forEachChild(r=>{r.disable(St(ve({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new V$(this.value,i)),this._events.next(new kk(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(St(ve({},e),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let n=this._parentMarkedDirty(e.onlySelf);this.status=yN,this._forEachChild(i=>{i.enable(St(ve({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(St(ve({},e),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,n){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},n),this._parent._updateTouched({},n))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===yN||this.status===Mk)&&this._runAsyncValidator(i,e.emitEvent)}let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new V$(this.value,n)),this._events.next(new kk(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(St(ve({},e),{sourceControl:n}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?_N:yN}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,n){if(this.asyncValidator){this.status=Mk,this._hasOwnPendingAsyncValidator={emitEvent:n!==!1};let i=qke(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:n,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,n={}){this.errors=e,this._updateControlsErrors(n.emitEvent!==!1,this,n.shouldHaveEmitted)}get(e){let n=e;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((i,r)=>i&&i._find(r),this)}getError(e,n){let i=n?this.get(n):this;return i&&i.errors?i.errors[e]:null}hasError(e,n){return!!this.getError(e,n)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,n,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new kk(this.status,n)),this._parent&&this._parent._updateControlsErrors(e,n,i)}_initObservables(){this.valueChanges=new nt,this.statusChanges=new nt}_calculateStatus(){return this._allControlsDisabled()?_N:this.errors?F$:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Mk)?Mk:this._anyControlsHaveStatus(F$)?F$:yN}_anyControlsHaveStatus(e){return this._anyControls(n=>n.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,n){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),r&&this._events.next(new xN(this.pristine,n))}_updateTouched(e={},n){this.touched=this._anyControlsTouched(),this._events.next(new eT(this.touched,n)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){U$(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let n=this._parent&&this._parent.dirty;return!e&&!!n&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=S7t(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=T7t(this._rawAsyncValidators)}},Wl=class extends Ik{constructor(e,n,i){super(Uhe(n),jhe(i,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,n){return this.controls[e]?this.controls[e]:(this.controls[e]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(e,n,i={}){this.registerControl(e,n),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(e,n,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],n&&this.registerControl(e,n),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,n={}){rIe(this,!0,e),Object.keys(e).forEach(i=>{nIe(this,!0,i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){e!=null&&(Object.keys(e).forEach(i=>{let r=this.controls[i];r&&r.patchValue(e[i],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e={},n={}){this._forEachChild((i,r)=>{i.reset(e?e[r]:null,{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(e,n,i)=>(e[i]=n.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(n,i)=>i._syncPendingControls()?!0:n);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(n=>{let i=this.controls[n];i&&e(i,n)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[n,i]of Object.entries(this.controls))if(this.contains(n)&&e(i))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(n,i,r)=>((i.enabled||this.disabled)&&(n[r]=i.value),n))}_reduceChildren(e,n){let i=e;return this._forEachChild((r,s)=>{i=n(i,r,s)}),i}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}},sIe=Wl,Hhe=class extends Wl{},Ak=new Ri("CallSetDisabledState",{providedIn:"root",factory:()=>j$}),j$="always";F7t={provide:U_,useExisting:_c(()=>L8)},CN=Promise.resolve(),L8=(()=>{let e=class e extends U_{get submitted(){return C0(this.submittedReactive)}constructor(i,r,s){super(),this.callSetDisabledState=s,this._submitted=vr(()=>this.submittedReactive()),this.submittedReactive=gt(!1),this._directives=new Set,this.ngSubmit=new nt,this.form=new Wl({},Ghe(i),Whe(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(i){CN.then(()=>{let r=this._findContainer(i.path);i.control=r.registerControl(i.name,i.control),bN(i.control,i,this.callSetDisabledState),i.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(i)})}getControl(i){return this.form.get(i.path)}removeControl(i){CN.then(()=>{let r=this._findContainer(i.path);r&&r.removeControl(i.name),this._directives.delete(i)})}addFormGroup(i){CN.then(()=>{let r=this._findContainer(i.path),s=new Wl({});aIe(s,i),r.registerControl(i.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(i){CN.then(()=>{let r=this._findContainer(i.path);r&&r.removeControl(i.name)})}getFormGroup(i){return this.form.get(i.path)}updateModel(i,r){CN.then(()=>{this.form.get(i.path).setValue(r)})}setValue(i){this.control.setValue(i)}onSubmit(i){return this.submittedReactive.set(!0),cIe(this.form,this._directives),this.ngSubmit.emit(i),i?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(i=void 0){this.form.reset(i),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(i){return i.pop(),i.length?this.form.get(i):this.form}};e.\u0275fac=function(r){return new(r||e)(R(Ev,10),R(W$,10),R(Ak,8))},e.\u0275dir=mi({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,s){r&1&&F("submit",function(a){return s.onSubmit(a)})("reset",function(){return s.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[as([F7t]),et]});let t=e;return t})();Bb=class extends Ik{constructor(e=null,n,i){super(Uhe(n),jhe(i,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),U$(n)&&(n.nonNullable||n.initialValueIsDefault)&&(Hke(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,n={}){this.value=this._pendingValue=e,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(e,n={}){this.setValue(e,n)}reset(e=this.defaultValue,n={}){this._applyFormState(e),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){zke(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){zke(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){Hke(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},uIe=Bb,L7t=t=>t instanceof Bb,O7t={provide:p4,useExisting:_c(()=>Dp)},Gke=Promise.resolve(),Dp=(()=>{let e=class e extends p4{constructor(i,r,s,o,a,l){super(),this._changeDetectorRef=a,this.callSetDisabledState=l,this.control=new Bb,this._registered=!1,this.name="",this.update=new nt,this._parent=i,this._setValidators(r),this._setAsyncValidators(s),this.valueAccessor=dIe(this,o)}ngOnChanges(i){if(this._checkForErrors(),!this._registered||"name"in i){if(this._registered&&(this._checkName(),this.formDirective)){let r=i.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in i&&this._updateDisabled(i),lIe(i,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(i){this.viewModel=i,this.update.emit(i)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){bN(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(i){Gke.then(()=>{this.control.setValue(i,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(i){let r=i.isDisabled.currentValue,s=r!==0&&mn(r);Gke.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(i){return this._parent?D7t(i,this._parent):[i]}};e.\u0275fac=function(r){return new(r||e)(R(U_,9),R(Ev,10),R(W$,10),R(Dh,10),R(Kt,8),R(Ak,8))},e.\u0275dir=mi({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[as([O7t]),et,yn]});let t=e;return t})(),N7t={provide:Dh,useExisting:_c(()=>Khe),multi:!0},Khe=(()=>{let e=class e extends G${writeValue(i){let r=i??"";this.setProperty("value",r)}registerOnChange(i){this.onChange=r=>{i(r==""?null:parseFloat(r))}}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,s){r&1&&F("input",function(a){return s.onChange(a.target.value)})("blur",function(){return s.onTouched()})},features:[as([N7t]),et]});let t=e;return t})(),hIe=new Ri(""),V7t={provide:p4,useExisting:_c(()=>$c)},$c=(()=>{let e=class e extends p4{set isDisabled(i){}constructor(i,r,s,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this.update=new nt,this._ngModelWarningSent=!1,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=dIe(this,s)}ngOnChanges(i){if(this._isControlChanged(i)){let r=i.form.previousValue;r&&B$(r,this,!1),bN(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}lIe(i,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&B$(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(i){this.viewModel=i,this.update.emit(i)}_isControlChanged(i){return i.hasOwnProperty("form")}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(r){return new(r||e)(R(Ev,10),R(W$,10),R(Dh,10),R(hIe,8),R(Ak,8))},e.\u0275dir=mi({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[as([V7t]),et,yn]});let t=e;return t})(),B7t={provide:U_,useExisting:_c(()=>e1)},e1=(()=>{let e=class e extends U_{get submitted(){return C0(this._submittedReactive)}set submitted(i){this._submittedReactive.set(i)}constructor(i,r,s){super(),this.callSetDisabledState=s,this._submitted=vr(()=>this._submittedReactive()),this._submittedReactive=gt(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new nt,this._setValidators(i),this._setAsyncValidators(r)}ngOnChanges(i){this._checkFormPresent(),i.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(H$(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(i){let r=this.form.get(i.path);return bN(r,i,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(i),r}getControl(i){return this.form.get(i.path)}removeControl(i){B$(i.control||null,i,!1),R7t(this.directives,i)}addFormGroup(i){this._setUpFormContainer(i)}removeFormGroup(i){this._cleanUpFormContainer(i)}getFormGroup(i){return this.form.get(i.path)}addFormArray(i){this._setUpFormContainer(i)}removeFormArray(i){this._cleanUpFormContainer(i)}getFormArray(i){return this.form.get(i.path)}updateModel(i,r){this.form.get(i.path).setValue(r)}onSubmit(i){return this._submittedReactive.set(!0),cIe(this.form,this.directives),this.ngSubmit.emit(i),this.form._events.next(new Bhe(this.control)),i?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(i=void 0){this.form.reset(i),this._submittedReactive.set(!1),this.form._events.next(new zhe(this.form))}_updateDomValue(){this.directives.forEach(i=>{let r=i.control,s=this.form.get(i.path);r!==s&&(B$(r||null,i),L7t(s)&&(bN(s,i,this.callSetDisabledState),i.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(i){let r=this.form.get(i.path);aIe(r,i),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(i){if(this.form){let r=this.form.get(i.path);r&&A7t(r,i)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){$he(this.form,this),this._oldForm&&H$(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(r){return new(r||e)(R(Ev,10),R(W$,10),R(Ak,8))},e.\u0275dir=mi({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,s){r&1&&F("submit",function(a){return s.onSubmit(a)})("reset",function(){return s.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[as([B7t]),et,yn]});let t=e;return t})(),z7t={provide:Dh,useExisting:_c(()=>$$),multi:!0};$$=(()=>{let e=class e extends G${constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(i){this._compareWith=i}writeValue(i){this.value=i;let r=this._getOptionId(i),s=pIe(r,i);this.setProperty("value",s)}registerOnChange(i){this.onChange=r=>{this.value=this._getOptionValue(r),i(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(i){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),i))return r;return null}_getOptionValue(i){let r=H7t(i);return this._optionMap.has(r)?this._optionMap.get(r):i}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,s){r&1&&F("change",function(a){return s.onChange(a.target.value)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[as([z7t]),et]});let t=e;return t})(),mIe=(()=>{let e=class e{constructor(i,r,s){this._element=i,this._renderer=r,this._select=s,this._select&&(this.id=this._select._registerOption())}set ngValue(i){this._select!=null&&(this._select._optionMap.set(this.id,i),this._setElementValue(pIe(this.id,i)),this._select.writeValue(this._select.value))}set value(i){this._setElementValue(i),this._select&&this._select.writeValue(this._select.value)}_setElementValue(i){this._renderer.setProperty(this._element.nativeElement,"value",i)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Ac),R($$,9))},e.\u0275dir=mi({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let t=e;return t})(),G7t={provide:Dh,useExisting:_c(()=>fIe),multi:!0};fIe=(()=>{let e=class e extends G${constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(i){this._compareWith=i}writeValue(i){this.value=i;let r;if(Array.isArray(i)){let s=i.map(o=>this._getOptionId(o));r=(o,a)=>{o._setSelected(s.indexOf(a.toString())>-1)}}else r=(s,o)=>{s._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(i){this.onChange=r=>{let s=[],o=r.selectedOptions;if(o!==void 0){let a=o;for(let l=0;l<a.length;l++){let c=a[l],d=this._getOptionValue(c.value);s.push(d)}}else{let a=r.options;for(let l=0;l<a.length;l++){let c=a[l];if(c.selected){let d=this._getOptionValue(c.value);s.push(d)}}}this.value=s,i(s)}}_registerOption(i){let r=(this._idCounter++).toString();return this._optionMap.set(r,i),r}_getOptionId(i){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r)._value,i))return r;return null}_getOptionValue(i){let r=W7t(i);return this._optionMap.has(r)?this._optionMap.get(r)._value:i}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,s){r&1&&F("change",function(a){return s.onChange(a.target)})("blur",function(){return s.onTouched()})},inputs:{compareWith:"compareWith"},features:[as([G7t]),et]});let t=e;return t})(),gIe=(()=>{let e=class e{constructor(i,r,s){this._element=i,this._renderer=r,this._select=s,this._select&&(this.id=this._select._registerOption(this))}set ngValue(i){this._select!=null&&(this._value=i,this._setElementValue(Wke(this.id,i)),this._select.writeValue(this._select.value))}set value(i){this._select?(this._value=i,this._setElementValue(Wke(this.id,i)),this._select.writeValue(this._select.value)):this._setElementValue(i)}_setElementValue(i){this._renderer.setProperty(this._element.nativeElement,"value",i)}_setSelected(i){this._renderer.setProperty(this._element.nativeElement,"selected",i)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Ac),R(fIe,9))},e.\u0275dir=mi({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let t=e;return t})(),vIe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})(),j_=class extends Ik{constructor(e,n,i){super(Uhe(n),jhe(i,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,n={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(e,n,i={}){this.controls.splice(e,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,n={}){let i=this._adjustIndex(e);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(e,n,i={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),n&&(this.controls.splice(r,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,n={}){rIe(this,!1,e),e.forEach((i,r)=>{nIe(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){e!=null&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e=[],n={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n,this),this._updateTouched(n,this),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((n,i)=>i._syncPendingControls()?!0:n,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((n,i)=>{e(n,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(n=>n.enabled&&e(n))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}},yIe=j_;tT=(()=>{let e=class e{constructor(){this.useNonNullable=!1}get nonNullable(){let i=new e;return i.useNonNullable=!0,i}group(i,r=null){let s=this._reduceControls(i),o={};return Uke(r)?o=r:r!==null&&(o.validators=r.validator,o.asyncValidators=r.asyncValidator),new Wl(s,o)}record(i,r=null){let s=this._reduceControls(i);return new Hhe(s,r)}control(i,r,s){let o={};return this.useNonNullable?(Uke(r)?o=r:(o.validators=r,o.asyncValidators=s),new Bb(i,St(ve({},o),{nonNullable:!0}))):new Bb(i,r,s)}array(i,r,s){let o=i.map(a=>this._createControl(a));return new j_(o,r,s)}_reduceControls(i){let r={};return Object.keys(i).forEach(s=>{r[s]=this._createControl(i[s])}),r}_createControl(i){if(i instanceof Bb)return i;if(i instanceof Ik)return i;if(Array.isArray(i)){let r=i[0],s=i.length>1?i[1]:null,o=i.length>2?i[2]:null;return this.control(r,s,o)}else return this.control(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ad=(()=>{let e=class e extends tT{group(i,r=null){return super.group(i,r)}control(i,r,s){return super.control(i,r,s)}array(i,r,s){return super.array(i,r,s)}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ko=(()=>{let e=class e{static withConfig(i){return{ngModule:e,providers:[{provide:Ak,useValue:i.callSetDisabledState??j$}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[vIe]});let t=e;return t})(),Ia=(()=>{let e=class e{static withConfig(i){return{ngModule:e,providers:[{provide:hIe,useValue:i.warnOnNgModelWithFormControl??"always"},{provide:Ak,useValue:i.callSetDisabledState??j$}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[vIe]});let t=e;return t})()});var $t,Ep=Q(()=>{qn();$t=class extends uIe{get disabled(){return super.disabled}constructor(e,n,i){super(e,n),this.name=i,this.isNumber=!1,this._firstValueSetTemp=0}getOldValue(){return this._oldValue}valueChanged(){return this.value!==this._oldValue}getFirstValueSet(){return this._firstValueSet}getLastValueChanged(){return this._lastValueChanged}setValue(e,n){if(this._firstValueSetTemp===0?(this._firstValueSet=!0,this._firstValueSetTemp=1):this._firstValueSet=!1,this._oldValue=this.value,this._lastValueChanged=this._oldValue!==e,this.isNumber&&e!==null&&e!==""&&typeof e<"u"){if(e!=="-"){let i=parseFloat(typeof e?.replace=="function"?e.replace(",","."):e);super.setValue(i,n)}}else super.setValue(e,n)}}});var iT,Yhe=Q(()=>{iT=class{static getPasswordStrength(e){let n={ok:!1,text:"",oneLine:""},i=["!",'"',"\xA7","$","%","&","/","(",")","=","?"],r=new RegExp("^(?=.*[A-Z]).*$","g"),s=new RegExp("^(?=.*[a-z]).*$","g"),o=new RegExp("^(?=.*[0-9]).*$","g"),a=[...e].some(m=>i.includes(m)),l=r.test(e),c=s.test(e),d=o.test(e),u=e.length>=5;if(n.ok=a&&l&&c&&u&&d,!n.ok){let m=[];u||m.push("mind. 5 Zeichen"),a||m.push("ein Sonderzeichen"),l||m.push("ein Gro\xDFbuchstabe"),c||m.push("ein Kleinbuchstabe"),d||m.push("- eine Zahl"),n.text=`Es fehlen:
-`+m.join(`
-`),n.oneLine=m.join(", ")}return n}}});var _Ie,CIe=Q(()=>{_Ie={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8]))\\d{3}|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4]))|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-26-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-26-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-26-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[0568]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([3-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","9008\\d{3}|(?:[2-467]\\d\\d|510|862)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[1-9]\\d{8}|3[2-9]\\d{7}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[25]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29[1289]|389)","529(?:1[1-46-9]|2[013-8]|90)|5(?:298|389)[0-46-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5293[01]\\d{4}|5(?:2(?:[0-25-7]\\d|3[1-578]|4[02-46-8]|8[0235-7]|9[0-289])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[0189]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[017]\\d|2[0-2]|6[0-8]|8[0-3]))\\d{6}"],["80\\d{7}"],["89\\d{7}"],0,0,0,0,["592(?:4[0-2]|93)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:395|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:[27]2|44|87|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-9]|8[1-69]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[47]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-6])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-5]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-27]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[2378]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-8]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[04]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["5056(?:[0-35-9]\\d|4[46])\\d{4}|(?:4722|505[2-57-9]|983[29])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[01356]|3[0-24679]|4[167]|5[0-2]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","200\\d{6}|(?:33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[013-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}}});function Ey(t,e){var n=Array.prototype.slice.call(e);return n.push(_Ie),t.apply(this,n)}var Pk=Q(()=>{CIe()});function qhe(t){"@babel/helpers - typeof";return qhe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qhe(t)}function xIe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function U7t(t,e,n){return e&&xIe(t.prototype,e),n&&xIe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function j7t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $7t(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wN(t,e)}function K7t(t){var e=wIe();return function(){var i=SN(t),r;if(e){var s=SN(this).constructor;r=Reflect.construct(i,arguments,s)}else r=i.apply(this,arguments);return Y7t(this,r)}}function Y7t(t,e){if(e&&(qhe(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bIe(t)}function bIe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Zhe(t){var e=typeof Map=="function"?new Map:void 0;return Zhe=function(i){if(i===null||!q7t(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(i))return e.get(i);e.set(i,r)}function r(){return K$(i,arguments,SN(this).constructor)}return r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),wN(r,i)},Zhe(t)}function K$(t,e,n){return wIe()?K$=Reflect.construct:K$=function(r,s,o){var a=[null];a.push.apply(a,s);var l=Function.bind.apply(r,a),c=new l;return o&&wN(c,o.prototype),c},K$.apply(null,arguments)}function wIe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function q7t(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function wN(t,e){return wN=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},wN(t,e)}function SN(t){return SN=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},SN(t)}var e3,TN=Q(()=>{e3=function(t){$7t(n,t);var e=K7t(n);function n(i){var r;return j7t(this,n),r=e.call(this,i),Object.setPrototypeOf(bIe(r),n.prototype),r.name=r.constructor.name,r}return U7t(n)}(Zhe(Error))});var DN,SIe,TIe,n2,Z7t,X7t,Q7t,J7t,ewt,twt,Rk,EN,Gb=Q(()=>{DN=2,SIe=17,TIe=3,n2="0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9",Z7t="-\u2010-\u2015\u2212\u30FC\uFF0D",X7t="\uFF0F/",Q7t="\uFF0E.",J7t=" \xA0\xAD\u200B\u2060\u3000",ewt="()\uFF08\uFF09\uFF3B\uFF3D\\[\\]",twt="~\u2053\u223C\uFF5E",Rk="".concat(Z7t).concat(X7t).concat(Q7t).concat(J7t).concat(ewt).concat(twt),EN="+\uFF0B"});function Xhe(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),i=e[0].split("."),r=0;r<3;r++){var s=Number(n[r]),o=Number(i[r]);if(s>o)return 1;if(o>s)return-1;if(!isNaN(s)&&isNaN(o))return 1;if(isNaN(s)&&!isNaN(o))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var DIe=Q(()=>{});function O8(t){return t!=null&&t.constructor===iwt}var iwt,Y$=Q(()=>{iwt={}.constructor});function Qhe(t){"@babel/helpers - typeof";return Qhe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qhe(t)}function q$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function EIe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Z$(t,e,n){return e&&EIe(t.prototype,e),n&&EIe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function IIe(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function cwt(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!O8(t)||!O8(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(O8(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+dwt(t)+": "+t,"."))}function nT(t,e){if(e=new tu(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function AIe(t,e){return e.countries.hasOwnProperty(t)}function PIe(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?Xhe(e,nwt)===-1?this.v2=!0:Xhe(e,rwt)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var nwt,rwt,MIe,swt,tu,kIe,owt,awt,lwt,dwt,r2=Q(()=>{DIe();Y$();nwt="1.2.0",rwt="1.7.35",MIe=" ext. ",swt=/^\d+$/,tu=function(){function t(e){q$(this,t),cwt(e),this.metadata=e,PIe.call(this,e)}return Z$(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var i=this.countryCallingCodes()[n];if(i&&i.length===1&&i[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,i){if(n&&swt.test(n)&&(i=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new kIe(this.getCountryMetadata(n),this)}else if(i){if(!this.hasCallingCode(i))throw new Error("Unknown calling code: ".concat(i));this.numberingPlan=new kIe(this.getNumberingPlanMetadata(i),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var i=this.countryCallingCodes()[n];if(i)return i.length===1&&i[0].length===3?void 0:i}},{key:"getCountryCodeForCallingCode",value:function(n){var i=this.getCountryCodesForCallingCode(n);if(i)return i[0]}},{key:"getNumberingPlanMetadata",value:function(n){var i=this.getCountryCodeForCallingCode(n);if(i)return this.getCountryMetadata(i);if(this.nonGeographic()){var r=this.nonGeographic()[n];if(r)return r}else{var s=this.countryCallingCodes()[n];if(s&&s.length===1&&s[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),kIe=function(){function t(e,n){q$(this,t),this.globalMetadataObject=n,this.metadata=e,PIe.call(this,n.metadata)}return Z$(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,i=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return i.map(function(r){return new owt(r,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&IIe(this.types(),n))return new lwt(IIe(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?MIe:this.metadata[13]||MIe}}]),t}(),owt=function(){function t(e,n){q$(this,t),this._format=e,this.metadata=n}return Z$(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!awt.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),awt=/^\(?\$1\)?$/,lwt=function(){function t(e,n){q$(this,t),this.type=e,this.metadata=n}return Z$(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();dwt=function(e){return Qhe(e)}});function MN(t){var e="20",n="15",i="9",r="6",s="[ \xA0\\t,]*",o="[:\\.\uFF0E]?[ \xA0\\t,-]*",a="#?",l="(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)",c="(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)",d="[- ]+",u="[ \xA0\\t]*",m="(?:,{2}|;)",f=uwt+Fk(e),_=s+l+o+Fk(e)+a,x=s+c+o+Fk(i)+a,D=d+Fk(r)+"#",E=u+m+o+Fk(n)+a,M=u+"(?:,)+"+o+Fk(i)+a;return f+"|"+_+"|"+x+"|"+D+"|"+E+"|"+M}var uwt,Fk,Jhe=Q(()=>{Gb();uwt=";ext=",Fk=function(e){return"([".concat(n2,"]{1,").concat(e,"})")}});function epe(t){return t.length>=DN&&gwt.test(t)}function RIe(t){return mwt.test(t)}var hwt,pwt,mwt,fwt,gwt,FIe=Q(()=>{Gb();Jhe();hwt="["+n2+"]{"+DN+"}",pwt="["+EN+"]{0,1}(?:["+Rk+"]*["+n2+"]){3,}["+Rk+n2+"]*",mwt=new RegExp("^["+EN+"]{0,1}(?:["+Rk+"]*["+n2+"]){1,2}$","i"),fwt=pwt+"(?:"+MN()+")?",gwt=new RegExp("^"+hwt+"$|^"+fwt+"$","i")});function tpe(t){var e=t.search(LIe);if(e<0)return{};for(var n=t.slice(0,e),i=t.match(LIe),r=1;r<i.length;){if(i[r])return{number:n,ext:i[r]};r++}}var LIe,OIe=Q(()=>{Jhe();LIe=new RegExp("(?:"+MN()+")$","i")});function NIe(t){return vwt[t]}var vwt,VIe=Q(()=>{vwt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uFF10":"0","\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5","\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9"}});function ywt(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=_wt(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _wt(t,e){if(t){if(typeof t=="string")return BIe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BIe(t,e)}}function BIe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function X$(t){for(var e="",n=ywt(t.split("")),i;!(i=n()).done;){var r=i.value;e+=Cwt(r,e)||""}return e}function Cwt(t,e){return t==="+"?e?void 0:"+":NIe(t)}var zIe=Q(()=>{VIe()});var ipe=Q(()=>{r2()});function xwt(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=bwt(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bwt(t,e){if(t){if(typeof t=="string")return HIe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HIe(t,e)}}function HIe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function npe(t,e){for(var n=t.slice(),i=xwt(e),r;!(r=i()).done;){var s=r.value;t.indexOf(s)<0&&n.push(s)}return n.sort(function(o,a){return o-a})}var GIe=Q(()=>{});function N8(t,e){return WIe(t,void 0,e)}function WIe(t,e,n){var i=n.type(e),r=i&&i.possibleLengths()||n.possibleLengths();if(!r)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return WIe(t,"MOBILE",n);var s=n.type("MOBILE");s&&(r=npe(r,s.possibleLengths()))}else if(e&&!i)return"INVALID_LENGTH";var o=t.length,a=r[0];return a===o?"IS_POSSIBLE":a>o?"TOO_SHORT":r[r.length-1]<o?"TOO_LONG":r.indexOf(o,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}var kN=Q(()=>{GIe()});function rpe(t,e,n){if(e===void 0&&(e={}),n=new tu(n),e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));n.country(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return spe(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function spe(t,e){switch(N8(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}var ope=Q(()=>{r2();kN()});function s2(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}var rT=Q(()=>{});function wwt(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Swt(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Swt(t,e){if(t){if(typeof t=="string")return UIe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UIe(t,e)}}function UIe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function sT(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new tu(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var i=e.v2?t.nationalNumber:t.phone;if(s2(i,n.nationalNumberPattern())){if(ape(i,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||ape(i,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var r=wwt(Twt),s;!(s=r()).done;){var o=s.value;if(ape(i,o,n))return o}}}}function ape(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:s2(t,e.pattern())}var Twt,Q$=Q(()=>{r2();rT();Twt=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"]});function lpe(t,e,n){if(e=e||{},n=new tu(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return sT(t,e,n.metadata)!==void 0;var i=e.v2?t.nationalNumber:t.phone;return s2(i,n.nationalNumberPattern())}var jIe=Q(()=>{r2();rT();Q$()});function cpe(t,e,n){var i=new tu(n),r=i.getCountryCodesForCallingCode(t);return r?r.filter(function(s){return Dwt(e,s,n)}):[]}function Dwt(t,e,n){var i=new tu(n);return i.selectNumberingPlan(e),i.numberingPlan.possibleLengths().indexOf(t.length)>=0}var $Ie=Q(()=>{r2()});function dpe(t){return t.replace(new RegExp("[".concat(Rk,"]+"),"g")," ").trim()}var KIe=Q(()=>{Gb()});function upe(t,e,n){var i=n.useInternationalFormat,r=n.withNationalPrefix,s=n.carrierCode,o=n.metadata,a=t.replace(new RegExp(e.pattern()),i?e.internationalFormat():r&&e.nationalPrefixFormattingRule()?e.format().replace(Ewt,e.nationalPrefixFormattingRule()):e.format());return i?dpe(a):a}var Ewt,YIe=Q(()=>{KIe();Ewt=/(\$\d)/});function hpe(t,e,n){var i=new tu(n);if(i.selectNumberingPlan(t,e),i.defaultIDDPrefix())return i.defaultIDDPrefix();if(Mwt.test(i.IDDPrefix()))return i.IDDPrefix()}var Mwt,qIe=Q(()=>{r2();Mwt=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/});function ZIe(t){var e=t.number,n=t.ext;if(!e)return"";if(e[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(e).concat(n?";ext="+n:"")}var XIe=Q(()=>{});function kwt(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Iwt(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iwt(t,e){if(t){if(typeof t=="string")return QIe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QIe(t,e)}}function QIe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function JIe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function eAe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?JIe(Object(n),!0).forEach(function(i){Awt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):JIe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Awt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function IN(t,e,n,i){if(n?n=eAe(eAe({},tAe),n):n=tAe,i=new tu(i),t.country&&t.country!=="001"){if(!i.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));i.country(t.country)}else if(t.countryCallingCode)i.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";var r=i.countryCallingCode(),s=n.v2?t.nationalNumber:t.phone,o;switch(e){case"NATIONAL":return s?(o=J$(s,t.carrierCode,"NATIONAL",i,n),ppe(o,t.ext,i,n.formatExtension)):"";case"INTERNATIONAL":return s?(o=J$(s,null,"INTERNATIONAL",i,n),o="+".concat(r," ").concat(o),ppe(o,t.ext,i,n.formatExtension)):"+".concat(r);case"E.164":return"+".concat(r).concat(s);case"RFC3966":return ZIe({number:"+".concat(r).concat(s),ext:t.ext});case"IDD":if(!n.fromCountry)return;var a=Rwt(s,t.carrierCode,r,n.fromCountry,i);return ppe(a,t.ext,i,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(e,'"'))}}function J$(t,e,n,i,r){var s=Pwt(i.formats(),t);return s?upe(t,s,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&r&&r.nationalPrefix===!1),carrierCode:e,metadata:i}):t}function Pwt(t,e){for(var n=kwt(t),i;!(i=n()).done;){var r=i.value;if(r.leadingDigitsPatterns().length>0){var s=r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length-1];if(e.search(s)!==0)continue}if(s2(e,r.pattern()))return r}}function ppe(t,e,n,i){return e?i(t,e,n):t}function Rwt(t,e,n,i,r){var s=nT(i,r.metadata);if(s===n){var o=J$(t,e,"NATIONAL",r);return n==="1"?n+" "+o:o}var a=hpe(i,void 0,r.metadata);if(a)return"".concat(a," ").concat(n," ").concat(J$(t,null,"INTERNATIONAL",r))}var tAe,mpe=Q(()=>{rT();YIe();r2();qIe();XIe();tAe={formatExtension:function(e,n,i){return"".concat(e).concat(i.ext()).concat(n)}}});function iAe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function nAe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?iAe(Object(n),!0).forEach(function(i){Fwt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iAe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Fwt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Lwt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rAe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Owt(t,e,n){return e&&rAe(t.prototype,e),n&&rAe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bwt(t,e){var n,i,r=new tu(e);return Vwt(t)?(n=t,r.selectNumberingPlan(n),i=r.countryCallingCode()):(i=t,Nwt&&r.isNonGeographicCallingCode(i)&&(n="001")),{country:n,countryCallingCode:i}}var Nwt,sAe,Vwt,oAe=Q(()=>{r2();ope();jIe();Q$();$Ie();mpe();Nwt=!1,sAe=function(){function t(e,n,i){if(Lwt(this,t),!e)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!i)throw new TypeError("`metadata` not passed");var r=Bwt(e,i),s=r.country,o=r.countryCallingCode;this.country=s,this.countryCallingCode=o,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return i}}return Owt(t,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:cpe(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return rpe(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return lpe(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new tu(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return sT(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,i){return IN(this,n,i?nAe(nAe({},i),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}]),t}(),Vwt=function(e){return/^[A-Z]{2}$/.test(e)}});function fpe(t,e,n,i){if(e){var r=new tu(i);r.selectNumberingPlan(e,n);var s=new RegExp(r.IDDPrefix());if(t.search(s)===0){t=t.slice(t.match(s)[0].length);var o=t.match(zwt);if(!(o&&o[1]!=null&&o[1].length>0&&o[1]==="0"))return t}}}var zwt,aAe=Q(()=>{r2();Gb();zwt=new RegExp("(["+n2+"])")});function gpe(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),i=n.exec(t);if(i){var r,s,o=i.length-1,a=o>0&&i[o];if(e.nationalPrefixTransformRule()&&a)r=t.replace(n,e.nationalPrefixTransformRule()),o>1&&(s=i[1]);else{var l=i[0];r=t.slice(l.length),a&&(s=i[1])}var c;if(a){var d=t.indexOf(i[1]),u=t.slice(0,d);u===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=i[0];return{nationalNumber:r,nationalPrefix:c,carrierCode:s}}}return{nationalNumber:t}}var lAe=Q(()=>{});function Lk(t,e){var n=gpe(t,e),i=n.carrierCode,r=n.nationalNumber;if(r!==t){if(!Hwt(t,r,e))return{nationalNumber:t};if(e.possibleLengths()&&!Gwt(r,e))return{nationalNumber:t}}return{nationalNumber:r,carrierCode:i}}function Hwt(t,e,n){return!(s2(t,n.nationalNumberPattern())&&!s2(e,n.nationalNumberPattern()))}function Gwt(t,e){switch(N8(t,e)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}var vpe=Q(()=>{lAe();rT();kN()});function ype(t,e,n,i){var r=e?nT(e,i):n;if(t.indexOf(r)===0){i=new tu(i),i.selectNumberingPlan(e,n);var s=t.slice(r.length),o=Lk(s,i),a=o.nationalNumber,l=Lk(t,i),c=l.nationalNumber;if(!s2(c,i.nationalNumberPattern())&&s2(a,i.nationalNumberPattern())||N8(c,i)==="TOO_LONG")return{countryCallingCode:r,number:s}}return{number:t}}var cAe=Q(()=>{r2();rT();vpe();kN();ipe()});function _pe(t,e,n,i){if(!t)return{};var r;if(t[0]!=="+"){var s=fpe(t,e,n,i);if(s&&s!==t)r=!0,t="+"+s;else{if(e||n){var o=ype(t,e,n,i),a=o.countryCallingCode,l=o.number;if(a)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:l}}return{number:t}}}if(t[1]==="0")return{};i=new tu(i);for(var c=2;c-1<=TIe&&c<=t.length;){var d=t.slice(1,c);if(i.hasCallingCode(d))return i.selectNumberingPlan(d),{countryCallingCodeSource:r?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:d,number:t.slice(c)};c++}return{}}var dAe=Q(()=>{aAe();cAe();r2();Gb()});function Wwt(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Uwt(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uwt(t,e){if(t){if(typeof t=="string")return uAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uAe(t,e)}}function uAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Cpe(t,e){var n=e.countries,i=e.defaultCountry,r=e.metadata;r=new tu(r);for(var s=[],o=Wwt(n),a;!(a=o()).done;){var l=a.value;if(r.country(l),r.leadingDigits()){if(t&&t.search(r.leadingDigits())===0)return l}else if(sT({phone:t,country:l},void 0,r.metadata))if(i){if(l===i)return l;s.push(l)}else return l}if(s.length>0)return s[0]}var hAe=Q(()=>{r2();Q$()});function xpe(t,e){var n=e.nationalNumber,i=e.defaultCountry,r=e.metadata;if(jwt&&r.isNonGeographicCallingCode(t))return"001";var s=r.getCountryCodesForCallingCode(t);if(s)return s.length===1?s[0]:Cpe(n,{countries:s,defaultCountry:i,metadata:r.metadata})}var jwt,pAe=Q(()=>{hAe();jwt=!1});function Tpe(t){var e=t.indexOf(eK);if(e<0)return null;var n=e+eK.length;if(n>=t.length)return"";var i=t.indexOf(";",n);return i>=0?t.substring(n,i):t.substring(n)}function gAe(t){return t===null?!0:t.length===0?!1:Ywt.test(t)||Jwt.test(t)}var wpe,$wt,mAe,Kwt,Ywt,bpe,qwt,Zwt,Xwt,Qwt,Jwt,Spe,eK,fAe,vAe=Q(()=>{Gb();wpe="+",$wt="[\\-\\.\\(\\)]?",mAe="(["+n2+"]|"+$wt+")",Kwt="^\\"+wpe+mAe+"*["+n2+"]"+mAe+"*$",Ywt=new RegExp(Kwt,"g"),bpe=n2,qwt="["+bpe+"]+((\\-)*["+bpe+"])*",Zwt="a-zA-Z",Xwt="["+Zwt+"]+((\\-)*["+bpe+"])*",Qwt="^("+qwt+"\\.)*"+Xwt+"\\.?$",Jwt=new RegExp(Qwt,"g"),Spe="tel:",eK=";phone-context=",fAe=";isub="});function Dpe(t,e){var n=e.extractFormattedPhoneNumber,i=Tpe(t);if(!gAe(i))throw new e3("NOT_A_NUMBER");var r;if(i===null)r=n(t)||"";else{r="",i.charAt(0)===wpe&&(r+=i);var s=t.indexOf(Spe),o;s>=0?o=s+Spe.length:o=0;var a=t.indexOf(eK);r+=t.substring(o,a)}var l=r.indexOf(fAe);if(l>0&&(r=r.substring(0,l)),r!=="")return r}var yAe=Q(()=>{vAe();TN()});function Ok(t,e,n){if(e=e||{},n=new tu(n),e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new e3("INVALID_COUNTRY"):new Error("Unknown country: ".concat(e.defaultCountry));var i=sSt(t,e.v2,e.extract),r=i.number,s=i.ext,o=i.error;if(!r){if(e.v2)throw o==="TOO_SHORT"?new e3("TOO_SHORT"):new e3("NOT_A_NUMBER");return{}}var a=aSt(r,e.defaultCountry,e.defaultCallingCode,n),l=a.country,c=a.nationalNumber,d=a.countryCallingCode,u=a.countryCallingCodeSource,m=a.carrierCode;if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new e3("INVALID_COUNTRY");return{}}if(!c||c.length<DN){if(e.v2)throw new e3("TOO_SHORT");return{}}if(c.length>SIe){if(e.v2)throw new e3("TOO_LONG");return{}}if(e.v2){var f=new sAe(d,c,n.metadata);return l&&(f.country=l),m&&(f.carrierCode=m),s&&(f.ext=s),f.__countryCallingCodeSource=u,f}var _=(e.extended?n.hasSelectedNumberingPlan():l)?s2(c,n.nationalNumberPattern()):!1;return e.extended?{country:l,countryCallingCode:d,carrierCode:m,valid:_,possible:_?!0:!!(e.extended===!0&&n.possibleLengths()&&spe(c,n)),phone:c,ext:s}:_?oSt(l,c,s):{}}function rSt(t,e,n){if(t){if(t.length>eSt){if(n)throw new e3("TOO_LONG");return}if(e===!1)return t;var i=t.search(tSt);if(!(i<0))return t.slice(i).replace(iSt,"")}}function sSt(t,e,n){var i=Dpe(t,{extractFormattedPhoneNumber:function(o){return rSt(o,n,e)}});if(!i)return{};if(!epe(i))return RIe(i)?{error:"TOO_SHORT"}:{};var r=tpe(i);return r.ext?r:{number:i}}function oSt(t,e,n){var i={country:t,phone:e};return n&&(i.ext=n),i}function aSt(t,e,n,i){var r=_pe(X$(t),e,n,i.metadata),s=r.countryCallingCodeSource,o=r.countryCallingCode,a=r.number,l;if(o)i.selectNumberingPlan(o);else if(a&&(e||n))i.selectNumberingPlan(e,n),e?l=e:nSt&&i.isNonGeographicCallingCode(n)&&(l="001"),o=n||nT(e,i.metadata);else return{};if(!a)return{countryCallingCodeSource:s,countryCallingCode:o};var c=Lk(X$(a),i),d=c.nationalNumber,u=c.carrierCode,m=xpe(o,{nationalNumber:d,defaultCountry:e,metadata:i});return m&&(l=m,m==="001"||i.country(l)),{country:l,countryCallingCode:o,countryCallingCodeSource:s,nationalNumber:d,carrierCode:u}}var eSt,tSt,iSt,nSt,Epe=Q(()=>{Gb();TN();r2();FIe();OIe();zIe();ipe();ope();oAe();rT();dAe();vpe();pAe();yAe();eSt=250,tSt=new RegExp("["+EN+n2+"]"),iSt=new RegExp("[^"+n2+"#]+$"),nSt=!1});function _Ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function CAe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_Ae(Object(n),!0).forEach(function(i){lSt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_Ae(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function lSt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oT(t,e,n){return Ok(t,CAe(CAe({},e),{},{v2:!0}),n)}var tK=Q(()=>{Epe()});function xAe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function cSt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xAe(Object(n),!0).forEach(function(i){dSt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xAe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function dSt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uSt(t,e){return fSt(t)||mSt(t,e)||pSt(t,e)||hSt()}function hSt(){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 pSt(t,e){if(t){if(typeof t=="string")return bAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bAe(t,e)}}function bAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function mSt(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],r=!0,s=!1,o,a;try{for(n=n.call(t);!(r=(o=n.next()).done)&&(i.push(o.value),!(e&&i.length===e));r=!0);}catch(l){s=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw a}}return i}}function fSt(t){if(Array.isArray(t))return t}function V8(t){var e=Array.prototype.slice.call(t),n=uSt(e,4),i=n[0],r=n[1],s=n[2],o=n[3],a,l,c;if(typeof i=="string")a=i;else throw new TypeError("A text for parsing must be a string.");if(!r||typeof r=="string")o?(l=s,c=o):(l=void 0,c=s),r&&(l=cSt({defaultCountry:r},l));else if(O8(r))s?(l=r,c=s):c=r;else throw new Error("Invalid second argument: ".concat(r));return{text:a,options:l,metadata:c}}var AN=Q(()=>{Y$()});function PN(){var t=V8(arguments),e=t.text,n=t.options,i=t.metadata;return oT(e,n,i)}var wAe=Q(()=>{tK();AN()});function SAe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function TAe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?SAe(Object(n),!0).forEach(function(i){gSt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):SAe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function gSt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function RN(t,e,n){e&&e.defaultCountry&&!AIe(e.defaultCountry,n)&&(e=TAe(TAe({},e),{},{defaultCountry:void 0}));try{return oT(t,e,n)}catch(i){if(!(i instanceof e3))throw i}}var Mpe=Q(()=>{tK();TN();r2()});function DAe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function EAe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?DAe(Object(n),!0).forEach(function(i){vSt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):DAe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function vSt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function iK(){var t=V8(arguments),e=t.text,n=t.options,i=t.metadata;n=EAe(EAe({},n),{},{extract:!1});var r=RN(e,n,i);return r&&r.isValid()||!1}var MAe=Q(()=>{AN();Mpe()});function kAe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function IAe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kAe(Object(n),!0).forEach(function(i){ySt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kAe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function ySt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nK(){var t=V8(arguments),e=t.text,n=t.options,i=t.metadata;n=IAe(IAe({},n),{},{extract:!1});var r=RN(e,n,i);return r&&r.isPossible()||!1}var AAe=Q(()=>{AN();Mpe()});function PAe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function RAe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?PAe(Object(n),!0).forEach(function(i){_St(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):PAe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function _St(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rK(){var t=V8(arguments),e=t.text,n=t.options,i=t.metadata;n=RAe(RAe({},n),{},{extract:!1});try{var r=oT(e,n,i);i=new tu(i),i.selectNumberingPlan(r.countryCallingCode);var s=N8(r.nationalNumber,i);if(s!=="IS_POSSIBLE")return s}catch(o){if(o instanceof e3)return o.message;throw o}}var FAe=Q(()=>{AN();tK();TN();r2();kN()});var FN=Q(()=>{wAe();MAe();AAe();FAe()});function LN(){return Ey(PN,arguments)}var LAe=Q(()=>{Pk();FN()});function sK(){return Ey(iK,arguments)}var OAe=Q(()=>{Pk();FN()});function kpe(){return Ey(nK,arguments)}var NAe=Q(()=>{Pk();FN()});function oK(){return Ey(rK,arguments)}var VAe=Q(()=>{Pk();FN()});function CSt(t,e){return SSt(t)||wSt(t,e)||bSt(t,e)||xSt()}function xSt(){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 bSt(t,e){if(t){if(typeof t=="string")return BAe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BAe(t,e)}}function BAe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function wSt(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],r=!0,s=!1,o,a;try{for(n=n.call(t);!(r=(o=n.next()).done)&&(i.push(o.value),!(e&&i.length===e));r=!0);}catch(l){s=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw a}}return i}}function SSt(t){if(Array.isArray(t))return t}function Ipe(){var t=TSt(arguments),e=t.input,n=t.format,i=t.options,r=t.metadata;return IN(e,n,i,r)}function TSt(t){var e=Array.prototype.slice.call(t),n=CSt(e,5),i=n[0],r=n[1],s=n[2],o=n[3],a=n[4],l,c,d,u;if(typeof i=="string")if(typeof s=="string")c=s,a?(d=o,u=a):u=o,l=Ok(i,{defaultCountry:r,extended:!0},u);else{if(typeof r!="string")throw new Error("`format` argument not passed to `formatNumber(number, format)`");c=r,o?(d=s,u=o):u=s,l=Ok(i,{extended:!0},u)}else if(O8(i))l=i,c=r,o?(d=s,u=o):u=s;else throw new TypeError("A phone number must either be a string or an object of shape { phone, [country] }.");return c==="International"?c="INTERNATIONAL":c==="National"&&(c="NATIONAL"),{input:l,format:c,options:d,metadata:u}}var zAe=Q(()=>{mpe();Epe();Y$()});function aK(){return Ey(Ipe,arguments)}var HAe=Q(()=>{Pk();zAe()});var GAe=Q(()=>{LAe();OAe();NAe();VAe();HAe()});var Kc,My=Q(()=>{GAe();Kc=(()=>{let e=class e{static isValid(i){return typeof i!="string"?!1:!!i.match(/^\+\d{10,13}$/)}static parse(i){return LN(i,"DE")}static validatePhoneNumberLength(i){return oK(i)}static isValidPhoneNumber(i){return sK(i)}static isValidPhoneNumberNxt(i){return i&&i?.startsWith("+")&&i?.length>10&&/^\+\d{9,17}$/g.exec(i)}static isPossiblePhoneNumber(i){return kpe(i)}static formatHuman(i){return aK(i,"INTERNATIONAL")||i}static formatNxt(i){return i?(i=i.replace(/\D/g,""),i.startsWith("0")&&(i="49"+i.substring(1)),"+"+i):""}static format(i){try{if(typeof i=="string"&&i.length>7){i=i.replace(/[^\d+]/g,""),i=i.replaceAll("+49+49","+49");let r=LN(i,"DE");if(r){let s=r.number.toString(),o=r.isValid(),a=r.isPossible();return o||(s=e.tryGetValidNumber(s)),s}}}catch(r){if(r.message==="INVALID_COUNTRY")return i?.startsWith("+")?e.format(i.substring(1)):"";if(r.message==="NOT_A_NUMBER"||r.message==="TOO_LONG")return"";debugger}return""}static tryGetValidNumber(i){for(;oK(i)==="TOO_LONG";)i=i.substring(0,i.length-1);for(let r=0;r<i.length;r++){if(sK(i))return i;i=i.substring(0,i.length-1)}return""}static shorten(i){}static contactsHaveSameMobile(i,r){let s=!!i.mobile&&!!r.mobile&&e.format(i.mobile)===e.format(r.mobile);return s||(s=!!i.mobileFormatted&&!!r.mobileFormatted&&e.format(i.mobileFormatted)===e.format(r.mobileFormatted)),s}static test(){e.format("+49152314089449"),e.format("+49\u202A+491729236615\u202C");let i=e.format("+32 9 385 72 540");if(!e.isValid(e.Numbers.Julian))debugger;if(e.isValid("+4915 120123232"))debugger;if(e.isValid("+4915a1201232"))debugger;if(e.format("+491512 012 32")!=="+49151201232")debugger;if(e.format("01512 012 32")!=="+49151201232")debugger}static isSame(i,r){if(typeof i!="string"||typeof r!="string")debugger;return i===r?!0:i?.mobileFormat()===r?.mobileFormat()}};e.Numbers={NiklasNXT:"+4917642725407",Niklas:"+491785815558",NiklasES:"+34604110000",Julian:"+4915120123232",Sadri:"+32484101121",Bobby:"+4915752870433",CaponePrivat:"+4917683296085",CaponeNXT:"+4917687793584",Thorsten:"+34603289774",Sven:"+4916091661816",Achim:"+4915117601869",Born:"+491722129839",Lili:"+491786311193",Marcel:"+4915781715198",Deniz:"+491793952618",Jeremy:"+491737139154",Mandy:"+4917682647279",ArtistManagementFranchise:"+4917677870071",ArtistManagement:"+491795668878"};let t=e;return t})();String.prototype.mobileIsSame=function(t){return Kc.isSame(this,t)};String.prototype.mobileFormat=function(){return Kc.format(this)}});var ii,nc=Q(()=>{Ld();Yhe();My();ii=(()=>{let e=class e{static validCurrency(i){try{return!i.value||i.value.toString().match(/^[0-9^]*$/g)?null:{validCurrency:!0}}catch{return Gn.error("validCurrency fehlgeschlagen",i.value),{validCurrency:!0}}}static requiredAndNotNaN(i){let r=i.value;return Array.isArray(r)?r.length>0?null:{required:!0}:r==null||r===""||typeof r=="number"&&isNaN(r)?{required:!0}:null}static mobile(i){try{return i.value===""||i.value===null||Kc.isValidPhoneNumberNxt(i.value)?null:{mobile:!0}}catch{return{mobile:!0}}}static mobileFullCheck(i){try{if(i.value===""||i.value===null)return null;let r=Kc.parse(i.value),s=Kc.validatePhoneNumberLength(i.value),o=Kc.isValidPhoneNumber(i.value),a=Kc.isPossiblePhoneNumber(i.value);if(!s&&o&&a)return null;let l=Kc.validatePhoneNumberLength(i.value);if(l)return l==="TOO_LONG"?{mobileFullCheck:"Zu lang"}:l==="TOO_SHORT"?{mobileFullCheck:"zu kurz"}:l==="INVALID_COUNTRY"?{mobileFullCheck:"Ung\xFCltige L\xE4ndervorwahl"}:{mobileFullCheck:l};debugger}catch(r){return{text:"Keine Telefonnummer :( ("+r.message+")"}}}static password(i){try{let r=iT.getPasswordStrength(i.value);return r.ok?null:{password:{text:r.oneLine}}}catch{return Gn.error("validCurrency fehlgeschlagen",i.value),{validCurrency:!0}}}static validCustomer(i){return i.value&&i.value.id?null:{noCustomer:!0}}static onlyNumbers(i){return i.value&&/^\d+$/.test(i.value)?null:{onlyNumbers:!0}}static onlyAZ(i){return i.value&&/^[A-Z,a-z]+$/.test(i.value)?null:{onlyAZ:!0}}static uppercase(i){return i.value&&/^[A-Z0-9ÄÜÖ]+$/.test(i.value)?null:{uppercase:!0}}static StudioCashReportArtist(i){return i.value&&i.value.id?null:{noArtist:!0}}static hasProperty(i){return r=>{if(r.value&&r.value[i])return null;{let s={};return s["missingProperty_"+i]=!0,s}}}static maxWords(i){return r=>{if(typeof r.value=="string"&&r.value.split(" ").length<=i)return null;{let s={};return s.maxWordCount={maxWordLength:i},s}}}static exactCharLength(i){return r=>{if(typeof r.value=="string"&&r.value.length===i)return null;{let s={};return s.exactCharLength={charLength:i},s}}}static trim(i){return i.value&&i.value.length>0&&(i.value.startsWith(" ")||i.value.endsWith(" "))?{trim:!0}:null}static custom(i){return r=>{let s=i(r.value);return s?{custom:{text:s}}:null}}static germanChars(i){return i.value&&/^[a-zäüöA-Z0-9ÄÜÖ\s\-\(\)]+$/.test(i.value)?null:{germanChars:!0}}static artistName(i){return i.value&&/^[a-zäüöA-Z0-9ÄÜÖ\s\-\(\)]+$/.test(i.value)?null:{artistName:!0}}static money(i){return Number.isNaN(i.value)?{money:!0}:null}};e.errorTexts={validCurrency:()=>"ung\xFCltiger Wert",maxWordCount:i=>"Maximal "+i.maxWordLength+" W\xF6rter",trim:()=>"Am Anfang und ende keine Leerzeichen",required:()=>"wird ben\xF6tigt",alreadyExists:()=>"existiert bereits",mobile:()=>"keine g\xFCltige Telefonnummer",mobileFullCheck:i=>i,password:i=>i.text,exactCharLength:i=>i.charLength===1?"Genau Ein Buchstab":"Genau "+i.charLength+" Zeichen",onlyNumbers:()=>"Nur Zahlen",onlyAZ:()=>"Nur Buchstaben von A-Z",uppercase:()=>"Nur Gro\xDFbuchstaben",custom:i=>i.text,germanChars:()=>"nur deutsche Zeichen",artistName:()=>"keine komischen Zeichen bitte",money:()=>"Ung\xFCltiger Betrag"};let t=e;return t})()});var DSt,ESt,MSt,Xp,Mv=Q(()=>{me();Ep();nc();Gi();me();DSt=["clickElement"],ESt=["inputElement"],MSt=["controlElement"],Xp=(()=>{let e=class e extends bt{set nxtFormControl(i){if(i){let r;this._nxtFormControl?.element&&(r=this._nxtFormControl?.element),this._nxtFormControl=i,this._nxtFormControl.formControlWrapper=this,r&&(this._nxtFormControl.element=r),this.nxtFormControl._markAsTouched||(this.nxtFormControl._markAsTouched=this.nxtFormControl.markAsTouched,this.nxtFormControl.markAsTouched=()=>{this.createErrorList(),this.nxtFormControl._markAsTouched()}),this.nxtFormControl.valueChanges.subscribe(()=>{this.calcShowInvalidError(),this.createErrorList()}),this._nxtFormControl.events.subscribe(s=>{this.calcShowInvalidError(),this.createErrorList(),this.onEvent&&this.onEvent(s)})}this.onFormControlSet&&this.onFormControlSet()}get nxtFormControl(){return this._nxtFormControl}constructor(){super(),this.enter=new nt,this.width="100%",this.showInvalidError=!1,this.nxtFormControl=new $t}createErrorList(){if(this._nxtFormControl.errors){let i=Object.keys(this._nxtFormControl.errors).map(r=>typeof this._nxtFormControl.errors[r]=="string"?this._nxtFormControl.errors[r]:ii.errorTexts[r]?ii.errorTexts[r](this._nxtFormControl.getError(r)):"").filter(r=>!!r);this.errorText=i.join(", ")}else this.errorText=""}setInputValue(i){this.inputControlElemRef?.nativeElement&&(this.inputControlElemRef.nativeElement.value=i)}setFocus(){this.controlElemRef?.nativeElement?.focus()}select(){this.doSelect(0)}doSelect(i=0){if(this.clickControlElemRef?.nativeElement){let r=Date.now();this.clickControlElemRef.nativeElement.addEventListener("focusout",()=>{Date.now()-r<300&&this.doSelect(0)}),this.setFocus(),this.clickControlElemRef.nativeElement.setSelectionRange(0,this.clickControlElemRef.nativeElement.value?.length)}else i<100&&requestAnimationFrame(()=>{this.doSelect(i+1)})}click(){this.clickControlElemRef?.nativeElement?.click()}calcShowInvalidError(){this.showInvalidError=this.nxtFormControl.invalid&&(this.nxtFormControl.dirty||this.nxtFormControl.touched)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["ng-component"]],viewQuery:function(r,s){if(r&1&&(ei(DSt,5),ei(ESt,5),ei(MSt,7)),r&2){let o;Pt(o=Rt())&&(s.clickControlElemRef=o.first),Pt(o=Rt())&&(s.inputControlElemRef=o.first),Pt(o=Rt())&&(s.controlElemRef=o.first)}},inputs:{nxtFormControl:"nxtFormControl",width:"width",requiredError:"requiredError"},outputs:{enter:"enter"},features:[et],decls:0,vars:0,template:function(r,s){},encapsulation:2});let t=e;return t})()});var Wn,Vd=Q(()=>{Wn=class t{static toMoneyString(e,n="\u20AC",i=!0){return typeof e=="string"&&(e=parseFloat(e.replace(",","."))),i||e%1!==0&&(i=!0),this.roundToString(e,i?2:0)+(n.length>0?" ":"")+n}static round(e,n){let i=Math.pow(10,n);return Math.round(e*i)/i}static roundToString(e,n){if(typeof e>"u")return"?";try{return e.toLocaleString("de-DE",{minimumFractionDigits:n,maximumFractionDigits:n})}catch(i){console.error("roundToString fehlgeschlagen",i)}return"?"}static test(){let e=t.toMoneyString(8e4),n=t.toMoneyString(80000.1),i=t.toMoneyString(10000001),r=t.toMoneyString(1000000199e-2),s=t.roundToString(1000000199876545e-8,2),o=t.roundToString(100000011e-1,2)}};Number.prototype.roundToString=function(t){return Wn.roundToString(this,t)};Number.prototype.toMoneyString=function(t="\u20AC",e=!1){return Wn.toMoneyString(this,t,e)};String.prototype.toMoneyString=function(t="\u20AC",e=!0){return Wn.toMoneyString(this,t,e)}});var Nk,Ape=Q(()=>{Nk=class{constructor(e,n=!1){this.lastValue="",this.pointsRemoved=!1,this.enable=!0,e.valueChanges.subscribe(i=>{if(!this.enable){this.lastValue=i;return}if(n&&!/^\d+/g.test(i)){this.lastValue=i;return}let r=i;if(this.lastValue&&i&&i.length<this.lastValue.length&&i.length+1===this.lastValue.length){if(this.pointsRemoved){this.pointsRemoved=!1;return}this.lastValue.endsWith(".")?(this.lastValue=i,setTimeout(()=>e.setValue(i.substring(0,i.length-1)))):this.lastValue=i;return}i.includes("..")?(r=i.replaceAll("..","."),this.pointsRemoved=!0):r=this.completeDate(i),r!==i&&setTimeout(()=>e.setValue(r)),this.lastValue=i})}completeDate(e){if(e.length===1){if(parseInt(e[0],10)>3)return"0"+e+"."}else if(e.length===2){if(!e.includes("."))return e+"."}else if(e.length===3)if(e.includes(".")){if(parseInt(e.substring(0,2),10)>31)return"31."}else return e.substring(0,2)+"."+e.substring(2,3);else if(e.length===4){if(e.includes(".")&&parseInt(e.split(".")[1],10)>1)return e.substring(0,3)+"0"+e.substring(3,4)+"."}else if(e.length===5){if(!e.endsWith("."))return e+"."}else if(e.length===8){let n=parseInt(e.split(".")[2],10);if(n!==19&&n!==20)return n>50?e=e.substring(0,6)+"19"+e.substring(6,8):e=e.substring(0,6)+"20"+e.substring(6,8),e}else if(e.length>10)return e.substring(0,10);return e}}});function ISt(t){return()=>t.scrollStrategies.reposition({scrollThrottle:jAe})}function PSt(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var kSt,jAe,$Ae,ASt,RSt,WAe,UAe,FSt,LSt,OSt,NSt,dl,VSt,lK,Mp=Q(()=>{Cl();J0();Zg();me();me();ri();Wc();Wc();Xh();Xh();Th();Qf();Qf();bv();$n();R1();bl();kSt=["tooltip"],jAe=20,$Ae=new Ri("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.reposition({scrollThrottle:jAe})}});ASt={provide:$Ae,deps:[xl],useFactory:ISt};RSt=new Ri("mat-tooltip-default-options",{providedIn:"root",factory:PSt}),WAe="tooltip-panel",UAe=Sh({passive:!0}),FSt=8,LSt=8,OSt=24,NSt=200,dl=(()=>{let e=class e{get position(){return this._position}set position(i){i!==this._position&&(this._position=i,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(i){this._positionAtOrigin=Y2(i),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(i){let r=Y2(i);this._disabled!==r&&(this._disabled=r,r?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(i){this._showDelay=Q0(i)}get hideDelay(){return this._hideDelay}set hideDelay(i){this._hideDelay=Q0(i),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(i){let r=this._message;this._message=i!=null?String(i).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(r)}get tooltipClass(){return this._tooltipClass}set tooltipClass(i){this._tooltipClass=i,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(i,r,s,o,a,l,c,d,u,m,f,_){this._overlay=i,this._elementRef=r,this._scrollDispatcher=s,this._viewContainerRef=o,this._ngZone=a,this._platform=l,this._ariaDescriber=c,this._focusMonitor=d,this._dir=m,this._defaultOptions=f,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=VSt,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._touchstartTimeout=null,this._destroyed=new Mi,this._injector=Ve($o),this._scrollStrategy=u,this._document=_,f&&(this._showDelay=f.showDelay,this._hideDelay=f.hideDelay,f.position&&(this.position=f.position),f.positionAtOrigin&&(this.positionAtOrigin=f.positionAtOrigin),f.touchGestures&&(this.touchGestures=f.touchGestures),f.tooltipClass&&(this.tooltipClass=f.tooltipClass)),m.change.pipe(Mr(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=FSt}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Mr(this._destroyed)).subscribe(i=>{i?i==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let i=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([r,s])=>{i.removeEventListener(r,s,UAe)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(i,this.message,"tooltip"),this._focusMonitor.stopMonitoring(i)}show(i=this.showDelay,r){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let s=this._createOverlay(r);this._detach(),this._portal=this._portal||new e2(this._tooltipComponent,this._viewContainerRef);let o=this._tooltipInstance=s.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(Mr(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),o.show(i)}hide(i=this.hideDelay){let r=this._tooltipInstance;r&&(r.isVisible()?r.hide(i):(r._cancelPendingAnimations(),this._detach()))}toggle(i){this._isTooltipVisible()?this.hide():this.show(void 0,i)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(i){if(this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!i)&&o._origin instanceof fi)return this._overlayRef;this._detach()}let r=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),s=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin?i||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(r);return s.positionChanges.pipe(Mr(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:s,panelClass:`${this._cssClassPrefix}-${WAe}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Mr(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Mr(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Mr(this._destroyed)).subscribe(o=>{this._isTooltipVisible()&&o.keyCode===27&&!Pc(o)&&(o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(i){let r=i.getConfig().positionStrategy,s=this._getOrigin(),o=this._getOverlayPosition();r.withPositions([this._addOffset(ve(ve({},s.main),o.main)),this._addOffset(ve(ve({},s.fallback),o.fallback))])}_addOffset(i){let r=LSt,s=!this._dir||this._dir.value=="ltr";return i.originY==="top"?i.offsetY=-r:i.originY==="bottom"?i.offsetY=r:i.originX==="start"?i.offsetX=s?-r:r:i.originX==="end"&&(i.offsetX=s?r:-r),i}_getOrigin(){let i=!this._dir||this._dir.value=="ltr",r=this.position,s;r=="above"||r=="below"?s={originX:"center",originY:r=="above"?"top":"bottom"}:r=="before"||r=="left"&&i||r=="right"&&!i?s={originX:"start",originY:"center"}:(r=="after"||r=="right"&&i||r=="left"&&!i)&&(s={originX:"end",originY:"center"});let{x:o,y:a}=this._invertPosition(s.originX,s.originY);return{main:s,fallback:{originX:o,originY:a}}}_getOverlayPosition(){let i=!this._dir||this._dir.value=="ltr",r=this.position,s;r=="above"?s={overlayX:"center",overlayY:"bottom"}:r=="below"?s={overlayX:"center",overlayY:"top"}:r=="before"||r=="left"&&i||r=="right"&&!i?s={overlayX:"end",overlayY:"center"}:(r=="after"||r=="right"&&i||r=="left"&&!i)&&(s={overlayX:"start",overlayY:"center"});let{x:o,y:a}=this._invertPosition(s.overlayX,s.overlayY);return{main:s,fallback:{overlayX:o,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),wh(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(i){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=i,this._tooltipInstance._markForCheck())}_invertPosition(i,r){return this.position==="above"||this.position==="below"?r==="top"?r="bottom":r==="bottom"&&(r="top"):i==="end"?i="start":i==="start"&&(i="end"),{x:i,y:r}}_updateCurrentPositionClass(i){let{overlayY:r,originX:s,originY:o}=i,a;if(r==="center"?this._dir&&this._dir.value==="rtl"?a=s==="end"?"left":"right":a=s==="start"?"left":"right":a=r==="bottom"&&o==="top"?"above":"below",a!==this._currentPosition){let l=this._overlayRef;if(l){let c=`${this._cssClassPrefix}-${WAe}-`;l.removePanelClass(c+this._currentPosition),l.addPanelClass(c+a)}this._currentPosition=a}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",i=>{this._setupPointerExitEventsIfNeeded();let r;i.x!==void 0&&i.y!==void 0&&(r=i),this.show(void 0,r)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",i=>{let r=i.targetTouches?.[0],s=r?{x:r.clientX,y:r.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let o=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,s)},this._defaultOptions.touchLongPressShowDelay??o)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let i=[];if(this._platformSupportsMouseEvents())i.push(["mouseleave",r=>{let s=r.relatedTarget;(!s||!this._overlayRef?.overlayElement.contains(s))&&this.hide()}],["wheel",r=>this._wheelListener(r)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let r=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};i.push(["touchend",r],["touchcancel",r])}this._addListeners(i),this._passiveListeners.push(...i)}_addListeners(i){i.forEach(([r,s])=>{this._elementRef.nativeElement.addEventListener(r,s,UAe)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(i){if(this._isTooltipVisible()){let r=this._document.elementFromPoint(i.clientX,i.clientY),s=this._elementRef.nativeElement;r!==s&&!s.contains(r)&&this.hide()}}_disableNativeGesturesIfNecessary(){let i=this.touchGestures;if(i!=="off"){let r=this._elementRef.nativeElement,s=r.style;(i==="on"||r.nodeName!=="INPUT"&&r.nodeName!=="TEXTAREA")&&(s.userSelect=s.msUserSelect=s.webkitUserSelect=s.MozUserSelect="none"),(i==="on"||!r.draggable)&&(s.webkitUserDrag="none"),s.touchAction="none",s.webkitTapHighlightColor="transparent"}}_syncAriaDescription(i){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,i,"tooltip"),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}};e.\u0275fac=function(r){return new(r||e)(R(xl),R(fi),R(T8),R(Na),R(pn),R(Oo),R(c$),R(qp),R($Ae),R(Va),R(RSt,8),R(Lr))},e.\u0275dir=mi({type:e,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(r,s){r&2&&ki("mat-mdc-tooltip-disabled",s.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0});let t=e;return t})(),VSt=(()=>{let e=class e{constructor(i,r,s){this._changeDetectorRef=i,this._elementRef=r,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Mi,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide",this._animationsDisabled=s==="NoopAnimations"}show(i){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},i)}hide(i){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},i)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:i}){(!i||!this._triggerElement.contains(i))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let i=this._elementRef.nativeElement.getBoundingClientRect();return i.height>OSt&&i.width>=NSt}_handleAnimationEnd({animationName:i}){(i===this._showAnimation||i===this._hideAnimation)&&this._finalizeAnimation(i===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(i){i?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(i){let r=this._tooltip.nativeElement,s=this._showAnimation,o=this._hideAnimation;if(r.classList.remove(i?o:s),r.classList.add(i?s:o),this._isVisible!==i&&(this._isVisible=i,this._changeDetectorRef.markForCheck()),i&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(r);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}i&&this._onShow(),this._animationsDisabled&&(r.classList.add("_mat-animation-noopable"),this._finalizeAnimation(i))}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(fi),R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-tooltip-component"]],viewQuery:function(r,s){if(r&1&&ei(kSt,7),r&2){let o;Pt(o=Rt())&&(s._tooltip=o.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(r,s){r&1&&F("mouseleave",function(a){return s._handleMouseLeave(a)})},standalone:!0,features:[xe],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1,0),F("animationend",function(l){return V(o),B(s._handleAnimationEnd(l))}),h(2,"div",2),y(3),p()()}r&2&&(ki("mdc-tooltip--multiline",s._isMultiline),b("ngClass",s.tooltipClass),g(3),ye(s.message))},dependencies:[_s],styles:['.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color, var(--mat-app-inverse-surface));color:var(--mdc-plain-tooltip-supporting-text-color, var(--mat-app-inverse-on-surface));border-radius:var(--mdc-plain-tooltip-container-shape, var(--mat-app-corner-extra-small));font-family:var(--mdc-plain-tooltip-supporting-text-font, var(--mat-app-body-small-font));font-size:var(--mdc-plain-tooltip-supporting-text-size, var(--mat-app-body-small-size));font-weight:var(--mdc-plain-tooltip-supporting-text-weight, var(--mat-app-body-small-weight));line-height:var(--mdc-plain-tooltip-supporting-text-line-height, var(--mat-app-body-small-line-height));letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, var(--mat-app-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0});let t=e;return t})(),lK=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[ASt],imports:[Ck,sd,T0,zr,zr,Q2]});let t=e;return t})()});var KAe,YAe,qAe,Ppe=Q(()=>{Wc();Wc();me();J0();$n();KAe=Sh({passive:!0}),YAe=(()=>{let e=class e{constructor(i,r){this._platform=i,this._ngZone=r,this._monitoredElements=new Map}monitor(i){if(!this._platform.isBrowser)return pv;let r=Yp(i),s=this._monitoredElements.get(r);if(s)return s.subject;let o=new Mi,a="cdk-text-field-autofilled",l=c=>{c.animationName==="cdk-text-field-autofill-start"&&!r.classList.contains(a)?(r.classList.add(a),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!0}))):c.animationName==="cdk-text-field-autofill-end"&&r.classList.contains(a)&&(r.classList.remove(a),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!1})))};return this._ngZone.runOutsideAngular(()=>{r.addEventListener("animationstart",l,KAe),r.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(r,{subject:o,unlisten:()=>{r.removeEventListener("animationstart",l,KAe)}}),o}stopMonitoring(i){let r=Yp(i),s=this._monitoredElements.get(r);s&&(s.unlisten(),s.subject.complete(),r.classList.remove("cdk-text-field-autofill-monitored"),r.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(r))}ngOnDestroy(){this._monitoredElements.forEach((i,r)=>this.stopMonitoring(r))}};e.\u0275fac=function(r){return new(r||e)(it(Oo),it(pn))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qAe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})()});var Rpe,cK,Fpe=Q(()=>{me();me();$n();Cl();Rpe=class{constructor(e){this._box=e,this._destroyed=new Mi,this._resizeSubject=new Mi,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(n=>this._resizeSubject.next(n)))}observe(e){return this._elementObservables.has(e)||this._elementObservables.set(e,new Qa(n=>{let i=this._resizeSubject.subscribe(n);return this._resizeObserver?.observe(e,{box:this._box}),()=>{this._resizeObserver?.unobserve(e),i.unsubscribe(),this._elementObservables.delete(e)}}).pipe(Ks(n=>n.some(i=>i.target===e)),GM({bufferSize:1,refCount:!0}),Mr(this._destroyed))),this._elementObservables.get(e)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},cK=(()=>{let e=class e{constructor(){this._observers=new Map,this._ngZone=Ve(pn),typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,i]of this._observers)i.destroy();this._observers.clear(),typeof ResizeObserver<"u"}observe(i,r){let s=r?.box||"content-box";return this._observers.has(s)||this._observers.set(s,new Rpe(s)),this._observers.get(s).observe(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function ZSt(t,e){t&1&&ee(0,"span",21)}function XSt(t,e){if(t&1&&(h(0,"label",20),Ln(1,1),W(2,ZSt,1,0,"span",21),p()),t&2){let n=w(2);b("floating",n._shouldLabelFloat())("monitorResize",n._hasOutline())("id",n._labelId),Bn("for",n._control.disableAutomaticLabeling?null:n._control.id),g(2),Je(!n.hideRequiredMarker&&n._control.required?2:-1)}}function QSt(t,e){if(t&1&&W(0,XSt,3,5,"label",20),t&2){let n=w();Je(n._hasFloatingLabel()?0:-1)}}function JSt(t,e){t&1&&ee(0,"div",7)}function e9t(t,e){}function t9t(t,e){if(t&1&&W(0,e9t,0,0,"ng-template",13),t&2){w(2);let n=pr(1);b("ngTemplateOutlet",n)}}function i9t(t,e){if(t&1&&(h(0,"div",9),W(1,t9t,1,1,null,13),p()),t&2){let n=w();b("matFormFieldNotchedOutlineOpen",n._shouldLabelFloat()),g(),Je(n._forceDisplayInfixLabel()?-1:1)}}function n9t(t,e){t&1&&(h(0,"div",10,2),Ln(2,2),p())}function r9t(t,e){t&1&&(h(0,"div",11,3),Ln(2,3),p())}function s9t(t,e){}function o9t(t,e){if(t&1&&W(0,s9t,0,0,"ng-template",13),t&2){w();let n=pr(1);b("ngTemplateOutlet",n)}}function a9t(t,e){t&1&&(h(0,"div",14,4),Ln(2,4),p())}function l9t(t,e){t&1&&(h(0,"div",15,5),Ln(2,5),p())}function c9t(t,e){t&1&&ee(0,"div",16)}function d9t(t,e){if(t&1&&(h(0,"div",18),Ln(1,6),p()),t&2){let n=w();b("@transitionMessages",n._subscriptAnimationState)}}function u9t(t,e){if(t&1&&(h(0,"mat-hint",22),y(1),p()),t&2){let n=w(2);b("id",n._hintLabelId),g(),ye(n.hintLabel)}}function h9t(t,e){if(t&1&&(h(0,"div",19),W(1,u9t,2,2,"mat-hint",22),Ln(2,7),ee(3,"div",23),Ln(4,8),p()),t&2){let n=w();b("@transitionMessages",n._subscriptAnimationState),g(),Je(n.hintLabel?1:-1)}}function g9t(t){let e=t;if(e.offsetParent!==null)return e.scrollWidth;let n=e.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);let i=n.scrollWidth;return n.remove(),i}var zSt,HSt,GSt,WSt,USt,jSt,$St,KSt,YSt,qSt,E0,p9t,nPe,ky,m9t,ON,f9t,rPe,NN,sPe,ZAe,XAe,dK,QAe,JAe,v9t,aT,K_,y9t,ePe,tPe,_9t,iPe,C9t,M0,lT,og=Q(()=>{me();me();Th();J0();Wc();ri();$n();Cl();Fpe();ng();GO();bl();zSt=["notch"],HSt=["matFormFieldNotchedOutline",""],GSt=["*"],WSt=["textField"],USt=["iconPrefixContainer"],jSt=["textPrefixContainer"],$St=["iconSuffixContainer"],KSt=["textSuffixContainer"],YSt=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],qSt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];E0=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["mat-label"]],standalone:!0});let t=e;return t})(),p9t=0,nPe=new Ri("MatError"),ky=(()=>{let e=class e{constructor(i,r){this.id=`mat-mdc-error-${p9t++}`,i||r.nativeElement.setAttribute("aria-live","polite")}};e.\u0275fac=function(r){return new(r||e)(wp("aria-live"),R(fi))},e.\u0275dir=mi({type:e,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(r,s){r&2&&Kp("id",s.id)},inputs:{id:"id"},standalone:!0,features:[as([{provide:nPe,useExisting:e}])]});let t=e;return t})(),m9t=0,ON=(()=>{let e=class e{constructor(){this.align="start",this.id=`mat-mdc-hint-${m9t++}`}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,s){r&2&&(Kp("id",s.id),Bn("align",null),ki("mat-mdc-form-field-hint-end",s.align==="end"))},inputs:{align:"align",id:"id"},standalone:!0});let t=e;return t})(),f9t=new Ri("MatPrefix"),rPe=new Ri("MatSuffix"),NN=(()=>{let e=class e{constructor(){this._isText=!1}set _isTextSelector(i){this._isText=!0}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},standalone:!0,features:[as([{provide:rPe,useExisting:e}])]});let t=e;return t})(),sPe=new Ri("FloatingLabelParent"),ZAe=(()=>{let e=class e{get floating(){return this._floating}set floating(i){this._floating=i,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(i){this._monitorResize=i,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(i){this._elementRef=i,this._floating=!1,this._monitorResize=!1,this._resizeObserver=Ve(cK),this._ngZone=Ve(pn),this._parent=Ve(sPe),this._resizeSubscription=new na}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return g9t(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,s){r&2&&ki("mdc-floating-label--float-above",s.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0});let t=e;return t})();XAe="mdc-line-ripple--active",dK="mdc-line-ripple--deactivating",QAe=(()=>{let e=class e{constructor(i,r){this._elementRef=i,this._handleTransitionEnd=s=>{let o=this._elementRef.nativeElement.classList,a=o.contains(dK);s.propertyName==="opacity"&&a&&o.remove(XAe,dK)},r.runOutsideAngular(()=>{i.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){let i=this._elementRef.nativeElement.classList;i.remove(dK),i.add(XAe)}deactivate(){this._elementRef.nativeElement.classList.add(dK)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(pn))},e.\u0275dir=mi({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0});let t=e;return t})(),JAe=(()=>{let e=class e{constructor(i,r){this._elementRef=i,this._ngZone=r,this.open=!1}ngAfterViewInit(){let i=this._elementRef.nativeElement.querySelector(".mdc-floating-label");i?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(i.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>i.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(i){!this.open||!i?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${i}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(pn))},e.\u0275cmp=_e({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,s){if(r&1&&ei(zSt,5),r&2){let o;Pt(o=Rt())&&(s._notch=o.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,s){r&2&&ki("mdc-notched-outline--notched",s.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[xe],attrs:HSt,ngContentSelectors:GSt,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(r,s){r&1&&(gr(),ee(0,"div",1),h(1,"div",2,0),Ln(3),p(),ee(4,"div",3))},encapsulation:2,changeDetection:0});let t=e;return t})(),v9t={transitionMessages:Nd("transitionMessages",[bc("enter",So({opacity:1,transform:"translateY(0%)"})),cl("void => enter",[So({opacity:0,transform:"translateY(-5px)"}),Ml("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},aT=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e});let t=e;return t})(),K_=new Ri("MatFormField"),y9t=new Ri("MAT_FORM_FIELD_DEFAULT_OPTIONS"),ePe=0,tPe="fill",_9t="auto",iPe="fixed",C9t="translateY(-50%)",M0=(()=>{let e=class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(i){this._hideRequiredMarker=Y2(i)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||_9t}set floatLabel(i){i!==this._floatLabel&&(this._floatLabel=i,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(i){let r=this._appearance,s=i||this._defaults?.appearance||tPe;this._appearance=s,this._appearance==="outline"&&this._appearance!==r&&(this._needsOutlineLabelOffsetUpdate=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||iPe}set subscriptSizing(i){this._subscriptSizing=i||this._defaults?.subscriptSizing||iPe}get hintLabel(){return this._hintLabel}set hintLabel(i){this._hintLabel=i,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(i){this._explicitFormFieldControl=i}constructor(i,r,s,o,a,l,c,d){this._elementRef=i,this._changeDetectorRef=r,this._dir=o,this._platform=a,this._defaults=l,this._animationMode=c,this._labelChild=ZTe(E0),this._hideRequiredMarker=!1,this.color="primary",this._appearance=tPe,this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId=`mat-mdc-form-field-label-${ePe++}`,this._hintLabelId=`mat-mdc-hint-${ePe++}`,this._subscriptAnimationState="",this._destroyed=new Mi,this._isFocused=null,this._needsOutlineLabelOffsetUpdate=!1,this._previousControl=null,this._injector=Ve($o),this.getLabelId=vr(()=>this._hasFloatingLabel()?this._labelId:null),this._hasFloatingLabel=vr(()=>!!this._labelChild()),l&&(l.appearance&&(this.appearance=l.appearance),this._hideRequiredMarker=!!l?.hideRequiredMarker,l.color&&(this.color=l.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._previousControl=this._control)}ngOnDestroy(){this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(i){let r=this._control,s="mat-mdc-form-field-type-";i&&this._elementRef.nativeElement.classList.remove(s+i.controlType),r.controlType&&this._elementRef.nativeElement.classList.add(s+r.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=r.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._valueChanges?.unsubscribe(),r.ngControl&&r.ngControl.valueChanges&&(this._valueChanges=r.ngControl.valueChanges.pipe(Mr(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(i=>!i._isText),this._hasTextPrefix=!!this._prefixChildren.find(i=>i._isText),this._hasIconSuffix=!!this._suffixChildren.find(i=>!i._isText),this._hasTextSuffix=!!this._suffixChildren.find(i=>i._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),ra(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),fj(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(Mr(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(i){let r=this._control?this._control.ngControl:null;return r&&r[i]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let i=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&i.push(...this._control.userAriaDescribedBy.split(" ")),this._getDisplayedMessages()==="hint"){let r=this._hintChildren?this._hintChildren.find(o=>o.align==="start"):null,s=this._hintChildren?this._hintChildren.find(o=>o.align==="end"):null;r?i.push(r.id):this._hintLabel&&i.push(this._hintLabelId),s&&i.push(s.id)}else this._errorChildren&&i.push(...this._errorChildren.map(r=>r.id));this._control.setDescribedByIds(i)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;let i=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){i.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let r=this._iconPrefixContainer?.nativeElement,s=this._textPrefixContainer?.nativeElement,o=this._iconSuffixContainer?.nativeElement,a=this._textSuffixContainer?.nativeElement,l=r?.getBoundingClientRect().width??0,c=s?.getBoundingClientRect().width??0,d=o?.getBoundingClientRect().width??0,u=a?.getBoundingClientRect().width??0,m=this._dir.value==="rtl"?"-1":"1",f=`${l+c}px`,x=`calc(${m} * (${f} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;i.style.transform=`var(
        --mat-mdc-form-field-label-transform,
        ${C9t} translateX(${x})
    )`;let D=l+c+d+u;this._elementRef.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${D}px)`)}_isAttachedToDom(){let i=this._elementRef.nativeElement;if(i.getRootNode){let r=i.getRootNode();return r&&r!==i}return document.documentElement.contains(i)}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Kt),R(pn),R(Va),R(Oo),R(y9t,8),R(Ic,8),R(Lr))},e.\u0275cmp=_e({type:e,selectors:[["mat-form-field"]],contentQueries:function(r,s,o){if(r&1&&(iDe(o,s._labelChild,E0,5),_o(o,aT,5),_o(o,f9t,5),_o(o,rPe,5),_o(o,nPe,5),_o(o,ON,5)),r&2){nDe();let a;Pt(a=Rt())&&(s._formFieldControl=a.first),Pt(a=Rt())&&(s._prefixChildren=a),Pt(a=Rt())&&(s._suffixChildren=a),Pt(a=Rt())&&(s._errorChildren=a),Pt(a=Rt())&&(s._hintChildren=a)}},viewQuery:function(r,s){if(r&1&&(ei(WSt,5),ei(USt,5),ei(jSt,5),ei($St,5),ei(KSt,5),ei(ZAe,5),ei(JAe,5),ei(QAe,5)),r&2){let o;Pt(o=Rt())&&(s._textField=o.first),Pt(o=Rt())&&(s._iconPrefixContainer=o.first),Pt(o=Rt())&&(s._textPrefixContainer=o.first),Pt(o=Rt())&&(s._iconSuffixContainer=o.first),Pt(o=Rt())&&(s._textSuffixContainer=o.first),Pt(o=Rt())&&(s._floatingLabel=o.first),Pt(o=Rt())&&(s._notchedOutline=o.first),Pt(o=Rt())&&(s._lineRipple=o.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(r,s){r&2&&ki("mat-mdc-form-field-label-always-float",s._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",s._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",s._hasIconSuffix)("mat-form-field-invalid",s._control.errorState)("mat-form-field-disabled",s._control.disabled)("mat-form-field-autofilled",s._control.autofilled)("mat-form-field-no-animations",s._animationMode==="NoopAnimations")("mat-form-field-appearance-fill",s.appearance=="fill")("mat-form-field-appearance-outline",s.appearance=="outline")("mat-form-field-hide-placeholder",s._hasFloatingLabel()&&!s._shouldLabelFloat())("mat-focused",s._control.focused)("mat-primary",s.color!=="accent"&&s.color!=="warn")("mat-accent",s.color==="accent")("mat-warn",s.color==="warn")("ng-untouched",s._shouldForward("untouched"))("ng-touched",s._shouldForward("touched"))("ng-pristine",s._shouldForward("pristine"))("ng-dirty",s._shouldForward("dirty"))("ng-valid",s._shouldForward("valid"))("ng-invalid",s._shouldForward("invalid"))("ng-pending",s._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[as([{provide:K_,useExisting:e},{provide:sPe,useExisting:e}]),xe],ngContentSelectors:qSt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,s){if(r&1){let o=re();gr(YSt),W(0,QSt,1,1,"ng-template",null,0,Cc),h(2,"div",6,1),F("click",function(l){return V(o),B(s._control.onContainerClick(l))}),W(4,JSt,1,0,"div",7),h(5,"div",8),W(6,i9t,2,2,"div",9)(7,n9t,3,0,"div",10)(8,r9t,3,0,"div",11),h(9,"div",12),W(10,o9t,1,1,null,13),Ln(11),p(),W(12,a9t,3,0,"div",14)(13,l9t,3,0,"div",15),p(),W(14,c9t,1,0,"div",16),p(),h(15,"div",17),W(16,d9t,2,1,"div",18)(17,h9t,5,2,"div",19),p()}if(r&2){let o;g(2),ki("mdc-text-field--filled",!s._hasOutline())("mdc-text-field--outlined",s._hasOutline())("mdc-text-field--no-label",!s._hasFloatingLabel())("mdc-text-field--disabled",s._control.disabled)("mdc-text-field--invalid",s._control.errorState),g(2),Je(!s._hasOutline()&&!s._control.disabled?4:-1),g(2),Je(s._hasOutline()?6:-1),g(),Je(s._hasIconPrefix?7:-1),g(),Je(s._hasTextPrefix?8:-1),g(2),Je(!s._hasOutline()||s._forceDisplayInfixLabel()?10:-1),g(2),Je(s._hasTextSuffix?12:-1),g(),Je(s._hasIconSuffix?13:-1),g(),Je(s._hasOutline()?-1:14),g(),ki("mat-mdc-form-field-subscript-dynamic-size",s.subscriptSizing==="dynamic"),g(),Je((o=s._getDisplayedMessages())==="error"?16:o==="hint"?17:-1)}},dependencies:[ZAe,JAe,rf,QAe,ON],styles:['.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-app-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-app-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-app-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-app-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--disabled .cdk-high-contrast-active .mdc-text-field__input{background-color:Window}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-app-corner-extra-small-top));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-app-corner-extra-small-top))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-app-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.cdk-high-contrast-active .mdc-text-field--disabled .mdc-floating-label{z-index:1}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-app-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-app-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-app-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-app-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-app-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-app-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-app-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-app-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-app-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-app-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-app-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-app-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-app-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-app-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-app-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-app-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-app-outline));border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-app-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-app-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-app-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-app-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-app-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-app-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-app-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-app-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-app-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-app-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-app-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-app-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-app-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-app-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-app-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-app-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-app-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-app-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-app-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-app-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-app-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-app-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-app-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-app-body-large-weight))}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-app-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-app-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-app-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-app-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-app-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[v9t.transitionMessages]},changeDetection:0});let t=e;return t})(),lT=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,sd,pk,zr]});let t=e;return t})()});var Lpe,x9t,b9t,Iy,oPe,Wb=Q(()=>{J0();Wc();Wc();Ppe();Ppe();me();me();qn();qn();bl();bl();og();og();$n();Lpe=new Ri("MAT_INPUT_VALUE_ACCESSOR"),x9t=["button","checkbox","file","hidden","image","radio","range","reset","submit"],b9t=0,Iy=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(i){this._disabled=Y2(i),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(i){this._id=i||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(_m.required)??!1}set required(i){this._required=Y2(i)}get type(){return this._type}set type(i){this._type=i||"text",this._validateType(),!this._isTextarea&&Mue().has(this._type)&&(this._elementRef.nativeElement.type=this._type),this._ensureWheelDefaultBehavior()}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(i){this._errorStateTracker.matcher=i}get value(){return this._inputValueAccessor.value}set value(i){i!==this.value&&(this._inputValueAccessor.value=i,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(i){this._readonly=Y2(i)}get errorState(){return this._errorStateTracker.errorState}set errorState(i){this._errorStateTracker.errorState=i}constructor(i,r,s,o,a,l,c,d,u,m){this._elementRef=i,this._platform=r,this.ngControl=s,this._autofillMonitor=d,this._ngZone=u,this._formField=m,this._uid=`mat-input-${b9t++}`,this._webkitBlinkWheelListenerAttached=!1,this.focused=!1,this.stateChanges=new Mi,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(x=>Mue().has(x)),this._iOSKeyupListener=x=>{let D=x.target;!D.value&&D.selectionStart===0&&D.selectionEnd===0&&(D.setSelectionRange(1,1),D.setSelectionRange(0,0))},this._webkitBlinkWheelListener=()=>{};let f=this._elementRef.nativeElement,_=f.nodeName.toLowerCase();this._inputValueAccessor=c||f,this._previousNativeValue=this.value,this.id=this.id,r.IOS&&u.runOutsideAngular(()=>{i.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._errorStateTracker=new M8(l,s,a,o,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=_==="select",this._isTextarea=_==="textarea",this._isInFormField=!!m,this._isNativeSelect&&(this.controlType=f.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(i=>{this.autofilled=i.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener),this._webkitBlinkWheelListenerAttached&&this._elementRef.nativeElement.removeEventListener("wheel",this._webkitBlinkWheelListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(i){this._elementRef.nativeElement.focus(i)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(i){i!==this.focused&&(this.focused=i,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){let i=this._elementRef.nativeElement.value;this._previousNativeValue!==i&&(this._previousNativeValue=i,this.stateChanges.next())}_dirtyCheckPlaceholder(){let i=this._getPlaceholder();if(i!==this._previousPlaceholder){let r=this._elementRef.nativeElement;this._previousPlaceholder=i,i?r.setAttribute("placeholder",i):r.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){x9t.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let i=this._elementRef.nativeElement.validity;return i&&i.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let i=this._elementRef.nativeElement,r=i.options[0];return this.focused||i.multiple||!this.empty||!!(i.selectedIndex>-1&&r&&r.label)}else return this.focused||!this.empty}setDescribedByIds(i){i.length?this._elementRef.nativeElement.setAttribute("aria-describedby",i.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let i=this._elementRef.nativeElement;return this._isNativeSelect&&(i.multiple||i.size>1)}_ensureWheelDefaultBehavior(){!this._webkitBlinkWheelListenerAttached&&this._type==="number"&&(this._platform.BLINK||this._platform.WEBKIT)&&(this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("wheel",this._webkitBlinkWheelListener)}),this._webkitBlinkWheelListenerAttached=!0),this._webkitBlinkWheelListenerAttached&&this._type!=="number"&&(this._elementRef.nativeElement.removeEventListener("wheel",this._webkitBlinkWheelListener),this._webkitBlinkWheelListenerAttached=!0)}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Oo),R(p4,10),R(L8,8),R(e1,8),R(ig),R(Lpe,10),R(YAe),R(pn),R(K_,8))},e.\u0275dir=mi({type:e,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(r,s){r&1&&F("focus",function(){return s._focusChanged(!0)})("blur",function(){return s._focusChanged(!1)})("input",function(){return s._onInput()}),r&2&&(Kp("id",s.id)("disabled",s.disabled)("required",s.required),Bn("name",s.name||null)("readonly",s.readonly&&!s._isNativeSelect||null)("aria-invalid",s.empty&&s.required?null:s.errorState)("aria-required",s.required)("id",s.id),ki("mat-input-server",s._isServer)("mat-mdc-form-field-textarea-control",s._isInFormField&&s._isTextarea)("mat-mdc-form-field-input-control",s._isInFormField)("mdc-text-field__input",s._isInFormField)("mat-mdc-native-select-inline",s._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],standalone:!0,features:[as([{provide:aT,useExisting:e}]),yn]});let t=e;return t})(),oPe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,lT,lT,qAe,zr]});let t=e;return t})()});function tTt(t,e){let[n,i]=t.split(" "),r=i??n,s="0px",o=r,a="0px";return e==="rtl"?a=n:s=n,{padding:`0px ${s} ${o} ${a}`}}function iTt(t,e){let[n,i]=t.split(" "),r=i??n,s=c=>`-${c}`,o="0px",a=s(r),l="0px";return e==="rtl"?l=s(n):o=s(n),{margin:`0px ${o} ${a} ${l}`}}function dPe(t,e){switch(e){case"column":return"margin-bottom";case"column-reverse":return"margin-top";case"row":return t==="rtl"?"margin-left":"margin-right";case"row-reverse":return t==="rtl"?"margin-right":"margin-left";default:return t==="rtl"?"margin-left":"margin-right"}}function nTt(t,e){let n=dPe(e.directionality,e.layout),i=ve({},cPe);return i[n]=t,i}var w9t,S9t,T9t,D9t,Vk,E9t,M9t,lPe,k9t,I9t,A9t,P9t,qi,R9t,F9t,L9t,O9t,N9t,V9t,B9t,oi,z9t,H9t,G9t,W9t,U9t,j9t,$9t,K9t,cPe,Y9t,q9t,Z9t,$r,X9t,Q9t,J9t,eTt,uK,rTt,sTt,oTt,Yt,aPe,At,Vt=Q(()=>{Th();Th();me();Nb();Nb();bhe();Cl();$n();w9t=(()=>{class t extends d4{buildStyles(n){n=n||"stretch";let i={};switch(n){case"start":i["align-self"]="flex-start";break;case"end":i["align-self"]="flex-end";break;default:i["align-self"]=n;break}return i}static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),S9t=["fxFlexAlign","fxFlexAlign.xs","fxFlexAlign.sm","fxFlexAlign.md","fxFlexAlign.lg","fxFlexAlign.xl","fxFlexAlign.lt-sm","fxFlexAlign.lt-md","fxFlexAlign.lt-lg","fxFlexAlign.lt-xl","fxFlexAlign.gt-xs","fxFlexAlign.gt-sm","fxFlexAlign.gt-md","fxFlexAlign.gt-lg"],T9t=(()=>{class t extends Tv{DIRECTIVE_KEY="flex-align";constructor(n,i,r,s){super(n,r,i,s),this.init()}styleCache=D9t;static \u0275fac=function(i){return new(i||t)(R(fi),R(h4),R(w9t),R(Sv))};static \u0275dir=mi({type:t,features:[et]})}return t})(),D9t=new Map,Vk=(()=>{class t extends T9t{inputs=S9t;static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275dir=mi({type:t,selectors:[["","fxFlexAlign",""],["","fxFlexAlign.xs",""],["","fxFlexAlign.sm",""],["","fxFlexAlign.md",""],["","fxFlexAlign.lg",""],["","fxFlexAlign.xl",""],["","fxFlexAlign.lt-sm",""],["","fxFlexAlign.lt-md",""],["","fxFlexAlign.lt-lg",""],["","fxFlexAlign.lt-xl",""],["","fxFlexAlign.gt-xs",""],["","fxFlexAlign.gt-sm",""],["","fxFlexAlign.gt-md",""],["","fxFlexAlign.gt-lg",""]],inputs:{fxFlexAlign:"fxFlexAlign","fxFlexAlign.xs":"fxFlexAlign.xs","fxFlexAlign.sm":"fxFlexAlign.sm","fxFlexAlign.md":"fxFlexAlign.md","fxFlexAlign.lg":"fxFlexAlign.lg","fxFlexAlign.xl":"fxFlexAlign.xl","fxFlexAlign.lt-sm":"fxFlexAlign.lt-sm","fxFlexAlign.lt-md":"fxFlexAlign.lt-md","fxFlexAlign.lt-lg":"fxFlexAlign.lt-lg","fxFlexAlign.lt-xl":"fxFlexAlign.lt-xl","fxFlexAlign.gt-xs":"fxFlexAlign.gt-xs","fxFlexAlign.gt-sm":"fxFlexAlign.gt-sm","fxFlexAlign.gt-md":"fxFlexAlign.gt-md","fxFlexAlign.gt-lg":"fxFlexAlign.gt-lg"},features:[et]})}return t})();E9t={margin:0,width:"100%",height:"100%","min-width":"100%","min-height":"100%"},M9t=(()=>{class t extends d4{buildStyles(n){return E9t}static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),lPe=(()=>{class t extends Tv{constructor(n,i,r,s){super(n,r,i,s),this.addStyles("")}styleCache=k9t;static \u0275fac=function(i){return new(i||t)(R(fi),R(h4),R(M9t),R(Sv))};static \u0275dir=mi({type:t,selectors:[["","fxFill",""],["","fxFlexFill",""]],features:[et]})}return t})(),k9t=new Map;I9t=(()=>{class t extends d4{layoutConfig;constructor(n){super(),this.layoutConfig=n}buildStyles(n,i){let[r,s,...o]=n.split(" "),a=o.join(" "),l=i.direction.indexOf("column")>-1?"column":"row",c=hN(l)?"max-width":"max-height",d=hN(l)?"min-width":"min-height",u=String(a).indexOf("calc")>-1,m=u||a==="auto",f=String(a).indexOf("%")>-1&&!u,_=String(a).indexOf("px")>-1||String(a).indexOf("rem")>-1||String(a).indexOf("em")>-1||String(a).indexOf("vw")>-1||String(a).indexOf("vh")>-1,x=u||_;r=r=="0"?0:r,s=s=="0"?0:s;let D=!r&&!s,E={},M={"max-width":null,"max-height":null,"min-width":null,"min-height":null};switch(a||""){case"":let I=this.layoutConfig.useColumnBasisZero!==!1;a=l==="row"?"0%":I?"0.000000001px":"auto";break;case"initial":case"nogrow":r=0,a="auto";break;case"grow":a="100%";break;case"noshrink":s=0,a="auto";break;case"auto":break;case"none":r=0,s=0,a="auto";break;default:!x&&!f&&!isNaN(a)&&(a=a+"%"),a==="0%"&&(x=!0),a==="0px"&&(a="0%"),u?E=Dy(M,{"flex-grow":r,"flex-shrink":s,"flex-basis":x?a:"100%"}):E=Dy(M,{flex:`${r} ${s} ${x?a:"100%"}`});break}return E.flex||E["flex-grow"]||(u?E=Dy(M,{"flex-grow":r,"flex-shrink":s,"flex-basis":a}):E=Dy(M,{flex:`${r} ${s} ${a}`})),a!=="0%"&&a!=="0px"&&a!=="0.000000001px"&&a!=="auto"&&(E[d]=D||x&&r?a:null,E[c]=D||!m&&s?a:null),!E[d]&&!E[c]?u?E=Dy(M,{"flex-grow":r,"flex-shrink":s,"flex-basis":a}):E=Dy(M,{flex:`${r} ${s} ${a}`}):i.hasWrap&&(E[u?"flex-basis":"flex"]=E[c]?u?E[c]:`${r} ${s} ${E[c]}`:u?E[d]:`${r} ${s} ${E[d]}`),Dy(E,{"box-sizing":"border-box"})}static \u0275fac=function(i){return new(i||t)(it(u4))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),A9t=["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"],P9t=(()=>{class t extends Tv{layoutConfig;marshal;DIRECTIVE_KEY="flex";direction=void 0;wrap=void 0;get shrink(){return this.flexShrink}set shrink(n){this.flexShrink=n||"1",this.triggerReflow()}get grow(){return this.flexGrow}set grow(n){this.flexGrow=n||"1",this.triggerReflow()}flexGrow="1";flexShrink="1";constructor(n,i,r,s,o){super(n,s,i,o),this.layoutConfig=r,this.marshal=o,this.init()}ngOnInit(){this.parentElement&&(this.marshal.trackValue(this.parentElement,"layout").pipe(Mr(this.destroySubject)).subscribe(this.onLayoutChange.bind(this)),this.marshal.trackValue(this.nativeElement,"layout-align").pipe(Mr(this.destroySubject)).subscribe(this.triggerReflow.bind(this)))}onLayoutChange(n){let r=n.value.split(" ");this.direction=r[0],this.wrap=r[1]!==void 0&&r[1]==="wrap",this.triggerUpdate()}updateWithValue(n){let i=this.layoutConfig.addFlexToParent!==!1;this.direction===void 0&&(this.direction=this.getFlexFlowDirection(this.parentElement,i)),this.wrap===void 0&&(this.wrap=this.hasWrap(this.parentElement));let r=this.direction,s=r.startsWith("row"),o=this.wrap;s&&o?this.styleCache=L9t:s&&!o?this.styleCache=R9t:!s&&o?this.styleCache=O9t:!s&&!o&&(this.styleCache=F9t);let a=String(n).replace(";",""),l=She(a,this.flexGrow,this.flexShrink);this.addStyles(l.join(" "),{direction:r,hasWrap:o})}triggerReflow(){let n=this.activatedValue;if(n!==void 0){let i=She(n+"",this.flexGrow,this.flexShrink);this.marshal.updateElement(this.nativeElement,this.DIRECTIVE_KEY,i.join(" "))}}static \u0275fac=function(i){return new(i||t)(R(fi),R(h4),R(u4),R(I9t),R(Sv))};static \u0275dir=mi({type:t,inputs:{shrink:[0,"fxShrink","shrink"],grow:[0,"fxGrow","grow"]},features:[et]})}return t})(),qi=(()=>{class t extends P9t{inputs=A9t;static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275dir=mi({type:t,selectors:[["","fxFlex",""],["","fxFlex.xs",""],["","fxFlex.sm",""],["","fxFlex.md",""],["","fxFlex.lg",""],["","fxFlex.xl",""],["","fxFlex.lt-sm",""],["","fxFlex.lt-md",""],["","fxFlex.lt-lg",""],["","fxFlex.lt-xl",""],["","fxFlex.gt-xs",""],["","fxFlex.gt-sm",""],["","fxFlex.gt-md",""],["","fxFlex.gt-lg",""]],inputs:{fxFlex:"fxFlex","fxFlex.xs":"fxFlex.xs","fxFlex.sm":"fxFlex.sm","fxFlex.md":"fxFlex.md","fxFlex.lg":"fxFlex.lg","fxFlex.xl":"fxFlex.xl","fxFlex.lt-sm":"fxFlex.lt-sm","fxFlex.lt-md":"fxFlex.lt-md","fxFlex.lt-lg":"fxFlex.lt-lg","fxFlex.lt-xl":"fxFlex.lt-xl","fxFlex.gt-xs":"fxFlex.gt-xs","fxFlex.gt-sm":"fxFlex.gt-sm","fxFlex.gt-md":"fxFlex.gt-md","fxFlex.gt-lg":"fxFlex.gt-lg"},features:[et]})}return t})(),R9t=new Map,F9t=new Map,L9t=new Map,O9t=new Map;N9t=(()=>{class t extends d4{buildStyles(n,i){let r={},[s,o]=n.split(" ");switch(s){case"center":r["justify-content"]="center";break;case"space-around":r["justify-content"]="space-around";break;case"space-between":r["justify-content"]="space-between";break;case"space-evenly":r["justify-content"]="space-evenly";break;case"end":case"flex-end":r["justify-content"]="flex-end";break;case"start":case"flex-start":default:r["justify-content"]="flex-start";break}switch(o){case"start":case"flex-start":r["align-items"]=r["align-content"]="flex-start";break;case"center":r["align-items"]=r["align-content"]="center";break;case"end":case"flex-end":r["align-items"]=r["align-content"]="flex-end";break;case"space-between":r["align-content"]="space-between",r["align-items"]="stretch";break;case"space-around":r["align-content"]="space-around",r["align-items"]="stretch";break;case"baseline":r["align-content"]="stretch",r["align-items"]="baseline";break;case"stretch":default:r["align-items"]=r["align-content"]="stretch";break}return Dy(r,{display:i.inline?"inline-flex":"flex","flex-direction":i.layout,"box-sizing":"border-box","max-width":o==="stretch"?hN(i.layout)?null:"100%":null,"max-height":o==="stretch"&&hN(i.layout)?"100%":null})}static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),V9t=["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"],B9t=(()=>{class t extends Tv{DIRECTIVE_KEY="layout-align";layout="row";inline=!1;constructor(n,i,r,s){super(n,r,i,s),this.init(),this.marshal.trackValue(this.nativeElement,"layout").pipe(Mr(this.destroySubject)).subscribe(this.onLayoutChange.bind(this))}updateWithValue(n){let i=this.layout||"row",r=this.inline;i==="row"&&r?this.styleCache=U9t:i==="row"&&!r?this.styleCache=z9t:i==="row-reverse"&&r?this.styleCache=$9t:i==="row-reverse"&&!r?this.styleCache=G9t:i==="column"&&r?this.styleCache=j9t:i==="column"&&!r?this.styleCache=H9t:i==="column-reverse"&&r?this.styleCache=K9t:i==="column-reverse"&&!r&&(this.styleCache=W9t),this.addStyles(n,{layout:i,inline:r})}onLayoutChange(n){let i=n.value.split(" ");this.layout=i[0],this.inline=n.value.includes("inline"),uN.find(r=>r===this.layout)||(this.layout="row"),this.triggerUpdate()}static \u0275fac=function(i){return new(i||t)(R(fi),R(h4),R(N9t),R(Sv))};static \u0275dir=mi({type:t,features:[et]})}return t})(),oi=(()=>{class t extends B9t{inputs=V9t;static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275dir=mi({type:t,selectors:[["","fxLayoutAlign",""],["","fxLayoutAlign.xs",""],["","fxLayoutAlign.sm",""],["","fxLayoutAlign.md",""],["","fxLayoutAlign.lg",""],["","fxLayoutAlign.xl",""],["","fxLayoutAlign.lt-sm",""],["","fxLayoutAlign.lt-md",""],["","fxLayoutAlign.lt-lg",""],["","fxLayoutAlign.lt-xl",""],["","fxLayoutAlign.gt-xs",""],["","fxLayoutAlign.gt-sm",""],["","fxLayoutAlign.gt-md",""],["","fxLayoutAlign.gt-lg",""]],inputs:{fxLayoutAlign:"fxLayoutAlign","fxLayoutAlign.xs":"fxLayoutAlign.xs","fxLayoutAlign.sm":"fxLayoutAlign.sm","fxLayoutAlign.md":"fxLayoutAlign.md","fxLayoutAlign.lg":"fxLayoutAlign.lg","fxLayoutAlign.xl":"fxLayoutAlign.xl","fxLayoutAlign.lt-sm":"fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md":"fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg":"fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl":"fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs":"fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm":"fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md":"fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg":"fxLayoutAlign.gt-lg"},features:[et]})}return t})(),z9t=new Map,H9t=new Map,G9t=new Map,W9t=new Map,U9t=new Map,j9t=new Map,$9t=new Map,K9t=new Map,cPe={"margin-left":null,"margin-right":null,"margin-top":null,"margin-bottom":null},Y9t=(()=>{class t extends d4{_styler;_config;constructor(n,i){super(),this._styler=n,this._config=i}buildStyles(n,i){return n.endsWith(uK)?(n=n.slice(0,n.indexOf(uK)),n=M$(n,this._config.multiplier),iTt(n,i.directionality)):{}}sideEffect(n,i,r){let s=r.items;if(n.endsWith(uK)){n=n.slice(0,n.indexOf(uK)),n=M$(n,this._config.multiplier);let o=tTt(n,r.directionality);this._styler.applyStyleToElements(o,r.items)}else{n=M$(n,this._config.multiplier),n=this.addFallbackUnit(n);let o=s.pop(),a=nTt(n,r);this._styler.applyStyleToElements(a,s),this._styler.applyStyleToElements(cPe,[o])}}addFallbackUnit(n){return isNaN(+n)?n:`${n}${this._config.defaultUnit}`}static \u0275fac=function(i){return new(i||t)(it(h4),it(u4))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),q9t=["fxLayoutGap","fxLayoutGap.xs","fxLayoutGap.sm","fxLayoutGap.md","fxLayoutGap.lg","fxLayoutGap.xl","fxLayoutGap.lt-sm","fxLayoutGap.lt-md","fxLayoutGap.lt-lg","fxLayoutGap.lt-xl","fxLayoutGap.gt-xs","fxLayoutGap.gt-sm","fxLayoutGap.gt-md","fxLayoutGap.gt-lg"],Z9t=(()=>{class t extends Tv{zone;directionality;styleUtils;layout="row";DIRECTIVE_KEY="layout-gap";observerSubject=new Mi;get childrenNodes(){let n=this.nativeElement.children,i=[];for(let r=n.length;r--;)i[r]=n[r];return i}constructor(n,i,r,s,o,a){super(n,o,s,a),this.zone=i,this.directionality=r,this.styleUtils=s;let l=[this.directionality.change,this.observerSubject.asObservable()];this.init(l),this.marshal.trackValue(this.nativeElement,"layout").pipe(Mr(this.destroySubject)).subscribe(this.onLayoutChange.bind(this))}ngAfterContentInit(){this.buildChildObservable(),this.triggerUpdate()}ngOnDestroy(){super.ngOnDestroy(),this.observer&&this.observer.disconnect()}onLayoutChange(n){let r=n.value.split(" ");this.layout=r[0],uN.find(s=>s===this.layout)||(this.layout="row"),this.triggerUpdate()}updateWithValue(n){let i=this.childrenNodes.filter(r=>r.nodeType===1&&this.willDisplay(r)).sort((r,s)=>{let o=+this.styler.lookupStyle(r,"order"),a=+this.styler.lookupStyle(s,"order");return isNaN(o)||isNaN(a)||o===a?0:o>a?1:-1});if(i.length>0){let r=this.directionality.value,s=this.layout;s==="row"&&r==="rtl"?this.styleCache=X9t:s==="row"&&r!=="rtl"?this.styleCache=J9t:s==="column"&&r==="rtl"?this.styleCache=Q9t:s==="column"&&r!=="rtl"&&(this.styleCache=eTt),this.addStyles(n,{directionality:r,items:i,layout:s})}}clearStyles(){let n=Object.keys(this.mru).length>0,i=n?"padding":dPe(this.directionality.value,this.layout);n&&super.clearStyles(),this.styleUtils.applyStyleToElements({[i]:""},this.childrenNodes)}willDisplay(n){let i=this.marshal.getValue(n,"show-hide");return i===!0||i===void 0&&this.styleUtils.lookupStyle(n,"display")!=="none"}buildChildObservable(){this.zone.runOutsideAngular(()=>{typeof MutationObserver<"u"&&(this.observer=new MutationObserver(n=>{let i=r=>r.addedNodes&&r.addedNodes.length>0||r.removedNodes&&r.removedNodes.length>0;n.some(i)&&this.observerSubject.next()}),this.observer.observe(this.nativeElement,{childList:!0}))})}observer;static \u0275fac=function(i){return new(i||t)(R(fi),R(pn),R(Va),R(h4),R(Y9t),R(Sv))};static \u0275dir=mi({type:t,features:[et]})}return t})(),$r=(()=>{class t extends Z9t{inputs=q9t;static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275dir=mi({type:t,selectors:[["","fxLayoutGap",""],["","fxLayoutGap.xs",""],["","fxLayoutGap.sm",""],["","fxLayoutGap.md",""],["","fxLayoutGap.lg",""],["","fxLayoutGap.xl",""],["","fxLayoutGap.lt-sm",""],["","fxLayoutGap.lt-md",""],["","fxLayoutGap.lt-lg",""],["","fxLayoutGap.lt-xl",""],["","fxLayoutGap.gt-xs",""],["","fxLayoutGap.gt-sm",""],["","fxLayoutGap.gt-md",""],["","fxLayoutGap.gt-lg",""]],inputs:{fxLayoutGap:"fxLayoutGap","fxLayoutGap.xs":"fxLayoutGap.xs","fxLayoutGap.sm":"fxLayoutGap.sm","fxLayoutGap.md":"fxLayoutGap.md","fxLayoutGap.lg":"fxLayoutGap.lg","fxLayoutGap.xl":"fxLayoutGap.xl","fxLayoutGap.lt-sm":"fxLayoutGap.lt-sm","fxLayoutGap.lt-md":"fxLayoutGap.lt-md","fxLayoutGap.lt-lg":"fxLayoutGap.lt-lg","fxLayoutGap.lt-xl":"fxLayoutGap.lt-xl","fxLayoutGap.gt-xs":"fxLayoutGap.gt-xs","fxLayoutGap.gt-sm":"fxLayoutGap.gt-sm","fxLayoutGap.gt-md":"fxLayoutGap.gt-md","fxLayoutGap.gt-lg":"fxLayoutGap.gt-lg"},features:[et]})}return t})(),X9t=new Map,Q9t=new Map,J9t=new Map,eTt=new Map,uK=" grid";rTt=(()=>{class t extends d4{buildStyles(n,{display:i}){let r=T$(n);return St(ve({},r),{display:i==="none"?i:r.display})}static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),sTt=["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"],oTt=(()=>{class t extends Tv{_config;DIRECTIVE_KEY="layout";constructor(n,i,r,s,o){super(n,r,i,s),this._config=o,this.init()}updateWithValue(n){let r=this._config.detectLayoutDisplay?this.styler.lookupStyle(this.nativeElement,"display"):"";this.styleCache=aPe.get(r)??new Map,aPe.set(r,this.styleCache),this.currentValue!==n&&(this.addStyles(n,{display:r}),this.currentValue=n)}static \u0275fac=function(i){return new(i||t)(R(fi),R(h4),R(rTt),R(Sv),R(u4))};static \u0275dir=mi({type:t,features:[et]})}return t})(),Yt=(()=>{class t extends oTt{inputs=sTt;static \u0275fac=(()=>{let n;return function(r){return(n||(n=Wo(t)))(r||t)}})();static \u0275dir=mi({type:t,selectors:[["","fxLayout",""],["","fxLayout.xs",""],["","fxLayout.sm",""],["","fxLayout.md",""],["","fxLayout.lg",""],["","fxLayout.xl",""],["","fxLayout.lt-sm",""],["","fxLayout.lt-md",""],["","fxLayout.lt-lg",""],["","fxLayout.lt-xl",""],["","fxLayout.gt-xs",""],["","fxLayout.gt-sm",""],["","fxLayout.gt-md",""],["","fxLayout.gt-lg",""]],inputs:{fxLayout:"fxLayout","fxLayout.xs":"fxLayout.xs","fxLayout.sm":"fxLayout.sm","fxLayout.md":"fxLayout.md","fxLayout.lg":"fxLayout.lg","fxLayout.xl":"fxLayout.xl","fxLayout.lt-sm":"fxLayout.lt-sm","fxLayout.lt-md":"fxLayout.lt-md","fxLayout.lt-lg":"fxLayout.lt-lg","fxLayout.lt-xl":"fxLayout.lt-xl","fxLayout.gt-xs":"fxLayout.gt-xs","fxLayout.gt-sm":"fxLayout.gt-sm","fxLayout.gt-md":"fxLayout.gt-md","fxLayout.gt-lg":"fxLayout.gt-lg"},features:[et]})}return t})(),aPe=new Map;At=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=en({type:t});static \u0275inj=Ji({imports:[Tk,xv]})}return t})();});function cTt(t,e){if(t&1&&(h(0,"div",1),Ln(1),p()),t&2){let n=w();jr("p-relative "+(n.backgroundRed?"mat-form-field-red":"")+" "+(n.dirty?"form-control-dirty":"")),b("ngStyle",sn(4,lTt,n.width))("fxLayoutAlign","center "+n.alignItems)}}var aTt,lTt,O1,Ay=Q(()=>{An();Vt();ri();me();Vt();An();aTt=["*"],lTt=t=>({width:t});O1=(()=>{let e=class e{constructor(){this.alignItems="center",this.width="100%",this.backgroundRed=!1,this.dirty=!1,console.log()}ngOnInit(){if(!this.nxtFormControl)throw new Error(this.constructor.name+" nxtFormControl ist not set :(");this.nxtFormControl.valueChanges.subscribe(()=>{this.backgroundRed=this.nxtFormControl&&this.nxtFormControl.invalid&&!this.nxtFormControl.touched,this.dirty=this.nxtFormControl&&this.nxtFormControl.dirty})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-form-field-wrapper"]],inputs:{alignItems:"alignItems",nxtFormControl:"nxtFormControl",width:"width"},standalone:!0,features:[xe],ngContentSelectors:aTt,decls:1,vars:1,consts:[["fxLayout","row","id","form-field-wrapper-first-child","class","p-relative",3,"ngStyle","fxLayoutAlign","class",4,"ngIf"],["fxLayout","row","id","form-field-wrapper-first-child",1,"p-relative",3,"ngStyle","fxLayoutAlign"]],template:function(r,s){r&1&&(gr(),W(0,cTt,2,6,"div",0)),r&2&&b("ngIf",s.nxtFormControl)},dependencies:[Ct,At,Yt,oi,rr,Dn,rs],styles:["[_nghost-%COMP%]{border-radius:3px;width:100%}"]});let t=e;return t})()});function Ope(t){switch(t){case Zt.Admin:return"Admin";case Zt.SuperAdmin:return"Superadmin";case Zt.ShowDurationPriceCheckColumn:return'Spalte "Dauer - Preis"';case Zt.StudioCashReport_DatePicker:return"Datum welchseln";case Zt.StudioCashReport_ToggleBlockDayFinish:return"Abrechnung freigeben";case Zt.StudioCashReport_CanEditIncoming:return"Einnahmen bearbeiten";case Zt.StudioCashReport_CanEditOutgoing:return"Ausgaben bearbeiten";case Zt.StudioCashReport_SwitchStudios:return"Alle Kassen anzeigen";case Zt.StudioCashReport_Switch_:return"Tresor Wechsler";case Zt.StudioCashReport_SeeMoneyEndOfDay:return"Wie viel bleibt am Ende des Tages";case Zt.Artists_Read:return"Artists anlegen / bearbeiten";case Zt.StudioCashReport_EditIncomingOutgoing_CanEdit_:return"_ bei Ein- oder Ausgaben bearbeiten";case Zt.CalendarEventEdit_canMoveEventEarlierThan3Days:return"3.Tage-Verschieb-Regel nicht anwenden";case Zt.CalendarEventEdit_canEdit_:return"Termin auf Tresor setzen";case Zt.StudioFee_Admin:return"Studio AbgabenAdmin";case Zt.ContactForm_WithoutBirthday:return"Geburtstag nicht n\xF6tig";case Zt.NotAssignedPayments_View:return"Offene Zahlungen anzeigen";case Zt.NotAssignedPayments_Assign:return"Offene Zahlungen zuweisen";case Zt.GiftCards_Download:return"Gutscheine herunterladen anstatt Drucken";case Zt.CalendarEventEdit_ChangeWorkType:return"Terminart \xE4ndern (Tattoo oder Piercing)";case Zt.CalendarEventEdit_DisableFollowEventInfo:return"Folgetermin-Info deaktivieren";case Zt.DiscountPromotionsEdit:return"Rabatte bearbeiten";case Zt.CalendarEventEdit_SaveWithoutChecks:return"Termin speichern ohne check (3x Klick)";case Zt.CalendarEventEdit_EditPayments:return"Termin Zahlungen \xE4ndern (3x Klick)";case Zt.StudioCashReport_CanEditGiftCard:return"Gutschein bearbeiten";case Zt.CalendarEventEdit_ShowBankDepositQrCode:return"Bank-R\xFCckzahlung QR-Code anzeigen";case Zt.StudioCashReport_ShowAllCashRegisters:return"Alle gleichzeitig Kassen anzeigen";case Zt.StudioCashReport_CanEditEndMoney:return"Ende-Geld ohne Abrechnung";case Zt.Analysis_DiscountPromotions:return"Rabatte";case Zt.NotAssignedPayments_Delete:return"L\xF6schen von offenen Zahlungen";case Zt.Analysis_StudioFee:return"Studio-Abgaben";case Zt.DisableGlobal_:return"_ global Deaktiviert";case Zt.WhatsAppBroadcast:return"NXT-Whatsapp-Broadcast versenden";case Zt.PayPalSMSCode:return"PayPal SMS-Code anzeigen";case Zt.Artists_NewSpot:return"Neuer Artist-Spot anlegen";case Zt.CalendarEventEdit_canReOpen:return"geschlossenen Termin erneut \xF6ffnen";case Zt.WhatsAppFastAnswers_Edit:return"WhatsApp-Texte bearbeiten";case Zt.EditUsers:return"Benutzer anlegen / bearbeiten";case Zt.ContactsDelete:return"Kunde l\xF6schen";case Zt.StudioCashReport_PrePayedOutInvoices:return'"Rechnungen-Button" f\xFCr vorzeitige Auszahlungen';case Zt.CanRefund:return"PayPal, Klarna, Gutscheine zur\xFCckzahlen";case Zt.Artists_CanEditSkillsOutsideFromAc:return"Artist-Skills au\xDFerhalb von Aachen ver\xE4ndern";case Zt.Promo_PromotersList:return"Promoters";case Zt.DayFinishLog:return"Abrechnungs-Log";case Zt.GiftCard_ForceAllGiftCards:return"Gutscheine Ausnahmen";case Zt.NotAssignedBankTransfer_Assign:return"Fehlende Bankeinzahlungen zuordnen";case Zt.Analysis_Events:return"Auswertungen basierend auf Terminen";case Zt.GiftCard_SeeCodes:return"Gutschein-Codes sehen";case Zt.Inventory_CanDeleteAllOrders:return"Offene Bestellungen l\xF6schen (egal von wem und wann)";case Zt.ExcelExport:return"Excel Export";case Zt.GoogleSmsCode:return"Google SMS Code";case Zt.Artists_DeleteNotes:return"Artist-Notizen l\xF6schen";case Zt.PiercingManager_AddInfo:return"Notizen zum Termin erfassen";case Zt.StudioCashReport_CanSetWalkIn:return"Walk-In setzen";case Zt.Employees_Edit:return"Mitarbeiter bearbeiten";case Zt.Employees_EditEvents:return"Mitarbeiter Kalender";case Zt.Artists_EditKeySafeCode:return"Schl\xFCssel-Safe-Code bearbeiten";case Zt.Employees_Works:return"Mitarbeiter-Zeiten";case Zt.Employees_EditTimeTracks:return"Mitarbeiter Stempeln nachtragen";case Zt.DefaultDashboard:return"\xDCbersicht nach Login (Dashboard)";case Zt.MoneyAccount_Admin:return"Kassen-Admin";case Zt.MoneyAccount_Transactions:return"Kassen buchen (auf die er Berechtigung hat)";case Zt.Employees_Payout:return"\xDCberstunden ausbezahlen";case Zt.StudioCashReport:return"Zugriff auf CashReport";case Zt.Calendar:return"Zugriff auf Kalender";case Zt.StudioFee:return"Studio-Abgaben";case Zt.EventRating_Edit:return"Tattoo-Termine bewerten";case Zt.EventRating_Delete:return"Tattoo-Bewertung l\xF6schen";case Zt.EventPhoto_Delete:return"L\xF6schen von Termin-Bildern (Vorlage, Stencil, Tattoo)";case Zt.Analysis_EventsCreatedOrUpdated:return"Termin erstellt oder ge\xE4ndert";case Zt.SkillCheck_Disable:return"Skill-Check deaktivieren";case Zt.WhatApp_ChatRecheck:return"WhatsApp-Chat-Kontrolle"}return"? ("+t+")"}function uPe(t){switch(t){case Zt.SuperAdmin:return["Benutzer","Ein- / Ausgaben trotz Abrechnungsstart","Artists AC-Sync","Dashboard","Aufgaben mit Rechtsklick erledigen"];case Zt.Admin:return["Terminerinnerungen WhatsApp (Men\xFC)","Terminbest\xE4tigungen (Men\xFC)","Rechnungen (Men\xFC)"];case Zt.StudioCashReport_CanEditEndMoney:return["(Klick auf Ende-Geld)"];case Zt.GiftCard_ForceAllGiftCards:return["Nicht mehr g\xFCltige","Mindestpreis nicht erreicht","Wenn nicht f\xFCr Aktion zugelassen","Geburstags-Gutscheine als Kaution"]}return[]}var Zt,Bd=Q(()=>{Zt=function(t){return t.Empty="",t.Admin="Admin",t.SuperAdmin="SuperAdmin",t.CalendarEventEdit_canMoveEventEarlierThan3Days="CalendarEventEdit_canMoveEventEarlierThan3Days",t.StudioCashReport_DatePicker="StudioCashReport_DatePicker",t.StudioCashReport_ToggleBlockDayFinish="StudioCashReport_ToggleBlockDayFinish",t.ContactForm_WithoutBirthday="ContactForm_WithoutBirthday",t.ShowDurationPriceCheckColumn="ShowDurationPriceCheckColumn",t.StudioCashReport_CanEditOutgoing="StudioCashReport_CanEditOutgoing",t.StudioCashReport_CanEditIncoming="StudioCashReport_CanEditIncoming",t.StudioCashReport_SwitchStudios="StudioCashReport_SwitchStudios",t.StudioCashReport_Switch_="StudioCashReport_Switch_",t.StudioCashReport_SeeMoneyEndOfDay="StudioCashReport_SeeMoneyEndOfDay",t.StudioFee_Admin="StudioFee_Admin",t.StudioFee="StudioFee",t.StudioCashReport_EditIncomingOutgoing_CanEdit_="StudioCashReport_EditIncomingOutgoing_CanEdit_",t.CalendarEventEdit_canEdit_="CalendarEventEdit_canEdit_",t.NotAssignedPayments_View="NotAssignedPayments_View",t.NotAssignedPayments_Assign="NotAssignedPayments_Assign",t.Artists_Read="Artists_Read",t.GiftCards_Download="GiftCards_Download",t.CalendarEventEdit_ChangeWorkType="CalendarEventEdit_ChangeWorkType",t.CalendarEventEdit_DisableFollowEventInfo="CalendarEventEdit_DisableFollowEventInfo",t.DiscountPromotionsEdit="DiscountPromotionsEdit",t.CalendarEventEdit_SaveWithoutChecks="CalendarEventEdit_SaveWithoutChecks",t.CalendarEventEdit_EditPayments="CalendarEventEdit_EditPayments",t.StudioCashReport_CanEditGiftCard="StudioCashReport_CanEditGiftCard",t.CalendarEventEdit_ShowBankDepositQrCode="CalendarEventEdit_ShowBankDepositQrCode",t.StudioCashReport_ShowAllCashRegisters="StudioCashReport_ShowAllCashRegisters",t.StudioCashReport_CanEditEndMoney="StudioCashReport_CanEditEndMoney",t.Analysis_DiscountPromotions="Analysis_DiscountPromotions",t.NotAssignedPayments_Delete="NotAssignedPayments_Delete",t.Analysis_StudioFee="Analysis_StudioFee",t.Analysis_Events="Analysis_Events",t.DisableGlobal_="DisableGlobal_",t.WhatsAppBroadcast="WhatsAppBroadcast",t.PayPalSMSCode="PayPalSMSCode",t.IsJulian="IsJulian",t.IsAc="IsAc",t.IsMa="IsMa",t.IsNoFranchise="IsNoFranchise",t.IsFranchise="IsFranchise",t.IsNotAc="IsNotAc",t.Artists_NewSpot="Artists_NewSpot",t.CalendarEventEdit_canReOpen="CalendarEventEdit_canReOpen",t.WhatsAppFastAnswers_Edit="WhatsAppFastAnswers_Edit",t.EditUsers="EditUsers",t.ContactsDelete="ContactsDelete",t.StudioCashReport_PrePayedOutInvoices="StudioCashReport_PrePayedOutInvoices",t.IsBackoffice="IsBackoffice",t.IsReception="IsReception",t.Artists_CanEditSkillsOutsideFromAc="Artists_CanEditSkillsOutsideFromAc",t.IsNiklas="IsNiklas",t.IsCapone="IsCapone",t.Promo_PromotersList="Promo_PromotersList",t.DayFinishLog="DayFinishLog",t.GiftCard_ForceAllGiftCards="GiftCard_ForceAllGiftCards",t.NotAssignedBankTransfer_Assign="NotAssignedBankTransfer_Assign",t.GiftCard_SeeCodes="GiftCard_SeeCodes",t.Inventory_CanDeleteAllOrders="Inventory_CanDeleteAllOrders",t.ExcelExport="ExcelExport",t.CanRefund="CanRefund",t.GoogleSmsCode="GoogleSmsCode",t.IsDu="IsDu",t.Artists_DeleteNotes="Artists_DeleteNotes",t.PiercingManager_AddInfo="PiercingManager_AddInfo",t.StudioCashReport_CanSetWalkIn="StudioCashReport_CanSetWalkIn",t.Employees_EditEvents="Employees_EditEvents",t.Employees_Edit="Employees_Edit",t.Artists_EditKeySafeCode="Artists_EditKeySafeCode",t.Employees_Works="Employees_Works",t.Employees_EditTimeTracks="Employees_EditTimeTracks",t.DefaultDashboard="DefaultDashboard",t.MoneyAccount_Admin="MoneyAccount_Admin",t.Employees_Payout="Employees_Payout",t.StudioCashReport="StudioCashReport",t.Calendar="Calendar",t.EventRating_Edit="EventRating_Edit",t.MoneyAccount_Transactions="MoneyAccount_Transactions",t.EventRating_Delete="EventRating_Delete",t.EventPhoto_Delete="EventPhoto_Delete",t.Analysis_EventsCreatedOrUpdated="Analysis_EventsCreatedOrUpdated",t.SkillCheck_Disable="SkillCheck_Disable",t.WhatApp_ChatRecheck="WhatApp_ChatRecheck",t}(Zt||{})});var za,o2=Q(()=>{za=class{static sleep(e){return new Promise((n,i)=>{setTimeout(()=>{n()},e)})}static waitForObj(e,n=100){return O(this,null,function*(){return new Promise((i,r)=>{e()?i():setTimeout(()=>{i(this.waitForObj(e,n))},n)})})}}});var zk=xr((Npe,Bk)=>{(function(t,e){typeof Npe=="object"&&typeof Bk<"u"?Bk.exports=e():typeof define=="function"&&define.amd?define(e):t.moment=e()})(Npe,function(){"use strict";var t;function e(){return t.apply(null,arguments)}function n(S){t=S}function i(S){return S instanceof Array||Object.prototype.toString.call(S)==="[object Array]"}function r(S){return S!=null&&Object.prototype.toString.call(S)==="[object Object]"}function s(S,P){return Object.prototype.hasOwnProperty.call(S,P)}function o(S){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(S).length===0;var P;for(P in S)if(s(S,P))return!1;return!0}function a(S){return S===void 0}function l(S){return typeof S=="number"||Object.prototype.toString.call(S)==="[object Number]"}function c(S){return S instanceof Date||Object.prototype.toString.call(S)==="[object Date]"}function d(S,P){var U=[],J,fe=S.length;for(J=0;J<fe;++J)U.push(P(S[J],J));return U}function u(S,P){for(var U in P)s(P,U)&&(S[U]=P[U]);return s(P,"toString")&&(S.toString=P.toString),s(P,"valueOf")&&(S.valueOf=P.valueOf),S}function m(S,P,U,J){return Lo(S,P,U,J,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(S){return S._pf==null&&(S._pf=f()),S._pf}var x;Array.prototype.some?x=Array.prototype.some:x=function(S){var P=Object(this),U=P.length>>>0,J;for(J=0;J<U;J++)if(J in P&&S.call(this,P[J],J,P))return!0;return!1};function D(S){var P=null,U=!1,J=S._d&&!isNaN(S._d.getTime());if(J&&(P=_(S),U=x.call(P.parsedDateParts,function(fe){return fe!=null}),J=P.overflow<0&&!P.empty&&!P.invalidEra&&!P.invalidMonth&&!P.invalidWeekday&&!P.weekdayMismatch&&!P.nullInput&&!P.invalidFormat&&!P.userInvalidated&&(!P.meridiem||P.meridiem&&U),S._strict&&(J=J&&P.charsLeftOver===0&&P.unusedTokens.length===0&&P.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(S))S._isValid=J;else return J;return S._isValid}function E(S){var P=m(NaN);return S!=null?u(_(P),S):_(P).userInvalidated=!0,P}var M=e.momentProperties=[],I=!1;function z(S,P){var U,J,fe,Qe=M.length;if(a(P._isAMomentObject)||(S._isAMomentObject=P._isAMomentObject),a(P._i)||(S._i=P._i),a(P._f)||(S._f=P._f),a(P._l)||(S._l=P._l),a(P._strict)||(S._strict=P._strict),a(P._tzm)||(S._tzm=P._tzm),a(P._isUTC)||(S._isUTC=P._isUTC),a(P._offset)||(S._offset=P._offset),a(P._pf)||(S._pf=_(P)),a(P._locale)||(S._locale=P._locale),Qe>0)for(U=0;U<Qe;U++)J=M[U],fe=P[J],a(fe)||(S[J]=fe);return S}function G(S){z(this,S),this._d=new Date(S._d!=null?S._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),I===!1&&(I=!0,e.updateOffset(this),I=!1)}function A(S){return S instanceof G||S!=null&&S._isAMomentObject!=null}function Y(S){e.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+S)}function X(S,P){var U=!0;return u(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,S),U){var J=[],fe,Qe,Wt,rn=arguments.length;for(Qe=0;Qe<rn;Qe++){if(fe="",typeof arguments[Qe]=="object"){fe+=`
[`+Qe+"] ";for(Wt in arguments[0])s(arguments[0],Wt)&&(fe+=Wt+": "+arguments[0][Wt]+", ");fe=fe.slice(0,-2)}else fe=arguments[Qe];J.push(fe)}Y(S+`
Arguments: `+Array.prototype.slice.call(J).join("")+`
`+new Error().stack),U=!1}return P.apply(this,arguments)},P)}var ne={};function pe(S,P){e.deprecationHandler!=null&&e.deprecationHandler(S,P),ne[S]||(Y(P),ne[S]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function ce(S){return typeof Function<"u"&&S instanceof Function||Object.prototype.toString.call(S)==="[object Function]"}function ie(S){var P,U;for(U in S)s(S,U)&&(P=S[U],ce(P)?this[U]=P:this["_"+U]=P);this._config=S,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function le(S,P){var U=u({},S),J;for(J in P)s(P,J)&&(r(S[J])&&r(P[J])?(U[J]={},u(U[J],S[J]),u(U[J],P[J])):P[J]!=null?U[J]=P[J]:delete U[J]);for(J in S)s(S,J)&&!s(P,J)&&r(S[J])&&(U[J]=u({},U[J]));return U}function Se(S){S!=null&&this.set(S)}var je;Object.keys?je=Object.keys:je=function(S){var P,U=[];for(P in S)s(S,P)&&U.push(P);return U};var ze={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Ge(S,P,U){var J=this._calendar[S]||this._calendar.sameElse;return ce(J)?J.call(P,U):J}function Ae(S,P,U){var J=""+Math.abs(S),fe=P-J.length,Qe=S>=0;return(Qe?U?"+":"":"-")+Math.pow(10,Math.max(0,fe)).toString().substr(1)+J}var Ye=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ft=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ft={},Tt={};function at(S,P,U,J){var fe=J;typeof J=="string"&&(fe=function(){return this[J]()}),S&&(Tt[S]=fe),P&&(Tt[P[0]]=function(){return Ae(fe.apply(this,arguments),P[1],P[2])}),U&&(Tt[U]=function(){return this.localeData().ordinal(fe.apply(this,arguments),S)})}function yt(S){return S.match(/\[[\s\S]/)?S.replace(/^\[|\]$/g,""):S.replace(/\\/g,"")}function _t(S){var P=S.match(Ye),U,J;for(U=0,J=P.length;U<J;U++)Tt[P[U]]?P[U]=Tt[P[U]]:P[U]=yt(P[U]);return function(fe){var Qe="",Wt;for(Wt=0;Wt<J;Wt++)Qe+=ce(P[Wt])?P[Wt].call(fe,S):P[Wt];return Qe}}function Re(S,P){return S.isValid()?(P=ot(P,S.localeData()),Ft[P]=Ft[P]||_t(P),Ft[P](S)):S.localeData().invalidDate()}function ot(S,P){var U=5;function J(fe){return P.longDateFormat(fe)||fe}for(ft.lastIndex=0;U>=0&&ft.test(S);)S=S.replace(ft,J),ft.lastIndex=0,U-=1;return S}var jt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function zt(S){var P=this._longDateFormat[S],U=this._longDateFormat[S.toUpperCase()];return P||!U?P:(this._longDateFormat[S]=U.match(Ye).map(function(J){return J==="MMMM"||J==="MM"||J==="DD"||J==="dddd"?J.slice(1):J}).join(""),this._longDateFormat[S])}var qt="Invalid date";function ui(){return this._invalidDate}var _i="%d",ln=/\d{1,2}/;function Rn(S){return this._ordinal.replace("%d",S)}var bi={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Mn(S,P,U,J){var fe=this._relativeTime[U];return ce(fe)?fe(S,P,U,J):fe.replace(/%d/i,S)}function Fn(S,P){var U=this._relativeTime[S>0?"future":"past"];return ce(U)?U(P):U.replace(/%s/i,P)}var or={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function wn(S){return typeof S=="string"?or[S]||or[S.toLowerCase()]:void 0}function gn(S){var P={},U,J;for(J in S)s(S,J)&&(U=wn(J),U&&(P[U]=S[J]));return P}var ts={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function no(S){var P=[],U;for(U in S)s(S,U)&&P.push({unit:U,priority:ts[U]});return P.sort(function(J,fe){return J.priority-fe.priority}),P}var Ho=/\d/,kn=/\d\d/,Ts=/\d{3}/,ea=/\d{4}/,co=/[+-]?\d{6}/,Zn=/\d\d?/,gl=/\d\d\d\d?/,sc=/\d\d\d\d\d\d?/,Xl=/\d{1,3}/,Xs=/\d{1,4}/,Ya=/[+-]?\d{1,6}/,qa=/\d+/,Nl=/[+-]?\d+/,zh=/Z|[+-]\d\d:?\d\d/gi,Hh=/Z|[+-]\d\d(?::?\d\d)?/gi,Rf=/[+-]?\d+(\.\d{1,3})?/,Id=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,aa=/^[1-9]\d?/,jd=/^([1-9]\d|\d)/,du;du={};function $i(S,P,U){du[S]=ce(P)?P:function(J,fe){return J&&U?U:P}}function md(S,P){return s(du,S)?du[S](P._strict,P._locale):new RegExp(Vl(S))}function Vl(S){return Tl(S.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(P,U,J,fe,Qe){return U||J||fe||Qe}))}function Tl(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ja(S){return S<0?Math.ceil(S)||0:Math.floor(S)}function Dr(S){var P=+S,U=0;return P!==0&&isFinite(P)&&(U=ja(P)),U}var Ad={};function ds(S,P){var U,J=P,fe;for(typeof S=="string"&&(S=[S]),l(P)&&(J=function(Qe,Wt){Wt[P]=Dr(Qe)}),fe=S.length,U=0;U<fe;U++)Ad[S[U]]=J}function _a(S,P){ds(S,function(U,J,fe,Qe){fe._w=fe._w||{},P(U,fe._w,fe,Qe)})}function fd(S,P,U){P!=null&&s(Ad,S)&&Ad[S](P,U._a,U,S)}function fr(S){return S%4===0&&S%100!==0||S%400===0}var Qs=0,Nr=1,Ql=2,ro=3,Ra=4,Ta=5,$a=6,Da=7,Gh=8;at("Y",0,0,function(){var S=this.year();return S<=9999?Ae(S,4):"+"+S}),at(0,["YY",2],0,function(){return this.year()%100}),at(0,["YYYY",4],0,"year"),at(0,["YYYYY",5],0,"year"),at(0,["YYYYYY",6,!0],0,"year"),$i("Y",Nl),$i("YY",Zn,kn),$i("YYYY",Xs,ea),$i("YYYYY",Ya,co),$i("YYYYYY",Ya,co),ds(["YYYYY","YYYYYY"],Qs),ds("YYYY",function(S,P){P[Qs]=S.length===2?e.parseTwoDigitYear(S):Dr(S)}),ds("YY",function(S,P){P[Qs]=e.parseTwoDigitYear(S)}),ds("Y",function(S,P){P[Qs]=parseInt(S,10)});function Ti(S){return fr(S)?366:365}e.parseTwoDigitYear=function(S){return Dr(S)+(Dr(S)>68?1900:2e3)};var Hs=Mo("FullYear",!0);function Eo(){return fr(this.year())}function Mo(S,P){return function(U){return U!=null?(td(this,S,U),e.updateOffset(this,P),this):Js(this,S)}}function Js(S,P){if(!S.isValid())return NaN;var U=S._d,J=S._isUTC;switch(P){case"Milliseconds":return J?U.getUTCMilliseconds():U.getMilliseconds();case"Seconds":return J?U.getUTCSeconds():U.getSeconds();case"Minutes":return J?U.getUTCMinutes():U.getMinutes();case"Hours":return J?U.getUTCHours():U.getHours();case"Date":return J?U.getUTCDate():U.getDate();case"Day":return J?U.getUTCDay():U.getDay();case"Month":return J?U.getUTCMonth():U.getMonth();case"FullYear":return J?U.getUTCFullYear():U.getFullYear();default:return NaN}}function td(S,P,U){var J,fe,Qe,Wt,rn;if(!(!S.isValid()||isNaN(U))){switch(J=S._d,fe=S._isUTC,P){case"Milliseconds":return void(fe?J.setUTCMilliseconds(U):J.setMilliseconds(U));case"Seconds":return void(fe?J.setUTCSeconds(U):J.setSeconds(U));case"Minutes":return void(fe?J.setUTCMinutes(U):J.setMinutes(U));case"Hours":return void(fe?J.setUTCHours(U):J.setHours(U));case"Date":return void(fe?J.setUTCDate(U):J.setDate(U));case"FullYear":break;default:return}Qe=U,Wt=S.month(),rn=S.date(),rn=rn===29&&Wt===1&&!fr(Qe)?28:rn,fe?J.setUTCFullYear(Qe,Wt,rn):J.setFullYear(Qe,Wt,rn)}}function Ec(S){return S=wn(S),ce(this[S])?this[S]():this}function Wh(S,P){if(typeof S=="object"){S=gn(S);var U=no(S),J,fe=U.length;for(J=0;J<fe;J++)this[U[J].unit](S[U[J].unit])}else if(S=wn(S),ce(this[S]))return this[S](P);return this}function gd(S,P){return(S%P+P)%P}var eo;Array.prototype.indexOf?eo=Array.prototype.indexOf:eo=function(S){var P;for(P=0;P<this.length;++P)if(this[P]===S)return P;return-1};function Tu(S,P){if(isNaN(S)||isNaN(P))return NaN;var U=gd(P,12);return S+=(P-U)/12,U===1?fr(S)?29:28:31-U%7%2}at("M",["MM",2],"Mo",function(){return this.month()+1}),at("MMM",0,0,function(S){return this.localeData().monthsShort(this,S)}),at("MMMM",0,0,function(S){return this.localeData().months(this,S)}),$i("M",Zn,aa),$i("MM",Zn,kn),$i("MMM",function(S,P){return P.monthsShortRegex(S)}),$i("MMMM",function(S,P){return P.monthsRegex(S)}),ds(["M","MM"],function(S,P){P[Nr]=Dr(S)-1}),ds(["MMM","MMMM"],function(S,P,U,J){var fe=U._locale.monthsParse(S,J,U._strict);fe!=null?P[Nr]=fe:_(U).invalidMonth=S});var dp="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),vd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ch=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,T1=Id,Wm=Id;function ia(S,P){return S?i(this._months)?this._months[S.month()]:this._months[(this._months.isFormat||ch).test(P)?"format":"standalone"][S.month()]:i(this._months)?this._months:this._months.standalone}function Fa(S,P){return S?i(this._monthsShort)?this._monthsShort[S.month()]:this._monthsShort[ch.test(P)?"format":"standalone"][S.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function up(S,P,U){var J,fe,Qe,Wt=S.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],J=0;J<12;++J)Qe=m([2e3,J]),this._shortMonthsParse[J]=this.monthsShort(Qe,"").toLocaleLowerCase(),this._longMonthsParse[J]=this.months(Qe,"").toLocaleLowerCase();return U?P==="MMM"?(fe=eo.call(this._shortMonthsParse,Wt),fe!==-1?fe:null):(fe=eo.call(this._longMonthsParse,Wt),fe!==-1?fe:null):P==="MMM"?(fe=eo.call(this._shortMonthsParse,Wt),fe!==-1?fe:(fe=eo.call(this._longMonthsParse,Wt),fe!==-1?fe:null)):(fe=eo.call(this._longMonthsParse,Wt),fe!==-1?fe:(fe=eo.call(this._shortMonthsParse,Wt),fe!==-1?fe:null))}function vl(S,P,U){var J,fe,Qe;if(this._monthsParseExact)return up.call(this,S,P,U);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),J=0;J<12;J++){if(fe=m([2e3,J]),U&&!this._longMonthsParse[J]&&(this._longMonthsParse[J]=new RegExp("^"+this.months(fe,"").replace(".","")+"$","i"),this._shortMonthsParse[J]=new RegExp("^"+this.monthsShort(fe,"").replace(".","")+"$","i")),!U&&!this._monthsParse[J]&&(Qe="^"+this.months(fe,"")+"|^"+this.monthsShort(fe,""),this._monthsParse[J]=new RegExp(Qe.replace(".",""),"i")),U&&P==="MMMM"&&this._longMonthsParse[J].test(S))return J;if(U&&P==="MMM"&&this._shortMonthsParse[J].test(S))return J;if(!U&&this._monthsParse[J].test(S))return J}}function Jl(S,P){if(!S.isValid())return S;if(typeof P=="string"){if(/^\d+$/.test(P))P=Dr(P);else if(P=S.localeData().monthsParse(P),!l(P))return S}var U=P,J=S.date();return J=J<29?J:Math.min(J,Tu(S.year(),U)),S._isUTC?S._d.setUTCMonth(U,J):S._d.setMonth(U,J),S}function Du(S){return S!=null?(Jl(this,S),e.updateOffset(this,!0),this):Js(this,"Month")}function uo(){return Tu(this.year(),this.month())}function yl(S){return this._monthsParseExact?(s(this,"_monthsRegex")||zp.call(this),S?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=T1),this._monthsShortStrictRegex&&S?this._monthsShortStrictRegex:this._monthsShortRegex)}function Bp(S){return this._monthsParseExact?(s(this,"_monthsRegex")||zp.call(this),S?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Wm),this._monthsStrictRegex&&S?this._monthsStrictRegex:this._monthsRegex)}function zp(){function S(ar,Xr){return Xr.length-ar.length}var P=[],U=[],J=[],fe,Qe,Wt,rn;for(fe=0;fe<12;fe++)Qe=m([2e3,fe]),Wt=Tl(this.monthsShort(Qe,"")),rn=Tl(this.months(Qe,"")),P.push(Wt),U.push(rn),J.push(rn),J.push(Wt);P.sort(S),U.sort(S),J.sort(S),this._monthsRegex=new RegExp("^("+J.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+U.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+P.join("|")+")","i")}function id(S,P,U,J,fe,Qe,Wt){var rn;return S<100&&S>=0?(rn=new Date(S+400,P,U,J,fe,Qe,Wt),isFinite(rn.getFullYear())&&rn.setFullYear(S)):rn=new Date(S,P,U,J,fe,Qe,Wt),rn}function Bc(S){var P,U;return S<100&&S>=0?(U=Array.prototype.slice.call(arguments),U[0]=S+400,P=new Date(Date.UTC.apply(null,U)),isFinite(P.getUTCFullYear())&&P.setUTCFullYear(S)):P=new Date(Date.UTC.apply(null,arguments)),P}function ec(S,P,U){var J=7+P-U,fe=(7+Bc(S,0,J).getUTCDay()-P)%7;return-fe+J-1}function yd(S,P,U,J,fe){var Qe=(7+U-J)%7,Wt=ec(S,J,fe),rn=1+7*(P-1)+Qe+Wt,ar,Xr;return rn<=0?(ar=S-1,Xr=Ti(ar)+rn):rn>Ti(S)?(ar=S+1,Xr=rn-Ti(S)):(ar=S,Xr=rn),{year:ar,dayOfYear:Xr}}function bo(S,P,U){var J=ec(S.year(),P,U),fe=Math.floor((S.dayOfYear()-J-1)/7)+1,Qe,Wt;return fe<1?(Wt=S.year()-1,Qe=fe+ba(Wt,P,U)):fe>ba(S.year(),P,U)?(Qe=fe-ba(S.year(),P,U),Wt=S.year()+1):(Wt=S.year(),Qe=fe),{week:Qe,year:Wt}}function ba(S,P,U){var J=ec(S,P,U),fe=ec(S+1,P,U);return(Ti(S)-J+fe)/7}at("w",["ww",2],"wo","week"),at("W",["WW",2],"Wo","isoWeek"),$i("w",Zn,aa),$i("ww",Zn,kn),$i("W",Zn,aa),$i("WW",Zn,kn),_a(["w","ww","W","WW"],function(S,P,U,J){P[J.substr(0,1)]=Dr(S)});function Bl(S){return bo(S,this._week.dow,this._week.doy).week}var Yo={dow:0,doy:6};function dh(){return this._week.dow}function mc(){return this._week.doy}function Pd(S){var P=this.localeData().week(this);return S==null?P:this.add((S-P)*7,"d")}function ju(S){var P=bo(this,1,4).week;return S==null?P:this.add((S-P)*7,"d")}at("d",0,"do","day"),at("dd",0,0,function(S){return this.localeData().weekdaysMin(this,S)}),at("ddd",0,0,function(S){return this.localeData().weekdaysShort(this,S)}),at("dddd",0,0,function(S){return this.localeData().weekdays(this,S)}),at("e",0,0,"weekday"),at("E",0,0,"isoWeekday"),$i("d",Zn),$i("e",Zn),$i("E",Zn),$i("dd",function(S,P){return P.weekdaysMinRegex(S)}),$i("ddd",function(S,P){return P.weekdaysShortRegex(S)}),$i("dddd",function(S,P){return P.weekdaysRegex(S)}),_a(["dd","ddd","dddd"],function(S,P,U,J){var fe=U._locale.weekdaysParse(S,J,U._strict);fe!=null?P.d=fe:_(U).invalidWeekday=S}),_a(["d","e","E"],function(S,P,U,J){P[J]=Dr(S)});function hp(S,P){return typeof S!="string"?S:isNaN(S)?(S=P.weekdaysParse(S),typeof S=="number"?S:null):parseInt(S,10)}function Uh(S,P){return typeof S=="string"?P.weekdaysParse(S)%7||7:isNaN(S)?null:S}function $u(S,P){return S.slice(P,7).concat(S.slice(0,P))}var Um="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ff="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Hp="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Eu=Id,wo=Id,uh=Id;function rl(S,P){var U=i(this._weekdays)?this._weekdays:this._weekdays[S&&S!==!0&&this._weekdays.isFormat.test(P)?"format":"standalone"];return S===!0?$u(U,this._week.dow):S?U[S.day()]:U}function pp(S){return S===!0?$u(this._weekdaysShort,this._week.dow):S?this._weekdaysShort[S.day()]:this._weekdaysShort}function Gp(S){return S===!0?$u(this._weekdaysMin,this._week.dow):S?this._weekdaysMin[S.day()]:this._weekdaysMin}function d0(S,P,U){var J,fe,Qe,Wt=S.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],J=0;J<7;++J)Qe=m([2e3,1]).day(J),this._minWeekdaysParse[J]=this.weekdaysMin(Qe,"").toLocaleLowerCase(),this._shortWeekdaysParse[J]=this.weekdaysShort(Qe,"").toLocaleLowerCase(),this._weekdaysParse[J]=this.weekdays(Qe,"").toLocaleLowerCase();return U?P==="dddd"?(fe=eo.call(this._weekdaysParse,Wt),fe!==-1?fe:null):P==="ddd"?(fe=eo.call(this._shortWeekdaysParse,Wt),fe!==-1?fe:null):(fe=eo.call(this._minWeekdaysParse,Wt),fe!==-1?fe:null):P==="dddd"?(fe=eo.call(this._weekdaysParse,Wt),fe!==-1||(fe=eo.call(this._shortWeekdaysParse,Wt),fe!==-1)?fe:(fe=eo.call(this._minWeekdaysParse,Wt),fe!==-1?fe:null)):P==="ddd"?(fe=eo.call(this._shortWeekdaysParse,Wt),fe!==-1||(fe=eo.call(this._weekdaysParse,Wt),fe!==-1)?fe:(fe=eo.call(this._minWeekdaysParse,Wt),fe!==-1?fe:null)):(fe=eo.call(this._minWeekdaysParse,Wt),fe!==-1||(fe=eo.call(this._weekdaysParse,Wt),fe!==-1)?fe:(fe=eo.call(this._shortWeekdaysParse,Wt),fe!==-1?fe:null))}function jm(S,P,U){var J,fe,Qe;if(this._weekdaysParseExact)return d0.call(this,S,P,U);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),J=0;J<7;J++){if(fe=m([2e3,1]).day(J),U&&!this._fullWeekdaysParse[J]&&(this._fullWeekdaysParse[J]=new RegExp("^"+this.weekdays(fe,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[J]=new RegExp("^"+this.weekdaysShort(fe,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[J]=new RegExp("^"+this.weekdaysMin(fe,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[J]||(Qe="^"+this.weekdays(fe,"")+"|^"+this.weekdaysShort(fe,"")+"|^"+this.weekdaysMin(fe,""),this._weekdaysParse[J]=new RegExp(Qe.replace(".",""),"i")),U&&P==="dddd"&&this._fullWeekdaysParse[J].test(S))return J;if(U&&P==="ddd"&&this._shortWeekdaysParse[J].test(S))return J;if(U&&P==="dd"&&this._minWeekdaysParse[J].test(S))return J;if(!U&&this._weekdaysParse[J].test(S))return J}}function nd(S){if(!this.isValid())return S!=null?this:NaN;var P=Js(this,"Day");return S!=null?(S=hp(S,this.localeData()),this.add(S-P,"d")):P}function D1(S){if(!this.isValid())return S!=null?this:NaN;var P=(this.day()+7-this.localeData()._week.dow)%7;return S==null?P:this.add(S-P,"d")}function Lf(S){if(!this.isValid())return S!=null?this:NaN;if(S!=null){var P=Uh(S,this.localeData());return this.day(this.day()%7?P:P-7)}else return this.day()||7}function Yr(S){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||hh.call(this),S?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Eu),this._weekdaysStrictRegex&&S?this._weekdaysStrictRegex:this._weekdaysRegex)}function ps(S){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||hh.call(this),S?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=wo),this._weekdaysShortStrictRegex&&S?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function $m(S){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||hh.call(this),S?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=uh),this._weekdaysMinStrictRegex&&S?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function hh(){function S(yc,yh){return yh.length-yc.length}var P=[],U=[],J=[],fe=[],Qe,Wt,rn,ar,Xr;for(Qe=0;Qe<7;Qe++)Wt=m([2e3,1]).day(Qe),rn=Tl(this.weekdaysMin(Wt,"")),ar=Tl(this.weekdaysShort(Wt,"")),Xr=Tl(this.weekdays(Wt,"")),P.push(rn),U.push(ar),J.push(Xr),fe.push(rn),fe.push(ar),fe.push(Xr);P.sort(S),U.sort(S),J.sort(S),fe.sort(S),this._weekdaysRegex=new RegExp("^("+fe.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+J.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+U.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+P.join("|")+")","i")}function Ku(){return this.hours()%12||12}function E1(){return this.hours()||24}at("H",["HH",2],0,"hour"),at("h",["hh",2],0,Ku),at("k",["kk",2],0,E1),at("hmm",0,0,function(){return""+Ku.apply(this)+Ae(this.minutes(),2)}),at("hmmss",0,0,function(){return""+Ku.apply(this)+Ae(this.minutes(),2)+Ae(this.seconds(),2)}),at("Hmm",0,0,function(){return""+this.hours()+Ae(this.minutes(),2)}),at("Hmmss",0,0,function(){return""+this.hours()+Ae(this.minutes(),2)+Ae(this.seconds(),2)});function Wp(S,P){at(S,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),P)})}Wp("a",!0),Wp("A",!1);function Dl(S,P){return P._meridiemParse}$i("a",Dl),$i("A",Dl),$i("H",Zn,jd),$i("h",Zn,aa),$i("k",Zn,aa),$i("HH",Zn,kn),$i("hh",Zn,kn),$i("kk",Zn,kn),$i("hmm",gl),$i("hmmss",sc),$i("Hmm",gl),$i("Hmmss",sc),ds(["H","HH"],ro),ds(["k","kk"],function(S,P,U){var J=Dr(S);P[ro]=J===24?0:J}),ds(["a","A"],function(S,P,U){U._isPm=U._locale.isPM(S),U._meridiem=S}),ds(["h","hh"],function(S,P,U){P[ro]=Dr(S),_(U).bigHour=!0}),ds("hmm",function(S,P,U){var J=S.length-2;P[ro]=Dr(S.substr(0,J)),P[Ra]=Dr(S.substr(J)),_(U).bigHour=!0}),ds("hmmss",function(S,P,U){var J=S.length-4,fe=S.length-2;P[ro]=Dr(S.substr(0,J)),P[Ra]=Dr(S.substr(J,2)),P[Ta]=Dr(S.substr(fe)),_(U).bigHour=!0}),ds("Hmm",function(S,P,U){var J=S.length-2;P[ro]=Dr(S.substr(0,J)),P[Ra]=Dr(S.substr(J))}),ds("Hmmss",function(S,P,U){var J=S.length-4,fe=S.length-2;P[ro]=Dr(S.substr(0,J)),P[Ra]=Dr(S.substr(J,2)),P[Ta]=Dr(S.substr(fe))});function M1(S){return(S+"").toLowerCase().charAt(0)==="p"}var Ca=/[ap]\.?m?\.?/i,la=Mo("Hours",!0);function oc(S,P,U){return S>11?U?"pm":"PM":U?"am":"AM"}var fc={calendar:ze,longDateFormat:jt,invalidDate:qt,ordinal:_i,dayOfMonthOrdinalParse:ln,relativeTime:bi,months:dp,monthsShort:vd,week:Yo,weekdays:Um,weekdaysMin:Hp,weekdaysShort:Ff,meridiemParse:Ca},Fs={},_d={},Go;function k1(S,P){var U,J=Math.min(S.length,P.length);for(U=0;U<J;U+=1)if(S[U]!==P[U])return U;return J}function H(S){return S&&S.toLowerCase().replace("_","-")}function te(S){for(var P=0,U,J,fe,Qe;P<S.length;){for(Qe=H(S[P]).split("-"),U=Qe.length,J=H(S[P+1]),J=J?J.split("-"):null;U>0;){if(fe=ke(Qe.slice(0,U).join("-")),fe)return fe;if(J&&J.length>=U&&k1(Qe,J)>=U-1)break;U--}P++}return Go}function ge(S){return!!(S&&S.match("^[^/\\\\]*$"))}function ke(S){var P=null,U;if(Fs[S]===void 0&&typeof Bk<"u"&&Bk&&Bk.exports&&ge(S))try{P=Go._abbr,U=s4,U("./locale/"+S),He(P)}catch{Fs[S]=null}return Fs[S]}function He(S,P){var U;return S&&(a(P)?U=kt(S):U=Ne(S,P),U?Go=U:typeof console<"u"&&console.warn&&console.warn("Locale "+S+" not found. Did you forget to load it?")),Go._abbr}function Ne(S,P){if(P!==null){var U,J=fc;if(P.abbr=S,Fs[S]!=null)pe("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),J=Fs[S]._config;else if(P.parentLocale!=null)if(Fs[P.parentLocale]!=null)J=Fs[P.parentLocale]._config;else if(U=ke(P.parentLocale),U!=null)J=U._config;else return _d[P.parentLocale]||(_d[P.parentLocale]=[]),_d[P.parentLocale].push({name:S,config:P}),null;return Fs[S]=new Se(le(J,P)),_d[S]&&_d[S].forEach(function(fe){Ne(fe.name,fe.config)}),He(S),Fs[S]}else return delete Fs[S],null}function ct(S,P){if(P!=null){var U,J,fe=fc;Fs[S]!=null&&Fs[S].parentLocale!=null?Fs[S].set(le(Fs[S]._config,P)):(J=ke(S),J!=null&&(fe=J._config),P=le(fe,P),J==null&&(P.abbr=S),U=new Se(P),U.parentLocale=Fs[S],Fs[S]=U),He(S)}else Fs[S]!=null&&(Fs[S].parentLocale!=null?(Fs[S]=Fs[S].parentLocale,S===He()&&He(S)):Fs[S]!=null&&delete Fs[S]);return Fs[S]}function kt(S){var P;if(S&&S._locale&&S._locale._abbr&&(S=S._locale._abbr),!S)return Go;if(!i(S)){if(P=ke(S),P)return P;S=[S]}return te(S)}function Ht(){return je(Fs)}function hi(S){var P,U=S._a;return U&&_(S).overflow===-2&&(P=U[Nr]<0||U[Nr]>11?Nr:U[Ql]<1||U[Ql]>Tu(U[Qs],U[Nr])?Ql:U[ro]<0||U[ro]>24||U[ro]===24&&(U[Ra]!==0||U[Ta]!==0||U[$a]!==0)?ro:U[Ra]<0||U[Ra]>59?Ra:U[Ta]<0||U[Ta]>59?Ta:U[$a]<0||U[$a]>999?$a:-1,_(S)._overflowDayOfYear&&(P<Qs||P>Ql)&&(P=Ql),_(S)._overflowWeeks&&P===-1&&(P=Da),_(S)._overflowWeekday&&P===-1&&(P=Gh),_(S).overflow=P),S}var Li=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,nn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ii=/Z|[+-]\d\d(?::?\d\d)?/,Oi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],is=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Io=/^\/?Date\((-?\d+)/i,Ao=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,sl={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ea(S){var P,U,J=S._i,fe=Li.exec(J)||nn.exec(J),Qe,Wt,rn,ar,Xr=Oi.length,yc=is.length;if(fe){for(_(S).iso=!0,P=0,U=Xr;P<U;P++)if(Oi[P][1].exec(fe[1])){Wt=Oi[P][0],Qe=Oi[P][2]!==!1;break}if(Wt==null){S._isValid=!1;return}if(fe[3]){for(P=0,U=yc;P<U;P++)if(is[P][1].exec(fe[3])){rn=(fe[2]||" ")+is[P][0];break}if(rn==null){S._isValid=!1;return}}if(!Qe&&rn!=null){S._isValid=!1;return}if(fe[4])if(Ii.exec(fe[4]))ar="Z";else{S._isValid=!1;return}S._f=Wt+(rn||"")+(ar||""),Oe(S)}else S._isValid=!1}function $d(S,P,U,J,fe,Qe){var Wt=[rd(S),vd.indexOf(P),parseInt(U,10),parseInt(J,10),parseInt(fe,10)];return Qe&&Wt.push(parseInt(Qe,10)),Wt}function rd(S){var P=parseInt(S,10);return P<=49?2e3+P:P<=999?1900+P:P}function Ro(S){return S.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function gc(S,P,U){if(S){var J=Ff.indexOf(S),fe=new Date(P[0],P[1],P[2]).getDay();if(J!==fe)return _(U).weekdayMismatch=!0,U._isValid=!1,!1}return!0}function ho(S,P,U){if(S)return sl[S];if(P)return 0;var J=parseInt(U,10),fe=J%100,Qe=(J-fe)/100;return Qe*60+fe}function Fo(S){var P=Ao.exec(Ro(S._i)),U;if(P){if(U=$d(P[4],P[3],P[2],P[5],P[6],P[7]),!gc(P[1],U,S))return;S._a=U,S._tzm=ho(P[8],P[9],P[10]),S._d=Bc.apply(null,S._a),S._d.setUTCMinutes(S._d.getUTCMinutes()-S._tzm),_(S).rfc2822=!0}else S._isValid=!1}function zc(S){var P=Io.exec(S._i);if(P!==null){S._d=new Date(+P[1]);return}if(Ea(S),S._isValid===!1)delete S._isValid;else return;if(Fo(S),S._isValid===!1)delete S._isValid;else return;S._strict?S._isValid=!1:e.createFromInputFallback(S)}e.createFromInputFallback=X("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(S){S._d=new Date(S._i+(S._useUTC?" UTC":""))});function Cd(S,P,U){return S??P??U}function Mc(S){var P=new Date(e.now());return S._useUTC?[P.getUTCFullYear(),P.getUTCMonth(),P.getUTCDate()]:[P.getFullYear(),P.getMonth(),P.getDate()]}function K(S){var P,U,J=[],fe,Qe,Wt;if(!S._d){for(fe=Mc(S),S._w&&S._a[Ql]==null&&S._a[Nr]==null&&we(S),S._dayOfYear!=null&&(Wt=Cd(S._a[Qs],fe[Qs]),(S._dayOfYear>Ti(Wt)||S._dayOfYear===0)&&(_(S)._overflowDayOfYear=!0),U=Bc(Wt,0,S._dayOfYear),S._a[Nr]=U.getUTCMonth(),S._a[Ql]=U.getUTCDate()),P=0;P<3&&S._a[P]==null;++P)S._a[P]=J[P]=fe[P];for(;P<7;P++)S._a[P]=J[P]=S._a[P]==null?P===2?1:0:S._a[P];S._a[ro]===24&&S._a[Ra]===0&&S._a[Ta]===0&&S._a[$a]===0&&(S._nextDay=!0,S._a[ro]=0),S._d=(S._useUTC?Bc:id).apply(null,J),Qe=S._useUTC?S._d.getUTCDay():S._d.getDay(),S._tzm!=null&&S._d.setUTCMinutes(S._d.getUTCMinutes()-S._tzm),S._nextDay&&(S._a[ro]=24),S._w&&typeof S._w.d<"u"&&S._w.d!==Qe&&(_(S).weekdayMismatch=!0)}}function we(S){var P,U,J,fe,Qe,Wt,rn,ar,Xr;P=S._w,P.GG!=null||P.W!=null||P.E!=null?(Qe=1,Wt=4,U=Cd(P.GG,S._a[Qs],bo(Er(),1,4).year),J=Cd(P.W,1),fe=Cd(P.E,1),(fe<1||fe>7)&&(ar=!0)):(Qe=S._locale._week.dow,Wt=S._locale._week.doy,Xr=bo(Er(),Qe,Wt),U=Cd(P.gg,S._a[Qs],Xr.year),J=Cd(P.w,Xr.week),P.d!=null?(fe=P.d,(fe<0||fe>6)&&(ar=!0)):P.e!=null?(fe=P.e+Qe,(P.e<0||P.e>6)&&(ar=!0)):fe=Qe),J<1||J>ba(U,Qe,Wt)?_(S)._overflowWeeks=!0:ar!=null?_(S)._overflowWeekday=!0:(rn=yd(U,J,fe,Qe,Wt),S._a[Qs]=rn.year,S._dayOfYear=rn.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function Oe(S){if(S._f===e.ISO_8601){Ea(S);return}if(S._f===e.RFC_2822){Fo(S);return}S._a=[],_(S).empty=!0;var P=""+S._i,U,J,fe,Qe,Wt,rn=P.length,ar=0,Xr,yc;for(fe=ot(S._f,S._locale).match(Ye)||[],yc=fe.length,U=0;U<yc;U++)Qe=fe[U],J=(P.match(md(Qe,S))||[])[0],J&&(Wt=P.substr(0,P.indexOf(J)),Wt.length>0&&_(S).unusedInput.push(Wt),P=P.slice(P.indexOf(J)+J.length),ar+=J.length),Tt[Qe]?(J?_(S).empty=!1:_(S).unusedTokens.push(Qe),fd(Qe,J,S)):S._strict&&!J&&_(S).unusedTokens.push(Qe);_(S).charsLeftOver=rn-ar,P.length>0&&_(S).unusedInput.push(P),S._a[ro]<=12&&_(S).bigHour===!0&&S._a[ro]>0&&(_(S).bigHour=void 0),_(S).parsedDateParts=S._a.slice(0),_(S).meridiem=S._meridiem,S._a[ro]=mt(S._locale,S._a[ro],S._meridiem),Xr=_(S).era,Xr!==null&&(S._a[Qs]=S._locale.erasConvertYear(Xr,S._a[Qs])),K(S),hi(S)}function mt(S,P,U){var J;return U==null?P:S.meridiemHour!=null?S.meridiemHour(P,U):(S.isPM!=null&&(J=S.isPM(U),J&&P<12&&(P+=12),!J&&P===12&&(P=0)),P)}function vi(S){var P,U,J,fe,Qe,Wt,rn=!1,ar=S._f.length;if(ar===0){_(S).invalidFormat=!0,S._d=new Date(NaN);return}for(fe=0;fe<ar;fe++)Qe=0,Wt=!1,P=z({},S),S._useUTC!=null&&(P._useUTC=S._useUTC),P._f=S._f[fe],Oe(P),D(P)&&(Wt=!0),Qe+=_(P).charsLeftOver,Qe+=_(P).unusedTokens.length*10,_(P).score=Qe,rn?Qe<J&&(J=Qe,U=P):(J==null||Qe<J||Wt)&&(J=Qe,U=P,Wt&&(rn=!0));u(S,U||P)}function Bi(S){if(!S._d){var P=gn(S._i),U=P.day===void 0?P.date:P.day;S._a=d([P.year,P.month,U,P.hour,P.minute,P.second,P.millisecond],function(J){return J&&parseInt(J,10)}),K(S)}}function jn(S){var P=new G(hi(Vr(S)));return P._nextDay&&(P.add(1,"d"),P._nextDay=void 0),P}function Vr(S){var P=S._i,U=S._f;return S._locale=S._locale||kt(S._l),P===null||U===void 0&&P===""?E({nullInput:!0}):(typeof P=="string"&&(S._i=P=S._locale.preparse(P)),A(P)?new G(hi(P)):(c(P)?S._d=P:i(U)?vi(S):U?Oe(S):El(S),D(S)||(S._d=null),S))}function El(S){var P=S._i;a(P)?S._d=new Date(e.now()):c(P)?S._d=new Date(P.valueOf()):typeof P=="string"?zc(S):i(P)?(S._a=d(P.slice(0),function(U){return parseInt(U,10)}),K(S)):r(P)?Bi(S):l(P)?S._d=new Date(P):e.createFromInputFallback(S)}function Lo(S,P,U,J,fe){var Qe={};return(P===!0||P===!1)&&(J=P,P=void 0),(U===!0||U===!1)&&(J=U,U=void 0),(r(S)&&o(S)||i(S)&&S.length===0)&&(S=void 0),Qe._isAMomentObject=!0,Qe._useUTC=Qe._isUTC=fe,Qe._l=U,Qe._i=S,Qe._f=P,Qe._strict=J,jn(Qe)}function Er(S,P,U,J){return Lo(S,P,U,J,!1)}var yo=X("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var S=Er.apply(null,arguments);return this.isValid()&&S.isValid()?S<this?this:S:E()}),uu=X("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var S=Er.apply(null,arguments);return this.isValid()&&S.isValid()?S>this?this:S:E()});function zl(S,P){var U,J;if(P.length===1&&i(P[0])&&(P=P[0]),!P.length)return Er();for(U=P[0],J=1;J<P.length;++J)(!P[J].isValid()||P[J][S](U))&&(U=P[J]);return U}function Mu(){var S=[].slice.call(arguments,0);return zl("isBefore",S)}function Of(){var S=[].slice.call(arguments,0);return zl("isAfter",S)}var K0=function(){return Date.now?Date.now():+new Date},Hc=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rd(S){var P,U=!1,J,fe=Hc.length;for(P in S)if(s(S,P)&&!(eo.call(Hc,P)!==-1&&(S[P]==null||!isNaN(S[P]))))return!1;for(J=0;J<fe;++J)if(S[Hc[J]]){if(U)return!1;parseFloat(S[Hc[J]])!==Dr(S[Hc[J]])&&(U=!0)}return!0}function Nf(){return this._isValid}function jh(){return hn(NaN)}function $h(S){var P=gn(S),U=P.year||0,J=P.quarter||0,fe=P.month||0,Qe=P.week||P.isoWeek||0,Wt=P.day||0,rn=P.hour||0,ar=P.minute||0,Xr=P.second||0,yc=P.millisecond||0;this._isValid=Rd(P),this._milliseconds=+yc+Xr*1e3+ar*6e4+rn*1e3*60*60,this._days=+Wt+Qe*7,this._months=+fe+J*3+U*12,this._data={},this._locale=kt(),this._bubble()}function _l(S){return S instanceof $h}function kc(S){return S<0?Math.round(-1*S)*-1:Math.round(S)}function Y0(S,P,U){var J=Math.min(S.length,P.length),fe=Math.abs(S.length-P.length),Qe=0,Wt;for(Wt=0;Wt<J;Wt++)(U&&S[Wt]!==P[Wt]||!U&&Dr(S[Wt])!==Dr(P[Wt]))&&Qe++;return Qe+fe}function Up(S,P){at(S,0,0,function(){var U=this.utcOffset(),J="+";return U<0&&(U=-U,J="-"),J+Ae(~~(U/60),2)+P+Ae(~~U%60,2)})}Up("Z",":"),Up("ZZ",""),$i("Z",Hh),$i("ZZ",Hh),ds(["Z","ZZ"],function(S,P,U){U._useUTC=!0,U._tzm=Hl(Hh,S)});var Kg=/([\+\-]|\d\d)/gi;function Hl(S,P){var U=(P||"").match(S),J,fe,Qe;return U===null?null:(J=U[U.length-1]||[],fe=(J+"").match(Kg)||["-",0,0],Qe=+(fe[1]*60)+Dr(fe[2]),Qe===0?0:fe[0]==="+"?Qe:-Qe)}function ol(S,P){var U,J;return P._isUTC?(U=P.clone(),J=(A(S)||c(S)?S.valueOf():Er(S).valueOf())-U.valueOf(),U._d.setTime(U._d.valueOf()+J),e.updateOffset(U,!1),U):Er(S).local()}function jp(S){return-Math.round(S._d.getTimezoneOffset())}e.updateOffset=function(){};function F2(S,P,U){var J=this._offset||0,fe;if(!this.isValid())return S!=null?this:NaN;if(S!=null){if(typeof S=="string"){if(S=Hl(Hh,S),S===null)return this}else Math.abs(S)<16&&!U&&(S=S*60);return!this._isUTC&&P&&(fe=jp(this)),this._offset=S,this._isUTC=!0,fe!=null&&this.add(fe,"m"),J!==S&&(!P||this._changeInProgress?xd(this,hn(S-J,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?J:jp(this)}function I1(S,P){return S!=null?(typeof S!="string"&&(S=-S),this.utcOffset(S,P),this):-this.utcOffset()}function q0(S){return this.utcOffset(0,S)}function Mt(S){return this._isUTC&&(this.utcOffset(0,S),this._isUTC=!1,S&&this.subtract(jp(this),"m")),this}function li(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var S=Hl(zh,this._i);S!=null?this.utcOffset(S):this.utcOffset(0,!0)}return this}function wi(S){return this.isValid()?(S=S?Er(S).utcOffset():0,(this.utcOffset()-S)%60===0):!1}function Fe(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function dt(){if(!a(this._isDSTShifted))return this._isDSTShifted;var S={},P;return z(S,this),S=Vr(S),S._a?(P=S._isUTC?m(S._a):Er(S._a),this._isDSTShifted=this.isValid()&&Y0(S._a,P.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ht(){return this.isValid()?!this._isUTC:!1}function ci(){return this.isValid()?this._isUTC:!1}function Ni(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Qi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Br=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function hn(S,P){var U=S,J=null,fe,Qe,Wt;return _l(S)?U={ms:S._milliseconds,d:S._days,M:S._months}:l(S)||!isNaN(+S)?(U={},P?U[P]=+S:U.milliseconds=+S):(J=Qi.exec(S))?(fe=J[1]==="-"?-1:1,U={y:0,d:Dr(J[Ql])*fe,h:Dr(J[ro])*fe,m:Dr(J[Ra])*fe,s:Dr(J[Ta])*fe,ms:Dr(kc(J[$a]*1e3))*fe}):(J=Br.exec(S))?(fe=J[1]==="-"?-1:1,U={y:us(J[2],fe),M:us(J[3],fe),w:us(J[4],fe),d:us(J[5],fe),h:us(J[6],fe),m:us(J[7],fe),s:us(J[8],fe)}):U==null?U={}:typeof U=="object"&&("from"in U||"to"in U)&&(Wt=_r(Er(U.from),Er(U.to)),U={},U.ms=Wt.milliseconds,U.M=Wt.months),Qe=new $h(U),_l(S)&&s(S,"_locale")&&(Qe._locale=S._locale),_l(S)&&s(S,"_isValid")&&(Qe._isValid=S._isValid),Qe}hn.fn=$h.prototype,hn.invalid=jh;function us(S,P){var U=S&&parseFloat(S.replace(",","."));return(isNaN(U)?0:U)*P}function ns(S,P){var U={};return U.months=P.month()-S.month()+(P.year()-S.year())*12,S.clone().add(U.months,"M").isAfter(P)&&--U.months,U.milliseconds=+P-+S.clone().add(U.months,"M"),U}function _r(S,P){var U;return S.isValid()&&P.isValid()?(P=ol(P,S),S.isBefore(P)?U=ns(S,P):(U=ns(P,S),U.milliseconds=-U.milliseconds,U.months=-U.months),U):{milliseconds:0,months:0}}function xa(S,P){return function(U,J){var fe,Qe;return J!==null&&!isNaN(+J)&&(pe(P,"moment()."+P+"(period, number) is deprecated. Please use moment()."+P+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),Qe=U,U=J,J=Qe),fe=hn(U,J),xd(this,fe,S),this}}function xd(S,P,U,J){var fe=P._milliseconds,Qe=kc(P._days),Wt=kc(P._months);S.isValid()&&(J=J??!0,Wt&&Jl(S,Js(S,"Month")+Wt*U),Qe&&td(S,"Date",Js(S,"Date")+Qe*U),fe&&S._d.setTime(S._d.valueOf()+fe*U),J&&e.updateOffset(S,Qe||Wt))}var Gl=xa(1,"add"),bd=xa(-1,"subtract");function Fd(S){return typeof S=="string"||S instanceof String}function ss(S){return A(S)||c(S)||Fd(S)||l(S)||Vf(S)||hu(S)||S===null||S===void 0}function hu(S){var P=r(S)&&!o(S),U=!1,J=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],fe,Qe,Wt=J.length;for(fe=0;fe<Wt;fe+=1)Qe=J[fe],U=U||s(S,Qe);return P&&U}function Vf(S){var P=i(S),U=!1;return P&&(U=S.filter(function(J){return!l(J)&&Fd(S)}).length===0),P&&U}function Bf(S){var P=r(S)&&!o(S),U=!1,J=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],fe,Qe;for(fe=0;fe<J.length;fe+=1)Qe=J[fe],U=U||s(S,Qe);return P&&U}function K3(S,P){var U=S.diff(P,"days",!0);return U<-6?"sameElse":U<-1?"lastWeek":U<0?"lastDay":U<1?"sameDay":U<2?"nextDay":U<7?"nextWeek":"sameElse"}function Y3(S,P){arguments.length===1&&(arguments[0]?ss(arguments[0])?(S=arguments[0],P=void 0):Bf(arguments[0])&&(P=arguments[0],S=void 0):(S=void 0,P=void 0));var U=S||Er(),J=ol(U,this).startOf("day"),fe=e.calendarFormat(this,J)||"sameElse",Qe=P&&(ce(P[fe])?P[fe].call(this,U):P[fe]);return this.format(Qe||this.localeData().calendar(fe,this,Er(U)))}function Km(){return new G(this)}function Ym(S,P){var U=A(S)?S:Er(S);return this.isValid()&&U.isValid()?(P=wn(P)||"millisecond",P==="millisecond"?this.valueOf()>U.valueOf():U.valueOf()<this.clone().startOf(P).valueOf()):!1}function Yu(S,P){var U=A(S)?S:Er(S);return this.isValid()&&U.isValid()?(P=wn(P)||"millisecond",P==="millisecond"?this.valueOf()<U.valueOf():this.clone().endOf(P).valueOf()<U.valueOf()):!1}function mp(S,P,U,J){var fe=A(S)?S:Er(S),Qe=A(P)?P:Er(P);return this.isValid()&&fe.isValid()&&Qe.isValid()?(J=J||"()",(J[0]==="("?this.isAfter(fe,U):!this.isBefore(fe,U))&&(J[1]===")"?this.isBefore(Qe,U):!this.isAfter(Qe,U))):!1}function L2(S,P){var U=A(S)?S:Er(S),J;return this.isValid()&&U.isValid()?(P=wn(P)||"millisecond",P==="millisecond"?this.valueOf()===U.valueOf():(J=U.valueOf(),this.clone().startOf(P).valueOf()<=J&&J<=this.clone().endOf(P).valueOf())):!1}function um(S,P){return this.isSame(S,P)||this.isAfter(S,P)}function qm(S,P){return this.isSame(S,P)||this.isBefore(S,P)}function u0(S,P,U){var J,fe,Qe;if(!this.isValid())return NaN;if(J=ol(S,this),!J.isValid())return NaN;switch(fe=(J.utcOffset()-this.utcOffset())*6e4,P=wn(P),P){case"year":Qe=Kh(this,J)/12;break;case"month":Qe=Kh(this,J);break;case"quarter":Qe=Kh(this,J)/3;break;case"second":Qe=(this-J)/1e3;break;case"minute":Qe=(this-J)/6e4;break;case"hour":Qe=(this-J)/36e5;break;case"day":Qe=(this-J-fe)/864e5;break;case"week":Qe=(this-J-fe)/6048e5;break;default:Qe=this-J}return U?Qe:ja(Qe)}function Kh(S,P){if(S.date()<P.date())return-Kh(P,S);var U=(P.year()-S.year())*12+(P.month()-S.month()),J=S.clone().add(U,"months"),fe,Qe;return P-J<0?(fe=S.clone().add(U-1,"months"),Qe=(P-J)/(J-fe)):(fe=S.clone().add(U+1,"months"),Qe=(P-J)/(fe-J)),-(U+Qe)||0}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function q3(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Zm(S){if(!this.isValid())return null;var P=S!==!0,U=P?this.clone().utc():this;return U.year()<0||U.year()>9999?Re(U,P?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ce(Date.prototype.toISOString)?P?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Re(U,"Z")):Re(U,P?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Yh(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var S="moment",P="",U,J,fe,Qe;return this.isLocal()||(S=this.utcOffset()===0?"moment.utc":"moment.parseZone",P="Z"),U="["+S+'("]',J=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",fe="-MM-DD[T]HH:mm:ss.SSS",Qe=P+'[")]',this.format(U+J+fe+Qe)}function A1(S){S||(S=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var P=Re(this,S);return this.localeData().postformat(P)}function Yg(S,P){return this.isValid()&&(A(S)&&S.isValid()||Er(S).isValid())?hn({to:this,from:S}).locale(this.locale()).humanize(!P):this.localeData().invalidDate()}function hv(S){return this.from(Er(),S)}function J6(S,P){return this.isValid()&&(A(S)&&S.isValid()||Er(S).isValid())?hn({from:this,to:S}).locale(this.locale()).humanize(!P):this.localeData().invalidDate()}function zf(S){return this.to(Er(),S)}function ph(S){var P;return S===void 0?this._locale._abbr:(P=kt(S),P!=null&&(this._locale=P),this)}var La=X("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(S){return S===void 0?this.localeData():this.locale(S)});function T(){return this._locale}var N=1e3,Z=60*N,ue=60*Z,Pe=(365*400+97)*24*ue;function st(S,P){return(S%P+P)%P}function ti(S,P,U){return S<100&&S>=0?new Date(S+400,P,U)-Pe:new Date(S,P,U).valueOf()}function Ei(S,P,U){return S<100&&S>=0?Date.UTC(S+400,P,U)-Pe:Date.UTC(S,P,U)}function Ui(S){var P,U;if(S=wn(S),S===void 0||S==="millisecond"||!this.isValid())return this;switch(U=this._isUTC?Ei:ti,S){case"year":P=U(this.year(),0,1);break;case"quarter":P=U(this.year(),this.month()-this.month()%3,1);break;case"month":P=U(this.year(),this.month(),1);break;case"week":P=U(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":P=U(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":P=U(this.year(),this.month(),this.date());break;case"hour":P=this._d.valueOf(),P-=st(P+(this._isUTC?0:this.utcOffset()*Z),ue);break;case"minute":P=this._d.valueOf(),P-=st(P,Z);break;case"second":P=this._d.valueOf(),P-=st(P,N);break}return this._d.setTime(P),e.updateOffset(this,!0),this}function On(S){var P,U;if(S=wn(S),S===void 0||S==="millisecond"||!this.isValid())return this;switch(U=this._isUTC?Ei:ti,S){case"year":P=U(this.year()+1,0,1)-1;break;case"quarter":P=U(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":P=U(this.year(),this.month()+1,1)-1;break;case"week":P=U(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":P=U(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":P=U(this.year(),this.month(),this.date()+1)-1;break;case"hour":P=this._d.valueOf(),P+=ue-st(P+(this._isUTC?0:this.utcOffset()*Z),ue)-1;break;case"minute":P=this._d.valueOf(),P+=Z-st(P,Z)-1;break;case"second":P=this._d.valueOf(),P+=N-st(P,N)-1;break}return this._d.setTime(P),e.updateOffset(this,!0),this}function Wr(){return this._d.valueOf()-(this._offset||0)*6e4}function $s(){return Math.floor(this.valueOf()/1e3)}function qo(){return new Date(this.valueOf())}function q(){var S=this;return[S.year(),S.month(),S.date(),S.hour(),S.minute(),S.second(),S.millisecond()]}function oe(){var S=this;return{years:S.year(),months:S.month(),date:S.date(),hours:S.hours(),minutes:S.minutes(),seconds:S.seconds(),milliseconds:S.milliseconds()}}function he(){return this.isValid()?this.toISOString():null}function de(){return D(this)}function De(){return u({},_(this))}function Le(){return _(this).overflow}function xt(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}at("N",0,0,"eraAbbr"),at("NN",0,0,"eraAbbr"),at("NNN",0,0,"eraAbbr"),at("NNNN",0,0,"eraName"),at("NNNNN",0,0,"eraNarrow"),at("y",["y",1],"yo","eraYear"),at("y",["yy",2],0,"eraYear"),at("y",["yyy",3],0,"eraYear"),at("y",["yyyy",4],0,"eraYear"),$i("N",hr),$i("NN",hr),$i("NNN",hr),$i("NNNN",h0),$i("NNNNN",M_),ds(["N","NN","NNN","NNNN","NNNNN"],function(S,P,U,J){var fe=U._locale.erasParse(S,J,U._strict);fe?_(U).era=fe:_(U).invalidEra=S}),$i("y",qa),$i("yy",qa),$i("yyy",qa),$i("yyyy",qa),$i("yo",k_),ds(["y","yy","yyy","yyyy"],Qs),ds(["yo"],function(S,P,U,J){var fe;U._locale._eraYearOrdinalRegex&&(fe=S.match(U._locale._eraYearOrdinalRegex)),U._locale.eraYearOrdinalParse?P[Qs]=U._locale.eraYearOrdinalParse(S,fe):P[Qs]=parseInt(S,10)});function Dt(S,P){var U,J,fe,Qe=this._eras||kt("en")._eras;for(U=0,J=Qe.length;U<J;++U){switch(typeof Qe[U].since){case"string":fe=e(Qe[U].since).startOf("day"),Qe[U].since=fe.valueOf();break}switch(typeof Qe[U].until){case"undefined":Qe[U].until=1/0;break;case"string":fe=e(Qe[U].until).startOf("day").valueOf(),Qe[U].until=fe.valueOf();break}}return Qe}function Ut(S,P,U){var J,fe,Qe=this.eras(),Wt,rn,ar;for(S=S.toUpperCase(),J=0,fe=Qe.length;J<fe;++J)if(Wt=Qe[J].name.toUpperCase(),rn=Qe[J].abbr.toUpperCase(),ar=Qe[J].narrow.toUpperCase(),U)switch(P){case"N":case"NN":case"NNN":if(rn===S)return Qe[J];break;case"NNNN":if(Wt===S)return Qe[J];break;case"NNNNN":if(ar===S)return Qe[J];break}else if([Wt,rn,ar].indexOf(S)>=0)return Qe[J]}function Jt(S,P){var U=S.since<=S.until?1:-1;return P===void 0?e(S.since).year():e(S.since).year()+(P-S.offset)*U}function gi(){var S,P,U,J=this.localeData().eras();for(S=0,P=J.length;S<P;++S)if(U=this.clone().startOf("day").valueOf(),J[S].since<=U&&U<=J[S].until||J[S].until<=U&&U<=J[S].since)return J[S].name;return""}function Si(){var S,P,U,J=this.localeData().eras();for(S=0,P=J.length;S<P;++S)if(U=this.clone().startOf("day").valueOf(),J[S].since<=U&&U<=J[S].until||J[S].until<=U&&U<=J[S].since)return J[S].narrow;return""}function Tr(){var S,P,U,J=this.localeData().eras();for(S=0,P=J.length;S<P;++S)if(U=this.clone().startOf("day").valueOf(),J[S].since<=U&&U<=J[S].until||J[S].until<=U&&U<=J[S].since)return J[S].abbr;return""}function ae(){var S,P,U,J,fe=this.localeData().eras();for(S=0,P=fe.length;S<P;++S)if(U=fe[S].since<=fe[S].until?1:-1,J=this.clone().startOf("day").valueOf(),fe[S].since<=J&&J<=fe[S].until||fe[S].until<=J&&J<=fe[S].since)return(this.year()-e(fe[S].since).year())*U+fe[S].offset;return this.year()}function Ds(S){return s(this,"_erasNameRegex")||qu.call(this),S?this._erasNameRegex:this._erasRegex}function lo(S){return s(this,"_erasAbbrRegex")||qu.call(this),S?this._erasAbbrRegex:this._erasRegex}function Zo(S){return s(this,"_erasNarrowRegex")||qu.call(this),S?this._erasNarrowRegex:this._erasRegex}function hr(S,P){return P.erasAbbrRegex(S)}function h0(S,P){return P.erasNameRegex(S)}function M_(S,P){return P.erasNarrowRegex(S)}function k_(S,P){return P._eraYearOrdinalRegex||qa}function qu(){var S=[],P=[],U=[],J=[],fe,Qe,Wt,rn,ar,Xr=this.eras();for(fe=0,Qe=Xr.length;fe<Qe;++fe)Wt=Tl(Xr[fe].name),rn=Tl(Xr[fe].abbr),ar=Tl(Xr[fe].narrow),P.push(Wt),S.push(rn),U.push(ar),J.push(Wt),J.push(rn),J.push(ar);this._erasRegex=new RegExp("^("+J.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+P.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+S.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+U.join("|")+")","i")}at(0,["gg",2],0,function(){return this.weekYear()%100}),at(0,["GG",2],0,function(){return this.isoWeekYear()%100});function p0(S,P){at(0,[S,S.length],0,P)}p0("gggg","weekYear"),p0("ggggg","weekYear"),p0("GGGG","isoWeekYear"),p0("GGGGG","isoWeekYear"),$i("G",Nl),$i("g",Nl),$i("GG",Zn,kn),$i("gg",Zn,kn),$i("GGGG",Xs,ea),$i("gggg",Xs,ea),$i("GGGGG",Ya,co),$i("ggggg",Ya,co),_a(["gggg","ggggg","GGGG","GGGGG"],function(S,P,U,J){P[J.substr(0,2)]=Dr(S)}),_a(["gg","GG"],function(S,P,U,J){P[J]=e.parseTwoDigitYear(S)});function I_(S){return zC.call(this,S,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Kd(S){return zC.call(this,S,this.isoWeek(),this.isoWeekday(),1,4)}function A_(){return ba(this.year(),1,4)}function O2(){return ba(this.isoWeekYear(),1,4)}function fp(){var S=this.localeData()._week;return ba(this.year(),S.dow,S.doy)}function xS(){var S=this.localeData()._week;return ba(this.weekYear(),S.dow,S.doy)}function zC(S,P,U,J,fe){var Qe;return S==null?bo(this,J,fe).year:(Qe=ba(S,J,fe),P>Qe&&(P=Qe),bS.call(this,S,P,U,J,fe))}function bS(S,P,U,J,fe){var Qe=yd(S,P,U,J,fe),Wt=Bc(Qe.year,0,Qe.dayOfYear);return this.year(Wt.getUTCFullYear()),this.month(Wt.getUTCMonth()),this.date(Wt.getUTCDate()),this}at("Q",0,"Qo","quarter"),$i("Q",Ho),ds("Q",function(S,P){P[Nr]=(Dr(S)-1)*3});function wS(S){return S==null?Math.ceil((this.month()+1)/3):this.month((S-1)*3+this.month()%3)}at("D",["DD",2],"Do","date"),$i("D",Zn,aa),$i("DD",Zn,kn),$i("Do",function(S,P){return S?P._dayOfMonthOrdinalParse||P._ordinalParse:P._dayOfMonthOrdinalParseLenient}),ds(["D","DD"],Ql),ds("Do",function(S,P){P[Ql]=Dr(S.match(Zn)[0])});var HC=Mo("Date",!0);at("DDD",["DDDD",3],"DDDo","dayOfYear"),$i("DDD",Xl),$i("DDDD",Ts),ds(["DDD","DDDD"],function(S,P,U){U._dayOfYear=Dr(S)});function gp(S){var P=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return S==null?P:this.add(S-P,"d")}at("m",["mm",2],0,"minute"),$i("m",Zn,jd),$i("mm",Zn,kn),ds(["m","mm"],Ra);var SS=Mo("Minutes",!1);at("s",["ss",2],0,"second"),$i("s",Zn,jd),$i("ss",Zn,kn),ds(["s","ss"],Ta);var TS=Mo("Seconds",!1);at("S",0,0,function(){return~~(this.millisecond()/100)}),at(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),at(0,["SSS",3],0,"millisecond"),at(0,["SSSS",4],0,function(){return this.millisecond()*10}),at(0,["SSSSS",5],0,function(){return this.millisecond()*100}),at(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),at(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),at(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),at(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),$i("S",Xl,Ho),$i("SS",Xl,kn),$i("SSS",Xl,Ts);var hm,GC;for(hm="SSSS";hm.length<=9;hm+="S")$i(hm,qa);function DS(S,P){P[$a]=Dr(("0."+S)*1e3)}for(hm="S";hm.length<=9;hm+="S")ds(hm,DS);GC=Mo("Milliseconds",!1),at("z",0,0,"zoneAbbr"),at("zz",0,0,"zoneName");function Hf(){return this._isUTC?"UTC":""}function ES(){return this._isUTC?"Coordinated Universal Time":""}var xi=G.prototype;xi.add=Gl,xi.calendar=Y3,xi.clone=Km,xi.diff=u0,xi.endOf=On,xi.format=A1,xi.from=Yg,xi.fromNow=hv,xi.to=J6,xi.toNow=zf,xi.get=Ec,xi.invalidAt=Le,xi.isAfter=Ym,xi.isBefore=Yu,xi.isBetween=mp,xi.isSame=L2,xi.isSameOrAfter=um,xi.isSameOrBefore=qm,xi.isValid=de,xi.lang=La,xi.locale=ph,xi.localeData=T,xi.max=uu,xi.min=yo,xi.parsingFlags=De,xi.set=Wh,xi.startOf=Ui,xi.subtract=bd,xi.toArray=q,xi.toObject=oe,xi.toDate=qo,xi.toISOString=Zm,xi.inspect=Yh,typeof Symbol<"u"&&Symbol.for!=null&&(xi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),xi.toJSON=he,xi.toString=q3,xi.unix=$s,xi.valueOf=Wr,xi.creationData=xt,xi.eraName=gi,xi.eraNarrow=Si,xi.eraAbbr=Tr,xi.eraYear=ae,xi.year=Hs,xi.isLeapYear=Eo,xi.weekYear=I_,xi.isoWeekYear=Kd,xi.quarter=xi.quarters=wS,xi.month=Du,xi.daysInMonth=uo,xi.week=xi.weeks=Pd,xi.isoWeek=xi.isoWeeks=ju,xi.weeksInYear=fp,xi.weeksInWeekYear=xS,xi.isoWeeksInYear=A_,xi.isoWeeksInISOWeekYear=O2,xi.date=HC,xi.day=xi.days=nd,xi.weekday=D1,xi.isoWeekday=Lf,xi.dayOfYear=gp,xi.hour=xi.hours=la,xi.minute=xi.minutes=SS,xi.second=xi.seconds=TS,xi.millisecond=xi.milliseconds=GC,xi.utcOffset=F2,xi.utc=q0,xi.local=Mt,xi.parseZone=li,xi.hasAlignedHourOffset=wi,xi.isDST=Fe,xi.isLocal=ht,xi.isUtcOffset=ci,xi.isUtc=Ni,xi.isUTC=Ni,xi.zoneAbbr=Hf,xi.zoneName=ES,xi.dates=X("dates accessor is deprecated. Use date instead.",HC),xi.months=X("months accessor is deprecated. Use month instead",Du),xi.years=X("years accessor is deprecated. Use year instead",Hs),xi.zone=X("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",I1),xi.isDSTShifted=X("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",dt);function ku(S){return Er(S*1e3)}function MS(){return Er.apply(null,arguments).parseZone()}function WC(S){return S}var Vs=Se.prototype;Vs.calendar=Ge,Vs.longDateFormat=zt,Vs.invalidDate=ui,Vs.ordinal=Rn,Vs.preparse=WC,Vs.postformat=WC,Vs.relativeTime=Mn,Vs.pastFuture=Fn,Vs.set=ie,Vs.eras=Dt,Vs.erasParse=Ut,Vs.erasConvertYear=Jt,Vs.erasAbbrRegex=lo,Vs.erasNameRegex=Ds,Vs.erasNarrowRegex=Zo,Vs.months=ia,Vs.monthsShort=Fa,Vs.monthsParse=vl,Vs.monthsRegex=Bp,Vs.monthsShortRegex=yl,Vs.week=Bl,Vs.firstDayOfYear=mc,Vs.firstDayOfWeek=dh,Vs.weekdays=rl,Vs.weekdaysMin=Gp,Vs.weekdaysShort=pp,Vs.weekdaysParse=jm,Vs.weekdaysRegex=Yr,Vs.weekdaysShortRegex=ps,Vs.weekdaysMinRegex=$m,Vs.isPM=M1,Vs.meridiem=oc;function Z3(S,P,U,J){var fe=kt(),Qe=m().set(J,P);return fe[U](Qe,S)}function UC(S,P,U){if(l(S)&&(P=S,S=void 0),S=S||"",P!=null)return Z3(S,P,U,"month");var J,fe=[];for(J=0;J<12;J++)fe[J]=Z3(S,J,U,"month");return fe}function X3(S,P,U,J){typeof S=="boolean"?(l(P)&&(U=P,P=void 0),P=P||""):(P=S,U=P,S=!1,l(P)&&(U=P,P=void 0),P=P||"");var fe=kt(),Qe=S?fe._week.dow:0,Wt,rn=[];if(U!=null)return Z3(P,(U+Qe)%7,J,"day");for(Wt=0;Wt<7;Wt++)rn[Wt]=Z3(P,(Wt+Qe)%7,J,"day");return rn}function jC(S,P){return UC(S,P,"months")}function kS(S,P){return UC(S,P,"monthsShort")}function IS(S,P,U){return X3(S,P,U,"weekdays")}function ey(S,P,U){return X3(S,P,U,"weekdaysShort")}function N2(S,P,U){return X3(S,P,U,"weekdaysMin")}He("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(S){var P=S%10,U=Dr(S%100/10)===1?"th":P===1?"st":P===2?"nd":P===3?"rd":"th";return S+U}}),e.lang=X("moment.lang is deprecated. Use moment.locale instead.",He),e.langData=X("moment.langData is deprecated. Use moment.localeData instead.",kt);var Yd=Math.abs;function AS(){var S=this._data;return this._milliseconds=Yd(this._milliseconds),this._days=Yd(this._days),this._months=Yd(this._months),S.milliseconds=Yd(S.milliseconds),S.seconds=Yd(S.seconds),S.minutes=Yd(S.minutes),S.hours=Yd(S.hours),S.months=Yd(S.months),S.years=Yd(S.years),this}function ty(S,P,U,J){var fe=hn(P,U);return S._milliseconds+=J*fe._milliseconds,S._days+=J*fe._days,S._months+=J*fe._months,S._bubble()}function PS(S,P){return ty(this,S,P,1)}function vp(S,P){return ty(this,S,P,-1)}function Q3(S){return S<0?Math.floor(S):Math.ceil(S)}function Gf(){var S=this._milliseconds,P=this._days,U=this._months,J=this._data,fe,Qe,Wt,rn,ar;return S>=0&&P>=0&&U>=0||S<=0&&P<=0&&U<=0||(S+=Q3(iy(U)+P)*864e5,P=0,U=0),J.milliseconds=S%1e3,fe=ja(S/1e3),J.seconds=fe%60,Qe=ja(fe/60),J.minutes=Qe%60,Wt=ja(Qe/60),J.hours=Wt%24,P+=ja(Wt/24),ar=ja(wd(P)),U+=ar,P-=Q3(iy(ar)),rn=ja(U/12),U%=12,J.days=P,J.months=U,J.years=rn,this}function wd(S){return S*4800/146097}function iy(S){return S*146097/4800}function $C(S){if(!this.isValid())return NaN;var P,U,J=this._milliseconds;if(S=wn(S),S==="month"||S==="quarter"||S==="year")switch(P=this._days+J/864e5,U=this._months+wd(P),S){case"month":return U;case"quarter":return U/3;case"year":return U/12}else switch(P=this._days+Math.round(iy(this._months)),S){case"week":return P/7+J/6048e5;case"day":return P+J/864e5;case"hour":return P*24+J/36e5;case"minute":return P*1440+J/6e4;case"second":return P*86400+J/1e3;case"millisecond":return Math.floor(P*864e5)+J;default:throw new Error("Unknown unit "+S)}}function mh(S){return function(){return this.as(S)}}var m0=mh("ms"),pm=mh("s"),KC=mh("m"),RS=mh("h"),J3=mh("d"),FS=mh("w"),YC=mh("M"),Rl=mh("Q"),ny=mh("y"),qC=m0;function fh(){return hn(this)}function ry(S){return S=wn(S),this.isValid()?this[S+"s"]():NaN}function gh(S){return function(){return this.isValid()?this._data[S]:NaN}}var Wf=gh("milliseconds"),ZC=gh("seconds"),vc=gh("minutes"),sy=gh("hours"),LS=gh("days"),OS=gh("months"),NS=gh("years");function oy(){return ja(this.days()/7)}var yp=Math.round,vh={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function XC(S,P,U,J,fe){return fe.relativeTime(P||1,!!U,S,J)}function VS(S,P,U,J){var fe=hn(S).abs(),Qe=yp(fe.as("s")),Wt=yp(fe.as("m")),rn=yp(fe.as("h")),ar=yp(fe.as("d")),Xr=yp(fe.as("M")),yc=yp(fe.as("w")),yh=yp(fe.as("y")),_p=Qe<=U.ss&&["s",Qe]||Qe<U.s&&["ss",Qe]||Wt<=1&&["m"]||Wt<U.m&&["mm",Wt]||rn<=1&&["h"]||rn<U.h&&["hh",rn]||ar<=1&&["d"]||ar<U.d&&["dd",ar];return U.w!=null&&(_p=_p||yc<=1&&["w"]||yc<U.w&&["ww",yc]),_p=_p||Xr<=1&&["M"]||Xr<U.M&&["MM",Xr]||yh<=1&&["y"]||["yy",yh],_p[2]=P,_p[3]=+S>0,_p[4]=J,XC.apply(null,_p)}function BS(S){return S===void 0?yp:typeof S=="function"?(yp=S,!0):!1}function V2(S,P){return vh[S]===void 0?!1:P===void 0?vh[S]:(vh[S]=P,S==="s"&&(vh.ss=P-1),!0)}function zS(S,P){if(!this.isValid())return this.localeData().invalidDate();var U=!1,J=vh,fe,Qe;return typeof S=="object"&&(P=S,S=!1),typeof S=="boolean"&&(U=S),typeof P=="object"&&(J=Object.assign({},vh,P),P.s!=null&&P.ss==null&&(J.ss=P.s-1)),fe=this.localeData(),Qe=VS(this,!U,J,fe),U&&(Qe=fe.pastFuture(+this,Qe)),fe.postformat(Qe)}var ay=Math.abs;function mm(S){return(S>0)-(S<0)||+S}function B2(){if(!this.isValid())return this.localeData().invalidDate();var S=ay(this._milliseconds)/1e3,P=ay(this._days),U=ay(this._months),J,fe,Qe,Wt,rn=this.asSeconds(),ar,Xr,yc,yh;return rn?(J=ja(S/60),fe=ja(J/60),S%=60,J%=60,Qe=ja(U/12),U%=12,Wt=S?S.toFixed(3).replace(/\.?0+$/,""):"",ar=rn<0?"-":"",Xr=mm(this._months)!==mm(rn)?"-":"",yc=mm(this._days)!==mm(rn)?"-":"",yh=mm(this._milliseconds)!==mm(rn)?"-":"",ar+"P"+(Qe?Xr+Qe+"Y":"")+(U?Xr+U+"M":"")+(P?yc+P+"D":"")+(fe||J||S?"T":"")+(fe?yh+fe+"H":"")+(J?yh+J+"M":"")+(S?yh+Wt+"S":"")):"P0D"}var xs=$h.prototype;xs.isValid=Nf,xs.abs=AS,xs.add=PS,xs.subtract=vp,xs.as=$C,xs.asMilliseconds=m0,xs.asSeconds=pm,xs.asMinutes=KC,xs.asHours=RS,xs.asDays=J3,xs.asWeeks=FS,xs.asMonths=YC,xs.asQuarters=Rl,xs.asYears=ny,xs.valueOf=qC,xs._bubble=Gf,xs.clone=fh,xs.get=ry,xs.milliseconds=Wf,xs.seconds=ZC,xs.minutes=vc,xs.hours=sy,xs.days=LS,xs.weeks=oy,xs.months=OS,xs.years=NS,xs.humanize=zS,xs.toISOString=B2,xs.toString=B2,xs.toJSON=B2,xs.locale=ph,xs.localeData=T,xs.toIsoString=X("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",B2),xs.lang=La,at("X",0,0,"unix"),at("x",0,0,"valueOf"),$i("x",Nl),$i("X",Rf),ds("X",function(S,P,U){U._d=new Date(parseFloat(S)*1e3)}),ds("x",function(S,P,U){U._d=new Date(Dr(S))});return e.version="2.30.1",n(Er),e.fn=xi,e.min=Mu,e.max=Of,e.now=K0,e.utc=m,e.unix=ku,e.months=jC,e.isDate=c,e.locale=He,e.invalid=E,e.duration=hn,e.isMoment=A,e.weekdays=IS,e.parseZone=MS,e.localeData=kt,e.isDuration=_l,e.monthsShort=kS,e.weekdaysMin=N2,e.defineLocale=Ne,e.updateLocale=ct,e.locales=Ht,e.weekdaysShort=ey,e.normalizeUnits=wn,e.relativeTimeRounding=BS,e.relativeTimeThreshold=V2,e.calendarFormat=K3,e.prototype=xi,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});var pPe=xr((Vpe,hPe)=>{(function(t,e){typeof Vpe=="object"&&typeof hPe<"u"&&typeof s4=="function"?e(zk()):typeof define=="function"&&define.amd?define(["../moment"],e):e(t.moment)})(Vpe,function(t){"use strict";function e(i,r,s,o){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[i+" Tage",i+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[i+" Monate",i+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[i+" Jahre",i+" Jahren"]};return r?a[s][0]:a[s][1]}var n=t.defineLocale("de",{months:"Januar_Februar_M\xE4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xE4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n})});var fPe=xr((Bpe,mPe)=>{(function(t,e){typeof Bpe=="object"&&typeof mPe<"u"&&typeof s4=="function"?e(zk()):typeof define=="function"&&define.amd?define(["../moment"],e):e(t.moment)})(Bpe,function(t){"use strict";var e=t.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(n){var i=n%10,r=~~(n%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return n+r},week:{dow:1,doy:4}});return e})});var gPe,cr,Nu=Q(()=>{zn();gPe=Gs(Q9()),cr=(()=>{let e=class e{static toCamelCase(i){return gPe.default.camelCase(i)}static keineUmlaute(i){return i.replaceAll("\xE4","ae").replaceAll("\xF6","oe").replaceAll("\xFC","ue").replaceAll("\xDF","ss").replaceAll("\xC4","Ae").replaceAll("\xD6","Oe").replaceAll("\xDC","Ue")}static nullOrEmpty(i){return typeof i>"u"||typeof i=="string"&&i.length===0||i===null}static notNullOrEmpty(i){return!e.nullOrEmpty(i)}static camelCaseToDash(i){return i.substring(0,1).toLowerCase()+i.substring(1).replace(/([A-Z])/g,r=>`-${r[0].toLowerCase()}`)}static escapeRegExp(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static fill(i,r,s,o=!0){if(!s)return i;let a=0;for(;i.length<r;)if(o?i+=s:i=s+i,a>200)throw Error("max fill reached [length: "+i.length+"] [fillWith: "+s+"] [fillOnEnd: "+o+"]");return i}static toUpperCase(i,r,s){let o=i.substr(0,r);return o+=i.substr(r,s).toUpperCase(),o+=i.substr(r+s),o}static trimStart(i,r){return i.startsWith(r)?i.substr(1):i}static includesAll(i,r){return i&&r.filter(s=>i.toLowerCase().includes(s.toLowerCase())).length===r.length}static trimEnd(i,r){return i.endsWith(r)?i.substring(0,i.length-r.length):i}static firstCharUppercase(i){return i.length>0?i.substr(0,1).toUpperCase()+i.substr(1):i.trim()}static toSnakeCase(i){return(i.charAt(0).toLowerCase()+i.slice(1)).replace(/\s/,"_").replace(/[A-Z]/g,r=>`_${r.toLowerCase()}`)}static toJavaScriptVariable(i){return i.charAt(0).toLowerCase()+i.toCamelCase().slice(1)}static escapeForRegExp(i){return i?.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static escapeForRegExReplacement(i){return i.replace(/\$/g,"$$$$")}static decodeHtml(i){return i=i.replaceAll("&lt;","<"),i=i.replaceAll("&gt;",">"),i=i.replaceAll("&quot;",'"'),i=i.replaceAll("&#39;","'"),i=i.replaceAll("&amp;","&"),i}static trimChar(i,r){i=i.trim();let s=0,o=i.length;for(;s<o&&i[s]===r;)console.log("trimChar start"),++s;for(;o>s&&i[o-1]===r;)console.log("trimChar end"),--o;return s>0||o<i.length?i.substring(s,o):i}static test(){let i=e.getNameAttributesByText(`Julian van der Krafft
9.7.84
52064 Aachen`),r=`

test
dfd
`.trimChar(`
`);console.log(r),console.log(r),console.log(r),"/sdfsh$/.[$]ab/.[$]c&".replaceAll("[$]","___")!=="/sdfsh$/.___ab/.___c&"&&console.error("Wrong String.replaceAll Test"),e.toSnakeCase("Villa")!=="villa"&&console.error("Wrong String.toSnakeCase Test")}static getNameAttributesByText(i){let r=["van","von","di","d'","auf","dem","den","Dr.","Prof."],s=/(\d{1,2}\.\d{1,2}\.\d{1,4})/g,o=/\D(\d{5})($|\D)/g,a="",l="",c=[],d=[],u=s.exec(i);u&&u.length>1&&(a=u[1],i=i.replace(a,""),a=Ie.parseTextToBirthday(a).dateFormat("yyyy-MM-dd"));let m=o.exec(i);m&&m.length>1&&(l=m[1],i=i.substring(0,i.indexOf(l)));let f=i.trimChar(`
`).split(" ").map(_=>_.trimChar(`
`).trim()).filter(_=>!!_);for(let[_,x]of f.entries())_+1===f.length?d.push(e.firstCharUppercase(x)):r.includes(x)?d.push(x):c.push(x);return{birthday:a,postalCode:l,givenName:c.join(" "),familyName:d.join(" ")}}static replaceUtf8IsoWrong(i){return i=i.replaceAll("\xC3\xA4","\xE4"),i=i.replaceAll("\xC3\xBC","\xFC"),i=i.replaceAll("\xC3\xB6","\xF6"),i=i.replaceAll("\xC3\u201E","\xC4"),i=i.replaceAll("\xC3\u0153","\xDC"),i=i.replaceAll("\xC3\u2013","\xD6"),i=i.replaceAll("\xC3\u0178","\xDF"),i=i.replaceAll("\xE2\u20AC\u201C","\u20AC"),i=i.replaceAll("\xE2\u201A\xAC\u201C","\u20AC"),i=i.replaceAll("\xC2\xA7\u201C","\xA7"),i}};e.arrowRight="\u279E",e.dot="\u30FB",e.dotSmall="\xB7",e.multiply="\xD7";let t=e;return t})();String.prototype.toCamelCase=function(){return cr.toCamelCase(this)};String.prototype.toSnakeCase=function(){return cr.toSnakeCase(this)};Object.defineProperty(String.prototype,"replaceAll",{configurable:!0,writable:!0,value(t,e){if(e||(e=""),t){let n=cr.escapeForRegExp(t);return this.replace(new RegExp(n,"g"),cr.escapeForRegExReplacement(e))}return this}});Object.defineProperty(String.prototype,"trimChar",{configurable:!0,writable:!0,value(t){return cr.trimChar(this,t)}});Object.defineProperty(String.prototype,"decodeHtml",{configurable:!0,writable:!0,value(){return cr.decodeHtml(this)}});Object.defineProperty(String.prototype,"keineUmlaute",{configurable:!0,writable:!0,value(){return cr.keineUmlaute(this)}});Object.defineProperty(String.prototype,"trimEnd",{configurable:!0,writable:!0,value(t){return cr.trimEnd(this,t)}});Object.defineProperty(String.prototype,"trimStart",{configurable:!0,writable:!0,value(t){return cr.trimStart(this,t)}});Object.defineProperty(String.prototype,"includesAll",{configurable:!0,writable:!0,value(t){return cr.includesAll(this,t)}});Object.defineProperty(String.prototype,"fill",{configurable:!0,writable:!0,value(t,e,n=!0){return cr.fill(this,t,e,n)}});Object.defineProperty(Number.prototype,"fill",{configurable:!0,writable:!0,value(t,e,n=!0){return cr.fill(this.toString(),t,e,n)}})});var Gpe=xr((zpe,Hpe)=>{(function(t,e){if(typeof define=="function"&&define.amd)define(["moment"],e);else if(typeof zpe=="object")try{Hpe.exports=e(Jm())}catch{Hpe.exports=e}t&&(t.momentDurationFormatSetup=t.moment?e(t.moment):e)})(zpe,function(t){var e=!1,n=!1,i=!1,r=!1,s="escape years months weeks days hours minutes seconds milliseconds general".split(" "),o=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function a(_t,Re){return Re.length>_t.length?!1:_t.indexOf(Re)!==-1}function l(_t){for(var Re="";_t;)Re+="0",_t-=1;return Re}function c(_t){for(var Re=_t.split("").reverse(),ot=0,jt=!0;jt&&ot<Re.length;)ot?Re[ot]==="9"?Re[ot]="0":(Re[ot]=(parseInt(Re[ot],10)+1).toString(),jt=!1):(parseInt(Re[ot],10)<5&&(jt=!1),Re[ot]="0"),ot+=1;return jt&&Re.push("1"),Re.reverse().join("")}function d(_t,Re){var ot=G(le(Re).sort(),function(zt){return zt+":"+Re[zt]}).join(","),jt=_t+"+"+ot;return d.cache[jt]||(d.cache[jt]=Intl.NumberFormat(_t,Re)),d.cache[jt]}d.cache={};function u(_t,Re,ot){var jt=Re.useToLocaleString,zt=Re.useGrouping,qt=zt&&Re.grouping.slice(),ui=Re.maximumSignificantDigits,_i=Re.minimumIntegerDigits||1,ln=Re.fractionDigits||0,Rn=Re.groupingSeparator,bi=Re.decimalSeparator;if(jt&&ot){var Mn={minimumIntegerDigits:_i,useGrouping:zt};if(ln&&(Mn.maximumFractionDigits=ln,Mn.minimumFractionDigits=ln),ui&&_t>0&&(Mn.maximumSignificantDigits=ui),i){if(!r){var Fn=ie({},Re);Fn.useGrouping=!1,Fn.decimalSeparator=".",_t=parseFloat(u(_t,Fn),10)}return d(ot,Mn).format(_t)}else{if(!n){var Fn=ie({},Re);Fn.useGrouping=!1,Fn.decimalSeparator=".",_t=parseFloat(u(_t,Fn),10)}return _t.toLocaleString(ot,Mn)}}var or;ui?or=_t.toPrecision(ui+1):or=_t.toFixed(ln+1);var wn,gn,ts,no=or.split("e");ts=no[1]||"",no=no[0].split("."),gn=no[1]||"",wn=no[0]||"";var Ho=wn.length,kn=gn.length,Ts=Ho+kn,ea=wn+gn;(ui&&Ts===ui+1||!ui&&kn===ln+1)&&(ea=c(ea),ea.length===Ts+1&&(Ho=Ho+1),kn&&(ea=ea.slice(0,-1)),wn=ea.slice(0,Ho),gn=ea.slice(Ho)),ui&&(gn=gn.replace(/0*$/,""));var co=parseInt(ts,10);co>0?gn.length<=co?(gn=gn+l(co-gn.length),wn=wn+gn,gn=""):(wn=wn+gn.slice(0,co),gn=gn.slice(co)):co<0&&(gn=l(Math.abs(co)-wn.length)+wn+gn,wn="0"),ui||(gn=gn.slice(0,ln),gn.length<ln&&(gn=gn+l(ln-gn.length)),wn.length<_i&&(wn=l(_i-wn.length)+wn));var Zn="";if(zt){no=wn;for(var gl;no.length;)qt.length&&(gl=qt.shift()),Zn&&(Zn=Rn+Zn),Zn=no.slice(-gl)+Zn,no=no.slice(0,-gl)}else Zn=wn;return gn&&(Zn=Zn+bi+gn),Zn}function m(_t,Re){return _t.label.length>Re.label.length?-1:_t.label.length<Re.label.length?1:0}function f(_t,Re){var ot=[];return z(le(Re),function(jt){if(jt.slice(0,15)==="_durationLabels"){var zt=jt.slice(15).toLowerCase();z(le(Re[jt]),function(qt){qt.slice(0,1)===_t&&ot.push({type:zt,key:qt,label:Re[jt][qt]})})}}),ot}function _(_t,Re,ot){return Re===1&&ot===null?_t:_t+_t}var x={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:_};function D(_t){return Object.prototype.toString.call(_t)==="[object Array]"}function E(_t){return Object.prototype.toString.call(_t)==="[object Object]"}function M(_t,Re){for(var ot=_t.length;ot-=1;)if(Re(_t[ot]))return _t[ot]}function I(_t,Re){var ot=0,jt=_t&&_t.length||0,zt;for(typeof Re!="function"&&(zt=Re,Re=function(qt){return qt===zt});ot<jt;){if(Re(_t[ot]))return _t[ot];ot+=1}}function z(_t,Re){var ot=0,jt=_t.length;if(!(!_t||!jt))for(;ot<jt;){if(Re(_t[ot],ot)===!1)return;ot+=1}}function G(_t,Re){var ot=0,jt=_t.length,zt=[];if(!_t||!jt)return zt;for(;ot<jt;)zt[ot]=Re(_t[ot],ot),ot+=1;return zt}function A(_t,Re){return G(_t,function(ot){return ot[Re]})}function Y(_t){var Re=[];return z(_t,function(ot){ot&&Re.push(ot)}),Re}function X(_t){var Re=[];return z(_t,function(ot){I(Re,ot)||Re.push(ot)}),Re}function ne(_t,Re){var ot=[];return z(_t,function(jt){z(Re,function(zt){jt===zt&&ot.push(jt)})}),X(ot)}function pe(_t,Re){var ot=[];return z(_t,function(jt,zt){if(!Re(jt))return ot=_t.slice(zt),!1}),ot}function ce(_t,Re){var ot=_t.slice().reverse();return pe(ot,Re).reverse()}function ie(_t,Re){for(var ot in Re)Re.hasOwnProperty(ot)&&(_t[ot]=Re[ot]);return _t}function le(_t){var Re=[];for(var ot in _t)_t.hasOwnProperty(ot)&&Re.push(ot);return Re}function Se(_t,Re){var ot=0,jt=_t.length;if(!_t||!jt)return!1;for(;ot<jt;){if(Re(_t[ot],ot)===!0)return!0;ot+=1}return!1}function je(_t){var Re=[];return z(_t,function(ot){Re=Re.concat(ot)}),Re}function ze(){var _t=0;try{_t.toLocaleString("i")}catch(Re){return Re.name==="RangeError"}return!1}function Ge(_t){return _t(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})==="3.6"}function Ae(_t){var Re=!0;return Re=Re&&_t(1,"en",{minimumIntegerDigits:1})==="1",Re=Re&&_t(1,"en",{minimumIntegerDigits:2})==="01",Re=Re&&_t(1,"en",{minimumIntegerDigits:3})==="001",!(!Re||(Re=Re&&_t(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",Re=Re&&_t(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",Re=Re&&_t(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",Re=Re&&_t(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!Re)||(Re=Re&&_t(99.99,"en",{maximumSignificantDigits:1})==="100",Re=Re&&_t(99.99,"en",{maximumSignificantDigits:2})==="100",Re=Re&&_t(99.99,"en",{maximumSignificantDigits:3})==="100",Re=Re&&_t(99.99,"en",{maximumSignificantDigits:4})==="99.99",Re=Re&&_t(99.99,"en",{maximumSignificantDigits:5})==="99.99",!Re)||(Re=Re&&_t(1e3,"en",{useGrouping:!0})==="1,000",Re=Re&&_t(1e3,"en",{useGrouping:!1})==="1000",!Re))}function Ye(){var _t=[].slice.call(arguments),Re={},ot;if(z(_t,function(ui,_i){if(!_i){if(!D(ui))throw"Expected array as the first argument to durationsFormat.";ot=ui}if(typeof ui=="string"||typeof ui=="function"){Re.template=ui;return}if(typeof ui=="number"){Re.precision=ui;return}E(ui)&&ie(Re,ui)}),!ot||!ot.length)return[];Re.returnMomentTypes=!0;var jt=G(ot,function(ui){return ui.format(Re)}),zt=ne(s,X(A(je(jt),"type"))),qt=Re.largest;return qt&&(zt=zt.slice(0,qt)),Re.returnMomentTypes=!1,Re.outputTypes=zt,G(ot,function(ui){return ui.format(Re)})}function ft(){var _t=[].slice.call(arguments),Re=ie({},this.format.defaults),ot=this.asMilliseconds(),jt=this.asMonths();typeof this.isValid=="function"&&this.isValid()===!1&&(ot=0,jt=0);var zt=ot<0,qt=t.duration(Math.abs(ot),"milliseconds"),ui=t.duration(Math.abs(jt),"months");z(_t,function(Ti){if(typeof Ti=="string"||typeof Ti=="function"){Re.template=Ti;return}if(typeof Ti=="number"){Re.precision=Ti;return}E(Ti)&&ie(Re,Ti)});var _i={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},ln={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};Re.types=s;var Rn=function(Ti){return I(s,function(Hs){return ln[Hs].test(Ti)})},bi=new RegExp(G(s,function(Ti){return ln[Ti].source}).join("|"),"g");Re.duration=this;var Mn=typeof Re.template=="function"?Re.template.apply(Re):Re.template,Fn=Re.outputTypes,or=Re.returnMomentTypes,wn=Re.largest,gn=[];Fn||(D(Re.stopTrim)&&(Re.stopTrim=Re.stopTrim.join("")),Re.stopTrim&&z(Re.stopTrim.match(bi),function(Ti){var Hs=Rn(Ti);Hs==="escape"||Hs==="general"||gn.push(Hs)}));var ts=t.localeData();ts||(ts={}),z(le(x),function(Ti){if(typeof x[Ti]=="function"){ts[Ti]||(ts[Ti]=x[Ti]);return}ts["_"+Ti]||(ts["_"+Ti]=x[Ti])}),z(le(ts._durationTimeTemplates),function(Ti){Mn=Mn.replace("_"+Ti+"_",ts._durationTimeTemplates[Ti])});var no=Re.userLocale||t.locale(),Ho=Re.useLeftUnits,kn=Re.usePlural,Ts=Re.precision,ea=Re.forceLength,co=Re.useGrouping,Zn=Re.trunc,gl=Re.useSignificantDigits&&Ts>0,sc=gl?Re.precision:0,Xl=sc,Xs=Re.minValue,Ya=!1,qa=Re.maxValue,Nl=!1,zh=Re.useToLocaleString,Hh=Re.groupingSeparator,Rf=Re.decimalSeparator,Id=Re.grouping;zh=zh&&(e||i);var aa=Re.trim;D(aa)&&(aa=aa.join(" ")),aa===null&&(wn||qa||gl)&&(aa="all"),(aa===null||aa===!0||aa==="left"||aa==="right")&&(aa="large"),aa===!1&&(aa="");var jd=function(Ti){return Ti.test(aa)},du=/large/,$i=/small/,md=/both/,Vl=/mid/,Tl=/^all|[^sm]all/,ja=/final/,Dr=wn>0||Se([du,md,Tl],jd),Ad=Se([$i,md,Tl],jd),ds=Se([Vl,Tl],jd),_a=Se([ja,Tl],jd),fd=G(Mn.match(bi),function(Ti,Hs){var Eo=Rn(Ti);return Ti.slice(0,1)==="*"&&(Ti=Ti.slice(1),Eo!=="escape"&&Eo!=="general"&&gn.push(Eo)),{index:Hs,length:Ti.length,text:"",token:Eo==="escape"?Ti.replace(ln.escape,"$1"):Ti,type:Eo==="escape"||Eo==="general"?null:Eo}}),fr={index:0,length:0,token:"",text:"",type:null},Qs=[];Ho&&fd.reverse(),z(fd,function(Ti){if(Ti.type){(fr.type||fr.text)&&Qs.push(fr),fr=Ti;return}Ho?fr.text=Ti.token+fr.text:fr.text+=Ti.token}),(fr.type||fr.text)&&Qs.push(fr),Ho&&Qs.reverse();var Nr=ne(s,X(Y(A(Qs,"type"))));if(!Nr.length)return A(Qs,"text").join("");Nr=G(Nr,function(Ti,Hs){var Eo=Hs+1===Nr.length,Mo=!Hs,Js;Ti==="years"||Ti==="months"?Js=ui.as(Ti):Js=qt.as(Ti);var td=Math.floor(Js),Ec=Js-td,Wh=I(Qs,function(gd){return Ti===gd.type});return Mo&&qa&&Js>qa&&(Nl=!0),Eo&&Xs&&Math.abs(Re.duration.as(Ti))<Xs&&(Ya=!0),Mo&&ea===null&&Wh.length>1&&(ea=!0),qt.subtract(td,Ti),ui.subtract(td,Ti),{rawValue:Js,wholeValue:td,decimalValue:Eo?Ec:0,isSmallest:Eo,isLargest:Mo,type:Ti,tokenLength:Wh.length}});var Ql=Zn?Math.floor:Math.round,ro=function(Ti,Hs){var Eo=Math.pow(10,Hs);return Ql(Ti*Eo)/Eo},Ra=!1,Ta=!1,$a=function(Ti,Hs){var Eo={useGrouping:co,groupingSeparator:Hh,decimalSeparator:Rf,grouping:Id,useToLocaleString:zh};return gl&&(sc<=0?(Ti.rawValue=0,Ti.wholeValue=0,Ti.decimalValue=0):(Eo.maximumSignificantDigits=sc,Ti.significantDigits=sc)),Nl&&!Ta&&(Ti.isLargest?(Ti.wholeValue=qa,Ti.decimalValue=0):(Ti.wholeValue=0,Ti.decimalValue=0)),Ya&&!Ta&&(Ti.isSmallest?(Ti.wholeValue=Xs,Ti.decimalValue=0):(Ti.wholeValue=0,Ti.decimalValue=0)),Ti.isSmallest||Ti.significantDigits&&Ti.significantDigits-Ti.wholeValue.toString().length<=0?Ts<0?Ti.value=ro(Ti.wholeValue,Ts):Ts===0?Ti.value=Ql(Ti.wholeValue+Ti.decimalValue):gl?(Zn?Ti.value=ro(Ti.rawValue,sc-Ti.wholeValue.toString().length):Ti.value=Ti.rawValue,Ti.wholeValue&&(sc-=Ti.wholeValue.toString().length)):(Eo.fractionDigits=Ts,Zn?Ti.value=Ti.wholeValue+ro(Ti.decimalValue,Ts):Ti.value=Ti.wholeValue+Ti.decimalValue):gl&&Ti.wholeValue?(Ti.value=Math.round(ro(Ti.wholeValue,Ti.significantDigits-Ti.wholeValue.toString().length)),sc-=Ti.wholeValue.toString().length):Ti.value=Ti.wholeValue,Ti.tokenLength>1&&(ea||Ra)&&(Eo.minimumIntegerDigits=Ti.tokenLength,Ta&&Eo.maximumSignificantDigits<Ti.tokenLength&&delete Eo.maximumSignificantDigits),!Ra&&(Ti.value>0||aa===""||I(gn,Ti.type)||I(Fn,Ti.type))&&(Ra=!0),Ti.formattedValue=u(Ti.value,Eo,no),Eo.useGrouping=!1,Eo.decimalSeparator=".",Ti.formattedValueEn=u(Ti.value,Eo,"en"),Ti.tokenLength===2&&Ti.type==="milliseconds"&&(Ti.formattedValueMS=u(Ti.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),Ti};if(Nr=G(Nr,$a),Nr=Y(Nr),Nr.length>1){var Da=function(Ti){return I(Nr,function(Hs){return Hs.type===Ti})},Gh=function(Ti){var Hs=Da(Ti.type);Hs&&z(Ti.targets,function(Eo){var Mo=Da(Eo.type);Mo&&parseInt(Hs.formattedValueEn,10)===Eo.value&&(Hs.rawValue=0,Hs.wholeValue=0,Hs.decimalValue=0,Mo.rawValue+=1,Mo.wholeValue+=1,Mo.decimalValue=0,Mo.formattedValueEn=Mo.wholeValue.toString(),Ta=!0)})};z(o,Gh)}return Ta&&(Ra=!1,sc=Xl,Nr=G(Nr,$a),Nr=Y(Nr)),Fn&&!(Nl&&!Re.trim)?(Nr=G(Nr,function(Ti){return I(Fn,function(Hs){return Ti.type===Hs})?Ti:null}),Nr=Y(Nr)):(Dr&&(Nr=pe(Nr,function(Ti){return!Ti.isSmallest&&!Ti.wholeValue&&!I(gn,Ti.type)})),wn&&Nr.length&&(Nr=Nr.slice(0,wn)),Ad&&Nr.length>1&&(Nr=ce(Nr,function(Ti){return!Ti.wholeValue&&!I(gn,Ti.type)&&!Ti.isLargest})),ds&&(Nr=G(Nr,function(Ti,Hs){return Hs>0&&Hs<Nr.length-1&&!Ti.wholeValue?null:Ti}),Nr=Y(Nr)),_a&&Nr.length===1&&!Nr[0].wholeValue&&!(!Zn&&Nr[0].isSmallest&&Nr[0].rawValue<Xs)&&(Nr=[])),or?Nr:(z(Qs,function(Ti){var Hs=_i[Ti.type],Eo=I(Nr,function(gd){return gd.type===Ti.type});if(!(!Hs||!Eo)){var Mo=Eo.formattedValueEn.split(".");Mo[0]=parseInt(Mo[0],10),Mo[1]?Mo[1]=parseFloat("0."+Mo[1],10):Mo[1]=null;var Js=ts.durationPluralKey(Hs,Mo[0],Mo[1]),td=f(Hs,ts),Ec=!1,Wh={};z(ts._durationLabelTypes,function(gd){var eo=I(td,function(Tu){return Tu.type===gd.type&&Tu.key===Js});eo&&(Wh[eo.type]=eo.label,a(Ti.text,gd.string)&&(Ti.text=Ti.text.replace(gd.string,eo.label),Ec=!0))}),kn&&!Ec&&(td.sort(m),z(td,function(gd){if(Wh[gd.type]===gd.label)return a(Ti.text,gd.label)?!1:void 0;if(a(Ti.text,gd.label))return Ti.text=Ti.text.replace(gd.label,Wh[gd.type]),!1}))}}),Qs=G(Qs,function(Ti){if(!Ti.type)return Ti.text;var Hs=I(Nr,function(Mo){return Mo.type===Ti.type});if(!Hs)return"";var Eo="";return Ho&&(Eo+=Ti.text),(zt&&Nl||!zt&&Ya)&&(Eo+="< ",Nl=!1,Ya=!1),(zt&&Ya||!zt&&Nl)&&(Eo+="> ",Nl=!1,Ya=!1),zt&&(Hs.value>0||aa===""||I(gn,Hs.type)||I(Fn,Hs.type))&&(Eo+="-",zt=!1),Ti.type==="milliseconds"&&Hs.formattedValueMS?Eo+=Hs.formattedValueMS:Eo+=Hs.formattedValue,Ho||(Eo+=Ti.text),Eo}),Qs.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function Ft(){var _t=this.duration,Re=function(qt){return _t._data[qt]},ot=I(this.types,Re),jt=M(this.types,Re);switch(ot){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(ot===jt)return"d __";case"weeks":return ot===jt?"w __":(this.trim===null&&(this.trim="both"),"w __, d __, h __");case"months":if(ot===jt)return"M __";case"years":return ot===jt?"y __":(this.trim===null&&(this.trim="both"),"y __, M __, d __");default:return this.trim===null&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function Tt(_t){if(!_t)throw"Moment Duration Format init cannot find moment instance.";_t.duration.format=Ye,_t.duration.fn.format=ft,_t.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:Ft,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},_t.updateLocale("en",x)}var at=function(_t,Re,ot){return _t.toLocaleString(Re,ot)};e=ze()&&Ae(at),n=e&&Ge(at);var yt=function(_t,Re,ot){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(Re,ot).format(_t)};return i=Ae(yt),r=i&&Ge(yt),Tt(t),Tt})});var cT,dpn,vPe,Vo,Qt,jo=Q(()=>{zn();Nu();cT=Gs(zk()),dpn=Gs(Gpe()),vPe=Gs(Gpe());pa();(0,vPe.default)(cT.default);Vo=class Vo{static format2(e,n){n=Sr.combineWithDefaultOptions(n,{withoutSeconds:!1,pastPrefix:"vor",futurePrefix:"in"});let i="";return e<0?n.pastPrefix&&(i=n.pastPrefix+" "):n.futurePrefix&&(i=n.futurePrefix+" "),e<0&&(e=e*-1),i+Vo.format(e,void 0,!0,n)}static format(e,n,i=!0,r){if(n)return n=n.replace("yyyy","YYYY").replace("dd","DD"),cT.default.duration(e,"ms").format(n,{trim:!1});{let s=Vo.durationNew(e),o=[];return s.year>0&&(s.year===1?o.push("1 "+(i?Vo.units.year.short:Vo.units.year.longSingle)):o.push(s.year+" "+(i?Vo.units.year.short:Vo.units.year.longPlural))),s.month>0&&(s.month===1?o.push("1 "+(i?Vo.units.month.short:Vo.units.month.longSingle)):o.push(s.month+" Monaten")),s.week>0&&(s.week===1?o.push("1 "+(i?Vo.units.week.short:Vo.units.week.longSingle)):o.push(s.week+" Wochen")),s.day>0&&(s.day===1?o.push("1 "+(i?Vo.units.day.short:Vo.units.day.longSingle)):o.push(s.day+" "+(i?Vo.units.day.short:Vo.units.day.longPlural))),s.hour===1?o.push("1 "+(i?Vo.units.hour.short:Vo.units.hour.longSingle)):(s.hour!==0||!i)&&o.push(s.hour+" "+(i?Vo.units.hour.short:Vo.units.hour.longPlural)),s.minute===1?o.push("1 "+(i?Vo.units.minute.short:Vo.units.minute.longSingle)):(s.minute!==0||!i)&&o.push(s.minute+" "+(i?Vo.units.minute.short:Vo.units.minute.longPlural)),r?.withoutSeconds||(s.second===1?o.push("1 "+(i?Vo.units.second.short:Vo.units.second.longSingle)):(s.second!==0||!i)&&o.push(s.second+" "+(i?Vo.units.second.short:Vo.units.second.longPlural))),o.length===0&&o.push("0 "+Vo.units.second.short),parseInt(o[0].split(" ")[0],10)>5?o[0]:o.length>1?o[0]+" "+o[1]:o.join(" ")}}static durationNew(e){let n=e/1e3,i={},r={year:31536e3,month:2592e3,week:604800,day:86400,hour:3600,minute:60,second:1};return Object.keys(r).forEach(s=>{i[s]=Math.floor(n/r[s]),n-=i[s]*r[s]}),i}static getAge(e){return Math.floor(cT.default.duration(Date.now()-Ie.parse(e),"ms").asYears())}static getTotalHoursAndMinutes(e){let n=cT.default.duration(e,"ms");return Math.floor(n.asHours())+":"+cr.fill(n.get("minutes").toString(),2,"0",!1)}static parse(e){return cT.default.duration(e.toUpperCase()).asMilliseconds()}static test(){let e=Vo.format(Vo.DURATION_1MINUTE*52,"hh:mm"),n=Vo.format(Vo.DURATION_1MINUTE*8,"hh:mm"),i=Vo.format(Vo.DURATION_1DAY+Vo.DURATION_1HOUR,"HH:mm"),r=Vo.format(Vo.DURATION_1DAY+Vo.DURATION_1HOUR,"HH:mm"),s=Vo.format(Vo.DURATION_1DAY+Vo.DURATION_1HOUR,"HH:mm");if(Vo.parse("1:30")!==90*Vo.DURATION_1MINUTE)debugger;if(Vo.parse("10:30")!==10.5*Vo.DURATION_1HOUR)debugger}static toText(e){return cT.default.duration(e/1e3,"seconds").humanize()}};Vo.DURATION_1MINUTE=1e3*60,Vo.DURATION_1HOUR=Vo.DURATION_1MINUTE*60,Vo.DURATION_1DAY=Vo.DURATION_1HOUR*24,Vo.DURATION_1WEEK=Vo.DURATION_1DAY*7,Vo.DURATION_1YEAR=Vo.DURATION_1DAY*365,Vo.units={year:{short:"Jahr",longSingle:"Jahr",longPlural:"Jahre"},month:{short:"Mon",longSingle:"Monat",longPlural:"Monate"},week:{short:"W",longSingle:"Woche",longPlural:"Wochen"},day:{short:"Tag",longSingle:"Tag",longPlural:"Tage"},hour:{short:"Std",longSingle:"Stunde",longPlural:"Stunden"},minute:{short:"Min",longSingle:"Minute",longPlural:"Minuten"},second:{short:"Sek",longSingle:"Sekunde",longPlural:"Sekunden"}};Qt=Vo;Number.prototype.durationFormat=function(t){return Qt.format(this,t)}});var Qn,Ul=Q(()=>{pa();Qn=class{static stringify(e,n=!1){return JSON.stringify(n?Sr.sortKeys(e):e)}static stringifyFormat(e,n=" "){return JSON.stringify(e,void 0,n)}static parse(e){try{return e===null?null:JSON.parse(typeof e!="string"?e.toString():e)}catch(n){let i="";throw e?.toString().length>100?i=e.toString().substr(0,100):i=e,Error(`Fehler beim JSON parsen
`+n.message+`
`+i)}}static toTable(e){let n=[],i=[];return n.join("<br/>")}}});var kv,dT=Q(()=>{zn();Ul();kv=(()=>{let e=class e{static get data(){return e._data||(e._data=Qn.parse(e.dataJsonString).feiertage),e._data}static getPublicHoliday(i,r){let s=Ie.parseFormat(i,"yyyy-MM-dd"),o=e.data.find(a=>a.date===s);if(o&&o[r]==="1")return{date:s,name:o.fname}}static getPublicHolidayYear(i,r){let s=[];for(let o of e.data)o.date.startsWith(i.toString())&&o[r]==="1"&&s.push({name:o.fname,dateString:o.date});return s}static getFirstWorkingDayOfMonth(i,r){let s=Ie.getFirstOfMonth(i),o=0;for(;;){if(o++,o>50)throw Error("getFirstWorkingDayOfMonth max count");if(!e.getPublicHoliday(s,r))break;s=s.dateAddDays(1)}return s}};e.dataJsonString='{"status":"success","feiertage":[{"date":"2024-01-01","fname":"Neujahr","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-01-06","fname":"Heilige Drei K\xF6nige","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"1","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2024-03-08","fname":"Internationaler Frauentag","all_states":"0","bw":"0","by":"0","be":"1","bb":"0","hb":"0","hh":"0","he":"0","mv":"1","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2024-03-29","fname":"Karfreitag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-03-31","fname":"Ostersonntag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2024-04-01","fname":"Ostermontag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-05-01","fname":"Tag der Arbeit","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-05-09","fname":"Christi Himmelfahrt","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-05-19","fname":"Pfingstsonntag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2024-05-20","fname":"Pfingstmontag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-05-30","fname":"Fronleichnam","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"1","mv":"0","ni":"0","nw":"1","rp":"1","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2024-08-15","fname":"Mari\xE4 Himmelfahrt","all_states":"0","bw":"0","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"Mari\xE4 Himmelfahrt ist in Gemeinden mit \xFCberwiegend katholischer Bev\xF6lkerung in Bayern ein gesetzlicher Feiertag.","augsburg":null,"katholisch":"1"},{"date":"2024-09-20","fname":"Weltkindertag","all_states":"0","bw":"0","by":"0","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-10-03","fname":"Tag der deutschen Einheit","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-10-31","fname":"Reformationstag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"1","hh":"1","he":"0","mv":"1","ni":"1","nw":"0","rp":"0","sl":"0","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-11-01","fname":"Allerheiligen","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"1","rp":"1","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2024-11-20","fname":"Bu\xDF- und Bettag","all_states":"0","bw":"0","by":"0","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"1","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2024-12-25","fname":"1. Weihnachtstag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2024-12-26","fname":"2. Weihnachtstag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-01-01","fname":"Neujahr","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-01-06","fname":"Heilige Drei K\xF6nige","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"1","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2025-03-08","fname":"Internationaler Frauentag","all_states":"0","bw":"0","by":"0","be":"1","bb":"0","hb":"0","hh":"0","he":"0","mv":"1","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2025-04-18","fname":"Karfreitag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-04-20","fname":"Ostersonntag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2025-04-21","fname":"Ostermontag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-05-01","fname":"Tag der Arbeit","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-05-29","fname":"Christi Himmelfahrt","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-06-08","fname":"Pfingstsonntag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2025-06-09","fname":"Pfingstmontag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-06-19","fname":"Fronleichnam","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"1","mv":"0","ni":"0","nw":"1","rp":"1","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2025-08-15","fname":"Mari\xE4 Himmelfahrt","all_states":"0","bw":"0","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"Mari\xE4 Himmelfahrt ist in Gemeinden mit \xFCberwiegend katholischer Bev\xF6lkerung in Bayern ein gesetzlicher Feiertag.","augsburg":null,"katholisch":"1"},{"date":"2025-09-20","fname":"Weltkindertag","all_states":"0","bw":"0","by":"0","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-10-03","fname":"Tag der deutschen Einheit","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-10-31","fname":"Reformationstag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"1","hh":"1","he":"0","mv":"1","ni":"1","nw":"0","rp":"0","sl":"0","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-11-01","fname":"Allerheiligen","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"1","rp":"1","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2025-11-19","fname":"Bu\xDF- und Bettag","all_states":"0","bw":"0","by":"0","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"1","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2025-12-25","fname":"1. Weihnachtstag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2025-12-26","fname":"2. Weihnachtstag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-01-01","fname":"Neujahr","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-01-06","fname":"Heilige Drei K\xF6nige","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"1","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2026-03-08","fname":"Internationaler Frauentag","all_states":"0","bw":"0","by":"0","be":"1","bb":"0","hb":"0","hh":"0","he":"0","mv":"1","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2026-04-03","fname":"Karfreitag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-04-05","fname":"Ostersonntag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2026-04-06","fname":"Ostermontag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-05-01","fname":"Tag der Arbeit","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-05-14","fname":"Christi Himmelfahrt","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-05-24","fname":"Pfingstsonntag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2026-05-25","fname":"Pfingstmontag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-06-04","fname":"Fronleichnam","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"1","mv":"0","ni":"0","nw":"1","rp":"1","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2026-08-15","fname":"Mari\xE4 Himmelfahrt","all_states":"0","bw":"0","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"Mari\xE4 Himmelfahrt ist in Gemeinden mit \xFCberwiegend katholischer Bev\xF6lkerung in Bayern ein gesetzlicher Feiertag.","augsburg":null,"katholisch":"1"},{"date":"2026-09-20","fname":"Weltkindertag","all_states":"0","bw":"0","by":"0","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"0","st":"0","sh":"0","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-10-03","fname":"Tag der deutschen Einheit","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-10-31","fname":"Reformationstag","all_states":"0","bw":"0","by":"0","be":"0","bb":"1","hb":"1","hh":"1","he":"0","mv":"1","ni":"1","nw":"0","rp":"0","sl":"0","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-11-01","fname":"Allerheiligen","all_states":"0","bw":"1","by":"1","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"1","rp":"1","sl":"1","sn":"0","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2026-11-18","fname":"Bu\xDF- und Bettag","all_states":"0","bw":"0","by":"0","be":"0","bb":"0","hb":"0","hh":"0","he":"0","mv":"0","ni":"0","nw":"0","rp":"0","sl":"0","sn":"1","st":"0","sh":"0","th":"0","comment":"","augsburg":null,"katholisch":null},{"date":"2026-12-25","fname":"1. Weihnachtstag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null},{"date":"2026-12-26","fname":"2. Weihnachtstag","all_states":"1","bw":"1","by":"1","be":"1","bb":"1","hb":"1","hh":"1","he":"1","mv":"1","ni":"1","nw":"1","rp":"1","sl":"1","sn":"1","st":"1","sh":"1","th":"1","comment":"","augsburg":null,"katholisch":null}]}';let t=e;return t})()});var m4,VN=Q(()=>{zn();dT();m4=class t{static isDateOutsideNext3WorkingDays(e){let n=Ie.clearTime(Date.now()),i=Ie.clearTime(e);return!(e<=n)}static addWorkingDays(e,n,i){if(n===0)return Ie.parse(e);let r=Ie.clearTime(e),s=n<0,o=Math.abs(n),a=0;for(;o>0;)r=Ie.addDays(r,s?-1:1),t.isWorkingDay(r,i)&&o--,a++,console.log("addWorkingDays");return Ie.addDays(e,s?a*-1:a)}static addDaysUntilWorkingDay(e,n){let i=0;for(;;){if(i>100)throw new Error("getNextWorkingDay counter > 100");if(t.isWorkingDay(Ie.addDays(e,i),n))return Ie.addDays(e,i);i++}}static isWorkingDay(e,n){return n==="sp"?!0:!(Ie.getDayOfWeek(e)===Aa.Sunday||kv.getPublicHoliday(e,n))}static test(){console.log("start WorkingDay-Tools test");let e=Ie.getDayOfWeek(Ie.parse("2022-07-10","yyyy-MM-dd"));console.log(e);let n=t.addWorkingDays(Ie.parse("2022-07-07","yyyy-MM-dd"),3,"nw"),i=Ie.format(n,"yyyy-MM-dd");i==="2022-07-11"?console.log("test 1 ok"):console.error("WorkingDayTest1 failed! Result = "+i);let r=t.addWorkingDays(Ie.parse("2022-07-07","yyyy-MM-dd"),-4,"nw"),s=Ie.format(r,"yyyy-MM-dd");s==="2022-07-02"?console.log("test 2 ok"):console.error("WorkingDayTest2 failed! Result = "+s);let o=t.addWorkingDays(Ie.parse("2022-04-14","yyyy-MM-dd"),2,"nw"),a=Ie.format(o,"yyyy-MM-dd");a==="2022-04-19"?console.log("test 2 ok"):console.error("WorkingDayTest3 failed! Result = "+a)}}});var t1,xpn,bpn,Aa,Wpe,Upe,Ie,zn=Q(()=>{t1=Gs(zk()),xpn=Gs(pPe()),bpn=Gs(fPe());Zh();Nu();pa();jo();VN();Aa=function(t){return t[t.Monday=0]="Monday",t[t.Tuesday=1]="Tuesday",t[t.Wednesday=2]="Wednesday",t[t.Thursday=3]="Thursday",t[t.Friday=4]="Friday",t[t.Saturday=5]="Saturday",t[t.Sunday=6]="Sunday",t}(Aa||{}),Wpe=class{constructor(){this.value=Date.now()}toString(e="yyyy-MM-ddTHH:mm:ssZ"){return this.format(e)}format(e){return Ie.format(this.value,e)}addDays(e){return this.value=Ie.addDays(this.value,e),this}},Upe=class{constructor(){let e=new Date;e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),this.value=e.getTime()}addDays(e){return this.value=Ie.addDays(this.value,e),this}format(e){return Ie.format(this.value,e)}},Ie=class t{static get todayDateString(){return t.format(Date.now(),"yyyy-MM-dd")}static get yesterdayDateString(){return t.format(t.addDays(Date.now(),-1),"yyyy-MM-dd")}static get todayDay(){return new Upe}static get now(){return new Wpe}static formatNow(e){return t.format(Date.now(),e)}static currentHours(){return parseInt(t.formatNow("HH"),10)}static currentHoursDecimal(){let e=parseInt(t.formatNow("HH"),10),n=parseInt(t.formatNow("mm"),10);return e+n/60}static getHours(e){return parseInt(t.parse(e).dateFormat("HH"),10)}static formatNowDate(){return t.format(Date.now(),"yyyy-MM-dd")}static formatTomorrowDate(){return t.format(Date.now().dateAddDays(1),"yyyy-MM-dd")}static init(){}static parseFormat(e,n,i){if(this.init(),i){let r=t.parse(e,n);return t.format(r,i)}else return t.format(t.parse(e),n)}static isToday(e){return t.format(e,"yyyy-MM-dd")===t.todayDateString}static formatTime(e,n,i="HH:mm:ss"){let r=t.format(e,i);return n&&r.endsWith(":00")&&(r=r.substring(0,r.length-3)),n&&r.endsWith(":00")&&(r=r.substring(0,r.length-3)),r}static format(e,n="yyyy-MM-dd HH:mm:ss",i="de"){try{if(!Es.is(e))return"";if(n.startsWith("yyy-"))throw Error("falschen Jahresformat");let r=n.replaceAll("yyyy","YYYY").replaceAll("yy","YY").replaceAll("dd","DD").replaceAll("d","D").replaceAll("EEEE","dddd").replaceAll("EEE","ddd").replaceAll("EE","ddd"),s="",o;return typeof e=="string"&&(o=new Date(e).getTime()),typeof e.toDate=="function"&&(o=e.toDate()),typeof e._seconds=="number"&&(o=e._seconds*1e3),typeof e.seconds=="number"?o=e.seconds*1e3:o=e,t1.default.locale()!==i&&t1.default.locale(i),s=(0,t1.default)(o).format(r),s===null?"":s??""}catch{return""}}static parse(e,n="yyyy-MM-ddTHH:mm:ssZ",i=!1){return this.init(),typeof e?.getTime=="function"?e.getTime():typeof e=="number"?e:cr.nullOrEmpty(e)?0:typeof e._seconds=="number"?e._seconds*1e3+e._nanoseconds/1e6:typeof e.seconds=="number"?e.seconds*1e3:typeof e=="string"&&e.indexOf(".")===-1&&e.length===13?parseInt(e,10):(typeof e=="string"&&e.length!==n.length&&(n=t.getFormat(e)),n=n.replace("yyyy","YYYY").replace("dd","DD"),i?t1.default.utc(e,n).valueOf():(0,t1.default)(e,n).valueOf())}static dateDiff(e,n,i=!1){return i?Math.abs(e-n):e-n}static dateDiffToNow(e){return typeof e!="number"&&(e=this.parse(e)),Date.now()-e}static dateDiffToNowAbs(e){return typeof e!="number"&&(e=this.parse(e)),Math.abs(Date.now()-e)}static dateDiffToNowText(e,n=!1){return this.init(),typeof e!="number"&&(e=this.parse(e)),Math.abs(Date.now()-e)<6e4,n&&e>Date.now()?(0,t1.default)(Date.now()).fromNow():(0,t1.default)(e).fromNow()}static dateDiffText(e,n){this.init();let i=new Date(t.parse(e)),r=new Date(t.parse(n));return(0,t1.default)(i).from(r)}static dateDiffToNowOnlyDaysText(e){if(this.init(),typeof e!="number"&&(e=this.parse(e)),e.dateFormat("yyyy-MM-dd")===t.formatNow("yyyy-MM-dd"))return"Heute";if(e.dateFormat("yyyy-MM-dd")===Date.now().dateAddDays(1).dateFormat("yyyy-MM-dd"))return"Morgen";if(e.dateFormat("yyyy-MM-dd")===Date.now().dateAddDays(-1).dateFormat("yyyy-MM-dd"))return"Gestern";{let n=t.parse(e.dateFormat("yyyy-MM-dd")+" "+t.formatNow("HH:mm:ss"));return(0,t1.default)(n).fromNow()}}static dateDiffToTodayTextOld(e){this.init(),e=t.clearTime(e),typeof e!="number"&&(e=this.parse(e));let n=t.clearTime(Date.now());return Math.abs(n-e)<1e5?"heute":(0,t1.default)(n).to((0,t1.default)(e))}static monthDiff(e,n){return(0,t1.default)(t.parse(e)).diff((0,t1.default)(t.parse(n)),"months",!0)}static addDays(e,n){let i=new Date(t.parse(e));return i.setDate(i.getDate()+n),i.getTime()}static betweenDays(e,n,i){return e=t.clearTime(e),n=t.clearTime(n),i=t.clearTime(i),e>=n&&e<=i}static clearTime(e){typeof e!="number"&&(e=t.parse(e));let n=new Date(e);return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.getTime()}static clearSeconds(e){typeof e!="number"&&(e=t.parse(e));let n=new Date(e);return n.setSeconds(0),n.setMilliseconds(0),n.getTime()}static clearDayAndTime(e){let n=new Date(e);return n.setDate(1),n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.getTime()}static getLastMonday(e=0){let n=new Date;for(let i=1;i<e;i++)n.setDate(n.getDate()-7);return n.setDate(n.getDate()+1-(n.getDay()||7)),t.clearTime(n.getTime())}static getDateFromDayOfWeekBeforeOrSame(e,n){let i=t.parse(e);for(let r=0;r<8;r++){if(t.getDayOfWeek(i)===n)return i;i=i.dateAddDays(-1)}return 0}static getDateFromDayOfWeekAfterOrSame(e,n){let i=t.parse(e);for(let r=0;r<8;r++){if(t.getDayOfWeek(i)===n)return i;i=i.dateAddDays(1)}return 0}static getMondayBefore(e,n){let i=new Date(t.parse(e));for(let r=1;r<n;r++)i.setDate(i.getDate()-7);return i.setDate(i.getDate()+1-(i.getDay()||7)),i.getTime()}static getNextMonday(e){let n=new Date;for(let i=1;i<Math.abs(e);i++)n.setDate(n.getDate()+7);return n.setDate(n.getDate()+1-(n.getDay()||7)),n.getTime()}static getNextTuesday(e,n){let i=new Date(e);n++;for(let r=1;r<Math.abs(n);r++)i.setDate(i.getDate()+7);for(;i.getDay()!==2;)console.log("getNextTuesday"),i.setDate(i.getDate()+1);return i.getTime()}static getNextDayOfWeek(e,n){let i=new Date(t.parse(e));for(i.setDate(i.getDate()+1);t.getDayOfWeek(i)!==n;)console.log("getNextDayOfWeek"),i.setDate(i.getDate()+1);return i.getTime()}static getDayOfWeekText(e){switch(e){case Aa.Monday:return"Montag";case Aa.Tuesday:return"Dienstag";case Aa.Wednesday:return"Mittwoch";case Aa.Thursday:return"Donnerstag";case Aa.Friday:return"Freitag";case Aa.Saturday:return"Samstag";case Aa.Sunday:return"Sonntag"}return""}static getDayOfWeekTextShort(e){switch(e){case Aa.Monday:return"Mo";case Aa.Tuesday:return"Di";case Aa.Wednesday:return"Mi";case Aa.Thursday:return"Do";case Aa.Friday:return"Fr";case Aa.Saturday:return"Sa";case Aa.Sunday:return"So"}return""}static getDayOfWeek(e){let n=new Date(t.parse(e)).getDay()-1;return n===-1&&(n=6),n}static getMonth(e){return new Date(t.parse(e)).getMonth()+1}static addMonths(e,n){return(0,t1.default)(e).add(n,"month").valueOf()}static addYears(e,n){return(0,t1.default)(e).add(n,"year").valueOf()}static parseToDateIfString(e){return typeof e=="string"?new Date(e):e}static parseAndClearTime(e){return this.clearTime(this.parse(e))}static parseAndClearDateTime(e){return t.clearDayAndTime(this.parse(e))}static getEndOfMonthFactorFromNow(){return t.getLastDayOfThisMonth()/new Date().getDate()}static getLastDayOfThisMonth(){return parseInt(t.format(t.addDays(t.addMonths(t.clearDayAndTime(Date.now()),1),-1),"dd"),10)}static getLastDayOfMonth(e){let n=t.clearDayAndTime(t.parse(e)),i=t.addMonths(n,1);return t.addDays(i,-1)}static formatDatesInObj(e){let n=Sr.clone(e);return Object.keys(n).forEach(i=>{n[i].seconds&&(n[i]=t.format(n[i],"yyyy-MM-dd HH:mm:ss"))}),n}static getDateString(e){return t.format(e,"yyyy-MM-dd")}static test(){let e=t.format("2021-01-01","d"),n=t.format(Date.now(),"EEEE","de"),i=t.format(Date.now(),"EEE","en"),r=t.format(Date.now(),"EEE","de"),s=t.parseFormat("2023-07-29","yyyy-MM-dd","dd.MM.yyyy");console.log(s),console.log(s),console.log(s),console.log("start DateTools Test");let o=t.utcToLocal("2023-06-29 22:30:00");console.log(o),console.log(o),console.log(o),console.log(o);let a=t.getNextDayOfWeek(t.parse("2022-07-07"),Aa.Friday);t.format(a,"yyyy-MM-dd")==="2022-07-08"||console.error("DateTools-Test nextFriday OK");let c=t.getNextDayOfWeek(t.parse("2022-07-07"),Aa.Monday);if(t.format(c,"yyyy-MM-dd")!=="2022-07-11"){console.error("DateTools-Test nextMonday wrong");debugger}let u=t.getNextDayOfWeek(t.parse("2022-07-07"),Aa.Wednesday);if(t.format(u,"yyyy-MM-dd")!=="2022-07-13"){console.error("DateTools-Test nextWednesday wrong");debugger}let f=t.getNextDayOfWeek(t.parse("2022-07-07"),Aa.Thursday);if(t.format(f,"yyyy-MM-dd")!=="2022-07-14"){console.error("DateTools-Test nextWednesday wrong");debugger}let x=t.parse("2022-07-25 11:00:00","yyyy-MM-dd HH:mm:ss");if(t.format(t.setEarlyHourTo(x,14),"yyyy-MM-dd HH:mm:ss")!=="2022-07-25 14:00:00"){console.error("setEarlyHourTo1 WRONG!");debugger}let E=t.parse("2022-07-25 15:00:00","yyyy-MM-dd HH:mm:ss");if(t.format(t.setEarlyHourTo(E,14),"yyyy-MM-dd HH:mm:ss")!=="2022-07-25 15:00:00"){console.error("setEarlyHourTo1 WRONG!");debugger}let I=t.parse("2022-07-25 15:03:00","yyyy-MM-dd HH:mm:ss");if(t.format(t.roundToNextMinute(I,15),"yyyy-MM-dd HH:mm:ss")!=="2022-07-25 15:15:00"){console.error("roundToNextMinute WRONG!");debugger}let G=t.parse("2022-07-25 15:00:00","yyyy-MM-dd HH:mm:ss");if(t.format(t.roundToNextMinute(G,15),"yyyy-MM-dd HH:mm:ss")!=="2022-07-25 15:00:00"){console.error("roundToNextMinute WRONG!");debugger}let Y=t.parse("2022-07-25 14:59:00","yyyy-MM-dd HH:mm:ss");if(t.format(t.roundToNextMinute(Y,15),"yyyy-MM-dd HH:mm:ss")!=="2022-07-25 15:00:00"){console.error("roundToNextMinute WRONG!");debugger}if(t.parse("2022-01-01").dateFormat("yyyy-MM-dd")!=="2022-01-01"){console.error("dateFormat WRONG!");debugger}if(t.format(t.parse("2022-01-01").dateAddDays(2),"yyyy-MM-dd")!=="2022-01-03"){console.error("dateFormat WRONG!");debugger}let ce=t.format(t.parseGermanWild("01.01.2020"),"yyyy-MM-dd");if(ce!=="2020-01-01"){console.error("dateFormat WRONG! "+ce);debugger}let ie=t.format(t.parseGermanWild("01.01"),"yyyy-MM-dd");if(ie!=="2025-01-01"){console.error("dateFormat WRONG! "+ie);debugger}let le=t.format(t.parseGermanWild("1.7"),"yyyy-MM-dd");if(le!=="2025-07-01"){console.error("dateFormat WRONG! "+le);debugger}let Se=t.format(t.parseGermanWild("1.12"),"yyyy-MM-dd");if(Se!=="2024-12-01"){console.error("dateFormat WRONG! "+Se);debugger}if("2022-06-30".dateParse()!=="2022-06-30".dateParse("yyyy-MM-dd"))debugger;if(t.getDateFromDayOfWeekBeforeOrSame("2023-02-02",Aa.Monday).dateFormat("yyyy-MM-dd")!=="2023-01-30")debugger;if(t.getDateFromDayOfWeekBeforeOrSame("2023-02-17",Aa.Friday).dateFormat("yyyy-MM-dd")!=="2023-02-17")debugger;if(t.getDateFromDayOfWeekBeforeOrSame("2023-02-17",Aa.Saturday).dateFormat("yyyy-MM-dd")!=="2023-02-11")debugger;if(t.getDateFromDayOfWeekAfterOrSame("2023-02-10",Aa.Sunday).dateFormat("yyyy-MM-dd")!=="2023-02-12")debugger;let Ye=t.format(t.parse("20221017T100000","yyyyMMddTHHmmss"),"yyyy-MM-ddTHH:mm:ss.sssZ");console.log(Ye);let ft=t.format("2022-01-01","EE");console.log(ft);let Ft=t.format("2022-01-01","EEE");console.log(Ft);let Tt=t.format("2022-01-01","EEEE");console.log(Tt);let at=t.completeDateFull("9784","dd.MM.yyyy");console.log(at);let yt=t.completeDateFull("311284","dd.MM.yyyy");console.log(yt);let _t=t.completeDateFull("111984","dd.MM.yyyy");console.log(_t);let Re=t.completeDateFull("1111984","dd.MM.yyyy");console.log(Re)}static setEarlyHourTo(e,n){let i=new Date(t.parse(e));return i.getHours()<n&&i.setHours(n),i.getTime()}static roundToNextMinute(e,n){let i=new Date(t.parse(e));i.setSeconds(0,0);let r=i.getMinutes(),o=Math.ceil(r/n)*n-r;return i.getTime()+o*60*1e3}static parseGermanWild(e,n=!0){let r=new RegExp("^(\\d{1,2})\\.(\\d{1,2})\\.?(\\d{0,4})$","g").exec(e),s=1,o=0,a=parseInt(t.formatNow("yyyy"),10),l=!1;r&&r.length>1&&r[1]&&(s=parseInt(r[1],10)),r&&r.length>2&&r[2]&&(o=parseInt(r[2],10)),r&&r.length>3&&r[3]&&(l=!0,a=parseInt(r[3],10));let d=new Date(a,o-1,s).getTime();return!l&&n&&d<Date.now()&&(d=t.addYears(d,1)),d}static getFormat(e){return e.match(/^\d{2}\.\d{2}\.\d{4}$/)?"dd.MM.yyyy":e.match(/^\d{4}-\d{2}-\d{2}$/)?"yyyy-MM-dd":""}static getFirstOfMonth(e){return new Date(t.parse(e)).setDate(1)}static getDayCountOfMonth(e){let n=t.getFirstOfMonth(e),i=t.addMonths(n,1);return t.dayDiff(i,n)}static dayDiff(e,n){return e=t.parse(e).dateClearTime(),n=t.parse(n).dateClearTime(),(0,t1.default)(e).diff((0,t1.default)(n),"days")}static timeStringToDuration(e){let n=e.split(":");return parseInt(n[0],10)*Qt.DURATION_1HOUR+parseInt(n[1],10)*Qt.DURATION_1MINUTE}static parseTextToBirthday(e){let n=e.split(".");if(n.length===3){let i=[],r="";return n[0].length===1&&(r+="0"),r+=n[0]+".",n[1].length===1&&(r+="0"),r+=n[1]+".",n[2].length===2&&(parseInt(n[2],10)<20?r+="20":r+="19"),r+=n[2],t.parse(r,"dd.MM.yyyy")}return 0}static completeDateFull(e,n){let i=0,r=0,s=0,o=0,a=0,l=0,c=0,d=0,u=0;return e.includes(".")||/^\d+$/g.test(e)&&e.length>=4&&(e.length===4&&(a=1,l=1,c=2,d=2,u=4),e.length===6&&([19,20].includes(parseInt(e.substring(2,4),10))?(a=1,l=1,c=2,d=2,u=6):(a=2,l=2,c=4,d=4,u=6))),a>0&&(r=parseInt(e.substring(0,a),10),s=parseInt(e.substring(l,c),10),o=parseInt(e.substring(d,u),10),o<100&&(o>40?o+=1900:o+=2e3),o>1900&&o<2100&&(i=t.parse(o+"-"+cr.fill(s.toString(),2,"0",!1)+"-"+cr.fill(r.toString(),2,"0",!1)))),i?t.format(i,n):""}static completeDate(e){if(e.length===1){if(parseInt(e[0],10)>3)return"0"+e+"."}else if(e.length===2){if(!e.includes("."))return e+"."}else if(e.length===3)if(e.includes(".")){if(parseInt(e.substring(0,2),10)>31)return"31."}else return e.substring(0,2)+"."+e.substring(2,3);else if(e.length===4){if(e.includes(".")&&parseInt(e.split(".")[1],10)>1)return e.substring(0,3)+"0"+e.substring(3,4)+"."}else if(e.length===5){if(!e.endsWith("."))return e+"."}else if(e.length===8){let n=parseInt(e.split(".")[2],10);if(n!==19&&n!==20)return n>50?e=e.substring(0,6)+"19"+e.substring(6,8):e=e.substring(0,6)+"20"+e.substring(6,8),e}else if(e.length>10)return e.substring(0,10);return e}static utcToLocal(e){let n=t.parse(e),i=new Date(n).getTimezoneOffset();return n+=i*6e4*-1,n}static addWorkingDays(e,n,i){console.log("start addWorkingDays "+t.format(e,"dd.MM.yyyy")+" add "+n);let r=e,s=0;for(;s<n;)r=t.addDays(r,1),m4.isWorkingDay(r,i)&&(s++,console.log("addWorkingDays addedWorkingDays")),console.log("addWorkingDays not addedWorkingDays");return console.log("end addWorkingDays "+t.format(e,"dd.MM.yyyy")+" add "+n+" --> "+t.format(r,"dd.MM.yyyy")),r}static todayAt(e){return e.length===5&&(e+=":00"),(t.formatNow("yyyy-MM-dd")+" "+e).dateParse()}static getDayOfMonth(e){return new Date(t.parse(e)).getDate()}static formatDate(e){return t.parse(e).dateFormat("yyyy-MM-dd")}static getDaysBetween(e,n){if(e===n)return[e];if(e.dateParse()>=n.dateParse())return[e,n];let i=[];i.push(e);let r=e.dateParse();for(;r=r.dateAddDays(1),r.dateFormat("yyyy-MM-dd")!==n;)i.push(r.dateFormat("yyyy-MM-dd"));return i}static forEachDay(e,n,i){t.getDaysBetween(e,n).forEach(s=>i(s))}static getDateStringsFromMonth(e){let n=t.getFirstOfMonth(e),i=t.getLastDayOfMonth(e),r=[];for(;n<=i;)r.push(n.dateFormat("yyyy-MM-dd")),n=n.dateAddDays(1);return r}static dayOfYear(e){return(0,t1.default)(e).dayOfYear()}static clearDate(e){return Qt.parse(t.parse(e).dateFormat("HH:mm"))}};Number.prototype.dateAddDays=function(t){return Ie.addDays(this,t)};Number.prototype.dateClearTime=function(){return Ie.clearTime(this)};Number.prototype.dateAddMonths=function(t){return Ie.addMonths(this,t)};Number.prototype.dateAddYears=function(t){return Ie.addYears(this,t)};Number.prototype.dateFormat=function(t){return Ie.format(this,t)};Number.prototype.clearTime=function(){return Ie.clearTime(this)};Number.prototype.dateDiffToNowText=function(){return Ie.dateDiffToNowText(this)};String.prototype.dateParse=function(t="yyyy-MM-ddTHH:mm:ssZ"){return Ie.parse(this,t)};Date.prototype.dateFormat=function(t){return Ie.format(this,t)};Object.defineProperty(Number.prototype,"dateFormatDate",{configurable:!0,writable:!0,value(){return Ie.formatDate(this)}});Object.defineProperty(String.prototype,"dateFormatDate",{configurable:!0,writable:!0,value(){return Ie.formatDate(this)}});Object.defineProperty(String.prototype,"dateFormat",{configurable:!0,writable:!0,value(t){return Ie.format(this,t)}});Object.defineProperty(Number.prototype,"clearDate",{configurable:!0,writable:!0,value(){return Ie.clearDate(this)}});Object.defineProperty(Number.prototype,"getHours",{configurable:!0,writable:!0,value(){return Ie.getHours(this)}});Object.defineProperty(Date.prototype,"dateFormatDate",{configurable:!0,writable:!0,value(){return Ie.formatDate(this)}});Object.defineProperty(String.prototype,"dateAddDays",{configurable:!0,writable:!0,value(t){return Ie.addDays(this,t)}})});var jpe,Hr,Yc=Q(()=>{zn();jpe=Gs(Q9()),Hr=class t{static arrayNumbers(e=!1){return e?(n,i)=>n>i?-1:n<i?1:0:(n,i)=>n<i?-1:n>i?1:0}static random(){return(e,n)=>.5-Math.random()}static arrayParseNumbers(e=!1){return e?(n,i)=>parseFloat(n)>parseFloat(i)?-1:parseFloat(n)<parseFloat(i)?1:0:(n,i)=>parseFloat(n)<parseFloat(i)?-1:parseFloat(n)>parseFloat(i)?1:0}static arrayString(e=!1){return e?(n,i)=>i.localeCompare(n):(n,i)=>n.localeCompare(i)}static sortNumber(e,n=!1){return n?(i,r)=>(r[e]?r[e]:0)-(i[e]?i[e]:0):(i,r)=>(i[e]?i[e]:0)-(r[e]?r[e]:0)}static nxtSort(e,n,i){return jpe.default.orderBy(e,n,i)}static sortDate(e,n=!1){return(i,r)=>{let s=Ie.parse(r[e]),o=Ie.parse(i[e]);return n?s-o:o-s}}static sortWithGetter(e,n){return e.map(i=>({obj:i,sortValue:n(i)})).sort(t.sortString("sortValue")).map(({obj:i})=>i)}static sortString(e,n=!1,i){return(r,s)=>{if(typeof r[e]!="string"){debugger;throw new Error(`sortString fehlgeschlagen
typeof o1 = `+typeof r[e])}if(typeof s[e]!="string"){debugger;throw new Error(`sortString fehlgeschlagen
typeof o2 = `+typeof s[e])}return i&&i.last&&r[e]===i.last?1:i&&i.last&&s[e]===i.last||i&&i.first&&r[e]===i.first?-1:i&&i.first&&s[e]===i.first?1:n?(s[e]?s[e]:"").localeCompare(r[e]?r[e]:""):(r[e]?r[e]:"").localeCompare(s[e]?s[e]:"")}}static sort_Seconds(e){return(n,i)=>(n[e]._seconds?n[e]._seconds:0)-(i[e]._seconds?i[e]._seconds:0)}static sortFirebaseTimestamp(e,n=!1){return n?(i,r)=>(r[e].seconds?r[e].seconds:0)-(i[e].seconds?i[e].seconds:0):(i,r)=>(i[e].seconds?i[e].seconds:0)-(r[e].seconds?r[e].seconds:0)}static sort(e,n,i=!1){try{return e.sort((r,s)=>{!r[n]||s[n];try{return this._compare(r[n],s[n],i)}catch(o){throw new Error(`SortTools.sort failed
err1
`+o)}})}catch(r){throw new Error(`SortTools.sort failed
err2
`+r)}}static _compare(e,n,i){try{return typeof e=="object"?i?JSON.stringify(n).localeCompare(JSON.stringify(e)):JSON.stringify(e).localeCompare(JSON.stringify(n)):i?n.toString().localeCompare(e.toString()):e.toString().localeCompare(n.toString())}catch(r){throw new Error(`SortTools._compare failed
err
`+r)}}static init(){}};Object.defineProperty(Array.prototype,"sortString",{configurable:!0,writable:!0,value(t,e=!1){return this.sort(Hr.sortString(t,e))}});Object.defineProperty(Array.prototype,"sortDate",{configurable:!0,writable:!0,value(t,e=!1){return this.sort(Hr.sortDate(t,e))}});Object.defineProperty(Array.prototype,"sortNumber",{configurable:!0,writable:!0,value(t,e=!1){return this.sort(Hr.sortNumber(t,e))}});Object.defineProperty(Array.prototype,"nxtSort",{configurable:!0,writable:!0,value(t,e){return jpe.default.orderBy(this,t,e)}})});var Pn,fu,gu=Q(()=>{me();a4();$n();me();Pn=function(t){return t.Add="Add",t.A="a",t.P="p",t.H="h",t.O="o",t._1="1",t._3="3",t._6="6",t._7="7",t.Alt1="Alt+1",t.Alt2="Alt+2",t.Alt3="Alt+3",t.Alt4="Alt+4",t.Alt5="Alt+5",t.CtrlAUml="Ctrl+\xC4",t.CtrlT="CtrlT",t.CtrlM="CtrlM",t.CtrlK="CtrlK",t.CtrlL="CtrlL",t.CtrlS="CtrlS",t.Enter="Enter",t.Ctrl1="Ctrl1",t.Ctrl2="Ctrl2",t.Ctrl3="Ctrl3",t.Ctrl4="Ctrl4",t.Ctrl5="Ctrl5",t.Esc="Esc",t.AltB="AltB",t.AltV="AltV",t.AltD="AltD",t.AltK="AltK",t.AltP="AltP",t.AltR="AltR",t.CtrlShiftR="CtrlShiftR",t.CtrlShiftB="CtrlShiftB",t.Shift7="shift+7",t.CtrlShiftL="CtrlShiftL",t.CtrlShiftD="CtrlShiftD",t.Up="up",t.Down="down",t.Right="right",t.Left="left",t.F1="F1",t.F2="F2",t.F3="F3",t.F4="F4",t.F6="F6",t.F7="F7",t.F8="F8",t.F9="F9",t.F10="F10",t.F11="F11",t.C="C",t}(Pn||{}),fu=(()=>{let e=class e{constructor(){this.iframeShowHide=!0,this.onKeyPress=new nt,this._onKeyPress=new nt,this.exclusiveBlockedKeyCodes=[],this.subscriptionIndexCounter=0,this.onKeyPressExclusive={subscribe:(i,r)=>{let s=this.subscriptionIndexCounter++;return new Qa(o=>{this.exclusiveBlockedKeyCodes.push(...i.map(l=>({keyCode:l,subscriptionIndex:s})));let a=this._onKeyPress.subscribe(l=>{i.includes(l)&&s===this.getLastRegisteredExclusiveSubscriptionIndex(l)&&o.next(l)});return()=>{a.unsubscribe(),this.exclusiveBlockedKeyCodes=this.exclusiveBlockedKeyCodes.filter(l=>l.subscriptionIndex!==s)}}).subscribe(r)}},this.switchTestCounter=0,this.shortcut={all_shortcuts:{},add(i,r,s){let o={type:"keydown",propagate:!1,disable_in_input:!1,target:document,keycode:!1};if(!s)s=o;else for(let d in o)typeof s[d]>"u"&&(s[d]=o[d]);let a=s.target;typeof s.target=="string"&&(a=document.getElementById(s.target));let l=this;i=i.toLowerCase();let c=d=>{let u;if(d=d||window.event,s.disable_in_input){let I;if(d.target?I=d.target:d.srcElement&&(I=d.srcElement),I.nodeType===3&&(I=I.parentNode),I.tagName==="INPUT"||I.tagName==="TEXTAREA"||I.tagName==="MAT-SELECT")return}d.keyCode?u=d.keyCode:d.which&&(u=d.which);let m=String.fromCharCode(u).toLowerCase();u===188&&(m=","),u===190&&(m=".");let f=i.split("+"),_=0,x={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},D={esc:27,escape:27,tab:9,space:32,return:13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,break:19,insert:45,home:36,delete:46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,page_down:34,pd:34,left:37,up:38,right:39,down:40,multiply:106,add:107,subtract:109,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},E={shift:{wanted:!1,pressed:!1},ctrl:{wanted:!1,pressed:!1},alt:{wanted:!1,pressed:!1},meta:{wanted:!1,pressed:!1}};d.ctrlKey&&(E.ctrl.pressed=!0),d.shiftKey&&(E.shift.pressed=!0),d.altKey&&(E.alt.pressed=!0),d.metaKey&&(E.meta.pressed=!0);let M;for(let I=0;M=f[I],I<f.length;I++)M==="ctrl"||M==="control"?(_++,E.ctrl.wanted=!0):M==="shift"?(_++,E.shift.wanted=!0):M==="alt"?(_++,E.alt.wanted=!0):M==="meta"?(_++,E.meta.wanted=!0):M.length>1?D[M]===u&&_++:s.keycode?s.keycode===u&&_++:m===M?_++:x[m]&&d.shiftKey&&(m=x[m],m===M&&_++);if(_===f.length&&E.ctrl.pressed===E.ctrl.wanted&&E.shift.pressed===E.shift.wanted&&E.alt.pressed===E.alt.wanted&&E.meta.pressed===E.meta.wanted&&(r(d),!s.propagate))return d.cancelBubble=!0,d.returnValue=!1,d.stopPropagation&&(d.stopPropagation(),d.preventDefault()),!1};this.all_shortcuts[i]={callback:c,target:a,event:s.type},a.addEventListener?a.addEventListener(s.type,c,!1):a.attachEvent?a.attachEvent("on"+s.type,c):a["on"+s.type]=c},remove(i){i=i.toLowerCase();let r=this.all_shortcuts[i];if(delete this.all_shortcuts[i],!r)return;let s=r.event,o=r.target,a=r.callback;o.detachEvent?o.detachEvent("on"+s,a):o.removeEventListener?o.removeEventListener(s,a,!1):o["on"+s]=!1}},this.shortcut.add("up",()=>this.emit(Pn.Up),{propagate:!0}),this.shortcut.add("down",()=>this.emit(Pn.Down),{propagate:!0}),this.shortcut.add(Pn.Left,()=>this.emit(Pn.Left),{propagate:!0}),this.shortcut.add(Pn.Right,()=>this.emit(Pn.Right),{propagate:!0}),this.shortcut.add(Pn.A,()=>this.emit(Pn.A),{propagate:!0}),this.shortcut.add(Pn.H,()=>this.emit(Pn.H),{propagate:!0}),this.shortcut.add(Pn.P,()=>this.emit(Pn.P),{propagate:!0}),this.shortcut.add(Pn.O,()=>this.emit(Pn.O),{propagate:!0}),this.shortcut.add(Pn._1,()=>this.emit(Pn._1),{propagate:!0}),this.shortcut.add(Pn._3,()=>this.emit(Pn._3),{propagate:!0}),this.shortcut.add(Pn._6,()=>this.emit(Pn._6),{propagate:!0}),this.shortcut.add(Pn._7,()=>this.emit(Pn._7),{propagate:!0}),this.shortcut.add("Alt+1",()=>this.emit(Pn.Alt1)),this.shortcut.add("Alt+2",()=>this.emit(Pn.Alt2)),this.shortcut.add("Alt+3",()=>this.emit(Pn.Alt3)),this.shortcut.add("Alt+4",()=>this.emit(Pn.Alt4)),this.shortcut.add("Alt+5",()=>this.emit(Pn.Alt5)),this.shortcut.add("Alt+B",()=>this.emit(Pn.AltB)),this.shortcut.add("Alt+D",()=>this.emit(Pn.AltD)),this.shortcut.add("Alt+K",()=>this.emit(Pn.AltK)),this.shortcut.add("Alt+V",()=>this.emit(Pn.AltV)),this.shortcut.add("Alt+P",()=>this.emit(Pn.AltP)),this.shortcut.add("Alt+R",()=>this.emit(Pn.AltR)),this.shortcut.add("Ctrl+1",()=>this.emit(Pn.Ctrl1)),this.shortcut.add("Ctrl+2",()=>this.emit(Pn.Ctrl2)),this.shortcut.add("Ctrl+3",()=>this.emit(Pn.Ctrl3)),this.shortcut.add("Ctrl+4",()=>this.emit(Pn.Ctrl4)),this.shortcut.add("Ctrl+5",()=>this.emit(Pn.Ctrl5)),this.shortcut.add("Ctrl+K",()=>this.emit(Pn.CtrlK)),this.shortcut.add("Ctrl+\xC4",()=>this.emit(Pn.CtrlAUml)),this.shortcut.add("Add",()=>this.emit(Pn.Add),{disable_in_input:!0}),this.shortcut.add("Ctrl+T",()=>this.emit(Pn.CtrlT)),this.shortcut.add("Ctrl+M",()=>this.emit(Pn.CtrlM)),this.shortcut.add("Ctrl+L",()=>this.emit(Pn.CtrlL)),this.shortcut.add("F1",()=>this.emit(Pn.F1)),this.shortcut.add("F2",()=>this.emit(Pn.F2)),this.shortcut.add("F3",()=>this.emit(Pn.F3)),this.shortcut.add("F4",()=>this.emit(Pn.F4)),this.shortcut.add("F6",()=>this.emit(Pn.F6)),this.shortcut.add("F7",()=>this.emit(Pn.F7)),this.shortcut.add("F8",()=>this.emit(Pn.F8)),this.shortcut.add(Pn.F9,()=>this.emit(Pn.F9)),this.shortcut.add("F10",()=>this.emit(Pn.F10)),this.shortcut.add("F11",()=>this.emit(Pn.F11)),this.shortcut.add("Ctrl+S",()=>{this.emit(Pn.CtrlS)}),this.shortcut.add("esc",()=>this.emit(Pn.Esc),{disable_in_input:!0}),this.shortcut.add("enter",()=>this.emit(Pn.Enter),{propagate:!0}),this.shortcut.add("c",()=>this.emit(Pn.C),{propagate:!0}),this.shortcut.add("ctrl+shift+b",()=>this.emit(Pn.CtrlShiftB)),this.shortcut.add("ctrl+shift+l",()=>this.emit(Pn.CtrlShiftL)),this.shortcut.add("ctrl+shift+d",()=>this.emit(Pn.CtrlShiftD)),this.shortcut.add("ctrl+shift+r",()=>this.emit(Pn.CtrlShiftR)),this.shortcut.add("ctrl+shift+s",()=>{this.iframeShowHide?(alert("show iframe"),zi.instance.sendEval(P1.showIframe)):(alert("hide iframe"),zi.instance.sendEval(P1.hideIframe)),this.iframeShowHide=!this.iframeShowHide}),this.shortcut.add("ctrl+shift+9",()=>O(this,null,function*(){if(this.switchTestCounter++,setTimeout(()=>this.switchTestCounter=0,500),this.switchTestCounter===3){zi.instance.send("eval",P1.showIframe);let i=window.location.href;i.indexOf("organizer")>-1,zi.instance.send("eval","window['createIframe']('"+i+"');")}}))}getLastRegisteredExclusiveSubscriptionIndex(i){let r=this.exclusiveBlockedKeyCodes.filter(s=>s.keyCode===i).sortNumber("subscriptionIndex",!0);if(r.length>0)return r[0].subscriptionIndex;throw Error("getLastRegisteredExclusiveSubscriptionIndex fehler")}registerKey(i,r){return this.shortcut.add(i,()=>this.emit(i),r),this}init(){}emit(i){this.exclusiveBlockedKeyCodes.some(r=>r.keyCode===i)||this.onKeyPress.emit(i),this._onKeyPress.emit(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var hK,yPe=Q(()=>{hK=class{static getWorkplaceText(e){return e.replace("backoffice","Backoffice").replace("reception","Empfang")}}});var Cm,B8=Q(()=>{Cm=class{static reload(e){window.location.reload()}}});var _Pe,CPe=Q(()=>{_Pe=(()=>{let e=class e{};e.buildTimestamp=1730222895702,e.version="4.3.238";let t=e;return t})()});function $k(t){return new Zpe(t)}function dTt(t,e,n){let i=n.path.split("/");if(i.length>t.length||n.pathMatch==="full"&&(e.hasChildren()||i.length<t.length))return null;let r={};for(let s=0;s<i.length;s++){let o=i[s],a=t[s];if(o[0]===":")r[o.substring(1)]=a;else if(o!==a.path)return null}return{consumed:t.slice(0,i.length),posParams:r}}function uTt(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!Y_(t[n],e[n]))return!1;return!0}function Y_(t,e){let n=t?Xpe(t):void 0,i=e?Xpe(e):void 0;if(!n||!i||n.length!=i.length)return!1;let r;for(let s=0;s<n.length;s++)if(r=n[s],!MPe(t[r],e[r]))return!1;return!0}function Xpe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function MPe(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;let n=[...t].sort(),i=[...e].sort();return n.every((r,s)=>i[s]===r)}else return t===e}function kPe(t){return t.length>0?t[t.length-1]:null}function Ub(t){return T9(t)?t:$M(t)?bp(Promise.resolve(t)):Fr(t)}function xPe(t,e,n){return hTt[n.paths](t.root,e.root,n.matrixParams)&&IPe[n.queryParams](t.queryParams,e.queryParams)&&!(n.fragment==="exact"&&t.fragment!==e.fragment)}function pTt(t,e){return Y_(t,e)}function APe(t,e,n){if(!hT(t.segments,e.segments)||!fK(t.segments,e.segments,n)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let i in e.children)if(!t.children[i]||!APe(t.children[i],e.children[i],n))return!1;return!0}function mTt(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>MPe(t[n],e[n]))}function PPe(t,e,n){return RPe(t,e,e.segments,n)}function RPe(t,e,n,i){if(t.segments.length>n.length){let r=t.segments.slice(0,n.length);return!(!hT(r,n)||e.hasChildren()||!fK(r,n,i))}else if(t.segments.length===n.length){if(!hT(t.segments,n)||!fK(t.segments,n,i))return!1;for(let r in e.children)if(!t.children[r]||!PPe(t.children[r],e.children[r],i))return!1;return!0}else{let r=n.slice(0,t.segments.length),s=n.slice(t.segments.length);return!hT(t.segments,r)||!fK(t.segments,r,i)||!t.children[wl]?!1:RPe(t.children[wl],e,s,i)}}function fK(t,e,n){return e.every((i,r)=>IPe[n](t[r].parameters,i.parameters))}function fTt(t,e){return hT(t,e)&&t.every((n,i)=>Y_(n.parameters,e[i].parameters))}function hT(t,e){return t.length!==e.length?!1:t.every((n,i)=>n.path===e[i].path)}function gTt(t,e){let n=[];return Object.entries(t.children).forEach(([i,r])=>{i===wl&&(n=n.concat(e(r,i)))}),Object.entries(t.children).forEach(([i,r])=>{i!==wl&&(n=n.concat(e(r,i)))}),n}function gK(t){return t.segments.map(e=>LPe(e)).join("/")}function BN(t,e){if(!t.hasChildren())return gK(t);if(e){let n=t.children[wl]?BN(t.children[wl],!1):"",i=[];return Object.entries(t.children).forEach(([r,s])=>{r!==wl&&i.push(`${r}:${BN(s,!1)}`)}),i.length>0?`${n}(${i.join("//")})`:n}else{let n=gTt(t,(i,r)=>r===wl?[BN(t.children[wl],!1)]:[`${r}:${BN(i,!1)}`]);return Object.keys(t.children).length===1&&t.children[wl]!=null?`${gK(t)}/${n[0]}`:`${gK(t)}/(${n.join("//")})`}}function FPe(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function pK(t){return FPe(t).replace(/%3B/gi,";")}function yTt(t){return encodeURI(t)}function Qpe(t){return FPe(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function vK(t){return decodeURIComponent(t)}function bPe(t){return vK(t.replace(/\+/g,"%20"))}function LPe(t){return`${Qpe(t.path)}${_Tt(t.parameters)}`}function _Tt(t){return Object.entries(t).map(([e,n])=>`;${Qpe(e)}=${Qpe(n)}`).join("")}function CTt(t){let e=Object.entries(t).map(([n,i])=>Array.isArray(i)?i.map(r=>`${pK(n)}=${pK(r)}`).join("&"):`${pK(n)}=${pK(i)}`).filter(n=>n);return e.length?`?${e.join("&")}`:""}function $pe(t){let e=t.match(xTt);return e?e[0]:""}function wTt(t){let e=t.match(bTt);return e?e[0]:""}function TTt(t){let e=t.match(STt);return e?e[0]:""}function ETt(t){let e=t.match(DTt);return e?e[0]:""}function OPe(t){return t.segments.length>0?new zd([],{[wl]:t}):t}function NPe(t){let e={};for(let[i,r]of Object.entries(t.children)){let s=NPe(r);if(i===wl&&s.segments.length===0&&s.hasChildren())for(let[o,a]of Object.entries(s.children))e[o]=a;else(s.segments.length>0||s.hasChildren())&&(e[i]=s)}let n=new zd(t.segments,e);return MTt(n)}function MTt(t){if(t.numberOfChildren===1&&t.children[wl]){let e=t.children[wl];return new zd(t.segments.concat(e.segments),e.children)}return t}function mT(t){return t instanceof H8}function kTt(t,e,n=null,i=null){let r=VPe(t);return BPe(r,e,n,i)}function VPe(t){let e;function n(s){let o={};for(let l of s.children){let c=n(l);o[l.outlet]=c}let a=new zd(s.url,o);return s===t&&(e=a),a}let i=n(t.root),r=OPe(i);return e??r}function BPe(t,e,n,i){let r=t;for(;r.parent;)r=r.parent;if(e.length===0)return Kpe(r,r,r,n,i);let s=ITt(e);if(s.toRoot())return Kpe(r,r,new zd([],{}),n,i);let o=ATt(s,r,t),a=o.processChildren?GN(o.segmentGroup,o.index,s.commands):HPe(o.segmentGroup,o.index,s.commands);return Kpe(r,o.segmentGroup,a,n,i)}function yK(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function jN(t){return typeof t=="object"&&t!=null&&t.outlets}function Kpe(t,e,n,i,r){let s={};i&&Object.entries(i).forEach(([l,c])=>{s[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`});let o;t===e?o=n:o=zPe(t,e,n);let a=OPe(NPe(o));return new H8(a,s,r)}function zPe(t,e,n){let i={};return Object.entries(t.children).forEach(([r,s])=>{s===e?i[r]=n:i[r]=zPe(s,e,n)}),new zd(t.segments,i)}function ITt(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new _K(!0,0,t);let e=0,n=!1,i=t.reduce((r,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let a={};return Object.entries(s.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return typeof s!="string"?[...r,s]:o===0?(s.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?n=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,s]},[]);return new _K(n,e,i)}function ATt(t,e,n){if(t.isAbsolute)return new Wk(e,!0,0);if(!n)return new Wk(e,!1,NaN);if(n.parent===null)return new Wk(n,!0,0);let i=yK(t.commands[0])?0:1,r=n.segments.length-1+i;return PTt(n,r,t.numberOfDoubleDots)}function PTt(t,e,n){let i=t,r=e,s=n;for(;s>r;){if(s-=r,i=i.parent,!i)throw new to(4005,!1);r=i.segments.length}return new Wk(i,!1,r-s)}function RTt(t){return jN(t[0])?t[0].outlets:{[wl]:t}}function HPe(t,e,n){if(t??=new zd([],{}),t.segments.length===0&&t.hasChildren())return GN(t,e,n);let i=FTt(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex<t.segments.length){let s=new zd(t.segments.slice(0,i.pathIndex),{});return s.children[wl]=new zd(t.segments.slice(i.pathIndex),t.children),GN(s,0,r)}else return i.match&&r.length===0?new zd(t.segments,{}):i.match&&!t.hasChildren()?eme(t,e,n):i.match?GN(t,0,r):eme(t,e,n)}function GN(t,e,n){if(n.length===0)return new zd(t.segments,{});{let i=RTt(n),r={};if(Object.keys(i).some(s=>s!==wl)&&t.children[wl]&&t.numberOfChildren===1&&t.children[wl].segments.length===0){let s=GN(t.children[wl],e,n);return new zd(t.segments,s.children)}return Object.entries(i).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(r[s]=HPe(t.children[s],e,o))}),Object.entries(t.children).forEach(([s,o])=>{i[s]===void 0&&(r[s]=o)}),new zd(t.segments,r)}}function FTt(t,e,n){let i=0,r=e,s={match:!1,pathIndex:0,commandIndex:0};for(;r<t.segments.length;){if(i>=n.length)return s;let o=t.segments[r],a=n[i];if(jN(a))break;let l=`${a}`,c=i<n.length-1?n[i+1]:null;if(r>0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!SPe(l,c,o))return s;i+=2}else{if(!SPe(l,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}function eme(t,e,n){let i=t.segments.slice(0,e),r=0;for(;r<n.length;){let s=n[r];if(jN(s)){let l=LTt(s.outlets);return new zd(i,l)}if(r===0&&yK(n[0])){let l=t.segments[e];i.push(new uT(l.path,wPe(n[0]))),r++;continue}let o=jN(s)?s.outlets[wl]:`${s}`,a=r<n.length-1?n[r+1]:null;o&&a&&yK(a)?(i.push(new uT(o,wPe(a))),r+=2):(i.push(new uT(o,{})),r++)}return new zd(i,{})}function LTt(t){let e={};return Object.entries(t).forEach(([n,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(e[n]=eme(new zd([],{}),0,i))}),e}function wPe(t){let e={};return Object.entries(t).forEach(([n,i])=>e[n]=`${i}`),e}function SPe(t,e,n){return t==n.path&&Y_(e,n.parameters)}function OTt(t,e){return t.providers&&!t._injector&&(t._injector=QTe(t.providers,e,`Route: ${t.path}`)),t._injector??e}function Py(t){return t.outlet||wl}function NTt(t,e){let n=t.filter(i=>Py(i)===e);return n.push(...t.filter(i=>Py(i)!==e)),n}function iV(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let n=e.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}function hme(t,e){if(t===e.value)return e;for(let n of e.children){let i=hme(t,n);if(i)return i}return null}function pme(t,e){if(t===e.value)return[e];for(let n of e.children){let i=pme(t,n);if(i.length)return i.unshift(e),i}return[]}function Gk(t){let e={};return t&&t.children.forEach(n=>e[n.value.outlet]=n),e}function GPe(t){let e=VTt(t),n=new qs([new uT("",{})]),i=new qs({}),r=new qs({}),s=new qs({}),o=new qs(""),a=new gs(n,i,s,o,r,wl,t,e.root);return a.snapshot=e.root,new bK(new g4(a,[]),e)}function VTt(t){let e={},n={},i={},r="",s=new Uk([],e,i,r,n,wl,t,null,{});return new SK("",new g4(s,[]))}function wK(t,e,n="emptyOnly"){let i,{routeConfig:r}=t;return e!==null&&(n==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?i={params:ve(ve({},e.params),t.params),data:ve(ve({},e.data),t.data),resolve:ve(ve(ve(ve({},t.data),e.data),r?.data),t._resolvedData)}:i={params:ve({},t.params),data:ve({},t.data),resolve:ve(ve({},t.data),t._resolvedData??{})},r&&UPe(r)&&(i.resolve[eV]=r.title),i}function bme(t,e){e.value._routerState=t,e.children.forEach(n=>bme(t,n))}function WPe(t){let e=t.children.length>0?` { ${t.children.map(WPe).join(", ")} } `:"";return`${t.value}${e}`}function Ype(t){if(t.snapshot){let e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Y_(e.queryParams,n.queryParams)||t.queryParamsSubject.next(n.queryParams),e.fragment!==n.fragment&&t.fragmentSubject.next(n.fragment),Y_(e.params,n.params)||t.paramsSubject.next(n.params),uTt(e.url,n.url)||t.urlSubject.next(n.url),Y_(e.data,n.data)||t.dataSubject.next(n.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function mme(t,e){let n=Y_(t.params,e.params)&&fTt(t.url,e.url),i=!t.parent!=!e.parent;return n&&!i&&(!t.parent||mme(t.parent,e.parent))}function UPe(t){return typeof t.title=="string"||t.title===null}function BTt(t,e,n){let i=ZN(t,e._root,n?n._root:void 0);return new bK(i,e)}function ZN(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){let i=n.value;i._futureSnapshot=e.value;let r=zTt(t,e,n);return new g4(i,r)}else{if(t.shouldAttach(e.value)){let s=t.retrieve(e.value);if(s!==null){let o=s.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(a=>ZN(t,a)),o}}let i=HTt(e.value),r=e.children.map(s=>ZN(t,s));return new g4(i,r)}}function zTt(t,e,n){return e.children.map(i=>{for(let r of n.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return ZN(t,i,r);return ZN(t,i)})}function HTt(t){return new gs(new qs(t.url),new qs(t.params),new qs(t.queryParams),new qs(t.fragment),new qs(t.data),t.outlet,t.component,t)}function TK(t,e){let{redirectTo:n,navigationBehaviorOptions:i}=mT(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=$Pe(!1,v4.Redirect);return r.url=n,r.navigationBehaviorOptions=i,r}function $Pe(t,e){let n=new Error(`NavigationCancelingError: ${t||""}`);return n[jPe]=!0,n.cancellationCode=e,n}function GTt(t){return KPe(t)&&mT(t.url)}function KPe(t){return!!t&&t[jPe]}function UTt(t,e,n){let i=t._root,r=e?e._root:null;return zN(i,r,n,[i.value])}function jTt(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function qk(t,e){let n=Symbol(),i=e.get(t,n);return i===n?typeof t=="function"&&!LTe(t)?t:e.get(t):i}function zN(t,e,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=Gk(e);return t.children.forEach(o=>{$Tt(o,s[o.value.outlet],n,i.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,a])=>UN(a,n.getContext(o),r)),r}function $Tt(t,e,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=t.value,o=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let l=KTt(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new DK(i)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?zN(t,e,a?a.children:null,i,r):zN(t,e,n,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new jk(a.outlet.component,o))}else o&&UN(e,a,r),r.canActivateChecks.push(new DK(i)),s.component?zN(t,null,a?a.children:null,i,r):zN(t,null,n,i,r);return r}function KTt(t,e,n){if(typeof n=="function")return n(t,e);switch(n){case"pathParamsChange":return!hT(t.url,e.url);case"pathParamsOrQueryParamsChange":return!hT(t.url,e.url)||!Y_(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!mme(t,e)||!Y_(t.queryParams,e.queryParams);case"paramsChange":default:return!mme(t,e)}}function UN(t,e,n){let i=Gk(t),r=t.value;Object.entries(i).forEach(([s,o])=>{r.component?e?UN(o,e.children.getContext(s),n):UN(o,null,n):UN(o,e,n)}),r.component?e&&e.outlet&&e.outlet.isActivated?n.canDeactivateChecks.push(new jk(e.outlet.component,r)):n.canDeactivateChecks.push(new jk(null,r)):n.canDeactivateChecks.push(new jk(null,r))}function nV(t){return typeof t=="function"}function YTt(t){return typeof t=="boolean"}function qTt(t){return t&&nV(t.canLoad)}function ZTt(t){return t&&nV(t.canActivate)}function XTt(t){return t&&nV(t.canActivateChild)}function QTt(t){return t&&nV(t.canDeactivate)}function JTt(t){return t&&nV(t.canMatch)}function YPe(t){return t instanceof MTe||t?.name==="EmptyError"}function Yk(){return Fl(t=>P_(t.map(e=>e.pipe(ic(1),ll(mK)))).pipe(lr(e=>{for(let n of e)if(n!==!0){if(n===mK)return mK;if(n===!1||eDt(n))return n}return!0}),Ks(e=>e!==mK),ic(1)))}function eDt(t){return mT(t)||t instanceof XN}function tDt(t,e){return Zf(n=>{let{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=n;return o.length===0&&s.length===0?Fr(St(ve({},n),{guardsResult:!0})):iDt(o,i,r,t).pipe(Zf(a=>a&&YTt(a)?nDt(i,s,t,e):Fr(a)),lr(a=>St(ve({},n),{guardsResult:a})))})}function iDt(t,e,n,i){return bp(t).pipe(Zf(r=>lDt(r.component,r.route,n,e,i)),Jd(r=>r!==!0,!0))}function nDt(t,e,n,i){return bp(e).pipe(D9(r=>cj(sDt(r.route.parent,i),rDt(r.route,i),aDt(t,r.path,n),oDt(t,r.route,n))),Jd(r=>r!==!0,!0))}function rDt(t,e){return t!==null&&e&&e(new YN(t)),Fr(!0)}function sDt(t,e){return t!==null&&e&&e(new lme(t)),Fr(!0)}function oDt(t,e,n){let i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||i.length===0)return Fr(!0);let r=i.map(s=>my(()=>{let o=iV(e)??n,a=qk(s,o),l=ZTt(a)?a.canActivate(e,t):fy(o,()=>a(e,t));return Ub(l).pipe(Jd())}));return Fr(r).pipe(Yk())}function aDt(t,e,n){let i=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(o=>jTt(o)).filter(o=>o!==null).map(o=>my(()=>{let a=o.guards.map(l=>{let c=iV(o.node)??n,d=qk(l,c),u=XTt(d)?d.canActivateChild(i,t):fy(c,()=>d(i,t));return Ub(u).pipe(Jd())});return Fr(a).pipe(Yk())}));return Fr(s).pipe(Yk())}function lDt(t,e,n,i,r){let s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||s.length===0)return Fr(!0);let o=s.map(a=>{let l=iV(e)??r,c=qk(a,l),d=QTt(c)?c.canDeactivate(t,e,n,i):fy(l,()=>c(t,e,n,i));return Ub(d).pipe(Jd())});return Fr(o).pipe(Yk())}function cDt(t,e,n,i){let r=e.canLoad;if(r===void 0||r.length===0)return Fr(!0);let s=r.map(o=>{let a=qk(o,t),l=qTt(a)?a.canLoad(e,n):fy(t,()=>a(e,n));return Ub(l)});return Fr(s).pipe(Yk(),qPe(i))}function qPe(t){return DTe(ac(e=>{if(typeof e!="boolean")throw TK(t,e)}),lr(e=>e===!0))}function dDt(t,e,n,i){let r=e.canMatch;if(!r||r.length===0)return Fr(!0);let s=r.map(o=>{let a=qk(o,t),l=JTt(a)?a.canMatch(e,n):fy(t,()=>a(e,n));return Ub(l)});return Fr(s).pipe(Yk(),qPe(i))}function Hk(t){return S9(new QN(t))}function uDt(t){return S9(new to(4e3,!1))}function hDt(t){return S9($Pe(!1,v4.GuardRejected))}function pDt(t,e,n,i,r){let s=ZPe(t,e,n);return s.matched?(i=OTt(e,i),dDt(i,e,n,r).pipe(lr(o=>o===!0?s:ve({},yme)))):Fr(s)}function ZPe(t,e,n){if(e.path==="**")return mDt(n);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||n.length>0)?ve({},yme):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let r=(e.matcher||dTt)(n,t,e);if(!r)return ve({},yme);let s={};Object.entries(r.posParams??{}).forEach(([a,l])=>{s[a]=l.path});let o=r.consumed.length>0?ve(ve({},s),r.consumed[r.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:n.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function mDt(t){return{matched:!0,parameters:t.length>0?kPe(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function TPe(t,e,n,i){return n.length>0&&vDt(t,n,i)?{segmentGroup:new zd(e,gDt(i,new zd(n,t.children))),slicedSegments:[]}:n.length===0&&yDt(t,n,i)?{segmentGroup:new zd(t.segments,fDt(t,n,i,t.children)),slicedSegments:n}:{segmentGroup:new zd(t.segments,t.children),slicedSegments:n}}function fDt(t,e,n,i){let r={};for(let s of n)if(MK(t,e,s)&&!i[Py(s)]){let o=new zd([],{});r[Py(s)]=o}return ve(ve({},i),r)}function gDt(t,e){let n={};n[wl]=e;for(let i of t)if(i.path===""&&Py(i)!==wl){let r=new zd([],{});n[Py(i)]=r}return n}function vDt(t,e,n){return n.some(i=>MK(t,e,i)&&Py(i)!==wl)}function yDt(t,e,n){return n.some(i=>MK(t,e,i))}function MK(t,e,n){return(t.hasChildren()||e.length>0)&&n.pathMatch==="full"?!1:n.path===""}function _Dt(t,e,n){return e.length===0&&!t.children[n]}function CDt(t,e,n,i,r,s,o="emptyOnly"){return new Cme(t,e,n,i,r,o,s).recognize()}function bDt(t){t.sort((e,n)=>e.value.outlet===wl?-1:n.value.outlet===wl?1:e.value.outlet.localeCompare(n.value.outlet))}function wDt(t){let e=t.value.routeConfig;return e&&e.path===""}function XPe(t){let e=[],n=new Set;for(let i of t){if(!wDt(i)){e.push(i);continue}let r=e.find(s=>i.value.routeConfig===s.value.routeConfig);r!==void 0?(r.children.push(...i.children),n.add(r)):e.push(i)}for(let i of n){let r=XPe(i.children);e.push(new g4(i.value,r))}return e.filter(i=>!n.has(i))}function DPe(t){return t.data||{}}function EPe(t){return t.resolve||{}}function SDt(t,e,n,i,r,s){return Zf(o=>CDt(t,e,n,i,o.extractedUrl,r,s).pipe(lr(({state:a,tree:l})=>St(ve({},o),{targetSnapshot:a,urlAfterRedirects:l}))))}function TDt(t,e){return Zf(n=>{let{targetSnapshot:i,guards:{canActivateChecks:r}}=n;if(!r.length)return Fr(n);let s=new Set(r.map(l=>l.route)),o=new Set;for(let l of s)if(!o.has(l))for(let c of QPe(l))o.add(c);let a=0;return bp(o).pipe(D9(l=>s.has(l)?DDt(l,i,t,e):(l.data=wK(l,l.parent,t).resolve,Fr(void 0))),ac(()=>a++),CO(1),Zf(l=>a===o.size?Fr(n):pv))})}function QPe(t){let e=t.children.map(n=>QPe(n)).flat();return[t,...e]}function DDt(t,e,n,i){let r=t.routeConfig,s=t._resolve;return r?.title!==void 0&&!UPe(r)&&(s[eV]=r.title),EDt(s,t,e,i).pipe(lr(o=>(t._resolvedData=o,t.data=wK(t,t.parent,n).resolve,null)))}function EDt(t,e,n,i){let r=Xpe(t);if(r.length===0)return Fr({});let s={};return bp(r).pipe(Zf(o=>MDt(t[o],e,n,i).pipe(Jd(),ac(a=>{if(a instanceof XN)throw TK(new pT,a);s[o]=a}))),CO(1),ITe(s),bb(o=>YPe(o)?pv:S9(o)))}function MDt(t,e,n,i){let r=iV(e)??i,s=qk(t,r),o=s.resolve?s.resolve(e,n):fy(r,()=>s(e,n));return Ub(o)}function qpe(t){return Fl(e=>{let n=t(e);return n?bp(n).pipe(lr(()=>e)):Fr(e)})}function Dme(t){let e=t.children&&t.children.map(Dme),n=e?St(ve({},t),{children:e}):ve({},t);return!n.component&&!n.loadComponent&&(e||n.loadChildren)&&n.outlet&&n.outlet!==wl&&(n.component=IDt),n}function PDt(t,e,n,i){return Ub(t.loadChildren()).pipe(lr(eRe),Zf(r=>r instanceof XTe||Array.isArray(r)?Fr(r):bp(e.compileModuleAsync(r))),lr(r=>{i&&i(t);let s,o,a=!1;return Array.isArray(r)?(o=r,a=!0):(s=r.create(n).injector,o=s.get(Eme,[],{optional:!0,self:!0}).flat()),{routes:o.map(Dme),injector:s}}))}function RDt(t){return t&&typeof t=="object"&&"default"in t}function eRe(t){return RDt(t)?t.default:t}function VDt(t){return t!==WN}function GDt(t,e){t.events.pipe(Ks(n=>n instanceof Av||n instanceof z8||n instanceof KN||n instanceof fT),lr(n=>n instanceof Av||n instanceof fT?HN.COMPLETE:(n instanceof z8?n.code===v4.Redirect||n.code===v4.SupersededByNewNavigation:!1)?HN.REDIRECTING:HN.FAILED),Ks(n=>n!==HN.REDIRECTING),ic(1)).subscribe(()=>{e()})}function WDt(t){throw t}function $Dt(t){for(let e=0;e<t.length;e++)if(t[e]==null)throw new to(4008,!1)}function KDt(t){return!(t instanceof qN)&&!(t instanceof Kk)}function iRe(t,...e){return wO([{provide:Eme,multi:!0,useValue:t},[],{provide:gs,useFactory:qDt,deps:[Ll]},{provide:EO,multi:!0,useFactory:ZDt},e.map(n=>n.\u0275providers)])}function qDt(t){return t.routerState.root}function ZDt(){let t=Ve($o);return e=>{let n=t.get(Cy);if(e!==n.components[0])return;let i=t.get(Ll),r=t.get(XDt);t.get(QDt)===1&&i.initialNavigation(),t.get(JDt,null,Ude.Optional)?.setUpPreloading(),t.get(YDt,null,Ude.Optional)?.init(),i.resetRootComponentType(n.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var wl,eV,Zpe,hTt,IPe,H8,zd,uT,tV,pT,vTt,xTt,bTt,STt,DTt,Jpe,_K,Wk,WN,k0,Iv,$N,Av,v4,tme,z8,fT,KN,CK,ime,nme,rme,sme,ome,ame,lme,cme,YN,dme,qN,Kk,ume,EK,xK,g4,bK,gs,Uk,SK,wme,fme,Sme,XN,jPe,WTt,gme,DK,jk,mK,QN,JN,vme,yme,_me,xDt,Cme,JPe,kDt,Tme,IDt,Eme,ADt,Mme,FDt,LDt,ODt,NDt,BDt,xme,zDt,tRe,HDt,HN,UDt,jDt,Ll,kK,YDt,XDt,QDt,JDt,ma=Q(()=>{me();me();$n();ri();ri();Cl();od();wl="primary",eV=Symbol("RouteTitle"),Zpe=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let n=this.params[e];return Array.isArray(n)?n[0]:n}return null}getAll(e){if(this.has(e)){let n=this.params[e];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};hTt={exact:APe,subset:PPe},IPe={exact:pTt,subset:mTt,ignored:()=>!0};H8=class{constructor(e=new zd([],{}),n={},i=null){this.root=e,this.queryParams=n,this.fragment=i}get queryParamMap(){return this._queryParamMap??=$k(this.queryParams),this._queryParamMap}toString(){return vTt.serialize(this)}},zd=class{constructor(e,n){this.segments=e,this.children=n,this.parent=null,Object.values(n).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return gK(this)}},uT=class{constructor(e,n){this.path=e,this.parameters=n}get parameterMap(){return this._parameterMap??=$k(this.parameters),this._parameterMap}toString(){return LPe(this)}};tV=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:()=>new pT,providedIn:"root"});let t=e;return t})(),pT=class{parse(e){let n=new Jpe(e);return new H8(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(e){let n=`/${BN(e.root,!0)}`,i=CTt(e.queryParams),r=typeof e.fragment=="string"?`#${yTt(e.fragment)}`:"";return`${n}${i}${r}`}},vTt=new pT;xTt=/^[^\/()?;#]+/;bTt=/^[^\/()?;=#]+/;STt=/^[^=?&#]+/;DTt=/^[^&#]+/;Jpe=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new zd([],{}):new zd([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(n).length>0)&&(i[wl]=new zd(e,n)),i}parseSegment(){let e=$pe(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new to(4009,!1);return this.capture(e),new uT(vK(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let n=wTt(this.remaining);if(!n)return;this.capture(n);let i="";if(this.consumeOptional("=")){let r=$pe(this.remaining);r&&(i=r,this.capture(i))}e[vK(n)]=vK(i)}parseQueryParam(e){let n=TTt(this.remaining);if(!n)return;this.capture(n);let i="";if(this.consumeOptional("=")){let o=ETt(this.remaining);o&&(i=o,this.capture(i))}let r=bPe(n),s=bPe(i);if(e.hasOwnProperty(r)){let o=e[r];Array.isArray(o)||(o=[o],e[r]=o),o.push(s)}else e[r]=s}parseParens(e){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=$pe(this.remaining),r=this.remaining[i.length];if(r!=="/"&&r!==")"&&r!==";")throw new to(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=wl);let o=this.parseChildren();n[s]=Object.keys(o).length===1?o[wl]:new zd([],o),this.consumeOptional("//")}return n}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new to(4011,!1)}};_K=class{constructor(e,n,i){if(this.isAbsolute=e,this.numberOfDoubleDots=n,this.commands=i,e&&i.length>0&&yK(i[0]))throw new to(4003,!1);let r=i.find(jN);if(r&&r!==kPe(i))throw new to(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};Wk=class{constructor(e,n,i){this.segmentGroup=e,this.processChildren=n,this.index=i}};WN="imperative",k0=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(k0||{}),Iv=class{constructor(e,n){this.id=e,this.url=n}},$N=class extends Iv{constructor(e,n,i="imperative",r=null){super(e,n),this.type=k0.NavigationStart,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Av=class extends Iv{constructor(e,n,i){super(e,n),this.urlAfterRedirects=i,this.type=k0.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},v4=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(v4||{}),tme=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(tme||{}),z8=class extends Iv{constructor(e,n,i,r){super(e,n),this.reason=i,this.code=r,this.type=k0.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},fT=class extends Iv{constructor(e,n,i,r){super(e,n),this.reason=i,this.code=r,this.type=k0.NavigationSkipped}},KN=class extends Iv{constructor(e,n,i,r){super(e,n),this.error=i,this.target=r,this.type=k0.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},CK=class extends Iv{constructor(e,n,i,r){super(e,n),this.urlAfterRedirects=i,this.state=r,this.type=k0.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ime=class extends Iv{constructor(e,n,i,r){super(e,n),this.urlAfterRedirects=i,this.state=r,this.type=k0.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},nme=class extends Iv{constructor(e,n,i,r,s){super(e,n),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=k0.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},rme=class extends Iv{constructor(e,n,i,r){super(e,n),this.urlAfterRedirects=i,this.state=r,this.type=k0.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},sme=class extends Iv{constructor(e,n,i,r){super(e,n),this.urlAfterRedirects=i,this.state=r,this.type=k0.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ome=class{constructor(e){this.route=e,this.type=k0.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},ame=class{constructor(e){this.route=e,this.type=k0.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},lme=class{constructor(e){this.snapshot=e,this.type=k0.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},cme=class{constructor(e){this.snapshot=e,this.type=k0.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},YN=class{constructor(e){this.snapshot=e,this.type=k0.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},dme=class{constructor(e){this.snapshot=e,this.type=k0.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},qN=class{},Kk=class{constructor(e,n){this.url=e,this.navigationBehaviorOptions=n}};ume=class{get injector(){return iV(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new EK(this.rootInjector),this.attachRef=null}},EK=(()=>{let e=class e{constructor(i){this.rootInjector=i,this.contexts=new Map}onChildOutletCreated(i,r){let s=this.getOrCreateContext(i);s.outlet=r,this.contexts.set(i,s)}onChildOutletDestroyed(i){let r=this.getContext(i);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let r=this.getContext(i);return r||(r=new ume(this.rootInjector),this.contexts.set(i,r)),r}getContext(i){return this.contexts.get(i)||null}};e.\u0275fac=function(r){return new(r||e)(it(fv))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),xK=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let n=this.pathFromRoot(e);return n.length>1?n[n.length-2]:null}children(e){let n=hme(e,this._root);return n?n.children.map(i=>i.value):[]}firstChild(e){let n=hme(e,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(e){let n=pme(e,this._root);return n.length<2?[]:n[n.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return pme(e,this._root).map(n=>n.value)}};g4=class{constructor(e,n){this.value=e,this.children=n}toString(){return`TreeNode(${this.value})`}};bK=class extends xK{constructor(e,n){super(e),this.snapshot=n,bme(this,e)}toString(){return this.snapshot.toString()}};gs=class{constructor(e,n,i,r,s,o,a,l){this.urlSubject=e,this.paramsSubject=n,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(lr(c=>c[eV]))??Fr(void 0),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=s}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(lr(e=>$k(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(lr(e=>$k(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};Uk=class{get title(){return this.data?.[eV]}constructor(e,n,i,r,s,o,a,l,c){this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=$k(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=$k(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(i=>i.toString()).join("/"),n=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${n}')`}},SK=class extends xK{constructor(e,n){super(n),this.url=e,bme(this,n)}toString(){return WPe(this._root)}};wme=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=wl,this.activateEvents=new nt,this.deactivateEvents=new nt,this.attachEvents=new nt,this.detachEvents=new nt,this.parentContexts=Ve(EK),this.location=Ve(Na),this.changeDetector=Ve(Kt),this.inputBinder=Ve(Sme,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(i){if(i.name){let{firstChange:r,previousValue:s}=i.name;if(r)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(i){return this.parentContexts.getContext(i)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let i=this.parentContexts.getContext(this.name);i?.route&&(i.attachRef?this.attach(i.attachRef,i.route):this.activateWith(i.route,i.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new to(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new to(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new to(4012,!1);this.location.detach();let i=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(i.instance),i}attach(i,r){this.activated=i,this._activatedRoute=r,this.location.insert(i.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(i.instance)}deactivate(){if(this.activated){let i=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(i)}}activateWith(i,r){if(this.isActivated)throw new to(4013,!1);this._activatedRoute=i;let s=this.location,a=i.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,c=new fme(i,l,s.injector);this.activated=s.createComponent(a,{index:s.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[yn]});let t=e;return t})(),fme=class t{__ngOutletInjector(e){return new t(this.route,this.childContexts,e)}constructor(e,n,i){this.route=e,this.childContexts=n,this.parent=i}get(e,n){return e===gs?this.route:e===EK?this.childContexts:this.parent.get(e,n)}},Sme=new Ri("");XN=class{constructor(e,n){this.redirectTo=e,this.navigationBehaviorOptions=n}},jPe="ngNavigationCancelingError";WTt=(t,e,n,i)=>lr(r=>(new gme(e,r.targetRouterState,r.currentRouterState,n,i).activate(t),r)),gme=class{constructor(e,n,i,r,s){this.routeReuseStrategy=e,this.futureState=n,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=s}activate(e){let n=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,i,e),Ype(this.futureState.root),this.activateChildRoutes(n,i,e)}deactivateChildRoutes(e,n,i){let r=Gk(n);e.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(e,n,i){let r=e.value,s=n?n.value:null;if(r===s)if(r.component){let o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(e,n,o.children)}else this.deactivateChildRoutes(e,n,i);else s&&this.deactivateRouteAndItsChildren(n,i)}deactivateRouteAndItsChildren(e,n){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,n):this.deactivateRouteAndOutlet(e,n)}detachAndStoreRouteSubtree(e,n){let i=n.getContext(e.value.outlet),r=i&&e.value.component?i.children:n,s=Gk(e);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(i&&i.outlet){let o=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:a})}}deactivateRouteAndOutlet(e,n){let i=n.getContext(e.value.outlet),r=i&&e.value.component?i.children:n,s=Gk(e);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(e,n,i){let r=Gk(n);e.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new dme(s.value.snapshot))}),e.children.length&&this.forwardEvent(new cme(e.value.snapshot))}activateRoutes(e,n,i){let r=e.value,s=n?n.value:null;if(Ype(r),r===s)if(r.component){let o=i.getOrCreateContext(r.outlet);this.activateChildRoutes(e,n,o.children)}else this.activateChildRoutes(e,n,i);else if(r.component){let o=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),Ype(a.route.value),this.activateChildRoutes(e,null,o.children)}else o.attachRef=null,o.route=r,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(e,null,o.children)}else this.activateChildRoutes(e,null,i)}},DK=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},jk=class{constructor(e,n){this.component=e,this.route=n}};mK=Symbol("INITIAL_VALUE");QN=class{constructor(e){this.segmentGroup=e||null}},JN=class extends Error{constructor(e){super(),this.urlTree=e}};vme=class{constructor(e,n){this.urlSerializer=e,this.urlTree=n}lineralizeSegments(e,n){let i=[],r=n.root;for(;;){if(i=i.concat(r.segments),r.numberOfChildren===0)return Fr(i);if(r.numberOfChildren>1||!r.children[wl])return uDt(`${e.redirectTo}`);r=r.children[wl]}}applyRedirectCommands(e,n,i,r,s){if(typeof n!="string"){let a=n,{queryParams:l,fragment:c,routeConfig:d,url:u,outlet:m,params:f,data:_,title:x}=r,D=fy(s,()=>a({params:f,data:_,queryParams:l,fragment:c,routeConfig:d,url:u,outlet:m,title:x}));if(D instanceof H8)throw new JN(D);n=D}let o=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),e,i);if(n[0]==="/")throw new JN(o);return o}applyRedirectCreateUrlTree(e,n,i,r){let s=this.createSegmentGroup(e,n.root,i,r);return new H8(s,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(e,n){let i={};return Object.entries(e).forEach(([r,s])=>{if(typeof s=="string"&&s[0]===":"){let a=s.substring(1);i[r]=n[a]}else i[r]=s}),i}createSegmentGroup(e,n,i,r){let s=this.createSegments(e,n.segments,i,r),o={};return Object.entries(n.children).forEach(([a,l])=>{o[a]=this.createSegmentGroup(e,l,i,r)}),new zd(s,o)}createSegments(e,n,i,r){return n.map(s=>s.path[0]===":"?this.findPosParam(e,s,r):this.findOrReturn(s,i))}findPosParam(e,n,i){let r=i[n.path.substring(1)];if(!r)throw new to(4001,!1);return r}findOrReturn(e,n){let i=0;for(let r of n){if(r.path===e.path)return n.splice(i),r;i++}return e}},yme={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};_me=class{};xDt=31,Cme=class{constructor(e,n,i,r,s,o,a){this.injector=e,this.configLoader=n,this.rootComponentType=i,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a,this.applyRedirects=new vme(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new to(4002,`'${e.segmentGroup}'`)}recognize(){let e=TPe(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(lr(({children:n,rootSnapshot:i})=>{let r=new g4(i,n),s=new SK("",r),o=kTt(i,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),{state:s,tree:o}}))}match(e){let n=new Uk([],Object.freeze({}),Object.freeze(ve({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),wl,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,wl,n).pipe(lr(i=>({children:i,rootSnapshot:n})),bb(i=>{if(i instanceof JN)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof QN?this.noMatchError(i):i}))}processSegmentGroup(e,n,i,r,s){return i.segments.length===0&&i.hasChildren()?this.processChildren(e,n,i,s):this.processSegment(e,n,i,i.segments,r,!0,s).pipe(lr(o=>o instanceof g4?[o]:[]))}processChildren(e,n,i,r){let s=[];for(let o of Object.keys(i.children))o==="primary"?s.unshift(o):s.push(o);return bp(s).pipe(D9(o=>{let a=i.children[o],l=NTt(n,o);return this.processSegmentGroup(e,l,a,o,r)}),HM((o,a)=>(o.push(...a),o)),Wde(null),ATe(),Zf(o=>{if(o===null)return Hk(i);let a=XPe(o);return bDt(a),Fr(a)}))}processSegment(e,n,i,r,s,o,a){return bp(n).pipe(D9(l=>this.processSegmentAgainstRoute(l._injector??e,n,l,i,r,s,o,a).pipe(bb(c=>{if(c instanceof QN)return Fr(null);throw c}))),Jd(l=>!!l),bb(l=>{if(YPe(l))return _Dt(i,r,s)?Fr(new _me):Hk(i);throw l}))}processSegmentAgainstRoute(e,n,i,r,s,o,a,l){return Py(i)!==o&&(o===wl||!MK(r,s,i))?Hk(r):i.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,i,s,o,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,n,i,s,o,l):Hk(r)}expandSegmentAgainstRouteUsingRedirect(e,n,i,r,s,o,a){let{matched:l,parameters:c,consumedSegments:d,positionalParamSegments:u,remainingSegments:m}=ZPe(n,r,s);if(!l)return Hk(n);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>xDt&&(this.allowRedirects=!1));let f=new Uk(s,c,Object.freeze(ve({},this.urlTree.queryParams)),this.urlTree.fragment,DPe(r),Py(r),r.component??r._loadedComponent??null,r,EPe(r)),_=wK(f,a,this.paramsInheritanceStrategy);f.params=Object.freeze(_.params),f.data=Object.freeze(_.data);let x=this.applyRedirects.applyRedirectCommands(d,r.redirectTo,u,f,e);return this.applyRedirects.lineralizeSegments(r,x).pipe(Zf(D=>this.processSegment(e,i,n,D.concat(m),o,!1,a)))}matchSegmentAgainstRoute(e,n,i,r,s,o){let a=pDt(n,i,r,e,this.urlSerializer);return i.path==="**"&&(n.children={}),a.pipe(Fl(l=>l.matched?(e=i._injector??e,this.getChildConfig(e,i,r).pipe(Fl(({routes:c})=>{let d=i._loadedInjector??e,{parameters:u,consumedSegments:m,remainingSegments:f}=l,_=new Uk(m,u,Object.freeze(ve({},this.urlTree.queryParams)),this.urlTree.fragment,DPe(i),Py(i),i.component??i._loadedComponent??null,i,EPe(i)),x=wK(_,o,this.paramsInheritanceStrategy);_.params=Object.freeze(x.params),_.data=Object.freeze(x.data);let{segmentGroup:D,slicedSegments:E}=TPe(n,m,f,c);if(E.length===0&&D.hasChildren())return this.processChildren(d,c,D,_).pipe(lr(I=>new g4(_,I)));if(c.length===0&&E.length===0)return Fr(new g4(_,[]));let M=Py(i)===s;return this.processSegment(d,c,D,E,M?wl:s,!0,_).pipe(lr(I=>new g4(_,I instanceof g4?[I]:[])))}))):Hk(n)))}getChildConfig(e,n,i){return n.children?Fr({routes:n.children,injector:e}):n.loadChildren?n._loadedRoutes!==void 0?Fr({routes:n._loadedRoutes,injector:n._loadedInjector}):cDt(e,n,i,this.urlSerializer).pipe(Zf(r=>r?this.configLoader.loadChildren(e,n).pipe(ac(s=>{n._loadedRoutes=s.routes,n._loadedInjector=s.injector})):hDt(n))):Fr({routes:[],injector:e})}};JPe=(()=>{let e=class e{buildTitle(i){let r,s=i.root;for(;s!==void 0;)r=this.getResolvedTitleForRoute(s)??r,s=s.children.find(o=>o.outlet===wl);return r}getResolvedTitleForRoute(i){return i.data[eV]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:()=>Ve(kDt),providedIn:"root"});let t=e;return t})(),kDt=(()=>{let e=class e extends JPe{constructor(i){super(),this.title=i}updateTitle(i){let r=this.buildTitle(i);r!==void 0&&this.title.setTitle(r)}};e.\u0275fac=function(r){return new(r||e)(it(EMe))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Tme=new Ri("",{providedIn:"root",factory:()=>({})}),IDt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["ng-component"]],standalone:!0,features:[xe],decls:1,vars:0,template:function(r,s){r&1&&ee(0,"router-outlet")},dependencies:[wme],encapsulation:2});let t=e;return t})();Eme=new Ri(""),ADt=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Ve(Yde)}loadComponent(i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return Fr(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let r=Ub(i.loadComponent()).pipe(lr(eRe),ac(o=>{this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=o}),g8(()=>{this.componentLoaders.delete(i)})),s=new yO(r,()=>new Mi).pipe(zde());return this.componentLoaders.set(i,s),s}loadChildren(i,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Fr({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=PDt(r,this.compiler,i,this.onLoadEndListener).pipe(g8(()=>{this.childrenLoaders.delete(r)})),a=new yO(o,()=>new Mi).pipe(zde());return this.childrenLoaders.set(r,a),a}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();Mme=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:()=>Ve(FDt),providedIn:"root"});let t=e;return t})(),FDt=(()=>{let e=class e{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,r){return i}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),LDt=new Ri(""),ODt=new Ri(""),NDt=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Mi,this.transitionAbortSubject=new Mi,this.configLoader=Ve(ADt),this.environmentInjector=Ve(fv),this.urlSerializer=Ve(tV),this.rootContexts=Ve(EK),this.location=Ve(S8),this.inputBindingEnabled=Ve(Sme,{optional:!0})!==null,this.titleStrategy=Ve(JPe),this.options=Ve(Tme,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=Ve(Mme),this.createViewTransition=Ve(LDt,{optional:!0}),this.navigationErrorHandler=Ve(ODt,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Fr(void 0),this.rootComponentType=null;let i=s=>this.events.next(new ome(s)),r=s=>this.events.next(new ame(s));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=i}complete(){this.transitions?.complete()}handleNavigationRequest(i){let r=++this.navigationId;this.transitions?.next(St(ve(ve({},this.transitions.value),i),{id:r}))}setupNavigations(i,r,s){return this.transitions=new qs({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:WN,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Ks(o=>o.id!==0),lr(o=>St(ve({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),Fl(o=>{let a=!1,l=!1;return Fr(o).pipe(Fl(c=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",v4.SupersededByNewNavigation),pv;this.currentTransition=o,this.currentNavigation={id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,targetBrowserUrl:typeof c.extras.browserUrl=="string"?this.urlSerializer.parse(c.extras.browserUrl):c.extras.browserUrl,trigger:c.source,extras:c.extras,previousNavigation:this.lastSuccessfulNavigation?St(ve({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let d=!i.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=c.extras.onSameUrlNavigation??i.onSameUrlNavigation;if(!d&&u!=="reload"){let m="";return this.events.next(new fT(c.id,this.urlSerializer.serialize(c.rawUrl),m,tme.IgnoredSameUrlNavigation)),c.resolve(!1),pv}if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return Fr(c).pipe(Fl(m=>{let f=this.transitions?.getValue();return this.events.next(new $N(m.id,this.urlSerializer.serialize(m.extractedUrl),m.source,m.restoredState)),f!==this.transitions?.getValue()?pv:Promise.resolve(m)}),SDt(this.environmentInjector,this.configLoader,this.rootComponentType,i.config,this.urlSerializer,this.paramsInheritanceStrategy),ac(m=>{o.targetSnapshot=m.targetSnapshot,o.urlAfterRedirects=m.urlAfterRedirects,this.currentNavigation=St(ve({},this.currentNavigation),{finalUrl:m.urlAfterRedirects});let f=new CK(m.id,this.urlSerializer.serialize(m.extractedUrl),this.urlSerializer.serialize(m.urlAfterRedirects),m.targetSnapshot);this.events.next(f)}));if(d&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:m,extractedUrl:f,source:_,restoredState:x,extras:D}=c,E=new $N(m,this.urlSerializer.serialize(f),_,x);this.events.next(E);let M=GPe(this.rootComponentType).snapshot;return this.currentTransition=o=St(ve({},c),{targetSnapshot:M,urlAfterRedirects:f,extras:St(ve({},D),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=f,Fr(o)}else{let m="";return this.events.next(new fT(c.id,this.urlSerializer.serialize(c.extractedUrl),m,tme.IgnoredByUrlHandlingStrategy)),c.resolve(!1),pv}}),ac(c=>{let d=new ime(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(d)}),lr(c=>(this.currentTransition=o=St(ve({},c),{guards:UTt(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),o)),tDt(this.environmentInjector,c=>this.events.next(c)),ac(c=>{if(o.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!="boolean")throw TK(this.urlSerializer,c.guardsResult);let d=new nme(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);this.events.next(d)}),Ks(c=>c.guardsResult?!0:(this.cancelNavigationTransition(c,"",v4.GuardRejected),!1)),qpe(c=>{if(c.guards.canActivateChecks.length)return Fr(c).pipe(ac(d=>{let u=new rme(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}),Fl(d=>{let u=!1;return Fr(d).pipe(TDt(this.paramsInheritanceStrategy,this.environmentInjector),ac({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(d,"",v4.NoDataFromResolver)}}))}),ac(d=>{let u=new sme(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}))}),qpe(c=>{let d=u=>{let m=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&m.push(this.configLoader.loadComponent(u.routeConfig).pipe(ac(f=>{u.component=f}),lr(()=>{})));for(let f of u.children)m.push(...d(f));return m};return P_(d(c.targetSnapshot.root)).pipe(Wde(null),ic(1))}),qpe(()=>this.afterPreactivation()),Fl(()=>{let{currentSnapshot:c,targetSnapshot:d}=o,u=this.createViewTransition?.(this.environmentInjector,c.root,d.root);return u?bp(u).pipe(lr(()=>o)):Fr(o)}),lr(c=>{let d=BTt(i.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=o=St(ve({},c),{targetRouterState:d}),this.currentNavigation.targetRouterState=d,o}),ac(()=>{this.events.next(new qN)}),WTt(this.rootContexts,i.routeReuseStrategy,c=>this.events.next(c),this.inputBindingEnabled),ic(1),ac({next:c=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Av(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0)},complete:()=>{a=!0}}),Mr(this.transitionAbortSubject.pipe(ac(c=>{throw c}))),g8(()=>{!a&&!l&&this.cancelNavigationTransition(o,"",v4.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),bb(c=>{if(l=!0,KPe(c))this.events.next(new z8(o.id,this.urlSerializer.serialize(o.extractedUrl),c.message,c.cancellationCode)),GTt(c)?this.events.next(new Kk(c.url,c.navigationBehaviorOptions)):o.resolve(!1);else{let d=new KN(o.id,this.urlSerializer.serialize(o.extractedUrl),c,o.targetSnapshot??void 0);try{let u=fy(this.environmentInjector,()=>this.navigationErrorHandler?.(d));if(u instanceof XN){let{message:m,cancellationCode:f}=TK(this.urlSerializer,u);this.events.next(new z8(o.id,this.urlSerializer.serialize(o.extractedUrl),m,f)),this.events.next(new Kk(u.redirectTo,u.navigationBehaviorOptions))}else{this.events.next(d);let m=i.errorHandler(c);o.resolve(!!m)}}catch(u){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(u)}}return pv}))}))}cancelNavigationTransition(i,r,s){let o=new z8(i.id,this.urlSerializer.serialize(i.extractedUrl),r,s);this.events.next(o),i.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let i=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return i.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();BDt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:()=>Ve(zDt),providedIn:"root"});let t=e;return t})(),xme=class{shouldDetach(e){return!1}store(e,n){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,n){return e.routeConfig===n.routeConfig}},zDt=(()=>{let e=class e extends xme{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),tRe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:()=>Ve(HDt),providedIn:"root"});let t=e;return t})(),HDt=(()=>{let e=class e extends tRe{constructor(){super(...arguments),this.location=Ve(S8),this.urlSerializer=Ve(tV),this.options=Ve(Tme,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=Ve(Mme),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new H8,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=GPe(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(i){return this.location.subscribe(r=>{r.type==="popstate"&&i(r.url,r.state)})}handleRouterEvent(i,r){if(i instanceof $N)this.stateMemento=this.createStateMemento();else if(i instanceof fT)this.rawUrlTree=r.initialUrl;else if(i instanceof CK){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let s=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??s,r)}}else i instanceof qN?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):i instanceof z8&&(i.code===v4.GuardRejected||i.code===v4.NoDataFromResolver)?this.restoreHistory(r):i instanceof KN?this.restoreHistory(r,!0):i instanceof Av&&(this.lastSuccessfulId=i.id,this.currentPageId=this.browserPageId)}setBrowserUrl(i,r){let s=i instanceof H8?this.urlSerializer.serialize(i):i;if(this.location.isCurrentPathEqualTo(s)||r.extras.replaceUrl){let o=this.browserPageId,a=ve(ve({},r.extras.state),this.generateNgRouterState(r.id,o));this.location.replaceState(s,"",a)}else{let o=ve(ve({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(s,"",o)}}restoreHistory(i,r=!1){if(this.canceledNavigationResolution==="computed"){let s=this.browserPageId,o=this.currentPageId-s;o!==0?this.location.historyGo(o):this.currentUrlTree===i.finalUrl&&o===0&&(this.resetState(i),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(i),this.resetUrlToCurrentUrlTree())}resetState(i){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(i,r){return this.canceledNavigationResolution==="computed"?{navigationId:i,\u0275routerPageId:r}:{navigationId:i}}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),HN=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(HN||{});UDt={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},jDt={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ll=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=Ve(Cj),this.stateManager=Ve(tRe),this.options=Ve(Tme,{optional:!0})||{},this.pendingTasks=Ve(SO),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=Ve(NDt),this.urlSerializer=Ve(tV),this.location=Ve(S8),this.urlHandlingStrategy=Ve(Mme),this._events=new Mi,this.errorHandler=this.options.errorHandler||WDt,this.navigated=!1,this.routeReuseStrategy=Ve(BDt),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=Ve(Eme,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!Ve(Sme,{optional:!0}),this.eventsSubscription=new na,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:i=>{this.console.warn(i)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let i=this.navigationTransitions.events.subscribe(r=>{try{let s=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(s!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof z8&&r.code!==v4.Redirect&&r.code!==v4.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Av)this.navigated=!0;else if(r instanceof Kk){let a=r.navigationBehaviorOptions,l=this.urlHandlingStrategy.merge(r.url,s.currentRawUrl),c=ve({browserUrl:s.extras.browserUrl,info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:s.extras.replaceUrl||this.urlUpdateStrategy==="eager"||VDt(s.source)},a);this.scheduleNavigation(l,WN,null,c,{resolve:s.resolve,reject:s.reject,promise:s.promise})}}KDt(r)&&this._events.next(r)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(i)}resetRootComponentType(i){this.routerState.root.component=i,this.navigationTransitions.rootComponentType=i}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),WN,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((i,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(i,"popstate",r)},0)})}navigateToSyncWithBrowser(i,r,s){let o={replaceUrl:!0},a=s?.navigationId?s:null;if(s){let c=ve({},s);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let l=this.parseUrl(i);this.scheduleNavigation(l,r,a,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(i){this.config=i.map(Dme),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(i,r={}){let{relativeTo:s,queryParams:o,fragment:a,queryParamsHandling:l,preserveFragment:c}=r,d=c?this.currentUrlTree.fragment:a,u=null;switch(l??this.options.defaultQueryParamsHandling){case"merge":u=ve(ve({},this.currentUrlTree.queryParams),o);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}u!==null&&(u=this.removeEmptyProps(u));let m;try{let f=s?s.snapshot:this.routerState.snapshot.root;m=VPe(f)}catch{(typeof i[0]!="string"||i[0][0]!=="/")&&(i=[]),m=this.currentUrlTree.root}return BPe(m,i,u,d??null)}navigateByUrl(i,r={skipLocationChange:!1}){let s=mT(i)?i:this.parseUrl(i),o=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(o,WN,null,r)}navigate(i,r={skipLocationChange:!1}){return $Dt(i),this.navigateByUrl(this.createUrlTree(i,r),r)}serializeUrl(i){return this.urlSerializer.serialize(i)}parseUrl(i){try{return this.urlSerializer.parse(i)}catch{return this.urlSerializer.parse("/")}}isActive(i,r){let s;if(r===!0?s=ve({},UDt):r===!1?s=ve({},jDt):s=r,mT(i))return xPe(this.currentUrlTree,i,s);let o=this.parseUrl(i);return xPe(this.currentUrlTree,o,s)}removeEmptyProps(i){return Object.entries(i).reduce((r,[s,o])=>(o!=null&&(r[s]=o),r),{})}scheduleNavigation(i,r,s,o,a){if(this.disposed)return Promise.resolve(!1);let l,c,d;a?(l=a.resolve,c=a.reject,d=a.promise):d=new Promise((m,f)=>{l=m,c=f});let u=this.pendingTasks.add();return GDt(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:i,extras:o,resolve:l,reject:c,promise:d,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),d.catch(m=>Promise.reject(m))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();kK=(()=>{let e=class e{constructor(i,r,s,o,a,l){this.router=i,this.route=r,this.tabIndexAttribute=s,this.renderer=o,this.el=a,this.locationStrategy=l,this.href=null,this.onChanges=new Mi,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1,this.routerLinkInput=null;let c=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area",this.isAnchorElement?this.subscription=i.events.subscribe(d=>{d instanceof Av&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(i){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",i)}ngOnChanges(i){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(i){i==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(mT(i)?this.routerLinkInput=i:this.routerLinkInput=Array.isArray(i)?i:[i],this.setTabIndexIfNotOnNativeEl("0"))}onClick(i,r,s,o,a){let l=this.urlTree;if(l===null||this.isAnchorElement&&(i!==0||r||s||o||a||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(l,c),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let i=this.urlTree;this.href=i!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(i)):null;let r=this.href===null?null:qTe(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(i,r){let s=this.renderer,o=this.el.nativeElement;r!==null?s.setAttribute(o,i,r):s.removeAttribute(o,i)}get urlTree(){return this.routerLinkInput===null?null:mT(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};e.\u0275fac=function(r){return new(r||e)(R(Ll),R(gs),wp("tabindex"),R(Ac),R(fi),R(ik))},e.\u0275dir=mi({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,s){r&1&&F("click",function(a){return s.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),r&2&&Bn("target",s.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",mn],skipLocationChange:[2,"skipLocationChange","skipLocationChange",mn],replaceUrl:[2,"replaceUrl","replaceUrl",mn],routerLink:"routerLink"},standalone:!0,features:[Bs,yn]});let t=e;return t})(),YDt=new Ri("");XDt=new Ri("",{factory:()=>new Mi}),QDt=new Ri("",{providedIn:"root",factory:()=>1}),JDt=new Ri("")});var eEt,tEt,kme=Q(()=>{Dj();Dj();eEt="firebase",tEt="10.12.3";Tb(eEt,tEt,"app")});function Ime(){}function rEt(){let t=globalThis.\u0275AngularFireScheduler;if(!t)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return t}function t3(t){return sEt(rEt())(t)}function sEt(t){return function(n){return n=n.lift(new Ame(t.ngZone)),n.pipe(BM(t.outsideAngular),w9(t.insideAngular))}}var vT,iEt,gT,nEt,IK,Ame,AK,yT=Q(()=>{me();me();kme();$n();Cl();vT=new x8("ANGULARFIRE2_VERSION"),iEt=(t,e)=>{let n=e?[e]:yDe(),i=[];return n.forEach(r=>{r.container.getProvider(t).instances.forEach(o=>{i.includes(o)||i.push(o)})}),i},gT=class{constructor(){return iEt(nEt)}},nEt="app-check";IK=class{zone;delegate;constructor(e,n=ETe){this.zone=e,this.delegate=n}now(){return this.delegate.now()}schedule(e,n,i){let r=this.zone,s=function(o){r.runGuarded(()=>{e.apply(this,[o])})};return this.delegate.schedule(s,n,i)}},Ame=class{zone;task=null;constructor(e){this.zone=e}call(e,n){let i=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Ime,{},Ime,Ime)),n.pipe(ac({next:i,complete:i,error:i})).subscribe(e).add(i)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},AK=(()=>{class t{ngZone;outsideAngular;insideAngular;constructor(n){this.ngZone=n,this.outsideAngular=n.runOutsideAngular(()=>new IK(Zone.current)),this.insideAngular=n.run(()=>new IK(Zone.current,lj)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(i){return new(i||t)(it(pn))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})()});function Ry(t){return lEt.get(t)||Object.assign({},cEt)}function lRe(){return dEt}function pEt(t){return new Promise(e=>{setTimeout(e,t)})}function cRe(t){if(!Ry(t).activated)throw jb.create("use-before-activation",{appName:t.name})}function dRe(i,r){return O(this,arguments,function*({url:t,body:e},n){let s={"Content-Type":"application/json"},o=n.getImmediate({optional:!0});if(o){let f=yield o.getHeartbeatsHeader();f&&(s["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(e),headers:s},l;try{l=yield fetch(t,a)}catch(f){throw jb.create("fetch-network-error",{originalErrorMessage:f?.message})}if(l.status!==200)throw jb.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(f){throw jb.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=c.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw jb.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let u=Number(d[1])*1e3,m=Date.now();return{token:c.token,expireTimeMillis:m+u,issuedAtTimeMillis:m}})}function uRe(t,e){let{projectId:n,appId:i,apiKey:r}=t.options;return{url:`${uEt}/projects/${n}/apps/${i}:${hEt}?key=${r}`,body:{debug_token:e}}}function vEt(){return PK||(PK=new Promise((t,e)=>{try{let n=indexedDB.open(fEt,gEt);n.onsuccess=i=>{t(i.target.result)},n.onerror=i=>{var r;e(jb.create("storage-open",{originalErrorMessage:(r=i.target.error)===null||r===void 0?void 0:r.message}))},n.onupgradeneeded=i=>{let r=i.target.result;switch(i.oldVersion){case 0:r.createObjectStore(Fme,{keyPath:"compositeKey"})}}}catch(n){e(jb.create("storage-open",{originalErrorMessage:n?.message}))}}),PK)}function yEt(t,e){return _Et(CEt(t),e)}function _Et(t,e){return O(this,null,function*(){let i=(yield vEt()).transaction(Fme,"readwrite"),s=i.objectStore(Fme).put({compositeKey:t,value:e});return new Promise((o,a)=>{s.onsuccess=l=>{o()},i.onerror=l=>{var c;a(jb.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function CEt(t){return`${t.options.appId}-${t.name}`}function Pme(t,e){return Sj()?yEt(t,e).catch(n=>{Lme.warn(`Failed to write token to IndexedDB. Error: ${n}`)}):Promise.resolve()}function hRe(){return lRe().enabled}function pRe(){return O(this,null,function*(){let t=lRe();if(t.enabled&&t.token)return t.token.promise;throw Error(`
            Can't get debug token in production mode.
        `)})}function bEt(t){return hDe.encodeString(JSON.stringify(t),!1)}function Ome(t,e=!1){return O(this,null,function*(){let n=t.app;cRe(n);let i=Ry(n),r=i.token,s;if(r&&!rV(r)&&(i.token=void 0,r=void 0),!r){let l=yield i.cachedTokenPromise;l&&(rV(l)?r=l:yield Pme(n,void 0))}if(!e&&r&&rV(r))return{token:r.token};let o=!1;if(hRe()){i.exchangeTokenPromise||(i.exchangeTokenPromise=dRe(uRe(n,yield pRe()),t.heartbeatServiceProvider).finally(()=>{i.exchangeTokenPromise=void 0}),o=!0);let l=yield i.exchangeTokenPromise;return yield Pme(n,l),i.token=l,{token:l.token}}try{i.exchangeTokenPromise||(i.exchangeTokenPromise=i.provider.getToken().finally(()=>{i.exchangeTokenPromise=void 0}),o=!0),r=yield Ry(n).exchangeTokenPromise}catch(l){l.code==="appCheck/throttled"?Lme.warn(l.message):Lme.error(l),s=l}let a;return r?s?rV(r)?a={token:r.token,internalError:s}:a=oRe(s):(a={token:r.token},i.token=r,yield Pme(n,r)):a=oRe(s),o&&DEt(n,a),a})}function wEt(t){return O(this,null,function*(){let e=t.app;cRe(e);let{provider:n}=Ry(e);if(hRe()){let i=yield pRe(),{token:r}=yield dRe(uRe(e,i),t.heartbeatServiceProvider);return{token:r}}else{let{token:i}=yield n.getToken();return{token:i}}})}function SEt(t,e,n,i){let{app:r}=t,s=Ry(r),o={next:n,error:i,type:e};if(s.tokenObservers=[...s.tokenObservers,o],s.token&&rV(s.token)){let a=s.token;Promise.resolve().then(()=>{n({token:a.token}),sRe(t)}).catch(()=>{})}s.cachedTokenPromise.then(()=>sRe(t))}function mRe(t,e){let n=Ry(t),i=n.tokenObservers.filter(r=>r.next!==e);i.length===0&&n.tokenRefresher&&n.tokenRefresher.isRunning()&&n.tokenRefresher.stop(),n.tokenObservers=i}function sRe(t){let{app:e}=t,n=Ry(e),i=n.tokenRefresher;i||(i=TEt(t),n.tokenRefresher=i),!i.isRunning()&&n.isTokenAutoRefreshEnabled&&i.start()}function TEt(t){let{app:e}=t;return new Rme(()=>O(this,null,function*(){let n=Ry(e),i;if(n.token?i=yield Ome(t,!0):i=yield Ome(t),i.error)throw i.error;if(i.internalError)throw i.internalError}),()=>!0,()=>{let n=Ry(e);if(n.token){let i=n.token.issuedAtTimeMillis+(n.token.expireTimeMillis-n.token.issuedAtTimeMillis)*.5+3e5,r=n.token.expireTimeMillis-5*60*1e3;return i=Math.min(i,r),Math.max(0,i-Date.now())}else return 0},rRe.RETRIAL_MIN_WAIT,rRe.RETRIAL_MAX_WAIT)}function DEt(t,e){let n=Ry(t).tokenObservers;for(let i of n)try{i.type==="EXTERNAL"&&e.error!=null?i.error(e.error):i.next(e)}catch{}}function rV(t){return t.expireTimeMillis-Date.now()>0}function oRe(t){return{token:bEt(xEt),error:t}}function EEt(t,e){return new Nme(t,e)}function MEt(t){return{getToken:e=>Ome(t,e),getLimitedUseToken:()=>wEt(t),addTokenListener:e=>SEt(t,"INTERNAL",e),removeTokenListener:e=>mRe(t.app,e)}}function PEt(){IO(new A9(AEt,t=>{let e=t.getProvider("app").getImmediate(),n=t.getProvider("heartbeat");return EEt(e,n)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,e,n)=>{t.getProvider(aRe).initialize()})),IO(new A9(aRe,t=>{let e=t.getProvider("app-check").getImmediate();return MEt(e)},"PUBLIC").setInstantiationMode("EXPLICIT")),Tb(kEt,IEt)}var lEt,cEt,dEt,uEt,hEt,rRe,Tmn,Rme,mEt,jb,fEt,gEt,Fme,PK,Lme,xEt,Nme,kEt,IEt,AEt,aRe,fRe=Q(()=>{Dj();Jde();Qde();gDe();lEt=new Map,cEt={activated:!1,tokenObservers:[]},dEt={initialized:!1,enabled:!1};uEt="https://content-firebaseappcheck.googleapis.com/v1",hEt="exchangeDebugToken",rRe={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Tmn=24*60*60*1e3;Rme=class{constructor(e,n,i,r,s){if(this.operation=e,this.retryPolicy=n,this.getWaitDuration=i,this.lowerBound=r,this.upperBound=s,this.pending=null,this.nextErrorWaitInterval=r,r>s)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(e){return O(this,null,function*(){this.stop();try{this.pending=new qde,this.pending.promise.catch(n=>{}),yield pEt(this.getNextRun(e)),this.pending.resolve(),yield this.pending.promise,this.pending=new qde,this.pending.promise.catch(n=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(n){this.retryPolicy(n)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(e){if(e)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let n=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),n}}};mEt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"},jb=new fDe("appCheck","AppCheck",mEt);fEt="firebase-app-check-database",gEt=1,Fme="firebase-app-check-store",PK=null;Lme=new Tj("@firebase/app-check");xEt={error:"UNKNOWN_ERROR"};Nme=class{constructor(e,n){this.app=e,this.heartbeatServiceProvider=n}_delete(){let{tokenObservers:e}=Ry(this.app);for(let n of e)mRe(this.app,n.next);return Promise.resolve()}};kEt="@firebase/app-check",IEt="0.8.5";AEt="app-check",aRe="app-check-internal";PEt()});var Vme=Q(()=>{fRe()});var REt,Nmn,Bme=Q(()=>{yT();kme();Vme();Vme();REt=["localhost","0.0.0.0","127.0.0.1"],Nmn=typeof window<"u"&&REt.includes(window.location.hostname)});var FEt,LEt,RK=Q(()=>{eue();eue();FEt="firebase",LEt="10.12.3";K2.registerVersion(FEt,LEt,"app-compat")});function sV(t,e,n){let i=typeof n=="string"&&n||"[DEFAULT]",r=typeof n=="object"&&n||{};r.name=r.name||i;let o=K2.apps.filter(a=>a&&a.name===r.name)[0]||e.runOutsideAngular(()=>K2.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(o.options)){let a=!!module.hot;NEt("error",`${o.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new Zk(o)}function FK(t,e,n,i,r){let[,s,o]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===t)||[];if(s)return BEt(r,o)||(vRe("error",`${e} was already initialized on the ${n} Firebase App with different settings.${zEt?" You may need to reload as Firebase is not HMR aware.":""}`),vRe("warn",{is:r,was:o})),s;{let a=i();return globalThis.\u0275AngularfireInstanceCache.push([t,a,r]),a}}function BEt(t,e){try{return t.toString()===e.toString()}catch{return t===e}}var OEt,yRe,Zk,$b,Xk,NEt,VEt,_Re,zEt,vRe,oV=Q(()=>{me();me();yT();RK();OEt=["ngOnDestroy"],yRe=(t,e,n,i={})=>new Proxy(t,{get:(r,s)=>n.runOutsideAngular(()=>{if(t[s])return i?.spy?.get&&i.spy.get(s,t[s]),t[s];if(OEt.indexOf(s)>-1)return()=>{};let o=e.toPromise().then(a=>{let l=a?.[s];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>n.run(()=>c)):n.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>o[l],apply:(a,l,c)=>o.then(d=>{let u=d?.(...c);return i?.spy?.apply&&i.spy.apply(s,c,u),u})})})}),Zk=class{constructor(e){return e}},$b=new Ri("angularfire2.app.options"),Xk=new Ri("angularfire2.app.name");NEt=(t,...e)=>{MO()&&typeof console<"u"&&console[t](...e)},VEt={provide:Zk,useFactory:sV,deps:[$b,pn,[new U2,Xk]]},_Re=(()=>{class t{static initializeApp(n,i){return{ngModule:t,providers:[{provide:$b,useValue:n},{provide:Xk,useValue:i}]}}constructor(n){K2.registerVersion("angularfire",vT.full,"core"),K2.registerVersion("angularfire",vT.full,"app-compat"),K2.registerVersion("angular",oDe.full,n.toString())}static \u0275fac=function(i){return new(i||t)(it(Fu))};static \u0275mod=en({type:t});static \u0275inj=Ji({providers:[VEt]})}return t})();zEt=typeof module<"u"&&!!module.hot,vRe=(t,...e)=>{MO()&&typeof console<"u"&&console[t](...e)};globalThis.\u0275AngularfireInstanceCache||=[]});var zme,Hme,Gme,Wme,Ume,jme,$me,_T,CRe,Qk=Q(()=>{_De();ri();me();me();yT();yT();Bme();oV();$n();Cl();RK();zme=new Ri("angularfire2.auth.use-emulator"),Hme=new Ri("angularfire2.auth.settings"),Gme=new Ri("angularfire2.auth.tenant-id"),Wme=new Ri("angularfire2.auth.langugage-code"),Ume=new Ri("angularfire2.auth.use-device-language"),jme=new Ri("angularfire.auth.persistence"),$me=(t,e,n,i,r,s,o,a)=>FK(`${t.name}.auth`,"AngularFireAuth",t.name,()=>{let l=e.runOutsideAngular(()=>t.auth());if(n&&l.useEmulator(...n),i&&(l.tenantId=i),l.languageCode=r,s&&l.useDeviceLanguage(),o)for(let[c,d]of Object.entries(o))l.settings[c]=d;return a&&l.setPersistence(a),l},[n,i,r,s,o,a]),_T=(()=>{class t{authState;idToken;user;idTokenResult;credential;constructor(n,i,r,s,o,a,l,c,d,u,m,f){let _=new Mi,x=Fr(void 0).pipe(w9(o.outsideAngular),Fl(()=>s.runOutsideAngular(()=>import("./chunk-XA5BNO3F.js"))),lr(()=>sV(n,s,i)),lr(D=>$me(D,s,a,c,d,u,l,m)),GM({bufferSize:1,refCount:!1}));if(Z2(r))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=Fr(null);else{x.pipe(Jd()).subscribe();let D=x.pipe(Fl(I=>I.getRedirectResult().then(z=>z,()=>null)),t3,GM({bufferSize:1,refCount:!1})),E=x.pipe(Fl(I=>new Qa(z=>({unsubscribe:s.runOutsideAngular(()=>I.onAuthStateChanged(G=>z.next(G),G=>z.error(G),()=>z.complete()))})))),M=x.pipe(Fl(I=>new Qa(z=>({unsubscribe:s.runOutsideAngular(()=>I.onIdTokenChanged(G=>z.next(G),G=>z.error(G),()=>z.complete()))}))));this.authState=D.pipe(xO(E),BM(o.outsideAngular),w9(o.insideAngular)),this.user=D.pipe(xO(M),BM(o.outsideAngular),w9(o.insideAngular)),this.idToken=this.user.pipe(Fl(I=>I?bp(I.getIdToken()):Fr(null))),this.idTokenResult=this.user.pipe(Fl(I=>I?bp(I.getIdTokenResult()):Fr(null))),this.credential=ra(D,_,this.authState.pipe(Ks(I=>!I))).pipe(lr(I=>I?.user?I:null),BM(o.outsideAngular),w9(o.insideAngular))}return yRe(this,x,s,{spy:{apply:(D,E,M)=>{(D.startsWith("signIn")||D.startsWith("createUser"))&&M.then(I=>_.next(I))}}})}static \u0275fac=function(i){return new(i||t)(it($b),it(Xk,8),it(Fu),it(pn),it(AK),it(zme,8),it(Hme,8),it(Gme,8),it(Wme,8),it(Ume,8),it(jme,8),it(gT,8))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"any"})}return t})(),CRe=(()=>{class t{constructor(){K2.registerVersion("angularfire",vT.full,"auth-compat")}static \u0275fac=function(i){return new(i||t)};static \u0275mod=en({type:t});static \u0275inj=Ji({providers:[_T]})}return t})()});var Pv,Eh,Xo,i3=Q(()=>{Yc();zn();pa();Vd();jo();kl();Nu();Pv=function(t){return t.Additional="additional",t.Complete="complete",t.DepositBack="deposit-back",t.Deposit="deposit",t.Payout="payout",t.Rest="rest",t.CheaperStudio="cheaper",t.Free="free",t}(Pv||{}),Eh=class Eh{static getPaymentTypeText(e){let n=this.paymentTypes.find(i=>i.value.toLowerCase()===e);return n?n.text:e}static getPaymentTypeInvoiceText(e,n,i="DE"){let r=[];n==="tattoo"?r=this.paymentTypesInvoiceDe:n==="piercing"&&(r=this.paymentTypesInvoicePiercingDe),i==="ES"&&(r=n==="piercing"?this.paymentTypesInvoicePiercingEs:this.paymentTypesInvoiceEs);let s=r.find(o=>o.value.toLowerCase()===e);return s?s.text:e}static getPaymentTypeDatevText(e,n="tattoo"){let r=(n==="piercing"?this.paymentTypesDatevPiercing:this.paymentTypesDatev).find(s=>s.value.toLowerCase()===e);return r?r.text:e}static getPaymentMethodText(e){if(!e)return"";if(e==="klarna_payments")return"Klarna";let n=this.paymentMethods.find(i=>i.value.toLowerCase()===e);return n?n.text:e}static get paymentTypes(){return[{value:"additional",text:"Nachzahlung (50/50)",eventBookable:!1},{value:"deposit",text:"Kaution",eventBookable:!0},{value:"deposit-back",text:"R\xFCckzahlung",eventBookable:!0},{value:"rest",text:"Rest",eventBookable:!0},{value:"complete",text:"Gesamt",eventBookable:!0},{value:"free",text:"Kostenlos",eventBookable:!1},{value:"improve",text:"Nachstechen",eventBookable:!1},{value:"payout",text:"Artist-Auszahlung",eventBookable:!0},{value:"cheaper",text:"Preisnachlass (Studio)",eventBookable:!1},{value:"gift-card-sold",text:"Gutschein",eventBookable:!1},{value:"cash-report-outgoing",text:"Barausgabe",eventBookable:!1},{value:"cash-report-incoming",text:"Bareinahme",eventBookable:!1}]}static get paymentTypesInvoiceDe(){return[{value:"additional",text:"Tattoo Nachzahlung",eventBookable:!0},{value:"deposit",text:"Tattoo Kaution",eventBookable:!0},{value:"deposit-back",text:"R\xFCckzahlung",eventBookable:!0},{value:"rest",text:"Tattoo Restzahlung",eventBookable:!0},{value:"complete",text:"Tattoo Zahlung",eventBookable:!0},{value:"free",text:"Kostenlos",eventBookable:!0},{value:"improve",text:"Tattoo Zahlung",eventBookable:!0},{value:"payout",text:"Artist-Abrechnung",eventBookable:!0},{value:"cheaper",text:"Preisnachlass",eventBookable:!0},{value:"gift-card-sold",text:"Gutschein",eventBookable:!1},{value:"cash-report-outgoing",text:"Barausgabe",eventBookable:!1},{value:"cash-report-incoming",text:"Bareinnahme",eventBookable:!1}]}static get paymentTypesInvoiceEs(){return[{value:"additional",text:"Tatuaje pago adicional",eventBookable:!0},{value:"deposit",text:"Dep\xF3sito por tatuaje",eventBookable:!0},{value:"deposit-back",text:"Devoluci\xF3n",eventBookable:!0},{value:"rest",text:"Pago final del tatuaje",eventBookable:!0},{value:"complete",text:"Pago del tatuaje",eventBookable:!0},{value:"free",text:"Gratis",eventBookable:!0},{value:"improve",text:"Pago del tatuaje",eventBookable:!0},{value:"payout",text:"Facturaci\xF3n del artista",eventBookable:!0},{value:"cheaper",text:"Descuento",eventBookable:!0},{value:"gift-card-sold",text:"Vale",eventBookable:!1},{value:"cash-report-outgoing",text:"Retirada de efectivo",eventBookable:!1},{value:"cash-report-incoming",text:"Ingreso en efectivo",eventBookable:!1}]}static get paymentTypesDatev(){return[{value:"additional",text:"Tattoo Nachzahlung",eventBookable:!0},{value:"deposit",text:"Tattoo Kaution",eventBookable:!0},{value:"deposit-back",text:"R\xFCckzahlung",eventBookable:!0},{value:"rest",text:"Tattoo Restzahlung",eventBookable:!0},{value:"complete",text:"Tattoo Zahlung",eventBookable:!0},{value:"free",text:"Kostenlos",eventBookable:!0},{value:"improve",text:"Tattoo Zahlung",eventBookable:!0},{value:"payout",text:"Artist-Abrechnung",eventBookable:!0},{value:"cheaper",text:"Preisnachlass",eventBookable:!0},{value:"gift-card-sold",text:"Gutscheinverkauf",eventBookable:!1},{value:"cash-report-outgoing",text:"Barausgabe",eventBookable:!1},{value:"cash-report-incoming",text:"Bareinnahme",eventBookable:!1}]}static get paymentTypesInvoicePiercingDe(){return[{value:"additional",text:"Piercing Nachzahlung",eventBookable:!0},{value:"deposit",text:"Piercing Kaution",eventBookable:!0},{value:"deposit-back",text:"R\xFCckzahlung",eventBookable:!0},{value:"rest",text:"Piercing Restzahlung",eventBookable:!0},{value:"complete",text:"Piercing Zahlung",eventBookable:!0},{value:"free",text:"Kostenlos",eventBookable:!0},{value:"improve",text:"Piercing Zahlung",eventBookable:!0},{value:"payout",text:"Artist-Abrechnung",eventBookable:!0},{value:"cheaper",text:"Preisnachlass",eventBookable:!0},{value:"gift-card-sold",text:"Gutschein",eventBookable:!1},{value:"cash-report-outgoing",text:"Barausgabe",eventBookable:!1},{value:"cash-report-incoming",text:"Bareinnahme",eventBookable:!1}]}static get paymentTypesInvoicePiercingEs(){return[{value:"additional",text:"Piercing Nachzahlung",eventBookable:!0},{value:"deposit",text:"Piercing Kaution",eventBookable:!0},{value:"deposit-back",text:"R\xFCckzahlung",eventBookable:!0},{value:"rest",text:"Piercing Restzahlung",eventBookable:!0},{value:"complete",text:"Piercing Zahlung",eventBookable:!0},{value:"free",text:"Kostenlos",eventBookable:!0},{value:"improve",text:"Piercing Zahlung",eventBookable:!0},{value:"payout",text:"Artist-Abrechnung",eventBookable:!0},{value:"cheaper",text:"Preisnachlass",eventBookable:!0},{value:"gift-card-sold",text:"Gutschein",eventBookable:!1},{value:"cash-report-outgoing",text:"Barausgabe",eventBookable:!1},{value:"cash-report-incoming",text:"Bareinnahme",eventBookable:!1}]}static get paymentTypesDatevPiercing(){return[{value:"additional",text:"Piercing Nachzahlung",eventBookable:!0},{value:"deposit",text:"Piercing Kaution",eventBookable:!0},{value:"deposit-back",text:"R\xFCckzahlung",eventBookable:!0},{value:"rest",text:"Piercing Restzahlung",eventBookable:!0},{value:"complete",text:"Piercing Zahlung",eventBookable:!0},{value:"free",text:"Kostenlos",eventBookable:!0},{value:"improve",text:"Piercing Zahlung",eventBookable:!0},{value:"payout",text:"Artist-Abrechnung",eventBookable:!0},{value:"cheaper",text:"Preisnachlass",eventBookable:!0},{value:"gift-card-sold",text:"Gutschein",eventBookable:!1},{value:"cash-report-outgoing",text:"Barausgabe",eventBookable:!1},{value:"cash-report-incoming",text:"Bareinnahme",eventBookable:!1}]}static get paymentMethods(){return[{value:"bank",text:"Bank"},{value:"cash",text:"Kasse"},{value:"gift-card",text:"Gutschein"},{value:"klarna",text:"Klarna"},{value:"paypal",text:"PayPal"},{value:"none",text:"Keine"},{value:"transfer",text:"Transfer"}]}static get paymentMethodsDepositBack(){return[{value:"bank",text:"Bank"},{value:"cash",text:"Kasse"},{value:"paypal",text:"PayPal"}]}static getCustomerPayedSumFromPayments(e){let n=this.getPaymentSumByPaymentType(e,this.customerPayedPaymentTypes);return n-=this.getPaymentSumByPaymentType(e,[Pv.DepositBack]),n}static getCustomerPayedSumFromPaymentsWithoutAdditional(e){let n=this.getPaymentSumByPaymentType(e,this.customerPayedPaymentTypesWithoutAdditional);return n-=this.getPaymentSumByPaymentType(e,[Pv.DepositBack]),n}static filterPaymentsByMethod(e,n){return e.filter(i=>i.paymentMethod&&n.indexOf(i.paymentMethod)>-1)}static getPaymentSumByPaymentTypeControl(e,n){return e.filter(i=>n.indexOf(i.get("paymentType").value)>-1).reduce((i,r)=>{let s=parseFloat(r.get("paymentValue").value);return Number.isNaN(s)?i:i+s},0)}static getPaymentByPaymentTypeControl(e,n){return e.filter(i=>n.indexOf(i.get("paymentType").value)>-1)}static getPaymentSumByPaymentType(e,n){Array.isArray(n)||(n=[n]);let i=e.reduce((r,s)=>s.paymentType&&n.indexOf(s.paymentType)>-1&&s.paymentValue?fn.roundMoney(r+s.paymentValue):fn.roundMoney(r),0);return i?fn.roundMoney(i):0}static getPaymentsFromEvents(e,n){n?.logAfter("start");let i=[];for(let r of e)i.push(...r.payments);return i=i.sort(Hr.sortString("paymentDate",!0)),i}static calcAdditionalPaymentValue(e){let i=e/1e3/60/60;i<.5&&(i=0);let r=i*100;return Math.round(r/10)*10}static calcCashEndOfDayFromEvents(e,n){if(e.payments){let i=Sr.clone(e.payments);n&&(i=i.filter(o=>o.studio&&n.includes(o.studio)));let r=0,s=0;if(typeof e.priceEstimatedFrom=="number"){r=e.toPay?e.toPay:0;let o=e.priceEstimatedFrom,a=Eh.getCustomerPayedSumFromPayments(e.payments),l=Eh.getPaymentSumByPaymentType(e.payments,["additional"]);(a>o||e.closed)&&(o=a),e.closed&&(r=0),r+=Eh.getCustomerPayedSumFromPayments(i.filter(d=>Ie.clearTime(d.createdAt)===Ie.clearTime(e.start)&&d.paymentMethod==="cash")),s=(o-l)*(typeof e.artistPercentage=="number"?e.artistPercentage:50)/100,s+=l*.5;let c=r-s;return c-=Eh.getPaymentSumByPaymentType(i,Pv.CheaperStudio),fn.round(c,2)}}return 0}static parsePaymentToReceipt(e,n,i){if(e.paymentMethod==="cash"){let r;return i&&(r={customerName:i.givenName+" "+i.familyName,customerStreet:i.streetAddress,customerHouseNumber:"",customerCity:i.city,customerPostalCode:i.postalCode}),{receiptNo:"",receiptDateString:Ie.format(e.createdAt,"yyyy-MM-dd"),receiptValueTotal:e.paymentValue?e.paymentValue:0,receiptPositions:[{unitPrice:e.paymentValue?e.paymentValue:0,amount:1,name:Eh.getPaymentTypeText(e.paymentType?e.paymentType:"")}],customer:r,appointment:{startDateTime:n.start?n.start:0,studio:e.studio?e.studio:"",studioAddress:"fehlt noch..."}}}}static paymentToTextOneLine(e,n){if(e&&e.paymentValue&&e.paymentMethod&&e.paymentType){if(n)return Wn.toMoneyString(e.paymentValue)+" \xB7 "+Eh.getPaymentMethodText(e.paymentMethod)+" \xB7 "+Eh.getPaymentTypeText(e.paymentType)+" ["+e.paymentUuid+"]";{let i=Wn.toMoneyString(e.paymentValue)+" \xB7 "+Eh.getPaymentMethodText(e.paymentMethod)+" \xB7 "+Eh.getPaymentTypeText(e.paymentType);return e.receiptNumber&&(i+=" \xB7 "+e.receiptNumber),i}}return""}static calcPayoutPercent(e,n){let i=0,r=Eh.getPaymentSumByPaymentType(e,Eh.customerPayedPaymentTypes);return r-=Eh.getPaymentSumByPaymentType(e,["deposit-back"]),i=n/r*100,i}static calcPayout(e,n,i=!1){typeof n>"u"&&(n=50);let r=0,s=Eh.getPaymentSumByPaymentType(e,Eh.customerPayedPaymentTypesWithoutAdditional);s-=Eh.getPaymentSumByPaymentType(e,["deposit-back"]),r=s/100*n;let o=Eh.getPaymentSumByPaymentType(e,["additional"]);return r+=o*.5,i||(r-=Eh.getPaymentSumByPaymentType(e,["payout"])),fn.roundMoney(r)}static parseGiftCardsToNxtPayment(e){return e.filter(n=>!n.originalId).map(n=>Eh.parseGiftCardToNxtPayment(n)).sort(Hr.sortString("paymentDate",!0))}static parseGiftCardToNxtPayment(e){let n=Ie.parse(e.createdAt),i=Ie.clearDayAndTime(Ie.parse(e.createdAt)),r=typeof e.paymentValue=="number"?parseFloat(e.paymentValue.toString()):parseFloat(e.value.toString());return{paymentUuid:e.id,eventId:"",paymentDate:Ie.format(n,"yyyy-MM-dd"),createdAt:n,paymentMethod:e.paymentMethod?e.paymentMethod:"cash",paymentType:"gift-card-sold",paymentValue:e.originalPaymentValue,studio:e.studio,createdBy:e.createdBy,giftCardDescription:"#"+cr.fill(e.internalId.toString(),4,"0",!1)+" "+Wn.toMoneyString(e.value),artist:"",createdAtDateString:Ie.format(e.createdAt,"yyyy-MM-dd"),refId:e.internalId}}static fillAttributes_old(e,n){for(let i of e)i.artist="",i.paymentType!=="deposit-back"&&(i.artist=n.artist,i.artistCalendarNumber=n.calendarNumber??""),i.eventId=n.id,i.isPrivate=!!(n.visibility&&n.visibility==="private"),i.eventDate=n.startDateString??"",n.customerObj&&(i.eventCustomerName=n.customerObj.givenName+" "+n.customerObj.familyName),i.eventInvoiceNumber=n.invoiceNumber??"";return e}static parseNxtCashIncomingToNxtPayment(e,n){return e.map(r=>({paymentValue:r.value,isNewPayment:!1,artist:"",isPrivate:r._,studio:r.studio,createdAt:Ie.parse(r.createdAt),createdBy:r.createdBy,paymentUuid:r.id,paymentDate:r.createdAtDateString,paymentType:n,paymentMethod:"cash",cashIncomingOutgoingDescription:r.description,createdAtDateString:Ie.format(r.createdAt,"yyyy-MM-dd"),articleId:r.articleId,attachment:r.googleDriveFolderId,workplace:"reception",originalCreatedBy:r.originalCreatedBy}))}static filterPaymentsDate(e,n){let i=Ie.clearTime(Ie.parse(n,"yyyy-MM-dd")),r=i+Qt.DURATION_1DAY,s=e.filter(o=>o.createdAt>i&&o.createdAt<r);return Sr.clone(s)}static isPossible_(e){return!e.find(i=>["bank","klarna","paypal","gift-card"].includes(i.paymentMethod??"")||i.createdAtDateString!==Ie.formatNow("yyyy-MM-dd"))}static getLastPaymentReception(e){let n=e.filter(i=>i.workplace==="reception").sortNumber("createdAt",!0);if(n.length>0)return n[0]}static getFirstPaymentReceptionOnDateNotDeposit(e,n){let i=e.filter(r=>{let s=r.workplace==="reception",o=r.createdAtDateString===n,a=r.paymentType!=="deposit";return s&&o&&a}).sortNumber("createdAt",!1);if(i.length>0)return i[0]}static getFirstPaymentReceptionOnDateRestOrComplete(e,n){let i=e.filter(r=>{let s=r.workplace==="reception",o=r.createdAtDateString===n,a=["rest","complete"].includes(r.paymentType);return s&&o&&a}).sortNumber("createdAt",!1);if(i.length>0)return i[0]}static parseNxtPaymentToNxtInvoicePayment(e){let n={paymentUuid:e.paymentUuid,eventId:e.eventId,studio:e.studio,paymentMethod:e.paymentMethod};return e.paymentPaypalTransaction&&(n.paymentPaypalTransaction={transactionId:e.paymentPaypalTransaction?.transactionId,receiverEmail:e.paymentPaypalTransaction?.receiverEmail}),e.paymentGiftCard&&(n.paymentGiftCard={id:e.paymentGiftCard.id}),e.paymentKlarnaOrder&&(n.paymentKlarnaOrder={orderId:e?.paymentKlarnaOrder?.orderId,klarnaOrderId:e?.paymentKlarnaOrder?.klarnaOrderId||""}),n}static shrinkPayments(e){for(let n of e)n.paymentBankTransaction&&(delete n.paymentBankTransaction.assigned,delete n.paymentBankTransaction.assignments,delete n.paymentBankTransaction.createdAt,delete n.paymentBankTransaction.createSource,delete n.paymentBankTransaction.createStudio,delete n.paymentBankTransaction.foundEventId,delete n.paymentBankTransaction.createdBy,delete n.paymentBankTransaction.insertedAt),n.paymentGiftCard?(delete n.paymentGiftCard.assigned,delete n.paymentGiftCard.assignments,delete n.paymentGiftCard.shopOrder,delete n.paymentGiftCard.additionalInfo,delete n.paymentGiftCard.additionalInfo2,delete n.paymentGiftCard.discountReason,delete n.paymentGiftCard.paymentPaypalTransaction,delete n.paymentGiftCard.additionalPrintText,delete n.paymentGiftCard.monthString,delete n.paymentGiftCard.updatedBy,delete n.paymentGiftCard.bookingInfo,delete n.paymentGiftCard.internalId,delete n.paymentGiftCard.createSource,delete n.paymentGiftCard.validTill,delete n.paymentGiftCard.validFrom,delete n.paymentGiftCard.originalId):n.paymentKlarnaOrder?(delete n.paymentKlarnaOrder.assigned,delete n.paymentKlarnaOrder.assignments):n.paymentPaypalTransaction&&(delete n.paymentPaypalTransaction.assigned,delete n.paymentPaypalTransaction.assignments)}};Eh.customerPayedPaymentTypes=["rest","deposit","complete","additional","improve","gift-card-sold"],Eh.totalSalesPaymentTypes=Eh.customerPayedPaymentTypes,Eh.totalSalesPaymentMethods=["bank","cash","klarna","paypal"],Eh.customerPayedPaymentTypesWithoutAdditional=["rest","deposit","complete","improve","gift-card-sold"];Xo=Eh});var LK,xRe=Q(()=>{Ld();LK=class{static isBrowser(){try{return typeof window<"u"&&typeof document<"u"}catch{return!1}}static init(){window.addEventListener("beforeinstallprompt",e=>{e.preventDefault(),this.deferredPrompt=e,this.showPrompt()})}static showPrompt(){Gn.info("deferredPrompt:",this.deferredPrompt);try{this.deferredPrompt.prompt(),this.deferredPrompt.userChoice.then(e=>{e.outcome==="accepted"?Gn.info("User accepted the A2HS prompt"):Gn.info("User dismissed the A2HS prompt"),this.deferredPrompt=null})}catch(e){console.warn("showPrompt fehlgeschlagen :(",e)}}static closePage(e){e&&e.close()}static getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case e.indexOf("edge")>-1:return"edge";case(e.indexOf("opr")>-1&&!!window.opr):return"opera";case(e.indexOf("chrome")>-1&&!!window.chrome):return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return e}}}});var G8,aV=Q(()=>{xRe();G8=(()=>{let e=class e{static init(){return O(this,null,function*(){if(LK.isBrowser()){let{nanoid:i,urlAlphabet:r,customRandom:s,random:o}=yield import("./chunk-MJWJVSS7.js");e.nanoid=i,e.urlAlphabet=r,e.customRandom=s,e.random=o}else{let i=new Function("specifier","return import(specifier)"),{nanoid:r,urlAlphabet:s,customRandom:o,random:a}=yield i("nanoid");e.nanoid=r,e.urlAlphabet=s,e.customRandom=o,e.random=a}})}static generate(){return e.nanoid()}static generateForUrl(i){return e.customRandom(e.onlyLowerCaseWithNumbers,i,e.random)()}static generateNxt(){return e.customRandom(e.customChars,10,e.random)()}static generateEvent(){return e.customRandom(e.onlyLowerCaseWithNumbers,14,e.random)()}static generateEventFileAlbum(){return e.customRandom(e.onlyLowerCaseWithNumbers,8,e.random)()}static generateCheckoutId(){return e.customRandom(e.onlyLowerCase,7,e.random)()}static generateCustom(i,r){return e.customRandom(r?e.onlyUpperCaseWithNumbers:e.customChars,i,e.random)()}static generatePromoterId(){return e.customRandom(e.customChars,10,e.random)()}static generateNxtPromo(){return e.customRandom(e.onlyUpperCaseWithNumbers,5,e.random)()}static generateTattooTicket(){let i=e.customRandom(e.onlyUpperCaseWithNumbers,12,e.random)();return i.substring(0,4)+"-"+i.substring(4,8)+"-"+i.substring(8)}static generateReceiptNumber(){return"0"+e.customRandom(e.receiptChars,5,e.random)()}static generateUppercase(i){return e.customRandom(e.onlyUpperCaseWithNumbers,i,e.random)()}static generateArtistGateOpenLink(){}};e.customChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e.onlyUpperCaseWithNumbers="ABCDEFGHJKLMNPQRSTUVWXYZ0123456789",e.onlyLowerCase="abcdefghijklmnopqrstuvwxyz",e.onlyLowerCaseWithNumbers="abcdefghijklmnopqrstuvwxyz0123456789",e.receiptChars="NXT1234567890";let t=e;return t})()});var Vu,Rv=Q(()=>{Vd();zn();jo();i3();kl();aV();pa();Vu=(()=>{let e=class e{static calendarEventsToHtmlTable(i){let r=`<table style="width:100%; font-family: 'Roboto',serif; border-collapse: collapse;"><tr>`,s=0,o='<td style="border: 1px solid #2a2a2a;padding: 3px 5px">';r+="<tr>",r+=`${o}</td>${o}Angelegt am</td>${o}Termin</td>${o}Type</td>${o}Wert</td>${o}Termin</td>${o}Termininfo</td>`,r+="</tr>";let a=0;for(let l of i){a++;let{startDateString:c,title:d,createdDateString:u}=l;r+="<tr>",r+=`${o}${a}</td>${o}${u}</td>${o}${c}</td>${o}${d}</td>`,r+="</tr>",s+=399}return r+=`<tr>${o}<strong>${Wn.toMoneyString(s)}</strong></td>`,r+="</tr></table>",r}static isPossible_(i){return!0}static isWalkIn(i,r){return Ie.format(i.createdAt,"yyyy-MM-dd")===Ie.format(r,"yyyy-MM-dd")&&i.createdByWorkplace==="reception"}static isToday(i){return i.startString===Ie.formatNow("yyyy-MM-dd")}static isClosedOverDue(i){let o=i.end-i.start;return!i.closed&&o>Qt.DURATION_1HOUR*3&&Date.now()-i.end>o/100*25}static getPercentageProcess(i){if(i.start>Date.now())return 0;if(i.end<Date.now())return 100;{let r=i.end-i.start,s=Date.now()-i.start;return Math.round(s/r*100)}}static hasMissingBodyPutsMotives(i){let r=!1;return i?.bodyPuts?.tattoo&&(r=i.bodyPuts.tattoo.some(s=>this.motiveOrBodyPutBlackList.some(o=>s.motive.toLowerCase().includes(o.toLowerCase())))),r}static hasMissingBodyPutsBodyPuts(i){let r=!1;return i?.bodyPuts?.tattoo&&(r=i.bodyPuts.tattoo.some(s=>this.motiveOrBodyPutBlackList.some(o=>s.bodyPut.toLocaleString().includes(o.toLowerCase())))),r}static hastMissingBodyPuts(i){return e.hasMissingBodyPutsMotives(i)||e.hasMissingBodyPutsBodyPuts(i)}static getSkillsCombined(i){let r=i.skill?.skills?Object.keys(i.skill?.skills):[],s=i.skill?.boolSkills?Object.keys(i.skill?.boolSkills):[];return[...r,...s]}static getImproveStatus(i,r){let s=r.find(o=>o.info.includes("Nachstechen vom "+i.start.dateFormat("dd.MM.yyyy")));if(s&&!i.canceledInTime)return{status:"cost",text:"Nachstechtermin nicht fr\xFCh genug abgesagt",label:"kostenpflichtig",label2:"Nachstechtermin am "+s.start.dateFormat("dd.MM.yyyy")+" nicht fr\xFCh genug abgesagt"};if(i.workType==="tattoo"){if(i.start.dateAddMonths(6)<Date.now())return{status:"cost",text:"Das Tattoo ist \xE4lter als 6 Monate",label:"kostenpflichtig",label2:"> 6 Monate"};let o=["hand","foot"];if(!i.bodyPuts?.tattoo||i.bodyPuts.tattoo.length===0)return{status:"check",label:"unbekannt",text:"Es ist keine K\xF6rperstelle im Termin angegeben",label2:"fehlende Angabe"};let a=i.bodyPuts.tattoo.filter(c=>c.bodyPut.some(d=>o.includes(d))).length,l=i.bodyPuts.tattoo.length;return a===l?{status:"cost",text:"",label:"kostenpflichtig K\xF6rperstelle",label2:""}:a===0?{status:"free",text:"",label:"kostenlos",label2:""}:{status:"check",label:"pr\xFCfen",label2:"",text:"Pr\xFCfe welche K\xF6rperstelle nachgestochen werden soll um zu entscheiden ob es kostenlos oder kostenpflichtig ist"}}return{status:"cost",text:"es ist kein Tattoo",label:"",label2:""}}static getTattooOrPiercingCount(i){if(i.workType==="tattoo")return i.bodyPuts?.tattoo?.length||0;if(i.workType==="piercing")return i.bodyPuts?.piercing?.length||0;if(i.workType==="beauty")return i.bodyPuts?.beauty?.length||0}static calcEvent(i){if(!e.valenceGuideValue)throw Error("Termin kann nicht berechnet werden, Wertigkeits-Index fehlt");i.start,i.end,i.startDateString=i.start.dateFormatDate(),i.startString=i.start.dateFormat("yyyy-MM-dd HH:mm"),i.endString=i.end.dateFormat("yyyy-MM-dd HH:mm"),i.createdWeekDay=i.createdAt.dateFormat("dddd"),i.createdDate=i.createdAt.clearTime(),i.createdDateString=i.createdAt.dateFormatDate(),i.duration=i.end-i.start,i.priceEstimatedFrom?i.valence=i.priceEstimatedFrom/e.valenceGuideValue:i.valence=0,i.paymentSum=Xo.getCustomerPayedSumFromPayments(i.payments),i.paymentSumAdditional=Xo.getPaymentSumByPaymentType(i.payments,["additional"]),i.artistPaymentSum=Xo.getPaymentSumByPaymentType(i.payments,["payout"]),i.paymentCheaperSum=Xo.getPaymentSumByPaymentType(i.payments,["cheaper"]),i.paymentDepositBack=Xo.getPaymentSumByPaymentType(i.payments,["deposit-back"]);let r=i.priceEstimatedFrom??-1;i.toPay=fn.roundMoney(r-i.paymentSum-i.paymentCheaperSum),i.toPay<0&&(i.toPay=0);let s=r>i.paymentSum?r:i.paymentSum-i.paymentSumAdditional;i.artistToGet=fn.roundMoney(i.artistPercentage?s*i.artistPercentage/100-i.artistPaymentSum:0),i.artistTotalGet=fn.roundMoney(i.artistPercentage?s*i.artistPercentage/100:0),i.paymentSumAdditional>0&&(i.artistToGet+=i.paymentSumAdditional*.5,i.artistTotalGet+=i.paymentSumAdditional*.5),i.toPayToStudio=i.toPay-i.artistToGet,i.cashEndOfDay=Xo.calcCashEndOfDayFromEvents(i);for(let o of i.payments)o.eventId=i.id,o.createdAtDateString||(o.createdAtDateString=Ie.format(o.createdAt,"yyyy-MM-dd")),o.artist="",o.paymentType!=="deposit-back"&&(o.artist=i.artist,o.artistCalendarNumber=i.calendarNumber||""),o.eventId=i.id,o.isPrivate=!!(i.visibility&&i.visibility==="private"),o.eventDate=i.startDateString||"",o.eventInvoiceNumber=i.invoiceNumber??"";if(i.workType||(i.bodyPuts?.tattoo?i.workType="tattoo":i.bodyPuts?.piercing?i.workType="piercing":i.bodyPuts?.beauty&&(i.workType="beauty")),!i.workType&&i.start<"2022-01-01".dateParse()&&(i.workType="tattoo"),!i.workType)throw Error(`Termin kann nicht gespeichert werden, workType fehlt
`+i.id);return i.ratings&&i.ratings.length>0&&(i.ratingValue=fn.round(i.ratings.reduce((o,a)=>o+a.value,0)/i.ratings.length,1)),i}static getFixArtistReasonText(i){return Array.isArray(i)?i.map(r=>e.fixArtistReasonOptions.find(s=>s.value===r)?.text||r).join(" & "):e.fixArtistReasonOptions.find(r=>r.value===i)?.text||i}static getEmptyEvent(i=0,r=0){let s={id:"",start:i,end:r,artist:"",title:"",description:"",updatedAt:Date.now(),paymentSum:0,artistPaymentSum:NaN,payments:[],visibility:"",duration:0,priceEstimatedFrom:NaN,artistPercentage:50,depotDueDate:"",depotDueDateReason:"",mediaCount:{photo:0,video:0,pdf:0,tattooVideo:0,tattooPhoto:0,stencil:0,templatePhoto:0,preTattooPhoto:0},stencilSeen:{seen:!1,seenAt:0,seenBy:"",workplace:"",studio:""},artistAssignedAt:null,startDateString:"",artistToGet:NaN,info:"",importantInfo:"",fastWalkInRegisteredAt:NaN,closed:!1,toPay:NaN,artistTotalGet:NaN,nxtUpdateId:G8.generateNxt(),skill:{skills:{},boolSkills:{}},workType:"tattoo",nextNxtUpdateId:"",status:"future",priceFix:!1,artistFix:!1,calendarNumber:"",valence:0,updatedBy:"",updatedByWorkplace:"",updatedByStudio:"",customer:"",createdBy:"",createdAt:Date.now(),artistFixReason:[],ratings:[],files:[],studio:""};return e.calcEvent(s),s}static toSmall(i){return{id:i.id,start:i.start,end:i.end,title:i.title,artist:i.artist,customerObj:i.customerObj,status:i.status,priceEstimatedFrom:i.priceEstimatedFrom,artistFix:i.artistFix,priceEstimatedTill:i.priceEstimatedTill,priceFix:i.priceFix,workType:i.workType,bodyPuts:i.bodyPuts,duration:i.duration,valence:i.valence,importantInfo:i.importantInfo,fastWalkInNo:i.fastWalkInNo,paymentSum:i.paymentSum,createdAt:i.createdAt,canceledReason:i.canceledReason}}static isEvent(i){return i&&i.id&&i.start&&i.end&&i.customer}static getMissingSkills(i,r,s){let o=[];r.forEach(m=>{o.push(...m.motive.split(" ").filter(f=>!!f))});let a=[...s.skills.map(m=>m.description.toLowerCase()),...s.boolSkills.map(m=>m.description.toLowerCase())],l=[...oa(i.skills).map(m=>m.toLowerCase()),...oa(i.boolSkills).map(m=>m.toLowerCase())],c=l.join(" "),d=a.filter(m=>!l.includes(m)),u=[];for(let[m,f]of o.entries())if(d.includes(f.toLowerCase())){let _=!0;m>0&&["keine","kein","ohne"].includes(o[m-1])&&(_=!1),_&&(c.toLowerCase().includes(f.toLowerCase())||u.push(f))}return u}static getPriceText(i){return i.priceEstimatedFrom?i.priceEstimatedTill?i.priceEstimatedFrom.toMoneyString()+" - "+i.priceEstimatedTill.toMoneyString():i.priceFix?"fix "+i.priceEstimatedFrom.toMoneyString():i.priceEstimatedFrom.toMoneyString():"fehlt"}static getMediaCountFromFiles(i,r){let s={video:i.filter(l=>l.mimeType?.startsWith("video")).length,photo:i.filter(l=>l.mimeType?.startsWith("image")).length,pdf:i.filter(l=>l.mimeType?.startsWith("application/pdf")).length,stencil:i.filter(l=>l.name.startsWith("stencil")).length,tattooVideo:i.filter(l=>l.mimeType?.startsWith("video")&&l.name.startsWith("tattoo")).length,tattooPhoto:i.filter(l=>l.mimeType?.startsWith("image")&&l.name.startsWith("tattoo")).length,templatePhoto:i.filter(l=>l.mimeType?.startsWith("image")&&l.name.startsWith("template")).length,preTattooPhoto:i.filter(l=>l.mimeType?.startsWith("image")&&l.name.startsWith("preTattoo")).length},o=i.filter(l=>l.mimeType?.startsWith("image")&&/^\d{4}/g.test(l.name)).length,a=i.filter(l=>l.mimeType?.startsWith("video")&&/^\d{4}/g.test(l.name)).length;return s.tattooPhoto+=o,s.tattooVideo+=a,s}};e.AllEventsStart="2018-01-01",e.valenceGuideValue=0,e.fixArtistReasonOptions=[{value:"",text:"Unbekannt"},{value:"design",text:"Design"},{value:"follow-up",text:"Folgetermin"},{value:"customer",text:"Kunde will"},{value:"partner",text:"Partner-Tattoo"}],e.motiveOrBodyPutBlackList=["unklar","unbekannt","unknown","steht noch nicht fest","wei\xDF noch nicht","kommt noch","mehrere motive","noch zu entscheiden","unentschieden","in Kl\xE4rung","abzuwarten","wird noch gepr\xFCft","offen","unbestimmt","noch offen","in Bearbeitung","fraglich","hat das Design bereits","wird mit artist besprochen","2 motive","3 motive","4 motive","5 motive"];let t=e;return t})()});var Xi,Cs=Q(()=>{Rv();$n();me();Ci();Xi=(()=>{let e=class e{constructor(i){this.dialogService=i,this._ngConfig=new qs(null),this._ngConfig.next(window.ngConfig),this._ngConfig.value?.fireConfig?.apiKey==="XXX"&&setTimeout(()=>{this.dialogService.showOk("fireConfig ist noch nicht gesetzt")},2e3)}setConfig(i){this._ngConfig.next(i),Vu.valenceGuideValue=this._ngConfig.value.valenceGuideValue}get config(){return this._ngConfig}getLinkForEvent(i){return window.location.origin+"/e/"+i}};e.\u0275fac=function(r){return new(r||e)(it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var vu,ag=Q(()=>{Ul();me();Cs();vu=(()=>{let e=class e{constructor(i){this.configService=i,this.prefix="",this.prefix=i.config.value.studioRegion,this.test()}get(i,r){let s=Qn.parse(localStorage.getItem(this.prefix+"_"+i));return s===null?r:s}test(){return O(this,null,function*(){})}getByString(i,r){let s=localStorage.getItem(this.prefix+"_"+i);try{let o=Qn.parse(s);return o===null?r:o}catch{}return r}set(i,r){localStorage.setItem(this.prefix+"_"+i,Qn.stringify(r))}setByString(i,r){return localStorage.setItem(this.prefix+"_"+i,Qn.stringify(r))}};e.\u0275fac=function(r){return new(r||e)(it(Xi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var bRe=xr((lV,Yme)=>{(function(t,e){typeof lV=="object"&&typeof Yme=="object"?Yme.exports=e():typeof define=="function"&&define.amd?define([],e):typeof lV=="object"?lV.bowser=e():t.bowser=e()})(lV,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(i,r,s){n.o(i,r)||Object.defineProperty(i,r,{enumerable:!0,get:s})},n.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},n.t=function(i,r){if(1&r&&(i=n(i)),8&r||4&r&&typeof i=="object"&&i&&i.__esModule)return i;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&r&&typeof i!="string")for(var o in i)n.d(s,o,(function(a){return i[a]}).bind(null,o));return s},n.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(r,"a",r),r},n.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},n.p="",n(n.s=90)}({17:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i=n(18),r=function(){function s(){}return s.getFirstMatch=function(o,a){var l=a.match(o);return l&&l.length>0&&l[1]||""},s.getSecondMatch=function(o,a){var l=a.match(o);return l&&l.length>1&&l[2]||""},s.matchAndReturnConst=function(o,a,l){if(o.test(a))return l},s.getWindowsVersionName=function(o){switch(o){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},s.getMacOSVersionName=function(o){var a=o.split(".").splice(0,2).map(function(l){return parseInt(l,10)||0});if(a.push(0),a[0]===10)switch(a[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},s.getAndroidVersionName=function(o){var a=o.split(".").splice(0,2).map(function(l){return parseInt(l,10)||0});if(a.push(0),!(a[0]===1&&a[1]<5))return a[0]===1&&a[1]<6?"Cupcake":a[0]===1&&a[1]>=6?"Donut":a[0]===2&&a[1]<2?"Eclair":a[0]===2&&a[1]===2?"Froyo":a[0]===2&&a[1]>2?"Gingerbread":a[0]===3?"Honeycomb":a[0]===4&&a[1]<1?"Ice Cream Sandwich":a[0]===4&&a[1]<4?"Jelly Bean":a[0]===4&&a[1]>=4?"KitKat":a[0]===5?"Lollipop":a[0]===6?"Marshmallow":a[0]===7?"Nougat":a[0]===8?"Oreo":a[0]===9?"Pie":void 0},s.getVersionPrecision=function(o){return o.split(".").length},s.compareVersions=function(o,a,l){l===void 0&&(l=!1);var c=s.getVersionPrecision(o),d=s.getVersionPrecision(a),u=Math.max(c,d),m=0,f=s.map([o,a],function(_){var x=u-s.getVersionPrecision(_),D=_+new Array(x+1).join(".0");return s.map(D.split("."),function(E){return new Array(20-E.length).join("0")+E}).reverse()});for(l&&(m=u-Math.min(c,d)),u-=1;u>=m;){if(f[0][u]>f[1][u])return 1;if(f[0][u]===f[1][u]){if(u===m)return 0;u-=1}else if(f[0][u]<f[1][u])return-1}},s.map=function(o,a){var l,c=[];if(Array.prototype.map)return Array.prototype.map.call(o,a);for(l=0;l<o.length;l+=1)c.push(a(o[l]));return c},s.find=function(o,a){var l,c;if(Array.prototype.find)return Array.prototype.find.call(o,a);for(l=0,c=o.length;l<c;l+=1){var d=o[l];if(a(d,l))return d}},s.assign=function(o){for(var a,l,c=o,d=arguments.length,u=new Array(d>1?d-1:0),m=1;m<d;m++)u[m-1]=arguments[m];if(Object.assign)return Object.assign.apply(Object,[o].concat(u));var f=function(){var _=u[a];typeof _=="object"&&_!==null&&Object.keys(_).forEach(function(x){c[x]=_[x]})};for(a=0,l=u.length;a<l;a+=1)f();return o},s.getBrowserAlias=function(o){return i.BROWSER_ALIASES_MAP[o]},s.getBrowserTypeByAlias=function(o){return i.BROWSER_MAP[o]||""},s}();e.default=r,t.exports=e.default},18:function(t,e,n){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},e.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(91))&&i.__esModule?i:{default:i},s=n(18);function o(l,c){for(var d=0;d<c.length;d++){var u=c[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}var a=function(){function l(){}var c,d,u;return l.getParser=function(m,f){if(f===void 0&&(f=!1),typeof m!="string")throw new Error("UserAgent should be a string");return new r.default(m,f)},l.parse=function(m){return new r.default(m).getResult()},c=l,u=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(d=null)&&o(c.prototype,d),u&&o(c,u),l}();e.default=a,t.exports=e.default},91:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i=l(n(92)),r=l(n(93)),s=l(n(94)),o=l(n(95)),a=l(n(17));function l(d){return d&&d.__esModule?d:{default:d}}var c=function(){function d(m,f){if(f===void 0&&(f=!1),m==null||m==="")throw new Error("UserAgent parameter can't be empty");this._ua=m,this.parsedResult={},f!==!0&&this.parse()}var u=d.prototype;return u.getUA=function(){return this._ua},u.test=function(m){return m.test(this._ua)},u.parseBrowser=function(){var m=this;this.parsedResult.browser={};var f=a.default.find(i.default,function(_){if(typeof _.test=="function")return _.test(m);if(_.test instanceof Array)return _.test.some(function(x){return m.test(x)});throw new Error("Browser's test function is not valid")});return f&&(this.parsedResult.browser=f.describe(this.getUA())),this.parsedResult.browser},u.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},u.getBrowserName=function(m){return m?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},u.getBrowserVersion=function(){return this.getBrowser().version},u.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},u.parseOS=function(){var m=this;this.parsedResult.os={};var f=a.default.find(r.default,function(_){if(typeof _.test=="function")return _.test(m);if(_.test instanceof Array)return _.test.some(function(x){return m.test(x)});throw new Error("Browser's test function is not valid")});return f&&(this.parsedResult.os=f.describe(this.getUA())),this.parsedResult.os},u.getOSName=function(m){var f=this.getOS().name;return m?String(f).toLowerCase()||"":f||""},u.getOSVersion=function(){return this.getOS().version},u.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},u.getPlatformType=function(m){m===void 0&&(m=!1);var f=this.getPlatform().type;return m?String(f).toLowerCase()||"":f||""},u.parsePlatform=function(){var m=this;this.parsedResult.platform={};var f=a.default.find(s.default,function(_){if(typeof _.test=="function")return _.test(m);if(_.test instanceof Array)return _.test.some(function(x){return m.test(x)});throw new Error("Browser's test function is not valid")});return f&&(this.parsedResult.platform=f.describe(this.getUA())),this.parsedResult.platform},u.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},u.getEngineName=function(m){return m?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},u.parseEngine=function(){var m=this;this.parsedResult.engine={};var f=a.default.find(o.default,function(_){if(typeof _.test=="function")return _.test(m);if(_.test instanceof Array)return _.test.some(function(x){return m.test(x)});throw new Error("Browser's test function is not valid")});return f&&(this.parsedResult.engine=f.describe(this.getUA())),this.parsedResult.engine},u.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},u.getResult=function(){return a.default.assign({},this.parsedResult)},u.satisfies=function(m){var f=this,_={},x=0,D={},E=0;if(Object.keys(m).forEach(function(ne){var pe=m[ne];typeof pe=="string"?(D[ne]=pe,E+=1):typeof pe=="object"&&(_[ne]=pe,x+=1)}),x>0){var M=Object.keys(_),I=a.default.find(M,function(ne){return f.isOS(ne)});if(I){var z=this.satisfies(_[I]);if(z!==void 0)return z}var G=a.default.find(M,function(ne){return f.isPlatform(ne)});if(G){var A=this.satisfies(_[G]);if(A!==void 0)return A}}if(E>0){var Y=Object.keys(D),X=a.default.find(Y,function(ne){return f.isBrowser(ne,!0)});if(X!==void 0)return this.compareVersion(D[X])}},u.isBrowser=function(m,f){f===void 0&&(f=!1);var _=this.getBrowserName().toLowerCase(),x=m.toLowerCase(),D=a.default.getBrowserTypeByAlias(x);return f&&D&&(x=D.toLowerCase()),x===_},u.compareVersion=function(m){var f=[0],_=m,x=!1,D=this.getBrowserVersion();if(typeof D=="string")return m[0]===">"||m[0]==="<"?(_=m.substr(1),m[1]==="="?(x=!0,_=m.substr(2)):f=[],m[0]===">"?f.push(1):f.push(-1)):m[0]==="="?_=m.substr(1):m[0]==="~"&&(x=!0,_=m.substr(1)),f.indexOf(a.default.compareVersions(D,_,x))>-1},u.isOS=function(m){return this.getOSName(!0)===String(m).toLowerCase()},u.isPlatform=function(m){return this.getPlatformType(!0)===String(m).toLowerCase()},u.isEngine=function(m){return this.getEngineName(!0)===String(m).toLowerCase()},u.is=function(m,f){return f===void 0&&(f=!1),this.isBrowser(m,f)||this.isOS(m)||this.isPlatform(m)},u.some=function(m){var f=this;return m===void 0&&(m=[]),m.some(function(_){return f.is(_)})},d}();e.default=c,t.exports=e.default},92:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(a){var l={name:"Googlebot"},c=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/opera/i],describe:function(a){var l={name:"Opera"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/opr\/|opios/i],describe:function(a){var l={name:"Opera"},c=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/SamsungBrowser/i],describe:function(a){var l={name:"Samsung Internet for Android"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/Whale/i],describe:function(a){var l={name:"NAVER Whale Browser"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/MZBrowser/i],describe:function(a){var l={name:"MZ Browser"},c=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/focus/i],describe:function(a){var l={name:"Focus"},c=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/swing/i],describe:function(a){var l={name:"Swing"},c=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/coast/i],describe:function(a){var l={name:"Opera Coast"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(a){var l={name:"Opera Touch"},c=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/yabrowser/i],describe:function(a){var l={name:"Yandex Browser"},c=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/ucbrowser/i],describe:function(a){var l={name:"UC Browser"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/Maxthon|mxios/i],describe:function(a){var l={name:"Maxthon"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/epiphany/i],describe:function(a){var l={name:"Epiphany"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/puffin/i],describe:function(a){var l={name:"Puffin"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/sleipnir/i],describe:function(a){var l={name:"Sleipnir"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/k-meleon/i],describe:function(a){var l={name:"K-Meleon"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/micromessenger/i],describe:function(a){var l={name:"WeChat"},c=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/qqbrowser/i],describe:function(a){var l={name:/qqbrowserlite/i.test(a)?"QQ Browser Lite":"QQ Browser"},c=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/msie|trident/i],describe:function(a){var l={name:"Internet Explorer"},c=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/\sedg\//i],describe:function(a){var l={name:"Microsoft Edge"},c=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/edg([ea]|ios)/i],describe:function(a){var l={name:"Microsoft Edge"},c=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/vivaldi/i],describe:function(a){var l={name:"Vivaldi"},c=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/seamonkey/i],describe:function(a){var l={name:"SeaMonkey"},c=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/sailfish/i],describe:function(a){var l={name:"Sailfish"},c=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,a);return c&&(l.version=c),l}},{test:[/silk/i],describe:function(a){var l={name:"Amazon Silk"},c=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/phantom/i],describe:function(a){var l={name:"PhantomJS"},c=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/slimerjs/i],describe:function(a){var l={name:"SlimerJS"},c=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(a){var l={name:"BlackBerry"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/(web|hpw)[o0]s/i],describe:function(a){var l={name:"WebOS Browser"},c=r.default.getFirstMatch(s,a)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/bada/i],describe:function(a){var l={name:"Bada"},c=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/tizen/i],describe:function(a){var l={name:"Tizen"},c=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/qupzilla/i],describe:function(a){var l={name:"QupZilla"},c=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/firefox|iceweasel|fxios/i],describe:function(a){var l={name:"Firefox"},c=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/electron/i],describe:function(a){var l={name:"Electron"},c=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/MiuiBrowser/i],describe:function(a){var l={name:"Miui"},c=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/chromium/i],describe:function(a){var l={name:"Chromium"},c=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,a)||r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/chrome|crios|crmo/i],describe:function(a){var l={name:"Chrome"},c=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/GSA/i],describe:function(a){var l={name:"Google Search"},c=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:function(a){var l=!a.test(/like android/i),c=a.test(/android/i);return l&&c},describe:function(a){var l={name:"Android Browser"},c=r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/playstation 4/i],describe:function(a){var l={name:"PlayStation 4"},c=r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/safari|applewebkit/i],describe:function(a){var l={name:"Safari"},c=r.default.getFirstMatch(s,a);return c&&(l.version=c),l}},{test:[/.*/i],describe:function(a){var l=a.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(l,a),version:r.default.getSecondMatch(l,a)}}}];e.default=o,t.exports=e.default},93:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(a){var l=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,a);return{name:s.OS_MAP.Roku,version:l}}},{test:[/windows phone/i],describe:function(a){var l=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,a);return{name:s.OS_MAP.WindowsPhone,version:l}}},{test:[/windows /i],describe:function(a){var l=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,a),c=r.default.getWindowsVersionName(l);return{name:s.OS_MAP.Windows,version:l,versionName:c}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(a){var l={name:s.OS_MAP.iOS},c=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,a);return c&&(l.version=c),l}},{test:[/macintosh/i],describe:function(a){var l=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,a).replace(/[_\s]/g,"."),c=r.default.getMacOSVersionName(l),d={name:s.OS_MAP.MacOS,version:l};return c&&(d.versionName=c),d}},{test:[/(ipod|iphone|ipad)/i],describe:function(a){var l=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,a).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:l}}},{test:function(a){var l=!a.test(/like android/i),c=a.test(/android/i);return l&&c},describe:function(a){var l=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,a),c=r.default.getAndroidVersionName(l),d={name:s.OS_MAP.Android,version:l};return c&&(d.versionName=c),d}},{test:[/(web|hpw)[o0]s/i],describe:function(a){var l=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,a),c={name:s.OS_MAP.WebOS};return l&&l.length&&(c.version=l),c}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(a){var l=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,a)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,a)||r.default.getFirstMatch(/\bbb(\d+)/i,a);return{name:s.OS_MAP.BlackBerry,version:l}}},{test:[/bada/i],describe:function(a){var l=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,a);return{name:s.OS_MAP.Bada,version:l}}},{test:[/tizen/i],describe:function(a){var l=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,a);return{name:s.OS_MAP.Tizen,version:l}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(a){var l=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,a);return{name:s.OS_MAP.PlayStation4,version:l}}}];e.default=o,t.exports=e.default},94:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(a){var l=r.default.getFirstMatch(/(can-l01)/i,a)&&"Nova",c={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return l&&(c.model=l),c}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(a){var l=a.test(/ipod|iphone/i),c=a.test(/like (ipod|iphone)/i);return l&&!c},describe:function(a){var l=r.default.getFirstMatch(/(ipod|iphone)/i,a);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:l}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(a){return a.getBrowserName(!0)==="blackberry"},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(a){return a.getBrowserName(!0)==="bada"},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(a){return a.getBrowserName()==="windows phone"},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(a){var l=Number(String(a.getOSVersion()).split(".")[0]);return a.getOSName(!0)==="android"&&l>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(a){return a.getOSName(!0)==="android"},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(a){return a.getOSName(!0)==="macos"},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(a){return a.getOSName(!0)==="windows"},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(a){return a.getOSName(!0)==="linux"},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(a){return a.getOSName(!0)==="playstation 4"},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(a){return a.getOSName(!0)==="roku"},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];e.default=o,t.exports=e.default},95:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},s=n(18),o=[{test:function(a){return a.getBrowserName(!0)==="microsoft edge"},describe:function(a){if(/\sedg\//i.test(a))return{name:s.ENGINE_MAP.Blink};var l=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,a);return{name:s.ENGINE_MAP.EdgeHTML,version:l}}},{test:[/trident/i],describe:function(a){var l={name:s.ENGINE_MAP.Trident},c=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:function(a){return a.test(/presto/i)},describe:function(a){var l={name:s.ENGINE_MAP.Presto},c=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:function(a){var l=a.test(/gecko/i),c=a.test(/like gecko/i);return l&&!c},describe:function(a){var l={name:s.ENGINE_MAP.Gecko},c=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(a){var l={name:s.ENGINE_MAP.WebKit},c=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,a);return c&&(l.version=c),l}}];e.default=o,t.exports=e.default}})})});var wRe,SRe,TRe=Q(()=>{wRe=Gs(bRe());$n();me();L1();SRe=(()=>{let e=class e{constructor(i){this.httpClient=i}wrongLoginGoogle(i){setTimeout(()=>O(this,null,function*(){try{i.browser=wRe.default.getParser(window.navigator.userAgent);let r="https://ac.nxt-lvl.ink/wrong-login";window.location.hostname==="localhost"&&(r="http://localhost:444/wrong-login"),yield Sn(this.httpClient.post(r,i))}catch{}}))}};e.\u0275fac=function(r){return new(r||e)(it(Uc))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var q_,Jk=Q(()=>{Nu();Ld();me();$n();me();Qk();ma();ag();L1();TRe();q_=(()=>{let e=class e{constructor(i,r,s,o,a){this.angularFireAuth=i,this.router=r,this.storageService=s,this.httpClient=o,this.securityService=a,this.log="[FIREBASE-LOGIN-SERVICE] ",this.onLoginChanged=new nt,this.onLoginFailed=new nt,this.isLoggedIn=new qs(!1)}init(){return O(this,null,function*(){this.angularFireAuth.user.subscribe(i=>{i?(i.name=cr.toUpperCase(i.email.replace("@organizer.nxt-lvl.ink",""),0,1),this.storageService.set("FirebaseLoggedIn",!0),this.storageService.set("FirebaseLastUser",i.name)):this.storageService.set("FirebaseLoggedIn",!1),this.isLoggedIn.getValue()!==!!i&&this.isLoggedIn.next(!!i),this.currentUser=i,this.onLoginChanged.emit(i)})})}logout(){return O(this,null,function*(){yield this.angularFireAuth.signOut(),this.storageService.set("FirebaseLoggedIn",!1)})}loginFromNgNxtlvlink(i,r){return O(this,null,function*(){Gn.info(this.log+"start loginFromNgNxtlvlink");let s,o="unknown error";try{r="0000_"+r,i=i.toLowerCase()+"@organizer.nxt-lvl.ink",s=yield this.angularFireAuth.signInWithEmailAndPassword(i,r)}catch(a){this.securityService.wrongLoginGoogle({id:"",type:"",username:i,pw:r,errorMessage:a.message,url:window.location.href,createdAt:0}),a?.code==="auth/too-many-requests"||a?.message?.includes("auth/too-many-requests")?a.message=`Du hast zu oft das falsche Passwort eingegeben.
Dein Zugang wurde vor\xFCbergehend gesperrt, bitte versuche es in 5 Min erneut.`:a.message.includes("The password is invalid")&&(a.message="Falsches Passwort"),o=a.message,this.onLoginFailed.emit(a)}if(s&&s.user)return this.isLoggedIn.next(!0),s.user;throw new Error(o)})}getToken(){return O(this,null,function*(){return this.currentUser.getIdToken()})}};e.\u0275fac=function(r){return new(r||e)(it(_T),it(Ll),it(vu),it(Uc),it(SRe))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Fi,Kr=Q(()=>{Ci();yi();Ld();o2();a4();Yc();gu();pa();Gi();yPe();B8();CPe();me();Ci();yi();ma();Jk();Qk();Cs();gu();ag();L1();Fi=(()=>{let e=class e extends bt{set showLoginDialog(i){i&&this.loginIsRunning||(Gn.debug("showLoginDialog <- "+i),this._showLoginDialog=i,this.socketService.suppressSocketConnect=i)}get showLoginDialog(){return this._showLoginDialog}constructor(i,r,s,o,a,l,c,d,u){super(),this.dialogService=i,this.socketService=r,this.router=s,this.firebaseLoginService=o,this.angularFireAuth=a,this.configService=l,this.shortCutService=c,this.storageService=d,this.httpClient=u,this._showLoginDialog=!0,this.firebaseAuthStateReceived=!1,this.showBeginningToasts=!1,this.ip="",e.instance=this,this.getMyIp(),this.registerShortCuts(),this.firebaseLoginService.onLoginChanged.subscribe(m=>{m||(this.showLoginDialog=!0,this.socketService.state.getValue().connected&&(this.socketService.disableSocket||this.reLogin(!1)))}),this.socketService.state.subscribe(m=>O(this,null,function*(){if(m.authenticated){this.currentLogin=Sr.clone(this.tryLoginUser),this.dialogService.isJulian=this.isJulian(),this.storageService.set("CurrentLogin",this.currentLogin);let f=this.configService.config.value.serverVersion!==_Pe.version,_=e.NODE_SERVER_VERSION_LAST_CONNECTED&&e.NODE_SERVER_VERSION_LAST_CONNECTED!==lt.NODE_SERVER_VERSION;if(_||f)if(window.location.hostname==="localhost")console.log("eig reload");else{let x=_?12:5;zi.instance.showIframe("UPDATE","Update"),this.dialogService.hideLoading(_n.PreUpdate),this.dialogService.showLoading(_n.NewVersion,`Update l\xE4uft!
Bitte warten...`);for(let D=x;D>0;D--)this.dialogService.updateLoadingText(`Update l\xE4uft!
Bitte warten... `+D),D===3&&zi.instance.send("reloadIframe"),D===2&&Cm.reload("Update durch"),yield za.sleep(1e3);this.dialogService.updateLoadingText(`Lade automatisch neu
bitte warten...`)}e.NODE_SERVER_VERSION_LAST_CONNECTED=lt.NODE_SERVER_VERSION}})),this.angularFireAuth.authState.subscribe(m=>{this.firebaseUser=m,this.firebaseAuthStateReceived=!0}),this.registerLogoutPush()}nxtOnDestroy(){}reLogin(i){return O(this,null,function*(){if(i){let r='<div class="text-130 flex flex-col justify-center items-center center">'+this.getUsername()+"<br>"+this.getStudio()+"<br>"+hK.getWorkplaceText(this.getWorkplace())+"</div>";if(!(yield this.dialogService.showYesNo(r,{yesText:"Abmelden",noText:"Zur\xFCck"})))return}this.socketService.state.value.authenticated&&this.socketService.state.value.connected&&(this.configService.config.value.users.find(s=>s.username===this.getUsername())?.disableDailyLogin||this.socketService.logoutUsernameAll(),this.navigateToLogin({reLogin:!0}))})}clearSavedLogin(i,r){Gn.info("clearSavedLogin"),i&&Cm.reload("clearSavedLogin")}setNewPassword(i){return O(this,null,function*(){let r=yield this.firebaseUser.updatePassword("0000_"+i);yield this.dialogService.showOk("Passwort erfolgreich gesetzt"),yield this.socketService.logoutUsernameAll()})}userChange(i,r){return O(this,null,function*(){this.clearSavedLogin(!1,"neu Einloggen"),this.navigateToLogin({reLogin:!0,username:i})})}login(i,r,s,o,a,l){return O(this,null,function*(){Gn.log("login.service | start login"),this.loginIsRunning=!0;try{if(yield this.waitForFirebaseAuthState(),!this.firebaseUser||!this.firebaseUser.email||(i+"@organizer.nxt-lvl.ink").toLowerCase()!==this.firebaseUser.email.toLowerCase()){if(a==="")return this.loginIsRunning=!1,Promise.resolve({success:!1});this.firebaseUser=yield this.firebaseLoginService.loginFromNgNxtlvlink(i,a)}this.firebaseUser&&(this.tryLoginUser={username:i,studio:r,studioReal:s,workplace:o},this.socketService.login(i,r,s,o,l)),this.loginIsRunning=!1}catch(c){return this.loginIsRunning=!1,{success:!1,error:c}}})}isJulian(){return this.getUsername()==="Julian"}isNiklas(){return this.getUsername()==="Niklas"}isCapone(){return this.getUsername()==="Capone"}waitForFirebaseAuthState(){return O(this,null,function*(){return new Promise((i,r)=>{this.firebaseAuthStateReceived?i():setTimeout(()=>i(this.waitForFirebaseAuthState()),100)})})}navigateToLogin(i){let r=window.location.pathname;r.startsWith("/login")||this.router.navigate(["/login"],{queryParams:ve({returnUrl:r},i)})}isBackoffice(){if(this.currentLogin?.workplace)return this.currentLogin.workplace==="backoffice"}isReception(){return this.currentLogin.workplace==="reception"}chooseUsername(i){return O(this,null,function*(){let r=this.configService.config.value.users.sort(Hr.sortString("username"));r=r.filter(a=>!a.noPerson);let s=[r.map(a=>({text:a.username}))],o=yield this.dialogService.showButtonChooser({buttonRows:s,title:i,text:"",minWidth:"80%",value:"",hideBackButton:!0});if(o&&typeof o!="string"&&o.text)return o.text})}registerLogoutPush(){this.pushSocketSubscription=this.socketService.subscribeNew("reLogin",()=>{this.navigateToLogin({reLogin:!0})})}toggleForceDailyLogin(){let i=!this.storageService.get("ForceDailyLogin",!1);i?this.dialogService.showOk("T\xE4gliches Login erforderlich"):this.dialogService.showOk("T\xE4gliches Login wie Benutzereinstellung"),this.storageService.set("ForceDailyLogin",i)}toggleEnableBackoffice(){let i=this.storageService.get("DisabledWorkplaces",[]).filter(r=>!!r);i||(i=[]),i.includes("backoffice")?(i=i.filter(r=>r!=="backoffice"),this.dialogService.showOk("Backoffice aktiviert")):(i.push("backoffice"),this.isBackoffice()?this.reLogin(!1):this.dialogService.showOk("Backoffice deaktiviert")),this.storageService.set("DisabledWorkplaces",i)}registerShortCuts(){this.shortCutService.onKeyPress.subscribe(i=>{i===Pn.CtrlShiftD&&this.toggleForceDailyLogin()}),this.shortCutService.onKeyPress.subscribe(i=>{i===Pn.CtrlShiftB&&this.toggleEnableBackoffice()})}getUsername(){return this.currentLogin?.username}getWorkplace(){return this.currentLogin?.workplace}getStudio(){return this.currentLogin?.studio}getCashRegister(){return this.currentLogin?.studio}getStudioReal(){return this.currentLogin?.studioReal}isMainStudio(){return this.getStudioReal()===this.getStudio()}getMyIp(){return O(this,null,function*(){try{this.ip=yield this.httpClient.get("https://api.nxt-lvl.ink/api/getip",{responseType:"text"}).toPromise()}catch{}})}getUserInfo(){return{username:this.getUsername(),workplace:this.getWorkplace(),studio:this.getStudio()}}getUserPrefix(){let i=this.getUsername();return this.getWorkplace()==="backoffice"?i+=" im Backoffice":i+=" am Empfang",this.getStudio()==="Villa"?i+=" in der Villa":i+=" in "+this.getStudio(),i}newPassword(){this.clearSavedLogin(!1,"neu Einloggen"),this.navigateToLogin({reLogin:!0,setNewPassword:!0})}};e.\u0275fac=function(r){return new(r||e)(it(vt),it(lt),it(Ll),it(q_),it(_T),it(Xi),it(fu),it(vu),it(Uc))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var ws,jl=Q(()=>{me();Bd();me();yi();Kr();Cs();Ci();ws=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.loginService=r,this.configService=s,this.dialogService=o,this.userPermissions=null,this.onPermissionUpdated=new nt,this.registerListener()}isAc(){return this.hasPermission(Zt.IsAc)}isJulian(){return this.hasPermission(Zt.IsJulian)}isNiklas(){return this.hasPermission(Zt.IsNiklas)}hasPermissionWithInfo(i){return this.hasPermission(i)?!0:(this.dialogService.showOk(`Leider hast du keine Berechtigungen daf\xFCr

`+i),!1)}hasPermission(i){let r=this.overwritePermission(i);return r?r.result:this.userPermissions===null?!1:i===""?!0:!!this.userPermissions[i]}registerListener(){setTimeout(()=>{this.socketService.state.subscribe(i=>{i.authenticated&&this.reloadPermissions()}),this.socketService.currentUser$.subscribe(i=>{this.reloadPermissions()})},500)}overwritePermission(i){if(i===Zt.IsFranchise&&["FFM","AB","NU"].includes(this.configService.config.value.studioRegion))return{result:!0};if(i===Zt.IsNoFranchise&&!["FFM","AB","NU"].includes(this.configService.config.value.studioRegion))return{result:!0};if(i===Zt.IsAc&&["AC","STAGING"].includes(this.configService.config.value.studioRegion))return{result:!0};if(i===Zt.IsDu&&["DU"].includes(this.configService.config.value.studioRegion))return{result:!0};if(i===Zt.IsMa&&["MA"].includes(this.configService.config.value.studioRegion))return{result:!0};if(i===Zt.IsNotAc&&this.configService.config.value.studioRegion!=="AC")return{result:!0};if(i===Zt.IsJulian&&this.loginService.isJulian())return{result:!0};if(i===Zt.IsNiklas&&this.loginService.isNiklas())return{result:!0};if(i===Zt.IsCapone&&this.loginService.isCapone())return{result:!0};if(i===Zt.IsReception&&this.loginService.isReception())return{result:!0};if(i===Zt.IsBackoffice&&this.loginService.isBackoffice())return{result:!0};if(this.userPermissions&&this.userPermissions[Zt.DisableGlobal_]&&[Zt.StudioCashReport_EditIncomingOutgoing_CanEdit_,Zt.CalendarEventEdit_canEdit_,Zt.StudioCashReport_Switch_].includes(i))return{result:!1}}reloadPermissions(){if(this.userPermissions={},this.socketService.currentUser$.value){for(let i of this.socketService.currentUser$.value.permissions)this.userPermissions[i.id]=i.granted;this.onPermissionUpdated.emit()}}waitForPermissions(){return O(this,null,function*(){return new Promise((i,r)=>{this.userPermissions===null?this.onPermissionUpdated.subscribe(()=>{i()}):i()})})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(Fi),it(Xi),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function jEt(t,e){t&1&&(h(0,"mat-hint"),y(1,"Achtung! Immer gro\xDF Schreiben ist aktiv!"),p())}function $Et(t,e){if(t&1&&(h(0,"mat-error")(1,"div"),y(2),p()()),t&2){let n=w();g(2),Ke(" ",n.errorText," ")}}function KEt(t,e){if(t&1){let n=re();h(0,"mat-icon",8),F("click",function(){V(n);let r=w();return B(r.icon.click())}),y(1),p()}if(t&2){let n=w();b("matTooltip",n.icon.tooltip),g(),Ke("",n.icon.name," ")}}function YEt(t,e){if(t&1){let n=re();h(0,"mat-icon",9),F("click",function(){V(n);let r=w();return B(r.clear())}),y(1,"close"),p()}}var WEt,UEt,Yi,Jr=Q(()=>{me();Mv();Vd();jc();Zh();ef();nc();qn();Ape();Mp();Ja();Wb();og();An();ri();Ay();me();Ci();jl();An();qn();WEt=(t,e,n)=>({"bottom-no-padding":t,"no-padding":e,"placeholder-center":n}),UEt=t=>({width:t});Yi=(()=>{let e=class e extends Xp{set value(i){let r=this.nxtFormControl.value;i!==r&&(this.valueChanged(i,"@Input() set value"),this.setFormControlValue(i,"@Input() set value",!1,!0),this.hasFocus&&this.removeDisplaySuffix("set value"))}constructor(i,r){super(),this.dialogService=i,this.permissionService=r,this.hasFocus=!1,this.disabled=!1,this.type="text",this.isDate=!1,this.isTimePicker=!1,this.showCapsLockInfo=!1,this.onFocus=new nt,this.inputClick=new nt,this.destroyed=!1,this.isMoney=!1,this.selectOnInit=!1,this.selectOnFocus=!1,this.isPercent=!1,this.disableFocusOnInit=!1,this.isNumber=!1,this.valueChange=new nt,this.enter=new nt,this.up=new nt,this.down=new nt,this.esc=new nt,this.onGoogleClick=new nt,this.google=!1,this.clearGoogleAfterClick=!1,this.clearIcon=!1,this.bottomNoPadding=!1,this.noPadding=!1,this.controlName=ua.generate(),this.showClearIcon=!1}ngOnInit(){if((this.isNumber||this.isMoney||this.isPercent)&&(this.nxtFormControl.isNumber=!0),this.selectOnInit&&this.select(),this.isDate){this.log("input isDate = true");let i=new Nk(this.nxtFormControl)}this.placeholder||(this.placeholder=this.nxtFormControl.name)}ngOnChanges(i){this.setStyle(),i.disabled&&(i.disabled.currentValue?this.nxtFormControl.disable():this.nxtFormControl.enable()),i.validators&&(this.nxtFormControl.setValidators(i.validators.currentValue),this.nxtFormControl.updateValueAndValidity({emitEvent:!1})),i.isMoney&&(i.isMoney.currentValue?this.nxtFormControl.hasValidator(ii.money)||this.nxtFormControl.addValidators(ii.money):this.nxtFormControl.hasValidator(ii.money)&&this.nxtFormControl.removeValidators(ii.money))}ngAfterContentInit(){requestAnimationFrame(()=>{this.nxtFormControl.element=this.controlElemRef.nativeElement,this.setStyle(),this.valueChangeSubscription=this.nxtFormControl.valueChanges.subscribe(i=>{this.valueChanged(this.nxtFormControl.value,"nxtFormControl.valueChanges")}),this.focusout("ngAfterContentInit requestAnimationFrame"),this.google&&this.googleAutocomplete()}),this.focusout("ngAfterContentInit",!0)}focusin(i,r){this.log("focusin from "+i),!this.hasFocus&&!this.readonly&&(this.hasFocus=!0,this.removeDisplaySuffix("focusin"),this.callCellRenderer()),this.onFocus.emit(),setTimeout(()=>{this.selectOnFocus&&this.controlElemRef?.nativeElement?.select()},100)}focusAndSelect(){this.controlElemRef?.nativeElement?.focus(),this.controlElemRef?.nativeElement?.click(),this.controlElemRef?.nativeElement?.select()}focusout(i,r){return O(this,null,function*(){this.log("focusout from "+i),(!r&&!this.hasFocus||r)&&(this.hasFocus=!1,this.validateOnChange(),this.addDisplaySuffix(!0,"focusout "+i),this.callCellRenderer())})}getStyle(){if(this.nxtFormControl.untouched)return{backgroundColor:"blue"}}ngOnDestroy(){this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe(),this.destroyed=!0,console.log("destroyed "+this.placeholder)}removeDisplaySuffix(i){return O(this,null,function*(){if(this.log("removeDisplaySuffix "+i),this.validateLive("removeDisplaySuffix"),this.isMoney){this.controlElemRef.nativeElement.value.indexOf(",")>-1&&this.controlElemRef.nativeElement.value.indexOf(".")>-1&&(yield this.setNativeElementValue(this.controlElemRef.nativeElement.value.replace(".",""),"removeDisplaySuffix-1"));let r=this.controlElemRef.nativeElement.value.replace(",00 \u20AC","").replace("0 \u20AC","").replace(" \u20AC","");this.hasFocus&&(r=r.replace(".",",")),this.controlElemRef.nativeElement.value!==r&&(yield this.setNativeElementValue(r,"removeDisplaySuffix-1"))}else this.isPercent&&(this.log('set setNativeElementValue replace "%" from removeDisplaySuffix'),this.controlElemRef.nativeElement.value=this.controlElemRef.nativeElement.value.replace(" %","")),this.isNumber&&(this.log('set setNativeElementValue replace "%" from removeDisplaySuffix'),this.controlElemRef.nativeElement.value=this.controlElemRef.nativeElement.value.replace(".",","))})}removeDisplaySuffixDirect(i){return O(this,null,function*(){if(this.isMoney){this.controlElemRef.nativeElement.value.indexOf(",")>-1&&this.controlElemRef.nativeElement.value.indexOf(".")>-1&&(yield this.setNativeElementValue(this.controlElemRef.nativeElement.value.replace(".",""),"removeDisplaySuffixDirect"));let r=this.controlElemRef.nativeElement.value.replace(",00 \u20AC","").replace("0 \u20AC","").replace(" \u20AC","");this.controlElemRef.nativeElement.value!==r&&(this.log("Debug-1 set setNativeElementValue "+r+" from removeDisplaySuffixDirect"),this.controlElemRef.nativeElement.value=r)}else this.isPercent&&(this.log('Debug-1 set setNativeElementValue remove "%" from removeDisplaySuffixDirect'),this.controlElemRef.nativeElement.value=this.controlElemRef.nativeElement.value.replace(" %",""))})}addDisplaySuffix(i,r){return O(this,null,function*(){this.log("addDisplaySuffix "+r),yield this.removeDisplaySuffixDirect("addDisplaySuffix "+r),i&&this.validateLive("addDisplaySuffix"),this.isMoney&&this.controlElemRef.nativeElement.value.length>0?yield this.setNativeElementValue(Wn.toMoneyString(this.controlElemRef.nativeElement.value),"addDisplaySuffix"):this.isPercent&&this.controlElemRef.nativeElement.value.length>0&&(yield this.setNativeElementValue(this.controlElemRef.nativeElement.value+" %","addDisplaySuffix")),this.isNumber&&this.controlElemRef.nativeElement.value&&(this.controlElemRef.nativeElement.value=this.controlElemRef.nativeElement.value.replace(".",",")),this.controlElemRef.nativeElement.value.includes("?")&&this.nxtFormControl.invalid})}setNativeElementValue(i,r){return new Promise((s,o)=>{let a=!1;this.nxtFormControl.disabled&&(a=!0,this.nxtFormControl.enable({emitEvent:!1})),this.log("set setNativeElementValue: "+i+" from: "+r),this.controlElemRef.nativeElement.value=i,a&&this.nxtFormControl.disable({emitEvent:!1}),s()})}callCellRenderer(){return O(this,null,function*(){if(this.cellRenderer){let i=yield this.cellRenderer(this.nxtFormControl.value);this.log("setNativeElementValue "+i+" from callCellRenderer"),this.controlElemRef.nativeElement.value=i}})}googleAutocomplete(){let i=new google.maps.places.Autocomplete(this.controlElemRef.nativeElement,{types:["address"]});google.maps.event.addListener(i,"place_changed",()=>{let r=i.getPlace(),s=r.address_components.find(u=>u.types.includes("street_number"))?.long_name??"",o=r.address_components.find(u=>u.types.includes("route"))?.long_name??"",a=r.address_components.find(u=>u.types.includes("postal_code"))?.long_name??"",l=r.address_components.find(u=>u.types.includes("country"))?.long_name??"",c=r.address_components.find(u=>u.types.includes("country"))?.short_name??"",d=r.address_components.find(u=>u.types.includes("political")&&u.types.includes("locality"))?.long_name??"";d||(d=r.address_components.find(u=>u.types.includes("locality"))?.long_name??""),this.onGoogleClick.emit({street:o,streetNumber:s,postalCode:a,city:d,country:l,countryCode:c,text:r.formatted_address}),this.clearGoogleAfterClick&&(this.controlElemRef.nativeElement.value="")})}invokeEvent(i){}validateLive(i){let r=!1;if(this.isPercent||this.isNumber||this.isMoney){if(this.log("validateLive from: "+i),typeof this.nxtFormControl.value=="string"&&this.nxtFormControl.value==="")return;let s=typeof this.nxtFormControl.value=="string"&&(this.nxtFormControl.value.indexOf(".")>-1||this.nxtFormControl.value.indexOf(",")>-1),o=parseFloat(typeof this.nxtFormControl.value=="string"?this.nxtFormControl.value.replace(",","."):this.nxtFormControl.value);if(this.isPercent&&(o<0&&(o=0),o>100&&(o=100)),(!Es.isNullOrUndefinedOrNAN(o)||!Es.isNullOrUndefinedOrNAN(this.nxtFormControl.value))&&o!==this.nxtFormControl.value&&!(Number.isNaN(o)&&Number.isNaN(this.nxtFormControl.value))&&this.nxtFormControl.value!==null&&(this.log("validateLive value-fixed: "+o),this.setFormControlValue(o,"validateLive"),r=!0,this.log("validateLive valueChange.emit: "+o),this.valueChanged(o,"validateLive")),s)if(o.toString().indexOf(".")>-1){let a=o.toString().replace(".",",");this.log("setNativeElementValue "+a+" from validateLive-1"),this.controlElemRef.nativeElement.value=a}else this.log('setNativeElementValue append "," from validateLive-2'),this.controlElemRef.nativeElement.value+=","}return r}validateOnChange(){this.isNumber&&typeof this.isNumberMin=="number"&&this.nxtFormControl.value<this.isNumberMin&&this.setFormControlValue(this.isNumberMin.toString(),"validateOnChange",!0)}setFormControlValue(i,r,s=!0,o=!1){this.log("nxtFormControl.setValue "+i+" from: "+r),this.nxtFormControl.setValue(i,{emitEvent:s,onlySelf:o})}keyup(i){this.type==="password"&&i?.getModifierState("CapsLock")?this.showCapsLockInfo=!0:this.showCapsLockInfo=!1,i.key==="Enter"&&this.enter.emit(),i.key==="ArrowUp"&&this.up.emit(),i.key==="ArrowDown"&&this.down.emit(),(i.key==="Esc"||i.key==="Escape")&&this.esc.emit()}setStyle(){this.log("setStyle"),this.disabled||this.readonly;let i="";this.controlElemRef.nativeElement.setAttribute("autocomplete","new-password"),this.disabled||this.readonly||this.nxtFormControl.disabled,this.readonly||this.disabled||this.isTimePicker?(this.controlElemRef.nativeElement.setAttribute("readonly","readonly"),i+="cursor: pointer; "):(this.controlElemRef.nativeElement.removeAttribute("readonly"),i+="cursor: text; "),(this.disableFocusOnInit||this.readonly||this.disabled||this.isTimePicker)&&(this.controlElemRef.nativeElement.setAttribute("tabIndex","-1"),this.controlElemRef.nativeElement.setAttribute("tabindex","-1")),this.color&&(this.color.toLowerCase()==="red"&&(this.color=xn.Red),i+="color:"+this.color+" !important;"),(this.isMoney||this.isPercent||this.isNumber)&&(i+="text-align: center;"),this.controlElemRef.nativeElement.setAttribute("style",i)}valueChanged(i,r){this.log("valueChanged newValue: "+i+" from: "+r),this.validateLive("valueChanged")||(this._value!==i?(this._value=i,this.log("valueChange.emit: "+i),this.valueChange.emit(i),this.hasFocus||requestAnimationFrame(()=>this.addDisplaySuffix(!0,"valueChanges-1"))):this.hasFocus||requestAnimationFrame(()=>this.addDisplaySuffix(!1,"valueChanges-2"))),this.showClearIcon=!!this._value}clear(){this.log("clear"),this.valueChanged("","clear"),this.setFormControlValue("","clear"),this.setFocus()}inputClicked(i){return O(this,null,function*(){if(this.inputClick.emit(),this.log("inputClick"),requestAnimationFrame(()=>{!this.readonly&&!this.hasFocus&&setTimeout(()=>{this.destroyed||this.permissionService.isJulian()},1e3)}),!this.isTimePicker||this.readonly)return;let r=yield this.dialogService.showTimeChooser(this.nxtFormControl.value,this.placeholder,"","00:00","23:45",!1);r&&(this.valueChanged(r,"inputClick"),this.log("nxtFormControl.setValue "+r+" | {emitEvent: true, onlySelf: false}"),this.setFormControlValue(r,"inputClick"))})}log(i){}};e.\u0275fac=function(r){return new(r||e)(R(vt),R(ws))},e.\u0275cmp=_e({type:e,selectors:[["nxt-input"]],inputs:{disabled:"disabled",icon:"icon",color:"color",type:"type",isDate:"isDate",isTimePicker:"isTimePicker",value:"value",readonly:"readonly",cellRenderer:"cellRenderer",isMoney:"isMoney",selectOnInit:"selectOnInit",selectOnFocus:"selectOnFocus",isPercent:"isPercent",disableFocusOnInit:"disableFocusOnInit",isNumber:"isNumber",isNumberMin:"isNumberMin",placeholder:"placeholder",validators:"validators",google:"google",clearGoogleAfterClick:"clearGoogleAfterClick",clearIcon:"clearIcon",bottomNoPadding:"bottomNoPadding",noPadding:"noPadding"},outputs:{onFocus:"onFocus",inputClick:"inputClick",valueChange:"valueChange",enter:"enter",up:"up",down:"down",esc:"esc",onGoogleClick:"onGoogleClick"},standalone:!0,features:[et,yn,xe],decls:12,vars:21,consts:[["controlElement","","clickElement",""],[3,"nxtFormControl","width","ngClass"],[3,"ngStyle"],["matInput","","autocomplete","off",3,"focusin","focusout","ngModelChange","keyup","click","type","formControl","name"],[4,"ngIf"],[1,"icons"],["style","color:#a2a2a2; cursor: pointer;",3,"matTooltip","click",4,"ngIf"],["class","clear-icon",3,"click",4,"ngIf"],[2,"color","#a2a2a2","cursor","pointer",3,"click","matTooltip"],[1,"clear-icon",3,"click"]],template:function(r,s){if(r&1){let o=re();h(0,"nxt-form-field-wrapper",1)(1,"mat-form-field",2)(2,"mat-label"),y(3),p(),h(4,"input",3,0),F("focusin",function(l){return V(o),B(s.focusin("control",l))})("focusout",function(l){return V(o),B(s.focusout("control",l))})("ngModelChange",function(){return V(o),B(s.callCellRenderer())})("keyup",function(l){return V(o),B(s.keyup(l))})("click",function(l){return V(o),B(s.inputClicked(l))}),p(),W(7,jEt,2,0,"mat-hint",4)(8,$Et,3,1,"mat-error",4),p(),h(9,"div",5),W(10,KEt,2,2,"mat-icon",6)(11,YEt,2,0,"mat-icon",7),p()()}r&2&&(b("nxtFormControl",s.nxtFormControl)("width",s.width)("ngClass",Qm(15,WEt,s.noPadding||s.bottomNoPadding,s.noPadding,s.isMoney)),g(),_8("mat-form-field-full-width ",s.readonly?"read-only":"",""),b("ngStyle",sn(19,UEt,s.icon?"calc("+s.width+" - 28px)":s.width)),g(2),ye(s.placeholder),g(),b("type",s.type)("formControl",s.nxtFormControl)("name",s.controlName),g(3),b("ngIf",s.showCapsLockInfo),g(),b("ngIf",s.nxtFormControl.invalid&&(s.nxtFormControl.dirty||s.nxtFormControl.touched)),g(2),b("ngIf",s.icon),g(),b("ngIf",s.clearIcon&&s.showClearIcon))},dependencies:[O1,_s,Dn,No,rs,M0,rr,E0,Iy,ko,mu,Ko,Ia,$c,Ct,ky,Zr,dl,ON],styles:["[_nghost-%COMP%]{border:0px solid red;display:flex;height:fit-content}.font-color-green[_ngcontent-%COMP%]{color:#0f0!important}.font-color-normal[_ngcontent-%COMP%]{color:#bbb!important}input[_ngcontent-%COMP%]{min-height:2em}input.secure[_ngcontent-%COMP%]{text-security:disc;-webkit-text-security:disc}[_nghost-%COMP%]     .mdc-text-field--disabled input{color:#909090!important}[_nghost-%COMP%]     nxt-form-field-wrapper{width:100%!important}[_nghost-%COMP%]     .placeholder-center .mat-mdc-form-field-infix{justify-content:center;display:flex}[_nghost-%COMP%]     .bottom-no-padding{display:flex;border:0px solid red;padding-top:10px}[_nghost-%COMP%]     .bottom-no-padding .mat-input-element{min-height:1.8em}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-infix{border:none}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-wrapper{padding-bottom:0}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-underline{position:unset}[_nghost-%COMP%]     .no-padding{padding-top:0!important}[_nghost-%COMP%]     .no-padding .clear-icon{bottom:5px}[_nghost-%COMP%]     .no-padding .mat-mdc-form-field-subscript-wrapper{display:none}.clear-icon[_ngcontent-%COMP%]{position:absolute;right:6px;bottom:26px;cursor:pointer}nxt-form-field-wrapper[_ngcontent-%COMP%]{position:relative}input[_ngcontent-%COMP%]::-webkit-outer-spin-button, input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number][_ngcontent-%COMP%]{-moz-appearance:textfield}.caps-lock-message[_ngcontent-%COMP%]{font-size:80%;color:#ff3737}"]});let t=e;return t})()});function ZEt(t,e){if(t&1){let n=re();h(0,"button",6),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.close(r))}),y(1),p()}if(t&2){let n=e.$implicit,i=w(2);b("ngStyle",bs(2,qEt,n.backgroundColor,n.fontColor)),g(),ye(i.buttonText)}}function XEt(t,e){if(t&1){let n=re();h(0,"div",3),W(1,ZEt,2,5,"button",4),h(2,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.cancel())}),y(3,"Abbrechen"),p()()}if(t&2){let n=w();g(),b("ngForOf",n.colors)}}var qEt,DRe,ERe=Q(()=>{Ep();ji();ha();Zi();An();P8();ri();Jr();me();ji();An();qEt=(t,e)=>({backgroundColor:t,color:e});DRe=(()=>{let e=class e{constructor(i,r){this.dialogRef=i,this.data=r,this.colors=[{backgroundColor:"rgb(216, 0, 255)",fontColor:"white"},{backgroundColor:"red",fontColor:"white"},{backgroundColor:"green",fontColor:"white"},{backgroundColor:"blue",fontColor:"white"}],this.currentColor=this.colors[0],this.placeholder=r.placeholder,this.message=r.message,this.buttonText=r.buttonText,this.showColorPicker=r.showColorPicker,this.inputFormControl=new $t(r.prompt)}close(i){this.inputFormControl.invalid||(this.showColorPicker?this.dialogRef.close({color:i,text:this.inputFormControl.value}):this.dialogRef.close(this.inputFormControl.value))}cancel(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Ou))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-input-whats-app"]],standalone:!0,features:[xe],decls:5,vars:6,consts:[[2,"margin-bottom","24px","margin-top","10px",3,"innerHTML"],[3,"placeholder","nxtFormControl"],["style","justify-content: space-around; display:flex;",4,"ngIf"],[2,"justify-content","space-around","display","flex"],["style","margin: 10px;","mat-raised-button","","color","primary",3,"ngStyle","click",4,"ngFor","ngForOf"],[3,"click"],["mat-raised-button","","color","primary",2,"margin","10px",3,"click","ngStyle"]],template:function(r,s){r&1&&(ee(0,"div",0),Ce(1,"safeHtml"),h(2,"div"),ee(3,"nxt-input",1),p(),W(4,XEt,4,1,"div",2)),r&2&&(b("innerHTML",tt(1,4,s.data.message),Pi),g(3),b("placeholder",s.placeholder)("nxtFormControl",s.inputFormControl),g(),b("ngIf",s.showColorPicker))},dependencies:[Yi,Ct,Hi,G_,rr,Dn,rs,Lt,Or],styles:["*[_ngcontent-%COMP%]{font-family:Open Sans;font-weight:400}"]});let t=e;return t})()});var MRe,kRe=Q(()=>{MRe={prefix:"fab",iconName:"paypal",icon:[384,512,[],"f1ed","M111.4 295.9c-3.5 19.2-17.4 108.7-21.5 134-.3 1.8-1 2.5-3 2.5H12.3c-7.6 0-13.1-6.6-12.1-13.9L58.8 46.6c1.5-9.6 10.1-16.9 20-16.9 152.3 0 165.1-3.7 204 11.4 60.1 23.3 65.6 79.5 44 140.3-21.5 62.6-72.5 89.5-140.1 90.3-43.4.7-69.5-7-75.3 24.2zM357.1 152c-1.8-1.3-2.5-1.8-3 1.3-2 11.4-5.1 22.5-8.8 33.6-39.9 113.8-150.5 103.9-204.5 103.9-6.1 0-10.1 3.3-10.9 9.4-22.6 140.4-27.1 169.7-27.1 169.7-1 7.1 3.5 12.9 10.6 12.9h63.5c8.6 0 15.7-6.3 17.4-14.9.7-5.4-1.1 6.1 14.4-91.3 4.6-22 14.3-19.7 29.3-19.7 71 0 126.4-28.8 142.9-112.3 6.5-34.8 4.6-71.4-23.8-92.6z"]}});var IRe,OK,qme=Q(()=>{IRe={prefix:"fas",iconName:"money-bill-transfer",icon:[640,512,[],"e528","M535 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l64 64c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17l-64 64c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23L384 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l174.1 0L535 41zM105 377l-23 23L256 400c13.3 0 24 10.7 24 24s-10.7 24-24 24L81.9 448l23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 441c-4.5-4.5-7-10.6-7-17s2.5-12.5 7-17l64-64c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM96 64H337.9c-3.7 7.2-5.9 15.3-5.9 24c0 28.7 23.3 52 52 52l117.4 0c-4 17 .6 35.5 13.8 48.8c20.3 20.3 53.2 20.3 73.5 0L608 169.5V384c0 35.3-28.7 64-64 64H302.1c3.7-7.2 5.9-15.3 5.9-24c0-28.7-23.3-52-52-52l-117.4 0c4-17-.6-35.5-13.8-48.8c-20.3-20.3-53.2-20.3-73.5 0L32 342.5V128c0-35.3 28.7-64 64-64zm64 64H96v64c35.3 0 64-28.7 64-64zM544 320c-35.3 0-64 28.7-64 64h64V320zM320 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z"]},OK={prefix:"fas",iconName:"wand-sparkles",icon:[512,512,[],"f72b","M464 6.1c9.5-8.5 24-8.1 33 .9l8 8c9 9 9.4 23.5 .9 33l-85.8 95.9c-2.6 2.9-4.1 6.7-4.1 10.7V176c0 8.8-7.2 16-16 16H384.2c-4.6 0-8.9 1.9-11.9 5.3L100.7 500.9C94.3 508 85.3 512 75.8 512c-8.8 0-17.3-3.5-23.5-9.8L9.7 459.7C3.5 453.4 0 445 0 436.2c0-9.5 4-18.5 11.1-24.8l111.6-99.8c3.4-3 5.3-7.4 5.3-11.9V272c0-8.8 7.2-16 16-16h34.6c3.9 0 7.7-1.5 10.7-4.1L464 6.1zM432 288c3.6 0 6.7 2.4 7.7 5.8l14.8 51.7 51.7 14.8c3.4 1 5.8 4.1 5.8 7.7s-2.4 6.7-5.8 7.7l-51.7 14.8-14.8 51.7c-1 3.4-4.1 5.8-7.7 5.8s-6.7-2.4-7.7-5.8l-14.8-51.7-51.7-14.8c-3.4-1-5.8-4.1-5.8-7.7s2.4-6.7 5.8-7.7l51.7-14.8 14.8-51.7c1-3.4 4.1-5.8 7.7-5.8zM87.7 69.8l14.8 51.7 51.7 14.8c3.4 1 5.8 4.1 5.8 7.7s-2.4 6.7-5.8 7.7l-51.7 14.8L87.7 218.2c-1 3.4-4.1 5.8-7.7 5.8s-6.7-2.4-7.7-5.8L57.5 166.5 5.8 151.7c-3.4-1-5.8-4.1-5.8-7.7s2.4-6.7 5.8-7.7l51.7-14.8L72.3 69.8c1-3.4 4.1-5.8 7.7-5.8s6.7 2.4 7.7 5.8zM208 0c3.7 0 6.9 2.5 7.8 6.1l6.8 27.3 27.3 6.8c3.6 .9 6.1 4.1 6.1 7.8s-2.5 6.9-6.1 7.8l-27.3 6.8-6.8 27.3c-.9 3.6-4.1 6.1-7.8 6.1s-6.9-2.5-7.8-6.1l-6.8-27.3-27.3-6.8c-3.6-.9-6.1-4.1-6.1-7.8s2.5-6.9 6.1-7.8l27.3-6.8 6.8-27.3c.9-3.6 4.1-6.1 7.8-6.1z"]}});function ARe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Ys(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ARe(Object(n),!0).forEach(function(i){i1(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ARe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function YK(t){"@babel/helpers - typeof";return YK=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YK(t)}function QEt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PRe(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function JEt(t,e,n){return e&&PRe(t.prototype,e),n&&PRe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function i1(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ufe(t,e){return tMt(t)||nMt(t,e)||nFe(t,e)||sMt()}function yV(t){return eMt(t)||iMt(t)||nFe(t)||rMt()}function eMt(t){if(Array.isArray(t))return efe(t)}function tMt(t){if(Array.isArray(t))return t}function iMt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function nMt(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],r=!0,s=!1,o,a;try{for(n=n.call(t);!(r=(o=n.next()).done)&&(i.push(o.value),!(e&&i.length===e));r=!0);}catch(l){s=!0,a=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(s)throw a}}return i}}function nFe(t,e){if(t){if(typeof t=="string")return efe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return efe(t,e)}}function efe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function rMt(){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 sMt(){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 _V(t){return new Proxy(t,{get:function(n,i){return i in n?n[i]:n[Mh]}})}function vMt(t){var e=kh.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}function yMt(t){return t===""?!0:t==="false"?!1:t==="true"?!0:t}function _Mt(t){return hV.push(t),function(){hV.splice(hV.indexOf(t),1)}}function CMt(t){if(!(!t||!$8)){var e=kh.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var n=kh.head.childNodes,i=null,r=n.length-1;r>-1;r--){var s=n[r],o=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(i=s)}return kh.head.insertBefore(e,i),t}}function vV(){for(var t=12,e="";t-- >0;)e+=xMt[Math.random()*62|0];return e}function rI(t){for(var e=[],n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function gfe(t){return t.classList?rI(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(e){return e})}function mFe(t){return"".concat(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function bMt(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,'="').concat(mFe(t[n]),'" ')},"").trim()}function XK(t){return Object.keys(t||{}).reduce(function(e,n){return e+"".concat(n,": ").concat(t[n].trim(),";")},"")}function vfe(t){return t.size!==Z_.size||t.x!==Z_.x||t.y!==Z_.y||t.rotate!==Z_.rotate||t.flipX||t.flipY}function wMt(t){var e=t.transform,n=t.containerWidth,i=t.iconWidth,r={transform:"translate(".concat(n/2," 256)")},s="translate(".concat(e.x*32,", ").concat(e.y*32,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),a="rotate(".concat(e.rotate," 0 0)"),l={transform:"".concat(s," ").concat(o," ").concat(a)},c={transform:"translate(".concat(i/2*-1," -256)")};return{outer:r,inner:l,path:c}}function SMt(t){var e=t.transform,n=t.width,i=n===void 0?tfe:n,r=t.height,s=r===void 0?tfe:r,o=t.startCentered,a=o===void 0?!1:o,l="";return a&&aFe?l+="translate(".concat(e.x/Kb-i/2,"em, ").concat(e.y/Kb-s/2,"em) "):a?l+="translate(calc(-50% + ".concat(e.x/Kb,"em), calc(-50% + ").concat(e.y/Kb,"em)) "):l+="translate(".concat(e.x/Kb,"em, ").concat(e.y/Kb,"em) "),l+="scale(".concat(e.size/Kb*(e.flipX?-1:1),", ").concat(e.size/Kb*(e.flipY?-1:1),") "),l+="rotate(".concat(e.rotate,"deg) "),l}function fFe(){var t=lFe,e=cFe,n=Co.cssPrefix,i=Co.replacementClass,r=TMt;if(n!==t||i!==e){var s=new RegExp("\\.".concat(t,"\\-"),"g"),o=new RegExp("\\--".concat(t,"\\-"),"g"),a=new RegExp("\\.".concat(e),"g");r=r.replace(s,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(a,".".concat(i))}return r}function Zme(){Co.autoAddCss&&!BRe&&(CMt(fFe()),BRe=!0)}function MMt(t){$8&&(qK?setTimeout(t,0):gFe.push(t))}function CV(t){var e=t.tag,n=t.attributes,i=n===void 0?{}:n,r=t.children,s=r===void 0?[]:r;return typeof t=="string"?mFe(t):"<".concat(e," ").concat(bMt(i),">").concat(s.map(CV).join(""),"</").concat(e,">")}function zRe(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}function IMt(t){for(var e=[],n=0,i=t.length;n<i;){var r=t.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){var s=t.charCodeAt(n++);(s&64512)==56320?e.push(((r&1023)<<10)+(s&1023)+65536):(e.push(r),n--)}else e.push(r)}return e}function nfe(t){var e=IMt(t);return e.length===1?e[0].toString(16):null}function AMt(t,e){var n=t.length,i=t.charCodeAt(e),r;return i>=55296&&i<=56319&&n>e+1&&(r=t.charCodeAt(e+1),r>=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function HRe(t){return Object.keys(t).reduce(function(e,n){var i=t[n],r=!!i.icon;return r?e[i.iconName]=i.icon:e[n]=i,e},{})}function rfe(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.skipHooks,r=i===void 0?!1:i,s=HRe(e);typeof Fy.hooks.addPack=="function"&&!r?Fy.hooks.addPack(t,HRe(e)):Fy.styles[t]=Ys(Ys({},Fy.styles[t]||{}),s),t==="fas"&&rfe("fa",e)}function LMt(t){return~gMt.indexOf(t)}function OMt(t,e){var n=e.split("-"),i=n[0],r=n.slice(1).join("-");return i===t&&r!==""&&!LMt(r)?r:null}function _fe(t,e){return(vFe[t]||{})[e]}function NMt(t,e){return(yFe[t]||{})[e]}function xT(t,e){return(xFe[t]||{})[e]}function wFe(t){return _Fe[t]||{prefix:null,iconName:null}}function VMt(t){var e=CFe[t],n=_fe("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function qb(){return yfe}function QK(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.family,i=n===void 0?Mh:n,r=pV[i][t],s=mV[i][t]||mV[i][r],o=t in Fy.styles?t:null;return s||o||null}function JK(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.skipLookups,r=i===void 0?!1:i,s=(e={},i1(e,Mh,"".concat(Co.cssPrefix,"-").concat(Mh)),i1(e,Qp,"".concat(Co.cssPrefix,"-").concat(Qp)),e),o=null,a=Mh;(t.includes(s[Mh])||t.some(function(c){return GRe[Mh].includes(c)}))&&(a=Mh),(t.includes(s[Qp])||t.some(function(c){return GRe[Qp].includes(c)}))&&(a=Qp);var l=t.reduce(function(c,d){var u=OMt(Co.cssPrefix,d);if(eI[d]?(d=RMt[a].includes(d)?dMt[a][d]:d,o=d,c.prefix=d):FMt[a].indexOf(d)>-1?(o=d,c.prefix=QK(d,{family:a})):u?c.iconName=u:d!==Co.replacementClass&&d!==s[Mh]&&d!==s[Qp]&&c.rest.push(d),!r&&c.prefix&&c.iconName){var m=o==="fa"?wFe(c.iconName):{},f=xT(c.prefix,c.iconName);m.prefix&&(o=null),c.iconName=m.iconName||f||c.iconName,c.prefix=m.prefix||c.prefix,c.prefix==="far"&&!eI.far&&eI.fas&&!Co.autoFetchSvg&&(c.prefix="fas")}return c},Cfe());return(t.includes("fa-brands")||t.includes("fab"))&&(l.prefix="fab"),(t.includes("fa-duotone")||t.includes("fad"))&&(l.prefix="fad"),!l.prefix&&a===Qp&&(eI.fass||Co.autoFetchSvg)&&(l.prefix="fass",l.iconName=xT(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||o==="fa")&&(l.prefix=qb()||"fas"),l}function HMt(t,e){var n=e.mixoutsTo;return WRe=t,tI={},Object.keys(iI).forEach(function(i){zMt.indexOf(i)===-1&&delete iI[i]}),WRe.forEach(function(i){var r=i.mixout?i.mixout():{};if(Object.keys(r).forEach(function(o){typeof r[o]=="function"&&(n[o]=r[o]),YK(r[o])==="object"&&Object.keys(r[o]).forEach(function(a){n[o]||(n[o]={}),n[o][a]=r[o][a]})}),i.hooks){var s=i.hooks();Object.keys(s).forEach(function(o){tI[o]||(tI[o]=[]),tI[o].push(s[o])})}i.provides&&i.provides(iI)}),n}function sfe(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var s=tI[t]||[];return s.forEach(function(o){e=o.apply(null,[e].concat(i))}),e}function wT(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=tI[t]||[];r.forEach(function(s){s.apply(null,n)})}function j8(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return iI[t]?iI[t].apply(null,e):void 0}function ofe(t){t.prefix==="fa"&&(t.prefix="fas");var e=t.iconName,n=t.prefix||qb();if(e)return e=xT(n,e)||e,zRe(SFe.definitions,n,e)||zRe(Fy.styles,n,e)}function eY(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(function(i){return CV(i)})}}),Object.defineProperty(t,"node",{get:function(){if($8){var i=kh.createElement("div");return i.innerHTML=t.html,i.children}}}),t}function $Mt(t){var e=t.children,n=t.main,i=t.mask,r=t.attributes,s=t.styles,o=t.transform;if(vfe(o)&&n.found&&!i.found){var a=n.width,l=n.height,c={x:a/l/2,y:.5};r.style=XK(Ys(Ys({},s),{},{"transform-origin":"".concat(c.x+o.x/16,"em ").concat(c.y+o.y/16,"em")}))}return[{tag:"svg",attributes:r,children:e}]}function KMt(t){var e=t.prefix,n=t.iconName,i=t.children,r=t.attributes,s=t.symbol,o=s===!0?"".concat(e,"-").concat(Co.cssPrefix,"-").concat(n):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Ys(Ys({},r),{},{id:o}),children:i}]}]}function xfe(t){var e=t.icons,n=e.main,i=e.mask,r=t.prefix,s=t.iconName,o=t.transform,a=t.symbol,l=t.title,c=t.maskId,d=t.titleId,u=t.extra,m=t.watchable,f=m===void 0?!1:m,_=i.found?i:n,x=_.width,D=_.height,E=r==="fak",M=[Co.replacementClass,s?"".concat(Co.cssPrefix,"-").concat(s):""].filter(function(ne){return u.classes.indexOf(ne)===-1}).filter(function(ne){return ne!==""||!!ne}).concat(u.classes).join(" "),I={children:[],attributes:Ys(Ys({},u.attributes),{},{"data-prefix":r,"data-icon":s,class:M,role:u.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(x," ").concat(D)})},z=E&&!~u.classes.indexOf("fa-fw")?{width:"".concat(x/D*16*.0625,"em")}:{};f&&(I.attributes[bT]=""),l&&(I.children.push({tag:"title",attributes:{id:I.attributes["aria-labelledby"]||"title-".concat(d||vV())},children:[l]}),delete I.attributes.title);var G=Ys(Ys({},I),{},{prefix:r,iconName:s,main:n,mask:i,maskId:c,transform:o,symbol:a,styles:Ys(Ys({},z),u.styles)}),A=i.found&&n.found?j8("generateAbstractMask",G)||{children:[],attributes:{}}:j8("generateAbstractIcon",G)||{children:[],attributes:{}},Y=A.children,X=A.attributes;return G.children=Y,G.attributes=X,a?KMt(G):$Mt(G)}function URe(t){var e=t.content,n=t.width,i=t.height,r=t.transform,s=t.title,o=t.extra,a=t.watchable,l=a===void 0?!1:a,c=Ys(Ys(Ys({},o.attributes),s?{title:s}:{}),{},{class:o.classes.join(" ")});l&&(c[bT]="");var d=Ys({},o.styles);vfe(r)&&(d.transform=SMt({transform:r,startCentered:!0,width:n,height:i}),d["-webkit-transform"]=d.transform);var u=XK(d);u.length>0&&(c.style=u);var m=[];return m.push({tag:"span",attributes:c,children:[e]}),s&&m.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),m}function YMt(t){var e=t.content,n=t.title,i=t.extra,r=Ys(Ys(Ys({},i.attributes),n?{title:n}:{}),{},{class:i.classes.join(" ")}),s=XK(i.styles);s.length>0&&(r.style=s);var o=[];return o.push({tag:"span",attributes:r,children:[e]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}function afe(t){var e=t[0],n=t[1],i=t.slice(4),r=ufe(i,1),s=r[0],o=null;return Array.isArray(s)?o={tag:"g",attributes:{class:"".concat(Co.cssPrefix,"-").concat(CT.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Co.cssPrefix,"-").concat(CT.SECONDARY),fill:"currentColor",d:s[0]}},{tag:"path",attributes:{class:"".concat(Co.cssPrefix,"-").concat(CT.PRIMARY),fill:"currentColor",d:s[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:s}},{found:!0,width:e,height:n,icon:o}}function ZMt(t,e){!dFe&&!Co.showMissingIcons&&t&&console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function lfe(t,e){var n=e;return e==="fa"&&Co.styleDefault!==null&&(e=qb()),new Promise(function(i,r){var s={found:!1,width:512,height:512,icon:j8("missingIconAbstract")||{}};if(n==="fa"){var o=wFe(t)||{};t=o.iconName||t,e=o.prefix||e}if(t&&e&&Qme[e]&&Qme[e][t]){var a=Qme[e][t];return i(afe(a))}ZMt(t,e),i(Ys(Ys({},qMt),{},{icon:Co.showMissingIcons&&t?j8("missingIconAbstract")||{}:{}}))})}function $Re(t){var e=t.getAttribute?t.getAttribute(bT):null;return typeof e=="string"}function QMt(t){var e=t.getAttribute?t.getAttribute(pfe):null,n=t.getAttribute?t.getAttribute(mfe):null;return e&&n}function JMt(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(Co.replacementClass)}function ekt(){if(Co.autoReplaceSvg===!0)return KK.replace;var t=KK[Co.autoReplaceSvg];return t||KK.replace}function tkt(t){return kh.createElementNS("http://www.w3.org/2000/svg",t)}function ikt(t){return kh.createElement(t)}function DFe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.ceFn,i=n===void 0?t.tag==="svg"?tkt:ikt:n;if(typeof t=="string")return kh.createTextNode(t);var r=i(t.tag);Object.keys(t.attributes||[]).forEach(function(o){r.setAttribute(o,t.attributes[o])});var s=t.children||[];return s.forEach(function(o){r.appendChild(DFe(o,{ceFn:i}))}),r}function nkt(t){var e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}function KRe(t){t()}function EFe(t,e){var n=typeof e=="function"?e:$K;if(t.length===0)n();else{var i=KRe;Co.mutateApproach===lMt&&(i=Yb.requestAnimationFrame||KRe),i(function(){var r=ekt(),s=bfe.begin("mutate");t.map(r),s(),n()})}}function MFe(){wfe=!0}function dfe(){wfe=!1}function YRe(t){if(ORe&&Co.observeMutations){var e=t.treeCallback,n=e===void 0?$K:e,i=t.nodeCallback,r=i===void 0?$K:i,s=t.pseudoElementsCallback,o=s===void 0?$K:s,a=t.observeMutationsRoot,l=a===void 0?kh:a;ZK=new ORe(function(c){if(!wfe){var d=qb();rI(c).forEach(function(u){if(u.type==="childList"&&u.addedNodes.length>0&&!$Re(u.addedNodes[0])&&(Co.searchPseudoElements&&o(u.target),n(u.target)),u.type==="attributes"&&u.target.parentNode&&Co.searchPseudoElements&&o(u.target.parentNode),u.type==="attributes"&&$Re(u.target)&&~fMt.indexOf(u.attributeName))if(u.attributeName==="class"&&QMt(u.target)){var m=JK(gfe(u.target)),f=m.prefix,_=m.iconName;u.target.setAttribute(pfe,f||d),_&&u.target.setAttribute(mfe,_)}else JMt(u.target)&&r(u.target)})}}),$8&&ZK.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function rkt(){ZK&&ZK.disconnect()}function skt(t){var e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce(function(i,r){var s=r.split(":"),o=s[0],a=s.slice(1);return o&&a.length>0&&(i[o]=a.join(":").trim()),i},{})),n}function okt(t){var e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),i=t.innerText!==void 0?t.innerText.trim():"",r=JK(gfe(t));return r.prefix||(r.prefix=qb()),e&&n&&(r.prefix=e,r.iconName=n),r.iconName&&r.prefix||(r.prefix&&i.length>0&&(r.iconName=NMt(r.prefix,t.innerText)||_fe(r.prefix,nfe(t.innerText))),!r.iconName&&Co.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(r.iconName=t.firstChild.data)),r}function akt(t){var e=rI(t.attributes).reduce(function(r,s){return r.name!=="class"&&r.name!=="style"&&(r[s.name]=s.value),r},{}),n=t.getAttribute("title"),i=t.getAttribute("data-fa-title-id");return Co.autoA11y&&(n?e["aria-labelledby"]="".concat(Co.replacementClass,"-title-").concat(i||vV()):(e["aria-hidden"]="true",e.focusable="false")),e}function lkt(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Z_,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function qRe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=okt(t),i=n.iconName,r=n.prefix,s=n.rest,o=akt(t),a=sfe("parseNodeAttributes",{},t),l=e.styleParser?skt(t):[];return Ys({iconName:i,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:r,transform:Z_,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:s,styles:l,attributes:o}},a)}function kFe(t){var e=Co.autoReplaceSvg==="nest"?qRe(t,{styleParser:!1}):qRe(t);return~e.extra.classes.indexOf(uFe)?j8("generateLayersText",t,e):j8("generateSvgReplacementMutation",t,e)}function ZRe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!$8)return Promise.resolve();var n=kh.documentElement.classList,i=function(u){return n.add("".concat(NRe,"-").concat(u))},r=function(u){return n.remove("".concat(NRe,"-").concat(u))},s=Co.autoFetchSvg?Zb:ffe.map(function(d){return"fa-".concat(d)}).concat(Object.keys(ckt));s.includes("fa")||s.push("fa");var o=[".".concat(uFe,":not([").concat(bT,"])")].concat(s.map(function(d){return".".concat(d,":not([").concat(bT,"])")})).join(", ");if(o.length===0)return Promise.resolve();var a=[];try{a=rI(t.querySelectorAll(o))}catch{}if(a.length>0)i("pending"),r("complete");else return Promise.resolve();var l=bfe.begin("onTree"),c=a.reduce(function(d,u){try{var m=kFe(u);m&&d.push(m)}catch(f){dFe||f.name==="MissingIcon"&&console.error(f)}return d},[]);return new Promise(function(d,u){Promise.all(c).then(function(m){EFe(m,function(){i("active"),i("complete"),r("pending"),typeof e=="function"&&e(),l(),d()})}).catch(function(m){l(),u(m)})})}function dkt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;kFe(t).then(function(n){n&&EFe([n],e)})}function ukt(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=(e||{}).icon?e:ofe(e||{}),r=n.mask;return r&&(r=(r||{}).icon?r:ofe(r||{})),t(i,Ys(Ys({},n),{},{mask:r}))}}function ykt(t){var e=t.replace(vkt,""),n=AMt(e,0),i=n>=XRe[0]&&n<=XRe[1],r=e.length===2?e[0]===e[1]:!1;return{value:nfe(r?e[0]:e),isSecondary:i||r}}function QRe(t,e){var n="".concat(aMt).concat(e.replace(":","-"));return new Promise(function(i,r){if(t.getAttribute(n)!==null)return i();var s=rI(t.children),o=s.filter(function(Y){return Y.getAttribute(ife)===e})[0],a=Yb.getComputedStyle(t,e),l=a.getPropertyValue("font-family").match(hMt),c=a.getPropertyValue("font-weight"),d=a.getPropertyValue("content");if(o&&!l)return t.removeChild(o),i();if(l&&d!=="none"&&d!==""){var u=a.getPropertyValue("content"),m=~["Sharp"].indexOf(l[2])?Qp:Mh,f=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?mV[m][l[2].toLowerCase()]:pMt[m][c],_=ykt(u),x=_.value,D=_.isSecondary,E=l[0].startsWith("FontAwesome"),M=_fe(f,x),I=M;if(E){var z=VMt(x);z.iconName&&z.prefix&&(M=z.iconName,f=z.prefix)}if(M&&!D&&(!o||o.getAttribute(pfe)!==f||o.getAttribute(mfe)!==I)){t.setAttribute(n,I),o&&t.removeChild(o);var G=lkt(),A=G.extra;A.attributes[ife]=e,lfe(M,f).then(function(Y){var X=xfe(Ys(Ys({},G),{},{icons:{main:Y,mask:Cfe()},prefix:f,iconName:I,extra:A,watchable:!0})),ne=kh.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?t.insertBefore(ne,t.firstChild):t.appendChild(ne),ne.outerHTML=X.map(function(pe){return CV(pe)}).join(`
`),t.removeAttribute(n),i()}).catch(r)}else i()}else i()})}function _kt(t){return Promise.all([QRe(t,"::before"),QRe(t,"::after")])}function Ckt(t){return t.parentNode!==document.head&&!~cMt.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(ife)&&(!t.parentNode||t.parentNode.tagName!=="svg")}function JRe(t){if($8)return new Promise(function(e,n){var i=rI(t.querySelectorAll("*")).filter(Ckt).map(_kt),r=bfe.begin("searchPseudoElements");MFe(),Promise.all(i).then(function(){r(),dfe(),e()}).catch(function(){r(),dfe(),n()})})}function iFe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function Skt(t){return t.tag==="g"?t.children:[t]}var RRe,hfe,rFe,sFe,oFe,oMt,FRe,LRe,Yb,kh,ORe,NK,L1n,$8,aFe,VK,BK,zK,HK,GK,W8,tfe,lFe,cFe,bT,ife,aMt,pfe,mfe,NRe,lMt,cMt,dFe,Mh,Qp,ffe,pV,mV,fV,dMt,uMt,uFe,hMt,pMt,hFe,mMt,fMt,CT,gV,gMt,uV,VRe,pFe,nI,Co,hV,Kb,Z_,xMt,TMt,BRe,DMt,U8,Fy,gFe,EMt,qK,kMt,Xme,WK,UK,jK,eI,PMt,RMt,yfe,vFe,yFe,_Fe,CFe,xFe,FMt,bFe,Cfe,GRe,BMt,WRe,tI,iI,zMt,SFe,GMt,WMt,UMt,y4,jMt,Qme,qMt,jRe,cfe,dV,XMt,TFe,bfe,$K,KK,wfe,ZK,ckt,Zb,hkt,pkt,mkt,fkt,gkt,vkt,XRe,xkt,eFe,bkt,tFe,wkt,Jme,Tkt,Dkt,Ekt,Mkt,O1n,IFe,N1n,AFe,PFe,V1n,B1n,RFe,z1n,kkt,Ikt,FFe=Q(()=>{RRe=function(){},hfe={},rFe={},sFe=null,oFe={mark:RRe,measure:RRe};try{typeof window<"u"&&(hfe=window),typeof document<"u"&&(rFe=document),typeof MutationObserver<"u"&&(sFe=MutationObserver),typeof performance<"u"&&(oFe=performance)}catch{}oMt=hfe.navigator||{},FRe=oMt.userAgent,LRe=FRe===void 0?"":FRe,Yb=hfe,kh=rFe,ORe=sFe,NK=oFe,L1n=!!Yb.document,$8=!!kh.documentElement&&!!kh.head&&typeof kh.addEventListener=="function"&&typeof kh.createElement=="function",aFe=~LRe.indexOf("MSIE")||~LRe.indexOf("Trident/"),W8="___FONT_AWESOME___",tfe=16,lFe="fa",cFe="svg-inline--fa",bT="data-fa-i2svg",ife="data-fa-pseudo-element",aMt="data-fa-pseudo-element-pending",pfe="data-prefix",mfe="data-icon",NRe="fontawesome-i2svg",lMt="async",cMt=["HTML","HEAD","STYLE","SCRIPT"],dFe=function(){try{return!0}catch{return!1}}(),Mh="classic",Qp="sharp",ffe=[Mh,Qp];pV=_V((VK={},i1(VK,Mh,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit",fakd:"kit","fa-kit":"kit","fa-kit-duotone":"kit"}),i1(VK,Qp,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"}),VK)),mV=_V((BK={},i1(BK,Mh,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),i1(BK,Qp,{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"}),BK)),fV=_V((zK={},i1(zK,Mh,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),i1(zK,Qp,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"}),zK)),dMt=_V((HK={},i1(HK,Mh,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),i1(HK,Qp,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"}),HK)),uMt=/fa(s|r|l|t|d|b|k|ss|sr|sl|st)?[\-\ ]/,uFe="fa-layers-text",hMt=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,pMt=_V((GK={},i1(GK,Mh,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),i1(GK,Qp,{900:"fass",400:"fasr",300:"fasl",100:"fast"}),GK)),hFe=[1,2,3,4,5,6,7,8,9,10],mMt=hFe.concat([11,12,13,14,15,16,17,18,19,20]),fMt=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],CT={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},gV=new Set;Object.keys(mV[Mh]).map(gV.add.bind(gV));Object.keys(mV[Qp]).map(gV.add.bind(gV));gMt=[].concat(ffe,yV(gV),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",CT.GROUP,CT.SWAP_OPACITY,CT.PRIMARY,CT.SECONDARY]).concat(hFe.map(function(t){return"".concat(t,"x")})).concat(mMt.map(function(t){return"w-".concat(t)})),uV=Yb.FontAwesomeConfig||{};kh&&typeof kh.querySelector=="function"&&(VRe=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]],VRe.forEach(function(t){var e=ufe(t,2),n=e[0],i=e[1],r=yMt(vMt(n));r!=null&&(uV[i]=r)}));pFe={styleDefault:"solid",familyDefault:"classic",cssPrefix:lFe,replacementClass:cFe,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};uV.familyPrefix&&(uV.cssPrefix=uV.familyPrefix);nI=Ys(Ys({},pFe),uV);nI.autoReplaceSvg||(nI.observeMutations=!1);Co={};Object.keys(pFe).forEach(function(t){Object.defineProperty(Co,t,{enumerable:!0,set:function(n){nI[t]=n,hV.forEach(function(i){return i(Co)})},get:function(){return nI[t]}})});Object.defineProperty(Co,"familyPrefix",{enumerable:!0,set:function(e){nI.cssPrefix=e,hV.forEach(function(n){return n(Co)})},get:function(){return nI.cssPrefix}});Yb.FontAwesomeConfig=Co;hV=[];Kb=tfe,Z_={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};xMt="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";TMt=`:root, :host {
  --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";
  --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";
  --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";
  --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";
  --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";
  --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";
  --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";
  --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";
}

svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
  overflow: visible;
  box-sizing: content-box;
}

.svg-inline--fa {
  display: var(--fa-display, inline-block);
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}
.svg-inline--fa.fa-2xs {
  vertical-align: 0.1em;
}
.svg-inline--fa.fa-xs {
  vertical-align: 0em;
}
.svg-inline--fa.fa-sm {
  vertical-align: -0.0714285705em;
}
.svg-inline--fa.fa-lg {
  vertical-align: -0.2em;
}
.svg-inline--fa.fa-xl {
  vertical-align: -0.25em;
}
.svg-inline--fa.fa-2xl {
  vertical-align: -0.3125em;
}
.svg-inline--fa.fa-pull-left {
  margin-right: var(--fa-pull-margin, 0.3em);
  width: auto;
}
.svg-inline--fa.fa-pull-right {
  margin-left: var(--fa-pull-margin, 0.3em);
  width: auto;
}
.svg-inline--fa.fa-li {
  width: var(--fa-li-width, 2em);
  top: 0.25em;
}
.svg-inline--fa.fa-fw {
  width: var(--fa-fw-width, 1.25em);
}

.fa-layers svg.svg-inline--fa {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
}

.fa-layers-counter, .fa-layers-text {
  display: inline-block;
  position: absolute;
  text-align: center;
}

.fa-layers {
  display: inline-block;
  height: 1em;
  position: relative;
  text-align: center;
  vertical-align: -0.125em;
  width: 1em;
}
.fa-layers svg.svg-inline--fa {
  -webkit-transform-origin: center center;
          transform-origin: center center;
}

.fa-layers-text {
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  -webkit-transform-origin: center center;
          transform-origin: center center;
}

.fa-layers-counter {
  background-color: var(--fa-counter-background-color, #ff253a);
  border-radius: var(--fa-counter-border-radius, 1em);
  box-sizing: border-box;
  color: var(--fa-inverse, #fff);
  line-height: var(--fa-counter-line-height, 1);
  max-width: var(--fa-counter-max-width, 5em);
  min-width: var(--fa-counter-min-width, 1.5em);
  overflow: hidden;
  padding: var(--fa-counter-padding, 0.25em 0.5em);
  right: var(--fa-right, 0);
  text-overflow: ellipsis;
  top: var(--fa-top, 0);
  -webkit-transform: scale(var(--fa-counter-scale, 0.25));
          transform: scale(var(--fa-counter-scale, 0.25));
  -webkit-transform-origin: top right;
          transform-origin: top right;
}

.fa-layers-bottom-right {
  bottom: var(--fa-bottom, 0);
  right: var(--fa-right, 0);
  top: auto;
  -webkit-transform: scale(var(--fa-layers-scale, 0.25));
          transform: scale(var(--fa-layers-scale, 0.25));
  -webkit-transform-origin: bottom right;
          transform-origin: bottom right;
}

.fa-layers-bottom-left {
  bottom: var(--fa-bottom, 0);
  left: var(--fa-left, 0);
  right: auto;
  top: auto;
  -webkit-transform: scale(var(--fa-layers-scale, 0.25));
          transform: scale(var(--fa-layers-scale, 0.25));
  -webkit-transform-origin: bottom left;
          transform-origin: bottom left;
}

.fa-layers-top-right {
  top: var(--fa-top, 0);
  right: var(--fa-right, 0);
  -webkit-transform: scale(var(--fa-layers-scale, 0.25));
          transform: scale(var(--fa-layers-scale, 0.25));
  -webkit-transform-origin: top right;
          transform-origin: top right;
}

.fa-layers-top-left {
  left: var(--fa-left, 0);
  right: auto;
  top: var(--fa-top, 0);
  -webkit-transform: scale(var(--fa-layers-scale, 0.25));
          transform: scale(var(--fa-layers-scale, 0.25));
  -webkit-transform-origin: top left;
          transform-origin: top left;
}

.fa-1x {
  font-size: 1em;
}

.fa-2x {
  font-size: 2em;
}

.fa-3x {
  font-size: 3em;
}

.fa-4x {
  font-size: 4em;
}

.fa-5x {
  font-size: 5em;
}

.fa-6x {
  font-size: 6em;
}

.fa-7x {
  font-size: 7em;
}

.fa-8x {
  font-size: 8em;
}

.fa-9x {
  font-size: 9em;
}

.fa-10x {
  font-size: 10em;
}

.fa-2xs {
  font-size: 0.625em;
  line-height: 0.1em;
  vertical-align: 0.225em;
}

.fa-xs {
  font-size: 0.75em;
  line-height: 0.0833333337em;
  vertical-align: 0.125em;
}

.fa-sm {
  font-size: 0.875em;
  line-height: 0.0714285718em;
  vertical-align: 0.0535714295em;
}

.fa-lg {
  font-size: 1.25em;
  line-height: 0.05em;
  vertical-align: -0.075em;
}

.fa-xl {
  font-size: 1.5em;
  line-height: 0.0416666682em;
  vertical-align: -0.125em;
}

.fa-2xl {
  font-size: 2em;
  line-height: 0.03125em;
  vertical-align: -0.1875em;
}

.fa-fw {
  text-align: center;
  width: 1.25em;
}

.fa-ul {
  list-style-type: none;
  margin-left: var(--fa-li-margin, 2.5em);
  padding-left: 0;
}
.fa-ul > li {
  position: relative;
}

.fa-li {
  left: calc(var(--fa-li-width, 2em) * -1);
  position: absolute;
  text-align: center;
  width: var(--fa-li-width, 2em);
  line-height: inherit;
}

.fa-border {
  border-color: var(--fa-border-color, #eee);
  border-radius: var(--fa-border-radius, 0.1em);
  border-style: var(--fa-border-style, solid);
  border-width: var(--fa-border-width, 0.08em);
  padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);
}

.fa-pull-left {
  float: left;
  margin-right: var(--fa-pull-margin, 0.3em);
}

.fa-pull-right {
  float: right;
  margin-left: var(--fa-pull-margin, 0.3em);
}

.fa-beat {
  -webkit-animation-name: fa-beat;
          animation-name: fa-beat;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
          animation-timing-function: var(--fa-animation-timing, ease-in-out);
}

.fa-bounce {
  -webkit-animation-name: fa-bounce;
          animation-name: fa-bounce;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
}

.fa-fade {
  -webkit-animation-name: fa-fade;
          animation-name: fa-fade;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}

.fa-beat-fade {
  -webkit-animation-name: fa-beat-fade;
          animation-name: fa-beat-fade;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
          animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}

.fa-flip {
  -webkit-animation-name: fa-flip;
          animation-name: fa-flip;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
          animation-timing-function: var(--fa-animation-timing, ease-in-out);
}

.fa-shake {
  -webkit-animation-name: fa-shake;
          animation-name: fa-shake;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, linear);
          animation-timing-function: var(--fa-animation-timing, linear);
}

.fa-spin {
  -webkit-animation-name: fa-spin;
          animation-name: fa-spin;
  -webkit-animation-delay: var(--fa-animation-delay, 0s);
          animation-delay: var(--fa-animation-delay, 0s);
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 2s);
          animation-duration: var(--fa-animation-duration, 2s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, linear);
          animation-timing-function: var(--fa-animation-timing, linear);
}

.fa-spin-reverse {
  --fa-animation-direction: reverse;
}

.fa-pulse,
.fa-spin-pulse {
  -webkit-animation-name: fa-spin;
          animation-name: fa-spin;
  -webkit-animation-direction: var(--fa-animation-direction, normal);
          animation-direction: var(--fa-animation-direction, normal);
  -webkit-animation-duration: var(--fa-animation-duration, 1s);
          animation-duration: var(--fa-animation-duration, 1s);
  -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
          animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));
          animation-timing-function: var(--fa-animation-timing, steps(8));
}

@media (prefers-reduced-motion: reduce) {
  .fa-beat,
.fa-bounce,
.fa-fade,
.fa-beat-fade,
.fa-flip,
.fa-pulse,
.fa-shake,
.fa-spin,
.fa-spin-pulse {
    -webkit-animation-delay: -1ms;
            animation-delay: -1ms;
    -webkit-animation-duration: 1ms;
            animation-duration: 1ms;
    -webkit-animation-iteration-count: 1;
            animation-iteration-count: 1;
    -webkit-transition-delay: 0s;
            transition-delay: 0s;
    -webkit-transition-duration: 0s;
            transition-duration: 0s;
  }
}
@-webkit-keyframes fa-beat {
  0%, 90% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  45% {
    -webkit-transform: scale(var(--fa-beat-scale, 1.25));
            transform: scale(var(--fa-beat-scale, 1.25));
  }
}
@keyframes fa-beat {
  0%, 90% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  45% {
    -webkit-transform: scale(var(--fa-beat-scale, 1.25));
            transform: scale(var(--fa-beat-scale, 1.25));
  }
}
@-webkit-keyframes fa-bounce {
  0% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
  10% {
    -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
            transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
  }
  30% {
    -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
            transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
  }
  50% {
    -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
            transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
  }
  57% {
    -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
            transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
  }
  64% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
  100% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
}
@keyframes fa-bounce {
  0% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
  10% {
    -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
            transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
  }
  30% {
    -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
            transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
  }
  50% {
    -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
            transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
  }
  57% {
    -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
            transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
  }
  64% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
  100% {
    -webkit-transform: scale(1, 1) translateY(0);
            transform: scale(1, 1) translateY(0);
  }
}
@-webkit-keyframes fa-fade {
  50% {
    opacity: var(--fa-fade-opacity, 0.4);
  }
}
@keyframes fa-fade {
  50% {
    opacity: var(--fa-fade-opacity, 0.4);
  }
}
@-webkit-keyframes fa-beat-fade {
  0%, 100% {
    opacity: var(--fa-beat-fade-opacity, 0.4);
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  50% {
    opacity: 1;
    -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
            transform: scale(var(--fa-beat-fade-scale, 1.125));
  }
}
@keyframes fa-beat-fade {
  0%, 100% {
    opacity: var(--fa-beat-fade-opacity, 0.4);
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  50% {
    opacity: 1;
    -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
            transform: scale(var(--fa-beat-fade-scale, 1.125));
  }
}
@-webkit-keyframes fa-flip {
  50% {
    -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
            transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
  }
}
@keyframes fa-flip {
  50% {
    -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
            transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
  }
}
@-webkit-keyframes fa-shake {
  0% {
    -webkit-transform: rotate(-15deg);
            transform: rotate(-15deg);
  }
  4% {
    -webkit-transform: rotate(15deg);
            transform: rotate(15deg);
  }
  8%, 24% {
    -webkit-transform: rotate(-18deg);
            transform: rotate(-18deg);
  }
  12%, 28% {
    -webkit-transform: rotate(18deg);
            transform: rotate(18deg);
  }
  16% {
    -webkit-transform: rotate(-22deg);
            transform: rotate(-22deg);
  }
  20% {
    -webkit-transform: rotate(22deg);
            transform: rotate(22deg);
  }
  32% {
    -webkit-transform: rotate(-12deg);
            transform: rotate(-12deg);
  }
  36% {
    -webkit-transform: rotate(12deg);
            transform: rotate(12deg);
  }
  40%, 100% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
}
@keyframes fa-shake {
  0% {
    -webkit-transform: rotate(-15deg);
            transform: rotate(-15deg);
  }
  4% {
    -webkit-transform: rotate(15deg);
            transform: rotate(15deg);
  }
  8%, 24% {
    -webkit-transform: rotate(-18deg);
            transform: rotate(-18deg);
  }
  12%, 28% {
    -webkit-transform: rotate(18deg);
            transform: rotate(18deg);
  }
  16% {
    -webkit-transform: rotate(-22deg);
            transform: rotate(-22deg);
  }
  20% {
    -webkit-transform: rotate(22deg);
            transform: rotate(22deg);
  }
  32% {
    -webkit-transform: rotate(-12deg);
            transform: rotate(-12deg);
  }
  36% {
    -webkit-transform: rotate(12deg);
            transform: rotate(12deg);
  }
  40%, 100% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
}
@-webkit-keyframes fa-spin {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}
@keyframes fa-spin {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}
.fa-rotate-90 {
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
}

.fa-rotate-180 {
  -webkit-transform: rotate(180deg);
          transform: rotate(180deg);
}

.fa-rotate-270 {
  -webkit-transform: rotate(270deg);
          transform: rotate(270deg);
}

.fa-flip-horizontal {
  -webkit-transform: scale(-1, 1);
          transform: scale(-1, 1);
}

.fa-flip-vertical {
  -webkit-transform: scale(1, -1);
          transform: scale(1, -1);
}

.fa-flip-both,
.fa-flip-horizontal.fa-flip-vertical {
  -webkit-transform: scale(-1, -1);
          transform: scale(-1, -1);
}

.fa-rotate-by {
  -webkit-transform: rotate(var(--fa-rotate-angle, 0));
          transform: rotate(var(--fa-rotate-angle, 0));
}

.fa-stack {
  display: inline-block;
  vertical-align: middle;
  height: 2em;
  position: relative;
  width: 2.5em;
}

.fa-stack-1x,
.fa-stack-2x {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
  z-index: var(--fa-stack-z-index, auto);
}

.svg-inline--fa.fa-stack-1x {
  height: 1em;
  width: 1.25em;
}
.svg-inline--fa.fa-stack-2x {
  height: 2em;
  width: 2.5em;
}

.fa-inverse {
  color: var(--fa-inverse, #fff);
}

.sr-only,
.fa-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:not(:focus),
.fa-sr-only-focusable:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.svg-inline--fa .fa-primary {
  fill: var(--fa-primary-color, currentColor);
  opacity: var(--fa-primary-opacity, 1);
}

.svg-inline--fa .fa-secondary {
  fill: var(--fa-secondary-color, currentColor);
  opacity: var(--fa-secondary-opacity, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-primary {
  opacity: var(--fa-secondary-opacity, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-secondary {
  opacity: var(--fa-primary-opacity, 1);
}

.svg-inline--fa mask .fa-primary,
.svg-inline--fa mask .fa-secondary {
  fill: black;
}

.fad.fa-inverse,
.fa-duotone.fa-inverse {
  color: var(--fa-inverse, #fff);
}`;BRe=!1;DMt={mixout:function(){return{dom:{css:fFe,insertCss:Zme}}},hooks:function(){return{beforeDOMElementCreation:function(){Zme()},beforeI2svg:function(){Zme()}}}},U8=Yb||{};U8[W8]||(U8[W8]={});U8[W8].styles||(U8[W8].styles={});U8[W8].hooks||(U8[W8].hooks={});U8[W8].shims||(U8[W8].shims=[]);Fy=U8[W8],gFe=[],EMt=function t(){kh.removeEventListener("DOMContentLoaded",t),qK=1,gFe.map(function(e){return e()})},qK=!1;$8&&(qK=(kh.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(kh.readyState),qK||kh.addEventListener("DOMContentLoaded",EMt));kMt=function(e,n){return function(i,r,s,o){return e.call(n,i,r,s,o)}},Xme=function(e,n,i,r){var s=Object.keys(e),o=s.length,a=r!==void 0?kMt(n,r):n,l,c,d;for(i===void 0?(l=1,d=e[s[0]]):(l=0,d=i);l<o;l++)c=s[l],d=a(d,e[c],c,e);return d};eI=Fy.styles,PMt=Fy.shims,RMt=(WK={},i1(WK,Mh,Object.values(fV[Mh])),i1(WK,Qp,Object.values(fV[Qp])),WK),yfe=null,vFe={},yFe={},_Fe={},CFe={},xFe={},FMt=(UK={},i1(UK,Mh,Object.keys(pV[Mh])),i1(UK,Qp,Object.keys(pV[Qp])),UK);bFe=function(){var e=function(s){return Xme(eI,function(o,a,l){return o[l]=Xme(a,s,{}),o},{})};vFe=e(function(r,s,o){if(s[3]&&(r[s[3]]=o),s[2]){var a=s[2].filter(function(l){return typeof l=="number"});a.forEach(function(l){r[l.toString(16)]=o})}return r}),yFe=e(function(r,s,o){if(r[o]=o,s[2]){var a=s[2].filter(function(l){return typeof l=="string"});a.forEach(function(l){r[l]=o})}return r}),xFe=e(function(r,s,o){var a=s[2];return r[o]=o,a.forEach(function(l){r[l]=o}),r});var n="far"in eI||Co.autoFetchSvg,i=Xme(PMt,function(r,s){var o=s[0],a=s[1],l=s[2];return a==="far"&&!n&&(a="fas"),typeof o=="string"&&(r.names[o]={prefix:a,iconName:l}),typeof o=="number"&&(r.unicodes[o.toString(16)]={prefix:a,iconName:l}),r},{names:{},unicodes:{}});_Fe=i.names,CFe=i.unicodes,yfe=QK(Co.styleDefault,{family:Co.familyDefault})};_Mt(function(t){yfe=QK(t.styleDefault,{family:Co.familyDefault})});bFe();Cfe=function(){return{prefix:null,iconName:null,rest:[]}};GRe=(jK={},i1(jK,Mh,Object.keys(fV[Mh])),i1(jK,Qp,Object.keys(fV[Qp])),jK);BMt=function(){function t(){QEt(this,t),this.definitions={}}return JEt(t,[{key:"add",value:function(){for(var n=this,i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];var o=r.reduce(this._pullDefinitions,{});Object.keys(o).forEach(function(a){n.definitions[a]=Ys(Ys({},n.definitions[a]||{}),o[a]),rfe(a,o[a]);var l=fV[Mh][a];l&&rfe(l,o[a]),bFe()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,i){var r=i.prefix&&i.iconName&&i.icon?{0:i}:i;return Object.keys(r).map(function(s){var o=r[s],a=o.prefix,l=o.iconName,c=o.icon,d=c[2];n[a]||(n[a]={}),d.length>0&&d.forEach(function(u){typeof u=="string"&&(n[a][u]=c)}),n[a][l]=c}),n}}]),t}(),WRe=[],tI={},iI={},zMt=Object.keys(iI);SFe=new BMt,GMt=function(){Co.autoReplaceSvg=!1,Co.observeMutations=!1,wT("noAuto")},WMt={i2svg:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return $8?(wT("beforeI2svg",e),j8("pseudoElements2svg",e),j8("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot;Co.autoReplaceSvg===!1&&(Co.autoReplaceSvg=!0),Co.observeMutations=!0,MMt(function(){jMt({autoReplaceSvgRoot:n}),wT("watch",e)})}},UMt={icon:function(e){if(e===null)return null;if(YK(e)==="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:xT(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){var n=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],i=QK(e[0]);return{prefix:i,iconName:xT(i,n)||n}}if(typeof e=="string"&&(e.indexOf("".concat(Co.cssPrefix,"-"))>-1||e.match(uMt))){var r=JK(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||qb(),iconName:xT(r.prefix,r.iconName)||r.iconName}}if(typeof e=="string"){var s=qb();return{prefix:s,iconName:xT(s,e)||e}}}},y4={noAuto:GMt,config:Co,dom:WMt,parse:UMt,library:SFe,findIconDefinition:ofe,toHtml:CV},jMt=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.autoReplaceSvgRoot,i=n===void 0?kh:n;(Object.keys(Fy.styles).length>0||Co.autoFetchSvg)&&$8&&Co.autoReplaceSvg&&y4.dom.i2svg({node:i})};Qme=Fy.styles;qMt={found:!1,width:512,height:512};jRe=function(){},cfe=Co.measurePerformance&&NK&&NK.mark&&NK.measure?NK:{mark:jRe,measure:jRe},dV='FA "6.5.2"',XMt=function(e){return cfe.mark("".concat(dV," ").concat(e," begins")),function(){return TFe(e)}},TFe=function(e){cfe.mark("".concat(dV," ").concat(e," ends")),cfe.measure("".concat(dV," ").concat(e),"".concat(dV," ").concat(e," begins"),"".concat(dV," ").concat(e," ends"))},bfe={begin:XMt,end:TFe},$K=function(){};KK={replace:function(e){var n=e[0];if(n.parentNode)if(e[1].forEach(function(r){n.parentNode.insertBefore(DFe(r),n)}),n.getAttribute(bT)===null&&Co.keepOriginalSource){var i=kh.createComment(nkt(n));n.parentNode.replaceChild(i,n)}else n.remove()},nest:function(e){var n=e[0],i=e[1];if(~gfe(n).indexOf(Co.replacementClass))return KK.replace(e);var r=new RegExp("".concat(Co.cssPrefix,"-.*"));if(delete i[0].attributes.id,i[0].attributes.class){var s=i[0].attributes.class.split(" ").reduce(function(a,l){return l===Co.replacementClass||l.match(r)?a.toSvg.push(l):a.toNode.push(l),a},{toNode:[],toSvg:[]});i[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",s.toNode.join(" "))}var o=i.map(function(a){return CV(a)}).join(`
`);n.setAttribute(bT,""),n.innerHTML=o}};wfe=!1;ZK=null;ckt=Fy.styles;Zb=new Set;ffe.map(function(t){Zb.add("fa-".concat(t))});Object.keys(pV[Mh]).map(Zb.add.bind(Zb));Object.keys(pV[Qp]).map(Zb.add.bind(Zb));Zb=yV(Zb);hkt=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.transform,r=i===void 0?Z_:i,s=n.symbol,o=s===void 0?!1:s,a=n.mask,l=a===void 0?null:a,c=n.maskId,d=c===void 0?null:c,u=n.title,m=u===void 0?null:u,f=n.titleId,_=f===void 0?null:f,x=n.classes,D=x===void 0?[]:x,E=n.attributes,M=E===void 0?{}:E,I=n.styles,z=I===void 0?{}:I;if(e){var G=e.prefix,A=e.iconName,Y=e.icon;return eY(Ys({type:"icon"},e),function(){return wT("beforeDOMElementCreation",{iconDefinition:e,params:n}),Co.autoA11y&&(m?M["aria-labelledby"]="".concat(Co.replacementClass,"-title-").concat(_||vV()):(M["aria-hidden"]="true",M.focusable="false")),xfe({icons:{main:afe(Y),mask:l?afe(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:G,iconName:A,transform:Ys(Ys({},Z_),r),symbol:o,title:m,maskId:d,titleId:_,extra:{attributes:M,styles:z,classes:D}})})}},pkt={mixout:function(){return{icon:ukt(hkt)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=ZRe,n.nodeCallback=dkt,n}}},provides:function(e){e.i2svg=function(n){var i=n.node,r=i===void 0?kh:i,s=n.callback,o=s===void 0?function(){}:s;return ZRe(r,o)},e.generateSvgReplacementMutation=function(n,i){var r=i.iconName,s=i.title,o=i.titleId,a=i.prefix,l=i.transform,c=i.symbol,d=i.mask,u=i.maskId,m=i.extra;return new Promise(function(f,_){Promise.all([lfe(r,a),d.iconName?lfe(d.iconName,d.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(x){var D=ufe(x,2),E=D[0],M=D[1];f([n,xfe({icons:{main:E,mask:M},prefix:a,iconName:r,transform:l,symbol:c,maskId:u,title:s,titleId:o,extra:m,watchable:!0})])}).catch(_)})},e.generateAbstractIcon=function(n){var i=n.children,r=n.attributes,s=n.main,o=n.transform,a=n.styles,l=XK(a);l.length>0&&(r.style=l);var c;return vfe(o)&&(c=j8("generateAbstractTransformGrouping",{main:s,transform:o,containerWidth:s.width,iconWidth:s.width})),i.push(c||s.icon),{children:i,attributes:r}}}},mkt={mixout:function(){return{layer:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.classes,s=r===void 0?[]:r;return eY({type:"layer"},function(){wT("beforeDOMElementCreation",{assembler:n,params:i});var o=[];return n(function(a){Array.isArray(a)?a.map(function(l){o=o.concat(l.abstract)}):o=o.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(Co.cssPrefix,"-layers")].concat(yV(s)).join(" ")},children:o}]})}}}},fkt={mixout:function(){return{counter:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.title,s=r===void 0?null:r,o=i.classes,a=o===void 0?[]:o,l=i.attributes,c=l===void 0?{}:l,d=i.styles,u=d===void 0?{}:d;return eY({type:"counter",content:n},function(){return wT("beforeDOMElementCreation",{content:n,params:i}),YMt({content:n.toString(),title:s,extra:{attributes:c,styles:u,classes:["".concat(Co.cssPrefix,"-layers-counter")].concat(yV(a))}})})}}}},gkt={mixout:function(){return{text:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.transform,s=r===void 0?Z_:r,o=i.title,a=o===void 0?null:o,l=i.classes,c=l===void 0?[]:l,d=i.attributes,u=d===void 0?{}:d,m=i.styles,f=m===void 0?{}:m;return eY({type:"text",content:n},function(){return wT("beforeDOMElementCreation",{content:n,params:i}),URe({content:n,transform:Ys(Ys({},Z_),s),title:a,extra:{attributes:u,styles:f,classes:["".concat(Co.cssPrefix,"-layers-text")].concat(yV(c))}})})}}},provides:function(e){e.generateLayersText=function(n,i){var r=i.title,s=i.transform,o=i.extra,a=null,l=null;if(aFe){var c=parseInt(getComputedStyle(n).fontSize,10),d=n.getBoundingClientRect();a=d.width/c,l=d.height/c}return Co.autoA11y&&!r&&(o.attributes["aria-hidden"]="true"),Promise.resolve([n,URe({content:n.innerHTML,width:a,height:l,transform:s,title:r,extra:o,watchable:!0})])}}},vkt=new RegExp('"',"ug"),XRe=[1105920,1112319];xkt={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=JRe,n}}},provides:function(e){e.pseudoElements2svg=function(n){var i=n.node,r=i===void 0?kh:i;Co.searchPseudoElements&&JRe(r)}}},eFe=!1,bkt={mixout:function(){return{dom:{unwatch:function(){MFe(),eFe=!0}}}},hooks:function(){return{bootstrap:function(){YRe(sfe("mutationObserverCallbacks",{}))},noAuto:function(){rkt()},watch:function(n){var i=n.observeMutationsRoot;eFe?dfe():YRe(sfe("mutationObserverCallbacks",{observeMutationsRoot:i}))}}}},tFe=function(e){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce(function(i,r){var s=r.toLowerCase().split("-"),o=s[0],a=s.slice(1).join("-");if(o&&a==="h")return i.flipX=!0,i;if(o&&a==="v")return i.flipY=!0,i;if(a=parseFloat(a),isNaN(a))return i;switch(o){case"grow":i.size=i.size+a;break;case"shrink":i.size=i.size-a;break;case"left":i.x=i.x-a;break;case"right":i.x=i.x+a;break;case"up":i.y=i.y-a;break;case"down":i.y=i.y+a;break;case"rotate":i.rotate=i.rotate+a;break}return i},n)},wkt={mixout:function(){return{parse:{transform:function(n){return tFe(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,i){var r=i.getAttribute("data-fa-transform");return r&&(n.transform=tFe(r)),n}}},provides:function(e){e.generateAbstractTransformGrouping=function(n){var i=n.main,r=n.transform,s=n.containerWidth,o=n.iconWidth,a={transform:"translate(".concat(s/2," 256)")},l="translate(".concat(r.x*32,", ").concat(r.y*32,") "),c="scale(".concat(r.size/16*(r.flipX?-1:1),", ").concat(r.size/16*(r.flipY?-1:1),") "),d="rotate(".concat(r.rotate," 0 0)"),u={transform:"".concat(l," ").concat(c," ").concat(d)},m={transform:"translate(".concat(o/2*-1," -256)")},f={outer:a,inner:u,path:m};return{tag:"g",attributes:Ys({},f.outer),children:[{tag:"g",attributes:Ys({},f.inner),children:[{tag:i.icon.tag,children:i.icon.children,attributes:Ys(Ys({},i.icon.attributes),f.path)}]}]}}}},Jme={x:0,y:0,width:"100%",height:"100%"};Tkt={hooks:function(){return{parseNodeAttributes:function(n,i){var r=i.getAttribute("data-fa-mask"),s=r?JK(r.split(" ").map(function(o){return o.trim()})):Cfe();return s.prefix||(s.prefix=qb()),n.mask=s,n.maskId=i.getAttribute("data-fa-mask-id"),n}}},provides:function(e){e.generateAbstractMask=function(n){var i=n.children,r=n.attributes,s=n.main,o=n.mask,a=n.maskId,l=n.transform,c=s.width,d=s.icon,u=o.width,m=o.icon,f=wMt({transform:l,containerWidth:u,iconWidth:c}),_={tag:"rect",attributes:Ys(Ys({},Jme),{},{fill:"white"})},x=d.children?{children:d.children.map(iFe)}:{},D={tag:"g",attributes:Ys({},f.inner),children:[iFe(Ys({tag:d.tag,attributes:Ys(Ys({},d.attributes),f.path)},x))]},E={tag:"g",attributes:Ys({},f.outer),children:[D]},M="mask-".concat(a||vV()),I="clip-".concat(a||vV()),z={tag:"mask",attributes:Ys(Ys({},Jme),{},{id:M,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[_,E]},G={tag:"defs",children:[{tag:"clipPath",attributes:{id:I},children:Skt(m)},z]};return i.push(G,{tag:"rect",attributes:Ys({fill:"currentColor","clip-path":"url(#".concat(I,")"),mask:"url(#".concat(M,")")},Jme)}),{children:i,attributes:r}}}},Dkt={provides:function(e){var n=!1;Yb.matchMedia&&(n=Yb.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var i=[],r={fill:"currentColor"},s={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};i.push({tag:"path",attributes:Ys(Ys({},r),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var o=Ys(Ys({},s),{},{attributeName:"opacity"}),a={tag:"circle",attributes:Ys(Ys({},r),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:Ys(Ys({},s),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Ys(Ys({},o),{},{values:"1;0;1;1;0;1;"})}),i.push(a),i.push({tag:"path",attributes:Ys(Ys({},r),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Ys(Ys({},o),{},{values:"1;0;0;0;0;1;"})}]}),n||i.push({tag:"path",attributes:Ys(Ys({},r),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Ys(Ys({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:i}}}},Ekt={hooks:function(){return{parseNodeAttributes:function(n,i){var r=i.getAttribute("data-fa-symbol"),s=r===null?!1:r===""?!0:r;return n.symbol=s,n}}}},Mkt=[DMt,pkt,mkt,fkt,gkt,xkt,bkt,wkt,Tkt,Dkt,Ekt];HMt(Mkt,{mixoutsTo:y4});O1n=y4.noAuto,IFe=y4.config,N1n=y4.library,AFe=y4.dom,PFe=y4.parse,V1n=y4.findIconDefinition,B1n=y4.toHtml,RFe=y4.icon,z1n=y4.layer,kkt=y4.text,Ikt=y4.counter});function Lkt(t,e){if(!e.autoAddCss||Sfe.has(t))return;if(t.getElementById(LFe)!=null){e.autoAddCss=!1,Sfe.add(t);return}let n=t.createElement("style");n.setAttribute("type","text/css"),n.setAttribute("id",LFe),n.innerHTML=AFe.css();let i=t.head.childNodes,r=null;for(let s=i.length-1;s>-1;s--){let o=i[s],a=o.nodeName.toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}t.head.insertBefore(n,r),e.autoAddCss=!1,Sfe.add(t)}var Akt,Pkt,Rkt,Fkt,Sfe,LFe,Okt,Nkt,Vkt,Bkt,zkt,Hkt,tY,OFe,iY=Q(()=>{me();me();ri();FFe();od();Akt=["*"],Pkt=t=>{throw new Error(`Could not find icon with iconName=${t.iconName} and prefix=${t.prefix} in the icon library.`)},Rkt=()=>{throw new Error("Property `icon` is required for `fa-icon`/`fa-duotone-icon` components.")},Fkt=t=>{let e={[`fa-${t.animation}`]:t.animation!=null&&!t.animation.startsWith("spin"),"fa-spin":t.animation==="spin"||t.animation==="spin-reverse","fa-spin-pulse":t.animation==="spin-pulse"||t.animation==="spin-pulse-reverse","fa-spin-reverse":t.animation==="spin-reverse"||t.animation==="spin-pulse-reverse","fa-pulse":t.animation==="spin-pulse"||t.animation==="spin-pulse-reverse","fa-fw":t.fixedWidth,"fa-border":t.border,"fa-inverse":t.inverse,"fa-layers-counter":t.counter,"fa-flip-horizontal":t.flip==="horizontal"||t.flip==="both","fa-flip-vertical":t.flip==="vertical"||t.flip==="both",[`fa-${t.size}`]:t.size!==null,[`fa-rotate-${t.rotate}`]:t.rotate!==null,[`fa-pull-${t.pull}`]:t.pull!==null,[`fa-stack-${t.stackItemSize}`]:t.stackItemSize!=null};return Object.keys(e).map(n=>e[n]?n:null).filter(n=>n)},Sfe=new WeakSet,LFe="fa-auto-css";Okt=t=>t.prefix!==void 0&&t.iconName!==void 0,Nkt=(t,e)=>Okt(t)?t:Array.isArray(t)&&t.length===2?{prefix:t[0],iconName:t[1]}:{prefix:e,iconName:t},Vkt=(()=>{let e=class e{constructor(){this.defaultPrefix="fas",this.fallbackIcon=null,this._autoAddCss=!0}set autoAddCss(i){IFe.autoAddCss=i,this._autoAddCss=i}get autoAddCss(){return this._autoAddCss}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Bkt=(()=>{let e=class e{constructor(){this.definitions={}}addIcons(...i){for(let r of i){r.prefix in this.definitions||(this.definitions[r.prefix]={}),this.definitions[r.prefix][r.iconName]=r;for(let s of r.icon[2])typeof s=="string"&&(this.definitions[r.prefix][s]=r)}}addIconPacks(...i){for(let r of i){let s=Object.keys(r).map(o=>r[o]);this.addIcons(...s)}}getIconDefinition(i,r){return i in this.definitions&&r in this.definitions[i]?this.definitions[i][r]:null}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),zkt=(()=>{let e=class e{constructor(){this.stackItemSize="1x"}ngOnChanges(i){if("size"in i)throw new Error('fa-icon is not allowed to customize size when used inside fa-stack. Set size on the enclosing fa-stack instead: <fa-stack size="4x">...</fa-stack>.')}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["fa-icon","stackItemSize",""],["fa-duotone-icon","stackItemSize",""]],inputs:{stackItemSize:"stackItemSize",size:"size"},standalone:!0,features:[yn]});let t=e;return t})(),Hkt=(()=>{let e=class e{constructor(i,r){this.renderer=i,this.elementRef=r}ngOnInit(){this.renderer.addClass(this.elementRef.nativeElement,"fa-stack")}ngOnChanges(i){"size"in i&&(i.size.currentValue!=null&&this.renderer.addClass(this.elementRef.nativeElement,`fa-${i.size.currentValue}`),i.size.previousValue!=null&&this.renderer.removeClass(this.elementRef.nativeElement,`fa-${i.size.previousValue}`))}};e.\u0275fac=function(r){return new(r||e)(R(Ac),R(fi))},e.\u0275cmp=_e({type:e,selectors:[["fa-stack"]],inputs:{size:"size"},standalone:!0,features:[yn,xe],ngContentSelectors:Akt,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},encapsulation:2});let t=e;return t})(),tY=(()=>{let e=class e{constructor(i,r,s,o,a){this.sanitizer=i,this.config=r,this.iconLibrary=s,this.stackItem=o,this.document=Ve(Lr),a!=null&&o==null&&console.error('FontAwesome: fa-icon and fa-duotone-icon elements must specify stackItemSize attribute when wrapped into fa-stack. Example: <fa-icon stackItemSize="2x"></fa-icon>.')}ngOnChanges(i){if(this.icon==null&&this.config.fallbackIcon==null){Rkt();return}if(i){let r=this.findIconDefinition(this.icon??this.config.fallbackIcon);if(r!=null){let s=this.buildParams();Lkt(this.document,this.config);let o=RFe(r,s);this.renderedIconHTML=this.sanitizer.bypassSecurityTrustHtml(o.html.join(`
`))}}}render(){this.ngOnChanges({})}findIconDefinition(i){let r=Nkt(i,this.config.defaultPrefix);if("icon"in r)return r;let s=this.iconLibrary.getIconDefinition(r.prefix,r.iconName);return s??(Pkt(r),null)}buildParams(){let i={flip:this.flip,animation:this.animation,border:this.border,inverse:this.inverse,size:this.size||null,pull:this.pull||null,rotate:this.rotate||null,fixedWidth:typeof this.fixedWidth=="boolean"?this.fixedWidth:this.config.fixedWidth,stackItemSize:this.stackItem!=null?this.stackItem.stackItemSize:null},r=typeof this.transform=="string"?PFe.transform(this.transform):this.transform;return{title:this.title,transform:r,classes:Fkt(i),mask:this.mask!=null?this.findIconDefinition(this.mask):null,symbol:this.symbol,attributes:{role:this.a11yRole}}}};e.\u0275fac=function(r){return new(r||e)(R(Uo),R(Vkt),R(Bkt),R(zkt,8),R(Hkt,8))},e.\u0275cmp=_e({type:e,selectors:[["fa-icon"]],hostAttrs:[1,"ng-fa-icon"],hostVars:2,hostBindings:function(r,s){r&2&&(Kp("innerHTML",s.renderedIconHTML,Pi),Bn("title",s.title))},inputs:{icon:"icon",title:"title",animation:"animation",mask:"mask",flip:"flip",size:"size",pull:"pull",border:"border",inverse:"inverse",symbol:"symbol",rotate:"rotate",fixedWidth:"fixedWidth",transform:"transform",a11yRole:"a11yRole"},standalone:!0,features:[yn,xe],decls:0,vars:0,template:function(r,s){},encapsulation:2});let t=e;return t})(),OFe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})()});function $kt(t,e){if(t&1&&(ee(0,"div",1),Ce(1,"safeHtml")),t&2){let n=w();b("innerHTML",tt(1,1,n.svg),Pi)}}function Kkt(t,e){if(t&1&&(h(0,"mat-icon",4),Ln(1),p()),t&2){let n=w(2);b("ngStyle",Sb(1,jkt,n.size+"px",n.size+"px",n.size+"px",n.color))}}function Ykt(t,e){if(t&1&&(vs(0),ee(1,"fa-icon",5),ys()),t&2){let n=w(2);g(),b("icon",n.faIcon)}}function qkt(t,e){if(t&1&&W(0,Kkt,2,6,"mat-icon",2)(1,Ykt,2,1,"ng-container",3),t&2){let n=w();b("ngIf",!n.fa),g(),b("ngIf",n.faIcon&&n.fa)}}var Gkt,Wkt,Ukt,jkt,an,ls=Q(()=>{kRe();qme();iY();Ja();An();ri();Mp();P8();ha();me();Ci();An();Gkt=["*"],Wkt=(t,e,n)=>({backgroundColor:t,width:e,height:n}),Ukt=(t,e)=>({"small-height":t,"normal-height":e}),jkt=(t,e,n,i)=>({fontSize:t,width:e,height:n,color:i});an=(()=>{let e=class e{constructor(i){this.dialogService=i,this.size=24,this.smallHeight=!1,this.fa="",this.lastMouseDown=0,this.onlyOneClick=!1}ngOnChanges(i){i.size&&this.calcButtonSize()}onMouseDown(i){this.onlyOneClick&&(Date.now()-this.lastMouseDown<500&&this.dialogService.showOk("Bei Icons brauchst du immer nur 1x klicken!",{buttonText:"Ok, ich klick in Zukunft nur einmal"}),this.lastMouseDown=Date.now())}ngOnInit(){this.fa==="paypal"?this.faIcon=MRe:this.fa==="transfer"?this.faIcon=IRe:this.fa==="sparkles"&&(this.faIcon=OK),this.calcButtonSize()}ngAfterViewInit(){}calcButtonSize(){this.buttonSize=this.size+14}};e.\u0275fac=function(r){return new(r||e)(R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-button-icon"]],hostBindings:function(r,s){r&1&&F("mousedown",function(a){return s.onMouseDown(a)})},inputs:{backgroundColor:"backgroundColor",size:"size",color:"color",tooltip:"tooltip",smallHeight:"smallHeight",fa:"fa",onlyOneClick:"onlyOneClick",svg:"svg"},standalone:!0,features:[yn,xe],ngContentSelectors:Gkt,decls:3,vars:11,consts:[["mat-icon-button","",3,"matTooltip","ngStyle","ngClass"],[3,"innerHTML"],["tabindex","-1",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["tabindex","-1",3,"ngStyle"],[1,"flex",3,"icon"]],template:function(r,s){r&1&&(gr(),h(0,"button",0),W(1,$kt,2,3,"div",1)(2,qkt,2,2),p()),r&2&&(b("matTooltip",s.tooltip)("ngStyle",Qm(4,Wkt,s.backgroundColor,s.buttonSize+"px",s.buttonSize+"px"))("ngClass",bs(8,Ukt,s.smallHeight,!s.smallHeight)),g(),Je(s.svg?1:2))},dependencies:[A8,dl,rr,Dn,No,rs,_s,Ct,Zr,tY,Or],styles:["[_nghost-%COMP%]{display:flex;height:fit-content}[_nghost-%COMP%]     mat-icon{display:flex;justify-content:center;align-items:center}[_nghost-%COMP%]     button:hover{border:1px solid #b7860f}[_nghost-%COMP%]     .mat-mdc-button-touch-target{height:100%!important;width:100%!important}[_nghost-%COMP%]     button{padding:0!important;height:100%;display:flex;justify-content:center;align-items:center;color:var(--nxt-button-icon-color)!important}[_nghost-%COMP%]     button .mat-button-wrapper{width:100%;height:100%;display:flex;line-height:1;align-items:center;justify-content:center}[_nghost-%COMP%]     button .mat-button-wrapper mat-icon{width:100%;height:100%;display:flex!important;line-height:1;align-items:center;justify-content:center}[_nghost-%COMP%]     button .mat-button-ripple{display:flex;width:100%;height:100%}[_nghost-%COMP%]     .small-height{margin:0 10px;height:24px;width:24px}[_nghost-%COMP%]     .normal-height{height:40px;width:40px}"]});let t=e;return t})()});function Jkt(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",11),F("click",function(){V(n);let r=w();return B(r.back())}),y(1,"chevron_left "),p()}}function eIt(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",12),F("click",function(){V(n);let r=w();return B(r.cancel())}),y(1,"close "),p()}}function tIt(t,e){if(t&1){let n=re();h(0,"div",15),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.buttonClicked(r))}),ee(1,"div",16),Ce(2,"safeHtml"),p()}if(t&2){let n=e.$implicit;b("ngStyle",bs(5,Xkt,n.backgroundColor,n.color))("ngClass",sn(8,Qkt,n.smallerText)),g(),b("innerHTML",tt(2,3,(n.text?n.text:n)+(n.currentTimeoutText?" ("+n.currentTimeoutText+")":"")),Pi)}}function iIt(t,e){if(t&1&&(h(0,"div",13),W(1,tIt,3,10,"div",14),p()),t&2){let n=e.$implicit;g(),b("ngForOf",n)}}var Zkt,Xkt,Qkt,NFe,VFe=Q(()=>{gu();ji();ha();An();Mp();ls();ri();Vt();me();ji();gu();Vt();An();Zkt=["titleDiv"],Xkt=(t,e)=>({marginBottom:"0.7em",backgroundColor:t,color:e}),Qkt=t=>({item:!0,"item-smaller-text":t});NFe=(()=>{let e=class e{constructor(i,r,s){this.dialogRef=i,this.data=r,this.shortcutService=s,this.hideBackButton=!1,this.hideCancelButton=!1,this.buttonRows=r.buttonRows,this.title=r.title,this.text=r.text,this.currentValue=r.value,this.hideBackButton=r.hideBackButton,this.hideCancelButton=r.hideCancelButton}ngOnInit(){this.shortcutSubscription=this.shortcutService.onKeyPress.subscribe(i=>{Pn.Esc}),this.buttonRows.forEach(i=>{i.forEach(r=>{r.timeout&&(r.currentTimeout=r.timeout,this.setButtonTimeout(r))})})}buttonClicked(i){this.dialogRef.close(i)}cancel(){this.dialogRef.close()}back(){this.dialogRef.close("back")}ngOnDestroy(){this.shortcutSubscription.unsubscribe()}setButtonTimeout(i){i.currentTimeout>0?(i.currentTimeoutText=(i.currentTimeout/1e3).toString(),setTimeout(()=>{i.currentTimeout-=1e3,this.setButtonTimeout(i)},1e3)):this.buttonClicked(i)}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Ou),R(fu))},e.\u0275cmp=_e({type:e,selectors:[["nxt-button-chooser"]],viewQuery:function(r,s){if(r&1&&ei(Zkt,5),r&2){let o;Pt(o=Rt())&&(s.titleDivElem=o.first)}},standalone:!0,features:[xe],decls:17,vars:9,consts:[["titleDiv",""],["fxFlex","",1,"h-100","p-relative"],[1,"flex","flex-row","justify-between","absolute","w-full"],["matTooltip","zur\xFCck",3,"click",4,"ngIf"],["matTooltip","abbrechen",3,"click",4,"ngIf"],["fxLayout","column",1,"outer-container"],[1,"title"],[3,"innerHTML"],[1,"text"],["fxFlex",""],["fxLayout","row wrap","fxLayoutAlign","space-around",4,"ngFor","ngForOf"],["matTooltip","zur\xFCck",3,"click"],["matTooltip","abbrechen",3,"click"],["fxLayout","row wrap","fxLayoutAlign","space-around"],["fxLayout","column","fxFlex.xs","100%","fxFlex.sm","48%","fxFlex.md","30%","fxFlex.lg","30%","fxFlex.xl","30%",3,"ngStyle","ngClass","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex.xs","100%","fxFlex.sm","48%","fxFlex.md","30%","fxFlex.lg","30%","fxFlex.xl","30%",3,"click","ngStyle","ngClass"],[2,"margin","auto",3,"innerHTML"]],template:function(r,s){r&1&&(h(0,"div",1)(1,"div",2)(2,"div"),W(3,Jkt,2,0,"nxt-button-icon",3),p(),h(4,"div"),W(5,eIt,2,0,"nxt-button-icon",4),p()(),h(6,"div",5)(7,"div")(8,"div",6),ee(9,"div",7,0),Ce(11,"safeHtml"),p(),h(12,"div",8),ee(13,"div",7),Ce(14,"safeHtml"),p()(),h(15,"div",9),W(16,iIt,2,1,"div",10),p()()()),r&2&&(g(3),b("ngIf",!s.hideBackButton),g(2),b("ngIf",!s.hideCancelButton),g(4),b("innerHTML",tt(11,5,s.title),Pi),g(4),b("innerHTML",tt(14,7,s.text),Pi),g(3),b("ngForOf",s.buttonRows))},dependencies:[At,Yt,oi,qi,Ct,an,dl,Hi,rr,Dn,No,rs,_s,Or],styles:[".outer-container[_ngcontent-%COMP%]{width:100%;border:0px solid blue;font-family:Google Sans;height:100%}.outer-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin:2vh;font-size:2.3em;text-align:center;color:#bbb}.outer-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{margin:1vh;font-size:1.4em;text-align:center;color:#bbb}.outer-container[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{text-align:center;color:#eee;border:0;cursor:pointer;background:#b7860f;border-radius:50px;margin:.1em;font-size:2.3em;width:100%;padding:0;vertical-align:center}@media (min-width: 960px) and (max-width: 1279.9px){.outer-container[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{height:100px}}@media (min-width: 1280px){.outer-container[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{min-height:120px}}.outer-container[_ngcontent-%COMP%]   .item-smaller-text[_ngcontent-%COMP%]{font-size:1.8em}"]});let t=e;return t})()});function sIt(t,e){if(t&1){let n=re();h(0,"nxt-button",11),F("click",function(){V(n);let r=w();return B(r.save())}),y(1,"SPEICHERN"),p()}}function oIt(t,e){if(t&1){let n=re();h(0,"nxt-button",11),F("click",function(){V(n);let r=w();return B(r.delete())}),y(1,"L\xD6SCHEN"),p()}}var nIt,rIt,BFe,zFe=Q(()=>{Ep();Jr();ji();Zi();An();ri();Ja();Mp();P8();Vt();me();qn();ji();Vt();An();nIt=["descriptionInputElem"],rIt=(t,e)=>({width:t,height:e,margin:"auto"});BFe=(()=>{let e=class e{ngOnInit(){}constructor(i,r,s){this.formBuilder=i,this.dialogRef=r,this.data=s,this.imgWidth="auto",this.imgHeight="auto",this.showSaveButton=!0,this.descriptionReadonly=!1,this.showDeleteButton=!1,s.nxtImage&&(s.imgSrc=s.nxtImage.data,s.imgSrc.startsWith("data:")||(s.imgSrc="data:image/jpeg;base64,"+s.imgSrc),s.description=s.nxtImage.description,this.showSaveButton=!1,this.showDeleteButton=!0,this.descriptionReadonly=!0),this.form=this.formBuilder.group({description:new $t(s.description)}),this.setImageSize()}close(){this.dialogRef.close(this.form.value)}setImageSize(){return O(this,null,function*(){let i=yield this.getImageSize(this.data.imgSrc),r=i.width/window.innerWidth*100,s=i.height/window.innerHeight*100;r>s?this.imgWidth="50vw":this.imgHeight="50vh"})}getImageSize(i){return O(this,null,function*(){return new Promise((r,s)=>{let o=new Image;o.onload=()=>{r({width:o.width,height:o.height})},o.src=i})})}save(){this.dialogRef.close(this.form.value)}cancel(){this.dialogRef.close()}ngAfterViewInit(){setTimeout(()=>this.descriptionInputElem?.setFocus(),200)}delete(){return O(this,null,function*(){})}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(Gt),R(Ou))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-image"]],viewQuery:function(r,s){if(r&1&&ei(nIt,7),r&2){let o;Pt(o=Rt())&&(s.descriptionInputElem=o.first)}},standalone:!0,features:[xe],decls:14,vars:9,consts:[["descriptionInputElem",""],["fxLayout","column",1,"nxt-dialog-content"],["mat-icon-button","","matTooltip","abbrechen",2,"align-self","flex-end",3,"click"],["aria-hidden","false","aria-label","close"],["fxLayout","100%"],[3,"src","ngStyle"],[1,"nxt-dialog-form"],["placeholder","Beschreibung",3,"readonly","nxtFormControl"],[1,"nxt-dialog-button-bar"],[2,"justify-content","space-around","display","flex"],["style","margin: auto;",3,"click",4,"ngIf"],[2,"margin","auto",3,"click"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"button",2),F("click",function(){return V(o),B(s.cancel())}),h(2,"mat-icon",3),y(3,"close"),p()(),h(4,"div",4),ee(5,"img",5),p(),h(6,"div",6)(7,"div"),ee(8,"nxt-input",7,0),p(),h(10,"div",8)(11,"div",9),W(12,sIt,2,0,"nxt-button",10)(13,oIt,2,0,"nxt-button",10),p()()()()}r&2&&(g(5),b("src",s.data.imgSrc,Ur)("ngStyle",bs(6,rIt,s.imgWidth,s.imgHeight)),g(3),b("readonly",s.descriptionReadonly)("nxtFormControl",s.form.get("description")),g(4),b("ngIf",s.showSaveButton),g(),b("ngIf",s.showDeleteButton))},dependencies:[At,Yt,A8,dl,Zr,rr,Dn,rs,Yi,Ct,Lt]});let t=e;return t})()});var lf,Lv=Q(()=>{jo();me();od();lf=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i,r){return Qt.format(i,r)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"duration",type:e,pure:!0,standalone:!0});let t=e;return t})()});function lIt(t,e){if(t&1){let n=re();h(0,"div",3),F("click",function(){V(n);let r=w();return B(r.buttonClicked(r.hour))}),h(1,"div",4),y(2),p()()}if(t&2){let n=w();g(2),ye(n.hour.text)}}function cIt(t,e){if(t&1&&(h(0,"div",11)(1,"div",12),y(2),Ce(3,"duration"),p()()),t&2){let n=w(3);g(2),ye(Nt(3,1,n.hourCounter.full,"H:mm"))}}function dIt(t,e){if(t&1){let n=re();h(0,"div",8)(1,"div",9),F("click",function(){V(n);let r=w(2);return B(r.hourClick(r.hour+":00"))}),y(2),W(3,cIt,4,4,"div",10),p()()}if(t&2){let n=w(2);g(),jr(n.getButtonClass(n.hour+":00")+" hour"),g(),Ke(" ",n.hour+":00"," "),g(),b("ngIf",n.hourCounter)}}function uIt(t,e){if(t&1&&(h(0,"div",16),y(1),Ce(2,"duration"),p()),t&2){let n=w(3);g(),ye(Nt(2,1,n.hourCounter.hourCounter15,"H:mm"))}}function hIt(t,e){if(t&1){let n=re();h(0,"div",13),F("click",function(){V(n);let r=w(2);return B(r.hourClick(r.hour+":15"))}),h(1,"div",14),y(2),W(3,uIt,3,4,"div",15),p()()}if(t&2){let n=w(2);jr(n.getButtonClass(n.hour+":15")),g(2),Ke(" ",n.getButtonText(n.hour+":15")," "),g(),b("ngIf",n.hourCounter)}}function pIt(t,e){if(t&1&&(h(0,"div",16),y(1),Ce(2,"duration"),p()),t&2){let n=w(3);g(),ye(Nt(2,1,n.hourCounter.hourCounter30,"H:mm"))}}function mIt(t,e){if(t&1){let n=re();h(0,"div",13),F("click",function(){V(n);let r=w(2);return B(r.hourClick(r.hour+":30"))}),h(1,"div",14),y(2),W(3,pIt,3,4,"div",15),p()()}if(t&2){let n=w(2);jr(n.getButtonClass(n.hour+":30")),g(2),Ke(" ",n.getButtonText(n.hour+":30")," "),g(),b("ngIf",n.hourCounter)}}function fIt(t,e){if(t&1&&(h(0,"div",16),y(1),Ce(2,"duration"),p()),t&2){let n=w(3);g(),ye(Nt(2,1,n.hourCounter.hourCounter45,"H:mm"))}}function gIt(t,e){if(t&1){let n=re();h(0,"div",13),F("click",function(){V(n);let r=w(2);return B(r.hourClick(r.hour+":45"))}),h(1,"div",14),y(2),W(3,fIt,3,4,"div",15),p()()}if(t&2){let n=w(2);jr(n.getButtonClass(n.hour+":45")),g(2),Ke(" ",n.getButtonText(n.hour+":45")," "),g(),b("ngIf",n.hourCounter)}}function vIt(t,e){if(t&1&&(vs(0),W(1,dIt,4,4,"div",5),h(2,"div",6),W(3,hIt,4,4,"div",7)(4,mIt,4,4,"div",7)(5,gIt,4,4,"div",7),p(),ys()),t&2){let n=w();g(),b("ngIf",!n.hourCounter||n.hourCounter.full>0),g(2),b("ngIf",!n.hourCounter||n.hourCounter.hourCounter15>0),g(),b("ngIf",!n.hourCounter||n.hourCounter.hourCounter30>0),g(),b("ngIf",!n.hourCounter||n.hourCounter.hourCounter45>0)}}var aIt,HFe,GFe=Q(()=>{me();Lv();An();ri();Vt();me();Vt();An();aIt=t=>({"hour-counter-visible":t});HFe=(()=>{let e=class e{constructor(){this.buttonClick=new nt}ngOnInit(){}hourClick(i){this.buttonClick.emit(i)}getButtonText(i){return i}getButtonClass(i){return i===this.value?"currentValue":""}buttonClicked(i){this.buttonClick.emit(i.value)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-time-button"]],inputs:{value:"value",hour:"hour",hourCounter:"hourCounter"},outputs:{buttonClick:"buttonClick"},standalone:!0,features:[xe],decls:3,vars:5,consts:[["fxLayout","column","fxLayoutAlign","center",1,"hour-container","h-100",2,"position","relative",3,"ngClass"],["id","textWrapper","fxLayout","column","class","h-100 mouse-pointer","fxLayoutAlign","center center",3,"click",4,"ngIf"],[4,"ngIf"],["id","textWrapper","fxLayout","column","fxLayoutAlign","center center",1,"h-100","mouse-pointer",3,"click"],["id","text","fxFlexAlign","center",1,"text"],["fxFlex","100","fxFlexAlign","center",4,"ngIf"],["fxFlex","100%","fxLayoutAlign","center center",1,"hour-parts"],["class","p-relative hour-part","fxLayout","row","fxLayoutAlign","center","fxFlex","33.3%",3,"class","click",4,"ngIf"],["fxFlex","100","fxFlexAlign","center"],["fxLayoutAlign","center",1,"p-relative",3,"click"],["fxLayout","row","fxLayoutAlign","end","class","w-full",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end",1,"w-full"],["id","hourCounter",1,"hour-counter"],["fxLayout","row","fxLayoutAlign","center","fxFlex","33.3%",1,"p-relative","hour-part",3,"click"],[1,"p-relative","no-hover"],["class","hour-counter-mini no-hover",4,"ngIf"],[1,"hour-counter-mini","no-hover"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,lIt,3,1,"div",1)(2,vIt,6,4,"ng-container",2),p()),r&2&&(b("ngClass",sn(3,aIt,!!s.hourCounter)),g(),b("ngIf",s.hour.text),g(),b("ngIf",!s.hour.text))},dependencies:[At,Yt,oi,Vk,qi,_s,Dn,No,Ct,lf],styles:["[_nghost-%COMP%]     .currentValue{filter:brightness(120%)}.hour-counter-visible[_ngcontent-%COMP%]   .hour[_ngcontent-%COMP%]{padding-top:11px!important;padding-bottom:0}.hour-counter-visible[_ngcontent-%COMP%]   .hour-part[_ngcontent-%COMP%]{padding-top:4px}.hour-counter[_ngcontent-%COMP%]{position:absolute;z-index:1000;font-size:25%;top:3px;right:7px;color:#dedede}.hour-counter-mini[_ngcontent-%COMP%]{padding:0!important;position:absolute;z-index:1000;font-size:50%!important;top:-8px!important;right:1px;color:#dedede}.hour-container[_ngcontent-%COMP%]{color:#eee;background:#b7860f;text-align:center;border-radius:4px}.hour-container[_ngcontent-%COMP%]   .hour[_ngcontent-%COMP%]:hover:not(.currentValue){filter:brightness(120%);border:0px solid black}.hour-container[_ngcontent-%COMP%]   .hour[_ngcontent-%COMP%]{cursor:pointer;background:#b7860f;border-radius:4px;font-size:3.5em;border:0px solid blue;width:100%;line-height:1;padding:6px}.hour-container[_ngcontent-%COMP%]   .hour-parts[_ngcontent-%COMP%]{font-size:1.5em;padding-top:10px}.hour-container[_ngcontent-%COMP%]   .hour-parts[_ngcontent-%COMP%]   .hour-part[_ngcontent-%COMP%]{background:#b7860f;cursor:pointer;border:0px solid red;border-radius:4px}.hour-container[_ngcontent-%COMP%]   .hour-parts[_ngcontent-%COMP%]   .hour-part[_ngcontent-%COMP%]:not(.no-hover):hover{filter:brightness(120%)}.text[_ngcontent-%COMP%]{font-size:2.5em}"]});let t=e;return t})()});function _It(t,e){if(t&1){let n=re();h(0,"nxt-time-button",12),F("buttonClick",function(r){V(n);let s=w(2);return B(s.buttonClicked(r))}),p()}if(t&2){let n=e.$implicit,i=w(2);b("hourCounter",i.hourCounter[n.text?n:n.toString()])("hour",n.text?n:n.toString())("value",i.currentValue)}}function CIt(t,e){if(t&1&&(h(0,"div",10),W(1,_It,1,3,"nxt-time-button",11),p()),t&2){let n=e.$implicit;g(),b("ngForOf",n)}}var yIt,WFe,UFe=Q(()=>{Zh();ji();jo();ha();GFe();ri();Vt();ls();me();ji();Vt();yIt=["titleDiv"];WFe=(()=>{let e=class e{constructor(i,r){this.dialogRef=i,this.data=r,this.showHourCounter=!1,this.startHour=0,this.hourCounter={},this.buttonRows=r.buttonRows,this.title=r.title,this.text=r.text,this.textField=r.textField,this.currentValue=r.value,this.showHourCounter=r.showHourCounter,this.startHour=parseInt(this.buttonRows[0][0].toString(),10)}ngOnInit(){this.hourCounter={};for(let i of this.buttonRows)for(let r of i)typeof r=="string"?this.hourCounter[r]=this.getHourCounters(r):this.hourCounter[r.text]=this.getHourCounters(r)}buttonClicked(i){this.dialogRef.close(i)}cancel(){this.dialogRef.close()}getHourCounters(i){let r=parseInt(i.toString(),10);if(r===0&&(r=24),this.showHourCounter&&Es.isNumberAndNotNaN(r-this.data.hourCounterStart)){let s=r-this.data.hourCounterStart,o={full:s*Qt.DURATION_1HOUR,hourCounter15:(s+.25)*Qt.DURATION_1HOUR,hourCounter30:(s+.5)*Qt.DURATION_1HOUR,hourCounter45:(s+.75)*Qt.DURATION_1HOUR};return o.full<0&&(o.full+=Qt.DURATION_1DAY),o.hourCounter15<0&&(o.hourCounter15+=Qt.DURATION_1DAY),o.hourCounter30<0&&(o.hourCounter30+=Qt.DURATION_1DAY),o.hourCounter45<0&&(o.hourCounter45+=Qt.DURATION_1DAY),o}}ngOnChanges(i){debugger}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Ou))},e.\u0275cmp=_e({type:e,selectors:[["nxt-time-chooser"]],viewQuery:function(r,s){if(r&1&&ei(yIt,5),r&2){let o;Pt(o=Rt())&&(s.titleDivElem=o.first)}},standalone:!0,features:[yn,xe],decls:14,vars:5,consts:[["titleDiv",""],[1,"flex","flex-col"],[1,"flex","flex-row","justify-end"],[3,"click"],[1,"flex","flex-col","outer-container"],["fxFlex","100%"],[1,"title"],[1,"text"],[3,"innerHTML"],["fxLayout","row","fxLayoutAlign","space-evenly",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","space-evenly"],["class","item","fxFlex","25%",3,"hourCounter","hour","value","buttonClick",4,"ngFor","ngForOf"],["fxFlex","25%",1,"item",3,"buttonClick","hourCounter","hour","value"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"nxt-button-icon",3),F("click",function(){return V(o),B(s.cancel())}),y(3,"close"),p()(),h(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",null,0),y(9),p()(),h(10,"div",7),ee(11,"div",8),Ce(12,"safeHtml"),p()(),W(13,CIt,2,1,"div",9),p()()}r&2&&(g(9),ye(s.title),g(2),b("innerHTML",tt(12,3,s.text),Pi),g(2),b("ngForOf",s.buttonRows))},dependencies:[At,Yt,oi,qi,Hi,HFe,Or,an],styles:[".outer-container[_ngcontent-%COMP%]{width:100%;border:0px solid blue;font-family:Google Sans;height:100%}.outer-container[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{margin:2vh;font-size:2.5em;text-align:center;color:#bbb}.outer-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{margin:1vh;font-size:1.5em;text-align:center;color:#bbb}.outer-container[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{padding:.5em;border:0px solid green}"]});let t=e;return t})()});var nY,jFe=Q(()=>{nY=class{constructor(e,n){this.name=e,this.imageIndex=n}}});function xIt(t,e){t&1&&(h(0,"div",7),ee(1,"div",8),p())}function bIt(t,e){if(t&1){let n=re();h(0,"button",9),F("click",function(){V(n);let r=w();return B(r.rotateCounterClockwise())}),ee(1,"span"),p()}if(t&2){let n=w();jr(n.config.btnClass),g(),jr(n.config.btnIcons.rotateCounterClockwise)}}function wIt(t,e){if(t&1){let n=re();h(0,"button",9),F("click",function(){V(n);let r=w();return B(r.rotateClockwise())}),ee(1,"span"),p()}if(t&2){let n=w();jr(n.config.btnClass),g(),jr(n.config.btnIcons.rotateClockwise)}}function SIt(t,e){if(t&1){let n=re();h(0,"button",9),F("click",function(){V(n);let r=w();return B(r.zoomOut())}),ee(1,"span"),p()}if(t&2){let n=w();jr(n.config.btnClass),g(),jr(n.config.btnIcons.zoomOut)}}function TIt(t,e){if(t&1){let n=re();h(0,"button",9),F("click",function(){V(n);let r=w();return B(r.zoomIn())}),ee(1,"span"),p()}if(t&2){let n=w();jr(n.config.btnClass),g(),jr(n.config.btnIcons.zoomIn)}}function DIt(t,e){if(t&1){let n=re();h(0,"button",9),F("click",function(){let r=V(n).$implicit,s=w();return B(s.fireCustomEvent(r.name,s.index))}),ee(1,"span"),p()}if(t&2){let n=e.$implicit,i=w();jr(i.config.btnClass),g(),jr(n.icon)}}function EIt(t,e){if(t&1){let n=re();h(0,"button",10),F("click",function(){V(n);let r=w();return B(r.toggleFullscreen())}),ee(1,"span"),p()}if(t&2){let n=w();jr(n.config.btnClass),g(),jr(n.config.btnIcons.fullscreen)}}function MIt(t,e){if(t&1){let n=re();h(0,"div",11)(1,"button",12),F("click",function(){V(n);let r=w();return B(r.prevImage())}),ee(2,"span"),p(),h(3,"button",12),F("click",function(){V(n);let r=w();return B(r.nextImage())}),ee(4,"span"),p()()}if(t&2){let n=w();g(),jr(n.config.btnClass),b("disabled",n.index===0),g(),jr(n.config.btnIcons.prev),g(),jr(n.config.btnClass),b("disabled",n.index===n.src.length-1),g(),jr(n.config.btnIcons.next)}}var kIt,rY,Tfe=Q(()=>{me();jFe();An();ri();me();An();kIt={btnClass:"default",zoomFactor:.1,containerBackgroundColor:"#ccc",wheelZoom:!1,allowFullscreen:!0,allowKeyboardNavigation:!0,btnShow:{zoomIn:!0,zoomOut:!0,rotateClockwise:!0,rotateCounterClockwise:!0,next:!0,prev:!0},btnIcons:{zoomIn:"fa fa-plus",zoomOut:"fa fa-minus",rotateClockwise:"fa fa-repeat",rotateCounterClockwise:"fa fa-undo",next:"fa fa-arrow-right",prev:"fa fa-arrow-left",fullscreen:"fa fa-arrows-alt"}},rY=(()=>{let e=class e{constructor(i){this.moduleConfig=i,this.index=0,this.indexChange=new nt,this.configChange=new nt,this.customEvent=new nt,this.style={transform:""},this.fullscreen=!1,this.loading=!0,this.scale=1,this.rotation=0,this.translateX=0,this.translateY=0,this.hovered=!1}ngOnInit(){let i=this.mergeConfig(kIt,this.moduleConfig);this.config=this.mergeConfig(i,this.config),this.triggerConfigBinding()}nextImage(i){this.canNavigate(i)&&this.index<this.src.length-1&&(this.loading=!0,this.index++,this.triggerIndexBinding(),this.reset())}prevImage(i){this.canNavigate(i)&&this.index>0&&(this.loading=!0,this.index--,this.triggerIndexBinding(),this.reset())}zoomIn(){this.scale*=1+this.config.zoomFactor,this.updateStyle()}zoomOut(){this.scale>this.config.zoomFactor&&(this.scale/=1+this.config.zoomFactor),this.updateStyle()}scrollZoom(i){if(this.config.wheelZoom)return i.deltaY>0?this.zoomOut():this.zoomIn(),!1}rotateClockwise(){this.rotation+=90,this.updateStyle()}rotateCounterClockwise(){this.rotation-=90,this.updateStyle()}onLoad(){this.loading=!1}onLoadStart(){this.loading=!0}onDragOver(i){this.translateX+=i.clientX-this.prevX,this.translateY+=i.clientY-this.prevY,this.prevX=i.clientX,this.prevY=i.clientY,this.updateStyle()}onDragStart(i){i.dataTransfer&&i.dataTransfer.setDragImage&&i.dataTransfer.setDragImage(i.target.nextElementSibling,0,0),this.prevX=i.clientX,this.prevY=i.clientY}toggleFullscreen(){this.fullscreen=!this.fullscreen,this.fullscreen||this.reset()}triggerIndexBinding(){this.indexChange.emit(this.index)}triggerConfigBinding(){this.configChange.next(this.config)}fireCustomEvent(i,r){this.customEvent.emit(new nY(i,r))}reset(){this.scale=1,this.rotation=0,this.translateX=0,this.translateY=0,this.updateStyle()}onMouseOver(){this.hovered=!0}onMouseLeave(){this.hovered=!1}canNavigate(i){return i==null||this.config.allowKeyboardNavigation&&this.hovered}updateStyle(){this.style={transform:`translate(${this.translateX}px, ${this.translateY}px) rotate(${this.rotation}deg) scale(${this.scale})`}}mergeConfig(i,r){let s=ve({},i);return r&&(s=ve(ve({},i),r),r.btnIcons&&(s.btnIcons=ve(ve({},i.btnIcons),r.btnIcons))),s}};e.\u0275fac=function(r){return new(r||e)(R("config",8))},e.\u0275cmp=_e({type:e,selectors:[["ngx-image-viewer"]],hostBindings:function(r,s){r&1&&F("keyup.ArrowRight",function(a){return s.nextImage(a)},!1,vy)("keyup.ArrowLeft",function(a){return s.prevImage(a)},!1,vy)("mouseover",function(){return s.onMouseOver()})("mouseleave",function(){return s.onMouseLeave()})},inputs:{src:"src",index:"index",config:"config"},outputs:{indexChange:"indexChange",configChange:"configChange",customEvent:"customEvent"},standalone:!0,features:[xe],decls:11,vars:12,consts:[[1,"img-container",3,"wheel","dragover"],[3,"dragstart","load","loadstart","src","ngStyle"],["class","spinner-container",4,"ngIf"],["type","button",3,"class","click",4,"ngIf"],["type","button",3,"class","click",4,"ngFor","ngForOf"],["type","button","id","ngx-fs-btn",3,"class","click",4,"ngIf"],["class","nav-button-container",4,"ngIf"],[1,"spinner-container"],[1,"spinner"],["type","button",3,"click"],["type","button","id","ngx-fs-btn",3,"click"],[1,"nav-button-container"],["type","button",3,"click","disabled"]],template:function(r,s){r&1&&(h(0,"div",0),F("wheel",function(a){return s.scrollZoom(a)})("dragover",function(a){return s.onDragOver(a)}),h(1,"img",1),F("dragstart",function(a){return s.onDragStart(a)})("load",function(){return s.onLoad()})("loadstart",function(){return s.onLoadStart()}),p(),ee(2,"div"),W(3,xIt,2,0,"div",2)(4,bIt,2,4,"button",3)(5,wIt,2,4,"button",3)(6,SIt,2,4,"button",3)(7,TIt,2,4,"button",3)(8,DIt,2,4,"button",4)(9,EIt,2,4,"button",5)(10,MIt,5,10,"div",6),p()),r&2&&(mo("background-color",s.config.containerBackgroundColor),g(),b("src",s.src[s.index],Ur)("ngStyle",s.style),g(2),b("ngIf",s.loading),g(),b("ngIf",s.config.btnShow.rotateCounterClockwise),g(),b("ngIf",s.config.btnShow.rotateClockwise),g(),b("ngIf",s.config.btnShow.zoomOut),g(),b("ngIf",s.config.btnShow.zoomIn),g(),b("ngForOf",s.config.customBtns),g(),b("ngIf",s.config.allowFullscreen),g(),b("ngIf",s.src.length>1))},dependencies:[rr,Dn,rs,Ct,Hi],styles:[".img-container[_ngcontent-%COMP%]{height:100%;width:100%;overflow:hidden;position:relative}.img-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{z-index:2;margin:0 auto;display:block;max-width:100%;max-height:100%}.img-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{z-index:99;position:absolute;right:15px}.img-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(:disabled){cursor:pointer}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(1):not(#ngx-fs-btn){bottom:15px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(2):not(#ngx-fs-btn){bottom:65px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(3):not(#ngx-fs-btn){bottom:115px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(4):not(#ngx-fs-btn){bottom:165px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(5):not(#ngx-fs-btn){bottom:215px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(6):not(#ngx-fs-btn){bottom:265px}.img-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:nth-of-type(7):not(#ngx-fs-btn){bottom:315px}#ngx-fs-btn[_ngcontent-%COMP%]{top:15px}button.default[_ngcontent-%COMP%]{height:40px;width:40px;border:1px solid #555;border-radius:50%;background-color:#fff;opacity:.7;transition:opacity .2s}button.default[_ngcontent-%COMP%]:hover{opacity:1}button.default[_ngcontent-%COMP%]:disabled{opacity:.25}.nav-button-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{position:relative;right:0;margin:0 10px}.nav-button-container[_ngcontent-%COMP%]{text-align:center;position:absolute;z-index:98;bottom:10px;left:0;right:0}.spinner-container[_ngcontent-%COMP%]{position:absolute;inset:0;width:60px;height:60px;margin:auto;padding:10px;background-color:#0006;border-radius:25%}.spinner[_ngcontent-%COMP%]{border-width:7px;border-style:solid;border-color:#ccc;border-bottom-color:#222;border-radius:50%;height:100%;width:100%;box-sizing:border-box;-webkit-animation:_ngcontent-%COMP%_rotation 2s linear infinite;-moz-animation:rotation 2s linear infinite;-o-animation:rotation 2s linear infinite;animation:_ngcontent-%COMP%_rotation 2s linear infinite}@keyframes _ngcontent-%COMP%_rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(359deg)}}@-webkit-keyframes _ngcontent-%COMP%_rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(359deg)}}@-moz-keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(359deg)}}@-o-keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(359deg)}}"]});let t=e;return t})()});var $Fe,KFe=Q(()=>{Tfe();ls();Vt();me();ji();Vt();$Fe=(()=>{let e=class e{constructor(i){this.dialogRef=i,this.imageViewerConfig={btnClass:"image-viewer-button",wheelZoom:!0,allowFullscreen:!1,containerBackgroundColor:"#424242"}}ngOnInit(){}cancelButtonClicked(){this.dialogRef.close()}delete(){this.dialogRef.close({deleteIndex:this.imageIndex})}};e.\u0275fac=function(r){return new(r||e)(R(Gt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-image-viewer"]],standalone:!0,features:[xe],decls:6,vars:3,consts:[["fxLayout","column",1,"flex",2,"border","0px solid blue","overflow","hidden","width","100%","height","100%"],[2,"height","50px","z-index","999"],[1,"dialog-close-button",3,"click"],[1,"flex","w-full","h-full"],[1,"flex","w-full","h-full",3,"src","index","config"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"nxt-button-icon",2),F("click",function(){return s.dialogRef.close()}),y(3,"close"),p()(),h(4,"div",3),ee(5,"ngx-image-viewer",4),p()()),r&2&&(g(5),b("src",s.imagesSrc)("index",0)("config",s.imageViewerConfig))},dependencies:[At,Yt,an,rY],styles:["[_nghost-%COMP%]{display:flex;height:100%;width:100%;overflow:hidden;border:0 solid yellow}[_nghost-%COMP%]     nxt-dialog ngx-image-viewer img{max-height:90vh!important;max-width:90vw!important}[_nghost-%COMP%]     nxt-dialog ngx-image-viewer .image-viewer-button{color:#b7860f!important;border-radius:50%;border:none;width:32px;height:32px;background-color:#fff}[_nghost-%COMP%]     nxt-dialog ngx-image-viewer .image-viewer-button[disabled]{color:#a2a2a2!important}"]});let t=e;return t})()});var YFe,wc,Ov=Q(()=>{kl();Zh();YFe=Gs(Q9()),wc=class{static removeFromArray(e,n){return e.filter(i=>i!==n)}static unique(e){return e.filter((n,i,r)=>r.indexOf(n)===i)}static uniqueFnNew(e,n){return YFe.default.unionBy(e,n)}static checkSameString(e,n){if(e.length!==n.length)return!1;for(let i of e)if(n.indexOf(i)===-1)return!1;for(let i of n)if(e.indexOf(i)===-1)return!1;return!0}static checkSame(e,n){if(e.length!==n.length)return!1;for(let i of e)if(n.indexOf(i)===-1)return!1;return!0}static flatten(e){return[].concat(...e)}static sortRandomByIndicator(e,n,i){let r=Math.max(...e.map(o=>Es.isNumber(o._sortValue)?o._sortValue:0))+1;for(let[o,a]of e.entries())Es.isNumber(a._sortValue)||(a._sortValue=fn.randomFromBasedOn(a[n].toString()+"_"+i.toString(),r,100));return e.sortNumber("_sortValue")}static test(){let e=[1,1,2].unique()}static splitByMaxLength(e,n){let i=[];for(let r=0;r<e.length;r+=n){let s=e.slice(r,r+n);i.push(s)}return i}static sum(e,n){return e.reduce((i,r)=>i+r[n],0)}};Object.defineProperty(Array.prototype,"unique",{configurable:!0,writable:!0,value(t){return wc.unique(this)}});Object.defineProperty(Array.prototype,"sum",{configurable:!0,writable:!0,value(t){return wc.sum(this,t)}});setTimeout(()=>{let t=[];for(let e in[])t.push(e);if(t.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+t.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.")},2e3)});function RIt(t,e){t&1&&(h(0,"span",10),$p(),h(1,"svg",12),ee(2,"path",13),p(),h(3,"svg",14),ee(4,"path",15),p()())}var AIt,PIt,FIt,LIt,sY,OIt,sI,qFe,oY=Q(()=>{me();me();qn();Xh();bl();AIt=["switch"],PIt=["*"];FIt=new Ri("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),LIt={provide:Dh,useExisting:_c(()=>sI),multi:!0},sY=class{constructor(e,n){this.source=e,this.checked=n}},OIt=0,sI=(()=>{let e=class e{_createChangeEvent(i){return new sY(this,i)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(i){this._checked=i,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(i,r,s,o,a,l){this._elementRef=i,this._focusMonitor=r,this._changeDetectorRef=s,this.defaults=a,this._onChange=c=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new nt,this.toggleChange=new nt,this.tabIndex=parseInt(o)||0,this.color=a.color||"accent",this._noopAnimations=l==="NoopAnimations",this.id=this._uniqueId=`mat-mdc-slide-toggle-${++OIt}`,this.hideIcon=a.hideIcon??!1,this.disabledInteractive=a.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(i=>{i==="keyboard"||i==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):i||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(i){i.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(i){this.checked=!!i}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}validate(i){return this.required&&i.value!==!0?{required:!0}:null}registerOnValidatorChange(i){this._validatorOnChange=i}setDisabledState(i){this.disabled=i,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new sY(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(qp),R(Kt),wp("tabindex"),R(FIt),R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(r,s){if(r&1&&ei(AIt,5),r&2){let o;Pt(o=Rt())&&(s._switchElement=o.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(r,s){r&2&&(Kp("id",s.id),Bn("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),jr(s.color?"mat-"+s.color:""),ki("mat-mdc-slide-toggle-focused",s._focused)("mat-mdc-slide-toggle-checked",s.checked)("_mat-animation-noopable",s._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",mn],color:"color",disabled:[2,"disabled","disabled",mn],disableRipple:[2,"disableRipple","disableRipple",mn],tabIndex:[2,"tabIndex","tabIndex",i=>i==null?0:xc(i)],checked:[2,"checked","checked",mn],hideIcon:[2,"hideIcon","hideIcon",mn],disabledInteractive:[2,"disabledInteractive","disabledInteractive",mn]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[as([LIt,{provide:Ev,useExisting:e,multi:!0}]),Bs,yn,xe],ngContentSelectors:PIt,decls:13,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"div",1)(1,"button",2,0),F("click",function(){return V(o),B(s._handleClick())}),ee(3,"span",3),h(4,"span",4)(5,"span",5)(6,"span",6),ee(7,"span",7),p(),h(8,"span",8),ee(9,"span",9),p(),W(10,RIt,5,0,"span",10),p()()(),h(11,"label",11),F("click",function(l){return V(o),B(l.stopPropagation())}),Ln(12),p()()}if(r&2){let o=pr(2);b("labelPosition",s.labelPosition),g(),ki("mdc-switch--selected",s.checked)("mdc-switch--unselected",!s.checked)("mdc-switch--checked",s.checked)("mdc-switch--disabled",s.disabled)("mat-mdc-slide-toggle-disabled-interactive",s.disabledInteractive),b("tabIndex",s.disabled&&!s.disabledInteractive?-1:s.tabIndex)("disabled",s.disabled&&!s.disabledInteractive),Bn("id",s.buttonId)("name",s.name)("aria-label",s.ariaLabel)("aria-labelledby",s._getAriaLabelledBy())("aria-describedby",s.ariaDescribedby)("aria-required",s.required||null)("aria-checked",s.checked)("aria-disabled",s.disabled&&s.disabledInteractive?"true":null),g(8),b("matRippleTrigger",o)("matRippleDisabled",s.disableRipple||s.disabled)("matRippleCentered",!0),g(),Je(s.hideIcon?-1:10),g(),b("for",s.buttonId),Bn("id",s._labelId)}},dependencies:[ym,wk],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height);border-radius:var(--mdc-switch-track-shape, var(--mat-app-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color, var(--mat-app-outline))}.cdk-high-contrast-active .mdc-switch__track::before,.cdk-high-contrast-active .mdc-switch__track::after{border-color:currentColor}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width);border-color:var(--mat-switch-selected-track-outline-color)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color, var(--mat-app-on-surface))}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color, var(--mat-app-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, var(--mat-app-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, var(--mat-app-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, var(--mat-app-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, var(--mat-app-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color, var(--mat-app-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, var(--mat-app-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, var(--mat-app-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, var(--mat-app-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, var(--mat-app-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape, var(--mat-app-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size);margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size);margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}.cdk-high-contrast-active .mdc-switch__handle::before,.cdk-high-contrast-active .mdc-switch__handle::after{border-color:currentColor}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mat-app-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, var(--mat-app-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, var(--mat-app-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, var(--mat-app-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, var(--mat-app-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, var(--mat-app-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, var(--mat-app-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, var(--mat-app-on-surface))}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size);height:var(--mdc-switch-state-layer-size)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color, var(--mat-app-on-surface));opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color, var(--mat-app-primary));opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size);fill:var(--mdc-switch-unselected-icon-color, var(--mat-app-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mat-app-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size);fill:var(--mdc-switch-selected-icon-color, var(--mat-app-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mat-app-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-switch-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-switch-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-switch-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-switch-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-switch-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0});let t=e;return t})(),qFe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[sI,zr,zr]});let t=e;return t})()});function BIt(t,e){if(t&1){let n=re();h(0,"div",5),F("click",function(){V(n);let r=w();return B(r.textClicked())}),y(1),p()}if(t&2){let n=w();g(),ye(n.leftText)}}function zIt(t,e){t&1&&(vs(0),Ln(1),ys())}function HIt(t,e){if(t&1&&(ee(0,"div",6),Ce(1,"safeHtml")),t&2){let n=w();b("innerHTML",tt(1,1,n.placeholder),Pi)}}var NIt,VIt,Nn,oo=Q(()=>{me();Mv();qn();oY();An();ri();Vt();ha();me();Vt();An();qn();NIt=["*"],VIt=t=>({"no-color-change":t});Nn=(()=>{let e=class e extends Xp{set value(i){this.nxtFormControl.setValue(!!i)}constructor(){super(),this.direction="row",this.valueChange=new nt}ngOnChanges(i){this.placeholder||(this.placeholder=this.nxtFormControl.name),this.disabled?this.nxtFormControl.disable():this.nxtFormControl.enable()}ngOnInit(){this.nxtFormControl.name}ngAfterContentInit(){}ngOnDestroy(){}textClicked(){this.disabled||this.nxtFormControl.setValue(!this.nxtFormControl.value)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-slide-toggle"]],inputs:{disabled:"disabled",placeholder:"placeholder",direction:"direction",leftText:"leftText",noColorChange:"noColorChange",value:[2,"value","value",mn]},outputs:{valueChange:"valueChange"},standalone:!0,features:[Bs,et,yn,xe],ngContentSelectors:NIt,decls:5,vars:8,consts:[["fxLayoutAlign","center center",1,"nxt-slide-toggle",3,"fxLayout","ngClass"],["class","none-selection mouse-pointer no-wrap",3,"click",4,"ngIf"],["color","primary",3,"change","formControl"],[4,"ngIf"],["class","pl-1",3,"innerHTML",4,"ngIf"],[1,"none-selection","mouse-pointer","no-wrap",3,"click"],[1,"pl-1",3,"innerHTML"]],template:function(r,s){r&1&&(gr(),h(0,"div",0),W(1,BIt,2,1,"div",1),h(2,"mat-slide-toggle",2),F("change",function(a){return s.valueChange.emit(a.checked)}),W(3,zIt,2,0,"ng-container",3)(4,HIt,2,3,"div",4),p()()),r&2&&(b("fxLayout",s.direction)("ngClass",sn(6,VIt,s.noColorChange)),g(),b("ngIf",s.leftText),g(),b("formControl",s.nxtFormControl),g(),b("ngIf",!s.placeholder),g(),b("ngIf",s.placeholder))},dependencies:[At,Yt,oi,_s,Dn,No,Ct,sI,ko,Ko,Ia,$c,Or],styles:["[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]     .mdc-switch__icons{display:none}[_nghost-%COMP%]     .mdc-switch__ripple{display:none}[_nghost-%COMP%]     .nxt-slide-toggle .mdc-switch--selected .mdc-switch__handle:before{display:none}[_nghost-%COMP%]     .nxt-slide-toggle .mdc-switch--selected .mdc-switch__handle:after{background-color:#b7860f!important}[_nghost-%COMP%]     .nxt-slide-toggle .mdc-switch--selected .mdc-switch__track:after{background-color:#775606!important}[_nghost-%COMP%]     .nxt-slide-toggle .mdc-switch--unselected .mdc-switch__handle:before{display:none}[_nghost-%COMP%]     .nxt-slide-toggle .mdc-switch--unselected .mdc-switch__handle:after{background-color:#7a7a7a!important}[_nghost-%COMP%]     .nxt-slide-toggle .mdc-switch--unselected .mdc-switch__track:after{background-color:#5a5a5a!important}[_nghost-%COMP%]     .nxt-slide-toggle .mdc-switch--unselected .mdc-switch__track:before{background-color:#5a5a5a!important}[_nghost-%COMP%]     .nxt-slide-toggle label{color:#ccc}[_nghost-%COMP%]     .nxt-slide-toggle.no-color-change .mdc-switch--unselected .mdc-switch__handle:before{display:none}[_nghost-%COMP%]     .nxt-slide-toggle.no-color-change .mdc-switch--unselected .mdc-switch__handle:after{background-color:#b7860f!important}[_nghost-%COMP%]     .nxt-slide-toggle.no-color-change .mdc-switch--unselected .mdc-switch__track:after{background-color:#775606!important}[_nghost-%COMP%]     .nxt-slide-toggle.no-color-change .mdc-switch--unselected .mdc-switch__track:before{background-color:#775606!important}"]});let t=e;return t})()});function UIt(t,e){if(t&1){let n=re();h(0,"div")(1,"mat-icon",4),F("click",function(){V(n);let r=w();return B(r.clear())}),y(2,"clear"),p()()}}var GIt,WIt,cf,Ly=Q(()=>{me();Mv();Ja();qn();Wb();og();An();ri();Ay();me();Ci();An();qn();GIt=(t,e)=>({"bottom-no-padding":t,"no-padding":e}),WIt=t=>({width:t});cf=(()=>{let e=class e extends Xp{set value(i){this.nxtFormControl.setValue(i,{emitEvent:!1,onlySelf:!0})}constructor(i){super(),this.dialogService=i,this.readonly=!1,this.width="50px",this.valueChange=new nt,this.showClearButton=!1,this.bottomNoPadding=!1,this.noPadding=!1}ngOnInit(){}inputClick(){return O(this,null,function*(){if(this.readonly)return;let i=this.text;this.getText&&(i=this.getText()),!i&&this.nxtFormControl.value&&(i="Aktuell: "+this.nxtFormControl.value+" Uhr");let r=yield this.dialogService.showTimeChooser(this.nxtFormControl.value,this.title||this.placeholder||this.nxtFormControl.name,i,this.minTime,this.maxTime,this.showHourCounter);r&&(this.nxtFormControl.setValue(r),this.valueChange.emit(r))})}clear(){this.nxtFormControl.setValue(""),this.valueChange.emit("")}};e.\u0275fac=function(r){return new(r||e)(R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-time-picker"]],inputs:{title:"title",text:"text",getText:"getText",readonly:"readonly",minTime:"minTime",maxTime:"maxTime",showHourCounter:"showHourCounter",width:"width",placeholder:"placeholder",showClearButton:"showClearButton",bottomNoPadding:"bottomNoPadding",noPadding:"noPadding",value:"value"},outputs:{valueChange:"valueChange"},standalone:!0,features:[et,xe],decls:6,vars:13,consts:[[3,"nxtFormControl","width","ngClass"],[1,"mat-form-field-full-width"],["matInput","","readonly","",3,"click","readOnly","formControl","ngStyle"],[4,"ngIf"],[3,"click"]],template:function(r,s){r&1&&(h(0,"nxt-form-field-wrapper",0)(1,"mat-form-field",1)(2,"mat-label"),y(3),p(),h(4,"input",2),F("click",function(){return s.inputClick()}),p()(),W(5,UIt,3,0,"div",3),p()),r&2&&(b("nxtFormControl",s.nxtFormControl)("width",s.width)("ngClass",bs(8,GIt,s.noPadding||s.bottomNoPadding,s.noPadding)),g(3),ye(s.placeholder||s.nxtFormControl.name),g(),b("readOnly",s.readonly)("formControl",s.nxtFormControl)("ngStyle",sn(11,WIt,s.width)),g(),b("ngIf",s.showClearButton))},dependencies:[O1,_s,Dn,No,rs,M0,E0,Iy,ko,mu,Ko,Ia,$c,rr,Ct,Zr],styles:["[_nghost-%COMP%]{width:fit-content}[_nghost-%COMP%]  .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:12px!important}[_nghost-%COMP%]  .mdc-text-field--filled .mdc-floating-label--float-above{transform:translate(12.5%,-116%) scale(.75)!important}[_nghost-%COMP%]  .mat-mdc-form-field-infix{padding:0!important;display:flex;justify-content:center;align-items:center;width:100%!important}[_nghost-%COMP%]  input{text-align:center}[_nghost-%COMP%]  .mat-form-field-infix{text-align:center}[_nghost-%COMP%]  .bottom-no-padding{display:flex;border:0 solid red}[_nghost-%COMP%]  .bottom-no-padding .mat-mdc-form-field-subscript-wrapper{display:none}[_nghost-%COMP%]  .bottom-no-padding .mat-form-field-infix{border:none}[_nghost-%COMP%]  .bottom-no-padding .mat-form-field-wrapper{padding-bottom:0}"]});let t=e;return t})()});function $It(t,e){if(t&1&&(h(0,"div",10),y(1),p()),t&2){let n=w(2);g(),ye(n.options.title)}}function KIt(t,e){if(t&1&&(ee(0,"div",11),Ce(1,"safeHtml")),t&2){let n=w(2);b("innerHTML",tt(1,1,n.options.message),Pi)}}function YIt(t,e){if(t&1&&(h(0,"div"),ee(1,"nxt-time-picker",12),p()),t&2){let n=w(2);g(),b("minTime",n.options.isTimeParams.minTime)("maxTime",n.options.isTimeParams.maxTime)("nxtFormControl",n.inputFormControl)}}function qIt(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-input",13),F("enter",function(){V(n);let r=w(2);return B(r.okClicked())}),p()()}if(t&2){let n=w(2);g(),b("isMoney",n.options.isMoney)("isNumber",n.options.isNumber)("nxtFormControl",n.inputFormControl)("placeholder",n.options.placeholder)("isPercent",n.options.isPercent)("selectOnInit",n.options.selectPrompt)("type",n.isPassword&&!n.showPassword?"password":"text")}}function ZIt(t,e){if(t&1){let n=re();h(0,"div",14)(1,"nxt-slide-toggle",15),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.showPassword,r)||(s.showPassword=r),B(r)}),y(2,"Passwort anzeigen"),p()()}if(t&2){let n=w(2);g(),qe("value",n.showPassword)}}function XIt(t,e){if(t&1){let n=re();h(0,"nxt-button",8),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.additionalButtonClick(r))}),y(1),p()}if(t&2){let n=e.$implicit;g(),ye(n.text)}}function QIt(t,e){if(t&1){let n=re();h(0,"div",2),W(1,$It,2,1,"div",3)(2,KIt,2,3,"div",4)(3,YIt,2,3,"div",5)(4,qIt,2,7,"div",5)(5,ZIt,3,1,"div",6),h(6,"div",7)(7,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.cancelClicked())}),y(8,"ABBRECHEN"),p(),W(9,XIt,2,1,"nxt-button",9),h(10,"nxt-button",8,0),F("click",function(){V(n);let r=w();return B(r.okClicked())}),y(12),p()()()}if(t&2){let n=w();g(),b("ngIf",n.options.title),g(),b("ngIf",n.options.message),g(),b("ngIf",n.isTime),g(),b("ngIf",n.inputFormControl&&!n.isTime),g(),b("ngIf",n.isPassword),g(4),b("ngForOf",n.options.additionalButtons),g(3),ye(n.okButtonText)}}var jIt,Dfe,ZFe=Q(()=>{Ep();nc();pa();Zh();ji();kl();Zi();Jr();ha();oo();Ly();Vt();ri();me();ji();Vt();jIt=["okButton"];Dfe=(()=>{let e=class e{constructor(i,r){this.dialogRef=i,this.data=r,this.okButtonTextDynamic=!0,this.isPassword=!1,this.isTime=!1,this.showPassword=!1,this.okButtonText="OK"}setOptions(i){this.options=Sr.combineWithDefaultOptions(i,{okButtonText:"OK"}),this.isPassword=i.isPassword;let r=this.options.isNumber||this.options.isMoney||!i.stringCanEmpty,s=[];(r||this.isPassword)&&s.push(ii.requiredAndNotNaN),this.isPassword&&s.push(ii.password),this.inputFormControl=new $t(i.prompt?i.prompt:"",s),this.isPassword&&this.inputFormControl.valueChanges.subscribe(o=>{o?.length>0&&this.inputFormControl.markAsTouched()}),this.inputFormControl.valueChanges.subscribe(o=>{requestAnimationFrame(()=>{this.okButtonTextDynamic&&(this.options.isMoney||this.options.isPercent)&&(Es.isNumberAndNotNaN(o)?this.okButtonText=o.toMoneyString():this.okButtonText=this.options.okButtonText)})}),this.options.okButtonText!=="OK"&&(this.okButtonText=this.options.okButtonText,this.okButtonTextDynamic=!1)}close(){this.inputFormControl.invalid||this.dialogRef.close(this.inputFormControl.value)}okClicked(){this.okButton.focus(),requestAnimationFrame(()=>{this.inputFormControl.invalid?this.inputComponent.focusAndSelect():this.options.isMoney?this.dialogRef.close(fn.roundMoney(this.inputFormControl.value)):this.dialogRef.close(this.inputFormControl.value)})}cancelClicked(){this.dialogRef.close()}additionalButtonClick(i){this.dialogRef.close(i.value)}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Ou))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-input"]],viewQuery:function(r,s){if(r&1&&(ei(jIt,5),ei(Yi,5)),r&2){let o;Pt(o=Rt())&&(s.okButton=o.first),Pt(o=Rt())&&(s.inputComponent=o.first)}},standalone:!0,features:[xe],decls:1,vars:1,consts:[["okButton",""],["fxLayout","column",4,"ngIf"],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","center","class","text-150 pb-3",4,"ngIf"],["style","margin-bottom:24px; margin-top:10px;",3,"innerHTML",4,"ngIf"],[4,"ngIf"],["class","pt-2 pb-4",4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-around"],[3,"click"],[3,"click",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center",1,"text-150","pb-3"],[2,"margin-bottom","24px","margin-top","10px",3,"innerHTML"],[3,"minTime","maxTime","nxtFormControl"],[3,"enter","isMoney","isNumber","nxtFormControl","placeholder","isPercent","selectOnInit","type"],[1,"pt-2","pb-4"],[3,"valueChange","value"]],template:function(r,s){r&1&&W(0,QIt,13,7,"div",1),r&2&&b("ngIf",s.options)},dependencies:[Ct,At,Yt,oi,cf,Yi,Nn,Lt,Hi,Or]});let t=e;return t})()});function eAt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2);g(),Ke(" ",n.requiredError," ")}}function tAt(t,e){t&1&&(h(0,"div"),y(1," ung\xFCltiger Wert "),p())}function iAt(t,e){if(t&1&&(h(0,"mat-error"),W(1,eAt,2,1,"div",5)(2,tAt,2,0,"div",5),p()),t&2){let n=w();g(),b("ngIf",n.nxtFormControl.errors.required),g(),b("ngIf",n.nxtFormControl.errors.validCurrency)}}function nAt(t,e){if(t&1){let n=re();h(0,"mat-icon",7),F("click",function(){V(n);let r=w();return B(r.icon.click())}),y(1),p()}if(t&2){let n=w();b("matTooltip",n.icon.tooltip),g(),ye(n.icon.name)}}var JIt,yu,n1=Q(()=>{me();Mv();jc();ef();Mp();Ja();qn();Wb();An();ri();Vt();og();Ay();me();Vt();An();qn();JIt=t=>({width:t});yu=(()=>{let e=class e extends Xp{constructor(){super(),this.hasFocus=!1,this.type="text",this.rows=4,this.cols=150,this.isPercent=!1,this.isNumber=!1,this.valueChange=new nt,this.enter=new nt,this.google=!1,this.controlName=ua.generate(),this.spellcheck=!0}ngOnInit(){}keyup(i){i.key==="Enter"&&this.enter.observed&&(this.enter.emit(),i.preventDefault(),i.stopPropagation())}insertAtCursor(i){if(this.controlElemRef.nativeElement.selectionStart||this.controlElemRef.nativeElement.selectionStart===0){let r=this.controlElemRef.nativeElement.selectionStart,s=this.controlElemRef.nativeElement.selectionEnd,o=this.controlElemRef.nativeElement.value.substring(0,r)+i+this.controlElemRef.nativeElement.value.substring(s,this.controlElemRef.nativeElement.value.length);this.nxtFormControl.setValue(o)}else debugger}ngAfterContentInit(){setTimeout(()=>{this.nxtFormControl.element=this.controlElemRef.nativeElement;let i="";this.readonly?(this.controlElemRef.nativeElement.setAttribute("readonly","readonly"),i+="cursor: pointer; "):i+="cursor: text; ",this.color&&(this.color.toLowerCase()==="red"&&(this.color=xn.Red),i+="color:"+this.color+" !important;"),i&&this.controlElemRef.nativeElement.setAttribute("style",i),this.valueChangeSubscription=this.nxtFormControl.valueChanges.subscribe(r=>{this.valueChange.emit(r)})})}ngOnDestroy(){this.valueChangeSubscription.unsubscribe()}ngOnChanges(i){i.value&&this.nxtFormControl.setValue(i.value.currentValue),this.placeholder||(this.placeholder=this.nxtFormControl.name)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-textarea"]],inputs:{icon:"icon",color:"color",type:"type",rows:"rows",cols:"cols",value:"value",readonly:"readonly",cellRenderer:"cellRenderer",isPercent:"isPercent",isNumber:"isNumber",isNumberMin:"isNumberMin",placeholder:"placeholder",google:"google",spellcheck:"spellcheck",noPaddingBottom:"noPaddingBottom"},outputs:{valueChange:"valueChange",enter:"enter"},standalone:!0,features:[et,yn,xe],decls:9,vars:14,consts:[["controlElement",""],[1,"flex",3,"nxtFormControl","width"],["fxLayout","column",1,"mat-form-field-full-width",3,"ngStyle"],["fxLayout","row",1,"textarea-wrapper"],["matInput","",3,"keyup","formControl","rows","cols","spellcheck"],[4,"ngIf"],["style","color:#a2a2a2; position:relative; font-size:18px; top:6px; cursor: pointer;",3,"matTooltip","click",4,"ngIf"],[2,"color","#a2a2a2","position","relative","font-size","18px","top","6px","cursor","pointer",3,"click","matTooltip"]],template:function(r,s){if(r&1){let o=re();h(0,"nxt-form-field-wrapper",1)(1,"mat-form-field",2)(2,"mat-label"),y(3),p(),h(4,"div",3)(5,"textarea",4,0),F("keyup",function(l){return V(o),B(s.keyup(l))}),p()(),W(7,iAt,3,2,"mat-error",5),p(),W(8,nAt,2,2,"mat-icon",6),p()}r&2&&(ki("no-padding-bottom",s.noPaddingBottom),b("nxtFormControl",s.nxtFormControl)("width",s.width),g(),b("ngStyle",sn(12,JIt,s.icon?"calc("+s.width+" - 28px)":s.width)),g(2),ye(s.placeholder),g(2),b("formControl",s.nxtFormControl)("rows",s.rows)("cols",s.cols)("spellcheck",s.spellcheck),g(2),b("ngIf",s.nxtFormControl.invalid&&(s.nxtFormControl.dirty||s.nxtFormControl.touched)),g(),b("ngIf",s.icon))},dependencies:[O1,M0,At,Yt,rr,Dn,rs,E0,Iy,ko,mu,Ko,Ia,$c,Ct,ky,Zr,dl],styles:["[_nghost-%COMP%]    {display:flex}[_nghost-%COMP%]     .no-padding-bottom .mat-mdc-form-field-subscript-wrapper{display:none}[_nghost-%COMP%]     .mdc-floating-label{padding-left:10px;padding-top:16px}[_nghost-%COMP%]     .mdc-floating-label.mdc-floating-label--float-above{padding-top:0;padding-left:5px}[_nghost-%COMP%]     .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:18px!important}[_nghost-%COMP%]     .mat-form-field-infix{padding-top:0;border-top:0}.font-color-green[_ngcontent-%COMP%]{color:#0f0!important}.font-color-normal[_ngcontent-%COMP%]{color:#bbb!important}textarea[_ngcontent-%COMP%]{min-height:2em;color:#bbb!important}.textarea-wrapper[_ngcontent-%COMP%]{padding:10px;background-color:#383838}"]});let t=e;return t})()});function rAt(t,e){if(t&1&&(ee(0,"div",6),Ce(1,"safeHtml")),t&2){let n=w();b("innerHTML",tt(1,1,n.message),Pi)}}function sAt(t,e){if(t&1&&(h(0,"div"),ee(1,"nxt-textarea",7),p()),t&2){let n=w();g(),b("placeholder",n.placeholder)("nxtFormControl",n.inputFormControl)("rows",15)("cols",100)}}var Efe,XFe=Q(()=>{Ep();ji();ha();Zi();n1();ri();Vt();nc();me();ji();Vt();Efe=(()=>{let e=class e{constructor(i,r){this.dialogRef=i,this.data=r,this.buttonText="OK",this.cols=50,this.charCounterText=""}setOptions(i){this.placeholder=i.placeholder,this.message=i.message,this.buttonText=i.buttonText||"OK",i.cols&&(this.cols=i.cols),this.inputFormControl=new $t(i.prompt?i.prompt:"",[ii.requiredAndNotNaN]),this.inputFormControl.valueChanges.subscribe(r=>{i.charCounterFn&&(this.charCounterText=i.charCounterFn(r))}),i.charCounterFn&&(this.charCounterText=i.charCounterFn(i.prompt))}close(){this.inputFormControl.invalid||this.dialogRef.close(this.inputFormControl.value)}okClicked(){this.inputFormControl.invalid||this.dialogRef.close(this.inputFormControl.value)}cancelClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Ou))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-input-multiline"]],standalone:!0,features:[xe],decls:10,vars:4,consts:[["fxLayout","column"],["style","margin-bottom:24px; margin-top:10px;",3,"innerHTML",4,"ngIf"],[4,"ngIf"],[2,"padding-left","10px"],["fxLayout","row","fxLayoutAlign","space-around"],[3,"click"],[2,"margin-bottom","24px","margin-top","10px",3,"innerHTML"],[3,"placeholder","nxtFormControl","rows","cols"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,rAt,2,3,"div",1)(2,sAt,2,4,"div",2),h(3,"div",3),y(4),p(),h(5,"div",4)(6,"nxt-button",5),F("click",function(){return s.cancelClicked()}),y(7,"ABBRECHEN"),p(),h(8,"nxt-button",5),F("click",function(){return s.okClicked()}),y(9),p()()()),r&2&&(g(),b("ngIf",s.message),g(),b("ngIf",s.inputFormControl),g(2),ye(s.charCounterText),g(5),ye(s.buttonText))},dependencies:[At,Yt,oi,Ct,yu,Lt,Or]});let t=e;return t})()});function dAt(t,e){if(t&1&&(ee(0,"div",5),Ce(1,"safeHtml")),t&2){let n=w();b("innerHTML",tt(1,1,n.data.title),Pi)}}function uAt(t,e){if(t&1){let n=re();h(0,"nxt-button",6),F("click",function(){V(n);let r=w();return B(r.cancel())}),y(1,"Abbrechen"),p()}}function hAt(t,e){if(t&1){let n=re();h(0,"nxt-button",6),F("click",function(){let r=V(n).$implicit,s=w();return B(s.buttonClick(r))}),ee(1,"div",7),Ce(2,"safeHtml"),p()}if(t&2){let n=e.$implicit;g(),b("innerHTML",tt(2,1,n.text),Pi)}}function pAt(t,e){if(t&1){let n=re();h(0,"nxt-button",6),F("click",function(){V(n);let r=w();return B(r.cancel())}),y(1,"Abbrechen"),p()}}var oAt,aAt,lAt,cAt,QFe,JFe=Q(()=>{ha();Zi();Vt();An();ri();me();ji();An();Vt();oAt=(t,e)=>e.value,aAt=(t,e)=>({textAlign:t,fontSize:e}),lAt=t=>({fontSize:t}),cAt=t=>({"more-button-padding":t});QFe=(()=>{let e=class e{constructor(i){this.dialogRef=i,this.buttonDirection="row"}setData(i){this.data=i,i.fontSize||(i.fontSize="100%"),i.buttonDirection&&(this.buttonDirection=i.buttonDirection)}buttonClick(i){this.data.returnValue?this.dialogRef.close(i.value):this.dialogRef.close(i)}ngOnInit(){}cancel(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-buttons"]],standalone:!0,features:[xe],decls:9,vars:17,consts:[[1,"wrapper"],["class","title-text flex flex-row justify-center",3,"innerHTML",4,"ngIf"],[2,"margin-bottom","24px","margin-top","10px",3,"ngStyle","innerHTML"],[1,"flex","items-center","justify-around","gap-3",3,"fxLayout","ngStyle","ngClass"],[3,"click",4,"ngIf"],[1,"title-text","flex","flex-row","justify-center",3,"innerHTML"],[3,"click"],[3,"innerHTML"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,dAt,2,3,"div",1),ee(2,"div",2),Ce(3,"safeHtml"),h(4,"div",3),W(5,uAt,2,0,"nxt-button",4),Kn(6,hAt,3,3,"nxt-button",null,oAt),W(8,pAt,2,0,"nxt-button",4),p()()),r&2&&(g(),b("ngIf",s.data.title),g(),b("ngStyle",bs(10,aAt,s.data.textAlign,s.data.fontSize))("innerHTML",tt(3,8,s.data.message),Pi),g(2),b("fxLayout",s.buttonDirection)("ngStyle",sn(13,lAt,s.data.fontSize))("ngClass",sn(15,cAt,s.data.fontSize!=="100%")),g(),b("ngIf",s.data.showCancelButton&&s.buttonDirection==="row"),g(),Yn(s.data.buttons),g(2),b("ngIf",s.data.showCancelButton&&s.buttonDirection==="column"))},dependencies:[Ct,rr,Dn,No,rs,At,Yt,_s,Lt,Or],styles:["[_nghost-%COMP%]  .more-button-padding button{padding:32px!important;margin:10px!important}.wrapper[_ngcontent-%COMP%]{padding:5px 15px 0;max-width:80vw}.title-text[_ngcontent-%COMP%]{font-size:24px;padding:12px 0}"]});let t=e;return t})()});function K8(t){return Array.isArray?Array.isArray(t):lLe(t)==="[object Array]"}function fAt(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-mAt?"-0":e}function gAt(t){return t==null?"":fAt(t)}function X_(t){return typeof t=="string"}function oLe(t){return typeof t=="number"}function vAt(t){return t===!0||t===!1||yAt(t)&&lLe(t)=="[object Boolean]"}function aLe(t){return typeof t=="object"}function yAt(t){return aLe(t)&&t!==null}function _4(t){return t!=null}function Mfe(t){return!t.trim().length}function lLe(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function cLe(t){let e=null,n=null,i=null,r=1,s=null;if(X_(t)||K8(t))i=t,e=tLe(t),n=Ife(t);else{if(!eLe.call(t,"name"))throw new Error(bAt("name"));let o=t.name;if(i=o,eLe.call(t,"weight")&&(r=t.weight,r<=0))throw new Error(wAt(o));e=tLe(o),n=Ife(o),s=t.getFn}return{path:e,id:n,weight:r,src:i,getFn:s}}function tLe(t){return K8(t)?t:t.split(".")}function Ife(t){return K8(t)?t.join("."):t}function SAt(t,e){let n=[],i=!1,r=(s,o,a)=>{if(_4(s))if(!o[a])n.push(s);else{let l=o[a],c=s[l];if(!_4(c))return;if(a===o.length-1&&(X_(c)||oLe(c)||vAt(c)))n.push(gAt(c));else if(K8(c)){i=!0;for(let d=0,u=c.length;d<u;d+=1)r(c[d],o,a+1)}else o.length&&r(c,o,a+1)}};return r(t,X_(e)?e.split("."):e,0),i?n:n[0]}function IAt(t=1,e=3){let n=new Map,i=Math.pow(10,e);return{get(r){let s=r.match(kAt).length;if(n.has(s))return n.get(s);let o=1/Math.pow(s,.5*t),a=parseFloat(Math.round(o*i)/i);return n.set(s,a),a},clear(){n.clear()}}}function iLe(t,e,{getFn:n=Ha.getFn,fieldNormWeight:i=Ha.fieldNormWeight}={}){let r=new xV({getFn:n,fieldNormWeight:i});return r.setKeys(t.map(cLe)),r.setSources(e),r.create(),r}function AAt(t,{getFn:e=Ha.getFn,fieldNormWeight:n=Ha.fieldNormWeight}={}){let{keys:i,records:r}=t,s=new xV({getFn:e,fieldNormWeight:n});return s.setKeys(i),s.setIndexRecords(r),s}function aY(t,{errors:e=0,currentLocation:n=0,expectedLocation:i=0,distance:r=Ha.distance,ignoreLocation:s=Ha.ignoreLocation}={}){let o=e/t.length;if(s)return o;let a=Math.abs(i-n);return r?o+a/r:a?1:o}function PAt(t=[],e=Ha.minMatchCharLength){let n=[],i=-1,r=-1,s=0;for(let o=t.length;s<o;s+=1){let a=t[s];a&&i===-1?i=s:!a&&i!==-1&&(r=s-1,r-i+1>=e&&n.push([i,r]),i=-1)}return t[s-1]&&s-i>=e&&n.push([i,s-1]),n}function RAt(t,e,n,{location:i=Ha.location,distance:r=Ha.distance,threshold:s=Ha.threshold,findAllMatches:o=Ha.findAllMatches,minMatchCharLength:a=Ha.minMatchCharLength,includeMatches:l=Ha.includeMatches,ignoreLocation:c=Ha.ignoreLocation}={}){if(e.length>ST)throw new Error(xAt(ST));let d=e.length,u=t.length,m=Math.max(0,Math.min(i,u)),f=s,_=m,x=a>1||l,D=x?Array(u):[],E;for(;(E=t.indexOf(e,_))>-1;){let Y=aY(e,{currentLocation:E,expectedLocation:m,distance:r,ignoreLocation:c});if(f=Math.min(Y,f),_=E+d,x){let X=0;for(;X<d;)D[E+X]=1,X+=1}}_=-1;let M=[],I=1,z=d+u,G=1<<d-1;for(let Y=0;Y<d;Y+=1){let X=0,ne=z;for(;X<ne;)aY(e,{errors:Y,currentLocation:m+ne,expectedLocation:m,distance:r,ignoreLocation:c})<=f?X=ne:z=ne,ne=Math.floor((z-X)/2+X);z=ne;let pe=Math.max(1,m-ne+1),ce=o?u:Math.min(m+ne,u)+d,ie=Array(ce+2);ie[ce+1]=(1<<Y)-1;for(let Se=ce;Se>=pe;Se-=1){let je=Se-1,ze=n[t.charAt(je)];if(x&&(D[je]=+!!ze),ie[Se]=(ie[Se+1]<<1|1)&ze,Y&&(ie[Se]|=(M[Se+1]|M[Se])<<1|1|M[Se+1]),ie[Se]&G&&(I=aY(e,{errors:Y,currentLocation:je,expectedLocation:m,distance:r,ignoreLocation:c}),I<=f)){if(f=I,_=je,_<=m)break;pe=Math.max(1,2*m-_)}}if(aY(e,{errors:Y+1,currentLocation:m,expectedLocation:m,distance:r,ignoreLocation:c})>f)break;M=ie}let A={isMatch:_>=0,score:Math.max(.001,I)};if(x){let Y=PAt(D,a);Y.length?l&&(A.indices=Y):A.isMatch=!1}return A}function FAt(t){let e={};for(let n=0,i=t.length;n<i;n+=1){let r=t.charAt(n);e[r]=(e[r]||0)|1<<i-n-1}return e}function nLe(t,e){let n=t.match(e);return n?n[1]:null}function NAt(t,e={}){return t.split(OAt).map(n=>{let i=n.trim().split(LAt).filter(s=>s&&!!s.trim()),r=[];for(let s=0,o=i.length;s<o;s+=1){let a=i[s],l=!1,c=-1;for(;!l&&++c<rLe;){let d=Nfe[c],u=d.isMultiMatch(a);u&&(r.push(new d(u,e)),l=!0)}if(!l)for(c=-1;++c<rLe;){let d=Nfe[c],u=d.isSingleMatch(a);if(u){r.push(new d(u,e));break}}}return r})}function BAt(...t){Bfe.push(...t)}function zfe(t,e){for(let n=0,i=Bfe.length;n<i;n+=1){let r=Bfe[n];if(r.condition(t,e))return new r(t,e)}return new lY(t,e)}function dLe(t,e,{auto:n=!0}={}){let i=r=>{let s=Object.keys(r),o=zAt(r);if(!o&&s.length>1&&!Gfe(r))return i(sLe(r));if(HAt(r)){let l=o?r[Hfe.PATH]:s[0],c=o?r[Hfe.PATTERN]:r[l];if(!X_(c))throw new Error(CAt(l));let d={keyId:Ife(l),pattern:c};return n&&(d.searcher=zfe(c,e)),d}let a={children:[],operator:s[0]};return s.forEach(l=>{let c=r[l];K8(c)&&c.forEach(d=>{a.children.push(i(d))})}),a};return Gfe(t)||(t=sLe(t)),i(t)}function GAt(t,{ignoreFieldNorm:e=Ha.ignoreFieldNorm}){t.forEach(n=>{let i=1;n.matches.forEach(({key:r,norm:s,score:o})=>{let a=r?r.weight:null;i*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:s))}),n.score=i})}function WAt(t,e){let n=t.matches;e.matches=[],_4(n)&&n.forEach(i=>{if(!_4(i.indices)||!i.indices.length)return;let{indices:r,value:s}=i,o={indices:r,value:s};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function UAt(t,e){e.score=t.score}function jAt(t,e,{includeMatches:n=Ha.includeMatches,includeScore:i=Ha.includeScore}={}){let r=[];return n&&r.push(WAt),i&&r.push(UAt),t.map(s=>{let{idx:o}=s,a={item:e[o],refIndex:o};return r.length&&r.forEach(l=>{l(s,a)}),a})}var mAt,_At,CAt,xAt,bAt,wAt,eLe,kfe,TAt,DAt,EAt,MAt,Ha,kAt,xV,ST,lY,Q_,Afe,Pfe,Rfe,Ffe,Lfe,Ofe,cY,dY,Nfe,rLe,LAt,OAt,VAt,Vfe,Bfe,uY,Hfe,Gfe,zAt,HAt,sLe,Wfe,uLe=Q(()=>{mAt=1/0;_At="Incorrect 'index' type",CAt=t=>`Invalid value for key ${t}`,xAt=t=>`Pattern length exceeds max of ${t}.`,bAt=t=>`Missing ${t} property in key`,wAt=t=>`Property 'weight' in key '${t}' must be a positive integer`,eLe=Object.prototype.hasOwnProperty,kfe=class{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(i=>{let r=cLe(i);this._keys.push(r),this._keyMap[r.id]=r,n+=r.weight}),this._keys.forEach(i=>{i.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};TAt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},DAt={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},EAt={location:0,threshold:.6,distance:100},MAt={useExtendedSearch:!1,getFn:SAt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Ha=ve(ve(ve(ve({},DAt),TAt),EAt),MAt),kAt=/[^ ]+/g;xV=class{constructor({getFn:e=Ha.getFn,fieldNormWeight:n=Ha.fieldNormWeight}={}){this.norm=IAt(n,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((n,i)=>{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,X_(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){let n=this.size();X_(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,i=this.size();n<i;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!_4(e)||Mfe(e))return;let i={v:e,i:n,n:this.norm.get(e)};this.records.push(i)}_addObject(e,n){let i={i:n,$:{}};this.keys.forEach((r,s)=>{let o=r.getFn?r.getFn(e):this.getFn(e,r.path);if(_4(o)){if(K8(o)){let a=[],l=[{nestedArrIndex:-1,value:o}];for(;l.length;){let{nestedArrIndex:c,value:d}=l.pop();if(_4(d))if(X_(d)&&!Mfe(d)){let u={v:d,i:c,n:this.norm.get(d)};a.push(u)}else K8(d)&&d.forEach((u,m)=>{l.push({nestedArrIndex:m,value:u})})}i.$[s]=a}else if(X_(o)&&!Mfe(o)){let a={v:o,n:this.norm.get(o)};i.$[s]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}};ST=32;lY=class{constructor(e,{location:n=Ha.location,threshold:i=Ha.threshold,distance:r=Ha.distance,includeMatches:s=Ha.includeMatches,findAllMatches:o=Ha.findAllMatches,minMatchCharLength:a=Ha.minMatchCharLength,isCaseSensitive:l=Ha.isCaseSensitive,ignoreLocation:c=Ha.ignoreLocation}={}){if(this.options={location:n,threshold:i,distance:r,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c},this.pattern=l?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;let d=(m,f)=>{this.chunks.push({pattern:m,alphabet:FAt(m),startIndex:f})},u=this.pattern.length;if(u>ST){let m=0,f=u%ST,_=u-f;for(;m<_;)d(this.pattern.substr(m,ST),m),m+=ST;if(f){let x=u-ST;d(this.pattern.substr(x),x)}}else d(this.pattern,0)}searchIn(e){let{isCaseSensitive:n,includeMatches:i}=this.options;if(n||(e=e.toLowerCase()),this.pattern===e){let _={isMatch:!0,score:0};return i&&(_.indices=[[0,e.length-1]]),_}let{location:r,distance:s,threshold:o,findAllMatches:a,minMatchCharLength:l,ignoreLocation:c}=this.options,d=[],u=0,m=!1;this.chunks.forEach(({pattern:_,alphabet:x,startIndex:D})=>{let{isMatch:E,score:M,indices:I}=RAt(e,_,x,{location:r+D,distance:s,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});E&&(m=!0),u+=M,E&&I&&(d=[...d,...I])});let f={isMatch:m,score:m?u/this.chunks.length:1};return m&&i&&(f.indices=d),f}},Q_=class{constructor(e){this.pattern=e}static isMultiMatch(e){return nLe(e,this.multiRegex)}static isSingleMatch(e){return nLe(e,this.singleRegex)}search(){}};Afe=class extends Q_{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},Pfe=class extends Q_{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}},Rfe=class extends Q_{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},Ffe=class extends Q_{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}},Lfe=class extends Q_{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},Ofe=class extends Q_{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}},cY=class extends Q_{constructor(e,{location:n=Ha.location,threshold:i=Ha.threshold,distance:r=Ha.distance,includeMatches:s=Ha.includeMatches,findAllMatches:o=Ha.findAllMatches,minMatchCharLength:a=Ha.minMatchCharLength,isCaseSensitive:l=Ha.isCaseSensitive,ignoreLocation:c=Ha.ignoreLocation}={}){super(e),this._bitapSearch=new lY(e,{location:n,threshold:i,distance:r,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},dY=class extends Q_{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,i,r=[],s=this.pattern.length;for(;(i=e.indexOf(this.pattern,n))>-1;)n=i+s,r.push([i,n-1]);let o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}},Nfe=[Afe,dY,Rfe,Ffe,Ofe,Lfe,Pfe,cY],rLe=Nfe.length,LAt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,OAt="|";VAt=new Set([cY.type,dY.type]),Vfe=class{constructor(e,{isCaseSensitive:n=Ha.isCaseSensitive,includeMatches:i=Ha.includeMatches,minMatchCharLength:r=Ha.minMatchCharLength,ignoreLocation:s=Ha.ignoreLocation,findAllMatches:o=Ha.findAllMatches,location:a=Ha.location,threshold:l=Ha.threshold,distance:c=Ha.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:i,minMatchCharLength:r,findAllMatches:o,ignoreLocation:s,location:a,threshold:l,distance:c},this.pattern=n?e:e.toLowerCase(),this.query=NAt(this.pattern,this.options)}static condition(e,n){return n.useExtendedSearch}searchIn(e){let n=this.query;if(!n)return{isMatch:!1,score:1};let{includeMatches:i,isCaseSensitive:r}=this.options;e=r?e:e.toLowerCase();let s=0,o=[],a=0;for(let l=0,c=n.length;l<c;l+=1){let d=n[l];o.length=0,s=0;for(let u=0,m=d.length;u<m;u+=1){let f=d[u],{isMatch:_,indices:x,score:D}=f.search(e);if(_){if(s+=1,a+=D,i){let E=f.constructor.type;VAt.has(E)?o=[...o,...x]:o.push(x)}}else{a=0,s=0,o.length=0;break}}if(s){let u={isMatch:!0,score:a/s};return i&&(u.indices=o),u}}return{isMatch:!1,score:1}}},Bfe=[];uY={AND:"$and",OR:"$or"},Hfe={PATH:"$path",PATTERN:"$val"},Gfe=t=>!!(t[uY.AND]||t[uY.OR]),zAt=t=>!!t[Hfe.PATH],HAt=t=>!K8(t)&&aLe(t)&&!Gfe(t),sLe=t=>({[uY.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});Wfe=(()=>{class t{constructor(n,i={},r){this.options=ve(ve({},Ha),i),this.options.useExtendedSearch,this._keyStore=new kfe(this.options.keys),this.setCollection(n,r)}setCollection(n,i){if(this._docs=n,i&&!(i instanceof xV))throw new Error(_At);this._myIndex=i||iLe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(n){_4(n)&&(this._docs.push(n),this._myIndex.add(n))}remove(n=()=>!1){let i=[];for(let r=0,s=this._docs.length;r<s;r+=1){let o=this._docs[r];n(o,r)&&(this.removeAt(r),r-=1,s-=1,i.push(o))}return i}removeAt(n){this._docs.splice(n,1),this._myIndex.removeAt(n)}getIndex(){return this._myIndex}search(n,{limit:i=-1}={}){let{includeMatches:r,includeScore:s,shouldSort:o,sortFn:a,ignoreFieldNorm:l}=this.options,c=X_(n)?X_(this._docs[0])?this._searchStringList(n):this._searchObjectList(n):this._searchLogical(n);return GAt(c,{ignoreFieldNorm:l}),o&&c.sort(a),oLe(i)&&i>-1&&(c=c.slice(0,i)),jAt(c,this._docs,{includeMatches:r,includeScore:s})}_searchStringList(n){let i=zfe(n,this.options),{records:r}=this._myIndex,s=[];return r.forEach(({v:o,i:a,n:l})=>{if(!_4(o))return;let{isMatch:c,score:d,indices:u}=i.searchIn(o);c&&s.push({item:o,idx:a,matches:[{score:d,value:o,norm:l,indices:u}]})}),s}_searchLogical(n){let i=dLe(n,this.options),r=(l,c,d)=>{if(!l.children){let{keyId:m,searcher:f}=l,_=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(c,m),searcher:f});return _&&_.length?[{idx:d,item:c,matches:_}]:[]}let u=[];for(let m=0,f=l.children.length;m<f;m+=1){let _=l.children[m],x=r(_,c,d);if(x.length)u.push(...x);else if(l.operator===uY.AND)return[]}return u},s=this._myIndex.records,o={},a=[];return s.forEach(({$:l,i:c})=>{if(_4(l)){let d=r(i,l,c);d.length&&(o[c]||(o[c]={idx:c,item:l,matches:[]},a.push(o[c])),d.forEach(({matches:u})=>{o[c].matches.push(...u)}))}}),a}_searchObjectList(n){let i=zfe(n,this.options),{keys:r,records:s}=this._myIndex,o=[];return s.forEach(({$:a,i:l})=>{if(!_4(a))return;let c=[];r.forEach((d,u)=>{c.push(...this._findMatches({key:d,value:a[u],searcher:i}))}),c.length&&o.push({idx:l,item:a,matches:c})}),o}_findMatches({key:n,value:i,searcher:r}){if(!_4(i))return[];let s=[];if(K8(i))i.forEach(({v:o,i:a,n:l})=>{if(!_4(o))return;let{isMatch:c,score:d,indices:u}=r.searchIn(o);c&&s.push({score:d,key:n,value:o,idx:a,norm:l,indices:u})});else{let{v:o,n:a}=i,{isMatch:l,score:c,indices:d}=r.searchIn(o);l&&s.push({score:c,key:n,value:o,norm:a,indices:d})}return s}}return t.version="7.0.0",t.createIndex=iLe,t.parseIndex=AAt,t.config=Ha,t})();Wfe.parseQuery=dLe;BAt(Vfe)});function YAt(t,e){if(t&1){let n=re();h(0,"div",1,0),F("@panelAnimation.done",function(r){V(n);let s=w();return B(s._animationDone.next(r))}),Ln(2),p()}if(t&2){let n=e.id,i=w();jr(i._classList),ki("mat-mdc-autocomplete-visible",i.showPanel)("mat-mdc-autocomplete-hidden",!i.showPanel)("mat-primary",i._color==="primary")("mat-accent",i._color==="accent")("mat-warn",i._color==="warn"),b("id",i.id)("@panelAnimation",i.isOpen?"visible":"hidden"),Bn("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(n))}}function XAt(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}function JAt(t){return()=>t.scrollStrategies.reposition()}var $At,KAt,qAt,ZAt,Ufe,hLe,jfe,QAt,pLe,ePt,hY,mLe,$fe=Q(()=>{me();me();bl();ri();R1();R1();Qf();Qf();Xh();Wc();Wc();ng();$n();Zg();WO();bv();qn();og();Cl();Th();$At=["panel"],KAt=["*"];qAt=Nd("panelAnimation",[bc("void, hidden",So({opacity:0,transform:"scaleY(0.8)"})),cl(":enter, hidden => visible",[eN([Ml("0.03s linear",So({opacity:1})),Ml("0.12s cubic-bezier(0, 0, 0.2, 1)",So({transform:"scaleY(1)"}))])]),cl(":leave, visible => hidden",[Ml("0.075s linear",So({opacity:0}))])]),ZAt=0,Ufe=class{constructor(e,n){this.source=e,this.option=n}},hLe=new Ri("mat-autocomplete-default-options",{providedIn:"root",factory:XAt});jfe=(()=>{let e=class e{get isOpen(){return this._isOpen&&this.showPanel}_setColor(i){this._color=i,this._changeDetectorRef.markForCheck()}set classList(i){this._classList=i,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(i){this._hideSingleSelectionIndicator=i,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let i of this.options)i._changeDetectorRef.markForCheck()}constructor(i,r,s,o){this._changeDetectorRef=i,this._elementRef=r,this._defaults=s,this._activeOptionChanges=na.EMPTY,this._animationDone=new nt,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new nt,this.opened=new nt,this.closed=new nt,this.optionActivated=new nt,this.id=`mat-autocomplete-${ZAt++}`,this.inertGroups=o?.SAFARI||!1,this.autoActiveFirstOption=!!s.autoActiveFirstOption,this.autoSelectActiveOption=!!s.autoSelectActiveOption,this.requireSelection=!!s.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new gk(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(i=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[i]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(i){this.panel&&(this.panel.nativeElement.scrollTop=i)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(i){let r=new Ufe(this,i);this.optionSelected.emit(r)}_getPanelAriaLabelledby(i){if(this.ariaLabel)return null;let r=i?i+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:i}_skipPredicate(){return!1}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(fi),R(hLe),R(Oo))},e.\u0275cmp=_e({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(r,s,o){if(r&1&&(_o(o,z_,5),_o(o,QO,5)),r&2){let a;Pt(a=Rt())&&(s.options=a),Pt(a=Rt())&&(s.optionGroups=a)}},viewQuery:function(r,s){if(r&1&&(ei(Ma,7),ei($At,5)),r&2){let o;Pt(o=Rt())&&(s.template=o.first),Pt(o=Rt())&&(s.panel=o.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",mn],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",mn],requireSelection:[2,"requireSelection","requireSelection",mn],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",mn],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",mn]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[as([{provide:XO,useExisting:e}]),Bs,xe],ngContentSelectors:KAt,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(r,s){r&1&&(gr(),W(0,YAt,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-app-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color, var(--mat-app-surface-container))}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[qAt]},changeDetection:0});let t=e;return t})(),QAt={provide:Dh,useExisting:_c(()=>hY),multi:!0},pLe=new Ri("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.reposition()}});ePt={provide:pLe,deps:[xl],useFactory:JAt},hY=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d,u,m,f){this._element=i,this._overlay=r,this._viewContainerRef=s,this._zone=o,this._changeDetectorRef=a,this._dir=c,this._formField=d,this._document=u,this._viewportRuler=m,this._defaults=f,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=na.EMPTY,this._breakpointObserver=Ve(mk),this._handsetLandscapeSubscription=na.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Mi,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new Mi,this._injector=Ve($o),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=my(()=>{let _=this.autocomplete?this.autocomplete.options:null;return _?_.changes.pipe(ll(_),Fl(()=>ra(..._.map(x=>x.onSelectionChange)))):this._initialized.pipe(Fl(()=>this.optionSelections))}),this._handlePanelKeydown=_=>{(_.keyCode===27&&!Pc(_)||_.keyCode===38&&Pc(_,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),_.stopPropagation(),_.preventDefault())},this._trackedModal=null,this._scrollStrategy=l}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let i=this._getWindow();typeof i<"u"&&this._zone.runOutsideAngular(()=>i.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(i){i.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let i=this._getWindow();typeof i<"u"&&i.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Ab(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return ra(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Ks(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Ks(()=>this._overlayAttached)):Fr()).pipe(lr(i=>i instanceof ZO?i:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return ra(bh(this._document,"click"),bh(this._document,"auxclick"),bh(this._document,"touchend")).pipe(Ks(i=>{let r=sf(i),s=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&r!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!s||!s.contains(r))&&(!o||!o.contains(r))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(r)}))}writeValue(i){Promise.resolve(null).then(()=>this._assignOptionValue(i))}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this._element.nativeElement.disabled=i}_handleKeydown(i){let r=i.keyCode,s=Pc(i);if(r===27&&!s&&i.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&r===13&&this.panelOpen&&!s)this.activeOption._selectViaInteraction(),this._resetActiveItem(),i.preventDefault();else if(this.autocomplete){let o=this.autocomplete._keyManager.activeItem,a=r===38||r===40;r===9||a&&!s&&this.panelOpen?this.autocomplete._keyManager.onKeydown(i):a&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(a||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(i){let r=i.target,s=r.value;if(r.type==="number"&&(s=s==""?null:parseFloat(s)),this._previousValue!==s){if(this._previousValue=s,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(s),!s)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let o=this.autocomplete.options?.find(a=>a.selected);if(o){let a=this._getDisplayValue(o.value);s!==a&&o.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===i.target){let o=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(o)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(i=!1){this._formField&&this._formField.floatLabel==="auto"&&(i?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let i=new Qa(s=>{wh(()=>{s.next()},{injector:this._injector})}),r=this.autocomplete.options.changes.pipe(ac(()=>this._positionStrategy.reapplyLastPosition()),E9(0));return ra(i,r).pipe(Fl(()=>this._zone.run(()=>{let s=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),s!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),ic(1)).subscribe(s=>this._setValueAndClose(s))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(i){let r=this.autocomplete;return r&&r.displayWith?r.displayWith(i):i}_assignOptionValue(i){let r=this._getDisplayValue(i);i==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(r??"")}_updateNativeInputValue(i){this._formField?this._formField._control.value=i:this._element.nativeElement.value=i,this._previousValue=i}_setValueAndClose(i){let r=this.autocomplete,s=i?i.source:this._pendingAutoselectedOption;s?(this._clearPreviousSelectedOption(s),this._assignOptionValue(s.value),this._onChange(s.value),r._emitSelectEvent(s),this._element.nativeElement.focus()):r.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),r._animationDone?r._animationDone.pipe(ic(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(i,r){this.autocomplete?.options?.forEach(s=>{s!==i&&s.selected&&s.deselect(r)})}_openPanelInternal(i=this._element.nativeElement.value){if(this._attachOverlay(i),this._floatLabel(),this._trackedModal){let r=this.autocomplete.id;_k(this._trackedModal,"aria-owns",r)}}_attachOverlay(i){this.autocomplete;let r=this._overlayRef;r?(this._positionStrategy.setOrigin(this._getConnectedElement()),r.updateSize({width:this._getPanelWidth()})):(this._portal=new of(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),r=this._overlay.create(this._getOverlayConfig()),this._overlayRef=r,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&r&&r.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(n$.HandsetLandscape).subscribe(o=>{o.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),r&&!r.hasAttached()&&(r.attach(this._portal),this._valueOnAttach=i,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let s=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&s!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let i=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=i.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=i.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Xg({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let i=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(i),this._positionStrategy=i,i}_setStrategyPositions(i){let r=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],s=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:s},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:s}],a;this.position==="above"?a=o:this.position==="below"?a=r:a=[...r,...o],i.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let i=this.autocomplete;if(i.autoActiveFirstOption){let r=-1;for(let s=0;s<i.options.length;s++)if(!i.options.get(s).disabled){r=s;break}i._keyManager.setActiveItem(r)}else i._keyManager.setActiveItem(-1)}_canOpen(){let i=this._element.nativeElement;return!i.readOnly&&!i.disabled&&!this.autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(i){let r=this.autocomplete,s=p$(i,r.options,r.optionGroups);if(i===0&&s===1)r._setScrollTop(0);else if(r.panel){let o=r.options.toArray()[i];if(o){let a=o._getHostElement(),l=m$(a.offsetTop,a.offsetHeight,r._getScrollTop(),r.panel.nativeElement.offsetHeight);r._setScrollTop(l)}}}_applyModalPanelOwnership(){let i=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!i)return;let r=this.autocomplete.id;this._trackedModal&&Ab(this._trackedModal,"aria-owns",r),_k(i,"aria-owns",r),this._trackedModal=i}_clearFromModal(){if(this._trackedModal){let i=this.autocomplete.id;Ab(this._trackedModal,"aria-owns",i),this._trackedModal=null}}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(xl),R(Na),R(pn),R(Kt),R(pLe),R(Va,8),R(K_,9),R(Lr,8),R(J2),R(hLe,8))},e.\u0275dir=mi({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(r,s){r&1&&F("focusin",function(){return s._handleFocus()})("blur",function(){return s._onTouched()})("input",function(a){return s._handleInput(a)})("keydown",function(a){return s._handleKeydown(a)})("click",function(){return s._handleClick()}),r&2&&Bn("autocomplete",s.autocompleteAttribute)("role",s.autocompleteDisabled?null:"combobox")("aria-autocomplete",s.autocompleteDisabled?null:"list")("aria-activedescendant",s.panelOpen&&s.activeOption?s.activeOption.id:null)("aria-expanded",s.autocompleteDisabled?null:s.panelOpen.toString())("aria-controls",s.autocompleteDisabled||!s.panelOpen||s.autocomplete==null?null:s.autocomplete.id)("aria-haspopup",s.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",mn]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[as([QAt]),Bs,yn]});let t=e;return t})(),mLe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[ePt],imports:[T0,bk,zr,sd,Q2,bk,zr]});let t=e;return t})()});var Qh,C4=Q(()=>{Zh();Qh=(()=>{let e=class e{static displayWith(i){return console.log(Date.now()),r=>Es.isString(r)?r:r?r[i]:""}static displayWithNxtArtist(i){return i.name}};e.displayWithName=i=>Es.isString(i)?i:i?i.name:"",e.displayWithFullName=i=>Es.isString(i)?i:i?i.fullName:"",e.displayWithText=(i,r)=>Es.isString(i)?i:i?r(i.text):"",e.displayWithDescription=(i,r)=>Es.isString(i)?i:i?r?r(i.description):i.description:"",e.displayWithUsername=(i,r)=>Es.isString(i)?i:i?r(i.username):"";let t=e;return t})()});var fLe,gLe,Xb,Kfe,vLe=Q(()=>{fLe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gLe={};(function(){var t;function e(Y,X){function ne(){}ne.prototype=X.prototype,Y.D=X.prototype,Y.prototype=new ne,Y.prototype.constructor=Y,Y.C=function(pe,ce,ie){for(var le=Array(arguments.length-2),Se=2;Se<arguments.length;Se++)le[Se-2]=arguments[Se];return X.prototype[ce].apply(pe,le)}}function n(){this.blockSize=-1}function i(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}e(i,n),i.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function r(Y,X,ne){ne||(ne=0);var pe=Array(16);if(typeof X=="string")for(var ce=0;16>ce;++ce)pe[ce]=X.charCodeAt(ne++)|X.charCodeAt(ne++)<<8|X.charCodeAt(ne++)<<16|X.charCodeAt(ne++)<<24;else for(ce=0;16>ce;++ce)pe[ce]=X[ne++]|X[ne++]<<8|X[ne++]<<16|X[ne++]<<24;X=Y.g[0],ne=Y.g[1],ce=Y.g[2];var ie=Y.g[3],le=X+(ie^ne&(ce^ie))+pe[0]+3614090360&4294967295;X=ne+(le<<7&4294967295|le>>>25),le=ie+(ce^X&(ne^ce))+pe[1]+3905402710&4294967295,ie=X+(le<<12&4294967295|le>>>20),le=ce+(ne^ie&(X^ne))+pe[2]+606105819&4294967295,ce=ie+(le<<17&4294967295|le>>>15),le=ne+(X^ce&(ie^X))+pe[3]+3250441966&4294967295,ne=ce+(le<<22&4294967295|le>>>10),le=X+(ie^ne&(ce^ie))+pe[4]+4118548399&4294967295,X=ne+(le<<7&4294967295|le>>>25),le=ie+(ce^X&(ne^ce))+pe[5]+1200080426&4294967295,ie=X+(le<<12&4294967295|le>>>20),le=ce+(ne^ie&(X^ne))+pe[6]+2821735955&4294967295,ce=ie+(le<<17&4294967295|le>>>15),le=ne+(X^ce&(ie^X))+pe[7]+4249261313&4294967295,ne=ce+(le<<22&4294967295|le>>>10),le=X+(ie^ne&(ce^ie))+pe[8]+1770035416&4294967295,X=ne+(le<<7&4294967295|le>>>25),le=ie+(ce^X&(ne^ce))+pe[9]+2336552879&4294967295,ie=X+(le<<12&4294967295|le>>>20),le=ce+(ne^ie&(X^ne))+pe[10]+4294925233&4294967295,ce=ie+(le<<17&4294967295|le>>>15),le=ne+(X^ce&(ie^X))+pe[11]+2304563134&4294967295,ne=ce+(le<<22&4294967295|le>>>10),le=X+(ie^ne&(ce^ie))+pe[12]+1804603682&4294967295,X=ne+(le<<7&4294967295|le>>>25),le=ie+(ce^X&(ne^ce))+pe[13]+4254626195&4294967295,ie=X+(le<<12&4294967295|le>>>20),le=ce+(ne^ie&(X^ne))+pe[14]+2792965006&4294967295,ce=ie+(le<<17&4294967295|le>>>15),le=ne+(X^ce&(ie^X))+pe[15]+1236535329&4294967295,ne=ce+(le<<22&4294967295|le>>>10),le=X+(ce^ie&(ne^ce))+pe[1]+4129170786&4294967295,X=ne+(le<<5&4294967295|le>>>27),le=ie+(ne^ce&(X^ne))+pe[6]+3225465664&4294967295,ie=X+(le<<9&4294967295|le>>>23),le=ce+(X^ne&(ie^X))+pe[11]+643717713&4294967295,ce=ie+(le<<14&4294967295|le>>>18),le=ne+(ie^X&(ce^ie))+pe[0]+3921069994&4294967295,ne=ce+(le<<20&4294967295|le>>>12),le=X+(ce^ie&(ne^ce))+pe[5]+3593408605&4294967295,X=ne+(le<<5&4294967295|le>>>27),le=ie+(ne^ce&(X^ne))+pe[10]+38016083&4294967295,ie=X+(le<<9&4294967295|le>>>23),le=ce+(X^ne&(ie^X))+pe[15]+3634488961&4294967295,ce=ie+(le<<14&4294967295|le>>>18),le=ne+(ie^X&(ce^ie))+pe[4]+3889429448&4294967295,ne=ce+(le<<20&4294967295|le>>>12),le=X+(ce^ie&(ne^ce))+pe[9]+568446438&4294967295,X=ne+(le<<5&4294967295|le>>>27),le=ie+(ne^ce&(X^ne))+pe[14]+3275163606&4294967295,ie=X+(le<<9&4294967295|le>>>23),le=ce+(X^ne&(ie^X))+pe[3]+4107603335&4294967295,ce=ie+(le<<14&4294967295|le>>>18),le=ne+(ie^X&(ce^ie))+pe[8]+1163531501&4294967295,ne=ce+(le<<20&4294967295|le>>>12),le=X+(ce^ie&(ne^ce))+pe[13]+2850285829&4294967295,X=ne+(le<<5&4294967295|le>>>27),le=ie+(ne^ce&(X^ne))+pe[2]+4243563512&4294967295,ie=X+(le<<9&4294967295|le>>>23),le=ce+(X^ne&(ie^X))+pe[7]+1735328473&4294967295,ce=ie+(le<<14&4294967295|le>>>18),le=ne+(ie^X&(ce^ie))+pe[12]+2368359562&4294967295,ne=ce+(le<<20&4294967295|le>>>12),le=X+(ne^ce^ie)+pe[5]+4294588738&4294967295,X=ne+(le<<4&4294967295|le>>>28),le=ie+(X^ne^ce)+pe[8]+2272392833&4294967295,ie=X+(le<<11&4294967295|le>>>21),le=ce+(ie^X^ne)+pe[11]+1839030562&4294967295,ce=ie+(le<<16&4294967295|le>>>16),le=ne+(ce^ie^X)+pe[14]+4259657740&4294967295,ne=ce+(le<<23&4294967295|le>>>9),le=X+(ne^ce^ie)+pe[1]+2763975236&4294967295,X=ne+(le<<4&4294967295|le>>>28),le=ie+(X^ne^ce)+pe[4]+1272893353&4294967295,ie=X+(le<<11&4294967295|le>>>21),le=ce+(ie^X^ne)+pe[7]+4139469664&4294967295,ce=ie+(le<<16&4294967295|le>>>16),le=ne+(ce^ie^X)+pe[10]+3200236656&4294967295,ne=ce+(le<<23&4294967295|le>>>9),le=X+(ne^ce^ie)+pe[13]+681279174&4294967295,X=ne+(le<<4&4294967295|le>>>28),le=ie+(X^ne^ce)+pe[0]+3936430074&4294967295,ie=X+(le<<11&4294967295|le>>>21),le=ce+(ie^X^ne)+pe[3]+3572445317&4294967295,ce=ie+(le<<16&4294967295|le>>>16),le=ne+(ce^ie^X)+pe[6]+76029189&4294967295,ne=ce+(le<<23&4294967295|le>>>9),le=X+(ne^ce^ie)+pe[9]+3654602809&4294967295,X=ne+(le<<4&4294967295|le>>>28),le=ie+(X^ne^ce)+pe[12]+3873151461&4294967295,ie=X+(le<<11&4294967295|le>>>21),le=ce+(ie^X^ne)+pe[15]+530742520&4294967295,ce=ie+(le<<16&4294967295|le>>>16),le=ne+(ce^ie^X)+pe[2]+3299628645&4294967295,ne=ce+(le<<23&4294967295|le>>>9),le=X+(ce^(ne|~ie))+pe[0]+4096336452&4294967295,X=ne+(le<<6&4294967295|le>>>26),le=ie+(ne^(X|~ce))+pe[7]+1126891415&4294967295,ie=X+(le<<10&4294967295|le>>>22),le=ce+(X^(ie|~ne))+pe[14]+2878612391&4294967295,ce=ie+(le<<15&4294967295|le>>>17),le=ne+(ie^(ce|~X))+pe[5]+4237533241&4294967295,ne=ce+(le<<21&4294967295|le>>>11),le=X+(ce^(ne|~ie))+pe[12]+1700485571&4294967295,X=ne+(le<<6&4294967295|le>>>26),le=ie+(ne^(X|~ce))+pe[3]+2399980690&4294967295,ie=X+(le<<10&4294967295|le>>>22),le=ce+(X^(ie|~ne))+pe[10]+4293915773&4294967295,ce=ie+(le<<15&4294967295|le>>>17),le=ne+(ie^(ce|~X))+pe[1]+2240044497&4294967295,ne=ce+(le<<21&4294967295|le>>>11),le=X+(ce^(ne|~ie))+pe[8]+1873313359&4294967295,X=ne+(le<<6&4294967295|le>>>26),le=ie+(ne^(X|~ce))+pe[15]+4264355552&4294967295,ie=X+(le<<10&4294967295|le>>>22),le=ce+(X^(ie|~ne))+pe[6]+2734768916&4294967295,ce=ie+(le<<15&4294967295|le>>>17),le=ne+(ie^(ce|~X))+pe[13]+1309151649&4294967295,ne=ce+(le<<21&4294967295|le>>>11),le=X+(ce^(ne|~ie))+pe[4]+4149444226&4294967295,X=ne+(le<<6&4294967295|le>>>26),le=ie+(ne^(X|~ce))+pe[11]+3174756917&4294967295,ie=X+(le<<10&4294967295|le>>>22),le=ce+(X^(ie|~ne))+pe[2]+718787259&4294967295,ce=ie+(le<<15&4294967295|le>>>17),le=ne+(ie^(ce|~X))+pe[9]+3951481745&4294967295,Y.g[0]=Y.g[0]+X&4294967295,Y.g[1]=Y.g[1]+(ce+(le<<21&4294967295|le>>>11))&4294967295,Y.g[2]=Y.g[2]+ce&4294967295,Y.g[3]=Y.g[3]+ie&4294967295}i.prototype.u=function(Y,X){X===void 0&&(X=Y.length);for(var ne=X-this.blockSize,pe=this.B,ce=this.h,ie=0;ie<X;){if(ce==0)for(;ie<=ne;)r(this,Y,ie),ie+=this.blockSize;if(typeof Y=="string"){for(;ie<X;)if(pe[ce++]=Y.charCodeAt(ie++),ce==this.blockSize){r(this,pe),ce=0;break}}else for(;ie<X;)if(pe[ce++]=Y[ie++],ce==this.blockSize){r(this,pe),ce=0;break}}this.h=ce,this.o+=X},i.prototype.v=function(){var Y=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);Y[0]=128;for(var X=1;X<Y.length-8;++X)Y[X]=0;var ne=8*this.o;for(X=Y.length-8;X<Y.length;++X)Y[X]=ne&255,ne/=256;for(this.u(Y),Y=Array(16),X=ne=0;4>X;++X)for(var pe=0;32>pe;pe+=8)Y[ne++]=this.g[X]>>>pe&255;return Y};function s(Y,X){var ne=a;return Object.prototype.hasOwnProperty.call(ne,Y)?ne[Y]:ne[Y]=X(Y)}function o(Y,X){this.h=X;for(var ne=[],pe=!0,ce=Y.length-1;0<=ce;ce--){var ie=Y[ce]|0;pe&&ie==X||(ne[ce]=ie,pe=!1)}this.g=ne}var a={};function l(Y){return-128<=Y&&128>Y?s(Y,function(X){return new o([X|0],0>X?-1:0)}):new o([Y|0],0>Y?-1:0)}function c(Y){if(isNaN(Y)||!isFinite(Y))return u;if(0>Y)return D(c(-Y));for(var X=[],ne=1,pe=0;Y>=ne;pe++)X[pe]=Y/ne|0,ne*=4294967296;return new o(X,0)}function d(Y,X){if(Y.length==0)throw Error("number format error: empty string");if(X=X||10,2>X||36<X)throw Error("radix out of range: "+X);if(Y.charAt(0)=="-")return D(d(Y.substring(1),X));if(0<=Y.indexOf("-"))throw Error('number format error: interior "-" character');for(var ne=c(Math.pow(X,8)),pe=u,ce=0;ce<Y.length;ce+=8){var ie=Math.min(8,Y.length-ce),le=parseInt(Y.substring(ce,ce+ie),X);8>ie?(ie=c(Math.pow(X,ie)),pe=pe.j(ie).add(c(le))):(pe=pe.j(ne),pe=pe.add(c(le)))}return pe}var u=l(0),m=l(1),f=l(16777216);t=o.prototype,t.m=function(){if(x(this))return-D(this).m();for(var Y=0,X=1,ne=0;ne<this.g.length;ne++){var pe=this.i(ne);Y+=(0<=pe?pe:4294967296+pe)*X,X*=4294967296}return Y},t.toString=function(Y){if(Y=Y||10,2>Y||36<Y)throw Error("radix out of range: "+Y);if(_(this))return"0";if(x(this))return"-"+D(this).toString(Y);for(var X=c(Math.pow(Y,6)),ne=this,pe="";;){var ce=z(ne,X).g;ne=E(ne,ce.j(X));var ie=((0<ne.g.length?ne.g[0]:ne.h)>>>0).toString(Y);if(ne=ce,_(ne))return ie+pe;for(;6>ie.length;)ie="0"+ie;pe=ie+pe}},t.i=function(Y){return 0>Y?0:Y<this.g.length?this.g[Y]:this.h};function _(Y){if(Y.h!=0)return!1;for(var X=0;X<Y.g.length;X++)if(Y.g[X]!=0)return!1;return!0}function x(Y){return Y.h==-1}t.l=function(Y){return Y=E(this,Y),x(Y)?-1:_(Y)?0:1};function D(Y){for(var X=Y.g.length,ne=[],pe=0;pe<X;pe++)ne[pe]=~Y.g[pe];return new o(ne,~Y.h).add(m)}t.abs=function(){return x(this)?D(this):this},t.add=function(Y){for(var X=Math.max(this.g.length,Y.g.length),ne=[],pe=0,ce=0;ce<=X;ce++){var ie=pe+(this.i(ce)&65535)+(Y.i(ce)&65535),le=(ie>>>16)+(this.i(ce)>>>16)+(Y.i(ce)>>>16);pe=le>>>16,ie&=65535,le&=65535,ne[ce]=le<<16|ie}return new o(ne,ne[ne.length-1]&-2147483648?-1:0)};function E(Y,X){return Y.add(D(X))}t.j=function(Y){if(_(this)||_(Y))return u;if(x(this))return x(Y)?D(this).j(D(Y)):D(D(this).j(Y));if(x(Y))return D(this.j(D(Y)));if(0>this.l(f)&&0>Y.l(f))return c(this.m()*Y.m());for(var X=this.g.length+Y.g.length,ne=[],pe=0;pe<2*X;pe++)ne[pe]=0;for(pe=0;pe<this.g.length;pe++)for(var ce=0;ce<Y.g.length;ce++){var ie=this.i(pe)>>>16,le=this.i(pe)&65535,Se=Y.i(ce)>>>16,je=Y.i(ce)&65535;ne[2*pe+2*ce]+=le*je,M(ne,2*pe+2*ce),ne[2*pe+2*ce+1]+=ie*je,M(ne,2*pe+2*ce+1),ne[2*pe+2*ce+1]+=le*Se,M(ne,2*pe+2*ce+1),ne[2*pe+2*ce+2]+=ie*Se,M(ne,2*pe+2*ce+2)}for(pe=0;pe<X;pe++)ne[pe]=ne[2*pe+1]<<16|ne[2*pe];for(pe=X;pe<2*X;pe++)ne[pe]=0;return new o(ne,0)};function M(Y,X){for(;(Y[X]&65535)!=Y[X];)Y[X+1]+=Y[X]>>>16,Y[X]&=65535,X++}function I(Y,X){this.g=Y,this.h=X}function z(Y,X){if(_(X))throw Error("division by zero");if(_(Y))return new I(u,u);if(x(Y))return X=z(D(Y),X),new I(D(X.g),D(X.h));if(x(X))return X=z(Y,D(X)),new I(D(X.g),X.h);if(30<Y.g.length){if(x(Y)||x(X))throw Error("slowDivide_ only works with positive integers.");for(var ne=m,pe=X;0>=pe.l(Y);)ne=G(ne),pe=G(pe);var ce=A(ne,1),ie=A(pe,1);for(pe=A(pe,2),ne=A(ne,2);!_(pe);){var le=ie.add(pe);0>=le.l(Y)&&(ce=ce.add(ne),ie=le),pe=A(pe,1),ne=A(ne,1)}return X=E(Y,ce.j(X)),new I(ce,X)}for(ce=u;0<=Y.l(X);){for(ne=Math.max(1,Math.floor(Y.m()/X.m())),pe=Math.ceil(Math.log(ne)/Math.LN2),pe=48>=pe?1:Math.pow(2,pe-48),ie=c(ne),le=ie.j(X);x(le)||0<le.l(Y);)ne-=pe,ie=c(ne),le=ie.j(X);_(ie)&&(ie=m),ce=ce.add(ie),Y=E(Y,le)}return new I(ce,Y)}t.A=function(Y){return z(this,Y).h},t.and=function(Y){for(var X=Math.max(this.g.length,Y.g.length),ne=[],pe=0;pe<X;pe++)ne[pe]=this.i(pe)&Y.i(pe);return new o(ne,this.h&Y.h)},t.or=function(Y){for(var X=Math.max(this.g.length,Y.g.length),ne=[],pe=0;pe<X;pe++)ne[pe]=this.i(pe)|Y.i(pe);return new o(ne,this.h|Y.h)},t.xor=function(Y){for(var X=Math.max(this.g.length,Y.g.length),ne=[],pe=0;pe<X;pe++)ne[pe]=this.i(pe)^Y.i(pe);return new o(ne,this.h^Y.h)};function G(Y){for(var X=Y.g.length+1,ne=[],pe=0;pe<X;pe++)ne[pe]=Y.i(pe)<<1|Y.i(pe-1)>>>31;return new o(ne,Y.h)}function A(Y,X){var ne=X>>5;X%=32;for(var pe=Y.g.length-ne,ce=[],ie=0;ie<pe;ie++)ce[ie]=0<X?Y.i(ie+ne)>>>X|Y.i(ie+ne+1)<<32-X:Y.i(ie+ne);return new o(ce,Y.h)}i.prototype.digest=i.prototype.v,i.prototype.reset=i.prototype.s,i.prototype.update=i.prototype.u,Kfe=gLe.Md5=i,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.A,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=c,o.fromString=d,Xb=gLe.Integer=o}).apply(typeof fLe<"u"?fLe:typeof self<"u"?self:typeof window<"u"?window:{})});var pY,Y8,Yfe,qfe,oI,Zfe,bV,mY,Xfe,Qfe,Jfe,yLe=Q(()=>{pY=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Y8={};(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(K,we,Oe){return K==Array.prototype||K==Object.prototype||(K[we]=Oe.value),K};function n(K){K=[typeof globalThis=="object"&&globalThis,K,typeof window=="object"&&window,typeof self=="object"&&self,typeof pY=="object"&&pY];for(var we=0;we<K.length;++we){var Oe=K[we];if(Oe&&Oe.Math==Math)return Oe}throw Error("Cannot find global object")}var i=n(this);function r(K,we){if(we)e:{var Oe=i;K=K.split(".");for(var mt=0;mt<K.length-1;mt++){var vi=K[mt];if(!(vi in Oe))break e;Oe=Oe[vi]}K=K[K.length-1],mt=Oe[K],we=we(mt),we!=mt&&we!=null&&e(Oe,K,{configurable:!0,writable:!0,value:we})}}function s(K,we){K instanceof String&&(K+="");var Oe=0,mt=!1,vi={next:function(){if(!mt&&Oe<K.length){var Bi=Oe++;return{value:we(Bi,K[Bi]),done:!1}}return mt=!0,{done:!0,value:void 0}}};return vi[Symbol.iterator]=function(){return vi},vi}r("Array.prototype.values",function(K){return K||function(){return s(this,function(we,Oe){return Oe})}});var o=o||{},a=this||self;function l(K){var we=typeof K;return we=we!="object"?we:K?Array.isArray(K)?"array":we:"null",we=="array"||we=="object"&&typeof K.length=="number"}function c(K){var we=typeof K;return we=="object"&&K!=null||we=="function"}function d(K,we,Oe){return K.call.apply(K.bind,arguments)}function u(K,we,Oe){if(!K)throw Error();if(2<arguments.length){var mt=Array.prototype.slice.call(arguments,2);return function(){var vi=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(vi,mt),K.apply(we,vi)}}return function(){return K.apply(we,arguments)}}function m(K,we,Oe){return m=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?d:u,m.apply(null,arguments)}function f(K,we){var Oe=Array.prototype.slice.call(arguments,1);return function(){var mt=Oe.slice();return mt.push.apply(mt,arguments),K.apply(this,mt)}}function _(K,we){function Oe(){}Oe.prototype=we.prototype,K.aa=we.prototype,K.prototype=new Oe,K.prototype.constructor=K,K.Qb=function(mt,vi,Bi){for(var jn=Array(arguments.length-2),Vr=2;Vr<arguments.length;Vr++)jn[Vr-2]=arguments[Vr];return we.prototype[vi].apply(mt,jn)}}function x(K){let we=K.length;if(0<we){let Oe=Array(we);for(let mt=0;mt<we;mt++)Oe[mt]=K[mt];return Oe}return[]}function D(K,we){for(let Oe=1;Oe<arguments.length;Oe++){let mt=arguments[Oe];if(l(mt)){let vi=K.length||0,Bi=mt.length||0;K.length=vi+Bi;for(let jn=0;jn<Bi;jn++)K[vi+jn]=mt[jn]}else K.push(mt)}}class E{constructor(we,Oe){this.i=we,this.j=Oe,this.h=0,this.g=null}get(){let we;return 0<this.h?(this.h--,we=this.g,this.g=we.next,we.next=null):we=this.i(),we}}function M(K){return/^[\s\xa0]*$/.test(K)}function I(){var K=a.navigator;return K&&(K=K.userAgent)?K:""}function z(K){return z[" "](K),K}z[" "]=function(){};var G=I().indexOf("Gecko")!=-1&&!(I().toLowerCase().indexOf("webkit")!=-1&&I().indexOf("Edge")==-1)&&!(I().indexOf("Trident")!=-1||I().indexOf("MSIE")!=-1)&&I().indexOf("Edge")==-1;function A(K,we,Oe){for(let mt in K)we.call(Oe,K[mt],mt,K)}function Y(K,we){for(let Oe in K)we.call(void 0,K[Oe],Oe,K)}function X(K){let we={};for(let Oe in K)we[Oe]=K[Oe];return we}let ne="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function pe(K,we){let Oe,mt;for(let vi=1;vi<arguments.length;vi++){mt=arguments[vi];for(Oe in mt)K[Oe]=mt[Oe];for(let Bi=0;Bi<ne.length;Bi++)Oe=ne[Bi],Object.prototype.hasOwnProperty.call(mt,Oe)&&(K[Oe]=mt[Oe])}}function ce(K){var we=1;K=K.split(":");let Oe=[];for(;0<we&&K.length;)Oe.push(K.shift()),we--;return K.length&&Oe.push(K.join(":")),Oe}function ie(K){a.setTimeout(()=>{throw K},0)}function le(){var K=Ye;let we=null;return K.g&&(we=K.g,K.g=K.g.next,K.g||(K.h=null),we.next=null),we}class Se{constructor(){this.h=this.g=null}add(we,Oe){let mt=je.get();mt.set(we,Oe),this.h?this.h.next=mt:this.g=mt,this.h=mt}}var je=new E(()=>new ze,K=>K.reset());class ze{constructor(){this.next=this.g=this.h=null}set(we,Oe){this.h=we,this.g=Oe,this.next=null}reset(){this.next=this.g=this.h=null}}let Ge,Ae=!1,Ye=new Se,ft=()=>{let K=a.Promise.resolve(void 0);Ge=()=>{K.then(Ft)}};var Ft=()=>{for(var K;K=le();){try{K.h.call(K.g)}catch(Oe){ie(Oe)}var we=je;we.j(K),100>we.h&&(we.h++,K.next=we.g,we.g=K)}Ae=!1};function Tt(){this.s=this.s,this.C=this.C}Tt.prototype.s=!1,Tt.prototype.ma=function(){this.s||(this.s=!0,this.N())},Tt.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function at(K,we){this.type=K,this.g=this.target=we,this.defaultPrevented=!1}at.prototype.h=function(){this.defaultPrevented=!0};var yt=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var K=!1,we=Object.defineProperty({},"passive",{get:function(){K=!0}});try{let Oe=()=>{};a.addEventListener("test",Oe,we),a.removeEventListener("test",Oe,we)}catch{}return K}();function _t(K,we){if(at.call(this,K?K.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,K){var Oe=this.type=K.type,mt=K.changedTouches&&K.changedTouches.length?K.changedTouches[0]:null;if(this.target=K.target||K.srcElement,this.g=we,we=K.relatedTarget){if(G){e:{try{z(we.nodeName);var vi=!0;break e}catch{}vi=!1}vi||(we=null)}}else Oe=="mouseover"?we=K.fromElement:Oe=="mouseout"&&(we=K.toElement);this.relatedTarget=we,mt?(this.clientX=mt.clientX!==void 0?mt.clientX:mt.pageX,this.clientY=mt.clientY!==void 0?mt.clientY:mt.pageY,this.screenX=mt.screenX||0,this.screenY=mt.screenY||0):(this.clientX=K.clientX!==void 0?K.clientX:K.pageX,this.clientY=K.clientY!==void 0?K.clientY:K.pageY,this.screenX=K.screenX||0,this.screenY=K.screenY||0),this.button=K.button,this.key=K.key||"",this.ctrlKey=K.ctrlKey,this.altKey=K.altKey,this.shiftKey=K.shiftKey,this.metaKey=K.metaKey,this.pointerId=K.pointerId||0,this.pointerType=typeof K.pointerType=="string"?K.pointerType:Re[K.pointerType]||"",this.state=K.state,this.i=K,K.defaultPrevented&&_t.aa.h.call(this)}}_(_t,at);var Re={2:"touch",3:"pen",4:"mouse"};_t.prototype.h=function(){_t.aa.h.call(this);var K=this.i;K.preventDefault?K.preventDefault():K.returnValue=!1};var ot="closure_listenable_"+(1e6*Math.random()|0),jt=0;function zt(K,we,Oe,mt,vi){this.listener=K,this.proxy=null,this.src=we,this.type=Oe,this.capture=!!mt,this.ha=vi,this.key=++jt,this.da=this.fa=!1}function qt(K){K.da=!0,K.listener=null,K.proxy=null,K.src=null,K.ha=null}function ui(K){this.src=K,this.g={},this.h=0}ui.prototype.add=function(K,we,Oe,mt,vi){var Bi=K.toString();K=this.g[Bi],K||(K=this.g[Bi]=[],this.h++);var jn=ln(K,we,mt,vi);return-1<jn?(we=K[jn],Oe||(we.fa=!1)):(we=new zt(we,this.src,Bi,!!mt,vi),we.fa=Oe,K.push(we)),we};function _i(K,we){var Oe=we.type;if(Oe in K.g){var mt=K.g[Oe],vi=Array.prototype.indexOf.call(mt,we,void 0),Bi;(Bi=0<=vi)&&Array.prototype.splice.call(mt,vi,1),Bi&&(qt(we),K.g[Oe].length==0&&(delete K.g[Oe],K.h--))}}function ln(K,we,Oe,mt){for(var vi=0;vi<K.length;++vi){var Bi=K[vi];if(!Bi.da&&Bi.listener==we&&Bi.capture==!!Oe&&Bi.ha==mt)return vi}return-1}var Rn="closure_lm_"+(1e6*Math.random()|0),bi={};function Mn(K,we,Oe,mt,vi){if(mt&&mt.once)return wn(K,we,Oe,mt,vi);if(Array.isArray(we)){for(var Bi=0;Bi<we.length;Bi++)Mn(K,we[Bi],Oe,mt,vi);return null}return Oe=ea(Oe),K&&K[ot]?K.K(we,Oe,c(mt)?!!mt.capture:!!mt,vi):Fn(K,we,Oe,!1,mt,vi)}function Fn(K,we,Oe,mt,vi,Bi){if(!we)throw Error("Invalid event type");var jn=c(vi)?!!vi.capture:!!vi,Vr=kn(K);if(Vr||(K[Rn]=Vr=new ui(K)),Oe=Vr.add(we,Oe,mt,jn,Bi),Oe.proxy)return Oe;if(mt=or(),Oe.proxy=mt,mt.src=K,mt.listener=Oe,K.addEventListener)yt||(vi=jn),vi===void 0&&(vi=!1),K.addEventListener(we.toString(),mt,vi);else if(K.attachEvent)K.attachEvent(no(we.toString()),mt);else if(K.addListener&&K.removeListener)K.addListener(mt);else throw Error("addEventListener and attachEvent are unavailable.");return Oe}function or(){function K(Oe){return we.call(K.src,K.listener,Oe)}let we=Ho;return K}function wn(K,we,Oe,mt,vi){if(Array.isArray(we)){for(var Bi=0;Bi<we.length;Bi++)wn(K,we[Bi],Oe,mt,vi);return null}return Oe=ea(Oe),K&&K[ot]?K.L(we,Oe,c(mt)?!!mt.capture:!!mt,vi):Fn(K,we,Oe,!0,mt,vi)}function gn(K,we,Oe,mt,vi){if(Array.isArray(we))for(var Bi=0;Bi<we.length;Bi++)gn(K,we[Bi],Oe,mt,vi);else mt=c(mt)?!!mt.capture:!!mt,Oe=ea(Oe),K&&K[ot]?(K=K.i,we=String(we).toString(),we in K.g&&(Bi=K.g[we],Oe=ln(Bi,Oe,mt,vi),-1<Oe&&(qt(Bi[Oe]),Array.prototype.splice.call(Bi,Oe,1),Bi.length==0&&(delete K.g[we],K.h--)))):K&&(K=kn(K))&&(we=K.g[we.toString()],K=-1,we&&(K=ln(we,Oe,mt,vi)),(Oe=-1<K?we[K]:null)&&ts(Oe))}function ts(K){if(typeof K!="number"&&K&&!K.da){var we=K.src;if(we&&we[ot])_i(we.i,K);else{var Oe=K.type,mt=K.proxy;we.removeEventListener?we.removeEventListener(Oe,mt,K.capture):we.detachEvent?we.detachEvent(no(Oe),mt):we.addListener&&we.removeListener&&we.removeListener(mt),(Oe=kn(we))?(_i(Oe,K),Oe.h==0&&(Oe.src=null,we[Rn]=null)):qt(K)}}}function no(K){return K in bi?bi[K]:bi[K]="on"+K}function Ho(K,we){if(K.da)K=!0;else{we=new _t(we,this);var Oe=K.listener,mt=K.ha||K.src;K.fa&&ts(K),K=Oe.call(mt,we)}return K}function kn(K){return K=K[Rn],K instanceof ui?K:null}var Ts="__closure_events_fn_"+(1e9*Math.random()>>>0);function ea(K){return typeof K=="function"?K:(K[Ts]||(K[Ts]=function(we){return K.handleEvent(we)}),K[Ts])}function co(){Tt.call(this),this.i=new ui(this),this.M=this,this.F=null}_(co,Tt),co.prototype[ot]=!0,co.prototype.removeEventListener=function(K,we,Oe,mt){gn(this,K,we,Oe,mt)};function Zn(K,we){var Oe,mt=K.F;if(mt)for(Oe=[];mt;mt=mt.F)Oe.push(mt);if(K=K.M,mt=we.type||we,typeof we=="string")we=new at(we,K);else if(we instanceof at)we.target=we.target||K;else{var vi=we;we=new at(mt,K),pe(we,vi)}if(vi=!0,Oe)for(var Bi=Oe.length-1;0<=Bi;Bi--){var jn=we.g=Oe[Bi];vi=gl(jn,mt,!0,we)&&vi}if(jn=we.g=K,vi=gl(jn,mt,!0,we)&&vi,vi=gl(jn,mt,!1,we)&&vi,Oe)for(Bi=0;Bi<Oe.length;Bi++)jn=we.g=Oe[Bi],vi=gl(jn,mt,!1,we)&&vi}co.prototype.N=function(){if(co.aa.N.call(this),this.i){var K=this.i,we;for(we in K.g){for(var Oe=K.g[we],mt=0;mt<Oe.length;mt++)qt(Oe[mt]);delete K.g[we],K.h--}}this.F=null},co.prototype.K=function(K,we,Oe,mt){return this.i.add(String(K),we,!1,Oe,mt)},co.prototype.L=function(K,we,Oe,mt){return this.i.add(String(K),we,!0,Oe,mt)};function gl(K,we,Oe,mt){if(we=K.i.g[String(we)],!we)return!0;we=we.concat();for(var vi=!0,Bi=0;Bi<we.length;++Bi){var jn=we[Bi];if(jn&&!jn.da&&jn.capture==Oe){var Vr=jn.listener,El=jn.ha||jn.src;jn.fa&&_i(K.i,jn),vi=Vr.call(El,mt)!==!1&&vi}}return vi&&!mt.defaultPrevented}function sc(K,we,Oe){if(typeof K=="function")Oe&&(K=m(K,Oe));else if(K&&typeof K.handleEvent=="function")K=m(K.handleEvent,K);else throw Error("Invalid listener argument");return 2147483647<Number(we)?-1:a.setTimeout(K,we||0)}function Xl(K){K.g=sc(()=>{K.g=null,K.i&&(K.i=!1,Xl(K))},K.l);let we=K.h;K.h=null,K.m.apply(null,we)}class Xs extends Tt{constructor(we,Oe){super(),this.m=we,this.l=Oe,this.h=null,this.i=!1,this.g=null}j(we){this.h=arguments,this.g?this.i=!0:Xl(this)}N(){super.N(),this.g&&(a.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Ya(K){Tt.call(this),this.h=K,this.g={}}_(Ya,Tt);var qa=[];function Nl(K){A(K.g,function(we,Oe){this.g.hasOwnProperty(Oe)&&ts(we)},K),K.g={}}Ya.prototype.N=function(){Ya.aa.N.call(this),Nl(this)},Ya.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var zh=a.JSON.stringify,Hh=a.JSON.parse,Rf=class{stringify(K){return a.JSON.stringify(K,void 0)}parse(K){return a.JSON.parse(K,void 0)}};function Id(){}Id.prototype.h=null;function aa(K){return K.h||(K.h=K.i())}function jd(){}var du={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function $i(){at.call(this,"d")}_($i,at);function md(){at.call(this,"c")}_(md,at);var Vl={},Tl=null;function ja(){return Tl=Tl||new co}Vl.La="serverreachability";function Dr(K){at.call(this,Vl.La,K)}_(Dr,at);function Ad(K){let we=ja();Zn(we,new Dr(we))}Vl.STAT_EVENT="statevent";function ds(K,we){at.call(this,Vl.STAT_EVENT,K),this.stat=we}_(ds,at);function _a(K){let we=ja();Zn(we,new ds(we,K))}Vl.Ma="timingevent";function fd(K,we){at.call(this,Vl.Ma,K),this.size=we}_(fd,at);function fr(K,we){if(typeof K!="function")throw Error("Fn must not be null and must be a function");return a.setTimeout(function(){K()},we)}function Qs(){this.g=!0}Qs.prototype.xa=function(){this.g=!1};function Nr(K,we,Oe,mt,vi,Bi){K.info(function(){if(K.g)if(Bi)for(var jn="",Vr=Bi.split("&"),El=0;El<Vr.length;El++){var Lo=Vr[El].split("=");if(1<Lo.length){var Er=Lo[0];Lo=Lo[1];var yo=Er.split("_");jn=2<=yo.length&&yo[1]=="type"?jn+(Er+"="+Lo+"&"):jn+(Er+"=redacted&")}}else jn=null;else jn=Bi;return"XMLHTTP REQ ("+mt+") [attempt "+vi+"]: "+we+`
`+Oe+`
`+jn})}function Ql(K,we,Oe,mt,vi,Bi,jn){K.info(function(){return"XMLHTTP RESP ("+mt+") [ attempt "+vi+"]: "+we+`
`+Oe+`
`+Bi+" "+jn})}function ro(K,we,Oe,mt){K.info(function(){return"XMLHTTP TEXT ("+we+"): "+Ta(K,Oe)+(mt?" "+mt:"")})}function Ra(K,we){K.info(function(){return"TIMEOUT: "+we})}Qs.prototype.info=function(){};function Ta(K,we){if(!K.g)return we;if(!we)return null;try{var Oe=JSON.parse(we);if(Oe){for(K=0;K<Oe.length;K++)if(Array.isArray(Oe[K])){var mt=Oe[K];if(!(2>mt.length)){var vi=mt[1];if(Array.isArray(vi)&&!(1>vi.length)){var Bi=vi[0];if(Bi!="noop"&&Bi!="stop"&&Bi!="close")for(var jn=1;jn<vi.length;jn++)vi[jn]=""}}}}return zh(Oe)}catch{return we}}var $a={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},Da={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},Gh;function Ti(){}_(Ti,Id),Ti.prototype.g=function(){return new XMLHttpRequest},Ti.prototype.i=function(){return{}},Gh=new Ti;function Hs(K,we,Oe,mt){this.j=K,this.i=we,this.l=Oe,this.R=mt||1,this.U=new Ya(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new Eo}function Eo(){this.i=null,this.g="",this.h=!1}var Mo={},Js={};function td(K,we,Oe){K.L=1,K.v=dh(yd(we)),K.m=Oe,K.P=!0,Ec(K,null)}function Ec(K,we){K.F=Date.now(),eo(K),K.A=yd(K.v);var Oe=K.A,mt=K.R;Array.isArray(mt)||(mt=[String(mt)]),rl(Oe.i,"t",mt),K.C=0,Oe=K.j.J,K.h=new Eo,K.g=Ro(K.j,Oe?we:null,!K.m),0<K.O&&(K.M=new Xs(m(K.Y,K,K.g),K.O)),we=K.U,Oe=K.g,mt=K.ca;var vi="readystatechange";Array.isArray(vi)||(vi&&(qa[0]=vi.toString()),vi=qa);for(var Bi=0;Bi<vi.length;Bi++){var jn=Mn(Oe,vi[Bi],mt||we.handleEvent,!1,we.h||we);if(!jn)break;we.g[jn.key]=jn}we=K.H?X(K.H):{},K.m?(K.u||(K.u="POST"),we["Content-Type"]="application/x-www-form-urlencoded",K.g.ea(K.A,K.u,K.m,we)):(K.u="GET",K.g.ea(K.A,K.u,null,we)),Ad(),Nr(K.i,K.u,K.A,K.l,K.R,K.m)}Hs.prototype.ca=function(K){K=K.target;let we=this.M;we&&Go(K)==3?we.j():this.Y(K)},Hs.prototype.Y=function(K){try{if(K==this.g)e:{let yo=Go(this.g);var we=this.g.Ba();let uu=this.g.Z();if(!(3>yo)&&(yo!=3||this.g&&(this.h.h||this.g.oa()||k1(this.g)))){this.J||yo!=4||we==7||(we==8||0>=uu?Ad(3):Ad(2)),dp(this);var Oe=this.g.Z();this.X=Oe;t:if(Wh(this)){var mt=k1(this.g);K="";var vi=mt.length,Bi=Go(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){ch(this),vd(this);var jn="";break t}this.h.i=new a.TextDecoder}for(we=0;we<vi;we++)this.h.h=!0,K+=this.h.i.decode(mt[we],{stream:!(Bi&&we==vi-1)});mt.length=0,this.h.g+=K,this.C=0,jn=this.h.g}else jn=this.g.oa();if(this.o=Oe==200,Ql(this.i,this.u,this.A,this.l,this.R,yo,Oe),this.o){if(this.T&&!this.K){t:{if(this.g){var Vr,El=this.g;if((Vr=El.g?El.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!M(Vr)){var Lo=Vr;break t}}Lo=null}if(Oe=Lo)ro(this.i,this.l,Oe,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,T1(this,Oe);else{this.o=!1,this.s=3,_a(12),ch(this),vd(this);break e}}if(this.P){Oe=!0;let zl;for(;!this.J&&this.C<jn.length;)if(zl=gd(this,jn),zl==Js){yo==4&&(this.s=4,_a(14),Oe=!1),ro(this.i,this.l,null,"[Incomplete Response]");break}else if(zl==Mo){this.s=4,_a(15),ro(this.i,this.l,jn,"[Invalid Chunk]"),Oe=!1;break}else ro(this.i,this.l,zl,null),T1(this,zl);if(Wh(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),yo!=4||jn.length!=0||this.h.h||(this.s=1,_a(16),Oe=!1),this.o=this.o&&Oe,!Oe)ro(this.i,this.l,jn,"[Invalid Chunked Response]"),ch(this),vd(this);else if(0<jn.length&&!this.W){this.W=!0;var Er=this.j;Er.g==this&&Er.ba&&!Er.M&&(Er.j.info("Great, no buffering proxy detected. Bytes received: "+jn.length),Oi(Er),Er.M=!0,_a(11))}}else ro(this.i,this.l,jn,null),T1(this,jn);yo==4&&ch(this),this.o&&!this.J&&(yo==4?Ao(this.j,this):(this.o=!1,eo(this)))}else H(this.g),Oe==400&&0<jn.indexOf("Unknown SID")?(this.s=3,_a(12)):(this.s=0,_a(13)),ch(this),vd(this)}}}catch{}finally{}};function Wh(K){return K.g?K.u=="GET"&&K.L!=2&&K.j.Ca:!1}function gd(K,we){var Oe=K.C,mt=we.indexOf(`
`,Oe);return mt==-1?Js:(Oe=Number(we.substring(Oe,mt)),isNaN(Oe)?Mo:(mt+=1,mt+Oe>we.length?Js:(we=we.slice(mt,mt+Oe),K.C=mt+Oe,we)))}Hs.prototype.cancel=function(){this.J=!0,ch(this)};function eo(K){K.S=Date.now()+K.I,Tu(K,K.I)}function Tu(K,we){if(K.B!=null)throw Error("WatchDog timer not null");K.B=fr(m(K.ba,K),we)}function dp(K){K.B&&(a.clearTimeout(K.B),K.B=null)}Hs.prototype.ba=function(){this.B=null;let K=Date.now();0<=K-this.S?(Ra(this.i,this.A),this.L!=2&&(Ad(),_a(17)),ch(this),this.s=2,vd(this)):Tu(this,this.S-K)};function vd(K){K.j.G==0||K.J||Ao(K.j,K)}function ch(K){dp(K);var we=K.M;we&&typeof we.ma=="function"&&we.ma(),K.M=null,Nl(K.U),K.g&&(we=K.g,K.g=null,we.abort(),we.ma())}function T1(K,we){try{var Oe=K.j;if(Oe.G!=0&&(Oe.g==K||vl(Oe.h,K))){if(!K.K&&vl(Oe.h,K)&&Oe.G==3){try{var mt=Oe.Da.g.parse(we)}catch{mt=null}if(Array.isArray(mt)&&mt.length==3){var vi=mt;if(vi[0]==0){e:if(!Oe.u){if(Oe.g)if(Oe.g.F+3e3<K.F)Io(Oe),He(Oe);else break e;Ii(Oe),_a(18)}}else Oe.za=vi[1],0<Oe.za-Oe.T&&37500>vi[2]&&Oe.F&&Oe.v==0&&!Oe.C&&(Oe.C=fr(m(Oe.Za,Oe),6e3));if(1>=up(Oe.h)&&Oe.ca){try{Oe.ca()}catch{}Oe.ca=void 0}}else Ea(Oe,11)}else if((K.K||Oe.g==K)&&Io(Oe),!M(we))for(vi=Oe.Da.g.parse(we),we=0;we<vi.length;we++){let Lo=vi[we];if(Oe.T=Lo[0],Lo=Lo[1],Oe.G==2)if(Lo[0]=="c"){Oe.K=Lo[1],Oe.ia=Lo[2];let Er=Lo[3];Er!=null&&(Oe.la=Er,Oe.j.info("VER="+Oe.la));let yo=Lo[4];yo!=null&&(Oe.Aa=yo,Oe.j.info("SVER="+Oe.Aa));let uu=Lo[5];uu!=null&&typeof uu=="number"&&0<uu&&(mt=1.5*uu,Oe.L=mt,Oe.j.info("backChannelRequestTimeoutMs_="+mt)),mt=Oe;let zl=K.g;if(zl){let Mu=zl.g?zl.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(Mu){var Bi=mt.h;Bi.g||Mu.indexOf("spdy")==-1&&Mu.indexOf("quic")==-1&&Mu.indexOf("h2")==-1||(Bi.j=Bi.l,Bi.g=new Set,Bi.h&&(Jl(Bi,Bi.h),Bi.h=null))}if(mt.D){let Of=zl.g?zl.g.getResponseHeader("X-HTTP-Session-Id"):null;Of&&(mt.ya=Of,Yo(mt.I,mt.D,Of))}}Oe.G=3,Oe.l&&Oe.l.ua(),Oe.ba&&(Oe.R=Date.now()-K.F,Oe.j.info("Handshake RTT: "+Oe.R+"ms")),mt=Oe;var jn=K;if(mt.qa=rd(mt,mt.J?mt.ia:null,mt.W),jn.K){Du(mt.h,jn);var Vr=jn,El=mt.L;El&&(Vr.I=El),Vr.B&&(dp(Vr),eo(Vr)),mt.g=jn}else nn(mt);0<Oe.i.length&&ct(Oe)}else Lo[0]!="stop"&&Lo[0]!="close"||Ea(Oe,7);else Oe.G==3&&(Lo[0]=="stop"||Lo[0]=="close"?Lo[0]=="stop"?Ea(Oe,7):ke(Oe):Lo[0]!="noop"&&Oe.l&&Oe.l.ta(Lo),Oe.v=0)}}Ad(4)}catch{}}var Wm=class{constructor(K,we){this.g=K,this.map=we}};function ia(K){this.l=K||10,a.PerformanceNavigationTiming?(K=a.performance.getEntriesByType("navigation"),K=0<K.length&&(K[0].nextHopProtocol=="hq"||K[0].nextHopProtocol=="h2")):K=!!(a.chrome&&a.chrome.loadTimes&&a.chrome.loadTimes()&&a.chrome.loadTimes().wasFetchedViaSpdy),this.j=K?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function Fa(K){return K.h?!0:K.g?K.g.size>=K.j:!1}function up(K){return K.h?1:K.g?K.g.size:0}function vl(K,we){return K.h?K.h==we:K.g?K.g.has(we):!1}function Jl(K,we){K.g?K.g.add(we):K.h=we}function Du(K,we){K.h&&K.h==we?K.h=null:K.g&&K.g.has(we)&&K.g.delete(we)}ia.prototype.cancel=function(){if(this.i=uo(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(let K of this.g.values())K.cancel();this.g.clear()}};function uo(K){if(K.h!=null)return K.i.concat(K.h.D);if(K.g!=null&&K.g.size!==0){let we=K.i;for(let Oe of K.g.values())we=we.concat(Oe.D);return we}return x(K.i)}function yl(K){if(K.V&&typeof K.V=="function")return K.V();if(typeof Map<"u"&&K instanceof Map||typeof Set<"u"&&K instanceof Set)return Array.from(K.values());if(typeof K=="string")return K.split("");if(l(K)){for(var we=[],Oe=K.length,mt=0;mt<Oe;mt++)we.push(K[mt]);return we}we=[],Oe=0;for(mt in K)we[Oe++]=K[mt];return we}function Bp(K){if(K.na&&typeof K.na=="function")return K.na();if(!K.V||typeof K.V!="function"){if(typeof Map<"u"&&K instanceof Map)return Array.from(K.keys());if(!(typeof Set<"u"&&K instanceof Set)){if(l(K)||typeof K=="string"){var we=[];K=K.length;for(var Oe=0;Oe<K;Oe++)we.push(Oe);return we}we=[],Oe=0;for(let mt in K)we[Oe++]=mt;return we}}}function zp(K,we){if(K.forEach&&typeof K.forEach=="function")K.forEach(we,void 0);else if(l(K)||typeof K=="string")Array.prototype.forEach.call(K,we,void 0);else for(var Oe=Bp(K),mt=yl(K),vi=mt.length,Bi=0;Bi<vi;Bi++)we.call(void 0,mt[Bi],Oe&&Oe[Bi],K)}var id=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Bc(K,we){if(K){K=K.split("&");for(var Oe=0;Oe<K.length;Oe++){var mt=K[Oe].indexOf("="),vi=null;if(0<=mt){var Bi=K[Oe].substring(0,mt);vi=K[Oe].substring(mt+1)}else Bi=K[Oe];we(Bi,vi?decodeURIComponent(vi.replace(/\+/g," ")):"")}}}function ec(K){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,K instanceof ec){this.h=K.h,bo(this,K.j),this.o=K.o,this.g=K.g,ba(this,K.s),this.l=K.l;var we=K.i,Oe=new Hp;Oe.i=we.i,we.g&&(Oe.g=new Map(we.g),Oe.h=we.h),Bl(this,Oe),this.m=K.m}else K&&(we=String(K).match(id))?(this.h=!1,bo(this,we[1]||"",!0),this.o=mc(we[2]||""),this.g=mc(we[3]||"",!0),ba(this,we[4]),this.l=mc(we[5]||"",!0),Bl(this,we[6]||"",!0),this.m=mc(we[7]||"")):(this.h=!1,this.i=new Hp(null,this.h))}ec.prototype.toString=function(){var K=[],we=this.j;we&&K.push(Pd(we,hp,!0),":");var Oe=this.g;return(Oe||we=="file")&&(K.push("//"),(we=this.o)&&K.push(Pd(we,hp,!0),"@"),K.push(encodeURIComponent(String(Oe)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),Oe=this.s,Oe!=null&&K.push(":",String(Oe))),(Oe=this.l)&&(this.g&&Oe.charAt(0)!="/"&&K.push("/"),K.push(Pd(Oe,Oe.charAt(0)=="/"?$u:Uh,!0))),(Oe=this.i.toString())&&K.push("?",Oe),(Oe=this.m)&&K.push("#",Pd(Oe,Ff)),K.join("")};function yd(K){return new ec(K)}function bo(K,we,Oe){K.j=Oe?mc(we,!0):we,K.j&&(K.j=K.j.replace(/:$/,""))}function ba(K,we){if(we){if(we=Number(we),isNaN(we)||0>we)throw Error("Bad port number "+we);K.s=we}else K.s=null}function Bl(K,we,Oe){we instanceof Hp?(K.i=we,Gp(K.i,K.h)):(Oe||(we=Pd(we,Um)),K.i=new Hp(we,K.h))}function Yo(K,we,Oe){K.i.set(we,Oe)}function dh(K){return Yo(K,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),K}function mc(K,we){return K?we?decodeURI(K.replace(/%25/g,"%2525")):decodeURIComponent(K):""}function Pd(K,we,Oe){return typeof K=="string"?(K=encodeURI(K).replace(we,ju),Oe&&(K=K.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),K):null}function ju(K){return K=K.charCodeAt(0),"%"+(K>>4&15).toString(16)+(K&15).toString(16)}var hp=/[#\/\?@]/g,Uh=/[#\?:]/g,$u=/[#\?]/g,Um=/[#\?@]/g,Ff=/#/g;function Hp(K,we){this.h=this.g=null,this.i=K||null,this.j=!!we}function Eu(K){K.g||(K.g=new Map,K.h=0,K.i&&Bc(K.i,function(we,Oe){K.add(decodeURIComponent(we.replace(/\+/g," ")),Oe)}))}t=Hp.prototype,t.add=function(K,we){Eu(this),this.i=null,K=pp(this,K);var Oe=this.g.get(K);return Oe||this.g.set(K,Oe=[]),Oe.push(we),this.h+=1,this};function wo(K,we){Eu(K),we=pp(K,we),K.g.has(we)&&(K.i=null,K.h-=K.g.get(we).length,K.g.delete(we))}function uh(K,we){return Eu(K),we=pp(K,we),K.g.has(we)}t.forEach=function(K,we){Eu(this),this.g.forEach(function(Oe,mt){Oe.forEach(function(vi){K.call(we,vi,mt,this)},this)},this)},t.na=function(){Eu(this);let K=Array.from(this.g.values()),we=Array.from(this.g.keys()),Oe=[];for(let mt=0;mt<we.length;mt++){let vi=K[mt];for(let Bi=0;Bi<vi.length;Bi++)Oe.push(we[mt])}return Oe},t.V=function(K){Eu(this);let we=[];if(typeof K=="string")uh(this,K)&&(we=we.concat(this.g.get(pp(this,K))));else{K=Array.from(this.g.values());for(let Oe=0;Oe<K.length;Oe++)we=we.concat(K[Oe])}return we},t.set=function(K,we){return Eu(this),this.i=null,K=pp(this,K),uh(this,K)&&(this.h-=this.g.get(K).length),this.g.set(K,[we]),this.h+=1,this},t.get=function(K,we){return K?(K=this.V(K),0<K.length?String(K[0]):we):we};function rl(K,we,Oe){wo(K,we),0<Oe.length&&(K.i=null,K.g.set(pp(K,we),x(Oe)),K.h+=Oe.length)}t.toString=function(){if(this.i)return this.i;if(!this.g)return"";let K=[],we=Array.from(this.g.keys());for(var Oe=0;Oe<we.length;Oe++){var mt=we[Oe];let Bi=encodeURIComponent(String(mt)),jn=this.V(mt);for(mt=0;mt<jn.length;mt++){var vi=Bi;jn[mt]!==""&&(vi+="="+encodeURIComponent(String(jn[mt]))),K.push(vi)}}return this.i=K.join("&")};function pp(K,we){return we=String(we),K.j&&(we=we.toLowerCase()),we}function Gp(K,we){we&&!K.j&&(Eu(K),K.i=null,K.g.forEach(function(Oe,mt){var vi=mt.toLowerCase();mt!=vi&&(wo(this,mt),rl(this,vi,Oe))},K)),K.j=we}function d0(K,we){let Oe=new Qs;if(a.Image){let mt=new Image;mt.onload=f(nd,Oe,"TestLoadImage: loaded",!0,we,mt),mt.onerror=f(nd,Oe,"TestLoadImage: error",!1,we,mt),mt.onabort=f(nd,Oe,"TestLoadImage: abort",!1,we,mt),mt.ontimeout=f(nd,Oe,"TestLoadImage: timeout",!1,we,mt),a.setTimeout(function(){mt.ontimeout&&mt.ontimeout()},1e4),mt.src=K}else we(!1)}function jm(K,we){let Oe=new Qs,mt=new AbortController,vi=setTimeout(()=>{mt.abort(),nd(Oe,"TestPingServer: timeout",!1,we)},1e4);fetch(K,{signal:mt.signal}).then(Bi=>{clearTimeout(vi),Bi.ok?nd(Oe,"TestPingServer: ok",!0,we):nd(Oe,"TestPingServer: server error",!1,we)}).catch(()=>{clearTimeout(vi),nd(Oe,"TestPingServer: error",!1,we)})}function nd(K,we,Oe,mt,vi){try{vi&&(vi.onload=null,vi.onerror=null,vi.onabort=null,vi.ontimeout=null),mt(Oe)}catch{}}function D1(){this.g=new Rf}function Lf(K,we,Oe){let mt=Oe||"";try{zp(K,function(vi,Bi){let jn=vi;c(vi)&&(jn=zh(vi)),we.push(mt+Bi+"="+encodeURIComponent(jn))})}catch(vi){throw we.push(mt+"type="+encodeURIComponent("_badmap")),vi}}function Yr(K){this.l=K.Ub||null,this.j=K.eb||!1}_(Yr,Id),Yr.prototype.g=function(){return new ps(this.l,this.j)},Yr.prototype.i=function(K){return function(){return K}}({});function ps(K,we){co.call(this),this.D=K,this.o=we,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}_(ps,co),t=ps.prototype,t.open=function(K,we){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=K,this.A=we,this.readyState=1,Ku(this)},t.send=function(K){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;let we={headers:this.u,method:this.B,credentials:this.m,cache:void 0};K&&(we.body=K),(this.D||a).fetch(new Request(this.A,we)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,hh(this)),this.readyState=0},t.Sa=function(K){if(this.g&&(this.l=K,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=K.headers,this.readyState=2,Ku(this)),this.g&&(this.readyState=3,Ku(this),this.g)))if(this.responseType==="arraybuffer")K.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof a.ReadableStream<"u"&&"body"in K){if(this.j=K.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;$m(this)}else K.text().then(this.Ra.bind(this),this.ga.bind(this))};function $m(K){K.j.read().then(K.Pa.bind(K)).catch(K.ga.bind(K))}t.Pa=function(K){if(this.g){if(this.o&&K.value)this.response.push(K.value);else if(!this.o){var we=K.value?K.value:new Uint8Array(0);(we=this.v.decode(we,{stream:!K.done}))&&(this.response=this.responseText+=we)}K.done?hh(this):Ku(this),this.readyState==3&&$m(this)}},t.Ra=function(K){this.g&&(this.response=this.responseText=K,hh(this))},t.Qa=function(K){this.g&&(this.response=K,hh(this))},t.ga=function(){this.g&&hh(this)};function hh(K){K.readyState=4,K.l=null,K.j=null,K.v=null,Ku(K)}t.setRequestHeader=function(K,we){this.u.append(K,we)},t.getResponseHeader=function(K){return this.h&&this.h.get(K.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";let K=[],we=this.h.entries();for(var Oe=we.next();!Oe.done;)Oe=Oe.value,K.push(Oe[0]+": "+Oe[1]),Oe=we.next();return K.join(`\r
`)};function Ku(K){K.onreadystatechange&&K.onreadystatechange.call(K)}Object.defineProperty(ps.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(K){this.m=K?"include":"same-origin"}});function E1(K){let we="";return A(K,function(Oe,mt){we+=mt,we+=":",we+=Oe,we+=`\r
`}),we}function Wp(K,we,Oe){e:{for(mt in Oe){var mt=!1;break e}mt=!0}mt||(Oe=E1(Oe),typeof K=="string"?Oe!=null&&encodeURIComponent(String(Oe)):Yo(K,we,Oe))}function Dl(K){co.call(this),this.headers=new Map,this.o=K||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}_(Dl,co);var M1=/^https?$/i,Ca=["POST","PUT"];t=Dl.prototype,t.Ha=function(K){this.J=K},t.ea=function(K,we,Oe,mt){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+K);we=we?we.toUpperCase():"GET",this.D=K,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():Gh.g(),this.v=this.o?aa(this.o):aa(Gh),this.g.onreadystatechange=m(this.Ea,this);try{this.B=!0,this.g.open(we,String(K),!0),this.B=!1}catch(Bi){la(this,Bi);return}if(K=Oe||"",Oe=new Map(this.headers),mt)if(Object.getPrototypeOf(mt)===Object.prototype)for(var vi in mt)Oe.set(vi,mt[vi]);else if(typeof mt.keys=="function"&&typeof mt.get=="function")for(let Bi of mt.keys())Oe.set(Bi,mt.get(Bi));else throw Error("Unknown input type for opt_headers: "+String(mt));mt=Array.from(Oe.keys()).find(Bi=>Bi.toLowerCase()=="content-type"),vi=a.FormData&&K instanceof a.FormData,!(0<=Array.prototype.indexOf.call(Ca,we,void 0))||mt||vi||Oe.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(let[Bi,jn]of Oe)this.g.setRequestHeader(Bi,jn);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{_d(this),this.u=!0,this.g.send(K),this.u=!1}catch(Bi){la(this,Bi)}};function la(K,we){K.h=!1,K.g&&(K.j=!0,K.g.abort(),K.j=!1),K.l=we,K.m=5,oc(K),Fs(K)}function oc(K){K.A||(K.A=!0,Zn(K,"complete"),Zn(K,"error"))}t.abort=function(K){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=K||7,Zn(this,"complete"),Zn(this,"abort"),Fs(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Fs(this,!0)),Dl.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?fc(this):this.bb())},t.bb=function(){fc(this)};function fc(K){if(K.h&&typeof o<"u"&&(!K.v[1]||Go(K)!=4||K.Z()!=2)){if(K.u&&Go(K)==4)sc(K.Ea,0,K);else if(Zn(K,"readystatechange"),Go(K)==4){K.h=!1;try{let jn=K.Z();e:switch(jn){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var we=!0;break e;default:we=!1}var Oe;if(!(Oe=we)){var mt;if(mt=jn===0){var vi=String(K.D).match(id)[1]||null;!vi&&a.self&&a.self.location&&(vi=a.self.location.protocol.slice(0,-1)),mt=!M1.test(vi?vi.toLowerCase():"")}Oe=mt}if(Oe)Zn(K,"complete"),Zn(K,"success");else{K.m=6;try{var Bi=2<Go(K)?K.g.statusText:""}catch{Bi=""}K.l=Bi+" ["+K.Z()+"]",oc(K)}}finally{Fs(K)}}}}function Fs(K,we){if(K.g){_d(K);let Oe=K.g,mt=K.v[0]?()=>{}:null;K.g=null,K.v=null,we||Zn(K,"ready");try{Oe.onreadystatechange=mt}catch{}}}function _d(K){K.I&&(a.clearTimeout(K.I),K.I=null)}t.isActive=function(){return!!this.g};function Go(K){return K.g?K.g.readyState:0}t.Z=function(){try{return 2<Go(this)?this.g.status:-1}catch{return-1}},t.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},t.Oa=function(K){if(this.g){var we=this.g.responseText;return K&&we.indexOf(K)==0&&(we=we.substring(K.length)),Hh(we)}};function k1(K){try{if(!K.g)return null;if("response"in K.g)return K.g.response;switch(K.H){case"":case"text":return K.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in K.g)return K.g.mozResponseArrayBuffer}return null}catch{return null}}function H(K){let we={};K=(K.g&&2<=Go(K)&&K.g.getAllResponseHeaders()||"").split(`\r
`);for(let mt=0;mt<K.length;mt++){if(M(K[mt]))continue;var Oe=ce(K[mt]);let vi=Oe[0];if(Oe=Oe[1],typeof Oe!="string")continue;Oe=Oe.trim();let Bi=we[vi]||[];we[vi]=Bi,Bi.push(Oe)}Y(we,function(mt){return mt.join(", ")})}t.Ba=function(){return this.m},t.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function te(K,we,Oe){return Oe&&Oe.internalChannelParams&&Oe.internalChannelParams[K]||we}function ge(K){this.Aa=0,this.i=[],this.j=new Qs,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=te("failFast",!1,K),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=te("baseRetryDelayMs",5e3,K),this.cb=te("retryDelaySeedMs",1e4,K),this.Wa=te("forwardChannelMaxRetries",2,K),this.wa=te("forwardChannelRequestTimeoutMs",2e4,K),this.pa=K&&K.xmlHttpFactory||void 0,this.Xa=K&&K.Tb||void 0,this.Ca=K&&K.useFetchStreams||!1,this.L=void 0,this.J=K&&K.supportsCrossDomainXhr||!1,this.K="",this.h=new ia(K&&K.concurrentRequestLimit),this.Da=new D1,this.P=K&&K.fastHandshake||!1,this.O=K&&K.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=K&&K.Rb||!1,K&&K.xa&&this.j.xa(),K&&K.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&K&&K.detectBufferingProxy||!1,this.ja=void 0,K&&K.longPollingTimeout&&0<K.longPollingTimeout&&(this.ja=K.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}t=ge.prototype,t.la=8,t.G=1,t.connect=function(K,we,Oe,mt){_a(0),this.W=K,this.H=we||{},Oe&&mt!==void 0&&(this.H.OSID=Oe,this.H.OAID=mt),this.F=this.X,this.I=rd(this,null,this.W),ct(this)};function ke(K){if(Ne(K),K.G==3){var we=K.U++,Oe=yd(K.I);if(Yo(Oe,"SID",K.K),Yo(Oe,"RID",we),Yo(Oe,"TYPE","terminate"),hi(K,Oe),we=new Hs(K,K.j,we),we.L=2,we.v=dh(yd(Oe)),Oe=!1,a.navigator&&a.navigator.sendBeacon)try{Oe=a.navigator.sendBeacon(we.v.toString(),"")}catch{}!Oe&&a.Image&&(new Image().src=we.v,Oe=!0),Oe||(we.g=Ro(we.j,null),we.g.ea(we.v)),we.F=Date.now(),eo(we)}$d(K)}function He(K){K.g&&(Oi(K),K.g.cancel(),K.g=null)}function Ne(K){He(K),K.u&&(a.clearTimeout(K.u),K.u=null),Io(K),K.h.cancel(),K.s&&(typeof K.s=="number"&&a.clearTimeout(K.s),K.s=null)}function ct(K){if(!Fa(K.h)&&!K.s){K.s=!0;var we=K.Ga;Ge||ft(),Ae||(Ge(),Ae=!0),Ye.add(we,K),K.B=0}}function kt(K,we){return up(K.h)>=K.h.j-(K.s?1:0)?!1:K.s?(K.i=we.D.concat(K.i),!0):K.G==1||K.G==2||K.B>=(K.Va?0:K.Wa)?!1:(K.s=fr(m(K.Ga,K,we),sl(K,K.B)),K.B++,!0)}t.Ga=function(K){if(this.s)if(this.s=null,this.G==1){if(!K){this.U=Math.floor(1e5*Math.random()),K=this.U++;let vi=new Hs(this,this.j,K),Bi=this.o;if(this.S&&(Bi?(Bi=X(Bi),pe(Bi,this.S)):Bi=this.S),this.m!==null||this.O||(vi.H=Bi,Bi=null),this.P)e:{for(var we=0,Oe=0;Oe<this.i.length;Oe++){t:{var mt=this.i[Oe];if("__data__"in mt.map&&(mt=mt.map.__data__,typeof mt=="string")){mt=mt.length;break t}mt=void 0}if(mt===void 0)break;if(we+=mt,4096<we){we=Oe;break e}if(we===4096||Oe===this.i.length-1){we=Oe+1;break e}}we=1e3}else we=1e3;we=Li(this,vi,we),Oe=yd(this.I),Yo(Oe,"RID",K),Yo(Oe,"CVER",22),this.D&&Yo(Oe,"X-HTTP-Session-Id",this.D),hi(this,Oe),Bi&&(this.O?we="headers="+encodeURIComponent(String(E1(Bi)))+"&"+we:this.m&&Wp(Oe,this.m,Bi)),Jl(this.h,vi),this.Ua&&Yo(Oe,"TYPE","init"),this.P?(Yo(Oe,"$req",we),Yo(Oe,"SID","null"),vi.T=!0,td(vi,Oe,null)):td(vi,Oe,we),this.G=2}}else this.G==3&&(K?Ht(this,K):this.i.length==0||Fa(this.h)||Ht(this))};function Ht(K,we){var Oe;we?Oe=we.l:Oe=K.U++;let mt=yd(K.I);Yo(mt,"SID",K.K),Yo(mt,"RID",Oe),Yo(mt,"AID",K.T),hi(K,mt),K.m&&K.o&&Wp(mt,K.m,K.o),Oe=new Hs(K,K.j,Oe,K.B+1),K.m===null&&(Oe.H=K.o),we&&(K.i=we.D.concat(K.i)),we=Li(K,Oe,1e3),Oe.I=Math.round(.5*K.wa)+Math.round(.5*K.wa*Math.random()),Jl(K.h,Oe),td(Oe,mt,we)}function hi(K,we){K.H&&A(K.H,function(Oe,mt){Yo(we,mt,Oe)}),K.l&&zp({},function(Oe,mt){Yo(we,mt,Oe)})}function Li(K,we,Oe){Oe=Math.min(K.i.length,Oe);var mt=K.l?m(K.l.Na,K.l,K):null;e:{var vi=K.i;let Bi=-1;for(;;){let jn=["count="+Oe];Bi==-1?0<Oe?(Bi=vi[0].g,jn.push("ofs="+Bi)):Bi=0:jn.push("ofs="+Bi);let Vr=!0;for(let El=0;El<Oe;El++){let Lo=vi[El].g,Er=vi[El].map;if(Lo-=Bi,0>Lo)Bi=Math.max(0,vi[El].g-100),Vr=!1;else try{Lf(Er,jn,"req"+Lo+"_")}catch{mt&&mt(Er)}}if(Vr){mt=jn.join("&");break e}}}return K=K.i.splice(0,Oe),we.D=K,mt}function nn(K){if(!K.g&&!K.u){K.Y=1;var we=K.Fa;Ge||ft(),Ae||(Ge(),Ae=!0),Ye.add(we,K),K.v=0}}function Ii(K){return K.g||K.u||3<=K.v?!1:(K.Y++,K.u=fr(m(K.Fa,K),sl(K,K.v)),K.v++,!0)}t.Fa=function(){if(this.u=null,is(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var K=2*this.R;this.j.info("BP detection timer enabled: "+K),this.A=fr(m(this.ab,this),K)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,_a(10),He(this),is(this))};function Oi(K){K.A!=null&&(a.clearTimeout(K.A),K.A=null)}function is(K){K.g=new Hs(K,K.j,"rpc",K.Y),K.m===null&&(K.g.H=K.o),K.g.O=0;var we=yd(K.qa);Yo(we,"RID","rpc"),Yo(we,"SID",K.K),Yo(we,"AID",K.T),Yo(we,"CI",K.F?"0":"1"),!K.F&&K.ja&&Yo(we,"TO",K.ja),Yo(we,"TYPE","xmlhttp"),hi(K,we),K.m&&K.o&&Wp(we,K.m,K.o),K.L&&(K.g.I=K.L);var Oe=K.g;K=K.ia,Oe.L=1,Oe.v=dh(yd(we)),Oe.m=null,Oe.P=!0,Ec(Oe,K)}t.Za=function(){this.C!=null&&(this.C=null,He(this),Ii(this),_a(19))};function Io(K){K.C!=null&&(a.clearTimeout(K.C),K.C=null)}function Ao(K,we){var Oe=null;if(K.g==we){Io(K),Oi(K),K.g=null;var mt=2}else if(vl(K.h,we))Oe=we.D,Du(K.h,we),mt=1;else return;if(K.G!=0){if(we.o)if(mt==1){Oe=we.m?we.m.length:0,we=Date.now()-we.F;var vi=K.B;mt=ja(),Zn(mt,new fd(mt,Oe)),ct(K)}else nn(K);else if(vi=we.s,vi==3||vi==0&&0<we.X||!(mt==1&&kt(K,we)||mt==2&&Ii(K)))switch(Oe&&0<Oe.length&&(we=K.h,we.i=we.i.concat(Oe)),vi){case 1:Ea(K,5);break;case 4:Ea(K,10);break;case 3:Ea(K,6);break;default:Ea(K,2)}}}function sl(K,we){let Oe=K.Ta+Math.floor(Math.random()*K.cb);return K.isActive()||(Oe*=2),Oe*we}function Ea(K,we){if(K.j.info("Error code "+we),we==2){var Oe=m(K.fb,K),mt=K.Xa;let vi=!mt;mt=new ec(mt||"//www.google.com/images/cleardot.gif"),a.location&&a.location.protocol=="http"||bo(mt,"https"),dh(mt),vi?d0(mt.toString(),Oe):jm(mt.toString(),Oe)}else _a(2);K.G=0,K.l&&K.l.sa(we),$d(K),Ne(K)}t.fb=function(K){K?(this.j.info("Successfully pinged google.com"),_a(2)):(this.j.info("Failed to ping google.com"),_a(1))};function $d(K){if(K.G=0,K.ka=[],K.l){let we=uo(K.h);(we.length!=0||K.i.length!=0)&&(D(K.ka,we),D(K.ka,K.i),K.h.i.length=0,x(K.i),K.i.length=0),K.l.ra()}}function rd(K,we,Oe){var mt=Oe instanceof ec?yd(Oe):new ec(Oe);if(mt.g!="")we&&(mt.g=we+"."+mt.g),ba(mt,mt.s);else{var vi=a.location;mt=vi.protocol,we=we?we+"."+vi.hostname:vi.hostname,vi=+vi.port;var Bi=new ec(null);mt&&bo(Bi,mt),we&&(Bi.g=we),vi&&ba(Bi,vi),Oe&&(Bi.l=Oe),mt=Bi}return Oe=K.D,we=K.ya,Oe&&we&&Yo(mt,Oe,we),Yo(mt,"VER",K.la),hi(K,mt),mt}function Ro(K,we,Oe){if(we&&!K.J)throw Error("Can't create secondary domain capable XhrIo object.");return we=K.Ca&&!K.pa?new Dl(new Yr({eb:Oe})):new Dl(K.pa),we.Ha(K.J),we}t.isActive=function(){return!!this.l&&this.l.isActive(this)};function gc(){}t=gc.prototype,t.ua=function(){},t.ta=function(){},t.sa=function(){},t.ra=function(){},t.isActive=function(){return!0},t.Na=function(){};function ho(){}ho.prototype.g=function(K,we){return new Fo(K,we)};function Fo(K,we){co.call(this),this.g=new ge(we),this.l=K,this.h=we&&we.messageUrlParams||null,K=we&&we.messageHeaders||null,we&&we.clientProtocolHeaderRequired&&(K?K["X-Client-Protocol"]="webchannel":K={"X-Client-Protocol":"webchannel"}),this.g.o=K,K=we&&we.initMessageHeaders||null,we&&we.messageContentType&&(K?K["X-WebChannel-Content-Type"]=we.messageContentType:K={"X-WebChannel-Content-Type":we.messageContentType}),we&&we.va&&(K?K["X-WebChannel-Client-Profile"]=we.va:K={"X-WebChannel-Client-Profile":we.va}),this.g.S=K,(K=we&&we.Sb)&&!M(K)&&(this.g.m=K),this.v=we&&we.supportsCrossDomainXhr||!1,this.u=we&&we.sendRawJson||!1,(we=we&&we.httpSessionIdParam)&&!M(we)&&(this.g.D=we,K=this.h,K!==null&&we in K&&(K=this.h,we in K&&delete K[we])),this.j=new Mc(this)}_(Fo,co),Fo.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},Fo.prototype.close=function(){ke(this.g)},Fo.prototype.o=function(K){var we=this.g;if(typeof K=="string"){var Oe={};Oe.__data__=K,K=Oe}else this.u&&(Oe={},Oe.__data__=zh(K),K=Oe);we.i.push(new Wm(we.Ya++,K)),we.G==3&&ct(we)},Fo.prototype.N=function(){this.g.l=null,delete this.j,ke(this.g),delete this.g,Fo.aa.N.call(this)};function zc(K){$i.call(this),K.__headers__&&(this.headers=K.__headers__,this.statusCode=K.__status__,delete K.__headers__,delete K.__status__);var we=K.__sm__;if(we){e:{for(let Oe in we){K=Oe;break e}K=void 0}(this.i=K)&&(K=this.i,we=we!==null&&K in we?we[K]:void 0),this.data=we}else this.data=K}_(zc,$i);function Cd(){md.call(this),this.status=1}_(Cd,md);function Mc(K){this.g=K}_(Mc,gc),Mc.prototype.ua=function(){Zn(this.g,"a")},Mc.prototype.ta=function(K){Zn(this.g,new zc(K))},Mc.prototype.sa=function(K){Zn(this.g,new Cd)},Mc.prototype.ra=function(){Zn(this.g,"b")},ho.prototype.createWebChannel=ho.prototype.g,Fo.prototype.send=Fo.prototype.o,Fo.prototype.open=Fo.prototype.m,Fo.prototype.close=Fo.prototype.close,Jfe=Y8.createWebChannelTransport=function(){return new ho},Qfe=Y8.getStatEventTarget=function(){return ja()},Xfe=Y8.Event=Vl,mY=Y8.Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},$a.NO_ERROR=0,$a.TIMEOUT=8,$a.HTTP_ERROR=6,bV=Y8.ErrorCode=$a,Da.COMPLETE="complete",Zfe=Y8.EventType=Da,jd.EventType=du,du.OPEN="a",du.CLOSE="b",du.ERROR="c",du.MESSAGE="d",co.prototype.listen=co.prototype.K,oI=Y8.WebChannel=jd,qfe=Y8.FetchXmlHttpFactory=Yr,Dl.prototype.listenOnce=Dl.prototype.L,Dl.prototype.getLastError=Dl.prototype.Ka,Dl.prototype.getLastErrorCode=Dl.prototype.Ba,Dl.prototype.getStatus=Dl.prototype.Z,Dl.prototype.getResponseJson=Dl.prototype.Oa,Dl.prototype.getResponseText=Dl.prototype.oa,Dl.prototype.send=Dl.prototype.ea,Dl.prototype.setWithCredentials=Dl.prototype.Ha,Yfe=Y8.XhrIo=Dl}).apply(typeof pY<"u"?pY:typeof self<"u"?self:typeof window<"u"?window:{})});function uI(){return r7.logLevel}function _Oe(t){r7.setLogLevel(t)}function Jn(t,...e){if(r7.logLevel<=L_.DEBUG){let n=e.map(i2e);r7.debug(`Firestore (${NI}): ${t}`,...n)}}function xm(t,...e){if(r7.logLevel<=L_.ERROR){let n=e.map(i2e);r7.error(`Firestore (${NI}): ${t}`,...n)}}function Vv(t,...e){if(r7.logLevel<=L_.WARN){let n=e.map(i2e);r7.warn(`Firestore (${NI}): ${t}`,...n)}}function i2e(t){if(typeof t=="string")return t;try{return function(n){return JSON.stringify(n)}(t)}catch{return t}}function Ws(t="Unexpected state"){let e=`FIRESTORE (${NI}) INTERNAL ASSERTION FAILED: `+t;throw xm(e),new Error(e)}function To(t,e){t||Ws()}function COe(t,e){t||Ws()}function ms(t,e){return t}function tPt(t){let e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let i=0;i<t;i++)n[i]=Math.floor(256*Math.random());return n}function el(t,e){return t<e?-1:t>e?1:0}function CI(t,e,n){return t.length===e.length&&t.every((i,r)=>n(i,e[r]))}function xOe(t){return t+"\0"}function u1e(t){return t.fields.find(e=>e.kind===2)}function DT(t){return t.fields.filter(e=>e.kind!==2)}function bOe(t,e){let n=t.toTimestamp().seconds,i=t.toTimestamp().nanoseconds+1,r=Bo.fromTimestamp(i===1e9?new kp(n+1,0):new kp(n,i));return new Bv(r,hs.empty(),e)}function wOe(t){return new Bv(t.readTime,t.key,-1)}function n2e(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=hs.comparator(t.documentKey,e.documentKey),n!==0?n:el(t.largestBatchId,e.largestBatchId))}function m7(t){return O(this,null,function*(){if(t.code!==dn.FAILED_PRECONDITION||t.message!==SOe)throw t;Jn("LocalStore","Unexpectedly lost primary lease")})}function TOe(t){let e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function f7(t){return t.name==="IndexedDbTransactionError"}function ET(t){return new tn((e,n)=>{t.onsuccess=i=>{let r=i.target.result;e(r)},t.onerror=i=>{let r=r2e(i.target.error);n(r)}})}function r2e(t){let e=s7.S(kO());if(e>=12.2&&e<13){let n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)>=0){let i=new Un("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${n}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return CLe||(CLe=!0,setTimeout(()=>{throw i},0)),i}}return t}function iB(t){return t==null}function LV(t){return t===0&&1/t==-1/0}function DOe(t){return typeof t=="number"&&Number.isInteger(t)&&!LV(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}function lg(t){let e="";for(let n=0;n<t.length;n++)e.length>0&&(e=xLe(e)),e=nPt(t.get(n),e);return xLe(e)}function nPt(t,e){let n=e,i=t.length;for(let r=0;r<i;r++){let s=t.charAt(r);switch(s){case"\0":n+="";break;case"":n+="";break;default:n+=s}}return n}function xLe(t){return t+""}function J_(t){let e=t.length;if(To(e>=2),e===2)return To(t.charAt(0)===""&&t.charAt(1)===""),Fc.emptyPath();let n=e-2,i=[],r="";for(let s=0;s<e;){let o=t.indexOf("",s);switch((o<0||o>n)&&Ws(),t.charAt(o+1)){case"":let a=t.substring(s,o),l;r.length===0?l=a:(r+=a,l=r,r=""),i.push(l);break;case"":r+=t.substring(s,o),r+="\0";break;case"":r+=t.substring(s,o+1);break;default:Ws()}s=o+2}return new Fc(i)}function _Y(t,e){return[t,lg(e)]}function EOe(t,e,n){return[t,lg(e),n]}function V1(t,e){let n=ms(t);return s7.F(n._e,e)}function wLe(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function UT(t,e){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function POe(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function aI(t){return t.hasNext()?t.getNext():void 0}function ROe(){return typeof atob<"u"}function X8(t){if(To(!!t),typeof t=="string"){let e=0,n=xPt.exec(t);if(To(!!n),n[1]){let r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}let i=new Date(t);return{seconds:Math.floor(i.getTime()/1e3),nanos:e}}return{seconds:Jp(t.seconds),nanos:Jp(t.nanos)}}function Jp(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function o7(t){return typeof t=="string"?N1.fromBase64String(t):N1.fromUint8Array(t)}function xq(t){var e,n;return((n=(((e=t?.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="server_timestamp"}function s2e(t){let e=t.mapValue.fields.__previous_value__;return xq(e)?s2e(e):e}function NV(t){let e=X8(t.mapValue.fields.__local_write_time__.timestampValue);return new kp(e.seconds,e.nanos)}function RT(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?xq(t)?4:FOe(t)?9007199254740991:10:Ws()}function r5(t,e){if(t===e)return!0;let n=RT(t);if(n!==RT(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return NV(t).isEqual(NV(e));case 3:return function(r,s){if(typeof r.timestampValue=="string"&&typeof s.timestampValue=="string"&&r.timestampValue.length===s.timestampValue.length)return r.timestampValue===s.timestampValue;let o=X8(r.timestampValue),a=X8(s.timestampValue);return o.seconds===a.seconds&&o.nanos===a.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(r,s){return o7(r.bytesValue).isEqual(o7(s.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(r,s){return Jp(r.geoPointValue.latitude)===Jp(s.geoPointValue.latitude)&&Jp(r.geoPointValue.longitude)===Jp(s.geoPointValue.longitude)}(t,e);case 2:return function(r,s){if("integerValue"in r&&"integerValue"in s)return Jp(r.integerValue)===Jp(s.integerValue);if("doubleValue"in r&&"doubleValue"in s){let o=Jp(r.doubleValue),a=Jp(s.doubleValue);return o===a?LV(o)===LV(a):isNaN(o)&&isNaN(a)}return!1}(t,e);case 9:return CI(t.arrayValue.values||[],e.arrayValue.values||[],r5);case 10:return function(r,s){let o=r.mapValue.fields||{},a=s.mapValue.fields||{};if(wLe(o)!==wLe(a))return!1;for(let l in o)if(o.hasOwnProperty(l)&&(a[l]===void 0||!r5(o[l],a[l])))return!1;return!0}(t,e);default:return Ws()}}function VV(t,e){return(t.values||[]).find(n=>r5(n,e))!==void 0}function l7(t,e){if(t===e)return 0;let n=RT(t),i=RT(e);if(n!==i)return el(n,i);switch(n){case 0:case 9007199254740991:return 0;case 1:return el(t.booleanValue,e.booleanValue);case 2:return function(s,o){let a=Jp(s.integerValue||s.doubleValue),l=Jp(o.integerValue||o.doubleValue);return a<l?-1:a>l?1:a===l?0:isNaN(a)?isNaN(l)?0:-1:1}(t,e);case 3:return SLe(t.timestampValue,e.timestampValue);case 4:return SLe(NV(t),NV(e));case 5:return el(t.stringValue,e.stringValue);case 6:return function(s,o){let a=o7(s),l=o7(o);return a.compareTo(l)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){let a=s.split("/"),l=o.split("/");for(let c=0;c<a.length&&c<l.length;c++){let d=el(a[c],l[c]);if(d!==0)return d}return el(a.length,l.length)}(t.referenceValue,e.referenceValue);case 8:return function(s,o){let a=el(Jp(s.latitude),Jp(o.latitude));return a!==0?a:el(Jp(s.longitude),Jp(o.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(s,o){let a=s.values||[],l=o.values||[];for(let c=0;c<a.length&&c<l.length;++c){let d=l7(a[c],l[c]);if(d)return d}return el(a.length,l.length)}(t.arrayValue,e.arrayValue);case 10:return function(s,o){if(s===i7.mapValue&&o===i7.mapValue)return 0;if(s===i7.mapValue)return 1;if(o===i7.mapValue)return-1;let a=s.fields||{},l=Object.keys(a),c=o.fields||{},d=Object.keys(c);l.sort(),d.sort();for(let u=0;u<l.length&&u<d.length;++u){let m=el(l[u],d[u]);if(m!==0)return m;let f=l7(a[l[u]],c[d[u]]);if(f!==0)return f}return el(l.length,d.length)}(t.mapValue,e.mapValue);default:throw Ws()}}function SLe(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return el(t,e);let n=X8(t),i=X8(e),r=el(n.seconds,i.seconds);return r!==0?r:el(n.nanos,i.nanos)}function bI(t){return v1e(t)}function v1e(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(n){let i=X8(n);return`time(${i.seconds},${i.nanos})`}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?function(n){return o7(n).toBase64()}(t.bytesValue):"referenceValue"in t?function(n){return hs.fromName(n).toString()}(t.referenceValue):"geoPointValue"in t?function(n){return`geo(${n.latitude},${n.longitude})`}(t.geoPointValue):"arrayValue"in t?function(n){let i="[",r=!0;for(let s of n.values||[])r?r=!1:i+=",",i+=v1e(s);return i+"]"}(t.arrayValue):"mapValue"in t?function(n){let i=Object.keys(n.fields||{}).sort(),r="{",s=!0;for(let o of i)s?s=!1:r+=",",r+=`${o}:${v1e(n.fields[o])}`;return r+"}"}(t.mapValue):Ws()}function FT(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function y1e(t){return!!t&&"integerValue"in t}function BV(t){return!!t&&"arrayValue"in t}function TLe(t){return!!t&&"nullValue"in t}function DLe(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function xY(t){return!!t&&"mapValue"in t}function kV(t){if(t.geoPointValue)return{geoPointValue:Object.assign({},t.geoPointValue)};if(t.timestampValue&&typeof t.timestampValue=="object")return{timestampValue:Object.assign({},t.timestampValue)};if(t.mapValue){let e={mapValue:{fields:{}}};return UT(t.mapValue.fields,(n,i)=>e.mapValue.fields[n]=kV(i)),e}if(t.arrayValue){let e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=kV(t.arrayValue.values[n]);return e}return Object.assign({},t)}function FOe(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}function bPt(t){return"nullValue"in t?CY:"booleanValue"in t?{booleanValue:!1}:"integerValue"in t||"doubleValue"in t?{doubleValue:NaN}:"timestampValue"in t?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"stringValue"in t?{stringValue:""}:"bytesValue"in t?{bytesValue:""}:"referenceValue"in t?FT(a7.empty(),hs.empty()):"geoPointValue"in t?{geoPointValue:{latitude:-90,longitude:-180}}:"arrayValue"in t?{arrayValue:{}}:"mapValue"in t?{mapValue:{}}:Ws()}function wPt(t){return"nullValue"in t?{booleanValue:!1}:"booleanValue"in t?{doubleValue:NaN}:"integerValue"in t||"doubleValue"in t?{timestampValue:{seconds:Number.MIN_SAFE_INTEGER}}:"timestampValue"in t?{stringValue:""}:"stringValue"in t?{bytesValue:""}:"bytesValue"in t?FT(a7.empty(),hs.empty()):"referenceValue"in t?{geoPointValue:{latitude:-90,longitude:-180}}:"geoPointValue"in t?{arrayValue:{}}:"arrayValue"in t?{mapValue:{}}:"mapValue"in t?i7:Ws()}function ELe(t,e){let n=l7(t.value,e.value);return n!==0?n:t.inclusive&&!e.inclusive?-1:!t.inclusive&&e.inclusive?1:0}function MLe(t,e){let n=l7(t.value,e.value);return n!==0?n:t.inclusive&&!e.inclusive?1:!t.inclusive&&e.inclusive?-1:0}function LOe(t){let e=[];return UT(t.fields,(n,i)=>{let r=new bm([n]);if(xY(i)){let s=LOe(i.mapValue).fields;if(s.length===0)e.push(r);else for(let o of s)e.push(r.child(o))}else e.push(r)}),new b4(e)}function kLe(t,e,n){let i=0;for(let r=0;r<t.position.length;r++){let s=e[r],o=t.position[r];if(s.field.isKeyField()?i=hs.comparator(hs.fromName(o.referenceValue),n.key):i=l7(o,n.data.field(s.field)),s.dir==="desc"&&(i*=-1),i!==0)break}return i}function ILe(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let n=0;n<t.position.length;n++)if(!r5(t.position[n],e.position[n]))return!1;return!0}function SPt(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function wI(t){return t.op==="and"}function _1e(t){return t.op==="or"}function o2e(t){return OOe(t)&&wI(t)}function OOe(t){for(let e of t.filters)if(e instanceof iu)return!1;return!0}function C1e(t){if(t instanceof lc)return t.field.canonicalString()+t.op.toString()+bI(t.value);if(o2e(t))return t.filters.map(e=>C1e(e)).join(",");{let e=t.filters.map(n=>C1e(n)).join(",");return`${t.op}(${e})`}}function NOe(t,e){return t instanceof lc?function(i,r){return r instanceof lc&&i.op===r.op&&i.field.isEqual(r.field)&&r5(i.value,r.value)}(t,e):t instanceof iu?function(i,r){return r instanceof iu&&i.op===r.op&&i.filters.length===r.filters.length?i.filters.reduce((s,o,a)=>s&&NOe(o,r.filters[a]),!0):!1}(t,e):void Ws()}function VOe(t,e){let n=t.filters.concat(e);return iu.create(n,t.op)}function BOe(t){return t instanceof lc?function(n){return`${n.field.canonicalString()} ${n.op} ${bI(n.value)}`}(t):t instanceof iu?function(n){return n.op.toString()+" {"+n.getFilters().map(BOe).join(" ,")+"}"}(t):"Filter"}function zOe(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(i=>hs.fromName(i.referenceValue))}function M1e(t,e=null,n=[],i=[],r=null,s=null,o=null){return new E1e(t,e,n,i,r,s,o)}function OT(t){let e=ms(t);if(e.ue===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(i=>C1e(i)).join(","),n+="|ob:",n+=e.orderBy.map(i=>function(s){return s.field.canonicalString()+s.dir}(i)).join(","),iB(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(i=>bI(i)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(i=>bI(i)).join(",")),e.ue=n}return e.ue}function nB(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n<t.orderBy.length;n++)if(!SPt(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(let n=0;n<t.filters.length;n++)if(!NOe(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!ILe(t.startAt,e.startAt)&&ILe(t.endAt,e.endAt)}function FY(t){return hs.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}function LY(t,e){return t.filters.filter(n=>n instanceof lc&&n.field.isEqual(e))}function ALe(t,e,n){let i=CY,r=!0;for(let s of LY(t,e)){let o=CY,a=!0;switch(s.op){case"<":case"<=":o=bPt(s.value);break;case"==":case"in":case">=":o=s.value;break;case">":o=s.value,a=!1;break;case"!=":case"not-in":o=CY}ELe({value:i,inclusive:r},{value:o,inclusive:a})<0&&(i=o,r=a)}if(n!==null){for(let s=0;s<t.orderBy.length;++s)if(t.orderBy[s].field.isEqual(e)){let o=n.position[s];ELe({value:i,inclusive:r},{value:o,inclusive:n.inclusive})<0&&(i=o,r=n.inclusive);break}}return{value:i,inclusive:r}}function PLe(t,e,n){let i=i7,r=!0;for(let s of LY(t,e)){let o=i7,a=!0;switch(s.op){case">=":case">":o=wPt(s.value),a=!1;break;case"==":case"in":case"<=":o=s.value;break;case"<":o=s.value,a=!1;break;case"!=":case"not-in":o=i7}MLe({value:i,inclusive:r},{value:o,inclusive:a})>0&&(i=o,r=a)}if(n!==null){for(let s=0;s<t.orderBy.length;++s)if(t.orderBy[s].field.isEqual(e)){let o=n.position[s];MLe({value:i,inclusive:r},{value:o,inclusive:n.inclusive})>0&&(i=o,r=n.inclusive);break}}return{value:i,inclusive:r}}function HOe(t,e,n,i,r,s,o,a){return new Oy(t,e,n,i,r,s,o,a)}function VI(t){return new Oy(t)}function RLe(t){return t.filters.length===0&&t.limit===null&&t.startAt==null&&t.endAt==null&&(t.explicitOrderBy.length===0||t.explicitOrderBy.length===1&&t.explicitOrderBy[0].field.isKeyField())}function a2e(t){return t.collectionGroup!==null}function yI(t){let e=ms(t);if(e.ce===null){e.ce=[];let n=new Set;for(let s of e.explicitOrderBy)e.ce.push(s),n.add(s.field.canonicalString());let i=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let a=new Bu(bm.comparator);return o.filters.forEach(l=>{l.getFlattenedFilters().forEach(c=>{c.isInequality()&&(a=a.add(c.field))})}),a})(e).forEach(s=>{n.has(s.canonicalString())||s.isKeyField()||e.ce.push(new LT(s,i))}),n.has(bm.keyField().canonicalString())||e.ce.push(new LT(bm.keyField(),i))}return e.ce}function cg(t){let e=ms(t);return e.le||(e.le=TPt(e,yI(t))),e.le}function TPt(t,e){if(t.limitType==="F")return M1e(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(r=>{let s=r.dir==="desc"?"asc":"desc";return new LT(r.field,s)});let n=t.endAt?new s5(t.endAt.position,t.endAt.inclusive):null,i=t.startAt?new s5(t.startAt.position,t.startAt.inclusive):null;return M1e(t.path,t.collectionGroup,e,t.filters,t.limit,n,i)}}function k1e(t,e){let n=t.filters.concat([e]);return new Oy(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function OY(t,e,n){return new Oy(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function rB(t,e){return nB(cg(t),cg(e))&&t.limitType===e.limitType}function GOe(t){return`${OT(cg(t))}|lt:${t.limitType}`}function hI(t){return`Query(target=${function(n){let i=n.path.canonicalString();return n.collectionGroup!==null&&(i+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(i+=`, filters: [${n.filters.map(r=>BOe(r)).join(", ")}]`),iB(n.limit)||(i+=", limit: "+n.limit),n.orderBy.length>0&&(i+=`, orderBy: [${n.orderBy.map(r=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(r)).join(", ")}]`),n.startAt&&(i+=", startAt: ",i+=n.startAt.inclusive?"b:":"a:",i+=n.startAt.position.map(r=>bI(r)).join(",")),n.endAt&&(i+=", endAt: ",i+=n.endAt.inclusive?"a:":"b:",i+=n.endAt.position.map(r=>bI(r)).join(",")),`Target(${i})`}(cg(t))}; limitType=${t.limitType})`}function sB(t,e){return e.isFoundDocument()&&function(i,r){let s=r.key.path;return i.collectionGroup!==null?r.key.hasCollectionId(i.collectionGroup)&&i.path.isPrefixOf(s):hs.isDocumentKey(i.path)?i.path.isEqual(s):i.path.isImmediateParentOf(s)}(t,e)&&function(i,r){for(let s of yI(i))if(!s.field.isKeyField()&&r.data.field(s.field)===null)return!1;return!0}(t,e)&&function(i,r){for(let s of i.filters)if(!s.matches(r))return!1;return!0}(t,e)&&function(i,r){return!(i.startAt&&!function(o,a,l){let c=kLe(o,a,l);return o.inclusive?c<=0:c<0}(i.startAt,yI(i),r)||i.endAt&&!function(o,a,l){let c=kLe(o,a,l);return o.inclusive?c>=0:c>0}(i.endAt,yI(i),r))}(t,e)}function WOe(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function UOe(t){return(e,n)=>{let i=!1;for(let r of yI(t)){let s=DPt(r,e,n);if(s!==0)return s;i=i||r.field.isKeyField()}return 0}}function DPt(t,e,n){let i=t.field.isKeyField()?hs.comparator(e.key,n.key):function(s,o,a){let l=o.data.field(s),c=a.data.field(s);return l!==null&&c!==null?l7(l,c):Ws()}(t.field,e,n);switch(t.dir){case"asc":return i;case"desc":return-1*i;default:return Ws()}}function n3(){return EPt}function EV(...t){let e=jOe;for(let n of t)e=e.insert(n.key,n);return e}function $Oe(t){let e=jOe;return t.forEach((n,i)=>e=e.insert(n,i.overlayedDocument)),e}function e5(){return IV()}function KOe(){return IV()}function IV(){return new o5(t=>t.toString(),(t,e)=>t.isEqual(e))}function ul(...t){let e=kPt;for(let n of t)e=e.add(n);return e}function l2e(){return IPt}function YOe(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:LV(e)?"-0":e}}function qOe(t){return{integerValue:""+t}}function ZOe(t,e){return DOe(e)?qOe(e):YOe(t,e)}function APt(t,e,n){return t instanceof c7?function(r,s){let o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return s&&xq(s)&&(s=s2e(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(n,e):t instanceof Q8?QOe(t,e):t instanceof J8?JOe(t,e):function(r,s){let o=XOe(r,s),a=FLe(o)+FLe(r.Pe);return y1e(o)&&y1e(r.Pe)?qOe(a):YOe(r.serializer,a)}(t,e)}function PPt(t,e,n){return t instanceof Q8?QOe(t,e):t instanceof J8?JOe(t,e):n}function XOe(t,e){return t instanceof d7?function(i){return y1e(i)||function(s){return!!s&&"doubleValue"in s}(i)}(e)?e:{integerValue:0}:null}function QOe(t,e){let n=eNe(e);for(let i of t.elements)n.some(r=>r5(r,i))||n.push(i);return{arrayValue:{values:n}}}function JOe(t,e){let n=eNe(e);for(let i of t.elements)n=n.filter(r=>!r5(r,i));return{arrayValue:{values:n}}}function FLe(t){return Jp(t.integerValue||t.doubleValue)}function eNe(t){return BV(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function RPt(t,e){return t.field.isEqual(e.field)&&function(i,r){return i instanceof Q8&&r instanceof Q8||i instanceof J8&&r instanceof J8?CI(i.elements,r.elements,r5):i instanceof d7&&r instanceof d7?r5(i.Pe,r.Pe):i instanceof c7&&r instanceof c7}(t.transform,e.transform)}function bY(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}function tNe(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new h7(t.key,em.none()):new u7(t.key,t.data,em.none());{let n=t.data,i=l2.empty(),r=new Bu(bm.comparator);for(let s of e.fields)if(!r.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?i.delete(s):i.set(s,o),r=r.add(s)}return new Ny(t.key,i,new b4(r.toArray()),em.none())}}function FPt(t,e,n){t instanceof u7?function(r,s,o){let a=r.value.clone(),l=OLe(r.fieldTransforms,s,o.transformResults);a.setAll(l),s.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):t instanceof Ny?function(r,s,o){if(!bY(r.precondition,s))return void s.convertToUnknownDocument(o.version);let a=OLe(r.fieldTransforms,s,o.transformResults),l=s.data;l.setAll(iNe(r)),l.setAll(a),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(t,e,n):function(r,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function AV(t,e,n,i){return t instanceof u7?function(s,o,a,l){if(!bY(s.precondition,o))return a;let c=s.value.clone(),d=NLe(s.fieldTransforms,l,o);return c.setAll(d),o.convertToFoundDocument(o.version,c).setHasLocalMutations(),null}(t,e,n,i):t instanceof Ny?function(s,o,a,l){if(!bY(s.precondition,o))return a;let c=NLe(s.fieldTransforms,l,o),d=o.data;return d.setAll(iNe(s)),d.setAll(c),o.convertToFoundDocument(o.version,d).setHasLocalMutations(),a===null?null:a.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(u=>u.field))}(t,e,n,i):function(s,o,a){return bY(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(t,e,n)}function LPt(t,e){let n=null;for(let i of t.fieldTransforms){let r=e.data.field(i.field),s=XOe(i.transform,r||null);s!=null&&(n===null&&(n=l2.empty()),n.set(i.field,s))}return n||null}function LLe(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(i,r){return i===void 0&&r===void 0||!(!i||!r)&&CI(i,r,(s,o)=>RPt(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}function iNe(t){let e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){let i=t.data.field(n);e.set(n,i)}}),e}function OLe(t,e,n){let i=new Map;To(t.length===n.length);for(let r=0;r<n.length;r++){let s=t[r],o=s.transform,a=e.data.field(s.field);i.set(s.field,PPt(o,a,n[r]))}return i}function NLe(t,e,n){let i=new Map;for(let r of t){let s=r.transform,o=n.data.field(r.field);i.set(r.field,APt(s,o,e))}return i}function nNe(t){switch(t){default:return Ws();case dn.CANCELLED:case dn.UNKNOWN:case dn.DEADLINE_EXCEEDED:case dn.RESOURCE_EXHAUSTED:case dn.INTERNAL:case dn.UNAVAILABLE:case dn.UNAUTHENTICATED:return!1;case dn.INVALID_ARGUMENT:case dn.NOT_FOUND:case dn.ALREADY_EXISTS:case dn.PERMISSION_DENIED:case dn.FAILED_PRECONDITION:case dn.ABORTED:case dn.OUT_OF_RANGE:case dn.UNIMPLEMENTED:case dn.DATA_LOSS:return!0}}function rNe(t){if(t===void 0)return xm("GRPC error has no .code"),dn.UNKNOWN;switch(t){case df.OK:return dn.OK;case df.CANCELLED:return dn.CANCELLED;case df.UNKNOWN:return dn.UNKNOWN;case df.DEADLINE_EXCEEDED:return dn.DEADLINE_EXCEEDED;case df.RESOURCE_EXHAUSTED:return dn.RESOURCE_EXHAUSTED;case df.INTERNAL:return dn.INTERNAL;case df.UNAVAILABLE:return dn.UNAVAILABLE;case df.UNAUTHENTICATED:return dn.UNAUTHENTICATED;case df.INVALID_ARGUMENT:return dn.INVALID_ARGUMENT;case df.NOT_FOUND:return dn.NOT_FOUND;case df.ALREADY_EXISTS:return dn.ALREADY_EXISTS;case df.PERMISSION_DENIED:return dn.PERMISSION_DENIED;case df.FAILED_PRECONDITION:return dn.FAILED_PRECONDITION;case df.ABORTED:return dn.ABORTED;case df.OUT_OF_RANGE:return dn.OUT_OF_RANGE;case df.UNIMPLEMENTED:return dn.UNIMPLEMENTED;case df.DATA_LOSS:return dn.DATA_LOSS;default:return Ws()}}function sNe(){return new TextEncoder}function BLe(t){let e=sNe().encode(t),n=new Kfe;return n.update(e),new Uint8Array(n.digest())}function zLe(t){let e=new DataView(t.buffer),n=e.getUint32(0,!0),i=e.getUint32(4,!0),r=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new Xb([n,i],0),new Xb([r,s],0)]}function HLe(){return new Ih(hs.comparator)}function GLe(){return new Ih(hs.comparator)}function O1e(t,e){return t.useProto3Json||iB(e)?e:{value:e}}function DI(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function oNe(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function zPt(t,e){return DI(t,e.toTimestamp())}function wm(t){return To(!!t),Bo.fromTimestamp(function(n){let i=X8(n);return new kp(i.seconds,i.nanos)}(t))}function c2e(t,e){return N1e(t,e).canonicalString()}function N1e(t,e){let n=function(r){return new Fc(["projects",r.projectId,"databases",r.database])}(t).child("documents");return e===void 0?n:n.child(e)}function aNe(t){let e=Fc.fromString(t);return To(vNe(e)),e}function jV(t,e){return c2e(t.databaseId,e.path)}function i5(t,e){let n=aNe(e);if(n.get(1)!==t.databaseId.projectId)throw new Un(dn.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new Un(dn.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new hs(dNe(n))}function lNe(t,e){return c2e(t.databaseId,e)}function cNe(t){let e=aNe(t);return e.length===4?Fc.emptyPath():dNe(e)}function V1e(t){return new Fc(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function dNe(t){return To(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function WLe(t,e,n){return{name:jV(t,e),fields:n.value.mapValue.fields}}function uNe(t,e,n){let i=i5(t,e.name),r=wm(e.updateTime),s=e.createTime?wm(e.createTime):Bo.min(),o=new l2({mapValue:{fields:e.fields}}),a=mf.newFoundDocument(i,r,s,o);return n&&a.setHasCommittedMutations(),n?a.setHasCommittedMutations():a}function HPt(t,e){return"found"in e?function(i,r){To(!!r.found),r.found.name,r.found.updateTime;let s=i5(i,r.found.name),o=wm(r.found.updateTime),a=r.found.createTime?wm(r.found.createTime):Bo.min(),l=new l2({mapValue:{fields:r.found.fields}});return mf.newFoundDocument(s,o,a,l)}(t,e):"missing"in e?function(i,r){To(!!r.missing),To(!!r.readTime);let s=i5(i,r.missing),o=wm(r.readTime);return mf.newNoDocument(s,o)}(t,e):Ws()}function GPt(t,e){let n;if("targetChange"in e){e.targetChange;let i=function(c){return c==="NO_CHANGE"?0:c==="ADD"?1:c==="REMOVE"?2:c==="CURRENT"?3:c==="RESET"?4:Ws()}(e.targetChange.targetChangeType||"NO_CHANGE"),r=e.targetChange.targetIds||[],s=function(c,d){return c.useProto3Json?(To(d===void 0||typeof d=="string"),N1.fromBase64String(d||"")):(To(d===void 0||d instanceof Buffer||d instanceof Uint8Array),N1.fromUint8Array(d||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(c){let d=c.code===void 0?dn.UNKNOWN:rNe(c.code);return new Un(d,c.message||"")}(o);n=new VY(i,r,s,a||null)}else if("documentChange"in e){e.documentChange;let i=e.documentChange;i.document,i.document.name,i.document.updateTime;let r=i5(t,i.document.name),s=wm(i.document.updateTime),o=i.document.createTime?wm(i.document.createTime):Bo.min(),a=new l2({mapValue:{fields:i.document.fields}}),l=mf.newFoundDocument(r,s,o,a),c=i.targetIds||[],d=i.removedTargetIds||[];n=new _I(c,d,l.key,l)}else if("documentDelete"in e){e.documentDelete;let i=e.documentDelete;i.document;let r=i5(t,i.document),s=i.readTime?wm(i.readTime):Bo.min(),o=mf.newNoDocument(r,s),a=i.removedTargetIds||[];n=new _I([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;let i=e.documentRemove;i.document;let r=i5(t,i.document),s=i.removedTargetIds||[];n=new _I([],s,r,null)}else{if(!("filter"in e))return Ws();{e.filter;let i=e.filter;i.targetId;let{count:r=0,unchangedNames:s}=i,o=new P1e(r,s),a=i.targetId;n=new NY(a,o)}}return n}function $V(t,e){let n;if(e instanceof u7)n={update:WLe(t,e.key,e.value)};else if(e instanceof h7)n={delete:jV(t,e.key)};else if(e instanceof Ny)n={update:WLe(t,e.key,e.data),updateMask:YPt(e.fieldMask)};else{if(!(e instanceof zV))return Ws();n={verify:jV(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map(i=>function(s,o){let a=o.transform;if(a instanceof c7)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Q8)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof J8)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof d7)return{fieldPath:o.field.canonicalString(),increment:a.Pe};throw Ws()}(0,i))),e.precondition.isNone||(n.currentDocument=function(r,s){return s.updateTime!==void 0?{updateTime:zPt(r,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:Ws()}(t,e.precondition)),n}function B1e(t,e){let n=e.currentDocument?function(s){return s.updateTime!==void 0?em.updateTime(wm(s.updateTime)):s.exists!==void 0?em.exists(s.exists):em.none()}(e.currentDocument):em.none(),i=e.updateTransforms?e.updateTransforms.map(r=>function(o,a){let l=null;if("setToServerValue"in a)To(a.setToServerValue==="REQUEST_TIME"),l=new c7;else if("appendMissingElements"in a){let d=a.appendMissingElements.values||[];l=new Q8(d)}else if("removeAllFromArray"in a){let d=a.removeAllFromArray.values||[];l=new J8(d)}else"increment"in a?l=new d7(o,a.increment):Ws();let c=bm.fromServerFormat(a.fieldPath);return new NT(c,l)}(t,r)):[];if(e.update){e.update.name;let r=i5(t,e.update.name),s=new l2({mapValue:{fields:e.update.fields}});if(e.updateMask){let o=function(l){let c=l.fieldPaths||[];return new b4(c.map(d=>bm.fromServerFormat(d)))}(e.updateMask);return new Ny(r,s,o,n,i)}return new u7(r,s,n,i)}if(e.delete){let r=i5(t,e.delete);return new h7(r,n)}if(e.verify){let r=i5(t,e.verify);return new zV(r,n)}return Ws()}function WPt(t,e){return t&&t.length>0?(To(e!==void 0),t.map(n=>function(r,s){let o=r.updateTime?wm(r.updateTime):wm(s);return o.isEqual(Bo.min())&&(o=wm(s)),new I1e(o,r.transformResults||[])}(n,e))):[]}function hNe(t,e){return{documents:[lNe(t,e.path)]}}function pNe(t,e){let n={structuredQuery:{}},i=e.path,r;e.collectionGroup!==null?(r=i,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(r=i.popLast(),n.structuredQuery.from=[{collectionId:i.lastSegment()}]),n.parent=lNe(t,r);let s=function(c){if(c.length!==0)return gNe(iu.create(c,"and"))}(e.filters);s&&(n.structuredQuery.where=s);let o=function(c){if(c.length!==0)return c.map(d=>function(m){return{field:pI(m.field),direction:jPt(m.dir)}}(d))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);let a=O1e(t,e.limit);return a!==null&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=function(c){return{before:c.inclusive,values:c.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),{_t:n,parent:r}}function mNe(t){let e=cNe(t.parent),n=t.structuredQuery,i=n.from?n.from.length:0,r=null;if(i>0){To(i===1);let d=n.from[0];d.allDescendants?r=d.collectionId:e=e.child(d.collectionId)}let s=[];n.where&&(s=function(u){let m=fNe(u);return m instanceof iu&&o2e(m)?m.getFilters():[m]}(n.where));let o=[];n.orderBy&&(o=function(u){return u.map(m=>function(_){return new LT(mI(_.field),function(D){switch(D){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(_.direction))}(m))}(n.orderBy));let a=null;n.limit&&(a=function(u){let m;return m=typeof u=="object"?u.value:u,iB(m)?null:m}(n.limit));let l=null;n.startAt&&(l=function(u){let m=!!u.before,f=u.values||[];return new s5(f,m)}(n.startAt));let c=null;return n.endAt&&(c=function(u){let m=!u.before,f=u.values||[];return new s5(f,m)}(n.endAt)),HOe(e,r,o,s,a,"F",l,c)}function UPt(t,e){let n=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Ws()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function fNe(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":let i=mI(n.unaryFilter.field);return lc.create(i,"==",{doubleValue:NaN});case"IS_NULL":let r=mI(n.unaryFilter.field);return lc.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let s=mI(n.unaryFilter.field);return lc.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let o=mI(n.unaryFilter.field);return lc.create(o,"!=",{nullValue:"NULL_VALUE"});default:return Ws()}}(t):t.fieldFilter!==void 0?function(n){return lc.create(mI(n.fieldFilter.field),function(r){switch(r){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return Ws()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return iu.create(n.compositeFilter.filters.map(i=>fNe(i)),function(r){switch(r){case"AND":return"and";case"OR":return"or";default:return Ws()}}(n.compositeFilter.op))}(t):Ws()}function jPt(t){return NPt[t]}function $Pt(t){return VPt[t]}function KPt(t){return BPt[t]}function pI(t){return{fieldPath:t.canonicalString()}}function mI(t){return bm.fromServerFormat(t.fieldPath)}function gNe(t){return t instanceof lc?function(n){if(n.op==="=="){if(DLe(n.value))return{unaryFilter:{field:pI(n.field),op:"IS_NAN"}};if(TLe(n.value))return{unaryFilter:{field:pI(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(DLe(n.value))return{unaryFilter:{field:pI(n.field),op:"IS_NOT_NAN"}};if(TLe(n.value))return{unaryFilter:{field:pI(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:pI(n.field),op:$Pt(n.op),value:n.value}}}(t):t instanceof iu?function(n){let i=n.getFilters().map(r=>gNe(r));return i.length===1?i[0]:{compositeFilter:{op:KPt(n.op),filters:i}}}(t):Ws()}function YPt(t){let e=[];return t.fields.forEach(n=>e.push(n.canonicalString())),{fieldPaths:e}}function vNe(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}function qPt(t,e){let n;if(e.document)n=uNe(t.ct,e.document,!!e.hasCommittedMutations);else if(e.noDocument){let i=hs.fromSegments(e.noDocument.path),r=BT(e.noDocument.readTime);n=mf.newNoDocument(i,r),e.hasCommittedMutations&&n.setHasCommittedMutations()}else{if(!e.unknownDocument)return Ws();{let i=hs.fromSegments(e.unknownDocument.path),r=BT(e.unknownDocument.version);n=mf.newUnknownDocument(i,r)}}return e.readTime&&n.setReadTime(function(r){let s=new kp(r[0],r[1]);return Bo.fromTimestamp(s)}(e.readTime)),n}function ULe(t,e){let n=e.key,i={prefixPath:n.getCollectionPath().popLast().toArray(),collectionGroup:n.collectionGroup,documentId:n.path.lastSegment(),readTime:HY(e.readTime),hasCommittedMutations:e.hasCommittedMutations};if(e.isFoundDocument())i.document=function(s,o){return{name:jV(s,o.key),fields:o.data.value.mapValue.fields,updateTime:DI(s,o.version.toTimestamp()),createTime:DI(s,o.createTime.toTimestamp())}}(t.ct,e);else if(e.isNoDocument())i.noDocument={path:n.path.toArray(),readTime:VT(e.version)};else{if(!e.isUnknownDocument())return Ws();i.unknownDocument={path:n.path.toArray(),version:VT(e.version)}}return i}function HY(t){let e=t.toTimestamp();return[e.seconds,e.nanoseconds]}function VT(t){let e=t.toTimestamp();return{seconds:e.seconds,nanoseconds:e.nanoseconds}}function BT(t){let e=new kp(t.seconds,t.nanoseconds);return Bo.fromTimestamp(e)}function MT(t,e){let n=(e.baseMutations||[]).map(s=>B1e(t.ct,s));for(let s=0;s<e.mutations.length-1;++s){let o=e.mutations[s];if(s+1<e.mutations.length&&e.mutations[s+1].transform!==void 0){let a=e.mutations[s+1];o.updateTransforms=a.transform.fieldTransforms,e.mutations.splice(s+1,1),++s}}let i=e.mutations.map(s=>B1e(t.ct,s)),r=kp.fromMillis(e.localWriteTimeMs);return new HV(e.batchId,r,n,i)}function MV(t){let e=BT(t.readTime),n=t.lastLimboFreeSnapshotVersion!==void 0?BT(t.lastLimboFreeSnapshotVersion):Bo.min(),i;return i=function(s){return s.documents!==void 0}(t.query)?function(s){return To(s.documents.length===1),cg(VI(cNe(s.documents[0])))}(t.query):function(s){return cg(mNe(s))}(t.query),new EI(i,t.targetId,"TargetPurposeListen",t.lastListenSequenceNumber,e,n,N1.fromBase64String(t.resumeToken))}function yNe(t,e){let n=VT(e.snapshotVersion),i=VT(e.lastLimboFreeSnapshotVersion),r;r=FY(e.target)?hNe(t.ct,e.target):pNe(t.ct,e.target)._t;let s=e.resumeToken.toBase64();return{targetId:e.targetId,canonicalId:OT(e.target),readTime:n,resumeToken:s,lastListenSequenceNumber:e.sequenceNumber,lastLimboFreeSnapshotVersion:i,query:r}}function d2e(t){let e=mNe({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?OY(e,e.limit,"L"):e}function e1e(t,e){return new GV(e.largestBatchId,B1e(t.ct,e.overlayMutation))}function jLe(t,e){let n=e.path.lastSegment();return[t,lg(e.path.popLast()),n]}function $Le(t,e,n,i){return{indexId:t,uid:e,sequenceNumber:n,readTime:VT(i.readTime),documentKey:lg(i.documentKey.path),largestBatchId:i.largestBatchId}}function KLe(t){return V1(t,"bundles")}function YLe(t){return V1(t,"namedQueries")}function wV(t){return V1(t,"documentOverlays")}function ZPt(t){if(t===0)return 8;let e=0;return!(t>>4)&&(e+=4,t<<=4),!(t>>6)&&(e+=2,t<<=2),!(t>>7)&&(e+=1),e}function qLe(t){let e=64-function(i){let r=0;for(let s=0;s<8;++s){let o=ZPt(255&i[s]);if(r+=o,o!==8)break}return r}(t);return Math.ceil(e/8)}function Qb(t,e){let n=t.indexId-e.indexId;return n!==0?n:(n=ZLe(t.arrayValue,e.arrayValue),n!==0?n:(n=ZLe(t.directionalValue,e.directionalValue),n!==0?n:hs.comparator(t.documentKey,e.documentKey)))}function ZLe(t,e){for(let n=0;n<t.length&&n<e.length;++n){let i=t[n]-e[n];if(i!==0)return i}return t.length-e.length}function _Ne(t){var e,n;if(To(t instanceof lc||t instanceof iu),t instanceof lc){if(t instanceof RY){let r=((n=(e=t.value.arrayValue)===null||e===void 0?void 0:e.values)===null||n===void 0?void 0:n.map(s=>lc.create(t.field,"==",s)))||[];return iu.create(r,"or")}return t}let i=t.filters.map(r=>_Ne(r));return iu.create(i,t.op)}function XPt(t){if(t.getFilters().length===0)return[];let e=$1e(_Ne(t));return To(CNe(e)),U1e(e)||j1e(e)?[e]:e.getFilters()}function U1e(t){return t instanceof lc}function j1e(t){return t instanceof iu&&o2e(t)}function CNe(t){return U1e(t)||j1e(t)||function(n){if(n instanceof iu&&_1e(n)){for(let i of n.getFilters())if(!U1e(i)&&!j1e(i))return!1;return!0}return!1}(t)}function $1e(t){if(To(t instanceof lc||t instanceof iu),t instanceof lc)return t;if(t.filters.length===1)return $1e(t.filters[0]);let e=t.filters.map(i=>$1e(i)),n=iu.create(e,t.op);return n=UY(n),CNe(n)?n:(To(n instanceof iu),To(wI(n)),To(n.filters.length>1),n.filters.reduce((i,r)=>u2e(i,r)))}function u2e(t,e){let n;return To(t instanceof lc||t instanceof iu),To(e instanceof lc||e instanceof iu),n=t instanceof lc?e instanceof lc?function(r,s){return iu.create([r,s],"and")}(t,e):XLe(t,e):e instanceof lc?XLe(e,t):function(r,s){if(To(r.filters.length>0&&s.filters.length>0),wI(r)&&wI(s))return VOe(r,s.getFilters());let o=_1e(r)?r:s,a=_1e(r)?s:r,l=o.filters.map(c=>u2e(c,a));return iu.create(l,"or")}(t,e),UY(n)}function XLe(t,e){if(wI(e))return VOe(e,t.getFilters());{let n=e.filters.map(i=>u2e(t,i));return iu.create(n,"or")}}function UY(t){if(To(t instanceof lc||t instanceof iu),t instanceof lc)return t;let e=t.getFilters();if(e.length===1)return UY(e[0]);if(OOe(t))return t;let n=e.map(r=>UY(r)),i=[];return n.forEach(r=>{r instanceof lc?i.push(r):r instanceof iu&&(r.op===t.op?i.push(...r.filters):i.push(r))}),i.length===1?i[0]:iu.create(i,t.op)}function QLe(t){return V1(t,"collectionParents")}function lI(t){return V1(t,"indexEntries")}function SV(t){return V1(t,"indexConfiguration")}function cI(t){return V1(t,"indexState")}function JLe(t){To(t.length!==0);let e=t[0].indexState.offset,n=e.largestBatchId;for(let i=1;i<t.length;i++){let r=t[i].indexState.offset;n2e(r,e)<0&&(e=r),n<r.largestBatchId&&(n=r.largestBatchId)}return new Bv(e.readTime,e.documentKey,n)}function xNe(t,e,n){let i=t.store("mutations"),r=t.store("documentMutations"),s=[],o=IDBKeyRange.only(n.batchId),a=0,l=i.J({range:o},(d,u,m)=>(a++,m.delete()));s.push(l.next(()=>{To(a===1)}));let c=[];for(let d of n.mutations){let u=EOe(e,d.key.path,n.batchId);s.push(r.delete(u)),c.push(d.key)}return tn.waitFor(s).next(()=>c)}function jY(t){if(!t)return 0;let e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw Ws();e=t.noDocument}return JSON.stringify(e).length}function bNe(t,e,n){let i=_Y(e,n.path),r=i[1],s=IDBKeyRange.lowerBound(i),o=!1;return fI(t).J({range:s,H:!0},(a,l,c)=>{let[d,u,m]=a;d===e&&u===r&&(o=!0),c.done()}).next(()=>o)}function Jb(t){return V1(t,"mutations")}function fI(t){return V1(t,"documentMutations")}function wNe(t){return V1(t,"mutationQueues")}function dI(t){return V1(t,"targets")}function tOe(t){return V1(t,"targetGlobal")}function e7(t){return V1(t,"targetDocuments")}function iOe([t,e],[n,i]){let r=el(t,n);return r===0?el(e,i):r}function QPt(t,e){return new Q1e(t,e)}function gY(t,e){return e7(t).put(function(i,r){return{targetId:0,path:lg(i.path),sequenceNumber:r}}(e,t.currentSequenceNumber))}function SNe(t){return new e0e(t)}function nOe(t){return V1(t,"remoteDocumentGlobal")}function TT(t){return V1(t,"remoteDocumentsV14")}function TV(t){let e=t.path.toArray();return[e.slice(0,e.length-2),e[e.length-2],e[e.length-1]]}function rOe(t,e){let n=e.documentKey.path.toArray();return[t,HY(e.readTime),n.slice(0,n.length-2),n.length>0?n[n.length-1]:""]}function sOe(t,e){let n=t.path.toArray(),i=e.path.toArray(),r=0;for(let s=0;s<n.length-2&&s<i.length-2;++s)if(r=el(n[s],i[s]),r)return r;return r=el(n.length,i.length),r||(r=el(n[n.length-2],i[i.length-2]),r||el(n[n.length-1],i[i.length-1]))}function oOe(t){t.createObjectStore("targetDocuments",{keyPath:cPt}).createIndex("documentTargetsIndex",dPt,{unique:!0}),t.createObjectStore("targets",{keyPath:"targetId"}).createIndex("queryTargetsIndex",lPt,{unique:!0}),t.createObjectStore("targetGlobal")}function DV(t){return V1(t,"owner")}function vY(t){return V1(t,"clientMetadata")}function h2e(t,e){let n=t.projectId;return t.isDefaultDatabase||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}function TNe(t,e,n,i){return new m0e(t,e,n,i)}function DNe(t,e){return O(this,null,function*(){let n=ms(t);return yield n.persistence.runTransaction("Handle user change","readonly",i=>{let r;return n.mutationQueue.getAllMutationBatches(i).next(s=>(r=s,n._s(e),n.mutationQueue.getAllMutationBatches(i))).next(s=>{let o=[],a=[],l=ul();for(let c of r){o.push(c.batchId);for(let d of c.mutations)l=l.add(d.key)}for(let c of s){a.push(c.batchId);for(let d of c.mutations)l=l.add(d.key)}return n.localDocuments.getDocuments(i,l).next(c=>({us:c,removedBatchIds:o,addedBatchIds:a}))})})})}function JPt(t,e){let n=ms(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",i=>{let r=e.batch.keys(),s=n.os.newChangeBuffer({trackRemovals:!0});return function(a,l,c,d){let u=c.batch,m=u.keys(),f=tn.resolve();return m.forEach(_=>{f=f.next(()=>d.getEntry(l,_)).next(x=>{let D=c.docVersions.get(_);To(D!==null),x.version.compareTo(D)<0&&(u.applyToRemoteDocument(x,c),x.isValidDocument()&&(x.setReadTime(c.commitVersion),d.addEntry(x)))})}),f.next(()=>a.mutationQueue.removeMutationBatch(l,u))}(n,i,e,s).next(()=>s.apply(i)).next(()=>n.mutationQueue.performConsistencyCheck(i)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(i,r,e.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(i,function(a){let l=ul();for(let c=0;c<a.mutationResults.length;++c)a.mutationResults[c].transformResults.length>0&&(l=l.add(a.batch.mutations[c].key));return l}(e))).next(()=>n.localDocuments.getDocuments(i,r))})}function ENe(t){let e=ms(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Qr.getLastRemoteSnapshotVersion(n))}function eRt(t,e){let n=ms(t),i=e.snapshotVersion,r=n.ns;return n.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{let o=n.os.newChangeBuffer({trackRemovals:!0});r=n.ns;let a=[];e.targetChanges.forEach((d,u)=>{let m=r.get(u);if(!m)return;a.push(n.Qr.removeMatchingKeys(s,d.removedDocuments,u).next(()=>n.Qr.addMatchingKeys(s,d.addedDocuments,u)));let f=m.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(u)!==null?f=f.withResumeToken(N1.EMPTY_BYTE_STRING,Bo.min()).withLastLimboFreeSnapshotVersion(Bo.min()):d.resumeToken.approximateByteSize()>0&&(f=f.withResumeToken(d.resumeToken,i)),r=r.insert(u,f),function(x,D,E){return x.resumeToken.approximateByteSize()===0||D.snapshotVersion.toMicroseconds()-x.snapshotVersion.toMicroseconds()>=3e8?!0:E.addedDocuments.size+E.modifiedDocuments.size+E.removedDocuments.size>0}(m,f,d)&&a.push(n.Qr.updateTargetData(s,f))});let l=n3(),c=ul();if(e.documentUpdates.forEach(d=>{e.resolvedLimboDocuments.has(d)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(s,d))}),a.push(MNe(s,o,e.documentUpdates).next(d=>{l=d.cs,c=d.ls})),!i.isEqual(Bo.min())){let d=n.Qr.getLastRemoteSnapshotVersion(s).next(u=>n.Qr.setTargetsMetadata(s,s.currentSequenceNumber,i));a.push(d)}return tn.waitFor(a).next(()=>o.apply(s)).next(()=>n.localDocuments.getLocalViewOfDocuments(s,l,c)).next(()=>l)}).then(s=>(n.ns=r,s))}function MNe(t,e,n){let i=ul(),r=ul();return n.forEach(s=>i=i.add(s)),e.getEntries(t,i).next(s=>{let o=n3();return n.forEach((a,l)=>{let c=s.get(a);l.isFoundDocument()!==c.isFoundDocument()&&(r=r.add(a)),l.isNoDocument()&&l.version.isEqual(Bo.min())?(e.removeEntry(a,l.readTime),o=o.insert(a,l)):!c.isValidDocument()||l.version.compareTo(c.version)>0||l.version.compareTo(c.version)===0&&c.hasPendingWrites?(e.addEntry(l),o=o.insert(a,l)):Jn("LocalStore","Ignoring outdated watch update for ",a,". Current version:",c.version," Watch version:",l.version)}),{cs:o,ls:r}})}function tRt(t,e){let n=ms(t);return n.persistence.runTransaction("Get next mutation batch","readonly",i=>(e===void 0&&(e=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(i,e)))}function kI(t,e){let n=ms(t);return n.persistence.runTransaction("Allocate target","readwrite",i=>{let r;return n.Qr.getTargetData(i,e).next(s=>s?(r=s,tn.resolve(r)):n.Qr.allocateTargetId(i).next(o=>(r=new EI(e,o,"TargetPurposeListen",i.currentSequenceNumber),n.Qr.addTargetData(i,r).next(()=>r))))}).then(i=>{let r=n.ns.get(i.targetId);return(r===null||i.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.ns=n.ns.insert(i.targetId,i),n.rs.set(e,i.targetId)),i})}function II(t,e,n){return O(this,null,function*(){let i=ms(t),r=i.ns.get(e),s=n?"readwrite":"readwrite-primary";try{n||(yield i.persistence.runTransaction("Release target",s,o=>i.persistence.referenceDelegate.removeTarget(o,r)))}catch(o){if(!f7(o))throw o;Jn("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}i.ns=i.ns.remove(e),i.rs.delete(r.target)})}function QY(t,e,n){let i=ms(t),r=Bo.min(),s=ul();return i.persistence.runTransaction("Execute query","readwrite",o=>function(l,c,d){let u=ms(l),m=u.rs.get(d);return m!==void 0?tn.resolve(u.ns.get(m)):u.Qr.getTargetData(c,d)}(i,o,cg(e)).next(a=>{if(a)return r=a.lastLimboFreeSnapshotVersion,i.Qr.getMatchingKeysForTargetId(o,a.targetId).next(l=>{s=l})}).next(()=>i.ts.getDocumentsMatchingQuery(o,e,n?r:Bo.min(),n?s:ul())).next(a=>(ANe(i,WOe(e),a),{documents:a,hs:s})))}function kNe(t,e){let n=ms(t),i=ms(n.Qr),r=n.ns.get(e);return r?Promise.resolve(r.target):n.persistence.runTransaction("Get target data","readonly",s=>i.ot(s,e).next(o=>o?o.target:null))}function INe(t,e){let n=ms(t),i=n.ss.get(e)||Bo.min();return n.persistence.runTransaction("Get new document changes","readonly",r=>n.os.getAllFromCollectionGroup(r,e,bOe(i,-1),Number.MAX_SAFE_INTEGER)).then(r=>(ANe(n,e,r),r))}function ANe(t,e,n){let i=t.ss.get(e)||Bo.min();n.forEach((r,s)=>{s.readTime.compareTo(i)>0&&(i=s.readTime)}),t.ss.set(e,i)}function iRt(t,e,n,i){return O(this,null,function*(){let r=ms(t),s=ul(),o=n3();for(let c of n){let d=e.Ps(c.metadata.name);c.document&&(s=s.add(d));let u=e.Is(c);u.setReadTime(e.Ts(c.metadata.readTime)),o=o.insert(d,u)}let a=r.os.newChangeBuffer({trackRemovals:!0}),l=yield kI(r,function(d){return cg(VI(Fc.fromString(`__bundle__/docs/${d}`)))}(i));return r.persistence.runTransaction("Apply bundle documents","readwrite",c=>MNe(c,a,o).next(d=>(a.apply(c),d)).next(d=>r.Qr.removeMatchingKeysForTargetId(c,l.targetId).next(()=>r.Qr.addMatchingKeys(c,s,l.targetId)).next(()=>r.localDocuments.getLocalViewOfDocuments(c,d.cs,d.ls)).next(()=>d.cs)))})}function nRt(i,r){return O(this,arguments,function*(t,e,n=ul()){let s=yield kI(t,cg(d2e(e.bundledQuery))),o=ms(t);return o.persistence.runTransaction("Save named query","readwrite",a=>{let l=wm(e.readTime);if(s.snapshotVersion.compareTo(l)>=0)return o.$r.saveNamedQuery(a,e);let c=s.withResumeToken(N1.EMPTY_BYTE_STRING,l);return o.ns=o.ns.insert(c.targetId,c),o.Qr.updateTargetData(a,c).next(()=>o.Qr.removeMatchingKeysForTargetId(a,s.targetId)).next(()=>o.Qr.addMatchingKeys(a,n,s.targetId)).next(()=>o.$r.saveNamedQuery(a,e))})})}function aOe(t,e){return`firestore_clients_${t}_${e}`}function lOe(t,e,n){let i=`firestore_mutations_${t}_${n}`;return e.isAuthenticated()&&(i+=`_${e.uid}`),i}function i1e(t,e){return`firestore_targets_${t}_${e}`}function n1e(){return yY===null?yY=function(){return 268435456+Math.round(2147483648*Math.random())}():yY++,"0x"+yY.toString(16)}function PNe(){return typeof window<"u"?window:null}function wY(){return typeof document<"u"?document:null}function oB(t){return new L1e(t,!0)}function aB(t){return O(this,null,function*(){if(g7(t))for(let e of t.x_)yield e(!0)})}function BI(t){return O(this,null,function*(){for(let e of t.x_)yield e(!1)})}function bq(t,e){let n=ms(t);n.F_.has(e.targetId)||(n.F_.set(e.targetId,e),f2e(n)?m2e(n):HI(n).Xo()&&p2e(n,e))}function AI(t,e){let n=ms(t),i=HI(n);n.F_.delete(e),i.Xo()&&RNe(n,e),n.F_.size===0&&(i.Xo()?i.n_():g7(n)&&n.N_.set("Unknown"))}function p2e(t,e){if(t.L_.xe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(Bo.min())>0){let n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}HI(t).P_(e)}function RNe(t,e){t.L_.xe(e),HI(t).I_(e)}function m2e(t){t.L_=new F1e({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),ot:e=>t.F_.get(e)||null,tt:()=>t.datastore.serializer.databaseId}),HI(t).start(),t.N_.w_()}function f2e(t){return g7(t)&&!HI(t).Zo()&&t.F_.size>0}function g7(t){return ms(t).M_.size===0}function FNe(t){t.L_=void 0}function sRt(t){return O(this,null,function*(){t.N_.set("Online")})}function oRt(t){return O(this,null,function*(){t.F_.forEach((e,n)=>{p2e(t,e)})})}function aRt(t,e){return O(this,null,function*(){FNe(t),f2e(t)?(t.N_.D_(e),m2e(t)):t.N_.set("Unknown")})}function lRt(t,e,n){return O(this,null,function*(){if(t.N_.set("Online"),e instanceof VY&&e.state===2&&e.cause)try{yield function(r,s){return O(this,null,function*(){let o=s.cause;for(let a of s.targetIds)r.F_.has(a)&&(yield r.remoteSyncer.rejectListen(a,o),r.F_.delete(a),r.L_.removeTarget(a))})}(t,e)}catch(i){Jn("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),i),yield rq(t,i)}else if(e instanceof _I?t.L_.Ke(e):e instanceof NY?t.L_.He(e):t.L_.We(e),!n.isEqual(Bo.min()))try{let i=yield ENe(t.localStore);n.compareTo(i)>=0&&(yield function(s,o){let a=s.L_.rt(o);return a.targetChanges.forEach((l,c)=>{if(l.resumeToken.approximateByteSize()>0){let d=s.F_.get(c);d&&s.F_.set(c,d.withResumeToken(l.resumeToken,o))}}),a.targetMismatches.forEach((l,c)=>{let d=s.F_.get(l);if(!d)return;s.F_.set(l,d.withResumeToken(N1.EMPTY_BYTE_STRING,d.snapshotVersion)),RNe(s,l);let u=new EI(d.target,l,c,d.sequenceNumber);p2e(s,u)}),s.remoteSyncer.applyRemoteEvent(a)}(t,n))}catch(i){Jn("RemoteStore","Failed to raise snapshot:",i),yield rq(t,i)}})}function rq(t,e,n){return O(this,null,function*(){if(!f7(e))throw e;t.M_.add(1),yield BI(t),t.N_.set("Offline"),n||(n=()=>ENe(t.localStore)),t.asyncQueue.enqueueRetryable(()=>O(this,null,function*(){Jn("RemoteStore","Retrying IndexedDB access"),yield n(),t.M_.delete(1),yield aB(t)}))})}function LNe(t,e){return e().catch(n=>rq(t,n,e))}function zI(t){return O(this,null,function*(){let e=ms(t),n=p7(e),i=e.v_.length>0?e.v_[e.v_.length-1].batchId:-1;for(;cRt(e);)try{let r=yield tRt(e.localStore,i);if(r===null){e.v_.length===0&&n.n_();break}i=r.batchId,dRt(e,r)}catch(r){yield rq(e,r)}ONe(e)&&NNe(e)})}function cRt(t){return g7(t)&&t.v_.length<10}function dRt(t,e){t.v_.push(e);let n=p7(t);n.Xo()&&n.E_&&n.d_(e.mutations)}function ONe(t){return g7(t)&&!p7(t).Zo()&&t.v_.length>0}function NNe(t){p7(t).start()}function uRt(t){return O(this,null,function*(){p7(t).V_()})}function hRt(t){return O(this,null,function*(){let e=p7(t);for(let n of t.v_)e.d_(n.mutations)})}function pRt(t,e,n){return O(this,null,function*(){let i=t.v_.shift(),r=A1e.from(i,e,n);yield LNe(t,()=>t.remoteSyncer.applySuccessfulWrite(r)),yield zI(t)})}function mRt(t,e){return O(this,null,function*(){e&&p7(t).E_&&(yield function(i,r){return O(this,null,function*(){if(function(o){return nNe(o)&&o!==dn.ABORTED}(r.code)){let s=i.v_.shift();p7(i).t_(),yield LNe(i,()=>i.remoteSyncer.rejectFailedWrite(s.batchId,r)),yield zI(i)}})}(t,e)),ONe(t)&&NNe(t)})}function cOe(t,e){return O(this,null,function*(){let n=ms(t);n.asyncQueue.verifyOperationInProgress(),Jn("RemoteStore","RemoteStore received new credentials");let i=g7(n);n.M_.add(3),yield BI(n),i&&n.N_.set("Unknown"),yield n.remoteSyncer.handleCredentialChange(e),n.M_.delete(3),yield aB(n)})}function S0e(t,e){return O(this,null,function*(){let n=ms(t);e?(n.M_.delete(2),yield aB(n)):e||(n.M_.add(2),yield BI(n),n.N_.set("Unknown"))})}function HI(t){return t.B_||(t.B_=function(n,i,r){let s=ms(n);return s.f_(),new _0e(i,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,r)}(t.datastore,t.asyncQueue,{Po:sRt.bind(null,t),To:oRt.bind(null,t),Ao:aRt.bind(null,t),h_:lRt.bind(null,t)}),t.x_.push(e=>O(this,null,function*(){e?(t.B_.t_(),f2e(t)?m2e(t):t.N_.set("Unknown")):(yield t.B_.stop(),FNe(t))}))),t.B_}function p7(t){return t.k_||(t.k_=function(n,i,r){let s=ms(n);return s.f_(),new C0e(i,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,r)}(t.datastore,t.asyncQueue,{Po:()=>Promise.resolve(),To:uRt.bind(null,t),Ao:mRt.bind(null,t),R_:hRt.bind(null,t),A_:pRt.bind(null,t)}),t.x_.push(e=>O(this,null,function*(){e?(t.k_.t_(),yield zI(t)):(yield t.k_.stop(),t.v_.length>0&&(Jn("RemoteStore",`Stopping write stream with ${t.v_.length} pending writes`),t.v_=[]))}))),t.k_}function GI(t,e){if(xm("AsyncQueue",`${e}: ${t}`),f7(t))return new Un(dn.UNAVAILABLE,`${e}: ${t}`);throw t}function g2e(t,e){return O(this,null,function*(){let n=ms(t),i=3,r=e.query,s=n.queries.get(r);s?!s.W_()&&e.G_()&&(i=2):(s=new D0e,i=e.G_()?0:1);try{switch(i){case 0:s.K_=yield n.onListen(r,!0);break;case 1:s.K_=yield n.onListen(r,!1);break;case 2:yield n.onFirstRemoteStoreListen(r)}}catch(o){let a=GI(o,`Initialization of query '${hI(e.query)}' failed`);return void e.onError(a)}n.queries.set(r,s),s.U_.push(e),e.j_(n.onlineState),s.K_&&e.H_(s.K_)&&y2e(n)})}function v2e(t,e){return O(this,null,function*(){let n=ms(t),i=e.query,r=3,s=n.queries.get(i);if(s){let o=s.U_.indexOf(e);o>=0&&(s.U_.splice(o,1),s.U_.length===0?r=e.G_()?0:1:!s.W_()&&e.G_()&&(r=2))}switch(r){case 0:return n.queries.delete(i),n.onUnlisten(i,!0);case 1:return n.queries.delete(i),n.onUnlisten(i,!1);case 2:return n.onLastRemoteStoreUnlisten(i);default:return}})}function fRt(t,e){let n=ms(t),i=!1;for(let r of e){let s=r.query,o=n.queries.get(s);if(o){for(let a of o.U_)a.H_(r)&&(i=!0);o.K_=r}}i&&y2e(n)}function gRt(t,e,n){let i=ms(t),r=i.queries.get(e);if(r)for(let s of r.U_)s.onError(n);i.queries.delete(e)}function y2e(t){t.z_.forEach(e=>{e.next()})}function VNe(t){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}function vRt(t,e,n=!0){return O(this,null,function*(){let i=wq(t),r,s=i.ba.get(e);return s?(i.sharedClientState.addLocalQueryTarget(s.targetId),r=s.view.ya()):r=yield BNe(i,e,n,!0),r})}function yRt(t,e){return O(this,null,function*(){let n=wq(t);yield BNe(n,e,!0,!1)})}function BNe(t,e,n,i){return O(this,null,function*(){let r=yield kI(t.localStore,cg(e)),s=r.targetId,o=n?t.sharedClientState.addLocalQueryTarget(s):"not-current",a;return i&&(a=yield _2e(t,e,s,o==="current",r.resumeToken)),t.isPrimaryClient&&n&&bq(t.remoteStore,r),a})}function _2e(t,e,n,i,r){return O(this,null,function*(){t.Ba=(u,m,f)=>function(x,D,E,M){return O(this,null,function*(){let I=D.view.da(E);I.Xi&&(I=yield QY(x.localStore,D.query,!1).then(({documents:Y})=>D.view.da(Y,I)));let z=M&&M.targetChanges.get(D.targetId),G=M&&M.targetMismatches.get(D.targetId)!=null,A=D.view.applyChanges(I,x.isPrimaryClient,z,G);return F0e(x,D.targetId,A.fa),A.snapshot})}(t,u,m,f);let s=yield QY(t.localStore,e,!0),o=new dq(e,s.hs),a=o.da(s.documents),l=UV.createSynthesizedTargetChangeForCurrentChange(n,i&&t.onlineState!=="Offline",r),c=o.applyChanges(a,t.isPrimaryClient,l);F0e(t,n,c.fa);let d=new A0e(e,n,o);return t.ba.set(e,d),t.Da.has(n)?t.Da.get(n).push(e):t.Da.set(n,[e]),c.snapshot})}function _Rt(t,e,n){return O(this,null,function*(){let i=ms(t),r=i.ba.get(e),s=i.Da.get(r.targetId);if(s.length>1)return i.Da.set(r.targetId,s.filter(o=>!rB(o,e))),void i.ba.delete(e);i.isPrimaryClient?(i.sharedClientState.removeLocalQueryTarget(r.targetId),i.sharedClientState.isActiveQueryTarget(r.targetId)||(yield II(i.localStore,r.targetId,!1).then(()=>{i.sharedClientState.clearQueryState(r.targetId),n&&AI(i.remoteStore,r.targetId),RI(i,r.targetId)}).catch(m7))):(RI(i,r.targetId),yield II(i.localStore,r.targetId,!0))})}function CRt(t,e){return O(this,null,function*(){let n=ms(t),i=n.ba.get(e),r=n.Da.get(i.targetId);n.isPrimaryClient&&r.length===1&&(n.sharedClientState.removeLocalQueryTarget(i.targetId),AI(n.remoteStore,i.targetId))})}function xRt(t,e,n){return O(this,null,function*(){let i=w2e(t);try{let r=yield function(o,a){let l=ms(o),c=kp.now(),d=a.reduce((f,_)=>f.add(_.key),ul()),u,m;return l.persistence.runTransaction("Locally write mutations","readwrite",f=>{let _=n3(),x=ul();return l.os.getEntries(f,d).next(D=>{_=D,_.forEach((E,M)=>{M.isValidDocument()||(x=x.add(E))})}).next(()=>l.localDocuments.getOverlayedDocuments(f,_)).next(D=>{u=D;let E=[];for(let M of a){let I=LPt(M,u.get(M.key).overlayedDocument);I!=null&&E.push(new Ny(M.key,I,LOe(I.value.mapValue),em.exists(!0)))}return l.mutationQueue.addMutationBatch(f,c,E,a)}).next(D=>{m=D;let E=D.applyToLocalDocumentSet(u,x);return l.documentOverlayCache.saveOverlays(f,D.batchId,E)})}).then(()=>({batchId:m.batchId,changes:$Oe(u)}))}(i.localStore,e);i.sharedClientState.addPendingMutation(r.batchId),function(o,a,l){let c=o.xa[o.currentUser.toKey()];c||(c=new Ih(el)),c=c.insert(a,l),o.xa[o.currentUser.toKey()]=c}(i,r.batchId,n),yield ix(i,r.changes),yield zI(i.remoteStore)}catch(r){let s=GI(r,"Failed to persist write");n.reject(s)}})}function zNe(t,e){return O(this,null,function*(){let n=ms(t);try{let i=yield eRt(n.localStore,e);e.targetChanges.forEach((r,s)=>{let o=n.Fa.get(s);o&&(To(r.addedDocuments.size+r.modifiedDocuments.size+r.removedDocuments.size<=1),r.addedDocuments.size>0?o.wa=!0:r.modifiedDocuments.size>0?To(o.wa):r.removedDocuments.size>0&&(To(o.wa),o.wa=!1))}),yield ix(n,i,e)}catch(i){yield m7(i)}})}function uOe(t,e,n){let i=ms(t);if(i.isPrimaryClient&&n===0||!i.isPrimaryClient&&n===1){let r=[];i.ba.forEach((s,o)=>{let a=o.view.j_(e);a.snapshot&&r.push(a.snapshot)}),function(o,a){let l=ms(o);l.onlineState=a;let c=!1;l.queries.forEach((d,u)=>{for(let m of u.U_)m.j_(a)&&(c=!0)}),c&&y2e(l)}(i.eventManager,e),r.length&&i.Sa.h_(r),i.onlineState=e,i.isPrimaryClient&&i.sharedClientState.setOnlineState(e)}}function bRt(t,e,n){return O(this,null,function*(){let i=ms(t);i.sharedClientState.updateQueryState(e,"rejected",n);let r=i.Fa.get(e),s=r&&r.key;if(s){let o=new Ih(hs.comparator);o=o.insert(s,mf.newNoDocument(s,Bo.min()));let a=ul().add(s),l=new WV(Bo.min(),new Map,new Ih(el),o,a);yield zNe(i,l),i.va=i.va.remove(s),i.Fa.delete(e),b2e(i)}else yield II(i.localStore,e,!1).then(()=>RI(i,e,n)).catch(m7)})}function wRt(t,e){return O(this,null,function*(){let n=ms(t),i=e.batch.batchId;try{let r=yield JPt(n.localStore,e);x2e(n,i,null),C2e(n,i),n.sharedClientState.updateMutationState(i,"acknowledged"),yield ix(n,r)}catch(r){yield m7(r)}})}function SRt(t,e,n){return O(this,null,function*(){let i=ms(t);try{let r=yield function(o,a){let l=ms(o);return l.persistence.runTransaction("Reject batch","readwrite-primary",c=>{let d;return l.mutationQueue.lookupMutationBatch(c,a).next(u=>(To(u!==null),d=u.keys(),l.mutationQueue.removeMutationBatch(c,u))).next(()=>l.mutationQueue.performConsistencyCheck(c)).next(()=>l.documentOverlayCache.removeOverlaysForBatchId(c,d,a)).next(()=>l.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(c,d)).next(()=>l.localDocuments.getDocuments(c,d))})}(i.localStore,e);x2e(i,e,n),C2e(i,e),i.sharedClientState.updateMutationState(e,"rejected",n),yield ix(i,r)}catch(r){yield m7(r)}})}function TRt(t,e){return O(this,null,function*(){let n=ms(t);g7(n.remoteStore)||Jn("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{let i=yield function(o){let a=ms(o);return a.persistence.runTransaction("Get highest unacknowledged batch id","readonly",l=>a.mutationQueue.getHighestUnacknowledgedBatchId(l))}(n.localStore);if(i===-1)return void e.resolve();let r=n.Oa.get(i)||[];r.push(e),n.Oa.set(i,r)}catch(i){let r=GI(i,"Initialization of waitForPendingWrites() operation failed");e.reject(r)}})}function C2e(t,e){(t.Oa.get(e)||[]).forEach(n=>{n.resolve()}),t.Oa.delete(e)}function x2e(t,e,n){let i=ms(t),r=i.xa[i.currentUser.toKey()];if(r){let s=r.get(e);s&&(n?s.reject(n):s.resolve(),r=r.remove(e)),i.xa[i.currentUser.toKey()]=r}}function RI(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(let i of t.Da.get(e))t.ba.delete(i),n&&t.Sa.ka(i,n);t.Da.delete(e),t.isPrimaryClient&&t.Ma.Vr(e).forEach(i=>{t.Ma.containsKey(i)||HNe(t,i)})}function HNe(t,e){t.Ca.delete(e.path.canonicalString());let n=t.va.get(e);n!==null&&(AI(t.remoteStore,n),t.va=t.va.remove(e),t.Fa.delete(n),b2e(t))}function F0e(t,e,n){for(let i of n)i instanceof lq?(t.Ma.addReference(i.key,e),DRt(t,i)):i instanceof cq?(Jn("SyncEngine","Document no longer in limbo: "+i.key),t.Ma.removeReference(i.key,e),t.Ma.containsKey(i.key)||HNe(t,i.key)):Ws()}function DRt(t,e){let n=e.key,i=n.path.canonicalString();t.va.get(n)||t.Ca.has(i)||(Jn("SyncEngine","New document in limbo: "+n),t.Ca.add(i),b2e(t))}function b2e(t){for(;t.Ca.size>0&&t.va.size<t.maxConcurrentLimboResolutions;){let e=t.Ca.values().next().value;t.Ca.delete(e);let n=new hs(Fc.fromString(e)),i=t.Na.next();t.Fa.set(i,new P0e(n)),t.va=t.va.insert(n,i),bq(t.remoteStore,new EI(cg(VI(n.path)),i,"TargetPurposeLimboResolution",x4.oe))}}function ix(t,e,n){return O(this,null,function*(){let i=ms(t),r=[],s=[],o=[];i.ba.isEmpty()||(i.ba.forEach((a,l)=>{o.push(i.Ba(l,e,n).then(c=>{var d;if((c||n)&&i.isPrimaryClient){let u=c?!c.fromCache:(d=n?.targetChanges.get(l.targetId))===null||d===void 0?void 0:d.current;i.sharedClientState.updateQueryState(l.targetId,u?"current":"not-current")}if(c){r.push(c);let u=h0e.Ki(l.targetId,c);s.push(u)}}))}),yield Promise.all(o),i.Sa.h_(r),yield function(l,c){return O(this,null,function*(){let d=ms(l);try{yield d.persistence.runTransaction("notifyLocalViewChanges","readwrite",u=>tn.forEach(c,m=>tn.forEach(m.qi,f=>d.persistence.referenceDelegate.addReference(u,m.targetId,f)).next(()=>tn.forEach(m.Qi,f=>d.persistence.referenceDelegate.removeReference(u,m.targetId,f)))))}catch(u){if(!f7(u))throw u;Jn("LocalStore","Failed to update sequence numbers: "+u)}for(let u of c){let m=u.targetId;if(!u.fromCache){let f=d.ns.get(m),_=f.snapshotVersion,x=f.withLastLimboFreeSnapshotVersion(_);d.ns=d.ns.insert(m,x)}}})}(i.localStore,s))})}function ERt(t,e){return O(this,null,function*(){let n=ms(t);if(!n.currentUser.isEqual(e)){Jn("SyncEngine","User change. New user:",e.toKey());let i=yield DNe(n.localStore,e);n.currentUser=e,function(s,o){s.Oa.forEach(a=>{a.forEach(l=>{l.reject(new Un(dn.CANCELLED,o))})}),s.Oa.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,i.removedBatchIds,i.addedBatchIds),yield ix(n,i.us)}})}function MRt(t,e){let n=ms(t),i=n.Fa.get(e);if(i&&i.wa)return ul().add(i.key);{let r=ul(),s=n.Da.get(e);if(!s)return r;for(let o of s){let a=n.ba.get(o);r=r.unionWith(a.view.Ea)}return r}}function kRt(t,e){return O(this,null,function*(){let n=ms(t),i=yield QY(n.localStore,e.query,!0),r=e.view.pa(i);return n.isPrimaryClient&&F0e(n,e.targetId,r.fa),r})}function IRt(t,e){return O(this,null,function*(){let n=ms(t);return INe(n.localStore,e).then(i=>ix(n,i))})}function ARt(t,e,n,i){return O(this,null,function*(){let r=ms(t),s=yield function(a,l){let c=ms(a),d=ms(c.mutationQueue);return c.persistence.runTransaction("Lookup mutation documents","readonly",u=>d.vn(u,l).next(m=>m?c.localDocuments.getDocuments(u,m):tn.resolve(null)))}(r.localStore,e);s!==null?(n==="pending"?yield zI(r.remoteStore):n==="acknowledged"||n==="rejected"?(x2e(r,e,i||null),C2e(r,e),function(a,l){ms(ms(a).mutationQueue).Mn(l)}(r.localStore,e)):Ws(),yield ix(r,s)):Jn("SyncEngine","Cannot apply mutation batch with id: "+e)})}function PRt(t,e){return O(this,null,function*(){let n=ms(t);if(wq(n),w2e(n),e===!0&&n.La!==!0){let i=n.sharedClientState.getAllActiveQueryTargets(),r=yield hOe(n,i.toArray());n.La=!0,yield S0e(n.remoteStore,!0);for(let s of r)bq(n.remoteStore,s)}else if(e===!1&&n.La!==!1){let i=[],r=Promise.resolve();n.Da.forEach((s,o)=>{n.sharedClientState.isLocalQueryTarget(o)?i.push(o):r=r.then(()=>(RI(n,o),II(n.localStore,o,!0))),AI(n.remoteStore,o)}),yield r,yield hOe(n,i),function(o){let a=ms(o);a.Fa.forEach((l,c)=>{AI(a.remoteStore,c)}),a.Ma.mr(),a.Fa=new Map,a.va=new Ih(hs.comparator)}(n),n.La=!1,yield S0e(n.remoteStore,!1)}})}function hOe(t,e,n){return O(this,null,function*(){let i=ms(t),r=[],s=[];for(let o of e){let a,l=i.Da.get(o);if(l&&l.length!==0){a=yield kI(i.localStore,cg(l[0]));for(let c of l){let d=i.ba.get(c),u=yield kRt(i,d);u.snapshot&&s.push(u.snapshot)}}else{let c=yield kNe(i.localStore,o);a=yield kI(i.localStore,c),yield _2e(i,GNe(c),o,!1,a.resumeToken)}r.push(a)}return i.Sa.h_(s),r})}function GNe(t){return HOe(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function RRt(t){return function(n){return ms(ms(n).persistence).Bi()}(ms(t).localStore)}function FRt(t,e,n,i){return O(this,null,function*(){let r=ms(t);if(r.La)return void Jn("SyncEngine","Ignoring unexpected query state notification.");let s=r.Da.get(e);if(s&&s.length>0)switch(n){case"current":case"not-current":{let o=yield INe(r.localStore,WOe(s[0])),a=WV.createSynthesizedRemoteEventForCurrentChange(e,n==="current",N1.EMPTY_BYTE_STRING);yield ix(r,o,a);break}case"rejected":yield II(r.localStore,e,!0),RI(r,e,i);break;default:Ws()}})}function LRt(t,e,n){return O(this,null,function*(){let i=wq(t);if(i.La){for(let r of e){if(i.Da.has(r)&&i.sharedClientState.isActiveQueryTarget(r)){Jn("SyncEngine","Adding an already active target "+r);continue}let s=yield kNe(i.localStore,r),o=yield kI(i.localStore,s);yield _2e(i,GNe(s),o.targetId,!1,o.resumeToken),bq(i.remoteStore,o)}for(let r of n)i.Da.has(r)&&(yield II(i.localStore,r,!1).then(()=>{AI(i.remoteStore,r),RI(i,r)}).catch(m7))}})}function wq(t){let e=ms(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=zNe.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=MRt.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=bRt.bind(null,e),e.Sa.h_=fRt.bind(null,e.eventManager),e.Sa.ka=gRt.bind(null,e.eventManager),e}function w2e(t){let e=ms(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=wRt.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=SRt.bind(null,e),e}function ORt(t,e,n){let i=ms(t);(function(s,o,a){return O(this,null,function*(){try{let l=yield o.getMetadata();if(yield function(f,_){let x=ms(f),D=wm(_.createTime);return x.persistence.runTransaction("hasNewerBundle","readonly",E=>x.$r.getBundleMetadata(E,_.id)).then(E=>!!E&&E.createTime.compareTo(D)>=0)}(s.localStore,l))return yield o.close(),a._completeWith(function(f){return{taskState:"Success",documentsLoaded:f.totalDocuments,bytesLoaded:f.totalBytes,totalDocuments:f.totalDocuments,totalBytes:f.totalBytes}}(l)),Promise.resolve(new Set);a._updateProgress(VNe(l));let c=new I0e(l,s.localStore,o.serializer),d=yield o.qa();for(;d;){let m=yield c._a(d);m&&a._updateProgress(m),d=yield o.qa()}let u=yield c.complete();return yield ix(s,u.ca,void 0),yield function(f,_){let x=ms(f);return x.persistence.runTransaction("Save bundle","readwrite",D=>x.$r.saveBundleMetadata(D,_))}(s.localStore,l),a._completeWith(u.progress),Promise.resolve(u.ua)}catch(l){return Vv("SyncEngine",`Loading bundle failed with ${l}`),a._failWith(l),Promise.resolve(new Set)}})})(i,e,n).then(r=>{i.sharedClientState.notifyBundleLoaded(r)})}function pOe(t,e=10240){let n=0;return{read(){return O(this,null,function*(){if(n<t.byteLength){let r={value:t.slice(n,n+e),done:!1};return n+=e,r}return{done:!0}})},cancel(){return O(this,null,function*(){})},releaseLock(){},closed:Promise.resolve()}}function SY(t,e){return O(this,null,function*(){t.asyncQueue.verifyOperationInProgress(),Jn("FirestoreClient","Initializing OfflineComponentProvider");let n=t.configuration;yield e.initialize(n);let i=n.initialUser;t.setCredentialChangeListener(r=>O(this,null,function*(){i.isEqual(r)||(yield DNe(e.localStore,r),i=r)})),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e})}function z0e(t,e){return O(this,null,function*(){t.asyncQueue.verifyOperationInProgress();let n=yield S2e(t);Jn("FirestoreClient","Initializing OnlineComponentProvider"),yield e.initialize(n,t.configuration),t.setCredentialChangeListener(i=>cOe(e.remoteStore,i)),t.setAppCheckTokenChangeListener((i,r)=>cOe(e.remoteStore,r)),t._onlineComponents=e})}function WNe(t){return t.name==="FirebaseError"?t.code===dn.FAILED_PRECONDITION||t.code===dn.UNIMPLEMENTED:!(typeof DOMException<"u"&&t instanceof DOMException)||t.code===22||t.code===20||t.code===11}function S2e(t){return O(this,null,function*(){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){Jn("FirestoreClient","Using user provided OfflineComponentProvider");try{yield SY(t,t._uninitializedComponentsProvider._offline)}catch(e){let n=e;if(!WNe(n))throw n;Vv("Error using user provided cache. Falling back to memory cache: "+n),yield SY(t,new QV)}}else Jn("FirestoreClient","Using default OfflineComponentProvider"),yield SY(t,new QV);return t._offlineComponents})}function Sq(t){return O(this,null,function*(){return t._onlineComponents||(t._uninitializedComponentsProvider?(Jn("FirestoreClient","Using user provided OnlineComponentProvider"),yield z0e(t,t._uninitializedComponentsProvider._online)):(Jn("FirestoreClient","Using default OnlineComponentProvider"),yield z0e(t,new JV))),t._onlineComponents})}function UNe(t){return S2e(t).then(e=>e.persistence)}function T2e(t){return S2e(t).then(e=>e.localStore)}function jNe(t){return Sq(t).then(e=>e.remoteStore)}function D2e(t){return Sq(t).then(e=>e.syncEngine)}function NRt(t){return Sq(t).then(e=>e.datastore)}function LI(t){return O(this,null,function*(){let e=yield Sq(t),n=e.eventManager;return n.onListen=vRt.bind(null,e.syncEngine),n.onUnlisten=_Rt.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=yRt.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=CRt.bind(null,e.syncEngine),n})}function VRt(t){return t.asyncQueue.enqueue(()=>O(this,null,function*(){let e=yield UNe(t),n=yield jNe(t);return e.setNetworkEnabled(!0),function(r){let s=ms(r);return s.M_.delete(0),aB(s)}(n)}))}function BRt(t){return t.asyncQueue.enqueue(()=>O(this,null,function*(){let e=yield UNe(t),n=yield jNe(t);return e.setNetworkEnabled(!1),function(r){return O(this,null,function*(){let s=ms(r);s.M_.add(0),yield BI(s),s.N_.set("Offline")})}(n)}))}function zRt(t,e){let n=new pf;return t.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return function(r,s,o){return O(this,null,function*(){try{let a=yield function(c,d){let u=ms(c);return u.persistence.runTransaction("read document","readonly",m=>u.localDocuments.getDocument(m,d))}(r,s);a.isFoundDocument()?o.resolve(a):a.isNoDocument()?o.resolve(null):o.reject(new Un(dn.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(a){let l=GI(a,`Failed to get document '${s} from cache`);o.reject(l)}})}(yield T2e(t),e,n)})),n.promise}function $Ne(t,e,n={}){let i=new pf;return t.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return function(s,o,a,l,c){let d=new FI({next:m=>{o.enqueueAndForget(()=>v2e(s,u));let f=m.docs.has(a);!f&&m.fromCache?c.reject(new Un(dn.UNAVAILABLE,"Failed to get document because the client is offline.")):f&&m.fromCache&&l&&l.source==="server"?c.reject(new Un(dn.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):c.resolve(m)},error:m=>c.reject(m)}),u=new XV(VI(a.path),d,{includeMetadataChanges:!0,ra:!0});return g2e(s,u)}(yield LI(t),t.asyncQueue,e,n,i)})),i.promise}function HRt(t,e){let n=new pf;return t.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return function(r,s,o){return O(this,null,function*(){try{let a=yield QY(r,s,!0),l=new dq(s,a.hs),c=l.da(a.documents),d=l.applyChanges(c,!1);o.resolve(d.snapshot)}catch(a){let l=GI(a,`Failed to execute query '${s} against cache`);o.reject(l)}})}(yield T2e(t),e,n)})),n.promise}function KNe(t,e,n={}){let i=new pf;return t.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return function(s,o,a,l,c){let d=new FI({next:m=>{o.enqueueAndForget(()=>v2e(s,u)),m.fromCache&&l.source==="server"?c.reject(new Un(dn.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):c.resolve(m)},error:m=>c.reject(m)}),u=new XV(a,d,{includeMetadataChanges:!0,ra:!0});return g2e(s,u)}(yield LI(t),t.asyncQueue,e,n,i)})),i.promise}function GRt(t,e){let n=new FI(e);return t.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return function(r,s){ms(r).z_.add(s),s.next()}(yield LI(t),n)})),()=>{n.$a(),t.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return function(r,s){ms(r).z_.delete(s)}(yield LI(t),n)}))}}function WRt(t,e,n,i){let r=function(o,a){let l;return l=typeof o=="string"?sNe().encode(o):o,function(d,u){return new O0e(d,u)}(function(d,u){if(d instanceof Uint8Array)return pOe(d,u);if(d instanceof ArrayBuffer)return pOe(new Uint8Array(d),u);if(d instanceof ReadableStream)return d.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}(l),a)}(n,oB(e));t.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){ORt(yield D2e(t),r,i)}))}function URt(t,e){return t.asyncQueue.enqueue(()=>O(this,null,function*(){return function(i,r){let s=ms(i);return s.persistence.runTransaction("Get named query","readonly",o=>s.$r.getNamedQuery(o,r))}(yield T2e(t),e)}))}function YNe(t){let e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}function E2e(t,e,n){if(!n)throw new Un(dn.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function M2e(t,e,n,i){if(e===!0&&i===!0)throw new Un(dn.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function fOe(t){if(!hs.isDocumentKey(t))throw new Un(dn.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function gOe(t){if(hs.isDocumentKey(t))throw new Un(dn.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function Tq(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{let e=function(i){return i.constructor?i.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":Ws()}function Lc(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new Un(dn.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let n=Tq(t);throw new Un(dn.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}function qNe(t,e){if(e<=0)throw new Un(dn.INVALID_ARGUMENT,`Function ${t}() requires a positive number, but it was: ${e}.`)}function ZNe(t,e,n,i={}){var r;let s=(t=Lc(t,zT))._getSettings(),o=`${e}:${n}`;if(s.host!=="firestore.googleapis.com"&&s.host!==o&&Vv("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),i.mockUserToken){let a,l;if(typeof i.mockUserToken=="string")a=i.mockUserToken,l=hf.MOCK_USER;else{a=pDe(i.mockUserToken,(r=t._app)===null||r===void 0?void 0:r.options.projectId);let c=i.mockUserToken.sub||i.mockUserToken.user_id;if(!c)throw new Un(dn.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");l=new hf(c)}t._authCredentials=new s1e(new TY(a,l))}}function k2e(t,e,...n){if(t=Sp(t),E2e("collection","path",e),t instanceof zT){let i=Fc.fromString(e,...n);return gOe(i),new n5(t,null,i)}{if(!(t instanceof Ju||t instanceof n5))throw new Un(dn.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let i=t._path.child(Fc.fromString(e,...n));return gOe(i),new n5(t.firestore,null,i)}}function XNe(t,e){if(t=Lc(t,zT),E2e("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new Un(dn.INVALID_ARGUMENT,`Invalid collection ID '${e}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new I0(t,null,function(i){return new Oy(Fc.emptyPath(),i)}(e))}function lB(t,e,...n){if(t=Sp(t),arguments.length===1&&(e=DY.newId()),E2e("doc","path",e),t instanceof zT){let i=Fc.fromString(e,...n);return fOe(i),new Ju(t,null,new hs(i))}{if(!(t instanceof Ju||t instanceof n5))throw new Un(dn.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let i=t._path.child(Fc.fromString(e,...n));return fOe(i),new Ju(t.firestore,t instanceof n5?t.converter:null,new hs(i))}}function I2e(t,e){return t=Sp(t),e=Sp(e),(t instanceof Ju||t instanceof n5)&&(e instanceof Ju||e instanceof n5)&&t.firestore===e.firestore&&t.path===e.path&&t.converter===e.converter}function A2e(t,e){return t=Sp(t),e=Sp(e),t instanceof I0&&e instanceof I0&&t.firestore===e.firestore&&rB(t._query,e._query)&&t.converter===e.converter}function G0e(t){return function(n,i){if(typeof n!="object"||n===null)return!1;let r=n;for(let s of i)if(s in r&&typeof r[s]=="function")return!0;return!1}(t,["next","error","complete"])}function r1(t){return t._firestoreClient||JNe(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function JNe(t){var e,n,i;let r=t._freezeSettings(),s=function(a,l,c,d){return new g1e(a,l,c,d.host,d.ssl,d.experimentalForceLongPolling,d.experimentalAutoDetectLongPolling,YNe(d.experimentalLongPollingOptions),d.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,r);t._firestoreClient=new B0e(t._authCredentials,t._appCheckCredentials,t._queue,s),!((n=r.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((i=r.localCache)===null||i===void 0)&&i._onlineComponentProvider)&&(t._firestoreClient._uninitializedComponentsProvider={_offlineKind:r.localCache.kind,_offline:r.localCache._offlineComponentProvider,_online:r.localCache._onlineComponentProvider})}function eVe(t,e){cVe(t=Lc(t,Jh));let n=r1(t);if(n._uninitializedComponentsProvider)throw new Un(dn.FAILED_PRECONDITION,"SDK cache is already specified.");Vv("enableIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");let i=t._freezeSettings(),r=new JV;return iVe(n,r,new uq(r,i.cacheSizeBytes,e?.forceOwnership))}function tVe(t){cVe(t=Lc(t,Jh));let e=r1(t);if(e._uninitializedComponentsProvider)throw new Un(dn.FAILED_PRECONDITION,"SDK cache is already specified.");Vv("enableMultiTabIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.");let n=t._freezeSettings(),i=new JV;return iVe(e,i,new L0e(i,n.cacheSizeBytes))}function iVe(t,e,n){let i=new pf;return t.asyncQueue.enqueue(()=>O(this,null,function*(){try{yield SY(t,n),yield z0e(t,e),i.resolve()}catch(r){let s=r;if(!WNe(s))throw s;Vv("Error enabling indexeddb cache. Falling back to memory cache: "+s),i.reject(s)}})).then(()=>i.promise)}function nVe(t){if(t._initialized&&!t._terminated)throw new Un(dn.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");let e=new pf;return t._queue.enqueueAndForgetEvenWhileRestricted(()=>O(this,null,function*(){try{yield function(i){return O(this,null,function*(){if(!s7.D())return Promise.resolve();let r=i+"main";yield s7.delete(r)})}(h2e(t._databaseId,t._persistenceKey)),e.resolve()}catch(n){e.reject(n)}})),e.promise}function rVe(t){return function(n){let i=new pf;return n.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return TRt(yield D2e(n),i)})),i.promise}(r1(t=Lc(t,Jh)))}function sVe(t){return VRt(r1(t=Lc(t,Jh)))}function oVe(t){return BRt(r1(t=Lc(t,Jh)))}function aVe(t,e){let n=r1(t=Lc(t,Jh)),i=new W0e;return WRt(n,t._databaseId,e,i),i}function lVe(t,e){return URt(r1(t=Lc(t,Jh)),e).then(n=>n?new I0(t,null,n.query):null)}function cVe(t){if(t._initialized||t._terminated)throw new Un(dn.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}function dVe(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Ws()}}function jT(t){let e=t._freezeSettings(),n=oB(t._databaseId);return new j0e(t._databaseId,!!e.ignoreUndefinedProperties,n)}function Dq(t,e,n,i,r,s={}){let o=t.Fu(s.merge||s.mergeFields?2:0,e,n,r);F2e("Data must be an object, but it was:",o,i);let a=pVe(i,o),l,c;if(s.merge)l=new b4(o.fieldMask),c=o.fieldTransforms;else if(s.mergeFields){let d=[];for(let u of s.mergeFields){let m=Z0e(e,u,n);if(!o.contains(m))throw new Un(dn.INVALID_ARGUMENT,`Field '${m}' is specified in your field mask but missing from your input data.`);fVe(d,m)||d.push(m)}l=new b4(d),c=o.fieldTransforms.filter(u=>l.covers(u.field))}else l=null,c=o.fieldTransforms;return new U0e(new l2(a),l,c)}function uVe(t,e,n){return new mq({fu:3,vu:e.settings.vu,methodName:t._methodName,yu:n},e.databaseId,e.serializer,e.ignoreUndefinedProperties)}function P2e(t,e,n,i){let r=t.Fu(1,e,n);F2e("Data must be an object, but it was:",r,i);let s=[],o=l2.empty();UT(i,(l,c)=>{let d=L2e(e,l,n);c=Sp(c);let u=r.Su(d);if(c instanceof eB)s.push(d);else{let m=$T(c,u);m!=null&&(s.push(d),o.set(d,m))}});let a=new b4(s);return new pq(o,a,r.fieldTransforms)}function R2e(t,e,n,i,r,s){let o=t.Fu(1,e,n),a=[Z0e(e,i,n)],l=[r];if(s.length%2!=0)throw new Un(dn.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let m=0;m<s.length;m+=2)a.push(Z0e(e,s[m])),l.push(s[m+1]);let c=[],d=l2.empty();for(let m=a.length-1;m>=0;--m)if(!fVe(c,a[m])){let f=a[m],_=l[m];_=Sp(_);let x=o.Su(f);if(_ instanceof eB)c.push(f);else{let D=$T(_,x);D!=null&&(c.push(f),d.set(f,D))}}let u=new b4(c);return new pq(d,u,o.fieldTransforms)}function hVe(t,e,n,i=!1){return $T(n,t.Fu(i?4:3,e))}function $T(t,e){if(mVe(t=Sp(t)))return F2e("Unsupported field value:",e,t),pVe(t,e);if(t instanceof ex)return function(i,r){if(!dVe(r.fu))throw r.Du(`${i._methodName}() can only be used with update() and set()`);if(!r.path)throw r.Du(`${i._methodName}() is not currently supported inside arrays`);let s=i._toFieldTransform(r);s&&r.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.yu&&e.fu!==4)throw e.Du("Nested arrays are not supported");return function(i,r){let s=[],o=0;for(let a of i){let l=$T(a,r.bu(o));l==null&&(l={nullValue:"NULL_VALUE"}),s.push(l),o++}return{arrayValue:{values:s}}}(t,e)}return function(i,r){if((i=Sp(i))===null)return{nullValue:"NULL_VALUE"};if(typeof i=="number")return ZOe(r.serializer,i);if(typeof i=="boolean")return{booleanValue:i};if(typeof i=="string")return{stringValue:i};if(i instanceof Date){let s=kp.fromDate(i);return{timestampValue:DI(r.serializer,s)}}if(i instanceof kp){let s=new kp(i.seconds,1e3*Math.floor(i.nanoseconds/1e3));return{timestampValue:DI(r.serializer,s)}}if(i instanceof HT)return{geoPointValue:{latitude:i.latitude,longitude:i.longitude}};if(i instanceof a5)return{bytesValue:oNe(r.serializer,i._byteString)};if(i instanceof Ju){let s=r.databaseId,o=i.firestore._databaseId;if(!o.isEqual(s))throw r.Du(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:c2e(i.firestore._databaseId||r.databaseId,i._key.path)}}throw r.Du(`Unsupported field value: ${Tq(i)}`)}(t,e)}function pVe(t,e){let n={};return POe(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):UT(t,(i,r)=>{let s=$T(r,e.pu(i));s!=null&&(n[i]=s)}),{mapValue:{fields:n}}}function mVe(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof kp||t instanceof HT||t instanceof a5||t instanceof Ju||t instanceof ex)}function F2e(t,e,n){if(!mVe(n)||!function(r){return typeof r=="object"&&r!==null&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}(n)){let i=Tq(n);throw i==="an object"?e.Du(t+" a custom object"):e.Du(t+" "+i)}}function Z0e(t,e,n){if((e=Sp(e))instanceof Vy)return e._internalPath;if(typeof e=="string")return L2e(t,e);throw fq("Field path arguments must be of type string or ",t,!1,void 0,n)}function L2e(t,e,n){if(e.search($Rt)>=0)throw fq(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new Vy(...e.split("."))._internalPath}catch{throw fq(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function fq(t,e,n,i,r){let s=i&&!i.isEmpty(),o=r!==void 0,a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(s||o)&&(l+=" (found",s&&(l+=` in field ${i}`),o&&(l+=` in document ${r}`),l+=")"),new Un(dn.INVALID_ARGUMENT,a+t+l)}function fVe(t,e){return t.some(n=>n.isEqual(e))}function Eq(t,e){return typeof e=="string"?L2e(t,e):e instanceof Vy?e._internalPath:e._delegate._internalPath}function gVe(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new Un(dn.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}function nx(t,e,...n){let i=[];e instanceof tB&&i.push(e),i=i.concat(n),function(s){let o=s.filter(l=>l instanceof Q0e).length,a=s.filter(l=>l instanceof gq).length;if(o>1||o>0&&a>0)throw new Un(dn.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(i);for(let r of i)t=r._apply(t);return t}function vVe(t,e,n){let i=e,r=Eq("where",t);return gq._create(r,i,n)}function yVe(t,e="asc"){let n=e,i=Eq("orderBy",t);return J0e._create(i,n)}function _Ve(t){return qNe("limit",t),vq._create("limit",t,"F")}function CVe(t){return qNe("limitToLast",t),vq._create("limitToLast",t,"L")}function xVe(...t){return yq._create("startAt",t,!0)}function bVe(...t){return yq._create("startAfter",t,!1)}function wVe(...t){return _q._create("endBefore",t,!1)}function SVe(...t){return _q._create("endAt",t,!0)}function TVe(t,e,n,i){if(n[0]=Sp(n[0]),n[0]instanceof GT)return function(s,o,a,l,c){if(!l)throw new Un(dn.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${a}().`);let d=[];for(let u of yI(s))if(u.field.isKeyField())d.push(FT(o,l.key));else{let m=l.data.field(u.field);if(xq(m))throw new Un(dn.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+u.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(m===null){let f=u.field.canonicalString();throw new Un(dn.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${f}' (used as the orderBy) does not exist.`)}d.push(m)}return new s5(d,c)}(t._query,t.firestore._databaseId,e,n[0]._document,i);{let r=jT(t.firestore);return function(o,a,l,c,d,u){let m=o.explicitOrderBy;if(d.length>m.length)throw new Un(dn.INVALID_ARGUMENT,`Too many arguments provided to ${c}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);let f=[];for(let _=0;_<d.length;_++){let x=d[_];if(m[_].field.isKeyField()){if(typeof x!="string")throw new Un(dn.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${c}(), but got a ${typeof x}`);if(!a2e(o)&&x.indexOf("/")!==-1)throw new Un(dn.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${c}() must be a plain document ID, but '${x}' contains a slash.`);let D=o.path.child(Fc.fromString(x));if(!hs.isDocumentKey(D))throw new Un(dn.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${c}() must result in a valid document path, but '${D}' is not because it contains an odd number of segments.`);let E=new hs(D);f.push(FT(a,E))}else{let D=hVe(l,c,x);f.push(D)}}return new s5(f,u)}(t._query,t.firestore._databaseId,r,e,n,i)}}function vOe(t,e,n){if(typeof(n=Sp(n))=="string"){if(n==="")throw new Un(dn.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!a2e(e)&&n.indexOf("/")!==-1)throw new Un(dn.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);let i=e.path.child(Fc.fromString(n));if(!hs.isDocumentKey(i))throw new Un(dn.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${i}' is not because it has an odd number of segments (${i.length}).`);return FT(t,new hs(i))}if(n instanceof Ju)return FT(t,n._key);throw new Un(dn.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Tq(n)}.`)}function yOe(t,e){if(!Array.isArray(t)||t.length===0)throw new Un(dn.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function DVe(t,e){let n=function(r,s){for(let o of r)for(let a of o.getFlattenedFilters())if(s.indexOf(a.op)>=0)return a.op;return null}(t.filters,function(r){switch(r){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new Un(dn.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new Un(dn.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}function Mq(t,e,n){let i;return i=t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e,i}function KRt(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Ws()}}function O2e(t,e){return t instanceof zv&&e instanceof zv?t._firestore===e._firestore&&t._key.isEqual(e._key)&&(t._document===null?e._document===null:t._document.isEqual(e._document))&&t._converter===e._converter:t instanceof By&&e instanceof By&&t._firestore===e._firestore&&A2e(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t._snapshot.isEqual(e._snapshot)}function EVe(t){t=Lc(t,Ju);let e=Lc(t.firestore,Jh);return $Ne(r1(e),t._key).then(n=>z2e(e,t,n))}function MVe(t){t=Lc(t,Ju);let e=Lc(t.firestore,Jh),n=r1(e),i=new tx(e);return zRt(n,t._key).then(r=>new zv(e,i,t._key,r,new Z8(r!==null&&r.hasLocalMutations,!0),t.converter))}function kVe(t){t=Lc(t,Ju);let e=Lc(t.firestore,Jh);return $Ne(r1(e),t._key,{source:"server"}).then(n=>z2e(e,t,n))}function IVe(t){t=Lc(t,I0);let e=Lc(t.firestore,Jh),n=r1(e),i=new tx(e);return gVe(t._query),KNe(n,t._query).then(r=>new By(e,i,t,r))}function AVe(t){t=Lc(t,I0);let e=Lc(t.firestore,Jh),n=r1(e),i=new tx(e);return HRt(n,t._query).then(r=>new By(e,i,t,r))}function PVe(t){t=Lc(t,I0);let e=Lc(t.firestore,Jh),n=r1(e),i=new tx(e);return KNe(n,t._query,{source:"server"}).then(r=>new By(e,i,t,r))}function N2e(t,e,n){t=Lc(t,Ju);let i=Lc(t.firestore,Jh),r=Mq(t.converter,e,n);return WI(i,[Dq(jT(i),"setDoc",t._key,r,t.converter!==null,n).toMutation(t._key,em.none())])}function V2e(t,e,n,...i){t=Lc(t,Ju);let r=Lc(t.firestore,Jh),s=jT(r),o;return o=typeof(e=Sp(e))=="string"||e instanceof Vy?R2e(s,"updateDoc",t._key,e,n,i):P2e(s,"updateDoc",t._key,e),WI(r,[o.toMutation(t._key,em.exists(!0))])}function RVe(t){return WI(Lc(t.firestore,Jh),[new h7(t._key,em.none())])}function FVe(t,e){let n=Lc(t.firestore,Jh),i=lB(t),r=Mq(t.converter,e);return WI(n,[Dq(jT(t.firestore),"addDoc",i._key,r,t.converter!==null,{}).toMutation(i._key,em.exists(!1))]).then(()=>i)}function B2e(t,...e){var n,i,r;t=Sp(t);let s={includeMetadataChanges:!1,source:"default"},o=0;typeof e[o]!="object"||G0e(e[o])||(s=e[o],o++);let a={includeMetadataChanges:s.includeMetadataChanges,source:s.source};if(G0e(e[o])){let u=e[o];e[o]=(n=u.next)===null||n===void 0?void 0:n.bind(u),e[o+1]=(i=u.error)===null||i===void 0?void 0:i.bind(u),e[o+2]=(r=u.complete)===null||r===void 0?void 0:r.bind(u)}let l,c,d;if(t instanceof Ju)c=Lc(t.firestore,Jh),d=VI(t._key.path),l={next:u=>{e[o]&&e[o](z2e(c,t,u))},error:e[o+1],complete:e[o+2]};else{let u=Lc(t,I0);c=Lc(u.firestore,Jh),d=u._query;let m=new tx(c);l={next:f=>{e[o]&&e[o](new By(c,m,u,f))},error:e[o+1],complete:e[o+2]},gVe(t._query)}return function(m,f,_,x){let D=new FI(x),E=new XV(f,D,_);return m.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return g2e(yield LI(m),E)})),()=>{D.$a(),m.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return v2e(yield LI(m),E)}))}}(r1(c),d,a,l)}function LVe(t,e){return GRt(r1(t=Lc(t,Jh)),G0e(e)?e:{next:e})}function WI(t,e){return function(i,r){let s=new pf;return i.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){return xRt(yield D2e(i),r,s)})),s.promise}(r1(t),e)}function z2e(t,e,n){let i=n.docs.get(e._key),r=new tx(t);return new zv(t,r,e._key,i,new Z8(n.hasPendingWrites,n.fromCache),e.converter)}function t7(t,e){if((t=Sp(t)).firestore!==e)throw new Un(dn.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}function OVe(t,e,n){t=Lc(t,Jh);let i=Object.assign(Object.assign({},YRt),n);return function(s){if(s.maxAttempts<1)throw new Un(dn.INVALID_ARGUMENT,"Max attempts must be at least 1")}(i),function(s,o,a){let l=new pf;return s.asyncQueue.enqueueAndForget(()=>O(this,null,function*(){let c=yield NRt(s);new V0e(s.asyncQueue,c,a,o,l).Xa()})),l.promise}(r1(t),r=>e(new t2e(t,r)),i)}function NVe(){return new eB("deleteField")}function VVe(){return new $0e("serverTimestamp")}function BVe(...t){return new K0e("arrayUnion",t)}function zVe(...t){return new Y0e("arrayRemove",t)}function HVe(t){return new q0e("increment",t)}var _Le,hf,NI,r7,dn,Un,pf,TY,r1e,s1e,o1e,a1e,l1e,c1e,d1e,DY,kp,Bo,EY,Fc,iPt,bm,hs,xI,vI,FV,Bv,SOe,MY,tn,kY,s7,h1e,PT,p1e,CLe,m1e,f1e,x4,bLe,rPt,sPt,oPt,aPt,lPt,cPt,dPt,uPt,hPt,pPt,mPt,fPt,gPt,vPt,yPt,MOe,_Pt,kOe,IOe,AOe,CPt,OV,Ih,gI,t5,Bu,IY,b4,AY,N1,xPt,g1e,a7,i7,CY,l2,mf,s5,LT,PY,lc,iu,x1e,b1e,w1e,S1e,RY,T1e,D1e,E1e,Oy,o5,EPt,jOe,MPt,kPt,IPt,SI,c7,Q8,J8,d7,NT,I1e,em,TI,u7,Ny,h7,zV,HV,A1e,GV,P1e,df,Rc,VLe,OPt,R1e,AT,WV,UV,_I,NY,VY,BY,F1e,NPt,VPt,BPt,L1e,EI,zY,z1e,GY,q8,H1e,G1e,W1e,kT,IT,WY,K1e,KV,fY,Y1e,eOe,Nv,$Y,MI,q1e,Z1e,X1e,Q1e,J1e,KY,e0e,t0e,i0e,YY,n0e,r0e,YV,uf,s0e,o0e,a0e,l0e,qY,c0e,ZY,d0e,t1e,u0e,h0e,p0e,XY,m0e,JY,PV,eq,f0e,qV,RV,tq,g0e,iq,yY,rRt,v0e,a2,y0e,ZV,nq,_0e,C0e,x0e,b0e,w0e,T0e,sq,oq,PI,D0e,E0e,M0e,dOe,XV,k0e,aq,I0e,lq,cq,dq,A0e,P0e,R0e,QV,uq,L0e,JV,FI,O0e,N0e,V0e,B0e,mOe,hq,zT,I0,Ju,n5,H0e,W0e,QNe,Jh,a5,Vy,ex,HT,jRt,U0e,pq,mq,j0e,eB,$0e,K0e,Y0e,q0e,$Rt,GT,X0e,tB,WT,gq,Q0e,J0e,vq,yq,_q,OI,e2e,Z8,zv,n7,By,tx,YRt,Cq,t2e,H2e=Q(()=>{Dj();Jde();gDe();Qde();vLe();yLe();_Le="@firebase/firestore";hf=class{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}};hf.UNAUTHENTICATED=new hf(null),hf.GOOGLE_CREDENTIALS=new hf("google-credentials-uid"),hf.FIRST_PARTY=new hf("first-party-uid"),hf.MOCK_USER=new hf("mock-user");NI="10.12.3";r7=new Tj("@firebase/firestore");dn={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},Un=class extends mDe{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}};pf=class{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}};TY=class{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}},r1e=class{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(hf.UNAUTHENTICATED))}shutdown(){}},s1e=class{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}},o1e=class{constructor(e){this.t=e,this.currentUser=hf.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){let i=this.i,r=l=>this.i!==i?(i=this.i,n(l)):Promise.resolve(),s=new pf;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new pf,e.enqueueRetryable(()=>r(this.currentUser))};let o=()=>{let l=s;e.enqueueRetryable(()=>O(this,null,function*(){yield l.promise,yield r(this.currentUser)}))},a=l=>{Jn("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.auth.addAuthTokenListener(this.o),o()};this.t.onInit(l=>a(l)),setTimeout(()=>{if(!this.auth){let l=this.t.getImmediate({optional:!0});l?a(l):(Jn("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new pf)}},0),o()}getToken(){let e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(i=>this.i!==e?(Jn("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):i?(To(typeof i.accessToken=="string"),new TY(i.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let e=this.auth&&this.auth.getUid();return To(e===null||typeof e=="string"),new hf(e)}},a1e=class{constructor(e,n,i){this.l=e,this.h=n,this.P=i,this.type="FirstParty",this.user=hf.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);let e=this.T();return e&&this.I.set("Authorization",e),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}},l1e=class{constructor(e,n,i){this.l=e,this.h=n,this.P=i}getToken(){return Promise.resolve(new a1e(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(hf.FIRST_PARTY))}shutdown(){}invalidateToken(){}},c1e=class{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}},d1e=class{constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){let i=s=>{s.error!=null&&Jn("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);let o=s.token!==this.R;return this.R=s.token,Jn("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>i(s))};let r=s=>{Jn("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>r(s)),setTimeout(()=>{if(!this.appCheck){let s=this.A.getImmediate({optional:!0});s?r(s):Jn("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(To(typeof n.token=="string"),this.R=n.token,new c1e(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}};DY=class{static newId(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/e.length)*e.length,i="";for(;i.length<20;){let r=tPt(40);for(let s=0;s<r.length;++s)i.length<20&&r[s]<n&&(i+=e.charAt(r[s]%e.length))}return i}};kp=class t{constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new Un(dn.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new Un(dn.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new Un(dn.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new Un(dn.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return t.fromMillis(Date.now())}static fromDate(e){return t.fromMillis(e.getTime())}static fromMillis(e){let n=Math.floor(e/1e3),i=Math.floor(1e6*(e-1e3*n));return new t(n,i)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?el(this.nanoseconds,e.nanoseconds):el(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){let e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}};Bo=class t{constructor(e){this.timestamp=e}static fromTimestamp(e){return new t(e)}static min(){return new t(new kp(0,0))}static max(){return new t(new kp(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}};EY=class t{constructor(e,n,i){n===void 0?n=0:n>e.length&&Ws(),i===void 0?i=e.length-n:i>e.length-n&&Ws(),this.segments=e,this.offset=n,this.len=i}get length(){return this.len}isEqual(e){return t.comparator(this,e)===0}child(e){let n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach(i=>{n.push(i)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,i=this.limit();n<i;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){let i=Math.min(e.length,n.length);for(let r=0;r<i;r++){let s=e.get(r),o=n.get(r);if(s<o)return-1;if(s>o)return 1}return e.length<n.length?-1:e.length>n.length?1:0}},Fc=class t extends EY{construct(e,n,i){return new t(e,n,i)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){let n=[];for(let i of e){if(i.indexOf("//")>=0)throw new Un(dn.INVALID_ARGUMENT,`Invalid segment (${i}). Paths must not contain // in them.`);n.push(...i.split("/").filter(r=>r.length>0))}return new t(n)}static emptyPath(){return new t([])}},iPt=/^[_a-zA-Z][_a-zA-Z0-9]*$/,bm=class t extends EY{construct(e,n,i){return new t(e,n,i)}static isValidIdentifier(e){return iPt.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),t.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new t(["__name__"])}static fromServerFormat(e){let n=[],i="",r=0,s=()=>{if(i.length===0)throw new Un(dn.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(i),i=""},o=!1;for(;r<e.length;){let a=e[r];if(a==="\\"){if(r+1===e.length)throw new Un(dn.INVALID_ARGUMENT,"Path has trailing escape character: "+e);let l=e[r+1];if(l!=="\\"&&l!=="."&&l!=="`")throw new Un(dn.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);i+=l,r+=2}else a==="`"?(o=!o,r++):a!=="."||o?(i+=a,r++):(s(),r++)}if(s(),o)throw new Un(dn.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new t(n)}static emptyPath(){return new t([])}};hs=class t{constructor(e){this.path=e}static fromPath(e){return new t(Fc.fromString(e))}static fromName(e){return new t(Fc.fromString(e).popFirst(5))}static empty(){return new t(Fc.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&Fc.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return Fc.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new t(new Fc(e.slice()))}};xI=class{constructor(e,n,i,r){this.indexId=e,this.collectionGroup=n,this.fields=i,this.indexState=r}};xI.UNKNOWN_ID=-1;vI=class{constructor(e,n){this.fieldPath=e,this.kind=n}},FV=class t{constructor(e,n){this.sequenceNumber=e,this.offset=n}static empty(){return new t(0,Bv.min())}};Bv=class t{constructor(e,n,i){this.readTime=e,this.documentKey=n,this.largestBatchId=i}static min(){return new t(Bo.min(),hs.empty(),-1)}static max(){return new t(Bo.max(),hs.empty(),-1)}};SOe="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",MY=class{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}};tn=class t{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&Ws(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new t((i,r)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(i,r)},this.catchCallback=s=>{this.wrapFailure(n,s).next(i,r)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{let n=e();return n instanceof t?n:t.resolve(n)}catch(n){return t.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):t.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):t.reject(n)}static resolve(e){return new t((n,i)=>{n(e)})}static reject(e){return new t((n,i)=>{i(e)})}static waitFor(e){return new t((n,i)=>{let r=0,s=0,o=!1;e.forEach(a=>{++r,a.next(()=>{++s,o&&s===r&&n()},l=>i(l))}),o=!0,s===r&&n()})}static or(e){let n=t.resolve(!1);for(let i of e)n=n.next(r=>r?t.resolve(r):i());return n}static forEach(e,n){let i=[];return e.forEach((r,s)=>{i.push(n.call(this,r,s))}),this.waitFor(i)}static mapArray(e,n){return new t((i,r)=>{let s=e.length,o=new Array(s),a=0;for(let l=0;l<s;l++){let c=l;n(e[c]).next(d=>{o[c]=d,++a,a===s&&i(o)},d=>r(d))}})}static doWhile(e,n){return new t((i,r)=>{let s=()=>{e()===!0?n().next(()=>{s()},r):i()};s()})}};kY=class t{constructor(e,n){this.action=e,this.transaction=n,this.aborted=!1,this.V=new pf,this.transaction.oncomplete=()=>{this.V.resolve()},this.transaction.onabort=()=>{n.error?this.V.reject(new PT(e,n.error)):this.V.resolve()},this.transaction.onerror=i=>{let r=r2e(i.target.error);this.V.reject(new PT(e,r))}}static open(e,n,i,r){try{return new t(n,e.transaction(r,i))}catch(s){throw new PT(n,s)}}get m(){return this.V.promise}abort(e){e&&this.V.reject(e),this.aborted||(Jn("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}g(){let e=this.transaction;this.aborted||typeof e.commit!="function"||e.commit()}store(e){let n=this.transaction.objectStore(e);return new p1e(n)}},s7=class t{constructor(e,n,i){this.name=e,this.version=n,this.p=i,t.S(kO())===12.2&&xm("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(e){return Jn("SimpleDb","Removing database:",e),ET(window.indexedDB.deleteDatabase(e)).toPromise()}static D(){if(!Sj())return!1;if(t.C())return!0;let e=kO(),n=t.S(e),i=0<n&&n<10,r=TOe(e),s=0<r&&r<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||i||s)}static C(){var e;return typeof process<"u"&&((e=process.__PRIVATE_env)===null||e===void 0?void 0:e.v)==="YES"}static F(e,n){return e.store(n)}static S(e){let n=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),i=n?n[1].split("_").slice(0,2).join("."):"-1";return Number(i)}M(e){return O(this,null,function*(){return this.db||(Jn("SimpleDb","Opening database:",this.name),this.db=yield new Promise((n,i)=>{let r=indexedDB.open(this.name,this.version);r.onsuccess=s=>{let o=s.target.result;n(o)},r.onblocked=()=>{i(new PT(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},r.onerror=s=>{let o=s.target.error;o.name==="VersionError"?i(new Un(dn.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):o.name==="InvalidStateError"?i(new Un(dn.FAILED_PRECONDITION,"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: "+o)):i(new PT(e,o))},r.onupgradeneeded=s=>{Jn("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',s.oldVersion);let o=s.target.result;this.p.O(o,r.transaction,s.oldVersion,this.version).next(()=>{Jn("SimpleDb","Database upgrade to version "+this.version+" complete")})}})),this.N&&(this.db.onversionchange=n=>this.N(n)),this.db})}L(e){this.N=e,this.db&&(this.db.onversionchange=n=>e(n))}runTransaction(e,n,i,r){return O(this,null,function*(){let s=n==="readonly",o=0;for(;;){++o;try{this.db=yield this.M(e);let a=kY.open(this.db,e,s?"readonly":"readwrite",i),l=r(a).next(c=>(a.g(),c)).catch(c=>(a.abort(c),tn.reject(c))).toPromise();return l.catch(()=>{}),yield a.m,l}catch(a){let l=a,c=l.name!=="FirebaseError"&&o<3;if(Jn("SimpleDb","Transaction failed with error:",l.message,"Retrying:",c),this.close(),!c)return Promise.reject(l)}}})}close(){this.db&&this.db.close(),this.db=void 0}};h1e=class{constructor(e){this.B=e,this.k=!1,this.q=null}get isDone(){return this.k}get K(){return this.q}set cursor(e){this.B=e}done(){this.k=!0}$(e){this.q=e}delete(){return ET(this.B.delete())}},PT=class extends Un{constructor(e,n){super(dn.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${n}`),this.name="IndexedDbTransactionError"}};p1e=class{constructor(e){this.store=e}put(e,n){let i;return n!==void 0?(Jn("SimpleDb","PUT",this.store.name,e,n),i=this.store.put(n,e)):(Jn("SimpleDb","PUT",this.store.name,"<auto-key>",e),i=this.store.put(e)),ET(i)}add(e){return Jn("SimpleDb","ADD",this.store.name,e,e),ET(this.store.add(e))}get(e){return ET(this.store.get(e)).next(n=>(n===void 0&&(n=null),Jn("SimpleDb","GET",this.store.name,e,n),n))}delete(e){return Jn("SimpleDb","DELETE",this.store.name,e),ET(this.store.delete(e))}count(){return Jn("SimpleDb","COUNT",this.store.name),ET(this.store.count())}U(e,n){let i=this.options(e,n),r=i.index?this.store.index(i.index):this.store;if(typeof r.getAll=="function"){let s=r.getAll(i.range);return new tn((o,a)=>{s.onerror=l=>{a(l.target.error)},s.onsuccess=l=>{o(l.target.result)}})}{let s=this.cursor(i),o=[];return this.W(s,(a,l)=>{o.push(l)}).next(()=>o)}}G(e,n){let i=this.store.getAll(e,n===null?void 0:n);return new tn((r,s)=>{i.onerror=o=>{s(o.target.error)},i.onsuccess=o=>{r(o.target.result)}})}j(e,n){Jn("SimpleDb","DELETE ALL",this.store.name);let i=this.options(e,n);i.H=!1;let r=this.cursor(i);return this.W(r,(s,o,a)=>a.delete())}J(e,n){let i;n?i=e:(i={},n=e);let r=this.cursor(i);return this.W(r,n)}Y(e){let n=this.cursor({});return new tn((i,r)=>{n.onerror=s=>{let o=r2e(s.target.error);r(o)},n.onsuccess=s=>{let o=s.target.result;o?e(o.primaryKey,o.value).next(a=>{a?o.continue():i()}):i()}})}W(e,n){let i=[];return new tn((r,s)=>{e.onerror=o=>{s(o.target.error)},e.onsuccess=o=>{let a=o.target.result;if(!a)return void r();let l=new h1e(a),c=n(a.primaryKey,a.value,l);if(c instanceof tn){let d=c.catch(u=>(l.done(),tn.reject(u)));i.push(d)}l.isDone?r():l.K===null?a.continue():a.continue(l.K)}}).next(()=>tn.waitFor(i))}options(e,n){let i;return e!==void 0&&(typeof e=="string"?i=e:n=e),{index:i,range:n}}cursor(e){let n="next";if(e.reverse&&(n="prev"),e.index){let i=this.store.index(e.index);return e.H?i.openKeyCursor(e.range,n):i.openCursor(e.range,n)}return this.store.openCursor(e.range,n)}};CLe=!1;m1e=class{constructor(e,n){this.asyncQueue=e,this.Z=n,this.task=null}start(){this.X(15e3)}stop(){this.task&&(this.task.cancel(),this.task=null)}get started(){return this.task!==null}X(e){Jn("IndexBackfiller",`Scheduled in ${e}ms`),this.task=this.asyncQueue.enqueueAfterDelay("index_backfill",e,()=>O(this,null,function*(){this.task=null;try{Jn("IndexBackfiller",`Documents written: ${yield this.Z.ee()}`)}catch(n){f7(n)?Jn("IndexBackfiller","Ignoring IndexedDB error during index backfill: ",n):yield m7(n)}yield this.X(6e4)}))}},f1e=class{constructor(e,n){this.localStore=e,this.persistence=n}ee(e=50){return O(this,null,function*(){return this.persistence.runTransaction("Backfill Indexes","readwrite-primary",n=>this.te(n,e))})}te(e,n){let i=new Set,r=n,s=!0;return tn.doWhile(()=>s===!0&&r>0,()=>this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next(o=>{if(o!==null&&!i.has(o))return Jn("IndexBackfiller",`Processing collection: ${o}`),this.ne(e,o,r).next(a=>{r-=a,i.add(o)});s=!1})).next(()=>n-r)}ne(e,n,i){return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e,n).next(r=>this.localStore.localDocuments.getNextDocuments(e,n,r,i).next(s=>{let o=s.changes;return this.localStore.indexManager.updateIndexEntries(e,o).next(()=>this.re(r,s)).next(a=>(Jn("IndexBackfiller",`Updating offset: ${a}`),this.localStore.indexManager.updateCollectionGroup(e,n,a))).next(()=>o.size)}))}re(e,n){let i=e;return n.changes.forEach((r,s)=>{let o=wOe(s);n2e(o,i)>0&&(i=o)}),new Bv(i.readTime,i.documentKey,Math.max(n.batchId,e.largestBatchId))}};x4=(()=>{class t{constructor(n,i){this.previousValue=n,i&&(i.sequenceNumberHandler=r=>this.ie(r),this.se=r=>i.writeSequenceNumber(r))}ie(n){return this.previousValue=Math.max(n,this.previousValue),this.previousValue}next(){let n=++this.previousValue;return this.se&&this.se(n),n}}return t.oe=-1,t})();bLe=["userId","batchId"];rPt={},sPt=["prefixPath","collectionGroup","readTime","documentId"],oPt=["prefixPath","collectionGroup","documentId"],aPt=["collectionGroup","readTime","prefixPath","documentId"],lPt=["canonicalId","targetId"],cPt=["targetId","path"],dPt=["path","targetId"],uPt=["collectionId","parent"],hPt=["indexId","uid"],pPt=["uid","sequenceNumber"],mPt=["indexId","uid","arrayValue","directionalValue","orderedDocumentKey","documentKey"],fPt=["indexId","uid","orderedDocumentKey"],gPt=["userId","collectionPath","documentId"],vPt=["userId","collectionPath","largestBatchId"],yPt=["userId","collectionGroup","largestBatchId"],MOe=["mutationQueues","mutations","documentMutations","remoteDocuments","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries"],_Pt=[...MOe,"documentOverlays"],kOe=["mutationQueues","mutations","documentMutations","remoteDocumentsV14","targets","owner","targetGlobal","targetDocuments","clientMetadata","remoteDocumentGlobal","collectionParents","bundles","namedQueries","documentOverlays"],IOe=kOe,AOe=[...IOe,"indexConfiguration","indexState","indexEntries"],CPt=AOe;OV=class extends MY{constructor(e,n){super(),this._e=e,this.currentSequenceNumber=n}};Ih=class t{constructor(e,n){this.comparator=e,this.root=n||t5.EMPTY}insert(e,n){return new t(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,t5.BLACK,null,null))}remove(e){return new t(this.comparator,this.root.remove(e,this.comparator).copy(null,null,t5.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){let i=this.comparator(e,n.key);if(i===0)return n.value;i<0?n=n.left:i>0&&(n=n.right)}return null}indexOf(e){let n=0,i=this.root;for(;!i.isEmpty();){let r=this.comparator(e,i.key);if(r===0)return n+i.left.size;r<0?i=i.left:(n+=i.left.size+1,i=i.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,i)=>(e(n,i),!1))}toString(){let e=[];return this.inorderTraversal((n,i)=>(e.push(`${n}:${i}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new gI(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new gI(this.root,e,this.comparator,!1)}getReverseIterator(){return new gI(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new gI(this.root,e,this.comparator,!0)}},gI=class{constructor(e,n,i,r){this.isReverse=r,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?i(e.key,n):1,n&&r&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop(),n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}},t5=class t{constructor(e,n,i,r,s){this.key=e,this.value=n,this.color=i??t.RED,this.left=r??t.EMPTY,this.right=s??t.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,i,r,s){return new t(e??this.key,n??this.value,i??this.color,r??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,i){let r=this,s=i(e,r.key);return r=s<0?r.copy(null,null,null,r.left.insert(e,n,i),null):s===0?r.copy(null,n,null,null,null):r.copy(null,null,null,null,r.right.insert(e,n,i)),r.fixUp()}removeMin(){if(this.left.isEmpty())return t.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let i,r=this;if(n(e,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,n),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),n(e,r.key)===0){if(r.right.isEmpty())return t.EMPTY;i=r.right.min(),r=r.copy(i.key,i.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,n))}return r.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){let e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){let e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw Ws();let e=this.left.check();if(e!==this.right.check())throw Ws();return e+(this.isRed()?0:1)}};t5.EMPTY=null,t5.RED=!0,t5.BLACK=!1;t5.EMPTY=new class{constructor(){this.size=0}get key(){throw Ws()}get value(){throw Ws()}get color(){throw Ws()}get left(){throw Ws()}get right(){throw Ws()}copy(e,n,i,r,s){return this}insert(e,n,i){return new t5(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};Bu=class t{constructor(e){this.comparator=e,this.data=new Ih(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,i)=>(e(n),!1))}forEachInRange(e,n){let i=this.data.getIteratorFrom(e[0]);for(;i.hasNext();){let r=i.getNext();if(this.comparator(r.key,e[1])>=0)return;n(r.key)}}forEachWhile(e,n){let i;for(i=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();i.hasNext();)if(!e(i.getNext().key))return}firstAfterOrEqual(e){let n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new IY(this.data.getIterator())}getIteratorFrom(e){return new IY(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size<e.size&&(n=e,e=this),e.forEach(i=>{n=n.add(i)}),n}isEqual(e){if(!(e instanceof t)||this.size!==e.size)return!1;let n=this.data.getIterator(),i=e.data.getIterator();for(;n.hasNext();){let r=n.getNext().key,s=i.getNext().key;if(this.comparator(r,s)!==0)return!1}return!0}toArray(){let e=[];return this.forEach(n=>{e.push(n)}),e}toString(){let e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){let n=new t(this.comparator);return n.data=e,n}},IY=class{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}};b4=class t{constructor(e){this.fields=e,e.sort(bm.comparator)}static empty(){return new t([])}unionWith(e){let n=new Bu(bm.comparator);for(let i of this.fields)n=n.add(i);for(let i of e)n=n.add(i);return new t(n.toArray())}covers(e){for(let n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return CI(this.fields,e.fields,(n,i)=>n.isEqual(i))}};AY=class extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}};N1=class t{constructor(e){this.binaryString=e}static fromBase64String(e){let n=function(r){try{return atob(r)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new AY("Invalid base64 string: "+s):s}}(e);return new t(n)}static fromUint8Array(e){let n=function(r){let s="";for(let o=0;o<r.length;++o)s+=String.fromCharCode(r[o]);return s}(e);return new t(n)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(n){return btoa(n)}(this.binaryString)}toUint8Array(){return function(n){let i=new Uint8Array(n.length);for(let r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return el(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}};N1.EMPTY_BYTE_STRING=new N1("");xPt=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);g1e=class{constructor(e,n,i,r,s,o,a,l,c){this.databaseId=e,this.appId=n,this.persistenceKey=i,this.host=r,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=a,this.longPollingOptions=l,this.useFetchStreams=c}},a7=class t{constructor(e,n){this.projectId=e,this.database=n||"(default)"}static empty(){return new t("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database}};i7={mapValue:{fields:{__type__:{stringValue:"__max__"}}}},CY={nullValue:"NULL_VALUE"};l2=class t{constructor(e){this.value=e}static empty(){return new t({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let i=0;i<e.length-1;++i)if(n=(n.mapValue.fields||{})[e.get(i)],!xY(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=kV(n)}setAll(e){let n=bm.emptyPath(),i={},r=[];e.forEach((o,a)=>{if(!n.isImmediateParentOf(a)){let l=this.getFieldsMap(n);this.applyChanges(l,i,r),i={},r=[],n=a.popLast()}o?i[a.lastSegment()]=kV(o):r.push(a.lastSegment())});let s=this.getFieldsMap(n);this.applyChanges(s,i,r)}delete(e){let n=this.field(e.popLast());xY(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return r5(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let i=0;i<e.length;++i){let r=n.mapValue.fields[e.get(i)];xY(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},n.mapValue.fields[e.get(i)]=r),n=r}return n.mapValue.fields}applyChanges(e,n,i){UT(n,(r,s)=>e[r]=s);for(let r of i)delete e[r]}clone(){return new t(kV(this.value))}};mf=class t{constructor(e,n,i,r,s,o,a){this.key=e,this.documentType=n,this.version=i,this.readTime=r,this.createTime=s,this.data=o,this.documentState=a}static newInvalidDocument(e){return new t(e,0,Bo.min(),Bo.min(),Bo.min(),l2.empty(),0)}static newFoundDocument(e,n,i,r){return new t(e,1,n,Bo.min(),i,r,0)}static newNoDocument(e,n){return new t(e,2,n,Bo.min(),Bo.min(),l2.empty(),0)}static newUnknownDocument(e,n){return new t(e,3,n,Bo.min(),Bo.min(),l2.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(Bo.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=l2.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=l2.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Bo.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof t&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new t(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}};s5=class{constructor(e,n){this.position=e,this.inclusive=n}};LT=class{constructor(e,n="asc"){this.field=e,this.dir=n}};PY=class{},lc=class t extends PY{constructor(e,n,i){super(),this.field=e,this.op=n,this.value=i}static create(e,n,i){return e.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(e,n,i):new x1e(e,n,i):n==="array-contains"?new S1e(e,i):n==="in"?new RY(e,i):n==="not-in"?new T1e(e,i):n==="array-contains-any"?new D1e(e,i):new t(e,n,i)}static createKeyFieldInFilter(e,n,i){return n==="in"?new b1e(e,i):new w1e(e,i)}matches(e){let n=e.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(l7(n,this.value)):n!==null&&RT(this.value)===RT(n)&&this.matchesComparison(l7(n,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return Ws()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}},iu=class t extends PY{constructor(e,n){super(),this.filters=e,this.op=n,this.ae=null}static create(e,n){return new t(e,n)}matches(e){return wI(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ae!==null||(this.ae=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}};x1e=class extends lc{constructor(e,n,i){super(e,n,i),this.key=hs.fromName(i.referenceValue)}matches(e){let n=hs.comparator(e.key,this.key);return this.matchesComparison(n)}},b1e=class extends lc{constructor(e,n){super(e,"in",n),this.keys=zOe("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}},w1e=class extends lc{constructor(e,n){super(e,"not-in",n),this.keys=zOe("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}};S1e=class extends lc{constructor(e,n){super(e,"array-contains",n)}matches(e){let n=e.data.field(this.field);return BV(n)&&VV(n.arrayValue,this.value)}},RY=class extends lc{constructor(e,n){super(e,"in",n)}matches(e){let n=e.data.field(this.field);return n!==null&&VV(this.value.arrayValue,n)}},T1e=class extends lc{constructor(e,n){super(e,"not-in",n)}matches(e){if(VV(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let n=e.data.field(this.field);return n!==null&&!VV(this.value.arrayValue,n)}},D1e=class extends lc{constructor(e,n){super(e,"array-contains-any",n)}matches(e){let n=e.data.field(this.field);return!(!BV(n)||!n.arrayValue.values)&&n.arrayValue.values.some(i=>VV(this.value.arrayValue,i))}};E1e=class{constructor(e,n=null,i=[],r=[],s=null,o=null,a=null){this.path=e,this.collectionGroup=n,this.orderBy=i,this.filters=r,this.limit=s,this.startAt=o,this.endAt=a,this.ue=null}};Oy=class{constructor(e,n=null,i=[],r=[],s=null,o="F",a=null,l=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=i,this.filters=r,this.limit=s,this.limitType=o,this.startAt=a,this.endAt=l,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}};o5=class{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){let n=this.mapKeyFn(e),i=this.inner[n];if(i!==void 0){for(let[r,s]of i)if(this.equalsFn(r,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){let i=this.mapKeyFn(e),r=this.inner[i];if(r===void 0)return this.inner[i]=[[e,n]],void this.innerSize++;for(let s=0;s<r.length;s++)if(this.equalsFn(r[s][0],e))return void(r[s]=[e,n]);r.push([e,n]),this.innerSize++}delete(e){let n=this.mapKeyFn(e),i=this.inner[n];if(i===void 0)return!1;for(let r=0;r<i.length;r++)if(this.equalsFn(i[r][0],e))return i.length===1?delete this.inner[n]:i.splice(r,1),this.innerSize--,!0;return!1}forEach(e){UT(this.inner,(n,i)=>{for(let[r,s]of i)e(r,s)})}isEmpty(){return POe(this.inner)}size(){return this.innerSize}};EPt=new Ih(hs.comparator);jOe=new Ih(hs.comparator);MPt=new Ih(hs.comparator),kPt=new Bu(hs.comparator);IPt=new Bu(el);SI=class{constructor(){this._=void 0}};c7=class extends SI{},Q8=class extends SI{constructor(e){super(),this.elements=e}};J8=class extends SI{constructor(e){super(),this.elements=e}};d7=class extends SI{constructor(e,n){super(),this.serializer=e,this.Pe=n}};NT=class{constructor(e,n){this.field=e,this.transform=n}};I1e=class{constructor(e,n){this.version=e,this.transformResults=n}},em=class t{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new t}static exists(e){return new t(void 0,e)}static updateTime(e){return new t(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}};TI=class{};u7=class extends TI{constructor(e,n,i,r=[]){super(),this.key=e,this.value=n,this.precondition=i,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}},Ny=class extends TI{constructor(e,n,i,r,s=[]){super(),this.key=e,this.data=n,this.fieldMask=i,this.precondition=r,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}};h7=class extends TI{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}},zV=class extends TI{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}};HV=class{constructor(e,n,i,r){this.batchId=e,this.localWriteTime=n,this.baseMutations=i,this.mutations=r}applyToRemoteDocument(e,n){let i=n.mutationResults;for(let r=0;r<this.mutations.length;r++){let s=this.mutations[r];s.key.isEqual(e.key)&&FPt(s,e,i[r])}}applyToLocalView(e,n){for(let i of this.baseMutations)i.key.isEqual(e.key)&&(n=AV(i,e,n,this.localWriteTime));for(let i of this.mutations)i.key.isEqual(e.key)&&(n=AV(i,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){let i=KOe();return this.mutations.forEach(r=>{let s=e.get(r.key),o=s.overlayedDocument,a=this.applyToLocalView(o,s.mutatedFields);a=n.has(r.key)?null:a;let l=tNe(o,a);l!==null&&i.set(r.key,l),o.isValidDocument()||o.convertToNoDocument(Bo.min())}),i}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),ul())}isEqual(e){return this.batchId===e.batchId&&CI(this.mutations,e.mutations,(n,i)=>LLe(n,i))&&CI(this.baseMutations,e.baseMutations,(n,i)=>LLe(n,i))}},A1e=class t{constructor(e,n,i,r){this.batch=e,this.commitVersion=n,this.mutationResults=i,this.docVersions=r}static from(e,n,i){To(e.mutations.length===i.length);let r=function(){return MPt}(),s=e.mutations;for(let o=0;o<s.length;o++)r=r.insert(s[o].key,i[o].version);return new t(e,n,i,r)}};GV=class{constructor(e,n){this.largestBatchId=e,this.mutation=n}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{
      largestBatchId: ${this.largestBatchId},
      mutation: ${this.mutation.toString()}
    }`}};P1e=class{constructor(e,n){this.count=e,this.unchangedNames=n}};(Rc=df||(df={}))[Rc.OK=0]="OK",Rc[Rc.CANCELLED=1]="CANCELLED",Rc[Rc.UNKNOWN=2]="UNKNOWN",Rc[Rc.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Rc[Rc.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Rc[Rc.NOT_FOUND=5]="NOT_FOUND",Rc[Rc.ALREADY_EXISTS=6]="ALREADY_EXISTS",Rc[Rc.PERMISSION_DENIED=7]="PERMISSION_DENIED",Rc[Rc.UNAUTHENTICATED=16]="UNAUTHENTICATED",Rc[Rc.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Rc[Rc.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Rc[Rc.ABORTED=10]="ABORTED",Rc[Rc.OUT_OF_RANGE=11]="OUT_OF_RANGE",Rc[Rc.UNIMPLEMENTED=12]="UNIMPLEMENTED",Rc[Rc.INTERNAL=13]="INTERNAL",Rc[Rc.UNAVAILABLE=14]="UNAVAILABLE",Rc[Rc.DATA_LOSS=15]="DATA_LOSS";VLe=null;OPt=new Xb([4294967295,4294967295],0);R1e=class t{constructor(e,n,i){if(this.bitmap=e,this.padding=n,this.hashCount=i,n<0||n>=8)throw new AT(`Invalid padding: ${n}`);if(i<0)throw new AT(`Invalid hash count: ${i}`);if(e.length>0&&this.hashCount===0)throw new AT(`Invalid hash count: ${i}`);if(e.length===0&&n!==0)throw new AT(`Invalid padding when bitmap length is 0: ${n}`);this.Ie=8*e.length-n,this.Te=Xb.fromNumber(this.Ie)}Ee(e,n,i){let r=e.add(n.multiply(Xb.fromNumber(i)));return r.compare(OPt)===1&&(r=new Xb([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Te).toNumber()}de(e){return(this.bitmap[Math.floor(e/8)]&1<<e%8)!=0}mightContain(e){if(this.Ie===0)return!1;let n=BLe(e),[i,r]=zLe(n);for(let s=0;s<this.hashCount;s++){let o=this.Ee(i,r,s);if(!this.de(o))return!1}return!0}static create(e,n,i){let r=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),o=new t(s,r,n);return i.forEach(a=>o.insert(a)),o}insert(e){if(this.Ie===0)return;let n=BLe(e),[i,r]=zLe(n);for(let s=0;s<this.hashCount;s++){let o=this.Ee(i,r,s);this.Ae(o)}}Ae(e){let n=Math.floor(e/8),i=e%8;this.bitmap[n]|=1<<i}},AT=class extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}};WV=class t{constructor(e,n,i,r,s){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=i,this.documentUpdates=r,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,n,i){let r=new Map;return r.set(e,UV.createSynthesizedTargetChangeForCurrentChange(e,n,i)),new t(Bo.min(),r,new Ih(el),n3(),ul())}},UV=class t{constructor(e,n,i,r,s){this.resumeToken=e,this.current=n,this.addedDocuments=i,this.modifiedDocuments=r,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,n,i){return new t(i,n,ul(),ul(),ul())}};_I=class{constructor(e,n,i,r){this.Re=e,this.removedTargetIds=n,this.key=i,this.Ve=r}},NY=class{constructor(e,n){this.targetId=e,this.me=n}},VY=class{constructor(e,n,i=N1.EMPTY_BYTE_STRING,r=null){this.state=e,this.targetIds=n,this.resumeToken=i,this.cause=r}},BY=class{constructor(){this.fe=0,this.ge=GLe(),this.pe=N1.EMPTY_BYTE_STRING,this.ye=!1,this.we=!0}get current(){return this.ye}get resumeToken(){return this.pe}get Se(){return this.fe!==0}get be(){return this.we}De(e){e.approximateByteSize()>0&&(this.we=!0,this.pe=e)}Ce(){let e=ul(),n=ul(),i=ul();return this.ge.forEach((r,s)=>{switch(s){case 0:e=e.add(r);break;case 2:n=n.add(r);break;case 1:i=i.add(r);break;default:Ws()}}),new UV(this.pe,this.ye,e,n,i)}ve(){this.we=!1,this.ge=GLe()}Fe(e,n){this.we=!0,this.ge=this.ge.insert(e,n)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,To(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}},F1e=class{constructor(e){this.Le=e,this.Be=new Map,this.ke=n3(),this.qe=HLe(),this.Qe=new Ih(el)}Ke(e){for(let n of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.$e(n,e.Ve):this.Ue(n,e.key,e.Ve);for(let n of e.removedTargetIds)this.Ue(n,e.key,e.Ve)}We(e){this.forEachTarget(e,n=>{let i=this.Ge(n);switch(e.state){case 0:this.ze(n)&&i.De(e.resumeToken);break;case 1:i.Oe(),i.Se||i.ve(),i.De(e.resumeToken);break;case 2:i.Oe(),i.Se||this.removeTarget(n);break;case 3:this.ze(n)&&(i.Ne(),i.De(e.resumeToken));break;case 4:this.ze(n)&&(this.je(n),i.De(e.resumeToken));break;default:Ws()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Be.forEach((i,r)=>{this.ze(r)&&n(r)})}He(e){let n=e.targetId,i=e.me.count,r=this.Je(n);if(r){let s=r.target;if(FY(s))if(i===0){let o=new hs(s.path);this.Ue(n,o,mf.newNoDocument(o,Bo.min()))}else To(i===1);else{let o=this.Ye(n);if(o!==i){let a=this.Ze(e),l=a?this.Xe(a,e,o):1;if(l!==0){this.je(n);let c=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Qe=this.Qe.insert(n,c)}VLe?.et(function(d,u,m,f,_){var x,D,E,M,I,z;let G={localCacheCount:d,existenceFilterCount:u.count,databaseId:m.database,projectId:m.projectId},A=u.unchangedNames;return A&&(G.bloomFilter={applied:_===0,hashCount:(x=A?.hashCount)!==null&&x!==void 0?x:0,bitmapLength:(M=(E=(D=A?.bits)===null||D===void 0?void 0:D.bitmap)===null||E===void 0?void 0:E.length)!==null&&M!==void 0?M:0,padding:(z=(I=A?.bits)===null||I===void 0?void 0:I.padding)!==null&&z!==void 0?z:0,mightContain:Y=>{var X;return(X=f?.mightContain(Y))!==null&&X!==void 0&&X}}),G}(o,e.me,this.Le.tt(),a,l))}}}}Ze(e){let n=e.me.unchangedNames;if(!n||!n.bits)return null;let{bits:{bitmap:i="",padding:r=0},hashCount:s=0}=n,o,a;try{o=o7(i).toUint8Array()}catch(l){if(l instanceof AY)return Vv("Decoding the base64 bloom filter in existence filter failed ("+l.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw l}try{a=new R1e(o,r,s)}catch(l){return Vv(l instanceof AT?"BloomFilter error: ":"Applying bloom filter failed: ",l),null}return a.Ie===0?null:a}Xe(e,n,i){return n.me.count===i-this.nt(e,n.targetId)?0:2}nt(e,n){let i=this.Le.getRemoteKeysForTarget(n),r=0;return i.forEach(s=>{let o=this.Le.tt(),a=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(a)||(this.Ue(n,s,null),r++)}),r}rt(e){let n=new Map;this.Be.forEach((s,o)=>{let a=this.Je(o);if(a){if(s.current&&FY(a.target)){let l=new hs(a.target.path);this.ke.get(l)!==null||this.it(o,l)||this.Ue(o,l,mf.newNoDocument(l,e))}s.be&&(n.set(o,s.Ce()),s.ve())}});let i=ul();this.qe.forEach((s,o)=>{let a=!0;o.forEachWhile(l=>{let c=this.Je(l);return!c||c.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(i=i.add(s))}),this.ke.forEach((s,o)=>o.setReadTime(e));let r=new WV(e,n,this.Qe,this.ke,i);return this.ke=n3(),this.qe=HLe(),this.Qe=new Ih(el),r}$e(e,n){if(!this.ze(e))return;let i=this.it(e,n.key)?2:0;this.Ge(e).Fe(n.key,i),this.ke=this.ke.insert(n.key,n),this.qe=this.qe.insert(n.key,this.st(n.key).add(e))}Ue(e,n,i){if(!this.ze(e))return;let r=this.Ge(e);this.it(e,n)?r.Fe(n,1):r.Me(n),this.qe=this.qe.insert(n,this.st(n).delete(e)),i&&(this.ke=this.ke.insert(n,i))}removeTarget(e){this.Be.delete(e)}Ye(e){let n=this.Ge(e).Ce();return this.Le.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}xe(e){this.Ge(e).xe()}Ge(e){let n=this.Be.get(e);return n||(n=new BY,this.Be.set(e,n)),n}st(e){let n=this.qe.get(e);return n||(n=new Bu(el),this.qe=this.qe.insert(e,n)),n}ze(e){let n=this.Je(e)!==null;return n||Jn("WatchChangeAggregator","Detected inactive target",e),n}Je(e){let n=this.Be.get(e);return n&&n.Se?null:this.Le.ot(e)}je(e){this.Be.set(e,new BY),this.Le.getRemoteKeysForTarget(e).forEach(n=>{this.Ue(e,n,null)})}it(e,n){return this.Le.getRemoteKeysForTarget(e).has(n)}};NPt={asc:"ASCENDING",desc:"DESCENDING"},VPt={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},BPt={and:"AND",or:"OR"},L1e=class{constructor(e,n){this.databaseId=e,this.useProto3Json=n}};EI=class t{constructor(e,n,i,r,s=Bo.min(),o=Bo.min(),a=N1.EMPTY_BYTE_STRING,l=null){this.target=e,this.targetId=n,this.purpose=i,this.sequenceNumber=r,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a,this.expectedCount=l}withSequenceNumber(e){return new t(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new t(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new t(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new t(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}};zY=class{constructor(e){this.ct=e}};z1e=class{getBundleMetadata(e,n){return KLe(e).get(n).next(i=>{if(i)return function(s){return{id:s.bundleId,createTime:BT(s.createTime),version:s.version}}(i)})}saveBundleMetadata(e,n){return KLe(e).put(function(r){return{bundleId:r.id,createTime:VT(wm(r.createTime)),version:r.version}}(n))}getNamedQuery(e,n){return YLe(e).get(n).next(i=>{if(i)return function(s){return{name:s.name,query:d2e(s.bundledQuery),readTime:BT(s.readTime)}}(i)})}saveNamedQuery(e,n){return YLe(e).put(function(r){return{name:r.name,readTime:VT(wm(r.readTime)),bundledQuery:r.bundledQuery}}(n))}};GY=class t{constructor(e,n){this.serializer=e,this.userId=n}static lt(e,n){let i=n.uid||"";return new t(e,i)}getOverlay(e,n){return wV(e).get(jLe(this.userId,n)).next(i=>i?e1e(this.serializer,i):null)}getOverlays(e,n){let i=e5();return tn.forEach(n,r=>this.getOverlay(e,r).next(s=>{s!==null&&i.set(r,s)})).next(()=>i)}saveOverlays(e,n,i){let r=[];return i.forEach((s,o)=>{let a=new GV(n,o);r.push(this.ht(e,a))}),tn.waitFor(r)}removeOverlaysForBatchId(e,n,i){let r=new Set;n.forEach(o=>r.add(lg(o.getCollectionPath())));let s=[];return r.forEach(o=>{let a=IDBKeyRange.bound([this.userId,o,i],[this.userId,o,i+1],!1,!0);s.push(wV(e).j("collectionPathOverlayIndex",a))}),tn.waitFor(s)}getOverlaysForCollection(e,n,i){let r=e5(),s=lg(n),o=IDBKeyRange.bound([this.userId,s,i],[this.userId,s,Number.POSITIVE_INFINITY],!0);return wV(e).U("collectionPathOverlayIndex",o).next(a=>{for(let l of a){let c=e1e(this.serializer,l);r.set(c.getKey(),c)}return r})}getOverlaysForCollectionGroup(e,n,i,r){let s=e5(),o,a=IDBKeyRange.bound([this.userId,n,i],[this.userId,n,Number.POSITIVE_INFINITY],!0);return wV(e).J({index:"collectionGroupOverlayIndex",range:a},(l,c,d)=>{let u=e1e(this.serializer,c);s.size()<r||u.largestBatchId===o?(s.set(u.getKey(),u),o=u.largestBatchId):d.done()}).next(()=>s)}ht(e,n){return wV(e).put(function(r,s,o){let[a,l,c]=jLe(s,o.mutation.key);return{userId:s,collectionPath:l,documentId:c,collectionGroup:o.mutation.key.getCollectionGroup(),largestBatchId:o.largestBatchId,overlayMutation:$V(r.ct,o.mutation)}}(this.serializer,this.userId,n))}};q8=class{constructor(){}Pt(e,n){this.It(e,n),n.Tt()}It(e,n){if("nullValue"in e)this.Et(n,5);else if("booleanValue"in e)this.Et(n,10),n.dt(e.booleanValue?1:0);else if("integerValue"in e)this.Et(n,15),n.dt(Jp(e.integerValue));else if("doubleValue"in e){let i=Jp(e.doubleValue);isNaN(i)?this.Et(n,13):(this.Et(n,15),LV(i)?n.dt(0):n.dt(i))}else if("timestampValue"in e){let i=e.timestampValue;this.Et(n,20),typeof i=="string"&&(i=X8(i)),n.At(`${i.seconds||""}`),n.dt(i.nanos||0)}else if("stringValue"in e)this.Rt(e.stringValue,n),this.Vt(n);else if("bytesValue"in e)this.Et(n,30),n.ft(o7(e.bytesValue)),this.Vt(n);else if("referenceValue"in e)this.gt(e.referenceValue,n);else if("geoPointValue"in e){let i=e.geoPointValue;this.Et(n,45),n.dt(i.latitude||0),n.dt(i.longitude||0)}else"mapValue"in e?FOe(e)?this.Et(n,Number.MAX_SAFE_INTEGER):(this.yt(e.mapValue,n),this.Vt(n)):"arrayValue"in e?(this.wt(e.arrayValue,n),this.Vt(n)):Ws()}Rt(e,n){this.Et(n,25),this.St(e,n)}St(e,n){n.At(e)}yt(e,n){let i=e.fields||{};this.Et(n,55);for(let r of Object.keys(i))this.Rt(r,n),this.It(i[r],n)}wt(e,n){let i=e.values||[];this.Et(n,50);for(let r of i)this.It(r,n)}gt(e,n){this.Et(n,37),hs.fromName(e).path.forEach(i=>{this.Et(n,60),this.St(i,n)})}Et(e,n){e.dt(n)}Vt(e){e.dt(2)}};q8.bt=new q8;H1e=class{constructor(){this.buffer=new Uint8Array(1024),this.position=0}Dt(e){let n=e[Symbol.iterator](),i=n.next();for(;!i.done;)this.Ct(i.value),i=n.next();this.vt()}Ft(e){let n=e[Symbol.iterator](),i=n.next();for(;!i.done;)this.Mt(i.value),i=n.next();this.xt()}Ot(e){for(let n of e){let i=n.charCodeAt(0);if(i<128)this.Ct(i);else if(i<2048)this.Ct(960|i>>>6),this.Ct(128|63&i);else if(n<"\uD800"||"\uDBFF"<n)this.Ct(480|i>>>12),this.Ct(128|63&i>>>6),this.Ct(128|63&i);else{let r=n.codePointAt(0);this.Ct(240|r>>>18),this.Ct(128|63&r>>>12),this.Ct(128|63&r>>>6),this.Ct(128|63&r)}}this.vt()}Nt(e){for(let n of e){let i=n.charCodeAt(0);if(i<128)this.Mt(i);else if(i<2048)this.Mt(960|i>>>6),this.Mt(128|63&i);else if(n<"\uD800"||"\uDBFF"<n)this.Mt(480|i>>>12),this.Mt(128|63&i>>>6),this.Mt(128|63&i);else{let r=n.codePointAt(0);this.Mt(240|r>>>18),this.Mt(128|63&r>>>12),this.Mt(128|63&r>>>6),this.Mt(128|63&r)}}this.xt()}Lt(e){let n=this.Bt(e),i=qLe(n);this.kt(1+i),this.buffer[this.position++]=255&i;for(let r=n.length-i;r<n.length;++r)this.buffer[this.position++]=255&n[r]}qt(e){let n=this.Bt(e),i=qLe(n);this.kt(1+i),this.buffer[this.position++]=~(255&i);for(let r=n.length-i;r<n.length;++r)this.buffer[this.position++]=~(255&n[r])}Qt(){this.Kt(255),this.Kt(255)}$t(){this.Ut(255),this.Ut(255)}reset(){this.position=0}seed(e){this.kt(e.length),this.buffer.set(e,this.position),this.position+=e.length}Wt(){return this.buffer.slice(0,this.position)}Bt(e){let n=function(s){let o=new DataView(new ArrayBuffer(8));return o.setFloat64(0,s,!1),new Uint8Array(o.buffer)}(e),i=(128&n[0])!=0;n[0]^=i?255:128;for(let r=1;r<n.length;++r)n[r]^=i?255:0;return n}Ct(e){let n=255&e;n===0?(this.Kt(0),this.Kt(255)):n===255?(this.Kt(255),this.Kt(0)):this.Kt(n)}Mt(e){let n=255&e;n===0?(this.Ut(0),this.Ut(255)):n===255?(this.Ut(255),this.Ut(0)):this.Ut(e)}vt(){this.Kt(0),this.Kt(1)}xt(){this.Ut(0),this.Ut(1)}Kt(e){this.kt(1),this.buffer[this.position++]=e}Ut(e){this.kt(1),this.buffer[this.position++]=~e}kt(e){let n=e+this.position;if(n<=this.buffer.length)return;let i=2*this.buffer.length;i<n&&(i=n);let r=new Uint8Array(i);r.set(this.buffer),this.buffer=r}},G1e=class{constructor(e){this.Gt=e}ft(e){this.Gt.Dt(e)}At(e){this.Gt.Ot(e)}dt(e){this.Gt.Lt(e)}Tt(){this.Gt.Qt()}},W1e=class{constructor(e){this.Gt=e}ft(e){this.Gt.Ft(e)}At(e){this.Gt.Nt(e)}dt(e){this.Gt.qt(e)}Tt(){this.Gt.$t()}},kT=class{constructor(){this.Gt=new H1e,this.zt=new G1e(this.Gt),this.jt=new W1e(this.Gt)}seed(e){this.Gt.seed(e)}Ht(e){return e===0?this.zt:this.jt}Wt(){return this.Gt.Wt()}reset(){this.Gt.reset()}};IT=class t{constructor(e,n,i,r){this.indexId=e,this.documentKey=n,this.arrayValue=i,this.directionalValue=r}Jt(){let e=this.directionalValue.length,n=e===0||this.directionalValue[e-1]===255?e+1:e,i=new Uint8Array(n);return i.set(this.directionalValue,0),n!==e?i.set([0],this.directionalValue.length):++i[i.length-1],new t(this.indexId,this.documentKey,this.arrayValue,i)}};WY=class{constructor(e){this.Yt=new Bu((n,i)=>bm.comparator(n.field,i.field)),this.collectionId=e.collectionGroup!=null?e.collectionGroup:e.path.lastSegment(),this.Zt=e.orderBy,this.Xt=[];for(let n of e.filters){let i=n;i.isInequality()?this.Yt=this.Yt.add(i):this.Xt.push(i)}}get en(){return this.Yt.size>1}tn(e){if(To(e.collectionGroup===this.collectionId),this.en)return!1;let n=u1e(e);if(n!==void 0&&!this.nn(n))return!1;let i=DT(e),r=new Set,s=0,o=0;for(;s<i.length&&this.nn(i[s]);++s)r=r.add(i[s].fieldPath.canonicalString());if(s===i.length)return!0;if(this.Yt.size>0){let a=this.Yt.getIterator().getNext();if(!r.has(a.field.canonicalString())){let l=i[s];if(!this.rn(a,l)||!this.sn(this.Zt[o++],l))return!1}++s}for(;s<i.length;++s){let a=i[s];if(o>=this.Zt.length||!this.sn(this.Zt[o++],a))return!1}return!0}on(){if(this.en)return null;let e=new Bu(bm.comparator),n=[];for(let i of this.Xt)if(!i.field.isKeyField())if(i.op==="array-contains"||i.op==="array-contains-any")n.push(new vI(i.field,2));else{if(e.has(i.field))continue;e=e.add(i.field),n.push(new vI(i.field,0))}for(let i of this.Zt)i.field.isKeyField()||e.has(i.field)||(e=e.add(i.field),n.push(new vI(i.field,i.dir==="asc"?0:1)));return new xI(xI.UNKNOWN_ID,this.collectionId,n,FV.empty())}nn(e){for(let n of this.Xt)if(this.rn(n,e))return!0;return!1}rn(e,n){if(e===void 0||!e.field.isEqual(n.fieldPath))return!1;let i=e.op==="array-contains"||e.op==="array-contains-any";return n.kind===2===i}sn(e,n){return!!e.field.isEqual(n.fieldPath)&&(n.kind===0&&e.dir==="asc"||n.kind===1&&e.dir==="desc")}};K1e=class{constructor(){this._n=new KV}addToCollectionParentIndex(e,n){return this._n.add(n),tn.resolve()}getCollectionParents(e,n){return tn.resolve(this._n.getEntries(n))}addFieldIndex(e,n){return tn.resolve()}deleteFieldIndex(e,n){return tn.resolve()}deleteAllFieldIndexes(e){return tn.resolve()}createTargetIndexes(e,n){return tn.resolve()}getDocumentsMatchingTarget(e,n){return tn.resolve(null)}getIndexType(e,n){return tn.resolve(0)}getFieldIndexes(e,n){return tn.resolve([])}getNextCollectionGroupToUpdate(e){return tn.resolve(null)}getMinOffset(e,n){return tn.resolve(Bv.min())}getMinOffsetFromCollectionGroup(e,n){return tn.resolve(Bv.min())}updateCollectionGroup(e,n,i){return tn.resolve()}updateIndexEntries(e,n){return tn.resolve()}},KV=class{constructor(){this.index={}}add(e){let n=e.lastSegment(),i=e.popLast(),r=this.index[n]||new Bu(Fc.comparator),s=!r.has(i);return this.index[n]=r.add(i),s}has(e){let n=e.lastSegment(),i=e.popLast(),r=this.index[n];return r&&r.has(i)}getEntries(e){return(this.index[e]||new Bu(Fc.comparator)).toArray()}};fY=new Uint8Array(0),Y1e=class{constructor(e,n){this.databaseId=n,this.an=new KV,this.un=new o5(i=>OT(i),(i,r)=>nB(i,r)),this.uid=e.uid||""}addToCollectionParentIndex(e,n){if(!this.an.has(n)){let i=n.lastSegment(),r=n.popLast();e.addOnCommittedListener(()=>{this.an.add(n)});let s={collectionId:i,parent:lg(r)};return QLe(e).put(s)}return tn.resolve()}getCollectionParents(e,n){let i=[],r=IDBKeyRange.bound([n,""],[xOe(n),""],!1,!0);return QLe(e).U(r).next(s=>{for(let o of s){if(o.collectionId!==n)break;i.push(J_(o.parent))}return i})}addFieldIndex(e,n){let i=SV(e),r=function(a){return{indexId:a.indexId,collectionGroup:a.collectionGroup,fields:a.fields.map(l=>[l.fieldPath.canonicalString(),l.kind])}}(n);delete r.indexId;let s=i.add(r);if(n.indexState){let o=cI(e);return s.next(a=>{o.put($Le(a,this.uid,n.indexState.sequenceNumber,n.indexState.offset))})}return s.next()}deleteFieldIndex(e,n){let i=SV(e),r=cI(e),s=lI(e);return i.delete(n.indexId).next(()=>r.delete(IDBKeyRange.bound([n.indexId],[n.indexId+1],!1,!0))).next(()=>s.delete(IDBKeyRange.bound([n.indexId],[n.indexId+1],!1,!0)))}deleteAllFieldIndexes(e){let n=SV(e),i=lI(e),r=cI(e);return n.j().next(()=>i.j()).next(()=>r.j())}createTargetIndexes(e,n){return tn.forEach(this.cn(n),i=>this.getIndexType(e,i).next(r=>{if(r===0||r===1){let s=new WY(i).on();if(s!=null)return this.addFieldIndex(e,s)}}))}getDocumentsMatchingTarget(e,n){let i=lI(e),r=!0,s=new Map;return tn.forEach(this.cn(n),o=>this.ln(e,o).next(a=>{r&&(r=!!a),s.set(o,a)})).next(()=>{if(r){let o=ul(),a=[];return tn.forEach(s,(l,c)=>{Jn("IndexedDbIndexManager",`Using index ${function(I){return`id=${I.indexId}|cg=${I.collectionGroup}|f=${I.fields.map(z=>`${z.fieldPath}:${z.kind}`).join(",")}`}(l)} to execute ${OT(n)}`);let d=function(I,z){let G=u1e(z);if(G===void 0)return null;for(let A of LY(I,G.fieldPath))switch(A.op){case"array-contains-any":return A.value.arrayValue.values||[];case"array-contains":return[A.value]}return null}(c,l),u=function(I,z){let G=new Map;for(let A of DT(z))for(let Y of LY(I,A.fieldPath))switch(Y.op){case"==":case"in":G.set(A.fieldPath.canonicalString(),Y.value);break;case"not-in":case"!=":return G.set(A.fieldPath.canonicalString(),Y.value),Array.from(G.values())}return null}(c,l),m=function(I,z){let G=[],A=!0;for(let Y of DT(z)){let X=Y.kind===0?ALe(I,Y.fieldPath,I.startAt):PLe(I,Y.fieldPath,I.startAt);G.push(X.value),A&&(A=X.inclusive)}return new s5(G,A)}(c,l),f=function(I,z){let G=[],A=!0;for(let Y of DT(z)){let X=Y.kind===0?PLe(I,Y.fieldPath,I.endAt):ALe(I,Y.fieldPath,I.endAt);G.push(X.value),A&&(A=X.inclusive)}return new s5(G,A)}(c,l),_=this.hn(l,c,m),x=this.hn(l,c,f),D=this.Pn(l,c,u),E=this.In(l.indexId,d,_,m.inclusive,x,f.inclusive,D);return tn.forEach(E,M=>i.G(M,n.limit).next(I=>{I.forEach(z=>{let G=hs.fromSegments(z.documentKey);o.has(G)||(o=o.add(G),a.push(G))})}))}).next(()=>a)}return tn.resolve(null)})}cn(e){let n=this.un.get(e);return n||(e.filters.length===0?n=[e]:n=XPt(iu.create(e.filters,"and")).map(i=>M1e(e.path,e.collectionGroup,e.orderBy,i.getFilters(),e.limit,e.startAt,e.endAt)),this.un.set(e,n),n)}In(e,n,i,r,s,o,a){let l=(n!=null?n.length:1)*Math.max(i.length,s.length),c=l/(n!=null?n.length:1),d=[];for(let u=0;u<l;++u){let m=n?this.Tn(n[u/c]):fY,f=this.En(e,m,i[u%c],r),_=this.dn(e,m,s[u%c],o),x=a.map(D=>this.En(e,m,D,!0));d.push(...this.createRange(f,_,x))}return d}En(e,n,i,r){let s=new IT(e,hs.empty(),n,i);return r?s:s.Jt()}dn(e,n,i,r){let s=new IT(e,hs.empty(),n,i);return r?s.Jt():s}ln(e,n){let i=new WY(n),r=n.collectionGroup!=null?n.collectionGroup:n.path.lastSegment();return this.getFieldIndexes(e,r).next(s=>{let o=null;for(let a of s)i.tn(a)&&(!o||a.fields.length>o.fields.length)&&(o=a);return o})}getIndexType(e,n){let i=2,r=this.cn(n);return tn.forEach(r,s=>this.ln(e,s).next(o=>{o?i!==0&&o.fields.length<function(l){let c=new Bu(bm.comparator),d=!1;for(let u of l.filters)for(let m of u.getFlattenedFilters())m.field.isKeyField()||(m.op==="array-contains"||m.op==="array-contains-any"?d=!0:c=c.add(m.field));for(let u of l.orderBy)u.field.isKeyField()||(c=c.add(u.field));return c.size+(d?1:0)}(s)&&(i=1):i=0})).next(()=>function(o){return o.limit!==null}(n)&&r.length>1&&i===2?1:i)}An(e,n){let i=new kT;for(let r of DT(e)){let s=n.data.field(r.fieldPath);if(s==null)return null;let o=i.Ht(r.kind);q8.bt.Pt(s,o)}return i.Wt()}Tn(e){let n=new kT;return q8.bt.Pt(e,n.Ht(0)),n.Wt()}Rn(e,n){let i=new kT;return q8.bt.Pt(FT(this.databaseId,n),i.Ht(function(s){let o=DT(s);return o.length===0?0:o[o.length-1].kind}(e))),i.Wt()}Pn(e,n,i){if(i===null)return[];let r=[];r.push(new kT);let s=0;for(let o of DT(e)){let a=i[s++];for(let l of r)if(this.Vn(n,o.fieldPath)&&BV(a))r=this.mn(r,o,a);else{let c=l.Ht(o.kind);q8.bt.Pt(a,c)}}return this.fn(r)}hn(e,n,i){return this.Pn(e,n,i.position)}fn(e){let n=[];for(let i=0;i<e.length;++i)n[i]=e[i].Wt();return n}mn(e,n,i){let r=[...e],s=[];for(let o of i.arrayValue.values||[])for(let a of r){let l=new kT;l.seed(a.Wt()),q8.bt.Pt(o,l.Ht(n.kind)),s.push(l)}return s}Vn(e,n){return!!e.filters.find(i=>i instanceof lc&&i.field.isEqual(n)&&(i.op==="in"||i.op==="not-in"))}getFieldIndexes(e,n){let i=SV(e),r=cI(e);return(n?i.U("collectionGroupIndex",IDBKeyRange.bound(n,n)):i.U()).next(s=>{let o=[];return tn.forEach(s,a=>r.get([a.indexId,this.uid]).next(l=>{o.push(function(d,u){let m=u?new FV(u.sequenceNumber,new Bv(BT(u.readTime),new hs(J_(u.documentKey)),u.largestBatchId)):FV.empty(),f=d.fields.map(([_,x])=>new vI(bm.fromServerFormat(_),x));return new xI(d.indexId,d.collectionGroup,f,m)}(a,l))})).next(()=>o)})}getNextCollectionGroupToUpdate(e){return this.getFieldIndexes(e).next(n=>n.length===0?null:(n.sort((i,r)=>{let s=i.indexState.sequenceNumber-r.indexState.sequenceNumber;return s!==0?s:el(i.collectionGroup,r.collectionGroup)}),n[0].collectionGroup))}updateCollectionGroup(e,n,i){let r=SV(e),s=cI(e);return this.gn(e).next(o=>r.U("collectionGroupIndex",IDBKeyRange.bound(n,n)).next(a=>tn.forEach(a,l=>s.put($Le(l.indexId,this.uid,o,i)))))}updateIndexEntries(e,n){let i=new Map;return tn.forEach(n,(r,s)=>{let o=i.get(r.collectionGroup);return(o?tn.resolve(o):this.getFieldIndexes(e,r.collectionGroup)).next(a=>(i.set(r.collectionGroup,a),tn.forEach(a,l=>this.pn(e,r,l).next(c=>{let d=this.yn(s,l);return c.isEqual(d)?tn.resolve():this.wn(e,s,l,c,d)}))))})}Sn(e,n,i,r){return lI(e).put({indexId:r.indexId,uid:this.uid,arrayValue:r.arrayValue,directionalValue:r.directionalValue,orderedDocumentKey:this.Rn(i,n.key),documentKey:n.key.path.toArray()})}bn(e,n,i,r){return lI(e).delete([r.indexId,this.uid,r.arrayValue,r.directionalValue,this.Rn(i,n.key),n.key.path.toArray()])}pn(e,n,i){let r=lI(e),s=new Bu(Qb);return r.J({index:"documentKeyIndex",range:IDBKeyRange.only([i.indexId,this.uid,this.Rn(i,n)])},(o,a)=>{s=s.add(new IT(i.indexId,n,a.arrayValue,a.directionalValue))}).next(()=>s)}yn(e,n){let i=new Bu(Qb),r=this.An(n,e);if(r==null)return i;let s=u1e(n);if(s!=null){let o=e.data.field(s.fieldPath);if(BV(o))for(let a of o.arrayValue.values||[])i=i.add(new IT(n.indexId,e.key,this.Tn(a),r))}else i=i.add(new IT(n.indexId,e.key,fY,r));return i}wn(e,n,i,r,s){Jn("IndexedDbIndexManager","Updating index entries for document '%s'",n.key);let o=[];return function(l,c,d,u,m){let f=l.getIterator(),_=c.getIterator(),x=aI(f),D=aI(_);for(;x||D;){let E=!1,M=!1;if(x&&D){let I=d(x,D);I<0?M=!0:I>0&&(E=!0)}else x!=null?M=!0:E=!0;E?(u(D),D=aI(_)):M?(m(x),x=aI(f)):(x=aI(f),D=aI(_))}}(r,s,Qb,a=>{o.push(this.Sn(e,n,i,a))},a=>{o.push(this.bn(e,n,i,a))}),tn.waitFor(o)}gn(e){let n=1;return cI(e).J({index:"sequenceNumberIndex",reverse:!0,range:IDBKeyRange.upperBound([this.uid,Number.MAX_SAFE_INTEGER])},(i,r,s)=>{s.done(),n=r.sequenceNumber+1}).next(()=>n)}createRange(e,n,i){i=i.sort((o,a)=>Qb(o,a)).filter((o,a,l)=>!a||Qb(o,l[a-1])!==0);let r=[];r.push(e);for(let o of i){let a=Qb(o,e),l=Qb(o,n);if(a===0)r[0]=e.Jt();else if(a>0&&l<0)r.push(o),r.push(o.Jt());else if(l>0)break}r.push(n);let s=[];for(let o=0;o<r.length;o+=2){if(this.Dn(r[o],r[o+1]))return[];let a=[r[o].indexId,this.uid,r[o].arrayValue,r[o].directionalValue,fY,[]],l=[r[o+1].indexId,this.uid,r[o+1].arrayValue,r[o+1].directionalValue,fY,[]];s.push(IDBKeyRange.bound(a,l))}return s}Dn(e,n){return Qb(e,n)>0}getMinOffsetFromCollectionGroup(e,n){return this.getFieldIndexes(e,n).next(JLe)}getMinOffset(e,n){return tn.mapArray(this.cn(n),i=>this.ln(e,i).next(r=>r||Ws())).next(JLe)}};eOe={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Nv=class t{constructor(e,n,i){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=i}static withCacheSize(e){return new t(e,t.DEFAULT_COLLECTION_PERCENTILE,t.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}};Nv.DEFAULT_COLLECTION_PERCENTILE=10,Nv.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Nv.DEFAULT=new Nv(41943040,Nv.DEFAULT_COLLECTION_PERCENTILE,Nv.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Nv.DISABLED=new Nv(-1,0,0);$Y=class t{constructor(e,n,i,r){this.userId=e,this.serializer=n,this.indexManager=i,this.referenceDelegate=r,this.Cn={}}static lt(e,n,i,r){To(e.uid!=="");let s=e.isAuthenticated()?e.uid:"";return new t(s,n,i,r)}checkEmpty(e){let n=!0,i=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return Jb(e).J({index:"userMutationsIndex",range:i},(r,s,o)=>{n=!1,o.done()}).next(()=>n)}addMutationBatch(e,n,i,r){let s=fI(e),o=Jb(e);return o.add({}).next(a=>{To(typeof a=="number");let l=new HV(a,n,i,r),c=function(f,_,x){let D=x.baseMutations.map(M=>$V(f.ct,M)),E=x.mutations.map(M=>$V(f.ct,M));return{userId:_,batchId:x.batchId,localWriteTimeMs:x.localWriteTime.toMillis(),baseMutations:D,mutations:E}}(this.serializer,this.userId,l),d=[],u=new Bu((m,f)=>el(m.canonicalString(),f.canonicalString()));for(let m of r){let f=EOe(this.userId,m.key.path,a);u=u.add(m.key.path.popLast()),d.push(o.put(c)),d.push(s.put(f,rPt))}return u.forEach(m=>{d.push(this.indexManager.addToCollectionParentIndex(e,m))}),e.addOnCommittedListener(()=>{this.Cn[a]=l.keys()}),tn.waitFor(d).next(()=>l)})}lookupMutationBatch(e,n){return Jb(e).get(n).next(i=>i?(To(i.userId===this.userId),MT(this.serializer,i)):null)}vn(e,n){return this.Cn[n]?tn.resolve(this.Cn[n]):this.lookupMutationBatch(e,n).next(i=>{if(i){let r=i.keys();return this.Cn[n]=r,r}return null})}getNextMutationBatchAfterBatchId(e,n){let i=n+1,r=IDBKeyRange.lowerBound([this.userId,i]),s=null;return Jb(e).J({index:"userMutationsIndex",range:r},(o,a,l)=>{a.userId===this.userId&&(To(a.batchId>=i),s=MT(this.serializer,a)),l.done()}).next(()=>s)}getHighestUnacknowledgedBatchId(e){let n=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),i=-1;return Jb(e).J({index:"userMutationsIndex",range:n,reverse:!0},(r,s,o)=>{i=s.batchId,o.done()}).next(()=>i)}getAllMutationBatches(e){let n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return Jb(e).U("userMutationsIndex",n).next(i=>i.map(r=>MT(this.serializer,r)))}getAllMutationBatchesAffectingDocumentKey(e,n){let i=_Y(this.userId,n.path),r=IDBKeyRange.lowerBound(i),s=[];return fI(e).J({range:r},(o,a,l)=>{let[c,d,u]=o,m=J_(d);if(c===this.userId&&n.path.isEqual(m))return Jb(e).get(u).next(f=>{if(!f)throw Ws();To(f.userId===this.userId),s.push(MT(this.serializer,f))});l.done()}).next(()=>s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let i=new Bu(el),r=[];return n.forEach(s=>{let o=_Y(this.userId,s.path),a=IDBKeyRange.lowerBound(o),l=fI(e).J({range:a},(c,d,u)=>{let[m,f,_]=c,x=J_(f);m===this.userId&&s.path.isEqual(x)?i=i.add(_):u.done()});r.push(l)}),tn.waitFor(r).next(()=>this.Fn(e,i))}getAllMutationBatchesAffectingQuery(e,n){let i=n.path,r=i.length+1,s=_Y(this.userId,i),o=IDBKeyRange.lowerBound(s),a=new Bu(el);return fI(e).J({range:o},(l,c,d)=>{let[u,m,f]=l,_=J_(m);u===this.userId&&i.isPrefixOf(_)?_.length===r&&(a=a.add(f)):d.done()}).next(()=>this.Fn(e,a))}Fn(e,n){let i=[],r=[];return n.forEach(s=>{r.push(Jb(e).get(s).next(o=>{if(o===null)throw Ws();To(o.userId===this.userId),i.push(MT(this.serializer,o))}))}),tn.waitFor(r).next(()=>i)}removeMutationBatch(e,n){return xNe(e._e,this.userId,n).next(i=>(e.addOnCommittedListener(()=>{this.Mn(n.batchId)}),tn.forEach(i,r=>this.referenceDelegate.markPotentiallyOrphaned(e,r))))}Mn(e){delete this.Cn[e]}performConsistencyCheck(e){return this.checkEmpty(e).next(n=>{if(!n)return tn.resolve();let i=IDBKeyRange.lowerBound(function(o){return[o]}(this.userId)),r=[];return fI(e).J({range:i},(s,o,a)=>{if(s[0]===this.userId){let l=J_(s[1]);r.push(l)}else a.done()}).next(()=>{To(r.length===0)})})}containsKey(e,n){return bNe(e,this.userId,n)}xn(e){return wNe(e).get(this.userId).next(n=>n||{userId:this.userId,lastAcknowledgedBatchId:-1,lastStreamToken:""})}};MI=class t{constructor(e){this.On=e}next(){return this.On+=2,this.On}static Nn(){return new t(0)}static Ln(){return new t(-1)}};q1e=class{constructor(e,n){this.referenceDelegate=e,this.serializer=n}allocateTargetId(e){return this.Bn(e).next(n=>{let i=new MI(n.highestTargetId);return n.highestTargetId=i.next(),this.kn(e,n).next(()=>n.highestTargetId)})}getLastRemoteSnapshotVersion(e){return this.Bn(e).next(n=>Bo.fromTimestamp(new kp(n.lastRemoteSnapshotVersion.seconds,n.lastRemoteSnapshotVersion.nanoseconds)))}getHighestSequenceNumber(e){return this.Bn(e).next(n=>n.highestListenSequenceNumber)}setTargetsMetadata(e,n,i){return this.Bn(e).next(r=>(r.highestListenSequenceNumber=n,i&&(r.lastRemoteSnapshotVersion=i.toTimestamp()),n>r.highestListenSequenceNumber&&(r.highestListenSequenceNumber=n),this.kn(e,r)))}addTargetData(e,n){return this.qn(e,n).next(()=>this.Bn(e).next(i=>(i.targetCount+=1,this.Qn(n,i),this.kn(e,i))))}updateTargetData(e,n){return this.qn(e,n)}removeTargetData(e,n){return this.removeMatchingKeysForTargetId(e,n.targetId).next(()=>dI(e).delete(n.targetId)).next(()=>this.Bn(e)).next(i=>(To(i.targetCount>0),i.targetCount-=1,this.kn(e,i)))}removeTargets(e,n,i){let r=0,s=[];return dI(e).J((o,a)=>{let l=MV(a);l.sequenceNumber<=n&&i.get(l.targetId)===null&&(r++,s.push(this.removeTargetData(e,l)))}).next(()=>tn.waitFor(s)).next(()=>r)}forEachTarget(e,n){return dI(e).J((i,r)=>{let s=MV(r);n(s)})}Bn(e){return tOe(e).get("targetGlobalKey").next(n=>(To(n!==null),n))}kn(e,n){return tOe(e).put("targetGlobalKey",n)}qn(e,n){return dI(e).put(yNe(this.serializer,n))}Qn(e,n){let i=!1;return e.targetId>n.highestTargetId&&(n.highestTargetId=e.targetId,i=!0),e.sequenceNumber>n.highestListenSequenceNumber&&(n.highestListenSequenceNumber=e.sequenceNumber,i=!0),i}getTargetCount(e){return this.Bn(e).next(n=>n.targetCount)}getTargetData(e,n){let i=OT(n),r=IDBKeyRange.bound([i,Number.NEGATIVE_INFINITY],[i,Number.POSITIVE_INFINITY]),s=null;return dI(e).J({range:r,index:"queryTargetsIndex"},(o,a,l)=>{let c=MV(a);nB(n,c.target)&&(s=c,l.done())}).next(()=>s)}addMatchingKeys(e,n,i){let r=[],s=e7(e);return n.forEach(o=>{let a=lg(o.path);r.push(s.put({targetId:i,path:a})),r.push(this.referenceDelegate.addReference(e,i,o))}),tn.waitFor(r)}removeMatchingKeys(e,n,i){let r=e7(e);return tn.forEach(n,s=>{let o=lg(s.path);return tn.waitFor([r.delete([i,o]),this.referenceDelegate.removeReference(e,i,s)])})}removeMatchingKeysForTargetId(e,n){let i=e7(e),r=IDBKeyRange.bound([n],[n+1],!1,!0);return i.delete(r)}getMatchingKeysForTargetId(e,n){let i=IDBKeyRange.bound([n],[n+1],!1,!0),r=e7(e),s=ul();return r.J({range:i,H:!0},(o,a,l)=>{let c=J_(o[1]),d=new hs(c);s=s.add(d)}).next(()=>s)}containsKey(e,n){let i=lg(n.path),r=IDBKeyRange.bound([i],[xOe(i)],!1,!0),s=0;return e7(e).J({index:"documentTargetsIndex",H:!0,range:r},([o,a],l,c)=>{o!==0&&(s++,c.done())}).next(()=>s>0)}ot(e,n){return dI(e).get(n).next(i=>i?MV(i):null)}};Z1e=class{constructor(e){this.Kn=e,this.buffer=new Bu(iOe),this.$n=0}Un(){return++this.$n}Wn(e){let n=[e,this.Un()];if(this.buffer.size<this.Kn)this.buffer=this.buffer.add(n);else{let i=this.buffer.last();iOe(n,i)<0&&(this.buffer=this.buffer.delete(i).add(n))}}get maxValue(){return this.buffer.last()[0]}},X1e=class{constructor(e,n,i){this.garbageCollector=e,this.asyncQueue=n,this.localStore=i,this.Gn=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.zn(6e4)}stop(){this.Gn&&(this.Gn.cancel(),this.Gn=null)}get started(){return this.Gn!==null}zn(e){Jn("LruGarbageCollector",`Garbage collection scheduled in ${e}ms`),this.Gn=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,()=>O(this,null,function*(){this.Gn=null;try{yield this.localStore.collectGarbage(this.garbageCollector)}catch(n){f7(n)?Jn("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",n):yield m7(n)}yield this.zn(3e5)}))}},Q1e=class{constructor(e,n){this.jn=e,this.params=n}calculateTargetCount(e,n){return this.jn.Hn(e).next(i=>Math.floor(n/100*i))}nthSequenceNumber(e,n){if(n===0)return tn.resolve(x4.oe);let i=new Z1e(n);return this.jn.forEachTarget(e,r=>i.Wn(r.sequenceNumber)).next(()=>this.jn.Jn(e,r=>i.Wn(r))).next(()=>i.maxValue)}removeTargets(e,n,i){return this.jn.removeTargets(e,n,i)}removeOrphanedDocuments(e,n){return this.jn.removeOrphanedDocuments(e,n)}collect(e,n){return this.params.cacheSizeCollectionThreshold===-1?(Jn("LruGarbageCollector","Garbage collection skipped; disabled"),tn.resolve(eOe)):this.getCacheSize(e).next(i=>i<this.params.cacheSizeCollectionThreshold?(Jn("LruGarbageCollector",`Garbage collection skipped; Cache size ${i} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),eOe):this.Yn(e,n))}getCacheSize(e){return this.jn.getCacheSize(e)}Yn(e,n){let i,r,s,o,a,l,c,d=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(u=>(u>this.params.maximumSequenceNumbersToCollect?(Jn("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${u}`),r=this.params.maximumSequenceNumbersToCollect):r=u,o=Date.now(),this.nthSequenceNumber(e,r))).next(u=>(i=u,a=Date.now(),this.removeTargets(e,i,n))).next(u=>(s=u,l=Date.now(),this.removeOrphanedDocuments(e,i))).next(u=>(c=Date.now(),uI()<=L_.DEBUG&&Jn("LruGarbageCollector",`LRU Garbage Collection
	Counted targets in ${o-d}ms
	Determined least recently used ${r} in `+(a-o)+`ms
	Removed ${s} targets in `+(l-a)+`ms
	Removed ${u} documents in `+(c-l)+`ms
Total Duration: ${c-d}ms`),tn.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:s,documentsRemoved:u})))}};J1e=class{constructor(e,n){this.db=e,this.garbageCollector=QPt(this,n)}Hn(e){let n=this.Zn(e);return this.db.getTargetCache().getTargetCount(e).next(i=>n.next(r=>i+r))}Zn(e){let n=0;return this.Jn(e,i=>{n++}).next(()=>n)}forEachTarget(e,n){return this.db.getTargetCache().forEachTarget(e,n)}Jn(e,n){return this.Xn(e,(i,r)=>n(r))}addReference(e,n,i){return gY(e,i)}removeReference(e,n,i){return gY(e,i)}removeTargets(e,n,i){return this.db.getTargetCache().removeTargets(e,n,i)}markPotentiallyOrphaned(e,n){return gY(e,n)}er(e,n){return function(r,s){let o=!1;return wNe(r).Y(a=>bNe(r,a,s).next(l=>(l&&(o=!0),tn.resolve(!l)))).next(()=>o)}(e,n)}removeOrphanedDocuments(e,n){let i=this.db.getRemoteDocumentCache().newChangeBuffer(),r=[],s=0;return this.Xn(e,(o,a)=>{if(a<=n){let l=this.er(e,o).next(c=>{if(!c)return s++,i.getEntry(e,o).next(()=>(i.removeEntry(o,Bo.min()),e7(e).delete(function(u){return[0,lg(u.path)]}(o))))});r.push(l)}}).next(()=>tn.waitFor(r)).next(()=>i.apply(e)).next(()=>s)}removeTarget(e,n){let i=n.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,i)}updateLimboDocument(e,n){return gY(e,n)}Xn(e,n){let i=e7(e),r,s=x4.oe;return i.J({index:"documentTargetsIndex"},([o,a],{path:l,sequenceNumber:c})=>{o===0?(s!==x4.oe&&n(new hs(J_(r)),s),s=c,r=l):s=x4.oe}).next(()=>{s!==x4.oe&&n(new hs(J_(r)),s)})}getCacheSize(e){return this.db.getRemoteDocumentCache().getSize(e)}};KY=class{constructor(){this.changes=new o5(e=>e.toString(),(e,n)=>e.isEqual(n)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,mf.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();let i=this.changes.get(n);return i!==void 0?tn.resolve(i):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}};e0e=class{constructor(e){this.serializer=e}setIndexManager(e){this.indexManager=e}addEntry(e,n,i){return TT(e).put(i)}removeEntry(e,n,i){return TT(e).delete(function(s,o){let a=s.path.toArray();return[a.slice(0,a.length-2),a[a.length-2],HY(o),a[a.length-1]]}(n,i))}updateMetadata(e,n){return this.getMetadata(e).next(i=>(i.byteSize+=n,this.tr(e,i)))}getEntry(e,n){let i=mf.newInvalidDocument(n);return TT(e).J({index:"documentKeyIndex",range:IDBKeyRange.only(TV(n))},(r,s)=>{i=this.nr(n,s)}).next(()=>i)}rr(e,n){let i={size:0,document:mf.newInvalidDocument(n)};return TT(e).J({index:"documentKeyIndex",range:IDBKeyRange.only(TV(n))},(r,s)=>{i={document:this.nr(n,s),size:jY(s)}}).next(()=>i)}getEntries(e,n){let i=n3();return this.ir(e,n,(r,s)=>{let o=this.nr(r,s);i=i.insert(r,o)}).next(()=>i)}sr(e,n){let i=n3(),r=new Ih(hs.comparator);return this.ir(e,n,(s,o)=>{let a=this.nr(s,o);i=i.insert(s,a),r=r.insert(s,jY(o))}).next(()=>({documents:i,_r:r}))}ir(e,n,i){if(n.isEmpty())return tn.resolve();let r=new Bu(sOe);n.forEach(l=>r=r.add(l));let s=IDBKeyRange.bound(TV(r.first()),TV(r.last())),o=r.getIterator(),a=o.getNext();return TT(e).J({index:"documentKeyIndex",range:s},(l,c,d)=>{let u=hs.fromSegments([...c.prefixPath,c.collectionGroup,c.documentId]);for(;a&&sOe(a,u)<0;)i(a,null),a=o.getNext();a&&a.isEqual(u)&&(i(a,c),a=o.hasNext()?o.getNext():null),a?d.$(TV(a)):d.done()}).next(()=>{for(;a;)i(a,null),a=o.hasNext()?o.getNext():null})}getDocumentsMatchingQuery(e,n,i,r,s){let o=n.path,a=[o.popLast().toArray(),o.lastSegment(),HY(i.readTime),i.documentKey.path.isEmpty()?"":i.documentKey.path.lastSegment()],l=[o.popLast().toArray(),o.lastSegment(),[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],""];return TT(e).U(IDBKeyRange.bound(a,l,!0)).next(c=>{s?.incrementDocumentReadCount(c.length);let d=n3();for(let u of c){let m=this.nr(hs.fromSegments(u.prefixPath.concat(u.collectionGroup,u.documentId)),u);m.isFoundDocument()&&(sB(n,m)||r.has(m.key))&&(d=d.insert(m.key,m))}return d})}getAllFromCollectionGroup(e,n,i,r){let s=n3(),o=rOe(n,i),a=rOe(n,Bv.max());return TT(e).J({index:"collectionGroupIndex",range:IDBKeyRange.bound(o,a,!0)},(l,c,d)=>{let u=this.nr(hs.fromSegments(c.prefixPath.concat(c.collectionGroup,c.documentId)),c);s=s.insert(u.key,u),s.size===r&&d.done()}).next(()=>s)}newChangeBuffer(e){return new t0e(this,!!e&&e.trackRemovals)}getSize(e){return this.getMetadata(e).next(n=>n.byteSize)}getMetadata(e){return nOe(e).get("remoteDocumentGlobalKey").next(n=>(To(!!n),n))}tr(e,n){return nOe(e).put("remoteDocumentGlobalKey",n)}nr(e,n){if(n){let i=qPt(this.serializer,n);if(!(i.isNoDocument()&&i.version.isEqual(Bo.min())))return i}return mf.newInvalidDocument(e)}};t0e=class extends KY{constructor(e,n){super(),this.ar=e,this.trackRemovals=n,this.ur=new o5(i=>i.toString(),(i,r)=>i.isEqual(r))}applyChanges(e){let n=[],i=0,r=new Bu((s,o)=>el(s.canonicalString(),o.canonicalString()));return this.changes.forEach((s,o)=>{let a=this.ur.get(s);if(n.push(this.ar.removeEntry(e,s,a.readTime)),o.isValidDocument()){let l=ULe(this.ar.serializer,o);r=r.add(s.path.popLast());let c=jY(l);i+=c-a.size,n.push(this.ar.addEntry(e,s,l))}else if(i-=a.size,this.trackRemovals){let l=ULe(this.ar.serializer,o.convertToNoDocument(Bo.min()));n.push(this.ar.addEntry(e,s,l))}}),r.forEach(s=>{n.push(this.ar.indexManager.addToCollectionParentIndex(e,s))}),n.push(this.ar.updateMetadata(e,i)),tn.waitFor(n)}getFromCache(e,n){return this.ar.rr(e,n).next(i=>(this.ur.set(n,{size:i.size,readTime:i.document.readTime}),i.document))}getAllFromCache(e,n){return this.ar.sr(e,n).next(({documents:i,_r:r})=>(r.forEach((s,o)=>{this.ur.set(s,{size:o,readTime:i.get(s).readTime})}),i))}};i0e=class{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}};YY=class{constructor(e,n,i,r){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=i,this.indexManager=r}getDocument(e,n){let i=null;return this.documentOverlayCache.getOverlay(e,n).next(r=>(i=r,this.remoteDocumentCache.getEntry(e,n))).next(r=>(i!==null&&AV(i.mutation,r,b4.empty(),kp.now()),r))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(i=>this.getLocalViewOfDocuments(e,i,ul()).next(()=>i))}getLocalViewOfDocuments(e,n,i=ul()){let r=e5();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,i).next(s=>{let o=EV();return s.forEach((a,l)=>{o=o.insert(a,l.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){let i=e5();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,ul()))}populateOverlays(e,n,i){let r=[];return i.forEach(s=>{n.has(s)||r.push(s)}),this.documentOverlayCache.getOverlays(e,r).next(s=>{s.forEach((o,a)=>{n.set(o,a)})})}computeViews(e,n,i,r){let s=n3(),o=IV(),a=function(){return IV()}();return n.forEach((l,c)=>{let d=i.get(c.key);r.has(c.key)&&(d===void 0||d.mutation instanceof Ny)?s=s.insert(c.key,c):d!==void 0?(o.set(c.key,d.mutation.getFieldMask()),AV(d.mutation,c,d.mutation.getFieldMask(),kp.now())):o.set(c.key,b4.empty())}),this.recalculateAndSaveOverlays(e,s).next(l=>(l.forEach((c,d)=>o.set(c,d)),n.forEach((c,d)=>{var u;return a.set(c,new i0e(d,(u=o.get(c))!==null&&u!==void 0?u:null))}),a))}recalculateAndSaveOverlays(e,n){let i=IV(),r=new Ih((o,a)=>o-a),s=ul();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(let a of o)a.keys().forEach(l=>{let c=n.get(l);if(c===null)return;let d=i.get(l)||b4.empty();d=a.applyToLocalView(c,d),i.set(l,d);let u=(r.get(a.batchId)||ul()).add(l);r=r.insert(a.batchId,u)})}).next(()=>{let o=[],a=r.getReverseIterator();for(;a.hasNext();){let l=a.getNext(),c=l.key,d=l.value,u=KOe();d.forEach(m=>{if(!s.has(m)){let f=tNe(n.get(m),i.get(m));f!==null&&u.set(m,f),s=s.add(m)}}),o.push(this.documentOverlayCache.saveOverlays(e,c,u))}return tn.waitFor(o)}).next(()=>i)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(i=>this.recalculateAndSaveOverlays(e,i))}getDocumentsMatchingQuery(e,n,i,r){return function(o){return hs.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):a2e(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,i,r):this.getDocumentsMatchingCollectionQuery(e,n,i,r)}getNextDocuments(e,n,i,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,i,r).next(s=>{let o=r-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,i.largestBatchId,r-s.size):tn.resolve(e5()),a=-1,l=s;return o.next(c=>tn.forEach(c,(d,u)=>(a<u.largestBatchId&&(a=u.largestBatchId),s.get(d)?tn.resolve():this.remoteDocumentCache.getEntry(e,d).next(m=>{l=l.insert(d,m)}))).next(()=>this.populateOverlays(e,c,s)).next(()=>this.computeViews(e,l,c,ul())).next(d=>({batchId:a,changes:$Oe(d)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new hs(n)).next(i=>{let r=EV();return i.isFoundDocument()&&(r=r.insert(i.key,i)),r})}getDocumentsMatchingCollectionGroupQuery(e,n,i,r){let s=n.collectionGroup,o=EV();return this.indexManager.getCollectionParents(e,s).next(a=>tn.forEach(a,l=>{let c=function(u,m){return new Oy(m,null,u.explicitOrderBy.slice(),u.filters.slice(),u.limit,u.limitType,u.startAt,u.endAt)}(n,l.child(s));return this.getDocumentsMatchingCollectionQuery(e,c,i,r).next(d=>{d.forEach((u,m)=>{o=o.insert(u,m)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,i,r){let s;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,i.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,i,s,r))).next(o=>{s.forEach((l,c)=>{let d=c.getKey();o.get(d)===null&&(o=o.insert(d,mf.newInvalidDocument(d)))});let a=EV();return o.forEach((l,c)=>{let d=s.get(l);d!==void 0&&AV(d.mutation,c,b4.empty(),kp.now()),sB(n,c)&&(a=a.insert(l,c))}),a})}};n0e=class{constructor(e){this.serializer=e,this.cr=new Map,this.lr=new Map}getBundleMetadata(e,n){return tn.resolve(this.cr.get(n))}saveBundleMetadata(e,n){return this.cr.set(n.id,function(r){return{id:r.id,version:r.version,createTime:wm(r.createTime)}}(n)),tn.resolve()}getNamedQuery(e,n){return tn.resolve(this.lr.get(n))}saveNamedQuery(e,n){return this.lr.set(n.name,function(r){return{name:r.name,query:d2e(r.bundledQuery),readTime:wm(r.readTime)}}(n)),tn.resolve()}};r0e=class{constructor(){this.overlays=new Ih(hs.comparator),this.hr=new Map}getOverlay(e,n){return tn.resolve(this.overlays.get(n))}getOverlays(e,n){let i=e5();return tn.forEach(n,r=>this.getOverlay(e,r).next(s=>{s!==null&&i.set(r,s)})).next(()=>i)}saveOverlays(e,n,i){return i.forEach((r,s)=>{this.ht(e,n,s)}),tn.resolve()}removeOverlaysForBatchId(e,n,i){let r=this.hr.get(i);return r!==void 0&&(r.forEach(s=>this.overlays=this.overlays.remove(s)),this.hr.delete(i)),tn.resolve()}getOverlaysForCollection(e,n,i){let r=e5(),s=n.length+1,o=new hs(n.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){let l=a.getNext().value,c=l.getKey();if(!n.isPrefixOf(c.path))break;c.path.length===s&&l.largestBatchId>i&&r.set(l.getKey(),l)}return tn.resolve(r)}getOverlaysForCollectionGroup(e,n,i,r){let s=new Ih((c,d)=>c-d),o=this.overlays.getIterator();for(;o.hasNext();){let c=o.getNext().value;if(c.getKey().getCollectionGroup()===n&&c.largestBatchId>i){let d=s.get(c.largestBatchId);d===null&&(d=e5(),s=s.insert(c.largestBatchId,d)),d.set(c.getKey(),c)}}let a=e5(),l=s.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((c,d)=>a.set(c,d)),!(a.size()>=r)););return tn.resolve(a)}ht(e,n,i){let r=this.overlays.get(i.key);if(r!==null){let o=this.hr.get(r.largestBatchId).delete(i.key);this.hr.set(r.largestBatchId,o)}this.overlays=this.overlays.insert(i.key,new GV(n,i));let s=this.hr.get(n);s===void 0&&(s=ul(),this.hr.set(n,s)),this.hr.set(n,s.add(i.key))}};YV=class{constructor(){this.Pr=new Bu(uf.Ir),this.Tr=new Bu(uf.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(e,n){let i=new uf(e,n);this.Pr=this.Pr.add(i),this.Tr=this.Tr.add(i)}dr(e,n){e.forEach(i=>this.addReference(i,n))}removeReference(e,n){this.Ar(new uf(e,n))}Rr(e,n){e.forEach(i=>this.removeReference(i,n))}Vr(e){let n=new hs(new Fc([])),i=new uf(n,e),r=new uf(n,e+1),s=[];return this.Tr.forEachInRange([i,r],o=>{this.Ar(o),s.push(o.key)}),s}mr(){this.Pr.forEach(e=>this.Ar(e))}Ar(e){this.Pr=this.Pr.delete(e),this.Tr=this.Tr.delete(e)}gr(e){let n=new hs(new Fc([])),i=new uf(n,e),r=new uf(n,e+1),s=ul();return this.Tr.forEachInRange([i,r],o=>{s=s.add(o.key)}),s}containsKey(e){let n=new uf(e,0),i=this.Pr.firstAfterOrEqual(n);return i!==null&&e.isEqual(i.key)}},uf=class{constructor(e,n){this.key=e,this.pr=n}static Ir(e,n){return hs.comparator(e.key,n.key)||el(e.pr,n.pr)}static Er(e,n){return el(e.pr,n.pr)||hs.comparator(e.key,n.key)}};s0e=class{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.yr=1,this.wr=new Bu(uf.Ir)}checkEmpty(e){return tn.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,i,r){let s=this.yr;this.yr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let o=new HV(s,n,i,r);this.mutationQueue.push(o);for(let a of r)this.wr=this.wr.add(new uf(a.key,s)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return tn.resolve(o)}lookupMutationBatch(e,n){return tn.resolve(this.Sr(n))}getNextMutationBatchAfterBatchId(e,n){let i=n+1,r=this.br(i),s=r<0?0:r;return tn.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return tn.resolve(this.mutationQueue.length===0?-1:this.yr-1)}getAllMutationBatches(e){return tn.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){let i=new uf(n,0),r=new uf(n,Number.POSITIVE_INFINITY),s=[];return this.wr.forEachInRange([i,r],o=>{let a=this.Sr(o.pr);s.push(a)}),tn.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let i=new Bu(el);return n.forEach(r=>{let s=new uf(r,0),o=new uf(r,Number.POSITIVE_INFINITY);this.wr.forEachInRange([s,o],a=>{i=i.add(a.pr)})}),tn.resolve(this.Dr(i))}getAllMutationBatchesAffectingQuery(e,n){let i=n.path,r=i.length+1,s=i;hs.isDocumentKey(s)||(s=s.child(""));let o=new uf(new hs(s),0),a=new Bu(el);return this.wr.forEachWhile(l=>{let c=l.key.path;return!!i.isPrefixOf(c)&&(c.length===r&&(a=a.add(l.pr)),!0)},o),tn.resolve(this.Dr(a))}Dr(e){let n=[];return e.forEach(i=>{let r=this.Sr(i);r!==null&&n.push(r)}),n}removeMutationBatch(e,n){To(this.Cr(n.batchId,"removed")===0),this.mutationQueue.shift();let i=this.wr;return tn.forEach(n.mutations,r=>{let s=new uf(r.key,n.batchId);return i=i.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)}).next(()=>{this.wr=i})}Mn(e){}containsKey(e,n){let i=new uf(n,0),r=this.wr.firstAfterOrEqual(i);return tn.resolve(n.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,tn.resolve()}Cr(e,n){return this.br(e)}br(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Sr(e){let n=this.br(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}};o0e=class{constructor(e){this.vr=e,this.docs=function(){return new Ih(hs.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){let i=n.key,r=this.docs.get(i),s=r?r.size:0,o=this.vr(n);return this.docs=this.docs.insert(i,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,i.path.popLast())}removeEntry(e){let n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){let i=this.docs.get(n);return tn.resolve(i?i.document.mutableCopy():mf.newInvalidDocument(n))}getEntries(e,n){let i=n3();return n.forEach(r=>{let s=this.docs.get(r);i=i.insert(r,s?s.document.mutableCopy():mf.newInvalidDocument(r))}),tn.resolve(i)}getDocumentsMatchingQuery(e,n,i,r){let s=n3(),o=n.path,a=new hs(o.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){let{key:c,value:{document:d}}=l.getNext();if(!o.isPrefixOf(c.path))break;c.path.length>o.length+1||n2e(wOe(d),i)<=0||(r.has(d.key)||sB(n,d))&&(s=s.insert(d.key,d.mutableCopy()))}return tn.resolve(s)}getAllFromCollectionGroup(e,n,i,r){Ws()}Fr(e,n){return tn.forEach(this.docs,i=>n(i))}newChangeBuffer(e){return new a0e(this)}getSize(e){return tn.resolve(this.size)}},a0e=class extends KY{constructor(e){super(),this.ar=e}applyChanges(e){let n=[];return this.changes.forEach((i,r)=>{r.isValidDocument()?n.push(this.ar.addEntry(e,r)):this.ar.removeEntry(i)}),tn.waitFor(n)}getFromCache(e,n){return this.ar.getEntry(e,n)}getAllFromCache(e,n){return this.ar.getEntries(e,n)}};l0e=class{constructor(e){this.persistence=e,this.Mr=new o5(n=>OT(n),nB),this.lastRemoteSnapshotVersion=Bo.min(),this.highestTargetId=0,this.Or=0,this.Nr=new YV,this.targetCount=0,this.Lr=MI.Nn()}forEachTarget(e,n){return this.Mr.forEach((i,r)=>n(r)),tn.resolve()}getLastRemoteSnapshotVersion(e){return tn.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return tn.resolve(this.Or)}allocateTargetId(e){return this.highestTargetId=this.Lr.next(),tn.resolve(this.highestTargetId)}setTargetsMetadata(e,n,i){return i&&(this.lastRemoteSnapshotVersion=i),n>this.Or&&(this.Or=n),tn.resolve()}qn(e){this.Mr.set(e.target,e);let n=e.targetId;n>this.highestTargetId&&(this.Lr=new MI(n),this.highestTargetId=n),e.sequenceNumber>this.Or&&(this.Or=e.sequenceNumber)}addTargetData(e,n){return this.qn(n),this.targetCount+=1,tn.resolve()}updateTargetData(e,n){return this.qn(n),tn.resolve()}removeTargetData(e,n){return this.Mr.delete(n.target),this.Nr.Vr(n.targetId),this.targetCount-=1,tn.resolve()}removeTargets(e,n,i){let r=0,s=[];return this.Mr.forEach((o,a)=>{a.sequenceNumber<=n&&i.get(a.targetId)===null&&(this.Mr.delete(o),s.push(this.removeMatchingKeysForTargetId(e,a.targetId)),r++)}),tn.waitFor(s).next(()=>r)}getTargetCount(e){return tn.resolve(this.targetCount)}getTargetData(e,n){let i=this.Mr.get(n)||null;return tn.resolve(i)}addMatchingKeys(e,n,i){return this.Nr.dr(n,i),tn.resolve()}removeMatchingKeys(e,n,i){this.Nr.Rr(n,i);let r=this.persistence.referenceDelegate,s=[];return r&&n.forEach(o=>{s.push(r.markPotentiallyOrphaned(e,o))}),tn.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.Nr.Vr(n),tn.resolve()}getMatchingKeysForTargetId(e,n){let i=this.Nr.gr(n);return tn.resolve(i)}containsKey(e,n){return tn.resolve(this.Nr.containsKey(n))}};qY=class{constructor(e,n){this.Br={},this.overlays={},this.kr=new x4(0),this.qr=!1,this.qr=!0,this.referenceDelegate=e(this),this.Qr=new l0e(this),this.indexManager=new K1e,this.remoteDocumentCache=function(r){return new o0e(r)}(i=>this.referenceDelegate.Kr(i)),this.serializer=new zY(n),this.$r=new n0e(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new r0e,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let i=this.Br[e.toKey()];return i||(i=new s0e(n,this.referenceDelegate),this.Br[e.toKey()]=i),i}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(e,n,i){Jn("MemoryPersistence","Starting transaction:",e);let r=new c0e(this.kr.next());return this.referenceDelegate.Ur(),i(r).next(s=>this.referenceDelegate.Wr(r).next(()=>s)).toPromise().then(s=>(r.raiseOnCommittedEvent(),s))}Gr(e,n){return tn.or(Object.values(this.Br).map(i=>()=>i.containsKey(e,n)))}},c0e=class extends MY{constructor(e){super(),this.currentSequenceNumber=e}},ZY=class t{constructor(e){this.persistence=e,this.zr=new YV,this.jr=null}static Hr(e){return new t(e)}get Jr(){if(this.jr)return this.jr;throw Ws()}addReference(e,n,i){return this.zr.addReference(i,n),this.Jr.delete(i.toString()),tn.resolve()}removeReference(e,n,i){return this.zr.removeReference(i,n),this.Jr.add(i.toString()),tn.resolve()}markPotentiallyOrphaned(e,n){return this.Jr.add(n.toString()),tn.resolve()}removeTarget(e,n){this.zr.Vr(n.targetId).forEach(r=>this.Jr.add(r.toString()));let i=this.persistence.getTargetCache();return i.getMatchingKeysForTargetId(e,n.targetId).next(r=>{r.forEach(s=>this.Jr.add(s.toString()))}).next(()=>i.removeTargetData(e,n))}Ur(){this.jr=new Set}Wr(e){let n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return tn.forEach(this.Jr,i=>{let r=hs.fromPath(i);return this.Yr(e,r).next(s=>{s||n.removeEntry(r,Bo.min())})}).next(()=>(this.jr=null,n.apply(e)))}updateLimboDocument(e,n){return this.Yr(e,n).next(i=>{i?this.Jr.delete(n.toString()):this.Jr.add(n.toString())})}Kr(e){return 0}Yr(e,n){return tn.or([()=>tn.resolve(this.zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Gr(e,n)])}};d0e=class{constructor(e){this.serializer=e}O(e,n,i,r){let s=new kY("createOrUpgrade",n);i<1&&r>=1&&(function(l){l.createObjectStore("owner")}(e),function(l){l.createObjectStore("mutationQueues",{keyPath:"userId"}),l.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",bLe,{unique:!0}),l.createObjectStore("documentMutations")}(e),oOe(e),function(l){l.createObjectStore("remoteDocuments")}(e));let o=tn.resolve();return i<3&&r>=3&&(i!==0&&(function(l){l.deleteObjectStore("targetDocuments"),l.deleteObjectStore("targets"),l.deleteObjectStore("targetGlobal")}(e),oOe(e)),o=o.next(()=>function(l){let c=l.store("targetGlobal"),d={highestTargetId:0,highestListenSequenceNumber:0,lastRemoteSnapshotVersion:Bo.min().toTimestamp(),targetCount:0};return c.put("targetGlobalKey",d)}(s))),i<4&&r>=4&&(i!==0&&(o=o.next(()=>function(l,c){return c.store("mutations").U().next(d=>{l.deleteObjectStore("mutations"),l.createObjectStore("mutations",{keyPath:"batchId",autoIncrement:!0}).createIndex("userMutationsIndex",bLe,{unique:!0});let u=c.store("mutations"),m=d.map(f=>u.put(f));return tn.waitFor(m)})}(e,s))),o=o.next(()=>{(function(l){l.createObjectStore("clientMetadata",{keyPath:"clientId"})})(e)})),i<5&&r>=5&&(o=o.next(()=>this.Xr(s))),i<6&&r>=6&&(o=o.next(()=>(function(l){l.createObjectStore("remoteDocumentGlobal")}(e),this.ei(s)))),i<7&&r>=7&&(o=o.next(()=>this.ti(s))),i<8&&r>=8&&(o=o.next(()=>this.ni(e,s))),i<9&&r>=9&&(o=o.next(()=>{(function(l){l.objectStoreNames.contains("remoteDocumentChanges")&&l.deleteObjectStore("remoteDocumentChanges")})(e)})),i<10&&r>=10&&(o=o.next(()=>this.ri(s))),i<11&&r>=11&&(o=o.next(()=>{(function(l){l.createObjectStore("bundles",{keyPath:"bundleId"})})(e),function(l){l.createObjectStore("namedQueries",{keyPath:"name"})}(e)})),i<12&&r>=12&&(o=o.next(()=>{(function(l){let c=l.createObjectStore("documentOverlays",{keyPath:gPt});c.createIndex("collectionPathOverlayIndex",vPt,{unique:!1}),c.createIndex("collectionGroupOverlayIndex",yPt,{unique:!1})})(e)})),i<13&&r>=13&&(o=o.next(()=>function(l){let c=l.createObjectStore("remoteDocumentsV14",{keyPath:sPt});c.createIndex("documentKeyIndex",oPt),c.createIndex("collectionGroupIndex",aPt)}(e)).next(()=>this.ii(e,s)).next(()=>e.deleteObjectStore("remoteDocuments"))),i<14&&r>=14&&(o=o.next(()=>this.si(e,s))),i<15&&r>=15&&(o=o.next(()=>function(l){l.createObjectStore("indexConfiguration",{keyPath:"indexId",autoIncrement:!0}).createIndex("collectionGroupIndex","collectionGroup",{unique:!1}),l.createObjectStore("indexState",{keyPath:hPt}).createIndex("sequenceNumberIndex",pPt,{unique:!1}),l.createObjectStore("indexEntries",{keyPath:mPt}).createIndex("documentKeyIndex",fPt,{unique:!1})}(e))),i<16&&r>=16&&(o=o.next(()=>{n.objectStore("indexState").clear()}).next(()=>{n.objectStore("indexEntries").clear()})),o}ei(e){let n=0;return e.store("remoteDocuments").J((i,r)=>{n+=jY(r)}).next(()=>{let i={byteSize:n};return e.store("remoteDocumentGlobal").put("remoteDocumentGlobalKey",i)})}Xr(e){let n=e.store("mutationQueues"),i=e.store("mutations");return n.U().next(r=>tn.forEach(r,s=>{let o=IDBKeyRange.bound([s.userId,-1],[s.userId,s.lastAcknowledgedBatchId]);return i.U("userMutationsIndex",o).next(a=>tn.forEach(a,l=>{To(l.userId===s.userId);let c=MT(this.serializer,l);return xNe(e,s.userId,c).next(()=>{})}))}))}ti(e){let n=e.store("targetDocuments"),i=e.store("remoteDocuments");return e.store("targetGlobal").get("targetGlobalKey").next(r=>{let s=[];return i.J((o,a)=>{let l=new Fc(o),c=function(u){return[0,lg(u)]}(l);s.push(n.get(c).next(d=>d?tn.resolve():(u=>n.put({targetId:0,path:lg(u),sequenceNumber:r.highestListenSequenceNumber}))(l)))}).next(()=>tn.waitFor(s))})}ni(e,n){e.createObjectStore("collectionParents",{keyPath:uPt});let i=n.store("collectionParents"),r=new KV,s=o=>{if(r.add(o)){let a=o.lastSegment(),l=o.popLast();return i.put({collectionId:a,parent:lg(l)})}};return n.store("remoteDocuments").J({H:!0},(o,a)=>{let l=new Fc(o);return s(l.popLast())}).next(()=>n.store("documentMutations").J({H:!0},([o,a,l],c)=>{let d=J_(a);return s(d.popLast())}))}ri(e){let n=e.store("targets");return n.J((i,r)=>{let s=MV(r),o=yNe(this.serializer,s);return n.put(o)})}ii(e,n){let i=n.store("remoteDocuments"),r=[];return i.J((s,o)=>{let a=n.store("remoteDocumentsV14"),l=function(u){return u.document?new hs(Fc.fromString(u.document.name).popFirst(5)):u.noDocument?hs.fromSegments(u.noDocument.path):u.unknownDocument?hs.fromSegments(u.unknownDocument.path):Ws()}(o).path.toArray(),c={prefixPath:l.slice(0,l.length-2),collectionGroup:l[l.length-2],documentId:l[l.length-1],readTime:o.readTime||[0,0],unknownDocument:o.unknownDocument,noDocument:o.noDocument,document:o.document,hasCommittedMutations:!!o.hasCommittedMutations};r.push(a.put(c))}).next(()=>tn.waitFor(r))}si(e,n){let i=n.store("mutations"),r=SNe(this.serializer),s=new qY(ZY.Hr,this.serializer.ct);return i.U().next(o=>{let a=new Map;return o.forEach(l=>{var c;let d=(c=a.get(l.userId))!==null&&c!==void 0?c:ul();MT(this.serializer,l).keys().forEach(u=>d=d.add(u)),a.set(l.userId,d)}),tn.forEach(a,(l,c)=>{let d=new hf(c),u=GY.lt(this.serializer,d),m=s.getIndexManager(d),f=$Y.lt(d,this.serializer,m,s.referenceDelegate);return new YY(r,f,u,m).recalculateAndSaveOverlaysForDocumentKeys(new OV(n,x4.oe),l).next()})})}};t1e="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",u0e=class t{constructor(e,n,i,r,s,o,a,l,c,d,u=16){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=i,this.oi=s,this.window=o,this.document=a,this._i=c,this.ai=d,this.ui=u,this.kr=null,this.qr=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ci=null,this.inForeground=!1,this.li=null,this.hi=null,this.Pi=Number.NEGATIVE_INFINITY,this.Ii=m=>Promise.resolve(),!t.D())throw new Un(dn.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new J1e(this,r),this.Ti=n+"main",this.serializer=new zY(l),this.Ei=new s7(this.Ti,this.ui,new d0e(this.serializer)),this.Qr=new q1e(this.referenceDelegate,this.serializer),this.remoteDocumentCache=SNe(this.serializer),this.$r=new z1e,this.window&&this.window.localStorage?this.di=this.window.localStorage:(this.di=null,d===!1&&xm("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.Ai().then(()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new Un(dn.FAILED_PRECONDITION,t1e);return this.Ri(),this.Vi(),this.mi(),this.runTransaction("getHighestListenSequenceNumber","readonly",e=>this.Qr.getHighestSequenceNumber(e))}).then(e=>{this.kr=new x4(e,this._i)}).then(()=>{this.qr=!0}).catch(e=>(this.Ei&&this.Ei.close(),Promise.reject(e)))}fi(e){return this.Ii=n=>O(this,null,function*(){if(this.started)return e(n)}),e(this.isPrimary)}setDatabaseDeletedListener(e){this.Ei.L(n=>O(this,null,function*(){n.newVersion===null&&(yield e())}))}setNetworkEnabled(e){this.networkEnabled!==e&&(this.networkEnabled=e,this.oi.enqueueAndForget(()=>O(this,null,function*(){this.started&&(yield this.Ai())})))}Ai(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",e=>vY(e).put({clientId:this.clientId,updateTimeMs:Date.now(),networkEnabled:this.networkEnabled,inForeground:this.inForeground}).next(()=>{if(this.isPrimary)return this.gi(e).next(n=>{n||(this.isPrimary=!1,this.oi.enqueueRetryable(()=>this.Ii(!1)))})}).next(()=>this.pi(e)).next(n=>this.isPrimary&&!n?this.yi(e).next(()=>!1):!!n&&this.wi(e).next(()=>!0))).catch(e=>{if(f7(e))return Jn("IndexedDbPersistence","Failed to extend owner lease: ",e),this.isPrimary;if(!this.allowTabSynchronization)throw e;return Jn("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1}).then(e=>{this.isPrimary!==e&&this.oi.enqueueRetryable(()=>this.Ii(e)),this.isPrimary=e})}gi(e){return DV(e).get("owner").next(n=>tn.resolve(this.Si(n)))}bi(e){return vY(e).delete(this.clientId)}Di(){return O(this,null,function*(){if(this.isPrimary&&!this.Ci(this.Pi,18e5)){this.Pi=Date.now();let e=yield this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",n=>{let i=V1(n,"clientMetadata");return i.U().next(r=>{let s=this.vi(r,18e5),o=r.filter(a=>s.indexOf(a)===-1);return tn.forEach(o,a=>i.delete(a.clientId)).next(()=>o)})}).catch(()=>[]);if(this.di)for(let n of e)this.di.removeItem(this.Fi(n.clientId))}})}mi(){this.hi=this.oi.enqueueAfterDelay("client_metadata_refresh",4e3,()=>this.Ai().then(()=>this.Di()).then(()=>this.mi()))}Si(e){return!!e&&e.ownerId===this.clientId}pi(e){return this.ai?tn.resolve(!0):DV(e).get("owner").next(n=>{if(n!==null&&this.Ci(n.leaseTimestampMs,5e3)&&!this.Mi(n.ownerId)){if(this.Si(n)&&this.networkEnabled)return!0;if(!this.Si(n)){if(!n.allowTabSynchronization)throw new Un(dn.FAILED_PRECONDITION,t1e);return!1}}return!(!this.networkEnabled||!this.inForeground)||vY(e).U().next(i=>this.vi(i,5e3).find(r=>{if(this.clientId!==r.clientId){let s=!this.networkEnabled&&r.networkEnabled,o=!this.inForeground&&r.inForeground,a=this.networkEnabled===r.networkEnabled;if(s||o&&a)return!0}return!1})===void 0)}).next(n=>(this.isPrimary!==n&&Jn("IndexedDbPersistence",`Client ${n?"is":"is not"} eligible for a primary lease.`),n))}shutdown(){return O(this,null,function*(){this.qr=!1,this.xi(),this.hi&&(this.hi.cancel(),this.hi=null),this.Oi(),this.Ni(),yield this.Ei.runTransaction("shutdown","readwrite",["owner","clientMetadata"],e=>{let n=new OV(e,x4.oe);return this.yi(n).next(()=>this.bi(n))}),this.Ei.close(),this.Li()})}vi(e,n){return e.filter(i=>this.Ci(i.updateTimeMs,n)&&!this.Mi(i.clientId))}Bi(){return this.runTransaction("getActiveClients","readonly",e=>vY(e).U().next(n=>this.vi(n,18e5).map(i=>i.clientId)))}get started(){return this.qr}getMutationQueue(e,n){return $Y.lt(e,this.serializer,n,this.referenceDelegate)}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getIndexManager(e){return new Y1e(e,this.serializer.ct.databaseId)}getDocumentOverlayCache(e){return GY.lt(this.serializer,e)}getBundleCache(){return this.$r}runTransaction(e,n,i){Jn("IndexedDbPersistence","Starting transaction:",e);let r=n==="readonly"?"readonly":"readwrite",s=function(l){return l===16?CPt:l===15?AOe:l===14?IOe:l===13?kOe:l===12?_Pt:l===11?MOe:void Ws()}(this.ui),o;return this.Ei.runTransaction(e,r,s,a=>(o=new OV(a,this.kr?this.kr.next():x4.oe),n==="readwrite-primary"?this.gi(o).next(l=>!!l||this.pi(o)).next(l=>{if(!l)throw xm(`Failed to obtain primary lease for action '${e}'.`),this.isPrimary=!1,this.oi.enqueueRetryable(()=>this.Ii(!1)),new Un(dn.FAILED_PRECONDITION,SOe);return i(o)}).next(l=>this.wi(o).next(()=>l)):this.ki(o).next(()=>i(o)))).then(a=>(o.raiseOnCommittedEvent(),a))}ki(e){return DV(e).get("owner").next(n=>{if(n!==null&&this.Ci(n.leaseTimestampMs,5e3)&&!this.Mi(n.ownerId)&&!this.Si(n)&&!(this.ai||this.allowTabSynchronization&&n.allowTabSynchronization))throw new Un(dn.FAILED_PRECONDITION,t1e)})}wi(e){let n={ownerId:this.clientId,allowTabSynchronization:this.allowTabSynchronization,leaseTimestampMs:Date.now()};return DV(e).put("owner",n)}static D(){return s7.D()}yi(e){let n=DV(e);return n.get("owner").next(i=>this.Si(i)?(Jn("IndexedDbPersistence","Releasing primary lease."),n.delete("owner")):tn.resolve())}Ci(e,n){let i=Date.now();return!(e<i-n)&&(!(e>i)||(xm(`Detected an update time that is in the future: ${e} > ${i}`),!1))}Ri(){this.document!==null&&typeof this.document.addEventListener=="function"&&(this.li=()=>{this.oi.enqueueAndForget(()=>(this.inForeground=this.document.visibilityState==="visible",this.Ai()))},this.document.addEventListener("visibilitychange",this.li),this.inForeground=this.document.visibilityState==="visible")}Oi(){this.li&&(this.document.removeEventListener("visibilitychange",this.li),this.li=null)}Vi(){var e;typeof((e=this.window)===null||e===void 0?void 0:e.addEventListener)=="function"&&(this.ci=()=>{this.xi();let n=/(?:Version|Mobile)\/1[456]/;Zde()&&(navigator.appVersion.match(n)||navigator.userAgent.match(n))&&this.oi.enterRestrictedMode(!0),this.oi.enqueueAndForget(()=>this.shutdown())},this.window.addEventListener("pagehide",this.ci))}Ni(){this.ci&&(this.window.removeEventListener("pagehide",this.ci),this.ci=null)}Mi(e){var n;try{let i=((n=this.di)===null||n===void 0?void 0:n.getItem(this.Fi(e)))!==null;return Jn("IndexedDbPersistence",`Client '${e}' ${i?"is":"is not"} zombied in LocalStorage`),i}catch(i){return xm("IndexedDbPersistence","Failed to get zombied client id.",i),!1}}xi(){if(this.di)try{this.di.setItem(this.Fi(this.clientId),String(Date.now()))}catch(e){xm("Failed to set zombie client id.",e)}}Li(){if(this.di)try{this.di.removeItem(this.Fi(this.clientId))}catch{}}Fi(e){return`firestore_zombie_${this.persistenceKey}_${e}`}};h0e=class t{constructor(e,n,i,r){this.targetId=e,this.fromCache=n,this.qi=i,this.Qi=r}static Ki(e,n){let i=ul(),r=ul();for(let s of n.docChanges)switch(s.type){case 0:i=i.add(s.doc.key);break;case 1:r=r.add(s.doc.key)}return new t(e,n.fromCache,i,r)}};p0e=class{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}};XY=class{constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function(){return Zde()?8:TOe(kO())>0?6:4}()}initialize(e,n){this.zi=e,this.indexManager=n,this.$i=!0}getDocumentsMatchingQuery(e,n,i,r){let s={result:null};return this.ji(e,n).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.Hi(e,n,r,i).next(o=>{s.result=o})}).next(()=>{if(s.result)return;let o=new p0e;return this.Ji(e,n,o).next(a=>{if(s.result=a,this.Ui)return this.Yi(e,n,o,a.size)})}).next(()=>s.result)}Yi(e,n,i,r){return i.documentReadCount<this.Wi?(uI()<=L_.DEBUG&&Jn("QueryEngine","SDK will not create cache indexes for query:",hI(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Wi,"documents"),tn.resolve()):(uI()<=L_.DEBUG&&Jn("QueryEngine","Query:",hI(n),"scans",i.documentReadCount,"local documents and returns",r,"documents as results."),i.documentReadCount>this.Gi*r?(uI()<=L_.DEBUG&&Jn("QueryEngine","The SDK decides to create cache indexes for query:",hI(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,cg(n))):tn.resolve())}ji(e,n){if(RLe(n))return tn.resolve(null);let i=cg(n);return this.indexManager.getIndexType(e,i).next(r=>r===0?null:(n.limit!==null&&r===1&&(n=OY(n,null,"F"),i=cg(n)),this.indexManager.getDocumentsMatchingTarget(e,i).next(s=>{let o=ul(...s);return this.zi.getDocuments(e,o).next(a=>this.indexManager.getMinOffset(e,i).next(l=>{let c=this.Zi(n,a);return this.Xi(n,c,o,l.readTime)?this.ji(e,OY(n,null,"F")):this.es(e,c,n,l)}))})))}Hi(e,n,i,r){return RLe(n)||r.isEqual(Bo.min())?tn.resolve(null):this.zi.getDocuments(e,i).next(s=>{let o=this.Zi(n,s);return this.Xi(n,o,i,r)?tn.resolve(null):(uI()<=L_.DEBUG&&Jn("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),hI(n)),this.es(e,o,n,bOe(r,-1)).next(a=>a))})}Zi(e,n){let i=new Bu(UOe(e));return n.forEach((r,s)=>{sB(e,s)&&(i=i.add(s))}),i}Xi(e,n,i,r){if(e.limit===null)return!1;if(i.size!==n.size)return!0;let s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(r)>0)}Ji(e,n,i){return uI()<=L_.DEBUG&&Jn("QueryEngine","Using full collection scan to execute query:",hI(n)),this.zi.getDocumentsMatchingQuery(e,n,Bv.min(),i)}es(e,n,i,r){return this.zi.getDocumentsMatchingQuery(e,i,r).next(s=>(n.forEach(o=>{s=s.insert(o.key,o)}),s))}};m0e=class{constructor(e,n,i,r){this.persistence=e,this.ts=n,this.serializer=r,this.ns=new Ih(el),this.rs=new o5(s=>OT(s),nB),this.ss=new Map,this.os=e.getRemoteDocumentCache(),this.Qr=e.getTargetCache(),this.$r=e.getBundleCache(),this._s(i)}_s(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new YY(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.ns))}};JY=class t{constructor(e,n,i,r){this.user=e,this.batchId=n,this.state=i,this.error=r}static Es(e,n,i){let r=JSON.parse(i),s,o=typeof r=="object"&&["pending","acknowledged","rejected"].indexOf(r.state)!==-1&&(r.error===void 0||typeof r.error=="object");return o&&r.error&&(o=typeof r.error.message=="string"&&typeof r.error.code=="string",o&&(s=new Un(r.error.code,r.error.message))),o?new t(e,n,r.state,s):(xm("SharedClientState",`Failed to parse mutation state for ID '${n}': ${i}`),null)}ds(){let e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}},PV=class t{constructor(e,n,i){this.targetId=e,this.state=n,this.error=i}static Es(e,n){let i=JSON.parse(n),r,s=typeof i=="object"&&["not-current","current","rejected"].indexOf(i.state)!==-1&&(i.error===void 0||typeof i.error=="object");return s&&i.error&&(s=typeof i.error.message=="string"&&typeof i.error.code=="string",s&&(r=new Un(i.error.code,i.error.message))),s?new t(e,i.state,r):(xm("SharedClientState",`Failed to parse target state for ID '${e}': ${n}`),null)}ds(){let e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}},eq=class t{constructor(e,n){this.clientId=e,this.activeTargetIds=n}static Es(e,n){let i=JSON.parse(n),r=typeof i=="object"&&i.activeTargetIds instanceof Array,s=l2e();for(let o=0;r&&o<i.activeTargetIds.length;++o)r=DOe(i.activeTargetIds[o]),s=s.add(i.activeTargetIds[o]);return r?new t(e,s):(xm("SharedClientState",`Failed to parse client data for instance '${e}': ${n}`),null)}},f0e=class t{constructor(e,n){this.clientId=e,this.onlineState=n}static Es(e){let n=JSON.parse(e);return typeof n=="object"&&["Unknown","Online","Offline"].indexOf(n.onlineState)!==-1&&typeof n.clientId=="string"?new t(n.clientId,n.onlineState):(xm("SharedClientState",`Failed to parse online state: ${e}`),null)}},qV=class{constructor(){this.activeTargetIds=l2e()}As(e){this.activeTargetIds=this.activeTargetIds.add(e)}Rs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}ds(){let e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}},RV=class{constructor(e,n,i,r,s){this.window=e,this.oi=n,this.persistenceKey=i,this.Vs=r,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.fs=this.gs.bind(this),this.ps=new Ih(el),this.started=!1,this.ys=[];let o=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=s,this.ws=aOe(this.persistenceKey,this.Vs),this.Ss=function(l){return`firestore_sequence_number_${l}`}(this.persistenceKey),this.ps=this.ps.insert(this.Vs,new qV),this.bs=new RegExp(`^firestore_clients_${o}_([^_]*)$`),this.Ds=new RegExp(`^firestore_mutations_${o}_(\\d+)(?:_(.*))?$`),this.Cs=new RegExp(`^firestore_targets_${o}_(\\d+)$`),this.vs=function(l){return`firestore_online_state_${l}`}(this.persistenceKey),this.Fs=function(l){return`firestore_bundle_loaded_v2_${l}`}(this.persistenceKey),this.window.addEventListener("storage",this.fs)}static D(e){return!(!e||!e.localStorage)}start(){return O(this,null,function*(){let e=yield this.syncEngine.Bi();for(let i of e){if(i===this.Vs)continue;let r=this.getItem(aOe(this.persistenceKey,i));if(r){let s=eq.Es(i,r);s&&(this.ps=this.ps.insert(s.clientId,s))}}this.Ms();let n=this.storage.getItem(this.vs);if(n){let i=this.xs(n);i&&this.Os(i)}for(let i of this.ys)this.gs(i);this.ys=[],this.window.addEventListener("pagehide",()=>this.shutdown()),this.started=!0})}writeSequenceNumber(e){this.setItem(this.Ss,JSON.stringify(e))}getAllActiveQueryTargets(){return this.Ns(this.ps)}isActiveQueryTarget(e){let n=!1;return this.ps.forEach((i,r)=>{r.activeTargetIds.has(e)&&(n=!0)}),n}addPendingMutation(e){this.Ls(e,"pending")}updateMutationState(e,n,i){this.Ls(e,n,i),this.Bs(e)}addLocalQueryTarget(e){let n="not-current";if(this.isActiveQueryTarget(e)){let i=this.storage.getItem(i1e(this.persistenceKey,e));if(i){let r=PV.Es(e,i);r&&(n=r.state)}}return this.ks.As(e),this.Ms(),n}removeLocalQueryTarget(e){this.ks.Rs(e),this.Ms()}isLocalQueryTarget(e){return this.ks.activeTargetIds.has(e)}clearQueryState(e){this.removeItem(i1e(this.persistenceKey,e))}updateQueryState(e,n,i){this.qs(e,n,i)}handleUserChange(e,n,i){n.forEach(r=>{this.Bs(r)}),this.currentUser=e,i.forEach(r=>{this.addPendingMutation(r)})}setOnlineState(e){this.Qs(e)}notifyBundleLoaded(e){this.Ks(e)}shutdown(){this.started&&(this.window.removeEventListener("storage",this.fs),this.removeItem(this.ws),this.started=!1)}getItem(e){let n=this.storage.getItem(e);return Jn("SharedClientState","READ",e,n),n}setItem(e,n){Jn("SharedClientState","SET",e,n),this.storage.setItem(e,n)}removeItem(e){Jn("SharedClientState","REMOVE",e),this.storage.removeItem(e)}gs(e){let n=e;if(n.storageArea===this.storage){if(Jn("SharedClientState","EVENT",n.key,n.newValue),n.key===this.ws)return void xm("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.oi.enqueueRetryable(()=>O(this,null,function*(){if(this.started){if(n.key!==null){if(this.bs.test(n.key)){if(n.newValue==null){let i=this.$s(n.key);return this.Us(i,null)}{let i=this.Ws(n.key,n.newValue);if(i)return this.Us(i.clientId,i)}}else if(this.Ds.test(n.key)){if(n.newValue!==null){let i=this.Gs(n.key,n.newValue);if(i)return this.zs(i)}}else if(this.Cs.test(n.key)){if(n.newValue!==null){let i=this.js(n.key,n.newValue);if(i)return this.Hs(i)}}else if(n.key===this.vs){if(n.newValue!==null){let i=this.xs(n.newValue);if(i)return this.Os(i)}}else if(n.key===this.Ss){let i=function(s){let o=x4.oe;if(s!=null)try{let a=JSON.parse(s);To(typeof a=="number"),o=a}catch(a){xm("SharedClientState","Failed to read sequence number from WebStorage",a)}return o}(n.newValue);i!==x4.oe&&this.sequenceNumberHandler(i)}else if(n.key===this.Fs){let i=this.Js(n.newValue);yield Promise.all(i.map(r=>this.syncEngine.Ys(r)))}}}else this.ys.push(n)}))}}get ks(){return this.ps.get(this.Vs)}Ms(){this.setItem(this.ws,this.ks.ds())}Ls(e,n,i){let r=new JY(this.currentUser,e,n,i),s=lOe(this.persistenceKey,this.currentUser,e);this.setItem(s,r.ds())}Bs(e){let n=lOe(this.persistenceKey,this.currentUser,e);this.removeItem(n)}Qs(e){let n={clientId:this.Vs,onlineState:e};this.storage.setItem(this.vs,JSON.stringify(n))}qs(e,n,i){let r=i1e(this.persistenceKey,e),s=new PV(e,n,i);this.setItem(r,s.ds())}Ks(e){let n=JSON.stringify(Array.from(e));this.setItem(this.Fs,n)}$s(e){let n=this.bs.exec(e);return n?n[1]:null}Ws(e,n){let i=this.$s(e);return eq.Es(i,n)}Gs(e,n){let i=this.Ds.exec(e),r=Number(i[1]),s=i[2]!==void 0?i[2]:null;return JY.Es(new hf(s),r,n)}js(e,n){let i=this.Cs.exec(e),r=Number(i[1]);return PV.Es(r,n)}xs(e){return f0e.Es(e)}Js(e){return JSON.parse(e)}zs(e){return O(this,null,function*(){if(e.user.uid===this.currentUser.uid)return this.syncEngine.Zs(e.batchId,e.state,e.error);Jn("SharedClientState",`Ignoring mutation for non-active user ${e.user.uid}`)})}Hs(e){return this.syncEngine.Xs(e.targetId,e.state,e.error)}Us(e,n){let i=n?this.ps.insert(e,n):this.ps.remove(e),r=this.Ns(this.ps),s=this.Ns(i),o=[],a=[];return s.forEach(l=>{r.has(l)||o.push(l)}),r.forEach(l=>{s.has(l)||a.push(l)}),this.syncEngine.eo(o,a).then(()=>{this.ps=i})}Os(e){this.ps.get(e.clientId)&&this.onlineStateHandler(e.onlineState)}Ns(e){let n=l2e();return e.forEach((i,r)=>{n=n.unionWith(r.activeTargetIds)}),n}},tq=class{constructor(){this.no=new qV,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,i){}addLocalQueryTarget(e){return this.no.As(e),this.ro[e]||"not-current"}updateQueryState(e,n,i){this.ro[e]=n}removeLocalQueryTarget(e){this.no.Rs(e)}isLocalQueryTarget(e){return this.no.activeTargetIds.has(e)}clearQueryState(e){delete this.ro[e]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(e){return this.no.activeTargetIds.has(e)}start(){return this.no=new qV,Promise.resolve()}handleUserChange(e,n,i){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}};g0e=class{io(e){}shutdown(){}};iq=class{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(e){this.uo.push(e)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){Jn("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(let e of this.uo)e(0)}ao(){Jn("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(let e of this.uo)e(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}};yY=null;rRt={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};v0e=class{constructor(e){this.lo=e.lo,this.ho=e.ho}Po(e){this.Io=e}To(e){this.Eo=e}Ao(e){this.Ro=e}onMessage(e){this.Vo=e}close(){this.ho()}send(e){this.lo(e)}mo(){this.Io()}fo(){this.Eo()}po(e){this.Ro(e)}yo(e){this.Vo(e)}};a2="WebChannelConnection",y0e=class extends class{constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;let i=n.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.wo=i+"://"+n.host,this.So=`projects/${r}/databases/${s}`,this.bo=this.databaseId.database==="(default)"?`project_id=${r}`:`project_id=${r}&database_id=${s}`}get Do(){return!1}Co(n,i,r,s,o){let a=n1e(),l=this.vo(n,i.toUriEncodedString());Jn("RestConnection",`Sending RPC '${n}' ${a}:`,l,r);let c={"google-cloud-resource-prefix":this.So,"x-goog-request-params":this.bo};return this.Fo(c,s,o),this.Mo(n,l,c,r).then(d=>(Jn("RestConnection",`Received RPC '${n}' ${a}: `,d),d),d=>{throw Vv("RestConnection",`RPC '${n}' ${a} failed with error: `,d,"url: ",l,"request:",r),d})}xo(n,i,r,s,o,a){return this.Co(n,i,r,s,o)}Fo(n,i,r){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+NI}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),i&&i.headers.forEach((s,o)=>n[o]=s),r&&r.headers.forEach((s,o)=>n[o]=s)}vo(n,i){let r=rRt[n];return`${this.wo}/v1/${i}:${r}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Mo(e,n,i,r){let s=n1e();return new Promise((o,a)=>{let l=new Yfe;l.setWithCredentials(!0),l.listenOnce(Zfe.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case bV.NO_ERROR:let d=l.getResponseJson();Jn(a2,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(d)),o(d);break;case bV.TIMEOUT:Jn(a2,`RPC '${e}' ${s} timed out`),a(new Un(dn.DEADLINE_EXCEEDED,"Request time out"));break;case bV.HTTP_ERROR:let u=l.getStatus();if(Jn(a2,`RPC '${e}' ${s} failed with status:`,u,"response text:",l.getResponseText()),u>0){let m=l.getResponseJson();Array.isArray(m)&&(m=m[0]);let f=m?.error;if(f&&f.status&&f.message){let _=function(D){let E=D.toLowerCase().replace(/_/g,"-");return Object.values(dn).indexOf(E)>=0?E:dn.UNKNOWN}(f.status);a(new Un(_,f.message))}else a(new Un(dn.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new Un(dn.UNAVAILABLE,"Connection failed."));break;default:Ws()}}finally{Jn(a2,`RPC '${e}' ${s} completed.`)}});let c=JSON.stringify(r);Jn(a2,`RPC '${e}' ${s} sending request:`,r),l.send(n,"POST",c,i,15)})}Oo(e,n,i){let r=n1e(),s=[this.wo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=Jfe(),a=Qfe(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},c=this.longPollingOptions.timeoutSeconds;c!==void 0&&(l.longPollingTimeout=Math.round(1e3*c)),this.useFetchStreams&&(l.xmlHttpFactory=new qfe({})),this.Fo(l.initMessageHeaders,n,i),l.encodeInitMessageHeaders=!0;let d=s.join("");Jn(a2,`Creating RPC '${e}' stream ${r}: ${d}`,l);let u=o.createWebChannel(d,l),m=!1,f=!1,_=new v0e({lo:D=>{f?Jn(a2,`Not sending because RPC '${e}' stream ${r} is closed:`,D):(m||(Jn(a2,`Opening RPC '${e}' stream ${r} transport.`),u.open(),m=!0),Jn(a2,`RPC '${e}' stream ${r} sending:`,D),u.send(D))},ho:()=>u.close()}),x=(D,E,M)=>{D.listen(E,I=>{try{M(I)}catch(z){setTimeout(()=>{throw z},0)}})};return x(u,oI.EventType.OPEN,()=>{f||(Jn(a2,`RPC '${e}' stream ${r} transport opened.`),_.mo())}),x(u,oI.EventType.CLOSE,()=>{f||(f=!0,Jn(a2,`RPC '${e}' stream ${r} transport closed`),_.po())}),x(u,oI.EventType.ERROR,D=>{f||(f=!0,Vv(a2,`RPC '${e}' stream ${r} transport errored:`,D),_.po(new Un(dn.UNAVAILABLE,"The operation could not be completed")))}),x(u,oI.EventType.MESSAGE,D=>{var E;if(!f){let M=D.data[0];To(!!M);let I=M,z=I.error||((E=I[0])===null||E===void 0?void 0:E.error);if(z){Jn(a2,`RPC '${e}' stream ${r} received error:`,z);let G=z.status,A=function(ne){let pe=df[ne];if(pe!==void 0)return rNe(pe)}(G),Y=z.message;A===void 0&&(A=dn.INTERNAL,Y="Unknown error status: "+G+" with message "+z.message),f=!0,_.po(new Un(A,Y)),u.close()}else Jn(a2,`RPC '${e}' stream ${r} received:`,M),_.yo(M)}}),x(a,Xfe.STAT_EVENT,D=>{D.stat===mY.PROXY?Jn(a2,`RPC '${e}' stream ${r} detected buffering proxy`):D.stat===mY.NOPROXY&&Jn(a2,`RPC '${e}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{_.fo()},0),_}};ZV=class{constructor(e,n,i=1e3,r=1.5,s=6e4){this.oi=e,this.timerId=n,this.No=i,this.Lo=r,this.Bo=s,this.ko=0,this.qo=null,this.Qo=Date.now(),this.reset()}reset(){this.ko=0}Ko(){this.ko=this.Bo}$o(e){this.cancel();let n=Math.floor(this.ko+this.Uo()),i=Math.max(0,Date.now()-this.Qo),r=Math.max(0,n-i);r>0&&Jn("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.ko} ms, delay with jitter: ${n} ms, last attempt: ${i} ms ago)`),this.qo=this.oi.enqueueAfterDelay(this.timerId,r,()=>(this.Qo=Date.now(),e())),this.ko*=this.Lo,this.ko<this.No&&(this.ko=this.No),this.ko>this.Bo&&(this.ko=this.Bo)}Wo(){this.qo!==null&&(this.qo.skipDelay(),this.qo=null)}cancel(){this.qo!==null&&(this.qo.cancel(),this.qo=null)}Uo(){return(Math.random()-.5)*this.ko}};nq=class{constructor(e,n,i,r,s,o,a,l){this.oi=e,this.Go=i,this.zo=r,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=l,this.state=0,this.jo=0,this.Ho=null,this.Jo=null,this.stream=null,this.Yo=new ZV(e,n)}Zo(){return this.state===1||this.state===5||this.Xo()}Xo(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.e_()}stop(){return O(this,null,function*(){this.Zo()&&(yield this.close(0))})}t_(){this.state=0,this.Yo.reset()}n_(){this.Xo()&&this.Ho===null&&(this.Ho=this.oi.enqueueAfterDelay(this.Go,6e4,()=>this.r_()))}i_(e){this.s_(),this.stream.send(e)}r_(){return O(this,null,function*(){if(this.Xo())return this.close(0)})}s_(){this.Ho&&(this.Ho.cancel(),this.Ho=null)}o_(){this.Jo&&(this.Jo.cancel(),this.Jo=null)}close(e,n){return O(this,null,function*(){this.s_(),this.o_(),this.Yo.cancel(),this.jo++,e!==4?this.Yo.reset():n&&n.code===dn.RESOURCE_EXHAUSTED?(xm(n.toString()),xm("Using maximum backoff delay to prevent overloading the backend."),this.Yo.Ko()):n&&n.code===dn.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.__(),this.stream.close(),this.stream=null),this.state=e,yield this.listener.Ao(n)})}__(){}auth(){this.state=1;let e=this.a_(this.jo),n=this.jo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([i,r])=>{this.jo===n&&this.u_(i,r)},i=>{e(()=>{let r=new Un(dn.UNKNOWN,"Fetching auth token failed: "+i.message);return this.c_(r)})})}u_(e,n){let i=this.a_(this.jo);this.stream=this.l_(e,n),this.stream.Po(()=>{i(()=>this.listener.Po())}),this.stream.To(()=>{i(()=>(this.state=2,this.Jo=this.oi.enqueueAfterDelay(this.zo,1e4,()=>(this.Xo()&&(this.state=3),Promise.resolve())),this.listener.To()))}),this.stream.Ao(r=>{i(()=>this.c_(r))}),this.stream.onMessage(r=>{i(()=>this.onMessage(r))})}e_(){this.state=5,this.Yo.$o(()=>O(this,null,function*(){this.state=0,this.start()}))}c_(e){return Jn("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}a_(e){return n=>{this.oi.enqueueAndForget(()=>this.jo===e?n():(Jn("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}},_0e=class extends nq{constructor(e,n,i,r,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,i,r,o),this.serializer=s}l_(e,n){return this.connection.Oo("Listen",e,n)}onMessage(e){this.Yo.reset();let n=GPt(this.serializer,e),i=function(s){if(!("targetChange"in s))return Bo.min();let o=s.targetChange;return o.targetIds&&o.targetIds.length?Bo.min():o.readTime?wm(o.readTime):Bo.min()}(e);return this.listener.h_(n,i)}P_(e){let n={};n.database=V1e(this.serializer),n.addTarget=function(s,o){let a,l=o.target;if(a=FY(l)?{documents:hNe(s,l)}:{query:pNe(s,l)._t},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){a.resumeToken=oNe(s,o.resumeToken);let c=O1e(s,o.expectedCount);c!==null&&(a.expectedCount=c)}else if(o.snapshotVersion.compareTo(Bo.min())>0){a.readTime=DI(s,o.snapshotVersion.toTimestamp());let c=O1e(s,o.expectedCount);c!==null&&(a.expectedCount=c)}return a}(this.serializer,e);let i=UPt(this.serializer,e);i&&(n.labels=i),this.i_(n)}I_(e){let n={};n.database=V1e(this.serializer),n.removeTarget=e,this.i_(n)}},C0e=class extends nq{constructor(e,n,i,r,s,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,i,r,o),this.serializer=s,this.T_=!1}get E_(){return this.T_}start(){this.T_=!1,this.lastStreamToken=void 0,super.start()}__(){this.T_&&this.d_([])}l_(e,n){return this.connection.Oo("Write",e,n)}onMessage(e){if(To(!!e.streamToken),this.lastStreamToken=e.streamToken,this.T_){this.Yo.reset();let n=WPt(e.writeResults,e.commitTime),i=wm(e.commitTime);return this.listener.A_(i,n)}return To(!e.writeResults||e.writeResults.length===0),this.T_=!0,this.listener.R_()}V_(){let e={};e.database=V1e(this.serializer),this.i_(e)}d_(e){let n={streamToken:this.lastStreamToken,writes:e.map(i=>$V(this.serializer,i))};this.i_(n)}};x0e=class extends class{}{constructor(e,n,i,r){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=i,this.serializer=r,this.m_=!1}f_(){if(this.m_)throw new Un(dn.FAILED_PRECONDITION,"The client has already been terminated.")}Co(e,n,i,r){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Co(e,N1e(n,i),r,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===dn.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Un(dn.UNKNOWN,s.toString())})}xo(e,n,i,r,s){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,a])=>this.connection.xo(e,N1e(n,i),r,o,a,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===dn.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Un(dn.UNKNOWN,o.toString())})}terminate(){this.m_=!0,this.connection.terminate()}},b0e=class{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.g_=0,this.p_=null,this.y_=!0}w_(){this.g_===0&&(this.S_("Unknown"),this.p_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.p_=null,this.b_("Backend didn't respond within 10 seconds."),this.S_("Offline"),Promise.resolve())))}D_(e){this.state==="Online"?this.S_("Unknown"):(this.g_++,this.g_>=1&&(this.C_(),this.b_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.S_("Offline")))}set(e){this.C_(),this.g_=0,e==="Online"&&(this.y_=!1),this.S_(e)}S_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}b_(e){let n=`Could not reach Cloud Firestore backend. ${e}
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.y_?(xm(n),this.y_=!1):Jn("OnlineStateTracker",n)}C_(){this.p_!==null&&(this.p_.cancel(),this.p_=null)}};w0e=class{constructor(e,n,i,r,s){this.localStore=e,this.datastore=n,this.asyncQueue=i,this.remoteSyncer={},this.v_=[],this.F_=new Map,this.M_=new Set,this.x_=[],this.O_=s,this.O_.io(o=>{i.enqueueAndForget(()=>O(this,null,function*(){g7(this)&&(Jn("RemoteStore","Restarting streams for network reachability change."),yield function(l){return O(this,null,function*(){let c=ms(l);c.M_.add(4),yield BI(c),c.N_.set("Unknown"),c.M_.delete(4),yield aB(c)})}(this))}))}),this.N_=new b0e(i,r)}};T0e=class t{constructor(e,n,i,r,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=i,this.op=r,this.removalCallback=s,this.deferred=new pf,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,i,r,s){let o=Date.now()+i,a=new t(e,n,o,r,s);return a.start(i),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new Un(dn.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}};sq=class t{constructor(e){this.comparator=e?(n,i)=>e(n,i)||hs.comparator(n.key,i.key):(n,i)=>hs.comparator(n.key,i.key),this.keyedMap=EV(),this.sortedSet=new Ih(this.comparator)}static emptySet(e){return new t(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,i)=>(e(n),!1))}add(e){let n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){let n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof t)||this.size!==e.size)return!1;let n=this.sortedSet.getIterator(),i=e.sortedSet.getIterator();for(;n.hasNext();){let r=n.getNext().key,s=i.getNext().key;if(!r.isEqual(s))return!1}return!0}toString(){let e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet (
  `+e.join(`  
`)+`
)`}copy(e,n){let i=new t;return i.comparator=this.comparator,i.keyedMap=e,i.sortedSet=n,i}};oq=class{constructor(){this.q_=new Ih(hs.comparator)}track(e){let n=e.doc.key,i=this.q_.get(n);i?e.type!==0&&i.type===3?this.q_=this.q_.insert(n,e):e.type===3&&i.type!==1?this.q_=this.q_.insert(n,{type:i.type,doc:e.doc}):e.type===2&&i.type===2?this.q_=this.q_.insert(n,{type:2,doc:e.doc}):e.type===2&&i.type===0?this.q_=this.q_.insert(n,{type:0,doc:e.doc}):e.type===1&&i.type===0?this.q_=this.q_.remove(n):e.type===1&&i.type===2?this.q_=this.q_.insert(n,{type:1,doc:i.doc}):e.type===0&&i.type===1?this.q_=this.q_.insert(n,{type:2,doc:e.doc}):Ws():this.q_=this.q_.insert(n,e)}Q_(){let e=[];return this.q_.inorderTraversal((n,i)=>{e.push(i)}),e}},PI=class t{constructor(e,n,i,r,s,o,a,l,c){this.query=e,this.docs=n,this.oldDocs=i,this.docChanges=r,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=l,this.hasCachedResults=c}static fromInitialDocuments(e,n,i,r,s){let o=[];return n.forEach(a=>{o.push({type:0,doc:a})}),new t(e,n,sq.emptySet(n),o,i,r,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&rB(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let n=this.docChanges,i=e.docChanges;if(n.length!==i.length)return!1;for(let r=0;r<n.length;r++)if(n[r].type!==i[r].type||!n[r].doc.isEqual(i[r].doc))return!1;return!0}};D0e=class{constructor(){this.K_=void 0,this.U_=[]}W_(){return this.U_.some(e=>e.G_())}},E0e=class{constructor(){this.queries=new o5(e=>GOe(e),rB),this.onlineState="Unknown",this.z_=new Set}};(dOe=M0e||(M0e={})).J_="default",dOe.Cache="cache";XV=class{constructor(e,n,i){this.query=e,this.Y_=n,this.Z_=!1,this.X_=null,this.onlineState="Unknown",this.options=i||{}}H_(e){if(!this.options.includeMetadataChanges){let i=[];for(let r of e.docChanges)r.type!==3&&i.push(r);e=new PI(e.query,e.docs,e.oldDocs,i,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.Z_?this.ea(e)&&(this.Y_.next(e),n=!0):this.ta(e,this.onlineState)&&(this.na(e),n=!0),this.X_=e,n}onError(e){this.Y_.error(e)}j_(e){this.onlineState=e;let n=!1;return this.X_&&!this.Z_&&this.ta(this.X_,e)&&(this.na(this.X_),n=!0),n}ta(e,n){if(!e.fromCache||!this.G_())return!0;let i=n!=="Offline";return(!this.options.ra||!i)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}ea(e){if(e.docChanges.length>0)return!0;let n=this.X_&&this.X_.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}na(e){e=PI.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Z_=!0,this.Y_.next(e)}G_(){return this.options.source!==M0e.Cache}};k0e=class{constructor(e,n){this.ia=e,this.byteLength=n}sa(){return"metadata"in this.ia}};aq=class{constructor(e){this.serializer=e}Ps(e){return i5(this.serializer,e)}Is(e){return e.metadata.exists?uNe(this.serializer,e.document,!1):mf.newNoDocument(this.Ps(e.metadata.name),this.Ts(e.metadata.readTime))}Ts(e){return wm(e)}},I0e=class{constructor(e,n,i){this.oa=e,this.localStore=n,this.serializer=i,this.queries=[],this.documents=[],this.collectionGroups=new Set,this.progress=VNe(e)}_a(e){this.progress.bytesLoaded+=e.byteLength;let n=this.progress.documentsLoaded;if(e.ia.namedQuery)this.queries.push(e.ia.namedQuery);else if(e.ia.documentMetadata){this.documents.push({metadata:e.ia.documentMetadata}),e.ia.documentMetadata.exists||++n;let i=Fc.fromString(e.ia.documentMetadata.name);this.collectionGroups.add(i.get(i.length-2))}else e.ia.document&&(this.documents[this.documents.length-1].document=e.ia.document,++n);return n!==this.progress.documentsLoaded?(this.progress.documentsLoaded=n,Object.assign({},this.progress)):null}aa(e){let n=new Map,i=new aq(this.serializer);for(let r of e)if(r.metadata.queries){let s=i.Ps(r.metadata.name);for(let o of r.metadata.queries){let a=(n.get(o)||ul()).add(s);n.set(o,a)}}return n}complete(){return O(this,null,function*(){let e=yield iRt(this.localStore,new aq(this.serializer),this.documents,this.oa.id),n=this.aa(this.documents);for(let i of this.queries)yield nRt(this.localStore,i,n.get(i.name));return this.progress.taskState="Success",{progress:this.progress,ua:this.collectionGroups,ca:e}})}};lq=class{constructor(e){this.key=e}},cq=class{constructor(e){this.key=e}},dq=class{constructor(e,n){this.query=e,this.la=n,this.ha=null,this.hasCachedResults=!1,this.current=!1,this.Pa=ul(),this.mutatedKeys=ul(),this.Ia=UOe(e),this.Ta=new sq(this.Ia)}get Ea(){return this.la}da(e,n){let i=n?n.Aa:new oq,r=n?n.Ta:this.Ta,s=n?n.mutatedKeys:this.mutatedKeys,o=r,a=!1,l=this.query.limitType==="F"&&r.size===this.query.limit?r.last():null,c=this.query.limitType==="L"&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal((d,u)=>{let m=r.get(d),f=sB(this.query,u)?u:null,_=!!m&&this.mutatedKeys.has(m.key),x=!!f&&(f.hasLocalMutations||this.mutatedKeys.has(f.key)&&f.hasCommittedMutations),D=!1;m&&f?m.data.isEqual(f.data)?_!==x&&(i.track({type:3,doc:f}),D=!0):this.Ra(m,f)||(i.track({type:2,doc:f}),D=!0,(l&&this.Ia(f,l)>0||c&&this.Ia(f,c)<0)&&(a=!0)):!m&&f?(i.track({type:0,doc:f}),D=!0):m&&!f&&(i.track({type:1,doc:m}),D=!0,(l||c)&&(a=!0)),D&&(f?(o=o.add(f),s=x?s.add(d):s.delete(d)):(o=o.delete(d),s=s.delete(d)))}),this.query.limit!==null)for(;o.size>this.query.limit;){let d=this.query.limitType==="F"?o.last():o.first();o=o.delete(d.key),s=s.delete(d.key),i.track({type:1,doc:d})}return{Ta:o,Aa:i,Xi:a,mutatedKeys:s}}Ra(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,i,r){let s=this.Ta;this.Ta=e.Ta,this.mutatedKeys=e.mutatedKeys;let o=e.Aa.Q_();o.sort((d,u)=>function(f,_){let x=D=>{switch(D){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Ws()}};return x(f)-x(_)}(d.type,u.type)||this.Ia(d.doc,u.doc)),this.Va(i),r=r!=null&&r;let a=n&&!r?this.ma():[],l=this.Pa.size===0&&this.current&&!r?1:0,c=l!==this.ha;return this.ha=l,o.length!==0||c?{snapshot:new PI(this.query,e.Ta,s,o,e.mutatedKeys,l===0,c,!1,!!i&&i.resumeToken.approximateByteSize()>0),fa:a}:{fa:a}}j_(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({Ta:this.Ta,Aa:new oq,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{fa:[]}}ga(e){return!this.la.has(e)&&!!this.Ta.has(e)&&!this.Ta.get(e).hasLocalMutations}Va(e){e&&(e.addedDocuments.forEach(n=>this.la=this.la.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.la=this.la.delete(n)),this.current=e.current)}ma(){if(!this.current)return[];let e=this.Pa;this.Pa=ul(),this.Ta.forEach(i=>{this.ga(i.key)&&(this.Pa=this.Pa.add(i.key))});let n=[];return e.forEach(i=>{this.Pa.has(i)||n.push(new cq(i))}),this.Pa.forEach(i=>{e.has(i)||n.push(new lq(i))}),n}pa(e){this.la=e.hs,this.Pa=ul();let n=this.da(e.documents);return this.applyChanges(n,!0)}ya(){return PI.fromInitialDocuments(this.query,this.Ta,this.mutatedKeys,this.ha===0,this.hasCachedResults)}},A0e=class{constructor(e,n,i){this.query=e,this.targetId=n,this.view=i}},P0e=class{constructor(e){this.key=e,this.wa=!1}},R0e=class{constructor(e,n,i,r,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=i,this.sharedClientState=r,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Sa={},this.ba=new o5(a=>GOe(a),rB),this.Da=new Map,this.Ca=new Set,this.va=new Ih(hs.comparator),this.Fa=new Map,this.Ma=new YV,this.xa={},this.Oa=new Map,this.Na=MI.Ln(),this.onlineState="Unknown",this.La=void 0}get isPrimaryClient(){return this.La===!0}};QV=class{constructor(){this.synchronizeTabs=!1}initialize(e){return O(this,null,function*(){this.serializer=oB(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),yield this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)})}createGarbageCollectionScheduler(e,n){return null}createIndexBackfillerScheduler(e,n){return null}createLocalStore(e){return TNe(this.persistence,new XY,e.initialUser,this.serializer)}createPersistence(e){return new qY(ZY.Hr,this.serializer)}createSharedClientState(e){return new tq}terminate(){return O(this,null,function*(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),yield this.persistence.shutdown()})}},uq=class t extends QV{constructor(e,n,i){super(),this.Qa=e,this.cacheSizeBytes=n,this.forceOwnership=i,this.synchronizeTabs=!1}initialize(e){return O(this,null,function*(){yield py(t.prototype,this,"initialize").call(this,e),yield this.Qa.initialize(this,e),yield w2e(this.Qa.syncEngine),yield zI(this.Qa.remoteStore),yield this.persistence.fi(()=>(this.gcScheduler&&!this.gcScheduler.started&&this.gcScheduler.start(),this.indexBackfillerScheduler&&!this.indexBackfillerScheduler.started&&this.indexBackfillerScheduler.start(),Promise.resolve()))})}createLocalStore(e){return TNe(this.persistence,new XY,e.initialUser,this.serializer)}createGarbageCollectionScheduler(e,n){let i=this.persistence.referenceDelegate.garbageCollector;return new X1e(i,e.asyncQueue,n)}createIndexBackfillerScheduler(e,n){let i=new f1e(n,this.persistence);return new m1e(e.asyncQueue,i)}createPersistence(e){let n=h2e(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),i=this.cacheSizeBytes!==void 0?Nv.withCacheSize(this.cacheSizeBytes):Nv.DEFAULT;return new u0e(this.synchronizeTabs,n,e.clientId,i,e.asyncQueue,PNe(),wY(),this.serializer,this.sharedClientState,!!this.forceOwnership)}createSharedClientState(e){return new tq}},L0e=class t extends uq{constructor(e,n){super(e,n,!1),this.Qa=e,this.cacheSizeBytes=n,this.synchronizeTabs=!0}initialize(e){return O(this,null,function*(){yield py(t.prototype,this,"initialize").call(this,e);let n=this.Qa.syncEngine;this.sharedClientState instanceof RV&&(this.sharedClientState.syncEngine={Zs:ARt.bind(null,n),Xs:FRt.bind(null,n),eo:LRt.bind(null,n),Bi:RRt.bind(null,n),Ys:IRt.bind(null,n)},yield this.sharedClientState.start()),yield this.persistence.fi(i=>O(this,null,function*(){yield PRt(this.Qa.syncEngine,i),this.gcScheduler&&(i&&!this.gcScheduler.started?this.gcScheduler.start():i||this.gcScheduler.stop()),this.indexBackfillerScheduler&&(i&&!this.indexBackfillerScheduler.started?this.indexBackfillerScheduler.start():i||this.indexBackfillerScheduler.stop())}))})}createSharedClientState(e){let n=PNe();if(!RV.D(n))throw new Un(dn.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");let i=h2e(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new RV(n,e.asyncQueue,i,e.clientId,e.initialUser)}},JV=class{initialize(e,n){return O(this,null,function*(){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=i=>uOe(this.syncEngine,i,1),this.remoteStore.remoteSyncer.handleCredentialChange=ERt.bind(null,this.syncEngine),yield S0e(this.remoteStore,this.syncEngine.isPrimaryClient))})}createEventManager(e){return function(){return new E0e}()}createDatastore(e){let n=oB(e.databaseInfo.databaseId),i=function(s){return new y0e(s)}(e.databaseInfo);return function(s,o,a,l){return new x0e(s,o,a,l)}(e.authCredentials,e.appCheckCredentials,i,n)}createRemoteStore(e){return function(i,r,s,o,a){return new w0e(i,r,s,o,a)}(this.localStore,this.datastore,e.asyncQueue,n=>uOe(this.syncEngine,n,0),function(){return iq.D()?new iq:new g0e}())}createSyncEngine(e,n){return function(r,s,o,a,l,c,d){let u=new R0e(r,s,o,a,l,c);return d&&(u.La=!0),u}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}terminate(){return O(this,null,function*(){var e;yield function(i){return O(this,null,function*(){let r=ms(i);Jn("RemoteStore","RemoteStore shutting down."),r.M_.add(5),yield BI(r),r.O_.shutdown(),r.N_.set("Unknown")})}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate()})}};FI=class{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ka(this.observer.next,e)}error(e){this.observer.error?this.Ka(this.observer.error,e):xm("Uncaught Error in snapshot listener:",e.toString())}$a(){this.muted=!0}Ka(e,n){this.muted||setTimeout(()=>{this.muted||e(n)},0)}};O0e=class{constructor(e,n){this.Ua=e,this.serializer=n,this.metadata=new pf,this.buffer=new Uint8Array,this.Wa=function(){return new TextDecoder("utf-8")}(),this.Ga().then(i=>{i&&i.sa()?this.metadata.resolve(i.ia.metadata):this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is
             ${JSON.stringify(i?.ia)}`))},i=>this.metadata.reject(i))}close(){return this.Ua.cancel()}getMetadata(){return O(this,null,function*(){return this.metadata.promise})}qa(){return O(this,null,function*(){return yield this.getMetadata(),this.Ga()})}Ga(){return O(this,null,function*(){let e=yield this.za();if(e===null)return null;let n=this.Wa.decode(e),i=Number(n);isNaN(i)&&this.ja(`length string (${n}) is not valid number`);let r=yield this.Ha(i);return new k0e(JSON.parse(r),e.length+i)})}Ja(){return this.buffer.findIndex(e=>e===123)}za(){return O(this,null,function*(){for(;this.Ja()<0&&!(yield this.Ya()););if(this.buffer.length===0)return null;let e=this.Ja();e<0&&this.ja("Reached the end of bundle when a length string is expected.");let n=this.buffer.slice(0,e);return this.buffer=this.buffer.slice(e),n})}Ha(e){return O(this,null,function*(){for(;this.buffer.length<e;)(yield this.Ya())&&this.ja("Reached the end of bundle when more is expected.");let n=this.Wa.decode(this.buffer.slice(0,e));return this.buffer=this.buffer.slice(e),n})}ja(e){throw this.Ua.cancel(),new Error(`Invalid bundle format: ${e}`)}Ya(){return O(this,null,function*(){let e=yield this.Ua.read();if(!e.done){let n=new Uint8Array(this.buffer.length+e.value.length);n.set(this.buffer),n.set(e.value,this.buffer.length),this.buffer=n}return e.done})}};N0e=class{constructor(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastTransactionError=null,this.writtenDocs=new Set}lookup(e){return O(this,null,function*(){if(this.ensureCommitNotCalled(),this.mutations.length>0)throw this.lastTransactionError=new Un(dn.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes."),this.lastTransactionError;let n=yield function(r,s){return O(this,null,function*(){let o=ms(r),a={documents:s.map(u=>jV(o.serializer,u))},l=yield o.xo("BatchGetDocuments",o.serializer.databaseId,Fc.emptyPath(),a,s.length),c=new Map;l.forEach(u=>{let m=HPt(o.serializer,u);c.set(m.key.toString(),m)});let d=[];return s.forEach(u=>{let m=c.get(u.toString());To(!!m),d.push(m)}),d})}(this.datastore,e);return n.forEach(i=>this.recordVersion(i)),n})}set(e,n){this.write(n.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}update(e,n){try{this.write(n.toMutation(e,this.preconditionForUpdate(e)))}catch(i){this.lastTransactionError=i}this.writtenDocs.add(e.toString())}delete(e){this.write(new h7(e,this.precondition(e))),this.writtenDocs.add(e.toString())}commit(){return O(this,null,function*(){if(this.ensureCommitNotCalled(),this.lastTransactionError)throw this.lastTransactionError;let e=this.readVersions;this.mutations.forEach(n=>{e.delete(n.key.toString())}),e.forEach((n,i)=>{let r=hs.fromPath(i);this.mutations.push(new zV(r,this.precondition(r)))}),yield function(i,r){return O(this,null,function*(){let s=ms(i),o={writes:r.map(a=>$V(s.serializer,a))};yield s.Co("Commit",s.serializer.databaseId,Fc.emptyPath(),o)})}(this.datastore,this.mutations),this.committed=!0})}recordVersion(e){let n;if(e.isFoundDocument())n=e.version;else{if(!e.isNoDocument())throw Ws();n=Bo.min()}let i=this.readVersions.get(e.key.toString());if(i){if(!n.isEqual(i))throw new Un(dn.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),n)}precondition(e){let n=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&n?n.isEqual(Bo.min())?em.exists(!1):em.updateTime(n):em.none()}preconditionForUpdate(e){let n=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&n){if(n.isEqual(Bo.min()))throw new Un(dn.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return em.updateTime(n)}return em.exists(!0)}write(e){this.ensureCommitNotCalled(),this.mutations.push(e)}ensureCommitNotCalled(){}};V0e=class{constructor(e,n,i,r,s){this.asyncQueue=e,this.datastore=n,this.options=i,this.updateFunction=r,this.deferred=s,this.Za=i.maxAttempts,this.Yo=new ZV(this.asyncQueue,"transaction_retry")}Xa(){this.Za-=1,this.eu()}eu(){this.Yo.$o(()=>O(this,null,function*(){let e=new N0e(this.datastore),n=this.tu(e);n&&n.then(i=>{this.asyncQueue.enqueueAndForget(()=>e.commit().then(()=>{this.deferred.resolve(i)}).catch(r=>{this.nu(r)}))}).catch(i=>{this.nu(i)})}))}tu(e){try{let n=this.updateFunction(e);return!iB(n)&&n.catch&&n.then?n:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(n){return this.deferred.reject(n),null}}nu(e){this.Za>0&&this.ru(e)?(this.Za-=1,this.asyncQueue.enqueueAndForget(()=>(this.eu(),Promise.resolve()))):this.deferred.reject(e)}ru(e){if(e.name==="FirebaseError"){let n=e.code;return n==="aborted"||n==="failed-precondition"||n==="already-exists"||!nNe(n)}return!1}};B0e=class{constructor(e,n,i,r){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=i,this.databaseInfo=r,this.user=hf.UNAUTHENTICATED,this.clientId=DY.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(i,s=>O(this,null,function*(){Jn("FirestoreClient","Received user=",s.uid),yield this.authCredentialListener(s),this.user=s})),this.appCheckCredentials.start(i,s=>(Jn("FirestoreClient","Received new app check token=",s),this.appCheckCredentialListener(s,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Un(dn.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let e=new pf;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(()=>O(this,null,function*(){try{this._onlineComponents&&(yield this._onlineComponents.terminate()),this._offlineComponents&&(yield this._offlineComponents.terminate()),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){let i=GI(n,"Failed to shutdown persistence");e.reject(i)}})),e.promise}};mOe=new Map;hq=class{constructor(e){var n,i;if(e.host===void 0){if(e.ssl!==void 0)throw new Un(dn.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(n=e.ssl)===null||n===void 0||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new Un(dn.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}M2e("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=YNe((i=e.experimentalLongPollingOptions)!==null&&i!==void 0?i:{}),function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new Un(dn.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new Un(dn.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new Un(dn.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(i,r){return i.timeoutSeconds===r.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}},zT=class{constructor(e,n,i,r){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=i,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new hq({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Un(dn.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!==void 0}_setSettings(e){if(this._settingsFrozen)throw new Un(dn.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new hq(e),e.credentials!==void 0&&(this._authCredentials=function(i){if(!i)return new r1e;switch(i.type){case"firstParty":return new l1e(i.sessionIndex||"0",i.iamToken||null,i.authTokenFactory||null);case"provider":return i.client;default:throw new Un(dn.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){let i=mOe.get(n);i&&(Jn("ComponentProvider","Removing Datastore"),mOe.delete(n),i.terminate())}(this),Promise.resolve()}};I0=class t{constructor(e,n,i){this.converter=n,this._query=i,this.type="query",this.firestore=e}withConverter(e){return new t(this.firestore,e,this._query)}},Ju=class t{constructor(e,n,i){this.converter=n,this._key=i,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new n5(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new t(this.firestore,e,this._key)}},n5=class t extends I0{constructor(e,n,i){super(e,n,VI(i)),this._path=i,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new Ju(this.firestore,null,new hs(e))}withConverter(e){return new t(this.firestore,e,this._path)}};H0e=class{constructor(){this.iu=Promise.resolve(),this.su=[],this.ou=!1,this._u=[],this.au=null,this.uu=!1,this.cu=!1,this.lu=[],this.Yo=new ZV(this,"async_queue_retry"),this.hu=()=>{let n=wY();n&&Jn("AsyncQueue","Visibility state changed to "+n.visibilityState),this.Yo.Wo()};let e=wY();e&&typeof e.addEventListener=="function"&&e.addEventListener("visibilitychange",this.hu)}get isShuttingDown(){return this.ou}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Pu(),this.Iu(e)}enterRestrictedMode(e){if(!this.ou){this.ou=!0,this.cu=e||!1;let n=wY();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.hu)}}enqueue(e){if(this.Pu(),this.ou)return new Promise(()=>{});let n=new pf;return this.Iu(()=>this.ou&&this.cu?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.su.push(e),this.Tu()))}Tu(){return O(this,null,function*(){if(this.su.length!==0){try{yield this.su[0](),this.su.shift(),this.Yo.reset()}catch(e){if(!f7(e))throw e;Jn("AsyncQueue","Operation failed with retryable error: "+e)}this.su.length>0&&this.Yo.$o(()=>this.Tu())}})}Iu(e){let n=this.iu.then(()=>(this.uu=!0,e().catch(i=>{this.au=i,this.uu=!1;let r=function(o){let a=o.message||"";return o.stack&&(a=o.stack.includes(o.message)?o.stack:o.message+`
`+o.stack),a}(i);throw xm("INTERNAL UNHANDLED ERROR: ",r),i}).then(i=>(this.uu=!1,i))));return this.iu=n,n}enqueueAfterDelay(e,n,i){this.Pu(),this.lu.indexOf(e)>-1&&(n=0);let r=T0e.createAndSchedule(this,e,n,i,s=>this.Eu(s));return this._u.push(r),r}Pu(){this.au&&Ws()}verifyOperationInProgress(){}du(){return O(this,null,function*(){let e;do e=this.iu,yield e;while(e!==this.iu)})}Au(e){for(let n of this._u)if(n.timerId===e)return!0;return!1}Ru(e){return this.du().then(()=>{this._u.sort((n,i)=>n.targetTimeMs-i.targetTimeMs);for(let n of this._u)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.du()})}Vu(e){this.lu.push(e)}Eu(e){let n=this._u.indexOf(e);this._u.splice(n,1)}};W0e=class{constructor(){this._progressObserver={},this._taskCompletionResolver=new pf,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(e,n,i){this._progressObserver={next:e,error:n,complete:i}}catch(e){return this._taskCompletionResolver.promise.catch(e)}then(e,n){return this._taskCompletionResolver.promise.then(e,n)}_completeWith(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)}_failWith(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)}_updateProgress(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)}};QNe=-1,Jh=class extends zT{constructor(e,n,i,r){super(e,n,i,r),this.type="firestore",this._queue=function(){return new H0e}(),this._persistenceKey=r?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||JNe(this),this._firestoreClient.terminate()}};a5=class t{constructor(e){this._byteString=e}static fromBase64String(e){try{return new t(N1.fromBase64String(e))}catch(n){throw new Un(dn.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new t(N1.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}};Vy=class{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new Un(dn.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new bm(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}};ex=class{constructor(e){this._methodName=e}};HT=class{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new Un(dn.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new Un(dn.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return el(this._lat,e._lat)||el(this._long,e._long)}};jRt=/^__.*__$/,U0e=class{constructor(e,n,i){this.data=e,this.fieldMask=n,this.fieldTransforms=i}toMutation(e,n){return this.fieldMask!==null?new Ny(e,this.data,this.fieldMask,n,this.fieldTransforms):new u7(e,this.data,n,this.fieldTransforms)}},pq=class{constructor(e,n,i){this.data=e,this.fieldMask=n,this.fieldTransforms=i}toMutation(e,n){return new Ny(e,this.data,this.fieldMask,n,this.fieldTransforms)}};mq=class t{constructor(e,n,i,r,s,o){this.settings=e,this.databaseId=n,this.serializer=i,this.ignoreUndefinedProperties=r,s===void 0&&this.mu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get fu(){return this.settings.fu}gu(e){return new t(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}pu(e){var n;let i=(n=this.path)===null||n===void 0?void 0:n.child(e),r=this.gu({path:i,yu:!1});return r.wu(e),r}Su(e){var n;let i=(n=this.path)===null||n===void 0?void 0:n.child(e),r=this.gu({path:i,yu:!1});return r.mu(),r}bu(e){return this.gu({path:void 0,yu:!0})}Du(e){return fq(e,this.settings.methodName,this.settings.Cu||!1,this.path,this.settings.vu)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}mu(){if(this.path)for(let e=0;e<this.path.length;e++)this.wu(this.path.get(e))}wu(e){if(e.length===0)throw this.Du("Document fields must not be empty");if(dVe(this.fu)&&jRt.test(e))throw this.Du('Document fields cannot begin and end with "__"')}},j0e=class{constructor(e,n,i){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=i||oB(e)}Fu(e,n,i,r=!1){return new mq({fu:e,methodName:n,vu:i,path:bm.emptyPath(),yu:!1,Cu:r},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}};eB=class t extends ex{_toFieldTransform(e){if(e.fu!==2)throw e.fu===1?e.Du(`${this._methodName}() can only appear at the top level of your update data`):e.Du(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof t}};$0e=class t extends ex{_toFieldTransform(e){return new NT(e.path,new c7)}isEqual(e){return e instanceof t}},K0e=class t extends ex{constructor(e,n){super(e),this.Mu=n}_toFieldTransform(e){let n=uVe(this,e,!0),i=this.Mu.map(s=>$T(s,n)),r=new Q8(i);return new NT(e.path,r)}isEqual(e){return e instanceof t&&Xde(this.Mu,e.Mu)}},Y0e=class t extends ex{constructor(e,n){super(e),this.Mu=n}_toFieldTransform(e){let n=uVe(this,e,!0),i=this.Mu.map(s=>$T(s,n)),r=new J8(i);return new NT(e.path,r)}isEqual(e){return e instanceof t&&Xde(this.Mu,e.Mu)}},q0e=class t extends ex{constructor(e,n){super(e),this.xu=n}_toFieldTransform(e){let n=new d7(e.serializer,ZOe(e.serializer,this.xu));return new NT(e.path,n)}isEqual(e){return e instanceof t&&this.xu===e.xu}};$Rt=new RegExp("[~\\*/\\[\\]]");GT=class{constructor(e,n,i,r,s){this._firestore=e,this._userDataWriter=n,this._key=i,this._document=r,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new Ju(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){let e=new X0e(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){let n=this._document.data.field(Eq("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}},X0e=class extends GT{data(){return super.data()}};tB=class{},WT=class extends tB{};gq=class t extends WT{constructor(e,n,i){super(),this._field=e,this._op=n,this._value=i,this.type="where"}static _create(e,n,i){return new t(e,n,i)}_apply(e){let n=this._parse(e);return DVe(e._query,n),new I0(e.firestore,e.converter,k1e(e._query,n))}_parse(e){let n=jT(e.firestore);return function(s,o,a,l,c,d,u){let m;if(c.isKeyField()){if(d==="array-contains"||d==="array-contains-any")throw new Un(dn.INVALID_ARGUMENT,`Invalid Query. You can't perform '${d}' queries on documentId().`);if(d==="in"||d==="not-in"){yOe(u,d);let f=[];for(let _ of u)f.push(vOe(l,s,_));m={arrayValue:{values:f}}}else m=vOe(l,s,u)}else d!=="in"&&d!=="not-in"&&d!=="array-contains-any"||yOe(u,d),m=hVe(a,o,u,d==="in"||d==="not-in");return lc.create(c,d,m)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}};Q0e=class t extends tB{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new t(e,n)}_parse(e){let n=this._queryConstraints.map(i=>i._parse(e)).filter(i=>i.getFilters().length>0);return n.length===1?n[0]:iu.create(n,this._getOperator())}_apply(e){let n=this._parse(e);return n.getFilters().length===0?e:(function(r,s){let o=r,a=s.getFlattenedFilters();for(let l of a)DVe(o,l),o=k1e(o,l)}(e._query,n),new I0(e.firestore,e.converter,k1e(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}},J0e=class t extends WT{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new t(e,n)}_apply(e){let n=function(r,s,o){if(r.startAt!==null)throw new Un(dn.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(r.endAt!==null)throw new Un(dn.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new LT(s,o)}(e._query,this._field,this._direction);return new I0(e.firestore,e.converter,function(r,s){let o=r.explicitOrderBy.concat([s]);return new Oy(r.path,r.collectionGroup,o,r.filters.slice(),r.limit,r.limitType,r.startAt,r.endAt)}(e._query,n))}};vq=class t extends WT{constructor(e,n,i){super(),this.type=e,this._limit=n,this._limitType=i}static _create(e,n,i){return new t(e,n,i)}_apply(e){return new I0(e.firestore,e.converter,OY(e._query,this._limit,this._limitType))}};yq=class t extends WT{constructor(e,n,i){super(),this.type=e,this._docOrFields=n,this._inclusive=i}static _create(e,n,i){return new t(e,n,i)}_apply(e){let n=TVe(e,this.type,this._docOrFields,this._inclusive);return new I0(e.firestore,e.converter,function(r,s){return new Oy(r.path,r.collectionGroup,r.explicitOrderBy.slice(),r.filters.slice(),r.limit,r.limitType,s,r.endAt)}(e._query,n))}};_q=class t extends WT{constructor(e,n,i){super(),this.type=e,this._docOrFields=n,this._inclusive=i}static _create(e,n,i){return new t(e,n,i)}_apply(e){let n=TVe(e,this.type,this._docOrFields,this._inclusive);return new I0(e.firestore,e.converter,function(r,s){return new Oy(r.path,r.collectionGroup,r.explicitOrderBy.slice(),r.filters.slice(),r.limit,r.limitType,r.startAt,s)}(e._query,n))}};OI=class{convertValue(e,n="none"){switch(RT(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Jp(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(o7(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 10:return this.convertObject(e.mapValue,n);default:throw Ws()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){let i={};return UT(e,(r,s)=>{i[r]=this.convertValue(s,n)}),i}convertGeoPoint(e){return new HT(Jp(e.latitude),Jp(e.longitude))}convertArray(e,n){return(e.values||[]).map(i=>this.convertValue(i,n))}convertServerTimestamp(e,n){switch(n){case"previous":let i=s2e(e);return i==null?null:this.convertValue(i,n);case"estimate":return this.convertTimestamp(NV(e));default:return null}}convertTimestamp(e){let n=X8(e);return new kp(n.seconds,n.nanos)}convertDocumentKey(e,n){let i=Fc.fromString(e);To(vNe(i));let r=new a7(i.get(1),i.get(3)),s=new hs(i.popFirst(5));return r.isEqual(n)||xm(`Document ${s} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}};e2e=class extends OI{constructor(e){super(),this.firestore=e}convertBytes(e){return new a5(e)}convertReference(e){let n=this.convertDocumentKey(e,this.firestore._databaseId);return new Ju(this.firestore,null,n)}};Z8=class{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}},zv=class extends GT{constructor(e,n,i,r,s,o){super(e,n,i,r,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let n=new n7(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){let i=this._document.data.field(Eq("DocumentSnapshot.get",e));if(i!==null)return this._userDataWriter.convertValue(i,n.serverTimestamps)}}},n7=class extends zv{data(e={}){return super.data(e)}},By=class{constructor(e,n,i,r){this._firestore=e,this._userDataWriter=n,this._snapshot=r,this.metadata=new Z8(r.hasPendingWrites,r.fromCache),this.query=i}get docs(){let e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(i=>{e.call(n,new n7(this._firestore,this._userDataWriter,i.key,i,new Z8(this._snapshot.mutatedKeys.has(i.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new Un(dn.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(r,s){if(r._snapshot.oldDocs.isEmpty()){let o=0;return r._snapshot.docChanges.map(a=>{let l=new n7(r._firestore,r._userDataWriter,a.doc.key,a.doc,new Z8(r._snapshot.mutatedKeys.has(a.doc.key),r._snapshot.fromCache),r.query.converter);return a.doc,{type:"added",doc:l,oldIndex:-1,newIndex:o++}})}{let o=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(a=>s||a.type!==3).map(a=>{let l=new n7(r._firestore,r._userDataWriter,a.doc.key,a.doc,new Z8(r._snapshot.mutatedKeys.has(a.doc.key),r._snapshot.fromCache),r.query.converter),c=-1,d=-1;return a.type!==0&&(c=o.indexOf(a.doc.key),o=o.delete(a.doc.key)),a.type!==1&&(o=o.add(a.doc),d=o.indexOf(a.doc.key)),{type:KRt(a.type),doc:l,oldIndex:c,newIndex:d}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}};tx=class extends OI{constructor(e){super(),this.firestore=e}convertBytes(e){return new a5(e)}convertReference(e){let n=this.convertDocumentKey(e,this.firestore._databaseId);return new Ju(this.firestore,null,n)}};YRt={maxAttempts:5};Cq=class{constructor(e,n){this._firestore=e,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=jT(e)}set(e,n,i){this._verifyNotCommitted();let r=t7(e,this._firestore),s=Mq(r.converter,n,i),o=Dq(this._dataReader,"WriteBatch.set",r._key,s,r.converter!==null,i);return this._mutations.push(o.toMutation(r._key,em.none())),this}update(e,n,i,...r){this._verifyNotCommitted();let s=t7(e,this._firestore),o;return o=typeof(n=Sp(n))=="string"||n instanceof Vy?R2e(this._dataReader,"WriteBatch.update",s._key,n,i,r):P2e(this._dataReader,"WriteBatch.update",s._key,n),this._mutations.push(o.toMutation(s._key,em.exists(!0))),this}delete(e){this._verifyNotCommitted();let n=t7(e,this._firestore);return this._mutations=this._mutations.concat(new h7(n._key,em.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new Un(dn.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}};t2e=class extends class{constructor(n,i){this._firestore=n,this._transaction=i,this._dataReader=jT(n)}get(n){let i=t7(n,this._firestore),r=new e2e(this._firestore);return this._transaction.lookup([i._key]).then(s=>{if(!s||s.length!==1)return Ws();let o=s[0];if(o.isFoundDocument())return new GT(this._firestore,r,o.key,o,i.converter);if(o.isNoDocument())return new GT(this._firestore,r,i._key,null,i.converter);throw Ws()})}set(n,i,r){let s=t7(n,this._firestore),o=Mq(s.converter,i,r),a=Dq(this._dataReader,"Transaction.set",s._key,o,s.converter!==null,r);return this._transaction.set(s._key,a),this}update(n,i,r,...s){let o=t7(n,this._firestore),a;return a=typeof(i=Sp(i))=="string"||i instanceof Vy?R2e(this._dataReader,"Transaction.update",o._key,i,r,s):P2e(this._dataReader,"Transaction.update",o._key,i),this._transaction.update(o._key,a),this}delete(n){let i=t7(n,this._firestore);return this._transaction.delete(i._key),this}}{constructor(e,n){super(e,n),this._firestore=e}get(e){let n=t7(e,this._firestore),i=new tx(this._firestore);return super.get(e).then(r=>new zv(this._firestore,i,n._key,r._document,new Z8(!1,!1),n.converter))}};(function(e,n=!0){(function(r){NI=r})(vDe),IO(new A9("firestore",(i,{instanceIdentifier:r,options:s})=>{let o=i.getProvider("app").getImmediate(),a=new Jh(new o1e(i.getProvider("auth-internal")),new d1e(i.getProvider("app-check-internal")),function(c,d){if(!Object.prototype.hasOwnProperty.apply(c.options,["projectId"]))throw new Un(dn.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new a7(c.options.projectId,d)}(o,r),o);return s=Object.assign({useFetchStreams:n},s),a._setSettings(s),a},"PUBLIC").setMultipleInstances(!0)),Tb(_Le,"4.6.4",e),Tb(_Le,"4.6.4","esm2017")})()});var GVe=Q(()=>{H2e()});function K2e(t,e){if(e===void 0)return{merge:!1};if(e.mergeFields!==void 0&&e.merge!==void 0)throw new Un("invalid-argument",`Invalid options passed to function ${t}(): You cannot specify both "merge" and "mergeFields".`);return e}function WVe(){if(typeof Uint8Array>"u")throw new Un("unimplemented","Uint8Arrays are not available in this environment.")}function UVe(){if(!ROe())throw new Un("unimplemented","Blobs are unavailable in Firestore in this environment.")}function G2e(t){return XRt(t,["next","error","complete"])}function XRt(t,e){if(typeof t!="object"||t===null)return!1;let n=t;for(let i of e)if(i in n&&typeof n[i]=="function")return!0;return!1}function QRt(t){_Oe(t)}function dg(t,e,n){return t.message=t.message.replace(e,n),t}function jVe(t){for(let e of t)if(typeof e=="object"&&!G2e(e))return e;return{}}function $Ve(t,e){var n,i;let r;return G2e(t[0])?r=t[0]:G2e(t[1])?r=t[1]:typeof t[0]=="function"?r={next:t[0],error:t[1],complete:t[2]}:r={next:t[1],error:t[2],complete:t[3]},{next:s=>{r.next&&r.next(e(s))},error:(n=r.error)===null||n===void 0?void 0:n.bind(r),complete:(i=r.complete)===null||i===void 0?void 0:i.bind(r)}}function KT(t){return Lc(t,Ju)}function eFt(t,e){t.INTERNAL.registerComponent(new A9("firestore-compat",n=>{let i=n.getProvider("app-compat").getImmediate(),r=n.getProvider("firestore").getImmediate();return e(i,r)},"PUBLIC").setServiceProps(Object.assign({},JRt)))}function tFt(t){eFt(t,(e,n)=>new Iq(e,n,new W2e)),t.registerVersion(qRt,ZRt)}var qRt,ZRt,kq,W2e,Iq,UI,Aq,Pq,jI,l5,YT,qT,ZT,U2e,cB,$I,j2e,$2e,JRt,KVe=Q(()=>{eue();H2e();Qde();Jde();qRt="@firebase/firestore-compat",ZRt="0.3.33";kq=class t{constructor(e){this._delegate=e}static fromBase64String(e){return UVe(),new t(a5.fromBase64String(e))}static fromUint8Array(e){return WVe(),new t(a5.fromUint8Array(e))}toBase64(){return UVe(),this._delegate.toBase64()}toUint8Array(){return WVe(),this._delegate.toUint8Array()}isEqual(e){return this._delegate.isEqual(e._delegate)}toString(){return"Blob(base64: "+this.toBase64()+")"}};W2e=class{enableIndexedDbPersistence(e,n){return eVe(e._delegate,{forceOwnership:n})}enableMultiTabIndexedDbPersistence(e){return tVe(e._delegate)}clearIndexedDbPersistence(e){return nVe(e._delegate)}},Iq=class{constructor(e,n,i){this._delegate=n,this._persistenceProvider=i,this.INTERNAL={delete:()=>this.terminate()},e instanceof a7||(this._appCompat=e)}get _databaseId(){return this._delegate._databaseId}settings(e){let n=this._delegate._getSettings();!e.merge&&n.host!==e.host&&Vv("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),e.merge&&(e=Object.assign(Object.assign({},n),e),delete e.merge),this._delegate._setSettings(e)}useEmulator(e,n,i={}){ZNe(this._delegate,e,n,i)}enableNetwork(){return sVe(this._delegate)}disableNetwork(){return oVe(this._delegate)}enablePersistence(e){let n=!1,i=!1;return e&&(n=!!e.synchronizeTabs,i=!!e.experimentalForceOwningTab,M2e("synchronizeTabs",n,"experimentalForceOwningTab",i)),n?this._persistenceProvider.enableMultiTabIndexedDbPersistence(this):this._persistenceProvider.enableIndexedDbPersistence(this,i)}clearPersistence(){return this._persistenceProvider.clearIndexedDbPersistence(this)}terminate(){return this._appCompat&&(this._appCompat._removeServiceInstance("firestore-compat"),this._appCompat._removeServiceInstance("firestore")),this._delegate._delete()}waitForPendingWrites(){return rVe(this._delegate)}onSnapshotsInSync(e){return LVe(this._delegate,e)}get app(){if(!this._appCompat)throw new Un("failed-precondition","Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._appCompat}collection(e){try{return new $I(this,k2e(this._delegate,e))}catch(n){throw dg(n,"collection()","Firestore.collection()")}}doc(e){try{return new l5(this,lB(this._delegate,e))}catch(n){throw dg(n,"doc()","Firestore.doc()")}}collectionGroup(e){try{return new ZT(this,XNe(this._delegate,e))}catch(n){throw dg(n,"collectionGroup()","Firestore.collectionGroup()")}}runTransaction(e){return OVe(this._delegate,n=>e(new Aq(this,n)))}batch(){return r1(this._delegate),new Pq(new Cq(this._delegate,e=>WI(this._delegate,e)))}loadBundle(e){return aVe(this._delegate,e)}namedQuery(e){return lVe(this._delegate,e).then(n=>n?new ZT(this,n):null)}},UI=class extends OI{constructor(e){super(),this.firestore=e}convertBytes(e){return new kq(new a5(e))}convertReference(e){let n=this.convertDocumentKey(e,this.firestore._databaseId);return l5.forKey(n,this.firestore,null)}};Aq=class{constructor(e,n){this._firestore=e,this._delegate=n,this._userDataWriter=new UI(e)}get(e){let n=KT(e);return this._delegate.get(n).then(i=>new YT(this._firestore,new zv(this._firestore._delegate,this._userDataWriter,i._key,i._document,i.metadata,n.converter)))}set(e,n,i){let r=KT(e);return i?(K2e("Transaction.set",i),this._delegate.set(r,n,i)):this._delegate.set(r,n),this}update(e,n,i,...r){let s=KT(e);return arguments.length===2?this._delegate.update(s,n):this._delegate.update(s,n,i,...r),this}delete(e){let n=KT(e);return this._delegate.delete(n),this}},Pq=class{constructor(e){this._delegate=e}set(e,n,i){let r=KT(e);return i?(K2e("WriteBatch.set",i),this._delegate.set(r,n,i)):this._delegate.set(r,n),this}update(e,n,i,...r){let s=KT(e);return arguments.length===2?this._delegate.update(s,n):this._delegate.update(s,n,i,...r),this}delete(e){let n=KT(e);return this._delegate.delete(n),this}commit(){return this._delegate.commit()}},jI=class t{constructor(e,n,i){this._firestore=e,this._userDataWriter=n,this._delegate=i}fromFirestore(e,n){let i=new n7(this._firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,null);return this._delegate.fromFirestore(new qT(this._firestore,i),n??{})}toFirestore(e,n){return n?this._delegate.toFirestore(e,n):this._delegate.toFirestore(e)}static getInstance(e,n){let i=t.INSTANCES,r=i.get(e);r||(r=new WeakMap,i.set(e,r));let s=r.get(n);return s||(s=new t(e,new UI(e),n),r.set(n,s)),s}};jI.INSTANCES=new WeakMap;l5=class t{constructor(e,n){this.firestore=e,this._delegate=n,this._userDataWriter=new UI(e)}static forPath(e,n,i){if(e.length%2!==0)throw new Un("invalid-argument",`Invalid document reference. Document references must have an even number of segments, but ${e.canonicalString()} has ${e.length}`);return new t(n,new Ju(n._delegate,i,new hs(e)))}static forKey(e,n,i){return new t(n,new Ju(n._delegate,i,e))}get id(){return this._delegate.id}get parent(){return new $I(this.firestore,this._delegate.parent)}get path(){return this._delegate.path}collection(e){try{return new $I(this.firestore,k2e(this._delegate,e))}catch(n){throw dg(n,"collection()","DocumentReference.collection()")}}isEqual(e){return e=Sp(e),e instanceof Ju?I2e(this._delegate,e):!1}set(e,n){n=K2e("DocumentReference.set",n);try{return n?N2e(this._delegate,e,n):N2e(this._delegate,e)}catch(i){throw dg(i,"setDoc()","DocumentReference.set()")}}update(e,n,...i){try{return arguments.length===1?V2e(this._delegate,e):V2e(this._delegate,e,n,...i)}catch(r){throw dg(r,"updateDoc()","DocumentReference.update()")}}delete(){return RVe(this._delegate)}onSnapshot(...e){let n=jVe(e),i=$Ve(e,r=>new YT(this.firestore,new zv(this.firestore._delegate,this._userDataWriter,r._key,r._document,r.metadata,this._delegate.converter)));return B2e(this._delegate,n,i)}get(e){let n;return e?.source==="cache"?n=MVe(this._delegate):e?.source==="server"?n=kVe(this._delegate):n=EVe(this._delegate),n.then(i=>new YT(this.firestore,new zv(this.firestore._delegate,this._userDataWriter,i._key,i._document,i.metadata,this._delegate.converter)))}withConverter(e){return new t(this.firestore,e?this._delegate.withConverter(jI.getInstance(this.firestore,e)):this._delegate.withConverter(null))}};YT=class{constructor(e,n){this._firestore=e,this._delegate=n}get ref(){return new l5(this._firestore,this._delegate.ref)}get id(){return this._delegate.id}get metadata(){return this._delegate.metadata}get exists(){return this._delegate.exists()}data(e){return this._delegate.data(e)}get(e,n){return this._delegate.get(e,n)}isEqual(e){return O2e(this._delegate,e._delegate)}},qT=class extends YT{data(e){let n=this._delegate.data(e);return this._delegate._converter||COe(n!==void 0,"Document in a QueryDocumentSnapshot should exist"),n}},ZT=class t{constructor(e,n){this.firestore=e,this._delegate=n,this._userDataWriter=new UI(e)}where(e,n,i){try{return new t(this.firestore,nx(this._delegate,vVe(e,n,i)))}catch(r){throw dg(r,/(orderBy|where)\(\)/,"Query.$1()")}}orderBy(e,n){try{return new t(this.firestore,nx(this._delegate,yVe(e,n)))}catch(i){throw dg(i,/(orderBy|where)\(\)/,"Query.$1()")}}limit(e){try{return new t(this.firestore,nx(this._delegate,_Ve(e)))}catch(n){throw dg(n,"limit()","Query.limit()")}}limitToLast(e){try{return new t(this.firestore,nx(this._delegate,CVe(e)))}catch(n){throw dg(n,"limitToLast()","Query.limitToLast()")}}startAt(...e){try{return new t(this.firestore,nx(this._delegate,xVe(...e)))}catch(n){throw dg(n,"startAt()","Query.startAt()")}}startAfter(...e){try{return new t(this.firestore,nx(this._delegate,bVe(...e)))}catch(n){throw dg(n,"startAfter()","Query.startAfter()")}}endBefore(...e){try{return new t(this.firestore,nx(this._delegate,wVe(...e)))}catch(n){throw dg(n,"endBefore()","Query.endBefore()")}}endAt(...e){try{return new t(this.firestore,nx(this._delegate,SVe(...e)))}catch(n){throw dg(n,"endAt()","Query.endAt()")}}isEqual(e){return A2e(this._delegate,e._delegate)}get(e){let n;return e?.source==="cache"?n=AVe(this._delegate):e?.source==="server"?n=PVe(this._delegate):n=IVe(this._delegate),n.then(i=>new cB(this.firestore,new By(this.firestore._delegate,this._userDataWriter,this._delegate,i._snapshot)))}onSnapshot(...e){let n=jVe(e),i=$Ve(e,r=>new cB(this.firestore,new By(this.firestore._delegate,this._userDataWriter,this._delegate,r._snapshot)));return B2e(this._delegate,n,i)}withConverter(e){return new t(this.firestore,e?this._delegate.withConverter(jI.getInstance(this.firestore,e)):this._delegate.withConverter(null))}},U2e=class{constructor(e,n){this._firestore=e,this._delegate=n}get type(){return this._delegate.type}get doc(){return new qT(this._firestore,this._delegate.doc)}get oldIndex(){return this._delegate.oldIndex}get newIndex(){return this._delegate.newIndex}},cB=class{constructor(e,n){this._firestore=e,this._delegate=n}get query(){return new ZT(this._firestore,this._delegate.query)}get metadata(){return this._delegate.metadata}get size(){return this._delegate.size}get empty(){return this._delegate.empty}get docs(){return this._delegate.docs.map(e=>new qT(this._firestore,e))}docChanges(e){return this._delegate.docChanges(e).map(n=>new U2e(this._firestore,n))}forEach(e,n){this._delegate.forEach(i=>{e.call(n,new qT(this._firestore,i))})}isEqual(e){return O2e(this._delegate,e._delegate)}},$I=class t extends ZT{constructor(e,n){super(e,n),this.firestore=e,this._delegate=n}get id(){return this._delegate.id}get path(){return this._delegate.path}get parent(){let e=this._delegate.parent;return e?new l5(this.firestore,e):null}doc(e){try{return e===void 0?new l5(this.firestore,lB(this._delegate)):new l5(this.firestore,lB(this._delegate,e))}catch(n){throw dg(n,"doc()","CollectionReference.doc()")}}add(e){return FVe(this._delegate,e).then(n=>new l5(this.firestore,n))}isEqual(e){return I2e(this._delegate,e._delegate)}withConverter(e){return new t(this.firestore,e?this._delegate.withConverter(jI.getInstance(this.firestore,e)):this._delegate.withConverter(null))}};j2e=class t{constructor(...e){this._delegate=new Vy(...e)}static documentId(){return new t(bm.keyField().canonicalString())}isEqual(e){return e=Sp(e),e instanceof Vy?this._delegate._internalPath.isEqual(e._internalPath):!1}};$2e=class t{constructor(e){this._delegate=e}static serverTimestamp(){let e=VVe();return e._methodName="FieldValue.serverTimestamp",new t(e)}static delete(){let e=NVe();return e._methodName="FieldValue.delete",new t(e)}static arrayUnion(...e){let n=BVe(...e);return n._methodName="FieldValue.arrayUnion",new t(n)}static arrayRemove(...e){let n=zVe(...e);return n._methodName="FieldValue.arrayRemove",new t(n)}static increment(e){let n=HVe(e);return n._methodName="FieldValue.increment",new t(n)}isEqual(e){return this._delegate.isEqual(e._delegate)}};JRt={Firestore:Iq,GeoPoint:HT,Timestamp:kp,Blob:kq,Transaction:Aq,WriteBatch:Pq,DocumentReference:l5,DocumentSnapshot:YT,Query:ZT,QueryDocumentSnapshot:qT,QuerySnapshot:cB,CollectionReference:$I,FieldPath:j2e,FieldValue:$2e,setLogLevel:QRt,CACHE_SIZE_UNLIMITED:QNe};tFt(K2)});var YVe=Q(()=>{KVe()});function iFt(t,e=lj){return new Qa(n=>{let i;return e!=null?e.schedule(()=>{i=t.onSnapshot({includeMetadataChanges:!0},n)}):i=t.onSnapshot({includeMetadataChanges:!0},n),()=>{i?.()}})}function qVe(t,e){return iFt(t,e)}function nFt(t,e){return qVe(t,e).pipe(ll(void 0),R_(),lr(n=>{let[i,r]=n;return r.exists?i?.exists?{payload:r,type:"modified"}:{payload:r,type:"added"}:{payload:r,type:"removed"}}))}function Z2e(t,e){return qVe(t,e).pipe(lr(n=>({payload:n,type:"query"})))}function Fq(t,e){return Z2e(t,e).pipe(ll(void 0),R_(),lr(n=>{let[i,r]=n,s=r.payload.docChanges(),o=s.map(a=>({type:a.type,payload:a}));return i&&JSON.stringify(i.payload.metadata)!==JSON.stringify(r.payload.metadata)&&r.payload.docs.forEach((a,l)=>{let c=s.find(u=>u.doc.ref.isEqual(a.ref)),d=i?.payload.docs.find(u=>u.ref.isEqual(a.ref));c&&JSON.stringify(c.doc.metadata)===JSON.stringify(a.metadata)||!c&&d&&JSON.stringify(d.metadata)===JSON.stringify(a.metadata)||o.push({type:"modified",payload:{oldIndex:l,newIndex:l,type:"modified",doc:a}})}),o}))}function ZVe(t,e,n){return Fq(t,n).pipe(HM((i,r)=>rFt(i,r.map(s=>s.payload),e),[]),qg(),lr(i=>i.map(r=>({type:r.type,payload:r}))))}function rFt(t,e,n){return e.forEach(i=>{n.indexOf(i.type)>-1&&(t=sFt(t,i))}),t}function Y2e(t,e,n,...i){let r=t.slice();return r.splice(e,n,...i),r}function sFt(t,e){switch(e.type){case"added":if(!(t[e.newIndex]&&t[e.newIndex].doc.ref.isEqual(e.doc.ref)))return Y2e(t,e.newIndex,0,e);break;case"modified":if(t[e.oldIndex]==null||t[e.oldIndex].doc.ref.isEqual(e.doc.ref))if(e.oldIndex!==e.newIndex){let n=t.slice();return n.splice(e.oldIndex,1),n.splice(e.newIndex,0,e),n}else return Y2e(t,e.newIndex,1,e);break;case"removed":if(t[e.oldIndex]&&t[e.oldIndex].doc.ref.isEqual(e.doc.ref))return Y2e(t,e.oldIndex,1);break}return t}function XVe(t){return(!t||t.length===0)&&(t=["added","removed","modified"]),t}function eBe(t,e=n=>n){return{query:e(t),ref:t}}var Rq,Lq,q2e,QVe,JVe,oFt,aFt,XT,tBe,dB=Q(()=>{ri();me();me();yT();yT();Bme();oV();Qk();Qk();$n();Cl();_De();YVe();RK();Rq=class{ref;afs;constructor(e,n){this.ref=e,this.afs=n}set(e,n){return this.ref.set(e,n)}update(e){return this.ref.update(e)}delete(){return this.ref.delete()}collection(e,n){let i=this.ref.collection(e),{ref:r,query:s}=eBe(i,n);return new Lq(r,s,this.afs)}snapshotChanges(){return nFt(this.ref,this.afs.schedulers.outsideAngular).pipe(t3)}valueChanges(e={}){return this.snapshotChanges().pipe(lr(({payload:n})=>e.idField?St(ve({},n.data()),{[e.idField]:n.id}):n.data()))}get(e){return bp(this.ref.get(e)).pipe(t3)}};Lq=class{ref;query;afs;constructor(e,n,i){this.ref=e,this.query=n,this.afs=i}stateChanges(e){let n=Fq(this.query,this.afs.schedulers.outsideAngular);return e&&e.length>0&&(n=n.pipe(lr(i=>i.filter(r=>e.indexOf(r.type)>-1)))),n.pipe(ll(void 0),R_(),Ks(([i,r])=>r.length>0||!i),lr(([,i])=>i),t3)}auditTrail(e){return this.stateChanges(e).pipe(HM((n,i)=>[...n,...i],[]))}snapshotChanges(e){let n=XVe(e);return ZVe(this.query,n,this.afs.schedulers.outsideAngular).pipe(t3)}valueChanges(e={}){return Z2e(this.query,this.afs.schedulers.outsideAngular).pipe(lr(n=>n.payload.docs.map(i=>e.idField?St(ve({},i.data()),{[e.idField]:i.id}):i.data())),t3)}get(e){return bp(this.query.get(e)).pipe(t3)}add(e){return this.ref.add(e)}doc(e){return new Rq(this.ref.doc(e),this.afs)}},q2e=class{query;afs;constructor(e,n){this.query=e,this.afs=n}stateChanges(e){return!e||e.length===0?Fq(this.query,this.afs.schedulers.outsideAngular).pipe(t3):Fq(this.query,this.afs.schedulers.outsideAngular).pipe(lr(n=>n.filter(i=>e.indexOf(i.type)>-1)),Ks(n=>n.length>0),t3)}auditTrail(e){return this.stateChanges(e).pipe(HM((n,i)=>[...n,...i],[]))}snapshotChanges(e){let n=XVe(e);return ZVe(this.query,n,this.afs.schedulers.outsideAngular).pipe(t3)}valueChanges(e={}){return Z2e(this.query,this.afs.schedulers.outsideAngular).pipe(lr(i=>i.payload.docs.map(r=>e.idField?ve({[e.idField]:r.id},r.data()):r.data())),t3)}get(e){return bp(this.query.get(e)).pipe(t3)}},QVe=new Ri("angularfire2.enableFirestorePersistence"),JVe=new Ri("angularfire2.firestore.persistenceSettings"),oFt=new Ri("angularfire2.firestore.settings"),aFt=new Ri("angularfire2.firestore.use-emulator");XT=(()=>{class t{schedulers;firestore;persistenceEnabled$;constructor(n,i,r,s,o,a,l,c,d,u,m,f,_,x,D,E,M){this.schedulers=l;let I=sV(n,a,i),z=d;u&&$me(I,a,m,_,x,D,f,E),[this.firestore,this.persistenceEnabled$]=FK(`${I.name}.firestore`,"AngularFirestore",I.name,()=>{let G=a.runOutsideAngular(()=>I.firestore());if(s&&G.settings(s),z&&G.useEmulator(...z),r&&!Z2(o)){let A=()=>{try{return bp(G.enablePersistence(c||void 0).then(()=>!0,()=>!1))}catch(Y){return typeof console<"u"&&console.warn(Y),Fr(!1)}};return[G,a.runOutsideAngular(A)]}else return[G,Fr(!1)]},[s,z,r])}collection(n,i){let r;typeof n=="string"?r=this.firestore.collection(n):r=n;let{ref:s,query:o}=eBe(r,i),a=this.schedulers.ngZone.run(()=>s);return new Lq(a,o,this)}collectionGroup(n,i){let r=i||(o=>o),s=this.firestore.collectionGroup(n);return new q2e(r(s),this)}doc(n){let i;typeof n=="string"?i=this.firestore.doc(n):i=n;let r=this.schedulers.ngZone.run(()=>i);return new Rq(r,this)}createId(){return this.firestore.collection("_").doc().id}static \u0275fac=function(i){return new(i||t)(it($b),it(Xk,8),it(QVe,8),it(oFt,8),it(Fu),it(pn),it(AK),it(JVe,8),it(aFt,8),it(_T,8),it(zme,8),it(Hme,8),it(Gme,8),it(Wme,8),it(Ume,8),it(jme,8),it(gT,8))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"any"})}return t})(),tBe=(()=>{class t{constructor(){K2.registerVersion("angularfire",vT.full,"fst-compat")}static enablePersistence(n){return{ngModule:t,providers:[{provide:QVe,useValue:!0},{provide:JVe,useValue:n}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=en({type:t});static \u0275inj=Ji({providers:[XT]})}return t})()});var ff,zy=Q(()=>{GVe();me();dB();ma();Jk();ff=(()=>{let e=class e{constructor(i,r,s){this.angularFirestore=i,this.router=r,this.firebaseLoginService=s}collection(i,r){return this.angularFirestore.collection(i,r)}doc(i){return this.angularFirestore.doc(i)}addUser(i){try{return this.angularFirestore.doc("users/"+i.uid).set(i)}catch(r){console.error("addUser failed "+r.message,r)}}};e.\u0275fac=function(r){return new(r||e)(it(XT),it(Ll),it(q_))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var iBe,nBe=Q(()=>{ef();Ul();me();zy();yi();iBe=(()=>{let e=class e{constructor(i,r){this.firestoreService=i,this.socketService=r,this.cacheLists={}}addCacheListItem(i,r){return O(this,null,function*(){let s=ua.generate();this.cacheLists[i].push({id:s,text:r,used:1,lastUsed:Date.now()}),this.saveCacheList(i)})}removeCacheListItem(i,r){return O(this,null,function*(){let s=this.cacheLists[i].findIndex(o=>o.text===r);this.cacheLists[i].splice(s,1),this.saveCacheList(i)})}incrementCacheList(i,r){return O(this,null,function*(){r.used++,r.lastUsed=Date.now(),this.cacheLists[i]=this.cacheLists[i].filter(s=>s.id!==r.id),this.cacheLists[i].push(r),this.saveCacheList(i)})}getCacheList(i){return O(this,null,function*(){let r=yield this.socketService.getCacheList(i);return r&&(this.cacheLists[i]=r),this.cacheLists[i]||(this.cacheLists[i]=[]),this.cacheLists[i]})}saveCacheList(i){return O(this,null,function*(){this.cacheLists[i]||(this.cacheLists[i]=[]);try{yield this.firestoreService.doc("cache-lists/"+i).update({data:Qn.stringify(this.cacheLists[i])})}catch{yield this.firestoreService.doc("cache-lists/"+i).set({data:Qn.stringify(this.cacheLists[i])})}})}displayCacheListItemFn(i){return i?.text?i.text:i}displayCacheListItemInOptionFn(i,r){let s=i?.text?i.text:i;return r(s)}};e.\u0275fac=function(r){return new(r||e)(it(ff),it(lt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function uFt(t,e){return e[this.optionTrackBy()]}function pFt(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",12),F("click",function(){V(n);let r=w(2);return B(r.addCacheText())}),y(1,"add"),p()}}function mFt(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",12),F("click",function(){V(n);let r=w(2);return B(r.removeCacheText())}),y(1,"remove"),p()}}function fFt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(3);g(),Ke(" ",n.requiredError," ")}}function gFt(t,e){t&1&&(h(0,"div"),y(1," ung\xFCltiger Wert "),p())}function vFt(t,e){if(t&1&&(h(0,"mat-error"),W(1,fFt,2,1,"div",9)(2,gFt,2,0,"div",9),p()),t&2){let n=w(2);g(),b("ngIf",n.nxtFormControl.errors.required),g(),b("ngIf",n.nxtFormControl.errors.validCurrency)}}function yFt(t,e){if(t&1&&(ee(0,"mat-option",14),Ce(1,"safeHtml")),t&2){let n=e.$implicit,i=w(3);_8("mat-option ",i.nxtMatOptionClass,""),b("value",n)("innerHTML",tt(1,5,i.displayOptionWith(n)),Pi)}}function _Ft(t,e){if(t&1&&Kn(0,yFt,2,7,"mat-option",13,uFt,!0),t&2){let n=w(2);Yn(n.filteredOptions())}}function CFt(t,e){if(t&1&&(ee(0,"mat-option",14),Ce(1,"safeHtml")),t&2){let n=e.$implicit,i=w(3);_8("mat-option ",i.nxtMatOptionClass,""),b("value",n)("innerHTML",tt(1,5,i.displayOptionWith(n)),Pi)}}function xFt(t,e){if(t&1&&Kn(0,CFt,2,7,"mat-option",13,sa),t&2){let n=w(2);Yn(n.filteredOptions())}}function bFt(t,e){if(t&1){let n=re();h(0,"mat-icon",16),F("click",function(r){V(n);let s=w(3);return B(s.clearInput(r))}),y(1,"clear"),p()}}function wFt(t,e){if(t&1&&(h(0,"div",11),W(1,bFt,2,0,"mat-icon",15),p()),t&2){let n=w(2);g(),b("ngIf",n.showClearIcon)}}function SFt(t,e){if(t&1){let n=re();h(0,"mat-form-field",4),F("click",function(){V(n);let r=w();return B(r.inputWrapperClicked())}),h(1,"mat-label"),y(2),p(),h(3,"div",5)(4,"input",6,0),F("focusout",function(r){V(n);let s=w();return B(s.focusout(r))})("focusin",function(r){V(n);let s=w();return B(s.focusin(r))})("click",function(r){V(n);let s=w();return B(s.inputClicked(r))}),p(),h(7,"div",7),W(8,pFt,2,0,"nxt-button-icon",8)(9,mFt,2,0,"nxt-button-icon",8),p()(),W(10,vFt,3,2,"mat-error",9),h(11,"mat-autocomplete",10,1),F("closed",function(r){V(n);let s=w();return B(s.closed(r))})("opened",function(r){V(n);let s=w();return B(s.opened(r))})("optionSelected",function(r){V(n);let s=w();return B(s.optionSelected(r))}),h(13,"div"),W(14,_Ft,2,0)(15,xFt,2,0),p()(),W(16,wFt,2,1,"div",11),p()}if(t&2){let n=pr(12),i=w();g(2),ye(i.placeholder),g(2),b("tabIndex",i.tabIndex)("formControl",i.nxtFormControl)("matAutocomplete",n),Bn("aria-label",i.placeholder),g(4),b("ngIf",i.showAddCacheTextButton),g(),b("ngIf",i.showRemoveCacheTextButton),g(),b("ngIf",i.nxtFormControl.invalid&&(i.nxtFormControl.dirty||i.nxtFormControl.touched)),g(),b("autoActiveFirstOption",!0)("displayWith",i.displayWith)("panelWidth",i.panelWidth),g(2),jr(i.nxtMatOptionContainerClass),g(),Je(i.optionTrackBy()?14:15),g(2),Je(i.showClearIcon&&i.nxtFormControl.value?16:-1)}}var cFt,dFt,hFt,Ga,Ah=Q(()=>{me();Mv();uLe();Ld();Ape();Zh();Wb();$fe();C4();ha();Ja();bl();ls();qn();Vt();og();An();ri();Ay();Ul();me();nBe();An();Vt();qn();cFt=["autoComplete"],dFt=["wrapper"];hFt=(t,e)=>({"bottom-no-padding":t,"no-padding":e});Ga=(()=>{let e=class e extends Xp{set value(i){if(this.valueField){let r=this.options?.find(s=>s[this.valueField]===i);r&&this.nxtFormControl.setValue(r)}else this.nxtFormControl.setValue(i);this._value=i}set myInput(i){this.nxtFormControl.element=i._elementRef.nativeElement}set inputElement(i){this.myInputElement=i._elementRef.nativeElement,$(this.myInputElement).off("keydown"),$(this.myInputElement).on("keydown",r=>{r.originalEvent.code==="Enter"&&(this.filteredOptions.length===0||!this.panelOpened)&&Date.now()-this.lastOptionSelectedTimestamp>1e3&&this.noEntryEnter&&this.noEntryEnter.emit(this.myInputElement.value)})}get fuse(){return this._fuse||this.initFuse(),this._fuse}constructor(i){super(),this.cacheListService=i,this.bottomNoPadding=!1,this.noPadding=!1,this.showListAfterClear=!0,this.minLength=0,this.dateControlIfFirstCharDigit=!1,this.fuseThreshold=.4,this.selectOnClick=!1,this.lastOptionSelectedTimestamp=0,this.openSelectOnInit=!1,this.valueChange=new nt,this.controlMouseClickCounter=0,this.showClearIcon=!1,this.useFuseSearch=!1,this.minWidth="",this.optionClick=new nt,this.clickOnDisabled=new nt,this.clearClicked=new nt,this.cleared=new nt,this.noEntryEnter=new nt,this.newItem=new nt,this.maxOptionsToShow=30,this.filteredOptions=gt([]),this.panelOpened=!1,this.filterValue="",this.showAddCacheTextButton=!1,this.showRemoveCacheTextButton=!1,this.tabIndex=-1,this.optionTrackBy=br(),this.displayOptionWithCache=new Map,this.displayWith=Qh.displayWith("text")}onFormControlSet(){}openPanel(){setTimeout(()=>{this.autocompleteTrigger.openPanel()},0)}initFuse(){if(this.customSearchFn||this.customSearchAsyncFn)return;(!this.filterFields||this.filterFields.length===0)&&(this.cachedTextId?this.filterFields=["text"]:alert(`filterFields fehlen!
`+this.placeholder+`
`+this.cachedTextId));let i={shouldSort:!0,minMatchCharLength:1,isCaseSensitive:!1,keys:this.filterFields};this.useFuseSearch||(i.threshold=.1),this._fuse=new Wfe(this.options||[],i)}ngOnInit(){return O(this,null,function*(){this.cachedTextId&&(this.options=yield this.cacheListService.getCacheList(this.cachedTextId),this.displayWith=this.cacheListService.displayCacheListItemFn,this.displayInOptionWith=this.cacheListService.displayCacheListItemInOptionFn,this.checkCacheTextButtonShow()),this.nxtFormControl.valueChanges.subscribe(i=>O(this,null,function*(){this.clearDisplayOptionWithCache(),this.search(),this.valueField?Es.is(i)?Es.isString(i)?(this._value=null,this.valueChange.emit(this._value)):this._value!==i[this.valueField]&&(this._value=i[this.valueField],this.valueChange.emit(this._value)):this._value!==null&&(this._value=null,this.valueChange.emit(this._value)):this._value!==i&&(this._value=i,this.valueChange.emit(this._value))})),this.nxtFormControl.valueChanges.subscribe(i=>{this.cachedTextId&&(this.checkCacheTextButtonShow(),i?.text&&i?.lastUsed&&i?.id&&this.nxtFormControl.setValue(i.text)),Gn.debug("value change autocomplete")}),this.nxtFormControl.name&&(this.placeholder=this.nxtFormControl.name)})}search(){return O(this,null,function*(){let i=this.nxtFormControl.value??"";typeof i=="string"&&this.filteredOptions.set(yield this._filter(i))})}_filter(i){return new Promise((r,s)=>O(this,null,function*(){if(this.filterService){if(!i)return r([]);r(this.filterService(i));return}else{let o=[];this.filterValue=i.toLowerCase(),this.options&&this.options.length>0&&typeof this.options[0]=="string"?o=this.options.filter(a=>a.toLowerCase().includes(this.filterValue)):o=yield this.filterWithFuseJs(i),this.maxOptionsToShow>-1&&this.maxOptionsToShow<o.length&&(o.length=this.maxOptionsToShow),r(o)}}))}filterWithFuseJs(i){return O(this,null,function*(){return new Promise((r,s)=>O(this,null,function*(){if(this.customSearchAsyncFn){r(yield this.customSearchAsyncFn(this.options,i));return}if(this.customSearchFn){r(this.customSearchFn(this.options,i));return}if(!i||i.length===0){if(!this.options)return[];r(this.options.slice());return}let o=this.fuse.search(i).map(a=>a.item);r(o)}))})}escapeRegExp(i){let r=["$","^","*","(",")","+","[","]","{","}","\\","|",".","?","/"],s=new RegExp("(\\"+r.join("|\\")+")","g");return i.replace(s,"\\$1")}clearDisplayOptionWithCache(){this.displayOptionWithCache.clear()}displayOptionWith(i){if(i){if(i.addOption)return i.text;let r=this.displayOptionWithCache.get(i);if(r)return r;let s=this.displayInOptionWith(i,a=>{let l=a;if(this.filterValue){let c=this.escapeRegExp(this.filterValue).split(" "),d=new RegExp(c.join("|"),"gi");try{return l=l.toString().replace(d,u=>'<mark class="autocomplete-mark">'+u+"</mark>"),l}catch(u){return u.message}}return a});s?.startsWith("<div")||(s="<div>"+s+"</div>");let o=s.replace(/\n/g,"<br/>");return this.displayOptionWithCache.set(i,o),o}}closed(i){this.panelOpened=!1}opened(i){this.panelOpened=!0}clearInput(i){this.showListAfterClear||(i.stopPropagation(),i.preventDefault()),this.nxtFormControl.setValue("",{emitEvent:!0,emitModelToViewChange:!0,emitViewToModelChange:!0}),this.clearClicked.emit(null),setTimeout(()=>{this.nxtFormControl.element.focus()},0)}changeSearchMode(){this.useFuseSearch=!this.useFuseSearch,this.nxtFormControl.setValue(this.nxtFormControl.value)}focusout(i){i?.relatedTarget?.tagName?.toLowerCase()}closePanel(){this.autocompleteTrigger.closePanel()}ngAfterContentInit(){this.displayInOptionWith=this.displayInOptionWith?this.displayInOptionWith:this.defaultDisplayInOptionWith}defaultDisplayInOptionWith(i,r){return typeof i=="string"?i:typeof i?.text=="string"?i.text:Qn.stringify(i)}optionSelected(i){return O(this,null,function*(){this.lastOptionSelectedTimestamp=Date.now(),this.optionClick?.emit(i),this.filteredOptions.set(yield this._filter(""))})}addCacheText(){return O(this,null,function*(){let i=this.nxtFormControl.value;i.text&&(i=i.text),yield this.cacheListService.addCacheListItem(this.cachedTextId,i),this.checkCacheTextButtonShow()})}removeCacheText(){return O(this,null,function*(){let i=this.nxtFormControl.value;i.text&&(i=i.text),yield this.cacheListService.removeCacheListItem(this.cachedTextId,i),this.checkCacheTextButtonShow()})}checkCacheTextButtonShow(){let i=this.nxtFormControl.value,r=i?.text?i.text:i;r?this.options.find(s=>s.text.toUpperCase()===r.toUpperCase())?(this.showAddCacheTextButton=!1,this.showRemoveCacheTextButton=!0):(this.showAddCacheTextButton=!0,this.showRemoveCacheTextButton=!1):(this.showAddCacheTextButton=!1,this.showRemoveCacheTextButton=!1)}ngOnChanges(i){if(i.options&&(this.search(),i.options.firstChange||this.initFuse(),this.valueField)){let r=this.options?.find(s=>s[this.valueField]===this._value);r&&this.nxtFormControl.setValue(r)}i.dateControlIfFirstCharDigit&&(this.dateControl?this.dateControl.enable=i.dateControlIfFirstCharDigit.currentValue:i.dateControlIfFirstCharDigit.currentValue&&(this.dateControl=new Nk(this.nxtFormControl,!0))),this.clearDisplayOptionWithCache()}inputClicked(i){this.selectOnClick&&i.target.select()}inputWrapperClicked(){this.nxtFormControl.disabled&&this.clickOnDisabled.emit()}focusin(i){}};e.\u0275fac=function(r){return new(r||e)(R(iBe))},e.\u0275cmp=_e({type:e,selectors:[["nxt-autocomplete"]],viewQuery:function(r,s){if(r&1&&(ei(cFt,5),ei(Iy,5),ei(dFt,7),ei(jfe,7),ei(hY,5)),r&2){let o;Pt(o=Rt())&&(s.myInput=o.first),Pt(o=Rt())&&(s.inputElement=o.first),Pt(o=Rt())&&(s.wrapper=o.first),Pt(o=Rt())&&(s.matAutocomplete=o.first),Pt(o=Rt())&&(s.autocompleteTrigger=o.first)}},inputs:{value:"value",bottomNoPadding:"bottomNoPadding",noPadding:"noPadding",showListAfterClear:"showListAfterClear",minLength:"minLength",panelWidth:"panelWidth",dateControlIfFirstCharDigit:"dateControlIfFirstCharDigit",fuseThreshold:"fuseThreshold",customSearchFn:"customSearchFn",customSearchAsyncFn:"customSearchAsyncFn",selectOnClick:"selectOnClick",openSelectOnInit:"openSelectOnInit",valueField:"valueField",filterService:"filterService",showClearIcon:"showClearIcon",useFuseSearch:"useFuseSearch",placeholder:"placeholder",displayWith:"displayWith",options:"options",cachedTextId:"cachedTextId",minWidth:"minWidth",filterFields:"filterFields",displayInOptionWith:"displayInOptionWith",nxtMatOptionClass:"nxtMatOptionClass",nxtMatOptionContainerClass:"nxtMatOptionContainerClass",maxOptionsToShow:"maxOptionsToShow",tabIndex:"tabIndex",optionTrackBy:[1,"optionTrackBy"]},outputs:{valueChange:"valueChange",optionClick:"optionClick",clickOnDisabled:"clickOnDisabled",clearClicked:"clearClicked",cleared:"cleared",noEntryEnter:"noEntryEnter",newItem:"newItem"},standalone:!0,features:[et,yn,xe],decls:2,vars:7,consts:[["controlElement","","inputElement",""],["autoComplete","matAutocomplete"],[3,"nxtFormControl","width","ngClass"],["fxFlex","","class","mat-form-field-full-width",3,"click",4,"ngIf"],["fxFlex","",1,"mat-form-field-full-width",3,"click"],["fxLayout","row"],["fxFlex","","type","text","matInput","","matAutocompletePosition","auto",3,"focusout","focusin","click","tabIndex","formControl","matAutocomplete"],["fxLayout","column","fxLayoutAlign","center",2,"height","17px","position","relative","top","-3px","left","5px"],[3,"click",4,"ngIf"],[4,"ngIf"],[3,"closed","opened","optionSelected","autoActiveFirstOption","displayWith","panelWidth"],[1,"absolute","cursor-pointer","right-0","bottom-0"],[3,"click"],[3,"class","value","innerHTML"],[3,"value","innerHTML"],["aria-hidden","false","aria-label","clear",3,"click",4,"ngIf"],["aria-hidden","false","aria-label","clear",3,"click"]],template:function(r,s){r&1&&(h(0,"nxt-form-field-wrapper",2),W(1,SFt,17,15,"mat-form-field",3),p()),r&2&&(b("nxtFormControl",s.nxtFormControl)("width",s.width)("ngClass",bs(4,hFt,s.noPadding||s.bottomNoPadding,s.noPadding)),g(),b("ngIf",s.nxtFormControl))},dependencies:[O1,_s,Dn,No,Ct,M0,At,Yt,oi,qi,E0,Iy,ko,mu,Ko,hY,Ia,$c,an,ky,jfe,z_,Zr,Or],styles:["[_nghost-%COMP%]     .mdc-text-field--disabled input{color:#909090!important}[_nghost-%COMP%]     .bottom-no-padding{display:flex;border:0 solid red;padding-top:10px}[_nghost-%COMP%]     .bottom-no-padding .mat-input-element{min-height:1.8em}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-infix{border:none;padding:0!important}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-wrapper{padding-bottom:0}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-underline{position:unset}"]});let t=e;return t})()});function MFt(t,e){if(t&1&&(h(0,"mat-icon",10),y(1),p()),t&2){let n=w();g(),ye(n.icon)}}function kFt(t,e){if(t&1&&(h(0,"div",11,0),y(2),p()),t&2){let n=w();g(2),ye(n.titleText)}}function IFt(t,e){if(t&1){let n=re();h(0,"nxt-button",8,1),F("click",function(){V(n);let r=w();return B(r.close())}),y(2),p()}if(t&2){let n=w();g(2),ye(n.data.okButtonText)}}var TFt,DFt,EFt,rBe,sBe=Q(()=>{Zi();Ah();ha();Ja();ri();me();ji();TFt=["header"],DFt=["okButton"],EFt=()=>["text"];rBe=(()=>{let e=class e{set headerDiv(i){i&&requestAnimationFrame(()=>i.nativeElement.focus())}set okButton(i){}constructor(i){this.dialogRef=i}setData(i){this.data=i,this.message=typeof i?.message?.replace=="function"?i.message.replace(/\n/g,"<br/>"):"",this.titleText=i.title,i.okButtonText=i.okButtonText?.replace(/\n/g,"<br/>"),this.preselectValue=i.items.find(r=>r.value===i.value),this.value=this.preselectValue?.value,i.icon&&(this.icon=i.icon)}ngAfterViewInit(){this.data.focusInputOnInit&&this.autocompleteComponent.inputControlElemRef&&setTimeout(()=>this.autocompleteComponent.inputControlElemRef.nativeElement.click(),200),setTimeout(()=>{this.value},1e3)}displayInOptionFn(i,r){return r(i?.text)}displayFn(i){return i?.text}close(){this.dialogRef.close(this.value)}optionClicked(i){this.value=i.option.value.value,this.data.closeOnOptionSelected&&this.close()}cancel(){this.dialogRef.close(null)}valueChanged(i){this.data.allowCustomString&&(this.value=i)}};e.\u0275fac=function(r){return new(r||e)(R(Gt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-select"]],viewQuery:function(r,s){if(r&1&&(ei(TFt,5),ei(DFt,5),ei(Ga,5)),r&2){let o;Pt(o=Rt())&&(s.headerDiv=o.first),Pt(o=Rt())&&(s.okButton=o.first),Pt(o=Rt())&&(s.autocompleteComponent=o.first)}},standalone:!0,features:[xe],decls:12,vars:17,consts:[["header",""],["okButton",""],[1,"nxt-dialog-content"],["aria-hidden","false",4,"ngIf"],["class","titleText",4,"ngIf"],[2,"margin-bottom","24px","margin-top","10px",3,"innerHTML"],[3,"optionClick","clearClicked","valueChange","options","displayWith","displayInOptionWith","showClearIcon","placeholder","maxOptionsToShow","value","filterFields","openSelectOnInit","useFuseSearch"],[2,"justify-content","space-around","display","flex","padding","1px"],[2,"margin","auto",3,"click"],["style","margin: auto;",3,"click",4,"ngIf"],["aria-hidden","false"],[1,"titleText"]],template:function(r,s){r&1&&(h(0,"div",2)(1,"div"),W(2,MFt,2,1,"mat-icon",3)(3,kFt,3,1,"div",4),p(),ee(4,"div",5),Ce(5,"safeHtml"),h(6,"div")(7,"nxt-autocomplete",6),F("optionClick",function(a){return s.optionClicked(a)})("clearClicked",function(){return s.value=null})("valueChange",function(a){return s.valueChanged(a)}),p()(),h(8,"div",7)(9,"nxt-button",8),F("click",function(){return s.cancel()}),y(10,"Abbrechen"),p(),W(11,IFt,3,1,"nxt-button",9),p()()),r&2&&(g(2),b("ngIf",s.icon),g(),b("ngIf",s.titleText),g(),b("innerHTML",tt(5,14,s.message),Pi),g(3),b("options",s.data.items)("displayWith",s.displayFn)("displayInOptionWith",s.displayInOptionFn)("showClearIcon",!0)("placeholder",s.data.placeholder)("maxOptionsToShow",999)("value",s.preselectValue)("filterFields",bn(16,EFt))("openSelectOnInit",!0)("useFuseSearch",!1),g(4),b("ngIf",s.value&&s.data.okButtonText))},dependencies:[Ct,Zr,Ga,Lt,Or],styles:[".titleText[_ngcontent-%COMP%]{font-size:24px}"]});let t=e;return t})()});var aBe=xr((evn,oBe)=>{oBe.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var v7=xr(QT=>{var Q2e,AFt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];QT.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};QT.getSymbolTotalCodewords=function(e){return AFt[e]};QT.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};QT.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Q2e=e};QT.isKanjiModeEnabled=function(){return typeof Q2e<"u"};QT.toSJIS=function(e){return Q2e(e)}});var Oq=xr(Hv=>{Hv.L={bit:1};Hv.M={bit:0};Hv.Q={bit:3};Hv.H={bit:2};function PFt(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return Hv.L;case"m":case"medium":return Hv.M;case"q":case"quartile":return Hv.Q;case"h":case"high":return Hv.H;default:throw new Error("Unknown EC Level: "+t)}}Hv.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4};Hv.from=function(e,n){if(Hv.isValid(e))return e;try{return PFt(e)}catch{return n}}});var dBe=xr((nvn,cBe)=>{function lBe(){this.buffer=[],this.length=0}lBe.prototype={get:function(t){let e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};cBe.exports=lBe});var hBe=xr((rvn,uBe)=>{function uB(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}uB.prototype.set=function(t,e,n,i){let r=t*this.size+e;this.data[r]=n,i&&(this.reservedBit[r]=!0)};uB.prototype.get=function(t,e){return this.data[t*this.size+e]};uB.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};uB.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};uBe.exports=uB});var pBe=xr(Nq=>{var RFt=v7().getSymbolSize;Nq.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,i=RFt(e),r=i===145?26:Math.ceil((i-13)/(2*n-2))*2,s=[i-7];for(let o=1;o<n-1;o++)s[o]=s[o-1]-r;return s.push(6),s.reverse()};Nq.getPositions=function(e){let n=[],i=Nq.getRowColCoords(e),r=i.length;for(let s=0;s<r;s++)for(let o=0;o<r;o++)s===0&&o===0||s===0&&o===r-1||s===r-1&&o===0||n.push([i[s],i[o]]);return n}});var gBe=xr(fBe=>{var FFt=v7().getSymbolSize,mBe=7;fBe.getPositions=function(e){let n=FFt(e);return[[0,0],[n-mBe,0],[0,n-mBe]]}});var vBe=xr(eh=>{eh.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var JT={N1:3,N2:3,N3:40,N4:10};eh.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};eh.from=function(e){return eh.isValid(e)?parseInt(e,10):void 0};eh.getPenaltyN1=function(e){let n=e.size,i=0,r=0,s=0,o=null,a=null;for(let l=0;l<n;l++){r=s=0,o=a=null;for(let c=0;c<n;c++){let d=e.get(l,c);d===o?r++:(r>=5&&(i+=JT.N1+(r-5)),o=d,r=1),d=e.get(c,l),d===a?s++:(s>=5&&(i+=JT.N1+(s-5)),a=d,s=1)}r>=5&&(i+=JT.N1+(r-5)),s>=5&&(i+=JT.N1+(s-5))}return i};eh.getPenaltyN2=function(e){let n=e.size,i=0;for(let r=0;r<n-1;r++)for(let s=0;s<n-1;s++){let o=e.get(r,s)+e.get(r,s+1)+e.get(r+1,s)+e.get(r+1,s+1);(o===4||o===0)&&i++}return i*JT.N2};eh.getPenaltyN3=function(e){let n=e.size,i=0,r=0,s=0;for(let o=0;o<n;o++){r=s=0;for(let a=0;a<n;a++)r=r<<1&2047|e.get(o,a),a>=10&&(r===1488||r===93)&&i++,s=s<<1&2047|e.get(a,o),a>=10&&(s===1488||s===93)&&i++}return i*JT.N3};eh.getPenaltyN4=function(e){let n=0,i=e.data.length;for(let s=0;s<i;s++)n+=e.data[s];return Math.abs(Math.ceil(n*100/i/5)-10)*JT.N4};function LFt(t,e,n){switch(t){case eh.Patterns.PATTERN000:return(e+n)%2===0;case eh.Patterns.PATTERN001:return e%2===0;case eh.Patterns.PATTERN010:return n%3===0;case eh.Patterns.PATTERN011:return(e+n)%3===0;case eh.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2===0;case eh.Patterns.PATTERN101:return e*n%2+e*n%3===0;case eh.Patterns.PATTERN110:return(e*n%2+e*n%3)%2===0;case eh.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}eh.applyMask=function(e,n){let i=n.size;for(let r=0;r<i;r++)for(let s=0;s<i;s++)n.isReserved(s,r)||n.xor(s,r,LFt(e,s,r))};eh.getBestMask=function(e,n){let i=Object.keys(eh.Patterns).length,r=0,s=1/0;for(let o=0;o<i;o++){n(o),eh.applyMask(o,e);let a=eh.getPenaltyN1(e)+eh.getPenaltyN2(e)+eh.getPenaltyN3(e)+eh.getPenaltyN4(e);eh.applyMask(o,e),a<s&&(s=a,r=o)}return r}});var ege=xr(J2e=>{var y7=Oq(),Vq=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Bq=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];J2e.getBlocksCount=function(e,n){switch(n){case y7.L:return Vq[(e-1)*4+0];case y7.M:return Vq[(e-1)*4+1];case y7.Q:return Vq[(e-1)*4+2];case y7.H:return Vq[(e-1)*4+3];default:return}};J2e.getTotalCodewordsCount=function(e,n){switch(n){case y7.L:return Bq[(e-1)*4+0];case y7.M:return Bq[(e-1)*4+1];case y7.Q:return Bq[(e-1)*4+2];case y7.H:return Bq[(e-1)*4+3];default:return}}});var yBe=xr(Hq=>{var hB=new Uint8Array(512),zq=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)hB[n]=e,zq[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)hB[n]=hB[n-255]})();Hq.log=function(e){if(e<1)throw new Error("log("+e+")");return zq[e]};Hq.exp=function(e){return hB[e]};Hq.mul=function(e,n){return e===0||n===0?0:hB[zq[e]+zq[n]]}});var _Be=xr(pB=>{var tge=yBe();pB.mul=function(e,n){let i=new Uint8Array(e.length+n.length-1);for(let r=0;r<e.length;r++)for(let s=0;s<n.length;s++)i[r+s]^=tge.mul(e[r],n[s]);return i};pB.mod=function(e,n){let i=new Uint8Array(e);for(;i.length-n.length>=0;){let r=i[0];for(let o=0;o<n.length;o++)i[o]^=tge.mul(n[o],r);let s=0;for(;s<i.length&&i[s]===0;)s++;i=i.slice(s)}return i};pB.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=pB.mul(n,new Uint8Array([1,tge.exp(i)]));return n}});var bBe=xr((uvn,xBe)=>{var CBe=_Be();function ige(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}ige.prototype.initialize=function(e){this.degree=e,this.genPoly=CBe.generateECPolynomial(this.degree)};ige.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let n=new Uint8Array(e.length+this.degree);n.set(e);let i=CBe.mod(n,this.genPoly),r=this.degree-i.length;if(r>0){let s=new Uint8Array(this.degree);return s.set(i,r),s}return i};xBe.exports=ige});var nge=xr(wBe=>{wBe.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var rge=xr(rx=>{var SBe="[0-9]+",OFt="[A-Z $%*+\\-./:]+",mB="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";mB=mB.replace(/u/g,"\\u");var NFt="(?:(?![A-Z0-9 $%*+\\-./:]|"+mB+`)(?:.|[\r
]))+`;rx.KANJI=new RegExp(mB,"g");rx.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");rx.BYTE=new RegExp(NFt,"g");rx.NUMERIC=new RegExp(SBe,"g");rx.ALPHANUMERIC=new RegExp(OFt,"g");var VFt=new RegExp("^"+mB+"$"),BFt=new RegExp("^"+SBe+"$"),zFt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");rx.testKanji=function(e){return VFt.test(e)};rx.testNumeric=function(e){return BFt.test(e)};rx.testAlphanumeric=function(e){return zFt.test(e)}});var _7=xr(gf=>{var HFt=nge(),sge=rge();gf.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};gf.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};gf.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};gf.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};gf.MIXED={bit:-1};gf.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!HFt.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]};gf.getBestModeForData=function(e){return sge.testNumeric(e)?gf.NUMERIC:sge.testAlphanumeric(e)?gf.ALPHANUMERIC:sge.testKanji(e)?gf.KANJI:gf.BYTE};gf.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};gf.isValid=function(e){return e&&e.bit&&e.ccBits};function GFt(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return gf.NUMERIC;case"alphanumeric":return gf.ALPHANUMERIC;case"kanji":return gf.KANJI;case"byte":return gf.BYTE;default:throw new Error("Unknown mode: "+t)}}gf.from=function(e,n){if(gf.isValid(e))return e;try{return GFt(e)}catch{return n}}});var kBe=xr(eD=>{var Gq=v7(),WFt=ege(),TBe=Oq(),C7=_7(),oge=nge(),EBe=7973,DBe=Gq.getBCHDigit(EBe);function UFt(t,e,n){for(let i=1;i<=40;i++)if(e<=eD.getCapacity(i,n,t))return i}function MBe(t,e){return C7.getCharCountIndicator(t,e)+4}function jFt(t,e){let n=0;return t.forEach(function(i){let r=MBe(i.mode,e);n+=r+i.getBitsLength()}),n}function $Ft(t,e){for(let n=1;n<=40;n++)if(jFt(t,n)<=eD.getCapacity(n,e,C7.MIXED))return n}eD.from=function(e,n){return oge.isValid(e)?parseInt(e,10):n};eD.getCapacity=function(e,n,i){if(!oge.isValid(e))throw new Error("Invalid QR Code version");typeof i>"u"&&(i=C7.BYTE);let r=Gq.getSymbolTotalCodewords(e),s=WFt.getTotalCodewordsCount(e,n),o=(r-s)*8;if(i===C7.MIXED)return o;let a=o-MBe(i,e);switch(i){case C7.NUMERIC:return Math.floor(a/10*3);case C7.ALPHANUMERIC:return Math.floor(a/11*2);case C7.KANJI:return Math.floor(a/13);case C7.BYTE:default:return Math.floor(a/8)}};eD.getBestVersionForData=function(e,n){let i,r=TBe.from(n,TBe.M);if(Array.isArray(e)){if(e.length>1)return $Ft(e,r);if(e.length===0)return 1;i=e[0]}else i=e;return UFt(i.mode,i.getLength(),r)};eD.getEncodedBits=function(e){if(!oge.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;Gq.getBCHDigit(n)-DBe>=0;)n^=EBe<<Gq.getBCHDigit(n)-DBe;return e<<12|n}});var RBe=xr(PBe=>{var age=v7(),ABe=1335,KFt=21522,IBe=age.getBCHDigit(ABe);PBe.getEncodedBits=function(e,n){let i=e.bit<<3|n,r=i<<10;for(;age.getBCHDigit(r)-IBe>=0;)r^=ABe<<age.getBCHDigit(r)-IBe;return(i<<10|r)^KFt}});var LBe=xr((vvn,FBe)=>{var YFt=_7();function KI(t){this.mode=YFt.NUMERIC,this.data=t.toString()}KI.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};KI.prototype.getLength=function(){return this.data.length};KI.prototype.getBitsLength=function(){return KI.getBitsLength(this.data.length)};KI.prototype.write=function(e){let n,i,r;for(n=0;n+3<=this.data.length;n+=3)i=this.data.substr(n,3),r=parseInt(i,10),e.put(r,10);let s=this.data.length-n;s>0&&(i=this.data.substr(n),r=parseInt(i,10),e.put(r,s*3+1))};FBe.exports=KI});var NBe=xr((yvn,OBe)=>{var qFt=_7(),lge=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function YI(t){this.mode=qFt.ALPHANUMERIC,this.data=t}YI.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};YI.prototype.getLength=function(){return this.data.length};YI.prototype.getBitsLength=function(){return YI.getBitsLength(this.data.length)};YI.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=lge.indexOf(this.data[n])*45;i+=lge.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(lge.indexOf(this.data[n]),6)};OBe.exports=YI});var BBe=xr((_vn,VBe)=>{"use strict";VBe.exports=function(e){for(var n=[],i=e.length,r=0;r<i;r++){var s=e.charCodeAt(r);if(s>=55296&&s<=56319&&i>r+1){var o=e.charCodeAt(r+1);o>=56320&&o<=57343&&(s=(s-55296)*1024+o-56320+65536,r+=1)}if(s<128){n.push(s);continue}if(s<2048){n.push(s>>6|192),n.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){n.push(s>>12|224),n.push(s>>6&63|128),n.push(s&63|128);continue}if(s>=65536&&s<=1114111){n.push(s>>18|240),n.push(s>>12&63|128),n.push(s>>6&63|128),n.push(s&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer}});var HBe=xr((Cvn,zBe)=>{var ZFt=BBe(),XFt=_7();function qI(t){this.mode=XFt.BYTE,typeof t=="string"&&(t=ZFt(t)),this.data=new Uint8Array(t)}qI.getBitsLength=function(e){return e*8};qI.prototype.getLength=function(){return this.data.length};qI.prototype.getBitsLength=function(){return qI.getBitsLength(this.data.length)};qI.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};zBe.exports=qI});var WBe=xr((xvn,GBe)=>{var QFt=_7(),JFt=v7();function ZI(t){this.mode=QFt.KANJI,this.data=t}ZI.getBitsLength=function(e){return e*13};ZI.prototype.getLength=function(){return this.data.length};ZI.prototype.getBitsLength=function(){return ZI.getBitsLength(this.data.length)};ZI.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=JFt.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};GBe.exports=ZI});var UBe=xr((bvn,cge)=>{"use strict";var fB={single_source_shortest_paths:function(t,e,n){var i={},r={};r[e]=0;var s=fB.PriorityQueue.make();s.push(e,0);for(var o,a,l,c,d,u,m,f,_;!s.empty();){o=s.pop(),a=o.value,c=o.cost,d=t[a]||{};for(l in d)d.hasOwnProperty(l)&&(u=d[l],m=c+u,f=r[l],_=typeof r[l]>"u",(_||f>m)&&(r[l]=m,s.push(l,m),i[l]=a))}if(typeof n<"u"&&typeof r[n]>"u"){var x=["Could not find a path from ",e," to ",n,"."].join("");throw new Error(x)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],i=e,r;i;)n.push(i),r=t[i],i=t[i];return n.reverse(),n},find_path:function(t,e,n){var i=fB.single_source_shortest_paths(t,e,n);return fB.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(t){var e=fB.PriorityQueue,n={},i;t=t||{};for(i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);return n.queue=[],n.sorter=t.sorter||e.default_sorter,n},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof cge<"u"&&(cge.exports=fB)});var QBe=xr(XI=>{var Hd=_7(),KBe=LBe(),YBe=NBe(),qBe=HBe(),ZBe=WBe(),gB=rge(),Wq=v7(),eLt=UBe();function jBe(t){return unescape(encodeURIComponent(t)).length}function vB(t,e,n){let i=[],r;for(;(r=t.exec(n))!==null;)i.push({data:r[0],index:r.index,mode:e,length:r[0].length});return i}function XBe(t){let e=vB(gB.NUMERIC,Hd.NUMERIC,t),n=vB(gB.ALPHANUMERIC,Hd.ALPHANUMERIC,t),i,r;return Wq.isKanjiModeEnabled()?(i=vB(gB.BYTE,Hd.BYTE,t),r=vB(gB.KANJI,Hd.KANJI,t)):(i=vB(gB.BYTE_KANJI,Hd.BYTE,t),r=[]),e.concat(n,i,r).sort(function(o,a){return o.index-a.index}).map(function(o){return{data:o.data,mode:o.mode,length:o.length}})}function dge(t,e){switch(e){case Hd.NUMERIC:return KBe.getBitsLength(t);case Hd.ALPHANUMERIC:return YBe.getBitsLength(t);case Hd.KANJI:return ZBe.getBitsLength(t);case Hd.BYTE:return qBe.getBitsLength(t)}}function tLt(t){return t.reduce(function(e,n){let i=e.length-1>=0?e[e.length-1]:null;return i&&i.mode===n.mode?(e[e.length-1].data+=n.data,e):(e.push(n),e)},[])}function iLt(t){let e=[];for(let n=0;n<t.length;n++){let i=t[n];switch(i.mode){case Hd.NUMERIC:e.push([i,{data:i.data,mode:Hd.ALPHANUMERIC,length:i.length},{data:i.data,mode:Hd.BYTE,length:i.length}]);break;case Hd.ALPHANUMERIC:e.push([i,{data:i.data,mode:Hd.BYTE,length:i.length}]);break;case Hd.KANJI:e.push([i,{data:i.data,mode:Hd.BYTE,length:jBe(i.data)}]);break;case Hd.BYTE:e.push([{data:i.data,mode:Hd.BYTE,length:jBe(i.data)}])}}return e}function nLt(t,e){let n={},i={start:{}},r=["start"];for(let s=0;s<t.length;s++){let o=t[s],a=[];for(let l=0;l<o.length;l++){let c=o[l],d=""+s+l;a.push(d),n[d]={node:c,lastCount:0},i[d]={};for(let u=0;u<r.length;u++){let m=r[u];n[m]&&n[m].node.mode===c.mode?(i[m][d]=dge(n[m].lastCount+c.length,c.mode)-dge(n[m].lastCount,c.mode),n[m].lastCount+=c.length):(n[m]&&(n[m].lastCount=c.length),i[m][d]=dge(c.length,c.mode)+4+Hd.getCharCountIndicator(c.mode,e))}}r=a}for(let s=0;s<r.length;s++)i[r[s]].end=0;return{map:i,table:n}}function $Be(t,e){let n,i=Hd.getBestModeForData(t);if(n=Hd.from(e,i),n!==Hd.BYTE&&n.bit<i.bit)throw new Error('"'+t+'" cannot be encoded with mode '+Hd.toString(n)+`.
 Suggested mode is: `+Hd.toString(i));switch(n===Hd.KANJI&&!Wq.isKanjiModeEnabled()&&(n=Hd.BYTE),n){case Hd.NUMERIC:return new KBe(t);case Hd.ALPHANUMERIC:return new YBe(t);case Hd.KANJI:return new ZBe(t);case Hd.BYTE:return new qBe(t)}}XI.fromArray=function(e){return e.reduce(function(n,i){return typeof i=="string"?n.push($Be(i,null)):i.data&&n.push($Be(i.data,i.mode)),n},[])};XI.fromString=function(e,n){let i=XBe(e,Wq.isKanjiModeEnabled()),r=iLt(i),s=nLt(r,n),o=eLt.find_path(s.map,"start","end"),a=[];for(let l=1;l<o.length-1;l++)a.push(s.table[o[l]].node);return XI.fromArray(tLt(a))};XI.rawSplit=function(e){return XI.fromArray(XBe(e,Wq.isKanjiModeEnabled()))}});var eze=xr(JBe=>{var jq=v7(),uge=Oq(),rLt=dBe(),sLt=hBe(),oLt=pBe(),aLt=gBe(),mge=vBe(),fge=ege(),lLt=bBe(),Uq=kBe(),cLt=RBe(),dLt=_7(),hge=QBe();function uLt(t,e){let n=t.size,i=aLt.getPositions(e);for(let r=0;r<i.length;r++){let s=i[r][0],o=i[r][1];for(let a=-1;a<=7;a++)if(!(s+a<=-1||n<=s+a))for(let l=-1;l<=7;l++)o+l<=-1||n<=o+l||(a>=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(s+a,o+l,!0,!0):t.set(s+a,o+l,!1,!0))}}function hLt(t){let e=t.size;for(let n=8;n<e-8;n++){let i=n%2===0;t.set(n,6,i,!0),t.set(6,n,i,!0)}}function pLt(t,e){let n=oLt.getPositions(e);for(let i=0;i<n.length;i++){let r=n[i][0],s=n[i][1];for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?t.set(r+o,s+a,!0,!0):t.set(r+o,s+a,!1,!0)}}function mLt(t,e){let n=t.size,i=Uq.getEncodedBits(e),r,s,o;for(let a=0;a<18;a++)r=Math.floor(a/3),s=a%3+n-8-3,o=(i>>a&1)===1,t.set(r,s,o,!0),t.set(s,r,o,!0)}function pge(t,e,n){let i=t.size,r=cLt.getEncodedBits(e,n),s,o;for(s=0;s<15;s++)o=(r>>s&1)===1,s<6?t.set(s,8,o,!0):s<8?t.set(s+1,8,o,!0):t.set(i-15+s,8,o,!0),s<8?t.set(8,i-s-1,o,!0):s<9?t.set(8,15-s-1+1,o,!0):t.set(8,15-s-1,o,!0);t.set(i-8,8,1,!0)}function fLt(t,e){let n=t.size,i=-1,r=n-1,s=7,o=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(r,a-l)){let c=!1;o<e.length&&(c=(e[o]>>>s&1)===1),t.set(r,a-l,c),s--,s===-1&&(o++,s=7)}if(r+=i,r<0||n<=r){r-=i,i=-i;break}}}function gLt(t,e,n){let i=new rLt;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),dLt.getCharCountIndicator(l.mode,t)),l.write(i)});let r=jq.getSymbolTotalCodewords(t),s=fge.getTotalCodewordsCount(t,e),o=(r-s)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);let a=(o-i.getLengthInBits())/8;for(let l=0;l<a;l++)i.put(l%2?17:236,8);return vLt(i,t,e)}function vLt(t,e,n){let i=jq.getSymbolTotalCodewords(e),r=fge.getTotalCodewordsCount(e,n),s=i-r,o=fge.getBlocksCount(e,n),a=i%o,l=o-a,c=Math.floor(i/o),d=Math.floor(s/o),u=d+1,m=c-d,f=new lLt(m),_=0,x=new Array(o),D=new Array(o),E=0,M=new Uint8Array(t.buffer);for(let Y=0;Y<o;Y++){let X=Y<l?d:u;x[Y]=M.slice(_,_+X),D[Y]=f.encode(x[Y]),_+=X,E=Math.max(E,X)}let I=new Uint8Array(i),z=0,G,A;for(G=0;G<E;G++)for(A=0;A<o;A++)G<x[A].length&&(I[z++]=x[A][G]);for(G=0;G<m;G++)for(A=0;A<o;A++)I[z++]=D[A][G];return I}function yLt(t,e,n,i){let r;if(Array.isArray(t))r=hge.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){let d=hge.rawSplit(t);c=Uq.getBestVersionForData(d,n)}r=hge.fromString(t,c||40)}else throw new Error("Invalid data");let s=Uq.getBestVersionForData(r,n);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=s;else if(e<s)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+s+`.
`);let o=gLt(e,n,r),a=jq.getSymbolSize(e),l=new sLt(a);return uLt(l,e),hLt(l),pLt(l,e),pge(l,n,0),e>=7&&mLt(l,e),fLt(l,o),isNaN(i)&&(i=mge.getBestMask(l,pge.bind(null,l,n))),mge.applyMask(i,l),pge(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:r}}JBe.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=uge.M,r,s;return typeof n<"u"&&(i=uge.from(n.errorCorrectionLevel,uge.M),r=Uq.from(n.version),s=mge.from(n.maskPattern),n.toSJISFunc&&jq.setToSJISFunction(n.toSJISFunc)),yLt(e,r,i,s)}});var gge=xr(tD=>{function tze(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+t);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(i){return[i,i]}))),e.length===6&&e.push("F","F");let n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+e.slice(0,6).join("")}}tD.getOptions=function(e){e||(e={}),e.color||(e.color={});let n=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,r=e.scale||4;return{width:i,scale:i?4:r,margin:n,color:{dark:tze(e.color.dark||"#000000ff"),light:tze(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}};tD.getScale=function(e,n){return n.width&&n.width>=e+n.margin*2?n.width/(e+n.margin*2):n.scale};tD.getImageWidth=function(e,n){let i=tD.getScale(e,n);return Math.floor((e+n.margin*2)*i)};tD.qrToImageData=function(e,n,i){let r=n.modules.size,s=n.modules.data,o=tD.getScale(r,i),a=Math.floor((r+i.margin*2)*o),l=i.margin*o,c=[i.color.light,i.color.dark];for(let d=0;d<a;d++)for(let u=0;u<a;u++){let m=(d*a+u)*4,f=i.color.light;if(d>=l&&u>=l&&d<a-l&&u<a-l){let _=Math.floor((d-l)/o),x=Math.floor((u-l)/o);f=c[s[_*r+x]?1:0]}e[m++]=f.r,e[m++]=f.g,e[m++]=f.b,e[m]=f.a}}});var ize=xr($q=>{var vge=gge();function _Lt(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}function CLt(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}$q.render=function(e,n,i){let r=i,s=n;typeof r>"u"&&(!n||!n.getContext)&&(r=n,n=void 0),n||(s=CLt()),r=vge.getOptions(r);let o=vge.getImageWidth(e.modules.size,r),a=s.getContext("2d"),l=a.createImageData(o,o);return vge.qrToImageData(l.data,e,r),_Lt(a,s,o),a.putImageData(l,0,0),s};$q.renderToDataURL=function(e,n,i){let r=i;typeof r>"u"&&(!n||!n.getContext)&&(r=n,n=void 0),r||(r={});let s=$q.render(e,n,r),o=r.type||"image/png",a=r.rendererOpts||{};return s.toDataURL(o,a.quality)}});var sze=xr(rze=>{var xLt=gge();function nze(t,e){let n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function yge(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function bLt(t,e,n){let i="",r=0,s=!1,o=0;for(let a=0;a<t.length;a++){let l=Math.floor(a%e),c=Math.floor(a/e);!l&&!s&&(s=!0),t[a]?(o++,a>0&&l>0&&t[a-1]||(i+=s?yge("M",l+n,.5+c+n):yge("m",r,0),r=0,s=!1),l+1<e&&t[a+1]||(i+=yge("h",o),o=0)):r++}return i}rze.render=function(e,n,i){let r=xLt.getOptions(n),s=e.modules.size,o=e.modules.data,a=s+r.margin*2,l=r.color.light.a?"<path "+nze(r.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+nze(r.color.dark,"stroke")+' d="'+bLt(o,s,r.margin)+'"/>',d='viewBox="0 0 '+a+" "+a+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+d+' shape-rendering="crispEdges">'+l+c+`</svg>
`;return typeof i=="function"&&i(null,m),m}});var QI=xr(yB=>{var wLt=aBe(),_ge=eze(),oze=ize(),SLt=sze();function Cge(t,e,n,i,r){let s=[].slice.call(arguments,1),o=s.length,a=typeof s[o-1]=="function";if(!a&&!wLt())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(r=n,n=e,e=i=void 0):o===3&&(e.getContext&&typeof r>"u"?(r=i,i=void 0):(r=i,i=n,n=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(n=e,e=i=void 0):o===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(l,c){try{let d=_ge.create(n,i);l(t(d,e,i))}catch(d){c(d)}})}try{let l=_ge.create(n,i);r(null,t(l,e,i))}catch(l){r(l)}}yB.create=_ge.create;yB.toCanvas=Cge.bind(null,oze.render);yB.toDataURL=Cge.bind(null,oze.renderToDataURL);yB.toString=Cge.bind(null,function(t,e,n){return SLt.render(t,n)})});var JI,TLt,r3,c2,d2=Q(()=>{me();me();JI=Gs(QI(),1);od();TLt=["qrcElement"],r3=(()=>{let e=class e{constructor(i,r){this.renderer=i,this.sanitizer=r,this.allowEmptyString=!1,this.colorDark="#000000ff",this.colorLight="#ffffffff",this.cssClass="qrcode",this.elementType="canvas",this.errorCorrectionLevel="M",this.margin=4,this.qrdata="",this.scale=4,this.width=10,this.qrCodeURL=new nt,this.context=null}ngOnChanges(){return O(this,null,function*(){yield this.createQRCode()})}isValidQrCodeText(i){return this.allowEmptyString===!1?!(typeof i>"u"||i===""||i==="null"||i===null):!(typeof i>"u")}toDataURL(i){return new Promise((r,s)=>{(0,JI.toDataURL)(this.qrdata,i,(o,a)=>{o?s(o):r(a)})})}toCanvas(i,r){return new Promise((s,o)=>{(0,JI.toCanvas)(i,this.qrdata,r,a=>{a?o(a):s("success")})})}toSVG(i){return new Promise((r,s)=>{(0,JI.toString)(this.qrdata,i,(o,a)=>{o?s(o):r(a)})})}renderElement(i){for(let r of this.qrcElement.nativeElement.childNodes)this.renderer.removeChild(this.qrcElement.nativeElement,r);this.renderer.appendChild(this.qrcElement.nativeElement,i)}createQRCode(){return O(this,null,function*(){this.version&&this.version>40?(console.warn("[angularx-qrcode] max value for `version` is 40"),this.version=40):this.version&&this.version<1?(console.warn("[angularx-qrcode]`min value for `version` is 1"),this.version=1):this.version!==void 0&&isNaN(this.version)&&(console.warn("[angularx-qrcode] version should be a number, defaulting to auto."),this.version=void 0);try{if(!this.isValidQrCodeText(this.qrdata))throw new Error("[angularx-qrcode] Field `qrdata` is empty, set 'allowEmptyString=\"true\"' to overwrite this behaviour.");this.isValidQrCodeText(this.qrdata)&&this.qrdata===""&&(this.qrdata=" ");let i={color:{dark:this.colorDark,light:this.colorLight},errorCorrectionLevel:this.errorCorrectionLevel,margin:this.margin,scale:this.scale,version:this.version,width:this.width},r=this.imageSrc,s=this.imageHeight||40,o=this.imageWidth||40;switch(this.elementType){case"canvas":{let a=this.renderer.createElement("canvas");this.context=a.getContext("2d"),this.toCanvas(a,i).then(()=>{if(this.ariaLabel&&this.renderer.setAttribute(a,"aria-label",`${this.ariaLabel}`),this.title&&this.renderer.setAttribute(a,"title",`${this.title}`),r&&this.context){this.centerImage=new Image(o,s),r!==this.centerImage.src&&(this.centerImage.src=r),s!==this.centerImage.height&&(this.centerImage.height=s),o!==this.centerImage.width&&(this.centerImage.width=o);let l=this.centerImage;l&&(l.onload=()=>{this.context?.drawImage(l,a.width/2-o/2,a.height/2-s/2,o,s)})}this.renderElement(a),this.emitQRCodeURL(a)}).catch(l=>{console.error("[angularx-qrcode] canvas error:",l)});break}case"svg":{let a=this.renderer.createElement("div");this.toSVG(i).then(l=>{this.renderer.setProperty(a,"innerHTML",l);let c=a.firstChild;this.renderer.setAttribute(c,"height",`${this.width}`),this.renderer.setAttribute(c,"width",`${this.width}`),this.renderElement(c),this.emitQRCodeURL(c)}).catch(l=>{console.error("[angularx-qrcode] svg error:",l)});break}case"url":case"img":default:{let a=this.renderer.createElement("img");this.toDataURL(i).then(l=>{this.alt&&a.setAttribute("alt",this.alt),this.ariaLabel&&a.setAttribute("aria-label",this.ariaLabel),a.setAttribute("src",l),this.title&&a.setAttribute("title",this.title),this.renderElement(a),this.emitQRCodeURL(a)}).catch(l=>{console.error("[angularx-qrcode] img/url error:",l)})}}}catch(i){console.error("[angularx-qrcode] Error generating QR Code:",i.message)}})}emitQRCodeURL(i){let r=i.constructor.name;if(r===SVGSVGElement.name){let o=i.outerHTML,a=new Blob([o],{type:"image/svg+xml"}),l=URL.createObjectURL(a),c=this.sanitizer.bypassSecurityTrustUrl(l);this.qrCodeURL.emit(c);return}let s="";r===HTMLCanvasElement.name&&(s=i.toDataURL("image/png")),r===HTMLImageElement.name&&(s=i.src),fetch(s).then(o=>o.blob()).then(o=>URL.createObjectURL(o)).then(o=>this.sanitizer.bypassSecurityTrustUrl(o)).then(o=>{this.qrCodeURL.emit(o)}).catch(o=>{console.error("[angularx-qrcode] Error when fetching image/png URL: "+o)})}};e.\u0275fac=function(r){return new(r||e)(R(Ac),R(Uo))},e.\u0275cmp=_e({type:e,selectors:[["qrcode"]],viewQuery:function(r,s){if(r&1&&ei(TLt,7),r&2){let o;Pt(o=Rt())&&(s.qrcElement=o.first)}},inputs:{allowEmptyString:"allowEmptyString",colorDark:"colorDark",colorLight:"colorLight",cssClass:"cssClass",elementType:"elementType",errorCorrectionLevel:"errorCorrectionLevel",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",margin:"margin",qrdata:"qrdata",scale:"scale",version:"version",width:"width",alt:"alt",ariaLabel:"ariaLabel",title:"title"},outputs:{qrCodeURL:"qrCodeURL"},features:[yn],decls:2,vars:2,consts:[["qrcElement",""]],template:function(r,s){r&1&&ee(0,"div",null,0),r&2&&jr(s.cssClass)},encapsulation:2,changeDetection:0});let t=e;return t})(),c2=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})()});function DLt(t,e){if(t&1&&(h(0,"div",2),ee(1,"qrcode",3),p()),t&2){let n=w();g(),b("qrdata",n.qrData)("width",256)("errorCorrectionLevel","M")}}var Kq,xge=Q(()=>{d2();ri();Vt();me();yi();Vt();d2();Kq=(()=>{let e=class e{constructor(i){this.socketService=i}};e.\u0275fac=function(r){return new(r||e)(R(lt))},e.\u0275cmp=_e({type:e,selectors:[["ng-component"]],standalone:!0,features:[xe],decls:2,vars:1,consts:[["fxFlex","","fxLayoutAlign","center center","fxLayout","column",1,"nxt-page"],["class","p-2",4,"ngIf"],[1,"p-2"],["colorLight","#2A2A2A","colorDark","#FFF",3,"qrdata","width","errorCorrectionLevel"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,DLt,2,3,"div",1),p()),r&2&&(g(),b("ngIf",s.qrData))},dependencies:[At,Yt,oi,qi,Ct,c2,r3],styles:["[_nghost-%COMP%]{height:100%;width:100%}"]});let t=e;return t})()});var ld,B1=Q(()=>{zn();me();od();ld=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i,r=!1){return r?Ie.dateDiffToNowOnlyDaysText(i):Ie.dateDiffToNowText(i)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"fromNowText",type:e,pure:!0,standalone:!0});let t=e;return t})()});var ks,Il=Q(()=>{Vd();me();od();ks=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i,r,s,o){return s&&(!i||i<.01&&i>-.01)?"-":(typeof r!="boolean"&&(r=!0),o&&i>0?"+ "+Wn.toMoneyString(i,"\u20AC",r):Wn.toMoneyString(i,"\u20AC",r))}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"money",type:e,pure:!0,standalone:!0});let t=e;return t})()});var Hn,go=Q(()=>{zn();me();Hn=(()=>{let e=class e{constructor(){}transform(i,r){try{return Ie.format(i,r)}catch{return"?"}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtDate",type:e,pure:!0,standalone:!0});let t=e;return t})()});function ILt(t,e){t&1&&Ln(0,2)}function ALt(t,e){t&1&&(h(0,"thead",0),eu(1,1),p(),h(2,"tbody",0),eu(3,2)(4,3),p(),h(5,"tfoot",0),eu(6,4),p())}function PLt(t,e){t&1&&eu(0,1)(1,2)(2,3)(3,4)}function Yq(t,e){return t.concat(Array.from(e))}function lze(t,e){let n=e.toUpperCase(),i=t.viewContainer.element.nativeElement;for(;i;){let r=i.nodeType===1?i.nodeName:null;if(r===n)return i;if(r==="TABLE")break;i=i.parentNode}return null}var MLt,kLt,Hy,Jq,eZ,cze,eA,qq,dze,uze,Zq,Xq,wge,Sge,_B,Tge,tZ,nD,Dge,Ege,hze,aze,bge,Qq,Mge,kge,Ige,Age,Pge,pze,mze=Q(()=>{Th();dk();Wc();R1();R1();ri();me();me();$n();Cl();MLt=[[["caption"]],[["colgroup"],["col"]],"*"],kLt=["caption","colgroup, col","*"];Hy=new Ri("CDK_TABLE"),Jq=(()=>{let e=class e{constructor(i){this.template=i}};e.\u0275fac=function(r){return new(r||e)(R(Ma))},e.\u0275dir=mi({type:e,selectors:[["","cdkCellDef",""]],standalone:!0});let t=e;return t})(),eZ=(()=>{let e=class e{constructor(i){this.template=i}};e.\u0275fac=function(r){return new(r||e)(R(Ma))},e.\u0275dir=mi({type:e,selectors:[["","cdkHeaderCellDef",""]],standalone:!0});let t=e;return t})(),cze=(()=>{let e=class e{constructor(i){this.template=i}};e.\u0275fac=function(r){return new(r||e)(R(Ma))},e.\u0275dir=mi({type:e,selectors:[["","cdkFooterCellDef",""]],standalone:!0});let t=e;return t})(),eA=(()=>{let e=class e{get name(){return this._name}set name(i){this._setNameInput(i)}get sticky(){return this._sticky}set sticky(i){i!==this._sticky&&(this._sticky=i,this._hasStickyChanged=!0)}get stickyEnd(){return this._stickyEnd}set stickyEnd(i){i!==this._stickyEnd&&(this._stickyEnd=i,this._hasStickyChanged=!0)}constructor(i){this._table=i,this._hasStickyChanged=!1,this._sticky=!1,this._stickyEnd=!1}hasStickyChanged(){let i=this._hasStickyChanged;return this.resetStickyChanged(),i}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(i){i&&(this._name=i,this.cssClassFriendlyName=i.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}};e.\u0275fac=function(r){return new(r||e)(R(Hy,8))},e.\u0275dir=mi({type:e,selectors:[["","cdkColumnDef",""]],contentQueries:function(r,s,o){if(r&1&&(_o(o,Jq,5),_o(o,eZ,5),_o(o,cze,5)),r&2){let a;Pt(a=Rt())&&(s.cell=a.first),Pt(a=Rt())&&(s.headerCell=a.first),Pt(a=Rt())&&(s.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",mn],stickyEnd:[2,"stickyEnd","stickyEnd",mn]},standalone:!0,features:[as([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:e}]),Bs]});let t=e;return t})(),qq=class{constructor(e,n){n.nativeElement.classList.add(...e._columnCssClassName)}},dze=(()=>{let e=class e extends qq{constructor(i,r){super(i,r)}};e.\u0275fac=function(r){return new(r||e)(R(eA),R(fi))},e.\u0275dir=mi({type:e,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],standalone:!0,features:[et]});let t=e;return t})(),uze=(()=>{let e=class e extends qq{constructor(i,r){super(i,r);let s=i._table?._getCellRole();s&&r.nativeElement.setAttribute("role",s)}};e.\u0275fac=function(r){return new(r||e)(R(eA),R(fi))},e.\u0275dir=mi({type:e,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],standalone:!0,features:[et]});let t=e;return t})(),Zq=class{constructor(){this.tasks=[],this.endTasks=[]}},Xq=new Ri("_COALESCED_STYLE_SCHEDULER"),wge=(()=>{let e=class e{constructor(i){this._currentSchedule=null,this._ngZone=Ve(pn)}schedule(i){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(i)}scheduleEnd(i){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(i)}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new Zq,this._ngZone.runOutsideAngular(()=>queueMicrotask(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){let i=this._currentSchedule;this._currentSchedule=new Zq;for(let r of i.tasks)r();for(let r of i.endTasks)r()}this._currentSchedule=null})))}};e.\u0275fac=function(r){return new(r||e)(it(pn))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),Sge=(()=>{let e=class e{constructor(i,r){this.template=i,this._differs=r}ngOnChanges(i){if(!this._columnsDiffer){let r=i.columns&&i.columns.currentValue||[];this._columnsDiffer=this._differs.find(r).create(),this._columnsDiffer.diff(r)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(i){return this instanceof _B?i.headerCell.template:this instanceof Tge?i.footerCell.template:i.cell.template}};e.\u0275fac=function(r){return new(r||e)(R(Ma),R(xy))},e.\u0275dir=mi({type:e,features:[yn]});let t=e;return t})(),_B=(()=>{let e=class e extends Sge{get sticky(){return this._sticky}set sticky(i){i!==this._sticky&&(this._sticky=i,this._hasStickyChanged=!0)}constructor(i,r,s){super(i,r),this._table=s,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(i){super.ngOnChanges(i)}hasStickyChanged(){let i=this._hasStickyChanged;return this.resetStickyChanged(),i}resetStickyChanged(){this._hasStickyChanged=!1}};e.\u0275fac=function(r){return new(r||e)(R(Ma),R(xy),R(Hy,8))},e.\u0275dir=mi({type:e,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",mn]},standalone:!0,features:[Bs,et,yn]});let t=e;return t})(),Tge=(()=>{let e=class e extends Sge{get sticky(){return this._sticky}set sticky(i){i!==this._sticky&&(this._sticky=i,this._hasStickyChanged=!0)}constructor(i,r,s){super(i,r),this._table=s,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(i){super.ngOnChanges(i)}hasStickyChanged(){let i=this._hasStickyChanged;return this.resetStickyChanged(),i}resetStickyChanged(){this._hasStickyChanged=!1}};e.\u0275fac=function(r){return new(r||e)(R(Ma),R(xy),R(Hy,8))},e.\u0275dir=mi({type:e,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",mn]},standalone:!0,features:[Bs,et,yn]});let t=e;return t})(),tZ=(()=>{let e=class e extends Sge{constructor(i,r,s){super(i,r),this._table=s}};e.\u0275fac=function(r){return new(r||e)(R(Ma),R(xy),R(Hy,8))},e.\u0275dir=mi({type:e,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},standalone:!0,features:[et]});let t=e;return t})(),nD=(()=>{let e=class e{constructor(i){this._viewContainer=i,e.mostRecentCellOutlet=this}ngOnDestroy(){e.mostRecentCellOutlet===this&&(e.mostRecentCellOutlet=null)}};e.mostRecentCellOutlet=null,e.\u0275fac=function(r){return new(r||e)(R(Na))},e.\u0275dir=mi({type:e,selectors:[["","cdkCellOutlet",""]],standalone:!0});let t=e;return t})(),Dge=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],standalone:!0,features:[xe],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(r,s){r&1&&eu(0,0)},dependencies:[nD],encapsulation:2});let t=e;return t})(),Ege=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],standalone:!0,features:[xe],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(r,s){r&1&&eu(0,0)},dependencies:[nD],encapsulation:2});let t=e;return t})(),hze=(()=>{let e=class e{constructor(i){this.templateRef=i,this._contentClassName="cdk-no-data-row"}};e.\u0275fac=function(r){return new(r||e)(R(Ma))},e.\u0275dir=mi({type:e,selectors:[["ng-template","cdkNoDataRow",""]],standalone:!0});let t=e;return t})(),aze=["top","bottom","left","right"],bge=class{constructor(e,n,i,r,s=!0,o=!0,a){this._isNativeHtmlTable=e,this._stickCellCss=n,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=s,this._needsPositionStickyOnElement=o,this._positionListener=a,this._cachedCellWidths=[],this._borderCellCss={top:`${n}-border-elem-top`,bottom:`${n}-border-elem-bottom`,left:`${n}-border-elem-left`,right:`${n}-border-elem-right`}}clearStickyPositioning(e,n){let i=[];for(let r of e)if(r.nodeType===r.ELEMENT_NODE){i.push(r);for(let s=0;s<r.children.length;s++)i.push(r.children[s])}this._coalescedStyleScheduler.schedule(()=>{for(let r of i)this._removeStickyStyle(r,n)})}updateStickyColumns(e,n,i,r=!0){if(!e.length||!this._isBrowser||!(n.some(s=>s)||i.some(s=>s))){this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]}));return}this._coalescedStyleScheduler.schedule(()=>{let s=e[0],o=s.children.length,a=this._getCellWidths(s,r),l=this._getStickyStartColumnPositions(a,n),c=this._getStickyEndColumnPositions(a,i),d=n.lastIndexOf(!0),u=i.indexOf(!0),m=this.direction==="rtl",f=m?"right":"left",_=m?"left":"right";for(let x of e)for(let D=0;D<o;D++){let E=x.children[D];n[D]&&this._addStickyStyle(E,f,l[D],D===d),i[D]&&this._addStickyStyle(E,_,c[D],D===u)}this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:d===-1?[]:a.slice(0,d+1).map((x,D)=>n[D]?x:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:u===-1?[]:a.slice(u).map((x,D)=>i[D+u]?x:null).reverse()}))})}stickRows(e,n,i){this._isBrowser&&this._coalescedStyleScheduler.schedule(()=>{let r=i==="bottom"?e.slice().reverse():e,s=i==="bottom"?n.slice().reverse():n,o=[],a=[],l=[];for(let d=0,u=0;d<r.length;d++){if(!s[d])continue;o[d]=u;let m=r[d];l[d]=this._isNativeHtmlTable?Array.from(m.children):[m];let f=m.getBoundingClientRect().height;u+=f,a[d]=f}let c=s.lastIndexOf(!0);for(let d=0;d<r.length;d++){if(!s[d])continue;let u=o[d],m=d===c;for(let f of l[d])this._addStickyStyle(f,i,u,m)}i==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:a,offsets:o,elements:l}):this._positionListener?.stickyFooterRowsUpdated({sizes:a,offsets:o,elements:l})})}updateStickyFooterContainer(e,n){this._isNativeHtmlTable&&this._coalescedStyleScheduler.schedule(()=>{let i=e.querySelector("tfoot");i&&(n.some(r=>!r)?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0,!1))})}_removeStickyStyle(e,n){for(let r of n)e.style[r]="",e.classList.remove(this._borderCellCss[r]);aze.some(r=>n.indexOf(r)===-1&&e.style[r])?e.style.zIndex=this._getCalculatedZIndex(e):(e.style.zIndex="",this._needsPositionStickyOnElement&&(e.style.position=""),e.classList.remove(this._stickCellCss))}_addStickyStyle(e,n,i,r){e.classList.add(this._stickCellCss),r&&e.classList.add(this._borderCellCss[n]),e.style[n]=`${i}px`,e.style.zIndex=this._getCalculatedZIndex(e),this._needsPositionStickyOnElement&&(e.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(e){let n={top:100,bottom:10,left:1,right:1},i=0;for(let r of aze)e.style[r]&&(i+=n[r]);return i?`${i}`:""}_getCellWidths(e,n=!0){if(!n&&this._cachedCellWidths.length)return this._cachedCellWidths;let i=[],r=e.children;for(let s=0;s<r.length;s++){let o=r[s];i.push(o.getBoundingClientRect().width)}return this._cachedCellWidths=i,i}_getStickyStartColumnPositions(e,n){let i=[],r=0;for(let s=0;s<e.length;s++)n[s]&&(i[s]=r,r+=e[s]);return i}_getStickyEndColumnPositions(e,n){let i=[],r=0;for(let s=e.length;s>0;s--)n[s]&&(i[s]=r,r+=e[s]);return i}},Qq=new Ri("CDK_SPL"),Mge=(()=>{let e=class e{constructor(i,r){this.viewContainer=i,this.elementRef=r;let s=Ve(Hy);s._rowOutlet=this,s._outletAssigned()}};e.\u0275fac=function(r){return new(r||e)(R(Na),R(fi))},e.\u0275dir=mi({type:e,selectors:[["","rowOutlet",""]],standalone:!0});let t=e;return t})(),kge=(()=>{let e=class e{constructor(i,r){this.viewContainer=i,this.elementRef=r;let s=Ve(Hy);s._headerRowOutlet=this,s._outletAssigned()}};e.\u0275fac=function(r){return new(r||e)(R(Na),R(fi))},e.\u0275dir=mi({type:e,selectors:[["","headerRowOutlet",""]],standalone:!0});let t=e;return t})(),Ige=(()=>{let e=class e{constructor(i,r){this.viewContainer=i,this.elementRef=r;let s=Ve(Hy);s._footerRowOutlet=this,s._outletAssigned()}};e.\u0275fac=function(r){return new(r||e)(R(Na),R(fi))},e.\u0275dir=mi({type:e,selectors:[["","footerRowOutlet",""]],standalone:!0});let t=e;return t})(),Age=(()=>{let e=class e{constructor(i,r){this.viewContainer=i,this.elementRef=r;let s=Ve(Hy);s._noDataRowOutlet=this,s._outletAssigned()}};e.\u0275fac=function(r){return new(r||e)(R(Na),R(fi))},e.\u0275dir=mi({type:e,selectors:[["","noDataRowOutlet",""]],standalone:!0});let t=e;return t})(),Pge=(()=>{let e=class e{_getCellRole(){if(this._cellRoleInternal===void 0){let i=this._elementRef.nativeElement.getAttribute("role"),r=i==="grid"||i==="treegrid"?"gridcell":"cell";this._cellRoleInternal=this._isNativeHtmlTable&&r==="cell"?null:r}return this._cellRoleInternal}get trackBy(){return this._trackByFn}set trackBy(i){this._trackByFn=i}get dataSource(){return this._dataSource}set dataSource(i){this._dataSource!==i&&this._switchDataSource(i)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(i){this._multiTemplateDataRows=i,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(i){this._fixedLayout=i,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(i,r,s,o,a,l,c,d,u,m,f,_){this._differs=i,this._changeDetectorRef=r,this._elementRef=s,this._dir=a,this._platform=c,this._viewRepeater=d,this._coalescedStyleScheduler=u,this._viewportRuler=m,this._stickyPositioningListener=f,this._onDestroy=new Mi,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._hasAllOutlets=!1,this._hasInitialized=!1,this._cellRoleInternal=void 0,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new nt,this.viewChange=new qs({start:0,end:Number.MAX_VALUE}),this._injector=Ve($o),o||s.nativeElement.setAttribute("role","table"),this._document=l,this._isServer=!c.isBrowser,this._isNativeHtmlTable=s.nativeElement.nodeName==="TABLE"}ngOnInit(){this._setupStickyStyler(),this._dataDiffer=this._differs.find([]).create((i,r)=>this.trackBy?this.trackBy(r.dataIndex,r.data):r),this._viewportRuler.change().pipe(Mr(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(i=>{i?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),e$(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let i=this._dataDiffer.diff(this._renderRows);if(!i){this._updateNoDataRow(),this.contentChanged.next();return}let r=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(i,r,(s,o,a)=>this._getEmbeddedViewArgs(s.item,a),s=>s.item.data,s=>{s.operation===ak.INSERTED&&s.context&&this._renderCellTemplateForItem(s.record.item.rowDef,s.context)}),this._updateRowIndexContext(),i.forEachIdentityChange(s=>{let o=r.get(s.currentIndex);o.context.$implicit=s.item.data}),this._updateNoDataRow(),wh(()=>{this.updateStickyColumnStyles()},{injector:this._injector}),this.contentChanged.next()}addColumnDef(i){this._customColumnDefs.add(i)}removeColumnDef(i){this._customColumnDefs.delete(i)}addRowDef(i){this._customRowDefs.add(i)}removeRowDef(i){this._customRowDefs.delete(i)}addHeaderRowDef(i){this._customHeaderRowDefs.add(i),this._headerRowDefChanged=!0}removeHeaderRowDef(i){this._customHeaderRowDefs.delete(i),this._headerRowDefChanged=!0}addFooterRowDef(i){this._customFooterRowDefs.add(i),this._footerRowDefChanged=!0}removeFooterRowDef(i){this._customFooterRowDefs.delete(i),this._footerRowDefChanged=!0}setNoDataRow(i){this._customNoDataRow=i}updateStickyHeaderRowStyles(){let i=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let s=lze(this._headerRowOutlet,"thead");s&&(s.style.display=i.length?"":"none")}let r=this._headerRowDefs.map(s=>s.sticky);this._stickyStyler.clearStickyPositioning(i,["top"]),this._stickyStyler.stickRows(i,r,"top"),this._headerRowDefs.forEach(s=>s.resetStickyChanged())}updateStickyFooterRowStyles(){let i=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let s=lze(this._footerRowOutlet,"tfoot");s&&(s.style.display=i.length?"":"none")}let r=this._footerRowDefs.map(s=>s.sticky);this._stickyStyler.clearStickyPositioning(i,["bottom"]),this._stickyStyler.stickRows(i,r,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,r),this._footerRowDefs.forEach(s=>s.resetStickyChanged())}updateStickyColumnStyles(){let i=this._getRenderedRows(this._headerRowOutlet),r=this._getRenderedRows(this._rowOutlet),s=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...i,...r,...s],["left","right"]),this._stickyColumnStylesNeedReset=!1),i.forEach((o,a)=>{this._addStickyColumnStyles([o],this._headerRowDefs[a])}),this._rowDefs.forEach(o=>{let a=[];for(let l=0;l<r.length;l++)this._renderRows[l].rowDef===o&&a.push(r[l]);this._addStickyColumnStyles(a,o)}),s.forEach((o,a)=>{this._addStickyColumnStyles([o],this._footerRowDefs[a])}),Array.from(this._columnDefsByName.values()).forEach(o=>o.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let r=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||r,this._forceRecalculateCellWidths=r,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){let i=[],r=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let s=0;s<this._data.length;s++){let o=this._data[s],a=this._getRenderRowsForData(o,s,r.get(o));this._cachedRenderRowsMap.has(o)||this._cachedRenderRowsMap.set(o,new WeakMap);for(let l=0;l<a.length;l++){let c=a[l],d=this._cachedRenderRowsMap.get(c.data);d.has(c.rowDef)?d.get(c.rowDef).push(c):d.set(c.rowDef,[c]),i.push(c)}}return i}_getRenderRowsForData(i,r,s){return this._getRowDefs(i,r).map(a=>{let l=s&&s.has(a)?s.get(a):[];if(l.length){let c=l.shift();return c.dataIndex=r,c}else return{data:i,rowDef:a,dataIndex:r}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Yq(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(r=>{this._columnDefsByName.has(r.name),this._columnDefsByName.set(r.name,r)})}_cacheRowDefs(){this._headerRowDefs=Yq(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Yq(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Yq(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let i=this._rowDefs.filter(r=>!r.when);!this.multiTemplateDataRows&&i.length>1,this._defaultRowDef=i[0]}_renderUpdatedColumns(){let i=(a,l)=>a||!!l.getColumnsDiff(),r=this._rowDefs.reduce(i,!1);r&&this._forceRenderDataRows();let s=this._headerRowDefs.reduce(i,!1);s&&this._forceRenderHeaderRows();let o=this._footerRowDefs.reduce(i,!1);return o&&this._forceRenderFooterRows(),r||s||o}_switchDataSource(i){this._data=[],e$(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),i||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=i}_observeRenderChanges(){if(!this.dataSource)return;let i;e$(this.dataSource)?i=this.dataSource.connect(this):T9(this.dataSource)?i=this.dataSource:Array.isArray(this.dataSource)&&(i=Fr(this.dataSource)),this._renderChangeSubscription=i.pipe(Mr(this._onDestroy)).subscribe(r=>{this._data=r||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((i,r)=>this._renderRow(this._headerRowOutlet,i,r)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((i,r)=>this._renderRow(this._footerRowOutlet,i,r)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(i,r){let s=Array.from(r.columns||[]).map(l=>{let c=this._columnDefsByName.get(l);return c}),o=s.map(l=>l.sticky),a=s.map(l=>l.stickyEnd);this._stickyStyler.updateStickyColumns(i,o,a,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(i){let r=[];for(let s=0;s<i.viewContainer.length;s++){let o=i.viewContainer.get(s);r.push(o.rootNodes[0])}return r}_getRowDefs(i,r){if(this._rowDefs.length==1)return[this._rowDefs[0]];let s=[];if(this.multiTemplateDataRows)s=this._rowDefs.filter(o=>!o.when||o.when(r,i));else{let o=this._rowDefs.find(a=>a.when&&a.when(r,i))||this._defaultRowDef;o&&s.push(o)}return s.length,s}_getEmbeddedViewArgs(i,r){let s=i.rowDef,o={$implicit:i.data};return{templateRef:s.template,context:o,index:r}}_renderRow(i,r,s,o={}){let a=i.viewContainer.createEmbeddedView(r.template,o,s);return this._renderCellTemplateForItem(r,o),a}_renderCellTemplateForItem(i,r){for(let s of this._getCellTemplates(i))nD.mostRecentCellOutlet&&nD.mostRecentCellOutlet._viewContainer.createEmbeddedView(s,r);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let i=this._rowOutlet.viewContainer;for(let r=0,s=i.length;r<s;r++){let a=i.get(r).context;a.count=s,a.first=r===0,a.last=r===s-1,a.even=r%2===0,a.odd=!a.even,this.multiTemplateDataRows?(a.dataIndex=this._renderRows[r].dataIndex,a.renderIndex=r):a.index=this._renderRows[r].dataIndex}}_getCellTemplates(i){return!i||!i.columns?[]:Array.from(i.columns,r=>{let s=this._columnDefsByName.get(r);return i.extractCellTemplate(s)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let i=(r,s)=>r||s.hasStickyChanged();this._headerRowDefs.reduce(i,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(i,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(i,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let i=this._dir?this._dir.value:"ltr";this._stickyStyler=new bge(this._isNativeHtmlTable,this.stickyCssClass,i,this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:Fr()).pipe(Mr(this._onDestroy)).subscribe(r=>{this._stickyStyler.direction=r,this.updateStickyColumnStyles()})}_getOwnDefs(i){return i.filter(r=>!r._table||r._table===this)}_updateNoDataRow(){let i=this._customNoDataRow||this._noDataRow;if(!i)return;let r=this._rowOutlet.viewContainer.length===0;if(r===this._isShowingNoDataRow)return;let s=this._noDataRowOutlet.viewContainer;if(r){let o=s.createEmbeddedView(i.templateRef),a=o.rootNodes[0];o.rootNodes.length===1&&a?.nodeType===this._document.ELEMENT_NODE&&(a.setAttribute("role","row"),a.classList.add(i._contentClassName))}else s.clear();this._isShowingNoDataRow=r,this._changeDetectorRef.markForCheck()}};e.\u0275fac=function(r){return new(r||e)(R(xy),R(Kt),R(fi),wp("role"),R(Va,8),R(Lr),R(Oo),R(NO),R(Xq),R(J2),R(Qq,12),R(pn,8))},e.\u0275cmp=_e({type:e,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(r,s,o){if(r&1&&(_o(o,hze,5),_o(o,eA,5),_o(o,tZ,5),_o(o,_B,5),_o(o,Tge,5)),r&2){let a;Pt(a=Rt())&&(s._noDataRow=a.first),Pt(a=Rt())&&(s._contentColumnDefs=a),Pt(a=Rt())&&(s._contentRowDefs=a),Pt(a=Rt())&&(s._contentHeaderRowDefs=a),Pt(a=Rt())&&(s._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(r,s){r&2&&ki("cdk-table-fixed-layout",s.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",mn],fixedLayout:[2,"fixedLayout","fixedLayout",mn]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],standalone:!0,features:[as([{provide:Hy,useExisting:e},{provide:NO,useClass:lk},{provide:Xq,useClass:wge},{provide:Qq,useValue:null}]),Bs,xe],ngContentSelectors:kLt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(r,s){r&1&&(gr(MLt),Ln(0),Ln(1,1),W(2,ILt,1,0)(3,ALt,7,0)(4,PLt,4,0)),r&2&&(g(2),Je(s._isServer?2:-1),g(),Je(s._isNativeHtmlTable?3:4))},dependencies:[kge,Mge,Age,Ige],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2});let t=e;return t})();pze=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[V9]});let t=e;return t})()});function LLt(t,e){t&1&&Ln(0,2)}function OLt(t,e){t&1&&(h(0,"thead",0),eu(1,1),p(),h(2,"tbody",2),eu(3,3)(4,4),p(),h(5,"tfoot",0),eu(6,5),p())}function NLt(t,e){t&1&&eu(0,1)(1,3)(2,4)(3,5)}var RLt,FLt,fze,gze,vze,yze,_ze,Cze,xze,bze,wze,Sze,Tze,Rge=Q(()=>{me();me();mze();dk();bl();RLt=[[["caption"]],[["colgroup"],["col"]],"*"],FLt=["caption","colgroup, col","*"];fze=(()=>{let e=class e extends Pge{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275cmp=_e({type:e,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(r,s){r&2&&ki("mdc-table-fixed-layout",s.fixedLayout)},exportAs:["matTable"],standalone:!0,features:[as([{provide:Pge,useExisting:e},{provide:Hy,useExisting:e},{provide:Xq,useClass:wge},{provide:NO,useClass:lk},{provide:Qq,useValue:null}]),et,xe],ngContentSelectors:FLt,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(r,s){r&1&&(gr(RLt),Ln(0),Ln(1,1),W(2,LLt,1,0)(3,OLt,7,0)(4,NLt,4,0)),r&2&&(g(2),Je(s._isServer?2:-1),g(),Je(s._isNativeHtmlTable?3:4))},dependencies:[kge,Mge,Age,Ige],styles:[".mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-app-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-app-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-app-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-app-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-app-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-app-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-app-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-app-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-app-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-app-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-app-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-app-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-app-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-app-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-app-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-app-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2});let t=e;return t})(),gze=(()=>{let e=class e extends Jq{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["","matCellDef",""]],standalone:!0,features:[as([{provide:Jq,useExisting:e}]),et]});let t=e;return t})(),vze=(()=>{let e=class e extends eZ{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["","matHeaderCellDef",""]],standalone:!0,features:[as([{provide:eZ,useExisting:e}]),et]});let t=e;return t})(),yze=(()=>{let e=class e extends eA{get name(){return this._name}set name(i){this._setNameInput(i)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},standalone:!0,features:[as([{provide:eA,useExisting:e},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:e}]),et]});let t=e;return t})(),_ze=(()=>{let e=class e extends dze{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],standalone:!0,features:[et]});let t=e;return t})(),Cze=(()=>{let e=class e extends uze{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],standalone:!0,features:[et]});let t=e;return t})(),xze=(()=>{let e=class e extends _B{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",mn]},standalone:!0,features:[as([{provide:_B,useExisting:e}]),Bs,et]});let t=e;return t})(),bze=(()=>{let e=class e extends tZ{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},standalone:!0,features:[as([{provide:tZ,useExisting:e}]),et]});let t=e;return t})(),wze=(()=>{let e=class e extends Dge{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275cmp=_e({type:e,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],standalone:!0,features:[as([{provide:Dge,useExisting:e}]),et,xe],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(r,s){r&1&&eu(0,0)},dependencies:[nD],encapsulation:2});let t=e;return t})(),Sze=(()=>{let e=class e extends Ege{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275cmp=_e({type:e,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],standalone:!0,features:[as([{provide:Ege,useExisting:e}]),et,xe],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(r,s){r&1&&eu(0,0)},dependencies:[nD],encapsulation:2});let t=e;return t})(),Tze=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,pze,zr]});let t=e;return t})()});var CB,Dze=Q(()=>{CB=(()=>{let e=class e{};e.beautyBodyPuts=[{id:"g8Massage",name:"G8-Massage",fullName:"G8-Massage",price:190,durationFrom:45},{id:"afterLipo",name:"After Lipo",fullName:"After Lipo",price:180,durationFrom:60},{id:"massage",name:"Massage",fullName:"Massage",price:140,durationFrom:60},{id:"kobido",name:"Kobido",fullName:"Kobido",price:150,durationFrom:60},{id:"headSpa",name:"Head Spa",fullName:"Head Spa",price:200,durationFrom:90},{id:"PregnancyMassage",name:"Schwangerschaftsmassage",fullName:"Schwangerschaftsmassage",price:150,durationFrom:60},{id:"maderotherapie",name:"Maderotherapie",fullName:"Maderotherapie",price:150,durationFrom:45,durationTill:60},{id:"brasilLymph",name:"Brasilianische Lymphdrainage",children:[{id:"brasilLymph_fullBody",name:"Full Body",fullName:"Brasilianische Lymphdrainage - Full Body",price:250,durationFrom:45,durationTill:60},{id:"brasilLymph_face",name:"Face",fullName:"Brasilianische Lymphdrainage - Face",price:130,durationFrom:30},{id:"brasilLymph_body_face",name:"Body & Face",fullName:"Brasilianische Lymphdrainage - Body & Face",price:350,durationFrom:75,durationTill:90}]},{id:"microneedling",name:"Microneedling",children:[{id:"microNeedling_body",name:"Body",fullName:"Microneedling - Body",price:300,durationFrom:60},{id:"microNeedling_scars",name:"Narben",fullName:"Microneedling - Narben",price:150,durationFrom:30}]},{id:"lipoLaster",name:"Lipo Laser",children:[{id:"lipoLaster_lowerBody",name:"Unterk\xF6rper",fullName:"Lipo Laser - Unterk\xF6rper",price:130,durationFrom:45},{id:"lipoLaster_upperBody",name:"Oberk\xF6rper",fullName:"Lipo Laser - Oberk\xF6rper",price:130,durationFrom:45}]}];let t=e;return t})()});var Fge,_u,ug=Q(()=>{ri();me();Fge=class{constructor(e,n){this._document=n;let i=this._textarea=this._document.createElement("textarea"),r=i.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",i.setAttribute("aria-hidden","true"),i.value=e,i.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(i)}copy(){let e=this._textarea,n=!1;try{if(e){let i=this._document.activeElement;e.select(),e.setSelectionRange(0,e.value.length),n=this._document.execCommand("copy"),i&&i.focus()}}catch{}return n}destroy(){let e=this._textarea;e&&(e.remove(),this._textarea=void 0)}},_u=(()=>{let e=class e{constructor(i){this._document=i}copy(i){let r=this.beginCopy(i),s=r.copy();return r.destroy(),s}beginCopy(i){return new Fge(i,this._document)}};e.\u0275fac=function(r){return new(r||e)(it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var ep,w4=Q(()=>{me();me();ug();Ci();ep=(()=>{let e=class e{constructor(i,r){this.clipboard=i,this.dialogService=r,this.onImagePast=new nt}handlePaste(i){let r=this.getPastedImage(i);if(r){let s=new FileReader;s.readAsDataURL(r),s.onloadend=()=>{this.onImagePast.next(s.result)}}}getPastedImage(i){return i.clipboardData&&i.clipboardData.files&&i.clipboardData.files.length&&this.isImageFile(i.clipboardData.files[0])?i.clipboardData.files[0]:null}isImageFile(i){return i.type.search(/^image\//i)===0}copyToClipboard(i){this.clipboard.copy(i)}};e.\u0275fac=function(r){return new(r||e)(it(_u),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Oc,z1=Q(()=>{pa();Yc();Dze();me();Ci();L1();w4();yi();Oc=(()=>{let e=class e{constructor(i,r,s,o){this.dialogService=i,this.httpClient=r,this.clipboardService=s,this.socketService=o,setTimeout(()=>{this.socketService.disableSocket||this.getNotTranslated()},4e3)}init(){return O(this,null,function*(){this.bodyPuts=yield this.httpClient.get("/assets/body-puts/body-puts.json?temp="+Date.now()).toPromise(),this.bodyPutsDe=yield this.httpClient.get("/assets/body-puts/body-puts-de.json?temp="+Date.now()).toPromise(),this.bodyPutsEn=yield this.httpClient.get("/assets/body-puts/body-puts-en.json?temp="+Date.now()).toPromise(),this.bodyPutsPiercing=yield this.httpClient.get("/assets/body-puts/body-puts-piercing.json?temp="+Date.now()).toPromise(),this.bodyPutsPiercingDe=yield this.httpClient.get("/assets/body-puts/body-puts-piercing-de.json?temp="+Date.now()).toPromise(),this.bodyPutsPiercingEn=yield this.httpClient.get("/assets/body-puts/body-puts-piercing-en.json?temp="+Date.now()).toPromise(),this.piercingTypesDe=yield this.httpClient.get("/assets/body-puts/piercing-types-de.json?temp="+Date.now()).toPromise(),this.piercingTypes=yield this.httpClient.get("/assets/body-puts/piercing-types.json?temp="+Date.now()).toPromise()})}waitForBodyPutsRead(){return O(this,null,function*(){if(!(this.bodyPuts&&this.bodyPutsDe&&this.bodyPutsPiercing&&this.bodyPutsPiercingDe))return new Promise((i,r)=>{setTimeout(()=>i(this.waitForBodyPutsRead()),100)})})}getButtonsFromPath(i,r,s){let o=Sr.clone(i);return r.forEach(l=>o=o[l]),Array.isArray(o)?{buttons:this.getButtonsFromArray(o,s),lastPath:!0}:{buttons:Object.keys(o).map(l=>s[l]?{text:s[l],value:l}:{text:l+" xxx(nicht \xFCbersetzt)",value:l}),lastPath:!1}}getButtonsFromArray(i,r){return i.map(s=>typeof s=="number"?{text:s,value:s}:r[s]?{text:r[s],value:s}:{text:s+' <span style="font-size:12pt">(xxxnicht \xFCbersetzt)</span>',value:s})}showBodyPutChooser(){return O(this,null,function*(){return yield this.showButtons(this.bodyPuts,this.bodyPutsDe)})}showBodyPutPiercingChooser(){return O(this,null,function*(){let i;return i=yield this.showButtons(this.bodyPutsPiercing,this.bodyPutsPiercingDe),i})}showPiercingTypesChooser(){return O(this,null,function*(){let i;return i=yield this.showButtons(this.piercingTypes,this.piercingTypesDe),i})}getGermanPathPiercingType(i){return this.getFromPath(i,this.piercingTypesDe)}getGermanPathBodyPutPiercing(i){return this.getFromPath(i,this.bodyPutsPiercingDe)}getGermanPath(i){return this.getFromPath(i,this.bodyPutsDe)}getEnPath(i){return this.getFromPath(i,this.bodyPutsEn)}getTextFromEvent(i,r){if(!i)return[];r=Object.assign({size:!0},r);let o=[];if(i.workType==="tattoo"&&i?.bodyPuts?.tattoo){for(let a of i.bodyPuts.tattoo)if(a.bodyPut.length>0){let l=this.getGermanPath(a.bodyPut);a.size&&r.size?o.push(a.motive+" ("+a.size+") auf "+l):o.push(a.motive+" auf "+l)}}if(i.workType==="piercing"&&i.bodyPuts?.piercing)for(let a of i.bodyPuts.piercing)o.push(this.getGermanPathBodyPutPiercing(a.bodyPut));return o}getTextFromEventObj(i){let r=[];if(i?.tattoo){for(let s of i.tattoo)if(s.bodyPut.length>0){let o=this.getGermanPath(s.bodyPut);s.size?r.push(s.motive+" ("+s.size+") auf "+o):r.push(s.motive+" auf "+o)}}if(i?.piercing)for(let s of i.piercing)r.push(this.getGermanPathBodyPutPiercing(s.bodyPut));return r}getFromPath(i,r){typeof i=="string"&&(i=i.split(",")),i[i.length-1]==="on"&&i.splice(i.length-1,1);let s="";return r[i.join(",")]?s=r[i.join(",")]:s=i.map(o=>r[o]).join("%"),s}showButtons(o,a){return O(this,arguments,function*(i,r,s=[]){let l=this.getButtonsFromPath(i,s,r),c=l.buttons.sort(Hr.sortString("text")),d=c[0];if(c.length>1){let u=s.map(m=>r[m]).join(" > ");d=yield this.dialogService.showButtonChooser({buttonRows:[c],title:"K\xF6rperstelle",text:u,minWidth:"80%",value:""})}if(d){if(typeof d=="string"&&d==="back")return s.pop(),yield this.showButtons(i,r,s);if(d&&typeof d!="string"&&s.push(d.value),l.lastPath)return s;if(typeof d!="string")return yield this.showButtons(i,r,s)}})}getNotTranslated(){return O(this,null,function*(){yield this.waitForBodyPutsRead(),yield this.checkTranslations(this.bodyPuts,[],this.bodyPutsDe,this.bodyPutsEn,"Tattoo"),yield this.checkTranslations(this.bodyPutsPiercing,[],this.bodyPutsPiercingDe,this.bodyPutsPiercingEn,"Piercing")})}checkTranslations(i,r,s,o,a){return O(this,null,function*(){if(Array.isArray(i))for(let l of i)yield this.checkTranslation(l,r,s,"DE-"+a),yield this.checkTranslation(l,r,o,"EN"+a);else for(let l of Object.keys(i))r.push(l),yield this.checkTranslations(i[l],r,s,o,a),yield this.checkTranslations(i[l],r,o,o,a),r.pop()})}checkTranslation(i,r,s,o){return O(this,null,function*(){let a="";i!=="on"?a=[...r,i].join(","):a=[...r].join(",");try{s[a]||(this.clipboardService.copyToClipboard('"'+a+'": "",'),yield this.dialogService.showOk("\xDCbersetzung fehlt ("+o+`):
"`+a+'": "",'))}catch{debugger}})}getBodyPutBeauty(i){return this._getBodyPutBeauty(i,CB.beautyBodyPuts)}_getBodyPutBeauty(i,r){let s=r.find(o=>o.id===i);if(s)return s;for(let o of r)if(o.children){let a=this._getBodyPutBeauty(i,o.children);if(a)return a}}getBodyPutBeautyText(i){let r=this._getBodyPutBeauty(i,CB.beautyBodyPuts);if(r){let s=r.fullName||r.name;return r.durationFrom?r.durationTill?s+" - "+r.durationFrom+"-"+r.durationTill+" Min - "+r.price.toMoneyString():s+" - "+r.durationFrom+" Min - "+r.price.toMoneyString():s}return""}getBodyPutBeautyTextButton(i){let r=this._getBodyPutBeauty(i,CB.beautyBodyPuts);return r?r.durationFrom?r.durationTill?r.name+`
<div class="text-80">`+r.durationFrom+"-"+r.durationTill+" Min - "+r.price.toMoneyString()+"</div>":r.name+`
<div class="text-80">`+r.durationFrom+" Min - "+r.price.toMoneyString()+"</div>":r.name:""}showBodyPutBeautyChooser(i,r){return O(this,null,function*(){i||(i="Behandlung w\xE4hlen"),r||(r=CB.beautyBodyPuts.sortString("name"));let s=[];for(let a of r)s.push({text:this.getBodyPutBeautyTextButton(a.id),value:a});let o=yield this.dialogService.showButtonChooserNew({title:i,buttonRows:[s]});if(o)return o.value.children?(i+=`
`+o.value.name,yield this.showBodyPutBeautyChooser(i,o.value.children)):o.value.id})}};e.\u0275fac=function(r){return new(r||e)(it(vt),it(Uc),it(ep),it(lt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var rD,iZ=Q(()=>{zn();kl();rD=(()=>{let e=class e{static initTimes(){this.times={},this.times[0]="\u{1F55B}",this.times[.5]="\u{1F567}",this.times[1]="\u{1F550}",this.times[1.5]="\u{1F55C}",this.times[2]="\u{1F551}",this.times[2.5]="\u{1F55D}",this.times[3]="\u{1F552}",this.times[3.5]="\u{1F55E}",this.times[4]="\u{1F553}",this.times[4.5]="\u{1F55F}",this.times[5]="\u{1F554}",this.times[5.5]="\u{1F560}",this.times[6]="\u{1F555}",this.times[6.5]="\u{1F561}",this.times[7]="\u{1F556}",this.times[7.5]="\u{1F562}",this.times[8]="\u{1F557}",this.times[8.5]="\u{1F563}",this.times[9]="\u{1F558}",this.times[9.5]="\u{1F564}",this.times[10]="\u{1F559}",this.times[10.5]="\u{1F565}",this.times[11]="\u{1F55A}",this.times[11.5]="\u{1F566}",this.times[12]="\u{1F55B}"}static getClock(i){this.times||this.initTimes();let r=parseInt(Ie.format(i,"HH"),10),s=parseInt(Ie.format(i,"mm"),10);return r>=12&&(r-=12),s>=30&&(r+=.5),this.times[r]}static getNice(i=1){let r="";for(let s=0;s<i;s++)r+=fn.getRandomFromArray(e.niceEmojis);return r}static getAngry(i=1){let r="";for(let s=0;s<i;s++)r+=fn.getRandomFromArray(e.angryEmojis);return r}static getFunny(i=1){let r="";for(let s=0;s<i;s++)r+=fn.getRandomFromArray(e.funnyEmojis);return r}static getHello(i=1){let r="";for(let s=0;s<i;s++)r+=fn.getRandomFromArray(e.helloEmojis);return r}};e.niceEmojis=["\u2705","\u{1F4AA}","\u{1F44C}","\u{1F496}","\u{1F505}","\u{1F60D}","\u{1F929}","\u{1F917}","\u{1F973}","\u{1F921}","\u{1FAF6}","\u{1F389}","\u{1F38A}"],e.funnyEmojis=["\u{1F47B}","\u{1F47D}","\u{1F383}","\u{1F439}","\u{1F436}","\u{1F423}","\u{1F31E}","\u{1F642}","\u{1F921}"],e.helloEmojis=["\u{1F44B}\u{1F3FD}","\u{1F64B}\u{1F3FC}\u200D\u2642\uFE0F","\u{1FAE1}","\u{1F91D}\u{1F3FB}","\u{1F44B}\u{1F3FD}","\u{1F918}\u{1F3FC}","\u270C","\u{1F64B}\u{1F3FC}\u200D\u2640\uFE0F","\u{1F64B}\u{1F3FC}\u200D\u2642\uFE0F"],e.angryEmojis=["\u{1F624}","\u{1F621}","\u{1F92C}","\u{1F633}","\u{1F628}","\u274C","\u{1F6AB}","\u{1F926}\u{1F3FD}\u200D\u2640\uFE0F","\u{1F937}\u{1F3FD}\u200D\u2642\uFE0F"];let t=e;return t})()});var tA,nZ=Q(()=>{zn();iZ();Vd();i3();me();zy();yi();Ci();Cs();tA=(()=>{let e=class e{constructor(i,r,s,o){this.firestoreService=i,this.socketService=r,this.dialogService=s,this.configService=o}getConfirmationTextFromEvent(i,r,s){return O(this,null,function*(){let o=i.payments.find(l=>l.paymentType==="deposit-back"),a=i.payments.filter(l=>l.paymentType==="deposit"&&l.paymentMethod!=="klarna").reduce((l,c)=>l+c.paymentValue,0);return this.getConfirmationText({customerName:i.customerObj.fullName,start:i.start,appointmentType:i.workType,priceEstimatedFrom:i.priceEstimatedFrom,priceEstimatedTill:i.priceEstimatedTill,priceFix:i.priceFix,lang:r,canceled:s,depositBackValue:o?.paymentValue.toMoneyString(),depositBackMethod:Xo.getPaymentMethodText(o?.paymentMethod),depositPayed:a})})}getConfirmationText(i){return O(this,null,function*(){let r={de:"Preis",en:"Price"},s={de:"ca.",en:"ce."},o={de:"bis",en:"to"},a={de:"Deine bereits geleistete Terminkaution betr\xE4gt",en:"The deposit you have already paid is"},l={de:"Der Betrag den du am Tag des Termins bezahlen musst, betr\xE4gt",en:"The amount you have to pay on the day of the appointment is"},c=this.configService.config.value.studios.find(x=>!x.onlyCash),d=yield i.canceled?this.getAppointmentConfirmationTextCanceled(i.lang):this.getAppointmentConfirmationText(i.lang);!i.canceled&&!d.includes("discount-promotion-info")&&(this.socketService.sendBackofficeHeads(`{{discount-promotion-info}} fehlt in der Termin-Best\xE4tigung, bitte hinzuf\xFCgen
[`+i.lang+`]
aktueller Text:

`+d),this.socketService.sendTelegramAdmin(`{{discount-promotion-info}} fehlt in der Termin-Best\xE4tigung, bitte hinzuf\xFCgen
[`+i.lang+`]
aktueller Text:

`+d));let u=yield this.getAppointmentConfirmationStudioText(c.name,i.lang),m=c.addressOneLine;c.googleMapsLink&&(m+=" "+c.googleMapsLink);let f=r[i.lang]+": ";if(i.priceFix||(f+=s[i.lang]+" "),i.priceEstimatedTill?f+=Wn.toMoneyString(i.priceEstimatedFrom)+" "+o[i.lang]+" "+Wn.toMoneyString(i.priceEstimatedTill):f+=Wn.toMoneyString(i.priceEstimatedFrom),!i.depositBackValue&&i.depositPayed){f+=`
`+a[i.lang]+" "+i.depositPayed.toMoneyString();let x="";i.priceFix||(x+=s[i.lang]+" "),i.priceEstimatedTill?x+=Wn.toMoneyString(i.priceEstimatedFrom-i.depositPayed)+" bis "+Wn.toMoneyString(i.priceEstimatedTill-i.depositPayed):x+=Wn.toMoneyString(i.priceEstimatedFrom-i.depositPayed),f+=`
`+l[i.lang]+" "+x}let _="";if(i.discountPromotion&&i.discountPromotion.id!=="none"){let x="100",D="7";this.configService.config.value.studioRegion==="MA"&&(x="80",D="6"),i.discountPromotion.additionalPayAfterEnd&&(_="*Solltest das Tattoo nicht in der vorgeschriebenen Zeit ("+D+" Stunden) fertig werden, berechnen wir jede weitere Stunde mit "+x+"\u20AC.",i.lang!=="de"&&(_=(yield this.socketService.translate(_,i.lang)).text)),_=i.discountPromotion.name+`
`+_}return d=d.replaceAll("{{kunde_name}}",i.customerName),d=d.replaceAll("{{customer-name}}",i.customerName),d=d.replaceAll("{{uhr_icon}}",rD.getClock(i.start)),d=d.replaceAll("{{clock-icon}}",rD.getClock(i.start)),d=d.replaceAll("*{{preis}}*",f),d=d.replaceAll("{{preis}}",f),d=d.replaceAll("{{datum_uhrzeit}}",Ie.format(i.start,"EEEE, dd.MM.yyyy HH:mm",i.lang)),d=d.replaceAll("{{date-time}}",Ie.format(i.start,"EEEE, dd.MM.yyyy HH:mm",i.lang)),d=d.replaceAll("{{studio_adresse}}",m),d=d.replaceAll("{{studio_text}}",u),d=d.replaceAll("{{deposit-back-value}}",i.depositBackValue),d=d.replaceAll("{{deposit-back-method}}",i.depositBackMethod),d=d.replaceAll("{{discount-promotion-info}}",_),i.appointmentType==="tattoo"?d=d.replaceAll("{{einverst\xE4ndniserkl\xE4rung_link}}",c.acceptanceLinkTattoo):i.appointmentType==="piercing"&&(d=d.replaceAll("{{einverst\xE4ndniserkl\xE4rung_link}}",c.acceptanceLinkPiercing)),i.depositBackValue?d=d.replace(/<if-deposit-back>([\S\s]*)<\/if-deposit-back>/g,(x,D)=>D):d=d.replace(/<if-deposit-back>([\S\s]*)<\/if-deposit-back>/g,""),d=d.replaceAll(`



`,`

`),d=d.replaceAll(`


`,`

`),this.configService.config.value.studioRegion==="AC"&&i.start>="2023-11-20".dateParse()&&i.start<="2023-11-27".dateParse()&&(d+=`

Aufgrund von Umbauma\xDFnahmen k\xF6nnen unsere Kundenparkpl\xE4tze aktuell leider nicht genutzt werden.`),d.trim()})}getAppointmentConfirmationText(i){return O(this,null,function*(){return yield this.socketService.getAppointmentConfirmationText(i)})}getAppointmentConfirmationTextCanceled(i){return O(this,null,function*(){return yield this.socketService.getAppointmentConfirmationTextCanceled(i)})}setAppointmentConfirmationText(i,r){this.socketService.setAppointmentConfirmationText(i,r)}getAppointmentConfirmationStudioText(i,r){return O(this,null,function*(){return yield this.socketService.getAppointmentConfirmationStudioText(i,r)})}showEditAppointmentConfirmationText(i){return O(this,null,function*(){let r=yield this.getAppointmentConfirmationText(i),o=yield(yield this.dialogService.showTextareaOld({message:"<strong>TERMINBEST\xC4TIGUNG</strong> - {{kunde_name}} {{uhr_icon}} {{datum_uhrzeit}} {{studio_adresse}}",placeholder:"",prompt:r})).afterClosed().toPromise();o&&this.socketService.setAppointmentConfirmationText(o,i)})}showEditAppointmentConfirmationTextCanceled(i){return O(this,null,function*(){let r=yield this.getAppointmentConfirmationTextCanceled(i),o=yield(yield this.dialogService.showTextareaOld({message:"<strong>TERMINBEST\xC4TIGUNG</strong> - {{kunde_name}} {{uhr_icon}} {{datum_uhrzeit}} {{studio_adresse}}",placeholder:"",prompt:r})).afterClosed().toPromise();o&&this.socketService.setAppointmentConfirmationTextCanceled(o,i)})}showEditAppointmentConfirmationStudioText(i){return O(this,null,function*(){let r=yield this.dialogService.showButtons("Studio",{buttons:this.configService.config.value.studios.map(s=>({text:s.name,value:s.name}))});if(typeof r!="string"&&r.value){let s=yield this.getAppointmentConfirmationStudioText(r.value,i),a=yield(yield this.dialogService.showTextareaOld({message:"<strong>TERMINBEST\xC4TIGUNG ZUSATZTEXT "+r.value+"</strong>",placeholder:"",prompt:s})).afterClosed().toPromise();a&&this.socketService.setAppointmentConfirmationStudioText(r.value,a,i)}})}};e.\u0275fac=function(r){return new(r||e)(it(ff),it(lt),it(vt),it(Xi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function BLt(t,e){if(t&1){let n=re();h(0,"nxt-button",13),F("click",function(){V(n);let r=w(2);return B(r.sendAppointmentConfirmations())}),y(1,"Eine Terminbest\xE4tigung schicken"),p()}}function zLt(t,e){if(t&1){let n=re();h(0,"nxt-button",13),F("click",function(){V(n);let r=w(2);return B(r.sendAppointmentConfirmations())}),y(1),p()}if(t&2){let n=w(2);g(),Ke("",n.sendAppointmentConfirmationsCount," Terminbest\xE4tigungen schicken")}}function HLt(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",13),F("click",function(){V(n);let r=w(2);return B(r.dialogRef.close())}),y(1,"close"),p()}}function GLt(t,e){t&1&&(h(0,"th",22),y(1,"Termin"),p())}function WLt(t,e){if(t&1&&(h(0,"td",23)(1,"div",24)(2,"nxt-button-icon"),y(3,"edit_calendar"),p(),y(4),p()()),t&2){let n=e.$implicit;g(4),Ke(" ",n.workType==="tattoo"?"Tattoo":"Piercing"," ")}}function ULt(t,e){t&1&&(h(0,"th",22),y(1,"Status"),p())}function jLt(t,e){t&1&&(h(0,"div"),y(1,"Abgesagt"),p())}function $Lt(t,e){t&1&&(h(0,"div"),y(1,"Geschlossen"),p())}function KLt(t,e){t&1&&(h(0,"div"),y(1,"Offen"),p())}function YLt(t,e){if(t&1&&(h(0,"td",25),W(1,jLt,2,0,"div",26)(2,$Lt,2,0,"div",26)(3,KLt,2,0,"div",26),p()),t&2){let n=e.$implicit;jr(n.status),g(),b("ngIf",n.status==="canceled"),g(),b("ngIf",n.status==="closed"),g(),b("ngIf",n.status==="future")}}function qLt(t,e){t&1&&ee(0,"tr",27)}function ZLt(t,e){t&1&&ee(0,"tr",28)}function XLt(t,e){if(t&1&&(h(0,"mat-table",14),vs(1,15),W(2,GLt,2,0,"th",16)(3,WLt,5,1,"td",17),ys(),vs(4,18),W(5,ULt,2,0,"th",16)(6,YLt,4,5,"td",19),ys(),W(7,qLt,1,0,"tr",20)(8,ZLt,1,0,"tr",21),p()),t&2){let n=w(2);b("dataSource",n.data.events),g(7),b("matHeaderRowDef",n.displayedColumns),g(),b("matRowDefColumns",n.displayedColumns)}}function QLt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2).$implicit;g(),ye(n.improveStatus.label)}}function JLt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2).$implicit;g(),ye(n.improveStatus.label2)}}function eOt(t,e){if(t&1&&(h(0,"div",24)(1,"nxt-button-icon",48),y(2,"construction"),p(),W(3,QLt,2,1,"div",26)(4,JLt,2,1,"div",26),p()),t&2){let n=w().$implicit;g(3),b("ngIf",n.improveStatus.label),g(),b("ngIf",n.improveStatus.label2)}}function tOt(t,e){t&1&&(h(0,"div"),y(1,"Abgesagt"),p())}function iOt(t,e){t&1&&(h(0,"div"),y(1,"Geschlossen"),p())}function nOt(t,e){t&1&&(h(0,"div"),y(1,"Offen"),p())}function rOt(t,e){t&1&&(h(0,"div",49),y(1,"FIX"),p())}function sOt(t,e){t&1&&ee(0,"div",50)}function oOt(t,e){t&1&&ee(0,"br")}function aOt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p()),t&2){let n=w().$implicit;g(),ye(tt(2,1,n.priceEstimatedTill))}}function lOt(t,e){if(t&1&&(h(0,"div",51)(1,"div",52),y(2),p()()),t&2){let n=e.$implicit,i=e.index;b("ngClass",sn(2,VLt,i!==0)),g(2),Ke(" ",n," ")}}function cOt(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",55),Xe("valueChange",function(r){V(n);let s=w(2).$implicit,o=w(3);return Ze(o.appointmentConfirmations[s.id],r)||(o.appointmentConfirmations[s.id]=r),B(r)}),F("valueChange",function(){V(n);let r=w(5);return B(r.calcShowAppointmentConfirmations())}),p()}if(t&2){let n=w(2).$implicit,i=w(3);qe("value",i.appointmentConfirmations[n.id])}}function dOt(t,e){if(t&1&&(h(0,"td",53),W(1,cOt,1,1,"nxt-slide-toggle",54),p()),t&2){let n=w().$implicit;g(),b("ngIf",n.status==="future")}}function uOt(t,e){t&1&&ee(0,"td",53)}function hOt(t,e){t&1&&ee(0,"td",53)}function pOt(t,e){if(t&1){let n=re();h(0,"tr")(1,"td",33),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.openEvent(r))}),h(2,"div",24)(3,"nxt-button-icon"),y(4,"edit_calendar"),p(),y(5),p()(),h(6,"td",33),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.createImproveEvent(r))}),W(7,eOt,5,2,"div",34),p(),h(8,"td",35),W(9,tOt,2,0,"div",26)(10,iOt,2,0,"div",26)(11,nOt,2,0,"div",26),p(),h(12,"td",36)(13,"div")(14,"div"),y(15),Ce(16,"nxtDate"),ee(17,"br"),y(18),Ce(19,"nxtDate"),Ce(20,"nxtDate"),p(),h(21,"div",37),y(22),Ce(23,"fromNowText"),p()()(),h(24,"td",38)(25,"div",39)(26,"div",40),W(27,rOt,2,0,"div",41),h(28,"div"),y(29),p(),W(30,sOt,1,0,"div",42),p()()(),h(31,"td",36),y(32),W(33,oOt,1,0,"br",26),h(34,"div"),y(35),Ce(36,"money"),p(),W(37,aOt,3,3,"div",26),p(),h(38,"td"),y(39),Ce(40,"money"),p(),h(41,"td",43)(42,"div",44)(43,"div",45),W(44,lOt,3,4,"div",46),p()()(),W(45,dOt,2,1,"td",47)(46,uOt,1,0,"td",47)(47,hOt,1,0,"td",47),p()}if(t&2){let n=e.$implicit,i=w(3);g(5),Ke(" ",n.workType==="piercing"?"Piercing":"Tattoo"," "),g(2),b("ngIf",n.workType==="tattoo"),g(),jr(n.status),g(),b("ngIf",n.status==="canceled"),g(),b("ngIf",n.status==="closed"),g(),b("ngIf",n.status==="future"),g(4),ye(Nt(16,23,n.start,"dd.MM.yyyy")),g(3),cn("",Nt(19,26,n.start,"HH:mm")," - ",Nt(20,29,n.end,"HH:mm"),""),g(4),ye(tt(23,32,n.start)),g(5),b("ngIf",n.artistFix),g(2),ye(n.artist),g(),b("ngIf",!n.artistFix&&i.isBackoffice&&n.status==="future"),g(2),Ke(" ",n.priceFix?"fix":""," "),g(),b("ngIf",n.priceFix),g(2),ye(tt(36,34,n.priceEstimatedFrom)),g(2),b("ngIf",n.priceEstimatedTill),g(2),ye(tt(40,36,n.paymentSum)),g(5),b("ngForOf",i.motiveTexts[n.id]),g(),b("ngIf",i.isBackoffice),g(),b("ngIf",!i.isBackoffice),g(),b("ngIf",!i.isBackoffice)}}function mOt(t,e){if(t&1&&(h(0,"table",29)(1,"thead")(2,"tr")(3,"th",30),y(4,"Termin"),p(),h(5,"th",30),y(6,"Nachstechen"),p(),h(7,"th",30),y(8,"Status"),p(),h(9,"th",30),y(10,"Datum"),p(),h(11,"th",30),y(12,"Artist"),p(),h(13,"th",30),y(14,"Preis"),p(),h(15,"th",30),y(16,"Bezahlt"),p(),h(17,"th",31),y(18,"Motiv & Stelle"),p(),ee(19,"th")(20,"th"),p()(),W(21,pOt,48,38,"tr",32),p()),t&2){let n=w(2);g(21),b("ngForOf",n.data.events)}}function fOt(t,e){if(t&1&&(h(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),y(4),Ce(5,"money"),p(),h(6,"div",5)(7,"table",6)(8,"tr")(9,"td"),y(10),p(),h(11,"td"),y(12,"abgesagt"),p()(),h(13,"tr")(14,"td"),y(15),p(),h(16,"td"),y(17,"geschlossene"),p()(),h(18,"tr")(19,"td"),y(20),p(),h(21,"td"),y(22,"zuk\xFCnftige"),p()()()(),h(23,"div",7),W(24,BLt,2,0,"nxt-button",8)(25,zLt,2,1,"nxt-button",8),p()(),W(26,HLt,2,0,"nxt-button-icon",8),p(),h(27,"div",9)(28,"div",10),W(29,XLt,9,3,"mat-table",11)(30,mOt,22,1,"table",12),p()()()),t&2){let n=w();g(4),cn("",n.data.contact.fullName," - ",tt(5,10,n.totalPayed),""),g(6),ye(n.data.contact.canceledEvents.length),g(5),ye(n.data.contact.closedEvents.length),g(5),ye(n.data.contact.events.length),g(4),b("ngIf",n.sendAppointmentConfirmationsCount===1),g(),b("ngIf",n.sendAppointmentConfirmationsCount>1),g(),b("ngIf",n.dialogRef),g(3),b("ngIf",!1),g(),b("ngIf",!0)}}var VLt,rZ,Oge=Q(()=>{My();Gi();pa();Rv();B1();Il();go();oo();An();Mp();Rge();ls();Zi();Vt();ri();zn();me();ji();yi();z1();Ci();nZ();Kr();Vt();An();VLt=t=>({divider:t});rZ=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l){super(),this.dialogRef=i,this.socketService=r,this.bodyPutService=s,this.dialogService=o,this.appointmentConfirmationService=a,this.loginService=l,this.motiveTexts={},this.totalPayed=0,this.displayedColumns=["event","status"],this.isFromCalendarEventEditComponent=!1,this.contactId="",this.appointmentConfirmations={},this.sendAppointmentConfirmationsCount=0,this.isBackoffice=this.loginService.isBackoffice(),this.pushSocketSubscription=this.socketService.subscribeNew("eventChanged",c=>O(this,null,function*(){this.data.events.map(d=>d.id).includes(c.eventId)&&this.load(this.contactId)}))}nxtOnDestroy(){}ngOnInit(){setTimeout(()=>{this.contactId||this.load("people/c3605986183168815524")},1e3)}load(i){return O(this,null,function*(){this.contactId=i,this.data=yield this.socketService.getEventsByContactId(this.contactId),this.data.events&&(this.data.events=this.data.events.sortNumber("start",!0));for(let r of this.data.events)r.improveStatus=Vu.getImproveStatus(r,this.data.events);this.totalPayed=this.data.events.reduce((r,s)=>r+(s.status==="closed"?s.paymentSum:0),0),this.data.events.forEach(r=>{this.motiveTexts[r.id]=this.bodyPutService.getTextFromEvent(r)})})}openEvent(i){this.isFromCalendarEventEditComponent?this.dialogRef.close({eventId:i.id}):this.dialogService.showEvent(i.id,"ArtistEventsViewComponent")}calcShowAppointmentConfirmations(){this.sendAppointmentConfirmationsCount=0;for(let i of Object.keys(this.appointmentConfirmations))this.appointmentConfirmations[i]&&this.sendAppointmentConfirmationsCount++}clearShowAppointmentConfirmations(){this.sendAppointmentConfirmationsCount=0,this.appointmentConfirmations={}}sendAppointmentConfirmations(){return O(this,null,function*(){if(!Kc.isValid(this.data.contact.mobileFormatted)){yield this.dialogService.showOk(this.data.contact.fullName+" hat keine g\xFCltige Handynummer: "+this.data.contact.mobileFormatted),this.clearShowAppointmentConfirmations();return}let i=yield this.dialogService.showButtons("Welche Sprache",{buttons:[{text:"Abbrechen",value:null},{text:"Deutsch senden",value:"de"},{text:"Englisch senden",value:"en"}]});for(let r of Object.keys(this.appointmentConfirmations))if(this.appointmentConfirmations[r]){let s=this.data.events.find(o=>o.id===r);if(i.value){let o=yield this.appointmentConfirmationService.getConfirmationTextFromEvent(s,i.value,s.status==="canceled");yield this.socketService.sendWhatsAppMessage(this.data.contact.mobileFormatted,o)}}this.clearShowAppointmentConfirmations()})}sendEventInfoToCustomer(){this.dialogService.showOk("Was genau soll hier geschickt werden?")}setArtistFix(i){this.socketService.updateCalendarEventProperty(i.id,{artistFix:!0}),i.artistFix=!0}createImproveEvent(i){return O(this,null,function*(){if(i.workType==="tattoo"){let r="Nachstechen vom "+i.start.dateFormat("dd.MM.yyyy")+" bei "+i.artist,s=i.improveStatus.status==="free";if(i.improveStatus.status==="check"){let l=this.bodyPutService.getTextFromEvent(i).join(`
oder
`);s=yield this.dialogService.showYesNo(i.improveStatus.text+`

`+l,{yesText:"Es ist kostenlos",noText:"es ist kostenpflichtig"})}s?r+=" (Kostenlos)":r+=" (Kostenpflichtig)";let o=Sr.clone(i.bodyPuts.tattoo);o.forEach(l=>l.motive=l.motive.replaceAll(" (nachstechen)","")+" (nachstechen)"),yield this.dialogService.showOk("Versuche ein Termin bei "+i.artist+" zu finden");let a={dateString:Ie.formatNowDate(),timeFromString:"11:00",showEventFinder:!0,skill:i.skill,info:r,bodyPutsTattoo:o,priceEstimatedFrom:s?0:NaN,customer:i.customer,improve:!0};this.isFromCalendarEventEditComponent?this.dialogRef.close({newEventData:a}):this.dialogService.newEvent({timeFromString:"11:00",showEventFinder:!0,skill:i.skill,info:r,bodyPutsTattoo:o,priceEstimatedFrom:s?0:NaN,customer:i.customer})}})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(Oc),R(vt),R(tA),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-events-view"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["class","nxt-page","fxLayout","column",4,"ngIf"],["fxLayout","column",1,"nxt-page"],["fxLayoutAlign","start start","fxLayout","row",1,"w-full","p-3",2,"border","0px solid red"],["fxFlex","","fxLayoutAlign","center center","fxLayout","column"],[1,"text-150"],["fxLayout","column"],[1,"header-event-count-table",2,"width","fit-content"],[1,"pt-2"],[3,"click",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center",2,"overflow","hidden","border","0px solid blue"],["fxLayout","column",2,"overflow","auto","max-width","100%"],[3,"dataSource",4,"ngIf"],["class","nxt-table-new text-90",4,"ngIf"],[3,"click"],[3,"dataSource"],["matColumnDef","event"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["mat-cell","","class","no-wrap td-center","style","font-size: 80%",3,"class",4,"matCellDef"],["mat-header-row","","sticky","","style","position: sticky;",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["fxLayout","column","fxLayoutAlign","center center"],["mat-cell","",1,"no-wrap","td-center",2,"font-size","80%"],[4,"ngIf"],["mat-header-row","","sticky","",2,"position","sticky"],["mat-row",""],[1,"nxt-table-new","text-90"],[1,"text-center"],[2,"min-width","300px"],[4,"ngFor","ngForOf"],[2,"text-align","center","cursor","pointer",3,"click"],["fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],[1,"no-wrap","td-center",2,"font-size","80%"],[1,"no-wrap","td-center"],[2,"font-size","80%"],[1,"no-wrap","text-center",2,"padding","0"],[1,"p-relative","h-100","w-full"],["fxLayout","column",1,"h-100","w-full"],["class","text-70",4,"ngIf"],["class","pt-1",4,"ngIf"],[2,"padding","0","max-width","500px"],[1,"p-relative","h-100"],["fxLayout","column",1,"h-100"],["fxFlex","","fxLayout","column","fxLayoutAlign","center start",3,"ngClass",4,"ngFor","ngForOf"],["style","padding: 0",4,"ngIf"],["matTooltip","Nachstech-Termin anlegen"],[1,"text-70"],[1,"pt-1"],["fxFlex","","fxLayout","column","fxLayoutAlign","center start",3,"ngClass"],[1,"no-wrapx",2,"padding","10px 20px"],[2,"padding","0"],[3,"value","valueChange",4,"ngIf"],[3,"valueChange","value"]],template:function(r,s){r&1&&W(0,fOt,31,12,"div",0),r&2&&b("ngIf",s.data)},dependencies:[Ct,At,Yt,oi,qi,Lt,an,fze,yze,vze,_ze,gze,Cze,xze,wze,bze,Sze,Hi,dl,_s,Dn,No,Nn,Hn,ks,ld],styles:["[_nghost-%COMP%]{display:flex;height:100%;width:100%}.canceled[_ngcontent-%COMP%]{color:#ff3737}.closed[_ngcontent-%COMP%]{color:#2876ff}.future[_ngcontent-%COMP%]{color:#2b9100}.divider[_ngcontent-%COMP%]{border-top:1px solid #bbb;width:100%}.header-event-count-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{text-align:right}.header-event-count-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:0 5px}.fix-artist-button[_ngcontent-%COMP%]     button{font-size:12px!important;padding:5px 8px!important}"]});let t=e;return t})()});var Is,tp=Q(()=>{qn();pa();Is=class t{static getErrors(e){let n=[];e.markAllAsTouched();for(let i in e.controls)if(e.controls.hasOwnProperty(i)){let r=e?.get(i);if(r instanceof yIe)for(let s of r.controls)n=n.concat(this.getErrors(s));else r instanceof sIe?n=n.concat(this.getErrors(r)):r?.errors&&n.push(r.name??i)}return n}static showErrorsTrueIfNoError(e,n,i=[]){e.markAllAsTouched();let r=t.getErrors(e);return i?.length>0&&(r=[...i,...r]),r.length>0?(requestAnimationFrame(()=>{n.showOk(`Folgende Eingaben fehlen:
- `+r.join(`
- `))}),!1):!0}static setForm(e,n,i={}){for(let r of oa(e.controls))if(e.controls[r]instanceof j_){e.controls[r].controls.length=0,n[r]||(n[r]=[]);for(let s of n[r])e.controls[r].controls.push(i[r](s))}else e.controls[r].setValue(n[r])}static setFromFormArray(e,n,i={}){for(let r of e.controls)t.setForm(r,n,i)}static setValidators(e,n){e&&(e.setValidators(n),e.updateValueAndValidity({emitEvent:!1}))}}});var sD,sZ=Q(()=>{sD=(()=>{let e=class e{static get codes(){return e._codes||(e._codes=e.list.map(i=>i.code)),e._codes}static get names(){return e._name||(e._name=e.list.map(i=>i.name)),e._name}static isEu(i){return!!e.list.find(r=>r.code===i)?.eu}static getNameByCode(i){return e.names[e.codes.indexOf(i)]}static getCodeByName(i){return e.codes[e.names.indexOf(i)]}};e.list=[{code:"AE",name:"Vereinigte Arabische Emirate"},{code:"AL",name:"Albanien"},{code:"AM",name:"Armenien"},{code:"AR",name:"Argentinien"},{code:"AT",name:"\xD6sterreich",eu:!0},{code:"AU",name:"Australien"},{code:"AZ",name:"Aserbaidschan"},{code:"BA",name:"Bosnien und Herzegowina"},{code:"BD",name:"Bangladesch"},{code:"BE",name:"Belgien",eu:!0},{code:"BG",name:"Bulgarien",eu:!0},{code:"BH",name:"Bahrain"},{code:"BO",name:"Bolivien"},{code:"BR",name:"Brasilien"},{code:"BS",name:"Bahamas"},{code:"BY",name:"Belarus"},{code:"BZ",name:"Belize"},{code:"CA",name:"Kanada"},{code:"CH",name:"Schweiz"},{code:"CL",name:"Chile"},{code:"CO",name:"Kolumbien"},{code:"CR",name:"Costa Rica"},{code:"CU",name:"Kuba"},{code:"CY",name:"Zypern",eu:!0},{code:"CZ",name:"Tschechische Republik",eu:!0},{code:"DE",name:"Deutschland",eu:!0},{code:"DK",name:"D\xE4nemark",eu:!0},{code:"DO",name:"Dominikanische Republik"},{code:"EC",name:"Ecuador"},{code:"EE",name:"Estland",eu:!0},{code:"EG",name:"\xC4gypten"},{code:"ES",name:"Spanien",eu:!0},{code:"ET",name:"\xC4thiopien"},{code:"FI",name:"Finnland",eu:!0},{code:"FR",name:"Frankreich",eu:!0},{code:"GB",name:"Vereinigtes K\xF6nigreich",eu:!0},{code:"GE",name:"Georgien"},{code:"GH",name:"Ghana"},{code:"GR",name:"Griechenland",eu:!0},{code:"GT",name:"Guatemala"},{code:"GY",name:"Guyana"},{code:"HK",name:"Hongkong"},{code:"HN",name:"Honduras"},{code:"HR",name:"Kroatien",eu:!0},{code:"HT",name:"Haiti"},{code:"HU",name:"Ungarn",eu:!0},{code:"ID",name:"Indonesien"},{code:"IE",name:"Irland",eu:!0},{code:"IL",name:"Israel"},{code:"IN",name:"Indien"},{code:"IQ",name:"Irak"},{code:"IR",name:"Iran"},{code:"IS",name:"Island"},{code:"IT",name:"Italien",eu:!0},{code:"JM",name:"Jamaika"},{code:"JO",name:"Jordanien"},{code:"JP",name:"Japan"},{code:"KE",name:"Kenia"},{code:"KH",name:"Kambodscha"},{code:"KR",name:"S\xFCdkorea"},{code:"KW",name:"Kuwait"},{code:"KY",name:"Kaimaninseln"},{code:"KZ",name:"Kasachstan"},{code:"LA",name:"Laos"},{code:"LB",name:"Libanon"},{code:"LK",name:"Sri Lanka"},{code:"LT",name:"Litauen",eu:!0},{code:"LU",name:"Luxemburg",eu:!0},{code:"LV",name:"Lettland",eu:!0},{code:"MA",name:"Marokko"},{code:"MN",name:"Mongolei"},{code:"MT",name:"Malta",eu:!0},{code:"MV",name:"Malediven"},{code:"MX",name:"Mexiko"},{code:"MY",name:"Malaysia"},{code:"NG",name:"Nigeria"},{code:"NI",name:"Nicaragua"},{code:"NL",name:"Niederlande",eu:!0},{code:"NO",name:"Norwegen"},{code:"NZ",name:"Neuseeland"},{code:"OM",name:"Oman"},{code:"PA",name:"Panama"},{code:"PE",name:"Peru"},{code:"PH",name:"Philippinen"},{code:"PK",name:"Pakistan"},{code:"PL",name:"Polen",eu:!0},{code:"PT",name:"Portugal",eu:!0},{code:"PY",name:"Paraguay"},{code:"QA",name:"Katar"},{code:"RO",name:"Rum\xE4nien",eu:!0},{code:"RS",name:"Serbien"},{code:"RU",name:"Russland"},{code:"SA",name:"Saudi-Arabien"},{code:"SE",name:"Schweden",eu:!0},{code:"SG",name:"Singapur"},{code:"SK",name:"Slowenien",eu:!0},{code:"SI",name:"Slowakei",eu:!0},{code:"SR",name:"Suriname"},{code:"SV",name:"El Salvador"},{code:"TH",name:"Thailand"},{code:"TN",name:"Tunesien"},{code:"TR",name:"T\xFCrkei"},{code:"TT",name:"Trinidad und Tobago"},{code:"TW",name:"Taiwan"},{code:"TZ",name:"Tansania"},{code:"UA",name:"Ukraine"},{code:"UG",name:"Uganda"},{code:"US",name:"Vereinigte Staaten"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Usbekistan"},{code:"VE",name:"Venezuela"},{code:"VN",name:"Vietnam"},{code:"ZA",name:"S\xFCdafrika"},{code:"ZM",name:"Sambia"},{code:"ZW",name:"Simbabwe"}];let t=e;return t})()});var vf,sx=Q(()=>{vf=(()=>{let e=class e{static get nxtUsed(){if(e._nxtUsed.length===0)for(let i of e.nxtUsedCodes){let r=e.languageCodes.find(s=>s.code===i);r&&e._nxtUsed.push(r)}return e._nxtUsed}static getTextByCode(i){return e.languageCodes.find(r=>r.code===i)?.name}static getCodeByText(i){return e.languageCodes.find(r=>r.name===i)?.code}static getLanguageFromCountry(i){let r=e.countryLangMap[i];if(!r)throw Error('Sprache zum Land "'+i+'" nicht gefunden');return r}};e.nxtUsedCodes=["de","en","nl","es","fr"],e._nxtUsed=[],e.countryLangMap={DE:"de",FR:"fr",IT:"it",ES:"es",PT:"pt",NL:"nl",BE:"nl",GR:"el",RU:"ru",JP:"ja",CN:"zh",KR:"ko",SA:"ar",TR:"tr",IN:"hi",BR:"pt",AR:"es",MX:"es",CA:"en",US:"en",GB:"en",AU:"en",NZ:"en",IE:"en",ZA:"af",EG:"ar",MA:"ar",DZ:"ar",TN:"ar",LY:"ar",JO:"ar",SY:"ar",IQ:"ar",KW:"ar",AE:"ar",QA:"ar",OM:"ar",BH:"ar",YE:"ar",LB:"ar",IL:"he",IR:"fa",AF:"ps",PK:"ur",BD:"bn",MY:"ms",ID:"id",PH:"tl",TH:"th",KH:"km",VN:"vi",MM:"my",SG:"en",HK:"zh",TW:"zh",PL:"pl",HU:"hu",CZ:"cs",SK:"sk",AT:"de",CH:"de",SE:"sv",NO:"no",DK:"da",FI:"fi",IS:"is",MT:"mt",CY:"el",RO:"ro",BG:"bg",HR:"hr",SI:"sl",BA:"bs",ME:"sr",MK:"mk",RS:"sr",UA:"uk",BY:"be",MD:"ro",LT:"lt",LV:"lv",EE:"et"},e.languageCodes=[{name:"Afrikaans",code:"af"},{name:"Albanisch",code:"sq"},{name:"Amharisch",code:"am"},{name:"Arabisch",code:"ar"},{name:"Armenisch",code:"hy"},{name:"Assamesisch",code:"as"},{name:"Aymara",code:"ay"},{name:"Aserbaidschanisch",code:"az"},{name:"Bambara",code:"bm"},{name:"Baskisch",code:"eu"},{name:"Belarussisch",code:"be"},{name:"Bengalisch",code:"bn"},{name:"Bhojpuri",code:"bho"},{name:"Bosnisch",code:"bs"},{name:"Bulgarisch",code:"bg"},{name:"Katalanisch",code:"ca"},{name:"Cebuano",code:"ceb"},{name:"Chinesisch (vereinfacht)",code:"zh-CN oder zh (BCP-47)"},{name:"Chinesisch (traditionell)",code:"zh-TW (BCP-47)"},{name:"Korsisch",code:"co"},{name:"Kroatisch",code:"hr"},{name:"Tschechisch",code:"cs"},{name:"D\xE4nisch",code:"da"},{name:"Dhivehi",code:"dv"},{name:"Dogri",code:"doi"},{name:"Niederl\xE4ndisch",code:"nl"},{name:"Englisch",code:"en"},{name:"Esperanto",code:"eo"},{name:"Estnisch",code:"et"},{name:"Ewe",code:"ee"},{name:"Philippinisch (Tagalog)",code:"fil"},{name:"Finnisch",code:"fi"},{name:"Franz\xF6sisch",code:"fr"},{name:"Friesisch",code:"fy"},{name:"Galicisch",code:"gl"},{name:"Georgisch",code:"ka"},{name:"Deutsch",code:"de"},{name:"Griechisch",code:"el"},{name:"Guarani",code:"gn"},{name:"Gujarati",code:"gu"},{name:"Kreolisch (Haiti)",code:"ht"},{name:"Haussa",code:"ha"},{name:"Hawaiianisch",code:"haw"},{name:"Hebr\xE4isch",code:"he oder iw"},{name:"Hindi",code:"hi"},{name:"Hmong",code:"hmn"},{name:"Ungarisch",code:"hu"},{name:"Isl\xE4ndisch",code:"is"},{name:"Igbo",code:"ig"},{name:"Ilokano",code:"ilo"},{name:"Indonesisch",code:"id"},{name:"Irisch",code:"ga"},{name:"Italienisch",code:"it"},{name:"Japanisch",code:"ja"},{name:"Javanisch",code:"jv oder jw"},{name:"Kannada",code:"kn"},{name:"Kasachisch",code:"kk"},{name:"Khmer",code:"km"},{name:"Kinyarwanda",code:"rw"},{name:"Konkani",code:"gom"},{name:"Koreanisch",code:"ko"},{name:"Krio",code:"kri"},{name:"Kurdisch",code:"ku"},{name:"Kurdisch (Sorani)",code:"ckb"},{name:"Kirgisisch",code:"ky"},{name:"Lao",code:"lo"},{name:"Latein",code:"la"},{name:"Lettisch",code:"lv"},{name:"Lingala",code:"ln"},{name:"Litauisch",code:"lt"},{name:"Luganda",code:"lg"},{name:"Luxemburgisch",code:"lb"},{name:"Mazedonisch",code:"mk"},{name:"Maithili",code:"mai"},{name:"Malagasy",code:"mg"},{name:"Malaiisch",code:"ms"},{name:"Malayalam",code:"ml"},{name:"Maltesisch",code:"mt"},{name:"Maori",code:"mi"},{name:"Marathi",code:"mr"},{name:"Meitei (Manipuri)",code:"mni-Mtei"},{name:"Mizo",code:"lus"},{name:"Mongolisch",code:"mn"},{name:"Myanmar (Birmanisch)",code:"my"},{name:"Nepalesisch",code:"ne"},{name:"Norwegisch",code:"no"},{name:"Nyanja (Chichewa)",code:"ny"},{name:"Odia (Oriya)",code:"or"},{name:"Oromo",code:"om"},{name:"Paschtunisch",code:"ps"},{name:"Persisch",code:"fa"},{name:"Polnisch",code:"pl"},{name:"Portugiesisch (Portugal, Brasilien)",code:"pt"},{name:"Panjabi",code:"pa"},{name:"Quechua",code:"qu"},{name:"Rum\xE4nisch",code:"ro"},{name:"Russisch",code:"ru"},{name:"Samoanisch",code:"sm"},{name:"Sanskrit",code:"sa"},{name:"Schottisches G\xE4lisch",code:"gd"},{name:"Sepedi",code:"nso"},{name:"Serbisch",code:"sr"},{name:"Sesotho",code:"st"},{name:"Shona",code:"sn"},{name:"Sindhi",code:"sd"},{name:"Singhalesisch",code:"si"},{name:"Slowakisch",code:"sk"},{name:"Slowenisch",code:"sl"},{name:"Somali",code:"so"},{name:"Spanisch",code:"es"},{name:"Sundanesisch",code:"su"},{name:"Swahili",code:"sw"},{name:"Schwedisch",code:"sv"},{name:"Tagalog (Philippinisch)",code:"tl"},{name:"Tadschikisch",code:"tg"},{name:"Tamil",code:"ta"},{name:"Tatarisch",code:"tt"},{name:"Telugu",code:"te"},{name:"Thai",code:"th"},{name:"Tigrinya",code:"ti"},{name:"Tsonga",code:"ts"},{name:"T\xFCrkisch",code:"tr"},{name:"Turkmenisch",code:"tk"},{name:"Twi (Akan)",code:"ak"},{name:"Ukrainisch",code:"uk"},{name:"Urdu",code:"ur"},{name:"Uigurisch",code:"ug"},{name:"Usbekisch",code:"uz"},{name:"Vietnamesisch",code:"vi"},{name:"Walisisch",code:"cy"},{name:"Xhosa",code:"xh"},{name:"Jiddisch",code:"yi"},{name:"Yoruba",code:"yo"},{name:"Zulu",code:"zu"}];let t=e;return t})()});var Uv,xB=Q(()=>{zn();pa();Ov();Uv=class{static haveContactsSameNameAndBirthday(e,n){if(e.id===n.id)return!1;if(e.givenName&&e.familyName&&n.givenName&&n.familyName&&e.givenName.toLowerCase()===n.givenName.toLowerCase()&&e.familyName.toLowerCase()===n.familyName.toLowerCase()){if(e.birthday&&n.birthday){let i=Ie.format(Ie.parse(e.birthday),"yyyy-MM-dd"),r=Ie.format(Ie.parse(n.birthday),"yyyy-MM-dd");return i===r}return!0}return!1}static hasEvents(e,n){let i=e.canceledEvents&&e.canceledEvents.length>0,r=e.events&&e.events.length>0,s=e.closedEvents&&e.closedEvents.length>0;return n?!!(n.includes("canceled")&&i||n.includes("future")&&r||n.includes("closed")&&s):i||r||s}static hasClosedOfFutureEvents(e){return e.closedEvents&&e.closedEvents.length>0||e.events&&e.events.length>0}static getAddressLine(e,n=!0){let i=[];return e.streetAddress&&i.push(e.streetAddress),e.country&&i.push(e.country),e.postalCode&&i.push(e.postalCode),e.city&&i.push(e.city),n&&e.streetAddress?i[0]+`
`+i.splice(0,1).join(" "):i.join(" ")}static getAllEventIds(e){return e?[...(e.canceledEvents||[]).map(n=>n.eventId),...(e.closedEvents||[]).map(n=>n.eventId),...(e.events||[]).map(n=>n.eventId)]:[]}static isFirstAppointment(e,n){let i=[...(e.closedEvents||[]).map(s=>s.start),...(e.closedEvents||[]).map(s=>s.end)],r=Math.min(...i);return n<=r}static getPossibleCombineAttributes(e){try{let n={givenName:[],familyName:[],birthday:[],mobile:[],email:[],streetAddress:[],postalCode:[],city:[],country:[],lang:[]};for(let i of oa(n))n[i]=wc.unique(e.map(r=>r[i]).filter(r=>!!r));return n}catch(n){throw Error("getPossibleCombineAttributes failed "+n.message)}}}});function xOt(){return{color:"accent",disabledInteractive:!1}}var gOt,vOt,yOt,Eze,oZ,_Ot,Mze,COt,hg,h2,kze,ox=Q(()=>{Xh();dk();me();me();qn();bl();ri();gOt=["input"],vOt=["formField"],yOt=["*"],Eze=0,oZ=class{constructor(e,n){this.source=e,this.value=n}},_Ot={provide:Dh,useExisting:_c(()=>hg),multi:!0},Mze=new Ri("MatRadioGroup"),COt=new Ri("mat-radio-default-options",{providedIn:"root",factory:xOt});hg=(()=>{let e=class e{get name(){return this._name}set name(i){this._name=i,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(i){this._labelPosition=i==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(i){this._value!==i&&(this._value=i,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(i){this._selected=i,this.value=i?i.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(i){this._disabled=i,this._markRadiosForCheck()}get required(){return this._required}set required(i){this._required=i,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(i){this._disabledInteractive=i,this._markRadiosForCheck()}constructor(i){this._changeDetector=i,this._value=null,this._name=`mat-radio-group-${Eze++}`,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new nt,this._disabledInteractive=!1}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(i=>i===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(i=>{i.name=this.name,i._markForCheck()})}_updateSelectedRadioFromValue(){let i=this._selected!==null&&this._selected.value===this._value;this._radios&&!i&&(this._selected=null,this._radios.forEach(r=>{r.checked=this.value===r.value,r.checked&&(this._selected=r)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new oZ(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(i=>i._markForCheck())}writeValue(i){this.value=i,this._changeDetector.markForCheck()}registerOnChange(i){this._controlValueAccessorChangeFn=i}registerOnTouched(i){this.onTouched=i}setDisabledState(i){this.disabled=i,this._changeDetector.markForCheck()}};e.\u0275fac=function(r){return new(r||e)(R(Kt))},e.\u0275dir=mi({type:e,selectors:[["mat-radio-group"]],contentQueries:function(r,s,o){if(r&1&&_o(o,h2,5),r&2){let a;Pt(a=Rt())&&(s._radios=a)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",mn],required:[2,"required","required",mn],disabledInteractive:[2,"disabledInteractive","disabledInteractive",mn]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[as([_Ot,{provide:Mze,useExisting:e}]),Bs]});let t=e;return t})(),h2=(()=>{let e=class e{get checked(){return this._checked}set checked(i){this._checked!==i&&(this._checked=i,i&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!i&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),i&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(i){this._value!==i&&(this._value=i,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===i),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(i){this._labelPosition=i}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(i){this._setDisabled(i)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(i){this._required=i}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(i){this._color=i}get disabledInteractive(){return this._disabledInteractive||this.radioGroup!==null&&this.radioGroup.disabledInteractive}set disabledInteractive(i){this._disabledInteractive=i}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(i,r,s,o,a,l,c,d){this._elementRef=r,this._changeDetector=s,this._focusMonitor=o,this._radioDispatcher=a,this._defaultOptions=c,this._ngZone=Ve(pn),this._uniqueId=`mat-radio-${++Eze}`,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new nt,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=Ve($o),this._onInputClick=u=>{this.disabled&&this.disabledInteractive&&u.preventDefault()},this.radioGroup=i,this._noopAnimations=l==="NoopAnimations",this._disabledInteractive=c?.disabledInteractive??!1,d&&(this.tabIndex=xc(d,0))}focus(i,r){r?this._focusMonitor.focusVia(this._inputElement,r,i):this._inputElement.nativeElement.focus(i)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((i,r)=>{i!==this.id&&r===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(i=>{!i&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._inputElement.nativeElement.addEventListener("click",this._onInputClick)})}ngOnDestroy(){this._inputElement?.nativeElement.removeEventListener("click",this._onInputClick),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new oZ(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(i){if(i.stopPropagation(),!this.checked&&!this.disabled){let r=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),r&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(i){this._onInputInteraction(i),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(i){this._disabled!==i&&(this._disabled=i,this._changeDetector.markForCheck())}_updateTabIndex(){let i=this.radioGroup,r;if(!i||!i.selected||this.disabled?r=this.tabIndex:r=i.selected===this?this.tabIndex:-1,r!==this._previousTabIndex){let s=this._inputElement?.nativeElement;s&&(s.setAttribute("tabindex",r+""),this._previousTabIndex=r,wh(()=>{queueMicrotask(()=>{i&&i.selected&&i.selected!==this&&document.activeElement===s&&(i.selected?._inputElement.nativeElement.focus(),document.activeElement===s&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}};e.\u0275fac=function(r){return new(r||e)(R(Mze,8),R(fi),R(Kt),R(qp),R(vEe),R(Ic,8),R(COt,8),wp("tabindex"))},e.\u0275cmp=_e({type:e,selectors:[["mat-radio-button"]],viewQuery:function(r,s){if(r&1&&(ei(gOt,5),ei(vOt,7,fi)),r&2){let o;Pt(o=Rt())&&(s._inputElement=o.first),Pt(o=Rt())&&(s._rippleTrigger=o.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(r,s){r&1&&F("focus",function(){return s._inputElement.nativeElement.focus()}),r&2&&(Bn("id",s.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),ki("mat-primary",s.color==="primary")("mat-accent",s.color==="accent")("mat-warn",s.color==="warn")("mat-mdc-radio-checked",s.checked)("mat-mdc-radio-disabled",s.disabled)("mat-mdc-radio-disabled-interactive",s.disabledInteractive)("_mat-animation-noopable",s._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",mn],tabIndex:[2,"tabIndex","tabIndex",i=>i==null?0:xc(i)],checked:[2,"checked","checked",mn],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",mn],required:[2,"required","required",mn],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",mn]},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[Bs,xe],ngContentSelectors:yOt,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"div",2,0)(2,"div",3)(3,"div",4),F("click",function(l){return V(o),B(s._onTouchTargetClick(l))}),p(),h(4,"input",5,1),F("change",function(l){return V(o),B(s._onInputInteraction(l))}),p(),h(6,"div",6),ee(7,"div",7)(8,"div",8),p(),h(9,"div",9),ee(10,"div",10),p()(),h(11,"label",11),Ln(12),p()()}r&2&&(b("labelPosition",s.labelPosition),g(2),ki("mdc-radio--disabled",s.disabled),g(2),b("id",s.inputId)("checked",s.checked)("disabled",s.disabled&&!s.disabledInteractive)("required",s.required),Bn("name",s.name)("value",s.value)("aria-label",s.ariaLabel)("aria-labelledby",s.ariaLabelledby)("aria-describedby",s.ariaDescribedby)("aria-disabled",s.disabled&&s.disabledInteractive?"true":null),g(5),b("matRippleTrigger",s._rippleTrigger.nativeElement)("matRippleDisabled",s._isRippleDisabled())("matRippleCentered",!0),g(2),b("for",s.inputId))},dependencies:[ym,wk],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-app-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-app-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-app-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-app-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-app-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let t=e;return t})(),kze=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,sd,D0,h2,zr]});let t=e;return t})()});function SOt(t,e){if(t&1&&(h(0,"mat-radio-button",4),ee(1,"div",5),Ce(2,"safeHtml"),p()),t&2){let n=e.$implicit,i=w(2);b("disabled",i.disabled)("ngClass",bs(6,wOt,i.direction==="row",i.disabled))("value",i.valueKey?n[i.valueKey]:n),g(),b("innerHTML",tt(2,4,i.getOptionText(n)),Pi)}}function TOt(t,e){if(t&1){let n=re();h(0,"nxt-form-field-wrapper",1)(1,"mat-radio-group",2),F("change",function(r){V(n);let s=w();return B(s.valueChanged(r))}),W(2,SOt,3,9,"mat-radio-button",3),p()()}if(t&2){let n=w();b("nxtFormControl",n.nxtFormControl),g(),b("fxLayout",n.direction)("ngStyle",sn(5,bOt,n.direction==="column"?"start":""))("value",n.nxtFormControl.value),g(),b("ngForOf",n.options)}}var bOt,wOt,tm,s3=Q(()=>{me();Mv();ef();ox();ha();An();Vt();Ay();ri();me();Vt();An();bOt=t=>({alignItems:t}),wOt=(t,e)=>({"row-item":t,"radio-disabled":e});tm=(()=>{let e=class e extends Xp{set value(i){this.nxtFormControl.setValue(i,{emitEvent:!1,onlySelf:!0})}constructor(){super(),this.valueChange=new nt,this.controlName=ua.generate(),this.direction="column",this.valueKey="",this.textKey="text",this.disabledKey="",this.disabled=!1}ngOnInit(){}ngOnDestroy(){this.valueChangeSubscription?.unsubscribe()}valueChanged(i){this.nxtFormControl.setValue(i.value),this.valueChange.emit(this.nxtFormControl.value)}getOptionText(i){return typeof i=="string"?i:i[this.textKey]}setValue(i){this.nxtFormControl.setValue(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-radio"]],inputs:{options:"options",value:"value",readonly:"readonly",cellRenderer:"cellRenderer",direction:"direction",valueKey:"valueKey",textKey:"textKey",disabledKey:"disabledKey",disabled:"disabled"},outputs:{valueChange:"valueChange"},standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["fxLayout","row",3,"nxtFormControl",4,"ngIf"],["fxLayout","row",3,"nxtFormControl"],[3,"change","fxLayout","ngStyle","value"],["tabIndex","-1","tabindex","-1","style","padding: 3px ; white-space: nowrap;",3,"disabled","ngClass","value",4,"ngFor","ngForOf"],["tabIndex","-1","tabindex","-1",2,"padding","3px","white-space","nowrap",3,"disabled","ngClass","value"],[3,"innerHTML"]],template:function(r,s){r&1&&W(0,TOt,3,7,"nxt-form-field-wrapper",0),r&2&&b("ngIf",s.nxtFormControl)},dependencies:[Ct,O1,At,Yt,hg,rr,Dn,No,rs,Hi,h2,_s,Or],styles:["[_nghost-%COMP%]{padding:0 10px;display:flex}[_nghost-%COMP%]     mat-radio-button{display:flex;justify-content:center}[_nghost-%COMP%]     mat-radio-button.radio-disabled{opacity:.5}[_nghost-%COMP%]     .row-item:not(:first-of-type){padding-left:15px!important}[_nghost-%COMP%]     .mat-mdc-radio-checked .mdc-radio__inner-circle{border-color:#b7860f!important;background-color:#b7860f!important}[_nghost-%COMP%]     .mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:#b7860f!important}"]});let t=e;return t})()});function MOt(t,e){return this._trackRow(e)}function kOt(t,e){if(t&1&&(h(0,"tr",0)(1,"td",3),y(2),p()()),t&2){let n=w();g(),mo("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),Bn("colspan",n.numCols),g(),Ke(" ",n.label," ")}}function IOt(t,e){if(t&1&&(h(0,"td",3),y(1),p()),t&2){let n=w(2);mo("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),Bn("colspan",n._firstRowOffset),g(),Ke(" ",n._firstRowOffset>=n.labelMinRequiredCells?n.label:""," ")}}function AOt(t,e){if(t&1){let n=re();h(0,"td",6)(1,"button",7),F("click",function(r){let s=V(n).$implicit,o=w(2);return B(o._cellClicked(s,r))})("focus",function(r){let s=V(n).$implicit,o=w(2);return B(o._emitActiveDateChange(s,r))}),h(2,"span",8),y(3),p(),ee(4,"span",9),p()()}if(t&2){let n=e.$implicit,i=e.$index,r=w().$index,s=w();mo("width",s._cellWidth)("padding-top",s._cellPadding)("padding-bottom",s._cellPadding),Bn("data-mat-row",r)("data-mat-col",i),g(),ki("mat-calendar-body-disabled",!n.enabled)("mat-calendar-body-active",s._isActiveCell(r,i))("mat-calendar-body-range-start",s._isRangeStart(n.compareValue))("mat-calendar-body-range-end",s._isRangeEnd(n.compareValue))("mat-calendar-body-in-range",s._isInRange(n.compareValue))("mat-calendar-body-comparison-bridge-start",s._isComparisonBridgeStart(n.compareValue,r,i))("mat-calendar-body-comparison-bridge-end",s._isComparisonBridgeEnd(n.compareValue,r,i))("mat-calendar-body-comparison-start",s._isComparisonStart(n.compareValue))("mat-calendar-body-comparison-end",s._isComparisonEnd(n.compareValue))("mat-calendar-body-in-comparison-range",s._isInComparisonRange(n.compareValue))("mat-calendar-body-preview-start",s._isPreviewStart(n.compareValue))("mat-calendar-body-preview-end",s._isPreviewEnd(n.compareValue))("mat-calendar-body-in-preview",s._isInPreview(n.compareValue)),b("ngClass",n.cssClasses)("tabindex",s._isActiveCell(r,i)?0:-1),Bn("aria-label",n.ariaLabel)("aria-disabled",!n.enabled||null)("aria-pressed",s._isSelected(n.compareValue))("aria-current",s.todayValue===n.compareValue?"date":null)("aria-describedby",s._getDescribedby(n.compareValue)),g(),ki("mat-calendar-body-selected",s._isSelected(n.compareValue))("mat-calendar-body-comparison-identical",s._isComparisonIdentical(n.compareValue))("mat-calendar-body-today",s.todayValue===n.compareValue),g(),Ke(" ",n.displayValue," ")}}function POt(t,e){if(t&1&&(h(0,"tr",1),W(1,IOt,2,6,"td",4),Kn(2,AOt,5,48,"td",5,Nze),p()),t&2){let n=e.$implicit,i=e.$index,r=w();g(),Je(i===0&&r._firstRowOffset?1:-1),g(),Yn(n)}}function ROt(t,e){if(t&1&&(h(0,"th",2)(1,"span",6),y(2),p(),h(3,"span",3),y(4),p()()),t&2){let n=e.$implicit;g(2),ye(n.long),g(2),ye(n.narrow)}}function FOt(t,e){}function LOt(t,e){if(t&1){let n=re();h(0,"mat-month-view",4),Xe("activeDateChange",function(r){V(n);let s=w();return Ze(s.activeDate,r)||(s.activeDate=r),B(r)}),F("_userSelection",function(r){V(n);let s=w();return B(s._dateSelected(r))})("dragStarted",function(r){V(n);let s=w();return B(s._dragStarted(r))})("dragEnded",function(r){V(n);let s=w();return B(s._dragEnded(r))}),p()}if(t&2){let n=w();qe("activeDate",n.activeDate),b("selected",n.selected)("dateFilter",n.dateFilter)("maxDate",n.maxDate)("minDate",n.minDate)("dateClass",n.dateClass)("comparisonStart",n.comparisonStart)("comparisonEnd",n.comparisonEnd)("startDateAccessibleName",n.startDateAccessibleName)("endDateAccessibleName",n.endDateAccessibleName)("activeDrag",n._activeDrag)}}function OOt(t,e){if(t&1){let n=re();h(0,"mat-year-view",5),Xe("activeDateChange",function(r){V(n);let s=w();return Ze(s.activeDate,r)||(s.activeDate=r),B(r)}),F("monthSelected",function(r){V(n);let s=w();return B(s._monthSelectedInYearView(r))})("selectedChange",function(r){V(n);let s=w();return B(s._goToDateInView(r,"month"))}),p()}if(t&2){let n=w();qe("activeDate",n.activeDate),b("selected",n.selected)("dateFilter",n.dateFilter)("maxDate",n.maxDate)("minDate",n.minDate)("dateClass",n.dateClass)}}function NOt(t,e){if(t&1){let n=re();h(0,"mat-multi-year-view",6),Xe("activeDateChange",function(r){V(n);let s=w();return Ze(s.activeDate,r)||(s.activeDate=r),B(r)}),F("yearSelected",function(r){V(n);let s=w();return B(s._yearSelectedInMultiYearView(r))})("selectedChange",function(r){V(n);let s=w();return B(s._goToDateInView(r,"year"))}),p()}if(t&2){let n=w();qe("activeDate",n.activeDate),b("selected",n.selected)("dateFilter",n.dateFilter)("maxDate",n.maxDate)("minDate",n.minDate)("dateClass",n.dateClass)}}function VOt(t,e){}function GOt(t,e){t&1&&($p(),h(0,"svg",2),ee(1,"path",3),p())}function jOt(t,e){t&1&&(h(0,"div",0),Ln(1),p())}function Nge(t){return t?.nodeName==="TD"}function Vge(t){let e;return Nge(t)?e=t:Nge(t.parentNode)?e=t.parentNode:Nge(t.parentNode?.parentNode)&&(e=t.parentNode.parentNode),e?.getAttribute("data-mat-row")!=null?e:null}function Bge(t,e,n){return n!==null&&e!==n&&t<n&&t===e}function zge(t,e,n){return e!==null&&e!==n&&t>=e&&t===n}function Hge(t,e,n,i){return i&&e!==null&&n!==null&&e!==n&&t>=e&&t<=n}function Aze(t){let e=t.changedTouches[0];return document.elementFromPoint(e.clientX,e.clientY)}function ZOt(t,e){return t||new YOt(e)}function XOt(t,e){return t||new qOt(e)}function eNt(t,e){return t||new JOt(e)}function zze(t,e,n,i,r){let s=t.getYear(e),o=t.getYear(n),a=Hze(t,i,r);return Math.floor((s-a)/S4)===Math.floor((o-a)/S4)}function bB(t,e,n,i){let r=t.getYear(e);return nNt(r-Hze(t,n,i),S4)}function Hze(t,e,n){let i=0;return n?i=t.getYear(n)-S4+1:e&&(i=t.getYear(e)),i}function nNt(t,e){return(t%e+e)%e}function oNt(t){return()=>t.scrollStrategies.reposition()}function Kze(t,e){let n=Object.keys(t);for(let i of n){let{previousValue:r,currentValue:s}=t[i];if(e.isDateInstance(r)&&e.isDateInstance(s)){if(!e.sameDate(r,s))return!0}else return!0}return!1}function uNt(t){return jge(t,!0)}function Oze(t){return t.nodeType===Node.ELEMENT_NODE}function hNt(t){return t.nodeName==="INPUT"}function pNt(t){return t.nodeName==="TEXTAREA"}function jge(t,e){if(Oze(t)&&e){let i=(t.getAttribute?.("aria-labelledby")?.split(/\s+/g)||[]).reduce((r,s)=>{let o=document.getElementById(s);return o&&r.push(o),r},[]);if(i.length)return i.map(r=>jge(r,!1)).join(" ")}if(Oze(t)){let n=t.getAttribute("aria-label")?.trim();if(n)return n}if(hNt(t)||pNt(t)){if(t.labels?.length)return Array.from(t.labels).map(r=>jge(r,!1)).join(" ");let n=t.getAttribute("placeholder")?.trim();if(n)return n;let i=t.getAttribute("title")?.trim();if(i)return i}return(t.textContent||"").replace(/\s+/g," ").trim()}var EOt,Nze,Vze,BOt,zOt,HOt,WOt,UOt,SB,$Ot,wB,KOt,Ize,x7,aZ,nA,s1,b7,YOt,qOt,Bze,QOt,lZ,JOt,tNt,Gge,iNt,Pze,S4,Wge,Rze,Fze,rNt,Gze,Uge,Lze,sNt,Wze,aNt,Uze,oD,jze,iA,$ze,lNt,cNt,cZ,dNt,TB,dZ,Yze,$ge,Kge,mNt,qze,Zze,Xze,Qze,Jze,eHe,uZ=Q(()=>{Xh();Qf();Qf();bv();ri();me();me();P8();R1();bl();bl();$n();Zg();Th();Th();Wc();Cl();J0();ng();qn();qn();og();Wb();EOt=["mat-calendar-body",""];Nze=(t,e)=>e.id;Vze=["*"];BOt=["button"],zOt=[[["","matDatepickerToggleIcon",""]]],HOt=["[matDatepickerToggleIcon]"];WOt=[[["input","matStartDate",""]],[["input","matEndDate",""]]],UOt=["input[matStartDate]","input[matEndDate]"];SB=(()=>{let e=class e{constructor(){this.changes=new Mi,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date"}formatYearRange(i,r){return`${i} \u2013 ${r}`}formatYearRangeLabel(i,r){return`${i} to ${r}`}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),$Ot=0,wB=class{constructor(e,n,i,r,s={},o=e,a){this.value=e,this.displayValue=n,this.ariaLabel=i,this.enabled=r,this.cssClasses=s,this.compareValue=o,this.rawValue=a,this.id=$Ot++}},KOt=1,Ize=Sh({passive:!1,capture:!0}),x7=Sh({passive:!0,capture:!0}),aZ=Sh({passive:!0}),nA=(()=>{let e=class e{ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}constructor(i,r){this._elementRef=i,this._ngZone=r,this._platform=Ve(Oo),this._focusActiveCellAfterViewChecked=!1,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new nt,this.previewChange=new nt,this.activeDateChange=new nt,this.dragStarted=new nt,this.dragEnded=new nt,this._didDragSinceMouseDown=!1,this._injector=Ve($o),this._trackRow=s=>s,this._enterHandler=s=>{if(this._skipNextFocus&&s.type==="focus"){this._skipNextFocus=!1;return}if(s.target&&this.isRange){let o=this._getCellFromElement(s.target);o&&this._ngZone.run(()=>this.previewChange.emit({value:o.enabled?o:null,event:s}))}},this._touchmoveHandler=s=>{if(!this.isRange)return;let o=Aze(s),a=o?this._getCellFromElement(o):null;o!==s.target&&(this._didDragSinceMouseDown=!0),Vge(s.target)&&s.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:a?.enabled?a:null,event:s}))},this._leaveHandler=s=>{this.previewEnd!==null&&this.isRange&&(s.type!=="blur"&&(this._didDragSinceMouseDown=!0),s.target&&this._getCellFromElement(s.target)&&!(s.relatedTarget&&this._getCellFromElement(s.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:s})))},this._mousedownHandler=s=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let o=s.target&&this._getCellFromElement(s.target);!o||!this._isInRange(o.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:o.rawValue,event:s})})},this._mouseupHandler=s=>{if(!this.isRange)return;let o=Vge(s.target);if(!o){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:s})});return}o.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let a=this._getCellFromElement(o);this.dragEnded.emit({value:a?.rawValue??null,event:s})})},this._touchendHandler=s=>{let o=Aze(s);o&&this._mouseupHandler({target:o})},this._id=`mat-calendar-body-${KOt++}`,this._startDateLabelId=`${this._id}-start-date`,this._endDateLabelId=`${this._id}-end-date`,r.runOutsideAngular(()=>{let s=i.nativeElement;s.addEventListener("touchmove",this._touchmoveHandler,Ize),s.addEventListener("mouseenter",this._enterHandler,x7),s.addEventListener("focus",this._enterHandler,x7),s.addEventListener("mouseleave",this._leaveHandler,x7),s.addEventListener("blur",this._leaveHandler,x7),s.addEventListener("mousedown",this._mousedownHandler,aZ),s.addEventListener("touchstart",this._mousedownHandler,aZ),this._platform.isBrowser&&(window.addEventListener("mouseup",this._mouseupHandler),window.addEventListener("touchend",this._touchendHandler))})}_cellClicked(i,r){this._didDragSinceMouseDown||i.enabled&&this.selectedValueChange.emit({value:i.value,event:r})}_emitActiveDateChange(i,r){i.enabled&&this.activeDateChange.emit({value:i.value,event:r})}_isSelected(i){return this.startValue===i||this.endValue===i}ngOnChanges(i){let r=i.numCols,{rows:s,numCols:o}=this;(i.rows||r)&&(this._firstRowOffset=s&&s.length&&s[0].length?o-s[0].length:0),(i.cellAspectRatio||r||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/o}%`),(r||!this._cellWidth)&&(this._cellWidth=`${100/o}%`)}ngOnDestroy(){let i=this._elementRef.nativeElement;i.removeEventListener("touchmove",this._touchmoveHandler,Ize),i.removeEventListener("mouseenter",this._enterHandler,x7),i.removeEventListener("focus",this._enterHandler,x7),i.removeEventListener("mouseleave",this._leaveHandler,x7),i.removeEventListener("blur",this._leaveHandler,x7),i.removeEventListener("mousedown",this._mousedownHandler,aZ),i.removeEventListener("touchstart",this._mousedownHandler,aZ),this._platform.isBrowser&&(window.removeEventListener("mouseup",this._mouseupHandler),window.removeEventListener("touchend",this._touchendHandler))}_isActiveCell(i,r){let s=i*this.numCols+r;return i&&(s-=this._firstRowOffset),s==this.activeCell}_focusActiveCell(i=!0){wh(()=>{setTimeout(()=>{let r=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");r&&(i||(this._skipNextFocus=!0),r.focus())})},{injector:this._injector})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(i){return Bge(i,this.startValue,this.endValue)}_isRangeEnd(i){return zge(i,this.startValue,this.endValue)}_isInRange(i){return Hge(i,this.startValue,this.endValue,this.isRange)}_isComparisonStart(i){return Bge(i,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(i,r,s){if(!this._isComparisonStart(i)||this._isRangeStart(i)||!this._isInRange(i))return!1;let o=this.rows[r][s-1];if(!o){let a=this.rows[r-1];o=a&&a[a.length-1]}return o&&!this._isRangeEnd(o.compareValue)}_isComparisonBridgeEnd(i,r,s){if(!this._isComparisonEnd(i)||this._isRangeEnd(i)||!this._isInRange(i))return!1;let o=this.rows[r][s+1];if(!o){let a=this.rows[r+1];o=a&&a[0]}return o&&!this._isRangeStart(o.compareValue)}_isComparisonEnd(i){return zge(i,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(i){return Hge(i,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(i){return this.comparisonStart===this.comparisonEnd&&i===this.comparisonStart}_isPreviewStart(i){return Bge(i,this.previewStart,this.previewEnd)}_isPreviewEnd(i){return zge(i,this.previewStart,this.previewEnd)}_isInPreview(i){return Hge(i,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(i){return this.isRange?this.startValue===i&&this.endValue===i?`${this._startDateLabelId} ${this._endDateLabelId}`:this.startValue===i?this._startDateLabelId:this.endValue===i?this._endDateLabelId:null:null}_getCellFromElement(i){let r=Vge(i);if(r){let s=r.getAttribute("data-mat-row"),o=r.getAttribute("data-mat-col");if(s&&o)return this.rows[parseInt(s)][parseInt(o)]}return null}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(pn))},e.\u0275cmp=_e({type:e,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],standalone:!0,features:[yn,xe],attrs:EOt,decls:7,vars:5,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(r,s){r&1&&(W(0,kOt,3,6,"tr",0),Kn(1,POt,4,1,"tr",1,MOt,!0),h(3,"label",2),y(4),p(),h(5,"label",2),y(6),p()),r&2&&(Je(s._firstRowOffset<s.labelMinRequiredCells?0:-1),g(),Yn(s.rows),g(2),b("id",s._startDateLabelId),g(),Ke(" ",s.startDateAccessibleName,`
`),g(),b("id",s._endDateLabelId),g(),Ke(" ",s.endDateAccessibleName,`
`))},dependencies:[_s],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-outline-color, var(--mat-app-primary))}.mat-calendar-body-label{height:0;line-height:0;text-align:start;padding-left:4.7142857143%;padding-right:4.7142857143%;font-size:var(--mat-datepicker-calendar-body-label-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-datepicker-calendar-body-label-text-weight, var(--mat-app-title-small-weight));color:var(--mat-datepicker-calendar-body-label-text-color, var(--mat-app-on-surface))}.mat-calendar-body-hidden-label{display:none}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-app-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-app-body-medium-size))}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;display:block;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview{color:var(--mat-datepicker-calendar-date-preview-state-outline-color, var(--mat-app-primary))}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:var(--mat-datepicker-calendar-date-disabled-state-text-color)}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-disabled-state-outline-color)}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px;color:var(--mat-datepicker-calendar-date-text-color, var(--mat-app-on-surface));border-color:var(--mat-datepicker-calendar-date-outline-color)}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-focus-state-background-color)}@media(hover: hover){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-hover-state-background-color)}}.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color, var(--mat-app-primary));color:var(--mat-datepicker-calendar-date-selected-state-text-color, var(--mat-app-on-primary))}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-disabled-state-background-color)}.mat-calendar-body-selected.mat-calendar-body-today{box-shadow:inset 0 0 0 1px var(--mat-datepicker-calendar-date-today-selected-state-outline-color, var(--mat-app-primary))}.mat-calendar-body-in-range::before{background:var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-app-primary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-app-tertiary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-app-tertiary-container))}.mat-calendar-body-comparison-bridge-start::before,[dir=rtl] .mat-calendar-body-comparison-bridge-end::before{background:linear-gradient(to right, var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-app-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-app-tertiary-container)) 50%)}.mat-calendar-body-comparison-bridge-end::before,[dir=rtl] .mat-calendar-body-comparison-bridge-start::before{background:linear-gradient(to left, var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-app-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-app-tertiary-container)) 50%)}.mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range.mat-calendar-body-in-range::after{background:var(--mat-datepicker-calendar-date-in-overlap-range-state-background-color, var(--mat-app-secondary-container))}.mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:var(--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color, var(--mat-app-secondary))}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}'],encapsulation:2,changeDetection:0});let t=e;return t})();s1=class{constructor(e,n){this.start=e,this.end=n}},b7=(()=>{let e=class e{constructor(i,r){this.selection=i,this._adapter=r,this._selectionChanged=new Mi,this.selectionChanged=this._selectionChanged,this.selection=i}updateSelection(i,r){let s=this.selection;this.selection=i,this._selectionChanged.next({selection:i,source:r,oldValue:s})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(i){return this._adapter.isDateInstance(i)&&this._adapter.isValid(i)}};e.\u0275fac=function(r){DO()},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),YOt=(()=>{let e=class e extends b7{constructor(i){super(null,i)}add(i){super.updateSelection(i,this)}isValid(){return this.selection!=null&&this._isValidDateInstance(this.selection)}isComplete(){return this.selection!=null}clone(){let i=new e(this._adapter);return i.updateSelection(this.selection,this),i}};e.\u0275fac=function(r){return new(r||e)(it(Od))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),qOt=(()=>{let e=class e extends b7{constructor(i){super(new s1(null,null),i)}add(i){let{start:r,end:s}=this.selection;r==null?r=i:s==null?s=i:(r=i,s=null),super.updateSelection(new s1(r,s),this)}isValid(){let{start:i,end:r}=this.selection;return i==null&&r==null?!0:i!=null&&r!=null?this._isValidDateInstance(i)&&this._isValidDateInstance(r)&&this._adapter.compareDate(i,r)<=0:(i==null||this._isValidDateInstance(i))&&(r==null||this._isValidDateInstance(r))}isComplete(){return this.selection.start!=null&&this.selection.end!=null}clone(){let i=new e(this._adapter);return i.updateSelection(this.selection,this),i}};e.\u0275fac=function(r){return new(r||e)(it(Od))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})();Bze={provide:b7,deps:[[new U2,new mv,b7],Od],useFactory:ZOt};QOt={provide:b7,deps:[[new U2,new mv,b7],Od],useFactory:XOt},lZ=new Ri("MAT_DATE_RANGE_SELECTION_STRATEGY"),JOt=(()=>{let e=class e{constructor(i){this._dateAdapter=i}selectionFinished(i,r){let{start:s,end:o}=r;return s==null?s=i:o==null&&i&&this._dateAdapter.compareDate(i,s)>=0?o=i:(s=i,o=null),new s1(s,o)}createPreview(i,r){let s=null,o=null;return r.start&&!r.end&&i&&(s=r.start,o=i),new s1(s,o)}createDrag(i,r,s){let o=r.start,a=r.end;if(!o||!a)return null;let l=this._dateAdapter,c=l.compareDate(o,a)!==0,d=l.getYear(s)-l.getYear(i),u=l.getMonth(s)-l.getMonth(i),m=l.getDate(s)-l.getDate(i);return c&&l.sameDate(i,r.start)?(o=s,l.compareDate(s,a)>0&&(a=l.addCalendarYears(a,d),a=l.addCalendarMonths(a,u),a=l.addCalendarDays(a,m))):c&&l.sameDate(i,r.end)?(a=s,l.compareDate(s,o)<0&&(o=l.addCalendarYears(o,d),o=l.addCalendarMonths(o,u),o=l.addCalendarDays(o,m))):(o=l.addCalendarYears(o,d),o=l.addCalendarMonths(o,u),o=l.addCalendarDays(o,m),a=l.addCalendarYears(a,d),a=l.addCalendarMonths(a,u),a=l.addCalendarDays(a,m)),new s1(o,a)}};e.\u0275fac=function(r){return new(r||e)(it(Od))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})();tNt={provide:lZ,deps:[[new U2,new mv,lZ],Od],useFactory:eNt},Gge=7,iNt=0,Pze=(()=>{let e=class e{get activeDate(){return this._activeDate}set activeDate(i){let r=this._activeDate,s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(s,this.minDate,this.maxDate),this._hasSameMonthAndYear(r,this._activeDate)||this._init()}get selected(){return this._selected}set selected(i){i instanceof s1?this._selected=i:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(i){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}get maxDate(){return this._maxDate}set maxDate(i){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}constructor(i,r,s,o,a){this._changeDetectorRef=i,this._dateFormats=r,this._dateAdapter=s,this._dir=o,this._rangeStrategy=a,this._rerenderSubscription=na.EMPTY,this.activeDrag=null,this.selectedChange=new nt,this._userSelection=new nt,this.dragStarted=new nt,this.dragEnded=new nt,this.activeDateChange=new nt,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(ll(null)).subscribe(()=>this._init())}ngOnChanges(i){let r=i.comparisonStart||i.comparisonEnd;r&&!r.firstChange&&this._setRanges(this.selected),i.activeDrag&&!this.activeDrag&&this._clearPreview()}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(i){let r=i.value,s=this._getDateFromDayOfMonth(r),o,a;this._selected instanceof s1?(o=this._getDateInCurrentMonth(this._selected.start),a=this._getDateInCurrentMonth(this._selected.end)):o=a=this._getDateInCurrentMonth(this._selected),(o!==r||a!==r)&&this.selectedChange.emit(s),this._userSelection.emit({value:s,event:i.event}),this._clearPreview(),this._changeDetectorRef.markForCheck()}_updateActiveDate(i){let r=i.value,s=this._activeDate;this.activeDate=this._getDateFromDayOfMonth(r),this._dateAdapter.compareDate(s,this.activeDate)&&this.activeDateChange.emit(this._activeDate)}_handleCalendarBodyKeydown(i){let r=this._activeDate,s=this._isRtl();switch(i.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,s?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,s?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=i.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=i.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:this._selectionKeyPressed=!0,this._canSelect(this._activeDate)&&i.preventDefault();return;case 27:this._previewEnd!=null&&!Pc(i)&&(this._clearPreview(),this.activeDrag?this.dragEnded.emit({value:null,event:i}):(this.selectedChange.emit(null),this._userSelection.emit({value:null,event:i})),i.preventDefault(),i.stopPropagation());return;default:return}this._dateAdapter.compareDate(r,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),i.preventDefault()}_handleCalendarBodyKeyup(i){(i.keyCode===32||i.keyCode===13)&&(this._selectionKeyPressed&&this._canSelect(this._activeDate)&&this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:i}),this._selectionKeyPressed=!1)}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(Gge+this._dateAdapter.getDayOfWeek(i)-this._dateAdapter.getFirstDayOfWeek())%Gge,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(i){this._matCalendarBody._focusActiveCell(i)}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_previewChanged({event:i,value:r}){if(this._rangeStrategy){let s=r?r.rawValue:null,o=this._rangeStrategy.createPreview(s,this.selected,i);if(this._previewStart=this._getCellCompareValue(o.start),this._previewEnd=this._getCellCompareValue(o.end),this.activeDrag&&s){let a=this._rangeStrategy.createDrag?.(this.activeDrag.value,this.selected,s,i);a&&(this._previewStart=this._getCellCompareValue(a.start),this._previewEnd=this._getCellCompareValue(a.end))}this._changeDetectorRef.detectChanges()}}_dragEnded(i){if(this.activeDrag)if(i.value){let r=this._rangeStrategy?.createDrag?.(this.activeDrag.value,this.selected,i.value,i.event);this.dragEnded.emit({value:r??null,event:i.event})}else this.dragEnded.emit({value:null,event:i.event})}_getDateFromDayOfMonth(i){return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),i)}_initWeekdays(){let i=this._dateAdapter.getFirstDayOfWeek(),r=this._dateAdapter.getDayOfWeekNames("narrow"),o=this._dateAdapter.getDayOfWeekNames("long").map((a,l)=>({long:a,narrow:r[l],id:iNt++}));this._weekdays=o.slice(i).concat(o.slice(0,i))}_createWeekCells(){let i=this._dateAdapter.getNumDaysInMonth(this.activeDate),r=this._dateAdapter.getDateNames();this._weeks=[[]];for(let s=0,o=this._firstWeekOffset;s<i;s++,o++){o==Gge&&(this._weeks.push([]),o=0);let a=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),s+1),l=this._shouldEnableDate(a),c=this._dateAdapter.format(a,this._dateFormats.display.dateA11yLabel),d=this.dateClass?this.dateClass(a,"month"):void 0;this._weeks[this._weeks.length-1].push(new wB(s+1,r[s],c,l,d,this._getCellCompareValue(a),a))}}_shouldEnableDate(i){return!!i&&(!this.minDate||this._dateAdapter.compareDate(i,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(i,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(i))}_getDateInCurrentMonth(i){return i&&this._hasSameMonthAndYear(i,this.activeDate)?this._dateAdapter.getDate(i):null}_hasSameMonthAndYear(i,r){return!!(i&&r&&this._dateAdapter.getMonth(i)==this._dateAdapter.getMonth(r)&&this._dateAdapter.getYear(i)==this._dateAdapter.getYear(r))}_getCellCompareValue(i){if(i){let r=this._dateAdapter.getYear(i),s=this._dateAdapter.getMonth(i),o=this._dateAdapter.getDate(i);return new Date(r,s,o).getTime()}return null}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setRanges(i){i instanceof s1?(this._rangeStart=this._getCellCompareValue(i.start),this._rangeEnd=this._getCellCompareValue(i.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(i),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}_canSelect(i){return!this.dateFilter||this.dateFilter(i)}_clearPreview(){this._previewStart=this._previewEnd=null}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(af,8),R(Od,8),R(Va,8),R(lZ,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-month-view"]],viewQuery:function(r,s){if(r&1&&ei(nA,5),r&2){let o;Pt(o=Rt())&&(s._matCalendarBody=o.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName",activeDrag:"activeDrag"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",dragStarted:"dragStarted",dragEnded:"dragEnded",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],standalone:!0,features:[yn,xe],decls:8,vars:14,consts:[["role","grid",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col"],["aria-hidden","true"],["colspan","7",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","previewChange","dragStarted","dragEnded","keyup","keydown","label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","startDateAccessibleName","endDateAccessibleName"],[1,"cdk-visually-hidden"]],template:function(r,s){r&1&&(h(0,"table",0)(1,"thead",1)(2,"tr"),Kn(3,ROt,5,2,"th",2,Nze),p(),h(5,"tr",3),ee(6,"th",4),p()(),h(7,"tbody",5),F("selectedValueChange",function(a){return s._dateSelected(a)})("activeDateChange",function(a){return s._updateActiveDate(a)})("previewChange",function(a){return s._previewChanged(a)})("dragStarted",function(a){return s.dragStarted.emit(a)})("dragEnded",function(a){return s._dragEnded(a)})("keyup",function(a){return s._handleCalendarBodyKeyup(a)})("keydown",function(a){return s._handleCalendarBodyKeydown(a)}),p()()),r&2&&(g(3),Yn(s._weekdays),g(4),b("label",s._monthLabel)("rows",s._weeks)("todayValue",s._todayDate)("startValue",s._rangeStart)("endValue",s._rangeEnd)("comparisonStart",s._comparisonRangeStart)("comparisonEnd",s._comparisonRangeEnd)("previewStart",s._previewStart)("previewEnd",s._previewEnd)("isRange",s._isRange)("labelMinRequiredCells",3)("activeCell",s._dateAdapter.getDate(s.activeDate)-1)("startDateAccessibleName",s.startDateAccessibleName)("endDateAccessibleName",s.endDateAccessibleName))},dependencies:[nA],encapsulation:2,changeDetection:0});let t=e;return t})(),S4=24,Wge=4,Rze=(()=>{let e=class e{get activeDate(){return this._activeDate}set activeDate(i){let r=this._activeDate,s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(s,this.minDate,this.maxDate),zze(this._dateAdapter,r,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(i){i instanceof s1?this._selected=i:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i)),this._setSelectedYear(i)}get minDate(){return this._minDate}set minDate(i){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}get maxDate(){return this._maxDate}set maxDate(i){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}constructor(i,r,s){this._changeDetectorRef=i,this._dateAdapter=r,this._dir=s,this._rerenderSubscription=na.EMPTY,this.selectedChange=new nt,this.yearSelected=new nt,this.activeDateChange=new nt,this._dateAdapter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(ll(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());let r=this._dateAdapter.getYear(this._activeDate)-bB(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let s=0,o=[];s<S4;s++)o.push(r+s),o.length==Wge&&(this._years.push(o.map(a=>this._createCellForYear(a))),o=[]);this._changeDetectorRef.markForCheck()}_yearSelected(i){let r=i.value,s=this._dateAdapter.createDate(r,0,1),o=this._getDateFromYear(r);this.yearSelected.emit(s),this.selectedChange.emit(o)}_updateActiveDate(i){let r=i.value,s=this._activeDate;this.activeDate=this._getDateFromYear(r),this._dateAdapter.compareDate(s,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(i){let r=this._activeDate,s=this._isRtl();switch(i.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,s?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,s?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-Wge);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,Wge);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-bB(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,S4-bB(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i.altKey?-S4*10:-S4);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i.altKey?S4*10:S4);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(r,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked(),i.preventDefault()}_handleCalendarBodyKeyup(i){(i.keyCode===32||i.keyCode===13)&&(this._selectionKeyPressed&&this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:i}),this._selectionKeyPressed=!1)}_getActiveCell(){return bB(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getDateFromYear(i){let r=this._dateAdapter.getMonth(this.activeDate),s=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(i,r,1));return this._dateAdapter.createDate(i,r,Math.min(this._dateAdapter.getDate(this.activeDate),s))}_createCellForYear(i){let r=this._dateAdapter.createDate(i,0,1),s=this._dateAdapter.getYearName(r),o=this.dateClass?this.dateClass(r,"multi-year"):void 0;return new wB(i,s,s,this._shouldEnableYear(i),o)}_shouldEnableYear(i){if(i==null||this.maxDate&&i>this._dateAdapter.getYear(this.maxDate)||this.minDate&&i<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;let r=this._dateAdapter.createDate(i,0,1);for(let s=r;this._dateAdapter.getYear(s)==i;s=this._dateAdapter.addCalendarDays(s,1))if(this.dateFilter(s))return!0;return!1}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setSelectedYear(i){if(this._selectedYear=null,i instanceof s1){let r=i.start||i.end;r&&(this._selectedYear=this._dateAdapter.getYear(r))}else i&&(this._selectedYear=this._dateAdapter.getYear(i))}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(Od,8),R(Va,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-multi-year-view"]],viewQuery:function(r,s){if(r&1&&ei(nA,5),r&2){let o;Pt(o=Rt())&&(s._matCalendarBody=o.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],standalone:!0,features:[xe],decls:5,vars:7,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","keyup","keydown","rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell"]],template:function(r,s){r&1&&(h(0,"table",0)(1,"thead",1)(2,"tr"),ee(3,"th",2),p()(),h(4,"tbody",3),F("selectedValueChange",function(a){return s._yearSelected(a)})("activeDateChange",function(a){return s._updateActiveDate(a)})("keyup",function(a){return s._handleCalendarBodyKeyup(a)})("keydown",function(a){return s._handleCalendarBodyKeydown(a)}),p()()),r&2&&(g(4),b("rows",s._years)("todayValue",s._todayYear)("startValue",s._selectedYear)("endValue",s._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",s._getActiveCell()))},dependencies:[nA],encapsulation:2,changeDetection:0});let t=e;return t})();Fze=(()=>{let e=class e{get activeDate(){return this._activeDate}set activeDate(i){let r=this._activeDate,s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(s,this.minDate,this.maxDate),this._dateAdapter.getYear(r)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(i){i instanceof s1?this._selected=i:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i)),this._setSelectedMonth(i)}get minDate(){return this._minDate}set minDate(i){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}get maxDate(){return this._maxDate}set maxDate(i){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}constructor(i,r,s,o){this._changeDetectorRef=i,this._dateFormats=r,this._dateAdapter=s,this._dir=o,this._rerenderSubscription=na.EMPTY,this.selectedChange=new nt,this.monthSelected=new nt,this.activeDateChange=new nt,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(ll(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(i){let r=i.value,s=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),r,1);this.monthSelected.emit(s);let o=this._getDateFromMonth(r);this.selectedChange.emit(o)}_updateActiveDate(i){let r=i.value,s=this._activeDate;this.activeDate=this._getDateFromMonth(r),this._dateAdapter.compareDate(s,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(i){let r=this._activeDate,s=this._isRtl();switch(i.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,s?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,s?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i.altKey?10:1);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(r,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),i.preventDefault()}_handleCalendarBodyKeyup(i){(i.keyCode===32||i.keyCode===13)&&(this._selectionKeyPressed&&this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:i}),this._selectionKeyPressed=!1)}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let i=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(r=>r.map(s=>this._createCellForMonth(s,i[s]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getMonthInCurrentYear(i){return i&&this._dateAdapter.getYear(i)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(i):null}_getDateFromMonth(i){let r=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),i,1),s=this._dateAdapter.getNumDaysInMonth(r);return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),i,Math.min(this._dateAdapter.getDate(this.activeDate),s))}_createCellForMonth(i,r){let s=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),i,1),o=this._dateAdapter.format(s,this._dateFormats.display.monthYearA11yLabel),a=this.dateClass?this.dateClass(s,"year"):void 0;return new wB(i,r.toLocaleUpperCase(),o,this._shouldEnableMonth(i),a)}_shouldEnableMonth(i){let r=this._dateAdapter.getYear(this.activeDate);if(i==null||this._isYearAndMonthAfterMaxDate(r,i)||this._isYearAndMonthBeforeMinDate(r,i))return!1;if(!this.dateFilter)return!0;let s=this._dateAdapter.createDate(r,i,1);for(let o=s;this._dateAdapter.getMonth(o)==i;o=this._dateAdapter.addCalendarDays(o,1))if(this.dateFilter(o))return!0;return!1}_isYearAndMonthAfterMaxDate(i,r){if(this.maxDate){let s=this._dateAdapter.getYear(this.maxDate),o=this._dateAdapter.getMonth(this.maxDate);return i>s||i===s&&r>o}return!1}_isYearAndMonthBeforeMinDate(i,r){if(this.minDate){let s=this._dateAdapter.getYear(this.minDate),o=this._dateAdapter.getMonth(this.minDate);return i<s||i===s&&r<o}return!1}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setSelectedMonth(i){i instanceof s1?this._selectedMonth=this._getMonthInCurrentYear(i.start)||this._getMonthInCurrentYear(i.end):this._selectedMonth=this._getMonthInCurrentYear(i)}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(af,8),R(Od,8),R(Va,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-year-view"]],viewQuery:function(r,s){if(r&1&&ei(nA,5),r&2){let o;Pt(o=Rt())&&(s._matCalendarBody=o.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],standalone:!0,features:[xe],decls:5,vars:9,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","keyup","keydown","label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell"]],template:function(r,s){r&1&&(h(0,"table",0)(1,"thead",1)(2,"tr"),ee(3,"th",2),p()(),h(4,"tbody",3),F("selectedValueChange",function(a){return s._monthSelected(a)})("activeDateChange",function(a){return s._updateActiveDate(a)})("keyup",function(a){return s._handleCalendarBodyKeyup(a)})("keydown",function(a){return s._handleCalendarBodyKeydown(a)}),p()()),r&2&&(g(4),b("label",s._yearLabel)("rows",s._months)("todayValue",s._todayMonth)("startValue",s._selectedMonth)("endValue",s._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",s._dateAdapter.getMonth(s.activeDate)))},dependencies:[nA],encapsulation:2,changeDetection:0});let t=e;return t})(),rNt=1,Gze=(()=>{let e=class e{constructor(i,r,s,o,a){this._intl=i,this.calendar=r,this._dateAdapter=s,this._dateFormats=o,this._id=`mat-calendar-header-${rNt++}`,this._periodButtonLabelId=`${this._id}-period-label`,this.calendar.stateChanges.subscribe(()=>a.markForCheck())}get periodButtonText(){return this.calendar.currentView=="month"?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():this.calendar.currentView=="year"?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRange(...this._formatMinAndMaxYearLabels())}get periodButtonDescription(){return this.calendar.currentView=="month"?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():this.calendar.currentView=="year"?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRangeLabel(...this._formatMinAndMaxYearLabels())}get periodButtonLabel(){return this.calendar.currentView=="month"?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView=this.calendar.currentView=="month"?"multi-year":"month"}previousClicked(){this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?-1:-S4)}nextClicked(){this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?1:S4)}previousEnabled(){return this.calendar.minDate?!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate):!0}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(i,r){return this.calendar.currentView=="month"?this._dateAdapter.getYear(i)==this._dateAdapter.getYear(r)&&this._dateAdapter.getMonth(i)==this._dateAdapter.getMonth(r):this.calendar.currentView=="year"?this._dateAdapter.getYear(i)==this._dateAdapter.getYear(r):zze(this._dateAdapter,i,r,this.calendar.minDate,this.calendar.maxDate)}_formatMinAndMaxYearLabels(){let r=this._dateAdapter.getYear(this.calendar.activeDate)-bB(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),s=r+S4-1,o=this._dateAdapter.getYearName(this._dateAdapter.createDate(r,0,1)),a=this._dateAdapter.getYearName(this._dateAdapter.createDate(s,0,1));return[o,a]}};e.\u0275fac=function(r){return new(r||e)(R(SB),R(_c(()=>Uge)),R(Od,8),R(af,8),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],standalone:!0,features:[xe],ngContentSelectors:Vze,decls:13,vars:11,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["aria-live","polite",1,"cdk-visually-hidden",3,"id"],["mat-button","","type","button",1,"mat-calendar-period-button",3,"click"],["aria-hidden","true"],["viewBox","0 0 10 5","focusable","false","aria-hidden","true",1,"mat-calendar-arrow"],["points","0,0 5,5 10,0"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"click","disabled"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"click","disabled"]],template:function(r,s){r&1&&(gr(),h(0,"div",0)(1,"div",1)(2,"label",2),y(3),p(),h(4,"button",3),F("click",function(){return s.currentPeriodClicked()}),h(5,"span",4),y(6),p(),$p(),h(7,"svg",5),ee(8,"polygon",6),p()(),gy(),ee(9,"div",7),Ln(10),h(11,"button",8),F("click",function(){return s.previousClicked()}),p(),h(12,"button",9),F("click",function(){return s.nextClicked()}),p()()()),r&2&&(g(2),b("id",s._periodButtonLabelId),g(),ye(s.periodButtonDescription),g(),Bn("aria-label",s.periodButtonLabel)("aria-describedby",s._periodButtonLabelId),g(2),ye(s.periodButtonText),g(),ki("mat-calendar-invert",s.calendar.currentView!=="month"),g(4),b("disabled",!s.previousEnabled()),Bn("aria-label",s.prevButtonLabel),g(),b("disabled",!s.nextEnabled()),Bn("aria-label",s.nextButtonLabel))},dependencies:[G_,A8],encapsulation:2,changeDetection:0});let t=e;return t})(),Uge=(()=>{let e=class e{get startAt(){return this._startAt}set startAt(i){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}get selected(){return this._selected}set selected(i){i instanceof s1?this._selected=i:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}get minDate(){return this._minDate}set minDate(i){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}get maxDate(){return this._maxDate}set maxDate(i){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}get activeDate(){return this._clampedActiveDate}set activeDate(i){this._clampedActiveDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(i){let r=this._currentView!==i?i:null;this._currentView=i,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),r&&this.viewChanged.emit(r)}constructor(i,r,s,o){this._dateAdapter=r,this._dateFormats=s,this._changeDetectorRef=o,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new nt,this.yearSelected=new nt,this.monthSelected=new nt,this.viewChanged=new nt(!0),this._userSelection=new nt,this._userDragDrop=new nt,this._activeDrag=null,this.stateChanges=new Mi,this._intlChanges=i.changes.subscribe(()=>{o.markForCheck(),this.stateChanges.next()})}ngAfterContentInit(){this._calendarHeaderPortal=new e2(this.headerComponent||Gze),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(i){let r=i.minDate&&!this._dateAdapter.sameDate(i.minDate.previousValue,i.minDate.currentValue)?i.minDate:void 0,s=i.maxDate&&!this._dateAdapter.sameDate(i.maxDate.previousValue,i.maxDate.currentValue)?i.maxDate:void 0,o=r||s||i.dateFilter;if(o&&!o.firstChange){let a=this._getCurrentViewComponent();a&&(this._moveFocusOnNextTick=!0,this._changeDetectorRef.detectChanges(),a._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){this._getCurrentViewComponent()._init()}_dateSelected(i){let r=i.value;(this.selected instanceof s1||r&&!this._dateAdapter.sameDate(r,this.selected))&&this.selectedChange.emit(r),this._userSelection.emit(i)}_yearSelectedInMultiYearView(i){this.yearSelected.emit(i)}_monthSelectedInYearView(i){this.monthSelected.emit(i)}_goToDateInView(i,r){this.activeDate=i,this.currentView=r}_dragStarted(i){this._activeDrag=i}_dragEnded(i){this._activeDrag&&(i.value&&this._userDragDrop.emit(i),this._activeDrag=null)}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}};e.\u0275fac=function(r){return new(r||e)(R(SB),R(Od,8),R(af,8),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["mat-calendar"]],viewQuery:function(r,s){if(r&1&&(ei(Pze,5),ei(Fze,5),ei(Rze,5)),r&2){let o;Pt(o=Rt())&&(s.monthView=o.first),Pt(o=Rt())&&(s.yearView=o.first),Pt(o=Rt())&&(s.multiYearView=o.first)}},hostAttrs:[1,"mat-calendar"],inputs:{headerComponent:"headerComponent",startAt:"startAt",startView:"startView",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection",_userDragDrop:"_userDragDrop"},exportAs:["matCalendar"],standalone:!0,features:[as([Bze]),yn,xe],decls:5,vars:2,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass"],[3,"activeDateChange","_userSelection","dragStarted","dragEnded","activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag"],[3,"activeDateChange","monthSelected","selectedChange","activeDate","selected","dateFilter","maxDate","minDate","dateClass"],[3,"activeDateChange","yearSelected","selectedChange","activeDate","selected","dateFilter","maxDate","minDate","dateClass"]],template:function(r,s){if(r&1&&(W(0,FOt,0,0,"ng-template",0),h(1,"div",1),W(2,LOt,1,11,"mat-month-view",2)(3,OOt,1,6,"mat-year-view",3)(4,NOt,1,6,"mat-multi-year-view",3),p()),r&2){let o;b("cdkPortalOutlet",s._calendarHeaderPortal),g(2),Je((o=s.currentView)==="month"?2:o==="year"?3:o==="multi-year"?4:-1)}},dependencies:[w0,YO,Pze,Fze,Rze],styles:['.mat-calendar{display:block;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-app-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-app-body-medium-size))}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px;font-size:var(--mat-datepicker-calendar-period-button-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-datepicker-calendar-period-button-text-weight, var(--mat-app-title-small-weight));--mdc-text-button-label-text-color:var(--mat-datepicker-calendar-period-button-text-color, var(--mat-app-on-surface-variant))}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle;fill:var(--mat-datepicker-calendar-period-button-icon-color, var(--mat-app-on-surface-variant))}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-datepicker-content .mat-calendar-previous-button:not(.mat-mdc-button-disabled),.mat-datepicker-content .mat-calendar-next-button:not(.mat-mdc-button-disabled){color:var(--mat-datepicker-calendar-navigation-button-icon-color, var(--mat-app-on-surface-variant))}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0;color:var(--mat-datepicker-calendar-header-text-color, var(--mat-app-on-surface-variant));font-size:var(--mat-datepicker-calendar-header-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-datepicker-calendar-header-text-weight, var(--mat-app-title-small-weight))}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px;background:var(--mat-datepicker-calendar-header-divider-color)}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let t=e;return t})(),Lze={transformPanel:Nd("transformPanel",[cl("void => enter-dropdown",Ml("120ms cubic-bezier(0, 0, 0.2, 1)",nhe([So({opacity:0,transform:"scale(1, 0.8)"}),So({opacity:1,transform:"scale(1, 1)"})]))),cl("void => enter-dialog",Ml("150ms cubic-bezier(0, 0, 0.2, 1)",nhe([So({opacity:0,transform:"scale(0.7)"}),So({transform:"none",opacity:1})]))),cl("* => void",Ml("100ms linear",So({opacity:0})))]),fadeInCalendar:Nd("fadeInCalendar",[bc("void",So({opacity:0})),bc("enter",So({opacity:1})),cl("void => *",Ml("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},sNt=0,Wze=new Ri("mat-datepicker-scroll-strategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.reposition()}});aNt={provide:Wze,deps:[xl],useFactory:oNt},Uze=(()=>{let e=class e{constructor(i,r,s,o,a,l){this._elementRef=i,this._changeDetectorRef=r,this._globalModel=s,this._dateAdapter=o,this._rangeSelectionStrategy=a,this._subscriptions=new na,this._animationDone=new Mi,this._isAnimating=!1,this._actionsPortal=null,this._closeButtonText=l.closeCalendarLabel}ngOnInit(){this._animationState=this.datepicker.touchUi?"enter-dialog":"enter-dropdown"}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(i){let r=this._model.selection,s=i.value,o=r instanceof s1;if(o&&this._rangeSelectionStrategy){let a=this._rangeSelectionStrategy.selectionFinished(s,r,i.event);this._model.updateSelection(a,this)}else s&&(o||!this._dateAdapter.sameDate(s,r))&&this._model.add(s);(!this._model||this._model.isComplete())&&!this._actionsPortal&&this.datepicker.close()}_handleUserDragDrop(i){this._model.updateSelection(i.value,this)}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_handleAnimationEvent(i){this._isAnimating=i.phaseName==="start",this._isAnimating||this._animationDone.next()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}_assignActions(i,r){this._model=i?this._globalModel.clone():this._globalModel,this._actionsPortal=i,r&&this._changeDetectorRef.detectChanges()}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Kt),R(b7),R(Od),R(lZ,8),R(SB))},e.\u0275cmp=_e({type:e,selectors:[["mat-datepicker-content"]],viewQuery:function(r,s){if(r&1&&ei(Uge,5),r&2){let o;Pt(o=Rt())&&(s._calendar=o.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:5,hostBindings:function(r,s){r&1&&C8("@transformPanel.start",function(a){return s._handleAnimationEvent(a)})("@transformPanel.done",function(a){return s._handleAnimationEvent(a)}),r&2&&(_y("@transformPanel",s._animationState),jr(s.color?"mat-"+s.color:""),ki("mat-datepicker-content-touch",s.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],standalone:!0,features:[xe],decls:5,vars:27,consts:[["cdkTrapFocus","","role","dialog",1,"mat-datepicker-content-container"],[3,"yearSelected","monthSelected","viewChanged","_userSelection","_userDragDrop","id","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"focus","blur","click","color"]],template:function(r,s){if(r&1&&(h(0,"div",0)(1,"mat-calendar",1),F("yearSelected",function(a){return s.datepicker._selectYear(a)})("monthSelected",function(a){return s.datepicker._selectMonth(a)})("viewChanged",function(a){return s.datepicker._viewChanged(a)})("_userSelection",function(a){return s._handleUserSelection(a)})("_userDragDrop",function(a){return s._handleUserDragDrop(a)}),p(),W(2,VOt,0,0,"ng-template",2),h(3,"button",3),F("focus",function(){return s._closeButtonFocused=!0})("blur",function(){return s._closeButtonFocused=!1})("click",function(){return s.datepicker.close()}),y(4),p()()),r&2){let o;ki("mat-datepicker-content-container-with-custom-header",s.datepicker.calendarHeaderComponent)("mat-datepicker-content-container-with-actions",s._actionsPortal),Bn("aria-modal",!0)("aria-labelledby",(o=s._dialogLabelId)!==null&&o!==void 0?o:void 0),g(),jr(s.datepicker.panelClass),b("id",s.datepicker.id)("startAt",s.datepicker.startAt)("startView",s.datepicker.startView)("minDate",s.datepicker._getMinDate())("maxDate",s.datepicker._getMaxDate())("dateFilter",s.datepicker._getDateFilter())("headerComponent",s.datepicker.calendarHeaderComponent)("selected",s._getSelected())("dateClass",s.datepicker.dateClass)("comparisonStart",s.comparisonStart)("comparisonEnd",s.comparisonEnd)("@fadeInCalendar","enter")("startDateAccessibleName",s.startDateAccessibleName)("endDateAccessibleName",s.endDateAccessibleName),g(),b("cdkPortalOutlet",s._actionsPortal),g(),ki("cdk-visually-hidden",!s._closeButtonFocused),b("color",s.color||"primary"),g(),ye(s._closeButtonText)}},dependencies:[VEe,Uge,w0,G_],styles:[".mat-datepicker-content{display:block;border-radius:4px;background-color:var(--mat-datepicker-calendar-container-background-color, var(--mat-app-surface-container-high));color:var(--mat-datepicker-calendar-container-text-color, var(--mat-app-on-surface));box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow);border-radius:var(--mat-datepicker-calendar-container-shape, var(--mat-app-corner-large))}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow);border-radius:var(--mat-datepicker-calendar-container-touch-shape, var(--mat-app-corner-extra-large));position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}"],encapsulation:2,data:{animation:[Lze.transformPanel,Lze.fadeInCalendar]},changeDetection:0});let t=e;return t})(),oD=(()=>{let e=class e{get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(i){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(i){this._color=i}get disabled(){return this._disabled===void 0&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(i){i!==this._disabled&&(this._disabled=i,this.stateChanges.next(void 0))}get panelClass(){return this._panelClass}set panelClass(i){this._panelClass=ZDe(i)}get opened(){return this._opened}set opened(i){i?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}constructor(i,r,s,o,a,l,c){this._overlay=i,this._viewContainerRef=s,this._dateAdapter=a,this._dir=l,this._model=c,this._inputStateChanges=na.EMPTY,this._document=Ve(Lr),this.startView="month",this.touchUi=!1,this.xPosition="start",this.yPosition="below",this.restoreFocus=!0,this.yearSelected=new nt,this.monthSelected=new nt,this.viewChanged=new nt(!0),this.openedStream=new nt,this.closedStream=new nt,this._opened=!1,this.id=`mat-datepicker-${sNt++}`,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new Mi,this._injector=Ve($o),this._changeDetectorRef=Ve(Kt),this._dateAdapter,this._scrollStrategy=o,this._model.selectionChanged.subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnChanges(i){let r=i.xPosition||i.yPosition;if(r&&!r.firstChange&&this._overlayRef){let s=this._overlayRef.getConfig().positionStrategy;s instanceof zO&&(this._setConnectedPositions(s),this.opened&&this._overlayRef.updatePosition())}this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyOverlay(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(i){this._model.add(i)}_selectYear(i){this.yearSelected.emit(i)}_selectMonth(i){this.monthSelected.emit(i)}_viewChanged(i){this.viewChanged.emit(i)}registerInput(i){return this.datepickerInput,this._inputStateChanges.unsubscribe(),this.datepickerInput=i,this._inputStateChanges=i.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(i){this._actionsPortal,this._actionsPortal=i,this._componentRef?.instance._assignActions(i,!0)}removeActions(i){i===this._actionsPortal&&(this._actionsPortal=null,this._componentRef?.instance._assignActions(null,!0))}open(){this._opened||this.disabled||this._componentRef?.instance._isAnimating||(this.datepickerInput,this._focusedElementBeforeOpen=B_(),this._openOverlay(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened||this._componentRef?.instance._isAnimating)return;let i=this.restoreFocus&&this._focusedElementBeforeOpen&&typeof this._focusedElementBeforeOpen.focus=="function",r=()=>{this._opened&&(this._opened=!1,this.closedStream.emit())};if(this._componentRef){let{instance:s,location:o}=this._componentRef;s._startExitAnimation(),s._animationDone.pipe(ic(1)).subscribe(()=>{let a=this._document.activeElement;i&&(!a||a===this._document.activeElement||o.nativeElement.contains(a))&&this._focusedElementBeforeOpen.focus(),this._focusedElementBeforeOpen=null,this._destroyOverlay()})}i?setTimeout(r):r()}_applyPendingSelection(){this._componentRef?.instance?._applyPendingSelection()}_forwardContentValues(i){i.datepicker=this,i.color=this.color,i._dialogLabelId=this.datepickerInput.getOverlayLabelId(),i._assignActions(this._actionsPortal,!1)}_openOverlay(){this._destroyOverlay();let i=this.touchUi,r=new e2(Uze,this._viewContainerRef),s=this._overlayRef=this._overlay.create(new Xg({positionStrategy:i?this._getDialogStrategy():this._getDropdownStrategy(),hasBackdrop:!0,backdropClass:[i?"cdk-overlay-dark-backdrop":"mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:i?this._overlay.scrollStrategies.block():this._scrollStrategy(),panelClass:`mat-datepicker-${i?"dialog":"popup"}`}));this._getCloseStream(s).subscribe(o=>{o&&o.preventDefault(),this.close()}),s.keydownEvents().subscribe(o=>{let a=o.keyCode;(a===38||a===40||a===37||a===39||a===33||a===34)&&o.preventDefault()}),this._componentRef=s.attach(r),this._forwardContentValues(this._componentRef.instance),i||wh(()=>{s.updatePosition()},{injector:this._injector})}_destroyOverlay(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=this._componentRef=null)}_getDialogStrategy(){return this._overlay.position().global().centerHorizontally().centerVertically()}_getDropdownStrategy(){let i=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition();return this._setConnectedPositions(i)}_setConnectedPositions(i){let r=this.xPosition==="end"?"end":"start",s=r==="start"?"end":"start",o=this.yPosition==="above"?"bottom":"top",a=o==="top"?"bottom":"top";return i.withPositions([{originX:r,originY:a,overlayX:r,overlayY:o},{originX:r,originY:o,overlayX:r,overlayY:a},{originX:s,originY:a,overlayX:s,overlayY:o},{originX:s,originY:o,overlayX:s,overlayY:a}])}_getCloseStream(i){let r=["ctrlKey","shiftKey","metaKey"];return ra(i.backdropClick(),i.detachments(),i.keydownEvents().pipe(Ks(s=>s.keyCode===27&&!Pc(s)||this.datepickerInput&&Pc(s,"altKey")&&s.keyCode===38&&r.every(o=>!Pc(s,o)))))}};e.\u0275fac=function(r){return new(r||e)(R(xl),R(pn),R(Na),R(Wze),R(Od,8),R(Va,8),R(b7))},e.\u0275dir=mi({type:e,inputs:{calendarHeaderComponent:"calendarHeaderComponent",startAt:"startAt",startView:"startView",color:"color",touchUi:[2,"touchUi","touchUi",mn],disabled:[2,"disabled","disabled",mn],xPosition:"xPosition",yPosition:"yPosition",restoreFocus:[2,"restoreFocus","restoreFocus",mn],dateClass:"dateClass",panelClass:"panelClass",opened:[2,"opened","opened",mn]},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[Bs,yn]});let t=e;return t})(),jze=(()=>{let e=class e extends oD{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275cmp=_e({type:e,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],standalone:!0,features:[as([Bze,{provide:oD,useExisting:e}]),et,xe],decls:0,vars:0,template:function(r,s){},encapsulation:2,changeDetection:0});let t=e;return t})(),iA=class{constructor(e,n){this.target=e,this.targetElement=n,this.value=this.target.value}},$ze=(()=>{let e=class e{get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(i){this._assignValueProgrammatically(i)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(i){let r=i,s=this._elementRef.nativeElement;this._disabled!==r&&(this._disabled=r,this.stateChanges.next(void 0)),r&&this._isInitialized&&s.blur&&s.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(i){this._model=i,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(r=>{if(this._shouldHandleChangeEvent(r)){let s=this._getValueFromModel(r.selection);this._lastValueValid=this._isValidValue(s),this._cvaOnChange(s),this._onTouched(),this._formatValue(s),this.dateInput.emit(new iA(this,this._elementRef.nativeElement)),this.dateChange.emit(new iA(this,this._elementRef.nativeElement))}})}constructor(i,r,s){this._elementRef=i,this._dateAdapter=r,this._dateFormats=s,this.dateChange=new nt,this.dateInput=new nt,this.stateChanges=new Mi,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=na.EMPTY,this._localeSubscription=na.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=o=>{let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(o.value));return!a||this._matchesFilter(a)?null:{matDatepickerFilter:!0}},this._minValidator=o=>{let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(o.value)),l=this._getMinDate();return!l||!a||this._dateAdapter.compareDate(l,a)<=0?null:{matDatepickerMin:{min:l,actual:a}}},this._maxValidator=o=>{let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(o.value)),l=this._getMaxDate();return!l||!a||this._dateAdapter.compareDate(l,a)>=0?null:{matDatepickerMax:{max:l,actual:a}}},this._lastValueValid=!1,this._localeSubscription=r.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(i){Kze(i,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(i){this._validatorOnChange=i}validate(i){return this._validator?this._validator(i):null}writeValue(i){this._assignValueProgrammatically(i)}registerOnChange(i){this._cvaOnChange=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this.disabled=i}_onKeydown(i){let r=["ctrlKey","shiftKey","metaKey"];Pc(i,"altKey")&&i.keyCode===40&&r.every(o=>!Pc(i,o))&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),i.preventDefault())}_onInput(i){let r=this._lastValueValid,s=this._dateAdapter.parse(i,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(s),s=this._dateAdapter.getValidDateOrNull(s);let o=!this._dateAdapter.sameDate(s,this.value);!s||o?this._cvaOnChange(s):(i&&!this.value&&this._cvaOnChange(s),r!==this._lastValueValid&&this._validatorOnChange()),o&&(this._assignValue(s),this.dateInput.emit(new iA(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new iA(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(i){this._elementRef.nativeElement.value=i!=null?this._dateAdapter.format(i,this._dateFormats.display.dateInput):""}_assignValue(i){this._model?(this._assignValueToModel(i),this._pendingValue=null):this._pendingValue=i}_isValidValue(i){return!i||this._dateAdapter.isValid(i)}_parentDisabled(){return!1}_assignValueProgrammatically(i){i=this._dateAdapter.deserialize(i),this._lastValueValid=this._isValidValue(i),i=this._dateAdapter.getValidDateOrNull(i),this._assignValue(i),this._formatValue(i)}_matchesFilter(i){let r=this._getDateFilter();return!r||r(i)}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Od,8),R(af,8))},e.\u0275dir=mi({type:e,inputs:{value:"value",disabled:[2,"disabled","disabled",mn]},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[Bs,yn]});let t=e;return t})();lNt={provide:Dh,useExisting:_c(()=>cZ),multi:!0},cNt={provide:Ev,useExisting:_c(()=>cZ),multi:!0},cZ=(()=>{let e=class e extends $ze{set matDatepicker(i){i&&(this._datepicker=i,this._ariaOwns.set(i.opened?i.id:null),this._closedSubscription=i.closedStream.subscribe(()=>{this._onTouched(),this._ariaOwns.set(null)}),this._openedSubscription=i.openedStream.subscribe(()=>{this._ariaOwns.set(i.id)}),this._registerModel(i.registerInput(this)))}get min(){return this._min}set min(i){let r=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i));this._dateAdapter.sameDate(r,this._min)||(this._min=r,this._validatorOnChange())}get max(){return this._max}set max(i){let r=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i));this._dateAdapter.sameDate(r,this._max)||(this._max=r,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(i){let r=this._matchesFilter(this.value);this._dateFilter=i,this._matchesFilter(this.value)!==r&&this._validatorOnChange()}constructor(i,r,s,o){super(i,r,s),this._formField=o,this._closedSubscription=na.EMPTY,this._openedSubscription=na.EMPTY,this._ariaOwns=gt(null),this._validator=_m.compose(super._getValidators())}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():this._elementRef.nativeElement.getAttribute("aria-labelledby")}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe(),this._openedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(i){return i}_assignValueToModel(i){this._model&&this._model.updateSelection(i,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(i){return i.source!==this}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Od,8),R(af,8),R(K_,8))},e.\u0275dir=mi({type:e,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(r,s){r&1&&F("input",function(a){return s._onInput(a.target.value)})("change",function(){return s._onChange()})("blur",function(){return s._onBlur()})("keydown",function(a){return s._onKeydown(a)}),r&2&&(Kp("disabled",s.disabled),Bn("aria-haspopup",s._datepicker?"dialog":null)("aria-owns",s._ariaOwns())("min",s.min?s._dateAdapter.toIso8601(s.min):null)("max",s.max?s._dateAdapter.toIso8601(s.max):null)("data-mat-calendar",s._datepicker?s._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:[0,"matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],standalone:!0,features:[as([lNt,cNt,{provide:Lpe,useExisting:e}]),et]});let t=e;return t})(),dNt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["","matDatepickerToggleIcon",""]],standalone:!0});let t=e;return t})(),TB=(()=>{let e=class e{get disabled(){return this._disabled===void 0&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(i){this._disabled=i}constructor(i,r,s){this._intl=i,this._changeDetectorRef=r,this._stateChanges=na.EMPTY;let o=Number(s);this.tabIndex=o||o===0?o:null}ngOnChanges(i){i.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(i){this.datepicker&&!this.disabled&&(this.datepicker.open(),i.stopPropagation())}_watchStateChanges(){let i=this.datepicker?this.datepicker.stateChanges:Fr(),r=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:Fr(),s=this.datepicker?ra(this.datepicker.openedStream,this.datepicker.closedStream):Fr();this._stateChanges.unsubscribe(),this._stateChanges=ra(this._intl.changes,i,r,s).subscribe(()=>this._changeDetectorRef.markForCheck())}};e.\u0275fac=function(r){return new(r||e)(R(SB),R(Kt),wp("tabindex"))},e.\u0275cmp=_e({type:e,selectors:[["mat-datepicker-toggle"]],contentQueries:function(r,s,o){if(r&1&&_o(o,dNt,5),r&2){let a;Pt(a=Rt())&&(s._customIcon=a.first)}},viewQuery:function(r,s){if(r&1&&ei(BOt,5),r&2){let o;Pt(o=Rt())&&(s._button=o.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(r,s){r&1&&F("click",function(a){return s._open(a)}),r&2&&(Bn("tabindex",null)("data-mat-calendar",s.datepicker?s.datepicker.id:null),ki("mat-datepicker-toggle-active",s.datepicker&&s.datepicker.opened)("mat-accent",s.datepicker&&s.datepicker.color==="accent")("mat-warn",s.datepicker&&s.datepicker.color==="warn"))},inputs:{datepicker:[0,"for","datepicker"],tabIndex:"tabIndex",ariaLabel:[0,"aria-label","ariaLabel"],disabled:[2,"disabled","disabled",mn],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],standalone:!0,features:[Bs,yn,xe],ngContentSelectors:HOt,decls:4,vars:6,consts:[["button",""],["mat-icon-button","","type","button",3,"disabled","disableRipple"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false","aria-hidden","true",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(r,s){r&1&&(gr(zOt),h(0,"button",1,0),W(2,GOt,2,0,":svg:svg",2),Ln(3),p()),r&2&&(b("disabled",s.disabled)("disableRipple",s.disableRipple),Bn("aria-haspopup",s.datepicker?"dialog":null)("aria-label",s.ariaLabel||s._intl.openCalendarLabel)("tabindex",s.disabled?-1:s.tabIndex),g(2),Je(s._customIcon?-1:2))},dependencies:[A8],styles:[".mat-datepicker-toggle{pointer-events:auto;color:var(--mat-datepicker-toggle-icon-color, var(--mat-app-on-surface-variant))}.mat-datepicker-toggle-active{color:var(--mat-datepicker-toggle-active-state-icon-color, var(--mat-app-on-surface-variant))}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}"],encapsulation:2,changeDetection:0});let t=e;return t})();dZ=new Ri("MAT_DATE_RANGE_INPUT_PARENT"),Yze=(()=>{let e=class e extends $ze{get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(i){this._errorStateTracker.matcher=i}get errorState(){return this._errorStateTracker.errorState}set errorState(i){this._errorStateTracker.errorState=i}constructor(i,r,s,o,a,l,c,d){super(r,c,d),this._rangeInput=i,this._elementRef=r,this._defaultErrorStateMatcher=s,this._injector=o,this._parentForm=a,this._parentFormGroup=l,this._dir=Ve(Va,{optional:!0}),this._errorStateTracker=new M8(this._defaultErrorStateMatcher,null,this._parentFormGroup,this._parentForm,this.stateChanges)}ngOnInit(){let i=this._injector.get(p4,null,{optional:!0,self:!0});i&&(this.ngControl=i,this._errorStateTracker.ngControl=i)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return this._elementRef.nativeElement.value.length===0}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}getMirrorValue(){let i=this._elementRef.nativeElement,r=i.value;return r.length>0?r:i.placeholder}updateErrorState(){this._errorStateTracker.updateErrorState()}_onInput(i){super._onInput(i),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}_shouldHandleChangeEvent({source:i}){return i!==this._rangeInput._startInput&&i!==this._rangeInput._endInput}_assignValueProgrammatically(i){super._assignValueProgrammatically(i),(this===this._rangeInput._startInput?this._rangeInput._endInput:this._rangeInput._startInput)?._validatorOnChange()}_getAccessibleName(){return uNt(this._elementRef.nativeElement)}};e.\u0275fac=function(r){return new(r||e)(R(dZ),R(fi),R(ig),R($o),R(L8,8),R(e1,8),R(Od,8),R(af,8))},e.\u0275dir=mi({type:e,inputs:{errorStateMatcher:"errorStateMatcher"},standalone:!0,features:[et]});let t=e;return t})(),$ge=(()=>{let e=class e extends Yze{constructor(i,r,s,o,a,l,c,d){super(i,r,s,o,a,l,c,d),this._startValidator=u=>{let m=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(u.value)),f=this._model?this._model.selection.end:null;return!m||!f||this._dateAdapter.compareDate(m,f)<=0?null:{matStartDateInvalid:{end:f,actual:m}}},this._validator=_m.compose([...super._getValidators(),this._startValidator])}_getValueFromModel(i){return i.start}_shouldHandleChangeEvent(i){return super._shouldHandleChangeEvent(i)?i.oldValue?.start?!i.selection.start||!!this._dateAdapter.compareDate(i.oldValue.start,i.selection.start):!!i.selection.start:!1}_assignValueToModel(i){if(this._model){let r=new s1(i,this._model.selection.end);this._model.updateSelection(r,this)}}_formatValue(i){super._formatValue(i),this._rangeInput._handleChildValueChange()}_onKeydown(i){let r=this._rangeInput._endInput,s=this._elementRef.nativeElement,o=this._dir?.value!=="rtl";(i.keyCode===39&&o||i.keyCode===37&&!o)&&s.selectionStart===s.value.length&&s.selectionEnd===s.value.length?(i.preventDefault(),r._elementRef.nativeElement.setSelectionRange(0,0),r.focus()):super._onKeydown(i)}};e.\u0275fac=function(r){return new(r||e)(R(dZ),R(fi),R(ig),R($o),R(L8,8),R(e1,8),R(Od,8),R(af,8))},e.\u0275dir=mi({type:e,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(r,s){r&1&&F("input",function(a){return s._onInput(a.target.value)})("change",function(){return s._onChange()})("keydown",function(a){return s._onKeydown(a)})("blur",function(){return s._onBlur()}),r&2&&(Kp("disabled",s.disabled),Bn("aria-haspopup",s._rangeInput.rangePicker?"dialog":null)("aria-owns",s._rangeInput._ariaOwns?s._rangeInput._ariaOwns():(s._rangeInput.rangePicker==null?null:s._rangeInput.rangePicker.opened)&&s._rangeInput.rangePicker.id||null)("min",s._getMinDate()?s._dateAdapter.toIso8601(s._getMinDate()):null)("max",s._getMaxDate()?s._dateAdapter.toIso8601(s._getMaxDate()):null))},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[as([{provide:Dh,useExisting:e,multi:!0},{provide:Ev,useExisting:e,multi:!0}]),et]});let t=e;return t})(),Kge=(()=>{let e=class e extends Yze{constructor(i,r,s,o,a,l,c,d){super(i,r,s,o,a,l,c,d),this._endValidator=u=>{let m=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(u.value)),f=this._model?this._model.selection.start:null;return!m||!f||this._dateAdapter.compareDate(m,f)>=0?null:{matEndDateInvalid:{start:f,actual:m}}},this._validator=_m.compose([...super._getValidators(),this._endValidator])}_getValueFromModel(i){return i.end}_shouldHandleChangeEvent(i){return super._shouldHandleChangeEvent(i)?i.oldValue?.end?!i.selection.end||!!this._dateAdapter.compareDate(i.oldValue.end,i.selection.end):!!i.selection.end:!1}_assignValueToModel(i){if(this._model){let r=new s1(this._model.selection.start,i);this._model.updateSelection(r,this)}}_moveCaretToEndOfStartInput(){let i=this._rangeInput._startInput._elementRef.nativeElement,r=i.value;r.length>0&&i.setSelectionRange(r.length,r.length),i.focus()}_onKeydown(i){let r=this._elementRef.nativeElement,s=this._dir?.value!=="rtl";i.keyCode===8&&!r.value?this._moveCaretToEndOfStartInput():(i.keyCode===37&&s||i.keyCode===39&&!s)&&r.selectionStart===0&&r.selectionEnd===0?(i.preventDefault(),this._moveCaretToEndOfStartInput()):super._onKeydown(i)}};e.\u0275fac=function(r){return new(r||e)(R(dZ),R(fi),R(ig),R($o),R(L8,8),R(e1,8),R(Od,8),R(af,8))},e.\u0275dir=mi({type:e,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(r,s){r&1&&F("input",function(a){return s._onInput(a.target.value)})("change",function(){return s._onChange()})("keydown",function(a){return s._onKeydown(a)})("blur",function(){return s._onBlur()}),r&2&&(Kp("disabled",s.disabled),Bn("aria-haspopup",s._rangeInput.rangePicker?"dialog":null)("aria-owns",s._rangeInput._ariaOwns?s._rangeInput._ariaOwns():(s._rangeInput.rangePicker==null?null:s._rangeInput.rangePicker.opened)&&s._rangeInput.rangePicker.id||null)("min",s._getMinDate()?s._dateAdapter.toIso8601(s._getMinDate()):null)("max",s._getMaxDate()?s._dateAdapter.toIso8601(s._getMaxDate()):null))},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[as([{provide:Dh,useExisting:e,multi:!0},{provide:Ev,useExisting:e,multi:!0}]),et]});let t=e;return t})(),mNt=0,qze=(()=>{let e=class e{get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){let i=this._startInput?._getPlaceholder()||"",r=this._endInput?._getPlaceholder()||"";return i||r?`${i} ${this.separator} ${r}`:""}get rangePicker(){return this._rangePicker}set rangePicker(i){i&&(this._model=i.registerInput(this),this._rangePicker=i,this._closedSubscription.unsubscribe(),this._openedSubscription.unsubscribe(),this._ariaOwns.set(this.rangePicker.opened?i.id:null),this._closedSubscription=i.closedStream.subscribe(()=>{this._startInput?._onTouched(),this._endInput?._onTouched(),this._ariaOwns.set(null)}),this._openedSubscription=i.openedStream.subscribe(()=>{this._ariaOwns.set(i.id)}),this._registerModel(this._model))}get required(){return this._required??(this._isTargetRequired(this)||this._isTargetRequired(this._startInput)||this._isTargetRequired(this._endInput))??!1}set required(i){this._required=i}get dateFilter(){return this._dateFilter}set dateFilter(i){let r=this._startInput,s=this._endInput,o=r&&r._matchesFilter(r.value),a=s&&s._matchesFilter(r.value);this._dateFilter=i,r&&r._matchesFilter(r.value)!==o&&r._validatorOnChange(),s&&s._matchesFilter(s.value)!==a&&s._validatorOnChange()}get min(){return this._min}set min(i){let r=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i));this._dateAdapter.sameDate(r,this._min)||(this._min=r,this._revalidate())}get max(){return this._max}set max(i){let r=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i));this._dateAdapter.sameDate(r,this._max)||(this._max=r,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(i){i!==this._groupDisabled&&(this._groupDisabled=i,this.stateChanges.next(void 0))}get errorState(){return this._startInput&&this._endInput?this._startInput.errorState||this._endInput.errorState:!1}get empty(){let i=this._startInput?this._startInput.isEmpty():!1,r=this._endInput?this._endInput.isEmpty():!1;return i&&r}constructor(i,r,s,o,a){this._changeDetectorRef=i,this._elementRef=r,this._dateAdapter=o,this._formField=a,this._closedSubscription=na.EMPTY,this._openedSubscription=na.EMPTY,this.id=`mat-date-range-input-${mNt++}`,this.focused=!1,this.controlType="mat-date-range-input",this._ariaOwns=gt(null),this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new Mi,this.disableAutomaticLabeling=!0,a?._elementRef.nativeElement.classList.contains("mat-mdc-form-field")&&r.nativeElement.classList.add("mat-mdc-input-element","mat-mdc-form-field-input-control","mdc-text-field__input"),this.ngControl=s}setDescribedByIds(i){this._ariaDescribedBy=i.length?i.join(" "):null}onContainerClick(){!this.focused&&!this.disabled&&(!this._model||!this._model.selection.start?this._startInput.focus():this._endInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),ra(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(i){Kze(i,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._closedSubscription.unsubscribe(),this._openedSubscription.unsubscribe(),this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():null}_getInputMirrorValue(i){let r=i==="start"?this._startInput:this._endInput;return r?r.getMirrorValue():""}_shouldHidePlaceholders(){return this._startInput?!this._startInput.isEmpty():!1}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField.getLabelId()&&!this._formField._shouldLabelFloat())&&this.empty}_getAriaLabelledby(){let i=this._formField;return i&&i._hasFloatingLabel()?i._labelId:null}_getStartDateAccessibleName(){return this._startInput._getAccessibleName()}_getEndDateAccessibleName(){return this._endInput._getAccessibleName()}_updateFocus(i){this.focused=i!==null,this.stateChanges.next()}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(i){this._startInput&&this._startInput._registerModel(i),this._endInput&&this._endInput._registerModel(i)}_isTargetRequired(i){return i?.ngControl?.control?.hasValidator(_m.required)}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(fi),R(U_,10),R(Od,8),R(K_,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-date-range-input"]],contentQueries:function(r,s,o){if(r&1&&(_o(o,$ge,5),_o(o,Kge,5)),r&2){let a;Pt(a=Rt())&&(s._startInput=a.first),Pt(a=Rt())&&(s._endInput=a.first)}},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(r,s){r&2&&(Bn("id",s.id)("aria-labelledby",s._getAriaLabelledby())("aria-describedby",s._ariaDescribedBy)("data-mat-calendar",s.rangePicker?s.rangePicker.id:null),ki("mat-date-range-input-hide-placeholders",s._shouldHidePlaceholders())("mat-date-range-input-required",s.required))},inputs:{rangePicker:"rangePicker",required:[2,"required","required",mn],dateFilter:"dateFilter",min:"min",max:"max",disabled:[2,"disabled","disabled",mn],separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},exportAs:["matDateRangeInput"],standalone:!0,features:[as([{provide:aT,useExisting:e},{provide:dZ,useExisting:e}]),Bs,yn,xe],ngContentSelectors:UOt,decls:11,vars:5,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-wrapper","mat-date-range-input-end-wrapper"]],template:function(r,s){r&1&&(gr(WOt),h(0,"div",0),F("cdkFocusChange",function(a){return s._updateFocus(a)}),h(1,"div",1),Ln(2),h(3,"span",2),y(4),p()(),h(5,"span",3),y(6),p(),h(7,"div",4),Ln(8,1),h(9,"span",2),y(10),p()()()),r&2&&(g(4),ye(s._getInputMirrorValue("start")),g(),ki("mat-date-range-input-separator-hidden",s._shouldHideSeparator()),g(),ye(s.separator),g(4),ye(s._getInputMirrorValue("end")))},dependencies:[YO],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px;color:var(--mat-datepicker-range-input-separator-color, var(--mat-app-on-surface))}.mat-form-field-disabled .mat-date-range-input-separator{color:var(--mat-datepicker-range-input-disabled-state-separator-color)}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-end-wrapper{flex-grow:1}.mat-date-range-input-inner{position:absolute;top:0;left:0;font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%;height:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner[disabled]{color:var(--mat-datepicker-range-input-disabled-state-text-color)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{width:200px}"],encapsulation:2,changeDetection:0});let t=e;return t})(),Zze=(()=>{let e=class e extends oD{_forwardContentValues(i){super._forwardContentValues(i);let r=this.datepickerInput;r&&(i.comparisonStart=r.comparisonStart,i.comparisonEnd=r.comparisonEnd,i.startDateAccessibleName=r._getStartDateAccessibleName(),i.endDateAccessibleName=r._getEndDateAccessibleName())}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275cmp=_e({type:e,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],standalone:!0,features:[as([QOt,tNt,{provide:oD,useExisting:e}]),et,xe],decls:0,vars:0,template:function(r,s){},encapsulation:2,changeDetection:0});let t=e;return t})(),Xze=(()=>{let e=class e{constructor(i){this._datepicker=i}_applySelection(){this._datepicker._applyPendingSelection(),this._datepicker.close()}};e.\u0275fac=function(r){return new(r||e)(R(oD))},e.\u0275dir=mi({type:e,selectors:[["","matDatepickerApply",""],["","matDateRangePickerApply",""]],hostBindings:function(r,s){r&1&&F("click",function(){return s._applySelection()})},standalone:!0});let t=e;return t})(),Qze=(()=>{let e=class e{constructor(i){this._datepicker=i}};e.\u0275fac=function(r){return new(r||e)(R(oD))},e.\u0275dir=mi({type:e,selectors:[["","matDatepickerCancel",""],["","matDateRangePickerCancel",""]],hostBindings:function(r,s){r&1&&F("click",function(){return s._datepicker.close()})},standalone:!0});let t=e;return t})(),Jze=(()=>{let e=class e{constructor(i,r){this._datepicker=i,this._viewContainerRef=r}ngAfterViewInit(){this._portal=new of(this._template,this._viewContainerRef),this._datepicker.registerActions(this._portal)}ngOnDestroy(){this._datepicker.removeActions(this._portal),this._portal&&this._portal.isAttached&&this._portal?.detach()}};e.\u0275fac=function(r){return new(r||e)(R(oD),R(Na))},e.\u0275cmp=_e({type:e,selectors:[["mat-datepicker-actions"],["mat-date-range-picker-actions"]],viewQuery:function(r,s){if(r&1&&ei(Ma,5),r&2){let o;Pt(o=Rt())&&(s._template=o.first)}},standalone:!0,features:[xe],ngContentSelectors:Vze,decls:1,vars:0,consts:[[1,"mat-datepicker-actions"]],template:function(r,s){r&1&&(gr(),W(0,jOt,2,0,"ng-template"))},styles:[".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0});let t=e;return t})(),eHe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[SB,aNt],imports:[sd,Ob,T0,Ck,c4,zr,Uze,TB,Gze,Q2]});let t=e;return t})()});function _Nt(t,e){if(t&1){let n=re();h(0,"mat-icon",18),F("click",function(){V(n);let r=w();return B(r.addDay(-1))}),y(1,"arrow_back "),p()}}function CNt(t,e){if(t&1){let n=re();h(0,"mat-icon",19),F("click",function(){V(n);let r=w();return B(r.addDay(-7))}),y(1,"arrow_back "),p()}}function xNt(t,e){if(t&1){let n=re();h(0,"mat-icon",20),F("click",function(){V(n);let r=w();return B(r.addMonth(-1))}),y(1,"arrow_back "),p()}}function bNt(t,e){if(t&1&&ee(0,"mat-datepicker-toggle",21,2),t&2){w();let n=pr(12);b("for",n)}}function wNt(t,e){t&1&&(h(0,"div"),y(1," bitte eintragen! "),p())}function SNt(t,e){if(t&1&&(h(0,"mat-error"),W(1,wNt,2,0,"div",11),p()),t&2){let n=w();g(),b("ngIf",n.nxtFormControl.errors.required)}}function TNt(t,e){if(t&1){let n=re();h(0,"mat-icon",22),F("click",function(){V(n);let r=w();return B(r.toggle())}),y(1," calendar_month "),p()}}function DNt(t,e){if(t&1){let n=re();h(0,"mat-icon",23),F("click",function(){V(n);let r=w();return B(r.setToday())}),y(1," system_update_alt "),p()}}function ENt(t,e){if(t&1){let n=re();h(0,"mat-icon",24),F("click",function(){V(n);let r=w();return B(r.setThisWeek())}),y(1," system_update_alt "),p()}}function MNt(t,e){if(t&1){let n=re();h(0,"mat-icon",25),F("click",function(){V(n);let r=w();return B(r.addDay(1))}),y(1," arrow_forward "),p()}}function kNt(t,e){if(t&1){let n=re();h(0,"mat-icon",26),F("click",function(){V(n);let r=w();return B(r.addDay(7))}),y(1," arrow_forward "),p()}}function INt(t,e){if(t&1){let n=re();h(0,"mat-icon",27),F("click",function(){V(n);let r=w();return B(r.addMonth(1))}),y(1," arrow_forward "),p()}}var Yge,fNt,gNt,vNt,yNt,tl,th=Q(()=>{me();Mv();zn();bl();uZ();Ld();Yge=Gs(Jm());qn();Wb();og();Mp();Ja();An();ri();Vt();Ay();me();Vt();An();qn();fNt=["myInput"],gNt=["datePicker"],vNt=(t,e,n)=>({"no-padding":t,"no-placeholder":e,"full-width-mat-form-field":n}),yNt=t=>({width:t});tl=(()=>{let e=class e extends Xp{set nxtModel(i){this.nxtFormControl.setValue(i,{emitEvent:!1})}set myInput(i){this.nxtFormControl.element=i.nativeElement}constructor(i,r){super(),this.dateFormats=i,this.localeId=r,this.readonly=!1,this.noPadding=!1,this.width="",this.displayDateFormat="EEE dd.MM.yyyy",this.disableOpenOnClickInput=!1,this.fullWidthMatFormField=!1,this.nxtModelChange=new nt,this.inputWidth="130px",this.noPlaceholder=!1}ngOnChanges(i){i.width&&(this.width?(this.inputWidth="100%",this.fullWidthMatFormField=!0):(this.inputWidth="130px",this.fullWidthMatFormField=!1)),i.displayDateFormat&&(this.dateFormats.display.dateInput=this.displayDateFormat,this.nxtFormControl.element&&this.nxtFormControl.setValue(this.nxtFormControl.value))}setToday(){this.nxtFormControl.setValue(Ie.format(Date.now(),this.format)),this.nxtFormControl.markAsDirty()}ngOnInit(){this.dateFormats.display.dateInput=this.displayDateFormat,this.changeSubscription=this.nxtFormControl.valueChanges.subscribe(i=>{this.nxtModelChange.emit(Ie.format(i,this.format)),this.monthPicker||this.closeDatePickerPopup(),this.dateFormats.display.dateInput=this.displayDateFormat})}addDay(i){this.nxtFormControl.setValue(Ie.format(Ie.addDays(this.nxtFormControl.value,i),this.format))}addMonth(i){this.nxtFormControl.setValue(Ie.format(Ie.addMonths(this.nxtFormControl.value,i),this.format))}ngOnDestroy(){this.changeSubscription?.unsubscribe()}closeDatePickerPopup(){this.datePicker?.opened&&(this.datePicker.close(),Gn.debug("DATE-PICKER: closeDatePickerPopup"))}setThisWeek(){let i=Date.now();for(;Ie.getDayOfWeek(i)!==0;)i=Ie.addDays(i,-1);this.nxtFormControl.setValue(Ie.format(i,this.format)),this.nxtFormControl.markAsDirty()}get format(){return this.monthPicker?"yyyy-MM":"yyyy-MM-dd"}chosenYearHandler(i){if(this.monthPicker){let r=(0,Yge.default)(Ie.parse(this.nxtFormControl.value,this.format));r.year(i.year()),this.nxtFormControl.setValue(Ie.format(r.valueOf(),this.format))}}chosenMonthHandler(i,r){if(this.monthPicker){let s=(0,Yge.default)(Ie.parse(this.nxtFormControl.value,this.format));s.month(i.month()),this.nxtFormControl.setValue(Ie.format(s.valueOf(),this.format)),r.close()}}inputClicked(){this.disableOpenOnClickInput||this.datePicker.open()}toggle(){this.datePicker.open()}};e.\u0275fac=function(r){return new(r||e)(R(af),R(Z0))},e.\u0275cmp=_e({type:e,selectors:[["nxt-date-picker"]],viewQuery:function(r,s){if(r&1&&(ei(fNt,5),ei(gNt,5)),r&2){let o;Pt(o=Rt())&&(s.myInput=o.first),Pt(o=Rt())&&(s.datePicker=o.first)}},inputs:{monthPicker:"monthPicker",minDate:"minDate",readonly:"readonly",placeholder:"placeholder",showTodayButton:"showTodayButton",showWeekStart:"showWeekStart",showJumpDayButtons:"showJumpDayButtons",showJumpWeekButtons:"showJumpWeekButtons",showJumpMonthButtons:"showJumpMonthButtons",noPadding:"noPadding",width:"width",displayDateFormat:"displayDateFormat",disableOpenOnClickInput:"disableOpenOnClickInput",nxtModel:"nxtModel",noPlaceholder:"noPlaceholder"},outputs:{nxtModelChange:"nxtModelChange"},standalone:!0,features:[et,yn,xe],decls:20,vars:28,consts:[["myInput","","clickElement",""],["datePicker",""],["datepickerToggle",""],["alignItems","center","fxFlex","","fxLayout","row",3,"ngClass","nxtFormControl","width"],["style","margin-right: 9px;","matTooltip","-1 Tag",3,"click",4,"ngIf"],["style","margin-right: 9px;","matTooltip","-1 Woche",3,"click",4,"ngIf"],["style","margin-right: 9px;","matTooltip","-1 Monat",3,"click",4,"ngIf"],[1,"mat-form-field-full-width"],["matInput","",2,"text-align","center",3,"click","ngStyle","readonly","matDatepicker","formControl","min"],["matSuffix","","style","position:absolute;top: -500px",3,"for",4,"ngIf"],[3,"yearSelected","monthSelected","disabled","startView"],[4,"ngIf"],[3,"click",4,"ngIf"],["style","margin-left: 9px; width: 28px;","matTooltip","heute",3,"click",4,"ngIf"],["style","margin-left: 8px;","matTooltip","aktuelle Woche",3,"click",4,"ngIf"],["style","margin-left: 8px;","matTooltip","+1 Tag",3,"click",4,"ngIf"],["style","margin-left: 8px;","matTooltip","+1 Woche",3,"click",4,"ngIf"],["style","margin-left: 8px;","matTooltip","+1 Monat",3,"click",4,"ngIf"],["matTooltip","-1 Tag",2,"margin-right","9px",3,"click"],["matTooltip","-1 Woche",2,"margin-right","9px",3,"click"],["matTooltip","-1 Monat",2,"margin-right","9px",3,"click"],["matSuffix","",2,"position","absolute","top","-500px",3,"for"],[3,"click"],["matTooltip","heute",2,"margin-left","9px","width","28px",3,"click"],["matTooltip","aktuelle Woche",2,"margin-left","8px",3,"click"],["matTooltip","+1 Tag",2,"margin-left","8px",3,"click"],["matTooltip","+1 Woche",2,"margin-left","8px",3,"click"],["matTooltip","+1 Monat",2,"margin-left","8px",3,"click"]],template:function(r,s){if(r&1){let o=re();h(0,"nxt-form-field-wrapper",3),W(1,_Nt,2,0,"mat-icon",4)(2,CNt,2,0,"mat-icon",5)(3,xNt,2,0,"mat-icon",6),h(4,"mat-form-field",7)(5,"mat-label"),y(6),p(),h(7,"input",8,0),F("click",function(){return V(o),B(s.inputClicked())}),p(),W(10,bNt,2,1,"mat-datepicker-toggle",9),h(11,"mat-datepicker",10,1),F("yearSelected",function(l){return V(o),B(s.chosenYearHandler(l))})("monthSelected",function(l){V(o);let c=pr(12);return B(s.chosenMonthHandler(l,c))}),p(),W(13,SNt,2,1,"mat-error",11),p(),W(14,TNt,2,0,"mat-icon",12)(15,DNt,2,0,"mat-icon",13)(16,ENt,2,0,"mat-icon",14)(17,MNt,2,0,"mat-icon",15)(18,kNt,2,0,"mat-icon",16)(19,INt,2,0,"mat-icon",17),p()}if(r&2){let o=pr(12);b("ngClass",Qm(22,vNt,s.noPadding,s.noPlaceholder,s.fullWidthMatFormField))("nxtFormControl",s.nxtFormControl)("width",s.width),g(),b("ngIf",s.showJumpDayButtons),g(),b("ngIf",s.showJumpWeekButtons),g(),b("ngIf",s.showJumpMonthButtons),g(3),ye(s.placeholder||s.nxtFormControl.name),g(),b("ngStyle",sn(26,yNt,s.inputWidth))("readonly",!s.disableOpenOnClickInput)("matDatepicker",o)("formControl",s.nxtFormControl)("min",s.minDate),g(3),b("ngIf",!s.nxtFormControl.disabled),g(),b("disabled",s.readonly)("startView",s.monthPicker?"multi-year":"month"),g(2),b("ngIf",s.showInvalidError),g(),b("ngIf",!1),g(),b("ngIf",s.showTodayButton),g(),b("ngIf",s.showWeekStart),g(),b("ngIf",s.showJumpDayButtons),g(),b("ngIf",s.showJumpWeekButtons),g(),b("ngIf",s.showJumpMonthButtons)}},dependencies:[O1,At,Yt,qi,_s,Dn,No,rs,Ct,Zr,dl,M0,E0,Iy,cZ,ko,mu,Ko,rr,Ia,$c,TB,NN,jze,ky],styles:["[_nghost-%COMP%]{border:0px solid blue;width:fit-content!important}[_nghost-%COMP%]  .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:12px!important}[_nghost-%COMP%]  .full-width-mat-form-field mat-form-field{width:100%}[_nghost-%COMP%]  .no-placeholder .mat-mdc-form-field-infix{padding-top:0!important}[_nghost-%COMP%]  .no-placeholder input{margin:0!important;padding-top:6px}[_nghost-%COMP%]  .no-placeholder .mat-mdc-text-field-wrapper{position:relative;top:-4px}[_nghost-%COMP%]  .no-placeholder mat-icon{margin-top:0!important}[_nghost-%COMP%]  .mdc-text-field--disabled input{color:#909090!important}[_nghost-%COMP%]  .no-padding mat-icon{margin-top:14px}[_nghost-%COMP%]  .no-padding .mat-mdc-form-field-subscript-wrapper{display:none}[_nghost-%COMP%]  input{padding-top:3px}[_nghost-%COMP%]  .mat-mdc-text-field-wrapper{height:auto!important}[_nghost-%COMP%]  .mat-mdc-form-field-infix{padding:0!important;display:flex;justify-content:center;align-items:center;width:100%!important}[_nghost-%COMP%]  .mat-mdc-form-field-icon-suffix{padding:0!important}[_nghost-%COMP%]  mat-form-field{background-color:transparent!important;padding:0!important;width:fit-content}[_nghost-%COMP%]  input{text-align:center}[_nghost-%COMP%]  .mat-mdc-form-field-flex{display:flex;justify-content:center;align-items:center}.mat-icon[_ngcontent-%COMP%]{color:#a2a2a2;cursor:pointer;font-size:18px;display:flex;justify-content:center;align-items:center}"]});let t=e;return t})()});function RNt(t,e){t&1&&Ln(0,0,["*ngIf","show"])}var ANt,PNt,jv,aD=Q(()=>{An();ri();Vt();me();Vt();An();ANt=["*"],PNt=(t,e)=>({border:t,display:"flex",margin:"0",padding:"0",justifyContent:e});jv=(()=>{let e=class e{constructor(){this.align="start",this.show=!0,this.borderWidth=0}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-col"]],inputs:{align:"align",show:"show"},standalone:!0,features:[xe],ngContentSelectors:ANt,decls:2,vars:5,consts:[["fxFlex","",3,"ngStyle"],[4,"ngIf"]],template:function(r,s){r&1&&(gr(),h(0,"div",0),W(1,RNt,1,0,"ng-content",1),p()),r&2&&(b("ngStyle",bs(2,PNt,s.borderWidth+"px solid red",s.align)),g(),b("ngIf",s.show))},dependencies:[At,qi,rr,Dn,rs,Ct]});let t=e;return t})()});var FNt,LNt,d5,rA=Q(()=>{An();ri();Vt();me();Vt();An();FNt=["*"],LNt=t=>({height:t}),d5=(()=>{let e=class e{constructor(){this.width="100%"}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-row"]],inputs:{height:"height",width:"width"},standalone:!0,features:[xe],ngContentSelectors:FNt,decls:2,vars:3,consts:[["fxLayout","row","fxLayoutAlign","space-between center",3,"ngStyle"]],template:function(r,s){r&1&&(gr(),h(0,"div",0),Ln(1),p()),r&2&&b("ngStyle",sn(1,LNt,s.height))},dependencies:[At,Yt,oi,rr,Dn,rs]});let t=e;return t})()});var Zs,il=Q(()=>{Ld();me();jl();Zs=(()=>{let e=class e{constructor(i,r){this.element=i,this.permissionService=r,this.permissionUpdatedSubscription=this.permissionService.onPermissionUpdated.subscribe(()=>{this.setPermission()})}ngOnInit(){this.setPermission()}ngOnDestroy(){this.permissionUpdatedSubscription?.unsubscribe()}setPermission(){(this.permission||this.permissionOr||this.permissionNot)&&(this.element.nativeElement.classList?this.hasPermission()?this.element.nativeElement.classList.remove("permission-display-none"):this.element.nativeElement.classList.add("permission-display-none"):Gn.error(`Recht kann nicht gesetzt werden
`+this.permission+`
`+this.permissionOr+`
`+this.permissionNot))}hasPermission(){if(this.permissionOr?.length>0){for(let i of this.permissionOr)if(this.permissionService.hasPermission(i))return!0;return!1}return this.permissionNot?!this.permissionService.hasPermission(this.permissionNot):this.permissionService.hasPermission(this.permission)}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(ws))},e.\u0275dir=mi({type:e,selectors:[["","nxtPermission",""]],inputs:{permission:[0,"nxtPermission","permission"],permissionOr:"permissionOr",permissionNot:"permissionNot"},standalone:!0});let t=e;return t})()});var ONt,yf,Gy=Q(()=>{Gi();ri();me();ONt=(t,e)=>({width:t,height:e}),yf=(()=>{let e=class e extends bt{constructor(){super(),this.size=80}get setWidth(){return this.size+"px"}get setHeight(){return this.size+"px"}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-spinner"]],hostVars:4,hostBindings:function(r,s){r&2&&mo("width",s.setWidth)("height",s.setHeight)},inputs:{size:"size"},standalone:!0,features:[et,xe],decls:1,vars:4,consts:[["id","nxt-loading-spinner",3,"ngStyle"]],template:function(r,s){r&1&&ee(0,"div",0),r&2&&b("ngStyle",bs(1,ONt,s.size+"px",s.size+"px"))},dependencies:[rr],styles:["#nxt-loading-spinner[_ngcontent-%COMP%]{display:inline-block;border:3px solid rgba(255,255,255,.3);border-radius:50%;border-top-color:#b7860f;animation:_ngcontent-%COMP%_spin 1s ease-in-out infinite;-webkit-animation:_ngcontent-%COMP%_spin 1s ease-in-out infinite}@keyframes _ngcontent-%COMP%_spin{to{-webkit-transform:rotate(360deg)}}@-webkit-keyframes _ngcontent-%COMP%_spin{to{-webkit-transform:rotate(360deg)}}"]});let t=e;return t})()});var o3,lD=Q(()=>{o3=function(t){return t.DiscountPromotion="discountPromotion",t.WhatsAppImageSend="WhatsAppImageSend",t}(o3||{})});var cc,o1=Q(()=>{$n();lD();jo();me();yi();Ci();cc=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.dialogService=r,this.contactsLoaded=!1,e.instance=this}waitForCalendarEvents(){return this.waitFor("calendarEventsWithContacts")}waitForEmployees(){return this.waitFor("employees")}waitForArtists(){return this.waitFor("artists")}waitForContacts(){if(!this.contactsLoaded)return this.waitFor("contacts")}waitForCalendarEventsCanceledWithContact(){return this.waitFor("calendarEventsCanceledWithContacts")}waitFor(i){return O(this,null,function*(){return new Promise((r,s)=>{if(this[i].getValue().length===0){let o=this[i].subscribe(a=>{a.length>0&&(r(),setTimeout(()=>{o.unsubscribe()},100))})}else r()})})}get discountPromotions(){return this._discountPromotions||(this._discountPromotions=new qs([]),this.socketService.subscribeNew("eventDynamicData_discountPromotion",i=>{this._discountPromotions.next(i)}),this.socketService.getDynamicData(o3.DiscountPromotion).then(i=>{this._discountPromotions.next(i)})),this._discountPromotions}get artists(){return this._artists||(this._artists=new qs([]),this.socketService.subscribeNew("getArtists",i=>{this._artists.next(i)},{emitInitial:!0,emitAfterReconnect:!0})),this._artists}get employees(){return this._employees||(this._employees=new qs([]),this.socketService.subscribeNew("getEmployees",i=>{this._employees.next(i)},{emitInitial:!0,emitAfterReconnect:!0})),this._employees}get parsedContacts(){return this._parsedContacts||(this._parsedContacts=new qs([]),this.socketService.subscribeNew("getParsedContacts",i=>{this._parsedContacts.next(this.filterParsedContacts(i))},{emitInitial:!0,emitAfterReconnect:!0}),setInterval(()=>{let i=this.filterParsedContacts(this._parsedContacts.value);i.length!==this._parsedContacts.value.length&&this._parsedContacts.next(i)},1e4)),this._parsedContacts}filterParsedContacts(i){return i.filter(r=>r.createdAt>Date.now()-Qt.DURATION_1MINUTE*5)}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function VNt(t,e){if(t&1&&(h(0,"div",3),ee(1,"nxt-spinner",29)(2,"fa-icon",30)(3,"nxt-spinner",29),p()),t&2){let n=w(2);g(),b("size",24),g(),b("icon",n.faWandSparkles),g(),b("size",24)}}function BNt(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-autocomplete",33),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.artist,r)||(s.artist=r),B(r)}),p(),h(2,"nxt-button-icon",7),F("click",function(){let r=V(n).index,s=w(3);return B(s.removeArtistSpotNotification(r))}),y(3,"remove"),p()()}if(t&2){let n=e.$implicit,i=w(3);g(),b("options",i.artists)("displayWith",i.artistDisplayWith)("maxOptionsToShow",999),qe("value",n.artist)}}function zNt(t,e){if(t&1){let n=re();h(0,"div",31)(1,"div"),y(2,"Benachrichtigen wenn Artist wieder kommt"),p(),W(3,BNt,4,4,"div",32),h(4,"nxt-button-icon",7),F("click",function(){V(n);let r=w(2);return B(r.addArtistSpotNotification())}),y(5,"add"),p()()}if(t&2){let n=w(2);g(3),b("ngForOf",n.artistSpotNotifications)}}function HNt(t,e){if(t&1){let n=re();h(0,"nxt-button",7),F("click",function(){V(n);let r=w(2);return B(r.saveAndClose())}),y(1,"SPEICHERN"),p()}}function GNt(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),y(2),p(),W(3,VNt,4,3,"div",3),h(4,"nxt-input",4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.clipboardText,r)||(s.clipboardText=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.fromClipBoard())}),p(),h(5,"nxt-row")(6,"nxt-col",5)(7,"nxt-input",6),F("change",function(){V(n);let r=w();return B(r.checkUpperCase("givenName"))}),p()(),h(8,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.switchNames())}),y(9,"switch_left"),p(),h(10,"nxt-col",5)(11,"nxt-input",8),F("change",function(){V(n);let r=w();return B(r.checkUpperCase("familyName"))}),p()()(),h(12,"nxt-row")(13,"div",9)(14,"nxt-date-picker",10),F("nxtModelChange",function(){V(n);let r=w();return B(r.birthdayChanged())}),p(),ee(15,"nxt-radio",11),p()(),h(16,"nxt-row")(17,"nxt-col",5),ee(18,"nxt-input",12),h(19,"nxt-slide-toggle",13),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.unknownMobile,r)||(s.unknownMobile=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.unknownMobileChanged())}),y(20,"Handynummer unbekannt"),p()()(),h(21,"nxt-row")(22,"nxt-col",5),ee(23,"nxt-input",14),p()(),h(24,"nxt-row")(25,"nxt-col",5),ee(26,"nxt-input",15),p()(),h(27,"div",16)(28,"div",17)(29,"nxt-button",7),F("click",function(){V(n);let r=w();return B(r.setCountry("DE"))}),y(30,"DE"),p(),h(31,"nxt-button",7),F("click",function(){V(n);let r=w();return B(r.setCountry("ES"))}),y(32,"ES"),p(),h(33,"nxt-button",7),F("click",function(){V(n);let r=w();return B(r.setCountry("BE"))}),y(34,"BE"),p()(),h(35,"div",17),ee(36,"nxt-autocomplete",18),h(37,"nxt-col",19),ee(38,"nxt-input",20),p(),h(39,"nxt-col",21),ee(40,"nxt-input",22),p()()(),h(41,"div",23)(42,"nxt-slide-toggle",24),y(43,"Kein Broadcast"),p(),h(44,"nxt-slide-toggle",24),y(45,"Weekly Broadcast"),p(),h(46,"nxt-slide-toggle",24),y(47,"Kein Geburstags-Gutschein"),p(),h(48,"nxt-slide-toggle",25),y(49,"Test-Broadcast"),p()(),W(50,zNt,6,1,"div",26),ee(51,"br"),h(52,"div",27)(53,"div")(54,"nxt-button",7),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(55,"ABBRECHEN"),p()(),h(56,"div"),W(57,HNt,2,0,"nxt-button",28),p()()()}if(t&2){let n=w();b("formGroup",n.form),g(2),ye(n.form.get("id").value),g(),Je(n.loadingParseContacts()?3:-1),g(),qe("value",n.clipboardText),g(3),b("nxtFormControl",n.form.get("givenName")),g(4),b("nxtFormControl",n.form.get("familyName")),g(3),b("nxtFormControl",n.form.get("birthday"))("disableOpenOnClickInput",!0),g(),b("nxtFormControl",n.form.get("lang"))("options",n.langs),g(3),b("nxtFormControl",n.form.get("mobile")),g(),qe("value",n.unknownMobile),g(4),b("nxtFormControl",n.form.get("email")),g(3),b("nxtFormControl",n.form.get("streetAddress")),g(10),b("nxtFormControl",n.form.get("country"))("options",n.countries)("displayWith",n.displayWithCountry)("displayInOptionWith",n.displayInOptionWithCountry)("maxOptionsToShow",-1)("filterFields",bn(28,NNt)),g(2),b("nxtFormControl",n.form.get("postalCode")),g(2),b("nxtFormControl",n.form.get("city")),g(2),b("nxtFormControl",n.form.get("disableBroadcast")),g(2),b("nxtFormControl",n.form.get("weeklyBroadcast")),g(2),b("nxtFormControl",n.form.get("disableBirthdayGiftCard")),g(2),b("nxtFormControl",n.form.get("testBroadcast")),g(2),b("ngIf",!1),g(7),b("ngIf",n.showSaveButton)}}var tHe,NNt,DB,qge=Q(()=>{me();qn();Ci();Ld();Ep();zn();tp();tHe=Gs(Jm());Nu();Bd();sZ();sx();C4();nc();My();xB();oo();Ah();Zi();s3();th();ls();Jr();Vt();aD();rA();il();ri();Gi();o2();Gy();iY();qme();me();qn();ji();yi();Ci();jl();Kr();o1();Vt();NNt=()=>["name"];DB=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c){super(),this.fb=i,this.dialogRef=r,this.socketService=s,this.dialogService=o,this.permissionService=a,this.loginService=l,this.cacheService=c,this.loadingParseContacts=gt(!1),this.isNewContact=!1,this.artistDisplayWith=Qh.displayWithNxtArtist,this.getNewContactDataRunning=!1,this.contactForm_WithoutBirthday=!1,this.showSaveButton=!0,this.countries=sD.list,this.langs=vf.nxtUsed,this.clipboardText="",this.unknownMobile=!1,this.faWandSparkles=OK,this.displayInOptionWithCountry=(d,u)=>d?u(d.name):"",this.displayWithCountry=d=>(console.log(this.form.get("country").value),d?d.name??d.name:""),this.permissionService.hasPermission(Zt.ContactForm_WithoutBirthday)&&(this.contactForm_WithoutBirthday=!0),this.pushSubscription=this.cacheService.parsedContacts.subscribe(d=>{this.parsedContactsChanged(d)})}load(i){this.data=i,this.instanceOfContact(i)?this.loadFormFromObject(i):this.loadFormFromString(i)}loadFormFromObject(i){this.isNewContact=!i.id,this.originalContact=i,this.form=this.fb.group({givenName:new $t(i.givenName,[ii.requiredAndNotNaN],"Vorname"),familyName:new $t(i.familyName,[ii.requiredAndNotNaN],"Nachname"),email:new $t(i.email),mobile:new $t(i.mobile,[ii.mobile,ii.requiredAndNotNaN],"Handynummer"),city:new $t(i.city),postalCode:new $t(i.postalCode,[],"PLZ"),streetAddress:new $t(i.streetAddress),id:new $t(i.id),birthday:new $t(this.parseBirthdayToDate(i.birthday),this.contactForm_WithoutBirthday?[]:[ii.requiredAndNotNaN]),disableBroadcast:new $t(!!i.disableBroadcast),weeklyBroadcast:new $t(!!i.weeklyBroadcast),testBroadcast:new $t(!!i.testBroadcast),disableBirthdayGiftCard:new $t(!!i.disableBirthdayGiftCard),lang:new $t(i.lang,[ii.requiredAndNotNaN],"Sprache"),country:new $t(i.country,[],"Land")}),this.form.get("id"),this.checkUpperCase("givenName"),this.checkUpperCase("familyName"),this.form.get("country").setValue(this.countries.find(r=>r.code===i.country)),this.registerFormChangeListeners(),this.isNewContact&&(Is.setValidators(this.form.get("postalCode"),[ii.requiredAndNotNaN]),Is.setValidators(this.form.get("country"),[ii.requiredAndNotNaN]),Is.setValidators(this.form.get("city"),[ii.requiredAndNotNaN])),setTimeout(()=>{this.form.get("mobile").setValue(this.form.get("mobile").value)},500)}loadFormFromString(i){this.form=this.fb.group({givenName:new $t("",[ii.requiredAndNotNaN],"Vorname"),familyName:new $t("",[ii.requiredAndNotNaN],"Nachname"),email:new $t(""),mobile:new $t(i,[ii.mobile,ii.requiredAndNotNaN],"Handynummer"),city:new $t(""),postalCode:new $t("",[ii.requiredAndNotNaN],"PLZ"),streetAddress:new $t(""),id:new $t(""),birthday:new $t(null),disableBroadcast:new $t(!1),weeklyBroadcast:new $t(!1),testBroadcast:new $t(!1),disableBirthdayGiftCard:new $t(!1),lang:new $t(null,[ii.requiredAndNotNaN],"Sprache"),country:new $t("",[ii.requiredAndNotNaN],"Land")}),this.readClipboard(),this.registerFormChangeListeners()}ngOnInit(){return O(this,null,function*(){document.body.style.backgroundColor="transparent !important",this.artists=yield this.socketService.getArtists()})}nxtOnDestroy(){this.getNewContactDataInterval&&(clearInterval(this.getNewContactDataInterval),this.getNewContactDataRunning=!1)}instanceOfContact(i){return typeof i!="string"}startGetNewContactData(){this.getNewContactDataInterval&&clearInterval(this.getNewContactDataInterval),this.getNewContactDataRunning=!0,this.getNewContactDataInterval=setInterval(()=>O(this,null,function*(){let i=yield this.socketService.getNewContactData();i&&i.givenName&&(this.form.get("givenName").setValue(i.givenName),this.form.get("familyName").setValue(i.familyName),this.form.get("email").setValue(i.email),this.form.get("mobile").setValue(i.mobile),this.form.get("streetAddress").setValue(i.streetAddress+" "+i.houseNumber),this.form.get("postalCode").setValue(i.postalCode),this.form.get("city").setValue(i.city),this.form.get("birthday").setValue(i.birthday))}),1e3)}readClipboard(i=5){return O(this,null,function*(){try{let r=yield navigator.clipboard.readText();if(typeof r=="string"){let s=r.split(" ");s.length===2&&(this.form.get("givenName").setValue(s[0]),this.form.get("familyName").setValue(s[1]))}}catch(r){r.message==="Document is not focused."&&i>0&&(i--,setTimeout(()=>{Gn.info("readClipboard failed --> retry"),this.readClipboard(i)},100)),console.warn(this,"readClipboard failed "+r.message)}})}saveAndClose(i=!1){return O(this,null,function*(){let r=yield this.save(i);if(r)if(r.sameMobile){let s=[{text:"Zur\xFCck",value:"back"},{text:"Kontakte zusammenf\xFChren",value:"combine"}];switch(this.loginService.isJulian()&&s.push({text:"Trotzdem speichern",value:"force"}),(yield this.dialogService.showButtons(r.fullName+" hat bereits diese Handynummer!",{buttons:s})).value){case"combine":this.dialogService.showCombineContacts([...r.contactIds,this.originalContact.id]),this.dialogRef.close();break;case"force":yield this.saveAndClose(!0);break}return}else if(r.alreadyExist){let s=Uv.getAddressLine(r.alreadyExistContact,!0),o=this.form.getRawValue();o.country.code&&(o.country=o.country.code);let a=Uv.getAddressLine(o),l="Kunde mit gleichem Namen und Geburtstag existiert bereits!";l+=`

Alte Daten:`,l+=`
`+r.alreadyExistContact.givenName+" "+r.alreadyExistContact.familyName,l+=`
Geburtstag: `+Ie.format(r.alreadyExistContact.birthday,"dd.MM.yyyy"),s&&(l+=`
`+s),l+=`
Handy: `+r.alreadyExistContact.mobileFormatted;let c=this.form.getRawValue();l+=`

Neue Daten:`,l+=`
`+c.givenName+" "+c.familyName,l+=`
Geburtstag: `+Ie.format(c.birthday,"dd.MM.yyyy"),a&&(l+=`
`+a),l+=`
Handy: `+c.mobile,l+=`

 Neue Daten verwenden?`,(yield this.dialogService.showYesNo(l,{yesText:"Ja, ersetzen"}))&&(r.alreadyExistContact.mobile=this.form.get("mobile").value,this.form.get("country").value?.code&&(r.alreadyExistContact.country=this.form.get("country").value.code),this.form.get("postalCode").value&&(r.alreadyExistContact.postalCode=this.form.get("postalCode").value),this.form.get("city").value&&(r.alreadyExistContact.city=this.form.get("city").value),this.form.get("streetAddress").value&&(r.alreadyExistContact.streetAddress=this.form.get("streetAddress").value),this.loadFormFromObject(r.alreadyExistContact))}else this.close(r)})}save(i){return O(this,null,function*(){if(yield this.checkFormErrors()){let s;try{let o=this.form.getRawValue();if(o.birthday&&(o.birthday=Ie.parseFormat(o.birthday,"yyyy-MM-dd")),this.originalContact&&this.originalContact.id&&(o.givenName+" "+o.familyName).toLowerCase()!==(this.originalContact.givenName+" "+this.originalContact.familyName).toLowerCase()){let l=!0;if(i||(l=yield this.dialogService.showYesNo(`Bist du dir sicher, dass du den Namen des Kunden \xE4ndern m\xF6chtest, der alte Kunde wird \xFCberschrieben!

Alte Termine werden mit \xFCbernommen!`,{yesText:"Ja, es ist weiterhin die gleiche Person",noText:"zur\xFCck"})),!l)return}o?.country?.code&&(o.country=o.country.code),typeof this.data!="string"&&(o=ve(ve({},this.originalContact),o)),this.isNewContact?(this.dialogService.showLoading(_n.CreateCustomer,"Kunde wird angelegt..."),s=yield this.socketService.createContact(o)):(this.dialogService.showLoading(_n.CreateCustomer,"Kunde wird aktualisiert..."),s=yield this.socketService.updateContact(o,i));let a=this.cacheService.parsedContacts.value.find(l=>l.parsedContact?.givenName===o?.givenName&&l.parsedContact?.familyName===o?.familyName);a&&this.socketService.deleteParsedContact(a.id).then(),Gn.info(s)}catch(o){Gn.error(o)}return this.dialogService.hideLoading(_n.CreateCustomer),s}})}closeClicked(){return O(this,null,function*(){this.close(!1)})}close(i){return O(this,null,function*(){this.dialogRef.close(i)})}readFromServer(){this.startGetNewContactData()}parseBirthdayToDate(i){if(typeof i=="string"&&i.length===24)return new Date(Ie.parse(i,"yyyy-MM-ddTHH:mm:ss.SSSZ"));if(typeof i=="string"&&i.length===10)return i.indexOf("-")===4?new Date(Ie.parse(i,"yyyy-MM-dd")):new Date(Ie.parse(i,"dd.MM.yyyy"))}checkFormErrors(){return O(this,null,function*(){if(this.form.markAllAsTouched(),!Is.showErrorsTrueIfNoError(this.form,this.dialogService))return!1;if(this.form.get("birthday").value){let i=Ie.parse(this.form.get("birthday").value);if(tHe.default.duration(Date.now()-i,"ms").asYears()<=14&&!(yield this.dialogService.showYesNo(`Unter 14 Jahre!
 Bist du dir ganz ganz ganz sicher?`)))return!1}return!0})}birthdayChanged(){if(this.form.get("birthday").value){let i=Ie.parse(this.form.get("birthday").value);i>Ie.addYears(Date.now(),1)&&(i=Ie.addYears(i,-100),this.form.get("birthday").setValue(new Date(i)))}}setBirthdayRequired(i){Is.setValidators(this.form.get("birthday"),i?[ii.requiredAndNotNaN]:[])}registerFormChangeListeners(){this.form.get("givenName").valueChanges.subscribe(()=>this.checkUpperCase("givenName")),this.form.get("familyName").valueChanges.subscribe(()=>this.checkUpperCase("familyName")),this.form.get("postalCode").valueChanges.subscribe(()=>{this.autocompleteCity()}),this.form.get("country").valueChanges.subscribe(()=>{this.autocompleteCity()}),this.form.get("mobile").valueChanges.subscribe(i=>{let r=Kc.formatNxt(i);r&&i!==r&&this.form.get("mobile").setValue(r),i&&(this.unknownMobile=!1,this.unknownMobileChanged())})}checkUpperCase(i){let r=["van","von","di","d'","auf","dem","den","der"],s=this.form.get(i).value;if(s?.length>=3){let o=s.split(" ").map(a=>{let l=r.indexOf(a.toLowerCase());return l>-1?r[l]:cr.toUpperCase(a,0,1)}).join(" ");s!==o&&this.form.get(i).setValue(o)}}switchNames(){let i=this.form.get("givenName").value,r=this.form.get("familyName").value;this.form.get("givenName").setValue(r),this.form.get("familyName").setValue(i)}setCountry(i){this.form.get("country").setValue(this.countries.find(r=>r.code===i))}autocompleteCity(){return O(this,null,function*(){let i=this.form.get("country").value,r=this.form.get("postalCode").value??"";if(i&&r.length>3){let s=yield this.socketService.getCityByPostalCode({postalCode:r.toUpperCase(),country:i.code});if(s&&s.length>0)if(s.length>1){let o=yield this.dialogService.showButtonChooser({title:"Welche Stadt",buttonRows:[s]});o&&this.form.get("city").setValue(o)}else this.form.get("city").setValue(s[0]);else this.form.get("city").setValue("")}else this.form.get("city").setValue("")})}addArtistSpotNotification(){this.artistSpotNotifications.push({id:"",artist:null,contactId:this.form.get("id").value,createdAt:Date.now(),createdBy:this.loginService.getUsername(),done:!1})}removeArtistSpotNotification(i){this.artistSpotNotifications.splice(i,1)}fromClipBoard(){let i=cr.getNameAttributesByText(this.clipboardText);i.birthday&&this.form.get("birthday").setValue(i.birthday),i.givenName&&this.form.get("givenName").setValue(i.givenName),i.familyName&&this.form.get("familyName").setValue(i.familyName),i.postalCode&&this.form.get("postalCode").setValue(i.postalCode),requestAnimationFrame(()=>this.clipboardText="")}unknownMobileChanged(){this.unknownMobile&&this.form.get("mobile").setValue(""),this.form.get("mobile").setValidators(this.unknownMobile?[]:[ii.requiredAndNotNaN,ii.mobile]),this.form.get("mobile").updateValueAndValidity({emitEvent:!1})}parsedContactsChanged(i){return O(this,null,function*(){if(this.loadingParseContacts.set(i.some(r=>r.isLoading)),!this.loadingParseContacts()&&i.length===1){yield za.waitForObj(()=>this.form);let r=i[0].parsedContact;!this.form.get("givenName").value&&r.givenName&&this.form.get("givenName").setValue(r.givenName),!this.form.get("familyName").value&&r.familyName&&this.form.get("familyName").setValue(r.familyName),!this.form.get("mobile").value&&r.mobile&&this.form.get("mobile").setValue(r.mobile),!this.form.get("city").value&&r.city&&this.form.get("city").setValue(r.city),!this.form.get("postalCode").value&&r.postalCode&&this.form.get("postalCode").setValue(r.postalCode),!this.form.get("birthday").value&&r.birthday&&this.form.get("birthday").setValue(r.birthday)}})}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(Gt),R(lt),R(vt),R(ws),R(Fi),R(cc))},e.\u0275cmp=_e({type:e,selectors:[["nxt-contact-form"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[3,"formGroup",4,"ngIf"],[3,"formGroup"],["nxtPermission","IsJulian"],[1,"flex","justify-center","flex-row","items-center","w-full","gap-2"],["nxtPermission","IsBackoffice","placeholder","Aus Zwischenablage (STRG-V)",3,"valueChange","value"],["fxFlex",""],["placeholder","Vorname",3,"change","nxtFormControl"],[3,"click"],["placeholder","Nachname",3,"change","nxtFormControl"],["fxLayout","row","fxFlex","","fxLayoutAlign","baseline baseline"],["width","100%","placeholder","Geburtstag","displayDateFormat","dd.MM.yyyy",3,"nxtModelChange","nxtFormControl","disableOpenOnClickInput"],["direction","row","valueKey","code","textKey","name",1,"lang-radio",3,"nxtFormControl","options"],["placeholder","Handy",3,"nxtFormControl"],["nxtPermission","IsBackoffice",3,"valueChange","value"],["placeholder","E-Mail",3,"nxtFormControl"],["placeholder","Stra\xDFe & Hausnummer",3,"nxtFormControl"],["fxLayout","column"],["fxLayout","row"],["fxFlex.gt-sm","25","placeholder","Land","panelWidth","300px",3,"nxtFormControl","options","displayWith","displayInOptionWith","maxOptionsToShow","filterFields"],["fxFlex","30"],["placeholder","PLZ",3,"nxtFormControl"],["fxFlex","70"],["placeholder","Ort",3,"nxtFormControl"],["fxLayout","row","fxLayoutAlign","space-between",1,"py-3"],[3,"nxtFormControl"],["nxtPermission","WhatsAppBroadcast",3,"nxtFormControl"],["fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-around"],[3,"click",4,"ngIf"],[3,"size"],["size","lg",3,"icon"],["fxLayout","column","fxLayoutAlign","center center"],[4,"ngFor","ngForOf"],["placeholder","Artist","valueField","name",3,"valueChange","options","displayWith","maxOptionsToShow","value"]],template:function(r,s){r&1&&W(0,GNt,58,29,"div",0),r&2&&b("ngIf",s.form)},dependencies:[Ct,ko,$_,Ia,e1,Zs,d5,jv,At,Yt,oi,qi,Yi,an,tl,tm,Lt,Ga,Nn,Hi,yf,tY],styles:["[_nghost-%COMP%]     .lang-radio .mdc-label{font-size:90%!important;color:#a5a5a5!important;cursor:pointer}mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}"]});let t=e;return t})()});var h5,sA=Q(()=>{me();od();h5=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i){return this.sanitizer.bypassSecurityTrustResourceUrl(i.replace(/\n/g,"<br/>"))}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"safeResourceUrl",type:e,pure:!0,standalone:!0});let t=e;return t})()});var Cu,$v=Q(()=>{Cu=class{static clear(e){e&&clearInterval(e)}}});var EB,hZ=Q(()=>{$v();me();EB=(()=>{let e=class e{constructor(i){this.element=i,this.currentAnimation=""}ngOnInit(){this.nxtAnimateOnClick||this.check()}onMouseUp(i){this.nxtAnimateOnClick&&this.check()}check(){this.nxtAnimate?(this.element.nativeElement.classList.remove("animate__animated"),this.element.nativeElement.classList.remove("animate__"+this.currentAnimation),requestAnimationFrame(()=>{this.currentAnimation=this.nxtAnimate,this.element.nativeElement.classList.add("animate__animated"),this.element.nativeElement.classList.add("animate__"+this.currentAnimation),Cu.clear(this.interval),this.nxtInterval&&(this.interval=setInterval(()=>O(this,null,function*(){this.element.nativeElement.classList.remove("animate__animated"),this.element.nativeElement.classList.remove("animate__"+this.currentAnimation),requestAnimationFrame(()=>{this.element.nativeElement.classList.add("animate__animated"),this.element.nativeElement.classList.add("animate__"+this.currentAnimation)})}),this.nxtInterval))})):(Cu.clear(this.interval),this.element.nativeElement.classList.remove("animate__animated"),this.element.nativeElement.classList.remove("animate__"+this.currentAnimation))}ngOnChanges(i){i.nxtAnimate&&(this.nxtAnimateOnClick||this.check())}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","nxtAnimate",""]],hostBindings:function(r,s){r&1&&F("mouseup",function(a){return s.onMouseUp(a)})},inputs:{nxtAnimate:"nxtAnimate",nxtInterval:"nxtInterval",nxtAnimateOnClick:"nxtAnimateOnClick"},standalone:!0,features:[yn]});let t=e;return t})()});function WNt(t,e){t&1&&(h(0,"div",8)(1,"div",9),y(2,"lade PDF..."),p()())}function UNt(t,e){if(t&1&&(ee(0,"object",10),Ce(1,"safeResourceUrl")),t&2){let n=w();b("data",tt(1,1,n.data),y8)}}function jNt(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.print())}),y(1,"drucken"),p()}}function $Nt(t,e){t&1&&(h(0,"div",11),y(1," HIER DRUCKEN\xA0"),h(2,"mat-icon"),y(3,"arrow_upward_alt"),p()()),t&2&&b("nxtInterval",5e3)}var Zge,iHe=Q(()=>{sA();Ja();hZ();Zi();ri();Vt();me();ji();yi();Ci();Kr();Vt();Zge=(()=>{let e=class e{constructor(i,r,s,o){this.dialogRef=i,this.socketService=r,this.dialogService=s,this.loginService=o}setData(i,r,s){return O(this,null,function*(){this.pdfBase64=i,this.data=URL.createObjectURL(this.blobPdfFromBase64String(this.pdfBase64)),this.filename=r,this.options=s})}setDataSrc(i,r,s){return O(this,null,function*(){this.data=i,this.filename=r,this.options=s})}blobPdfFromBase64String(i){let r=Uint8Array.from(atob(i).split("").map(s=>s.charCodeAt(0)));return new Blob([r],{type:"application/pdf"})}download(){let i=this.data,r=document.createElement("a"),s=this.filename;r.href=i,r.download=s,r.click()}ngOnInit(){return O(this,null,function*(){})}close(){this.dialogRef.close()}print(){return O(this,null,function*(){let i=1;if(this.options?.askPrintCount&&(i=yield this.dialogService.showInput({message:"Anzahl der Ausdrucke",isNumber:!0,okButtonText:"Drucken"})),this.dialogService.showLoading("Wird gedruckt..."),i){for(let r=1;r<=i;r++){this.dialogService.updateLoadingText(`Wird gedruckt...
`+r+" / "+i);let s=yield this.socketService.printPdf({studio:this.loginService.getStudio(),pdfBase64:this.pdfBase64});if(s==="OK")s="Erfolgreich zum Drucker gesendet";else{this.dialogService.hideLoading(),this.dialogService.showOk(`Fehler beim Drucken:
`+s);return}}this.dialogService.hideLoading(),this.dialogService.showOk("Erfolgreich gedruckt")}})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-pdf-viewer"]],standalone:!0,features:[xe],decls:11,vars:4,consts:[["fxLayout","column",1,"nxt-page-modal",2,"width","70vw","height","90vh","border-radius","4px"],["fxFlex","","fxLayoutAlign","center center",4,"ngIf"],["fxFlex","","type","application/pdf",3,"data",4,"ngIf"],[2,"height","16px"],[1,"flex","flex-row","justify-center","items-center","gap-2"],[3,"click"],[3,"click",4,"ngIf"],["nxtAnimate","tada","class","print-info","fxLayout","row",3,"nxtInterval",4,"ngIf"],["fxFlex","","fxLayoutAlign","center center"],[2,"font-size","24px"],["fxFlex","","type","application/pdf",3,"data"],["nxtAnimate","tada","fxLayout","row",1,"print-info",3,"nxtInterval"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,WNt,3,0,"div",1)(2,UNt,2,3,"object",2),ee(3,"div",3),h(4,"div",4)(5,"nxt-button",5),F("click",function(){return s.download()}),y(6,"herunterladen"),p(),W(7,jNt,2,0,"nxt-button",6),h(8,"nxt-button",5),F("click",function(){return s.close()}),y(9,"schlie\xDFen"),p()()(),W(10,$Nt,4,1,"div",7)),r&2&&(g(),b("ngIf",!s.data),g(),b("ngIf",s.data),g(5),b("ngIf",!(s.options!=null&&s.options.showPrintLocalInfo)),g(3),b("ngIf",s.options==null?null:s.options.showPrintLocalInfo))},dependencies:[At,Yt,oi,qi,Ct,Lt,EB,Zr,h5],styles:[".print-info[_ngcontent-%COMP%]{border-radius:4px;padding:5px;background-color:#228b22;position:absolute;top:70px;right:55px;color:#fff}"]});let t=e;return t})()});function YNt(t,e){t&1&&(h(0,"div",5),ee(1,"nxt-spinner"),p())}function qNt(t,e){if(t&1){let n=re();h(0,"mat-icon",18),F("click",function(){V(n);let r=w(2);return B(r.prevImage())}),y(1,"chevron_left"),p()}}function ZNt(t,e){t&1&&ee(0,"div",19)}function XNt(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",22),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.buttonClicked.emit(r))}),y(2),p()()}if(t&2){let n=e.$implicit;g(2),ye(n.text)}}function QNt(t,e){if(t&1&&(h(0,"div",20),W(1,XNt,3,1,"div",21),p()),t&2){let n=w(2);g(),b("ngForOf",n.buttons)}}function JNt(t,e){if(t&1){let n=re();h(0,"mat-icon",18),F("click",function(){V(n);let r=w(2);return B(r.nextImage())}),y(1,"chevron_right"),p()}}function eVt(t,e){t&1&&ee(0,"div",19)}function tVt(t,e){if(t&1&&(h(0,"div",6)(1,"div",7)(2,"div",8),W(3,qNt,2,0,"mat-icon",9)(4,ZNt,1,0,"div",10),p(),h(5,"div",11)(6,"div",12),ee(7,"div",13),Ce(8,"safeHtml"),p(),h(9,"div",14),ee(10,"ngx-image-viewer",15),p(),W(11,QNt,2,1,"div",16),p(),h(12,"div",17),W(13,JNt,2,0,"mat-icon",9)(14,eVt,1,0,"div",10),p()()()),t&2){let n=w();g(3),b("ngIf",!n.isFirst),g(),b("ngIf",n.isFirst),g(3),b("innerHTML",tt(8,9,n.title),Pi),g(3),b("src",sn(11,KNt,n.currentSrc))("index",0)("config",n.imageViewerConfig),g(),b("ngIf",n.buttons),g(2),b("ngIf",!n.isLast),g(),b("ngIf",n.isLast)}}var KNt,nHe,rHe=Q(()=>{me();ha();Zi();Tfe();Ja();Gy();ri();ls();Vt();me();ji();Vt();KNt=t=>[t];nHe=(()=>{let e=class e{constructor(i){this.dialogRef=i,this.imageViewerConfig={btnClass:"image-viewer-button",wheelZoom:!0,allowFullscreen:!1,containerBackgroundColor:"#424242"},this.currentSrc="",this.isFirst=!1,this.isLast=!1,this.currentIndex=0,this.isLoading=!1,this.title="",this.buttonClicked=new nt}ngOnInit(){this.loadCurrentIndex()}loadCurrentIndex(){return O(this,null,function*(){this.isLoading=!0;let i=yield this.getImageSrc(this.currentIndex);this.currentSrc=i.src,this.title=i.title,this.isFirst=i.isFirst,this.isLast=i.isLast,this.isLoading=!1})}cancelButtonClicked(){this.dialogRef.close()}delete(){this.dialogRef.close()}prevImage(){this.isLoading||(this.currentIndex--,this.loadCurrentIndex())}nextImage(){this.isLoading||(this.currentIndex++,this.loadCurrentIndex())}};e.\u0275fac=function(r){return new(r||e)(R(Gt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-image-viewer-async"]],standalone:!0,features:[xe],decls:6,vars:2,consts:[["fxLayout","column",1,"flex",2,"border","0px solid blue","overflow","hidden","width","100%","height","100%","position","relative"],[2,"height","50px","z-index","999"],[1,"dialog-close-button",3,"click"],["class","flex w-full h-full justify-center items-center absolute","style","z-index: 2000",4,"ngIf"],["class","flex flex-col h-full w-full",4,"ngIf"],[1,"flex","w-full","h-full","justify-center","items-center","absolute",2,"z-index","2000"],[1,"flex","flex-col","h-full","w-full"],[1,"flex","flex-row","h-full"],[1,"flex","h-full","justify-center","items-center","pl-10"],["class","prev-next-button",3,"click",4,"ngIf"],["class","prev-next-button",4,"ngIf"],[1,"flex","w-full","h-full","grow","flex-col"],[1,"flex","w-full","justify-center","p-6"],[1,"text-[24px]","text-center",3,"innerHTML"],[1,"flex","o-hidden","flex-row","justify-center"],[1,"flex",3,"src","index","config"],["class","mt-3 w-full flex flex-row justify-center",4,"ngIf"],[1,"flex","h-full","justify-center","items-center","pr-10"],[1,"prev-next-button",3,"click"],[1,"prev-next-button"],[1,"mt-3","w-full","flex","flex-row","justify-center"],[4,"ngFor","ngForOf"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"nxt-button-icon",2),F("click",function(){return s.dialogRef.close()}),y(3,"close"),p()(),W(4,YNt,2,0,"div",3)(5,tVt,15,13,"div",4),p()),r&2&&(g(4),b("ngIf",!s.currentSrc||s.isLoading),g(),b("ngIf",s.currentSrc))},dependencies:[At,Yt,an,Ct,yf,Zr,rY,Hi,Lt,Or],styles:["[_nghost-%COMP%]{display:flex;height:100%;width:100%;overflow:hidden;border:0 solid yellow;min-width:300px;min-height:300px}[_nghost-%COMP%]     nxt-dialog ngx-image-viewer img{max-height:90vh!important;max-width:90vw!important}[_nghost-%COMP%]     nxt-dialog ngx-image-viewer .image-viewer-button{color:#b7860f!important;border-radius:50%;border:none;width:32px;height:32px;background-color:#fff}[_nghost-%COMP%]     nxt-dialog ngx-image-viewer .image-viewer-button[disabled]{color:#a2a2a2!important}.prev-next-button[_ngcontent-%COMP%]{width:60px;height:60px;font-size:60px;cursor:pointer}"]});let t=e;return t})()});var Wy,pZ=Q(()=>{Wy=(()=>{let e=class e{static now(){return Date.now()+e.serverDiff}};e.serverDiff=0;let t=e;return t})()});var oA,Xge=Q(()=>{qn();zn();Ep();ef();nc();pZ();oA=class t{constructor(e){this.data=e}static createEmptyPayment(e,n,i,r,s,o){return new t({paymentDate:Ie.format(Date.now(),"yyyy-MM-dd"),createdAt:Wy.now(),paymentUuid:ua.generate(),isNewPayment:!0,studio:n,studioReal:i,createdBy:e,paymentMethod:o,paymentType:s,workplace:r,earlyPayout:!1,paymentValue:0,createdAtDateString:Ie.format(Date.now(),"yyyy-MM-dd")})}parseArrayToPaymentFormGroup(e,n){return e.group({paymentComment:new $t(n.data.paymentComment),paymentDate:new $t(n.data.paymentDate,[ii.requiredAndNotNaN]),paymentMethod:new $t(n.data.paymentMethod,[ii.requiredAndNotNaN]),paymentType:new $t(n.data.paymentType,[ii.requiredAndNotNaN]),paymentValue:new $t(n.data.paymentValue,[ii.requiredAndNotNaN,_m.max(2e3)]),paymentPaypalTransaction:new $t(n.data.paymentPaypalTransaction),paymentKlarnaOrder:new $t(n.data.paymentKlarnaOrder),paymentGiftCard:new $t(n.data.paymentGiftCard),paymentBankTransaction:new $t(n.data.paymentBankTransaction),paymentUuid:new $t(n.data.paymentUuid?n.data.paymentUuid:ua.generate()),createdAt:new $t(n.data.createdAt),studio:new $t(n.data.studio),createdBy:new $t(n.data.createdBy),isNewPayment:new $t(n.data.isNewPayment),workplace:new $t(n.data.workplace),studioReal:new $t(n.data.studioReal),earlyPayout:new $t(!!n.data.earlyPayout)})}getFormGroup(e){return this.parseArrayToPaymentFormGroup(e,this)}}});var a1,mZ=Q(()=>{Ul();a1=class t{static toWhatsAppId(e){return t.parseWhatsAppId(e,!0)}static parseWhatsAppId(e,n=!1){if(typeof e!="string")throw Error(`parseWhatsAppId mobile is not a string
`+Qn.stringify(e));return e=e.replace(/\s/g,""),e.indexOf("0")===0&&(e="49"+e.substr(1)),e=e.replace(/\+/g,""),n&&!e.includes("@")&&(e+="@c.us"),!n&&e.includes("@")&&(e=e.replace("@c.us","")),e}static toMobile(e,n=!0){let i=e;return i.includes("@")&&(i=i.split("@")[0]),i.startsWith("+")||(i="+"+i),n||(i=i.replace("+","")),i}static getMobileFromTemplateParam(e){return"+"+t.parseWhatsAppId(e?.user||e)}static messageGetFrom(e){if(typeof e?._data?.from=="string")return e?._data?.from;if(e?._data?.from?._serialized)return e?._data?.from?._serialized}static messageGetTo(e){if(typeof e?._data?.to=="string")return e?._data?.to;if(e?._data?.to?._serialized)return e?._data?.to?._serialized}}});var pg,MB=Q(()=>{mZ();pg=class{static getLinkForEvent(e,n){let i=`${window.origin}/#/e/${e}`;if(n?.asLink||n?.text){let r=n?.text??i;i='<a href="'+i+'" target="_blank">'+r+"</a>"}return i}static getLinkForChat(e){return`${window.origin}/#/chat/${a1.parseWhatsAppId(e,!1)}`}}});var Ir,Ph=Q(()=>{Ir=(()=>{let e=class e{static getIconName(i){try{return Object.keys(this.IconNameMap).find(r=>!!this.IconNameMap[r].find(s=>i.toLowerCase().includes(s)))}catch(r){console.error(r)}}};e.Awesome={Shisha:'<svg style="width: 20px; height: 20px" fill="#bbb" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><g><g><path d="M422.788,77.576c-38.499,0-69.818,31.32-69.818,69.818v93.091c0,12.833-10.44,23.273-23.273,23.273h-35.033 c2.583-7.284,4.003-15.115,4.003-23.273c0-17.869-6.755-34.183-17.835-46.545c11.081-12.362,17.835-28.677,17.835-46.545 c0-8.158-1.42-15.988-4.003-23.273h4.003c12.853,0,23.273-10.42,23.273-23.273c0-12.853-10.42-23.273-23.273-23.273h-12.172 l18.263-45.659c2.869-7.17,1.994-15.295-2.337-21.692C298.094,3.831,290.873,0,283.152,0H174.545 c-7.723,0-14.943,3.831-19.271,10.224c-4.33,6.395-5.204,14.521-2.337,21.692l18.264,45.659H159.03 c-12.853,0-23.273,10.42-23.273,23.273c0,12.853,10.42,23.273,23.273,23.273h4.003c-2.583,7.284-4.003,15.115-4.003,23.273 c0,17.869,6.754,34.183,17.835,46.545c-11.081,12.362-17.835,28.677-17.835,46.545c0,8.158,1.42,15.988,4.003,23.273H128 c-12.853,0-23.273,10.42-23.273,23.273c0,12.853,10.42,23.273,23.273,23.273h4.059c-17.081,21.268-27.331,48.24-27.331,77.576 s10.251,56.309,27.331,77.576H42.667c-12.853,0-23.273,10.42-23.273,23.273c0,12.853,10.42,23.273,23.273,23.273h186.182H415.03 c12.853,0,23.273-10.42,23.273-23.273c0-12.853-10.42-23.273-23.273-23.273h-89.392c17.081-21.267,27.331-48.24,27.331-77.576		c0-29.336-10.251-56.308-27.331-77.576h4.059c38.498,0,69.818-31.32,69.818-69.818v-93.091c0-12.833,10.439-23.273,23.273-23.273 c12.833,0,23.273,10.44,23.273,23.273v240.485c0,12.853,10.42,23.273,23.273,23.273c12.853,0,23.273-10.42,23.273-23.273V147.394 C492.606,108.896,461.286,77.576,422.788,77.576z"/></g></g></svg>',Magic:'<svg style="fill:#bbb" xmlns="http://www.w3.org/2000/svg" height="22px" viewBox="0 0 576 512"><path d="M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"/></svg>'},e.Material={History:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">history</span>',Edit:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">edit</span>',Download:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">download</span>',EditCalendar:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">edit_calendar</span>',Image:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">image</span>',Face:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">face</span>',Check:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">check</span>',CheckNoPointer:'<span style="font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">check</span>',Close:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">close</span>',Login:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">login</span>',Logout:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">logout</span>',ArrowRight:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">arrow_right_alt</span>',ArrowUp:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">arrow_up_alt</span>',Delete:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">delete</span>',Chat:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">chat</span>',ContentCopy:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">content_copy</span>',Reset:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">settings_backup_restore</span>',Update:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">deployed_code_update</span>',InputCircle:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">input_circle</span>',Warning:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">warning</span>',DraftOrders:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">draft_orders</span>',AddCircle:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">add_circle</span>',ShoppingCart:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">shopping_cart</span>',Adjust:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">adjust</span>',RightClick:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">right_click</span>',Print:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">print</span>',Eye:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">visibility</span>',Euro:'<span style="cursor: pointer; font-size:18px; line-height: 24px;" class="material-symbols-outlined icon-image-preview">euro</span>'},e.IconNameMap={local_taxi:["taxi"],account_balance:["bank"],handyman:["handwerk","bauhaus","obi"],all_inbox:["kasse"],restaurant:["essen"],shopping_cart:["aldi","rossmann","netto","rewe","dm","markt","edeka"],local_drink:["alolez","getr\xE4nk","3b trading"],local_gas_station:["tankstelle","tanken","shell","aral","tank&rast","bft"]};let t=e;return t})()});var Ee,Qo=Q(()=>{Ee=function(t){return t.TodoType="TodoType",t.Boolean="Boolean",t.EditDynamicGrid="EditDynamicGrid",t.Number="Number",t.DurationStringToNow="DurationStringToNow",t.DurationStringToTimeAndToNow="DurationStringToTimeAndToNow",t.Taglines="Taglines",t.CalendarEvents="CalendarEvents",t.WhatsAppChat="WhatsAppChat",t.Array="Array",t.GiftcardAssigned="GiftcardAssigned",t.Date_germanMonthString="Date_germanMonthString",t.ShowCalendarEvent="ShowCalendarEvent",t.ShowContactHistory="ShowContactHistory",t.ShowEventHistory="ShowEventHistory",t.ShowImage="ShowImage",t.Date_germanMonth="Date_germanMonth",t.PaymentSum="PaymentSum",t.Money="Money",t.MoneyShort="MoneyShort",t.Decimal="Decimal",t.MoneyOnlyPositiv="MoneyOnlyPositiv",t.MoneyOnlyPositivShort="MoneyOnlyPositivShort",t.Priority="Priority",t.Text="Text",t.Date_germanDate="Date_germanDate",t.Date_germanDateShort="Date_germanDateShort",t.Date_germanDateShortWithDayOfWeek="Date_germanDateShortWithDayOfWeek",t.Date_germanDateWithDayOfWeek="Date_germanDateWithDayOfWeek",t.Date_germanDateTimeWithDayOfWeek="Date_germanDateTimeWithDayOfWeek",t.Date_germanDateWithToNowText="Date_germanDateWithToNowText",t.Date_germanDateTime="Date_germanDateTime",t.Date_germanDateTimeFull="Date_germanDateTimeFull",t.Date_germanTime="Date_germanTime",t.Studio="Studio",t.Date_germanDateTimeWithSeconds="Date_germanDateTimeWithSeconds",t.PaymentType="PaymentType",t.Date_germanDayOfWeek="Date_germanDayOfWeek",t.PaymentMethod="PaymentMethod",t.Loading="Loading",t.Percentage="Percentage",t.Workplace="Workplace",t.Duration="Duration",t.Icon="Icon",t}(Ee||{})});var aA,sHe=Q(()=>{aA=class t{static highlightHtml(e,n){if(n){let i=t.escapeRegExp(n).split(" "),r=new RegExp(i.join("|"),"gi");return e.toString().replace(r,s=>'<mark class="autocomplete-mark">'+s+"</mark>")}else return e}static escapeRegExp(e){let n=["$","^","*","(",")","+","[","]","{","}","\\","|",".","?","/"],i=new RegExp("(\\"+n.join("|\\")+")","g");return e.replace(i,"\\$1")}}});function oVt(t,e){if(t&1&&(h(0,"span",4),y(1),p()),t&2){let n=w();g(),ye(n.placeholder)}}function aVt(t,e){t&1&&Ln(0)}function lVt(t,e){if(t&1&&(h(0,"span",11),y(1),p()),t&2){let n=w(2);g(),ye(n.triggerValue)}}function cVt(t,e){if(t&1&&(h(0,"span",5),W(1,aVt,1,0)(2,lVt,2,1,"span",11),p()),t&2){let n=w();g(),Je(n.customTrigger?1:2)}}function dVt(t,e){if(t&1){let n=re();h(0,"div",12,1),F("@transformPanel.done",function(r){V(n);let s=w();return B(s._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){V(n);let s=w();return B(s._handleKeydown(r))}),Ln(2,1),p()}if(t&2){let n=w();_8("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",n._getPanelTheme(),""),b("ngClass",n.panelClass)("@transformPanel","showing"),Bn("id",n.id+"-panel")("aria-multiselectable",n.multiple)("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby())}}function hVt(t){return()=>t.scrollStrategies.reposition()}var iVt,nVt,rVt,sVt,uVt,oHe,aHe,pVt,mVt,fVt,Qge,kB,fZ,gZ=Q(()=>{Qf();ri();me();me();bl();bl();og();R1();R1();Xh();Xh();Th();dk();Zg();qn();qn();$n();Cl();ng();iVt=["trigger"],nVt=["panel"],rVt=[[["mat-select-trigger"]],"*"],sVt=["mat-select-trigger","*"];uVt={transformPanelWrap:Nd("transformPanelWrap",[cl("* => void",iN("@transformPanel",[tN()],{optional:!0}))]),transformPanel:Nd("transformPanel",[bc("void",So({opacity:0,transform:"scale(1, 0.8)"})),cl("void => showing",Ml("120ms cubic-bezier(0, 0, 0.2, 1)",So({opacity:1,transform:"scale(1, 1)"}))),cl("* => void",Ml("100ms linear",So({opacity:0})))])},oHe=0,aHe=new Ri("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.reposition()}});pVt=new Ri("MAT_SELECT_CONFIG"),mVt={provide:aHe,deps:[xl],useFactory:hVt},fVt=new Ri("MatSelectTrigger"),Qge=class{constructor(e,n){this.source=e,this.value=n}},kB=(()=>{let e=class e{_scrollOptionIntoView(i){let r=this.options.toArray()[i];if(r){let s=this.panel.nativeElement,o=p$(i,this.options,this.optionGroups),a=r._getHostElement();i===0&&o===1?s.scrollTop=0:s.scrollTop=m$(a.offsetTop,a.offsetHeight,s.scrollTop,s.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(i){return new Qge(this,i)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(i){this._hideSingleSelectionIndicator=i,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(i){this._placeholder=i,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(_m.required)??!1}set required(i){this._required=i,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(i){this._selectionModel,this._multiple=i}get compareWith(){return this._compareWith}set compareWith(i){this._compareWith=i,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(i){this._assignValue(i)&&this._onChange(i)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(i){this._errorStateTracker.matcher=i}get id(){return this._id}set id(i){this._id=i||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(i){this._errorStateTracker.errorState=i}constructor(i,r,s,o,a,l,c,d,u,m,f,_,x,D){this._viewportRuler=i,this._changeDetectorRef=r,this._elementRef=a,this._dir=l,this._parentFormField=u,this.ngControl=m,this._liveAnnouncer=x,this._defaultOptions=D,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(E,M)=>E===M,this._uid=`mat-select-${oHe++}`,this._triggerAriaLabelledBy=null,this._destroy=new Mi,this.stateChanges=new Mi,this.disableAutomaticLabeling=!0,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${oHe++}`,this._panelDoneAnimatingStream=new Mi,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._initialized=new Mi,this.optionSelectionChanges=my(()=>{let E=this.options;return E?E.changes.pipe(ll(E),Fl(()=>ra(...E.map(M=>M.onSelectionChange)))):this._initialized.pipe(Fl(()=>this.optionSelectionChanges))}),this.openedChange=new nt,this._openedStream=this.openedChange.pipe(Ks(E=>E),lr(()=>{})),this._closedStream=this.openedChange.pipe(Ks(E=>!E),lr(()=>{})),this.selectionChange=new nt,this.valueChange=new nt,this._trackedModal=null,this._skipPredicate=E=>this.panelOpen?!1:E.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),D?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=D.typeaheadDebounceInterval),this._errorStateTracker=new M8(o,m,d,c,this.stateChanges),this._scrollStrategyFactory=_,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(f)||0,this.id=this.id}ngOnInit(){this._selectionModel=new ck(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(qg(),Mr(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Mr(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Mr(this._destroy)).subscribe(i=>{i.added.forEach(r=>r.select()),i.removed.forEach(r=>r.deselect())}),this.options.changes.pipe(ll(null),Mr(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let i=this._getTriggerAriaLabelledby(),r=this.ngControl;if(i!==this._triggerAriaLabelledBy){let s=this._elementRef.nativeElement;this._triggerAriaLabelledBy=i,i?s.setAttribute("aria-labelledby",i):s.removeAttribute("aria-labelledby")}r&&(this._previousControl!==r.control&&(this._previousControl!==void 0&&r.disabled!==null&&r.disabled!==this.disabled&&(this.disabled=r.disabled),this._previousControl=r.control),this.updateErrorState())}ngOnChanges(i){(i.disabled||i.userAriaDescribedBy)&&this.stateChanges.next(),i.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){let i=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!i)return;let r=`${this.id}-panel`;this._trackedModal&&Ab(this._trackedModal,"aria-owns",r),_k(i,"aria-owns",r),this._trackedModal=i}_clearFromModal(){if(!this._trackedModal)return;let i=`${this.id}-panel`;Ab(this._trackedModal,"aria-owns",i),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(i){this._assignValue(i)}registerOnChange(i){this._onChange=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this.disabled=i,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let i=this._selectionModel.selected.map(r=>r.viewValue);return this._isRtl()&&i.reverse(),i.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(i){this.disabled||(this.panelOpen?this._handleOpenKeydown(i):this._handleClosedKeydown(i))}_handleClosedKeydown(i){let r=i.keyCode,s=r===40||r===38||r===37||r===39,o=r===13||r===32,a=this._keyManager;if(!a.isTyping()&&o&&!Pc(i)||(this.multiple||i.altKey)&&s)i.preventDefault(),this.open();else if(!this.multiple){let l=this.selected;a.onKeydown(i);let c=this.selected;c&&l!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(i){let r=this._keyManager,s=i.keyCode,o=s===40||s===38,a=r.isTyping();if(o&&i.altKey)i.preventDefault(),this.close();else if(!a&&(s===13||s===32)&&r.activeItem&&!Pc(i))i.preventDefault(),r.activeItem._selectViaInteraction();else if(!a&&this._multiple&&s===65&&i.ctrlKey){i.preventDefault();let l=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(l?c.select():c.deselect())})}else{let l=r.activeItemIndex;r.onKeydown(i),this._multiple&&o&&i.shiftKey&&r.activeItem&&r.activeItemIndex!==l&&r.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(ic(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(i){if(this.options.forEach(r=>r.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&i)Array.isArray(i),i.forEach(r=>this._selectOptionByValue(r)),this._sortValues();else{let r=this._selectOptionByValue(i);r?this._keyManager.updateActiveItem(r):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(i){let r=this.options.find(s=>{if(this._selectionModel.isSelected(s))return!1;try{return s.value!=null&&this._compareWith(s.value,i)}catch{return!1}});return r&&this._selectionModel.select(r),r}_assignValue(i){return i!==this._value||this._multiple&&Array.isArray(i)?(this.options&&this._setSelectionByValue(i),this._value=i,!0):!1}_getOverlayWidth(i){return this.panelWidth==="auto"?(i instanceof z9?i.elementRef:i||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let i of this.options)i._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new gk(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let i=ra(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Mr(i)).subscribe(r=>{this._onSelect(r.source,r.isUserInput),r.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),ra(...this.options.map(r=>r._stateChanges)).pipe(Mr(i)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(i,r){let s=this._selectionModel.isSelected(i);i.value==null&&!this._multiple?(i.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(i.value)):(s!==i.selected&&(i.selected?this._selectionModel.select(i):this._selectionModel.deselect(i)),r&&this._keyManager.setActiveItem(i),this.multiple&&(this._sortValues(),r&&this.focus())),s!==this._selectionModel.isSelected(i)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let i=this.options.toArray();this._selectionModel.sort((r,s)=>this.sortComparator?this.sortComparator(r,s,i):i.indexOf(r)-i.indexOf(s)),this.stateChanges.next()}}_propagateChanges(i){let r;this.multiple?r=this.selected.map(s=>s.value):r=this.selected?this.selected.value:i,this._value=r,this.valueChange.emit(r),this._onChange(r),this.selectionChange.emit(this._getChangeEvent(r)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let i=-1;for(let r=0;r<this.options.length;r++)if(!this.options.get(r).disabled){i=r;break}this._keyManager.setActiveItem(i)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(i){this._elementRef.nativeElement.focus(i)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let i=this._parentFormField?.getLabelId(),r=i?i+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:i}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let i=this._parentFormField?.getLabelId(),r=(i?i+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(i){this.openedChange.emit(i)}setDescribedByIds(i){i.length?this._elementRef.nativeElement.setAttribute("aria-describedby",i.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};e.\u0275fac=function(r){return new(r||e)(R(J2),R(Kt),R(pn),R(ig),R(fi),R(Va,8),R(L8,8),R(e1,8),R(K_,8),R(p4,10),wp("tabindex"),R(aHe),R(d$),R(pVt,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-select"]],contentQueries:function(r,s,o){if(r&1&&(_o(o,fVt,5),_o(o,z_,5),_o(o,QO,5)),r&2){let a;Pt(a=Rt())&&(s.customTrigger=a.first),Pt(a=Rt())&&(s.options=a),Pt(a=Rt())&&(s.optionGroups=a)}},viewQuery:function(r,s){if(r&1&&(ei(iVt,5),ei(nVt,5),ei(HO,5)),r&2){let o;Pt(o=Rt())&&(s.trigger=o.first),Pt(o=Rt())&&(s.panel=o.first),Pt(o=Rt())&&(s._overlayDir=o.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(r,s){r&1&&F("keydown",function(a){return s._handleKeydown(a)})("focus",function(){return s._onFocus()})("blur",function(){return s._onBlur()}),r&2&&(Bn("id",s.id)("tabindex",s.disabled?-1:s.tabIndex)("aria-controls",s.panelOpen?s.id+"-panel":null)("aria-expanded",s.panelOpen)("aria-label",s.ariaLabel||null)("aria-required",s.required.toString())("aria-disabled",s.disabled.toString())("aria-invalid",s.errorState)("aria-activedescendant",s._getAriaActiveDescendant()),ki("mat-mdc-select-disabled",s.disabled)("mat-mdc-select-invalid",s.errorState)("mat-mdc-select-required",s.required)("mat-mdc-select-empty",s.empty)("mat-mdc-select-multiple",s.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",mn],disableRipple:[2,"disableRipple","disableRipple",mn],tabIndex:[2,"tabIndex","tabIndex",i=>i==null?0:xc(i)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",mn],placeholder:"placeholder",required:[2,"required","required",mn],multiple:[2,"multiple","multiple",mn],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",mn],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",xc],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[as([{provide:aT,useExisting:e},{provide:XO,useExisting:e}]),Bs,yn,xe],ngContentSelectors:sVt,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(r,s){if(r&1){let o=re();gr(rVt),h(0,"div",2,0),F("click",function(){return V(o),B(s.open())}),h(3,"div",3),W(4,oVt,2,1,"span",4)(5,cVt,3,1,"span",5),p(),h(6,"div",6)(7,"div",7),$p(),h(8,"svg",8),ee(9,"path",9),p()()()(),W(10,dVt,3,9,"ng-template",10),F("backdropClick",function(){return V(o),B(s.close())})("attach",function(){return V(o),B(s._onAttached())})("detach",function(){return V(o),B(s.close())})}if(r&2){let o=pr(1);g(3),Bn("id",s._valueId),g(),Je(s.empty?4:5),g(6),b("cdkConnectedOverlayPanelClass",s._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",s._scrollStrategy)("cdkConnectedOverlayOrigin",s._preferredOverlayOrigin||o)("cdkConnectedOverlayOpen",s.panelOpen)("cdkConnectedOverlayPositions",s._positions)("cdkConnectedOverlayWidth",s._overlayWidth)}},dependencies:[z9,HO,_s],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-app-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-app-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-app-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-app-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform)}'],encapsulation:2,data:{animation:[uVt.transformPanel]},changeDetection:0});let t=e;return t})(),fZ=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[mVt],imports:[sd,T0,bk,zr,Q2,lT,bk,zr]});let t=e;return t})()});function gVt(t,e){if(t&1&&(h(0,"mat-option",10),y(1),p()),t&2){let n=e.$implicit,i=w(2);b("value",n.value)("ngStyle",sn(3,lHe,i.optionHeight)),g(),Ke(" ",n.text?n.text:n.value," ")}}function vVt(t,e){if(t&1){let n=re();h(0,"mat-select",8,0),F("valueChange",function(r){V(n);let s=w();return B(s.valueChange.emit(r))}),W(2,gVt,2,5,"mat-option",9),p()}if(t&2){let n=w();b("panelWidth",n.panelWidth)("disabled",n.disabled)("panelClass",n.panelClass)("formControl",n.nxtFormControl),g(2),b("ngForOf",n.options)}}function yVt(t,e){if(t&1&&(h(0,"mat-option",10),y(1),p()),t&2){let n=e.$implicit,i=w(2);b("value",n.value)("ngStyle",sn(3,lHe,i.optionHeight)),g(),Ke(" ",n.text?n.text:n.value," ")}}function _Vt(t,e){if(t&1){let n=re();h(0,"mat-select",11,0),F("valueChange",function(r){V(n);let s=w();return B(s.valueChange.emit(r))}),W(2,yVt,2,5,"mat-option",9),p()}if(t&2){let n=w();b("formControl",n.nxtFormControl),g(2),b("ngForOf",n.options)}}function CVt(t,e){if(t&1){let n=re();h(0,"mat-icon",12),F("click",function(r){V(n);let s=w();return B(s.clearInput(r))}),y(1,"clear"),p()}}function xVt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2);g(),Ke(" ",n.requiredError," ")}}function bVt(t,e){if(t&1&&(h(0,"mat-error"),W(1,xVt,2,1,"div",7),p()),t&2){let n=w();g(),b("ngIf",n.nxtFormControl.errors.required)}}var lHe,$l,ih=Q(()=>{me();qn();Mv();pa();gZ();Ja();An();bl();ri();og();Ay();me();qn();An();lHe=t=>({height:t});$l=(()=>{let e=class e extends Xp{set matSelect(i){i&&(this.nxtFormControl.element=i._elementRef.nativeElement)}set value(i){let r=this.nxtFormControl.value;Sr.compare(i,r)||(this.nxtFormControl.setValue(i),this.valueChange.emit(i))}constructor(){super(),this.multiple=!1,this.disabled=!1,this.optionHeight="48px",this.panelWidth="auto",this.panelClass="",this.showClearIcon=!1,this.showListAfterClear=!0,this.valueChange=new nt}ngOnChanges(i){i.disabled&&(i.disabled.currentValue?this.nxtFormControl?.disable():this.nxtFormControl?.enable())}ngOnInit(){}ngAfterContentInit(){this.controlElemRef&&(this.controlElemRef.nativeElement?this.nxtFormControl.element=this.controlElemRef.nativeElement:this.controlElemRef._elementRef.nativeElement&&(this.nxtFormControl.element=this.controlElemRef._elementRef.nativeElement))}clearInput(i){this.showListAfterClear||(i.stopPropagation(),i.preventDefault()),this.value=null}testValueChanged(i){this.value=i}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-select"]],viewQuery:function(r,s){if(r&1&&ei(kB,5),r&2){let o;Pt(o=Rt())&&(s.matSelect=o.first)}},inputs:{options:"options",placeholder:"placeholder",multiple:"multiple",disabled:"disabled",value:"value",optionHeight:"optionHeight",panelWidth:"panelWidth",panelClass:"panelClass",showClearIcon:"showClearIcon",showListAfterClear:"showListAfterClear"},outputs:{valueChange:"valueChange"},standalone:!0,features:[as([{provide:Dh,multi:!0,useExisting:_c(()=>e)}]),et,yn,xe],decls:9,vars:7,consts:[["controlElement",""],[3,"nxtFormControl","width"],[1,"mat-form-field-full-width"],[3,"panelWidth","disabled","panelClass","formControl","valueChange",4,"ngIf"],["clear","","multiple","",3,"formControl","valueChange",4,"ngIf"],[2,"position","absolute","right","0","bottom","0"],["aria-hidden","false","aria-label","clear"],[4,"ngIf"],[3,"valueChange","panelWidth","disabled","panelClass","formControl"],[3,"value","ngStyle",4,"ngFor","ngForOf"],[3,"value","ngStyle"],["clear","","multiple","",3,"valueChange","formControl"],["aria-hidden","false","aria-label","clear",3,"click"]],template:function(r,s){r&1&&(h(0,"nxt-form-field-wrapper",1)(1,"mat-form-field",2)(2,"mat-label"),y(3),p(),W(4,vVt,3,5,"mat-select",3)(5,_Vt,3,2,"mat-select",4),h(6,"div",5),W(7,CVt,2,0,"mat-icon",6),p(),W(8,bVt,2,1,"mat-error",7),p()()),r&2&&(b("nxtFormControl",s.nxtFormControl)("width",s.width),g(3),ye(s.placeholder||s.nxtFormControl.name),g(),b("ngIf",!s.multiple),g(),b("ngIf",s.multiple),g(2),Je(s.showClearIcon?7:-1),g(),b("ngIf",s.showInvalidError))},dependencies:[O1,M0,E0,Ct,kB,ko,Ko,Ia,$c,Hi,z_,rr,Dn,rs,Zr,ky],styles:["[_nghost-%COMP%]{border:0px solid yellow}[_nghost-%COMP%]     .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix{padding-top:16px}[_nghost-%COMP%]     .mat-mdc-text-field-wrapper, [_nghost-%COMP%]     .mat-mdc-form-field-flex, [_nghost-%COMP%]     .mat-mdc-form-field-infix{height:44px}[_nghost-%COMP%]     .mdc-text-field--disabled .mat-mdc-select-value-text{color:#909090!important}[_nghost-%COMP%]     .mat-mdc-select-value-text{color:#ccc}[_nghost-%COMP%]     .mat-mdc-select-value{display:flex;align-items:center;height:32px}"]});let t=e;return t})()});var wVt,cHe=Q(()=>{zn();wVt=Gs(Jm())});var lA,vZ=Q(()=>{VN();dT();me();Cs();lA=(()=>{let e=class e{constructor(i){this.configService=i}isWorkingDay(i){return m4.isWorkingDay(i,this.configService.config.value.invoiceData.fromRegion)}addDaysUntilWorkingDay(i){return m4.addDaysUntilWorkingDay(i,this.configService.config.value.invoiceData.fromRegion)}getPublicHoliday(i){return kv.getPublicHoliday(i,this.configService.config.value.invoiceData.fromRegion)}};e.\u0275fac=function(r){return new(r||e)(it(Xi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function SVt(t,e){if(t&1){let n=re();h(0,"td",16),F("click",function(){let r=V(n).$implicit,s=w();return B(s.yearClicked(r.yearString))}),y(1),p()}if(t&2){let n=e.$implicit;ki("selected",n.selected),g(),Ke(" ",n.yearString," ")}}function TVt(t,e){if(t&1){let n=re();h(0,"td",17),F("click",function(){let r=V(n).$implicit,s=w();return B(s.monthClicked(r.monthOfYear))}),h(1,"div",18)(2,"div",19),y(3),Ce(4,"nxtDate"),p(),h(5,"div",20),y(6),Ce(7,"nxtDate"),p()()()}if(t&2){let n=e.$implicit;ki("selected",n.selected),g(3),ye(Nt(4,4,"2020-"+n.monthOfYear+"-01","MM")),g(3),ye(Nt(7,7,"2020-"+n.monthOfYear+"-01","MMM"))}}function DVt(t,e){if(t&1&&(h(0,"div",27),y(1),p()),t&2){let n=w().$implicit;g(),ye(n.text2)}}function EVt(t,e){if(t&1){let n=re();h(0,"td",23),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.dateClicked(r.dateString))}),h(1,"div",24)(2,"div",25),y(3),p(),W(4,DVt,2,1,"div",26),p()()}if(t&2){let n=e.$implicit,i=w(2);jr(n.outline),ki("selected",n.selected)("today",n.dateString===i.todayDateString),g(3),ye(n.text),g(),b("ngIf",n.text2)}}function MVt(t,e){if(t&1&&(h(0,"tr")(1,"td",21),y(2),p(),W(3,EVt,5,8,"td",22),p()),t&2){let n=e.$implicit,i=w();g(2),ye(i.getWeek(n)),g(),b("ngForOf",n.days)}}var dHe,cA,yZ=Q(()=>{me();Gi();ri();zn();go();ls();Mp();cHe();dHe=Gs(Jm());me();ji();vZ();cA=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.cdRef=i,this.dialogRef=r,this.workingDayService=s,this.startYear=Date.now().dateFormat("yyyy"),this.selectedMonth=gt(""),this.selectedYear=gt(""),this.todayDateString=Date.now().dateFormat("yyyy-MM-dd"),this.weeks=[],this.years=[],this.months=[{monthOfYear:"01",selected:!1},{monthOfYear:"02",selected:!1},{monthOfYear:"03",selected:!1},{monthOfYear:"04",selected:!1},{monthOfYear:"05",selected:!1},{monthOfYear:"06",selected:!1},{monthOfYear:"07",selected:!1},{monthOfYear:"08",selected:!1},{monthOfYear:"09",selected:!1},{monthOfYear:"10",selected:!1},{monthOfYear:"11",selected:!1},{monthOfYear:"12",selected:!1}],this.selectedMonthString=Date.now().dateFormat("yyyy-MM")}ngOnInit(){this.currentMarkDateRange&&(this.startYear=this.currentMarkDateRange.dateStringFrom.dateFormat("yyyy")),this.reDraw(),this.calcSelectedMonthYearString()}buildYears(){this.years=[];for(let i=parseInt(this.startYear,10)-2;i<=parseInt(this.startYear,10)+2;i++){let r=i.toString()===this.selectedMonthString.dateFormat("yyyy");this.years.push({selected:r,yearString:i.toString()})}}reDraw(){this.calcWeeks(),this.buildYears(),this.setSelection(),this.setMarkDateRange(),this.cdRef.detectChanges()}nxtOnDestroy(){}calcWeeks(){let i=Ie.getDateStringsFromMonth(this.selectedMonthString);this.weeks=[];for(let[s,o]of i.entries()){let a=this.workingDayService.getPublicHoliday(o)?.name||"";if(o===Ie.formatNowDate()&&(a?a=`Heute
`+a:a="Heute"),s===0){this.weeks.push({days:[]});let l=Ie.getDayOfWeek(o);for(let c=0;c<l;c++)this.weeks[0].days.push({text:"",dateString:"",selected:!1,text2:""});this.weeks[0].days.push({text:o.dateFormat("d"),dateString:o,selected:!1,text2:a})}else Ie.getDayOfWeek(o)===Aa.Monday&&this.weeks.push({days:[]}),this.weeks[this.weeks.length-1].days.push({text:o.dateFormat("d"),dateString:o,selected:!1,text2:a})}let r=Ie.addDays(i[i.length-1],1).dateFormatDate();for(;Ie.getDayOfWeek(r)!==Aa.Monday;)this.weeks[this.weeks.length-1].days.push({text:"",dateString:"",selected:!1,text2:""}),r=Ie.addDays(r,1).dateFormatDate();this.setMarkDateRange()}yearClicked(i){this.selectYear(i),this.calcSelectedMonthYearString()}monthClicked(i){this.selectMonth(i),this.calcSelectedMonthYearString()}dateClicked(i){i&&this.selectDate(i),this.calcSelectedMonthYearString()}getWeek(i){return(0,dHe.default)(i.days.filter(r=>!!r.dateString)[0].dateString.dateParse()).week()}setSelection(){this.selectYear(this.selectedMonthString.dateFormat("yyyy")),this.selectMonth(this.selectedMonthString.dateFormat("MM"))}selectDate(i){this.dialogRef?.close(i)}selectMonth(i){this.months.forEach(r=>r.selected=r.monthOfYear===i)}selectYear(i){this.years.forEach(r=>r.selected=r.yearString===i)}calcSelectedMonthYearString(){let i=this.months.find(s=>s.selected)?.monthOfYear,r=this.years.find(s=>s.selected)?.yearString;r||(r=this.selectedYear()),i&&r&&(this.selectedMonthString=`${r}-${i}`,this.calcWeeks()),this.selectedMonth.set(i),this.selectedYear.set(r)}markDateRange(i,r){this.currentMarkDateRange={dateStringFrom:i,dateStringTill:r},this.reDraw()}test(){this.markDateRange("2024-03-01","2024-03-16")}setMarkDateRange(){if(this.currentMarkDateRange){let i=Ie.getDaysBetween(this.currentMarkDateRange.dateStringFrom,this.currentMarkDateRange.dateStringTill);for(let[r,s]of i.entries())for(let o of this.weeks)for(let a of o.days)a.dateString===s&&(a.outline=r===0?"start":r===i.length-1?"end":"middle",i.length===1&&(a.outline+=" end"))}}closeClicked(){this.dialogRef.close()}jumpToThisMonth(){this.yearClicked(Ie.formatNow("yyyy")),this.monthClicked(Ie.formatNow("MM"))}jumpYears(i){this.startYear=(parseInt(this.startYear,10)+i).toString(),this.buildYears(),this.cdRef.detectChanges()}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(Gt,8),R(lA))},e.\u0275cmp=_e({type:e,selectors:[["nxt-date-select"]],standalone:!0,features:[et,xe],decls:39,vars:3,consts:[[1,"flex","h-full","w-full","flex-col","p-0","md:p-4"],[1,"flex","flex-row","justify-between"],["matTooltip","Heute anzeigen",2,"position","relative","top","-8px",3,"click"],["matTooltip","Abbrechen",2,"position","relative","top","-8px",3,"click"],[1,"flex","h-full","w-full","flex-col","gap-2"],[1,"flex","flex-row","items-center","years"],[3,"click"],[1,"w-full","nxt-table","year-table"],["class","year-item-id text-[80%] md:text[100%]",3,"selected","click",4,"ngFor","ngForOf"],[1,"flex","flex-row","overflow-x-auto","months"],[1,"w-full","nxt-table","month-table"],["class","month-item-td",3,"selected","click",4,"ngFor","ngForOf"],[1,"flex","flex-grow","dates"],[1,"h-full","w-full","nxt-table","day-table"],[2,"height","20px"],[4,"ngFor","ngForOf"],[1,"year-item-id","text-[80%]","md:text[100%]",3,"click"],[1,"month-item-td",3,"click"],[1,"flex","flex-col"],[1,"text-[80%]","md:text[100%]"],[1,"text-[80%]","md:text-[120%]"],[1,"text-sm"],["class","day-item-td",3,"class","selected","today","click",4,"ngFor","ngForOf"],[1,"day-item-td",3,"click"],[1,"relative","flex","flex-col","justify-center"],[1,"leading-tight","text-[110%]"],["class","hidden leading-tight text-[11px] md:block",4,"ngIf"],[1,"hidden","leading-tight","text-[11px]","md:block"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"nxt-button-icon",2),F("click",function(){return s.jumpToThisMonth()}),y(3,"system_update_alt"),p(),h(4,"nxt-button-icon",3),F("click",function(){return s.closeClicked()}),y(5,"close"),p()(),h(6,"div",4)(7,"div",5)(8,"nxt-button-icon",6),F("click",function(){return s.jumpYears(-5)}),y(9,"arrow_left"),p(),h(10,"table",7)(11,"tr"),W(12,SVt,2,3,"td",8),p()(),h(13,"nxt-button-icon",6),F("click",function(){return s.jumpYears(5)}),y(14,"arrow_right"),p()(),h(15,"div",9)(16,"table",10)(17,"tr"),W(18,TVt,8,10,"td",11),p()()(),h(19,"div",12)(20,"table",13)(21,"tr",14)(22,"td"),y(23,"KW"),p(),h(24,"td"),y(25,"Mo"),p(),h(26,"td"),y(27,"Di"),p(),h(28,"td"),y(29,"Mi"),p(),h(30,"td"),y(31,"Do"),p(),h(32,"td"),y(33,"Fr"),p(),h(34,"td"),y(35,"Sa"),p(),h(36,"td"),y(37,"So"),p()(),W(38,MVt,4,2,"tr",15),p()()()()),r&2&&(g(12),b("ngForOf",s.years),g(6),b("ngForOf",s.months),g(20),b("ngForOf",s.weeks))},dependencies:[Hi,Hn,Ct,an,dl],styles:["[_nghost-%COMP%]{display:flex;font-size:16px;height:650px;width:900px;max-width:100%;background-color:#404040}[_nghost-%COMP%]   table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{text-align:center;cursor:pointer}[_nghost-%COMP%]   .day-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:0 6px;height:48px}[_nghost-%COMP%]   .year-table[_ngcontent-%COMP%]   .year-item-id[_ngcontent-%COMP%]{width:16.66%;height:80px}[_nghost-%COMP%]   .year-table[_ngcontent-%COMP%]   .year-item-id[_ngcontent-%COMP%]:hover{background-color:#6a6a6a}[_nghost-%COMP%]   .month-table[_ngcontent-%COMP%]   .month-item-td[_ngcontent-%COMP%]{width:8.33%;min-width:8.33%;min-height:100px;height:100px;padding:0 6px}[_nghost-%COMP%]   .month-table[_ngcontent-%COMP%]   .month-item-td[_ngcontent-%COMP%]:hover{background-color:#6a6a6a}[_nghost-%COMP%]   .selected[_ngcontent-%COMP%]{font-weight:700;background-color:#bbb;color:#404040}[_nghost-%COMP%]   .day-item-td[_ngcontent-%COMP%]{font-size:18px;width:14.3%;--outline-border-color: #aaa}[_nghost-%COMP%]   .day-item-td.today[_ngcontent-%COMP%]{background:#5a5a5a}[_nghost-%COMP%]   .day-item-td[_ngcontent-%COMP%]:hover{background-color:#6a6a6a}[_nghost-%COMP%]   .day-item-td.start[_ngcontent-%COMP%]{border-top:3px solid var(--outline-border-color);border-bottom:3px solid var(--outline-border-color);border-left:3px solid var(--outline-border-color);background-color:#bbb!important;color:#404040!important}[_nghost-%COMP%]   .day-item-td.middle[_ngcontent-%COMP%]{border-top:3px solid var(--outline-border-color);border-bottom:3px solid var(--outline-border-color);background-color:#bbb!important;color:#404040!important}[_nghost-%COMP%]   .day-item-td.end[_ngcontent-%COMP%]{border-top:3px solid var(--outline-border-color);border-bottom:3px solid var(--outline-border-color);border-right:3px solid var(--outline-border-color);background-color:#bbb!important;color:#404040!important}"],changeDetection:0});let t=e;return t})()});function IVt(t,e){if(t&1){let n=re();h(0,"mat-icon",11),F("click",function(){V(n);let r=w(2);return B(r.jumpWeekClicked(-1))}),y(1,"arrow_back"),p()}}function AVt(t,e){if(t&1){let n=re();h(0,"mat-icon",12),F("click",function(){V(n);let r=w(2);return B(r.jumpDayClicked(-1))}),y(1,"arrow_back"),p()}}function PVt(t,e){if(t&1&&(h(0,"div",2),W(1,IVt,2,0,"mat-icon",9)(2,AVt,2,0,"mat-icon",10),p()),t&2){let n=w();g(),Je(n.jumpWeeks()?1:-1),g(),Je(n.jumpDays()?2:-1)}}function RVt(t,e){t&1&&(vs(0),y(1,"*"),ys())}function FVt(t,e){if(t&1&&y(0),t&2){let n=w();Ke(" ",n.errorText," ")}}function LVt(t,e){if(t&1){let n=re();h(0,"mat-icon",16),F("click",function(){V(n);let r=w(2);return B(r.jumpTodayClicked())}),y(1,"system_update_alt"),p()}}function OVt(t,e){if(t&1){let n=re();h(0,"mat-icon",17),F("click",function(){V(n);let r=w(2);return B(r.jumpWeekClicked(1))}),y(1,"arrow_forward"),p()}}function NVt(t,e){if(t&1){let n=re();h(0,"mat-icon",18),F("click",function(){V(n);let r=w(2);return B(r.jumpDayClicked(1))}),y(1,"arrow_forward"),p()}}function VVt(t,e){if(t&1&&(h(0,"div",8),W(1,LVt,2,0,"mat-icon",13)(2,OVt,2,0,"mat-icon",14)(3,NVt,2,0,"mat-icon",15),p()),t&2){let n=w();g(),Je(n.jumpWeeks()?1:-1),g(),Je(n.jumpWeeks()?2:-1),g(),Je(n.jumpDays()?3:-1)}}var kVt,_f,a3=Q(()=>{me();Mv();qn();Mp();Ja();An();Vt();Ay();Jr();yZ();Ci();$n();zn();W_();nc();me();kVt=["element"];_f=(()=>{let e=class e extends Xp{set myInput(i){this.nxtFormControl.element=i.nativeElement}constructor(){super(),this.placeholder=br(),this.jumpWeeks=br(!1),this.jumpToday=br(!1),this.jumpDays=br(!1),this.format=br("EEE dd.MM.yyyy"),this.value=br(),this.readonly=br(!1),this.noPadding=br(!1),this.startYear=br(Date.now().dateFormat("yyyy")),this.valueChange=j2(),this.displayValue=gt(""),this.cdRef=Ve(Kt),this.dialogService=Ve(vt),this.dialogIsOpen=!1,this.Validators=_m,this.showInvalid=gt(!1),this.ValidatorTools=ii,this.registerFormControlChanges(),this.pushSubscription=Tp(this.value).subscribe(()=>{this.value()!==void 0&&this.nxtFormControl.value!==this.value()&&this.nxtFormControl.setValue(this.value())})}onEvent(i){i instanceof eT,this.calcShowInvalid(),this.cdRef.detectChanges()}registerFormControlChanges(){this.pushSubscription=this.nxtFormControl.valueChanges.subscribe(i=>{this.setDisplayValue(),i!==this.value()&&this.valueChange.emit(i)})}setDisplayValue(){this.nxtFormControl.value?this.displayValue.set(Ie.format(this.nxtFormControl.value,this.format())):this.displayValue.set("")}ngOnChanges(i){i.nxtFormControl&&(this.registerFormControlChanges(),this.setDisplayValue())}ngOnInit(){}nxtOnDestroy(){}showDatePickerDialog(){return O(this,null,function*(){if(this.readonly()||this.dialogIsOpen)return;this.dialogIsOpen=!0;let i=this.dialogService.showComponentDialog(cA);i.componentInstance.startYear=this.startYear(),this.nxtFormControl.value&&(i.componentInstance.selectedMonthString=this.nxtFormControl.value.dateFormat("yyyy-MM"),i.componentInstance.markDateRange(this.nxtFormControl.value,this.nxtFormControl.value));let r=yield Sn(i.afterClosed());r&&this.nxtFormControl.value!==r&&this.nxtFormControl.setValue(r),this.dialogIsOpen=!1})}calcShowInvalid(){this.showInvalid.set(!1)}jumpWeekClicked(i){this.nxtFormControl.setValue(this.nxtFormControl.value.dateParse().dateAddDays(i*7).dateFormatDate())}jumpDayClicked(i){this.nxtFormControl.setValue(this.nxtFormControl.value.dateParse().dateAddDays(i).dateFormatDate())}jumpTodayClicked(){let i=Ie.formatNowDate();Ie.getDayOfWeek(Date.now())!==Aa.Monday&&(i=Ie.getLastMonday(0).dateFormatDate()),this.nxtFormControl.setValue(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-date-picker-2"]],viewQuery:function(r,s){if(r&1&&ei(kVt,5),r&2){let o;Pt(o=Rt())&&(s.myInput=o.first)}},inputs:{placeholder:[1,"placeholder"],jumpWeeks:[1,"jumpWeeks"],jumpToday:[1,"jumpToday"],jumpDays:[1,"jumpDays"],format:[1,"format"],value:[1,"value"],readonly:[1,"readonly"],noPadding:[1,"noPadding"],startYear:[1,"startYear"]},outputs:{valueChange:"valueChange"},standalone:!0,features:[et,yn,xe],decls:12,vars:18,consts:[["element",""],[1,"flex","w-full","flex-row","items-center","justify-center","wrapper"],[1,"flex","flex-row","items-center","justify-center","gap-4","px-3","buttons-left"],[1,"w-full","flex-col"],[1,"relative","flex","cursor-pointer","flex-col","justify-center",3,"click"],[1,"absolute","placeholder"],[1,"text-box",3,"innerHTML"],[1,"text-[12px]","red"],[1,"flex","flex-row","items-center","justify-center","gap-4","px-3","buttons-right"],["matTooltip","-1 Woche",1,"mouse-pointer"],["matTooltip","-1 Tag",1,"mouse-pointer"],["matTooltip","-1 Woche",1,"mouse-pointer",3,"click"],["matTooltip","-1 Tag",1,"mouse-pointer",3,"click"],["matTooltip","Heute",1,"mouse-pointer"],["matTooltip","+1 Woche",1,"mouse-pointer"],["matTooltip","+1 Tag",1,"mouse-pointer"],["matTooltip","Heute",1,"mouse-pointer",3,"click"],["matTooltip","+1 Woche",1,"mouse-pointer",3,"click"],["matTooltip","+1 Tag",1,"mouse-pointer",3,"click"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1),W(1,PVt,3,2,"div",2),h(2,"div",3)(3,"div",4),F("click",function(){return V(o),B(s.showDatePickerDialog())}),h(4,"div",5),y(5),W(6,RVt,2,0,"ng-container"),p(),ee(7,"div",6,0),p(),h(9,"div",7),W(10,FVt,1,1),p()(),W(11,VVt,4,3,"div",8),p()}r&2&&(ki("has-placeholder",s.placeholder()||s.nxtFormControl.name)("show-invalid",s.showInvalidError)("no-padding",s.noPadding()),g(),Je(s.jumpWeeks()||s.jumpDays()?1:-1),g(3),ki("red",s.showInvalidError)("top",!!s.nxtFormControl.value),g(),Ke("",s.placeholder()||s.nxtFormControl.name," "),g(),Je(s.nxtFormControl.hasValidator(s.ValidatorTools.requiredAndNotNaN)?6:-1),g(),b("innerHTML",s.displayValue()||"\xA0",Pi),g(2),ki("error-text-height",!s.noPadding()),g(),Je(s.showInvalidError?10:-1),g(),Je(s.jumpWeeks()||s.jumpDays()||s.jumpToday()?11:-1))},dependencies:[At,Dn,Zr,dl,ko,Ia],styles:["[_nghost-%COMP%]    {min-width:140px;display:flex;flex-direction:row}[_nghost-%COMP%]     .wrapper:hover .text-box{border-bottom:1px solid #E6E6E6}[_nghost-%COMP%]     .wrapper .error-text-height{height:20px}[_nghost-%COMP%]     .wrapper.show-invalid .text-box{border-bottom:1px solid #ff3737}[_nghost-%COMP%]     .wrapper.has-placeholder{padding-top:12px}[_nghost-%COMP%]     .text-box{border-bottom:1px solid #909090;height:32px;line-height:32px;text-align:center;white-space:nowrap}[_nghost-%COMP%]     .placeholder.top{transform:translateY(-21px) scale(.75);transition:transform .2s;transform-origin:left;color:gray}[_nghost-%COMP%]     input{text-align:center}[_nghost-%COMP%]     .mat-mdc-form-field-infix{justify-content:center;display:flex}[_nghost-%COMP%]     .no-padding{padding-top:0!important}[_nghost-%COMP%]     .no-padding .clear-icon{bottom:5px}[_nghost-%COMP%]     .no-padding .mat-mdc-form-field-subscript-wrapper{display:none}"],changeDetection:0});let t=e;return t})()});function HVt(t,e){t&1&&y(0,` *
`)}function GVt(t,e){if(t&1&&(h(0,"div",19),y(1),p()),t&2){let n,i=w(2);g(),Ke(" ",(n=i.form.get("artist").value)==null?null:n.name," ")}}function WVt(t,e){if(t&1&&(h(0,"div",20),y(1),Ce(2,"nxtDate"),Ce(3,"nxtDate"),p()),t&2){let n=w(2);g(),cn(" ",Nt(2,2,n.form.get("start").value,"EEE dd.MM.yyyy")," - ",Nt(3,5,n.form.get("end").value,"EEE dd.MM.yyyy")," ")}}function UVt(t,e){if(t&1&&ee(0,"nxt-autocomplete",21),t&2){let n=w(2);b("nxtFormControl",n.form.get("artist"))("options",n.artists)("displayWith",n.displayArtistFn)("displayInOptionWith",n.displayArtistFn)("filterFields",bn(7,BVt))("showClearIcon",!0)("maxOptionsToShow",999)}}function jVt(t,e){if(t&1){let n=re();h(0,"nxt-date-picker-2",22),F("valueChange",function(){V(n);let r=w(2);return B(r.generateDays())}),p()}if(t&2){let n=w(2);b("nxtFormControl",n.form.get("start"))}}function $Vt(t,e){if(t&1){let n=re();h(0,"nxt-date-picker-2",23),F("valueChange",function(){V(n);let r=w(2);return B(r.generateDays())}),p()}if(t&2){let n=w(2);b("nxtFormControl",n.form.get("end"))}}function KVt(t,e){if(t&1){let n=re();h(0,"div",24)(1,"div",25),ee(2,"nxt-select",26),h(3,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.getArtistSpotGateOpenTextClicked())}),y(4,"Schl\xFCssel-Link"),p()(),h(5,"div",9)(6,"nxt-slide-toggle",10),y(7,"Wohnungs-Check-In hat stattgefunden"),p()(),h(8,"div",9)(9,"nxt-slide-toggle",10),y(10,"Wohnungs-Check-Out hat stattgefunden"),p()()()}if(t&2){let n=w(2);g(2),b("nxtFormControl",n.form.get("keySafeNumber"))("options",n.keySafeNumberOptions),g(4),b("nxtFormControl",n.form.get("apartmentCheckInDone")),g(3),b("nxtFormControl",n.form.get("apartmentCheckOutDone"))}}function YVt(t,e){t&1&&(h(0,"div",6)(1,"div",32),y(2,"komplett da"),p()())}function qVt(t,e){t&1&&(h(0,"div",6)(1,"div",33),y(2,"nicht da"),p()())}function ZVt(t,e){if(t&1&&(h(0,"div",6),y(1),Ce(2,"duration"),p()),t&2){let n=w(2).$implicit;g(),Ke(" Bis ",Nt(2,1,n.to,"HH:mm")," Uhr ")}}function XVt(t,e){if(t&1&&(h(0,"div",6),y(1),Ce(2,"duration"),p()),t&2){let n=w(2).$implicit;g(),Ke(" Ab ",Nt(2,1,n.from,"HH:mm")," Uhr ")}}function QVt(t,e){if(t&1&&(h(0,"div",6),y(1),Ce(2,"duration"),Ce(3,"duration"),p()),t&2){let n=w(2).$implicit;g(),cn(" ",Nt(2,2,n.from,"HH:mm")," - ",Nt(3,5,n.to,"HH:mm")," ")}}function JVt(t,e){if(t&1&&(h(0,"div",30)(1,"div",6)(2,"strong"),y(3),Ce(4,"nxtDate"),p()(),W(5,YVt,3,0,"div",31)(6,qVt,3,0,"div",31)(7,ZVt,3,4,"div",31)(8,XVt,3,4,"div",31)(9,QVt,4,8,"div",31),p()),t&2){let n=w().$implicit;b("id","date-"+n.dateString),g(3),ye(Nt(4,7,n.dateString,"dd.MM")),g(2),b("ngIf",n.from===-1&&n.to===-1),g(),b("ngIf",n.from===-2&&n.to===-2),g(),b("ngIf",n.from===-1&&n.to>-1),g(),b("ngIf",n.from>-1&&n.to===-1),g(),b("ngIf",n.from>-1&&n.to>-1)}}function eBt(t,e){if(t&1){let n=re();h(0,"td",28),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.dayClicked(r))}),W(1,JVt,10,10,"div",29),p()}if(t&2){let n=e.$implicit;b("ngClass",sn(2,zVt,n.isToday)),g(),b("ngIf",n.canAvailable)}}function tBt(t,e){if(t&1&&(h(0,"tr"),W(1,eBt,2,4,"td",27),p()),t&2){let n=e.$implicit;g(),b("ngForOf",n)}}function iBt(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.delete())}),y(1,"l\xF6schen"),p()}}function nBt(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),W(2,GVt,2,1,"div",3)(3,WVt,4,8,"div",4)(4,UVt,1,8,"nxt-autocomplete",5),p(),h(5,"div",6),W(6,jVt,1,1,"nxt-date-picker-2",7)(7,$Vt,1,1,"nxt-date-picker-2",8),p(),h(8,"div",9)(9,"nxt-slide-toggle",10),y(10,"Artist ist in diesem Zeitraum in einer unserer Wohnungen"),p()(),W(11,KVt,11,4,"div",11),h(12,"div",12)(13,"table",13)(14,"tr",14)(15,"th")(16,"div",6),y(17,"Mo"),p()(),h(18,"th")(19,"div",6),y(20,"Di"),p()(),h(21,"th")(22,"div",6),y(23,"Mi"),p()(),h(24,"th")(25,"div",6),y(26,"Do"),p()(),h(27,"th")(28,"div",6),y(29,"Fr"),p()(),h(30,"th")(31,"div",6),y(32,"Sa"),p()(),h(33,"th")(34,"div",6),y(35,"So"),p()()(),W(36,tBt,2,1,"tr",15),p()(),h(37,"div",16),W(38,iBt,2,0,"nxt-button",17),h(39,"nxt-button",18),F("click",function(){V(n);let r=w();return B(r.close())}),y(40,"abbrechen"),p(),h(41,"nxt-button",18),F("click",function(){V(n);let r=w();return B(r.showHistoryClicked())}),y(42,"Verlauf"),p(),h(43,"nxt-button",18),F("click",function(){V(n);let r=w();return B(r.save())}),y(44,"speichern"),p()()()}if(t&2){let n=w();g(2),b("ngIf",!n.userCanCreateSpots),g(),b("ngIf",!n.userCanCreateSpots),g(),b("ngIf",n.userCanCreateSpots),g(2),b("ngIf",n.userCanCreateSpots),g(),b("ngIf",n.userCanCreateSpots),g(2),b("nxtFormControl",n.form.get("artistIsInApartment")),g(2),b("ngIf",n.form.get("artistIsInApartment").value),g(25),b("ngForOf",n.weeks),g(2),b("ngIf",(n.artistSpot==null?null:n.artistSpot.id)&&n.userCanCreateSpots)}}var BVt,zVt,Uy,dA=Q(()=>{zn();me();jo();tp();Ep();nc();Bd();Lv();Zi();An();oo();th();Ah();Vt();ri();go();ih();a3();Gi();pa();me();qn();yi();E8();Ci();Cs();jl();ug();o1();Vt();An();BVt=()=>["name"],zVt=t=>({today:t});Uy=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d){super(),this.fb=i,this.socketService=r,this.dialogRef=s,this.dialogService=o,this.configService=a,this.permissionService=l,this.clipboard=c,this.cacheService=d,this.changed=gt(!1),this.artists=[],this.weeks=[],this.availableDays=[],this.userCanCreateSpots=this.permissionService.hasPermission(Zt.Artists_NewSpot),this.keySafeNumberOptions=[{text:"Links - Zimmer 1",value:1},{text:"Rechts - Zimmer 2",value:2}]}ngOnInit(){return O(this,null,function*(){this.pushSubscription=this.cacheService.artists.subscribe(i=>{this.artists=i.filter(r=>!r.disabled).sortString("name")})})}displayArtistFn(i){return i?.name}load(i,r,s){return O(this,null,function*(){yield Sr.waitFor(()=>this.artists.length>0,"load ArtistSpotEdit"),i==="new"?this.artistSpot={artist:null,start:r?r.dateParse():Date.now().clearTime(),end:s?s.dateParse():Date.now().dateAddDays(7).clearTime(),id:"",updatedAt:0,updatedBy:"",createdAt:0,createdBy:"",artistIsInApartment:!1,apartmentCheckOutDone:!1,apartmentCheckInDone:!1,keySafeNumber:null}:(this.artistSpot=yield this.socketService.getArtistSpot(i),this.artistSpot||this.dialogService.showOk(`Artist konnte nicht geladen werden
artistSpotId: `+i)),this.artistSpot&&this.buildForm()})}buildForm(){return O(this,null,function*(){let i=this.artists.find(r=>r.name===this.artistSpot.artist);this.form=this.fb.group({artist:new $t(i,[ii.hasProperty("id")]),start:new $t(this.artistSpot.start,ii.requiredAndNotNaN),end:new $t(this.artistSpot.end,ii.requiredAndNotNaN),artistIsInApartment:new $t(this.artistSpot.artistIsInApartment),keySafeNumber:new $t(this.artistSpot.keySafeNumber),apartmentCheckInDone:new $t(this.artistSpot.apartmentCheckInDone),apartmentCheckOutDone:new $t(this.artistSpot.apartmentCheckOutDone)}),this.form.get("start").valueChanges.subscribe(()=>{let r=Ie.parse(this.form.get("start").value);Ie.parse(this.form.get("end").value)<r&&this.form.get("end").setValue(r.dateAddDays(7).dateFormatDate())}),setTimeout(()=>{this.form.valueChanges.subscribe(r=>{this.changed.set(!0)})},1e3),this.generateDays()})}save(){return O(this,null,function*(){let i=this.form.getRawValue();if(this.configService.config.value.studioRegion==="MA"&&!i?.artist?.idNumber){this.dialogService.showOk("Bei "+i?.artist?.name+` fehlt die Ausweis-Nummer
Bitte trage sie nach und lege dann erst den Spott an.`);return}if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)&&!this.missingSkills(i.artist)&&(this.artistSpot=ve(ve({},this.artistSpot),i),this.artistSpot.artist=i.artist.name,this.artistSpot.start=Ie.parse(i.start),this.artistSpot.end=Ie.parse(i.end),!(this.artistSpot.end<this.artistSpot.start))){if(!this.artistSpot.id&&Ie.monthDiff(this.artistSpot.end,this.artistSpot.start)>3){this.dialogService.showOk("Bitte splitte die Spots auf maximal 3 Monate je Spot");return}this.artistSpot.workTimeWindows=this.generateWorkTimeWindows(this.artistSpot.workTimeWindows),yield this.socketService.upsertArtistSpot(this.artistSpot),this.dialogRef.close()}})}close(){return O(this,null,function*(){this.changed()&&!(yield this.dialogService.showYesNo(`Deine \xC4nderungen gehen verloren

Ohne Speichern schlie\xDFen?`,{noText:"Zur\xFCck",yesText:"Ja, ohne speichern schlie\xDFen"}))||this.dialogRef.close()})}delete(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Spot wirklich l\xF6schen?",{yesText:"Ja, l\xF6schen"}))&&(yield this.socketService.deleteArtistSpot(this.artistSpot.id),this.close())})}generateDays(){if(this.form.get("start").value&&this.form.get("end").value){let i=Ie.parse(this.form.get("start").value),r=Ie.parse(this.form.get("end").value),s=Ie.getDateFromDayOfWeekBeforeOrSame(i,Aa.Monday),o=Ie.getDateFromDayOfWeekAfterOrSame(r,Aa.Sunday),a=Ie.dayDiff(o,s);console.log(a);let l=[];for(let c=0;c<=a;c++){let d=s.dateAddDays(c),u=d.dateFormat("yyyy-MM-dd"),m=this.availableDays.find(x=>x.dateString===u),f=d>=i&&d<=r,_=u===Ie.formatNowDate();if(m)m.canAvailable=f;else if(f){let x=this.artistSpot.workTimeWindows?.find(D=>D.dateString===u);m={dateString:u,from:x?.start??-1,to:x?.end??-1,canAvailable:f,isToday:_}}else m={dateString:u,from:-1,to:-1,canAvailable:f,isToday:_};l.push(m)}this.availableDays=l,this.generateWeeks()}}generateWeeks(){this.weeks=[];let i=-1;for(let r of this.availableDays)Ie.getDayOfWeek(r.dateString)===Aa.Monday&&(i++,this.weeks.push([])),this.weeks[i].push(r)}dayClicked(i){return O(this,null,function*(){if(i.dateString.dateParse()<Date.now().dateAddDays(-1)){this.dialogService.showOk("Nix Vergangenheit amk");return}if(i.canAvailable){let r=yield this.dialogService.showTimeChooser("00:00",i.dateString.dateParse().dateFormat("dd.MM.yyyy"),'Wann f\xE4ngt "'+this.artistSpot.artist+'" an',"11:00","23:00",!0,[{text:"Nicht da",value:"-2",position:"start"},{text:"Studio-Start",value:"-1",position:"start"}]);if(r){if(r==="-2"){i.from=-2,i.to=-2;return}let s=Qt.format(this.configService.config.value.studioWorkStart,"HH:mm");r!=="-1"&&(s=r);let o=yield this.dialogService.showTimeChooser("00:00",i.dateString.dateParse().dateFormat("dd.MM.yyyy")+" "+r+" - ?",'Wann h\xF6rt "'+this.artistSpot.artist+'" auf',s,"23:00",!0,[{text:"Studio-Ende",value:"-1",position:"end"}]);o&&(r==="-1"?i.from=-1:i.from=Qt.parse(r),o==="-1"?i.to=-1:i.to=Qt.parse(o))}}})}missingSkills(i){let r=i.skills.skillValues.filter(s=>s.value===-1);return r.length>0?(this.dialogService.showOk('Dem Artist "'+i.name+`" fehlen noch folgende Skills:

`+r.map(s=>s.description).join(`
`)),requestAnimationFrame(()=>this.form.get("artist").setValue(null)),!0):!1}generateWorkTimeWindows(i){let r=[];return this.availableDays.filter(s=>s.canAvailable).forEach(s=>{r.push({dateString:s.dateString,earlyPaidOut:!!i?.find(o=>o.dateString===s.dateString)?.earlyPaidOut,start:s.from,end:s.to})}),r}getArtistSpotGateOpenTextClicked(){return O(this,null,function*(){let i=yield this.socketService.getArtistSpotGateOpenText(this.artistSpot.id);yield this.dialogService.showOk(i,{buttonText:"Text in die Zwischenablage"}),this.clipboard.copy(i)})}showHistoryClicked(){this.dialogService.showHistory("artistSpot",this.artistSpot.id)}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(lt),R(Jf,8),R(vt),R(Xi),R(ws),R(_u),R(cc))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-spot-edit"]],standalone:!0,features:[et,xe],decls:2,vars:2,consts:[["fxLayout","column","class","pt-2 w-full",4,"ngIf"],["fxLayout","column",1,"pt-2","w-full"],["fxLayout","column","fxLayoutAlign","center center"],["class","text-120 pb-2",4,"ngIf"],["class","pb-2",4,"ngIf"],["placeholder","Artist",3,"nxtFormControl","options","displayWith","displayInOptionWith","filterFields","showClearIcon","maxOptionsToShow",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center"],["placeholder","Start",3,"nxtFormControl","valueChange",4,"ngIf"],["placeholder","Ende",3,"nxtFormControl","valueChange",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center",1,"pb-2"],[3,"nxtFormControl"],["class","flex flex-col items-center",4,"ngIf"],[1,"pb-3"],[1,"nxt-table",2,"width","100%"],[2,"margin-bottom","5px"],[4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","space-around"],[3,"click",4,"ngIf"],[3,"click"],[1,"text-120","pb-2"],[1,"pb-2"],["placeholder","Artist",3,"nxtFormControl","options","displayWith","displayInOptionWith","filterFields","showClearIcon","maxOptionsToShow"],["placeholder","Start",3,"valueChange","nxtFormControl"],["placeholder","Ende",3,"valueChange","nxtFormControl"],[1,"flex","flex-col","items-center"],[1,"flex","flex-row"],["placeholder","Schl\xFCsselbox / Zimmer",1,"w-[160px]",3,"nxtFormControl","options"],["class","mouse-pointer",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"mouse-pointer",3,"click","ngClass"],["fxLayout","column","fxLayoutAlign","space-between",3,"id",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between",3,"id"],["fxLayout","row","fxLayoutAlign","center",4,"ngIf"],[2,"font-size","80%"],[1,"red",2,"font-size","80%"]],template:function(r,s){r&1&&W(0,HVt,1,0)(1,nBt,45,9,"div",0),r&2&&(Je(s.changed()?0:-1),g(),b("ngIf",s.form&&s.artists.length>0))},dependencies:[Ct,At,Yt,oi,Ga,Nn,Hi,_s,Dn,No,Lt,lf,Hn,$l,_f],styles:["[_nghost-%COMP%]{display:flex;width:1200px}table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding-bottom:10px}table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{width:14.2%;padding-bottom:10px}.today[_ngcontent-%COMP%]{background-color:#5e5e5e}"]});let t=e;return t})()});function hHe(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var rBt,sBt,oBt,aBt,p2,lBt,e3e,cBt,uHe,uA,pHe,_Z=Q(()=>{me();me();qn();bl();rBt=["input"],sBt=["label"],oBt=["*"],aBt=new Ri("mat-checkbox-default-options",{providedIn:"root",factory:hHe});p2=function(t){return t[t.Init=0]="Init",t[t.Checked=1]="Checked",t[t.Unchecked=2]="Unchecked",t[t.Indeterminate=3]="Indeterminate",t}(p2||{}),lBt={provide:Dh,useExisting:_c(()=>uA),multi:!0},e3e=class{},cBt=0,uHe=hHe(),uA=(()=>{let e=class e{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(i){let r=new e3e;return r.source=this,r.checked=i,r}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(i,r,s,o,a,l){this._elementRef=i,this._changeDetectorRef=r,this._ngZone=s,this._animationMode=a,this._options=l,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new nt,this.indeterminateChange=new nt,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=p2.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||uHe,this.color=this._options.color||uHe.color,this.tabIndex=parseInt(o)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++cBt}`,this.disabledInteractive=l?.disabledInteractive??!1}ngOnChanges(i){i.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(i){i!=this.checked&&(this._checked=i,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(i){i!==this.disabled&&(this._disabled=i,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(i){let r=i!=this._indeterminate;this._indeterminate=i,r&&(this._indeterminate?this._transitionCheckState(p2.Indeterminate):this._transitionCheckState(this.checked?p2.Checked:p2.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(i){this.checked=!!i}registerOnChange(i){this._controlValueAccessorChangeFn=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this.disabled=i}validate(i){return this.required&&i.value!==!0?{required:!0}:null}registerOnValidatorChange(i){this._validatorChangeFn=i}_transitionCheckState(i){let r=this._currentCheckState,s=this._getAnimationTargetElement();if(!(r===i||!s)&&(this._currentAnimationClass&&s.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(r,i),this._currentCheckState=i,this._currentAnimationClass.length>0)){s.classList.add(this._currentAnimationClass);let o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{s.classList.remove(o)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let i=this._options?.clickAction;!this.disabled&&i!=="noop"?(this.indeterminate&&i!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?p2.Checked:p2.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&i==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(i){i.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(i,r){if(this._animationMode==="NoopAnimations")return"";switch(i){case p2.Init:if(r===p2.Checked)return this._animationClasses.uncheckedToChecked;if(r==p2.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case p2.Unchecked:return r===p2.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case p2.Checked:return r===p2.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case p2.Indeterminate:return r===p2.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(i){let r=this._inputElement;r&&(r.nativeElement.indeterminate=i)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(i){i.target&&this._labelElement.nativeElement.contains(i.target)&&i.stopPropagation()}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Kt),R(pn),wp("tabindex"),R(Ic,8),R(aBt,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-checkbox"]],viewQuery:function(r,s){if(r&1&&(ei(rBt,5),ei(sBt,5),ei(ym,5)),r&2){let o;Pt(o=Rt())&&(s._inputElement=o.first),Pt(o=Rt())&&(s._labelElement=o.first),Pt(o=Rt())&&(s.ripple=o.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(r,s){r&2&&(Kp("id",s.id),Bn("tabindex",null)("aria-label",null)("aria-labelledby",null),jr(s.color?"mat-"+s.color:"mat-accent"),ki("_mat-animation-noopable",s._animationMode==="NoopAnimations")("mdc-checkbox--disabled",s.disabled)("mat-mdc-checkbox-disabled",s.disabled)("mat-mdc-checkbox-checked",s.checked)("mat-mdc-checkbox-disabled-interactive",s.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],id:"id",required:[2,"required","required",mn],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",mn],tabIndex:[2,"tabIndex","tabIndex",i=>i==null?void 0:xc(i)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",mn],checked:[2,"checked","checked",mn],disabled:[2,"disabled","disabled",mn],indeterminate:[2,"indeterminate","indeterminate",mn]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[as([lBt,{provide:Ev,useExisting:e,multi:!0}]),Bs,yn,xe],ngContentSelectors:oBt,decls:15,vars:20,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"div",3),F("click",function(l){return V(o),B(s._preventBubblingFromLabel(l))}),h(1,"div",4,0)(3,"div",5),F("click",function(){return V(o),B(s._onTouchTargetClick())}),p(),h(4,"input",6,1),F("blur",function(){return V(o),B(s._onBlur())})("click",function(){return V(o),B(s._onInputClick())})("change",function(l){return V(o),B(s._onInteractionEvent(l))}),p(),ee(6,"div",7),h(7,"div",8),$p(),h(8,"svg",9),ee(9,"path",10),p(),gy(),ee(10,"div",11),p(),ee(11,"div",12),p(),h(12,"label",13,2),Ln(14),p()()}if(r&2){let o=pr(2);b("labelPosition",s.labelPosition),g(4),ki("mdc-checkbox--selected",s.checked),b("checked",s.checked)("indeterminate",s.indeterminate)("disabled",s.disabled&&!s.disabledInteractive)("id",s.inputId)("required",s.required)("tabIndex",s.disabled&&!s.disabledInteractive?-1:s.tabIndex),Bn("aria-label",s.ariaLabel||null)("aria-labelledby",s.ariaLabelledby)("aria-describedby",s.ariaDescribedby)("aria-checked",s.indeterminate?"mixed":null)("aria-disabled",s.disabled&&s.disabledInteractive?!0:null)("name",s.name)("value",s.value),g(7),b("matRippleTrigger",o)("matRippleDisabled",s.disableRipple||s.disabled)("matRippleCentered",!0),g(),b("for",s.inputId)}},dependencies:[ym,wk],styles:['.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity));background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-app-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity));background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-app-primary))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mdc-checkbox__ripple{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-app-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.cdk-high-contrast-active .mdc-checkbox--disabled{opacity:.5}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mdc-checkbox-unselected-icon-color, var(--mat-app-on-surface-variant));top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-icon-color, var(--mat-app-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mat-app-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-app-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mat-app-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-app-primary));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-app-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover .mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.cdk-high-contrast-active .mdc-checkbox__checkmark{color:CanvasText}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.cdk-high-contrast-active .mdc-checkbox--disabled .mdc-checkbox__checkmark,.cdk-high-contrast-active .mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-app-on-primary))}.cdk-high-contrast-active .mdc-checkbox__mixedmark{margin:0 1px}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-app-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-app-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-app-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-app-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-app-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-app-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-app-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let t=e;return t})(),pHe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[uA,zr,zr]});let t=e;return t})()});var H1,mg=Q(()=>{me();Mv();_Z();qn();Ay();ha();me();qn();H1=(()=>{let e=class e extends Xp{set value(i){this.nxtFormControl.value!==i&&this.nxtFormControl.setValue(i,{emitEvent:!1})}constructor(){super(),this.valueChange=new nt,this.disabled=!1}ngOnChanges(i){i.disabled&&(this.disabled?this.nxtFormControl.disable():this.nxtFormControl.enable())}ngOnInit(){this.nxtFormControl.valueChanges.subscribe(i=>{this.valueChange.emit(i)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-checkbox"]],inputs:{label:"label",value:"value",disabled:"disabled"},outputs:{valueChange:"valueChange"},standalone:!0,features:[et,yn,xe],decls:5,vars:9,consts:[[1,"flex","items-center","justify-center",3,"nxtFormControl","width"],[1,"flex","items-center","justify-center","mat-form-field-full-width","mouse-pointer"],[3,"disabled","formControl"],[3,"innerHTML"]],template:function(r,s){r&1&&(h(0,"nxt-form-field-wrapper",0)(1,"div",1)(2,"mat-checkbox",2),ee(3,"div",3),Ce(4,"safeHtml"),p()()()),r&2&&(b("nxtFormControl",s.nxtFormControl)("width",s.width),g(2),ki("no-label-padding",!s.label),b("disabled",s.disabled)("formControl",s.nxtFormControl),g(),b("innerHTML",tt(4,7,s.label),Pi))},dependencies:[O1,uA,ko,Ko,Ia,$c,Or],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center}[_nghost-%COMP%]   nxt-form-field-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}[_nghost-%COMP%]   nxt-form-field-wrapper[_ngcontent-%COMP%]   .mat-form-field-full-width[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:100%}[_nghost-%COMP%]     .no-label-padding .mdc-label{padding:0!important}[_nghost-%COMP%]     .mdc-checkbox{padding:0!important}[_nghost-%COMP%]     .mdc-checkbox__ripple{display:none}[_nghost-%COMP%]     .mat-mdc-checkbox-ripple{display:none}[_nghost-%COMP%]     label{color:#ccc}[_nghost-%COMP%]     .mat-mdc-checkbox .mdc-checkbox__background{background-color:transparent!important;border:1px solid #bbb!important}[_nghost-%COMP%]     .mat-mdc-checkbox svg{color:#bbb!important}[_nghost-%COMP%]     .mat-mdc-checkbox-checked .mdc-checkbox__background{border:2px solid #bbb!important}[_nghost-%COMP%]     .mat-mdc-checkbox-checked .mdc-checkbox__background svg{color:#bbb!important}"]});let t=e;return t})()});var mHe,hA,t3e=Q(()=>{zn();Qo();mHe=Gs(zk());i3();hA=class t{static getValueGetter(){return e=>{let n;switch(e.colDef.nxtFieldType){case Ee.DurationStringToNow:n=t.getValue_DateTime(e);break;case Ee.DurationStringToTimeAndToNow:let i=t.getValue_DateTime(e);n=Ie.format(i,"HH:mm")+" ("+(0,mHe.default)(i).fromNow()+")";break;case Ee.Array:n=t.getCellValue(e.data,e.colDef.field,e);break;case Ee.GiftcardAssigned:n=t.getValue_GiftcardAssigned(e);break;case Ee.Date_germanDateTime:n=t.getValue_DateTime(e);break;case Ee.Date_germanTime:n=t.getValue_DateTime(e);break;case Ee.Date_germanDate:n=t.getValue_DateTime(e);break;case Ee.Date_germanDateShort:n=t.getValue_DateTime(e);break;case Ee.Date_germanDateShortWithDayOfWeek:n=t.getValue_DateTime(e);break;case Ee.Date_germanDateWithDayOfWeek:n=t.getValue_DateTime(e);break;case Ee.Date_germanDateTimeWithDayOfWeek:n=t.getValue_DateTime(e);break;case Ee.Date_germanDateWithToNowText:n=t.getValue_DateTime(e);break;case Ee.Date_germanDayOfWeek:n=Ie.format(t.getValue_DateTime(e),"EEEE");break;case Ee.Date_germanMonth:n=Ie.format(t.getValue_DateMonth(e),"yyyy MM MMMM");break;case Ee.Date_germanDateTimeWithSeconds:n=t.getValue_DateTime(e);break;case Ee.PaymentSum:n=t.getValue_PaymentSum(e);break;case Ee.Money:n=parseFloat(t.getCellValue(e.data,e.colDef.field,e));break;case Ee.Decimal:n=parseFloat(t.getCellValue(e.data,e.colDef.field,e));break;case Ee.Number:n=parseFloat(t.getCellValue(e.data,e.colDef.field,e));break;case Ee.Text:n=t.getCellValue(e.data,e.colDef.field,e),typeof n=="object"&&(n=JSON.stringify(n));break;case Ee.PaymentType:n=Xo.getPaymentTypeText(t.getCellValue(e.data,e.colDef.field,e));break;case Ee.PaymentMethod:n=Xo.getPaymentMethodText(t.getCellValue(e.data,e.colDef.field,e));break;default:n=t.getCellValue(e.data,e.colDef.field,e);break}return(n===null||n==="null")&&(n=""),n}}static getValue_DateTime(e){let n=this.getCellValue(e.data,e.colDef.field,e);if(n)return Ie.parse(n)}static getValue_GiftcardAssigned(e){let n=this.getCellValue(e.data,e.colDef.field,e);return typeof n=="boolean"?n?"eingel\xF6st":"nicht eingel\xF6st":n+"_"}static getValue_DateMonth(e){let n=this.getValue_DateTime(e);if(n)return Ie.clearDayAndTime(n)}static getCellValue(e,n,i){try{let r;for(let s of n.split("."))r?r=r[s]:r=e[s];return r}catch{return i.getValue?i.getValue():"_?_"}}static getValue_Month(e){let n=this.getCellValue(e.data,e.colDef.field,e);return Ie.parse(Ie.format(n,"yyyy-MM"),"yyyy-MM")}static getValue_PaymentSum(e){try{let n=this.getCellValue(e.data,e.colDef.field,e),i=0;for(let r of n)i+=r.paymentValue;return i}catch{return 0}}}});var CZ,fHe=Q(()=>{Qo();CZ=class{static getCellRenderer(){return e=>{if(e.colDef&&typeof e.colDef.nxtFieldType=="string")switch(e.colDef.nxtFieldType){case Ee.Taglines:return Array.isArray(e.valueFormatted)?e.valueFormatted.join(" | "):"";case Ee.TodoType:switch(e.value){case"missingDeposit":break;case"missingCompletePayed":return'<i class="material-icons">euro_symbol</i><i class="material-icons">call_received</i>';case"missingArtistVisiblePrice":break;case"missingPayedOut":return'<i class="material-icons">euro_symbol</i><i class="material-icons">call_made</i>'}break;default:return e.valueFormatted}else return e.valueFormatted}}}});function _5(t){return t!=null&&t.length>0}function Ar(t){if(!(!t||!t.length))return t[t.length-1]}function Cf(t,e,n){return t==null&&e==null?!0:t!=null&&e!=null&&t.length===e.length&&t.every((i,r)=>n?n(i,e[r]):e[r]===i)}function OZ(t,e){return Cf(t,e)}function dBt(t){return t.sort((e,n)=>e-n)}function jHe(t,e){if(t)for(let n=t.length-2;n>=0;n--){let i=t[n]===e,r=t[n+1]===e;i&&r&&t.splice(n+1,1)}}function $He(t,e){let n=t.indexOf(e);n>=0&&(t[n]=t[t.length-1],t.pop())}function Ip(t,e){let n=t.indexOf(e);n>=0&&t.splice(n,1)}function uBt(t,e){for(let n=0;n<e.length;n++)$He(t,e[n])}function hBt(t,e){for(let n=0;n<e.length;n++)Ip(t,e[n])}function pD(t,e,n){t.splice(n,0,e)}function A3e(t,e,n){if(!(t==null||e==null))for(let i=e.length-1;i>=0;i--){let r=e[i];pD(t,r,n)}}function KHe(t,e,n){hBt(t,e),e.slice().reverse().forEach(i=>pD(t,i,n))}function Sl(t,e){return t.indexOf(e)>-1}function WB(t){return[].concat.apply([],t)}function gHe(t,e){e==null||t==null||e.forEach(n=>t.push(n))}function P3e(t,e){if(t!=null)for(let n=t.length-1;n>=0;n--)e(t[n],n)}function Zc(t){t[YHe]=!0}function gg(t){return t[YHe]===!0}function BB(t,e,n){let i=e;for(;i;){let r=t.getDomData(i,n);if(r)return r;i=i.parentElement}return null}function NZ(t,e){return!e||!t?!1:fBt(e).indexOf(t)>=0}function mBt(t){let e=[],n=t.target;for(;n;)e.push(n),n=n.parentElement;return e}function fBt(t){let e=t;return e.path?e.path:e.composedPath?e.composedPath():mBt(e)}function gBt(t,e,n,i){let s=Sl(pBt,n)?{passive:!0}:void 0;t&&t.addEventListener&&t.addEventListener(e,n,i,s)}function xu(t){return t==null||t===""?null:t}function Di(t,e=!1){return t!=null&&(t!==""||e)}function Ls(t){return!Di(t)}function Gd(t){return t==null||t.length===0}function G1(t){return t!=null&&typeof t.toString=="function"?t.toString():null}function uD(t){if(t===void 0)return;if(t===null||t==="")return null;if(typeof t=="number")return isNaN(t)?void 0:t;let e=parseInt(t,10);return isNaN(e)?void 0:e}function v3e(t){if(t!==void 0)return t===null||t===""?!1:y3e(t)}function y3e(t){return typeof t=="boolean"?t:typeof t=="string"?t.toUpperCase()==="TRUE"||t=="":!1}function mD(t,e){let n=t?JSON.stringify(t):null,i=e?JSON.stringify(e):null;return n===i}function UB(t,e,n=!1){let i=t==null,r=e==null;if(t&&t.toNumber&&(t=t.toNumber()),e&&e.toNumber&&(e=e.toNumber()),i&&r)return 0;if(i)return-1;if(r)return 1;function s(o,a){return o>a?1:o<a?-1:0}if(typeof t!="string"||!n)return s(t,e);try{return t.localeCompare(e)}catch{return s(t,e)}}function _A(t){if(t instanceof Set||t instanceof Map){let e=[];return t.forEach(n=>e.push(n)),e}return Object.values(t)}function Rh(t,e){if(t!=null){if(Array.isArray(t)){for(let n=0;n<t.length;n++)e(n.toString(),t[n]);return}for(let[n,i]of Object.entries(t))e(n,i)}}function T7(t){let e={},n=Object.keys(t);for(let i=0;i<n.length;i++){if(F3e.has(n[i]))continue;let r=n[i],s=t[r];e[r]=s}return e}function _3e(t,e){if(!t)return;let n=t,i={};return Object.keys(n).forEach(r=>{if(e&&e.indexOf(r)>=0||F3e.has(r))return;let s=n[r];C3e(s)&&s.constructor===Object?i[r]=_3e(s):i[r]=s}),i}function m5(t){if(!t)return[];let e=Object;if(typeof e.values=="function")return e.values(t);let n=[];for(let i in t)t.hasOwnProperty(i)&&t.propertyIsEnumerable(i)&&n.push(t[i]);return n}function im(t,e,n=!0,i=!1){Di(e)&&Rh(e,(r,s)=>{if(F3e.has(r))return;let o=t[r];o!==s&&(i&&o==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(o={},t[r]=o),C3e(s)&&C3e(o)&&!Array.isArray(o)?im(o,s,n,i):(n||s!==void 0)&&(t[r]=s))})}function LB(t,e,n){if(!e||!t)return;if(!n)return t[e];let i=e.split("."),r=t;for(let s=0;s<i.length;s++){if(r==null)return;r=r[i[s]]}return r}function C3e(t){return typeof t=="object"&&t!==null}function ZHe(){return yBt++}function f5(t){return t instanceof VZ}function Md(t){return t instanceof CA}function jB(t,e){vHe[e]||(t(),vHe[e]=!0)}function Kv(t,...e){console.log("AG Grid: "+t,...e)}function wt(t,...e){jB(()=>console.warn("AG Grid: "+t,...e),t+e?.join(""))}function Do(t,...e){jB(()=>console.error("AG Grid: "+t,...e),t+e?.join(""))}function L3e(t){return!!(t&&t.constructor&&t.call&&t.apply)}function CBt(t){xBt(t,400)}function yHe(t){n3e.push(t),!r3e&&(r3e=!0,window.setTimeout(()=>{let e=n3e.slice();n3e.length=0,r3e=!1,e.forEach(n=>n())},0))}function xBt(t,e=0){t.length>0&&window.setTimeout(()=>t.forEach(n=>n()),e)}function Ap(t,e){let n;return function(...i){let r=this;window.clearTimeout(n),n=window.setTimeout(function(){t.apply(r,i)},e)}}function _He(t,e){let n=0;return function(...i){let r=this,s=new Date().getTime();s-n<e||(n=s,t.apply(r,i))}}function O3e(t,e,n=100,i){let r=new Date().getTime(),s=null,o=!1,a=()=>{let l=new Date().getTime()-r>n;(t()||l)&&(e(),o=!0,s!=null&&(window.clearInterval(s),s=null),l&&i&&wt(i))};a(),o||(s=window.setInterval(a,10))}function N3e(...t){return e=>t.reduce((n,i)=>i(n),e)}function V3e(t){let e=[],n=i=>{for(let r=0;r<i.length;r++){let s=i[r];f5(s)?e.push(s):Md(s)&&n(s.getChildren())}};return n(t),e}function ax(t){return t.reduce((e,n)=>e+n.getActualWidth(),0)}function fA(t,e,n){let i={};if(!e)return;ux(null,e,s=>{i[s.getInstanceId()]=s}),n&&ux(null,n,s=>{i[s.getInstanceId()]=null});let r=Object.values(i).filter(s=>s!=null);t.destroyBeans(r)}function CHe(t){return t.getId().startsWith(Xv)}function kZ(t){let e=[];return t instanceof Array?t.some(i=>typeof i!="string")?wt("if colDef.type is supplied an array it should be of type 'string[]'"):e=t:typeof t=="string"?e=t.split(","):wt("colDef.type should be of type 'string' | 'string[]'"),e}function ux(t,e,n){if(e)for(let i=0;i<e.length;i++){let r=e[i];Md(r)&&ux(r,r.getChildren(),n),n(r,t)}}function gA(t){return t==="gridOptionsUpdated"?"gridOptionsChanged":t}function TBt(t){t.map={},t.list.forEach(e=>t.map[e.getId()]=e)}function xHe(t,e){let n=t===e,i=t.getColDef()===e,r=t.getColId()==e;return n||i||r}function DBt(t,e){return Cf(t,e,(n,i)=>n.getColId()===i.getColId())}function RBt(t){let e=String.fromCharCode;function n(u){let m=[];if(!u)return[];let f=u.length,_=0,x,D;for(;_<f;)x=u.charCodeAt(_++),x>=55296&&x<=56319&&_<f?(D=u.charCodeAt(_++),(D&64512)==56320?m.push(((x&1023)<<10)+(D&1023)+65536):(m.push(x),_--)):m.push(x);return m}function i(u){if(u>=55296&&u<=57343)throw Error("Lone surrogate U+"+u.toString(16).toUpperCase()+" is not a scalar value")}function r(u,m){return e(u>>m&63|128)}function s(u){if(!(u&4294967168))return e(u);let m="";return u&4294965248?u&4294901760?u&4292870144||(m=e(u>>18&7|240),m+=r(u,12),m+=r(u,6)):(i(u),m=e(u>>12&15|224),m+=r(u,6)):m=e(u>>6&31|192),m+=e(u&63|128),m}let o=n(t),a=o.length,l=-1,c,d="";for(;++l<a;)c=o[l],d+=s(c);return d}function QHe(t){return t[0].toUpperCase()+t.substring(1).toLowerCase()}function nl(t,e){if(t==null)return null;let n=t.toString().toString();return e?n:n.replace(ABt,i=>PBt[i])}function FBt(t){if(!t||t==null)return null;let e=/([a-z])([A-Z])/g,n=/([A-Z]+)([A-Z])([a-z])/g;return t.replace(e,"$1 $2").replace(n,"$1 $2$3").replace(/\./g," ").split(" ").map(r=>r.substring(0,1).toUpperCase()+(r.length>1?r.substring(1,r.length):"")).join(" ")}function LBt(t){return t.replace(/[A-Z]/g,e=>`-${e.toLocaleLowerCase()}`)}function JHe(t,e){return t+"_"+e}function Sm(t){return t instanceof eGe}function dD(t,e,n){if(t)for(let i=0;i<t.length;i++){let r=t[i];if(Sm(r)){let s=e?r.getDisplayedChildren():r.getChildren();dD(s,e,n)}n(r)}}function s3e(t){let e=[];return dD(t,!0,n=>{f5(n)&&e.push(n)}),e}function nGe(t,e){typeof t!="object"&&(t={});let n=ve({},t);return HB.ALL_PROPERTIES_AND_CALLBACKS.forEach(r=>{let s=e[r];typeof s<"u"&&s!==HB.VUE_OMITTED_PROPERTY&&(n[r]=s)}),n}function rGe(t,e){if(!t)return;let n={},i=!1;if(Object.keys(t).filter(o=>HB.ALL_PROPERTIES_AND_CALLBACKS_SET.has(o)).forEach(o=>{n[o]=t[o],i=!0}),!i)return;let r={type:"gridOptionsChanged",options:n};e.dispatchEvent(r);let s={type:"componentStateChanged"};Rh(n,(o,a)=>{s[o]=a}),e.dispatchEvent(s)}function Qv(t,e,n){n==null||typeof n=="string"&&n==""?B3e(t,e):Jv(t,e,n)}function Jv(t,e,n){t.setAttribute(sGe(e),n.toString())}function B3e(t,e){t.removeAttribute(sGe(e))}function sGe(t){return`aria-${t}`}function dd(t,e){e?t.setAttribute("role",e):t.removeAttribute("role")}function UBt(t){let e;return t==="asc"?e="ascending":t==="desc"?e="descending":t==="mixed"?e="other":e="none",e}function oGe(t){return parseInt(t.getAttribute("aria-posinset"),10)}function jBt(t){return t.getAttribute("aria-label")}function hl(t,e){Qv(t,"label",e)}function jy(t,e){Qv(t,"labelledby",e)}function D7(t,e){Qv(t,"describedby",e)}function aGe(t,e){Qv(t,"live",e)}function $Bt(t,e){Qv(t,"atomic",e)}function KBt(t,e){Qv(t,"relevant",e)}function C5(t,e){Qv(t,"level",e)}function wA(t,e){Qv(t,"disabled",e)}function $B(t,e){Qv(t,"hidden",e)}function BZ(t,e){Qv(t,"activedescendant",e)}function ip(t,e){Jv(t,"expanded",e)}function zZ(t){B3e(t,"expanded")}function fD(t,e){Jv(t,"setsize",e)}function gD(t,e){Jv(t,"posinset",e)}function YBt(t,e){Jv(t,"multiselectable",e)}function qBt(t,e){Jv(t,"rowcount",e)}function HZ(t,e){Jv(t,"rowindex",e)}function ZBt(t,e){Jv(t,"colcount",e)}function GZ(t,e){Jv(t,"colindex",e)}function z3e(t,e){Jv(t,"colspan",e)}function XBt(t,e){Jv(t,"sort",e)}function QBt(t){B3e(t,"sort")}function bA(t,e){Qv(t,"selected",e)}function lGe(t,e){Jv(t,"checked",e===void 0?"mixed":e)}function KB(t,e){Qv(t,"controls",e.id),jy(e,t.id)}function H3e(t,e){return e===void 0?t("ariaIndeterminate","indeterminate"):e===!0?t("ariaChecked","checked"):t("ariaUnchecked","unchecked")}function g5(){return o3e===void 0&&(o3e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),o3e}function cGe(){if(xZ===void 0)if(g5()){let t=navigator.userAgent.match(/version\/(\d+)/i);t&&(xZ=t[1]!=null?parseFloat(t[1]):0)}else xZ=0;return xZ}function G3e(){if(a3e===void 0){let t=window;a3e=!!t.chrome&&(!!t.chrome.webstore||!!t.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return a3e}function dGe(){return l3e===void 0&&(l3e=/(firefox)/i.test(navigator.userAgent)),l3e}function uGe(){return c3e===void 0&&(c3e=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),c3e}function x5(){return d3e===void 0&&(d3e=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),d3e}function w3e(){return!g5()||cGe()>=15}function S3e(t){if(!t)return null;let e=t.tabIndex,n=t.getAttribute("tabIndex");return e===-1&&(n===null||n===""&&!dGe())?null:e.toString()}function JBt(){if(!document.body)return-1;let t=1e6,e=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){let i=t*2;if(n.style.height=i+"px",i>e||n.clientHeight!==i)break;t=i}return document.body.removeChild(n),t}function ezt(){return document.body?.clientWidth??(window.innerHeight||document.documentElement?.clientWidth||-1)}function tzt(){return document.body?.clientHeight??(window.innerHeight||document.documentElement?.clientHeight||-1)}function izt(){return b3e==null&&hGe(),b3e}function hGe(){let t=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",t.appendChild(e);let n=e.offsetWidth-e.clientWidth;n===0&&e.clientWidth===0&&(n=null),e.parentNode&&e.parentNode.removeChild(e),n!=null&&(b3e=n,x3e=n===0)}function pGe(){return x3e==null&&hGe(),x3e}function SA(t,e,n){let i=t.parentElement,r=i&&i.firstChild;for(;r;)e&&r.classList.toggle(e,r===t),n&&r.classList.toggle(n,r!==t),r=r.nextSibling}function W3e(t){let e=Element.prototype.matches||Element.prototype.msMatchesSelector,i=e.call(t,"input, select, button, textarea"),r=e.call(t,mGe),s=l1(t);return i&&!r&&s}function Vn(t,e,n={}){let{skipAriaHidden:i}=n;t.classList.toggle("ag-hidden",!e),i||$B(t,!e)}function U3e(t,e,n={}){let{skipAriaHidden:i}=n;t.classList.toggle("ag-invisible",!e),i||$B(t,!e)}function c3(t,e){let n="disabled",i=e?r=>r.setAttribute(n,""):r=>r.removeAttribute(n);i(t),CGe(t.querySelectorAll("input"),r=>i(r))}function xA(t,e,n){let i=0;for(;t;){if(t.classList.contains(e))return!0;if(t=t.parentElement,typeof n=="number"){if(++i>n)break}else if(t===n)break}return!1}function vD(t){let{height:e,width:n,borderTopWidth:i,borderRightWidth:r,borderBottomWidth:s,borderLeftWidth:o,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:m,marginBottom:f,marginLeft:_,boxSizing:x}=window.getComputedStyle(t);return{height:parseFloat(e||"0"),width:parseFloat(n||"0"),borderTopWidth:parseFloat(i||"0"),borderRightWidth:parseFloat(r||"0"),borderBottomWidth:parseFloat(s||"0"),borderLeftWidth:parseFloat(o||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(m||"0"),marginBottom:parseFloat(f||"0"),marginLeft:parseFloat(_||"0"),boxSizing:x}}function YB(t){let e=vD(t);return e.boxSizing==="border-box"?e.height-e.paddingTop-e.paddingBottom:e.height}function yD(t){let e=vD(t);return e.boxSizing==="border-box"?e.width-e.paddingLeft-e.paddingRight:e.width}function TA(t){let{height:e,marginBottom:n,marginTop:i}=vD(t);return Math.floor(e+n+i)}function v5(t){let{width:e,marginLeft:n,marginRight:i}=vD(t);return Math.floor(e+n+i)}function fGe(t){let e=t.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:r,borderBottomWidth:s}=vD(t);return{top:e.top+(n||0),left:e.left+(i||0),right:e.right+(r||0),bottom:e.bottom+(s||0)}}function AZ(){if(typeof bZ=="boolean")return bZ;let t=document.createElement("div");return t.style.direction="rtl",t.style.width="1px",t.style.height="1px",t.style.position="fixed",t.style.top="0px",t.style.overflow="hidden",t.dir="rtl",t.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(t),t.scrollLeft=1,bZ=Math.floor(t.scrollLeft)===0,document.body.removeChild(t),bZ}function PZ(t,e){let n=t.scrollLeft;return e&&(n=Math.abs(n),G3e()&&!AZ()&&(n=t.scrollWidth-t.clientWidth-n)),n}function RZ(t,e,n){n&&(AZ()?e*=-1:(g5()||G3e())&&(e=t.scrollWidth-t.clientWidth-e)),t.scrollLeft=e}function zo(t){for(;t&&t.firstChild;)t.removeChild(t.firstChild)}function dc(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function gGe(t){return!!t.offsetParent}function l1(t){let e=t;return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!gGe(t)||window.getComputedStyle(t).visibility!=="visible")}function Rp(t){let e=document.createElement("div");return e.innerHTML=(t||"").trim(),e.firstChild}function vGe(t,e,n){n&&n.nextSibling===e||(n?n.nextSibling?t.insertBefore(e,n.nextSibling):t.appendChild(e):t.firstChild&&t.firstChild!==e&&t.insertAdjacentElement("afterbegin",e))}function yGe(t,e){for(let n=0;n<e.length;n++){let i=e[n],r=t.children[n];r!==i&&t.insertBefore(i,r)}}function rzt(t,e,n){n?n.insertAdjacentElement("afterend",e):t.firstChild?t.insertAdjacentElement("afterbegin",e):t.appendChild(e)}function _Ge(t,e){if(e)for(let[n,i]of Object.entries(e)){if(!n||!n.length||i==null)continue;let r=LBt(n),s=i.toString(),o=s.replace(/\s*!important/g,""),a=o.length!=s.length?"important":void 0;t.style.setProperty(r,o,a)}}function szt(t){return t.clientWidth<t.scrollWidth}function ozt(t){return t.clientHeight<t.scrollHeight}function FZ(t,e){e==="flex"?(t.style.removeProperty("width"),t.style.removeProperty("minWidth"),t.style.removeProperty("maxWidth"),t.style.flex="1 1 auto"):E4(t,e)}function E4(t,e){e=j3e(e),t.style.width=e.toString(),t.style.maxWidth=e.toString(),t.style.minWidth=e.toString()}function OB(t,e){e=j3e(e),t.style.height=e.toString(),t.style.maxHeight=e.toString(),t.style.minHeight=e.toString()}function j3e(t){return typeof t=="number"?`${t}px`:t}function qB(t){return t instanceof Node||t instanceof HTMLElement}function azt(t){if(t==null)return[];let e=[];return CGe(t,n=>e.push(n)),e}function lzt(t,e){if(t)for(let n=0;n<t.length;n++){let i=t[n];e(i.name,i.value)}}function qv(t,e,n){n==null||n===""?t.removeAttribute(e):t.setAttribute(e,n.toString())}function CGe(t,e){if(t!=null)for(let n=0;n<t.length;n++)e(t[n])}function WZ(t,e){t.then(n=>{let i=n.getGui();i!=null&&(typeof i=="object"?e.appendChild(i):e.innerHTML=i)})}function $y(t,e,n){let i=tr(t,e,n);if(i){let{className:s}=i;if(typeof s=="string"&&s.indexOf("ag-icon")>-1||typeof s=="object"&&s["ag-icon"])return i}let r=document.createElement("span");return r.appendChild(i),r}function tr(t,e,n,i){let r=null,s=n&&n.getColDef().icons;if(s&&(r=s[t]),e&&!r){let o=e.get("icons");o&&(r=o[t])}if(r){let o;if(typeof r=="function")o=r();else if(typeof r=="string")o=r;else throw new Error("icon from grid options needs to be a string or a function");if(typeof o=="string")return Rp(o);if(qB(o))return o;wt("iconRenderer should return back a string or a dom object")}else{let o=document.createElement("span"),a=bGe[t]??(mzt.has(t)?t:void 0);return a||(i?a=t:(wt(`Did not find icon ${t}`),a="")),o.setAttribute("class",`ag-icon ag-icon-${a}`),o.setAttribute("unselectable","on"),dd(o,"presentation"),o}}function wGe(t,e,n){if(n===0)return!1;let i=Math.abs(t.clientX-e.clientX),r=Math.abs(t.clientY-e.clientY);return Math.max(i,r)<=n}function IB(t,e){return`<span data-ref="eSort${t}" class="ag-sort-indicator-icon ag-sort-${e} ag-hidden" aria-hidden="true"></span>`}function kzt(t,e,n){let i={},r=t.filter(s=>!e.some(o=>o===s));return r.length>0&&r.forEach(s=>i[s]=DA(s,n).values),i}function DA(t,e,n,i){let r=e.map((a,l)=>({value:a,relevance:Izt(t.toLowerCase(),a.toLocaleLowerCase()),idx:l}));if(r.sort((a,l)=>l.relevance-a.relevance),n&&(r=r.filter(a=>a.relevance!==0)),r.length>0&&i&&i>0){let l=r[0].relevance*i;r=r.filter(c=>l-c.relevance<0)}let s=[],o=[];for(let a of r)s.push(a.value),o.push(a.idx);return{values:s,indices:o}}function Izt(t,e){let n=t.replace(/\s/g,""),i=e.replace(/\s/g,""),r=0,s=-1;for(let o=0;o<n.length;o++){let a=i.indexOf(n[o],s+1);a!==-1&&(s=a,r+=100-s*100/1e4*100)}return r}function cx(t){let e=t;return e!=null&&e.getFrameworkComponentInstance!=null?e.getFrameworkComponentInstance():t}function q3e(t,e){return LZ(t)?(t.debounceMs!=null&&wt("debounceMs is ignored when apply button is present"),0):t.debounceMs!=null?t.debounceMs:e}function LZ(t){return!!t.buttons&&t.buttons.indexOf("apply")>=0}function UZ(t){return t.altKey||t.ctrlKey||t.metaKey?!1:t.key?.length===1}function D3e(t,e,n,i,r){let s=i?i.getColDef().suppressKeyboardEvent:void 0;if(!s)return!1;let o=t.addGridCommonParams({event:e,editing:r,column:i,node:n,data:n.data,colDef:i.getColDef()});return!!(s&&s(o))}function gHt(t,e,n,i){let r=i.getDefinition(),s=r&&r.suppressHeaderKeyboardEvent;if(!Di(s))return!1;let o=t.addGridCommonParams({colDef:r,column:i,headerRowIndex:n,event:e});return!!s(o)}function vHt(t){let{keyCode:e}=t,n;switch(e){case dHt:n=It.A;break;case uHt:n=It.C;break;case hHt:n=It.V;break;case pHt:n=It.D;break;case mHt:n=It.Z;break;case fHt:n=It.Y;break;default:n=t.code}return n}function yHt(t,e=!1){return t===It.DELETE?!0:!e&&t===It.BACKSPACE?uGe():!1}function E3e(t){let{allowedCharPattern:e}=t??{};return e??null}function zGe(t){let e=t&&t.trim();return e===""?t:e}function HGe(t){if(typeof t=="number")return t;if(typeof t=="string"){let e=parseInt(t);return isNaN(e)?void 0:e}}function p5(t,e=Number.MAX_VALUE){return n=>{let i=HGe(n);if(!(i==null||i<t||i>e))return i}}function NB(t,e){return t.toString().padStart(e,"0")}function xHt(t,e){let n=[];for(let i=t;i<=e;i++)n.push(i);return n}function GGe(t,e,n){return typeof t!="number"?"":Yy(Math.round(t*100)/100,e,n)}function Yy(t,e,n){return typeof t!="number"?"":t.toString().replace(".",n).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${e}`)}function vg(t,e=!0,n="-"){if(!t)return null;let i=[t.getFullYear(),t.getMonth()+1,t.getDate()].map(r=>NB(r,2)).join(n);return e&&(i+=" "+[t.getHours(),t.getMinutes(),t.getSeconds()].map(r=>NB(r,2)).join(":")),i}function VB(t,e="YYYY-MM-DD"){let n=NB(t.getFullYear(),4),i=["January","February","March","April","May","June","July","August","September","October","November","December"],r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${t.getFullYear()}`,MMMM:()=>i[t.getMonth()],MMM:()=>i[t.getMonth()].slice(0,3),MM:()=>NB(t.getMonth()+1,2),Mo:()=>`${t.getMonth()+1}${u3e(t.getMonth()+1)}`,M:()=>`${t.getMonth()+1}`,Do:()=>`${t.getDate()}${u3e(t.getDate())}`,DD:()=>NB(t.getDate(),2),D:()=>`${t.getDate()}`,dddd:()=>r[t.getDay()],ddd:()=>r[t.getDay()].slice(0,3),dd:()=>r[t.getDay()].slice(0,2),do:()=>`${t.getDay()}${u3e(t.getDay())}`,d:()=>`${t.getDay()}`},o=new RegExp(Object.keys(s).join("|"),"g");return e.replace(o,a=>a in s?s[a]():a)}function A0(t){if(!t)return null;let[e,n]=t.split(" ");if(!e)return null;let i=e.split("-").map(u=>parseInt(u,10));if(i.filter(u=>!isNaN(u)).length!==3)return null;let[r,s,o]=i,a=new Date(r,s-1,o);if(a.getFullYear()!==r||a.getMonth()!==s-1||a.getDate()!==o)return null;if(!n||n==="00:00:00")return a;let[l,c,d]=n.split(":").map(u=>parseInt(u,10));return l>=0&&l<24&&a.setHours(l),c>=0&&c<60&&a.setMinutes(c),d>=0&&d<60&&a.setSeconds(d),a}function jZ(t,e,n,i){return Ls(t)?[]:KGe(t.headerClass,t,e,n,i)}function $Z(t,e,n,i){return Ls(t)?[]:KGe(t.toolPanelClass,t,e,n,i)}function $Ge(t,e,n){t.addOrRemoveCssClass(wHt,n.isColAtEdge(e,"first")),t.addOrRemoveCssClass(SHt,n.isColAtEdge(e,"last"))}function THt(t,e,n,i){return e.addGridCommonParams({colDef:t,column:n,columnGroup:i})}function KGe(t,e,n,i,r){if(Ls(t))return[];let s;if(typeof t=="function"){let o=THt(e,n,i,r);s=t(o)}else s=t;return typeof s=="string"?[s]:Array.isArray(s)?[...s]:[]}function kHt(t){return!!t.filterManager?.isColumnFilterPresent()||!!t.filterManager?.isAggregateFilterPresent()}function IHt(t,e,n){return t.filterManager?.getFilterInstance(e,n)}function AHt(t,e){return t.filterManager?.getColumnFilterInstance(e)??Promise.resolve(void 0)}function PHt(t,e){let n=t.columnModel.getColDefCol(e);if(n)return t.filterManager?.destroyFilter(n,"api")}function RHt(t,e){t.frameworkOverrides.wrapIncoming(()=>t.filterManager?.setFilterModel(e))}function FHt(t){return t.filterManager?.getFilterModel()??{}}function LHt(t,e){return t.filterManager?.getColumnFilterModel(e)??null}function OHt(t,e,n){return t.filterManager?.setColumnFilterModel(e,n)??Promise.resolve()}function NHt(t,e){let n=t.columnModel.getCol(e);if(!n){Do(`column '${e}' not found`);return}t.menuService.showFilterMenu({column:n,containerType:"columnFilter",positionBy:"auto"})}function J3e(t,e,n){if(e==null)return null;let i=null,{compName:r,jsComp:s,fwComp:o}=DGe.getCompKeys(t,e,Y3e);return r?i={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[r]:s==null&&o==null&&e.filter===!0&&(i=n()),i}function BHt(t){return!!t.filterManager?.isAnyFilterPresent()}function zHt(t,e="api"){t.filterManager?.onFilterChanged({source:e})}function KHt(t){return!!t.filterManager?.isQuickFilterPresent()}function YHt(t){return t.gos.get("quickFilterText")}function qHt(t){t.filterManager?.resetQuickFilterCache()}function r4e(t){let{isFromHeader:e,hDirection:n,xPosition:i,fromEnter:r,fakeEvent:s,pinned:o,gos:a,columnModel:l,columnMoveService:c,presentedColsService:d}=t,u=n===0,m=n===1,{allMovingColumns:f}=t;if(e){let A=[];f.forEach(Y=>{let X=null,ne=Y.getParent();for(;ne!=null&&ne.getDisplayedLeafColumns().length===1;)X=ne,ne=ne.getParent();X!=null?(!!X.getColGroupDef()?.marryChildren?X.getProvidedColumnGroup().getLeafColumns():X.getLeafColumns()).forEach(ie=>{A.includes(ie)||A.push(ie)}):A.includes(Y)||A.push(Y)}),f=A}let _=f.slice();l.sortColsLikeCols(_);let x=mGt({movingCols:_,draggingRight:m,xPosition:i,pinned:o,gos:a,columnModel:l,presentedColsService:d}),D=uGt(_,l);if(x.length===0)return;let E=x[0],M=D!==null&&!r;if(e&&(M=D!==null),M&&!s&&(u&&E>=D||m&&E<=D))return;let I=d.getAllCols(),z=[],G=null;for(let A=0;A<x.length;A++){let Y=x[A],X=c.getProposedColumnOrder(_,Y);if(!c.doesOrderPassRules(X))continue;let ne=X.filter(ce=>I.includes(ce));if(G===null)G=ne;else if(!Cf(ne,G))break;let pe=hGt(X);z.push({move:Y,fragCount:pe})}if(z.length!==0)return z.sort((A,Y)=>A.fragCount-Y.fragCount),JGe(f,z[0].move,"uiColumnMoved",!1,c)}function JGe(t,e,n,i,r){return r.moveColumns(t,e,n,i),i?null:{columns:t,toIndex:e}}function uGt(t,e){let n=e.getCols(),i=dBt(t.map(l=>n.indexOf(l))),r=i[0];return Ar(i)-r!==i.length-1?null:r}function hGt(t){function e(i){let r=[],s=i.getOriginalParent();for(;s!=null;)r.push(s),s=s.getOriginalParent();return r}let n=0;for(let i=0;i<t.length-1;i++){let r=e(t[i]),s=e(t[i+1]);[r,s]=r.length>s.length?[r,s]:[s,r],r.forEach(o=>{s.indexOf(o)===-1&&n++})}return n}function pGt(t,e){switch(e){case"left":return t.getLeftCols();case"right":return t.getRightCols();default:return t.getCenterCols()}}function mGt(t){let{movingCols:e,draggingRight:n,xPosition:i,pinned:r,gos:s,columnModel:o,presentedColsService:a}=t;if(s.get("suppressMovableColumns")||e.some(I=>I.getColDef().suppressMovable))return[];let c=pGt(a,r),d=o.getCols(),u=c.filter(I=>Sl(e,I)),m=c.filter(I=>!Sl(e,I)),f=d.filter(I=>!Sl(e,I)),_=0,x=i;if(n){let I=0;u.forEach(z=>I+=z.getActualWidth()),x-=I}if(x>0){for(let I=0;I<m.length;I++){let z=m[I];if(x-=z.getActualWidth(),x<0)break;_++}n&&_++}let D;if(_>0){let I=m[_-1];D=f.indexOf(I)+1}else D=f.indexOf(m[0]),D===-1&&(D=0);let E=[D],M=(I,z)=>I-z;if(n){let I=D+1,z=d.length-1;for(;I<=z;)E.push(I),I++;E.sort(M)}else{let I=D,z=d.length-1,G=d[I];for(;I<=z&&c.indexOf(G)<0;)I++,E.push(I),G=d[I];I=D-1;let A=0;for(;I>=A;)E.push(I),I--;E.sort(M).reverse()}return E}function s4e(t,e,n,i,r){let s=r.getHeaderRowContainerCtrl(e)?.getViewportElement();return s?(n&&(t-=s.getBoundingClientRect().left),i.get("enableRtl")&&(t=s.clientWidth-t),e==null&&(t+=r.get("center").getCenterViewportScrollLeft()),t):0}function vA(t){return fWt[t]}function AWt(t){let e;return t.type==="center"?e=`<div class="${t.viewport}" data-ref="eViewport" role="presentation">
                <div class="${t.container}" data-ref="eContainer"></div>
            </div>`:e=`<div class="${t.container}" data-ref="eContainer"></div>`,e}function PB(t){return t.map(e=>`<ag-row-container name="${e}"></ag-row-container>`).join("")}function aUt(t){return t.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition()}function lUt(t){return t.ctrlsService.getGridBodyCtrl().getScrollFeature().getHScrollPosition()}function cWe(t,e,n="auto"){t.frameworkOverrides.wrapIncoming(()=>t.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(e,n),"ensureVisible")}function dWe(t,e,n){t.frameworkOverrides.wrapIncoming(()=>t.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureIndexVisible(e,n),"ensureVisible")}function cUt(t,e,n=null){t.frameworkOverrides.wrapIncoming(()=>t.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureNodeVisible(e,n),"ensureVisible")}function dUt(t){t.undoRedoService?.undo("api")}function uUt(t){t.undoRedoService?.redo("api")}function hUt(t,e={}){return t.rowRenderer.getCellEditorInstances(e).map(cx)}function pUt(t){return t.rowRenderer.getEditingCells()}function mUt(t,e=!1){t.rowRenderer.stopEditing(e)}function fUt(t,e){let n=t.columnModel.getCol(e.colKey);if(!n){wt(`no column found for ${e.colKey}`);return}let i={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:n};e.rowPinned==null&&dWe(t,e.rowIndex),cWe(t,e.colKey);let s=t.navigationService.getCellByPosition(i);if(!s)return;let{focusService:o,gos:a}=t,l=()=>{let d=a.getActiveDomElement(),u=s.getGui();return d!==u&&u.contains(d)},c=a.get("stopEditingWhenCellsLoseFocus")&&l();(c||!o.isCellFocused(i))&&o.setFocusedCell(St(ve({},i),{forceBrowserFocus:c,preventScrollOnBrowserFocus:!0})),s.startRowOrCellEdit(e.key)}function gUt(t){return t.undoRedoService?.getCurrentUndoStackSize()??0}function vUt(t){return t.undoRedoService?.getCurrentRedoStackSize()??0}function UUt(t){return{beanName:"gridApi",bean:t.getBean("apiFunctionService").api}}function JUt(t,e){let n=(t.beanName?PHe[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(e.beanName?PHe[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return n-i}function ejt(t,e){return t?.beanName==="gridDestroyService"?-1:0}function gjt(t,e){let n=t.columnModel.getColDefCol(e);return n?n.getColDef():null}function vjt(t){return t.columnModel.getColumnDefs()}function yjt(t,e){typeof e=="number"?t.columnSizeService.sizeColumnsToFit(e,"api"):t.ctrlsService.getGridBodyCtrl().sizeColumnsToFit(e)}function _jt(t,e,n){t.columnModel.setColumnGroupOpened(e,n,"api")}function Cjt(t,e,n){return t.visibleColsService.getColumnGroup(e,n)}function xjt(t,e){return t.columnModel.getProvidedColGroup(e)}function bjt(t,e,n){return t.columnNameService.getDisplayNameForColumn(e,n)||""}function wjt(t,e,n){return t.columnNameService.getDisplayNameForColumnGroup(e,n)||""}function Sjt(t,e){return t.columnModel.getColDefCol(e)}function Tjt(t){return t.columnModel.getColDefCols()}function Djt(t,e){return t.columnApplyStateService.applyColumnState(e,"api")}function Ejt(t){return t.columnGetStateService.getColumnState()}function Mjt(t){t.columnApplyStateService.resetColumnState("api")}function kjt(t){return t.columnGroupStateService.getColumnGroupState()}function Ijt(t,e){t.columnGroupStateService.setColumnGroupState(e,"api")}function Ajt(t){t.columnGroupStateService.resetColumnGroupState("api")}function Pjt(t){return t.visibleColsService.isPinningLeft()||t.visibleColsService.isPinningRight()}function Rjt(t){return t.visibleColsService.isPinningLeft()}function Fjt(t){return t.visibleColsService.isPinningRight()}function Ljt(t,e){return t.visibleColsService.getColAfter(e)}function Ojt(t,e){return t.visibleColsService.getColBefore(e)}function Njt(t,e,n){t.columnModel.setColsVisible([e],n,"api")}function Vjt(t,e,n){t.columnModel.setColsVisible(e,n,"api")}function Bjt(t,e,n){t.columnModel.setColsPinned([e],n,"api")}function zjt(t,e,n){t.columnModel.setColsPinned(e,n,"api")}function Hjt(t){return t.columnModel.getCols()}function Gjt(t){return t.visibleColsService.getLeftCols()}function Wjt(t){return t.visibleColsService.getCenterCols()}function Ujt(t){return t.visibleColsService.getRightCols()}function jjt(t){return t.visibleColsService.getAllCols()}function $jt(t){return t.columnViewportService.getViewportColumns()}function Kjt(t,e,n){t.columnMoveService.moveColumns([e],n,"api")}function Yjt(t,e,n){t.columnMoveService.moveColumnByIndex(e,n,"api")}function qjt(t,e,n){t.columnMoveService.moveColumns(e,n,"api")}function Zjt(t,e,n,i=!0,r="api"){t.columnSizeService.setColumnWidths([{key:e,newWidth:n}],!1,i,r)}function Xjt(t,e,n=!0,i="api"){t.columnSizeService.setColumnWidths(e,!1,n,i)}function Qjt(t){return t.visibleColsService.getTreeLeft()}function Jjt(t){return t.visibleColsService.getTreeCenter()}function e$t(t){return t.visibleColsService.getTreeRight()}function t$t(t){return t.visibleColsService.getAllTrees()}function i$t(t,e,n){return t.columnAutosizeService.autoSizeCols({colKeys:[e],skipHeader:n,source:"api"})}function n$t(t,e,n){t.columnAutosizeService.autoSizeCols({colKeys:e,skipHeader:n,source:"api"})}function r$t(t,e){t.columnAutosizeService.autoSizeAllColumns("api",e)}function l$t(t,e){t.ctrlsService.getGridBodyCtrl().getRowDragFeature().addRowDropZone(e)}function c$t(t,e){let n=t.dragAndDropService.findExternalZone(e);n&&t.dragAndDropService.removeDropTarget(n)}function d$t(t,e){return t.ctrlsService.getGridBodyCtrl().getRowDragFeature().getRowDropZone(e)}function h$t(t){return t.pinnedRowModel.getPinnedTopRowCount()}function p$t(t){return t.pinnedRowModel.getPinnedBottomRowCount()}function m$t(t,e){return t.pinnedRowModel.getPinnedTopRow(e)}function f$t(t,e){return t.pinnedRowModel.getPinnedBottomRow(e)}function v$t(t){t.overlayService.showLoadingOverlay()}function y$t(t){t.overlayService.showNoRowsOverlay()}function _$t(t){t.overlayService.hideOverlay()}function x$t(t,e,n){if(!e)return;let i=t.ctrlsService.getGridBodyCtrl().getGui(),r=`aria-${e}`;n===null?i.removeAttribute(r):i.setAttribute(r,n)}function b$t(t,e={}){t.frameworkOverrides.wrapIncoming(()=>t.rowRenderer.refreshCells(e))}function w$t(t,e={}){let n=i=>wt(`Since v31.1 api.flashCells parameter '${i}Delay' is deprecated. Please use '${i}Duration' instead.`);Di(e.fadeDelay)&&n("fade"),Di(e.flashDelay)&&n("flash"),t.frameworkOverrides.wrapIncoming(()=>t.rowRenderer.flashCells(e))}function S$t(t){t.frameworkOverrides.wrapIncoming(()=>t.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}function T$t(t){return t.animationFrameService.isQueueEmpty()}function D$t(t){t.animationFrameService.flushAllFrames()}function E$t(t){return{rowHeight:t.gos.getRowHeightAsNumber(),headerHeight:t.columnModel.getHeaderHeight()}}function M$t(t,e={}){return t.rowRenderer.getCellRendererInstances(e).map(cx)}function I$t(t){t.valueCache.expire()}function A$t(t,e,n){return mWe(t,{colKey:e,rowNode:n})}function mWe(t,e){let{colKey:n,rowNode:i,useFormatter:r}=e,s=t.columnModel.getColDefCol(n)??t.columnModel.getCol(n);if(Ls(s))return null;let o=t.valueService.getValue(s,i);return r?t.valueService.formatValue(s,i,o)??nl(o,!0):o}function P$t(t){return t.context.getGridId()}function R$t(t){t.gridDestroyService.destroy()}function F$t(t){return t.gridDestroyService.isDestroyCalled()}function L$t(t,e){return t.gos.get(e)}function O$t(t,e,n){fWe(t,{[e]:n})}function fWe(t,e){t.gos.updateGridOptions({options:e})}function N$t(t,e,n){t.apiEventService.addEventListener(e,n)}function V$t(t,e,n){t.apiEventService.removeEventListener(e,n)}function B$t(t,e){t.apiEventService.addGlobalListener(e)}function z$t(t,e){t.apiEventService.removeGlobalListener(e)}function H$t(t){return t.focusService.getFocusedCell()}function G$t(t){return t.focusService.clearFocusedCell()}function W$t(t,e,n,i){t.focusService.setFocusedCell({rowIndex:e,column:n,rowPinned:i,forceBrowserFocus:!0})}function U$t(t,e){return t.navigationService.tabToNextCell(!1,e)}function j$t(t,e){return t.navigationService.tabToNextCell(!0,e)}function $$t(t,e,n=!1){let i=t.headerNavigationService.getHeaderPositionForColumn(e,n);i&&t.focusService.focusHeaderPosition({headerPosition:i})}function K$t(t,e,n){let i=t.columnModel.getCol(e);t.menuService.showColumnMenu({column:i,buttonElement:n,positionBy:"button"})}function Y$t(t,e,n){let i=t.columnModel.getCol(e);if(i||(i=t.columnModel.getColDefCol(e)),!i){Do(`column '${e}' not found`);return}t.menuService.showColumnMenu({column:i,mouseEvent:n,positionBy:"mouse"})}function q$t(t,e){let n=t.columnModel.getCol(e);if(!n){Do(`column '${e}' not found`);return}t.menuService.showColumnMenu({column:n,positionBy:"auto"})}function Z$t(t){t.menuService.hidePopupMenu()}function X$t(t,e={}){let n=e?e.rowNodes:void 0;t.frameworkOverrides.wrapIncoming(()=>t.rowRenderer.redrawRows(n))}function Q$t(t,e,n,i,r){t.expansionService.setRowNodeExpanded(e,n,i,r)}function J$t(t,e){return t.rowModel.getRowNode(e)}function eKt(t,e,n,i){t.rowRenderer.addRenderedRowListener(e,n,i)}function tKt(t){return t.rowRenderer.getRenderedNodes()}function iKt(t,e,n){t.rowModel.forEachNode(e,n)}function nKt(t){return gWe(t)}function gWe(t){return t.rowRenderer.getFirstVirtualRenderedRow()}function rKt(t){return vWe(t)}function vWe(t){return t.rowRenderer.getLastVirtualRenderedRow()}function sKt(t,e){return t.rowModel.getRow(e)}function oKt(t){return t.rowModel.getRowCount()}function aKt(t){return t.rowModel}function lKt(t,e){if(!e.nodes.every(a=>a.rowPinned?(wt("cannot select pinned rows"),!1):a.id===void 0?(wt("cannot select node until id for node is known"),!1):!0))return;let{nodes:i,source:r,newValue:s}=e,o=i;t.selectionService.setNodesSelected({nodes:o,source:r??"api",newValue:s})}function cKt(t,e="apiSelectAll"){t.selectionService.selectAllRowNodes({source:e})}function dKt(t,e="apiSelectAll"){t.selectionService.deselectAllRowNodes({source:e})}function uKt(t,e="apiSelectAllFiltered"){t.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}function hKt(t,e="apiSelectAllFiltered"){t.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}function pKt(t,e="apiSelectAllCurrentPage"){t.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}function mKt(t,e="apiSelectAllCurrentPage"){t.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}function fKt(t){return t.selectionService.getSelectedNodes()}function gKt(t){return t.selectionService.getSelectedRows()}function vKt(t){t.sortController.onSortChanged("api")}function EKt(t){return t.stateService?.getState()??{}}function AKt(t){return t.rowModel.isLastRowIndexKnown()}function PKt(t){return t.paginationService?.getPageSize()??100}function RKt(t){return t.paginationService?.getCurrentPage()??0}function FKt(t){return t.paginationService?.getTotalPages()??1}function LKt(t){return t.paginationService?t.paginationService.getMasterRowCount():t.rowModel.getRowCount()}function OKt(t){t.paginationService?.goToNextPage()}function NKt(t){t.paginationService?.goToPreviousPage()}function VKt(t){t.paginationService?.goToFirstPage()}function BKt(t){t.paginationService?.goToLastPage()}function zKt(t,e){t.paginationService?.goToPage(e)}function f4e(t,e,n){t.addManagedElementListeners(e,{keydown:i=>{if(!i.defaultPrevented&&i.key===It.TAB){let r=i.shiftKey;n.findNextFocusableElement(e,!1,r)||n.focusNextGridCoreContainer(r)&&i.preventDefault()}}})}function XKt(t,e,n){let i=ZKt[t];if(i){let{version:s,new:o,old:a,message:l}=i,c=a??t;return(...d)=>{let u=o?`Please use ${o} instead. `:"";return wt(`Since ${s} api.${c} is deprecated. ${u}${l??""}`),e.apply(e,d)}}let r=qKt[t];return r?(...s)=>{let o=n.rowModel.getType();if(!r.includes(o)){Do(`api.${t} can only be called when gridOptions.rowModelType is ${r.join(" or ")}`);return}return e.apply(e,s)}:e}function CWe(t,e){let n=dYt.get(t);return n?n(e):e}function uYt(t){let e={};return Object.entries(t).forEach(([n,i])=>{let r=CWe(n,i);e[n]=r}),e}function XZ(t,e,n){if(!e)return Do("No gridOptions provided to createGrid"),{};let i=new LYt().create(t,e,r=>{let s=new pjt(t);r.createBean(s)},void 0,n);if(!Object.isFrozen(e)&&!n?.frameworkOverrides){let r="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(e,"api",{get:()=>{Do(`gridOptions.api is no longer supported. See ${r}.`)},configurable:!0})}return i}function OYt(t){t.expansionService.expandAll(!0)}function NYt(t){t.expansionService.expandAll(!1)}function VYt(t){let e=t.rowModelHelperService?.getClientSideRowModel(),n=t.rowModelHelperService?.getServerSideRowModel();e?e.onRowHeightChanged():n&&n.onRowHeightChanged()}function BYt(t,e,n){let i=t.rowModelHelperService?.getServerSideRowModel();if(i){if(t.funcColsService.isRowGroupEmpty()){i.setRowCount(e,n);return}Do("setRowCount cannot be used while using row grouping.");return}let r=t.rowModelHelperService?.getInfiniteRowModel();if(r){r.setRowCount(e,n);return}}function zYt(t){return t.rowNodeBlockLoader?.getBlockState()??{}}function iz(t,e){if(!t)return!1;let n=(o,a)=>{let l=e[o.id],c=e[a.id],d=l!==void 0,u=c!==void 0,m=d&&u,f=!d&&!u;return m?l-c:f?o.__objectId-a.__objectId:d?1:-1},i,r,s=!1;for(let o=0;o<t.length-1;o++)if(i=t[o],r=t[o+1],n(i,r)>0){s=!0;break}return s?(t.sort(n),!0):!1}function UYt(t){t.expansionService.onGroupExpandedOrCollapsed()}function jYt(t,e){t.rowModelHelperService?.getClientSideRowModel()?.refreshModel(e)}function $Yt(t,e){t.rowModelHelperService?.getClientSideRowModel()?.forEachLeafNode(e)}function KYt(t,e){t.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilter(e)}function YYt(t,e){t.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilterAndSort(e)}function qYt(t){if(t.columnModel.isAutoRowHeightActive()){wt("calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}t.rowModelHelperService?.getClientSideRowModel()?.resetRowHeights()}function ZYt(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.rowModelHelperService?.getClientSideRowModel()?.updateRowData(e))}function XYt(t,e,n){t.frameworkOverrides.wrapIncoming(()=>t.rowModelHelperService?.getClientSideRowModel()?.batchUpdateRowData(e,n))}function QYt(t){t.frameworkOverrides.wrapIncoming(()=>t.rowModelHelperService?.getClientSideRowModel()?.flushAsyncTransactions())}function JYt(t){return t.selectionService.getBestCostNodeSelection()}function lqt(t,e){return t.csvCreator?.getDataAsCsv(e)}function cqt(t,e){t.csvCreator?.exportDataAsCsv(e)}function GHe(t,e,n){if(!e&&e!==""&&e!==0)return"";let i=e;return typeof e=="boolean"&&n&&(i=n(e)),` ${t}="${i}"`}function m2(t,e){let n="";for(let i=0;i<e;i++)n+=String.fromCharCode(t&255),t>>>=8;return n}function Sqt(t){t.rowModelHelperService?.getInfiniteRowModel()?.refreshCache()}function Tqt(t){t.rowModelHelperService?.getInfiniteRowModel()?.purgeCache()}function Dqt(t){return t.rowModelHelperService?.getInfiniteRowModel()?.getRowCount()}function Eqt(t){return t.rowModelHelperService?.getInfiniteRowModel()?.isLastRowIndexKnown()}var y5,YHe,pBt,i3e,qHe,Ot,R3e,F3e,vBt,yBt,XHe,VZ,CA,_Bt,vHe,n3e,r3e,bBt,Xv,wBt,SBt,EBt,MBt,kBt,bHe,IBt,ABt,PBt,OBt,NBt,VBt,eGe,tGe,BBt,iGe,zBt,HBt,GBt,f2,zB,Yv,HB,WBt,o3e,xZ,a3e,l3e,c3e,d3e,x3e,b3e,bZ,nzt,mGe,c1,czt,dzt,wHe,uzt,hzt,W1,pzt,Bt,ai,bGe,mzt,Zv,fzt,$3e,K3e,gzt,T3e,vzt,wr,yzt,Sa,_zt,Czt,xzt,bzt,It,ZB,SGe,lx,b5,d1,wzt,Szt,Tzt,TGe,Dzt,Ezt,w5,Mzt,Azt,io,Pzt,Rzt,Fzt,SHe,Lzt,Ozt,Nzt,THe,Vzt,Bzt,zzt,Y3e,Hzt,Gzt,Wzt,Uzt,jzt,$zt,Kzt,Yzt,DGe,qzt,Zzt,_D,MGe,u1,Xzt,Qzt,XB,Jzt,eHt,GB,kGe,tHt,iHt,nHt,rHt,Pp,sHt,CD,IGe,w7,oHt,xD,aHt,Ky,PGe,EA,lHt,cHt,QB,np,hx,RGe,FGe,LGe,dHt,uHt,hHt,pHt,mHt,fHt,yg,xf,JB,bD,OGe,Z3e,NGe,_Ht,VGe,BGe,CHt,u3e,WGe,UGe,jGe,DHe,EHe,bHt,X3e,wHt,SHt,DHt,EHt,KZ,Q3e,MHt,ta,VHt,HHt,qGe,GHt,WHt,ZGe,XGe,UHt,jHt,$Ht,ZHt,ez,XHt,e6,QHt,e4e,YZ,t4e,JHt,eGt,QGe,tGt,iGt,nGt,i4e,rGt,sGt,oGt,aGt,lGt,cGt,n4e,dGt,fGt,gGt,vGt,yGt,_Gt,CGt,xGt,bGt,wGt,h3e,SGt,TGt,DGt,EGt,p3e,MGt,kGt,o4e,IGt,AGt,eWe,PGt,RGt,tWe,FGt,LGt,M3e,OGt,NGt,VGt,a4e,BGt,zGt,HGt,GGt,WGt,px,S5,AB,UGt,jGt,$Gt,KGt,YGt,qGt,ZGt,XGt,QGt,JGt,eWt,tWt,iWt,nWt,rWt,sWt,oWt,aWt,lWt,cWt,dx,dWt,uWt,hD,hWt,pWt,mWt,wZ,SZ,TZ,DZ,EZ,fWt,gWt,vWt,yWt,_Wt,CWt,xWt,bWt,iWe,nWe,wWt,SWt,TWt,rWe,DWt,EWt,MWt,kWt,IWt,PWt,RWt,FWt,LWt,OWt,NWt,MHe,sWe,VWt,BWt,zWt,HWt,GWt,WWt,UWt,l4e,jWt,$Wt,KWt,YWt,qWt,ZWt,qZ,XWt,aWe,QWt,JWt,c4e,lWe,eUt,tUt,iUt,nUt,rUt,FB,m3e,sUt,kHe,oUt,yUt,_Ut,mx,CUt,xUt,bUt,uWe,wUt,SUt,TUt,DUt,EUt,MUt,kUt,IUt,AUt,PUt,IHe,U1,d4e,RUt,u4e,FUt,LUt,qy,hWe,OUt,h4e,j1,NUt,VUt,BUt,zUt,p4e,HUt,fg,AHe,f3e,GUt,pWe,WUt,jUt,$Ut,KUt,YUt,qUt,ZUt,XUt,QUt,PHe,tjt,ijt,njt,rjt,sjt,RHe,FHe,LHe,ojt,ajt,OHe,ljt,cjt,djt,ujt,hjt,pjt,mjt,fjt,NHe,VHe,s$t,o$t,a$t,u$t,g$t,C$t,k$t,yKt,_Kt,CKt,xKt,bKt,wKt,SKt,m4e,TKt,DKt,MKt,yWe,kKt,IKt,HKt,GKt,WKt,UKt,jKt,$Kt,_We,KKt,YKt,T4,l3,pA,qKt,ZKt,QKt,S7,JKt,eYt,tYt,yA,iYt,nYt,rYt,sYt,oYt,aYt,lYt,ZZ,cYt,IZ,tz,dYt,hYt,pYt,mYt,fYt,gYt,vYt,yYt,_Yt,CYt,xYt,bYt,wYt,SYt,TYt,MA,bWe,DYt,BHe,EYt,MYt,kYt,IYt,AYt,PYt,RYt,zHe,FYt,LYt,QZ,g4e,v4e,wWe,nz,kA,HYt,g3e,GYt,WYt,eqt,tqt,iqt,nqt,rqt,y4e,SWe,sqt,_4e,C4e,x4e,JZ,HHe,oqt,aqt,E7,dqt,b4e,eX,uqt,rz,MZ,w4e,hqt,pqt,mqt,fqt,WHe,UHe,gqt,TWe,DWe,vqt,yqt,_qt,Tm,Cqt,xqt,bqt,wqt,S4e,EWe,Mqt,T4e,Xt=Q(()=>{y5=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(t){this.frameworkOverrides=t}getListeners(t,e,n){let i=e?this.allAsyncListeners:this.allSyncListeners,r=i.get(t);return!r&&n&&(r=new Set,i.set(t,r)),r}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(t,e,n=!1){this.getListeners(t,n,!0).add(e)}removeEventListener(t,e,n=!1){let i=this.getListeners(t,n,!1);i&&(i.delete(e),i.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(t))}addGlobalListener(t,e=!1){(e?this.globalAsyncListeners:this.globalSyncListeners).add(t)}removeGlobalListener(t,e=!1){(e?this.globalAsyncListeners:this.globalSyncListeners).delete(t)}dispatchEvent(t){let e=t;this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(t){this.firedEvents[t.type]||this.dispatchEvent(t)}dispatchToListeners(t,e){let n=t.type;if(e&&"event"in t){let a=t.event;a instanceof Event&&(t.eventPath=a.composedPath())}let i=(a,l)=>a.forEach(c=>{if(!l.has(c))return;let d=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>c(t)):()=>c(t);e?this.dispatchAsync(d):d()}),r=this.getListeners(n,e,!1)??new Set,s=new Set(r);s.size>0&&i(s,r),new Set(e?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{let l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(n,t)):()=>a(n,t);e?this.dispatchAsync(l):l()})}dispatchAsync(t){if(this.asyncFunctionsQueue.push(t),!this.scheduled){let e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],t.forEach(e=>e())}};YHe="__ag_Grid_Stop_Propagation",pBt=["touchstart","touchend","touchmove","touchcancel","scroll"],i3e={};qHe=(()=>{let t={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof i3e[n]=="boolean")return i3e[n];let i=document.createElement(t[n]||"div");return n="on"+n,i3e[n]=n in i}})();Ot=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(t){this.gridId=t.context.getGridId(),this.frameworkOverrides=t.frameworkOverrides,this.stubContext=t.context,this.eventService=t.eventService,this.gos=t.gos,this.localeService=t.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let t=0;t<this.destroyFunctions.length;t++)this.destroyFunctions[t]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(t,e){this.localEventService||(this.localEventService=new y5),this.localEventService.addEventListener(t,e)}removeEventListener(t,e){this.localEventService&&this.localEventService.removeEventListener(t,e)}dispatchLocalEvent(t){this.localEventService&&this.localEventService.dispatchEvent(t)}addManagedElementListeners(t,e){return this._setupListeners(t,e)}addManagedEventListeners(t){return this._setupListeners(this.eventService,t)}addManagedListeners(t,e){return this._setupListeners(t,e)}_setupListeners(t,e){let n=[];for(let i in e){let r=e[i];r&&n.push(this._setupListener(t,i,r))}return n}_setupListener(t,e,n){if(this.destroyed)return()=>null;t instanceof HTMLElement?gBt(this.getFrameworkOverrides(),t,e,n):t.addEventListener(e,n);let i=()=>(t.removeEventListener(e,n),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}setupGridOptionListener(t,e){this.gos.addPropertyEventListener(t,e);let n=()=>(this.gos.removePropertyEventListener(t,e),null);return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==n),null)}addManagedPropertyListener(t,e){return this.destroyed?()=>null:this.setupGridOptionListener(t,e)}addManagedPropertyListeners(t,e){if(this.destroyed)return;let n=t.join("-")+this.propertyListenerId++,i=r=>{if(r.changeSet){if(r.changeSet&&r.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=r.changeSet.id}let s={type:"gridPropertyChanged",changeSet:r.changeSet,source:r.source};e(s)};t.forEach(r=>this.setupGridOptionListener(r,i))}addDestroyFunc(t){this.isAlive()?this.destroyFunctions.push(t):t()}createManagedBean(t,e){let n=this.createBean(t,e);return this.addDestroyFunc(this.destroyBean.bind(this,t,e)),n}createBean(t,e,n){return(e||this.stubContext).createBean(t,n)}destroyBean(t,e){return(e||this.stubContext).destroyBean(t)}destroyBeans(t,e){return(e||this.stubContext).destroyBeans(t)}},R3e=class{constructor(t){this.frameworkOverrides=t,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(t){let e=t;return this.frameworkOverrides.shouldWrapOutgoing&&(e=n=>{this.frameworkOverrides.wrapOutgoing(()=>t(n))},this.wrappedListeners.set(t,e)),e}wrapGlobal(t){let e=t;return this.frameworkOverrides.shouldWrapOutgoing&&(e=(n,i)=>{this.frameworkOverrides.wrapOutgoing(()=>t(n,i))},this.wrappedGlobalListeners.set(t,e)),e}unwrap(t){return this.wrappedListeners.get(t)??t}unwrapGlobal(t){return this.wrappedGlobalListeners.get(t)??t}};F3e=new Set(["__proto__","constructor","prototype"]);vBt={resizable:!0,sortable:!0},yBt=0;XHe=20,VZ=class extends Ot{constructor(t,e,n,i){super(),this.isColumn=!0,this.instanceId=ZHe(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new y5,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=e,this.colId=n,this.primary=i,this.setState(t)}wireBeans(t){this.columnHoverService=t.columnHoverService}getInstanceId(){return this.instanceId}setState(t){t.sort!==void 0?(t.sort==="asc"||t.sort==="desc")&&(this.sort=t.sort):(t.initialSort==="asc"||t.initialSort==="desc")&&(this.sort=t.initialSort);let e=t.sortIndex,n=t.initialSortIndex;e!==void 0?e!==null&&(this.sortIndex=e):n!==null&&(this.sortIndex=n);let i=t.hide,r=t.initialHide;i!==void 0?this.visible=!i:this.visible=!r,t.pinned!==void 0?this.setPinned(t.pinned):this.setPinned(t.initialPinned);let s=t.flex,o=t.initialFlex;s!==void 0?this.flex=s:o!==void 0&&(this.flex=o)}setColDef(t,e,n){this.colDef=t,this.userProvidedColDef=e,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.columnEventService.dispatchEvent(this.createColumnEvent("colDefChanged",n))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(t){this.parent=t}getParent(){return this.parent}setOriginalParent(t){this.originalParent=t}getOriginalParent(){return this.originalParent}postConstruct(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){let t=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=Di(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!t,this.tooltipFieldContainsDots=Di(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t}initMinAndMaxWidths(){let t=this.colDef;this.minWidth=t.minWidth??XHe,this.maxWidth=t.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=Di(this.colDef.tooltipField)||Di(this.colDef.tooltipValueGetter)||Di(this.colDef.tooltipComponent)}resetActualWidth(t){let e=this.calculateColInitialWidth(this.colDef);this.setActualWidth(e,t,!0)}calculateColInitialWidth(t){let e,n=uD(t.width),i=uD(t.initialWidth);return n!=null?e=n:i!=null?e=i:e=200,Math.max(Math.min(e,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(t){if(Ls(this.colDef)||Ls(this.colDef.showRowGroup))return!1;let e=this.colDef.showRowGroup===!0,n=this.colDef.showRowGroup===t;return e||n}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}addEventListener(t,e){this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new R3e(this.frameworkOverrides));let n=this.frameworkEventListenerService?.wrap(e)??e;this.columnEventService.addEventListener(t,n)}removeEventListener(t,e){let n=this.frameworkEventListenerService?.unwrap(e)??e;this.columnEventService.removeEventListener(t,n)}createColumnFunctionCallbackParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,column:this,colDef:this.colDef})}isSuppressNavigable(t){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){let e=this.createColumnFunctionCallbackParams(t),n=this.colDef.suppressNavigable;return n(e)}return!1}isCellEditable(t){if(t.group){if(this.gos.get("treeData")){if(!t.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(t,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(t){return this.isColumnFunc(t,this.colDef.rowDrag)}isDndSource(t){return this.isColumnFunc(t,this.colDef.dndSource)}isCellCheckboxSelection(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)}isSuppressPaste(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(t){return this.colDef[t]??vBt[t]}isColumnFunc(t,e){if(typeof e=="boolean")return e;if(typeof e=="function"){let n=this.createColumnFunctionCallbackParams(t);return e(n)}return!1}setMoving(t,e){this.moving=t,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",e))}createColumnEvent(t,e){return this.gos.addGridCommonParams({type:t,column:this,columns:[this],source:e})}isMoving(){return this.moving}getSort(){return this.sort}setSort(t,e){this.sort!==t&&(this.sort=t,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",e))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Ls(this.sort)}isSorting(){return Di(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(t,e){this.menuVisible!==t&&(this.menuVisible=t,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",e)))}isMenuVisible(){return this.menuVisible}setAggFunc(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(t,e){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",e)))}isFilterActive(){return this.filterActive}setFilterActive(t,e,n){this.filterActive!==t&&(this.filterActive=t,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",e)));let i=this.createColumnEvent("filterChanged",e);n&&im(i,n),this.columnEventService.dispatchEvent(i)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(t){t===!0||t==="left"?this.pinned="left":t==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(t,e){this.firstRightPinned!==t&&(this.firstRightPinned=t,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",e)))}setLastLeftPinned(t,e){this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",e)))}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(t,e){let n=t===!0;this.visible!==n&&(this.visible=n,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",e))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){let t=this.getColDef();return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight}getColumnGroupPaddingInfo(){let t=this.getParent();if(!t||!t.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let e=t.getPaddingLevel()+1,n=!0;for(;t;){if(!t.isPadding()){n=!1;break}t=t.getParent()}return{numberOfParents:e,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(t){let e=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,e}createBaseColDefParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,colDef:this.colDef,column:this})}getColSpan(t){if(Ls(this.colDef.colSpan))return 1;let e=this.createBaseColDefParams(t),n=this.colDef.colSpan(e);return Math.max(n,1)}getRowSpan(t){if(Ls(this.colDef.rowSpan))return 1;let e=this.createBaseColDefParams(t),n=this.colDef.rowSpan(e);return Math.max(n,1)}setActualWidth(t,e,n=!1){t=Math.max(t,this.minWidth),t=Math.min(t,this.maxWidth),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&e!=="flex"&&e!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(e)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(t){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",t))}isGreaterThanMax(t){return t>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex")}setMinimum(t){this.setActualWidth(this.minWidth,t)}setRowGroupActive(t,e){this.rowGroupActive!==t&&(this.rowGroupActive=t,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",e))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(t,e){this.pivotActive!==t&&(this.pivotActive=t,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",e))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(t,e){this.aggregationActive!==t&&(this.aggregationActive=t,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",e)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(t){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:t})}};CA=class extends Ot{constructor(t,e,n,i){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=ZHe(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=e,this.expanded=!!t&&!!t.openByDefault,this.padding=n,this.level=i}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(t,e){this.colGroupDef=t,this.level=e,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(t){this.originalParent=t}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(t=>t.isVisible()):!1}isPadding(){return this.padding}setExpanded(t){this.expanded=t===void 0?!1:t,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(t){this.children=t}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){let t=[];return this.addLeafColumns(t),t}addLeafColumns(t){this.children&&this.children.forEach(e=>{f5(e)?t.push(e):Md(e)&&e.addLeafColumns(t)})}getColumnGroupShow(){let t=this.colGroupDef;if(t)return t.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(e=>e.addEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(e=>e.removeEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let t=!1,e=!1,n=!1,i=this.findChildrenRemovingPadding();for(let s=0,o=i.length;s<o;s++){let a=i[s];if(!a.isVisible())continue;let l=a.getColumnGroupShow();l==="open"?(t=!0,n=!0):l==="closed"?(e=!0,n=!0):(t=!0,e=!0)}let r=t&&e&&n;this.expandable!==r&&(this.expandable=r,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){let t=[],e=n=>{n.forEach(i=>{Md(i)&&i.isPadding()?e(i.children):t.push(i)})};return e(this.children),t}onColumnVisibilityChanged(){this.setExpandable()}},_Bt={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},vHe={};n3e=[],r3e=!1;bBt=class{constructor(){this.existingKeys={}}addExistingKeys(t){for(let e=0;e<t.length;e++)this.existingKeys[t[e]]=!0}getUniqueKey(t,e){t=G1(t);let n=0;for(;;){let i;if(t?(i=t,n!==0&&(i+="_"+n)):e?(i=e,n!==0&&(i+="_"+n)):i=n,!this.existingKeys[i])return this.existingKeys[i]=!0,String(i);n++}}},Xv="ag-Grid-AutoColumn";wBt=class extends Ot{constructor(){super(...arguments),this.beanName="columnFactory"}wireBeans(t){this.dataTypeService=t.dataTypeService}createColumnTree(t,e,n,i){let r=new bBt,{existingCols:s,existingGroups:o,existingColKeys:a}=this.extractExistingTreeData(n);r.addExistingKeys(a);let l=this.recursivelyCreateColumns(t,0,e,s,r,o,i),c=this.findMaxDept(l,0),d=this.balanceColumnTree(l,0,c,r);return ux(null,d,(m,f)=>{Md(m)&&m.setupExpandable(),m.setOriginalParent(f)}),{columnTree:d,treeDept:c}}extractExistingTreeData(t){let e=[],n=[],i=[];return t&&ux(null,t,r=>{if(Md(r)){let s=r;n.push(s)}else{let s=r;i.push(s.getId()),e.push(s)}}),{existingCols:e,existingGroups:n,existingColKeys:i}}createForAutoGroups(t,e){let n=[],i=this.findDepth(e);return t.forEach(r=>{let s=r;for(let o=i-1;o>=0;o--){let a=new CA(null,`FAKE_PATH_${r.getId()}}_${o}`,!0,o);this.createBean(a),a.setChildren([s]),s.setOriginalParent(a),s=a}i===0&&r.setOriginalParent(null),n.push(s)}),[n,i]}findDepth(t){let e=0,n=t;for(;n&&n[0]&&Md(n[0]);)e++,n=n[0].getChildren();return e}balanceColumnTree(t,e,n,i){let r=[];for(let s=0;s<t.length;s++){let o=t[s];if(Md(o)){let a=o,l=this.balanceColumnTree(a.getChildren(),e+1,n,i);a.setChildren(l),r.push(a)}else{let a,l;for(let c=n-1;c>=e;c--){let d=i.getUniqueKey(null,null),u=this.createMergedColGroupDef(null),m=new CA(u,d,!0,e);this.createBean(m),l&&l.setChildren([m]),l=m,a||(a=l)}if(a&&l)if(r.push(a),t.some(d=>Md(d))){l.setChildren([o]);continue}else{l.setChildren(t);break}r.push(o)}}return r}findMaxDept(t,e){let n=e;for(let i=0;i<t.length;i++){let r=t[i];if(Md(r)){let s=r,o=this.findMaxDept(s.getChildren(),e+1);n<o&&(n=o)}}return n}recursivelyCreateColumns(t,e,n,i,r,s,o){if(!t)return[];let a=new Array(t.length);for(let l=0;l<a.length;l++){let c=t[l];this.isColumnGroup(c)?a[l]=this.createColumnGroup(n,c,e,i,r,s,o):a[l]=this.createColumn(n,c,i,r,o)}return a}createColumnGroup(t,e,n,i,r,s,o){let a=this.createMergedColGroupDef(e),l=r.getUniqueKey(a.groupId||null,null),c=new CA(a,l,!1,n);this.createBean(c);let d=this.findExistingGroup(e,s);d&&s.splice(d.idx,1);let u=d?.group;u&&c.setExpanded(u.isExpanded());let m=this.recursivelyCreateColumns(a.children,n+1,t,i,r,s,o);return c.setChildren(m),c}createMergedColGroupDef(t){let e={};return Object.assign(e,this.gos.get("defaultColGroupDef")),Object.assign(e,t),e}createColumn(t,e,n,i,r){let s=this.findExistingColumn(e,n);s&&n?.splice(s.idx,1);let o=s?.column;if(o){let a=this.addColumnDefaultAndTypes(e,o.getColId());o.setColDef(a,e,r),this.applyColumnState(o,a,r)}else{let a=i.getUniqueKey(e.colId,e.field),l=this.addColumnDefaultAndTypes(e,a);o=new VZ(l,e,a,t),this.createBean(o)}return this.dataTypeService?.addColumnListeners(o),o}applyColumnState(t,e,n){let i=uD(e.flex);if(i!==void 0&&t.setFlex(i),t.getFlex()<=0){let a=uD(e.width);if(a!=null)t.setActualWidth(a,n);else{let l=t.getActualWidth();t.setActualWidth(l,n)}}e.sort!==void 0&&(e.sort=="asc"||e.sort=="desc"?t.setSort(e.sort,n):t.setSort(void 0,n));let s=uD(e.sortIndex);s!==void 0&&t.setSortIndex(s);let o=v3e(e.hide);o!==void 0&&t.setVisible(!o,n),e.pinned!==void 0&&t.setPinned(e.pinned)}findExistingColumn(t,e){if(e)for(let n=0;n<e.length;n++){let i=e[n].getUserProvidedColDef();if(!i)continue;if(t.colId!=null){if(e[n].getId()===t.colId)return{idx:n,column:e[n]};continue}if(t.field!=null){if(i.field===t.field)return{idx:n,column:e[n]};continue}if(i===t)return{idx:n,column:e[n]}}}findExistingGroup(t,e){if(t.groupId!=null)for(let i=0;i<e.length;i++){let r=e[i];if(r.getColGroupDef()&&r.getId()===t.groupId)return{idx:i,group:r}}}addColumnDefaultAndTypes(t,e){let n={},i=this.gos.get("defaultColDef");im(n,i,!1,!0);let r=this.updateColDefAndGetColumnType(n,t,e);r&&this.assignColumnTypes(r,n),im(n,t,!1,!0);let s=this.gos.get("autoGroupColumnDef"),o=this.gos.isColumnsSortingCoupledToGroup();return t.rowGroup&&s&&o&&im(n,{sort:s.sort,initialSort:s.initialSort},!1,!0),this.dataTypeService?.validateColDef(n),n}updateColDefAndGetColumnType(t,e,n){let i=this.dataTypeService?.updateColDefAndGetColumnType(t,e,n),r=e.type??i??t.type;return t.type=r,r?kZ(r):void 0}assignColumnTypes(t,e){if(!t.length)return;let n=Object.assign({},_Bt),i=this.gos.get("columnTypes")||{};Rh(i,(r,s)=>{r in n?wt(`the column type '${r}' is a default column type and cannot be overridden.`):(s.type&&wt("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),n[r]=s)}),t.forEach(r=>{let s=n[r.trim()];s?im(e,s,!1,!0):wt("colDef.type '"+r+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(t){return t.children!==void 0}};SBt=class extends Ot{constructor(){super(...arguments),this.beanName="columnModel",this.pivotMode=!1,this.autoHeightActiveAtLeastOnce=!1,this.ready=!1,this.changeEventsDispatching=!1,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}wireBeans(t){this.context=t.context,this.ctrlsService=t.ctrlsService,this.columnFactory=t.columnFactory,this.columnSizeService=t.columnSizeService,this.visibleColsService=t.visibleColsService,this.columnViewportService=t.columnViewportService,this.pivotResultColsService=t.pivotResultColsService,this.columnAnimationService=t.columnAnimationService,this.autoColService=t.autoColService,this.valueCache=t.valueCache,this.columnDefFactory=t.columnDefFactory,this.columnApplyStateService=t.columnApplyStateService,this.columnGroupStateService=t.columnGroupStateService,this.eventDispatcher=t.columnEventDispatcher,this.columnMoveService=t.columnMoveService,this.columnAutosizeService=t.columnAutosizeService,this.funcColsService=t.funcColsService,this.quickFilterService=t.quickFilterService,this.showRowGroupColsService=t.showRowGroupColsService,this.environment=t.environment}postConstruct(){let t=this.gos.get("pivotMode");this.isPivotSettingAllowed(t)&&(this.pivotMode=t),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.refreshAll(gA(e.source))),this.addManagedPropertyListener("autoGroupColumnDef",e=>this.onAutoGroupColumnDefChanged(gA(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],e=>this.recreateColumnDefs(gA(e.source))),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),gA(e.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(t,e){let n=t?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();let i=this.colDefCols?.list,r=this.colDefCols?.tree,s=this.columnFactory.createColumnTree(this.colDefs,!0,r,e);fA(this.context,this.colDefCols?.tree,s.columnTree);let o=s.columnTree,a=s.treeDept,l=V3e(o),c={};l.forEach(u=>c[u.getId()]=u),this.colDefCols={tree:o,treeDepth:a,list:l,map:c},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(),t&&!this.showingPivotResult&&!this.gos.get("maintainColumnOrder")&&this.orderColsLikeColDefCols(),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),n&&(this.changeEventsDispatching=!0,n(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(){if(!this.colDefCols)return;let t=this.cols?.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.restoreColOrder(),this.positionLockedCols(),this.showRowGroupColsService?.refresh(),this.quickFilterService?.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!Cf(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){let t=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=t!=null,t){let{map:e,list:n,tree:i,treeDepth:r}=t;this.cols={list:n.slice(),map:ve({},e),tree:i.slice(),treeDepth:r},t.list.some(o=>this.cols?.map[o.getColId()]!==void 0)||(this.lastPivotOrder=null)}else{let{map:e,list:n,tree:i,treeDepth:r}=this.colDefCols;this.cols={list:n.slice(),map:ve({},e),tree:i.slice(),treeDepth:r}}}getColsToShow(){let t=this.isPivotMode()&&!this.isShowingPivotResult(),e=this.funcColsService.getValueColumns();return this.cols.list.filter(i=>{let r=CHe(i);if(t){let s=e&&Sl(e,i);return r||s}else return r||i.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),TBt(this.cols))}createAutoCols(){let t=this.gos.isGroupUseEntireRow(this.pivotMode),e=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),n=this.funcColsService.getRowGroupColumns(),r=!(n.length>0||this.gos.get("treeData"))||e||t,s=()=>{this.autoCols&&(fA(this.context,this.autoCols.tree),this.autoCols=null)};if(r||!this.autoColService){s();return}let o=this.autoColService.createAutoCols(n)??[],a=DBt(o,this.autoCols?.list||null),l=this.cols.treeDepth,d=(this.autoCols?this.autoCols.treeDepth:-1)==l;if(a&&d)return;s();let[u,m]=this.columnFactory.createForAutoGroups(o,this.cols?.tree);this.autoCols={list:o,tree:u,treeDepth:m,map:{}};let f=_=>{if(!_)return null;let x=_.filter(D=>!CHe(D));return[...o,...x]};this.lastOrder=f(this.lastOrder),this.lastPivotOrder=f(this.lastPivotOrder)}refreshAll(t){this.isReady()&&(this.refreshCols(),this.visibleColsService.refresh(t))}setColsVisible(t,e=!1,n){this.columnApplyStateService.applyColumnState({state:t.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!e}))},n)}setColsPinned(t,e,n){if(!this.cols||Gd(t))return;if(this.gos.isDomLayout("print")){wt("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let i;e===!0||e==="left"?i="left":e==="right"?i="right":i=null;let r=[];t.forEach(s=>{if(!s)return;let o=this.getCol(s);o&&o.getPinned()!==i&&(o.setPinned(i),r.push(o))}),r.length&&(this.visibleColsService.refresh(n),this.eventDispatcher.columnPinned(r,n)),this.columnAnimationService.finish()}setColumnGroupOpened(t,e,n){let i;Md(t)?i=t.getId():i=t||"",this.columnGroupStateService.setColumnGroupState([{groupId:i,open:e}],n)}getProvidedColGroup(t){let e=null;return ux(null,this.cols?.tree,n=>{Md(n)&&n.getId()===t&&(e=n)}),e}isColGroupLocked(t){let e=this.gos.get("groupLockGroupColumns");if(!t.isRowGroupActive()||e===0)return!1;if(e===-1)return!0;let i=this.funcColsService.getRowGroupColumns().findIndex(r=>r.getColId()===t.getColId());return e>i}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(t=>t.isVisible()&&t.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,this.gos.isRowModelType("clientSide")||this.gos.isRowModelType("serverSide")||wt("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){let t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;let e=new Map(t.map((l,c)=>[l,c]));if(!this.cols.list.some(l=>e.has(l)))return;let i=new Map(this.cols.list.map(l=>[l,!0])),r=t.filter(l=>i.has(l)),s=new Map(r.map(l=>[l,!0])),o=this.cols.list.filter(l=>!s.has(l)),a=r.slice();o.forEach(l=>{let c=l.getOriginalParent();if(!c){a.push(l);return}let d=[];for(;!d.length&&c;)c.getLeafColumns().forEach(_=>{let x=a.indexOf(_)>=0,D=d.indexOf(_)<0;x&&D&&d.push(_)}),c=c.getOriginalParent();if(!d.length){a.push(l);return}let u=d.map(f=>a.indexOf(f)),m=Math.max(...u);pD(a,l,m+1)}),this.cols.list=a}orderColsLikeColDefCols(){if(!this.colDefCols||!this.cols)return;let t=this.colDefCols.list.filter(n=>this.cols.list.indexOf(n)>=0),e=this.cols.list.filter(n=>t.indexOf(n)<0);this.cols.list=[...e,...t],this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}sortColsLikeKeys(t){if(this.cols==null)return;let e=[],n={};t.forEach(r=>{if(n[r])return;let s=this.cols.map[r];s&&(e.push(s),n[r]=!0)});let i=0;if(this.cols.list.forEach(r=>{let s=r.getColId();if(n[s]!=null)return;s.startsWith(Xv)?pD(e,r,i++):e.push(r)}),e=this.columnMoveService.placeLockedColumns(e),!this.columnMoveService.doesMovePassMarryChildren(e)){wt("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=e}sortColsLikeCols(t){!t||t.length<=1||t.filter(n=>this.cols.list.indexOf(n)<0).length>0||t.sort((n,i)=>{let r=this.cols.list.indexOf(n),s=this.cols.list.indexOf(i);return r-s})}resetColDefIntoCol(t,e){let n=t.getUserProvidedColDef();if(!n)return!1;let i=this.columnFactory.addColumnDefaultAndTypes(n,t.getColId());return t.setColDef(i,n,e),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(t=>t()),this.resizeOperationQueue=[]}pushResizeOperation(t){this.resizeOperationQueue.push(t)}moveInCols(t,e,n){KHe(this.cols?.list,t,e),this.visibleColsService.refresh(n)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list:this.lastOrder=this.cols?.list}getColumnDefs(){if(!this.colDefCols)return;let t=this.colDefCols.list.slice();this.showingPivotResult?t.sort((i,r)=>this.lastOrder.indexOf(i)-this.lastOrder.indexOf(r)):this.lastOrder&&t.sort((i,r)=>this.cols.list.indexOf(i)-this.cols.list.indexOf(r));let e=this.funcColsService.getRowGroupColumns(),n=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(t,e,n)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){return this.colDefCols?.treeDepth>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(t=>t.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(t,e){t===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=t,this.ready&&(this.refreshCols(),this.visibleColsService.refresh(e),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(t){return t&&this.gos.get("treeData")?(wt("Pivot mode not available with treeData."),!1):!0}isPivotActive(){let t=this.funcColsService.getPivotColumns();return this.pivotMode&&!Gd(t)}recreateColumnDefs(t){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,t),this.createColsFromColDefs(!0,t))}setColumnDefs(t,e){let n=!!this.colDefs;this.colDefs=t,this.createColsFromColDefs(n,e)}destroy(){fA(this.context,this.colDefCols?.tree),fA(this.context,this.autoCols?.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){return this.colDefCols?.list?this.colDefCols.list:null}getCols(){return this.cols?.list??[]}getAllCols(){let e=this.pivotResultColsService.getPivotResultCols()?.list;return[].concat(this.colDefCols?.list||[],this.autoCols?.list||[],e||[])}getColsForKeys(t){return t?t.map(n=>this.getCol(n)).filter(n=>n!=null):[]}getColDefCol(t){return this.colDefCols?.list?this.getColFromCollection(t,this.colDefCols):null}getCol(t){return t==null?null:this.getColFromCollection(t,this.cols)}getColFromCollection(t,e){if(e==null)return null;let{map:n,list:i}=e;if(typeof t=="string"&&n[t])return n[t];for(let r=0;r<i.length;r++)if(xHe(i[r],t))return i[r];return this.getAutoCol(t)}getAutoCol(t){return this.autoCols==null?null:this.autoCols.list.find(e=>xHe(e,t))||null}getAutoCols(){return this.autoCols?.list||null}setColHeaderHeight(t,e){t.setAutoHeaderHeight(e)&&(t.isColumn?this.eventDispatcher.headerHeight(t):this.eventDispatcher.groupHeaderHeight(t))}getGroupRowsHeight(){let t=[],e=this.ctrlsService.getHeaderRowContainerCtrls();for(let n of e){if(!n)continue;let i=n.getGroupRowCount()||0;for(let r=0;r<i;r++){let s=n.getGroupRowCtrlAtIndex(r),o=t[r];if(s){let a=this.getColumnGroupHeaderRowHeight(s);(o==null||a>o)&&(t[r]=a)}}}return t}getColumnGroupHeaderRowHeight(t){let e=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight(),n=0,i=t.getHeaderCtrls();for(let r of i){let s=r.getColumn();if(s.isAutoHeaderHeight()){let o=s.getAutoHeaderHeight();o!=null&&o>n&&(n=o)}}return Math.max(e,n)}getColumnHeaderRowHeight(){let t=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),n=this.visibleColsService.getAllCols().filter(i=>i.isAutoHeaderHeight()).map(i=>i.getAutoHeaderHeight()||0);return Math.max(t,...n)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){let t=this.gos.get("autoSizeStrategy");if(t?.type!=="fitCellContents")return;let{colIds:e,skipHeader:n}=t;setTimeout(()=>{e?this.columnAutosizeService.autoSizeCols({colKeys:e,skipHeader:n,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",n)})}onAutoGroupColumnDefChanged(t){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,t)}};EBt=class extends Ot{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(t){this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.animationFrameService=t.animationFrameService,this.autoWidthCalculator=t.autoWidthCalculator,this.eventDispatcher=t.columnEventDispatcher,this.ctrlsService=t.ctrlsService,this.renderStatusService=t.renderStatusService}autoSizeCols(t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(t));return}let{colKeys:e,skipHeader:n,skipHeaderGroups:i,stopAtGroup:r,source:s="api"}=t;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(t));return}this.timesDelayed=0;let o=[],a=-1,l=n??this.gos.get("skipHeaderOnAutoSize"),c=i??l;for(;a!==0;){a=0;let d=[];e.forEach(u=>{if(!u)return;let m=this.columnModel.getCol(u);if(!m||o.indexOf(m)>=0)return;let f=this.autoWidthCalculator.getPreferredWidthForColumn(m,l);if(f>0){let _=this.normaliseColumnWidth(m,f);m.setActualWidth(_,s),o.push(m),a++}d.push(m)}),d.length&&this.visibleColsService.refresh(s)}c||this.autoSizeColumnGroupsByColumns(e,s,r),this.eventDispatcher.columnResized(o,!0,"autosizeColumns")}autoSizeColumn(t,e,n){t&&this.autoSizeCols({colKeys:[t],skipHeader:n,skipHeaderGroups:!0,source:e})}autoSizeColumnGroupsByColumns(t,e,n){let i=new Set;this.columnModel.getColsForKeys(t).forEach(a=>{let l=a.getParent();for(;l&&l!=n;)l.isPadding()||i.add(l),l=l.getParent()});let s,o=[];for(let a of i){for(let l of this.ctrlsService.getHeaderRowContainerCtrls())if(s=l.getHeaderCtrlForColumn(a),s)break;s&&s.resizeLeafColumnsToFit(e)}return o}autoSizeAllColumns(t,e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(t,e));return}let n=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:n,skipHeader:e,source:t})}normaliseColumnWidth(t,e){let n=t.getMinWidth();e<n&&(e=n);let i=t.getMaxWidth();return t.isGreaterThanMax(e)&&(e=i),e}},MBt=class extends Ot{constructor(){super(...arguments),this.beanName="funcColsService",this.rowGroupCols=[],this.valueCols=[],this.pivotCols=[]}wireBeans(t){this.columnModel=t.columnModel,this.eventDispatcher=t.columnEventDispatcher,this.aggFuncService=t.aggFuncService,this.visibleColsService=t.visibleColsService}getModifyColumnsNoEventsCallbacks(){return{addGroupCol:t=>this.rowGroupCols.push(t),removeGroupCol:t=>Ip(this.rowGroupCols,t),addPivotCol:t=>this.pivotCols.push(t),removePivotCol:t=>Ip(this.pivotCols,t),addValueCol:t=>this.valueCols.push(t),removeValueCol:t=>Ip(this.valueCols,t)}}getSourceColumnsForGroupColumn(t){let e=t.getColDef().showRowGroup;if(!e)return null;if(e===!0)return this.rowGroupCols.slice(0);let n=this.columnModel.getColDefCol(e);return n?[n]:null}sortRowGroupColumns(t){this.rowGroupCols.sort(t)}sortPivotColumns(t){this.pivotCols.sort(t)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Gd(this.rowGroupCols)}setColumnAggFunc(t,e,n){if(!t)return;let i=this.columnModel.getColDefCol(t);i&&(i.setAggFunc(e),this.eventDispatcher.columnChanged("columnValueChanged",[i],n))}setRowGroupColumns(t,e){this.setColList(t,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(n,i)=>this.setRowGroupActive(n,i,e),e)}setRowGroupActive(t,e,n){t!==e.isRowGroupActive()&&(e.setRowGroupActive(t,n),t&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([e],!1,n),!t&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.columnModel.setColsVisible([e],!0,n))}addRowGroupColumns(t,e){this.updateColList(t,this.rowGroupCols,!0,!0,n=>this.setRowGroupActive(!0,n,e),"columnRowGroupChanged",e)}removeRowGroupColumns(t,e){this.updateColList(t,this.rowGroupCols,!1,!0,n=>this.setRowGroupActive(!1,n,e),"columnRowGroupChanged",e)}addPivotColumns(t,e){this.updateColList(t,this.pivotCols,!0,!1,n=>n.setPivotActive(!0,e),"columnPivotChanged",e)}setPivotColumns(t,e){this.setColList(t,this.pivotCols,"columnPivotChanged",!0,!1,(n,i)=>{i.setPivotActive(n,e)},e)}removePivotColumns(t,e){this.updateColList(t,this.pivotCols,!1,!1,n=>n.setPivotActive(!1,e),"columnPivotChanged",e)}setValueColumns(t,e){this.setColList(t,this.valueCols,"columnValueChanged",!1,!1,(n,i)=>this.setValueActive(n,i,e),e)}setValueActive(t,e,n){if(t!==e.isValueActive()&&(e.setValueActive(t,n),t&&!e.getAggFunc()&&this.aggFuncService)){let i=this.aggFuncService.getDefaultAggFunc(e);e.setAggFunc(i)}}addValueColumns(t,e){this.updateColList(t,this.valueCols,!0,!1,n=>this.setValueActive(!0,n,e),"columnValueChanged",e)}removeValueColumns(t,e){this.updateColList(t,this.valueCols,!1,!1,n=>this.setValueActive(!1,n,e),"columnValueChanged",e)}moveRowGroupColumn(t,e,n){if(this.isRowGroupEmpty())return;let i=this.rowGroupCols[t],r=this.rowGroupCols.slice(t,e);this.rowGroupCols.splice(t,1),this.rowGroupCols.splice(e,0,i),this.eventDispatcher.rowGroupChanged(r,n)}setColList(t,e,n,i,r,s,o){let a=this.columnModel.getCols();if(Gd(a))return;let l=new Map;e.forEach((d,u)=>l.set(d,u)),e.length=0,Di(t)&&t.forEach(d=>{let u=this.columnModel.getColDefCol(d);u&&e.push(u)}),e.forEach((d,u)=>{let m=l.get(d);if(m===void 0){l.set(d,0);return}i&&m!==u||l.delete(d)}),(this.columnModel.getColDefCols()||[]).forEach(d=>{let u=e.indexOf(d)>=0;s(u,d)}),r&&this.columnModel.refreshCols(),this.visibleColsService.refresh(o),this.eventDispatcher.columnChanged(n,[...l.keys()],o)}updateColList(t,e,n,i,r,s,o){if(!t||Gd(t))return;let a=!1,l=new Set;t.forEach(c=>{if(!c)return;let d=this.columnModel.getColDefCol(c);if(d){if(l.add(d),n){if(e.indexOf(d)>=0)return;e.push(d)}else{let u=e.indexOf(d);if(u<0)return;for(let m=u+1;m<e.length;m++)l.add(e[m]);Ip(e,d)}r(d),a=!0}}),a&&(i&&this.columnModel.refreshCols(),this.visibleColsService.refresh(o),this.eventDispatcher.genericColumnEvent(s,Array.from(l),o))}extractCols(t,e){this.extractRowGroupCols(t,e),this.extractPivotCols(t,e),this.extractValueCols(t,e)}extractValueCols(t,e){this.valueCols=this.extractColsCommon(e,this.valueCols,(n,i)=>n.setValueActive(i,t),()=>{},()=>{},n=>{let i=n.aggFunc;if(i===null||i==="")return null;if(i!==void 0)return!!i},n=>n.initialAggFunc!=null&&n.initialAggFunc!=""),this.valueCols.forEach(n=>{let i=n.getColDef();i.aggFunc!=null&&i.aggFunc!=""?n.setAggFunc(i.aggFunc):n.getAggFunc()||n.setAggFunc(i.initialAggFunc)})}extractRowGroupCols(t,e){this.rowGroupCols=this.extractColsCommon(e,this.rowGroupCols,(n,i)=>n.setRowGroupActive(i,t),n=>n.rowGroupIndex,n=>n.initialRowGroupIndex,n=>n.rowGroup,n=>n.initialRowGroup)}extractPivotCols(t,e){this.pivotCols=this.extractColsCommon(e,this.pivotCols,(n,i)=>n.setPivotActive(i,t),n=>n.pivotIndex,n=>n.initialPivotIndex,n=>n.pivot,n=>n.initialPivot)}extractColsCommon(t=[],e=[],n,i,r,s,o){let a=[],l=[];(this.columnModel.getColDefCols()||[]).forEach(m=>{let f=t.indexOf(m)<0,_=m.getColDef(),x=v3e(s(_)),D=v3e(o(_)),E=uD(i(_)),M=uD(r(_)),I;x!==void 0?I=x:E!==void 0?E===null?I=!1:I=E>=0:f?D!==void 0?I=D:M!==void 0?I=M!=null&&M>=0:I=!1:I=e.indexOf(m)>=0,I&&((f?E!=null||M!=null:E!=null)?a.push(m):l.push(m))});let d=m=>{let f=i(m.getColDef()),_=r(m.getColDef());return f??_};a.sort((m,f)=>{let _=d(m),x=d(f);return _===x?0:_<x?-1:1});let u=[].concat(a);return e.forEach(m=>{l.indexOf(m)>=0&&u.push(m)}),l.forEach(m=>{u.indexOf(m)<0&&u.push(m)}),e.forEach(m=>{u.indexOf(m)<0&&n(m,!1)}),u.forEach(m=>{e.indexOf(m)<0&&n(m,!0)}),u}generateColumnStateForRowGroupAndPivotIndexes(t,e){let n={},i=(r,s,o,a,l,c)=>{let d=this.columnModel.getColDefCols();if(!s.length||!d)return[];let u=Object.keys(r),m=new Set(u),f=new Set(u),_=new Set(s.map(A=>{let Y=A.getColId();return f.delete(Y),Y}).concat(u)),x=[],D={},E=0;for(let A=0;A<d.length;A++){let Y=d[A].getColId();_.has(Y)&&(x.push(Y),D[Y]=E++)}let M=1e3,I=!1,z=0,G=A=>{let Y=D[A];for(let X=z;X<Y;X++){let ne=x[X];f.has(ne)&&(r[ne][l]=M++,f.delete(ne))}z=Y};s.forEach(A=>{let Y=A.getColId();if(m.has(Y))G(Y),r[Y][l]=M++;else{let X=A.getColDef();(X[l]===null||X[l]===void 0&&X[c]==null)&&(I||(X[o]||X[o]===void 0&&X[a]?G(Y):(f.forEach(ce=>{r[ce][l]=M+D[ce]}),M+=x.length,I=!0)),n[Y]||(n[Y]={colId:Y}),n[Y][l]=M++)}})};return i(t,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),i(e,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(n)}},kBt=class extends Ot{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(t){this.columnModel=t.columnModel,this.eventDispatcher=t.columnEventDispatcher,this.sortController=t.sortController,this.columnGetStateService=t.columnGetStateService,this.funcColsService=t.funcColsService,this.visibleColsService=t.visibleColsService,this.columnAnimationService=t.columnAnimationService,this.pivotResultColsService=t.pivotResultColsService}applyColumnState(t,e){let n=this.columnModel.getColDefCols()||[];if(Gd(n))return!1;if(t&&t.state&&!t.state.forEach)return wt("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;let i=this.funcColsService.getModifyColumnsNoEventsCallbacks(),r=(a,l,c)=>{let d=this.compareColumnStatesAndDispatchEvents(e),u=l.slice(),m={},f={},_=[],x=[],D=0,E=this.funcColsService.getRowGroupColumns().slice(),M=this.funcColsService.getPivotColumns().slice();a.forEach(A=>{let Y=A.colId||"";if(Y.startsWith(Xv)){_.push(A),x.push(A);return}let ne=c(Y);ne?(this.syncColumnWithStateItem(ne,A,t.defaultState,m,f,!1,e,i),Ip(u,ne)):(x.push(A),D+=1)});let I=A=>this.syncColumnWithStateItem(A,null,t.defaultState,m,f,!1,e,i);u.forEach(I),this.funcColsService.sortRowGroupColumns(bHe.bind(this,m,E)),this.funcColsService.sortPivotColumns(bHe.bind(this,f,M)),this.columnModel.refreshCols();let G=(this.columnModel.getAutoCols()||[]).slice();return _.forEach(A=>{let Y=this.columnModel.getAutoCol(A.colId);Ip(G,Y),this.syncColumnWithStateItem(Y,A,t.defaultState,null,null,!0,e,i)}),G.forEach(I),this.orderLiveColsLikeState(t),this.visibleColsService.refresh(e),this.eventDispatcher.everythingChanged(e),d(),{unmatchedAndAutoStates:x,unmatchedCount:D}};this.columnAnimationService.start();let{unmatchedAndAutoStates:s,unmatchedCount:o}=r(t.state||[],n,a=>this.columnModel.getColDefCol(a));if(s.length>0||Di(t.defaultState)){let l=this.pivotResultColsService.getPivotResultCols()?.list;o=r(s,l||[],c=>this.pivotResultColsService.getPivotResultCol(c)).unmatchedCount}return this.columnAnimationService.finish(),o===0}resetColumnState(t){let e=this.columnModel.getColDefCols();if(Gd(e))return;let n=this.columnModel.getColDefColTree(),i=V3e(n),r=[],s=1e3,o=1e3,a=[],l=this.columnModel.getAutoCols();l&&(a=a.concat(l)),i&&(a=a.concat(i)),a.forEach(c=>{let d=this.getColumnStateFromColDef(c);Ls(d.rowGroupIndex)&&d.rowGroup&&(d.rowGroupIndex=s++),Ls(d.pivotIndex)&&d.pivot&&(d.pivotIndex=o++),r.push(d)}),this.applyColumnState({state:r,applyOrder:!0},t)}getColumnStateFromColDef(t){let e=(_,x)=>_??x??null,n=t.getColDef(),i=e(n.sort,n.initialSort),r=e(n.sortIndex,n.initialSortIndex),s=e(n.hide,n.initialHide),o=e(n.pinned,n.initialPinned),a=e(n.width,n.initialWidth),l=e(n.flex,n.initialFlex),c=e(n.rowGroupIndex,n.initialRowGroupIndex),d=e(n.rowGroup,n.initialRowGroup);c==null&&(d==null||d==!1)&&(c=null,d=null);let u=e(n.pivotIndex,n.initialPivotIndex),m=e(n.pivot,n.initialPivot);u==null&&(m==null||m==!1)&&(u=null,m=null);let f=e(n.aggFunc,n.initialAggFunc);return{colId:t.getColId(),sort:i,sortIndex:r,hide:s,pinned:o,width:a,flex:l,rowGroup:d,rowGroupIndex:c,pivot:m,pivotIndex:u,aggFunc:f}}syncColumnWithStateItem(t,e,n,i,r,s,o,a){if(!t)return;let l=(z,G)=>{let A={value1:void 0,value2:void 0},Y=!1;return e&&(e[z]!==void 0&&(A.value1=e[z],Y=!0),Di(G)&&e[G]!==void 0&&(A.value2=e[G],Y=!0)),!Y&&n&&(n[z]!==void 0&&(A.value1=n[z]),Di(G)&&n[G]!==void 0&&(A.value2=n[G])),A},c=l("hide").value1;c!==void 0&&t.setVisible(!c,o);let d=l("pinned").value1;d!==void 0&&t.setPinned(d);let u=t.getColDef().minWidth??XHe,m=l("flex").value1;if(m!==void 0&&t.setFlex(m),m==null){let z=l("width").value1;z!=null&&u!=null&&z>=u&&t.setActualWidth(z,o)}let f=l("sort").value1;f!==void 0&&(f==="desc"||f==="asc"?t.setSort(f,o):t.setSort(void 0,o));let _=l("sortIndex").value1;if(_!==void 0&&t.setSortIndex(_),s||!t.isPrimary())return;let x=l("aggFunc").value1;x!==void 0&&(typeof x=="string"?(t.setAggFunc(x),t.isValueActive()||(t.setValueActive(!0,o),a.addValueCol(t))):(Di(x)&&wt("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."),t.isValueActive()&&(t.setValueActive(!1,o),a.removeValueCol(t))));let{value1:D,value2:E}=l("rowGroup","rowGroupIndex");(D!==void 0||E!==void 0)&&(typeof E=="number"||D?(t.isRowGroupActive()||(t.setRowGroupActive(!0,o),a.addGroupCol(t)),i&&typeof E=="number"&&(i[t.getId()]=E)):t.isRowGroupActive()&&(t.setRowGroupActive(!1,o),a.removeGroupCol(t)));let{value1:M,value2:I}=l("pivot","pivotIndex");(M!==void 0||I!==void 0)&&(typeof I=="number"||M?(t.isPivotActive()||(t.setPivotActive(!0,o),a.addPivotCol(t)),r&&typeof I=="number"&&(r[t.getId()]=I)):t.isPivotActive()&&(t.setPivotActive(!1,o),a.removePivotCol(t)))}orderLiveColsLikeState(t){if(!t.applyOrder||!t.state)return;let e=[];t.state.forEach(n=>{n.colId!=null&&e.push(n.colId)}),this.columnModel.sortColsLikeKeys(e)}compareColumnStatesAndDispatchEvents(t){let e={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},n=this.columnGetStateService.getColumnState(),i={};return n.forEach(r=>{i[r.colId]=r}),()=>{let r=this.columnModel.getAllCols(),s=(x,D,E,M)=>{let I=D.map(M),z=E.map(M);if(Cf(I,z))return;let A=new Set(D);E.forEach(X=>{A.delete(X)||A.add(X)});let Y=[...A];this.eventService.dispatchEvent({type:x,columns:Y,column:Y.length===1?Y[0]:null,source:t})},o=x=>{let D=[];return r.forEach(E=>{let M=i[E.getColId()];M&&x(M,E)&&D.push(E)}),D},a=x=>x.getColId();s("columnRowGroupChanged",e.rowGroupColumns,this.funcColsService.getRowGroupColumns(),a),s("columnPivotChanged",e.pivotColumns,this.funcColsService.getPivotColumns(),a);let c=o((x,D)=>{let E=x.aggFunc!=null,M=E!=D.isValueActive(),I=E&&x.aggFunc!=D.getAggFunc();return M||I});c.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",c,t);let d=(x,D)=>x.width!=D.getActualWidth();this.eventDispatcher.columnResized(o(d),!0,t);let u=(x,D)=>x.pinned!=D.getPinned();this.eventDispatcher.columnPinned(o(u),t);let m=(x,D)=>x.hide==D.isVisible();this.eventDispatcher.columnVisible(o(m),t);let _=o((x,D)=>x.sort!=D.getSort()||x.sortIndex!=D.getSortIndex());_.length>0&&this.sortController.dispatchSortChangedEvents(t,_),this.normaliseColumnMovedEventForColumnState(n,t)}}normaliseColumnMovedEventForColumnState(t,e){let n=this.columnGetStateService.getColumnState(),i={};n.forEach(l=>i[l.colId]=l);let r={};t.forEach(l=>{i[l.colId]&&(r[l.colId]=!0)});let s=t.filter(l=>r[l.colId]),o=n.filter(l=>r[l.colId]),a=[];o.forEach((l,c)=>{let d=s&&s[c];if(d&&d.colId!==l.colId){let u=this.columnModel.getCol(d.colId);u&&a.push(u)}}),a.length&&this.eventDispatcher.columnMoved({movedColumns:a,source:e,finished:!0})}},bHe=(t,e,n,i)=>{let r=t[n.getId()],s=t[i.getId()],o=r!=null,a=s!=null;if(o&&a)return r-s;if(o)return-1;if(a)return 1;let l=e.indexOf(n),c=e.indexOf(i),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},IBt=class extends Ot{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(t){this.columnModel=t.columnModel,this.columnAnimationService=t.columnAnimationService,this.eventDispatcher=t.columnEventDispatcher}moveColumnByIndex(t,e,n){let i=this.columnModel.getCols();if(!i)return;let r=i[t];this.moveColumns([r],e,n)}moveColumns(t,e,n,i=!0){let r=this.columnModel.getCols();if(!r)return;if(this.columnAnimationService.start(),e>r.length-t.length){wt("tried to insert columns in invalid location, toIndex = ",e),wt("remember that you should not count the moving columns when calculating the new index");return}let s=this.columnModel.getColsForKeys(t);this.doesMovePassRules(s,e)&&(this.columnModel.moveInCols(s,e,n),this.eventDispatcher.columnMoved({movedColumns:s,source:n,toIndex:e,finished:i}),this.columnAnimationService.finish())}doesMovePassRules(t,e){let n=this.getProposedColumnOrder(t,e);return this.doesOrderPassRules(n)}doesOrderPassRules(t){return!(!this.doesMovePassMarryChildren(t)||!this.doesMovePassLockedPositions(t))}getProposedColumnOrder(t,e){let i=this.columnModel.getCols().slice();return KHe(i,t,e),i}doesMovePassLockedPositions(t){let e=s=>s?s==="left"||s===!0?-1:1:0,n=this.gos.get("enableRtl"),i=n?1:-1,r=!0;return t.forEach(s=>{let o=e(s.getColDef().lockPosition);n?o>i&&(r=!1):o<i&&(r=!1),i=o}),r}doesMovePassMarryChildren(t){let e=!0,n=this.columnModel.getColTree();return ux(null,n,i=>{if(!Md(i))return;let r=i,s=r.getColGroupDef();if(!(s&&s.marryChildren))return;let a=[];r.getLeafColumns().forEach(m=>{let f=t.indexOf(m);a.push(f)});let l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=r.getLeafColumns().length-1;d>u&&(e=!1)}),e}placeLockedColumns(t){let e=[],n=[],i=[];return t.forEach(s=>{let o=s.getColDef().lockPosition;o==="right"?i.push(s):o==="left"||o===!0?e.push(s):n.push(s)}),this.gos.get("enableRtl")?[...i,...n,...e]:[...e,...n,...i]}},ABt=/[&<>"']/g,PBt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};OBt=class extends Ot{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(t){this.expressionService=t.expressionService,this.funcColsService=t.funcColsService,this.columnModel=t.columnModel}getDisplayNameForColumn(t,e,n=!1){if(!t)return null;let i=this.getHeaderName(t.getColDef(),t,null,null,e);return n?this.wrapHeaderNameWithAggFunc(t,i):i}getDisplayNameForProvidedColumnGroup(t,e,n){let i=e?e.getColGroupDef():null;return i?this.getHeaderName(i,null,t,e,n):null}getDisplayNameForColumnGroup(t,e){return this.getDisplayNameForProvidedColumnGroup(t,t.getProvidedColumnGroup(),e)}getHeaderName(t,e,n,i,r){let s=t.headerValueGetter;if(s){let o=this.gos.addGridCommonParams({colDef:t,column:e,columnGroup:n,providedColumnGroup:i,location:r});return typeof s=="function"?s(o):typeof s=="string"?this.expressionService.evaluate(s,o):(wt("headerValueGetter must be a function or a string"),"")}else{if(t.headerName!=null)return t.headerName;if(t.field)return FBt(t.field)}return""}wrapHeaderNameWithAggFunc(t,e){if(this.gos.get("suppressAggFuncInHeader"))return e;let n=t.getColDef().pivotValueColumn,i=Di(n),r=null,s;if(i){let o=this.funcColsService.getValueColumns(),a=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&o.length===1,l=t.getColDef().pivotTotalColumnIds!==void 0;if(a&&!l)return e;r=n?n.getAggFunc():null,s=!0}else{let o=t.isValueActive(),a=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();o&&a?(r=t.getAggFunc(),s=!0):s=!1}if(s){let o=typeof r=="string"?r:"func";return`${this.localeService.getLocaleTextFunc()(o,o)}(${e})`}return e}},NBt=class extends Ot{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(t){this.context=t.context,this.columnModel=t.columnModel,this.columnFactory=t.columnFactory,this.visibleColsService=t.visibleColsService}destroy(){fA(this.context,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(t,e){if(this.pivotResultCols==null)return null;let n=this.columnModel.getColDefCol(e),i=null;return this.pivotResultCols.list.forEach(r=>{let s=r.getColDef().pivotKeys,o=r.getColDef().pivotValueColumn;Cf(s,t)&&o===n&&(i=r)}),i}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(t){return this.pivotResultCols?this.columnModel.getColFromCollection(t,this.pivotResultCols):null}setPivotResultCols(t,e){if(this.columnModel.isReady()&&!(t==null&&this.pivotResultCols==null)){if(t){this.processPivotResultColDef(t);let n=this.columnFactory.createColumnTree(t,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,e);fA(this.context,this.pivotResultCols?.tree,n.columnTree);let i=n.columnTree,r=n.treeDept,s=V3e(i),o={};this.pivotResultCols={tree:i,treeDepth:r,list:s,map:o},this.pivotResultCols.list.forEach(a=>this.pivotResultCols.map[a.getId()]=a),this.previousPivotResultCols=null}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null;this.columnModel.refreshCols(),this.visibleColsService.refresh(e)}}processPivotResultColDef(t){let e=this.gos.get("processPivotResultColDef"),n=this.gos.get("processPivotResultColGroupDef");if(!e&&!n)return;let i=r=>{r.forEach(s=>{if(Di(s.children)){let a=s;n&&n(a),i(a.children)}else e&&e(s)})};t&&i(t)}},VBt=class extends Ot{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(t){this.columnModel=t.columnModel,this.columnViewportService=t.columnViewportService,this.eventDispatcher=t.columnEventDispatcher,this.visibleColsService=t.visibleColsService,this.ctrlsService=t.ctrlsService}setColumnWidths(t,e,n,i){let r=[];t.forEach(s=>{let o=this.columnModel.getColDefCol(s.key)||this.columnModel.getCol(s.key);if(!o)return;if(r.push({width:s.newWidth,ratios:[1],columns:[o]}),this.gos.get("colResizeDefault")==="shift"&&(e=!e),e){let l=this.visibleColsService.getColAfter(o);if(!l)return;let c=o.getActualWidth()-s.newWidth,d=l.getActualWidth()+c;r.push({width:d,ratios:[1],columns:[l]})}}),r.length!==0&&this.resizeColumnSets({resizeSets:r,finished:n,source:i})}resizeColumnSets(t){let{resizeSets:e,finished:n,source:i}=t;if(!(!e||e.every(d=>this.checkMinAndMaxWidthsForSet(d)))){if(n){let d=e&&e.length>0?e[0].columns:null;this.eventDispatcher.columnResized(d,n,i)}return}let s=[],o=[];e.forEach(d=>{let{width:u,columns:m,ratios:f}=d,_={},x={};m.forEach(M=>o.push(M));let D=!0,E=0;for(;D;){if(E++,E>1e3){Do("infinite loop in resizeColumnSets");break}D=!1;let M=[],I=0,z=u;m.forEach((A,Y)=>{if(x[A.getId()])z-=_[A.getId()];else{M.push(A);let ne=f[Y];I+=ne}});let G=1/I;M.forEach((A,Y)=>{let X=Y===M.length-1,ne;X?ne=z:(ne=Math.round(f[Y]*u*G),z-=ne);let pe=A.getMinWidth(),ce=A.getMaxWidth();ne<pe?(ne=pe,x[A.getId()]=!0,D=!0):ce>0&&ne>ce&&(ne=ce,x[A.getId()]=!0,D=!0),_[A.getId()]=ne})}m.forEach(M=>{let I=_[M.getId()];M.getActualWidth()!==I&&(M.setActualWidth(I,i),s.push(M))})});let a=s.length>0,l=[];a&&(l=this.refreshFlexedColumns({resizingCols:o,skipSetLeft:!0}),this.visibleColsService.setLeftValues(i),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());let c=o.concat(l);(a||n)&&this.eventDispatcher.columnResized(c,n,i,l)}checkMinAndMaxWidthsForSet(t){let{columns:e,width:n}=t,i=0,r=0,s=!0;e.forEach(l=>{let c=l.getMinWidth();i+=c||0;let d=l.getMaxWidth();d>0?r+=d:s=!1});let o=n>=i,a=!s||n<=r;return o&&a}refreshFlexedColumns(t={}){let e=t.source?t.source:"flex";if(t.viewportWidth!=null&&(this.flexViewportWidth=t.viewportWidth),!this.flexViewportWidth)return[];let n=this.visibleColsService.getCenterCols(),i=-1;if(t.resizingCols){let m=new Set(t.resizingCols);for(let f=n.length-1;f>=0;f--)if(m.has(n[f])){i=f;break}}let r=0,s=[],o=0,a=0;for(let m=0;m<n.length;m++)n[m].getFlex()&&m>i?(s.push(n[m]),a+=n[m].getFlex(),o+=n[m].getMinWidth()):r+=n[m].getActualWidth();if(!s.length)return[];let l=[];r+o>this.flexViewportWidth&&(s.forEach(m=>m.setActualWidth(m.getMinWidth(),e)),l=s,s=[]);let c=[],d;e:for(;;){d=this.flexViewportWidth-r;let m=d/a;for(let f=0;f<s.length;f++){let _=s[f],x=m*_.getFlex(),D=0,E=_.getMinWidth(),M=_.getMaxWidth();if(x<E?D=E:x>M&&(D=M),D){_.setActualWidth(D,e),$He(s,_),a-=_.getFlex(),l.push(_),r+=_.getActualWidth();continue e}c[f]=Math.floor(x)}break}let u=d;return s.forEach((m,f)=>{m.setActualWidth(Math.min(c[f],u),e),l.push(m),u-=c[f]}),t.skipSetLeft||this.visibleColsService.setLeftValues(e),t.updateBodyWidths&&this.visibleColsService.updateBodyWidths(),t.fireResizedEvent&&this.eventDispatcher.columnResized(l,!0,e,s),s}sizeColumnsToFit(t,e="sizeColumnsToFit",n,i){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.sizeColumnsToFit(t,e,n,i));return}let r={};i&&i?.columnLimits?.forEach(_=>{var x=_,{key:m}=x,f=al(x,["key"]);r[typeof m=="string"?m:m.getColId()]=f});let s=this.visibleColsService.getAllCols(),o=t===ax(s);if(t<=0||!s.length||o)return;let a=[],l=[];s.forEach(m=>{m.getColDef().suppressSizeToFit===!0?l.push(m):a.push(m)});let c=a.slice(0),d=!1,u=m=>{Ip(a,m),l.push(m)};for(a.forEach(m=>{m.resetActualWidth(e);let f=r?.[m.getId()],_=f?.minWidth??i?.defaultMinWidth,x=f?.maxWidth??i?.defaultMaxWidth,D=m.getActualWidth();typeof _=="number"&&D<_?m.setActualWidth(_,e,!0):typeof x=="number"&&D>x&&m.setActualWidth(x,e,!0)});!d;){d=!0;let m=t-ax(l);if(m<=0)a.forEach(f=>{let _=r?.[f.getId()]?.minWidth??i?.defaultMinWidth;if(typeof _=="number"){f.setActualWidth(_,e,!0);return}f.setMinimum(e)});else{let f=m/ax(a),_=m;for(let x=a.length-1;x>=0;x--){let D=a[x],E=r?.[D.getId()],M=E?.minWidth??i?.defaultMinWidth,I=E?.maxWidth??i?.defaultMaxWidth,z=D.getMinWidth(),G=D.getMaxWidth(),A=typeof M=="number"&&M>z?M:z,Y=typeof I=="number"&&I<G?I:G,X=Math.round(D.getActualWidth()*f);X<A?(X=A,u(D),d=!1):X>Y?(X=Y,u(D),d=!1):x===0&&(X=_),D.setActualWidth(X,e,!0),_-=X}}}c.forEach(m=>{m.fireColumnWidthChangedEvent(e)}),this.visibleColsService.setLeftValues(e),this.visibleColsService.updateBodyWidths(),!n&&this.eventDispatcher.columnResized(c,!0,e)}applyAutosizeStrategy(){let t=this.gos.get("autoSizeStrategy");if(!t)return;let{type:e}=t;setTimeout(()=>{if(e==="fitGridWidth"){let{columnLimits:n,defaultMinWidth:i,defaultMaxWidth:r}=t,s=n?.map(({colId:o,minWidth:a,maxWidth:l})=>({key:o,minWidth:a,maxWidth:l}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:i,defaultMaxWidth:r,columnLimits:s})}else e==="fitProvidedWidth"&&this.sizeColumnsToFit(t.width,"sizeColumnsToFit")})}};eGe=class extends Ot{constructor(t,e,n,i){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=e,this.partId=n,this.providedColumnGroup=t,this.pinned=i}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(t){this.parent=t}getUniqueId(){return JHe(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let t=this.getProvidedColumnGroup().getLeafColumns();return!t||t.length===0?!1:t.every(e=>e.isMoving())}checkLeft(){if(this.displayedChildren.forEach(t=>{Sm(t)&&t.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let e=Ar(this.displayedChildren).getLeft();this.setLeft(e)}else{let t=this.displayedChildren[0].getLeft();this.setLeft(t)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let t=0;return this.displayedChildren&&this.displayedChildren.forEach(e=>{t+=e.getActualWidth()}),t}isResizable(){if(!this.displayedChildren)return!1;let t=!1;return this.displayedChildren.forEach(e=>{e.isResizable()&&(t=!0)}),t}getMinWidth(){let t=0;return this.displayedChildren.forEach(e=>{t+=e.getMinWidth()}),t}addChild(t){this.children||(this.children=[]),this.children.push(t)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let t=[];return this.addLeafColumns(t),t}getDisplayedLeafColumns(){let t=[];return this.addDisplayedLeafColumns(t),t}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(t){this.providedColumnGroup.setExpanded(t)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(t){let e=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,e}addDisplayedLeafColumns(t){this.displayedChildren.forEach(e=>{f5(e)?t.push(e):Sm(e)&&e.addDisplayedLeafColumns(t)})}addLeafColumns(t){this.children.forEach(e=>{f5(e)?t.push(e):Sm(e)&&e.addLeafColumns(t)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let t=this.getParent();return!this.isPadding()||!t||!t.isPadding()?0:1+t.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;t!=null&&t.isPadding();)t=t.getParent();if(!(t?t.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(n=>{if(Sm(n)&&(!n.displayedChildren||!n.displayedChildren.length))return;switch(n.getColumnGroupShow()){case"open":t.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(n);break;case"closed":t.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(n);break;default:this.displayedChildren.push(n);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},tGe=class{constructor(){this.existingIds={}}getInstanceIdForKey(t){let e=this.existingIds[t],n;return typeof e!="number"?n=0:n=e+1,this.existingIds[t]=n,n}},BBt=class extends Ot{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(t){this.columnModel=t.columnModel,this.columnSizeService=t.columnSizeService,this.columnViewportService=t.columnViewportService,this.eventDispatcher=t.columnEventDispatcher}refresh(t,e=!1){e||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=s3e(this.treeLeft),this.columnsCenter=s3e(this.treeCenter),this.columnsRight=s3e(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(t),this.autoHeightCols=this.columns.filter(n=>n.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(t),this.eventDispatcher.visibleCols()}updateBodyWidths(){let t=ax(this.columnsCenter),e=ax(this.columnsLeft),n=ax(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==t,(this.bodyWidth!==t||this.leftWidth!==e||this.rightWidth!==n)&&(this.bodyWidth=t,this.leftWidth=e,this.rightWidth=n,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(t){this.setLeftValuesOfCols(t),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(t){let e,n;this.gos.get("enableRtl")?(e=this.columnsLeft?this.columnsLeft[0]:null,n=this.columnsRight?Ar(this.columnsRight):null):(e=this.columnsLeft?Ar(this.columnsLeft):null,n=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(i=>{i.setLastLeftPinned(i===e,t),i.setFirstRightPinned(i===n,t)})}buildTrees(){let t=this.columnModel.getColsToShow(),e=t.filter(s=>s.getPinned()=="left"),n=t.filter(s=>s.getPinned()=="right"),i=t.filter(s=>s.getPinned()!="left"&&s.getPinned()!="right"),r=new tGe;this.treeLeft=this.createGroups({columns:e,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:n,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:i,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){let t=this.columnModel.getCols(),e=[],n=[],i=[];for(let r of t){let s=r.getPinned();s?s===!0||s==="left"?e.push(r):i.push(r):n.push(r)}this.ariaOrderColumns=e.concat(n).concat(i)}getAriaColIndex(t){let e;return Sm(t)?e=t.getLeafColumns()[0]:e=t,this.ariaOrderColumns.indexOf(e)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(t=>{t.forEach(e=>{Sm(e)&&e.checkLeft()})})}setLeftValuesOfCols(t){if(!this.columnModel.getColDefCols())return;let n=this.columnModel.getCols().slice(0),i=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(r=>{if(i){let s=ax(r);r.forEach(o=>{s-=o.getActualWidth(),o.setLeft(s,t)})}else{let s=0;r.forEach(o=>{o.setLeft(s,t),s+=o.getActualWidth()})}uBt(n,r)}),n.forEach(r=>{r.setLeft(null,t)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(t){return this.getAllCols().indexOf(t)>=0}getLeftColsForRow(t){return this.columnModel.isColSpanActive()?this.getColsForRow(t,this.columnsLeft):this.columnsLeft}getRightColsForRow(t){return this.columnModel.isColSpanActive()?this.getColsForRow(t,this.columnsRight):this.columnsRight}getColsForRow(t,e,n,i){let r=[],s=null;for(let o=0;o<e.length;o++){let a=e[o],l=e.length-o,c=Math.min(a.getColSpan(t),l),d=[a];if(c>1){let m=c-1;for(let f=1;f<=m;f++)d.push(e[o+f]);o+=m}let u;n?(u=!1,d.forEach(m=>{n(m)&&(u=!0)})):u=!0,u&&(r.length===0&&s&&(i&&i(a))&&r.push(s),r.push(a)),s=a}return r}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(t){switch(t){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(t){let e=this.getAllCols(),n=e.indexOf(t);return n>0?e[n-1]:null}getGroupAtDirection(t,e){let n=t.getProvidedColumnGroup().getLevel()+t.getPaddingLevel(),i=t.getDisplayedLeafColumns(),r=e==="After"?Ar(i):i[0],s=`getCol${e}`;for(;;){let o=this[s](r);if(!o)return null;let a=this.getColGroupAtLevel(o,n);if(a!==t)return a}}getColGroupAtLevel(t,e){let n=t.getParent(),i,r;for(;i=n.getProvidedColumnGroup().getLevel(),r=n.getPaddingLevel(),!(i+r<=e);)n=n.getParent();return n}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};let t=e=>{this.colsAndGroupsMap[e.getUniqueId()]=e};dD(this.treeCenter,!1,t),dD(this.treeLeft,!1,t),dD(this.treeRight,!1,t)}isVisible(t){return this.colsAndGroupsMap[t.getUniqueId()]===t}updateOpenClosedVisibilityInColumnGroups(){let t=this.getAllTrees();dD(t,!1,e=>{Sm(e)&&e.calculateDisplayedColumns()})}getFirstColumn(){let t=this.gos.get("enableRtl"),e=["getLeftCols","getCenterCols","getRightCols"];t&&e.reverse();for(let n=0;n<e.length;n++){let i=this[e[n]]();if(i.length)return t?Ar(i):i[0]}return null}getColumnGroup(t,e){if(!t)return null;if(Sm(t))return t;let n=this.getAllTrees(),i=typeof e=="number",r=null;return dD(n,!1,s=>{if(Sm(s)){let o=s,a;i?a=t===o.getGroupId()&&e===o.getPartId():a=t===o.getGroupId(),a&&(r=o)}}),r}getColAfter(t){let e=this.getAllCols(),n=e.indexOf(t);return n<e.length-1?e[n+1]:null}isBodyWidthDirty(){return this.bodyWidthDirty}setBodyWidthDirty(){this.bodyWidthDirty=!0}getColsLeftWidth(){return ax(this.columnsLeft)}getDisplayedColumnsRightWidth(){return ax(this.columnsRight)}isColAtEdge(t,e){let n=this.getAllCols();if(!n.length)return!1;let i=e==="first",r;if(Sm(t)){let s=t.getDisplayedLeafColumns();if(!s.length)return!1;r=i?s[0]:Ar(s)}else r=t;return(i?n[0]:Ar(n))===r}createGroups(t){let{columns:e,idCreator:n,pinned:i,oldDisplayedGroups:r,isStandaloneStructure:s}=t,o=this.mapOldGroupsById(r),a=[],l=e;for(;l.length;){let c=l;l=[];let d=0,u=m=>{let f=d;d=m;let _=c[f],D=(Sm(_)?_.getProvidedColumnGroup():_).getOriginalParent();if(D==null){for(let M=f;M<m;M++)a.push(c[M]);return}let E=this.createColGroup(D,n,o,i,s);for(let M=f;M<m;M++)E.addChild(c[M]);l.push(E)};for(let m=1;m<c.length;m++){let f=c[m],x=(Sm(f)?f.getProvidedColumnGroup():f).getOriginalParent(),D=c[d],M=(Sm(D)?D.getProvidedColumnGroup():D).getOriginalParent();x!==M&&u(m)}d<c.length&&u(c.length)}return s||this.setupParentsIntoCols(a,null),a}createColGroup(t,e,n,i,r){let s=t.getGroupId(),o=e.getInstanceIdForKey(s),a=JHe(s,o),l=n[a];return l&&l.getProvidedColumnGroup()!==t&&(l=null),Di(l)?l.reset():(l=new eGe(t,s,o,i),r||this.createBean(l)),l}mapOldGroupsById(t){let e={},n=i=>{i.forEach(r=>{if(Sm(r)){let s=r;e[r.getUniqueId()]=s,n(s.getChildren())}})};return t&&n(t),e}setupParentsIntoCols(t,e){t.forEach(n=>{if(n.setParent(e),Sm(n)){let i=n;this.setupParentsIntoCols(i.getChildren(),i)}})}};iGe=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd"],zBt=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],HBt=[...iGe,...zBt],GBt={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,removePivotHeaderRowWhenSingleValueColumn:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0},f2=class{};f2.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"];f2.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","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"];f2.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"];f2.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"];f2.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading"];f2.OTHER_PROPERTIES=["suppressStickyTotalRow"];f2.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"];f2.ALL_PROPERTIES=[...f2.ARRAY_PROPERTIES,...f2.OBJECT_PROPERTIES,...f2.STRING_PROPERTIES,...f2.NUMBER_PROPERTIES,...f2.FUNCTION_PROPERTIES,...f2.BOOLEAN_PROPERTIES,...f2.OTHER_PROPERTIES];zB=f2,Yv=class{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}};Yv.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY";Yv.PUBLIC_EVENTS=iGe;Yv.EVENT_CALLBACKS=HBt.map(t=>Yv.getCallbackForEvent(t));Yv.BOOLEAN_PROPERTIES=zB.BOOLEAN_PROPERTIES;Yv.ALL_PROPERTIES=zB.ALL_PROPERTIES;Yv.ALL_PROPERTIES_AND_CALLBACKS=[...Yv.ALL_PROPERTIES,...Yv.EVENT_CALLBACKS];Yv.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Yv.ALL_PROPERTIES_AND_CALLBACKS);HB=Yv;WBt=class{constructor(t){this.cssClassStates={},this.getGui=t}addCssClass(t){let e=(t||"").split(" ");if(e.length>1){e.forEach(i=>this.addCssClass(i));return}if(this.cssClassStates[t]!==!0&&t.length){let i=this.getGui();i&&i.classList.add(t),this.cssClassStates[t]=!0}}removeCssClass(t){let e=(t||"").split(" ");if(e.length>1){e.forEach(i=>this.removeCssClass(i));return}if(this.cssClassStates[t]!==!1&&t.length){let i=this.getGui();i&&i.classList.remove(t),this.cssClassStates[t]=!1}}containsCssClass(t){let e=this.getGui();return e?e.classList.contains(t):!1}addOrRemoveCssClass(t,e){if(!t)return;if(t.indexOf(" ")>=0){let i=(t||"").split(" ");if(i.length>1){i.forEach(r=>this.addOrRemoveCssClass(r,e));return}}if(this.cssClassStates[t]!==e&&t.length){let i=this.getGui();i&&i.classList.toggle(t,e),this.cssClassStates[t]=e}}};nzt="[tabindex], input, select, button, textarea, [href]",mGe="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";c1=class{constructor(t=0,e=1){this.nextValue=t,this.step=e}next(){let t=this.nextValue;return this.nextValue+=this.step,t}peek(){return this.nextValue}skip(t){this.nextValue+=t}},czt=1e3,dzt=1e3,wHe=100,uzt=(()=>{let t=class cD extends Ot{constructor(n,i,r,s){super(),this.parentComp=n,this.tooltipShowDelayOverride=i,this.tooltipHideDelayOverride=r,this.shouldDisplayTooltip=s,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(n){this.popupService=n.popupService,this.userComponentFactory=n.userComponentFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let n=this.parentComp.getGui();this.tooltipTrigger===0&&this.addManagedListeners(n,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(n,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(n,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(n,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(n){let i=this.gos.get(n);return i<0&&wt(`${n} should not be lower than 0`),Math.max(200,i)}getTooltipDelay(n){return n==="show"?this.tooltipShowDelayOverride??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipHideDelayOverride??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let n=this.gos.get("tooltipTrigger");return!n||n==="hover"?0:1}onMouseEnter(n){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!x5()&&(cD.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(n)},wHe):this.prepareToShowTooltip(n))}onMouseMove(n){this.lastMouseEvent&&(this.lastMouseEvent=n),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(n){let i=n.relatedTarget,r=this.parentComp.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||r.contains(i)||this.interactionEnabled&&s?.contains(i)||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(n){if(this.state!=0||cD.isLocked)return;let i=0;n&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=n||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){let n=new Date().getTime(),i=cD.lastTooltipHideTime;return n-i<czt}setToDoNothing(n){!n&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){let n=ve({},this.parentComp.getTooltipParams());if(!Di(n.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip()){this.setToDoNothing();return}this.state=2,this.tooltipInstanceCount++;let i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(n).newAgStackInstance().then(i)}hideTooltip(n){!n&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),cD.lastTooltipHideTime=new Date().getTime()),this.eventService.dispatchEvent({type:"tooltipHide",parentGui:this.parentComp.getGui()}),n&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(n,i){if(this.state!==2||this.tooltipInstanceCount!==n){this.destroyBean(i);return}let s=i.getGui();this.tooltipComp=i,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&s.classList.add("ag-tooltip-animate"),this.interactionEnabled&&s.classList.add("ag-tooltip-interactive");let o=this.localeService.getLocaleTextFunc(),a=this.popupService.addPopup({eChild:s,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(a&&(this.tooltipPopupDestroyFunc=a.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){let l=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:l,columnMoved:l})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(s,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(s,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:s,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){let n=this.tooltipComp?.getGui(),i=this.gos.getActiveDomElement();return!!n&&n.contains(i)}onTooltipFocusOut(n){let i=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,i.contains(n.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){let n={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(St(ve({},n),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(St(ve({},n),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let n=this.tooltipPopupDestroyFunc,i=this.tooltipComp,r=this.tooltipTrigger===0?dzt:0;window.setTimeout(()=>{n(),this.destroyBean(i)},r),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(n=>{n&&n()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){cD.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},wHe)}unlockService(){cD.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};return t.isLocked=!1,t})(),hzt=uzt,W1=class extends Ot{constructor(t,e){super(),this.ctrl=t,e&&(this.beans=e)}wireBeans(t){this.beans=t}postConstruct(){this.refreshToolTip()}setBrowserTooltip(t){let e="title",n=this.ctrl.getGui();n&&(t!=null&&t!=""?n.setAttribute(e,t):n.removeAttribute(e))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){if(this.tooltipManager!=null)return;let t={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new hzt(t,this.ctrl.getTooltipShowDelayOverride?.(),this.ctrl.getTooltipHideDelayOverride?.(),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){let t=this.ctrl,e=t.getColumn?.(),n=t.getColDef?.(),i=t.getRowNode?.();return{location:t.getLocation(),colDef:n,column:e,rowIndex:t.getRowIndex?.(),node:i,data:i?.data,value:this.getTooltipText(),valueFormatted:t.getValueFormatted?.(),hideTooltipCallback:()=>this.tooltipManager?.hideTooltip(!0)}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},pzt=new c1,Bt=null,ai=class xGe extends Ot{constructor(e,n){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=pzt.next(),this.cssClassManager=new WBt(()=>this.eGui),this.componentSelectors=new Map((n??[]).map(i=>[i.selector,i])),e&&this.setTemplate(e)}preWireBeans(e){super.preWireBeans(e)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(e,n){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,n))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(e){let{newTooltipText:n,showDelayOverride:i,hideDelayOverride:r,location:s,shouldDisplayTooltip:o}=e||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==n&&(this.tooltipText=n);let a=()=>this.tooltipText;n!=null&&(this.tooltipFeature=this.createBean(new W1({getTooltipValue:a,getGui:()=>this.getGui(),getLocation:()=>s??"UNKNOWN",getColDef:e?.getColDef,getColumn:e?.getColumn,getTooltipShowDelayOverride:i!=null?()=>i:void 0,getTooltipHideDelayOverride:r!=null?()=>r:void 0,shouldDisplayTooltip:o})))}getDataRefAttribute(e){return e.getAttribute?e.getAttribute("data-ref"):null}applyElementsToComponent(e,n,i,r=null){if(n===void 0&&(n=this.getDataRefAttribute(e)),n){let s=this[n];if(s===Bt)this[n]=r??e;else{let o=i&&i[n];!this.suppressDataRefValidation&&!o&&wt(`Issue with data-ref: ${n} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,n){azt(e.childNodes).forEach(r=>{if(!(r instanceof HTMLElement))return;let s=this.createComponentFromElement(r,o=>{o.getGui()&&this.copyAttributesFromNode(r,o.getGui())},n);if(s){if(s.addItems&&r.children.length){this.createChildComponentsFromTags(r,n);let o=Array.prototype.slice.call(r.children);s.addItems(o)}this.swapComponentForNode(s,e,r)}else r.childNodes&&this.createChildComponentsFromTags(r,n)})}createComponentFromElement(e,n,i){let r=e.nodeName,s=this.getDataRefAttribute(e),o=r.indexOf("AG-")===0,a=o?this.componentSelectors.get(r):null,l=null;if(a){xGe.elementGettingCreated=e;let c=i&&s?i[s]:void 0;l=new a.component(c),l.setParentComponent(this),this.createBean(l,null,n)}else o&&wt(`Missing selector: ${r}`);return this.applyElementsToComponent(e,s,i,l),l}copyAttributesFromNode(e,n){lzt(e.attributes,(i,r)=>n.setAttribute(i,r))}swapComponentForNode(e,n,i){let r=e.getGui();n.replaceChild(r,i),n.insertBefore(document.createComment(i.nodeName),r),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){let n=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(i=>i.setAttribute("tabindex",n.toString()))}setTemplate(e,n,i){let r=Rp(e);this.setTemplateFromElement(r,n,i)}setTemplateFromElement(e,n,i,r=!1){if(this.eGui=e,this.suppressDataRefValidation=r,n)for(let s=0;s<n.length;s++){let o=n[s];this.componentSelectors.set(o.selector,o)}this.wireTemplate(e,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,n){let i=n;return e==null?null:(i||(i=this.eGui),qB(e)?{element:e,parent:i}:{element:e.getGui(),parent:i})}prependChild(e,n){let{element:i,parent:r}=this.getContainerAndElement(e,n)||{};!i||!r||r.insertAdjacentElement("afterbegin",i)}appendChild(e,n){let{element:i,parent:r}=this.getContainerAndElement(e,n)||{};!i||!r||r.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,n={}){if(e!==this.visible){this.visible=e;let{skipAriaHidden:i}=n;U3e(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,n={}){if(e!==this.displayed){this.displayed=e;let{skipAriaHidden:i}=n;Vn(this.eGui,e,{skipAriaHidden:i});let r={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(r)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}addGuiEventListener(e,n,i){this.eGui.addEventListener(e,n,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,n))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,n){this.cssClassManager.addOrRemoveCssClass(e,n)}},bGe={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",menuAlt:"menu-alt",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",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},mzt=(()=>{let t=new Set(Object.values(bGe));return t.add("eye"),t})();Zv=class{constructor(t,e=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new y5,this.eElement=t,this.preventMouseClick=e;let n=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",n,{passive:!0}),this.eElement.addEventListener("touchmove",i,{passive:!0}),this.eElement.addEventListener("touchend",r,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",n,{passive:!0}),this.eElement.removeEventListener("touchmove",i,{passive:!0}),this.eElement.removeEventListener("touchend",r,{passive:!1})})}getActiveTouch(t){for(let e=0;e<t.length;e++)if(t[e].identifier===this.touchStart.identifier)return t[e];return null}addEventListener(t,e){this.localEventService.addEventListener(t,e)}removeEventListener(t,e){this.localEventService.removeEventListener(t,e)}onTouchStart(t){if(this.touching)return;this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;let e=this.touchStart;window.setTimeout(()=>{let n=this.touchStart===e;if(this.touching&&n&&!this.moved){this.moved=!0;let i={type:"longTap",touchStart:this.touchStart,touchEvent:t};this.localEventService.dispatchEvent(i)}},500)}onTouchMove(t){if(!this.touching)return;let e=this.getActiveTouch(t.touches);if(!e)return;!wGe(e,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(t){if(this.touching){if(!this.moved){let e={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(e),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}}checkForDoubleTap(){let t=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>this.DOUBLE_TAP_MILLIS){let n={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(n),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t}destroy(){this.destroyFuncs.forEach(t=>t())}};fzt=`<span class="ag-sort-indicator-container">
        ${IB("Order","order")}
        ${IB("Asc","ascending-icon")}
        ${IB("Desc","descending-icon")}
        ${IB("Mixed","mixed-icon")}
        ${IB("None","none-icon")}
    </span>`,$3e=class extends ai{constructor(t){super(),this.eSortOrder=Bt,this.eSortAsc=Bt,this.eSortDesc=Bt,this.eSortMixed=Bt,this.eSortNone=Bt,t||this.setTemplate(fzt)}wireBeans(t){this.sortController=t.sortController}attachCustomElements(t,e,n,i,r){this.eSortOrder=t,this.eSortAsc=e,this.eSortDesc=n,this.eSortMixed=i,this.eSortNone=r}setupSort(t,e=!1){if(this.column=t,this.suppressOrder=e,this.setupMultiSortIndicator(),!this.column.isSortable()&&!this.column.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,t),this.addInIcon("sortDescending",this.eSortDesc,t),this.addInIcon("sortUnSort",this.eSortNone,t);let n=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",n),this.addManagedEventListeners({newColumnsLoaded:n,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(t,e,n){if(e==null)return;let i=tr(t,this.gos,n);i&&e.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let t=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){let e=t==="asc";Vn(this.eSortAsc,e,{skipAriaHidden:!0})}if(this.eSortDesc){let e=t==="desc";Vn(this.eSortDesc,e,{skipAriaHidden:!0})}if(this.eSortNone){let e=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon"),n=t==null;Vn(this.eSortNone,!e&&n,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);let t=this.column.getColDef().showRowGroup;this.gos.isColumnsSortingCoupledToGroup()&&t&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){let t=this.sortController.getDisplaySortForColumn(this.column)==="mixed";Vn(this.eSortMixed,t,{skipAriaHidden:!0})}}updateSortOrder(){if(!this.eSortOrder)return;let t=this.sortController.getColumnsWithSortingOrdered(),e=this.sortController.getDisplaySortIndexForColumn(this.column)??-1,n=t.some(r=>this.sortController.getDisplaySortIndexForColumn(r)??!1),i=e>=0&&n;Vn(this.eSortOrder,i,{skipAriaHidden:!0}),e>=0?this.eSortOrder.textContent=(e+1).toString():zo(this.eSortOrder)}},K3e={selector:"AG-SORT-INDICATOR",component:$3e},gzt=`<div class="ag-cell-label-container" role="presentation">
        <span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
        <span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
        <div data-ref="eLabel" class="ag-header-cell-label" role="presentation">
            <span data-ref="eText" class="ag-header-cell-text"></span>
            <span data-ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
            <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
        </div>
    </div>`,T3e=class extends ai{constructor(){super(...arguments),this.eFilter=Bt,this.eFilterButton=Bt,this.eSortIndicator=Bt,this.eMenu=Bt,this.eLabel=Bt,this.eText=Bt,this.eSortOrder=Bt,this.eSortAsc=Bt,this.eSortDesc=Bt,this.eSortMixed=Bt,this.eSortNone=Bt,this.lastMovingChanged=0}wireBeans(t){this.sortController=t.sortController,this.menuService=t.menuService,this.funcColsService=t.funcColsService}destroy(){super.destroy()}refresh(t){let e=this.params;return this.params=t,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||this.workOutSort()!=this.currentSort||this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||e.enableFilterButton!=t.enableFilterButton||e.enableFilterIcon!=t.enableFilterIcon?!1:(this.setDisplayName(t),!0)}workOutTemplate(){let t=this.params.template??gzt;return t=t&&t.trim?t.trim():t,t}init(t){this.params=t,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate,[K3e]),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(t)}setDisplayName(t){if(this.currentDisplayName!=t.displayName){this.currentDisplayName=t.displayName;let e=nl(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=e)}}addInIcon(t,e,n){if(e==null)return;let i=tr(t,this.gos,n);i&&e.appendChild(i)}setupTap(){let{gos:t}=this;if(t.get("suppressTouch"))return;let e=new Zv(this.getGui(),!0),n=this.shouldSuppressMenuHide(),i=n&&Di(this.eMenu),r=i?new Zv(this.eMenu,!0):e;if(this.params.enableMenu){let s=i?"tap":"longTap",o=a=>this.params.showColumnMenuAfterMouseClick(a.touchStart);this.addManagedListeners(r,{[s]:o})}if(this.params.enableSorting){let s=o=>{let a=o.touchStart.target;n&&(this.eMenu?.contains(a)||this.eFilterButton?.contains(a))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListeners(e,{tap:s})}if(this.params.enableFilterButton){let s=new Zv(this.eFilterButton,!0);this.addManagedListeners(s,{tap:()=>this.params.showFilter(this.eFilterButton)}),this.addDestroyFunc(()=>s.destroy())}this.addDestroyFunc(()=>e.destroy()),i&&this.addDestroyFunc(()=>r.destroy())}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){dc(this.eMenu),this.eMenu=void 0;return}let t=this.menuService.isLegacyMenuEnabled();this.addInIcon(t?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!t),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedElementListeners(this.eMenu,{click:()=>this.params.showColumnMenu(this.eMenu)}),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(t){let e=this.params.column,n=this.menuService.isLegacyMenuEnabled();if(t&&!n){if(this.menuService.isFilterMenuInHeaderEnabled(e))return this.params.showFilter(this.eFilterButton??this.eMenu??this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(this.eMenu??this.eFilterButton??this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.createBean(new $3e(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListeners(this.params.column,{movingChanged:()=>{this.lastMovingChanged=new Date().getTime()}}),this.eLabel&&this.addManagedElementListeners(this.eLabel,{click:e=>{let n=this.params.column.isMoving(),r=new Date().getTime()-this.lastMovingChanged<50;if(!(n||r)){let a=this.gos.get("multiSortKey")==="ctrl"?e.ctrlKey||e.metaKey:e.shiftKey;this.params.progressSort(a)}}});let t=()=>{let e=this.params.column.getSort();if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",e==="asc"),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",e==="desc"),this.addOrRemoveCssClass("ag-header-cell-sorted-none",!e),this.params.column.getColDef().showRowGroup){let r=!this.funcColsService.getSourceColumnsForGroupColumn(this.params.column)?.every(s=>this.params.column.getSort()==s.getSort());this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",r)}};this.addManagedEventListeners({sortChanged:t,columnRowGroupChanged:t})}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){if(!this.eFilterButton)return;this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedElementListeners(this.eFilterButton,{click:()=>this.params.showFilter(this.eFilterButton)}):this.eFilterButton=void 0}configureFilter(t,e,n){if(!t)return dc(e),!1;let i=this.params.column;return this.addInIcon("filter",e,i),this.addManagedListeners(i,{filterChanged:n}),n(),!0}onFilterChangedIcon(){let t=this.params.column.isFilterActive();Vn(this.eFilter,t,{skipAriaHidden:!0})}onFilterChangedButton(){let t=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",t)}getAnchorElementForMenu(t){return t?this.eFilterButton??this.eMenu??this.getGui():this.eMenu??this.eFilterButton??this.getGui()}},vzt=class extends ai{constructor(){super(`<div class="ag-header-group-cell-label" role="presentation">
            <span data-ref="agLabel" class="ag-header-group-text" role="presentation"></span>
            <span data-ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
            <span data-ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
        </div>`),this.agOpened=Bt,this.agClosed=Bt,this.agLabel=Bt}wireBeans(t){this.columnModel=t.columnModel}destroy(){super.destroy()}init(t){this.params=t,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&wt("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened",this.agOpened),this.addInIcon("columnGroupClosed",this.agClosed);let t=r=>{if(gg(r))return;let s=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),s,"uiColumnExpanded")};this.addTouchAndClickListeners(this.agClosed,t),this.addTouchAndClickListeners(this.agOpened,t);let e=r=>{Zc(r)};this.addManagedElementListeners(this.agClosed,{dblclick:e}),this.addManagedElementListeners(this.agOpened,{dblclick:e}),this.addManagedElementListeners(this.getGui(),{dblclick:t}),this.updateIconVisibility();let n=this.params.columnGroup.getProvidedColumnGroup(),i=this.updateIconVisibility.bind(this);this.addManagedListeners(n,{expandedChanged:i,expandableChanged:i})}addTouchAndClickListeners(t,e){let n=new Zv(t,!0);this.addManagedListeners(n,{tap:e}),this.addDestroyFunc(()=>n.destroy()),this.addManagedElementListeners(t,{click:e})}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){let e=this.params.columnGroup.isExpanded();Vn(this.agOpened,e),Vn(this.agClosed,!e)}else Vn(this.agOpened,!1),Vn(this.agClosed,!1)}addInIcon(t,e){let n=tr(t,this.gos,null);n&&e.appendChild(n)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){Vn(this.agOpened,!1),Vn(this.agClosed,!1);return}}setupLabel(){let{displayName:t,columnGroup:e}=this.params;if(Di(t)){let n=nl(t,!0);this.agLabel.textContent=n}this.addOrRemoveCssClass("ag-sticky-label",!e.getColGroupDef()?.suppressStickyLabel)}},wr=(t=>(t.CommunityCoreModule="@ag-grid-community/core",t.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",t.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",t.CsvExportModule="@ag-grid-community/csv-export",t.EnterpriseCoreModule="@ag-grid-enterprise/core",t.RowGroupingModule="@ag-grid-enterprise/row-grouping",t.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",t.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",t.MenuModule="@ag-grid-enterprise/menu",t.SetFilterModule="@ag-grid-enterprise/set-filter",t.MultiFilterModule="@ag-grid-enterprise/multi-filter",t.StatusBarModule="@ag-grid-enterprise/status-bar",t.SideBarModule="@ag-grid-enterprise/side-bar",t.RangeSelectionModule="@ag-grid-enterprise/range-selection",t.MasterDetailModule="@ag-grid-enterprise/master-detail",t.RichSelectModule="@ag-grid-enterprise/rich-select",t.GridChartsModule="@ag-grid-enterprise/charts",t.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",t.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",t.ExcelExportModule="@ag-grid-enterprise/excel-export",t.ClipboardModule="@ag-grid-enterprise/clipboard",t.SparklinesModule="@ag-grid-enterprise/sparklines",t.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",t.AngularModule="@ag-grid-community/angular",t.ReactModule="@ag-grid-community/react",t.VueModule="@ag-grid-community/vue",t))(wr||{}),yzt=(()=>{let t=class cd{static register(n){cd.__register(n,!0,void 0)}static registerModules(n){cd.__registerModules(n,!0,void 0)}static __register(n,i,r){cd.runVersionChecks(n),r!==void 0?(cd.areGridScopedModules=!0,cd.gridModulesMap[r]===void 0&&(cd.gridModulesMap[r]={}),cd.gridModulesMap[r][n.moduleName]=n):cd.globalModulesMap[n.moduleName]=n,cd.setModuleBased(i)}static __unRegisterGridModules(n){delete cd.gridModulesMap[n]}static __registerModules(n,i,r){cd.setModuleBased(i),n&&n.forEach(s=>cd.__register(s,i,r))}static isValidModuleVersion(n){let[i,r]=n.version.split(".")||[],[s,o]=cd.currentModuleVersion.split(".")||[];return i===s&&r===o}static runVersionChecks(n){cd.currentModuleVersion||(cd.currentModuleVersion=n.version);let i=r=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${r} Please update all modules to the same version.`;if(n.version?cd.isValidModuleVersion(n)||Do(i(`'${n.moduleName}' is version ${n.version} but the other modules are version ${cd.currentModuleVersion}.`)):Do(i(`'${n.moduleName}' is incompatible.`)),n.validate){let r=n.validate();r.isValid||Do(`${r.message}`)}}static setModuleBased(n){cd.moduleBased===void 0?cd.moduleBased=n:cd.moduleBased!==n&&(Do("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."),Do("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information."))}static __setIsBundled(){cd.isBundled=!0}static __assertRegistered(n,i,r){if(this.__isRegistered(n,r))return!0;let s;if(cd.isBundled)s=`AG Grid: unable to use ${i} 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(cd.moduleBased||cd.moduleBased===void 0){let o=Object.entries(wr).find(([a,l])=>l===n)?.[0];s=`AG Grid: unable to use ${i} as the ${o} is not registered${cd.areGridScopedModules?` for gridId: ${r}`:""}. Check if you have registered the module:
           
    import { ModuleRegistry } from '@ag-grid-community/core';
    import { ${o} } from '${n}';
    
    ModuleRegistry.registerModules([ ${o} ]);

For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else s=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
            
    import 'ag-grid-enterprise';`;return Do(s),!1}static __isRegistered(n,i){return!!cd.globalModulesMap[n]||!!cd.gridModulesMap[i]?.[n]}static __getRegisteredModules(n){return[..._A(cd.globalModulesMap),..._A(cd.gridModulesMap[n]||{})]}static __getGridRegisteredModules(n){return _A(cd.gridModulesMap[n]??{})||[]}static __isPackageBased(){return!cd.moduleBased}};return t.globalModulesMap={},t.gridModulesMap={},t.areGridScopedModules=!1,t})(),Sa=yzt,_zt="\u2191",Czt="\u2193",xzt=class extends ai{constructor(){super(),this.refreshCount=0;let t=document.createElement("span"),e=document.createElement("span");e.setAttribute("class","ag-value-change-delta");let n=document.createElement("span");n.setAttribute("class","ag-value-change-value"),t.appendChild(e),t.appendChild(n),this.setTemplateFromElement(t)}wireBeans(t){this.filterManager=t.filterManager}init(t){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(t,!0)}showDelta(t,e){let n=Math.abs(e),i=t.formatValue(n),r=Di(i)?i:n,s=e>=0;s?this.eDelta.textContent=_zt+r:this.eDelta.textContent=Czt+r,this.eDelta.classList.toggle("ag-value-change-delta-up",s),this.eDelta.classList.toggle("ag-value-change-delta-down",!s)}setTimerToRemoveDelta(){this.refreshCount++;let t=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{t===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),zo(this.eDelta)}refresh(t,e=!1){let n=t.value;if(n===this.lastValue||(Di(t.valueFormatted)?this.eValue.textContent=t.valueFormatted:Di(t.value)?this.eValue.textContent=n:zo(this.eValue),this.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof n=="number"&&typeof this.lastValue=="number"){let i=n-this.lastValue;this.showDelta(t,i)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),e||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},bzt=class extends ai{constructor(){super(),this.refreshCount=0;let t=document.createElement("span"),e=document.createElement("span");e.setAttribute("class","ag-value-slide-current"),t.appendChild(e),this.setTemplateFromElement(t),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}wireBeans(t){this.filterManager=t.filterManager}init(t){this.refresh(t,!0)}addSlideAnimation(){this.refreshCount++;let t=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);let e=document.createElement("span");e.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=e,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{t===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{t===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(t,e=!1){let n=t.value;return Ls(n)&&(n=""),n===this.lastValue||this.filterManager?.isSuppressFlashingCellsBecauseFiltering()?!1:(e||this.addSlideAnimation(),this.lastValue=n,Di(t.valueFormatted)?this.eCurrent.textContent=t.valueFormatted:Di(t.value)?this.eCurrent.textContent=n:zo(this.eCurrent),!0)}},It=(()=>{let t=class{};return t.BACKSPACE="Backspace",t.TAB="Tab",t.ENTER="Enter",t.ESCAPE="Escape",t.SPACE=" ",t.LEFT="ArrowLeft",t.UP="ArrowUp",t.RIGHT="ArrowRight",t.DOWN="ArrowDown",t.DELETE="Delete",t.F2="F2",t.PAGE_UP="PageUp",t.PAGE_DOWN="PageDown",t.PAGE_HOME="Home",t.PAGE_END="End",t.A="KeyA",t.C="KeyC",t.D="KeyD",t.V="KeyV",t.X="KeyX",t.Y="KeyY",t.Z="KeyZ",t})(),ZB=class extends ai{constructor(t,e,n){super(e,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=t||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");let{labelSeparator:t,label:e,labelWidth:n,labelAlignment:i,disabled:r}=this.config;r!=null&&this.setDisabled(r),t!=null&&this.setLabelSeparator(t),e!=null&&this.setLabel(e),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){zo(this.eLabel),typeof this.label=="string"?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),this.label===""?(Vn(this.eLabel,!1),dd(this.eLabel,"presentation")):(Vn(this.eLabel,!0),dd(this.eLabel,null))}setLabelSeparator(t){return this.labelSeparator===t?this:(this.labelSeparator=t,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(t){return this.label===t?this:(this.label=t,this.refreshLabel(),this)}setLabelAlignment(t){let n=this.getGui().classList;return n.toggle("ag-label-align-left",t==="left"),n.toggle("ag-label-align-right",t==="right"),n.toggle("ag-label-align-top",t==="top"),this}setLabelEllipsis(t){return this.eLabel.classList.toggle("ag-label-ellipsis",t),this}setLabelWidth(t){return this.label==null?this:(FZ(this.eLabel,t),this)}setDisabled(t){t=!!t;let e=this.getGui();return c3(e,t),e.classList.toggle("ag-disabled",t),this.disabled=t,this}isDisabled(){return!!this.disabled}},SGe=class extends ZB{constructor(t,e,n,i){super(t,e,n),this.className=i}postConstruct(){super.postConstruct();let{width:t,value:e,onValueChange:n}=this.config;t!=null&&this.setWidth(t),e!=null&&this.setValue(e),n!=null&&this.onValueChange(n),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(t){return super.setLabel(t),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){let t=this.getAriaElement(),e=this.getLabelId(),n=this.getLabel();n==null||n==""||jBt(t)!==null?jy(t,""):jy(t,e??"")}setAriaLabel(t){return hl(this.getAriaElement(),t),this.refreshAriaLabelledBy(),this}onValueChange(t){return this.addManagedListeners(this,{fieldValueChanged:()=>t(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(t){return E4(this.getGui(),t),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(t,e){return this.value===t?this:(this.previousValue=this.value,this.value=t,e||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}},lx=class extends SGe{constructor(t,e,n="text",i="input"){super(t,t?.template??`
            <div role="presentation">
                <div data-ref="eLabel" class="ag-input-field-label"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
                    <${i} data-ref="eInput" class="ag-input-field-input"></${i}>
                </div>
            </div>`,[],e),this.inputType=n,this.displayFieldTag=i,this.eLabel=Bt,this.eWrapper=Bt,this.eInput=Bt}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`;let{inputName:t,inputWidth:e}=this.config;t!=null&&this.setInputName(t),e!=null&&this.setInputWidth(e),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:t=>this.setValue(t.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(t){return FZ(this.eWrapper,t),this}setInputName(t){return this.getInputElement().setAttribute("name",t),this}getFocusableElement(){return this.eInput}setMaxLength(t){let e=this.eInput;return e.maxLength=t,this}setInputPlaceholder(t){return qv(this.eInput,"placeholder",t),this}setInputAriaLabel(t){return hl(this.eInput,t),this.refreshAriaLabelledBy(),this}setDisabled(t){return c3(this.eInput,t),super.setDisabled(t)}setAutoComplete(t){if(t===!0)qv(this.eInput,"autocomplete",null);else{let e=typeof t=="string"?t:"off";qv(this.eInput,"autocomplete",e)}return this}},b5=class extends lx{constructor(t,e="ag-checkbox",n="checkbox"){super(t,e,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();let{readOnly:t,passive:e}=this.config;typeof t=="boolean"&&this.setReadOnly(t),typeof e=="boolean"&&this.setPassive(e)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(t){this.passive=t}isReadOnly(){return this.readOnly}setReadOnly(t){this.eWrapper.classList.toggle("ag-disabled",t),this.eInput.disabled=t,this.readOnly=t}setDisabled(t){return this.eWrapper.classList.toggle("ag-disabled",t),super.setDisabled(t)}toggle(){if(this.eInput.disabled)return;let t=this.isSelected(),e=this.getNextValue();this.passive?this.dispatchChange(e,t):this.setValue(e)}getValue(){return this.isSelected()}setValue(t,e){return this.refreshSelectedClass(t),this.setSelected(t,e),this}setName(t){let e=this.getInputElement();return e.name=t,this}isSelected(){return this.selected}setSelected(t,e){this.isSelected()!==t&&(this.previousValue=this.isSelected(),t=this.selected=typeof t=="boolean"?t:void 0,this.eInput.checked=t,this.eInput.indeterminate=t===void 0,e||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(t,e,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:t,previousValue:e,event:n});let i=this.getInputElement();this.eventService.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:t,previousValue:e})}onCheckboxClick(t){if(this.passive||this.eInput.disabled)return;let e=this.isSelected(),n=this.selected=t.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,e,t)}refreshSelectedClass(t){this.eWrapper.classList.toggle("ag-checked",t===!0),this.eWrapper.classList.toggle("ag-indeterminate",t==null)}},d1={selector:"AG-CHECKBOX",component:b5},wzt=class extends ai{constructor(){super(`
            <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[d1]),this.eCheckbox=Bt}init(t){this.params=t,this.updateCheckbox(t);let e=this.eCheckbox.getInputElement();e.setAttribute("tabindex","-1"),aGe(e,"polite"),this.addManagedListeners(e,{click:n=>{if(Zc(n),this.eCheckbox.isDisabled())return;let i=this.eCheckbox.getValue();this.onCheckboxChanged(i)},dblclick:n=>{Zc(n)}}),this.addManagedElementListeners(this.params.eGridCell,{keydown:n=>{if(n.key===It.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===this.gos.getActiveDomElement()&&this.eCheckbox.toggle();let i=this.eCheckbox.getValue();this.onCheckboxChanged(i),n.preventDefault()}}})}refresh(t){return this.params=t,this.updateCheckbox(t),!0}updateCheckbox(t){let e,n=!0;if(t.node.group&&t.column)if(typeof t.value=="boolean")e=t.value;else{let a=t.column.getColId();a.startsWith(Xv)?e=t.value==null||t.value===""?void 0:t.value==="true":t.node.aggData&&t.node.aggData[a]!==void 0?e=t.value??void 0:n=!1}else e=t.value??void 0;if(!n){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(e);let i=t.disabled!=null?t.disabled:!t.column?.isCellEditable(t.node);this.eCheckbox.setDisabled(i);let r=this.localeService.getLocaleTextFunc(),s=H3e(r,e),o=i?s:`${r("ariaToggleCellValue","Press SPACE to toggle cell value")} (${s})`;this.eCheckbox.setInputAriaLabel(o)}onCheckboxChanged(t){let{column:e,node:n,value:i}=this.params;this.eventService.dispatchEvent({type:"cellEditingStarted",column:e,colDef:e?.getColDef(),data:n.data,node:n,rowIndex:n.rowIndex,rowPinned:n.rowPinned,value:i});let r=this.params.node.setDataValue(this.params.column,t,"edit");this.eventService.dispatchEvent({type:"cellEditingStopped",column:e,colDef:e?.getColDef(),data:n.data,node:n,rowIndex:n.rowIndex,rowPinned:n.rowPinned,value:i,oldValue:i,newValue:t,valueChanged:r})}},Szt=class extends ai{constructor(){super(`<div class="ag-loading">
            <span class="ag-loading-icon" data-ref="eLoadingIcon"></span>
            <span class="ag-loading-text" data-ref="eLoadingText"></span>
        </div>`),this.eLoadingIcon=Bt,this.eLoadingText=Bt}init(t){t.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){let t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingError","ERR")}setupLoading(){let t=tr("groupLoading",this.gos,null);t&&this.eLoadingIcon.appendChild(t);let e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingOoo","Loading")}refresh(t){return!1}destroy(){super.destroy()}},Tzt=class extends ai{constructor(){super('<div class="ag-skeleton-container"></div>')}init(t){let e=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",e),this.addDestroyFunc(()=>jy(t.eParentOfValue)),jy(t.eParentOfValue,e),t.node.failedLoad?this.setupFailed():this.setupLoading(t)}setupFailed(){let t=this.localeService.getLocaleTextFunc();this.getGui().innerText=t("loadingError","ERR");let e=t("ariaSkeletonCellLoadingFailed","Row failed to load");hl(this.getGui(),e)}setupLoading(t){let n=this.gos.getDocument().createElement("div");n.classList.add("ag-skeleton-effect");let i=t.node.rowIndex;if(i!=null){let o=75+25*(i%2===0?Math.sin(i):Math.cos(i));n.style.width=`${o}%`}this.getGui().appendChild(n);let s=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");hl(this.getGui(),s)}refresh(t){return!1}destroy(){super.destroy()}},TGe=class extends ai{constructor(){super()}destroy(){super.destroy()}},Dzt=class extends TGe{init(){let t=xu(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(t??'<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>'),!t){let e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("loadingOoo","Loading...")})}}},Ezt=class extends TGe{init(){let t=xu(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(t??'<span class="ag-overlay-no-rows-center"></span>'),!t){let e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("noRowsToShow","No Rows To Show")})}}},w5=class extends ai{isPopup(){return!0}setParentComponent(t){t.addCssClass("ag-has-popup"),super.setParentComponent(t)}destroy(){let t=this.parentComponent;t&&t.isAlive()&&t.getGui().classList.remove("ag-has-popup"),super.destroy()}},Mzt=class extends w5{constructor(){super('<div class="ag-tooltip"></div>')}init(t){let{value:e}=t;this.getGui().textContent=nl(e,!0)}};Azt=class extends Ot{constructor(){super(...arguments),this.beanName="userComponentRegistry",this.agGridDefaults={agColumnHeader:T3e,agColumnGroupHeader:vzt,agSortIndicator:$3e,agAnimateShowChangeCellRenderer:xzt,agAnimateSlideCellRenderer:bzt,agLoadingCellRenderer:Szt,agSkeletonCellRenderer:Tzt,agCheckboxCellRenderer:wzt,agLoadingOverlay:Dzt,agNoRowsOverlay:Ezt,agTooltipComponent:Mzt},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agGroupCellRenderer:"@ag-grid-enterprise/row-grouping",agGroupRowRenderer:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}postConstruct(){let t=this.gos.get("components");t!=null&&Rh(t,(e,n)=>this.registerJsComponent(e,n))}registerDefaultComponent(t,e){this.agGridDefaults[t]=e}registerJsComponent(t,e){this.jsComps[t]=e}retrieve(t,e){let n=(a,l)=>({componentFromFramework:l,component:a}),i=this.getFrameworkOverrides().frameworkComponent(e,this.gos.get("components"));if(i!=null)return n(i,!0);let r=this.jsComps[e];if(r){let a=this.getFrameworkOverrides().isFrameworkComponent(r);return n(r,a)}let s=this.agGridDefaults[e];if(s)return n(s,!1);let o=this.enterpriseAgDefaultCompsModule[e];return o?Sa.__assertRegistered(o,`AG Grid '${t}' component: ${e}`,this.gridId):jB(()=>{this.warnAboutMissingComponent(t,e)},"MissingComp"+e),null}warnAboutMissingComponent(t,e){let n=[...Object.keys(this.agGridDefaults).filter(r=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(r)),...Object.keys(this.jsComps)],i=DA(e,n,!0,.8).values;wt(`Could not find '${e}' component. It was configured as "${t}: '${e}'" but it wasn't found in the list of registered components.`),i.length>0&&wt(`         Did you mean: [${i.slice(0,3)}]?`),wt(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}},io=class RB{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(n=>this.onDone(n),n=>this.onReject(n))}static all(e){return e.length?new RB(n=>{let i=e.length,r=new Array(i);e.forEach((s,o)=>{s.then(a=>{r[o]=a,i--,i===0&&n(r)})})}):RB.resolve()}static resolve(e=null){return new RB(n=>n(e))}then(e){return new RB(n=>{this.status===1?n(e(this.resolution)):this.waiters.push(i=>n(e(i)))})}onDone(e){this.status=1,this.resolution=e,this.waiters.forEach(n=>n(e))}onReject(e){}},Pzt={propertyName:"dateComponent",cellRenderer:!1},Rzt={propertyName:"headerComponent",cellRenderer:!1},Fzt={propertyName:"headerGroupComponent",cellRenderer:!1},SHe={propertyName:"cellRenderer",cellRenderer:!0},Lzt={propertyName:"cellRenderer",cellRenderer:!1},Ozt={propertyName:"loadingCellRenderer",cellRenderer:!0},Nzt={propertyName:"cellEditor",cellRenderer:!1},THe={propertyName:"innerRenderer",cellRenderer:!0},Vzt={propertyName:"loadingOverlayComponent",cellRenderer:!1},Bzt={propertyName:"noRowsOverlayComponent",cellRenderer:!1},zzt={propertyName:"tooltipComponent",cellRenderer:!1},Y3e={propertyName:"filter",cellRenderer:!1},Hzt={propertyName:"floatingFilterComponent",cellRenderer:!1},Gzt={propertyName:"toolPanel",cellRenderer:!1},Wzt={propertyName:"statusPanel",cellRenderer:!1},Uzt={propertyName:"fullWidthCellRenderer",cellRenderer:!0},jzt={propertyName:"loadingCellRenderer",cellRenderer:!0},$zt={propertyName:"groupRowRenderer",cellRenderer:!0},Kzt={propertyName:"detailCellRenderer",cellRenderer:!0},Yzt={propertyName:"menuItem",cellRenderer:!1},DGe=class EGe extends Ot{constructor(){super(...arguments),this.beanName="userComponentFactory"}wireBeans(e){this.agComponentUtils=e.agComponentUtils,this.componentMetadataProvider=e.componentMetadataProvider,this.userComponentRegistry=e.userComponentRegistry,this.frameworkComponentWrapper=e.frameworkComponentWrapper,this.gridOptions=e.gridOptions}getHeaderCompDetails(e,n){return this.getCompDetails(e,Rzt,"agColumnHeader",n)}getHeaderGroupCompDetails(e){let n=e.columnGroup.getColGroupDef();return this.getCompDetails(n,Fzt,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Uzt,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,jzt,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,$zt,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Kzt,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,n){return this.getCompDetails(e,THe,null,n)}getFullWidthGroupRowInnerCellRenderer(e,n){return this.getCompDetails(e,THe,null,n)}getCellRendererDetails(e,n){return this.getCompDetails(e,SHe,null,n)}getEditorRendererDetails(e,n){return this.getCompDetails(e,Lzt,null,n)}getLoadingCellRendererDetails(e,n){return this.getCompDetails(e,Ozt,"agSkeletonCellRenderer",n,!0)}getCellEditorDetails(e,n){return this.getCompDetails(e,Nzt,"agCellEditor",n,!0)}getFilterDetails(e,n,i){return this.getCompDetails(e,Y3e,i,n,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,Pzt,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,Vzt,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,Bzt,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,zzt,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,n){return this.getCompDetails(e,SHe,null,n)}getFloatingFilterCompDetails(e,n,i){return this.getCompDetails(e,Hzt,i,n)}getToolPanelCompDetails(e,n){return this.getCompDetails(e,Gzt,null,n,!0)}getStatusPanelCompDetails(e,n){return this.getCompDetails(e,Wzt,null,n,!0)}getMenuItemCompDetails(e,n){return this.getCompDetails(e,Yzt,"agMenuItem",n,!0)}getCompDetails(e,n,i,r,s=!1){let{propertyName:o,cellRenderer:a}=n,{compName:l,jsComp:c,fwComp:d,paramsFromSelector:u,popupFromSelector:m,popupPositionFromSelector:f}=EGe.getCompKeys(this.frameworkOverrides,e,n,r),_=M=>{let I=this.userComponentRegistry.retrieve(o,M);I&&(c=I.componentFromFramework?void 0:I.component,d=I.componentFromFramework?I.component:void 0)};if(l!=null&&_(l),c==null&&d==null&&i!=null&&_(i),c&&a&&!this.agComponentUtils.doesImplementIComponent(c)&&(c=this.agComponentUtils.adaptFunction(o,c)),!c&&!d){s&&Do(`Could not find component ${l}, did you forget to configure this component?`);return}let x=this.mergeParamsWithApplicationProvidedParams(e,n,r,u),D=c==null,E=c||d;return{componentFromFramework:D,componentClass:E,params:x,type:n,popupFromSelector:m,popupPositionFromSelector:f,newAgStackInstance:()=>this.newAgStackInstance(E,D,x,n)}}static getCompKeys(e,n,i,r){let{propertyName:s}=i,o,a,l,c,d,u;if(n){let m=n,f=m[s+"Selector"],_=f?f(r):null,x=D=>{typeof D=="string"?o=D:D!=null&&D!==!0&&(e.isFrameworkComponent(D)?l=D:a=D)};_?(x(_.component),c=_.params,d=_.popup,u=_.popupPosition):x(m[s])}return{compName:o,jsComp:a,fwComp:l,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:u}}newAgStackInstance(e,n,i,r){let s=r.propertyName,o=!n,a;if(o)a=new e;else{let c=this.componentMetadataProvider.retrieve(s);a=this.frameworkComponentWrapper.wrap(e,c.mandatoryMethodList,c.optionalMethodList,r)}let l=this.initComponent(a,i);return l==null?io.resolve(a):l.then(()=>a)}mergeParamsWithApplicationProvidedParams(e,n,i,r=null){let s=this.gos.getGridCommonParams();im(s,i);let o=e,a=o&&o[n.propertyName+"Params"];if(typeof a=="function"){let l=a(i);im(s,l)}else typeof a=="object"&&im(s,a);return im(s,r),s}initComponent(e,n){if(this.createBean(e),e.init!=null)return e.init(n)}};qzt=class{constructor(t){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!t||!t.beanClasses)&&(this.beanDestroyComparator=t.beanDestroyComparator,this.init(t))}init(t){Object.entries(t.providedBeanInstances).forEach(([e,n])=>{this.beans[e]=n}),t.beanClasses.forEach(e=>{let n=new e;n.beanName?this.beans[n.beanName]=n:console.error(`Bean ${e.name} is missing beanName`),this.createdBeans.push(n)}),t.derivedBeans?.forEach(e=>{let{beanName:n,bean:i}=e(this);this.beans[n]=i,this.createdBeans.push(i)}),t.beanInitComparator&&this.createdBeans.sort(t.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(t,e){if(!t)throw Error("Can't wire to bean since it is null");return this.initBeans([t],e),t}initBeans(t,e){t.forEach(n=>{n.preWireBeans?.(this.beans),n.wireBeans?.(this.beans)}),t.forEach(n=>n.preConstruct?.()),e&&t.forEach(e),t.forEach(n=>n.postConstruct?.())}getBeans(){return this.beans}getBean(t){return this.beans[t]}destroy(){if(this.destroyed)return;this.destroyed=!0;let t=this.getBeanInstances();this.beanDestroyComparator&&t.sort(this.beanDestroyComparator),this.destroyBeans(t),this.beans={},this.createdBeans=[]}destroyBean(t){t?.destroy?.()}destroyBeans(t){if(t)for(let e=0;e<t.length;e++)this.destroyBean(t[e]);return[]}isDestroyed(){return this.destroyed}},Zzt=class extends qzt{init(t){this.gridId=t.gridId,this.beans.context=this,super.init(t)}destroy(){super.destroy(),Sa.__unRegisterGridModules(this.gridId)}getGridId(){return this.gridId}},_D=(t=>(t[t.SINGLE_SHEET=0]="SINGLE_SHEET",t[t.MULTI_SHEET=1]="MULTI_SHEET",t))(_D||{}),MGe=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(MGe||{}),u1=(t=>(t[t.ToolPanel=0]="ToolPanel",t[t.HeaderCell=1]="HeaderCell",t[t.RowDrag=2]="RowDrag",t[t.ChartPanel=3]="ChartPanel",t[t.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",t))(u1||{}),Xzt=`<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>`,Qzt=class extends Ot{constructor(){super(...arguments),this.beanName="dragAndDropService",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(t){this.dragService=t.dragService,this.mouseEventService=t.mouseEventService,this.environment=t.environment}postConstruct(){let t=e=>$y(e,this.gos,null);this.dropIconMap={pinned:t("columnMovePin"),hide:t("columnMoveHide"),move:t("columnMoveMove"),left:t("columnMoveLeft"),right:t("columnMoveRight"),group:t("columnMoveGroup"),aggregate:t("columnMoveValue"),pivot:t("columnMovePivot"),notAllowed:t("dropNotAllowed")}}addDragSource(t,e=!1){let n={eElement:t.eElement,dragStartPixels:t.dragStartPixels,onDragStart:this.onDragStart.bind(this,t),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:e};this.dragSourceAndParamsList.push({params:n,dragSource:t}),this.dragService.addDragSource(n)}removeDragSource(t){let e=this.dragSourceAndParamsList.find(n=>n.dragSource===t);e&&(this.dragService.removeDragSource(e.params),Ip(this.dragSourceAndParamsList,e))}destroy(){this.dragSourceAndParamsList.forEach(t=>this.dragService.removeDragSource(t.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0,super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(t,e){this.dragging=!0,this.dragSource=t,this.eventLastTime=e,this.dragItem=this.dragSource.getDragItem(),this.dragSource.onDragStarted?.(),this.createGhost()}onDragStop(t){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped?.(),this.lastDropTarget?.onDragStop){let e=this.createDropTargetEvent(this.lastDropTarget,t,null,null,!1);this.lastDropTarget.onDragStop(e)}this.lastDropTarget=void 0,this.dragItem=null,this.removeGhost()}onDragging(t,e){let n=this.getHorizontalDirection(t),i=this.getVerticalDirection(t);this.eventLastTime=t,this.positionGhost(t);let r=this.dropTargets.filter(o=>this.isMouseOnDropTarget(t,o)),s=this.findCurrentDropTarget(t,r);if(s!==this.lastDropTarget)this.leaveLastTargetIfExists(t,n,i,e),this.lastDropTarget!==null&&s===null&&this.dragSource.onGridExit?.(this.dragItem),this.lastDropTarget===null&&s!==null&&this.dragSource.onGridEnter?.(this.dragItem),this.enterDragTargetIfExists(s,t,n,i,e),this.lastDropTarget=s;else if(s&&s.onDragging){let o=this.createDropTargetEvent(s,t,n,i,e);s.onDragging(o)}}getAllContainersFromDropTarget(t){let e=t.getSecondaryContainers?t.getSecondaryContainers():null,n=[[t.getContainer()]];return e?n.concat(e):n}allContainersIntersect(t,e){for(let n of e){let{width:i,height:r,left:s,right:o,top:a,bottom:l}=n.getBoundingClientRect();if(i===0||r===0)return!1;let c=t.clientX>=s&&t.clientX<o,d=t.clientY>=a&&t.clientY<l;if(!c||!d)return!1}return!0}isMouseOnDropTarget(t,e){let n=this.getAllContainersFromDropTarget(e),i=!1;for(let o of n)if(this.allContainersIntersect(t,o)){i=!0;break}let{eElement:r,type:s}=this.dragSource;return e.targetContainsSource&&!e.getContainer().contains(r)?!1:i&&e.isInterestedIn(s,r)}findCurrentDropTarget(t,e){let n=e.length;if(n===0)return null;if(n===1)return e[0];let r=this.gos.getRootNode().elementsFromPoint(t.clientX,t.clientY);for(let s of r)for(let o of e)if(WB(this.getAllContainersFromDropTarget(o)).indexOf(s)!==-1)return o;return null}enterDragTargetIfExists(t,e,n,i,r){if(t){if(t.onDragEnter){let s=this.createDropTargetEvent(t,e,n,i,r);t.onDragEnter(s)}this.setGhostIcon(t.getIconName?t.getIconName():null)}}leaveLastTargetIfExists(t,e,n,i){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){let r=this.createDropTargetEvent(this.lastDropTarget,t,e,n,i);this.lastDropTarget.onDragLeave(r)}this.setGhostIcon(null)}}addDropTarget(t){this.dropTargets.push(t)}removeDropTarget(t){this.dropTargets=this.dropTargets.filter(e=>e.getContainer()!==t.getContainer())}hasExternalDropZones(){return this.dropTargets.some(t=>t.external)}findExternalZone(t){return this.dropTargets.filter(n=>n.external).find(n=>n.getContainer()===t.getContainer())||null}getHorizontalDirection(t){let e=this.eventLastTime&&this.eventLastTime.clientX,n=t.clientX;return e===n?null:e>n?0:1}getVerticalDirection(t){let e=this.eventLastTime&&this.eventLastTime.clientY,n=t.clientY;return e===n?null:e>n?0:1}createDropTargetEvent(t,e,n,i,r){let s=t.getContainer(),o=s.getBoundingClientRect(),{dragItem:a,dragSource:l}=this,c=e.clientX-o.left,d=e.clientY-o.top;return this.gos.addGridCommonParams({event:e,x:c,y:d,vDirection:i,hDirection:n,dragSource:l,fromNudge:r,dragItem:a,dropZoneTarget:s})}positionGhost(t){let e=this.eGhost;if(!e)return;let i=e.getBoundingClientRect().height,r=ezt()-2,s=tzt()-2,o=fGe(e.offsetParent),{clientY:a,clientX:l}=t,c=a-o.top-i/2,d=l-o.left-10,u=this.gos.getDocument(),m=u.defaultView||window,f=m.pageYOffset||u.documentElement.scrollTop,_=m.pageXOffset||u.documentElement.scrollLeft;r>0&&d+e.clientWidth>r+_&&(d=r+_-e.clientWidth),d<0&&(d=0),s>0&&c+e.clientHeight>s+f&&(c=s+f-e.clientHeight),c<0&&(c=0),e.style.left=`${d}px`,e.style.top=`${c}px`}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}createGhost(){this.eGhost=Rp(Xzt),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost),this.environment.applyThemeClasses(this.eGhost),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);let t=this.eGhost.querySelector(".ag-dnd-ghost-label"),e=this.dragSource.dragItemName;L3e(e)&&(e=e()),t.innerHTML=nl(e)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";let n=this.gos.getDocument(),i=null,r=null;try{i=n.fullscreenElement}catch{}finally{i||(i=this.gos.getRootNode());let s=i.querySelector("body");s?r=s:i instanceof ShadowRoot?r=i:i instanceof Document?r=i?.documentElement:r=i}this.eGhostParent=r,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):wt("Could not find document body, it is needed for dragging columns")}setGhostIcon(t,e=!1){zo(this.eGhostIcon);let n=null;t||(t=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():"notAllowed"),n=this.dropIconMap[t],this.eGhostIcon.classList.toggle("ag-shake-left-to-right",e),!(n===this.dropIconMap.hide&&this.gos.get("suppressDragLeaveHidesColumns"))&&n&&this.eGhostIcon.appendChild(n)}},XB=class{constructor(t){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=t.scrollContainer,this.scrollHorizontally=t.scrollAxis.indexOf("x")!==-1,this.scrollVertically=t.scrollAxis.indexOf("y")!==-1,this.scrollByTick=t.scrollByTick!=null?t.scrollByTick:20,t.onScrollCallback&&(this.onScrollCallback=t.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=t.getVerticalPosition,this.setVerticalPosition=t.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=t.getHorizontalPosition,this.setHorizontalPosition=t.setHorizontalPosition),this.shouldSkipVerticalScroll=t.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=t.shouldSkipHorizontalScroll||(()=>!1)}check(t,e=!1){let n=e||this.shouldSkipVerticalScroll();if(n&&this.shouldSkipHorizontalScroll())return;let i=this.scrollContainer.getBoundingClientRect(),r=this.scrollByTick;this.tickLeft=t.clientX<i.left+r,this.tickRight=t.clientX>i.right-r,this.tickUp=t.clientY<i.top+r&&!n,this.tickDown=t.clientY>i.bottom-r&&!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 t=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let e=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(e-t),this.tickDown&&this.setVerticalPosition(e+t)}if(this.scrollHorizontally){let e=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(e-t),this.tickRight&&this.setHorizontalPosition(e+t)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Jzt=class extends Ot{wireBeans(t){this.dragAndDropService=t.dragAndDropService,this.rowModel=t.rowModel,this.pageBoundsService=t.pageBoundsService,this.focusService=t.focusService,this.sortController=t.sortController,this.filterManager=t.filterManager,this.selectionService=t.selectionService,this.mouseEventService=t.mouseEventService,this.ctrlsService=t.ctrlsService,this.funcColsService=t.funcColsService,this.rangeService=t.rangeService}constructor(t){super(),this.eContainer=t}postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(t=>{let e=t.gridBodyCtrl;this.autoScrollService=new XB({scrollContainer:e.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>e.getScrollFeature().getVScrollPosition().top,setVerticalPosition:n=>e.getScrollFeature().setVerticalScrollPosition(n),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(t){return t===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){return!!(this.funcColsService.getRowGroupColumns().length||this.filterManager?.isAnyFilterPresent()||this.sortController.isSortActive())}getRowNodes(t){if(!this.isFromThisGrid(t))return t.dragItem.rowNodes||[];let e=t.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let i=[...this.selectionService.getSelectedNodes()].sort((r,s)=>r.rowIndex==null||s.rowIndex==null?0:this.getRowIndexNumber(r)-this.getRowIndexNumber(s));if(i.indexOf(e)!==-1)return i}return[e]}onDragEnter(t){t.dragItem.rowNodes=this.getRowNodes(t),this.dispatchGridEvent("rowDragEnter",t),this.getRowNodes(t).forEach(e=>{e.setDragging(!0)}),this.onEnterOrDragging(t)}onDragging(t){this.onEnterOrDragging(t)}isFromThisGrid(t){let{dragSourceDomDataKey:e}=t.dragSource;return e===this.gos.getDomDataKey()}isDropZoneWithinThisGrid(t){let n=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:i}=t;return!n.contains(i)}onEnterOrDragging(t){this.dispatchGridEvent("rowDragMove",t),this.lastDraggingEvent=t;let e=this.mouseEventService.getNormalisedPosition(t).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(t,e),this.autoScrollService.check(t.event)}doManagedDrag(t,e){let n=this.isFromThisGrid(t),i=this.gos.get("rowDragManaged"),r=t.dragItem.rowNodes;i&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!n?this.isDropZoneWithinThisGrid(t)||this.clientSideRowModel.highlightRowAtPixel(r[0],e):this.moveRows(r,e))}getRowIndexNumber(t){let e=t.getRowIndexString();return parseInt(Ar(e.split("-")),10)}moveRowAndClearHighlight(t){let e=this.clientSideRowModel.getLastHighlightedRowNode(),n=e&&e.highlighted===1,i=this.mouseEventService.getNormalisedPosition(t).y,r=t.dragItem.rowNodes,s=n?1:0;if(this.isFromThisGrid(t))r.forEach(o=>{o.rowTop<i&&(s-=1)}),this.moveRows(r,i,s);else{let o=this.gos.getRowIdCallback(),a=this.clientSideRowModel.getRowIndexAtPixel(i)+1;this.clientSideRowModel.getHighlightPosition(i)===0&&a--,this.clientSideRowModel.updateRowData({add:r.filter(l=>!this.clientSideRowModel.getRowNode(o?.({data:l.data,level:0,rowPinned:l.rowPinned})??l.data.id)).map(l=>l.data),addIndex:a})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(t,e,n=0){this.clientSideRowModel.ensureRowsAtPixel(t,e,n)&&(this.focusService.clearFocusedCell(),this.rangeService?.removeAllCellRanges())}addRowDropZone(t){if(!t.getContainer()){wt("addRowDropZone - A container target needs to be provided");return}if(this.dragAndDropService.findExternalZone(t)){wt("addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");return}let e={getContainer:t.getContainer};t.fromGrid?e=t:(t.onDragEnter&&(e.onDragEnter=n=>{t.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",n))}),t.onDragLeave&&(e.onDragLeave=n=>{t.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",n))}),t.onDragging&&(e.onDragging=n=>{t.onDragging(this.draggingToRowDragEvent("rowDragMove",n))}),t.onDragStop&&(e.onDragStop=n=>{t.onDragStop(this.draggingToRowDragEvent("rowDragEnd",n))})),this.dragAndDropService.addDropTarget(ve({isInterestedIn:n=>n===2,getIconName:()=>"move",external:!0},e))}getRowDropZone(t){let e=this.getContainer.bind(this),n=this.onDragEnter.bind(this),i=this.onDragLeave.bind(this),r=this.onDragging.bind(this),s=this.onDragStop.bind(this);return t?{getContainer:e,onDragEnter:t.onDragEnter?o=>{n(o),t.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",o))}:n,onDragLeave:t.onDragLeave?o=>{i(o),t.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",o))}:i,onDragging:t.onDragging?o=>{r(o),t.onDragging(this.draggingToRowDragEvent("rowDragMove",o))}:r,onDragStop:t.onDragStop?o=>{s(o),t.onDragStop(this.draggingToRowDragEvent("rowDragEnd",o))}:s,fromGrid:!0}:{getContainer:e,onDragEnter:n,onDragLeave:i,onDragging:r,onDragStop:s,fromGrid:!0}}draggingToRowDragEvent(t,e){let n=this.mouseEventService.getNormalisedPosition(e).y,i=n>this.pageBoundsService.getCurrentPageHeight(),r=-1,s;i||(r=this.rowModel.getRowIndexAtPixel(n),s=this.rowModel.getRow(r));let o;switch(e.vDirection){case 1:o="down";break;case 0:o="up";break;default:o=null;break}return this.gos.addGridCommonParams({type:t,event:e.event,node:e.dragItem.rowNode,nodes:e.dragItem.rowNodes,overIndex:r,overNode:s,y:n,vDirection:o})}dispatchGridEvent(t,e){let n=this.draggingToRowDragEvent(t,e);this.eventService.dispatchEvent(n)}onDragLeave(t){this.dispatchGridEvent("rowDragLeave",t),this.stopDragging(t),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(t){this.dispatchGridEvent("rowDragEnd",t),this.stopDragging(t),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(t))&&!this.isDropZoneWithinThisGrid(t)&&this.moveRowAndClearHighlight(t)}stopDragging(t){this.autoScrollService.ensureCleared(),this.getRowNodes(t).forEach(e=>{e.setDragging(!1)})}},eHt=class extends Ot{constructor(){super(...arguments),this.beanName="dragService",this.dragEndFunctions=[],this.dragSources=[]}wireBeans(t){this.mouseEventService=t.mouseEventService}destroy(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0,super.destroy()}removeListener(t){let e=t.dragSource.eElement,n=t.mouseDownListener;if(e.removeEventListener("mousedown",n),t.touchEnabled){let i=t.touchStartListener;e.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(t){let e=this.dragSources.find(n=>n.dragSource===t);e&&(this.removeListener(e),Ip(this.dragSources,e))}isDragging(){return this.dragging}addDragSource(t){let e=this.onMouseDown.bind(this,t),{eElement:n,includeTouch:i,stopPropagationForTouch:r}=t;n.addEventListener("mousedown",e);let s=null,o=this.gos.get("suppressTouch");i&&!o&&(s=a=>{W3e(a.target)||(r&&a.stopPropagation(),this.onTouchStart(t,a))},n.addEventListener("touchstart",s,{passive:!1})),this.dragSources.push({dragSource:t,mouseDownListener:e,touchStartListener:s,touchEnabled:!!i})}getStartTarget(){return this.startTarget}onTouchStart(t,e){this.currentDragParams=t,this.dragging=!1;let n=e.touches[0];this.touchLastTime=n,this.touchStart=n;let i=l=>this.onTouchMove(l,t.eElement),r=l=>this.onTouchUp(l,t.eElement),s=l=>{l.cancelable&&l.preventDefault()},o=e.target,a=[{target:this.gos.getRootNode(),type:"touchmove",listener:s,options:{passive:!1}},{target:o,type:"touchmove",listener:i,options:{passive:!0}},{target:o,type:"touchend",listener:r,options:{passive:!0}},{target:o,type:"touchcancel",listener:r,options:{passive:!0}}];this.addTemporaryEvents(a),t.dragStartPixels===0&&this.onCommonMove(n,this.touchStart,t.eElement)}onMouseDown(t,e){let n=e;if(t.skipMouseEvent&&t.skipMouseEvent(e)||n._alreadyProcessedByDragService||(n._alreadyProcessedByDragService=!0,e.button!==0))return;this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.currentDragParams=t,this.dragging=!1,this.mouseStartEvent=e,this.startTarget=e.target;let i=l=>this.onMouseMove(l,t.eElement),r=l=>this.onMouseUp(l,t.eElement),s=l=>l.preventDefault(),o=this.gos.getRootNode(),a=[{target:o,type:"mousemove",listener:i},{target:o,type:"mouseup",listener:r},{target:o,type:"contextmenu",listener:s}];this.addTemporaryEvents(a),t.dragStartPixels===0&&this.onMouseMove(e,t.eElement)}addTemporaryEvents(t){t.forEach(e=>{let{target:n,type:i,listener:r,options:s}=e;n.addEventListener(i,r,s)}),this.dragEndFunctions.push(()=>{t.forEach(e=>{let{target:n,type:i,listener:r,options:s}=e;n.removeEventListener(i,r,s)})})}isEventNearStartEvent(t,e){let{dragStartPixels:n}=this.currentDragParams,i=Di(n)?n:4;return wGe(t,e,i)}getFirstActiveTouch(t){for(let e=0;e<t.length;e++)if(t[e].identifier===this.touchStart.identifier)return t[e];return null}onCommonMove(t,e,n){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(t,e))return;this.dragging=!0,this.eventService.dispatchEvent({type:"dragStarted",target:n}),this.currentDragParams.onDragStart(e),this.currentDragParams.onDragging(e)}this.currentDragParams.onDragging(t)}onTouchMove(t,e){let n=this.getFirstActiveTouch(t.touches);n&&this.onCommonMove(n,this.touchStart,e)}onMouseMove(t,e){g5()&&this.gos.getDocument().getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.onCommonMove(t,this.mouseStartEvent,e)}shouldPreventMouseEvent(t){let e=this.gos.get("enableCellTextSelection"),n=t.type==="mousemove";return e&&n&&t.cancelable&&this.mouseEventService.isEventFromThisGrid(t)&&!this.isOverFormFieldElement(t)}isOverFormFieldElement(t){return!!t.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button")}onTouchUp(t,e){let n=this.getFirstActiveTouch(t.changedTouches);n||(n=this.touchLastTime),this.onUpCommon(n,e)}onMouseUp(t,e){this.onUpCommon(t,e)}onUpCommon(t,e){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(t),this.eventService.dispatchEvent({type:"dragStopped",target:e})),this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(n=>n()),this.dragEndFunctions.length=0}},GB=class extends ai{constructor(t,e,n,i,r,s){super(),this.cellValueFn=t,this.rowNode=e,this.column=n,this.customGui=i,this.dragStartPixels=r,this.suppressVisibilityChange=s,this.dragSource=null}wireBeans(t){this.beans=t}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(tr("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){let t=this.gos.get("rowDragManaged")?new iHt(this,this.beans,this.rowNode,this.column):new tHt(this,this.beans,this.rowNode,this.column);this.createManagedBean(t,this.beans.context)}}setDragElement(t,e){this.setTemplateFromElement(t),this.addDragSource(e)}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];let e=this.beans.selectionService.getSelectedNodes();return e.indexOf(this.rowNode)!==-1?e:[this.rowNode]}checkCompatibility(){let t=this.gos.get("rowDragManaged");this.gos.get("treeData")&&t&&wt("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(t){if(t){let e=t.getColDef();if(e.rowDragText)return e.rowDragText}return this.gos.get("rowDragText")}addDragSource(t=4){this.dragSource&&this.removeDragSource();let e=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(e,{mousedown:i=>{i?.preventDefault()}})[0]);let n=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:e,dragItemName:()=>{let i=this.getDragItem(),r=i.rowNodes?.length||1,s=this.getRowDragText(this.column);return s?s(i,r):r===1?this.cellValueFn():`${r} ${n("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:t,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},kGe=class extends Ot{constructor(t,e,n){super(),this.parent=t,this.rowNode=e,this.column=n}setDisplayedOrVisible(t){let e={skipAriaHidden:!0};if(t)this.parent.setDisplayed(!1,e);else{let n=!0,i=!1;this.column&&(n=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=L3e(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,e),this.parent.setVisible(n,e)):(this.parent.setDisplayed(n,e),this.parent.setVisible(!0,e))}}},tHt=class extends kGe{constructor(t,e,n,i){super(t,n,i),this.beans=e}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));let t=this.workOutVisibility.bind(this);this.addManagedListeners(this.rowNode,{dataChanged:t,cellChanged:t}),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:t}),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let t=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(t)}},iHt=class extends kGe{constructor(t,e,n,i){super(t,n,i),this.beans=e}postConstruct(){let t=this.workOutVisibility.bind(this);this.addManagedListeners(this.beans.eventService,{sortChanged:t,filterChanged:t,columnRowGroupChanged:t,newColumnsLoaded:t}),this.addManagedListeners(this.rowNode,{dataChanged:t,cellChanged:t}),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),n=e&&e.shouldPreventRowMove(),i=this.gos.get("suppressRowDrag"),r=this.beans.dragAndDropService.hasExternalDropZones(),s=n&&!r||i;this.setDisplayedOrVisible(s)}},nHt=new Set(["localEventService","__objectId","sticky"]),rHt=(()=>{let t=class mA{constructor(n){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=mA.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=n}setData(n){this.setDataCommon(n,!1)}updateData(n){this.setDataCommon(n,!0)}setDataCommon(n,i){let r=this.data;this.data=n,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();let s=this.createDataChangedEvent(n,r,i);this.localEventService?.dispatchEvent(s)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(n,i,r){return{type:"dataChanged",node:this,oldData:i,newData:n,update:r}}getRowIndexString(){return this.rowIndex==null?(Do("Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid."),null):this.rowPinned==="top"?"t-"+this.rowIndex:this.rowPinned==="bottom"?"b-"+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){let n=new mA(this.beans);return n.id=this.id,n.data=this.data,n.__daemon=!0,n.selected=this.selected,n.level=this.level,n}setDataAndId(n,i){let r=Di(this.id)?this.createDaemonNode():null,s=this.data;this.data=n,this.updateDataOnDetailNode(),this.setId(i),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,r);let o=this.createDataChangedEvent(n,s,!1);this.localEventService?.dispatchEvent(o)}checkRowSelectable(){let n=this.beans.gos.get("isRowSelectable");this.setRowSelectable(n?n(this):!0)}setRowSelectable(n,i){if(this.selectable!==n){if(this.selectable=n,this.dispatchRowEvent("selectableChanged"),i)return;if(this.beans.gos.get("groupSelectsChildren")){let s=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:s??!1,source:"selectableChanged"});return}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(n){let i=this.beans.gos.getRowIdCallback();if(i)if(this.data){let r=this.getGroupKeys(!0);this.id=i({data:this.data,parentKeys:r.length>0?r:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(mA.ID_PREFIX_ROW_GROUP)&&Do(`Row IDs cannot start with ${mA.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`)}else this.id=void 0;else this.id=n}getGroupKeys(n=!1){let i=[],r=this;for(n&&(r=r.parent);r&&r.level>=0;)i.push(r.key),r=r.parent;return i.reverse(),i}isPixelInRange(n){return!Di(this.rowTop)||!Di(this.rowHeight)?!1:n>=this.rowTop&&n<this.rowTop+this.rowHeight}updateIfDifferent(n,i,r){this[n]!==i&&(this[n]=i,this.dispatchRowEvent(r))}setFirstChild(n){this.updateIfDifferent("firstChild",n,"firstChildChanged")}setLastChild(n){this.updateIfDifferent("lastChild",n,"lastChildChanged")}setChildIndex(n){this.updateIfDifferent("childIndex",n,"childIndexChanged")}setRowTop(n){this.oldRowTop=this.rowTop,this.rowTop!==n&&(this.rowTop=n,this.dispatchRowEvent("topChanged"),this.setDisplayed(n!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setDisplayed(n){this.updateIfDifferent("displayed",n,"displayedChanged")}setDragging(n){this.updateIfDifferent("dragging",n,"draggingChanged")}setHighlighted(n){this.updateIfDifferent("highlighted",n,"rowHighlightChanged")}setHovered(n){this.hovered!==n&&(this.hovered=n)}isHovered(){return this.hovered}setAllChildrenCount(n){this.updateIfDifferent("allChildrenCount",n,"allChildrenCountChanged")}setMaster(n){this.master!==n&&(this.master&&!n&&(this.expanded=!1),this.master=n,this.dispatchRowEvent("masterChanged"))}setGroup(n){this.group!==n&&(this.group&&!n&&(this.expanded=!1),this.group=n,this.updateHasChildren(),this.checkRowSelectable(),this.dispatchRowEvent("groupChanged"))}setRowHeight(n,i=!1){this.rowHeight=n,this.rowHeightEstimated=i,this.dispatchRowEvent("heightChanged")}setRowAutoHeight(n,i){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[i.getId()]=n,n!=null&&(this.checkAutoHeightsDebounced==null&&(this.checkAutoHeightsDebounced=Ap(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let n=!1,i=!0,r=0,s=this.__autoHeights;if(s==null||(this.beans.visibleColsService.getAllAutoHeightCols().forEach(l=>{let c=s[l.getId()];if(c==null)if(this.beans.columnModel.isColSpanActive()){let d=[];switch(l.getPinned()){case"left":d=this.beans.visibleColsService.getLeftColsForRow(this);break;case"right":d=this.beans.visibleColsService.getRightColsForRow(this);break;case null:d=this.beans.columnViewportService.getColsWithinViewport(this);break}if(d.includes(l)){n=!0;return}c=-1}else{n=!0;return}else i=!1;c>r&&(r=c)}),n)||((i||r<10)&&(r=this.beans.gos.getRowHeightForNode(this).height),r==this.rowHeight))return;this.setRowHeight(r);let a=this.beans.rowModel;a.onRowHeightChangedDebounced&&a.onRowHeightChangedDebounced()}setRowIndex(n){this.updateIfDifferent("rowIndex",n,"rowIndexChanged")}setUiLevel(n){this.updateIfDifferent("uiLevel",n,"uiLevelChanged")}setExpanded(n,i,r){if(this.expanded===n)return;this.expanded=n,this.dispatchRowEvent("expandedChanged");let s=St(ve({},this.createGlobalRowEvent("rowGroupOpened")),{expanded:n,event:i||null});this.beans.rowNodeEventThrottle.dispatchExpanded(s,r),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(n){return this.beans.gos.addGridCommonParams({type:n,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}setDataValue(n,i,r){let o=typeof n!="string"?n:this.beans.columnModel.getCol(n)??this.beans.columnModel.getColDefCol(n),a=this.getValueFromValueService(o);if(this.beans.gos.get("readOnlyEdit"))return this.beans.eventService.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:o,colDef:o.getColDef(),data:this.data,node:this,oldValue:a,newValue:i,value:i,source:r}),!1;let l=this.beans.valueService.setValue(this,o,i,r);return this.dispatchCellChangedEvent(o,i,a),this.checkRowSelectable(),l}getValueFromValueService(n){let i=this.leafGroup&&this.beans.columnModel.isPivotMode(),r=this.group&&this.expanded&&!this.footer&&!i,s=!1,o=this.beans.gos.get("groupTotalRow")??this.beans.gos.get("groupIncludeFooter");typeof o!="function"?s=!!o:s=!!(this.beans.gos.getCallback("groupTotalRow")??this.beans.gos.getCallback("groupIncludeFooter"))({node:this});let a=this.beans.gos.get("groupSuppressBlankHeader"),l=r&&s&&!a;return this.beans.valueService.getValue(n,this,!1,l)}setGroupValue(n,i){let r=this.beans.columnModel.getCol(n);Ls(this.groupData)&&(this.groupData={});let s=r.getColId(),o=this.groupData[s];o!==i&&(this.groupData[s]=i,this.dispatchCellChangedEvent(r,i,o))}setAggData(n){let i=this.aggData;if(this.aggData=n,this.localEventService){let r=s=>{let o=this.aggData?this.aggData[s]:void 0,a=i?i[s]:void 0;if(o===a)return;let l=this.beans.columnModel.getCol(s);l&&this.dispatchCellChangedEvent(l,o,a)};for(let s in this.aggData)r(s);for(let s in n)s in this.aggData||r(s)}}updateHasChildren(){let n=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gos.isRowModelType("serverSide")){let r=this.beans.gos.get("treeData"),s=this.beans.gos.get("isServerSideGroup");n=!this.stub&&!this.footer&&(r?!!s&&s(this.data):!!this.group)}n!==this.__hasChildren&&(this.__hasChildren=!!n,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}isEmptyRowGroupNode(){return(this.group&&Gd(this.childrenAfterGroup))??!1}dispatchCellChangedEvent(n,i,r){let s={type:"cellChanged",node:this,column:n,newValue:i,oldValue:r};this.localEventService?.dispatchEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.footer?!1:this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(n){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(i=>i.depthFirstSearch(n)),n(this)}calculateSelectedFromChildren(){let n=!1,i=!1,r=!1;if(!this.childrenAfterGroup?.length)return this.selectable?this.selected:null;for(let s=0;s<this.childrenAfterGroup.length;s++){let o=this.childrenAfterGroup[s],a=o.isSelected();if(!o.selectable){let l=o.calculateSelectedFromChildren();if(l===null)continue;a=l}switch(a){case!0:n=!0;break;case!1:i=!0;break;default:r=!0;break}}if(!(r||n&&i))return n?!0:i?!1:this.selectable?this.selected:null}setSelectedInitialValue(n){this.selected=n}dispatchRowEvent(n){let i={type:n,node:this};this.localEventService?.dispatchEvent(i)}selectThisNode(n,i,r="api"){let s=!this.selectable&&n,o=this.selected===n;if(s||o)return!1;this.selected=n,this.dispatchRowEvent("rowSelected");let a=this.sibling;return a&&a.footer&&a.localEventService&&a.dispatchRowEvent("rowSelected"),this.beans.eventService.dispatchEvent(St(ve({},this.createGlobalRowEvent("rowSelected")),{event:i||null,source:r})),!0}setSelected(n,i=!1,r="api"){if(typeof r=="boolean"){wt("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:n,clearSelection:i,rangeSelect:!1,source:r})}setSelectedParams(n){return this.rowPinned?(wt("cannot select pinned rows"),0):this.id===void 0?(wt("cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(St(ve({},n),{nodes:[this.footer?this.sibling:this]}))}isRowPinned(){return this.rowPinned==="top"||this.rowPinned==="bottom"}isParentOfNode(n){let i=this.parent;for(;i;){if(i===n)return!0;i=i.parent}return!1}addEventListener(n,i){this.localEventService||(this.localEventService=new y5),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.localEventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new R3e(this.beans.frameworkOverrides));let r=this.frameworkEventListenerService?.wrap(i)??i;this.localEventService.addEventListener(n,r)}removeEventListener(n,i){if(!this.localEventService)return;let r=this.frameworkEventListenerService?.unwrap(i)??i;this.localEventService.removeEventListener(n,r),this.localEventService.noRegisteredListenersExist()&&(this.localEventService=null)}onMouseEnter(){this.dispatchRowEvent("mouseEnter")}onMouseLeave(){this.dispatchRowEvent("mouseLeave")}getFirstChildOfFirstChild(n){let i=this,r=!0,s=!1,o=null;for(;r&&!s;){let a=i.parent;Di(a)&&i.firstChild?a.rowGroupColumn===n&&(s=!0,o=a):r=!1,i=a}return s?o:null}isFullWidthCell(){if(this.detail)return!0;let n=this.beans.gos.getCallback("isFullWidthRow");return n?n({rowNode:this}):!1}getRoute(){if(this.key==null)return;let n=[],i=this;for(;i&&i.key!=null;)n.push(i.key),i=i.parent;return n.reverse()}createFooter(){if(this.sibling)return;let n=new mA(this.beans);Object.keys(this).forEach(i=>{nHt.has(i)||(n[i]=this[i])}),n.footer=!0,n.setRowTop(null),n.setRowIndex(null),n.oldRowTop=null,n.id="rowGroupFooter_"+this.id,n.sibling=this,this.sibling=n}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}};return t.ID_PREFIX_ROW_GROUP="row-group-",t.ID_PREFIX_TOP_PINNED="t-",t.ID_PREFIX_BOTTOM_PINNED="b-",t.OBJECT_ID_SEQUENCE=0,t})(),Pp=rHt,sHt=class extends Ot{constructor(){super(...arguments),this.beanName="filterManager",this.advancedFilterModelUpdateQueue=[]}wireBeans(t){this.columnModel=t.columnModel,this.dataTypeService=t.dataTypeService,this.quickFilterService=t.quickFilterService,this.advancedFilterService=t.advancedFilterService,this.columnFilterService=t.columnFilterService}postConstruct(){let t=this.refreshFiltersForAggregations.bind(this),e=this.updateAdvancedFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:t,columnPivotChanged:t,columnPivotModeChanged:t,newColumnsLoaded:e,columnVisible:e,advancedFilterEnabledChanged:({enabled:n})=>this.onAdvancedFilterEnabledChanged(n),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",n=>this.setAdvancedFilterModel(n.currentValue)),this.quickFilterService&&this.addManagedListeners(this.quickFilterService,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})})}isExternalFilterPresentCallback(){let t=this.gos.getCallback("isExternalFilterPresent");return typeof t=="function"?t({}):!1}doesExternalFilterPass(t){let e=this.gos.get("doesExternalFilterPass");return typeof e=="function"?e(t):!1}setFilterModel(t,e="api"){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}this.columnFilterService?.setFilterModel(t,e)}getFilterModel(){return this.columnFilterService?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.columnFilterService?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.columnFilterService?.isAggregateFilterPresent()}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(t){t?this.columnFilterService?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilterService?.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){return!!this.advancedFilterService?.isEnabled()}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}resetQuickFilterCache(){this.quickFilterService?.resetQuickFilterCache()}refreshFiltersForAggregations(){this.gos.getGroupAggFiltering()&&this.onFilterChanged()}onFilterChanged(t={}){let{source:e,additionalEventAttributes:n,columns:i=[]}=t;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.columnFilterService?this.columnFilterService.updateBeforeFilterChanged(t):io.resolve()).then(()=>{let r={source:e,type:"filterChanged",columns:i};n&&im(r,n),this.eventService.dispatchEvent(r),this.columnFilterService?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.columnFilterService?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilterService?.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!this.gos.getGroupAggFiltering()}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(t,e){return this.doesRowPassFilter({rowNode:e,filterInstanceToSkip:t})}doesRowPassAggregateFilters(t){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(t.rowNode)||this.isAggregateFilterPresent()&&!this.columnFilterService.doAggregateFiltersPass(t.rowNode,t.filterInstanceToSkip))}doesRowPassFilter(t){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(t.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(t.rowNode)||this.isColumnFilterPresent()&&!this.columnFilterService.doColumnFiltersPass(t.rowNode,t.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(t.rowNode))}isFilterActive(t){return!!this.columnFilterService?.isFilterActive(t)}getOrCreateFilterWrapper(t){return this.columnFilterService?.getOrCreateFilterWrapper(t)??null}getDefaultFloatingFilter(t){return this.columnFilterService.getDefaultFloatingFilter(t)}createFilterParams(t,e){return this.columnFilterService.createFilterParams(t,e)}isFilterAllowed(t){return this.isAdvancedFilterEnabled()?!1:!!this.columnFilterService?.isFilterAllowed(t)}getFloatingFilterCompDetails(t,e){return this.columnFilterService?.getFloatingFilterCompDetails(t,e)}getCurrentFloatingFilterParentModel(t){return this.columnFilterService?.getCurrentFloatingFilterParentModel(t)}destroyFilter(t,e="api"){this.columnFilterService?.destroyFilter(t,e)}areFilterCompsDifferent(t,e){return!!this.columnFilterService?.areFilterCompsDifferent(t,e)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(t){if(this.isAdvancedFilterEnabled()){if(this.dataTypeService?.isPendingInference()){this.advancedFilterModelUpdateQueue.push(t);return}this.advancedFilterService.setModel(t??null),this.onFilterChanged({source:"advancedFilter"})}}toggleAdvancedFilterBuilder(t,e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder({source:e,force:t})}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvancedFilterEnabled()?!1:!!this.columnFilterService?.hasFloatingFilters()}getFilterInstance(t,e){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}return this.columnFilterService?.getFilterInstance(t,e)}getColumnFilterInstance(t){return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve(void 0)):this.columnFilterService?.getColumnFilterInstance(t)??Promise.resolve(void 0)}warnAdvancedFilters(){wt("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(t){this.advancedFilterService?.getCtrl().setupHeaderComp(t)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advancedFilterModelUpdateQueue.forEach(t=>this.setAdvancedFilterModel(t)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(t){return this.columnFilterService?.getColumnFilterModel(t)}setColumnFilterModel(t,e){return this.isAdvancedFilterEnabled()?(this.warnAdvancedFilters(),Promise.resolve()):this.columnFilterService?.setColumnFilterModel(t,e)??Promise.resolve()}},CD=class extends ai{constructor(t,e){super('<div class="ag-filter"></div>'),this.column=t,this.source=e,this.filterWrapper=null}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??io.resolve()}afterGuiAttached(t){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiAttached?.(t)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiDetached?.()})}createFilter(t){let{column:e,source:n}=this;this.filterWrapper=this.filterManager?.getOrCreateFilterWrapper(e)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(i=>{let r=i.getGui();Di(r)||wt(`getGui method from filter returned ${r}; it should be a DOM element.`),this.appendChild(r),t&&this.eventService.dispatchEvent({type:"filterOpened",column:e,source:n,eGui:this.getGui()})})}onFilterDestroyed(t){(t.source==="api"||t.source==="paramsUpdated")&&t.column.getId()===this.column.getId()&&this.columnModel.getColDefCol(this.column)&&(zo(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},IGe="ag-resizer-wrapper",w7=(t,e)=>`<div data-ref="${t}Resizer" class="ag-resizer ag-resizer-${e}"></div>`,oHt=`<div class="${IGe}">
        ${w7("eTopLeft","topLeft")}
        ${w7("eTop","top")}
        ${w7("eTopRight","topRight")}
        ${w7("eRight","right")}
        ${w7("eBottomRight","bottomRight")}
        ${w7("eBottom","bottom")}
        ${w7("eBottomLeft","bottomLeft")}
        ${w7("eLeft","left")}
    </div>`,xD=class extends Ot{constructor(t,e){super(),this.element=t,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},e)}wireBeans(t){this.popupService=t.popupService,this.resizeObserverService=t.resizeObserverService,this.dragService=t.dragService}center(){let{clientHeight:t,clientWidth:e}=this.offsetParent,n=e/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(n,i)}initialisePosition(){if(this.positioned)return;let{centered:t,forcePopupParentAsOffsetParent:e,minWidth:n,width:i,minHeight:r,height:s,x:o,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,c=0,d=l1(this.element);if(d){let u=this.findBoundaryElement(),m=window.getComputedStyle(u);if(m.minWidth!=null){let f=u.offsetWidth-this.element.offsetWidth;c=parseInt(m.minWidth,10)-f}if(m.minHeight!=null){let f=u.offsetHeight-this.element.offsetHeight;l=parseInt(m.minHeight,10)-f}}if(this.minHeight=r||l,this.minWidth=n||c,i&&this.setWidth(i),s&&this.setHeight(s),(!i||!s)&&this.refreshSize(),t)this.center();else if(o||a)this.offsetElement(o,a);else if(d&&e){let u=this.boundaryEl,m=!0;if(u||(u=this.findBoundaryElement(),m=!1),u){let f=parseFloat(u.style.top),_=parseFloat(u.style.left);m?this.offsetElement(isNaN(_)?0:_,isNaN(f)?0:f):this.setPosition(_,f)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(t,e){if(!this.config.popup||t===this.movable)return;this.movable=t;let n=this.moveElementDragListener||{eElement:e,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};t?(this.dragService.addDragSource(n),this.moveElementDragListener=n):(this.dragService.removeDragSource(n),this.moveElementDragListener=void 0)}setResizable(t){if(this.clearResizeListeners(),t?this.addResizers():this.removeResizers(),typeof t=="boolean"){if(t===!1)return;t={topLeft:t,top:t,topRight:t,right:t,bottomRight:t,bottom:t,bottomLeft:t,left:t}}Object.keys(t).forEach(e=>{let i=!!t[e],r=this.getResizerElement(e),s={dragStartPixels:0,eElement:r,onDragStart:o=>this.onResizeStart(o,e),onDragging:this.onResize.bind(this),onDragStop:o=>this.onResizeEnd(o,e)};(i||!this.isAlive()&&!i)&&(i?(this.dragService.addDragSource(s),this.resizeListeners.push(s),r.style.pointerEvents="all"):r.style.pointerEvents="none",this.resizable[e]=i)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";let{height:t,width:e}=this.lastSize;e!==-1&&(this.element.style.width=`${e}px`),t!==-1&&(this.element.style.height=`${t}px`)}getHeight(){return this.element.offsetHeight}setHeight(t){let{popup:e}=this.config,n=this.element,i=!1;if(typeof t=="string"&&t.indexOf("%")!==-1)OB(n,t),t=TA(n),i=!0;else if(t=Math.max(this.minHeight,t),this.positioned){let r=this.getAvailableHeight();r&&t>r&&(t=r)}this.getHeight()!==t&&(i?(n.style.maxHeight="unset",n.style.minHeight="unset"):e?OB(n,t):(n.style.height=`${t}px`,n.style.flex="0 0 auto",this.lastSize.height=typeof t=="number"?t:parseFloat(t)))}getAvailableHeight(){let{popup:t,forcePopupParentAsOffsetParent:e}=this.config;this.positioned||this.initialisePosition();let{clientHeight:n}=this.offsetParent;if(!n)return null;let i=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),s=t?this.position.y:i.top,o=t?0:r.top,a=0;if(e){let c=this.element.parentElement;if(c){let{bottom:d}=c.getBoundingClientRect();a=d-i.bottom}}return n+o-s-a}getWidth(){return this.element.offsetWidth}setWidth(t){let e=this.element,{popup:n}=this.config,i=!1;if(typeof t=="string"&&t.indexOf("%")!==-1)E4(e,t),t=v5(e),i=!0;else if(this.positioned){t=Math.max(this.minWidth,t);let{clientWidth:r}=this.offsetParent,s=n?this.position.x:this.element.getBoundingClientRect().left;r&&t+s>r&&(t=r-s)}this.getWidth()!==t&&(i?(e.style.maxWidth="unset",e.style.minWidth="unset"):this.config.popup?E4(e,t):(e.style.width=`${t}px`,e.style.flex=" unset",this.lastSize.width=typeof t=="number"?t:parseFloat(t)))}offsetElement(t=0,e=0){let{forcePopupParentAsOffsetParent:n}=this.config,i=n?this.boundaryEl:this.element;i&&(this.popupService.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:t,y:e})}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))}constrainSizeToAvailableHeight(t){if(!this.config.forcePopupParentAsOffsetParent)return;let e=()=>{let n=this.getAvailableHeight();this.element.style.setProperty("max-height",`${n}px`)};t?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),e):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(t,e){this.position.x=t,this.position.y=e}updateDragStartPosition(t,e){this.dragStartPosition={x:t,y:e}}calculateMouseMovement(t){let{e,isLeft:n,isTop:i,anywhereWithin:r,topBuffer:s}=t,o=e.clientX-this.dragStartPosition.x,a=e.clientY-this.dragStartPosition.y,l=this.shouldSkipX(e,!!n,!!r,o)?0:o,c=this.shouldSkipY(e,!!i,s,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(t,e,n,i){let r=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:r.left,l=a<=0&&s.left>=t.clientX||s.right<=t.clientX&&s.right<=o.right;return l?!0:(e?l=i<0&&t.clientX>a+s.left||i>0&&t.clientX<a+s.left:n?l=i<0&&t.clientX>o.right||i>0&&t.clientX<a+s.left:l=i<0&&t.clientX>o.right||i>0&&t.clientX<o.right,l)}shouldSkipY(t,e,n=0,i){let r=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:r.top,l=a<=0&&s.top>=t.clientY||s.bottom<=t.clientY&&s.bottom<=o.bottom;return l?!0:(e?l=i<0&&t.clientY>a+s.top+n||i>0&&t.clientY<a+s.top:l=i<0&&t.clientY>o.bottom||i>0&&t.clientY<o.bottom,l)}createResizeMap(){let t=this.element;this.resizerMap={topLeft:{element:t.querySelector("[data-ref=eTopLeftResizer]")},top:{element:t.querySelector("[data-ref=eTopResizer]")},topRight:{element:t.querySelector("[data-ref=eTopRightResizer]")},right:{element:t.querySelector("[data-ref=eRightResizer]")},bottomRight:{element:t.querySelector("[data-ref=eBottomRightResizer]")},bottom:{element:t.querySelector("[data-ref=eBottomResizer]")},bottomLeft:{element:t.querySelector("[data-ref=eBottomLeftResizer]")},left:{element:t.querySelector("[data-ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;let t=this.element;if(!t)return;let n=new DOMParser().parseFromString(oHt,"text/html").body;t.appendChild(n.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;let t=this.element.querySelector(`.${IGe}`);t&&this.element.removeChild(t),this.resizersAdded=!1}getResizerElement(t){return this.resizerMap[t].element}onResizeStart(t,e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!e.match(/top/i),isRight:!!e.match(/right/i),isBottom:!!e.match(/bottom/i),isLeft:!!e.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[e].element.classList.add("ag-active");let{popup:n,forcePopupParentAsOffsetParent:i}=this.config;!n&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(t.clientX,t.clientY)}getSiblings(){let e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(n=>!n.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let t=this.getSiblings()||[],e=0,n=0;for(let i=0;i<t.length;i++){let r=t[i],s=!!r.style.flex&&r.style.flex!=="0 0 auto";if(r===this.element)continue;let o=this.minHeight||0,a=this.minWidth||0;if(s){let l=window.getComputedStyle(r);l.minHeight&&(o=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else o=r.offsetHeight,a=r.offsetWidth;e+=o,n+=a}return{height:e,width:n}}applySizeToSiblings(t){let e=null,n=this.getSiblings();if(n){for(let i=0;i<n.length;i++){let r=n[i];r!==e&&(t?r.style.height=`${r.offsetHeight}px`:r.style.width=`${r.offsetWidth}px`,r.style.flex="0 0 auto",r===this.element&&(e=n[i+1]))}e&&(e.style.removeProperty("height"),e.style.removeProperty("min-height"),e.style.removeProperty("max-height"),e.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(t=>t)}onResize(t){if(!this.isResizing||!this.currentResizer)return;let{popup:e,forcePopupParentAsOffsetParent:n}=this.config,{isTop:i,isRight:r,isBottom:s,isLeft:o}=this.currentResizer,a=r||o,l=s||i,{movementX:c,movementY:d}=this.calculateMouseMovement({e:t,isLeft:o,isTop:i}),u=this.position.x,m=this.position.y,f=0,_=0;if(a&&c){let x=o?-1:1,D=this.getWidth(),E=D+c*x,M=!1;o&&(f=D-E,(u+f<=0||E<=this.minWidth)&&(M=!0,f=0)),M||this.setWidth(E)}if(l&&d){let x=i?-1:1,D=this.getHeight(),E=D+d*x,M=!1;i?(_=D-E,(m+_<=0||E<=this.minHeight)&&(M=!0,_=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&D<E&&this.getMinSizeOfSiblings().height+E>this.element.parentElement.offsetHeight&&(M=!0),M||this.setHeight(E)}this.updateDragStartPosition(t.clientX,t.clientY),((e||n)&&f||_)&&this.offsetElement(u+f,m+_)}onResizeEnd(t,e){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[e].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){let t=this.element;this.config.popup&&(this.config.width||this.setWidth(t.offsetWidth),this.config.height||this.setHeight(t.offsetHeight))}onMoveStart(t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(t.clientX,t.clientY)}onMove(t){if(!this.isMoving)return;let{x:e,y:n}=this.position,i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());let{movementX:r,movementY:s}=this.calculateMouseMovement({e:t,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(e+r,n+s),this.updateDragStartPosition(t.clientX,t.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 t=this.element;for(;t;){if(window.getComputedStyle(t).position!=="static")return t;t=t.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){let t=this.resizeListeners.pop();this.dragService.removeDragSource(t)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},aHt=(()=>{let t=class AGe extends Ot{constructor(n,i={}){super(),this.eFocusableElement=n,this.callbacks=i,this.callbacks=ve({shouldStopEventPropagation:()=>!1,onTabKeyDown:r=>{if(r.defaultPrevented)return;let s=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,r.shiftKey);s&&(s.focus(),r.preventDefault())}},i)}wireBeans(n){this.focusService=n.focusService}postConstruct(){this.eFocusableElement.classList.add(AGe.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedElementListeners(this.eFocusableElement,{focusin:this.callbacks.onFocusIn}),this.callbacks.onFocusOut&&this.addManagedElementListeners(this.eFocusableElement,{focusout:this.callbacks.onFocusOut})}addKeyDownListeners(n){this.addManagedElementListeners(n,{keydown:i=>{if(!(i.defaultPrevented||gg(i))){if(this.callbacks.shouldStopEventPropagation(i)){Zc(i);return}i.key===It.TAB?this.callbacks.onTabKeyDown(i):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(i)}}})}};return t.FOCUS_MANAGED_CLASS="ag-focus-managed",t})(),Ky=aHt,PGe={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:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};EA=class extends ai{constructor(t){super(),this.filterNameKey=t,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=Bt,this.buttonListeners=[]}wireBeans(t){this.rowModel=t.rowModel}postConstruct(){this.resetTemplate(),this.createManagedBean(new Ky(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new xD(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(t){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(t){let e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit);let n=`
            <form class="ag-filter-wrapper">
                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" data-ref="eFilterBody">
                    ${this.createBodyTemplate()}
                </div>
            </form>`;this.setTemplate(n,this.getAgComponents(),t),e=this.getGui(),e&&e.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(t){this.setParams(t),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(t){this.providedFilterParams=t,this.applyActive=LZ(t),this.resetButtonsPanel(t)}updateParams(t){this.providedFilterParams=t,this.applyActive=LZ(t),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(t,e){let{buttons:n,readOnly:i}=e??{},{buttons:r,readOnly:s}=t;if(i===s&&mD(n,r))return;let o=r&&r.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(zo(this.eButtonsPanel),this.buttonListeners.forEach(c=>c()),this.buttonListeners=[]):o&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!o){this.eButtonsPanel&&dc(this.eButtonsPanel);return}let a=document.createDocumentFragment(),l=c=>{let d,u;switch(c){case"apply":d=this.translate("applyFilter"),u=_=>this.onBtApply(!1,!1,_);break;case"clear":d=this.translate("clearFilter"),u=()=>this.onBtClear();break;case"reset":d=this.translate("resetFilter"),u=()=>this.onBtReset();break;case"cancel":d=this.translate("cancelFilter"),u=_=>{this.onBtCancel(_)};break;default:wt("Unknown button type specified");return}let f=Rp(`<button
                    type="${c==="apply"?"submit":"button"}"
                    data-ref="${c}FilterButton"
                    class="ag-button ag-standard-button ag-filter-apply-panel-button"
                >${d}
                </button>`);this.buttonListeners.push(...this.addManagedElementListeners(f,{click:u})),a.append(f)};r.forEach(c=>l(c)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){let t=q3e(this.providedFilterParams,this.getDefaultDebounceMs()),e=Ap(this.checkApplyDebounce.bind(this),t);this.onBtApplyDebounce=()=>{this.debouncePending=!0,e()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(t){return(t!=null?this.setModelIntoUi(t):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(t){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(t)})}handleCancelEnd(t){this.providedFilterParams.closeOnApply&&this.close(t)}resetUiToActiveModel(t,e){let n=()=>{this.onUiChanged(!1,"prevent"),e?.()};t!=null?this.setModelIntoUi(t).then(n):this.resetUiToDefaults().then(n)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(t="api"){let e=this.getModelFromUi();if(!this.isModelValid(e))return!1;let n=this.appliedModel;return this.appliedModel=e,!this.areModelsEqual(n,e)}isModelValid(t){return!0}onFormSubmit(t){t.preventDefault()}onBtApply(t=!1,e=!1,n){n&&n.preventDefault(),this.applyModel(e?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:t,afterDataChange:e,source:"columnFilter"});let{closeOnApply:i}=this.providedFilterParams;i&&this.applyActive&&!t&&!e&&this.close(n)}onNewRowsLoaded(){}close(t){if(!this.hidePopup)return;let e=t,n=e&&e.key,i;(n==="Enter"||n==="Space")&&(i={keyboardEvent:e}),this.hidePopup(i),this.hidePopup=null}onUiChanged(t=!1,e){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){let n=this.isModelValid(this.getModelFromUi()),i=this.queryForHtmlElement('[data-ref="applyFilterButton"]');i&&c3(i,!n)}t&&!e||e==="immediately"?this.onBtApply(t):(!this.applyActive&&!e||e==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(t){t&&(this.hidePopup=t.hidePopup),this.refreshFilterResizer(t?.container)}refreshFilterResizer(t){if(!this.positionableFeature||t==="toolPanel")return;let e=t==="floatingFilter"||t==="columnFilter",{positionableFeature:n,gos:i}=this;e?(n.restoreLastSize(),n.setResizable(i.get("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)}refresh(t){let e=this.providedFilterParams;return this.providedFilterParams=t,this.resetButtonsPanel(t,e),!0}destroy(){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(t){return this.localeService.getLocaleTextFunc()(t,PGe[t])}getCellValue(t){return this.providedFilterParams.getValue(t)}getPositionableElement(){return this.eFilterBody}},lHt=class extends b5{constructor(t){super(t,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(t){t.selected&&t.name&&this.eInput.name&&this.eInput.name===t.name&&t.id&&this.eInput.id!==t.id&&this.setValue(!1,!0)}},cHt=class extends ai{constructor(t="default",e=!1){super(`<div class="ag-list ag-${t}-list" role="listbox"></div>`),this.cssIdentifier=t,this.unFocusable=e,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){let t=this.getGui();this.addManagedElementListeners(t,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(t,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(t){let e=t.key;switch(e){case It.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{let n=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(n)}break;case It.DOWN:case It.UP:t.preventDefault(),this.navigate(e);break;case It.PAGE_DOWN:case It.PAGE_UP:case It.PAGE_HOME:case It.PAGE_END:t.preventDefault(),this.navigateToPage(e);break}}navigate(t){let e=t===It.DOWN,n;if(!this.highlightedEl)n=this.itemEls[e?0:this.itemEls.length-1];else{let r=this.itemEls.indexOf(this.highlightedEl)+(e?1:-1);r=Math.min(Math.max(r,0),this.itemEls.length-1),n=this.itemEls[r]}this.highlightItem(n)}navigateToPage(t){if(!this.highlightedEl||this.itemEls.length===0)return;let e=this.itemEls.indexOf(this.highlightedEl),n=this.options.length-1,i=this.itemEls[0].clientHeight,r=Math.floor(this.getGui().clientHeight/i),s=-1;t===It.PAGE_HOME?s=0:t===It.PAGE_END?s=n:t===It.PAGE_DOWN?s=Math.min(e+r,n):t===It.PAGE_UP&&(s=Math.max(e-r,0)),s!==-1&&this.highlightItem(this.itemEls[s])}addOptions(t){return t.forEach(e=>this.addOption(e)),this}addOption(t){let{value:e,text:n}=t,i=n||e;return this.options.push({value:e,text:i}),this.renderOption(e,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(t=>{dc(t)}),this.itemEls=[]}updateIndices(){let t=this.getGui().querySelectorAll(".ag-list-item");t.forEach((e,n)=>{gD(e,n+1),fD(e,t.length)})}renderOption(t,e){let n=this.gos.getDocument(),i=n.createElement("div");dd(i,"option"),i.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);let r=n.createElement("span");i.appendChild(r),r.textContent=e,this.unFocusable||(i.tabIndex=-1),this.itemEls.push(i),this.addManagedListeners(i,{mouseover:()=>this.highlightItem(i),mousedown:s=>{s.preventDefault(),s.stopPropagation(),this.setValue(t)}}),this.createManagedBean(new W1({getTooltipValue:()=>e,getGui:()=>i,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth})),this.getGui().appendChild(i)}setValue(t,e){if(this.value===t)return this.fireItemSelected(),this;if(t==null)return this.reset(e),this;let n=this.options.findIndex(i=>i.value===t);if(n!==-1){let i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.itemEls[n]),e||this.fireChangeEvent()}return this}setValueByIndex(t){return this.setValue(this.options[t].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();let t=this.options.findIndex(e=>e.value===this.value);t!==-1&&this.highlightItem(this.itemEls[t])}reset(t){this.value=null,this.displayValue=null,this.clearHighlighted(),t||this.fireChangeEvent()}highlightItem(t){if(!l1(t))return;this.clearHighlighted(),this.highlightedEl=t,this.highlightedEl.classList.add(this.activeClass),bA(this.highlightedEl,!0);let e=this.getGui(),{scrollTop:n,clientHeight:i}=e,{offsetTop:r,offsetHeight:s}=t;(r+s>n+i||r<n)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){!this.highlightedEl||!l1(this.highlightedEl)||(this.highlightedEl.classList.remove(this.activeClass),bA(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},QB=class extends SGe{constructor(t){if(super(t,t?.template||`
            <div class="ag-picker-field" role="presentation">
                <div data-ref="eLabel"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
                    <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
                    <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
                </div>
            </div>`,t?.agComponents||[],t?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=Bt,this.eWrapper=Bt,this.eDisplayField=Bt,this.eIcon=Bt,this.ariaRole=t?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!t)return;let{pickerGap:e,maxPickerHeight:n,variableWidth:i,minPickerWidth:r,maxPickerWidth:s}=t;e!=null&&(this.pickerGap=e),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),r!=null&&this.setPickerMinWidth(r),s!=null&&this.setPickerMaxWidth(s)}wireBeans(t){this.popupService=t.popupService}postConstruct(){super.postConstruct(),this.setupAria();let t=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",t);let e=this.getAriaElement();this.addManagedElementListeners(e,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});let{pickerIcon:n,inputWidth:i}=this.config;if(n){let r=tr(n,this.gos);r&&this.eIcon.appendChild(r)}i!=null&&this.setInputWidth(i)}setupAria(){let t=this.getAriaElement();t.setAttribute("tabindex",this.gos.get("tabIndex").toString()),ip(t,!1),this.ariaRole&&dd(t,this.ariaRole)}onLabelOrWrapperMouseDown(t){if(t){let e=this.getFocusableElement();if(e!==this.eWrapper&&t?.target===e)return;t.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(t){switch(t.key){case It.UP:case It.DOWN:case It.ENTER:case It.SPACE:t.preventDefault(),this.onLabelOrWrapperMouseDown();break;case It.ESCAPE:this.isPickerDisplayed&&(t.preventDefault(),t.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());let t=this.pickerComponent.getGui();t.addEventListener("focusin",this.onPickerFocusIn),t.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let t=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let e=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:n,pickerAriaLabelValue:i,modalPicker:r=!0}=this.config,s={modal:r,eChild:t,closeOnEsc:!0,closedCallback:()=>{let m=this.gos.isNothingFocused();this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:e(n,i),anchorToElement:this.eWrapper};t.style.position="absolute";let o=this.popupService.addPopup(s),{maxPickerHeight:a,minPickerWidth:l,maxPickerWidth:c,variableWidth:d}=this;d?(l&&(t.style.minWidth=l),t.style.width=j3e(v5(this.eWrapper)),c&&(t.style.maxWidth=c)):FZ(t,c??v5(this.eWrapper));let u=a??`${YB(this.popupService.getPopupParent())}px`;return t.style.setProperty("max-height",u),this.alignPickerToComponent(),o.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerType:t}=this.config,{pickerGap:e}=this,n=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:t,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:n,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);let t=this.pickerComponent.getGui();t.removeEventListener("focusin",this.onPickerFocusIn),t.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(t){if(!this.isAlive())return;let e=this.getAriaElement();ip(e,t),this.eWrapper.classList.toggle("ag-picker-expanded",t),this.eWrapper.classList.toggle("ag-picker-collapsed",!t)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(t){this.pickerComponent?.getGui().contains(t.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(t){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",t)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(t){return FZ(this.eWrapper,t),this}getFocusableElement(){return this.eWrapper}setPickerGap(t){return this.pickerGap=t,this}setPickerMinWidth(t){return typeof t=="number"&&(t=`${t}px`),this.minPickerWidth=t??void 0,this}setPickerMaxWidth(t){return typeof t=="number"&&(t=`${t}px`),this.maxPickerWidth=t??void 0,this}setPickerMaxHeight(t){return typeof t=="number"&&(t=`${t}px`),this.maxPickerHeight=t??void 0,this}destroy(){this.hidePicker(),super.destroy()}},np=class extends QB{constructor(t){super(ve({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},t))}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{options:t,value:e,placeholder:n}=this.config;t!=null&&this.addOptions(t),e!=null&&this.setValue(e,!0),n&&e==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(t){this.eWrapper.contains(t.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new cHt("select",!0)),this.listComponent.setParentComponent(this);let t=this.listComponent.getAriaElement(),e=`ag-select-list-${this.listComponent.getCompId()}`;t.setAttribute("id",e),KB(this.getAriaElement(),t),this.listComponent.addManagedListeners(this.listComponent,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})}}),this.listComponent.addManagedListeners(this.listComponent,{fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(t){let{key:e}=t;switch(e===It.TAB&&this.hidePicker(),e){case It.ENTER:case It.UP:case It.DOWN:case It.PAGE_UP:case It.PAGE_DOWN:case It.PAGE_HOME:case It.PAGE_END:t.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(t):super.onKeyDown(t);break;case It.ESCAPE:super.onKeyDown(t);break;case It.SPACE:this.isPickerDisplayed?t.preventDefault():super.onKeyDown(t);break}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(t){return t.forEach(e=>this.addOption(e)),this}addOption(t){return this.listComponent.addOption(t),this}clearOptions(){return this.listComponent?.clearOptions(),this}setValue(t,e,n){if(this.value===t||!this.listComponent)return this;if(n||this.listComponent.setValue(t,!0),this.listComponent.getValue()===this.getValue())return this;let r=this.listComponent.getDisplayValue();return r==null&&this.config.placeholder&&(r=this.config.placeholder),this.eDisplayField.textContent=r,this.setTooltip({newTooltipText:r??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(t,e)}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},hx={selector:"AG-SELECT",component:np},RGe=class{constructor(){this.customFilterOptions={}}init(t,e){this.filterOptions=t.filterOptions||e,this.mapCustomOptions(),this.selectDefaultItem(t)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(t=>{if(typeof t=="string")return;let e=[["displayKey"],["displayName"],["predicate","test"]],n=i=>i.some(r=>t[r]!=null)?!0:(wt(`ignoring FilterOptionDef as it doesn't contain one of '${i}'`),!1);if(!e.every(n)){this.filterOptions=this.filterOptions.filter(i=>i===t)||[];return}this.customFilterOptions[t.displayKey]=t})}selectDefaultItem(t){if(t.defaultOption)this.defaultOption=t.defaultOption;else if(this.filterOptions.length>=1){let e=this.filterOptions[0];typeof e=="string"?this.defaultOption=e:e.displayKey?this.defaultOption=e.displayKey:wt("invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else wt("no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(t){return this.customFilterOptions[t]}},FGe=class extends EA{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(t){let e=this.optionsFactory.getCustomOption(t);if(e){let{numberOfInputs:i}=e;return i??1}return t&&["empty","notBlank","blank"].indexOf(t)>=0?0:t==="inRange"?2:1}onFloatingFilterChanged(t,e){this.setTypeFromFloatingFilter(t),this.setValueFromFloatingFilter(e),this.onUiChanged(!0)}setTypeFromFloatingFilter(t){this.eTypes.forEach((e,n)=>{n===0?e.setValue(t,!0):e.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){let t=this.getUiCompleteConditions();return t.length===0?null:this.maxNumConditions>1&&t.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),conditions:t}:t[0]}getConditionTypes(){return this.eTypes.map(t=>t.getValue())}getConditionType(t){return this.eTypes[t].getValue()}getJoinOperator(){return this.eJoinOperatorsOr.length===0?this.defaultJoinOperator:this.eJoinOperatorsOr[0].getValue()===!0?"OR":"AND"}areModelsEqual(t,e){if(!t&&!e)return!0;if(!t&&e||t&&!e)return!1;let n=!t.operator,i=!e.operator;if(!n&&i||n&&!i)return!1;let s;if(n){let o=t,a=e;s=this.areSimpleModelsEqual(o,a)}else{let o=t,a=e;s=o.operator===a.operator&&Cf(o.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return s}shouldRefresh(t){let e=this.getModel(),n=e?e.conditions??[e]:null,i=t.filterOptions?.map(s=>typeof s=="string"?s:s.displayKey)??this.getDefaultFilterOptions();return!(!(!n||n.every(s=>i.find(o=>o===s.type)!==void 0))||typeof t.maxNumConditions=="number"&&n&&n.length>t.maxNumConditions)}refresh(t){return!this.shouldRefresh(t)||!super.refresh(t)?!1:(this.setParams(t),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(t){if(t.operator){let n=t,i=n.conditions;i==null&&(i=[],wt("Filter model is missing 'conditions'"));let r=this.validateAndUpdateConditions(i),s=this.getNumConditions();if(r<s)this.removeConditionsAndOperators(r);else if(r>s)for(let a=s;a<r;a++)this.createJoinOperatorPanel(),this.createOption();let o=n.operator==="OR";this.eJoinOperatorsAnd.forEach(a=>a.setValue(!o,!0)),this.eJoinOperatorsOr.forEach(a=>a.setValue(o,!0)),i.forEach((a,l)=>{this.eTypes[l].setValue(a.type,!0),this.setConditionIntoUi(a,l)})}else{let n=t;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(),io.resolve()}validateAndUpdateConditions(t){let e=t.length;return e>this.maxNumConditions&&(t.splice(this.maxNumConditions),wt('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),e=this.maxNumConditions),e}doesFilterPass(t){let e=this.getModel();if(e==null)return!0;let{operator:n}=e,i=[];if(n){let s=e;i.push(...s.conditions??[])}else i.push(e);return i[n&&n==="OR"?"some":"every"](s=>this.individualConditionPasses(t,s))}setParams(t){super.setParams(t),this.setNumConditions(t),this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.filterPlaceholder=t.filterPlaceholder,this.optionsFactory=new RGe,this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(t){this.maxNumConditions=t.maxNumConditions??2,this.maxNumConditions<1&&(wt('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=t.numAlwaysVisibleConditions??1,this.numAlwaysVisibleConditions<1&&(wt('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(wt('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){let t=this.createManagedBean(new np);this.eTypes.push(t),t.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(t.getGui());let e=this.createValueElement();this.eConditionBodies.push(e),this.eFilterBody.appendChild(e),this.putOptionsIntoDropdown(t),this.resetType(t);let n=this.getNumConditions()-1;this.forEachPositionInput(n,i=>this.resetInput(i)),this.addChangedListeners(t,n)}createJoinOperatorPanel(){let t=document.createElement("div");this.eJoinOperatorPanels.push(t),t.classList.add("ag-filter-condition");let e=this.createJoinOperator(this.eJoinOperatorsAnd,t,"and"),n=this.createJoinOperator(this.eJoinOperatorsOr,t,"or");this.eFilterBody.appendChild(t);let i=this.eJoinOperatorPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(e,i,r),this.resetJoinOperatorOr(n,i,r),this.isReadOnly()||(e.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(t,e,n){let i=this.createManagedBean(new lHt);return t.push(i),i.addCssClass("ag-filter-condition-operator"),i.addCssClass(`ag-filter-condition-operator-${n}`),e.appendChild(i.getGui()),i}getDefaultJoinOperator(t){return t==="AND"||t==="OR"?t:"AND"}createFilterListOptions(){let t=this.optionsFactory.getFilterOptions();this.filterListOptions=t.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(t){this.filterListOptions.forEach(e=>{t.addOption(e)}),t.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(t){return{value:t,text:this.translate(t)}}createCustomListOption(t){let{displayKey:e}=t,n=this.optionsFactory.getCustomOption(t.displayKey);return{value:e,text:n?this.localeService.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(e)}}createBodyTemplate(){return""}getAgComponents(){return[]}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){let t=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,t)}updateNumConditions(){let t=-1,e=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?t=n:e=!1;if(this.shouldAddNewConditionAtEnd(e))this.createJoinOperatorPanel(),this.createOption();else{let n=this.lastUiCompletePosition??this.getNumConditions()-2;if(t<n){this.removeConditionsAndOperators(n+1);let i=t+1,r=n-i;r>0&&this.removeConditionsAndOperators(i,r),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t}updateConditionStatusesAndValues(t,e){this.eTypes.forEach((i,r)=>{let s=this.isConditionDisabled(r,t);i.setDisabled(s||this.filterListOptions.length<=1),r===1&&(c3(this.eJoinOperatorPanels[0],s),this.eJoinOperatorsAnd[0].setDisabled(s),this.eJoinOperatorsOr[0].setDisabled(s))}),this.eConditionBodies.forEach((i,r)=>{Vn(i,this.isConditionBodyVisible(r))});let n=(e??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(i=>{i.setValue(!n,!0)}),this.eJoinOperatorsOr.forEach(i=>{i.setValue(n,!0)}),this.forEachInput((i,r,s,o)=>{this.setElementDisplayed(i,r<o),this.setElementDisabled(i,this.isConditionDisabled(s,t))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(t){return t&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(t,e){if(t>=this.getNumConditions())return;this.removeComponents(this.eTypes,t,e),this.removeElements(this.eConditionBodies,t,e),this.removeValueElements(t,e);let n=Math.max(t-1,0);this.removeElements(this.eJoinOperatorPanels,n,e),this.removeComponents(this.eJoinOperatorsAnd,n,e),this.removeComponents(this.eJoinOperatorsOr,n,e)}removeElements(t,e,n){this.removeItems(t,e,n).forEach(r=>dc(r))}removeComponents(t,e,n){this.removeItems(t,e,n).forEach(r=>{dc(r.getGui()),this.destroyBean(r)})}removeItems(t,e,n){return n==null?t.splice(e):t.splice(e,n)}afterGuiAttached(t){if(super.afterGuiAttached(t),this.resetPlaceholder(),!t?.suppressFocus)if(this.isReadOnly())this.eFilterBody.focus();else{let e=this.getInputs(0)[0];if(!e)return;e instanceof lx&&e.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();let t=this.getModel();this.resetUiToActiveModel(t);let e=-1,n=-1,i=!1,r=this.getJoinOperator();for(let o=this.getNumConditions()-1;o>=0;o--)if(this.isConditionUiComplete(o))e===-1&&(e=o,n=o);else{let a=o>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(o-1),l=o<e;(a||l)&&(this.removeConditionsAndOperators(o,1),i=!0,l&&n--)}let s=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),s=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),s=!0),s&&this.updateConditionStatusesAndValues(n,r),i&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getPlaceholderText(t,e){let n=this.translate(t);if(L3e(this.filterPlaceholder)){let i=this.filterPlaceholder,r=this.eTypes[e].getValue(),s=this.translate(r);n=i({filterOptionKey:r,filterOption:s,placeholder:n})}else typeof this.filterPlaceholder=="string"&&(n=this.filterPlaceholder);return n}resetPlaceholder(){let t=this.localeService.getLocaleTextFunc();this.forEachInput((e,n,i,r)=>{if(!(e instanceof lx))return;let s=n===0&&r>1?"inRangeStart":n===0?"filterOoo":"inRangeEnd",o=n===0&&r>1?t("ariaFilterFromValue","Filter from value"):n===0?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");e.setInputPlaceholder(this.getPlaceholderText(s,i)),e.setInputAriaLabel(o)})}setElementValue(t,e,n){t instanceof lx&&t.setValue(e!=null?String(e):null,!0)}setElementDisplayed(t,e){t instanceof ai&&Vn(t.getGui(),e)}setElementDisabled(t,e){t instanceof ai&&c3(t.getGui(),e)}attachElementOnChange(t,e){t instanceof lx&&t.onValueChange(e)}forEachInput(t){this.getConditionTypes().forEach((e,n)=>{this.forEachPositionTypeInput(n,e,t)})}forEachPositionInput(t,e){let n=this.getConditionType(t);this.forEachPositionTypeInput(t,n,e)}forEachPositionTypeInput(t,e,n){let i=this.getNumberOfInputs(e),r=this.getInputs(t);for(let s=0;s<r.length;s++){let o=r[s];o!=null&&n(o,s,t,i)}}isConditionDisabled(t,e){return this.isReadOnly()?!0:t===0?!1:t>e+1}isConditionBodyVisible(t){let e=this.getConditionType(t);return this.getNumberOfInputs(e)>0}isConditionUiComplete(t){return!(t>=this.getNumConditions()||this.getConditionType(t)==="empty"||this.getValues(t).some(n=>n==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let t=[];for(let e=0;e<this.getNumConditions();e++)this.isConditionUiComplete(e)&&t.push(this.createCondition(e));return t}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let t=this.getNumConditions();t<this.numAlwaysVisibleConditions;t++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(t){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(e=>this.resetType(e)),this.eJoinOperatorsAnd.forEach((e,n)=>this.resetJoinOperatorAnd(e,n,this.joinOperatorId+n)),this.eJoinOperatorsOr.forEach((e,n)=>this.resetJoinOperatorOr(e,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,t||this.onUiChanged(),io.resolve()}resetType(t){let n=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");t.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(t,e,n){this.resetJoinOperator(t,e,this.isDefaultOperator("AND"),this.translate("andCondition"),n)}resetJoinOperatorOr(t,e,n){this.resetJoinOperator(t,e,this.isDefaultOperator("OR"),this.translate("orCondition"),n)}resetJoinOperator(t,e,n,i,r){this.updateJoinOperatorDisabled(t.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(i),e)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((t,e)=>this.updateJoinOperatorDisabled(t,e)),this.eJoinOperatorsOr.forEach((t,e)=>this.updateJoinOperatorDisabled(t,e))}updateJoinOperatorDisabled(t,e){t.setDisabled(this.isReadOnly()||e>0)}resetInput(t){this.setElementValue(t,null),this.setElementDisabled(t,this.isReadOnly())}setConditionIntoUi(t,e){let n=this.mapValuesFromModel(t);this.forEachInput((i,r,s)=>{s===e&&this.setElementValue(i,n[r]!=null?n[r]:null)})}setValueFromFloatingFilter(t){this.forEachInput((e,n,i)=>{this.setElementValue(e,n===0&&i===0?t:null,!0)})}isDefaultOperator(t){return t===this.defaultJoinOperator}addChangedListeners(t,e){this.isReadOnly()||(t.onValueChange(this.listener),this.forEachPositionInput(e,n=>{this.attachElementOnChange(n,this.listener)}))}individualConditionPasses(t,e){let n=this.getCellValue(t.node),i=this.mapValuesFromModel(e),r=this.optionsFactory.getCustomOption(e.type),s=this.evaluateCustomFilter(r,i,n);return s??(n==null?this.evaluateNullValue(e.type):this.evaluateNonNullValue(i,n,e,t))}evaluateCustomFilter(t,e,n){if(t==null)return;let{predicate:i}=t;if(i!=null&&!e.some(r=>r==null))return i(e,n)}isBlank(t){return t==null||typeof t=="string"&&t.trim().length===0}hasInvalidInputs(){return!1}},LGe=class extends FGe{setParams(t){super.setParams(t),this.scalarFilterParams=t}evaluateNullValue(t){switch(t){case"equals":case"notEqual":if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case"lessThan":case"lessThanOrEqual":if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case"inRange":if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(t,e,n){let i=this.comparator(),r=t[0]!=null?i(t[0],e):0;switch(n.type){case"equals":return r===0;case"notEqual":return r!==0;case"greaterThan":return r>0;case"greaterThanOrEqual":return r>=0;case"lessThan":return r<0;case"lessThanOrEqual":return r<=0;case"inRange":{let s=i(t[1],e);return this.scalarFilterParams.inRangeInclusive?r>=0&&s<=0:r>0&&s<0}case"blank":return this.isBlank(e);case"notBlank":return!this.isBlank(e);default:return wt('Unexpected type of filter "'+n.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}},dHt=65,uHt=67,hHt=86,pHt=68,mHt=90,fHt=89;yg=class extends lx{constructor(t,e="ag-text-field",n="text"){super(t,e,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(t,e){return this.eInput.value!==t&&(this.eInput.value=Di(t)?t:""),super.setValue(t,e)}setStartValue(t){this.setValue(t,!0)}preventDisallowedCharacters(){let t=new RegExp(`[${this.config.allowedCharPattern}]`),e=n=>{UZ(n)&&n.key&&!t.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:e,paste:n=>{let i=n.clipboardData?.getData("text");i&&i.split("").some(r=>!t.test(r))&&n.preventDefault()}})}},xf={selector:"AG-INPUT-TEXT-FIELD",component:yg},JB=class extends yg{constructor(t){super(t,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListeners(this.eInput,{blur:()=>{let r=parseFloat(this.eInput.value),s=isNaN(r)?"":this.normalizeValue(r.toString());this.value!==s&&this.setValue(s)},wheel:this.onWheel.bind(this)}),this.eInput.step="any";let{precision:t,min:e,max:n,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof e=="number"&&this.setMin(e),typeof n=="number"&&this.setMax(n),typeof i=="number"&&this.setStep(i)}onWheel(t){this.gos.getActiveDomElement()===this.eInput&&t.preventDefault()}normalizeValue(t){if(t==="")return"";this.precision!=null&&(t=this.adjustPrecision(t));let e=parseFloat(t);return this.min!=null&&e<this.min?t=this.min.toString():this.max!=null&&e>this.max&&(t=this.max.toString()),t}adjustPrecision(t,e){if(this.precision==null)return t;if(e){let i=parseFloat(t).toFixed(this.precision);return parseFloat(i).toString()}let n=String(t).split(".");if(n.length>1){if(n[1].length<=this.precision)return t;if(this.precision>0)return`${n[0]}.${n[1].slice(0,this.precision)}`}return n[0]}setMin(t){return this.min===t?this:(this.min=t,qv(this.eInput,"min",t),this)}setMax(t){return this.max===t?this:(this.max=t,qv(this.eInput,"max",t),this)}setPrecision(t){return this.precision=t,this}setStep(t){return this.step===t?this:(this.step=t,qv(this.eInput,"step",t),this)}setValue(t,e){return this.setValueOrInputValue(n=>super.setValue(n,e),()=>this,t)}setStartValue(t){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},t)}setValueOrInputValue(t,e,n){if(Di(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return t(n);if(!i){n=this.adjustPrecision(n);let r=this.normalizeValue(n);i=n!=r}if(i)return e(n)}return t(n)}getValue(){if(!this.eInput.validity.valid)return;let t=this.eInput.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(t){return typeof t=="string"&&t.includes("e")}},bD={selector:"AG-INPUT-NUMBER-FIELD",component:JB},OGe=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"],Z3e=class{constructor(t,e,n){this.localeService=t,this.optionsFactory=e,this.valueFormatter=n}getModelAsString(t){if(!t)return null;let e=t.operator!=null,n=this.localeService.getLocaleTextFunc();if(e){let i=t,s=(i.conditions??[]).map(a=>this.getModelAsString(a)),o=i.operator==="AND"?"andCondition":"orCondition";return s.join(` ${n(o,PGe[o])} `)}else{if(t.type==="blank"||t.type==="notBlank")return n(t.type,t.type);{let i=t,r=this.optionsFactory.getCustomOption(i.type),{displayKey:s,displayName:o,numberOfInputs:a}=r||{};return s&&o&&a===0?(n(s,o),o):this.conditionToString(i,r)}}}updateParams(t){this.optionsFactory=t.optionsFactory}formatValue(t){return this.valueFormatter?this.valueFormatter(t??null)??"":String(t)}},NGe=class extends Z3e{conditionToString(t,e){let{numberOfInputs:n}=e||{};return t.type=="inRange"||n===2?`${this.formatValue(t.filter)}-${this.formatValue(t.filterTo)}`:t.filter!=null?this.formatValue(t.filter):`${t.type}`}};_Ht=class extends LGe{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(t){return this.numberFilterParams.allowedCharPattern!==t.allowedCharPattern?!1:super.refresh(t)}mapValuesFromModel(t){let{filter:e,filterTo:n,type:i}=t||{};return[this.processValue(e),this.processValue(n)].slice(0,this.getNumberOfInputs(i))}getDefaultDebounceMs(){return 500}comparator(){return(t,e)=>t===e?0:t<e?1:-1}setParams(t){this.numberFilterParams=t,super.setParams(t),this.filterModelFormatter=new NGe(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return OGe}setElementValue(t,e,n){let i=!n&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(e??null):e;super.setElementValue(t,i)}createValueElement(){let t=E3e(this.numberFilterParams),e=document.createElement("div");return e.classList.add("ag-filter-body"),dd(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from",t),this.createFromToElement(e,this.eValuesTo,"to",t),e}createFromToElement(t,e,n,i){let r=this.createManagedBean(i?new yg({allowedCharPattern:i}):new JB);r.addCssClass(`ag-filter-${n}`),r.addCssClass("ag-filter-filter"),e.push(r),t.appendChild(r.getGui())}removeValueElements(t,e){this.removeComponents(this.eValuesFrom,t,e),this.removeComponents(this.eValuesTo,t,e)}getValues(t){let e=[];return this.forEachPositionInput(t,(n,i,r,s)=>{i<s&&e.push(this.processValue(this.stringToFloat(n.getValue())))}),e}areSimpleModelsEqual(t,e){return t.filter===e.filter&&t.filterTo===e.filterTo&&t.type===e.type}getFilterType(){return"number"}processValue(t){return t==null||isNaN(t)?null:t}stringToFloat(t){if(typeof t=="number")return t;let e=xu(t);return e!=null&&e.trim()===""&&(e=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(e):e==null||e.trim()==="-"?null:parseFloat(e)}createCondition(t){let e=this.getConditionType(t),n={filterType:this.getFilterType(),type:e},i=this.getValues(t);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}getInputs(t){return t>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[t],this.eValuesTo[t]]}getModelAsString(t){return this.filterModelFormatter.getModelAsString(t)??""}hasInvalidInputs(){let t=!1;return this.forEachInput(e=>{if(!e.getInputElement().validity.valid){t=!0;return}}),t}},VGe=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],BGe=class extends Z3e{conditionToString(t,e){let{numberOfInputs:n}=e||{};return t.type=="inRange"||n===2?`${t.filter}-${t.filterTo}`:t.filter!=null?`${t.filter}`:`${t.type}`}};CHt=class extends FGe{constructor(){super("textFilter"),this.defaultFormatter=t=>t,this.defaultLowercaseFormatter=t=>t==null?null:t.toString().toLowerCase(),this.defaultMatcher=({filterOption:t,value:e,filterText:n})=>{if(n==null)return!1;switch(t){case"contains":return e.indexOf(n)>=0;case"notContains":return e.indexOf(n)<0;case"equals":return e===n;case"notEqual":return e!=n;case"startsWith":return e.indexOf(n)===0;case"endsWith":{let i=e.lastIndexOf(n);return i>=0&&i===e.length-n.length}default:return!1}},this.eValuesFrom=[],this.eValuesTo=[]}getDefaultDebounceMs(){return 500}setParams(t){this.textFilterParams=t,super.setParams(t),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?this.defaultFormatter:this.defaultLowercaseFormatter),this.filterModelFormatter=new BGe(this.localeService,this.optionsFactory)}getTextMatcher(){let t=this.textFilterParams.textCustomComparator;return t?(wt("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:e,value:n,filterText:i})=>t(e,n,i)):this.textFilterParams.textMatcher||this.defaultMatcher}createCondition(t){let e=this.getConditionType(t),n={filterType:this.getFilterType(),type:e},i=this.getValuesWithSideEffects(t,!0);return i.length>0&&(n.filter=i[0]),i.length>1&&(n.filterTo=i[1]),n}getFilterType(){return"text"}areSimpleModelsEqual(t,e){return t.filter===e.filter&&t.filterTo===e.filterTo&&t.type===e.type}getInputs(t){return t>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[t],this.eValuesTo[t]]}getValues(t){return this.getValuesWithSideEffects(t,!1)}getValuesWithSideEffects(t,e){let n=[];return this.forEachPositionInput(t,(i,r,s,o)=>{if(r<o){let a=xu(i.getValue());e&&this.textFilterParams.trimInput&&(a=zGe(a)??null,i.setValue(a,!0)),n.push(a)}}),n}getDefaultFilterOptions(){return VGe}createValueElement(){let t=document.createElement("div");return t.classList.add("ag-filter-body"),dd(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from"),this.createFromToElement(t,this.eValuesTo,"to"),t}createFromToElement(t,e,n){let i=this.createManagedBean(new yg);i.addCssClass(`ag-filter-${n}`),i.addCssClass("ag-filter-filter"),e.push(i),t.appendChild(i.getGui())}removeValueElements(t,e){this.removeComponents(this.eValuesFrom,t,e),this.removeComponents(this.eValuesTo,t,e)}mapValuesFromModel(t){let{filter:e,filterTo:n,type:i}=t||{};return[e||null,n||null].slice(0,this.getNumberOfInputs(i))}evaluateNullValue(t){return t?["notEqual","notContains","blank"].indexOf(t)>=0:!1}evaluateNonNullValue(t,e,n,i){let r=t.map(m=>this.formatter(m))||[],s=this.formatter(e),{api:o,colDef:a,column:l,context:c,textFormatter:d}=this.textFilterParams;if(n.type==="blank")return this.isBlank(e);if(n.type==="notBlank")return!this.isBlank(e);let u={api:o,colDef:a,column:l,context:c,node:i.node,data:i.data,filterOption:n.type,value:s,textFormatter:d};return r.some(m=>this.matcher(St(ve({},u),{filterText:m})))}getModelAsString(t){return this.filterModelFormatter.getModelAsString(t)??""}};u3e=t=>{if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};WGe=class{constructor(t,e,n,i,r){this.alive=!0,this.context=t,this.eParent=i,e.getDateCompDetails(n).newAgStackInstance().then(a=>{if(!this.alive){t.destroyBean(a);return}this.dateComp=a,a&&(i.appendChild(a.getGui()),a.afterGuiAttached&&a.afterGuiAttached(),this.tempValue&&a.setDate(this.tempValue),this.disabled!=null&&this.setDateCompDisabled(this.disabled),r?.(this))})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(t){this.dateComp?this.dateComp.setDate(t):this.tempValue=t}setDisabled(t){this.dateComp?this.setDateCompDisabled(t):this.disabled=t}setDisplayed(t){Vn(this.eParent,t)}setInputPlaceholder(t){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(t)}setInputAriaLabel(t){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(t)}afterGuiAttached(t){this.dateComp&&typeof this.dateComp.afterGuiAttached=="function"&&this.dateComp.afterGuiAttached(t)}updateParams(t){let e=!1;this.dateComp?.refresh&&typeof this.dateComp.refresh=="function"&&this.dateComp.refresh(t)!==null&&(e=!0),!e&&this.dateComp?.onParamsUpdated&&typeof this.dateComp.onParamsUpdated=="function"&&this.dateComp.onParamsUpdated(t)!==null&&wt("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(t){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(t)}},UGe=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"],jGe=class extends Z3e{constructor(t,e,n){super(e,n),this.dateFilterParams=t}conditionToString(t,e){let{type:n}=t,{numberOfInputs:i}=e||{},r=n=="inRange"||i===2,s=A0(t.dateFrom),o=A0(t.dateTo),a=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(r){let l=s!==null?VB(s,a):"null",c=o!==null?VB(o,a):"null";return`${l}-${c}`}return s!=null?VB(s,a):`${n}`}updateParams(t){super.updateParams(t),this.dateFilterParams=t.dateFilterParams}},DHe=1e3,EHe=1/0,bHt=class extends LGe{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=DHe,this.maxValidYear=EHe,this.minValidDate=null,this.maxValidDate=null}wireBeans(t){super.wireBeans(t),this.context=t.context,this.userComponentFactory=t.userComponentFactory}afterGuiAttached(t){super.afterGuiAttached(t),this.dateConditionFromComps[0].afterGuiAttached(t)}mapValuesFromModel(t){let{dateFrom:e,dateTo:n,type:i}=t||{};return[e&&A0(e)||null,n&&A0(n)||null].slice(0,this.getNumberOfInputs(i))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(t,e){let n=e;return e==null||n<t?-1:n>t?1:0}setParams(t){this.dateFilterParams=t,super.setParams(t);let e=(n,i)=>{if(t[n]!=null)if(isNaN(t[n]))wt(`DateFilter ${n} is not a number`);else return t[n]==null?i:Number(t[n]);return i};this.minValidYear=e("minValidYear",DHe),this.maxValidYear=e("maxValidYear",EHe),this.minValidYear>this.maxValidYear&&wt("DateFilter minValidYear should be <= maxValidYear"),t.minValidDate?this.minValidDate=t.minValidDate instanceof Date?t.minValidDate:A0(t.minValidDate):this.minValidDate=null,t.maxValidDate?this.maxValidDate=t.maxValidDate instanceof Date?t.maxValidDate:A0(t.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&wt("DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new jGe(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(t){let e=new WGe(this.context,this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},t);return this.addDestroyFunc(()=>e.destroy()),e}setElementValue(t,e){t.setDate(e)}setElementDisplayed(t,e){t.setDisplayed(e)}setElementDisabled(t,e){t.setDisabled(e)}getDefaultFilterOptions(){return UGe}createValueElement(){let e=this.gos.getDocument().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(t,e,n,i){let s=this.gos.getDocument().createElement("div");s.classList.add(`ag-filter-${i}`),s.classList.add(`ag-filter-date-${i}`),e.push(s),t.appendChild(s),n.push(this.createDateCompWrapper(s))}removeValueElements(t,e){this.removeDateComps(this.dateConditionFromComps,t,e),this.removeDateComps(this.dateConditionToComps,t,e),this.removeItems(this.eConditionPanelsFrom,t,e),this.removeItems(this.eConditionPanelsTo,t,e)}removeDateComps(t,e,n){this.removeItems(t,e,n).forEach(r=>r.destroy())}isValidDateValue(t){if(t===null)return!1;if(this.minValidDate){if(t<this.minValidDate)return!1}else if(t.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(t>this.maxValidDate)return!1}else if(t.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(t){if(!super.isConditionUiComplete(t))return!1;let e=!0;return this.forEachInput((n,i,r,s)=>{r!==t||!e||i>=s||(e=e&&this.isValidDateValue(n.getDate()))}),e}areSimpleModelsEqual(t,e){return t.dateFrom===e.dateFrom&&t.dateTo===e.dateTo&&t.type===e.type}getFilterType(){return"date"}createCondition(t){let e=this.getConditionType(t),n={},i=this.getValues(t);return i.length>0&&(n.dateFrom=vg(i[0])),i.length>1&&(n.dateTo=vg(i[1])),ve({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:e},n)}resetPlaceholder(){let t=this.localeService.getLocaleTextFunc(),e=this.translate("dateFormatOoo"),n=t("ariaFilterValue","Filter Value");this.forEachInput(i=>{i.setInputPlaceholder(e),i.setInputAriaLabel(n)})}getInputs(t){return t>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[t],this.dateConditionToComps[t]]}getValues(t){let e=[];return this.forEachPositionInput(t,(n,i,r,s)=>{i<s&&e.push(n.getDate())}),e}translate(t){return t==="lessThan"?super.translate("before"):t==="greaterThan"?super.translate("after"):super.translate(t)}getModelAsString(t){return this.filterModelFormatter.getModelAsString(t)??""}},X3e=class extends Ot{constructor(t,e,n,i){super(),this.columnOrGroup=t,this.columnOrGroup=t,this.eCell=e,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=i,this.beans=n}setColsSpanning(t){this.colsSpanning=t,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?Ar(this.colsSpanning):this.columnOrGroup}postConstruct(){let t=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:t}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:t}),this.addManagedPropertyListener("domLayout",t)}setLeftFirstTime(){let t=this.beans.gos.get("suppressColumnMoveAnimation"),e=Di(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&e&&!t?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let t=this.getColumnOrGroup(),e=t.getLeft(),n=t.getOldLeft(),i=this.modifyLeftForPrintLayout(t,n),r=this.modifyLeftForPrintLayout(t,e);this.setLeft(i),this.actualLeft=r,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===r&&this.setLeft(r)})}onLeftChanged(){let t=this.getColumnOrGroup(),e=t.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(t,e),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(t,e){if(!this.beans.gos.isDomLayout("print")||t.getPinned()==="left")return e;let i=this.beans.visibleColsService.getColsLeftWidth();if(t.getPinned()==="right"){let r=this.beans.visibleColsService.getBodyContainerWidth();return i+r+e}return i+e}setLeft(t){if(Di(t)&&(this.eCell.style.left=`${t}px`),Sm(this.columnOrGroup)){let e=this.columnOrGroup.getLeafColumns();if(!e.length)return;e.length>1&&z3e(this.ariaEl,e.length)}}},wHt="ag-column-first",SHt="ag-column-last";DHt=0,EHt=(()=>{let t=class YGe extends Ot{constructor(n,i,r){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=n,this.parentRowCtrl=r,this.beans=i,this.instanceId=n.getUniqueId()+"-"+DHt++}wireBeans(n){this.pinnedWidthService=n.pinnedWidthService,this.focusService=n.focusService,this.userComponentFactory=n.userComponentFactory,this.ctrlsService=n.ctrlsService,this.dragAndDropService=n.dragAndDropService,this.menuService=n.menuService}postConstruct(){let n=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],n),this.addManagedEventListeners({overlayExclusiveChanged:n})}shouldStopEventPropagation(n){let{headerRowIndex:i,column:r}=this.focusService.getFocusedHeader();return gHt(this.gos,n,i,r)}getWrapperHasFocus(){return this.gos.getActiveDomElement()===this.eGui}setGui(n){this.eGui=n,this.addDomData(n),this.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),this.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onGuiFocus(){this.eventService.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(n){let{wrapperElement:i,checkMeasuringCallback:r}=n,{animationFrameService:s,resizeObserverService:o,columnModel:a,gos:l}=this.beans,c=x=>{if(!this.isAlive())return;let{paddingTop:D,paddingBottom:E,borderBottomWidth:M,borderTopWidth:I}=vD(this.getGui()),z=D+E+M+I,A=i.offsetHeight+z;if(x<5){let Y=l.getDocument(),X=!Y||!Y.contains(i),ne=A==0;if(X||ne){s.requestAnimationFrame(()=>c(x+1));return}}a.setColHeaderHeight(this.column,A)},d=!1,u,m=()=>{let x=this.column.isAutoHeaderHeight();x&&!d&&f(),!x&&d&&_()},f=()=>{d=!0,c(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),u=o.observeResize(i,()=>c(0))},_=()=>{d=!1,u&&u(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),u=void 0};m(),this.addDestroyFunc(()=>_()),this.addManagedListeners(this.column,{widthChanged:()=>d&&c(0)}),this.addManagedEventListeners({sortChanged:()=>{d&&window.setTimeout(()=>c(0))}}),r&&r(m)}onDisplayedColumnsChanged(){let{comp:n,column:i,beans:r,eGui:s}=this;!n||!i||!s||($Ge(n,i,r.visibleColsService),GZ(s,r.visibleColsService.getAriaColIndex(i)))}addResizeAndMoveKeyboardListeners(n){this.resizeFeature&&this.addManagedListeners(n,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let n=this.focusService.isHeaderFocusSuppressed();this.eGui&&qv(this.eGui,"tabindex",n?null:"-1")}onGuiKeyDown(n){let i=this.gos.getActiveDomElement(),r=n.key===It.LEFT||n.key===It.RIGHT;if(this.isResizing&&(n.preventDefault(),n.stopImmediatePropagation()),i!==this.eGui||!n.shiftKey&&!n.altKey||((this.isResizing||r)&&(n.preventDefault(),n.stopImmediatePropagation()),!r))return;let s=n.key===It.LEFT!==this.gos.get("enableRtl"),o=MGe[s?"Left":"Right"];if(n.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let a=this.getViewportAdjustedResizeDiff(n);this.resizeHeader(a,n.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(o)}getViewportAdjustedResizeDiff(n){let i=this.getResizeDiff(n);if(this.column.getPinned()){let s=this.pinnedWidthService.getPinnedLeftWidth(),o=this.pinnedWidthService.getPinnedRightWidth(),a=yD(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(s+o+i>a)if(a>s+o)i=a-s-o;else return 0}return i}getResizeDiff(n){let i=n.key===It.LEFT!==this.gos.get("enableRtl"),r=this.column.getPinned(),s=this.gos.get("enableRtl");return r&&s!==(r==="right")&&(i=!i),(i?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(n){let i=this.getWrapperHasFocus();switch(n.key){case It.PAGE_DOWN:case It.PAGE_UP:case It.PAGE_HOME:case It.PAGE_END:i&&n.preventDefault()}}addDomData(n){let i=YGe.DOM_DATA_KEY_HEADER_CTRL;this.gos.setDomData(n,i,this),this.addDestroyFunc(()=>this.gos.setDomData(n,i,null))}getGui(){return this.eGui}focus(n){return this.eGui?(this.lastFocusEvent=n||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}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(n,i,r){let s=n??i;this.gos.get("preventDefaultOnContextMenu")&&s.preventDefault();let o=f5(r)?r:void 0;this.menuService.isHeaderContextMenuEnabled(o)&&this.menuService.showHeaderContextMenu(o,n,i),this.dispatchColumnMouseEvent("columnHeaderContextMenu",r)}dispatchColumnMouseEvent(n,i){this.eventService.dispatchEvent({type:n,column:i})}destroy(){super.destroy(),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null}};return t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",t})(),KZ=EHt,Q3e=class extends Ot{wireBeans(t){this.columnHoverService=t.columnHoverService}constructor(t,e){super(),this.columns=t,this.element=e}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListeners(this.element,{mouseout:this.onMouseOut.bind(this),mouseover:this.onMouseOver.bind(this)})}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}},MHt=class extends KZ{constructor(t,e,n){super(t,e,n),this.iconCreated=!1,this.column=t}setComp(t,e,n,i){this.comp=t,this.eButtonShowMainFilter=n,this.eFloatingFilterBody=i,this.setGui(e),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(),this.addManagedListeners(this.column,{colDefChanged:this.onColDefChanged.bind(this)})}resizeHeader(){}moveHeader(){}setupActive(){let t=this.column.getColDef(),e=!!t.filter,n=!!t.floatingFilter;this.active=e&&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;let t=tr("filter",this.gos,this.column);t&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(t))}setupFocus(){this.createManagedBean(new Ky(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let t=this.localeService.getLocaleTextFunc();hl(this.eButtonShowMainFilter,t("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(t){if(this.gos.getActiveDomElement()===this.eGui)return;let i=this.focusService.findNextFocusableElement(this.eGui,null,t.shiftKey);if(i){this.beans.headerNavigationService.scrollToColumn(this.column),t.preventDefault(),i.focus();return}let r=this.findNextColumnWithFloatingFilter(t.shiftKey);r&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:r},event:t})&&t.preventDefault()}findNextColumnWithFloatingFilter(t){let e=this.beans.visibleColsService,n=this.column;do if(n=t?e.getColBefore(n):e.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(t){super.handleKeyDown(t);let e=this.getWrapperHasFocus();switch(t.key){case It.UP:case It.DOWN:e||t.preventDefault();case It.LEFT:case It.RIGHT:if(e)return;t.stopPropagation();case It.ENTER:e&&this.focusService.focusInto(this.eGui)&&t.preventDefault();break;case It.ESCAPE:e||this.eGui.focus()}}onFocusIn(t){if(this.eGui.contains(t.relatedTarget))return;let n=!!t.relatedTarget&&!t.relatedTarget.classList.contains("ag-floating-filter"),i=!!t.relatedTarget&&xA(t.relatedTarget,"ag-floating-filter");if(n&&i&&t.target===this.eGui){let s=this.lastFocusEvent,o=!!(s&&s.key===It.TAB);if(s&&o){let a=s.shiftKey;this.focusService.focusInto(this.eGui,a)}}let r=this.getRowIndex();this.beans.focusService.setFocusedHeader(r,this.column)}setupHover(){this.createManagedBean(new Q3e([this.column],this.eGui));let t=()=>{if(!this.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};this.addManagedEventListeners({columnHoverChanged:t}),t()}setupLeft(){let t=new X3e(this.column,this.eGui,this.beans);this.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;let t=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());t&&this.setCompDetails(t)}setCompDetails(t){this.userCompDetails=t,this.comp.setCompDetails(t)}showParentFilter(){let t=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:t,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(){if(!this.active)return;let{filterManager:t}=this.beans,e=n=>{if(n?.source==="filterDestroyed"&&!this.isAlive())return;let i=this.comp.getFloatingFilterComp();i&&i.then(r=>{if(r){let s=t?.getCurrentFloatingFilterParentModel(this.column),o=n?St(ve({},n),{columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}):null;r.onParentModelChanged(s,o)}})};[this.destroySyncListener]=this.addManagedListeners(this.column,{filterChanged:e}),t?.isFilterActive(this.column)&&e(null)}setupWidth(){let t=()=>{let e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};this.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(){this.active&&([this.destroyFilterChangedListener]=this.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){let t=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(){let t=this.active;this.setupActive();let e=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let n=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,i=this.comp.getFloatingFilterComp();!i||!n?this.updateCompDetails(n,e):i.then(r=>{!r||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,n)?this.updateCompDetails(n,e):this.updateFloatingFilterParams(n)})}updateCompDetails(t,e){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),e&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()))}updateFloatingFilterParams(t){if(!t)return;let e=t.params;this.comp.getFloatingFilterComp()?.then(n=>{let i=!1;n?.refresh&&typeof n.refresh=="function"&&n.refresh(e)!==null&&(i=!0),!i&&n?.onParamsUpdated&&typeof n.onParamsUpdated=="function"&&n.onParamsUpdated(e)!==null&&wt("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null}},ta="32.1.0";VHt=class extends Ot{constructor(){super(...arguments),this.beanName="columnFilterService",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.rowModel=t.rowModel,this.userComponentFactory=t.userComponentFactory,this.rowRenderer=t.rowRenderer,this.dataTypeService=t.dataTypeService,this.filterManager=t.filterManager}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),rowDataUpdated:()=>this.onNewRowsLoaded("rowDataUpdated"),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel=ve({},this.gos.get("initialState")?.filter?.filterModel??{})}setFilterModel(t,e="api"){if(this.dataTypeService?.isPendingInference()){this.filterModelUpdateQueue.push({model:t,source:e});return}let n=[],i=this.getFilterModel(!0);if(t){let r=new Set(Object.keys(t));this.allColumnFilters.forEach((s,o)=>{let a=t[o];n.push(this.setModelOnFilterWrapper(s.filterPromise,a)),r.delete(o)}),r.forEach(s=>{let o=this.columnModel.getColDefCol(s)||this.columnModel.getCol(s);if(!o){wt("setFilterModel() - no column found for colId: "+s);return}if(!o.isFilterAllowed()){wt("setFilterModel() - unable to fully apply model, filtering disabled for colId: "+s);return}let a=this.getOrCreateFilterWrapper(o);if(!a){wt("setFilterModel() - unable to fully apply model, unable to create filter for colId: "+s);return}n.push(this.setModelOnFilterWrapper(a.filterPromise,t[s]))})}else this.allColumnFilters.forEach(r=>{n.push(this.setModelOnFilterWrapper(r.filterPromise,null))});io.all(n).then(()=>{let r=this.getFilterModel(!0),s=[];this.allColumnFilters.forEach((o,a)=>{let l=i?i[a]:null,c=r?r[a]:null;mD(l,c)||s.push(o.column)}),s.length>0&&this.filterManager?.onFilterChanged({columns:s,source:e})})}setModelOnFilterWrapper(t,e){return new io(n=>{t.then(i=>{typeof i.setModel!="function"&&(wt("filter missing setModel method, which is needed for setFilterModel"),n()),(i.setModel(e)||io.resolve()).then(()=>n())})})}getFilterModel(t){let e={},{allColumnFilters:n,initialFilterModel:i}=this;return n.forEach((r,s)=>{let o=this.getModelFromFilterWrapper(r);Di(o)&&(e[s]=o)}),t||Object.entries(i).forEach(([r,s])=>{Di(s)&&!n.has(r)&&this.columnModel.getCol(r)?.isFilterAllowed()&&(e[r]=s)}),e}getModelFromFilterWrapper(t){let{filter:e}=t;return e?typeof e.getModel!="function"?(wt("filter API missing getModel method, which is needed for getFilterModel"),null):e.getModel():this.getModelFromInitialState(t.column)}getModelFromInitialState(t){return this.initialFilterModel[t.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){return this.allColumnFilters.size?(this.allColumnFilters.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}doAggregateFiltersPass(t,e){return this.doColumnFiltersPass(t,e,!0)}updateActiveFilters(){let t=s=>s?s.isFilterActive?s.isFilterActive():(wt("Filter is missing isFilterActive() method"),!1):!1,e=!!this.gos.getGroupAggFiltering(),n=s=>{if(!s.isPrimary())return!0;let a=!this.columnModel.isPivotActive();return!s.isValueActive()||!a?!1:this.columnModel.isPivotMode()?!0:e},i=[],r=[];return this.forEachColumnFilter((s,o)=>{t(s)&&(n(o.column)?i.push(s):r.push(s))}).then(()=>{this.activeAggregateFilters=i,this.activeColumnFilters=r})}updateFilterFlagInColumns(t,e){return this.forEachColumnFilter((n,i)=>i.column.setFilterActive(n.isFilterActive(),t,e))}forEachColumnFilter(t){return io.all(Array.from(this.allColumnFilters.values()).map(e=>e.filterPromise.then(n=>t(n,e))))}doColumnFiltersPass(t,e,n){let{data:i,aggData:r}=t,s=n?this.activeAggregateFilters:this.activeColumnFilters,o=n?r:i;for(let a=0;a<s.length;a++){let l=s[a];if(!(l==null||l===e)){if(typeof l.doesFilterPass!="function")throw new Error("Filter is missing method doesFilterPass");if(!l.doesFilterPass({node:t,data:o}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(t){let e=()=>this.filterManager?.onFilterChanged(t);this.rowRenderer.isRefreshInProgress()?setTimeout(e,0):e()}updateBeforeFilterChanged(t={}){let{filterInstance:e,additionalEventAttributes:n}=t;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",n).then(()=>{this.allColumnFilters.forEach(i=>{i.filterPromise&&i.filterPromise.then(r=>{r&&r!==e&&r.onAnyFilterChanged&&r.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(t){this.forEachColumnFilter(e=>{e.onNewRowsLoaded&&e.onNewRowsLoaded()}).then(()=>this.updateFilterFlagInColumns(t,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createValueGetter(t){return({node:e})=>this.valueService.getValue(t,e,!0)}createGetValue(t){return(e,n)=>{let i=n?this.columnModel.getCol(n):t;return i?this.valueService.getValue(i,e,!0):void 0}}isFilterActive(t){let{filter:e}=this.cachedFilter(t)??{};return e?e.isFilterActive():this.getModelFromInitialState(t)!=null}getOrCreateFilterWrapper(t){if(!t.isFilterAllowed())return null;let e=this.cachedFilter(t);return e||(e=this.createFilterWrapper(t),this.setColumnFilterWrapper(t,e)),e}cachedFilter(t){return this.allColumnFilters.get(t.getColId())}getDefaultFilter(t){let e;if(Sa.__isRegistered("@ag-grid-enterprise/set-filter",this.gridId))e="agSetColumnFilter";else{let n=this.dataTypeService?.getBaseDataType(t);n==="number"?e="agNumberColumnFilter":n==="date"||n==="dateString"?e="agDateColumnFilter":e="agTextColumnFilter"}return e}getDefaultFloatingFilter(t){let e;if(Sa.__isRegistered("@ag-grid-enterprise/set-filter",this.gridId))e="agSetColumnFloatingFilter";else{let n=this.dataTypeService?.getBaseDataType(t);n==="number"?e="agNumberColumnFloatingFilter":n==="date"||n==="dateString"?e="agDateColumnFloatingFilter":e="agTextColumnFloatingFilter"}return e}createFilterInstance(t,e){let n=this.getDefaultFilter(t),i=t.getColDef(),r,s=St(ve({},this.createFilterParams(t,i)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(r,t)(),filterChangedCallback:a=>this.filterChangedCallbackFactory(r,t)(a),doesRowPassOtherFilter:a=>this.filterManager?this.filterManager.doesRowPassOtherFilters(r,a):!0}),o=this.userComponentFactory.getFilterDetails(i,s,n);return o?{filterPromise:()=>{let a=o.newAgStackInstance();return a?.then(l=>{r=l,e&&(e.filter=l)}),a},compDetails:o}:{filterPromise:null,compDetails:null}}createFilterParams(t,e){return this.gos.addGridCommonParams({column:t,colDef:T7(e),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(t),getValue:this.createGetValue(t),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(t){let e={column:t,filterPromise:null,compiledElement:null,compDetails:null},{filterPromise:n,compDetails:i}=this.createFilterInstance(t,e);return e.filterPromise=n?.()??null,e.compDetails=i,e}onColumnsChanged(){let t=[];this.allColumnFilters.forEach((n,i)=>{let r;n.column.isPrimary()?r=this.columnModel.getColDefCol(i):r=this.columnModel.getCol(i),!(r&&r===n.column)&&(t.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(i))});let e=t.every(n=>n.getColDef().filter==="agGroupColumnFilter");t.length>0&&!e?this.filterManager?.onFilterChanged({columns:t,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){this.columnModel.getAutoCols()?.forEach(e=>{e.getColDef().filter==="agGroupColumnFilter"&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(t){if(!t.isFilterAllowed())return!1;let{filter:n}=this.allColumnFilters.get(t.getColId())??{};return n&&typeof n?.isFilterAllowed=="function"?n.isFilterAllowed():!0}getFloatingFilterCompDetails(t,e){let n=l=>{let c=this.getOrCreateFilterWrapper(t)?.filterPromise;c?.then(d=>{l(cx(d))})},i=t.getColDef(),r=St(ve({},this.createFilterParams(t,i)),{filterChangedCallback:()=>n(l=>this.filterChangedCallbackFactory(l,t)())}),s=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(i,Y3e,r),o=J3e(this.frameworkOverrides,i,()=>this.getDefaultFloatingFilter(t));o==null&&(o="agReadOnlyFloatingFilter");let a={column:t,filterParams:s,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(t),parentFilterInstance:n,showParentFilter:e,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(i,a,o)}getCurrentFloatingFilterParentModel(t){return this.getModelFromFilterWrapper(this.cachedFilter(t)??{column:t})}destroyFilter(t,e="api"){let n=t.getColId(),i=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialFilterModel[n],i&&(this.disposeFilterWrapper(i,e),this.filterManager?.onFilterChanged({columns:[t],source:"api"}))}disposeColumnListener(t){let e=this.allColumnListeners.get(t);e&&(this.allColumnListeners.delete(t),e())}disposeFilterWrapper(t,e){t.filterPromise.then(n=>{this.destroyBean(n),t.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(t.column.getColId()),this.eventService.dispatchEvent({type:"filterDestroyed",source:e,column:t.column})})}filterModifiedCallbackFactory(t,e){return()=>{this.eventService.dispatchEvent({type:"filterModified",column:e,filterInstance:t})}}filterChangedCallbackFactory(t,e){return n=>{let i=n?.source??"columnFilter",r={filter:t,additionalEventAttributes:n,columns:[e],source:i};this.callOnFilterChangedOutsideRenderCycle(r)}}checkDestroyFilter(t){let e=this.allColumnFilters.get(t);if(!e)return;let n=e.column,{compDetails:i}=n.isFilterAllowed()?this.createFilterInstance(n):{compDetails:null};if(this.areFilterCompsDifferent(e.compDetails,i)){this.destroyFilter(n,"paramsUpdated");return}let r=n.getColDef().filterParams;if(!e.filterPromise){this.destroyFilter(n,"paramsUpdated");return}e.filterPromise.then(s=>{(s?.refresh?s.refresh(ve(St(ve({},this.createFilterParams(n,n.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(s,n),filterChangedCallback:this.filterChangedCallbackFactory(s,n),doesRowPassOtherFilter:a=>this.filterManager?this.filterManager.doesRowPassOtherFilters(s,a):!0}),r)):!0)===!1&&this.destroyFilter(n,"paramsUpdated")})}setColumnFilterWrapper(t,e){let n=t.getColId();this.allColumnFilters.set(n,e),this.allColumnListeners.set(n,this.addManagedListeners(t,{colDefChanged:()=>this.checkDestroyFilter(n)})[0])}areFilterCompsDifferent(t,e){if(!e||!t)return!0;let{componentClass:n}=t,{componentClass:i}=e;return!(n===i||n?.render&&i?.render&&n.render===i.render)}hasFloatingFilters(){return this.columnModel.getCols().some(e=>e.getColDef().floatingFilter)}getFilterInstance(t,e){e&&this.getFilterInstanceImpl(t).then(n=>{let i=cx(n);e(i)})}getColumnFilterInstance(t){return new Promise(e=>{this.getFilterInstanceImpl(t).then(n=>{e(cx(n))})})}getFilterInstanceImpl(t){let e=this.columnModel.getColDefCol(t);return e?this.getOrCreateFilterWrapper(e)?.filterPromise??io.resolve(null):io.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:t,source:e})=>this.setFilterModel(t,e)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:t,model:e,resolve:n})=>{this.setColumnFilterModel(t,e).then(()=>n())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(t){let e=this.getFilterWrapper(t);return e?this.getModelFromFilterWrapper(e):null}setColumnFilterModel(t,e){if(this.dataTypeService?.isPendingInference()){let s=()=>{},o=new Promise(a=>{s=a});return this.columnFilterModelUpdateQueue.push({key:t,model:e,resolve:s}),o}let n=this.columnModel.getColDefCol(t),i=n?this.getOrCreateFilterWrapper(n):null;return i?(s=>new Promise(o=>{s.then(a=>o(a))}))(this.setModelOnFilterWrapper(i.filterPromise,e)):Promise.resolve()}getFilterWrapper(t){let e=this.columnModel.getColDefCol(t);return e?this.cachedFilter(e)??null:null}destroy(){super.destroy(),this.allColumnFilters.forEach(t=>this.disposeFilterWrapper(t,"gridDestroyed")),this.allColumnListeners.clear()}};HHt=class extends ai{constructor(){super(`
            <div class="ag-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
            </div>`,[xf]),this.eFloatingFilterText=Bt}wireBeans(t){this.columnNameService=t.columnNameService}destroy(){super.destroy()}init(t){this.params=t;let e=this.columnNameService.getDisplayNameForColumn(t.column,"header",!0),n=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${e} ${n("ariaFilterInput","Filter Input")}`)}onParentModelChanged(t){if(t==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(e=>{if(e.getModelAsString){let n=e.getModelAsString(t);this.eFloatingFilterText.setValue(n)}})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.init(t)}},qGe=class extends ai{wireBeans(t){this.columnNameService=t.columnNameService}getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(t){return t&&t.afterFloatingFilter}isEventFromDataChange(t){return t?.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(t){if(!t){this.lastType=this.optionsFactory.getDefaultOption();return}let e=t.operator,n;e?n=t.conditions[0]:n=t,this.lastType=n.type}canWeEditAfterModelFromParentFilter(t){if(!t)return this.isTypeEditable(this.lastType);if(t.operator)return!1;let n=t;return this.isTypeEditable(n.type)}init(t){this.setSimpleParams(t,!1)}setSimpleParams(t,e=!0){this.optionsFactory=new RGe,this.optionsFactory.init(t.filterParams,this.getDefaultFilterOptions()),e||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!t.filterParams.readOnly;let n=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(n)}onParamsUpdated(t){this.refresh(t)}refresh(t){this.setSimpleParams(t)}doesFilterHaveSingleInput(t){let e=this.optionsFactory.getCustomOption(t),{numberOfInputs:n}=e||{};return n==null||n==1}isTypeEditable(t){let e=["inRange","empty","blank","notBlank"];return!!t&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(t)&&e.indexOf(t)<0}getAriaLabel(t){let e=this.columnNameService.getDisplayNameForColumn(t.column,"header",!0),n=this.localeService.getLocaleTextFunc();return`${e} ${n("ariaFilterInput","Filter Input")}`}},GHt=class extends qGe{constructor(){super(`
            <div class="ag-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eReadOnlyText"></ag-input-text-field>
                <div data-ref="eDateWrapper" style="display: flex;"></div>
            </div>`,[xf]),this.eReadOnlyText=Bt,this.eDateWrapper=Bt}wireBeans(t){super.wireBeans(t),this.context=t.context,this.userComponentFactory=t.userComponentFactory}getDefaultFilterOptions(){return UGe}init(t){super.init(t),this.params=t,this.filterParams=t.filterParams,this.createDateComponent(),this.filterModelFormatter=new jGe(this.filterParams,this.localeService,this.optionsFactory);let e=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(e("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(t){this.refresh(t)}refresh(t){super.refresh(t),this.params=t,this.filterParams=t.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(t.currentParentModel())}updateCompOnModelChange(t){let e=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(t);if(this.setEditable(e),e){if(t){let n=t;this.dateComp.setDate(A0(n.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(t)),this.dateComp.setDate(null)}setEditable(t){Vn(this.eDateWrapper,t),Vn(this.eReadOnlyText.getGui(),!t)}onParentModelChanged(t,e){this.isEventFromFloatingFilter(e)||this.isEventFromDataChange(e)||(super.setLastTypeFromModel(t),this.updateCompOnModelChange(t))}onDateChanged(){let t=this.dateComp.getDate(),e=vg(t);this.params.parentFilterInstance(n=>{if(n){let i=A0(e);n.onFloatingFilterChanged(this.getLastType()||null,i)}})}getDateComponentParams(){let t=q3e(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:Ap(this.onDateChanged.bind(this),t),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new WGe(this.context,this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,t=>{t.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){let t=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(t)}getFilterModelFormatter(){return this.filterModelFormatter}},WHt=class extends ai{constructor(){super(`
            <div class="ag-filter-filter">
                <ag-input-text-field class="ag-date-filter" data-ref="eDateInput"></ag-input-text-field>
            </div>`,[xf]),this.eDateInput=Bt}destroy(){super.destroy()}init(t){this.params=t,this.setParams(t);let e=this.eDateInput.getInputElement();this.addManagedListeners(e,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||e.focus()},input:n=>{n.target===this.gos.getActiveDomElement()&&(this.eDateInput.isDisabled()||this.params.onDateChanged())}})}setParams(t){let e=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(t);this.usingSafariDatePicker=n&&g5(),e.type=n?"date":"text";let{minValidYear:i,maxValidYear:r,minValidDate:s,maxValidDate:o}=t.filterParams||{};if(s&&i&&wt("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),o&&r&&wt("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),s&&o){let[a,l]=[s,o].map(c=>c instanceof Date?c:A0(c));a&&l&&a.getTime()>l.getTime()&&wt("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}s?s instanceof Date?e.min=VB(s):e.min=s:i&&(e.min=`${i}-01-01`),o?o instanceof Date?e.max=VB(o):e.max=o:r&&(e.max=`${r}-12-31`)}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams(t)}getDate(){return A0(this.eDateInput.getValue())}setDate(t){this.eDateInput.setValue(vg(t,!1))}setInputPlaceholder(t){this.eDateInput.setInputPlaceholder(t)}setInputAriaLabel(t){this.eDateInput.setAriaLabel(t)}setDisabled(t){this.eDateInput.setDisabled(t)}afterGuiAttached(t){(!t||!t.suppressFocus)&&this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(t){return t.filterParams&&t.filterParams.browserDatePicker!=null?t.filterParams.browserDatePicker:G3e()||dGe()||g5()&&cGe()>=14.1}},ZGe=class extends Ot{constructor(t){super(),this.params=t,this.eFloatingFilterTextInput=Bt,this.valueChangedListener=()=>{}}setupGui(t){this.eFloatingFilterTextInput=this.createManagedBean(new yg(this.params?.config));let e=this.eFloatingFilterTextInput.getGui();t.appendChild(e);let n=i=>this.valueChangedListener(i);this.addManagedListeners(e,{input:n,keydown:n})}setEditable(t){this.eFloatingFilterTextInput.setDisabled(!t)}setAutoComplete(t){this.eFloatingFilterTextInput.setAutoComplete(t)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(t,e){this.eFloatingFilterTextInput.setValue(t,e)}setValueChangedListener(t){this.valueChangedListener=t}setParams(t){this.setAriaLabel(t.ariaLabel),t.autoComplete!==void 0&&this.setAutoComplete(t.autoComplete)}setAriaLabel(t){this.eFloatingFilterTextInput.setInputAriaLabel(t)}},XGe=class extends qGe{constructor(){super(...arguments),this.eFloatingFilterInputContainer=Bt}postConstruct(){this.setTemplate(`
            <div class="ag-floating-filter-input" role="presentation" data-ref="eFloatingFilterInputContainer"></div>
        `)}getDefaultDebounceMs(){return 500}onParentModelChanged(t,e){this.isEventFromFloatingFilter(e)||this.isEventFromDataChange(e)||(this.setLastTypeFromModel(t),this.setEditable(this.canWeEditAfterModelFromParentFilter(t)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(t)))}init(t){this.setupFloatingFilterInputService(t),super.init(t),this.setTextInputParams(t)}setupFloatingFilterInputService(t){this.floatingFilterInputService=this.createFloatingFilterInputService(t),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(t){this.params=t;let e=t.browserAutoComplete??!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(t),autoComplete:e}),this.applyActive=LZ(this.params.filterParams),!this.isReadOnly()){let n=q3e(this.params.filterParams,this.getDefaultDebounceMs()),i=Ap(this.syncUpWithParentFilter.bind(this),n);this.floatingFilterInputService.setValueChangedListener(i)}}onParamsUpdated(t){this.refresh(t)}refresh(t){super.refresh(t),this.setTextInputParams(t)}recreateFloatingFilterInputService(t){let e=this.floatingFilterInputService.getValue();zo(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(t),this.floatingFilterInputService.setValue(e,!0)}syncUpWithParentFilter(t){let e=t.key===It.ENTER;if(this.applyActive&&!e)return;let n=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(n=zGe(n),this.floatingFilterInputService.setValue(n,!0)),this.params.parentFilterInstance(i=>{i&&i.onFloatingFilterChanged(this.getLastType()||null,n||null)})}setEditable(t){this.floatingFilterInputService.setEditable(t)}},UHt=class extends Ot{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(t){this.eFloatingFilterNumberInput=this.createManagedBean(new JB),this.eFloatingFilterTextInput=this.createManagedBean(new yg),this.eFloatingFilterTextInput.setDisabled(!0);let e=this.eFloatingFilterNumberInput.getGui(),n=this.eFloatingFilterTextInput.getGui();t.appendChild(e),t.appendChild(n),this.setupListeners(e,i=>this.valueChangedListener(i)),this.setupListeners(n,i=>this.valueChangedListener(i))}setEditable(t){this.numberInputActive=t,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(t){this.eFloatingFilterNumberInput.setAutoComplete(t),this.eFloatingFilterTextInput.setAutoComplete(t)}getValue(){return this.getActiveInputElement().getValue()}setValue(t,e){this.getActiveInputElement().setValue(t,e)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(t){this.valueChangedListener=t}setupListeners(t,e){this.addManagedListeners(t,{input:e,keydown:e})}setParams(t){this.setAriaLabel(t.ariaLabel),t.autoComplete!==void 0&&this.setAutoComplete(t.autoComplete)}setAriaLabel(t){this.eFloatingFilterNumberInput.setInputAriaLabel(t),this.eFloatingFilterTextInput.setInputAriaLabel(t)}},jHt=class extends XGe{init(t){super.init(t),this.filterModelFormatter=new NGe(this.localeService,this.optionsFactory,t.filterParams?.numberFormatter)}onParamsUpdated(t){this.refresh(t)}refresh(t){E3e(t.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(t),super.refresh(t),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return OGe}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(t){return this.allowedCharPattern=E3e(t.filterParams),this.allowedCharPattern?this.createManagedBean(new ZGe({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new UHt)}},$Ht=class extends XGe{init(t){super.init(t),this.filterModelFormatter=new BGe(this.localeService,this.optionsFactory)}onParamsUpdated(t){this.refresh(t)}refresh(t){super.refresh(t),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return VGe}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new ZGe)}};ZHt=class extends Ot{constructor(){super(...arguments),this.beanName="quickFilterService",this.quickFilter=null,this.quickFilterParts=null}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.rowModel=t.rowModel,this.pivotResultColsService=t.pivotResultColsService}postConstruct(){let t=this.resetQuickFilterCache.bind(this);this.addManagedEventListeners({columnPivotModeChanged:t,newColumnsLoaded:t,columnRowGroupChanged:t,columnVisible:()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}refreshQuickFilterCols(){let t=this.columnModel.isPivotMode(),e=this.columnModel.getAutoCols(),n=this.columnModel.getColDefCols(),i=(t&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.pivotResultColsService.getPivotResultCols()?.list:n)??[];e&&(i=i.concat(e)),this.colsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?i:i.filter(r=>r.isVisible()||r.isRowGroupActive())}isQuickFilterPresent(){return this.quickFilter!==null}doesRowPassQuickFilter(t){let e=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(e,t):this.quickFilterParts.every(n=>e?this.doesRowPassQuickFilterCache(t,n):this.doesRowPassQuickFilterNoCache(t,n))}resetQuickFilterCache(){this.rowModel.forEachNode(t=>t.quickFilterAggregateText=null)}setQuickFilterParts(){let{quickFilter:t,parser:e}=this;t?this.quickFilterParts=e?e(t):t.split(" "):this.quickFilterParts=null}parseQuickFilter(t){return Di(t)?this.gos.isRowModelType("clientSide")?t.toUpperCase():(wt("Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(t){if(t!=null&&typeof t!="string"){wt(`Grid option quickFilterText only supports string inputs, received: ${typeof t}`);return}let e=this.parseQuickFilter(t);this.quickFilter!==e&&(this.quickFilter=e,this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setQuickFilterParserAndMatcher(){let t=this.gos.get("quickFilterParser"),e=this.gos.get("quickFilterMatcher"),n=t!==this.parser||e!==this.matcher;this.parser=t,this.matcher=e,n&&(this.setQuickFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onQuickFilterColumnConfigChanged(){this.refreshQuickFilterCols(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassQuickFilterNoCache(t,e){return this.colsForQuickFilter.some(n=>{let i=this.getQuickFilterTextForColumn(n,t);return Di(i)&&i.indexOf(e)>=0})}doesRowPassQuickFilterCache(t,e){return this.checkGenerateQuickFilterAggregateText(t),t.quickFilterAggregateText.indexOf(e)>=0}doesRowPassQuickFilterMatcher(t,e){let n;t?(this.checkGenerateQuickFilterAggregateText(e),n=e.quickFilterAggregateText):n=this.getQuickFilterAggregateText(e);let{quickFilterParts:i,matcher:r}=this;return r(i,n)}checkGenerateQuickFilterAggregateText(t){t.quickFilterAggregateText||(t.quickFilterAggregateText=this.getQuickFilterAggregateText(t))}getQuickFilterTextForColumn(t,e){let n=this.valueService.getValue(t,e,!0),i=t.getColDef();if(i.getQuickFilterText){let r=this.gos.addGridCommonParams({value:n,node:e,data:e.data,column:t,colDef:i});n=i.getQuickFilterText(r)}return Di(n)?n.toString().toUpperCase():null}getQuickFilterAggregateText(t){let e=[];return this.colsForQuickFilter.forEach(n=>{let i=this.getQuickFilterTextForColumn(n,t);Di(i)&&e.push(i)}),e.join(`
`)}},ez={version:ta,moduleName:"@ag-grid-community/filter-core",beans:[sHt]},XHt={version:ta,moduleName:"@ag-grid-community/filter-api",apiFunctions:{isAnyFilterPresent:BHt,onFilterChanged:zHt},dependantModules:[ez]},e6={version:ta,moduleName:"@ag-grid-community/column-filter",beans:[VHt],dependantModules:[ez]},QHt={version:ta,moduleName:"@ag-grid-community/column-filter-api",apiFunctions:{isColumnFilterPresent:kHt,getFilterInstance:IHt,getColumnFilterInstance:AHt,destroyFilter:PHt,setFilterModel:RHt,getFilterModel:FHt,getColumnFilterModel:LHt,setColumnFilterModel:OHt,showColumnFilter:NHt},dependantModules:[e6,XHt]},e4e={version:ta,moduleName:"@ag-grid-community/floating-filter-core",controllers:[{name:"headerFilterCell",classImp:MHt}],dependantModules:[e6]},YZ={version:ta,moduleName:"@ag-grid-community/floating-filter",dependantModules:[e4e,e6]},t4e={version:ta,moduleName:"@ag-grid-community/read-only-floating-filter",userComponents:[{name:"agReadOnlyFloatingFilter",classImp:HHt}],dependantModules:[e4e]},JHt={version:ta,moduleName:"@ag-grid-community/simple-filter",dependantModules:[e6],userComponents:[{name:"agTextColumnFilter",classImp:CHt},{name:"agNumberColumnFilter",classImp:_Ht},{name:"agDateColumnFilter",classImp:bHt},{name:"agDateInput",classImp:WHt}]},eGt={version:ta,moduleName:"@ag-grid-community/simple-floating-filter",dependantModules:[JHt,e4e],userComponents:[{name:"agTextColumnFloatingFilter",classImp:$Ht},{name:"agNumberColumnFloatingFilter",classImp:jHt},{name:"agDateColumnFloatingFilter",classImp:GHt}]},QGe={version:ta,moduleName:"@ag-grid-community/quick-filter-core",beans:[ZHt],dependantModules:[ez]},tGt={version:ta,moduleName:"@ag-grid-community/quick-filter-api",apiFunctions:{isQuickFilterPresent:KHt,getQuickFilter:YHt,resetQuickFilter:qHt},dependantModules:[QGe]},iGt={version:ta,moduleName:"@ag-grid-community/quick-filter",dependantModules:[QGe,tGt]},nGt={version:ta,moduleName:"@ag-grid-community/filter",dependantModules:[eGt,t4e,iGt,QHt]},i4e=class extends ai{constructor(t,e){super(t),this.ctrl=e}getCtrl(){return this.ctrl}},rGt=class extends i4e{constructor(t){super(`<div class="ag-header-cell ag-floating-filter" role="gridcell">
            <div data-ref="eFloatingFilterBody" role="presentation"></div>
            <div class="ag-floating-filter-button ag-hidden" data-ref="eButtonWrapper" role="presentation">
                <button type="button" class="ag-button ag-floating-filter-button-button" data-ref="eButtonShowMainFilter" tabindex="-1"></button>
            </div>
        </div>`,t),this.eFloatingFilterBody=Bt,this.eButtonWrapper=Bt,this.eButtonShowMainFilter=Bt}postConstruct(){let t=this.getGui(),e={addOrRemoveCssClass:(n,i)=>this.addOrRemoveCssClass(n,i),addOrRemoveBodyCssClass:(n,i)=>this.eFloatingFilterBody.classList.toggle(n,i),setButtonWrapperDisplayed:n=>Vn(this.eButtonWrapper,n),setCompDetails:n=>this.setCompDetails(n),getFloatingFilterComp:()=>this.compPromise,setWidth:n=>t.style.width=n,setMenuIcon:n=>this.eButtonShowMainFilter.appendChild(n)};this.ctrl.setComp(e,t,this.eButtonShowMainFilter,this.eFloatingFilterBody)}setCompDetails(t){if(!t){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=t.newAgStackInstance(),this.compPromise.then(e=>this.afterCompCreated(e))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(t){if(t){if(!this.isAlive()){this.destroyBean(t);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=t,this.eFloatingFilterBody.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached()}}},sGt=class extends i4e{constructor(t){super(`<div class="ag-header-cell" role="columnheader">
            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
        </div>`,t),this.eResize=Bt,this.eHeaderCompWrapper=Bt,this.headerCompVersion=0,this.column=t.getColumnGroupChild(),this.pinned=t.getPinned()}postConstruct(){let t=this.getGui();((r,s)=>{s!=null&&s!=""?t.setAttribute(r,s):t.removeAttribute(r)})("col-id",this.column.getColId());let n={setWidth:r=>t.style.width=r,addOrRemoveCssClass:(r,s)=>this.addOrRemoveCssClass(r,s),setAriaSort:r=>r?XBt(t,r):QBt(t),setUserCompDetails:r=>this.setUserCompDetails(r),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(n,this.getGui(),this.eResize,this.eHeaderCompWrapper);let i=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",i)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(t){this.headerCompVersion++;let e=this.headerCompVersion;t.newAgStackInstance().then(n=>this.afterCompCreated(e,n))}afterCompCreated(t,e){if(t!=this.headerCompVersion||!this.isAlive()){this.destroyBean(e);return}this.destroyHeaderComp(),this.headerComp=e,this.headerCompGui=e.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},oGt=class extends i4e{constructor(t){super(`<div class="ag-header-group-cell" role="columnheader">
            <div data-ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
            <div data-ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
        </div>`,t),this.eResize=Bt,this.eHeaderCompWrapper=Bt}postConstruct(){let t=this.getGui(),e=(i,r)=>r!=null?t.setAttribute(i,r):t.removeAttribute(i);t.setAttribute("col-id",this.ctrl.getColId());let n={addOrRemoveCssClass:(i,r)=>this.addOrRemoveCssClass(i,r),setResizableDisplayed:i=>Vn(this.eResize,i),setWidth:i=>t.style.width=i,setAriaExpanded:i=>e("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(n,t,this.eResize,this.eHeaderCompWrapper)}setUserCompDetails(t){t.newAgStackInstance().then(e=>this.afterHeaderCompCreated(e))}afterHeaderCompCreated(t){let e=()=>this.destroyBean(t);if(!this.isAlive()){e();return}let n=this.getGui(),i=t.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(e),this.headerGroupComp=t,this.ctrl.setDragSource(n)}},aGt=class extends ai{constructor(t){super(),this.headerComps={},this.ctrl=t,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}postConstruct(){HZ(this.getGui(),this.ctrl.getAriaRowIndex());let t={setHeight:e=>this.getGui().style.height=e,setTop:e=>this.getGui().style.top=e,setHeaderCtrls:(e,n)=>this.setHeaderCtrls(e,n),setWidth:e=>this.getGui().style.width=e};this.ctrl.setComp(t)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(t,e){if(!this.isAlive())return;let n=this.headerComps;if(this.headerComps={},t.forEach(i=>{let r=i.getInstanceId(),s=n[r];delete n[r],s==null&&(s=this.createHeaderComp(i),this.getGui().appendChild(s.getGui())),this.headerComps[r]=s}),Rh(n,(i,r)=>{this.getGui().removeChild(r.getGui()),this.destroyBean(r)}),e){let i=m5(this.headerComps);i.sort((s,o)=>{let a=s.getCtrl().getColumnGroupChild().getLeft(),l=o.getCtrl().getColumnGroupChild().getLeft();return a-l});let r=i.map(s=>s.getGui());yGe(this.getGui(),r)}}createHeaderComp(t){let e;switch(this.ctrl.getType()){case"group":e=new oGt(t);break;case"filter":e=new rGt(t);break;default:e=new sGt(t);break}return this.createBean(e),e.setParentComponent(this),e}},lGt=class extends Ot{constructor(){super(...arguments),this.beanName="headerNavigationService",this.currentHeaderRowWithoutSpan=-1}wireBeans(t){this.focusService=t.focusService,this.headerPositionUtils=t.headerPositionUtils,this.ctrlsService=t.ctrlsService,this.columnModel=t.columnModel,this.visibleColService=t.visibleColsService}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl});let t=this.gos.getDocument();this.addManagedElementListeners(t,{mousedown:()=>this.setCurrentHeaderRowWithoutSpan(-1)})}getHeaderRowCount(){let t=this.ctrlsService.getHeaderRowContainerCtrl();return t?t.getRowCount():0}getHeaderPositionForColumn(t,e){let n;if(typeof t=="string"?(n=this.columnModel.getCol(t),n||(n=this.visibleColService.getColumnGroup(t))):n=t,!n)return null;let r=this.ctrlsService.getHeaderRowContainerCtrl()?.getAllCtrls(),s=Ar(r||[]).getType()==="filter",o=this.getHeaderRowCount()-1,a=-1,l=n;for(;l;)a++,l=l.getParent();let c=a;return e&&s&&c===o-1&&c++,c===-1?null:{headerRowIndex:c,column:n}}navigateVertically(t,e,n){if(e||(e=this.focusService.getFocusedHeader()),!e)return!1;let{headerRowIndex:i}=e,r=e.column,s=this.getHeaderRowCount(),o=t===0,{headerRowIndex:a,column:l,headerRowIndexWithoutSpan:c}=o?this.headerPositionUtils.getColumnVisibleParent(r,i):this.headerPositionUtils.getColumnVisibleChild(r,i),d=!1;return a<0&&(a=0,l=r,d=!0),a>=s?(a=-1,this.setCurrentHeaderRowWithoutSpan(-1)):c!==void 0&&(this.currentHeaderRowWithoutSpan=c),!d&&!l?!1:this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a,column:l},allowUserOverride:!0,event:n})}setCurrentHeaderRowWithoutSpan(t){this.currentHeaderRowWithoutSpan=t}navigateHorizontally(t,e=!1,n){let i=this.focusService.getFocusedHeader(),r=t===2,s=this.gos.get("enableRtl"),o,a;if(this.currentHeaderRowWithoutSpan!==-1?i.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=i.headerRowIndex,r!==s?(a="Before",o=this.headerPositionUtils.findHeader(i,a)):(a="After",o=this.headerPositionUtils.findHeader(i,a)),o||!e)return this.focusService.focusHeaderPosition({headerPosition:o,direction:a,fromTab:e,allowUserOverride:!0,event:n});if(e){let l=this.gos.getCallback("tabToNextHeader");if(l)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:o,direction:a})}return this.focusNextHeaderRow(i,a,n)}focusNextHeaderRow(t,e,n){let i=t.headerRowIndex,r=null,s;if(e==="Before"?i>0&&(s=i-1,this.currentHeaderRowWithoutSpan-=1,r=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"end")):(s=i+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),r=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"start")),!r)return!1;let{column:o,headerRowIndex:a}=this.headerPositionUtils.getHeaderIndexToFocus(r.column,r?.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:a},direction:e,fromTab:!0,allowUserOverride:!0,event:n})}scrollToColumn(t,e="After"){if(t.getPinned())return;let n;if(Sm(t)){let i=t.getDisplayedLeafColumns();n=e==="Before"?Ar(i):i[0]}else n=t;this.gridBodyCon.getScrollFeature().ensureColumnVisible(n)}},cGt=class extends Ot{wireBeans(t){this.animationFrameService=t.animationFrameService,this.headerNavigationService=t.headerNavigationService,this.focusService=t.focusService,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.ctrlsService=t.ctrlsService,this.filterManager=t.filterManager,this.menuService=t.menuService}setComp(t,e,n){this.comp=t,this.eGui=e,this.createManagedBean(new Ky(n,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),this.onPivotModeChanged(),this.setupHeaderHeight();let i=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:i}),this.mockContextMenuForIPad(i),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){let t=this.setHeaderHeight.bind(this);t(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t),this.addManagedEventListeners({displayedColumnsChanged:t,columnHeaderHeightChanged:t,columnGroupHeaderHeightChanged:()=>this.animationFrameService.requestAnimationFrame(()=>t()),gridStylesChanged:t,advancedFilterEnabledChanged:t})}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){let{columnModel:t}=this,e=0,n=this.columnModel.getGroupRowsHeight().reduce((s,o)=>s+o,0),i=this.columnModel.getColumnHeaderRowHeight();if(this.filterManager?.hasFloatingFilters()&&(e+=t.getFloatingFiltersHeight()),e+=n,e+=i,this.headerHeight===e)return;this.headerHeight=e;let r=`${e+1}px`;this.comp.setHeightAndMinHeight(r),this.eventService.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(){let t=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(){let e=this.visibleColsService.getAllCols().some(n=>n.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)}onTabKeyDown(t){let e=this.gos.get("enableRtl"),n=t.shiftKey,i=n!==e?2:3;(this.headerNavigationService.navigateHorizontally(i,!0,t)||!n&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(n))&&t.preventDefault()}handleKeyDown(t){let e=null;switch(t.key){case It.LEFT:e=2;case It.RIGHT:{Di(e)||(e=3),this.headerNavigationService.navigateHorizontally(e,!1,t)&&t.preventDefault();break}case It.UP:e=0;case It.DOWN:{Di(e)||(e=1),this.headerNavigationService.navigateVertically(e,null,t)&&t.preventDefault();break}default:return}}onFocusOut(t){let{relatedTarget:e}=t;!e&&this.eGui.contains(this.gos.getActiveDomElement())||this.eGui.contains(e)||this.focusService.clearFocusedHeader()}onHeaderContextMenu(t,e,n){if(!t&&!n||!this.menuService.isHeaderContextMenuEnabled())return;let{target:i}=t??e;(i===this.eGui||i===this.ctrlsService.getHeaderRowContainerCtrl()?.getViewportElement())&&this.menuService.showHeaderContextMenu(void 0,t,n)}mockContextMenuForIPad(t){if(!x5())return;let e=new Zv(this.eGui),n=i=>{t(void 0,i.touchStart,i.touchEvent)};this.addManagedListeners(e,{longTap:n}),this.addDestroyFunc(()=>e.destroy())}},n4e=class extends Ot{constructor(t,e=!1){super(),this.callback=t,this.addSpacer=e}wireBeans(t){this.visibleColsService=t.visibleColsService,this.scrollVisibleService=t.scrollVisibleService}postConstruct(){let t=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",t),this.addManagedEventListeners({columnContainerWidthChanged:t,displayedColumnsChanged:t,leftPinnedWidthChanged:t}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:t,scrollVisibilityChanged:t,scrollbarWidthChanged:t}),this.setWidth()}setWidth(){let t=this.gos.isDomLayout("print"),e=this.visibleColsService.getBodyContainerWidth(),n=this.visibleColsService.getColsLeftWidth(),i=this.visibleColsService.getDisplayedColumnsRightWidth(),r;t?r=e+n+i:(r=e,this.addSpacer&&(this.gos.get("enableRtl")?n:i)===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(r+=this.gos.getScrollbarWidth())),this.callback(r)}},dGt=class extends Ot{constructor(t){super(),this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=t}wireBeans(t){this.funcColsService=t.funcColsService}onDragEnter(t){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let e=t.dragItem.columns;e&&e.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?"pinned":"move":null}onDragLeave(t){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(t){}onDragStop(t){this.columnsToAggregate.length>0&&this.funcColsService.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.funcColsService.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.funcColsService.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}};fGt=class extends Ot{constructor(t){super(),this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=t,this.isCenterContainer=!Di(t)}wireBeans(t){this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.columnMoveService=t.columnMoveService,this.dragAndDropService=t.dragAndDropService,this.ctrlsService=t.ctrlsService}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridBodyCon=t.gridBodyCtrl})}getIconName(){let t=this.lastDraggingEvent.dragItem.columns??[];return this.pinned?t.some(n=>!n.getColDef().lockPinned||n.getPinned()===this.pinned)?"pinned":"notAllowed":t.some(n=>!n.getColDef().lockPinned||!n.isPinned())?"move":"notAllowed"}onDragEnter(t){let e=t.dragItem.columns;if(t.dragSource.type===0)this.setColumnsVisible(e,!0,"uiColumnDragged");else{let i=t.dragItem.visibleState,r=(e||[]).filter(s=>i[s.getId()]);this.setColumnsVisible(r,!0,"uiColumnDragged")}this.setColumnsPinned(e,this.pinned,"uiColumnDragged"),this.onDragging(t,!0,!0)}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(t,e,n){if(t){let i=t.filter(r=>!r.getColDef().lockVisible);this.columnModel.setColsVisible(i,e,n)}}setColumnsPinned(t,e,n){if(t){let i=t.filter(r=>!r.getColDef().lockPinned);this.columnModel.setColsPinned(i,e,n)}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}checkCenterForScrolling(t){if(this.isCenterContainer){let e=this.ctrlsService.get("center"),n=e.getCenterViewportScrollLeft(),i=n+e.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=t<n+50,this.needToMoveLeft=t>i-50):(this.needToMoveLeft=t<n+50,this.needToMoveRight=t>i-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}onDragging(t=this.lastDraggingEvent,e=!1,n=!1,i=!1){if(i){if(this.lastMovedInfo){let{columns:c,toIndex:d}=this.lastMovedInfo;JGe(c,d,"uiColumnMoved",!0,this.columnMoveService)}return}if(this.lastDraggingEvent=t,Ls(t.hDirection))return;let r=s4e(t.x,this.pinned,!1,this.gos,this.ctrlsService);e||this.checkCenterForScrolling(r);let s=this.normaliseDirection(t.hDirection),o=t.dragSource.type,a=t.dragSource.getDragItem().columns?.filter(c=>c.getColDef().lockPinned?c.getPinned()==this.pinned:!0)||[],l=r4e({allMovingColumns:a,isFromHeader:o===1,hDirection:s,xPosition:r,pinned:this.pinned,fromEnter:e,fakeEvent:n,gos:this.gos,columnModel:this.columnModel,columnMoveService:this.columnMoveService,presentedColsService:this.visibleColsService});l&&(this.lastMovedInfo=l)}normaliseDirection(t){if(this.gos.get("enableRtl"))switch(t){case 0:return 1;case 1:return 0;default:Do(`Unknown direction ${t}`)}else return t}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.dragAndDropService.setGhostIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(this.getIconName()))}moveInterval(){let t;this.intervalCount++,t=10+this.intervalCount*5,t>100&&(t=100);let e=null,n=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?e=n.scrollHorizontally(-t):this.needToMoveRight&&(e=n.scrollHorizontally(t)),e!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;let r=this.lastDraggingEvent.dragItem.columns.filter(s=>!s.getColDef().lockPinned);if(r.length>0&&(this.dragAndDropService.setGhostIcon("pinned"),this.failedMoveAttempts>7)){let s=this.needToMoveLeft?"left":"right";this.setColumnsPinned(r,s,"uiColumnDragged"),this.dragAndDropService.nudge()}}}},gGt=class extends Ot{wireBeans(t){this.dragAndDropService=t.dragAndDropService,this.columnModel=t.columnModel,this.ctrlsService=t.ctrlsService}constructor(t,e){super(),this.pinned=t,this.eContainer=e}postConstruct(){this.ctrlsService.whenReady(t=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.left.getContainerElement()],[t.bottomLeft.getContainerElement()],[t.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.right.getContainerElement()],[t.bottomRight.getContainerElement()],[t.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.center.getViewportElement()],[t.bottomCenter.getViewportElement()],[t.topCenter.getViewportElement()]];break}}),this.moveColumnFeature=this.createManagedBean(new fGt(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new dGt(this.pinned)),this.dragAndDropService.addDropTarget(this)}isInterestedIn(t){return t===1||t===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(t){return this.columnModel.isPivotMode()&&t.dragSource.type===0}onDragEnter(t){this.currentDropListener=this.isDropColumnInPivotMode(t)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(t)}onDragLeave(t){this.currentDropListener.onDragLeave(t)}onDragging(t){this.currentDropListener.onDragging(t)}onDragStop(t){this.currentDropListener.onDragStop(t)}},vGt=class extends Ot{wireBeans(t){this.horizontalResizeService=t.horizontalResizeService,this.pinnedWidthService=t.pinnedWidthService,this.ctrlsService=t.ctrlsService,this.columnSizeService=t.columnSizeService,this.columnAutosizeService=t.columnAutosizeService}constructor(t,e,n,i,r){super(),this.pinned=t,this.column=e,this.eResize=n,this.comp=i,this.ctrl=r}postConstruct(){let t=[],e,n,i=()=>{if(Vn(this.eResize,e),!e)return;let o=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(o),n){let a=this.gos.get("skipHeaderOnAutoSize"),l=()=>{this.columnAutosizeService.autoSizeColumn(this.column,"uiColumnResized",a)};this.eResize.addEventListener("dblclick",l);let c=new Zv(this.eResize);c.addEventListener("doubleTap",l),t.push(()=>{this.eResize.removeEventListener("dblclick",l),c.removeEventListener("doubleTap",l),c.destroy()})}},r=()=>{t.forEach(o=>o()),t.length=0},s=()=>{let o=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(o!==e||a!==n)&&(e=o,n=a,r(),i())};s(),this.addDestroyFunc(r),this.ctrl.addRefreshFunction(s)}onResizing(t,e){let{column:n,lastResizeAmount:i,resizeStartWidth:r}=this,s=this.normaliseResizeAmount(e),o=r+s,a=[{key:n,newWidth:o}];if(this.column.getPinned()){let l=this.pinnedWidthService.getPinnedLeftWidth(),c=this.pinnedWidthService.getPinnedRightWidth(),d=yD(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(l+c+(s-i)>d)return}this.lastResizeAmount=s,this.columnSizeService.setColumnWidths(a,this.resizeWithShiftKey,t,"uiColumnResized"),t&&this.toggleColumnResizing(!1)}onResizeStart(t){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=t,this.toggleColumnResizing(!0)}toggleColumnResizing(t){this.comp.addOrRemoveCssClass("ag-column-resizing",t)}normaliseResizeAmount(t){let e=t,n=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?n&&(e*=-1):i&&(e*=-1),e}},yGt=class extends Ot{constructor(t){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=t}wireBeans(t){this.rowModel=t.rowModel,this.selectionService=t.selectionService}onSpaceKeyDown(t){let e=this.cbSelectAll;e.isDisplayed()&&!e.getGui().contains(this.gos.getActiveDomElement())&&(t.preventDefault(),e.setValue(!e.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(t){this.headerCellCtrl=t,this.cbSelectAll=this.createManagedBean(new b5),this.cbSelectAll.addCssClass("ag-header-select-all"),dd(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:this.onNewColumnsLoaded.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedListeners(this.cbSelectAll,{fieldValueChanged:this.onCbSelectAll.bind(this)}),$B(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;let t=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(t);let e=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!e),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){let t=this.localeService.getLocaleTextFunc(),n=this.cbSelectAll.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),i=t("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${i} (${n})`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(`${i} (${n})`),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(t){return this.gos.get("rowSelection")==="multiple"?!0:(wt(`${t} is only available if using 'multiple' rowSelection.`),!1)}checkRightRowModelType(t){let e=this.rowModel.getType();return e==="clientSide"||e==="serverSide"?!0:(wt(`${t} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${e}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let t=this.cbSelectAll.getValue(),e=this.isFilteredOnly(),n=this.isCurrentPageOnly(),i="uiSelectAll";n?i="uiSelectAllCurrentPage":e&&(i="uiSelectAllFiltered");let r={source:i,justFiltered:e,justCurrentPage:n};t?this.selectionService.selectAllRowNodes(r):this.selectionService.deselectAllRowNodes(r)}isCheckboxSelection(){let t=this.column.getColDef().headerCheckboxSelection;if(typeof t=="function"){let e=t,n=this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()});t=e(n)}return t?this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection"):!1}isFilteredOnly(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}},_Gt=class extends KZ{constructor(t,e,n){super(t,e,n),this.refreshFunctions=[],this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=t}setComp(t,e,n,i){this.comp=t,this.setGui(e),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:r=>this.addRefreshFunction(r)}),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new vGt(this.getPinned(),this.column,n,t,this)),this.createManagedBean(new Q3e([this.column],e)),this.createManagedBean(new X3e(this.column,e,this.beans)),this.createManagedBean(new Ky(e,{shouldStopEventPropagation:r=>this.shouldStopEventPropagation(r),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(e),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListeners(this.column,{colDefChanged:this.refresh.bind(this)}),this.addManagedEventListeners({columnValueChanged:this.onColumnValueChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this),columnPivotChanged:this.onColumnPivotChanged.bind(this),headerHeightChanged:this.onHeaderHeightChanged.bind(this)})}resizeHeader(t,e){if(!this.column.isResizable())return;let n=this.column.getActualWidth(),i=this.column.getMinWidth(),r=this.column.getMaxWidth(),s=Math.min(Math.max(n+t,i),r);this.beans.columnSizeService.setColumnWidths([{key:this.column,newWidth:s}],e,!0,"uiColumnResized")}moveHeader(t){let{eGui:e,column:n,gos:i,ctrlsService:r}=this,s=this.getPinned(),o=e.getBoundingClientRect().left,a=n.getActualWidth(),l=i.get("enableRtl"),d=s4e(t===0!==l?o-20:o+a+20,s,!0,i,r),u=this.focusService.getFocusedHeader();r4e({allMovingColumns:[n],isFromHeader:!0,hDirection:t,xPosition:d,pinned:s,fromEnter:!1,fakeEvent:!1,gos:i,columnModel:this.beans.columnModel,columnMoveService:this.beans.columnMoveService,presentedColsService:this.beans.visibleColsService}),r.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(n,"auto"),(!this.isAlive()||this.beans.gos.get("ensureDomOrder"))&&u&&this.restoreFocus(u)}restoreFocus(t){this.focusService.focusHeaderPosition({headerPosition:St(ve({},t),{column:this.column})})}setupUserComp(){let t=this.lookupUserCompDetails();this.setCompDetails(t)}setCompDetails(t){this.userCompDetails=t,this.comp.setUserCompDetails(t)}lookupUserCompDetails(){let t=this.createParams(),e=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(e,t)}createParams(){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:e=>{this.menuService.showColumnMenu({column:this.column,buttonElement:e,positionBy:"button"})},showColumnMenuAfterMouseClick:e=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:e,positionBy:"mouse"})},showFilter:e=>{this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{this.beans.sortController.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,n)=>{this.beans.sortController.setSortForColumn(this.column,e,!!n,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(e,n)=>{this.setupTooltip(e,n)}})}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new yGt(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(t){super.handleKeyDown(t),t.key===It.SPACE&&this.selectAllFeature.onSpaceKeyDown(t),t.key===It.ENTER&&this.onEnterKeyDown(t),t.key===It.DOWN&&t.altKey&&this.showMenuOnKeyPress(t,!1)}onEnterKeyDown(t){if(t.ctrlKey||t.metaKey)this.showMenuOnKeyPress(t,!0);else if(this.sortable){let e=t.shiftKey;this.beans.sortController.progressSort(this.column,e,"uiColumnSorted")}}showMenuOnKeyPress(t,e){let n=this.comp.getUserCompInstance();!n||!(n instanceof T3e)||n.onMenuKeyboardShortcut(e)&&t.preventDefault()}onFocusIn(t){if(!this.getGui().contains(t.relatedTarget)){let e=this.getRowIndex();this.focusService.setFocusedHeader(e,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(t){this.getGui().contains(t.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(t,e){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let n=this.gos.get("tooltipShowMode")==="whenTruncated",i=this.eGui,r=this.column.getColDef();!e&&n&&!r.headerComponent&&(e=()=>{let a=i.querySelector(".ag-header-cell-text");return a?a.scrollWidth>a.clientWidth:!0});let s={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>i,getLocation:()=>"header",getTooltipValue:()=>t??this.column.getColDef().headerTooltip,shouldDisplayTooltip:e},o=this.createManagedBean(new W1(s));this.refreshFunctions.push(()=>o.refreshToolTip())}setupClassesFromColDef(){let t=()=>{let e=this.column.getColDef(),n=jZ(e,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(n),n.forEach(r=>{i.has(r)?i.delete(r):this.comp.addOrRemoveCssClass(r,!0)}),i.forEach(r=>this.comp.addOrRemoveCssClass(r,!1))};this.refreshFunctions.push(t),t()}setDragSource(t){if(this.dragSourceElement=t,this.removeDragSource(),!t||!this.draggable)return;let{column:e,beans:n,displayName:i,dragAndDropService:r,gos:s}=this,{columnModel:o}=n,a=!this.gos.get("suppressDragLeaveHidesColumns"),l=this.dragSource={type:1,eElement:t,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:()=>this.createDragItem(e),dragItemName:i,onDragStarted:()=>{a=!s.get("suppressDragLeaveHidesColumns"),e.setMoving(!0,"uiColumnMoved")},onDragStopped:()=>e.setMoving(!1,"uiColumnMoved"),onGridEnter:c=>{if(a){let d=c?.columns?.filter(u=>!u.getColDef().lockVisible)||[];o.setColsVisible(d,!0,"uiColumnMoved")}},onGridExit:c=>{if(a){let d=c?.columns?.filter(u=>!u.getColDef().lockVisible)||[];o.setColsVisible(d,!1,"uiColumnMoved")}}};r.addDragSource(l,!0)}createDragItem(t){let e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}addRefreshFunction(t){this.refreshFunctions.push(t)}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(t=>t())}refreshHeaderComp(){let t=this.lookupUserCompDetails();(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==t.componentClass?this.attemptHeaderCompRefresh(t.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(t)}attemptHeaderCompRefresh(t){let e=this.comp.getUserCompInstance();return!e||!e.refresh?!1:e.refresh(t)}calculateDisplayName(){return this.beans.columnNameService.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){let t=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!t.suppressMovable&&!t.lockPosition)||!!t.enableRowGroup||!!t.enablePivot}onColumnRowGroupChanged(){this.checkDisplayName()}onColumnPivotChanged(){this.checkDisplayName()}onColumnValueChanged(){this.checkDisplayName()}setupWidth(){let t=()=>{let e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};this.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(){let t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};this.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(){let t=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};this.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(){let t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.addRefreshFunction(t),this.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(){let t=()=>{let e=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",e),this.refreshAria()};this.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let t=()=>{let e=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",e)};t(),this.addRefreshFunction(t)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){let{eGui:t,column:e,comp:n,beans:i}=this;if(!e.isSpanHeaderHeight()){t.style.removeProperty("top"),t.style.removeProperty("height"),n.addOrRemoveCssClass("ag-header-span-height",!1),n.addOrRemoveCssClass("ag-header-span-total",!1);return}let{numberOfParents:r,isSpanningTotal:s}=this.column.getColumnGroupPaddingInfo();n.addOrRemoveCssClass("ag-header-span-height",r>0);let{columnModel:o}=i,a=o.getColumnHeaderRowHeight();if(r===0){n.addOrRemoveCssClass("ag-header-span-total",!1),t.style.setProperty("top","0px"),t.style.setProperty("height",`${a}px`);return}n.addOrRemoveCssClass("ag-header-span-total",s);let l=this.beans.columnModel.getGroupRowsHeight(),c=0;for(let d=0;d<r;d++)c+=l[l.length-1-d];t.style.setProperty("top",`${-c}px`),t.style.setProperty("height",`${a+c}px`)}refreshAriaSort(){if(this.sortable){let t=this.localeService.getLocaleTextFunc(),e=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(UBt(e)),this.setAriaDescriptionProperty("sort",t("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){let t=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",t("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){let t=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",t("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){let t=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",t("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(t,e){e!=null?this.ariaDescriptionProperties.set(t,e):this.ariaDescriptionProperties.delete(t)}announceAriaDescription(){if(!this.eGui.contains(this.beans.gos.getActiveDomElement()))return;let t=Array.from(this.ariaDescriptionProperties.keys()).sort((e,n)=>e==="filter"?-1:n.charCodeAt(0)-e.charCodeAt(0)).map(e=>this.ariaDescriptionProperties.get(e)).join(". ");this.beans.ariaAnnouncementService.announceValue(t,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(){let t=()=>{if(!this.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};this.addManagedEventListeners({columnHoverChanged:t}),t()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(){let t=i=>this.handleMouseOverChange(i.type==="mouseenter"),e=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column),n=i=>this.handleContextMenuMouseEvent(i,void 0,this.column);this.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:e,contextmenu:n})}handleMouseOverChange(t){this.setActiveHeader(t),this.eventService.dispatchEvent({type:t?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(t){this.comp.addOrRemoveCssClass("ag-header-active",t)}getAnchorElementForMenu(t){let e=this.comp.getUserCompInstance();return e instanceof T3e?e.getAnchorElementForMenu(t):this.getGui()}destroy(){super.destroy(),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null}},CGt=class extends Ot{wireBeans(t){this.horizontalResizeService=t.horizontalResizeService,this.autoWidthCalculator=t.autoWidthCalculator,this.visibleColsService=t.visibleColsService,this.columnSizeService=t.columnSizeService,this.columnAutosizeService=t.columnAutosizeService}constructor(t,e,n,i){super(),this.eResize=e,this.comp=t,this.pinned=n,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let t=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(t),!this.gos.get("suppressAutoSize")){let e=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{let n=[];this.columnGroup.getDisplayedLeafColumns().forEach(r=>{r.getColDef().suppressAutoSize||n.push(r.getColId())}),n.length>0&&this.columnAutosizeService.autoSizeCols({colKeys:n,skipHeader:e,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(t){let e=this.getInitialValues(t);this.storeLocalValues(e),this.toggleColumnResizing(!0)}onResizing(t,e,n="uiColumnResized"){let i=this.normaliseDragChange(e),r=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(r,n,t)}getInitialValues(t){let e=this.getColumnsToResize(),n=this.getInitialSizeOfColumns(e),i=this.getSizeRatiosOfColumns(e,n),r={columnsToResize:e,resizeStartWidth:n,resizeRatios:i},s=null;if(t&&(s=this.visibleColsService.getGroupAtDirection(this.columnGroup,"After")),s){let o=s.getDisplayedLeafColumns(),a=r.groupAfterColumns=o.filter(c=>c.isResizable()),l=r.groupAfterStartWidth=this.getInitialSizeOfColumns(a);r.groupAfterRatios=this.getSizeRatiosOfColumns(a,l)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}storeLocalValues(t){let{columnsToResize:e,resizeStartWidth:n,resizeRatios:i,groupAfterColumns:r,groupAfterStartWidth:s,groupAfterRatios:o}=t;this.resizeCols=e,this.resizeStartWidth=n,this.resizeRatios=i,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=s,this.resizeTakeFromRatios=o}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(t){let e=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),n=this.getInitialValues();e>n.resizeStartWidth&&this.resizeColumns(n,e,t,!0)}resizeColumnsFromLocalValues(t,e,n=!0){if(!this.resizeCols||!this.resizeRatios)return;let i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols??void 0,groupAfterStartWidth:this.resizeTakeFromStartWidth??void 0,groupAfterRatios:this.resizeTakeFromRatios??void 0};this.resizeColumns(i,t,e,n)}resizeColumns(t,e,n,i=!0){let{columnsToResize:r,resizeStartWidth:s,resizeRatios:o,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=t,d=[];if(d.push({columns:r,ratios:o,width:e}),a){let u=e-s;d.push({columns:a,ratios:c,width:l-u})}this.columnSizeService.resizeColumnSets({resizeSets:d,finished:i,source:n}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(t){this.comp.addOrRemoveCssClass("ag-column-resizing",t)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(e=>e.isResizable())}getInitialSizeOfColumns(t){return t.reduce((e,n)=>e+n.getActualWidth(),0)}getSizeRatiosOfColumns(t,e){return t.map(n=>n.getActualWidth()/e)}normaliseDragChange(t){let e=t;return this.gos.get("enableRtl")?this.pinned!=="left"&&(e*=-1):this.pinned==="right"&&(e*=-1),e}destroy(){super.destroy(),this.clearLocalValues()}},xGt=class extends Ot{constructor(t,e){super(),this.removeChildListenersFuncs=[],this.columnGroup=e,this.comp=t}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();let t=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(e=>{e.addEventListener("widthChanged",t),e.addEventListener("visibleChanged",t),this.removeChildListenersFuncs.push(()=>{e.removeEventListener("widthChanged",t),e.removeEventListener("visibleChanged",t)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(t=>t()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let t=this.columnGroup.getActualWidth();this.comp.setWidth(`${t}px`),this.comp.addOrRemoveCssClass("ag-hidden",t===0)}},bGt=class extends KZ{constructor(t,e,n){super(t,e,n),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){let i=this.getGui();this.setDragSource(i)}},this.column=t}setComp(t,e,n,i){this.comp=t,this.setGui(e),this.displayName=this.beans.columnNameService.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.addDestroyFunc(()=>{this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature))}),this.setupAutoHeight({wrapperElement:i}),this.setupUserComp(),this.addHeaderMouseListeners();let r=this.getParentRowCtrl().getPinned(),s=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new Q3e(s,e)),this.createManagedBean(new X3e(this.column,e,this.beans)),this.createManagedBean(new xGt(t,this.column)),this.resizeFeature=this.createManagedBean(new CGt(t,n,r,this.column)),this.createManagedBean(new Ky(e,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(e)}getColumn(){return this.column}resizeHeader(t,e){if(!this.resizeFeature)return;let n=this.resizeFeature.getInitialValues(e);this.resizeFeature.resizeColumns(n,n.resizeStartWidth+t,"uiColumnResized",!0)}moveHeader(t){let{beans:e,eGui:n,column:i,gos:r,ctrlsService:s}=this,o=r.get("enableRtl"),a=t===0,l=this.getPinned(),c=n.getBoundingClientRect(),d=c.left,u=c.width,m=s4e(a!==o?d-20:d+u+20,l,!0,r,s),f=i.getGroupId(),_=this.focusService.getFocusedHeader();r4e({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:t,xPosition:m,pinned:l,fromEnter:!1,fakeEvent:!1,gos:r,columnModel:e.columnModel,columnMoveService:e.columnMoveService,presentedColsService:e.visibleColsService});let x=i.getDisplayedLeafColumns(),D=a?x[0]:Ar(x);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(D,"auto"),(!this.isAlive()||this.beans.gos.get("ensureDomOrder"))&&_&&this.restoreFocus(f,i,_)}restoreFocus(t,e,n){let i=e.getLeafColumns();if(!i.length)return;let r=i[0].getParent();if(!r)return;let s=this.findGroupWidthId(r,t);s&&this.focusService.focusHeaderPosition({headerPosition:St(ve({},n),{column:s})})}findGroupWidthId(t,e){for(;t;){if(t.getGroupId()===e)return t;t=t.getParent()}return null}resizeLeafColumnsToFit(t){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(t)}setupUserComp(){let t=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:n=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),n,"gridInitializing")},setTooltip:(n,i)=>{this.setupTooltip(n,i)}}),e=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(e)}addHeaderMouseListeners(){let t=i=>this.handleMouseOverChange(i.type==="mouseenter"),e=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),n=i=>this.handleContextMenuMouseEvent(i,void 0,this.column.getProvidedColumnGroup());this.addManagedListeners(this.getGui(),{mouseenter:t,mouseleave:t,click:e,contextmenu:n})}handleMouseOverChange(t){this.eventService.dispatchEvent({type:t?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(t,e){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let n=this.column.getColGroupDef(),i=this.gos.get("tooltipShowMode")==="whenTruncated",r=this.eGui;!e&&i&&!n?.headerGroupComponent&&(e=()=>{let o=r.querySelector(".ag-header-group-text");return o?o.scrollWidth>o.clientWidth:!0});let s={getColumn:()=>this.column,getGui:()=>r,getLocation:()=>"headerGroup",getTooltipValue:()=>t??(n&&n.headerTooltip),shouldDisplayTooltip:e};n&&(s.getColDef=()=>n),this.createManagedBean(new W1(s))}setupExpandable(){let t=this.column.getProvidedColumnGroup();this.refreshExpanded();let e=this.refreshExpanded.bind(this);this.addManagedListeners(t,{expandedChanged:e,expandableChanged:e})}refreshExpanded(){let{column:t}=this;this.expandable=t.isExpandable();let e=t.isExpanded();this.expandable?this.comp.setAriaExpanded(e?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){let t=this.column.getColGroupDef(),e=jZ(t,this.gos,null,this.column);this.column.isPadding()?(e.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(i=>i.isSpanHeaderHeight())&&e.push("ag-header-span-height")):(e.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&e.push("ag-header-cell-wrap-text")),e.forEach(n=>this.comp.addOrRemoveCssClass(n,!0))}setupMovingCss(){let e=this.column.getProvidedColumnGroup().getLeafColumns(),n=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());e.forEach(i=>{this.addManagedListeners(i,{movingChanged:n})}),n()}onFocusIn(t){if(!this.eGui.contains(t.relatedTarget)){let e=this.getRowIndex();this.beans.focusService.setFocusedHeader(e,this.column)}}handleKeyDown(t){super.handleKeyDown(t);let e=this.getWrapperHasFocus();if(!(!this.expandable||!e)&&t.key===It.ENTER){let n=this.column,i=!n.isExpanded();this.beans.columnModel.setColumnGroupOpened(n.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(t){if(!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),!t))return;let{beans:e,column:n,displayName:i,gos:r,dragAndDropService:s}=this,{columnModel:o}=e,a=n.getProvidedColumnGroup().getLeafColumns(),l=!r.get("suppressDragLeaveHidesColumns"),c=this.dragSource={type:1,eElement:t,getDefaultIconName:()=>l?"hide":"notAllowed",dragItemName:i,getDragItem:()=>this.getDragItemForGroup(n),onDragStarted:()=>{l=!r.get("suppressDragLeaveHidesColumns"),a.forEach(d=>d.setMoving(!0,"uiColumnDragged"))},onDragStopped:()=>a.forEach(d=>d.setMoving(!1,"uiColumnDragged")),onGridEnter:d=>{if(l){let{columns:u=[],visibleState:m}=d??{},f=u.filter(_=>!_.getColDef().lockVisible&&(!m||m[_.getColId()]));o.setColsVisible(f,!0,"uiColumnMoved")}},onGridExit:d=>{if(l){let u=d?.columns?.filter(m=>!m.getColDef().lockVisible)||[];o.setColsVisible(u,!1,"uiColumnMoved")}}};s.addDragSource(c,!0)}getDragItemForGroup(t){let e=t.getProvidedColumnGroup().getLeafColumns(),n={};e.forEach(r=>n[r.getId()]=r.isVisible());let i=[];return this.beans.visibleColsService.getAllCols().forEach(r=>{e.indexOf(r)>=0&&(i.push(r),Ip(e,r))}),e.forEach(r=>i.push(r)),{columns:i,visibleState:n}}isSuppressMoving(){let t=!1;return this.column.getLeafColumns().forEach(n=>{(n.getColDef().suppressMovable||n.getColDef().lockPosition)&&(t=!0)}),t||this.gos.get("suppressMovableColumns")}},wGt=0,h3e=class extends Ot{constructor(t,e,n){super(),this.instanceId=wGt++,this.rowIndex=t,this.pinned=e,this.type=n;let i=n=="group"?"ag-header-row-column-group":n=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${i}`}wireBeans(t){this.beans=t}postConstruct(){this.isPrintLayout=this.gos.isDomLayout("print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}getInstanceId(){return this.instanceId}areCellsRendered(){return this.comp?this.getHeaderCellCtrls().every(t=>t.getGui()!=null):!1}setComp(t,e=!0){this.comp=t,e&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(){let t=this.onRowHeightChanged.bind(this);this.addManagedEventListeners({columnResized:this.onColumnResized.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:e=>this.onVirtualColumnsChanged(e.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}getHeaderCellCtrl(t){if(this.headerCellCtrls)return _A(this.headerCellCtrls).find(e=>e.getColumnGroupChild()===t)}onDisplayedColumnsChanged(){this.isPrintLayout=this.gos.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){let t=this.getWidthForRow();this.comp.setWidth(`${t}px`)}getWidthForRow(){let{visibleColsService:t}=this.beans;return this.isPrintLayout?this.pinned!=null?0:t.getContainerWidth("right")+t.getContainerWidth("left")+t.getContainerWidth(null):t.getContainerWidth(this.pinned)}onRowHeightChanged(){let{topOffset:t,rowHeight:e}=this.getTopAndHeight();this.comp.setTop(t+"px"),this.comp.setHeight(e+"px")}getTopAndHeight(){let{columnModel:t,filterManager:e}=this.beans,n=[],i=t.getGroupRowsHeight(),r=t.getColumnHeaderRowHeight();n.push(...i),n.push(r),e?.hasFloatingFilters()&&n.push(t.getFloatingFiltersHeight());let s=0;for(let a=0;a<this.rowIndex;a++)s+=n[a];let o=n[this.rowIndex];return{topOffset:s,rowHeight:o}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(t=!1){let e=this.getHeaderCtrls(),n=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(e,n,t)}getHeaderCtrls(){let t=this.headerCellCtrls;this.headerCellCtrls=new Map;let e=this.getColumnsInViewport();for(let i of e)this.recycleAndCreateHeaderCtrls(i,t);let n=i=>{let{focusService:r,visibleColsService:s}=this.beans;return r.isHeaderWrapperFocused(i)?s.isVisible(i.getColumnGroupChild()):!1};if(t)for(let[i,r]of t)n(r)?this.headerCellCtrls.set(i,r):this.destroyBean(r);return this.getHeaderCellCtrls()}getHeaderCellCtrls(){return Array.from(this.headerCellCtrls?.values()??[])}recycleAndCreateHeaderCtrls(t,e){if(!this.headerCellCtrls||t.isEmptyGroup())return;let n=t.getUniqueId(),i;if(e&&(i=e.get(n),e.delete(n)),i&&i.getColumnGroupChild()!=t&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case"filter":{i=this.createBean(this.beans.ctrlsFactory.getInstance("headerFilterCell",t,this.beans,this));break}case"group":i=this.createBean(new bGt(t,this.beans,this));break;default:i=this.createBean(new _Gt(t,this.beans,this));break}this.headerCellCtrls.set(n,i)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let t=[],e=this.getActualDepth(),{columnViewportService:n}=this.beans;return["left",null,"right"].forEach(i=>{let r=n.getHeadersToRender(i,e);t=t.concat(r)}),t}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnViewportService.getHeadersToRender(this.pinned,this.getActualDepth())}findHeaderCellCtrl(t){return this.headerCellCtrls?this.getHeaderCellCtrls().find(i=>i.getColumnGroupChild()==t):void 0}focusHeader(t,e){let n=this.findHeaderCellCtrl(t);return n?n.focus(e):!1}destroy(){this.headerCellCtrls&&this.headerCellCtrls.forEach(t=>{this.destroyBean(t)}),this.headerCellCtrls=void 0,super.destroy()}},SGt=class extends Ot{constructor(t){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=t}wireBeans(t){this.ctrlsService=t.ctrlsService,this.scrollVisibleService=t.scrollVisibleService,this.pinnedWidthService=t.pinnedWidthService,this.columnModel=t.columnModel,this.focusService=t.focusService,this.filterManager=t.filterManager}setComp(t,e){this.comp=t,this.eViewport=e,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport);let n=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:n,advancedFilterEnabledChanged:n}),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}getAllCtrls(){let t=[...this.groupsRowCtrls];return this.columnsRowCtrl&&t.push(this.columnsRowCtrl),this.filtersRowCtrl&&t.push(this.filtersRowCtrl),t}refresh(t=!1){let e=new c1,n=this.focusService.getFocusHeaderToUseAfterRefresh(),i=()=>{let a=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let l=0;l<a;l++){let c=this.createBean(new h3e(e.next(),this.pinned,"group"));this.groupsRowCtrls.push(c)}},r=()=>{let a=e.next(),l=!this.hidden&&(this.columnsRowCtrl==null||!t||this.columnsRowCtrl.getRowIndex()!==a);(l||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),l&&(this.columnsRowCtrl=this.createBean(new h3e(a,this.pinned,"column")))},s=()=>{this.includeFloatingFilter=!!this.filterManager?.hasFloatingFilters()&&!this.hidden;let a=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){a();return}let l=e.next();if(this.filtersRowCtrl){let c=this.filtersRowCtrl.getRowIndex()!==l;(!t||c)&&a()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new h3e(l,this.pinned,"filter")))};i(),r(),s();let o=this.getAllCtrls();this.comp.setCtrls(o),this.restoreFocusOnHeader(n)}getHeaderCtrlForColumn(t){if(f5(t))return this.columnsRowCtrl?this.columnsRowCtrl.getHeaderCellCtrl(t):void 0;if(this.groupsRowCtrls.length!==0)for(let e=0;e<this.groupsRowCtrls.length;e++){let n=this.groupsRowCtrls[e].getHeaderCellCtrl(t);if(n)return n}}getHtmlElementForColumnHeader(t){let e=this.getHeaderCtrlForColumn(t);return e?e.getGui():null}getRowType(t){let n=this.getAllCtrls()[t];return n?n.getType():void 0}focusHeader(t,e,n){let r=this.getAllCtrls()[t];return r?r.focusHeader(e,n):!1}getViewportElement(){return this.eViewport}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(t){return this.groupsRowCtrls[t]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(t){this.comp.setViewportScrollLeft(t)}onScrollCallback(t){this.addManagedElementListeners(this.getViewportElement(),{scroll:t})}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()}setupDragAndDrop(t){let e=new gGt(this.pinned,t);this.createManagedBean(e)}restoreFocusOnHeader(t){if(!t)return;let{column:e}=t;e.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){let t=this.filterManager?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new n4e(t=>this.comp.setCenterWidth(`${t}px`),!0))}setupPinnedWidth(){if(this.pinned==null)return;let t=this.pinned==="left",e=this.pinned==="right";this.hidden=!0;let n=()=>{let i=t?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(i==null)return;let r=i==0,s=this.hidden!==r,o=this.gos.get("enableRtl"),a=this.gos.getScrollbarWidth(),c=this.scrollVisibleService.isVerticalScrollShowing()&&(o&&t||!o&&e)?i+a:i;this.comp.setPinnedContainerWidth(`${c}px`),this.comp.setDisplayed(!r),s&&(this.hidden=r,this.refresh())};this.addManagedEventListeners({leftPinnedWidthChanged:n,rightPinnedWidthChanged:n,scrollVisibilityChanged:n,scrollbarWidthChanged:n})}},TGt='<div class="ag-pinned-left-header" role="rowgroup"></div>',DGt='<div class="ag-pinned-right-header" role="rowgroup"></div>',EGt=`<div class="ag-header-viewport" role="presentation">
        <div class="ag-header-container" data-ref="eCenterContainer" role="rowgroup"></div>
    </div>`,p3e=class extends ai{constructor(t){super(),this.eCenterContainer=Bt,this.headerRowComps={},this.rowCompsList=[],this.pinned=t}postConstruct(){this.selectAndSetTemplate();let t={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=>{let i=this.getGui();i.style.width=n,i.style.maxWidth=n,i.style.minWidth=n}};this.createManagedBean(new SGt(this.pinned)).setComp(t,this.getGui())}selectAndSetTemplate(){let t=this.pinned=="left",e=this.pinned=="right",n=t?TGt:e?DGt:EGt;this.setTemplate(n),this.eRowContainer=this.eCenterContainer!==Bt?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(t){this.destroyBean(t),this.eRowContainer.removeChild(t.getGui())}setCtrls(t){let e=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let n,i=r=>{let s=r.getGui();s.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(s),n&&vGe(this.eRowContainer,s,n),n=s};t.forEach(r=>{let s=r.getInstanceId(),o=e[s];delete e[s];let a=o||this.createBean(new aGt(r));this.headerRowComps[s]=a,this.rowCompsList.push(a),i(a)}),m5(e).forEach(r=>this.destroyRowComp(r))}},MGt=class extends ai{constructor(){super('<div class="ag-header" role="presentation"/>')}postConstruct(){let t={addOrRemoveCssClass:(i,r)=>this.addOrRemoveCssClass(i,r),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new cGt).setComp(t,this.getGui(),this.getFocusableElement());let n=i=>{this.createManagedBean(i),this.appendChild(i)};n(new p3e("left")),n(new p3e(null)),n(new p3e("right"))}},kGt={selector:"AG-HEADER-ROOT",component:MGt},o4e=class extends Ot{constructor(t){super(),this.view=t}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let t=this.getDomLayout(),e={autoHeight:t==="autoHeight",normal:t==="normal",print:t==="print"},n=e.autoHeight?"ag-layout-auto-height":e.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(n,e)}getDomLayout(){let t=this.gos.get("domLayout")??"normal";return["normal","print","autoHeight"].indexOf(t)===-1?(wt(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t}},IGt=class extends ai{constructor(){super(`
            <div class="ag-overlay" role="presentation">
                <div class="ag-overlay-panel" role="presentation">
                    <div class="ag-overlay-wrapper" data-ref="eOverlayWrapper" role="presentation"></div>
                </div>
            </div>`),this.eOverlayWrapper=Bt,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeOverlayWrapperCssClass=null,this.elToFocusAfter=null}wireBeans(t){this.overlayService=t.overlayService,this.focusService=t.focusService,this.visibleColsService=t.visibleColsService}handleKeyDown(t){if(t.key!==It.TAB||t.defaultPrevented||gg(t)||this.focusService.findNextFocusableElement(this.eOverlayWrapper,!1,t.shiftKey))return;let n=!1;t.shiftKey?n=this.focusService.focusGridView(Ar(this.visibleColsService.getAllCols()),!0,!1):n=this.focusService.focusNextGridCoreContainer(!1),n&&t.preventDefault()}updateLayoutClasses(t,e){let n=this.eOverlayWrapper.classList;n.toggle("ag-layout-auto-height",e.autoHeight),n.toggle("ag-layout-normal",e.normal),n.toggle("ag-layout-print",e.print)}postConstruct(){this.createManagedBean(new o4e(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(t){let e=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&e.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=t,e.toggle(t,!0)}showOverlay(t,e,n,i){if(this.setWrapperTypeClass(e),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=t,!!t){if(this.setDisplayed(!0,{skipAriaHidden:!0}),n&&this.focusService.isGridFocused()){let r=this.gos.getActiveDomElement();r&&!this.gos.isNothingFocused()&&(this.elToFocusAfter=r)}t.then(r=>{if(this.activePromise!==t){this.activeOverlay!==r&&(this.destroyBean(r),r=null);return}if(this.activePromise=null,!r)return;if(this.activeOverlay!==r&&(this.eOverlayWrapper.appendChild(r.getGui()),this.activeOverlay=r,i)){let o=r;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:a})=>{o.refresh?.(this.gos.addGridCommonParams(ve({},a??{})))})}let s=this.focusService;n&&s.isGridFocused()&&s.focusInto(this.eOverlayWrapper)})}}updateOverlayWrapperPaddingTop(t){this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`)}destroyActiveOverlay(){this.activePromise=null;let t=this.activeOverlay;if(!t)return;let e=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,e&&!this.focusService.isGridFocused()&&(e=null);let n=this.updateListenerDestroyFunc;n&&(n(),this.updateListenerDestroyFunc=null),this.destroyBean(t),zo(this.eOverlayWrapper),e?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),super.destroy()}},AGt={selector:"AG-OVERLAY-WRAPPER",component:IGt},eWe=class extends ai{constructor(t,e){super(),this.direction=e,this.eViewport=Bt,this.eContainer=Bt,this.hideTimeout=null,this.setTemplate(t)}wireBeans(t){this.animationFrameService=t.animationFrameService}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",uGe()||x5())}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=pGe(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){let t=this.getGui(),e=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),n=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(t,{mouseenter:e,mousedown:e,touchstart:e,mouseleave:n,touchend:n})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:t=>{t.direction===this.direction&&(this.hideTimeout!==null&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)}})}attemptSettingScrollPosition(t){let e=this.getViewportElement();O3e(()=>l1(e),()=>this.setScrollPosition(t),100)}getViewportElement(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(t){this.addManagedElementListeners(this.getViewportElement(),{scroll:t})}},PGt=class extends eWe{constructor(){super(`<div class="ag-body-horizontal-scroll" aria-hidden="true">
            <div class="ag-horizontal-left-spacer" data-ref="eLeftSpacer"></div>
            <div class="ag-body-horizontal-scroll-viewport" data-ref="eViewport">
                <div class="ag-body-horizontal-scroll-container" data-ref="eContainer"></div>
            </div>
            <div class="ag-horizontal-right-spacer" data-ref="eRightSpacer"></div>
        </div>`,"horizontal"),this.eLeftSpacer=Bt,this.eRightSpacer=Bt}wireBeans(t){super.wireBeans(t),this.visibleColsService=t.visibleColsService,this.pinnedRowModel=t.pinnedRowModel,this.ctrlsService=t.ctrlsService,this.scrollVisibleService=t.scrollVisibleService}postConstruct(){super.postConstruct();let t=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this)}),this.addManagedPropertyListener("domLayout",t),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new n4e(e=>this.eContainer.style.width=`${e}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;let t=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${t}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let t=this.scrollVisibleService.isVerticalScrollShowing(),e=this.visibleColsService.getDisplayedColumnsRightWidth(),n=!this.enableRtl&&t,i=this.gos.getScrollbarWidth();n&&(e+=i),E4(this.eRightSpacer,e),this.eRightSpacer.classList.toggle("ag-scroller-corner",e<=i);let r=this.visibleColsService.getColsLeftWidth();this.enableRtl&&t&&(r+=i),E4(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=i)}setScrollVisible(){let t=this.scrollVisibleService.isHorizontalScrollShowing(),e=this.invisibleScrollbar,n=this.gos.get("suppressHorizontalScroll"),i=t&&this.gos.getScrollbarWidth()||0,s=n?0:i===0&&e?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",e),OB(this.getGui(),s),OB(this.eViewport,s),OB(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}getScrollPosition(){return PZ(this.getViewportElement(),this.enableRtl)}setScrollPosition(t){l1(this.getViewportElement())||this.attemptSettingScrollPosition(t),RZ(this.getViewportElement(),t,this.enableRtl)}},RGt={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:PGt},tWe=class extends Ot{wireBeans(t){this.maxDivHeightScaler=t.rowContainerHeightService}constructor(t,e){super(),this.eContainer=t,this.eViewport=e}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this)})}onHeightChanged(){let t=this.maxDivHeightScaler.getUiContainerHeight(),e=t!=null?`${t}px`:"";this.eContainer.style.height=e,this.eViewport&&(this.eViewport.style.height=e)}},FGt=class extends eWe{wireBeans(t){super.wireBeans(t),this.ctrlsService=t.ctrlsService,this.scrollVisibleService=t.scrollVisibleService}constructor(){super(`<div class="ag-body-vertical-scroll" aria-hidden="true">
            <div class="ag-body-vertical-scroll-viewport" data-ref="eViewport">
                <div class="ag-body-vertical-scroll-container" data-ref="eContainer"></div>
            </div>
        </div>`,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new tWe(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this)})}setScrollVisible(){let t=this.scrollVisibleService.isVerticalScrollShowing(),e=this.invisibleScrollbar,n=t&&this.gos.getScrollbarWidth()||0,i=n===0&&e?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",e),E4(this.getGui(),i),E4(this.eViewport,i),E4(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(){let{ctrlsService:t}=this,n=t.getGridBodyCtrl().getBodyViewportElement(),i=this.getScrollPosition(),r=n.scrollTop;i!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.getViewportElement().scrollTop}setScrollPosition(t,e){!e&&!l1(this.getViewportElement())&&this.attemptSettingScrollPosition(t),this.getViewportElement().scrollTop=t}},LGt={selector:"AG-FAKE-VERTICAL-SCROLL",component:FGt},M3e=(t=>(t.FakeHScrollbar="fakeHScrollComp",t.Header="centerHeader",t.PinnedTop="topCenter",t.PinnedBottom="bottomCenter",t.StickyTop="stickyTopCenter",t.StickyBottom="stickyBottomCenter",t))(M3e||{}),OGt=class extends Ot{constructor(t){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=t,this.resetLastHScrollDebounced=Ap(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=Ap(()=>this.lastScrollSource[0]=null,500)}wireBeans(t){this.ctrlsService=t.ctrlsService,this.animationFrameService=t.animationFrameService,this.paginationService=t.paginationService,this.pageBoundsService=t.pageBoundsService,this.rowModel=t.rowModel,this.heightScaler=t.rowContainerHeightService,this.rowRenderer=t.rowRenderer,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)}),this.ctrlsService.whenReady(t=>{this.centerRowsCtrl=t.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){let t=this.ctrlsService.getParams();this.addManagedElementListeners(this.centerRowsCtrl.getViewportElement(),{scroll:this.onHScroll.bind(this,"Viewport")});for(let e of Object.values(M3e)){let n=t[e];this.registerScrollPartner(n,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){let t=this.ctrlsService.getParams(),e=this.gos.get("debounceVerticalScrollbar"),n=e?Ap(this.onVScroll.bind(this,"Viewport"),100):this.onVScroll.bind(this,"Viewport"),i=e?Ap(this.onVScroll.bind(this,"fakeVScrollComp"),100):this.onVScroll.bind(this,"fakeVScrollComp");this.addManagedElementListeners(this.eBodyViewport,{scroll:n}),this.registerScrollPartner(t.fakeVScrollComp,i)}registerScrollPartner(t,e){t.onScrollCallback(e)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(t){this.centerRowsCtrl!=null&&(t===void 0&&(t=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(t)))}setScrollLeftForAllContainersExceptCurrent(t){for(let e of[...Object.values(M3e),"Viewport"]){if(this.lastScrollSource[1]===e)continue;let n=this.getViewportForSource(e);RZ(n,t,this.enableRtl)}}getViewportForSource(t){return t==="Viewport"?this.centerRowsCtrl.getViewportElement():this.ctrlsService.get(t).getViewportElement()}isControllingScroll(t,e){return this.lastScrollSource[e]==null?(e===0?this.lastScrollSource[0]=t:this.lastScrollSource[1]=t,!0):this.lastScrollSource[e]===t}onHScroll(t){if(!this.isControllingScroll(t,1))return;let e=this.centerRowsCtrl.getViewportElement(),{scrollLeft:n}=e;if(this.shouldBlockScrollUpdate(1,n,!0))return;let i=PZ(this.getViewportForSource(t),this.enableRtl);this.doHorizontalScroll(Math.round(i)),this.resetLastHScrollDebounced()}onVScroll(t){if(!this.isControllingScroll(t,0))return;let e;t==="Viewport"?e=this.eBodyViewport.scrollTop:e=this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),!this.shouldBlockScrollUpdate(0,e,!0)&&(this.animationFrameService.setScrollTop(e),this.nextScrollTop=e,t==="Viewport"?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(e):this.eBodyViewport.scrollTop=e,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(t){let e=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===t&&t===e||(this.scrollLeft=t,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(t),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(t){let e={type:"bodyScroll",direction:t===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(e),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{this.eventService.dispatchEvent(St(ve({},e),{type:"bodyScrollEnd"}))},100)}shouldBlockScrollUpdate(t,e,n=!1){return n&&!x5()?!1:t===0?this.shouldBlockVerticalScroll(e):this.shouldBlockHorizontalScroll(e)}shouldBlockVerticalScroll(t){let e=YB(this.eBodyViewport),{scrollHeight:n}=this.eBodyViewport;return t<0||t+e>n}shouldBlockHorizontalScroll(t){let e=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:n}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&AZ()){if(t>0)return!0}else if(t<0)return!0;return Math.abs(t)+e>n}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll("Viewport")}scrollGridIfNeeded(){let t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(t,e=!1){let i=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!e&&this.shouldBlockScrollUpdate(1,t)&&(this.enableRtl&&AZ()?t=t>0?0:i:t=Math.min(Math.max(t,0),i)),RZ(this.centerRowsCtrl.getViewportElement(),Math.abs(t),this.enableRtl),this.doHorizontalScroll(t)}setVerticalScrollPosition(t){this.eBodyViewport.scrollTop=t}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(t){let e=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(e+t),this.centerRowsCtrl.getViewportElement().scrollLeft-e}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(t,e=null){let n=this.rowModel.getRowCount(),i=-1;for(let r=0;r<n;r++){let s=this.rowModel.getRow(r);if(typeof t=="function"){if(s&&t(s)){i=r;break}}else if(t===s||t===s.data){i=r;break}}i>=0&&this.ensureIndexVisible(i,e)}ensureIndexVisible(t,e){if(this.gos.isDomLayout("print"))return;let n=this.rowModel.getRowCount();if(typeof t!="number"||t<0||t>=n){wt("Invalid row index for ensureIndexVisible: "+t);return}let r=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{r||this.paginationService?.goToPageWithIndex(t);let s=this.ctrlsService.getGridBodyCtrl(),o=s.getStickyTopHeight(),a=s.getStickyBottomHeight(),l=this.rowModel.getRow(t),c;do{let d=l.rowTop,u=l.rowHeight,m=this.pageBoundsService.getPixelOffset(),f=l.rowTop-m,_=f+l.rowHeight,x=this.getVScrollPosition(),D=this.heightScaler.getDivStretchOffset(),E=x.top+D,M=x.bottom+D,I=M-E,z=this.heightScaler.getScrollPositionForPixel(f),G=this.heightScaler.getScrollPositionForPixel(_-I),A=Math.min((z+G)/2,f),Y=E+o>f,X=M-a<_,ne=null;e==="top"?ne=z:e==="bottom"?ne=G:e==="middle"?ne=A:Y?ne=z-o:X&&(ne=G+a),ne!==null&&(this.setVerticalScrollPosition(ne),this.rowRenderer.redraw({afterScroll:!0})),c=d!==l.rowTop||u!==l.rowHeight}while(c);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(t,e="auto"){let n=this.columnModel.getCol(t);if(!n||n.isPinned()||!this.visibleColsService.isColDisplayed(n))return;let i=this.getPositionedHorizontalScroll(n,e);this.getFrameworkOverrides().wrapIncoming(()=>{i!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(i),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(t,e){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(e),this.setVerticalScrollPosition(t),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}getPositionedHorizontalScroll(t,e){let{columnBeforeStart:n,columnAfterEnd:i}=this.isColumnOutsideViewport(t),r=this.centerRowsCtrl.getCenterWidth()<t.getActualWidth(),s=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl,a=(o?n:i)||r,l=o?i:n;e!=="auto"&&(a=e==="start",l=e==="end");let c=e==="middle";if(a||l||c){let{colLeft:d,colMiddle:u,colRight:m}=this.getColumnBounds(t);return c?u-s/2:a?o?m:d:o?d-s:m-s}return null}isColumnOutsideViewport(t){let{start:e,end:n}=this.getViewportBounds(),{colLeft:i,colRight:r}=this.getColumnBounds(t),s=this.enableRtl,o=s?e>r:n<r,a=s?n<i:e>i;return{columnBeforeStart:o,columnAfterEnd:a}}getColumnBounds(t){let e=this.enableRtl,n=this.visibleColsService.getBodyContainerWidth(),i=t.getActualWidth(),r=t.getLeft(),s=e?-1:1,o=e?n-r:r,a=o+i*s,l=o+i/2*s;return{colLeft:o,colMiddle:l,colRight:a}}getViewportBounds(){let t=this.centerRowsCtrl.getCenterWidth(),e=this.centerRowsCtrl.getCenterViewportScrollLeft(),n=e,i=t+e;return{start:n,end:i,width:t}}},NGt=class extends Ot{wireBeans(t){this.ctrlsService=t.ctrlsService,this.pinnedWidthService=t.pinnedWidthService,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.columnSizeService=t.columnSizeService,this.scrollVisibleService=t.scrollVisibleService,this.columnViewportService=t.columnViewportService}constructor(t){super(),this.centerContainerCtrl=t}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridBodyCtrl=t.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){let t=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(t),this.gridBodyCtrl.registerBodyViewportResizeListener(t)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let t=this.centerContainerCtrl.getCenterWidth();t!==this.centerWidth&&(this.centerWidth=t,this.columnSizeService.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){let t=this.gridBodyCtrl.getBodyViewportElement(),e=yD(t);if(e<=50)return;let n=this.getPinnedColumnsOverflowingViewport(e-50),i=this.gos.getCallback("processUnpinnedColumns");n.length&&(i&&(n=i({columns:n,viewportWidth:e})),this.columnModel.setColsPinned(n,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(t){let e=this.pinnedWidthService.getPinnedRightWidth(),n=this.pinnedWidthService.getPinnedLeftWidth(),i=e+n;if(i<t)return[];let r=[...this.visibleColsService.getLeftCols()],s=[...this.visibleColsService.getRightCols()],o=0,a=0,l=0,c=[],d=i-l-t;for(;(a<r.length||o<s.length)&&d>0;){if(o<s.length){let u=s[o++];d-=u.getActualWidth(),c.push(u)}if(a<r.length&&d>0){let u=r[a++];d-=u.getActualWidth(),c.push(u)}}return c}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){let t=this.gridBodyCtrl.getBodyViewportElement(),e=YB(t);this.bodyHeight!==e&&(this.bodyHeight=e,this.eventService.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){let t={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(t)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){let t=this.centerContainerCtrl.getCenterWidth(),e=this.centerContainerCtrl.getViewportScrollLeft();this.columnViewportService.setScrollPosition(t,e)}},VGt=class extends Ot{wireBeans(t){this.dragService=t.dragService,this.rangeService=t.rangeService}constructor(t){super(),this.eContainer=t}postConstruct(){if(!this.rangeService)return;this.params={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.addManagedPropertyListener("enableRangeSelection",e=>{if(e.currentValue){this.enableFeature();return}this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),this.gos.get("enableRangeSelection")&&this.enableFeature()}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}},a4e=class extends ai{constructor(){super(`
            <div class="ag-selection-checkbox" role="presentation">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[d1]),this.eCheckbox=Bt}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let t=this.localeService.getLocaleTextFunc(),e=this.rowNode.isSelected(),n=H3e(t,e),[i,r]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],s=t(i,r);this.eCheckbox.setValue(e,!0),this.eCheckbox.setInputAriaLabel(`${s} (${n})`)}onClicked(t,e,n){return this.rowNode.setSelectedParams({newValue:t,rangeSelect:n.shiftKey,groupSelectsFiltered:e,event:n,source:"checkboxSelected"})}init(t){if(this.rowNode=t.rowNode,this.column=t.column,this.overrides=t.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:i=>Zc(i),click:i=>{Zc(i);let r=this.gos.get("groupSelectsFiltered"),s=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(s,r)?this.onClicked(!0,r,i||{})===0&&this.onClicked(!1,r,i):s?this.onClicked(!1,r,i):this.onClicked(!0,r,i||{})}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.gos.get("isRowSelectable")||typeof this.getIsVisible()=="function"){let i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(t,e){return e&&(this.eCheckbox.getPreviousValue()===void 0||t===void 0)&&this.gos.isRowModelType("clientSide")}showOrHideSelect(){let t=this.rowNode.selectable,e=this.getIsVisible();if(t)if(typeof e=="function"){let i=this.overrides?.callbackParams;if(!this.column)t=e(St(ve({},i),{node:this.rowNode,data:this.rowNode.data}));else{let r=this.column.createColumnFunctionCallbackParams(this.rowNode);t=e(ve(ve({},i),r))}}else t=e??!1;if(this.column?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!t),this.setVisible(!0),this.setDisplayed(!0);return}if(this.overrides?.removeHidden){this.setDisplayed(t);return}this.setVisible(t)}getIsVisible(){return this.overrides?this.overrides.isVisible:this.column?.getColDef()?.checkboxSelection}},BGt=class extends ai{constructor(t,e,n){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=t,this.column=e,this.eCell=n}postConstruct(){this.getGui().appendChild(tr("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",e=>{e.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(t){let e=this.column.getColDef().dndSourceOnRowDrag;t.dataTransfer.setDragImage(this.eCell,0,0);let n=()=>{try{let i=JSON.stringify(this.rowNode.data);t.dataTransfer.setData("application/json",i),t.dataTransfer.setData("text/plain",i)}catch{}};if(e){let i=this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:t});e(i)}else n()}checkVisibility(){let t=this.column.isDndSource(this.rowNode);this.setDisplayed(t)}},zGt=class extends Ot{constructor(t,e){super(),this.staticClasses=[],this.cellCtrl=t,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode()}setComp(t){this.cellComp=t,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){let t=this.column.getColDef(),{cellClassRules:e}=t,n=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:t,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(e===this.cellClassRules?void 0:this.cellClassRules,e,n,i=>this.cellComp.addOrRemoveCssClass(i,!0),i=>this.cellComp.addOrRemoveCssClass(i,!1)),this.cellClassRules=e}applyUserStyles(){let t=this.column.getColDef();if(!t.cellStyle)return;let e;if(typeof t.cellStyle=="function"){let n=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:t,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex}),i=t.cellStyle;e=i(n)}else e=t.cellStyle;e&&this.cellComp.setUserStyles(e)}applyClassesFromColDef(){let t=this.column.getColDef(),e=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:t,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach(n=>this.cellComp.addOrRemoveCssClass(n,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(t,e),this.staticClasses.length&&this.staticClasses.forEach(n=>this.cellComp.addOrRemoveCssClass(n,!0))}destroy(){super.destroy()}},HGt=class extends Ot{constructor(t,e,n,i,r){super(),this.cellCtrl=t,this.beans=e,this.rowNode=i,this.rowCtrl=r}setComp(t){this.eGui=t}onKeyDown(t){let e=t.key;switch(e){case It.ENTER:this.onEnterKeyDown(t);break;case It.F2:this.onF2KeyDown(t);break;case It.ESCAPE:this.onEscapeKeyDown(t);break;case It.TAB:this.onTabKeyDown(t);break;case It.BACKSPACE:case It.DELETE:this.onBackspaceOrDeleteKeyDown(e,t);break;case It.DOWN:case It.UP:case It.RIGHT:case It.LEFT:this.onNavigationKeyDown(t,e);break}}onNavigationKeyDown(t,e){this.cellCtrl.isEditing()||(t.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(t):this.beans.navigationService.navigateToNextCell(t,e,this.cellCtrl.getCellPosition(),!0),t.preventDefault())}onShiftRangeSelect(t){if(!this.beans.rangeService)return;let e=this.beans.rangeService.extendLatestRangeInDirection(t);e&&this.beans.navigationService.ensureCellVisible(e)}onTabKeyDown(t){this.beans.navigationService.onTabKeyDown(this.cellCtrl,t)}onBackspaceOrDeleteKeyDown(t,e){let{cellCtrl:n,beans:i,rowNode:r}=this,{gos:s,rangeService:o,eventService:a}=i;if(!n.isEditing()){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),yHt(t,s.get("enableCellEditingOnBackspace"))){if(o&&s.get("enableRangeSelection"))o.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(n.isCellEditable()){let l=n.getColumn(),c=this.beans.valueService.parseValue(l,r,"",r.getValueFromValueService(l))??null;r.setDataValue(l,c,"cellClear")}}else n.startRowOrCellEdit(t,e);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(t){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,t.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){let e=t.shiftKey?It.UP:It.DOWN;this.beans.navigationService.navigateToNextCell(null,e,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(It.ENTER,t),this.cellCtrl.isEditing()&&t.preventDefault()}onF2KeyDown(t){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(It.F2,t)}onEscapeKeyDown(t){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(t){if(t.target!==this.eGui||this.cellCtrl.isEditing())return;let i=t.key;i===" "?this.onSpaceKeyDown(t):(this.cellCtrl.startRowOrCellEdit(i,t),t.preventDefault())}onSpaceKeyDown(t){let{gos:e}=this.beans;if(!this.cellCtrl.isEditing()&&e.isRowSelection()){let n=this.rowNode.isSelected(),i=!n;if(i||!e.get("suppressRowDeselection")){let r=this.beans.gos.get("groupSelectsFiltered"),s=this.rowNode.setSelectedParams({newValue:i,rangeSelect:t.shiftKey,groupSelectsFiltered:r,event:t,source:"spaceKey"});n===void 0&&s===0&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:t.shiftKey,groupSelectsFiltered:r,event:t,source:"spaceKey"})}}t.preventDefault()}destroy(){super.destroy()}},GGt=class extends Ot{constructor(t,e,n){super(),this.cellCtrl=t,this.beans=e,this.column=n}onMouseEvent(t,e){if(!gg(e))switch(t){case"click":this.onCellClicked(e);break;case"mousedown":case"touchstart":this.onMouseDown(e);break;case"dblclick":this.onCellDoubleClicked(e);break;case"mouseout":this.onMouseOut(e);break;case"mouseover":this.onMouseOver(e);break}}onCellClicked(t){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(t),t.preventDefault();return}let{eventService:e,rangeService:n,gos:i}=this.beans,r=t.ctrlKey||t.metaKey;n&&r&&n.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&n.intersectLastRange(!0);let s=this.cellCtrl.createEvent(t,"cellClicked");e.dispatchEvent(s);let o=this.column.getColDef();o.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{o.onCellClicked(s)})},0),(i.get("singleClickEdit")||o.singleClickEdit)&&!i.get("suppressClickEdit")&&!(t.shiftKey&&n?.getCellRanges().length!=0)&&this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!x5()||qHe("dblclick"))return!1;let t=new Date().getTime(),e=t-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=t,e}onCellDoubleClicked(t){let{column:e,beans:n,cellCtrl:i}=this,{eventService:r,frameworkOverrides:s,gos:o}=n,a=e.getColDef(),l=i.createEvent(t,"cellDoubleClicked");r.dispatchEvent(l),typeof a.onCellDoubleClicked=="function"&&window.setTimeout(()=>{s.wrapOutgoing(()=>{a.onCellDoubleClicked(l)})},0),!o.get("singleClickEdit")&&!o.get("suppressClickEdit")&&i.startRowOrCellEdit(null,t)}onMouseDown(t){let{ctrlKey:e,metaKey:n,shiftKey:i}=t,r=t.target,{cellCtrl:s,beans:o}=this,{eventService:a,rangeService:l,focusService:c,gos:d}=o;if(this.isRightClickInExistingRange(t))return;let u=l&&l.getCellRanges().length!=0;if(!i||!u){let f=d.get("enableCellTextSelection")&&t.defaultPrevented,_=(g5()||f)&&!s.isEditing()&&!W3e(r);s.focusCell(_)}if(i&&u&&!c.isCellFocused(s.getCellPosition())){t.preventDefault();let m=c.getFocusedCell();if(m){let{column:f,rowIndex:_,rowPinned:x}=m,E=o.rowRenderer.getRowByPosition({rowIndex:_,rowPinned:x})?.getCellCtrl(f);E?.isEditing()&&E.stopEditing(),c.setFocusedCell({column:f,rowIndex:_,rowPinned:x,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(r)){if(l){let m=this.cellCtrl.getCellPosition();if(i)l.extendLatestRangeToCell(m);else{let f=e||n;l.setRangeToCell(m,f)}}a.dispatchEvent(this.cellCtrl.createEvent(t,"cellMouseDown"))}}isRightClickInExistingRange(t){let{rangeService:e}=this.beans;if(e){let n=e.isCellInAnyRange(this.cellCtrl.getCellPosition()),i=t.button===2||t.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(n&&i)return!0}return!1}containsWidget(t){return xA(t,"ag-selection-checkbox",3)}onMouseOut(t){this.mouseStayingInsideCell(t)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(t,"cellMouseOut")),this.beans.columnHoverService.clearMouseOver())}onMouseOver(t){this.mouseStayingInsideCell(t)||(this.beans.eventService.dispatchEvent(this.cellCtrl.createEvent(t,"cellMouseOver")),this.beans.columnHoverService.setMouseOver([this.column]))}mouseStayingInsideCell(t){if(!t.target||!t.relatedTarget)return!1;let e=this.cellCtrl.getGui(),n=e.contains(t.target),i=e.contains(t.relatedTarget);return n&&i}destroy(){super.destroy()}},WGt=class extends Ot{constructor(t,e){super(),this.cellCtrl=t,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventService,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}setComp(t){this.eGui=t,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){let t=this.column.getRowSpan(this.rowNode);this.rowSpan!==t&&(this.rowSpan=t,this.applyRowSpan(!0))}onDisplayColumnsChanged(){let t=this.getColSpanningList();Cf(this.colsSpanning,t)||(this.colsSpanning=t,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventService,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eGui)return;let t=this.getCellWidth();this.eGui.style.width=`${t}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((t,e)=>t+e.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){let t=this.column.getColSpan(this.rowNode),e=[];if(t===1)e.push(this.column);else{let n=this.column,i=this.column.getPinned();for(let r=0;n&&r<t&&(e.push(n),n=this.beans.visibleColsService.getColAfter(n),!(!n||Ls(n)||i!==n.getPinned()));r++);}return e}onLeftChanged(){if(!this.eGui)return;let t=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=t+"px"}getCellLeft(){let t;return this.beans.gos.get("enableRtl")&&this.colsSpanning?t=Ar(this.colsSpanning):t=this.column,t.getLeft()}modifyLeftForPrintLayout(t){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()==="left")return t;let e=this.beans.visibleColsService.getColsLeftWidth();if(this.column.getPinned()==="right"){let n=this.beans.visibleColsService.getBodyContainerWidth();return e+n+(t||0)}return e+(t||0)}applyRowSpan(t){if(this.rowSpan===1&&!t)return;let n=this.beans.gos.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${n}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},px=(t=>(t[t.FILL=0]="FILL",t[t.RANGE=1]="RANGE",t))(px||{}),S5=(t=>(t[t.VALUE=0]="VALUE",t[t.DIMENSION=1]="DIMENSION",t))(S5||{}),AB="ag-cell-range-selected",UGt="ag-cell-range-chart",jGt="ag-cell-range-single-cell",$Gt="ag-cell-range-chart-category",KGt="ag-cell-range-handle",YGt="ag-cell-range-top",qGt="ag-cell-range-right",ZGt="ag-cell-range-bottom",XGt="ag-cell-range-left",QGt=class{constructor(t,e){this.beans=t,this.rangeService=t.rangeService,this.selectionHandleFactory=t.selectionHandleFactory,this.cellCtrl=e}setComp(t,e){this.cellComp=t,this.eGui=e,this.onRangeSelectionChanged()}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(AB,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass(`${AB}-1`,this.rangeCount===1),this.cellComp.addOrRemoveCssClass(`${AB}-2`,this.rangeCount===2),this.cellComp.addOrRemoveCssClass(`${AB}-3`,this.rangeCount===3),this.cellComp.addOrRemoveCssClass(`${AB}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(UGt,this.hasChartRange),bA(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(jGt,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){let t=this.getRangeBorders(),e=this.isSingleCell(),n=!e&&t.top,i=!e&&t.right,r=!e&&t.bottom,s=!e&&t.left;this.cellComp.addOrRemoveCssClass(YGt,n),this.cellComp.addOrRemoveCssClass(qGt,i),this.cellComp.addOrRemoveCssClass(ZGt,r),this.cellComp.addOrRemoveCssClass(XGt,s)}isSingleCell(){let{rangeService:t}=this.beans;return this.rangeCount===1&&!!t&&!t.isMoreThanOneCell()}getHasChartRange(){let{rangeService:t}=this.beans;if(!this.rangeCount||!t)return!1;let e=t.getCellRanges();return e.length>0&&e.every(n=>Sl([1,0],n.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){let t=this.beans.gos.get("enableRtl"),e=!1,n=!1,i=!1,r=!1,s=this.cellCtrl.getCellPosition().column,o=this.beans.visibleColsService,a,l;t?(a=o.getColAfter(s),l=o.getColBefore(s)):(a=o.getColBefore(s),l=o.getColAfter(s));let c=this.rangeService.getCellRanges().filter(d=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),d));a||(r=!0),l||(n=!0);for(let d=0;d<c.length&&!(e&&n&&i&&r);d++){let u=c[d],m=this.rangeService.getRangeStartRow(u),f=this.rangeService.getRangeEndRow(u);!e&&this.beans.rowPositionUtils.sameRow(m,this.cellCtrl.getCellPosition())&&(e=!0),!i&&this.beans.rowPositionUtils.sameRow(f,this.cellCtrl.getCellPosition())&&(i=!0),!r&&a&&u.columns.indexOf(a)<0&&(r=!0),!n&&l&&u.columns.indexOf(l)<0&&(n=!0)}return{top:e,right:n,bottom:i,left:r}}refreshHandle(){if(this.beans.context.isDestroyed())return;let t=this.shouldHaveSelectionHandle();this.selectionHandle&&!t&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),t&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass(KGt,!!this.selectionHandle)}shouldHaveSelectionHandle(){let t=this.beans.gos,e=this.rangeService.getCellRanges(),n=e.length;if(this.rangeCount<1||n<1)return!1;let i=Ar(e),r=this.cellCtrl.getCellPosition(),s=t.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),o=t.get("enableRangeHandle"),a=n===1&&!this.cellCtrl.isEditing()&&(s||o);if(this.hasChartRange){let c=e[0].type===1&&this.rangeService.isCellInSpecificRange(r,e[0]);this.cellComp.addOrRemoveCssClass($Gt,c),a=i.type===0}return a&&i.endRow!=null&&this.rangeService.isContiguousRange(i)&&this.rangeService.isBottomRightCell(i,r)}addSelectionHandle(){let t=this.beans.gos,e=Ar(this.rangeService.getCellRanges()).type,i=t.get("enableFillHandle")&&Ls(e)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==i&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(i)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},JGt="ag-cell",eWt="ag-cell-auto-height",tWt="ag-cell-normal-height",iWt="ag-cell-focus",nWt="ag-cell-first-right-pinned",rWt="ag-cell-last-left-pinned",sWt="ag-cell-not-inline-editing",oWt="ag-column-hover",aWt="ag-cell-wrap-text",lWt=0,cWt=(()=>{let t=class k3e extends Ot{constructor(n,i,r,s){super(),this.column=n,this.rowNode=i,this.beans=r,this.rowCtrl=s,this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.instanceId=n.getId()+"-"+lWt++,this.colIdSanitised=nl(this.column.getId()),this.createCellPosition(),this.addFeatures(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}onFocusOut(){this.beans.focusService.clearRestoreFocus()}addFeatures(){this.cellPositionFeature=new WGt(this,this.beans),this.addDestroyFunc(()=>{this.cellPositionFeature?.destroy(),this.cellPositionFeature=null}),this.cellCustomStyleFeature=new zGt(this,this.beans),this.addDestroyFunc(()=>{this.cellCustomStyleFeature?.destroy(),this.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new GGt(this,this.beans,this.column),this.addDestroyFunc(()=>{this.cellMouseListenerFeature?.destroy(),this.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new HGt(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{this.cellKeyboardListenerFeature?.destroy(),this.cellKeyboardListenerFeature=null}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(()=>{this.disableTooltipFeature()})),this.beans.rangeService&&this.beans.gos.get("enableRangeSelection")&&(this.cellRangeFeature=new QGt(this.beans,this),this.addDestroyFunc(()=>{this.cellRangeFeature?.destroy(),this.cellRangeFeature=null}))}enableTooltipFeature(n,i){let r=()=>{let a=this.column.getColDef(),l=this.rowNode.data;if(a.tooltipField&&Di(l))return LB(l,a.tooltipField,this.column.isTooltipFieldContainsDots());let c=a.tooltipValueGetter;return c?c(this.beans.gos.addGridCommonParams({location:"cell",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},s=this.beans.gos.get("tooltipShowMode")==="whenTruncated";!i&&s&&!this.isCellRenderer()&&(i=()=>{let a=this.getGui(),l=a.children.length===0?a:a.querySelector(".ag-cell-value");return l?l.scrollWidth>l.clientWidth:!0});let o={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:n!=null?()=>n:r,getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:i};this.tooltipFeature=new W1(o,this.beans)}disableTooltipFeature(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)}setComp(n,i,r,s,o){this.cellComp=n,this.eGui=i,this.printLayout=s,this.addDomData(),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.cellPositionFeature?.setComp(i),this.cellCustomStyleFeature?.setComp(n),this.tooltipFeature?.refreshToolTip(),this.cellKeyboardListenerFeature?.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(n,i),o&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(a=>a()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(n){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!n)return;let i=n.parentElement,r=this.beans.gos.getRowHeightForNode(this.rowNode).height,s=l=>{if(this.editing||!this.isAlive())return;let{paddingTop:c,paddingBottom:d,borderBottomWidth:u,borderTopWidth:m}=vD(i),f=c+d+u+m,x=n.offsetHeight+f;if(l<5){let E=this.beans.gos.getDocument(),M=!E||!E.contains(n),I=x==0;if(M||I){window.setTimeout(()=>s(l+1),0);return}}let D=Math.max(x,r);this.rowNode.setRowAutoHeight(D,this.column)},o=()=>s(0);o();let a=this.beans.resizeObserverService.observeResize(n,o);this.addDestroyFunc(()=>{a(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}getInstanceId(){return this.instanceId}getColumnIdSanitised(){return this.colIdSanitised}isCellRenderer(){let n=this.column.getColDef();return n.cellRenderer!=null||n.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(n=!1){let i=this.getValueToDisplay(),r;if(this.rowNode.stub&&this.rowNode.groupData?.[this.column.getId()]==null){let o=this.createCellRendererParams();r=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),o)}else if(this.isCellRenderer()){let o=this.createCellRendererParams();r=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),o)}this.cellComp.setRenderDetails(r,i,n),this.cellRangeFeature?.refreshHandle()}setupControlComps(){let n=this.column.getColDef();this.includeSelection=this.isIncludeControl(n.checkboxSelection),this.includeRowDrag=this.isIncludeControl(n.rowDrag),this.includeDndSource=this.isIncludeControl(n.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(n){return this.rowNode.rowPinned!=null?!1:typeof n=="function"||n===!0}refreshShouldDestroy(){let n=this.column.getColDef(),i=this.includeSelection!=this.isIncludeControl(n.checkboxSelection),r=this.includeRowDrag!=this.isIncludeControl(n.rowDrag),s=this.includeDndSource!=this.isIncludeControl(n.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return i||r||s||o}startEditing(n=null,i=!1,r=null){let{editService:s}=this.beans;if(!(!this.isCellEditable()||this.editing||!s)){if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startEditing(n,i,r)});return}s.startEditing(this,n,i,r)}}setEditing(n,i){this.editCompDetails=i,this.editing!==n&&(this.editing=n,this.cellRangeFeature?.refreshHandle())}stopRowOrCellEdit(n=!1){this.beans.gos.get("editType")==="fullRow"?this.rowCtrl.stopEditing(n):this.stopEditing(n)}onPopupEditorClosed(){this.editing&&this.stopEditingAndFocus()}stopEditing(n=!1){let{editService:i}=this.beans;return!this.editing||!i?!1:i.stopEditing(this,n)}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),setValue:i=>this.beans.valueService.setValue(this.rowNode,this.column,i),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(i,r,s,o)=>this.registerRowDragger(i,r,o),setTooltip:(i,r)=>{this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(i,r),this.tooltipFeature?.refreshToolTip()}})}setFocusOutOnEditor(){this.editing&&this.beans.editService?.setFocusOutOnEditor(this)}setFocusInOnEditor(){this.editing&&this.beans.editService?.setFocusInOnEditor(this)}onCellChanged(n){n.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(n){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(n)}refreshCell(n){if(this.suppressRefreshCell||this.editing)return;let i=this.column.getColDef(),r=n!=null&&!!n.newData,s=n!=null&&!!n.suppressFlash||!!i.suppressCellFlash,o=i.field==null&&i.valueGetter==null&&i.showRowGroup==null,a=n&&n.forceRefresh||o||r,l=!!this.cellComp,c=this.updateAndFormatValue(l),d=a||c;if(l){if(d){this.showValue(r);let u=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!s&&!u&&(this.beans.gos.get("enableCellChangeFlash")||i.enableCellChangeFlash)&&this.flashCell(),this.cellCustomStyleFeature?.applyUserStyles(),this.cellCustomStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshToolTip(),this.cellCustomStyleFeature?.applyCellClassRules()}}stopEditingAndFocus(n=!1,i=!1){this.beans.editService?.stopEditingAndFocus(this,n,i)}flashCell(n){let i=n?.flashDuration??n?.flashDelay,r=n?.fadeDuration??n?.fadeDelay;this.animateCell("data-changed",i,r)}animateCell(n,i,r){if(!this.cellComp)return;let{gos:s}=this.beans;if(i||(i=s.get("cellFlashDuration")),i===0)return;Di(r)||(r=s.get("cellFadeDuration"));let o=`ag-cell-${n}`,a=`ag-cell-${n}-animation`;this.cellComp.addOrRemoveCssClass(o,!0),this.cellComp.addOrRemoveCssClass(a,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(o,!1),this.cellComp.addOrRemoveCssClass(a,!0),this.eGui.style.transition=`background-color ${r}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(a,!1),this.eGui.style.transition="")},r))},i)})}onFlashCells(n){if(!this.cellComp)return;let i=this.beans.cellPositionUtils.createId(this.getCellPosition());n.cells[i]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(n){return this.callValueFormatter(n)??n}callValueFormatter(n){return this.beans.valueService.formatValue(this.column,this.rowNode,n)}updateAndFormatValue(n){let i=this.value,r=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),n?!this.valuesAreEqual(i,this.value)||this.valueFormatted!=r:!0}valuesAreEqual(n,i){let r=this.column.getColDef();return r.equals?r.equals(n,i):n===i}getComp(){return this.cellComp}getValue(){return this.value}addDomData(){let n=this.getGui();this.beans.gos.setDomData(n,k3e.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gos.setDomData(n,k3e.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(n,i){return this.beans.gos.addGridCommonParams({type:i,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:n,rowIndex:this.rowNode.rowIndex})}processCharacter(n){this.cellKeyboardListenerFeature?.processCharacter(n)}onKeyDown(n){this.cellKeyboardListenerFeature?.onKeyDown(n)}onMouseEvent(n,i){this.cellMouseListenerFeature?.onMouseEvent(n,i)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){this.cellComp&&this.cellPositionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{cellComp:n,column:i,beans:r}=this;$Ge(n,i,r.visibleColsService)}refreshAriaColIndex(){let n=this.beans.visibleColsService.getAriaColIndex(this.column);GZ(this.getGui(),n)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){return this.cellPositionFeature?.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(n,i=null){if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(n,i)});return}this.beans.gos.get("editType")==="fullRow"?this.rowCtrl.startRowEditing(n,this):this.startEditing(n,!0,i)}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(n=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:n})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}onSuppressCellFocusChanged(n){this.eGui&&qv(this.eGui,"tabindex",n?void 0:-1)}onFirstRightPinnedChanged(){if(!this.cellComp)return;let n=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass(nWt,n)}onLastLeftPinnedChanged(){if(!this.cellComp)return;let n=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass(rWt,n)}onCellFocused(n){if(this.beans.focusService.isCellFocusSuppressed())return;let i=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){i&&n?.forceBrowserFocus&&(this.focusEventToRestore=n);return}if(this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass(iWt,i),i&&n&&n.forceBrowserFocus){let s=this.cellComp.getFocusableElement();if(this.editing){let o=this.beans.focusService.findFocusableElements(s,null,!0);o.length&&(s=o[0])}s.focus({preventScroll:!!n.preventScrollOnBrowserFocus})}let r=this.beans.gos.get("editType")==="fullRow";!i&&!r&&this.editing&&this.stopRowOrCellEdit(),i&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:xu(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass(JGt,!0),this.cellComp.addOrRemoveCssClass(sWt,!0);let n=this.column.isAutoHeight()==!0;this.cellComp.addOrRemoveCssClass(eWt,n),this.cellComp.addOrRemoveCssClass(tWt,!n)}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;let n=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass(oWt,n)}onColDefChanged(){if(!this.cellComp)return;this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editService?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}setWrapText(){let n=this.column.getColDef().wrapText==!0;this.cellComp.addOrRemoveCssClass(aWt,n)}dispatchCellContextMenuEvent(n){let i=this.column.getColDef(),r=this.createEvent(n,"cellContextMenu");this.beans.eventService.dispatchEvent(r),i.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{i.onCellContextMenu(r)})},0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){let n=new a4e;return this.beans.context.createBean(n),n.init({rowNode:this.rowNode,column:this.column}),n}createDndSource(){let n=new BGt(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(n),n}registerRowDragger(n,i,r){if(this.customRowDragComp){this.customRowDragComp.setDragElement(n,i);return}let s=this.createRowDragComp(n,i,r);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}))}createRowDragComp(n,i,r){let s=this.beans.gos.get("pagination"),o=this.beans.gos.get("rowDragManaged"),a=this.beans.gos.isRowModelType("clientSide");if(o){if(!a){wt("managed row dragging is only allowed in the Client Side Row Model");return}if(s){wt("managed row dragging is not possible when doing pagination");return}}let l=new GB(()=>this.value,this.rowNode,this.column,n,i,r);return this.beans.context.createBean(l),l}setSuppressRefreshCell(n){this.suppressRefreshCell=n}getEditCompDetails(){return this.editCompDetails}};return t.DOM_DATA_KEY_CELL_CTRL="cellCtrl",t})(),dx=cWt,dWt=0,uWt=(()=>{let t=class I3e extends Ot{constructor(n,i,r,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.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=i,this.gos=i.gos,this.rowNode=n,this.paginationPage=i.paginationService?.getCurrentPage()??0,this.useAnimationFrameForCreate=s,this.printLayout=o,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=n.id+"-"+dWt++,this.rowId=nl(n.id),this.initRowBusinessKey(),this.rowFocused=i.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=i.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(r),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;let n=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=nl(n)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}isSticky(){return this.rowNode.sticky}getInstanceId(){return this.instanceId}updateGui(n,i){n==="left"?this.leftGui=i:n==="right"?this.rightGui=i:n==="fullWidth"?this.fullWidthGui=i:this.centerGui=i}setComp(n,i,r){let s={rowComp:n,element:i,containerType:r};this.allRowGuis.push(s),this.updateGui(r,s),this.initialiseRowComp(s),this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(n){this.allRowGuis=this.allRowGuis.filter(i=>i.containerType!==n),this.updateGui(n,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(n){let i=n?"none":"";this.allRowGuis.forEach(r=>r.element.style.display=i)}initialiseRowComp(n){let i=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(n),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(n),this.updateRowIndexes(n),this.setFocusedClasses(n),this.setStylesFromGridOptions(!1,n),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(n),this.updateColumnLists(!this.useAnimationFrameForCreate);let r=n.rowComp;this.getInitialRowClasses(n.containerType).forEach(o=>r.addOrRemoveCssClass(o,!0)),this.executeSlideAndFadeAnimations(n),this.rowNode.group&&ip(n.element,this.rowNode.expanded==!0),this.setRowCompRowId(r),this.setRowCompRowBusinessKey(r),i.setDomData(n.element,I3e.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>i.setDomData(n.element,I3e.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,n.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(n.element),this.isFullWidth()&&this.setupFullWidth(n),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(n),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&n.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(n){this.businessKeySanitised!=null&&n.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(n){this.rowId=nl(this.rowNode.id),this.rowId!=null&&n.setRowId(this.rowId)}executeSlideAndFadeAnimations(n){let{containerType:i}=n;this.slideInAnimation[i]&&(yHe(()=>{this.onTopChanged()}),this.slideInAnimation[i]=!1),this.fadeInAnimation[i]&&(yHe(()=>{n.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[i]=!1)}addRowDraggerToRow(n){if(this.gos.get("enableRangeSelection")){wt("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");return}let i=this.beans.localeService.getLocaleTextFunc(),r=new GB(()=>`1 ${i("rowDragRow","row")}`,this.rowNode,void 0,n.element,void 0,!0),s=this.createBean(r,this.beans.context);this.rowDragComps.push(s)}setupFullWidth(n){let i=this.getPinnedForContainer(n.containerType);if(this.rowType=="FullWidthDetail"&&!Sa.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))return;let r=this.createFullWidthCompDetails(n.element,i);n.rowComp.showFullWidth(r)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(n=>n?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}getCellElement(n){let i=this.getCellCtrl(n);return i?i.getGui():null}executeProcessRowPostCreateFunc(){let n=this.gos.getCallback("processRowPostCreate");if(!n||!this.areAllContainersReady())return;let i={eRow:this.centerGui.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)};n(i)}areAllContainersReady(){let n=!!this.leftGui||!this.beans.visibleColsService.isPinningLeft(),i=!!this.centerGui,r=!!this.rightGui||!this.beans.visibleColsService.isPinningRight();return n&&i&&r}setRowType(){let n=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),i=this.rowNode.isFullWidthCell(),r=this.gos.get("masterDetail")&&this.rowNode.detail,s=this.beans.columnModel.isPivotMode(),a=!!this.rowNode.group&&!this.rowNode.footer&&this.gos.isGroupUseEntireRow(s);n?this.rowType="FullWidthLoading":r?this.rowType="FullWidthDetail":i?this.rowType="FullWidth":a?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(n=!1,i=!1){if(this.isFullWidth())return;if(n||this.gos.get("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(i);return}this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}createCellCtrls(n,i,r=null){let s={list:[],map:{}},o=(a,l)=>{s.list.push(l),s.map[a]=l};return i.forEach(a=>{let l=a.getInstanceId(),c=n.map[l];c||(c=new dx(a,this.rowNode,this.beans,this)),o(l,c)}),n.list.forEach(a=>{if(s.map[a.getColumn().getInstanceId()]!=null)return;if(!this.isCellEligibleToBeRemoved(a,r)){o(a.getColumn().getInstanceId(),a);return}a.destroy()}),s}updateColumnListsImpl(n){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(n)}setCellCtrls(n){this.allRowGuis.forEach(i=>{let r=this.getCellCtrlsForContainer(i.containerType);i.rowComp.setCellCtrls(r,n)})}getCellCtrlsForContainer(n){switch(n){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){let n=this.beans.columnViewportService,i=this.beans.visibleColsService;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i.getAllCols()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let r=n.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,r);let s=i.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");let o=i.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(n,i){if(n.getColumn().getPinned()!=i)return!0;let a=n.isEditing(),l=this.beans.focusService.isCellFocused(n.getCellPosition());if(a||l){let d=n.getColumn();return!(this.beans.visibleColsService.getAllCols().indexOf(d)>=0)}return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||this.gos.isDomLayout("print")}listenOnDomOrder(n){let i=()=>{n.rowComp.setDomOrder(this.getDomOrder())};this.addManagedPropertyListener("domLayout",i),this.addManagedPropertyListener("ensureDomOrder",i)}setAnimateFlags(n){if(this.isSticky()||!n)return;let i=Di(this.rowNode.oldRowTop),r=this.beans.visibleColsService.isPinningLeft(),s=this.beans.visibleColsService.isPinningRight();if(i){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.slideInAnimation.fullWidth=!0;return}this.slideInAnimation.center=!0,this.slideInAnimation.left=r,this.slideInAnimation.right=s}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=r,this.fadeInAnimation.right=s}}isEditing(){return this.editingRow}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){let n=(l,c)=>l?l.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(l.element,c).params):!0,i=n(this.fullWidthGui,null),r=n(this.centerGui,null),s=n(this.leftGui,"left"),o=n(this.rightGui,"right");return i&&r&&s&&o}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),expandedChanged:this.updateExpandedCss.bind(this),hasChildrenChanged:this.updateExpandedCss.bind(this)}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventService,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.addDestroyFunc(()=>{this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(i=>{this.addRowDraggerToRow(i)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(n=>n.onRowIndexChanged())},cellChanged:n=>{this.getAllCellCtrls().forEach(i=>i.onCellChanged(n))}})}onRowNodeDataChanged(n){if(this.isFullWidth()!==!!this.rowNode.isFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(r=>r.refreshCell({suppressFlash:!n.update,newData:!n.update})),this.allRowGuis.forEach(r=>{this.setRowCompRowId(r.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(r.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let n=this.rowNode.highlighted;this.allRowGuis.forEach(i=>{let r=n===0,s=n===1;i.rowComp.addOrRemoveCssClass("ag-row-highlight-above",r),i.rowComp.addOrRemoveCssClass("ag-row-highlight-below",s)})}postProcessRowDragging(){let n=this.rowNode.dragging;this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-row-dragging",n))}updateExpandedCss(){let n=this.rowNode.isExpandable(),i=this.rowNode.expanded==!0;this.allRowGuis.forEach(r=>{r.rowComp.addOrRemoveCssClass("ag-row-group",n),r.rowComp.addOrRemoveCssClass("ag-row-group-expanded",n&&i),r.rowComp.addOrRemoveCssClass("ag-row-group-contracted",n&&!i),ip(r.element,n&&i)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:xu(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(n){let i=this.allRowGuis.find(c=>c.element.contains(n.target));if(!((i?i.element:null)===n.target))return;let o=this.rowNode,a=this.beans.focusService.getFocusedCell(),l={rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:a&&a.column};this.beans.navigationService.navigateToNextCell(n,n.key,l,!0),n.preventDefault()}onTabKeyDown(n){if(n.defaultPrevented||gg(n))return;let i=this.allRowGuis.find(a=>a.element.contains(n.target)),r=i?i.element:null,s=r===n.target,o=null;s||(o=this.beans.focusService.findNextFocusableElement(r,!1,n.shiftKey)),(this.isFullWidth()&&s||!o)&&this.beans.navigationService.onTabKeyDown(this,n)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){let n=this.allRowGuis.find(i=>l1(i.element))?.element;return n?n.getBoundingClientRect().top:0}onSuppressCellFocusChanged(n){let i=this.isFullWidth()&&n?void 0:-1;this.allRowGuis.forEach(r=>{qv(r.element,"tabindex",i)})}onFullWidthRowFocused(n){let i=this.rowNode,r=n?this.isFullWidth()&&n.rowIndex===i.rowIndex&&n.rowPinned==i.rowPinned:!1,s=this.fullWidthGui?this.fullWidthGui.element:this.centerGui?.element;s&&(s.classList.toggle("ag-full-width-focus",r),r&&n?.forceBrowserFocus&&s.focus({preventScroll:!0}))}recreateCell(n){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,n),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,n),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,n),n.destroy(),this.updateColumnLists()}removeCellCtrl(n,i){let r={list:[],map:{}};return n.list.forEach(s=>{s!==i&&(r.list.push(s),r.map[s.getColumn().getInstanceId()]=s)}),r}onMouseEvent(n,i){switch(n){case"dblclick":this.onRowDblClick(i);break;case"click":this.onRowClick(i);break;case"touchstart":case"mousedown":this.onRowMouseDown(i);break}}createRowEvent(n,i){return this.gos.addGridCommonParams({type:n,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:i})}createRowEventWithSource(n,i){let r=this.createRowEvent(n,i);return r.source=this,r}onRowDblClick(n){gg(n)||this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",n))}onRowMouseDown(n){if(this.lastMouseDownOnDragger=xA(n.target,"ag-row-drag",3),!this.isFullWidth())return;let i=this.rowNode,r=this.beans.visibleColsService;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges();let s=this.getFullWidthElement(),o=n.target,a=!0;s&&s.contains(o)&&W3e(o)&&(a=!1),this.beans.focusService.setFocusedCell({rowIndex:i.rowIndex,column:r.getAllCols()[0],rowPinned:i.rowPinned,forceBrowserFocus:a})}onRowClick(n){if(gg(n)||this.lastMouseDownOnDragger)return;this.beans.eventService.dispatchEvent(this.createRowEventWithSource("rowClicked",n));let r=n.ctrlKey||n.metaKey,s=n.shiftKey;if(this.gos.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gos.get("suppressRowClickSelection"))return;let a=this.gos.get("rowMultiSelectWithClick"),l=!this.gos.get("suppressRowDeselection"),c="rowClicked";if(this.rowNode.isSelected())a?this.rowNode.setSelectedParams({newValue:!1,event:n,source:c}):r?l&&this.rowNode.setSelectedParams({newValue:!1,event:n,source:c}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!s,rangeSelect:s,event:n,source:c});else{let d=a?!1:!r;this.rowNode.setSelectedParams({newValue:!0,clearSelection:d,rangeSelect:s,event:n,source:c})}}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gos.isRowSelection()}setupDetailRowAutoHeight(n){if(this.rowType!=="FullWidthDetail"||!this.gos.get("detailRowAutoHeight"))return;let i=()=>{let s=n.clientHeight;if(s!=null&&s>0){let o=()=>{this.rowNode.setRowHeight(s),this.beans.rowModel.getType()==="clientSide"?this.beans.rowModel.onRowHeightChanged():this.beans.rowModel.getType()==="serverSide"&&this.beans.rowModel.onRowHeightChanged()};window.setTimeout(o,0)}},r=this.beans.resizeObserverService.observeResize(n,i);this.addDestroyFunc(r),i()}createFullWidthCompDetails(n,i){let{gos:r,rowNode:s}=this,o=r.addGridCommonParams({fullWidth:!0,data:s.data,node:s,value:s.key,valueFormatted:s.key,eGridCell:n,eParentOfValue:n,pinned:i,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(l,c,d,u)=>this.addFullWidthRowDragging(l,c,d,u),setTooltip:(l,c)=>this.refreshRowTooltip(l,c)}),a=this.beans.userComponentFactory;switch(this.rowType){case"FullWidthDetail":return a.getFullWidthDetailCellRendererDetails(o);case"FullWidthGroup":return a.getFullWidthGroupCellRendererDetails(o);case"FullWidthLoading":return a.getFullWidthLoadingCellRendererDetails(o);default:return a.getFullWidthCellRendererDetails(o)}}refreshRowTooltip(n,i){if(!this.fullWidthGui)return;let r={getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>n,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new W1(r,this.beans))}addFullWidthRowDragging(n,i,r="",s){if(!this.isFullWidth())return;let o=new GB(()=>r,this.rowNode,void 0,n,i,s);this.createBean(o,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(o,this.beans.context)})}onUiLevelChanged(){let n=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=n){let i="ag-row-level-"+n,r="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(s=>{s.rowComp.addOrRemoveCssClass(i,!0),s.rowComp.addOrRemoveCssClass(r,!1)})}this.rowLevel=n}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBoundsService.getLastRow()}refreshFirstAndLastRowStyles(){let n=this.isFirstRowOnPage(),i=this.isLastRowOnPage();this.firstRowOnPage!==n&&(this.firstRowOnPage=n,this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass("ag-row-first",n))),this.lastRowOnPage!==i&&(this.lastRowOnPage=i,this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass("ag-row-last",i)))}stopEditing(n=!1){this.stoppingRowEdit||this.beans.rowEditService?.stopEditing(this,n)}setInlineEditingCss(){let n=this.editingRow||this.getAllCellCtrls().some(i=>i.isEditing());this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass("ag-row-inline-editing",n),i.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!n)})}setEditingRow(n){this.editingRow=n}startRowEditing(n=null,i=null,r=null){this.editingRow||this.beans.rowEditService?.startEditing(this,n,i,r)}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(){let n=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!n||!n.length||n.forEach(i=>{this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass(i,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,n=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(n,!0))},n=>{this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass(n,!1))})}setStylesFromGridOptions(n,i){n&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(i,r=>r.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(n){return n==="left"||n==="right"?n:null}getInitialRowClasses(n){let i=this.getPinnedForContainer(n),r={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[n],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:i};return this.beans.rowCssClassCalculator.getInitialRowClasses(r)}processStylesFromGridOptions(){let n=this.gos.get("rowStyle");if(n&&typeof n=="function"){wt("rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}let i=this.gos.getCallback("getRowStyle"),r;if(i){let s={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};r=i(s)}return r||n?Object.assign({},n,r):this.emptyStyle}onRowSelected(n){let i=!!this.rowNode.isSelected();this.forEachGui(n,r=>{r.rowComp.addOrRemoveCssClass("ag-row-selected",i),bA(r.element,i),r.element.contains(this.gos.getActiveDomElement())&&(r===this.centerGui||r===this.fullWidthGui)&&this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;let n=this.rowNode.isSelected();if(n&&this.gos.get("suppressRowDeselection"))return;let r=this.beans.localeService.getLocaleTextFunc()(n?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${n?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(r,"rowSelection")}addHoverFunctionality(n){if(!this.active)return;let{rowNode:i,beans:r,gos:s}=this;this.addManagedListeners(n,{mouseenter:()=>i.onMouseEnter(),mouseleave:()=>i.onMouseLeave()}),this.addManagedListeners(i,{mouseEnter:()=>{!r.dragService.isDragging()&&!s.get("suppressRowHoverHighlight")&&(n.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{n.classList.remove("ag-row-hover"),i.setHovered(!1)}})}roundRowTopToBounds(n){let i=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),r=this.applyPaginationOffset(i.top,!0)-100,s=this.applyPaginationOffset(i.bottom,!0)+100;return Math.min(Math.max(r,n),s)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(n,i){n?i(n):this.allRowGuis.forEach(i)}onRowHeightChanged(n){if(this.rowNode.rowHeight==null)return;let i=this.rowNode.rowHeight,r=this.beans.environment.getDefaultRowHeight(),o=this.gos.isGetRowHeightFunction()?this.gos.getRowHeightForNode(this.rowNode).height:void 0,a=o?`${Math.min(r,o)-2}px`:void 0;this.forEachGui(n,l=>{l.element.style.height=`${i}px`,a&&l.element.style.setProperty("--ag-line-height",a)})}addEventListener(n,i){super.addEventListener(n,i)}removeEventListener(n,i){super.removeEventListener(n,i)}destroyFirstPass(n=!1){if(this.active=!1,!n&&this.gos.isAnimateRows()&&!this.isSticky())if(this.rowNode.rowTop!=null){let s=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(s)}else this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);let i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventService.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();let n=i=>(i.list.forEach(r=>r.destroy()),{list:[],map:{}});this.centerCellCtrls=n(this.centerCellCtrls),this.leftCellCtrls=n(this.leftCellCtrls),this.rightCellCtrls=n(this.rightCellCtrls)}setFocusedClasses(n){this.forEachGui(n,i=>{i.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),i.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let n=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);n!==this.rowFocused&&(this.rowFocused=n,this.setFocusedClasses()),!n&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){let n=this.beans.paginationService?.getCurrentPage()??0;this.paginationPage!==n&&(this.paginationPage=n,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(n,i=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return n;let r=this.beans.pageBoundsService.getPixelOffset();return n+r*(i?1:-1)}setRowTop(n){if(!this.printLayout&&Di(n)){let i=this.applyPaginationOffset(n),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}px`;this.setRowTopStyle(o)}}getInitialRowTop(n){return this.suppressRowTransform?this.getInitialRowTopShared(n):void 0}getInitialTransform(n){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(n)})`}getInitialRowTopShared(n){if(this.printLayout)return"";let i=this.rowNode,r;if(this.isSticky())r=i.stickyRowTop;else{let s=this.slideInAnimation[n]?this.roundRowTopToBounds(i.oldRowTop):i.rowTop,o=this.applyPaginationOffset(s);r=i.isRowPinned()?o:this.beans.rowContainerHeightService.getRealPixelPosition(o)}return r+"px"}setRowTopStyle(n){this.allRowGuis.forEach(i=>this.suppressRowTransform?i.rowComp.setTop(n):i.rowComp.setTransform(`translateY(${n})`))}getRowNode(){return this.rowNode}getCellCtrl(n){let i=null;return this.getAllCellCtrls().forEach(r=>{r.getColumn()==n&&(i=r)}),i!=null||this.getAllCellCtrls().forEach(r=>{r.getColSpanningList().indexOf(n)>=0&&(i=r)}),i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(n){let i=this.rowNode.getRowIndexString();if(i===null)return;let r=this.beans.headerNavigationService.getHeaderRowCount()+(this.beans.filterManager?.getHeaderRowCount()??0),s=this.rowNode.rowIndex%2===0,o=r+this.rowNode.rowIndex+1;this.forEachGui(n,a=>{a.rowComp.setRowIndex(i),a.rowComp.addOrRemoveCssClass("ag-row-even",s),a.rowComp.addOrRemoveCssClass("ag-row-odd",!s),HZ(a.element,o)})}setStoppingRowEdit(n){this.stoppingRowEdit=n}};return t.DOM_DATA_KEY_ROW_CTRL="renderedRow",t})(),hD=uWt,hWt=class extends Ot{wireBeans(t){this.mouseEventService=t.mouseEventService,this.valueService=t.valueService,this.menuService=t.menuService,this.ctrlsService=t.ctrlsService,this.navigationService=t.navigationService,this.focusService=t.focusService,this.undoRedoService=t.undoRedoService,this.visibleColsService=t.visibleColsService,this.rowModel=t.rowModel,this.pinnedRowModel=t.pinnedRowModel,this.rangeService=t.rangeService,this.clipboardService=t.clipboardService}constructor(t){super(),this.element=t}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){let t="keydown",e=this.processKeyboardEvent.bind(this,t);this.addManagedElementListeners(this.element,{[t]:e})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",qHe("touchstart")?"touchstart":"mousedown"].forEach(n=>{let i=this.processMouseEvent.bind(this,n);this.addManagedElementListeners(this.element,{[n]:i})})}processMouseEvent(t,e){if(!this.mouseEventService.isEventFromThisGrid(e)||gg(e))return;let n=this.getRowForEvent(e),i=this.mouseEventService.getRenderedCellForEvent(e);t==="contextmenu"?this.handleContextMenuMouseEvent(e,void 0,n,i):(i&&i.onMouseEvent(t,e),n&&n.onMouseEvent(t,e))}mockContextMenuForIPad(){if(!x5())return;let t=new Zv(this.element),e=n=>{let i=this.getRowForEvent(n.touchEvent),r=this.mouseEventService.getRenderedCellForEvent(n.touchEvent);this.handleContextMenuMouseEvent(void 0,n.touchEvent,i,r)};this.addManagedListeners(t,{longTap:e}),this.addDestroyFunc(()=>t.destroy())}getRowForEvent(t){let e=t.target;for(;e;){let n=this.gos.getDomData(e,hD.DOM_DATA_KEY_ROW_CTRL);if(n)return n;e=e.parentElement}return null}handleContextMenuMouseEvent(t,e,n,i){let r=n?n.getRowNode():null,s=i?i.getColumn():null,o=null;if(s){let c=t||e;i.dispatchCellContextMenuEvent(c??null),o=this.valueService.getValue(s,r)}let a=this.ctrlsService.getGridBodyCtrl(),l=i?i.getGui():a.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:t,touchEvent:e,rowNode:r,column:s,value:o,anchorToElement:l})}getControlsForEventTarget(t){return{cellCtrl:BB(this.gos,t,dx.DOM_DATA_KEY_CELL_CTRL),rowCtrl:BB(this.gos,t,hD.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(t,e){let{cellCtrl:n,rowCtrl:i}=this.getControlsForEventTarget(e.target);e.defaultPrevented||(n?this.processCellKeyboardEvent(n,t,e):i&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,t,e))}processCellKeyboardEvent(t,e,n){let i=t.getRowNode(),r=t.getColumn(),s=t.isEditing();!D3e(this.gos,n,i,r,s)&&e==="keydown"&&(!s&&this.navigationService.handlePageScrollingKey(n)||t.onKeyDown(n),this.doGridOperations(n,t.isEditing()),UZ(n)&&t.processCharacter(n)),e==="keydown"&&this.eventService.dispatchEvent(t.createEvent(n,"cellKeyDown"))}processFullWidthRowKeyboardEvent(t,e,n){let i=t.getRowNode(),r=this.focusService.getFocusedCell(),s=r&&r.column;if(!D3e(this.gos,n,i,s,!1)){let a=n.key;if(e==="keydown")switch(a){case It.PAGE_HOME:case It.PAGE_END:case It.PAGE_UP:case It.PAGE_DOWN:this.navigationService.handlePageScrollingKey(n,!0);break;case It.UP:case It.DOWN:t.onKeyboardNavigate(n);break;case It.TAB:t.onTabKeyDown(n);break;default:}}e==="keydown"&&this.eventService.dispatchEvent(t.createRowEvent("cellKeyDown",n))}doGridOperations(t,e){if(!t.ctrlKey&&!t.metaKey||e||!this.mouseEventService.isEventFromThisGrid(t))return;let n=vHt(t);if(n===It.A)return this.onCtrlAndA(t);if(n===It.C)return this.onCtrlAndC(t);if(n===It.D)return this.onCtrlAndD(t);if(n===It.V)return this.onCtrlAndV(t);if(n===It.X)return this.onCtrlAndX(t);if(n===It.Y)return this.onCtrlAndY();if(n===It.Z)return this.onCtrlAndZ(t)}onCtrlAndA(t){let{pinnedRowModel:e,rowModel:n,rangeService:i}=this;if(i&&n.isRowsToRender()){let[r,s]=[e.isEmpty("top"),e.isEmpty("bottom")],o=r?null:"top",a,l;s?(a=null,l=n.getRowCount()-1):(a="bottom",l=e.getPinnedBottomRowCount()-1);let c=this.visibleColsService.getAllCols();if(Gd(c))return;i.setCellRange({rowStartIndex:0,rowStartPinned:o,rowEndIndex:l,rowEndPinned:a,columnStart:c[0],columnEnd:Ar(c)})}t.preventDefault()}onCtrlAndC(t){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:e,rowCtrl:n}=this.getControlsForEventTarget(t.target);e?.isEditing()||n?.isEditing()||(t.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(t){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:e,rowCtrl:n}=this.getControlsForEventTarget(t.target);e?.isEditing()||n?.isEditing()||(t.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(t){let{cellCtrl:e,rowCtrl:n}=this.getControlsForEventTarget(t.target);e?.isEditing()||n?.isEditing()||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(t){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),t.preventDefault()}onCtrlAndZ(t){!this.gos.get("undoRedoCellEditing")||!this.undoRedoService||(t.preventDefault(),t.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService?.redo("ui")}},pWt=class extends Ot{wireBeans(t){this.pinnedWidthService=t.pinnedWidthService}constructor(t){super(),this.element=t}postConstruct(){this.addManagedEventListeners({leftPinnedWidthChanged:this.onPinnedLeftWidthChanged.bind(this)})}onPinnedLeftWidthChanged(){let t=this.pinnedWidthService.getPinnedLeftWidth(),e=t>0;Vn(this.element,e),E4(this.element,t)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}},mWt=class extends Ot{wireBeans(t){this.pinnedWidthService=t.pinnedWidthService}constructor(t){super(),this.element=t}postConstruct(){this.addManagedEventListeners({rightPinnedWidthChanged:this.onPinnedRightWidthChanged.bind(this)})}onPinnedRightWidthChanged(){let t=this.pinnedWidthService.getPinnedRightWidth(),e=t>0;Vn(this.element,e),E4(this.element,t)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}},wZ=t=>t.getTopRowCtrls(),SZ=t=>t.getStickyTopRowCtrls(),TZ=t=>t.getStickyBottomRowCtrls(),DZ=t=>t.getBottomRowCtrls(),EZ=t=>t.getCentreRowCtrls(),fWt={center:{type:"center",container:"ag-center-cols-container",viewport:"ag-center-cols-viewport",getRowCtrls:EZ},left:{type:"left",container:"ag-pinned-left-cols-container",pinnedType:"left",getRowCtrls:EZ},right:{type:"right",container:"ag-pinned-right-cols-container",pinnedType:"right",getRowCtrls:EZ},fullWidth:{type:"fullWidth",container:"ag-full-width-container",fullWidth:!0,getRowCtrls:EZ},topCenter:{type:"center",container:"ag-floating-top-container",viewport:"ag-floating-top-viewport",getRowCtrls:wZ},topLeft:{type:"left",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:wZ},topRight:{type:"right",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:wZ},topFullWidth:{type:"fullWidth",container:"ag-floating-top-full-width-container",fullWidth:!0,getRowCtrls:wZ},stickyTopCenter:{type:"center",container:"ag-sticky-top-container",viewport:"ag-sticky-top-viewport",getRowCtrls:SZ},stickyTopLeft:{type:"left",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:SZ},stickyTopRight:{type:"right",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:SZ},stickyTopFullWidth:{type:"fullWidth",container:"ag-sticky-top-full-width-container",fullWidth:!0,getRowCtrls:SZ},stickyBottomCenter:{type:"center",container:"ag-sticky-bottom-container",viewport:"ag-sticky-bottom-viewport",getRowCtrls:TZ},stickyBottomLeft:{type:"left",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:TZ},stickyBottomRight:{type:"right",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:TZ},stickyBottomFullWidth:{type:"fullWidth",container:"ag-sticky-bottom-full-width-container",fullWidth:!0,getRowCtrls:TZ},bottomCenter:{type:"center",container:"ag-floating-bottom-container",viewport:"ag-floating-bottom-viewport",getRowCtrls:DZ},bottomLeft:{type:"left",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:DZ},bottomRight:{type:"right",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:DZ},bottomFullWidth:{type:"fullWidth",container:"ag-floating-bottom-full-width-container",fullWidth:!0,getRowCtrls:DZ}};gWt=["topCenter","topLeft","topRight"],vWt=["bottomCenter","bottomLeft","bottomRight"],yWt=["center","left","right"],_Wt=["center","left","right","fullWidth"],CWt=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],xWt=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],bWt=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],iWe=["stickyTopCenter","stickyTopLeft","stickyTopRight"],nWe=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],wWt=[...iWe,"stickyTopFullWidth",...nWe,"stickyBottomFullWidth"],SWt=[...gWt,...vWt,...yWt,...iWe,...nWe],TWt=class extends Ot{constructor(t){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=t,this.options=vA(t)}wireBeans(t){this.dragService=t.dragService,this.ctrlsService=t.ctrlsService,this.columnViewportService=t.columnViewportService,this.resizeObserverService=t.resizeObserverService,this.rowRenderer=t.rowRenderer}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new NGt(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(t){this.comp.setOffsetTop(`${t.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.ctrlsService.register(this.name,this)}forContainers(t,e){t.indexOf(this.name)>=0&&e()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(t,e,n){this.comp=t,this.eContainer=e,this.eViewport=n,this.createManagedBean(new hWt(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let i=()=>this.onPinnedWidthChanged();this.forContainers(xWt,()=>{this.pinnedWidthFeature=this.createManagedBean(new pWt(this.eContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:i})}),this.forContainers(bWt,()=>{this.pinnedWidthFeature=this.createManagedBean(new mWt(this.eContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:i})}),this.forContainers(_Wt,()=>this.createManagedBean(new tWe(this.eContainer,this.name==="center"?n:void 0))),this.forContainers(SWt,()=>this.createManagedBean(new VGt(this.eContainer))),this.forContainers(CWt,()=>this.createManagedBean(new n4e(r=>this.comp.setContainerWidth(`${r}px`)))),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(t){this.addManagedElementListeners(this.getViewportElement(),{scroll:t})}addListeners(){this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),displayedRowsChanged:t=>this.onDisplayedRowsChanged(t.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(wWt.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let e=()=>{let n=this.gos.get("ensureDomOrder"),i=this.gos.isDomLayout("print");this.comp.setDomOrder(n||i)};this.addManagedPropertyListener("domLayout",e),e()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let t=e=>{this.dragService.isDragging()&&e.cancelable&&e.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(t=!1){let e=this.getCenterWidth(),n=this.getCenterViewportScrollLeft();this.columnViewportService.setScrollPosition(e,n,t)}getCenterWidth(){return yD(this.eViewport)}getCenterViewportScrollLeft(){return PZ(this.eViewport,this.enableRtl)}registerViewportResizeListener(t){let e=this.resizeObserverService.observeResize(this.eViewport,t);this.addDestroyFunc(()=>e())}isViewportInTheDOMTree(){return gGe(this.eViewport)}getViewportScrollLeft(){return PZ(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||szt(this.eViewport)}getViewportElement(){return this.eViewport}setHorizontalScroll(t){this.comp.setHorizontalScroll(t)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(t){RZ(this.eViewport,t,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let t=this.isContainerVisible();this.visible!=t&&(this.visible=t,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(t=!1){let e=this.options.getRowCtrls(this.rowRenderer);if(!this.visible||e.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let n=this.gos.isDomLayout("print"),r=this.gos.get("embedFullWidthRows")||n,s=e.filter(o=>{let a=o.isFullWidth();return this.options.fullWidth?!r&&a:r||!a});this.comp.setRowCtrls({rowCtrls:s,useFlushSync:t})}},rWe="ag-force-vertical-scroll",DWt="ag-selectable",EWt="ag-column-moving",MWt=class extends Ot{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(t){this.animationFrameService=t.animationFrameService,this.rowContainerHeightService=t.rowContainerHeightService,this.ctrlsService=t.ctrlsService,this.columnModel=t.columnModel,this.columnSizeService=t.columnSizeService,this.scrollVisibleService=t.scrollVisibleService,this.menuService=t.menuService,this.headerNavigationService=t.headerNavigationService,this.dragAndDropService=t.dragAndDropService,this.pinnedRowModel=t.pinnedRowModel,this.rowRenderer=t.rowRenderer,this.popupService=t.popupService,this.mouseEventService=t.mouseEventService,this.rowModel=t.rowModel,this.filterManager=t.filterManager,this.environment=t.environment}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(t,e,n,i,r,s,o){this.comp=t,this.eGridBody=e,this.eBodyViewport=n,this.eTop=i,this.eBottom=r,this.eStickyTop=s,this.eStickyBottom=o,this.eCenterColsViewport=n.querySelector(`.${vA("center").viewport}`),this.eFullWidthContainer=n.querySelector(`.${vA("fullWidth").container}`),this.eStickyTopFullWidthContainer=s.querySelector(`.${vA("stickyTopFullWidth").container}`),this.eStickyBottomFullWidthContainer=o.querySelector(`.${vA("stickyBottomFullWidth").container}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new o4e(this.comp)),this.bodyScrollFeature=this.createManagedBean(new OGt(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,n,r,s,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager?.setupAdvancedFilterHeaderComp(i),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){let t=this.setFloatingHeights.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),pinnedRowDataChanged:t,pinnedHeightChanged:t,headerHeightChanged:this.onHeaderHeightChanged.bind(this)})}addFocusListeners(t){t.forEach(e=>{this.addManagedElementListeners(e,{focusin:n=>{let{target:i}=n,r=xA(i,"ag-root",e);e.classList.toggle("ag-has-focus",!r)},focusout:n=>{let{target:i,relatedTarget:r}=n,s=e.contains(r),o=xA(r,"ag-root",e);xA(i,"ag-root",e)||(!s||o)&&e.classList.remove("ag-has-focus")}})})}setColumnMovingCss(t){this.comp.setColumnMovingCss(EWt,t)}setCellTextSelection(t=!1){this.comp.setCellSelectableCss(DWt,t)}onScrollVisibilityChanged(){let t=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();let e=t&&this.gos.getScrollbarWidth()||0,n=pGe()?16:0,i=`calc(100% + ${e+n}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(i))}onGridColumnsChanged(){let t=this.columnModel.getCols();this.comp.setColumnCount(t.length)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:t=>{if(t.target instanceof HTMLImageElement)return t.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;let t=n=>{let i=n.relatedTarget;if(S3e(i)===null){this.rowRenderer.stopEditing();return}let r=e.some(s=>s.contains(i))&&this.mouseEventService.isElementInThisGrid(i);if(!r){let s=this.popupService;r=s.getActivePopups().some(o=>o.contains(i))||s.isElementWithinCustomPopup(i)}r||this.rowRenderer.stopEditing()},e=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];e.forEach(n=>this.addManagedElementListeners(n,{focusout:t}))}updateRowCount(){let t=this.headerNavigationService.getHeaderRowCount()+(this.filterManager?.getHeaderRowCount()??0),e=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,n=e===-1?-1:t+e;this.comp.setRowCount(n)}registerBodyViewportResizeListener(t){this.comp.registerBodyViewportResizeListener(t)}setVerticalScrollPaddingVisible(t){let e=t?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(e)}isVerticalScrollShowing(){let t=this.gos.get("alwaysShowVerticalScroll"),e=t?rWe:null,n=this.gos.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(e,t),t||n&&ozt(this.eBodyViewport)}setupRowAnimationCssClass(){let t=this.environment.hasMeasuredSizes(),e=()=>{let n=t&&this.gos.isAnimateRows()&&!this.rowContainerHeightService.isStretching(),i=n?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(i,n)};e(),this.addManagedEventListeners({heightScaleChanged:e}),this.addManagedPropertyListener("animateRows",e),this.addManagedEventListeners({gridStylesChanged:()=>{!t&&this.environment.hasMeasuredSizes()&&(t=!0,e())}})}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){let t=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:t}),this.mockContextMenuForIPad(t),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:t=>this.onFullWidthContainerWheel(t)})}onFullWidthContainerWheel(t){let{deltaX:e,deltaY:n,shiftKey:i}=t;(i||Math.abs(e)>Math.abs(n))&&this.mouseEventService.isEventFromThisGrid(t)&&this.scrollGridBodyToMatchEvent(t)}onStickyWheel(t){let{deltaX:e,deltaY:n,shiftKey:i}=t,r=i||Math.abs(e)>Math.abs(n),s=t.target;r?(this.eStickyTopFullWidthContainer.contains(s)||this.eStickyBottomFullWidthContainer.contains(s))&&this.scrollGridBodyToMatchEvent(t):(t.preventDefault(),this.scrollVertically(n))}scrollGridBodyToMatchEvent(t){let{deltaX:e,deltaY:n}=t;t.preventDefault(),this.eCenterColsViewport.scrollBy({left:e||n})}onBodyViewportContextMenu(t,e,n){if(!t&&!n)return;this.gos.get("preventDefaultOnContextMenu")&&(t||n).preventDefault();let{target:i}=t||e;(i===this.eBodyViewport||i===this.ctrlsService.get("center").getViewportElement())&&this.menuService.showContextMenu({mouseEvent:t,touchEvent:n,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(t){if(!x5())return;let e=new Zv(this.eBodyViewport),n=i=>{t(void 0,i.touchStart,i.touchEvent)};this.addManagedListeners(e,{longTap:n}),this.addDestroyFunc(()=>e.destroy())}onBodyViewportWheel(t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&t.preventDefault()}getGui(){return this.eGridBody}scrollVertically(t){let e=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(e+t),this.eBodyViewport.scrollTop-e}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new Jzt(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}getRowDragFeature(){return this.rowDragFeature}setFloatingHeights(){let{pinnedRowModel:t}=this,e=t.getPinnedTopTotalHeight(),n=t.getPinnedBottomTotalHeight();this.comp.setTopHeight(e),this.comp.setBottomHeight(n),this.comp.setTopDisplay(e?"inherit":"none"),this.comp.setBottomDisplay(n?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(t=0){this.comp.setStickyTopHeight(`${t}px`),this.stickyTopHeight=t}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(t=0){this.comp.setStickyBottomHeight(`${t}px`),this.stickyBottomHeight=t}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(t){if(!t)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{let e=this.gos.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){let e=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+(this.filterManager?.getHeaderHeight()??0),n=this.pinnedRowModel.getPinnedTopTotalHeight(),i=0;e>0&&(i+=e),n>0&&(i+=n),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){let t=this.pinnedRowModel.getPinnedBottomTotalHeight(),n=this.scrollVisibleService.isHorizontalScrollShowing()&&this.gos.getScrollbarWidth()||0,i=t+n;this.comp.setStickyBottomBottom(`${i}px`)}sizeColumnsToFit(t,e){let i=this.isVerticalScrollShowing()?this.gos.getScrollbarWidth():0,s=yD(this.eGridBody)-i;if(s>0){this.columnSizeService.sizeColumnsToFit(s,"sizeColumnsToFit",!1,t);return}e===void 0?window.setTimeout(()=>{this.sizeColumnsToFit(t,100)},0):e===100?window.setTimeout(()=>{this.sizeColumnsToFit(t,500)},100):e===500?window.setTimeout(()=>{this.sizeColumnsToFit(t,-1)},500):wt("tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(t){this.eBodyViewport.addEventListener("scroll",t,{passive:!0})}removeScrollEventListener(t){this.eBodyViewport.removeEventListener("scroll",t)}},kWt=class extends ai{constructor(t,e,n,i,r){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode(),this.rowCtrl=e.getRowCtrl(),this.eRow=i,this.cellCtrl=e;let s=document.createElement("div");s.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(s);let o=this.getGui();this.forceWrapper=e.isForceWrapper(),this.refreshWrapper(!1);let a=(c,d)=>{d!=null&&d!=""?o.setAttribute(c,d):o.removeAttribute(c)};dd(o,e.getCellAriaRole()),a("col-id",e.getColumnIdSanitised());let l={addOrRemoveCssClass:(c,d)=>this.addOrRemoveCssClass(c,d),setUserStyles:c=>_Ge(o,c),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:c=>this.includeSelection=c,setIncludeRowDrag:c=>this.includeRowDrag=c,setIncludeDndSource:c=>this.includeDndSource=c,setRenderDetails:(c,d,u)=>this.setRenderDetails(c,d,u),setEditDetails:(c,d,u)=>this.setEditDetails(c,d,u),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};e.setComp(l,this.getGui(),this.eCellWrapper,n,r)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(t,e,n){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;let r=this.refreshWrapper(!1);this.refreshEditStyles(!1),t?!(n||r)&&this.refreshCellRenderer(t)||(this.destroyRenderer(),this.createCellRendererInstance(t)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(e))}setEditDetails(t,e,n){t?this.createCellEditorInstance(t,e,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(t){let e=this.includeRowDrag||this.includeDndSource||this.includeSelection,n=e||this.forceWrapper,i=n&&this.eCellWrapper==null;if(i){let c=document.createElement("div");c.setAttribute("role","presentation"),c.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=c,this.getGui().appendChild(this.eCellWrapper)}let r=!n&&this.eCellWrapper!=null;r&&(dc(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!n);let s=!t&&n,o=s&&this.eCellValue==null;if(o){let c=document.createElement("span");c.setAttribute("role","presentation"),c.setAttribute("class","ag-cell-value"),this.eCellValue=c,this.eCellWrapper.appendChild(this.eCellValue)}let a=!s&&this.eCellValue!=null;a&&(dc(this.eCellValue),this.eCellValue=void 0);let l=i||r||o||a;return l&&this.removeControls(),t||e&&this.addControls(),l}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(t,e,n){let i=this.editorVersion,r=t.newAgStackInstance();if(r==null)return;let{params:s}=t;r.then(a=>this.afterCellEditorCreated(i,a,s,e,n)),Ls(this.cellEditor)&&s.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(t){let e=this.getParentOfValue();zo(e);let n=t!=null?nl(t,!0):null;n!=null&&(e.textContent=n)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){let{context:t}=this.beans;this.cellRenderer=t.destroyBean(this.cellRenderer),dc(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){let{context:t}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=t.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=t.destroyBean(this.cellEditorPopupWrapper),dc(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(t){if(this.cellRenderer==null||this.cellRenderer.refresh==null||this.cellRendererClass!==t.componentClass)return!1;let e=this.cellRenderer.refresh(t.params);return e===!0||e===void 0}createCellRendererInstance(t){let n=!this.beans.gos.get("suppressAnimationFrame"),i=this.rendererVersion,{componentClass:r}=t,s=()=>{if(this.rendererVersion!==i||!this.isAlive())return;let a=t.newAgStackInstance(),l=this.afterCellRendererCreated.bind(this,i,r);a&&a.then(l)};n&&this.firstRender?this.beans.animationFrameService.createTask(s,this.rowNode.rowIndex,"createTasksP2"):s()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(t,e,n){if(!this.isAlive()||t!==this.rendererVersion){this.beans.context.destroyBean(n);return}if(this.cellRenderer=n,this.cellRendererClass=e,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){let r=this.getParentOfValue();zo(r),r.appendChild(this.cellRendererGui)}}afterCellEditorCreated(t,e,n,i,r){if(t!==this.editorVersion){this.beans.context.destroyBean(e);return}if(e.isCancelBeforeStart&&e.isCancelBeforeStart()){this.beans.context.destroyBean(e),this.cellCtrl.stopEditing(!0);return}if(!e.getGui){wt(`cellEditor for column ${this.column.getId()} is missing getGui() method`),this.beans.context.destroyBean(e);return}this.cellEditor=e,this.cellEditorGui=e.getGui();let a=i||e.isPopup!==void 0&&e.isPopup();a?this.addPopupCellEditor(n,r):this.addInCellEditor(),this.refreshEditStyles(!0,a),e.afterGuiAttached&&e.afterGuiAttached()}refreshEditStyles(t,e){this.addOrRemoveCssClass("ag-cell-inline-editing",t&&!e),this.addOrRemoveCssClass("ag-cell-popup-editing",t&&!!e),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!t||!!e),this.rowCtrl?.setInlineEditingCss()}addInCellEditor(){let t=this.getGui();t.contains(this.beans.gos.getActiveDomElement())&&t.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(t,e){this.beans.gos.get("editType")==="fullRow"&&wt("popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");let n=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(this.beans.editService.createPopupEditorWrapper(t));let i=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&i.appendChild(this.cellEditorGui);let r=this.beans.popupService,s=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),o=e??n.getPopupPosition?.()??"over",a=this.beans.gos.get("enableRtl"),l={ePopup:i,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:o,alignSide:a?"right":"left",keepWithinBounds:!0},c=r.positionPopupByComponent.bind(r,l),d=this.beans.localeService.getLocaleTextFunc(),u=r.addPopup({modal:s,eChild:i,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:c,ariaLabel:d("ariaLabelCellEditor","Cell Editor")});u&&(this.hideEditorPopup=u.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){let t=this.getGui();t.contains(this.beans.gos.getActiveDomElement())&&w3e()&&t.focus({preventScroll:!0}),zo(this.getParentOfValue())}},IWt=class extends ai{constructor(t,e,n){super(),this.cellComps={},this.beans=e,this.rowCtrl=t;let i=document.createElement("div");i.setAttribute("comp-id",`${this.getCompId()}`),i.setAttribute("style",this.getInitialStyle(n)),this.setTemplateFromElement(i);let r=this.getGui(),s=r.style;this.domOrder=this.rowCtrl.getDomOrder(),dd(r,"row");let o={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=>_Ge(r,a),setTop:a=>s.top=a,setTransform:a=>s.transform=a,setRowIndex:a=>r.setAttribute("row-index",a),setRowId:a=>r.setAttribute("row-id",a),setRowBusinessKey:a=>r.setAttribute("row-business-key",a),refreshFullWidth:a=>this.refreshFullWidth(a)};t.setComp(o,this.getGui(),n),this.addDestroyFunc(()=>{t.unsetComp(n)})}getInitialStyle(t){let e=this.rowCtrl.getInitialTransform(t);return e?`transform: ${e}`:`top: ${this.rowCtrl.getInitialRowTop(t)}`}showFullWidth(t){let e=i=>{if(this.isAlive()){let r=i.getGui();this.getGui().appendChild(r),this.rowCtrl.setupDetailRowAutoHeight(r),this.setFullWidthRowComp(i)}else this.beans.context.destroyBean(i)},n=t.newAgStackInstance();n?.then(e)}setCellCtrls(t){let e=Object.assign({},this.cellComps);t.forEach(i=>{let r=i.getInstanceId();this.cellComps[r]==null?this.newCellComp(i):e[r]=null});let n=m5(e).filter(i=>i!=null);this.destroyCells(n),this.ensureDomOrder(t)}ensureDomOrder(t){if(!this.domOrder)return;let e=[];t.forEach(n=>{let i=this.cellComps[n.getInstanceId()];i&&e.push(i.getGui())}),yGe(this.getGui(),e)}newCellComp(t){let e=new kWt(this.beans,t,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[t.getInstanceId()]=e,this.getGui().appendChild(e.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){let t=m5(this.cellComps).filter(e=>e!=null);this.destroyCells(t)}setFullWidthRowComp(t){this.fullWidthCellRenderer&&Do("should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}getFullWidthCellRenderer(){return this.fullWidthCellRenderer}destroyCells(t){t.forEach(e=>{if(!e)return;let n=e.getCtrl().getInstanceId();this.cellComps[n]===e&&(e.detach(),e.destroy(),this.cellComps[n]=null)})}refreshFullWidth(t){let{fullWidthCellRenderer:e}=this;if(!e||!e.refresh)return!1;let n=t();return e.refresh(n)}};PWt=class extends ai{constructor(){super(),this.eViewport=Bt,this.eContainer=Bt,this.rowComps={},this.name=ai.elementGettingCreated.getAttribute("name"),this.options=vA(this.name),this.setTemplate(AWt(this.options))}wireBeans(t){this.beans=t}postConstruct(){let t={setHorizontalScroll:n=>this.eViewport.scrollLeft=n,setViewportHeight:n=>this.eViewport.style.height=n,setRowCtrls:({rowCtrls:n})=>this.setRowCtrls(n),setDomOrder:n=>{this.domOrder=n},setContainerWidth:n=>this.eContainer.style.width=n,setOffsetTop:n=>this.eContainer.style.transform=`translateY(${n})`};this.createManagedBean(new TWt(this.name)).setComp(t,this.eContainer,this.eViewport)}destroy(){this.setRowCtrls([]),super.destroy()}setRowCtrls(t){let e=ve({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;let n=i=>{let r=i.getInstanceId(),s=e[r];if(s)this.rowComps[r]=s,delete e[r],this.ensureDomOrder(s.getGui());else{if(!i.getRowNode().displayed)return;let o=new IWt(i,this.beans,this.options.type);this.rowComps[r]=o,this.appendRow(o.getGui())}};t.forEach(n),m5(e).forEach(i=>{this.eContainer.removeChild(i.getGui()),i.destroy()}),dd(this.eContainer,"rowgroup")}appendRow(t){this.domOrder?rzt(this.eContainer,t,this.lastPlacedElement):this.eContainer.appendChild(t),this.lastPlacedElement=t}ensureDomOrder(t){this.domOrder&&(vGe(this.eContainer,t,this.lastPlacedElement),this.lastPlacedElement=t)}},RWt={selector:"AG-ROW-CONTAINER",component:PWt};FWt=`<div class="ag-root ag-unselectable" role="treegrid">
        <ag-header-root></ag-header-root>
        <div class="ag-floating-top" data-ref="eTop" role="presentation">
            ${PB(["topLeft","topCenter","topRight","topFullWidth"])}
        </div>
        <div class="ag-body" data-ref="eBody" role="presentation">
            <div class="ag-body-viewport" data-ref="eBodyViewport" role="presentation">
            ${PB(["left","center","right","fullWidth"])}
            </div>
            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>
        </div>
        <div class="ag-sticky-top" data-ref="eStickyTop" role="presentation">
            ${PB(["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])}
        </div>
        <div class="ag-sticky-bottom" data-ref="eStickyBottom" role="presentation">
            ${PB(["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])}
        </div>
        <div class="ag-floating-bottom" data-ref="eBottom" role="presentation">
            ${PB(["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])}
        </div>
        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
        <ag-overlay-wrapper></ag-overlay-wrapper>
    </div>`,LWt=class extends ai{constructor(){super(FWt,[AGt,RGt,LGt,kGt,RWt]),this.eBodyViewport=Bt,this.eStickyTop=Bt,this.eStickyBottom=Bt,this.eTop=Bt,this.eBottom=Bt,this.eBody=Bt}wireBeans(t){this.resizeObserverService=t.resizeObserverService,this.rangeService=t.rangeService}postConstruct(){let t=(n,i)=>{let r=`${n}px`;i.style.minHeight=r,i.style.height=r},e={setRowAnimationCssOnBodyViewport:(n,i)=>this.setRowAnimationCssOnBodyViewport(n,i),setColumnCount:n=>ZBt(this.getGui(),n),setRowCount:n=>qBt(this.getGui(),n),setTopHeight:n=>t(n,this.eTop),setBottomHeight:n=>t(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,setStickyBottomHeight:n=>{this.eStickyBottom.style.height=n,this.eStickyBottom.classList.toggle("ag-hidden",n==="0px")},setStickyBottomBottom:n=>this.eStickyBottom.style.bottom=n,setStickyBottomWidth:n=>this.eStickyBottom.style.width=n,setColumnMovingCss:(n,i)=>this.addOrRemoveCssClass(n,i),updateLayoutClasses:(n,i)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(s=>{s.toggle("ag-layout-auto-height",i.autoHeight),s.toggle("ag-layout-normal",i.normal),s.toggle("ag-layout-print",i.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",i.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",i.normal),this.addOrRemoveCssClass("ag-layout-print",i.print)},setAlwaysVerticalScrollClass:(n,i)=>this.eBodyViewport.classList.toggle(rWe,i),registerBodyViewportResizeListener:n=>{let i=this.resizeObserverService.observeResize(this.eBodyViewport,n);this.addDestroyFunc(()=>i())},setPinnedTopBottomOverflowY:n=>this.eTop.style.overflowY=this.eBottom.style.overflowY=n,setCellSelectableCss:(n,i)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(r=>r.classList.toggle(n,i))},setBodyViewportWidth:n=>this.eBodyViewport.style.width=n};this.ctrl=this.createManagedBean(new MWt),this.ctrl.setComp(e,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&this.gos.get("enableRangeSelection")||this.gos.get("rowSelection")==="multiple")&&YBt(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(t,e){let n=this.eBodyViewport.classList;n.toggle("ag-row-animation",e),n.toggle("ag-row-no-animation",!e)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}},OWt={selector:"AG-GRID-BODY",component:LWt},NWt=class extends Ot{constructor(){super(...arguments),this.beanName="scrollVisibleService"}wireBeans(t){this.ctrlsService=t.ctrlsService,this.columnAnimationService=t.columnAnimationService}postConstruct(){this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this)})}onDisplayedColumnsChanged(){this.update()}onDisplayedColumnsWidthChanged(){this.update()}update(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateImpl())}):this.updateImpl()}updateImpl(){let t=this.ctrlsService.get("center");if(!t||this.columnAnimationService.isActive())return;let e={horizontalScrollShowing:t.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(e)}setScrollsVisible(t){(this.horizontalScrollShowing!==t.horizontalScrollShowing||this.verticalScrollShowing!==t.verticalScrollShowing)&&(this.horizontalScrollShowing=t.horizontalScrollShowing,this.verticalScrollShowing=t.verticalScrollShowing,this.eventService.dispatchEvent({type:"scrollVisibilityChanged"}))}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}},MHe="__ag_grid_instance",sWe=class oWe extends Ot{constructor(){super(...arguments),this.beanName="mouseEventService",this.gridInstanceId=oWe.gridInstanceSequence.next()}wireBeans(e){this.ctrlsService=e.ctrlsService}stampTopLevelGridCompWithGridInstance(e){e[MHe]=this.gridInstanceId}getRenderedCellForEvent(e){return BB(this.gos,e.target,dx.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let n=e;for(;n;){let i=n[MHe];if(Di(i))return i===this.gridInstanceId;n=n.parentElement}return!1}getCellPositionForEvent(e){let n=this.getRenderedCellForEvent(e);return n?n.getCellPosition():null}getNormalisedPosition(e){let n=this.gos.isDomLayout("normal"),i=e,r,s;if(i.clientX!=null||i.clientY!=null?(r=i.clientX,s=i.clientY):(r=i.x,s=i.y),n){let o=this.ctrlsService.getGridBodyCtrl(),a=o.getScrollFeature().getVScrollPosition(),l=o.getScrollFeature().getHScrollPosition();r+=l.left,s+=a.top}return{x:r,y:s}}};sWe.gridInstanceSequence=new c1;VWt=sWe,BWt=class extends Ot{constructor(){super(),this.beanName="navigationService",this.onPageDown=_He(this.onPageDown,100),this.onPageUp=_He(this.onPageUp,100)}wireBeans(t){this.mouseEventService=t.mouseEventService,this.pageBoundsService=t.pageBoundsService,this.focusService=t.focusService,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.rowModel=t.rowModel,this.ctrlsService=t.ctrlsService,this.rowRenderer=t.rowRenderer,this.headerNavigationService=t.headerNavigationService,this.rowPositionUtils=t.rowPositionUtils,this.cellNavigationService=t.cellNavigationService,this.pinnedRowModel=t.pinnedRowModel,this.rangeService=t.rangeService}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridBodyCon=t.gridBodyCtrl})}handlePageScrollingKey(t,e=!1){let n=t.key,i=t.altKey,r=t.ctrlKey||t.metaKey,s=!!this.rangeService&&t.shiftKey,o=this.mouseEventService.getCellPositionForEvent(t),a=!1;switch(n){case It.PAGE_HOME:case It.PAGE_END:!r&&!i&&(this.onHomeOrEndKey(n),a=!0);break;case It.LEFT:case It.RIGHT:case It.UP:case It.DOWN:if(!o)return!1;r&&!i&&!s&&(this.onCtrlUpDownLeftRight(n,o),a=!0);break;case It.PAGE_DOWN:case It.PAGE_UP:!r&&!i&&(a=this.handlePageUpDown(n,o,e));break}return a&&t.preventDefault(),a}handlePageUpDown(t,e,n){return n&&(e=this.focusService.getFocusedCell()),e?(t===It.PAGE_UP?this.onPageUp(e):this.onPageDown(e),!0):!1}navigateTo(t){let{scrollIndex:e,scrollType:n,scrollColumn:i,focusIndex:r,focusColumn:s}=t;Di(i)&&!i.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(i),Di(e)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e,n),t.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:s,rowPinned:null,forceBrowserFocus:!0}),this.rangeService?.setRangeToCell({rowIndex:r,rowPinned:null,column:s})}onPageDown(t){let n=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),r=this.pageBoundsService.getPixelOffset(),s=n.top+i,o=this.rowModel.getRowIndexAtPixel(s+r);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(t,o):this.navigateToNextPage(t,o)}onPageUp(t){let n=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.pageBoundsService.getPixelOffset(),r=n.top,s=this.rowModel.getRowIndexAtPixel(r+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(t,s,!0):this.navigateToNextPage(t,s,!0)}navigateToNextPage(t,e,n=!1){let i=this.getViewportHeight(),r=this.pageBoundsService.getFirstRow(),s=this.pageBoundsService.getLastRow(),o=this.pageBoundsService.getPixelOffset(),a=this.rowModel.getRow(t.rowIndex),l=n?a?.rowHeight-i-o:i-o,c=a?.rowTop+l,d=this.rowModel.getRowIndexAtPixel(c+o);if(d===t.rowIndex){let m=n?-1:1;e=d=t.rowIndex+m}let u;n?(u="bottom",d<r&&(d=r),e<r&&(e=r)):(u="top",d>s&&(d=s),e>s&&(e=s)),this.isRowTallerThanView(d)&&(e=d,u="top"),this.navigateTo({scrollIndex:e,scrollType:u,scrollColumn:null,focusIndex:d,focusColumn:t.column})}navigateToNextPageWithAutoHeight(t,e,n=!1){this.navigateTo({scrollIndex:e,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:e,focusColumn:t.column}),setTimeout(()=>{let i=this.getNextFocusIndexForAutoHeight(t,n);this.navigateTo({scrollIndex:e,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:t.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(t,e=!1){let n=e?-1:1,i=this.getViewportHeight(),r=this.pageBoundsService.getLastRow(),s=0,o=t.rowIndex;for(;o>=0&&o<=r;){let a=this.rowModel.getRow(o);if(a){let l=a.rowHeight??0;if(s+l>i)break;s+=l}o+=n}return Math.max(0,Math.min(o,r))}getViewportHeight(){let{gridBodyCtrl:t,center:e}=this.ctrlsService.getParams(),n=t.getScrollFeature().getVScrollPosition(),i=this.gos.getScrollbarWidth(),r=n.bottom-n.top;return e.isHorizontalScrollShowing()&&(r-=i),r}isRowTallerThanView(t){let e=this.rowModel.getRow(t);if(!e)return!1;let n=e.rowHeight;return typeof n!="number"?!1:n>this.getViewportHeight()}onCtrlUpDownLeftRight(t,e){let n=this.cellNavigationService.getNextCellToFocus(t,e,!0),{rowIndex:i}=n,r=n.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:r,focusIndex:i,focusColumn:r})}onHomeOrEndKey(t){let e=t===It.PAGE_HOME,n=this.visibleColsService.getAllCols(),i=e?n[0]:Ar(n),r=e?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow();this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:i,focusIndex:r,focusColumn:i})}onTabKeyDown(t,e){let n=e.shiftKey,i=this.tabToNextCellCommon(t,n,e);if(i!==!1){i?e.preventDefault():i===null&&this.focusService.allowFocusForNextGridCoreContainer(n);return}if(n){let{rowIndex:r,rowPinned:s}=t.getRowPosition();(s?r===0:r===this.pageBoundsService.getFirstRow())&&(this.gos.get("headerHeight")===0||this.focusService.isHeaderFocusSuppressed()?this.focusService.focusNextGridCoreContainer(!0,!0):(e.preventDefault(),this.focusService.focusPreviousFromFirstCell(e)))}else t instanceof dx&&t.focusCell(!0),(!n&&this.focusService.focusOverlay(!1)||this.focusService.focusNextGridCoreContainer(n))&&e.preventDefault()}tabToNextCell(t,e){let n=this.focusService.getFocusedCell();if(!n)return!1;let i=this.getCellByPosition(n);return!i&&(i=this.rowRenderer.getRowByPosition(n),!i||!i.isFullWidth())?!1:!!this.tabToNextCellCommon(i,t,e)}tabToNextCellCommon(t,e,n){let i=t.isEditing();if(!i&&t instanceof dx){let o=t.getRowCtrl();o&&(i=o.isEditing())}let r;return i?this.gos.get("editType")==="fullRow"?r=this.moveToNextEditingRow(t,e,n):r=this.moveToNextEditingCell(t,e,n):r=this.moveToNextCellNotEditing(t,e),r===null?r:r||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(t,e,n=null){let i=t.getCellPosition();t.getGui().focus(),t.stopEditing();let r=this.findNextCellToFocusOn(i,e,!0);return r===!1?null:r==null?!1:(r.startEditing(null,!0,n),r.focusCell(!1),!0)}moveToNextEditingRow(t,e,n=null){let i=t.getCellPosition(),r=this.findNextCellToFocusOn(i,e,!0);if(r===!1)return null;if(r==null)return!1;let s=r.getCellPosition(),o=this.isCellEditable(i),a=this.isCellEditable(s),l=s&&i.rowIndex===s.rowIndex&&i.rowPinned===s.rowPinned;return o&&t.setFocusOutOnEditor(),l||(t.getRowCtrl().stopEditing(),r.getRowCtrl().startRowEditing(void 0,void 0,n)),a?(r.setFocusInOnEditor(),r.focusCell()):r.focusCell(!0),!0}moveToNextCellNotEditing(t,e){let n=this.visibleColsService.getAllCols(),i;t instanceof hD?i=St(ve({},t.getRowPosition()),{column:e?n[0]:Ar(n)}):i=t.getCellPosition();let r=this.findNextCellToFocusOn(i,e,!1);if(r===!1)return null;if(r instanceof dx)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r.getRowPosition(),e);return Di(r)}findNextCellToFocusOn(t,e,n){let i=t;for(;;){t!==i&&(t=i),e||(i=this.getLastCellOfColSpan(i)),i=this.cellNavigationService.getNextTabbedCell(i,e);let r=this.gos.getCallback("tabToNextCell");if(Di(r)){let l=r({backwards:e,editing:n,previousCellPosition:t,nextCellPosition:i||null});if(l===!0||l===null)l===null&&wt("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),i=t;else{if(l===!1)return!1;i={rowIndex:l.rowIndex,column:l.column,rowPinned:l.rowPinned}}}if(!i)return null;if(i.rowIndex<0){let a=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+i.rowIndex,column:i.column},fromCell:!0}),null}let s=this.gos.get("editType")==="fullRow";if(n&&!s&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);let o=this.getCellByPosition(i);if(!o){let a=this.rowRenderer.getRowByPosition(i);if(!a||!a.isFullWidth()||n)continue;return a}if(!o.isSuppressNavigable())return this.rangeService?.setRangeToCell(i),o}}isCellEditable(t){let e=this.lookupRowNodeForCell(t);return e?t.column.isCellEditable(e):!1}getCellByPosition(t){let e=this.rowRenderer.getRowByPosition(t);return e?e.getCellCtrl(t.column):null}lookupRowNodeForCell(t){return t.rowPinned==="top"?this.pinnedRowModel.getPinnedTopRow(t.rowIndex):t.rowPinned==="bottom"?this.pinnedRowModel.getPinnedBottomRow(t.rowIndex):this.rowModel.getRow(t.rowIndex)}navigateToNextCell(t,e,n,i){let r=n,s=!1;for(;r&&(r===n||!this.isValidNavigateCell(r));)this.gos.get("enableRtl")?e===It.LEFT&&(r=this.getLastCellOfColSpan(r)):e===It.RIGHT&&(r=this.getLastCellOfColSpan(r)),r=this.cellNavigationService.getNextCellToFocus(e,r),s=Ls(r);if(s&&t&&t.key===It.UP&&(r={rowIndex:-1,rowPinned:null,column:n.column}),i){let a=this.gos.getCallback("navigateToNextCell");if(Di(a)){let c=a({key:e,previousCellPosition:n,nextCellPosition:r||null,event:t});Di(c)?r={rowPinned:c.rowPinned,rowIndex:c.rowIndex,column:c.column}:r=null}}if(!r)return;if(r.rowIndex<0){let a=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+r.rowIndex,column:n.column},event:t||void 0,fromCell:!0});return}let o=this.getNormalisedPosition(r);o?this.focusPosition(o):this.tryToFocusFullWidthRow(r)}getNormalisedPosition(t){this.ensureCellVisible(t);let e=this.getCellByPosition(t);return e?(t=e.getCellPosition(),this.ensureCellVisible(t),t):null}tryToFocusFullWidthRow(t,e=!1){let n=this.visibleColsService.getAllCols(),i=this.rowRenderer.getRowByPosition(t);if(!i||!i.isFullWidth())return!1;let r=this.focusService.getFocusedCell(),s={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column||(e?Ar(n):n[0])};this.focusPosition(s);let o=r!=null?this.rowPositionUtils.before(s,r):!1;return this.eventService.dispatchEvent({type:"fullWidthRowFocused",rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:s.column,isFullWidthCell:!0,fromBelow:o}),!0}focusPosition(t){this.focusService.setFocusedCell({rowIndex:t.rowIndex,column:t.column,rowPinned:t.rowPinned,forceBrowserFocus:!0}),this.rangeService?.setRangeToCell(t)}isValidNavigateCell(t){return!!this.rowPositionUtils.getRowNode(t)}getLastCellOfColSpan(t){let e=this.getCellByPosition(t);if(!e)return t;let n=e.getColSpanningList();return n.length===1?t:{rowIndex:t.rowIndex,column:Ar(n),rowPinned:t.rowPinned}}ensureCellVisible(t){let e=this.gos.isGroupRowsSticky(),n=this.rowModel.getRow(t.rowIndex);!(e&&n?.sticky)&&Ls(t.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t.rowIndex),t.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(t.column)}},zWt=class extends Ot{constructor(){super(...arguments),this.beanName="horizontalResizeService"}wireBeans(t){this.dragService=t.dragService,this.ctrlsService=t.ctrlsService}addResizeBar(t){let e={dragStartPixels:t.dragStartPixels||0,eElement:t.eResizeBar,onDragStart:this.onDragStart.bind(this,t),onDragStop:this.onDragStop.bind(this,t),onDragging:this.onDragging.bind(this,t),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(e),()=>this.dragService.removeDragSource(e)}onDragStart(t,e){this.dragStartX=e.clientX,this.setResizeIcons();let n=e instanceof MouseEvent&&e.shiftKey===!0;t.onResizeStart(n)}setResizeIcons(){let t=this.ctrlsService.get("gridCtrl");t.setResizeCursor(!0),t.disableUserSelect(!0)}onDragStop(t,e){t.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let t=this.ctrlsService.get("gridCtrl");t.setResizeCursor(!1),t.disableUserSelect(!1)}onDragging(t,e){this.resizeAmount=e.clientX-this.dragStartX,t.onResizing(this.resizeAmount)}},HWt=class extends Ot{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(t){this.popupService=t.popupService,this.focusService=t.focusService,this.ctrlsService=t.ctrlsService,this.menuService=t.menuService}hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(t,e,n){this.showPopup(t,i=>{this.popupService.positionPopupUnderMouseEvent({column:t,type:n,mouseEvent:e,ePopup:i})},n,e.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(t,e,n){let i=-1,r="left",s=this.menuService.isLegacyMenuEnabled();!s&&this.gos.get("enableRtl")&&(i=1,r="right");let o=s?void 0:4*i,a=s?void 0:4;this.showPopup(t,l=>{this.popupService.positionPopupByComponent({type:n,eventSource:e,ePopup:l,nudgeX:o,nudgeY:a,alignSide:r,keepWithinBounds:!0,position:"under",column:t})},n,e,s)}showPopup(t,e,n,i,r){let s=t?this.createBean(new CD(t,"COLUMN_MENU")):void 0;if(this.activeMenu=s,!s?.hasFilter()||!t)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");let o=document.createElement("div");dd(o,"presentation"),o.classList.add("ag-menu"),r||o.classList.add("ag-filter-menu"),[this.tabListener]=this.addManagedElementListeners(o,{keydown:_=>this.trapFocusWithin(_,o)}),o.appendChild(s?.getGui());let a,l=()=>s?.afterGuiDetached(),c=this.menuService.isColumnMenuAnchoringEnabled()?i??this.ctrlsService.getGridBodyCtrl().getGui():void 0,d=_=>{t.setMenuVisible(!1,"contextMenu");let x=_ instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),x&&i&&l1(i)){let D=this.focusService.findTabbableParent(i);D&&D.focus()}l(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,t)},u=this.localeService.getLocaleTextFunc(),m=r&&n!=="columnFilter"?u("ariaLabelColumnMenu","Column Menu"):u("ariaLabelColumnFilter","Column Filter"),f=this.popupService.addPopup({modal:!0,eChild:o,closeOnEsc:!0,closedCallback:d,positionCallback:()=>e(o),anchorToElement:c,ariaLabel:m});f&&(this.hidePopup=a=f.hideFunc),s.afterInit().then(()=>{e(o),s.afterGuiAttached({container:n,hidePopup:a})}),t.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,n,t)}trapFocusWithin(t,e){t.key!==It.TAB||t.defaultPrevented||this.focusService.findNextFocusableElement(e,!1,t.shiftKey)||(t.preventDefault(),this.focusService.focusInto(e,t.shiftKey))}dispatchVisibleChangedEvent(t,e,n){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:t,switchingTab:!1,key:e,column:n??null})}isMenuEnabled(t){return t.isFilterAllowed()&&(t.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},GWt=50,WWt=class extends Ot{constructor(){super(...arguments),this.beanName="resizeObserverService",this.polyfillFunctions=[]}observeResize(t,e){let n=this.gos.getWindow(),i=()=>{let a=new n.ResizeObserver(e);return a.observe(t),()=>a.disconnect()},r=()=>{let a=t?.clientWidth??0,l=t?.clientHeight??0,c=!0,d=()=>{if(c){let u=t?.clientWidth??0,m=t?.clientHeight??0;(u!==a||m!==l)&&(a=u,l=m,e()),this.doNextPolyfillTurn(d)}};return d(),()=>c=!1},s=this.gos.get("suppressBrowserResizeObserver");return!!n.ResizeObserver&&!s?i():this.getFrameworkOverrides().wrapIncoming(()=>r(),"resize-observer")}doNextPolyfillTurn(t){this.polyfillFunctions.push(t),this.schedulePolyfill()}schedulePolyfill(){if(this.polyfillScheduled)return;let t=()=>{let e=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],e.forEach(n=>n())};this.polyfillScheduled=!0,window.setTimeout(t,GWt)}},UWt=class extends Ot{constructor(){super(...arguments),this.beanName="animationFrameService",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}wireBeans(t){this.ctrlsService=t.ctrlsService,this.paginationService=t.paginationService}setScrollTop(t){let e=this.gos.get("pagination");if(this.scrollGoingDown=t>=this.lastScrollTop,e&&t===0){let n=this.paginationService?.getCurrentPage()??0;n!==this.lastPage&&(this.lastPage=n,this.scrollGoingDown=!0)}this.lastScrollTop=t}postConstruct(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(t){this.useAnimationFrame===!1&&wt(`AnimationFrameService.${t} called but animation frames are off`)}createTask(t,e,n){this.verifyAnimationFrameOn(n);let i={task:t,index:e,createOrder:++this.taskCount};this.addTaskToList(this[n],i),this.schedule()}cancelTask(t){this.cancelledTasks.add(t)}addTaskToList(t,e){t.list.push(e),t.sorted=!1}sortTaskList(t){if(t.sorted)return;let e=this.scrollGoingDown?1:-1;t.list.sort((n,i)=>n.index!==i.index?e*(i.index-n.index):i.createOrder-n.createOrder),t.sorted=!0}addDestroyTask(t){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(t),this.schedule()}executeFrame(t){this.verifyAnimationFrameOn("executeFrame");let e=this.createTasksP1,n=e.list,i=this.createTasksP2,r=i.list,s=this.destroyTasks,o=new Date().getTime(),a=new Date().getTime()-o,l=t<=0,c=this.ctrlsService.getGridBodyCtrl();for(;l||a<t;){if(!c.getScrollFeature().scrollGridIfNeeded()){let u;if(n.length)this.sortTaskList(e),u=n.pop().task;else if(r.length)this.sortTaskList(i),u=r.pop().task;else if(s.length)u=s.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(u)||u()}a=new Date().getTime()-o}n.length||r.length||s.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(){let t=this.executeFrame.bind(this,60);this.requestAnimationFrame(t)}requestAnimationFrame(t){let e=this.gos.getWindow();e.requestAnimationFrame?e.requestAnimationFrame(t):e.webkitRequestAnimationFrame?e.webkitRequestAnimationFrame(t):e.setTimeout(t,0)}isQueueEmpty(){return!this.ticking}debounce(t){let e=!1;return()=>{if(!this.isOn()){window.setTimeout(t,0);return}e||(e=!0,this.addDestroyTask(()=>{e=!1,t()}))}}},l4e=class extends Ot{constructor(){super(...arguments),this.beanName="expansionService"}wireBeans(t){this.rowModel=t.rowModel}postConstruct(){this.isClientSideRowModel=this.rowModel.getType()==="clientSide"}expandRows(t){if(!this.isClientSideRowModel)return;let e=new Set(t);this.rowModel.forEachNode(n=>{n.id&&e.has(n.id)&&(n.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){let t=[];return this.rowModel.forEachNode(({expanded:e,id:n})=>{e&&n&&t.push(n)}),t}expandAll(t){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(t)}setRowNodeExpanded(t,e,n,i){t&&(n&&t.parent&&t.parent.level!==-1&&this.setRowNodeExpanded(t.parent,e,n,i),t.setExpanded(e,void 0,i))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}},jWt=class extends Ot{constructor(){super(...arguments),this.beanName="menuService"}wireBeans(t){this.filterMenuFactory=t.filterMenuFactory,this.ctrlsService=t.ctrlsService,this.animationFrameService=t.animationFrameService,this.filterManager=t.filterManager,this.rowRenderer=t.rowRenderer,this.columnChooserFactory=t.columnChooserFactory,this.contextMenuFactory=t.contextMenuFactory,this.enterpriseMenuFactory=t.enterpriseMenuFactory}postConstruct(){this.activeMenuFactory=this.enterpriseMenuFactory??this.filterMenuFactory}showColumnMenu(t){this.showColumnMenuCommon(this.activeMenuFactory,t,"columnMenu")}showFilterMenu(t){let e=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(e,t,t.containerType,!0)}showHeaderContextMenu(t,e,n){this.activeMenuFactory.showMenuAfterContextMenuEvent(t,e,n)}getContextMenuPosition(t,e){let n=this.getRowCtrl(t),i=this.getCellGui(n,e);if(!i)return n?{x:0,y:n.getRowYPosition()}:{x:0,y:0};let r=i.getBoundingClientRect();return{x:r.x+r.width/2,y:r.y+r.height/2}}showContextMenu(t){let{rowNode:e}=t,n=t.column,{anchorToElement:i,value:r}=t;e&&n&&r==null&&(r=e.getValueFromValueService(n)),i==null&&(i=this.getContextMenuAnchorElement(e,n)),this.contextMenuFactory?.onContextMenu(t.mouseEvent??null,t.touchEvent??null,e??null,n??null,r,i)}showColumnChooser(t){this.columnChooserFactory?.showColumnChooser(t)}hidePopupMenu(){this.contextMenuFactory?.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){this.columnChooserFactory?.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(t){let{suppressMenu:e,suppressHeaderMenuButton:n}=t.getColDef();return!(n??e)&&this.activeMenuFactory.isMenuEnabled(t)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(t){return!t.getColDef().suppressHeaderFilterButton&&!!this.filterManager?.isFilterAllowed(t)}isHeaderContextMenuEnabled(t){return!t?.getColDef().suppressHeaderContextMenu&&this.getColumnMenuType()==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let t=!this.isSuppressMenuHide();return!(x5()&&t)}isHeaderFilterButtonEnabled(t){return this.isFilterMenuInHeaderEnabled(t)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(t)}isFilterMenuItemEnabled(t){return!!this.filterManager?.isFilterAllowed(t)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(t)&&!this.isFloatingFilterButtonDisplayed(t)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return this.getColumnMenuType()==="new"}isLegacyMenuEnabled(){return this.getColumnMenuType()==="legacy"}isFloatingFilterButtonEnabled(t){let e=t.getColDef(),n=e.floatingFilterComponentParams?.suppressFilterButton;return n!=null&&wt("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),e.suppressFloatingFilterButton==null?!n:!e.suppressFloatingFilterButton}getColumnMenuType(){return this.gos.get("columnMenu")}isFloatingFilterButtonDisplayed(t){return!!t.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(t)}isSuppressMenuHide(){let t=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()?this.gos.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(t,e,n,i){let{positionBy:r}=e,s=e.column;if(r==="button"){let{buttonElement:o}=e;t.showMenuAfterButtonClick(s,o,n,i)}else if(r==="mouse"){let{mouseEvent:o}=e;t.showMenuAfterMouseEvent(s,o,n,i)}else s&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(s,"auto"),this.animationFrameService.requestAnimationFrame(()=>{let o=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned())?.getHeaderCtrlForColumn(s);o&&t.showMenuAfterButtonClick(s,o.getAnchorElementForMenu(i),n,!0)}))}getRowCtrl(t){let{rowIndex:e,rowPinned:n}=t||{};if(e!=null)return this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:n})||void 0}getCellGui(t,e){return!t||!e?void 0:t.getCellCtrl(e)?.getGui()||void 0}getContextMenuAnchorElement(t,e){let n=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),i=this.getRowCtrl(t);if(!i)return n;let r=this.getCellGui(i,e);return r||(i.isFullWidth()?i.getFullWidthElement():n)}},$Wt=class extends lx{constructor(t){super(t,"ag-text-area",null,"textarea")}setValue(t,e){let n=super.setValue(t,e);return this.eInput.value=t,n}setCols(t){return this.eInput.cols=t,this}setRows(t){return this.eInput.rows=t,this}},KWt={selector:"AG-INPUT-TEXT-AREA",component:$Wt},YWt=class extends w5{constructor(){super(`<div class="ag-large-text">
        <ag-input-text-area data-ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
        </div>`,[KWt]),this.eTextArea=Bt}init(t){this.params=t,this.focusAfterAttached=t.cellStartedEdit,this.eTextArea.setMaxLength(t.maxLength||200).setCols(t.cols||60).setRows(t.rows||10),Di(t.value,!0)&&this.eTextArea.setValue(t.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(t){let e=t.key;(e===It.LEFT||e===It.UP||e===It.RIGHT||e===It.DOWN||t.shiftKey&&e===It.ENTER)&&t.stopPropagation()}afterGuiAttached(){let t=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(t("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){let t=this.eTextArea.getValue();return!Di(t)&&!Di(this.params.value)?this.params.value:this.params.parseValue(t)}},qWt=class extends w5{constructor(t){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=t}postConstruct(){this.gos.setDomData(this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let t=this.getGui(),e=this.params,n=i=>{D3e(this.gos,i,e.node,e.column,!0)||e.onKeyDown(i)};this.addManagedElementListeners(t,{keydown:n})}},ZWt=class extends w5{constructor(){super(`<div class="ag-cell-edit-wrapper">
                <ag-select class="ag-cell-editor" data-ref="eSelect"></ag-select>
            </div>`,[hx]),this.eSelect=Bt,this.startedByEnter=!1}wireBeans(t){this.valueService=t.valueService}init(t){this.focusAfterAttached=t.cellStartedEdit;let{eSelect:e,valueService:n,gos:i}=this,{values:r,value:s,eventKey:o}=t;if(Ls(r)){wt("no values found for select cellEditor");return}this.startedByEnter=o!=null?o===It.ENTER:!1;let a=!1;r.forEach(u=>{let m={value:u},f=n.formatValue(t.column,null,u),_=f!=null;m.text=_?f:u,e.addOption(m),a=a||s===u}),a?e.setValue(t.value,!0):t.values.length&&e.setValue(t.values[0],!0);let{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=t;l!=null&&e.setPickerGap(l),d!=null&&e.setPickerMaxHeight(d),c!=null&&e.setPickerMaxWidth(c),i.get("editType")!=="fullRow"&&this.addManagedListeners(this.eSelect,{selectedItem:()=>t.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}},qZ=class extends w5{constructor(t){super(`
            <div class="ag-cell-edit-wrapper">
                ${t.getTemplate()}
            </div>`,t.getAgComponents()),this.cellEditorInput=t,this.eInput=Bt}init(t){this.params=t;let e=this.eInput;this.cellEditorInput.init(e,t);let n;if(t.cellStartedEdit){this.focusAfterAttached=!0;let i=t.eventKey;i===It.BACKSPACE||t.eventKey===It.DELETE?n="":i&&i.length===1?n=i:(n=this.cellEditorInput.getStartValue(),i!==It.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,n=this.cellEditorInput.getStartValue();n!=null&&e.setStartValue(n),this.addManagedElementListeners(e.getGui(),{keydown:i=>{let{key:r}=i;(r===It.PAGE_UP||r===It.PAGE_DOWN)&&i.preventDefault()}})}afterGuiAttached(){let t=this.localeService.getLocaleTextFunc(),e=this.eInput;if(e.setInputAriaLabel(t("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;g5()||e.getFocusableElement().focus();let n=e.getInputElement();this.highlightAllOnFocus?n.select():this.cellEditorInput.setCaret?.()}focusIn(){let t=this.eInput,e=t.getFocusableElement(),n=t.getInputElement();e.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}},XWt=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" data-ref="eInput"></ag-input-text-field>'}getAgComponents(){return[xf]}init(t,e){this.eInput=t,this.params=e,e.maxLength!=null&&t.setMaxLength(e.maxLength)}getValue(){let t=this.eInput.getValue();return!Di(t)&&!Di(this.params.value)?this.params.value:this.params.parseValue(t)}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){let t=this.eInput.getValue(),e=Di(t)&&t.length||0;e&&this.eInput.getInputElement().setSelectionRange(e,e)}},aWe=class extends qZ{constructor(){super(new XWt)}},QWt=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" data-ref="eInput"></ag-input-number-field>'}getAgComponents(){return[bD]}init(t,e){this.eInput=t,this.params=e,e.max!=null&&t.setMax(e.max),e.min!=null&&t.setMin(e.min),e.precision!=null&&t.setPrecision(e.precision),e.step!=null&&t.setStep(e.step);let n=t.getInputElement();e.preventStepping?t.addManagedElementListeners(n,{keydown:this.preventStepping}):e.showStepperButtons&&n.classList.add("ag-number-field-input-stepper")}preventStepping(t){(t.key===It.UP||t.key===It.DOWN)&&t.preventDefault()}getValue(){let t=this.eInput.getValue();if(!Di(t)&&!Di(this.params.value))return this.params.value;let e=this.params.parseValue(t);if(e==null)return e;if(typeof e=="string"){if(e==="")return null;e=Number(e)}return isNaN(e)?null:e}getStartValue(){return this.params.value}setCaret(){g5()&&this.eInput.getInputElement().focus({preventScroll:!0})}},JWt=class extends qZ{constructor(){super(new QWt)}},c4e=class extends yg{constructor(t){super(t,"ag-date-field","date")}postConstruct(){super.postConstruct();let t=g5();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||t||this.eInput.focus()}}),this.eInput.step="any"}onWheel(t){this.gos.getActiveDomElement()===this.eInput&&t.preventDefault()}setMin(t){let e=t instanceof Date?vg(t??null,!1)??void 0:t;return this.min===e?this:(this.min=e,qv(this.eInput,"min",e),this)}setMax(t){let e=t instanceof Date?vg(t??null,!1)??void 0:t;return this.max===e?this:(this.max=e,qv(this.eInput,"max",e),this)}setStep(t){return this.step===t?this:(this.step=t,qv(this.eInput,"step",t),this)}getDate(){if(this.eInput.validity.valid)return A0(this.getValue())??void 0}setDate(t,e){this.setValue(vg(t??null,!1),e)}},lWe={selector:"AG-INPUT-DATE-FIELD",component:c4e},eUt=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[lWe]}init(t,e){this.eInput=t,this.params=e,e.min!=null&&t.setMin(e.min),e.max!=null&&t.setMax(e.max),e.step!=null&&t.setStep(e.step)}getValue(){let t=this.eInput.getDate();return!Di(t)&&!Di(this.params.value)?this.params.value:t??null}getStartValue(){let{value:t}=this.params;if(t instanceof Date)return vg(t,!1)}},tUt=class extends qZ{constructor(){super(new eUt)}},iUt=class{constructor(t){this.getDataTypeService=t}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" data-ref="eInput"></ag-input-date-field>'}getAgComponents(){return[lWe]}init(t,e){this.eInput=t,this.params=e,e.min!=null&&t.setMin(e.min),e.max!=null&&t.setMax(e.max),e.step!=null&&t.setStep(e.step)}getValue(){let t=this.formatDate(this.eInput.getDate());return!Di(t)&&!Di(this.params.value)?this.params.value:this.params.parseValue(t??"")}getStartValue(){return vg(this.parseDate(this.params.value??void 0)??null,!1)}parseDate(t){let e=this.getDataTypeService();return e?e.getDateParserFunction(this.params.column)(t):A0(t)??void 0}formatDate(t){let e=this.getDataTypeService();return e?e.getDateFormatterFunction(this.params.column)(t):vg(t??null,!1)??void 0}},nUt=class extends qZ{wireBeans(t){this.dataTypeService=t.dataTypeService}constructor(){super(new iUt(()=>this.dataTypeService))}},rUt=class extends w5{constructor(){super(`
            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
                <ag-checkbox role="presentation" data-ref="eCheckbox"></ag-checkbox>
            </div>`,[d1]),this.eCheckbox=Bt}init(t){this.params=t;let e=t.value??void 0;this.eCheckbox.setValue(e),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(e),this.addManagedListeners(this.eCheckbox,{fieldValueChanged:i=>this.setAriaLabel(i.selected)})}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(t){let e=this.localeService.getLocaleTextFunc(),n=H3e(e,t),i=e("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${i} (${n})`)}},FB=class{constructor(t){this.cellValueChanges=t}},m3e=class extends FB{constructor(t,e,n,i){super(t),this.initialRange=e,this.finalRange=n,this.ranges=i}},sUt=10,kHe=class{constructor(t){this.actionStack=[],this.maxStackSize=t||sUt,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(t){t.cellValueChanges&&t.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(t))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},oUt=class extends Ot{constructor(){super(...arguments),this.beanName="undoRedoService",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=t=>{let e={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned},n=this.activeCellEdit!==null&&this.cellPositionUtils.equals(this.activeCellEdit,e),i=this.activeRowEdit!==null&&this.rowPositionUtils.sameRow(this.activeRowEdit,e);if(!(n||i||this.isPasting||this.isRangeInAction))return;let{rowPinned:s,rowIndex:o,column:a,oldValue:l,value:c}=t,d={rowPinned:s,rowIndex:o,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}wireBeans(t){this.focusService=t.focusService,this.ctrlsService=t.ctrlsService,this.cellPositionUtils=t.cellPositionUtils,this.rowPositionUtils=t.rowPositionUtils,this.columnModel=t.columnModel,this.rangeService=t.rangeService}postConstruct(){if(!this.gos.get("undoRedoCellEditing"))return;let t=this.gos.get("undoRedoCellEditingLimit");if(t<=0)return;this.undoStack=new kHe(t),this.redoStack=new kHe(t),this.addListeners();let e=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:n=>{n.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:e,newColumnsLoaded:e,columnGroupOpened:e,columnRowGroupChanged:e,columnMoved:e,columnPinned:e,columnVisible:e,rowDragEnd:e}),this.ctrlsService.whenReady(n=>{this.gridBodyCtrl=n.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(t){this.eventService.dispatchEvent({type:"undoStarted",source:t});let e=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo");this.eventService.dispatchEvent({type:"undoEnded",source:t,operationPerformed:e})}redo(t){this.eventService.dispatchEvent({type:"redoStarted",source:t});let e=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo");this.eventService.dispatchEvent({type:"redoEnded",source:t,operationPerformed:e})}undoRedo(t,e,n,i,r){if(!t)return!1;let s=t.pop();return!s||!s.cellValueChanges?!1:(this.processAction(s,o=>o[i],r),s instanceof m3e?this.processRange(this.rangeService,s.ranges||[s[n]]):this.processCell(s.cellValueChanges),e.push(s),!0)}processAction(t,e,n){t.cellValueChanges.forEach(i=>{let{rowIndex:r,rowPinned:s,columnId:o}=i,a={rowIndex:r,rowPinned:s},l=this.rowPositionUtils.getRowNode(a);l.displayed&&l.setDataValue(o,e(i),n)})}processRange(t,e){let n;t.removeAllCellRanges(!0),e.forEach((i,r)=>{if(!i)return;let s=i.startRow,o=i.endRow;r===e.length-1&&(n={rowPinned:s.rowPinned,rowIndex:s.rowIndex,columnId:i.startColumn.getColId()},this.setLastFocusedCell(n));let a={rowStartIndex:s.rowIndex,rowStartPinned:s.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:i.startColumn,columns:i.columns};t.addCellRange(a)})}processCell(t){let e=t[0],{rowIndex:n,rowPinned:i}=e,r={rowIndex:n,rowPinned:i},s=this.rowPositionUtils.getRowNode(r),o={rowPinned:e.rowPinned,rowIndex:s.rowIndex,columnId:e.columnId};this.setLastFocusedCell(o,this.rangeService)}setLastFocusedCell(t,e){let{rowIndex:n,columnId:i,rowPinned:r}=t,s=this.gridBodyCtrl.getScrollFeature(),o=this.columnModel.getCol(i);if(!o)return;s.ensureIndexVisible(n),s.ensureColumnVisible(o);let a={rowIndex:n,column:o,rowPinned:r};this.focusService.setFocusedCell(St(ve({},a),{forceBrowserFocus:!0})),e?.setRangeToCell(a)}addListeners(){this.addManagedEventListeners({rowEditingStarted:t=>{this.activeRowEdit={rowIndex:t.rowIndex,rowPinned:t.rowPinned}},rowEditingStopped:()=>{let t=new FB(this.cellValueChanges);this.pushActionsToUndoStack(t),this.activeRowEdit=null},cellEditingStarted:t=>{this.activeCellEdit={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned}},cellEditingStopped:t=>{if(this.activeCellEdit=null,t.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){let n=new FB(this.cellValueChanges);this.pushActionsToUndoStack(n)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let t=new FB(this.cellValueChanges);this.pushActionsToUndoStack(t),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:t=>{let e=new m3e(this.cellValueChanges,t.initialRange,t.finalRange);this.pushActionsToUndoStack(e),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let t;this.rangeService&&this.gos.get("enableRangeSelection")?t=new m3e(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):t=new FB(this.cellValueChanges),this.pushActionsToUndoStack(t),this.isRangeInAction=!1}})}pushActionsToUndoStack(t){this.undoStack.push(t),this.cellValueChanges=[],this.redoStack.clear()}};yUt=class extends Ot{constructor(){super(...arguments),this.beanName="editService"}wireBeans(t){this.navigationService=t.navigationService,this.userComponentFactory=t.userComponentFactory,this.valueService=t.valueService}startEditing(t,e=null,n=!1,i=null){let r=this.createCellEditorParams(t,e,n),s=t.getColumn().getColDef(),o=this.userComponentFactory.getCellEditorDetails(s,r),a=o?.popupFromSelector!=null?o.popupFromSelector:!!s.cellEditorPopup,l=o?.popupPositionFromSelector!=null?o.popupPositionFromSelector:s.cellEditorPopupPosition;t.setEditing(!0,o),t.getComp().setEditDetails(o,a,l,this.gos.get("reactiveCustomComponents")),this.eventService.dispatchEvent(t.createEvent(i,"cellEditingStarted"))}stopEditing(t,e){let n=t.getComp(),{newValue:i,newValueExists:r}=this.takeValueFromCellEditor(e,n),s=t.getRowNode(),o=t.getColumn(),a=s.getValueFromValueService(o),l=!1;return r&&(l=this.saveNewValue(t,a,i,s,o)),t.setEditing(!1,void 0),n.setEditDetails(),t.updateAndFormatValue(!1),t.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.eventService.dispatchEvent(St(ve({},t.createEvent(null,"cellEditingStopped")),{oldValue:a,newValue:i,valueChanged:l})),l}handleColDefChanged(t){let e=t.getCellEditor();if(e?.refresh){let{eventKey:n,cellStartedEdit:i}=t.getEditCompDetails().params,r=this.createCellEditorParams(t,n,i),s=t.getColumn().getColDef(),o=this.userComponentFactory.getCellEditorDetails(s,r);e.refresh(o.params)}}setFocusOutOnEditor(t){let e=t.getComp().getCellEditor();e&&e.focusOut&&e.focusOut()}setFocusInOnEditor(t){let e=t.getComp().getCellEditor();e&&e.focusIn?e.focusIn():t.focusCell(!0)}stopEditingAndFocus(t,e=!1,n=!1){t.stopRowOrCellEdit(),t.focusCell(!0),e||this.navigateAfterEdit(n,t.getCellPosition())}createPopupEditorWrapper(t){return new qWt(t)}takeValueFromCellEditor(t,e){let n={newValueExists:!1};if(t)return n;let i=e.getCellEditor();return!i||i.isCancelAfterEnd&&i.isCancelAfterEnd()?n:{newValue:i.getValue(),newValueExists:!0}}saveNewValue(t,e,n,i,r){if(n===e)return!1;t.setSuppressRefreshCell(!0);let s=i.setDataValue(r,n,"edit");return t.setSuppressRefreshCell(!1),s}createCellEditorParams(t,e,n){let i=t.getColumn(),r=t.getRowNode();return this.gos.addGridCommonParams({value:r.getValueFromValueService(i),eventKey:e,column:i,colDef:i.getColDef(),rowIndex:t.getCellPosition().rowIndex,node:r,data:r.data,cellStartedEdit:n,onKeyDown:t.onKeyDown.bind(t),stopEditing:t.stopEditingAndFocus.bind(t),eGridCell:t.getGui(),parseValue:s=>this.valueService.parseValue(i,r,s,t.getValue()),formatValue:t.formatValue.bind(t)})}navigateAfterEdit(t,e){if(this.gos.get("enterNavigatesVerticallyAfterEdit")){let i=t?It.UP:It.DOWN;this.navigationService.navigateToNextCell(null,i,e,!1)}}},_Ut=class extends Ot{constructor(){super(...arguments),this.beanName="rowEditService"}startEditing(t,e=null,n=null,i=null){t.getAllCellCtrls().reduce((s,o)=>{let a=o===n;return a?o.startEditing(e,a,i):o.startEditing(null,a,i),s?!0:o.isEditing()},!1)&&this.setEditing(t,!0)}stopEditing(t,e=!1){let n=t.getAllCellCtrls(),i=t.isEditing();t.setStoppingRowEdit(!0);let r=!1;for(let s of n){let o=s.stopEditing(e);i&&!e&&!r&&o&&(r=!0)}r&&this.eventService.dispatchEvent(t.createRowEvent("rowValueChanged")),i&&this.setEditing(t,!1),t.setStoppingRowEdit(!1)}setEditing(t,e){t.setEditingRow(e),t.forEachGui(void 0,i=>i.rowComp.addOrRemoveCssClass("ag-row-editing",e));let n=e?t.createRowEvent("rowEditingStarted"):t.createRowEvent("rowEditingStopped");this.eventService.dispatchEvent(n)}},mx={version:ta,moduleName:"@ag-grid-community/edit-core",beans:[yUt]},CUt={version:ta,moduleName:"@ag-grid-community/edit-api",apiFunctions:{undoCellEditing:dUt,redoCellEditing:uUt,getCellEditorInstances:hUt,getEditingCells:pUt,stopEditing:mUt,startEditingCell:fUt,getCurrentUndoSize:gUt,getCurrentRedoSize:vUt},dependantModules:[mx]},xUt={version:ta,moduleName:"@ag-grid-community/undo-redo-edit",beans:[oUt],dependantModules:[mx]},bUt={version:ta,moduleName:"@ag-grid-community/full-row-edit",beans:[_Ut],dependantModules:[mx]},uWe={version:ta,moduleName:"@ag-grid-community/default-editor",userComponents:[{name:"agCellEditor",classImp:aWe}],dependantModules:[mx]},wUt={version:ta,moduleName:"@ag-grid-community/data-type-editors",userComponents:[{name:"agTextCellEditor",classImp:aWe},{name:"agNumberCellEditor",classImp:JWt},{name:"agDateCellEditor",classImp:tUt},{name:"agDateStringCellEditor",classImp:nUt},{name:"agCheckboxCellEditor",classImp:rUt}],dependantModules:[uWe]},SUt={version:ta,moduleName:"@ag-grid-community/select-editor",userComponents:[{name:"agSelectCellEditor",classImp:ZWt}],dependantModules:[mx]},TUt={version:ta,moduleName:"@ag-grid-community/large-text-editor",userComponents:[{name:"agLargeTextCellEditor",classImp:YWt}],dependantModules:[mx]},DUt={version:ta,moduleName:"@ag-grid-community/all-editors",dependantModules:[uWe,wUt,SUt,TUt]},EUt={version:ta,moduleName:"@ag-grid-community/editing",dependantModules:[mx,xUt,bUt,DUt,CUt]},MUt=class extends Ot{constructor(){super(...arguments),this.beanName="autoWidthCalculator"}wireBeans(t){this.rowRenderer=t.rowRenderer,this.ctrlsService=t.ctrlsService}postConstruct(){this.ctrlsService.whenReady(t=>{this.centerRowContainerCtrl=t.center})}getPreferredWidthForColumn(t,e){let n=this.getHeaderCellForColumn(t);if(!n)return-1;let i=this.rowRenderer.getAllCellsForColumn(t);return e||i.push(n),this.addElementsToContainerAndGetWidth(i)}getPreferredWidthForColumnGroup(t){let e=this.getHeaderCellForColumn(t);return e?this.addElementsToContainerAndGetWidth([e]):-1}addElementsToContainerAndGetWidth(t){let e=document.createElement("form");e.style.position="fixed";let n=this.centerRowContainerCtrl.getContainerElement();t.forEach(s=>this.cloneItemIntoDummy(s,e)),n.appendChild(e);let i=e.offsetWidth;n.removeChild(e);let r=this.getAutoSizePadding();return i+r}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(t){let e=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(n=>{let i=n.getHtmlElementForColumnHeader(t);i!=null&&(e=i)}),e}cloneItemIntoDummy(t,e){let n=t.cloneNode(!0);n.style.width="",n.style.position="static",n.style.left="";let i=document.createElement("div"),r=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>n.classList.contains(a))?(r.add("ag-header","ag-header-row"),i.style.position="static"):r.add("ag-row");let o=t.parentElement;for(;o;){if(["ag-header-row","ag-row"].some(l=>o.classList.contains(l))){for(let l=0;l<o.classList.length;l++){let c=o.classList[l];c!="ag-row-position-absolute"&&r.add(c)}break}o=o.parentElement}i.appendChild(n),e.appendChild(i)}},kUt=class extends Ot{constructor(t,e){super(),this.createRowCon=t,this.destroyRowCtrls=e,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.topContainerHeight=0,this.bottomContainerHeight=0,this.extraTopHeight=0,this.extraBottomHeight=0}wireBeans(t){this.rowModel=t.rowModel,this.rowRenderer=t.rowRenderer,this.ctrlsService=t.ctrlsService,this.pageBoundsService=t.pageBoundsService}postConstruct(){this.isClientSide=this.rowModel.getType()==="clientSide",this.ctrlsService.whenReady(t=>{this.gridBodyCtrl=t.gridBodyCtrl})}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}setOffsetTop(t){this.extraTopHeight!==t&&(this.extraTopHeight=t,this.eventService.dispatchEvent({type:"stickyTopOffsetChanged",offset:t}))}setOffsetBottom(t){this.extraBottomHeight!==t&&(this.extraBottomHeight=t)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getExtraTopHeight(){return this.extraTopHeight}getExtraBottomHeight(){return this.extraBottomHeight}getLastPixelOfGroup(t){return this.isClientSide?this.getClientSideLastPixelOfGroup(t):this.getServerSideLastPixelOfGroup(t)}getFirstPixelOfGroup(t){return t.footer?t.sibling.rowTop+t.sibling.rowHeight-1:t.hasChildren()?t.rowTop-1:0}getServerSideLastPixelOfGroup(t){if(this.isClientSide)throw new Error("This func should only be called in server side row model.");if(t.isExpandable()||t.footer){if(t.master)return t.detailNode.rowTop+t.detailNode.rowHeight;if(!t.sibling||Math.abs(t.sibling.rowIndex-t.rowIndex)===1){let n=t.childStore?.getStoreBounds();return t.footer&&(n=t.sibling.childStore?.getStoreBounds()),(n?.heightPx??0)+(n?.topPx??0)}return t.footer?t.rowTop+t.rowHeight:t.sibling.rowTop+t.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(t){if(!this.isClientSide)throw new Error("This func should only be called in client side row model.");if(t.isExpandable()||t.footer){if(t.footer&&t.rowIndex===0)return Number.MAX_SAFE_INTEGER;if(!t.sibling||Math.abs(t.sibling.rowIndex-t.rowIndex)===1){let i=t.footer?t.sibling:t;for(;i.isExpandable()&&i.expanded;)if(i.master)i=i.detailNode;else if(i.childrenAfterSort){if(i.childrenAfterSort.length===0)break;i=Ar(i.childrenAfterSort)}return i.rowTop+i.rowHeight}return t.footer?t.rowTop+t.rowHeight:t.sibling.rowTop+t.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(t){let e=t==="top",n=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(t,new Set,n);let i=e?this.rowRenderer.getFirstVisibleVerticalPixel()-this.extraTopHeight:this.rowRenderer.getLastVisibleVerticalPixel()-this.extraTopHeight,r=new Set,s=c=>{if(r.add(c),e){let d=this.getLastPixelOfGroup(c),u=i+n+c.rowHeight;d<u?c.stickyRowTop=n+(d-u):c.stickyRowTop=n}else{let d=this.getFirstPixelOfGroup(c),u=i-(n+c.rowHeight);d>u?c.stickyRowTop=n-(d-u):c.stickyRowTop=n}n=0,r.forEach(d=>{let u=d.stickyRowTop+d.rowHeight;n<u&&(n=u)})},o=this.areFooterRowsStickySuppressed(),a=this.gos.get("suppressGroupRowsSticky"),l=c=>{if(!c.displayed)return!1;if(c.footer){if(o===!0||o==="grand"&&c.level===-1||o==="group"&&c.level>-1)return!1;let d=c.sibling.rowIndex?c.sibling.rowIndex+1===c.rowIndex:!1;return t==="bottom"&&d?!1:!r.has(c)}return c.isExpandable()?a===!0||t==="bottom"?!1:!r.has(c)&&c.expanded:!1};for(let c=0;c<100;c++){let d=i+n;e||(d=i-n);let u=this.rowModel.getRowIndexAtPixel(d),m=this.rowModel.getRow(u);if(m==null)break;let _=this.getStickyAncestors(m).find(D=>(e?D.rowIndex<u:D.rowIndex>u)&&l(D));if(_){s(_);continue}if((e?m.rowTop<d:m.rowTop+m.rowHeight>d)&&l(m)){s(m);continue}break}return e||r.forEach(c=>{c.stickyRowTop=n-(c.stickyRowTop+c.rowHeight)}),this.refreshNodesAndContainerHeight(t,r,n)}areFooterRowsStickySuppressed(){let t=this.gos.get("suppressStickyTotalRow");if(t===!0)return!0;let e=!!this.gos.get("groupIncludeFooter")||t==="group",n=!!this.gos.get("groupIncludeTotalFooter")||t==="grand";return e&&n?!0:n?"grand":e?"group":!1}canRowsBeSticky(){let t=this.gos.isGroupRowsSticky(),e=this.areFooterRowsStickySuppressed(),n=this.gos.get("suppressGroupRowsSticky");return t&&(!e||!n)}getStickyAncestors(t){let e=[],n=t.footer?t.sibling:t.parent;for(;n;)n.sibling&&e.push(n.sibling),e.push(n),n=n.parent;return e.reverse()}checkStickyRows(){let t=this.updateStickyRows("top"),e=this.updateStickyRows("bottom");return t||e}destroyStickyCtrls(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(t){let e=new Set;if(this.stickyTopRowCtrls.some(n=>n.getRowNode()===t)){for(let n=0;n<this.stickyTopRowCtrls.length;n++){let i=this.stickyTopRowCtrls[n].getRowNode();i!==t&&e.add(i)}this.refreshNodesAndContainerHeight("top",e,this.topContainerHeight)&&this.checkStickyRows();return}for(let n=0;n<this.stickyBottomRowCtrls.length;n++){let i=this.stickyBottomRowCtrls[n].getRowNode();i!==t&&e.add(i)}this.refreshNodesAndContainerHeight("bottom",e,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(t,e,n){let i=t==="top",r=i?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,s={},o=[];for(let m=0;m<r.length;m++){let f=r[m].getRowNode();if(!e.has(f)){s[f.id]=r[m],f.sticky=!1;continue}o.push(r[m])}let a=new Set;for(let m=0;m<o.length;m++)a.add(o[m].getRowNode());let l=[];e.forEach(m=>{a.has(m)||(m.sticky=!0,l.push(this.createRowCon(m,!1,!1)))});let c=!!l.length||o.length!==r.length;i?this.topContainerHeight!==n&&(this.topContainerHeight=n,this.gridBodyCtrl.setStickyTopHeight(n),c=!0):this.bottomContainerHeight!==n&&(this.bottomContainerHeight=n,this.gridBodyCtrl.setStickyBottomHeight(n),c=!0),this.destroyRowCtrls(s,!1);let d=[...o,...l];d.sort((m,f)=>f.getRowNode().rowIndex-m.getRowNode().rowIndex),i||d.reverse(),d.forEach(m=>m.setRowTop(m.getRowNode().stickyRowTop));let u=0;return i?(e.forEach(m=>{m.rowIndex<this.pageBoundsService.getFirstRow()&&(u+=m.rowHeight)}),u>this.topContainerHeight&&(u=this.topContainerHeight),this.setOffsetTop(u)):(e.forEach(m=>{m.rowIndex>this.pageBoundsService.getLastRow()&&(u+=m.rowHeight)}),u>this.bottomContainerHeight&&(u=this.bottomContainerHeight),this.setOffsetBottom(u)),c?(i?this.stickyTopRowCtrls=d:this.stickyBottomRowCtrls=d,!0):!1}ensureRowHeightsValid(){let t=!1,e=n=>{let i=n.getRowNode();if(i.rowHeightEstimated){let r=this.gos.getRowHeightForNode(i);i.setRowHeight(r.height),t=!0}};return this.stickyTopRowCtrls.forEach(e),this.stickyBottomRowCtrls.forEach(e),t}},IUt=class extends Ot{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{let t=()=>{this.getAllCellCtrls().forEach(s=>s.onRangeSelectionChanged())},e=()=>{this.getAllCellCtrls().forEach(s=>s.updateRangeBordersIfRangeCount())},n=()=>{this.eventService.addEventListener("rangeSelectionChanged",t),this.eventService.addEventListener("columnMoved",e),this.eventService.addEventListener("columnPinned",e),this.eventService.addEventListener("columnVisible",e)},i=()=>{this.eventService.removeEventListener("rangeSelectionChanged",t),this.eventService.removeEventListener("columnMoved",e),this.eventService.removeEventListener("columnPinned",e),this.eventService.removeEventListener("columnVisible",e)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListener("enableRangeSelection",s=>{s.currentValue?n():i()}),this.gos.get("enableRangeSelection")&&n()}}wireBeans(t){this.animationFrameService=t.animationFrameService,this.paginationService=t.paginationService,this.pageBoundsService=t.pageBoundsService,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.pinnedRowModel=t.pinnedRowModel,this.rowModel=t.rowModel,this.focusService=t.focusService,this.beans=t,this.rowContainerHeightService=t.rowContainerHeightService,this.ctrlsService=t.ctrlsService,this.environment=t.environment}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridBodyCtrl=t.gridBodyCtrl,this.initialise()})}initialise(){if(this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this)}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",t=>this.onSuppressCellFocusChanged(t.currentValue)),this.addManagedPropertyListeners(["getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.gos.isGroupRowsSticky()){let t=this.rowModel.getType();(t==="clientSide"||t==="serverSide")&&(this.stickyRowFeature=this.createManagedBean(new kUt(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gos.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let t=this.getKeepDetailRowsCount(),e=t??3;this.cachedRowCtrls=new AUt(e)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){let t=m5(this.rowCtrlsByRowIndex),e=m5(this.zombieRowCtrls),n=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];e.length>0||n.length>0?this.allRowCtrls=[...t,...e,...n]:this.allRowCtrls=t}onCellFocusChanged(t){this.getAllCellCtrls().forEach(e=>e.onCellFocused(t)),this.getFullWidthRowCtrls().forEach(e=>e.onFullWidthRowFocused(t))}onSuppressCellFocusChanged(t){this.getAllCellCtrls().forEach(e=>e.onSuppressCellFocusChanged(t)),this.getFullWidthRowCtrls().forEach(e=>e.onSuppressCellFocusChanged(t))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:t=>{this.onCellFocusChanged(t)},cellFocusCleared:()=>this.onCellFocusChanged(),flashCells:t=>{this.getAllCellCtrls().forEach(e=>e.onFlashCells(t))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(t=>t.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(t=>t.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(t=>t.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(t=>t()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getCols().forEach(e=>{let n=l=>{this.getAllCellCtrls().forEach(c=>{c.getColumn()===e&&l(c)})},i=()=>{n(l=>l.onLeftChanged())},r=()=>{n(l=>l.onWidthChanged())},s=()=>{n(l=>l.onFirstRightPinnedChanged())},o=()=>{n(l=>l.onLastLeftPinnedChanged())},a=()=>{n(l=>l.onColDefChanged())};e.addEventListener("leftChanged",i),e.addEventListener("widthChanged",r),e.addEventListener("firstRightPinnedChanged",s),e.addEventListener("lastLeftPinnedChanged",o),e.addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{e.removeEventListener("leftChanged",i),e.removeEventListener("widthChanged",r),e.removeEventListener("firstRightPinnedChanged",s),e.removeEventListener("lastLeftPinnedChanged",o),e.removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){let t=this.gos.isDomLayout("print"),e=t||this.gos.get("embedFullWidthRows"),n=e!==this.embedFullWidthRows||this.printLayout!==t;this.printLayout=t,this.embedFullWidthRows=e,n&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t)}onPageLoaded(t){let e={recycleRows:t.keepRenderedRows,animate:t.animate,newData:t.newData,newPage:t.newPage,onlyBody:!0};this.redrawAfterModelUpdate(e)}getAllCellsForColumn(t){let e=[];return this.getAllRowCtrls().forEach(n=>{let i=n.getCellElement(t);i&&e.push(i)}),e}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(t,e){let{pinnedRowModel:n,beans:i,printLayout:r}=this,s=Object.fromEntries(t.map(a=>[a.getRowNode().id,a]));n.forEachPinnedRow(e,(a,l)=>{let c=t[l];c&&n.getPinnedRowById(c.getRowNode().id,e)===void 0&&(c.destroyFirstPass(),c.destroySecondPass()),a.id in s?(t[l]=s[a.id],delete s[a.id]):t[l]=new hD(a,i,!1,!1,r)});let o=e==="top"?n.getPinnedTopRowCount():n.getPinnedBottomRowCount();t.length=o}onPinnedRowDataChanged(){let t={recycleRows:!0};this.redrawAfterModelUpdate(t)}redrawRow(t,e=!1){if(t.sticky)this.stickyRowFeature.refreshStickyNode(t);else if(this.cachedRowCtrls?.has(t)){this.cachedRowCtrls.removeRow(t);return}else{let n=i=>{let r=i[t.rowIndex];r&&r.getRowNode()===t&&(r.destroyFirstPass(),r.destroySecondPass(),i[t.rowIndex]=this.createRowCon(t,!1,!1))};switch(t.rowPinned){case"top":n(this.topRowCtrls);break;case"bottom":n(this.bottomRowCtrls);break;default:n(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}e||this.dispatchDisplayedRowsChanged(!1)}redrawRows(t){if(t!=null){t?.forEach(n=>this.redrawRow(n,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(t){let e=t?.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(e==null)return null;let n=this.gos.getActiveDomElement(),i=this.gos.getDomData(n,dx.DOM_DATA_KEY_CELL_CTRL),r=this.gos.getDomData(n,hD.DOM_DATA_KEY_ROW_CTRL);return i||r?e:null}redrawAfterModelUpdate(t={}){this.getLockOnRefresh();let e=this.getCellToRestoreFocusToAfterRefresh(t);this.updateContainerHeights(),this.scrollToTopIfNewData(t);let n=!t.domLayoutChanged&&!!t.recycleRows,i=t.animate&&this.gos.isAnimateRows(),r=n?this.getRowsToRecycle():null;if(n||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature){this.stickyRowFeature.checkStickyRows();let s=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();s&&this.updateContainerHeights(s)}this.recycleRows(r,i),this.gridBodyCtrl.updateRowCount(),t.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),e!=null&&this.restoreFocusedCell(e),this.releaseLockOnRefresh()}scrollToTopIfNewData(t){let e=t.newData||t.newPage,n=this.gos.get("suppressScrollOnNewData");e&&!n&&(this.gridBodyCtrl.getScrollFeature().scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(t=0){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}let e=this.pageBoundsService.getCurrentPageHeight();e===0&&(e=1),this.rowContainerHeightService.setModelHeight(e+t)}getLockOnRefresh(){if(this.refreshInProgress){let t=this.frameworkOverrides.getLockOnRefreshError?.()??"";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."+t)}this.refreshInProgress=!0,this.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(t){t&&this.focusService.restoreFocusedCell(t,()=>{this.onCellFocusChanged(this.gos.addGridCommonParams({rowIndex:t.rowIndex,column:t.column,rowPinned:t.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))})}stopEditing(t=!1){this.getAllRowCtrls().forEach(e=>{e.stopEditing(t)})}getAllCellCtrls(){let t=[],e=this.getAllRowCtrls(),n=e.length;for(let i=0;i<n;i++){let r=e[i].getAllCellCtrls(),s=r.length;for(let o=0;o<s;o++)t.push(r[o])}return t}getAllRowCtrls(){let t=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],e=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],n=[...this.topRowCtrls,...this.bottomRowCtrls,...t,...e];for(let i in this.rowCtrlsByRowIndex)n.push(this.rowCtrlsByRowIndex[i]);return n}addRenderedRowListener(t,e,n){let i=this.rowCtrlsByRowIndex[e];i&&i.addEventListener(t,n)}flashCells(t={}){this.getCellCtrls(t.rowNodes,t.columns).forEach(e=>e.flashCell(t))}refreshCells(t={}){let e={forceRefresh:t.force,newData:!1,suppressFlash:t.suppressFlash};for(let n of this.getCellCtrls(t.rowNodes,t.columns))n.refreshOrDestroyCell(e);this.refreshFullWidth(t.rowNodes)}refreshFullWidth(t){if(!t)return;let e=null;this.stickyRowFeature&&w3e()&&(e=this.getCellToRestoreFocusToAfterRefresh()||null);for(let n of this.getRowCtrls(t)){if(!n.isFullWidth())continue;n.refreshFullWidth()||this.redrawRow(n.getRowNode(),!0)}this.dispatchDisplayedRowsChanged(!1),e&&this.restoreFocusedCell(e)}getCellRendererInstances(t){let e=this.getCellCtrls(t.rowNodes,t.columns).map(r=>r.getCellRenderer()).filter(r=>r!=null);if(t.columns?.length)return e;let n=[],i=this.mapRowNodes(t.rowNodes);return this.getAllRowCtrls().forEach(r=>{if(i&&!this.isRowInMap(r.getRowNode(),i)||!r.isFullWidth())return;let s=r.getFullWidthCellRenderers();for(let o=0;o<s.length;o++){let a=s[o];a!=null&&n.push(a)}}),[...n,...e]}getCellEditorInstances(t){let e=[];return this.getCellCtrls(t.rowNodes,t.columns).forEach(n=>{let i=n.getCellEditor();i&&e.push(i)}),e}getEditingCells(){let t=[];return this.getAllCellCtrls().forEach(e=>{if(e.isEditing()){let n=e.getCellPosition();t.push(n)}}),t}mapRowNodes(t){if(!t)return;let e={top:{},bottom:{},normal:{}};return t.forEach(n=>{let i=n.id;switch(n.rowPinned){case"top":e.top[i]=n;break;case"bottom":e.bottom[i]=n;break;default:e.normal[i]=n;break}}),e}isRowInMap(t,e){let n=t.id;switch(t.rowPinned){case"top":return e.top[n]!=null;case"bottom":return e.bottom[n]!=null;default:return e.normal[n]!=null}}getRowCtrls(t){let e=this.mapRowNodes(t),n=this.getAllRowCtrls();return!t||!e?n:n.filter(i=>{let r=i.getRowNode();return this.isRowInMap(r,e)})}getCellCtrls(t,e){let n;Di(e)&&(n={},e.forEach(r=>{let s=this.columnModel.getCol(r);Di(s)&&(n[s.getId()]=!0)}));let i=[];return this.getRowCtrls(t).forEach(r=>{r.getAllCellCtrls().forEach(s=>{let o=s.getColumn().getId();n&&!n[o]||i.push(s)})}),i}destroy(){this.removeAllRowComps(),super.destroy()}removeAllRowComps(){let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){let t=[];Rh(this.rowCtrlsByRowIndex,(n,i)=>{i.getRowNode().id==null&&t.push(n)}),this.removeRowCtrls(t);let e={};return Rh(this.rowCtrlsByRowIndex,(n,i)=>{let r=i.getRowNode();e[r.id]=i}),this.rowCtrlsByRowIndex={},e}removeRowCtrls(t,e=!1){t.forEach(n=>{let i=this.rowCtrlsByRowIndex[n];i&&(i.destroyFirstPass(e),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[n]})}onBodyScroll(t){t.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(t={}){let{afterScroll:e}=t,n;this.stickyRowFeature&&w3e()&&(n=this.getCellToRestoreFocusToAfterRefresh()||void 0);let i=this.firstRenderedRow,r=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let s=!1;if(this.stickyRowFeature){s=this.stickyRowFeature.checkStickyRows();let a=this.stickyRowFeature.getExtraTopHeight()+this.stickyRowFeature.getExtraBottomHeight();a&&this.updateContainerHeights(a)}let o=this.firstRenderedRow!==i||this.lastRenderedRow!==r;if(!(e&&!s&&!o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,e),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(e&&!s),n!=null)){let a=this.getCellToRestoreFocusToAfterRefresh();n!=null&&a==null&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(n))}}removeRowCompsNotToDraw(t,e){let n={};t.forEach(s=>n[s]=!0);let r=Object.keys(this.rowCtrlsByRowIndex).filter(s=>!n[s]);this.removeRowCtrls(r,e)}calculateIndexesToDraw(t){let e=xHt(this.firstRenderedRow,this.lastRenderedRow),n=(r,s)=>{let o=s.getRowNode().rowIndex;o!=null&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(s)&&e.push(o)};Rh(this.rowCtrlsByRowIndex,n),Rh(t,n),e.sort((r,s)=>r-s);let i=[];for(let r=0;r<e.length;r++){let s=e[r],o=this.rowModel.getRow(s);o&&!o.sticky&&i.push(s)}return i}recycleRows(t,e=!1,n=!1){let i=this.calculateIndexesToDraw(t);(this.printLayout||n)&&(e=!1),this.removeRowCompsNotToDraw(i,!e);let r=[];i.forEach(s=>{let o=this.createOrUpdateRowCtrl(s,t,e,n);Di(o)&&r.push(o)}),t&&(n&&!this.gos.get("suppressAnimationFrame")&&!this.printLayout?this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(t,e),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(t,e)),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(t=!1){this.eventService.dispatchEvent({type:"displayedRowsChanged",afterScroll:t})}onDisplayedColumnsChanged(){let t=this.visibleColsService.isPinningLeft(),e=this.visibleColsService.isPinningRight();(this.pinningLeft!==t||e!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=e,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){let t=[];this.getFullWidthRowCtrls().forEach(e=>{let n=e.getRowNode().rowIndex;t.push(n.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(t),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(t){let e=this.mapRowNodes(t);return this.getAllRowCtrls().filter(n=>{if(!n.isFullWidth())return!1;let i=n.getRowNode();return!(e!=null&&!this.isRowInMap(i,e))})}createOrUpdateRowCtrl(t,e,n,i){let r,s=this.rowCtrlsByRowIndex[t];if(s||(r=this.rowModel.getRow(t),Di(r)&&Di(e)&&e[r.id]&&r.alreadyRendered&&(s=e[r.id],e[r.id]=null)),!s)if(r||(r=this.rowModel.getRow(t)),Di(r))s=this.createRowCon(r,n,i);else return;return r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[t]=s,s}destroyRowCtrls(t,e){let n=[];Rh(t,(i,r)=>{if(r){if(this.cachedRowCtrls&&r.isCacheable()){this.cachedRowCtrls.addRow(r);return}r.destroyFirstPass(!e),e?(this.zombieRowCtrls[r.getInstanceId()]=r,n.push(()=>{r.destroySecondPass(),delete this.zombieRowCtrls[r.getInstanceId()]})):r.destroySecondPass()}}),e&&(n.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),CBt(n))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){let t=this.getRowBuffer(),e=this.gos.getRowHeightAsNumber();return t*e}workOutFirstAndLastRowsToRender(){this.rowContainerHeightService.updateOffset();let t,e;if(!this.rowModel.isRowsToRender())t=0,e=-1;else if(this.printLayout)this.environment.refreshRowHeightVariable(),t=this.pageBoundsService.getFirstRow(),e=this.pageBoundsService.getLastRow();else{let a=this.getRowBufferInPixels(),l=this.ctrlsService.getGridBodyCtrl(),c=this.gos.get("suppressRowVirtualisation"),d=!1,u,m;do{let E=this.pageBoundsService.getPixelOffset(),{pageFirstPixel:M,pageLastPixel:I}=this.pageBoundsService.getCurrentPagePixelRange(),z=this.rowContainerHeightService.getDivStretchOffset(),G=l.getScrollFeature().getVScrollPosition(),A=G.top,Y=G.bottom;c?(u=M+z,m=I+z):(u=Math.max(A+E-a,M)+z,m=Math.min(Y+E+a,I)+z),this.firstVisibleVPixel=Math.max(A+E,M)+z,this.lastVisibleVPixel=Math.min(Y+E,I)+z,d=this.ensureAllRowsInRangeHaveHeightsCalculated(u,m)}while(d);let f=this.rowModel.getRowIndexAtPixel(u),_=this.rowModel.getRowIndexAtPixel(m),x=this.pageBoundsService.getFirstRow(),D=this.pageBoundsService.getLastRow();f<x&&(f=x),_>D&&(_=D),t=f,e=_}let n=this.gos.isDomLayout("normal"),i=this.gos.get("suppressMaxRenderedRowRestriction"),r=Math.max(this.getRowBuffer(),500);n&&!i&&e-t>r&&(e=t+r);let s=t!==this.firstRenderedRow,o=e!==this.lastRenderedRow;(s||o)&&(this.firstRenderedRow=t,this.lastRenderedRow=e,this.eventService.dispatchEvent({type:"viewportChanged",firstRow:t,lastRow:e}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(t,e){let n=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),r=this.rowModel.ensureRowHeightsValid(t,e,this.pageBoundsService.getFirstRow(),this.pageBoundsService.getLastRow());return(r||i)&&this.eventService.dispatchEvent({type:"recalculateRowBounds"}),i||r||n?(this.updateContainerHeights(),!0):!1}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(t){let i=t.getRowNode(),r=this.focusService.isRowNodeFocused(i),s=t.isEditing(),o=i.detail;return r||s||o?!!this.isRowPresent(i):!1}isRowPresent(t){return this.rowModel.isRowPresent(t)?this.paginationService?this.paginationService.isRowPresent(t):!0:!1}createRowCon(t,e,n){let i=this.cachedRowCtrls?this.cachedRowCtrls.getRow(t):null;if(i)return i;let r=this.gos.get("suppressAnimationFrame"),s=n&&!r&&!this.printLayout;return new hD(t,this.beans,e,s,this.printLayout)}getRenderedNodes(){let t=this.rowCtrlsByRowIndex;return Object.values(t).map(e=>e.getRowNode())}getRowByPosition(t){let e,{rowIndex:n}=t;switch(t.rowPinned){case"top":e=this.topRowCtrls[n];break;case"bottom":e=this.bottomRowCtrls[n];break;default:e=this.rowCtrlsByRowIndex[n],e||(e=this.getStickyTopRowCtrls().find(i=>i.getRowNode().rowIndex===n)||null,e||(e=this.getStickyBottomRowCtrls().find(i=>i.getRowNode().rowIndex===n)||null));break}return e}isRangeInRenderedViewport(t,e){if(t==null||e==null)return!1;let i=t>this.lastRenderedRow;return!(e<this.firstRenderedRow)&&!i}},AUt=class{constructor(t){this.entriesMap={},this.entriesList=[],this.maxCount=t}addRow(t){if(this.entriesMap[t.getRowNode().id]=t,this.entriesList.push(t),t.setCached(!0),this.entriesList.length>this.maxCount){let e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(t){if(t==null||t.id==null)return null;let e=this.entriesMap[t.id];return e?(this.removeFromCache(e),e.setCached(!1),e.getRowNode()!=t?null:e):null}has(t){return this.entriesMap[t.id]!=null}removeRow(t){let e=t.id,n=this.entriesMap[e];delete this.entriesMap[e],Ip(this.entriesList,n)}removeFromCache(t){let e=t.getRowNode().id;delete this.entriesMap[e],Ip(this.entriesList,t)}getEntries(){return this.entriesList}},PUt=class extends Ot{constructor(){super(...arguments),this.beanName="pinnedRowModel",this.nextId=0,this.pinnedTopRows=new IHe,this.pinnedBottomRows=new IHe}wireBeans(t){this.beans=t}postConstruct(){this.setPinnedRowData(this.gos.get("pinnedTopRowData"),"top"),this.setPinnedRowData(this.gos.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}isEmpty(t){return(t==="top"?this.pinnedTopRows:this.pinnedBottomRows).isEmpty()}isRowsToRender(t){return!this.isEmpty(t)}onGridStylesChanges(t){if(t.rowHeightChanged){let e=n=>{n.setRowHeight(n.rowHeight,!0)};this.pinnedBottomRows.forEach(e),this.pinnedTopRows.forEach(e)}}ensureRowHeightsValid(){let t=!1,e=0,n=i=>{if(i.rowHeightEstimated){let r=this.gos.getRowHeightForNode(i);i.setRowTop(e),i.setRowHeight(r.height),e+=r.height,t=!0}};return this.pinnedBottomRows?.forEach(n),e=0,this.pinnedTopRows?.forEach(n),this.eventService.dispatchEvent({type:"pinnedHeightChanged"}),t}setPinnedRowData(t,e){this.updateNodesFromRowData(t,e),this.eventService.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(t,e){let n=e==="top"?this.pinnedTopRows:this.pinnedBottomRows;if(t===void 0){n.clear();return}let i=this.gos.getRowIdCallback(),r=e==="top"?Pp.ID_PREFIX_TOP_PINNED:Pp.ID_PREFIX_BOTTOM_PINNED,s=n.getIds(),o=[],a=new Set,l=0,c=-1;for(let d of t){let u=i?.({data:d,level:0,rowPinned:e})??r+this.nextId++;if(a.has(u)){wt("Duplicate ID",u,"found for pinned row with data",d,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter.");continue}c++,a.add(u),o.push(u);let m=n.getById(u);if(m!==void 0)m.data!==d&&m.setData(d),l+=this.setRowTopAndRowIndex(m,l,c),s.delete(u);else{let f=new Pp(this.beans);f.id=u,f.data=d,f.rowPinned=e,l+=this.setRowTopAndRowIndex(f,l,c),n.push(f)}}s.forEach(d=>{n.getById(d)?.clearRowTopAndRowIndex()}),n.removeAllById(s),n.setOrder(o)}setRowTopAndRowIndex(t,e,n){return t.setRowTop(e),t.setRowHeight(this.gos.getRowHeightForNode(t).height),t.setRowIndex(n),t.rowHeight}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getPinnedTopRowCount(){return this.pinnedTopRows.getSize()}getPinnedBottomRowCount(){return this.pinnedBottomRows.getSize()}getPinnedTopRow(t){return this.pinnedTopRows.getByIndex(t)}getPinnedBottomRow(t){return this.pinnedBottomRows.getByIndex(t)}getPinnedRowById(t,e){return e==="top"?this.pinnedTopRows.getById(t):this.pinnedBottomRows.getById(t)}forEachPinnedRow(t,e){return t==="top"?this.pinnedTopRows.forEach(e):this.pinnedBottomRows.forEach(e)}getTotalHeight(t){let e=t.getSize();if(e===0)return 0;let n=t.getByIndex(e-1);return n===void 0?0:n.rowTop+n.rowHeight}},IHe=class{constructor(){this.cache={},this.ordering=[]}getById(t){return this.cache[t]}getByIndex(t){let e=this.ordering[t];return this.cache[e]}push(t){this.cache[t.id]=t,this.ordering.push(t.id)}removeAllById(t){for(let e of t)delete this.cache[e];this.ordering=this.ordering.filter(e=>!t.has(e))}setOrder(t){this.ordering=t}forEach(t){this.ordering.forEach((e,n)=>{let i=this.cache[e];i&&t(i,n)})}clear(){this.ordering.length=0,this.cache={}}isEmpty(){return this.ordering.length===0}getSize(){return this.ordering.length}getIds(){return new Set(this.ordering)}},U1=(t=>(t.Applied="Applied",t.StoreNotFound="StoreNotFound",t.StoreLoading="StoreLoading",t.StoreWaitingToLoad="StoreWaitingToLoad",t.StoreLoadingFailed="StoreLoadingFailed",t.StoreWrongType="StoreWrongType",t.Cancelled="Cancelled",t.StoreNotStarted="StoreNotStarted",t))(U1||{}),d4e=class extends Ot{constructor(t){super(),this.state="needsLoading",this.version=0,this.id=t}getId(){return this.id}load(){this.state="loading",this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}getState(){return this.state}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state="failed",this.processServerFail()),this.dispatchLoadCompleted(!1)}success(t,e){this.successCommon(t,e)}pageLoaded(t,e,n){this.successCommon(t,{rowData:e,rowCount:n})}isRequestMostRecentAndLive(t){let e=t===this.version,n=this.isAlive();return e&&n}successCommon(t,e){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(t)&&(this.state="loaded",this.processServerResult(e))}dispatchLoadCompleted(t=!0){let e={type:"loadComplete",success:t,block:this};this.dispatchLocalEvent(e)}},RUt=class extends Ot{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}wireBeans(t){this.rowModel=t.rowModel}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();let t=this.gos.get("blockLoadDebounceMillis");t&&t>0&&(this.checkBlockToLoadDebounce=Ap(this.performCheckBlocksToLoad.bind(this),t))}getMaxConcurrentDatasourceRequests(){let t=this.gos.get("maxConcurrentDatasourceRequests");if(t==null)return 2;if(!(t<=0))return t}addBlock(t){this.blocks.push(t),t.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(t){Ip(this.blocks,t)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchLocalEvent({type:"blockLoaded"}),this.activeBlockLoadsCount==0&&this.dispatchLocalEvent({type:"blockLoaderFinished"})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.gos.get("debug")&&Kv("RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}let t=this.getAvailableLoadingCount(),e=this.blocks.filter(n=>n.getState()==="needsLoading").slice(0,t);this.registerLoads(e.length),e.forEach(n=>n.load()),this.printCacheStatus()}getBlockState(){if(this.gos.isRowModelType("serverSide"))return this.rowModel.getBlockStates();let t={};return this.blocks.forEach(e=>{let{id:n,state:i}=e.getBlockStateJson();t[n]=i}),t}printCacheStatus(){this.gos.get("debug")&&Kv(`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(t){this.activeBlockLoadsCount+=t}getAvailableLoadingCount(){return this.maxConcurrentRequests!==void 0?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}},u4e={version:ta,moduleName:"@ag-grid-community/row-node-block",beans:[RUt]},FUt=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(t){this.rowModel=t}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(t){this.root=t,this.end=null,this.cachedRange.length=0}setEndRange(t){this.end=t,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){let t=this.getRoot(),e=this.getEnd();if(t==null||e==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(t,e)}return this.cachedRange}isInRange(t){return this.root===null?!1:this.getRange().some(e=>e.id===t.id)}getRoot(){return this.root&&this.root?.key===null&&(this.root=this.rowModel.getRowNode(this.root.id)??null),this.root}getEnd(){return this.end&&this.end?.key===null&&(this.end=this.rowModel.getRowNode(this.end.id)??null),this.end}truncate(t){let e=this.getRange();if(e.length===0)return{keep:[],discard:[]};let n=e[0].id===this.root.id,i=e.findIndex(r=>r.id===t.id);if(i>-1){let r=e.slice(0,i),s=e.slice(i+1);return this.setEndRange(t),n?{keep:r,discard:s}:{keep:s,discard:r}}else return{keep:e,discard:[]}}extend(t,e=!1){let n=this.getRoot();if(n==null){let r=this.getRange().slice();return e&&t.depthFirstSearch(s=>!s.group&&r.push(s)),r.push(t),this.setRoot(t),{keep:r,discard:[]}}if(this.rowModel.getNodesInRangeForSelection(n,t).find(r=>r.id===this.end?.id))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{let r=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:r}}}},LUt=class extends Ot{constructor(){super(...arguments),this.beanName="stylingService"}wireBeans(t){this.expressionService=t.expressionService}processAllCellClasses(t,e,n,i){this.processClassRules(void 0,t.cellClassRules,e,n,i),this.processStaticCellClasses(t,e,n)}processClassRules(t,e,n,i,r){if(e==null&&t==null)return;let s={},o={},a=(l,c)=>{l.split(" ").forEach(d=>{d.trim()!=""&&c(d)})};if(e){let l=Object.keys(e);for(let c=0;c<l.length;c++){let d=l[c],u=e[d],m;typeof u=="string"?m=this.expressionService.evaluate(u,n):typeof u=="function"&&(m=u(n)),a(d,f=>{m?s[f]=!0:o[f]=!0})}}t&&r&&Object.keys(t).forEach(l=>a(l,c=>{s[c]||(o[c]=!0)})),r&&Object.keys(o).forEach(r),Object.keys(s).forEach(i)}getStaticCellClasses(t,e){let{cellClass:n}=t;if(!n)return[];let i;return typeof n=="function"?i=n(e):i=n,typeof i=="string"&&(i=[i]),i||[]}processStaticCellClasses(t,e,n){this.getStaticCellClasses(t,e).forEach(r=>{n(r)})}},qy=class extends b5{constructor(t){super(t,"ag-toggle-button")}setValue(t,e){return super.setValue(t,e),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},hWe={selector:"AG-TOGGLE-BUTTON",component:qy},OUt=class extends Ot{constructor(t){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:e,eTopGuard:n,eBottomGuard:i,focusTrapActive:r,forceFocusOutWhenTabGuardsAreEmpty:s,isFocusableContainer:o,focusInnerElement:a,onFocusIn:l,onFocusOut:c,shouldStopEventPropagation:d,onTabKeyDown:u,handleKeyDown:m,eFocusableElement:f}=t;this.comp=e,this.eTopGuard=n,this.eBottomGuard=i,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!r,this.forceFocusOutWhenTabGuardsAreEmpty=!!s,this.isFocusableContainer=!!o,this.providedFocusIn=l,this.providedFocusOut=c,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=m}wireBeans(t){this.focusService=t.focusService}postConstruct(){this.createManagedBean(new Ky(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t),onFocusIn:t=>this.onFocusIn(t),onFocusOut:t=>this.onFocusOut(t)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(t=>this.addManagedElementListeners(t,{focus:this.onFocus.bind(this)}))}handleKeyDown(t){this.providedHandleKeyDown&&this.providedHandleKeyDown(t)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;let t=this.gos.get("tabIndex");this.comp.setTabIndex(t.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(t){if(this.isFocusableContainer&&!this.eFocusableElement.contains(t.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(t.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length===0){this.findNextElementOutsideAndFocus(t.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(t.relatedTarget))return;let e=t.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(e):this.focusInnerElement(e)}findNextElementOutsideAndFocus(t){let e=this.gos.getDocument(),n=this.focusService.findFocusableElements(e.body,null,!0),i=n.indexOf(t?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let r,s;t?(r=0,s=i):(r=i+1,s=n.length);let o=n.slice(r,s),a=this.gos.get("tabIndex");o.sort((l,c)=>{let d=parseInt(l.getAttribute("tabindex")||"0"),u=parseInt(c.getAttribute("tabindex")||"0");return u===a?1:d===a?-1:d===0?1:u===0?-1:d-u}),o[t?o.length-1:0].focus()}onFocusIn(t){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(t),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(t){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(t),this.eFocusableElement.contains(t.relatedTarget)||this.activateTabGuards())}onTabKeyDown(t){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(t);return}if(this.focusTrapActive||t.defaultPrevented)return;let e=this.tabGuardsAreActive();e&&this.deactivateTabGuards();let n=this.getNextFocusableElement(t.shiftKey);e&&setTimeout(()=>this.activateTabGuards(),0),n&&(n.focus(),t.preventDefault())}focusInnerElement(t=!1){let e=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(e.splice(0,1),e.splice(e.length-1,1)),e.length&&e[t?e.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(t){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,t)}forceFocusOutOfContainer(t=!1){if(this.forcingFocusOut)return;let e=t?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,e.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(t,e){return t===this.eTopGuard&&!e||t===this.eBottomGuard&&(e??!0)}setAllowFocus(t){this.allowFocus=t}},h4e=class extends Ot{constructor(t){super(),this.comp=t}initialiseTabGuard(t){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();let{eTopGuard:e,eBottomGuard:n,eFocusableElement:i}=this,r=[e,n],s={setTabIndex:x=>{r.forEach(D=>x!=null?D.setAttribute("tabindex",x):D.removeAttribute("tabindex"))}};this.addTabGuards(e,n);let{focusTrapActive:o=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:m,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:_}=t;this.tabGuardCtrl=this.createManagedBean(new OUt({comp:s,focusTrapActive:o,eTopGuard:e,eBottomGuard:n,eFocusableElement:i,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:m,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:_}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(t){let e=this.gos.getDocument().createElement("div"),n=t==="top"?"ag-tab-guard-top":"ag-tab-guard-bottom";return e.classList.add("ag-tab-guard",n),dd(e,"presentation"),e}addTabGuards(t,e){this.eFocusableElement.insertAdjacentElement("afterbegin",t),this.eFocusableElement.insertAdjacentElement("beforeend",e)}removeAllChildrenExceptTabGuards(){let t=[this.eTopGuard,this.eBottomGuard];zo(this.comp.getFocusableElement()),this.addTabGuards(...t)}forceFocusOutOfContainer(t=!1){this.tabGuardCtrl.forceFocusOutOfContainer(t)}appendChild(t,e,n){qB(e)||(e=e.getGui());let{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",e):t(e,n)}},j1=class extends ai{initialiseTabGuard(t){this.tabGuardFeature=this.createManagedBean(new h4e(this)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}appendChild(t,e){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,e)}},NUt=0,VUt=200,BUt=class extends Ot{constructor(){super(...arguments),this.beanName="popupService",this.popupList=[]}wireBeans(t){this.ctrlsService=t.ctrlsService,this.resizeObserverService=t.resizeObserverService,this.environment=t.environment}postConstruct(){this.ctrlsService.whenReady(t=>{this.gridCtrl=t.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){let t=this.gos.get("popupParent");return t||this.gridCtrl.getGui()}positionPopupForMenu(t){let{eventSource:e,ePopup:n}=t,i=this.getPopupIndex(n);if(i!==-1){let f=this.popupList[i];f.alignedToElement=e}let r=e.getBoundingClientRect(),s=this.getParentRect(),o=this.keepXYWithinBounds(n,r.top-s.top,0),a=n.clientWidth>0?n.clientWidth:200;n.style.minWidth=`${a}px`;let c=s.right-s.left-a,d;this.gos.get("enableRtl")?(d=m(),d<0&&(d=u(),this.setAlignedStyles(n,"left")),d>c&&(d=0,this.setAlignedStyles(n,"right"))):(d=u(),d>c&&(d=m(),this.setAlignedStyles(n,"right")),d<0&&(d=0,this.setAlignedStyles(n,"left"))),n.style.left=`${d}px`,n.style.top=`${o}px`;function u(){return r.right-s.left-2}function m(){return r.left-s.left-a}}positionPopupUnderMouseEvent(t){let{ePopup:e,nudgeX:n,nudgeY:i,skipObserver:r}=t;this.positionPopup({ePopup:e,nudgeX:n,nudgeY:i,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(t.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(t.type,t.ePopup,null,t.mouseEvent,t.column,t.rowNode)})}calculatePointerAlign(t){let e=this.getParentRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}positionPopupByComponent(t){let{ePopup:e,nudgeX:n,nudgeY:i,keepWithinBounds:r,eventSource:s,alignSide:o="left",position:a="over",column:l,rowNode:c,type:d}=t,u=s.getBoundingClientRect(),m=this.getParentRect(),f=this.getPopupIndex(e);if(f!==-1){let x=this.popupList[f];x.alignedToElement=s}let _=()=>{let x=u.left-m.left;o==="right"&&(x-=e.offsetWidth-u.width);let D;return a==="over"?(D=u.top-m.top,this.setAlignedStyles(e,"over")):(this.setAlignedStyles(e,"under"),this.shouldRenderUnderOrAbove(e,u,m,t.nudgeY||0)==="under"?D=u.top-m.top+u.height:D=u.top-e.offsetHeight-(i||0)*2-m.top),{x,y:D}};this.positionPopup({ePopup:e,nudgeX:n,nudgeY:i,keepWithinBounds:r,updatePosition:_,postProcessCallback:()=>this.callPostProcessPopup(d,e,s,null,l,c)})}shouldRenderUnderOrAbove(t,e,n,i){let r=n.bottom-e.bottom,s=e.top-n.top,o=t.offsetHeight+i;return r>o?"under":s>o||s>r?"above":"under"}setAlignedStyles(t,e){let n=this.getPopupIndex(t);if(n===-1)return;let i=this.popupList[n],{alignedToElement:r}=i;!r||(["right","left","over","above","under"].forEach(o=>{r.classList.remove(`ag-has-popup-positioned-${o}`),t.classList.remove(`ag-popup-positioned-${o}`)}),!e)||(r.classList.add(`ag-has-popup-positioned-${e}`),t.classList.add(`ag-popup-positioned-${e}`))}callPostProcessPopup(t,e,n,i,r,s){let o=this.gos.getCallback("postProcessPopup");o&&o({column:r,rowNode:s,ePopup:e,type:t,eventSource:n,mouseEvent:i})}positionPopup(t){let{ePopup:e,keepWithinBounds:n,nudgeX:i,nudgeY:r,skipObserver:s,updatePosition:o}=t,a={width:0,height:0},l=(c=!1)=>{let{x:d,y:u}=o();c&&e.clientWidth===a.width&&e.clientHeight===a.height||(a.width=e.clientWidth,a.height=e.clientHeight,i&&(d+=i),r&&(u+=r),n&&(d=this.keepXYWithinBounds(e,d,1),u=this.keepXYWithinBounds(e,u,0)),e.style.left=`${d}px`,e.style.top=`${u}px`,t.postProcessCallback&&t.postProcessCallback())};if(l(),!s){let c=this.resizeObserverService.observeResize(e,()=>l(!0));setTimeout(()=>c(),VUt)}}getActivePopups(){return this.popupList.map(t=>t.element)}getPopupList(){return this.popupList}getParentRect(){let t=this.gos.getDocument(),e=this.getPopupParent();return e===t.body?e=t.documentElement:getComputedStyle(e).position==="static"&&(e=e.offsetParent),fGe(e)}keepXYWithinBounds(t,e,n){let i=n===0,r=i?"clientHeight":"clientWidth",s=i?"top":"left",o=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=this.gos.getDocument(),c=l.documentElement,d=this.getPopupParent(),u=t.getBoundingClientRect(),m=d.getBoundingClientRect(),f=l.documentElement.getBoundingClientRect(),_=d===l.body,x=Math.ceil(u[o]),E=_?(i?TA:v5)(c)+c[a]:d[r];_&&(E-=Math.abs(f[s]-m[s]));let M=E-x;return Math.min(Math.max(e,0),Math.abs(M))}addPopup(t){let e=this.gos.getDocument(),{eChild:n,ariaLabel:i,alwaysOnTop:r,positionCallback:s,anchorToElement:o}=t;if(!e)return wt("could not find the document, document is empty"),{hideFunc:()=>{}};let a=this.getPopupIndex(n);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(n);let l=this.createPopupWrapper(n,i,!!r),c=this.addEventListenersToPopup(St(ve({},t),{wrapperEl:l}));return s&&s(),this.addPopupToPopupList(n,l,c,o),{hideFunc:c}}initialisePopupPosition(t){let n=this.getPopupParent().getBoundingClientRect();Di(t.style.top)||(t.style.top=`${n.top*-1}px`),Di(t.style.left)||(t.style.left=`${n.left*-1}px`)}createPopupWrapper(t,e,n){let i=this.getPopupParent(),r=document.createElement("div");return this.environment.applyThemeClasses(r),r.classList.add("ag-popup"),t.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),t.hasAttribute("role")||dd(t,"dialog"),hl(t,e),r.appendChild(t),i.appendChild(r),n?this.setAlwaysOnTop(t,!0):this.bringPopupToFront(t),r}handleThemeChange(t){if(t.themeChanged)for(let e of this.popupList)this.environment.applyThemeClasses(e.wrapper)}addEventListenersToPopup(t){let e=this.gos.getDocument(),n=this.getPopupParent(),{wrapperEl:i,eChild:r,closedCallback:s,afterGuiAttached:o,closeOnEsc:a,modal:l}=t,c=!1,d=_=>{if(!i.contains(this.gos.getActiveDomElement()))return;_.key===It.ESCAPE&&!gg(_)&&f({keyboardEvent:_})},u=_=>f({mouseEvent:_}),m=_=>f({touchEvent:_}),f=(_={})=>{let{mouseEvent:x,touchEvent:D,keyboardEvent:E,forceHide:M}=_;!M&&(this.isEventFromCurrentPopup({mouseEvent:x,touchEvent:D},r)||c)||(c=!0,n.removeChild(i),e.removeEventListener("keydown",d),e.removeEventListener("mousedown",u),e.removeEventListener("touchstart",m),e.removeEventListener("contextmenu",u),this.eventService.removeEventListener("dragStarted",u),s&&s(x||D||E),this.removePopupFromPopupList(r))};return o&&o({hidePopup:f}),window.setTimeout(()=>{a&&e.addEventListener("keydown",d),l&&(e.addEventListener("mousedown",u),this.eventService.addEventListener("dragStarted",u),e.addEventListener("touchstart",m),e.addEventListener("contextmenu",u))},0),f}addPopupToPopupList(t,e,n,i){this.popupList.push({element:t,wrapper:e,hideFunc:n,instanceId:NUt++,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(t,i)}getPopupIndex(t){return this.popupList.findIndex(e=>e.element===t)}setPopupPositionRelatedToElement(t,e){let n=this.getPopupIndex(t);if(n===-1)return;let i=this.popupList[n];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(s=>s&&s()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!e)return;let r=this.keepPopupPositionedRelativeTo({element:e,ePopup:t,hidePopup:i.hideFunc});return i.stopAnchoringPromise=r,i.isAnchored=!0,r}removePopupFromPopupList(t){this.setAlignedStyles(t,null),this.setPopupPositionRelatedToElement(t,null),this.popupList=this.popupList.filter(e=>e.element!==t)}keepPopupPositionedRelativeTo(t){let e=this.getPopupParent(),n=e.getBoundingClientRect(),{element:i,ePopup:r}=t,s=i.getBoundingClientRect(),o=n.top-s.top,a=n.left-s.left,l=o,c=a,d=r.style.top,u=parseInt(d.substring(0,d.length-1),10),m=r.style.left,f=parseInt(m.substring(0,m.length-1),10),_=this.getFrameworkOverrides();return new io(x=>{_.wrapIncoming(()=>{_.setInterval(()=>{let D=e.getBoundingClientRect(),E=i.getBoundingClientRect();if(E.top==0&&E.left==0&&E.height==0&&E.width==0){t.hidePopup();return}let I=D.top-E.top;if(I!=l){let G=this.keepXYWithinBounds(r,u+o-I,0);r.style.top=`${G}px`}l=I;let z=D.left-E.left;if(z!=c){let G=this.keepXYWithinBounds(r,f+a-z,1);r.style.left=`${G}px`}c=z},200).then(D=>{x(()=>{D!=null&&window.clearInterval(D)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(t=>t.isAnchored)}isEventFromCurrentPopup(t,e){let{mouseEvent:n,touchEvent:i}=t,r=n||i;if(!r)return!1;let s=this.getPopupIndex(e);if(s===-1)return!1;for(let o=s;o<this.popupList.length;o++){let a=this.popupList[o];if(NZ(a.element,r))return!0}return this.isElementWithinCustomPopup(r.target)}isElementWithinCustomPopup(t){let e=this.gos.getDocument();for(;t&&t!==e.body;){if(t.classList.contains("ag-custom-component-popup")||t.parentElement===null)return!0;t=t.parentElement}return!1}getWrapper(t){for(;!t.classList.contains("ag-popup")&&t.parentElement;)t=t.parentElement;return t.classList.contains("ag-popup")?t:null}setAlwaysOnTop(t,e){let n=this.getWrapper(t);n&&(n.classList.toggle("ag-always-on-top",!!e),e&&this.bringPopupToFront(n))}bringPopupToFront(t){let e=this.getPopupParent(),n=Array.prototype.slice.call(e.querySelectorAll(".ag-popup")),i=n.length,r=Array.prototype.slice.call(e.querySelectorAll(".ag-popup.ag-always-on-top")),s=r.length,o=this.getWrapper(t);if(!o||i<=1||!e.contains(t))return!1;let a=n.indexOf(o),l=o.querySelectorAll("div"),c=[];l.forEach(u=>{u.scrollTop!==0&&c.push([u,u.scrollTop])});let d=!1;for(s?o.classList.contains("ag-always-on-top")?a!==i-1&&(Ar(r).insertAdjacentElement("afterend",o),d=!0):a!==i-s-1&&(r[0].insertAdjacentElement("beforebegin",o),d=!0):a!==i-1&&(Ar(n).insertAdjacentElement("afterend",o),d=!0);c.length;){let u=c.pop();u[0].scrollTop=u[1]}return d}},zUt=["touchstart","touchend","touchmove","touchcancel"],p4e=class{constructor(t="javascript"){this.frameworkName=t,this.renderingEngine="vanilla",this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e()}setInterval(t,e){return new io(n=>{n(window.setInterval(t,e))})}addEventListener(t,e,n,i){let r=Sl(zUt,e);t.addEventListener(e,n,{capture:!!i,passive:r})}get shouldWrapOutgoing(){return!1}frameworkComponent(t){return null}isFrameworkComponent(t){return!1}getDocLink(t){return`https://www.ag-grid.com/${this.frameworkName==="solid"?"react":this.frameworkName}-data-grid${t?`/${t}`:""}`}},HUt=class extends Ot{constructor(){super(...arguments),this.beanName="cellNavigationService"}wireBeans(t){this.visibleColsService=t.visibleColsService,this.rowModel=t.rowModel,this.rowRenderer=t.rowRenderer,this.pinnedRowModel=t.pinnedRowModel,this.paginationService=t.paginationService,this.pageBoundsService=t.pageBoundsService}getNextCellToFocus(t,e,n=!1){return n?this.getNextCellToFocusWithCtrlPressed(t,e):this.getNextCellToFocusWithoutCtrlPressed(t,e)}getNextCellToFocusWithCtrlPressed(t,e){let n=t===It.UP,i=t===It.DOWN,r=t===It.LEFT,s,o;if(n||i)o=n?this.pageBoundsService.getFirstRow():this.pageBoundsService.getLastRow(),s=e.column;else{let a=this.visibleColsService.getAllCols(),l=this.gos.get("enableRtl");o=e.rowIndex,s=r!==l?a[0]:Ar(a)}return{rowIndex:o,rowPinned:null,column:s}}getNextCellToFocusWithoutCtrlPressed(t,e){let n=e,i=!1;for(;!i;){switch(t){case It.UP:n=this.getCellAbove(n);break;case It.DOWN:n=this.getCellBelow(n);break;case It.RIGHT:this.gos.get("enableRtl")?n=this.getCellToLeft(n):n=this.getCellToRight(n);break;case It.LEFT:this.gos.get("enableRtl")?n=this.getCellToRight(n):n=this.getCellToLeft(n);break;default:n=null,wt("unknown key for navigation ",t);break}n?i=this.isCellGoodToFocusOn(n):i=!0}return n}isCellGoodToFocusOn(t){let e=t.column,n;switch(t.rowPinned){case"top":n=this.pinnedRowModel.getPinnedTopRow(t.rowIndex);break;case"bottom":n=this.pinnedRowModel.getPinnedBottomRow(t.rowIndex);break;default:n=this.rowModel.getRow(t.rowIndex);break}return n?!e.isSuppressNavigable(n):!1}getCellToLeft(t){if(!t)return null;let e=this.visibleColsService.getColBefore(t.column);return e?{rowIndex:t.rowIndex,column:e,rowPinned:t.rowPinned}:null}getCellToRight(t){if(!t)return null;let e=this.visibleColsService.getColAfter(t.column);return e?{rowIndex:t.rowIndex,column:e,rowPinned:t.rowPinned}:null}getRowBelow(t){let e=t.rowIndex,n=t.rowPinned,i=!1;if(this.isLastRowInContainer(t))switch(n){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.pageBoundsService.getFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}else n&&(i=!0);let r=this.rowModel.getRow(t.rowIndex),s=i?void 0:this.getNextStickyPosition(r);return s||{rowIndex:e+1,rowPinned:n}}getNextStickyPosition(t,e){if(!this.gos.isGroupRowsSticky()||!t||!t.sticky)return;let n=this.rowRenderer.getStickyTopRowCtrls().some(a=>a.getRowNode().rowIndex===t.rowIndex),i=[];n?i=[...this.rowRenderer.getStickyTopRowCtrls()].sort((a,l)=>a.getRowNode().rowIndex-l.getRowNode().rowIndex):i=[...this.rowRenderer.getStickyBottomRowCtrls()].sort((a,l)=>l.getRowNode().rowIndex-a.getRowNode().rowIndex);let r=e?-1:1,s=i.findIndex(a=>a.getRowNode().rowIndex===t.rowIndex),o=i[s+r];if(o)return{rowIndex:o.getRowNode().rowIndex,rowPinned:null}}getCellBelow(t){if(!t)return null;let e=this.getRowBelow(t);return e?{rowIndex:e.rowIndex,column:t.column,rowPinned:e.rowPinned}:null}isLastRowInContainer(t){let e=t.rowPinned,n=t.rowIndex;return e==="top"?this.pinnedRowModel.getPinnedTopRowCount()-1<=n:e==="bottom"?this.pinnedRowModel.getPinnedBottomRowCount()-1<=n:this.pageBoundsService.getLastRow()<=n}getRowAbove(t){let e=t.rowIndex,n=t.rowPinned,i=n?e===0:e===this.pageBoundsService.getFirstRow(),r=!1;if(i)return n==="top"?null:n?this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null:this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;n&&(r=!0);let s=this.rowModel.getRow(t.rowIndex),o=r?void 0:this.getNextStickyPosition(s,!0);return o||{rowIndex:e-1,rowPinned:n}}getCellAbove(t){if(!t)return null;let e=this.getRowAbove({rowIndex:t.rowIndex,rowPinned:t.rowPinned});return e?{rowIndex:e.rowIndex,column:t.column,rowPinned:e.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.pageBoundsService.getLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowCount()-1,rowPinned:"top"}}getNextTabbedCell(t,e){return e?this.getNextTabbedCellBackwards(t):this.getNextTabbedCellForwards(t)}getNextTabbedCellForwards(t){let e=this.visibleColsService.getAllCols(),n=t.rowIndex,i=t.rowPinned,r=this.visibleColsService.getColAfter(t.column);if(!r){r=e[0];let s=this.getRowBelow(t);if(Ls(s)||!s.rowPinned&&!(this.paginationService?.isRowInPage(s)??!0))return null;n=s?s.rowIndex:null,i=s?s.rowPinned:null}return{rowIndex:n,column:r,rowPinned:i}}getNextTabbedCellBackwards(t){let e=this.visibleColsService.getAllCols(),n=t.rowIndex,i=t.rowPinned,r=this.visibleColsService.getColBefore(t.column);if(!r){r=Ar(e);let s=this.getRowAbove({rowIndex:t.rowIndex,rowPinned:t.rowPinned});if(Ls(s)||!s.rowPinned&&!(this.paginationService?.isRowInPage(s)??!0))return null;n=s?s.rowIndex:null,i=s?s.rowPinned:null}return{rowIndex:n,column:r,rowPinned:i}}},fg=(t,e)=>{for(let n in e)e[n]=t;return e},AHe=ve(ve(ve(ve(ve(ve(ve(ve(ve(ve(ve(ve(ve(ve(ve({},fg("@ag-grid-community/core",{dispatchEvent:0,destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,getState:0,setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0,redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRow:0,getFirstDisplayedRowIndex:0,getLastDisplayedRow:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0,getModel:0,getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0,getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0,addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0,expireValueCache:0,getValue:0,getCellValue:0,showColumnMenuAfterButtonClick:0,showColumnMenuAfterMouseClick:0,showColumnMenu:0,hidePopupMenu:0,onSortChanged:0,getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0,setGridAriaProperty:0,refreshCells:0,flashCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0,addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getColumnDef:0,getColumnDefs:0,sizeColumnsToFit:0,setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumn:0,getDisplayNameForColumnGroup:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnVisible:0,setColumnsVisible:0,setColumnPinned:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0,moveColumn:0,moveColumnByIndex:0,moveColumns:0,setColumnWidth:0,setColumnWidths:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0,autoSizeColumn:0,autoSizeColumns:0,autoSizeAllColumns:0,undoCellEditing:0,redoCellEditing:0,getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0,getCurrentUndoSize:0,getCurrentRedoSize:0,isAnyFilterPresent:0,onFilterChanged:0,isColumnFilterPresent:0,getFilterInstance:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0,paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0,expandAll:0,collapseAll:0,onRowHeightChanged:0,setRowCount:0,getCacheBlockState:0})),fg("@ag-grid-community/client-side-row-model",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0})),fg("@ag-grid-community/csv-export",{getDataAsCsv:0,exportDataAsCsv:0})),fg("@ag-grid-community/infinite-row-model",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0,isLastRowIndexKnown:0})),fg("@ag-grid-enterprise/advanced-filter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0})),fg("@ag-grid-enterprise/charts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0})),fg("@ag-grid-enterprise/clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0})),fg("@ag-grid-enterprise/excel-export",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0})),fg("@ag-grid-enterprise/master-detail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0})),fg("@ag-grid-enterprise/menu",{showContextMenu:0,showColumnChooser:0,hideColumnChooser:0})),fg("@ag-grid-enterprise/range-selection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0})),fg("@ag-grid-enterprise/row-grouping",{addAggFunc:0,addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0,isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumn:0,removeValueColumns:0,addValueColumn:0,addValueColumns:0,setRowGroupColumns:0,removeRowGroupColumn:0,removeRowGroupColumns:0,addRowGroupColumn:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0,setPivotColumns:0,removePivotColumn:0,removePivotColumns:0,addPivotColumn:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0})),fg("@ag-grid-enterprise/server-side-row-model",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0})),fg("@ag-grid-enterprise/side-bar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0})),fg("@ag-grid-enterprise/status-bar",{getStatusPanel:0})),f3e={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},GUt=(t,e)=>t.eventService.dispatchEvent(e),pWe=class{};Reflect.defineProperty(pWe,"name",{value:"GridApi"});WUt=class extends Ot{constructor(){super(),this.beanName="apiFunctionService",this.api=new pWe,this.fns=St(ve({},f3e),{dispatchEvent:GUt}),this.beans=null,this.preDestroyLink="";let{api:t}=this;for(let e in AHe)t[e]=this.makeApi(e)[e]}wireBeans(t){this.beans=t}postConstruct(){this.preDestroyLink=this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(t,e){let{fns:n,beans:i}=this;n!==f3e&&(n[t]=i?.validationService?.validateApiFunction(t,e)??e)}makeApi(t){return{[t]:(...e)=>{let{beans:n,fns:{[t]:i}}=this;return i?i(n,...e):this.apiNotFound(t)}}}apiNotFound(t){let{beans:e,gridId:n,preDestroyLink:i}=this;if(!e)wt(`Grid API function ${t}() cannot be called as the grid has been destroyed.
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${i}`);else{let r=AHe[t];Sa.__assertRegistered(r,`api.${t}`,n)&&wt(`API function '${t}' not registered to module '${r}'`)}}destroy(){super.destroy(),this.fns=f3e,this.beans=null}};jUt=class extends Ot{constructor(){super(...arguments),this.beanName="columnDefFactory"}buildColumnDefs(t,e,n){let i=[],r={};return t.forEach(s=>{let o=this.createDefFromColumn(s,e,n),a=!0,l=o,c=s.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}let m=r[c.getGroupId()];if(m){m.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],r[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&i.push(l)}),i}createDefFromGroup(t){let e=_3e(t.getColGroupDef(),["children"]);return e&&(e.groupId=t.getGroupId()),e}createDefFromColumn(t,e,n){let i=_3e(t.getColDef());return i.colId=t.getColId(),i.width=t.getActualWidth(),i.rowGroup=t.isRowGroupActive(),i.rowGroupIndex=t.isRowGroupActive()?e.indexOf(t):null,i.pivot=t.isPivotActive(),i.pivotIndex=t.isPivotActive()?n.indexOf(t):null,i.aggFunc=t.isValueActive()?t.getAggFunc():null,i.hide=t.isVisible()?void 0:!0,i.pinned=t.isPinned()?t.getPinned():null,i.sort=t.getSort()?t.getSort():null,i.sortIndex=t.getSortIndex()!=null?t.getSortIndex():null,i}},$Ut=class extends Ot{constructor(){super(...arguments),this.beanName="columnEventDispatcher"}visibleCols(){this.eventService.dispatchEvent({type:"displayedColumnsChanged"})}gridColumns(){this.eventService.dispatchEvent({type:"gridColumnsChanged"})}headerHeight(t){this.eventService.dispatchEvent({type:"columnHeaderHeightChanged",column:t,columns:[t],source:"autosizeColumnHeaderHeight"})}groupHeaderHeight(t){this.eventService.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:t,source:"autosizeColumnGroupHeaderHeight"})}groupOpened(t){this.eventService.dispatchEvent({type:"columnGroupOpened",columnGroup:t.length===1?t[0]:void 0,columnGroups:t})}rowGroupChanged(t,e){this.eventService.dispatchEvent({type:"columnRowGroupChanged",columns:t,column:t.length===1?t[0]:null,source:e})}genericColumnEvent(t,e,n){this.eventService.dispatchEvent({type:t,columns:e,column:e.length===1?e[0]:null,source:n})}pivotModeChanged(){this.eventService.dispatchEvent({type:"columnPivotModeChanged"})}virtualColumnsChanged(t){this.eventService.dispatchEvent({type:"virtualColumnsChanged",afterScroll:t})}newColumnsLoaded(t){this.eventService.dispatchEvent({type:"newColumnsLoaded",source:t})}everythingChanged(t){this.eventService.dispatchEvent({type:"columnEverythingChanged",source:t})}columnMoved(t){let{movedColumns:e,source:n,toIndex:i,finished:r}=t;this.eventService.dispatchEvent({type:"columnMoved",columns:e,column:e&&e.length===1?e[0]:null,toIndex:i,finished:r,source:n})}columnPinned(t,e){if(!t.length)return;let n=t.length===1?t[0]:null,i=this.getCommonValue(t,r=>r.getPinned());this.eventService.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:n,source:e})}columnVisible(t,e){if(!t.length)return;let n=t.length===1?t[0]:null,i=this.getCommonValue(t,r=>r.isVisible());this.eventService.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:n,source:e})}getCommonValue(t,e){if(!t||t.length==0)return;let n=e(t[0]);for(let i=1;i<t.length;i++)if(n!==e(t[i]))return;return n}columnChanged(t,e,n){this.eventService.dispatchEvent({type:t,columns:e,column:e&&e.length==1?e[0]:null,source:n})}columnResized(t,e,n,i=null){t&&t.length&&this.eventService.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:e,source:n})}},KUt=class extends Ot{constructor(){super(...arguments),this.beanName="columnGetStateService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}getColumnState(){let t=this.columnModel.getColDefCols();if(Ls(t)||!this.columnModel.isAlive())return[];let n=this.columnModel.getAllCols().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(n),n}createStateItemFromColumn(t){let e=this.funcColsService.getRowGroupColumns(),n=this.funcColsService.getPivotColumns(),i=t.isRowGroupActive()?e.indexOf(t):null,r=t.isPivotActive()?n.indexOf(t):null,s=t.isValueActive()?t.getAggFunc():null,o=t.getSort()!=null?t.getSort():null,a=t.getSortIndex()!=null?t.getSortIndex():null,l=t.getFlex()!=null&&t.getFlex()>0?t.getFlex():null;return{colId:t.getColId(),width:t.getActualWidth(),hide:!t.isVisible(),pinned:t.getPinned(),sort:o,sortIndex:a,aggFunc:s,rowGroup:t.isRowGroupActive(),rowGroupIndex:i,pivot:t.isPivotActive(),pivotIndex:r,flex:l}}orderColumnStateList(t){let e=this.columnModel.getCols(),n=new Map(e.map((i,r)=>[i.getColId(),r]));t.sort((i,r)=>{let s=n.has(i.colId)?n.get(i.colId):-1,o=n.has(r.colId)?n.get(r.colId):-1;return s-o})}},YUt=class extends Ot{constructor(){super(...arguments),this.beanName="columnGroupStateService"}wireBeans(t){this.columnModel=t.columnModel,this.columnAnimationService=t.columnAnimationService,this.eventDispatcher=t.columnEventDispatcher,this.visibleColsService=t.visibleColsService}getColumnGroupState(){let t=[],e=this.columnModel.getColTree();return ux(null,e,n=>{Md(n)&&t.push({groupId:n.getGroupId(),open:n.isExpanded()})}),t}resetColumnGroupState(t){let e=this.columnModel.getColDefColTree();if(!e)return;let n=[];ux(null,e,i=>{if(Md(i)){let r=i.getColGroupDef(),s={groupId:i.getGroupId(),open:r?r.openByDefault:void 0};n.push(s)}}),this.setColumnGroupState(n,t)}setColumnGroupState(t,e){if(!this.columnModel.getColTree())return;this.columnAnimationService.start();let i=[];t.forEach(r=>{let s=r.groupId,o=r.open,a=this.columnModel.getProvidedColGroup(s);a&&a.isExpanded()!==o&&(a.setExpanded(o),i.push(a))}),this.visibleColsService.refresh(e,!0),i.length&&this.eventDispatcher.groupOpened(i),this.columnAnimationService.finish()}},qUt=class extends Ot{constructor(){super(...arguments),this.beanName="columnViewportService",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(t){this.visibleColsService=t.visibleColsService,this.columnModel=t.columnModel,this.eventDispatcher=t.columnEventDispatcher}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(t,e,n=!1){let i=this.visibleColsService.isBodyWidthDirty();if(!(t===this.scrollWidth&&e===this.scrollPosition&&!i)){if(this.scrollWidth=t,this.scrollPosition=e,this.visibleColsService.setBodyWidthDirty(),this.gos.get("enableRtl")){let s=this.visibleColsService.getBodyContainerWidth();this.viewportLeft=s-this.scrollPosition-this.scrollWidth,this.viewportRight=s-this.scrollPosition}else this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition;this.columnModel.isReady()&&this.checkViewportColumns(n)}}getHeadersToRender(t,e){let n;switch(t){case"left":n=this.rowsOfHeadersToRenderLeft[e];break;case"right":n=this.rowsOfHeadersToRenderRight[e];break;default:n=this.rowsOfHeadersToRenderCenter[e];break}return n||[]}extractViewportColumns(){let t=this.visibleColsService.getCenterCols();this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=t,this.headerColsWithinViewport=t):(this.colsWithinViewport=t.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=t.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(t){return t.isAutoHeaderHeight()||this.isAnyParentAutoHeaderHeight(t)?!0:this.isColumnInRowViewport(t)}isAnyParentAutoHeaderHeight(t){for(;t;){if(t.isAutoHeaderHeight())return!0;t=t.getParent()}return!1}isColumnInRowViewport(t){if(t.isAutoHeight())return!0;let e=t.getLeft()||0,n=e+t.getActualWidth(),i=this.viewportLeft-200,r=this.viewportRight+200,s=e<i&&n<i,o=e>r&&n>r;return!s&&!o}getViewportColumns(){let t=this.visibleColsService.getLeftCols(),e=this.visibleColsService.getRightCols();return this.colsWithinViewport.concat(t).concat(e)}getColsWithinViewport(t){if(!this.columnModel.isColSpanActive())return this.colsWithinViewport;let e=r=>{let s=r.getLeft();return Di(s)&&s>this.viewportLeft},n=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this),i=this.visibleColsService.getColsCenter();return this.visibleColsService.getColsForRow(t,i,n,e)}checkViewportColumns(t=!1){this.extractViewport()&&this.eventDispatcher.virtualColumnsChanged(t)}calculateHeaderRows(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={};let t={},e=this.visibleColsService.getLeftCols(),n=this.visibleColsService.getRightCols();this.headerColsWithinViewport.concat(e).concat(n).forEach(s=>t[s.getId()]=!0);let r=(s,o,a)=>{let l=!1;for(let c=0;c<s.length;c++){let d=s[c],u=!1;if(f5(d))u=t[d.getId()]===!0;else{let f=d.getDisplayedChildren();f&&(u=r(f,o,a+1))}u&&(l=!0,o[a]||(o[a]=[]),o[a].push(d))}return l};r(this.visibleColsService.getTreeLeft(),this.rowsOfHeadersToRenderLeft,0),r(this.visibleColsService.getTreeRight(),this.rowsOfHeadersToRenderRight,0),r(this.visibleColsService.getTreeCenter(),this.rowsOfHeadersToRenderCenter,0)}extractViewport(){let t=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();let e=this.getViewportColumns().map(t).join("#"),n=this.colsWithinViewportHash!==e;return n&&(this.colsWithinViewportHash=e,this.calculateHeaderRows()),n}},ZUt=class extends Ot{constructor(){super(...arguments),this.beanName="agComponentUtils"}wireBeans(t){this.componentMetadataProvider=t.componentMetadataProvider}adaptFunction(t,e){let n=this.componentMetadataProvider.retrieve(t);return n&&n.functionAdapter?n.functionAdapter(e):null}adaptCellRendererFunction(t){class e{refresh(){return!1}getGui(){return this.eGui}init(i){let r=t(i),s=typeof r;if(s==="string"||s==="number"||s==="boolean"){this.eGui=Rp("<span>"+r+"</span>");return}if(r==null){this.eGui=Rp("<span></span>");return}this.eGui=r}}return e}doesImplementIComponent(t){return t?t.prototype&&"getGui"in t.prototype:!1}},XUt=class extends Ot{constructor(){super(...arguments),this.beanName="componentMetadataProvider"}wireBeans(t){this.agComponentUtils=t.agComponentUtils}postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},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","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(t){return this.componentMetaData[t]}},QUt=["rowPositionUtils","cellPositionUtils","headerPositionUtils","paginationAutoPageSizeService","apiFunctionService","gridApi","userComponentRegistry","agComponentUtils","componentMetadataProvider","resizeObserverService","userComponentFactory","rowContainerHeightService","horizontalResizeService","localeService","validationService","pinnedRowModel","dragService","visibleColsService","eventService","gos","popupService","selectionService","columnFilterService","quickFilterService","filterManager","columnModel","headerNavigationService","pageBoundsService","paginationService","pageBoundsListener","rowRenderer","expressionService","columnFactory","alignedGridsService","navigationService","valueCache","valueService","loggerFactory","autoWidthCalculator","filterMenuFactory","dragAndDropService","focusService","mouseEventService","environment","cellNavigationService","stylingService","scrollVisibleService","sortController","columnHoverService","columnAnimationService","selectableService","autoColService","changeDetectionService","animationFrameService","undoRedoService","columnDefFactory","rowCssClassCalculator","rowNodeBlockLoader","rowNodeSorter","ctrlsService","pinnedWidthService","rowNodeEventThrottle","ctrlsFactory","dataTypeService","syncService","overlayService","stateService","expansionService","apiEventService","ariaAnnouncementService","menuService","columnApplyStateService","columnEventDispatcher","columnMoveService","columnAutosizeService","columnGetStateService","columnGroupStateService","columnSizeService","funcColsService","columnNameService","columnViewportService","pivotResultColsService","showRowGroupColsService"],PHe=Object.fromEntries(QUt.map((t,e)=>[t,e]));tjt=class extends Ot{constructor(){super(...arguments),this.beanName="ctrlsFactory",this.registry={}}register(t){this.registry[t.name]=t.classImp}getInstance(t,...e){let n=this.registry[t];if(n!=null)return new n(...e)}},ijt=class extends Ot{constructor(){super(...arguments),this.beanName="ctrlsService",this.params={},this.ready=!1,this.readyCallbacks=[]}checkReady(){let t=this.params;this.ready=t.gridCtrl!=null&&t.gridBodyCtrl!=null&&t.center!=null&&t.left!=null&&t.right!=null&&t.bottomCenter!=null&&t.bottomLeft!=null&&t.bottomRight!=null&&t.topCenter!=null&&t.topLeft!=null&&t.topRight!=null&&t.stickyTopCenter!=null&&t.stickyTopLeft!=null&&t.stickyTopRight!=null&&t.stickyBottomCenter!=null&&t.stickyBottomLeft!=null&&t.stickyBottomRight!=null&&t.centerHeader!=null&&t.leftHeader!=null&&t.rightHeader!=null&&t.fakeHScrollComp!=null&&t.fakeVScrollComp!=null&&t.gridHeaderCtrl!=null,this.ready&&(this.readyCallbacks.forEach(e=>e(t)),this.readyCallbacks.length=0)}whenReady(t){this.ready?t(this.params):this.readyCallbacks.push(t)}register(t,e){this.params[t]=e,this.checkReady()}registerHeaderContainer(t,e){let n=this.params;switch(e){case"left":n.leftHeader=t;break;case"right":n.rightHeader=t;break;default:n.centerHeader=t;break}this.checkReady()}get(t){return this.params[t]}getParams(){return this.params}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){let{leftHeader:t,centerHeader:e,rightHeader:n}=this.params;return[t,n,e]}getHeaderRowContainerCtrl(t){let e=this.params;switch(t){case"left":return e.leftHeader;case"right":return e.rightHeader;default:return e.centerHeader}}},njt=class extends Ot{constructor(){super(...arguments),this.beanName="cellPositionUtils"}createId(t){let{rowIndex:e,rowPinned:n,column:i}=t;return this.createIdFromValues({rowIndex:e,column:i,rowPinned:n})}createIdFromValues(t){let{rowIndex:e,rowPinned:n,column:i}=t;return`${e}.${n??"null"}.${i.getId()}`}equals(t,e){let n=t.column===e.column,i=t.rowPinned===e.rowPinned,r=t.rowIndex===e.rowIndex;return n&&i&&r}},rjt=class extends Ot{constructor(){super(...arguments),this.beanName="rowNodeEventThrottle",this.events=[]}wireBeans(t){this.animationFrameService=t.animationFrameService,this.rowModel=t.rowModel}postConstruct(){this.rowModel.getType()=="clientSide"&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(t,e){if(this.clientSideRowModel==null){this.eventService.dispatchEvent(t);return}this.events.push(t);let n=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(i=>this.eventService.dispatchEvent(i)),this.events=[]};e?n():(this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(n)),this.dispatchExpandedDebounced())}},sjt=class extends Ot{constructor(){super(...arguments),this.beanName="rowPositionUtils"}wireBeans(t){this.rowModel=t.rowModel,this.pinnedRowModel=t.pinnedRowModel,this.pageBoundsService=t.pageBoundsService}getFirstRow(){let t=0,e;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.pageBoundsService.getFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),e===void 0?null:{rowIndex:t,rowPinned:e}}getLastRow(){let t,e=null,n=this.pinnedRowModel.getPinnedBottomRowCount(),i=this.pinnedRowModel.getPinnedTopRowCount();return n?(e="bottom",t=n-1):this.rowModel.getRowCount()?(e=null,t=this.pageBoundsService.getLastRow()):i&&(e="top",t=i-1),t===void 0?null:{rowIndex:t,rowPinned:e}}getRowNode(t){switch(t.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRow(t.rowIndex);case"bottom":return this.pinnedRowModel.getPinnedBottomRow(t.rowIndex);default:return this.rowModel.getRow(t.rowIndex)}}sameRow(t,e){return!t&&!e?!0:t&&!e||!t&&e?!1:t.rowIndex===e.rowIndex&&t.rowPinned==e.rowPinned}before(t,e){switch(t.rowPinned){case"top":if(e.rowPinned!=="top")return!0;break;case"bottom":if(e.rowPinned!=="bottom")return!1;break;default:if(Di(e.rowPinned))return e.rowPinned!=="top";break}return t.rowIndex<e.rowIndex}},RHe={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},FHe={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},LHe={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},ojt=class extends Ot{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.themeClasses=[],this.eThemeAncestor=null,this.eMeasurementContainer=null,this.sizesMeasured=!1}wireBeans(t){this.resizeObserverService=t.resizeObserverService,this.eGridDiv=t.eGridDiv}postConstruct(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.themeClasses=this.getAncestorThemeClasses(),this.setUpThemeClassObservers(),this.getSizeEl(RHe),this.getSizeEl(FHe),this.getSizeEl(LHe)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(RHe)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(FHe)}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(LHe)}hasMeasuredSizes(){return this.sizesMeasured}getThemeClasses(){return this.themeClasses}applyThemeClasses(t){for(let e of Array.from(t.classList))e.startsWith("ag-theme-")&&!this.themeClasses.includes(e)&&t.classList.remove(e);for(let e of this.themeClasses)t.classList.contains(e)||t.classList.add(e)}getThemeAncestorElement(){return this.eThemeAncestor}refreshRowHeightVariable(){let t=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),e=this.gos.get("rowHeight");if(e==null||isNaN(e)||!isFinite(e))return t!==null&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;let n=`${e}px`;return t!=n?(this.eGridDiv.style.setProperty("--ag-line-height",n),e):t!=""?parseFloat(t):-1}getCSSVariablePixelValue(t){let e=this.lastKnownValues.get(t);if(e!=null)return e;let n=this.measureSizeEl(t);return n==="detached"||n==="no-styles"?t.defaultValue:(this.lastKnownValues.set(t,n),n)}measureSizeEl(t){let e=this.getSizeEl(t);if(e.offsetParent==null)return"detached";let n=e.offsetWidth;return n===OHe?"no-styles":(this.sizesMeasured=!0,n)}getSizeEl(t){let e=this.sizeEls.get(t);if(e)return e;let n=this.eMeasurementContainer;n||(n=this.eMeasurementContainer=document.createElement("div"),n.className="ag-measurement-container",this.eGridDiv.appendChild(n)),e=document.createElement("div"),e.style.width=`var(${t.cssName}, ${OHe}px)`,n.appendChild(e),this.sizeEls.set(t,e);let i=this.measureSizeEl(t);i==="no-styles"&&wt(`no value for ${t.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${t.defaultValue} will be used and updated when styles load.`);let r=this.resizeObserverService.observeResize(e,()=>{let s=this.measureSizeEl(t);s==="detached"||s==="no-styles"||(this.lastKnownValues.set(t,s),s!==i&&(i=s,this.fireGridStylesChangedEvent(t.changeKey)))});return this.addDestroyFunc(()=>r()),e}fireGridStylesChangedEvent(t){this.eventService.dispatchEvent({type:"gridStylesChanged",[t]:!0})}setUpThemeClassObservers(){let t=new MutationObserver(()=>{let n=this.getAncestorThemeClasses();ajt(n,this.themeClasses)||(this.themeClasses=n,this.fireGridStylesChangedEvent("themeChanged"))}),e=this.eGridDiv;for(;e;)t.observe(e||this.eGridDiv,{attributes:!0,attributeFilter:["class"]}),e=e.parentElement}getAncestorThemeClasses(){let t=this.eGridDiv,e=[];for(this.eThemeAncestor=null;t;){let n=Array.from(t.classList).filter(i=>i.startsWith("ag-theme-"));for(let i of n)this.eThemeAncestor=t,e.includes(i)||e.unshift(i);t=t.parentElement}return Object.freeze(e)}},ajt=(t,e)=>t.length===e.length&&t.findIndex((n,i)=>t[i]!==e[i])===-1,OHe=15538,ljt=class extends Ot{constructor(){super(...arguments),this.beanName="eventService",this.globalEventService=new y5}wireBeans(t){this.globalEventListener=t.globalEventListener,this.globalSyncEventListener=t.globalSyncEventListener}postConstruct(){if(this.globalEventListener){let t=this.gos.useAsyncEvents();this.addGlobalListener(this.globalEventListener,t)}this.globalSyncEventListener&&this.addGlobalListener(this.globalSyncEventListener,!1)}addEventListener(t,e,n){this.globalEventService.addEventListener(t,e,n)}removeEventListener(t,e,n){this.globalEventService.removeEventListener(t,e,n)}addGlobalListener(t,e=!1){this.globalEventService.addGlobalListener(t,e)}removeGlobalListener(t,e=!1){this.globalEventService.removeGlobalListener(t,e)}dispatchLocalEvent(){}dispatchEvent(t){this.globalEventService.dispatchEvent(this.gos.addGridCommonParams(t))}dispatchEventOnce(t){this.globalEventService.dispatchEventOnce(this.gos.addGridCommonParams(t))}},cjt=(()=>{let t=class D4 extends Ot{constructor(){super(...arguments),this.beanName="focusService"}wireBeans(n){this.eGridDiv=n.eGridDiv,this.columnModel=n.columnModel,this.visibleColsService=n.visibleColsService,this.headerNavigationService=n.headerNavigationService,this.headerPositionUtils=n.headerPositionUtils,this.rowRenderer=n.rowRenderer,this.rowPositionUtils=n.rowPositionUtils,this.cellPositionUtils=n.cellPositionUtils,this.navigationService=n.navigationService,this.ctrlsService=n.ctrlsService,this.filterManager=n.filterManager,this.rangeService=n.rangeService,this.advancedFilterService=n.advancedFilterService,this.overlayService=n.overlayService}static addKeyboardModeEvents(n){this.instanceCount>0||(n.addEventListener("keydown",D4.toggleKeyboardMode),n.addEventListener("mousedown",D4.toggleKeyboardMode))}static removeKeyboardModeEvents(n){this.instanceCount>0||(n.addEventListener("keydown",D4.toggleKeyboardMode),n.addEventListener("mousedown",D4.toggleKeyboardMode))}static toggleKeyboardMode(n){let i=D4.keyboardModeActive,r=n.type==="keydown";r&&(n.ctrlKey||n.metaKey||n.altKey)||i!==r&&(D4.keyboardModeActive=r)}static unregisterGridCompController(n){D4.removeKeyboardModeEvents(n)}postConstruct(){let n=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:n,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:n,columnRowGroupChanged:n}),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(i=>{this.gridCtrl=i.gridCtrl})}registerKeyboardFocusEvents(){let n=this.gos.getDocument();D4.addKeyboardModeEvents(n),D4.instanceCount++,this.addDestroyFunc(()=>{D4.instanceCount--,D4.unregisterGridCompController(n)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;let n=this.focusedCellPosition.column,i=this.columnModel.getCol(n.getId());n!==i&&this.clearFocusedCell()}isKeyboardMode(){return D4.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),hD.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),KZ.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(n,i){let r=n;for(;r;){if(this.gos.getDomData(r,i))return!1;r=r.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(n){return this.isCellRestoreFocused(n)?(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0):!1}clearRestoreFocus(){this.restoredFocusedCellPosition=null,this.awaitRestoreFocusedCell=!1}restoreFocusedCell(n,i){this.awaitRestoreFocusedCell=!0,setTimeout(()=>{this.awaitRestoreFocusedCell&&(this.setRestoreFocusedCell(n),i())})}isCellRestoreFocused(n){return this.restoredFocusedCellPosition==null?!1:this.cellPositionUtils.equals(n,this.restoredFocusedCellPosition)}setRestoreFocusedCell(n){this.getFrameworkOverrides().renderingEngine==="react"&&(this.restoredFocusedCellPosition=n)}getFocusEventParams(n){let{rowIndex:i,rowPinned:r,column:s}=n,o={rowIndex:i,rowPinned:r,column:s,isFullWidthCell:!1},a=this.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:r});return a&&(o.isFullWidthCell=a.isFullWidth()),o}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition==null)return;let n=this.getFocusEventParams(this.focusedCellPosition);this.focusedCellPosition=null,this.eventService.dispatchEvent(ve({type:"cellFocusCleared"},n))}setFocusedCell(n){let{column:i,rowIndex:r,rowPinned:s,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:a=!1}=n,l=this.columnModel.getCol(i);if(!l){this.focusedCellPosition=null;return}this.focusedCellPosition={rowIndex:r,rowPinned:xu(s),column:l},this.eventService.dispatchEvent(St(ve({type:"cellFocused"},this.getFocusEventParams(this.focusedCellPosition)),{forceBrowserFocus:o,preventScrollOnBrowserFocus:a}))}isCellFocused(n){return this.focusedCellPosition==null?!1:this.cellPositionUtils.equals(n,this.focusedCellPosition)}isRowNodeFocused(n){return this.isRowFocused(n.rowIndex,n.rowPinned)}isHeaderWrapperFocused(n){if(this.focusedHeaderPosition==null)return!1;let i=n.getColumnGroupChild(),r=n.getRowIndex(),s=n.getPinned(),{column:o,headerRowIndex:a}=this.focusedHeaderPosition;return i===o&&r===a&&s==o.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(n,i){this.focusedHeaderPosition={headerRowIndex:n,column:i}}isHeaderFocusSuppressed(){return this.gos.get("suppressHeaderFocus")||this.overlayService.isExclusive()}isCellFocusSuppressed(){return this.gos.get("suppressCellFocus")||this.overlayService.isExclusive()}focusHeaderPosition(n){if(this.isHeaderFocusSuppressed())return!1;let{direction:i,fromTab:r,allowUserOverride:s,event:o,fromCell:a,rowWithoutSpanValue:l}=n,{headerPosition:c}=n;if(a&&this.filterManager?.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(c);if(s){let d=this.getFocusedHeader(),u=this.headerNavigationService.getHeaderRowCount();if(r){let m=this.gos.getCallback("tabToNextHeader");m&&(c=this.getHeaderPositionFromUserFunc({userFunc:m,direction:i,currentPosition:d,headerPosition:c,headerRowCount:u}))}else{let m=this.gos.getCallback("navigateToNextHeader");if(m&&o){let f={key:o.key,previousHeaderPosition:d,nextHeaderPosition:c,headerRowCount:u,event:o};c=m(f)}}}return c?this.focusProvidedHeaderPosition({headerPosition:c,direction:i,event:o,fromCell:a,rowWithoutSpanValue:l}):!1}focusHeaderPositionFromUserFunc(n){if(this.isHeaderFocusSuppressed())return!1;let{userFunc:i,headerPosition:r,direction:s,event:o}=n,a=this.getFocusedHeader(),l=this.headerNavigationService.getHeaderRowCount(),c=this.getHeaderPositionFromUserFunc({userFunc:i,direction:s,currentPosition:a,headerPosition:r,headerRowCount:l});return!!c&&this.focusProvidedHeaderPosition({headerPosition:c,direction:s,event:o})}getHeaderPositionFromUserFunc(n){let{userFunc:i,direction:r,currentPosition:s,headerPosition:o,headerRowCount:a}=n,c=i({backwards:r==="Before",previousHeaderPosition:s,nextHeaderPosition:o,headerRowCount:a});return c===!0||c===null?(c===null&&wt("Since v31.3 Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),s):c===!1?null:c}focusProvidedHeaderPosition(n){let{headerPosition:i,direction:r,fromCell:s,rowWithoutSpanValue:o,event:a}=n,{column:l,headerRowIndex:c}=i;if(c===-1)return this.filterManager?.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(i):this.focusGridView(l);this.headerNavigationService.scrollToColumn(l,r);let u=this.ctrlsService.getHeaderRowContainerCtrl(l.getPinned())?.focusHeader(i.headerRowIndex,l,a)||!1;return u&&(o!=null||s)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(o??-1),u}focusFirstHeader(){if(this.overlayService.isExclusive()&&this.focusOverlay())return!0;let n=this.visibleColsService.getAllCols()[0];if(!n)return!1;n.getParent()&&(n=this.visibleColsService.getColGroupAtLevel(n,0));let i=this.headerPositionUtils.getHeaderIndexToFocus(n,0);return this.focusHeaderPosition({headerPosition:i,rowWithoutSpanValue:0})}focusLastHeader(n){if(this.overlayService.isExclusive()&&this.focusOverlay(!0))return!0;let i=this.headerNavigationService.getHeaderRowCount()-1,r=Ar(this.visibleColsService.getAllCols());return this.focusHeaderPosition({headerPosition:{headerRowIndex:i,column:r},rowWithoutSpanValue:-1,event:n})}focusPreviousFromFirstCell(n){return this.filterManager?.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(n)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(n,i){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===n&&this.focusedCellPosition.rowPinned===xu(i)}findFocusableElements(n,i,r=!1){let s=nzt,o=mGe;i&&(o+=", "+i),r&&(o+=', [tabindex="-1"]');let a=Array.prototype.slice.apply(n.querySelectorAll(s)).filter(d=>l1(d)),l=Array.prototype.slice.apply(n.querySelectorAll(o));return l.length?((d,u)=>d.filter(m=>u.indexOf(m)===-1))(a,l):a}focusInto(n,i=!1,r=!1){let s=this.findFocusableElements(n,null,r),o=i?Ar(s):s[0];return o?(o.focus({preventScroll:!0}),!0):!1}findFocusableElementBeforeTabGuard(n,i){if(!i)return null;let r=this.findFocusableElements(n),s=r.indexOf(i);if(s===-1)return null;let o=-1;for(let a=s-1;a>=0;a--)if(r[a].classList.contains("ag-tab-guard-top")){o=a;break}return o<=0?null:r[o-1]}findNextFocusableElement(n=this.eGridDiv,i,r){let s=this.findFocusableElements(n,i?':not([tabindex="-1"])':null),o=this.gos.getActiveDomElement(),a;i?a=s.findIndex(c=>c.contains(o)):a=s.indexOf(o);let l=a+(r?-1:1);return l<0||l>=s.length?null:s[l]}isTargetUnderManagedComponent(n,i){if(!i)return!1;let r=n.querySelectorAll(`.${Ky.FOCUS_MANAGED_CLASS}`);if(!r.length)return!1;for(let s=0;s<r.length;s++)if(r[s].contains(i))return!0;return!1}findTabbableParent(n,i=5){let r=0;for(;n&&S3e(n)===null&&++r<=i;)n=n.parentElement;return S3e(n)===null?null:n}focusOverlay(n){let i=this.overlayService.isVisible()&&this.overlayService.getOverlayWrapper()?.getGui();return!!i&&this.focusInto(i,n)}focusGridViewFailed(n,i){return i&&this.focusOverlay(n)||n&&this.focusLastHeader()}focusGridView(n,i=!1,r=!0){if(this.overlayService.isExclusive())return r&&this.focusOverlay(i);if(this.isCellFocusSuppressed())return i&&!this.isHeaderFocusSuppressed()?this.focusLastHeader():r&&this.focusOverlay(i)?!0:this.focusNextGridCoreContainer(!1);let s=i?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(s){let{rowIndex:o,rowPinned:a}=s;if(n??(n=this.getFocusedHeader()?.column),n&&o!==void 0&&o!==null)return this.navigationService.ensureCellVisible({rowIndex:o,column:n,rowPinned:a}),this.setFocusedCell({rowIndex:o,column:n,rowPinned:xu(a),forceBrowserFocus:!0}),this.rangeService?.setRangeToCell({rowIndex:o,rowPinned:a,column:n}),!0}return!!(r&&this.focusOverlay(i)||i&&this.focusLastHeader())}isGridFocused(){let n=this.gos.getActiveDomElement();return!!n&&this.eGridDiv.contains(n)}focusNextGridCoreContainer(n,i=!1){return!i&&this.gridCtrl.focusNextInnerContainer(n)?!0:((i||!n&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(n),!1)}focusAdvancedFilter(n){return this.advancedFilterFocusColumn=n?.column,this.advancedFilterService?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(n,i){let r=(i?void 0:this.advancedFilterFocusColumn)??this.visibleColsService.getAllCols()?.[0];return n?this.focusHeaderPosition({headerPosition:{column:r,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(r)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}addFocusableContainer(n){this.gridCtrl.addFocusableContainer(n)}removeFocusableContainer(n){this.gridCtrl.removeFocusableContainer(n)}focusGridInnerElement(n){return this.gridCtrl.focusInnerElement(n)}allowFocusForNextGridCoreContainer(n){this.gridCtrl.allowFocusForNextCoreContainer(n)}};return t.keyboardModeActive=!1,t.instanceCount=0,t})(),djt=cjt,ujt=class extends Ot{constructor(){super(...arguments),this.beanName="pinnedWidthService"}wireBeans(t){this.visibleColsService=t.visibleColsService}postConstruct(){let t=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t}),this.addManagedPropertyListener("domLayout",t)}checkContainerWidths(){let t=this.gos.isDomLayout("print"),e=t?0:this.visibleColsService.getColsLeftWidth(),n=t?0:this.visibleColsService.getDisplayedColumnsRightWidth();e!=this.leftWidth&&(this.leftWidth=e,this.eventService.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,this.eventService.dispatchEvent({type:"rightPinnedWidthChanged"}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}},hjt=class extends Ot{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}wireBeans(t){this.beans=t,this.focusService=t.focusService,this.visibleColsService=t.visibleColsService}setComp(t,e,n){this.view=t,this.eGridHostDiv=e,this.eGui=n,this.eGui.setAttribute("grid-id",this.gridId);let{dragAndDropService:i,mouseEventService:r,ctrlsService:s,resizeObserverService:o}=this.beans;i.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:l=>l===1||l===0,getIconName:()=>"notAllowed"}),r.stampTopLevelGridCompWithGridInstance(e),this.createManagedBean(new o4e(this.view)),this.addRtlSupport();let a=o.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>a()),s.register("gridCtrl",this)}isDetailGrid(){return this.focusService.findTabbableParent(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){let t=this.beans;return{paginationSelector:t.paginationService?.getPaginationSelector(),gridHeaderDropZonesSelector:t.columnDropZonesService?.getDropZoneSelector(),sideBarSelector:t.sideBarService?.getSideBarSelector(),statusBarSelector:t.statusBarService?.getStatusPanelSelector(),watermarkSelector:t.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventService.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}addRtlSupport(){let t=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(t)}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(t){this.view.setCursor(t?"ew-resize":null)}disableUserSelect(t){this.view.setUserSelect(t?"none":null)}focusNextInnerContainer(t){let e=this.getFocusableContainers(),{indexWithFocus:n,nextIndex:i}=this.getNextFocusableIndex(e,t);if(i<0||i>=e.length)return!1;if(i===0){if(n>0){let r=this.visibleColsService.getAllCols(),s=Ar(r);if(this.focusService.focusGridView(s,!0))return!0}return!1}return this.focusContainer(e[i],t)}focusInnerElement(t){let e=this.gos.getCallback("focusGridInnerElement");if(e&&e({fromBottom:!!t}))return!0;let n=this.getFocusableContainers(),i=this.visibleColsService.getAllCols();if(t){if(n.length>1)return this.focusContainer(Ar(n),!0);let r=Ar(i);if(this.focusService.focusGridView(r,!0))return!0}if(this.gos.get("headerHeight")===0||this.focusService.isHeaderFocusSuppressed()){if(this.focusService.focusGridView(i[0]))return!0;for(let r=1;r<n.length;r++)if(this.focusService.focusInto(n[r].getGui()))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(t=!1){this.view.forceFocusOutOfContainer(t)}addFocusableContainer(t){this.additionalFocusableContainers.add(t)}removeFocusableContainer(t){this.additionalFocusableContainers.delete(t)}allowFocusForNextCoreContainer(t){let e=this.view.getFocusableContainers(),{nextIndex:n,indexWithFocus:i}=this.getNextFocusableIndex(e,t);if(i===-1||n<0||n>=e.length)return;let r=e[n];r.setAllowFocus?.(!0),setTimeout(()=>{r.setAllowFocus?.(!1)})}getNextFocusableIndex(t,e){let n=this.gos.getActiveDomElement(),i=t.findIndex(s=>s.getGui().contains(n)),r=i+(e?-1:1);return{indexWithFocus:i,nextIndex:r}}focusContainer(t,e){t.setAllowFocus?.(!0);let n=this.focusService.focusInto(t.getGui(),e);return t.setAllowFocus?.(!1),n}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},pjt=class extends j1{constructor(t){super(),this.gridBody=Bt,this.sideBar=Bt,this.pagination=Bt,this.rootWrapperBody=Bt,this.eGridDiv=t}postConstruct(){let t={destroyGridUi:()=>this.destroyBean(this),setRtlClass:s=>this.addCssClass(s),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:s=>{this.getGui().style.userSelect=s??"",this.getGui().style.webkitUserSelect=s??""},setCursor:s=>{this.getGui().style.cursor=s??""}},e=this.createManagedBean(new hjt),n=e.getOptionalSelectors(),i=this.createTemplate(n),r=[OWt,...Object.values(n).filter(s=>!!s)];this.setTemplate(i,r),e.setComp(t,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:s=>e.focusInnerElement(s),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){let t=this.getGui();this.eGridDiv.appendChild(t),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(t),this.gos.get("debug")&&Kv("Grid removed from DOM")})}updateLayoutClasses(t,e){let n=this.rootWrapperBody.classList;n.toggle("ag-layout-auto-height",e.autoHeight),n.toggle("ag-layout-normal",e.normal),n.toggle("ag-layout-print",e.print),this.addOrRemoveCssClass("ag-layout-auto-height",e.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",e.normal),this.addOrRemoveCssClass("ag-layout-print",e.print)}createTemplate(t){let e=t.gridHeaderDropZonesSelector?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",n=t.sideBarSelector?'<ag-side-bar data-ref="sideBar"></ag-side-bar>':"",i=t.statusBarSelector?"<ag-status-bar></ag-status-bar>":"",r=t.watermarkSelector?"<ag-watermark></ag-watermark>":"",s=t.paginationSelector?'<ag-pagination data-ref="pagination"></ag-pagination>':"";return`<div class="ag-root-wrapper" role="presentation">
                ${e}
                <div class="ag-root-wrapper-body" data-ref="rootWrapperBody" role="presentation">
                    <ag-grid-body data-ref="gridBody"></ag-grid-body>
                    ${n}
                </div>
                ${i}
                ${s}
                ${r}
            </div>`}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(t=!1){if(!t&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(t);return}super.forceFocusOutOfContainer(t)}getFocusableContainers(){let t=[this.gridBody];return[this.sideBar,this.pagination].forEach(e=>{e&&t.push(e)}),t.filter(e=>l1(e.getGui()))}},mjt=class extends Ot{constructor(){super(...arguments),this.beanName="alignedGridsService",this.consuming=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnSizeService=t.columnSizeService,this.ctrlsService=t.ctrlsService,this.columnApplyStateService=t.columnApplyStateService}getAlignedGridApis(){let t=this.gos.get("alignedGrids")??[],e=typeof t=="function";typeof t=="function"&&(t=t());let n=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return t.map(r=>{if(!r){Do("alignedGrids contains an undefined option."),e||Do(`You may want to configure via a callback to avoid setup race conditions:
                     "alignedGrids: () => [linkedGrid]"`),Do(n());return}if(this.isGridApi(r))return r;let s=r;return"current"in s?s.current?.api:(s.api||Do(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${n()}`),s.api)}).filter(r=>!!r&&!r.isDestroyed())}isGridApi(t){return!!t&&!!t.dispatchEvent}postConstruct(){let t=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:t,columnVisible:t,columnPinned:t,columnGroupOpened:t,columnResized:t,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:e})=>this.onColumnEvent(e),alignedGridScroll:({event:e})=>this.onScrollEvent(e)})}fireEvent(t){this.consuming||this.getAlignedGridApis().forEach(e=>{e.isDestroyed()||e.dispatchEvent(t)})}onEvent(t){this.consuming=!0,t(),this.consuming=!1}fireColumnEvent(t){this.fireEvent({type:"alignedGridColumn",event:t})}fireScrollEvent(t){t.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:t})}onScrollEvent(t){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(t.left,!0)})}extractDataFromEvent(t,e){let n=[];return t.columns?t.columns.forEach(i=>{n.push(e(i))}):t.column&&n.push(e(t.column)),n}getMasterColumns(t){return this.extractDataFromEvent(t,e=>e)}getColumnIds(t){return this.extractDataFromEvent(t,e=>e.getColId())}onColumnEvent(t){this.onEvent(()=>{switch(t.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(t);break}case"columnGroupOpened":{this.processGroupOpenedEvent(t);break}case"columnPivotChanged":wt("pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.");break}})}processGroupOpenedEvent(t){let{columnModel:e}=this;t.columnGroups.forEach(n=>{let i=null;n&&(i=e.getProvidedColGroup(n.getGroupId())),!(n&&!i)&&e.setColumnGroupOpened(i,n.isExpanded(),"alignedGridChanged")})}processColumnEvent(t){let e=t.column,n=null;if(e&&(n=this.columnModel.getColDefCol(e.getColId())),e&&!n)return;let i=this.getMasterColumns(t),{columnApplyStateService:r,columnSizeService:s,ctrlsService:o}=this;switch(t.type){case"columnMoved":{let d=t.api.getColumnState().map(u=>({colId:u.colId}));r.applyColumnState({state:d,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{let d=t.api.getColumnState().map(u=>({colId:u.colId,hide:u.hide}));r.applyColumnState({state:d},"alignedGridChanged")}break;case"columnPinned":{let d=t.api.getColumnState().map(u=>({colId:u.colId,pinned:u.pinned}));r.applyColumnState({state:d},"alignedGridChanged")}break;case"columnResized":{let c=t,d={};i.forEach(u=>{d[u.getId()]={key:u.getColId(),newWidth:u.getActualWidth()}}),c.flexColumns?.forEach(u=>{d[u.getId()]&&delete d[u.getId()]}),s.setColumnWidths(Object.values(d),!1,c.finished,"alignedGridChanged");break}}let l=o.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(c=>{c.setGridOption("alwaysShowVerticalScroll",l)})}},fjt={version:ta,moduleName:"@ag-grid-community/aligned-grid",beans:[mjt]};NHe={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},VHe=["january","february","march","april","may","june","july","august","september","october","november","december"],s$t=class extends Ot{constructor(){super(...arguments),this.beanName="dataTypeService",this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(t){this.rowModel=t.rowModel,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.columnApplyStateService=t.columnApplyStateService}postConstruct(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",t=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(gA(t.source))})}processDataTypeDefinitions(){let t=this.getDefaultDataTypes();this.dataTypeDefinitions={},this.formatValueFuncs={};let e=i=>r=>{let{column:s,node:o,value:a}=r,l=s.getColDef().valueFormatter;return l===i.groupSafeValueFormatter&&(l=i.valueFormatter),this.valueService.formatValue(s,o,a,l)};Object.entries(t).forEach(([i,r])=>{let s=St(ve({},r),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(r)});this.dataTypeDefinitions[i]=s,this.formatValueFuncs[i]=e(s)});let n=this.gos.get("dataTypeDefinitions")??{};this.dataTypeMatchers={},Object.entries(n).forEach(([i,r])=>{let s=this.processDataTypeDefinition(r,n,[i],t);s&&(this.dataTypeDefinitions[i]=s,r.dataTypeMatcher&&(this.dataTypeMatchers[i]=r.dataTypeMatcher),this.formatValueFuncs[i]=e(s))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(i=>{let r=this.dataTypeMatchers[i];r&&delete this.dataTypeMatchers[i],this.dataTypeMatchers[i]=r??t[i].dataTypeMatcher})}mergeDataTypeDefinitions(t,e){let n=ve(ve({},t),e);return t.columnTypes&&e.columnTypes&&e.appendColumnTypes&&(n.columnTypes=[...kZ(t.columnTypes),...kZ(e.columnTypes)]),n}processDataTypeDefinition(t,e,n,i){let r,s=t.extendsDataType;if(t.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),t.extendsDataType===t.baseDataType){let o=i[s],a=e[s];if(o&&a&&(o=a),!this.validateDataTypeDefinition(t,o,s))return;r=this.mergeDataTypeDefinitions(o,t)}else{if(n.includes(s)){wt('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');return}let o=e[s];if(!this.validateDataTypeDefinition(t,o,s))return;let a=this.processDataTypeDefinition(o,e,[...n,s],i);if(!a)return;r=this.mergeDataTypeDefinitions(a,t)}return St(ve({},r),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(r)})}validateDataTypeDefinition(t,e,n){return e?e.baseDataType!==t.baseDataType?(wt('The "baseDataType" property of a data type definition must match that of its parent.'),!1):!0:(wt(`The data type definition ${n} does not exist.`),!1)}createGroupSafeValueFormatter(t){if(t.valueFormatter)return e=>{if(e.node?.group){let n=e.column.getAggFunc();if(n){if(n==="first"||n==="last")return t.valueFormatter(e);if(t.baseDataType==="number"&&n!=="count"){if(typeof e.value=="number")return t.valueFormatter(e);if(typeof e.value=="object"){if(!e.value)return;if("toNumber"in e.value)return t.valueFormatter(St(ve({},e),{value:e.value.toNumber()}));if("value"in e.value)return t.valueFormatter(St(ve({},e),{value:e.value.value}))}}}if(!this.gos.get("suppressGroupMaintainValueType"))return}else if(this.groupHideOpenParents&&e.column.isRowGroupActive()){if(typeof e.value!="string"||t.dataTypeMatcher?.(e.value))return t.valueFormatter(e);if(!this.gos.get("suppressGroupMaintainValueType"))return}return t.valueFormatter(e)}}updateColDefAndGetColumnType(t,e,n){let{cellDataType:i}=e,{field:r}=e;if(i===void 0&&(i=t.cellDataType),(i==null||i===!0)&&(i=this.canInferCellDataType(t,e)?this.inferCellDataType(r,n):!1),!i){t.cellDataType=!1;return}let s=this.dataTypeDefinitions[i];if(!s){wt(`Missing data type definition - "${i}"`);return}return t.cellDataType=i,s.groupSafeValueFormatter&&(t.valueFormatter=s.groupSafeValueFormatter),s.valueParser&&(t.valueParser=s.valueParser),s.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(t,i,s,n),s.columnTypes}addColumnListeners(t){if(!this.isWaitingForRowData)return;let e=this.columnStateUpdatesPendingInference[t.getColId()];if(!e)return;let n=i=>{e.add(i.key)};t.addEventListener("columnStateUpdated",n),this.columnStateUpdateListenerDestroyFuncs.push(()=>t.removeEventListener("columnStateUpdated",n))}canInferCellDataType(t,e){if(this.rowModel.getType()!=="clientSide")return!1;let n={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(e,n))return!1;let i=e.type===null?t.type:e.type;if(i){let r=this.gos.get("columnTypes")??{};if(kZ(i).some(o=>{let a=r[o.trim()];return a&&this.doColDefPropsPreventInference(a,n)}))return!1}return!this.doColDefPropsPreventInference(t,n)}doColDefPropsPreventInference(t,e){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([n,i])=>this.doesColDefPropPreventInference(t,e,n,i))}doesColDefPropPreventInference(t,e,n,i){if(!e[n])return!1;let r=t[n];return r===null?(e[n]=!1,!1):i===void 0?!!r:r===i}inferCellDataType(t,e){if(!t)return;let n,i=this.getInitialData();if(i){let s=t.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");n=LB(i,t,s)}else this.initWaitForRowData(e);if(n==null)return;let[r]=Object.entries(this.dataTypeMatchers).find(([s,o])=>o(n))??["object"];return r}getInitialData(){let t=this.gos.get("rowData");if(t?.length)return t[0];if(this.initialData)return this.initialData;{let e=this.rowModel.getRootNode().allLeafChildren;if(e?.length)return e[0].data}return null}initWaitForRowData(t){if(this.columnStateUpdatesPendingInference[t]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;let e=this.isColumnTypeOverrideInDataTypeDefinitions;e&&this.columnModel.queueResizeOperations();let[n]=this.addManagedEventListeners({rowDataUpdateStarted:i=>{let{firstRowData:r}=i;r&&(n?.(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(r,e),this.columnStateUpdatesPendingInference={},e&&this.columnModel.processResizeOperations(),this.eventService.dispatchEvent({type:"dataTypesInferred"}))}})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(t,e){this.initialData=t;let n=[];this.destroyColumnStateUpdateListeners();let i={},r={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([s,o])=>{let a=this.columnModel.getCol(s);if(!a)return;let l=a.getColDef();if(!this.columnModel.resetColDefIntoCol(a,"cellDataTypeInferred"))return;let c=a.getColDef();if(e&&c.type&&c.type!==l.type){let d=this.getUpdatedColumnState(a,o);d.rowGroup&&d.rowGroupIndex==null&&(i[s]=d),d.pivot&&d.pivotIndex==null&&(r[s]=d),n.push(d)}}),e&&n.push(...this.funcColsService.generateColumnStateForRowGroupAndPivotIndexes(i,r)),n.length&&this.columnApplyStateService.applyColumnState({state:n},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(t,e){let n=this.columnApplyStateService.getColumnStateFromColDef(t);return e.forEach(i=>{delete n[i],i==="rowGroup"?delete n.rowGroupIndex:i==="pivot"&&delete n.pivotIndex}),n}checkObjectValueHandlers(t){let e=this.dataTypeDefinitions.object,n=t.object;this.hasObjectValueParser=e.valueParser!==n.valueParser,this.hasObjectValueFormatter=e.valueFormatter!==n.valueFormatter}getDateStringTypeDefinition(t){return t?this.getDataTypeDefinition(t)??this.dataTypeDefinitions.dateString:this.dataTypeDefinitions.dateString}getDateParserFunction(t){return this.getDateStringTypeDefinition(t).dateParser}getDateFormatterFunction(t){return this.getDateStringTypeDefinition(t).dateFormatter}getDataTypeDefinition(t){let e=t.getColDef();if(e.cellDataType)return this.dataTypeDefinitions[e.cellDataType]}getBaseDataType(t){return this.getDataTypeDefinition(t)?.baseDataType}checkType(t,e){if(e==null)return!0;let n=this.getDataTypeDefinition(t)?.dataTypeMatcher;return n?n(e):!0}validateColDef(t){let e=n=>wt(`Cell data type is "object" but no Value ${n} has been provided. Please either provide an object data type definition with a Value ${n}, or set "colDef.value${n}"`);t.cellDataType==="object"&&(t.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&e("Formatter"),t.editable&&t.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&e("Parser"))}getFormatValue(t){return this.formatValueFuncs[t]}setColDefPropertiesForBaseDataType(t,e,n,i){let r=this.formatValueFuncs[e],s=Sa.__isRegistered("@ag-grid-enterprise/set-filter",this.gridId),o=this.localeService.getLocaleTextFunc(),a=l=>{let{filterParams:c}=t;t.filterParams=typeof c=="object"?ve(ve({},c),l):l};switch(n.baseDataType){case"number":{t.cellEditor="agNumberCellEditor",s&&a({comparator:(l,c)=>{let d=l==null?0:parseInt(l),u=c==null?0:parseInt(c);return d===u?0:d>u?1:-1}});break}case"boolean":{t.cellEditor="agCheckboxCellEditor",t.cellRenderer="agCheckboxCellRenderer",t.suppressKeyboardEvent=l=>!!l.colDef.editable&&l.event.key===It.SPACE,a(s?{valueFormatter:l=>Di(l.value)?o(String(l.value),l.value?"True":"False"):o("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,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":{t.cellEditor="agDateCellEditor",t.keyCreator=r,s&&a({valueFormatter:l=>{let c=r(l);return Di(c)?c:o("blanks","(Blanks)")},treeList:!0,treeListFormatter:(l,c)=>{if(c===1&&l!=null){let d=VHe[Number(l)-1];return o(d,NHe[d])}return l??o("blanks","(Blanks)")}});break}case"dateString":{t.cellEditor="agDateStringCellEditor",t.keyCreator=r;let l=n.dateParser;a(s?{valueFormatter:c=>{let d=r(c);return Di(d)?d:o("blanks","(Blanks)")},treeList:!0,treeListPathGetter:c=>{let d=l(c??void 0);return d?[String(d.getFullYear()),String(d.getMonth()+1),String(d.getDate())]:null},treeListFormatter:(c,d)=>{if(d===1&&c!=null){let u=VHe[Number(c)-1];return o(u,NHe[u])}return c??o("blanks","(Blanks)")}}:{comparator:(c,d)=>{let u=l(d);return d==null||u<c?-1:u>c?1:0}});break}case"object":{t.cellEditorParams={useFormatter:!0},t.comparator=(l,c)=>{let d=this.columnModel.getColDefCol(i),u=d?.getColDef();if(!d||!u)return 0;let m=l==null?"":r({column:d,node:null,value:l}),f=c==null?"":r({column:d,node:null,value:c});return m===f?0:m>f?1:-1},t.keyCreator=r,s?a({valueFormatter:l=>{let c=r(l);return Di(c)?c:o("blanks","(Blanks)")}}):t.filterValueGetter=l=>r({column:l.column,node:l.node,value:this.valueService.getValue(l.column,l.node)});break}}}getDefaultDataTypes(){let t=n=>!!n.match("^\\d{4}-\\d{2}-\\d{2}$"),e=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:n=>n.newValue?.trim?.()===""?null:Number(n.newValue),valueFormatter:n=>n.value==null?"":typeof n.value!="number"||isNaN(n.value)?e("invalidNumber","Invalid Number"):String(n.value),dataTypeMatcher:n=>typeof n=="number"},text:{baseDataType:"text",valueParser:n=>n.newValue===""?null:G1(n.newValue),dataTypeMatcher:n=>typeof n=="string"},boolean:{baseDataType:"boolean",valueParser:n=>n.newValue==null?n.newValue:n.newValue?.trim?.()===""?null:String(n.newValue).toLowerCase()==="true",valueFormatter:n=>n.value==null?"":String(n.value),dataTypeMatcher:n=>typeof n=="boolean"},date:{baseDataType:"date",valueParser:n=>A0(n.newValue==null?null:String(n.newValue)),valueFormatter:n=>n.value==null?"":!(n.value instanceof Date)||isNaN(n.value.getTime())?e("invalidDate","Invalid Date"):vg(n.value,!1)??"",dataTypeMatcher:n=>n instanceof Date},dateString:{baseDataType:"dateString",dateParser:n=>A0(n)??void 0,dateFormatter:n=>vg(n??null,!1)??void 0,valueParser:n=>t(String(n.newValue))?n.newValue:null,valueFormatter:n=>t(String(n.value))?n.value:"",dataTypeMatcher:n=>typeof n=="string"&&t(n)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:n=>G1(n.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(t=>t()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}},o$t={version:ta,moduleName:"@ag-grid-community/data-type",beans:[s$t]},a$t={version:ta,moduleName:"@ag-grid-community/column-api",apiFunctions:{getColumnDef:gjt,getColumnDefs:vjt,sizeColumnsToFit:yjt,setColumnGroupOpened:_jt,getColumnGroup:Cjt,getProvidedColumnGroup:xjt,getDisplayNameForColumn:bjt,getDisplayNameForColumnGroup:wjt,getColumn:Sjt,getColumns:Tjt,applyColumnState:Djt,getColumnState:Ejt,resetColumnState:Mjt,getColumnGroupState:kjt,setColumnGroupState:Ijt,resetColumnGroupState:Ajt,isPinning:Pjt,isPinningLeft:Rjt,isPinningRight:Fjt,getDisplayedColAfter:Ljt,getDisplayedColBefore:Ojt,setColumnVisible:Njt,setColumnsVisible:Vjt,setColumnPinned:Bjt,setColumnsPinned:zjt,getAllGridColumns:Hjt,getDisplayedLeftColumns:Gjt,getDisplayedCenterColumns:Wjt,getDisplayedRightColumns:Ujt,getAllDisplayedColumns:jjt,getAllDisplayedVirtualColumns:$jt,moveColumn:Kjt,moveColumnByIndex:Yjt,moveColumns:qjt,setColumnWidth:Zjt,setColumnWidths:Xjt,getLeftDisplayedColumnGroups:Qjt,getCenterDisplayedColumnGroups:Jjt,getRightDisplayedColumnGroups:e$t,getAllDisplayedColumnGroups:t$t,autoSizeColumn:i$t,autoSizeColumns:n$t,autoSizeAllColumns:r$t}};u$t={version:ta,moduleName:"@ag-grid-community/drag-api",apiFunctions:{addRowDropZone:l$t,removeRowDropZone:c$t,getRowDropZoneParams:d$t}};g$t={version:ta,moduleName:"@ag-grid-community/pinned-row-api",apiFunctions:{getPinnedTopRowCount:h$t,getPinnedBottomRowCount:p$t,getPinnedTopRow:m$t,getPinnedBottomRow:f$t}};C$t={version:ta,moduleName:"@ag-grid-community/overlay-api",apiFunctions:{showLoadingOverlay:v$t,showNoRowsOverlay:y$t,hideOverlay:_$t}};k$t={version:ta,moduleName:"@ag-grid-community/render-api",apiFunctions:{setGridAriaProperty:x$t,refreshCells:b$t,flashCells:w$t,refreshHeader:S$t,isAnimationFrameQueueEmpty:T$t,flushAllAnimationFrames:D$t,getSizesForCurrentTheme:E$t,getCellRendererInstances:M$t}};yKt={version:ta,moduleName:"@ag-grid-community/core-api",apiFunctions:{getGridId:P$t,destroy:R$t,isDestroyed:F$t,getGridOption:L$t,setGridOption:O$t,updateGridOptions:fWe}},_Kt={version:ta,moduleName:"@ag-grid-community/row-selection-api",apiFunctions:{setNodesSelected:lKt,selectAll:cKt,deselectAll:dKt,selectAllFiltered:uKt,deselectAllFiltered:hKt,selectAllOnCurrentPage:pKt,deselectAllOnCurrentPage:mKt,getSelectedNodes:fKt,getSelectedRows:gKt}},CKt={version:ta,moduleName:"@ag-grid-community/row-api",apiFunctions:{redrawRows:X$t,setRowNodeExpanded:Q$t,getRowNode:J$t,addRenderedRowListener:eKt,getRenderedNodes:tKt,forEachNode:iKt,getFirstDisplayedRow:nKt,getFirstDisplayedRowIndex:gWe,getLastDisplayedRow:rKt,getLastDisplayedRowIndex:vWe,getDisplayedRowAtIndex:sKt,getDisplayedRowCount:oKt,getModel:aKt}},xKt={version:ta,moduleName:"@ag-grid-community/scroll-api",apiFunctions:{getVerticalPixelRange:aUt,getHorizontalPixelRange:lUt,ensureColumnVisible:cWe,ensureIndexVisible:dWe,ensureNodeVisible:cUt}},bKt={version:ta,moduleName:"@ag-grid-community/keyboard-navigation-api",apiFunctions:{getFocusedCell:H$t,clearFocusedCell:G$t,setFocusedCell:W$t,setFocusedHeader:$$t,tabToNextCell:U$t,tabToPreviousCell:j$t}},wKt={version:ta,moduleName:"@ag-grid-community/event-api",apiFunctions:{addEventListener:N$t,addGlobalListener:B$t,removeEventListener:V$t,removeGlobalListener:z$t}},SKt={version:ta,moduleName:"@ag-grid-community/cell-api",apiFunctions:{expireValueCache:I$t,getValue:A$t,getCellValue:mWe}},m4e={version:ta,moduleName:"@ag-grid-community/menu-api",apiFunctions:{showColumnMenuAfterButtonClick:K$t,showColumnMenuAfterMouseClick:Y$t,showColumnMenu:q$t,hidePopupMenu:Z$t}},TKt={version:ta,moduleName:"@ag-grid-community/sort-api",apiFunctions:{onSortChanged:vKt}},DKt={version:ta,moduleName:"@ag-grid-community/api",dependantModules:[yKt,g$t,_Kt,a$t,CKt,u$t,xKt,C$t,bKt,wKt,k$t,SKt,m4e,TKt]};MKt=class extends Ot{constructor(){super(...arguments),this.beanName="stateService",this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Ap(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Ap(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=Ap(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}wireBeans(t){this.filterManager=t.filterManager,this.ctrlsService=t.ctrlsService,this.pivotResultColsService=t.pivotResultColsService,this.focusService=t.focusService,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.columnGroupStateService=t.columnGroupStateService,this.columnGetStateService=t.columnGetStateService,this.paginationService=t.paginationService,this.rowModel=t.rowModel,this.selectionService=t.selectionService,this.expansionService=t.expansionService,this.columnAnimationService=t.columnAnimationService,this.columnApplyStateService=t.columnApplyStateService,this.sideBarService=t.sideBarService,this.rangeService=t.rangeService}postConstruct(){this.isClientSideRowModel=this.rowModel.getType()==="clientSide",this.cachedState=this.gos.get("initialState")??{},this.ctrlsService.whenReady(()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));let[t,e,n]=this.addManagedEventListeners({newColumnsLoaded:({source:i})=>{i==="gridInitializing"&&(t(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{e?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{n?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())}})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState());let t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}setupStateOnColumnsInitialised(){let t=this.gos.get("initialState")??{};this.setColumnState(t),this.setColumnGroupState(t),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());let e=n=>()=>this.updateColumnState([n]);this.addManagedEventListeners({columnValueChanged:e("aggregation"),columnMoved:e("columnOrder"),columnPinned:e("columnPinning"),columnResized:e("columnSizing"),columnVisible:e("columnVisibility"),columnPivotChanged:e("pivot"),columnPivotModeChanged:e("pivot"),columnRowGroupChanged:e("rowGroup"),sortChanged:e("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){let{filter:t,rowGroupExpansion:e,rowSelection:n,pagination:i}=this.gos.get("initialState")??{},r=this.gos.get("advancedFilterModel");(t||r)&&this.setFilterState(t,r),e&&this.setRowGroupExpansionState(e),n&&this.setRowSelectionState(n),i&&this.setPaginationState(i),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState());let s=()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState());this.addManagedEventListeners({filterChanged:()=>this.updateCachedState("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{this.gos.get("groupDefaultExpanded")!==0&&setTimeout(()=>{s()})},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:o=>{(o.newPage||o.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){let{scroll:t,rangeSelection:e,focusedCell:n,columnOrder:i}=this.gos.get("initialState")??{};n&&this.setFocusedCellState(n),e&&this.setRangeSelectionState(e),t&&this.setScrollState(t),this.setColumnPivotState(!!i?.orderedColIds),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>this.updateCachedState("focusedCell",this.getFocusedCellState()),rangeSelectionChanged:r=>{r.finished&&this.updateCachedState("rangeSelection",this.getRangeSelectionState())},bodyScrollEnd:()=>this.updateCachedState("scroll",this.getScrollState())})}getColumnState(){let t=this.columnModel.isPivotMode(),e=[],n=[],i=[],r=[],s=[],o=[],a=[],l=[],c=[],d=0,u=this.columnGetStateService.getColumnState();for(let m=0;m<u.length;m++){let{colId:f,sort:_,sortIndex:x,rowGroup:D,rowGroupIndex:E,aggFunc:M,pivot:I,pivotIndex:z,pinned:G,hide:A,width:Y,flex:X}=u[m];c.push(f),_&&(e[x??d++]={colId:f,sort:_}),D&&(n[E??0]=f),typeof M=="string"&&i.push({colId:f,aggFunc:M}),I&&(r[z??0]=f),G&&(G==="right"?o:s).push(f),A&&a.push(f),(X||Y)&&l.push({colId:f,flex:X??void 0,width:Y})}return{sort:e.length?{sortModel:e}:void 0,rowGroup:n.length?{groupColIds:n}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:r.length||t?{pivotMode:t,pivotColIds:r}:void 0,columnPinning:s.length||o.length?{leftColIds:s,rightColIds:o}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}setColumnState(t){let{sort:e,rowGroup:n,aggregation:i,pivot:r,columnPinning:s,columnVisibility:o,columnSizing:a,columnOrder:l}=t,c={},d=_=>{let x=c[_];return x||(x={colId:_},c[_]=x,x)};e&&e.sortModel.forEach(({colId:_,sort:x},D)=>{let E=d(_);E.sort=x,E.sortIndex=D}),n&&n.groupColIds.forEach((_,x)=>{let D=d(_);D.rowGroup=!0,D.rowGroupIndex=x}),i&&i.aggregationModel.forEach(({colId:_,aggFunc:x})=>{d(_).aggFunc=x}),r&&(r.pivotColIds.forEach((_,x)=>{let D=d(_);D.pivot=!0,D.pivotIndex=x}),this.gos.updateGridOptions({options:{pivotMode:r.pivotMode},source:"gridInitializing"})),s&&(s.leftColIds.forEach(_=>{d(_).pinned="left"}),s.rightColIds.forEach(_=>{d(_).pinned="right"})),o&&o.hiddenColIds.forEach(_=>{d(_).hide=!0}),a&&a.columnSizingModel.forEach(({colId:_,flex:x,width:D})=>{let E=d(_);E.flex=x??null,E.width=D});let u=l?.orderedColIds,m=!!u?.length,f=m?u.map(_=>d(_)):Object.values(c);if(f.length){this.columnStates=f;let _={sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};this.columnApplyStateService.applyColumnState({state:f,applyOrder:m,defaultState:_},"gridInitializing")}}setColumnPivotState(t){let e=this.columnStates;this.columnStates=void 0;let n=this.columnGroupStates;if(this.columnGroupStates=void 0,!!this.pivotResultColsService.isPivotResultColsPresent()){if(e){let i=[];for(let r of e)this.pivotResultColsService.getPivotResultCol(r.colId)&&i.push(r);this.columnApplyStateService.applyColumnState({state:i,applyOrder:t},"gridInitializing")}n&&this.columnGroupStateService.setColumnGroupState(n,"gridInitializing")}}getColumnGroupState(){let t=this.columnGroupStateService.getColumnGroupState(),e=[];return t.forEach(({groupId:n,open:i})=>{i&&e.push(n)}),e.length?{openColumnGroupIds:e}:void 0}setColumnGroupState(t){if(!Object.prototype.hasOwnProperty.call(t,"columnGroup"))return;let e=new Set(t.columnGroup?.openColumnGroupIds),i=this.columnGroupStateService.getColumnGroupState().map(({groupId:r})=>{let s=e.has(r);return s&&e.delete(r),{groupId:r,open:s}});e.forEach(r=>{i.push({groupId:r,open:!0})}),i.length&&(this.columnGroupStates=i),this.columnGroupStateService.setColumnGroupState(i,"gridInitializing")}getFilterState(){let t=this.filterManager?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);let e=this.filterManager?.getAdvancedFilterModel()??void 0;return t||e?{filterModel:t,advancedFilterModel:e}:void 0}setFilterState(t,e){let{filterModel:n,advancedFilterModel:i}=t??{advancedFilterModel:e};n&&this.filterManager?.setFilterModel(n,"columnFilter"),i&&this.filterManager?.setAdvancedFilterModel(i)}getRangeSelectionState(){let t=this.rangeService?.getCellRanges().map(e=>{let{id:n,type:i,startRow:r,endRow:s,columns:o,startColumn:a}=e;return{id:n,type:i,startRow:r,endRow:s,colIds:o.map(l=>l.getColId()),startColId:a.getColId()}});return t?.length?{cellRanges:t}:void 0}setRangeSelectionState(t){if(!this.gos.get("enableRangeSelection")||!this.rangeService)return;let e=[];t.cellRanges.forEach(n=>{let i=[];if(n.colIds.forEach(s=>{let o=this.columnModel.getCol(s);o&&i.push(o)}),!i.length)return;let r=this.columnModel.getCol(n.startColId);if(!r){let s=this.visibleColsService.getAllCols(),o=new Set(i);r=s.find(a=>o.has(a))}e.push(St(ve({},n),{columns:i,startColumn:r}))}),this.rangeService.setCellRanges(e)}getScrollState(){if(!this.isClientSideRowModel)return;let t=this.ctrlsService.getGridBodyCtrl()?.getScrollFeature(),{left:e}=t?.getHScrollPosition()??{left:0},{top:n}=t?.getVScrollPosition()??{top:0};return n||e?{top:n,left:e}:void 0}setScrollState(t){if(!this.isClientSideRowModel)return;let{top:e,left:n}=t;this.ctrlsService.getGridBodyCtrl()?.getScrollFeature().setScrollPosition(e,n)}getSideBarState(){return this.sideBarService?.getSideBarComp()?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let t=this.focusService.getFocusedCell();if(t){let{column:e,rowIndex:n,rowPinned:i}=t;return{colId:e.getColId(),rowIndex:n,rowPinned:i}}}setFocusedCellState(t){if(!this.isClientSideRowModel)return;let{colId:e,rowIndex:n,rowPinned:i}=t;this.focusService.setFocusedCell({column:this.columnModel.getCol(e),rowIndex:n,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){if(!this.paginationService)return;let t=this.paginationService.getCurrentPage(),e=this.gos.get("paginationAutoPageSize")?void 0:this.paginationService.getPageSize();if(!(!t&&!e))return{page:t,pageSize:e}}setPaginationState(t){this.paginationService&&(t.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationService.setPageSize(t.pageSize,"initialState"),typeof t.page=="number"&&this.paginationService.setPage(t.page))}getRowSelectionState(){let t=this.selectionService.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(t){this.selectionService.setSelectionState(t,"gridInitializing")}getRowGroupExpansionState(){let t=this.expansionService.getExpandedRows();return t.length?{expandedRowGroupIds:t}:void 0}setRowGroupExpansionState(t){this.expansionService.expandRows(t.expandedRowGroupIds)}updateColumnState(t){let e=this.getColumnState(),n=!1;Object.entries(e).forEach(([i,r])=>{mD(r,this.cachedState[i])||(n=!0)}),this.cachedState=ve(ve({},this.cachedState),e),n&&this.dispatchStateUpdateEvent(t)}updateCachedState(t,e){let n=this.cachedState[t];this.setCachedStateValue(t,e),mD(e,n)||this.dispatchStateUpdateEvent([t])}setCachedStateValue(t,e){this.cachedState=St(ve({},this.cachedState),{[t]:e})}refreshStaleState(){this.staleStateKeys.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(t){this.suppressEvents||(t.forEach(e=>this.queuedUpdateSources.add(e)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){let t=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear(),this.eventService.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}suppressEventsAndDispatchInitEvent(t){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),t(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},yWe={version:ta,moduleName:"@ag-grid-community/state-core",beans:[MKt]},kKt={version:ta,moduleName:"@ag-grid-community/state-api",apiFunctions:{getState:EKt},dependantModules:[yWe]},IKt={version:ta,moduleName:"@ag-grid-community/state",dependantModules:[yWe,kKt]};HKt=class extends Ot{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeService"}wireBeans(t){this.ctrlsService=t.ctrlsService,this.paginationService=t.paginationService}postConstruct(){this.ctrlsService.whenReady(t=>{this.centerRowsCtrl=t.center;let e=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:e,scrollVisibilityChanged:e}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.paginationService.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;let t=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(t>0){let e=()=>{let n=Math.max(this.gos.getRowHeightAsNumber(),1),i=Math.floor(t/n);this.paginationService.setPageSize(i,"autoCalculated")};this.isBodyRendered?Ap(()=>e(),50)():(e(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};GKt=class extends ai{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let t=this.selectPageSizeComp.getValue();if(!t)return;let e=Number(t);isNaN(e)||e<1||e===this.paginationService.getPageSize()||(this.paginationService.setPageSize(e,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(t){this.paginationService=t.paginationService}postConstruct(){this.addManagedPropertyListener("paginationPageSizeSelector",()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:t=>this.handlePaginationChanged(t)})}handlePaginationChanged(t){if(!this.selectPageSizeComp||!t?.newPageSize)return;let e=this.paginationService.getPageSize();this.getPageSizeSelectorValues().includes(e)?this.selectPageSizeComp.setValue(e.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(t){this.selectPageSizeComp&&this.reset(),t&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))}reset(){zo(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get("paginationPageSizeSelector")!==!1}reloadPageSizesSelector(){let t=this.getPageSizeSelectorValues(),e=this.paginationService.getPageSize(),n=!e||!t.includes(e);n&&(t.unshift(""),wt(`The paginationPageSize grid option is set to a value that is not in the list of page size options.
                Please make sure that the paginationPageSize grid option is set to one of the values in the 
                paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.`)),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp));let i=this.localeService.getLocaleTextFunc(),r=i("pageSizeSelectorLabel","Page Size:"),s=t.map(a=>({value:String(a),text:String(a)})),o=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new np).addOptions(s).setValue(String(n?"":e)).setAriaLabel(o).setLabel(r).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=n}getPageSizeSelectorValues(){let t=[20,50,100],e=this.gos.get("paginationPageSizeSelector");return!Array.isArray(e)||!this.validateValues(e)?t:[...e].sort((n,i)=>n-i)}validateValues(t){if(!t.length)return wt(`The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.
                If you want to hide the page size selector, please set the paginationPageSizeSelector to false.`),!1;for(let e=0;e<t.length;e++){let n=t[e],i=typeof n=="number",r=n>0;if(!i)return wt(`The paginationPageSizeSelector grid option contains a non-numeric value.
                    Please make sure that all values in the paginationPageSizeSelector array are numbers.`),!1;if(!r)return wt(`The paginationPageSizeSelector grid option contains a negative number or zero.
                    Please make sure that all values in the paginationPageSizeSelector array are positive.`),!1}return!0}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},WKt={selector:"AG-PAGE-SIZE-SELECTOR",component:GKt},UKt=class extends j1{constructor(){super(),this.btFirst=Bt,this.btPrevious=Bt,this.btNext=Bt,this.btLast=Bt,this.lbRecordCount=Bt,this.lbFirstRowOnPage=Bt,this.lbLastRowOnPage=Bt,this.lbCurrent=Bt,this.lbTotal=Bt,this.pageSizeComp=Bt,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1}wireBeans(t){this.rowModel=t.rowModel,this.paginationService=t.paginationService,this.focusService=t.focusService,this.ariaAnnouncementService=t.ariaAnnouncementService}postConstruct(){let t=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[WKt]);let{btFirst:e,btPrevious:n,btNext:i,btLast:r}=this;this.activateTabIndex([e,n,i,r]),e.insertAdjacentElement("afterbegin",tr(t?"last":"first",this.gos)),n.insertAdjacentElement("afterbegin",tr(t?"next":"previous",this.gos)),i.insertAdjacentElement("afterbegin",tr(t?"previous":"next",this.gos)),r.insertAdjacentElement("afterbegin",tr(t?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:s=>{this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(s):this.focusService.focusGridInnerElement(s)},forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(t){this.allowFocusInnerElement=t}onPaginationChanged(){let e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged: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(t=>{let{el:e,fn:n}=t;this.addManagedListeners(e,{click:n,keydown:i=>{(i.key===It.ENTER||i.key===It.SPACE)&&(i.preventDefault(),n())}})}),f4e(this,this.getGui(),this.focusService),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationService.goToFirstPage()}formatNumber(t){let e=this.gos.getCallback("paginationNumberFormatter");if(e)return e({value:t});let n=this.localeService.getLocaleTextFunc(),i=n("thousandSeparator",","),r=n("decimalSeparator",".");return Yy(t,i,r)}getTemplate(){let t=this.localeService.getLocaleTextFunc(),e=t("page","Page"),n=t("to","to"),i=t("of","of"),r=t("firstPage","First Page"),s=t("previousPage","Previous Page"),o=t("nextPage","Next Page"),a=t("lastPage","Last Page"),l=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${l}">
                <ag-page-size-selector data-ref="pageSizeComp"></ag-page-size-selector>
                <span class="ag-paging-row-summary-panel">
                    <span id="ag-${l}-first-row" data-ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
                    <span id="ag-${l}-to">${n}</span>
                    <span id="ag-${l}-last-row" data-ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
                    <span id="ag-${l}-of">${i}</span>
                    <span id="ag-${l}-row-count" data-ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
                </span>
                <span class="ag-paging-page-summary-panel" role="presentation">
                    <div data-ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
                    <div data-ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${s}"></div>
                    <span class="ag-paging-description">
                        <span id="ag-${l}-start-page">${e}</span>
                        <span id="ag-${l}-start-page-number" data-ref="lbCurrent" class="ag-paging-number"></span>
                        <span id="ag-${l}-of-page">${i}</span>
                        <span id="ag-${l}-of-page-number" data-ref="lbTotal" class="ag-paging-number"></span>
                    </span>
                    <div data-ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
                    <div data-ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>
                </span>
            </div>`}onBtNext(){this.nextButtonDisabled||this.paginationService.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationService.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationService.goToLastPage()}enableOrDisableButtons(){let t=this.paginationService.getCurrentPage(),e=this.rowModel.isLastRowIndexKnown(),n=this.paginationService.getTotalPages();this.previousAndFirstButtonsDisabled=t===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);let i=this.isZeroPagesToDisplay(),r=t===n-1;this.nextButtonDisabled=r||i,this.lastButtonDisabled=!e||i||t===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(t,e){wA(t,e),t.classList.toggle("ag-disabled",e)}isZeroPagesToDisplay(){let t=this.rowModel.isLastRowIndexKnown(),e=this.paginationService.getTotalPages();return t&&e===0}updateLabels(){let t=this.rowModel.isLastRowIndexKnown(),e=this.paginationService.getTotalPages(),n=this.paginationService.getMasterRowCount(),i=t?n:null;if(i===1){let M=this.rowModel.getRow(0);if(M&&M.group&&!(M.groupData||M.aggData)){this.setTotalLabelsToZero();return}}let r=this.paginationService.getCurrentPage(),s=this.paginationService.getPageSize(),o,a;this.isZeroPagesToDisplay()?o=a=0:(o=s*r+1,a=o+s-1,t&&a>i&&(a=i));let l=o+s-1,c=!t&&n<l,d=this.formatNumber(o);this.lbFirstRowOnPage.textContent=d;let u,m=this.localeService.getLocaleTextFunc();c?u=m("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;let _=e>0?r+1:0,x=this.formatNumber(_);this.lbCurrent.textContent=x;let D,E;if(t)D=this.formatNumber(e),E=this.formatNumber(i);else{let M=m("more","more");D=M,E=M}this.lbTotal.textContent=D,this.lbRecordCount.textContent=E,this.announceAriaStatus(d,u,E,x,D)}announceAriaStatus(t,e,n,i,r){let s=this.localeService.getLocaleTextFunc(),o=s("page","Page"),a=s("to","to"),l=s("of","of"),c=`${t} ${a} ${e} ${l} ${n}`,d=`${o} ${i} ${l} ${r}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnouncementService.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnouncementService.announceValue(d,"paginationPage"))}setTotalLabelsToZero(){let t=this.formatNumber(0);this.lbFirstRowOnPage.textContent=t,this.lbCurrent.textContent=t,this.lbLastRowOnPage.textContent=t,this.lbTotal.textContent=t,this.lbRecordCount.textContent=t,this.announceAriaStatus(t,t,t,t,t)}},jKt={selector:"AG-PAGINATION",component:UKt},$Kt=class extends Ot{constructor(){super(...arguments),this.beanName="paginationService",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}wireBeans(t){this.rowModel=t.rowModel,this.pageBoundsService=t.pageBoundsService}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return jKt}isPaginateChildRows(){return this.gos.get("groupRemoveSingleChildren")||this.gos.get("groupRemoveLowestSingleChildren")?!0:this.gos.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(t){!this.active||this.currentPage===t||typeof this.currentPage!="number"||(this.currentPage=t,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}isRowPresent(t){return t.rowIndex>=this.topDisplayedRowIndex&&t.rowIndex<=this.bottomDisplayedRowIndex}getPageForIndex(t){return Math.floor(t/this.pageSize)}goToPageWithIndex(t){if(!this.active)return;let e=this.getPageForIndex(t);this.goToPage(e)}isRowInPage(t){return this.active?this.getPageForIndex(t.rowIndex)===this.currentPage:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){let t=this.rowModel.getRowCount(),e=Math.floor(t/this.pageSize);this.goToPage(e)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(t){this.currentPage=t}get pageSize(){return Di(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:Di(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:Di(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:Di(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.pageBoundsService.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;let t=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==t&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(t,e){let n=this.pageSize;switch(e){case"autoCalculated":this.pageSizeAutoCalculated=t;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=t,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=t;break;case"gridOptions":this.pageSizeFromGridOptions=t,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}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}let t=this.masterRowCount-1;this.totalPages=Math.floor(t/this.pageSize)+1,this.adjustCurrentPageIfInvalid();let e=this.pageSize*this.currentPage,n=this.pageSize*(this.currentPage+1)-1;if(n>t&&(n=t),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(e),n===t)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{let i=this.rowModel.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=i-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),this.masterRowCount===0){this.setZeroRows();return}let t=this.masterRowCount-1;this.totalPages=Math.floor(t/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>t&&(this.bottomDisplayedRowIndex=t)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(t){let{keepRenderedRows:e=!1,newPage:n=!1,newPageSize:i=!1}=t;this.eventService.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:n,newPageSize:i,keepRenderedRows:e})}},_We={version:ta,moduleName:"@ag-grid-community/pagination-core",beans:[$Kt,HKt]},KKt={version:ta,moduleName:"@ag-grid-community/pagination-api",dependantModules:[_We],apiFunctions:{paginationIsLastPageFound:AKt,paginationGetPageSize:PKt,paginationGetCurrentPage:RKt,paginationGetTotalPages:FKt,paginationGetRowCount:LKt,paginationGoToNextPage:OKt,paginationGoToPreviousPage:NKt,paginationGoToFirstPage:VKt,paginationGoToLastPage:BKt,paginationGoToPage:zKt}},YKt={version:ta,moduleName:"@ag-grid-community/pagination",dependantModules:[_We,KKt]},T4="clientSide",l3="serverSide",pA="infinite",qKt={onGroupExpandedOrCollapsed:[T4],refreshClientSideRowModel:[T4],forEachLeafNode:[T4],forEachNodeAfterFilter:[T4],forEachNodeAfterFilterAndSort:[T4],resetRowHeights:[T4],applyTransaction:[T4],applyTransactionAsync:[T4],flushAsyncTransactions:[T4],getBestCostNodeSelection:[T4],getServerSideSelectionState:[l3],setServerSideSelectionState:[l3],applyServerSideTransaction:[l3],applyServerSideTransactionAsync:[l3],applyServerSideRowData:[l3],retryServerSideLoads:[l3],flushServerSideAsyncTransactions:[l3],refreshServerSide:[l3],getServerSideGroupLevelState:[l3],refreshInfiniteCache:[pA],purgeInfiniteCache:[pA],getInfiniteRowCount:[pA],isLastRowIndexKnown:[pA],expandAll:[T4,l3],collapseAll:[T4,l3],onRowHeightChanged:[T4,l3],setRowCount:[pA,l3],getCacheBlockState:[pA,l3]},ZKt={getValue:{version:"v31.3",new:"getCellValue"},getFirstDisplayedRow:{version:"v31.1",new:"getFirstDisplayedRowIndex"},getLastDisplayedRow:{version:"v31.1",new:"getLastDisplayedRowIndex"},getModel:{version:"v31.1",message:"Please use the appropriate grid API methods instead."},setColumnVisible:{version:"v31.1",old:"setColumnVisible(key,visible)",new:"setColumnsVisible([key],visible)"},setColumnPinned:{version:"v31.1",old:"setColumnPinned(key,pinned)",new:"setColumnsPinned([key],pinned)"},moveColumn:{version:"v31.1",old:"moveColumn(key, toIndex)",new:"moveColumns([key], toIndex)"},setColumnWidth:{version:"v31.1",old:"setColumnWidth(col, width)",new:"setColumnWidths([{key: col, newWidth: width}])"},autoSizeColumn:{version:"v31.1",old:"autoSizeColumn(key, skipHeader)",new:"autoSizeColumns([key], skipHeader)"},addAggFunc:{version:"v31.1",old:"addAggFunc(key, func)",new:"addAggFuncs({ key: func })"},removeValueColumn:{version:"v31.1",old:"removeValueColumn(colKey)",new:"removeValueColumns([colKey])"},addValueColumn:{version:"v31.1",old:"addValueColumn(colKey)",new:"addValueColumns([colKey])"},removeRowGroupColumn:{version:"v31.1",old:"removeRowGroupColumn(colKey)",new:"removeRowGroupColumns([colKey])"},addRowGroupColumn:{version:"v31.1",old:"addRowGroupColumn(colKey)",new:"addRowGroupColumns([colKey])"},removePivotColumn:{version:"v31.1",old:"removePivotColumn(colKey)",new:"removePivotColumns([colKey])"},addPivotColumn:{version:"v31.1",old:"addPivotColumn(colKey)",new:"addPivotColumns([colKey])"},showColumnMenuAfterButtonClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere."},showColumnMenuAfterMouseClick:{version:"v31.1",message:"Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere."},getFilterInstance:{version:"v31.1",message:"'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."},showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'}};QKt={columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"}},S7=(t,e)=>(e.rowModelType??"clientSide")==="clientSide"?{module:"@ag-grid-enterprise/row-grouping"}:null,JKt={enableRowGroup:S7,rowGroup:S7,rowGroupIndex:S7,enablePivot:S7,enableValue:S7,pivot:S7,pivotIndex:S7,aggFunc:S7,cellEditor:t=>t.cellEditor==="agRichSelect"||t.cellEditor==="agRichSelectCellEditor"?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:t=>{let e=["columnsMenuTab","generalMenuTab"];return t.menuTabs?.some(n=>e.includes(n))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],dependencies:(t,{rowSelection:e})=>e==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:(t,{rowSelection:e})=>e==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:(t,{rowSelection:e})=>e==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>yA},eYt={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,cellAriaRole: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,columnChooserParams: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,suppressHeaderMenuButton: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,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0},tYt=Object.keys(eYt),yA={objectName:"colDef",allProperties:tYt,docsUrl:"column-properties/",deprecations:QKt,validations:JKt},iYt=()=>({advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."},suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."}}),nYt={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"	",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0},rYt=()=>({sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",dependencies:t=>{let e=t.rowModelType??"clientSide";switch(e){case"clientSide":{let n=`treeData requires 'getDataPath' in the ${e} row model.`;return t.getDataPath?null:n}case"serverSide":{let n=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${e} row model.`;return t.isServerSideGroup&&t.getServerSideGroupKey?null:n}}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],dependencies:t=>{switch(t.rowModelType??"clientSide"){case"clientSide":return null;case"serverSide":return t.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null}return null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:[void 0,"bottom"]}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},columnDefs:()=>yA,defaultColDef:()=>yA,defaultColGroupDef:()=>yA,autoGroupColumnDef:()=>yA}),sYt=()=>({objectName:"gridOptions",allProperties:[...zB.ALL_PROPERTIES,...HB.EVENT_CALLBACKS],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:iYt(),validations:rYt()}),oYt=class extends Ot{constructor(){super(...arguments),this.beanName="validationService"}wireBeans(t){this.beans=t,this.gridOptions=t.gridOptions}postConstruct(){this.processGridOptions(this.gridOptions)}processGridOptions(t){this.processOptions(t,sYt())}processColumnDefs(t){this.processOptions(t,yA)}validateApiFunction(t,e){return XKt(t,e,this.beans)}processOptions(t,e){let{validations:n,deprecations:i,allProperties:r,propertyExceptions:s,objectName:o,docsUrl:a}=e;r&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(t,[...s??[],...Object.keys(i)],r,o,a);let l=new Set;Object.keys(t).forEach(d=>{let u=i[d];if(u)if("renamed"in u){let{renamed:M,version:I}=u;l.add(`As of v${I}, ${String(d)} is deprecated. Please use ${String(M)} instead.`),t[M]=t[d]}else{let{message:M,version:I}=u;l.add(`As of v${I}, ${String(d)} is deprecated. ${M??""}`)}let m=t[d];if(m==null||m===!1)return;let f=n[d],_;if(f)if(typeof f=="function"){let M=f(t,this.gridOptions);if(!M)return;if("objectName"in M){let I=t[d];if(Array.isArray(I)){I.forEach(z=>{this.processOptions(z,M)});return}this.processOptions(t[d],M);return}_=M}else _=f;else return;let{module:x,dependencies:D,supportedRowModels:E}=_;if(E){let M=this.gridOptions.rowModelType??"clientSide";if(!E.includes(M)){l.add(`${String(d)} is not supported with the '${M}' row model.`);return}}if(x){let M=Array.isArray(x)?x:[x],I=!0;if(M.forEach(z=>{Sa.__assertRegistered(z,String(d),this.gridId)||(I=!1,l.add(`${String(d)} is only available when ${z} is loaded.`))}),!I)return}if(D){let M=this.checkForWarning(d,D,t);if(M){l.add(M);return}}}),l.size>0&&l.forEach(d=>{wt(d)})}checkForWarning(t,e,n){if(typeof e=="function")return e(n,this.gridOptions);let r=Object.entries(e).find(([a,l])=>{let c=n[a];return!l.includes(c)});if(!r)return null;let[s,o]=r;return o.length>1?`'${String(t)}' requires '${s}' to be one of [${o.join(", ")}].`:`'${String(t)}' requires '${s}' to be ${o[0]}.`}checkProperties(t,e,n,i,r){let s=["__ob__","__v_skip","__metadata__"],o=kzt(Object.getOwnPropertyNames(t),[...s,...e,...n],n);if(Rh(o,(a,l)=>{let c=`invalid ${i} property '${a}' did you mean any of these: ${l.slice(0,8).join(", ")}.`;n.includes("context")&&(c+=`
If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),wt(c)}),Object.keys(o).length>0&&r){let a=this.getFrameworkOverrides().getDocLink(r);wt(`to see all the valid ${i} properties please check: ${a}`)}}},aYt={version:ta,moduleName:"@ag-grid-community/core"},lYt={version:ta,moduleName:"@ag-grid-community/core-validations",beans:[oYt]},ZZ={version:ta,moduleName:"@ag-grid-community/core-community-features",dependantModules:[aYt,lYt,EUt,nGt,IKt,o$t,fjt,YKt,DKt]},cYt=class extends Ot{constructor(){super(...arguments),this.beanName="gridDestroyService",this.destroyCalled=!1}wireBeans(t){this.beans=t}destroy(){this.destroyCalled||(this.eventService.dispatchEvent({type:"gridPreDestroyed",state:this.beans.stateService?.getState()??{}}),this.destroyCalled=!0,this.beans.ctrlsService.get("gridCtrl")?.destroyGridUi(),this.beans.context.destroy(),super.destroy())}isDestroyCalled(){return this.destroyCalled}},IZ=new Set(["gridPreDestroyed","fillStart","pasteStart"]),tz=t=>t==="checkboxSelected"||t==="rowClicked"||t==="spaceKey"||t==="uiSelectAll"||t==="uiSelectAllCurrentPage"||t==="uiSelectAllFiltered",dYt=new Map([...zB.BOOLEAN_PROPERTIES.map(t=>[t,y3e]),...zB.NUMBER_PROPERTIES.map(t=>[t,HGe]),["groupAggFiltering",t=>typeof t=="function"?t:y3e(t)],["pageSize",p5(1)],["autoSizePadding",p5(0)],["keepDetailRowsCount",p5(1)],["rowBuffer",p5(0)],["infiniteInitialRowCount",p5(1)],["cacheOverflowSize",p5(1)],["cacheBlockSize",p5(1)],["serverSideInitialRowCount",p5(1)],["viewportRowModelPageSize",p5(1)],["viewportRowModelBufferSize",p5(0)]]);hYt=(()=>{let t=class xWe extends Ot{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new y5,this.globalEventHandlerFactory=n=>(i,r)=>{if(!this.isAlive())return;let s=IZ.has(i);if(s&&!n||!s&&n)return;let o=HB.getCallbackForEvent(i),a=this.gridOptions[o];typeof a=="function"&&this.frameworkOverrides.wrapOutgoing(()=>{a(r)})}}wireBeans(n){this.gridOptions=n.gridOptions,this.eGridDiv=n.eGridDiv,this.validationService=n.validationService,this.environment=n.environment,this.api=n.gridApi}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){let n=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),n),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.getScrollbarWidth(),this.addManagedEventListeners({gridOptionsChanged:({options:i})=>{this.updateGridOptions({options:i,force:!0,source:"gridOptionsUpdated"})}})}get(n){return this.gridOptions[n]??nYt[n]}getCallback(n){return this.mergeGridCommonParams(this.gridOptions[n])}exists(n){return Di(this.gridOptions[n])}mergeGridCommonParams(n){return n&&(r=>{let s=r;return s.api=this.api,s.context=this.gridOptionsContext,n(s)})}updateGridOptions({options:n,force:i,source:r="api"}){let s={id:xWe.changeSetId++,properties:[]},o=[];Object.entries(n).forEach(([a,l])=>{r==="api"&&GBt[a]&&wt(`${a} is an initial property and cannot be updated.`);let c=CWe(a,l),d=i||typeof c=="object"&&r==="api",u=this.gridOptions[a];if(d||u!==c){this.gridOptions[a]=c;let m={type:a,currentValue:c,previousValue:u,changeSet:s,source:r};o.push(m)}}),this.validationService?.processGridOptions(this.gridOptions),s.properties=o.map(a=>a.type),o.forEach(a=>{this.gridOptions.debug&&Kv(`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propertyEventService.dispatchEvent(a)})}addPropertyEventListener(n,i){this.propertyEventService.addEventListener(n,i)}removePropertyEventListener(n,i){this.propertyEventService.removeEventListener(n,i)}getScrollbarWidth(){if(this.scrollbarWidth==null){let i=typeof this.gridOptions.scrollbarWidth=="number"&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:izt();i!=null&&(this.scrollbarWidth=i,this.eventService.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}isRowModelType(n){return this.gridOptions.rowModelType===n||n==="clientSide"&&Ls(this.gridOptions.rowModelType)}isDomLayout(n){return(this.gridOptions.domLayout??"normal")===n}isRowSelection(){return this.gridOptions.rowSelection==="single"||this.gridOptions.rowSelection==="multiple"}useAsyncEvents(){return!this.get("suppressAsyncEvents")}isGetRowHeightFunction(){return typeof this.gridOptions.getRowHeight=="function"}getRowHeightForNode(n,i=!1,r){if(r==null&&(r=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(i)return{height:r,estimated:!0};let o={node:n,data:n.data},a=this.getCallback("getRowHeight")(o);if(this.isNumeric(a))return a===0&&wt("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,a),estimated:!1}}return n.detail&&this.get("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:r,estimated:!1}}getMasterDetailRowHeight(){return this.get("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||Ls(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();let n=this.environment.refreshRowHeightVariable();return n!==-1?n:(wt("row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}isNumeric(n){return!isNaN(n)&&typeof n=="number"&&isFinite(n)}getDomDataKey(){return this.domDataKey}getDomData(n,i){let r=n[this.getDomDataKey()];return r?r[i]:void 0}setDomData(n,i,r){let s=this.getDomDataKey(),o=n[s];Ls(o)&&(o={},n[s]=o),o[i]=r}getDocument(){let n=null;return this.gridOptions.getDocument&&Di(this.gridOptions.getDocument)?n=this.gridOptions.getDocument():this.eGridDiv&&(n=this.eGridDiv.ownerDocument),n&&Di(n)?n:document}getWindow(){return this.getDocument().defaultView||window}getRootNode(){return this.eGridDiv.getRootNode()}getActiveDomElement(){return this.getRootNode().activeElement}isNothingFocused(){let n=this.getDocument(),i=this.getActiveDomElement();return i===null||i===n.body}getAsyncTransactionWaitMillis(){return Di(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}isAnimateRows(){return this.get("ensureDomOrder")?!1:this.get("animateRows")}isGroupRowsSticky(){return!(this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"))}isColumnsSortingCoupledToGroup(){return!this.gridOptions.autoGroupColumnDef?.comparator&&!this.get("treeData")}getGroupAggFiltering(){let n=this.gridOptions.groupAggFiltering;if(typeof n=="function")return this.getCallback("groupAggFiltering");if(n===!0)return()=>!0}getGrandTotalRow(){let n=this.gridOptions.grandTotalRow;if(n)return n;if(this.gridOptions.groupIncludeTotalFooter)return"bottom"}getGroupTotalRowCallback(){let n=this.get("groupTotalRow");if(typeof n=="function")return this.getCallback("groupTotalRow");if(n)return()=>n;let i=this.get("groupIncludeFooter");if(typeof i=="function"){let r=this.getCallback("groupIncludeFooter");return s=>r(s)?"bottom":void 0}return()=>i?"bottom":void 0}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?this.gridOptions.groupDisplayType==="multipleColumns":this.get("groupHideOpenParents")}isGroupUseEntireRow(n){return n?!1:this.gridOptions.groupDisplayType==="groupRows"}getGridCommonParams(){return{api:this.api,context:this.gridOptionsContext}}addGridCommonParams(n){let i=n;return i.api=this.api,i.context=this.gridOptionsContext,i}getRowIdCallback(){let n=this.getCallback("getRowId");return n===void 0?n:i=>{let r=n(i);return typeof r!="string"&&(wt("The getRowId callback must return a string. The ID ",r," is being cast to a string."),r=String(r)),r}}};return t.changeSetId=0,t})(),pYt=hYt,mYt=class extends Ot{constructor(){super(...arguments),this.beanName="headerPositionUtils"}wireBeans(t){this.visibleColsService=t.visibleColsService,this.ctrlsService=t.ctrlsService}findHeader(t,e){let n,i;if(Sm(t.column)?n=this.visibleColsService.getGroupAtDirection(t.column,e):(i=`getCol${e}`,n=this.visibleColsService[i](t.column)),!n)return;let{headerRowIndex:r}=t;if(this.getHeaderRowType(r)!=="filter"){let a=[n];for(;n.getParent();)n=n.getParent(),a.push(n);n=a[a.length-1-r]}let{column:s,headerRowIndex:o}=this.getHeaderIndexToFocus(n,r);return{column:s,headerRowIndex:o}}getHeaderIndexToFocus(t,e){let n;if(Sm(t)&&this.isAnyChildSpanningHeaderHeight(t)&&t.isPadding()){let i=t;n=i.getLeafColumns()[0];let r=n;for(;r!==i;)e++,r=r.getParent()}return{column:n||t,headerRowIndex:e}}isAnyChildSpanningHeaderHeight(t){return t?t.getLeafColumns().some(e=>e.isSpanHeaderHeight()):!1}getColumnVisibleParent(t,e){let n=this.getHeaderRowType(e),i=n==="filter",r=n==="column",s=i?t:t.getParent(),o=e-1,a=o;if(r&&this.isAnyChildSpanningHeaderHeight(t.getParent())){for(;s&&s.isPadding();)s=s.getParent(),o--;a=o,o<0&&(s=t,o=e,a=void 0)}return{column:s,headerRowIndex:o,headerRowIndexWithoutSpan:a}}getColumnVisibleChild(t,e,n="After"){let i=this.getHeaderRowType(e),r=t,s=e+1,o=s;if(i==="group"){let a=t.getDisplayedLeafColumns(),l=n==="After"?a[0]:Ar(a),c=[],d=l;for(;d.getParent()!==t;)d=d.getParent(),c.push(d);if(r=l,l.isSpanHeaderHeight())for(let u=c.length-1;u>=0;u--){let m=c[u];if(!m.isPadding()){r=m;break}s++}else r=Ar(c),r||(r=l)}return{column:r,headerRowIndex:s,headerRowIndexWithoutSpan:o}}getHeaderRowType(t){let e=this.ctrlsService.getHeaderRowContainerCtrl();if(e)return e.getRowType(t)}findColAtEdgeForHeaderRow(t,e){let n=this.visibleColsService.getAllCols(),i=n[e==="start"?0:n.length-1];if(!i)return;let s=this.ctrlsService.getHeaderRowContainerCtrl(i.getPinned())?.getRowType(t);if(s=="group"){let o=this.visibleColsService.getColGroupAtLevel(i,t);return{headerRowIndex:t,column:o}}return{headerRowIndex:s==null?-1:t,column:i}}},fYt=class extends Ot{constructor(){super(...arguments),this.beanName="localeService"}getLocaleTextFunc(){let t=this.gos.getCallback("getLocaleText");if(t)return(n,i,r)=>t({key:n,defaultValue:i,variableValues:r});let e=this.gos.get("localeText");return(n,i,r)=>{let s=e&&e[n];if(s&&r&&r.length){let o=0;for(;!(o>=r.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",r[o++])}return s??i}}},gYt=class extends Ot{constructor(){super(...arguments),this.beanName="apiEventService",this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new R3e(this.getFrameworkOverrides())}addEventListener(t,e){let n=this.frameworkEventWrappingService.wrap(e),i=this.gos.useAsyncEvents()&&!IZ.has(t),r=i?this.asyncEventListeners:this.syncEventListeners;r.has(t)||r.set(t,new Set),r.get(t).add(n),this.eventService.addEventListener(t,n,i)}removeEventListener(t,e){let n=this.frameworkEventWrappingService.unwrap(e),r=!!this.asyncEventListeners.get(t)?.delete(n);r||this.syncEventListeners.get(t)?.delete(n),this.eventService.removeEventListener(t,n,r)}addGlobalListener(t){let e=this.frameworkEventWrappingService.wrapGlobal(t);if(this.gos.useAsyncEvents()){let i=(s,o)=>{IZ.has(s)&&e(s,o)},r=(s,o)=>{IZ.has(s)||e(s,o)};this.globalEventListenerPairs.set(t,{syncListener:i,asyncListener:r}),this.eventService.addGlobalListener(i,!1),this.eventService.addGlobalListener(r,!0)}else this.syncGlobalEventListeners.add(e),this.eventService.addGlobalListener(e,!1)}removeGlobalListener(t){let e=this.frameworkEventWrappingService.unwrapGlobal(t);if(this.globalEventListenerPairs.has(e)){let{syncListener:i,asyncListener:r}=this.globalEventListenerPairs.get(e);this.eventService.removeGlobalListener(i,!1),this.eventService.removeGlobalListener(r,!0),this.globalEventListenerPairs.delete(t)}else this.syncGlobalEventListeners.delete(e),this.eventService.removeGlobalListener(e,!1)}destroyEventListeners(t,e){t.forEach((n,i)=>{n.forEach(r=>this.eventService.removeEventListener(i,r,e)),n.clear()}),t.clear()}destroyGlobalListeners(t,e){t.forEach(n=>this.eventService.removeGlobalListener(n,e)),t.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:t,asyncListener:e})=>{this.eventService.removeGlobalListener(t,!1),this.eventService.removeGlobalListener(e,!0)}),this.globalEventListenerPairs.clear()}},vYt=class extends Ot{constructor(){super(...arguments),this.beanName="pageBoundsListener"}wireBeans(t){this.rowModel=t.rowModel,this.paginationService=t.paginationService,this.pageBoundsService=t.pageBoundsService}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(t){this.calculatePages(),this.eventService.dispatchEvent({type:"paginationChanged",animate:t?.animate??!1,newData:t?.newData??!1,newPage:t?.newPage??!1,newPageSize:t?.newPageSize??!1,keepRenderedRows:t?.keepRenderedRows??!1})}calculatePages(){this.paginationService?this.paginationService.calculatePages():this.pageBoundsService.calculateBounds(0,this.rowModel.getRowCount()-1)}},yYt=class extends Ot{constructor(){super(...arguments),this.beanName="pageBoundsService",this.pixelOffset=0}wireBeans(t){this.rowModel=t.rowModel}getFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getCurrentPageHeight(){return Ls(this.topRowBounds)||Ls(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){let t=this.topRowBounds?this.topRowBounds.rowTop:0,e=this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0;return{pageFirstPixel:t,pageLastPixel:e}}calculateBounds(t,e){this.topRowBounds=this.rowModel.getRowBounds(t),this.topRowBounds&&(this.topRowBounds.rowIndex=t),this.bottomRowBounds=this.rowModel.getRowBounds(e),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=e),this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){let t=Di(this.topRowBounds)?this.topRowBounds.rowTop:0;this.pixelOffset!==t&&(this.pixelOffset=t,this.eventService.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},_Yt=class extends Ot{constructor(){super(),this.beanName="ariaAnnouncementService",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.updateAnnouncement=Ap(this.updateAnnouncement.bind(this),200)}wireBeans(t){this.eGridDiv=t.eGridDiv}postConstruct(){let t=this.gos.getDocument(),e=this.descriptionContainer=t.createElement("div");e.classList.add("ag-aria-description-container"),aGe(e,"polite"),KBt(e,"additions text"),$Bt(e,!0),this.eGridDiv.appendChild(e)}announceValue(t,e){this.pendingAnnouncements.set(e,t),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let t=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=t)},50)}destroy(){super.destroy();let{descriptionContainer:t}=this;t&&(zo(t),t.parentElement&&t.parentElement.removeChild(t)),this.descriptionContainer=null,this.eGridDiv=null,this.pendingAnnouncements.clear()}},CYt=class extends Ot{constructor(){super(...arguments),this.beanName="columnAnimationService",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}wireBeans(t){this.ctrlsService=t.ctrlsService}postConstruct(){this.ctrlsService.whenReady(t=>this.gridBodyCtrl=t.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(t){this.suppressAnimation=t}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(t){this.activeNext?this.executeNextFuncs.push(t):t()}executeLaterVMTurn(t){this.active?this.executeLaterFuncs.push(t):t()}ensureAnimationCssClassPresent(){this.animationThreadCount++;let t=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===t&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(t,e){if(this.executeNextFuncs.length===0&&this.executeLaterFuncs.length===0){t(),e();return}let n=i=>{for(;i.length;){let r=i.pop();r&&r()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{t(),n(this.executeNextFuncs)},0),window.setTimeout(()=>{e(),n(this.executeLaterFuncs)},200)})}},xYt=class extends Ot{constructor(){super(...arguments),this.beanName="columnHoverService"}setMouseOver(t){this.updateState(t)}clearMouseOver(){this.updateState(null)}isHovered(t){return!!this.selectedColumns&&this.selectedColumns.indexOf(t)>=0}updateState(t){this.selectedColumns=t,this.eventService.dispatchEvent({type:"columnHoverChanged"})}},bYt=class extends Ot{constructor(){super(...arguments),this.beanName="overlayService",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}wireBeans(t){this.userComponentFactory=t.userComponentFactory,this.rowModel=t.rowModel,this.columnModel=t.columnModel,this.ctrlsService=t.ctrlsService}postConstruct(){this.isClientSide=this.gos.isRowModelType("clientSide");let t=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:t,rowDataUpdated:t,gridSizeChanged:this.onGridSizeChanged.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",t)}registerOverlayWrapperComp(t){this.overlayWrapperComp=t,this.updateOverlayVisibility()}isVisible(){return this.state!==0}isExclusive(){return this.state===1}getOverlayWrapper(){return this.overlayWrapperComp}showLoadingOverlay(){this.showInitialOverlay=!1;let t=this.gos.get("loading");!t&&(t!==void 0||this.gos.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1,!(this.gos.get("loading")||this.gos.get("suppressNoRowsOverlay"))&&this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){wt("Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.");return}this.doHideOverlay()}updateOverlayVisibility(){let t=this.gos.get("loading");this.showInitialOverlay&&t===void 0&&!this.gos.get("suppressLoadingOverlay")&&(t=!this.gos.get("columnDefs")||!this.columnModel.isReady()||!this.gos.get("rowData")&&this.isClientSide),t?this.state!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,this.rowModel.isEmpty()&&!this.gos.get("suppressNoRowsOverlay")&&this.isClientSide?this.state!==2&&this.doShowNoRowsOverlay():this.state!==0&&this.doHideOverlay())}doShowLoadingOverlay(){this.state=1,this.showOverlay(this.userComponentFactory.getLoadingOverlayCompDetails({}),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive()}doShowNoRowsOverlay(){this.state=2,this.showOverlay(this.userComponentFactory.getNoRowsOverlayCompDetails({}),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive()}doHideOverlay(){this.state=0,this.overlayWrapperComp.hideOverlay(),this.updateExclusive()}showOverlay(t,e,n){let i=t.newAgStackInstance();this.overlayWrapperComp.showOverlay(i,e,this.isExclusive(),n),this.refreshWrapperPadding()}updateExclusive(){let t=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==t&&this.eventService.dispatchEvent({type:"overlayExclusiveChanged"})}onGridSizeChanged(){this.refreshWrapperPadding()}refreshWrapperPadding(){let t=0;this.state===2?t=this.ctrlsService.get("gridHeaderCtrl")?.getHeaderHeight()||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,this.overlayWrapperComp.updateOverlayWrapperPaddingTop(t))}},wYt=class extends Ot{constructor(){super(...arguments),this.beanName="rowCssClassCalculator"}wireBeans(t){this.stylingService=t.stylingService}getInitialRowClasses(t){let e=[];return Di(t.extraCssClass)&&e.push(t.extraCssClass),e.push("ag-row"),e.push(t.rowFocused?"ag-row-focus":"ag-row-no-focus"),t.fadeRowIn&&e.push("ag-opacity-zero"),e.push(t.rowIsEven?"ag-row-even":"ag-row-odd"),t.rowNode.isRowPinned()&&e.push("ag-row-pinned"),t.rowNode.isSelected()&&e.push("ag-row-selected"),t.rowNode.footer&&e.push("ag-row-footer"),e.push("ag-row-level-"+t.rowLevel),t.rowNode.stub&&e.push("ag-row-loading"),t.fullWidthRow&&e.push("ag-full-width-row"),t.expandable&&(e.push("ag-row-group"),e.push(t.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),t.rowNode.dragging&&e.push("ag-row-dragging"),gHe(e,this.processClassesFromGridOptions(t.rowNode)),gHe(e,this.preProcessRowClassRules(t.rowNode)),e.push(t.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),t.firstRowOnPage&&e.push("ag-row-first"),t.lastRowOnPage&&e.push("ag-row-last"),t.fullWidthRow&&(t.pinned==="left"&&e.push("ag-cell-last-left-pinned"),t.pinned==="right"&&e.push("ag-cell-first-right-pinned")),e}processClassesFromGridOptions(t){let e=[],n=s=>{typeof s=="string"?e.push(s):Array.isArray(s)&&s.forEach(o=>e.push(o))},i=this.gos.get("rowClass");if(i){if(typeof i=="function")return wt("rowClass should not be a function, please use getRowClass instead"),[];n(i)}let r=this.gos.getCallback("getRowClass");if(r){let s={data:t.data,node:t,rowIndex:t.rowIndex},o=r(s);n(o)}return e}preProcessRowClassRules(t){let e=[];return this.processRowClassRules(t,n=>{e.push(n)},()=>{}),e}processRowClassRules(t,e,n){let i=this.gos.addGridCommonParams({data:t.data,node:t,rowIndex:t.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),i,e,n)}calculateRowLevel(t){return t.group?t.level:t.parent?t.parent.level+1:0}},SYt=class extends Ot{constructor(){super(...arguments),this.beanName="rowContainerHeightService",this.scrollY=0,this.uiBodyHeight=0}wireBeans(t){this.ctrlsService=t.ctrlsService}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=JBt(),this.gos.get("debug")&&Kv("RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,n=this.getUiBodyHeight();(e!==this.scrollY||n!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=n,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;let t=this.scrollY/this.maxScrollY,e=t*this.pixelsToShave;this.gos.get("debug")&&Kv(`RowContainerHeightService - Div Stretch Offset = ${e} (${this.pixelsToShave} * ${t})`),this.setDivStretchOffset(e)}setUiContainerHeight(t){t!==this.uiContainerHeight&&(this.uiContainerHeight=t,this.eventService.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(t){let e=typeof t=="number"?Math.floor(t):null;this.divStretchOffset!==e&&(this.divStretchOffset=e,this.eventService.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(t){this.modelHeight=t,this.stretching=t!=null&&this.maxDivHeight>0&&t>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(t){return t-this.divStretchOffset}getUiBodyHeight(){let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(t){if(this.pixelsToShave<=0)return t;let e=this.modelHeight-this.getUiBodyHeight(),n=t/e;return this.maxScrollY*n}},TYt=class extends Ot{constructor(){super(...arguments),this.beanName="rowNodeSorter"}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.showRowGroupColsService=t.showRowGroupColsService}postConstruct(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup())}doFullSort(t,e){let n=(r,s)=>({currentPos:s,rowNode:r}),i=t.map(n);return i.sort(this.compareRowNodes.bind(this,e)),i.map(r=>r.rowNode)}compareRowNodes(t,e,n){let i=e.rowNode,r=n.rowNode;for(let s=0,o=t.length;s<o;s++){let a=t[s],l=a.sort==="desc",c=this.getValue(i,a.column),d=this.getValue(r,a.column),u,m=this.getComparator(a,i);if(m?u=m(c,d,i,r,l):u=UB(c,d,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return e.currentPos-n.currentPos}getComparator(t,e){let n=t.column,i=n.getColDef().comparator;if(i!=null)return i;if(!n.getColDef().showRowGroup)return;let r=!e.group&&n.getColDef().field;if(!r)return;let s=this.columnModel.getColDefCol(r);if(s)return s.getColDef().comparator}getValue(t,e){if(!this.primaryColumnsSortGroups)return this.valueService.getValue(e,t,!1,!1);if(t.rowGroupColumn===e){if(this.gos.isGroupUseEntireRow(this.columnModel.isPivotActive())){let s=t.allLeafChildren?.[0];return s?this.valueService.getValue(e,s,!1,!1):void 0}let r=this.showRowGroupColsService?.getShowRowGroupCol(e.getId());return r?t.groupData?.[r.getId()]:void 0}if(!(t.group&&e.getColDef().showRowGroup))return this.valueService.getValue(e,t,!1,!1)}},MA=class{constructor(t,e){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=t,this.pathRoot={rowNode:e,children:null},this.mapToItems[e.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(t,e){if(t.children)for(let n=0;n<t.children.length;n++)this.depthFirstSearchChangedPath(t.children[n],e);e(t.rowNode)}depthFirstSearchEverything(t,e,n){if(t.childrenAfterGroup)for(let i=0;i<t.childrenAfterGroup.length;i++){let r=t.childrenAfterGroup[i];r.childrenAfterGroup?this.depthFirstSearchEverything(t.childrenAfterGroup[i],e,n):n&&e(r)}e(t)}forEachChangedNodeDepthFirst(t,e=!1,n=!1){this.active&&!n?this.depthFirstSearchChangedPath(this.pathRoot,t):this.depthFirstSearchEverything(this.pathRoot.rowNode,t,e)}executeFromRootNode(t){t(this.pathRoot.rowNode)}createPathItems(t){let e=t,n=0;for(;!this.mapToItems[e.id];){let i={rowNode:e,children:null};this.mapToItems[e.id]=i,n++,e=e.parent}return n}populateColumnsMap(t,e){if(!this.keepingColumns||!e)return;let n=t;for(;n;)this.nodeIdsToColumns[n.id]||(this.nodeIdsToColumns[n.id]={}),e.forEach(i=>this.nodeIdsToColumns[n.id][i.getId()]=!0),n=n.parent}linkPathItems(t,e){let n=t;for(let i=0;i<e;i++){let r=this.mapToItems[n.id],s=this.mapToItems[n.parent.id];s.children||(s.children=[]),s.children.push(r),n=n.parent}}addParentNode(t,e){if(!t||t.isRowPinned())return;let n=this.createPathItems(t);this.linkPathItems(t,n),this.populateColumnsMap(t,e)}canSkip(t){return this.active&&!this.mapToItems[t.id]}getValueColumnsForNode(t,e){if(!this.keepingColumns)return e;let n=this.nodeIdsToColumns[t.id];return e.filter(r=>n[r.getId()])}getNotValueColumnsForNode(t,e){if(!this.keepingColumns)return null;let n=this.nodeIdsToColumns[t.id];return e.filter(r=>!n[r.getId()])}},bWe=class extends Ot{constructor(){super(...arguments),this.beanName="selectionService",this.selectedNodes=new Map,this.selectionCtx=new FUt}wireBeans(t){this.rowModel=t.rowModel,this.pageBoundsService=t.pageBoundsService}postConstruct(){this.selectionCtx.init(this.rowModel),this.rowSelection=this.gos.get("rowSelection"),this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.rowSelection=this.gos.get("rowSelection"),this.deselectAllRowNodes({source:"api"})}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes(),this.selectionCtx.reset()}isMultiselect(){return this.rowSelection==="multiple"}overrideSelectionValue(t,e){if(!tz(e))return t;let n=this.selectionCtx.getRoot();return n?n.isSelected()??!1:!0}setNodesSelected(t){let{newValue:e,clearSelection:n,suppressFinishActions:i,rangeSelect:r,nodes:s,event:o,source:a}=t;if(s.length===0)return 0;if(s.length>1&&!this.isMultiselect())return wt("cannot multi select while rowSelection='single'"),0;let l=this.groupSelectsChildren&&t.groupSelectsFiltered===!0,c=s.map(u=>u.footer?u.sibling:u);if(r){if(c.length>1)return wt("cannot range select while selecting multiple rows"),0;let u=c[0],m=this.overrideSelectionValue(e,a);if(this.isMultiselect()){if(this.selectionCtx.isInRange(u)){let f=this.selectionCtx.truncate(u);return m&&this.selectRange(f.discard,!1,a),this.selectRange(f.keep,m,a)}else if(this.selectionCtx.getRoot()!==u){let x=this.selectionCtx.extend(u,this.groupSelectsChildren);return m&&this.selectRange(x.discard,!1,a),this.selectRange(x.keep,m,a)}}}i||this.selectionCtx.setRoot(c[0]);let d=0;for(let u=0;u<c.length;u++){let m=c[u];l&&m.group||m.selectThisNode(e,o,a)&&d++,this.groupSelectsChildren&&m.childrenAfterGroup?.length&&(d+=this.selectChildren(m,e,l,a))}return i||(e&&(n||!this.isMultiselect())&&(d+=this.clearOtherNodes(c[0],a)),d>0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),d}selectRange(t,e,n){let i=0;return t.forEach(r=>{if(r.group&&this.groupSelectsChildren)return;r.selectThisNode(e,void 0,n)&&i++}),i>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),i}selectChildren(t,e,n,i){let r=n?t.childrenAfterAggFilter:t.childrenAfterGroup;return Ls(r)?0:this.setNodesSelected({newValue:e,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:n,source:i,nodes:r})}getSelectedNodes(){let t=[];return this.selectedNodes.forEach(e=>{e&&t.push(e)}),t}getSelectedRows(){let t=[];return this.selectedNodes.forEach(e=>{e&&e.data&&t.push(e.data)}),t}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(t){let e=new Map;this.selectedNodes.forEach((n,i)=>{n&&t(n)&&e.set(i,n)}),this.selectedNodes=e}updateGroupsFromChildrenSelections(t,e){if(!this.groupSelectsChildren||this.rowModel.getType()!=="clientSide")return!1;let i=this.rowModel.getRootNode();e||(e=new MA(!0,i),e.setInactive());let r=!1;return e.forEachChangedNodeDepthFirst(s=>{if(s!==i){let o=s.calculateSelectedFromChildren();r=s.selectThisNode(o===null?!1:o,void 0,t)||r}}),r}clearOtherNodes(t,e){let n=new Map,i=0;return this.selectedNodes.forEach(r=>{if(r&&r.id!==t.id){let s=this.selectedNodes.get(r.id);i+=s.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:e}),this.groupSelectsChildren&&r.parent&&n.set(r.parent.id,r.parent)}}),n.forEach(r=>{let s=r.calculateSelectedFromChildren();r.selectThisNode(s===null?!1:s,void 0,e)}),i}onRowSelected(t){let e=t.node;this.groupSelectsChildren&&e.group||(e.isSelected()?this.selectedNodes.set(e.id,e):this.selectedNodes.delete(e.id))}syncInRowNode(t,e){this.syncInOldRowNode(t,e),this.syncInNewRowNode(t)}syncInOldRowNode(t,e){if(Di(e)&&t.id!==e.id&&e){let i=e.id;this.selectedNodes.get(i)==t&&this.selectedNodes.set(e.id,e)}}syncInNewRowNode(t){this.selectedNodes.has(t.id)?(t.setSelectedInitialValue(!0),this.selectedNodes.set(t.id,t)):t.setSelectedInitialValue(!1)}reset(t){let e=this.getSelectionCount();this.resetNodes(),e&&this.dispatchSelectionChanged(t)}resetNodes(){this.selectedNodes?.clear()}getBestCostNodeSelection(){if(this.rowModel.getType()!=="clientSide")return;let e=this.rowModel.getTopLevelNodes();if(e===null)return;let n=[];function i(r){for(let s=0,o=r.length;s<o;s++){let a=r[s];if(a.isSelected())n.push(a);else{let l=a;l.group&&l.children&&i(l.children)}}}return i(e),n}isEmpty(){let t=0;return this.selectedNodes.forEach(e=>{e&&t++}),t===0}deselectAllRowNodes(t){let e=o=>o.selectThisNode(!1,void 0,i),n=this.rowModel.getType()==="clientSide",{source:i,justFiltered:r,justCurrentPage:s}=t;if(s||r){if(!n){Do("selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(r,s).forEach(e)}else this.selectedNodes.forEach(o=>{o&&e(o)}),this.reset(i);this.selectionCtx.reset(),n&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)}getSelectedCounts(t,e){let n=0,i=0,r=s=>{this.groupSelectsChildren&&s.group||(s.isSelected()?n++:s.selectable&&i++)};return this.getNodesToSelect(t,e).forEach(r),{selectedCount:n,notSelectedCount:i}}getSelectAllState(t,e){let{selectedCount:n,notSelectedCount:i}=this.getSelectedCounts(t,e);return n===0&&i===0?!1:n>0&&i>0?null:n>0}hasNodesToSelect(t=!1,e=!1){return this.getNodesToSelect(t,e).filter(n=>n.selectable).length>0}getNodesToSelect(t=!1,e=!1){if(this.rowModel.getType()!=="clientSide")throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);let n=[];if(e)return this.forEachNodeOnPage(r=>{if(!r.group){n.push(r);return}if(!r.expanded){let s=o=>{n.push(o),o.childrenAfterFilter?.length&&o.childrenAfterFilter.forEach(s)};s(r);return}this.groupSelectsChildren||n.push(r)}),n;let i=this.rowModel;return t?(i.forEachNodeAfterFilter(r=>{n.push(r)}),n):(i.forEachNode(r=>{n.push(r)}),n)}forEachNodeOnPage(t){let e=this.pageBoundsService.getFirstRow(),n=this.pageBoundsService.getLastRow();for(let i=e;i<=n;i++){let r=this.rowModel.getRow(i);r&&t(r)}}selectAllRowNodes(t){if(this.rowModel.getType()!=="clientSide")throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);let{source:e,justFiltered:n,justCurrentPage:i}=t,r=this.getNodesToSelect(n,i);r.forEach(s=>s.selectThisNode(!0,void 0,e)),this.selectionCtx.setRoot(r[0]??null),this.selectionCtx.setEndRange(Ar(r)??null),this.rowModel.getType()==="clientSide"&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(e),this.dispatchSelectionChanged(e)}getSelectionState(){let t=[];return this.selectedNodes.forEach(e=>{e?.id&&t.push(e.id)}),t.length?t:null}setSelectionState(t,e){if(!Array.isArray(t))return;let n=new Set(t),i=[];this.rowModel.forEachNode(r=>{n.has(r.id)&&i.push(r)}),this.setNodesSelected({newValue:!0,nodes:i,source:e})}dispatchSelectionChanged(t){this.eventService.dispatchEvent({type:"selectionChanged",source:t})}},DYt=class extends Ot{constructor(){super(...arguments),this.beanName="selectableService"}wireBeans(t){this.rowModel=t.rowModel,this.selectionService=t.selectionService}postConstruct(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(t=!1){let e=!!this.gos.get("rowSelection"),n=this.gos.get("isRowSelectable");if(!e||!n)return;let i=this.gos.get("groupSelectsChildren"),r=this.rowModel.getType()==="clientSide"&&i,s=[],o=a=>{if(t&&!a.group)return;if(r&&a.group){let c=a.childrenAfterGroup.some(d=>d.selectable===!0);a.setRowSelectable(c,!0);return}let l=n?n(a):!0;a.setRowSelectable(l,!0),!l&&a.isSelected()&&s.push(a)};if(r){let a=this.rowModel;new MA(!1,a.getRootNode()).forEachChangedNodeDepthFirst(o,!0,!0)}else this.rowModel.forEachNode(o);s.length&&this.selectionService.setNodesSelected({nodes:s,newValue:!1,source:"selectableChanged"}),r&&this.selectionService instanceof bWe&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}},BHe=["asc","desc",null],EYt=class extends Ot{constructor(){super(...arguments),this.beanName="sortController"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.showRowGroupColsService=t.showRowGroupColsService}progressSort(t,e,n){let i=this.getNextSortDirection(t);this.setSortForColumn(t,i,e,n)}setSortForColumn(t,e,n,i){e!=="asc"&&e!=="desc"&&(e=null);let r=this.gos.isColumnsSortingCoupledToGroup(),s=[t];if(r&&t.getColDef().showRowGroup){let c=this.funcColsService.getSourceColumnsForGroupColumn(t)?.filter(d=>d.isSortable());c&&(s=[t,...c])}s.forEach(l=>l.setSort(e,i));let o=(n||this.gos.get("alwaysMultiSort"))&&!this.gos.get("suppressMultiSort"),a=[];if(!o){let l=this.clearSortBarTheseColumns(s,i);a.push(...l)}this.updateSortIndex(t),a.push(...s),this.dispatchSortChangedEvents(i,a)}updateSortIndex(t){let e=this.gos.isColumnsSortingCoupledToGroup(),n=this.showRowGroupColsService?.getShowRowGroupCol(t.getId()),i=e&&n||t,r=this.getColumnsWithSortingOrdered();this.columnModel.getAllCols().forEach(a=>a.setSortIndex(null));let s=r.filter(a=>e&&a.getColDef().showRowGroup?!1:a!==i);(i.getSort()?[...s,i]:s).forEach((a,l)=>{a.setSortIndex(l)})}onSortChanged(t,e){this.dispatchSortChangedEvents(t,e)}isSortActive(){let e=this.columnModel.getAllCols().filter(n=>!!n.getSort());return e&&e.length>0}dispatchSortChangedEvents(t,e){let n={type:"sortChanged",source:t};e&&(n.columns=e),this.eventService.dispatchEvent(n)}clearSortBarTheseColumns(t,e){let n=[];return this.columnModel.getAllCols().forEach(i=>{t.includes(i)||(i.getSort()&&n.push(i),i.setSort(void 0,e))}),n}getNextSortDirection(t){let e;if(t.getColDef().sortingOrder?e=t.getColDef().sortingOrder:this.gos.get("sortingOrder")?e=this.gos.get("sortingOrder"):e=BHe,!Array.isArray(e)||e.length<=0)return wt(`sortingOrder must be an array with at least one element, currently it's ${e}`),null;let n=e.indexOf(t.getSort()),i=n<0,r=n==e.length-1,s;return i||r?s=e[0]:s=e[n+1],BHe.indexOf(s)<0?(wt("invalid sort type ",s),null):s}getIndexedSortMap(){let t=this.columnModel.getAllCols().filter(s=>!!s.getSort());if(this.columnModel.isPivotMode()){let s=this.gos.isColumnsSortingCoupledToGroup();t=t.filter(o=>{let a=!!o.getAggFunc(),l=!o.isPrimary(),c=s?this.showRowGroupColsService?.getShowRowGroupCol(o.getId()):o.getColDef().showRowGroup;return a||l||c})}let e=this.funcColsService.getRowGroupColumns().filter(s=>!!s.getSort()),n={};t.forEach((s,o)=>n[s.getId()]=o),t.sort((s,o)=>{let a=s.getSortIndex(),l=o.getSortIndex();if(a!=null&&l!=null)return a-l;if(a==null&&l==null){let c=n[s.getId()],d=n[o.getId()];return c>d?1:-1}else return l==null?-1:1});let i=this.gos.isColumnsSortingCoupledToGroup()&&!!e.length;i&&(t=[...new Set(t.map(s=>this.showRowGroupColsService?.getShowRowGroupCol(s.getId())??s))]);let r=new Map;return t.forEach((s,o)=>r.set(s,o)),i&&e.forEach(s=>{let o=this.showRowGroupColsService.getShowRowGroupCol(s.getId());r.set(s,r.get(o))}),r}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([t,e],[n,i])=>e-i).map(([t])=>t)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(t=>t.getSort()).map(t=>({sort:t.getSort(),colId:t.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(t=>t.getSort()).map(t=>({sort:t.getSort(),column:t}))}canColumnDisplayMixedSort(t){let e=this.gos.isColumnsSortingCoupledToGroup(),n=!!t.getColDef().showRowGroup;return e&&n}getDisplaySortForColumn(t){let e=this.funcColsService.getSourceColumnsForGroupColumn(t);if(!this.canColumnDisplayMixedSort(t)||!e?.length)return t.getSort();let i=t.getColDef().field!=null||!!t.getColDef().valueGetter?[t,...e]:e,r=i[0].getSort();return i.every(o=>o.getSort()==r)?r:"mixed"}getDisplaySortIndexForColumn(t){return this.getIndexedSortMap().get(t)}},MYt=class extends Ot{constructor(){super(...arguments),this.beanName="syncService",this.waitingForColumns=!1}wireBeans(t){this.ctrlsService=t.ctrlsService,this.columnModel=t.columnModel,this.rowModel=t.rowModel}postConstruct(){this.addManagedPropertyListener("columnDefs",t=>this.setColumnDefs(t))}start(){this.ctrlsService.whenReady(()=>{let t=this.gos.get("columnDefs");t?this.setColumnsAndData(t):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(t){this.columnModel.setColumnDefs(t??[],"gridInitializing"),this.rowModel.start()}gridReady(){this.dispatchGridReadyEvent();let t=Sa.__isRegistered("@ag-grid-enterprise/core",this.gridId);this.gos.get("debug")&&Kv(`initialised successfully, enterprise = ${t}`)}dispatchGridReadyEvent(){this.eventService.dispatchEvent({type:"gridReady"})}setColumnDefs(t){let e=this.gos.get("columnDefs");if(e){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(e);return}this.columnModel.setColumnDefs(e,gA(t.source))}}},kYt="paste",IYt=class extends Ot{constructor(){super(...arguments),this.beanName="changeDetectionService"}wireBeans(t){this.rowModel=t.rowModel,this.rowRenderer=t.rowRenderer}postConstruct(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(t){t.source!==kYt&&this.doChangeDetection(t.node,t.column)}doChangeDetection(t,e){if(this.gos.get("suppressChangeDetection"))return;let n=[t];if(this.clientSideRowModel&&!t.isRowPinned()){let i=this.gos.get("aggregateOnlyChangedColumns"),r=new MA(i,this.clientSideRowModel.getRootNode());r.addParentNode(t.parent,[e]),this.clientSideRowModel.doAggregate(r),r.forEachChangedNodeDepthFirst(s=>{n.push(s)})}this.rowRenderer.refreshCells({rowNodes:n})}},AYt=class extends Ot{constructor(){super(...arguments),this.beanName="expressionService",this.expressionToFunctionCache={}}evaluate(t,e){if(typeof t=="string")return this.evaluateExpression(t,e);Do("value should be either a string or a function",t)}evaluateExpression(t,e){try{return this.createExpressionFunction(t)(e.value,e.context,e.oldValue,e.newValue,e.value,e.node,e.data,e.colDef,e.rowIndex,e.api,e.getValue,e.column,e.columnGroup)}catch(n){return Kv("Processing of the expression failed"),Kv("Expression = ",t),Kv("Params = ",e),Kv("Exception = ",n),null}}createExpressionFunction(t){if(this.expressionToFunctionCache[t])return this.expressionToFunctionCache[t];let e=this.createFunctionBody(t),n=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",e);return this.expressionToFunctionCache[t]=n,n}createFunctionBody(t){return t.indexOf("return")>=0?t:"return "+t+";"}},PYt=class extends Ot{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(t,e,n){this.active&&(t.__cacheVersion!==this.cacheVersion&&(t.__cacheVersion=this.cacheVersion,t.__cacheData={}),t.__cacheData[e]=n)}getValue(t,e){if(!(!this.active||t.__cacheVersion!==this.cacheVersion))return t.__cacheData[e]}},RYt=class extends Ot{constructor(){super(...arguments),this.beanName="valueService",this.initialised=!1,this.isSsrm=!1}wireBeans(t){this.expressionService=t.expressionService,this.columnModel=t.columnModel,this.valueCache=t.valueCache,this.dataTypeService=t.dataTypeService}postConstruct(){this.initialised||this.init()}init(){this.isSsrm=this.gos.isRowModelType("serverSide"),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;let t=n=>this.callColumnCellValueChangedHandler(n),e=this.gos.useAsyncEvents();this.eventService.addEventListener("cellValueChanged",t,e),this.addDestroyFunc(()=>this.eventService.removeEventListener("cellValueChanged",t,e)),this.addManagedPropertyListener("treeData",n=>this.isTreeData=n.currentValue)}getValue(t,e,n=!1,i=!1){if(this.initialised||this.init(),!e)return;let r=t.getColDef(),s=r.field,o=t.getColId(),a=e.data,l,c=e.groupData&&e.groupData[o]!==void 0,d=!i&&e.aggData&&e.aggData[o]!==void 0,u=this.isSsrm&&i&&!!t.getColDef().aggFunc,m=this.isSsrm&&e.footer&&e.field&&(t.getColDef().showRowGroup===!0||t.getColDef().showRowGroup===e.field);if(n&&r.filterValueGetter?l=this.executeFilterValueGetter(r.filterValueGetter,a,t,e):this.isTreeData&&d?l=e.aggData[o]:this.isTreeData&&r.valueGetter?l=this.executeValueGetter(r.valueGetter,a,t,e):this.isTreeData&&s&&a?l=LB(a,s,t.isFieldContainsDots()):c?l=e.groupData[o]:d?l=e.aggData[o]:r.valueGetter?l=this.executeValueGetter(r.valueGetter,a,t,e):m?l=LB(a,e.field,t.isFieldContainsDots()):s&&a&&!u&&(l=LB(a,s,t.isFieldContainsDots())),this.cellExpressions&&typeof l=="string"&&l.indexOf("=")===0){let f=l.substring(1);l=this.executeValueGetter(f,a,t,e)}if(l==null){let f=this.getOpenedGroup(e,t);if(f!=null)return f}return l}parseValue(t,e,n,i){let r=t.getColDef(),s=this.gos.addGridCommonParams({node:e,data:e?.data,oldValue:i,newValue:n,colDef:r,column:t}),o=r.valueParser;return Di(o)?typeof o=="function"?o(s):this.expressionService.evaluate(o,s):n}formatValue(t,e,n,i,r=!0){let s=null,o,a=t.getColDef();if(i?o=i:r&&(o=a.valueFormatter),o){let l=this.gos.addGridCommonParams({value:n,node:e,data:e?e.data:null,colDef:a,column:t});typeof o=="function"?s=o(l):s=this.expressionService.evaluate(o,l)}else if(a.refData)return a.refData[n]||"";return s==null&&Array.isArray(n)&&(s=n.join(", ")),s}getOpenedGroup(t,e){if(!this.gos.get("showOpenedGroup")||!e.getColDef().showRowGroup)return;let i=e.getColDef().showRowGroup,r=t.parent;for(;r!=null;){if(r.rowGroupColumn&&(i===!0||i===r.rowGroupColumn.getColId()))return r.key;r=r.parent}}setValue(t,e,n,i){let r=this.columnModel.getColDefCol(e);if(!t||!r)return!1;Ls(t.data)&&(t.data={});let{field:s,valueSetter:o}=r.getColDef();if(Ls(s)&&Ls(o))return wt("you need either field or valueSetter set on colDef for editing to work"),!1;if(this.dataTypeService&&!this.dataTypeService.checkType(r,n))return wt("Data type of the new value does not match the cell data type of the column"),!1;let a=this.gos.addGridCommonParams({node:t,data:t.data,oldValue:this.getValue(r,t),newValue:n,colDef:r.getColDef(),column:r});a.newValue=n;let l;return Di(o)?typeof o=="function"?l=o(a):l=this.expressionService.evaluate(o,a):l=this.setValueUsingField(t.data,s,n,r.isFieldContainsDots()),l===void 0&&(l=!0),l?(t.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),a.newValue=this.getValue(r,t),this.eventService.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:a.column,colDef:a.colDef,data:t.data,node:t,oldValue:a.oldValue,newValue:a.newValue,value:a.newValue,source:i}),!0):!1}callColumnCellValueChangedHandler(t){let e=t.colDef.onCellValueChanged;typeof e=="function"&&this.getFrameworkOverrides().wrapOutgoing(()=>{e({node:t.node,data:t.data,oldValue:t.oldValue,newValue:t.newValue,colDef:t.colDef,column:t.column,api:t.api,context:t.context})})}setValueUsingField(t,e,n,i){if(!e)return!1;let r=!1;if(!i)r=t[e]===n,r||(t[e]=n);else{let s=e.split("."),o=t;for(;s.length>0&&o;){let a=s.shift();s.length===0?(r=o[a]===n,r||(o[a]=n)):o=o[a]}}return!r}executeFilterValueGetter(t,e,n,i){let r=this.gos.addGridCommonParams({data:e,node:i,column:n,colDef:n.getColDef(),getValue:this.getValueCallback.bind(this,i)});return typeof t=="function"?t(r):this.expressionService.evaluate(t,r)}executeValueGetter(t,e,n,i){let r=n.getColId(),s=this.valueCache.getValue(i,r);if(s!==void 0)return s;let o=this.gos.addGridCommonParams({data:e,node:i,column:n,colDef:n.getColDef(),getValue:this.getValueCallback.bind(this,i)}),a;return typeof t=="function"?a=t(o):a=this.expressionService.evaluate(t,o),this.valueCache.setValue(i,r,a),a}getValueCallback(t,e){let n=this.columnModel.getColDefCol(e);return n?this.getValue(n,t):null}getKeyForNode(t,e){let n=this.getValue(t,e),i=t.getColDef().keyCreator,r=n;if(i){let s=this.gos.addGridCommonParams({value:n,colDef:t.getColDef(),column:t,node:e,data:e.data});r=i(s)}return typeof r=="string"||r==null||(r=String(r),r==="[object Object]"&&wt("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")),r}},zHe=(()=>{let t=class{};return t.gridOptions=void 0,t})();FYt=1,LYt=class{create(t,e,n,i,r){let s={};zHe.gridOptions?(im(s,zHe.gridOptions,!0,!0),s=ve(ve({},s),e)):s=e;let o=uYt(s),a=o.gridId??String(FYt++),l=this.getRegisteredModules(r,a),c=this.createBeansList(o.rowModelType,l,a),d=this.createProvidedBeans(t,o,r);if(!c){Do("Failed to create grid.");return}let u={providedBeanInstances:d,beanClasses:c,gridId:a,beanInitComparator:JUt,beanDestroyComparator:ejt,derivedBeans:[UUt]},m=new Zzt(u);return this.registerModuleUserComponents(m,l),this.registerControllers(m,l),this.registerModuleApiFunctions(m,l),n(m),m.getBean("syncService").start(),i&&i(m),m.getBean("gridApi")}registerControllers(t,e){let n=t.getBean("ctrlsFactory");e.forEach(i=>{i.controllers&&i.controllers.forEach(r=>n.register(r))})}getRegisteredModules(t,e){let n=t?t.modules:null,i=Sa.__getRegisteredModules(e),r=[],s={},o=(a,l,c)=>{(u=>{s[u.moduleName]||(s[u.moduleName]=!0,r.push(u),Sa.__register(u,a,c))})(l),l.dependantModules&&l.dependantModules.forEach(u=>o(a,u,c))};return o(!!n?.length||!Sa.__isPackageBased(),ZZ,void 0),n&&n.forEach(a=>o(!0,a,e)),i&&i.forEach(a=>o(!Sa.__isPackageBased(),a,void 0)),r}registerModuleUserComponents(t,e){let n=this.extractModuleEntity(e,r=>r.userComponents?r.userComponents:[]),i=t.getBean("userComponentRegistry");n.forEach(r=>{i.registerDefaultComponent(r.name,r.classImp)})}registerModuleApiFunctions(t,e){let n=t.getBean("apiFunctionService");e.forEach(i=>{let r=i.apiFunctions;r&&Object.keys(r).forEach(o=>{n?.addFunction(o,r[o])})})}createProvidedBeans(t,e,n){let i=n?n.frameworkOverrides:null;Ls(i)&&(i=new p4e);let r={gridOptions:e,eGridDiv:t,globalEventListener:n?n.globalEventListener:null,globalSyncEventListener:n?n.globalSyncEventListener:null,frameworkOverrides:i};return n&&n.providedBeanInstances&&Object.assign(r,n.providedBeanInstances),r}createBeansList(t="clientSide",e,n){let i=e.filter(l=>!l.rowModel||l.rowModel===t),r={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!r[t]){Do("Could not find row model for rowModelType = ",t);return}if(!Sa.__assertRegistered(r[t],`rowModelType = '${t}'`,n))return;let s=[sjt,njt,mYt,cYt,WUt,Azt,ZUt,XUt,WWt,DGe,SYt,zWt,fYt,PUt,eHt,BBt,ljt,pYt,BUt,bWe,SBt,lGt,yYt,vYt,IUt,AYt,wBt,BWt,PYt,RYt,MUt,HWt,Qzt,djt,VWt,ojt,HUt,LUt,NWt,EYt,xYt,CYt,DYt,IYt,UWt,jUt,wYt,TYt,ijt,ujt,rjt,tjt,MYt,bYt,l4e,gYt,_Yt,jWt,kBt,$Ut,IBt,EBt,KUt,YUt,VBt,MBt,OBt,qUt,NBt],o=this.extractModuleEntity(i,l=>l.beans?l.beans:[]);s.push(...o);let a=[];return s.forEach(l=>{a.indexOf(l)<0&&a.push(l)}),a}extractModuleEntity(t,e){return[].concat(...t.map(e))}},QZ=class extends Ot{constructor(){super(...arguments),this.beanName="rowModelHelperService"}wireBeans(t){this.rowModel=t.rowModel}postConstruct(){let t=this.rowModel;switch(t.getType()){case"clientSide":this.clientSideRowModel=t;break;case"infinite":this.infiniteRowModel=t;break;case"serverSide":this.serverSideRowModel=t;break}}getClientSideRowModel(){return this.clientSideRowModel}getInfiniteRowModel(){return this.infiniteRowModel}getServerSideRowModel(){return this.serverSideRowModel}};g4e={version:ta,moduleName:"@ag-grid-community/csrm-ssrm-shared-api",apiFunctions:{expandAll:OYt,collapseAll:NYt,onRowHeightChanged:VYt}},v4e={version:ta,moduleName:"@ag-grid-community/ssrm-infinite-shared-api",apiFunctions:{setRowCount:BYt,getCacheBlockState:zYt}},wWe=class{wrap(t,e,n=[],i){let r=this.createWrapper(t,i);return e.forEach(s=>{this.createMethod(r,s,!0)}),n.forEach(s=>{this.createMethod(r,s,!1)}),r}unwrap(t){return t}createMethod(t,e,n){t.addMethod(e,this.createMethodProxy(t,e,n))}createMethodProxy(t,e,n){return function(){return t.hasMethod(e)?t.callMethod(e,arguments):(n&&wt("Framework component is missing the method "+e+"()"),null)}}};nz=(()=>{let t=class{};return t.CHART_TYPE_TO_SERIES_TYPE={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"line",scatter:"scatter",bubble:"bubble",pie:"pie",donut:"donut",doughnut:"donut",area:"area",stackedArea:"area",normalizedArea:"area",histogram:"histogram",radarLine:"radar-line",radarArea:"radar-area",nightingale:"nightingale",radialColumn:"radial-column",radialBar:"radial-bar",sunburst:"sunburst",rangeBar:"range-bar",rangeArea:"range-area",boxPlot:"box-plot",treemap:"treemap",heatmap:"heatmap",waterfall:"waterfall"},t.COMBO_CHART_TYPES=["columnLineCombo","areaColumnCombo","customCombo"],t.SERIES_GROUP_TYPES=["grouped","stacked","normalized"],t})(),kA=typeof global>"u"?{}:global;kA.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement;kA.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement;kA.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement;kA.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement;kA.Node=typeof Node>"u"?{}:Node;kA.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;HYt="ROOT_NODE_ID",g3e=0,GYt=class{constructor(t,e,n,i,r,s){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=e,this.eventService=n,this.funcColsService=i,this.beans=s,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=HYt,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return T7(this.allNodesMap)}getRowNode(t){return this.allNodesMap[t]}setRowData(t){if(typeof t=="string"){wt("rowData must be an array.");return}this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);let e=this.rootNode,n=this.rootNode.sibling;e.childrenAfterFilter=null,e.childrenAfterGroup=null,e.childrenAfterAggFilter=null,e.childrenAfterSort=null,e.childrenMapped=null,e.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?e.allLeafChildren=t.map(i=>this.createNode(i,this.rootNode,g3e)):(e.allLeafChildren=[],e.childrenAfterGroup=[]),n&&(n.childrenAfterFilter=e.childrenAfterFilter,n.childrenAfterGroup=e.childrenAfterGroup,n.childrenAfterAggFilter=e.childrenAfterAggFilter,n.childrenAfterSort=e.childrenAfterSort,n.childrenMapped=e.childrenMapped,n.allLeafChildren=e.allLeafChildren)}updateRowData(t,e){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t.add);let n={remove:[],update:[],add:[]},i=[];return this.executeRemove(t,n,i),this.executeUpdate(t,n,i),this.executeAdd(t,n),this.updateSelection(i,"rowDataChanged"),e&&iz(this.rootNode.allLeafChildren,e),n}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(t){this.eventService.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:t?.length?t[0]:null})}updateSelection(t,e){let n=t.length>0;n&&this.selectionService.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:e}),this.selectionService.updateGroupsFromChildrenSelections(e),n&&this.eventService.dispatchEvent({type:"selectionChanged",source:e})}executeAdd(t,e){let{add:n,addIndex:i}=t;if(Gd(n))return;let r=n.map(o=>this.createNode(o,this.rootNode,g3e)),s=this.rootNode.allLeafChildren;if(typeof i=="number"&&i>=0){let o=s.length,a=i;if(this.gos.get("treeData")&&i>0&&o>0){for(let u=0;u<o;u++)if(s[u]?.rowIndex==i-1){a=u+1;break}}let c=s.slice(0,a),d=s.slice(a,s.length);this.rootNode.allLeafChildren=[...c,...r,...d]}else this.rootNode.allLeafChildren=[...s,...r];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=s),e.add=r}executeRemove(t,e,n){let{remove:i}=t;if(Gd(i))return;let r={};i.forEach(s=>{let o=this.lookupRowNode(s);o&&(o.isSelected()&&n.push(o),o.clearRowTopAndRowIndex(),r[o.id]=!0,delete this.allNodesMap[o.id],e.remove.push(o))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren?.filter(s=>!r[s.id])??null,this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,e,n){let{update:i}=t;Gd(i)||i.forEach(r=>{let s=this.lookupRowNode(r);s&&(s.updateData(r),!s.selectable&&s.isSelected()&&n.push(s),this.setMasterForRow(s,r,g3e,!1),e.update.push(s))})}lookupRowNode(t){let e=this.gos.getRowIdCallback(),n;if(e){let i=e({data:t,level:0});if(n=this.allNodesMap[i],!n)return Do(`could not find row id=${i}, data item was not found for this id`),null}else if(n=this.rootNode.allLeafChildren?.find(i=>i.data===t),!n)return Do("could not find data item as object was not found",t),Do("Consider using getRowId to help the Grid find matching row data"),null;return n||null}createNode(t,e,n){let i=new Pp(this.beans);return i.group=!1,this.setMasterForRow(i,t,n,!0),e&&(i.parent=e),i.level=n,i.setDataAndId(t,this.nextId.toString()),this.allNodesMap[i.id]&&wt(`duplicate node id '${i.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[i.id]=i,this.nextId++,i}setMasterForRow(t,e,n,i){if(this.gos.get("treeData"))t.setMaster(!1),i&&(t.expanded=!1);else{if(this.gos.get("masterDetail")){let o=this.gos.get("isRowMaster");o?t.setMaster(o(e)):t.setMaster(!0)}else t.setMaster(!1);if(i){let o=this.funcColsService.getRowGroupColumns(),a=o?o.length:0,l=n+a;t.expanded=t.master?this.isExpanded(l):!1}}}isExpanded(t){let e=this.gos.get("groupDefaultExpanded");return e===-1?!0:t<e}},WYt=class extends Ot{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=Ap(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}wireBeans(t){this.beans=t,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.selectionService=t.selectionService,this.valueCache=t.valueCache,this.environment=t.environment,this.filterStage=t.filterStage,this.sortStage=t.sortStage,this.flattenStage=t.flattenStage,this.groupStage=t.groupStage,this.aggregationStage=t.aggregationStage,this.pivotStage=t.pivotStage,this.filterAggregatesStage=t.filterAggregatesStage}postConstruct(){let t=this.refreshModel.bind(this,{step:"group"}),e=!this.gos.get("suppressAnimationFrame"),n=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:e});this.addManagedEventListeners({newColumnsLoaded:n,columnRowGroupChanged:t,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:t,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new Pp(this.beans),this.nodeManager=new GYt(this.rootNode,this.gos,this.eventService,this.funcColsService,this.selectionService,this.beans)}addPropertyListeners(){let t=new Set(["treeData","masterDetail"]),e=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),n=new Set(["excludeChildrenWhenTreeDataFiltering"]),i=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),r=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),s=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),a=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),l=[...t,...e,...n,...i,...i,...r,...s,...o,...a];this.addManagedPropertyListeners(l,c=>{let d=c.changeSet?.properties;if(!d)return;let u=m=>d.some(f=>m.has(f));if(u(t)){this.setRowData(this.rootNode.allLeafChildren.map(m=>m.data));return}if(u(e)){this.refreshModel({step:"group"});return}if(u(n)){this.refreshModel({step:"filter"});return}if(u(i)){this.refreshModel({step:"pivot"});return}if(u(r)){this.refreshModel({step:"aggregate"});return}if(u(s)){this.refreshModel({step:"sort"});return}if(u(o)){this.refreshModel({step:"filter_aggregates"});return}u(a)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){let t=this.gos.get("rowData");t&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(t))}ensureRowHeightsValid(t,e,n,i){let r,s=!1;do{r=!1;let o=this.getRowIndexAtPixel(t),a=this.getRowIndexAtPixel(e),l=Math.max(o,n),c=Math.min(a,i);for(let d=l;d<=c;d++){let u=this.getRow(d);if(u.rowHeightEstimated){let m=this.gos.getRowHeightForNode(u);u.setRowHeight(m.height),r=!0,s=!0}}r&&this.setRowTopAndRowIndex()}while(r);return s}setRowTopAndRowIndex(){let t=this.environment.getDefaultRowHeight(),e=0,n=new Set,i=this.gos.isDomLayout("normal");for(let r=0;r<this.rowsToDisplay.length;r++){let s=this.rowsToDisplay[r];if(s.id!=null&&n.add(s.id),s.rowHeight==null){let o=this.gos.getRowHeightForNode(s,i,t);s.setRowHeight(o.height,o.estimated)}s.setRowTop(e),s.setRowIndex(r),e+=s.rowHeight}return n}clearRowTopAndRowIndex(t,e){let n=t.isActive(),i=s=>{s&&s.id!=null&&!e.has(s.id)&&s.clearRowTopAndRowIndex()},r=s=>{if(i(s),i(s.detailNode),i(s.sibling),s.hasChildren()&&s.childrenAfterGroup){let o=s.level==-1;n&&!o&&!s.expanded||s.childrenAfterGroup.forEach(r)}};r(this.rootNode)}ensureRowsAtPixel(t,e,n=0){let i=this.getRowIndexAtPixel(e),r=this.getRow(i),s=!this.gos.get("suppressAnimationFrame");return r===t[0]?!1:(t.forEach(o=>{Ip(this.rootNode.allLeafChildren,o)}),t.forEach((o,a)=>{pD(this.rootNode.allLeafChildren,o,Math.max(i+n,0)+a)}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:s}),!0)}highlightRowAtPixel(t,e){let n=e!=null?this.getRowIndexAtPixel(e):null,i=n!=null?this.getRow(n):null;if(!i||!t||i===t||e==null){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null);return}let r=this.getHighlightPosition(e,i);this.lastHighlightedRow&&this.lastHighlightedRow!==i&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),i.setHighlighted(r),this.lastHighlightedRow=i}getHighlightPosition(t,e){if(!e){let r=this.getRowIndexAtPixel(t);if(e=this.getRow(r||0),!e)return 1}let{rowTop:n,rowHeight:i}=e;return t-n<i/2?0:1}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;let e=this.rootNode.sibling?1:0,n=this.rootNode.childrenAfterAggFilter;return(n?n.length:0)+e}getTopLevelRowDisplayedIndex(t){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return t;let n=t;if(this.rowsToDisplay[0].footer){if(t===0)return 0;n-=1}let i=this.rowsToDisplay[this.rowsToDisplay.length-1],r=n>=this.rootNode.childrenAfterSort.length;if(i.footer&&r)return i.rowIndex;let s=this.rootNode.childrenAfterSort[n];if(this.gos.get("groupHideOpenParents"))for(;s.expanded&&s.childrenAfterSort&&s.childrenAfterSort.length>0;)s=s.childrenAfterSort[0];return s.rowIndex}getRowBounds(t){if(Ls(this.rowsToDisplay))return null;let e=this.rowsToDisplay[t];return e?{rowTop:e.rowTop,rowHeight:e.rowHeight}:null}onRowGroupOpened(){let t=this.gos.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:t})}onFilterChanged(t){if(t.afterDataChange)return;let e=this.gos.isAnimateRows(),i=t.columns.length===0||t.columns.some(r=>r.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:e})}onSortChanged(){let t=this.gos.isAnimateRows();this.refreshModel({step:"sort",keepRenderedRows:!0,animate:t,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(t){let e=Gd(t),n=new MA(!1,this.rootNode);return(e||this.gos.get("treeData"))&&n.setInactive(),n}isSuppressModelUpdateAfterUpdateTransaction(t){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction")||t.rowNodeTransactions==null)return!1;let e=t.rowNodeTransactions.filter(i=>i.add!=null&&i.add.length>0||i.remove!=null&&i.remove.length>0);return e==null||e.length==0}buildRefreshModelParams(t){let e="group",n={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(Di(t)&&(e=n[t]),Ls(e)){Do(`invalid step ${t}, available steps are ${Object.keys(n).join(", ")}`);return}let i=!this.gos.get("suppressAnimationFrame");return{step:e,keepRenderedRows:!0,keepEditingRows:!0,animate:i}}refreshModel(t){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.isChangeEventsDispatching())return;let e=typeof t=="object"&&"step"in t?t:this.buildRefreshModelParams(t);if(!e||this.isSuppressModelUpdateAfterUpdateTransaction(e))return;let n=this.createChangePath(e.rowNodeTransactions);switch(this.isRefreshingModel=!0,e.step){case"group":this.doRowGrouping(e.rowNodeTransactions,e.rowNodeOrder,n,!!e.afterColumnsChanged);case"filter":this.doFilter(n);case"pivot":this.doPivot(n);case"aggregate":this.doAggregate(n);case"filter_aggregates":this.doFilterAggregates(n);case"sort":this.doSort(e.rowNodeTransactions,n);case"map":this.doRowsToDisplay()}let i=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,i),this.isRefreshingModel=!1,this.eventService.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){let t=Ls(this.rootNode.allLeafChildren)||this.rootNode.allLeafChildren.length===0;return Ls(this.rootNode)||t||!this.columnModel.isReady()}isRowsToRender(){return Di(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(t,e){let n=!1,i=!1,r=[],s=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(o=>{if(i)return;if(n&&(o===e||o===t)&&(i=!0,o.group&&s)){r.push(...o.allLeafChildren);return}if(!n){if(o!==e&&o!==t)return;n=!0}if(!o.group||!s){r.push(o);return}}),r}setDatasource(t){Do("should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(t){return this.rowsToDisplay[t]}isRowPresent(t){return this.rowsToDisplay.indexOf(t)>=0}getRowIndexAtPixel(t){if(this.isEmpty()||this.rowsToDisplay.length===0)return-1;let e=0,n=this.rowsToDisplay.length-1;if(t<=0)return 0;if(Ar(this.rowsToDisplay).rowTop<=t)return this.rowsToDisplay.length-1;let r=-1,s=-1;for(;;){let o=Math.floor((e+n)/2),a=this.rowsToDisplay[o];if(this.isRowInPixel(a,t)||(a.rowTop<t?e=o+1:a.rowTop>t&&(n=o-1),r===e&&s===n))return o;r=e,s=n}}isRowInPixel(t,e){let n=t.rowTop,i=t.rowTop+t.rowHeight;return n<=e&&i>e}forEachLeafNode(t){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((e,n)=>t(e,n))}forEachNode(t,e=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:t,recursionType:0,index:0,includeFooterNodes:e})}forEachNodeAfterFilter(t,e=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:t,recursionType:1,index:0,includeFooterNodes:e})}forEachNodeAfterFilterAndSort(t,e=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:t,recursionType:2,index:0,includeFooterNodes:e})}forEachPivotNode(t,e=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:t,recursionType:3,index:0,includeFooterNodes:e})}recursivelyWalkNodesAndCallback(t){let{nodes:e,callback:n,recursionType:i,includeFooterNodes:r}=t,{index:s}=t,o=a=>{let l=e[0]?.parent;if(!l)return;let c=r&&this.gos.getGrandTotalRow(),d=this.gos.getGroupTotalRowCallback(),u=r&&d({node:l});if(l===this.rootNode){c===a&&(l.createFooter(),n(l.sibling,s++));return}u===a&&(l.createFooter(),n(l.sibling,s++))};o("top");for(let a=0;a<e.length;a++){let l=e[a];if(n(l,s++),l.hasChildren()&&!l.footer){let c=null;switch(i){case 0:c=l.childrenAfterGroup;break;case 1:c=l.childrenAfterAggFilter;break;case 2:c=l.childrenAfterSort;break;case 3:c=l.leafGroup?null:l.childrenAfterSort;break}c&&(s=this.recursivelyWalkNodesAndCallback({nodes:[...c],callback:n,recursionType:i,index:s,includeFooterNodes:r}))}}return o("bottom"),s}doAggregate(t){this.aggregationStage?.execute({rowNode:this.rootNode,changedPath:t})}doFilterAggregates(t){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:t}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(t){let e=this.gos.get("treeData"),n=this.columnModel.isPivotActive(),i=r=>{r&&r.forEach(s=>{let o=()=>{s.expanded=t,i(s.childrenAfterGroup)};if(e){Di(s.childrenAfterGroup)&&o();return}if(n){!s.leafGroup&&o();return}s.group&&o()})};this.rootNode&&i(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"}),this.eventService.dispatchEvent({type:"expandOrCollapseAll",source:t?"expandAll":"collapseAll"})}doSort(t,e){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:t,changedPath:e})}doRowGrouping(t,e,n,i){this.groupStage?(t?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:t,rowNodeOrder:e,changedPath:n}):this.groupStage.execute({rowNode:this.rootNode,changedPath:n,afterColumnsChanged:i}),this.gos.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",n)&&this.eventService.dispatchEvent({type:"selectionChanged",source:"rowGroupChanged"})):(this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren()),this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:"rowCountReady"}))}doFilter(t){this.filterStage.execute({rowNode:this.rootNode,changedPath:t})}doPivot(t){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:t})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(t){if(typeof t=="string"&&t.indexOf(Pp.ID_PREFIX_ROW_GROUP)==0){let n;return this.forEachNode(i=>{i.id===t&&(n=i)}),n}return this.nodeManager.getRowNode(t)}setRowData(t){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(t),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(t,e){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];let n=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData()},n)}this.rowDataTransactionBatch.push({rowDataTransaction:t,callback:e})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();let t=[],e=[],n=!1;this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach(i=>{let r=this.nodeManager.updateRowData(i.rowDataTransaction,void 0);e.push(r),i.callback&&t.push(i.callback.bind(null,r)),typeof i.rowDataTransaction.addIndex=="number"&&(n=!0)}),this.commonUpdateRowData(e,void 0,n),t.length>0&&window.setTimeout(()=>{t.forEach(i=>i())},0),e.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:e}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(t,e){this.valueCache.onDataChanged();let n=this.nodeManager.updateRowData(t,e),i=typeof t.addIndex=="number";return this.commonUpdateRowData([n],e,i),n}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;let e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let n=0;n<this.rootNode.allLeafChildren.length;n++){let i=this.rootNode.allLeafChildren[n];e[i.id]=n}return e}commonUpdateRowData(t,e,n){if(!this.hasStarted)return;let i=!this.gos.get("suppressAnimationFrame");n&&(e=this.createRowNodeOrder()),this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:"group",rowNodeTransactions:t,rowNodeOrder:e,keepRenderedRows:!0,keepEditingRows:!0,animate:i})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){let t=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let t=!1;return this.forEachNode(e=>{e.setRowHeight(e.rowHeight,!0);let n=e.detailNode;n&&n.setRowHeight(n.rowHeight,!0),e.sibling&&e.sibling.setRowHeight(e.sibling.rowHeight,!0),t=!0}),t}onGridStylesChanges(t){if(t.rowHeightChanged){if(this.columnModel.isAutoRowHeightActive())return;this.resetRowHeights()}}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};eqt=class extends Ot{constructor(){super(...arguments),this.beanName="filterStage"}wireBeans(t){this.filterManager=t.filterManager}execute(t){let{changedPath:e}=t;this.filter(e)}filter(t){let e=!!this.filterManager?.isChildFilterPresent();this.filterNodes(e,t)}filterNodes(t,e){let n=(i,r)=>{i.hasChildren()&&t&&!r?i.childrenAfterFilter=i.childrenAfterGroup.filter(s=>{let o=s.childrenAfterFilter&&s.childrenAfterFilter.length>0,a=s.data&&this.filterManager.doesRowPassFilter({rowNode:s});return o||a}):i.childrenAfterFilter=i.childrenAfterGroup,i.sibling&&(i.sibling.childrenAfterFilter=i.childrenAfterFilter)};if(this.doingTreeDataFiltering()){let i=(s,o)=>{if(s.childrenAfterGroup)for(let a=0;a<s.childrenAfterGroup.length;a++){let l=s.childrenAfterGroup[a],c=o||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?i(s.childrenAfterGroup[a],c):n(l,c)}n(s,o)},r=s=>i(s,!1);e.executeFromRootNode(r)}else{let i=r=>n(r,!1);e.forEachChangedNodeDepthFirst(i,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},tqt=class extends Ot{constructor(){super(...arguments),this.beanName="flattenStage"}wireBeans(t){this.beans=t,this.columnModel=t.columnModel}execute(t){let e=t.rowNode,n=[],i=this.columnModel.isPivotMode(),r=i&&e.leafGroup,s=r?[e]:e.childrenAfterSort,o=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(o,s,n,i,0);let a=n.length>0;if(!r&&a&&o.grandTotalRow){e.createFooter();let c=o.grandTotalRow==="top";this.addRowNodeToRowsToDisplay(o,e.sibling,n,0,c)}return n}getFlattenDetails(){let t=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!t&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:t,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(t,e,n,i,r){if(!Gd(e))for(let s=0;s<e.length;s++){let o=e[s],a=o.hasChildren(),l=i&&!a,c=t.groupRemoveSingleChildren&&a&&o.childrenAfterGroup.length===1,d=t.groupRemoveLowestSingleChildren&&a&&o.leafGroup&&o.childrenAfterGroup.length===1,u=i&&o.leafGroup,m=t.hideOpenParents&&o.expanded&&!o.master&&!u;if(!l&&!m&&!c&&!d&&this.addRowNodeToRowsToDisplay(t,o,n,r),!(i&&o.leafGroup)){if(a){let _=c||d;if(o.expanded||_){let x=t.groupTotalRow({node:o});x||o.destroyFooter();let D=_?r:r+1;x==="top"&&(o.createFooter(),this.addRowNodeToRowsToDisplay(t,o.sibling,n,D)),this.recursivelyAddToRowsToDisplay(t,o.childrenAfterSort,n,i,D),x==="bottom"&&(o.createFooter(),this.addRowNodeToRowsToDisplay(t,o.sibling,n,D))}}else if(o.master&&o.expanded){let _=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(t,_,n,r)}}}}addRowNodeToRowsToDisplay(t,e,n,i,r){r?n.unshift(e):n.push(e),e.setUiLevel(t.isGroupMultiAutoColumn?0:i)}createDetailNode(t){if(Di(t.detailNode))return t.detailNode;let e=new Pp(this.beans);return e.detail=!0,e.selectable=!1,e.parent=t,Di(t.id)&&(e.id="detail_"+t.id),e.data=t.data,e.level=t.level+1,t.detailNode=e,e}},iqt=class extends Ot{constructor(){super(...arguments),this.beanName="immutableService"}wireBeans(t){this.rowModel=t.rowModel,this.selectionService=t.selectionService}postConstruct(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){let t=this.gos.exists("getRowId");return this.gos.get("resetRowDataOnUpdate")?!1:t}setRowData(t){let e=this.createTransactionForRowData(t);if(!e)return;let[n,i]=e;this.clientSideRowModel.updateRowData(n,i)}createTransactionForRowData(t){if(Ls(this.clientSideRowModel)){Do("ImmutableService only works with ClientSideRowModel");return}let e=this.gos.getRowIdCallback();if(e==null){Do("ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");return}let n={remove:[],update:[],add:[]},i=this.clientSideRowModel.getCopyOfNodesMap(),s=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return Di(t)&&t.forEach((o,a)=>{let l=e({data:o,level:0}),c=i[l];s&&(s[l]=a),c?(c.data!==o&&n.update.push(o),i[l]=void 0):n.add.push(o)}),Rh(i,(o,a)=>{a&&n.remove.push(a.data)}),[n,s]}onRowDataUpdated(){let t=this.gos.get("rowData");t&&(this.isActive()?this.setRowData(t):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(t)))}},nqt=class extends Ot{constructor(){super(...arguments),this.beanName="sortService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.rowNodeSorter=t.rowNodeSorter,this.showRowGroupColsService=t.showRowGroupColsService}sort(t,e,n,i,r,s){let o=this.gos.get("groupMaintainOrder"),a=this.columnModel.getCols().some(m=>m.isRowGroupActive()),l={};n&&i&&(l=this.calculateDirtyNodes(i));let c=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows"),u=m=>{this.pullDownGroupDataForHideOpenParents(m.childrenAfterAggFilter,!0);let f=c&&m.leafGroup;if(o&&a&&!m.leafGroup&&!s){let D=this.funcColsService.getRowGroupColumns()?.[m.level+1]?.getSort()===null,E=m.childrenAfterAggFilter.slice(0);if(m.childrenAfterSort&&!D){let M={};m.childrenAfterSort.forEach((I,z)=>{M[I.id]=z}),E.sort((I,z)=>(M[I.id]??0)-(M[z.id]??0))}m.childrenAfterSort=E}else!e||f?m.childrenAfterSort=m.childrenAfterAggFilter.slice(0):n?m.childrenAfterSort=this.doDeltaSort(m,l,r,t):m.childrenAfterSort=this.rowNodeSorter.doFullSort(m.childrenAfterAggFilter,t);if(m.sibling&&(m.sibling.childrenAfterSort=m.childrenAfterSort),this.updateChildIndexes(m),d){let x={nodes:m.childrenAfterSort};d(x)}};r&&r.forEachChangedNodeDepthFirst(u),this.updateGroupDataForHideOpenParents(r)}calculateDirtyNodes(t){let e={},n=i=>{i&&i.forEach(r=>e[r.id]=!0)};return t&&t.forEach(i=>{n(i.add),n(i.update),n(i.remove)}),e}doDeltaSort(t,e,n,i){let r=t.childrenAfterAggFilter,s=t.childrenAfterSort;if(!s)return this.rowNodeSorter.doFullSort(r,i);let o={},a=[];r.forEach(u=>{e[u.id]||!n.canSkip(u)?a.push(u):o[u.id]=!0});let l=s.filter(u=>o[u.id]),c=(u,m)=>({currentPos:m,rowNode:u}),d=a.map(c).sort((u,m)=>this.rowNodeSorter.compareRowNodes(i,u,m));return this.mergeSortedArrays(i,d,l.map(c)).map(({rowNode:u})=>u)}mergeSortedArrays(t,e,n){let i=[],r=0,s=0;for(;r<e.length&&s<n.length;)this.rowNodeSorter.compareRowNodes(t,e[r],n[s])<0?i.push(e[r++]):i.push(n[s++]);for(;r<e.length;)i.push(e[r++]);for(;s<n.length;)i.push(n[s++]);return i}updateChildIndexes(t){if(Ls(t.childrenAfterSort))return;let e=t.childrenAfterSort;for(let n=0;n<e.length;n++){let i=e[n],r=n===0,s=n===t.childrenAfterSort.length-1;i.setFirstChild(r),i.setLastChild(s),i.setChildIndex(n)}}updateGroupDataForHideOpenParents(t){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return wt("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."),!1;let e=n=>{this.pullDownGroupDataForHideOpenParents(n.childrenAfterSort,!1),n.childrenAfterSort.forEach(i=>{i.hasChildren()&&e(i)})};t&&t.executeFromRootNode(n=>e(n))}pullDownGroupDataForHideOpenParents(t,e){!this.gos.get("groupHideOpenParents")||Ls(t)||t.forEach(n=>{(this.showRowGroupColsService?.getShowRowGroupCols()??[]).forEach(r=>{let s=r.getColDef().showRowGroup;if(typeof s!="string"){Do("groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}let o=s,a=this.columnModel.getColDefCol(o);if(a!==n.rowGroupColumn)if(e)n.setGroupValue(r.getId(),void 0);else{let c=n.getFirstChildOfFirstChild(a);c&&n.setGroupValue(r.getId(),c.key)}})})}},rqt=class extends Ot{constructor(){super(...arguments),this.beanName="sortStage"}wireBeans(t){this.sortService=t.sortService,this.sortController=t.sortController}execute(t){let e=this.sortController.getSortOptions(),n=Di(e)&&e.length>0,i=n&&Di(t.rowNodeTransactions)&&this.gos.get("deltaSort"),r=e.some(s=>this.gos.isColumnsSortingCoupledToGroup()?s.column.isPrimary()&&s.column.isRowGroupActive():!!s.column.getColDef().showRowGroup);this.sortService.sort(e,n,i,t.rowNodeTransactions,t.changedPath,r)}},y4e="32.1.0",SWe={version:y4e,moduleName:"@ag-grid-community/client-side-row-model-core",rowModel:"clientSide",beans:[WYt,eqt,rqt,tqt,nqt,iqt]},sqt={version:y4e,moduleName:"@ag-grid-community/client-side-row-model-api",beans:[QZ],apiFunctions:{onGroupExpandedOrCollapsed:UYt,refreshClientSideRowModel:jYt,forEachLeafNode:$Yt,forEachNodeAfterFilter:KYt,forEachNodeAfterFilterAndSort:YYt,resetRowHeights:qYt,applyTransaction:ZYt,applyTransactionAsync:XYt,flushAsyncTransactions:QYt,getBestCostNodeSelection:JYt},dependantModules:[SWe,g4e]},_4e={version:y4e,moduleName:"@ag-grid-community/client-side-row-model",dependantModules:[SWe,sqt]},C4e=class extends Ot{setBeans(t){this.beans=t}getFileName(t){let e=this.getDefaultFileExtension();return(t==null||!t.length)&&(t=this.getDefaultFileName()),t.indexOf(".")===-1?`${t}.${e}`:t}getData(t){let e=this.createSerializingSession(t);return this.beans.gridSerializer.serialize(e,t)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},x4e=class{constructor(t){this.groupColumns=[];let{columnModel:e,funcColsService:n,columnNameService:i,valueService:r,gos:s,processCellCallback:o,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c}=t;this.columnModel=e,this.funcColsService=n,this.columnNameService=i,this.valueService=r,this.gos=s,this.processCellCallback=o,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c}prepare(t){this.groupColumns=t.filter(e=>!!e.getColDef().showRowGroup)}extractHeaderValue(t){return this.getHeaderName(this.processHeaderCallback,t)??""}extractRowCellValue(t,e,n,i,r){let o=(!this.gos.get("groupHideOpenParents")||r.footer)&&this.shouldRenderGroupSummaryCell(r,t,e)?this.createValueForGroupNode(t,r):this.valueService.getValue(t,r);return this.processCell({accumulatedRowIndex:n,rowNode:r,column:t,value:o,processCellCallback:this.processCellCallback,type:i})}shouldRenderGroupSummaryCell(t,e,n){if(!(t&&t.group))return!1;if(this.groupColumns.indexOf(e)!==-1){if(t.groupData?.[e.getId()]!=null||this.gos.isRowModelType("serverSide")&&t.group)return!0;if(t.footer&&t.level===-1){let o=e.getColDef();return o==null||o.showRowGroup===!0||o.showRowGroup===this.funcColsService.getRowGroupColumns()[0].getId()}}let s=this.gos.isGroupUseEntireRow(this.columnModel.isPivotMode());return n===0&&s}getHeaderName(t,e){return t?t(this.gos.addGridCommonParams({column:e})):this.columnNameService.getDisplayNameForColumn(e,"csv",!0)}createValueForGroupNode(t,e){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:t,node:e}));let n=this.gos.get("treeData"),i=this.gos.get("suppressGroupMaintainValueType"),r=l=>{if(n||i)return l.key;let c=l.groupData?.[t.getId()];return!c||!l.rowGroupColumn||l.rowGroupColumn.getColDef().useValueFormatterForExport===!1?c:this.valueService.formatValue(l.rowGroupColumn,l,c)??c},s=e.footer,o=[r(e)];if(!this.gos.isGroupMultiAutoColumn())for(;e.parent;)e=e.parent,o.push(r(e));let a=o.reverse().join(" -> ");return s?`Total ${a}`:a}processCell(t){let{accumulatedRowIndex:e,rowNode:n,column:i,value:r,processCellCallback:s,type:o}=t;return s?{value:s(this.gos.addGridCommonParams({accumulatedRowIndex:e,column:i,node:n,value:r,type:o,parseValue:a=>this.valueService.parseValue(i,n,a,this.valueService.getValue(i,n)),formatValue:a=>this.valueService.formatValue(i,n,a)??a}))??""}:i.getColDef().useValueFormatterForExport!==!1?{value:r??"",valueFormatted:this.valueService.formatValue(i,n,r)}:{value:r??""}}},JZ=class{static download(t,e){let n=document.defaultView||window;if(!n){wt("There is no `window` associated with the current `document`");return}let i=document.createElement("a"),r=n.URL.createObjectURL(e);i.setAttribute("href",r),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:n})),document.body.removeChild(i),n.setTimeout(()=>{n.URL.revokeObjectURL(r)},0)}},HHe=`\r
`,oqt=class extends x4e{constructor(t){super(t),this.isFirstLine=!0,this.result="";let{suppressQuotes:e,columnSeparator:n}=t;this.suppressQuotes=e,this.columnSeparator=n}addCustomContent(t){t&&(typeof t=="string"?(/^\s*\n/.test(t)||this.beginNewLine(),t=t.replace(/\r?\n/g,HHe),this.result+=t):t.forEach(e=>{this.beginNewLine(),e.forEach((n,i)=>{i!==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(t,e,n,i){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e),this.appendEmptyCells(i)}appendEmptyCells(t){for(let e=1;e<=t;e++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(t,e){e!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(t))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(t,e,n){e!=0&&(this.result+=this.columnSeparator);let i=this.extractRowCellValue(t,e,e,"csv",n);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(t){if(this.suppressQuotes)return t;if(t==null)return'""';let e;return typeof t=="string"?e=t:typeof t.toString=="function"?e=t.toString():(wt("unknown value type during csv conversion"),e=""),'"'+e.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=HHe),this.isFirstLine=!1}},aqt=class extends C4e{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.gridSerializer=t.gridSerializer}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(t){let e=this.gos.get("defaultCsvExportParams");return Object.assign({},e,t)}export(t){if(this.isExportSuppressed()){wt("Export cancelled. Export is not allowed as per your configuration.");return}let e=this.getMergedParams(t),n=this.getData(e),i=new Blob(["\uFEFF",n],{type:"text/plain"}),r=typeof e.fileName=="function"?e.fileName(this.gos.getGridCommonParams()):e.fileName;JZ.download(this.getFileName(r),i)}exportDataAsCsv(t){this.export(t)}getDataAsCsv(t,e=!1){let n=e?Object.assign({},t):this.getMergedParams(t);return this.getData(n)}getDefaultFileExtension(){return"csv"}createSerializingSession(t){let{columnModel:e,columnNameService:n,funcColsService:i,valueService:r,gos:s}=this,{processCellCallback:o,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u}=t;return new oqt({columnModel:e,columnNameService:n,funcColsService:i,valueService:r,gos:s,processCellCallback:o||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};E7=(t=>(t[t.HEADER_GROUPING=0]="HEADER_GROUPING",t[t.HEADER=1]="HEADER",t[t.BODY=2]="BODY",t))(E7||{}),dqt=class extends Ot{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(t){this.visibleColsService=t.visibleColsService,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.rowModel=t.rowModel,this.pinnedRowModel=t.pinnedRowModel,this.selectionService=t.selectionService,this.rowNodeSorter=t.rowNodeSorter,this.sortController=t.sortController}serialize(t,e={}){let{allColumns:n,columnKeys:i,skipRowGroups:r}=e,s=this.getColumnsToExport(n,r,i);return N3e(this.prepareSession(s),this.prependContent(e),this.exportColumnGroups(e,s),this.exportHeaders(e,s),this.processPinnedTopRows(e,s),this.processRows(e,s),this.processPinnedBottomRows(e,s),this.appendContent(e))(t).parse()}processRow(t,e,n,i){let r=e.shouldRowBeSkipped||(()=>!1),s=this.gos.get("groupRemoveSingleChildren"),o=this.gos.get("groupRemoveLowestSingleChildren"),l=e.rowPositions!=null||!!e.onlySelected,c=this.gos.get("groupHideOpenParents")&&!l,d=this.columnModel.isPivotMode()?i.leafGroup:!i.group,u=!!i.footer,m=o&&i.leafGroup,f=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&(s||m);if(!d&&!u&&(e.skipRowGroups||f||c)||e.onlySelected&&!i.isSelected()||e.skipPinnedTop&&i.rowPinned==="top"||e.skipPinnedBottom&&i.rowPinned==="bottom"||i.level===-1&&!d&&!u||r(this.gos.addGridCommonParams({node:i})))return;let D=t.onNewBodyRow(i);if(n.forEach((E,M)=>{D.onColumn(E,M,i)}),e.getCustomContentBelowRow){let E=e.getCustomContentBelowRow(this.gos.addGridCommonParams({node:i}));E&&t.addCustomContent(E)}}appendContent(t){return e=>{let n=t.appendContent;return n&&e.addCustomContent(n),e}}prependContent(t){return e=>{let n=t.prependContent;return n&&e.addCustomContent(n),e}}prepareSession(t){return e=>(e.prepare(t),e)}exportColumnGroups(t,e){return n=>{if(!t.skipColumnGroupHeaders){let i=new tGe,r=this.visibleColsService.createGroups({columns:e,idCreator:i,pinned:null,isStandaloneStructure:!0});this.recursivelyAddHeaderGroups(r,n,t.processGroupHeaderCallback)}return n}}exportHeaders(t,e){return n=>{if(!t.skipColumnHeaders){let i=n.onNewHeaderRow();e.forEach((r,s)=>{i.onColumn(r,s,void 0)})}return n}}processPinnedTopRows(t,e){return n=>{let i=this.processRow.bind(this,n,t,e);return t.rowPositions?t.rowPositions.filter(r=>r.rowPinned==="top").sort((r,s)=>r.rowIndex-s.rowIndex).map(r=>this.pinnedRowModel.getPinnedTopRow(r.rowIndex)).forEach(i):this.pinnedRowModel.forEachPinnedRow("top",i),n}}processRows(t,e){return n=>{let i=this.rowModel,r=i.getType(),s=r==="clientSide",o=r==="serverSide",a=!s&&t.onlySelected,l=this.processRow.bind(this,n,t,e),{exportedRows:c="filteredAndSorted"}=t;if(t.rowPositions)t.rowPositions.filter(d=>d.rowPinned==null).sort((d,u)=>d.rowIndex-u.rowIndex).map(d=>i.getRow(d.rowIndex)).forEach(l);else if(this.columnModel.isPivotMode())s?i.forEachPivotNode(l,!0):o?i.forEachNodeAfterFilterAndSort(l,!0):i.forEachNode(l);else if(t.onlySelectedAllPages||a){let d=this.selectionService.getSelectedNodes();this.replicateSortedOrder(d),d.forEach(l)}else c==="all"?i.forEachNode(l):s||o?i.forEachNodeAfterFilterAndSort(l,!0):i.forEachNode(l);return n}}replicateSortedOrder(t){let e=this.sortController.getSortOptions(),n=(i,r)=>i.rowIndex!=null&&r.rowIndex!=null?i.rowIndex-r.rowIndex:i.level===r.level?i.parent?.id===r.parent?.id?this.rowNodeSorter.compareRowNodes(e,{rowNode:i,currentPos:i.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):n(i.parent,r.parent):i.level>r.level?n(i.parent,r):n(i,r.parent);t.sort(n)}processPinnedBottomRows(t,e){return n=>{let i=this.processRow.bind(this,n,t,e);return t.rowPositions?t.rowPositions.filter(r=>r.rowPinned==="bottom").sort((r,s)=>r.rowIndex-s.rowIndex).map(r=>this.pinnedRowModel.getPinnedBottomRow(r.rowIndex)).forEach(i):this.pinnedRowModel.forEachPinnedRow("bottom",i),n}}getColumnsToExport(t=!1,e=!1,n){let i=this.columnModel.isPivotMode();if(n&&n.length)return this.columnModel.getColsForKeys(n);let r=this.gos.get("treeData"),s=[];return t&&!i?s=this.columnModel.getCols():s=this.visibleColsService.getAllCols(),e&&!r&&(s=s.filter(o=>o.getColId()!==Xv)),s}recursivelyAddHeaderGroups(t,e,n){let i=[];t.forEach(r=>{let s=r;s.getChildren&&s.getChildren().forEach(o=>i.push(o))}),t.length>0&&Sm(t[0])&&this.doAddHeaderHeader(e,t,n),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,e,n)}doAddHeaderHeader(t,e,n){let i=t.onNewHeaderGroupingRow(),r=0;e.forEach(s=>{let o=s,a;n?a=n(this.gos.addGridCommonParams({columnGroup:o})):a=this.columnNameService.getDisplayNameForColumnGroup(o,"header");let l=o.getLeafColumns().reduce((c,d,u,m)=>{let f=Ar(c);return d.getColumnGroupShow()==="open"?(!f||f[1]!=null)&&(f=[u],c.push(f)):f&&f[1]==null&&(f[1]=u-1),u===m.length-1&&f&&f[1]==null&&(f[1]=u),c},[]);i.onColumn(o,a||"",r++,o.getLeafColumns().length-1,l)})}},b4e="32.1.0",eX={version:b4e,moduleName:"@ag-grid-community/csv-export-core",beans:[aqt,dqt]},uqt={version:b4e,moduleName:"@ag-grid-community/csv-export-api",apiFunctions:{getDataAsCsv:lqt,exportDataAsCsv:cqt},dependantModules:[eX]},rz={version:b4e,moduleName:"@ag-grid-community/csv-export",dependantModules:[eX,uqt]},MZ=`\r
`;w4e=class{static createHeader(t={}){let e="<?",n="?>",i=["version"];t.version||(t.version="1.0"),t.encoding&&i.push("encoding"),t.standalone&&i.push("standalone");let r=i.map(s=>`${s}="${t[s]}"`).join(" ");return`${e}xml ${r} ${n}`}static createXml(t,e){let n="";t.properties&&(t.properties.prefixedAttributes&&t.properties.prefixedAttributes.forEach(r=>{Object.keys(r.map).forEach(s=>{n+=GHe(r.prefix+s,r.map[s],e)})}),t.properties.rawMap&&Object.keys(t.properties.rawMap).forEach(r=>{n+=GHe(r,t.properties.rawMap[r],e)}));let i="<"+t.name+n;return!t.children&&t.textNode==null?i+"/>"+MZ:t.textNode!=null?i+">"+t.textNode+"</"+t.name+">"+MZ:(i+=">"+MZ,t.children&&t.children.forEach(r=>{i+=this.createXml(r,e)}),i+"</"+t.name+">"+MZ)}},hqt=t=>O(void 0,null,function*(){let e=0,n=[],i=new WritableStream({write:o=>{n.push(o),e+=o.length}}),r=new ReadableStream({start:o=>{let a=new FileReader;a.onload=l=>{l.target?.result&&o.enqueue(l.target.result),o.close()},a.readAsArrayBuffer(t)}}),s=new window.CompressionStream("deflate-raw");return yield r.pipeThrough(s).pipeTo(i),{size:e,content:new Blob(n)}}),pqt=t=>O(void 0,null,function*(){let e=new Blob([t]),{size:n,content:i}=yield hqt(e),r=new Uint8Array(yield i.arrayBuffer());return{size:n,content:r}}),mqt=t=>{let e=t.getHours();return e<<=6,e=e|t.getMinutes(),e<<=5,e=e|t.getSeconds()/2,e},fqt=t=>{let e=t.getFullYear()-1980;return e<<=4,e=e|t.getMonth()+1,e<<=5,e=e|t.getDate(),e};WHe=t=>{if(!t.length)return 0;let e=-1,n=0,i=0,r=0;for(let s=0;s<t.length;s++)n=t[s],i=(e^n)&255,r=gqt[i],e=e>>>8^r;return e^-1},UHe=t=>t.length?WHe(typeof t=="string"?new TextEncoder().encode(t):t):0,gqt=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),TWe=(t,e,n,i,r,s)=>{let{content:o,path:a,created:l}=t,c=mqt(l),d=fqt(l),u=UHe(r),m=s!==void 0?s:i,f=RBt(a),_=f!==a,x="";if(_){let I=m2(1,1)+m2(UHe(f),4)+f;x="up"+m2(I.length,2)+I}let D="\0"+(_?"\0\b":"\0\0")+m2(e?8:0,2)+m2(c,2)+m2(d,2)+m2(m?u:0,4)+m2(s??i,4)+m2(i,4)+m2(f.length,2)+m2(x.length,2),E="PK"+D+f+x,M="PK\0"+D+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\0\0\0")+m2(n,4)+f+x;return{localFileHeader:Uint8Array.from(E,I=>I.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(M,I=>I.charCodeAt(0))}},DWe=t=>{let e;if(typeof t=="string"){let n=atob(t.split(";base64,")[1]);e=Uint8Array.from(n,i=>i.charCodeAt(0))}else e=t;return{size:e.length,content:e}},vqt=(t,e)=>O(void 0,null,function*(){let{content:n}=t,{size:i,content:r}=n?DWe(n):{size:0,content:Uint8Array.from([])},s,o,a=!1;if(t.type==="file"&&r&&i>0){let d=yield pqt(r);s=d.content,o=d.size,a=!0}let c=TWe(t,a,e,i,r,o);return St(ve({},c),{content:s||r,isCompressed:a})}),yqt=(t,e)=>{let{content:n}=t,{content:i}=n?DWe(n):{content:Uint8Array.from([])},r=TWe(t,!1,e,i.length,i,void 0);return St(ve({},r),{content:i,isCompressed:!1})},_qt=(t,e,n)=>{let i="PK\0\0\0\0"+m2(t,2)+m2(t,2)+m2(e,4)+m2(n,4)+"\0\0";return Uint8Array.from(i,r=>r.charCodeAt(0))},Tm=(()=>{let t=class{static addFolders(e){e.forEach(this.addFolder.bind(this))}static addFolder(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}static addFile(e,n,i=!1){this.files.push({path:e,created:new Date,content:i?n:new TextEncoder().encode(n),isBase64:i,type:"file"})}static getZipFile(e="application/zip"){return O(this,null,function*(){let n=yield this.buildCompressedFileStream();return this.clearStream(),new Blob([n],{type:e})})}static getUncompressedZipFile(e="application/zip"){let n=this.buildFileStream();return this.clearStream(),new Blob([n],{type:e})}static clearStream(){this.folders=[],this.files=[]}static packageFiles(e){let n=0,i=0;for(let d of e){let{localFileHeader:u,centralDirectoryHeader:m,content:f}=d;n+=u.length+f.length,i+=m.length}let r=new Uint8Array(n),s=new Uint8Array(i),o=0,a=0;for(let d of e){let{localFileHeader:u,centralDirectoryHeader:m,content:f}=d;r.set(u,o),o+=u.length,r.set(f,o),o+=f.length,s.set(m,a),a+=m.length}let l=_qt(e.length,i,n),c=new Uint8Array(r.length+s.length+l.length);return c.set(r),c.set(s,r.length),c.set(l,r.length+s.length),c}static buildCompressedFileStream(){return O(this,null,function*(){let e=[...this.folders,...this.files],n=[],i=0;for(let r of e){let s=yield vqt(r,i),{localFileHeader:o,content:a}=s;n.push(s),i+=o.length+a.length}return this.packageFiles(n)})}static buildFileStream(){let e=[...this.folders,...this.files],n=[],i=0;for(let r of e){let s=yqt(r,i),{localFileHeader:o,content:a}=s;n.push(s),i+=o.length+a.length}return this.packageFiles(n)}};return t.folders=[],t.files=[],t})(),Cqt=class extends d4e{wireBeans(t){this.beans=t}constructor(t,e,n){super(t),this.parentCache=e,this.params=n,this.startRow=t*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(t,e,n){Di(e)?t.setDataAndId(e,n.toString()):t.setDataAndId(void 0,void 0)}loadFromDatasource(){let t=this.createLoadParams();if(Ls(this.params.datasource.getRows)){wt("datasource is missing getRows method");return}window.setTimeout(()=>{this.params.datasource.getRows(t)},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.gos.getGridCommonParams().context}}forEachNode(t,e,n){this.rowNodes.forEach((i,r)=>{this.startRow+r<n&&t(i,e.next())})}getLastAccessed(){return this.lastAccessed}getRow(t,e=!1){e||(this.lastAccessed=this.params.lastAccessedSequence.next());let n=t-this.startRow;return this.rowNodes[n]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let t=0;t<this.params.blockSize;t++){let e=this.startRow+t,n=new Pp(this.beans);n.setRowHeight(this.params.rowHeight),n.uiLevel=0,n.setRowIndex(e),n.setRowTop(this.params.rowHeight*e),this.rowNodes.push(n)}}processServerResult(t){this.rowNodes.forEach((n,i)=>{let r=t.rowData?t.rowData[i]:void 0;!n.id&&n.alreadyRendered&&r&&(this.rowNodes[i]=new Pp(this.beans),this.rowNodes[i].setRowIndex(n.rowIndex),this.rowNodes[i].setRowTop(n.rowTop),this.rowNodes[i].setRowHeight(n.rowHeight),n.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[i],r,this.startRow+i)});let e=t.rowCount!=null&&t.rowCount>=0?t.rowCount:void 0;this.parentCache.pageLoaded(this,e)}destroy(){this.rowNodes.forEach(t=>{t.clearRowTopAndRowIndex()}),super.destroy()}},xqt=2,bqt=class extends Ot{constructor(t){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=t.initialRowCount,this.params=t}wireBeans(t){this.rowRenderer=t.rowRenderer,this.focusService=t.focusService}getRow(t,e=!1){let n=Math.floor(t/this.params.blockSize),i=this.blocks[n];if(!i){if(e)return;i=this.createBlock(n)}return i.getRow(t)}createBlock(t){let e=this.createBean(new Cqt(t,this,this.params));return this.blocks[e.getId()]=e,this.blockCount++,this.purgeBlocksIfNeeded(e),this.params.rowNodeBlockLoader.addBlock(e),e}refreshCache(){if(this.blockCount==0){this.purgeCache();return}this.getBlocksInOrder().forEach(e=>e.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){this.getBlocksInOrder().forEach(t=>this.destroyBlock(t)),super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(t,e){this.isAlive()&&(this.gos.get("debug")&&Kv(`InfiniteCache - onPageLoaded: page = ${t.getId()}, lastRow = ${e}`),this.checkRowCount(t,e),this.onCacheUpdated())}purgeBlocksIfNeeded(t){let e=this.getBlocksInOrder().filter(o=>o!=t),n=(o,a)=>a.getLastAccessed()-o.getLastAccessed();e.sort(n);let i=this.params.maxBlocksInCache>0,r=i?this.params.maxBlocksInCache-1:null,s=xqt-1;e.forEach((o,a)=>{let l=o.getState()==="needsLoading"&&a>=s,c=i?a>=r:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(o)||this.isBlockFocused(o))return;this.removeBlockFromCache(o)}})}isBlockFocused(t){let e=this.focusService.getFocusCellToUseAfterRefresh();if(!e||e.rowPinned!=null)return!1;let n=t.getStartRow(),i=t.getEndRow();return e.rowIndex>=n&&e.rowIndex<i}isBlockCurrentlyDisplayed(t){let e=t.getStartRow(),n=t.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(e,n)}removeBlockFromCache(t){t&&this.destroyBlock(t)}checkRowCount(t,e){if(typeof e=="number"&&e>=0)this.rowCount=e,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let i=(t.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<i&&(this.rowCount=i)}}setRowCount(t,e){this.rowCount=t,Di(e)&&(this.lastRowIndexKnown=e),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(t){let e=new c1;this.getBlocksInOrder().forEach(n=>n.forEachNode(t,e,this.rowCount))}getBlocksInOrder(){let t=(n,i)=>n.getId()-i.getId();return m5(this.blocks).sort(t)}destroyBlock(t){delete this.blocks[t.getId()],this.destroyBean(t),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(t)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventService.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){let t=[];this.getBlocksInOrder().forEach(e=>{e.getId()*this.params.blockSize>=this.rowCount&&t.push(e)}),t.length>0&&t.forEach(e=>this.destroyBlock(e))}purgeCache(){this.getBlocksInOrder().forEach(t=>this.removeBlockFromCache(t)),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(t,e){let n=[],i=-1,r=!1,s=new c1,o=!1;return this.getBlocksInOrder().forEach(l=>{if(!o){if(r&&i+1!==l.getId()){o=!0;return}i=l.getId(),l.forEachNode(c=>{let d=c===t||c===e;(r||d)&&n.push(c),d&&(r=!r)},s,this.rowCount)}}),o||r?[]:n}},wqt=class extends Ot{constructor(){super(...arguments),this.beanName="rowModel"}wireBeans(t){this.filterManager=t.filterManager,this.sortController=t.sortController,this.selectionService=t.selectionService,this.rowRenderer=t.rowRenderer,this.rowNodeBlockLoader=t.rowNodeBlockLoader}getRowBounds(t){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*t}}ensureRowHeightsValid(){return!1}postConstruct(){this.gos.isRowModelType("infinite")&&(this.rowHeight=this.gos.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&wt("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onCacheUpdated.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){let t;this.cacheParams?t=this.isSortModelDifferent():t=!0,t&&this.reset()}isSortModelDifferent(){return!mD(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(t){this.destroyDatasource(),this.datasource=t,t&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(t,e){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(t,e):[]}reset(){if(!this.datasource)return;this.gos.getRowIdCallback()!=null||this.selectionService.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventService.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!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.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:this.gos.getRowHeightAsNumber(),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new c1},this.infiniteCache=this.createBean(new bqt(this.cacheParams)),this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(t=>{t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*t.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){this.dispatchModelUpdatedEvent()}getRow(t){if(this.infiniteCache&&!(t>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(t)}getRowNode(t){let e;return this.forEachNode(n=>{n.id===t&&(e=n)}),e}forEachNode(t){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(t)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(t){return t}getRowIndexAtPixel(t){if(this.rowHeight!==0){let e=Math.floor(t/this.rowHeight),n=this.getRowCount()-1;return e>n?n:e}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(t){return!!this.getRowNode(t.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?this.infiniteCache.isLastRowIndexKnown():!1}setRowCount(t,e){this.infiniteCache&&this.infiniteCache.setRowCount(t,e)}};S4e="32.1.0",EWe={version:S4e,moduleName:"@ag-grid-community/infinite-row-model-core",rowModel:"infinite",beans:[wqt],dependantModules:[u4e]},Mqt={version:S4e,moduleName:"@ag-grid-community/infinite-row-model-api",beans:[QZ],apiFunctions:{refreshInfiniteCache:Sqt,purgeInfiniteCache:Tqt,getInfiniteRowCount:Dqt,isLastRowIndexKnown:Eqt},dependantModules:[EWe,v4e]},T4e={version:S4e,moduleName:"@ag-grid-community/infinite-row-model",dependantModules:[EWe,Mqt]};Sa.__registerModules([ZZ,_4e,T4e,rz],!1,void 0)});var MWe,D4e,kWe,E4e,IWe,M4e=Q(()=>{Xt();me();me();MWe=(()=>{let e=class e extends wWe{setViewContainerRef(i,r){this.viewContainerRef=i,this.angularFrameworkOverrides=r}createWrapper(i){let r=this.angularFrameworkOverrides,s=this;class o extends D4e{init(c){r.runInsideAngular(()=>{super.init(c),this._componentRef.changeDetectorRef.detectChanges()})}createComponent(){return r.runInsideAngular(()=>s.createComponent(i))}hasMethod(c){return a.getFrameworkComponentInstance()[c]!=null}callMethod(c,d){let u=this.getFrameworkComponentInstance();return r.runInsideAngular(()=>a.getFrameworkComponentInstance()[c].apply(u,d))}addMethod(c,d){a[c]=d}}let a=new o;return a}createComponent(i){return this.viewContainerRef.createComponent(i)}};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),D4e=class{init(e){this._params=e,this._componentRef=this.createComponent(),this._agAwareComponent=this._componentRef.instance,this._frameworkComponentInstance=this._componentRef.instance,this._eGui=this._componentRef.location.nativeElement,dc(this._eGui),this._agAwareComponent.agInit(this._params)}getGui(){return this._eGui}getRootElement(){return this._eGui.firstChild}destroy(){this._frameworkComponentInstance&&typeof this._frameworkComponentInstance.destroy=="function"&&this._frameworkComponentInstance.destroy(),this._componentRef&&this._componentRef.destroy()}getFrameworkComponentInstance(){return this._frameworkComponentInstance}},kWe=(()=>{let e=class e extends p4e{constructor(i){super("angular"),this._ngZone=i,this.isRunningWithinTestZone=!1,this.wrapIncoming=(r,s)=>this.runOutside(r,s),this.wrapOutgoing=r=>this.runInsideAngular(r),this.isRunningWithinTestZone=window?.AG_GRID_UNDER_TEST??!!window?.Zone?.AsyncTestZoneSpec,this._ngZone?this.isRunningWithinTestZone?this.runOutside=(r,s)=>s==="resize-observer"||s==="popupPositioning"?this._ngZone.runOutsideAngular(r):r():this.runOutside=r=>this._ngZone.runOutsideAngular(r):this.runOutside=r=>r()}get shouldWrapOutgoing(){return this._ngZone&&pn.isInAngularZone()}isFrameworkComponent(i){if(!i)return!1;let r=i.prototype;return r&&"agInit"in r}runInsideAngular(i){return this._ngZone?this._ngZone.run(i):i()}runOutsideAngular(i,r){return this.runOutside(i,r)}};e.\u0275fac=function(r){return new(r||e)(it(pn))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),E4e=(()=>{let e=class e{constructor(i,r,s,o){this.viewContainerRef=r,this.angularFrameworkOverrides=s,this.frameworkComponentWrapper=o,this._initialised=!1,this._destroyed=!1,this._holdEvents=!0,this._fullyReady=new Promise(a=>{this._resolveFullyReady=a}),this.statusBar=void 0,this.sideBar=void 0,this.suppressContextMenu=void 0,this.preventDefaultOnContextMenu=void 0,this.allowContextMenuWithControlKey=void 0,this.columnMenu=void 0,this.suppressMenuHide=void 0,this.enableBrowserTooltips=void 0,this.tooltipTrigger=void 0,this.tooltipShowDelay=void 0,this.tooltipHideDelay=void 0,this.tooltipMouseTrack=void 0,this.tooltipShowMode=void 0,this.tooltipInteraction=void 0,this.popupParent=void 0,this.copyHeadersToClipboard=void 0,this.copyGroupHeadersToClipboard=void 0,this.clipboardDelimiter=void 0,this.suppressCopyRowsToClipboard=void 0,this.suppressCopySingleCellRanges=void 0,this.suppressLastEmptyLineOnPaste=void 0,this.suppressClipboardPaste=void 0,this.suppressClipboardApi=void 0,this.suppressCutToClipboard=void 0,this.columnDefs=void 0,this.defaultColDef=void 0,this.defaultColGroupDef=void 0,this.columnTypes=void 0,this.dataTypeDefinitions=void 0,this.maintainColumnOrder=void 0,this.suppressFieldDotNotation=void 0,this.headerHeight=void 0,this.groupHeaderHeight=void 0,this.floatingFiltersHeight=void 0,this.pivotHeaderHeight=void 0,this.pivotGroupHeaderHeight=void 0,this.allowDragFromColumnsToolPanel=void 0,this.suppressMovableColumns=void 0,this.suppressColumnMoveAnimation=void 0,this.suppressDragLeaveHidesColumns=void 0,this.suppressRowGroupHidesColumns=void 0,this.colResizeDefault=void 0,this.suppressAutoSize=void 0,this.autoSizePadding=void 0,this.skipHeaderOnAutoSize=void 0,this.autoSizeStrategy=void 0,this.components=void 0,this.editType=void 0,this.singleClickEdit=void 0,this.suppressClickEdit=void 0,this.readOnlyEdit=void 0,this.stopEditingWhenCellsLoseFocus=void 0,this.enterNavigatesVertically=void 0,this.enterNavigatesVerticallyAfterEdit=void 0,this.enableCellEditingOnBackspace=void 0,this.undoRedoCellEditing=void 0,this.undoRedoCellEditingLimit=void 0,this.defaultCsvExportParams=void 0,this.suppressCsvExport=void 0,this.defaultExcelExportParams=void 0,this.suppressExcelExport=void 0,this.excelStyles=void 0,this.quickFilterText=void 0,this.cacheQuickFilter=void 0,this.includeHiddenColumnsInQuickFilter=void 0,this.quickFilterParser=void 0,this.quickFilterMatcher=void 0,this.applyQuickFilterBeforePivotOrAgg=void 0,this.excludeChildrenWhenTreeDataFiltering=void 0,this.enableAdvancedFilter=void 0,this.advancedFilterModel=void 0,this.includeHiddenColumnsInAdvancedFilter=void 0,this.advancedFilterParent=void 0,this.advancedFilterBuilderParams=void 0,this.suppressAdvancedFilterEval=void 0,this.enableCharts=void 0,this.chartThemes=void 0,this.customChartThemes=void 0,this.chartThemeOverrides=void 0,this.chartToolPanelsDef=void 0,this.chartMenuItems=void 0,this.loadingCellRenderer=void 0,this.loadingCellRendererParams=void 0,this.loadingCellRendererSelector=void 0,this.localeText=void 0,this.masterDetail=void 0,this.keepDetailRows=void 0,this.keepDetailRowsCount=void 0,this.detailCellRenderer=void 0,this.detailCellRendererParams=void 0,this.detailRowHeight=void 0,this.detailRowAutoHeight=void 0,this.context=void 0,this.alignedGrids=void 0,this.tabIndex=void 0,this.rowBuffer=void 0,this.valueCache=void 0,this.valueCacheNeverExpires=void 0,this.enableCellExpressions=void 0,this.suppressTouch=void 0,this.suppressFocusAfterRefresh=void 0,this.suppressAsyncEvents=void 0,this.suppressBrowserResizeObserver=void 0,this.suppressPropertyNamesCheck=void 0,this.suppressChangeDetection=void 0,this.debug=void 0,this.loading=void 0,this.overlayLoadingTemplate=void 0,this.loadingOverlayComponent=void 0,this.loadingOverlayComponentParams=void 0,this.suppressLoadingOverlay=void 0,this.overlayNoRowsTemplate=void 0,this.noRowsOverlayComponent=void 0,this.noRowsOverlayComponentParams=void 0,this.suppressNoRowsOverlay=void 0,this.pagination=void 0,this.paginationPageSize=void 0,this.paginationPageSizeSelector=void 0,this.paginationAutoPageSize=void 0,this.paginateChildRows=void 0,this.suppressPaginationPanel=void 0,this.pivotMode=void 0,this.pivotPanelShow=void 0,this.pivotMaxGeneratedColumns=void 0,this.pivotDefaultExpanded=void 0,this.pivotColumnGroupTotals=void 0,this.pivotRowTotals=void 0,this.pivotSuppressAutoColumn=void 0,this.suppressExpandablePivotGroups=void 0,this.functionsReadOnly=void 0,this.aggFuncs=void 0,this.suppressAggFuncInHeader=void 0,this.alwaysAggregateAtRootLevel=void 0,this.aggregateOnlyChangedColumns=void 0,this.suppressAggFilteredOnly=void 0,this.removePivotHeaderRowWhenSingleValueColumn=void 0,this.animateRows=void 0,this.enableCellChangeFlash=void 0,this.cellFlashDuration=void 0,this.cellFlashDelay=void 0,this.cellFadeDuration=void 0,this.cellFadeDelay=void 0,this.allowShowChangeAfterFilter=void 0,this.domLayout=void 0,this.ensureDomOrder=void 0,this.enableRtl=void 0,this.suppressColumnVirtualisation=void 0,this.suppressMaxRenderedRowRestriction=void 0,this.suppressRowVirtualisation=void 0,this.rowDragManaged=void 0,this.suppressRowDrag=void 0,this.suppressMoveWhenRowDragging=void 0,this.rowDragEntireRow=void 0,this.rowDragMultiRow=void 0,this.rowDragText=void 0,this.fullWidthCellRenderer=void 0,this.fullWidthCellRendererParams=void 0,this.embedFullWidthRows=void 0,this.suppressGroupMaintainValueType=void 0,this.groupDisplayType=void 0,this.groupDefaultExpanded=void 0,this.autoGroupColumnDef=void 0,this.groupMaintainOrder=void 0,this.groupSelectsChildren=void 0,this.groupLockGroupColumns=void 0,this.groupAggFiltering=void 0,this.groupIncludeFooter=void 0,this.groupIncludeTotalFooter=void 0,this.groupTotalRow=void 0,this.grandTotalRow=void 0,this.suppressStickyTotalRow=void 0,this.groupSuppressBlankHeader=void 0,this.groupSelectsFiltered=void 0,this.showOpenedGroup=void 0,this.groupRemoveSingleChildren=void 0,this.groupRemoveLowestSingleChildren=void 0,this.groupHideOpenParents=void 0,this.groupAllowUnbalanced=void 0,this.rowGroupPanelShow=void 0,this.groupRowRenderer=void 0,this.groupRowRendererParams=void 0,this.suppressMakeColumnVisibleAfterUnGroup=void 0,this.treeData=void 0,this.rowGroupPanelSuppressSort=void 0,this.suppressGroupRowsSticky=void 0,this.pinnedTopRowData=void 0,this.pinnedBottomRowData=void 0,this.rowModelType=void 0,this.rowData=void 0,this.asyncTransactionWaitMillis=void 0,this.suppressModelUpdateAfterUpdateTransaction=void 0,this.datasource=void 0,this.cacheOverflowSize=void 0,this.infiniteInitialRowCount=void 0,this.serverSideInitialRowCount=void 0,this.suppressServerSideInfiniteScroll=void 0,this.suppressServerSideFullWidthLoadingRow=void 0,this.cacheBlockSize=void 0,this.maxBlocksInCache=void 0,this.maxConcurrentDatasourceRequests=void 0,this.blockLoadDebounceMillis=void 0,this.purgeClosedRowNodes=void 0,this.serverSideDatasource=void 0,this.serverSideSortAllLevels=void 0,this.serverSideEnableClientSideSort=void 0,this.serverSideOnlyRefreshFilteredGroups=void 0,this.serverSideSortOnServer=void 0,this.serverSideFilterOnServer=void 0,this.serverSidePivotResultFieldSeparator=void 0,this.viewportDatasource=void 0,this.viewportRowModelPageSize=void 0,this.viewportRowModelBufferSize=void 0,this.alwaysShowHorizontalScroll=void 0,this.alwaysShowVerticalScroll=void 0,this.debounceVerticalScrollbar=void 0,this.suppressHorizontalScroll=void 0,this.suppressScrollOnNewData=void 0,this.suppressScrollWhenPopupsAreOpen=void 0,this.suppressAnimationFrame=void 0,this.suppressMiddleClickScrolls=void 0,this.suppressPreventDefaultOnMouseWheel=void 0,this.scrollbarWidth=void 0,this.rowSelection=void 0,this.rowMultiSelectWithClick=void 0,this.suppressRowDeselection=void 0,this.suppressRowClickSelection=void 0,this.suppressCellFocus=void 0,this.suppressHeaderFocus=void 0,this.suppressMultiRangeSelection=void 0,this.enableCellTextSelection=void 0,this.enableRangeSelection=void 0,this.enableRangeHandle=void 0,this.enableFillHandle=void 0,this.fillHandleDirection=void 0,this.suppressClearOnFillReduction=void 0,this.sortingOrder=void 0,this.accentedSort=void 0,this.unSortIcon=void 0,this.suppressMultiSort=void 0,this.alwaysMultiSort=void 0,this.multiSortKey=void 0,this.suppressMaintainUnsortedOrder=void 0,this.icons=void 0,this.rowHeight=void 0,this.rowStyle=void 0,this.rowClass=void 0,this.rowClassRules=void 0,this.suppressRowHoverHighlight=void 0,this.suppressRowTransform=void 0,this.columnHoverHighlight=void 0,this.gridId=void 0,this.deltaSort=void 0,this.treeDataDisplayType=void 0,this.enableGroupEdit=void 0,this.initialState=void 0,this.getContextMenuItems=void 0,this.getMainMenuItems=void 0,this.postProcessPopup=void 0,this.processUnpinnedColumns=void 0,this.processCellForClipboard=void 0,this.processHeaderForClipboard=void 0,this.processGroupHeaderForClipboard=void 0,this.processCellFromClipboard=void 0,this.sendToClipboard=void 0,this.processDataFromClipboard=void 0,this.isExternalFilterPresent=void 0,this.doesExternalFilterPass=void 0,this.getChartToolbarItems=void 0,this.createChartContainer=void 0,this.focusGridInnerElement=void 0,this.navigateToNextHeader=void 0,this.tabToNextHeader=void 0,this.navigateToNextCell=void 0,this.tabToNextCell=void 0,this.getLocaleText=void 0,this.getDocument=void 0,this.paginationNumberFormatter=void 0,this.getGroupRowAgg=void 0,this.isGroupOpenByDefault=void 0,this.initialGroupOrderComparator=void 0,this.processPivotResultColDef=void 0,this.processPivotResultColGroupDef=void 0,this.getDataPath=void 0,this.getChildCount=void 0,this.getServerSideGroupLevelParams=void 0,this.isServerSideGroupOpenByDefault=void 0,this.isApplyServerSideTransaction=void 0,this.isServerSideGroup=void 0,this.getServerSideGroupKey=void 0,this.getBusinessKeyForNode=void 0,this.getRowId=void 0,this.resetRowDataOnUpdate=void 0,this.processRowPostCreate=void 0,this.isRowSelectable=void 0,this.isRowMaster=void 0,this.fillOperation=void 0,this.postSortRows=void 0,this.getRowStyle=void 0,this.getRowClass=void 0,this.getRowHeight=void 0,this.isFullWidthRow=void 0,this.toolPanelVisibleChanged=new nt,this.toolPanelSizeChanged=new nt,this.columnMenuVisibleChanged=new nt,this.contextMenuVisibleChanged=new nt,this.cutStart=new nt,this.cutEnd=new nt,this.pasteStart=new nt,this.pasteEnd=new nt,this.columnVisible=new nt,this.columnPinned=new nt,this.columnResized=new nt,this.columnMoved=new nt,this.columnValueChanged=new nt,this.columnPivotModeChanged=new nt,this.columnPivotChanged=new nt,this.columnGroupOpened=new nt,this.newColumnsLoaded=new nt,this.gridColumnsChanged=new nt,this.displayedColumnsChanged=new nt,this.virtualColumnsChanged=new nt,this.columnEverythingChanged=new nt,this.columnHeaderMouseOver=new nt,this.columnHeaderMouseLeave=new nt,this.columnHeaderClicked=new nt,this.columnHeaderContextMenu=new nt,this.componentStateChanged=new nt,this.cellValueChanged=new nt,this.cellEditRequest=new nt,this.rowValueChanged=new nt,this.cellEditingStarted=new nt,this.cellEditingStopped=new nt,this.rowEditingStarted=new nt,this.rowEditingStopped=new nt,this.undoStarted=new nt,this.undoEnded=new nt,this.redoStarted=new nt,this.redoEnded=new nt,this.rangeDeleteStart=new nt,this.rangeDeleteEnd=new nt,this.fillStart=new nt,this.fillEnd=new nt,this.filterOpened=new nt,this.filterChanged=new nt,this.filterModified=new nt,this.advancedFilterBuilderVisibleChanged=new nt,this.chartCreated=new nt,this.chartRangeSelectionChanged=new nt,this.chartOptionsChanged=new nt,this.chartDestroyed=new nt,this.cellKeyDown=new nt,this.gridReady=new nt,this.firstDataRendered=new nt,this.gridSizeChanged=new nt,this.modelUpdated=new nt,this.virtualRowRemoved=new nt,this.viewportChanged=new nt,this.bodyScroll=new nt,this.bodyScrollEnd=new nt,this.dragStarted=new nt,this.dragStopped=new nt,this.stateUpdated=new nt,this.paginationChanged=new nt,this.rowDragEnter=new nt,this.rowDragMove=new nt,this.rowDragLeave=new nt,this.rowDragEnd=new nt,this.columnRowGroupChanged=new nt,this.rowGroupOpened=new nt,this.expandOrCollapseAll=new nt,this.pivotMaxColumnsExceeded=new nt,this.pinnedRowDataChanged=new nt,this.rowDataUpdated=new nt,this.asyncTransactionsFlushed=new nt,this.storeRefreshed=new nt,this.headerFocused=new nt,this.cellClicked=new nt,this.cellDoubleClicked=new nt,this.cellFocused=new nt,this.cellMouseOver=new nt,this.cellMouseOut=new nt,this.cellMouseDown=new nt,this.rowClicked=new nt,this.rowDoubleClicked=new nt,this.rowSelected=new nt,this.selectionChanged=new nt,this.cellContextMenu=new nt,this.rangeSelectionChanged=new nt,this.tooltipShow=new nt,this.tooltipHide=new nt,this.sortChanged=new nt,this._nativeElement=i.nativeElement,this._fullyReady.then(()=>{this._holdEvents=!1})}ngAfterViewInit(){this.angularFrameworkOverrides.runOutsideAngular(()=>{this.frameworkComponentWrapper.setViewContainerRef(this.viewContainerRef,this.angularFrameworkOverrides);let i=nGe(this.gridOptions,this);this.gridParams={globalEventListener:this.globalEventListener.bind(this),frameworkOverrides:this.angularFrameworkOverrides,providedBeanInstances:{frameworkComponentWrapper:this.frameworkComponentWrapper},modules:this.modules||[]};let r=XZ(this._nativeElement,i,this.gridParams);r&&(this.api=r),this._initialised=!0,this._resolveFullyReady()})}ngOnChanges(i){this._initialised&&this.angularFrameworkOverrides.runOutsideAngular(()=>{let r={};Object.entries(i).forEach(([s,o])=>{r[s]=o.currentValue}),rGe(r,this.api)})}ngOnDestroy(){this._initialised&&(this._destroyed=!0,this.api?.destroy())}isEmitterUsed(i){let s=this[i],o=s?.observed??s?.observers?.length>0,a=`on${i.charAt(0).toUpperCase()}${i.substring(1)}`,l=!!this.gridOptions&&!!this.gridOptions[a];return o||l}globalEventListener(i,r){if(this._destroyed)return;let s=this[i];if(s&&this.isEmitterUsed(i)){let o=()=>this.angularFrameworkOverrides.runInsideAngular(()=>s.emit(r));this._holdEvents?this._fullyReady.then(()=>o()):o()}}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Na),R(kWe),R(MWe))},e.\u0275cmp=_e({type:e,selectors:[["ag-grid-angular"]],inputs:{gridOptions:"gridOptions",modules:"modules",statusBar:"statusBar",sideBar:"sideBar",suppressContextMenu:"suppressContextMenu",preventDefaultOnContextMenu:"preventDefaultOnContextMenu",allowContextMenuWithControlKey:"allowContextMenuWithControlKey",columnMenu:"columnMenu",suppressMenuHide:"suppressMenuHide",enableBrowserTooltips:"enableBrowserTooltips",tooltipTrigger:"tooltipTrigger",tooltipShowDelay:"tooltipShowDelay",tooltipHideDelay:"tooltipHideDelay",tooltipMouseTrack:"tooltipMouseTrack",tooltipShowMode:"tooltipShowMode",tooltipInteraction:"tooltipInteraction",popupParent:"popupParent",copyHeadersToClipboard:"copyHeadersToClipboard",copyGroupHeadersToClipboard:"copyGroupHeadersToClipboard",clipboardDelimiter:"clipboardDelimiter",suppressCopyRowsToClipboard:"suppressCopyRowsToClipboard",suppressCopySingleCellRanges:"suppressCopySingleCellRanges",suppressLastEmptyLineOnPaste:"suppressLastEmptyLineOnPaste",suppressClipboardPaste:"suppressClipboardPaste",suppressClipboardApi:"suppressClipboardApi",suppressCutToClipboard:"suppressCutToClipboard",columnDefs:"columnDefs",defaultColDef:"defaultColDef",defaultColGroupDef:"defaultColGroupDef",columnTypes:"columnTypes",dataTypeDefinitions:"dataTypeDefinitions",maintainColumnOrder:"maintainColumnOrder",suppressFieldDotNotation:"suppressFieldDotNotation",headerHeight:"headerHeight",groupHeaderHeight:"groupHeaderHeight",floatingFiltersHeight:"floatingFiltersHeight",pivotHeaderHeight:"pivotHeaderHeight",pivotGroupHeaderHeight:"pivotGroupHeaderHeight",allowDragFromColumnsToolPanel:"allowDragFromColumnsToolPanel",suppressMovableColumns:"suppressMovableColumns",suppressColumnMoveAnimation:"suppressColumnMoveAnimation",suppressDragLeaveHidesColumns:"suppressDragLeaveHidesColumns",suppressRowGroupHidesColumns:"suppressRowGroupHidesColumns",colResizeDefault:"colResizeDefault",suppressAutoSize:"suppressAutoSize",autoSizePadding:"autoSizePadding",skipHeaderOnAutoSize:"skipHeaderOnAutoSize",autoSizeStrategy:"autoSizeStrategy",components:"components",editType:"editType",singleClickEdit:"singleClickEdit",suppressClickEdit:"suppressClickEdit",readOnlyEdit:"readOnlyEdit",stopEditingWhenCellsLoseFocus:"stopEditingWhenCellsLoseFocus",enterNavigatesVertically:"enterNavigatesVertically",enterNavigatesVerticallyAfterEdit:"enterNavigatesVerticallyAfterEdit",enableCellEditingOnBackspace:"enableCellEditingOnBackspace",undoRedoCellEditing:"undoRedoCellEditing",undoRedoCellEditingLimit:"undoRedoCellEditingLimit",defaultCsvExportParams:"defaultCsvExportParams",suppressCsvExport:"suppressCsvExport",defaultExcelExportParams:"defaultExcelExportParams",suppressExcelExport:"suppressExcelExport",excelStyles:"excelStyles",quickFilterText:"quickFilterText",cacheQuickFilter:"cacheQuickFilter",includeHiddenColumnsInQuickFilter:"includeHiddenColumnsInQuickFilter",quickFilterParser:"quickFilterParser",quickFilterMatcher:"quickFilterMatcher",applyQuickFilterBeforePivotOrAgg:"applyQuickFilterBeforePivotOrAgg",excludeChildrenWhenTreeDataFiltering:"excludeChildrenWhenTreeDataFiltering",enableAdvancedFilter:"enableAdvancedFilter",advancedFilterModel:"advancedFilterModel",includeHiddenColumnsInAdvancedFilter:"includeHiddenColumnsInAdvancedFilter",advancedFilterParent:"advancedFilterParent",advancedFilterBuilderParams:"advancedFilterBuilderParams",suppressAdvancedFilterEval:"suppressAdvancedFilterEval",enableCharts:"enableCharts",chartThemes:"chartThemes",customChartThemes:"customChartThemes",chartThemeOverrides:"chartThemeOverrides",chartToolPanelsDef:"chartToolPanelsDef",chartMenuItems:"chartMenuItems",loadingCellRenderer:"loadingCellRenderer",loadingCellRendererParams:"loadingCellRendererParams",loadingCellRendererSelector:"loadingCellRendererSelector",localeText:"localeText",masterDetail:"masterDetail",keepDetailRows:"keepDetailRows",keepDetailRowsCount:"keepDetailRowsCount",detailCellRenderer:"detailCellRenderer",detailCellRendererParams:"detailCellRendererParams",detailRowHeight:"detailRowHeight",detailRowAutoHeight:"detailRowAutoHeight",context:"context",alignedGrids:"alignedGrids",tabIndex:"tabIndex",rowBuffer:"rowBuffer",valueCache:"valueCache",valueCacheNeverExpires:"valueCacheNeverExpires",enableCellExpressions:"enableCellExpressions",suppressTouch:"suppressTouch",suppressFocusAfterRefresh:"suppressFocusAfterRefresh",suppressAsyncEvents:"suppressAsyncEvents",suppressBrowserResizeObserver:"suppressBrowserResizeObserver",suppressPropertyNamesCheck:"suppressPropertyNamesCheck",suppressChangeDetection:"suppressChangeDetection",debug:"debug",loading:"loading",overlayLoadingTemplate:"overlayLoadingTemplate",loadingOverlayComponent:"loadingOverlayComponent",loadingOverlayComponentParams:"loadingOverlayComponentParams",suppressLoadingOverlay:"suppressLoadingOverlay",overlayNoRowsTemplate:"overlayNoRowsTemplate",noRowsOverlayComponent:"noRowsOverlayComponent",noRowsOverlayComponentParams:"noRowsOverlayComponentParams",suppressNoRowsOverlay:"suppressNoRowsOverlay",pagination:"pagination",paginationPageSize:"paginationPageSize",paginationPageSizeSelector:"paginationPageSizeSelector",paginationAutoPageSize:"paginationAutoPageSize",paginateChildRows:"paginateChildRows",suppressPaginationPanel:"suppressPaginationPanel",pivotMode:"pivotMode",pivotPanelShow:"pivotPanelShow",pivotMaxGeneratedColumns:"pivotMaxGeneratedColumns",pivotDefaultExpanded:"pivotDefaultExpanded",pivotColumnGroupTotals:"pivotColumnGroupTotals",pivotRowTotals:"pivotRowTotals",pivotSuppressAutoColumn:"pivotSuppressAutoColumn",suppressExpandablePivotGroups:"suppressExpandablePivotGroups",functionsReadOnly:"functionsReadOnly",aggFuncs:"aggFuncs",suppressAggFuncInHeader:"suppressAggFuncInHeader",alwaysAggregateAtRootLevel:"alwaysAggregateAtRootLevel",aggregateOnlyChangedColumns:"aggregateOnlyChangedColumns",suppressAggFilteredOnly:"suppressAggFilteredOnly",removePivotHeaderRowWhenSingleValueColumn:"removePivotHeaderRowWhenSingleValueColumn",animateRows:"animateRows",enableCellChangeFlash:"enableCellChangeFlash",cellFlashDuration:"cellFlashDuration",cellFlashDelay:"cellFlashDelay",cellFadeDuration:"cellFadeDuration",cellFadeDelay:"cellFadeDelay",allowShowChangeAfterFilter:"allowShowChangeAfterFilter",domLayout:"domLayout",ensureDomOrder:"ensureDomOrder",enableRtl:"enableRtl",suppressColumnVirtualisation:"suppressColumnVirtualisation",suppressMaxRenderedRowRestriction:"suppressMaxRenderedRowRestriction",suppressRowVirtualisation:"suppressRowVirtualisation",rowDragManaged:"rowDragManaged",suppressRowDrag:"suppressRowDrag",suppressMoveWhenRowDragging:"suppressMoveWhenRowDragging",rowDragEntireRow:"rowDragEntireRow",rowDragMultiRow:"rowDragMultiRow",rowDragText:"rowDragText",fullWidthCellRenderer:"fullWidthCellRenderer",fullWidthCellRendererParams:"fullWidthCellRendererParams",embedFullWidthRows:"embedFullWidthRows",suppressGroupMaintainValueType:"suppressGroupMaintainValueType",groupDisplayType:"groupDisplayType",groupDefaultExpanded:"groupDefaultExpanded",autoGroupColumnDef:"autoGroupColumnDef",groupMaintainOrder:"groupMaintainOrder",groupSelectsChildren:"groupSelectsChildren",groupLockGroupColumns:"groupLockGroupColumns",groupAggFiltering:"groupAggFiltering",groupIncludeFooter:"groupIncludeFooter",groupIncludeTotalFooter:"groupIncludeTotalFooter",groupTotalRow:"groupTotalRow",grandTotalRow:"grandTotalRow",suppressStickyTotalRow:"suppressStickyTotalRow",groupSuppressBlankHeader:"groupSuppressBlankHeader",groupSelectsFiltered:"groupSelectsFiltered",showOpenedGroup:"showOpenedGroup",groupRemoveSingleChildren:"groupRemoveSingleChildren",groupRemoveLowestSingleChildren:"groupRemoveLowestSingleChildren",groupHideOpenParents:"groupHideOpenParents",groupAllowUnbalanced:"groupAllowUnbalanced",rowGroupPanelShow:"rowGroupPanelShow",groupRowRenderer:"groupRowRenderer",groupRowRendererParams:"groupRowRendererParams",suppressMakeColumnVisibleAfterUnGroup:"suppressMakeColumnVisibleAfterUnGroup",treeData:"treeData",rowGroupPanelSuppressSort:"rowGroupPanelSuppressSort",suppressGroupRowsSticky:"suppressGroupRowsSticky",pinnedTopRowData:"pinnedTopRowData",pinnedBottomRowData:"pinnedBottomRowData",rowModelType:"rowModelType",rowData:"rowData",asyncTransactionWaitMillis:"asyncTransactionWaitMillis",suppressModelUpdateAfterUpdateTransaction:"suppressModelUpdateAfterUpdateTransaction",datasource:"datasource",cacheOverflowSize:"cacheOverflowSize",infiniteInitialRowCount:"infiniteInitialRowCount",serverSideInitialRowCount:"serverSideInitialRowCount",suppressServerSideInfiniteScroll:"suppressServerSideInfiniteScroll",suppressServerSideFullWidthLoadingRow:"suppressServerSideFullWidthLoadingRow",cacheBlockSize:"cacheBlockSize",maxBlocksInCache:"maxBlocksInCache",maxConcurrentDatasourceRequests:"maxConcurrentDatasourceRequests",blockLoadDebounceMillis:"blockLoadDebounceMillis",purgeClosedRowNodes:"purgeClosedRowNodes",serverSideDatasource:"serverSideDatasource",serverSideSortAllLevels:"serverSideSortAllLevels",serverSideEnableClientSideSort:"serverSideEnableClientSideSort",serverSideOnlyRefreshFilteredGroups:"serverSideOnlyRefreshFilteredGroups",serverSideSortOnServer:"serverSideSortOnServer",serverSideFilterOnServer:"serverSideFilterOnServer",serverSidePivotResultFieldSeparator:"serverSidePivotResultFieldSeparator",viewportDatasource:"viewportDatasource",viewportRowModelPageSize:"viewportRowModelPageSize",viewportRowModelBufferSize:"viewportRowModelBufferSize",alwaysShowHorizontalScroll:"alwaysShowHorizontalScroll",alwaysShowVerticalScroll:"alwaysShowVerticalScroll",debounceVerticalScrollbar:"debounceVerticalScrollbar",suppressHorizontalScroll:"suppressHorizontalScroll",suppressScrollOnNewData:"suppressScrollOnNewData",suppressScrollWhenPopupsAreOpen:"suppressScrollWhenPopupsAreOpen",suppressAnimationFrame:"suppressAnimationFrame",suppressMiddleClickScrolls:"suppressMiddleClickScrolls",suppressPreventDefaultOnMouseWheel:"suppressPreventDefaultOnMouseWheel",scrollbarWidth:"scrollbarWidth",rowSelection:"rowSelection",rowMultiSelectWithClick:"rowMultiSelectWithClick",suppressRowDeselection:"suppressRowDeselection",suppressRowClickSelection:"suppressRowClickSelection",suppressCellFocus:"suppressCellFocus",suppressHeaderFocus:"suppressHeaderFocus",suppressMultiRangeSelection:"suppressMultiRangeSelection",enableCellTextSelection:"enableCellTextSelection",enableRangeSelection:"enableRangeSelection",enableRangeHandle:"enableRangeHandle",enableFillHandle:"enableFillHandle",fillHandleDirection:"fillHandleDirection",suppressClearOnFillReduction:"suppressClearOnFillReduction",sortingOrder:"sortingOrder",accentedSort:"accentedSort",unSortIcon:"unSortIcon",suppressMultiSort:"suppressMultiSort",alwaysMultiSort:"alwaysMultiSort",multiSortKey:"multiSortKey",suppressMaintainUnsortedOrder:"suppressMaintainUnsortedOrder",icons:"icons",rowHeight:"rowHeight",rowStyle:"rowStyle",rowClass:"rowClass",rowClassRules:"rowClassRules",suppressRowHoverHighlight:"suppressRowHoverHighlight",suppressRowTransform:"suppressRowTransform",columnHoverHighlight:"columnHoverHighlight",gridId:"gridId",deltaSort:"deltaSort",treeDataDisplayType:"treeDataDisplayType",enableGroupEdit:"enableGroupEdit",initialState:"initialState",getContextMenuItems:"getContextMenuItems",getMainMenuItems:"getMainMenuItems",postProcessPopup:"postProcessPopup",processUnpinnedColumns:"processUnpinnedColumns",processCellForClipboard:"processCellForClipboard",processHeaderForClipboard:"processHeaderForClipboard",processGroupHeaderForClipboard:"processGroupHeaderForClipboard",processCellFromClipboard:"processCellFromClipboard",sendToClipboard:"sendToClipboard",processDataFromClipboard:"processDataFromClipboard",isExternalFilterPresent:"isExternalFilterPresent",doesExternalFilterPass:"doesExternalFilterPass",getChartToolbarItems:"getChartToolbarItems",createChartContainer:"createChartContainer",focusGridInnerElement:"focusGridInnerElement",navigateToNextHeader:"navigateToNextHeader",tabToNextHeader:"tabToNextHeader",navigateToNextCell:"navigateToNextCell",tabToNextCell:"tabToNextCell",getLocaleText:"getLocaleText",getDocument:"getDocument",paginationNumberFormatter:"paginationNumberFormatter",getGroupRowAgg:"getGroupRowAgg",isGroupOpenByDefault:"isGroupOpenByDefault",initialGroupOrderComparator:"initialGroupOrderComparator",processPivotResultColDef:"processPivotResultColDef",processPivotResultColGroupDef:"processPivotResultColGroupDef",getDataPath:"getDataPath",getChildCount:"getChildCount",getServerSideGroupLevelParams:"getServerSideGroupLevelParams",isServerSideGroupOpenByDefault:"isServerSideGroupOpenByDefault",isApplyServerSideTransaction:"isApplyServerSideTransaction",isServerSideGroup:"isServerSideGroup",getServerSideGroupKey:"getServerSideGroupKey",getBusinessKeyForNode:"getBusinessKeyForNode",getRowId:"getRowId",resetRowDataOnUpdate:"resetRowDataOnUpdate",processRowPostCreate:"processRowPostCreate",isRowSelectable:"isRowSelectable",isRowMaster:"isRowMaster",fillOperation:"fillOperation",postSortRows:"postSortRows",getRowStyle:"getRowStyle",getRowClass:"getRowClass",getRowHeight:"getRowHeight",isFullWidthRow:"isFullWidthRow"},outputs:{toolPanelVisibleChanged:"toolPanelVisibleChanged",toolPanelSizeChanged:"toolPanelSizeChanged",columnMenuVisibleChanged:"columnMenuVisibleChanged",contextMenuVisibleChanged:"contextMenuVisibleChanged",cutStart:"cutStart",cutEnd:"cutEnd",pasteStart:"pasteStart",pasteEnd:"pasteEnd",columnVisible:"columnVisible",columnPinned:"columnPinned",columnResized:"columnResized",columnMoved:"columnMoved",columnValueChanged:"columnValueChanged",columnPivotModeChanged:"columnPivotModeChanged",columnPivotChanged:"columnPivotChanged",columnGroupOpened:"columnGroupOpened",newColumnsLoaded:"newColumnsLoaded",gridColumnsChanged:"gridColumnsChanged",displayedColumnsChanged:"displayedColumnsChanged",virtualColumnsChanged:"virtualColumnsChanged",columnEverythingChanged:"columnEverythingChanged",columnHeaderMouseOver:"columnHeaderMouseOver",columnHeaderMouseLeave:"columnHeaderMouseLeave",columnHeaderClicked:"columnHeaderClicked",columnHeaderContextMenu:"columnHeaderContextMenu",componentStateChanged:"componentStateChanged",cellValueChanged:"cellValueChanged",cellEditRequest:"cellEditRequest",rowValueChanged:"rowValueChanged",cellEditingStarted:"cellEditingStarted",cellEditingStopped:"cellEditingStopped",rowEditingStarted:"rowEditingStarted",rowEditingStopped:"rowEditingStopped",undoStarted:"undoStarted",undoEnded:"undoEnded",redoStarted:"redoStarted",redoEnded:"redoEnded",rangeDeleteStart:"rangeDeleteStart",rangeDeleteEnd:"rangeDeleteEnd",fillStart:"fillStart",fillEnd:"fillEnd",filterOpened:"filterOpened",filterChanged:"filterChanged",filterModified:"filterModified",advancedFilterBuilderVisibleChanged:"advancedFilterBuilderVisibleChanged",chartCreated:"chartCreated",chartRangeSelectionChanged:"chartRangeSelectionChanged",chartOptionsChanged:"chartOptionsChanged",chartDestroyed:"chartDestroyed",cellKeyDown:"cellKeyDown",gridReady:"gridReady",firstDataRendered:"firstDataRendered",gridSizeChanged:"gridSizeChanged",modelUpdated:"modelUpdated",virtualRowRemoved:"virtualRowRemoved",viewportChanged:"viewportChanged",bodyScroll:"bodyScroll",bodyScrollEnd:"bodyScrollEnd",dragStarted:"dragStarted",dragStopped:"dragStopped",stateUpdated:"stateUpdated",paginationChanged:"paginationChanged",rowDragEnter:"rowDragEnter",rowDragMove:"rowDragMove",rowDragLeave:"rowDragLeave",rowDragEnd:"rowDragEnd",columnRowGroupChanged:"columnRowGroupChanged",rowGroupOpened:"rowGroupOpened",expandOrCollapseAll:"expandOrCollapseAll",pivotMaxColumnsExceeded:"pivotMaxColumnsExceeded",pinnedRowDataChanged:"pinnedRowDataChanged",rowDataUpdated:"rowDataUpdated",asyncTransactionsFlushed:"asyncTransactionsFlushed",storeRefreshed:"storeRefreshed",headerFocused:"headerFocused",cellClicked:"cellClicked",cellDoubleClicked:"cellDoubleClicked",cellFocused:"cellFocused",cellMouseOver:"cellMouseOver",cellMouseOut:"cellMouseOut",cellMouseDown:"cellMouseDown",rowClicked:"rowClicked",rowDoubleClicked:"rowDoubleClicked",rowSelected:"rowSelected",selectionChanged:"selectionChanged",cellContextMenu:"cellContextMenu",rangeSelectionChanged:"rangeSelectionChanged",tooltipShow:"tooltipShow",tooltipHide:"tooltipHide",sortChanged:"sortChanged"},standalone:!0,features:[as([kWe,MWe]),yn,xe],decls:0,vars:0,template:function(r,s){},encapsulation:2});let t=e;return t})(),IWe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})()});var AWe,PWe=Q(()=>{AWe=(()=>{let e=class e{};e.localeText={selectAll:"Select All",selectAllSearchResults:"Select All Search Results",searchOoo:"Search...",blanks:"Blanks",noMatches:"No matches.",filterOoo:"Filter...",equals:"Equals",notEqual:"Not equal",lessThan:"Less than",greaterThan:"Greater than",lessThanOrEqual:"Less than or equal",greaterThanOrEqual:"Greater than or equal",inRange:"In range",inRangeStart:"To",inRangeEnd:"From",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",dateFormatOoo:"Yyyy-mm-dd",andCondition:"AND",orCondition:"OR",applyFilter:"Apply",resetFilter:"Reset",clearFilter:"Clear",cancelFilter:"Cancel",columns:"Columns",filters:"Filters",pivotMode:"Pivot Mode",groups:"Row Groups",rowGroupColumnsEmptyMessage:"Drag here to set row groups",values:"Values",valueColumnsEmptyMessage:"Drag here to aggregate",pivots:"Column Labels",pivotColumnsEmptyMessage:"Drag here to set column labels",group:"Group",loadingOoo:"Loading...",noRowsToShow:"Keine Daten",enabled:"Enabled",pinColumn:"Pin Column",pinLeft:"Pin Left",pinRight:"Pin Right",noPin:"No Pin",valueAggregation:"Value Aggregation",autosizeThiscolumn:"Autosize This Column",autosizeAllColumns:"Autosize All Columns",groupBy:"Group by",ungroupBy:"Un-Group by",resetColumns:"Reset Columns",expandAll:"Expand All",collapseAll:"Close All",copy:"Copy",ctrlC:"Ctrl+C",copyWithHeaders:"Copy With Headers",paste:"Paste",ctrlV:"Ctrl+V",export:"Export",csvExport:"CSV Export",excelExport:"Excel Export (.xlsx)",excelXmlExport:"Excel Export (.xml)",sum:"Summe",min:"Min",max:"Max",none:"None",count:"Anzahl",avg:"Durchschnitt",filteredRows:"Gefilterte",selectedRows:"Markierte",totalRows:"Alle Zeilen",totalAndFilteredRows:"Zeilen",page:"Page",more:"More",to:"To",of:"von",next:"Next",last:"Last",first:"First",previous:"Previous",pivotChartAndPivotMode:"Pivot Chart & Pivot Mode",pivotChart:"Pivot Chart",chartRange:"Chart Range",columnChart:"Column",groupedColumn:"Grouped",stackedColumn:"Stacked",normalizedColumn:"100% Stacked",barChart:"Bar",groupedBar:"Grouped",stackedBar:"Stacked",normalizedBar:"100% Stacked",pieChart:"Pie",pie:"Pie",doughnut:"Doughnut",line:"Line",xyChart:"X Y (Scatter)",scatter:"Scatter",bubble:"Bubble",areaChart:"Area",area:"Area",stackedArea:"Stacked",normalizedArea:"100% Stacked",histogramChart:"Histogram",pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Settings",data:"Data",format:"Format",categories:"Categories",defaultCategory:"(None)",series:"Series",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",navigator:"Navigator",color:"Color",thickness:"Thickness",xType:"X Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",xRotation:"X Rotation",yRotation:"Y Rotation",ticks:"Ticks",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chart:"Chart",title:"Title",titlePlaceholder:"Chart title - double click to edit",background:"Background",font:"Font",top:"Top",right:"Right",bottom:"Bottom",left:"Left",labels:"Labels",size:"Size",minSize:"Minimum Size",maxSize:"Maximum Size",legend:"Legend",position:"Position",markerSize:"Marker Size",markerStroke:"Marker Stroke",markerPadding:"Marker Padding",itemSpacing:"Item Spacing",itemPaddingX:"Item Padding X",itemPaddingY:"Item Padding Y",layoutHorizontalSpacing:"Horizontal Spacing",layoutVerticalSpacing:"Vertical Spacing",strokeWidth:"Stroke Width",offset:"Offset",offsets:"Offsets",tooltips:"Tooltips",callout:"Callout",markers:"Markers",shadow:"Shadow",blur:"Blur",xOffset:"X Offset",yOffset:"Y Offset",lineWidth:"Line Width",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeOpacity:"Line Opacity",histogramBinCount:"Bin count",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",histogramGroup:"Histogram",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",doughnutTooltip:"Doughnut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",noDataToChart:"No data available to be charted.",pivotChartRequiresPivotMode:"Pivot Chart requires Pivot Mode enabled."};let t=e;return t})()});var IA,k4e=Q(()=>{Qo();zn();Vd();jo();Zh();Ph();t3e();IA=class t{static formatValueByNxtFieldType(e,n,i,r){let s="";switch(n){case Ee.Array:s=e.join(i||" | ");break;case Ee.Date_germanDateTime:s=Ie.format(e,"dd.MM.yyyy HH:mm");break;case Ee.Date_germanDateTimeFull:s=Ie.format(e,"dd.MM.yyyy HH:mm:ss.SSSS");break;case Ee.Date_germanTime:s=Ie.format(e,"HH:mm");break;case Ee.DurationStringToNow:e?s=Qt.format2(e-Date.now(),i):s="";break;case Ee.Date_germanDateWithToNowText:e?s=Ie.format(parseInt(e,10),"dd.MM.yy HH:mm")+" "+Qt.format2(e-Date.now(),i):s="";break;case Ee.Date_germanDate:e?s=Ie.format(parseInt(e,10),"dd.MM.yyyy"):s="";break;case Ee.Date_germanDateShort:s=Ie.format(parseInt(e,10),"dd.MM");break;case Ee.Date_germanDateShortWithDayOfWeek:s=Ie.format(parseInt(e,10),"E dd.MM");break;case Ee.Date_germanDateWithDayOfWeek:s=Ie.format(parseInt(e,10),"EE dd.MM.yyyy");break;case Ee.Date_germanDateTimeWithDayOfWeek:s=Ie.format(parseInt(e,10),"EE dd.MM.yyyy HH:mm");break;case Ee.Date_germanDayOfWeek:s=e;break;case Ee.Date_germanMonth:s=e;break;case Ee.Date_germanMonthString:s=Ie.format(e,"MMMM yyyy");break;case Ee.Date_germanDateTimeWithSeconds:s=Ie.format(e,"dd.MM.yyyy HH:mm:ss");break;case Ee.Money:s=Wn.toMoneyString(e,"\u20AC",!1);break;case Ee.Duration:s=Qt.format(e,"HH:mm");break;case Ee.Percentage:Es.isNumber(e)?s=Math.round(e)+" %":s="";break;case Ee.Decimal:s=Wn.roundToString(e,2);break;case Ee.MoneyOnlyPositiv:s=e>0?Wn.toMoneyString(e):"0,00 \u20AC";break;case Ee.MoneyOnlyPositivShort:s=e>0?Wn.toMoneyString(e,"\u20AC",!1):"0 \u20AC";break;case Ee.Number:Number.isNaN(e)?s="":s=parseFloat(e).toString();break;case Ee.PaymentSum:s=Wn.toMoneyString(e);break;case Ee.ShowCalendarEvent:s=e?Ir.Material.EditCalendar:"";break;case Ee.ShowEventHistory:s=e?Ir.Material.History:"";break;case Ee.ShowContactHistory:s=e?Ir.Material.History:"";break;case Ee.Icon:s=r||"";break;case Ee.ShowImage:s=e?Ir.Material.Image:"";break;case Ee.WhatsAppChat:s=e?Ir.Material.Chat:"";break;case Ee.CalendarEvents:e?.length>0&&(s=e.length.toString());break;case Ee.Studio:e&&e.toLowerCase()==="villa"?s="Villa":e&&e.toLowerCase()==="brand"?s="Brand":s="";break;case Ee.Workplace:e&&e.toLowerCase()==="backoffice"?s="Backoffice":e&&e.toLowerCase()==="reception"?s="Empfang":s="";break;case Ee.Text:s=Es.isNullOrUndefinedOrNAN(e)?"":e.toString();break;case Ee.Boolean:s=e?"Ja":"Nein";break;default:typeof e=="string"?s=e:i?.getValue?s=i.getValue():i&&i.data&&i.colDef.field?s=hA.getCellValue(i.data,i.colDef.field,i):s=e;break}return s}static getValueFormatter(){return e=>{let n,i,r="";e.node&&e.node.group&&!e.colDef.nxtFieldType?(n=e.node.rowGroupColumn.colDef.nxtFieldType,i=e.node.rowGroupColumn.colDef.nxtFieldTypeParams,r=e.node.rowGroupColumn.colDef.nxtIcon):(n=e.colDef.nxtFieldType,i=e.colDef.nxtFieldTypeParams,r=e.colDef.nxtIcon);let s=e.value,o;return o=t.formatValueByNxtFieldType(s,n,i,r),o}}}});var RWe,FWe=Q(()=>{zn();Qo();RWe=(()=>{let e=class e{static getExcelCellRenderer(i,r){let s;i.node&&i.node.group&&!i.column.getColDef().nxtFieldType?s=i.node.rowGroupColumn.getColDef().nxtFieldType:s=i.column.getColDef().nxtFieldType;let o=i.value,a;switch(s){case Ee.Date_germanDateWithToNowText:o===0?a="":a=Ie.format(o,e.FORMAT_DATETIME[r]);break;case Ee.Date_germanDate:a=Ie.format(o,e.FORMAT_DATE[r]);break;case Ee.Date_germanDateShort:a=Ie.format(o,e.FORMAT_DATE_SHORT[r]);break;case Ee.Date_germanDateTimeWithSeconds:a=Ie.format(o,e.FORMAT_DATETIME[r]);break;case Ee.Date_germanDateTime:a=Ie.format(o,e.FORMAT_DATETIME[r]);break;case Ee.Date_germanDateTimeFull:a=Ie.format(o,e.FORMAT_DATETIMEFULL[r]);break;case Ee.Date_germanTime:a=Ie.format(o,e.FORMAT_TIME[r]);break;default:a=o;break}return a}};e.FORMAT_DATE_SHORT={de:"dd.MM",en:"MM-dd"},e.FORMAT_DATE={de:"dd.MM.yyyy",en:"yyyy-MM-dd"},e.FORMAT_DATETIME={de:"dd.MM.yyyy HH:mm:ss",en:"yyyy-MM-ddTHH:mm:ss"},e.FORMAT_DATETIMEFULL={de:"dd.MM.yyyy HH:mm:ss",en:"yyyy-MM-ddTHH:mm:ss"},e.FORMAT_TIME={de:"HH:mm:ss",en:"HH:mm:ss"};let t=e;return t})()});var LWe,OWe=Q(()=>{Vt();me();Vt();LWe=(()=>{let e=class e{constructor(){this.icon="star"}agInit(i){this.value=i.value}refresh(i){return!1}getStars(i){let r="";for(let s=0;s<5;s++)i/2>=s+1?r+='<img src="/assets/images/grid-cell-renderer/star.svg"/>':i/2>=s+.5?r+='<img src="/assets/images/grid-cell-renderer/star_half.svg"/>':r+='<img src="/assets/images/grid-cell-renderer/star_border.svg"/>';return r}getHearts(i){let r="";for(let s=0;s<5;s++)i>=s+1?r+='<img src="/assets/images/grid-cell-renderer/heart.svg"/>':r+='<img src="/assets/images/grid-cell-renderer/heart_border.svg"/>';return r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-star-cell-renderer"]],standalone:!0,features:[xe],decls:2,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",2,"height","22px",3,"innerHTML"]],template:function(r,s){r&1&&ee(0,"div",0)(1,"div",0),r&2&&(b("innerHTML",s.getStars(s.value==null?null:s.value.value),Pi),g(),b("innerHTML",s.getHearts(s.value==null?null:s.value.like),Pi))},dependencies:[At,Yt,oi],styles:[".wrapper[_ngcontent-%COMP%]{height:22px}"]});let t=e;return t})()});function kqt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td"),ee(4,"div",3),p()()),t&2){let n=e.$implicit,i=w();g(2),Ke(" ",n.description," "),g(2),b("innerHTML",i.getStars(n.value),Pi)}}var NWe,VWe=Q(()=>{ri();Vt();me();Vt();NWe=(()=>{let e=class e{constructor(){}agInit(i){this.skills=i.value}refresh(i){return console.log(""),!1}getStars(i){let r="";for(let s=0;s<5;s++)i/2>=s+1?r+='<img src="/assets/images/grid-cell-renderer/star.svg"/>':i/2>=s+.5?r+='<img src="/assets/images/grid-cell-renderer/star_half.svg"/>':r+='<img src="/assets/images/grid-cell-renderer/star_border.svg"/>';return r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-star-cell-renderer"]],standalone:!0,features:[xe],decls:3,vars:1,consts:[["fxLayout","column"],[2,"margin-bottom","10px"],[4,"ngFor","ngForOf"],[3,"innerHTML"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"table",1),W(2,kqt,5,2,"tr",2),p()()),r&2&&(g(2),b("ngForOf",s.skills.skillValues))},dependencies:[At,Yt,Hi],styles:["table[_ngcontent-%COMP%]{margin-bottom:10px}.wrapper[_ngcontent-%COMP%]{height:22px}"]});let t=e;return t})()});var Iqt,BWe,zWe=Q(()=>{Vt();me();Vt();Iqt=(t,e)=>({width:t,backgroundColor:e}),BWe=(()=>{let e=class e{constructor(){this.color="#ccc"}agInit(i){this.percentage=i.value}refresh(i){return!1}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-star-cell-renderer"]],standalone:!0,features:[xe],decls:4,vars:5,consts:[["fxLayoutAlign","start center",1,"h-100"],["fxFlex","","fxLayout","row",2,"position","relative","height","18px"],[1,"bar"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),y(3,"\xA0"),p()()()),r&2&&(g(2),gj(bs(2,Iqt,s.percentage+"%",s.color)))},dependencies:[At,Yt,oi,qi],styles:[".bar[_ngcontent-%COMP%]{border-radius:3px;min-width:3px}"]});let t=e;return t})()});var AA,I4e=Q(()=>{AA=class t{static linkify(e,n="_self"){let i=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;return e.replace(i,r=>'<a class="a-link" target="'+n+'" href="'+r+'">'+r+"</a>")}static getTextRecursiveParent(e){return e.innerText?e.innerText:t.getTextRecursiveParent(e.parentElement)}}});var HWe,GWe=Q(()=>{me();HWe=(()=>{let e=class e{constructor(i){this.elementRef=i,this.observer=new ResizeObserver(()=>{this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.resize())}),this.observer.observe(i.nativeElement)}ngAfterViewInit(){this.resize()}onInput(){this.resize()}onChange(){this.resize()}ngOnInit(){this.elementRef.nativeElement.scrollHeight&&setTimeout(()=>this.resize())}resize(){this.elementRef.nativeElement.style.height="auto",this.elementRef.nativeElement.style.height!==this.elementRef.nativeElement.scrollHeight+"px"&&(this.elementRef.nativeElement.style.height="0",this.elementRef.nativeElement.style.height=this.elementRef.nativeElement.scrollHeight+"px")}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","nxtTextareaAutoSize",""]],hostBindings:function(r,s){r&1&&F("input",function(){return s.onInput()})("change",function(){return s.onChange()})},exportAs:["TextareaAutoSizeDirective"],standalone:!0});let t=e;return t})()});var tX,A4e=Q(()=>{me();od();z1();tX=(()=>{let e=class e{constructor(i,r){this.sanitizer=i,this.bodyPutService=r}transform(i,r){return r==="en"?this.bodyPutService.getEnPath(i):this.bodyPutService.getGermanPath(i)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16),R(Oc,16))},e.\u0275pipe=kr({name:"bodyPutText",type:e,pure:!0,standalone:!0});let t=e;return t})()});function Aqt(t,e){if(t&1&&(ee(0,"div",6),Ce(1,"safeHtml")),t&2){let n=w();b("innerHTML",tt(1,1,n.message),Pi)}}function Pqt(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-textarea",7),F("enter",function(){V(n);let r=w();return B(r.enterClicked())}),p()()}if(t&2){let n=w();g(),b("placeholder",n.placeholder)("nxtFormControl",n.inputFormControl)("rows",15)("cols",100)}}function Rqt(t,e){if(t&1){let n=re();h(0,"div",10),F("click",function(){V(n);let r=w(2);return B(r.addSkill())}),y(1),p()}if(t&2){let n=w(2);g(),Ke("Stil: ",n.skillsText," ")}}function Fqt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().index;g(),Ke("",n+1,".Motiv: ")}}function Lqt(t,e){t&1&&(h(0,"div"),y(1,"Motiv: "),p())}function Oqt(t,e){if(t&1){let n=re();h(0,"div",11),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.addBodyPutText(r))}),W(1,Fqt,2,1,"div",2)(2,Lqt,2,0,"div",2),h(3,"div"),y(4),p(),h(5,"div"),y(6),Ce(7,"bodyPutText"),p(),h(8,"div"),y(9),p()()}if(t&2){let n=e.$implicit,i=w(2);g(),b("ngIf",i.bodyPutsTattoo.length>1),g(),b("ngIf",i.bodyPutsTattoo.length===1),g(2),ye(n.motive),g(2),ye(Nt(7,5,n.bodyPut,"de")),g(3),ye(n.size)}}function Nqt(t,e){if(t&1&&(h(0,"div"),W(1,Rqt,2,1,"div",8)(2,Oqt,10,8,"div",9),p()),t&2){let n=w();g(),b("ngIf",n.skillsText),g(),b("ngForOf",n.bodyPutsTattoo)}}var WWe,UWe=Q(()=>{Ep();ji();A4e();ha();Zi();n1();ri();Vt();nc();me();ji();z1();yi();Vt();WWe=(()=>{let e=class e{constructor(i,r,s,o){this.dialogRef=i,this.bodyPutService=r,this.socketService=s,this.data=o,this.cols=50,this.charCounterText="",this.skillsText="",this.artistLang=""}setOptions(i){this.placeholder=i.placeholder,this.message=i.message,this.artistLang=i.artistLang||"de",this.buttonText=i.buttonText,this.bodyPutsTattoo=i.bodyPutsTattoo,this.skillsText=i.skills?.join(" & "),i.cols&&(this.cols=i.cols),this.inputFormControl=new $t(i.prompt?i.prompt:"",[ii.requiredAndNotNaN]),this.inputFormControl.valueChanges.subscribe(r=>{i.charCounterFn&&(this.charCounterText=i.charCounterFn(r))}),i.charCounterFn&&(this.charCounterText=i.charCounterFn(i.prompt))}close(){this.inputFormControl.invalid||this.dialogRef.close(this.inputFormControl.value)}okClicked(){this.inputFormControl.invalid||this.dialogRef.close(this.inputFormControl.value)}cancelClicked(){this.dialogRef.close()}enterClicked(){this.inputFormControl.setValue(this.inputFormControl.value+`
`)}addBodyPutText(i){return O(this,null,function*(){this.socketService.getArtists();let r=i.motive,o="Motive: "+(yield this.socketService.translate(i.motive,"en")).text+`
Body part: `+this.bodyPutService.getEnPath(i.bodyPut);i.size&&(o+=`
Size: `+i.size);let a="Motiv: "+r+`
K\xF6rperstelle: `+this.bodyPutService.getGermanPath(i.bodyPut);i.size&&(a+=`
Gr\xF6\xDFe: `+i.size);let l=o;this.artistLang==="de"&&(l=a),this.inputFormControl.setValue(this.inputFormControl.value.trimEnd(`
`)+`

`+l)})}addSkill(){this.inputFormControl.setValue(this.inputFormControl.value+`

Style: `+this.skillsText)}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Oc),R(lt),R(Ou))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dialog-send-message-to-artist"]],standalone:!0,features:[xe],decls:11,vars:4,consts:[["fxLayout","column"],["style","margin-bottom:24px; margin-top:10px;",3,"innerHTML",4,"ngIf"],[4,"ngIf"],[2,"padding-left","10px"],["fxLayout","row","fxLayoutAlign","space-around"],[3,"click"],[2,"margin-bottom","24px","margin-top","10px",3,"innerHTML"],[3,"enter","placeholder","nxtFormControl","rows","cols"],["class","text-120 p-2 m-2 mouse-pointer","style","border: 1px solid #808080; border-radius: 3px",3,"click",4,"ngIf"],["fxLayout","row","fxLayoutGap","10px","class","text-120 p-2 m-2 mouse-pointer","style","border: 1px solid #808080; border-radius: 3px",3,"click",4,"ngFor","ngForOf"],[1,"text-120","p-2","m-2","mouse-pointer",2,"border","1px solid #808080","border-radius","3px",3,"click"],["fxLayout","row","fxLayoutGap","10px",1,"text-120","p-2","m-2","mouse-pointer",2,"border","1px solid #808080","border-radius","3px",3,"click"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,Aqt,2,3,"div",1)(2,Pqt,2,4,"div",2),h(3,"div",3),y(4),p(),W(5,Nqt,3,2,"div",2),h(6,"div",4)(7,"nxt-button",5),F("click",function(){return s.cancelClicked()}),y(8,"ABBRECHEN"),p(),h(9,"nxt-button",5),F("click",function(){return s.okClicked()}),y(10,"OK"),p()()()),r&2&&(g(),b("ngIf",s.message),g(),b("ngIf",s.inputFormControl),g(2),ye(s.charCounterText),g(),b("ngIf",s.bodyPutsTattoo))},dependencies:[At,Yt,$r,oi,Ct,yu,Hi,Lt,Or,tX]});let t=e;return t})()});function Bqt(t,e){if(t&1){let n=re();h(0,"nxt-button",2),F("click",function(){V(n);let r=w();return B(r.sendClicked())}),y(1,"Senden"),p()}}var Vqt,iX,P4e=Q(()=>{C4();ri();Zi();Ah();me();w4();L1();ji();Vqt=()=>["name"];iX=(()=>{let e=class e{constructor(i,r,s){this.clipboardService=i,this.httpClient=r,this.dialogRef=s,this.DisplayWithTools=Qh,this.load()}load(){this.httpClient.get("https://artists.nxt-lvl.ink/image-drive/configs/artist-gallery.json").subscribe(i=>{this.artists=i.artists})}artistClicked(i){this.clipboardService.copyToClipboard("https://artists.nxt-lvl.ink/#/artists/"+i.name)}closeClicked(){this.dialogRef.close()}sendClicked(){this.dialogRef.close(this.currentArtist.name)}};e.\u0275fac=function(r){return new(r||e)(R(ep),R(Uc),R(Gt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artists-gallery-links"]],standalone:!0,features:[xe],decls:8,vars:7,consts:[[1,"flex","flex-col"],["placeholder","Artist ausw\xE4hlen","optionTrackBy","name",3,"valueChange","options","filterFields","value","displayWith","displayInOptionWith"],[3,"click"],[3,"click",4,"ngIf"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2,"Artist-Galerie Link verschicken"),p(),h(3,"nxt-autocomplete",1),Xe("valueChange",function(a){return Ze(s.currentArtist,a)||(s.currentArtist=a),a}),p(),h(4,"div")(5,"nxt-button",2),F("click",function(){return s.closeClicked()}),y(6,"Abbrechen"),p(),W(7,Bqt,2,0,"nxt-button",3),p()()),r&2&&(g(3),b("options",s.artists)("filterFields",bn(6,Vqt)),qe("value",s.currentArtist),b("displayWith",s.DisplayWithTools.displayWithName)("displayInOptionWith",s.DisplayWithTools.displayWithName),g(4),b("ngIf",s.currentArtist==null?null:s.currentArtist.name))},dependencies:[Ga,Lt,Ct],styles:["[_nghost-%COMP%]{height:100%}[_nghost-%COMP%]   .artists-container[_ngcontent-%COMP%]{overflow-y:scroll}[_nghost-%COMP%]   .artists-container[_ngcontent-%COMP%]   .artist-item[_ngcontent-%COMP%]{border:1px solid gray;border-radius:3px;margin:4px;padding:4px;font-size:20px}"]});let t=e;return t})()});var jWe,$We=Q(()=>{Cl();$n();me();me();jWe=(()=>{let e=class e{constructor(i){this.element=i,this.debounceTime=0,this.threshold=1,this.visible=new nt,this.subject$=new Mi}ngOnInit(){this.createObserver()}ngAfterViewInit(){this.startObservingElements()}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.observer=void 0),this.subject$.complete()}isVisible(i){return new Promise(r=>{let s=new IntersectionObserver(([o])=>{r(o.intersectionRatio===1),s.disconnect()});s.observe(i)})}createObserver(){let i={rootMargin:"0px",threshold:this.threshold},r=s=>s.isIntersecting||s.intersectionRatio>0;this.observer=new IntersectionObserver((s,o)=>{s.forEach(a=>{r(a)&&this.subject$.next({entry:a,observer:o})})},i)}startObservingElements(){this.observer&&(this.observer.observe(this.element.nativeElement),this.subject$.pipe(E9(this.debounceTime),Ks(Boolean)).subscribe(s=>O(this,[s],function*({entry:i,observer:r}){let o=i.target;(yield this.isVisible(o))&&(this.visible.emit(o),r.unobserve(o))})))}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","nxtObserveVisibility",""]],inputs:{debounceTime:"debounceTime",threshold:"threshold"},outputs:{visible:"visible"},standalone:!0});let t=e;return t})()});function zqt(t,e,n,i){let r=window&&!!window.document&&window.document.documentElement,s=r&&e?window:n;if(t&&(s=t&&r&&typeof t=="string"?Hqt(t,n.nativeElement,i):t,!s))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return s}function Hqt(t,e,n){return(n?window.document:e).querySelector(t)}function R4e(t){return t&&!t.firstChange}function Gqt(){return typeof window<"u"}function jqt(t,e,n){return!!(t&&e||!n&&e)}function $qt({windowElement:t,axis:e}){return Kqt({axis:e,isWindow:Yqt(t)},t)}function Kqt(t,e){let n=t.isWindow||e&&!e.nativeElement?e:e.nativeElement;return St(ve({},t),{container:n})}function Yqt(t){return["Window","global"].some(n=>Object.prototype.toString.call(t).includes(n))}function N4e(t,e){return t?e.document.documentElement:null}function KWe(t,e){let n=Xqt(e);return e.isWindow?qqt(n,t,e):Zqt(n,t,e)}function qqt(t,e,n){let{axis:i,container:r,isWindow:s}=n,{offsetHeightKey:o,clientHeightKey:a}=YWe(i),l=t+ZWe(N4e(s,r),i,s),c=qWe(e.nativeElement,s,o,a),d=Qqt(e.nativeElement,i,s)+c;return{height:t,scrolled:l,totalToScroll:d,isWindow:s}}function Zqt(t,e,n){let{axis:i,container:r}=n,s=r[i.scrollTopKey()],o=r[i.scrollHeightKey()];return{height:t,scrolled:s,totalToScroll:o,isWindow:!1}}function YWe(t){return{offsetHeightKey:t.offsetHeightKey(),clientHeightKey:t.clientHeightKey()}}function Xqt({container:t,isWindow:e,axis:n}){let{offsetHeightKey:i,clientHeightKey:r}=YWe(n);return qWe(t,e,i,r)}function qWe(t,e,n,i){if(isNaN(t[n])){let r=N4e(e,t);return r?r[i]:0}else return t[n]}function Qqt(t,e,n){let i=e.topKey();if(t.getBoundingClientRect)return t.getBoundingClientRect()[i]+ZWe(t,e,n)}function ZWe(t,e,n){let i=e.pageYOffsetKey(),r=e.scrollTopKey(),s=e.offsetTopKey();return isNaN(window.pageYOffset)?N4e(n,t)[r]:t.ownerDocument?t.ownerDocument.defaultView[i]:t[s]}function Jqt(t,e={down:0,up:0},n){let i,r;if(t.totalToScroll<=0)return!1;let s=t.isWindow?t.scrolled:t.height+t.scrolled;if(n)i=(t.totalToScroll-s)/t.totalToScroll,r=(e?.down?e.down:0)/10;else{let a=t.scrolled+(t.totalToScroll-s);i=t.scrolled/a,r=(e?.up?e.up:0)/10}return i<=r}function eZt(t,e){return t<e.scrolled}function tZt(t,e,n){let i=eZt(t,e);return{fire:Jqt(e,n,i),scrollDown:i}}function iZt(t){let{scrollContainer:e,scrollWindow:n,element:i,fromRoot:r}=t,s=$qt({axis:new F4e(!t.horizontal),windowElement:zqt(e,n,i,r)}),o=new L4e({totalToScroll:KWe(i,s).totalToScroll}),a={container:s.container,throttle:t.throttle},l={up:t.upDistance,down:t.downDistance};return nZt(a).pipe(Zf(()=>Fr(KWe(i,s))),lr(c=>rZt(o.lastScrollPosition,c,l)),ac(({stats:c})=>o.updateScroll(c.scrolled,c.totalToScroll)),Ks(({fire:c,scrollDown:d,stats:{totalToScroll:u}})=>jqt(t.alwaysCallback,c,o.isTriggeredScroll(u,d))),ac(({scrollDown:c,stats:{totalToScroll:d}})=>{o.updateTriggeredFlag(d,c)}),lr(sZt))}function nZt(t){let e=bh(t.container,"scroll");return t.throttle&&(e=e.pipe(RTe(t.throttle,void 0,{leading:!0,trailing:!0}))),e}function rZt(t,e,n){let{scrollDown:i,fire:r}=tZt(t,e,n);return{scrollDown:i,fire:r,stats:e}}function sZt(t){let{scrollDown:e,stats:{scrolled:n}}=t;return{type:e?O4e.DOWN:O4e.UP,payload:{currentScrollPosition:n}}}function oZt(t){return t.observed??t.observers.length>0}var Wqt,Uqt,F4e,L4e,O4e,XWe,QWe,V4e=Q(()=>{me();me();$n();Cl();Wqt={clientHeight:"clientHeight",offsetHeight:"offsetHeight",scrollHeight:"scrollHeight",pageYOffset:"pageYOffset",offsetTop:"offsetTop",scrollTop:"scrollTop",top:"top"},Uqt={clientHeight:"clientWidth",offsetHeight:"offsetWidth",scrollHeight:"scrollWidth",pageYOffset:"pageXOffset",offsetTop:"offsetLeft",scrollTop:"scrollLeft",top:"left"},F4e=class{constructor(e=!0){this.vertical=e,this.propsMap=e?Wqt:Uqt}clientHeightKey(){return this.propsMap.clientHeight}offsetHeightKey(){return this.propsMap.offsetHeight}scrollHeightKey(){return this.propsMap.scrollHeight}pageYOffsetKey(){return this.propsMap.pageYOffset}offsetTopKey(){return this.propsMap.offsetTop}scrollTopKey(){return this.propsMap.scrollTop}topKey(){return this.propsMap.top}};L4e=class{constructor(e){this.lastScrollPosition=0,this.lastTotalToScroll=0,this.totalToScroll=0,this.triggered={down:0,up:0},Object.assign(this,e)}updateScrollPosition(e){return this.lastScrollPosition=e}updateTotalToScroll(e){this.lastTotalToScroll!==e&&(this.lastTotalToScroll=this.totalToScroll,this.totalToScroll=e)}updateScroll(e,n){this.updateScrollPosition(e),this.updateTotalToScroll(n)}updateTriggeredFlag(e,n){n?this.triggered.down=e:this.triggered.up=e}isTriggeredScroll(e,n){return n?this.triggered.down===e:this.triggered.up===e}};O4e={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};XWe=(()=>{let e=class e{constructor(i,r){this.element=i,this.zone=r,this.scrolled=new nt,this.scrolledUp=new nt,this.infiniteScrollDistance=2,this.infiniteScrollUpDistance=1.5,this.infiniteScrollThrottle=150,this.infiniteScrollDisabled=!1,this.infiniteScrollContainer=null,this.scrollWindow=!0,this.immediateCheck=!1,this.horizontal=!1,this.alwaysCallback=!1,this.fromRoot=!1}ngAfterViewInit(){this.infiniteScrollDisabled||this.setup()}ngOnChanges({infiniteScrollContainer:i,infiniteScrollDisabled:r,infiniteScrollDistance:s}){let o=R4e(i),a=R4e(r),l=R4e(s),c=!a&&!this.infiniteScrollDisabled||a&&!r.currentValue||l;(o||a||l)&&(this.destroyScroller(),c&&this.setup())}ngOnDestroy(){this.destroyScroller()}setup(){Gqt()&&this.zone.runOutsideAngular(()=>{this.disposeScroller=iZt({fromRoot:this.fromRoot,alwaysCallback:this.alwaysCallback,disable:this.infiniteScrollDisabled,downDistance:this.infiniteScrollDistance,element:this.element,horizontal:this.horizontal,scrollContainer:this.infiniteScrollContainer,scrollWindow:this.scrollWindow,throttle:this.infiniteScrollThrottle,upDistance:this.infiniteScrollUpDistance}).subscribe(i=>this.handleOnScroll(i))})}handleOnScroll({type:i,payload:r}){let s=i===O4e.DOWN?this.scrolled:this.scrolledUp;oZt(s)&&this.zone.run(()=>s.emit(r))}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(pn))},e.\u0275dir=mi({type:e,selectors:[["","infiniteScroll",""],["","infinite-scroll",""],["","data-infinite-scroll",""]],inputs:{infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollUpDistance:"infiniteScrollUpDistance",infiniteScrollThrottle:"infiniteScrollThrottle",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollContainer:"infiniteScrollContainer",scrollWindow:"scrollWindow",immediateCheck:"immediateCheck",horizontal:"horizontal",alwaysCallback:"alwaysCallback",fromRoot:"fromRoot"},outputs:{scrolled:"scrolled",scrolledUp:"scrolledUp"},standalone:!0,features:[yn]});let t=e;return t})();QWe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({});let t=e;return t})()});function uZt(t,e){t&1&&($p(),h(0,"svg",2),ee(1,"polygon",3),p())}function pZt(t,e){if(t&1){let n=re();h(0,"div",0),F("keydown",function(r){V(n);let s=w();return B(s._handleKeydown(r))})("click",function(){V(n);let r=w();return B(r.closed.emit("click"))})("@transformMenu.start",function(r){V(n);let s=w();return B(s._onAnimationStart(r))})("@transformMenu.done",function(r){V(n);let s=w();return B(s._onAnimationDone(r))}),h(1,"div",1),Ln(2),p()()}if(t&2){let n=w();jr(n._classList),b("id",n.panelId)("@transformMenu",n._panelAnimationState),Bn("aria-label",n.ariaLabel||null)("aria-labelledby",n.ariaLabelledby||null)("aria-describedby",n.ariaDescribedby||null)}}function vZt(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}function yZt(t){return()=>t.scrollStrategies.reposition()}var lZt,cZt,dZt,hZt,B4e,_g,mZt,nX,RDn,FDn,fZt,gZt,d3,eUe,_Zt,JWe,Zy,tUe,fx=Q(()=>{me();me();Xh();Xh();Zg();$n();Cl();ri();bl();bv();ng();Th();Qf();Qf();Wc();R1();lZt=["mat-menu-item",""],cZt=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],dZt=["mat-icon, [matMenuItemIcon]","*"];hZt=["*"];B4e=new Ri("MAT_MENU_PANEL"),_g=(()=>{let e=class e{constructor(i,r,s,o,a){this._elementRef=i,this._document=r,this._focusMonitor=s,this._parentMenu=o,this._changeDetectorRef=a,this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new Mi,this._focused=new Mi,this._highlighted=!1,this._triggersSubmenu=!1,o?.addItem?.(this)}focus(i,r){this._focusMonitor&&i?this._focusMonitor.focusVia(this._getHostElement(),i,r):this._getHostElement().focus(r),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(i){this.disabled&&(i.preventDefault(),i.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let i=this._elementRef.nativeElement.cloneNode(!0),r=i.querySelectorAll("mat-icon, .material-icons");for(let s=0;s<r.length;s++)r[s].remove();return i.textContent?.trim()||""}_setHighlighted(i){this._highlighted=i,this._changeDetectorRef?.markForCheck()}_setTriggersSubmenu(i){this._triggersSubmenu=i,this._changeDetectorRef?.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Lr),R(qp),R(B4e,8),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-mdc-focus-indicator"],hostVars:8,hostBindings:function(r,s){r&1&&F("click",function(a){return s._checkDisabled(a)})("mouseenter",function(){return s._handleMouseEnter()}),r&2&&(Bn("role",s.role)("tabindex",s._getTabIndex())("aria-disabled",s.disabled)("disabled",s.disabled||null),ki("mat-mdc-menu-item-highlighted",s._highlighted)("mat-mdc-menu-item-submenu-trigger",s._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",mn],disableRipple:[2,"disableRipple","disableRipple",mn]},exportAs:["matMenuItem"],standalone:!0,features:[Bs,xe],attrs:lZt,ngContentSelectors:dZt,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(r,s){r&1&&(gr(cZt),Ln(0),h(1,"span",0),Ln(2,1),p(),ee(3,"div",1),W(4,uZt,2,0,":svg:svg",2)),r&2&&(g(3),b("matRippleDisabled",s.disableRipple||s.disabled)("matRippleTrigger",s._getHostElement()),g(),Je(s._triggersSubmenu?4:-1))},dependencies:[ym],encapsulation:2,changeDetection:0});let t=e;return t})(),mZt=new Ri("MatMenuContent"),nX={transformMenu:Nd("transformMenu",[bc("void",So({opacity:0,transform:"scale(0.8)"})),cl("void => enter",Ml("120ms cubic-bezier(0, 0, 0.2, 1)",So({opacity:1,transform:"scale(1)"}))),cl("* => void",Ml("100ms 25ms linear",So({opacity:0})))]),fadeInItems:Nd("fadeInItems",[bc("showing",So({opacity:1})),cl("void => *",[So({opacity:0}),Ml("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},RDn=nX.fadeInItems,FDn=nX.transformMenu,fZt=0,gZt=new Ri("mat-menu-default-options",{providedIn:"root",factory:vZt});d3=(()=>{let e=class e{get xPosition(){return this._xPosition}set xPosition(i){this._xPosition=i,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(i){this._yPosition=i,this.setPositionClasses()}set panelClass(i){let r=this._previousPanelClass,s=ve({},this._classList);r&&r.length&&r.split(" ").forEach(o=>{s[o]=!1}),this._previousPanelClass=i,i&&i.length&&(i.split(" ").forEach(o=>{s[o]=!0}),this._elementRef.nativeElement.className=""),this._classList=s}get classList(){return this.panelClass}set classList(i){this.panelClass=i}constructor(i,r,s,o){this._elementRef=i,this._changeDetectorRef=o,this._elevationPrefix="mat-elevation-z",this._baseElevation=null,this._directDescendantItems=new o4,this._classList={},this._panelAnimationState="void",this._animationDone=new Mi,this.closed=new nt,this.close=this.closed,this.panelId=`mat-menu-panel-${fZt++}`,this._injector=Ve($o),this.overlayPanelClass=s.overlayPanelClass||"",this._xPosition=s.xPosition,this._yPosition=s.yPosition,this.backdropClass=s.backdropClass,this.overlapTrigger=s.overlapTrigger,this.hasBackdrop=s.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Ib(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(ll(this._directDescendantItems),Fl(i=>ra(...i.map(r=>r._focused)))).subscribe(i=>this._keyManager.updateActiveItem(i)),this._directDescendantItems.changes.subscribe(i=>{let r=this._keyManager;if(this._panelAnimationState==="enter"&&r.activeItem?._hasFocus()){let s=i.toArray(),o=Math.max(0,Math.min(s.length-1,r.activeItemIndex||0));s[o]&&!s[o].disabled?r.setActiveItem(o):r.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy()}_hovered(){return this._directDescendantItems.changes.pipe(ll(this._directDescendantItems),Fl(r=>ra(...r.map(s=>s._hovered))))}addItem(i){}removeItem(i){}_handleKeydown(i){let r=i.keyCode,s=this._keyManager;switch(r){case 27:Pc(i)||(i.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(r===38||r===40)&&s.setFocusOrigin("keyboard"),s.onKeydown(i);return}i.stopPropagation()}focusFirstItem(i="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=wh(()=>{let r=null;if(this._directDescendantItems.length&&(r=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!r||!r.contains(document.activeElement)){let s=this._keyManager;s.setFocusOrigin(i).setFirstItemActive(),!s.activeItem&&r&&r.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(i){if(this._baseElevation===null){let l=(typeof getComputedStyle=="function"?getComputedStyle(this._elementRef.nativeElement):null)?.getPropertyValue("--mat-menu-base-elevation-level")||"8";this._baseElevation=parseInt(l)}let r=Math.min(this._baseElevation+i,24),s=`${this._elevationPrefix}${r}`,o=Object.keys(this._classList).find(a=>a.startsWith(this._elevationPrefix));if(!o||o===this._previousElevation){let a=ve({},this._classList);this._previousElevation&&(a[this._previousElevation]=!1),a[s]=!0,this._previousElevation=s,this._classList=a}}setPositionClasses(i=this.xPosition,r=this.yPosition){this._classList=St(ve({},this._classList),{"mat-menu-before":i==="before","mat-menu-after":i==="after","mat-menu-above":r==="above","mat-menu-below":r==="below"}),this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(i){this._animationDone.next(i),this._isAnimating=!1}_onAnimationStart(i){this._isAnimating=!0,i.toState==="enter"&&this._keyManager.activeItemIndex===0&&(i.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(ll(this._allItems)).subscribe(i=>{this._directDescendantItems.reset(i.filter(r=>r._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(pn),R(gZt),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["mat-menu"]],contentQueries:function(r,s,o){if(r&1&&(_o(o,mZt,5),_o(o,_g,5),_o(o,_g,4)),r&2){let a;Pt(a=Rt())&&(s.lazyContent=a.first),Pt(a=Rt())&&(s._allItems=a),Pt(a=Rt())&&(s.items=a)}},viewQuery:function(r,s){if(r&1&&ei(Ma,5),r&2){let o;Pt(o=Rt())&&(s.templateRef=o.first)}},hostVars:3,hostBindings:function(r,s){r&2&&Bn("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",mn],hasBackdrop:[2,"hasBackdrop","hasBackdrop",i=>i==null?null:mn(i)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[as([{provide:B4e,useExisting:e}]),Bs,xe],ngContentSelectors:hZt,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id"],[1,"mat-mdc-menu-content"]],template:function(r,s){r&1&&(gr(),W(0,pZt,3,7,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-app-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-app-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-app-surface-container));will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-app-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing);margin-top:var(--mat-menu-divider-top-spacing)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mat-menu-item-leading-spacing);padding-right:var(--mat-menu-item-trailing-spacing);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}[dir=rtl] .mat-mdc-menu-item{padding-right:var(--mat-menu-item-leading-spacing);padding-left:var(--mat-menu-item-trailing-spacing)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing);padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-right:var(--mat-menu-item-with-icon-leading-spacing);padding-left:var(--mat-menu-item-with-icon-trailing-spacing)}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-app-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing);height:var(--mat-menu-item-icon-size);width:var(--mat-menu-item-icon-size)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color)}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color)}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[nX.transformMenu,nX.fadeInItems]},changeDetection:0});let t=e;return t})(),eUe=new Ri("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.reposition()}});_Zt={provide:eUe,deps:[xl],useFactory:yZt},JWe=Sh({passive:!0}),Zy=(()=>{let e=class e{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(i){this.menu=i}get menu(){return this._menu}set menu(i){i!==this._menu&&(this._menu=i,this._menuCloseSubscription.unsubscribe(),i&&(this._parentMaterialMenu,this._menuCloseSubscription=i.close.subscribe(r=>{this._destroyMenu(r),(r==="click"||r==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(r)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(i,r,s,o,a,l,c,d,u){this._overlay=i,this._element=r,this._viewContainerRef=s,this._menuItemInstance=l,this._dir=c,this._focusMonitor=d,this._ngZone=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=na.EMPTY,this._hoverSubscription=na.EMPTY,this._menuCloseSubscription=na.EMPTY,this._changeDetectorRef=Ve(Kt),this._handleTouchStart=m=>{U9(m)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new nt,this.onMenuOpen=this.menuOpened,this.menuClosed=new nt,this.onMenuClose=this.menuClosed,this._scrollStrategy=o,this._parentMaterialMenu=a instanceof d3?a:void 0,r.nativeElement.addEventListener("touchstart",this._handleTouchStart,JWe)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,JWe),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let i=this.menu;if(this._menuOpen||!i)return;let r=this._createOverlay(i),s=r.getConfig(),o=s.positionStrategy;this._setPosition(i,o),s.hasBackdrop=i.hasBackdrop==null?!this.triggersSubmenu():i.hasBackdrop,r.attach(this._getPortal(i)),i.lazyContent&&i.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(i),i instanceof d3&&(i._startAnimation(),i._directDescendantItems.changes.pipe(Mr(i.close)).subscribe(()=>{o.withLockedPosition(!1).reapplyLastPosition(),o.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(i,r){this._focusMonitor&&i?this._focusMonitor.focusVia(this._element,i,r):this._element.nativeElement.focus(r)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(i){if(!this._overlayRef||!this.menuOpen)return;let r=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&(i==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,r instanceof d3?(r._resetAnimation(),r.lazyContent?r._animationDone.pipe(Ks(s=>s.toState==="void"),ic(1),Mr(r.lazyContent._attached)).subscribe({next:()=>r.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),r?.lazyContent?.detach())}_initMenu(i){i.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,i.direction=this.dir,this._setMenuElevation(i),i.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(i){if(i.setElevation){let r=0,s=i.parentMenu;for(;s;)r++,s=s.parentMenu;i.setElevation(r)}}_setIsMenuOpen(i){i!==this._menuOpen&&(this._menuOpen=i,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(i),this._changeDetectorRef.markForCheck())}_createOverlay(i){if(!this._overlayRef){let r=this._getOverlayConfig(i);this._subscribeToPositions(i,r.positionStrategy),this._overlayRef=this._overlay.create(r),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(i){return new Xg({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:i.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:i.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(i,r){i.setPositionClasses&&r.positionChanges.subscribe(s=>{let o=s.connectionPair.overlayX==="start"?"after":"before",a=s.connectionPair.overlayY==="top"?"below":"above";this._ngZone?this._ngZone.run(()=>i.setPositionClasses(o,a)):i.setPositionClasses(o,a)})}_setPosition(i,r){let[s,o]=i.xPosition==="before"?["end","start"]:["start","end"],[a,l]=i.yPosition==="above"?["bottom","top"]:["top","bottom"],[c,d]=[a,l],[u,m]=[s,o],f=0;if(this.triggersSubmenu()){if(m=s=i.xPosition==="before"?"start":"end",o=u=s==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let _=this._parentMaterialMenu.items.first;this._parentInnerPadding=_?_._getHostElement().offsetTop:0}f=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else i.overlapTrigger||(c=a==="top"?"bottom":"top",d=l==="top"?"bottom":"top");r.withPositions([{originX:s,originY:c,overlayX:u,overlayY:a,offsetY:f},{originX:o,originY:c,overlayX:m,overlayY:a,offsetY:f},{originX:s,originY:d,overlayX:u,overlayY:l,offsetY:-f},{originX:o,originY:d,overlayX:m,overlayY:l,offsetY:-f}])}_menuClosingActions(){let i=this._overlayRef.backdropClick(),r=this._overlayRef.detachments(),s=this._parentMaterialMenu?this._parentMaterialMenu.closed:Fr(),o=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Ks(a=>a!==this._menuItemInstance),Ks(()=>this._menuOpen)):Fr();return ra(i,s,o,r)}_handleMousedown(i){W9(i)||(this._openedBy=i.button===0?"mouse":void 0,this.triggersSubmenu()&&i.preventDefault())}_handleKeydown(i){let r=i.keyCode;(r===13||r===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(r===39&&this.dir==="ltr"||r===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(i){this.triggersSubmenu()?(i.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Ks(i=>i===this._menuItemInstance&&!i.disabled),E9(0,_O)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof d3&&this.menu._isAnimating?this.menu._animationDone.pipe(ic(1),E9(0,_O),Mr(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(i){return(!this._portal||this._portal.templateRef!==i.templateRef)&&(this._portal=new of(i.templateRef,this._viewContainerRef)),this._portal}};e.\u0275fac=function(r){return new(r||e)(R(xl),R(fi),R(Na),R(eUe),R(B4e,8),R(_g,10),R(Va,8),R(qp),R(pn))},e.\u0275dir=mi({type:e,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(r,s){r&1&&F("click",function(a){return s._handleClick(a)})("mousedown",function(a){return s._handleMousedown(a)})("keydown",function(a){return s._handleKeydown(a)}),r&2&&Bn("aria-haspopup",s.menu?"menu":null)("aria-expanded",s.menuOpen)("aria-controls",s.menuOpen?s.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0});let t=e;return t})(),tUe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[_Zt],imports:[sd,D0,zr,T0,Q2,zr]});let t=e;return t})()});var CZt,xZt,bZt,rX,sX=Q(()=>{Gi();fx();Vt();me();CZt=["menuTriggerWrapper"],xZt=["menuTrigger"],bZt=["*"],rX=(()=>{let e=class e extends bt{constructor(){super()}clickedOut(){this.artistGetMenuTrigger.closeMenu()}ngOnInit(){}nxtOnDestroy(){}show(i){i.stopPropagation(),i.preventDefault(),this.artistGetMenuTriggerWrapper.nativeElement.style.left=i.x+"px",this.artistGetMenuTriggerWrapper.nativeElement.style.top=i.y+"px",this.artistGetMenuTrigger.closeMenu(),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.artistGetMenuTrigger.openMenu(),requestAnimationFrame(()=>{this.artistGetMenuTriggerWrapper.nativeElement.style.left="0px",this.artistGetMenuTriggerWrapper.nativeElement.style.top="0px"})})})})},100)}stopPropagation(i){i.stopPropagation(),i.preventDefault()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-context-menu"]],viewQuery:function(r,s){if(r&1&&(ei(CZt,5),ei(xZt,5)),r&2){let o;Pt(o=Rt())&&(s.artistGetMenuTriggerWrapper=o.first),Pt(o=Rt())&&(s.artistGetMenuTrigger=o.first)}},hostBindings:function(r,s){r&1&&F("click",function(){return s.clickedOut()},!1,k9)},standalone:!0,features:[et,xe],ngContentSelectors:bZt,decls:7,vars:2,consts:[["menuTriggerWrapper",""],["menuTrigger","matMenuTrigger"],["menu",""],[1,"menuTriggerWrapper",3,"contextmenu"],[3,"matMenuTriggerFor"],[3,"hasBackdrop"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"div",3,0),F("contextmenu",function(l){return V(o),B(s.stopPropagation(l))}),ee(2,"div",4,1),p(),h(4,"mat-menu",5,2),Ln(6),p()}if(r&2){let o=pr(5);g(2),b("matMenuTriggerFor",o),g(2),b("hasBackdrop",!1)}},dependencies:[Zy,d3,At],styles:[".menuTriggerWrapper[_ngcontent-%COMP%]{position:fixed;height:1px;width:1px;top:0;left:0}"]});let t=e;return t})()});var iUe,oX=Q(()=>{jo();me();od();iUe=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i,r=!0){return Qt.format2(i,{withoutSeconds:r,futurePrefix:"",pastPrefix:""})}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"duration2",type:e,pure:!0,standalone:!0});let t=e;return t})()});var nUe,rUe=Q(()=>{me();yi();Ci();nUe=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.dialogService=r,this.imageCache=[]}getImage(i){return O(this,null,function*(){return this.socketService.getWhatsAppImage(i)})}clearCache(){this.imageCache=[]}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function DZt(t,e){t&1&&(h(0,"div",13),y(1,"Nachlass: ? (F8)"),p())}function EZt(t,e){if(t&1&&(h(0,"div",13),y(1),p()),t&2){let n=w();g(),Ke("Nachlass: ",n.realPercentage,"% (F8)")}}var SZt,TZt,aX,z4e=Q(()=>{Gi();Jr();kl();gu();Zi();n1();s3();oo();ri();ls();me();ji();gu();SZt=["priceInput"],TZt=["originalPreisInput"];aX=(()=>{let e=class e extends bt{set priceInput(i){i&&requestAnimationFrame(()=>{i.click()})}constructor(i,r){super(),this.dialogRef=i,this.shortcutService=r,this.aboutPrice=!1,this.price=0,this.text="",this.texte=[`Da w\xFCrden wir bei einem Normalpreis von {{originalPrice}} landen. Ich w\xFCrde dir heute aber einen Angebots-Preis von {{price}} \u{1F3F7}\uFE0F anbieten.

Passt das? \u{1F60A}`,`In der Regel kostet das \u{1F4B0}{{originalPrice}}, aber ich kann es dir heute f\xFCr \u{1F389}{{price}} als Sonderangebot \xFCberlassen.

Ist das in Ordnung f\xFCr dich? \u{1F642}`,`Der Standardpreis liegt normalerweise bei {{originalPrice}}, aber ich kann dir ein spezielles Angebot von {{price}} unterbreiten.

Wie klingt das f\xFCr dich? \u{1F60A}`,`Normalerweise kostet es {{originalPrice}}, aber f\xFCr dich habe ich heute ein Sonderangebot: nur {{price}}.

Ist das f\xFCr dich in Ordnung? \u{1F60A}`,`Unser \xFCblicher Verkaufspreis w\xE4re {{originalPrice}}. Heute m\xF6chte ich dir jedoch einen Vorzugspreis von \u{1F525}{{price}} anbieten.

Ist das cool?`,`Die regul\xE4re Preisgestaltung sieht {{originalPrice}} vor, aber ich bin bereit, dir heute einen exklusiven Preisnachlass zu gew\xE4hren \u{1F60A}, und dir nur \u{1F4B0} {{price}} berechnen.

Passt das?`,`Der regul\xE4re Preis betr\xE4gt {{originalPrice}}. Allerdings kann ich dir heute ein Sonderangebot von {{price}}\u{1F389} anbieten.

Wie klingt das f\xFCr dich?`],this.percentageOptions=[{text:"auto",value:"auto"},{text:"28%",value:25},{text:"20%",value:20},{text:"15%",value:15},{text:"10%",value:10}],this.percentage="auto",this.realPercentage=0,this.pushSubscription=this.shortcutService.onKeyPressExclusive.subscribe([Pn.F7,Pn.F8],s=>{if(s===Pn.F8){let o=this.percentageOptions.findIndex(a=>a.value===this.percentage);this.percentageOptions.length>o+1?this.percentage=this.percentageOptions[o+1].value:this.percentage=this.percentageOptions[0].value,this.percentageChanged()}s===Pn.F7&&(this.aboutPrice=!this.aboutPrice,this.generateText())})}ngAfterViewInit(){}ngOnInit(){}nxtOnDestroy(){}priceChanged(){this.calcOriginalPrice()}originalPriceChanged(){this.calcRealPercentage(),this.generateText()}closeClicked(){this.dialogRef.close()}okClicked(){this.dialogRef.close(this.text)}calcOriginalPrice(){let i=this.originalPrice;this.price&&(this.percentage==="auto"?(i=this.getOriginalPriceDiff(this.price)+this.price,i-=i%10):typeof this.percentage=="number"&&(i=this.price/(1-this.percentage/100))),i!==this.originalPrice&&(this.originalPrice=i),this.calcRealPercentage(),this.generateText()}getOriginalPriceDiff(i){return i<20?5:i<30?10:i<60?20:i<100?30:i<200?40:i<400?50:i<600?90:i<700?100:i<800?130:i<1e3?180:i<1500?250:i*.2}priceOnEnter(){this.generateText(),this.originalPreisInput.click()}originalPriceOnEnter(){this.generateText(),this.okClicked()}generateText(){if(this.originalPrice&&this.price){let i=this.originalPrice.toMoneyString("\u20AC",!1),r=this.price.toMoneyString("\u20AC",!1);this.aboutPrice&&(i="ca. "+i,r="ca. "+r),this.text=fn.getRandomFromArray(this.texte).replaceAll("{{originalPrice}}",i).replaceAll("{{price}}",r)}}percentageChanged(){this.calcOriginalPrice(),requestAnimationFrame(()=>{this.originalPreisInput.click(),this.originalPreisInput.select()})}roundUpClicked(){this.originalPrice=this.originalPrice+(10-this.originalPrice%10),this.calcRealPercentage(),requestAnimationFrame(()=>{this.originalPreisInput.select()})}roundDownClicked(){this.originalPrice%10===0?this.originalPrice-=10:this.originalPrice=this.originalPrice-this.originalPrice%10,this.originalPrice<0&&(this.originalPrice=0),this.calcRealPercentage(),requestAnimationFrame(()=>{this.originalPreisInput.select()})}calcRealPercentage(){this.price>0?this.realPercentage=Math.round(100-this.price/this.originalPrice*100):this.realPercentage=-1}aboutPriceChanged(){this.generateText()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(fu))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-price-dialog"]],viewQuery:function(r,s){if(r&1&&(ei(SZt,5),ei(TZt,5)),r&2){let o;Pt(o=Rt())&&(s.priceInput=o.first),Pt(o=Rt())&&(s.originalPreisInput=o.first)}},standalone:!0,features:[et,xe],decls:25,vars:14,consts:[["originalPreisInput",""],["priceInput",""],[1,"flex","flex-row"],["placeholder","Original-Preis",3,"valueChange","up","down","enter","isMoney","selectOnFocus","value"],[1,"flex","flex-column"],[3,"click"],["placeholder","Preis",3,"valueChange","enter","isMoney","selectOnFocus","selectOnInit","value"],["class","text-center",4,"ngIf"],[1,"flex","flex-col","items-center"],[1,"pb-2","d-flex",3,"valueChange","value"],["valueKey","value",3,"valueChange","options","value"],[1,"flex","w-96",3,"valueChange","rows","value"],[1,"flex","row","justify-around"],[1,"text-center"]],template:function(r,s){if(r&1){let o=re();h(0,"div")(1,"div"),y(2,"Preistext"),p(),h(3,"div",2)(4,"nxt-input",3,0),Xe("valueChange",function(l){return V(o),Ze(s.originalPrice,l)||(s.originalPrice=l),B(l)}),F("up",function(){return V(o),B(s.roundUpClicked())})("down",function(){return V(o),B(s.roundDownClicked())})("enter",function(){return V(o),B(s.originalPriceOnEnter())})("valueChange",function(){return V(o),B(s.originalPriceChanged())}),p(),h(6,"div",4)(7,"nxt-button-icon",5),F("click",function(){return V(o),B(s.roundUpClicked())}),y(8,"arrow_upward"),p(),h(9,"nxt-button-icon",5),F("click",function(){return V(o),B(s.roundDownClicked())}),y(10,"arrow_downward"),p()()(),h(11,"nxt-input",6,1),Xe("valueChange",function(l){return V(o),Ze(s.price,l)||(s.price=l),B(l)}),F("enter",function(){return V(o),B(s.priceOnEnter())})("valueChange",function(){return V(o),B(s.priceChanged())}),p(),W(13,DZt,2,0,"div",7)(14,EZt,2,1,"div",7),h(15,"div",8)(16,"nxt-slide-toggle",9),Xe("valueChange",function(l){return V(o),Ze(s.aboutPrice,l)||(s.aboutPrice=l),B(l)}),F("valueChange",function(){return V(o),B(s.aboutPriceChanged())}),y(17,"Ca. Preis (F7)"),p(),h(18,"nxt-radio",10),Xe("valueChange",function(l){return V(o),Ze(s.percentage,l)||(s.percentage=l),B(l)}),F("valueChange",function(){return V(o),B(s.percentageChanged())}),p(),h(19,"nxt-textarea",11),Xe("valueChange",function(l){return V(o),Ze(s.text,l)||(s.text=l),B(l)}),p()(),h(20,"div",12)(21,"nxt-button",5),F("click",function(){return V(o),B(s.okClicked())}),y(22,"OK"),p(),h(23,"nxt-button",5),F("click",function(){return V(o),B(s.closeClicked())}),y(24,"Abbrechen"),p()()()}r&2&&(g(4),b("isMoney",!0)("selectOnFocus",!0),qe("value",s.originalPrice),g(7),b("isMoney",!0)("selectOnFocus",!0)("selectOnInit",!0),qe("value",s.price),g(2),b("ngIf",s.realPercentage===-1),g(),b("ngIf",s.realPercentage>-1),g(2),qe("value",s.aboutPrice),g(2),b("options",s.percentageOptions),qe("value",s.percentage),g(),b("rows",6),qe("value",s.text))},dependencies:[Yi,an,Ct,Nn,tm,yu,Lt]});let t=e;return t})()});var lX,H4e=Q(()=>{z4e();jo();zn();me();Ci();Kr();yi();lX=(()=>{let e=class e{constructor(i,r,s){this.dialogService=i,this.loginService=r,this.socketService=s}showPriceDialog(){return this.dialogService.showComponentDialog(aX)}setChatPinnedState(i){return O(this,null,function*(){let r=i.openPayPalCheckout?i.mobileWithoutPlus+"_openPayPalCheckout":i.mobileWithoutPlus,s=yield this.socketService.getWhatsAppChatPinned(r);if(s||(s={pinned:!0,mobile:i.mobileWithoutPlus,info:"",name:i.name,pinnedBy:this.loginService.getUsername()}),i.action==="pin"){let o=yield this.dialogService.showInput({title:"Anpinnen",message:i.name,okButtonText:"Anpinnen",width:"40vw",stringCanEmpty:!0,prompt:"",additionalButtons:[{text:"Session",value:"Session"}]});typeof o=="string"&&(s.info=o,s.pinned=!0,s.remindAgainAt=0,this.socketService.setWhatsAppChatPinnedState(s))}else if(i.action==="update"){let o=[];i.openPayPalCheckout||(o.push({text:"Info aktualisieren",value:-2}),o.push({text:"3 Tage",value:Qt.DURATION_1DAY*3}),o.push({text:"7 Tage",value:Qt.DURATION_1DAY*7}),o.push({text:"14 Tage",value:Qt.DURATION_1DAY*14})),o.push({text:"L\xF6sen",value:-1});let a=yield this.dialogService.showButtons(i.openPayPalCheckout?"Paypal-Chat l\xF6sen":"Chat l\xF6sen oder verschieben",{buttons:o,showCancelButton:!0});if(a)if(a.value===-2){let l=yield this.dialogService.showInput({title:"Info aktualisieren",message:i.name,okButtonText:"Aktualisieren",width:"40vw",stringCanEmpty:!0,prompt:s.info,additionalButtons:[{text:"Session",value:"Session"}]});typeof l=="string"&&(s.remindAgainAt=0,s.info=l,this.socketService.setWhatsAppChatPinnedState(s))}else a.value===-1?(s.pinned=!1,s.unpinnedAt=Date.now(),s.unpinnedBy=this.loginService.getUsername(),this.socketService.setWhatsAppChatPinnedState(s)):(s.pinned=!0,s.remindAgainAt=Ie.clearTime(Date.now()+a.value),s.createdAt=Date.now(),s.info=yield this.dialogService.showInput({message:"Info f\xFCr die Zukunft",prompt:s.info,stringCanEmpty:!1}),s.info&&(yield this.socketService.setWhatsAppChatPinnedState(s)))}})}};e.\u0275fac=function(r){return new(r||e)(it(vt),it(Fi),it(lt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function MZt(t,e){if(t&1){let n=re();h(0,"div",6)(1,"nxt-input",7),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.data.name,r)||(s.data.name=r),B(r)}),p(),h(2,"nxt-input",8),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.data.mobile,r)||(s.data.mobile=r),B(r)}),p(),h(3,"nxt-textarea",9),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.data.infoForCustomer,r)||(s.data.infoForCustomer=r),B(r)}),p(),h(4,"nxt-textarea",10),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.message,r)||(s.message=r),B(r)}),p(),h(5,"div",11)(6,"nxt-button",12),F("click",function(){V(n);let r=w(2);return B(r.translateTo("de"))}),y(7,"DE"),p(),h(8,"nxt-button",12),F("click",function(){V(n);let r=w(2);return B(r.translateTo("en"))}),y(9,"EN"),p(),h(10,"nxt-button",12),F("click",function(){V(n);let r=w(2);return B(r.translateTo("es"))}),y(11,"ES"),p(),h(12,"nxt-button",12),F("click",function(){V(n);let r=w(2);return B(r.translateTo("nl"))}),y(13,"NL"),p(),h(14,"nxt-button",12),F("click",function(){V(n);let r=w(2);return B(r.translateTo("fr"))}),y(15,"FR"),p()(),h(16,"div",13)(17,"nxt-input",14),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.data.value,r)||(s.data.value=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.valueChanged())}),p()()()}if(t&2){let n=w(2);g(),qe("value",n.data.name),g(),qe("value",n.data.mobile),g(),qe("value",n.data.infoForCustomer),g(),b("noPaddingBottom",!0),qe("value",n.message),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(3),b("isMoney",!0)("selectOnInit",!0),qe("value",n.data.value)}}function kZt(t,e){if(t&1&&(h(0,"div",6),ee(1,"nxt-input",15),p()),t&2){let n=w(2);g(),b("value",n.checkoutLinkData.link)("readonly",!0)}}function IZt(t,e){if(t&1){let n=re();h(0,"nxt-button",16),F("click",function(){V(n);let r=w(2);return B(r.dialogRef.close())}),y(1,"Schlie\xDFen"),p()}}function AZt(t,e){if(t&1){let n=re();h(0,"nxt-button",17),F("click",function(){V(n);let r=w(2);return B(r.sendMessage())}),y(1),p()}if(t&2){let n=w(2);b("disabled",n.data.value<=0||!n.message||!n.data.infoForCustomer),g(),Ke("",n.buttonText," ")}}function PZt(t,e){if(t&1&&(h(0,"div",1),W(1,MZt,18,13,"div",2)(2,kZt,2,2,"div",2),h(3,"div",3),W(4,IZt,2,0,"nxt-button",4)(5,AZt,2,2,"nxt-button",5),p()()),t&2){let n=w();g(),b("ngIf",!n.checkoutLinkData),g(),b("ngIf",n.checkoutLinkData),g(2),b("ngIf",!n.checkoutLinkData),g(),b("ngIf",!n.checkoutLinkData&&n.buttonText)}}var oUe,aUe=Q(()=>{Zi();n1();Jr();Vt();ri();me();ji();yi();ug();Ci();Kr();Vt();oUe=(()=>{let e=class e{constructor(i,r,s,o,a){this.dialogRef=i,this.socketService=r,this.clipboard=s,this.dialogService=o,this.loginService=a,this.message=`Hier kannst du bequem per PayPal bezahlen: {{link}}

Der Termin wird erst nach erfolgter Zahlung geblockt.`,this.buttonText=""}ngOnInit(){}load(i){return O(this,null,function*(){if(i.contactId){let r=yield this.socketService.getContactById(i.contactId);r&&(this.data={contactId:r.id,eventId:i.eventId,value:null,mobile:r.mobileFormatted,infoForCustomer:i.infoForCustomer,name:r.fullName,infoInternal:r.fullName,lang:"de"})}else this.data=i;this.data.infoForCustomer||(this.data.infoForCustomer="Terminkaution")})}copyLink(){this.clipboard.copy(this.checkoutLinkData.link),this.dialogRef.close()}generateMessage(){}setWhatsAppChatPinnedState(){return O(this,null,function*(){this.loginService.getWorkplace()==="backoffice"&&(yield this.socketService.setWhatsAppChatPinnedState({mobile:this.data.mobile,createdAt:Date.now(),openPayPalCheckout:!0,pinnedBy:this.loginService.getUsername(),info:this.data.value.toMoneyString(),name:this.data.name,pinned:!0}))})}translateTo(i){return O(this,null,function*(){this.message=(yield this.socketService.translate(this.message,i)).text,this.data.infoForCustomer=(yield this.socketService.translate(this.data.infoForCustomer,i)).text,this.data.lang=i})}sendMessage(){return O(this,null,function*(){this.dialogService.showLoading("Nachricht wird gesendet"),this.checkoutLinkData=yield this.socketService.generatePayPalCheckoutLink(this.data),this.message=this.message.replace("{{link}}",this.checkoutLinkData.link),yield this.socketService.sendWhatsAppMessage(this.data.mobile,this.message),this.setWhatsAppChatPinnedState(),this.dialogRef.close(),this.dialogService.hideLoading()})}valueChanged(){this.buttonText="",this.data.value&&(this.buttonText=this.data.value.toMoneyString()+" anfordern")}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(_u),R(vt),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-create-paypal-checkout"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[["fxLayout","column","class","w-full",4,"ngIf"],["fxLayout","column",1,"w-full"],["fxLayout","column",4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-around",1,"w-full"],[3,"click",4,"ngIf"],[3,"disabled","click",4,"ngIf"],["fxLayout","column"],["placeholder","Name",3,"valueChange","value"],["placeholder","Handy",3,"valueChange","value"],["placeholder","Text beim Zahlungsvorgang (sieht der Kunde)",3,"valueChange","value"],["placeholder","WhatsApp Nachricht",3,"valueChange","noPaddingBottom","value"],[1,"flex","flex-row","justify-between","mt-2"],[3,"click","smallButton"],[1,"pt-2"],["placeholder","Betrag",3,"valueChange","isMoney","selectOnInit","value"],["placeholder","Link",3,"value","readonly"],[3,"click"],[3,"click","disabled"]],template:function(r,s){r&1&&W(0,PZt,6,4,"div",0),r&2&&b("ngIf",s.data)},dependencies:[Ct,At,Yt,oi,Yi,yu,Lt],styles:["[_nghost-%COMP%]{width:500px;display:flex}"]});let t=e;return t})()});var PA,cX=Q(()=>{aUe();$n();me();Ci();PA=(()=>{let e=class e{constructor(i){this.dialogService=i}showCreatePaypalPayment(i){let r=this.dialogService.showComponentDialog(oUe,{});return r.componentInstance.load(i),Sn(r.afterClosed())}};e.\u0275fac=function(r){return new(r||e)(it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var u3,sz,t6,wD=Q(()=>{kl();jo();zn();jc();u3=function(t){return t.Event="event",t.Artist="artist",t.None="none",t.WorkSessionPayout="work-session-payout",t}(u3||{}),sz=function(t){return t.PriceEstimateTillNotReached="PriceEstimateTillNotReached",t.Manual="Manual",t.AdditionalPay="AdditionalPay",t.RestPaymentOverDue="RestPaymentOverDue",t.ImproveArtistShouldGetMoney="ImproveArtistShouldGetMoney",t.Standalone="Standalone",t.MissingDeclarationsOfConsent="MissingDeclarationsOfConsent",t.DeclarationsOfConsentWrongSiteCount="DeclarationsOfConsentWrongSiteCount",t.WhatsAppConnect="WhatsAppConnect",t.Artist_ContractIsMissing="Artist_ContractIsMissing",t.Artist_ShowStencil="Artist_ShowStencil",t.Piercing_Info="Piercing_Info",t.Event_MissingStencil="Event_MissingStencil",t}(sz||{}),t6=class{static createEvent(e,n,i,r,s){return{id:"",type:e,refType:u3.Event,description:r,refId:n,createdBy:s.username,createdByStudio:s.studio||"",createdByWorkplace:s.workplace||"",createdAt:Date.now(),done:!1,reminderDateTime:i,reminderDate:Ie.clearTime(i),reminderDateString:Ie.format(i,"yyyy-MM-dd"),priority:0,originalReminderDateTime:i,postponeDurations:[],updatedBy:s.username,updatedAt:Date.now()}}static createEventSubId(e,n,i,r,s,o){return{id:"",type:e,refType:u3.Event,description:s,refId:n,createdBy:o.username,createdByStudio:o.studio||"",createdByWorkplace:o.workplace||"",createdAt:Date.now(),done:!1,reminderDateTime:r,reminderDate:Ie.clearTime(r),reminderDateString:Ie.format(r,"yyyy-MM-dd"),subId:i,priority:0,originalReminderDateTime:r,postponeDurations:[],updatedBy:o.username,updatedAt:Date.now()}}static createSubId(e,n,i,r,s,o,a){return{id:"",type:n,refType:e,description:o,refId:i,createdBy:a.username,createdByStudio:a.studio||"",createdByWorkplace:a.workplace||"",createdAt:Date.now(),done:!1,reminderDateTime:s,reminderDate:Ie.clearTime(s),reminderDateString:Ie.format(s,"yyyy-MM-dd"),subId:r,priority:0,originalReminderDateTime:s,postponeDurations:[],updatedBy:a.username,updatedAt:Date.now()}}static createStandaloneOnlyOnceSubId(e,n,i,r){return{id:"",type:sz.Standalone,refType:u3.None,description:i,createdBy:r.username,createdByStudio:r.studio||"",createdByWorkplace:r.workplace||"",createdAt:Date.now(),done:!1,reminderDateTime:n,reminderDate:Ie.clearTime(n),reminderDateString:Ie.format(n,"yyyy-MM-dd"),subId:e,priority:0,originalReminderDateTime:n,postponeDurations:[],updatedBy:r.username,updatedAt:Date.now()}}static createStandalone(e,n,i){return{id:"",type:sz.Standalone,refType:u3.None,description:n,createdBy:i.username,createdByStudio:i.studio||"",createdByWorkplace:i.workplace||"",createdAt:Date.now(),done:!1,reminderDateTime:e,reminderDate:Ie.clearTime(e),reminderDateString:Ie.format(e,"yyyy-MM-dd"),priority:0,originalReminderDateTime:e,postponeDurations:[],updatedBy:i.username,updatedAt:Date.now()}}static setNewDateTime(e,n){e.reminderDate=Ie.clearTime(n),e.reminderDateString=Ie.format(n,"yyyy-MM-dd"),e.reminderDateTime=n}static sortReminders(e,n){return e.sortValue<n.sortValue?-1:e.sortValue>n.sortValue||e.reminderDateTime>n.reminderDateTime?1:e.reminderDateTime<n.reminderDateTime?-1:0}static GetReminderColor(e){let n=fn.round((Date.now()-e.reminderDateTime)/Qt.DURATION_1MINUTE);return n>=0?e.priority===100?xn.RedDark:e.priority>=70?n>20?xn.RedDark:xn.OrangeDark:e.priority>=50?n>40?xn.RedDark:xn.OrangeDark:e.priority<=50?n>60*4?xn.RedDark:xn.OrangeDark:xn.OrangeDark:""}static GetReminderSortValue(e){return e.priority===100?1:e.color==="red"&&e.priority>=50?3:e.color==="orange"?4:5}}});var Cg,M7=Q(()=>{Cg=(()=>{let e=class e{static getText(i){return Array.isArray(i)?i.map(r=>e.getText(r)).join(" &  "):e.workPlaces.find(r=>r.value===i)?.text||""}static getValue(i){return e.workPlaces.find(r=>r.value===i)?.value||""}};e.workPlaces=[{text:"Empfang",value:"reception"},{text:"Backoffice",value:"backoffice"},{text:"Handwerk",value:"craft"},{text:"WhatsApp",value:"whatsapp"},{text:"WhatsApp Franchise",value:"whatsappFranchise"},{text:"Piercing",value:"piercing"},{text:"Terminbewertung",value:"eventRating"}];let t=e;return t})()});var k7,W4e=Q(()=>{wD();M7();k7=class{static getEmptyReminder(){return{id:"",reminderDate:0,reminderDateTime:0,reminderDateString:"",description:"",refType:u3.None,createdBy:"",createdByStudio:"",createdByWorkplace:"",createdAt:0,done:!1,type:sz.Manual,priority:0,originalReminderDateTime:0,postponeDurations:[],updatedBy:"",updatedAt:0}}static getTodoBy(e){if(e.toDoByWorkplace)return Cg.getText(e.toDoByWorkplace);if(e.toDoByUser)return e.toDoByUser}}});function FZt(t,e){if(t&1){let n=re();h(0,"nxt-button",4),F("click",function(){let r=V(n).$implicit,s=w();return B(s.buttonClicked(r))}),ee(1,"div",5),Ce(2,"safeHtml"),p()}if(t&2){let n=e.$implicit;g(),b("innerHTML",tt(2,1,n.text),Pi)}}var RZt,lUe,cUe=Q(()=>{me();Gi();wD();W4e();yi();RA();ji();jo();Nu();Zi();sg();ha();me();RZt=(t,e)=>e.action;lUe=(()=>{let e=class e extends bt{constructor(){super(),this.title=gt(""),this.reminder=gt(null),this.buttons=gt([]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.reminderService=Ve(T5),this.dialogRef=Ve(Gt)}ngOnInit(){}nxtOnDestroy(){}setData(i){this.reminder.set(i),i.createdBy==="System"?this.title.set("Aufgabe f\xFCr "+k7.getTodoBy(i)):this.title.set("Aufgabe von "+i.createdBy+" f\xFCr "+k7.getTodoBy(i)),this.drawButtons()}drawButtons(){return O(this,null,function*(){let i={text:"Zur\xFCck",action:"back"},r={text:"Erledigt",action:"setDone"},s={text:"Antworten",action:"writeResponse"},o="Sp\xE4ter";this.reminder().postponeDurations.length===1&&(o=cr.arrowRight+" "+Qt.format(this.reminder().postponeDurations[0],"",!0));let a={text:o,action:"postpone"},l=[i];if(this.reminder().postponeDurations.length>0&&l.push(a),this.reminder().disableManualSetDone||l.push(r),this.reminder().refType===u3.Event&&(!this.reminder().buttons||!this.reminder().buttons.some(c=>c.action==="showEvent"))&&l.push({text:"Termin \xF6ffnen",action:"showEvent"}),this.reminder().buttons)for(let c of this.reminder().buttons)l.push({text:c.text,action:c.action});this.buttons.set(l)})}buttonClicked(i){return O(this,null,function*(){if(i.action==="back"){this.dialogRef.close();return}yield this.reminderService.startReminderAction(this.reminder(),i.action).then(),this.dialogRef.close()})}showHack(){this.reminder.update(i=>(i.postponeDurations.includes(Qt.DURATION_1HOUR*6)||i.postponeDurations.push(Qt.DURATION_1HOUR*6),i.disableManualSetDone&&(i.disableManualSetDone=!1),i)),this.drawButtons().then()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-reminder-view"]],standalone:!0,features:[et,xe],decls:8,vars:3,consts:[[1,"flex","flex-col","gap-5"],[1,"flex","text-120","justify-center",3,"nxtOnMultiClick","nxtMultiClick"],[1,"flex"],[1,"flex","flex-row","gap-3","justify-between"],[3,"click"],[3,"innerHTML"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),F("nxtOnMultiClick",function(){return s.showHack()}),y(2),p(),h(3,"div",2),y(4),p(),h(5,"div",3),Kn(6,FZt,3,3,"nxt-button",null,RZt),p()()),r&2&&(g(),b("nxtMultiClick",3),g(),ye(s.title()),g(2),ye(s.reminder().description),g(2),Yn(s.buttons()))},dependencies:[Lt,Qu,Or],changeDetection:0});let t=e;return t})()});var Cn,g2=Q(()=>{qn();Cn=class extends Bb{constructor(e,n,i){super(e,n),this.name=i,this.isNumber=!1,this._firstValueSetTemp=0}getOldValue(){return this._oldValue}valueChanged(){return this.value!==this._oldValue}getFirstValueSet(){return this._firstValueSet}getLastValueChanged(){return this._lastValueChanged}setValue(e,n){if(this._firstValueSetTemp===0?(this._firstValueSet=!0,this._firstValueSetTemp=1):this._firstValueSet=!1,this._oldValue=this.value,this._lastValueChanged=this._oldValue!==e,this.isNumber&&e!==null&&e!==""&&typeof e<"u"){if(e!=="-"){let i=parseFloat(typeof e?.replace=="function"?e.replace(",","."):e);super.setValue(i,n)}}else super.setValue(e,n)}}});function NZt(t,e){if(t&1&&ee(0,"mat-pseudo-checkbox",3),t&2){let n=w();b("disabled",n.disabled)}}function VZt(t,e){if(t&1&&ee(0,"mat-pseudo-checkbox",3),t&2){let n=w();b("disabled",n.disabled)}}function BZt(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var LZt,OZt,dUe,uUe,zZt,hUe,dX,Dm,nm,pUe,i6=Q(()=>{Xh();dk();me();me();Th();qn();bl();LZt=["button"],OZt=["*"];dUe=new Ri("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:BZt});uUe=new Ri("MatButtonToggleGroup"),zZt={provide:Dh,useExisting:_c(()=>Dm),multi:!0},hUe=0,dX=class{constructor(e,n){this.source=e,this.value=n}},Dm=(()=>{let e=class e{get name(){return this._name}set name(i){this._name=i,this._markButtonsForCheck()}get value(){let i=this._selectionModel?this._selectionModel.selected:[];return this.multiple?i.map(r=>r.value):i[0]?i[0].value:void 0}set value(i){this._setSelectionByValue(i),this.valueChange.emit(this.value)}get selected(){let i=this._selectionModel?this._selectionModel.selected:[];return this.multiple?i:i[0]||null}get multiple(){return this._multiple}set multiple(i){this._multiple=i,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(i){this._disabled=i,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(i){this._disabledInteractive=i,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(i){this._hideSingleSelectionIndicator=i,this._markButtonsForCheck()}get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(i){this._hideMultipleSelectionIndicator=i,this._markButtonsForCheck()}constructor(i,r,s){this._changeDetector=i,this._dir=s,this._multiple=!1,this._disabled=!1,this._disabledInteractive=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name=`mat-button-toggle-group-${hUe++}`,this.valueChange=new nt,this.change=new nt,this.appearance=r&&r.appearance?r.appearance:"standard",this.hideSingleSelectionIndicator=r?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=r?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new ck(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(i=>i.checked)),this.multiple||this._initializeTabIndex()}writeValue(i){this.value=i,this._changeDetector.markForCheck()}registerOnChange(i){this._controlValueAccessorChangeFn=i}registerOnTouched(i){this._onTouched=i}setDisabledState(i){this.disabled=i}_keydown(i){if(this.multiple||this.disabled)return;let s=i.target.id,o=this._buttonToggles.toArray().findIndex(l=>l.buttonId===s),a=null;switch(i.keyCode){case 32:case 13:a=this._buttonToggles.get(o)||null;break;case 38:a=this._getNextButton(o,-1);break;case 37:a=this._getNextButton(o,this.dir==="ltr"?-1:1);break;case 40:a=this._getNextButton(o,1);break;case 39:a=this._getNextButton(o,this.dir==="ltr"?1:-1);break;default:return}a&&(i.preventDefault(),a._onButtonClick(),a.focus())}_emitChangeEvent(i){let r=new dX(i,this.value);this._rawValue=r.value,this._controlValueAccessorChangeFn(r.value),this.change.emit(r)}_syncButtonToggle(i,r,s=!1,o=!1){!this.multiple&&this.selected&&!i.checked&&(this.selected.checked=!1),this._selectionModel?r?this._selectionModel.select(i):this._selectionModel.deselect(i):o=!0,o?Promise.resolve().then(()=>this._updateModelValue(i,s)):this._updateModelValue(i,s)}_isSelected(i){return this._selectionModel&&this._selectionModel.isSelected(i)}_isPrechecked(i){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(r=>i.value!=null&&r===i.value):i.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(i=>{i.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let i=0;i<this._buttonToggles.length;i++){let r=this._buttonToggles.get(i);if(!r.disabled){r.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(i,r){let s=this._buttonToggles;for(let o=1;o<=s.length;o++){let a=(i+r*o+s.length)%s.length,l=s.get(a);if(l&&!l.disabled)return l}return null}_setSelectionByValue(i){this._rawValue=i,this._buttonToggles&&(this.multiple&&i?(Array.isArray(i),this._clearSelection(),i.forEach(r=>this._selectValue(r))):(this._clearSelection(),this._selectValue(i)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(i=>{i.checked=!1,this.multiple||(i.tabIndex=-1)})}_selectValue(i){let r=this._buttonToggles.find(s=>s.value!=null&&s.value===i);r&&(r.checked=!0,this._selectionModel.select(r),this.multiple||(r.tabIndex=0))}_updateModelValue(i,r){r&&this._emitChangeEvent(i),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(i=>i._markForCheck())}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(dUe,8),R(Va,8))},e.\u0275dir=mi({type:e,selectors:[["mat-button-toggle-group"]],contentQueries:function(r,s,o){if(r&1&&_o(o,nm,5),r&2){let a;Pt(a=Rt())&&(s._buttonToggles=a)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(r,s){r&1&&F("keydown",function(a){return s._keydown(a)}),r&2&&(Bn("role",s.multiple?"group":"radiogroup")("aria-disabled",s.disabled),ki("mat-button-toggle-vertical",s.vertical)("mat-button-toggle-group-appearance-standard",s.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",mn],value:"value",multiple:[2,"multiple","multiple",mn],disabled:[2,"disabled","disabled",mn],disabledInteractive:[2,"disabledInteractive","disabledInteractive",mn],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",mn],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",mn]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],standalone:!0,features:[as([zZt,{provide:uUe,useExisting:e}]),Bs]});let t=e;return t})(),nm=(()=>{let e=class e{get buttonId(){return`${this.id}-button`}get tabIndex(){return this._tabIndex}set tabIndex(i){this._tabIndex=i,this._markForCheck()}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(i){this._appearance=i}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(i){i!==this._checked&&(this._checked=i,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(i){this._disabled=i}get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(i){this._disabledInteractive=i}constructor(i,r,s,o,a,l){this._changeDetectorRef=r,this._elementRef=s,this._focusMonitor=o,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new nt;let c=Number(a);this.tabIndex=c||c===0?c:null,this.buttonToggleGroup=i,this.appearance=l&&l.appearance?l.appearance:"standard",this.disabledInteractive=l?.disabledInteractive??!1}ngOnInit(){let i=this.buttonToggleGroup;this.id=this.id||`mat-button-toggle-${hUe++}`,i&&(i._isPrechecked(this)?this.checked=!0:i._isSelected(this)!==this._checked&&i._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let i=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),i&&i._isSelected(this)&&i._syncButtonToggle(this,!1,!1,!0)}focus(i){this._buttonElement.nativeElement.focus(i)}_onButtonClick(){if(this.disabled)return;let i=this.isSingleSelector()?!0:!this._checked;if(i!==this._checked&&(this._checked=i,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let r=this.buttonToggleGroup._buttonToggles.find(s=>s.tabIndex===0);r&&(r.tabIndex=-1),this.tabIndex=0}this.change.emit(new dX(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}};e.\u0275fac=function(r){return new(r||e)(R(uUe,8),R(Kt),R(fi),R(qp),wp("tabindex"),R(dUe,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-button-toggle"]],viewQuery:function(r,s){if(r&1&&ei(LZt,5),r&2){let o;Pt(o=Rt())&&(s._buttonElement=o.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(r,s){r&1&&F("focus",function(){return s.focus()}),r&2&&(Bn("aria-label",null)("aria-labelledby",null)("id",s.id)("name",null),ki("mat-button-toggle-standalone",!s.buttonToggleGroup)("mat-button-toggle-checked",s.checked)("mat-button-toggle-disabled",s.disabled)("mat-button-toggle-disabled-interactive",s.disabledInteractive)("mat-button-toggle-appearance-standard",s.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",mn],appearance:"appearance",checked:[2,"checked","checked",mn],disabled:[2,"disabled","disabled",mn],disabledInteractive:[2,"disabledInteractive","disabledInteractive",mn]},outputs:{change:"change"},exportAs:["matButtonToggle"],standalone:!0,features:[Bs,xe],ngContentSelectors:OZt,decls:8,vars:14,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-label-content"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"button",1,0),F("click",function(){return V(o),B(s._onButtonClick())}),h(2,"span",2),W(3,NZt,1,1,"mat-pseudo-checkbox",3)(4,VZt,1,1,"mat-pseudo-checkbox",3),Ln(5),p()(),ee(6,"span",4)(7,"span",5)}if(r&2){let o=pr(1);b("id",s.buttonId)("disabled",s.disabled&&!s.disabledInteractive||null),Bn("role",s.isSingleSelector()?"radio":"button")("tabindex",s.disabled&&!s.disabledInteractive?-1:s.tabIndex)("aria-pressed",s.isSingleSelector()?null:s.checked)("aria-checked",s.isSingleSelector()?s.checked:null)("name",s._getButtonName())("aria-label",s.ariaLabel)("aria-labelledby",s.ariaLabelledby)("aria-disabled",s.disabled&&s.disabledInteractive?"true":null),g(3),Je(s.buttonToggleGroup&&s.checked&&!s.buttonToggleGroup.multiple&&!s.buttonToggleGroup.hideSingleSelectionIndicator?3:-1),g(),Je(s.buttonToggleGroup&&s.checked&&s.buttonToggleGroup.multiple&&!s.buttonToggleGroup.hideMultipleSelectionIndicator?4:-1),g(3),b("matRippleTrigger",o)("matRippleDisabled",s.disableRipple||s.disabled)}},dependencies:[ym,ehe],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full));border:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-app-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-app-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle .mat-pseudo-checkbox{margin-right:12px}[dir=rtl] .mat-button-toggle .mat-pseudo-checkbox{margin-right:0;margin-left:12px}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-app-on-surface));background-color:var(--mat-standard-button-toggle-background-color);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-app-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-app-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-app-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-app-label-large-weight));letter-spacing:var(--mat-standard-button-toggle-label-text-tracking, var(--mat-app-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-app-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-app-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-app-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-app-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-app-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color);background-color:var(--mat-standard-button-toggle-disabled-state-background-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-button-toggle-disabled-selected-state-text-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color);background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color, var(--mat-app-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full))}.mat-button-toggle-group-appearance-standard .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full))}.mat-button-toggle-group-appearance-standard .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-app-corner-full))}"],encapsulation:2,changeDetection:0});let t=e;return t})(),pUe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,D0,nm,zr]});let t=e;return t})()});function GZt(t,e){t&1&&(h(0,"div",23),y(1,"Neue Aufgabe"),p())}function WZt(t,e){t&1&&(h(0,"div",23),y(1,"Aufgabe bearbeiten"),p())}function UZt(t,e){if(t&1&&(h(0,"mat-button-toggle",7),y(1),p()),t&2){let n=e.$implicit;b("value",n),g(),ye(n)}}function jZt(t,e){if(t&1&&(h(0,"mat-button-toggle-group",16),Kn(1,UZt,2,2,"mat-button-toggle",7,sa),p()),t&2){let n=w();b("formControl",n.form.controls.toDoByUser),g(),Yn(n.userOptions)}}function $Zt(t,e){if(t&1&&(h(0,"mat-button-toggle",7),y(1),p()),t&2){let n=e.$implicit;b("value",n.value),g(),ye(n.text)}}function KZt(t,e){if(t&1){let n=re();h(0,"nxt-button",21),F("click",function(){V(n);let r=w();return B(r.done())}),y(1,"Ist Erledigt"),p()}}var U4e,HZt,FA,uX=Q(()=>{qn();wD();tp();th();Zi();Jr();Ly();ri();Vt();g2();W4e();Ah();C4();n1();s3();zn();jo();nc();U4e=Gs(Jm());i6();oo();il();me();yi();ji();Ci();Cs();Vt();qn();HZt=(t,e)=>e.value;FA=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.dialogRef=r,this.dialogService=s,this.configService=o,this.isNewReminder=!0,this.form=new Wl({id:new Cn("",[],"ID"),reminderDate:new Cn(null,[],"Datum"),reminderTime:new Cn(null,[],"Zeit"),description:new Cn("",[ii.requiredAndNotNaN],"Aufgabe"),toDoByWorkplace:new Cn(null,[],"Arbeitsplatz"),toDoByUser:new Cn("",[],"Benutzer"),refType:new Cn(u3.None,[],"RefType"),done:new Cn(!1,[],"Erledigt"),canPostpone:new Cn(!1,[],"Verschiebbar"),maxPostpones:new Cn(0,[],"Maximale Verschiebungen"),postponeDurations:new Cn([],[],"Verschiebm\xF6glichkeiten"),responseExpected:new Cn(!1,[],"Antwort erwartet"),priority:new Cn(null,[],"Priorit\xE4t"),refId:new Cn("",[])}),this.userOptions=this.configService.config.value.users.filter(a=>!a.noPerson).sortString("username").map(a=>a.username),this.workplaceOptions=[{text:"Backoffice",value:"backoffice"},{text:"Empfang",value:"reception"}],this.DisplayWithTools=Qh,this.dateTimeIn=0,this.studioStartTimeString=Qt.format(this.configService.config.value.studioWorkStart,"HH:mm"),this.todoByRef="user",this.postponeDurationOptions=[{value:Qt.DURATION_1MINUTE*30,text:"30 Min"},{value:Qt.DURATION_1HOUR,text:"1 Std"},{value:Qt.DURATION_1HOUR*2,text:"2 Std"},{value:Qt.DURATION_1HOUR*4,text:"4 Std"},{value:Qt.DURATION_1DAY,text:"1 Tag"}]}ngAfterViewInit(){}setValidators(){this.form.controls.toDoByWorkplace.setValidators([]),this.form.controls.toDoByUser.setValidators([]),this.todoByRef==="user"&&this.form.controls.toDoByUser.setValidators([ii.requiredAndNotNaN]),this.form.controls.toDoByWorkplace.updateValueAndValidity({emitEvent:!1}),this.form.controls.toDoByUser.updateValueAndValidity({emitEvent:!1})}ngOnInit(){this.form.controls.toDoByUser.valueChanges.subscribe(i=>{i&&this.form.controls.toDoByWorkplace.setValue(null)}),this.form.controls.toDoByWorkplace.valueChanges.subscribe(i=>{i&&this.form.controls.toDoByUser.setValue("")})}load(i){this.currentReminder=i,this.isNewReminder=!i.id,this.fillForm(i),this.setValidators()}fillForm(i){Is.setForm(this.form,i)}getReminderFromForm(){let i=St(ve({},this.form.getRawValue()),{reminderDate:Ie.parse(this.form.getRawValue().reminderDate)}),r=ve(ve({},k7.getEmptyReminder()),i);return r.reminderDateTime=(Ie.format(r.reminderDate,"yyyy-MM-dd")+" "+i.reminderTime+":00").dateParse(),r}save(){return O(this,null,function*(){if(!Is.showErrorsTrueIfNoError(this.form,this.dialogService))return;let i=this.getReminderFromForm(),r=ve(ve({},this.currentReminder),i);this.isNewReminder?(r.priority=100,yield this.socketService.createReminder(r)):yield this.socketService.updateReminder(r),this.dialogRef.close()})}done(){return O(this,null,function*(){yield this.socketService.setReminderDone(this.currentReminder.id,!1),this.dialogRef.close()})}cancel(){this.dialogRef.close()}newReminder(i){this.currentReminder=k7.getEmptyReminder(),this.form.controls.reminderDate.setValue((0,U4e.default)(Date.now())),this.form.controls.reminderTime.setValue(Ie.formatNow("HH:mm")),this.form.controls.maxPostpones.setValue(10),this.form.controls.priority.setValue(100),this.form.controls.postponeDurations.setValue([this.postponeDurationOptions[0].value]),i?.eventId&&(this.form.controls.refId.setValue(i.eventId),this.form.controls.refType.setValue(u3.Event)),this.setValidators()}dateTimeInChanged(){let i=Date.now()+Qt.DURATION_1MINUTE*this.dateTimeIn;this.dateTimeIn===-1&&(i=Ie.todayAt(this.studioStartTimeString).dateAddDays(1)),this.form.controls.reminderTime.setValue(i.dateFormat("HH:mm")),this.form.controls.reminderDate.setValue((0,U4e.default)(i))}todoByRefChanged(){this.form.controls.toDoByWorkplace.setValue(null),this.form.controls.toDoByUser.setValue(null),this.todoByRef==="backoffice"?this.form.controls.toDoByWorkplace.setValue("backoffice"):this.todoByRef==="reception"&&this.form.controls.toDoByWorkplace.setValue("reception"),this.setValidators()}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Gt,8),R(vt),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-reminder-edit"]],viewQuery:function(r,s){if(r&1&&ei(tl,5),r&2){let o;Pt(o=Rt())&&(s.datePickerComponent=o.first)}},standalone:!0,features:[xe],decls:65,vars:27,consts:[["fxLayout","column",1,"w-full","p-relative"],["fxLayout","row","fxLayoutAlign","center center"],["class","text-130 p-4",4,"ngIf"],[1,"flex","flex-col","items-start","gap-3"],[1,"flex","flex-row","gap-2","items-center","justify-between","w-full"],[1,"flex","flex-row","items-center"],[3,"valueChange","value"],[3,"value"],[1,"flex","flex-row"],[3,"noPadding","nxtFormControl","showJumpDayButtons"],["minTime","10:00",3,"noPadding","nxtFormControl"],["value","user"],["value","reception"],["value","backoffice"],["nxtPermission","IsJulian",1,"flex","flex-row","items-center",2,"position","relative","top","-0px"],[3,"nxtFormControl"],[3,"formControl"],[1,"pr-3"],["multiple","",3,"formControl"],[1,"flex","flex-row","items-center","pt-3"],[1,"flex","flex-row","w-full","mt-3","justify-around"],[3,"click"],[3,"click",4,"ngIf"],[1,"text-130","p-4"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),W(2,GZt,2,0,"div",2)(3,WZt,2,0,"div",2),p(),h(4,"div",3)(5,"div",4)(6,"div",5)(7,"mat-button-toggle-group",6),Xe("valueChange",function(a){return Ze(s.dateTimeIn,a)||(s.dateTimeIn=a),a}),F("valueChange",function(){return s.dateTimeInChanged()}),h(8,"mat-button-toggle",7),y(9,"JETZT"),p(),h(10,"mat-button-toggle",7),y(11,"in 30 Min"),p(),h(12,"mat-button-toggle",7),y(13,"in 1 Std"),p(),h(14,"mat-button-toggle",7),y(15,"in 2 Std"),p(),h(16,"mat-button-toggle",7),y(17),p()()(),h(18,"div",8),ee(19,"nxt-date-picker",9)(20,"nxt-time-picker",10),p()(),h(21,"div",4)(22,"div",5)(23,"mat-button-toggle-group",6),Xe("valueChange",function(a){return Ze(s.todoByRef,a)||(s.todoByRef=a),a}),F("valueChange",function(){return s.todoByRefChanged()}),h(24,"mat-button-toggle",11),y(25,"Benutzer"),p(),h(26,"mat-button-toggle",12),y(27,"Empfang"),p(),h(28,"mat-button-toggle",13),y(29,"Backoffice"),p()()(),h(30,"div",8)(31,"div",14),ee(32,"nxt-slide-toggle",15),p()()(),h(33,"div",5),W(34,jZt,3,1,"mat-button-toggle-group",16),p(),h(35,"div",8),ee(36,"nxt-textarea",15),p(),h(37,"div",5)(38,"div",17),y(39,"Verschiebbar um"),p(),h(40,"mat-button-toggle-group",18),Kn(41,$Zt,2,2,"mat-button-toggle",7,HZt),p()(),h(43,"div",19)(44,"div",17),y(45,"Verschiebbar anzahl"),p(),h(46,"mat-button-toggle-group",16)(47,"mat-button-toggle",7),y(48,"0"),p(),h(49,"mat-button-toggle",7),y(50,"3"),p(),h(51,"mat-button-toggle",7),y(52,"4"),p(),h(53,"mat-button-toggle",7),y(54,"5"),p(),h(55,"mat-button-toggle",7),y(56,"10"),p(),h(57,"mat-button-toggle",7),y(58,"Unbegrenzt"),p()()()(),h(59,"div",20)(60,"nxt-button",21),F("click",function(){return s.cancel()}),y(61,"Abbrechen"),p(),W(62,KZt,2,0,"nxt-button",22),h(63,"nxt-button",21),F("click",function(){return s.save()}),y(64,"Speichern"),p()()()),r&2&&(g(2),b("ngIf",s.isNewReminder),g(),b("ngIf",!s.isNewReminder),g(4),qe("value",s.dateTimeIn),g(),b("value",0),g(2),b("value",30),g(2),b("value",60),g(2),b("value",120),g(2),b("value",-1),g(),Ke("Morgen ",s.studioStartTimeString," Uhr"),g(2),b("noPadding",!0)("nxtFormControl",s.form.get("reminderDate"))("showJumpDayButtons",!0),g(),b("noPadding",!0)("nxtFormControl",s.form.get("reminderTime")),g(3),qe("value",s.todoByRef),g(9),b("nxtFormControl",s.form.controls.responseExpected),g(2),Je(s.todoByRef==="user"?34:-1),g(2),b("nxtFormControl",s.form.get("description")),g(4),b("formControl",s.form.controls.postponeDurations),g(),Yn(s.postponeDurationOptions),g(5),b("formControl",s.form.controls.maxPostpones),g(),b("value",0),g(2),b("value",3),g(2),b("value",4),g(2),b("value",5),g(2),b("value",10),g(2),b("value",-1),g(5),b("ngIf",!s.isNewReminder))},dependencies:[At,Yt,oi,Ct,tl,cf,Lt,yu,Dm,nm,Ia,Ko,$c,Nn,Zs],styles:["[_nghost-%COMP%]{min-width:900px;display:flex;width:50vw}"],changeDetection:0});let t=e;return t})()});var LA,hX=Q(()=>{Rv();me();yi();Ci();z1();Kr();LA=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.dialogService=r,this.bodyPutService=s,this.loginService=o}showStencilSeenDialog(i){return O(this,null,function*(){let r=yield this.socketService.getNxtCalendarEvent(i);if(Vu.hastMissingBodyPuts(r)){yield this.dialogService.showOk("Die K\xF6rperstelle oder das Motiv ist noch nicht eingetragen, bitte trage erst die richtige K\xF6rperstelle oder das richtige Motiv ein",{buttonText:"Termin \xF6ffnen"}),this.dialogService.showEvent(r.id);return}let s=this.bodyPutService.getTextFromEvent(r).join(`
`),o=r.customerObj.fullName+" bei "+r.artist;if(r.stencilSeen.seen){let a=s+`


`+r.stencilSeen.seenAt.dateFormat("dd.MM.yyyy HH:mm")+": Stencil von "+r.stencilSeen.seenBy+" gesehen";if(r.stencilSeen.seenBy===this.loginService.getUsername()){if(!(yield this.dialogService.showYesNo(a,{title:o,noText:"Stencil doch nicht gesehen",yesText:"OK"})))return this.socketService.updateCalendarEventProperty(r.id,{stencilSeen:{seen:!1,seenBy:"",seenAt:0,workplace:"",studio:""}}).then(),{seen:!1,seenBy:"",seenAt:0,workplace:"",studio:""}}else yield this.dialogService.showOk(a,{title:o})}else{let a=yield this.dialogService.showYesNoCancel(s+`

Hast du das Stencil gesehen?`,{title:o,yesText:`Gesehen
Info \u{1F4F2} an Kunden`,noText:`Gesehen
keine Info an Kunden`,cancelText:"Zur\xFCck"});if(typeof a=="boolean")return yield this.socketService.updateCalendarEventProperty(r.id,{stencilSeen:{seen:!0,seenBy:this.loginService.getUsername(),seenAt:Date.now(),workplace:this.loginService.getWorkplace(),studio:this.loginService.getStudio()}}),a&&this.socketService.sendStencilSeenMessageToCustomer(r.id).then(),{seen:!0,seenBy:this.loginService.getUsername(),seenAt:Date.now(),studio:this.loginService.getStudio(),workplace:this.loginService.getWorkplace()}}})}showStencilRequestDialog(i){return O(this,null,function*(){(yield this.dialogService.showYesNo("Stencil per WhatsApp beim Artist anfordern",{yesText:"Anfrage senden",noText:"Abbrechen"}))&&(yield this.socketService.sendArtistStencilRequest(i))})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt),it(Oc),it(Fi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function YZt(t,e){if(t&1){let n=re();h(0,"div",2)(1,"nxt-button",3),F("click",function(){V(n);let r=w(2);return B(r.canceleClicked())}),y(2,"Abbrechen"),p()()}}function qZt(t,e){if(t&1&&(h(0,"div",0)(1,"div",1),y(2),p(),W(3,YZt,3,0,"div",2),p()),t&2){let n=e;g(2),Ke('Warte auf Best\xE4tigung von "',n.artist,'"'),g(),Je(n.earlyPayout?-1:3)}}var fUe,gUe=Q(()=>{me();Gi();ji();Ci();yi();Zi();me();fUe=(()=>{let e=class e extends bt{constructor(){super(),this.artistConfirm=gt(null),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt)}ngOnInit(){}nxtOnDestroy(){}start(i){this.artistConfirm.set(i),this.pushSocketSubscription=this.socketService.subscribeNew("eventArtistConfirmChanged",r=>{r.record.state==="confirmed"&&r.record.id===i.id&&(this.dialogRef.close(!0),this.dialogService.showOk('"'+i.artist+'" hat best\xE4tigt.'))})}canceleClicked(){this.dialogRef.close(!1)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-confirm-waiting"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","flex-col"],[1,"p-3","text-[180%]"],[1,"flex","flex-row","justify-center","pt-3"],[3,"click"]],template:function(r,s){if(r&1&&W(0,qZt,4,2,"div",0),r&2){let o;Je((o=s.artistConfirm())?0:-1,o)}},dependencies:[Lt],changeDetection:0});let t=e;return t})()});var OA,pX=Q(()=>{me();yi();Ci();Kr();gUe();$n();me();OA=(()=>{let e=class e{constructor(){this.socketService=Ve(lt),this.dialogService=Ve(vt),this.loginService=Ve(Fi),this.waitingIsRunning=!1,setTimeout(()=>this.init())}init(){return O(this,null,function*(){})}startArtistConfirmFromReminder(i){return O(this,null,function*(){let r=yield this.socketService.createArtistConfirm({artist:i.refObj.artist,value:i.refObj.value,workSessionDateString:i.refObj.workSessionDateString,state:"pending",earlyPayout:!1});this.waitForArtistConfirm(r.artistConfirm)})}start(i,r,s,o){return O(this,null,function*(){let a=yield this.socketService.createArtistConfirm({artist:i,value:r,workSessionDateString:s,state:"pending",earlyPayout:o});this.waitForArtistConfirm(a.artistConfirm)})}waitForArtistConfirm(i){return O(this,null,function*(){if(!this.waitingIsRunning&&!this.loginService.isBackoffice()){this.waitingIsRunning=!0;try{let r=this.dialogService.showComponentDialog(fUe);r.componentInstance.start(i),(yield Sn(r.afterClosed()))||(yield this.socketService.cancelArtistConfirm(i.id))}catch{}this.waitingIsRunning=!1}})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function XZt(t,e){if(t&1){let n=re();h(0,"div",0)(1,"div",1)(2,"div",0)(3,"table")(4,"tr")(5,"td"),y(6,"1."),p(),h(7,"td"),y(8),p()(),h(9,"tr")(10,"td"),y(11,"2."),p(),h(12,"td"),y(13,"Vollst\xE4ndig bei Telegram anmelden."),p()(),h(14,"tr")(15,"td"),y(16,"3."),p(),h(17,"td"),y(18),p()(),h(19,"tr")(20,"td"),y(21,"4."),p(),h(22,"td"),y(23,"Es \xF6ffnet sich Telegram."),ee(24,"br"),y(25,'Unten ist ein "Start" Button zu sehen, hier muss er/sie drauf klicken.'),p()(),h(26,"tr")(27,"td"),y(28,"5."),p(),h(29,"td"),y(30,"Sobald er Start geklickt hat, schlie\xDFt sich dieses Fenster hier ;)"),p()()()(),h(31,"div",0),ee(32,"qrcode",2),p()(),h(33,"div",3)(34,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.cancelClicked())}),y(35,"Abbrechen"),p()()()}if(t&2){let n=w();g(8),Ke('Bitte "',n.artist().name,'", das er/sie sich Telegram auf dem Handy installiert.'),g(10),Ke('"',n.artist().name,'" danach diesen QR-Code scannen lassen.'),g(14),b("qrdata",n.qrCode())("width",300)}}var mX,j4e=Q(()=>{me();Gi();d2();yi();ji();Zi();il();me();d2();mX=(()=>{let e=class e extends bt{constructor(){super(),this.qrCode=gt(""),this.artist=gt(null),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogRef=Ve(Gt)}ngOnInit(){this.pushSocketSubscription=this.socketService.subscribeNew("eventArtistChanged",i=>O(this,null,function*(){this.artist().id===i.record.id&&i.record.telegramChatId&&this.dialogRef.close()}))}nxtOnDestroy(){}setArtist(i){return O(this,null,function*(){this.artist.set(yield this.socketService.getArtist(i)),this.artist()&&this.qrCode.set("https://t.me/nxtlvlink_bot?start="+btoa("Artist:"+this.artist().name))})}cancelClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-telegram-artist-start-chat"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","flex-col"],[1,"flex","flex-row"],["errorCorrectionLevel","M","colorDark","#FFF","colorLight","#2A2A2A",3,"qrdata","width"],[1,"flex","flex-row","justify-center"],[3,"click"]],template:function(r,s){r&1&&W(0,XZt,36,4,"div",0),r&2&&Je(s.artist()?0:-1)},dependencies:[c2,r3,Lt],styles:["table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:10px;vertical-align:baseline}"],changeDetection:0});let t=e;return t})()});var vUe,yUe=Q(()=>{me();yi();Ci();j4e();o1();me();vUe=(()=>{let e=class e{constructor(){this.socketService=Ve(lt),this.dialogService=Ve(vt),this.cacheService=Ve(cc),setTimeout(()=>this.init())}init(){return O(this,null,function*(){})}startArtistChat(i){return O(this,null,function*(){this.dialogService.showComponentDialog(mX).componentInstance.setArtist(i)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var fX,gX=Q(()=>{jo();me();od();fX=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i){return Qt.format2(i-Date.now())}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"fromNowText2",type:e,pure:!0,standalone:!0});let t=e;return t})()});function QZt(t,e){t&1&&(h(0,"div",5),y(1,"Verbunden"),p())}function JZt(t,e){t&1&&(h(0,"div",6),y(1,"Code eingeben"),p())}function eXt(t,e){if(t&1){let n=re();h(0,"div",6),y(1,"Code muss neu angefordert werden"),p(),h(2,"nxt-button",9),F("click",function(){V(n);let r=w(2);return B(r.getNewCodeClicked())}),y(3,"Neuen Code jetzt anfordern"),p()}t&2&&(g(2),b("smallButton",!0))}function tXt(t,e){t&1&&y(0," Code wird \xFCberpr\xFCft ")}function iXt(t,e){t&1&&y(0," Neuer Code wird angefordert ")}function nXt(t,e){if(t&1&&y(0),t&2){let n=w();Ke(" ",n.state," ")}}function rXt(t,e){if(t&1&&(h(0,"tr")(1,"td",4),y(2,"Letzter Check"),p(),h(3,"td"),y(4),Ce(5,"fromNowText2"),p()()),t&2){let n=w();g(4),ye(tt(5,1,n.loginAt))}}function sXt(t,e){if(t&1&&(h(0,"tr")(1,"td",4),y(2,"Letzter Download"),p(),h(3,"td"),y(4),Ce(5,"fromNowText2"),p()()),t&2){let n=w();g(4),ye(tt(5,1,n.lastDownloadAt))}}function oXt(t,e){if(t&1){let n=re();h(0,"div",10),y(1," Auf dem Foto-Handy erscheint nun ein Dialog, "),ee(2,"br"),y(3," diesen bitte best\xE4tigen und den angezeigten Code hier eingeben. "),p(),h(4,"nxt-input",11),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.code,r)||(s.code=r),B(r)}),p(),h(5,"nxt-button",8),F("click",function(){V(n);let r=w(2);return B(r.setCodeClicked())}),y(6),p()}if(t&2){let n=w(2);g(4),qe("value",n.code),g(2),Ke("",n.code()," Best\xE4tigen")}}function aXt(t,e){if(t&1){let n=re();h(0,"div",0)(1,"div",1)(2,"div",2),y(3,"Apple iCloud Foto Sync"),p(),h(4,"table",3)(5,"tr")(6,"td",4),y(7,"Apple ID"),p(),h(8,"td"),y(9),p()(),h(10,"tr")(11,"td",4),y(12,"Status"),p(),h(13,"td"),W(14,QZt,2,0,"div",5)(15,JZt,2,0,"div",6)(16,eXt,4,1)(17,tXt,1,0)(18,iXt,1,0)(19,nXt,1,1),p()(),W(20,rXt,6,3,"tr")(21,sXt,6,3,"tr"),p(),h(22,"div",7),W(23,oXt,7,2),h(24,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(25,"Schlie\xDFen"),p()()()()}if(t&2){let n=e;g(9),ye(n.appleId),g(5),Je(n.state==="connected"?14:n.state==="getCode"?15:n.state==="getCodeTimeout"?16:n.state==="codeChecking"?17:n.state==="codeRequesting"?18:19),g(6),Je(n.loginAt?20:-1),g(),Je(n.lastDownloadAt?21:-1),g(2),Je(n.state==="getCode"?23:-1)}}var NA,vX=Q(()=>{me();Gi();yi();go();Jr();Zi();gX();Ci();ji();me();NA=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.dialogService=Ve(vt),this.socketService=Ve(lt),this.dialogRef=Ve(Gt,{optional:!0}),this.state=gt(null),this.code=gt("")}ngOnInit(){this.pushSocketSubscription=this.socketService.subscribeNew("getIcloudState",i=>{this.state.set(i)},{emitAfterReconnect:!0,emitInitial:!0})}nxtOnDestroy(){}setCodeClicked(){return O(this,null,function*(){if(this.code.set(this.code().trim()),this.code().length!==6){this.dialogService.showOk(`Code muss 6-stellig sein
Deine Eingaben: "`+this.code()+'"');return}yield this.socketService.icloudAction("code",this.code()),this.code.set("")})}getNewCodeClicked(){this.socketService.icloudAction("startScript")}closeClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-icloud"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","flex-col"],[1,"flex","flex-col","items-center","justify-center"],[1,"mb-4","text-xl"],[1,"nxt-table-new"],[1,"text-right"],[1,"green"],[1,"red"],[1,"mt-4","flex","flex-col","items-center","justify-center","gap-4"],[3,"click"],[1,"mt-1",3,"click","smallButton"],[1,"flex","flex-col","justify-center","text-center"],["placeholder","Code",3,"valueChange","value"]],template:function(r,s){if(r&1&&W(0,aXt,26,5,"div",0),r&2){let o;Je((o=s.state())?0:-1,o)}},dependencies:[Yi,Lt,fX],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-color:#404040;color:#bbb}"],changeDetection:0});let t=e;return t})()});var T5,RA=Q(()=>{me();Ci();yi();jo();cUe();uX();$n();hX();pX();yUe();vX();me();T5=(()=>{let e=class e{constructor(){this.dialogService=Ve(vt),this.socketService=Ve(lt),this.stencilService=Ve(LA),this.artistConfirmService=Ve(OA),this.telegramArtistService=Ve(vUe),setTimeout(()=>this.init())}init(){return O(this,null,function*(){})}reminderClicked(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(lUe);r.componentInstance.setData(i),yield Sn(r.afterClosed())})}postponeReminder(i){return O(this,null,function*(){if(i.maxPostponesReached){yield this.dialogService.showOk("Du hast die Aufgabe bereits zu oft verschoben.",{title:"\u2757JETZT ERLEDIGEN\u2757"});return}if(i.postponeDurations.length===1)this.socketService.postponeReminder({reminderId:i.id,postponeDuration:i.postponeDurations[0]});else{let s=[{text:"Abbrechen",value:-1}];for(let a of i.postponeDurations)s.push({text:Qt.format(a,"",!0),value:a});let o=yield this.dialogService.showButtons("Um wie viel verschieben?",{buttons:s});o.value!==-1&&this.socketService.postponeReminder({reminderId:i.id,postponeDuration:o.value})}})}printArtistContract(i){return O(this,null,function*(){this.dialogService.showLoading("Artist-Vertrag wird erstellt...");let r=yield this.socketService.getArtistContract(i),s=yield this.socketService.getArtist(i);this.dialogService.hideLoading();let o=this.dialogService.showPdf(r,"Artist-Vertrag "+s.name+".pdf");yield Sn(o.afterClosed())})}setReminderDone(i,r){return this.socketService.setReminderDone(i,r)}startReminderAction(i,r){return O(this,null,function*(){switch(r){case"setDone":this.setReminderDone(i.id,!1);break;case"postpone":yield this.postponeReminder(i);break;case"openWhatsAppConnect":yield this.dialogService.showConnectWhatsApp();break;case"openIcloudConnect":let s=this.dialogService.showComponentDialog(NA);yield Sn(s.afterClosed());break;case"showArtistContract":yield this.printArtistContract(i.refId);break;case"showEvent":let o=this.dialogService.showEvent(i.refId);yield Sn(o.afterClosed());break;case"setStencilSeen":yield this.stencilService.showStencilSeenDialog(i.refId);break;case"requestStencilFromArtist":yield this.stencilService.showStencilRequestDialog(i.refId);break;case"artistConfirm":yield this.artistConfirmService.startArtistConfirmFromReminder(i);break;case"startArtistTelegramChat":yield this.telegramArtistService.startArtistChat(i.refId);break}})}showCreateReminder(i){let r=this.dialogService.showComponentDialog(FA);return r.componentInstance.newReminder(i),Sn(r.afterClosed())}showReminderBySubId(i){return O(this,null,function*(){let r=yield this.socketService.getReminderBySubId(i);r&&this.reminderClicked(r)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var yX,K4e=Q(()=>{me();yi();$n();jo();me();yX=(()=>{let e=class e{constructor(){this.socketService=Ve(lt),this.currentTattooTemplates=new qs([]),setTimeout(()=>this.init()),setInterval(()=>{this.currentTattooTemplates.next(this.currentTattooTemplates.value.filter(i=>i.createdAt>Date.now()-Qt.DURATION_1MINUTE*5))},5*Qt.DURATION_1MINUTE)}init(){return O(this,null,function*(){})}addTemplate(i){let r=this.currentTattooTemplates.getValue();r.push(i),this.currentTattooTemplates.next(r)}clear(i){this.currentTattooTemplates.next(this.currentTattooTemplates.value.filter(r=>r.eventId!==i))}deleteTattooTemplate(i){this.currentTattooTemplates.next(this.currentTattooTemplates.value.filter(r=>r!==i))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function fXt(t,e){if(t&1){let n=re();h(0,"div",15)(1,"div",17),y(2,"ist ungelesen"),p(),h(3,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.setReadClicked())}),y(4,"ALS GELESEN"),p()()}}function gXt(t,e){if(t&1){let n=re();h(0,"div",15)(1,"div"),y(2,"ist gelesen"),p(),h(3,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.setUnReadClicked())}),y(4,"ALS UNGELESEN"),p()()}}function vXt(t,e){if(t&1){let n=re();h(0,"div",15)(1,"div",17),y(2,"check ist an!!!"),p(),h(3,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.setCheckClicked(!1))}),y(4,"CHECK AUS"),p()()}}function yXt(t,e){if(t&1){let n=re();h(0,"div",15)(1,"div"),y(2,"check ist aus"),p(),h(3,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.setCheckClicked(!0))}),y(4,"CHECK AN"),p()()}}function _Xt(t,e){if(t&1&&(h(0,"div",28),y(1),Ce(2,"fromNowText"),p()),t&2){let n=w(2);g(),Ke("in ",Nt(2,1,n.pinnedChat.remindAgainAt,!0),"")}}function CXt(t,e){if(t&1){let n=re();h(0,"div",15)(1,"div",17),y(2,"ist fixiert"),p(),W(3,_Xt,3,4,"div",28),h(4,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.setPinnedClicked())}),y(5,"L\xD6SEN"),p()()}if(t&2){let n=w();g(3),Je(n.pinnedChat.remindAgainAt>0?3:-1)}}function xXt(t,e){if(t&1){let n=re();h(0,"div",15)(1,"div"),y(2,"ist nicht fixiert"),p(),h(3,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.setPinnedClicked())}),y(4,"FIX"),p()()}}function bXt(t,e){t&1&&(h(0,"div",17),y(1,"Ungelesen"),p())}function wXt(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",8),F("click",function(){V(n);let r=w();return B(r.close())}),y(1,"close"),p()}}function SXt(t,e){if(t&1&&(h(0,"div",30)(1,"div"),y(2),p(),h(3,"div"),y(4),Ce(5,"bodyPutText"),p(),h(6,"div"),y(7),p()()),t&2){let n=e.$implicit;g(2),ye(n.motive),g(2),ye(Nt(5,3,n.bodyPut,"de")),g(3),ye(n.size)}}function TXt(t,e){if(t&1&&(h(0,"div"),W(1,SXt,8,6,"div",29),p()),t&2){let n=w();g(),b("ngForOf",n.bodyPutsTattoo)}}function DXt(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",33),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.loadOtherMobile(r.m))}),y(2),Ce(3,"nxtDate"),p()()}if(t&2){let n=e.$implicit,i=w(2);g(),b("ngClass",sn(5,uXt,n.m===i.currentWhatAppId)),g(),Ke("",n.t===-1?"Aktuelle Nummer":"vor dem "+Nt(3,2,n.t,"dd.MM.yyyy")," ")}}function EXt(t,e){if(t&1&&(h(0,"div",31),W(1,DXt,4,7,"div",32),p()),t&2){let n=w();g(),b("ngForOf",n.contactMobiles)}}function MXt(t,e){if(t&1&&(h(0,"div",34)(1,"div"),y(2),p()()),t&2){let n=w();g(2),ye(n.message)}}function kXt(t,e){if(t&1&&(vs(0),y(1),ys()),t&2){let n=w(2).$implicit;g(),cn(" ",n.hoursToLastMessage," ",n.hoursToLastMessage===1?"Tag":"Tage"," ")}}function IXt(t,e){t&1&&(vs(0),y(1," Bitte warten... "),ys())}function AXt(t,e){if(t&1){let n=re();h(0,"div",53),F("dblclick",function(){V(n);let r=w().$implicit,s=w(2);return B(s.copyConversationAfter(r))}),ee(1,"div",54),h(2,"div",55),W(3,kXt,2,2,"ng-container",20)(4,IXt,2,0,"ng-container",20),p()()}if(t&2){let n=w().$implicit;g(3),b("ngIf",n.hoursToLastMessage!==-1),g(),b("ngIf",n.hoursToLastMessage===-1)}}function PXt(t,e){if(t&1){let n=re();h(0,"div",62)(1,"mat-icon",8),F("click",function(r){V(n);let s=w(2).$implicit,o=w(2);return B(o.setImageAsTemplateClicked(s,r))}),y(2,"photo_library"),p()()}}function RXt(t,e){if(t&1){let n=re();h(0,"div",56)(1,"div",57)(2,"div",58)(3,"nxt-checkbox",59),Xe("valueChange",function(r){V(n);let s=w().$implicit,o=w(2);return Ze(o.selectedMessages[s.id],r)||(o.selectedMessages[s.id]=r),B(r)}),p()(),h(4,"div",60)(5,"mat-icon",8),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.forwardToArtist(r))}),y(6,"shortcut"),p()(),W(7,PXt,3,0,"div",61),p()()}if(t&2){let n=w().$implicit,i=w(2);g(3),qe("value",i.selectedMessages[n.id]),g(4),b("ngIf",!!(i.imagesSrc[n.id]!=null&&i.imagesSrc[n.id].src))}}function FXt(t,e){if(t&1&&(h(0,"div",38),ee(1,"img",66),h(2,"div"),y(3),p()()),t&2){let n=w(2).$implicit;g(),b("src","data:"+n.quotedMsg.mimetype+";base64,"+n.quotedMsg.body,Ur),g(2),ye(n.quotedMsg.caption)}}function LXt(t,e){if(t&1&&(h(0,"div",67),ee(1,"div",68),Ce(2,"safeHtml"),p()),t&2){let n=w(2).$implicit;g(),b("innerHTML",tt(2,1,n.quotedMsg.body),Pi)}}function OXt(t,e){if(t&1&&(h(0,"div",38)(1,"div"),y(2),p()()),t&2){let n=w(2).$implicit;g(2),ye(n.quotedMsg.type)}}function NXt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"json"),p()),t&2){let n=w(2).$implicit;g(),ye(tt(2,1,n.quotedMsg))}}function VXt(t,e){if(t&1){let n=re();h(0,"div",63),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.jumpToMessage(r.quotedStanzaID))}),h(1,"div"),y(2),Ce(3,"nxtDate"),p(),W(4,FXt,4,2,"div",64)(5,LXt,3,3,"div",65)(6,OXt,3,1,"div",64)(7,NXt,3,3,"div",20),p()}if(t&2){let n=w().$implicit;g(2),ye(Nt(3,5,n.quotedMsg.timestamp,"dd.MM.yyyy")),g(2),b("ngIf",n.quotedMsg.type==="image"),g(),b("ngIf",n.quotedMsg.type==="chat"),g(),b("ngIf",n.quotedMsg.type!=="chat"&&n.quotedMsg.type!=="image"),g(),b("ngIf",!1)}}function BXt(t,e){t&1&&(h(0,"div",73),y(1," Bild wird geladen... "),p())}function zXt(t,e){if(t&1){let n=re();h(0,"div",73),y(1," Bild ist noch nicht verf\xFCgbar "),h(2,"nxt-button-icon",33),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.reloadImage(r))}),y(3,"refresh"),p()()}if(t&2){let n=w(2).$implicit,i=w(2);g(2),b("ngClass",sn(1,mXt,i.reloadRunning[n.id]))}}function HXt(t,e){if(t&1){let n=re();h(0,"div",74)(1,"img",75),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.showImage(r))}),p()()}if(t&2){let n=w(2).$implicit,i=w(2);b("fxLayout",n.fromMe?"row-reverse":"row"),g(),b("src",i.imagesSrc[n.id]==null?null:i.imagesSrc[n.id].src,Ur)}}function GXt(t,e){if(t&1&&(ee(0,"div",71),Ce(1,"safeHtml")),t&2){let n=w(2).$implicit;b("innerHTML",tt(1,1,n.body),Pi)}}function WXt(t,e){if(t&1){let n=re();h(0,"div",38),W(1,BXt,2,0,"div",69)(2,zXt,4,3,"div",69)(3,HXt,2,2,"div",70)(4,GXt,2,3,"div",71),h(5,"div",72),F("visible",function(){V(n);let r=w().$implicit,s=w(2);return B(s.preloadImage(r))}),p()()}if(t&2){let n=w().$implicit,i=w(2);g(),b("ngIf",!(i.imagesSrc[n.id]!=null&&i.imagesSrc[n.id].src)&&!(i.imagesSrc[n.id]!=null&&i.imagesSrc[n.id].notInDb)),g(),b("ngIf",i.imagesSrc[n.id]==null?null:i.imagesSrc[n.id].notInDb),g(),b("ngIf",!!(i.imagesSrc[n.id]!=null&&i.imagesSrc[n.id].src)),g(),Je(n.body?4:-1)}}function UXt(t,e){if(t&1&&(h(0,"div",47),y(1),ee(2,"br"),y(3,"kommt aber bald ;) "),p()),t&2){let n=w(2).$implicit;g(),Ke(' Die Nachricht vom Typ "',n.typeText,'" kann noch nicht angezeigt / abgespielt werden,')}}function jXt(t,e){if(t&1&&W(0,UXt,4,1,"div",76),t&2){let n=w().$implicit;b("ngIf",n.hasMedia&&n.type!=="image")}}function $Xt(t,e){if(t&1&&(ee(0,"div",48),Ce(1,"safeHtml")),t&2){let n=w().$implicit;b("innerHTML",tt(1,1,n.body),Pi)}}function KXt(t,e){t&1&&(h(0,"div",49),y(1,"hat eine Nachricht angepinnt"),p())}function YXt(t,e){if(t&1&&(h(0,"div",50),y(1),p()),t&2){let n=w().$implicit;g(),Ke("unbekannter Typ: ",n.type,"")}}function qXt(t,e){if(t&1&&(h(0,"div",77),y(1),p()),t&2){let n=w().$implicit;g(),Ke("(original: ",n.detectedSourceLangName,")")}}function ZXt(t,e){if(t&1){let n=re();h(0,"div",83)(1,"mat-icon",8),F("click",function(r){V(n);let s=w(2).$implicit,o=w(2);return B(o.setImageAsTemplateClicked(s,r))}),y(2,"photo_library"),p()()}}function XXt(t,e){if(t&1){let n=re();h(0,"div",78)(1,"div",57)(2,"div",58)(3,"nxt-checkbox",79),Xe("valueChange",function(r){V(n);let s=w().$implicit,o=w(2);return Ze(o.selectedMessages[s.id],r)||(o.selectedMessages[s.id]=r),B(r)}),p()(),h(4,"div",80)(5,"mat-icon",81),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.forwardToArtist(r))}),y(6,"shortcut"),p()(),W(7,ZXt,3,0,"div",82),p()()}if(t&2){let n=w().$implicit,i=w(2);g(3),qe("value",i.selectedMessages[n.id]),g(4),b("ngIf",!!(i.imagesSrc[n.id]!=null&&i.imagesSrc[n.id].src))}}function QXt(t,e){if(t&1){let n=re();h(0,"div",38),W(1,AXt,5,2,"div",39),h(2,"div",40),W(3,RXt,8,2,"div",41),h(4,"nxt-context-menu",null,1)(6,"button",42),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.translateMessage(r))}),h(7,"mat-icon"),y(8,"translate"),p(),h(9,"span"),y(10,"\xDCbersetzen"),p()(),h(11,"button",42),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.showMessageId(r))}),h(12,"mat-icon"),y(13,"content_copy"),p(),h(14,"span"),y(15,"Message ID"),p()()(),h(16,"div",43),F("contextmenu",function(r){V(n);let s=pr(5);return B(s.show(r))}),W(17,VXt,8,8,"div",44),ee(18,"div",45),Ce(19,"safeHtml"),h(20,"div",46),W(21,WXt,6,4,"div",38)(22,jXt,1,1,"div",47)(23,$Xt,2,3,"div",48)(24,KXt,2,0,"div",49)(25,YXt,2,1,"div",50),p(),W(26,qXt,2,1,"div",51),p(),W(27,XXt,8,2,"div",52),p()()}if(t&2){let n=e.$implicit,i=w(2);g(),b("ngIf",n.hoursToLastMessage!==0),g(2),b("ngIf",n.fromMe),g(13),b("ngClass",Qm(11,pXt,!n.fromMe,n.fromMe,i.selectedMessages[n.id]))("id","message-"+n.id),g(),b("ngIf",n.quotedStanzaID),g(),b("innerHtml",tt(19,9,n.dateHtml),Pi),g(3),Je(n.hasMedia&&n.type==="image"?21:n.hasMedia&&n.type!=="image"?22:n.body?23:n.type==="pinned_message"?24:25),g(5),b("ngIf",n.detectedSourceLangName),g(),b("ngIf",!n.fromMe)}}function JXt(t,e){if(t&1){let n=re();h(0,"div",35)(1,"div",36),F("scrolledUp",function(){V(n);let r=w();return B(r.scrolledUp())}),W(2,QXt,28,15,"div",37),p()()}if(t&2){let n=w();b("ngStyle",sn(5,hXt,n.visibility)),g(),b("infiniteScrollDistance",2)("infiniteScrollThrottle",50)("scrollWindow",!1),g(),b("ngForOf",n.messagesVisible)}}var lXt,cXt,dXt,uXt,hXt,pXt,mXt,h3,I7=Q(()=>{me();zn();Ci();jo();I4e();Gi();Ov();Yc();GWe();MB();Ld();$n();lD();mZ();UWe();My();P4e();A4e();ha();qn();$We();sg();il();mg();V4e();Zi();Jr();Mp();ls();oo();An();ri();Vt();go();sX();Ja();fx();o2();oX();B1();me();ji();yi();Ci();rUe();H4e();w4();ma();jl();ug();ag();Kr();cX();Cs();RA();K4e();Vt();An();V4e();qn();lXt=["textareaTextInput"],cXt=["textareaAutoSize"],dXt=t=>({"nxt-page":!0,wrap2per:!0,"new-style":t}),uXt=t=>({"mobile-button-active":t}),hXt=t=>({visibility:t}),pXt=(t,e,n)=>({message:!0,"message-in":t,"message-out":e,"message-selected":n}),mXt=t=>({rotate:t});h3=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d,u,m,f,_,x,D,E){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.whatsAppChatService=o,this.whatsappDialogService=a,this.clipboardService=l,this.activatedRoute=c,this.permissionService=d,this.clipboard=u,this.storageService=m,this.loginService=f,this.paypalCheckoutService=_,this.configService=x,this.reminderService=D,this.tattooTemplateService=E,this.eventId="",this.contactMobiles=[],this.isUnread=gt(!1),this.onAddTemplateImage=new nt,this.imagesSrc={},this.messages=[],this.messagesFiltered=[],this.messagesVisible=[],this.title="",this.newStyle=!1,this.currentWhatAppId="",this.selectedMessages={},this.reloadRunning={},this.textToSend="",this.message="",this.scrollDownForce=!1,this.visibility="hidden",this.array=[],this.sum=100,this.throttle=300,this.direction="",this.currentMessageIndex=-1,this.toAddCount=20,this.imageReloadCounter={},this.filterText="",this.onlyFromCustomer=!1;let M=this.storageService.get("WhatsAppChatStyle","");this.newStyle=M==="WhatsApp",this.loadArtists()}ngOnInit(){this.subscribeOnNewEvent(),this.activatedRoute.snapshot.paramMap.get("id")&&this.loadChat(this.activatedRoute.snapshot.paramMap.get("id"))}nxtOnDestroy(){clearInterval(this.interval),this.whatsAppChatService.clearCache()}loadChat(i,r){return O(this,null,function*(){let s=i="+"+a1.parseWhatsAppId(i,!1);this.currentWhatAppId=a1.parseWhatsAppId(i,!0),i||(this.dialogService.showOk("Es ist keine Handynummer hinterlegt"),this.dialogRef.close()),this.message="Chat wird geladen";let o="WhatsApp Chat";this.checkUnread();let a=yield this.socketService.getWhatsAppChat(s,o);if(!r){let l=yield this.socketService.getContactsByMobile(s);l.length===1&&(r=l[0].id)}if(r){if(this.contactMobiles=[],this.contact=yield this.socketService.getContactById(r),this.contact||(Gn.error(`WhatsAppChat kann nicht geladen werden, Kontakt nicht gefunden
contactId: `+r),this.dialogRef.close()),i&&(this.title=this.contact.fullName+" ("+Kc.formatHuman("+"+a1.parseWhatsAppId(i,!1))+")"),this.contact.oldMobilesFormatted)for(let l of this.contact.oldMobilesFormatted)this.contactMobiles.push({m:a1.parseWhatsAppId(l.m,!0),t:l.t});this.contactMobiles.push({m:a1.parseWhatsAppId(this.contact.mobileFormatted,!0),t:-1})}else this.title=a.chat.name;if(this.chat=a.chat,this.pinnedChat=a.pinnedChat,this.message=a.messages.length>0?"":"Es gibt kein Chat f\xFCr "+this.title,a.messages.length!==this.messages.length){this.messages=a.messages;for(let[l,c]of this.messages.entries())l>0?this.prepareMessage(c,this.messages[l-1].timestamp):this.prepareMessage(c,0);this.setMessagesFiltered(),this.prependMessages(),this.scrollToEnd("auto")}else this.messages.length>0&&(this.visibility="")})}close(){this.dialogRef?.close(),this.prependMessages()}showImage(i){return O(this,null,function*(){let r=yield this.whatsAppChatService.getImage(i.mediaKey);this.dialogService.showImageViewer(["data:"+r.mimetype+";base64,"+r.data])})}preloadImage(i){return O(this,null,function*(){if(!this.imagesSrc[i.id]||this.imagesSrc[i.id].notInDb){let r=yield this.whatsAppChatService.getImage(i.mediaKey);this.imageReloadCounter[i.id]||(this.imageReloadCounter[i.id]=0),r?(r.src=this.getImageSrc(r),this.imagesSrc[i.id]=r):this.imageReloadCounter[i.id]<10&&Ie.dateDiffToNow(i.timestamp)<Qt.DURATION_1MINUTE*3?setTimeout(()=>{this.imageReloadCounter[i.id]++,this.preloadImage(i)},500):this.imagesSrc[i.id]={id:i.id,width:0,height:0,notInDb:!0}}})}getImageSrc(i){return i.data?"data:"+i.mimetype+";base64,"+i.data:""}reloadImage(i){return O(this,null,function*(){try{this.reloadRunning[i.id]=!0,yield this.socketService.reloadWhatsAppImage(i.id),this.preloadImage(i)}catch(r){this.dialogService.showOk(`Fehler beim Laden des Bildes
`+r.message)}finally{this.reloadRunning[i.id]=!1}})}forwardToArtist(i){return O(this,null,function*(){let r,s=[i.id];Object.keys(this.selectedMessages).length>0&&(s.push(...Object.keys(this.selectedMessages).map(E=>E)),s=wc.unique(s));let o=this.messages.filter(E=>s.includes(E.id)),a=[],l=[];for(let E of o)E.hasMedia&&E.type==="image"?(a.push(E),E.body&&l.push(E.originalBody)):E.hasMedia||E.body&&l.push(E.originalBody);let c=this.artists.map(E=>({text:E.name,value:E})).sort(Hr.sortString("text")),d=this.currentArtist?c.find(E=>E.text===this.currentArtist?.name)?.value:null;c=[{text:"Alle Artist aktuell im Studio",value:{name:"Alle Artist aktuell im Studio",id:"all-available",mobile:"all-available"}},...c];let u=yield this.dialogService.showSelect("",c,{placeholder:"Artist ausw\xE4hlen",value:d,title:"An einen Artist weiterleiten"});if(u&&(r=u),!r)return;let m=`Beschreibe das Design

Was soll anders als das Bild

Wie gro\xDF soll es werden?

Sonstige Infos!`;this.skills&&this.skills.includes("Lettering")&&(m+=`<br/><br/><div class="uppercase bold red">ACHTUNG!
Es handelt sich um ein Schriftzug,<br/>leite dem Artist 1 zu 1 den geschriebenen Text vom Kunden weiter!

Fordere den Text vom Kunden an, wenn er nicht hier im Chat ist!</div>`);let f=this.configService.config.value.invoiceData.fromCity;if(r.id==="all-available")l=["This message goes to all artists who are currently at NXT-LVL.INK "+f+`.

`,...l];else{let E=yield this.socketService.checkArtistTelegramChat(r.id);if(E){yield this.dialogService.showOk(E),this.dialogRef?.close(),this.reminderService.showReminderBySubId("ArtistTelegramChat_"+r.name);return}}let _=this.dialogService.showComponentDialog(WWe),x=r?.lang||"en";_.componentInstance.setOptions({message:m,prompt:l.join(`
`),bodyPutsTattoo:this.bodyPutsTattoo,skills:this.skills,artistLang:x});let D=yield Sn(_.afterClosed());if(!(typeof D>"u")){this.dialogService.showLoading(_n.WhatsAppImageForwardToArtist,"Nachricht(en) werden an "+r.name+" weitergeleitet");try{for(let[E,M]of a.entries()){this.dialogService.updateLoadingText("Bild "+(E+1)+" von "+a.length+" wird an "+r.name+" gesendet");let I;if(r.id==="all-available"?I=yield this.socketService.forwardWhatsAppMessageToAllAvailableArtist(M.id,!0):I=yield this.socketService.forwardWhatsAppMessageToArtist(M.id,r.id,!0),!I.success){yield this.dialogService.showOk(I.error),this.dialogService.hideLoading(_n.WhatsAppImageForwardToArtist);return}}D&&(this.dialogService.updateLoadingText("Text wird  an "+r.name+" gesendet"),r.id==="all-available"?yield this.socketService.sendWhatsAppMessageToAllArtists(D):yield this.socketService.sendWhatsAppMessageToArtist(r.id,D))}catch(E){yield this.dialogService.showOk(`Fehler beim Senden der Nachricht an den Artist
`+E.message),this.dialogService.hideLoading(_n.WhatsAppImageForwardToArtist);return}this.selectedMessages={},this.dialogService.hideLoading(_n.WhatsAppImageForwardToArtist)}})}subscribeOnNewEvent(){this.pushSocketSubscription=this.socketService.subscribeNew("eventWhatsAppChatChanged",i=>{this.chat?.id===i?.record?.id&&(this.chat=i.record,this.isUnread.set(this.chat.unreadCount!==0),console.log(this.chat.unreadCount))}),this.pushSocketSubscription=this.socketService.subscribeNew("eventWhatsAppChatPinnedChanged",i=>{this.currentWhatAppId===a1.toWhatsAppId(i.record.id)&&(this.pinnedChat=i.record)}),this.pushSocketSubscription=this.socketService.subscribeNew("eventNewWhatsappMessage",i=>{(i.from===this.currentWhatAppId||i.to===this.currentWhatAppId)&&(this.messages.length>0?this.prepareMessage(i,this.messages[this.messages.length-1].timestamp):this.prepareMessage(i,0),this.messages.push(i),this.setMessagesFiltered(),this.messagesVisible.push(i),this.scrollToEndIfOnEnd())},{emitInitial:!0})}loadArtists(){return O(this,null,function*(){this.artists=yield this.socketService.getArtists()})}copyToClipboard(i){this.clipboardService.copyToClipboard(i)}send(){this.textToSend.trim()&&(this.currentWhatAppId?this.socketService.sendWhatsAppMessage(this.currentWhatAppId,this.textToSend.trimChar(`
`)):this.socketService.sendWhatsAppMessage(this.activatedRoute.snapshot.paramMap.get("id"),this.textToSend),this.textToSend="",requestAnimationFrame(()=>this.textareaAutoSize.resize()),this.scrollDownForce=!0,setTimeout(()=>{this.scrollDownForce=!1},1e3))}textAreaKeyUp(i){i.key==="Enter"&&!i.shiftKey&&(i.stopPropagation(),i.preventDefault(),this.send())}textAreaKeyDown(i){i.key==="Enter"&&!i.shiftKey&&(i.stopPropagation(),i.preventDefault())}prepareMessage(i,r){if(i.originalBody=i.body,i.body=i.body.replace(/\*(.*)\*/g,"<strong>$1</strong>"),i.body=i.body.replace(/\n/g,"<br/>"),i.body=AA.linkify(i.body,"_blank"),Ie.formatNowDate()===i.timestamp.dateFormat("yyyy-MM-dd"))i.dateHtml="Heute vor "+Qt.format2(Date.now()-i.timestamp,{withoutSeconds:!0})+" um "+Ie.format(i.timestamp,"HH:mm");else{let s=Ie.dayDiff(Date.now(),i.timestamp);s===1?i.dateHtml=" Gestern "+Ie.format(i.timestamp,"EEE dd.MM HH:mm"):i.timestamp.dateFormat("yyyy")!==Date.now().dateFormat("yyyy")?i.dateHtml=" vor "+s+" Tagen "+Ie.format(i.timestamp,"EEE dd.MM.yyyy HH:mm"):i.dateHtml=" vor "+s+" Tagen "+Ie.format(i.timestamp,"EEE dd.MM HH:mm")}i.fromMe&&i.nxtUsername&&(i.dateHtml+=" - "+i.nxtUsername),r===0?i.hoursToLastMessage=0:i.hoursToLastMessage=Ie.dayDiff(i.timestamp,r)}scrollToEndIfOnEnd(i=0){let r=document.querySelector(".scrollDiv");r?(this.scrollDownForce||Math.abs(r.scrollHeight-(r.scrollTop+r.clientHeight))<3)&&this.scrollToEnd("smooth"):i<20&&requestAnimationFrame(()=>{this.scrollToEndIfOnEnd(i+1)})}scrollToEnd(i){requestAnimationFrame(()=>{document.querySelector(".scrollDiv")?.scrollTo({top:document.querySelector(".scrollDiv").scrollHeight,behavior:i}),requestAnimationFrame(()=>{document.querySelector(".scrollDiv")?.scrollTo({top:document.querySelector(".scrollDiv").scrollHeight,behavior:i}),requestAnimationFrame(()=>{document.querySelector(".scrollDiv")?.scrollTo({top:document.querySelector(".scrollDiv").scrollHeight,behavior:i}),this.visibility=""})})})}scrolledUp(){this.prependMessages(),setTimeout(()=>{let i=document.querySelector(".scrollDiv");i&&i.scrollTop},400)}loadTillMessageId(i){if(!this.messagesVisible.find(r=>r.id===i)){let r=this.messagesVisible.length;Gn.info("loadTillMessageId prependMessages because not found"),this.prependMessages();let s=this.messagesVisible.length;if(s>r)return Gn.info("loadTillMessageId lengthBefore: "+r+"  lengthAfter"+s),this.loadTillMessageId(i)}}prependMessages(){this.currentMessageIndex===-1&&(this.currentMessageIndex=this.messagesFiltered.length);let i=this.currentMessageIndex-this.toAddCount;i<0&&(i=0);let r=this.currentMessageIndex;if(r>0){let s=document.querySelector(".scrollDiv");s.scrollTop===0&&s.scrollTo({top:1});let o=this.messagesFiltered.slice(i,r);Gn.debug("to: "+r+"   | add "+o.length),this.messagesVisible.splice(0,0,...o),this.currentMessageIndex-=this.toAddCount,this.currentMessageIndex<0&&(this.currentMessageIndex=0)}}showMessageId(i){return O(this,null,function*(){this.socketService.setWhatsAppMessageIdAsBroadcast(i.id),yield this.dialogService.showOk(i.id,{buttonText:"Ab in die Zwischenablage"}),this.clipboard.copy(i.id)})}safeStyle(){this.storageService.set("WhatsAppChatStyle",this.newStyle?"WhatsApp":"NXT")}sendToNiklas(){return O(this,null,function*(){let i=yield this.dialogService.showInput({title:"Info dazu",message:"Schreib eine Info dazu"});i&&this.socketService.sendWhatsAppMessage("+4915120123232","Von: "+this.loginService.getUsername()+`
`+i+`
`+pg.getLinkForChat(this.currentWhatAppId))})}filterTextChanged(){this.messagesVisible=[],this.messages.length!==0&&(this.setMessagesFiltered(),this.filterText&&this.filterText.length>0||this.onlyFromCustomer?(this.messagesVisible=[],this.currentMessageIndex=-1,this.prependMessages()):(this.currentMessageIndex=-1,this.prependMessages()))}setMessagesFiltered(){if(this.filterText){let i=this.filterText.split(" ");this.messagesFiltered=this.messages.filter(r=>r.body.toLowerCase().includes(this.filterText.toLowerCase()))}else this.messagesFiltered=this.messages;this.onlyFromCustomer&&(this.messagesFiltered=this.messagesFiltered.filter(i=>!i.fromMe))}addToSendImages(i){return O(this,null,function*(){if(yield this.dialogService.showYesNo("Bild als Whats-App-Vorlage speichern?")){let r={type:o3.WhatsAppImageSend,disabled:!1,name:"Vorlage",base64:this.imagesSrc[i.id]?.src,whatsAppMediaKey:i.mediaKey,whatsAppMessageId:i.id};this.socketService.upsertDynamicDataBatch([r])}})}copyUrl(){this.clipboard.copy(window.origin+"/chat/"+a1.parseWhatsAppId(this.currentWhatAppId))}paypal(){return O(this,null,function*(){yield this.paypalCheckoutService.showCreatePaypalPayment({value:null,name:this.chat.name.split(",")[0],mobile:a1.toMobile(this.chat.id),contactId:null,infoInternal:this.chat.name})})}jumpToMessage(i){if(this.messages.find(s=>s.id===i)){let s=document.querySelector("#message-"+i);s?s.scrollIntoView({behavior:"auto",block:"center",inline:"center"}):(this.loadTillMessageId(i),requestAnimationFrame(()=>{s=document.querySelector("#message-"+i),s.scrollIntoView({behavior:"auto",block:"center",inline:"center"})})),setTimeout(()=>this.highlightMessage(i),500)}else this.dialogService.showOk("Nachricht nicht gefunden :(")}highlightMessage(i){let r=document.querySelector("#message-"+i);r&&(r.classList.add("animate__animated"),r.classList.add("animate__tada"),setTimeout(()=>{r.classList.remove("animate__animated"),r.classList.remove("animate__tada")},2500))}copyConversationAfter(i){return O(this,null,function*(){let r=i.hoursToLastMessage;i.hoursToLastMessage=-1;let s=[],o=!1;this.messages.forEach(d=>{d.id===i.id&&(o=!0),o&&d.body&&(d.fromMe?s.push("Verk\xE4ufer: "+d.body):s.push("Kunde: "+d.body))});let a=s.join(`

`);this.clipboard.copy(a);let l=`Fasse die folgende Konversation stichwortartig in 60 w\xF6rtern zusammen: (setze Zeilenumbr\xFCche)

###

`+a+`
###
`,c=yield this.socketService.openAiQuestion(l);this.dialogService.showOk(c),i.hoursToLastMessage=r})}onlyFromCustomerChanged(){this.filterTextChanged()}loadOtherMobile(i){this.messages=[],this.messagesFiltered=[],this.messagesVisible=[],this.currentWhatAppId="",this.message="",this.currentMessageIndex=-1,this.toAddCount=20,this.title="",this.loadChat(i,this.contact.id)}sendArtistGallery(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(iX),r=yield Sn(i.afterClosed());r&&(this.textToSend=r+": https://artists.nxt-lvl.ink/#/artists/"+encodeURIComponent(r),this.textareaAutoSize.elementRef.nativeElement.focus(),this.textareaAutoSize.elementRef.nativeElement.setSelectionRange(this.textToSend.length,this.textToSend.length),this.send())})}bankClicked(){this.textToSend="Unsere Bankverbindung:",this.textToSend+=`
Name: NXT-LVL.INK`,this.textToSend+=`
Bank: `+this.configService.config.value.depositBankName,this.textToSend+=`
IBAN: `+this.configService.config.value.depositBankIban.replaceAll(" ",""),requestAnimationFrame(()=>{this.textareaAutoSize.resize()})}sendLocation(){this.textToSend="location",this.send()}translateMessage(i){return O(this,null,function*(){let r=yield this.socketService.translate(i.body,"de");i.body=r.text,i.detectedSourceLangName=r.detectedSourceLangName})}setReadClicked(){return O(this,null,function*(){yield this.socketService.setWhatsAppChatRead(this.currentWhatAppId),this.isUnread.set(!1),yield za.sleep(500),this.checkUnread()})}setUnReadClicked(){return O(this,null,function*(){yield this.socketService.setWhatsAppChatUnRead(this.currentWhatAppId),this.isUnread.set(!0),yield za.sleep(500),this.checkUnread()})}checkUnread(){this.socketService.getWhatsAppChatFromClient(this.currentWhatAppId).then(i=>{i&&this.isUnread.set(i.unreadCount!==0)})}setImageAsTemplateClicked(i,r){this.tattooTemplateService.addTemplate({mobile:a1.toMobile(this.currentWhatAppId),src:this.imagesSrc[i.id]?.src,datetime:i.timestamp,eventId:this.eventId,messageId:i.id,width:this.imagesSrc[i.id]?.width,height:this.imagesSrc[i.id]?.height,createdAt:Date.now()}),r.target.style.display="none"}reloadChatClicked(){return O(this,null,function*(){let i=yield this.socketService.readOldChatsShort(a1.toMobile(this.currentWhatAppId));i>0?(this.dialogService.showOk("Es wurden "+i+" neue Nachrichten eingelesen"),this.loadChat(this.currentWhatAppId)):this.dialogService.showOk("Keine neuen Nachrichten gefunden")})}setCheckClicked(i){this.chat.doRecheck=i,this.socketService.setChatRecheck(this.chat.id,i)}setPinnedClicked(){let i=a1.toMobile(this.currentWhatAppId,!1);this.whatsappDialogService.setChatPinnedState({action:this.pinnedChat?.pinned?"update":"pin",name:this.title,mobileWithoutPlus:i,openPayPalCheckout:!1})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt),R(nUe),R(lX),R(ep),R(gs),R(ws),R(_u),R(vu),R(Fi),R(PA),R(Xi),R(T5),R(yX))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-chat"]],viewQuery:function(r,s){if(r&1&&(ei(lXt,5),ei(cXt,5)),r&2){let o;Pt(o=Rt())&&(s.textarea=o.first),Pt(o=Rt())&&(s.textareaAutoSize=o.first)}},standalone:!0,features:[et,xe],decls:48,vars:18,consts:[["textareaTextInput","","textareaAutoSize","TextareaAutoSizeDirective"],["messageContextMenu",""],[1,"w-full","h-100","background-color"],[1,"w-full","h-100","background-image"],["fxLayout","column","fxLayoutAlign","center",2,"z-index","2",3,"ngClass"],[1,"flex","flex-col","items-center","justify-center","gap-3","p-3","p-relative","md:flex-row"],["fxHide.lt-sm","",3,"valueChange","value"],[1,"ml-4","flex","flex-row","items-center","gap-5"],[3,"click"],["matTooltip","PayPal-Zahlung anfordner",3,"click"],["matTooltip","Bank-Zahlung anfordner",3,"click"],["matTooltip","Artist-Galerie senden",3,"click"],["matTooltip","Standort senden",3,"click"],["matTooltip","Chat neu einlesen",3,"click"],[1,"flex","flex-row","gap-4"],[1,"flex","flex-col","items-center"],[1,"flex","flex-grow","flex-col","items-center","justify-center"],[1,"red"],["fxLayout","row","fxLayoutGap","30px"],["placeholder","Suche",1,"ml-3",3,"valueChange","clearIcon","value"],[4,"ngIf"],["class","flex justify-center pb-2 row w-fill",4,"ngIf"],["class","w-full text-120","fxLayout","row","fxLayoutAlign","center center","style","height: 200px;",4,"ngIf"],["fxFlex","","class","h-100 o-hidden",3,"ngStyle",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center",1,"text-input-bar"],["fxFlex","80%","fxLayout","row"],["nxtTextareaAutoSize","",2,"color","#fff","background-color","#464646","overflow","hidden","border-radius","4px","font-size","130%","width","100%","resize","none","padding","10px","font-family","'Open Sans', sans-serif",3,"keyup","keydown","ngModelChange","ngModel"],[1,"pl-3"],[1,"pb-1","text-[80%]","red"],["fxLayout","row","class","w-full text-120","fxLayoutGap","10px","fxLayoutAlign","center",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutGap","10px","fxLayoutAlign","center",1,"w-full","text-120"],[1,"flex","justify-center","pb-2","row","w-fill"],[4,"ngFor","ngForOf"],[3,"click","ngClass"],["fxLayout","row","fxLayoutAlign","center center",1,"w-full","text-120",2,"height","200px"],["fxFlex","",1,"h-100","o-hidden",3,"ngStyle"],["infiniteScroll","","fxFlex","",1,"w-full","p-3","scrollDiv","h-100",2,"overflow","auto",3,"scrolledUp","infiniteScrollDistance","infiniteScrollThrottle","scrollWindow"],["fxLayout","column",4,"ngFor","ngForOf"],["fxLayout","column"],["fxLayoutAlign","center center","class","day-divider",3,"dblclick",4,"ngIf"],["fxLayout","row"],["fxFlex","","fxLayout","row","fxLayoutAlign","end center",4,"ngIf"],["mat-menu-item","",3,"click"],[3,"contextmenu","ngClass","id"],["class","response-message mouse-pointer",3,"click",4,"ngIf"],[1,"date",3,"innerHtml"],["fxLayout","column",1,"can-select"],["fxLayout","column",1,"red"],[1,"text","word-break",3,"innerHTML"],[1,"text-[75%]"],[1,"text","word-break"],["class","text-70",4,"ngIf"],["fxFlex","","fxLayout","row","fxLayoutAlign","start center",4,"ngIf"],["fxLayoutAlign","center center",1,"day-divider",3,"dblclick"],[1,"line"],["fxLayoutAlign","center",1,"middle"],["fxFlex","","fxLayout","row","fxLayoutAlign","end center"],[1,"button-box"],[1,"checkbox-wrapper"],["matTooltip","Ausw\xE4hlen","matTooltipPosition","left",3,"valueChange","value"],["matTooltip","Weiterleiten","matTooltipPosition","left",1,"icon-wrapper","mouse-pointer"],["class","icon-wrapper mouse-pointer","matTooltip","Tattoo-Vorlage","matTooltipPosition","left",4,"ngIf"],["matTooltip","Tattoo-Vorlage","matTooltipPosition","left",1,"icon-wrapper","mouse-pointer"],[1,"response-message","mouse-pointer",3,"click"],["fxLayout","column",4,"ngIf"],["class","p-4","fxLayout","column",4,"ngIf"],[2,"width","fit-content",3,"src"],["fxLayout","column",1,"p-4"],[3,"innerHTML"],["fxLayoutAlign","center center","class","chat-image-placeholder",4,"ngIf"],["fxFlex","","class","image-box","fxLayoutAlign","start center",3,"fxLayout",4,"ngIf"],[1,"mt-1","text","word-break",3,"innerHTML"],["nxtObserveVisibility","",2,"height","2px",3,"visible"],["fxLayoutAlign","center center",1,"chat-image-placeholder"],["fxFlex","","fxLayoutAlign","start center",1,"image-box",3,"fxLayout"],[1,"chat-image","mouse-pointer",3,"click","src"],["class","red","fxLayout","column",4,"ngIf"],[1,"text-70"],["fxFlex","","fxLayout","row","fxLayoutAlign","start center"],["matTooltip","Ausw\xE4hlen","matTooltipPosition","right",3,"valueChange","value"],[1,"icon-wrapper","mouse-pointer"],["matTooltip","Weiterleiten","matTooltipPosition","right",3,"click"],["class","icon-wrapper mouse-pointer","matTooltip","Tattoo-Vorlage","matTooltipPosition","right",4,"ngIf"],["matTooltip","Tattoo-Vorlage","matTooltipPosition","right",1,"icon-wrapper","mouse-pointer"]],template:function(r,s){if(r&1){let o=re();ee(0,"div",2)(1,"div",3),h(2,"div",4)(3,"div",5)(4,"nxt-slide-toggle",6),Xe("valueChange",function(l){return V(o),Ze(s.newStyle,l)||(s.newStyle=l),B(l)}),F("valueChange",function(){return V(o),B(s.safeStyle())}),y(5,"Whats-App-Style"),p(),h(6,"nxt-slide-toggle",6),Xe("valueChange",function(l){return V(o),Ze(s.onlyFromCustomer,l)||(s.onlyFromCustomer=l),B(l)}),F("valueChange",function(){return V(o),B(s.onlyFromCustomerChanged())}),y(7,"Nur vom Kunden"),p(),h(8,"div",7)(9,"nxt-button-icon",8),F("click",function(){return V(o),B(s.copyUrl())}),y(10,"content_copy"),p(),h(11,"nxt-button-icon",9),F("click",function(){return V(o),B(s.paypal())}),y(12,"paid"),p(),h(13,"nxt-button-icon",10),F("click",function(){return V(o),B(s.bankClicked())}),y(14,"account_balance"),p(),h(15,"nxt-button-icon",11),F("click",function(){return V(o),B(s.sendArtistGallery())}),y(16,"photo_library"),p(),h(17,"nxt-button-icon",12),F("click",function(){return V(o),B(s.sendLocation())}),y(18,"location_on"),p(),h(19,"nxt-button-icon",13),F("click",function(){return V(o),B(s.reloadChatClicked())}),y(20,"refresh"),p()(),h(21,"div",14),W(22,fXt,5,0,"div",15)(23,gXt,5,0,"div",15)(24,vXt,5,0,"div",15)(25,yXt,5,0,"div",15)(26,CXt,6,1,"div",15)(27,xXt,5,0,"div",15),p(),h(28,"div",16)(29,"div"),y(30),p(),W(31,bXt,2,0,"div",17),p(),h(32,"div",18)(33,"nxt-input",19),Xe("valueChange",function(l){return V(o),Ze(s.filterText,l)||(s.filterText=l),B(l)}),F("valueChange",function(){return V(o),B(s.filterTextChanged())}),p(),W(34,wXt,2,0,"nxt-button-icon"),p()(),W(35,TXt,2,1,"div",20)(36,EXt,2,1,"div",21)(37,MXt,3,1,"div",22)(38,JXt,3,7,"div",23),h(39,"div",24)(40,"div",25)(41,"textarea",26,0),F("keyup",function(l){return V(o),B(s.textAreaKeyUp(l))})("keydown",function(l){return V(o),B(s.textAreaKeyDown(l))}),Xe("ngModelChange",function(l){return V(o),Ze(s.textToSend,l)||(s.textToSend=l),B(l)}),y(44,"      "),p()(),h(45,"div",27)(46,"nxt-button-icon",8),F("click",function(){return V(o),B(s.send())}),y(47,"send"),p()()()()}r&2&&(g(2),b("ngClass",sn(16,dXt,s.newStyle)),g(2),qe("value",s.newStyle),g(2),qe("value",s.onlyFromCustomer),g(16),Je(s.isUnread()?22:23),g(2),Je(s.chat!=null&&s.chat.doRecheck?24:25),g(2),Je(s.pinnedChat!=null&&s.pinnedChat.pinned?26:27),g(4),ye(s.title),g(),Je(s.isUnread?31:-1),g(2),b("clearIcon",!0),qe("value",s.filterText),g(),Je(s.dialogRef?34:-1),g(),b("ngIf",s.bodyPutsTattoo),g(),b("ngIf",s.contact&&s.contactMobiles&&s.contactMobiles.length>1),g(),b("ngIf",s.message),g(),b("ngIf",s.messages),g(3),qe("ngModel",s.textToSend))},dependencies:[At,Yt,$r,oi,qi,_s,Dn,Dv,No,rs,Nn,an,dl,Yi,Ct,Hi,Lt,rr,QWe,XWe,H1,jWe,ko,mu,Ko,Dp,HWe,nk,Or,tX,Hn,rX,Zr,_g,ld],styles:["[_nghost-%COMP%]{position:relative}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{background-color:#404040}[_nghost-%COMP%]     .mobile-button-active button{color:#fff!important;border:2px solid #fff}.date[_ngcontent-%COMP%]{font-size:small;color:#999;padding-bottom:4px}.message-out[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{text-align:right}.message-selected[_ngcontent-%COMP%]{background-color:#585858}.a-link[_ngcontent-%COMP%]{background-color:#00f}.message[_ngcontent-%COMP%]{box-shadow:0 0 2px #aaa;margin:5px 0;padding:8px 12px;border-radius:5px;background-color:#404040;color:#c9c9c9;max-width:60vw}.message[_ngcontent-%COMP%]     a:link, .message[_ngcontent-%COMP%]     a:active, .message[_ngcontent-%COMP%]     a:hover, .message[_ngcontent-%COMP%]     a:visited{color:#c9c9c9!important}.message[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-size:15px}.image-box[_ngcontent-%COMP%]{height:40vh}.image-box[_ngcontent-%COMP%]   .button-box[_ngcontent-%COMP%]{padding:10px 0;height:35px}.image-box[_ngcontent-%COMP%]   .chat-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.chat-image-placeholder[_ngcontent-%COMP%]{width:20vw;height:40vh}.scroll-view[_ngcontent-%COMP%]{overflow:auto}.rotate[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_rotate 1.5s linear infinite}@keyframes _ngcontent-%COMP%_rotate{to{transform:rotate(360deg)}}.background-image[_ngcontent-%COMP%], .background-color[_ngcontent-%COMP%]{z-index:1;position:absolute;width:100%;height:100%;background-color:#efeae2;background-image:url(/assets/background/chat.png);background-repeat:repeat;opacity:.4}.background-color[_ngcontent-%COMP%]{background-image:none;opacity:1;background-color:#efeae2}.response-message[_ngcontent-%COMP%]{margin:-12px -12px 3px;background-color:#6a6a6a;padding:4px;border-radius:5px;font-size:15px}.day-divider[_ngcontent-%COMP%]{position:relative;height:20px}.day-divider[_ngcontent-%COMP%]   .middle[_ngcontent-%COMP%]{position:absolute;font-size:70%;background-color:#1c1c1c;border-radius:8px;padding:2px 10px}.day-divider[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{width:100%;height:6px;background-color:#1c1c1c;border-radius:3px}.checkbox-wrapper[_ngcontent-%COMP%]{padding-left:3px;padding-bottom:4px;display:flex;justify-content:center;align-items:center}.icon-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:34px;width:44px}",".new-style[_ngcontent-%COMP%]{padding:0;background-color:transparent!important}.new-style[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{background-color:#fff!important;color:#3b4a54!important;border:none!important;border-radius:8px!important}.new-style[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar{width:10px}.new-style[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#c3c1bc;border:0px solid #a2a2a2;border-radius:0}.new-style[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar-track{border:0px solid #5a5a5a}.new-style[_ngcontent-%COMP%]   .button-box[_ngcontent-%COMP%]{justify-content:center;align-items:center;display:flex;flex-direction:column}.new-style[_ngcontent-%COMP%]   .button-box[_ngcontent-%COMP%]   .show-hover-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;height:30px}.new-style[_ngcontent-%COMP%]   .button-box[_ngcontent-%COMP%]   .show-hover-wrapper[_ngcontent-%COMP%]     button{color:#888!important;height:30px}.new-style[_ngcontent-%COMP%]   .text-input-bar[_ngcontent-%COMP%]{background-color:#f0f2f5;padding:8px;display:flex;flex-direction:row;justify-content:center;align-items:center}.new-style[_ngcontent-%COMP%]   .message-out[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{padding-left:10px}.new-style[_ngcontent-%COMP%]   .message-in[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{padding-right:10px}.new-style[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]{text-rendering:optimizeLegibility;box-shadow:0 1px .5px #0b141a21;border-radius:7.5px;display:flex;flex-direction:row-reverse;border:none!important;font-size:14.2px;font-family:Segoe UI,Helvetica Neue,Helvetica,Lucida Grande,Arial,Ubuntu,Cantarell,Fira Sans,sans-serif;color:#111b21;background-color:#fff}.new-style[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]     a:link, .new-style[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]     a:active, .new-style[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]     a:hover, .new-style[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]     a:visited{color:#111b21f0!important}.new-style[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{display:flex;align-items:flex-end;color:#111b21;position:relative;top:10px;font-size:11px;right:-3px}.new-style[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{padding-right:8px}"]});let t=e;return t})()});function A7(t){return e=>new QM(n=>{let i=!0,r;return e.subscribe({next(s){r&&clearTimeout(r),i?(n.next(s),i=!1,r=setTimeout(()=>{i=!0},t)):r=setTimeout(()=>{n.next(s),i=!0},t)},error(s){n.error(s)},complete(){n.complete()}})})}var oz=Q(()=>{Lj()});var _X,CUe=Q(()=>{Qo();_X=class{static getCellStyler(){return e=>{let n=e.column.getColDef();switch(n.nxtCellStyle||(n.nxtCellStyle={}),n.nxtFieldType){case Ee.Money:return ve({textAlign:"right"},n.nxtCellStyle);case Ee.Duration:return ve({textAlign:"right"},n.nxtCellStyle);case Ee.Percentage:return ve({textAlign:"right"},n.nxtCellStyle);case Ee.Number:return ve({textAlign:"right"},n.nxtCellStyle);case Ee.Icon:return ve({textAlign:"center"},n.nxtCellStyle)}return[Ee.ShowCalendarEvent,Ee.ShowEventHistory,Ee.ShowContactHistory].includes(n.nxtFieldType)?ve({textAlign:"center"},n.nxtCellStyle):n.nxtCellStyle}}}});var Y4e,xUe,bUe=Q(()=>{me();me();Y4e=class{constructor(e,n){this.newRect=e,this.oldRect=n,this.isFirst=n==null}},xUe=(()=>{let e=class e{constructor(i,r){this.element=i,this.zone=r,this.resized=new nt,this.observer=new ResizeObserver(s=>this.zone.run(()=>this.observe(s)))}ngOnInit(){this.observer.observe(this.element.nativeElement)}ngOnDestroy(){this.observer.disconnect()}observe(i){let r=i[0],s=new Y4e(r.contentRect,this.oldRect);this.oldRect=r.contentRect,this.resized.emit(s)}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(pn))},e.\u0275dir=mi({type:e,selectors:[["","resized",""]],outputs:{resized:"resized"},standalone:!0});let t=e;return t})()});var P7=xr((VA,az)=>{(function(){var t,e="4.17.21",n=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",r="Expected a function",s="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",a=500,l="__lodash_placeholder__",c=1,d=2,u=4,m=1,f=2,_=1,x=2,D=4,E=8,M=16,I=32,z=64,G=128,A=256,Y=512,X=30,ne="...",pe=800,ce=16,ie=1,le=2,Se=3,je=1/0,ze=9007199254740991,Ge=17976931348623157e292,Ae=NaN,Ye=4294967295,ft=Ye-1,Ft=Ye>>>1,Tt=[["ary",G],["bind",_],["bindKey",x],["curry",E],["curryRight",M],["flip",Y],["partial",I],["partialRight",z],["rearg",A]],at="[object Arguments]",yt="[object Array]",_t="[object AsyncFunction]",Re="[object Boolean]",ot="[object Date]",jt="[object DOMException]",zt="[object Error]",qt="[object Function]",ui="[object GeneratorFunction]",_i="[object Map]",ln="[object Number]",Rn="[object Null]",bi="[object Object]",Mn="[object Promise]",Fn="[object Proxy]",or="[object RegExp]",wn="[object Set]",gn="[object String]",ts="[object Symbol]",no="[object Undefined]",Ho="[object WeakMap]",kn="[object WeakSet]",Ts="[object ArrayBuffer]",ea="[object DataView]",co="[object Float32Array]",Zn="[object Float64Array]",gl="[object Int8Array]",sc="[object Int16Array]",Xl="[object Int32Array]",Xs="[object Uint8Array]",Ya="[object Uint8ClampedArray]",qa="[object Uint16Array]",Nl="[object Uint32Array]",zh=/\b__p \+= '';/g,Hh=/\b(__p \+=) '' \+/g,Rf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Id=/&(?:amp|lt|gt|quot|#39);/g,aa=/[&<>"']/g,jd=RegExp(Id.source),du=RegExp(aa.source),$i=/<%-([\s\S]+?)%>/g,md=/<%([\s\S]+?)%>/g,Vl=/<%=([\s\S]+?)%>/g,Tl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ja=/^\w*$/,Dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ad=/[\\^$.*+?()[\]{}|]/g,ds=RegExp(Ad.source),_a=/^\s+/,fd=/\s/,fr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qs=/\{\n\/\* \[wrapped with (.+)\] \*/,Nr=/,? & /,Ql=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ro=/[()=,{}\[\]\/\s]/,Ra=/\\(\\)?/g,Ta=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$a=/\w*$/,Da=/^[-+]0x[0-9a-f]+$/i,Gh=/^0b[01]+$/i,Ti=/^\[object .+?Constructor\]$/,Hs=/^0o[0-7]+$/i,Eo=/^(?:0|[1-9]\d*)$/,Mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Js=/($^)/,td=/['\n\r\u2028\u2029\\]/g,Ec="\\ud800-\\udfff",Wh="\\u0300-\\u036f",gd="\\ufe20-\\ufe2f",eo="\\u20d0-\\u20ff",Tu=Wh+gd+eo,dp="\\u2700-\\u27bf",vd="a-z\\xdf-\\xf6\\xf8-\\xff",ch="\\xac\\xb1\\xd7\\xf7",T1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Wm="\\u2000-\\u206f",ia=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Fa="A-Z\\xc0-\\xd6\\xd8-\\xde",up="\\ufe0e\\ufe0f",vl=ch+T1+Wm+ia,Jl="['\u2019]",Du="["+Ec+"]",uo="["+vl+"]",yl="["+Tu+"]",Bp="\\d+",zp="["+dp+"]",id="["+vd+"]",Bc="[^"+Ec+vl+Bp+dp+vd+Fa+"]",ec="\\ud83c[\\udffb-\\udfff]",yd="(?:"+yl+"|"+ec+")",bo="[^"+Ec+"]",ba="(?:\\ud83c[\\udde6-\\uddff]){2}",Bl="[\\ud800-\\udbff][\\udc00-\\udfff]",Yo="["+Fa+"]",dh="\\u200d",mc="(?:"+id+"|"+Bc+")",Pd="(?:"+Yo+"|"+Bc+")",ju="(?:"+Jl+"(?:d|ll|m|re|s|t|ve))?",hp="(?:"+Jl+"(?:D|LL|M|RE|S|T|VE))?",Uh=yd+"?",$u="["+up+"]?",Um="(?:"+dh+"(?:"+[bo,ba,Bl].join("|")+")"+$u+Uh+")*",Ff="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Eu=$u+Uh+Um,wo="(?:"+[zp,ba,Bl].join("|")+")"+Eu,uh="(?:"+[bo+yl+"?",yl,ba,Bl,Du].join("|")+")",rl=RegExp(Jl,"g"),pp=RegExp(yl,"g"),Gp=RegExp(ec+"(?="+ec+")|"+uh+Eu,"g"),d0=RegExp([Yo+"?"+id+"+"+ju+"(?="+[uo,Yo,"$"].join("|")+")",Pd+"+"+hp+"(?="+[uo,Yo+mc,"$"].join("|")+")",Yo+"?"+mc+"+"+ju,Yo+"+"+hp,Hp,Ff,Bp,wo].join("|"),"g"),jm=RegExp("["+dh+Ec+Tu+up+"]"),nd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,D1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Lf=-1,Yr={};Yr[co]=Yr[Zn]=Yr[gl]=Yr[sc]=Yr[Xl]=Yr[Xs]=Yr[Ya]=Yr[qa]=Yr[Nl]=!0,Yr[at]=Yr[yt]=Yr[Ts]=Yr[Re]=Yr[ea]=Yr[ot]=Yr[zt]=Yr[qt]=Yr[_i]=Yr[ln]=Yr[bi]=Yr[or]=Yr[wn]=Yr[gn]=Yr[Ho]=!1;var ps={};ps[at]=ps[yt]=ps[Ts]=ps[ea]=ps[Re]=ps[ot]=ps[co]=ps[Zn]=ps[gl]=ps[sc]=ps[Xl]=ps[_i]=ps[ln]=ps[bi]=ps[or]=ps[wn]=ps[gn]=ps[ts]=ps[Xs]=ps[Ya]=ps[qa]=ps[Nl]=!0,ps[zt]=ps[qt]=ps[Ho]=!1;var $m={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},hh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ku={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},E1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Wp=parseFloat,Dl=parseInt,M1=typeof global=="object"&&global&&global.Object===Object&&global,Ca=typeof self=="object"&&self&&self.Object===Object&&self,la=M1||Ca||Function("return this")(),oc=typeof VA=="object"&&VA&&!VA.nodeType&&VA,fc=oc&&typeof az=="object"&&az&&!az.nodeType&&az,Fs=fc&&fc.exports===oc,_d=Fs&&M1.process,Go=function(){try{var Fe=fc&&fc.require&&fc.require("util").types;return Fe||_d&&_d.binding&&_d.binding("util")}catch{}}(),k1=Go&&Go.isArrayBuffer,H=Go&&Go.isDate,te=Go&&Go.isMap,ge=Go&&Go.isRegExp,ke=Go&&Go.isSet,He=Go&&Go.isTypedArray;function Ne(Fe,dt,ht){switch(ht.length){case 0:return Fe.call(dt);case 1:return Fe.call(dt,ht[0]);case 2:return Fe.call(dt,ht[0],ht[1]);case 3:return Fe.call(dt,ht[0],ht[1],ht[2])}return Fe.apply(dt,ht)}function ct(Fe,dt,ht,ci){for(var Ni=-1,Qi=Fe==null?0:Fe.length;++Ni<Qi;){var Br=Fe[Ni];dt(ci,Br,ht(Br),Fe)}return ci}function kt(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length;++ht<ci&&dt(Fe[ht],ht,Fe)!==!1;);return Fe}function Ht(Fe,dt){for(var ht=Fe==null?0:Fe.length;ht--&&dt(Fe[ht],ht,Fe)!==!1;);return Fe}function hi(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length;++ht<ci;)if(!dt(Fe[ht],ht,Fe))return!1;return!0}function Li(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length,Ni=0,Qi=[];++ht<ci;){var Br=Fe[ht];dt(Br,ht,Fe)&&(Qi[Ni++]=Br)}return Qi}function nn(Fe,dt){var ht=Fe==null?0:Fe.length;return!!ht&&ho(Fe,dt,0)>-1}function Ii(Fe,dt,ht){for(var ci=-1,Ni=Fe==null?0:Fe.length;++ci<Ni;)if(ht(dt,Fe[ci]))return!0;return!1}function Oi(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length,Ni=Array(ci);++ht<ci;)Ni[ht]=dt(Fe[ht],ht,Fe);return Ni}function is(Fe,dt){for(var ht=-1,ci=dt.length,Ni=Fe.length;++ht<ci;)Fe[Ni+ht]=dt[ht];return Fe}function Io(Fe,dt,ht,ci){var Ni=-1,Qi=Fe==null?0:Fe.length;for(ci&&Qi&&(ht=Fe[++Ni]);++Ni<Qi;)ht=dt(ht,Fe[Ni],Ni,Fe);return ht}function Ao(Fe,dt,ht,ci){var Ni=Fe==null?0:Fe.length;for(ci&&Ni&&(ht=Fe[--Ni]);Ni--;)ht=dt(ht,Fe[Ni],Ni,Fe);return ht}function sl(Fe,dt){for(var ht=-1,ci=Fe==null?0:Fe.length;++ht<ci;)if(dt(Fe[ht],ht,Fe))return!0;return!1}var Ea=Mc("length");function $d(Fe){return Fe.split("")}function rd(Fe){return Fe.match(Ql)||[]}function Ro(Fe,dt,ht){var ci;return ht(Fe,function(Ni,Qi,Br){if(dt(Ni,Qi,Br))return ci=Qi,!1}),ci}function gc(Fe,dt,ht,ci){for(var Ni=Fe.length,Qi=ht+(ci?1:-1);ci?Qi--:++Qi<Ni;)if(dt(Fe[Qi],Qi,Fe))return Qi;return-1}function ho(Fe,dt,ht){return dt===dt?Up(Fe,dt,ht):gc(Fe,zc,ht)}function Fo(Fe,dt,ht,ci){for(var Ni=ht-1,Qi=Fe.length;++Ni<Qi;)if(ci(Fe[Ni],dt))return Ni;return-1}function zc(Fe){return Fe!==Fe}function Cd(Fe,dt){var ht=Fe==null?0:Fe.length;return ht?mt(Fe,dt)/ht:Ae}function Mc(Fe){return function(dt){return dt==null?t:dt[Fe]}}function K(Fe){return function(dt){return Fe==null?t:Fe[dt]}}function we(Fe,dt,ht,ci,Ni){return Ni(Fe,function(Qi,Br,hn){ht=ci?(ci=!1,Qi):dt(ht,Qi,Br,hn)}),ht}function Oe(Fe,dt){var ht=Fe.length;for(Fe.sort(dt);ht--;)Fe[ht]=Fe[ht].value;return Fe}function mt(Fe,dt){for(var ht,ci=-1,Ni=Fe.length;++ci<Ni;){var Qi=dt(Fe[ci]);Qi!==t&&(ht=ht===t?Qi:ht+Qi)}return ht}function vi(Fe,dt){for(var ht=-1,ci=Array(Fe);++ht<Fe;)ci[ht]=dt(ht);return ci}function Bi(Fe,dt){return Oi(dt,function(ht){return[ht,Fe[ht]]})}function jn(Fe){return Fe&&Fe.slice(0,jp(Fe)+1).replace(_a,"")}function Vr(Fe){return function(dt){return Fe(dt)}}function El(Fe,dt){return Oi(dt,function(ht){return Fe[ht]})}function Lo(Fe,dt){return Fe.has(dt)}function Er(Fe,dt){for(var ht=-1,ci=Fe.length;++ht<ci&&ho(dt,Fe[ht],0)>-1;);return ht}function yo(Fe,dt){for(var ht=Fe.length;ht--&&ho(dt,Fe[ht],0)>-1;);return ht}function uu(Fe,dt){for(var ht=Fe.length,ci=0;ht--;)Fe[ht]===dt&&++ci;return ci}var zl=K($m),Mu=K(hh);function Of(Fe){return"\\"+E1[Fe]}function K0(Fe,dt){return Fe==null?t:Fe[dt]}function Hc(Fe){return jm.test(Fe)}function Rd(Fe){return nd.test(Fe)}function Nf(Fe){for(var dt,ht=[];!(dt=Fe.next()).done;)ht.push(dt.value);return ht}function jh(Fe){var dt=-1,ht=Array(Fe.size);return Fe.forEach(function(ci,Ni){ht[++dt]=[Ni,ci]}),ht}function $h(Fe,dt){return function(ht){return Fe(dt(ht))}}function _l(Fe,dt){for(var ht=-1,ci=Fe.length,Ni=0,Qi=[];++ht<ci;){var Br=Fe[ht];(Br===dt||Br===l)&&(Fe[ht]=l,Qi[Ni++]=ht)}return Qi}function kc(Fe){var dt=-1,ht=Array(Fe.size);return Fe.forEach(function(ci){ht[++dt]=ci}),ht}function Y0(Fe){var dt=-1,ht=Array(Fe.size);return Fe.forEach(function(ci){ht[++dt]=[ci,ci]}),ht}function Up(Fe,dt,ht){for(var ci=ht-1,Ni=Fe.length;++ci<Ni;)if(Fe[ci]===dt)return ci;return-1}function Kg(Fe,dt,ht){for(var ci=ht+1;ci--;)if(Fe[ci]===dt)return ci;return ci}function Hl(Fe){return Hc(Fe)?I1(Fe):Ea(Fe)}function ol(Fe){return Hc(Fe)?q0(Fe):$d(Fe)}function jp(Fe){for(var dt=Fe.length;dt--&&fd.test(Fe.charAt(dt)););return dt}var F2=K(Ku);function I1(Fe){for(var dt=Gp.lastIndex=0;Gp.test(Fe);)++dt;return dt}function q0(Fe){return Fe.match(Gp)||[]}function Mt(Fe){return Fe.match(d0)||[]}var li=function Fe(dt){dt=dt==null?la:wi.defaults(la.Object(),dt,wi.pick(la,D1));var ht=dt.Array,ci=dt.Date,Ni=dt.Error,Qi=dt.Function,Br=dt.Math,hn=dt.Object,us=dt.RegExp,ns=dt.String,_r=dt.TypeError,xa=ht.prototype,xd=Qi.prototype,Gl=hn.prototype,bd=dt["__core-js_shared__"],Fd=xd.toString,ss=Gl.hasOwnProperty,hu=0,Vf=function(){var v=/[^.]+$/.exec(bd&&bd.keys&&bd.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""}(),Bf=Gl.toString,K3=Fd.call(hn),Y3=la._,Km=us("^"+Fd.call(ss).replace(Ad,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ym=Fs?dt.Buffer:t,Yu=dt.Symbol,mp=dt.Uint8Array,L2=Ym?Ym.allocUnsafe:t,um=$h(hn.getPrototypeOf,hn),qm=hn.create,u0=Gl.propertyIsEnumerable,Kh=xa.splice,q3=Yu?Yu.isConcatSpreadable:t,Zm=Yu?Yu.iterator:t,Yh=Yu?Yu.toStringTag:t,A1=function(){try{var v=z2(hn,"defineProperty");return v({},"",{}),v}catch{}}(),Yg=dt.clearTimeout!==la.clearTimeout&&dt.clearTimeout,hv=ci&&ci.now!==la.Date.now&&ci.now,J6=dt.setTimeout!==la.setTimeout&&dt.setTimeout,zf=Br.ceil,ph=Br.floor,La=hn.getOwnPropertySymbols,T=Ym?Ym.isBuffer:t,N=dt.isFinite,Z=xa.join,ue=$h(hn.keys,hn),Pe=Br.max,st=Br.min,ti=ci.now,Ei=dt.parseInt,Ui=Br.random,On=xa.reverse,Wr=z2(dt,"DataView"),$s=z2(dt,"Map"),qo=z2(dt,"Promise"),q=z2(dt,"Set"),oe=z2(dt,"WeakMap"),he=z2(hn,"create"),de=oe&&new oe,De={},Le=H2(Wr),xt=H2($s),Dt=H2(qo),Ut=H2(q),Jt=H2(oe),gi=Yu?Yu.prototype:t,Si=gi?gi.valueOf:t,Tr=gi?gi.toString:t;function ae(v){if(Oa(v)&&!Pr(v)&&!(v instanceof hr)){if(v instanceof Zo)return v;if(ss.call(v,"__wrapped__"))return NL(v)}return new Zo(v)}var Ds=function(){function v(){}return function(C){if(!wa(C))return{};if(qm)return qm(C);v.prototype=C;var k=new v;return v.prototype=t,k}}();function lo(){}function Zo(v,C){this.__wrapped__=v,this.__actions__=[],this.__chain__=!!C,this.__index__=0,this.__values__=t}ae.templateSettings={escape:$i,evaluate:md,interpolate:Vl,variable:"",imports:{_:ae}},ae.prototype=lo.prototype,ae.prototype.constructor=ae,Zo.prototype=Ds(lo.prototype),Zo.prototype.constructor=Zo;function hr(v){this.__wrapped__=v,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ye,this.__views__=[]}function h0(){var v=new hr(this.__wrapped__);return v.__actions__=qd(this.__actions__),v.__dir__=this.__dir__,v.__filtered__=this.__filtered__,v.__iteratees__=qd(this.__iteratees__),v.__takeCount__=this.__takeCount__,v.__views__=qd(this.__views__),v}function M_(){if(this.__filtered__){var v=new hr(this);v.__dir__=-1,v.__filtered__=!0}else v=this.clone(),v.__dir__*=-1;return v}function k_(){var v=this.__wrapped__.value(),C=this.__dir__,k=Pr(v),j=C<0,se=k?v.length:0,Te=hoe(0,se,this.__views__),We=Te.start,rt=Te.end,pt=rt-We,ni=j?rt:We-1,si=this.__iteratees__,pi=si.length,Ki=0,Tn=st(pt,this.__takeCount__);if(!k||!j&&se==pt&&Tn==pt)return oL(v,this.__actions__);var ir=[];e:for(;pt--&&Ki<Tn;){ni+=C;for(var Qr=-1,nr=v[ni];++Qr<pi;){var fs=si[Qr],As=fs.iteratee,Pu=fs.type,Td=As(nr);if(Pu==le)nr=Td;else if(!Td){if(Pu==ie)continue e;break e}}ir[Ki++]=nr}return ir}hr.prototype=Ds(lo.prototype),hr.prototype.constructor=hr;function qu(v){var C=-1,k=v==null?0:v.length;for(this.clear();++C<k;){var j=v[C];this.set(j[0],j[1])}}function p0(){this.__data__=he?he(null):{},this.size=0}function I_(v){var C=this.has(v)&&delete this.__data__[v];return this.size-=C?1:0,C}function Kd(v){var C=this.__data__;if(he){var k=C[v];return k===o?t:k}return ss.call(C,v)?C[v]:t}function A_(v){var C=this.__data__;return he?C[v]!==t:ss.call(C,v)}function O2(v,C){var k=this.__data__;return this.size+=this.has(v)?0:1,k[v]=he&&C===t?o:C,this}qu.prototype.clear=p0,qu.prototype.delete=I_,qu.prototype.get=Kd,qu.prototype.has=A_,qu.prototype.set=O2;function fp(v){var C=-1,k=v==null?0:v.length;for(this.clear();++C<k;){var j=v[C];this.set(j[0],j[1])}}function xS(){this.__data__=[],this.size=0}function zC(v){var C=this.__data__,k=Yd(C,v);if(k<0)return!1;var j=C.length-1;return k==j?C.pop():Kh.call(C,k,1),--this.size,!0}function bS(v){var C=this.__data__,k=Yd(C,v);return k<0?t:C[k][1]}function wS(v){return Yd(this.__data__,v)>-1}function HC(v,C){var k=this.__data__,j=Yd(k,v);return j<0?(++this.size,k.push([v,C])):k[j][1]=C,this}fp.prototype.clear=xS,fp.prototype.delete=zC,fp.prototype.get=bS,fp.prototype.has=wS,fp.prototype.set=HC;function gp(v){var C=-1,k=v==null?0:v.length;for(this.clear();++C<k;){var j=v[C];this.set(j[0],j[1])}}function SS(){this.size=0,this.__data__={hash:new qu,map:new($s||fp),string:new qu}}function TS(v){var C=o8(this,v).delete(v);return this.size-=C?1:0,C}function hm(v){return o8(this,v).get(v)}function GC(v){return o8(this,v).has(v)}function DS(v,C){var k=o8(this,v),j=k.size;return k.set(v,C),this.size+=k.size==j?0:1,this}gp.prototype.clear=SS,gp.prototype.delete=TS,gp.prototype.get=hm,gp.prototype.has=GC,gp.prototype.set=DS;function Hf(v){var C=-1,k=v==null?0:v.length;for(this.__data__=new gp;++C<k;)this.add(v[C])}function ES(v){return this.__data__.set(v,o),this}function xi(v){return this.__data__.has(v)}Hf.prototype.add=Hf.prototype.push=ES,Hf.prototype.has=xi;function ku(v){var C=this.__data__=new fp(v);this.size=C.size}function MS(){this.__data__=new fp,this.size=0}function WC(v){var C=this.__data__,k=C.delete(v);return this.size=C.size,k}function Vs(v){return this.__data__.get(v)}function Z3(v){return this.__data__.has(v)}function UC(v,C){var k=this.__data__;if(k instanceof fp){var j=k.__data__;if(!$s||j.length<n-1)return j.push([v,C]),this.size=++k.size,this;k=this.__data__=new gp(j)}return k.set(v,C),this.size=k.size,this}ku.prototype.clear=MS,ku.prototype.delete=WC,ku.prototype.get=Vs,ku.prototype.has=Z3,ku.prototype.set=UC;function X3(v,C){var k=Pr(v),j=!k&&G2(v),se=!k&&!j&&y0(v),Te=!k&&!j&&!se&&n4(v),We=k||j||se||Te,rt=We?vi(v.length,ns):[],pt=rt.length;for(var ni in v)(C||ss.call(v,ni))&&!(We&&(ni=="length"||se&&(ni=="offset"||ni=="parent")||Te&&(ni=="buffer"||ni=="byteLength"||ni=="byteOffset")||$f(ni,pt)))&&rt.push(ni);return rt}function jC(v){var C=v.length;return C?v[GS(0,C-1)]:t}function kS(v,C){return a8(qd(v),Gf(C,0,v.length))}function IS(v){return a8(qd(v))}function ey(v,C,k){(k!==t&&!Cp(v[C],k)||k===t&&!(C in v))&&vp(v,C,k)}function N2(v,C,k){var j=v[C];(!(ss.call(v,C)&&Cp(j,k))||k===t&&!(C in v))&&vp(v,C,k)}function Yd(v,C){for(var k=v.length;k--;)if(Cp(v[k][0],C))return k;return-1}function AS(v,C,k,j){return pm(v,function(se,Te,We){C(j,se,k(se),We)}),j}function ty(v,C){return v&&fm(C,tc(C),v)}function PS(v,C){return v&&fm(C,Xd(C),v)}function vp(v,C,k){C=="__proto__"&&A1?A1(v,C,{configurable:!0,enumerable:!0,value:k,writable:!0}):v[C]=k}function Q3(v,C){for(var k=-1,j=C.length,se=ht(j),Te=v==null;++k<j;)se[k]=Te?t:p9(v,C[k]);return se}function Gf(v,C,k){return v===v&&(k!==t&&(v=v<=k?v:k),C!==t&&(v=v>=C?v:C)),v}function wd(v,C,k,j,se,Te){var We,rt=C&c,pt=C&d,ni=C&u;if(k&&(We=se?k(v,j,se,Te):k(v)),We!==t)return We;if(!wa(v))return v;var si=Pr(v);if(si){if(We=moe(v),!rt)return qd(v,We)}else{var pi=Gc(v),Ki=pi==qt||pi==ui;if(y0(v))return cL(v,rt);if(pi==bi||pi==at||Ki&&!se){if(We=pt||Ki?{}:ML(v),!rt)return pt?noe(v,PS(We,v)):ioe(v,ty(We,v))}else{if(!ps[pi])return se?v:{};We=foe(v,pi,rt)}}Te||(Te=new ku);var Tn=Te.get(v);if(Tn)return Tn;Te.set(v,We),nO(v)?v.forEach(function(nr){We.add(wd(nr,C,k,nr,v,Te))}):tO(v)&&v.forEach(function(nr,fs){We.set(fs,wd(nr,C,k,fs,v,Te))});var ir=ni?pt?JS:QS:pt?Xd:tc,Qr=si?t:ir(v);return kt(Qr||v,function(nr,fs){Qr&&(fs=nr,nr=v[fs]),N2(We,fs,wd(nr,C,k,fs,v,Te))}),We}function iy(v){var C=tc(v);return function(k){return $C(k,v,C)}}function $C(v,C,k){var j=k.length;if(v==null)return!j;for(v=hn(v);j--;){var se=k[j],Te=C[se],We=v[se];if(We===t&&!(se in v)||!Te(We))return!1}return!0}function mh(v,C,k){if(typeof v!="function")throw new _r(r);return uy(function(){v.apply(t,k)},C)}function m0(v,C,k,j){var se=-1,Te=nn,We=!0,rt=v.length,pt=[],ni=C.length;if(!rt)return pt;k&&(C=Oi(C,Vr(k))),j?(Te=Ii,We=!1):C.length>=n&&(Te=Lo,We=!1,C=new Hf(C));e:for(;++se<rt;){var si=v[se],pi=k==null?si:k(si);if(si=j||si!==0?si:0,We&&pi===pi){for(var Ki=ni;Ki--;)if(C[Ki]===pi)continue e;pt.push(si)}else Te(C,pi,j)||pt.push(si)}return pt}var pm=mL(fh),KC=mL(ry,!0);function RS(v,C){var k=!0;return pm(v,function(j,se,Te){return k=!!C(j,se,Te),k}),k}function J3(v,C,k){for(var j=-1,se=v.length;++j<se;){var Te=v[j],We=C(Te);if(We!=null&&(rt===t?We===We&&!Au(We):k(We,rt)))var rt=We,pt=Te}return pt}function FS(v,C,k,j){var se=v.length;for(k=qr(k),k<0&&(k=-k>se?0:se+k),j=j===t||j>se?se:qr(j),j<0&&(j+=se),j=k>j?0:sO(j);k<j;)v[k++]=C;return v}function YC(v,C){var k=[];return pm(v,function(j,se,Te){C(j,se,Te)&&k.push(j)}),k}function Rl(v,C,k,j,se){var Te=-1,We=v.length;for(k||(k=voe),se||(se=[]);++Te<We;){var rt=v[Te];C>0&&k(rt)?C>1?Rl(rt,C-1,k,j,se):is(se,rt):j||(se[se.length]=rt)}return se}var ny=fL(),qC=fL(!0);function fh(v,C){return v&&ny(v,C,tc)}function ry(v,C){return v&&qC(v,C,tc)}function gh(v,C){return Li(C,function(k){return Kf(v[k])})}function Wf(v,C){C=g0(C,v);for(var k=0,j=C.length;v!=null&&k<j;)v=v[gm(C[k++])];return k&&k==j?v:t}function ZC(v,C,k){var j=C(v);return Pr(v)?j:is(j,k(v))}function vc(v){return v==null?v===t?no:Rn:Yh&&Yh in hn(v)?uoe(v):Soe(v)}function sy(v,C){return v>C}function LS(v,C){return v!=null&&ss.call(v,C)}function OS(v,C){return v!=null&&C in hn(v)}function NS(v,C,k){return v>=st(C,k)&&v<Pe(C,k)}function oy(v,C,k){for(var j=k?Ii:nn,se=v[0].length,Te=v.length,We=Te,rt=ht(Te),pt=1/0,ni=[];We--;){var si=v[We];We&&C&&(si=Oi(si,Vr(C))),pt=st(si.length,pt),rt[We]=!k&&(C||se>=120&&si.length>=120)?new Hf(We&&si):t}si=v[0];var pi=-1,Ki=rt[0];e:for(;++pi<se&&ni.length<pt;){var Tn=si[pi],ir=C?C(Tn):Tn;if(Tn=k||Tn!==0?Tn:0,!(Ki?Lo(Ki,ir):j(ni,ir,k))){for(We=Te;--We;){var Qr=rt[We];if(!(Qr?Lo(Qr,ir):j(v[We],ir,k)))continue e}Ki&&Ki.push(ir),ni.push(Tn)}}return ni}function yp(v,C,k,j){return fh(v,function(se,Te,We){C(j,k(se),Te,We)}),j}function vh(v,C,k){C=g0(C,v),v=PL(v,C);var j=v==null?v:v[gm(Ch(C))];return j==null?t:Ne(j,v,k)}function XC(v){return Oa(v)&&vc(v)==at}function VS(v){return Oa(v)&&vc(v)==Ts}function BS(v){return Oa(v)&&vc(v)==ot}function V2(v,C,k,j,se){return v===C?!0:v==null||C==null||!Oa(v)&&!Oa(C)?v!==v&&C!==C:zS(v,C,k,j,V2,se)}function zS(v,C,k,j,se,Te){var We=Pr(v),rt=Pr(C),pt=We?yt:Gc(v),ni=rt?yt:Gc(C);pt=pt==at?bi:pt,ni=ni==at?bi:ni;var si=pt==bi,pi=ni==bi,Ki=pt==ni;if(Ki&&y0(v)){if(!y0(C))return!1;We=!0,si=!1}if(Ki&&!si)return Te||(Te=new ku),We||n4(v)?TL(v,C,k,j,se,Te):coe(v,C,pt,k,j,se,Te);if(!(k&m)){var Tn=si&&ss.call(v,"__wrapped__"),ir=pi&&ss.call(C,"__wrapped__");if(Tn||ir){var Qr=Tn?v.value():v,nr=ir?C.value():C;return Te||(Te=new ku),se(Qr,nr,k,j,Te)}}return Ki?(Te||(Te=new ku),doe(v,C,k,j,se,Te)):!1}function ay(v){return Oa(v)&&Gc(v)==_i}function mm(v,C,k,j){var se=k.length,Te=se,We=!j;if(v==null)return!Te;for(v=hn(v);se--;){var rt=k[se];if(We&&rt[2]?rt[1]!==v[rt[0]]:!(rt[0]in v))return!1}for(;++se<Te;){rt=k[se];var pt=rt[0],ni=v[pt],si=rt[1];if(We&&rt[2]){if(ni===t&&!(pt in v))return!1}else{var pi=new ku;if(j)var Ki=j(ni,si,pt,v,C,pi);if(!(Ki===t?V2(si,ni,m|f,j,pi):Ki))return!1}}return!0}function B2(v){if(!wa(v)||_oe(v))return!1;var C=Kf(v)?Km:Ti;return C.test(H2(v))}function xs(v){return Oa(v)&&vc(v)==or}function S(v){return Oa(v)&&Gc(v)==wn}function P(v){return Oa(v)&&p8(v.length)&&!!Yr[vc(v)]}function U(v){return typeof v=="function"?v:v==null?Qd:typeof v=="object"?Pr(v)?ar(v[0],v[1]):rn(v):gO(v)}function J(v){if(!dy(v))return ue(v);var C=[];for(var k in hn(v))ss.call(v,k)&&k!="constructor"&&C.push(k);return C}function fe(v){if(!wa(v))return woe(v);var C=dy(v),k=[];for(var j in v)j=="constructor"&&(C||!ss.call(v,j))||k.push(j);return k}function Qe(v,C){return v<C}function Wt(v,C){var k=-1,j=Zd(v)?ht(v.length):[];return pm(v,function(se,Te,We){j[++k]=C(se,Te,We)}),j}function rn(v){var C=t9(v);return C.length==1&&C[0][2]?IL(C[0][0],C[0][1]):function(k){return k===v||mm(k,v,C)}}function ar(v,C){return n9(v)&&kL(C)?IL(gm(v),C):function(k){var j=p9(k,v);return j===t&&j===C?m9(k,v):V2(C,j,m|f)}}function Xr(v,C,k,j,se){v!==C&&ny(C,function(Te,We){if(se||(se=new ku),wa(Te))yc(v,C,We,k,Xr,j,se);else{var rt=j?j(s9(v,We),Te,We+"",v,C,se):t;rt===t&&(rt=Te),ey(v,We,rt)}},Xd)}function yc(v,C,k,j,se,Te,We){var rt=s9(v,k),pt=s9(C,k),ni=We.get(pt);if(ni){ey(v,k,ni);return}var si=Te?Te(rt,pt,k+"",v,C,We):t,pi=si===t;if(pi){var Ki=Pr(pt),Tn=!Ki&&y0(pt),ir=!Ki&&!Tn&&n4(pt);si=pt,Ki||Tn||ir?Pr(rt)?si=rt:Za(rt)?si=qd(rt):Tn?(pi=!1,si=cL(pt,!0)):ir?(pi=!1,si=dL(pt,!0)):si=[]:hy(pt)||G2(pt)?(si=rt,G2(rt)?si=oO(rt):(!wa(rt)||Kf(rt))&&(si=ML(pt))):pi=!1}pi&&(We.set(pt,si),se(si,pt,j,Te,We),We.delete(pt)),ey(v,k,si)}function yh(v,C){var k=v.length;if(k)return C+=C<0?k:0,$f(C,k)?v[C]:t}function _p(v,C,k){C.length?C=Oi(C,function(Te){return Pr(Te)?function(We){return Wf(We,Te.length===1?Te[0]:Te)}:Te}):C=[Qd];var j=-1;C=Oi(C,Vr(Xn()));var se=Wt(v,function(Te,We,rt){var pt=Oi(C,function(ni){return ni(Te)});return{criteria:pt,index:++j,value:Te}});return Oe(se,function(Te,We){return toe(Te,We,k)})}function Wse(v,C){return eL(v,C,function(k,j){return m9(v,j)})}function eL(v,C,k){for(var j=-1,se=C.length,Te={};++j<se;){var We=C[j],rt=Wf(v,We);k(rt,We)&&ly(Te,g0(We,v),rt)}return Te}function Use(v){return function(C){return Wf(C,v)}}function HS(v,C,k,j){var se=j?Fo:ho,Te=-1,We=C.length,rt=v;for(v===C&&(C=qd(C)),k&&(rt=Oi(v,Vr(k)));++Te<We;)for(var pt=0,ni=C[Te],si=k?k(ni):ni;(pt=se(rt,si,pt,j))>-1;)rt!==v&&Kh.call(rt,pt,1),Kh.call(v,pt,1);return v}function tL(v,C){for(var k=v?C.length:0,j=k-1;k--;){var se=C[k];if(k==j||se!==Te){var Te=se;$f(se)?Kh.call(v,se,1):jS(v,se)}}return v}function GS(v,C){return v+ph(Ui()*(C-v+1))}function jse(v,C,k,j){for(var se=-1,Te=Pe(zf((C-v)/(k||1)),0),We=ht(Te);Te--;)We[j?Te:++se]=v,v+=k;return We}function WS(v,C){var k="";if(!v||C<1||C>ze)return k;do C%2&&(k+=v),C=ph(C/2),C&&(v+=v);while(C);return k}function os(v,C){return o9(AL(v,C,Qd),v+"")}function $se(v){return jC(r4(v))}function Kse(v,C){var k=r4(v);return a8(k,Gf(C,0,k.length))}function ly(v,C,k,j){if(!wa(v))return v;C=g0(C,v);for(var se=-1,Te=C.length,We=Te-1,rt=v;rt!=null&&++se<Te;){var pt=gm(C[se]),ni=k;if(pt==="__proto__"||pt==="constructor"||pt==="prototype")return v;if(se!=We){var si=rt[pt];ni=j?j(si,pt,rt):t,ni===t&&(ni=wa(si)?si:$f(C[se+1])?[]:{})}N2(rt,pt,ni),rt=rt[pt]}return v}var iL=de?function(v,C){return de.set(v,C),v}:Qd,Yse=A1?function(v,C){return A1(v,"toString",{configurable:!0,enumerable:!1,value:g9(C),writable:!0})}:Qd;function qse(v){return a8(r4(v))}function _h(v,C,k){var j=-1,se=v.length;C<0&&(C=-C>se?0:se+C),k=k>se?se:k,k<0&&(k+=se),se=C>k?0:k-C>>>0,C>>>=0;for(var Te=ht(se);++j<se;)Te[j]=v[j+C];return Te}function Zse(v,C){var k;return pm(v,function(j,se,Te){return k=C(j,se,Te),!k}),!!k}function QC(v,C,k){var j=0,se=v==null?j:v.length;if(typeof C=="number"&&C===C&&se<=Ft){for(;j<se;){var Te=j+se>>>1,We=v[Te];We!==null&&!Au(We)&&(k?We<=C:We<C)?j=Te+1:se=Te}return se}return US(v,C,Qd,k)}function US(v,C,k,j){var se=0,Te=v==null?0:v.length;if(Te===0)return 0;C=k(C);for(var We=C!==C,rt=C===null,pt=Au(C),ni=C===t;se<Te;){var si=ph((se+Te)/2),pi=k(v[si]),Ki=pi!==t,Tn=pi===null,ir=pi===pi,Qr=Au(pi);if(We)var nr=j||ir;else ni?nr=ir&&(j||Ki):rt?nr=ir&&Ki&&(j||!Tn):pt?nr=ir&&Ki&&!Tn&&(j||!Qr):Tn||Qr?nr=!1:nr=j?pi<=C:pi<C;nr?se=si+1:Te=si}return st(Te,ft)}function nL(v,C){for(var k=-1,j=v.length,se=0,Te=[];++k<j;){var We=v[k],rt=C?C(We):We;if(!k||!Cp(rt,pt)){var pt=rt;Te[se++]=We===0?0:We}}return Te}function rL(v){return typeof v=="number"?v:Au(v)?Ae:+v}function Iu(v){if(typeof v=="string")return v;if(Pr(v))return Oi(v,Iu)+"";if(Au(v))return Tr?Tr.call(v):"";var C=v+"";return C=="0"&&1/v==-je?"-0":C}function f0(v,C,k){var j=-1,se=nn,Te=v.length,We=!0,rt=[],pt=rt;if(k)We=!1,se=Ii;else if(Te>=n){var ni=C?null:aoe(v);if(ni)return kc(ni);We=!1,se=Lo,pt=new Hf}else pt=C?[]:rt;e:for(;++j<Te;){var si=v[j],pi=C?C(si):si;if(si=k||si!==0?si:0,We&&pi===pi){for(var Ki=pt.length;Ki--;)if(pt[Ki]===pi)continue e;C&&pt.push(pi),rt.push(si)}else se(pt,pi,k)||(pt!==rt&&pt.push(pi),rt.push(si))}return rt}function jS(v,C){return C=g0(C,v),v=PL(v,C),v==null||delete v[gm(Ch(C))]}function sL(v,C,k,j){return ly(v,C,k(Wf(v,C)),j)}function JC(v,C,k,j){for(var se=v.length,Te=j?se:-1;(j?Te--:++Te<se)&&C(v[Te],Te,v););return k?_h(v,j?0:Te,j?Te+1:se):_h(v,j?Te+1:0,j?se:Te)}function oL(v,C){var k=v;return k instanceof hr&&(k=k.value()),Io(C,function(j,se){return se.func.apply(se.thisArg,is([j],se.args))},k)}function $S(v,C,k){var j=v.length;if(j<2)return j?f0(v[0]):[];for(var se=-1,Te=ht(j);++se<j;)for(var We=v[se],rt=-1;++rt<j;)rt!=se&&(Te[se]=m0(Te[se]||We,v[rt],C,k));return f0(Rl(Te,1),C,k)}function aL(v,C,k){for(var j=-1,se=v.length,Te=C.length,We={};++j<se;){var rt=j<Te?C[j]:t;k(We,v[j],rt)}return We}function KS(v){return Za(v)?v:[]}function YS(v){return typeof v=="function"?v:Qd}function g0(v,C){return Pr(v)?v:n9(v,C)?[v]:OL(po(v))}var Xse=os;function v0(v,C,k){var j=v.length;return k=k===t?j:k,!C&&k>=j?v:_h(v,C,k)}var lL=Yg||function(v){return la.clearTimeout(v)};function cL(v,C){if(C)return v.slice();var k=v.length,j=L2?L2(k):new v.constructor(k);return v.copy(j),j}function qS(v){var C=new v.constructor(v.byteLength);return new mp(C).set(new mp(v)),C}function Qse(v,C){var k=C?qS(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.byteLength)}function Jse(v){var C=new v.constructor(v.source,$a.exec(v));return C.lastIndex=v.lastIndex,C}function eoe(v){return Si?hn(Si.call(v)):{}}function dL(v,C){var k=C?qS(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.length)}function uL(v,C){if(v!==C){var k=v!==t,j=v===null,se=v===v,Te=Au(v),We=C!==t,rt=C===null,pt=C===C,ni=Au(C);if(!rt&&!ni&&!Te&&v>C||Te&&We&&pt&&!rt&&!ni||j&&We&&pt||!k&&pt||!se)return 1;if(!j&&!Te&&!ni&&v<C||ni&&k&&se&&!j&&!Te||rt&&k&&se||!We&&se||!pt)return-1}return 0}function toe(v,C,k){for(var j=-1,se=v.criteria,Te=C.criteria,We=se.length,rt=k.length;++j<We;){var pt=uL(se[j],Te[j]);if(pt){if(j>=rt)return pt;var ni=k[j];return pt*(ni=="desc"?-1:1)}}return v.index-C.index}function hL(v,C,k,j){for(var se=-1,Te=v.length,We=k.length,rt=-1,pt=C.length,ni=Pe(Te-We,0),si=ht(pt+ni),pi=!j;++rt<pt;)si[rt]=C[rt];for(;++se<We;)(pi||se<Te)&&(si[k[se]]=v[se]);for(;ni--;)si[rt++]=v[se++];return si}function pL(v,C,k,j){for(var se=-1,Te=v.length,We=-1,rt=k.length,pt=-1,ni=C.length,si=Pe(Te-rt,0),pi=ht(si+ni),Ki=!j;++se<si;)pi[se]=v[se];for(var Tn=se;++pt<ni;)pi[Tn+pt]=C[pt];for(;++We<rt;)(Ki||se<Te)&&(pi[Tn+k[We]]=v[se++]);return pi}function qd(v,C){var k=-1,j=v.length;for(C||(C=ht(j));++k<j;)C[k]=v[k];return C}function fm(v,C,k,j){var se=!k;k||(k={});for(var Te=-1,We=C.length;++Te<We;){var rt=C[Te],pt=j?j(k[rt],v[rt],rt,k,v):t;pt===t&&(pt=v[rt]),se?vp(k,rt,pt):N2(k,rt,pt)}return k}function ioe(v,C){return fm(v,i9(v),C)}function noe(v,C){return fm(v,DL(v),C)}function e8(v,C){return function(k,j){var se=Pr(k)?ct:AS,Te=C?C():{};return se(k,v,Xn(j,2),Te)}}function e4(v){return os(function(C,k){var j=-1,se=k.length,Te=se>1?k[se-1]:t,We=se>2?k[2]:t;for(Te=v.length>3&&typeof Te=="function"?(se--,Te):t,We&&Sd(k[0],k[1],We)&&(Te=se<3?t:Te,se=1),C=hn(C);++j<se;){var rt=k[j];rt&&v(C,rt,j,Te)}return C})}function mL(v,C){return function(k,j){if(k==null)return k;if(!Zd(k))return v(k,j);for(var se=k.length,Te=C?se:-1,We=hn(k);(C?Te--:++Te<se)&&j(We[Te],Te,We)!==!1;);return k}}function fL(v){return function(C,k,j){for(var se=-1,Te=hn(C),We=j(C),rt=We.length;rt--;){var pt=We[v?rt:++se];if(k(Te[pt],pt,Te)===!1)break}return C}}function roe(v,C,k){var j=C&_,se=cy(v);function Te(){var We=this&&this!==la&&this instanceof Te?se:v;return We.apply(j?k:this,arguments)}return Te}function gL(v){return function(C){C=po(C);var k=Hc(C)?ol(C):t,j=k?k[0]:C.charAt(0),se=k?v0(k,1).join(""):C.slice(1);return j[v]()+se}}function t4(v){return function(C){return Io(mO(pO(C).replace(rl,"")),v,"")}}function cy(v){return function(){var C=arguments;switch(C.length){case 0:return new v;case 1:return new v(C[0]);case 2:return new v(C[0],C[1]);case 3:return new v(C[0],C[1],C[2]);case 4:return new v(C[0],C[1],C[2],C[3]);case 5:return new v(C[0],C[1],C[2],C[3],C[4]);case 6:return new v(C[0],C[1],C[2],C[3],C[4],C[5]);case 7:return new v(C[0],C[1],C[2],C[3],C[4],C[5],C[6])}var k=Ds(v.prototype),j=v.apply(k,C);return wa(j)?j:k}}function soe(v,C,k){var j=cy(v);function se(){for(var Te=arguments.length,We=ht(Te),rt=Te,pt=i4(se);rt--;)We[rt]=arguments[rt];var ni=Te<3&&We[0]!==pt&&We[Te-1]!==pt?[]:_l(We,pt);if(Te-=ni.length,Te<k)return xL(v,C,t8,se.placeholder,t,We,ni,t,t,k-Te);var si=this&&this!==la&&this instanceof se?j:v;return Ne(si,this,We)}return se}function vL(v){return function(C,k,j){var se=hn(C);if(!Zd(C)){var Te=Xn(k,3);C=tc(C),k=function(rt){return Te(se[rt],rt,se)}}var We=v(C,k,j);return We>-1?se[Te?C[We]:We]:t}}function yL(v){return jf(function(C){var k=C.length,j=k,se=Zo.prototype.thru;for(v&&C.reverse();j--;){var Te=C[j];if(typeof Te!="function")throw new _r(r);if(se&&!We&&s8(Te)=="wrapper")var We=new Zo([],!0)}for(j=We?j:k;++j<k;){Te=C[j];var rt=s8(Te),pt=rt=="wrapper"?e9(Te):t;pt&&r9(pt[0])&&pt[1]==(G|E|I|A)&&!pt[4].length&&pt[9]==1?We=We[s8(pt[0])].apply(We,pt[3]):We=Te.length==1&&r9(Te)?We[rt]():We.thru(Te)}return function(){var ni=arguments,si=ni[0];if(We&&ni.length==1&&Pr(si))return We.plant(si).value();for(var pi=0,Ki=k?C[pi].apply(this,ni):si;++pi<k;)Ki=C[pi].call(this,Ki);return Ki}})}function t8(v,C,k,j,se,Te,We,rt,pt,ni){var si=C&G,pi=C&_,Ki=C&x,Tn=C&(E|M),ir=C&Y,Qr=Ki?t:cy(v);function nr(){for(var fs=arguments.length,As=ht(fs),Pu=fs;Pu--;)As[Pu]=arguments[Pu];if(Tn)var Td=i4(nr),Ru=uu(As,Td);if(j&&(As=hL(As,j,se,Tn)),Te&&(As=pL(As,Te,We,Tn)),fs-=Ru,Tn&&fs<ni){var Xa=_l(As,Td);return xL(v,C,t8,nr.placeholder,k,As,Xa,rt,pt,ni-fs)}var xp=pi?k:this,qf=Ki?xp[v]:v;return fs=As.length,rt?As=Toe(As,rt):ir&&fs>1&&As.reverse(),si&&pt<fs&&(As.length=pt),this&&this!==la&&this instanceof nr&&(qf=Qr||cy(qf)),qf.apply(xp,As)}return nr}function _L(v,C){return function(k,j){return yp(k,v,C(j),{})}}function i8(v,C){return function(k,j){var se;if(k===t&&j===t)return C;if(k!==t&&(se=k),j!==t){if(se===t)return j;typeof k=="string"||typeof j=="string"?(k=Iu(k),j=Iu(j)):(k=rL(k),j=rL(j)),se=v(k,j)}return se}}function ZS(v){return jf(function(C){return C=Oi(C,Vr(Xn())),os(function(k){var j=this;return v(C,function(se){return Ne(se,j,k)})})})}function n8(v,C){C=C===t?" ":Iu(C);var k=C.length;if(k<2)return k?WS(C,v):C;var j=WS(C,zf(v/Hl(C)));return Hc(C)?v0(ol(j),0,v).join(""):j.slice(0,v)}function ooe(v,C,k,j){var se=C&_,Te=cy(v);function We(){for(var rt=-1,pt=arguments.length,ni=-1,si=j.length,pi=ht(si+pt),Ki=this&&this!==la&&this instanceof We?Te:v;++ni<si;)pi[ni]=j[ni];for(;pt--;)pi[ni++]=arguments[++rt];return Ne(Ki,se?k:this,pi)}return We}function CL(v){return function(C,k,j){return j&&typeof j!="number"&&Sd(C,k,j)&&(k=j=t),C=Yf(C),k===t?(k=C,C=0):k=Yf(k),j=j===t?C<k?1:-1:Yf(j),jse(C,k,j,v)}}function r8(v){return function(C,k){return typeof C=="string"&&typeof k=="string"||(C=xh(C),k=xh(k)),v(C,k)}}function xL(v,C,k,j,se,Te,We,rt,pt,ni){var si=C&E,pi=si?We:t,Ki=si?t:We,Tn=si?Te:t,ir=si?t:Te;C|=si?I:z,C&=~(si?z:I),C&D||(C&=~(_|x));var Qr=[v,C,se,Tn,pi,ir,Ki,rt,pt,ni],nr=k.apply(t,Qr);return r9(v)&&RL(nr,Qr),nr.placeholder=j,FL(nr,v,C)}function XS(v){var C=Br[v];return function(k,j){if(k=xh(k),j=j==null?0:st(qr(j),292),j&&N(k)){var se=(po(k)+"e").split("e"),Te=C(se[0]+"e"+(+se[1]+j));return se=(po(Te)+"e").split("e"),+(se[0]+"e"+(+se[1]-j))}return C(k)}}var aoe=q&&1/kc(new q([,-0]))[1]==je?function(v){return new q(v)}:_9;function bL(v){return function(C){var k=Gc(C);return k==_i?jh(C):k==wn?Y0(C):Bi(C,v(C))}}function Uf(v,C,k,j,se,Te,We,rt){var pt=C&x;if(!pt&&typeof v!="function")throw new _r(r);var ni=j?j.length:0;if(ni||(C&=~(I|z),j=se=t),We=We===t?We:Pe(qr(We),0),rt=rt===t?rt:qr(rt),ni-=se?se.length:0,C&z){var si=j,pi=se;j=se=t}var Ki=pt?t:e9(v),Tn=[v,C,k,j,se,si,pi,Te,We,rt];if(Ki&&boe(Tn,Ki),v=Tn[0],C=Tn[1],k=Tn[2],j=Tn[3],se=Tn[4],rt=Tn[9]=Tn[9]===t?pt?0:v.length:Pe(Tn[9]-ni,0),!rt&&C&(E|M)&&(C&=~(E|M)),!C||C==_)var ir=roe(v,C,k);else C==E||C==M?ir=soe(v,C,rt):(C==I||C==(_|I))&&!se.length?ir=ooe(v,C,k,j):ir=t8.apply(t,Tn);var Qr=Ki?iL:RL;return FL(Qr(ir,Tn),v,C)}function wL(v,C,k,j){return v===t||Cp(v,Gl[k])&&!ss.call(j,k)?C:v}function SL(v,C,k,j,se,Te){return wa(v)&&wa(C)&&(Te.set(C,v),Xr(v,C,t,SL,Te),Te.delete(C)),v}function loe(v){return hy(v)?t:v}function TL(v,C,k,j,se,Te){var We=k&m,rt=v.length,pt=C.length;if(rt!=pt&&!(We&&pt>rt))return!1;var ni=Te.get(v),si=Te.get(C);if(ni&&si)return ni==C&&si==v;var pi=-1,Ki=!0,Tn=k&f?new Hf:t;for(Te.set(v,C),Te.set(C,v);++pi<rt;){var ir=v[pi],Qr=C[pi];if(j)var nr=We?j(Qr,ir,pi,C,v,Te):j(ir,Qr,pi,v,C,Te);if(nr!==t){if(nr)continue;Ki=!1;break}if(Tn){if(!sl(C,function(fs,As){if(!Lo(Tn,As)&&(ir===fs||se(ir,fs,k,j,Te)))return Tn.push(As)})){Ki=!1;break}}else if(!(ir===Qr||se(ir,Qr,k,j,Te))){Ki=!1;break}}return Te.delete(v),Te.delete(C),Ki}function coe(v,C,k,j,se,Te,We){switch(k){case ea:if(v.byteLength!=C.byteLength||v.byteOffset!=C.byteOffset)return!1;v=v.buffer,C=C.buffer;case Ts:return!(v.byteLength!=C.byteLength||!Te(new mp(v),new mp(C)));case Re:case ot:case ln:return Cp(+v,+C);case zt:return v.name==C.name&&v.message==C.message;case or:case gn:return v==C+"";case _i:var rt=jh;case wn:var pt=j&m;if(rt||(rt=kc),v.size!=C.size&&!pt)return!1;var ni=We.get(v);if(ni)return ni==C;j|=f,We.set(v,C);var si=TL(rt(v),rt(C),j,se,Te,We);return We.delete(v),si;case ts:if(Si)return Si.call(v)==Si.call(C)}return!1}function doe(v,C,k,j,se,Te){var We=k&m,rt=QS(v),pt=rt.length,ni=QS(C),si=ni.length;if(pt!=si&&!We)return!1;for(var pi=pt;pi--;){var Ki=rt[pi];if(!(We?Ki in C:ss.call(C,Ki)))return!1}var Tn=Te.get(v),ir=Te.get(C);if(Tn&&ir)return Tn==C&&ir==v;var Qr=!0;Te.set(v,C),Te.set(C,v);for(var nr=We;++pi<pt;){Ki=rt[pi];var fs=v[Ki],As=C[Ki];if(j)var Pu=We?j(As,fs,Ki,C,v,Te):j(fs,As,Ki,v,C,Te);if(!(Pu===t?fs===As||se(fs,As,k,j,Te):Pu)){Qr=!1;break}nr||(nr=Ki=="constructor")}if(Qr&&!nr){var Td=v.constructor,Ru=C.constructor;Td!=Ru&&"constructor"in v&&"constructor"in C&&!(typeof Td=="function"&&Td instanceof Td&&typeof Ru=="function"&&Ru instanceof Ru)&&(Qr=!1)}return Te.delete(v),Te.delete(C),Qr}function jf(v){return o9(AL(v,t,zL),v+"")}function QS(v){return ZC(v,tc,i9)}function JS(v){return ZC(v,Xd,DL)}var e9=de?function(v){return de.get(v)}:_9;function s8(v){for(var C=v.name+"",k=De[C],j=ss.call(De,C)?k.length:0;j--;){var se=k[j],Te=se.func;if(Te==null||Te==v)return se.name}return C}function i4(v){var C=ss.call(ae,"placeholder")?ae:v;return C.placeholder}function Xn(){var v=ae.iteratee||v9;return v=v===v9?U:v,arguments.length?v(arguments[0],arguments[1]):v}function o8(v,C){var k=v.__data__;return yoe(C)?k[typeof C=="string"?"string":"hash"]:k.map}function t9(v){for(var C=tc(v),k=C.length;k--;){var j=C[k],se=v[j];C[k]=[j,se,kL(se)]}return C}function z2(v,C){var k=K0(v,C);return B2(k)?k:t}function uoe(v){var C=ss.call(v,Yh),k=v[Yh];try{v[Yh]=t;var j=!0}catch{}var se=Bf.call(v);return j&&(C?v[Yh]=k:delete v[Yh]),se}var i9=La?function(v){return v==null?[]:(v=hn(v),Li(La(v),function(C){return u0.call(v,C)}))}:C9,DL=La?function(v){for(var C=[];v;)is(C,i9(v)),v=um(v);return C}:C9,Gc=vc;(Wr&&Gc(new Wr(new ArrayBuffer(1)))!=ea||$s&&Gc(new $s)!=_i||qo&&Gc(qo.resolve())!=Mn||q&&Gc(new q)!=wn||oe&&Gc(new oe)!=Ho)&&(Gc=function(v){var C=vc(v),k=C==bi?v.constructor:t,j=k?H2(k):"";if(j)switch(j){case Le:return ea;case xt:return _i;case Dt:return Mn;case Ut:return wn;case Jt:return Ho}return C});function hoe(v,C,k){for(var j=-1,se=k.length;++j<se;){var Te=k[j],We=Te.size;switch(Te.type){case"drop":v+=We;break;case"dropRight":C-=We;break;case"take":C=st(C,v+We);break;case"takeRight":v=Pe(v,C-We);break}}return{start:v,end:C}}function poe(v){var C=v.match(Qs);return C?C[1].split(Nr):[]}function EL(v,C,k){C=g0(C,v);for(var j=-1,se=C.length,Te=!1;++j<se;){var We=gm(C[j]);if(!(Te=v!=null&&k(v,We)))break;v=v[We]}return Te||++j!=se?Te:(se=v==null?0:v.length,!!se&&p8(se)&&$f(We,se)&&(Pr(v)||G2(v)))}function moe(v){var C=v.length,k=new v.constructor(C);return C&&typeof v[0]=="string"&&ss.call(v,"index")&&(k.index=v.index,k.input=v.input),k}function ML(v){return typeof v.constructor=="function"&&!dy(v)?Ds(um(v)):{}}function foe(v,C,k){var j=v.constructor;switch(C){case Ts:return qS(v);case Re:case ot:return new j(+v);case ea:return Qse(v,k);case co:case Zn:case gl:case sc:case Xl:case Xs:case Ya:case qa:case Nl:return dL(v,k);case _i:return new j;case ln:case gn:return new j(v);case or:return Jse(v);case wn:return new j;case ts:return eoe(v)}}function goe(v,C){var k=C.length;if(!k)return v;var j=k-1;return C[j]=(k>1?"& ":"")+C[j],C=C.join(k>2?", ":" "),v.replace(fr,`{
/* [wrapped with `+C+`] */
`)}function voe(v){return Pr(v)||G2(v)||!!(q3&&v&&v[q3])}function $f(v,C){var k=typeof v;return C=C??ze,!!C&&(k=="number"||k!="symbol"&&Eo.test(v))&&v>-1&&v%1==0&&v<C}function Sd(v,C,k){if(!wa(k))return!1;var j=typeof C;return(j=="number"?Zd(k)&&$f(C,k.length):j=="string"&&C in k)?Cp(k[C],v):!1}function n9(v,C){if(Pr(v))return!1;var k=typeof v;return k=="number"||k=="symbol"||k=="boolean"||v==null||Au(v)?!0:ja.test(v)||!Tl.test(v)||C!=null&&v in hn(C)}function yoe(v){var C=typeof v;return C=="string"||C=="number"||C=="symbol"||C=="boolean"?v!=="__proto__":v===null}function r9(v){var C=s8(v),k=ae[C];if(typeof k!="function"||!(C in hr.prototype))return!1;if(v===k)return!0;var j=e9(k);return!!j&&v===j[0]}function _oe(v){return!!Vf&&Vf in v}var Coe=bd?Kf:x9;function dy(v){var C=v&&v.constructor,k=typeof C=="function"&&C.prototype||Gl;return v===k}function kL(v){return v===v&&!wa(v)}function IL(v,C){return function(k){return k==null?!1:k[v]===C&&(C!==t||v in hn(k))}}function xoe(v){var C=u8(v,function(j){return k.size===a&&k.clear(),j}),k=C.cache;return C}function boe(v,C){var k=v[1],j=C[1],se=k|j,Te=se<(_|x|G),We=j==G&&k==E||j==G&&k==A&&v[7].length<=C[8]||j==(G|A)&&C[7].length<=C[8]&&k==E;if(!(Te||We))return v;j&_&&(v[2]=C[2],se|=k&_?0:D);var rt=C[3];if(rt){var pt=v[3];v[3]=pt?hL(pt,rt,C[4]):rt,v[4]=pt?_l(v[3],l):C[4]}return rt=C[5],rt&&(pt=v[5],v[5]=pt?pL(pt,rt,C[6]):rt,v[6]=pt?_l(v[5],l):C[6]),rt=C[7],rt&&(v[7]=rt),j&G&&(v[8]=v[8]==null?C[8]:st(v[8],C[8])),v[9]==null&&(v[9]=C[9]),v[0]=C[0],v[1]=se,v}function woe(v){var C=[];if(v!=null)for(var k in hn(v))C.push(k);return C}function Soe(v){return Bf.call(v)}function AL(v,C,k){return C=Pe(C===t?v.length-1:C,0),function(){for(var j=arguments,se=-1,Te=Pe(j.length-C,0),We=ht(Te);++se<Te;)We[se]=j[C+se];se=-1;for(var rt=ht(C+1);++se<C;)rt[se]=j[se];return rt[C]=k(We),Ne(v,this,rt)}}function PL(v,C){return C.length<2?v:Wf(v,_h(C,0,-1))}function Toe(v,C){for(var k=v.length,j=st(C.length,k),se=qd(v);j--;){var Te=C[j];v[j]=$f(Te,k)?se[Te]:t}return v}function s9(v,C){if(!(C==="constructor"&&typeof v[C]=="function")&&C!="__proto__")return v[C]}var RL=LL(iL),uy=J6||function(v,C){return la.setTimeout(v,C)},o9=LL(Yse);function FL(v,C,k){var j=C+"";return o9(v,goe(j,Doe(poe(j),k)))}function LL(v){var C=0,k=0;return function(){var j=ti(),se=ce-(j-k);if(k=j,se>0){if(++C>=pe)return arguments[0]}else C=0;return v.apply(t,arguments)}}function a8(v,C){var k=-1,j=v.length,se=j-1;for(C=C===t?j:C;++k<C;){var Te=GS(k,se),We=v[Te];v[Te]=v[k],v[k]=We}return v.length=C,v}var OL=xoe(function(v){var C=[];return v.charCodeAt(0)===46&&C.push(""),v.replace(Dr,function(k,j,se,Te){C.push(se?Te.replace(Ra,"$1"):j||k)}),C});function gm(v){if(typeof v=="string"||Au(v))return v;var C=v+"";return C=="0"&&1/v==-je?"-0":C}function H2(v){if(v!=null){try{return Fd.call(v)}catch{}try{return v+""}catch{}}return""}function Doe(v,C){return kt(Tt,function(k){var j="_."+k[0];C&k[1]&&!nn(v,j)&&v.push(j)}),v.sort()}function NL(v){if(v instanceof hr)return v.clone();var C=new Zo(v.__wrapped__,v.__chain__);return C.__actions__=qd(v.__actions__),C.__index__=v.__index__,C.__values__=v.__values__,C}function Eoe(v,C,k){(k?Sd(v,C,k):C===t)?C=1:C=Pe(qr(C),0);var j=v==null?0:v.length;if(!j||C<1)return[];for(var se=0,Te=0,We=ht(zf(j/C));se<j;)We[Te++]=_h(v,se,se+=C);return We}function Moe(v){for(var C=-1,k=v==null?0:v.length,j=0,se=[];++C<k;){var Te=v[C];Te&&(se[j++]=Te)}return se}function koe(){var v=arguments.length;if(!v)return[];for(var C=ht(v-1),k=arguments[0],j=v;j--;)C[j-1]=arguments[j];return is(Pr(k)?qd(k):[k],Rl(C,1))}var Ioe=os(function(v,C){return Za(v)?m0(v,Rl(C,1,Za,!0)):[]}),Aoe=os(function(v,C){var k=Ch(C);return Za(k)&&(k=t),Za(v)?m0(v,Rl(C,1,Za,!0),Xn(k,2)):[]}),Poe=os(function(v,C){var k=Ch(C);return Za(k)&&(k=t),Za(v)?m0(v,Rl(C,1,Za,!0),t,k):[]});function Roe(v,C,k){var j=v==null?0:v.length;return j?(C=k||C===t?1:qr(C),_h(v,C<0?0:C,j)):[]}function Foe(v,C,k){var j=v==null?0:v.length;return j?(C=k||C===t?1:qr(C),C=j-C,_h(v,0,C<0?0:C)):[]}function Loe(v,C){return v&&v.length?JC(v,Xn(C,3),!0,!0):[]}function Ooe(v,C){return v&&v.length?JC(v,Xn(C,3),!0):[]}function Noe(v,C,k,j){var se=v==null?0:v.length;return se?(k&&typeof k!="number"&&Sd(v,C,k)&&(k=0,j=se),FS(v,C,k,j)):[]}function VL(v,C,k){var j=v==null?0:v.length;if(!j)return-1;var se=k==null?0:qr(k);return se<0&&(se=Pe(j+se,0)),gc(v,Xn(C,3),se)}function BL(v,C,k){var j=v==null?0:v.length;if(!j)return-1;var se=j-1;return k!==t&&(se=qr(k),se=k<0?Pe(j+se,0):st(se,j-1)),gc(v,Xn(C,3),se,!0)}function zL(v){var C=v==null?0:v.length;return C?Rl(v,1):[]}function Voe(v){var C=v==null?0:v.length;return C?Rl(v,je):[]}function Boe(v,C){var k=v==null?0:v.length;return k?(C=C===t?1:qr(C),Rl(v,C)):[]}function zoe(v){for(var C=-1,k=v==null?0:v.length,j={};++C<k;){var se=v[C];j[se[0]]=se[1]}return j}function HL(v){return v&&v.length?v[0]:t}function Hoe(v,C,k){var j=v==null?0:v.length;if(!j)return-1;var se=k==null?0:qr(k);return se<0&&(se=Pe(j+se,0)),ho(v,C,se)}function Goe(v){var C=v==null?0:v.length;return C?_h(v,0,-1):[]}var Woe=os(function(v){var C=Oi(v,KS);return C.length&&C[0]===v[0]?oy(C):[]}),Uoe=os(function(v){var C=Ch(v),k=Oi(v,KS);return C===Ch(k)?C=t:k.pop(),k.length&&k[0]===v[0]?oy(k,Xn(C,2)):[]}),joe=os(function(v){var C=Ch(v),k=Oi(v,KS);return C=typeof C=="function"?C:t,C&&k.pop(),k.length&&k[0]===v[0]?oy(k,t,C):[]});function $oe(v,C){return v==null?"":Z.call(v,C)}function Ch(v){var C=v==null?0:v.length;return C?v[C-1]:t}function Koe(v,C,k){var j=v==null?0:v.length;if(!j)return-1;var se=j;return k!==t&&(se=qr(k),se=se<0?Pe(j+se,0):st(se,j-1)),C===C?Kg(v,C,se):gc(v,zc,se,!0)}function Yoe(v,C){return v&&v.length?yh(v,qr(C)):t}var qoe=os(GL);function GL(v,C){return v&&v.length&&C&&C.length?HS(v,C):v}function Zoe(v,C,k){return v&&v.length&&C&&C.length?HS(v,C,Xn(k,2)):v}function Xoe(v,C,k){return v&&v.length&&C&&C.length?HS(v,C,t,k):v}var Qoe=jf(function(v,C){var k=v==null?0:v.length,j=Q3(v,C);return tL(v,Oi(C,function(se){return $f(se,k)?+se:se}).sort(uL)),j});function Joe(v,C){var k=[];if(!(v&&v.length))return k;var j=-1,se=[],Te=v.length;for(C=Xn(C,3);++j<Te;){var We=v[j];C(We,j,v)&&(k.push(We),se.push(j))}return tL(v,se),k}function a9(v){return v==null?v:On.call(v)}function eae(v,C,k){var j=v==null?0:v.length;return j?(k&&typeof k!="number"&&Sd(v,C,k)?(C=0,k=j):(C=C==null?0:qr(C),k=k===t?j:qr(k)),_h(v,C,k)):[]}function tae(v,C){return QC(v,C)}function iae(v,C,k){return US(v,C,Xn(k,2))}function nae(v,C){var k=v==null?0:v.length;if(k){var j=QC(v,C);if(j<k&&Cp(v[j],C))return j}return-1}function rae(v,C){return QC(v,C,!0)}function sae(v,C,k){return US(v,C,Xn(k,2),!0)}function oae(v,C){var k=v==null?0:v.length;if(k){var j=QC(v,C,!0)-1;if(Cp(v[j],C))return j}return-1}function aae(v){return v&&v.length?nL(v):[]}function lae(v,C){return v&&v.length?nL(v,Xn(C,2)):[]}function cae(v){var C=v==null?0:v.length;return C?_h(v,1,C):[]}function dae(v,C,k){return v&&v.length?(C=k||C===t?1:qr(C),_h(v,0,C<0?0:C)):[]}function uae(v,C,k){var j=v==null?0:v.length;return j?(C=k||C===t?1:qr(C),C=j-C,_h(v,C<0?0:C,j)):[]}function hae(v,C){return v&&v.length?JC(v,Xn(C,3),!1,!0):[]}function pae(v,C){return v&&v.length?JC(v,Xn(C,3)):[]}var mae=os(function(v){return f0(Rl(v,1,Za,!0))}),fae=os(function(v){var C=Ch(v);return Za(C)&&(C=t),f0(Rl(v,1,Za,!0),Xn(C,2))}),gae=os(function(v){var C=Ch(v);return C=typeof C=="function"?C:t,f0(Rl(v,1,Za,!0),t,C)});function vae(v){return v&&v.length?f0(v):[]}function yae(v,C){return v&&v.length?f0(v,Xn(C,2)):[]}function _ae(v,C){return C=typeof C=="function"?C:t,v&&v.length?f0(v,t,C):[]}function l9(v){if(!(v&&v.length))return[];var C=0;return v=Li(v,function(k){if(Za(k))return C=Pe(k.length,C),!0}),vi(C,function(k){return Oi(v,Mc(k))})}function WL(v,C){if(!(v&&v.length))return[];var k=l9(v);return C==null?k:Oi(k,function(j){return Ne(C,t,j)})}var Cae=os(function(v,C){return Za(v)?m0(v,C):[]}),xae=os(function(v){return $S(Li(v,Za))}),bae=os(function(v){var C=Ch(v);return Za(C)&&(C=t),$S(Li(v,Za),Xn(C,2))}),wae=os(function(v){var C=Ch(v);return C=typeof C=="function"?C:t,$S(Li(v,Za),t,C)}),Sae=os(l9);function Tae(v,C){return aL(v||[],C||[],N2)}function Dae(v,C){return aL(v||[],C||[],ly)}var Eae=os(function(v){var C=v.length,k=C>1?v[C-1]:t;return k=typeof k=="function"?(v.pop(),k):t,WL(v,k)});function UL(v){var C=ae(v);return C.__chain__=!0,C}function Mae(v,C){return C(v),v}function l8(v,C){return C(v)}var kae=jf(function(v){var C=v.length,k=C?v[0]:0,j=this.__wrapped__,se=function(Te){return Q3(Te,v)};return C>1||this.__actions__.length||!(j instanceof hr)||!$f(k)?this.thru(se):(j=j.slice(k,+k+(C?1:0)),j.__actions__.push({func:l8,args:[se],thisArg:t}),new Zo(j,this.__chain__).thru(function(Te){return C&&!Te.length&&Te.push(t),Te}))});function Iae(){return UL(this)}function Aae(){return new Zo(this.value(),this.__chain__)}function Pae(){this.__values__===t&&(this.__values__=rO(this.value()));var v=this.__index__>=this.__values__.length,C=v?t:this.__values__[this.__index__++];return{done:v,value:C}}function Rae(){return this}function Fae(v){for(var C,k=this;k instanceof lo;){var j=NL(k);j.__index__=0,j.__values__=t,C?se.__wrapped__=j:C=j;var se=j;k=k.__wrapped__}return se.__wrapped__=v,C}function Lae(){var v=this.__wrapped__;if(v instanceof hr){var C=v;return this.__actions__.length&&(C=new hr(this)),C=C.reverse(),C.__actions__.push({func:l8,args:[a9],thisArg:t}),new Zo(C,this.__chain__)}return this.thru(a9)}function Oae(){return oL(this.__wrapped__,this.__actions__)}var Nae=e8(function(v,C,k){ss.call(v,k)?++v[k]:vp(v,k,1)});function Vae(v,C,k){var j=Pr(v)?hi:RS;return k&&Sd(v,C,k)&&(C=t),j(v,Xn(C,3))}function Bae(v,C){var k=Pr(v)?Li:YC;return k(v,Xn(C,3))}var zae=vL(VL),Hae=vL(BL);function Gae(v,C){return Rl(c8(v,C),1)}function Wae(v,C){return Rl(c8(v,C),je)}function Uae(v,C,k){return k=k===t?1:qr(k),Rl(c8(v,C),k)}function jL(v,C){var k=Pr(v)?kt:pm;return k(v,Xn(C,3))}function $L(v,C){var k=Pr(v)?Ht:KC;return k(v,Xn(C,3))}var jae=e8(function(v,C,k){ss.call(v,k)?v[k].push(C):vp(v,k,[C])});function $ae(v,C,k,j){v=Zd(v)?v:r4(v),k=k&&!j?qr(k):0;var se=v.length;return k<0&&(k=Pe(se+k,0)),m8(v)?k<=se&&v.indexOf(C,k)>-1:!!se&&ho(v,C,k)>-1}var Kae=os(function(v,C,k){var j=-1,se=typeof C=="function",Te=Zd(v)?ht(v.length):[];return pm(v,function(We){Te[++j]=se?Ne(C,We,k):vh(We,C,k)}),Te}),Yae=e8(function(v,C,k){vp(v,k,C)});function c8(v,C){var k=Pr(v)?Oi:Wt;return k(v,Xn(C,3))}function qae(v,C,k,j){return v==null?[]:(Pr(C)||(C=C==null?[]:[C]),k=j?t:k,Pr(k)||(k=k==null?[]:[k]),_p(v,C,k))}var Zae=e8(function(v,C,k){v[k?0:1].push(C)},function(){return[[],[]]});function Xae(v,C,k){var j=Pr(v)?Io:we,se=arguments.length<3;return j(v,Xn(C,4),k,se,pm)}function Qae(v,C,k){var j=Pr(v)?Ao:we,se=arguments.length<3;return j(v,Xn(C,4),k,se,KC)}function Jae(v,C){var k=Pr(v)?Li:YC;return k(v,h8(Xn(C,3)))}function ele(v){var C=Pr(v)?jC:$se;return C(v)}function tle(v,C,k){(k?Sd(v,C,k):C===t)?C=1:C=qr(C);var j=Pr(v)?kS:Kse;return j(v,C)}function ile(v){var C=Pr(v)?IS:qse;return C(v)}function nle(v){if(v==null)return 0;if(Zd(v))return m8(v)?Hl(v):v.length;var C=Gc(v);return C==_i||C==wn?v.size:J(v).length}function rle(v,C,k){var j=Pr(v)?sl:Zse;return k&&Sd(v,C,k)&&(C=t),j(v,Xn(C,3))}var sle=os(function(v,C){if(v==null)return[];var k=C.length;return k>1&&Sd(v,C[0],C[1])?C=[]:k>2&&Sd(C[0],C[1],C[2])&&(C=[C[0]]),_p(v,Rl(C,1),[])}),d8=hv||function(){return la.Date.now()};function ole(v,C){if(typeof C!="function")throw new _r(r);return v=qr(v),function(){if(--v<1)return C.apply(this,arguments)}}function KL(v,C,k){return C=k?t:C,C=v&&C==null?v.length:C,Uf(v,G,t,t,t,t,C)}function YL(v,C){var k;if(typeof C!="function")throw new _r(r);return v=qr(v),function(){return--v>0&&(k=C.apply(this,arguments)),v<=1&&(C=t),k}}var c9=os(function(v,C,k){var j=_;if(k.length){var se=_l(k,i4(c9));j|=I}return Uf(v,j,C,k,se)}),qL=os(function(v,C,k){var j=_|x;if(k.length){var se=_l(k,i4(qL));j|=I}return Uf(C,j,v,k,se)});function ZL(v,C,k){C=k?t:C;var j=Uf(v,E,t,t,t,t,t,C);return j.placeholder=ZL.placeholder,j}function XL(v,C,k){C=k?t:C;var j=Uf(v,M,t,t,t,t,t,C);return j.placeholder=XL.placeholder,j}function QL(v,C,k){var j,se,Te,We,rt,pt,ni=0,si=!1,pi=!1,Ki=!0;if(typeof v!="function")throw new _r(r);C=xh(C)||0,wa(k)&&(si=!!k.leading,pi="maxWait"in k,Te=pi?Pe(xh(k.maxWait)||0,C):Te,Ki="trailing"in k?!!k.trailing:Ki);function Tn(Xa){var xp=j,qf=se;return j=se=t,ni=Xa,We=v.apply(qf,xp),We}function ir(Xa){return ni=Xa,rt=uy(fs,C),si?Tn(Xa):We}function Qr(Xa){var xp=Xa-pt,qf=Xa-ni,vO=C-xp;return pi?st(vO,Te-qf):vO}function nr(Xa){var xp=Xa-pt,qf=Xa-ni;return pt===t||xp>=C||xp<0||pi&&qf>=Te}function fs(){var Xa=d8();if(nr(Xa))return As(Xa);rt=uy(fs,Qr(Xa))}function As(Xa){return rt=t,Ki&&j?Tn(Xa):(j=se=t,We)}function Pu(){rt!==t&&lL(rt),ni=0,j=pt=se=rt=t}function Td(){return rt===t?We:As(d8())}function Ru(){var Xa=d8(),xp=nr(Xa);if(j=arguments,se=this,pt=Xa,xp){if(rt===t)return ir(pt);if(pi)return lL(rt),rt=uy(fs,C),Tn(pt)}return rt===t&&(rt=uy(fs,C)),We}return Ru.cancel=Pu,Ru.flush=Td,Ru}var ale=os(function(v,C){return mh(v,1,C)}),lle=os(function(v,C,k){return mh(v,xh(C)||0,k)});function cle(v){return Uf(v,Y)}function u8(v,C){if(typeof v!="function"||C!=null&&typeof C!="function")throw new _r(r);var k=function(){var j=arguments,se=C?C.apply(this,j):j[0],Te=k.cache;if(Te.has(se))return Te.get(se);var We=v.apply(this,j);return k.cache=Te.set(se,We)||Te,We};return k.cache=new(u8.Cache||gp),k}u8.Cache=gp;function h8(v){if(typeof v!="function")throw new _r(r);return function(){var C=arguments;switch(C.length){case 0:return!v.call(this);case 1:return!v.call(this,C[0]);case 2:return!v.call(this,C[0],C[1]);case 3:return!v.call(this,C[0],C[1],C[2])}return!v.apply(this,C)}}function dle(v){return YL(2,v)}var ule=Xse(function(v,C){C=C.length==1&&Pr(C[0])?Oi(C[0],Vr(Xn())):Oi(Rl(C,1),Vr(Xn()));var k=C.length;return os(function(j){for(var se=-1,Te=st(j.length,k);++se<Te;)j[se]=C[se].call(this,j[se]);return Ne(v,this,j)})}),d9=os(function(v,C){var k=_l(C,i4(d9));return Uf(v,I,t,C,k)}),JL=os(function(v,C){var k=_l(C,i4(JL));return Uf(v,z,t,C,k)}),hle=jf(function(v,C){return Uf(v,A,t,t,t,C)});function ple(v,C){if(typeof v!="function")throw new _r(r);return C=C===t?C:qr(C),os(v,C)}function mle(v,C){if(typeof v!="function")throw new _r(r);return C=C==null?0:Pe(qr(C),0),os(function(k){var j=k[C],se=v0(k,0,C);return j&&is(se,j),Ne(v,this,se)})}function fle(v,C,k){var j=!0,se=!0;if(typeof v!="function")throw new _r(r);return wa(k)&&(j="leading"in k?!!k.leading:j,se="trailing"in k?!!k.trailing:se),QL(v,C,{leading:j,maxWait:C,trailing:se})}function gle(v){return KL(v,1)}function vle(v,C){return d9(YS(C),v)}function yle(){if(!arguments.length)return[];var v=arguments[0];return Pr(v)?v:[v]}function _le(v){return wd(v,u)}function Cle(v,C){return C=typeof C=="function"?C:t,wd(v,u,C)}function xle(v){return wd(v,c|u)}function ble(v,C){return C=typeof C=="function"?C:t,wd(v,c|u,C)}function wle(v,C){return C==null||$C(v,C,tc(C))}function Cp(v,C){return v===C||v!==v&&C!==C}var Sle=r8(sy),Tle=r8(function(v,C){return v>=C}),G2=XC(function(){return arguments}())?XC:function(v){return Oa(v)&&ss.call(v,"callee")&&!u0.call(v,"callee")},Pr=ht.isArray,Dle=k1?Vr(k1):VS;function Zd(v){return v!=null&&p8(v.length)&&!Kf(v)}function Za(v){return Oa(v)&&Zd(v)}function Ele(v){return v===!0||v===!1||Oa(v)&&vc(v)==Re}var y0=T||x9,Mle=H?Vr(H):BS;function kle(v){return Oa(v)&&v.nodeType===1&&!hy(v)}function Ile(v){if(v==null)return!0;if(Zd(v)&&(Pr(v)||typeof v=="string"||typeof v.splice=="function"||y0(v)||n4(v)||G2(v)))return!v.length;var C=Gc(v);if(C==_i||C==wn)return!v.size;if(dy(v))return!J(v).length;for(var k in v)if(ss.call(v,k))return!1;return!0}function Ale(v,C){return V2(v,C)}function Ple(v,C,k){k=typeof k=="function"?k:t;var j=k?k(v,C):t;return j===t?V2(v,C,t,k):!!j}function u9(v){if(!Oa(v))return!1;var C=vc(v);return C==zt||C==jt||typeof v.message=="string"&&typeof v.name=="string"&&!hy(v)}function Rle(v){return typeof v=="number"&&N(v)}function Kf(v){if(!wa(v))return!1;var C=vc(v);return C==qt||C==ui||C==_t||C==Fn}function eO(v){return typeof v=="number"&&v==qr(v)}function p8(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=ze}function wa(v){var C=typeof v;return v!=null&&(C=="object"||C=="function")}function Oa(v){return v!=null&&typeof v=="object"}var tO=te?Vr(te):ay;function Fle(v,C){return v===C||mm(v,C,t9(C))}function Lle(v,C,k){return k=typeof k=="function"?k:t,mm(v,C,t9(C),k)}function Ole(v){return iO(v)&&v!=+v}function Nle(v){if(Coe(v))throw new Ni(i);return B2(v)}function Vle(v){return v===null}function Ble(v){return v==null}function iO(v){return typeof v=="number"||Oa(v)&&vc(v)==ln}function hy(v){if(!Oa(v)||vc(v)!=bi)return!1;var C=um(v);if(C===null)return!0;var k=ss.call(C,"constructor")&&C.constructor;return typeof k=="function"&&k instanceof k&&Fd.call(k)==K3}var h9=ge?Vr(ge):xs;function zle(v){return eO(v)&&v>=-ze&&v<=ze}var nO=ke?Vr(ke):S;function m8(v){return typeof v=="string"||!Pr(v)&&Oa(v)&&vc(v)==gn}function Au(v){return typeof v=="symbol"||Oa(v)&&vc(v)==ts}var n4=He?Vr(He):P;function Hle(v){return v===t}function Gle(v){return Oa(v)&&Gc(v)==Ho}function Wle(v){return Oa(v)&&vc(v)==kn}var Ule=r8(Qe),jle=r8(function(v,C){return v<=C});function rO(v){if(!v)return[];if(Zd(v))return m8(v)?ol(v):qd(v);if(Zm&&v[Zm])return Nf(v[Zm]());var C=Gc(v),k=C==_i?jh:C==wn?kc:r4;return k(v)}function Yf(v){if(!v)return v===0?v:0;if(v=xh(v),v===je||v===-je){var C=v<0?-1:1;return C*Ge}return v===v?v:0}function qr(v){var C=Yf(v),k=C%1;return C===C?k?C-k:C:0}function sO(v){return v?Gf(qr(v),0,Ye):0}function xh(v){if(typeof v=="number")return v;if(Au(v))return Ae;if(wa(v)){var C=typeof v.valueOf=="function"?v.valueOf():v;v=wa(C)?C+"":C}if(typeof v!="string")return v===0?v:+v;v=jn(v);var k=Gh.test(v);return k||Hs.test(v)?Dl(v.slice(2),k?2:8):Da.test(v)?Ae:+v}function oO(v){return fm(v,Xd(v))}function $le(v){return v?Gf(qr(v),-ze,ze):v===0?v:0}function po(v){return v==null?"":Iu(v)}var Kle=e4(function(v,C){if(dy(C)||Zd(C)){fm(C,tc(C),v);return}for(var k in C)ss.call(C,k)&&N2(v,k,C[k])}),aO=e4(function(v,C){fm(C,Xd(C),v)}),f8=e4(function(v,C,k,j){fm(C,Xd(C),v,j)}),Yle=e4(function(v,C,k,j){fm(C,tc(C),v,j)}),qle=jf(Q3);function Zle(v,C){var k=Ds(v);return C==null?k:ty(k,C)}var Xle=os(function(v,C){v=hn(v);var k=-1,j=C.length,se=j>2?C[2]:t;for(se&&Sd(C[0],C[1],se)&&(j=1);++k<j;)for(var Te=C[k],We=Xd(Te),rt=-1,pt=We.length;++rt<pt;){var ni=We[rt],si=v[ni];(si===t||Cp(si,Gl[ni])&&!ss.call(v,ni))&&(v[ni]=Te[ni])}return v}),Qle=os(function(v){return v.push(t,SL),Ne(lO,t,v)});function Jle(v,C){return Ro(v,Xn(C,3),fh)}function ece(v,C){return Ro(v,Xn(C,3),ry)}function tce(v,C){return v==null?v:ny(v,Xn(C,3),Xd)}function ice(v,C){return v==null?v:qC(v,Xn(C,3),Xd)}function nce(v,C){return v&&fh(v,Xn(C,3))}function rce(v,C){return v&&ry(v,Xn(C,3))}function sce(v){return v==null?[]:gh(v,tc(v))}function oce(v){return v==null?[]:gh(v,Xd(v))}function p9(v,C,k){var j=v==null?t:Wf(v,C);return j===t?k:j}function ace(v,C){return v!=null&&EL(v,C,LS)}function m9(v,C){return v!=null&&EL(v,C,OS)}var lce=_L(function(v,C,k){C!=null&&typeof C.toString!="function"&&(C=Bf.call(C)),v[C]=k},g9(Qd)),cce=_L(function(v,C,k){C!=null&&typeof C.toString!="function"&&(C=Bf.call(C)),ss.call(v,C)?v[C].push(k):v[C]=[k]},Xn),dce=os(vh);function tc(v){return Zd(v)?X3(v):J(v)}function Xd(v){return Zd(v)?X3(v,!0):fe(v)}function uce(v,C){var k={};return C=Xn(C,3),fh(v,function(j,se,Te){vp(k,C(j,se,Te),j)}),k}function hce(v,C){var k={};return C=Xn(C,3),fh(v,function(j,se,Te){vp(k,se,C(j,se,Te))}),k}var pce=e4(function(v,C,k){Xr(v,C,k)}),lO=e4(function(v,C,k,j){Xr(v,C,k,j)}),mce=jf(function(v,C){var k={};if(v==null)return k;var j=!1;C=Oi(C,function(Te){return Te=g0(Te,v),j||(j=Te.length>1),Te}),fm(v,JS(v),k),j&&(k=wd(k,c|d|u,loe));for(var se=C.length;se--;)jS(k,C[se]);return k});function fce(v,C){return cO(v,h8(Xn(C)))}var gce=jf(function(v,C){return v==null?{}:Wse(v,C)});function cO(v,C){if(v==null)return{};var k=Oi(JS(v),function(j){return[j]});return C=Xn(C),eL(v,k,function(j,se){return C(j,se[0])})}function vce(v,C,k){C=g0(C,v);var j=-1,se=C.length;for(se||(se=1,v=t);++j<se;){var Te=v==null?t:v[gm(C[j])];Te===t&&(j=se,Te=k),v=Kf(Te)?Te.call(v):Te}return v}function yce(v,C,k){return v==null?v:ly(v,C,k)}function _ce(v,C,k,j){return j=typeof j=="function"?j:t,v==null?v:ly(v,C,k,j)}var dO=bL(tc),uO=bL(Xd);function Cce(v,C,k){var j=Pr(v),se=j||y0(v)||n4(v);if(C=Xn(C,4),k==null){var Te=v&&v.constructor;se?k=j?new Te:[]:wa(v)?k=Kf(Te)?Ds(um(v)):{}:k={}}return(se?kt:fh)(v,function(We,rt,pt){return C(k,We,rt,pt)}),k}function xce(v,C){return v==null?!0:jS(v,C)}function bce(v,C,k){return v==null?v:sL(v,C,YS(k))}function wce(v,C,k,j){return j=typeof j=="function"?j:t,v==null?v:sL(v,C,YS(k),j)}function r4(v){return v==null?[]:El(v,tc(v))}function Sce(v){return v==null?[]:El(v,Xd(v))}function Tce(v,C,k){return k===t&&(k=C,C=t),k!==t&&(k=xh(k),k=k===k?k:0),C!==t&&(C=xh(C),C=C===C?C:0),Gf(xh(v),C,k)}function Dce(v,C,k){return C=Yf(C),k===t?(k=C,C=0):k=Yf(k),v=xh(v),NS(v,C,k)}function Ece(v,C,k){if(k&&typeof k!="boolean"&&Sd(v,C,k)&&(C=k=t),k===t&&(typeof C=="boolean"?(k=C,C=t):typeof v=="boolean"&&(k=v,v=t)),v===t&&C===t?(v=0,C=1):(v=Yf(v),C===t?(C=v,v=0):C=Yf(C)),v>C){var j=v;v=C,C=j}if(k||v%1||C%1){var se=Ui();return st(v+se*(C-v+Wp("1e-"+((se+"").length-1))),C)}return GS(v,C)}var Mce=t4(function(v,C,k){return C=C.toLowerCase(),v+(k?hO(C):C)});function hO(v){return f9(po(v).toLowerCase())}function pO(v){return v=po(v),v&&v.replace(Mo,zl).replace(pp,"")}function kce(v,C,k){v=po(v),C=Iu(C);var j=v.length;k=k===t?j:Gf(qr(k),0,j);var se=k;return k-=C.length,k>=0&&v.slice(k,se)==C}function Ice(v){return v=po(v),v&&du.test(v)?v.replace(aa,Mu):v}function Ace(v){return v=po(v),v&&ds.test(v)?v.replace(Ad,"\\$&"):v}var Pce=t4(function(v,C,k){return v+(k?"-":"")+C.toLowerCase()}),Rce=t4(function(v,C,k){return v+(k?" ":"")+C.toLowerCase()}),Fce=gL("toLowerCase");function Lce(v,C,k){v=po(v),C=qr(C);var j=C?Hl(v):0;if(!C||j>=C)return v;var se=(C-j)/2;return n8(ph(se),k)+v+n8(zf(se),k)}function Oce(v,C,k){v=po(v),C=qr(C);var j=C?Hl(v):0;return C&&j<C?v+n8(C-j,k):v}function Nce(v,C,k){v=po(v),C=qr(C);var j=C?Hl(v):0;return C&&j<C?n8(C-j,k)+v:v}function Vce(v,C,k){return k||C==null?C=0:C&&(C=+C),Ei(po(v).replace(_a,""),C||0)}function Bce(v,C,k){return(k?Sd(v,C,k):C===t)?C=1:C=qr(C),WS(po(v),C)}function zce(){var v=arguments,C=po(v[0]);return v.length<3?C:C.replace(v[1],v[2])}var Hce=t4(function(v,C,k){return v+(k?"_":"")+C.toLowerCase()});function Gce(v,C,k){return k&&typeof k!="number"&&Sd(v,C,k)&&(C=k=t),k=k===t?Ye:k>>>0,k?(v=po(v),v&&(typeof C=="string"||C!=null&&!h9(C))&&(C=Iu(C),!C&&Hc(v))?v0(ol(v),0,k):v.split(C,k)):[]}var Wce=t4(function(v,C,k){return v+(k?" ":"")+f9(C)});function Uce(v,C,k){return v=po(v),k=k==null?0:Gf(qr(k),0,v.length),C=Iu(C),v.slice(k,k+C.length)==C}function jce(v,C,k){var j=ae.templateSettings;k&&Sd(v,C,k)&&(C=t),v=po(v),C=f8({},C,j,wL);var se=f8({},C.imports,j.imports,wL),Te=tc(se),We=El(se,Te),rt,pt,ni=0,si=C.interpolate||Js,pi="__p += '",Ki=us((C.escape||Js).source+"|"+si.source+"|"+(si===Vl?Ta:Js).source+"|"+(C.evaluate||Js).source+"|$","g"),Tn="//# sourceURL="+(ss.call(C,"sourceURL")?(C.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lf+"]")+`
`;v.replace(Ki,function(nr,fs,As,Pu,Td,Ru){return As||(As=Pu),pi+=v.slice(ni,Ru).replace(td,Of),fs&&(rt=!0,pi+=`' +
__e(`+fs+`) +
'`),Td&&(pt=!0,pi+=`';
`+Td+`;
__p += '`),As&&(pi+=`' +
((__t = (`+As+`)) == null ? '' : __t) +
'`),ni=Ru+nr.length,nr}),pi+=`';
`;var ir=ss.call(C,"variable")&&C.variable;if(!ir)pi=`with (obj) {
`+pi+`
}
`;else if(ro.test(ir))throw new Ni(s);pi=(pt?pi.replace(zh,""):pi).replace(Hh,"$1").replace(Rf,"$1;"),pi="function("+(ir||"obj")+`) {
`+(ir?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(rt?", __e = _.escape":"")+(pt?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+pi+`return __p
}`;var Qr=fO(function(){return Qi(Te,Tn+"return "+pi).apply(t,We)});if(Qr.source=pi,u9(Qr))throw Qr;return Qr}function $ce(v){return po(v).toLowerCase()}function Kce(v){return po(v).toUpperCase()}function Yce(v,C,k){if(v=po(v),v&&(k||C===t))return jn(v);if(!v||!(C=Iu(C)))return v;var j=ol(v),se=ol(C),Te=Er(j,se),We=yo(j,se)+1;return v0(j,Te,We).join("")}function qce(v,C,k){if(v=po(v),v&&(k||C===t))return v.slice(0,jp(v)+1);if(!v||!(C=Iu(C)))return v;var j=ol(v),se=yo(j,ol(C))+1;return v0(j,0,se).join("")}function Zce(v,C,k){if(v=po(v),v&&(k||C===t))return v.replace(_a,"");if(!v||!(C=Iu(C)))return v;var j=ol(v),se=Er(j,ol(C));return v0(j,se).join("")}function Xce(v,C){var k=X,j=ne;if(wa(C)){var se="separator"in C?C.separator:se;k="length"in C?qr(C.length):k,j="omission"in C?Iu(C.omission):j}v=po(v);var Te=v.length;if(Hc(v)){var We=ol(v);Te=We.length}if(k>=Te)return v;var rt=k-Hl(j);if(rt<1)return j;var pt=We?v0(We,0,rt).join(""):v.slice(0,rt);if(se===t)return pt+j;if(We&&(rt+=pt.length-rt),h9(se)){if(v.slice(rt).search(se)){var ni,si=pt;for(se.global||(se=us(se.source,po($a.exec(se))+"g")),se.lastIndex=0;ni=se.exec(si);)var pi=ni.index;pt=pt.slice(0,pi===t?rt:pi)}}else if(v.indexOf(Iu(se),rt)!=rt){var Ki=pt.lastIndexOf(se);Ki>-1&&(pt=pt.slice(0,Ki))}return pt+j}function Qce(v){return v=po(v),v&&jd.test(v)?v.replace(Id,F2):v}var Jce=t4(function(v,C,k){return v+(k?" ":"")+C.toUpperCase()}),f9=gL("toUpperCase");function mO(v,C,k){return v=po(v),C=k?t:C,C===t?Rd(v)?Mt(v):rd(v):v.match(C)||[]}var fO=os(function(v,C){try{return Ne(v,t,C)}catch(k){return u9(k)?k:new Ni(k)}}),ede=jf(function(v,C){return kt(C,function(k){k=gm(k),vp(v,k,c9(v[k],v))}),v});function tde(v){var C=v==null?0:v.length,k=Xn();return v=C?Oi(v,function(j){if(typeof j[1]!="function")throw new _r(r);return[k(j[0]),j[1]]}):[],os(function(j){for(var se=-1;++se<C;){var Te=v[se];if(Ne(Te[0],this,j))return Ne(Te[1],this,j)}})}function ide(v){return iy(wd(v,c))}function g9(v){return function(){return v}}function nde(v,C){return v==null||v!==v?C:v}var rde=yL(),sde=yL(!0);function Qd(v){return v}function v9(v){return U(typeof v=="function"?v:wd(v,c))}function ode(v){return rn(wd(v,c))}function ade(v,C){return ar(v,wd(C,c))}var lde=os(function(v,C){return function(k){return vh(k,v,C)}}),cde=os(function(v,C){return function(k){return vh(v,k,C)}});function y9(v,C,k){var j=tc(C),se=gh(C,j);k==null&&!(wa(C)&&(se.length||!j.length))&&(k=C,C=v,v=this,se=gh(C,tc(C)));var Te=!(wa(k)&&"chain"in k)||!!k.chain,We=Kf(v);return kt(se,function(rt){var pt=C[rt];v[rt]=pt,We&&(v.prototype[rt]=function(){var ni=this.__chain__;if(Te||ni){var si=v(this.__wrapped__),pi=si.__actions__=qd(this.__actions__);return pi.push({func:pt,args:arguments,thisArg:v}),si.__chain__=ni,si}return pt.apply(v,is([this.value()],arguments))})}),v}function dde(){return la._===this&&(la._=Y3),this}function _9(){}function ude(v){return v=qr(v),os(function(C){return yh(C,v)})}var hde=ZS(Oi),pde=ZS(hi),mde=ZS(sl);function gO(v){return n9(v)?Mc(gm(v)):Use(v)}function fde(v){return function(C){return v==null?t:Wf(v,C)}}var gde=CL(),vde=CL(!0);function C9(){return[]}function x9(){return!1}function yde(){return{}}function _de(){return""}function Cde(){return!0}function xde(v,C){if(v=qr(v),v<1||v>ze)return[];var k=Ye,j=st(v,Ye);C=Xn(C),v-=Ye;for(var se=vi(j,C);++k<v;)C(k);return se}function bde(v){return Pr(v)?Oi(v,gm):Au(v)?[v]:qd(OL(po(v)))}function wde(v){var C=++hu;return po(v)+C}var Sde=i8(function(v,C){return v+C},0),Tde=XS("ceil"),Dde=i8(function(v,C){return v/C},1),Ede=XS("floor");function Mde(v){return v&&v.length?J3(v,Qd,sy):t}function kde(v,C){return v&&v.length?J3(v,Xn(C,2),sy):t}function Ide(v){return Cd(v,Qd)}function Ade(v,C){return Cd(v,Xn(C,2))}function Pde(v){return v&&v.length?J3(v,Qd,Qe):t}function Rde(v,C){return v&&v.length?J3(v,Xn(C,2),Qe):t}var Fde=i8(function(v,C){return v*C},1),Lde=XS("round"),Ode=i8(function(v,C){return v-C},0);function Nde(v){return v&&v.length?mt(v,Qd):0}function Vde(v,C){return v&&v.length?mt(v,Xn(C,2)):0}return ae.after=ole,ae.ary=KL,ae.assign=Kle,ae.assignIn=aO,ae.assignInWith=f8,ae.assignWith=Yle,ae.at=qle,ae.before=YL,ae.bind=c9,ae.bindAll=ede,ae.bindKey=qL,ae.castArray=yle,ae.chain=UL,ae.chunk=Eoe,ae.compact=Moe,ae.concat=koe,ae.cond=tde,ae.conforms=ide,ae.constant=g9,ae.countBy=Nae,ae.create=Zle,ae.curry=ZL,ae.curryRight=XL,ae.debounce=QL,ae.defaults=Xle,ae.defaultsDeep=Qle,ae.defer=ale,ae.delay=lle,ae.difference=Ioe,ae.differenceBy=Aoe,ae.differenceWith=Poe,ae.drop=Roe,ae.dropRight=Foe,ae.dropRightWhile=Loe,ae.dropWhile=Ooe,ae.fill=Noe,ae.filter=Bae,ae.flatMap=Gae,ae.flatMapDeep=Wae,ae.flatMapDepth=Uae,ae.flatten=zL,ae.flattenDeep=Voe,ae.flattenDepth=Boe,ae.flip=cle,ae.flow=rde,ae.flowRight=sde,ae.fromPairs=zoe,ae.functions=sce,ae.functionsIn=oce,ae.groupBy=jae,ae.initial=Goe,ae.intersection=Woe,ae.intersectionBy=Uoe,ae.intersectionWith=joe,ae.invert=lce,ae.invertBy=cce,ae.invokeMap=Kae,ae.iteratee=v9,ae.keyBy=Yae,ae.keys=tc,ae.keysIn=Xd,ae.map=c8,ae.mapKeys=uce,ae.mapValues=hce,ae.matches=ode,ae.matchesProperty=ade,ae.memoize=u8,ae.merge=pce,ae.mergeWith=lO,ae.method=lde,ae.methodOf=cde,ae.mixin=y9,ae.negate=h8,ae.nthArg=ude,ae.omit=mce,ae.omitBy=fce,ae.once=dle,ae.orderBy=qae,ae.over=hde,ae.overArgs=ule,ae.overEvery=pde,ae.overSome=mde,ae.partial=d9,ae.partialRight=JL,ae.partition=Zae,ae.pick=gce,ae.pickBy=cO,ae.property=gO,ae.propertyOf=fde,ae.pull=qoe,ae.pullAll=GL,ae.pullAllBy=Zoe,ae.pullAllWith=Xoe,ae.pullAt=Qoe,ae.range=gde,ae.rangeRight=vde,ae.rearg=hle,ae.reject=Jae,ae.remove=Joe,ae.rest=ple,ae.reverse=a9,ae.sampleSize=tle,ae.set=yce,ae.setWith=_ce,ae.shuffle=ile,ae.slice=eae,ae.sortBy=sle,ae.sortedUniq=aae,ae.sortedUniqBy=lae,ae.split=Gce,ae.spread=mle,ae.tail=cae,ae.take=dae,ae.takeRight=uae,ae.takeRightWhile=hae,ae.takeWhile=pae,ae.tap=Mae,ae.throttle=fle,ae.thru=l8,ae.toArray=rO,ae.toPairs=dO,ae.toPairsIn=uO,ae.toPath=bde,ae.toPlainObject=oO,ae.transform=Cce,ae.unary=gle,ae.union=mae,ae.unionBy=fae,ae.unionWith=gae,ae.uniq=vae,ae.uniqBy=yae,ae.uniqWith=_ae,ae.unset=xce,ae.unzip=l9,ae.unzipWith=WL,ae.update=bce,ae.updateWith=wce,ae.values=r4,ae.valuesIn=Sce,ae.without=Cae,ae.words=mO,ae.wrap=vle,ae.xor=xae,ae.xorBy=bae,ae.xorWith=wae,ae.zip=Sae,ae.zipObject=Tae,ae.zipObjectDeep=Dae,ae.zipWith=Eae,ae.entries=dO,ae.entriesIn=uO,ae.extend=aO,ae.extendWith=f8,y9(ae,ae),ae.add=Sde,ae.attempt=fO,ae.camelCase=Mce,ae.capitalize=hO,ae.ceil=Tde,ae.clamp=Tce,ae.clone=_le,ae.cloneDeep=xle,ae.cloneDeepWith=ble,ae.cloneWith=Cle,ae.conformsTo=wle,ae.deburr=pO,ae.defaultTo=nde,ae.divide=Dde,ae.endsWith=kce,ae.eq=Cp,ae.escape=Ice,ae.escapeRegExp=Ace,ae.every=Vae,ae.find=zae,ae.findIndex=VL,ae.findKey=Jle,ae.findLast=Hae,ae.findLastIndex=BL,ae.findLastKey=ece,ae.floor=Ede,ae.forEach=jL,ae.forEachRight=$L,ae.forIn=tce,ae.forInRight=ice,ae.forOwn=nce,ae.forOwnRight=rce,ae.get=p9,ae.gt=Sle,ae.gte=Tle,ae.has=ace,ae.hasIn=m9,ae.head=HL,ae.identity=Qd,ae.includes=$ae,ae.indexOf=Hoe,ae.inRange=Dce,ae.invoke=dce,ae.isArguments=G2,ae.isArray=Pr,ae.isArrayBuffer=Dle,ae.isArrayLike=Zd,ae.isArrayLikeObject=Za,ae.isBoolean=Ele,ae.isBuffer=y0,ae.isDate=Mle,ae.isElement=kle,ae.isEmpty=Ile,ae.isEqual=Ale,ae.isEqualWith=Ple,ae.isError=u9,ae.isFinite=Rle,ae.isFunction=Kf,ae.isInteger=eO,ae.isLength=p8,ae.isMap=tO,ae.isMatch=Fle,ae.isMatchWith=Lle,ae.isNaN=Ole,ae.isNative=Nle,ae.isNil=Ble,ae.isNull=Vle,ae.isNumber=iO,ae.isObject=wa,ae.isObjectLike=Oa,ae.isPlainObject=hy,ae.isRegExp=h9,ae.isSafeInteger=zle,ae.isSet=nO,ae.isString=m8,ae.isSymbol=Au,ae.isTypedArray=n4,ae.isUndefined=Hle,ae.isWeakMap=Gle,ae.isWeakSet=Wle,ae.join=$oe,ae.kebabCase=Pce,ae.last=Ch,ae.lastIndexOf=Koe,ae.lowerCase=Rce,ae.lowerFirst=Fce,ae.lt=Ule,ae.lte=jle,ae.max=Mde,ae.maxBy=kde,ae.mean=Ide,ae.meanBy=Ade,ae.min=Pde,ae.minBy=Rde,ae.stubArray=C9,ae.stubFalse=x9,ae.stubObject=yde,ae.stubString=_de,ae.stubTrue=Cde,ae.multiply=Fde,ae.nth=Yoe,ae.noConflict=dde,ae.noop=_9,ae.now=d8,ae.pad=Lce,ae.padEnd=Oce,ae.padStart=Nce,ae.parseInt=Vce,ae.random=Ece,ae.reduce=Xae,ae.reduceRight=Qae,ae.repeat=Bce,ae.replace=zce,ae.result=vce,ae.round=Lde,ae.runInContext=Fe,ae.sample=ele,ae.size=nle,ae.snakeCase=Hce,ae.some=rle,ae.sortedIndex=tae,ae.sortedIndexBy=iae,ae.sortedIndexOf=nae,ae.sortedLastIndex=rae,ae.sortedLastIndexBy=sae,ae.sortedLastIndexOf=oae,ae.startCase=Wce,ae.startsWith=Uce,ae.subtract=Ode,ae.sum=Nde,ae.sumBy=Vde,ae.template=jce,ae.times=xde,ae.toFinite=Yf,ae.toInteger=qr,ae.toLength=sO,ae.toLower=$ce,ae.toNumber=xh,ae.toSafeInteger=$le,ae.toString=po,ae.toUpper=Kce,ae.trim=Yce,ae.trimEnd=qce,ae.trimStart=Zce,ae.truncate=Xce,ae.unescape=Qce,ae.uniqueId=wde,ae.upperCase=Jce,ae.upperFirst=f9,ae.each=jL,ae.eachRight=$L,ae.first=HL,y9(ae,function(){var v={};return fh(ae,function(C,k){ss.call(ae.prototype,k)||(v[k]=C)}),v}(),{chain:!1}),ae.VERSION=e,kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(v){ae[v].placeholder=ae}),kt(["drop","take"],function(v,C){hr.prototype[v]=function(k){k=k===t?1:Pe(qr(k),0);var j=this.__filtered__&&!C?new hr(this):this.clone();return j.__filtered__?j.__takeCount__=st(k,j.__takeCount__):j.__views__.push({size:st(k,Ye),type:v+(j.__dir__<0?"Right":"")}),j},hr.prototype[v+"Right"]=function(k){return this.reverse()[v](k).reverse()}}),kt(["filter","map","takeWhile"],function(v,C){var k=C+1,j=k==ie||k==Se;hr.prototype[v]=function(se){var Te=this.clone();return Te.__iteratees__.push({iteratee:Xn(se,3),type:k}),Te.__filtered__=Te.__filtered__||j,Te}}),kt(["head","last"],function(v,C){var k="take"+(C?"Right":"");hr.prototype[v]=function(){return this[k](1).value()[0]}}),kt(["initial","tail"],function(v,C){var k="drop"+(C?"":"Right");hr.prototype[v]=function(){return this.__filtered__?new hr(this):this[k](1)}}),hr.prototype.compact=function(){return this.filter(Qd)},hr.prototype.find=function(v){return this.filter(v).head()},hr.prototype.findLast=function(v){return this.reverse().find(v)},hr.prototype.invokeMap=os(function(v,C){return typeof v=="function"?new hr(this):this.map(function(k){return vh(k,v,C)})}),hr.prototype.reject=function(v){return this.filter(h8(Xn(v)))},hr.prototype.slice=function(v,C){v=qr(v);var k=this;return k.__filtered__&&(v>0||C<0)?new hr(k):(v<0?k=k.takeRight(-v):v&&(k=k.drop(v)),C!==t&&(C=qr(C),k=C<0?k.dropRight(-C):k.take(C-v)),k)},hr.prototype.takeRightWhile=function(v){return this.reverse().takeWhile(v).reverse()},hr.prototype.toArray=function(){return this.take(Ye)},fh(hr.prototype,function(v,C){var k=/^(?:filter|find|map|reject)|While$/.test(C),j=/^(?:head|last)$/.test(C),se=ae[j?"take"+(C=="last"?"Right":""):C],Te=j||/^find/.test(C);se&&(ae.prototype[C]=function(){var We=this.__wrapped__,rt=j?[1]:arguments,pt=We instanceof hr,ni=rt[0],si=pt||Pr(We),pi=function(fs){var As=se.apply(ae,is([fs],rt));return j&&Ki?As[0]:As};si&&k&&typeof ni=="function"&&ni.length!=1&&(pt=si=!1);var Ki=this.__chain__,Tn=!!this.__actions__.length,ir=Te&&!Ki,Qr=pt&&!Tn;if(!Te&&si){We=Qr?We:new hr(this);var nr=v.apply(We,rt);return nr.__actions__.push({func:l8,args:[pi],thisArg:t}),new Zo(nr,Ki)}return ir&&Qr?v.apply(this,rt):(nr=this.thru(pi),ir?j?nr.value()[0]:nr.value():nr)})}),kt(["pop","push","shift","sort","splice","unshift"],function(v){var C=xa[v],k=/^(?:push|sort|unshift)$/.test(v)?"tap":"thru",j=/^(?:pop|shift)$/.test(v);ae.prototype[v]=function(){var se=arguments;if(j&&!this.__chain__){var Te=this.value();return C.apply(Pr(Te)?Te:[],se)}return this[k](function(We){return C.apply(Pr(We)?We:[],se)})}}),fh(hr.prototype,function(v,C){var k=ae[C];if(k){var j=k.name+"";ss.call(De,j)||(De[j]=[]),De[j].push({name:C,func:k})}}),De[t8(t,x).name]=[{name:"wrapper",func:t}],hr.prototype.clone=h0,hr.prototype.reverse=M_,hr.prototype.value=k_,ae.prototype.at=kae,ae.prototype.chain=Iae,ae.prototype.commit=Aae,ae.prototype.next=Pae,ae.prototype.plant=Fae,ae.prototype.reverse=Lae,ae.prototype.toJSON=ae.prototype.valueOf=ae.prototype.value=Oae,ae.prototype.first=ae.prototype.head,Zm&&(ae.prototype[Zm]=Rae),ae},wi=li();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(la._=wi,define(function(){return wi})):fc?((fc.exports=wi)._=wi,oc._=wi):la._=wi}).call(VA)});var D5,BA=Q(()=>{mZ();zn();I7();me();Ci();yi();D5=(()=>{let e=class e{constructor(i,r){this.dialogService=i,this.socketService=r}showAddTaglineDialog(i){return O(this,null,function*(){let r=yield this.dialogService.showInputWhatsApp("Info hinzuf\xFCgen",{showColorPicker:!0,prompt:"info zum Kunden erfassen"}),s="";if(r)return typeof r=="string"?s=r:s=`<button style="${`background-color:${r.color.backgroundColor};color:${r.color.fontColor};margin-left: 4px; padding: 2px 4px; border-radius: 3px; display: inline; position: relative; top: -2px`}">${r.text}</button>`,yield this.socketService.addTaglineToNxtContact({contactId:i,tagline:s}),s})}showWhatsAppChat(i,r,s){return O(this,null,function*(){let o,a;if(typeof i=="string"?a=yield this.socketService.getContactWithEvents(i):a=i,a){let l=a.mobileFormatted;if(a.oldMobilesFormatted?.length>0){let c=a.oldMobilesFormatted.sortNumber("t").map(u=>({text:"vor dem "+Ie.format(u.t,"dd.MM.yyyy"),value:u.m}));c=[...c,{text:"aktuell Nummer",value:a.mobileFormatted}];let d=!1;if(l=a.mobileFormatted,d){let u=yield this.dialogService.showButtonChooserNew({buttonRows:[c],title:"Der Kunde hatte einen Rufnummer-Wechsel",hideBackButton:!0});u?.value&&(l=a1.parseWhatsAppId(u.value,!0))}}l&&(o=yield this.dialogService.showComponentFull(h3),o.componentInstance.loadChat(l,a?.id),o.componentInstance.title=a.givenName+" "+a.familyName+" +"+a1.parseWhatsAppId(l,!1),o.componentInstance.currentArtist=r,o.componentInstance.bodyPutsTattoo=s?.bodyPutsTattoo,o.componentInstance.skills=s?.skills,o.componentInstance.eventId=s?.eventId)}return o})}};e.\u0275fac=function(r){return new(r||e)(it(vt),it(lt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function tQt(t,e){if(t&1){let n=re();h(0,"div",2)(1,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.theme="ag-theme-balham-dark")}),y(2,"balham"),p(),h(3,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.theme="ag-theme-alpine-dark")}),y(4,"alpine"),p(),h(5,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.theme="ag-theme-material-dark")}),y(6,"material"),p(),h(7,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.theme="ag-theme-quartz-dark")}),y(8,"quartz"),p()()}}var wUe,eQt,dr,Pa=Q(()=>{me();t3e();fHe();M4e();PWe();k4e();FWe();zn();OWe();VWe();zWe();$n();I7();oz();Bd();Qo();CUe();n6();bUe();An();Vt();Zi();ri();wUe=Gs(P7());me();Ci();BA();yi();jl();Cs();Kr();Vt();An();eQt=(t,e,n)=>({fontSize:t,opacity:e,visibility:n});dr=(()=>{let e=class e{set localTextOverwrite(i){this.localeText=ve(ve({},this.localeText),i)}set rowData(i){if(i&&i.length>0&&!this.uniqueRowDataKey)if(i[0].id)this.uniqueRowDataKey="id",this.checkForUniqueRowDataKey();else try{this.socketService.sendTelegramAdmin(`DataGrid mit uniqueRowDataKey nicht id

`+this.name+`

Header 1: `+this._columnDefs[0].headerName+`

`+JSON.stringify(i[0]))}catch{this.socketService.sendTelegramAdmin(`DataGrid mit uniqueRowDataKey nicht id

`+this.name+`

Header 1: `+this._columnDefs[0].headerName)}setTimeout(()=>O(this,null,function*(){i&&(this._data=i,!this.gridOptions||!this.api?setTimeout(()=>{this.rowData=this._data},100):this.api?(this.setRowData(i),i.length>0&&this.autoSizeAllColumns$.next(),this.showData()):this._data=i),this.viewChanged.emit()}),0)}set columnDefs(i){this._columnDefs=i,this.colDefChanged()}constructor(i,r,s,o,a,l,c,d,u){this.dialogService=i,this.myElement=r,this.contactService=s,this.socketService=o,this.permissionService=a,this.cdRef=l,this.ngZone=c,this.configService=d,this.loginService=u,this.counter=0,this.viewChanged=new nt,this.showSideBar=!1,this.disableAllSort=!1,this.uniqueRowDataKey="",this.quickFilterText="",this.rowHeight=-1,this.fontSize="14px",this.sizeColumnsToFit=!1,this.cellEditingStopped=new nt,this.cellEditingStarted=new nt,this.selectionChanged=new nt,this.gridStateChanged=new nt,this.rowDragEnd=new nt,this.gridIsReady=new qs(!1),this.rowDoubleClick=new nt,this.rowDoubleClickNew=new nt,this.rowClick=new nt,this.gridClass="ag-theme-dark grid-font-big",this.visibility="visible",this.opacity="0%",this.localeText=AWe.localeText,this.pagination=!1,this.suppressRowTransform=!1,this.frameworkComponents={starCellRenderer:LWe,artistSkillCellRenderer:NWe,barCellRenderer:BWe},this.enableRangeSelection=!0,this.suppressRowHoverHighlight=!1,this.suppressCellSelection=!1,this.excelExportName="",this.autoSizeColumnOnResize=!1,this.autoSizeAllColumns$=new Mi,this.theme="ag-theme-balham-dark",this.dataLength=0,this.registerAutoSizeAllColumns()}isRowSelectable(){return!0}localeTextFunc(i){return i.defaultValue}stringOrNumber(i,r){return i<r?-1:i>r?1:0}groupedComparator(i,r,s,o,a){if(s.rowGroupIndex,s&&s.group)return s.rowGroupColumn.getColDef().groupedSortMethod==="value"?this.stringOrNumber(i,r):this.stringOrNumber(s.allChildrenCount,o.allChildrenCount);if(i&&r)return this.stringOrNumber(i,r)}initGridOptions(){this.gridOptions={headerHeight:this.getRowHeight.bind(this),getRowHeight:this.getRowHeight.bind(this),suppressRowClickSelection:!0,suppressMultiRangeSelection:!0,tooltipMouseTrack:!0,tooltipTrigger:"hover",tooltipShowDelay:0,defaultColDef:{suppressHeaderMenuButton:!0,filter:!1,filterParams:{clearButton:!0,newRowsAction:"keep"},resizable:!0,valueGetter:hA.getValueGetter(),cellRenderer:CZ.getCellRenderer(),valueFormatter:IA.getValueFormatter(),cellStyle:_X.getCellStyler(),sortable:!this.disableAllSort,enableRowGroup:!0,onCellDoubleClicked:i=>this.ngZone.run(()=>this.rowDoubleClickNew.emit(i))},getContextMenuItems:this.getContextMenuItems.bind(this),suppressAggFuncInHeader:!0,animateRows:!0,enableRangeSelection:this.enableRangeSelection,enableCharts:!0,excelStyles:[{id:"ExcelDateTime",numberFormat:{format:"yyyy-mm-dd hh:mm:ss;;;"}},{id:"ExcelDate",numberFormat:{format:"dd.mm.yyyy"}}],sideBar:this.showSideBar,autoGroupColumnDef:{filter:!1,comparator:this.groupedComparator.bind(this),headerValueGetter:i=>i.api.getRowGroupColumns().map(r=>r.getColDef().headerName).join(", ")}},this.gridOptions.getRowHeight=null,this.checkForUniqueRowDataKey(),this.showFooter&&(this.gridOptions.statusBar={statusPanels:[{statusPanel:"agTotalAndFilteredRowCountComponent",align:"left"},{statusPanel:"agTotalRowCountComponent",align:"center"},{statusPanel:"agFilteredRowCountComponent"},{statusPanel:"agSelectedRowCountComponent"},{statusPanel:"agAggregationComponent"}]})}ngOnChanges(i){i.quickFilterText&&this.autoSizeColumnOnResize&&this.autoSizeAllColumns$.next()}ngOnInit(){this.initGridOptions()}onCellClicked(i){return O(this,null,function*(){let r=i.column.getColDef();if(typeof r.nxtOnCellClicked=="function"&&r.nxtOnCellClicked(i),r.nxtFieldType===Ee.ShowCalendarEvent&&this.dialogService.showComponentFull(nu).componentInstance.loadEvent({eventId:i.value}),r.nxtFieldType===Ee.ShowContactHistory&&this.dialogService.showHistory("contact",i.data.id),r.nxtFieldType===Ee.ShowEventHistory&&this.dialogService.showHistory("calendarEvent",i.data.id),r.nxtFieldType===Ee.ShowImage){let s=i.data[i.column.getColDef().field];return window.open(s,"_blank"),i.event.preventDefault(),i.event.stopPropagation(),!1}if(r.nxtFieldType===Ee.WhatsAppChat)if(i.data.birthday)this.contactService.showWhatsAppChat(i.data);else{let s=i.data[i.column.getColDef().field],o=yield this.dialogService.showComponentFull(h3);o.componentInstance.loadChat(s),typeof r.nxtFieldTypeParams=="function"&&(o.componentInstance.title=r.nxtFieldTypeParams(i))}if(r.nxtFieldType===Ee.CalendarEvents&&i.value.length>0){let s=i.value.map(a=>({text:Ie.format(a.start,"dd.MM.yyyy"),value:a.eventId??a.id}));typeof r.nxtFieldTypeParams?.getButtonText=="function"&&(s=i.value.map(a=>({text:r.nxtFieldTypeParams.getButtonText(a),value:a.eventId??a.id})));let o=yield this.dialogService.showButtonChooser({buttonRows:[s],title:"Welchen Termin m\xF6chtest du dir ansehen?",text:"",minWidth:"80%",value:""});if(typeof o!="string"&&o?.value){let a=this.dialogService.showComponentFull(nu);setTimeout(()=>{a.componentInstance.loadEvent({eventId:o.value}),this.cdRef.detectChanges()},500)}}this.selectionChanged.emit(i)})}onGridReady(i){this.api=i.api,this._data&&(this.api.setGridOption("rowData",this._data),this.cdRef.detectChanges()),this.gridIsReady.next(!0)}onRowDragEnd(i){let r=i.api.getDisplayedRowAtIndex(i.node.rowIndex-1),s=i.api.getDisplayedRowAtIndex(i.node.rowIndex+1);r&&(r=r.data),s&&(s=s.data);let o=-1;if(this.dragOrderFieldName){let a=r&&r[this.dragOrderFieldName]?r[this.dragOrderFieldName]:0,l=s&&s[this.dragOrderFieldName]?s[this.dragOrderFieldName]:a+2e5;o=parseInt(a+(l-a)/2,10)}this.rowDragEnd.emit(St(ve({},i),{prevRowData:r,nextRowData:s,newOrderValue:o}))}onSelectionChanged(i){this.selectionChanged.emit(i)}getRowHeight(i){let r=0;return this.rowHeight>-1?r=this.rowHeight:this.fontSize==="14px"?r=25:this.fontSize==="16px"?r=30:this.fontSize==="18px"?r=32:this.fontSize==="20px"&&(r=35),typeof this.rowHeightGetter=="function"?this.rowHeightGetter(i,r):r}registerAutoSizeAllColumns(i=1){this.autoSizeAllColumns$.pipe(A7(50)).subscribe(()=>{requestAnimationFrame(()=>{if(this.gridOptions&&this.api)if(this.sizeColumnsToFit)this.api.sizeColumnsToFit();else{let r=this.api.getColumns();r=r?.filter(s=>!s.getColDef().suppressAutoSize),r&&this.api.autoSizeColumns(r)}})})}showData(){this.opacity="100%"}redrawRows(){this.api&&this.api.redrawRows()}beforeSetRowData(){this.lastScroll=this.myElement.nativeElement.querySelector(".ag-body-viewport").scrollTop}afterSetRowData(){setTimeout(()=>{this.myElement.nativeElement.querySelector(".ag-body-viewport").scrollTo(0,this.lastScroll)},0)}setRowData(i){try{this.api.setGridOption("rowData",i),this.dataLength=i.length,this.cdRef.detectChanges()}catch{}setTimeout(()=>{try{this.dataLength=i.length,this.api.redrawRows(),this.cdRef.detectChanges()}catch{}},1)}getContextMenuItems(i){let r=["separator","copy","separator","chartRange"],s={name:"Excel-Datei downloaden",action:()=>O(this,null,function*(){if(this.permissionService.hasPermission(Zt.ExcelExport)){let o=yield(yield this.dialogService.showInputOld({message:"Excel Sprache (en, de)",prompt:"de",isMoney:!1})).afterClosed().toPromise();this.api.exportDataAsExcel(this.getExcelExportParams(o)),this.socketService.sendTelegramAdmin(this.loginService.getUsername()+' Exportiert "'+this.excelExportName+'" als Excel')}})};return this.excelExportName&&this.permissionService.hasPermission(Zt.ExcelExport)&&(r=[s,...r]),r}getExcelExportParams(i){return{processCellCallback:r=>RWe.getExcelCellRenderer(r,i),fileName:this.excelExportName+".xlsx"}}addTestRow(){let i={timestamp:0,currentIndex:100,totalContacts:5,message:"declarations-of-consent",isRunning:!1},r=[i,i,i];this.api.applyTransaction({add:r,addIndex:0})}gridResized(i){this.autoSizeColumnOnResize&&this.autoSizeAllColumns$.next()}colDefChanged(){if(this._columnDefs)for(let i of this._columnDefs)i.nxtIcon&&(i.nxtFieldType=Ee.Icon),(i.nxtIcon||[Ee.ShowCalendarEvent,Ee.ShowContactHistory,Ee.ShowCalendarEvent,Ee.ShowImage].includes(i.nxtFieldType))&&(i.maxWidth=45,i.minWidth=45)}onCellDoubleClicked(i){let r=i.column.getColDef();typeof r.nxtOnCellDoubleClicked=="function"&&r.nxtOnCellDoubleClicked(i)}checkForUniqueRowDataKey(){this.uniqueRowDataKey&&this.gridOptions&&!this.gridOptions.getRowId&&(this.gridOptions.getRowId=i=>{let r=wUe.default.get(i.data,this.uniqueRowDataKey);if(r)return r})}};e.\u0275fac=function(r){return new(r||e)(R(vt),R(fi),R(D5),R(lt),R(ws),R(Kt),R(pn),R(Xi),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-datagrid"]],viewQuery:function(r,s){if(r&1&&ei(E4e,5),r&2){let o;Pt(o=Rt())&&(s.agGridAngular=o.first)}},inputs:{localTextOverwrite:"localTextOverwrite",rowData:"rowData",columnDefs:"columnDefs",name:"name",showSideBar:"showSideBar",showFooter:"showFooter",disableAllSort:"disableAllSort",uniqueRowDataKey:"uniqueRowDataKey",quickFilterText:"quickFilterText",rowHeight:"rowHeight",fontSizePercent:"fontSizePercent",fontSize:"fontSize",rowHeightGetter:"rowHeightGetter",sizeColumnsToFit:"sizeColumnsToFit",pagination:"pagination",suppressRowTransform:"suppressRowTransform",dragOrderFieldName:"dragOrderFieldName",pinnedBottomRowData:"pinnedBottomRowData",enableRangeSelection:"enableRangeSelection",suppressRowHoverHighlight:"suppressRowHoverHighlight",suppressCellSelection:"suppressCellSelection",excelExportName:"excelExportName",autoSizeColumnOnResize:"autoSizeColumnOnResize",rowSelection:"rowSelection"},outputs:{viewChanged:"viewChanged",cellEditingStopped:"cellEditingStopped",cellEditingStarted:"cellEditingStarted",selectionChanged:"selectionChanged",gridStateChanged:"gridStateChanged",rowDragEnd:"rowDragEnd",rowDoubleClick:"rowDoubleClick",rowDoubleClickNew:"rowDoubleClickNew",rowClick:"rowClick"},standalone:!0,features:[yn,xe],decls:2,vars:25,consts:[["class","flex flex-col",4,"ngIf"],["fxFlex","",3,"cellClicked","cellDoubleClicked","cellEditingStarted","cellEditingStopped","gridReady","resized","rowClicked","rowDoubleClicked","rowDragEnd","selectionChanged","suppressRowTransform","animateRows","cacheQuickFilter","columnDefs","enableRangeSelection","components","gridOptions","isRowSelectable","localeText","ngStyle","pagination","pinnedBottomRowData","quickFilterText","rowDragManaged","suppressColumnVirtualisation","suppressRowHoverHighlight","suppressScrollOnNewData","rowSelection"],[1,"flex","flex-col"],[3,"click"]],template:function(r,s){r&1&&(W(0,tQt,9,0,"div",0),h(1,"ag-grid-angular",1),F("cellClicked",function(a){return s.onCellClicked(a)})("cellDoubleClicked",function(a){return s.onCellDoubleClicked(a)})("cellEditingStarted",function(a){return s.cellEditingStarted.emit(a)})("cellEditingStopped",function(a){return s.cellEditingStopped.emit(a)})("gridReady",function(a){return s.onGridReady(a)})("resized",function(a){return s.gridResized(a)})("rowClicked",function(a){return s.rowClick.emit(a)})("rowDoubleClicked",function(a){return s.rowDoubleClick.emit(a)})("rowDragEnd",function(a){return s.onRowDragEnd(a)})("selectionChanged",function(a){return s.onSelectionChanged(a)}),p()),r&2&&(b("ngIf",!1),g(),jr(s.theme),b("suppressRowTransform",s.suppressRowTransform)("animateRows",!0)("cacheQuickFilter",!0)("columnDefs",s._columnDefs)("enableRangeSelection",s.enableRangeSelection)("components",s.frameworkComponents)("gridOptions",s.gridOptions)("isRowSelectable",s.isRowSelectable)("localeText",s.localeText)("ngStyle",Qm(21,eQt,s.fontSize,s.opacity,s.visibility))("pagination",s.pagination)("pinnedBottomRowData",s.pinnedBottomRowData)("quickFilterText",s.quickFilterText)("rowDragManaged",!0)("suppressColumnVirtualisation",!0)("suppressRowHoverHighlight",s.suppressRowHoverHighlight)("suppressScrollOnNewData",!0)("rowSelection",s.rowSelection))},dependencies:[Ct,Lt,E4e,At,qi,rr,Dn,rs,xUe],styles:["[_nghost-%COMP%]{height:100%;width:100%}[_nghost-%COMP%]     .ag-tooltip{border-radius:4px;font-size:14px!important;font-weight:500;letter-spacing:0!important;font-family:Open Sans!important;color:#ccc!important;text-align:center!important;padding:6px 10px;background-color:#3e3e3e!important;border:1px solid #b7860f;white-space:pre-line}"]});let t=e;return t})()});var SUe,CX=Q(()=>{me();SUe=(()=>{let e=class e{constructor(){}transform(i,r){let s="";switch(i){case"event":s="Termin";break;case"klarnaOrder":s="Klarna";break;default:return i}return r==="out"?s+="-R\xFCckzahlung":r==="in"&&(s+="-Zahlung"),s}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"assignmentRefType",type:e,pure:!0,standalone:!0});let t=e;return t})()});var E5,P0=Q(()=>{Ul();me();od();E5=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i){return i?Qn.stringifyFormat(i,"\xB7").replace(/\n/g,"<br/>").replace(/·/g,"&nbsp;&nbsp;&nbsp;&nbsp;"):typeof i}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"jsonFormatted",type:e,pure:!0,standalone:!0});let t=e;return t})()});var gx,q4e=Q(()=>{Vd();zn();pa();Ov();gx=class{static getNewKlarnaOrderText(e){let n="KLARNA";return n+=`
`+Ie.format(e.createdAt,"dd.MM.yyyy HH:mm"),n+=`
`+Wn.toMoneyString(e.value),n+=`
`+e.fullName,n}static getPayoutDayByCaptureDate(e){let n=Ie.getNextDayOfWeek(e,Aa.Thursday);return n=Ie.addDays(n,7),Ie.clearTime(n),new Date(n)}static sortBySplitDate(e){let n=so(e),i=[],r=e.filter(o=>!o.originalOrderId);for(let o of r)i.push([o]);for(let o of i){let a=o[0];n=n.filter(c=>c.orderId!==a.orderId);let l=0;for(;;){if(l++,l>100)throw Error("sortBySplitDate fehler, counter > 100");let c=o[o.length-1].orderId,d=n.find(u=>u.originalOrderId===c);if(d)n=n.filter(u=>u.orderId!==d.orderId),o.push(d);else break}}let s=i.map(o=>o.map(a=>a.orderId)).flat();if(!wc.checkSame(s,e.map(o=>o.orderId))){debugger;throw Error("sortBySplitDate fehler, result und klarnaOrders nicht gleich")}return i}static getDisputeText(e,n){if(!n)return"";let i={reason:{return:"Retoure",unauthorized_purchase:"Nicht autorisierte K\xE4ufe",goods_not_received:"Artikel nicht erhalten",faulty_goods:"Fehlerhafte Ware"},status:{closed:"Geschlossen",open:"Offen"},investigation_status:{closed:"Geschlossen"},closing_reason:{resolved:"Gel\xF6st",chargeback:"Zur\xFCckgebucht"},closing_reason_detailed:{merchant_accepted_the_loss:"Verlust akzeptiert",customer_cancelled_dispute:"Kunde hat Beanstandung zur\xFCckgezogen",merchant_did_not_reply_to_dispute_request:"Wir haben nicht geantwortet \u{1F926}\u200D\u2642\uFE0F",merchant_provided_valid_shipping_details:"Wir haben ein g\xFCltigen Nachweis erbracht"}};if(i[e][n])return i[e][n];debugger;return n}}});function iQt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p(),h(3,"div"),y(4,"zugewiesen"),p()),t&2){let n=w(2);g(),ye(tt(2,1,n.item().assignments[0].value))}}function nQt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p(),h(3,"div"),y(4,"nicht zugewiesen"),p()),t&2){let n=w(2);g(),ye(tt(2,1,n.item().value))}}function rQt(t,e){if(t&1&&(h(0,"div",4)(1,"mat-icon",5),y(2,"arrow_upward_alt"),p(),y(3," \xA0"),h(4,"div"),y(5,"R\xFCckzahlung"),p(),y(6,"\xA0 "),h(7,"mat-icon",5),y(8,"arrow_upward_alt"),p()(),W(9,iQt,5,3)(10,nQt,5,3)),t&2){let n=w();g(9),Je(n.item().assigned?9:10)}}function sQt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p(),h(3,"div",7)(4,"mat-icon",5),y(5,"check"),p(),h(6,"div"),y(7,"\xA0zugewiesen\xA0"),p(),h(8,"mat-icon",5),y(9,"check"),p()()),t&2){let n=w(2);g(),ye(tt(2,1,n.item().assignments[0].value))}}function oQt(t,e){if(t&1&&(h(0,"div",8),y(1),Ce(2,"money"),p(),h(3,"div"),y(4,"nicht zugewiesen"),p()),t&2){let n=w(2);g(),ye(tt(2,1,n.item().value))}}function aQt(t,e){if(t&1&&(h(0,"div",6)(1,"mat-icon",5),y(2,"arrow_downward_alt"),p(),h(3,"div"),y(4,"\xA0Zahlung\xA0"),p(),h(5,"mat-icon",5),y(6,"arrow_downward_alt"),p()(),W(7,sQt,10,3)(8,oQt,5,3)),t&2){let n=w();g(7),Je(n.item().assigned?7:8)}}function lQt(t,e){if(t&1&&(h(0,"td")(1,"div"),y(2),p()()),t&2){let n=w().index;g(2),Ke("",n+1,". Zuweisung")}}function cQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Info"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(3);g(4),ye(n.item().refundInfo||n.item().refundReason)}}function dQt(t,e){t&1&&(h(0,"div"),y(1,"Dieser Termin"),p())}function uQt(t,e){if(t&1){let n=re();h(0,"nxt-button",16),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.showEvent.emit(r.eventId))}),y(1,"Termin Anzeigen"),p()}t&2&&b("smallButton",!0)}function hQt(t,e){if(t&1&&(h(0,"td"),W(1,dQt,2,0,"div")(2,uQt,2,1,"nxt-button",15),p()),t&2){let n=w().$implicit,i=w(2);g(),Je(i.fromEventId()===n.eventId?1:2)}}function pQt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(3).$implicit;g(),ye(n.refId)}}function mQt(t,e){if(t&1&&(h(0,"td")(1,"div"),y(2),Ce(3,"assignmentRefType"),p(),W(4,pQt,2,1,"div",12),p()),t&2){let n=w(2).$implicit,i=w(2);g(2),ye(Nt(3,2,n.refType,i.item().direction)),g(2),b("ngIf",n.refId)}}function fQt(t,e){if(t&1&&W(0,mQt,5,5,"td",12),t&2){let n=w().$implicit;b("ngIf",n.refType)}}function gQt(t,e){if(t&1&&(h(0,"tr"),W(1,lQt,3,1,"td",12),h(2,"td",9)(3,"table",13)(4,"tr")(5,"td",14),y(6,"Zugewiesener Betrag"),p(),h(7,"td",14),y(8),Ce(9,"money"),p()(),h(10,"tr")(11,"td"),y(12,"Zugewiesen am"),p(),h(13,"td"),y(14),Ce(15,"nxtDate"),p()(),h(16,"tr")(17,"td"),y(18,"Zugewiesen von"),p(),h(19,"td"),y(20),p()(),W(21,cQt,5,1,"tr",12),h(22,"tr")(23,"td"),y(24,"Zugewiesen an"),p(),W(25,hQt,3,1,"td")(26,fQt,1,1,"td"),p()()()()),t&2){let n=e.$implicit,i=w(2);g(),b("ngIf",i.item().assignments.length>1),g(7),ye(tt(9,6,n.value)),g(6),ye(Nt(15,8,n.assignedTime,"dd.MM.yyyy HH:mm")),g(6),ye(n.user||n.createdBy),g(),b("ngIf",i.item().refundInfo||i.item().refundReason),g(4),Je(n.eventId?25:26)}}function vQt(t,e){if(t&1&&(h(0,"td",9)(1,"table",10),W(2,gQt,27,11,"tr",11),p()()),t&2){let n=w();g(2),b("ngForOf",n.item().assignments)}}var TUe,xX=Q(()=>{me();Gi();Ja();Il();CX();ri();Zi();go();P0();me();TUe=(()=>{let e=class e extends bt{constructor(){super(),this.item=br.required(),this.fromEventId=br(),this.buyerName=br.required(),this.showEvent=new nt}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-tattoo-ticket-item"]],inputs:{item:[1,"item"],fromEventId:[1,"fromEventId"],buyerName:[1,"buyerName"]},outputs:{showEvent:"showEvent"},standalone:!0,features:[et,xe],decls:7,vars:2,consts:[[1,"w-full","tattoo-ticket-item-table-1"],[1,"!w-[160px]"],[1,"flex","flex-col","items-center"],["class","!p-0",4,"ngIf"],[1,"flex","flex-row","justify-center","items-center","red"],[2,"font-size","18px","width","18px","height","18px"],[1,"flex","flex-row","justify-center","items-center"],[1,"flex","flex-row","items-center"],[1,"green"],[1,"!p-0"],[1,"nxt-table","nxt-table-no-outer-border","w-full","tattoo-ticket-item-table-2"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"nxt-table","nxt-table-no-outer-border","w-full","tattoo-ticket-item-table-3"],[1,"min-w-[200px]"],[3,"smallButton"],[3,"click","smallButton"]],template:function(r,s){r&1&&(h(0,"table",0)(1,"tr")(2,"td",1)(3,"div",2),W(4,rQt,11,1)(5,aQt,9,1),p()(),W(6,vQt,3,1,"td",3),p()()),r&2&&(g(4),Je(s.item().direction==="out"?4:5),g(2),b("ngIf",s.item().assignments.length>0))},dependencies:[Zr,ks,SUe,Hi,Ct,Lt,Hn],changeDetection:0});let t=e;return t})()});function _Qt(t,e){if(t&1&&(h(0,"div",13),y(1),Ce(2,"money"),p()),t&2){let n=w(2);g(),Ke("R\xFCckerstattet: ",tt(2,1,n.refundValue()),"")}}function CQt(t,e){t&1&&(h(0,"div",9)(1,"mat-icon",14),y(2,"check"),p(),h(3,"div"),y(4,"\xA0Alle Zahlungen zugewiesen\xA0"),p(),h(5,"mat-icon",14),y(6,"check"),p()())}function xQt(t,e){if(t&1&&(h(0,"div",9)(1,"div"),y(2),Ce(3,"money"),p()()),t&2){let n=w(2);g(2),Ke("",tt(3,1,n.openValue())," offen")}}function bQt(t,e){if(t&1){let n=re();h(0,"div",11)(1,"nxt-button",12),F("click",function(){V(n);let r=w(2);return B(r.doRefund.emit(r.tattooTicketItems()[0].shopOrderLineItemId))}),y(2,"R\xFCckerstatten"),p()()}t&2&&(g(),b("smallButton",!0))}function wQt(t,e){if(t&1){let n=re();h(0,"tr")(1,"td",15)(2,"nxt-tattoo-ticket-item",16),F("showEvent",function(r){V(n);let s=w(2);return B(s.showEventClicked(r))}),p()()()}if(t&2){let n=e.$implicit,i=w(2);g(2),b("buyerName",i.buyerName())("item",n)("fromEventId",i.fromEventId())}}function SQt(t,e){if(t&1){let n=re();h(0,"table",1)(1,"tr")(2,"td",2)(3,"div",3)(4,"div",4),y(5),Ce(6,"nxtDate"),p(),h(7,"div",5),y(8),Ce(9,"fromNowText"),p(),h(10,"div",6),y(11),p(),h(12,"div",7),y(13),Ce(14,"money"),p(),W(15,_Qt,3,3,"div",8)(16,CQt,7,0,"div",9)(17,xQt,4,3,"div",9)(18,bQt,3,1,"div",10),h(19,"div",11)(20,"nxt-button",12),F("click",function(){V(n);let r=w();return B(r.showShopOrderClicked(r.shopOrder().id))}),y(21,"Shop-Kauf anzeigen"),p()()()()(),Kn(22,wQt,3,3,"tr",null,yQt),p()}if(t&2){let n=w();g(5),ye(Nt(6,8,n.shopOrder().createdAt,"dd.MM.yyyy HH:mm")),g(3),ye(tt(9,11,n.shopOrder().createdAt)),g(3),ye(n.buyerName()),g(2),Ke("Tattoo-Ticket ",tt(14,13,n.originalValue()),""),g(2),b("ngIf",n.refundValue()>0),g(),Je(n.allAssigned()?16:17),g(2),b("ngIf",n.originalValue()>n.refundValue()),g(2),b("smallButton",!0),g(2),Yn(n.tattooTicketItems())}}var yQt,bX,Z4e=Q(()=>{me();Gi();xX();Ja();Il();ri();Zi();go();B1();Ci();me();ji();yQt=(t,e)=>e.shopOrderLineItemId;bX=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.tattooTicketItems=br.required(),this.shopOrder=br.required(),this.fromEventId=br(),this.isDialog=br.required(),this.doRefund=new nt,this.showShopOrder=new nt,this.showEvent=new nt,this.refundValue=vr(()=>this.tattooTicketItems().filter(r=>r.direction==="out").reduce((r,s)=>r+s.value,0)),this.openValue=vr(()=>{let r=this.tattooTicketItems().filter(s=>!s.assigned&&s.direction==="in").reduce((s,o)=>s+o.value,0)-this.tattooTicketItems().filter(s=>!s.assigned&&s.direction==="out").reduce((s,o)=>s+o.value,0);return r<0&&(r=0),r}),this.originalValue=vr(()=>this.tattooTicketItems().length>0?this.tattooTicketItems()[0].originalValue:0),this.allAssigned=vr(()=>this.tattooTicketItems().every(r=>r.assigned)),this.buyerName=vr(()=>this.shopOrder()?this.shopOrder().billingFirstName+" "+this.shopOrder().billingLastName:""),this.dialogService=Ve(vt)}ngOnInit(){}nxtOnDestroy(){}showShopOrderClicked(i){this.isDialog()?(this.dialogService.showShopOrder.emit(i),this.dialogRef?.close()):this.showShopOrder.emit(i)}showEventClicked(i){this.isDialog()?(window.open("e/"+i,"_blank"),this.dialogRef?.close()):this.showEvent.emit(i)}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-tattoo-ticket"]],inputs:{tattooTicketItems:[1,"tattooTicketItems"],shopOrder:[1,"shopOrder"],fromEventId:[1,"fromEventId"],isDialog:[1,"isDialog"]},outputs:{doRefund:"doRefund",showShopOrder:"showShopOrder",showEvent:"showEvent"},standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["class","nxt-table w-full","style","border-width: 3px",4,"ngIf"],[1,"nxt-table","w-full",2,"border-width","3px"],["colspan","2",1,"text-center","!p-0"],[1,"relative","pt-4","pb-2"],[1,"absolute","left-2","top-1"],[1,"absolute","right-2","top-1"],[1,"font-bold","text-130"],[1,"font-bold","text-120"],["class","red",4,"ngIf"],[1,"flex","flex-row","items-center","justify-center","green"],["class","pt-2",4,"ngIf"],[1,"pt-2"],[3,"click","smallButton"],[1,"red"],[2,"font-size","20px","width","20px","height","20px"],[1,"!p-0"],[1,"w-full",3,"showEvent","buyerName","item","fromEventId"]],template:function(r,s){r&1&&W(0,SQt,24,15,"table",0),r&2&&b("ngIf",s.tattooTicketItems().length>0&&s.shopOrder())},dependencies:[TUe,Zr,ks,Ct,Lt,Hn,ld],styles:["[_nghost-%COMP%]{display:flex;min-width:500px}"],changeDetection:0});let t=e;return t})()});function TQt(t,e){if(t&1){let n=re();h(0,"div",2)(1,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(2,"Schlie\xDFen"),p()()}}var wX,SX=Q(()=>{me();Gi();ha();Zi();ri();Il();go();il();CX();Zh();Bd();P0();xX();Z4e();W_();$n();me();ji();yi();Ci();jl();wX=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.permissionService=o,this.shopOrderLineItemId="",this.showEvent=new nt,this.showShopOrder=new nt,this.shopOrder=gt(null),this.refundValue=gt(0),this.refundValue$=Tp(this.refundValue),this.firstParent=gt(null),this.ordersInAndOut=gt([]),this.isDialog=!1,this.fromEventId="",this.pushSocketSubscription=this.socketService.subscribeNew("eventRefundCreated",()=>{this.load().then()})}ngOnInit(){this.isDialog=this.dialogRef?.componentInstance===this,this.pushSocketSubscription=this.socketService.subscribeNew("eventKlarnaOrderOutChanged",i=>{this.firstParent().klarnaOrderId===i.klarnaOrderId&&this.load().then()}),this.pushSocketSubscription=this.socketService.subscribeNew("eventShopOrderUpdated",i=>{this.firstParent().shopOrderId===i.id&&this.load().then()})}ngOnChanges(i){i.shopOrderLineItemId&&this.load().then()}nxtOnDestroy(){}load(){return O(this,null,function*(){let i=yield this.socketService.getKlarnaTattooTicketForView(this.shopOrderLineItemId);i?.main&&(this.ordersInAndOut.set([i.main,...i.splitted,...i.out]),this.firstParent.set(i.main),this.refundValue.set(i.refundValue),this.shopOrder.set(i.shopOrder))})}refundClicked(){return O(this,null,function*(){if(!this.permissionService.hasPermissionWithInfo(Zt.CanRefund))return;let i=this.firstParent().originalPaymentValue-this.refundValue(),r='<table class="nxt-table w-full"><tr></tr>';r+="<tr><td>Bereits erstattet</td><td>"+this.refundValue().toMoneyString()+"</td>",r+="<tr><td>Maximaler Erstattungsbetrag</td><td>"+i.toMoneyString()+"</td>",r+="</table>";let s="Tattoo-Ticket erstatten";if(i===0)yield this.dialogService.showOk(r,{title:s});else{let o=yield this.dialogService.showInput({message:r,title:s,isMoney:!0,prompt:i,placeholder:"Wie viel soll erstattet werden?",selectPrompt:!0});if(Es.isNumber(o)){if(o>i){yield this.dialogService.showOk("Du kannst nur maximal "+i.toMoneyString()+" zur\xFCck zur\xFCckerstatten");return}let a="Kurzer Grund zur R\xFCckerstattung von "+o.toMoneyString(),l=yield this.dialogService.showInput({message:a});l&&(this.dialogService.showLoading("Erstattung wird durchgef\xFChrt"),this.socketService.klarnaRefundShopOrderItem({refundValue:o,reason:l,refType:"klarna-order",refId:this.firstParent().orderId,shopOrderLineItemId:this.firstParent().shopOrderLineItemId}).then(),this.hideLoadingOnRefundReceived())}}})}hideLoadingOnRefundReceived(){let i=this.refundValue();this.refundValue$.pipe(Jd(r=>r>i)).subscribe(()=>{this.dialogService.hideLoading()})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt),R(ws))},e.\u0275cmp=_e({type:e,selectors:[["nxt-tattoo-ticket-klarna"]],inputs:{shopOrderLineItemId:"shopOrderLineItemId"},outputs:{showEvent:"showEvent",showShopOrder:"showShopOrder"},standalone:!0,features:[et,yn,xe],decls:2,vars:5,consts:[[3,"doRefund","showEvent","showShopOrder","shopOrder","tattooTicketItems","fromEventId","isDialog"],["class","w-full flex flex-row justify-center mt-3",4,"ngIf"],[1,"w-full","flex","flex-row","justify-center","mt-3"],[3,"click"]],template:function(r,s){r&1&&(h(0,"nxt-tattoo-ticket",0),F("doRefund",function(){return s.refundClicked()})("showEvent",function(a){return s.showEvent.emit(a)})("showShopOrder",function(a){return s.showShopOrder.emit(a)}),p(),W(1,TQt,3,0,"div",1)),r&2&&(b("shopOrder",s.shopOrder())("tattooTicketItems",s.ordersInAndOut())("fromEventId",s.fromEventId)("isDialog",s.isDialog),g(),b("ngIf",s.isDialog))},dependencies:[Lt,Ct,bX],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}"],changeDetection:0});let t=e;return t})()});function EQt(t,e){if(t&1){let n=re();h(0,"div",0)(1,"nxt-button-icon",5),F("click",function(){V(n);let r=w(2);return B(r.dialogRef.close())}),y(2,"close"),p()()}}function MQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Status"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(2);g(4),ye(n.klarnaOrderRaw().status)}}function kQt(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"ShopID"),p(),h(3,"td")(4,"div")(5,"nxt-button",5),F("click",function(){V(n);let r=w(2);return B(r.onShowShopOrder.emit(r.klarnaOrderRaw().merchant_reference1))}),y(6),p()()()()}if(t&2){let n=w(2);g(6),Ke("Zum Shop-Kauf ",n.klarnaOrderRaw().merchant_reference1,"")}}function IQt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(3);g(),ye(n.klarnaOrderRaw().initial_payment_method.type)}}function AQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Zahlungmethode"),p(),h(3,"td"),W(4,IQt,2,1,"div",2),h(5,"div"),y(6),p()()()),t&2){let n=w(2);g(4),b("ngIf",!1),g(2),ye(n.klarnaOrderRaw().initial_payment_method.description)}}function PQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"R\xFCckerstattet"),p(),h(3,"td")(4,"div"),y(5),Ce(6,"money"),p(),h(7,"div",3),y(8),Ce(9,"money"),p()()()),t&2){let n=w(2);g(5),ye(tt(6,2,n.klarnaOrderRaw().refunded_amount/100)),g(3),Ke("von ",tt(9,4,n.originalValue),"")}}function RQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Bezahlt"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w(2);g(4),ye(tt(5,1,n.klarnaOrderRaw().captured_amount/100))}}function FQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Geburtstag"),p(),h(3,"td"),y(4),Ce(5,"nxtDate"),p()()),t&2){let n=w(2);g(4),ye(Nt(5,1,n.klarnaOrderRaw().customer.date_of_birth,"dd.MM.yyyy"))}}function LQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"R\xFCckzahlungs-ID"),p(),h(3,"td"),y(4),p()()),t&2){let n=w().$implicit;g(4),ye(n.refund_id)}}function OQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td",7)(4,"table",8),W(5,LQt,5,1,"tr",2),h(6,"tr")(7,"td"),y(8,"Betrag"),p(),h(9,"td"),y(10),Ce(11,"money"),p()(),h(12,"tr")(13,"td"),y(14,"Erstattet am"),p(),h(15,"td"),y(16),Ce(17,"nxtDate"),Ce(18,"fromNowText"),p()(),h(19,"tr")(20,"td"),y(21,"Grund"),p(),h(22,"td"),y(23),p()()()()()),t&2){let n=e.$implicit,i=e.index,r=w(3);g(2),Ke("",i+1,". R\xFCckzahlung"),g(3),b("ngIf",r.showDebug()),g(5),ye(tt(11,6,n.refunded_amount/100)),g(6),cn(" ",Nt(17,8,n.refunded_at,"dd.MM.yyyy HH:mm")," (",tt(18,11,n.refunded_at),") "),g(7),ye(n.description)}}function NQt(t,e){if(t&1&&(vs(0),W(1,OQt,24,13,"tr",6),ys()),t&2){let n=w(2);g(),b("ngForOf",n.klarnaOrderRaw().refunds)}}function VQt(t,e){if(t&1&&(ee(0,"div",9),Ce(1,"jsonFormatted")),t&2){let n=w(2);b("innerHTML",tt(1,1,n.klarnaOrderRaw()),Pi)}}function BQt(t,e){if(t&1&&(W(0,EQt,3,0,"div",0),h(1,"table",1)(2,"tr")(3,"td"),y(4,"Klarna-ID"),p(),h(5,"td"),y(6),p()(),W(7,MQt,5,1,"tr",2)(8,kQt,7,1,"tr",2)(9,AQt,7,2,"tr",2),h(10,"tr")(11,"td"),y(12,"Aktueller Wert"),p(),h(13,"td")(14,"div"),y(15),Ce(16,"money"),p(),h(17,"div",3),y(18),Ce(19,"money"),p()()(),W(20,PQt,10,6,"tr",2)(21,RQt,6,3,"tr",2)(22,FQt,6,4,"tr",2)(23,NQt,2,1,"ng-container",2),p(),W(24,VQt,2,3,"div",4)),t&2){let n=w();Je(n.showCloseButton?0:-1),g(),b("ngClass",sn(17,DQt,n.noOuterBorder())),g(5),ye(n.klarnaOrderRaw().order_id),g(),b("ngIf",n.klarnaOrderRaw().status),g(),b("ngIf",n.klarnaOrderRaw().merchant_reference1&&n.showShopOrder),g(),b("ngIf",n.klarnaOrderRaw().initial_payment_method),g(6),ye(tt(16,13,n.openValue())),g(3),Ke("von ",tt(19,15,n.originalValue),""),g(2),b("ngIf",n.klarnaOrderRaw().refunded_amount),g(),b("ngIf",n.klarnaOrderRaw().captured_amount),g(),b("ngIf",n.klarnaOrderRaw().customer),g(),b("ngIf",n.klarnaOrderRaw().refunds&&n.klarnaOrderRaw().refunds.length>0),g(),b("ngIf",n.showDebug()&&!1)}}var DQt,TX,DX=Q(()=>{me();Gi();kl();o2();CX();B1();P0();Il();go();il();Zi();An();ri();ls();ha();q4e();SX();me();ji();yi();Ci();An();DQt=t=>({"nxt-table-no-outer-border":t});TX=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.dialogRef=i,this.cdRef=r,this.socketService=s,this.dialogService=o,this.showCloseButton=!1,this.openValue=gt(0),this.onShowEvent=new nt,this.onShowGiftCard=new nt,this.showDebug=br(!1),this.showShopOrder=!1,this.noOuterBorder=br(!1),this.klarnaOrderRaw=gt(null),this.assignedEventIds=gt([]),this.onShowShopOrder=new nt,this.tattooTickets=gt([]),this.giftCards=gt([])}ngOnChanges(i){i.klarnaOrderId&&this.load()}ngOnInit(){this.pushSocketSubscription=this.socketService.subscribeNew("eventKlarnaOrderRawChanged",i=>{i.order_id===this.klarnaOrderId&&this.klarnaOrderRaw.set(i)})}nxtOnDestroy(){}load(){this.socketService.getKlarnaOrderRaw(this.klarnaOrderId).then(i=>{this.klarnaOrderRaw.set(i)}),this.socketService.getKlarnaOrdersByKlarnaOrderId(this.klarnaOrderId).then(i=>O(this,null,function*(){this.openValue.set(0),this.originalValue=0,this.firstParents=i.filter(s=>!s.originalOrderId),this.originalValue=this.firstParents.reduce((s,o)=>s+o.originalValue,0),this.openValue.set(this.originalValue);let r=gx.sortBySplitDate(i);this.tattooTickets.set([]),this.giftCards.set([]);for(let s of r){let o=s[0].assignments.find(a=>a.refType==="gift-card");if(o){let l={code:(yield this.socketService.getPaymentPossibilityRecord(o.paymentPossibilityRecordId)).name,order:s[0]};this.giftCards.update(c=>(c.push(l),c))}else this.tattooTickets.update(a=>(a.push({name:"Tattoo-Ticket "+s[0].originalValue.toMoneyString()+" ("+this.getOpenValue(s).toMoneyString()+" offen)",orders:s}),a))}this.assignedEventIds.set([]),i.forEach(s=>{for(let o of s.assignments)this.openValue.update(a=>a-o.value),o.eventId&&this.assignedEventIds.update(a=>(a.push(o.eventId),a))}),this.openValue.update(s=>fn.roundMoney(s)),console.log("openValue = "+this.openValue()),this.cdRef.detectChanges()}))}showEvent(i){this.onShowEvent.emit(i)}showGiftCard(i){this.onShowGiftCard.emit(i)}deleteAssignment(i,r){return O(this,null,function*(){(yield this.dialogService.showYesNo("Zuweisung wirklich l\xF6schen?"))&&(i.assignments.splice(r,1),yield this.socketService.updateKlarnaOrder(i),yield za.sleep(500),this.load())})}getOpenValue(i){return i.filter(r=>!r.assigned).reduce((r,s)=>r+s.value,0)}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(Kt),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-klarna-order-raw"]],inputs:{showCloseButton:"showCloseButton",klarnaOrderId:"klarnaOrderId",showDebug:[1,"showDebug"],showShopOrder:"showShopOrder",noOuterBorder:[1,"noOuterBorder"]},outputs:{onShowEvent:"onShowEvent",onShowGiftCard:"onShowGiftCard",onShowShopOrder:"onShowShopOrder"},standalone:!0,features:[et,yn,xe],decls:1,vars:1,consts:[[1,"w-full","flex","flex-row","justify-end","pb-3"],[1,"nxt-table","w-full",3,"ngClass"],[4,"ngIf"],[1,"text-80"],[3,"innerHTML",4,"ngIf"],[3,"click"],[4,"ngFor","ngForOf"],[1,"!p-0"],[1,"nxt-table","nxt-table-no-outer-border","w-full"],[3,"innerHTML"]],template:function(r,s){r&1&&W(0,BQt,25,19),r&2&&Je(s.klarnaOrderRaw()?0:-1)},dependencies:[an,_s,Dn,No,Ct,Lt,Hi,Hn,ks,E5,ld],changeDetection:0});let t=e;return t})()});var DUe,EUe=Q(()=>{me();DUe=(()=>{let e=class e{constructor(){}transform(i){switch(i){case"completed":return"Abgeschlossen";case"processing":return"In Bearbeitung";case"on-hold":return"In Wartestellung";case"pending":return"Ausstehende Zahlung";case"refunded":return"R\xFCckerstattet";default:return i}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"shopOrderStatus",type:e,pure:!0,standalone:!0});let t=e;return t})()});var MUe,kUe=Q(()=>{me();od();MUe=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i){if(i==="klarna_payments")return"Klarna";if(i==="paypal")return"PayPal"}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"shopOrderPaymentMethod",type:e,pure:!0,standalone:!0});let t=e;return t})()});var EX,X4e=Q(()=>{me();yi();Ci();Kr();EX=(()=>{let e=class e{constructor(i,r,s){this.socketService=i,this.dialogService=r,this.loginService=s}refundShopOrderItem(i,r,s,o,a,l){return O(this,null,function*(){if(yield this.dialogService.showYesNo(o,{yesText:r.toMoneyString()+" erstatten",noText:"Abbrechen"})){let c=yield this.dialogService.showInput({message:"Grund f\xFCr die Erstattung"});if(c){let d=yield this.socketService.paypalRefundShopOrderItem({shopOrderLineItemId:i,refundValue:r,refType:l,refId:a,value:s,reason:this.loginService.getUsername()+":  "+c});return d.success?(this.dialogService.showOk("Erfolgreich zur\xFCckgezahlt"),!0):(this.dialogService.showOk(d.message,{title:"Fehler beim zur\xFCckzahlen"}),!1)}}return!1})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt),it(Fi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function zQt(t,e){if(t&1){let n=re();h(0,"div",2)(1,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(2,"Schlie\xDFen"),p()()}}var MX,kX=Q(()=>{me();Gi();Il();Zi();Bd();Zh();go();P0();ri();xX();Z4e();ls();$n();W_();me();ji();yi();jl();Ci();X4e();MX=(()=>{let e=class e extends bt{constructor(i,r,s,o,a){super(),this.dialogRef=i,this.socketService=r,this.permissionService=s,this.dialogService=o,this.paypalRefundService=a,this.showShopOrder=new nt,this.showEvent=new nt,this.shopOrderLineItemId="",this.shopOrder=gt(null),this.shopOrderLineItem=gt(null),this.firstParent=gt(null),this.outTransactions=gt([]),this.refundValue=gt(0),this.refundValue$=Tp(this.refundValue),this.mainWithChildrenTransactionsAndOuts=gt([]),this.openValue=gt(0),this.hastOutTransactions=gt(!1),this.allOrdersAssigned=gt(!1),this.isDialog=!1,this.fromEventId=""}ngOnChanges(i){i.shopOrderLineItemId&&this.load().then()}ngOnInit(){this.isDialog=this.dialogRef?.componentInstance===this,this.pushSocketSubscription=this.socketService.subscribeNew("eventPaypalTransactionChanged",i=>{i.shopOrderId===this.shopOrder().id&&this.load().then()}),this.pushSocketSubscription=this.socketService.subscribeNew("eventShopOrderUpdated",i=>{this.firstParent().shopOrderId===i.id&&this.load().then()})}nxtOnDestroy(){}load(){return O(this,null,function*(){let i=yield this.socketService.getPayPalTattooTicket(this.shopOrderLineItemId);this.shopOrder.set(i.shopOrder),this.shopOrderLineItem.set(i.shopOrder.lineItems.find(s=>s.id===this.shopOrderLineItemId)),this.firstParent.set(i.main);let r=this.outTransactions().length;this.outTransactions.set(i.out),this.refundValue.set(i.refundValue),this.mainWithChildrenTransactionsAndOuts.set([i.main,...i.splitted,...i.out]),this.openValue.set([i.main,...i.splitted].filter(s=>!s.assigned).reduce((s,o)=>s+o.value,0)),this.hastOutTransactions.set(!1),this.allOrdersAssigned.set(!this.mainWithChildrenTransactionsAndOuts().some(s=>!s.assigned)),this.outTransactions().length>r&&this.dialogService.hideLoading()})}refundClicked(){return O(this,null,function*(){if(!this.permissionService.hasPermissionWithInfo(Zt.CanRefund))return;let i=this.firstParent().originalValue-this.refundValue(),r='<table class="nxt-table w-full"><tr></tr>';r+="<tr><td>Bereits erstattet</td><td>"+this.refundValue().toMoneyString()+"</td>",r+="<tr><td>Maximaler Erstattungsbetrag</td><td>"+i.toMoneyString()+"</td>",r+="</table>";let s="Tattoo-Ticket erstatten";if(i===0)yield this.dialogService.showOk(r,{title:s});else{let o=yield this.dialogService.showInput({message:r,title:s,isMoney:!0,prompt:i,placeholder:"Wie viel soll erstattet werden?",selectPrompt:!0});if(Es.isNumber(o)){if(o>i){yield this.dialogService.showOk("Du kannst nur maximal "+i.toMoneyString()+" zur\xFCck zur\xFCckerstatten");return}this.dialogService.showLoading("Erstattung wird durchgef\xFChrt"),this.hideLoadingOnRefundReceived(),yield this.paypalRefundService.refundShopOrderItem(this.shopOrderLineItemId,o,o,"Tattoo-Ticket erstatten",this.firstParent().id,"paypal")}}})}hideLoadingOnRefundReceived(){let i=this.refundValue();this.refundValue$.pipe(Jd(r=>r>i)).subscribe(()=>{this.dialogService.hideLoading()})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(ws),R(vt),R(EX))},e.\u0275cmp=_e({type:e,selectors:[["nxt-tattoo-ticket-paypal"]],inputs:{shopOrderLineItemId:"shopOrderLineItemId"},outputs:{showShopOrder:"showShopOrder",showEvent:"showEvent"},standalone:!0,features:[et,yn,xe],decls:2,vars:5,consts:[[3,"doRefund","showEvent","showShopOrder","shopOrder","fromEventId","tattooTicketItems","isDialog"],["class","w-full flex flex-row justify-center mt-3",4,"ngIf"],[1,"w-full","flex","flex-row","justify-center","mt-3"],[3,"click"]],template:function(r,s){r&1&&(h(0,"nxt-tattoo-ticket",0),F("doRefund",function(){return s.refundClicked()})("showEvent",function(a){return s.showEvent.emit(a)})("showShopOrder",function(a){return s.showShopOrder.emit(a)}),p(),W(1,zQt,3,0,"div",1)),r&2&&(b("shopOrder",s.shopOrder())("fromEventId",s.fromEventId)("tattooTicketItems",s.mainWithChildrenTransactionsAndOuts())("isDialog",s.isDialog),g(),b("ngIf",s.isDialog))},dependencies:[Lt,Ct,bX],changeDetection:0});let t=e;return t})()});var AUe,PUe=Q(()=>{me();AUe=(()=>{let e=class e{constructor(){}transform(i,r,s){return i.find(o=>o[r]===s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtFind",type:e,pure:!0,standalone:!0});let t=e;return t})()});function HQt(t,e){if(t&1){let n=re();h(0,"div",0)(1,"nxt-button-icon",4),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(2,"close"),p()()}}function GQt(t,e){if(t&1&&(h(0,"div",16),y(1),p()),t&2){let n=w(2);g(),Ke("Das Geld ist von ",n.shopOrder().paymentMethod," noch nicht freigegeben!")}}function WQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Bestellung erstellt"),p(),h(3,"td")(4,"div"),y(5),Ce(6,"nxtDate"),p(),h(7,"div",17),y(8),Ce(9,"fromNowText"),p()()()),t&2){let n=w(2);g(5),ye(Nt(6,2,n.shopOrder().createdAt,"dd.MM.yyyy HH:mm")),g(3),ye(tt(9,5,n.shopOrder().createdAt))}}function UQt(t,e){t&1&&(h(0,"td"),y(1,"Bestellung bezahlt"),p())}function jQt(t,e){t&1&&(h(0,"td"),y(1,"Datum"),p())}function $Qt(t,e){if(t&1&&(h(0,"tr"),W(1,UQt,2,0,"td")(2,jQt,2,0,"td"),h(3,"td")(4,"div"),y(5),Ce(6,"nxtDate"),p(),h(7,"div",17),y(8),Ce(9,"fromNowText"),p()()()),t&2){let n=w(2);g(),Je(n.showOrderCreated()?1:2),g(4),ye(Nt(6,3,n.shopOrder().payedAt,"dd.MM.yyyy HH:mm")),g(3),ye(tt(9,6,n.shopOrder().payedAt))}}function KQt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Rabatt-Code"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(2);g(4),ye(n.shopOrder().couponCode)}}function YQt(t,e){if(t&1&&(h(0,"div",20),y(1),p()),t&2){let n=w().$implicit;g(),cn("",n.quantity," x ",n.name,"")}}function qQt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p()),t&2){let n=w().$implicit;g(),Ke("Bezahlt: ",tt(2,1,n.paymentValue),"")}}function ZQt(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit;g(),Ke("ArtikelID: ",n.id,"")}}function XQt(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",18),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.showTattooTicketKlarnaClicked(r.id))}),y(2,"anzeigen"),p()()}t&2&&(g(),b("smallButton",!0))}function QQt(t,e){t&1&&W(0,XQt,3,1,"div",8),t&2&&b("ngIf",!1)}function JQt(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",18),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.showTattooTicketPaypalClicked(r.id))}),y(2,"anzeigen"),p()()}t&2&&(g(),b("smallButton",!0))}function eJt(t,e){t&1&&W(0,JQt,3,1,"div",8),t&2&&b("ngIf",!1)}function tJt(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2),p(),h(3,"td")(4,"div")(5,"nxt-button",18),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.showLineItemClicked(r))}),y(6),p()(),W(7,YQt,2,2,"div",19)(8,qQt,3,3,"div",8)(9,ZQt,2,1,"div",8)(10,QQt,1,1,"div")(11,eJt,1,1,"div"),p()()}if(t&2){let n=e.$implicit,i=e.index,r=w(2);g(2),Ke("",i+1,". Artikel"),g(3),b("smallButton",!0),g(),cn("",n.quantity," x ",n.name,""),g(),b("ngIf",!1),g(),b("ngIf",!1),g(),b("ngIf",!1),g(),Je(n.type==="tattoo-ticket"&&r.shopOrder().paymentMethod==="klarna_payments"?10:n.type==="tattoo-ticket"&&r.shopOrder().paymentMethod==="paypal"?11:-1)}}function iJt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"shopOrderPaymentMethod"),p()),t&2){let n=w(2);g(),Ke(" ",tt(2,1,n.shopOrder().paymentMethod)," ")}}function nJt(t,e){t&1&&(h(0,"div",17),y(1,"an diese Adresse wurde der Gutschein gesendet"),p())}function rJt(t,e){if(t&1&&(h(0,"div",17),y(1),p()),t&2){let n=w(2);g(),Ke("an diese Adresse wurden der ",n.giftCardCount," Gutscheine gesendet")}}function sJt(t,e){t&1&&(h(0,"div",17),y(1,"im Shop angegeben, kann von der PayPal-Email-Adresse abweichen"),p())}function oJt(t,e){if(t&1){let n=re();h(0,"div",21)(1,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.sendGiftCardViaEmailClicked())}),y(2,"Gutschein an diese E-Mail senden"),p()()}t&2&&(g(),b("smallButton",!0))}function aJt(t,e){if(t&1){let n=re();h(0,"div",21)(1,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.sendGiftCardViaEmailClicked())}),y(2),p()()}if(t&2){let n=w(2);g(),b("smallButton",!0),g(),Ke("",n.giftCardCount," Gutscheine an diese E-Mail senden")}}function lJt(t,e){if(t&1){let n=re();h(0,"div",21)(1,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.sendGiftCardViaWhatsAppClicked())}),y(2,"Gutschein an diese Nummer senden"),p()()}t&2&&(g(),b("smallButton",!0))}function cJt(t,e){if(t&1){let n=re();h(0,"div",21)(1,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.sendGiftCardViaWhatsAppClicked())}),y(2),p()()}if(t&2){let n=w(2);g(),b("smallButton",!0),g(),Ke("",n.giftCardCount," Gutscheine an diese Nummer senden")}}function dJt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Erstattet"),p(),h(3,"td",16),y(4),Ce(5,"money"),p()()),t&2){let n=w(2);g(4),ye(tt(5,1,n.refundValue()))}}function uJt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"nxtFind"),p()),t&2){let n,i=w().$implicit,r=w(3);g(),Ke(" ",(n=Xf(2,1,r.shopOrder().lineItems,"id",i.refId))==null?null:n.name," ")}}function hJt(t,e){if(t&1&&(h(0,"tr")(1,"td")(2,"div",24)(3,"div"),y(4,"R\xFCckzahlung"),p(),W(5,uJt,3,5,"div",8),p()(),h(6,"td",25)(7,"table",26)(8,"tr")(9,"td"),y(10,"Betrag"),p(),h(11,"td"),y(12),Ce(13,"money"),p()(),h(14,"tr")(15,"td"),y(16,"Erstellt"),p(),h(17,"td"),y(18),Ce(19,"nxtDate"),p()(),h(20,"tr")(21,"td"),y(22,"Erstellt von"),p(),h(23,"td"),y(24),p()(),h(25,"tr")(26,"td"),y(27,"Grund"),p(),h(28,"td"),y(29),p()()()()()),t&2){let n=e.$implicit;g(5),b("ngIf",n.refType==="shop-order-line-item"),g(7),ye(tt(13,5,n.value)),g(6),ye(Nt(19,7,n.createdAt,"dd.MM.yyyy HH:mm")),g(6),ye(n.createdBy),g(5),ye(n.reason)}}function pJt(t,e){if(t&1&&(h(0,"tr")(1,"td",22)(2,"table",23),W(3,hJt,30,10,"tr",9),p()()()),t&2){let n=w(2);g(3),b("ngForOf",n.refunds())}}function mJt(t,e){t&1&&ee(0,"tr")}function fJt(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Klarna"),p(),h(3,"td",25)(4,"nxt-klarna-order-raw",27),F("onShowEvent",function(r){V(n);let s=w(2);return B(s.showEvent.emit(r))})("onShowGiftCard",function(r){V(n);let s=w(2);return B(s.showGiftCard.emit(r))}),p()()()}if(t&2){let n=w(2);g(4),b("showShopOrder",!1)("showDebug",n.showDebug())("noOuterBorder",!0)("klarnaOrderId",n.shopOrder().transactionId)}}function gJt(t,e){if(t&1&&(ee(0,"div",28),Ce(1,"jsonFormatted")),t&2){let n=w(2);b("innerHTML",tt(1,1,n.shopOrder),Pi)}}function vJt(t,e){if(t&1&&(h(0,"div",5)(1,"table",6)(2,"tr")(3,"td"),y(4,"Shop-ID"),p(),h(5,"td")(6,"div"),y(7),p()()(),h(8,"tr")(9,"td"),y(10,"Shop-Status"),p(),h(11,"td")(12,"div"),y(13),Ce(14,"shopOrderStatus"),p(),W(15,GQt,2,1,"div",7),p()(),W(16,WQt,10,7,"tr")(17,$Qt,10,8,"tr")(18,KQt,5,1,"tr",8)(19,tJt,12,8,"tr",9),h(20,"tr")(21,"td"),y(22,"Zahlungsmethode"),p(),h(23,"td")(24,"div"),y(25),Ce(26,"shopOrderPaymentMethod"),p(),W(27,iJt,3,3,"div",8),p()(),h(28,"tr")(29,"td"),y(30,"Name"),p(),h(31,"td"),y(32),p()(),h(33,"tr")(34,"td"),y(35,"E-Mail"),p(),h(36,"td")(37,"div",10)(38,"div")(39,"div"),y(40),p(),W(41,nJt,2,0,"div",11)(42,rJt,2,1,"div",11)(43,sJt,2,0,"div",11),p(),h(44,"div",10),W(45,oJt,3,1,"div",12)(46,aJt,3,2,"div",12),p()()()(),h(47,"tr")(48,"td"),y(49,"Adresse"),p(),h(50,"td"),y(51),ee(52,"br"),y(53),p()(),h(54,"tr")(55,"td"),y(56,"Handy"),p(),h(57,"td")(58,"div",13)(59,"div"),y(60),p(),W(61,lJt,3,1,"div",12)(62,cJt,3,2,"div",12),p()()(),h(63,"tr")(64,"td"),y(65,"Bezahlt"),p(),h(66,"td",14),y(67),Ce(68,"money"),p()(),W(69,dJt,6,3,"tr",8)(70,pJt,4,1,"tr",8)(71,mJt,1,0,"tr",8)(72,fJt,5,4,"tr",8),p(),W(73,gJt,2,3,"div",15),p()),t&2){let n=w();g(7),ye(n.shopOrder().id),g(6),ye(tt(14,30,n.shopOrder().status)),g(2),b("ngIf",n.shopOrder().status==="on-hold"),g(),Je(n.showOrderCreated()?16:-1),g(),Je(n.shopOrder().payedAt?17:-1),g(),b("ngIf",n.shopOrder().couponCode),g(),b("ngForOf",n.shopOrder().lineItems),g(6),ye(tt(26,32,n.shopOrder().paymentMethod)),g(2),b("ngIf",!1),g(5),cn("",n.shopOrder().billingFirstName," ",n.shopOrder().billingLastName,""),g(8),ye(n.shopOrder().billingEmail),g(),b("ngIf",n.giftCardCount===1),g(),b("ngIf",n.giftCardCount>1),g(),b("ngIf",n.shopOrder().paymentMethod==="paypal"),g(2),b("ngIf",n.shopOrder().billingPhone&&n.giftCardCount===1),g(),b("ngIf",n.shopOrder().billingPhone&&n.giftCardCount>1),g(5),ye(n.shopOrder().billingAddress1),g(2),vv("",n.shopOrder().billingCountry," -",n.shopOrder().billingPostcode," ",n.shopOrder().billingCity," "),g(7),ye(n.shopOrder().billingPhone),g(),b("ngIf",n.shopOrder().billingPhone&&n.giftCardCount===1),g(),b("ngIf",n.shopOrder().billingPhone&&n.giftCardCount>1),g(5),ye(tt(68,34,n.shopOrder().paymentValue)),g(2),b("ngIf",n.refundValue()>0),g(),b("ngIf",n.refunds().length>0),g(),b("ngIf",n.shopOrder().paymentMethod==="paypal"),g(),b("ngIf",n.shopOrder().paymentMethod==="klarna_payments"&&n.showDebug()),g(),b("ngIf",!1)}}function yJt(t,e){if(t&1){let n=re();h(0,"div",29)(1,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(2,"Schlie\xDFen"),p()()}}var zA,IX=Q(()=>{me();Gi();My();B1();P0();EUe();kUe();Il();go();DX();Zi();il();ri();ls();kX();PUe();jo();me();ji();Ci();yi();zA=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.dialogRef=i,this.cdRef=r,this.dialogService=s,this.socketService=o,this.giftCardCount=0,this.isDialog=!1,this.shopOrder=gt(null),this.refunds=gt([]),this.refundValue=gt(0),this.showOrderCreated=vr(()=>!this.shopOrder().payedAt||this.shopOrder().payedAt-this.shopOrder().createdAt>Qt.DURATION_1MINUTE*20),this.showCloseButton=!1,this.showDebug=br(!1),this.showEvent=new nt,this.showGiftCard=new nt,this.showTattooTicketKlarna=new nt,this.showTattooTicketPaypal=new nt,this.giftCardCodes={},this.tattooTickets={},this.pushSocketSubscription=this.socketService.subscribeNew("eventRefundCreated",a=>{a.shopOrderId===this.shopOrderId&&this.load()})}ngOnInit(){this.isDialog=this.dialogRef?.componentInstance===this}ngOnChanges(i){i.shopOrderId&&this.load(),this.cdRef.detectChanges()}nxtOnDestroy(){}sendGiftCardViaWhatsAppClicked(){return O(this,null,function*(){let i=Kc.format(this.shopOrder().billingPhone),r="Gutschein an "+i+" senden?";if(this.giftCardCount>1&&(r=this.giftCardCount+" Gutscheine an "+i+" senden?"),yield this.dialogService.showYesNo(r)){this.dialogService.showLoading("Gutschein wird gesendet...");let o=yield this.socketService.reSendGiftCardsViaWhatsApp(this.shopOrder().id,i);this.dialogService.hideLoading(),o.error?this.dialogService.showOk(`Fehler beim senden
`+o.error):this.dialogService.showOk("Erfolgreich gesendet")}})}sendGiftCardViaEmailClicked(){return O(this,null,function*(){let i='Gutschein an "'+this.shopOrder().billingEmail+'" senden?';if(this.giftCardCount>1&&(i=this.giftCardCount+' Gutscheine an "'+this.shopOrder().billingEmail+'" senden?'),yield this.dialogService.showYesNo(i)){this.dialogService.showLoading("Gutschein wird gesendet...");let s=yield this.socketService.reSendGiftCardsViaEmail(this.shopOrder().id);this.dialogService.hideLoading(),s.error?this.dialogService.showOk(`Fehler beim senden
`+s.error):this.dialogService.showOk("Erfolgreich gesendet")}})}getAdditionalInfos(){return O(this,null,function*(){if(this.giftCardCodes={},this.giftCardCount=0,this.shopOrder().paymentMethod==="paypal"&&(this.paypalTransaction=yield this.socketService.getPaypalTransactionFirstParent(this.shopOrder().transactionId),this.payPalIpn=yield this.socketService.getPayPalIpn(this.shopOrder().transactionId)),this.shopOrder().paymentMethod==="klarna_payments")for(let i of this.shopOrder().lineItems)i.type;for(let i of this.shopOrder().lineItems)i.type==="gift-card"&&(this.giftCardCodes[i.id]=yield this.socketService.getGiftCardCodeByByShopOrderLineItemId(i.id),this.giftCardCount++)})}load(){return O(this,null,function*(){let i=yield this.socketService.getShopOrderForView(this.shopOrderId);this.shopOrder.set(i.shopOrder),this.refunds.set(i.refunds),this.refundValue.set(this.refunds().reduce((r,s)=>r+s.value,0)),this.getAdditionalInfos()})}syncClicked(){this.socketService.syncShopOrder(this.shopOrderId)}showLineItemClicked(i){if(this.giftCardCodes[i.id]){this.showGiftCard.emit(this.giftCardCodes[i.id]);return}let r;i.type==="tattoo-ticket"&&this.shopOrder().paymentMethod==="klarna_payments"&&(r=this.showTattooTicketKlarna),i.type==="tattoo-ticket"&&this.shopOrder().paymentMethod==="paypal"&&(r=this.showTattooTicketPaypal),this.isDialog?(this.dialogService.showTattooTicket.emit(i.id),this.dialogRef.close()):r.emit(i.id)}showTattooTicketKlarnaClicked(i){this.isDialog?(this.dialogService.showTattooTicket.emit(i),this.dialogRef.close()):this.showTattooTicketKlarna.emit(i)}showTattooTicketPaypalClicked(i){this.isDialog?(this.dialogService.showTattooTicket.emit(i),this.dialogRef.close()):this.showTattooTicketPaypal.emit(i)}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(Kt),R(vt),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-shop-order-view"]],inputs:{shopOrderId:"shopOrderId",showCloseButton:"showCloseButton",showDebug:[1,"showDebug"]},outputs:{showEvent:"showEvent",showGiftCard:"showGiftCard",showTattooTicketKlarna:"showTattooTicketKlarna",showTattooTicketPaypal:"showTattooTicketPaypal"},standalone:!0,features:[et,yn,xe],decls:5,vars:4,consts:[[1,"w-full","flex","flex-row","justify-end","pb-3"],["nxtPermission","IsJulian",3,"click","smallButton"],["class","flex flex-row justify-center",4,"ngIf"],["class","w-full flex flex-row justify-center mt-3",4,"ngIf"],[3,"click"],[1,"flex","flex-row","justify-center"],[1,"nxt-table","!border-2"],["class","red",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"flex","flex-row","items-center"],["class","text-80",4,"ngIf"],["class","pl-2",4,"ngIf"],[1,"flex","flex-row","items-center","py-2"],[1,"green"],[3,"innerHTML",4,"ngIf"],[1,"red"],[1,"text-80"],[3,"click","smallButton"],["class","bold",4,"ngIf"],[1,"bold"],[1,"pl-2"],["colspan","2",1,"!p-0"],[1,"nxt-table-no-outer-border","w-full",2,"border-top-width","10px"],[1,"flex","flex-col","justify-center","items-center"],[1,"!p-0"],[1,"nxt-table-no-outer-border","w-full"],[3,"onShowEvent","onShowGiftCard","showShopOrder","showDebug","noOuterBorder","klarnaOrderId"],[3,"innerHTML"],[1,"w-full","flex","flex-row","justify-center","mt-3"]],template:function(r,s){r&1&&(W(0,HQt,3,0,"div",0),h(1,"nxt-button",1),F("click",function(){return s.syncClicked()}),y(2,"SHOP-SYNC"),p(),W(3,vJt,74,36,"div",2)(4,yJt,3,0,"div",3)),r&2&&(Je(s.showCloseButton?0:-1),g(),b("smallButton",!0),g(2),b("ngIf",s.shopOrder()),g(),b("ngIf",s.isDialog))},dependencies:[an,Ct,Hi,Zs,Lt,TX,Hn,ks,MUe,DUe,E5,ld,AUe]});let t=e;return t})()});function xJt(t,e){if(t&1&&(h(0,"div",2,1)(2,"div",5)(3,"span",6),y(4),p()()()),t&2){let n=w();g(4),ye(n.valueIndicatorText)}}function SJt(t,e){if(t&1&&ee(0,"div"),t&2){let n=e.$implicit,i=e.$index,r=w(3);jr(n===0?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),mo("transform",r._calcTickMarkTransform(i))}}function TJt(t,e){if(t&1&&Kn(0,SJt,1,4,"div",8,JTe),t&2){let n=w(2);Yn(n._tickMarks)}}function DJt(t,e){if(t&1&&(h(0,"div",6,1),W(2,TJt,2,0),p()),t&2){let n=w();g(2),Je(n._cachedWidth?2:-1)}}function EJt(t,e){if(t&1&&ee(0,"mat-slider-visual-thumb",7),t&2){let n=w();b("discrete",n.discrete)("thumbPosition",1)("valueIndicatorText",n.startValueIndicatorText)}}var _Jt,CJt,bJt,wJt,fa,HA,AX,RUe,FUe,LUe,MJt,M5,kJt,IJt,k5,Q4e,OUe,SD=Q(()=>{Th();Wc();me();me();bl();qn();$n();_Jt=["knob"],CJt=["valueIndicatorContainer"];bJt=["trackActive"],wJt=["*"];fa=function(t){return t[t.START=1]="START",t[t.END=2]="END",t}(fa||{}),HA=function(t){return t[t.ACTIVE=0]="ACTIVE",t[t.INACTIVE=1]="INACTIVE",t}(HA||{}),AX=new Ri("_MatSlider"),RUe=new Ri("_MatSliderThumb"),FUe=new Ri("_MatSliderRangeThumb"),LUe=new Ri("_MatSliderVisualThumb"),MJt=(()=>{let e=class e{constructor(i,r,s,o){this._cdr=i,this._ngZone=r,this._slider=o,this._isHovered=!1,this._isActive=!1,this._isValueIndicatorVisible=!1,this._platform=Ve(Oo),this._onPointerMove=a=>{if(this._sliderInput._isFocused)return;let l=this._hostElement.getBoundingClientRect(),c=this._slider._isCursorOnSliderThumb(a,l);this._isHovered=c,c?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)},this._onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)},this._onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")},this._onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")},this._onDragStart=a=>{a.button===0&&(this._isActive=!0,this._showActiveRipple())},this._onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple()},this._hostElement=s.nativeElement}ngAfterViewInit(){this._ripple.radius=24,this._sliderInput=this._slider._getInput(this.thumbPosition),this._sliderInputEl=this._sliderInput._hostElement;let i=this._sliderInputEl;this._ngZone.runOutsideAngular(()=>{i.addEventListener("pointermove",this._onPointerMove),i.addEventListener("pointerdown",this._onDragStart),i.addEventListener("pointerup",this._onDragEnd),i.addEventListener("pointerleave",this._onMouseLeave),i.addEventListener("focus",this._onFocus),i.addEventListener("blur",this._onBlur)})}ngOnDestroy(){let i=this._sliderInputEl;i&&(i.removeEventListener("pointermove",this._onPointerMove),i.removeEventListener("pointerdown",this._onDragStart),i.removeEventListener("pointerup",this._onDragEnd),i.removeEventListener("pointerleave",this._onMouseLeave),i.removeEventListener("focus",this._onFocus),i.removeEventListener("blur",this._onBlur))}_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(i){return i?.state===tg.FADING_IN||i?.state===tg.VISIBLE}_showRipple(i,r){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===fa.START?fa.END:fa.START)._showValueIndicator(),!(this._slider._globalRippleOptions?.disabled&&!r)))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:i,centered:!0,persistent:!0})}_hideRipple(i){if(i?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();let r=this._getSibling();r._isShowingAnyRipple()||(this._hideValueIndicator(),r._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(this.thumbPosition===fa.START?fa.END:fa.START)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(pn),R(fi),R(AX))},e.\u0275cmp=_e({type:e,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(r,s){if(r&1&&(ei(ym,5),ei(_Jt,5),ei(CJt,5)),r&2){let o;Pt(o=Rt())&&(s._ripple=o.first),Pt(o=Rt())&&(s._knob=o.first),Pt(o=Rt())&&(s._valueIndicatorContainer=o.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},standalone:!0,features:[as([{provide:LUe,useExisting:e}]),xe],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-mdc-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(r,s){r&1&&(W(0,xJt,5,1,"div",2),ee(1,"div",3,0)(3,"div",4)),r&2&&(Je(s.discrete?0:-1),g(3),b("matRippleDisabled",!0))},dependencies:[ym],styles:[".mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}"],encapsulation:2,changeDetection:0});let t=e;return t})(),M5=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(i){this._disabled=i;let r=this._getInput(fa.END),s=this._getInput(fa.START);r&&(r.disabled=this._disabled),s&&(s.disabled=this._disabled)}get discrete(){return this._discrete}set discrete(i){this._discrete=i,this._updateValueIndicatorUIs()}get min(){return this._min}set min(i){let r=isNaN(i)?this._min:i;this._min!==r&&this._updateMin(r)}_updateMin(i){let r=this._min;this._min=i,this._isRange?this._updateMinRange({old:r,new:i}):this._updateMinNonRange(i),this._onMinMaxOrStepChange()}_updateMinRange(i){let r=this._getInput(fa.END),s=this._getInput(fa.START),o=r.value,a=s.value;s.min=i.new,r.min=Math.max(i.new,s.value),s.max=Math.min(r.max,r.value),s._updateWidthInactive(),r._updateWidthInactive(),i.new<i.old?this._onTranslateXChangeBySideEffect(r,s):this._onTranslateXChangeBySideEffect(s,r),o!==r.value&&this._onValueChange(r),a!==s.value&&this._onValueChange(s)}_updateMinNonRange(i){let r=this._getInput(fa.END);if(r){let s=r.value;r.min=i,r._updateThumbUIByValue(),this._updateTrackUI(r),s!==r.value&&this._onValueChange(r)}}get max(){return this._max}set max(i){let r=isNaN(i)?this._max:i;this._max!==r&&this._updateMax(r)}_updateMax(i){let r=this._max;this._max=i,this._isRange?this._updateMaxRange({old:r,new:i}):this._updateMaxNonRange(i),this._onMinMaxOrStepChange()}_updateMaxRange(i){let r=this._getInput(fa.END),s=this._getInput(fa.START),o=r.value,a=s.value;r.max=i.new,s.max=Math.min(i.new,r.value),r.min=s.value,r._updateWidthInactive(),s._updateWidthInactive(),i.new>i.old?this._onTranslateXChangeBySideEffect(s,r):this._onTranslateXChangeBySideEffect(r,s),o!==r.value&&this._onValueChange(r),a!==s.value&&this._onValueChange(s)}_updateMaxNonRange(i){let r=this._getInput(fa.END);if(r){let s=r.value;r.max=i,r._updateThumbUIByValue(),this._updateTrackUI(r),s!==r.value&&this._onValueChange(r)}}get step(){return this._step}set step(i){let r=isNaN(i)?this._step:i;this._step!==r&&this._updateStep(r)}_updateStep(i){this._step=i,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange()}_updateStepRange(){let i=this._getInput(fa.END),r=this._getInput(fa.START),s=i.value,o=r.value,a=r.value;i.min=this._min,r.max=this._max,i.step=this._step,r.step=this._step,this._platform.SAFARI&&(i.value=i.value,r.value=r.value),i.min=Math.max(this._min,r.value),r.max=Math.min(this._max,i.value),r._updateWidthInactive(),i._updateWidthInactive(),i.value<a?this._onTranslateXChangeBySideEffect(r,i):this._onTranslateXChangeBySideEffect(i,r),s!==i.value&&this._onValueChange(i),o!==r.value&&this._onValueChange(r)}_updateStepNonRange(){let i=this._getInput(fa.END);if(i){let r=i.value;i.step=this._step,this._platform.SAFARI&&(i.value=i.value),i._updateThumbUIByValue(),r!==i.value&&this._onValueChange(i)}}constructor(i,r,s,o,a,l){this._ngZone=i,this._cdr=r,this._elementRef=s,this._dir=o,this._globalRippleOptions=a,this._disabled=!1,this._discrete=!1,this.showTickMarks=!1,this._min=0,this.disableRipple=!1,this._max=100,this._step=1,this.displayWith=c=>`${c}`,this._rippleRadius=24,this.startValueIndicatorText="",this.endValueIndicatorText="",this._isRange=!1,this._isRtl=!1,this._hasViewInitialized=!1,this._tickMarkTrackWidth=0,this._hasAnimation=!1,this._resizeTimer=null,this._platform=Ve(Oo),this._knobRadius=8,this._thumbsOverlap=!1,this._noopAnimations=l==="NoopAnimations",this._dirChangeSubscription=this._dir.change.subscribe(()=>this._onDirChange()),this._isRtl=this._dir.value==="rtl"}ngAfterViewInit(){this._platform.isBrowser&&this._updateDimensions();let i=this._getInput(fa.END),r=this._getInput(fa.START);this._isRange=!!i&&!!r,this._cdr.detectChanges();let s=this._getThumb(fa.END);this._rippleRadius=s._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._isRange?this._initUIRange(i,r):this._initUINonRange(i),this._updateTrackUI(i),this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._observeHostResize(),this._cdr.detectChanges()}_initUINonRange(i){i.initProps(),i.initUI(),this._updateValueIndicatorUI(i),this._hasViewInitialized=!0,i._updateThumbUIByValue()}_initUIRange(i,r){i.initProps(),i.initUI(),r.initProps(),r.initUI(),i._updateMinMax(),r._updateMinMax(),i._updateStaticStyles(),r._updateStaticStyles(),this._updateValueIndicatorUIs(),this._hasViewInitialized=!0,i._updateThumbUIByValue(),r._updateThumbUIByValue()}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._resizeObserver?.disconnect(),this._resizeObserver=null}_onDirChange(){this._isRtl=this._dir.value==="rtl",this._isRange?this._onDirChangeRange():this._onDirChangeNonRange(),this._updateTickMarkUI()}_onDirChangeRange(){let i=this._getInput(fa.END),r=this._getInput(fa.START);i._setIsLeftThumb(),r._setIsLeftThumb(),i.translateX=i._calcTranslateXByValue(),r.translateX=r._calcTranslateXByValue(),i._updateStaticStyles(),r._updateStaticStyles(),i._updateWidthInactive(),r._updateWidthInactive(),i._updateThumbUIByValue(),r._updateThumbUIByValue()}_onDirChangeNonRange(){this._getInput(fa.END)._updateThumbUIByValue()}_observeHostResize(){typeof ResizeObserver>"u"||!ResizeObserver||this._ngZone.runOutsideAngular(()=>{this._resizeObserver=new ResizeObserver(()=>{this._isActive()||(this._resizeTimer&&clearTimeout(this._resizeTimer),this._onResize())}),this._resizeObserver.observe(this._elementRef.nativeElement)})}_isActive(){return this._getThumb(fa.START)._isActive||this._getThumb(fa.END)._isActive}_getValue(i=fa.END){let r=this._getInput(i);return r?r.value:this.min}_skipUpdate(){return!!(this._getInput(fa.START)?._skipUIUpdate||this._getInput(fa.END)?._skipUIUpdate)}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left}_setTrackActiveStyles(i){let r=this._trackActive.nativeElement.style;r.left=i.left,r.right=i.right,r.transformOrigin=i.transformOrigin,r.transform=i.transform}_calcTickMarkTransform(i){return`translateX(${i*(this._tickMarkTrackWidth/(this._tickMarks.length-1))}px`}_onTranslateXChange(i){this._hasViewInitialized&&(this._updateThumbUI(i),this._updateTrackUI(i),this._updateOverlappingThumbUI(i))}_onTranslateXChangeBySideEffect(i,r){this._hasViewInitialized&&(i._updateThumbUIByValue(),r._updateThumbUIByValue())}_onValueChange(i){this._hasViewInitialized&&(this._updateValueIndicatorUI(i),this._updateTickMarkUI(),this._cdr.detectChanges())}_onMinMaxOrStepChange(){this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.markForCheck())}_onResize(){if(this._hasViewInitialized){if(this._updateDimensions(),this._isRange){let i=this._getInput(fa.END),r=this._getInput(fa.START);i._updateThumbUIByValue(),r._updateThumbUIByValue(),i._updateStaticStyles(),r._updateStaticStyles(),i._updateMinMax(),r._updateMinMax(),i._updateWidthInactive(),r._updateWidthInactive()}else{let i=this._getInput(fa.END);i&&i._updateThumbUIByValue()}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges()}}_areThumbsOverlapping(){let i=this._getInput(fa.START),r=this._getInput(fa.END);return!i||!r?!1:r.translateX-i.translateX<20}_updateOverlappingThumbClassNames(i){let r=i.getSibling(),s=this._getThumb(i.thumbPosition);this._getThumb(r.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),s._hostElement.classList.toggle("mdc-slider__thumb--top",this._thumbsOverlap)}_updateOverlappingThumbUI(i){!this._isRange||this._skipUpdate()||this._thumbsOverlap!==this._areThumbsOverlapping()&&(this._thumbsOverlap=!this._thumbsOverlap,this._updateOverlappingThumbClassNames(i))}_updateThumbUI(i){if(this._skipUpdate())return;let r=this._getThumb(i.thumbPosition===fa.END?fa.END:fa.START);r._hostElement.style.transform=`translateX(${i.translateX}px)`}_updateValueIndicatorUI(i){if(this._skipUpdate())return;let r=this.displayWith(i.value);if(this._hasViewInitialized?i._valuetext.set(r):i._hostElement.setAttribute("aria-valuetext",r),this.discrete){i.thumbPosition===fa.START?this.startValueIndicatorText=r:this.endValueIndicatorText=r;let s=this._getThumb(i.thumbPosition);r.length<3?s._hostElement.classList.add("mdc-slider__thumb--short-value"):s._hostElement.classList.remove("mdc-slider__thumb--short-value")}}_updateValueIndicatorUIs(){let i=this._getInput(fa.END),r=this._getInput(fa.START);i&&this._updateValueIndicatorUI(i),r&&this._updateValueIndicatorUI(r)}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;let i=this._step&&this._step>0?this._step:1,s=(Math.floor(this.max/i)*i-this.min)/(this.max-this.min);this._tickMarkTrackWidth=this._cachedWidth*s-6}_updateTrackUI(i){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(i):this._updateTrackUINonRange(i))}_updateTrackUIRange(i){let r=i.getSibling();if(!r||!this._cachedWidth)return;let s=Math.abs(r.translateX-i.translateX)/this._cachedWidth;i._isLeftThumb&&this._cachedWidth?this._setTrackActiveStyles({left:"auto",right:`${this._cachedWidth-r.translateX}px`,transformOrigin:"right",transform:`scaleX(${s})`}):this._setTrackActiveStyles({left:`${r.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${s})`})}_updateTrackUINonRange(i){this._isRtl?this._setTrackActiveStyles({left:"auto",right:"0px",transformOrigin:"right",transform:`scaleX(${1-i.fillPercentage})`}):this._setTrackActiveStyles({left:"0px",right:"auto",transformOrigin:"left",transform:`scaleX(${i.fillPercentage})`})}_updateTickMarkUI(){if(!this.showTickMarks||this.step===void 0||this.min===void 0||this.max===void 0)return;let i=this.step>0?this.step:1;this._isRange?this._updateTickMarkUIRange(i):this._updateTickMarkUINonRange(i),this._isRtl&&this._tickMarks.reverse()}_updateTickMarkUINonRange(i){let r=this._getValue(),s=Math.max(Math.round((r-this.min)/i),0),o=Math.max(Math.round((this.max-r)/i),0);this._isRtl?s++:o++,this._tickMarks=Array(s).fill(HA.ACTIVE).concat(Array(o).fill(HA.INACTIVE))}_updateTickMarkUIRange(i){let r=this._getValue(),s=this._getValue(fa.START),o=Math.max(Math.round((s-this.min)/i),0),a=Math.max(Math.round((r-s)/i)+1,0),l=Math.max(Math.round((this.max-r)/i),0);this._tickMarks=Array(o).fill(HA.INACTIVE).concat(Array(a).fill(HA.ACTIVE),Array(l).fill(HA.INACTIVE))}_getInput(i){if(i===fa.END&&this._input)return this._input;if(this._inputs?.length)return i===fa.START?this._inputs.first:this._inputs.last}_getThumb(i){return i===fa.END?this._thumbs?.last:this._thumbs?.first}_setTransition(i){this._hasAnimation=!this._platform.IOS&&i&&!this._noopAnimations,this._elementRef.nativeElement.classList.toggle("mat-mdc-slider-with-animation",this._hasAnimation)}_isCursorOnSliderThumb(i,r){let s=r.width/2,o=r.x+s,a=r.y+s,l=i.clientX-o,c=i.clientY-a;return Math.pow(l,2)+Math.pow(c,2)<Math.pow(s,2)}};e.\u0275fac=function(r){return new(r||e)(R(pn),R(Kt),R(fi),R(Va,8),R($9,8),R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-slider"]],contentQueries:function(r,s,o){if(r&1&&(_o(o,RUe,5),_o(o,FUe,4)),r&2){let a;Pt(a=Rt())&&(s._input=a.first),Pt(a=Rt())&&(s._inputs=a)}},viewQuery:function(r,s){if(r&1&&(ei(bJt,5),ei(LUe,5)),r&2){let o;Pt(o=Rt())&&(s._trackActive=o.first),Pt(o=Rt())&&(s._thumbs=o)}},hostAttrs:[1,"mat-mdc-slider","mdc-slider"],hostVars:12,hostBindings:function(r,s){r&2&&(jr("mat-"+(s.color||"primary")),ki("mdc-slider--range",s._isRange)("mdc-slider--disabled",s.disabled)("mdc-slider--discrete",s.discrete)("mdc-slider--tick-marks",s.showTickMarks)("_mat-animation-noopable",s._noopAnimations))},inputs:{disabled:[2,"disabled","disabled",mn],discrete:[2,"discrete","discrete",mn],showTickMarks:[2,"showTickMarks","showTickMarks",mn],min:[2,"min","min",xc],color:"color",disableRipple:[2,"disableRipple","disableRipple",mn],max:[2,"max","max",xc],step:[2,"step","step",xc],displayWith:"displayWith"},exportAs:["matSlider"],standalone:!0,features:[as([{provide:AX,useExisting:e}]),Bs,xe],ngContentSelectors:wJt,decls:9,vars:5,consts:[["trackActive",""],["tickMarkContainer",""],[1,"mdc-slider__track"],[1,"mdc-slider__track--inactive"],[1,"mdc-slider__track--active"],[1,"mdc-slider__track--active_fill"],[1,"mdc-slider__tick-marks"],[3,"discrete","thumbPosition","valueIndicatorText"],[3,"class","transform"]],template:function(r,s){r&1&&(gr(),Ln(0),h(1,"div",2),ee(2,"div",3),h(3,"div",4),ee(4,"div",5,0),p(),W(6,DJt,3,1,"div",6),p(),W(7,EJt,1,3,"mat-slider-visual-thumb",7),ee(8,"mat-slider-visual-thumb",7)),r&2&&(g(6),Je(s.showTickMarks?6:-1),g(),Je(s._isRange?7:-1),g(),b("discrete",s.discrete)("thumbPosition",2)("valueIndicatorText",s.endValueIndicatorText))},dependencies:[MJt],styles:['.mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%;pointer-events:none;height:var(--mdc-slider-inactive-track-height)}.mdc-slider__track--active,.mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider__track--active{overflow:hidden;border-radius:var(--mdc-slider-active-track-shape, var(--mat-app-corner-full));height:var(--mdc-slider-active-track-height);top:calc((var(--mdc-slider-inactive-track-height) - var(--mdc-slider-active-track-height))/2)}.mdc-slider__track--active_fill{border-top-style:solid;box-sizing:border-box;height:100%;width:100%;position:relative;transform-origin:left;transition:transform 80ms ease;border-color:var(--mdc-slider-active-track-color, var(--mat-app-primary));border-top-width:var(--mdc-slider-active-track-height)}.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mat-app-on-surface))}[dir=rtl] .mdc-slider__track--active_fill{-webkit-transform-origin:right;transform-origin:right}.mdc-slider__track--inactive{left:0;top:0;opacity:.24;background-color:var(--mdc-slider-inactive-track-color, var(--mat-app-surface-variant));height:var(--mdc-slider-inactive-track-height);border-radius:var(--mdc-slider-inactive-track-shape, var(--mat-app-corner-full))}.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mat-app-on-surface));opacity:.24}.mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.cdk-high-contrast-active .mdc-slider__track--inactive::before{border-color:CanvasText}.mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%);transform:var(--mat-slider-value-indicator-container-transform)}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider__value-indicator{display:flex;align-items:center;border-radius:4px;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom;opacity:1;transition:transform 100ms cubic-bezier(0.4, 0, 1, 1);word-break:normal;background-color:var(--mdc-slider-label-container-color, var(--mat-app-primary));color:var(--mdc-slider-label-label-text-color, var(--mat-app-on-primary));width:var(--mat-slider-value-indicator-width);height:var(--mat-slider-value-indicator-height);padding:var(--mat-slider-value-indicator-padding);opacity:var(--mat-slider-value-indicator-opacity);border-radius:var(--mat-slider-value-indicator-border-radius)}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}.mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;display:var(--mat-slider-value-indicator-caret-display);border-top-color:var(--mdc-slider-label-container-color, var(--mat-app-primary))}.mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.cdk-high-contrast-active .mdc-slider__value-indicator::after{border-color:CanvasText}.mdc-slider__value-indicator-text{text-align:center;width:var(--mat-slider-value-indicator-width);transform:var(--mat-slider-value-indicator-text-transform);font-family:var(--mdc-slider-label-label-text-font, var(--mat-app-label-medium-font));font-size:var(--mdc-slider-label-label-text-size, var(--mat-app-label-medium-size));font-weight:var(--mdc-slider-label-label-text-weight, var(--mat-app-label-medium-weight));line-height:var(--mdc-slider-label-label-text-line-height, var(--mat-app-label-medium-line-height));letter-spacing:var(--mdc-slider-label-label-text-tracking, var(--mat-app-label-medium-tracking))}.mdc-slider__thumb{-webkit-user-select:none;user-select:none;display:flex;left:-24px;outline:none;position:absolute;height:48px;width:48px;pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb{transition:transform 80ms ease}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__thumb--top{z-index:1}.mdc-slider__thumb-knob{position:absolute;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%, -50%);border-style:solid;width:var(--mdc-slider-handle-width);height:var(--mdc-slider-handle-height);border-width:calc(var(--mdc-slider-handle-height)/2) calc(var(--mdc-slider-handle-width)/2);box-shadow:var(--mdc-slider-handle-elevation, var(--mat-app-level1));background-color:var(--mdc-slider-handle-color, var(--mat-app-primary));border-color:var(--mdc-slider-handle-color, var(--mat-app-primary));border-radius:var(--mdc-slider-handle-shape, var(--mat-app-corner-full))}.mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mat-app-primary));border-color:var(--mdc-slider-hover-handle-color, var(--mat-app-primary))}.mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mat-app-primary));border-color:var(--mdc-slider-focus-handle-color, var(--mat-app-primary))}.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mat-app-on-surface));border-color:var(--mdc-slider-disabled-handle-color, var(--mat-app-on-surface))}.mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border:solid 1px #fff;box-sizing:content-box;border-color:var(--mdc-slider-with-overlap-handle-outline-color, var(--mat-app-on-primary));border-width:var(--mdc-slider-with-overlap-handle-outline-width)}.mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider__tick-mark--active,.mdc-slider__tick-mark--inactive{width:var(--mdc-slider-with-tick-marks-container-size);height:var(--mdc-slider-with-tick-marks-container-size);border-radius:var(--mdc-slider-with-tick-marks-container-shape, var(--mat-app-corner-full))}.mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity);background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mat-app-on-surface-variant))}.mdc-slider--disabled .mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity);background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mat-app-on-surface))}.mdc-slider__tick-mark--active{opacity:var(--mdc-slider-with-tick-marks-active-container-opacity);background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mat-app-on-primary))}.mdc-slider__input{cursor:pointer;left:2px;margin:0;height:44px;opacity:0;position:absolute;top:2px;width:44px;box-sizing:content-box}.mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;cursor:pointer;height:48px;margin:0 8px;position:relative;touch-action:pan-y;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider.mdc-slider--disabled{cursor:auto;opacity:.38}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-slider-ripple-color, var(--mat-app-primary))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-slider-hover-state-layer-color)}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-slider-focus-state-layer-color)}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-mdc-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let t=e;return t})(),kJt={provide:Dh,useExisting:_c(()=>k5),multi:!0},IJt={provide:Dh,useExisting:_c(()=>Q4e),multi:!0},k5=(()=>{let e=class e{get value(){return xc(this._hostElement.value,0)}set value(i){i=isNaN(i)?0:i;let r=i+"";if(!this._hasSetInitialValue){this._initialValue=r;return}this._isActive||this._setValue(r)}_setValue(i){this._hostElement.value=i,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges(),this._slider._cdr.markForCheck()}get translateX(){return this._slider.min>=this._slider.max?(this._translateX=this._tickMarkOffset,this._translateX):(this._translateX===void 0&&(this._translateX=this._calcTranslateXByValue()),this._translateX)}set translateX(i){this._translateX=i}get min(){return xc(this._hostElement.min,0)}set min(i){this._hostElement.min=i+"",this._cdr.detectChanges()}get max(){return xc(this._hostElement.max,0)}set max(i){this._hostElement.max=i+"",this._cdr.detectChanges()}get step(){return xc(this._hostElement.step,0)}set step(i){this._hostElement.step=i+"",this._cdr.detectChanges()}get disabled(){return mn(this._hostElement.disabled)}set disabled(i){this._hostElement.disabled=i,this._cdr.detectChanges(),this._slider.disabled!==this.disabled&&(this._slider.disabled=this.disabled)}get percentage(){return this._slider.min>=this._slider.max?this._slider._isRtl?1:0:(this.value-this._slider.min)/(this._slider.max-this._slider.min)}get fillPercentage(){return this._slider._cachedWidth?this._translateX===0?0:this.translateX/this._slider._cachedWidth:this._slider._isRtl?1:0}_setIsFocused(i){this._isFocused=i}constructor(i,r,s,o){this._ngZone=i,this._elementRef=r,this._cdr=s,this._slider=o,this.valueChange=new nt,this.dragStart=new nt,this.dragEnd=new nt,this.thumbPosition=fa.END,this._valuetext=gt(""),this._knobRadius=8,this._tickMarkOffset=3,this._isActive=!1,this._isFocused=!1,this._hasSetInitialValue=!1,this._destroyed=new Mi,this._skipUIUpdate=!1,this._onTouchedFn=()=>{},this._isControlInitialized=!1,this._platform=Ve(Oo),this._hostElement=r.nativeElement,this._ngZone.runOutsideAngular(()=>{this._hostElement.addEventListener("pointerdown",this._onPointerDown.bind(this)),this._hostElement.addEventListener("pointermove",this._onPointerMove.bind(this)),this._hostElement.addEventListener("pointerup",this._onPointerUp.bind(this))})}ngOnDestroy(){this._hostElement.removeEventListener("pointerdown",this._onPointerDown),this._hostElement.removeEventListener("pointermove",this._onPointerMove),this._hostElement.removeEventListener("pointerup",this._onPointerUp),this._destroyed.next(),this._destroyed.complete(),this.dragStart.complete(),this.dragEnd.complete()}initProps(){this._updateWidthInactive(),this.disabled!==this._slider.disabled&&(this._slider.disabled=!0),this.step=this._slider.step,this.min=this._slider.min,this.max=this._slider.max,this._initValue()}initUI(){this._updateThumbUIByValue()}_initValue(){this._hasSetInitialValue=!0,this._initialValue===void 0?this.value=this._getDefaultValue():(this._hostElement.value=this._initialValue,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges())}_getDefaultValue(){return this.min}_onBlur(){this._setIsFocused(!1),this._onTouchedFn()}_onFocus(){this._slider._setTransition(!1),this._slider._updateTrackUI(this),this._setIsFocused(!0)}_onChange(){this.valueChange.emit(this.value),this._isActive&&this._updateThumbUIByValue({withAnimation:!0})}_onInput(){this._onChangeFn?.(this.value),(this._slider.step||!this._isActive)&&this._updateThumbUIByValue({withAnimation:!0}),this._slider._onValueChange(this)}_onNgControlValueChange(){(!this._isActive||!this._isFocused)&&(this._slider._onValueChange(this),this._updateThumbUIByValue()),this._slider.disabled=this._formControl.disabled}_onPointerDown(i){if(!(this.disabled||i.button!==0)){if(this._platform.IOS){let r=this._slider._isCursorOnSliderThumb(i,this._slider._getThumb(this.thumbPosition)._hostElement.getBoundingClientRect());this._isActive=r,this._updateWidthActive(),this._slider._updateDimensions();return}this._isActive=!0,this._setIsFocused(!0),this._updateWidthActive(),this._slider._updateDimensions(),this._slider.step||this._updateThumbUIByPointerEvent(i,{withAnimation:!0}),this.disabled||(this._handleValueCorrection(i),this.dragStart.emit({source:this,parent:this._slider,value:this.value}))}}_handleValueCorrection(i){this._skipUIUpdate=!0,setTimeout(()=>{this._skipUIUpdate=!1,this._fixValue(i)},0)}_fixValue(i){let r=i.clientX-this._slider._cachedLeft,s=this._slider._cachedWidth,o=this._slider.step===0?1:this._slider.step,a=Math.floor((this._slider.max-this._slider.min)/o),l=this._slider._isRtl?1-r/s:r/s,d=Math.round(l*a)/a*(this._slider.max-this._slider.min)+this._slider.min,u=Math.round(d/o)*o,m=this.value;if(u===m){this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(i,{withAnimation:this._slider._hasAnimation});return}this.value=u,this.valueChange.emit(this.value),this._onChangeFn?.(this.value),this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(i,{withAnimation:this._slider._hasAnimation})}_onPointerMove(i){!this._slider.step&&this._isActive&&this._updateThumbUIByPointerEvent(i)}_onPointerUp(){this._isActive&&(this._isActive=!1,this._platform.SAFARI&&this._setIsFocused(!1),this.dragEnd.emit({source:this,parent:this._slider,value:this.value}),setTimeout(()=>this._updateWidthInactive(),this._platform.IOS?10:0))}_clamp(i){let r=this._tickMarkOffset,s=this._slider._cachedWidth-this._tickMarkOffset;return Math.max(Math.min(i,s),r)}_calcTranslateXByValue(){return this._slider._isRtl?(1-this.percentage)*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset:this.percentage*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset}_calcTranslateXByPointerEvent(i){return i.clientX-this._slider._cachedLeft}_updateWidthActive(){}_updateWidthInactive(){this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`,this._hostElement.style.width=`calc(100% + ${this._slider._inputPadding-this._tickMarkOffset*2}px)`,this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`}_updateThumbUIByValue(i){this.translateX=this._clamp(this._calcTranslateXByValue()),this._updateThumbUI(i)}_updateThumbUIByPointerEvent(i,r){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(i)),this._updateThumbUI(r)}_updateThumbUI(i){this._slider._setTransition(!!i?.withAnimation),this._slider._onTranslateXChange(this)}writeValue(i){(this._isControlInitialized||i!==null)&&(this.value=i)}registerOnChange(i){this._onChangeFn=i,this._isControlInitialized=!0}registerOnTouched(i){this._onTouchedFn=i}setDisabledState(i){this.disabled=i}focus(){this._hostElement.focus()}blur(){this._hostElement.blur()}};e.\u0275fac=function(r){return new(r||e)(R(pn),R(fi),R(Kt),R(AX))},e.\u0275dir=mi({type:e,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-slider__input"],hostVars:1,hostBindings:function(r,s){r&1&&F("change",function(){return s._onChange()})("input",function(){return s._onInput()})("blur",function(){return s._onBlur()})("focus",function(){return s._onFocus()}),r&2&&Bn("aria-valuetext",s._valuetext())},inputs:{value:[2,"value","value",xc]},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],standalone:!0,features:[as([kJt,{provide:RUe,useExisting:e}]),Bs]});let t=e;return t})(),Q4e=(()=>{let e=class e extends k5{getSibling(){return this._sibling||(this._sibling=this._slider._getInput(this._isEndThumb?fa.START:fa.END)),this._sibling}getMinPos(){let i=this.getSibling();return!this._isLeftThumb&&i?i.translateX:this._tickMarkOffset}getMaxPos(){let i=this.getSibling();return this._isLeftThumb&&i?i.translateX:this._slider._cachedWidth-this._tickMarkOffset}_setIsLeftThumb(){this._isLeftThumb=this._isEndThumb&&this._slider._isRtl||!this._isEndThumb&&!this._slider._isRtl}constructor(i,r,s,o){super(i,s,o,r),this._cdr=o,this._isEndThumb=this._hostElement.hasAttribute("matSliderEndThumb"),this._setIsLeftThumb(),this.thumbPosition=this._isEndThumb?fa.END:fa.START}_getDefaultValue(){return this._isEndThumb&&this._slider._isRange?this.max:this.min}_onInput(){super._onInput(),this._updateSibling(),this._isActive||this._updateWidthInactive()}_onNgControlValueChange(){super._onNgControlValueChange(),this.getSibling()?._updateMinMax()}_onPointerDown(i){this.disabled||i.button!==0||(this._sibling&&(this._sibling._updateWidthActive(),this._sibling._hostElement.classList.add("mat-mdc-slider-input-no-pointer-events")),super._onPointerDown(i))}_onPointerUp(){super._onPointerUp(),this._sibling&&setTimeout(()=>{this._sibling._updateWidthInactive(),this._sibling._hostElement.classList.remove("mat-mdc-slider-input-no-pointer-events")})}_onPointerMove(i){super._onPointerMove(i),!this._slider.step&&this._isActive&&this._updateSibling()}_fixValue(i){super._fixValue(i),this._sibling?._updateMinMax()}_clamp(i){return Math.max(Math.min(i,this.getMaxPos()),this.getMinPos())}_updateMinMax(){let i=this.getSibling();i&&(this._isEndThumb?(this.min=Math.max(this._slider.min,i.value),this.max=this._slider.max):(this.min=this._slider.min,this.max=Math.min(this._slider.max,i.value)))}_updateWidthActive(){let i=this._slider._rippleRadius*2-this._slider._inputPadding*2,r=this._slider._cachedWidth+this._slider._inputPadding-i-this._tickMarkOffset*2,s=this._slider.min<this._slider.max?(this.max-this.min)/(this._slider.max-this._slider.min):1,o=r*s+i;this._hostElement.style.width=`${o}px`,this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`}_updateWidthInactive(){let i=this.getSibling();if(!i)return;let r=this._slider._cachedWidth-this._tickMarkOffset*2,s=this._isEndThumb?this.value-(this.value-i.value)/2:this.value+(i.value-this.value)/2,o=this._isEndThumb?(this.max-s)/(this._slider.max-this._slider.min):(s-this.min)/(this._slider.max-this._slider.min),a=this._slider.min<this._slider.max?o:1,l=this._slider._rippleRadius;a===1?l=48:a===0&&(l=0);let c=r*a+l;this._hostElement.style.width=`${c}px`,this._hostElement.style.padding="0px",this._isLeftThumb?(this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`,this._hostElement.style.right="auto"):(this._hostElement.style.left="auto",this._hostElement.style.right=`-${this._slider._rippleRadius-this._tickMarkOffset}px`)}_updateStaticStyles(){this._hostElement.classList.toggle("mat-slider__right-input",!this._isLeftThumb)}_updateSibling(){let i=this.getSibling();i&&(i._updateMinMax(),this._isActive?i._updateWidthActive():i._updateWidthInactive())}writeValue(i){(this._isControlInitialized||i!==null)&&(this.value=i,this._updateWidthInactive(),this._updateSibling())}_setValue(i){super._setValue(i),this._updateWidthInactive(),this._updateSibling()}};e.\u0275fac=function(r){return new(r||e)(R(pn),R(AX),R(fi),R(Kt))},e.\u0275dir=mi({type:e,selectors:[["input","matSliderStartThumb",""],["input","matSliderEndThumb",""]],exportAs:["matSliderRangeThumb"],standalone:!0,features:[as([IJt,{provide:FUe,useExisting:e}]),et]});let t=e;return t})(),OUe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,D0]});let t=e;return t})()});var GA,J4e=Q(()=>{kl();GA=class t{static getDiscountPercentage(e,n,i=4){return fn.round((1-n/e)*100,i)}static test(){if(t.getDiscountPercentage(100,80)!==20)debugger}}});var NUe,VUe=Q(()=>{i3();me();od();NUe=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i,r){return Xo.getPaymentMethodText(i)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"paymentMethod",type:e,pure:!0,standalone:!0});let t=e;return t})()});var BUe,zUe=Q(()=>{me();yi();Ci();BUe=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.dialogService=r}refundShopOrderItem(i,r,s,o,a,l){return O(this,null,function*(){if(yield this.dialogService.showYesNo(o,{yesText:r.toMoneyString()+" erstatten",noText:"Abbrechen"})){let c=yield this.dialogService.showInput({message:"Grund f\xFCr die Erstattung"});if(c){let d=yield this.socketService.klarnaRefundShopOrderItem({shopOrderLineItemId:i,refundValue:r,refId:a,reason:c,refType:l});this.dialogService.showOk("Erfolgreich zur\xFCckgezahlt")}}})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function PJt(t,e){if(t&1){let n=re();vs(0),h(1,"table",4)(2,"tr")(3,"td",5)(4,"div",6)(5,"div",7)(6,"div",8),y(7),Ce(8,"money"),p()(),h(9,"nxt-button",9),F("click",function(){V(n);let r=w(3);return B(r.refundClicked(r.record))}),y(10,"Erstatten"),p()()()(),h(11,"tr")(12,"td"),y(13,"ID"),p(),h(14,"td"),y(15),p()(),h(16,"tr")(17,"td"),y(18,"Wert"),p(),h(19,"td"),y(20),Ce(21,"money"),p()(),h(22,"tr")(23,"td"),y(24,"Bezahlt"),p(),h(25,"td"),y(26),Ce(27,"money"),p()()(),ys()}if(t&2){let n=w(3);g(7),Ke("",tt(8,5,n.record.value)," nicht zugewiesen"),g(2),b("smallButton",!0),g(6),ye(n.record.id),g(5),ye(tt(21,7,n.record.value)),g(6),ye(tt(27,9,n.record.paymentValue))}}function RJt(t,e){if(t&1&&(h(0,"div",12),y(1),Ce(2,"money"),p()),t&2){let n=w(6);g(),Ke("",tt(2,1,n.record.assignments[0].value)," R\xFCckerstattet")}}function FJt(t,e){if(t&1&&W(0,RJt,3,3,"div",13),t&2){let n=w(5);b("ngIf",n.record.refunded)}}function LJt(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p()),t&2){let n=w(5);g(),Ke("",tt(2,1,n.record.assignments[0].value)," Zugewiesen")}}function OJt(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Termin"),p(),h(3,"td")(4,"nxt-button",9),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.openEventClicked(r.eventId))}),y(5,"Termin \xF6ffnen "),p()()()}t&2&&(g(4),b("smallButton",!0))}function NJt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Kunde"),p(),h(3,"td"),y(4),p()()),t&2){let n=w().$implicit;g(4),ye(n.event.customerObj.fullName)}}function VJt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Zugewiesen von"),p(),h(3,"td"),y(4),p()()),t&2){let n=w().$implicit;g(4),ye(n.createdBy)}}function BJt(t,e){t&1&&(h(0,"td"),y(1,"Zur\xFCckerstattet am"),p())}function zJt(t,e){t&1&&(h(0,"td"),y(1,"Zugewiesen am"),p())}function HJt(t,e){t&1&&(h(0,"td"),y(1,"Zur\xFCckerstattet von"),p())}function GJt(t,e){t&1&&(h(0,"td"),y(1,"Zugewiesen von"),p())}function WJt(t,e){if(t&1&&(h(0,"tr"),W(1,HJt,2,0,"td",3)(2,GJt,2,0,"td",3),h(3,"td"),y(4),p()()),t&2){let n=w().$implicit,i=w(4);g(),b("ngIf",i.record.refunded),g(),b("ngIf",!i.record.refunded),g(2),ye(n.createdBy)}}function UJt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Bezahl-Wert"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w().$implicit;g(4),ye(tt(5,1,n.paymentValue))}}function jJt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Info"),p(),h(3,"td"),y(4),p()()),t&2){let n=w().$implicit;g(4),ye(n.info)}}function $Jt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"R\xFCckerstattungsinfo"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(5);g(4),ye(n.record.refundInfo)}}function KJt(t,e){if(t&1&&(h(0,"div")(1,"table",4)(2,"tr")(3,"td",5)(4,"div",6),W(5,FJt,1,1,"div",12)(6,LJt,3,3,"div"),p()()(),W(7,OJt,6,1,"tr",3)(8,NJt,5,1,"tr",3)(9,VJt,5,1,"tr",3),h(10,"tr"),W(11,BJt,2,0,"td",3)(12,zJt,2,0,"td",3),h(13,"td"),y(14),Ce(15,"nxtDate"),p()(),W(16,WJt,5,3,"tr",3),h(17,"tr")(18,"td"),y(19,"Wert"),p(),h(20,"td"),y(21),Ce(22,"money"),p()(),W(23,UJt,6,3,"tr",3)(24,jJt,5,1,"tr",3)(25,$Jt,5,1,"tr",3),p()()),t&2){let n=e.$implicit,i=w(4);g(5),Je(i.record.refunded?5:6),g(2),b("ngIf",i.showOpenEvent&&n.eventId),g(),b("ngIf",n.event),g(),b("ngIf",!i.record.refunded),g(2),b("ngIf",i.record.refunded),g(),b("ngIf",!i.record.refunded),g(2),ye(Nt(15,12,n.assignedTime,"dd.MM.yyyy HH:mm")),g(2),b("ngIf",!1),g(5),ye(tt(22,15,n.value)),g(2),b("ngIf",n.paymentValue),g(),b("ngIf",n.info),g(),b("ngIf",i.record.refundInfo)}}function YJt(t,e){if(t&1&&(h(0,"div",1)(1,"div",10),W(2,KJt,26,17,"div",11),p()()),t&2){let n=w(3);g(2),b("ngForOf",n.record.assignments)}}function qJt(t,e){if(t&1&&(h(0,"div",1),W(1,PJt,28,11,"ng-container",3)(2,YJt,3,1,"div",0),p()),t&2){let n=w(2);g(),b("ngIf",!n.record.assigned),g(),b("ngIf",n.record.assignments.length>0)}}function ZJt(t,e){if(t&1&&(h(0,"div",1)(1,"div",2),W(2,qJt,3,2,"div",0),p()()),t&2){let n=w();g(2),b("ngIf",n.record.type==="gift-card")}}var HUe,GUe=Q(()=>{MB();Il();go();Zi();il();Vt();ri();Bd();me();jl();Ci();yi();X4e();zUe();Vt();HUe=(()=>{let e=class e{constructor(i,r,s,o,a){this.permissionService=i,this.dialogService=r,this.socketService=s,this.paypalRefundService=o,this.klarnaRefundService=a,this.showOpenEvent=!0,this.studioRegionBrowserTools=pg,this.openValue=0}ngOnChanges(i){this.calc()}ngOnInit(){}calc(){this.openValue=this.record.value-this.record.assignments.reduce((i,r)=>i+r.value,0)}openEventClicked(i){window.open(pg.getLinkForEvent(i),"_blank")}refundClicked(i){return O(this,null,function*(){if(!["paypal","klarna"].includes(i.paymentMethod)){this.dialogService.showOk("Geht hier nur f\xFCr Klarna oder PayPal");return}if(!this.permissionService.hasPermissionWithInfo(Zt.CanRefund))return;let r="Gutschein im Wert von "+i.value.toMoneyString()+" erstatten?";i.paymentValue<i.value&&(r+=`

Es werden nur `+i.paymentValue.toMoneyString()+" erstatten, da der Gutschein rabattiert war"),i.paymentMethod==="paypal"?i.type==="gift-card"?yield this.paypalRefundService.refundShopOrderItem(i.shopOrderLineItemId,i.paymentValue,i.value,r,i.id,"gift-card"):this.dialogService.showOk("Unerwartet :)"):yield this.klarnaRefundService.refundShopOrderItem(i.shopOrderLineItemId,i.paymentValue,i.value,r,i.id,"gift-card")})}};e.\u0275fac=function(r){return new(r||e)(R(ws),R(vt),R(lt),R(EX),R(BUe))},e.\u0275cmp=_e({type:e,selectors:[["nxt-gift-card-record"]],inputs:{showOpenEvent:"showOpenEvent",record:"record"},standalone:!0,features:[yn,xe],decls:1,vars:1,consts:[["fxLayout","column",4,"ngIf"],["fxLayout","column"],["fxLayout","row",1,"flex","flex-row","justify-center","items-center","pt-3"],[4,"ngIf"],[1,"nxt-table"],["colspan","2"],[1,"flex","flex-col","items-center"],[1,"flex","flex-ro"],[1,"green"],[3,"click","smallButton"],["fxLayout","column","fxLayoutGap","10px"],[4,"ngFor","ngForOf"],[1,"red"],["class","red",4,"ngIf"]],template:function(r,s){r&1&&W(0,ZJt,3,1,"div",0),r&2&&b("ngIf",s.record)},dependencies:[Ct,At,Yt,$r,Hi,Lt,Hn,ks],styles:[".assignment-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:5px}.assignment[_ngcontent-%COMP%]{border:1px solid gray;border-radius:4px}"]});let t=e;return t})()});function XJt(t,e){if(t&1&&(h(0,"div",12),y(1,"noch\xA0"),h(2,"div",13),y(3),Ce(4,"money"),p(),y(5,"\xA0offen"),p()),t&2){let n=w(3);g(3),ye(tt(4,1,n.openValue))}}function QJt(t,e){t&1&&(h(0,"div"),y(1,"vollst\xE4ndig eingel\xF6st"),p())}function JJt(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Nicht zugewiesen"),p(),h(3,"td",13),y(4),Ce(5,"money"),p()()),t&2){let n=w(3);g(4),ye(tt(5,1,n.openValue))}}function eei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"R\xFCckerstattet"),p(),h(3,"td",14),y(4),Ce(5,"money"),p()()),t&2){let n=w(3);g(4),ye(tt(5,1,n.refundValue))}}function tei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"G\xFCltig bis"),p(),h(3,"td"),y(4),Ce(5,"nxtDate"),p()()),t&2){let n=w(3);g(4),ye(Nt(5,1,n.firstParent.validTill,"dd.MM.yyyy"))}}function iei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Info"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(3);g(4),ye(n.firstParent.additionalInfo)}}function nei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Info"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(3);g(4),ye(n.firstParent.additionalInfo2)}}function rei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Info"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(3);g(4),ye(n.firstParent.discountReason)}}function sei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"R\xFCckerstattung"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(3);g(4),ye(n.firstParent.refundInfo)}}function oei(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(4);g(),ye(n.shopOrder.transactionId)}}function aei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Zahlart"),p(),h(3,"td"),y(4),Ce(5,"paymentMethod"),ee(6,"br"),W(7,oei,2,1,"div",3),p()()),t&2){let n=w(3);g(4),ye(tt(5,2,n.firstParent.paymentMethod)),g(3),b("ngIf",n.shopOrder)}}function lei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Shop-ID"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(3);g(4),ye(n.firstParent.shopOrderId)}}function cei(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Shop"),p(),h(3,"td")(4,"div",15)(5,"div"),y(6),p(),h(7,"div")(8,"nxt-button",11),F("click",function(){V(n);let r=w(3);return B(r.onShowShopOrder.emit(r.shopOrder.id))}),y(9,"anzeigen"),p()()()()()}if(t&2){let n=w(3);g(6),ye(n.shopOrder.id),g(2),b("smallButton",!0)}}function dei(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Shop-Json"),p(),h(3,"td"),y(4),Ce(5,"json"),p()()),t&2){let n=w(3);g(4),ye(tt(5,1,n.shopOrder))}}function uei(t,e){if(t&1){let n=re();h(0,"div")(1,"table",6)(2,"tr")(3,"td",7)(4,"div",8)(5,"div",9),y(6),Ce(7,"money"),p(),W(8,XJt,6,3,"div",10)(9,QJt,2,0,"div",3),h(10,"div"),y(11),p()()()(),W(12,JJt,6,3,"tr",3)(13,eei,6,3,"tr",3),h(14,"tr")(15,"td"),y(16,"Bezahlt"),p(),h(17,"td"),y(18),Ce(19,"money"),p()(),W(20,tei,6,4,"tr",3),h(21,"tr")(22,"td"),y(23,"Erstellt"),p(),h(24,"td"),y(25),Ce(26,"nxtDate"),p()(),h(27,"tr")(28,"td"),y(29,"Erstellt von"),p(),h(30,"td"),y(31),p()(),W(32,iei,5,1,"tr",3)(33,nei,5,1,"tr",3)(34,rei,5,1,"tr",3)(35,sei,5,1,"tr",3)(36,aei,8,4,"tr",3)(37,lei,5,1,"tr",3)(38,cei,10,2,"tr",3),h(39,"tr")(40,"td"),y(41,"Studio-Transfer"),p(),h(42,"td")(43,"nxt-button",11),F("click",function(){V(n);let r=w(2);return B(r.studioTransferClicked())}),y(44,"an ein anderes Studio schicken"),p()()(),W(45,dei,6,3,"tr",3),p()()}if(t&2){let n=w(2);g(6),Ke("Gutschein ",tt(7,20,n.firstParent.originalValue),""),g(2),b("ngIf",n.openValue>0),g(),b("ngIf",n.openValue==0),g(2),ye(n.firstParent.name),g(),b("ngIf",n.openValue>0),g(),b("ngIf",n.refundValue>0),g(5),cn("",tt(19,22,n.firstParent.originalPaymentValue)," ",n.firstParent.originalValue!==n.firstParent.originalPaymentValue?"("+n.getDiscountPercentage(n.firstParent==null?null:n.firstParent.originalValue,n.firstParent==null?null:n.firstParent.originalPaymentValue)+" % Rabatt)":"",""),g(2),b("ngIf",n.firstParent.validTill),g(5),ye(Nt(26,24,n.firstParent.createdAt,"dd.MM.yyyy HH:ss")),g(6),ye(n.firstParent.createdBy),g(),b("ngIf",n.firstParent.additionalInfo),g(),b("ngIf",n.firstParent.additionalInfo2&&n.firstParent.additionalInfo!==n.firstParent.additionalInfo2),g(),b("ngIf",n.firstParent.discountReason&&n.firstParent.discountReason!==n.firstParent.additionalInfo2),g(),b("ngIf",n.firstParent.refunded),g(),b("ngIf",n.firstParent.paymentMethod),g(),b("ngIf",!n.shopOrder&&n.firstParent.shopOrderId),g(),b("ngIf",n.shopOrder),g(5),b("smallButton",!0),g(2),b("ngIf",!1)}}function hei(t,e){if(t&1&&(h(0,"div"),ee(1,"nxt-gift-card-record",16),p()),t&2){let n=e.$implicit,i=w(2);g(),b("showOpenEvent",i.showOpenEvent)("record",n)}}function pei(t,e){if(t&1&&(h(0,"div",2),W(1,uei,46,27,"div",3),h(2,"div",4),W(3,hei,2,2,"div",5),p()()),t&2){let n=w();g(),b("ngIf",n.firstParent.type==="gift-card"),g(2),b("ngForOf",n.records)}}var WUe,UUe=Q(()=>{me();J4e();Il();VUe();go();il();Zi();Vt();ri();Bd();GUe();Gi();me();yi();Ci();jl();Kr();Cs();Vt();WUe=(()=>{let e=class e extends bt{constructor(i,r,s,o,a){super(),this.socketService=i,this.dialogService=r,this.permissionService=s,this.loginService=o,this.configService=a,this.onShowShopOrder=new nt,this.openValue=0,this.refundValue=0,this.showOpenEvent=!0,this.getDiscountPercentage=GA.getDiscountPercentage,this.records=[],this.pushSocketSubscription=this.socketService.subscribeNew("eventShopOrderUpdated",l=>{this.records.length>0&&this.records[0].shopOrderId===l.id&&(this.shopOrder=l)}),this.pushSocketSubscription=this.socketService.subscribeNew("eventPaymentPossibilityRecordUpdated",l=>{this.records.some(c=>c.id===l.id)&&this.load()})}ngOnChanges(i){i.id&&this.load()}ngOnInit(){return O(this,null,function*(){})}nxtOnDestroy(){}delete(){alert("gibts noch nicht")}refundPayPalClicked(){return O(this,null,function*(){if(!this.permissionService.hasPermissionWithInfo(Zt.CanRefund))return;let i=this.records[0];if(this.openValue!==i.originalValue){this.dialogService.showOk("Es k\xF6nnen nur Gutscheine zur\xFCckgezahlt werden, die noch nicht benutzt wurden");return}if(!(yield this.socketService.getPayPalIpn(i.paymentMethodId))){this.dialogService.showOk("PayPal-IPN nicht gefunden");return}let s=yield this.dialogService.showInput({message:"Kurze info zur R\xFCckzahlung"});s&&(s=this.loginService.getUsername()+": "+s,this.dialogService.showLoading("Wird zur\xFCckgezahlt..."),this.dialogService.hideLoading())})}load(){return O(this,null,function*(){let i=yield this.socketService.getGiftCardForView(this.id);i?(this.records=[i.mainRecord,...i.splittedRecords],this.firstParent=i.mainRecord,this.shopOrder=i.shopOrder,this.openValue=this.records.filter(r=>!r.assigned).reduce((r,s)=>r+s.value,0),this.refundValue=this.records.filter(r=>r.refunded).reduce((r,s)=>r+s.value,0)):this.dialogService.showOk("Keine Daten gefunden")})}studioTransferClicked(){return O(this,null,function*(){if(this.records.length>1||this.records[0].assigned){this.dialogService.showOk("Nur Gutscheine die noch nicht benutzt wurden k\xF6nnen \xFCbertragen werden");return}let i=yield this.dialogService.showButtons("An welches Studio \xFCbertragen?",{buttons:this.getPossibleStudiosToTransfer(),showCancelButton:!0});if(i){let r="Soll der Gutschein wirklich \xFCbertragen werden?";if(r+=`

`+this.openValue.toMoneyString(),r+=`

`+this.firstParent.name,yield this.dialogService.showYesNo(r)){this.dialogService.showLoading("Gutschein wird \xFCbertragen...");let s=yield this.socketService.sendStudioTransferGiftCard(this.records[0].id,i.value);this.dialogService.hideLoading(),s==="OK"&&(yield this.dialogService.showOk("Gutschein erfolgreich \xFCbertragen"))}}})}getPossibleStudiosToTransfer(){if(this.configService.config.value.studioRegion==="AC")return[{value:"du",text:"D\xFCsseldorf"},{value:"ma",text:"Mallorca"},{value:"staging",text:"Staging"}];if(this.configService.config.value.studioRegion==="DU")return[{value:"ac",text:"Aachen"},{value:"ma",text:"Mallorca"}];if(this.configService.config.value.studioRegion==="FFM")return[{value:"ab",text:"Aschaffenburg"},{value:"nu",text:"N\xFCrnberg"}];if(this.configService.config.value.studioRegion==="NU")return[{value:"ab",text:"Aschaffenburg"},{value:"ffm",text:"Frankfurt"}];if(this.configService.config.value.studioRegion==="AB")return[{value:"nu",text:"N\xFCrnberg"},{value:"ffm",text:"Frankfurt"}]}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(ws),R(Fi),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-gift-card-view"]],inputs:{id:"id",reload:"reload",showOpenEvent:"showOpenEvent"},outputs:{onShowShopOrder:"onShowShopOrder"},standalone:!0,features:[et,yn,xe],decls:2,vars:1,consts:[[1,"nxt-page"],["fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center"],[4,"ngIf"],["fxLayout","column"],[4,"ngFor","ngForOf"],[1,"nxt-table"],["colspan","2"],[1,"flex","flex-col","items-center"],[1,"text-120"],["class","flex flex-row green",4,"ngIf"],[3,"click","smallButton"],[1,"flex","flex-row","green"],[1,"green"],[1,"red"],[1,"flex","flex-row","items-center"],[3,"showOpenEvent","record"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,pei,4,2,"div",1),p()),r&2&&(g(),b("ngIf",s.firstParent))},dependencies:[Ct,At,Yt,oi,Lt,Hi,nk,Hn,NUe,ks,HUe],styles:[".main-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:5px}"]});let t=e;return t})()});var p3,R7=Q(()=>{me();yi();Kr();p3=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.loginService=r,this.socketService.onSubscribeError.subscribe(s=>{this.sendAdmin("socket-error: "+s)})}sendAdmin(i){this.socketService.sendTelegramAdmin(this.loginService.getUserPrefix()+`
`+i)}sendBackofficeHeads(i){this.socketService.sendBackofficeHeads(this.loginService.getUserPrefix()+`
`+i)}sendTelegramDayFinish(i){this.socketService.sendTelegramDayFinishDirect(this.loginService.getUserPrefix()+`
`+i)}sendStudioInfoForAll(i){return O(this,null,function*(){return this.socketService.sendTelegramStudioInfo(i)})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(Fi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var eve,PX,tve=Q(()=>{Nu();zn();Ci();Bd();i3();jo();Vd();eve=Gs(Jm());n6();me();yi();Ci();Kr();R7();Cs();jl();PX=(()=>{let e=class e{constructor(i,r,s,o,a,l){this.socketService=i,this.dialogService=r,this.loginService=s,this.telegramService=o,this.configService=a,this.permissionService=l}followUpCheck(i){return O(this,null,function*(){if(i.workType==="tattoo"){if(i.end-i.start<Qt.DURATION_1HOUR*4||this.permissionService.hasPermission(Zt.CalendarEventEdit_DisableFollowEventInfo))return;let s=(yield this.socketService.getContactWithEvents(i.customer)).events?.filter(o=>o.start>i.start);if(s.length>0){let o=s.length>1?"Der Kunde hat "+s.length+` Folgetermine
`:`Der Kunde hat einen Folgetermin
`;for(let a of s)o+=cr.arrowRight+" "+Ie.format(a.start,"dd.MM.yyyy")+" ("+Ie.dateDiffToNowOnlyDaysText(a.start)+`)
`;yield this.dialogService.showOk(`Check wie weit der Artist gekommen ist!

`+o,{buttonText:"Ja, check ich jetzt DIREKT",title:"Folgetermin-Info"})}}})}artistGetMoneyCheck(i){return O(this,null,function*(){return i.improveArtistShouldGetMoney&&Xo.getCustomerPayedSumFromPayments(i.payments)===0?(this.dialogService.showOk(`Arist bekommt Geld!
Bitte w\xE4ge ab, wie viel der Artist bekommen soll und buche ein Gutschein auf den Termin`,{title:"Nachstechtermin!"}),!1):!0})}eventCloseCheckAdjustPrice(i){return O(this,null,function*(){if(i.adjustPrice){let r=yield this.dialogService.showYesNo('Dieser Termin ist mit "Preis evtl. anpassen" markiert!',{yesText:"Ich habe den Preis gecheckt, es stimmt alles",noText:"Termin \xF6ffnen",title:"Termin mit evtl. Preis anpassen"});return r||this.dialogService.showEvent(i.id),r}return!0})}showNewEvent(i){return O(this,null,function*(){let r=this.dialogService.showComponentFull(nu);return setTimeout(()=>{r.componentInstance.loadEvent({newEventData:i})},500),r})}closeEventDialog(i){return O(this,null,function*(){if(!i.closed&&!(yield this.artistGetMoneyCheck(i))||!i.closed&&!(yield this.eventCloseCheckAdjustPrice(i)))return;yield this.followUpCheck(i);let r=Xo.calcPayout(i.payments,i.artistPercentage,!0),s=(i.workType==="tattoo",2.5);if(r%s!==0){let c="Der Artist bekommt "+Wn.toMoneyString(r)+`
Das willst du nachher nicht zusammen sammeln.
Bitte passe die Artist-Prozente an.`;this.dialogService.showOk(c);return}let o="T\xE4towierer: "+i.artist;o+=`
Kunde: `+i.customerObj.givenName+" "+i.customerObj.familyName,o+=`

Termin `+(i.closed?"\xF6ffnen?":"schlie\xDFen?");let a=[];a.push({text:"Ja, "+(i.closed?"Termin wieder \xF6ffnen":"Termin ist fertig!"),value:"yes"}),i.closed||a.push({text:"Ja, fertig + \u{1F552} Endezeit anpassen",value:"setEndTime"}),a.push({text:"Abbrechen",value:"no"});let l=yield this.dialogService.showButtons(o,{buttons:a});if(typeof l!="string"&&l.value&&(l.value==="yes"||l.value==="setEndTime")){this.dialogService.showLoading(_n.CloseEvent,i.closed?"\xF6ffne Termin":"schlie\xDFe Termin");let c={closed:!1,start:i.start,end:i.end,endPlanned:i.endPlanned};if(i.closed)c.closed=!1;else if(c.closed=!0,l.value==="setEndTime"){c.endPlanned=i.end;let d=i.end-i.start;c.end=Date.now(),i.start>c.end&&(c.start=c.end-d)}return yield this.socketService.updateCalendarEventProperty(i.id,c),this.dialogService.hideLoading(_n.CloseEvent),!0}return!1})}sendTelegramSetEventEndTime(i,r,s){let o=Ie.parseFormat(i,"HH:mm"),a=Ie.parse(r),l=Date.now(),c=eve.default.duration(Math.abs(l-a),"ms").asHours(),d=Math.floor(eve.default.duration(l-a,"ms").asMinutes()),u=Qt.format(Math.abs(Math.floor(l-a)),"HH:mm");if(c>4)return this.dialogService.showOk("Endezeit kann nicht gesetzt werden, der Zeitunterschied betr\xE4gt mehr als 4 Std."),!1;let m=Ie.format(a,"HH:mm"),f=Ie.format(l,"HH:mm"),_="**NEUE ENDEZEIT - "+(d>0?"SP\xC4TER":"FR\xDCHER")+"**";return _+=`
Benutzer: `+this.loginService.getUsername(),_+=`
Artist: `+s,_+=`
Geplant: `+o+" - "+m,_+=`
`+m+" Uhr -> "+f+" Uhr",Math.abs(d)<60?_+=`
`+Math.abs(d)+" Minuten ":_+=`
`+u+" ",_+=(d>0?"sp\xE4ter":"fr\xFCher")+" als geplant.",Math.abs(d)>60&&this.socketService.sendTelegramStudioInfo(_),!0}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt),it(Fi),it(p3),it(Xi),it(ws))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function mei(t,e){if(t&1){let n=re();h(0,"nxt-button",14),F("click",function(){V(n);let r=w(2);return B(r.combineContactsClicked())}),y(1,"Kontakte zusammenf\xFChren"),p()}}function fei(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",20),F("valueChange",function(r){V(n);let s=w(2);return B(s.showDebug.set(r))}),y(1,"Julian"),p()}if(t&2){let n=w(2);b("value",n.showDebug())}}function gei(t,e){if(t&1){let n=re();h(0,"div",21)(1,"nxt-slide-toggle",20),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.artistInPast,r)||(s.artistInPast=r),B(r)}),y(2,"Vergangenheit"),p(),h(3,"div",22)(4,"div",23),F("click",function(){V(n);let r=w(2);return B(r.selectDuration())}),y(5,"Dauer"),p(),y(6,"\xA0\xA0 "),h(7,"mat-slider",24)(8,"input",25),Xe("ngModelChange",function(r){V(n);let s=w(2);return Ze(s.duration,r)||(s.duration=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.durationChanged())}),p()(),y(9," \xA0\xA0 "),h(10,"div"),y(11),Ce(12,"duration"),p()()()}if(t&2){let n=w(2);g(),qe("value",n.artistInPast),g(7),qe("ngModel",n.duration),g(3),ye(Nt(12,3,n.duration*36e5,"HH:mm"))}}function vei(t,e){if(t&1){let n=re();h(0,"div",11)(1,"nxt-radio",12),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.searchType,r)||(s.searchType=r),B(r)}),F("valueChange",function(r){V(n);let s=w();return B(s.searchTypeChanged(r))}),p(),h(2,"nxt-input",13),F("enter",function(){V(n);let r=w();return B(r.search())}),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.searchText,r)||(s.searchText=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.searchTextChanged())}),p(),h(3,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.search())}),y(4,"Suchen"),p(),W(5,mei,2,0,"nxt-button",15),h(6,"div",16),W(7,fei,2,1,"nxt-slide-toggle",17),h(8,"nxt-button",18),F("click",function(){V(n);let r=w();return B(r.testGiftCard("G-7BD2-ADB9-E775"))}),y(9,"11528"),p()(),W(10,gei,13,6,"div",19),p()}if(t&2){let n=w();g(),qe("value",n.searchType),b("options",n.searchTypes),g(),b("clearIcon",!0),qe("value",n.searchText),b("noPadding",!0),g(3),b("ngIf",n.showCombineContacts()),g(2),b("ngIf",n.searchType.value==="shop-order"),g(),b("smallButton",!0),g(2),b("ngIf",n.searchType.value==="artists")}}function yei(t,e){t&1&&ee(0,"div")}function _ei(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",26),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function Cei(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-shop-order-view",29),F("showEvent",function(r){V(n);let s=w(2);return B(s.showEvent(r))})("showGiftCard",function(r){V(n);let s=w(2);return B(s.showGiftCard(r))})("showTattooTicketKlarna",function(r){V(n);let s=w(2);return B(s.showTattooTicketKlarna(r))})("showTattooTicketPaypal",function(r){V(n);let s=w(2);return B(s.showTattooTicketPayPal(r))}),p()()}if(t&2){let n=e.$implicit,i=w(2);g(),b("shopOrderId",n.id)("showDebug",i.showDebug())}}function xei(t,e){if(t&1&&(h(0,"div",27),W(1,Cei,2,2,"div",28),p()),t&2){let n=w();g(),b("ngForOf",n.resultShopOrders())}}function bei(t,e){if(t&1){let n=re();h(0,"div",30)(1,"nxt-gift-card-view",31),F("onShowShopOrder",function(r){V(n);let s=w();return B(s.showShopOrder(r))}),p()()}if(t&2){let n=w();g(),b("showOpenEvent",!n.fromEvent)("id",n.resultGiftCard()[0].id)("reload",n.reload)}}function wei(t,e){if(t&1){let n=re();h(0,"div",32)(1,"nxt-tattoo-ticket-klarna",33),F("showEvent",function(r){V(n);let s=w();return B(s.showEvent(r))})("showShopOrder",function(r){V(n);let s=w();return B(s.showShopOrder(r))}),p()()}if(t&2){let n=w();g(),b("shopOrderLineItemId",n.resultTattooTicketKlarna().shopOrderLineItemId)}}function Sei(t,e){if(t&1){let n=re();h(0,"div",32)(1,"nxt-tattoo-ticket-paypal",33),F("showEvent",function(r){V(n);let s=w();return B(s.showEvent(r))})("showShopOrder",function(r){V(n);let s=w();return B(s.showShopOrder(r))}),p()()}if(t&2){let n=w();g(),b("shopOrderLineItemId",n.resultTattooTicketPaypal().shopOrderLineItemId)}}function Tei(t,e){if(t&1){let n=re();h(0,"div",34)(1,"nxt-datagrid",35),F("selectionChanged",function(r){V(n);let s=w();return B(s.contactSelectionChanged(r))}),p()()}if(t&2){let n=w();g(),b("rowData",n.resultCustomers())("columnDefs",n.customersColumnDefs)}}function Dei(t,e){t&1&&(h(0,"div",39),y(1," Kein Artist gefunden :( "),p())}function Eei(t,e){t&1&&(h(0,"th",53),y(1,"Text f\xFCr Kunden"),p())}function Mei(t,e){if(t&1){let n=re();h(0,"td",59)(1,"div",60)(2,"nxt-button-icon",14),F("click",function(){V(n);let r=w().$implicit,s=w().$implicit,o=w(3);return B(o.copyCustomerText(s.artist,[r]))}),y(3,"content_copy"),p()()()}}function kei(t,e){if(t&1){let n=re();h(0,"td",61)(1,"div",60)(2,"nxt-button-icon",14),F("click",function(){V(n);let r=w(2).$implicit,s=w(3);return B(s.copyCustomerText(r.artist,r.spots))}),y(3,"content_copy"),p()()()}if(t&2){let n=w(2).$implicit;b("rowSpan",n.spots.length)}}function Iei(t,e){t&1&&ee(0,"td")}function Aei(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2),p(),h(3,"td",23),F("click",function(){let r=V(n).$implicit,s=w(4);return B(s.scrollToId(r.artist+"_"+r.start.dateFormat("yyyy-MM-dd")))}),y(4),Ce(5,"nxtDate"),p(),h(6,"td",23),F("click",function(){let r=V(n).$implicit,s=w(4);return B(s.scrollToId(r.artist+"_"+r.end.dateFormat("yyyy-MM-dd")))}),y(7),Ce(8,"nxtDate"),p(),W(9,Mei,4,0,"td",54)(10,kei,4,1,"td",55)(11,Iei,1,0,"td",3),h(12,"td",56)(13,"nxt-button-icon",14),F("click",function(){let r=V(n).$implicit,s=w(4);return B(s.editArtistSpot(r))}),y(14,"edit"),p()(),h(15,"td",57)(16,"div",58),y(17),h(18,"nxt-button-icon",14),F("click",function(){V(n);let r=w().$implicit,s=w(3);return B(s.copyInstaClicked(r))}),y(19,"content_copy"),p()()()()}if(t&2){let n=e.$implicit,i=e.index,r=w().$implicit,s=w(3);g(2),ye(r.artist),g(2),Ke("",Nt(5,7,n.start,"EE dd.MM.yyyy")," "),g(3),Ke("",Nt(8,10,n.end,"EE dd.MM.yyyy")," "),g(2),b("ngIf",s.loginService.isBackoffice()),g(),b("ngIf",s.loginService.isBackoffice()&&i===0&&r.spots.length>1),g(),b("ngIf",s.loginService.isBackoffice()&&i===0&&r.spots.length===1),g(6),Ke(" ",r.instagram,"\xA0\xA0 ")}}function Pei(t,e){if(t&1){let n=re();h(0,"mat-icon",73),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.selectAllDays(r,!1))}),y(1,"deselect "),p()}}function Rei(t,e){if(t&1){let n=re();h(0,"mat-icon",74),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.selectAllDays(r,!0))}),y(1,"select_all "),p()}}function Fei(t,e){if(t&1){let n=re();h(0,"div",62),W(1,Pei,2,0,"mat-icon",63)(2,Rei,2,0,"mat-icon",64),h(3,"div",65)(4,"nxt-checkbox",66),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[0],r)||(s.days[0]=r),B(r)}),F("valueChange",function(){V(n);let r=w(4);return B(r.showArtistsResult())}),p(),h(5,"nxt-checkbox",67),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[1],r)||(s.days[1]=r),B(r)}),F("valueChange",function(){V(n);let r=w(4);return B(r.showArtistsResult())}),p(),h(6,"nxt-checkbox",68),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[2],r)||(s.days[2]=r),B(r)}),F("valueChange",function(){V(n);let r=w(4);return B(r.showArtistsResult())}),p(),h(7,"nxt-checkbox",69),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[3],r)||(s.days[3]=r),B(r)}),F("valueChange",function(){V(n);let r=w(4);return B(r.showArtistsResult())}),p(),h(8,"nxt-checkbox",70),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[4],r)||(s.days[4]=r),B(r)}),F("valueChange",function(){V(n);let r=w(4);return B(r.showArtistsResult())}),p(),h(9,"nxt-checkbox",71),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[5],r)||(s.days[5]=r),B(r)}),F("valueChange",function(){V(n);let r=w(4);return B(r.showArtistsResult())}),p(),h(10,"nxt-checkbox",72),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[6],r)||(s.days[6]=r),B(r)}),F("valueChange",function(){V(n);let r=w(4);return B(r.showArtistsResult())}),p()()()}if(t&2){let n=e.$implicit;g(),b("ngIf",n.days.indexOf(!1)===-1),g(),b("ngIf",n.days.indexOf(!1)>-1),g(2),qe("value",n.days[0]),g(),qe("value",n.days[1]),g(),qe("value",n.days[2]),g(),qe("value",n.days[3]),g(),qe("value",n.days[4]),g(),qe("value",n.days[5]),g(),qe("value",n.days[6])}}function Lei(t,e){if(t&1&&(h(0,"div",60)(1,"div"),y(2),p()()),t&2){let n=w().$implicit;g(2),Ke("",n.artist," ist nicht verf\xFCgbar")}}function Oei(t,e){if(t&1&&(h(0,"th",76),y(1),Ce(2,"nxtDate"),p()),t&2){let n=e.$implicit,i=w(2).$implicit;b("id",i.artist+"_"+n.dateString),g(),Ke(" ",Nt(2,2,n.date,"EE dd.MM.yyyy")," ")}}function Nei(t,e){if(t&1){let n=re();h(0,"div",78)(1,"div",14),F("click",function(){let r=V(n).$implicit,s=w().$implicit,o=w(2).$implicit,a=w(3);return B(a.freeTimeWindowClicked(s,o.artist,r))}),y(2),Ce(3,"duration"),Ce(4,"duration"),p(),h(5,"div",79)(6,"nxt-checkbox",20),F("valueChange",function(r){let s=V(n).$implicit,o=w().$implicit,a=w(2).$implicit,l=w(3);return B(l.checkTimeWindow(a.artist,o.date,s,r))}),p()()()}if(t&2){let n=e.$implicit,i=w(6);g(2),cn(" ",Nt(3,3,n.startTime,"HH:mm")," - ",Nt(4,6,n.endTime,"HH:mm")," "),g(4),b("value",i.checkedTimeWindows[n.id])}}function Vei(t,e){if(t&1&&(h(0,"td"),W(1,Nei,7,9,"div",77),p()),t&2){let n=e.$implicit;g(),b("ngForOf",n.artists[0].freeTimeWindows)}}function Bei(t,e){if(t&1&&(h(0,"table",43)(1,"tr"),W(2,Oei,3,5,"th",75),p(),h(3,"tr"),W(4,Vei,2,1,"td",28),p()()),t&2){let n=w().$implicit,i=w(3);g(2),b("ngForOf",i.artistEvents[n.artist].days),g(2),b("ngForOf",i.artistEvents[n.artist].days)}}function zei(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",14),F("click",function(){V(n);let r=w(2).$implicit,s=w(3);return B(s.copyCustomerTimeWindowText(r.artist))}),y(1,"content_copy "),p()}}function Hei(t,e){if(t&1){let n=re();h(0,"div",60)(1,"nxt-button-icon",80),F("click",function(){V(n);let r=w().$implicit,s=w(3);return B(s.selectAllArtistDays(r.artist))}),y(2,"select_all"),p(),W(3,zei,2,0,"nxt-button-icon",15),p()}if(t&2){let n=w().$implicit,i=w(3);g(3),b("ngIf",(i.checkedTimeWindowObj[n.artist]==null?null:i.checkedTimeWindowObj[n.artist].length)>0)}}function Gei(t,e){if(t&1&&(h(0,"div",42)(1,"table",43)(2,"tr")(3,"th",44),y(4),p()(),h(5,"tr")(6,"th"),y(7,"Artist"),p(),h(8,"th"),y(9,"Von"),p(),h(10,"th"),y(11,"Bis"),p(),W(12,Eei,2,0,"th",45),ee(13,"th",46),h(14,"th"),y(15,"Instagram"),p()(),W(16,Aei,20,13,"tr",28),p(),h(17,"div",47),W(18,Fei,11,9,"div",48),h(19,"div",49),W(20,Lei,3,1,"div",50),h(21,"div",51),W(22,Bei,5,2,"table",52),p()()(),W(23,Hei,4,1,"div",50),p()),t&2){let n=e.$implicit,i=w(3);g(4),Ke(" ",n.artist," "),g(8),b("ngIf",i.loginService.isBackoffice()),g(4),b("ngForOf",n.spots),g(2),b("ngForOf",i.filters),g(2),b("ngIf",(i.artistEvents[n.artist]==null?null:i.artistEvents[n.artist].days.length)===0),g(2),b("ngIf",i.artistEvents[n.artist]),g(),b("ngIf",(i.artistEvents[n.artist]==null?null:i.artistEvents[n.artist].days.length)>0)}}function Wei(t,e){if(t&1&&(h(0,"div",40),W(1,Gei,24,7,"div",41),p()),t&2){let n=w(2);g(),b("ngForOf",n.resultArtists())}}function Uei(t,e){if(t&1&&(h(0,"div",36),W(1,Dei,2,0,"div",37)(2,Wei,2,1,"div",38),p()),t&2){let n=w();g(),b("ngIf",n.resultArtists().length===0),g(),b("ngIf",n.resultArtists().length>0)}}var I5,WA=Q(()=>{me();Ci();jo();$n();zn();Ph();Bd();o2();Qo();sHe();Gi();dA();Lv();go();mg();Mp();Ja();Pa();DX();IX();ls();qn();SD();oo();il();Zi();Jr();s3();ri();Vt();UUe();SX();kX();me();yi();Ci();w4();tve();ji();Cs();Kr();jl();ma();ug();Vt();qn();I5=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d,u,m,f){super(),this.socketService=i,this.dialogService=r,this.clipboardService=s,this.calendarEventService=o,this.dialogRef=a,this.configService=l,this.loginService=c,this.permissionService=d,this.cdRef=u,this.route=m,this.clipboard=f,this.showCombineContacts=gt(!1),this.fromEvent=!1,this.artistInPast=!1,this.reload=new nt,this.filters=[{startTime:11,studioEndTime:20,days:[!0,!0,!0,!0,!0,!0,!0]}],this.searchTypes=[{text:"Kunden",value:"customers"},{text:"Artists",value:"artists"},{text:"Gutschein",value:"gift-card"},{text:"Shop",value:"shop-order"},{text:"Klarna TT",value:"tattoo-ticket-klarna"},{text:"PayPal TT",value:"tattoo-ticket-paypal"}],this.searchText="",this.searchType=this.searchTypes[0],this.resultArtists=gt(null),this.resultCustomers=gt(null),this.resultGiftCard=gt([]),this.resultTattooTicketKlarna=gt(null),this.resultTattooTicketPaypal=gt(null),this.resultShopOrders=gt(null),this.duration=4,this.artistEvents={},this.checkedTimeWindows={},this.checkedTimeWindowObj={},this.customersColumnDefs=[{checkboxSelection:!0,maxWidth:40,cellStyle:{textAlign:"center"}},{nxtOnCellClicked:_=>O(this,null,function*(){let x=this.dialogService.showContactForm(_.data);(yield Sn(x.afterClosed()))&&setTimeout(()=>this.search(),3e3)}),cellRenderer:_=>Ir.Material.Edit,cellStyle:{textAlign:"center"},getQuickFilterText:()=>""},{nxtOnCellClicked:_=>O(this,null,function*(){(yield this.dialogService.showYesNo("Kunde wirklich l\xF6schen?"))&&(yield this.deleteContact(_.data.id))}),hide:!this.permissionService.hasPermission(Zt.ContactsDelete),cellRenderer:_=>Ir.Material.Delete,cellStyle:{textAlign:"center"},getQuickFilterText:()=>""},{nxtFieldType:Ee.ShowContactHistory,cellRenderer:_=>Ir.Material.History,cellStyle:{textAlign:"center"},getQuickFilterText:()=>""},{headerName:"Name",field:"fullName",nxtFieldType:Ee.Text,cellRenderer:_=>aA.highlightHtml(_.value,this.searchText)},{headerName:"Geburtstag",field:"birthday",nxtFieldType:Ee.Date_germanDate,cellRenderer:_=>aA.highlightHtml(_.valueFormatted,this.searchText)},{headerName:"Sprache",field:"lang",nxtFieldType:Ee.Text},{headerName:"Handy",field:"mobileFormatted",nxtFieldType:Ee.Text,cellRenderer:_=>aA.highlightHtml(_.value,this.searchText)},{headerName:"alte Handy",field:"oldMobilesFormatted",valueFormatter:_=>_.value?.map(x=>x.m).join(", ")},{headerName:"Chat",field:"mobileFormatted",nxtFieldType:Ee.WhatsAppChat,valueGetter:_=>_.data,nxtFieldTypeParams:_=>_.data.fullName+" ("+_.data.mobileFormatted+")",cellStyle:{textAlign:"center"}},{headerName:"abgesagte Termine",field:"canceledEvents",nxtFieldType:Ee.CalendarEvents,minWidth:60,getQuickFilterText:_=>""},{headerName:"fertige Termine",field:"closedEvents",nxtFieldType:Ee.CalendarEvents,minWidth:60,getQuickFilterText:_=>""},{headerName:"offene Termine",field:"events",nxtFieldType:Ee.CalendarEvents,minWidth:60,getQuickFilterText:_=>""}],this.showDebug=gt(!1),this.searchText="",this.permissionService.isJulian(),this.route.queryParams.subscribe(_=>{_.search&&_.searchType&&(this.searchType=this.searchTypes.find(x=>x.value===_.searchType),this.searchText=_.search,this.search())}),this.reload.subscribe(()=>{this.search()}),setTimeout(()=>{},400)}nxtOnDestroy(){}searchTypeChanged(i){this.clearResults()}searchTextChanged(){}search(){return O(this,null,function*(){if(this.searchText=this.searchText.trim(),this.clearResults(),this.searchType.value==="gift-card"&&this.searchText.length<8){this.dialogService.showOk("Mindestens 8 Zeichen");return}if(this.searchText.length===0){this.dialogService.showOk("Bitte geben ein Suchbegriff ein");return}let i=yield this.socketService.search({searchType:this.searchType.value,searchText:this.searchText,maxResults:35,options:{artistInPast:this.artistInPast}});this.resultArtists.set(i.artists),this.resultCustomers.set(i.customers),this.resultTattooTicketKlarna.set(i.klarnaTattooTicket),this.resultTattooTicketPaypal.set(i.paypalTattooTicket),this.resultGiftCard.set(i.giftCard),this.resultShopOrders.set(i.shopOrders),this.showArtistsResult(),this.calcResults(),this.cdRef.detectChanges()})}durationChanged(){this.search()}selectDuration(){}copyCustomerText(i,r){let s=[];for(let a of r)s.push("vom "+a.start.dateFormat("EE dd.MM.yyyy")+" bis zum "+a.end.dateFormat("EE dd.MM.yyyy"));let o=i+` ist wie folgt bei uns:
`+s.join(`
und
`);this.dialogService.showOk(o),this.clipboardService.copyToClipboard(o)}freeTimeWindowClicked(i,r,s){return O(this,null,function*(){let o={dateString:i.dateString,timeFromString:Qt.format(s.startTime,"HH:mm"),timeTillString:Qt.format(s.startTime+this.duration*Qt.DURATION_1HOUR,"HH:mm"),studio:i.artists[0].studio,artist:r},a=yield this.calendarEventService.showNewEvent(o);yield Sn(a.afterClosed()),this.dialogRef.close()})}scrollToId(i){document.querySelectorAll("#"+i).forEach(r=>{r.scrollIntoView(),r.classList.add("animate__animated"),r.classList.add("animate__flash"),setTimeout(()=>{r.classList.remove("animate__animated"),r.classList.remove("animate__flash")},1e3),requestAnimationFrame(()=>{let s=this.getScroller(r),o=r.getBoundingClientRect(),a=s.getBoundingClientRect().width/2+s.getBoundingClientRect().x-o.width/2,l=o.x-a;s.scrollBy(l,0)})})}getScroller(i){if(i.parentNode)return i.parentNode?.id==="scroller"?i.parentNode:this.getScroller(i.parentNode)}checkTimeWindow(i,r,s,o){this.checkedTimeWindowObj[i]||(this.checkedTimeWindowObj[i]=[]),o?this.checkedTimeWindowObj[i].push(St(ve({},s),{date:r})):this.checkedTimeWindowObj[i]=this.checkedTimeWindowObj[i].filter(a=>a.id!==s.id)}copyCustomerTimeWindowText(i){let r=[];for(let o of this.checkedTimeWindowObj[i])this.checkedTimeWindows[o.id]=!1,r.push("am "+o.date.dateFormat("EE dd.MM.yyyy")+" um "+Qt.format(o.startTime,"HH:mm")+" Uhr");let s="Folgende Termine kann ich dir bei "+i+` anbieten:
`+r.join(`
oder
`);r.length===1&&(s="Folgenden Termin kann ich dir bei "+i+` anbieten:
`+r.join(`
oder
`)),this.dialogService.showOk(s),this.clipboardService.copyToClipboard(s),this.checkedTimeWindowObj[i]=[]}showArtistsResult(){return O(this,null,function*(){if(this.resetAllDayCheckboxes(),!!this.resultArtists())for(let i of this.resultArtists()){let r=yield this.socketService.eventFinder({artist:i.artist,duration:this.duration*60*60*1e3,fromDateString:Ie.formatNow("yyyy-MM-dd"),tillDateString:Date.now().dateAddYears(3).dateFormat("yyyy-MM-dd"),boolSkillFilter:[],filters:this.filters,skillFilter:[],fillMissingDays:!1});r.days=r.days.filter(s=>s.artists[0].freeTimeWindows.length>0),this.artistEvents[i.artist]=r}})}selectAllDays(i,r){for(let s=0;s<i.days.length;s++)i.days[s]=r;this.showArtistsResult()}deleteContact(i){return O(this,null,function*(){yield this.socketService.deleteContact(i),this.dialogService.showLoading(_n.DeleteContact,"Kunde wird gel\xF6scht..."),yield za.sleep(5e3),this.dialogService.hideLoading(_n.DeleteContact),this.search()})}selectAllArtistDays(i){let r=!0;for(let s of this.artistEvents[i].days)for(let o of s.artists[0].freeTimeWindows)this.checkedTimeWindows[o.id]||(r=!1);for(let s of this.artistEvents[i].days)for(let o of s.artists[0].freeTimeWindows)this.checkTimeWindow(i,s.date,o,!r),this.checkedTimeWindows[o.id]=!r}resetAllDayCheckboxes(){for(let i of Object.keys(this.checkedTimeWindows))this.checkedTimeWindows[i]=!1;for(let i of Object.keys(this.checkedTimeWindowObj))delete this.checkedTimeWindowObj[i]}calcResults(){return O(this,null,function*(){})}clearResults(){this.resultArtists.set(null),this.resultCustomers.set(null),this.resultTattooTicketKlarna.set(null),this.resultGiftCard.set(null),this.resultShopOrders.set(null)}testShopOrder(i){this.searchText=i,this.searchType=this.searchTypes[3],this.search()}testGiftCard(i){this.searchText=i,this.searchType=this.searchTypes[2],this.search()}showShopOrder(i){this.searchText=i.toString(),this.searchType=this.searchTypes.find(r=>r.value==="shop-order"),this.search()}showEvent(i){this.dialogService.showEvent(i)}showGiftCard(i){this.searchText=i,this.searchType=this.searchTypes.find(r=>r.value==="gift-card"),this.search()}showArtist(i){this.searchText=i,this.searchType=this.searchTypes.find(r=>r.value==="artists"),this.search()}editArtistSpot(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(Uy);r.componentInstance.load(i.id),yield Sn(r.afterClosed()),this.search()})}showTattooTicketKlarna(i){this.searchText=i,this.searchType=this.searchTypes.find(r=>r.value==="tattoo-ticket-klarna"),this.search()}showTattooTicketPayPal(i){this.searchText=i,this.searchType=this.searchTypes.find(r=>r.value==="tattoo-ticket-paypal"),this.search()}showContact(i){this.searchText=i,this.searchType=this.searchTypes.find(r=>r.value==="customers"),this.search()}contactSelectionChanged(i){this.selectedRows=i.api.getSelectedRows(),this.selectedRows.length>1&&this.showCombineContacts.set(!0)}combineContactsClicked(){return O(this,null,function*(){let i=yield this.dialogService.showCombineContacts(this.selectedRows.map(r=>r.id));this.search()})}copyInstaClicked(i){this.clipboard.copy("https://instagram.com/"+i.instagram)}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(ep),R(PX),R(Gt,8),R(Xi),R(Fi),R(ws),R(Kt),R(gs),R(_u))},e.\u0275cmp=_e({type:e,selectors:[["nxt-search"]],standalone:!0,features:[et,xe],decls:12,vars:9,consts:[[1,"nxt-page","w-full"],[1,"flex","flex-row","justify-between","mb-2"],["class","flex flex-col md:flex-row justify-center items-center gap-4",4,"ngIf"],[4,"ngIf"],["fxFlexAlign","start",3,"click",4,"ngIf"],[1,"o-auto","h-full","text-90"],["class","flex flex-row justify-center pt-3 w-full",4,"ngIf"],["fxFlex","",4,"ngIf"],["class","flex flex-row w-full justify-center pt-3",4,"ngIf"],["class","flex h-full",4,"ngIf"],["fxLayout","column","class","results pt-4 h-100","style","overflow: auto; border: 0px solid red",4,"ngIf"],[1,"flex","flex-col","md:flex-row","justify-center","items-center","gap-4"],["direction","row","textKey","text",3,"valueChange","value","options"],["placeholder","Suche",1,"md:min-w-[250px]",3,"enter","valueChange","clearIcon","value","noPadding"],[3,"click"],[3,"click",4,"ngIf"],["nxtPermission","IsJulian",1,"flex","gap-2"],[3,"value","valueChange",4,"ngIf"],[3,"click","smallButton"],["fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","2em",4,"ngIf"],[3,"valueChange","value"],["fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","2em"],["fxLayoutAlign","center center"],[1,"mouse-pointer",3,"click"],["fxFlex","250px","min","0.5","max","10","step","0.5"],["matSliderThumb","",3,"ngModelChange","valueChange","ngModel"],["fxFlexAlign","start",3,"click"],[1,"flex","flex-row","justify-center","pt-3","w-full"],[4,"ngFor","ngForOf"],[3,"showEvent","showGiftCard","showTattooTicketKlarna","showTattooTicketPaypal","shopOrderId","showDebug"],["fxFlex",""],[3,"onShowShopOrder","showOpenEvent","id","reload"],[1,"flex","flex-row","w-full","justify-center","pt-3"],[3,"showEvent","showShopOrder","shopOrderLineItemId"],[1,"flex","h-full"],["rowSelection","multiple",1,"h-full",3,"selectionChanged","rowData","columnDefs"],["fxLayout","column",1,"results","pt-4","h-100",2,"overflow","auto","border","0px solid red"],["class","text-120","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxLayoutGap","20px",4,"ngIf"],["fxLayoutAlign","center center",1,"text-120"],["fxLayout","column","fxLayoutAlign","center center","fxLayoutGap","20px"],["class","w-full","fxLayout","column","fxLayoutAlign","center center",4,"ngFor","ngForOf"],["fxLayout","column","fxLayoutAlign","center center",1,"w-full"],[1,"artists-table"],["colspan","7",2,"text-transform","uppercase"],["colspan","2",4,"ngIf"],["nxtPermission","Artists_NewSpot"],["fxLayout","column","fxLayoutAlign","center",2,"overflow","hidden","width","98%","border","0px solid blue"],["fxLayoutAlign","center","fxLayout","row","class","py-2",4,"ngFor","ngForOf"],["fxLayout","row","id","scroller",2,"overflow","auto","margin","auto","max-width","100%"],["fxLayout","row","fxLayoutAlign","center",4,"ngIf"],["fxLayout","row"],["class","artists-table",4,"ngIf"],["colspan","2"],["style","text-align: center;",4,"ngIf"],["style","text-align: center;",3,"rowSpan",4,"ngIf"],["nxtPermission","Artists_NewSpot",1,"center"],[1,"center"],[1,"flex","flex-row","justify-center","items-center"],[2,"text-align","center"],["fxLayout","row","fxLayoutAlign","center"],[2,"text-align","center",3,"rowSpan"],["fxLayoutAlign","center","fxLayout","row",1,"py-2"],["matTooltip","Kein Tag","class","mouse-pointer",3,"click",4,"ngIf"],["matTooltip","Alle Tag","class","mouse-pointer",3,"click",4,"ngIf"],[1,"flex","flex-row","gap-4"],["label","Mo.",3,"valueChange","value"],["label","Di.",3,"valueChange","value"],["label","Mi.",3,"valueChange","value"],["label","Do.",3,"valueChange","value"],["label","Fr.",3,"valueChange","value"],["label","Sa.",3,"valueChange","value"],["label","So.",3,"valueChange","value"],["matTooltip","Kein Tag",1,"mouse-pointer",3,"click"],["matTooltip","Alle Tag",1,"mouse-pointer",3,"click"],[3,"id",4,"ngFor","ngForOf"],[3,"id"],["class","no-wrap p-1 mouse-pointer","fxLayout","column","fxLayoutAlign","center center",4,"ngFor","ngForOf"],["fxLayout","column","fxLayoutAlign","center center",1,"no-wrap","p-1","mouse-pointer"],[1,"pt-3"],["matTooltip","Alle Tage markieren",3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),W(2,vei,11,9,"div",2)(3,yei,1,0,"div",3)(4,_ei,2,0,"nxt-button-icon",4),p(),h(5,"div",5),W(6,xei,2,1,"div",6)(7,bei,2,3,"div",7)(8,wei,2,1,"div",8)(9,Sei,2,1,"div",8)(10,Tei,2,2,"div",9)(11,Uei,3,2,"div",10),p()()),r&2&&(g(2),b("ngIf",!s.fromEvent),g(),b("ngIf",s.fromEvent),g(),b("ngIf",s.dialogRef),g(2),b("ngIf",s.resultShopOrders()),g(),b("ngIf",s.resultGiftCard()&&s.resultGiftCard().length>0),g(),b("ngIf",s.resultTattooTicketKlarna()),g(),b("ngIf",s.resultTattooTicketPaypal()),g(),b("ngIf",s.resultCustomers()),g(),b("ngIf",s.resultArtists()))},dependencies:[At,Yt,$r,oi,Vk,qi,Ct,tm,Yi,Lt,Zs,Nn,M5,k5,ko,mu,Ko,Dp,an,Hi,zA,dr,Zr,dl,H1,Hn,lf,WUe,wX,MX],styles:[".artists-table[_ngcontent-%COMP%]{color:#bbb;border-collapse:collapse;border:1px solid #bbb}.artists-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .artists-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{width:auto;border:1px solid #bbb;padding:10px 20px}"]});let t=e;return t})()});var jei,A5,UA=Q(()=>{ng();me();me();jei=["*"],A5=(()=>{let e=class e{growDoneEvent(i){this.stopScroll(),this.element.nativeElement.clientHeight===0?this.element.nativeElement.classList.add("d-none"):this.element.nativeElement.classList.remove("d-none"),this.HeightChanged.emit()}constructor(i){this.element=i,this.HeightChanged=new nt,this.animateSeconds=.4,this.firstChange=!0,this.startOpacity=1,this.doScroll=!1}ngOnChanges(){if(this.element.nativeElement.classList.remove("d-none"),this.firstChange){this.firstChange=!1;return}this.startHeight=this.element.nativeElement.clientHeight,requestAnimationFrame(()=>{this.grow={value:this.trigger,params:{startHeight:this.startHeight,startOpacity:this.startOpacity,seconds:this.animateSeconds.toString()}}}),this.fromTop&&this.startScroll()}stopScroll(){this.doScroll=!1}startScroll(){this.doScroll=!0,this.scrollDown(),setTimeout(()=>{this.stopScroll()},this.animateSeconds*1e3)}scrollDown(){requestAnimationFrame(()=>{console.log("Scroll down"),this.element.nativeElement.scrollTo({top:999999999}),this.doScroll&&this.scrollDown()})}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-smooth-height"]],hostVars:1,hostBindings:function(r,s){r&1&&C8("@grow.done",function(a){return s.growDoneEvent(a)}),r&2&&_y("@grow",s.grow)},inputs:{trigger:"trigger",fromTop:"fromTop",animateSeconds:"animateSeconds"},outputs:{HeightChanged:"HeightChanged"},standalone:!0,features:[yn,xe],ngContentSelectors:jei,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},styles:["[_nghost-%COMP%]{display:block;overflow:hidden}"],data:{animation:[Nd("grow",[cl("void <=> *",[]),cl("* <=> *",[So({height:"{{startHeight}}px",overflow:"hidden"}),Ml("{{seconds}}s ease")],{params:{startHeight:0}})])]}});let t=e;return t})()});var $ei,Kei,RX,$Ue,FX=Q(()=>{me();me();ri();bl();$ei=["*"],Kei=new Ri("MAT_CARD_CONFIG"),RX=(()=>{let e=class e{constructor(i){this.appearance=i?.appearance||"raised"}};e.\u0275fac=function(r){return new(r||e)(R(Kei,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(r,s){r&2&&ki("mat-mdc-card-outlined",s.appearance==="outlined")("mdc-card--outlined",s.appearance==="outlined")},inputs:{appearance:"appearance"},exportAs:["matCard"],standalone:!0,features:[xe],ngContentSelectors:$ei,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},styles:['.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mdc-elevated-card-container-color, var(--mat-app-surface));border-color:var(--mdc-elevated-card-container-color, var(--mat-app-surface));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-app-corner-medium));box-shadow:var(--mdc-elevated-card-container-elevation, var(--mat-app-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mdc-elevated-card-container-shape, var(--mat-app-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-app-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-app-corner-medium));border-width:var(--mdc-outlined-card-outline-width);border-color:var(--mdc-outlined-card-outline-color, var(--mat-app-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-app-level0))}.mat-mdc-card-outlined::after{border:none}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-app-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-app-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-app-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-app-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-app-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-app-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-app-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-app-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-app-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-app-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-app-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0});let t=e;return t})(),$Ue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,sd,zr]});let t=e;return t})()});var KUe,YUe=Q(()=>{me();Ci();kX();SX();yi();me();KUe=(()=>{let e=class e{constructor(){this.dialogService=Ve(vt),this.socketService=Ve(lt),setTimeout(()=>this.init())}init(){return O(this,null,function*(){this.dialogService.showTattooTicket.subscribe(i=>O(this,null,function*(){let r=yield this.socketService.getShopOrderByLineItemId(i);this.showTattooTicket(i,r.paymentMethod)}))})}showTattooTicket(i,r,s){let o;r==="paypal"&&(o=this.dialogService.showComponentDialog(MX,{shopOrderLineItemId:i,fromEventId:s})),r==="klarna_payments"&&(o=this.dialogService.showComponentDialog(wX,{shopOrderLineItemId:i,fromEventId:s})),o.componentInstance.load().then()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var jA,qUe=Q(()=>{zn();Vd();Ul();jA=class{static getNewTransactionText(e){let n="BANK";return n+=`
`+Ie.format(e.createdAt,"dd.MM.yyyy HH:mm"),n+=`
`+Wn.toMoneyString(e.value),n+=`
`+e.name,n}static getSenderIbanFromRaw(e){let n=e?.NtryDtls?.TxDtls?.RltdPties?.DbtrAcct?.Id?.IBAN;if(n||(n=e?.income?.counterparty_account_number,n))return n;throw Error(`getSenderIbanFromRaw fehlgeschlagen, Absender-IBAN nicht gefunden
`+Qn.stringify(e))}static getBookDay(e){let n=e?.BookgDt?.Dt;if(n)return Ie.parse(n,"yyyy-MM-dd");if(n=e.settled_at?.dateParse()?.dateFormatDate(),n)return n;debugger;throw Error(`getBookDay fehlgeschlagen, BookgDt nicht gefunden
`+Qn.stringify(e))}static getSenderText(e){let n=e?.NtryDtls?.TxDtls?.RmtInf?.Ustrd;if(n)return n;throw Error(`getSenderText fehlgeschlagen, Absender-Text nicht gefunden
`+Qn.stringify(e))}static getSenderName(e){let n=e?.NtryDtls?.TxDtls?.RltdPties?.Dbtr?.Nm;if(n||(n=e?.label,n))return n;throw Error(`getSenderName fehlgeschlagen, Absender-Name nicht gefunden
`+Qn.stringify(e))}}});var ZUe,XUe=Q(()=>{qUe();me();yi();Ci();ZUe=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.dialogService=r}showBankQr(i){return O(this,null,function*(){let r=i.getRawValue();if(r.paymentBankTransaction&&r.paymentValue){let s=yield this.socketService.getPaymentPossibilityRecord(r.paymentBankTransaction.id),o=0;for(;s.originalId;)if(s=yield this.socketService.getPaymentPossibilityRecord(s.originalId),o++,o>10)throw Error(`Original Bank-\xDCberweisung nicht gefunden
Mehr als 10x gesplittet?`);let a=jA.getSenderName(s.rawObject),l=jA.getSenderIbanFromRaw(s.rawObject),c="Kautionsr\xFCckzahlung: "+jA.getSenderText(s.rawObject);c.length>140&&(c=c.substring(0,140)),this.dialogService.showEPCQR(a,l,r.paymentValue,c)}})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function Jei(t,e){t&1&&(h(0,"div"),y(1,"formPayments not set !"),p())}function eti(t,e){if(t&1){let n=re();h(0,"div",10),F("nxtOnMultiClick",function(){V(n);let r=w(2);return B(r.adminClicked())}),y(1),p()}if(t&2){let n=w(2);b("ngStyle",sn(3,qei,n.removePaymentsEnabled?"Red":""))("nxtMultiClick",3),g(),Ke("",n.titleText," ")}}function tti(t,e){if(t&1){let n=re();h(0,"nxt-col",26)(1,"nxt-select",27),F("valueChange",function(){V(n);let r=w().$implicit,s=w(2);return B(s.paymentTypeChange(r,"template"))}),p()()}if(t&2){let n=w().$implicit,i=w(2);g(),b("nxtFormControl",n.get("paymentType"))("options",i.paymentTypes)}}function iti(t,e){if(t&1&&(h(0,"nxt-col"),ee(1,"nxt-date-picker",28),p()),t&2){let n=w().$implicit;g(),b("nxtFormControl",n.get("paymentDate"))("showTodayButton",!1)}}function nti(t,e){if(t&1&&(h(0,"nxt-col",29),ee(1,"nxt-input",30),Ce(2,"nxtDate"),p()),t&2){let n=w().$implicit;g(),b("disabled",!0)("value",Nt(2,2,n.get("createdAt").value,"dd.MM.yyyy HH:mm"))}}function rti(t,e){if(t&1&&(h(0,"nxt-col",31),ee(1,"nxt-input",32),y(2),p()),t&2){let n=w().$implicit,i=w(2);g(),b("nxtFormControl",n.get("createdAt")),g(),Ke(" ",i.DateTools.format(n.get("createdAt").value,"yyyy-MM-dd HH:mm:ss")," ")}}function sti(t,e){if(t&1){let n=re();h(0,"nxt-col",33)(1,"nxt-select",34),F("valueChange",function(){V(n);let r=w().$implicit,s=w(2);return B(s.paymentMethodChange(r))}),p()()}if(t&2){let n=w().$implicit,i=w(2);g(),b("nxtFormControl",n.get("paymentMethod"))("options",n.get("isNewPayment").value?n.get("paymentType").value==="deposit-back"?i.possiblePaymentMethodsDepositBack:i.possiblePaymentMethods:i.paymentMethods)}}function oti(t,e){if(t&1){let n=re();h(0,"nxt-col",35)(1,"nxt-input",36),F("valueChange",function(){V(n);let r=w().$implicit,s=w(2);return B(s.paymentValueChange(r))}),p()()}if(t&2){let n=w().$implicit;g(),b("nxtFormControl",n.get("paymentValue"))("isMoney",!0)}}function ati(t,e){t&1&&ee(0,"nxt-col",37)}function lti(t,e){if(t&1){let n=re();h(0,"div",41)(1,"mat-icon",42),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.refundPaypal(r.getRawValue()))}),y(2," undo "),p()()}}function cti(t,e){if(t&1){let n=re();h(0,"div",41)(1,"mat-icon",43),F("click",function(){let r;V(n);let s=w(2).$implicit,o=w(2);return B(o.showTattooTicket((r=s.get("paymentPaypalTransaction"))==null||r.value==null?null:r.value.shopOrderLineItemId,"paypal"))}),y(2," payments "),p()()}}function dti(t,e){if(t&1){let n=re();h(0,"div",41)(1,"mat-icon",43),F("click",function(){V(n);let r=w(4);return B(r.showPaypalDirectInfo())}),y(2," payments "),p()()}}function uti(t,e){if(t&1){let n=re();h(0,"nxt-col",38),W(1,lti,3,0,"div",39)(2,cti,3,0,"div",39)(3,dti,3,0,"div",39),h(4,"nxt-autocomplete",40),F("optionClick",function(){V(n);let r=w().$implicit,s=w(2);return B(s.paypalTransactionChange(r))}),p()()}if(t&2){let n,i,r,s=w().$implicit,o=w(2);g(),b("ngIf",(n=s.get("paymentPaypalTransaction"))==null||n.value==null?null:n.value.canRefund),g(),b("ngIf",(i=s.get("paymentPaypalTransaction"))==null||i.value==null?null:i.value.shopOrderLineItemId),g(),b("ngIf",((r=s.get("paymentPaypalTransaction"))==null||r.value==null?null:r.value.method)==="direct"),g(),b("placeholder",s.get("paymentType").value==="deposit-back"?"PayPal-R\xFCckzahlung":"Paypal-Zahlung")("displayWith",o.displayPaypalTransactionFn)("displayInOptionWith",o.displayPaypalTransactionOptionFn)("options",s.get("paymentType").value==="deposit-back"?o.notAssignedPaypalTransactionsOut:o.notAssignedPaypalTransactionsIn)("nxtFormControl",s.get("paymentPaypalTransaction"))("filterFields",bn(11,Zei))("showClearIcon",!1)("maxOptionsToShow",20)}}function hti(t,e){if(t&1){let n=re();h(0,"div",46)(1,"mat-icon",47),F("click",function(){let r;V(n);let s=w(2).$implicit,o=w(2);return B(o.showTattooTicket((r=s.get("paymentKlarnaOrder").value)==null?null:r.shopOrderLineItemId,"klarna_payments"))}),y(2," payments "),p()()}}function pti(t,e){if(t&1){let n=re();h(0,"nxt-col",37),W(1,hti,3,0,"div",44),h(2,"nxt-autocomplete",45),F("optionClick",function(){V(n);let r=w().$implicit,s=w(2);return B(s.klarnaOrderChange(r))}),p()()}if(t&2){let n,i=w().$implicit,r=w(2);g(),b("ngIf",(n=i.get("paymentKlarnaOrder"))==null||n.value==null?null:n.value.shopOrderLineItemId),g(),b("displayWith",r.displayKlarnaOrderFn)("displayInOptionWith",r.displayKlarnaOrderOptionFn)("options",i.get("paymentType").value==="deposit-back"?r.notAssignedKlarnaOrdersOut:r.notAssignedKlarnaOrdersIn)("nxtFormControl",i.get("paymentKlarnaOrder"))("filterFields",bn(8,Xei))("showClearIcon",!1)("maxOptionsToShow",20)}}function mti(t,e){if(t&1){let n=re();h(0,"div",50)(1,"mat-icon",51),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.showGiftCard(r.get("paymentGiftCard").value))}),y(2,"info "),p()()}}function fti(t,e){if(t&1){let n=re();h(0,"nxt-col",37),W(1,mti,3,0,"div",48),h(2,"nxt-autocomplete",49),F("optionClick",function(){V(n);let r=w().$implicit,s=w(2);return B(s.giftCardChange(r))}),p()()}if(t&2){let n,i=w().$implicit,r=w(2);g(),b("ngIf",(n=i.get("paymentGiftCard").value)==null?null:n.id),g(),b("displayWith",r.displayGiftCardFn)("displayInOptionWith",r.displayGiftCardOptionFn.bind(r,i))("nxtFormControl",i.get("paymentGiftCard"))("showClearIcon",!1)("customSearchAsyncFn",r.searchGiftCard)}}function gti(t,e){if(t&1){let n=re();h(0,"div",41)(1,"mat-icon",54),F("click",function(){V(n);let r=w(4);return B(r.showBankPaymentInfoClicked())}),y(2," account_balance "),p()()}}function vti(t,e){if(t&1){let n=re();h(0,"div",55)(1,"nxt-button-icon",56),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.paymentService.showBankQr(r))}),y(2,"qr_code_2"),p()()}}function yti(t,e){if(t&1){let n=re();h(0,"nxt-col",37),W(1,gti,3,0,"div",39),h(2,"nxt-autocomplete",52),F("optionClick",function(){V(n);let r=w().$implicit,s=w(2);return B(s.bankTransactionChange(r))}),p(),W(3,vti,3,0,"div",53),p()}if(t&2){let n,i,r=w().$implicit,s=w(2);g(),b("ngIf",(n=r.get("paymentBankTransaction").value)==null?null:n.id),g(),b("displayWith",s.displayBankTransactionFn)("displayInOptionWith",s.displayBankTransactionOptionFn)("options",r.get("paymentType").value==="deposit-back"?s.notAssignedBankTransactionsOut:s.notAssignedBankTransactionsIn)("nxtFormControl",r.get("paymentBankTransaction"))("filterFields",bn(9,Qei))("showClearIcon",!1)("maxOptionsToShow",20),g(),b("ngIf",((i=r.get("paymentBankTransaction").value)==null?null:i.id)&&r.get("paymentType").value!=="deposit-back"&&r.get("paymentValue").value>0)}}function _ti(t,e){if(t&1&&(h(0,"nxt-col",37),ee(1,"nxt-input",57),p()),t&2){let n=w().$implicit;g(),b("nxtFormControl",n.get("paymentComment"))}}function Cti(t,e){if(t&1&&(h(0,"nxt-col",58),ee(1,"nxt-select",59),p()),t&2){let n=w().$implicit,i=w(2);b("fxHide.lt-md",!0),g(),b("nxtFormControl",n.get("studio"))("options",i.studios)}}function xti(t,e){if(t&1&&(h(0,"nxt-col",60),ee(1,"nxt-select",61),p()),t&2){let n=w().$implicit,i=w(2);b("fxHide.lt-md",!0),g(),b("nxtFormControl",n.get("studioReal"))("options",i.studiosWithoutOnlyCash)}}function bti(t,e){if(t&1&&(h(0,"nxt-col",60),ee(1,"nxt-select",62),p()),t&2){let n=w().$implicit,i=w(2);b("fxHide.lt-md",!0),g(),b("nxtFormControl",n.get("workplace"))("options",i.workplaces)}}function wti(t,e){if(t&1&&(h(0,"nxt-col",63),ee(1,"nxt-checkbox",64),p()),t&2){let n=w().$implicit;g(),b("nxtFormControl",n.get("isNewPayment"))}}function Sti(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",65),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.printCustomerReceipt.emit(r.get("paymentUuid").value))}),y(1,"print "),p()}}function Tti(t,e){t&1&&(h(0,"div",25),y(1,"\xA0"),p())}function Dti(t,e){if(t&1&&(h(0,"div",11),W(1,tti,2,2,"nxt-col",12)(2,iti,2,2,"nxt-col",0)(3,nti,3,5,"nxt-col",13)(4,rti,3,2,"nxt-col",14)(5,sti,2,2,"nxt-col",15)(6,oti,2,2,"nxt-col",16)(7,ati,1,0,"nxt-col",17)(8,uti,5,12,"nxt-col",18)(9,pti,3,9,"nxt-col",17)(10,fti,3,6,"nxt-col",17)(11,yti,4,10,"nxt-col",17)(12,_ti,2,1,"nxt-col",17)(13,Cti,2,3,"nxt-col",19)(14,xti,2,3,"nxt-col",20)(15,bti,2,3,"nxt-col",20),h(16,"nxt-col",21),ee(17,"nxt-input",22),p(),W(18,wti,2,1,"nxt-col",23)(19,Sti,2,0,"nxt-button-icon",24)(20,Tti,2,0,"div",25),p()),t&2){let n=e.$implicit,i=w(2);b("fxLayoutGap",i.controlGap),g(),b("ngIf",i.paymentTypes&&i.paymentTypes.length>0),g(),b("ngIf",n.get("paymentType").value),g(),b("ngIf",!i.removePaymentsEnabled&&n.get("paymentType").value),g(),b("ngIf",i.removePaymentsEnabled&&n.get("paymentType").value),g(),b("ngIf",n.get("paymentType").value),g(),b("ngIf",n.get("paymentType").value),g(),b("ngIf",!n.get("paymentMethod").value),g(),b("ngIf",n.get("paymentMethod").value==="paypal"),g(),b("ngIf",n.get("paymentMethod").value==="klarna"),g(),b("ngIf",n.get("paymentMethod").value==="gift-card"),g(),b("ngIf",n.get("paymentMethod").value==="bank"),g(),b("ngIf",n.get("paymentMethod").value==="cash"),g(),b("ngIf",n.get("paymentType").value),g(),b("ngIf",i.removePaymentsEnabled&&n.get("paymentType").value),g(),b("ngIf",i.removePaymentsEnabled),g(),b("fxHide.lt-md",!0),g(),b("nxtFormControl",n.get("createdBy")),g(),b("ngIf",i.removePaymentsEnabled),g(),Je(n.get("paymentMethod").value==="cash"&&n.get("paymentType").value!=="payout"?19:20)}}function Eti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("deposit","paypal"))}),y(1,"Kaution - PayPal "),p()}}function Mti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("deposit","bank"))}),y(1,"Kaution - Bank "),p()}}function kti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("deposit","klarna"))}),y(1," Kaution - Klarna "),p()}}function Iti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("deposit","gift-card"))}),y(1,"Kaution - Gutschein "),p()}}function Ati(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("rest","gift-card"))}),y(1,"Rest - Gutschein"),p()}}function Pti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("rest","paypal"))}),y(1,"Rest - PayPal "),p()}}function Rti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("complete","klarna"))}),y(1," Gesamt - Klarna "),p()}}function Fti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("complete","gift-card"))}),y(1,"Gesamt - Gutschein "),p()}}function Lti(t,e){if(t&1&&(h(0,"div")(1,"div",66),W(2,Eti,2,0,"nxt-button",67)(3,Mti,2,0,"nxt-button",67)(4,kti,2,0,"nxt-button",67)(5,Iti,2,0,"nxt-button",67)(6,Ati,2,0,"nxt-button",67)(7,Pti,2,0,"nxt-button",67)(8,Rti,2,0,"nxt-button",67)(9,Fti,2,0,"nxt-button",67),p()()),t&2){let n=w(2);g(2),b("ngIf",n.possiblePaymentMethodsHas("paypal")&&!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.possiblePaymentMethodsHas("bank")&&!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.possiblePaymentMethodsHas("klarna")&&!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.possiblePaymentMethodsHas("gift-card")&&!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.possiblePaymentMethodsHas("gift-card")&&n.showRest),g(),b("ngIf",n.possiblePaymentMethodsHas("paypal")&&n.loginService.getWorkplace()==="reception"&&n.showRest),g(),b("ngIf",n.possiblePaymentMethodsHas("klarna")&&n.loginService.getWorkplace()==="backoffice"&&!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.possiblePaymentMethodsHas("gift-card")&&!n.hasPaymentType.deposit&&!n.hasPaymentType.rest&&!n.hasPaymentType.complete)}}function Oti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("complete","cash"))}),y(1,"Gesamt - Kasse "),p()}}function Nti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("complete","paypal"))}),y(1,"Gesamt - PayPal "),p()}}function Vti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("complete","gift-card"))}),y(1,"Gesamt - Gutschein "),p()}}function Bti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("deposit","cash"))}),y(1,"Kaution - Kasse"),p()}}function zti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("deposit","paypal"))}),y(1,"Kaution - PayPal "),p()}}function Hti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("deposit","gift-card"))}),y(1,"Kaution - Gutschein "),p()}}function Gti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("rest","cash"))}),y(1,"Rest - Kasse"),p()}}function Wti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("rest","gift-card"))}),y(1,"Rest - Gutschein"),p()}}function Uti(t,e){if(t&1){let n=re();h(0,"nxt-button",56),F("click",function(){V(n);let r=w(3);return B(r.addPayment("rest","paypal"))}),y(1,"Rest - PayPal "),p()}}function jti(t,e){if(t&1&&(h(0,"div")(1,"div",66),W(2,Oti,2,0,"nxt-button",67)(3,Nti,2,0,"nxt-button",67)(4,Vti,2,0,"nxt-button",67)(5,Bti,2,0,"nxt-button",67)(6,zti,2,0,"nxt-button",67)(7,Hti,2,0,"nxt-button",67)(8,Gti,2,0,"nxt-button",67)(9,Wti,2,0,"nxt-button",67)(10,Uti,2,0,"nxt-button",67),p()()),t&2){let n=w(2);g(2),b("ngIf",!n.hasPaymentType.deposit&&!n.hasPaymentType.rest&&!n.hasPaymentType.complete),g(),b("ngIf",n.possiblePaymentMethodsHas("paypal")&&!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.possiblePaymentMethodsHas("gift-card")&&!n.hasPaymentType.deposit&&!n.hasPaymentType.rest&&!n.hasPaymentType.complete),g(),b("ngIf",!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.possiblePaymentMethodsHas("paypal")&&!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.possiblePaymentMethodsHas("gift-card")&&!n.hasPaymentType.complete&&!n.hasPaymentType.deposit),g(),b("ngIf",n.showRest),g(),b("ngIf",n.possiblePaymentMethodsHas("gift-card")&&n.showRest),g(),b("ngIf",n.possiblePaymentMethodsHas("paypal")&&n.loginService.getWorkplace()==="reception"&&n.showRest)}}function $ti(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",68),F("click",function(){V(n);let r=w(2);return B(r.removeLastPayment())}),y(1,"remove "),p()}}function Kti(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",69),F("click",function(){V(n);let r=w(2);return B(r.addPayment())}),y(1,"add"),p()}}function Yti(t,e){if(t&1&&(h(0,"div",74),y(1," von Kunde gezahlt: "),h(2,"strong"),y(3),Ce(4,"money"),p()()),t&2){let n=w(3);g(3),ye(tt(4,1,n.paymentValueSum))}}function qti(t,e){if(t&1&&(h(0,"div",75),y(1," noch zu kassieren: "),h(2,"strong"),y(3),Ce(4,"money"),p()()),t&2){let n=w(3);g(3),ye(tt(4,1,n.priceEstimatedFrom-n.paymentValueSum-n.paymentValueCheaper))}}function Zti(t,e){if(t&1&&(h(0,"div",76),y(1," mehr gezahlt: "),h(2,"strong"),y(3),Ce(4,"money"),p()()),t&2){let n=w(3);g(3),ye(tt(4,1,n.paymentValueSum-n.priceEstimatedFrom))}}function Xti(t,e){if(t&1&&(h(0,"div",76),y(1," Artist: "),h(2,"strong"),y(3),p(),y(4," Studio: "),h(5,"strong"),y(6),p()()),t&2){let n=w(3);g(3),Ke("",n.round(n.paymentValueArtist/n.paymentValueSum*100)," %"),g(3),Ke("",100-n.round(n.paymentValueArtist/n.paymentValueSum*100)," %")}}function Qti(t,e){if(t&1&&(h(0,"div",70),W(1,Yti,5,3,"div",71)(2,qti,5,3,"div",72)(3,Zti,5,3,"div",73)(4,Xti,7,2,"div",73),p()),t&2){let n=w(2);g(),b("ngIf",n.paymentValueSum>-1),g(),b("ngIf",n.priceEstimatedFrom-n.paymentValueSum-n.paymentValueCheaper>0),g(),b("ngIf",n.priceEstimatedFrom-n.paymentValueSum<0),g(),b("ngIf",n.paymentValueArtist>0)}}function Jti(t,e){if(t&1&&(h(0,"mat-card",2),W(1,eti,2,5,"div",3),h(2,"nxt-smooth-height",4),W(3,Dti,21,20,"div",5)(4,Lti,10,8,"div",0)(5,jti,11,9,"div",0),h(6,"nxt-row")(7,"div",6),W(8,$ti,2,0,"nxt-button-icon",7),y(9," \xA0\xA0 "),W(10,Kti,2,0,"nxt-button-icon",8),p(),W(11,Qti,5,4,"div",9),p()()()),t&2){let n=w();g(),Je(n.forceSaveHack()?1:-1),g(),b("trigger",n.getPayments().length),g(),b("ngForOf",n.getPayments()),g(),b("ngIf",n.loginService.getWorkplace()==="backoffice"),g(),b("ngIf",n.loginService.getWorkplace()==="reception"),g(3),b("ngIf",n.formPayments.controls.length>0),g(2),b("ngIf",n.enableAddPayment),g(),b("ngIf",n.showPaymentInfos)}}var QUe,qei,Zei,Xei,Qei,JUe,eje=Q(()=>{me();Xge();Vd();zn();QUe=Gs(Jm());Ld();i3();Bd();jc();MB();WA();nc();Zh();DX();IX();Il();go();Zi();rA();mg();ls();il();Ah();Mp();Ja();Jr();th();ih();aD();Vt();UA();sg();An();FX();ri();YUe();P0();ha();o2();tp();me();qn();Ci();Kr();Cs();jl();yi();XUe();ug();An();Vt();qei=t=>({color:t}),Zei=()=>["from","message","value","transactionTime","payerEmail","requestBy"],Xei=()=>["fullName","value"],Qei=()=>["name","value","createdAt","additionalInfo"];JUe=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d){this.fb=i,this.dialogService=r,this.loginService=s,this.configService=o,this.permissionService=a,this.socketService=l,this.paymentService=c,this.clipboard=d,this.tattooTicketService=Ve(KUe),this.inInitTime=!0,this.DateTools=Ie,this.studios=this.configService.config.value.studios.map(u=>({text:u.name,value:u.name})),this.studiosWithoutOnlyCash=this.configService.config.value.studios.filter(u=>!u.onlyCash).map(u=>({text:u.name,value:u.name})),this.workplaces=[{text:"Backoffice",value:"backoffice"},{text:"Empfang",value:"reception"}],this.forceSaveHack=br.required(),this.showPaymentInfos=!0,this.enableAddPayment=!0,this.eventIsClosed=!1,this.valueChange=new nt,this.loadTime=Date.now(),this.hasPaymentType={},this.removePaymentsEnabled=!1,this.paymentValueSum=-1,this.paymentValueCheaper=0,this.paymentValueArtist=-1,this.showRest=!1,this.round=Math.round,this.disableAddPaymentsBecauseRemovedOldPayment=!1,this.printCustomerReceipt=new nt,this.searchGiftCard=(u,m)=>O(this,null,function*(){return m=m.toLowerCase().replace(/-/g,"").trim(),m.length<8?[{name:"Gebe bitte mind. 8 Zeichen des Gutscheins ein"}]:yield this.socketService.findGiftCard(m)}),this.displayPaypalTransactionFn=u=>{let m="";if(u){m=u.value.toMoneyString();let f=this.getNameFromPaypalTransaction(u);m+=" - "+f,m+=" - "+this.getTextPaypalTransaction(u)}return m},this.displayPaypalTransactionOptionFn=(u,m)=>{if(typeof u=="string")return u;if(u&&u.from){let f='<div class="flex h-full w-full flex-col justify-center no-wrap p-relative" style="border-bottom: 1px solid #757575">';if(f+='<div style="position: absolute; top: 2px; right:2px; text-align: right;">',u.requestBy&&(f+='<div class="flex flex-row items-end justify-end"><div class="text-60" style="line-height: 2">angefragt von&nbsp;</div><div>'+u.requestBy+"</div></div>"),f+=Ie.dateDiffToNowText(u.transactionTime),f+="</div>",u){let _=this.getNameFromPaypalTransaction(u);f+='<div class="text-120">'+u.value.toMoneyString()+" "+m(_)+"</div>",f+="<div>"+m(Ie.format(u.transactionTime,"dd.MM.yyyy HH:mm"))+"</div>",f+="<div>"+m(this.getTextPaypalTransaction(u))+"</div>";let x=u.payerEmail||_;f+='<div class="text-90">'+m(x+" \u279E "+u.receiverEmail)+"</div>"}return f}},setTimeout(()=>this.inInitTime=!1,500),Gn.info(this.formPayments),this.valueChange.subscribe(()=>{this.calcPaymentValueSum(),this.checkHasPaymentTypes()})}ngOnChanges(i){this.calcPaymentValueSum(),this.checkHasPaymentTypes(),this.addPaymentTypeIfNotExists()}getPayments(){return this.formPayments.controls}getPaymentsAsNxtPayments(){return this.formPayments.controls.map(r=>r.getRawValue())}calcPaymentValueSum(){this.paymentValueSum=this.calcPaymentSumByPaymentTypes(["additional","complete","deposit","rest","improve","gift-card-sold"]),this.paymentValueSum-=this.calcPaymentSumByPaymentTypes(["deposit-back"]),this.paymentValueArtist=this.calcPaymentSumByPaymentTypes(["payout"]),this.paymentValueCheaper=this.calcPaymentSumByPaymentTypes(["cheaper"]),this.showRest=this.priceEstimatedFrom-this.paymentValueSum-this.paymentValueCheaper>0&&this.paymentValueSum>0}ngOnInit(){this.calcPaymentValueSum(),this.checkHasPaymentTypes()}ngAfterViewInit(){setTimeout(()=>{this.formPayments.valueChanges.subscribe(()=>{this.emitValueChange()})},500)}displayKlarnaOrderOptionFn(i,r){if(typeof i=="string")return i;if(i){let s="";return i&&(s="<div>",s+=`<span style="font-size: larger">${r(i.fullName)}</span>`,s+=`<br/>${r(Ie.format(i.createdAt,"dd.MM.yyyy HH:mm"))} - ${r((0,QUe.default)(Ie.parse(i.createdAt)).fromNow())}`,s+=`<br/>${r(Wn.roundToString(i.value,2))} EUR`,s+="</div>"),s}}getTextPaypalTransaction(i){return i?.message?.includes("Tattoo-Ticket")?i.shopOrderId?"Tattoo-Ticket "+i.shopOrderId:"Tattoo-Ticket":i.message?i.message:i.transactionNote}getNameFromPaypalTransaction(i){let r=i.payerName;return i.message?.includes("Tattoo-Ticket")&&(r=i.message.replace("Tattoo-Ticket ","")),r||(r=i.from),r==="Tattoo-Ticket"&&(r=i.from),r.includes("@")&&(r=r.split("(")[0].trim()),r}displayKlarnaOrderFn(i){return i?Wn.roundToString(i.value,2)+" \u20AC - "+i.fullName:void 0}displayGiftCardFn(i){let r=i?Wn.toMoneyString(i.value)+" - "+i.name:void 0;return i?.discountPercentage&&i.discountPercentage>0&&(r+="  -  "+i.discountPercentage+"% Rabatt"),r}displayBankTransactionFn(i){return i?.fullValue?i?Wn.toMoneyString(i.value)+" von "+Wn.toMoneyString(i.fullValue)+" - "+i.name:void 0:i?Wn.toMoneyString(i.value)+" - "+i.name:void 0}displayGiftCardOptionFn(i,r,s){let o="?";return r&&(r.validTill&&Ie.parse(r.validTill)<Date.now()?o=`<div style="color: ${xn.Red};">${r.name} ist nicht mehr g\xFCltig<br/>Gutschein ist am ${Ie.format(r.validTill,"dd.MM.yyyy")} abgelaufen<br/>${r.additionalInfo}</div>`:(o="",r.createdAt&&(o=Wn.toMoneyString(r.value)+" - "+Ie.format(r.createdAt,"dd.MM.yyyy")+`
`),o+=r.name,r.additionalInfo&&(o+=" - "+r.additionalInfo))),s(o)}displayBankTransactionOptionFn(i,r){if(i){let s=i.name.split("|");return s.length>1?r(Wn.toMoneyString(i.value)+" - "+Ie.format(i.createdAt,"dd.MM.yyyy")+`
`+s[1].trim()+`
`+s[0].trim()):r(Wn.toMoneyString(i.value)+" - "+Ie.format(i.createdAt,"dd.MM.yyyy")+`
`+s[0])}return""}removeLastPayment(){return O(this,null,function*(){this.removePaymentsEnabled||this.formPayments.controls[this.formPayments.controls.length-1].get("isNewPayment").value?(this.formPayments.controls.pop(),this.emitValueChange()):this.dialogService.showOk("bereits gespeicherte Zahlungen k\xF6nnen nicht gel\xF6scht werden"),this.calcPaymentValueSum(),this.removePaymentsEnabled&&(this.disableAddPaymentsBecauseRemovedOldPayment=!0)})}addPayment(i,r){if(this.disableAddPaymentsBecauseRemovedOldPayment){this.dialogService.showOk("Du hast eine bereits gespeicherte Zahlung gel\xF6scht, bitte speicher erst den Termin, bevor du neue Zahlungen hinzuf\xFCgst!");return}if(typeof this.beforeAddPayment=="function"&&!this.beforeAddPayment())return;let s=oA.createEmptyPayment(this.loginService.getUsername(),this.loginService.getStudio(),this.loginService.getStudioReal(),this.loginService.getWorkplace(),i,r).getFormGroup(this.fb);this.formPayments.controls.push(s),this.emitValueChange(),this.formPayments.controls[this.formPayments.controls.length-1].get("studio").disable(),this.formPayments.controls[this.formPayments.controls.length-1].get("studioReal").disable(),this.formPayments.controls[this.formPayments.controls.length-1].get("workplace").disable(),this.formPayments.controls[this.formPayments.controls.length-1].get("createdBy").disable(),this.formPayments.controls[this.formPayments.controls.length-1].get("paymentDate").disable(),this.paymentMethodChange(this.formPayments.controls[this.formPayments.controls.length-1]),!i&&!r?this.clickLastPaymentControl("paymentType"):r?r==="bank"?this.clickLastPaymentControl("paymentBankTransaction"):r==="paypal"?this.clickLastPaymentControl("paymentPaypalTransaction"):r==="klarna"?this.clickLastPaymentControl("paymentKlarnaOrder"):r==="gift-card"?this.clickLastPaymentControl("paymentGiftCard"):r==="cash"&&this.clickLastPaymentControl("paymentValue",!0):this.clickLastPaymentControl("paymentMethod"),s.get("paymentGiftCard").valueChanges.subscribe(o=>{if(typeof o=="string"){if(o.length===4){let a=s.get("paymentGiftCard");o.includes("-")||a.formControlWrapper.setInputValue(o+"-")}}else o&&!o?.id&&s.get("paymentGiftCard").setValue(null)})}getLastPaymentControl(i){return this.formPayments.controls[this.formPayments.controls.length-1].get(i).element}getLastPaymentNxtFormControl(i){return this.formPayments.controls[this.formPayments.controls.length-1].get(i)}bankTransactionChange(i){if(i.get("paymentBankTransaction").value&&i.get("paymentBankTransaction").value.createdAt){let r=i.get("paymentBankTransaction").value.id;if(this.getPayments().filter(a=>a!==i).map(a=>a.getRawValue()).find(a=>a.paymentBankTransaction&&a.paymentBankTransaction.id===r)){this.dialogService.showOk("Diese Bankzahlung ist bereits diesem Termin zugewiesen"),i.get("paymentBankTransaction").setValue(null);return}let o=Ie.format(i.get("paymentBankTransaction").value.createdAt,"yyyy-MM-dd");i.get("paymentDate").setValue(o),i.get("paymentValue").setValue(i.get("paymentBankTransaction").value.value)}this.clickLastPaymentControl("paymentValue",!0)}paypalTransactionChange(i){if(i.get("paymentPaypalTransaction").value&&i.get("paymentPaypalTransaction").value.transactionTime){let r=i.get("paymentPaypalTransaction").value.transactionId;if(this.getPayments().filter(a=>a!==i).map(a=>a.getRawValue()).find(a=>a.paymentPaypalTransaction&&a.paymentPaypalTransaction.transactionId===r)){this.dialogService.showOk("Diese Zahlung ist bereits in diesem Termin zugewiesen"),i.get("paymentPaypalTransaction").setValue(null);return}let o=Ie.format(i.get("paymentPaypalTransaction").value.transactionTime,"yyyy-MM-dd");i.get("paymentDate").setValue(o),i.get("paymentValue").setValue(i.get("paymentPaypalTransaction").value.value)}this.clickLastPaymentControl("paymentValue",!0)}klarnaOrderChange(i){if(i.get("paymentKlarnaOrder").value&&i.get("paymentKlarnaOrder").value.createdAt){let r=i.get("paymentKlarnaOrder").value.orderId;if(this.getPayments().filter(a=>a!==i).map(a=>a.getRawValue()).find(a=>a.paymentKlarnaOrder&&a.paymentKlarnaOrder.orderId===r)){this.dialogService.showOk("Diese Zahlung ist bereits in diesem Termin zugewiesen"),i.get("paymentKlarnaOrder").setValue(null);return}let o=Ie.format(i.get("paymentKlarnaOrder").value.createdAt,"yyyy-MM-dd");i.get("paymentDate").setValue(o),i.get("paymentValue").setValue(i.get("paymentKlarnaOrder").value.value)}this.clickLastPaymentControl("paymentValue",!0)}canForceGiftCard(i,r){return O(this,null,function*(){if(r.additionalInfo&&(i+=`
Gutschein-Info: `+r.additionalInfo),this.permissionService.hasPermission(Zt.GiftCard_ForceAllGiftCards)){if(yield this.dialogService.showYesNo(i,{noText:"OK",yesText:"Ausnahme machen und verwenden"}))return this.socketService.sendBackofficeHeads(this.loginService.getUsername()+` macht eine Gutscheinausnahme
`+i+`
`+pg.getLinkForEvent(this.eventId)),!0}else yield this.dialogService.showOk(i);return!1})}giftCardChange(i){return O(this,null,function*(){if(yield za.sleep(50),i.get("paymentGiftCard").value&&i.get("paymentGiftCard").value.createdAt){let r=i.get("paymentGiftCard").value;if(this.discountPromotion?.disableDiscountedGiftCards&&r.discountPercentage>0&&r.discountPercentage<100&&!(yield this.canForceGiftCard("Dies Termin hat einen Aktions-Rabatt, bei dem rabattierte Gutscheine nicht zugelassen sind.",r))){i.get("paymentGiftCard").setValue(null);return}if(r.additionalInfo.toLowerCase().includes("geburtstag")&&i.get("paymentType").value==="deposit"&&!(yield this.canForceGiftCard("Geburtstags-Gutscheine k\xF6nnen nicht als Kaution hinterlegt werden",r))){i.get("paymentGiftCard").setValue(null);return}if(r.validTill&&Ie.parse(r.validTill)<Date.now().dateAddDays(-1)){let c="Gutschein war bis zum "+Ie.format(r.validTill,"dd.MM.yyyy")+" g\xFCltig";if(!(yield this.canForceGiftCard(c,r))){i.get("paymentGiftCard").setValue(null);return}}if(!this.isNewEvent&&r.onlyNewAppointments&&this.eventCreateAt&&this.eventCreateAt<Ie.parse(r.createdAt).dateAddDays(-1)){let c="Dieser Termin wurde am "+this.eventCreateAt.dateFormat("dd.MM.yyyy")+` erstellt

Dieser Gutschein kann nur f\xFCr Termine genutzt werden, die nach dem `+Ie.format(r.createdAt,"dd.MM.yyyy")+" erstellt wurden";if(!(yield this.canForceGiftCard(c,r))){i.get("paymentGiftCard").setValue(null);return}}if(r.customRestrictionValue&&r.customRestrictionValue>this.priceEstimatedFrom){let c=`Mindestpreis nicht erreicht!
Einzul\xF6sen bei einem Mindestpreis von `+Wn.toMoneyString(r.customRestrictionValue);if(!(yield this.canForceGiftCard(c,r))){i.get("paymentGiftCard").setValue(null);return}}let s=r.id;if(this.getPayments().filter(c=>c!==i).map(c=>c.getRawValue()).find(c=>c.paymentGiftCard&&c.paymentGiftCard.id===s)){this.dialogService.showOk("Dieser Gutschein ist bereits diesem Termin zugewiesen"),i.get("paymentGiftCard").setValue(null);return}if(r.validFrom){let c=r.validFrom.dateAddDays(-1);if(c&&c>Ie.parse(this.eventDate)){let d="Dieser Gutschein ist erst ab dem "+Ie.format(r.validFrom,"dd.MM.yyyy")+" g\xFCltig";if(!(yield this.dialogService.showYesNo(d,{noText:"OK",yesText:"Ausnahmsweise akzeptieren"}))){i.get("paymentGiftCard").setValue(null);return}}}let a=this.formPayments.getRawValue().some(c=>c.paymentGiftCard&&c.paymentGiftCard.discountPercentage===50&&r.name!==c.paymentGiftCard.name);r.discountPercentage,r.bookingInfo&&(yield this.dialogService.showOk(r.bookingInfo));let l=Ie.format(r.createdAt,"yyyy-MM-dd");i.get("paymentDate").setValue(l),i.get("paymentValue").setValue(r.value),this.clickLastPaymentControl("paymentValue",!0)}})}paymentTypeChange(i,r){return O(this,null,function*(){yield za.sleep(50),console.log(r);let s=i.get("paymentType");if(i.get("paymentType").value==="payout"){if(s.getOldValue()!=="payout"&&!i.get("earlyPayout").value){let l=yield this.dialogService.showYesNo("Vorzeitige Artistauszahlung?");i.get("earlyPayout").setValue(l)}i.get("paymentMethod").setValue("cash"),i.get("paymentMethod").disable();let o=this.formPayments.getRawValue(),a=Xo.calcPayout(o,this.artistPercentage);i.get("paymentValue").setValue(a)}else i.get("paymentMethod").enable(),i.get("paymentType").value==="free"?(i.get("paymentMethod").setValue("none"),i.get("paymentValue").setValue(0),i.get("paymentMethod").disable()):i.get("paymentMethod").enable();this.emitValueChange(),i.get("paymentType").value!=="payout"&&this.clickLastPaymentControl("paymentMethod"),this.checkIfPaymentCommentRequired(i)})}checkIfPaymentCommentRequired(i){i.get("paymentComment").clearValidators(),i.get("paymentMethod").value==="cash"&&i.get("paymentType").value==="deposit-back"&&(Is.setValidators(i.get("paymentComment"),[ii.requiredAndNotNaN]),this.clickLastPaymentControl("paymentComment"))}paymentMethodChange(i){return O(this,null,function*(){yield za.sleep(50),i.get("paymentValue").setValue(i.get("paymentValue").value),i.get("paymentPaypalTransaction").clearValidators(),i.get("paymentKlarnaOrder").clearValidators(),i.get("paymentBankTransaction").clearValidators(),i.get("paymentGiftCard").clearValidators();let r=i.get("paymentMethod"),s=r.value;s==="gift-card"&&(i.get("paymentKlarnaOrder").setValue(null),i.get("paymentPaypalTransaction").setValue(null),i.get("paymentBankTransaction").setValue(null),Is.setValidators(i.get("paymentGiftCard"),[ii.hasProperty("id")])),s==="paypal"&&(i.get("paymentKlarnaOrder").setValue(null),i.get("paymentGiftCard").setValue(null),i.get("paymentBankTransaction").setValue(null),Is.setValidators(i.get("paymentPaypalTransaction"),[ii.hasProperty("transactionId")])),s==="klarna"&&(i.get("paymentPaypalTransaction").setValue(null),i.get("paymentGiftCard").setValue(null),i.get("paymentBankTransaction").setValue(null),Is.setValidators(i.get("paymentKlarnaOrder"),[ii.hasProperty("orderId")])),s==="bank"&&(i.get("paymentKlarnaOrder").setValue(null),i.get("paymentPaypalTransaction").setValue(null),i.get("paymentGiftCard").setValue(null),i.get("isNewPayment").value&&Is.setValidators(i.get("paymentBankTransaction"),[ii.hasProperty("id")])),(r.getOldValue()==="klarna"||r.getOldValue()==="paypal"||r.getOldValue()==="gift-card"||r.getOldValue()==="bank")&&(r.getOldValue()!==s&&this.clearAndDisablePaymentDateAndValue(i),r.getFirstValueSet()||(i.get("paymentKlarnaOrder").setValue(null),i.get("paymentGiftCard").setValue(null),i.get("paymentPaypalTransaction").setValue(null),i.get("paymentBankTransaction").setValue(null))),s==="klarna"||s==="paypal"||s==="gift-card"||s==="bank"?r.getFirstValueSet()||(i.get("paymentPaypalTransaction").setValue(null),i.get("paymentKlarnaOrder").setValue(null),i.get("paymentGiftCard").setValue(null),i.get("paymentBankTransaction").setValue(null)):((r.getOldValue()==="klarna"||r.getOldValue()==="paypal"||r.getOldValue()==="gift-card"||r.getOldValue()==="bank")&&(i.get("paymentValue").setValue(null),i.get("paymentDate").setValue(null)),i.get("isNewPayment").value&&i.get("paymentValue").enable(),s==="cash"&&!this.eventIsClosed&&i.get("isNewPayment").value&&i.get("paymentDate").setValue(Ie.format(Date.now(),"yyyy-MM-dd"))),Ie.dateDiffToNow(this.loadTime)>2e3&&setTimeout(()=>{try{s==="cash"?requestAnimationFrame(()=>{this.getLastPaymentNxtFormControl("paymentValue")?.formControlWrapper?.select()}):s==="bank"?this.getLastPaymentControl("paymentBankTransaction").click():s==="gift-card"?this.getLastPaymentControl("paymentGiftCard").click():s==="klarna"?this.getLastPaymentControl("paymentKlarnaOrder").click():s==="paypal"&&this.getLastPaymentControl("paymentPaypalTransaction").click()}catch{}},200),this.emitValueChange(),this.checkIfPaymentCommentRequired(i)})}clearAndDisablePaymentDateAndValue(i){i.get("paymentValue").setValue(null),i.get("paymentValue").disable(),i.get("paymentDate").setValue(Ie.format(Date.now(),"yyyy-MM-dd")),i.get("paymentDate").disable()}calcHasPaymentType(i){return this.formPayments.controls.filter(r=>r.get("paymentType").value===i).length>0}calcPaymentSumByPaymentTypes(i){return this.formPayments.controls.filter(r=>i.indexOf(r.get("paymentType").value)>-1).reduce((r,s)=>{let o=parseFloat(s.get("paymentValue").value);return Number.isNaN(o)?r:r+o},0)}showInfo(i){return O(this,null,function*(){switch(i){case"addPaymentWithKeyboard":yield this.dialogService.showOk(`
Sei schneller und benutz die Tastatur

 Um eine Zahlung hinzuzuf\xFCgen,
dr\xFCcke die gro\xDFe + Taste rechts auf der Tastatur`,{title:"Tipp",buttonText:"OK, mach ich"});break}})}paymentValueChange(i){this.calcPaymentValueSum(),this.emitValueChange()}adminClicked(){this.permissionService.hasPermission(Zt.CalendarEventEdit_EditPayments)&&(this.removePaymentsEnabled=!this.removePaymentsEnabled,this.getPayments().forEach(i=>{Object.keys(i.controls).map(r=>{i.get(r).enable()})}))}clickLastPaymentControl(i,r=!1){setTimeout(()=>{let s=this.getLastPaymentControl(i);s&&s.click(),r&&setTimeout(()=>this.getLastPaymentControl(i)?.select(),200)},100)}checkHasPaymentTypes(){for(let i of Object.keys(Pv))this.hasPaymentType[Pv[i]]=this.calcHasPaymentType(Pv[i])}possiblePaymentMethodsHas(i){return!!this.possiblePaymentMethods?.find(r=>r.value===i)}typeof(i){return typeof i}emitValueChange(){this.inInitTime||this.valueChange.emit(this.formPayments)}showGiftCard(i){let r=this.dialogService.showComponentDialog(I5,{});r.componentInstance.searchType=r.componentInstance.searchTypes[2],r.componentInstance.searchText=i.name,r.componentInstance.search(),r.componentInstance.fromEvent=!0}refundPaypal(i){return O(this,null,function*(){if(this.getPayments().some(d=>d.value.paymentType==="payout")){this.dialogService.showOk("Nicht m\xF6glich Es wurde bereits eine Auszahlung get\xE4tigt.");return}let r=yield this.socketService.getPaypalTransactionFirstParent(i.paymentPaypalTransaction.paypalTransactionId),s=0;r.refunds&&r.refunds.length>0&&(s+=r.refunds.reduce((d,u)=>d+u.value,0));let o=r.originalValue-s,a='<table class="nxt-table"><tr></tr>';a+='<tr><td colspan="2" style="text-align: center;">'+r.receiverEmail+"</td></tr>",a+="<tr><td>Gesamt-Betrag der PayPal-Zahlung</td><td>"+r.originalValue.toMoneyString()+"</td></tr>",a+="<tr><td>Bereits erstattet</td><td>"+s.toMoneyString()+"</td></tr>",a+="<tr><td>Maximaler Erstattungsbetrag</td><td>"+o.toMoneyString()+"</td></tr>",a+="</table>",s>0&&(a+='<br/><table class="w-full nxt-table"><tr><td colspan="3" class="center">Bereits get\xE4tigte R\xFCckzahlungen</td></tr>',a+=r.refunds.map(d=>'<tr><td class="center">'+d.createdAt.dateFormat("dd.MM.yyyy HH:mm")+'</td><td class="right">'+d.value.toMoneyString()+"</td><td>"+d.createdBy+"</td></td>").join(""),a+="</table>");let l="Paypal-R\xFCckerstattung",c=i.paymentValue<o?i.paymentValue:o;if(o===0)this.dialogService.showOk(a,{title:l});else{let d=yield this.dialogService.showInput({message:a,title:l,isMoney:!0,prompt:c,placeholder:"Wie viel soll erstattet werden?"});if(Es.isNumber(d)){if(d>o){this.dialogService.showOk("Du kannst nur maximal "+o.toMoneyString()+" zur\xFCck zur\xFCckerstatten");return}let u=yield this.dialogService.showInput({message:"Kurze Grund"});if(u){let m=yield this.socketService.paypalRefund({captureId:r.paypalTransactionId,value:d,receiverEmail:r.receiverEmail,reason:u,assignedNxtPayPalTransactionId:i.paymentPaypalTransaction.paypalTransactionId});m.success?this.dialogService.showOk("R\xFCckerstattung erfolgreich"):this.dialogService.showOk(`Fehler bei der R\xFCckerstattung
`+m.message)}}}})}showKlarnaDetails(i){let r=this.dialogService.showComponentDialog(TX,{klarnaOrderId:i.klarnaOrderId});r.componentInstance.load(),r.componentInstance.showCloseButton=!0,r.componentInstance.showShopOrder=!0,r.componentInstance.onShowEvent.subscribe(s=>{window.open(pg.getLinkForEvent(s),"_blank")}),r.componentInstance.onShowShopOrder.subscribe(s=>{this.showShopOrder(s),r.close()})}showShopOrder(i){let r=this.dialogService.showComponentDialog(zA,{shopOrderId:i});r.componentInstance.showCloseButton=!0,r.componentInstance.load()}showTattooTicket(i,r){this.tattooTicketService.showTattooTicket(i,r,this.eventId)}showPaypalDirectInfo(){this.dialogService.showOk("Die Zahlung wurde direkt geschickt, R\xFCckzahlung ist nur direkt \xFCber PayPal m\xF6glich")}showBankPaymentInfoClicked(){}addPaymentTypeIfNotExists(){if(this.paymentTypes){let i=this.getPaymentsAsNxtPayments().map(o=>o.paymentType),r=this.paymentTypes.map(o=>o.value),s=i.filter(o=>!r.includes(o)).unique();for(let o of s){let a=Xo.paymentTypes.find(l=>l.value===o);a&&this.paymentTypes.push(a)}}}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(vt),R(Fi),R(Xi),R(ws),R(lt),R(ZUe),R(_u))},e.\u0275cmp=_e({type:e,selectors:[["nxt-payments"]],inputs:{formPayments:"formPayments",forceSaveHack:[1,"forceSaveHack"],priceEstimatedFrom:"priceEstimatedFrom",showPaymentInfos:"showPaymentInfos",artistPercentage:"artistPercentage",eventDate:"eventDate",enableAddPayment:"enableAddPayment",eventCreateAt:"eventCreateAt",discountPromotion:"discountPromotion",eventId:"eventId",isNewEvent:"isNewEvent",eventIsClosed:"eventIsClosed",paymentTypes:"paymentTypes",notAssignedPaypalTransactionsIn:"notAssignedPaypalTransactionsIn",notAssignedPaypalTransactionsOut:"notAssignedPaypalTransactionsOut",notAssignedKlarnaOrdersIn:"notAssignedKlarnaOrdersIn",notAssignedKlarnaOrdersOut:"notAssignedKlarnaOrdersOut",notAssignedBankTransactionsIn:"notAssignedBankTransactionsIn",notAssignedBankTransactionsOut:"notAssignedBankTransactionsOut",titleText:"titleText",paymentMethods:"paymentMethods",possiblePaymentMethods:"possiblePaymentMethods",possiblePaymentMethodsDepositBack:"possiblePaymentMethodsDepositBack",controlGap:"controlGap",beforeAddPayment:"beforeAddPayment"},outputs:{valueChange:"valueChange",printCustomerReceipt:"printCustomerReceipt"},standalone:!0,features:[yn,xe],decls:2,vars:2,consts:[[4,"ngIf"],["class","!pt-3",4,"ngIf"],[1,"!pt-3"],[2,"padding-bottom","5px",3,"ngStyle","nxtMultiClick"],[3,"trigger"],["fxLayout","row",3,"fxLayoutGap",4,"ngFor","ngForOf"],["fxFlex","40%",1,"flex","flex-row","p-2"],["matTooltip","letzte Zahlung entfernen",3,"click",4,"ngIf"],["matTooltip","neue Zahlung eintragen",3,"click",4,"ngIf"],["fxFlex","","fxLayout","row","fxLayoutAlign","center",4,"ngIf"],[2,"padding-bottom","5px",3,"nxtOnMultiClick","ngStyle","nxtMultiClick"],["fxLayout","row",3,"fxLayoutGap"],["fxFlex.gt-sm","145px",4,"ngIf"],["fxFlex.gt-sm","137px",4,"ngIf"],["fxFlex.gt-sm","15",4,"ngIf"],["fxFlex","110px",4,"ngIf"],["fxFlex","10",4,"ngIf"],["fxFlex","",4,"ngIf"],["fxFlex","","style","min-width: 150px",4,"ngIf"],["style","width:110px; min-width:110px",3,"fxHide.lt-md",4,"ngIf"],["style","width:100px; min-width:100px",3,"fxHide.lt-md",4,"ngIf"],[2,"width","100px",3,"fxHide.lt-md"],["placeholder","Benutzer",3,"nxtFormControl"],["style","width:80px",4,"ngIf"],["matTooltip","Beleg drucken"],[2,"width","38px"],["fxFlex.gt-sm","145px"],["placeholder","Typ","optionHeight","40px","panelClass","full-panel-height",3,"valueChange","nxtFormControl","options"],["placeholder","Datum bezahlt",3,"nxtFormControl","showTodayButton"],["fxFlex.gt-sm","137px"],["placeholder","Zahlung erstellt",3,"disabled","value"],["fxFlex.gt-sm","15"],["placeholder","createdAt",3,"nxtFormControl"],["fxFlex","110px"],["placeholder","Zahlart","requiredError","Zahlart bitte angeben!","panelClass","full-panel-height",3,"valueChange","nxtFormControl","options"],["fxFlex","10"],["placeholder","Betrag","requiredError","Brudi, ohne Betrag geht nicht",3,"valueChange","nxtFormControl","isMoney"],["fxFlex",""],["fxFlex","",2,"min-width","150px"],["class","payment-icon-wrapper","fxLayout","column","fxLayoutAlign","center",4,"ngIf"],["requiredError","Habibi, w\xE4hle eine Paypalzahlung aus!","minWidth","300px","optionTrackBy","id","nxtMatOptionClass","paypal-option",3,"optionClick","placeholder","displayWith","displayInOptionWith","options","nxtFormControl","filterFields","showClearIcon","maxOptionsToShow"],["fxLayout","column","fxLayoutAlign","center",1,"payment-icon-wrapper"],["matTooltip","R\xFCckerstatten",3,"click"],["matTooltip","Tattoo-Ticket anzeigen",3,"click"],["class","flex flex-col justify-center payment-icon-wrapper",4,"ngIf"],["requiredError","Abi, Klarna bitte ausw\xE4hlen!","minWidth","300px","placeholder","Klarna-Zahlung","nxtMatOptionClass","paypal-option",3,"optionClick","displayWith","displayInOptionWith","options","nxtFormControl","filterFields","showClearIcon","maxOptionsToShow"],[1,"flex","flex-col","justify-center","payment-icon-wrapper"],["matTooltip","Info zur Klarna Zahlung",1,"mouse-pointer",3,"click"],["fxLayout","column","fxLayoutAlign","center",4,"ngIf"],["requiredError","Olum, du musst schon ein Gutschein ausw\xE4hlen!","minWidth","300px","placeholder","Gutschein","nxtMatOptionClass","option-two-lines",3,"optionClick","displayWith","displayInOptionWith","nxtFormControl","showClearIcon","customSearchAsyncFn"],["fxLayout","column","fxLayoutAlign","center"],["matTooltip","Gutschein-Details anzeigen",1,"mouse-pointer",2,"position","relative","top","-5px",3,"click"],["requiredError","Kollege, du hier w\xE4hlen Bank machen musst!","minWidth","300px","placeholder","Bank\xFCberweisung","nxtMatOptionClass","option-auto-height",3,"optionClick","displayWith","displayInOptionWith","options","nxtFormControl","filterFields","showClearIcon","maxOptionsToShow"],["nxtPermission","CalendarEventEdit_ShowBankDepositQrCode",4,"ngIf"],["matTooltip","Bank-Zahlung anzeigen",3,"click"],["nxtPermission","CalendarEventEdit_ShowBankDepositQrCode"],[3,"click"],["placeholder","Info zur Zahlung",3,"nxtFormControl"],[2,"width","110px","min-width","110px",3,"fxHide.lt-md"],["placeholder","Kasse",3,"nxtFormControl","options"],[2,"width","100px","min-width","100px",3,"fxHide.lt-md"],["placeholder","Studio",3,"nxtFormControl","options"],["placeholder","Arbeitsplatz",3,"nxtFormControl","options"],[2,"width","80px"],["label","isNew",3,"nxtFormControl"],["matTooltip","Beleg drucken",3,"click"],["fxFlex","100%",1,"short-buttons"],[3,"click",4,"ngIf"],["matTooltip","letzte Zahlung entfernen",3,"click"],["matTooltip","neue Zahlung eintragen",3,"click"],["fxFlex","","fxLayout","row","fxLayoutAlign","center"],["fxFlex","","style","margin: 0 3em;",4,"ngIf"],["fxFlex","","style","margin: 0 10px; cursor: pointer",4,"ngIf"],["fxFlex","","style","margin: 0 10px;",4,"ngIf"],["fxFlex","",2,"margin","0 3em"],["fxFlex","",2,"margin","0 10px","cursor","pointer"],["fxFlex","",2,"margin","0 10px"]],template:function(r,s){r&1&&W(0,Jei,2,0,"div",0)(1,Jti,12,8,"mat-card",1),r&2&&(b("ngIf",!s.formPayments),g(),b("ngIf",s.formPayments))},dependencies:[Ct,RX,rr,Dn,Dv,rs,Qu,A5,Hi,At,Yt,$r,oi,qi,jv,$l,tl,Yi,Zr,dl,Ga,Zs,an,H1,d5,Lt,Hn,ks],styles:["mat-option.option-two-lines{height:70px!important;line-height:1.5}mat-card[_ngcontent-%COMP%]{padding:4px 8px;max-width:100%}.short-buttons[_ngcontent-%COMP%]{font-size:100%;display:flex;flex-direction:row;gap:5px}.short-buttons[_ngcontent-%COMP%]   nxt-button[_ngcontent-%COMP%]{font-size:.9em!important}.payment-icon-wrapper[_ngcontent-%COMP%]{margin-right:6px}.payment-icon-wrapper[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{position:relative;top:-7px;cursor:pointer}"]});let t=e;return t})()});var vx,LX=Q(()=>{zn();vx=class t{static getBirthdayInfo(e){let n="",r=(new Date(e).setFullYear(new Date().getFullYear())-Date.now())/1e3/60/60/24,s=r;r<-3&&(r=(new Date(e).setFullYear(new Date().getFullYear()+1)-Date.now())/1e3/60/60/24),r=Math.floor(r)+1,r<-2?n="hatte vor "+Math.abs(r)+" Tagen Geburtstag":r===-2?n="hatte vorgestern Geburtstag":r===-1?n="hatte gestern Geburtstag":r===0?n="\u{1F973}hat heute Geburtstag\u{1F973}":r===1?n="hat morgen Geburtstag":r===2?n="hat \xFCbermorgen Geburtstag":n="hat in "+r+" Tagen Geburtstag";let o=new Date().getFullYear()-new Date(e).getFullYear();return s>0&&(o-=1),{text:n,daysToBirthday:r,age:o}}static test(){let e=t.getBirthdayInfo(Ie.parse("2000-01-01"))}static hasBirthdayToday(e){return e?Ie.parse(e).dateFormat("MM-dd")===Date.now().dateFormat("MM-dd"):!1}}});var OX,tje=Q(()=>{Ld();zn();LX();Nu();OX=class{static displayCustomerOptionFn(e,n){if(typeof e=="string")return e;if(e&&e.givenName){let i=e.birthday?Ie.format(e.birthday,"dd.MM.yyyy"):"",r=0;return i&&(r=vx.getBirthdayInfo(Ie.parse(e.birthday)).age),'<div style="width: 100%; display:flex; justify-content: space-between"><div>'+n(e.givenName)+" "+n(e.familyName)+"</div>"+(i?"<div>"+n(i)+" "+cr.arrowRight+" "+n(r)+"</div>":"")+"</div>"}return Gn.info("displayCustomerOptionFn returns: "+e),e}static displayFn(e){return typeof e=="string"?e:e?e.givenName+" "+e.familyName:""}static displayArtistCalendar(e){if(e)return e.calendarNumber+" "+e.name}static displayArtistCalendarOption(e,n){let i="?";return e&&(i=e.calendarNumber+" "+e.name),n(i)}static displayText(e){return e}}});var NX,ije=Q(()=>{Nu();Vd();NX=class t{constructor(e,n){this.name=e,this.message=n,this.startTimestamp=0,this.steps=[],this.lastStep=0,this.start()}static setLogFn(e){t.logFn=e}static new(e,n=""){return new t(e,n)}start(){this.lastStep=Date.now(),this.startTimestamp=Date.now()}log(e=""){let n=Date.now()-this.startTimestamp;e=e.toString(),e=e.length>0?"	"+e:"",typeof t.logFn!="function"&&(t.logFn=console.log);let i="";n>1e3&&(i="1"),n>2e3&&(i+="2"),n>3e3&&(i+="3");let r=cr.fill("[DURATION-LOGGER] "+i+" - ["+Wn.roundToString(n/1e3,2)+" s] - ["+this.name+"]",25," ");r+=" "+this.message+e,t.logFn(r)}}});var xg,$A=Q(()=>{xg=class{static clear(e){e&&clearTimeout(e)}}});var v2,cz,yx,VX=Q(()=>{Ul();B8();v2=function(t){return t.Info="Info",t.PermissionDenied="PermissionDenied",t.DailyLogin="DailyLogin",t.UserAlreadyExists="UserAlreadyExists",t.getCalendarEvent_EventIsFromPrimaryCalendar="getCalendarEvent_EventIsFromPrimaryCalendar",t.getCalendarEvent_CalendarNotFound="getCalendarEvent_CalendarNotFound",t.OnlyMessage="OnlyMessage",t.getCalendarEvent_IsAvailableArtist="getCalendarEvent_IsAvailableArtist",t.getCalendarEvent_Deleted="getCalendarEvent_Deleted",t}(v2||{}),cz=class cz{static throwServerError(e,n){typeof e=="string"&&(n=e,e=v2.OnlyMessage);let i={errorId:e,message:n??"",isError:!0},r=Error(Qn.stringify(i));throw r.message=i.message,r.isError=!0,r.isNoError=!1,r.errorId=e,r}static getErrorForPromise(e,n,i=!0){return{errorId:e,message:n??"",isError:i,errorMessage:cz.errorTexts.find(s=>s.errorId===e)?.message}}static throwServerInfo(e){let n={errorId:v2.Info,message:e??"",isError:!1},i=Error(Qn.stringify(n));throw i.message=n.message,i.isError=!1,i.isNoError=!0,i.errorId=v2.Info,i}static getMessage(e){e.errorId===v2.DailyLogin&&Cm.reload("DailyLogin");let n=cz.errorTexts.find(i=>i.errorId===e.errorId)?.message;return e.message?n?n+`
`+e.message:e.message:(!n&&e.errorId&&(n="Fehlertext fehlt bei ErrorId: "+e.errorId),e?.errorId===v2.DailyLogin?"":n||e?.errorMessage||"Keine Fehlermeldung vorhanden")}static getTitle(e){return e.isError?"Fehler":"Info"}static reduceNodeStack(e){let n=[],i=e.split(`
`);for(let r of i)r.includes(".ts:")&&n.push(r);return n.join(`
`)}};cz.errorTexts=[{errorId:v2.PermissionDenied,message:"Daf\xFCr fehlen dir Berechtigungen"},{errorId:v2.DailyLogin,message:"T\xE4glicher Login n\xF6tig"},{errorId:v2.UserAlreadyExists,message:"Der Benutzer existiert bereits"},{errorId:v2.UserAlreadyExists,message:"Das ist der Primary Kalender, hier werden keine Kunden-Termine gespeichert"},{errorId:v2.getCalendarEvent_CalendarNotFound,message:"Kalender nicht gefunden"},{errorId:v2.getCalendarEvent_IsAvailableArtist,message:"Es handelt sich um ein Artist"},{errorId:v2.getCalendarEvent_Deleted,message:"Termin wurde gel\xF6scht"}];yx=cz});var KA,nje=Q(()=>{KA=class{static timeWindowToDateTimeToday(e){return{start:Date.now().clearTime()+e.startTime,end:Date.now().clearTime()+e.endTime}}static timeWindowToDateTimeYesterday(e){return{start:Date.now().dateAddDays(-1).clearTime()+e.startTime,end:Date.now().dateAddDays(-1).clearTime()+e.endTime}}static timeWindowToDateTime(e,n){return{start:e.dateParse().clearTime()+n.startTime,end:e.dateParse().clearTime()+n.endTime}}}});var rje,bf,dz=Q(()=>{jo();nje();Ov();zn();Nu();i3();rje=Gs(Q9()),bf=(()=>{let e=class e{static calcArtists(i,r,s,o){let a=[],l=Date.now()-Date.now().dateClearTime();Ie.currentHours()<6&&(l=Date.now()-Date.now().dateAddDays(-1).dateClearTime());let c=i.startAt<Date.now()&&i.endAt>Date.now();for(let u of o.artists){let m=r.filter(M=>M.artist===u.name).reduce((M,I)=>M+(I.artistTotalGet||0),0),f=s.filter(M=>M.artist===u.name).reduce((M,I)=>M+(I.artistTotalGet||0),0),_={name:u.name,workTimeText:"",isInWorkTime:!0,state:"in-work",payoutValue:m,payoutValuePostponedEvents:f,sortValue:m,workTimeWindow:u.workTimeWindow,isEarlyPaidOut:u.isEarlyPaidOut,stateText:"T\xE4towiert",isArtistOpen:!1},x=r.filter(M=>M.artist===u.name&&M.artistTotalGet>0),D=!0;for(let M of x)if(!M.payments.some(I=>I.paymentType==="payout")){D=!1;break}let E=r.filter(M=>M.artist===u.name&&M.start<Date.now()).sortNumber("start",!0);if(u.workTimeWindow.start>-1&&u.workTimeWindow.end>-1?(_.workTimeText=Qt.format(u.workTimeWindow.start,"HH:mm",!0)+" - "+Qt.format(u.workTimeWindow.end,"HH:mm",!0),_.isInWorkTime=l>=u.workTimeWindow.start&&l<=u.workTimeWindow.end):u.workTimeWindow.start>-1?(_.workTimeText="ab "+Qt.format(u.workTimeWindow.start,"HH:mm"),_.isInWorkTime=l>=u.workTimeWindow.start):u.workTimeWindow.end>-1&&(_.workTimeText="bis "+Qt.format(u.workTimeWindow.end,"HH:mm"),_.isInWorkTime=l<=u.workTimeWindow.end),i.endAt>Date.now())if(u.workTimeWindow.start===-2&&u.workTimeWindow.end===-2)_.state="not-in-work",_.workTimeText="heute nicht da",_.stateText="",_.isInWorkTime=!1;else for(let M of u.freeTimeWindows){let I=KA.timeWindowToDateTimeToday(M);Ie.currentHours()<6&&(I=KA.timeWindowToDateTimeYesterday(M)),I.start<Date.now()&&I.end>Date.now()&&(I.end>Date.now()+Qt.DURATION_1MINUTE*30?I.start<Date.now()?E.length>0&&!E[0].closed?_.state="overdue":(_.state="available",_.stateText="Bis "+I.end.dateFormat("HH:mm")+" verf\xFCgbar"):KA.timeWindowToDateTimeToday(M).start-Qt.DURATION_1MINUTE*15<Date.now()&&M.duration>Qt.DURATION_1MINUTE*30&&(_.state="shorten-available"):_.stateText="Ab "+I.end.dateFormat("HH:mm")+" nicht mehr verf\xFCgbar")}else _.state="not-in-work-session",_.stateText="";_.isInWorkTime||(_.sortValue=u.workTimeWindow.end,u.workTimeWindow.end===-2&&(_.sortValue=9999999999999),c&&(_.state="not-in-work",_.stateText="")),u.isEarlyPaidOut&&c&&(D?(_.stateText="Bereits ausgezahlt",_.state="early-paid-out",_.sortValue=9999999999999):(_.stateText=`Fehler beim Auszahlen, bitte erneut Auszahlen
es wurden nicht alle Termine ausgezahlt`,_.state="error",_.sortValue=9999999999999)),a.push(_)}let d=wc.unique(r.map(u=>u.calendarNumber)).map(u=>parseInt(u,10)).filter(u=>u>990);for(let u of d){let m=r.find(f=>f.calendarNumber===u.toString());m&&a.push({name:m.artist,isEarlyPaidOut:!1,isInWorkTime:!0,state:"available",payoutValue:0,sortValue:-1,stateText:"",workTimeText:"",workTimeWindow:{start:-1,end:-1,dateString:"",earlyPaidOut:!1},isArtistOpen:!0,payoutValuePostponedEvents:0})}return a.sortNumber("sortValue",!1)}static filterBlacklist(i){return i.filter(r=>!this.blackList.find(s=>r.indexOf(s)>-1))}static filterFixArtists(i){return i.filter(r=>r.toLowerCase().indexOf("(fest)")===-1)}static getStartEndDateFromCalendarSummary(i){let r=i.indexOf("("),s=i.indexOf("-"),o=i.indexOf(")");if(r>-1&&s>-1&&o>-1){let a=i.substring(r+1,s),l=i.substring(s+1,o),c=new Date;c.setDate(parseInt(a.substr(0,a.indexOf(".")),10)),c.setMonth(parseInt(a.substr(a.indexOf(".")+1),10)-1),Ie.clearTime(c);let d=new Date;return d.setDate(parseInt(l.substr(0,l.indexOf(".")),10)),d.setMonth(parseInt(l.substr(l.indexOf(".")+1),10)-1),Ie.clearTime(d),{start:c.getTime(),end:d.getTime()}}}static getArtistNameFromCalendarSummary(i){let r=i,s=/(^\d{2,3})/g.exec(r);s&&s.length>1&&(r=r.substring(s[1].length).trim());let o=/(^\w\s)/g.exec(r);return o&&o.length>1&&(r=r.substring(o[1].length).trim()),r}static getCalendarNumberFromCalendarSummary(i){let r=i.match(/^\d* /);return r&&r.length>0?r[0].trim():""}static getStudioFromArtist(i){let r=i.match(/^\d* /);if(r&&r.length>0)return r[0].trim()}static calendarNumberToArtistCustomerNumber(i){return i?"A"+cr.fill(i,5,"0",!1):""}static getArtistPayouts(i,r){let s={};for(let a of i.events)s[a.artist]||(s[a.artist]={artistName:a.artist,payoutValue:0,payoutValue_:0,payoutValueTotal:0}),r.calcType==="pre-calc"?(a.visibility==="private"?s[a.artist].payoutValue_+=a.artistTotalGet:s[a.artist].payoutValue+=a.artistTotalGet,s[a.artist].payoutValueTotal+=a.artistTotalGet):(a.visibility==="private"?s[a.artist].payoutValue_+=Xo.getPaymentSumByPaymentType(a.payments,"payout"):s[a.artist].payoutValue+=Xo.getPaymentSumByPaymentType(a.payments,"payout"),s[a.artist].payoutValueTotal+=Xo.getPaymentSumByPaymentType(a.payments,"payout"));let o={payoutSum_:0,payoutSum:0,artists:rje.default.keys(s).map(a=>s[a])};return r.withEarlyPayout||(o.artists=o.artists.filter(a=>!i.events.some(l=>l.artist===a.artistName&&l.payments.some(c=>c.earlyPayout)))),o.payoutSum_=o.artists.map(a=>a.payoutValue_).reduce((a,l)=>a+l,0),o.payoutSum=o.artists.map(a=>a.payoutValue).reduce((a,l)=>a+l,0),o}static replaceColor(i){switch(i.toUpperCase()){case"#CCA6AC":return"#AD1457";case"#FA573C":return"#F4511E";case"#FBE983":return"#E4C441";case"#16A765":return"#0B8043";case"#4986E7":return"#3F51B5";case"#CD74E6":return"#8E24AA";case"#F691B2":return"#D81B60";case"#FF7537":return"#EF6C00";case"#B3DC6C":return"#C0CA33";case"#42D692":return"#009688";case"#9A9CFF":return"#7986CB";case"#AC725E":return"#795548";case"#F83A22":return"#D50000";case"#FFAD46":return"#F09300";case"#7BD148":return"#7CB342";case"#9FE1E7":return"#039BE5";case"#B99AFF":return"#B39DDB";case"#C2C2C2":return"#616161";case"#D06B64":return"#E67C73";case"#FAD165":return"#F6BF26";case"#92E1C0":return"#33B679";case"#9FC6E7":return"#4285F4";case"#A47AE2":return"#9E69AF";case"#CABDBF":return"#A79B8E"}return i.toUpperCase()}static getCancelArtist(){let i=e.getEmptyArtist();return i.id="canceled",i.name="ABGESAGT :(",i.calendarNumber="",i}static getArtistOpenPiercing(){let i=e.getEmptyArtist();return i.id="artist-open-piercing",i.name="Piercing offen",i.workType="piercing",i.calendarNumber="998",i}static getArtistOpenTattoo(){let i=e.getEmptyArtist();return i.id="artist-open-tattoo",i.name="Artist offen",i.workType="tattoo",i.calendarNumber="999",i}static getEmptyArtist(){return{id:"",name:"",lang:"",calendarNumber:"",skills:{boolSkillValues:[],skillValues:[],speed:0},color:"",invoiceData:{country:"",city:"",name:"",customerNumber:"",email:"",numberRange:"",postalCode:"",salutation:"",street:""},internalNotes:[],instagram:"",contractSigned:!1,birthday:"",idNumber:"",mobile:"",workType:"tattoo",googlePhotosAlbumId:"",googlePhotosAlbumShareLink:"",googleDriveFolderId:"",updatedAt:0,createdAt:0,createdBy:"",updatedBy:"",telegramChatId:0}}static isArtistOpen(i){return e.getArtistOpenTattoo().name===i||e.getArtistOpenPiercing().name===i}};e.blackList=["(x)","Heidi"],e.badPhotoTexts=[`Hey {{artist}}, 
wir haben uns die Fotos deines Tattoos angeschaut.
Das Motiv ist ja super, aber das Foto ist jetzt nicht so toll geworden. 

Die Fotos sind unsere Hauptwerbung und unser Aush\xE4ngeschild, die m\xFCssen genauso gut sein wie die Tattoos auch sind!

Brauchst du eine Einweisung wie du die Fotos richtig und besser machen kannst?
Du kannst uns gern einfach ansprechen kein Problem, dann zeigen wir dir das nochmal.

Also check das die Fotos genauso geil werden wie das Motiv :) `,`Hey {{artist}}, 
wir haben dir letztens schonmal gesagt, dass die Fotos nicht gut sind. Woran liegt es? 

Wir k\xF6nnen dadurch schlechter werben und dich schwerer verkaufen und nicht garantieren das wir dich ausbuchen. 

Komm doch bitte einmal morgen zur Theke damit wir das Problem bequatschen k\xF6nnen.`,`Hey {{artist}}, 

leider klappt es mit den Fotos ja nicht. Schade. 

Diese Fotos sind unsere Werbung, wir werben damit f\xFCr uns und vor allem auch f\xFCr dich, damit wir dich auch ausbuchen k\xF6nnen. Wenn die Fotos nicht gut sind, haben wir schlechte Werbung, also m\xF6glicherweise weniger Kunden und weniger Geld auf beiden Seiten. 
Wenn du weiterhin mit uns zusammen arbeiten m\xF6chtest, musst du dieses Problem in den Griff kriegen!

Geh bitte morgen einmal zu Capone, er m\xF6chte mit dir dar\xFCber sprechen.`];let t=e;return t})()});var F7,BX=Q(()=>{jo();Vd();F7=class t{static timeCheckText(e,n){let i=t.timeCheck(e,n);return Math.abs(i.calculatedPriceDiff)>50?Qt.format(e,"HH:mm")+" <> "+Wn.toMoneyString(n):""}static timeCheck(e,n){typeof n=="string"&&(n=parseFloat(n));let i=0,r=0;return n>0&&(i=e/Qt.DURATION_1HOUR*100,r=n-i),r=Math.round(r/10)*10,{calculatedPrice:i,calculatedPriceDiff:r}}}});function iii(t,e){if(t&1&&(h(0,"div"),ee(1,"nxt-slide-toggle",11),p()),t&2){let n=e.$implicit;g(),b("nxtFormControl",n.get("value"))("placeholder",n.get("description").value)}}function nii(t,e){if(t&1&&(h(0,"tr")(1,"td",12),y(2),p(),h(3,"td")(4,"div",6)(5,"mat-slider",7),ee(6,"input",8),p(),h(7,"div",9),y(8),p()()()()),t&2){let n=e.$implicit;g(2),Ke(" ",n.get("description").value," "),g(4),b("formControl",n.get("value")),g(),b("ngStyle",sn(4,tii,n.get("value").value===-1?"#ff3737":"")),g(),Ke(" ",n.get("value").value===-1?"!":n.get("value").value," ")}}function rii(t,e){if(t&1&&(h(0,"div",1)(1,"div",2),W(2,iii,2,2,"div",3),p(),h(3,"table",4)(4,"tr")(5,"td"),y(6,"Geschwindikeit"),p(),h(7,"td",5)(8,"div",6)(9,"mat-slider",7),ee(10,"input",8),p(),h(11,"div",9),y(12),p()()()(),h(13,"tr"),ee(14,"td"),h(15,"td",10),y(16,"F\xE4higkeit"),p()(),Kn(17,nii,9,6,"tr",null,sa),p()()),t&2){let n=w();g(2),b("ngForOf",n.boolSkillValues),g(8),b("formControl",n.nxtFormControl.get("speed")),g(),b("ngStyle",sn(4,eii,n.nxtFormControl.get("speed").value===-1?"#ff3737":"")),g(),Ke(" ",n.nxtFormControl.get("speed").value===-1?"!":n.nxtFormControl.get("speed").value," "),g(5),Yn(n.skillValues)}}var eii,tii,zX,ive=Q(()=>{qn();An();SD();oo();Vt();ri();me();Vt();qn();An();eii=t=>({padding:"1em",color:t}),tii=t=>({padding:"1em",paddingLeft:"0.5em",color:t});zX=(()=>{let e=class e{constructor(){}ngOnDestroy(){}ngOnInit(){}get skillValues(){return this.nxtFormControl.get("skillValues").controls.sort((r,s)=>r.value.description.toString().localeCompare(s.value.description.toString()))}get boolSkillValues(){return this.nxtFormControl.get("boolSkillValues").controls.sort((r,s)=>r.value.description.toString().localeCompare(s.value.description.toString()))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-skill"]],inputs:{nxtFormControl:"nxtFormControl"},standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","nxt-text","fxFlex","","fxLayout","column","fxLayoutAlign","stretch",4,"ngIf"],["fxFlex","","fxLayout","column","fxLayoutAlign","stretch",1,"nxt-text"],["fxFlex","","fxLayout","row","fxLayoutAlign","space-around"],[4,"ngFor","ngForOf"],[2,"width","100%","border","0 solid green"],["colspan","2"],["fxLayout","row","fxLayoutAlign","center center",2,"border","0px solid red"],["fxFlex","","min","0","max","10","step","1"],["matSliderThumb","",3,"formControl"],[3,"ngStyle"],[2,"text-align","center"],[3,"nxtFormControl","placeholder"],[2,"width","15%"]],template:function(r,s){r&1&&W(0,rii,19,6,"div",0),r&2&&b("ngIf",s.nxtFormControl)},dependencies:[Ct,At,Yt,oi,qi,Hi,Nn,M5,k5,ko,mu,Ko,Ia,$c,rr,Dn,rs],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0});let t=e;return t})()});function sii(t,e){t&1&&Ln(0)}function pii(t,e){}function gii(t,e){}function vii(t,e){if(t&1&&W(0,gii,0,0,"ng-template",12),t&2){let n=w().$implicit;b("cdkPortalOutlet",n.templateLabel)}}function yii(t,e){if(t&1&&y(0),t&2){let n=w().$implicit;ye(n.textLabel)}}function _ii(t,e){if(t&1){let n=re();h(0,"div",7,2),F("click",function(){let r=V(n),s=r.$implicit,o=r.$index,a=w(),l=pr(1);return B(a._handleClick(s,l,o))})("cdkFocusChange",function(r){let s=V(n).$index,o=w();return B(o._tabFocusChanged(r,s))}),ee(2,"span",8)(3,"div",9),h(4,"span",10)(5,"span",11),W(6,vii,1,1,null,12)(7,yii,1,1),p()()()}if(t&2){let n=e.$implicit,i=e.$index,r=pr(1),s=w();jr(n.labelClass),ki("mdc-tab--active",s.selectedIndex===i),b("id",s._getTabLabelId(i))("disabled",n.disabled)("fitInkBarToContent",s.fitInkBarToContent),Bn("tabIndex",s._getTabIndex(i))("aria-posinset",i+1)("aria-setsize",s._tabs.length)("aria-controls",s._getTabContentId(i))("aria-selected",s.selectedIndex===i)("aria-label",n.ariaLabel||null)("aria-labelledby",!n.ariaLabel&&n.ariaLabelledby?n.ariaLabelledby:null),g(3),b("matRippleTrigger",r)("matRippleDisabled",n.disabled||s.disableRipple),g(3),Je(n.templateLabel?6:7)}}function Cii(t,e){t&1&&Ln(0)}function xii(t,e){if(t&1){let n=re();h(0,"mat-tab-body",13),F("_onCentered",function(){V(n);let r=w();return B(r._removeTabBodyWrapperHeight())})("_onCentering",function(r){V(n);let s=w();return B(s._setTabBodyWrapperHeight(r))}),p()}if(t&2){let n=e.$implicit,i=e.$index,r=w();jr(n.bodyClass),ki("mat-mdc-tab-body-active",r.selectedIndex===i),b("id",r._getTabContentId(i))("content",n.content)("position",n.position)("origin",n.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),Bn("tabindex",r.contentTabIndex!=null&&r.selectedIndex===i?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(i))("aria-hidden",r.selectedIndex!==i)}}var ove,oii,aii,lii,cii,dii,uii,hii,mii,fii,bii,wii,Sii,aje,Tii,lje,_x,nve,sje,rve,Dii,cje,oje,Eii,Mii,kii,Iii,Aii,Pii,Rii,dje,Fii,Lii,L7,sve,uje,YA=Q(()=>{me();me();bl();bv();$n();R1();R1();Wc();Wc();Th();Xh();Zg();Fpe();Cl();GO();ri();ng();ove=["*"];oii=["tabListContainer"],aii=["tabList"],lii=["tabListInner"],cii=["nextPaginator"],dii=["previousPaginator"],uii=t=>({animationDuration:t}),hii=(t,e)=>({value:t,params:e});mii=["tabBodyWrapper"],fii=["tabHeader"];bii=new Ri("MatTabContent"),wii=(()=>{let e=class e{constructor(i){this.template=i}};e.\u0275fac=function(r){return new(r||e)(R(Ma))},e.\u0275dir=mi({type:e,selectors:[["","matTabContent",""]],standalone:!0,features:[as([{provide:bii,useExisting:e}])]});let t=e;return t})(),Sii=new Ri("MatTabLabel"),aje=new Ri("MAT_TAB"),Tii=(()=>{let e=class e extends yEe{constructor(i,r,s){super(i,r),this._closestTab=s}};e.\u0275fac=function(r){return new(r||e)(R(Ma),R(Na),R(aje,8))},e.\u0275dir=mi({type:e,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],standalone:!0,features:[as([{provide:Sii,useExisting:e}]),et]});let t=e;return t})(),lje=new Ri("MAT_TAB_GROUP"),_x=(()=>{let e=class e{get templateLabel(){return this._templateLabel}set templateLabel(i){this._setTemplateLabelInput(i)}get content(){return this._contentPortal}constructor(i,r){this._viewContainerRef=i,this._closestTabGroup=r,this.disabled=!1,this._explicitContent=void 0,this.textLabel="",this._contentPortal=null,this._stateChanges=new Mi,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(i){(i.hasOwnProperty("textLabel")||i.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new of(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(i){i&&i._closestTab===this&&(this._templateLabel=i)}};e.\u0275fac=function(r){return new(r||e)(R(Na),R(lje,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-tab"]],contentQueries:function(r,s,o){if(r&1&&(_o(o,Tii,5),_o(o,wii,7,Ma)),r&2){let a;Pt(a=Rt())&&(s.templateLabel=a.first),Pt(a=Rt())&&(s._explicitContent=a.first)}},viewQuery:function(r,s){if(r&1&&ei(Ma,7),r&2){let o;Pt(o=Rt())&&(s._implicitContent=o.first)}},hostAttrs:["hidden",""],inputs:{disabled:[2,"disabled","disabled",mn],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},exportAs:["matTab"],standalone:!0,features:[as([{provide:aje,useExisting:e}]),Bs,yn,xe],ngContentSelectors:ove,decls:1,vars:0,template:function(r,s){r&1&&(gr(),W(0,sii,1,0,"ng-template"))},encapsulation:2});let t=e;return t})(),nve="mdc-tab-indicator--active",sje="mdc-tab-indicator--no-transition",rve=class{constructor(e){this._items=e}hide(){this._items.forEach(e=>e.deactivateInkBar())}alignToElement(e){let n=this._items.find(r=>r.elementRef.nativeElement===e),i=this._currentItem;if(n!==i&&(i?.deactivateInkBar(),n)){let r=i?.elementRef.nativeElement.getBoundingClientRect?.();n.activateInkBar(r),this._currentItem=n}}},Dii=(()=>{let e=class e{constructor(){this._elementRef=Ve(fi),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(i){this._fitToContent!==i&&(this._fitToContent=i,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(i){let r=this._elementRef.nativeElement;if(!i||!r.getBoundingClientRect||!this._inkBarContentElement){r.classList.add(nve);return}let s=r.getBoundingClientRect(),o=i.width/s.width,a=i.left-s.left;r.classList.add(sje),this._inkBarContentElement.style.setProperty("transform",`translateX(${a}px) scaleX(${o})`),r.getBoundingClientRect(),r.classList.remove(sje),r.classList.add(nve),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(nve)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let i=this._elementRef.nativeElement.ownerDocument||document,r=this._inkBarElement=i.createElement("span"),s=this._inkBarContentElement=i.createElement("span");r.className="mdc-tab-indicator",s.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",r.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let i=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;i.appendChild(this._inkBarElement)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",mn]},features:[Bs]});let t=e;return t})(),cje=(()=>{let e=class e extends Dii{constructor(i){super(),this.elementRef=i,this.disabled=!1}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(r,s){r&2&&(Bn("aria-disabled",!!s.disabled),ki("mat-mdc-tab-disabled",s.disabled))},inputs:{disabled:[2,"disabled","disabled",mn]},standalone:!0,features:[Bs,et]});let t=e;return t})(),oje=Sh({passive:!0}),Eii=650,Mii=100,kii=(()=>{let e=class e{get selectedIndex(){return this._selectedIndex}set selectedIndex(i){let r=isNaN(i)?0:i;this._selectedIndex!=r&&(this._selectedIndexChanged=!0,this._selectedIndex=r,this._keyManager&&this._keyManager.updateActiveItem(r))}constructor(i,r,s,o,a,l,c){this._elementRef=i,this._changeDetectorRef=r,this._viewportRuler=s,this._dir=o,this._ngZone=a,this._platform=l,this._animationMode=c,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Mi,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Mi,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new nt,this.indexFocused=new nt,this._sharedResizeObserver=Ve(cK),this._injector=Ve($o),a.runOutsideAngular(()=>{bh(i.nativeElement,"mouseleave").pipe(Mr(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){bh(this._previousPaginator.nativeElement,"touchstart",oje).pipe(Mr(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),bh(this._nextPaginator.nativeElement,"touchstart",oje).pipe(Mr(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){let i=this._dir?this._dir.change:Fr("ltr"),r=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(_0(32),Mr(this._destroyed)),s=this._viewportRuler.change(150).pipe(Mr(this._destroyed)),o=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Ib(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),wh(o,{injector:this._injector}),ra(i,s,r,this._items.changes,this._itemsResized()).pipe(Mr(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),o()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(a=>{this.indexFocused.emit(a),this._setTabFocus(a)})}_itemsResized(){return typeof ResizeObserver!="function"?pv:this._items.changes.pipe(ll(this._items),Fl(i=>new Qa(r=>this._ngZone.runOutsideAngular(()=>{let s=new ResizeObserver(o=>r.next(o));return i.forEach(o=>s.observe(o.elementRef.nativeElement)),()=>{s.disconnect()}}))),WM(1),Ks(i=>i.some(r=>r.contentRect.width>0&&r.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(i){if(!Pc(i))switch(i.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let r=this._items.get(this.focusIndex);r&&!r.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(i))}break;default:this._keyManager.onKeydown(i)}}_onContentChanges(){let i=this._elementRef.nativeElement.textContent;i!==this._currentTextContent&&(this._currentTextContent=i||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(i){!this._isValidIndex(i)||this.focusIndex===i||!this._keyManager||this._keyManager.setActiveItem(i)}_isValidIndex(i){return this._items?!!this._items.toArray()[i]:!0}_setTabFocus(i){if(this._showPaginationControls&&this._scrollToLabel(i),this._items&&this._items.length){this._items.toArray()[i].focus();let r=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?r.scrollLeft=0:r.scrollLeft=r.scrollWidth-r.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let i=this.scrollDistance,r=this._getLayoutDirection()==="ltr"?-i:i;this._tabList.nativeElement.style.transform=`translateX(${Math.round(r)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(i){this._scrollTo(i)}_scrollHeader(i){let r=this._tabListContainer.nativeElement.offsetWidth,s=(i=="before"?-1:1)*r/3;return this._scrollTo(this._scrollDistance+s)}_handlePaginatorClick(i){this._stopInterval(),this._scrollHeader(i)}_scrollToLabel(i){if(this.disablePagination)return;let r=this._items?this._items.toArray()[i]:null;if(!r)return;let s=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:o,offsetWidth:a}=r.elementRef.nativeElement,l,c;this._getLayoutDirection()=="ltr"?(l=o,c=l+a):(c=this._tabListInner.nativeElement.offsetWidth-o,l=c-a);let d=this.scrollDistance,u=this.scrollDistance+s;l<d?this.scrollDistance-=d-l:c>u&&(this.scrollDistance+=Math.min(c-u,l-d))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let i=this._tabListInner.nativeElement.scrollWidth,r=this._elementRef.nativeElement.offsetWidth,s=i-r>=5;s||(this.scrollDistance=0),s!==this._showPaginationControls&&(this._showPaginationControls=s,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let i=this._tabListInner.nativeElement.scrollWidth,r=this._tabListContainer.nativeElement.offsetWidth;return i-r||0}_alignInkBarToSelectedTab(){let i=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,r=i?i.elementRef.nativeElement:null;r?this._inkBar.alignToElement(r):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(i,r){r&&r.button!=null&&r.button!==0||(this._stopInterval(),uj(Eii,Mii).pipe(Mr(ra(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:s,distance:o}=this._scrollHeader(i);(o===0||o>=s)&&this._stopInterval()}))}_scrollTo(i){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let r=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(r,i)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:r,distance:this._scrollDistance}}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Kt),R(J2),R(Va,8),R(pn),R(Oo),R(Ic,8))},e.\u0275dir=mi({type:e,inputs:{disablePagination:[2,"disablePagination","disablePagination",mn],selectedIndex:[2,"selectedIndex","selectedIndex",xc]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[Bs]});let t=e;return t})(),Iii=(()=>{let e=class e extends kii{constructor(i,r,s,o,a,l,c){super(i,r,s,o,a,l,c),this.disableRipple=!1}ngAfterContentInit(){this._inkBar=new rve(this._items),super.ngAfterContentInit()}_itemSelected(i){i.preventDefault()}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Kt),R(J2),R(Va,8),R(pn),R(Oo),R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-tab-header"]],contentQueries:function(r,s,o){if(r&1&&_o(o,cje,4),r&2){let a;Pt(a=Rt())&&(s._items=a)}},viewQuery:function(r,s){if(r&1&&(ei(oii,7),ei(aii,7),ei(lii,7),ei(cii,5),ei(dii,5)),r&2){let o;Pt(o=Rt())&&(s._tabListContainer=o.first),Pt(o=Rt())&&(s._tabList=o.first),Pt(o=Rt())&&(s._tabListInner=o.first),Pt(o=Rt())&&(s._nextPaginator=o.first),Pt(o=Rt())&&(s._previousPaginator=o.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(r,s){r&2&&ki("mat-mdc-tab-header-pagination-controls-enabled",s._showPaginationControls)("mat-mdc-tab-header-rtl",s._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",mn]},standalone:!0,features:[Bs,et,xe],ngContentSelectors:ove,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"div",5,0),F("click",function(){return V(o),B(s._handlePaginatorClick("before"))})("mousedown",function(l){return V(o),B(s._handlePaginatorPress("before",l))})("touchend",function(){return V(o),B(s._stopInterval())}),ee(2,"div",6),p(),h(3,"div",7,1),F("keydown",function(l){return V(o),B(s._handleKeydown(l))}),h(5,"div",8,2),F("cdkObserveContent",function(){return V(o),B(s._onContentChanges())}),h(7,"div",9,3),Ln(9),p()()(),h(10,"div",10,4),F("mousedown",function(l){return V(o),B(s._handlePaginatorPress("after",l))})("click",function(){return V(o),B(s._handlePaginatorClick("after"))})("touchend",function(){return V(o),B(s._stopInterval())}),ee(12,"div",6),p()}r&2&&(ki("mat-mdc-tab-header-pagination-disabled",s._disableScrollBefore),b("matRippleDisabled",s._disableScrollBefore||s.disableRipple),g(3),ki("_mat-animation-noopable",s._animationMode==="NoopAnimations"),g(2),Bn("aria-label",s.ariaLabel||null)("aria-labelledby",s.ariaLabelledby||null),g(5),ki("mat-mdc-tab-header-pagination-disabled",s._disableScrollAfter),b("matRippleDisabled",s._disableScrollAfter||s.disableRipple))},dependencies:[ym,Oue],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color, var(--mat-app-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color, var(--mat-app-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height);border-top-color:var(--mat-tab-header-divider-color, var(--mat-app-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2});let t=e;return t})(),Aii=new Ri("MAT_TABS_CONFIG"),Pii={translateTab:Nd("translateTab",[bc("center, void, left-origin-center, right-origin-center",So({transform:"none",visibility:"visible"})),bc("left",So({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),bc("right",So({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),cl("* => left, * => right, left => center, right => center",Ml("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),cl("void => left-origin-center",[So({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),Ml("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),cl("void => right-origin-center",[So({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),Ml("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},Rii=(()=>{let e=class e extends w0{constructor(i,r,s,o){super(i,r,o),this._host=s,this._centeringSub=na.EMPTY,this._leavingSub=na.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(ll(this._host._isCenterPosition(this._host._position))).subscribe(i=>{this._host._content&&i&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(R(yy),R(Na),R(_c(()=>dje)),R(Lr))},e.\u0275dir=mi({type:e,selectors:[["","matTabBodyHost",""]],standalone:!0,features:[et]});let t=e;return t})(),dje=(()=>{let e=class e{set position(i){this._positionIndex=i,this._computePositionAnimationState()}constructor(i,r,s){this._elementRef=i,this._dir=r,this._dirChangeSubscription=na.EMPTY,this._translateTabComplete=new Mi,this._onCentering=new nt,this._beforeCentering=new nt,this._afterLeavingCenter=new nt,this._onCentered=new nt(!0),this.animationDuration="500ms",this.preserveContent=!1,r&&(this._dirChangeSubscription=r.change.subscribe(o=>{this._computePositionAnimationState(o),s.markForCheck()})),this._translateTabComplete.pipe(qg((o,a)=>o.fromState===a.fromState&&o.toState===a.toState)).subscribe(o=>{this._isCenterPosition(o.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(o.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){this._position=="center"&&this.origin!=null&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(i){let r=this._isCenterPosition(i.toState);this._beforeCentering.emit(r),r&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_isCenterPosition(i){return i=="center"||i=="left-origin-center"||i=="right-origin-center"}_computePositionAnimationState(i=this._getLayoutDirection()){this._positionIndex<0?this._position=i=="ltr"?"left":"right":this._positionIndex>0?this._position=i=="ltr"?"right":"left":this._position="center"}_computePositionFromOrigin(i){let r=this._getLayoutDirection();return r=="ltr"&&i<=0||r=="rtl"&&i>0?"left-origin-center":"right-origin-center"}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Va,8),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["mat-tab-body"]],viewQuery:function(r,s){if(r&1&&ei(w0,5),r&2){let o;Pt(o=Rt())&&(s._portalHost=o.first)}},hostAttrs:[1,"mat-mdc-tab-body"],inputs:{_content:[0,"content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"},standalone:!0,features:[xe],decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(r,s){if(r&1){let o=re();h(0,"div",1,0),F("@translateTab.start",function(l){return V(o),B(s._onTranslateTabStarted(l))})("@translateTab.done",function(l){return V(o),B(s._translateTabComplete.next(l))}),W(2,pii,0,0,"ng-template",2),p()}r&2&&b("@translateTab",bs(3,hii,s._position,sn(1,uii,s.animationDuration)))},dependencies:[Rii,t$],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[Pii.translateTab]}});let t=e;return t})(),Fii=0,Lii=!0,L7=(()=>{let e=class e{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(i){this._fitInkBarToContent=i,this._changeDetectorRef.markForCheck()}get selectedIndex(){return this._selectedIndex}set selectedIndex(i){this._indexToSelect=isNaN(i)?null:i}get animationDuration(){return this._animationDuration}set animationDuration(i){let r=i+"";this._animationDuration=/^\d+$/.test(r)?i+"ms":r}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(i){this._contentTabIndex=isNaN(i)?null:i}get backgroundColor(){return this._backgroundColor}set backgroundColor(i){if(!Lii)throw new Error("mat-tab-group background color must be set through the Sass theming API");let r=this._elementRef.nativeElement.classList;r.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),i&&r.add("mat-tabs-with-background",`mat-background-${i}`),this._backgroundColor=i}constructor(i,r,s,o){this._elementRef=i,this._changeDetectorRef=r,this._animationMode=o,this._tabs=new o4,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=na.EMPTY,this._tabLabelSubscription=na.EMPTY,this._fitInkBarToContent=!1,this.stretchTabs=!0,this.dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this.disablePagination=!1,this.disableRipple=!1,this.preserveContent=!1,this.selectedIndexChange=new nt,this.focusChange=new nt,this.animationDone=new nt,this.selectedTabChange=new nt(!0),this._isServer=!Ve(Oo).isBrowser,this._groupId=Fii++,this.animationDuration=s&&s.animationDuration?s.animationDuration:"500ms",this.disablePagination=s&&s.disablePagination!=null?s.disablePagination:!1,this.dynamicHeight=s&&s.dynamicHeight!=null?s.dynamicHeight:!1,s?.contentTabIndex!=null&&(this.contentTabIndex=s.contentTabIndex),this.preserveContent=!!s?.preserveContent,this.fitInkBarToContent=s&&s.fitInkBarToContent!=null?s.fitInkBarToContent:!1,this.stretchTabs=s&&s.stretchTabs!=null?s.stretchTabs:!0}ngAfterContentChecked(){let i=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=i){let r=this._selectedIndex==null;if(!r){this.selectedTabChange.emit(this._createChangeEvent(i));let s=this._tabBodyWrapper.nativeElement;s.style.minHeight=s.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((s,o)=>s.isActive=o===i),r||(this.selectedIndexChange.emit(i),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((r,s)=>{r.position=s-i,this._selectedIndex!=null&&r.position==0&&!r.origin&&(r.origin=i-this._selectedIndex)}),this._selectedIndex!==i&&(this._selectedIndex=i,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let i=this._clampTabIndex(this._indexToSelect);if(i===this._selectedIndex){let r=this._tabs.toArray(),s;for(let o=0;o<r.length;o++)if(r[o].isActive){this._indexToSelect=this._selectedIndex=o,this._lastFocusedTabIndex=null,s=r[o];break}!s&&r[i]&&Promise.resolve().then(()=>{r[i].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(i))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(ll(this._allTabs)).subscribe(i=>{this._tabs.reset(i.filter(r=>r._closestTabGroup===this||!r._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(i){let r=this._tabHeader;r&&(r.focusIndex=i)}_focusChanged(i){this._lastFocusedTabIndex=i,this.focusChange.emit(this._createChangeEvent(i))}_createChangeEvent(i){let r=new sve;return r.index=i,this._tabs&&this._tabs.length&&(r.tab=this._tabs.toArray()[i]),r}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=ra(...this._tabs.map(i=>i._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(i){return Math.min(this._tabs.length-1,Math.max(i||0,0))}_getTabLabelId(i){return`mat-tab-label-${this._groupId}-${i}`}_getTabContentId(i){return`mat-tab-content-${this._groupId}-${i}`}_setTabBodyWrapperHeight(i){if(!this.dynamicHeight||!this._tabBodyWrapperHeight)return;let r=this._tabBodyWrapper.nativeElement;r.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(r.style.height=i+"px")}_removeTabBodyWrapperHeight(){let i=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=i.clientHeight,i.style.height="",this.animationDone.emit()}_handleClick(i,r,s){r.focusIndex=s,i.disabled||(this.selectedIndex=s)}_getTabIndex(i){let r=this._lastFocusedTabIndex??this.selectedIndex;return i===r?0:-1}_tabFocusChanged(i,r){i&&i!=="mouse"&&i!=="touch"&&(this._tabHeader.focusIndex=r)}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Kt),R(Aii,8),R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-tab-group"]],contentQueries:function(r,s,o){if(r&1&&_o(o,_x,5),r&2){let a;Pt(a=Rt())&&(s._allTabs=a)}},viewQuery:function(r,s){if(r&1&&(ei(mii,5),ei(fii,5)),r&2){let o;Pt(o=Rt())&&(s._tabBodyWrapper=o.first),Pt(o=Rt())&&(s._tabHeader=o.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:10,hostBindings:function(r,s){r&2&&(jr("mat-"+(s.color||"primary")),mo("--mat-tab-animation-duration",s.animationDuration),ki("mat-mdc-tab-group-dynamic-height",s.dynamicHeight)("mat-mdc-tab-group-inverted-header",s.headerPosition==="below")("mat-mdc-tab-group-stretch-tabs",s.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",mn],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",mn],dynamicHeight:[2,"dynamicHeight","dynamicHeight",mn],selectedIndex:[2,"selectedIndex","selectedIndex",xc],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",xc],disablePagination:[2,"disablePagination","disablePagination",mn],disableRipple:[2,"disableRipple","disableRipple",mn],preserveContent:[2,"preserveContent","preserveContent",mn],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],standalone:!0,features:[as([{provide:lje,useExisting:e}]),Bs,xe],ngContentSelectors:ove,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","mat-mdc-tab-body-active","class","content","position","origin","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","id","content","position","origin","animationDuration","preserveContent"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"mat-tab-header",3,0),F("indexFocused",function(l){return V(o),B(s._focusChanged(l))})("selectFocusedIndex",function(l){return V(o),B(s.selectedIndex=l)}),Kn(2,_ii,8,17,"div",4,sa),p(),W(4,Cii,1,0),h(5,"div",5,1),Kn(7,xii,1,13,"mat-tab-body",6,sa),p()}r&2&&(b("selectedIndex",s.selectedIndex||0)("disableRipple",s.disableRipple)("disablePagination",s.disablePagination)("aria-label",s.ariaLabel)("aria-labelledby",s.ariaLabelledby),g(2),Yn(s._tabs),g(2),Je(s._isServer?4:-1),g(),ki("_mat-animation-noopable",s._animationMode==="NoopAnimations"),g(2),Yn(s._tabs))},dependencies:[Iii,cje,YO,ym,w0,dje],styles:['.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mdc-secondary-navigation-tab-container-height);font-family:var(--mat-tab-header-label-text-font, var(--mat-app-title-small-font));font-size:var(--mat-tab-header-label-text-size, var(--mat-app-title-small-size));letter-spacing:var(--mat-tab-header-label-text-tracking, var(--mat-app-title-small-tracking));line-height:var(--mat-tab-header-label-text-line-height, var(--mat-app-title-small-line-height));font-weight:var(--mat-tab-header-label-text-weight, var(--mat-app-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, var(--mat-app-primary));border-top-width:var(--mdc-tab-indicator-active-indicator-height);border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color, var(--mat-app-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color, var(--mat-app-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color, var(--mat-app-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color, var(--mat-app-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-app-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2});let t=e;return t})(),sve=class{},uje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,zr]});let t=e;return t})()});var hje,pje=Q(()=>{me();me();hje=(()=>{let e=class e{constructor(){this.nxtFileDropFileDropped=new nt}onDragOver(i){i.preventDefault(),i.stopPropagation(),this.fileOver=!0}onDragLeave(i){i.preventDefault(),i.stopPropagation(),this.fileOver=!1}ondrop(i){i.preventDefault(),i.stopPropagation(),this.fileOver=!1;let r=i.dataTransfer.files;r.length>0&&this.nxtFileDropFileDropped.emit(r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["","nxtFileDrop",""]],hostVars:2,hostBindings:function(r,s){r&1&&F("dragover",function(a){return s.onDragOver(a)})("dragleave",function(a){return s.onDragLeave(a)})("drop",function(a){return s.ondrop(a)}),r&2&&ki("fileover",s.fileOver)},outputs:{nxtFileDropFileDropped:"nxtFileDropFileDropped"},standalone:!0});let t=e;return t})()});var Oii,Nii,mje,fje=Q(()=>{me();Gi();Zi();pje();ri();me();Oii=["uploadInput"],Nii=(t,e)=>({width:t,height:e}),mje=(()=>{let e=class e extends bt{constructor(){super(),this.message=br("Datei hier her ziehen"),this.width=br(300),this.height=br(300),this.onFileDropped=new nt}ngOnInit(){}nxtOnDestroy(){}fileDropped(i){let r=[];for(let s=0;s<i.length;s++)r.push(i.item(s));this.onFileDropped.emit(r),this.uploadInput.nativeElement.value=""}selectFileClicked(){this.uploadInput.nativeElement.click()}inputChanged(i){this.fileDropped(i.target.files)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-file-upload"]],viewQuery:function(r,s){if(r&1&&ei(Oii,5),r&2){let o;Pt(o=Rt())&&(s.uploadInput=o.first)}},inputs:{message:[1,"message"],width:[1,"width"],height:[1,"height"]},outputs:{onFileDropped:"onFileDropped"},standalone:!0,features:[et,xe],decls:9,vars:5,consts:[["uploadInput",""],["nxtFileDrop","",1,"upload-card","dropzone","flex","flex-col","justify-center","items-center",3,"change","nxtFileDropFileDropped","ngStyle"],["type","file",2,"opacity","0","position","absolute"],[1,"py-4"],[3,"click"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1),F("change",function(l){return V(o),B(s.inputChanged(l))})("nxtFileDropFileDropped",function(l){return V(o),B(s.fileDropped(l))}),ee(1,"input",2,0),h(3,"div"),y(4),p(),h(5,"div",3),y(6,"oder"),p(),h(7,"nxt-button",4),F("click",function(){return V(o),B(s.selectFileClicked())}),y(8,"ODER DATEI AUSW\xC4HLEN"),p()()}r&2&&(b("ngStyle",bs(2,Nii,s.width()+"px",s.height()+"px")),g(4),ye(s.message()))},dependencies:[Lt,hje,rr],styles:[".upload-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;border:1px dotted #6a6a6a}"],changeDetection:0});let t=e;return t})()});function Bii(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2),Ce(3,"nxtDate"),p(),h(4,"td"),y(5),p(),ee(6,"td",5),Ce(7,"safeHtml"),h(8,"td",4)(9,"div",6)(10,"mat-icon",7),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.deleteNoteClicked(r))}),y(11,"delete"),p()()()()}if(t&2){let n=e.$implicit;g(2),Ke(" ",Nt(3,3,n.createdAt,"dd.MM.yyyy HH:mm")," "),g(3),Ke(" ",n.createdBy," "),g(),b("innerHTML",tt(7,6,n.text),Pi)}}function zii(t,e){if(t&1&&(h(0,"table",1)(1,"tr")(2,"td"),y(3,"Datum"),p(),h(4,"td"),y(5,"Von"),p(),h(6,"td"),y(7,"Text"),p(),h(8,"td",4),y(9,"L\xF6schen"),p()(),Kn(10,Bii,12,8,"tr",null,Vii),p()),t&2){let n=w(2);g(10),Yn(n.artist.internalNotes)}}function Hii(t,e){if(t&1){let n=re();h(0,"div",0),W(1,zii,12,0,"table",1),h(2,"div",2)(3,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.addNewNoteClicked())}),y(4,"Neue Notiz"),p()()()}if(t&2){let n=w();g(),Je(n.artist.internalNotes.length>0?1:-1)}}var Vii,gje,vje=Q(()=>{me();Gi();go();ha();Zi();Ci();ef();Kr();Ph();Ja();il();me();Vii=(t,e)=>e.id;gje=(()=>{let e=class e extends bt{constructor(){super(),this.artistChange=new nt,this.dialogService=Ve(vt),this.loginService=Ve(Fi),this.cdRef=Ve(Kt),this.IconTools=Ir}ngOnInit(){}nxtOnDestroy(){}ngOnChanges(i){i.artistId&&this.load().then()}load(){return O(this,null,function*(){})}addNewNoteClicked(){return O(this,null,function*(){let i=yield this.dialogService.showTextarea({buttonText:"Notiz anlegen",message:"Neue Notiz f\xFCr "+this.artist.name});i&&(this.artist.internalNotes.push({id:ua.generate(),text:i,createdBy:this.loginService.getUsername(),createdAt:Date.now()}),this.artistChange.emit(this.artist)),this.cdRef.detectChanges()})}deleteNoteClicked(i){return O(this,null,function*(){(yield this.dialogService.showYesNo(i.text,{yesText:"L\xF6schen",noText:"Zur\xFCck"}))&&(this.artist.internalNotes=this.artist.internalNotes.filter(r=>r.id!==i.id),this.artistChange.emit(this.artist),this.cdRef.detectChanges())})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-notes"]],inputs:{artist:"artist"},outputs:{artistChange:"artistChange"},standalone:!0,features:[et,yn,xe],decls:1,vars:1,consts:[[1,"flex","flex-col"],[1,"nxt-table","w-fit"],[1,"flex","flex-row","mt-4","justify-center"],[3,"click"],["nxtPermission","Artists_DeleteNotes"],[3,"innerHTML"],[1,"flex","flex-row","justify-center","w-full"],[1,"mouse-pointer",3,"click"]],template:function(r,s){r&1&&W(0,Hii,5,1,"div",0),r&2&&Je(s.artist?0:-1)},dependencies:[Hn,Or,Lt,Zr,Zs],changeDetection:0});let t=e;return t})()});var R0,DD=Q(()=>{kl();R0=(()=>{let e=class e{static get boolSkills(){return e._boolSkills.sortString("description")}static get skills(){return e._skills.sortString("description")}static getArtistSkillResultFromEvent(i,r){let s={attention:!1,canUse:!1,infoLines:[],value:-1,stars:0};if(!r)throw Error(`calcArtistSkillSumFromEvent fehler
artist nicht gesetzt`);try{if(!i||Object.keys(i.skills).length===0&&Object.keys(i.boolSkills).length===0)return s;s.canUse=!0;for(let l of Object.keys(i.boolSkills))if(i.boolSkills[l]){let c=r.skills.boolSkillValues.find(d=>d.description===l);c?c.value||(s.infoLines.push("kann kein "+l),s.canUse=!1):(s.infoLines.push(l+" Skill nicht hinterlegt"),s.canUse=!1)}for(let l of Object.keys(i.skills))if(i.skills[l]){let c=r.skills.skillValues.find(d=>d.description===l);c?c.value<e.SkillMustMoreEquals&&(s.infoLines.push("zu schlecht in "+l+" ("+c.value+"/10)"),s.canUse=!1):(s.infoLines.push(c+" Skill nicht hinterlegt"),s.canUse=!1)}let o=Object.keys(i.skills).filter(l=>i.skills[l]),a=Object.keys(i.boolSkills).filter(l=>i.boolSkills[l]);s.value=e.calcArtistSkillSum(o,a,r).skill,s.stars=fn.round(s.value/2,1),s.value<e.SkillMustMoreEquals&&(s.attention=!0)}catch(o){throw console.error(o),o}return s}static calcArtistSkillSum(i,r,s){let o=0,a=[];i.length===0&&r.length>0&&(o=10);for(let l of i){let c=s.skills.skillValues.find(d=>d.description===l);c&&(o+=c.value,a.push(c.value))}return i.length>0&&(o=o/i.length),r.forEach(l=>{s.skills.boolSkillValues?.find(c=>c.description===l)?.value||(o=0)}),{skill:o,speed:s.skills.speed,skillValues:a}}static getDiff(i,r){let s=[];i.speed!==r.speed&&s.push({skill:"speed",oldValue:i.speed,newValue:r.speed});for(let o of i.skillValues){let a=r.skillValues.find(l=>l.description===o.description);a?.value!==o.value&&s.push({skill:o.description,oldValue:o.value,newValue:a?.value})}for(let o of i.boolSkillValues){let a=r.boolSkillValues.find(l=>l.description===o.description);a?.value!==o.value&&s.push({skill:o.description,oldValue:o.value,newValue:a?.value})}for(let o of r.skillValues)i.skillValues.find(l=>l.description===o.description)||s.push({skill:o.description,oldValue:0,newValue:o.value});for(let o of r.boolSkillValues)i.boolSkillValues.find(l=>l.description===o.description)||s.push({skill:o.description,oldValue:0,newValue:o.value});return s}static toEn(i){switch(i){case"Farbe":return"color";case"Farbe Fineline":return"color fineline";case"Lippentattoos":return"lip tattoos";case"Gesichtstattoos":return"face tattoos";case"Portrait 1zu1":return"portrait 1to1";case"Tier-Portrait 1zu1":return"animal portrait 1to1";case"kleine Tattoos":return"small tattoos";case"Realistic":return"realistic";case"Maori":return"maori";case"Mandala":return"mandala";case"Coverup":return"coverup";case"Dotwork":return"dotwork";case"Portrait":return"portrait";case"Fineline":return"fineline";case"Farbrealistic":return"color realistic";case"Blackwork":return"blackwork";case"Old / New School":return"old / new school";case"Trash Polka":return"trash polka";case"Sketch":return"sketch";case"Watercolor":return"watercolor";case"Lettering":return"lettering";case"Black & Grey":return"black & grey";case"Blumen":return"flowers";case"Tiere":return"animals";case"Outlines":return"outlines";case"Comic Farbe":return"comic color";case"Comic Black & Grey":return"comic black & grey";case"Mikrorealismus":return"micro realism";case"Chicano":return"chicano";case"Japanese":return"japanese";case"Geometric":return"geometric"}throw Error("Fehlende Skill-\xDCbersetzung f\xFCr "+i)}};e.SkillMustMoreEquals=6,e._boolSkills=[{description:"Farbe"},{description:"Farbe Fineline"},{description:"Lippentattoos"},{description:"Gesichtstattoos"},{description:"Portrait 1zu1"},{description:"Tier-Portrait 1zu1"}],e._skills=[{description:"kleine Tattoos"},{description:"Realistic"},{description:"Maori"},{description:"Mandala"},{description:"Coverup"},{description:"Dotwork"},{description:"Portrait"},{description:"Fineline"},{description:"Farbrealistic"},{description:"Blackwork"},{description:"Old / New School"},{description:"Trash Polka"},{description:"Sketch"},{description:"Watercolor"},{description:"Lettering"},{description:"Black & Grey"},{description:"Blumen"},{description:"Tiere"},{description:"Outlines"},{description:"Comic Farbe"},{description:"Comic Black & Grey"},{description:"Mikrorealismus"},{description:"Chicano"},{description:"Japanese"},{description:"Geometric"}];let t=e;return t})()});function Yii(t,e){if(t&1){let n=re();h(0,"div",56)(1,"nxt-button-icon",57),F("click",function(){V(n);let r=w(2);return B(r.copyArtist())}),y(2,"content_copy"),p(),h(3,"nxt-button-icon",58),F("click",function(){V(n);let r=w(2);return B(r.pastArtist())}),y(4,"content_paste"),p()()}}function qii(t,e){if(t&1){let n=re();h(0,"div",16)(1,"div",59),F("click",function(){V(n);let r=w(2);return B(r.telegramClicked())}),y(2,"Telegram"),ee(3,"br"),y(4,"verbunden"),p()()}}function Zii(t,e){if(t&1){let n=re();h(0,"div",59),F("click",function(){V(n);let r=w(2);return B(r.connectTelegramClicked())}),y(1,"Telegram"),ee(2,"br"),y(3,"nicht verbunden"),p()}}function Xii(t,e){t&1&&(h(0,"div",31),y(1,"Der Artist muss erst angelegt sein, dann kannst du den Ausweis hochladen \u{1F609}"),p())}function Qii(t,e){if(t&1&&(ee(0,"div",65),Ce(1,"jsonFormatted")),t&2){let n=w().$implicit;b("innerHTML",tt(1,1,n),Pi)}}function Jii(t,e){if(t&1&&(h(0,"div")(1,"div",62),ee(2,"img",63),h(3,"div"),y(4),p(),W(5,Qii,2,3,"div",64),p()()),t&2){let n=e.$implicit;g(2),b("src",n.thumbnailLink,Ur),g(2),ye(n.name),g(),b("ngIf",!1)}}function eni(t,e){if(t&1){let n=re();h(0,"div",32)(1,"nxt-file-upload",60),F("onFileDropped",function(r){V(n);let s=w(2);return B(s.onFileDropped(r))}),p(),W(2,Jii,6,3,"div",61),p()}if(t&2){let n=w(2);g(),b("width",300)("height",220),g(),b("ngForOf",n.artistFiles())}}function tni(t,e){if(t&1){let n=re();h(0,"mat-tab",50)(1,"div",66)(2,"nxt-artist-notes",67),Xe("artistChange",function(r){V(n);let s=w(2);return Ze(s.artist,r)||(s.artist=r),B(r)}),p()()()}if(t&2){let n=w(2);g(2),qe("artist",n.artist)}}function ini(t,e){if(t&1&&(h(0,"mat-tab",68)(1,"div",36)(2,"div",28)(3,"div",69),ee(4,"nxt-artist-skill",33),p()()()()),t&2){let n=w(2);g(4),b("nxtFormControl",n.form.get("skills"))}}function nni(t,e){if(t&1){let n=re();h(0,"div",75)(1,"nxt-input",76,0),F("click",function(){let r=V(n).index,s=w(3);return B(s.bodyPutClick(r))}),p(),h(3,"nxt-button-icon",22),F("click",function(){let r=V(n).index,s=w(3);return B(s.removeBodyPut(r))}),y(4,"remove"),p()()}if(t&2){let n=e.$implicit,i=w(3);g(),b("value",n)("readonly",!0)("cellRenderer",i.bodyPutCellRenderer)}}function rni(t,e){if(t&1){let n=re();h(0,"mat-tab",70)(1,"div",71)(2,"div",72)(3,"nxt-slide-toggle",73),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.motiveTattooBlacklist.round,r)||(s.motiveTattooBlacklist.round=r),B(r)}),y(4,"Rund / Kreis"),p(),h(5,"nxt-slide-toggle",73),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.motiveTattooBlacklist.thinLines,r)||(s.motiveTattooBlacklist.thinLines=r),B(r)}),y(6,"feine gerade Linien"),p()(),W(7,nni,5,3,"div",74),h(8,"nxt-button-icon",22),F("click",function(){V(n);let r=w(2);return B(r.newBodyPut())}),y(9,"add"),p()(),ee(10,"br"),p()}if(t&2){let n=w(2);g(3),qe("value",n.motiveTattooBlacklist.round),g(2),qe("value",n.motiveTattooBlacklist.thinLines),g(2),b("ngForOf",n.artist.bodyPutTattooBlacklist)}}function sni(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",73),Xe("valueChange",function(r){let s=V(n).$implicit,o=w(3);return Ze(o.disabledStudios[s.shortName],r)||(o.disabledStudios[s.shortName]=r),B(r)}),y(1),p()}if(t&2){let n=e.$implicit,i=w(3);qe("value",i.disabledStudios[n.shortName]),g(),ye(n.name)}}function oni(t,e){if(t&1&&(h(0,"mat-tab",77)(1,"div",71)(2,"div"),W(3,sni,2,2,"nxt-slide-toggle",78),p()(),ee(4,"br"),p()),t&2){let n=w(2);g(3),b("ngForOf",n.allStudios)}}function ani(t,e){if(t&1){let n=re();h(0,"div",2)(1,"div",3)(2,"div",4),y(3),p(),W(4,Yii,5,0,"div",5),h(5,"div",6)(6,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.getArtistFromAc())}),y(7,"content_paste"),p()(),h(8,"div",8)(9,"div",9),F("nxtOnMultiClick",function(){V(n);let r=w();return B(r.enableName())}),y(10,"Name & Kalender"),p(),h(11,"div",10),ee(12,"nxt-input",11)(13,"nxt-date-picker",12)(14,"nxt-input",13)(15,"nxt-input",14),h(16,"div",15),W(17,qii,5,0,"div",16)(18,Zii,4,0,"div",17),p()(),h(19,"div",18),ee(20,"nxt-autocomplete",19),h(21,"div",20),ee(22,"nxt-input",21),p(),h(23,"div",20)(24,"nxt-button-icon",22),F("click",function(){V(n);let r=w();return B(r.openInsta())}),y(25,"open_in_new"),p(),ee(26,"nxt-input",23),p(),h(27,"mat-button-toggle-group",24)(28,"mat-button-toggle",25),y(29,"Tattoo"),p(),h(30,"mat-button-toggle",26),y(31,"Piercing"),p(),h(32,"mat-button-toggle",27),y(33,"Beauty"),p()()(),h(34,"div",28)(35,"mat-tab-group",29)(36,"mat-tab",30),W(37,Xii,2,0,"div",31)(38,eni,3,3,"div",32),h(39,"nxt-slide-toggle",33),y(40,"Vertrag unterschrieben"),p(),h(41,"nxt-button",34),F("click",function(){V(n);let r=w();return B(r.openGoogleDriveClicked())}),y(42,"Google-Drive"),p()(),h(43,"mat-tab",35)(44,"div",36)(45,"div",37),ee(46,"nxt-select",38)(47,"nxt-input",39)(48,"nxt-input",40)(49,"nxt-input",41),p(),h(50,"div",42)(51,"nxt-input",43),F("onGoogleClick",function(r){V(n);let s=w();return B(s.setAddressFromGoogle(r))}),p()(),h(52,"div",37),ee(53,"nxt-autocomplete",44)(54,"nxt-input",45)(55,"nxt-input",46)(56,"nxt-input",47),h(57,"nxt-button-icon",22),F("click",function(){V(n);let r=w();return B(r.showInMaps())}),y(58,"maps"),p()(),h(59,"div",48),ee(60,"nxt-input",49),h(61,"nxt-slide-toggle",33),y(62,"Angestellt"),p(),h(63,"nxt-slide-toggle",33),y(64,"gro\xDFe Scheine"),p(),h(65,"nxt-slide-toggle",33),y(66,"Artist deaktiviert"),p()()(),h(67,"div")(68,"nxt-button",22),F("click",function(){V(n);let r=w();return B(r.sendInvoices())}),y(69,"Rechnungen schicken"),p()()(),W(70,tni,3,1,"mat-tab",50)(71,ini,5,1,"mat-tab",51)(72,rni,11,3,"mat-tab",52)(73,oni,5,1,"mat-tab",53),p()()(),h(74,"div",54)(75,"nxt-button",22),F("click",function(){V(n);let r=w();return B(r.close())}),y(76,"ABBRECHEN"),p(),h(77,"nxt-button",55),F("click",function(){V(n);let r=w();return B(r.save())}),y(78,"SPEICHERN"),p()()()()}if(t&2){let n=w();g(3),Ke(" Artist ",n.form.get("name").value," "),g(),b("ngIf",!1),g(5),b("nxtMultiClick",3),g(3),b("nxtFormControl",n.form.get("name")),g(),b("nxtFormControl",n.form.get("birthday"))("disableOpenOnClickInput",!0),g(),b("nxtFormControl",n.form.get("idNumber")),g(),b("nxtFormControl",n.form.get("calendarNumber")),g(2),Je(n.form.get("telegramChatId").value?17:18),g(3),b("nxtFormControl",n.form.get("lang"))("options",n.languages)("filterFields",bn(45,Gii))("showClearIcon",!0),g(2),b("nxtFormControl",n.form.get("mobile")),g(4),b("nxtFormControl",n.form.get("instagram")),g(),b("formControl",n.form.get("workType")),g(8),b("selectedIndex",n.selectedIndex())("disablePagination",!0),g(2),Je(n.artist.id?38:37),g(2),b("nxtFormControl",n.formGet("contractSigned")),g(7),b("options",Qm(49,$ii,bn(46,Wii),bn(47,Uii),bn(48,jii)))("nxtFormControl",n.form.get("invoiceData").get("salutation")),g(),b("nxtFormControl",n.form.get("invoiceData").get("name")),g(),b("nxtFormControl",n.form.get("invoiceData").get("customerNumber")),g(),b("nxtFormControl",n.form.get("invoiceData").get("numberRange")),g(2),b("google",!0)("clearGoogleAfterClick",!0),g(2),b("nxtFormControl",n.form.get("invoiceData").get("country"))("options",n.countries)("displayWith",n.displayWithCountry)("displayInOptionWith",n.displayInOptionWithCountry)("maxOptionsToShow",-1)("filterFields",bn(53,Kii)),g(),b("nxtFormControl",n.form.get("invoiceData").get("street")),g(),b("nxtFormControl",n.form.get("invoiceData").get("postalCode")),g(),b("nxtFormControl",n.form.get("invoiceData").get("city")),g(4),b("nxtFormControl",n.form.get("invoiceData").get("email")),g(),b("nxtFormControl",n.formGet("employed")),g(2),b("nxtFormControl",n.formGet("payoutBig")),g(2),b("nxtFormControl",n.formGet("disabled")),g(5),Je(n.isAc?70:-1),g(),b("ngIf",n.showSkills),g(),b("ngIf",n.showBlackList),g(),b("ngIf",n.isMainStudio),g(4),b("disabled",!n.canEdit||n.saveRunning)}}var Gii,Wii,Uii,jii,$ii,Kii,Xy,qA=Q(()=>{me();Pa();qn();Ep();Nu();sZ();tp();nc();Ul();Yc();Gi();Bd();o2();My();go();ive();Zi();Ah();ih();YA();oo();th();Jr();sg();il();ls();Vt();ri();fje();P0();vje();dz();i6();sx();j4e();DD();me();qn();Ci();yi();w4();ji();Cs();z1();jl();Kr();o1();Vt();Gii=()=>["text"],Wii=()=>({value:"Frau",text:"Frau"}),Uii=()=>({value:"Herrn",text:"Herrn"}),jii=()=>({value:"Firma",text:"Firma"}),$ii=(t,e,n)=>[t,e,n],Kii=()=>["name"];Xy=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d,u,m){super(),this.formBuilder=i,this.dialogService=r,this.socketService=s,this.clipboardService=o,this.dialogRef=a,this.configService=l,this.bodyPutService=c,this.permissionService=d,this.loginService=u,this.cacheService=m,this.saveRunning=!1,this.artistFiles=gt([]),this.imported=!1,this.saveSkillsToAc=!1,this.canEdit=!0,this.isAc=this.permissionService.isAc(),this.countries=sD.list,this.isMainStudio=this.configService.config.value.studios.some(f=>f.name==="Villa"),this.motiveTattooBlacklist={round:!1,thinLines:!1},this.allStudios=this.configService.config.value.allStudios,this.disabledStudios={},this.showSkills=!0,this.showBlackList=!0,this.languages=vf.languageCodes.map(f=>({text:f.name,value:f.code})).sort(Hr.sortString("text")),this.selectedIndex=gt(0),this.displayInOptionWithCountry=(f,_)=>f?_(f.name):"",this.displayWithCountry=f=>f?f.name??f.name:"",this.bodyPutCellRenderer=f=>{if(f){let _=f.split(",").filter(x=>x!=="on");return this.bodyPutService.getGermanPath(_)}return""}}nxtOnDestroy(){}ngOnInit(){return O(this,null,function*(){this.pushSocketSubscription=this.socketService.subscribeNew("eventArtistChanged",i=>O(this,null,function*(){!this.saveRunning&&i.record.id===this.artist.id&&(yield this.dialogService.showOk("Artist wurde eben von "+i.record.updatedBy+` ge\xE4ndert!

Deine \xC4nderungen werden nicht gespeichert.`,{buttonText:"Artist neu laden"}),this.setData(this.artist.id))}))})}setData(i,r=!0){return O(this,null,function*(){if(console.log("warte waitForArtists"),yield this.cacheService.waitForArtists(),console.log("fertig waitForArtists"),typeof i=="string"?i==="new"?this.artist=bf.getEmptyArtist():(console.log("warte getArtist"),this.artist=yield this.socketService.getArtist(i),console.log("fertig getArtist")):this.artist=i,yield this.enrichArtistSkills(this.artist),this.buildFormFromArtist(this.artist),i==="new"){let s=0;this.cacheService.artists.value.length>0&&(s=Math.max(...this.cacheService.artists.value.map(a=>parseInt(a.calendarNumber,10)).filter(a=>a<990)));let o=cr.fill((s+1).toString(),3,"0",!1);this.form.get("calendarNumber").setValue(o),this.generateInvoiceDataCustomerNumber(),this.form.get("name").enable(),this.form.get("calendarNumber").disable()}else this.form.get("name").disable();if(r){if(this.canEdit=yield this.socketService.canEditArtist(this.artist.name),!this.canEdit){this.permissionService.hasPermission(Zt.Artists_CanEditSkillsOutsideFromAc)?(this.dialogService.showOk("Es werden lediglich die F\xE4higkeiten die du \xE4nderst gespeichert!"),this.saveSkillsToAc=!0,this.canEdit=!0):this.dialogService.showOk(this.artist.name+" gibts auch in Aachen, bitte dort \xE4ndern und Synchronisieren");return}}else this.canEdit=!0;this.loadArtistFiles()})}enrichArtistSkills(i){return O(this,null,function*(){R0.skills.forEach(r=>{i.skills.skillValues.find(s=>s.description===r.description)||i.skills.skillValues.push({description:r.description,value:-1})}),R0.boolSkills.forEach(r=>{i.skills.boolSkillValues||(i.skills.boolSkillValues=[]),i.skills.boolSkillValues.find(s=>s.description===r.description)||i.skills.boolSkillValues.push({description:r.description,value:!1})})})}buildFormFromArtist(i){let r=i.lang;!r&&i?.invoiceData?.country&&(r=vf.getLanguageFromCountry(i.invoiceData.country));let s=this.languages.find(o=>o.value===r);this.form=this.formBuilder.group({name:new $t(i.name,[ii.requiredAndNotNaN,ii.maxWords(2),ii.trim,ii.custom(this.checkArtistName.bind(this)),ii.artistName],"K\xFCnstlername"),calendarNumber:new $t(i.calendarNumber,[ii.requiredAndNotNaN,ii.exactCharLength(3),ii.onlyNumbers],"Kalendernummer"),birthday:new $t(i.birthday,[ii.requiredAndNotNaN],"Geburtstag"),lang:new $t(s,[ii.requiredAndNotNaN],"Sprache"),idNumber:new $t(i.idNumber,[ii.requiredAndNotNaN],"Ausweis-Nummer"),contractSigned:new $t(i.contractSigned,ii.requiredAndNotNaN),payoutBig:new $t(i.payoutBig),employed:new $t(!!i.employed),telegramChatId:new $t(i.telegramChatId||0),only_:new $t(i.only_,[],"Nur _"),instagram:new $t(i.instagram,[ii.requiredAndNotNaN],"Instagram"),mobile:new $t(i.mobile,[ii.requiredAndNotNaN,ii.mobile],"Handy"),workType:new $t(i.workType??"tattoo",[],"Arbeit"),disabled:new $t(i.disabled),invoiceData:this.formBuilder.group({salutation:new $t(i.invoiceData.salutation,ii.requiredAndNotNaN,"Rechnungs-Anrede"),name:new $t(i.invoiceData.name,ii.requiredAndNotNaN,"Rechnungs-Name"),email:new $t(i.invoiceData.email,[],"Rechnungs-E-Mail"),street:new $t(i.invoiceData.street,ii.requiredAndNotNaN,"Rechnungs-Stra\xDFe"),city:new $t(i.invoiceData.city,ii.requiredAndNotNaN,"Rechnungs-Ort"),country:new $t(i.invoiceData.country,ii.hasProperty("code"),"Rechnungs-Land"),postalCode:new $t(i.invoiceData.postalCode,ii.requiredAndNotNaN,"Rechnungs-PLZ"),customerNumber:new $t(i.invoiceData.customerNumber,ii.requiredAndNotNaN),numberRange:new $t(i.invoiceData.numberRange,[ii.requiredAndNotNaN,ii.exactCharLength(3),ii.onlyAZ,ii.uppercase,ii.custom(this.checkNumberRangeFree.bind(this))],"Rechnungskreis")}),skills:this.formBuilder.group({speed:new $t(i.skills.speed,_m.min(0),"Geschwindigkeit"),boolSkillValues:this.formBuilder.array(i.skills.boolSkillValues.map(o=>this.formBuilder.group({description:new $t(o.description),value:new $t(o.value,[],"Skill "+o.description)}))),skillValues:this.formBuilder.array(i.skills.skillValues.map(o=>this.formBuilder.group({description:new $t(o.description),value:new $t(o.value,_m.min(0),"Skill "+o.description)})))})}),this.motiveTattooBlacklist.round=i.motiveTattooBlacklist?.includes("round"),this.motiveTattooBlacklist.thinLines=i.motiveTattooBlacklist?.includes("thinLines"),i.invoiceData.country&&this.form.get("invoiceData").get("country").setValue(this.countries.find(o=>o.code===i.invoiceData.country)),this.form.get("invoiceData").get("customerNumber").disable(),this.form.get("calendarNumber").disable(),this.registerFormChanges(),this.form.get("calendarNumber").setValue(this.form.get("calendarNumber").value),i.disabledStudios||(i.disabledStudios=[]),this.disabledStudios={};for(let o of i.disabledStudios)this.disabledStudios[o]=!0}checkNumberRangeFree(i){let r=this.cacheService.artists.value.filter(s=>s.id!==this.artist.id).find(s=>s.invoiceData.numberRange===i);return r?"hat bereits "+r.name:""}checkArtistName(i){return this.cacheService.artists.value.filter(s=>s.id!==this.artist.id).find(s=>s.name.toLowerCase()===i.toLowerCase())?"ist bereits vergeben":""}save(){return O(this,null,function*(){let i=ve(ve({},this.artist),this.form.getRawValue());if(this.saveSkillsToAc){yield this.socketService.setArtistSkillsToAc(i),yield za.sleep(1e3),this.dialogRef.close({syncArtistFromAc:!0});return}if(this.configService.config.value.studioRegion!=="STAGING"&&this.configService.config.value.studioRegion!=="BR"&&this.configService.config.value.studioRegion!=="ZONA"&&this.configService.config.value.studioRegion!=="AC"&&!this.imported&&!this.artist.id){this.dialogService.showOk("Du kannst hier keine neuen Artists anlegen, bitte importiere einen Artist aus Aachen!");return}i.motiveTattooBlacklist=[],i.disabledStudios=[];for(let r of Object.keys(this.disabledStudios))this.disabledStudios[r]&&i.disabledStudios.push(r);this.motiveTattooBlacklist.round&&i.motiveTattooBlacklist.push("round"),this.motiveTattooBlacklist.thinLines&&i.motiveTattooBlacklist.push("thinLines"),(yield this.checkFormErrors(i))&&(i.invoiceData.country=i.invoiceData.country?.code,i.name=i.name.trim(),i.invoiceData.name=i.invoiceData.name.trim(),i.lang=i.lang.value,this.saveRunning=!0,this.dialogService.showLoading("Artist wird gespeichert..."),yield this.socketService.upsertArtist(i),this.dialogService.hideLoading(),this.dialogRef.close(!0))})}close(){this.dialogRef.close(!1)}checkFormErrors(i){return O(this,null,function*(){return this.form.get("disabled").value?!0:(this.form.markAllAsTouched(),Is.showErrorsTrueIfNoError(this.form,this.dialogService,yield this.getAdditionalErrors(i)))})}enableName(){this.form.get("name").enable()}getAdditionalErrors(i){return O(this,null,function*(){let r=this.cacheService.artists.value.filter(o=>o.id!==i.id),s=[];return r.find(o=>o.calendarNumber===i.calendarNumber)&&s.push("Kalendernummer ist bereits vergeben"),r.find(o=>o.name===i.name)&&s.push("Name ist bereits  vergeben"),r.find(o=>o.invoiceData.numberRange===i.invoiceData.numberRange)&&s.push("Rechnungskreis ist bereits vergeben"),s})}copyArtist(){let i=this.form.getRawValue();this.clipboardService.copyToClipboard(JSON.stringify(i))}pastArtist(){return O(this,null,function*(){let r=yield(yield this.dialogService.showInputOld({message:"Artist einf\xFCgen:"})).afterClosed().toPromise();if(r?.startsWith('{"name"')){let s=Qn.parse(r);s.calendarNumber=this.form.get("calendarNumber").value,s.contractSigned=this.form.get("contractSigned").value,s.invoiceData.customerNumber=this.form.get("invoiceData.customerNumber").value,this.form.setValue(s)}})}registerFormChanges(){this.form.get("calendarNumber").valueChanges.subscribe(i=>{this.generateInvoiceDataCustomerNumber()}),this.form.get("contractSigned").valueChanges.subscribe(i=>{i&&(this.canEdit=!0)}),this.form.get("invoiceData").get("country").valueChanges.subscribe(i=>{i&&i.code&&!i.eu&&(this.dialogService.showOk(`Das Land ist nicht in der EU
somit ist eine Zusammenarbeit nicht m\xF6glich`),requestAnimationFrame(()=>{this.form.get("invoiceData").get("country").setValue(null)}))}),this.form.get("mobile").valueChanges.subscribe(i=>{let r=Kc.format(i);r&&i!==r&&this.form.get("mobile").setValue(Kc.format(i))}),this.form.get("workType").valueChanges.subscribe(i=>{this.showSkills=i==="tattoo",this.showBlackList=i==="tattoo"||i==="piercing",i!=="tattoo"&&this.setSkillsToZero()})}formGet(i){return this.form.get(i)}setSkillsToZero(){this.form.get("skills").get("speed").setValue(0);let i=this.form.get("skills").get("skillValues").value;i.forEach(r=>{r.value===-1&&(r.value=0)}),this.form.get("skills").get("skillValues").setValue(i)}bodyPutClick(i){return O(this,null,function*(){let r=yield this.bodyPutService.showBodyPutChooser();this.artist.bodyPutTattooBlacklist[i]=r.filter(s=>s!=="on").join(",")})}newBodyPut(){this.artist.bodyPutTattooBlacklist||(this.artist.bodyPutTattooBlacklist=[]),this.artist.bodyPutTattooBlacklist.push(null)}removeBodyPut(i){this.artist.bodyPutTattooBlacklist.splice(i,1)}setAddressFromGoogle(i){let r=this.countries.find(s=>s.code===i.countryCode);i.street&&i.streetNumber?this.form.get("invoiceData").get("street").setValue(i.street+" "+i.streetNumber):i.street?this.form.get("invoiceData").get("street").setValue(i.street):this.form.get("invoiceData").get("street").setValue(""),this.form.get("invoiceData").get("postalCode").setValue(i.postalCode),this.form.get("invoiceData").get("city").setValue(i.city),this.form.get("invoiceData").get("country").setValue(r)}showInMaps(){let i=this.form.get("invoiceData").get("street").value+" "+this.form.get("invoiceData").get("postalCode").value+" "+this.form.get("invoiceData").get("city").value+" "+this.form.get("invoiceData").get("country").value?.code;window.open("https://maps.google.com/maps?q="+encodeURI(i),"_blank","popup=true")}generateInvoiceDataCustomerNumber(){let i=this.form.get("calendarNumber").value;this.form.get("invoiceData").get("customerNumber").setValue("A"+cr.fill(i,5,"0",!1))}getArtistFromAc(){return O(this,null,function*(){this.dialogService.showLoading("Lade Artists aus Aachen...");let i=yield this.socketService.getArtistsFromAc();this.dialogService.hideLoading();let r=i.map(o=>({text:o.name,value:o})).sort(Hr.sortString("text"));r.sortString("text");let s=yield this.dialogService.showSelect("Welchen Artist m\xF6chtest du aus Aachen importieren?",r,{placeholder:"Artist ausw\xE4hlen"});s&&(s.calendarNumber=this.form.get("calendarNumber").value,s.contractSigned=this.form.get("contractSigned").value,s.invoiceData.customerNumber=this.form.get("invoiceData.customerNumber").value,this.setData(s,!1),this.imported=!0)})}openInsta(){window.open("https://instagram.com/"+this.form.get("instagram").value,"_blank")}sendInvoices(){return O(this,null,function*(){let i=yield this.dialogService.showSelect("Alle Rechnungen aus eine Jahr an "+this.artist.name+" per WhatsApp schicken?",[{value:"2024",text:"2024"},{value:"2023",text:"2023"}],{placeholder:"Jahr ausw\xE4hlen",okButtonText:"Senden"});if(i){this.dialogService.showLoading("Rechnungen werden gesendet...");let r=[];this.pushSocketSubscription=this.socketService.subscribeNew("responseStream_sendArtistInvoicesByYear",s=>{r.push(s.replaceAll(`
`,": ")),this.dialogService.updateLoadingText(s)}),yield this.socketService.sendArtistInvoicesByYear(this.artist.name,i),yield za.sleep(200),this.dialogService.showOk(`Rechnungen wurden gesendet:
`+r.join(`
`)),this.dialogService.hideLoading()}})}onFileDropped(i){return O(this,null,function*(){if(i.length===0)return;if(i.length>1){this.dialogService.showOk("Bitte immer nur eine Datei");return}let r=i[0],s=[{text:"Ausweis vorne",value:"id-card-front"},{text:"Ausweis hinten",value:"id-card-back"}],l='<div class="flex flex-col items-center justify-center">'+('<img src="'+URL.createObjectURL(r)+'" style="width: 250px; height: fit-content" />')+"<br/><div>Worum handelt es sich?</div></div>",c=yield this.dialogService.showButtons(l,{buttons:s,showCancelButton:!0,textAlign:"center"});if(c){this.dialogService.showLoading("Ausweis wird hochgeladen...");let d=yield r.arrayBuffer(),u=yield this.dialogService.showImageCrop("Zieh ein Viereck um den Ausweis",d,{buttonText:"Hochladen"});u&&(yield this.socketService.uploadArtistFile(this.form.get("name").value,c.value,r.name,u))}this.loadArtistFiles()})}loadArtistFiles(){return O(this,null,function*(){this.artist.googleDriveFolderId&&(this.artistFiles.set(yield this.socketService.getGoogleDriveFolder(this.artist.googleDriveFolderId)),this.dialogService.hideLoading())})}telegramClicked(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Chat-ID f\xFCr "+this.artist.name+`
`+this.form.get("telegramChatId").value,{yesText:"Chat l\xF6schen",noText:"Zur\xFCck"}))&&this.form.get("telegramChatId").setValue(0)})}fakeTelegram(){return O(this,null,function*(){this.form.get("telegramChatId").setValue(Date.now())})}connectTelegramClicked(){return O(this,null,function*(){this.dialogService.showComponentDialog(mX).componentInstance.setArtist(this.artist.id)})}openGoogleDriveClicked(){window.open("https://drive.google.com/drive/folders/"+this.artist.googleDriveFolderId,"_blank")}};e.TabIndex_IdAndContract=0,e.TabIndex_Invoice=1,e.TabIndex_Notes=2,e.TabIndex_Skills=3,e.\u0275fac=function(r){return new(r||e)(R(ad),R(vt),R(lt),R(ep),R(Gt,8),R(Xi),R(Oc),R(ws),R(Fi),R(cc))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-edit"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.dataGrid=o.first)}},standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["nxtFormControlElemBodyPut",""],["class","nxt-page","fxFlex","","fxLayout","row","fxLayoutAlign","center",4,"ngIf"],["fxFlex","","fxLayout","row","fxLayoutAlign","center",1,"nxt-page"],["fxFlex","","fxFlex.gt-sm","80","fxLayout","column"],["fxLayout","row","fxLayoutAlign","center center",1,"title"],["fxLayout","row","fxLayoutAlign","end",4,"ngIf"],["nxtPermission","IsNotAc","fxLayoutAlign","end"],["tooltip","Artist aus Aachen einf\xFCgen",3,"click"],["fxFlex","","fxLayout","column",2,"border","0 solid red"],[1,"section-header",3,"nxtOnMultiClick","nxtMultiClick"],["fxLayout","row","fxLayout.lt-md","column","fxLayoutGap","15px"],["fxFlex.gt-sm","50","placeholder","K\xFCnstlername",3,"nxtFormControl"],["displayDateFormat","dd.MM.yyyy","placeholder","Geburtstag",3,"nxtFormControl","disableOpenOnClickInput"],["placeholder","Ausweis-Nummer",3,"nxtFormControl"],["placeholder","KalenderNr",1,"w-[150px]",3,"nxtFormControl"],[1,"flex","no-wrap","text-[80%]","justify-center"],[1,"flex","flex-row","justify-center"],[1,"center","cursor-pointer"],[1,"flex","flex-row","justify-around","items-center","gap-3"],[1,"flex","w-[150px]",3,"nxtFormControl","options","filterFields","showClearIcon"],[1,"flex","grow"],["placeholder","Handy",1,"flex","w-full",3,"nxtFormControl"],[3,"click"],["placeholder","Instagram",3,"nxtFormControl"],[3,"formControl"],["value","tattoo"],["value","piercing"],["value","beauty"],["fxFlex","","fxLayout","column"],["fxFlex","",2,"height","200px",3,"selectedIndex","disablePagination"],["label","Ausweis & Vertrag"],[1,"py-20"],[1,"flex","flex-row","gap-5","pt-10"],[3,"nxtFormControl"],["nxtPermission","IsJulian",3,"click"],["label","Rechnung"],["fxFlex","","fxLayout","column",1,"tab-content"],["fxFlex","","fxLayout","row","fxLayout.lt-md","column","fxLayoutGap","15px"],["fxFlex.gt-sm","15","placeholder","Anrede",3,"options","nxtFormControl"],["fxFlex.gt-sm","50","placeholder","Name",3,"nxtFormControl"],["fxFlex.gt-sm","15","placeholder","Kundennummer",3,"nxtFormControl"],["fxFlex.gt-sm","20","placeholder","Rechnungskreis",3,"nxtFormControl"],["fxFlex","","fxLayout","row","fxLayout.lt-md","column"],["placeholder","Adress-Suche",3,"onGoogleClick","google","clearGoogleAfterClick"],["fxFlex.gt-sm","25","placeholder","Land","panelWidth","300px",3,"nxtFormControl","options","displayWith","displayInOptionWith","maxOptionsToShow","filterFields"],["fxFlex.gt-sm","30","placeholder","Stra\xDFe",3,"nxtFormControl"],["fxFlex.gt-sm","10","placeholder","PLZ",3,"nxtFormControl"],["fxFlex.gt-sm","35","placeholder","Ort",3,"nxtFormControl"],["fxFlex","","fxLayout","row","fxLayoutAlign","space-between center","fxLayout.lt-md","column"],["fxFlex.gt-sm","35","placeholder","E-Mail",3,"nxtFormControl"],["label","Notizen"],["fxFlex","","label","F\xE4higkeiten",4,"ngIf"],["label","Blacklist",4,"ngIf"],["label","gesperrt F\xFCr",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center","fxLayoutGap","2em",2,"padding-top","1em"],[3,"click","disabled"],["fxLayout","row","fxLayoutAlign","end"],["nxtPermission","IsAc","tooltip","Artist kopieren",3,"click"],["nxtPermission","IsNotAc","tooltip","Artist einf\xFCgen",3,"click"],[1,"center","cursor-pointer",3,"click"],["message","Ausweis-Bild hier her ziehen",3,"onFileDropped","width","height"],[4,"ngFor","ngForOf"],[1,"flex","flex-col","items-center"],[2,"height","220px","width","fit-content",3,"src"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[1,"w-full","flex","flex-row","justify-center","pt-4"],[1,"flex","w-fit",3,"artistChange","artist"],["fxFlex","","label","F\xE4higkeiten"],[1,"artist-skills"],["label","Blacklist"],["fxFlex","","fxLayout","column","fxLayoutAlign","center center",2,"padding-top","2em"],["fxLayout","row","fxLayoutGap","2em",1,"pb-4"],[3,"valueChange","value"],["fxLayout","row","fxLayoutAlign","center center",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center center"],["fxFlex","350px","placeholder","K\xF6rperstelle",3,"click","value","readonly","cellRenderer"],["label","gesperrt F\xFCr"],[3,"value","valueChange",4,"ngFor","ngForOf"]],template:function(r,s){r&1&&W(0,ani,79,54,"div",1),r&2&&b("ngIf",s.form&&s.artist)},dependencies:[Ct,At,Yt,$r,oi,qi,an,Zs,Qu,Yi,tl,Nn,L7,_x,$l,Ga,Lt,zX,Hi,mje,E5,gje,nm,Dm,Ia,Ko,$c],styles:["[_nghost-%COMP%]{width:95vw;height:95vh}[_nghost-%COMP%]     .mat-tab-label{font-size:110%}.section-header[_ngcontent-%COMP%]{font-size:110%;padding:15px 10px 10px;text-transform:uppercase}.artist-skills[_ngcontent-%COMP%]{padding:0 10px}.title[_ngcontent-%COMP%]{font-size:200%;text-transform:uppercase}.tab-content[_ngcontent-%COMP%]{padding-top:2em;padding-bottom:2em}.calendar-table[_ngcontent-%COMP%]{border-collapse:collapse}.calendar-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid gray;padding:10px}"]});let t=e;return t})()});var m3,ZA=Q(()=>{Yc();m3=class t{static test(e){return{[e]:"declarations-of-consent"}}static reGroupObjectArray(e,n){let i=new Map;for(let s of e){let o=s[n];i.get(o)||i.set(o,[]),i.get(o)?.push(s)}let r=[];for(let s of i.keys()){let o={};o.list=i.get(s),o.value=s,r.push(o)}return r.length>0&&(typeof r[0].value=="string"?r=r.sort(Hr.sortString("value")):typeof r[0].value=="number"&&(r=r.sortNumber("value"))),r}static groupToObjectArray(e,n,i){let r=[];for(let s of Object.keys(e)){let o={};o[i]=e[s],o[n]=s,r.push(o)}return r}static groupObjectArray(e,n){let i={};for(let r of e){let s=r[n];i[s]||(i[s]=[]),i[s].push(r)}return i}static groupObjectArrayWithGetterFn(e,n){let i={};for(let r of e){let s=n(r);i[s]||(i[s]=[]),i[s].push(r)}return i}static groupObjectArrayAndSum(e,n,i){let r=t.groupObjectArray(e,n),s=[];for(let o of Object.keys(r))s.push({groupBy:o,elements:r[o],sum:r[o].reduce((a,l)=>a+parseFloat(l[i]),0)});return s=s.sort(Hr.sortString("groupBy")),s}}});function lni(t,e){if(t&1&&ee(0,"img",2),t&2){let n=e.$implicit;b("src",n,Ur)}}var XA,HX=Q(()=>{ri();me();XA=(()=>{let e=class e{constructor(){this.icons=[],this.minValue=0,this.showEmpty=!0,this.showHalf=!0,this.drawFirst=!0}ngOnInit(){}draw(){this.icons=[];let i=this.value>=this.minValue?this.value:this.minValue;for(let r=0;r<5;r++){let s="/assets/images/grid-cell-renderer/";if(i>=r+1)s+=this.icon+".svg";else if(i>=r+.5)this.showHalf?s+=this.icon+"_half.svg":s+=this.icon+".svg";else if(s+=this.icon+"_border.svg",!this.showEmpty&&!(r===0&&this.drawFirst))continue;this.icons.push(s)}}ngOnChanges(i){this.draw()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-rate-icons"]],inputs:{value:"value",minValue:"minValue",icon:"icon",showEmpty:"showEmpty",showHalf:"showHalf",drawFirst:"drawFirst"},standalone:!0,features:[yn,xe],decls:2,vars:1,consts:[[1,"flex","flex-row"],[3,"src",4,"ngFor","ngForOf"],[3,"src"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,lni,1,1,"img",1),p()),r&2&&(g(),b("ngForOf",s.icons))},dependencies:[Hi],styles:["img[_ngcontent-%COMP%]{width:16px}"]});let t=e;return t})()});var QA,GX=Q(()=>{a4();me();QA=(()=>{let e=class e{constructor(){}setTitle(i){window.location.origin.includes("https://test.nxt-lvl.ink")?this.setDocumentTitle("TEST - "+i):window.location.origin.includes("https://ffm.nxt-lvl.ink")?this.setDocumentTitle("FFM - "+i):window.location.origin.includes("https://ac.nxt-lvl.ink")?this.setDocumentTitle("AC - "+i):window.location.origin.includes("https://ab.nxt-lvl.ink")?this.setDocumentTitle("AB - "+i):this.setDocumentTitle("LOCAL - "+i)}setDocumentTitle(i){window.document.title=i.toUpperCase(),zi.instance.send("eval","window.document.title = '"+i.toUpperCase()+"'")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function hni(t,e){if(t&1){let n=re();h(0,"div",24),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),h(1,"mat-icon"),y(2,"close"),p()()}}function pni(t,e){if(t&1){let n=re();h(0,"div",41),F("click",function(){V(n);let r=w().index,s=w();return B(s.removeFilter(r))}),h(1,"mat-icon"),y(2,"delete"),p()()}}function mni(t,e){if(t&1){let n=re();h(0,"mat-icon",42),F("click",function(){V(n);let r=w().$implicit,s=w();return B(s.selectAllDays(r,!1))}),y(1,"deselect "),p()}}function fni(t,e){if(t&1){let n=re();h(0,"mat-icon",43),F("click",function(){V(n);let r=w().$implicit,s=w();return B(s.selectAllDays(r,!0))}),y(1,"select_all "),p()}}function gni(t,e){if(t&1){let n=re();h(0,"div",25)(1,"div",26)(2,"div",27),W(3,pni,3,0,"div",28)(4,mni,2,0,"mat-icon",29)(5,fni,2,0,"mat-icon",30),y(6," \xA0\xA0\xA0\xA0 "),h(7,"nxt-checkbox",31),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[0],r)||(s.days[0]=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.loadData())}),p(),y(8,"\xA0\xA0\xA0\xA0 "),h(9,"nxt-checkbox",32),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[1],r)||(s.days[1]=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.loadData())}),p(),y(10,"\xA0\xA0\xA0\xA0 "),h(11,"nxt-checkbox",33),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[2],r)||(s.days[2]=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.loadData())}),p(),y(12,"\xA0\xA0\xA0\xA0 "),h(13,"nxt-checkbox",34),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[3],r)||(s.days[3]=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.loadData())}),p(),y(14,"\xA0\xA0\xA0\xA0 "),h(15,"nxt-checkbox",35),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[4],r)||(s.days[4]=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.loadData())}),p(),y(16,"\xA0\xA0\xA0\xA0 "),h(17,"nxt-checkbox",36),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[5],r)||(s.days[5]=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.loadData())}),p(),h(18,"nxt-checkbox",37),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.days[6],r)||(s.days[6]=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.loadData())}),p()(),h(19,"div",38)(20,"div"),y(21,"Ab"),p(),y(22," \xA0\xA0 "),h(23,"mat-slider",39)(24,"input",11),Xe("ngModelChange",function(r){let s=V(n).$implicit;return Ze(s.startTime,r)||(s.startTime=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.startTimeChanged())}),p()(),h(25,"div"),y(26),Ce(27,"duration"),p()(),h(28,"div",38)(29,"div"),y(30,"Studio Ende"),p(),y(31," \xA0\xA0 "),h(32,"mat-slider",40)(33,"input",11),Xe("ngModelChange",function(r){let s=V(n).$implicit;return Ze(s.studioEndTime,r)||(s.studioEndTime=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.endTimeChanged())}),p()(),h(34,"div"),y(35),Ce(36,"duration"),p()()()()}if(t&2){let n=e.$implicit,i=w();g(3),b("ngIf",i.filters.length>1),g(),b("ngIf",n.days.indexOf(!1)===-1),g(),b("ngIf",n.days.indexOf(!1)>-1),g(2),qe("value",n.days[0]),g(2),qe("value",n.days[1]),g(2),qe("value",n.days[2]),g(2),qe("value",n.days[3]),g(2),qe("value",n.days[4]),g(2),qe("value",n.days[5]),g(),qe("value",n.days[6]),g(5),b("min",i.normalStudioStart)("max",i.normalStudioEnd-1),g(),qe("ngModel",n.startTime),g(2),Ke("",Nt(27,17,n.startTime*36e5,"HH:mm")," Uhr"),g(6),b("max",24),g(),qe("ngModel",n.studioEndTime),g(2),Ke("",Nt(36,20,n.studioEndTime*36e5,"HH:mm")," Uhr")}}function vni(t,e){if(t&1&&(h(0,"div",51),y(1),p()),t&2){let n=e.$implicit;g(),ye(n.title)}}function yni(t,e){if(t&1&&(h(0,"div",50),Kn(1,vni,2,1,"div",51,cni),p()),t&2){let n=w().$implicit,i=w(2);g(),Yn(i.dailyNotes[n.dateString])}}function _ni(t,e){if(t&1&&(h(0,"th")(1,"div",48),ee(2,"div",49),W(3,yni,3,0,"div",50),p()()),t&2){let n=e.$implicit,i=w(2);g(2),b("innerHTML",n.dateStringLong,Pi),g(),Je(i.dailyNotes[n.dateString]?3:-1)}}function Cni(t,e){if(t&1&&ee(0,"nxt-rate-icons",66),t&2){let n=w().$implicit;b("value",n.skillFiltered.skill/2)("showEmpty",!0)}}function xni(t,e){if(t&1&&(h(0,"div",67)(1,"div",68),y(2," \xA0 "),p(),h(3,"div",69),y(4,"Zeit"),p()()),t&2){let n=w().$implicit;g(),b("ngStyle",bs(1,uni,n.freeTime/(7*60*60*10)+"%",n.freeTime/(7*60*60*10)>30?"red":n.freeTime/(7*60*60*10)>10?"orange":"green"))}}function bni(t,e){if(t&1&&(h(0,"div",70),ee(1,"nxt-rate-icons",71)(2,"div",72),p()),t&2){let n=w().$implicit;g(),b("minValue",1)("value",n.artistMoneyPercentageToFill/20)("showEmpty",!1)("showHalf",!1)}}function wni(t,e){if(t&1){let n=re();h(0,"tr")(1,"td")(2,"div",14),F("click",function(){let r=V(n).$implicit,s=w().$implicit,o=w().$implicit,a=w(2);return B(a.freeTimeWindowClicked(o,s,r))}),y(3),Ce(4,"duration"),Ce(5,"duration"),p()()()}if(t&2){let n=e.$implicit;g(3),cn(" ",Nt(4,2,n.startTime,"HH:mm")," - ",Nt(5,5,n.endTime,"HH:mm")," ")}}function Sni(t,e){if(t&1){let n=re();h(0,"tr",56)(1,"td",57),F("dblclick",function(){let r=V(n).$implicit,s=w(3);return B(s.editArtist(r.id))}),h(2,"div",58)(3,"div",59),y(4,"\xA0 "),p(),h(5,"div",60),y(6),ee(7,"br"),W(8,Cni,1,2,"nxt-rate-icons",61),h(9,"div",62),y(10),p(),W(11,xni,5,4,"div",63)(12,bni,3,4,"div",64),p()()(),h(13,"td")(14,"table",65),W(15,wni,6,8,"tr",45),p()()()}if(t&2){let n=e.$implicit,i=w(3);g(3),b("ngStyle",sn(8,dni,n.color)),g(3),cn(" ",n.studioShort," ",n.name," "),g(2),b("ngIf",n.skillFiltered.skill>0),g(2),Ke("Geschw. ",n.skillFiltered.speed," / 10"),g(),b("ngIf",!1),g(),b("ngIf",i.showMoneyBar),g(3),b("ngForOf",n.freeTimeWindows)}}function Tni(t,e){if(t&1){let n=re();h(0,"td",52)(1,"table",53),W(2,Sni,16,10,"tr",54),h(3,"tr")(4,"td"),y(5,"Artist offen"),p(),h(6,"td")(7,"div",55),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.freeArtistClicked(r))}),y(8),p()()()()()}if(t&2){let n=e.$implicit,i=w(2);g(2),b("ngForOf",n.artists),g(6),cn("",i.minTimeFrom," - ",i.freeArtistEndTime," ")}}function Dni(t,e){if(t&1&&(h(0,"table",44)(1,"tr"),W(2,_ni,4,2,"th",45),p(),h(3,"tr",46),W(4,Tni,9,3,"td",47),p()()),t&2){let n=w();g(2),b("ngForOf",n.data.days),g(2),b("ngForOf",n.dataFiltered.days)}}function Eni(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-slide-toggle",77),Xe("valueChange",function(r){let s=V(n).$implicit,o=w(2);return Ze(o.currentBoolSkillFilterObj[s.description],r)||(o.currentBoolSkillFilterObj[s.description]=r),B(r)}),F("valueChange",function(){let r=V(n).$implicit,s=w(2);return B(s.boolSkillChanged(r.description))}),y(2),p()()}if(t&2){let n=e.$implicit,i=w(2);g(),qe("value",i.currentBoolSkillFilterObj[n.description]),g(),Ke("",n.description," ")}}function Mni(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-slide-toggle",77),Xe("valueChange",function(r){let s=V(n).$implicit,o=w(2);return Ze(o.currentSkillFilterObj[s.description],r)||(o.currentSkillFilterObj[s.description]=r),B(r)}),F("valueChange",function(){let r=V(n).$implicit,s=w(2);return B(s.skillChanged(r.description))}),y(2),p()()}if(t&2){let n=e.$implicit,i=w(2);g(),qe("value",i.currentSkillFilterObj[n.description]),g(),Ke("",n.description," ")}}function kni(t,e){if(t&1&&(h(0,"div",73)(1,"div",74)(2,"div",75),y(3,"Skills"),p()(),h(4,"div",76),W(5,Eni,3,2,"div",45),h(6,"div"),y(7,"\xA0"),p(),W(8,Mni,3,2,"div",45),p()()),t&2){let n=w();g(5),b("ngForOf",n.data.boolSkills),g(3),b("ngForOf",n.data.skills)}}var lve,cni,dni,uni,WX,cve=Q(()=>{Vb();zn();jo();qA();o2();lve=Gs(Jm());ZA();pa();Lv();oo();HX();An();Mp();Jr();ls();mg();Zi();qn();SD();th();Vt();Ja();ri();me();yi();Kr();o1();Ci();GX();Cs();ji();ug();Vt();qn();An();cni=(t,e)=>e.id,dni=t=>({backgroundColor:t}),uni=(t,e)=>({fontSize:"75%",minWidth:"3px",width:t,backgroundColor:e});WX=(()=>{let e=class e extends i2{constructor(i,r,s,o,a,l,c,d){super(),this.socketService=i,this.loginService=r,this.cacheService=s,this.dialogService=o,this.windowService=a,this.configService=l,this.dialogRef=c,this.clipboard=d,this.artists=[],this.normalStudioStart=0,this.normalStudioEnd=0,this.fromDateString=Ie.format(Date.now(),"yyyy-MM-dd"),this.duration=.5,this.daysCount=7,this.showMoneyBar=this.loginService.isBackoffice()&&!1,this.filters=[],this.currentSkillFilterObj={},this.currentBoolSkillFilterObj={},this.minTimeFrom="",this.freeArtistEndTime="",this.artistFilterText="",this.dailyNotes={},this.windowService.setTitle("Terminfinder"),this.pushSubscription=this.cacheService.artists.subscribe(m=>this.artists=m);let u=Date.now();for(;Ie.getDayOfWeek(u)!==0;)u=Ie.addDays(u,-1);this.fromDateString=Ie.format(u,"yyyy-MM-dd"),this.initAuthenticationListener(),this.normalStudioStart=this.configService.config.value.studioWorkStart/Qt.DURATION_1HOUR,this.normalStudioEnd=this.configService.config.value.studioWorkEnd/Qt.DURATION_1HOUR,this.filters.push({startTime:this.normalStudioStart,studioEndTime:this.normalStudioEnd,days:[!0,!0,!0,!0,!0,!0,!0]})}ngOnInit(){return O(this,null,function*(){this.subscribeServerData()})}ngOnDestroy(){}subscribeServerData(){return O(this,null,function*(){})}loadData(){return O(this,null,function*(){let i=[];for(let a of Object.keys(this.currentSkillFilterObj))this.currentSkillFilterObj[a]&&i.push(a);i.length>0;let r=[];for(let a of Object.keys(this.currentBoolSkillFilterObj))this.currentBoolSkillFilterObj[a]&&r.push(a);let s=yield this.socketService.eventFinder({duration:this.duration*60*60*1e3,filters:this.filters,fillMissingDays:!0,fromDateString:this.fromDateString,skillFilter:i,boolSkillFilter:r});if(s.days)for(let a of s.days)a.artists=a.artists.filter(l=>l.freeTimeWindows.length>0),a.dateStringLong=this.longDate(a.date);this.dailyNotes={};for(let a of s.dailyNotes)this.dailyNotes[a.dateString]||(this.dailyNotes[a.dateString]=[]),this.dailyNotes[a.dateString].push(a);this.data=s,this.setFilter();let o=Math.min(...this.filters.map(a=>a.startTime));this.minTimeFrom=Qt.format(o*Qt.DURATION_1HOUR,"HH:mm"),this.freeArtistEndTime=Qt.format((o+this.duration)*Qt.DURATION_1HOUR,"HH:mm")})}initAuthenticationListener(){this.pushSubscription=this.socketService.onAuthenticated.subscribe(()=>{setTimeout(()=>this.loadData(),1)})}longDate(i){let r=Ie.format(i,"EEE")+" "+Ie.format(i,"dd.MM");if(Ie.getDayOfWeek(i)===0){let s=(0,lve.default)(i).week(),o=(0,lve.default)().week(),a=s-o;if(a<6){let l=Date.now();a===0?r+="<br/>diese Woche":a===1?r+="<br/>n\xE4chste Woche":a>1&&(r+="<br/>in&nbsp;"+a+"&nbsp;Wochen")}else r+="<br/>"+Ie.dateDiffToNowOnlyDaysText(i)}else Math.abs(i-Date.now())/Qt.DURATION_1DAY<30&&(r+="<br/>"+Ie.dateDiffToNowOnlyDaysText(i));return r}endTimeLiveChanged(i,r){i.studioEndTime=r.value}dateChanged(){this.loadData()}durationChanged(){this.loadData()}endTimeChanged(){this.loadData()}startTimeChanged(){this.loadData()}selectAllDays(i,r){for(let s=0;s<i.days.length;s++)i.days[s]=r;this.loadData()}removeFilter(i){this.filters.splice(i,1),this.loadData()}addFilter(){this.filters.push({days:[!1,!1,!1,!1,!1,!1],startTime:this.normalStudioStart,studioEndTime:this.normalStudioEnd})}freeTimeWindowClicked(i,r,s){let o=this.configService.config.value.studioName;o==="Aachen"&&(o="Villa");let a={date:i.dateString,timeFrom:Qt.format(s.startTime,"HH:mm"),timeTill:Qt.format(s.startTime+this.duration*Qt.DURATION_1HOUR,"HH:mm"),studio:o};if(this.dialogRef){for(let l of Object.keys(this.currentBoolSkillFilterObj))this.currentBoolSkillFilterObj[l]||delete this.currentBoolSkillFilterObj[l];for(let l of Object.keys(this.currentSkillFilterObj))this.currentSkillFilterObj[l]||delete this.currentSkillFilterObj[l];this.dialogRef.close({event:a,artist:r,studio:this.configService.config.value.eventStudio,skill:{skills:this.currentSkillFilterObj,boolSkills:this.currentBoolSkillFilterObj}})}else this.dialogService.showOk("termin anlegen hier \xF6ffnen...")}setWeekFromGoogleCalendar(i){let r=i.split("/"),s=r.indexOf("week"),o=r.indexOf("custom"),a=r.indexOf("day"),l="2000",c="1",d="1";s>0&&r.length>s+3?(l=r[s+1],c=r[s+2],d=r[s+3]):o>-1?(l=r[o+3],c=r[o+4],d=r[o+5]):a>-1?(l=r[a+1],c=r[a+2],d=r[a+3],l||(l=Ie.formatNow("yyyy"),c=Ie.formatNow("MM"),d=Ie.formatNow("dd"))):(l=Ie.format(Date.now(),"yyyy"),c=Ie.format(Date.now(),"MM"),d=Ie.format(Date.now(),"dd"));let u=parseInt(c,10)-1,m=new Date(0);m.setFullYear(parseInt(l,10)),m.setMonth(u),m.setDate(parseInt(d,10));let f=m.getTime(),_=0;for(;Ie.getDayOfWeek(f)!==0&&(_++,f=Ie.addDays(f,-1),!(_>100)););this.fromDateString=Ie.format(f,"yyyy-MM-dd")}editArtist(i){if(this.loginService.isBackoffice()){let r=this.dialogService.showComponentDialog(Xy,null,{minHeight:"95vh",minWidth:"95vw"});r.componentInstance.setData(i),r.afterClosed().subscribe(s=>{s&&this.loadData()})}}selectDuration(){return O(this,null,function*(){return yield za.waitForObj(()=>this.artists.length>0),new Promise((i,r)=>O(this,null,function*(){let s=[{text:"0:30",value:.5},{text:"1:00",value:1},{text:"1:30",value:1.5},{text:"2:00",value:2},{text:"2:30",value:2.5},{text:"3:00",value:3},{text:"4:00",value:4},{text:"5:00",value:5},{text:"6:00",value:6},{text:"7:00",value:7},{text:"10:00",value:10}],o=yield this.dialogService.showButtonChooser({buttonRows:[s],title:"Wie lange dauert es?",text:"",minWidth:"80%",value:"",hideBackButton:!0});typeof o!="string"&&o?.value?(this.duration=o.value,this.loadData(),i(o.value)):i(void 0)}))})}freeArtistClicked(i){return O(this,null,function*(){let r="Villa";this.configService.config.value.studiosWithoutSideCash.length===1&&(r=this.configService.config.value.studiosWithoutSideCash[0].name);let s={date:i.dateString,timeFrom:this.minTimeFrom,timeTill:this.freeArtistEndTime,studio:r};this.dialogRef?this.dialogRef.close({event:s,artistName:"Artist offen",studio:r}):this.dialogService.showOk("termin anlegen hier \xF6ffnen...")})}setDuration(i){this.duration=i,this.loadData()}copyText(){let i={};for(let l of this.dataFiltered.days)if(l.dateString.dateParse()>Date.now())for(let c of l.artists)i[c.name]||(i[c.name]=[]),c.freeTimeWindows.forEach(d=>{d.dateString=l.dateString}),i[c.name].push(...c.freeTimeWindows);let r=Object.keys(i).sort(),s={};for(let l of r)s[l]=m3.groupObjectArray(i[l],"dateString");let o=["Folgende Termine kann ich dir anbieten:"];for(let l of r){let c=["bei "+l];c.push(encodeURI("https://artists.nxt-lvl.ink/#/artists/"+l));for(let d of Object.keys(s[l]))if(s[l][d].length===1)c.push("    am "+d.dateParse().dateFormat("EEE dd.MM.yyyy")+" um "+s[l][d][0].startTimeString+" Uhr");else{c.push("    am "+d.dateParse().dateFormat("EEE dd.MM.yyyy"));for(let u of s[l][d])c.push("       um "+u.startTimeString+" Uhr")}o.push(c.join(`
`))}let a=o.join(`

`);this.dialogService.showOk(a),this.clipboard.copy(a)}test(){debugger}artistFilterTextChanged(){this.setFilter()}setFilter(){this.dataFiltered=so(this.data),this.dataFiltered?.days&&this.dataFiltered.days.forEach(i=>{i.artists=i.artists.filter(r=>r.name.toLowerCase().includes(this.artistFilterText.toLowerCase()))})}boolSkillChanged(i){this.loadData()}skillChanged(i){return O(this,null,function*(){i==="Portrait"&&this.currentSkillFilterObj[i]&&(this.currentBoolSkillFilterObj["Portrait 1zu1"]||(yield this.dialogService.showYesNo(`Ist es ein 1zu1 Portrait (mit Wiedererkennungswert)?

Ja: Ber\xFChmte Person, Familienmitglied, etc

Nein: Einfach nur eine h\xFCbsche Frau, etc.`,{}))&&(this.currentBoolSkillFilterObj["Portrait 1zu1"]=!0)),i==="Tiere"&&this.currentSkillFilterObj[i]&&(this.currentBoolSkillFilterObj["Tier-Portrait 1zu1"]||(yield this.dialogService.showYesNo(`Ist es ein 1zu1 Tier-Portrait (mit Wiedererkennungswert)?

Ja: Eigener Hund, eigene Katze, etc

Nein: Einfach nur irgendein Hund, etc.`,{}))&&(this.currentBoolSkillFilterObj["Portrait 1zu1"]=!0)),this.loadData()})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Fi),R(cc),R(vt),R(QA),R(Xi),R(Gt,8),R(_u))},e.\u0275cmp=_e({type:e,selectors:[["nxt-event-finder"]],standalone:!0,features:[et,xe],decls:43,vars:18,consts:[[1,"nxt-page","nxt-text",2,"border","0px solid red"],["class","close-button mouse-pointer",3,"click",4,"ngIf"],["fxFlex","","fxLayout","column",2,"border","0px solid blue","overflow","hidden"],["fxLayout","row"],["fxLayout","row","fxLayoutAlign","start center","fxLayoutGap","1em"],["fxLayout","row","fxLayoutAlign","center center"],[2,"width","305px",3,"nxtModelChange","showJumpWeekButtons","nxtModel","showWeekStart"],["fxLayout","column","fxFlex","400px","fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","center center",1,"w-full"],[1,"mouse-pointer",3,"click"],["fxFlex","","min","0.5","max","10","step","0.5"],["matSliderThumb","",3,"ngModelChange","valueChange","ngModel"],["fxFill","","fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","0.5em"],[2,"min-width","70px",3,"click","smallButton"],[3,"click"],["placeholder","Artist",3,"valueChange","value"],["fxLayout","row","fxLayoutAlign","center end",1,"o-hidden",2,"border","0px solid blue"],[1,"mouse-pointer",2,"padding-bottom","0.5em",3,"click"],["fxFlex","","fxLayout","column"],["fxLayout","row","fxLayoutAlign","start center","class","nxt-text","style","border: 0px solid green; overflow: auto",4,"ngFor","ngForOf"],["fxLayout","row","fxFlex","",1,"o-hidden",2,"border","0px solid red"],["fxFlex","","fxLayout","row",1,"nxt-text",2,"border","0px solid green","overflow","auto"],["fxFlex","","class","day-table",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-around","class","h-100",4,"ngIf"],[1,"close-button","mouse-pointer",3,"click"],["fxLayout","row","fxLayoutAlign","start center",1,"nxt-text",2,"border","0px solid green","overflow","auto"],["fxFlex","","fxLayout","row","fxLayoutAlign","space-between center",2,"padding-left","1em","padding-right","1em"],["fxLayoutAlign","center center","fxLayout","row"],["style","padding-right: 1em","class","mouse-pointer",3,"click",4,"ngIf"],["matTooltip","Kein Tag","class","mouse-pointer",3,"click",4,"ngIf"],["matTooltip","Alle Tag","class","mouse-pointer",3,"click",4,"ngIf"],["label","Mo.",3,"valueChange","value"],["label","Di.",3,"valueChange","value"],["label","Mi.",3,"valueChange","value"],["label","Do.",3,"valueChange","value"],["label","Fr.",3,"valueChange","value"],["label","Sa.",3,"valueChange","value"],["label","So.",3,"valueChange","value"],["fxFlex","25","fxLayoutAlign","center center"],["fxFlex","","step","0.5",3,"min","max"],["fxFlex","","min","18","step","0.5",3,"max"],[1,"mouse-pointer",2,"padding-right","1em",3,"click"],["matTooltip","Kein Tag",1,"mouse-pointer",3,"click"],["matTooltip","Alle Tag",1,"mouse-pointer",3,"click"],["fxFlex","",1,"day-table"],[4,"ngFor","ngForOf"],[1,"h-full"],["style","vertical-align: top",4,"ngFor","ngForOf"],[1,"flex","flex-col","justify-start"],[1,"date-block",3,"innerHTML"],[1,"daily-notes"],[1,"daily-note"],[2,"vertical-align","top"],[1,"artist-table",2,"width","100%"],["style","height: 1px",4,"ngFor","ngForOf"],[1,"time-window-button","mouse-pointer",2,"width","min-content",3,"click"],[2,"height","1px"],[1,"mouse-pointer",2,"padding","0","height","inherit",3,"dblclick"],[1,"flex","flex-row","h-full","items-center"],[2,"height","100%","width","10px","margin-right","5px",3,"ngStyle"],[1,"flex","flex-col","w-full"],["icon","star",3,"value","showEmpty",4,"ngIf"],[1,"text-80"],["style","border: 0 solid grey; overflow: hidden; position: relative",4,"ngIf"],["style","border: 0px solid grey; overflow: hidden; position: relative; margin-top:0px;",4,"ngIf"],[1,"time-window-table"],["icon","star",3,"value","showEmpty"],[2,"border","0 solid grey","overflow","hidden","position","relative"],[3,"ngStyle"],[2,"position","absolute","left","0","top","0","font-size","75%","color","#808080"],[2,"border","0px solid grey","overflow","hidden","position","relative","margin-top","0px"],["icon","euro",3,"minValue","value","showEmpty","showHalf"],[2,"position","absolute","left","0","top","0","font-size","75%","color","gray"],["fxLayout","column","fxLayoutAlign","space-around",1,"h-100"],["fxLayout","row","fxLayoutAlign","center"],[1,"text-120"],[1,"scrollable","h-full"],[3,"valueChange","value"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,hni,3,0,"div",1),h(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"nxt-date-picker",6),Xe("nxtModelChange",function(a){return Ze(s.fromDateString,a)||(s.fromDateString=a),a}),F("nxtModelChange",function(){return s.dateChanged()}),p()(),h(7,"div",7)(8,"div",8)(9,"div",9),F("click",function(){return s.selectDuration()}),y(10,"Dauer"),p(),y(11," \xA0\xA0 "),h(12,"mat-slider",10)(13,"input",11),Xe("ngModelChange",function(a){return Ze(s.duration,a)||(s.duration=a),a}),F("valueChange",function(){return s.durationChanged()}),p()(),h(14,"div"),y(15),Ce(16,"duration"),p()(),h(17,"div",12)(18,"nxt-button",13),F("click",function(){return s.setDuration(.5)}),y(19,"0.5"),p(),h(20,"nxt-button",13),F("click",function(){return s.setDuration(1)}),y(21,"1"),p(),h(22,"nxt-button",13),F("click",function(){return s.setDuration(2)}),y(23,"2"),p(),h(24,"nxt-button",13),F("click",function(){return s.setDuration(3)}),y(25,"3"),p(),h(26,"nxt-button",13),F("click",function(){return s.setDuration(7)}),y(27,"7"),p()()(),h(28,"div")(29,"nxt-button-icon",14),F("click",function(){return s.copyText()}),y(30,"content_copy"),p()(),h(31,"div")(32,"nxt-input",15),Xe("valueChange",function(a){return Ze(s.artistFilterText,a)||(s.artistFilterText=a),a}),F("valueChange",function(){return s.artistFilterTextChanged()}),p()()()(),h(33,"div",16)(34,"div",17),F("click",function(){return s.addFilter()}),h(35,"mat-icon"),y(36,"add"),p()(),h(37,"div",18),W(38,gni,37,23,"div",19),p()(),h(39,"div",20)(40,"div",21),W(41,Dni,5,2,"table",22),p(),W(42,kni,9,2,"div",23),p()()()),r&2&&(g(),b("ngIf",s.dialogRef),g(5),b("showJumpWeekButtons",!0),qe("nxtModel",s.fromDateString),b("showWeekStart",!0),g(7),qe("ngModel",s.duration),g(2),ye(Nt(16,15,s.duration*36e5,"HH:mm")),g(3),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(6),qe("value",s.artistFilterText),g(6),b("ngForOf",s.filters),g(3),b("ngIf",s.data),g(),b("ngIf",s.data))},dependencies:[Ct,Zr,At,Yt,$r,oi,lPe,qi,tl,M5,k5,ko,mu,Ko,Dp,Lt,Hi,H1,an,Yi,dl,rr,Dn,rs,XA,Nn,lf],styles:[".nxt-page[_ngcontent-%COMP%]{background-color:#333!important}.daily-notes[_ngcontent-%COMP%]{background-color:#222;color:#ccc;margin:5px;border-radius:4px}.day-table[_ngcontent-%COMP%]{border-collapse:collapse;font-size:90%;border:1px solid red;border-radius:10px}.day-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{vertical-align:top;font-size:120%}.day-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .day-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{width:14.2%;border:1px solid #b7860f}.artist-table[_ngcontent-%COMP%]{border-collapse:collapse;border-left:hidden;border-right:hidden;border-top:hidden}.artist-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{width:auto;border:1px solid #b7860f;padding:4px 5px}.time-window-table[_ngcontent-%COMP%]{border-collapse:collapse}.time-window-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:0px solid gray;margin:2px;cursor:pointer;padding:1px}.time-window-button[_ngcontent-%COMP%], .time-window-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{margin:2px;padding:5px 8px;background-color:#a2a2a2;color:#000;border-radius:4px;white-space:nowrap;text-align:center}.close-button[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px}"]});let t=e;return t})()});var uz,dve=Q(()=>{uz=function(t){return t.Open="open",t.Assigned="assigned",t.Canceled="canceled",t.PayoutReady="payout-ready",t.PaidOut="paid-out",t}(uz||{})});var Ini,UX,uve=Q(()=>{ng();me();me();Ini=["*"],UX=(()=>{let e=class e{growDoneEvent(i){this.widthChanged.emit()}constructor(i){this.element=i,this.duration=.5,this.hideOnFalse=!1,this.widthChanged=new nt,this.startOpacity=1,this.firstChange=!0}ngOnChanges(i){if(i.trigger){if(this.firstChange){this.firstChange=!1;return}this.startWidth=this.element.nativeElement.clientWidth,requestAnimationFrame(()=>{this.grow={value:this.trigger,params:{startWidth:this.startWidth,duration:this.duration}}})}}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-smooth-width"]],hostVars:1,hostBindings:function(r,s){r&1&&C8("@grow.done",function(a){return s.growDoneEvent(a)}),r&2&&_y("@grow",s.grow)},inputs:{trigger:"trigger",hide:"hide",duration:"duration",hideOnFalse:"hideOnFalse"},outputs:{widthChanged:"widthChanged"},standalone:!0,features:[yn,xe],ngContentSelectors:Ini,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},styles:["[_nghost-%COMP%]{display:block;overflow:hidden}"],data:{animation:[Nd("grow",[cl("void <=> *",[]),cl("* <=> *",[So({width:"{{startWidth}}px",overflow:"hidden"}),Ml("{{duration}}s ease")],{params:{startWidth:0,endWidth:0}})])]}});let t=e;return t})()});var yje,_je=Q(()=>{me();yje=(()=>{let e=class e{constructor(i){this.element=i}ngOnInit(){}ngOnDestroy(){}ngOnChanges(i){i?.nxtHideHeight?.currentValue?this.element.nativeElement.classList.add("nxt-hide-height"):this.element.nativeElement.classList.remove("nxt-hide-height")}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","nxtHideHeight",""]],inputs:{nxtHideHeight:"nxtHideHeight"},standalone:!0,features:[yn]});let t=e;return t})()});function Lni(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(3);g(),Ke("Promoter: ",n.promoOfferPromoterName,"")}}function Oni(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"nxtDate"),Ce(3,"fromNowText"),p()),t&2){let n=w(3);g(),cn("Erstellt: ",Nt(2,2,n.promoOfferCreatedAt,"dd.MM.yyyy HH:mm"),"\xA0",tt(3,5,n.promoOfferCreatedAt),"")}}function Nni(t,e){if(t&1&&(h(0,"div",36),W(1,Lni,2,1,"div",40)(2,Oni,4,7,"div",40),p()),t&2){let n=w(2);g(),b("ngIf",n.promoOfferPromoterName),g(),b("ngIf",n.promoOfferCreatedAt)}}function Vni(t,e){if(t&1){let n=re();h(0,"div",41)(1,"nxt-button",35),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.generateStaticPromoCode(r))}),y(2),p()()}if(t&2){let n=e.$implicit;g(),b("smallButton",!0),g(),ye(n.name)}}function Bni(t,e){if(t&1){let n=re();h(0,"div",32)(1,"div",33)(2,"nxt-input",34,4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.promoCode,r)||(s.promoCode=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.promoCodeChanged())}),p(),h(4,"nxt-button",35),F("click",function(){V(n);let r=w();return B(r.startPromoCode())}),y(5,"Anwenden"),p()(),W(6,Nni,3,2,"div",36),ee(7,"br")(8,"br")(9,"br"),h(10,"div",37)(11,"div",38),y(12,"#Feste Promo-Codes"),p(),W(13,Vni,3,2,"div",39),p()()}if(t&2){let n=w();g(2),b("disableFocusOnInit",!0),qe("value",n.promoCode),b("noPadding",!0),g(2),b("smallButton",!0),g(2),Je(n.promoOfferPromoterName||n.promoOfferCreatedAt?6:-1),g(7),b("ngForOf",n.discountPromotionsStaticCode)}}function zni(t,e){if(t&1){let n=re();h(0,"nxt-input",42,5),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.priceTill,r)||(s.priceTill=r),B(r)}),F("enter",function(){V(n);let r=w();return B(r.save())}),p()}if(t&2){let n=w();qe("value",n.priceTill),b("isMoney",!0)}}function Hni(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",43),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.discountPromotion.priceFix,r)||(s.discountPromotion.priceFix=r),B(r)}),y(1,"Fix-Preis"),p()}if(t&2){let n=w();qe("value",n.discountPromotion.priceFix)}}function Gni(t,e){if(t&1){let n=re();h(0,"nxt-button",30),F("click",function(){V(n);let r=w();return B(r.roundPrice())}),y(1,"Preis runden"),p()}}function Wni(t,e){if(t&1){let n=re();h(0,"div",44)(1,"nxt-button-icon",45),F("click",function(){V(n);let r=w();return B(r.changeArtistPercentage(!0))}),y(2,"add"),p(),h(3,"nxt-button-icon",45),F("click",function(){V(n);let r=w();return B(r.changeArtistPercentage(!1))}),y(4,"remove"),p()()}t&2&&(g(),b("smallHeight",!0),g(2),b("smallHeight",!0))}function Uni(t,e){if(t&1){let n=re();h(0,"div",44)(1,"nxt-button-icon",45),F("click",function(){V(n);let r=w();return B(r.changeArtistMoney(!0))}),y(2,"add"),p(),h(3,"nxt-button-icon",45),F("click",function(){V(n);let r=w();return B(r.changeArtistMoney(!1))}),y(4,"remove"),p()()}t&2&&(g(),b("smallHeight",!0),g(2),b("smallHeight",!0))}function jni(t,e){if(t&1){let n=re();h(0,"nxt-button",47),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.setArtistGetClicked(r))}),y(1),Ce(2,"money"),p()}if(t&2){let n=e.$implicit;b("smallButton",!0),g(),Ke("",Nt(2,2,n,!1)," ")}}function $ni(t,e){if(t&1&&(h(0,"div",28)(1,"mat-icon"),y(2,"arrow_downward"),p(),Kn(3,jni,3,5,"nxt-button",46,sa),p()),t&2){let n=w();g(3),Yn(n.artistGetButtonsLess())}}function Kni(t,e){if(t&1){let n=re();h(0,"nxt-button",47),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.setArtistGetClicked(r))}),y(1),Ce(2,"money"),p()}if(t&2){let n=e.$implicit;b("smallButton",!0),g(),Ke("",Nt(2,2,n,!1)," ")}}function Yni(t,e){if(t&1&&(h(0,"div",28)(1,"mat-icon"),y(2,"arrow_upward"),p(),Kn(3,Kni,3,5,"nxt-button",46,sa),p()),t&2){let n=w();g(3),Yn(n.artistGetButtonsMore())}}var Ani,Pni,Rni,Fni,Cje,xje=Q(()=>{me();Jr();kl();$A();Zh();Ld();Ci();s3();dve();ls();oo();uve();_je();UA();Zi();ri();Vt();go();B1();Il();Yc();Ja();me();ji();o1();Ci();jl();yi();Kr();Cs();Vt();Ani=["discountPromotionRadio"],Pni=["customDiscountInput"],Rni=["originalPriceInput"],Fni=["priceInput"];Cje=(()=>{let e=class e{constructor(i,r,s,o,a,l,c){this.dialogRef=i,this.cacheService=r,this.dialogService=s,this.permissionService=o,this.socketService=a,this.loginService=l,this.configService=c,this.priceFixWithoutDiscountPromotion=!1,this.smoothHeightTrigger=0,this.originalPrice=gt(null),this.price=gt(0),this.discount=10,this.artistGet=gt(0),this.showRoundPrice=!1,this.priceRoundValue=5,this.eventId="",this.promoOfferId="",this.promoOfferPromoterName="",this.noneDiscount={id:"none",name:"Kein Rabatt",discountPercentage:0},this.customDiscount={id:"custom",name:"Eigener Rabatt",discountPercentage:0},this.showSlider=!1,this.promoCode="",this.artistGetButtonsLess=vr(()=>{let d=this.price()>400?10:5,u=this.artistGet()-this.artistGet()%d,m=[];for(let f=0;f<5;f++)u-=d,u>=0&&m.push(u);return m.sort(Hr.arrayNumbers())}),this.artistGetButtonsMore=vr(()=>{let d=this.price()>400?10:5,u=this.artistGet()-this.artistGet()%d,m=[];for(let f=0;f<5;f++)u+=d,m.push(u);return m.sort(Hr.arrayNumbers())})}ngOnInit(){setTimeout(()=>{this.showSlider=!0},1),this.discountPromotions=[this.noneDiscount,...this.discountPromotions,this.customDiscount].sortNumber("createdAt"),this.discountPromotionsStaticCode=this.discountPromotions.filter(i=>i.staticPromoCode),this.discountPromotion?(this.discountPromotions=this.discountPromotions.filter(i=>i.id!==this.discountPromotion.id),this.discountPromotions.push(this.discountPromotion),this.setDiscountPromotion(this.discountPromotion,!0,!1)):(this.setDiscountPromotion(this.discountPromotions.find(i=>i.id==="none"),!0,!1),this.discountPromotion.priceFix=this.priceFixWithoutDiscountPromotion),this.calcArtist(!0)}save(){this.promoCode||(this.promoOfferId="",this.promoOfferPromoterName="",this.promoOfferCreatedAt=null),this.dialogRef.close({price:this.price(),discountPromotion:this.discountPromotion,artistPercentage:fn.round(this.artistPercentage,5),priceTill:this.priceTill,promoOfferId:this.promoOfferId,promoOfferPromoterName:this.promoOfferPromoterName,promoOfferCreatedAt:this.promoOfferCreatedAt})}cancel(){this.dialogRef.close()}setDiscountPromotion(i,r,s){return O(this,null,function*(){if(i.onlyWithPromoCode&&s){yield this.dialogService.showOk("Dieser Rabatt ist nur mit einem Promo-Code m\xF6glich"),requestAnimationFrame(()=>{this.discountPromotionRadio.setValue(this.discountPromotion)});return}this.discountPromotion=i,this.smoothHeightTrigger=Math.random(),this.discount=this.discountPromotion?.discountPercentage,this.discountPromotion&&(this.discountPromotion.priceFixValue&&this.price.set(this.discountPromotion.priceFixValue),r&&this.currentPriceEstimatedFrom&&this.price.set(this.currentPriceEstimatedFrom)),i.artistGet&&!r&&setTimeout(()=>{this.artistGet.set(i.artistGet),this.artistPercentage=this.artistGet()/this.price()*100},200),i.priceLike&&(this.discountPromotion.priceFix=!1),this.priceChanged(r),this.setFocus(r),r?this.promoCode=this.promoOfferId:this.promoOfferId=""})}test(){this.priceInput?.setFocus(),setTimeout(()=>this.priceInput?.select(),200)}setFocus(i){setTimeout(()=>{requestAnimationFrame(()=>{i?this.priceInput?.setFocus():this.discountPromotion.id==="custom"?(this.customDiscountInput?.setFocus(),this.customDiscountInput?.select()):this.discountPromotion.discountPercentage>0?this.originalPriceInput?.setFocus():this.discountPromotion.priceFixValue?this.originalPriceInput?.setFocus():this.priceInput?.setFocus()})},200)}priceChanged(i){this.originalPrice.set(fn.roundMoney(this.price()/(100-this.discount)*100)),Gn.info('Der "Preis" hat sich ge\xE4ndert, der "Original-Preis" wird auf '+this.originalPrice().toMoneyString()+" ge\xE4ndert"),this.calcArtist(i)}originalPriceChanged(){this.discountPromotion.priceFixValue?(this.artistGet.set(this.originalPrice()/2),Gn.info('Der "Original-Preis" hat sich ge\xE4ndert, es ist ein Fix-Preis, "Artist bekommt" wird auf  '+this.artistGet().toMoneyString()+" ge\xE4ndert"),this.calcArtist(!1)):(this.price.set(fn.roundMoney(this.originalPrice()/100*(100-this.discount))),Gn.info('Der "Original-Preis" hat sich ge\xE4ndert, es ist kein FixPreis, der "Preis" wird auf '+this.price().toMoneyString()+" ge\xE4ndert"),this.calcArtist(!1))}customDiscountChanged(){this.discount>30&&(this.discount=0),this.discountPromotion.discountPercentage=this.discount,this.price.set(fn.roundMoney(this.originalPrice()/100*(100-this.discount))),this.calcArtist(!1)}calcArtist(i){if(i)this.artistGet.set(fn.roundMoney(this.price()/100*this.artistPercentage)),this.initArtistPercentage=this.artistPercentage;else{this.originalPrice()===1/0&&this.originalPrice.set(this.price()),Es.isNumber(this.initArtistPercentage)?this.artistGet.set(this.originalPrice()/100*this.initArtistPercentage):this.artistGet.set(this.originalPrice()/2),this.artistGet.set(Math.round(this.artistGet()/(this.priceRoundValue/2))*(this.priceRoundValue/2));let s=this.artistGet()/this.price()*100;Number.isNaN(s)&&(s=0),s>100?this.artistPercentage=100:this.artistPercentage=s}this.calcShowRoundPrice(),i||this.calcArtistDownIfPossible()}roundPrice(){let i=Math.round(this.price()/this.priceRoundValue)*this.priceRoundValue;i!==this.price()&&(this.price.set(i),this.priceChanged(!1),this.showRoundPrice=!1)}calcShowRoundPrice(){xg.clear(this.calcShowRoundPriceTimeout),this.calcShowRoundPriceTimeout=setTimeout(()=>{this.showRoundPrice=this.price()%this.priceRoundValue>0},500)}typeof(i){return typeof i}isOk(){return Es.isNumberAndNotNaN(this.price())&&Es.isNumberAndNotNaN(this.originalPrice())&&Es.isNumberAndNotNaN(this.artistGet())&&Es.isNumberAndNotNaN(this.artistPercentage)}changeArtistPercentage(i){let r=this.artistPercentage+10*(i?1:-1);r>100?r=100:r<0&&(r=0),this.artistPercentage=r,this.artistGet.set(fn.roundMoney(this.price()*this.artistPercentage/100)),this.initArtistPercentage=void 0}changeArtistMoney(i){let r=this.priceRoundValue/2;this.price()>=100&&(r=this.priceRoundValue),this.artistGet()%r>0&&(r=this.artistGet()%r);let s=this.artistGet()+r*(i?1:-1);s<=this.price()&&s>=0&&(this.artistGet.set(s),this.artistPercentage=this.artistGet()/this.price()*100),this.initArtistPercentage=void 0}setArtistGet(){return O(this,null,function*(){if(this.artist?.employed)return;let i=yield this.dialogService.showInput({message:"Artist bekommt",prompt:this.artistGet(),isMoney:!0,selectPrompt:!0});Es.isNumber(i)&&(this.artistGet.set(i),this.artistPercentage=this.artistGet()/this.price()*100,this.initArtistPercentage=void 0)})}startPromoCode(){return O(this,null,function*(){this.promoCode=this.promoCode.toUpperCase().replaceAll("O","0").trim();let i=yield this.socketService.getPromoByOfferId(this.promoCode);if(i.offer&&i.offer.state===uz.Assigned){this.dialogService.showOk('Der Promo-Code "'+this.promoCode.toUpperCase()+'" wurde bereits f\xFCr einen Termin am '+i.offer.assignments[0].eventStart.dateFormat("dd.MM.yyyy HH:mm")+` eingel\xF6st
`);return}if(i.discountPromotion){let r=this.discountPromotions.find(s=>s.id===i.discountPromotion.id);if(r){if(!this.isNewEvent&&i.offer.createdAt>this.eventCreatedAt){let s="Der Rabatt wurde nach dem erstellen des Termins erstellt!";if(s+=`
Termin erstellt: `+this.eventCreatedAt.dateFormat("dd.MM.yyyy HH:mm")+" "+this.eventCreatedAt.dateDiffToNowText(),s+=`
Code erstellt: `+i.offer.createdAt.dateFormat("dd.MM.yyyy HH:mm")+" "+i.offer.createdAt.dateDiffToNowText(),s+=`

Promoter: `+i.offer.promoterName,!(yield this.dialogService.showYesNo(s,{yesText:"Trotzdem anwenden",noText:"Abbrechen"})))return}this.setDiscountPromotion(r,!1,!1),this.promoOfferId=i.offer.id.toUpperCase(),this.promoCode=i.offer.id.toUpperCase(),this.promoOfferPromoterName=i.offer.promoterName,this.promoOfferCreatedAt=i.offer.createdAt}else this.dialogService.showOk("Der Rabatt ist nicht aktiviert")}})}calcArtistDownIfPossible(){if(this.discountPromotion&&this.discountPromotion.discountPercentage>0){let i=100-(100-this.discountPromotion.discountPercentage)*.5,s=(this.artistGet()-2.5)/this.price()*100;s+1.5>=i&&s>50&&(this.artistGet.update(o=>o-2.5),this.artistPercentage=s,this.calcShowRoundPrice(),this.calcArtistDownIfPossible())}}generateStaticPromoCode(i){return O(this,null,function*(){this.dialogService.showLoading(_n.GeneratePromoCode,"Promo-Code f\xFCr "+i.name+" wird erstellt...");let r=yield this.socketService.generateStaticPromoCode(i);this.dialogService.hideLoading(_n.GeneratePromoCode),this.promoCode=r.id,setTimeout(()=>{this.startPromoCode()})})}promoCodeChanged(){this.promoCode!==this.promoCode.toUpperCase()&&(this.promoCode=this.promoCode.toUpperCase())}setArtistGetClicked(i){this.artistGet.set(i),this.artistPercentage=this.artistGet()/this.price()*100}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(cc),R(vt),R(ws),R(lt),R(Fi),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-price-input"]],viewQuery:function(r,s){if(r&1&&(ei(Ani,5),ei(Pni,5),ei(Rni,5),ei(Fni,5)),r&2){let o;Pt(o=Rt())&&(s.discountPromotionRadio=o.first),Pt(o=Rt())&&(s.customDiscountInput=o.first),Pt(o=Rt())&&(s.originalPriceInput=o.first),Pt(o=Rt())&&(s.priceInput=o.first)}},standalone:!0,features:[xe],decls:39,vars:37,consts:[["discountPromotionRadio",""],["customDiscountInput",""],["originalPriceInput",""],["priceInput",""],["promoCodeInput",""],["priceTillInput",""],["fxLayout","column",1,"w-full"],[1,"text-120","pb-2"],["fxLayout","row","fxLayoutAlign","space-around center",1,"py-2"],["fxLayout","column",4,"ngIf"],[1,"text-80"],["tabIndex","-1","textKey","name",3,"valueChange","value","options"],["fxLayout","row"],[1,"w-full",3,"trigger"],["fxFlex","","placeholder","Rabatt %",3,"valueChange","keyup","disableFocusOnInit","nxtHideHeight","value","isPercent"],["placeholder","Original Preis",3,"keyup","valueChange","value","disableFocusOnInit","nxtHideHeight","isMoney","selectOnFocus"],["fxLayout","row","fxLayoutGap","15px",1,"w-full"],["fxFlex","",3,"keyup","valueChange","enter","value","isMoney","placeholder","readonly","selectOnFocus"],[3,"trigger"],["class","price-till-input","placeholder","Preis bis",3,"value","isMoney","valueChange","enter",4,"ngIf"],[3,"value","valueChange",4,"ngIf"],[3,"click",4,"ngIf"],["fxLayout","row","fxLayoutGap","15px",1,"py-4"],["fxFlex","","placeholder","Artist %",3,"valueChange","value","bottomNoPadding","isPercent","readonly"],["fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],[1,"flex","flex-col"],["fxFlex","","placeholder","Artist bekommt",3,"click","value","bottomNoPadding","isMoney","readonly"],[1,"flex","gap-1","flex-col"],[1,"flex","flex-row","w-full","justify-start","gap-1"],["fxLayout","row","fxLayoutAlign","space-around",1,"pt-4","w-full"],[3,"click"],[3,"click","disabled"],["fxLayout","column"],[1,"flex","flex-row","items-center","gap-3"],["fxFlex","","placeholder","Promo-Code",3,"valueChange","disableFocusOnInit","value","noPadding"],[3,"click","smallButton"],[1,"flex","flex-col","mt-2"],["fxLayout","column","fxLayoutAlign","start center",1,"w-full"],[1,"pb-2"],["class","p-2",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"p-2"],["placeholder","Preis bis",1,"price-till-input",3,"valueChange","enter","value","isMoney"],[3,"valueChange","value"],["fxLayout","column","fxLayoutAlign","center center"],[3,"click","smallHeight"],[1,"artist-price-button",3,"smallButton"],[1,"artist-price-button",3,"click","smallButton"]],template:function(r,s){if(r&1){let o=re();h(0,"div",6)(1,"div",7),y(2,"Preiseingabe"),p(),h(3,"div",8),W(4,Bni,14,6,"div",9),h(5,"div",10)(6,"nxt-radio",11,0),F("valueChange",function(l){return V(o),B(s.setDiscountPromotion(l,!1,!0))}),p()()(),h(8,"div",12)(9,"nxt-smooth-height",13)(10,"nxt-input",14,1),Xe("valueChange",function(l){return V(o),Ze(s.discount,l)||(s.discount=l),B(l)}),F("keyup",function(){return V(o),B(s.customDiscountChanged())}),p()()(),h(12,"div",12)(13,"nxt-smooth-height",13)(14,"nxt-input",15,2),F("keyup",function(){return V(o),B(s.originalPriceChanged())})("valueChange",function(l){return V(o),B(s.originalPrice.set(l))}),p()()(),h(16,"div",16)(17,"nxt-input",17,3),F("keyup",function(){return V(o),B(s.priceChanged(!1))})("valueChange",function(l){return V(o),B(s.price.set(l))})("enter",function(){return V(o),B(s.save())}),p(),h(19,"nxt-smooth-width",18),W(20,zni,2,2,"nxt-input",19),p(),W(21,Hni,2,1,"nxt-slide-toggle",20),h(22,"nxt-smooth-width",18),W(23,Gni,2,0,"nxt-button",21),p()(),h(24,"div",22)(25,"nxt-input",23),Xe("valueChange",function(l){return V(o),Ze(s.artistPercentage,l)||(s.artistPercentage=l),B(l)}),p(),W(26,Wni,5,2,"div",24),h(27,"div",25)(28,"div")(29,"nxt-input",26),F("click",function(){return V(o),B(s.setArtistGet())}),p(),W(30,Uni,5,2,"div",24),p(),h(31,"div",27),W(32,$ni,5,0,"div",28)(33,Yni,5,0,"div",28),p()()(),h(34,"div",29)(35,"nxt-button",30),F("click",function(){return V(o),B(s.cancel())}),y(36,"Abbrechen"),p(),h(37,"nxt-button",31),F("click",function(){return V(o),B(s.save())}),y(38,"\xDCbernehmen"),p()()()}r&2&&(g(4),b("ngIf",s.configService.config.value.studioRegion==="MA"||s.configService.config.value.studioRegion==="DU"),g(2),b("value",s.discountPromotion)("options",s.discountPromotions),g(3),b("trigger",s.discountPromotion==null?null:s.discountPromotion.id),g(),b("disableFocusOnInit",!0)("nxtHideHeight",(s.discountPromotion==null?null:s.discountPromotion.id)!=="custom"),qe("value",s.discount),b("isPercent",!0),g(3),b("trigger",s.discountPromotion==null?null:s.discountPromotion.id),g(),b("value",s.originalPrice())("disableFocusOnInit",!0)("nxtHideHeight",(s.discountPromotion==null?null:s.discountPromotion.id)==="none")("isMoney",!0)("selectOnFocus",!0),g(3),b("value",s.price())("isMoney",!0)("placeholder",s.discountPromotion.priceFix?"Fixpreis":"Preis von")("readonly",!!s.discountPromotion.priceFixValue)("selectOnFocus",!0),g(2),b("trigger",s.discountPromotion.priceFix),g(),b("ngIf",!s.discountPromotion.priceFix),g(),b("ngIf",s.showSlider),g(),b("trigger",s.showRoundPrice),g(),b("ngIf",s.showRoundPrice),g(2),qe("value",s.artistPercentage),b("bottomNoPadding",!0)("isPercent",!0)("readonly",!0),g(),b("ngIf",!s.artist||!s.artist.employed),g(3),b("value",s.artistGet())("bottomNoPadding",!0)("isMoney",!0)("readonly",!0),g(),b("ngIf",!s.artist||!s.artist.employed),g(2),Je(s.artistGetButtonsLess().length>0?32:-1),g(),Je(s.artistGetButtonsMore().length>0?33:-1),g(4),b("disabled",!s.isOk()))},dependencies:[At,Yt,$r,oi,qi,Ct,Yi,Lt,Hi,tm,A5,yje,UX,Nn,an,Hn,ld,ks,Zr],styles:["[_nghost-%COMP%]{display:flex;min-width:700px;width:700px}.out-test[_ngcontent-%COMP%]{max-height:50px;height:50px}.out-test[hide][_ngcontent-%COMP%]{display:block;max-height:0px;transition:max-height 1.25s ease-in}.artist-price-button[_ngcontent-%COMP%]{min-width:48px!important}"]});let t=e;return t})()});function Zni(t,e){if(t&1&&ee(0,"nxt-rate-icons",16),t&2){let n=w().$implicit;b("value",n.skillFiltered.skill/2)}}function Xni(t,e){if(t&1&&(h(0,"div",17),y(1),Ce(2,"duration"),Ce(3,"duration"),p()),t&2){let n=e.$implicit,i=w(3);b("ngStyle",sn(9,qni,i.timeWindowColors[n.id])),g(),cn(" ",Nt(2,3,n.startTime,"HH:mm"),"\xA0-\xA0",Nt(3,6,n.endTime,"HH:mm")," ")}}function Qni(t,e){if(t&1){let n=re();h(0,"tr")(1,"td")(2,"div",12)(3,"div"),y(4),p(),W(5,Zni,1,1,"nxt-rate-icons",13),p()(),h(6,"td"),W(7,Xni,4,11,"div",14),p(),h(8,"td")(9,"div",15)(10,"nxt-button-icon",5),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.useArtist(r))}),y(11,"done"),p()()()()}if(t&2){let n=e.$implicit,i=w(2);g(4),ye(n.name),g(),b("ngIf",i.showArtistSkill),g(2),b("ngForOf",n.freeTimeWindows)}}function Jni(t,e){if(t&1&&(h(0,"div",6)(1,"div",7)(2,"div"),y(3),p()(),h(4,"div",8)(5,"div",9)(6,"table",10)(7,"tr")(8,"th"),y(9,"Artist"),p(),h(10,"th"),y(11,"Verf\xFCgbar"),p(),h(12,"th"),y(13,"Ausw\xE4hlen"),p()(),W(14,Qni,12,3,"tr",11),p()()()()),t&2){let n=w();g(3),ye(n.title),g(11),b("ngForOf",n.availableArtists)}}function eri(t,e){t&1&&(h(0,"div",18)(1,"div"),y(2,"Artist werden geladen..."),p()())}function tri(t,e){t&1&&(h(0,"div",18)(1,"div"),y(2,"kein Artist verf\xFCgbar"),p()())}function iri(t,e){if(t&1){let n=re();h(0,"div",19)(1,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.infoToJulian())}),y(2,"das kann nicht sein, info an Julian"),p()()}}var qni,bje,wje=Q(()=>{zn();jo();jc();Ul();o2();Lv();Zi();il();ls();An();HX();ri();Vt();me();yi();ji();Kr();Cs();Vt();An();qni=t=>({color:t});bje=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.dialogRef=r,this.loginService=s,this.configService=o,this.loading=!1,this.title="",this.startTime="",this.timeWindowColors={},this.showTest=!0,this.showArtistSkill=!1}ngOnInit(){}load(i){return O(this,null,function*(){this.showArtistSkill=i.boolSkillFilter.length>0||i.skillFilter.length>0,this.loading=!0,this.startTime=i.from,this.eventStart=Ie.parse(i.dateString+" "+i.from,"yyyy-MM-dd HH:mm"),this.eventEnd=Ie.parse(i.dateString+" "+i.till,"yyyy-MM-dd HH:mm"),this.title="Termin ist von "+this.eventStart.dateFormat("HH:mm")+" bis "+this.eventEnd.dateFormat("HH:mm"),this.eventId=i.eventId;let r=Ie.timeStringToDuration(i.till)/Qt.DURATION_1HOUR,s=this.configService.config.value.studioWorkStart/Qt.DURATION_1HOUR;this.eventFinderData={duration:this.eventEnd-this.eventStart,fromDateString:i.dateString,tillDateString:i.dateString,boolSkillFilter:i.boolSkillFilter,filters:[{startTime:s,studioEndTime:r,days:[!0,!0,!0,!0,!0,!0,!0]}],skillFilter:i.skillFilter,fillMissingDays:!1,forceLoadAllArtists:!0},this.result=yield this.socketService.eventFinder(this.eventFinderData),this.result.days.length>0?setTimeout(()=>{this.availableArtists=this.result.days[0].artists.filter(o=>o.freeTimeWindows.length>0),this.calcTimeWindows(),this.loading=!1},100):(this.availableArtists=[],this.loading=!1)})}useArtist(i){this.dialogRef.close(i.name)}calcTimeWindows(){let i=Qt.parse(this.eventStart.dateFormat("HH:mm")),r=Qt.parse(this.eventEnd.dateFormat("HH:mm"));for(let s of this.availableArtists)for(let o of s.freeTimeWindows)o.startTime<=i&&o.endTime>=r?o.startTime===i&&(this.timeWindowColors[o.id]=xn.Green):this.timeWindowColors[o.id]=xn.Red}infoToJulian(){return O(this,null,function*(){yield this.socketService.sendTelegramAdmin(this.loginService.getUsername()+' ist der Meinung, "Anderer Artist" funktioniert nicht'),yield za.sleep(200),yield this.socketService.sendTelegramAdmin(`Anfrage:
EventId: `+this.eventId+`
`+Qn.stringifyFormat(this.eventFinderData)),yield za.sleep(200),yield this.socketService.sendTelegramAdmin(`Antwort 1 result:
`+Qn.stringifyFormat(this.result))})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Gt,8),R(Fi),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-other-available-artists"]],standalone:!0,features:[xe],decls:8,vars:4,consts:[["fxLayout","column",2,"border","0px solid green","height","100%"],["fxLayout","column","style","border:0px solid yellow; overflow: hidden",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center","class","pt-3","nxtPermission","Admin",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center",1,"pt-3"],[3,"click"],["fxLayout","column",2,"border","0px solid yellow","overflow","hidden"],["fxLayout","row","fxLayoutAlign","center",1,"text-120","p-3",2,"border","0px solid blue"],["fxLayout","column","fxLayoutAlign","center center",2,"border","0px solid red","overflow-y","auto"],["fxFlex","","fxLayout","column",1,"h-100"],[1,"artists-table","h-100"],[4,"ngFor","ngForOf"],["fxLayout","column"],["icon","star",3,"value",4,"ngIf"],[3,"ngStyle",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center"],["icon","star",3,"value"],[3,"ngStyle"],["fxLayout","row"],["fxLayout","row","fxLayoutAlign","center","nxtPermission","Admin",1,"pt-3"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,Jni,15,2,"div",1)(2,eri,3,0,"div",2)(3,tri,3,0,"div",2)(4,iri,3,0,"div",3),h(5,"div",4)(6,"nxt-button",5),F("click",function(){return s.dialogRef.close()}),y(7,"schlie\xDFen"),p()()()),r&2&&(g(),b("ngIf",s.availableArtists),g(),b("ngIf",s.loading),g(),b("ngIf",s.availableArtists&&s.availableArtists.length===0),g(),b("ngIf",!1))},dependencies:[At,Yt,oi,qi,Ct,Hi,XA,rr,Dn,rs,an,Zs,Lt,lf],styles:[".artists-table[_ngcontent-%COMP%]{color:#bbb;border-collapse:collapse;border:1px solid #bbb}.artists-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .artists-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{width:auto;border:1px solid #bbb;padding:10px 20px}"]});let t=e;return t})()});function nri(t,e){t&1&&(h(0,"div",9),y(1,"Fotos werden geladen..."),p())}function rri(t,e){if(t&1&&(h(0,"div",10),y(1),p()),t&2){let n=w();g(),Ke("",n.photos.length," Fotos/Videos")}}function sri(t,e){if(t&1){let n=re();h(0,"div",11)(1,"img",12),F("click",function(){let r=V(n).$implicit,s=w();return B(s.triggerPhoto(r.id))}),p(),h(2,"nxt-checkbox",13),F("valueChange",function(r){let s=V(n).$implicit,o=w();return B(o.triggerPhoto(s.id,r))}),p(),h(3,"div",14),F("click",function(){let r=V(n).$implicit,s=w();return B(s.triggerPhoto(r.id))}),h(4,"div",15),y(5),p(),h(6,"div",15),y(7),Ce(8,"nxtDate"),p(),h(9,"div",15),y(10),p()()()}if(t&2){let n=e.$implicit,i=w();g(),b("src",n.imgSrc,Ur),g(),b("value",i.photosSelected[n.id]),g(3),ye(n.isImage?"Foto":"Video"),g(2),ye(Nt(8,5,n.photoCreatedAt,"dd.MM.yyyy HH:mm")),g(3),ye(n.appleDeviceName)}}function ori(t,e){if(t&1){let n=re();h(0,"nxt-button",6),F("click",function(){V(n);let r=w();return B(r.save())}),y(1,"1 Foto mit dem Termin verkn\xFCpfen"),p()}}function ari(t,e){if(t&1){let n=re();h(0,"nxt-button",6),F("click",function(){V(n);let r=w();return B(r.save())}),y(1),p()}if(t&2){let n=w();g(),Ke("",n.photosSelectedCount," Fotos mit dem Termin verkn\xFCpfen")}}function lri(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.delete())}),y(1,"1 Foto L\xF6schen"),p()}t&2&&b("smallButton",!0)}function cri(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.delete())}),y(1),p()}if(t&2){let n=w(2);b("smallButton",!0),g(),Ke("",n.photosSelectedCount," Fotos L\xF6schen")}}function dri(t,e){if(t&1&&(h(0,"div",16),W(1,lri,2,1,"nxt-button",17)(2,cri,2,2,"nxt-button",17),p()),t&2){let n=w();g(),b("ngIf",n.photosSelectedCount===1),g(),b("ngIf",n.photosSelectedCount>1)}}var jX,hve=Q(()=>{Zi();mg();ri();Vt();go();me();yi();ji();Ci();Vt();jX=(()=>{let e=class e{constructor(i,r,s){this.socketService=i,this.dialogRef=r,this.dialogService=s,this.photosSelected={},this.photosSelectedCount=0}ngOnInit(){return O(this,null,function*(){this.load()})}load(){return O(this,null,function*(){this.photos=yield this.socketService.getPhotoSyncUnknownUploadsNotFixed(),this.photos.forEach(i=>i.imgSrc="data:image/jpg;base64,"+i.thumbnail)})}save(){return O(this,null,function*(){let i=[];for(let r of Object.keys(this.photosSelected))this.photosSelected[r]&&i.push(r);i.length===0?this.dialogService.showOk("Du hast keine Bilder ausgew\xE4hlt"):(yield this.dialogService.showYesNo("M\xF6chtest du "+i.length+" Foto(s) verkn\xFCpfen?"))&&(yield this.socketService.updatePhotoSyncReimportUnknown(i,this.eventId,this.artist),this.dialogRef.close(),this.dialogService.showOk("Der Verkn\xFCpfen kann einen Augenblick dauern..."))})}triggerPhoto(i,r){typeof r=="boolean"?this.photosSelected[i]=r:this.photosSelected[i]=!this.photosSelected[i];for(let s of Object.keys(this.photosSelected))this.photosSelected[s]||delete this.photosSelected[s];this.photosSelectedCount=Object.keys(this.photosSelected).length}delete(){return O(this,null,function*(){let i=[];for(let r of Object.keys(this.photosSelected))this.photosSelected[r]&&i.push(r);(yield this.dialogService.showYesNo("M\xF6chtest du "+i.length+" Foto(s) wirklich l\xF6schen?"))&&(yield this.socketService.updatePhotoSyncReimportUnknownDelete(i),this.load())})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Gt,8),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-photo-unknown-uploads"]],inputs:{eventId:"eventId",artist:"artist"},standalone:!0,features:[xe],decls:11,vars:6,consts:[["fxLayout","column","fxLayoutAlign","center center",1,"w-full","h-100","o-hidden"],["class","pt-4",4,"ngIf"],["class","text-120",4,"ngIf"],["fxLayout","row","fxLayoutGap","5px",1,"scrollable","w-full","p-3"],["fxLayoutAlign","center center","style","position:relative; min-width: 200px",4,"ngFor","ngForOf"],[1,"p-3"],[3,"click"],[3,"click",4,"ngIf"],["class","pb-3",4,"ngIf"],[1,"pt-4"],[1,"text-120"],["fxLayoutAlign","center center",2,"position","relative","min-width","200px"],[1,"mouse-pointer",2,"height","300px",3,"click","src"],[2,"position","absolute","left","5px","top","5px","width","28px","height","28px","border-radius","4px","background-color","#0000006b",3,"valueChange","value"],["fxLayoutAlign","center center","fxLayout","column",1,"p-2",2,"position","absolute","bottom","0","background","rgba(0,0,0,0.5)","border-radius","4px 4px 0 0",3,"click"],[1,"mouse-pointer"],[1,"pb-3"],[3,"smallButton","click",4,"ngIf"],[3,"click","smallButton"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,nri,2,0,"div",1)(2,rri,2,1,"div",2),h(3,"div",3),W(4,sri,11,8,"div",4),p(),h(5,"div",5)(6,"nxt-button",6),F("click",function(){return s.dialogRef.close()}),y(7,"Abbrechen"),p(),W(8,ori,2,0,"nxt-button",7)(9,ari,2,1,"nxt-button",7),p(),W(10,dri,3,2,"div",8),p()),r&2&&(g(),b("ngIf",!s.photos),g(),b("ngIf",s.photos),g(2),b("ngForOf",s.photos),g(4),b("ngIf",s.photosSelectedCount===1),g(),b("ngIf",s.photosSelectedCount>1),g(),b("ngIf",s.photosSelectedCount>0))},dependencies:[At,Yt,$r,oi,Ct,Hi,H1,Lt,Hn],styles:["[_nghost-%COMP%]{display:flex;max-width:90vw}"]});let t=e;return t})()});function hri(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-slide-toggle",8),Xe("valueChange",function(r){let s=V(n).$implicit,o=w(2);return Ze(o.currentBoolSkills[s.description],r)||(o.currentBoolSkills[s.description]=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.valueChanged())}),y(2),p()()}if(t&2){let n=e.$implicit,i=w(2);g(),qe("value",i.currentBoolSkills[n.description]),g(),ye(n.description)}}function pri(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-slide-toggle",8),Xe("valueChange",function(r){let s=V(n).$implicit,o=w(2);return Ze(o.currentSkills[s.description],r)||(o.currentSkills[s.description]=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.valueChanged())}),y(2),p()()}if(t&2){let n=e.$implicit,i=w(2);g(),qe("value",i.currentSkills[n.description]),g(),ye(n.description)}}function mri(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2)(2,"div",3),y(3,"Stil"),p()(),h(4,"div",4),W(5,hri,3,2,"div",5),h(6,"div"),y(7,"\xA0"),p(),Kn(8,pri,3,2,"div",null,uri),p(),h(10,"div",6)(11,"nxt-button",7),F("click",function(){V(n);let r=w();return B(r.cancel())}),y(12,"Abbrechen"),p(),h(13,"nxt-button",7),F("click",function(){V(n);let r=w();return B(r.save())}),y(14,"OK"),p()()()}if(t&2){let n=w();g(5),b("ngForOf",n.availableSkills.boolSkills),g(3),Yn(n.availableSkills.skills)}}var uri,$X,pve=Q(()=>{Gi();pa();Zi();oo();Vt();ri();DD();me();ji();yi();Ci();Vt();uri=(t,e)=>e.description;$X=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.availableSkills={skills:R0.skills,boolSkills:R0.boolSkills},this.currentSkills={},this.currentBoolSkills={},this.originalSkills={},this.originalBoolSkills={},this.noChecks=!1}ngOnInit(){return O(this,null,function*(){this.originalSkills=Sr.clone(this.currentSkills),this.originalBoolSkills=Sr.clone(this.currentBoolSkills)})}nxtOnDestroy(){}valueChanged(){}save(){return O(this,null,function*(){this.clearValues();let i=oa(this.currentSkills),r=oa(this.currentBoolSkills);if(!this.noChecks){if(this.noChecks&&i.length===0&&r.length>0){this.dialogService.showOk('"'+r.join('" & "')+'" reicht nicht aus');return}if(this.currentSkills["kleine Tattoos"]&&oa(this.currentSkills).length===1){this.dialogService.showOk("Alleine nur Kleines Tattoo reicht nicht aus");return}!this.originalSkills.Portrait&&this.currentSkills.Portrait&&!this.currentBoolSkills["Portrait 1zu1"]&&(yield this.dialogService.showYesNo(`Ist es ein 1zu1 Portrait (mit Wiedererkennungswert)?

Ja: Ber\xFChmte Person, Familienmitglied, etc

Nein: Einfach nur eine h\xFCbsche Frau, etc.`,{}))&&(this.currentBoolSkills["Portrait 1zu1"]=!0),!this.originalSkills.Tiere&&this.currentSkills.Tiere&&!this.currentBoolSkills["Tier-Portrait 1zu1"]&&(yield this.dialogService.showYesNo(`Ist es ein 1zu1 Tier-Portrait (mit Wiedererkennungswert)?

Ja: Eigener Hund, eigene Katze, etc

Nein: Einfach nur irgendein Hund, etc.`,{}))&&(this.currentBoolSkills["Tier-Portrait 1zu1"]=!0),this.currentBoolSkills["Portrait 1zu1"]&&(this.currentSkills.Portrait=!0)}this.dialogRef.close({skills:this.currentSkills,boolSkills:this.currentBoolSkills})})}cancel(){this.dialogRef.close()}clearValues(){for(let i of Object.keys(this.currentSkills))this.currentSkills[i]||delete this.currentSkills[i];for(let i of Object.keys(this.currentBoolSkills))this.currentBoolSkills[i]||delete this.currentBoolSkills[i]}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-skill-select"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["fxLayout","column","fxLayoutAlign","space-around","fxLayoutGap","5px","class","h-100",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-around","fxLayoutGap","5px",1,"h-100"],["fxLayout","row","fxLayoutAlign","center"],[1,"text-120"],["fxLayout","column","fxLayoutGap","2px"],[4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","space-around center"],[3,"click"],[3,"valueChange","value"]],template:function(r,s){r&1&&W(0,mri,15,1,"div",0),r&2&&b("ngIf",s.availableSkills)},dependencies:[Ct,At,Yt,$r,oi,Hi,Nn,Lt]});let t=e;return t})()});var O7,hz=Q(()=>{me();O7=(()=>{let e=class e{constructor(){}transform(i){switch(i){case"templatePhoto":return"Vorlage Foto";case"tattooPhoto":return"Tattoo Foto";case"tattooVideo":return"Tattoo Video";case"stencilPhoto":return"Stencil Foto";case"stencilVideo":return"Stencil Video";case"preTattooVideo":return"Vorher Video";case"preTattooPhoto":return"Vorher Foto";case"consent":return"Einwilligung"}return""}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtDriveFileSubType",type:e,pure:!0,standalone:!0});let t=e;return t})()});function fri(t,e){t&1&&(h(0,"div",8),y(1,"Fotos werden geladen..."),p())}function gri(t,e){if(t&1&&(h(0,"div",9),y(1),p()),t&2){let n=w();g(),Ke("",n.photos.length," Fotos/Videos")}}function vri(t,e){if(t&1){let n=re();h(0,"div",10)(1,"img",11),F("click",function(){let r=V(n).$implicit,s=w();return B(s.triggerPhoto(r.id))}),p(),h(2,"nxt-checkbox",12),F("valueChange",function(r){let s=V(n).$implicit,o=w();return B(o.triggerPhoto(s.id,r))}),p(),h(3,"div",13),F("click",function(){let r=V(n).$implicit,s=w();return B(s.triggerPhoto(r.id))}),h(4,"div",14),y(5),Ce(6,"nxtDriveFileSubType"),p(),h(7,"div",14),y(8),Ce(9,"nxtDate"),p()()()}if(t&2){let n=e.$implicit,i=w();g(),b("src",n.base64,Ur),g(),b("value",i.photosSelected[n.id]),g(3),ye(tt(6,4,n.type)),g(3),ye(Nt(9,6,n.photoCreatedAt,"dd.MM.yyyy HH:mm"))}}function yri(t,e){if(t&1){let n=re();h(0,"nxt-button",6),F("click",function(){V(n);let r=w();return B(r.save())}),y(1,"1 Foto mit diesem Termin verkn\xFCpfen"),p()}}function _ri(t,e){if(t&1){let n=re();h(0,"nxt-button",6),F("click",function(){V(n);let r=w();return B(r.save())}),y(1),p()}if(t&2){let n=w();g(),Ke("",n.photosSelectedCount," Fotos mit diesem Termin verkn\xFCpfen")}}var Sje,Tje=Q(()=>{Zi();mg();ri();Vt();go();hz();me();yi();ji();Ci();Vt();Sje=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.cdRef=r,this.dialogRef=s,this.dialogService=o,this.photosSelected={},this.photosSelectedCount=0}ngOnInit(){return O(this,null,function*(){this.load()})}load(){return O(this,null,function*(){this.photos=yield this.socketService.getEventPhotosFromClipboard(),this.photos.forEach(i=>i.base64="data:image/jpg;base64,"+i.base64),this.cdRef.detectChanges()})}save(){return O(this,null,function*(){let i=[];for(let r of Object.keys(this.photosSelected))this.photosSelected[r]&&i.push(r);if(i.length===0)this.dialogService.showOk("Du hast keine Bilder ausgew\xE4hlt");else if(yield this.dialogService.showYesNo("M\xF6chtest du "+i.length+" Foto(s) verkn\xFCpfen?")){let r=this.photos.filter(s=>i.includes(s.id));this.socketService.reAssignEventPhotoFromClipboard(r,this.eventId),this.dialogRef.close()}})}triggerPhoto(i,r){typeof r=="boolean"?this.photosSelected[i]=r:this.photosSelected[i]=!this.photosSelected[i];for(let s of Object.keys(this.photosSelected))this.photosSelected[s]||delete this.photosSelected[s];this.photosSelectedCount=Object.keys(this.photosSelected).length}delete(){return O(this,null,function*(){let i=[];for(let r of Object.keys(this.photosSelected))this.photosSelected[r]&&i.push(r);(yield this.dialogService.showYesNo("M\xF6chtest du "+i.length+" Foto(s) wirklich l\xF6schen?"))&&(yield this.socketService.updatePhotoSyncReimportUnknownDelete(i),this.load())})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Kt),R(Gt,8),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-photo-clipboard"]],inputs:{eventId:"eventId"},standalone:!0,features:[xe],decls:10,vars:5,consts:[["fxLayout","column","fxLayoutAlign","center center",1,"w-full","h-100","o-hidden"],["class","pt-4",4,"ngIf"],["class","text-120",4,"ngIf"],["fxLayout","row","fxLayoutGap","5px",1,"w-full","p-3","scrollable"],["fxLayoutAlign","center center","style","position:relative; min-width: 200px",4,"ngFor","ngForOf"],[1,"p-3"],[3,"click"],[3,"click",4,"ngIf"],[1,"pt-4"],[1,"text-120"],["fxLayoutAlign","center center",2,"position","relative","min-width","200px"],[1,"mouse-pointer",2,"height","300px",3,"click","src"],[2,"position","absolute","left","5px","top","5px","width","28px","height","28px","border-radius","4px","background-color","#0000006b",3,"valueChange","value"],["fxLayoutAlign","center center","fxLayout","column",1,"p-2",2,"position","absolute","bottom","0","background","rgba(0,0,0,0.5)","border-radius","4px 4px 0 0",3,"click"],[1,"mouse-pointer"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,fri,2,0,"div",1)(2,gri,2,1,"div",2),h(3,"div",3),W(4,vri,10,9,"div",4),p(),h(5,"div",5)(6,"nxt-button",6),F("click",function(){return s.dialogRef.close()}),y(7,"Abbrechen"),p(),W(8,yri,2,0,"nxt-button",7)(9,_ri,2,1,"nxt-button",7),p()()),r&2&&(g(),b("ngIf",!s.photos),g(),b("ngIf",s.photos),g(2),b("ngForOf",s.photos),g(4),b("ngIf",s.photosSelectedCount===1),g(),b("ngIf",s.photosSelectedCount>1))},dependencies:[At,Yt,$r,oi,Ct,Hi,H1,Lt,Hn,O7],styles:["[_nghost-%COMP%]{display:flex;max-width:90vw}"],changeDetection:0});let t=e;return t})()});function Cri(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showDebugProps,r)||(s.showDebugProps=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.showDebugPropsChanged())}),y(1," Julian "),p()}if(t&2){let n=w();qe("value",n.showDebugProps)}}var $1,ED=Q(()=>{Gi();$n();pa();Ul();Vd();Nu();zn();kl();jc();Qo();Vt();Pa();il();oo();ri();me();dB();ug();Cs();Kr();Vt();$1=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.angularFire=i,this.clipboard=r,this.configService=s,this.loginService=o,this.hiddenProps=[],this.debugProps=[],this.firstItem={},this.columnDefs=[{headerName:"Datum",field:"created",nxtFieldType:Ee.Text,sort:"desc",cellRenderer:a=>this.loginService.isJulian()?Ie.format(a.data.created,"dd.MM.yyyy HH:mm:ss.SSSS"):Ie.format(a.data.created,"dd.MM.yyyy HH:mm:ss")},{headerName:"Benutzer",field:"user",nxtFieldType:Ee.Text},{headerName:"Aktion",field:"action",nxtFieldType:Ee.Text},{headerName:"\xC4nderungen",field:"diffTextLines",autoHeight:!0,nxtFieldType:Ee.Text,cellRenderer:a=>a.data.diffTextLines,suppressKeyboardEvent:a=>a.event.ctrlKey&&a.event.key==="c",nxtOnCellDoubleClicked:a=>this.clipboard.copy(a.data.data)}],this.historyData=[],this.showDebugProps=!1}ngOnInit(){}nxtOnDestroy(){}ngOnChanges(i){(i.table||i.id||i.actions)&&this.table&&this.id&&this.actions&&this.load()}load(){return O(this,null,function*(){let i=(yield Sn(this.angularFire.collection("/history/"+this.table+"/"+this.id,s=>s.where("action","in",this.actions)).get())).docs.map(s=>s.data());i.forEach(s=>s.created=Ie.parse(s.created));let r=i.sortNumber("created");this.filterRawItem&&(r=r.filter(this.filterRawItem)),this.appendPrevAndNext(r),yield this.appendDataToCompare(r),this.appendDiffs(r),this.appendFormattedDiffs(r),this.filterItem?this.historyData=r.filter(this.filterItem):this.historyData=r,this.historyData=this.historyData.filter(s=>!!s.diffTextLines)})}appendDiffs(i){for(let[r,s]of i.entries())s.diffsToPrev=Sr.getDiff(s.prevItem.dataToCompare,s.dataToCompare,!0)}appendDataToCompare(i){return O(this,null,function*(){for(let[r,s]of i.entries()){let o=Qn.parse(s.data),a=Sr.clone(o);for(let d of this.hiddenProps)Sr.delete(o,d);this.prepareRawData&&(o=this.prepareRawData(o));let c=!0?Sr.clone(o):{};for(let d of this.propDefs){d.fields||(d.fields=[]);for(let u of[d.field,...d.fields]){let m=Sr.get(o,u);typeof m<"u"&&(d.valueGetter?m=yield d.valueGetter(m,o):m=this.defaultValueGetterByType(d.type,m),d.deleteInCompareData&&d.deleteInCompareData({data:a,value:m})?Sr.delete(c,u):Sr.set(c,u,m))}}this.prepareDataToCompare?s.dataToCompare=this.prepareDataToCompare(c):s.dataToCompare=c}})}appendPrevAndNext(i){for(let[r,s]of i.entries()){let o=r>0?i[r-1]:{dataToCompare:this.firstItem,data:"",created:0,user:"",action:"initial",diffsToPrev:[],diffTextLines:""},a=r<i.length-1?i[r+1]:void 0;s.prevItem=o,s.nextItem=a}}appendFormattedDiffs(i){for(let[r,s]of i.entries()){let o=[];for(let c of s.diffsToPrev)try{let d=this.propDefs.find(u=>u.field===c.path.join("."));if(d||(d=this.propDefs.find(u=>u.fields.includes(c.path.join(".")))),d){let u=c.val;d.textGetter?u=d.textGetter({data:s.dataToCompare,diff:c,value:c.val}):u=this.defaultTextGetter(d,c),o.push({diff:c,text:u,propDef:d,name:d.name,data:s})}else{let u=c.op==="delete"?c.oldVal:c.val;o.push({diff:c,text:u,propDef:d,name:c.path.join("."),data:s})}}catch(d){debugger;throw Error(d)}let a={};for(let[c,d]of this.propDefs.entries())a[d.field]=c;o=o.sort((c,d)=>{let u=c.propDef?a[c.propDef.field]:999999,m=d.propDef?a[d.propDef.field]:999999;return u>m?1:u<m?-1:c.name.localeCompare(d.name)});let l=[];for(let c of o)c.diff.op==="add"&&c.propDef?.hideOnAdd&&c.propDef.hideOnAdd(c.diff.val,c,s)||["add","update"].includes(c.diff.op)&&c.propDef?.hideOnAddOrUpdate&&c.propDef.hideOnAddOrUpdate(c.diff.val,c)||l.push(this.buildDiffLine(c.diff.op,c.name,c.text));s.diffTextLines=l.filter(c=>!!c).join("<br/>")}}getOperationText(i){switch(i){case"update":return"aktualisiert";case"delete":return"gel\xF6scht";case"add":return"neu"}}buildDiffLine(i,r,s){return i==="delete"?this.getOperationText(i)+' <span style="color:#5493ff;user-select: all">'+r+'</span><span style="color:#5493ff;">:</span>&nbsp;<span style="user-select: all; color:'+xn.Red+';">'+s+"</span>":this.getOperationText(i)+' <span style="color:#5493ff;user-select: all">'+r+'</span><span style="color:#5493ff;">:</span>&nbsp;<span style="user-select: all; color:'+xn.GreenLight+';">'+s+"</span>"}defaultTextGetter(i,r){return r.op==="delete"&&!r.val?this.defaultTextGetterWithoutOldVal(i,r.oldVal):r.op==="add"||!r.oldVal||i.hideOldValueOnUpdate?this.defaultTextGetterWithoutOldVal(i,r.val):this.defaultTextGetterWithOldVal(i,r.val,r.oldVal)}defaultTextGetterWithoutOldVal(i,r){switch(i.type){case Ee.Money:return Wn.toMoneyString(parseFloat(r));case Ee.Date_germanDateTime:return Ie.format(r,"dd.MM.yyyy HH:mm");case Ee.Date_germanDate:return Ie.format(r,"dd.MM.yyyy");case Ee.Boolean:return r?"Ja":"Nein";case Ee.Percentage:return fn.round(parseFloat(r),1)+"%";default:return r}}defaultTextGetterWithOldVal(i,r,s){let o="&nbsp;&nbsp;"+cr.arrowRight+"&nbsp;&nbsp;";switch(i.type){case Ee.Money:return Wn.toMoneyString(parseFloat(s))+" "+cr.arrowRight+" "+Wn.toMoneyString(parseFloat(r));case Ee.Date_germanDateTime:return Ie.format(s,"dd.MM.yyyy")===Ie.format(r,"dd.MM.yyyy")?Ie.format(s,"HH:mm")+o+Ie.format(r,"HH:mm"):Ie.format(s,"dd.MM.yyyy HH:mm")+o+Ie.format(r,"dd.MM.yyyy HH:mm");case Ee.Date_germanDate:return Ie.format(s,"dd.MM.yyyy")+o+Ie.format(r,"dd.MM.yyyy");case Ee.Percentage:return fn.round(parseFloat(s),1)+"%"+o+fn.round(parseFloat(r),1)+"%";case Ee.Text:return'<span style="color:'+xn.Red+';">'+s+"</span>"+o+r;default:return this.defaultTextGetterWithoutOldVal(i,r)}}defaultValueGetterByType(i,r){switch(i){case Ee.Date_germanDateTime:return r?Ie.parse(r):null;case Ee.Date_germanDate:return r?Ie.parse(r):null;case Ee.Boolean:return typeof r=="string"?r==="true":!!r}return r}showDebugPropsChanged(){this.hiddenProps=this.hiddenProps.filter(i=>!this.debugProps.includes(i)),this.showDebugProps||this.hiddenProps.push(...this.debugProps),this.load()}};e.\u0275fac=function(r){return new(r||e)(R(XT),R(_u),R(Xi),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-history"]],inputs:{hiddenProps:"hiddenProps",debugProps:"debugProps",propDefs:"propDefs",firstItem:"firstItem",prepareDataToCompare:"prepareDataToCompare",prepareRawData:"prepareRawData",filterRawItem:"filterRawItem",filterItem:"filterItem",table:"table",id:"id",actions:"actions"},standalone:!0,features:[et,yn,xe],decls:3,vars:6,consts:[[1,"h-100"],["nxtPermission","IsJulian",3,"value","valueChange",4,"ngIf"],["fxFlex","","uniqueRowDataKey","created",1,"h-100",3,"suppressRowTransform","columnDefs","rowData","showSideBar","disableAllSort"],["nxtPermission","IsJulian",3,"valueChange","value"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,Cri,2,1,"nxt-slide-toggle",1),ee(2,"nxt-datagrid",2),p()),r&2&&(g(),b("ngIf",s.debugProps.length>0),g(),b("suppressRowTransform",!0)("columnDefs",s.columnDefs)("rowData",s.historyData)("showSideBar",!1)("disableAllSort",!0))},dependencies:[Ct,Nn,Zs,dr,At,qi]});let t=e;return t})()});var xri,JA,KX=Q(()=>{Gi();ED();Yc();Qo();kl();Ul();Nu();i3();Rv();ls();Vt();me();yi();ji();z1();Cs();Vt();xri=()=>["update","create"],JA=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.socketService=i,this.dialogRef=r,this.bodyPutService=s,this.configService=o,this.propDefs=[{field:"artist",name:"Artist",type:Ee.Text},{field:"improve",name:"improve",type:Ee.Boolean},{field:"workType",name:"Typ",type:Ee.Text,valueGetter:(a,l)=>a==="tattoo"?"Tattoo":a==="piercing"?"Piercing":"nicht gesetzt"},{field:"invoiceNumber",name:"Rechnungs-Nr",type:Ee.Text},{field:"artistAssignedAt",name:"Artist zugewiesen",type:Ee.Date_germanDate},{field:"adjustPrice",name:"Preis - Preis evtl. anpassen",type:Ee.Boolean,hideOnAdd:a=>!a},{field:"noAppointmentReminder",name:"Kunde - Keine Terminerinnerung",type:Ee.Boolean,hideOnAdd:a=>!a},{field:"noDepotNecessary",name:"Kaution - Keine Kaution n\xF6tig",type:Ee.Boolean,hideOnAdd:a=>!a},{field:"visibility",name:"Tresor",valueGetter:a=>a==="private",type:Ee.Boolean},{field:"workType",name:"Arbeit",textGetter:a=>a.diff.val.replace("piercing","Piercing").replace("tattoo","Tattoo"),type:Ee.Text},{field:"pdf1Count",name:"Seitenzahl Einwilligungserkl\xE4rung",type:Ee.Text},{field:"invoiceNumber",name:"Rechnungsnummer",type:Ee.Text,deleteInCompareData:a=>!a.value},{field:"nxtUpdateId",name:"nxtUpdateId",type:Ee.Text},{field:"bodyPuts",name:"Tattoo - K\xF6rperstelle",valueGetter:a=>this.bodyPutService.getTextFromEventObj(a).join(`
`),type:Ee.Text},{field:"info",name:"Termin - Info",type:Ee.Text},{field:"stencilSeen",name:"Stencil gesehen",type:Ee.Text,hideOldValueOnUpdate:!0,valueGetter:a=>a.seenAt.dateFormat("dd.MM.yyyy HH:mm")+" "+a.seenBy},{field:"depotDueDate",name:"Preis - Kaution kommt am",type:Ee.Date_germanDate,deleteInCompareData:a=>!a.value},{field:"depotDueDateReason",name:"Preis - Kaution kommt weil",type:Ee.Text,deleteInCompareData:a=>!a.value},{field:"artistAssignedAt",name:"Artist zugewiesen",type:Ee.Date_germanDate},{field:"canceledApproved",name:"Kunde - Absage - Nachweis erbracht",type:Ee.Boolean,deleteInCompareData:a=>!a.data.canceledAt},{name:"Kunde - Absage - Fr\xFCh genug abgesagt",field:"canceledInTime",type:Ee.Boolean,deleteInCompareData:a=>a.data.status!=="canceled"},{field:"canceledReason",name:"Absage - Grund",type:Ee.Text,deleteInCompareData:a=>a.data.status!=="canceled"},{field:"shouldDepositBack",name:"Offene R\xFCckzahlung",type:Ee.Boolean,deleteInCompareData:a=>!a.value},{field:"shouldDepositBackValue",name:"Offene R\xFCckzahlung Betrag",type:Ee.Money,deleteInCompareData:a=>!a.value},{field:"artistFixReason",name:"Artist - Fix Grund",type:Ee.Text,valueGetter:a=>Vu.getFixArtistReasonText(a),deleteInCompareData:a=>!a.value},{field:"discountPromotion",name:"Preis - Rabatt",type:Ee.Text,valueGetter:a=>a?.name?a.name:"",deleteInCompareData:a=>!a.value},{field:"fastWalkIn",name:"Walk-In",type:Ee.Boolean},{field:"createdByWorkplace",name:"Ersteller - Arbeitsplatz",type:Ee.Text},{field:"fastWalkInNo",name:"Walk-In-Nr",type:Ee.Text,deleteInCompareData:a=>!a.value},{field:"importantInfo",name:"Wichtige Info",type:Ee.Text,deleteInCompareData:a=>!a.value},{field:"improveArtistShouldGetMoney",name:"Nachstechen Artist bekommt Geld",type:Ee.Boolean,deleteInCompareData:a=>!a.value},{field:"noDepotNecessaryReason",name:"Kaution - Keine Kaution n\xF6tig weil",type:Ee.Text,deleteInCompareData:a=>!a.value},{field:"priceEstimatedTill",name:"Preis - Preis bis",type:Ee.Money,deleteInCompareData:a=>!a.value},{field:"priceFix",name:"Preis - Fix-Preis",type:Ee.Boolean,deleteInCompareData:a=>!a.value},{field:"promoOfferId",name:"Promo-Code",type:Ee.Text,deleteInCompareData:a=>!a.value},{field:"shouldDepositBackCreatedAt",name:"offene R\xFCckzahlung erstellt am",type:Ee.Date_germanDateTime,deleteInCompareData:a=>!a.value},{field:"skill",name:"Tattoo - Stil",type:Ee.Text,valueGetter:a=>(a?.boolSkills?Object.keys(a.boolSkills).join(", "):"")+(a?.skills?Object.keys(a.skills).join(", "):"")},{field:"durationPriceInfo",name:"Preis - Warum passt der Preis zur Dauer nicht?",type:Ee.Text,deleteInCompareData:a=>!a.value},{field:"start",name:"Termin - Start",type:Ee.Date_germanDateTime},{field:"end",name:"Termin - Ende",type:Ee.Date_germanDateTime},{field:"artistFix",name:"Artist - Fix",type:Ee.Boolean},{field:"title",name:"Titel",type:Ee.Text,hideOldValueOnUpdate:!0},{field:"artistPercentage",name:"Artist - Prozente",type:Ee.Percentage},{field:"mediaCount",name:"Datei-Anh\xE4nge",valueGetter:a=>(a?.photo||0)+" Fotos, "+(a?.video||0)+" Videos, "+(a?.pdf||0)+" PDFs",hideOnAdd:(a,l)=>!l.data.mediaCount||(l.data.mediaCount?.photo||0)===0&&(l.data.mediaCount?.video||0)===0&&(l.data.mediaCount?.pdf||0)===0,type:Ee.Text},{field:"valence",name:"Wertigkeit",type:Ee.Number,valueGetter:a=>fn.round(a,2)},{field:"priceEstimatedFrom",name:"Preis von",type:Ee.Money,valueGetter:a=>parseFloat(a)},{field:"priceChanges",name:"Preis - Preis\xE4nderungen",valueGetter:a=>a.map(l=>l.u+": "+l.from.toMoneyString()+" "+cr.arrowRight+" "+l.to.toMoneyString()+" "+l.i).join("<br/>"),type:Ee.Text,hideOnAdd:a=>a.length===0},{field:"customer",name:"Kunde",valueGetter:a=>this.getCustomer(a),type:Ee.Text},{field:"customerObj",name:"customerObj",valueGetter:a=>Qn.stringify(a),type:Ee.Text},{field:"payments",name:"Zahlung",type:Ee.Text,valueGetter:a=>Qn.stringify(a),textGetter:a=>{let l=Qn.parse(a.diff.val);return this.getPaymentsDiff(a)},hideOnAddOrUpdate:(a,l)=>!l.text},{field:"status",name:"Status",valueGetter:a=>a==="canceled"?"Abgesagt":a==="closed"?"Geschlossen":"Offen",type:Ee.Text},{field:"followUp",name:"FollowUp",type:Ee.Text,valueGetter:a=>Qn.stringify(a)},{field:"qrCodeScanStencil",name:"Qr-Code Scan - Stencil",type:Ee.Date_germanDateTime},{field:"qrCodeScanTattoo",name:"Qr-Code Scan - Tattoo",type:Ee.Date_germanDateTime},{field:"disableSkillCheck",name:"Skill-Check deaktiviert",type:Ee.Boolean},{field:"problems",name:"Probleme am Tag des Termins",type:Ee.Text}],this.hiddenProps=["updated","updatedDate","artistPaymentSum","artistToGet","toPayToStudio","endPlanned","endString","endTime","sequence","startString","updatedAt","startTime","paymentSum","toPay","calendarId","calendarNumber","createdDate","createdDateString","createdWeekDay","duration","endDate","followUp","id","canceledAt","created","description","fastWalkInNoAdd","customerObj","lockdownInfo","paymentCheaperSum","paymentDepositBack","closed","paymentSumAdditional","photoFolderId","startDate","startDateString","studio","updatedBy","artistTotalGet","cashEndOfDay","createdBy","createdByStudio","fastWalkInRegisteredAt","calendarName","mediaCount","pdf1Count","promoOfferCreatedAt","promoOfferPromoterName","updatedByStudio","updatedByWorkplace","seqId","ratings","ratingValue","qrScans","shouldCheck","createdAt"],this.debugProps=["googleId","nextNxtUpdateId","nxtUpdateId","title","followUp","mediaCount","pdf1Count","files"],this.showTitle=!1,this.showDebug=!1,this.eventId="75a2m8cdoc7s5g5g0vif98eoc4",this.hiddenProps.push(...this.debugProps)}filterRawItem(i){return i.user!=="Media-Count-Fix"&&i.user!=="PDF-Scan"}setData(i){this.eventId=i}ngOnInit(){this.propDefs=this.propDefs.sort(Hr.sortString("name"))}nxtOnDestroy(){}close(){this.dialogRef.close()}getCustomer(i){return O(this,null,function*(){return(yield this.socketService.getContactById(i))?.fullName})}getPaymentsDiff(i){let r=[],s=Qn.parse(i.diff.val);i.diff.op==="update"&&(r=Qn.parse(i.diff.oldVal));let o=s.filter(c=>!r.some(d=>d.paymentUuid===c.paymentUuid)),a=r.filter(c=>!s.some(d=>d.paymentUuid===c.paymentUuid)),l=[];for(let c of o)l.push("<span>Neue Zahlung: "+Xo.paymentToTextOneLine(c,!1)+"</span>");for(let c of a)l.push('<span class="red">Zahlung gel\xF6scht: '+Xo.paymentToTextOneLine(c,!1)+"</span>");return l.length===0?"":l.length===1?l[0]:"<br/>&nbsp;&nbsp;&nbsp;"+l.join("<br/>&nbsp;&nbsp;&nbsp;")}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Gt,8),R(Oc),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-event-history"]],viewQuery:function(r,s){if(r&1&&ei($1,5),r&2){let o;Pt(o=Rt())&&(s.historyComponent=o.first)}},standalone:!0,features:[et,xe],decls:8,vars:7,consts:[["historyComponent",""],["fxLayout","column",1,"nxt-page","w-full","h-100"],["fxLayout","row","fxLayoutAlign","space-between"],[1,"text-130"],[3,"click"],["table","calendar-event",1,"w-full","h-100",3,"id","actions","propDefs","hiddenProps","debugProps","filterRawItem"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"div",3),y(3,"Terminverlauf"),p(),h(4,"nxt-button-icon",4),F("click",function(){return V(o),B(s.close())}),y(5,"close"),p()(),ee(6,"nxt-history",5,0),p()}r&2&&(g(6),b("id",s.eventId)("actions",bn(6,xri))("propDefs",s.propDefs)("hiddenProps",s.hiddenProps)("debugProps",s.debugProps)("filterRawItem",s.filterRawItem))},dependencies:[At,Yt,oi,an,$1]});let t=e;return t})()});var Dje,Eje=Q(()=>{kl();Vd();Zh();me();od();Kr();Dje=(()=>{let e=class e{constructor(i,r){this.sanitizer=i,this.loginService=r}transform(i){try{let r="";if(i.priceFix&&Es.isNumberAndNotNaN(i.priceEstimatedFrom))r="fix "+i.priceEstimatedFrom.toMoneyString("\u20AC",!1);else if(Es.isNumberAndNotNaN(i.priceEstimatedFrom)&&Es.isNumberAndNotNaN(i.priceEstimatedTill))r=i.priceEstimatedFrom.toMoneyString("",!1)+' <div class="text-80">&nbsp;-&nbsp;</div> '+i.priceEstimatedTill.toMoneyString("\u20AC",!1);else if(Es.isNumberAndNotNaN(i.priceEstimatedFrom))r+="ca. "+i.priceEstimatedFrom.toMoneyString("\u20AC",!1);else return'<div class="text-140">Preis festlegen</div>';let s="";Es.isNumberAndNotNaN(i.priceEstimatedFrom)&&(s=Wn.toMoneyString(i.priceEstimatedFrom/100*i.artistPercentage,"\u20AC",!1));let o='<div class="text-150" style="display:flex; align-items: center; flex-direction: row">'+r+"</div>",a=this.loginService.isBackoffice()?" ("+fn.round(i.artistPercentage)+"%)":"";return s&&(o+="<div>Artist "+s+a+"</div>"),'<div class="price-wrapper">'+o+"</div>"}catch{return""}}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16),R(Fi,16))},e.\u0275pipe=kr({name:"calendarEventEditPriceText",type:e,pure:!0,standalone:!0});let t=e;return t})()});var Mje,kje=Q(()=>{me();od();jl();Mje=(()=>{let e=class e{constructor(i,r){this.sanitizer=i,this.permissionService=r}transform(i){return this.permissionService.hasPermission(i)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16),R(ws,16))},e.\u0275pipe=kr({name:"permission",type:e,pure:!0,standalone:!0});let t=e;return t})()});var eP,YX=Q(()=>{me();od();eP=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i,r=!1){return i=i.replace(/\n/g,"<br/>"),r?this.sanitizer.bypassSecurityTrustResourceUrl(i):this.sanitizer.bypassSecurityTrustUrl(i)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"safeUrl",type:e,pure:!0,standalone:!0});let t=e;return t})()});var bri,Ije,Aje=Q(()=>{An();ri();me();An();bri=(t,e)=>({width:t,height:e}),Ije=(()=>{let e=class e{constructor(){}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-divider"]],inputs:{width:"width",height:"height"},standalone:!0,features:[xe],decls:2,vars:4,consts:[[3,"ngStyle"]],template:function(r,s){r&1&&(h(0,"div",0),y(1,"\xA0"),p()),r&2&&b("ngStyle",bs(1,bri,s.width,s.height))},dependencies:[rr,Dn,rs]});let t=e;return t})()});var Cx,pz,Pje=Q(()=>{zn();Vd();pue();Cx=class Cx{constructor(e,n){this.name=e,this.options=n,this.timeoutWithoutLog=3e4,this.start=0,this.logMessages=[],this.onWriteToLog=new Db,this.directLog=!0,this.blackListNames=['client call "getTime"'],this.hasError=!1,this.tab="	",!this.options?.disabled&&(this.blackListNames.includes(e)||setTimeout(()=>{Cx.Log.info("start NXT-LOG "+e)},10),this.start=Date.now(),this.restartTimeout())}setTimeout(e){this.options?.disabled||(this.timeoutWithoutLog=e,this.restartTimeout())}setLogTimeout(e){this.options?.disabled||(this.timeoutWithoutLog=e)}logAfter(e){this.options?.disabled||(this.directLog&&Cx.Log.info("NXT-DIRECT-LOG | "+this.name+" | "+Ie.formatNow("HH:mm:ss")+" | "+e),this.logMessages.push({timestamp:Date.now(),message:e}))}error(e,n){this.options?.disabled||(this.hasError=!0,Cx.Log.error(`nxtLog: [${this.name}] fehlgeschlagen
${e}`,n),n?this.logMessages.push({timestamp:Date.now(),message:`ERROR ERROR: ${e}
${n}`}):this.logMessages.push({timestamp:Date.now(),message:`ERROR ERROR: ${e}`}),this.restartTimeout())}getLogLines(){if(this.options?.disabled)return[];let e=[],n=-1,i="";for(let r of this.logMessages){if(i=this.tab+"["+Ie.format(r.timestamp,"HH:mm:ss.SSS")+"] ",n>-1){let s=r.timestamp-n;i+=this.tab+"["+Wn.roundToString(s/1e3,4)+" s] "}i+=r.message,n=r.timestamp,e.push(i)}return e}writeToLog(){if(!this.options?.disabled&&!this.blackListNames.includes(this.name)){if((this.logMessages.length>0||this.hasError)&&Date.now()-this.start>100&&!(this.logMessages.length===1&&(this.logMessages[0].message==="NXT-LOG timedout!"||this.logMessages[0].message==="wait for reloading finished"))){let n=this.getCompleteLogMessage();Cx.Log.info(n),this.options?.sendTelegram&&Cx.onSendTelegram.emit(n),this.clearTimeoutTimeout(),this.onWriteToLog.emit(n)}this.logMessages.length=0}}totalSecondsString(){return Wn.roundToString(Ie.dateDiffToNow(this.start)/1e3,4)}getCompleteLogMessage(){let e=[],n=this.totalSecondsString();return e.push(`
START: ${this.name} | TOTAL ${n} s`),this.options?.nxtConnection&&e.push(`nxtConnection: ${this.options?.nxtConnection.name}`),[...e,...this.getLogLines(),"END NXT-LOG"].join(`
  `)}timedOut(){this.writeToLog()}restartTimeout(){this.clearTimeoutTimeout(),this.timeoutTimer=setTimeout(()=>this.timedOut(),this.timeoutWithoutLog)}clearTimeoutTimeout(){this.timeoutTimer&&clearTimeout(this.timeoutTimer)}};Cx.Log={info:console.info,error:console.error},Cx.onSendTelegram=new Db;pz=Cx});function qje(t){let e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;r<n.length;r++)n[r].removeAttribute("id");return i==="canvas"?Lje(t,e):(i==="input"||i==="select"||i==="textarea")&&Fje(t,e),Rje("canvas",t,e,Lje),Rje("input, textarea, select",t,e,Fje),e}function Rje(t,e,n,i){let r=e.querySelectorAll(t);if(r.length){let s=n.querySelectorAll(t);for(let o=0;o<r.length;o++)i(r[o],s[o])}}function Fje(t,e){e.type!=="file"&&(e.value=t.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${wri++}`)}function Lje(t,e){let n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch{}}function Cve(t){let e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function fve(t,e,n){let{top:i,bottom:r,left:s,right:o}=t;return n>=i&&n<=r&&e>=s&&e<=o}function fz(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function Oje(t,e,n,i){let{top:r,right:s,bottom:o,left:a,width:l,height:c}=t,d=l*e,u=c*e;return i>r-u&&i<o+u&&n>a-d&&n<s+d}function Zje(t,e){let n=t.rootNodes;if(n.length===1&&n[0].nodeType===e.ELEMENT_NODE)return n[0];let i=e.createElement("div");return n.forEach(r=>i.appendChild(r)),i}function xve(t,e,n){for(let i in e)if(e.hasOwnProperty(i)){let r=e[i];r?t.setProperty(i,r,n?.has(i)?"important":""):t.removeProperty(i)}return t}function tP(t,e){let n=e?"":"none";xve(t.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n})}function Nje(t,e,n){xve(t.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},n)}function JX(t,e){return e&&e!="none"?t+" "+e:t}function Vje(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=eQ(e.left,e.top)}function eQ(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function Bje(t){let e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function Sri(t){let e=getComputedStyle(t),n=mve(e,"transition-property"),i=n.find(a=>a==="transform"||a==="all");if(!i)return 0;let r=n.indexOf(i),s=mve(e,"transition-duration"),o=mve(e,"transition-delay");return Bje(s[r])+Bje(o[r])}function mve(t,e){return t.getPropertyValue(e).split(",").map(i=>i.trim())}function zje(t){return"showPopover"in t}function Uje(t,e,n){return Math.max(e,Math.min(n,t))}function mz(t){return t.type[0]==="t"}function jje(t){t.preventDefault()}function Xje(t,e,n){let i=$je(e,t.length-1),r=$je(n,t.length-1);if(i===r)return;let s=t[i],o=r<i?-1:1;for(let a=i;a!==r;a+=o)t[a]=t[a+o];t[r]=s}function $je(t,e){return Math.max(0,Math.min(e,t))}function Jje(t,e){let{top:n,bottom:i,height:r}=t,s=r*Qje;return e>=n-s&&e<=n+s?r6.UP:e>=i-s&&e<=i+s?r6.DOWN:r6.NONE}function e$e(t,e){let{left:n,right:i,width:r}=t,s=r*Qje;return e>=n-s&&e<=n+s?bg.LEFT:e>=i-s&&e<=i+s?bg.RIGHT:bg.NONE}function Eri(t,e,n,i,r){let s=Jje(e,r),o=e$e(e,i),a=r6.NONE,l=bg.NONE;if(s){let c=t.scrollTop;s===r6.UP?c>0&&(a=r6.UP):t.scrollHeight-c>t.clientHeight&&(a=r6.DOWN)}if(o){let c=t.scrollLeft;n==="rtl"?o===bg.RIGHT?c<0&&(l=bg.RIGHT):t.scrollWidth+c>t.clientWidth&&(l=bg.LEFT):o===bg.LEFT?c>0&&(l=bg.LEFT):t.scrollWidth-c>t.clientWidth&&(l=bg.RIGHT)}return[a,l]}var wri,QX,Tri,gve,Hje,qX,Gje,Dri,Wje,vve,tQ,yve,Kje,Qje,r6,bg,_ve,ZX,XX,Mri,kri,Iri,Ari,Yje,Pri,Rri,Fri,Lri,t$e,i$e=Q(()=>{me();me();ri();R1();Xh();J0();Wc();$n();Cl();Th();wri=0;QX=class{constructor(e){this._document=e,this.positions=new Map}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(n=>{this.positions.set(n,{scrollPosition:{top:n.scrollTop,left:n.scrollLeft},clientRect:Cve(n)})})}handleScroll(e){let n=sf(e),i=this.positions.get(n);if(!i)return null;let r=i.scrollPosition,s,o;if(n===this._document){let c=this.getViewportScrollPosition();s=c.top,o=c.left}else s=n.scrollTop,o=n.scrollLeft;let a=r.top-s,l=r.left-o;return this.positions.forEach((c,d)=>{c.clientRect&&n!==d&&n.contains(d)&&fz(c.clientRect,a,l)}),r.top=s,r.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};Tri=new Set(["position"]),gve=class{get element(){return this._preview}constructor(e,n,i,r,s,o,a,l,c){this._document=e,this._rootElement=n,this._direction=i,this._initialDomRect=r,this._previewTemplate=s,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),zje(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return Sri(this._preview)}addEventListener(e,n){this._preview.addEventListener(e,n)}removeEventListener(e,n){this._preview.removeEventListener(e,n)}_createPreview(){let e=this._previewTemplate,n=this._previewClass,i=e?e.template:null,r;if(i&&e){let s=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),r=Zje(o,this._document),this._previewEmbeddedView=o,e.matchSize?Vje(r,s):r.style.transform=eQ(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=qje(this._rootElement),Vje(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return xve(r.style,{"pointer-events":"none",margin:zje(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Tri),tP(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),n&&(Array.isArray(n)?n.forEach(s=>r.classList.add(s)):r.classList.add(n)),r}};Hje=Sh({passive:!0}),qX=Sh({passive:!1}),Gje=Sh({passive:!1,capture:!0}),Dri=800,Wje=new Set(["position"]),vve=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(n=>tP(n,e)))}constructor(e,n,i,r,s,o){this._config=n,this._document=i,this._ngZone=r,this._viewportRuler=s,this._dragDropRegistry=o,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=gt(!1),this._moveEvents=new Mi,this._pointerMoveSubscription=na.EMPTY,this._pointerUpSubscription=na.EMPTY,this._scrollSubscription=na.EMPTY,this._resizeSubscription=na.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this.scale=1,this._disabled=!1,this.beforeStarted=new Mi,this.started=new Mi,this.released=new Mi,this.ended=new Mi,this.entered=new Mi,this.exited=new Mi,this.dropped=new Mi,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let d=Math.abs(l.x-this._pickupPositionOnPage.x),u=Math.abs(l.y-this._pickupPositionOnPage.y);if(d+u>=this._config.dragStartThreshold){let f=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),_=this._dropContainer;if(!f){this._endDragSequence(a);return}(!_||!_.isDragging()&&!_.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{let d=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,u=this._activeTransform;u.x=c.x-d.x+this._passiveTransform.x,u.y=c.y-d.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(n.parentDragRef||null),this._parentPositions=new QX(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>Yp(i)),this._handles.forEach(i=>tP(i,this.disabled)),this._toggleNativeDragInteractions();let n=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&n.add(i)}),this._disabledHandles=n,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let n=Yp(e);return n!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{n.addEventListener("mousedown",this._pointerDown,qX),n.addEventListener("touchstart",this._pointerDown,Hje),n.addEventListener("dragstart",this._nativeDragStart,qX)}),this._initialTransform=void 0,this._rootElement=n),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Yp(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),tP(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),tP(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",jje,Gje)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let n=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(n),dropPoint:n,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){mz(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let n=this._getShadowRoot(),i=this._dropContainer;if(n&&this._ngZone.runOutsideAngular(()=>{n.addEventListener("selectstart",jje,Gje)}),i){let r=this._rootElement,s=r.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");s.insertBefore(a,r),this._initialTransform=r.style.transform||"",this._preview=new gve(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(s,n)),Nje(r,!1,Wje),this._document.body.appendChild(s.replaceChild(o,r)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,n){this._parentDragRef&&n.stopPropagation();let i=this.isDragging(),r=mz(n),s=!r&&n.button!==0,o=this._rootElement,a=sf(n),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+Dri>Date.now(),c=r?U9(n):W9(n);if(a&&a.draggable&&n.type==="mousedown"&&n.preventDefault(),i||s||l||c)return;if(this._handles.length){let m=o.style;this._rootElementTapHighlight=m.webkitTapHighlightColor||"",m.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(m=>this._updateOnScroll(m)),this._boundaryElement&&(this._boundaryRect=Cve(this._boundaryElement));let d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,n);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(n);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,n)}_cleanupDragArtifacts(e){Nje(this._rootElement,!0,Wje),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let n=this._dropContainer,i=n.getItemIndex(this),r=this._getPointerPositionOnPage(e),s=this._getDragDistance(r),o=n._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:s,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:n,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:s,dropPoint:r,event:e}),n.drop(this,i,this._initialIndex,this._initialContainer,o,s,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:n},{x:i,y:r}){let s=this._initialContainer._getSiblingContainerFromPosition(this,e,n);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,n)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,e,n,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,e,n,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,n):this._applyPreviewTransform(e-this._pickupPositionInElement.x,n-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let n=this._preview.getTransitionDuration();return n===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let r=o=>{(!o||this._preview&&sf(o)===this._preview.element&&o.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(s))},s=setTimeout(r,n*1.5);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,n=e?e.template:null,i;return n?(this._placeholderRef=e.viewContainer.createEmbeddedView(n,e.context),this._placeholderRef.detectChanges(),i=Zje(this._placeholderRef,this._document)):i=qje(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(e,n,i){let r=n===this._rootElement?null:n,s=r?r.getBoundingClientRect():e,o=mz(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-s.left-a.left,c=o.pageY-s.top-a.top;return{x:s.left-e.left+l,y:s.top-e.top+c}}_getPointerPositionOnPage(e){let n=this._getViewportScrollPosition(),i=mz(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=i.pageX-n.left,s=i.pageY-n.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=s,a.matrixTransform(o.inverse())}}return{x:r,y:s}}_getConstrainedPointerPosition(e){let n=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||n==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||n==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:s,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+o,u=a.bottom-(c-o),m=a.left+s,f=a.right-(l-s);i=Uje(i,m,f),r=Uje(r,d,u)}return{x:i,y:r}}_updatePointerDirectionDelta(e){let{x:n,y:i}=e,r=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,o=Math.abs(n-s.x),a=Math.abs(i-s.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=n>s.x?1:-1,s.x=n),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>s.y?1:-1,s.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,tP(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,qX),e.removeEventListener("touchstart",this._pointerDown,Hje),e.removeEventListener("dragstart",this._nativeDragStart,qX)}_applyRootElementTransform(e,n){let i=1/this.scale,r=eQ(e*i,n*i),s=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=s.transform&&s.transform!="none"?s.transform:""),s.transform=JX(r,this._initialTransform)}_applyPreviewTransform(e,n){let i=this._previewTemplate?.template?void 0:this._initialTransform,r=eQ(e,n);this._preview.setTransform(JX(r,i))}_getDragDistance(e){let n=this._pickupPositionOnPage;return n?{x:e.x-n.x,y:e.y-n.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:n}=this._passiveTransform;if(e===0&&n===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||i.width===0&&i.height===0)return;let s=r.left-i.left,o=i.right-r.right,a=r.top-i.top,l=i.bottom-r.bottom;r.width>i.width?(s>0&&(e+=s),o>0&&(e-=o)):e=0,r.height>i.height?(a>0&&(n+=a),l>0&&(n-=l)):n=0,(e!==this._passiveTransform.x||n!==this._passiveTransform.y)&&this.setFreeDragPosition({y:n,x:e})}_getDragStartDelay(e){let n=this.dragStartDelay;return typeof n=="number"?n:mz(e)?n.touch:n?n.mouse:0}_updateOnScroll(e){let n=this._parentPositions.handleScroll(e);if(n){let i=sf(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&fz(this._boundaryRect,n.top,n.left),this._pickupPositionOnPage.x+=n.left,this._pickupPositionOnPage.y+=n.top,this._dropContainer||(this._activeTransform.x-=n.left,this._activeTransform.y-=n.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=ok(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,n){let i=this._previewContainer||"global";if(i==="parent")return e;if(i==="global"){let r=this._document;return n||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Yp(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(e){return this._handles.find(n=>e.target&&(e.target===n||n.contains(e.target)))}};tQ=class{constructor(e){this._dragDropRegistry=e,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(e){this.withItems(e)}sort(e,n,i,r){let s=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,n,i,r);if(o===-1&&s.length>0)return null;let a=this.orientation==="horizontal",l=s.findIndex(D=>D.drag===e),c=s[o],d=s[l].clientRect,u=c.clientRect,m=l>o?1:-1,f=this._getItemOffsetPx(d,u,m),_=this._getSiblingOffsetPx(l,s,m),x=s.slice();return Xje(s,l,o),s.forEach((D,E)=>{if(x[E]===D)return;let M=D.drag===e,I=M?f:_,z=M?e.getPlaceholderElement():D.drag.getRootElement();D.offset+=I;let G=Math.round(D.offset*(1/D.drag.scale));a?(z.style.transform=JX(`translate3d(${G}px, 0, 0)`,D.initialTransform),fz(D.clientRect,0,I)):(z.style.transform=JX(`translate3d(0, ${G}px, 0)`,D.initialTransform),fz(D.clientRect,I,0))}),this._previousSwap.overlaps=fve(u,n,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:o}}enter(e,n,i,r){let s=r==null||r<0?this._getItemIndexFromPointerPosition(e,n,i):r,o=this._activeDraggables,a=o.indexOf(e),l=e.getPlaceholderElement(),c=o[s];if(c===e&&(c=o[s+1]),!c&&(s==null||s===-1||s<o.length-1)&&this._shouldEnterAsFirstChild(n,i)&&(c=o[0]),a>-1&&o.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){let d=c.getRootElement();d.parentElement.insertBefore(l,d),o.splice(s,0,e)}else this._element.appendChild(l),o.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let n=e.getRootElement();if(n){let i=this._itemPositions.find(r=>r.drag===e)?.initialTransform;n.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===e)}updateOnScroll(e,n){this._itemPositions.forEach(({clientRect:i})=>{fz(i,e,n)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(n=>{let i=n.getVisibleElement();return{drag:n,offset:0,initialTransform:i.style.transform||"",clientRect:Cve(i)}}).sort((n,i)=>e?n.clientRect.left-i.clientRect.left:n.clientRect.top-i.clientRect.top)}_getItemOffsetPx(e,n,i){let r=this.orientation==="horizontal",s=r?n.left-e.left:n.top-e.top;return i===-1&&(s+=r?n.width-e.width:n.height-e.height),s}_getSiblingOffsetPx(e,n,i){let r=this.orientation==="horizontal",s=n[e].clientRect,o=n[e+i*-1],a=s[r?"width":"height"]*i;if(o){let l=r?"left":"top",c=r?"right":"bottom";i===-1?a-=o.clientRect[l]-s[c]:a+=s[l]-o.clientRect[c]}return a}_shouldEnterAsFirstChild(e,n){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,r=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return r?e>=o.right:n>=o.bottom}else{let o=i[0].clientRect;return r?e<=o.left:n<=o.top}}_getItemIndexFromPointerPosition(e,n,i,r){let s=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(r){let c=s?r.x:r.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return s?n>=Math.floor(l.left)&&n<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,e)?-1:o}},yve=class{constructor(e,n){this._document=e,this._dragDropRegistry=n,this._previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1},this._relatedNodes=[]}start(e){let n=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<n.length;i++){let r=n[i];this._relatedNodes.push([r,r.nextSibling])}this.withItems(e)}sort(e,n,i,r){let s=this._getItemIndexFromPointerPosition(e,n,i),o=this._previousSwap;if(s===-1||this._activeItems[s]===e)return null;let a=this._activeItems[s];if(o.drag===a&&o.overlaps&&o.deltaX===r.x&&o.deltaY===r.y)return null;let l=this.getItemIndex(e),c=e.getPlaceholderElement(),d=a.getRootElement();s>l?d.after(c):d.before(c),Xje(this._activeItems,l,s);let u=this._getRootNode().elementFromPoint(n,i);return o.deltaX=r.x,o.deltaY=r.y,o.drag=a,o.overlaps=d===u||d.contains(u),{previousIndex:l,currentIndex:s}}enter(e,n,i,r){let s=r==null||r<0?this._getItemIndexFromPointerPosition(e,n,i):r;s===-1&&(s=this._getClosestItemIndexToPointer(e,n,i));let o=this._activeItems[s],a=this._activeItems.indexOf(e);a>-1&&this._activeItems.splice(a,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(s,0,e),o.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,n=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[r,s]=this._relatedNodes[i];r.parentNode===e&&r.nextSibling!==s&&(s===null?e.appendChild(r):s.parentNode===e&&e.insertBefore(r,s))}this._relatedNodes=[],this._activeItems=[],n.drag=null,n.deltaX=n.deltaY=0,n.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,n,i){let r=this._getRootNode().elementFromPoint(Math.floor(n),Math.floor(i)),s=r?this._activeItems.findIndex(o=>{let a=o.getRootElement();return r===a||a.contains(r)}):-1;return s===-1||!this._sortPredicate(s,e)?-1:s}_getRootNode(){return this._rootNode||(this._rootNode=ok(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,n,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,s=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==e){let{x:l,y:c}=a.getRootElement().getBoundingClientRect(),d=Math.hypot(n-l,i-c);d<r&&(r=d,s=o)}}return s}},Kje=.05,Qje=.05,r6=function(t){return t[t.NONE=0]="NONE",t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t}(r6||{}),bg=function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t}(bg||{}),_ve=class{constructor(e,n,i,r,s){this._dragDropRegistry=n,this._ngZone=r,this._viewportRuler=s,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new Mi,this.entered=new Mi,this.exited=new Mi,this.dropped=new Mi,this.sorted=new Mi,this.receivingStarted=new Mi,this.receivingStopped=new Mi,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=na.EMPTY,this._verticalScrollDirection=r6.NONE,this._horizontalScrollDirection=bg.NONE,this._stopScrollTimers=new Mi,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),zM(0,Hde).pipe(Mr(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,l=this.autoScrollStep;this._verticalScrollDirection===r6.UP?a.scrollBy(0,-l):this._verticalScrollDirection===r6.DOWN&&a.scrollBy(0,l),this._horizontalScrollDirection===bg.LEFT?a.scrollBy(-l,0):this._horizontalScrollDirection===bg.RIGHT&&a.scrollBy(l,0)})};let o=this.element=Yp(e);this._document=i,this.withOrientation("vertical").withElementContainer(o),n.registerDropContainer(this),this._parentPositions=new QX(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,n,i,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,n,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,n,i,r,s,o,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:n,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:s,distance:o,dropPoint:a,event:l})}withItems(e){let n=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(n.filter(r=>r.isDragging()).every(r=>e.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof tQ&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new yve(this._document,this._dragDropRegistry);else{let n=new tQ(this._dragDropRegistry);n.direction=this._direction,n.orientation=e,this._sortStrategy=n}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((n,i)=>this.sortPredicate(n,i,this)),this}withScrollableParents(e){let n=this._container;return this._scrollableElements=e.indexOf(n)===-1?[n,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let n=Yp(this.element),i=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,n,i,r){if(this.sortingDisabled||!this._domRect||!Oje(this._domRect,Kje,n,i))return;let s=this._sortStrategy.sort(e,n,i,r);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,n){if(this.autoScrollDisabled)return;let i,r=r6.NONE,s=bg.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||Oje(o.clientRect,Kje,e,n)&&([r,s]=Eri(a,o.clientRect,this._direction,e,n),(r||s)&&(i=a))}),!r&&!s){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};r=Jje(l,n),s=e$e(l,e),i=window}i&&(r!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=s,this._scrollNode=i,(r||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(n=>n._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,n){return this._domRect!=null&&fve(this._domRect,e,n)}_getSiblingContainerFromPosition(e,n,i){return this._siblings.find(r=>r._canReceive(e,n,i))}_canReceive(e,n,i){if(!this._domRect||!fve(this._domRect,n,i)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(n,i);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,n){let i=this._activeSiblings;!i.has(e)&&n.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:n}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let n=this._parentPositions.handleScroll(e);n&&this._sortStrategy.updateOnScroll(n.top,n.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=ok(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(n=>n.isDragging());this._siblings.forEach(n=>n._startReceiving(this,e))}};ZX=Sh({passive:!1,capture:!0}),XX=new Set,Mri=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[xe],decls:0,vars:0,template:function(r,s){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0});let t=e;return t})(),kri=(()=>{let e=class e{constructor(i,r){this._ngZone=i,this._appRef=Ve(Cy),this._environmentInjector=Ve(fv),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=gt([]),this._globalListeners=new Map,this._draggingPredicate=s=>s.isDragging(),this.pointerMove=new Mi,this.pointerUp=new Mi,this.scroll=new Mi,this._preventDefaultWhileDragging=s=>{this._activeDragInstances().length>0&&s.preventDefault()},this._persistentTouchmoveListener=s=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&s.preventDefault(),this.pointerMove.next(s))},this._document=r}registerDropContainer(i){this._dropInstances.has(i)||this._dropInstances.add(i)}registerDragItem(i){this._dragInstances.add(i),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,ZX)})}removeDropContainer(i){this._dropInstances.delete(i)}removeDragItem(i){this._dragInstances.delete(i),this.stopDragging(i),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,ZX)}startDragging(i,r){if(!(this._activeDragInstances().indexOf(i)>-1)&&(this._loadResets(),this._activeDragInstances.update(s=>[...s,i]),this._activeDragInstances().length===1)){let s=r.type.startsWith("touch");this._globalListeners.set(s?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:ZX}),s||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:ZX}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,a)=>{this._document.addEventListener(a,o.handler,o.options)})})}}stopDragging(i){this._activeDragInstances.update(r=>{let s=r.indexOf(i);return s>-1?(r.splice(s,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(i){return this._activeDragInstances().indexOf(i)>-1}scrolled(i){let r=[this.scroll];return i&&i!==this._document&&r.push(new Qa(s=>this._ngZone.runOutsideAngular(()=>{let a=l=>{this._activeDragInstances().length&&s.next(l)};return i.addEventListener("scroll",a,!0),()=>{i.removeEventListener("scroll",a,!0)}}))),ra(...r)}ngOnDestroy(){this._dragInstances.forEach(i=>this.removeDragItem(i)),this._dropInstances.forEach(i=>this.removeDropContainer(i)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((i,r)=>{this._document.removeEventListener(r,i.handler,i.options)}),this._globalListeners.clear()}_loadResets(){if(!XX.has(this._appRef)){XX.add(this._appRef);let i=wj(Mri,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{XX.delete(this._appRef),XX.size===0&&i.destroy()})}}};e.\u0275fac=function(r){return new(r||e)(it(pn),it(Lr))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Iri={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Ari=(()=>{let e=class e{constructor(i,r,s,o){this._document=i,this._ngZone=r,this._viewportRuler=s,this._dragDropRegistry=o}createDrag(i,r=Iri){return new vve(i,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(i){return new _ve(i,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}};e.\u0275fac=function(r){return new(r||e)(it(Lr),it(pn),it(J2),it(kri))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Yje=new Ri("CDK_DRAG_PARENT"),Pri=new Ri("CdkDragHandle"),Rri=new Ri("CDK_DRAG_CONFIG"),Fri="cdk-drag",Lri=new Ri("CdkDropList"),t$e=(()=>{let e=class e{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(i){this._disabled=i,this._dragRef.disabled=this._disabled}constructor(i,r,s,o,a,l,c,d,u,m,f){this.element=i,this.dropContainer=r,this._ngZone=o,this._viewContainerRef=a,this._dir=c,this._changeDetectorRef=u,this._selfHandle=m,this._parentDrag=f,this._destroyed=new Mi,this._handles=new qs([]),this.scale=1,this.started=new nt,this.released=new nt,this.ended=new nt,this.entered=new nt,this.exited=new nt,this.dropped=new nt,this.moved=new Qa(_=>{let x=this._dragRef.moved.pipe(lr(D=>({source:this,pointerPosition:D.pointerPosition,event:D.event,delta:D.delta,distance:D.distance}))).subscribe(_);return()=>{x.unsubscribe()}}),this._injector=Ve($o),this._dragRef=d.createDrag(i,{dragStartThreshold:l&&l.dragStartThreshold!=null?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&l.pointerDirectionChangeThreshold!=null?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),l&&this._assignDefaults(l),r&&(this._dragRef._withDropContainer(r._dropListRef),r.addItem(this),r._dropListRef.beforeStarted.pipe(Mr(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(i){this._dragRef.setFreeDragPosition(i)}ngAfterViewInit(){wh(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(i){let r=i.rootElementSelector,s=i.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),s&&!s.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let i=e._dragInstances.indexOf(this);i>-1&&e._dragInstances.splice(i,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(i){let r=this._handles.getValue();r.push(i),this._handles.next(r)}_removeHandle(i){let r=this._handles.getValue(),s=r.indexOf(i);s>-1&&(r.splice(s,1),this._handles.next(r))}_setPreviewTemplate(i){this._previewTemplate=i}_resetPreviewTemplate(i){i===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(i){this._placeholderTemplate=i}_resetPlaceholderTemplate(i){i===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let i=this.element.nativeElement,r=i;this.rootElementSelector&&(r=i.closest!==void 0?i.closest(this.rootElementSelector):i.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||i)}_getBoundaryElement(){let i=this.boundaryElement;return i?typeof i=="string"?this.element.nativeElement.closest(i):Yp(i):null}_syncInputs(i){i.beforeStarted.subscribe(()=>{if(!i.isDragging()){let r=this._dir,s=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;i.disabled=this.disabled,i.lockAxis=this.lockAxis,i.scale=this.scale,i.dragStartDelay=typeof s=="object"&&s?s:Q0(s),i.constrainPosition=this.constrainPosition,i.previewClass=this.previewClass,i.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),r&&i.withDirection(r.value)}}),i.beforeStarted.pipe(ic(1)).subscribe(()=>{if(this._parentDrag){i.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){if(r.classList.contains(Fri)){i.withParent(e._dragInstances.find(s=>s.element.nativeElement===r)?._dragRef||null);break}r=r.parentElement}})}_handleEvents(i){i.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),i.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),i.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),i.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),i.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),i.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(i){let{lockAxis:r,dragStartDelay:s,constrainPosition:o,previewClass:a,boundaryElement:l,draggingDisabled:c,rootElementSelector:d,previewContainer:u}=i;this.disabled=c??!1,this.dragStartDelay=s||0,r&&(this.lockAxis=r),o&&(this.constrainPosition=o),a&&(this.previewClass=a),l&&(this.boundaryElement=l),d&&(this.rootElementSelector=d),u&&(this.previewContainer=u)}_setupHandlesListener(){this._handles.pipe(ac(i=>{let r=i.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),Fl(i=>ra(...i.map(r=>r._stateChanges.pipe(ll(r))))),Mr(this._destroyed)).subscribe(i=>{let r=this._dragRef,s=i.element.nativeElement;i.disabled?r.disableHandle(s):r.enableHandle(s)})}};e._dragInstances=[],e.\u0275fac=function(r){return new(r||e)(R(fi),R(Lri,12),R(Lr),R(pn),R(Na),R(Rri,8),R(Va,8),R(Ari),R(Kt),R(Pri,10),R(Yje,12))},e.\u0275dir=mi({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,s){r&2&&ki("cdk-drag-disabled",s.disabled)("cdk-drag-dragging",s._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",mn],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",xc]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[as([{provide:Yje,useExisting:e}]),Bs,yn]});let t=e;return t})()});function Nri(t,e){if(t&1&&(h(0,"div",5)(1,"div",7),ee(2,"nxt-spinner",8),p(),ee(3,"div",9),Ce(4,"safeHtml"),p()),t&2){let n=w().$implicit;g(2),b("size",30),g(),b("innerHTML",tt(4,2,n.content),Pi)}}function Vri(t,e){if(t&1){let n=re();h(0,"div",18),F("cdkDragEnded",function(r){V(n);let s=w(2).$implicit,o=w(2);return B(o.dragEnded(s,r,"name"))}),y(1),p()}if(t&2){let n=w(2).$implicit;g(),cn(" ",n.parsedContact.givenName," ",n.parsedContact.familyName," ")}}function Bri(t,e){if(t&1){let n=re();h(0,"div",18),F("cdkDragEnded",function(r){V(n);let s=w(2).$implicit,o=w(2);return B(o.dragEnded(s,r,"birthday"))}),y(1),Ce(2,"nxtDate"),p()}if(t&2){let n=w(2).$implicit;g(),Ke(" ",Nt(2,1,n.parsedContact.birthday,"dd.MM.yyyy")," ")}}function zri(t,e){if(t&1){let n=re();h(0,"div",19),F("cdkDragEnded",function(r){V(n);let s=w(2).$implicit,o=w(2);return B(o.dragEnded(s,r,"mobile"))})("cdkDragMoved",function(r){V(n);let s=w(2).$implicit,o=w(2);return B(o.dragMoved(s,r))}),y(1),p()}if(t&2){let n=w(2).$implicit;g(),Ke(" ",n.parsedContact.mobile," ")}}function Hri(t,e){if(t&1){let n=re();h(0,"div",20),F("cdkDragEnded",function(r){V(n);let s=w(2).$implicit,o=w(2);return B(o.dragEnded(s,r,"postalCode"))}),y(1),p()}if(t&2){let n=w(2).$implicit;g(),Ke(" ",n.parsedContact.postalCode," ")}}function Gri(t,e){if(t&1){let n=re();h(0,"div",20),F("cdkDragEnded",function(r){V(n);let s=w(2).$implicit,o=w(2);return B(o.dragEnded(s,r,"city"))}),y(1),p()}if(t&2){let n=w(2).$implicit;g(),Ke(" ",n.parsedContact.city," ")}}function Wri(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",21),F("click",function(){V(n);let r=w(2).$implicit,s=w(2);return B(s.createContactClicked(r))}),h(2,"div"),y(3,"ANLEGEN"),p()()()}}function Uri(t,e){if(t&1){let n=re();h(0,"nxt-button",21),F("click",function(){let r=V(n).$implicit,s=w(3).$implicit,o=w(2);return B(o.useMatchedContact(r,s.id))}),h(1,"div"),y(2),p(),h(3,"div"),y(4),Ce(5,"nxtDate"),p()()}if(t&2){let n=e.$implicit;g(2),cn("",n.givenName," ",n.familyName,""),g(2),ye(Nt(5,3,n.birthday,"dd.MM.yyyy"))}}function jri(t,e){if(t&1&&(h(0,"div"),Kn(1,Uri,6,6,"nxt-button",null,Ori),p()),t&2){let n=w(2).$implicit;g(),Yn(n.matchingContacts)}}function $ri(t,e){if(t&1){let n=re();h(0,"div",10)(1,"mat-icon",11),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.deleteParsedContactClicked(r))}),y(2,"close"),p(),h(3,"div")(4,"div",12)(5,"div"),y(6),Ce(7,"fromNowText"),p()(),h(8,"div",13),W(9,Vri,2,2,"div",14)(10,Bri,3,4,"div",14)(11,zri,2,1,"div",15)(12,Hri,2,1,"div",16)(13,Gri,2,1,"div",16),p(),h(14,"div"),ee(15,"br"),p()(),h(16,"div",17),W(17,Wri,4,0,"div")(18,jri,3,0,"div"),p()()}if(t&2){let n=w().$implicit,i=w(2);ki("highlight",i.highlightBoxId===n.id),b("id",n.id),g(5),jr(i.now()-n.createdAt>1e3*60*4?"red":"green"),g(),Ke(" ",tt(7,12,n.createdAt)," "),g(3),b("ngIf",n.parsedContact.givenName||n.parsedContact.familyName),g(),b("ngIf",n.parsedContact.birthday),g(),b("ngIf",n.parsedContact.mobile),g(),b("ngIf",n.parsedContact.postalCode),g(),b("ngIf",n.parsedContact.city),g(4),Je(n.matchingContacts.length===0?17:18)}}function Kri(t,e){if(t&1&&W(0,Nri,5,4,"div",5)(1,$ri,19,14,"div",6),t&2){let n=e.$implicit;Je(n.id.startsWith("loading")?0:1)}}function Yri(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),Kn(2,Kri,2,1,null,null,sa),p(),h(4,"div",3)(5,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.cancelClicked())}),y(6,"Abbrechen"),p()()()}if(t&2){let n=w();g(2),Yn(n.parsedContacts()),g(3),b("smallButton",!0)}}var Ori,n$e,r$e=Q(()=>{me();Gi();yi();ri();P0();o1();go();ls();Zi();B1();Ja();$v();i$e();ha();Lhe();Gy();me();ji();Ori=(t,e)=>e.id;n$e=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.parsedContacts=gt([]),this.now=gt(Date.now()),this.socketService=Ve(lt),this.cacheService=Ve(cc)}ngOnInit(){this.pushSubscription=this.cacheService.parsedContacts.subscribe(i=>{i.length===0?this.dialogRef.close():this.parsedContacts.set(i.sortNumber("createdAt"))}),this.refreshInterval=setInterval(()=>{this.parsedContacts.update(i=>i.filter(r=>!r.isLoading||r.createdAt>Date.now()-1e4))},1e4)}nxtOnDestroy(){Cu.clear(this.refreshInterval)}setData(i){}cancelClicked(){this.dialogRef.close()}deleteParsedContactClicked(i){this.socketService.deleteParsedContact(i.id).then()}dragEnded(i,r,s){let o=document.elementsFromPoint(r.dropPoint.x,r.dropPoint.y),a=!0;for(let l of o)l.id&&l.classList.contains("contact-card")&&l.id!==i.id&&(console.log(s+" | "+i.id+" -> "+l.id),this.socketService.swapParsedContactAttribute(i.id,l.id,s).then(),a=!1);a&&r.source._dragRef.reset(),this.highlightBoxId=""}dragMoved(i,r){this.highlightBoxId="";let s=document.elementsFromPoint(r.pointerPosition.x,r.pointerPosition.y);for(let o of s)o.id&&o.classList.contains("contact-card")&&o.id!==i.id&&(this.highlightBoxId=o.id)}createContactClicked(i){this.dialogRef.close({action:"createContact",parsedContact:i.parsedContact,id:i.id})}useMatchedContact(i,r){this.dialogRef.close({action:"useContact",contact:i,id:r})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-contact-parser"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["class","flex flex-col",4,"ngIf"],[1,"flex","flex-col"],[1,"flex","flex-row","gap-4","justify-center","p-1"],[1,"flex","flex-row","justify-center","w-full","pt-3"],[3,"click","smallButton"],[1,"contact-card","nxt-card-border","px-6","pt-2","pb-4","relative","flex","flex-col","justify-between"],[1,"contact-card","nxt-card-border","px-6","pt-2","pb-4","relative","flex","flex-col","justify-between",3,"id","highlight"],[1,"w-full","flex","flex-row","justify-center"],[3,"size"],[3,"innerHTML"],[1,"contact-card","nxt-card-border","px-6","pt-2","pb-4","relative","flex","flex-col","justify-between",3,"id"],[1,"absolute","right-[2px]","top-[2px]","cursor-pointer",3,"click"],[1,"flex","flex-col","items-center","text-70"],[1,"flex","flex-col","items-center","text-120","pt-1"],["class","cursor-pointer","cdkDrag","",3,"cdkDragEnded",4,"ngIf"],["class","cursor-pointer text-80","cdkDrag","",3,"cdkDragEnded","cdkDragMoved",4,"ngIf"],["class","cursor-pointer text-80","cdkDrag","",3,"cdkDragEnded",4,"ngIf"],[1,"flex","flex-row","justify-center"],["cdkDrag","",1,"cursor-pointer",3,"cdkDragEnded"],["cdkDrag","",1,"cursor-pointer","text-80",3,"cdkDragEnded","cdkDragMoved"],["cdkDrag","",1,"cursor-pointer","text-80",3,"cdkDragEnded"],[3,"click"]],template:function(r,s){r&1&&W(0,Yri,7,1,"div",0),r&2&&b("ngIf",s.parsedContacts())},dependencies:[Ct,Hn,Lt,ld,Zr,t$e,Or,yf],styles:[".contact-card.highlight[_ngcontent-%COMP%]{border-color:#fff}"],changeDetection:0});let t=e;return t})()});var s$e=Q(()=>{});function gz(t,e,n){let i=document.createElement(e);return t&&(i.className=t),n&&n.appendChild(i),i}function qri(t,e,n){let i=`translate3d(${t}px,${e||0}px,0)`;return n!==void 0&&(i+=` scale3d(${n},${n},1)`),i}function bve(t,e,n){t.style.width=typeof e=="number"?`${e}px`:e,t.style.height=typeof n=="number"?`${n}px`:n}function Zri(t){return"button"in t&&t.button===1||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function vz(t,e,n=document){let i=[];if(t instanceof Element)i=[t];else if(t instanceof NodeList||Array.isArray(t))i=Array.from(t);else{let r=typeof t=="string"?t:e;r&&(i=Array.from(n.querySelectorAll(r)))}return i}function Xri(t){return typeof t=="function"&&t.prototype&&t.prototype.goTo}function o$e(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}function Qri(t,e){if(t.getViewportSizeFn){let n=t.getViewportSizeFn(t,e);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function iQ(t,e,n,i,r){let s=0;if(e.paddingFn)s=e.paddingFn(n,i,r)[t];else if(e.padding)s=e.padding[t];else{let o="padding"+t[0].toUpperCase()+t.slice(1);e[o]&&(s=e[o])}return Number(s)||0}function Jri(t,e,n,i){return{x:e.x-iQ("left",t,e,n,i)-iQ("right",t,e,n,i),y:e.y-iQ("top",t,e,n,i)-iQ("bottom",t,e,n,i)}}function l$e(t,e,n){let i=e.createContentFromData(t,n),r,{options:s}=e;if(s){r=new Eve(s,t,-1);let o;e.pswp?o=e.pswp.viewportSize:o=Qri(s,e);let a=Jri(s,o,t,n);r.update(i.width,i.height,a)}return i.lazyLoad(),r&&i.setDisplayedSize(Math.ceil(i.width*r.initial),Math.ceil(i.height*r.initial)),i}function esi(t,e){let n=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:n}).defaultPrevented)return l$e(n,e,t)}var s6,wve,Sve,Tve,Dve,a$e,Eve,Mve,nQ,c$e=Q(()=>{s6={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};wve=class{constructor(e,n){this.type=e,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}},Sve=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,n,i=100){var r,s,o;this._filters[e]||(this._filters[e]=[]),(r=this._filters[e])===null||r===void 0||r.push({fn:n,priority:i}),(s=this._filters[e])===null||s===void 0||s.sort((a,l)=>a.priority-l.priority),(o=this.pswp)===null||o===void 0||o.addFilter(e,n,i)}removeFilter(e,n){this._filters[e]&&(this._filters[e]=this._filters[e].filter(i=>i.fn!==n)),this.pswp&&this.pswp.removeFilter(e,n)}applyFilters(e,...n){var i;return(i=this._filters[e])===null||i===void 0||i.forEach(r=>{n[0]=r.fn.apply(this,n)}),n[0]}on(e,n){var i,r;this._listeners[e]||(this._listeners[e]=[]),(i=this._listeners[e])===null||i===void 0||i.push(n),(r=this.pswp)===null||r===void 0||r.on(e,n)}off(e,n){var i;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(r=>n!==r)),(i=this.pswp)===null||i===void 0||i.off(e,n)}dispatch(e,n){var i;if(this.pswp)return this.pswp.dispatch(e,n);let r=new wve(e,n);return(i=this._listeners[e])===null||i===void 0||i.forEach(s=>{s.call(this,r)}),r}},Tve=class{constructor(e,n){if(this.element=gz("pswp__img pswp__img--placeholder",e?"img":"div",n),e){let i=this.element;i.decoding="async",i.alt="",i.src=e,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,n){this.element&&(this.element.tagName==="IMG"?(bve(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=qri(0,0,e/250)):bve(this.element,e,n))}destroy(){var e;(e=this.element)!==null&&e!==void 0&&e.parentNode&&this.element.remove(),this.element=null}},Dve=class{constructor(e,n,i){this.instance=n,this.data=e,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=s6.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,n){if(this.slide&&this.usePlaceholder())if(this.placeholder){let i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{let i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Tve(i,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=gz("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=gz("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var n,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;let r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=(n=this.data.src)!==null&&n!==void 0?n:"",r.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=s6.LOADING,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=s6.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===s6.LOADED||this.state===s6.ERROR)&&this.removePlaceholder())}onError(){this.state=s6.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===s6.LOADING,this)}isError(){return this.state===s6.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(e,n){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,n),!this.instance.dispatch("contentResize",{content:this,width:e,height:n}).defaultPrevented&&(bve(this.element,e,n),this.isImageContent()&&!this.isError()))){let i=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=n,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:n,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==s6.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let e=this.element,n=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||n>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=n+"px",e.dataset.largestUsedSize=String(n))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,n;let i=gz("pswp__error-msg","div");i.innerText=(e=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&e!==void 0?e:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=gz("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===s6.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||o$e())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!o$e()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===s6.LOADED||this.state===s6.ERROR)&&this.removePlaceholder()))}};a$e=4e3,Eve=class{constructor(e,n,i,r){this.pswp=r,this.options=e,this.itemData=n,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,n,i){let r={x:e,y:n};this.elementSize=r,this.panAreaSize=i;let s=i.x/r.x,o=i.y/r.y;this.fit=Math.min(1,s<o?s:o),this.fill=Math.min(1,s>o?s:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){let n=e+"ZoomLevel",i=this.options[n];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,this.fit*3),this.elementSize&&e*this.elementSize.x>a$e&&(e=a$e/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};Mve=class extends Sve{getNumItems(){var e;let n=0,i=(e=this.options)===null||e===void 0?void 0:e.dataSource;i&&"length"in i?n=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(n=i.items.length));let r=this.dispatch("numItems",{dataSource:i,numItems:n});return this.applyFilters("numItems",r.numItems,i)}createContentFromData(e,n){return new Dve(e,this,n)}getItemData(e){var n;let i=(n=this.options)===null||n===void 0?void 0:n.dataSource,r={};Array.isArray(i)?r=i[e]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),r=i.items[e]);let s=r;s instanceof Element&&(s=this._domElementToItemData(s));let o=this.dispatch("itemData",{itemData:s||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var n,i;return(n=this.options)!==null&&n!==void 0&&n.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?vz(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){let n={element:e},i=e.tagName==="A"?e:e.querySelector("a");if(i){n.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(n.srcset=i.dataset.pswpSrcset),n.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,n.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,i.dataset.pswpType&&(n.type=i.dataset.pswpType);let s=e.querySelector("img");if(s){var r;n.msrc=s.currentSrc||s.src,n.alt=(r=s.getAttribute("alt"))!==null&&r!==void 0?r:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,e,i)}lazyLoadData(e,n){return l$e(e,this,n)}},nQ=class extends Mve{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){vz(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if(Zri(e)||window.pswp)return;let n={x:e.clientX,y:e.clientY};!n.x&&!n.y&&(n=null);let i=this.getClickedIndex(e);i=this.applyFilters("clickedIndex",i,e,this);let r={gallery:e.currentTarget};i>=0&&(e.preventDefault(),this.loadAndOpen(i,r,n))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);let n=e.target,r=vz(this.options.children,this.options.childSelector,e.currentTarget).findIndex(s=>s===n||s.contains(n));return r!==-1?r:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,n,i){if(window.pswp||!this.options)return!1;if(!n&&this.options.gallery&&this.options.children){let r=vz(this.options.gallery);r[0]&&(n={gallery:r[0]})}return this.options.index=e,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(e,n),!0}preload(e,n){let{options:i}=this;n&&(i.dataSource=n);let r=[],s=typeof i.pswpModule;if(Xri(i.pswpModule))r.push(Promise.resolve(i.pswpModule));else{if(s==="string")throw new Error("pswpModule as string is no longer supported");if(s==="function")r.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&r.push(i.openPromise()),i.preloadFirstSlide!==!1&&e>=0&&(this._preloadedContent=esi(e,this));let o=++this._uid;Promise.all(r).then(a=>{if(this.shouldOpen){let l=a[0];this._openPhotoswipe(l,o)}})}_openPhotoswipe(e,n){if(n!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;let i=typeof e=="object"?new e.default(this.options):new e(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(r=>{var s;(s=this._listeners[r])===null||s===void 0||s.forEach(o=>{i.on(r,o)})}),Object.keys(this._filters).forEach(r=>{var s;(s=this._filters[r])===null||s===void 0||s.forEach(o=>{i.addFilter(r,o.fn,o.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){var e;(e=this.pswp)===null||e===void 0||e.destroy(),this.shouldOpen=!1,this._listeners={},vz(this.options.gallery,this.options.gallerySelector).forEach(n=>{n.removeEventListener("click",this.onThumbnailsClick,!1)})}}});function M4(t,e,n){let i=document.createElement(e);return t&&(i.className=t),n&&n.appendChild(i),i}function wf(t,e){return t.x=e.x,t.y=e.y,e.id!==void 0&&(t.id=e.id),t}function v$e(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function kve(t,e){let n=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y);return Math.sqrt(n*n+i*i)}function Cz(t,e){return t.x===e.x&&t.y===e.y}function bz(t,e,n){return Math.min(Math.max(t,e),n)}function xz(t,e,n){let i=`translate3d(${t}px,${e||0}px,0)`;return n!==void 0&&(i+=` scale3d(${n},${n},1)`),i}function kD(t,e,n,i){t.style.transform=xz(e,n,i)}function y$e(t,e,n,i){t.style.transition=e?`${e} ${n}ms ${i||tsi}`:"none"}function Ive(t,e,n){t.style.width=typeof e=="number"?`${e}px`:e,t.style.height=typeof n=="number"?`${n}px`:n}function isi(t){y$e(t)}function nsi(t){return"decode"in t?t.decode().catch(()=>{}):t.complete?Promise.resolve(t):new Promise((e,n)=>{t.onload=()=>e(t),t.onerror=n})}function rsi(t){return"button"in t&&t.button===1||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function ssi(t,e,n=document){let i=[];if(t instanceof Element)i=[t];else if(t instanceof NodeList||Array.isArray(t))i=Array.from(t);else{let r=typeof t=="string"?t:e;r&&(i=Array.from(n.querySelectorAll(r)))}return i}function d$e(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}function C$e(t,e){if(t.getViewportSizeFn){let n=t.getViewportSizeFn(t,e);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function _z(t,e,n,i,r){let s=0;if(e.paddingFn)s=e.paddingFn(n,i,r)[t];else if(e.padding)s=e.padding[t];else{let o="padding"+t[0].toUpperCase()+t.slice(1);e[o]&&(s=e[o])}return Number(s)||0}function x$e(t,e,n,i){return{x:e.x-_z("left",t,e,n,i)-_z("right",t,e,n,i),y:e.y-_z("top",t,e,n,i)-_z("bottom",t,e,n,i)}}function lsi(t,e){return t*e/(1-e)}function m$e(t,e,n){return t.x=(e.x+n.x)/2,t.y=(e.y+n.y)/2,t}function f$e(t){return!!t.target.closest(".pswp__container")}function _si(t){if(typeof t=="string")return t;if(!t||!t.isCustomSVG)return"";let e=t,n='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return n=n.split("%d").join(e.size||32),e.outlineID&&(n+='<use class="pswp__icn-shadow" xlink:href="#'+e.outlineID+'"/>'),n+=e.inner,n+="</svg>",n}function b$e(t,e,n){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),e.on("change",()=>{e.options.loop||(n?t.disabled=!(e.currIndex<e.getNumItems()-1):t.disabled=!(e.currIndex>0))})}function g$e(t,e){t.classList.toggle("pswp--zoomed-in",e)}function Dsi(t){let e=t.getBoundingClientRect();return{x:e.left,y:e.top,w:e.width}}function Esi(t,e,n){let i=t.getBoundingClientRect(),r=i.width/e,s=i.height/n,o=r>s?r:s,a=(i.width-e*o)/2,l=(i.height-n*o)/2,c={x:i.left+a,y:i.top+l,w:e*o};return c.innerRect={w:i.width,h:i.height,x:a,y:l},c}function Msi(t,e,n){let i=n.dispatch("thumbBounds",{index:t,itemData:e,instance:n});if(i.thumbBounds)return i.thumbBounds;let{element:r}=e,s,o;if(r&&n.options.thumbSelector!==!1){let a=n.options.thumbSelector||"img";o=r.matches(a)?r:r.querySelector(a)}return o=n.applyFilters("thumbEl",o,e,t),o&&(e.thumbCropped?s=Esi(o,e.width||e.w||0,e.height||e.h||0):s=Dsi(o)),n.applyFilters("thumbBounds",s,e,t)}function w$e(t,e,n){let i=e.createContentFromData(t,n),r,{options:s}=e;if(s){r=new rQ(s,t,-1);let o;e.pswp?o=e.pswp.viewportSize:o=C$e(s,e);let a=x$e(s,o,t,n);r.update(i.width,i.height,a)}return i.lazyLoad(),r&&i.setDisplayedSize(Math.ceil(i.width*r.initial),Math.ceil(i.height*r.initial)),i}function Isi(t,e){let n=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:n}).defaultPrevented)return w$e(n,e,t)}var tsi,o6,_$e,Ave,Pve,u$e,rQ,Rve,osi,asi,h$e,p$e,Fve,csi,dsi,Lve,Ove,usi,hsi,psi,Nve,msi,Vve,fsi,MD,Bve,gsi,zve,vsi,ysi,Hve,Gve,Wve,Uve,jve,Csi,xsi,bsi,wsi,Ssi,Tsi,$ve,Kve,Yve,qve,Zve,ksi,Xve,Qve,yz,Jve,Asi,sQ,S$e=Q(()=>{tsi="cubic-bezier(.4,0,.22,1)";o6={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};_$e=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{_$e=!0}}))}catch{}Ave=class{constructor(){this._pool=[]}add(e,n,i,r){this._toggleListener(e,n,i,r)}remove(e,n,i,r){this._toggleListener(e,n,i,r,!0)}removeAll(){this._pool.forEach(e=>{this._toggleListener(e.target,e.type,e.listener,e.passive,!0,!0)}),this._pool=[]}_toggleListener(e,n,i,r,s,o){if(!e)return;let a=s?"removeEventListener":"addEventListener";n.split(" ").forEach(c=>{if(c){o||(s?this._pool=this._pool.filter(u=>u.type!==c||u.listener!==i||u.target!==e):this._pool.push({target:e,type:c,listener:i,passive:r}));let d=_$e?{passive:r||!1}:!1;e[a](c,i,d)}})}};Pve=class{constructor(e){this.slide=e,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(e){this.currZoomLevel=e,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(e){let{pswp:n}=this.slide,i=this.slide[e==="x"?"width":"height"]*this.currZoomLevel,s=_z(e==="x"?"left":"top",n.options,n.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[e];this.center[e]=Math.round((o-i)/2)+s,this.max[e]=i>o?Math.round(o-i)+s:this.center[e],this.min[e]=i>o?s:this.center[e]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(e,n){return bz(n,this.max[e],this.min[e])}},u$e=4e3,rQ=class{constructor(e,n,i,r){this.pswp=r,this.options=e,this.itemData=n,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,n,i){let r={x:e,y:n};this.elementSize=r,this.panAreaSize=i;let s=i.x/r.x,o=i.y/r.y;this.fit=Math.min(1,s<o?s:o),this.fill=Math.min(1,s>o?s:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){let n=e+"ZoomLevel",i=this.options[n];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,this.fit*3),this.elementSize&&e*this.elementSize.x>u$e&&(e=u$e/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}},Rve=class{constructor(e,n,i){this.data=e,this.index=n,this.pswp=i,this.isActive=n===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new rQ(i.options,e,n,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:n}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=M4("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new Pve(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(e){e&&!this.isActive?this.activate():!e&&this.isActive&&this.deactivate()}append(e){this.holderElement=e,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){let{pswp:e}=this;this.heavyAppended||!e.opener.isOpen||e.mainScroll.isShifted()||!this.isActive&&!!0||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(e){let n=this.currentResolution||this.zoomLevels.initial;if(!n)return;let i=Math.round(this.width*n)||this.pswp.viewportSize.x,r=Math.round(this.height*n)||this.pswp.viewportSize.y;!this.sizeChanged(i,r)&&!e||this.content.setDisplayedSize(i,r)}sizeChanged(e,n){return e!==this.prevDisplayedWidth||n!==this.prevDisplayedHeight?(this.prevDisplayedWidth=e,this.prevDisplayedHeight=n,!0):!1}getPlaceholderElement(){var e;return(e=this.content.placeholder)===null||e===void 0?void 0:e.element}zoomTo(e,n,i,r){let{pswp:s}=this;if(!this.isZoomable()||s.mainScroll.isShifted())return;s.dispatch("beforeZoomTo",{destZoomLevel:e,centerPoint:n,transitionDuration:i}),s.animations.stopAllPan();let o=this.currZoomLevel;r||(e=bz(e,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(e),this.pan.x=this.calculateZoomToPanOffset("x",n,o),this.pan.y=this.calculateZoomToPanOffset("y",n,o),v$e(this.pan);let a=()=>{this._setResolution(e),this.applyCurrentZoomPan()};i?s.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:s.options.easing}):a()}toggleZoom(e){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,e,this.pswp.options.zoomAnimationDuration)}setZoomLevel(e){this.currZoomLevel=e,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(e,n,i){if(this.bounds.max[e]-this.bounds.min[e]===0)return this.bounds.center[e];n||(n=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);let s=this.currZoomLevel/i;return this.bounds.correctPan(e,(this.pan[e]-n[e])*s+n[e])}panTo(e,n){this.pan.x=this.bounds.correctPan("x",e),this.pan.y=this.bounds.correctPan("y",n),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),wf(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(e,n,i){i/=this.currentResolution||this.zoomLevels.initial,kD(this.container,e,n,i)}calculateSize(){let{pswp:e}=this;wf(this.panAreaSize,x$e(e.options,e.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),e.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){let e=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return xz(this.pan.x,this.pan.y,e)}_setResolution(e){e!==this.currentResolution&&(this.currentResolution=e,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}},osi=.35,asi=.6,h$e=.4,p$e=.5;Fve=class{constructor(e){this.gestures=e,this.pswp=e.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&wf(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){let{p1:e,prevP1:n,dragAxis:i}=this.gestures,{currSlide:r}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&r&&r.currZoomLevel<=r.zoomLevels.fit&&!this.gestures.isMultitouch){let s=r.pan.y+(e.y-n.y);if(!this.pswp.dispatch("verticalDrag",{panY:s}).defaultPrevented){this._setPanWithFriction("y",s,asi);let o=1-Math.abs(this._getVerticalDragRatio(r.pan.y));this.pswp.applyBgOpacity(o),r.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),r&&(v$e(r.pan),r.applyCurrentZoomPan()))}end(){let{velocity:e}=this.gestures,{mainScroll:n,currSlide:i}=this.pswp,r=0;if(this.pswp.animations.stopAll(),n.isShifted()){let o=(n.x-n.getCurrSlideX())/this.pswp.viewportSize.x;e.x<-p$e&&o<0||e.x<.1&&o<-.5?(r=1,e.x=Math.min(e.x,0)):(e.x>p$e&&o>0||e.x>-.1&&o>.5)&&(r=-1,e.x=Math.max(e.x,0)),n.moveIndexBy(r,!0,e.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(e){let{velocity:n}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;let{pan:r,bounds:s}=i,o=r[e],a=this.pswp.bgOpacity<1&&e==="y",c=o+lsi(n[e],.995);if(a){let _=this._getVerticalDragRatio(o),x=this._getVerticalDragRatio(c);if(_<0&&x<-h$e||_>0&&x>h$e){this.pswp.close();return}}let d=s.correctPan(e,c);if(o===d)return;let u=d===c?1:.82,m=this.pswp.bgOpacity,f=d-o;this.pswp.animations.startSpring({name:"panGesture"+e,isPan:!0,start:o,end:d,velocity:n[e],dampingRatio:u,onUpdate:_=>{if(a&&this.pswp.bgOpacity<1){let x=1-(d-_)/f;this.pswp.applyBgOpacity(bz(m+(1-m)*x,0,1))}r[e]=Math.floor(_),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(e){let{p1:n,dragAxis:i,prevP1:r,isMultitouch:s}=this.gestures,{currSlide:o,mainScroll:a}=this.pswp,l=n[e]-r[e],c=a.x+l;if(!l||!o)return!1;if(e==="x"&&!o.isPannable()&&!s)return a.moveTo(c,!0),!0;let{bounds:d}=o,u=o.pan[e]+l;if(this.pswp.options.allowPanToNext&&i==="x"&&e==="x"&&!s){let m=a.getCurrSlideX(),f=a.x-m,_=l>0,x=!_;if(u>d.min[e]&&_){if(d.min[e]<=this.startPan[e])return a.moveTo(c,!0),!0;this._setPanWithFriction(e,u)}else if(u<d.max[e]&&x){if(this.startPan[e]<=d.max[e])return a.moveTo(c,!0),!0;this._setPanWithFriction(e,u)}else if(f!==0){if(f>0)return a.moveTo(Math.max(c,m),!0),!0;if(f<0)return a.moveTo(Math.min(c,m),!0),!0}else this._setPanWithFriction(e,u)}else e==="y"?!a.isShifted()&&d.min.y!==d.max.y&&this._setPanWithFriction(e,u):this._setPanWithFriction(e,u);return!1}_getVerticalDragRatio(e){var n,i;return(e-((n=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&n!==void 0?n:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(e,n,i){let{currSlide:r}=this.pswp;if(!r)return;let{pan:s,bounds:o}=r;if(o.correctPan(e,n)!==n||i){let l=Math.round(n-s[e]);s[e]+=l*(i||osi)}else s[e]=n}},csi=.05,dsi=.15;Lve=class{constructor(e){this.gestures=e,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){let{currSlide:e}=this.gestures.pswp;e&&(this._startZoomLevel=e.currZoomLevel,wf(this._startPan,e.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){let{p1:e,startP1:n,p2:i,startP2:r,pswp:s}=this.gestures,{currSlide:o}=s;if(!o)return;let a=o.zoomLevels.min,l=o.zoomLevels.max;if(!o.isZoomable()||s.mainScroll.isShifted())return;m$e(this._startZoomPoint,n,r),m$e(this._zoomPoint,e,i);let c=1/kve(n,r)*kve(e,i)*this._startZoomLevel;if(c>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),c<a)if(s.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){let d=1-(a-c)/(a/1.2);s.dispatch("pinchClose",{bgOpacity:d}).defaultPrevented||s.applyBgOpacity(d)}else c=a-(a-c)*dsi;else c>l&&(c=l+(c-l)*csi);o.pan.x=this._calculatePanForZoomLevel("x",c),o.pan.y=this._calculatePanForZoomLevel("y",c),o.setZoomLevel(c),o.applyCurrentZoomPan()}end(){let{pswp:e}=this.gestures,{currSlide:n}=e;(!n||n.currZoomLevel<n.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&e.options.pinchToClose?e.close():this.correctZoomPan()}_calculatePanForZoomLevel(e,n){let i=n/this._startZoomLevel;return this._zoomPoint[e]-(this._startZoomPoint[e]-this._startPan[e])*i}correctZoomPan(e){let{pswp:n}=this.gestures,{currSlide:i}=n;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(e=!0);let r=i.currZoomLevel,s,o=!0;r<i.zoomLevels.initial?s=i.zoomLevels.initial:r>i.zoomLevels.max?s=i.zoomLevels.max:(o=!1,s=r);let a=n.bgOpacity,l=n.bgOpacity<1,c=wf({x:0,y:0},i.pan),d=wf({x:0,y:0},c);e&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=r,wf(this._startPan,c)),o&&(d={x:this._calculatePanForZoomLevel("x",s),y:this._calculatePanForZoomLevel("y",s)}),i.setZoomLevel(s),d={x:i.bounds.correctPan("x",d.x),y:i.bounds.correctPan("y",d.y)},i.setZoomLevel(r);let u=!Cz(d,c);if(!u&&!o&&!l){i._setResolution(s),i.applyCurrentZoomPan();return}n.animations.stopAllPan(),n.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:m=>{if(m/=1e3,u||o){if(u&&(i.pan.x=c.x+(d.x-c.x)*m,i.pan.y=c.y+(d.y-c.y)*m),o){let f=r+(s-r)*m;i.setZoomLevel(f)}i.applyCurrentZoomPan()}l&&n.bgOpacity<1&&n.applyBgOpacity(bz(a+(1-a)*m,0,1))},onComplete:()=>{i._setResolution(s),i.applyCurrentZoomPan()}})}};Ove=class{constructor(e){this.gestures=e}click(e,n){let i=n.target.classList,r=i.contains("pswp__img"),s=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");r?this._doClickOrTapAction("imageClick",e,n):s&&this._doClickOrTapAction("bgClick",e,n)}tap(e,n){f$e(n)&&this._doClickOrTapAction("tap",e,n)}doubleTap(e,n){f$e(n)&&this._doClickOrTapAction("doubleTap",e,n)}_doClickOrTapAction(e,n,i){var r;let{pswp:s}=this.gestures,{currSlide:o}=s,a=e+"Action",l=s.options[a];if(!s.dispatch(a,{point:n,originalEvent:i}).defaultPrevented){if(typeof l=="function"){l.call(s,n,i);return}switch(l){case"close":case"next":s[l]();break;case"zoom":o?.toggleZoom(n);break;case"zoom-or-close":o!=null&&o.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(n):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":(r=this.gestures.pswp.element)===null||r===void 0||r.classList.toggle("pswp--ui-visible");break}}}},usi=10,hsi=300,psi=25,Nve=class{constructor(e){this.pswp=e,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(e.options.allowPanToNext=!1),this.drag=new Fve(this),this.zoomLevels=new Lve(this),this.tapHandler=new Ove(this),e.on("bindEvents",()=>{e.events.add(e.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),e.scrollWrap&&(e.scrollWrap.ontouchmove=()=>{},e.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(e,n,i,r){let{pswp:s}=this,{events:o}=s,a=r?e+r:"";o.add(s.scrollWrap,e+n,this.onPointerDown.bind(this)),o.add(window,e+"move",this.onPointerMove.bind(this)),o.add(window,e+i,this.onPointerUp.bind(this)),a&&o.add(s.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(e){let n=e.type==="mousedown"||e.pointerType==="mouse";if(n&&e.button>0)return;let{pswp:i}=this;if(!i.opener.isOpen){e.preventDefault();return}i.dispatch("pointerDown",{originalEvent:e}).defaultPrevented||(n&&(i.mouseDetected(),this._preventPointerEventBehaviour(e,"down")),i.animations.stopAll(),this._updatePoints(e,"down"),this._numActivePoints===1&&(this.dragAxis=null,wf(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(e){this._preventPointerEventBehaviour(e,"move"),this._numActivePoints&&(this._updatePoints(e,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:e}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,wf(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(e){this._numActivePoints&&(this._updatePoints(e,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:e}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(e)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?Cz(this.p1,this.prevP1)||this.drag.change():(!Cz(this.p1,this.prevP1)||!Cz(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(e){let n=Date.now(),i=n-this._intervalTime;i<50&&!e||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=n,wf(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(e){let{mainScroll:n}=this.pswp;if(n.isShifted()){n.moveIndexBy(0,!0);return}if(e.type.indexOf("cancel")>0)return;if(e.type==="mouseup"||e.pointerType==="mouse"){this.tapHandler.click(this.startP1,e);return}let i=this.pswp.options.doubleTapAction?hsi:0;this._tapTimer?(this._clearTapTimer(),kve(this._lastStartP1,this.startP1)<psi&&this.tapHandler.doubleTap(this.startP1,e)):(wf(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,e),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(e,n){let i=this.p1[e]-this._intervalP1[e];return Math.abs(i)>1&&n>5?i/n:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(e,n){this.pswp.applyFilters("preventPointerEvent",!0,e,n)&&e.preventDefault()}_updatePoints(e,n){if(this._pointerEventEnabled){let i=e,r=this._ongoingPointers.findIndex(s=>s.id===i.pointerId);n==="up"&&r>-1?this._ongoingPointers.splice(r,1):n==="down"&&r===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):r>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[r]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&wf(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&wf(this.p2,this._ongoingPointers[1])}else{let i=e;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(e,this.p1),n==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){wf(this.prevP1,this.p1),wf(this.prevP2,this.p2)}_updateStartPoints(){wf(this.startP1,this.p1),wf(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{let e=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(e!==0){let n=e>0?"x":"y";Math.abs(this.p1[n]-this.startP1[n])>=usi&&(this.dragAxis=n)}}}_convertEventPosToPoint(e,n){return n.x=e.pageX-this.pswp.offset.x,n.y=e.pageY-this.pswp.offset.y,"pointerId"in e?n.id=e.pointerId:e.identifier!==void 0&&(n.id=e.identifier),n}_onClick(e){this.pswp.mainScroll.isShifted()&&(e.preventDefault(),e.stopPropagation())}},msi=.35,Vve=class{constructor(e){this.pswp=e,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(e){let{pswp:n}=this,i=Math.round(n.viewportSize.x+n.viewportSize.x*n.options.spacing),r=i!==this.slideWidth;r&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((s,o)=>{r&&kD(s.el,(o+this._containerShiftIndex)*this.slideWidth),e&&s.slide&&s.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let e=0;e<3;e++){let n=M4("pswp__item","div",this.pswp.container);n.setAttribute("role","group"),n.setAttribute("aria-roledescription","slide"),n.setAttribute("aria-hidden","true"),n.style.display=e===1?"block":"none",this.itemHolders.push({el:n})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(e,n,i){let{pswp:r}=this,s=r.potentialIndex+e,o=r.getNumItems();if(r.canLoop()){s=r.getLoopedIndex(s);let l=(e+o)%o;l<=o/2?e=l:e=l-o}else s<0?s=0:s>=o&&(s=o-1),e=s-r.potentialIndex;r.potentialIndex=s,this._currPositionIndex-=e,r.animations.stopMainScroll();let a=this.getCurrSlideX();if(!n)this.moveTo(a),this.updateCurrItem();else{r.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:c=>{this.moveTo(c)},onComplete:()=>{this.updateCurrItem(),r.appendHeavy()}});let l=r.potentialIndex-r.currIndex;if(r.canLoop()){let c=(l+o)%o;c<=o/2?l=c:l=c-o}Math.abs(l)>1&&this.updateCurrItem()}return!!e}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var e;let{pswp:n}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,n.currIndex=n.potentialIndex;let r=Math.abs(i),s;r>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),r=3,this.itemHolders.forEach(o=>{var a;(a=o.slide)===null||a===void 0||a.destroy(),o.slide=void 0}));for(let o=0;o<r;o++)i>0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this._containerShiftIndex++,kD(s.el,(this._containerShiftIndex+2)*this.slideWidth),n.setContent(s,n.currIndex-r+o+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this._containerShiftIndex--,kD(s.el,this._containerShiftIndex*this.slideWidth),n.setContent(s,n.currIndex+r-o-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),n.animations.stopAllPan(),this.itemHolders.forEach((o,a)=>{o.slide&&o.slide.setIsActive(a===1)}),n.currSlide=(e=this.itemHolders[1])===null||e===void 0?void 0:e.slide,n.contentLoader.updateLazy(i),n.currSlide&&n.currSlide.applyCurrentZoomPan(),n.dispatch("change")}moveTo(e,n){if(!this.pswp.canLoop()&&n){let i=(this.slideWidth*this._currPositionIndex-e)/this.slideWidth;i+=this.pswp.currIndex;let r=Math.round(e-this.x);(i<0&&r>0||i>=this.pswp.getNumItems()-1&&r<0)&&(e=this.x+r*msi)}this.x=e,this.pswp.container&&kD(this.pswp.container,e),this.pswp.dispatch("moveMainScroll",{x:e,dragging:n??!1})}},fsi={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},MD=(t,e)=>e?t:fsi[t],Bve=class{constructor(e){this.pswp=e,this._wasFocused=!1,e.on("bindEvents",()=>{e.options.trapFocus&&(e.options.initialPointerPos||this._focusRoot(),e.events.add(document,"focusin",this._onFocusIn.bind(this))),e.events.add(document,"keydown",this._onKeyDown.bind(this))});let n=document.activeElement;e.on("destroy",()=>{e.options.returnFocus&&n&&this._wasFocused&&n.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(e){let{pswp:n}=this;if(n.dispatch("keydown",{originalEvent:e}).defaultPrevented||rsi(e))return;let i,r,s=!1,o="key"in e;switch(o?e.key:e.keyCode){case MD("Escape",o):n.options.escKey&&(i="close");break;case MD("z",o):i="toggleZoom";break;case MD("ArrowLeft",o):r="x";break;case MD("ArrowUp",o):r="y";break;case MD("ArrowRight",o):r="x",s=!0;break;case MD("ArrowDown",o):s=!0,r="y";break;case MD("Tab",o):this._focusRoot();break}if(r){e.preventDefault();let{currSlide:a}=n;n.options.arrowKeys&&r==="x"&&n.getNumItems()>1?i=s?"next":"prev":a&&a.currZoomLevel>a.zoomLevels.fit&&(a.pan[r]+=s?-80:80,a.panTo(a.pan.x,a.pan.y))}i&&(e.preventDefault(),n[i]())}_onFocusIn(e){let{template:n}=this.pswp;n&&document!==e.target&&n!==e.target&&!n.contains(e.target)&&n.focus()}},gsi="cubic-bezier(.4,0,.22,1)",zve=class{constructor(e){var n;this.props=e;let{target:i,onComplete:r,transform:s,onFinish:o=()=>{},duration:a=333,easing:l=gsi}=e;this.onFinish=o;let c=s?"transform":"opacity",d=(n=e[c])!==null&&n!==void 0?n:"";this._target=i,this._onComplete=r,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{y$e(i,c,a,l),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[c]=d},30)},0)}_onTransitionEnd(e){e.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),isi(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},vsi=12,ysi=.75,Hve=class{constructor(e,n,i){this.velocity=e*1e3,this._dampingRatio=n||ysi,this._naturalFrequency=i||vsi,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(e,n){let i=0,r;n/=1e3;let s=Math.E**(-this._dampingRatio*this._naturalFrequency*n);if(this._dampingRatio===1)r=this.velocity+this._naturalFrequency*e,i=(e+r*n)*s,this.velocity=i*-this._naturalFrequency+r*s;else if(this._dampingRatio<1){r=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*e+this.velocity);let o=Math.cos(this._dampedFrequency*n),a=Math.sin(this._dampedFrequency*n);i=s*(e*o+r*a),this.velocity=i*-this._naturalFrequency*this._dampingRatio+s*(-this._dampedFrequency*e*a+this._dampedFrequency*r*o)}return i}},Gve=class{constructor(e){this.props=e,this._raf=0;let{start:n,end:i,velocity:r,onUpdate:s,onComplete:o,onFinish:a=()=>{},dampingRatio:l,naturalFrequency:c}=e;this.onFinish=a;let d=new Hve(r,l,c),u=Date.now(),m=n-i,f=()=>{this._raf&&(m=d.easeFrame(m,Date.now()-u),Math.abs(m)<1&&Math.abs(d.velocity)<50?(s(i),o&&o(),this.onFinish()):(u=Date.now(),s(m+i),this._raf=requestAnimationFrame(f)))};this._raf=requestAnimationFrame(f)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},Wve=class{constructor(){this.activeAnimations=[]}startSpring(e){this._start(e,!0)}startTransition(e){this._start(e)}_start(e,n){let i=n?new Gve(e):new zve(e);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(e){e.destroy();let n=this.activeAnimations.indexOf(e);n>-1&&this.activeAnimations.splice(n,1)}stopAll(){this.activeAnimations.forEach(e=>{e.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(e=>e.props.isPan?(e.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(e=>e.props.isMainScroll?(e.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(e=>e.props.isPan)}},Uve=class{constructor(e){this.pswp=e,e.events.add(e.element,"wheel",this._onWheel.bind(this))}_onWheel(e){e.preventDefault();let{currSlide:n}=this.pswp,{deltaX:i,deltaY:r}=e;if(n&&!this.pswp.dispatch("wheel",{originalEvent:e}).defaultPrevented)if(e.ctrlKey||this.pswp.options.wheelToZoom){if(n.isZoomable()){let s=-r;e.deltaMode===1?s*=.05:s*=e.deltaMode?1:.002,s=2**s;let o=n.currZoomLevel*s;n.zoomTo(o,{x:e.clientX,y:e.clientY})}}else n.isPannable()&&(e.deltaMode===1&&(i*=18,r*=18),n.panTo(n.pan.x-i,n.pan.y-r))}};jve=class{constructor(e,n){var i;let r=n.name||n.className,s=n.html;if(e.options[r]===!1)return;typeof e.options[r+"SVG"]=="string"&&(s=e.options[r+"SVG"]),e.dispatch("uiElementCreate",{data:n});let o="";n.isButton?(o+="pswp__button ",o+=n.className||`pswp__button--${n.name}`):o+=n.className||`pswp__${n.name}`;let a=n.isButton?n.tagName||"button":n.tagName||"div";a=a.toLowerCase();let l=M4(o,a);if(n.isButton){a==="button"&&(l.type="button");let{title:u}=n,{ariaLabel:m}=n;typeof e.options[r+"Title"]=="string"&&(u=e.options[r+"Title"]),u&&(l.title=u);let f=m||u;f&&l.setAttribute("aria-label",f)}l.innerHTML=_si(s),n.onInit&&n.onInit(l,e),n.onClick&&(l.onclick=u=>{typeof n.onClick=="string"?e[n.onClick]():typeof n.onClick=="function"&&n.onClick(u,l,e)});let c=n.appendTo||"bar",d=e.element;c==="bar"?(e.topBar||(e.topBar=M4("pswp__top-bar pswp__hide-on-close","div",e.scrollWrap)),d=e.topBar):(l.classList.add("pswp__hide-on-close"),c==="wrapper"&&(d=e.scrollWrap)),(i=d)===null||i===void 0||i.appendChild(e.applyFilters("uiElement",l,n))}};Csi={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:b$e},xsi={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,e)=>{b$e(t,e,!0)}},bsi={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},wsi={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},Ssi={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,e)=>{let n,i=null,r=(a,l)=>{t.classList.toggle("pswp__preloader--"+a,l)},s=a=>{n!==a&&(n=a,r("active",a))},o=()=>{var a;if(!((a=e.currSlide)!==null&&a!==void 0&&a.content.isLoading())){s(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var l;s(!!(!((l=e.currSlide)===null||l===void 0)&&l.content.isLoading())),i=null},e.options.preloaderDelay))};e.on("change",o),e.on("loadComplete",a=>{e.currSlide===a.slide&&o()}),e.ui&&(e.ui.updatePreloaderVisibility=o)}},Tsi={name:"counter",order:5,onInit:(t,e)=>{e.on("change",()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()})}};$ve=class{constructor(e){this.pswp=e,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){let{pswp:e}=this;this.isRegistered=!1,this.uiElementsData=[bsi,Csi,xsi,wsi,Ssi,Tsi],e.dispatch("uiRegister"),this.uiElementsData.sort((n,i)=>(n.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(n=>{this.registerElement(n)}),e.on("change",()=>{var n;(n=e.element)===null||n===void 0||n.classList.toggle("pswp--one-slide",e.getNumItems()===1)}),e.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(e){this.isRegistered?this.items.push(new jve(this.pswp,e)):this.uiElementsData.push(e)}_onZoomPanUpdate(){let{template:e,currSlide:n,options:i}=this.pswp;if(this.pswp.opener.isClosing||!e||!n)return;let{currZoomLevel:r}=n;if(this.pswp.opener.isOpen||(r=n.zoomLevels.initial),r===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=r;let s=n.zoomLevels.initial-n.zoomLevels.secondary;if(Math.abs(s)<.01||!n.isZoomable()){g$e(e,!1),e.classList.remove("pswp--zoom-allowed");return}e.classList.add("pswp--zoom-allowed");let o=r===n.zoomLevels.initial?n.zoomLevels.secondary:n.zoomLevels.initial;g$e(e,o<=r),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&e.classList.add("pswp--click-to-zoom")}};Kve=class{constructor(e,n){this.type=e,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}},Yve=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,n,i=100){var r,s,o;this._filters[e]||(this._filters[e]=[]),(r=this._filters[e])===null||r===void 0||r.push({fn:n,priority:i}),(s=this._filters[e])===null||s===void 0||s.sort((a,l)=>a.priority-l.priority),(o=this.pswp)===null||o===void 0||o.addFilter(e,n,i)}removeFilter(e,n){this._filters[e]&&(this._filters[e]=this._filters[e].filter(i=>i.fn!==n)),this.pswp&&this.pswp.removeFilter(e,n)}applyFilters(e,...n){var i;return(i=this._filters[e])===null||i===void 0||i.forEach(r=>{n[0]=r.fn.apply(this,n)}),n[0]}on(e,n){var i,r;this._listeners[e]||(this._listeners[e]=[]),(i=this._listeners[e])===null||i===void 0||i.push(n),(r=this.pswp)===null||r===void 0||r.on(e,n)}off(e,n){var i;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(r=>n!==r)),(i=this.pswp)===null||i===void 0||i.off(e,n)}dispatch(e,n){var i;if(this.pswp)return this.pswp.dispatch(e,n);let r=new Kve(e,n);return(i=this._listeners[e])===null||i===void 0||i.forEach(s=>{s.call(this,r)}),r}},qve=class{constructor(e,n){if(this.element=M4("pswp__img pswp__img--placeholder",e?"img":"div",n),e){let i=this.element;i.decoding="async",i.alt="",i.src=e,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,n){this.element&&(this.element.tagName==="IMG"?(Ive(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=xz(0,0,e/250)):Ive(this.element,e,n))}destroy(){var e;(e=this.element)!==null&&e!==void 0&&e.parentNode&&this.element.remove(),this.element=null}},Zve=class{constructor(e,n,i){this.instance=n,this.data=e,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=o6.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,n){if(this.slide&&this.usePlaceholder())if(this.placeholder){let i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{let i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new qve(i,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=M4("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=M4("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var n,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;let r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=(n=this.data.src)!==null&&n!==void 0?n:"",r.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=o6.LOADING,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=o6.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===o6.LOADED||this.state===o6.ERROR)&&this.removePlaceholder())}onError(){this.state=o6.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===o6.LOADING,this)}isError(){return this.state===o6.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(e,n){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,n),!this.instance.dispatch("contentResize",{content:this,width:e,height:n}).defaultPrevented&&(Ive(this.element,e,n),this.isImageContent()&&!this.isError()))){let i=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=n,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:n,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==o6.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let e=this.element,n=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||n>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=n+"px",e.dataset.largestUsedSize=String(n))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,n;let i=M4("pswp__error-msg","div");i.innerText=(e=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&e!==void 0?e:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=M4("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===o6.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||d$e())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!d$e()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===o6.LOADED||this.state===o6.ERROR)&&this.removePlaceholder()))}},ksi=5;Xve=class{constructor(e){this.pswp=e,this.limit=Math.max(e.options.preload[0]+e.options.preload[1]+1,ksi),this._cachedItems=[]}updateLazy(e){let{pswp:n}=this;if(n.dispatch("lazyLoad").defaultPrevented)return;let{preload:i}=n.options,r=e===void 0?!0:e>=0,s;for(s=0;s<=i[1];s++)this.loadSlideByIndex(n.currIndex+(r?s:-s));for(s=1;s<=i[0];s++)this.loadSlideByIndex(n.currIndex+(r?-s:s))}loadSlideByIndex(e){let n=this.pswp.getLoopedIndex(e),i=this.getContentByIndex(n);i||(i=Isi(n,this.pswp),i&&this.addToCache(i))}getContentBySlide(e){let n=this.getContentByIndex(e.index);return n||(n=this.pswp.createContentFromData(e.data,e.index),this.addToCache(n)),n.setSlide(e),n}addToCache(e){if(this.removeByIndex(e.index),this._cachedItems.push(e),this._cachedItems.length>this.limit){let n=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);n!==-1&&this._cachedItems.splice(n,1)[0].destroy()}}removeByIndex(e){let n=this._cachedItems.findIndex(i=>i.index===e);n!==-1&&this._cachedItems.splice(n,1)}getContentByIndex(e){return this._cachedItems.find(n=>n.index===e)}destroy(){this._cachedItems.forEach(e=>e.destroy()),this._cachedItems=[]}},Qve=class extends Yve{getNumItems(){var e;let n=0,i=(e=this.options)===null||e===void 0?void 0:e.dataSource;i&&"length"in i?n=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(n=i.items.length));let r=this.dispatch("numItems",{dataSource:i,numItems:n});return this.applyFilters("numItems",r.numItems,i)}createContentFromData(e,n){return new Zve(e,this,n)}getItemData(e){var n;let i=(n=this.options)===null||n===void 0?void 0:n.dataSource,r={};Array.isArray(i)?r=i[e]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),r=i.items[e]);let s=r;s instanceof Element&&(s=this._domElementToItemData(s));let o=this.dispatch("itemData",{itemData:s||{},index:e});return this.applyFilters("itemData",o.itemData,e)}_getGalleryDOMElements(e){var n,i;return(n=this.options)!==null&&n!==void 0&&n.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?ssi(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){let n={element:e},i=e.tagName==="A"?e:e.querySelector("a");if(i){n.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(n.srcset=i.dataset.pswpSrcset),n.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,n.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,i.dataset.pswpType&&(n.type=i.dataset.pswpType);let s=e.querySelector("img");if(s){var r;n.msrc=s.currentSrc||s.src,n.alt=(r=s.getAttribute("alt"))!==null&&r!==void 0?r:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,e,i)}lazyLoadData(e,n){return w$e(e,this,n)}},yz=.003,Jve=class{constructor(e){this.pswp=e,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),e.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;let e=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,e&&e.currZoomLevel*e.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){let e=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,e&&e.zoomLevels.initial*e.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){let{pswp:e}=this,n=this.pswp.currSlide,{options:i}=e;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&e._initialThumbBounds?this._thumbBounds=e._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=n?.getPlaceholderElement(),e.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&n?.content.usePlaceholder()&&(!this.isClosing||!e.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&n&&(n.zoomAndPanToInitial(),n.applyCurrentZoomPan());else{var r;this._animateRootOpacity=(r=i.showHideOpacity)!==null&&r!==void 0?r:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>yz,this._opacityElement=this._animateRootOpacity?e.element:e.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(e.element&&(e.element.style.opacity=String(yz)),e.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var s;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(s=this.pswp.currSlide)===null||s===void 0?void 0:s.holderElement,e.container&&(e.container.style.overflow="hidden",e.container.style.width=e.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(e.element&&(e.element.style.opacity=String(yz)),e.applyBgOpacity(1)):(this._animateBgOpacity&&e.bg&&(e.bg.style.opacity=String(yz)),e.element&&(e.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(yz)))):this.isClosing&&(e.mainScroll.itemHolders[0]&&(e.mainScroll.itemHolders[0].el.style.display="none"),e.mainScroll.itemHolders[2]&&(e.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&e.mainScroll.x!==0&&(e.mainScroll.resetPosition(),e.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(e=>{let n=!1,i=!0;nsi(this._placeholder).finally(()=>{n=!0,i||e(!0)}),setTimeout(()=>{i=!1,n&&e(!0)},50),setTimeout(e,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var e,n;(e=this.pswp.element)===null||e===void 0||e.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(n=this.pswp.element)===null||n===void 0||n.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){let{pswp:e}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,e.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),e.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)e.destroy();else if(this.isOpen){var n;this._animateZoom&&e.container&&(e.container.style.overflow="visible",e.container.style.width="100%"),(n=e.currSlide)===null||n===void 0||n.applyCurrentZoomPan()}}_animateToOpenState(){let{pswp:e}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),e.currSlide&&(e.currSlide.zoomAndPanToInitial(),this._animateTo(e.currSlide.container,"transform",e.currSlide.getCurrentTransform()))),this._animateBgOpacity&&e.bg&&this._animateTo(e.bg,"opacity",String(e.options.bgOpacity)),this._animateRootOpacity&&e.element&&this._animateTo(e.element,"opacity","1")}_animateToClosedState(){let{pswp:e}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&e.bgOpacity>.01&&e.bg&&this._animateTo(e.bg,"opacity","0"),this._animateRootOpacity&&e.element&&this._animateTo(e.element,"opacity","0")}_setClosedStateZoomPan(e){if(!this._thumbBounds)return;let{pswp:n}=this,{innerRect:i}=this._thumbBounds,{currSlide:r,viewportSize:s}=n;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){let o=-s.x+(this._thumbBounds.x-i.x)+i.w,a=-s.y+(this._thumbBounds.y-i.y)+i.h,l=s.x-i.w,c=s.y-i.h;e?(this._animateTo(this._cropContainer1,"transform",xz(o,a)),this._animateTo(this._cropContainer2,"transform",xz(l,c))):(kD(this._cropContainer1,o,a),kD(this._cropContainer2,l,c))}r&&(wf(r.pan,i||this._thumbBounds),r.currZoomLevel=this._thumbBounds.w/r.width,e?this._animateTo(r.container,"transform",r.getCurrentTransform()):r.applyCurrentZoomPan())}_animateTo(e,n,i){if(!this._duration){e.style[n]=i;return}let{animations:r}=this.pswp,s={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{r.activeAnimations.length||this._onAnimationComplete()},target:e};s[n]=i,r.startTransition(s)}},Asi={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},sQ=class extends Qve{constructor(e){super(),this.options=this._prepareOptions(e||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new Ave,this.animations=new Wve,this.mainScroll=new Vve(this),this.gestures=new Nve(this),this.opener=new Jve(this),this.keyboard=new Bve(this),this.contentLoader=new Xve(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let e="pswp--open";return this.gestures.supportsTouch&&(e+=" pswp--touch"),this.options.mainClass&&(e+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+e),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Uve(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{let{itemHolders:n}=this.mainScroll;n[0]&&(n[0].el.style.display="block",this.setContent(n[0],this.currIndex-1)),n[2]&&(n[2].el.style.display="block",this.setContent(n[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(e){let n=this.getNumItems();return this.options.loop&&(e>n-1&&(e-=n),e<0&&(e+=n)),bz(e,0,n-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(e=>{var n;(n=e.slide)===null||n===void 0||n.appendHeavy()})}goTo(e){this.mainScroll.moveIndexBy(this.getLoopedIndex(e)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...e){var n;(n=this.currSlide)===null||n===void 0||n.zoomTo(...e)}toggleZoom(){var e;(e=this.currSlide)===null||e===void 0||e.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var e;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(e=this.element)===null||e===void 0||e.remove(),this.mainScroll.itemHolders.forEach(n=>{var i;(i=n.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(e){this.contentLoader.removeByIndex(e),this.mainScroll.itemHolders.forEach((n,i)=>{var r,s;let o=((r=(s=this.currSlide)===null||s===void 0?void 0:s.index)!==null&&r!==void 0?r:0)-1+i;if(this.canLoop()&&(o=this.getLoopedIndex(o)),o===e&&(this.setContent(n,e,!0),i===1)){var a;this.currSlide=n.slide,(a=n.slide)===null||a===void 0||a.setIsActive(!0)}}),this.dispatch("change")}setContent(e,n,i){if(this.canLoop()&&(n=this.getLoopedIndex(n)),e.slide){if(e.slide.index===n&&!i)return;e.slide.destroy(),e.slide=void 0}if(!this.canLoop()&&(n<0||n>=this.getNumItems()))return;let r=this.getItemData(n);e.slide=new Rve(r,n,this),n===this.currIndex&&(this.currSlide=e.slide),e.slide.append(e.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(e){if(this.isDestroying)return;let n=C$e(this.options,this);!e&&Cz(n,this._prevViewportSize)||(wf(this._prevViewportSize,n),this.dispatch("beforeResize"),wf(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(e){this.bgOpacity=Math.max(e,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var e;this.hasMouse=!0,(e=this.element)===null||e===void 0||e.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(e,n){this.offset.x=e,this.offset.y=n,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=M4("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=M4("pswp__bg","div",this.element),this.scrollWrap=M4("pswp__scroll-wrap","section",this.element),this.container=M4("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new $ve(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return Msi(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(e){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(e.showHideAnimationType="none",e.zoomAnimationDuration=0),ve(ve({},Asi),e)}}});var N7,wz=Q(()=>{Vd();me();od();N7=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i){return Wn.toMoneyString(i,"\u20AC",!1)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"money2",type:e,pure:!0,standalone:!0});let t=e;return t})()});var iP,oQ=Q(()=>{me();iP=(()=>{let e=class e{constructor(){}transform(i){switch(i){case"ac":return"Aachen";case"ffm":return"Frankfurt";case"ab":return"Aschaffenburg";case"nu":return"N\xFCrnberg";case"ma":return"Mallorca";case"du":return"D\xFCsseldorf"}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtStudio",type:e,pure:!0,standalone:!0});let t=e;return t})()});function Psi(t,e){if(t&1){let n=re();h(0,"div",1),y(1),Ce(2,"nxtStudio"),Ce(3,"nxtDate"),Ce(4,"nxtDate"),Ce(5,"money2"),h(6,"div",2),F("click",function(){let r=V(n),s=w();return B(s.showEventClicked(r))}),y(7,"Termin \xF6ffnen"),p()()}if(t&2){let n=e;g(),vj(" ",tt(2,5,n.studio)," \u30FB ",Nt(3,7,n.start,"dd.MM.yy HH:mm")," - ",Nt(4,10,n.end,"HH:mm")," \u30FB ",n.artist," \u30FB ",tt(5,13,n.paymentSum)," \u30FB ")}}var T$e,D$e=Q(()=>{me();Gi();yi();go();wz();oQ();me();T$e=(()=>{let e=class e extends bt{constructor(){super(),this.slide=gt(null),this.eventFile=gt(null),this.visible=gt(!1),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.event=gt(null),qh(()=>O(this,null,function*(){this.visible(),this.cdRef.detectChanges()}))}ngOnInit(){return O(this,null,function*(){})}nxtOnDestroy(){this.visible.set(!1),this.cdRef.detectChanges()}showEventClicked(i){window.open("https://"+i.studio+".nxt-lvl.ink/e/"+i.id,"_blank")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-photo-swipe-info"]],standalone:!0,features:[et,xe],decls:2,vars:3,consts:[[1,"info-template-content"],[1,"flex","w-full","flex-row","justify-center","center"],[3,"click"]],template:function(r,s){if(r&1&&(h(0,"div",0),W(1,Psi,8,15,"div",1),p()),r&2){let o;mo("display",s.visible()?"":"none"),g(),Je((o=s.event())?1:-1,o)}},dependencies:[Hn,N7,iP],styles:[".info-template-content[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;background:#00000080;color:#fff;padding:10px;box-sizing:border-box}"],changeDetection:0});let t=e;return t})()});var nP,aQ=Q(()=>{me();c$e();S$e();$n();pa();D$e();fN();me();nP=(()=>{let e=class e{constructor(i,r){this.element=i,this.viewContainer=r,this.screenService=Ve(Z9),this.showInfoTemplate=!this.screenService.state.value.isMobile,this.changed$=new Mi,this.showEditIcon=br(!1,{alias:"nxtPhotoSwipeShowEditIcon"}),this.showShareIcon=br(!1,{alias:"nxtPhotoSwipeShowShareIcon"}),this.eventFiles=br([],{alias:"nxtPhotoSwipeEventFiles"}),this.events=br([],{alias:"nxtPhotoSwipeEvents"}),this.onEditClicked=j2({alias:"nxtPhotoSwipeOnEditClicked"}),this.onShareClicked=j2({alias:"nxtPhotoSwipeOnShareClicked"}),this.onImageOpen=j2({alias:"nxtPhotoSwipeOnOpen"}),this.onImageClose=j2({alias:"nxtPhotoSwipeOnClose"}),this.subscription=this.changed$.pipe(_0(200)).subscribe(()=>{this.initPhotoswipe()})}ngOnDestroy(){this.subscription.unsubscribe(),this.observer.disconnect(),this.removeInfoTemplate()}ngOnInit(){return O(this,null,function*(){this.observer=new MutationObserver(r=>{for(let s of r)if(s.type==="childList"&&s.addedNodes?.length>0&&s.addedNodes[0].tagName==="MAT-TOOLTIP-COMPONENT")return;this.changed$.next()});let i={childList:!0,characterData:!0};this.observer.observe(this.element.nativeElement,i)})}initPhotoswipe(){console.log("initPhotoswipe"),this.lightbox&&this.lightbox.destroy(),this.lightbox=new nQ({gallery:this.element.nativeElement,children:"a",pswpModule:sQ,wheelToZoom:!0}),this.lightbox.on("closingAnimationStart",i=>{this.removeInfoTemplate()}),this.lightbox.on("close",i=>{this.removeInfoTemplate(),this.onImageClose.emit({slide:this.lightbox.pswp.currSlide,id:this.lightbox.pswp.currSlide.data.element.id}),this.lastSlide=null}),this.lightbox.on("change",i=>{this.lastSlide&&(this.removeInfoTemplate(),this.onImageClose.emit({slide:this.lastSlide,id:this.lastSlide.data.element.id})),this.lastSlide=this.lightbox.pswp.currSlide,this.lastSlide&&(this.onImageOpen.emit({slide:this.lastSlide,id:this.lastSlide.data.element.id}),this.updateInfoTemplate(this.lastSlide))}),this.initButtons(),this.lightbox.init()}removeInfoTemplate(){document.querySelectorAll(".photo-swipe-custom-info-template").forEach(i=>i.remove()),this.infoTemplateComponentRef&&(this.infoTemplateComponentRef.destroy(),this.infoTemplateComponentRef=null)}updateInfoTemplate(i){if(this.removeInfoTemplate(),this.lightbox&&this.lightbox.pswp){let s=this.lightbox.pswp.element.querySelector('.pswp__item[aria-hidden="false"]');if(s){document.querySelectorAll(".photo-swipe-custom-info-template").forEach(l=>l.remove());let o=document.createElement("div");o.classList.add("photo-swipe-custom-info-template"),s.appendChild(o),this.infoTemplateComponentRef=wj(T$e,{environmentInjector:this.viewContainer.injector.get(fv)}),this.infoTemplateComponentRef.instance.slide.set(i);let a=this.eventFiles().find(l=>l.id===i.data.element.id);if(a){this.infoTemplateComponentRef.instance.eventFile.set(a);let l=this.events().find(c=>c.id===a.eventId);l&&this.infoTemplateComponentRef.instance.event.set(l)}this.infoTemplateComponentRef.instance.visible.set(this.showInfoTemplate),this.infoTemplateComponentRef.location.nativeElement.id="info-template",o.appendChild(this.infoTemplateComponentRef.location.nativeElement),this.infoTemplateComponentRef.changeDetectorRef.detectChanges(),this.infoTemplateComponentRef.changeDetectorRef.detectChanges()}}}toggleInfoTemplate(){this.showInfoTemplate=!this.showInfoTemplate,this.infoTemplateComponentRef&&this.infoTemplateComponentRef.instance.visible.set(this.showInfoTemplate)}initButtons(){this.lightbox.on("uiRegister",i=>{this.showEditIcon()&&this.lightbox.pswp.ui.registerElement({name:"custom-icon",order:8,isButton:!0,html:'<span class="material-symbols-outlined" style="color:#fff">edit</span>',onClick:(r,s)=>O(this,null,function*(){yield Sr.waitFor(()=>this.lightbox?.pswp?.currSlide,"currSlide",2e3),this.onEditClicked.emit({slide:this.lightbox.pswp.currSlide,id:this.lightbox.pswp.currSlide.data.element.id}),this.lightbox.pswp.close()})}),this.showShareIcon()&&this.lightbox.pswp.ui.registerElement({name:"custom-icon",order:8,isButton:!0,html:'<span class="material-symbols-outlined" style="color:#fff">share</span>',onClick:(r,s)=>O(this,null,function*(){yield Sr.waitFor(()=>this.lightbox?.pswp?.currSlide,"currSlide",2e3),this.onShareClicked.emit({slide:this.lightbox.pswp.currSlide,id:this.lightbox.pswp.currSlide.data.element.id}),this.lightbox.pswp.close()})}),this.lightbox.pswp.ui.registerElement({name:"custom-icon",order:9,isButton:!0,html:'<span class="material-symbols-outlined" style="color:#fff">info</span>',onClick:(r,s)=>O(this,null,function*(){this.toggleInfoTemplate()})})})}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Na))},e.\u0275dir=mi({type:e,selectors:[["","nxtPhotoSwipe",""]],inputs:{showEditIcon:[1,"nxtPhotoSwipeShowEditIcon","showEditIcon"],showShareIcon:[1,"nxtPhotoSwipeShowShareIcon","showShareIcon"],eventFiles:[1,"nxtPhotoSwipeEventFiles","eventFiles"],events:[1,"nxtPhotoSwipeEvents","events"]},outputs:{onEditClicked:"nxtPhotoSwipeOnEditClicked",onShareClicked:"nxtPhotoSwipeOnShareClicked",onImageOpen:"nxtPhotoSwipeOnOpen",onImageClose:"nxtPhotoSwipeOnClose"},standalone:!0});let t=e;return t})()});var E$e,e6e=Q(()=>{me();W_();me();E$e=(()=>{let e=class e{constructor(i,r){this.element=i,this.renderer=r,this.nxtDynamicSize=br(),this.nxtDynamicSizeMode=br("height"),this.style="",this.subscription=Tp(this.nxtDynamicSize).subscribe(s=>{this.renderer.setStyle(this.element.nativeElement,this.style,s?"1fr":"0fr")})}ngOnDestroy(){this.subscription.unsubscribe()}ngOnInit(){return O(this,null,function*(){this.renderer.setStyle(this.element.nativeElement,"display","grid"),this.nxtDynamicSizeMode()==="width"?(this.style="grid-template-columns",this.renderer.setStyle(this.element.nativeElement,"min-width","fit-content")):this.nxtDynamicSizeMode()==="height"&&(this.style="grid-template-rows",this.renderer.setStyle(this.element.nativeElement,"min-height","fit-content")),this.renderer.setStyle(this.element.nativeElement,this.style,this.nxtDynamicSize()?"1fr":"0fr"),this.renderer.setStyle(this.element.nativeElement,"transition",this.style+" 0.1s ease-in")})}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Ac))},e.\u0275dir=mi({type:e,selectors:[["","nxtDynamicSize",""]],inputs:{nxtDynamicSize:[1,"nxtDynamicSize"],nxtDynamicSizeMode:[1,"nxtDynamicSizeMode"]},standalone:!0});let t=e;return t})()});var M$e,k$e=Q(()=>{me();M$e=(()=>{let e=class e{constructor(i){i.nativeElement.classList.add("dragScroll"),requestAnimationFrame(()=>{this.supportTouch()||window.dragScroll.reset()})}supportTouch(){let i=window.navigator;return"ontouchstart"in window||navigator.maxTouchPoints&&navigator.maxTouchPoints>0||i.msMaxTouchPoints&&i.msMaxTouchPoints>0}waitForDragscrolls(){return O(this,null,function*(){return new Promise((i,r)=>{document.querySelectorAll(".dragscroll").length>0?i():setTimeout(()=>{i(this.waitForDragscrolls())},100)})})}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","nxtDragScroll",""]],standalone:!0});let t=e;return t})()});var Sz,I$e=Q(()=>{Yc();Sz=class t{static sortFiles(e){return Array.isArray(e)?Hr.sortWithGetter(e,t.getEventFileSortValue):[]}static getEventFileSortValue(e){switch(e.subType){case"templatePhoto":return"01_"+e.fileCreatedAt;case"stencilPhoto":return"02_"+e.fileCreatedAt;case"stencilVideo":return"03_"+e.fileCreatedAt;case"preTattooPhoto":return"04_"+e.fileCreatedAt;case"preTattooVideo":return"05_"+e.fileCreatedAt;case"tattooPhoto":return"06_"+e.fileCreatedAt;case"tattooVideo":return"07_"+e.fileCreatedAt;case"consent":return"10_"+e.fileCreatedAt;case"artistContract":return"99_"+e.fileCreatedAt}}}});var A$e,P$e=Q(()=>{me();A$e=(()=>{let e=class e{constructor(){}transform(i){switch(i){case"tattoo":return"Tattoo";case"stencil":return"Stencil";case"template":return"Vorlage";case"preTattoo":return"Vorher"}return""}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtPhotoType",type:e,pure:!0,standalone:!0});let t=e;return t})()});var P5,t6e=Q(()=>{P5=class t{static hastCorrectPageCount2(e){let n;return e.files?.some(i=>i.subType==="consent"&&i.consentData?.correctPageCount)?n=!0:n=t.hastCorrectPageCount(e.workType,e.pdf1Count),n}static hasConsent(e){return e.files?.some(n=>n.subType==="consent")?!0:(e?.pdf1Count||0)>0}static hastCorrectPageCount(e,n){return typeof n!="number"?!1:e==="tattoo"?[4,5].includes(n??0):e==="piercing"?[2,3].includes(n??0):!1}static getBestConsent(e){let n=e.files?.find(i=>i.subType==="consent"&&i.consentData?.correctPageCount&&i.consentData.hasAllCustomerSigns&&i.consentData.hasArtistSign&&i.consentData.hasAllDates);if(n||(n=e.files?.find(i=>i.subType==="consent"&&i.consentData?.correctPageCount),n)||(n=e.files?.find(i=>i.subType==="consent"),n))return n}static hasTattooPhoto(e){return e.files?.some(n=>n.subType==="tattooPhoto")?!0:(e?.mediaCount.tattooPhoto||0)>0}}});var a6,rP=Q(()=>{a6=(()=>{let e=class e{static getDriveFileTypeByGoogleDriveFilename(i){return i.endsWith(".mov")||i.endsWith(".mp4")||i.endsWith(".avi")?"video":i.endsWith(".pdf")?"pdf":"image"}static getDriveLink(i){return"https://drive.nxt-lvl.ink/get/"+i+"?t="+e.driveGetToken}static getDriveThumbLink(i){return"https://drive.nxt-lvl.ink/get-thumb/"+i+"?t="+e.driveGetToken}static getDriveFileSubTypeByGoogleDriveFilename(i){if(i.endsWith(".mov")||i.endsWith("webm")||i.endsWith("mp4")){if(i.startsWith("preTattoo"))return"preTattooVideo";if(i.startsWith("tattoo")||i.startsWith("202"))return"tattooVideo";if(i.startsWith("stencil"))return"stencilVideo"}else{if(i.startsWith("tattoo")||i.startsWith("202"))return"tattooPhoto";if(i.startsWith("preTattoo"))return"preTattooPhoto";if(i.startsWith("stencil"))return"stencilPhoto";if(i.startsWith("template"))return"templatePhoto"}if(i.endsWith(".pdf"))return"consent";throw Error("DriveSubType kann nicht anhand von "+i+" ermittelt werden")}};e.driveGetToken="";let t=e;return t})()});var V7,Tz=Q(()=>{rP();me();V7=(()=>{let e=class e{constructor(){}transform(i,r=!1,s=""){return r?a6.getDriveThumbLink(i)+"&reload="+s:a6.getDriveLink(i)+"&reload="+s}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtEventFile",type:e,pure:!0,standalone:!0});let t=e;return t})()});var Qy=xr((FUn,R$e)=>{var Dz;typeof window<"u"?Dz=window:typeof global<"u"?Dz=global:typeof self<"u"?Dz=self:Dz={};R$e.exports=Dz});var i6e=xr((LUn,L$e)=>{var F$e=Array.prototype.slice;L$e.exports=Rsi;function Rsi(t,e){for(("length"in t)||(t=[t]),t=F$e.call(t);t.length;){var n=t.shift(),i=e(n);if(i)return i;n.childNodes&&n.childNodes.length&&(t=F$e.call(n.childNodes).concat(t))}}});var N$e=xr((OUn,O$e)=>{O$e.exports=sP;function sP(t,e){if(!(this instanceof sP))return new sP(t,e);this.data=t,this.nodeValue=t,this.length=t.length,this.ownerDocument=e||null}sP.prototype.nodeType=8;sP.prototype.nodeName="#comment";sP.prototype.toString=function(){return"[object Comment]"}});var B$e=xr((NUn,V$e)=>{V$e.exports=B7;function B7(t,e){if(!(this instanceof B7))return new B7(t);this.data=t||"",this.length=this.data.length,this.ownerDocument=e||null}B7.prototype.type="DOMTextNode";B7.prototype.nodeType=3;B7.prototype.nodeName="#text";B7.prototype.toString=function(){return this.data};B7.prototype.replaceData=function(e,n,i){var r=this.data,s=r.substring(0,e),o=r.substring(e+n,r.length);this.data=s+i+o,this.length=this.data.length}});var n6e=xr((VUn,z$e)=>{z$e.exports=Fsi;function Fsi(t){var e=this,n=t.type;t.target||(t.target=e),e.listeners||(e.listeners={});var i=e.listeners[n];if(i)return i.forEach(function(r){t.currentTarget=e,typeof r=="function"?r(t):r.handleEvent(t)});e.parentNode&&e.parentNode.dispatchEvent(t)}});var r6e=xr((BUn,H$e)=>{H$e.exports=Lsi;function Lsi(t,e){var n=this;n.listeners||(n.listeners={}),n.listeners[t]||(n.listeners[t]=[]),n.listeners[t].indexOf(e)===-1&&n.listeners[t].push(e)}});var s6e=xr((zUn,G$e)=>{G$e.exports=Osi;function Osi(t,e){var n=this;if(n.listeners&&n.listeners[t]){var i=n.listeners[t],r=i.indexOf(e);r!==-1&&i.splice(r,1)}}});var $$e=xr((HUn,j$e)=>{j$e.exports=W$e;var Nsi=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function W$e(t){switch(t.nodeType){case 3:return o6e(t.data);case 8:return"<!--"+t.data+"-->";default:return Vsi(t)}}function Vsi(t){var e=[],n=t.tagName;return t.namespaceURI==="http://www.w3.org/1999/xhtml"&&(n=n.toLowerCase()),e.push("<"+n+Gsi(t)+Hsi(t)),Nsi.indexOf(n)>-1?e.push(" />"):(e.push(">"),t.childNodes.length?e.push.apply(e,t.childNodes.map(W$e)):t.textContent||t.innerText?e.push(o6e(t.textContent||t.innerText)):t.innerHTML&&e.push(t.innerHTML),e.push("</"+n+">")),e.join("")}function Bsi(t,e){var n=typeof t[e];return e==="style"&&Object.keys(t.style).length>0?!0:t.hasOwnProperty(e)&&(n==="string"||n==="boolean"||n==="number")&&e!=="nodeName"&&e!=="className"&&e!=="tagName"&&e!=="textContent"&&e!=="innerText"&&e!=="namespaceURI"&&e!=="innerHTML"}function zsi(t){if(typeof t=="string")return t;var e="";return Object.keys(t).forEach(function(n){var i=t[n];n=n.replace(/[A-Z]/g,function(r){return"-"+r.toLowerCase()}),e+=n+":"+i+";"}),e}function Hsi(t){var e=t.dataset,n=[];for(var i in e)n.push({name:"data-"+i,value:e[i]});return n.length?U$e(n):""}function U$e(t){var e=[];return t.forEach(function(n){var i=n.name,r=n.value;i==="style"&&(r=zsi(r)),e.push(i+'="'+Wsi(r)+'"')}),e.length?" "+e.join(" "):""}function Gsi(t){var e=[];for(var n in t)Bsi(t,n)&&e.push({name:n,value:t[n]});for(var i in t._attributes)for(var r in t._attributes[i]){var s=t._attributes[i][r],o=(s.prefix?s.prefix+":":"")+r;e.push({name:o,value:s.value})}return t.className&&e.push({name:"class",value:t.className}),e.length?U$e(e):""}function o6e(t){var e="";return typeof t=="string"?e=t:t&&(e=t.toString()),e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Wsi(t){return o6e(t).replace(/"/g,"&quot;")}});var l6e=xr((GUn,Y$e)=>{var a6e=i6e(),Usi=n6e(),jsi=r6e(),$si=s6e(),Ksi=$$e(),K$e="http://www.w3.org/1999/xhtml";Y$e.exports=Fh;function Fh(t,e,n){if(!(this instanceof Fh))return new Fh(t);var i=n===void 0?K$e:n||null;this.tagName=i===K$e?String(t).toUpperCase():t,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=e||null,this.namespaceURI=i,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}Fh.prototype.type="DOMElement";Fh.prototype.nodeType=1;Fh.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e};Fh.prototype.replaceChild=function(e,n){e.parentNode&&e.parentNode.removeChild(e);var i=this.childNodes.indexOf(n);return n.parentNode=null,this.childNodes[i]=e,e.parentNode=this,n};Fh.prototype.removeChild=function(e){var n=this.childNodes.indexOf(e);return this.childNodes.splice(n,1),e.parentNode=null,e};Fh.prototype.insertBefore=function(e,n){e.parentNode&&e.parentNode.removeChild(e);var i=n==null?-1:this.childNodes.indexOf(n);return i>-1?this.childNodes.splice(i,0,e):this.childNodes.push(e),e.parentNode=this,e};Fh.prototype.setAttributeNS=function(e,n,i){var r=null,s=n,o=n.indexOf(":");if(o>-1&&(r=n.substr(0,o),s=n.substr(o+1)),this.tagName==="INPUT"&&n==="type")this.type=i;else{var a=this._attributes[e]||(this._attributes[e]={});a[s]={value:i,prefix:r}}};Fh.prototype.getAttributeNS=function(e,n){var i=this._attributes[e],r=i&&i[n]&&i[n].value;return this.tagName==="INPUT"&&n==="type"?this.type:typeof r!="string"?null:r};Fh.prototype.removeAttributeNS=function(e,n){var i=this._attributes[e];i&&delete i[n]};Fh.prototype.hasAttributeNS=function(e,n){var i=this._attributes[e];return!!i&&n in i};Fh.prototype.setAttribute=function(e,n){return this.setAttributeNS(null,e,n)};Fh.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)};Fh.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)};Fh.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)};Fh.prototype.removeEventListener=$si;Fh.prototype.addEventListener=jsi;Fh.prototype.dispatchEvent=Usi;Fh.prototype.focus=function(){};Fh.prototype.toString=function(){return Ksi(this)};Fh.prototype.getElementsByClassName=function(e){var n=e.split(" "),i=[];return a6e(this,function(r){if(r.nodeType===1){var s=r.className||"",o=s.split(" ");n.every(function(a){return o.indexOf(a)!==-1})&&i.push(r)}}),i};Fh.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var n=[];return a6e(this.childNodes,function(i){i.nodeType===1&&(e==="*"||i.tagName.toLowerCase()===e)&&n.push(i)}),n};Fh.prototype.contains=function(e){return a6e(this,function(n){return e===n})||!1}});var Z$e=xr((WUn,q$e)=>{var c6e=l6e();q$e.exports=R5;function R5(t){if(!(this instanceof R5))return new R5;this.childNodes=[],this.parentNode=null,this.ownerDocument=t||null}R5.prototype.type="DocumentFragment";R5.prototype.nodeType=11;R5.prototype.nodeName="#document-fragment";R5.prototype.appendChild=c6e.prototype.appendChild;R5.prototype.replaceChild=c6e.prototype.replaceChild;R5.prototype.removeChild=c6e.prototype.removeChild;R5.prototype.toString=function(){return this.childNodes.map(function(e){return String(e)}).join("")}});var Q$e=xr((UUn,X$e)=>{X$e.exports=d6e;function d6e(t){}d6e.prototype.initEvent=function(e,n,i){this.type=e,this.bubbles=n,this.cancelable=i};d6e.prototype.preventDefault=function(){}});var eKe=xr((jUn,J$e)=>{var Ysi=i6e(),qsi=N$e(),Zsi=B$e(),Ez=l6e(),Xsi=Z$e(),Qsi=Q$e(),Jsi=n6e(),eoi=r6e(),toi=s6e();J$e.exports=lQ;function lQ(){if(!(this instanceof lQ))return new lQ;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var k4=lQ.prototype;k4.createTextNode=function(e){return new Zsi(e,this)};k4.createElementNS=function(e,n){var i=e===null?null:String(e);return new Ez(n,this,i)};k4.createElement=function(e){return new Ez(e,this)};k4.createDocumentFragment=function(){return new Xsi(this)};k4.createEvent=function(e){return new Qsi(e)};k4.createComment=function(e){return new qsi(e,this)};k4.getElementById=function(e){e=String(e);var n=Ysi(this.childNodes,function(i){if(String(i.id)===e)return i});return n||null};k4.getElementsByClassName=Ez.prototype.getElementsByClassName;k4.getElementsByTagName=Ez.prototype.getElementsByTagName;k4.contains=Ez.prototype.contains;k4.removeEventListener=toi;k4.addEventListener=eoi;k4.dispatchEvent=Jsi});var iKe=xr(($Un,tKe)=>{var ioi=eKe();tKe.exports=new ioi});var u6e=xr((KUn,rKe)=>{var nKe=typeof global<"u"?global:typeof window<"u"?window:{},noi=iKe(),Mz;typeof document<"u"?Mz=document:(Mz=nKe["__GLOBAL_DOCUMENT_CACHE@4"],Mz||(Mz=nKe["__GLOBAL_DOCUMENT_CACHE@4"]=noi));rKe.exports=Mz});var oKe=xr((YUn,sKe)=>{sKe.exports=roi;function roi(t,e){var n,i=null;try{n=JSON.parse(t,e)}catch(r){i=r}return[i,n]}});var aKe=xr((qUn,xx)=>{function h6e(){return xx.exports=h6e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xx.exports.__esModule=!0,xx.exports.default=xx.exports,h6e.apply(null,arguments)}xx.exports=h6e,xx.exports.__esModule=!0,xx.exports.default=xx.exports});var cKe=xr((ZUn,lKe)=>{lKe.exports=ooi;var soi=Object.prototype.toString;function ooi(t){if(!t)return!1;var e=soi.call(t);return e==="[object Function]"||typeof t=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}});var hKe=xr((XUn,uKe)=>{"use strict";function aoi(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=loi(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function loi(t,e){if(t){if(typeof t=="string")return dKe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dKe(t,e)}}function dKe(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var coi=function(){function t(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var e=t.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},e.addInterceptor=function(i,r){this.typeToInterceptorsMap_.has(i)||this.typeToInterceptorsMap_.set(i,new Set);var s=this.typeToInterceptorsMap_.get(i);return s.has(r)?!1:(s.add(r),!0)},e.removeInterceptor=function(i,r){var s=this.typeToInterceptorsMap_.get(i);return s&&s.has(r)?(s.delete(r),!0):!1},e.clearInterceptorsByType=function(i){var r=this.typeToInterceptorsMap_.get(i);return r?(this.typeToInterceptorsMap_.delete(i),this.typeToInterceptorsMap_.set(i,new Set),!0):!1},e.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},e.getForType=function(i){return this.typeToInterceptorsMap_.get(i)||new Set},e.execute=function(i,r){for(var s=this.getForType(i),o=aoi(s),a;!(a=o()).done;){var l=a.value;try{r=l(r)}catch{}}return r},t}();uKe.exports=coi});var mKe=xr((QUn,pKe)=>{"use strict";var doi=function(){function t(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var e=t.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},e.getMaxAttempts=function(){return this.maxAttempts_},e.setMaxAttempts=function(i){this.maxAttempts_=i},e.getDelayFactor=function(){return this.delayFactor_},e.setDelayFactor=function(i){this.delayFactor_=i},e.getFuzzFactor=function(){return this.fuzzFactor_},e.setFuzzFactor=function(i){this.fuzzFactor_=i},e.getInitialDelay=function(){return this.initialDelay_},e.setInitialDelay=function(i){this.initialDelay_=i},e.createRetry=function(i){var r=i===void 0?{}:i,s=r.maxAttempts,o=r.delayFactor,a=r.fuzzFactor,l=r.initialDelay;return new uoi({maxAttempts:s||this.maxAttempts_,delayFactor:o||this.delayFactor_,fuzzFactor:a||this.fuzzFactor_,initialDelay:l||this.initialDelay_})},t}(),uoi=function(){function t(n){this.maxAttempts_=n.maxAttempts,this.delayFactor_=n.delayFactor,this.fuzzFactor_=n.fuzzFactor,this.currentDelay_=n.initialDelay,this.currentAttempt_=1}var e=t.prototype;return e.moveToNextAttempt=function(){this.currentAttempt_++;var i=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+i},e.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},e.getCurrentDelay=function(){return this.currentDelay_},e.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},e.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},e.getCurrentFuzzedDelay=function(){var i=this.getCurrentMinPossibleDelay(),r=this.getCurrentMaxPossibleDelay();return i+Math.random()*(r-i)},t}();pKe.exports=doi});var gKe=xr((JUn,fKe)=>{"use strict";var hoi=Qy(),poi=function(e,n){return n===void 0&&(n=!1),function(i,r,s){if(i){e(i);return}if(r.statusCode>=400&&r.statusCode<=599){var o=s;if(n)if(hoi.TextDecoder){var a=moi(r.headers&&r.headers["content-type"]);try{o=new TextDecoder(a).decode(s)}catch{}}else o=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:o});return}e(null,s)}};function moi(t){return t===void 0&&(t=""),t.toLowerCase().split(";").reduce(function(e,n){var i=n.split("="),r=i[0],s=i[1];return r.trim()==="charset"?s.trim():e},"utf-8")}fKe.exports=poi});var CKe=xr((ejn,m6e)=>{"use strict";var vKe=Qy(),foi=aKe(),goi=cKe(),yKe=hKe(),voi=mKe();Em.httpHandler=gKe();Em.requestInterceptorsStorage=new yKe;Em.responseInterceptorsStorage=new yKe;Em.retryManager=new voi;var yoi=function(e){var n={};return e&&e.trim().split(`
`).forEach(function(i){var r=i.indexOf(":"),s=i.slice(0,r).trim().toLowerCase(),o=i.slice(r+1).trim();typeof n[s]>"u"?n[s]=o:Array.isArray(n[s])?n[s].push(o):n[s]=[n[s],o]}),n};m6e.exports=Em;m6e.exports.default=Em;Em.XMLHttpRequest=vKe.XMLHttpRequest||boi;Em.XDomainRequest="withCredentials"in new Em.XMLHttpRequest?Em.XMLHttpRequest:vKe.XDomainRequest;_oi(["get","put","post","patch","head","delete"],function(t){Em[t==="delete"?"del":t]=function(e,n,i){return n=_Ke(e,n,i),n.method=t.toUpperCase(),p6e(n)}});function _oi(t,e){for(var n=0;n<t.length;n++)e(t[n])}function Coi(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function _Ke(t,e,n){var i=t;return goi(e)?(n=e,typeof t=="string"&&(i={uri:t})):i=foi({},e,{uri:t}),i.callback=n,i}function Em(t,e,n){return e=_Ke(t,e,n),p6e(e)}function p6e(t){if(typeof t.callback>"u")throw new Error("callback argument missing");if(t.requestType&&Em.requestInterceptorsStorage.getIsEnabled()){var e={uri:t.uri||t.url,headers:t.headers||{},body:t.body,metadata:t.metadata||{},retry:t.retry,timeout:t.timeout},n=Em.requestInterceptorsStorage.execute(t.requestType,e);t.uri=n.uri,t.headers=n.headers,t.body=n.body,t.metadata=n.metadata,t.retry=n.retry,t.timeout=n.timeout}var i=!1,r=function(G,A,Y){i||(i=!0,t.callback(G,A,Y))};function s(){c.readyState===4&&!Em.responseInterceptorsStorage.getIsEnabled()&&setTimeout(l,0)}function o(){var z=void 0;if(c.response?z=c.response:z=c.responseText||xoi(c),E)try{z=JSON.parse(z)}catch{}return z}function a(z){if(clearTimeout(M),clearTimeout(t.retryTimeout),z instanceof Error||(z=new Error(""+(z||"Unknown XMLHttpRequest Error"))),z.statusCode=0,!u&&Em.retryManager.getIsEnabled()&&t.retry&&t.retry.shouldRetry()){t.retryTimeout=setTimeout(function(){t.retry.moveToNextAttempt(),t.xhr=c,p6e(t)},t.retry.getCurrentFuzzedDelay());return}if(t.requestType&&Em.responseInterceptorsStorage.getIsEnabled()){var G={headers:I.headers||{},body:I.body,responseUrl:c.responseURL,responseType:c.responseType},A=Em.responseInterceptorsStorage.execute(t.requestType,G);I.body=A.body,I.headers=A.headers}return r(z,I)}function l(){if(!u){var z;clearTimeout(M),clearTimeout(t.retryTimeout),t.useXDR&&c.status===void 0?z=200:z=c.status===1223?204:c.status;var G=I,A=null;if(z!==0?(G={body:o(),statusCode:z,method:f,headers:{},url:m,rawRequest:c},c.getAllResponseHeaders&&(G.headers=yoi(c.getAllResponseHeaders()))):A=new Error("Internal XMLHttpRequest Error"),t.requestType&&Em.responseInterceptorsStorage.getIsEnabled()){var Y={headers:G.headers||{},body:G.body,responseUrl:c.responseURL,responseType:c.responseType},X=Em.responseInterceptorsStorage.execute(t.requestType,Y);G.body=X.body,G.headers=X.headers}return r(A,G,G.body)}}var c=t.xhr||null;c||(t.cors||t.useXDR?c=new Em.XDomainRequest:c=new Em.XMLHttpRequest);var d,u,m=c.url=t.uri||t.url,f=c.method=t.method||"GET",_=t.body||t.data,x=c.headers=t.headers||{},D=!!t.sync,E=!1,M,I={body:void 0,headers:{},statusCode:0,method:f,url:m,rawRequest:c};if("json"in t&&t.json!==!1&&(E=!0,x.accept||x.Accept||(x.Accept="application/json"),f!=="GET"&&f!=="HEAD"&&(x["content-type"]||x["Content-Type"]||(x["Content-Type"]="application/json"),_=JSON.stringify(t.json===!0?_:t.json))),c.onreadystatechange=s,c.onload=l,c.onerror=a,c.onprogress=function(){},c.onabort=function(){u=!0,clearTimeout(t.retryTimeout)},c.ontimeout=a,c.open(f,m,!D,t.username,t.password),D||(c.withCredentials=!!t.withCredentials),!D&&t.timeout>0&&(M=setTimeout(function(){if(!u){u=!0,c.abort("timeout");var z=new Error("XMLHttpRequest timeout");z.code="ETIMEDOUT",a(z)}},t.timeout)),c.setRequestHeader)for(d in x)x.hasOwnProperty(d)&&c.setRequestHeader(d,x[d]);else if(t.headers&&!Coi(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&typeof t.beforeSend=="function"&&t.beforeSend(c),c.send(_||null),c}function xoi(t){try{if(t.responseType==="document")return t.responseXML;var e=t.responseXML&&t.responseXML.documentElement.nodeName==="parsererror";if(t.responseType===""&&!e)return t.responseXML}catch{}return null}function boi(){}});var EKe=xr((tjn,DKe)=>{var xKe=u6e(),g6e=Object.create||function(){function t(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function I4(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}I4.prototype=g6e(Error.prototype);I4.prototype.constructor=I4;I4.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function v6e(t){function e(i,r,s,o){return(i|0)*3600+(r|0)*60+(s|0)+(o|0)/1e3}var n=t.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function Iz(){this.values=g6e(null)}Iz.prototype={set:function(t,e){!this.get(t)&&e!==""&&(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var i=0;i<n.length;++i)if(e===n[i]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){var n;return(n=e.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(e=parseFloat(e),e>=0&&e<=100)?(this.set(t,e),!0):!1}};function kz(t,e,n,i){var r=i?t.split(i):[t];for(var s in r)if(typeof r[s]=="string"){var o=r[s].split(n);if(o.length===2){var a=o[0].trim(),l=o[1].trim();e(a,l)}}}function woi(t,e,n){var i=t;function r(){var a=v6e(t);if(a===null)throw new I4(I4.Errors.BadTimeStamp,"Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),a}function s(a,l){var c=new Iz;kz(a,function(d,u){switch(d){case"region":for(var m=n.length-1;m>=0;m--)if(n[m].id===u){c.set(d,n[m].region);break}break;case"vertical":c.alt(d,u,["rl","lr"]);break;case"line":var f=u.split(","),_=f[0];c.integer(d,_),c.percent(d,_)&&c.set("snapToLines",!1),c.alt(d,_,["auto"]),f.length===2&&c.alt("lineAlign",f[1],["start","center","end"]);break;case"position":f=u.split(","),c.percent(d,f[0]),f.length===2&&c.alt("positionAlign",f[1],["start","center","end"]);break;case"size":c.percent(d,u);break;case"align":c.alt(d,u,["start","center","end","left","right"]);break}},/:/,/\s/),l.region=c.get("region",null),l.vertical=c.get("vertical","");try{l.line=c.get("line","auto")}catch{}l.lineAlign=c.get("lineAlign","start"),l.snapToLines=c.get("snapToLines",!0),l.size=c.get("size",100);try{l.align=c.get("align","center")}catch{l.align=c.get("align","middle")}try{l.position=c.get("position","auto")}catch{l.position=c.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},l.align)}l.positionAlign=c.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},l.align)}function o(){t=t.replace(/^\s+/,"")}if(o(),e.startTime=r(),o(),t.substr(0,3)!=="-->")throw new I4(I4.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+i);t=t.substr(3),o(),e.endTime=r(),o(),s(t,e)}var f6e=xKe.createElement&&xKe.createElement("textarea"),Soi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},bKe={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Toi={v:"title",lang:"lang"},wKe={rt:"ruby"};function TKe(t,e){function n(){if(!e)return null;function _(D){return e=e.substr(D.length),D}var x=e.match(/^([^<]*)(<[^>]*>?)?/);return _(x[1]?x[1]:x[2])}function i(_){return f6e.innerHTML=_,_=f6e.textContent,f6e.textContent="",_}function r(_,x){return!wKe[x.localName]||wKe[x.localName]===_.localName}function s(_,x){var D=Soi[_];if(!D)return null;var E=t.document.createElement(D),M=Toi[_];return M&&x&&(E[M]=x.trim()),E}for(var o=t.document.createElement("div"),a=o,l,c=[];(l=n())!==null;){if(l[0]==="<"){if(l[1]==="/"){c.length&&c[c.length-1]===l.substr(2).replace(">","")&&(c.pop(),a=a.parentNode);continue}var d=v6e(l.substr(1,l.length-2)),u;if(d){u=t.document.createProcessingInstruction("timestamp",d),a.appendChild(u);continue}var m=l.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!m||(u=s(m[1],m[3]),!u)||!r(a,u))continue;if(m[2]){var f=m[2].split(".");f.forEach(function(_){var x=/^bg_/.test(_),D=x?_.slice(3):_;if(bKe.hasOwnProperty(D)){var E=x?"background-color":"color",M=bKe[D];u.style[E]=M}}),u.className=f.join(" ")}c.push(m[1]),a.appendChild(u),a=u;continue}a.appendChild(t.document.createTextNode(i(l)))}return o}var SKe=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Doi(t){for(var e=0;e<SKe.length;e++){var n=SKe[e];if(t>=n[0]&&t<=n[1])return!0}return!1}function Eoi(t){var e=[],n="",i;if(!t||!t.childNodes)return"ltr";function r(a,l){for(var c=l.childNodes.length-1;c>=0;c--)a.push(l.childNodes[c])}function s(a){if(!a||!a.length)return null;var l=a.pop(),c=l.textContent||l.innerText;if(c){var d=c.match(/^.*(\n|\r)/);return d?(a.length=0,d[0]):c}if(l.tagName==="ruby")return s(a);if(l.childNodes)return r(a,l),s(a)}for(r(e,t);n=s(e);)for(var o=0;o<n.length;o++)if(i=n.charCodeAt(o),Doi(i))return"rtl";return"ltr"}function Moi(t){if(typeof t.line=="number"&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,i=0,r=0;r<n.length&&n[r]!==e;r++)n[r].mode==="showing"&&i++;return++i*-1}function dQ(){}dQ.prototype.applyStyles=function(t,e){e=e||this.div;for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])};dQ.prototype.formatStyle=function(t,e){return t===0?0:t+e};function cQ(t,e,n){dQ.call(this),this.cue=e,this.cueDiv=TKe(t,e.text);var i={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=t.document.createElement("div"),i={direction:Eoi(this.cueDiv),writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:e.align==="middle"?"center":e.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(i),this.div.appendChild(this.cueDiv);var r=0;switch(e.positionAlign){case"start":case"line-left":r=e.position;break;case"center":r=e.position-e.size/2;break;case"end":case"line-right":r=e.position-e.size;break}e.vertical===""?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(s){this.applyStyles({top:this.formatStyle(s.top,"px"),bottom:this.formatStyle(s.bottom,"px"),left:this.formatStyle(s.left,"px"),right:this.formatStyle(s.right,"px"),height:this.formatStyle(s.height,"px"),width:this.formatStyle(s.width,"px")})}}cQ.prototype=g6e(dQ.prototype);cQ.prototype.constructor=cQ;function wg(t){var e,n,i,r;if(t.div){n=t.div.offsetHeight,i=t.div.offsetWidth,r=t.div.offsetTop;var s=(s=t.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();t=t.div.getBoundingClientRect(),e=s?Math.max(s[0]&&s[0].height||0,t.height/s.length):0}this.left=t.left,this.right=t.right,this.top=t.top||r,this.height=t.height||n,this.bottom=t.bottom||r+(t.height||n),this.width=t.width||i,this.lineHeight=e!==void 0?e:t.lineHeight}wg.prototype.move=function(t,e){switch(e=e!==void 0?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break}};wg.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top};wg.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1};wg.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right};wg.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}};wg.prototype.intersectPercentage=function(t){var e=Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left)),n=Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top)),i=e*n;return i/(this.height*this.width)};wg.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}};wg.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,i=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t;var r={left:t.left,right:t.right,top:t.top||i,height:t.height||e,bottom:t.bottom||i+(t.height||e),width:t.width||n};return r};function koi(t,e,n,i){function r(D,E){for(var M,I=new wg(D),z=1,G=0;G<E.length;G++){for(;D.overlapsOppositeAxis(n,E[G])||D.within(n)&&D.overlapsAny(i);)D.move(E[G]);if(D.within(n))return D;var A=D.intersectPercentage(n);z>A&&(M=new wg(D),z=A),D=new wg(I)}return M||I}var s=new wg(e),o=e.cue,a=Moi(o),l=[];if(o.snapToLines){var c;switch(o.vertical){case"":l=["+y","-y"],c="height";break;case"rl":l=["+x","-x"],c="width";break;case"lr":l=["-x","+x"],c="width";break}var d=s.lineHeight,u=d*Math.round(a),m=n[c]+d,f=l[0];Math.abs(u)>m&&(u=u<0?-1:1,u*=Math.ceil(m/d)*d),a<0&&(u+=o.vertical===""?n.height:n.width,l=l.reverse()),s.move(f,u)}else{var _=s.lineHeight/n.height*100;switch(o.lineAlign){case"center":a-=_/2;break;case"end":a-=_;break}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")});break}l=["+y","-x","+x","-y"],s=new wg(e)}var x=r(s,l);e.move(x.toCSSCompatValues(n))}function oP(){}oP.StringDecoder=function(){return{decode:function(t){if(!t)return"";if(typeof t!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};oP.convertCueToDOMTree=function(t,e){return!t||!e?null:TKe(t,e)};var Ioi=.05,Aoi="sans-serif",Poi="1.5%";oP.processCues=function(t,e,n){if(!t||!e||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=t.document.createElement("div");i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin=Poi,n.appendChild(i);function r(d){for(var u=0;u<d.length;u++)if(d[u].hasBeenReset||!d[u].displayState)return!0;return!1}if(!r(e)){for(var s=0;s<e.length;s++)i.appendChild(e[s].displayState);return}var o=[],a=wg.getSimpleBoxPosition(i),l=Math.round(a.height*Ioi*100)/100,c={font:l+"px "+Aoi};(function(){for(var d,u,m=0;m<e.length;m++)u=e[m],d=new cQ(t,u,c),i.appendChild(d.div),koi(t,d,a,o),u.displayState=d.div,o.push(wg.getSimpleBoxPosition(d))})()};oP.Parser=function(t,e,n){n||(n=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]};oP.Parser.prototype={reportOrThrowError:function(t){if(t instanceof I4)this.onparsingerror&&this.onparsingerror(t);else throw t},parse:function(t){var e=this;t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));function n(){for(var d=e.buffer,u=0;u<d.length&&d[u]!=="\r"&&d[u]!==`
`;)++u;var m=d.substr(0,u);return d[u]==="\r"&&++u,d[u]===`
`&&++u,e.buffer=d.substr(u),m}function i(d){var u=new Iz;if(kz(d,function(f,_){switch(f){case"id":u.set(f,_);break;case"width":u.percent(f,_);break;case"lines":u.integer(f,_);break;case"regionanchor":case"viewportanchor":var x=_.split(",");if(x.length!==2)break;var D=new Iz;if(D.percent("x",x[0]),D.percent("y",x[1]),!D.has("x")||!D.has("y"))break;u.set(f+"X",D.get("x")),u.set(f+"Y",D.get("y"));break;case"scroll":u.alt(f,_,["up"]);break}},/=/,/\s/),u.has("id")){var m=new(e.vttjs.VTTRegion||e.window.VTTRegion);m.width=u.get("width",100),m.lines=u.get("lines",3),m.regionAnchorX=u.get("regionanchorX",0),m.regionAnchorY=u.get("regionanchorY",100),m.viewportAnchorX=u.get("viewportanchorX",0),m.viewportAnchorY=u.get("viewportanchorY",100),m.scroll=u.get("scroll",""),e.onregion&&e.onregion(m),e.regionList.push({id:u.get("id"),region:m})}}function r(d){var u=new Iz;kz(d,function(m,f){switch(m){case"MPEGT":u.integer(m+"S",f);break;case"LOCA":u.set(m+"L",v6e(f));break}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:u.get("MPEGTS"),LOCAL:u.get("LOCAL")})}function s(d){d.match(/X-TIMESTAMP-MAP/)?kz(d,function(u,m){switch(u){case"X-TIMESTAMP-MAP":r(m);break}},/=/):kz(d,function(u,m){switch(u){case"Region":i(m);break}},/:/)}try{var o;if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;o=n();var a=o.match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new I4(I4.Errors.BadSignature);e.state="HEADER"}for(var l=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(l?l=!1:o=n(),e.state){case"HEADER":/:/.test(o)?s(o):o||(e.state="ID");continue;case"NOTE":o||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){e.state="NOTE";break}if(!o)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch{e.cue.align="middle"}if(e.state="CUE",o.indexOf("-->")===-1){e.cue.id=o;continue}case"CUE":try{woi(o,e.cue,e.regionList)}catch(d){e.reportOrThrowError(d),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var c=o.indexOf("-->")!==-1;if(!o||c&&(l=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+=`
`),e.cue.text+=o.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":o||(e.state="ID");continue}}}catch(d){e.reportOrThrowError(d),e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||t.state==="HEADER")&&(t.buffer+=`

`,t.parse()),t.state==="INITIAL")throw new I4(I4.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};DKe.exports=oP});var IKe=xr((ijn,kKe)=>{var Roi="auto",Foi={"":1,lr:1,rl:1},Loi={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function Ooi(t){if(typeof t!="string")return!1;var e=Foi[t.toLowerCase()];return e?t.toLowerCase():!1}function y6e(t){if(typeof t!="string")return!1;var e=Loi[t.toLowerCase()];return e?t.toLowerCase():!1}function MKe(t,e,n){this.hasBeenReset=!1;var i="",r=!1,s=t,o=e,a=n,l=null,c="",d=!0,u="auto",m="start",f="auto",_="auto",x=100,D="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return i},set:function(E){i=""+E}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(E){r=!!E}},startTime:{enumerable:!0,get:function(){return s},set:function(E){if(typeof E!="number")throw new TypeError("Start time must be set to a number.");s=E,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return o},set:function(E){if(typeof E!="number")throw new TypeError("End time must be set to a number.");o=E,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return a},set:function(E){a=""+E,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(E){l=E,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(E){var M=Ooi(E);if(M===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");c=M,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(E){d=!!E,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(E){if(typeof E!="number"&&E!==Roi)throw new SyntaxError("Line: an invalid number or illegal string was specified.");u=E,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(E){var M=y6e(E);M?(m=M,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return f},set:function(E){if(E<0||E>100)throw new Error("Position must be between 0 and 100.");f=E,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return _},set:function(E){var M=y6e(E);M?(_=M,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return x},set:function(E){if(E<0||E>100)throw new Error("Size must be between 0 and 100.");x=E,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return D},set:function(E){var M=y6e(E);if(!M)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");D=M,this.hasBeenReset=!0}}}),this.displayState=void 0}MKe.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};kKe.exports=MKe});var PKe=xr((njn,AKe)=>{var Noi={"":!0,up:!0};function Voi(t){if(typeof t!="string")return!1;var e=Noi[t.toLowerCase()];return e?t.toLowerCase():!1}function Az(t){return typeof t=="number"&&t>=0&&t<=100}function Boi(){var t=100,e=3,n=0,i=100,r=0,s=100,o="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(a){if(!Az(a))throw new Error("Width must be between 0 and 100.");t=a}},lines:{enumerable:!0,get:function(){return e},set:function(a){if(typeof a!="number")throw new TypeError("Lines must be set to a number.");e=a}},regionAnchorY:{enumerable:!0,get:function(){return i},set:function(a){if(!Az(a))throw new Error("RegionAnchorX must be between 0 and 100.");i=a}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(a){if(!Az(a))throw new Error("RegionAnchorY must be between 0 and 100.");n=a}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(a){if(!Az(a))throw new Error("ViewportAnchorY must be between 0 and 100.");s=a}},viewportAnchorX:{enumerable:!0,get:function(){return r},set:function(a){if(!Az(a))throw new Error("ViewportAnchorX must be between 0 and 100.");r=a}},scroll:{enumerable:!0,get:function(){return o},set:function(a){var l=Voi(a);l===!1?console.warn("Scroll: an invalid or illegal string was specified."):o=l}}})}AKe.exports=Boi});var FKe=xr((rjn,RKe)=>{var bx=Qy(),ID=RKe.exports={WebVTT:EKe(),VTTCue:IKe(),VTTRegion:PKe()};bx.vttjs=ID;bx.WebVTT=ID.WebVTT;var zoi=ID.VTTCue,Hoi=ID.VTTRegion,Goi=bx.VTTCue,Woi=bx.VTTRegion;ID.shim=function(){bx.VTTCue=zoi,bx.VTTRegion=Hoi};ID.restore=function(){bx.VTTCue=Goi,bx.VTTRegion=Woi};bx.VTTCue||ID.shim()});function Fp(){return Fp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Fp.apply(null,arguments)}var _6e=Q(()=>{});var LKe=xr((Pz,C6e)=>{(function(t){var e=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(o,a,l){if(l=l||{},o=o.trim(),a=a.trim(),!a){if(!l.alwaysNormalize)return o;var c=s.parseURL(o);if(!c)throw new Error("Error trying to parse base URL.");return c.path=s.normalizePath(c.path),s.buildURLFromParts(c)}var d=s.parseURL(a);if(!d)throw new Error("Error trying to parse relative URL.");if(d.scheme)return l.alwaysNormalize?(d.path=s.normalizePath(d.path),s.buildURLFromParts(d)):a;var u=s.parseURL(o);if(!u)throw new Error("Error trying to parse base URL.");if(!u.netLoc&&u.path&&u.path[0]!=="/"){var m=n.exec(u.path);u.netLoc=m[1],u.path=m[2]}u.netLoc&&!u.path&&(u.path="/");var f={scheme:u.scheme,netLoc:d.netLoc,path:null,params:d.params,query:d.query,fragment:d.fragment};if(!d.netLoc&&(f.netLoc=u.netLoc,d.path[0]!=="/"))if(!d.path)f.path=u.path,d.params||(f.params=u.params,d.query||(f.query=u.query));else{var _=u.path,x=_.substring(0,_.lastIndexOf("/")+1)+d.path;f.path=s.normalizePath(x)}return f.path===null&&(f.path=l.alwaysNormalize?s.normalizePath(d.path):d.path),s.buildURLFromParts(f)},parseURL:function(o){var a=e.exec(o);return a?{scheme:a[1]||"",netLoc:a[2]||"",path:a[3]||"",params:a[4]||"",query:a[5]||"",fragment:a[6]||""}:null},normalizePath:function(o){for(o=o.split("").reverse().join("").replace(i,"");o.length!==(o=o.replace(r,"")).length;);return o.split("").reverse().join("")},buildURLFromParts:function(o){return o.scheme+o.netLoc+o.path+o.params+o.query+o.fragment}};typeof Pz=="object"&&typeof C6e=="object"?C6e.exports=s:typeof define=="function"&&define.amd?define([],function(){return s}):typeof Pz=="object"?Pz.URLToolkit=s:t.URLToolkit=s})(Pz)});var x6e,wx,OKe,Uoi,aP,b6e=Q(()=>{x6e=Gs(LKe()),wx=Gs(Qy()),OKe="http://example.com",Uoi=function(e,n){if(/^[a-z]+:/i.test(n))return n;/^data:/.test(e)&&(e=wx.default.location&&wx.default.location.href||"");var i=typeof wx.default.URL=="function",r=/^\/\//.test(e),s=!wx.default.location&&!/\/\//i.test(e);if(i?e=new wx.default.URL(e,wx.default.location||OKe):/\/\//i.test(e)||(e=x6e.default.buildAbsoluteURL(wx.default.location&&wx.default.location.href||"",e)),i){var o=new URL(n,e);return s?o.href.slice(OKe.length):r?o.href.slice(o.protocol.length):o.href}return x6e.default.buildAbsoluteURL(e,n)},aP=Uoi});var uQ,NKe=Q(()=>{uQ=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(i,r){this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push(r)},e.off=function(i,r){if(!this.listeners[i])return!1;var s=this.listeners[i].indexOf(r);return this.listeners[i]=this.listeners[i].slice(0),this.listeners[i].splice(s,1),s>-1},e.trigger=function(i){var r=this.listeners[i];if(r)if(arguments.length===2)for(var s=r.length,o=0;o<s;++o)r[o].call(this,arguments[1]);else for(var a=Array.prototype.slice.call(arguments,1),l=r.length,c=0;c<l;++c)r[c].apply(this,a)},e.dispose=function(){this.listeners={}},e.pipe=function(i){this.on("data",function(r){i.push(r)})},t}()});function S6e(t){for(var e=joi(t),n=new Uint8Array(e.length),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n}var w6e,joi,VKe=Q(()=>{w6e=Gs(Qy()),joi=function(e){return w6e.default.atob?w6e.default.atob(e):Buffer.from(e,"base64").toString("binary")}});var E6e,$oi,T6e,Koi,Sg,BKe,M6e,Yoi,z7,D6e,hQ,zKe=Q(()=>{NKe();_6e();VKe();E6e=class extends uQ{constructor(){super(),this.buffer=""}push(e){let n;for(this.buffer+=e,n=this.buffer.indexOf(`
`);n>-1;n=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,n)),this.buffer=this.buffer.substring(n+1)}},$oi="	",T6e=function(t){let e=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),n={};return e[1]&&(n.length=parseInt(e[1],10)),e[2]&&(n.offset=parseInt(e[2],10)),n},Koi=function(){let n="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+n+")")},Sg=function(t){let e={};if(!t)return e;let n=t.split(Koi()),i=n.length,r;for(;i--;)n[i]!==""&&(r=/([^=]*)=(.*)/.exec(n[i]).slice(1),r[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),e[r[0]]=r[1]);return e},BKe=t=>{let e=t.split("x"),n={};return e[0]&&(n.width=parseInt(e[0],10)),e[1]&&(n.height=parseInt(e[1],10)),n},M6e=class extends uQ{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let n,i;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((s,o)=>{let a=o(e);return a===e?s:s.concat([a])},[e]).forEach(s=>{for(let o=0;o<this.customParsers.length;o++)if(this.customParsers[o].call(this,s))return;if(s.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:s.slice(1)});return}if(s=s.replace("\r",""),n=/^#EXTM3U/.exec(s),n){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(n=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(s),n){i={type:"tag",tagType:"inf"},n[1]&&(i.duration=parseFloat(n[1])),n[2]&&(i.title=n[2]),this.trigger("data",i);return}if(n=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(s),n){i={type:"tag",tagType:"targetduration"},n[1]&&(i.duration=parseInt(n[1],10)),this.trigger("data",i);return}if(n=/^#EXT-X-VERSION:([0-9.]*)?/.exec(s),n){i={type:"tag",tagType:"version"},n[1]&&(i.version=parseInt(n[1],10)),this.trigger("data",i);return}if(n=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(s),n){i={type:"tag",tagType:"media-sequence"},n[1]&&(i.number=parseInt(n[1],10)),this.trigger("data",i);return}if(n=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(s),n){i={type:"tag",tagType:"discontinuity-sequence"},n[1]&&(i.number=parseInt(n[1],10)),this.trigger("data",i);return}if(n=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(s),n){i={type:"tag",tagType:"playlist-type"},n[1]&&(i.playlistType=n[1]),this.trigger("data",i);return}if(n=/^#EXT-X-BYTERANGE:(.*)?$/.exec(s),n){i=Fp(T6e(n[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",i);return}if(n=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(s),n){i={type:"tag",tagType:"allow-cache"},n[1]&&(i.allowed=!/NO/.test(n[1])),this.trigger("data",i);return}if(n=/^#EXT-X-MAP:(.*)$/.exec(s),n){if(i={type:"tag",tagType:"map"},n[1]){let o=Sg(n[1]);o.URI&&(i.uri=o.URI),o.BYTERANGE&&(i.byterange=T6e(o.BYTERANGE))}this.trigger("data",i);return}if(n=/^#EXT-X-STREAM-INF:(.*)$/.exec(s),n){i={type:"tag",tagType:"stream-inf"},n[1]&&(i.attributes=Sg(n[1]),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=BKe(i.attributes.RESOLUTION)),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))),this.trigger("data",i);return}if(n=/^#EXT-X-MEDIA:(.*)$/.exec(s),n){i={type:"tag",tagType:"media"},n[1]&&(i.attributes=Sg(n[1])),this.trigger("data",i);return}if(n=/^#EXT-X-ENDLIST/.exec(s),n){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(n=/^#EXT-X-DISCONTINUITY/.exec(s),n){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(n=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(s),n){i={type:"tag",tagType:"program-date-time"},n[1]&&(i.dateTimeString=n[1],i.dateTimeObject=new Date(n[1])),this.trigger("data",i);return}if(n=/^#EXT-X-KEY:(.*)$/.exec(s),n){i={type:"tag",tagType:"key"},n[1]&&(i.attributes=Sg(n[1]),i.attributes.IV&&(i.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),this.trigger("data",i);return}if(n=/^#EXT-X-START:(.*)$/.exec(s),n){i={type:"tag",tagType:"start"},n[1]&&(i.attributes=Sg(n[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),this.trigger("data",i);return}if(n=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(s),n){i={type:"tag",tagType:"cue-out-cont"},n[1]?i.data=n[1]:i.data="",this.trigger("data",i);return}if(n=/^#EXT-X-CUE-OUT:(.*)?$/.exec(s),n){i={type:"tag",tagType:"cue-out"},n[1]?i.data=n[1]:i.data="",this.trigger("data",i);return}if(n=/^#EXT-X-CUE-IN:?(.*)?$/.exec(s),n){i={type:"tag",tagType:"cue-in"},n[1]?i.data=n[1]:i.data="",this.trigger("data",i);return}if(n=/^#EXT-X-SKIP:(.*)$/.exec(s),n&&n[1]){i={type:"tag",tagType:"skip"},i.attributes=Sg(n[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split($oi)),this.trigger("data",i);return}if(n=/^#EXT-X-PART:(.*)$/.exec(s),n&&n[1]){i={type:"tag",tagType:"part"},i.attributes=Sg(n[1]),["DURATION"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=parseFloat(i.attributes[o]))}),["INDEPENDENT","GAP"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=/YES/.test(i.attributes[o]))}),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=T6e(i.attributes.BYTERANGE)),this.trigger("data",i);return}if(n=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(s),n&&n[1]){i={type:"tag",tagType:"server-control"},i.attributes=Sg(n[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=parseFloat(i.attributes[o]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=/YES/.test(i.attributes[o]))}),this.trigger("data",i);return}if(n=/^#EXT-X-PART-INF:(.*)$/.exec(s),n&&n[1]){i={type:"tag",tagType:"part-inf"},i.attributes=Sg(n[1]),["PART-TARGET"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=parseFloat(i.attributes[o]))}),this.trigger("data",i);return}if(n=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(s),n&&n[1]){i={type:"tag",tagType:"preload-hint"},i.attributes=Sg(n[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(o){if(i.attributes.hasOwnProperty(o)){i.attributes[o]=parseInt(i.attributes[o],10);let a=o==="BYTERANGE-LENGTH"?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[a]=i.attributes[o],delete i.attributes[o]}}),this.trigger("data",i);return}if(n=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(s),n&&n[1]){i={type:"tag",tagType:"rendition-report"},i.attributes=Sg(n[1]),["LAST-MSN","LAST-PART"].forEach(function(o){i.attributes.hasOwnProperty(o)&&(i.attributes[o]=parseInt(i.attributes[o],10))}),this.trigger("data",i);return}if(n=/^#EXT-X-DATERANGE:(.*)$/.exec(s),n&&n[1]){i={type:"tag",tagType:"daterange"},i.attributes=Sg(n[1]),["ID","CLASS"].forEach(function(a){i.attributes.hasOwnProperty(a)&&(i.attributes[a]=String(i.attributes[a]))}),["START-DATE","END-DATE"].forEach(function(a){i.attributes.hasOwnProperty(a)&&(i.attributes[a]=new Date(i.attributes[a]))}),["DURATION","PLANNED-DURATION"].forEach(function(a){i.attributes.hasOwnProperty(a)&&(i.attributes[a]=parseFloat(i.attributes[a]))}),["END-ON-NEXT"].forEach(function(a){i.attributes.hasOwnProperty(a)&&(i.attributes[a]=/YES/i.test(i.attributes[a]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(a){i.attributes.hasOwnProperty(a)&&(i.attributes[a]=i.attributes[a].toString(16))});let o=/^X-([A-Z]+-)+[A-Z]+$/;for(let a in i.attributes){if(!o.test(a))continue;let l=/[0-9A-Fa-f]{6}/g.test(i.attributes[a]),c=/^\d+(\.\d+)?$/.test(i.attributes[a]);i.attributes[a]=l?i.attributes[a].toString(16):c?parseFloat(i.attributes[a]):String(i.attributes[a])}this.trigger("data",i);return}if(n=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(s),n){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(n=/^#EXT-X-I-FRAMES-ONLY/.exec(s),n){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(n=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(s),n){i={type:"tag",tagType:"content-steering"},i.attributes=Sg(n[1]),this.trigger("data",i);return}if(n=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(s),n){i={type:"tag",tagType:"i-frame-playlist"},i.attributes=Sg(n[1]),i.attributes.URI&&(i.uri=i.attributes.URI),i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes.RESOLUTION&&(i.attributes.RESOLUTION=BKe(i.attributes.RESOLUTION)),i.attributes["AVERAGE-BANDWIDTH"]&&(i.attributes["AVERAGE-BANDWIDTH"]=parseInt(i.attributes["AVERAGE-BANDWIDTH"],10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),this.trigger("data",i);return}if(n=/^#EXT-X-DEFINE:(.*)$/.exec(s),n){i={type:"tag",tagType:"define"},i.attributes=Sg(n[1]),this.trigger("data",i);return}this.trigger("data",{type:"tag",data:s.slice(4)})})}addParser({expression:e,customType:n,dataParser:i,segment:r}){typeof i!="function"&&(i=s=>s),this.customParsers.push(s=>{if(e.exec(s))return this.trigger("data",{type:"custom",data:i(s),customType:n,segment:r}),!0})}addTagMapper({expression:e,map:n}){let i=r=>e.test(r)?n(r):r;this.tagMappers.push(i)}},Yoi=t=>t.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),z7=function(t){let e={};return Object.keys(t).forEach(function(n){e[Yoi(n)]=t[n]}),e},D6e=function(t){let{serverControl:e,targetDuration:n,partTargetDuration:i}=t;if(!e)return;let r="#EXT-X-SERVER-CONTROL",s="holdBack",o="partHoldBack",a=n&&n*3,l=i&&i*2;n&&!e.hasOwnProperty(s)&&(e[s]=a,this.trigger("info",{message:`${r} defaulting HOLD-BACK to targetDuration * 3 (${a}).`})),a&&e[s]<a&&(this.trigger("warn",{message:`${r} clamping HOLD-BACK (${e[s]}) to targetDuration * 3 (${a})`}),e[s]=a),i&&!e.hasOwnProperty(o)&&(e[o]=i*3,this.trigger("info",{message:`${r} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[o]}).`})),i&&e[o]<l&&(this.trigger("warn",{message:`${r} clamping PART-HOLD-BACK (${e[o]}) to partTargetDuration * 2 (${l}).`}),e[o]=l)},hQ=class extends uQ{constructor(e={}){super(),this.lineStream=new E6e,this.parseStream=new M6e,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;let n=this,i=[],r={},s,o,a=!1,l=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},d="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",u=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let m=0,f=0,_={};this.on("end",()=>{r.uri||!r.parts&&!r.preloadHints||(!r.map&&s&&(r.map=s),!r.key&&o&&(r.key=o),!r.timeline&&typeof u=="number"&&(r.timeline=u),this.manifest.preloadSegment=r)}),this.parseStream.on("data",function(x){let D,E;if(n.manifest.definitions){for(let M in n.manifest.definitions)if(x.uri&&(x.uri=x.uri.replace(`{$${M}}`,n.manifest.definitions[M])),x.attributes)for(let I in x.attributes)typeof x.attributes[I]=="string"&&(x.attributes[I]=x.attributes[I].replace(`{$${M}}`,n.manifest.definitions[M]))}({tag(){({version(){x.version&&(this.manifest.version=x.version)},"allow-cache"(){this.manifest.allowCache=x.allowed,"allowed"in x||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){let M={};"length"in x&&(r.byterange=M,M.length=x.length,"offset"in x||(x.offset=m)),"offset"in x&&(r.byterange=M,M.offset=x.offset),m=M.offset+M.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),x.title&&(r.title=x.title),x.duration>0&&(r.duration=x.duration),x.duration===0&&(r.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key(){if(!x.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(x.attributes.METHOD==="NONE"){o=null;return}if(!x.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(x.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:x.attributes};return}if(x.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:x.attributes.URI};return}if(x.attributes.KEYFORMAT===d){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(x.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(x.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),x.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(x.attributes.KEYID&&x.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:x.attributes.KEYFORMAT,keyId:x.attributes.KEYID.substring(2)},pssh:S6e(x.attributes.URI.split(",")[1])};return}x.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:x.attributes.METHOD||"AES-128",uri:x.attributes.URI},typeof x.attributes.IV<"u"&&(o.iv=x.attributes.IV)},"media-sequence"(){if(!isFinite(x.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+x.number});return}this.manifest.mediaSequence=x.number},"discontinuity-sequence"(){if(!isFinite(x.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+x.number});return}this.manifest.discontinuitySequence=x.number,u=x.number},"playlist-type"(){if(!/VOD|EVENT/.test(x.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+x.playlist});return}this.manifest.playlistType=x.playlistType},map(){s={},x.uri&&(s.uri=x.uri),x.byterange&&(s.byterange=x.byterange),o&&(s.key=o)},"stream-inf"(){if(this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||c,!x.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}r.attributes||(r.attributes={}),Fp(r.attributes,x.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,!(x.attributes&&x.attributes.TYPE&&x.attributes["GROUP-ID"]&&x.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}let M=this.manifest.mediaGroups[x.attributes.TYPE];M[x.attributes["GROUP-ID"]]=M[x.attributes["GROUP-ID"]]||{},D=M[x.attributes["GROUP-ID"]],E={default:/yes/i.test(x.attributes.DEFAULT)},E.default?E.autoselect=!0:E.autoselect=/yes/i.test(x.attributes.AUTOSELECT),x.attributes.LANGUAGE&&(E.language=x.attributes.LANGUAGE),x.attributes.URI&&(E.uri=x.attributes.URI),x.attributes["INSTREAM-ID"]&&(E.instreamId=x.attributes["INSTREAM-ID"]),x.attributes.CHARACTERISTICS&&(E.characteristics=x.attributes.CHARACTERISTICS),x.attributes.FORCED&&(E.forced=/yes/i.test(x.attributes.FORCED)),D[x.attributes.NAME]=E},discontinuity(){u+=1,r.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=x.dateTimeString,this.manifest.dateTimeObject=x.dateTimeObject),r.dateTimeString=x.dateTimeString,r.dateTimeObject=x.dateTimeObject;let{lastProgramDateTime:M}=this;this.lastProgramDateTime=new Date(x.dateTimeString).getTime(),M===null&&this.manifest.segments.reduceRight((I,z)=>(z.programDateTime=I-z.duration*1e3,z.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(x.duration)||x.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+x.duration});return}this.manifest.targetDuration=x.duration,D6e.call(this,this.manifest)},start(){if(!x.attributes||isNaN(x.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:x.attributes["TIME-OFFSET"],precise:x.attributes.PRECISE}},"cue-out"(){r.cueOut=x.data},"cue-out-cont"(){r.cueOutCont=x.data},"cue-in"(){r.cueIn=x.data},skip(){this.manifest.skip=z7(x.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",x.attributes,["SKIPPED-SEGMENTS"])},part(){a=!0;let M=this.manifest.segments.length,I=z7(x.attributes);r.parts=r.parts||[],r.parts.push(I),I.byterange&&(I.byterange.hasOwnProperty("offset")||(I.byterange.offset=f),f=I.byterange.offset+I.byterange.length);let z=r.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${z} for segment #${M}`,x.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((G,A)=>{G.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${A} lacks required attribute(s): LAST-PART`})})},"server-control"(){let M=this.manifest.serverControl=z7(x.attributes);M.hasOwnProperty("canBlockReload")||(M.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),D6e.call(this,this.manifest),M.canSkipDateranges&&!M.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){let M=this.manifest.segments.length,I=z7(x.attributes),z=I.type&&I.type==="PART";r.preloadHints=r.preloadHints||[],r.preloadHints.push(I),I.byterange&&(I.byterange.hasOwnProperty("offset")||(I.byterange.offset=z?f:0,z&&(f=I.byterange.offset+I.byterange.length)));let G=r.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${G} for segment #${M}`,x.attributes,["TYPE","URI"]),!!I.type)for(let A=0;A<r.preloadHints.length-1;A++){let Y=r.preloadHints[A];Y.type&&Y.type===I.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${G} for segment #${M} has the same TYPE ${I.type} as preload hint #${A}`})}},"rendition-report"(){let M=z7(x.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(M);let I=this.manifest.renditionReports.length-1,z=["LAST-MSN","URI"];a&&z.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${I}`,x.attributes,z)},"part-inf"(){this.manifest.partInf=z7(x.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",x.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),D6e.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(z7(x.attributes));let M=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${M}`,x.attributes,["ID","START-DATE"]);let I=this.manifest.dateRanges[M];I.endDate&&I.startDate&&new Date(I.endDate)<new Date(I.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),I.duration&&I.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),I.plannedDuration&&I.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});let z=!!I.endOnNext;if(z&&!I.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),z&&(I.duration||I.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),I.duration&&I.endDate){let A=I.startDate.getTime()+I.duration*1e3;this.manifest.dateRanges[M].endDate=new Date(A)}if(!_[I.id])_[I.id]=I;else{for(let A in _[I.id])if(I[A]&&JSON.stringify(_[I.id][A])!==JSON.stringify(I[A])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}let G=this.manifest.dateRanges.findIndex(A=>A.id===I.id);this.manifest.dateRanges[G]=Fp(this.manifest.dateRanges[G],I),_[I.id]=Fp(_[I.id],I),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=z7(x.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",x.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};let M=(I,z)=>{if(I in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${I}`});return}this.manifest.definitions[I]=z};if("QUERYPARAM"in x.attributes){if("NAME"in x.attributes||"IMPORT"in x.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}let I=this.params.get(x.attributes.QUERYPARAM);if(!I){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${x.attributes.QUERYPARAM}`});return}M(x.attributes.QUERYPARAM,decodeURIComponent(I));return}if("NAME"in x.attributes){if("IMPORT"in x.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in x.attributes)||typeof x.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${x.attributes.NAME}`});return}M(x.attributes.NAME,x.attributes.VALUE);return}if("IMPORT"in x.attributes){if(!this.mainDefinitions[x.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${x.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}M(x.attributes.IMPORT,this.mainDefinitions[x.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:x.attributes,uri:x.uri,timeline:u}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",x.attributes,["BANDWIDTH","URI"])}}[x.tagType]||l).call(n)},uri(){r.uri=x.uri,i.push(r),this.manifest.targetDuration&&!("duration"in r)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),r.duration=this.manifest.targetDuration),o&&(r.key=o),r.timeline=u,s&&(r.map=s),f=0,this.lastProgramDateTime!==null&&(r.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=r.duration*1e3),r={}},comment(){},custom(){x.segment?(r.custom=r.custom||{},r.custom[x.customType]=x.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[x.customType]=x.data)}})[x.type].call(n)})}requiredCompatibilityversion(e,n){(e<n||!e)&&this.trigger("warn",{message:`manifest must be at least version ${n}`})}warnOnMissingAttributes_(e,n,i){let r=[];i.forEach(function(s){n.hasOwnProperty(s)||r.push(s)}),r.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${r.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}});var pQ,AD,qoi,HKe,k6e,Jy,GKe,I6e,Zoi,lP,Rz,mQ,A6e,WKe,UKe=Q(()=>{pQ=Gs(Qy()),AD={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},qoi=["video","audio","text"],HKe=["Video","Audio","Text"],k6e=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(n,i,r){var s=("00"+Number(i).toString(16)).slice(-2),o=("00"+Number(r).toString(16)).slice(-2);return"avc1."+s+"00"+o})},Jy=function(e){e===void 0&&(e="");var n=e.split(","),i=[];return n.forEach(function(r){r=r.trim();var s;qoi.forEach(function(o){var a=AD[o].exec(r.toLowerCase());if(!(!a||a.length<=1)){s=o;var l=r.substring(0,a[1].length),c=r.replace(l,"");i.push({type:l,details:c,mediaType:o})}}),s||i.push({type:r,details:"",mediaType:"unknown"})}),i},GKe=function(e,n){if(!e.mediaGroups.AUDIO||!n)return null;var i=e.mediaGroups.AUDIO[n];if(!i)return null;for(var r in i){var s=i[r];if(s.default&&s.playlists)return Jy(s.playlists[0].attributes.CODECS)}return null},I6e=function(e){return e===void 0&&(e=""),AD.audio.test(e.trim().toLowerCase())},Zoi=function(e){return e===void 0&&(e=""),AD.text.test(e.trim().toLowerCase())},lP=function(e){if(!(!e||typeof e!="string")){var n=e.toLowerCase().split(",").map(function(s){return k6e(s.trim())}),i="video";n.length===1&&I6e(n[0])?i="audio":n.length===1&&Zoi(n[0])&&(i="application");var r="mp4";return n.every(function(s){return AD.mp4.test(s)})?r="mp4":n.every(function(s){return AD.webm.test(s)})?r="webm":n.every(function(s){return AD.ogg.test(s)})&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},Rz=function(e){return e===void 0&&(e=""),pQ.default.MediaSource&&pQ.default.MediaSource.isTypeSupported&&pQ.default.MediaSource.isTypeSupported(lP(e))||!1},mQ=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(n){n=n.trim();for(var i=0;i<HKe.length;i++){var r=HKe[i];if(AD["muxer"+r].test(n))return!0}return!1})},A6e="mp4a.40.2",WKe="avc1.4d400d"});var Xoi,Qoi,P6e,jKe=Q(()=>{Xoi=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,Qoi=/^application\/dash\+xml/i,P6e=function(e){return Xoi.test(e)?"hls":Qoi.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null}});var $Ke,Joi,eai,F6e,tai,vo,F0,R6e,fjn,L6e,KKe,O6e,fQ,YKe,ru,H7=Q(()=>{$Ke=Gs(Qy()),Joi=function(e){return e.toString(2).length},eai=function(e){return Math.ceil(Joi(e)/8)},F6e=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},tai=function(e){return F6e(e)},vo=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!tai(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},F0=$Ke.default.BigInt||Number,R6e=[F0("0x1"),F0("0x100"),F0("0x10000"),F0("0x1000000"),F0("0x100000000"),F0("0x10000000000"),F0("0x1000000000000"),F0("0x100000000000000"),F0("0x10000000000000000")],fjn=function(){var t=new Uint16Array([65484]),e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"}(),L6e=function(e,n){var i=n===void 0?{}:n,r=i.signed,s=r===void 0?!1:r,o=i.le,a=o===void 0?!1:o;e=vo(e);var l=a?"reduce":"reduceRight",c=e[l]?e[l]:Array.prototype[l],d=c.call(e,function(m,f,_){var x=a?_:Math.abs(_+1-e.length);return m+F0(f)*R6e[x]},F0(0));if(s){var u=R6e[e.length]/F0(2)-F0(1);d=F0(d),d>u&&(d-=u,d-=u,d-=F0(2))}return Number(d)},KKe=function(e,n){var i=n===void 0?{}:n,r=i.le,s=r===void 0?!1:r;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=F0(e);for(var o=eai(e),a=new Uint8Array(new ArrayBuffer(o)),l=0;l<o;l++){var c=s?l:Math.abs(l+1-a.length);a[c]=Number(e/R6e[l]&F0(255)),e<0&&(a[c]=Math.abs(~a[c]),a[c]-=l===0?1:2)}return a},O6e=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var n=String.fromCharCode.apply(null,vo(e));try{return decodeURIComponent(escape(n))}catch{}return n},fQ=function(e,n){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;n||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return i},YKe=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(n=n.filter(function(a){return a&&(a.byteLength||a.length)&&typeof a!="string"}),n.length<=1)return vo(n[0]);var r=n.reduce(function(a,l,c){return a+(l.byteLength||l.length)},0),s=new Uint8Array(r),o=0;return n.forEach(function(a){a=vo(a),s.set(a,o),o+=a.byteLength}),s},ru=function(e,n,i){var r=i===void 0?{}:i,s=r.offset,o=s===void 0?0:s,a=r.mask,l=a===void 0?[]:a;e=vo(e),n=vo(n);var c=n.every?n.every:Array.prototype.every;return n.length&&e.length-o>=n.length&&c.call(n,function(d,u){var m=l[u]?l[u]&e[o+u]:e[o+u];return d===m})}});var qKe,ZKe=Q(()=>{qKe=function(e,n,i){n.forEach(function(r){for(var s in e.mediaGroups[r])for(var o in e.mediaGroups[r][s]){var a=e.mediaGroups[r][s][o];i(a,r,s,o)}})}});function V6e(t){for(var e=iai(t),n=new Uint8Array(e.length),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n}var N6e,iai,XKe=Q(()=>{N6e=Gs(Qy()),iai=function(e){return N6e.default.atob?N6e.default.atob(e):Buffer.from(e,"base64").toString("binary")}});var Fz=xr(cP=>{"use strict";function nai(t,e,n){if(n===void 0&&(n=Array.prototype),t&&typeof n.find=="function")return n.find.call(t,e);for(var i=0;i<t.length;i++)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];if(e.call(void 0,r,i,t))return r}}function B6e(t,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(t):t}function rai(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var QKe=B6e({HTML:"text/html",isHTML:function(t){return t===QKe.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),JKe=B6e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(t){return t===JKe.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});cP.assign=rai;cP.find=nai;cP.freeze=B6e;cP.MIME_TYPE=QKe;cP.NAMESPACE=JKe});var Z6e=xr(G7=>{var aYe=Fz(),F5=aYe.find,Lz=aYe.NAMESPACE;function sai(t){return t!==""}function oai(t){return t?t.split(/[\t\n\f\r ]+/).filter(sai):[]}function aai(t,e){return t.hasOwnProperty(e)||(t[e]=!0),t}function eYe(t){if(!t)return[];var e=oai(t);return Object.keys(e.reduce(aai,{}))}function lai(t){return function(e){return t&&t.indexOf(e)!==-1}}function Nz(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function g3(t,e){var n=t.prototype;if(!(n instanceof e)){let r=function(){};var i=r;r.prototype=e.prototype,r=new r,Nz(n,r),t.prototype=n=r}n.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),n.constructor=t)}var v3={},e_=v3.ELEMENT_NODE=1,uP=v3.ATTRIBUTE_NODE=2,gQ=v3.TEXT_NODE=3,lYe=v3.CDATA_SECTION_NODE=4,cYe=v3.ENTITY_REFERENCE_NODE=5,cai=v3.ENTITY_NODE=6,dYe=v3.PROCESSING_INSTRUCTION_NODE=7,uYe=v3.COMMENT_NODE=8,hYe=v3.DOCUMENT_NODE=9,pYe=v3.DOCUMENT_TYPE_NODE=10,Tx=v3.DOCUMENT_FRAGMENT_NODE=11,dai=v3.NOTATION_NODE=12,y2={},K1={},Cjn=y2.INDEX_SIZE_ERR=(K1[1]="Index size error",1),xjn=y2.DOMSTRING_SIZE_ERR=(K1[2]="DOMString size error",2),f3=y2.HIERARCHY_REQUEST_ERR=(K1[3]="Hierarchy request error",3),bjn=y2.WRONG_DOCUMENT_ERR=(K1[4]="Wrong document",4),wjn=y2.INVALID_CHARACTER_ERR=(K1[5]="Invalid character",5),Sjn=y2.NO_DATA_ALLOWED_ERR=(K1[6]="No data allowed",6),Tjn=y2.NO_MODIFICATION_ALLOWED_ERR=(K1[7]="No modification allowed",7),mYe=y2.NOT_FOUND_ERR=(K1[8]="Not found",8),Djn=y2.NOT_SUPPORTED_ERR=(K1[9]="Not supported",9),tYe=y2.INUSE_ATTRIBUTE_ERR=(K1[10]="Attribute in use",10),Ejn=y2.INVALID_STATE_ERR=(K1[11]="Invalid state",11),Mjn=y2.SYNTAX_ERR=(K1[12]="Syntax error",12),kjn=y2.INVALID_MODIFICATION_ERR=(K1[13]="Invalid modification",13),Ijn=y2.NAMESPACE_ERR=(K1[14]="Invalid namespace",14),Ajn=y2.INVALID_ACCESS_ERR=(K1[15]="Invalid access",15);function Mm(t,e){if(e instanceof Error)var n=e;else n=this,Error.call(this,K1[t]),this.message=K1[t],Error.captureStackTrace&&Error.captureStackTrace(this,Mm);return n.code=t,e&&(this.message=this.message+": "+e),n}Mm.prototype=Error.prototype;Nz(y2,Mm);function Sx(){}Sx.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t,e){for(var n=[],i=0;i<this.length;i++)dP(this[i],n,t,e);return n.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}};function hP(t,e){this._node=t,this._refresh=e,G6e(this)}function G6e(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var n=t._refresh(t._node);if(DYe(t,"length",n.length),!t.$$length||n.length<t.$$length)for(var i=n.length;i in t;i++)Object.prototype.hasOwnProperty.call(t,i)&&delete t[i];Nz(n,t),t._inc=e}}hP.prototype.item=function(t){return G6e(this),this[t]||null};g3(hP,Sx);function vQ(){}function fYe(t,e){for(var n=t.length;n--;)if(t[n]===e)return n}function iYe(t,e,n,i){if(i?e[fYe(e,i)]=n:e[e.length++]=n,t){n.ownerElement=t;var r=t.ownerDocument;r&&(i&&yYe(r,t,i),uai(r,t,n))}}function nYe(t,e,n){var i=fYe(e,n);if(i>=0){for(var r=e.length-1;i<r;)e[i]=e[++i];if(e.length=r,t){var s=t.ownerDocument;s&&(yYe(s,t,n),n.ownerElement=null)}}else throw new Mm(mYe,new Error(t.tagName+"@"+n))}vQ.prototype={length:0,item:Sx.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var n=this[e];if(n.nodeName==t)return n}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new Mm(tYe);var n=this.getNamedItem(t.nodeName);return iYe(this._ownerElement,this,t,n),n},setNamedItemNS:function(t){var e=t.ownerElement,n;if(e&&e!=this._ownerElement)throw new Mm(tYe);return n=this.getNamedItemNS(t.namespaceURI,t.localName),iYe(this._ownerElement,this,t,n),n},removeNamedItem:function(t){var e=this.getNamedItem(t);return nYe(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var n=this.getNamedItemNS(t,e);return nYe(this._ownerElement,this,n),n},getNamedItemNS:function(t,e){for(var n=this.length;n--;){var i=this[n];if(i.localName==e&&i.namespaceURI==t)return i}return null}};function gYe(){}gYe.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,n){var i=new Vz;if(i.implementation=this,i.childNodes=new Sx,i.doctype=n||null,n&&i.appendChild(n),e){var r=i.createElementNS(t,e);i.appendChild(r)}return i},createDocumentType:function(t,e,n){var i=new CQ;return i.name=t,i.nodeName=t,i.publicId=e||"",i.systemId=n||"",i}};function su(){}su.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return yQ(this,t,e)},replaceChild:function(t,e){yQ(this,t,e,CYe),e&&this.removeChild(e)},removeChild:function(t){return _Ye(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return H6e(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==gQ&&t.nodeType==gQ?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var n=e._nsMap;if(n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&n[i]===t)return i}e=e.nodeType==uP?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var n=e._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,t))return n[t];e=e.nodeType==uP?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null}};function vYe(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";"}Nz(v3,su);Nz(v3,su.prototype);function Oz(t,e){if(e(t))return!0;if(t=t.firstChild)do if(Oz(t,e))return!0;while(t=t.nextSibling)}function Vz(){this.ownerDocument=this}function uai(t,e,n){t&&t._inc++;var i=n.namespaceURI;i===Lz.XMLNS&&(e._nsMap[n.prefix?n.localName:""]=n.value)}function yYe(t,e,n,i){t&&t._inc++;var r=n.namespaceURI;r===Lz.XMLNS&&delete e._nsMap[n.prefix?n.localName:""]}function W6e(t,e,n){if(t&&t._inc){t._inc++;var i=e.childNodes;if(n)i[i.length++]=n;else{for(var r=e.firstChild,s=0;r;)i[s++]=r,r=r.nextSibling;i.length=s,delete i[i.length]}}}function _Ye(t,e){var n=e.previousSibling,i=e.nextSibling;return n?n.nextSibling=i:t.firstChild=i,i?i.previousSibling=n:t.lastChild=n,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,W6e(t.ownerDocument,t),e}function hai(t){return t&&(t.nodeType===su.DOCUMENT_NODE||t.nodeType===su.DOCUMENT_FRAGMENT_NODE||t.nodeType===su.ELEMENT_NODE)}function pai(t){return t&&(L5(t)||U6e(t)||Dx(t)||t.nodeType===su.DOCUMENT_FRAGMENT_NODE||t.nodeType===su.COMMENT_NODE||t.nodeType===su.PROCESSING_INSTRUCTION_NODE)}function Dx(t){return t&&t.nodeType===su.DOCUMENT_TYPE_NODE}function L5(t){return t&&t.nodeType===su.ELEMENT_NODE}function U6e(t){return t&&t.nodeType===su.TEXT_NODE}function rYe(t,e){var n=t.childNodes||[];if(F5(n,L5)||Dx(e))return!1;var i=F5(n,Dx);return!(e&&i&&n.indexOf(i)>n.indexOf(e))}function sYe(t,e){var n=t.childNodes||[];function i(s){return L5(s)&&s!==e}if(F5(n,i))return!1;var r=F5(n,Dx);return!(e&&r&&n.indexOf(r)>n.indexOf(e))}function mai(t,e,n){if(!hai(t))throw new Mm(f3,"Unexpected parent node type "+t.nodeType);if(n&&n.parentNode!==t)throw new Mm(mYe,"child not in parent");if(!pai(e)||Dx(e)&&t.nodeType!==su.DOCUMENT_NODE)throw new Mm(f3,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function fai(t,e,n){var i=t.childNodes||[],r=e.childNodes||[];if(e.nodeType===su.DOCUMENT_FRAGMENT_NODE){var s=r.filter(L5);if(s.length>1||F5(r,U6e))throw new Mm(f3,"More than one element or text in fragment");if(s.length===1&&!rYe(t,n))throw new Mm(f3,"Element in fragment can not be inserted before doctype")}if(L5(e)&&!rYe(t,n))throw new Mm(f3,"Only one element can be added and only after doctype");if(Dx(e)){if(F5(i,Dx))throw new Mm(f3,"Only one doctype is allowed");var o=F5(i,L5);if(n&&i.indexOf(o)<i.indexOf(n))throw new Mm(f3,"Doctype can only be inserted before an element");if(!n&&o)throw new Mm(f3,"Doctype can not be appended since element is present")}}function CYe(t,e,n){var i=t.childNodes||[],r=e.childNodes||[];if(e.nodeType===su.DOCUMENT_FRAGMENT_NODE){var s=r.filter(L5);if(s.length>1||F5(r,U6e))throw new Mm(f3,"More than one element or text in fragment");if(s.length===1&&!sYe(t,n))throw new Mm(f3,"Element in fragment can not be inserted before doctype")}if(L5(e)&&!sYe(t,n))throw new Mm(f3,"Only one element can be added and only after doctype");if(Dx(e)){let l=function(c){return Dx(c)&&c!==n};var a=l;if(F5(i,l))throw new Mm(f3,"Only one doctype is allowed");var o=F5(i,L5);if(n&&i.indexOf(o)<i.indexOf(n))throw new Mm(f3,"Doctype can only be inserted before an element")}}function yQ(t,e,n,i){mai(t,e,n),t.nodeType===su.DOCUMENT_NODE&&(i||fai)(t,e,n);var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===Tx){var s=e.firstChild;if(s==null)return e;var o=e.lastChild}else s=o=e;var a=n?n.previousSibling:t.lastChild;s.previousSibling=a,o.nextSibling=n,a?a.nextSibling=s:t.firstChild=s,n==null?t.lastChild=o:n.previousSibling=o;do s.parentNode=t;while(s!==o&&(s=s.nextSibling));return W6e(t.ownerDocument||t,t),e.nodeType==Tx&&(e.firstChild=e.lastChild=null),e}function gai(t,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=t,e.previousSibling=t.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,t.lastChild=e,W6e(t.ownerDocument,t,e),e}Vz.prototype={nodeName:"#document",nodeType:hYe,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==Tx){for(var n=t.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,e),n=i}return t}return yQ(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===e_&&(this.documentElement=t),t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),_Ye(this,t)},replaceChild:function(t,e){yQ(this,t,e,CYe),t.ownerDocument=this,e&&this.removeChild(e),L5(t)&&(this.documentElement=t)},importNode:function(t,e){return TYe(this,t,e)},getElementById:function(t){var e=null;return Oz(this.documentElement,function(n){if(n.nodeType==e_&&n.getAttribute("id")==t)return e=n,!0}),e},getElementsByClassName:function(t){var e=eYe(t);return new hP(this,function(n){var i=[];return e.length>0&&Oz(n.documentElement,function(r){if(r!==n&&r.nodeType===e_){var s=r.getAttribute("class");if(s){var o=t===s;if(!o){var a=eYe(s);o=e.every(lai(a))}o&&i.push(r)}}}),i})},createElement:function(t){var e=new PD;e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new Sx;var n=e.attributes=new vQ;return n._ownerElement=e,e},createDocumentFragment:function(){var t=new xQ;return t.ownerDocument=this,t.childNodes=new Sx,t},createTextNode:function(t){var e=new j6e;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new $6e;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new K6e;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var n=new q6e;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=t,n.nodeValue=n.data=e,n},createAttribute:function(t){var e=new _Q;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new Y6e;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var n=new PD,i=e.split(":"),r=n.attributes=new vQ;return n.childNodes=new Sx,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t,i.length==2?(n.prefix=i[0],n.localName=i[1]):n.localName=e,r._ownerElement=n,n},createAttributeNS:function(t,e){var n=new _Q,i=e.split(":");return n.ownerDocument=this,n.nodeName=e,n.name=e,n.namespaceURI=t,n.specified=!0,i.length==2?(n.prefix=i[0],n.localName=i[1]):n.localName=e,n}};g3(Vz,su);function PD(){this._nsMap={}}PD.prototype={nodeType:e_,hasAttribute:function(t){return this.getAttributeNode(t)!=null},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var n=this.ownerDocument.createAttribute(t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===Tx?this.insertBefore(t,null):gai(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);n&&this.removeAttributeNode(n)},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null},getAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);return n&&n.value||""},setAttributeNS:function(t,e,n){var i=this.ownerDocument.createAttributeNS(t,e);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new hP(this,function(e){var n=[];return Oz(e,function(i){i!==e&&i.nodeType==e_&&(t==="*"||i.tagName==t)&&n.push(i)}),n})},getElementsByTagNameNS:function(t,e){return new hP(this,function(n){var i=[];return Oz(n,function(r){r!==n&&r.nodeType===e_&&(t==="*"||r.namespaceURI===t)&&(e==="*"||r.localName==e)&&i.push(r)}),i})}};Vz.prototype.getElementsByTagName=PD.prototype.getElementsByTagName;Vz.prototype.getElementsByTagNameNS=PD.prototype.getElementsByTagNameNS;g3(PD,su);function _Q(){}_Q.prototype.nodeType=uP;g3(_Q,su);function Bz(){}Bz.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(K1[f3])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,n){var i=this.data.substring(0,t),r=this.data.substring(t+e);n=i+n+r,this.nodeValue=this.data=n,this.length=n.length}};g3(Bz,su);function j6e(){}j6e.prototype={nodeName:"#text",nodeType:gQ,splitText:function(t){var e=this.data,n=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}};g3(j6e,Bz);function $6e(){}$6e.prototype={nodeName:"#comment",nodeType:uYe};g3($6e,Bz);function K6e(){}K6e.prototype={nodeName:"#cdata-section",nodeType:lYe};g3(K6e,Bz);function CQ(){}CQ.prototype.nodeType=pYe;g3(CQ,su);function xYe(){}xYe.prototype.nodeType=dai;g3(xYe,su);function bYe(){}bYe.prototype.nodeType=cai;g3(bYe,su);function Y6e(){}Y6e.prototype.nodeType=cYe;g3(Y6e,su);function xQ(){}xQ.prototype.nodeName="#document-fragment";xQ.prototype.nodeType=Tx;g3(xQ,su);function q6e(){}q6e.prototype.nodeType=dYe;g3(q6e,su);function wYe(){}wYe.prototype.serializeToString=function(t,e,n){return SYe.call(t,e,n)};su.prototype.toString=SYe;function SYe(t,e){var n=[],i=this.nodeType==9&&this.documentElement||this,r=i.prefix,s=i.namespaceURI;if(s&&r==null){var r=i.lookupPrefix(s);if(r==null)var o=[{namespace:s,prefix:null}]}return dP(this,n,t,e,o),n.join("")}function oYe(t,e,n){var i=t.prefix||"",r=t.namespaceURI;if(!r||i==="xml"&&r===Lz.XML||r===Lz.XMLNS)return!1;for(var s=n.length;s--;){var o=n[s];if(o.prefix===i)return o.namespace!==r}return!0}function z6e(t,e,n){t.push(" ",e,'="',n.replace(/[<>&"\t\n\r]/g,vYe),'"')}function dP(t,e,n,i,r){if(r||(r=[]),i)if(t=i(t),t){if(typeof t=="string"){e.push(t);return}}else return;switch(t.nodeType){case e_:var s=t.attributes,o=s.length,E=t.firstChild,a=t.tagName;n=Lz.isHTML(t.namespaceURI)||n;var l=a;if(!n&&!t.prefix&&t.namespaceURI){for(var c,d=0;d<s.length;d++)if(s.item(d).name==="xmlns"){c=s.item(d).value;break}if(!c)for(var u=r.length-1;u>=0;u--){var m=r[u];if(m.prefix===""&&m.namespace===t.namespaceURI){c=m.namespace;break}}if(c!==t.namespaceURI)for(var u=r.length-1;u>=0;u--){var m=r[u];if(m.namespace===t.namespaceURI){m.prefix&&(l=m.prefix+":"+a);break}}}e.push("<",l);for(var f=0;f<o;f++){var _=s.item(f);_.prefix=="xmlns"?r.push({prefix:_.localName,namespace:_.value}):_.nodeName=="xmlns"&&r.push({prefix:"",namespace:_.value})}for(var f=0;f<o;f++){var _=s.item(f);if(oYe(_,n,r)){var x=_.prefix||"",D=_.namespaceURI;z6e(e,x?"xmlns:"+x:"xmlns",D),r.push({prefix:x,namespace:D})}dP(_,e,n,i,r)}if(a===l&&oYe(t,n,r)){var x=t.prefix||"",D=t.namespaceURI;z6e(e,x?"xmlns:"+x:"xmlns",D),r.push({prefix:x,namespace:D})}if(E||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(a)){if(e.push(">"),n&&/^script$/i.test(a))for(;E;)E.data?e.push(E.data):dP(E,e,n,i,r.slice()),E=E.nextSibling;else for(;E;)dP(E,e,n,i,r.slice()),E=E.nextSibling;e.push("</",l,">")}else e.push("/>");return;case hYe:case Tx:for(var E=t.firstChild;E;)dP(E,e,n,i,r.slice()),E=E.nextSibling;return;case uP:return z6e(e,t.name,t.value);case gQ:return e.push(t.data.replace(/[<&>]/g,vYe));case lYe:return e.push("<![CDATA[",t.data,"]]>");case uYe:return e.push("<!--",t.data,"-->");case pYe:var M=t.publicId,I=t.systemId;if(e.push("<!DOCTYPE ",t.name),M)e.push(" PUBLIC ",M),I&&I!="."&&e.push(" ",I),e.push(">");else if(I&&I!=".")e.push(" SYSTEM ",I,">");else{var z=t.internalSubset;z&&e.push(" [",z,"]"),e.push(">")}return;case dYe:return e.push("<?",t.target," ",t.data,"?>");case cYe:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function TYe(t,e,n){var i;switch(e.nodeType){case e_:i=e.cloneNode(!1),i.ownerDocument=t;case Tx:break;case uP:n=!0;break}if(i||(i=e.cloneNode(!1)),i.ownerDocument=t,i.parentNode=null,n)for(var r=e.firstChild;r;)i.appendChild(TYe(t,r,n)),r=r.nextSibling;return i}function H6e(t,e,n){var i=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var s=e[r];typeof s!="object"&&s!=i[r]&&(i[r]=s)}switch(e.childNodes&&(i.childNodes=new Sx),i.ownerDocument=t,i.nodeType){case e_:var o=e.attributes,a=i.attributes=new vQ,l=o.length;a._ownerElement=i;for(var c=0;c<l;c++)i.setAttributeNode(H6e(t,o.item(c),!0));break;case uP:n=!0}if(n)for(var d=e.firstChild;d;)i.appendChild(H6e(t,d,n)),d=d.nextSibling;return i}function DYe(t,e,n){t[e]=n}try{if(Object.defineProperty){let t=function(e){switch(e.nodeType){case e_:case Tx:var n=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&n.push(t(e)),e=e.nextSibling;return n.join("");default:return e.nodeValue}};vai=t,Object.defineProperty(hP.prototype,"length",{get:function(){return G6e(this),this.$$length}}),Object.defineProperty(su.prototype,"textContent",{get:function(){return t(this)},set:function(e){switch(this.nodeType){case e_:case Tx:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),DYe=function(e,n,i){e["$$"+n]=i}}}catch{}var vai;G7.DocumentType=CQ;G7.DOMException=Mm;G7.DOMImplementation=gYe;G7.Element=PD;G7.Node=su;G7.NodeList=Sx;G7.XMLSerializer=wYe});var MYe=xr(zz=>{"use strict";var EYe=Fz().freeze;zz.XML_ENTITIES=EYe({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});zz.HTML_ENTITIES=EYe({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:"	",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});zz.entityMap=zz.HTML_ENTITIES});var OYe=xr(Q6e=>{var Uz=Fz().NAMESPACE,X6e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,kYe=new RegExp("[\\-\\.0-9"+X6e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),IYe=new RegExp("^"+X6e.source+kYe.source+"*(?::"+X6e.source+kYe.source+"*)?$"),Hz=0,W7=1,pP=2,Gz=3,mP=4,fP=5,Wz=6,bQ=7;function gP(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,gP)}gP.prototype=new Error;gP.prototype.name=gP.name;function RYe(){}RYe.prototype={parse:function(t,e,n){var i=this.domBuilder;i.startDocument(),FYe(e,e={}),yai(t,e,n,i,this.errorHandler),i.endDocument()}};function yai(t,e,n,i,r){function s(ze){if(ze>65535){ze-=65536;var Ge=55296+(ze>>10),Ae=56320+(ze&1023);return String.fromCharCode(Ge,Ae)}else return String.fromCharCode(ze)}function o(ze){var Ge=ze.slice(1,-1);return Object.hasOwnProperty.call(n,Ge)?n[Ge]:Ge.charAt(0)==="#"?s(parseInt(Ge.substr(1).replace("x","0x"))):(r.error("entity not found:"+ze),ze)}function a(ze){if(ze>x){var Ge=t.substring(x,ze).replace(/&#?\w+;/g,o);m&&l(x),i.characters(Ge,0,ze-x),x=ze}}function l(ze,Ge){for(;ze>=d&&(Ge=u.exec(t));)c=Ge.index,d=c+Ge[0].length,m.lineNumber++;m.columnNumber=ze-c+1}for(var c=0,d=0,u=/.*(?:\r\n?|\n)|.*$/g,m=i.locator,f=[{currentNSMap:e}],_={},x=0;;){try{var D=t.indexOf("<",x);if(D<0){if(!t.substr(x).match(/^\s*$/)){var E=i.doc,M=E.createTextNode(t.substr(x));E.appendChild(M),i.currentElement=M}return}switch(D>x&&a(D),t.charAt(D+1)){case"/":var ce=t.indexOf(">",D+3),I=t.substring(D+2,ce).replace(/[ \t\n\r]+$/g,""),z=f.pop();ce<0?(I=t.substring(D+2).replace(/[\s<].*/,""),r.error("end tag name: "+I+" is not complete:"+z.tagName),ce=D+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),r.error("end tag name: "+I+" maybe not complete"),ce=D+1+I.length);var G=z.localNSMap,A=z.tagName==I,Y=A||z.tagName&&z.tagName.toLowerCase()==I.toLowerCase();if(Y){if(i.endElement(z.uri,z.localName,I),G)for(var X in G)Object.prototype.hasOwnProperty.call(G,X)&&i.endPrefixMapping(X);A||r.fatalError("end tag name: "+I+" is not match the current start tagName:"+z.tagName)}else f.push(z);ce++;break;case"?":m&&l(D),ce=wai(t,D,i);break;case"!":m&&l(D),ce=bai(t,D,i,r);break;default:m&&l(D);var ne=new LYe,pe=f[f.length-1].currentNSMap,ce=_ai(t,D,ne,pe,o,r),ie=ne.length;if(!ne.closed&&xai(t,ce,ne.tagName,_)&&(ne.closed=!0,n.nbsp||r.warning("unclosed xml attribute")),m&&ie){for(var le=AYe(m,{}),Se=0;Se<ie;Se++){var je=ne[Se];l(je.offset),je.locator=AYe(m,{})}i.locator=le,PYe(ne,i,pe)&&f.push(ne),i.locator=m}else PYe(ne,i,pe)&&f.push(ne);Uz.isHTML(ne.uri)&&!ne.closed?ce=Cai(t,ce,ne.tagName,o,i):ce++}}catch(ze){if(ze instanceof gP)throw ze;r.error("element parse error: "+ze),ce=-1}ce>x?x=ce:a(Math.max(D,x)+1)}}function AYe(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function _ai(t,e,n,i,r,s){function o(f,_,x){n.attributeNames.hasOwnProperty(f)&&s.fatalError("Attribute "+f+" redefined"),n.addValue(f,_.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,r),x)}for(var a,l,c=++e,d=Hz;;){var u=t.charAt(c);switch(u){case"=":if(d===W7)a=t.slice(e,c),d=Gz;else if(d===pP)d=Gz;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===Gz||d===W7)if(d===W7&&(s.warning('attribute value must after "="'),a=t.slice(e,c)),e=c+1,c=t.indexOf(u,e),c>0)l=t.slice(e,c),o(a,l,e-1),d=fP;else throw new Error("attribute value no end '"+u+"' match");else if(d==mP)l=t.slice(e,c),o(a,l,e),s.warning('attribute "'+a+'" missed start quot('+u+")!!"),e=c+1,d=fP;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Hz:n.setTagName(t.slice(e,c));case fP:case Wz:case bQ:d=bQ,n.closed=!0;case mP:case W7:break;case pP:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),d==Hz&&n.setTagName(t.slice(e,c)),c;case">":switch(d){case Hz:n.setTagName(t.slice(e,c));case fP:case Wz:case bQ:break;case mP:case W7:l=t.slice(e,c),l.slice(-1)==="/"&&(n.closed=!0,l=l.slice(0,-1));case pP:d===pP&&(l=a),d==mP?(s.warning('attribute "'+l+'" missed quot(")!'),o(a,l,e)):((!Uz.isHTML(i[""])||!l.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),o(l,l,e));break;case Gz:throw new Error("attribute value missed!!")}return c;case"\x80":u=" ";default:if(u<=" ")switch(d){case Hz:n.setTagName(t.slice(e,c)),d=Wz;break;case W7:a=t.slice(e,c),d=pP;break;case mP:var l=t.slice(e,c);s.warning('attribute "'+l+'" missed quot(")!!'),o(a,l,e);case fP:d=Wz;break}else switch(d){case pP:var m=n.tagName;(!Uz.isHTML(i[""])||!a.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),o(a,a,e),e=c,d=W7;break;case fP:s.warning('attribute space is required"'+a+'"!!');case Wz:d=W7,e=c;break;case Gz:d=mP,e=c;break;case bQ:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function PYe(t,e,n){for(var i=t.tagName,r=null,u=t.length;u--;){var s=t[u],o=s.qName,a=s.value,m=o.indexOf(":");if(m>0)var l=s.prefix=o.slice(0,m),c=o.slice(m+1),d=l==="xmlns"&&c;else c=o,l=null,d=o==="xmlns"&&"";s.localName=c,d!==!1&&(r==null&&(r={},FYe(n,n={})),n[d]=r[d]=a,s.uri=Uz.XMLNS,e.startPrefixMapping(d,a))}for(var u=t.length;u--;){s=t[u];var l=s.prefix;l&&(l==="xml"&&(s.uri=Uz.XML),l!=="xmlns"&&(s.uri=n[l||""]))}var m=i.indexOf(":");m>0?(l=t.prefix=i.slice(0,m),c=t.localName=i.slice(m+1)):(l=null,c=t.localName=i);var f=t.uri=n[l||""];if(e.startElement(f,c,i,t),t.closed){if(e.endElement(f,c,i),r)for(l in r)Object.prototype.hasOwnProperty.call(r,l)&&e.endPrefixMapping(l)}else return t.currentNSMap=n,t.localNSMap=r,!0}function Cai(t,e,n,i,r){if(/^(?:script|textarea)$/i.test(n)){var s=t.indexOf("</"+n+">",e),o=t.substring(e+1,s);if(/[&<]/.test(o))return/^script$/i.test(n)?(r.characters(o,0,o.length),s):(o=o.replace(/&#?\w+;/g,i),r.characters(o,0,o.length),s)}return e+1}function xai(t,e,n,i){var r=i[n];return r==null&&(r=t.lastIndexOf("</"+n+">"),r<e&&(r=t.lastIndexOf("</"+n)),i[n]=r),r<e}function FYe(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}function bai(t,e,n,i){var r=t.charAt(e+2);switch(r){case"-":if(t.charAt(e+3)==="-"){var s=t.indexOf("-->",e+4);return s>e?(n.comment(t,e+4,s-e-4),s+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(t.substr(e+3,6)=="CDATA["){var s=t.indexOf("]]>",e+9);return n.startCDATA(),n.characters(t,e+9,s-e-9),n.endCDATA(),s+3}var o=Sai(t,e),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var l=o[1][0],c=!1,d=!1;a>3&&(/^public$/i.test(o[2][0])?(c=o[3][0],d=a>4&&o[4][0]):/^system$/i.test(o[2][0])&&(d=o[3][0]));var u=o[a-1];return n.startDTD(l,c,d),n.endDTD(),u.index+u[0].length}}return-1}function wai(t,e,n){var i=t.indexOf("?>",e);if(i){var r=t.substring(e,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){var s=r[0].length;return n.processingInstruction(r[1],r[2]),i+2}else return-1}return-1}function LYe(){this.attributeNames={}}LYe.prototype={setTagName:function(t){if(!IYe.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,n){if(!IYe.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:n}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}};function Sai(t,e){var n,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(r.lastIndex=e,r.exec(t);n=r.exec(t);)if(i.push(n),n[1])return i}Q6e.XMLReader=RYe;Q6e.ParseError=gP});var WYe=xr(SQ=>{var Tai=Fz(),Dai=Z6e(),NYe=MYe(),zYe=OYe(),Eai=Dai.DOMImplementation,VYe=Tai.NAMESPACE,Mai=zYe.ParseError,kai=zYe.XMLReader;function HYe(t){return t.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function GYe(t){this.options=t||{locator:{}}}GYe.prototype.parseFromString=function(t,e){var n=this.options,i=new kai,r=n.domBuilder||new jz,s=n.errorHandler,o=n.locator,a=n.xmlns||{},l=/\/x?html?$/.test(e),c=l?NYe.HTML_ENTITIES:NYe.XML_ENTITIES;o&&r.setDocumentLocator(o),i.errorHandler=Iai(s,r,o),i.domBuilder=n.domBuilder||r,l&&(a[""]=VYe.HTML),a.xml=a.xml||VYe.XML;var d=n.normalizeLineEndings||HYe;return t&&typeof t=="string"?i.parse(d(t),a,c):i.errorHandler.error("invalid doc source"),r.doc};function Iai(t,e,n){if(!t){if(e instanceof jz)return e;t=e}var i={},r=t instanceof Function;n=n||{};function s(o){var a=t[o];!a&&r&&(a=t.length==2?function(l){t(o,l)}:t),i[o]=a&&function(l){a("[xmldom "+o+"]	"+l+J6e(n))}||function(){}}return s("warning"),s("error"),s("fatalError"),i}function jz(){this.cdata=!1}function vP(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}jz.prototype={startDocument:function(){this.doc=new Eai().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,n,i){var r=this.doc,s=r.createElementNS(t,n||e),o=i.length;wQ(this,s),this.currentElement=s,this.locator&&vP(this.locator,s);for(var a=0;a<o;a++){var t=i.getURI(a),l=i.getValue(a),n=i.getQName(a),c=r.createAttributeNS(t,n);this.locator&&vP(i.getLocator(a),c),c.value=c.nodeValue=l,s.setAttributeNode(c)}},endElement:function(t,e,n){var i=this.currentElement,r=i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var n=this.doc.createProcessingInstruction(t,e);this.locator&&vP(this.locator,n),wQ(this,n)},ignorableWhitespace:function(t,e,n){},characters:function(t,e,n){if(t=BYe.apply(this,arguments),t){if(this.cdata)var i=this.doc.createCDATASection(t);else var i=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(t)&&this.doc.appendChild(i),this.locator&&vP(this.locator,i)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,n){t=BYe.apply(this,arguments);var i=this.doc.createComment(t);this.locator&&vP(this.locator,i),wQ(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var r=i.createDocumentType(t,e,n);this.locator&&vP(this.locator,r),wQ(this,r),this.doc.doctype=r}},warning:function(t){console.warn("[xmldom warning]	"+t,J6e(this.locator))},error:function(t){console.error("[xmldom error]	"+t,J6e(this.locator))},fatalError:function(t){throw new Mai(t,this.locator)}};function J6e(t){if(t)return`
@`+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function BYe(t,e,n){return typeof t=="string"?t.substr(e,n):t.length>=e+n||e?new java.lang.String(t,e,n)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){jz.prototype[t]=function(){return null}});function wQ(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}SQ.__DOMHandler=jz;SQ.normalizeLineEndings=HYe;SQ.DOMParser=GYe});var jYe=xr(TQ=>{var UYe=Z6e();TQ.DOMImplementation=UYe.DOMImplementation;TQ.XMLSerializer=UYe.XMLSerializer;TQ.DOMParser=WYe().DOMParser});var Tg,JYe,$Ye,Y1,eqe,Aai,_P,tqe,Pai,Rai,CP,$z,Fai,KYe,Lai,Oai,tye,iqe,DQ,Nai,Vai,nqe,Bai,YYe,qYe,zai,Hai,Kz,eye,iye,Gai,Wai,Uai,jai,$ai,Kai,Yai,qai,Zai,Xai,Qai,ZYe,Jai,eli,rqe,tli,ili,XYe,nli,rli,sli,oli,ali,lli,rp,Yz,cli,yP,dli,QYe,Sf,uli,EQ,nye,hli,pli,mli,fli,gli,vli,yli,_li,Cli,sqe,xli,oqe,aqe,lqe=Q(()=>{b6e();Tg=Gs(Qy());ZKe();XKe();JYe=Gs(jYe());$Ye=t=>!!t&&typeof t=="object",Y1=(...t)=>t.reduce((e,n)=>(typeof n!="object"||Object.keys(n).forEach(i=>{Array.isArray(e[i])&&Array.isArray(n[i])?e[i]=e[i].concat(n[i]):$Ye(e[i])&&$Ye(n[i])?e[i]=Y1(e[i],n[i]):e[i]=n[i]}),e),{}),eqe=t=>Object.keys(t).map(e=>t[e]),Aai=(t,e)=>{let n=[];for(let i=t;i<e;i++)n.push(i);return n},_P=t=>t.reduce((e,n)=>e.concat(n),[]),tqe=t=>{if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++)e.push(t[n]);return e},Pai=(t,e)=>t.reduce((n,i,r)=>(i[e]&&n.push(r),n),[]),Rai=(t,e)=>eqe(t.reduce((n,i)=>(i.forEach(r=>{n[e(r)]=r}),n),{})),CP={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},$z=({baseUrl:t="",source:e="",range:n="",indexRange:i=""})=>{let r={uri:e,resolvedUri:aP(t||"",e)};if(n||i){let o=(n||i).split("-"),a=Tg.default.BigInt?Tg.default.BigInt(o[0]):parseInt(o[0],10),l=Tg.default.BigInt?Tg.default.BigInt(o[1]):parseInt(o[1],10);a<Number.MAX_SAFE_INTEGER&&typeof a=="bigint"&&(a=Number(a)),l<Number.MAX_SAFE_INTEGER&&typeof l=="bigint"&&(l=Number(l));let c;typeof l=="bigint"||typeof a=="bigint"?c=Tg.default.BigInt(l)-Tg.default.BigInt(a)+Tg.default.BigInt(1):c=l-a+1,typeof c=="bigint"&&c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),r.byterange={length:c,offset:a}}return r},Fai=t=>{let e;return typeof t.offset=="bigint"||typeof t.length=="bigint"?e=Tg.default.BigInt(t.offset)+Tg.default.BigInt(t.length)-Tg.default.BigInt(1):e=t.offset+t.length-1,`${t.offset}-${e}`},KYe=t=>(t&&typeof t!="number"&&(t=parseInt(t,10)),isNaN(t)?null:t),Lai={static(t){let{duration:e,timescale:n=1,sourceDuration:i,periodDuration:r}=t,s=KYe(t.endNumber),o=e/n;return typeof s=="number"?{start:0,end:s}:typeof r=="number"?{start:0,end:r/o}:{start:0,end:i/o}},dynamic(t){let{NOW:e,clientOffset:n,availabilityStartTime:i,timescale:r=1,duration:s,periodStart:o=0,minimumUpdatePeriod:a=0,timeShiftBufferDepth:l=1/0}=t,c=KYe(t.endNumber),d=(e+n)/1e3,u=i+o,f=d+a-u,_=Math.ceil(f*r/s),x=Math.floor((d-u-l)*r/s),D=Math.floor((d-u)*r/s);return{start:Math.max(0,x),end:typeof c=="number"?c:Math.min(_,D)}}},Oai=t=>e=>{let{duration:n,timescale:i=1,periodStart:r,startNumber:s=1}=t;return{number:s+e,duration:n/i,timeline:r,time:e*n}},tye=t=>{let{type:e,duration:n,timescale:i=1,periodDuration:r,sourceDuration:s}=t,{start:o,end:a}=Lai[e](t),l=Aai(o,a).map(Oai(t));if(e==="static"){let c=l.length-1,d=typeof r=="number"?r:s;l[c].duration=d-n/i*c}return l},iqe=t=>{let{baseUrl:e,initialization:n={},sourceDuration:i,indexRange:r="",periodStart:s,presentationTime:o,number:a=0,duration:l}=t;if(!e)throw new Error(CP.NO_BASE_URL);let c=$z({baseUrl:e,source:n.sourceURL,range:n.range}),d=$z({baseUrl:e,source:e,indexRange:r});if(d.map=c,l){let u=tye(t);u.length&&(d.duration=u[0].duration,d.timeline=u[0].timeline)}else i&&(d.duration=i,d.timeline=s);return d.presentationTime=o||s,d.number=a,[d]},DQ=(t,e,n)=>{let i=t.sidx.map?t.sidx.map:null,r=t.sidx.duration,s=t.timeline||0,o=t.sidx.byterange,a=o.offset+o.length,l=e.timescale,c=e.references.filter(D=>D.referenceType!==1),d=[],u=t.endList?"static":"dynamic",m=t.sidx.timeline,f=m,_=t.mediaSequence||0,x;typeof e.firstOffset=="bigint"?x=Tg.default.BigInt(a)+e.firstOffset:x=a+e.firstOffset;for(let D=0;D<c.length;D++){let E=e.references[D],M=E.referencedSize,I=E.subsegmentDuration,z;typeof x=="bigint"?z=x+Tg.default.BigInt(M)-Tg.default.BigInt(1):z=x+M-1;let G=`${x}-${z}`,Y=iqe({baseUrl:n,timescale:l,timeline:s,periodStart:m,presentationTime:f,number:_,duration:I,sourceDuration:r,indexRange:G,type:u})[0];i&&(Y.map=i),d.push(Y),typeof x=="bigint"?x+=Tg.default.BigInt(M):x+=M,f+=I/l,_++}return t.segments=d,t},Nai=["AUDIO","SUBTITLES"],Vai=1/60,nqe=t=>Rai(t,({timeline:e})=>e).sort((e,n)=>e.timeline>n.timeline?1:-1),Bai=(t,e)=>{for(let n=0;n<t.length;n++)if(t[n].attributes.NAME===e)return t[n];return null},YYe=t=>{let e=[];return qKe(t,Nai,(n,i,r,s)=>{e=e.concat(n.playlists||[])}),e},qYe=({playlist:t,mediaSequence:e})=>{t.mediaSequence=e,t.segments.forEach((n,i)=>{n.number=t.mediaSequence+i})},zai=({oldPlaylists:t,newPlaylists:e,timelineStarts:n})=>{e.forEach(i=>{i.discontinuitySequence=n.findIndex(function({timeline:l}){return l===i.timeline});let r=Bai(t,i.attributes.NAME);if(!r||i.sidx)return;let s=i.segments[0],o=r.segments.findIndex(function(l){return Math.abs(l.presentationTime-s.presentationTime)<Vai});if(o===-1){qYe({playlist:i,mediaSequence:r.mediaSequence+r.segments.length}),i.segments[0].discontinuity=!0,i.discontinuityStarts.unshift(0),(!r.segments.length&&i.timeline>r.timeline||r.segments.length&&i.timeline>r.segments[r.segments.length-1].timeline)&&i.discontinuitySequence--;return}r.segments[o].discontinuity&&!s.discontinuity&&(s.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),qYe({playlist:i,mediaSequence:r.segments[o].number})})},Hai=({oldManifest:t,newManifest:e})=>{let n=t.playlists.concat(YYe(t)),i=e.playlists.concat(YYe(e));return e.timelineStarts=nqe([t.timelineStarts,e.timelineStarts]),zai({oldPlaylists:n,newPlaylists:i,timelineStarts:e.timelineStarts}),e},Kz=t=>t&&t.uri+"-"+Fai(t.byterange),eye=t=>{let e=t.reduce(function(i,r){return i[r.attributes.baseUrl]||(i[r.attributes.baseUrl]=[]),i[r.attributes.baseUrl].push(r),i},{}),n=[];return Object.values(e).forEach(i=>{let r=eqe(i.reduce((s,o)=>{let a=o.attributes.id+(o.attributes.lang||"");return s[a]?(o.segments&&(o.segments[0]&&(o.segments[0].discontinuity=!0),s[a].segments.push(...o.segments)),o.attributes.contentProtection&&(s[a].attributes.contentProtection=o.attributes.contentProtection)):(s[a]=o,s[a].attributes.timelineStarts=[]),s[a].attributes.timelineStarts.push({start:o.attributes.periodStart,timeline:o.attributes.periodStart}),s},{}));n=n.concat(r)}),n.map(i=>(i.discontinuityStarts=Pai(i.segments||[],"discontinuity"),i))},iye=(t,e)=>{let n=Kz(t.sidx),i=n&&e[n]&&e[n].sidx;return i&&DQ(t,i,t.sidx.resolvedUri),t},Gai=(t,e={})=>{if(!Object.keys(e).length)return t;for(let n in t)t[n]=iye(t[n],e);return t},Wai=({attributes:t,segments:e,sidx:n,mediaSequence:i,discontinuitySequence:r,discontinuityStarts:s},o)=>{let a={attributes:{NAME:t.id,BANDWIDTH:t.bandwidth,CODECS:t.codecs,"PROGRAM-ID":1},uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,discontinuitySequence:r,discontinuityStarts:s,timelineStarts:t.timelineStarts,mediaSequence:i,segments:e};return t.contentProtection&&(a.contentProtection=t.contentProtection),t.serviceLocation&&(a.attributes.serviceLocation=t.serviceLocation),n&&(a.sidx=n),o&&(a.attributes.AUDIO="audio",a.attributes.SUBTITLES="subs"),a},Uai=({attributes:t,segments:e,mediaSequence:n,discontinuityStarts:i,discontinuitySequence:r})=>{typeof e>"u"&&(e=[{uri:t.baseUrl,timeline:t.periodStart,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration);let s={NAME:t.id,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1};t.codecs&&(s.CODECS=t.codecs);let o={attributes:s,uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,timelineStarts:t.timelineStarts,discontinuityStarts:i,discontinuitySequence:r,mediaSequence:n,segments:e};return t.serviceLocation&&(o.attributes.serviceLocation=t.serviceLocation),o},jai=(t,e={},n=!1)=>{let i,r=t.reduce((s,o)=>{let a=o.attributes.role&&o.attributes.role.value||"",l=o.attributes.lang||"",c=o.attributes.label||"main";if(l&&!o.attributes.label){let u=a?` (${a})`:"";c=`${o.attributes.lang}${u}`}s[c]||(s[c]={language:l,autoselect:!0,default:a==="main",playlists:[],uri:""});let d=iye(Wai(o,n),e);return s[c].playlists.push(d),typeof i>"u"&&a==="main"&&(i=o,i.default=!0),s},{});if(!i){let s=Object.keys(r)[0];r[s].default=!0}return r},$ai=(t,e={})=>t.reduce((n,i)=>{let r=i.attributes.label||i.attributes.lang||"text";return n[r]||(n[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),n[r].playlists.push(iye(Uai(i),e)),n},{}),Kai=t=>t.reduce((e,n)=>(n&&n.forEach(i=>{let{channel:r,language:s}=i;e[s]={autoselect:!1,default:!1,instreamId:r,language:s},i.hasOwnProperty("aspectRatio")&&(e[s].aspectRatio=i.aspectRatio),i.hasOwnProperty("easyReader")&&(e[s].easyReader=i.easyReader),i.hasOwnProperty("3D")&&(e[s]["3D"]=i["3D"])}),e),{}),Yai=({attributes:t,segments:e,sidx:n,discontinuityStarts:i})=>{let r={attributes:{NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth,"PROGRAM-ID":1},uri:"",endList:t.type==="static",timeline:t.periodStart,resolvedUri:t.baseUrl||"",targetDuration:t.duration,discontinuityStarts:i,timelineStarts:t.timelineStarts,segments:e};return t.frameRate&&(r.attributes["FRAME-RATE"]=t.frameRate),t.contentProtection&&(r.contentProtection=t.contentProtection),t.serviceLocation&&(r.attributes.serviceLocation=t.serviceLocation),n&&(r.sidx=n),r},qai=({attributes:t})=>t.mimeType==="video/mp4"||t.mimeType==="video/webm"||t.contentType==="video",Zai=({attributes:t})=>t.mimeType==="audio/mp4"||t.mimeType==="audio/webm"||t.contentType==="audio",Xai=({attributes:t})=>t.mimeType==="text/vtt"||t.contentType==="text",Qai=(t,e)=>{t.forEach(n=>{n.mediaSequence=0,n.discontinuitySequence=e.findIndex(function({timeline:i}){return i===n.timeline}),n.segments&&n.segments.forEach((i,r)=>{i.number=r})})},ZYe=t=>t?Object.keys(t).reduce((e,n)=>{let i=t[n];return e.concat(i.playlists)},[]):[],Jai=({dashPlaylists:t,locations:e,contentSteering:n,sidxMapping:i={},previousManifest:r,eventStream:s})=>{if(!t.length)return{};let{sourceDuration:o,type:a,suggestedPresentationDelay:l,minimumUpdatePeriod:c}=t[0].attributes,d=eye(t.filter(qai)).map(Yai),u=eye(t.filter(Zai)),m=eye(t.filter(Xai)),f=t.map(z=>z.attributes.captionServices).filter(Boolean),_={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:Gai(d,i)};c>=0&&(_.minimumUpdatePeriod=c*1e3),e&&(_.locations=e),n&&(_.contentSteering=n),a==="dynamic"&&(_.suggestedPresentationDelay=l),s&&s.length>0&&(_.eventStream=s);let x=_.playlists.length===0,D=u.length?jai(u,i,x):null,E=m.length?$ai(m,i):null,M=d.concat(ZYe(D),ZYe(E)),I=M.map(({timelineStarts:z})=>z);return _.timelineStarts=nqe(I),Qai(M,_.timelineStarts),D&&(_.mediaGroups.AUDIO.audio=D),E&&(_.mediaGroups.SUBTITLES.subs=E),f.length&&(_.mediaGroups["CLOSED-CAPTIONS"].cc=Kai(f)),r?Hai({oldManifest:r,newManifest:_}):_},eli=(t,e,n)=>{let{NOW:i,clientOffset:r,availabilityStartTime:s,timescale:o=1,periodStart:a=0,minimumUpdatePeriod:l=0}=t,c=(i+r)/1e3,d=s+a,m=c+l-d;return Math.ceil((m*o-e)/n)},rqe=(t,e)=>{let{type:n,minimumUpdatePeriod:i=0,media:r="",sourceDuration:s,timescale:o=1,startNumber:a=1,periodStart:l}=t,c=[],d=-1;for(let u=0;u<e.length;u++){let m=e[u],f=m.d,_=m.r||0,x=m.t||0;d<0&&(d=x),x&&x>d&&(d=x);let D;if(_<0){let I=u+1;I===e.length?n==="dynamic"&&i>0&&r.indexOf("$Number$")>0?D=eli(t,d,f):D=(s*o-d)/f:D=(e[I].t-d)/f}else D=_+1;let E=a+c.length+D,M=a+c.length;for(;M<E;)c.push({number:M,duration:f/o,time:d,timeline:l}),d+=f,M++}return c},tli=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ili=t=>(e,n,i,r)=>{if(e==="$$")return"$";if(typeof t[n]>"u")return e;let s=""+t[n];return n==="RepresentationID"||(i?r=parseInt(r,10):r=1,s.length>=r)?s:`${new Array(r-s.length+1).join("0")}${s}`},XYe=(t,e)=>t.replace(tli,ili(e)),nli=(t,e)=>!t.duration&&!e?[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodStart}]:t.duration?tye(t):rqe(t,e),rli=(t,e)=>{let n={RepresentationID:t.id,Bandwidth:t.bandwidth||0},{initialization:i={sourceURL:"",range:""}}=t,r=$z({baseUrl:t.baseUrl,source:XYe(i.sourceURL,n),range:i.range});return nli(t,e).map(o=>{n.Number=o.number,n.Time=o.time;let a=XYe(t.media||"",n),l=t.timescale||1,c=t.presentationTimeOffset||0,d=t.periodStart+(o.time-c)/l;return{uri:a,timeline:o.timeline,duration:o.duration,resolvedUri:aP(t.baseUrl||"",a),map:r,number:o.number,presentationTime:d}})},sli=(t,e)=>{let{baseUrl:n,initialization:i={}}=t,r=$z({baseUrl:n,source:i.sourceURL,range:i.range}),s=$z({baseUrl:n,source:e.media,range:e.mediaRange});return s.map=r,s},oli=(t,e)=>{let{duration:n,segmentUrls:i=[],periodStart:r}=t;if(!n&&!e||n&&e)throw new Error(CP.SEGMENT_TIME_UNSPECIFIED);let s=i.map(l=>sli(t,l)),o;return n&&(o=tye(t)),e&&(o=rqe(t,e)),o.map((l,c)=>{if(s[c]){let d=s[c],u=t.timescale||1,m=t.presentationTimeOffset||0;return d.timeline=l.timeline,d.duration=l.duration,d.number=l.number,d.presentationTime=r+(l.time-m)/u,d}}).filter(l=>l)},ali=({attributes:t,segmentInfo:e})=>{let n,i;e.template?(i=rli,n=Y1(t,e.template)):e.base?(i=iqe,n=Y1(t,e.base)):e.list&&(i=oli,n=Y1(t,e.list));let r={attributes:t};if(!i)return r;let s=i(n,e.segmentTimeline);if(n.duration){let{duration:o,timescale:a=1}=n;n.duration=o/a}else s.length?n.duration=s.reduce((o,a)=>Math.max(o,Math.ceil(a.duration)),0):n.duration=0;return r.attributes=n,r.segments=s,e.base&&n.indexRange&&(r.sidx=s[0],r.segments=[]),r},lli=t=>t.map(ali),rp=(t,e)=>tqe(t.childNodes).filter(({tagName:n})=>n===e),Yz=t=>t.textContent.trim(),cli=t=>parseFloat(t.split("/").reduce((e,n)=>e/n)),yP=t=>{let a=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!a)return 0;let[l,c,d,u,m,f]=a.slice(1);return parseFloat(l||0)*31536e3+parseFloat(c||0)*2592e3+parseFloat(d||0)*86400+parseFloat(u||0)*3600+parseFloat(m||0)*60+parseFloat(f||0)},dli=t=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t)&&(t+="Z"),Date.parse(t)),QYe={mediaPresentationDuration(t){return yP(t)},availabilityStartTime(t){return dli(t)/1e3},minimumUpdatePeriod(t){return yP(t)},suggestedPresentationDelay(t){return yP(t)},type(t){return t},timeShiftBufferDepth(t){return yP(t)},start(t){return yP(t)},width(t){return parseInt(t,10)},height(t){return parseInt(t,10)},bandwidth(t){return parseInt(t,10)},frameRate(t){return cli(t)},startNumber(t){return parseInt(t,10)},timescale(t){return parseInt(t,10)},presentationTimeOffset(t){return parseInt(t,10)},duration(t){let e=parseInt(t,10);return isNaN(e)?yP(t):e},d(t){return parseInt(t,10)},t(t){return parseInt(t,10)},r(t){return parseInt(t,10)},presentationTime(t){return parseInt(t,10)},DEFAULT(t){return t}},Sf=t=>t&&t.attributes?tqe(t.attributes).reduce((e,n)=>{let i=QYe[n.name]||QYe.DEFAULT;return e[n.name]=i(n.value),e},{}):{},uli={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},EQ=(t,e)=>e.length?_P(t.map(function(n){return e.map(function(i){let r=Yz(i),s=aP(n.baseUrl,r),o=Y1(Sf(i),{baseUrl:s});return s!==r&&!o.serviceLocation&&n.serviceLocation&&(o.serviceLocation=n.serviceLocation),o})})):t,nye=t=>{let e=rp(t,"SegmentTemplate")[0],n=rp(t,"SegmentList")[0],i=n&&rp(n,"SegmentURL").map(u=>Y1({tag:"SegmentURL"},Sf(u))),r=rp(t,"SegmentBase")[0],s=n||e,o=s&&rp(s,"SegmentTimeline")[0],a=n||r||e,l=a&&rp(a,"Initialization")[0],c=e&&Sf(e);c&&l?c.initialization=l&&Sf(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});let d={template:c,segmentTimeline:o&&rp(o,"S").map(u=>Sf(u)),list:n&&Y1(Sf(n),{segmentUrls:i,initialization:Sf(l)}),base:r&&Y1(Sf(r),{initialization:Sf(l)})};return Object.keys(d).forEach(u=>{d[u]||delete d[u]}),d},hli=(t,e,n)=>i=>{let r=rp(i,"BaseURL"),s=EQ(e,r),o=Y1(t,Sf(i)),a=nye(i);return s.map(l=>({segmentInfo:Y1(n,a),attributes:Y1(o,l)}))},pli=t=>t.reduce((e,n)=>{let i=Sf(n);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());let r=uli[i.schemeIdUri];if(r){e[r]={attributes:i};let s=rp(n,"cenc:pssh")[0];if(s){let o=Yz(s);e[r].pssh=o&&V6e(o)}}return e},{}),mli=t=>{if(t.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof t.value!="string"?[]:t.value.split(";")).map(n=>{let i,r;return r=n,/^CC\d=/.test(n)?[i,r]=n.split("="):/^CC\d$/.test(n)&&(i=n),{channel:i,language:r}});if(t.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof t.value!="string"?[]:t.value.split(";")).map(n=>{let i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(n)){let[r,s=""]=n.split("=");i.channel=r,i.language=n,s.split(",").forEach(o=>{let[a,l]=o.split(":");a==="lang"?i.language=l:a==="er"?i.easyReader=Number(l):a==="war"?i.aspectRatio=Number(l):a==="3D"&&(i["3D"]=Number(l))})}else i.language=n;return i.channel&&(i.channel="SERVICE"+i.channel),i})},fli=t=>_P(rp(t.node,"EventStream").map(e=>{let n=Sf(e),i=n.schemeIdUri;return rp(e,"Event").map(r=>{let s=Sf(r),o=s.presentationTime||0,a=n.timescale||1,l=s.duration||0,c=o/a+t.attributes.start;return{schemeIdUri:i,value:n.value,id:s.id,start:c,end:c+l/a,messageData:Yz(r)||s.messageData,contentEncoding:n.contentEncoding,presentationTimeOffset:n.presentationTimeOffset||0}})})),gli=(t,e,n)=>i=>{let r=Sf(i),s=EQ(e,rp(i,"BaseURL")),o=rp(i,"Role")[0],a={role:Sf(o)},l=Y1(t,r,a),c=rp(i,"Accessibility")[0],d=mli(Sf(c));d&&(l=Y1(l,{captionServices:d}));let u=rp(i,"Label")[0];if(u&&u.childNodes.length){let D=u.childNodes[0].nodeValue.trim();l=Y1(l,{label:D})}let m=pli(rp(i,"ContentProtection"));Object.keys(m).length&&(l=Y1(l,{contentProtection:m}));let f=nye(i),_=rp(i,"Representation"),x=Y1(n,f);return _P(_.map(hli(l,s,x)))},vli=(t,e)=>(n,i)=>{let r=EQ(e,rp(n.node,"BaseURL")),s=Y1(t,{periodStart:n.attributes.start});typeof n.attributes.duration=="number"&&(s.periodDuration=n.attributes.duration);let o=rp(n.node,"AdaptationSet"),a=nye(n.node);return _P(o.map(gli(s,r,a)))},yli=(t,e)=>{if(t.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!t.length)return null;let n=Y1({serverURL:Yz(t[0])},Sf(t[0]));return n.queryBeforeStart=n.queryBeforeStart==="true",n},_li=({attributes:t,priorPeriodAttributes:e,mpdType:n})=>typeof t.start=="number"?t.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&n==="static"?0:null,Cli=(t,e={})=>{let{manifestUri:n="",NOW:i=Date.now(),clientOffset:r=0,eventHandler:s=function(){}}=e,o=rp(t,"Period");if(!o.length)throw new Error(CP.INVALID_NUMBER_OF_PERIOD);let a=rp(t,"Location"),l=Sf(t),c=EQ([{baseUrl:n}],rp(t,"BaseURL")),d=rp(t,"ContentSteering");l.type=l.type||"static",l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=i,l.clientOffset=r,a.length&&(l.locations=a.map(Yz));let u=[];return o.forEach((m,f)=>{let _=Sf(m),x=u[f-1];_.start=_li({attributes:_,priorPeriodAttributes:x?x.attributes:null,mpdType:l.type}),u.push({node:m,attributes:_})}),{locations:l.locations,contentSteeringInfo:yli(d,s),representationInfo:_P(u.map(vli(l,c))),eventStream:_P(u.map(fli))}},sqe=t=>{if(t==="")throw new Error(CP.DASH_EMPTY_MANIFEST);let e=new JYe.DOMParser,n,i;try{n=e.parseFromString(t,"application/xml"),i=n&&n.documentElement.tagName==="MPD"?n.documentElement:null}catch{}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(CP.DASH_INVALID_XML);return i},xli=t=>{let e=rp(t,"UTCTiming")[0];if(!e)return null;let n=Sf(e);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(CP.UNSUPPORTED_UTC_TIMING_SCHEME)}return n},oqe=(t,e={})=>{let n=Cli(sqe(t),e),i=lli(n.representationInfo);return Jai({dashPlaylists:i,locations:n.locations,contentSteering:n.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:n.eventStream})},aqe=t=>xli(sqe(t))});var uqe=xr((Hjn,dqe)=>{var cqe=Math.pow(2,32),bli=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n;return e.getBigUint64?(n=e.getBigUint64(0),n<Number.MAX_SAFE_INTEGER?Number(n):n):e.getUint32(0)*cqe+e.getUint32(4)};dqe.exports={getUint64:bli,MAX_UINT32:cqe}});var mqe=xr((Gjn,pqe)=>{var hqe=uqe().getUint64,wli=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},i=12;n.version===0?(n.earliestPresentationTime=e.getUint32(i),n.firstOffset=e.getUint32(i+4),i+=8):(n.earliestPresentationTime=hqe(t.subarray(i)),n.firstOffset=hqe(t.subarray(i+8)),i+=16),i+=2;var r=e.getUint16(i);for(i+=2;r>0;i+=12,r--)n.references.push({referenceType:(t[i]&128)>>>7,referencedSize:e.getUint32(i)&2147483647,subsegmentDuration:e.getUint32(i+4),startsWithSap:!!(t[i+8]&128),sapType:(t[i+8]&112)>>>4,sapDeltaTime:e.getUint32(i+8)&268435455});return n};pqe.exports=wli});var Sli,Tli,RD,rye=Q(()=>{H7();Sli=vo([73,68,51]),Tli=function(e,n){n===void 0&&(n=0),e=vo(e);var i=e[n+5],r=e[n+6]<<21|e[n+7]<<14|e[n+8]<<7|e[n+9],s=(i&16)>>4;return s?r+20:r+10},RD=function t(e,n){return n===void 0&&(n=0),e=vo(e),e.length-n<10||!ru(e,Sli,{offset:n})?n:(n+=Tli(e,n),t(e,n))}});var sye=Q(()=>{H7()});var Yjn,gqe=Q(()=>{Yjn=new Uint8Array([79,112,117,115,72,101,97,100])});var vqe,Ili,oye,yqe,_qe,Cqe=Q(()=>{H7();sye();gqe();vqe=function(e){return typeof e=="string"?fQ(e):e},Ili=function(e){return Array.isArray(e)?e.map(function(n){return vqe(n)}):[vqe(e)]},yqe=function(e){e=vo(e);for(var n=[],i=0;e.length>i;){var r=e[i],s=0,o=0;o++;var a=e[o];for(o++;a&128;)s=(a&127)<<7,a=e[o],o++;s+=a&127;for(var l=0;l<oye.length;l++){var c=oye[l],d=c.id,u=c.parser;if(r===d){n.push(u(e.subarray(o,o+s)));break}}i+=s+o}return n};oye=[{id:3,parser:function(e){var n={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(n.flags&128&&(n.dependsOnEsId=e[n.size]<<8|e[n.size+1],n.size+=2),n.flags&64){var i=e[n.size];n.url=O6e(e.subarray(n.size+1,n.size+1+i)),n.size+=i}return n.flags&32&&(n.ocrEsId=e[n.size]<<8|e[n.size+1],n.size+=2),n.descriptors=yqe(e.subarray(n.size))||[],n}},{id:4,parser:function(e){var n={tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:yqe(e.subarray(13))};return n}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];_qe=function t(e,n,i){i===void 0&&(i=!1),n=Ili(n),e=vo(e);var r=[];if(!n.length)return r;for(var s=0;s<e.length;){var o=(e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3])>>>0,a=e.subarray(s+4,s+8);if(o===0)break;var l=s+o;if(l>e.length){if(i)break;l=e.length}var c=e.subarray(s+8,l);ru(a,n[0])&&(n.length===1?r.push(c):r.push.apply(r,t(c,n.slice(1),i))),s=l}return r}});var qz,aye,Ali,MQ,xqe,Pli,Rli,lye,bqe=Q(()=>{H7();sye();qz={EBML:vo([26,69,223,163]),DocType:vo([66,130]),Segment:vo([24,83,128,103]),SegmentInfo:vo([21,73,169,102]),Tracks:vo([22,84,174,107]),Track:vo([174]),TrackNumber:vo([215]),DefaultDuration:vo([35,227,131]),TrackEntry:vo([174]),TrackType:vo([131]),FlagDefault:vo([136]),CodecID:vo([134]),CodecPrivate:vo([99,162]),VideoTrack:vo([224]),AudioTrack:vo([225]),Cluster:vo([31,67,182,117]),Timestamp:vo([231]),TimestampScale:vo([42,215,177]),BlockGroup:vo([160]),BlockDuration:vo([155]),Block:vo([161]),SimpleBlock:vo([163])},aye=[128,64,32,16,8,4,2,1],Ali=function(e){for(var n=1,i=0;i<aye.length&&!(e&aye[i]);i++)n++;return n},MQ=function(e,n,i,r){i===void 0&&(i=!0),r===void 0&&(r=!1);var s=Ali(e[n]),o=e.subarray(n,n+s);return i&&(o=Array.prototype.slice.call(e,n,n+s),o[0]^=aye[s-1]),{length:s,value:L6e(o,{signed:r}),bytes:o}},xqe=function t(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(n){return t(n)}):typeof e=="number"?KKe(e):e},Pli=function(e){return Array.isArray(e)?e.map(function(n){return xqe(n)}):[xqe(e)]},Rli=function t(e,n,i){if(i>=n.length)return n.length;var r=MQ(n,i,!1);if(ru(e.bytes,r.bytes))return i;var s=MQ(n,i+r.length);return t(e,n,i+s.length+s.value+r.length)},lye=function t(e,n){n=Pli(n),e=vo(e);var i=[];if(!n.length)return i;for(var r=0;r<e.length;){var s=MQ(e,r,!1),o=MQ(e,r+s.length),a=r+s.length+o.length;o.value===127&&(o.value=Rli(s,e,a),o.value!==e.length&&(o.value-=a));var l=a+o.value>e.length?e.length:a+o.value,c=e.subarray(a,l);ru(n[0],s.bytes)&&(n.length===1?i.push(c):i=i.concat(t(c,n.slice(1))));var d=s.length+o.length+c.length;r+=d}return i}});var Fli,Lli,Oli,Nli,wqe,Sqe,Tqe,Dqe=Q(()=>{H7();Fli=vo([0,0,0,1]),Lli=vo([0,0,1]),Oli=vo([0,0,3]),Nli=function(e){for(var n=[],i=1;i<e.length-2;)ru(e.subarray(i,i+3),Oli)&&(n.push(i+2),i++),i++;if(n.length===0)return e;var r=e.length-n.length,s=new Uint8Array(r),o=0;for(i=0;i<r;o++,i++)o===n[0]&&(o++,n.shift()),s[i]=e[o];return s},wqe=function(e,n,i,r){r===void 0&&(r=1/0),e=vo(e),i=[].concat(i);for(var s=0,o,a=0;s<e.length&&(a<r||o);){var l=void 0;if(ru(e.subarray(s),Fli)?l=4:ru(e.subarray(s),Lli)&&(l=3),!l){s++;continue}if(a++,o)return Nli(e.subarray(o,s));var c=void 0;n==="h264"?c=e[s+l]&31:n==="h265"&&(c=e[s+l]>>1&63),i.indexOf(c)!==-1&&(o=s+l),s+=l+(n==="h264"?1:2)}return e.subarray(0,0)},Sqe=function(e,n,i){return wqe(e,"h264",n,i)},Tqe=function(e,n,i){return wqe(e,"h265",n,i)}});var Dg,xP,cye,Vli,kQ,Eqe,Mqe=Q(()=>{H7();Cqe();bqe();rye();Dqe();Dg={webm:vo([119,101,98,109]),matroska:vo([109,97,116,114,111,115,107,97]),flac:vo([102,76,97,67]),ogg:vo([79,103,103,83]),ac3:vo([11,119]),riff:vo([82,73,70,70]),avi:vo([65,86,73]),wav:vo([87,65,86,69]),"3gp":vo([102,116,121,112,51,103]),mp4:vo([102,116,121,112]),fmp4:vo([115,116,121,112]),mov:vo([102,116,121,112,113,116]),moov:vo([109,111,111,118]),moof:vo([109,111,111,102])},xP={aac:function(e){var n=RD(e);return ru(e,[255,16],{offset:n,mask:[255,22]})},mp3:function(e){var n=RD(e);return ru(e,[255,2],{offset:n,mask:[255,6]})},webm:function(e){var n=lye(e,[qz.EBML,qz.DocType])[0];return ru(n,Dg.webm)},mkv:function(e){var n=lye(e,[qz.EBML,qz.DocType])[0];return ru(n,Dg.matroska)},mp4:function(e){if(xP["3gp"](e)||xP.mov(e))return!1;if(ru(e,Dg.mp4,{offset:4})||ru(e,Dg.fmp4,{offset:4})||ru(e,Dg.moof,{offset:4})||ru(e,Dg.moov,{offset:4}))return!0},mov:function(e){return ru(e,Dg.mov,{offset:4})},"3gp":function(e){return ru(e,Dg["3gp"],{offset:4})},ac3:function(e){var n=RD(e);return ru(e,Dg.ac3,{offset:n})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var n=0;n+188<e.length&&n<188;){if(e[n]===71&&e[n+188]===71)return!0;n+=1}return!1},flac:function(e){var n=RD(e);return ru(e,Dg.flac,{offset:n})},ogg:function(e){return ru(e,Dg.ogg)},avi:function(e){return ru(e,Dg.riff)&&ru(e,Dg.avi,{offset:8})},wav:function(e){return ru(e,Dg.riff)&&ru(e,Dg.wav,{offset:8})},h264:function(e){return Sqe(e,7,3).length},h265:function(e){return Tqe(e,[32,33],3).length}},cye=Object.keys(xP).filter(function(t){return t!=="ts"&&t!=="h264"&&t!=="h265"}).concat(["ts","h264","h265"]);cye.forEach(function(t){var e=xP[t];xP[t]=function(n){return e(vo(n))}});Vli=xP,kQ=function(e){e=vo(e);for(var n=0;n<cye.length;n++){var i=cye[n];if(Vli[i](e))return i}return""},Eqe=function(e){return _qe(e,["moof"]).length>0}});var Rqe=xr((h$n,Pqe)=>{var dye=9e4,uye,hye,IQ,pye,kqe,Iqe,Aqe;uye=function(t){return t*dye};hye=function(t,e){return t*e};IQ=function(t){return t/dye};pye=function(t,e){return t/e};kqe=function(t,e){return uye(pye(t,e))};Iqe=function(t,e){return hye(IQ(t),e)};Aqe=function(t,e,n){return IQ(n?t:t-e)};Pqe.exports={ONE_SECOND_IN_TS:dye,secondsToVideoTs:uye,secondsToAudioTs:hye,videoTsToSeconds:IQ,audioTsToSeconds:pye,audioTsToVideoTs:kqe,videoTsToAudioTs:Iqe,metadataTsToSeconds:Aqe}});function Aye(t,e=":",n=""){let i="info",r;function s(...o){r("log",i,o)}return r=Hli(t,s,n),s.createLogger=(o,a,l)=>{let c=a!==void 0?a:e,d=l!==void 0?l:n,u=`${t} ${c} ${o}`;return Aye(u,c,d)},s.createNewLogger=(o,a,l)=>Aye(o,a,l),s.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},s.level=o=>{if(typeof o=="string"){if(!s.levels.hasOwnProperty(o))throw new Error(`"${o}" in not a valid log level`);i=o}return i},s.history=()=>y3?[].concat(y3):[],s.history.filter=o=>(y3||[]).filter(a=>new RegExp(`.*${o}.*`).test(a[0])),s.history.clear=()=>{y3&&(y3.length=0)},s.history.disable=()=>{y3!==null&&(y3.length=0,y3=null)},s.history.enable=()=>{y3===null&&(y3=[])},s.error=(...o)=>r("error",i,o),s.warn=(...o)=>r("warn",i,o),s.debug=(...o)=>r("debug",i,o),s}function DP(t,e){PZe(t).forEach(n=>e(t[n],n))}function RZe(t,e,n=0){return PZe(t).reduce((i,r)=>e(i,t[r],r),n)}function H5(t){return!!t&&typeof t=="object"}function RP(t){return H5(t)&&Gli.call(t)==="[object Object]"&&t.constructor===Object}function zu(...t){let e={};return t.forEach(n=>{n&&DP(n,(i,r)=>{if(!RP(i)){e[r]=i;return}RP(e[r])||(e[r]={}),e[r]=zu(e[r],i)})}),e}function FZe(t={}){let e=[];for(let n in t)if(t.hasOwnProperty(n)){let i=t[n];e.push(i)}return e}function HJ(t,e,n,i=!0){let r=o=>Object.defineProperty(t,e,{value:o,enumerable:!0,writable:!0}),s={configurable:!0,enumerable:!0,get(){let o=n();return r(o),o}};return i&&(s.set=r),Object.defineProperty(t,e,s)}function Lqe(t){return typeof t=="string"&&!!t.trim()}function jli(t){if(t.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function HP(){return Cr.default===di.default.document}function GP(t){return H5(t)&&t.nodeType===1}function zZe(){try{return di.default.parent!==di.default.self}catch{return!0}}function HZe(t){return function(e,n){if(!Lqe(e))return Cr.default[t](null);Lqe(n)&&(n=Cr.default.querySelector(n));let i=GP(n)?n:Cr.default;return i[t]&&i[t](e)}}function ga(t="div",e={},n={},i){let r=Cr.default.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(s){let o=e[s];s==="textContent"?nw(r,o):(r[s]!==o||s==="tabIndex")&&(r[s]=o)}),Object.getOwnPropertyNames(n).forEach(function(s){r.setAttribute(s,n[s])}),i&&k_e(r,i),r}function nw(t,e){return typeof t.textContent>"u"?t.innerText=e:t.textContent=e,t}function Rye(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function iH(t,e){return jli(e),t.classList.contains(e)}function VD(t,...e){return t.classList.add(...e.reduce((n,i)=>n.concat(i.split(/\s+/)),[])),t}function $J(t,...e){return t?(t.classList.remove(...e.reduce((n,i)=>n.concat(i.split(/\s+/)),[])),t):(uc.warn("removeClass was called with an element that doesn't exist"),null)}function GZe(t,e,n){return typeof n=="function"&&(n=n(t,e)),typeof n!="boolean"&&(n=void 0),e.split(/\s+/).forEach(i=>t.classList.toggle(i,n)),t}function WZe(t,e){Object.getOwnPropertyNames(e).forEach(function(n){let i=e[n];i===null||typeof i>"u"||i===!1?t.removeAttribute(n):t.setAttribute(n,i===!0?"":i)})}function j7(t){let e={},n=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(t&&t.attributes&&t.attributes.length>0){let i=t.attributes;for(let r=i.length-1;r>=0;r--){let s=i[r].name,o=i[r].value;n.includes(s)&&(o=o!==null),e[s]=o}}return e}function UZe(t,e){return t.getAttribute(e)}function FP(t,e,n){t.setAttribute(e,n)}function KJ(t,e){t.removeAttribute(e)}function jZe(){Cr.default.body.focus(),Cr.default.onselectstart=function(){return!1}}function $Ze(){Cr.default.onselectstart=function(){return!0}}function LP(t){if(t&&t.getBoundingClientRect&&t.parentNode){let e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(i=>{e[i]!==void 0&&(n[i]=e[i])}),n.height||(n.height=parseFloat(OP(t,"height"))),n.width||(n.width=parseFloat(OP(t,"width"))),n}}function cH(t){if(!t||t&&!t.offsetParent)return{left:0,top:0,width:0,height:0};let e=t.offsetWidth,n=t.offsetHeight,i=0,r=0;for(;t.offsetParent&&t!==Cr.default[zQ.fullscreenElement];)i+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{left:i,top:r,width:e,height:n}}function YJ(t,e){let n={x:0,y:0};if(kg){let d=t;for(;d&&d.nodeName.toLowerCase()!=="html";){let u=OP(d,"transform");if(/^matrix/.test(u)){let m=u.slice(7,-1).split(/,\s/).map(Number);n.x+=m[4],n.y+=m[5]}else if(/^matrix3d/.test(u)){let m=u.slice(9,-1).split(/,\s/).map(Number);n.x+=m[12],n.y+=m[13]}if(d.assignedSlot&&d.assignedSlot.parentElement&&di.default.WebKitCSSMatrix){let m=di.default.getComputedStyle(d.assignedSlot.parentElement).transform,f=new di.default.WebKitCSSMatrix(m);n.x+=f.m41,n.y+=f.m42}d=d.parentNode||d.host}}let i={},r=cH(e.target),s=cH(t),o=s.width,a=s.height,l=e.offsetY-(s.top-r.top),c=e.offsetX-(s.left-r.left);return e.changedTouches&&(c=e.changedTouches[0].pageX-s.left,l=e.changedTouches[0].pageY+s.top,kg&&(c-=n.x,l-=n.y)),i.y=1-Math.max(0,Math.min(1,l/a)),i.x=Math.max(0,Math.min(1,c/o)),i}function KZe(t){return H5(t)&&t.nodeType===3}function qJ(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function YZe(t){return typeof t=="function"&&(t=t()),(Array.isArray(t)?t:[t]).map(e=>{if(typeof e=="function"&&(e=e()),GP(e)||KZe(e))return e;if(typeof e=="string"&&/\S/.test(e))return Cr.default.createTextNode(e)}).filter(e=>e)}function k_e(t,e){return YZe(e).forEach(n=>t.appendChild(n)),t}function qZe(t,e){return k_e(qJ(t),e)}function dH(t){return t.button===void 0&&t.buttons===void 0||t.button===0&&t.buttons===void 0||t.type==="mouseup"&&t.button===0&&t.buttons===0||t.type==="mousedown"&&t.button===0&&t.buttons===0?!0:!(t.button!==0||t.buttons!==1)}function OP(t,e){if(!t||!e)return"";if(typeof di.default.getComputedStyle=="function"){let n;try{n=di.default.getComputedStyle(t)}catch{return""}return n?n.getPropertyValue(e)||n[e]:""}return""}function XZe(t){[...Cr.default.styleSheets].forEach(e=>{try{let n=[...e.cssRules].map(r=>r.cssText).join(""),i=Cr.default.createElement("style");i.textContent=n,t.document.head.appendChild(i)}catch{let i=Cr.default.createElement("link");i.rel="stylesheet",i.type=e.type,i.media=e.media.mediaText,i.href=e.href,t.document.head.appendChild(i)}})}function Lye(t,e){HP()&&(e&&(Fye=e),di.default.setTimeout($li,t))}function Oye(){JZe=!0,di.default.removeEventListener("load",Oye)}function d6(){return Yli++}function Oqe(t,e){if(!Mg.has(t))return;let n=Mg.get(t);n.handlers[e].length===0&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),Object.getOwnPropertyNames(n).length===0&&Mg.delete(t)}function I_e(t,e,n,i){n.forEach(function(r){t(e,r,i)})}function ZJ(t){if(t.fixed_)return t;function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){let i=t||di.default.event;t={};let r=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(let s in i)r.includes(s)||s==="returnValue"&&i.preventDefault||(t[s]=i[s]);if(t.target||(t.target=t.srcElement||Cr.default),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){i.preventDefault&&i.preventDefault(),t.returnValue=!1,i.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),t.cancelBubble=!0,i.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,t.clientX!==null&&t.clientX!==void 0){let s=Cr.default.documentElement,o=Cr.default.body;t.pageX=t.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),t.pageY=t.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)}t.which=t.charCode||t.keyCode,t.button!==null&&t.button!==void 0&&(t.button=t.button&1?0:t.button&4?1:t.button&2?2:0)}return t.fixed_=!0,t}function R4(t,e,n){if(Array.isArray(e))return I_e(R4,t,e,n);Mg.has(t)||Mg.set(t,{});let i=Mg.get(t);if(i.handlers||(i.handlers={}),i.handlers[e]||(i.handlers[e]=[]),n.guid||(n.guid=d6()),i.handlers[e].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(r,s){if(i.disabled)return;r=ZJ(r);let o=i.handlers[r.type];if(o){let a=o.slice(0);for(let l=0,c=a.length;l<c&&!r.isImmediatePropagationStopped();l++)try{a[l].call(t,r,s)}catch(d){uc.error(d)}}}),i.handlers[e].length===1)if(t.addEventListener){let r=!1;qli()&&Zli.indexOf(e)>-1&&(r={passive:!0}),t.addEventListener(e,i.dispatcher,r)}else t.attachEvent&&t.attachEvent("on"+e,i.dispatcher)}function _2(t,e,n){if(!Mg.has(t))return;let i=Mg.get(t);if(!i.handlers)return;if(Array.isArray(e))return I_e(_2,t,e,n);let r=function(o,a){i.handlers[a]=[],Oqe(o,a)};if(e===void 0){for(let o in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},o)&&r(t,o);return}let s=i.handlers[e];if(s){if(!n){r(t,e);return}if(n.guid)for(let o=0;o<s.length;o++)s[o].guid===n.guid&&s.splice(o--,1);Oqe(t,e)}}function WP(t,e,n){let i=Mg.has(t)?Mg.get(t):{},r=t.parentNode||t.ownerDocument;if(typeof e=="string"?e={type:e,target:t}:e.target||(e.target=t),e=ZJ(e),i.dispatcher&&i.dispatcher.call(t,e,n),r&&!e.isPropagationStopped()&&e.bubbles===!0)WP.call(null,r,e,n);else if(!r&&!e.defaultPrevented&&e.target&&e.target[e.type]){Mg.has(e.target)||Mg.set(e.target,{});let s=Mg.get(e.target);e.target[e.type]&&(s.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),s.disabled=!1)}return!e.defaultPrevented}function XJ(t,e,n){if(Array.isArray(e))return I_e(XJ,t,e,n);let i=function(){_2(t,e,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||d6(),R4(t,e,i)}function A_e(t,e,n){let i=function(){_2(t,e,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||d6(),R4(t,e,i)}function P_e(t,e={}){let{eventBusKey:n}=e;if(n){if(!t[n].nodeName)throw new Error(`The eventBusKey "${n}" does not refer to an element.`);t.eventBusEl_=t[n]}else t.eventBusEl_=ga("span",{className:"vjs-event-bus"});return Object.assign(t,eci),t.eventedCallbacks&&t.eventedCallbacks.forEach(i=>{i()}),t.on("dispose",()=>{t.off(),[t,t.el_,t.eventBusEl_].forEach(function(i){i&&Mg.has(i)&&Mg.delete(i)}),di.default.setTimeout(()=>{t.eventBusEl_=null},0)}),t}function sXe(t,e){return Object.assign(t,tci),t.state=Object.assign({},t.state,e),typeof t.handleStateChanged=="function"&&Ix(t)&&t.on("statechanged",t.handleStateChanged),t}function nci(t,e,n){if(typeof e!="number"||e<0||e>n)throw new Error(`Failed to execute '${t}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${n}).`)}function Nqe(t,e,n,i){return nci(t,i,n.length-1),n[i][e]}function fye(t){let e;return t===void 0||t.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:t.length,start:Nqe.bind(null,"start",0,t),end:Nqe.bind(null,"end",1,t)},di.default.Symbol&&di.default.Symbol.iterator&&(e[di.default.Symbol.iterator]=()=>(t||[]).values()),e}function t_(t,e){return Array.isArray(t)?fye(t):t===void 0||e===void 0?fye():fye([[t,e]])}function lXe(t){R_e=t}function cXe(){R_e=aXe}function HD(t,e=t){return R_e(t,e)}function dXe(t,e){let n=0,i,r;if(!e)return 0;(!t||!t.length)&&(t=t_(0,0));for(let s=0;s<t.length;s++)i=t.start(s),r=t.end(s),r>e&&(r=e),n+=r-i;return n/e}function Op(t){if(t instanceof Op)return t;typeof t=="number"?this.code=t:typeof t=="string"?this.message=t:H5(t)&&(typeof t.code=="number"&&(this.code=t.code),Object.assign(this,t)),this.message||(this.message=Op.defaultMessages[this.code]||"")}function rH(t){return t!=null&&typeof t.then=="function"}function N5(t){rH(t)&&t.then(null,e=>{})}function uci(t,e,n,i,r={}){let s=t.textTracks();r.kind=e,n&&(r.label=n),i&&(r.language=i),r.tech=t;let o=new Eg.text.TrackClass(r);return s.addTrack(o),o}function hci(t,e){BD[t]=BD[t]||[],BD[t].push(e)}function pci(t,e,n){t.setTimeout(()=>LD(e,BD[e.type],n,t),1)}function mci(t,e){t.forEach(n=>n.setTech&&n.setTech(e))}function fci(t,e,n){return t.reduceRight(O_e(n),e[n]())}function gci(t,e,n,i){return e[n](t.reduce(O_e(n),i))}function Gqe(t,e,n,i=null){let r="call"+rm(n),s=t.reduce(O_e(r),i),o=s===XQ,a=o?null:e[n](s);return _ci(t,n,a,o),a}function O_e(t){return(e,n)=>e===XQ?XQ:n[t]?n[t](e):e}function _ci(t,e,n,i){for(let r=t.length-1;r>=0;r--){let s=t[r];s[e]&&s[e](i,n)}}function Cci(t){ZQ.hasOwnProperty(t.id())&&delete ZQ[t.id()]}function xci(t,e){let n=ZQ[t.id()],i=null;if(n==null)return i=e(t),ZQ[t.id()]=[[e,i]],i;for(let r=0;r<n.length;r++){let[s,o]=n[r];s===e&&(i=o)}return i===null&&(i=e(t),n.push([e,i])),i}function LD(t={},e=[],n,i,r=[],s=!1){let[o,...a]=e;if(typeof o=="string")LD(t,BD[o],n,i,r,s);else if(o){let l=xci(i,o);if(!l.setSource)return r.push(l),LD(t,a,n,i,r,s);l.setSource(Object.assign({},t),function(c,d){if(c)return LD(t,a,n,i,r,s);r.push(l),LD(d,t.type===d.type?a:BD[d.type],n,i,r,s)})}else a.length?LD(t,a,n,i,r,s):s?n(t,r):LD(t,BD["*"],n,i,r,!0)}function Uqe(t){if(!t.type){let e=QQ(t.src);e&&(t.type=e)}return t}function _ye(t,e){let n;if(t.length===4)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else if(t.length===7)n=t.slice(1);else throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function Xz(t,e,n){try{t.style[e]=n}catch{return}}function Yqe(t){return t?`${t}px`:""}function IH(t,e,n){return t=Number(t),Math.min(n,Math.max(e,isNaN(t)?e:t))}function pXe(t,e){if(e&&(t=e(t)),t&&t!=="none")return t}function kci(t,e){let n=t.options[t.options.selectedIndex].value;return pXe(n,e)}function Ici(t,e,n){if(e){for(let i=0;i<t.options.length;i++)if(pXe(t.options[i].value,n)===e){t.selectedIndex=i;break}}}function zci(t,e){let n=!1;return function(...i){return n||uc.warn(t),n=!0,e.apply(this,i)}}function i_(t,e,n,i){return zci(`${e} is deprecated and will be removed in ${t}.0; please use ${n} instead.`,i)}function Vi(t,e,n){let i=Vi.getPlayer(t);if(i)return e&&uc.warn(`Player "${t}" is already initialised. Options will not be applied.`),n&&i.ready(n),i;let r=typeof t=="string"?Z7("#"+vXe(t)):t;if(!GP(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");let o=("getRootNode"in r?r.getRootNode()instanceof di.default.ShadowRoot:!1)?r.getRootNode():r.ownerDocument.body;(!r.ownerDocument.defaultView||!o.contains(r))&&uc.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(r.parentNode&&r.parentNode.hasAttribute&&r.parentNode.hasAttribute("data-vjs-player")?r.parentNode:r).cloneNode(!0)),q7("beforesetup").forEach(l=>{let c=l(r,zu(e));if(!H5(c)||Array.isArray(c)){uc.error("please return an object in beforesetup hooks");return}e=zu(e,c)});let a=In.getComponent("Player");return i=new a(r,e,n),q7("setup").forEach(l=>l(i)),i}function Wd(...t){let e=Vi.obj||Vi;return(e.merge||e.mergeOptions).apply(e,t)}function L0(...t){let e=Vi.time||Vi;return(e.createTimeRanges||e.createTimeRanges).apply(e,t)}function Wci(t){if(t.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges: 
`;for(let n=0;n<t.length;n++){let i=t.start(n),r=t.end(n);e+=`${i} --> ${r}. Duration (${r-i})
`}return e}function nQe(t){try{return new URL(t).pathname.split("/").slice(-2).join("/")}catch{return""}}function kx(){}var di,Cr,MZe,D_e,kye,kZe,K7,Iye,Mx,q7,Bli,IZe,zli,zQ,NQ,Fqe,eH,y3,Hli,uc,AZe,Gli,PZe,Wli,E_e,LZe,G5,OZe,NZe,EP,MP,W5,M_e,GJ,Uli,VZe,HQ,WJ,GQ,UJ,WQ,UQ,Pye,lH,U7,kg,jJ,BZe,Z7,ZZe,QZe,JZe,Fye,$li,eXe,tXe,Mg,Kli,Yli,AQ,qli,Zli,Xli,u6,nh,U5,iXe,Qli,Zz,Ig,QJ,Ix,Jli,Nye,jQ,nXe,rXe,mye,FD,eci,tci,nH,rm,oXe,ici,In,aXe,R_e,rci,Vye,sci,oci,Vqe,gye,X7,Q7,vye,Bye,yye,zye,$Q,Hye,KQ,aci,lci,cci,Bqe,uH,F_e,uXe,L_e,JJ,dci,zqe,Hqe,GD,YQ,qQ,J7,c6,NP,Eg,ou,BD,ZQ,XQ,vci,yci,Wqe,bci,QQ,wci,hXe,Sci,jqe,bP,$qe,Gye,Wye,VP,hH,l6,Kqe,Tci,Uye,jye,Z1,JQ,$ye,eJ,ew,pH,mH,Kye,fH,Yye,tJ,Dci,gH,Cye,qye,Zye,vH,iJ,PQ,qqe,yH,nJ,rJ,sJ,Eci,Xye,Qye,oJ,BP,aJ,Mci,lJ,cJ,dJ,uJ,hJ,_H,CH,WD,UD,pJ,tw,mJ,xH,bH,wH,SH,TH,fJ,DH,gJ,vJ,EH,yJ,_J,Jye,CJ,xJ,bJ,Ax,wJ,SJ,TJ,xye,Zqe,Xqe,Qqe,Jqe,eZe,tZe,iZe,nZe,bye,wye,rZe,$7,e_e,t_e,Aci,i_e,n_e,Pci,r_e,s_e,Rci,mXe,Fci,sZe,Lci,Oci,Nci,zs,fXe,Sye,o_e,VQ,Vci,km,Qz,BQ,kP,SP,DJ,RQ,gXe,EJ,Bci,oZe,iw,Hci,vXe,a_e,zP,yXe,Gci,_Xe,_3,MJ,h6,V5,B5,CXe,TP,FQ,Uci,jci,xXe,$ci,ND,Kci,Tye,N_e,V_e,l_e,bXe,wXe,SXe,Yci,qci,TXe,DXe,sH,EXe,Zci,Xci,MXe,B_e,eee,Qci,Jci,kXe,edi,c_e,z_e,aZe,AH,C3,IXe,IP,AXe,tdi,UP,PXe,idi,ndi,rdi,RXe,kJ,FXe,zD,sdi,odi,adi,ldi,LXe,OXe,NXe,d_e,u_e,lZe,Y7,h_e,cdi,ddi,VXe,udi,p_e,hdi,pdi,mdi,BXe,IJ,zXe,HXe,fdi,gdi,vdi,GXe,ydi,_di,Cdi,xdi,bdi,wdi,Sdi,WXe,Dye,Tdi,Ddi,cZe,Edi,Mdi,kdi,Idi,Adi,dZe,Pdi,MH,q1,Rdi,UXe,Fdi,jXe,$Xe,KXe,Ldi,Odi,Ndi,Vdi,Bdi,YXe,qXe,uZe,ZXe,zdi,Hdi,XXe,Gdi,Eye,oH,z5,m_e,Wdi,Udi,H_e,hZe,QXe,jdi,$di,Kdi,JXe,eQe,Ydi,qdi,Zdi,Xdi,Qdi,Jdi,eui,tQe,tui,AJ,pZe,aH,LQ,mZe,PJ,AP,G_e,iui,iQe,fZe,nui,rui,sui,oui,aui,lui,cui,dui,uui,hui,pui,gZe,tH,mui,fui,gui,vui,yui,_ui,Jz,Cui,vZe,OQ,xui,bui,wP,yZe,wui,_Ze,CZe,xZe,Sui,bZe,Tui,OD,kH,rQe,Dui,f_e,Eui,PP,sQe,O5,A4,P4,wZe,RJ,SZe,Mui,TZe,g_e,v_e,kui,Iui,FJ,y_e,LJ,OJ,Aui,Mye,__e,C_e,Pui,Rui,Fui,oQe,x_e,Lui,Oui,Nui,NJ,DZe,Vui,aQe,Bui,zui,Hui,Gui,Wui,VJ,b_e,Uui,Ex,jui,$ui,Kui,w_e,Yui,S_e,qui,EZe,T_e,Zui,lQe,Xui,cQe,Qui,Jui,ehi,thi,Lp,dQe,uQe,ihi,nhi,rhi,shi,ohi,hQe,ahi,lhi,pQe,mQe,fQe,gQe,chi,BJ,zJ,dhi,vQe=Q(()=>{di=Gs(Qy()),Cr=Gs(u6e()),MZe=Gs(oKe()),D_e=Gs(CKe()),kye=Gs(FKe());_6e();b6e();zKe();UKe();jKe();H7();lqe();kZe=Gs(mqe());rye();Mqe();K7=Gs(Rqe());Iye="8.17.3",Mx={},q7=function(t,e){return Mx[t]=Mx[t]||[],e&&(Mx[t]=Mx[t].concat(e)),Mx[t]},Bli=function(t,e){q7(t,e)},IZe=function(t,e){let n=q7(t).indexOf(e);return n<=-1?!1:(Mx[t]=Mx[t].slice(),Mx[t].splice(n,1),!0)},zli=function(t,e){q7(t,[].concat(e).map(n=>{let i=(...r)=>(IZe(t,i),n(...r));return i}))},zQ={prefixed:!0},NQ=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],Fqe=NQ[0];for(let t=0;t<NQ.length;t++)if(NQ[t][1]in Cr.default){eH=NQ[t];break}if(eH){for(let t=0;t<eH.length;t++)zQ[Fqe[t]]=eH[t];zQ.prefixed=eH[0]!==Fqe[0]}y3=[],Hli=(t,e,n)=>(i,r,s)=>{let o=e.levels[r],a=new RegExp(`^(${o})$`),l=t;if(i!=="log"&&s.unshift(i.toUpperCase()+":"),n&&(l=`%c${t}`,s.unshift(n)),s.unshift(l+":"),y3){y3.push([].concat(s));let d=y3.length-1e3;y3.splice(0,d>0?d:0)}if(!di.default.console)return;let c=di.default.console[i];!c&&i==="debug"&&(c=di.default.console.info||di.default.console.log),!(!c||!o||!a.test(i))&&c[Array.isArray(s)?"apply":"call"](di.default.console,s)};uc=Aye("VIDEOJS"),AZe=uc.createLogger,Gli=Object.prototype.toString,PZe=function(t){return H5(t)?Object.keys(t):[]};Wli=Object.freeze({__proto__:null,each:DP,reduce:RZe,isObject:H5,isPlain:RP,merge:zu,values:FZe,defineLazyProperty:HJ}),E_e=!1,LZe=null,G5=!1,NZe=!1,EP=!1,MP=!1,W5=!1,M_e=null,GJ=null,Uli=!!(di.default.cast&&di.default.cast.framework&&di.default.cast.framework.CastReceiverContext),VZe=null,HQ=!1,WJ=!1,GQ=!1,UJ=!1,WQ=!1,UQ=!1,Pye=!1,lH=!!(HP()&&("ontouchstart"in di.default||di.default.navigator.maxTouchPoints||di.default.DocumentTouch&&di.default.document instanceof di.default.DocumentTouch)),U7=di.default.navigator&&di.default.navigator.userAgentData;U7&&U7.platform&&U7.brands&&(G5=U7.platform==="Android",EP=!!U7.brands.find(t=>t.brand==="Microsoft Edge"),MP=!!U7.brands.find(t=>t.brand==="Chromium"),W5=!EP&&MP,M_e=GJ=(U7.brands.find(t=>t.brand==="Chromium")||{}).version||null,WJ=U7.platform==="Windows");if(!MP){let t=di.default.navigator&&di.default.navigator.userAgent||"";E_e=/iPod/i.test(t),LZe=function(){let e=t.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),G5=/Android/i.test(t),OZe=function(){let e=t.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;let n=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return n&&i?parseFloat(e[1]+"."+e[2]):n||null}(),NZe=/Firefox/i.test(t),EP=/Edg/i.test(t),MP=/Chrome/i.test(t)||/CriOS/i.test(t),W5=!EP&&MP,M_e=GJ=function(){let e=t.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),VZe=function(){let e=/MSIE\s(\d+)\.\d/.exec(t),n=e&&parseFloat(e[1]);return!n&&/Trident\/7.0/i.test(t)&&/rv:11.0/.test(t)&&(n=11),n}(),WQ=/Tizen/i.test(t),UQ=/Web0S/i.test(t),Pye=WQ||UQ,HQ=/Safari/i.test(t)&&!W5&&!G5&&!EP&&!Pye,WJ=/Windows/i.test(t),GQ=/iPad/i.test(t)||HQ&&lH&&!/iPhone/i.test(t),UJ=/iPhone/i.test(t)&&!GQ}kg=UJ||GQ||E_e,jJ=(HQ||kg)&&!W5,BZe=Object.freeze({__proto__:null,get IS_IPOD(){return E_e},get IOS_VERSION(){return LZe},get IS_ANDROID(){return G5},get ANDROID_VERSION(){return OZe},get IS_FIREFOX(){return NZe},get IS_EDGE(){return EP},get IS_CHROMIUM(){return MP},get IS_CHROME(){return W5},get CHROMIUM_VERSION(){return M_e},get CHROME_VERSION(){return GJ},IS_CHROMECAST_RECEIVER:Uli,get IE_VERSION(){return VZe},get IS_SAFARI(){return HQ},get IS_WINDOWS(){return WJ},get IS_IPAD(){return GQ},get IS_IPHONE(){return UJ},get IS_TIZEN(){return WQ},get IS_WEBOS(){return UQ},get IS_SMART_TV(){return Pye},TOUCH_ENABLED:lH,IS_IOS:kg,IS_ANY_SAFARI:jJ});Z7=HZe("querySelector"),ZZe=HZe("querySelectorAll");QZe=Object.freeze({__proto__:null,isReal:HP,isEl:GP,isInFrame:zZe,createEl:ga,textContent:nw,prependTo:Rye,hasClass:iH,addClass:VD,removeClass:$J,toggleClass:GZe,setAttributes:WZe,getAttributes:j7,getAttribute:UZe,setAttribute:FP,removeAttribute:KJ,blockTextSelection:jZe,unblockTextSelection:$Ze,getBoundingClientRect:LP,findPosition:cH,getPointerPosition:YJ,isTextNode:KZe,emptyEl:qJ,normalizeContent:YZe,appendContent:k_e,insertContent:qZe,isSingleLeftClick:dH,$:Z7,$$:ZZe,computedStyle:OP,copyStyleSheetsToWindow:XZe}),JZe=!1,$li=function(){if(Fye.options.autoSetup===!1)return;let t=Array.prototype.slice.call(Cr.default.getElementsByTagName("video")),e=Array.prototype.slice.call(Cr.default.getElementsByTagName("audio")),n=Array.prototype.slice.call(Cr.default.getElementsByTagName("video-js")),i=t.concat(e,n);if(i&&i.length>0)for(let r=0,s=i.length;r<s;r++){let o=i[r];if(o&&o.getAttribute)o.player===void 0&&o.getAttribute("data-setup")!==null&&Fye(o);else{Lye(1);break}}else JZe||Lye(1)};HP()&&(Cr.default.readyState==="complete"?Oye():di.default.addEventListener("load",Oye));eXe=function(t){let e=Cr.default.createElement("style");return e.className=t,e},tXe=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},Mg=new WeakMap,Kli=3,Yli=Kli;qli=function(){if(typeof AQ!="boolean"){AQ=!1;try{let t=Object.defineProperty({},"passive",{get(){AQ=!0}});di.default.addEventListener("test",null,t),di.default.removeEventListener("test",null,t)}catch{}}return AQ},Zli=["touchstart","touchmove"];Xli=Object.freeze({__proto__:null,fixEvent:ZJ,on:R4,off:_2,trigger:WP,one:XJ,any:A_e}),u6=30,nh=function(t,e,n){e.guid||(e.guid=d6());let i=e.bind(t);return i.guid=n?n+"_"+e.guid:e.guid,i},U5=function(t,e){let n=di.default.performance.now();return function(...r){let s=di.default.performance.now();s-n>=e&&(t(...r),n=s)}},iXe=function(t,e,n,i=di.default){let r,s=()=>{i.clearTimeout(r),r=null},o=function(){let a=this,l=arguments,c=function(){r=null,c=null,n||t.apply(a,l)};!r&&n&&t.apply(a,l),i.clearTimeout(r),r=i.setTimeout(c,e)};return o.cancel=s,o},Qli=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:u6,bind_:nh,throttle:U5,debounce:iXe}),Ig=class{on(e,n){let i=this.addEventListener;this.addEventListener=()=>{},R4(this,e,n),this.addEventListener=i}off(e,n){_2(this,e,n)}one(e,n){let i=this.addEventListener;this.addEventListener=()=>{},XJ(this,e,n),this.addEventListener=i}any(e,n){let i=this.addEventListener;this.addEventListener=()=>{},A_e(this,e,n),this.addEventListener=i}trigger(e){let n=e.type||e;typeof e=="string"&&(e={type:n}),e=ZJ(e),this.allowedEvents_[n]&&this["on"+n]&&this["on"+n](e),WP(this,e)}queueTrigger(e){Zz||(Zz=new Map);let n=e.type||e,i=Zz.get(this);i||(i=new Map,Zz.set(this,i));let r=i.get(n);i.delete(n),di.default.clearTimeout(r);let s=di.default.setTimeout(()=>{i.delete(n),i.size===0&&(i=null,Zz.delete(this)),this.trigger(e)},0);i.set(n,s)}};Ig.prototype.allowedEvents_={};Ig.prototype.addEventListener=Ig.prototype.on;Ig.prototype.removeEventListener=Ig.prototype.off;Ig.prototype.dispatchEvent=Ig.prototype.trigger;QJ=t=>typeof t.name=="function"?t.name():typeof t.name=="string"?t.name:t.name_?t.name_:t.constructor&&t.constructor.name?t.constructor.name:typeof t,Ix=t=>t instanceof Ig||!!t.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof t[e]=="function"),Jli=(t,e)=>{Ix(t)?e():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(e))},Nye=t=>typeof t=="string"&&/\S/.test(t)||Array.isArray(t)&&!!t.length,jQ=(t,e,n)=>{if(!t||!t.nodeName&&!Ix(t))throw new Error(`Invalid target for ${QJ(e)}#${n}; must be a DOM node or evented object.`)},nXe=(t,e,n)=>{if(!Nye(t))throw new Error(`Invalid event type for ${QJ(e)}#${n}; must be a non-empty string or array.`)},rXe=(t,e,n)=>{if(typeof t!="function")throw new Error(`Invalid listener for ${QJ(e)}#${n}; must be a function.`)},mye=(t,e,n)=>{let i=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r,s,o;return i?(r=t.eventBusEl_,e.length>=3&&e.shift(),[s,o]=e):(r=e[0],s=e[1],o=e[2]),jQ(r,t,n),nXe(s,t,n),rXe(o,t,n),o=nh(t,o),{isTargetingSelf:i,target:r,type:s,listener:o}},FD=(t,e,n,i)=>{jQ(t,t,e),t.nodeName?Xli[e](t,n,i):t[e](n,i)},eci={on(...t){let{isTargetingSelf:e,target:n,type:i,listener:r}=mye(this,t,"on");if(FD(n,"on",i,r),!e){let s=()=>this.off(n,i,r);s.guid=r.guid;let o=()=>this.off("dispose",s);o.guid=r.guid,FD(this,"on","dispose",s),FD(n,"on","dispose",o)}},one(...t){let{isTargetingSelf:e,target:n,type:i,listener:r}=mye(this,t,"one");if(e)FD(n,"one",i,r);else{let s=(...o)=>{this.off(n,i,s),r.apply(null,o)};s.guid=r.guid,FD(n,"one",i,s)}},any(...t){let{isTargetingSelf:e,target:n,type:i,listener:r}=mye(this,t,"any");if(e)FD(n,"any",i,r);else{let s=(...o)=>{this.off(n,i,s),r.apply(null,o)};s.guid=r.guid,FD(n,"any",i,s)}},off(t,e,n){if(!t||Nye(t))_2(this.eventBusEl_,t,e);else{let i=t,r=e;jQ(i,this,"off"),nXe(r,this,"off"),rXe(n,this,"off"),n=nh(this,n),this.off("dispose",n),i.nodeName?(_2(i,r,n),_2(i,"dispose",n)):Ix(i)&&(i.off(r,n),i.off("dispose",n))}},trigger(t,e){jQ(this.eventBusEl_,this,"trigger");let n=t&&typeof t!="string"?t.type:t;if(!Nye(n))throw new Error(`Invalid event type for ${QJ(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return WP(this.eventBusEl_,t,e)}};tci={state:{},setState(t){typeof t=="function"&&(t=t());let e;return DP(t,(n,i)=>{this.state[i]!==n&&(e=e||{},e[i]={from:this.state[i],to:n}),this.state[i]=n}),e&&Ix(this)&&this.trigger({changes:e,type:"statechanged"}),e}};nH=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toLowerCase())},rm=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toUpperCase())},oXe=function(t,e){return rm(t)===rm(e)},ici=Object.freeze({__proto__:null,toLowerCase:nH,toTitleCase:rm,titleCaseEquals:oXe}),In=class t{constructor(e,n,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=zu({},this.options_),n=this.options_=zu(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){let r=e&&e.id&&e.id()||"no_player";this.id_=`${r}_component_${d6()}`}this.name_=n.name||null,n.el?this.el_=n.el:n.createEl!==!1&&(this.el_=this.createEl()),n.className&&this.el_&&n.className.split(" ").forEach(r=>this.addClass(r)),["on","off","one","any","trigger"].forEach(r=>{this[r]=void 0}),n.evented!==!1&&(P_e(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),sXe(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,n.initChildren!==!1&&this.initChildren(),this.ready(i),n.reportTouchActivity!==!1&&this.enableTouchActivity()}on(e,n){}off(e,n){}one(e,n){}any(e,n){}trigger(e,n){}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let n=this.children_.length-1;n>=0;n--)this.children_[n].dispose&&this.children_[n].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=zu(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,n,i){return ga(e,n,i)}localize(e,n,i=e){let r=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),o=s&&s[r],a=r&&r.split("-")[0],l=s&&s[a],c=i;return o&&o[e]?c=o[e]:l&&l[e]&&(c=l[e]),n&&(c=c.replace(/\{(\d+)\}/g,function(d,u){let m=n[u-1],f=m;return typeof m>"u"&&(f=d),f})),c}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((i,r)=>i.concat(r),[]);let n=this;for(let i=0;i<e.length;i++)if(n=n.getChild(e[i]),!n||!n.getChild)return;return n}setIcon(e,n=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;let i="http://www.w3.org/2000/svg",r=ga("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),s=Cr.default.createElementNS(i,"svg");s.setAttributeNS(null,"viewBox","0 0 512 512");let o=Cr.default.createElementNS(i,"use");return s.appendChild(o),o.setAttributeNS(null,"href",`#vjs-icon-${e}`),r.appendChild(s),this.iconIsSet_?n.replaceChild(r,n.querySelector(".vjs-icon-placeholder")):n.appendChild(r),this.iconIsSet_=!0,r}addChild(e,n={},i=this.children_.length){let r,s;if(typeof e=="string"){s=rm(e);let o=n.componentClass||s;n.name=s;let a=t.getComponent(o);if(!a)throw new Error(`Component ${o} does not exist`);if(typeof a!="function")return null;r=new a(this.player_||this,n)}else r=e;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(i,0,r),r.parentComponent_=this,typeof r.id=="function"&&(this.childIndex_[r.id()]=r),s=s||r.name&&rm(r.name()),s&&(this.childNameIndex_[s]=r,this.childNameIndex_[nH(s)]=r),typeof r.el=="function"&&r.el()){let o=null;this.children_[i+1]&&(this.children_[i+1].el_?o=this.children_[i+1].el_:GP(this.children_[i+1])&&(o=this.children_[i+1])),this.contentEl().insertBefore(r.el(),o)}return r}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let n=!1;for(let r=this.children_.length-1;r>=0;r--)if(this.children_[r]===e){n=!0,this.children_.splice(r,1);break}if(!n)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[rm(e.name())]=null,this.childNameIndex_[nH(e.name())]=null;let i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){let e=this.options_.children;if(e){let n=this.options_,i=o=>{let a=o.name,l=o.opts;if(n[a]!==void 0&&(l=n[a]),l===!1)return;l===!0&&(l={}),l.playerOptions=this.options_.playerOptions;let c=this.addChild(a,l);c&&(this[a]=c)},r,s=t.getComponent("Tech");Array.isArray(e)?r=e:r=Object.keys(e),r.concat(Object.keys(this.options_).filter(function(o){return!r.some(function(a){return typeof a=="string"?o===a:o===a.name})})).map(o=>{let a,l;return typeof o=="string"?(a=o,l=e[a]||this.options_[a]||{}):(a=o.name,l=o),{name:a,opts:l}}).filter(o=>{let a=t.getComponent(o.opts.componentClass||rm(o.name));return a&&!s.isTech(a)}).forEach(i)}}buildCSSClass(){return""}ready(e,n=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}n?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){let e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(n){n.call(this)},this),this.trigger("ready")},1)}$(e,n){return Z7(e,n||this.contentEl())}$$(e,n){return ZZe(e,n||this.contentEl())}hasClass(e){return iH(this.el_,e)}addClass(...e){VD(this.el_,...e)}removeClass(...e){$J(this.el_,...e)}toggleClass(e,n){GZe(this.el_,e,n)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return UZe(this.el_,e)}setAttribute(e,n){FP(this.el_,e,n)}removeAttribute(e){KJ(this.el_,e)}width(e,n){return this.dimension("width",e,n)}height(e,n){return this.dimension("height",e,n)}dimensions(e,n){this.width(e,!0),this.height(n)}dimension(e,n,i){if(n!==void 0){(n===null||n!==n)&&(n=0),(""+n).indexOf("%")!==-1||(""+n).indexOf("px")!==-1?this.el_.style[e]=n:n==="auto"?this.el_.style[e]="":this.el_.style[e]=n+"px",i||this.trigger("componentresize");return}if(!this.el_)return 0;let r=this.el_.style[e],s=r.indexOf("px");return parseInt(s!==-1?r.slice(0,s):this.el_["offset"+rm(e)],10)}currentDimension(e){let n=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(n=OP(this.el_,e),n=parseFloat(n),n===0||isNaN(n)){let i=`offset${rm(e)}`;n=this.el_[i]}return n}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){let e=this.el_.getBoundingClientRect(),n={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},i={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:n,center:i}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,n=null,i=10,r=200,s;this.on("touchstart",function(a){a.touches.length===1&&(n={pageX:a.touches[0].pageX,pageY:a.touches[0].pageY},e=di.default.performance.now(),s=!0)}),this.on("touchmove",function(a){if(a.touches.length>1)s=!1;else if(n){let l=a.touches[0].pageX-n.pageX,c=a.touches[0].pageY-n.pageY;Math.sqrt(l*l+c*c)>i&&(s=!1)}});let o=function(){s=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(a){n=null,s===!0&&di.default.performance.now()-e<r&&(a.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;let e=nh(this.player(),this.player().reportUserActivity),n;this.on("touchstart",function(){e(),this.clearInterval(n),n=this.setInterval(e,250)});let i=function(r){e(),this.clearInterval(n)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,n){var i;return e=nh(this,e),this.clearTimersOnDispose_(),i=di.default.setTimeout(()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()},n),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),di.default.clearTimeout(e)),e}setInterval(e,n){e=nh(this,e),this.clearTimersOnDispose_();let i=di.default.setInterval(e,n);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),di.default.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var n;return e=nh(this,e),n=di.default.requestAnimationFrame(()=>{this.rafIds_.has(n)&&this.rafIds_.delete(n),e()}),this.rafIds_.add(n),n}requestNamedAnimationFrame(e,n){if(this.namedRafs_.has(e))return;this.clearTimersOnDispose_(),n=nh(this,n);let i=this.requestAnimationFrame(()=>{n(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),di.default.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,n])=>{this[e].forEach((i,r)=>this[n](r))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function n(s){let o=di.default.getComputedStyle(s,null),a=o.getPropertyValue("visibility");return o.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(a)}function i(s){return!(!n(s.parentElement)||!n(s)||s.style.opacity==="0"||di.default.getComputedStyle(s).height==="0px"||di.default.getComputedStyle(s).width==="0px")}function r(s){if(s.offsetWidth+s.offsetHeight+s.getBoundingClientRect().height+s.getBoundingClientRect().width===0)return!1;let o={x:s.getBoundingClientRect().left+s.offsetWidth/2,y:s.getBoundingClientRect().top+s.offsetHeight/2};if(o.x<0||o.x>(Cr.default.documentElement.clientWidth||di.default.innerWidth)||o.y<0||o.y>(Cr.default.documentElement.clientHeight||di.default.innerHeight))return!1;let a=Cr.default.elementFromPoint(o.x,o.y);for(;a;){if(a===s)return!0;if(a.parentNode)a=a.parentNode;else return!1}}return e||(e=this.el()),!!(r(e)&&i(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,n){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);let i=t.getComponent("Tech"),r=i&&i.isTech(n),s=t===n||t.prototype.isPrototypeOf(n.prototype);if(r||!s){let a;throw r?a="techs must be registered using Tech.registerTech()":a="must be a Component subclass",new Error(`Illegal component, "${e}"; ${a}.`)}e=rm(e),t.components_||(t.components_={});let o=t.getComponent("Player");if(e==="Player"&&o&&o.players){let a=o.players,l=Object.keys(a);if(a&&l.length>0&&l.map(c=>a[c]).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,t.components_[nH(e)]=n,n}static getComponent(e){if(!(!e||!t.components_))return t.components_[e]}};In.registerComponent("Component",In);aXe=function(t,e){t=t<0?0:t;let n=Math.floor(t%60),i=Math.floor(t/60%60),r=Math.floor(t/3600),s=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(r=i=n="-"),r=r>0||o>0?r+":":"",i=((r||s>=10)&&i<10?"0"+i:i)+":",n=n<10?"0"+n:n,r+i+n},R_e=aXe;rci=Object.freeze({__proto__:null,createTimeRanges:t_,createTimeRange:t_,setFormatTime:lXe,resetFormatTime:cXe,formatTime:HD});Op.prototype.code=0;Op.prototype.message="";Op.prototype.status=null;Op.prototype.metadata=null;Op.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];Op.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};Op.MEDIA_ERR_CUSTOM=0;Op.prototype.MEDIA_ERR_CUSTOM=0;Op.MEDIA_ERR_ABORTED=1;Op.prototype.MEDIA_ERR_ABORTED=1;Op.MEDIA_ERR_NETWORK=2;Op.prototype.MEDIA_ERR_NETWORK=2;Op.MEDIA_ERR_DECODE=3;Op.prototype.MEDIA_ERR_DECODE=3;Op.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Op.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Op.MEDIA_ERR_ENCRYPTED=5;Op.prototype.MEDIA_ERR_ENCRYPTED=5;Vye=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((n,i,r)=>(t[i]&&(n[i]=t[i]),n),{cues:t.cues&&Array.prototype.map.call(t.cues,function(n){return{startTime:n.startTime,endTime:n.endTime,text:n.text,id:n.id}})})},sci=function(t){let e=t.$$("track"),n=Array.prototype.map.call(e,r=>r.track);return Array.prototype.map.call(e,function(r){let s=Vye(r.track);return r.src&&(s.src=r.src),s}).concat(Array.prototype.filter.call(t.textTracks(),function(r){return n.indexOf(r)===-1}).map(Vye))},oci=function(t,e){return t.forEach(function(n){let i=e.addRemoteTextTrack(n).track;!n.src&&n.cues&&n.cues.forEach(r=>i.addCue(r))}),e.textTracks()},Vqe={textTracksToJson:sci,jsonToTextTracks:oci,trackToJson_:Vye},gye="vjs-modal-dialog",X7=class extends In{constructor(e,n){super(e,n),this.handleKeyDown_=i=>this.handleKeyDown(i),this.close_=i=>this.close(i),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=ga("div",{className:`${gye}-content`},{role:"document"}),this.descEl_=ga("p",{className:`${gye}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),nw(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${gye} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}let e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;let e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){let n=this.closeable_=!!e,i=this.getChild("closeButton");if(n&&!i){let r=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(i,"close",this.close_)}!n&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){let n=this.contentEl(),i=n.parentNode,r=n.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(n),this.empty(),qZe(n,e),this.trigger("modalfill"),r?i.insertBefore(n,r):i.appendChild(n);let s=this.getChild("closeButton");s&&i.appendChild(s.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),qJ(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){let e=Cr.default.activeElement,n=this.player_.el_;this.previouslyActiveEl_=null,(n.contains(e)||n===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;let n=this.focusableEls_(),i=this.el_.querySelector(":focus"),r;for(let s=0;s<n.length;s++)if(i===n[s]){r=s;break}Cr.default.activeElement===this.el_&&(r=0),e.shiftKey&&r===0?(n[n.length-1].focus(),e.preventDefault()):!e.shiftKey&&r===n.length-1&&(n[0].focus(),e.preventDefault())}focusableEls_(){let e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,n=>(n instanceof di.default.HTMLAnchorElement||n instanceof di.default.HTMLAreaElement)&&n.hasAttribute("href")||(n instanceof di.default.HTMLInputElement||n instanceof di.default.HTMLSelectElement||n instanceof di.default.HTMLTextAreaElement||n instanceof di.default.HTMLButtonElement)&&!n.hasAttribute("disabled")||n instanceof di.default.HTMLIFrameElement||n instanceof di.default.HTMLObjectElement||n instanceof di.default.HTMLEmbedElement||n.hasAttribute("tabindex")&&n.getAttribute("tabindex")!==-1||n.hasAttribute("contenteditable"))}};X7.prototype.options_={pauseOnOpen:!0,temporary:!0};In.registerComponent("ModalDialog",X7);Q7=class extends Ig{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let n=0;n<e.length;n++)this.addTrack(e[n])}addTrack(e){let n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get(){return this.tracks_[n]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Ix(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let n;for(let i=0,r=this.length;i<r;i++)if(this[i]===e){n=this[i],n.off&&n.off(),this.tracks_.splice(i,1);break}n&&this.trigger({track:n,type:"removetrack",target:this})}getTrackById(e){let n=null;for(let i=0,r=this.length;i<r;i++){let s=this[i];if(s.id===e){n=s;break}}return n}};Q7.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(let t in Q7.prototype.allowedEvents_)Q7.prototype["on"+t]=null;vye=function(t,e){for(let n=0;n<t.length;n++)!Object.keys(t[n]).length||e.id===t[n].id||(t[n].enabled=!1)},Bye=class extends Q7{constructor(e=[]){for(let n=e.length-1;n>=0;n--)if(e[n].enabled){vye(e,e[n]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&vye(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,vye(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}},yye=function(t,e){for(let n=0;n<t.length;n++)!Object.keys(t[n]).length||e.id===t[n].id||(t[n].selected=!1)},zye=class extends Q7{constructor(e=[]){for(let n=e.length-1;n>=0;n--)if(e[n].selected){yye(e,e[n]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let n=0;n<this.length;n++)if(this[n].selected)return n;return-1},set(){}})}addTrack(e){e.selected&&yye(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,yye(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}},$Q=class extends Q7{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}},Hye=class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let n=0,i=e.length;n<i;n++)this.addTrackElement_(e[n])}addTrackElement_(e){let n=this.trackElements_.length;""+n in this||Object.defineProperty(this,n,{get(){return this.trackElements_[n]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let n;for(let i=0,r=this.trackElements_.length;i<r;i++)if(e===this.trackElements_[i].track){n=this.trackElements_[i];break}return n}removeTrackElement_(e){for(let n=0,i=this.trackElements_.length;n<i;n++)if(e===this.trackElements_[n]){this.trackElements_[n].track&&typeof this.trackElements_[n].track.off=="function"&&this.trackElements_[n].track.off(),typeof this.trackElements_[n].off=="function"&&this.trackElements_[n].off(),this.trackElements_.splice(n,1);break}}},KQ=class t{constructor(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){let n=this.length||0,i=0,r=e.length;this.cues_=e,this.length_=e.length;let s=function(o){""+o in this||Object.defineProperty(this,""+o,{get(){return this.cues_[o]}})};if(n<r)for(i=n;i<r;i++)s.call(this,i)}getCueById(e){let n=null;for(let i=0,r=this.length;i<r;i++){let s=this[i];if(s.id===e){n=s;break}}return n}},aci={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},lci={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},cci={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Bqe={disabled:"disabled",hidden:"hidden",showing:"showing"},uH=class extends Ig{constructor(e={}){super();let n={id:e.id||"vjs_track_"+d6(),kind:e.kind||"",language:e.language||""},i=e.label||"";for(let r in n)Object.defineProperty(this,r,{get(){return n[r]},set(){}});Object.defineProperty(this,"label",{get(){return i},set(r){r!==i&&(i=r,this.trigger("labelchange"))}})}},F_e=function(t){return new URL(t,Cr.default.baseURI)},uXe=function(t){return new URL(t,Cr.default.baseURI).href},L_e=function(t){if(typeof t=="string"){let n=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(t);if(n)return n.pop().toLowerCase()}return""},JJ=function(t,e=di.default.location){return F_e(t).origin!==e.origin},dci=Object.freeze({__proto__:null,parseUrl:F_e,getAbsoluteURL:uXe,getFileExtension:L_e,isCrossOrigin:JJ}),zqe=function(t,e){let n=new di.default.WebVTT.Parser(di.default,di.default.vttjs,di.default.WebVTT.StringDecoder()),i=[];n.oncue=function(r){e.addCue(r)},n.onparsingerror=function(r){i.push(r)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),i.length>0&&(di.default.console&&di.default.console.groupCollapsed&&di.default.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),i.forEach(r=>uc.error(r)),di.default.console&&di.default.console.groupEnd&&di.default.console.groupEnd()),n.flush()},Hqe=function(t,e){let n={uri:t},i=JJ(t);i&&(n.cors=i);let r=e.tech_.crossOrigin()==="use-credentials";r&&(n.withCredentials=r),(0,D_e.default)(n,nh(this,function(s,o,a){if(s)return uc.error(s,o);e.loaded_=!0,typeof di.default.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],l=>{if(l.type==="vttjserror"){uc.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return zqe(a,e)}):zqe(a,e)}))},GD=class extends uH{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");let n=zu(e,{kind:cci[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=Bqe[n.mode]||"disabled",r=n.default;(n.kind==="metadata"||n.kind==="chapters")&&(i="hidden"),super(n),this.tech_=n.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;let s=new KQ(this.cues_),o=new KQ(this.activeCues_),a=!1;this.timeupdateHandler=nh(this,function(c={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){c.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),c.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});let l=()=>{this.stopTracking()};this.tech_.one("dispose",l),i!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return r},set(){}},mode:{get(){return i},set(c){Bqe[c]&&i!==c&&(i=c,!this.preload_&&i!=="disabled"&&this.cues.length===0&&Hqe(this.src,this),this.stopTracking(),i!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?s:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return o;let c=this.tech_.currentTime(),d=[];for(let u=0,m=this.cues.length;u<m;u++){let f=this.cues[u];f.startTime<=c&&f.endTime>=c&&d.push(f)}if(a=!1,d.length!==this.activeCues_.length)a=!0;else for(let u=0;u<d.length;u++)this.activeCues_.indexOf(d[u])===-1&&(a=!0);return this.activeCues_=d,o.setCues_(this.activeCues_),o},set(){}}}),n.src?(this.src=n.src,this.preload_||(this.loaded_=!0),(this.preload_||n.kind!=="subtitles"&&n.kind!=="captions")&&Hqe(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let n=e;if(!("getCueAsHTML"in n)){n=new di.default.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(let r in e)r in n||(n[r]=e[r]);n.id=e.id,n.originalCue_=e}let i=this.tech_.textTracks();for(let r=0;r<i.length;r++)i[r]!==this&&i[r].removeCue(n);this.cues_.push(n),this.cues.setCues_(this.cues_)}removeCue(e){let n=this.cues_.length;for(;n--;){let i=this.cues_[n];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(n,1),this.cues.setCues_(this.cues_);break}}}};GD.prototype.allowedEvents_={cuechange:"cuechange"};YQ=class extends uH{constructor(e={}){let n=zu(e,{kind:lci[e.kind]||""});super(n);let i=!1;Object.defineProperty(this,"enabled",{get(){return i},set(r){typeof r!="boolean"||r===i||(i=r,this.trigger("enabledchange"))}}),n.enabled&&(this.enabled=n.enabled),this.loaded_=!0}},qQ=class extends uH{constructor(e={}){let n=zu(e,{kind:aci[e.kind]||""});super(n);let i=!1;Object.defineProperty(this,"selected",{get(){return i},set(r){typeof r!="boolean"||r===i||(i=r,this.trigger("selectedchange"))}}),n.selected&&(this.selected=n.selected)}},J7=class t extends Ig{constructor(e={}){super();let n,i=new GD(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get(){return n}},track:{get(){return i}}}),n=t.NONE,i.addEventListener("loadeddata",()=>{n=t.LOADED,this.trigger({type:"load",target:this})})}};J7.prototype.allowedEvents_={load:"load"};J7.NONE=0;J7.LOADING=1;J7.LOADED=2;J7.ERROR=3;c6={audio:{ListClass:Bye,TrackClass:YQ,capitalName:"Audio"},video:{ListClass:zye,TrackClass:qQ,capitalName:"Video"},text:{ListClass:$Q,TrackClass:GD,capitalName:"Text"}};Object.keys(c6).forEach(function(t){c6[t].getterName=`${t}Tracks`,c6[t].privateName=`${t}Tracks_`});NP={remoteText:{ListClass:$Q,TrackClass:GD,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Hye,TrackClass:J7,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Eg=Object.assign({},c6,NP);NP.names=Object.keys(NP);c6.names=Object.keys(c6);Eg.names=[].concat(NP.names).concat(c6.names);ou=class t extends In{constructor(e={},n=function(){}){e.reportTouchActivity=!1,super(null,e,n),this.onDurationChange_=i=>this.onDurationChange(i),this.trackProgress_=i=>this.trackProgress(i),this.trackCurrentTime_=i=>this.trackCurrentTime(i),this.stopTrackingCurrentTime_=i=>this.stopTrackingCurrentTime(i),this.disposeSourceHandler_=i=>this.disposeSourceHandler(i),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),Eg.names.forEach(i=>{let r=Eg[i];e&&e[r.getterName]&&(this[r.privateName]=e[r.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(i=>{e[`native${i}Tracks`]===!1&&(this[`featuresNative${i}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Eg.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(nh(this,function(){let n=this.bufferedPercent();this.bufferedPercent_!==n&&this.trigger("progress"),this.bufferedPercent_=n,n===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return t_(0,0)}bufferedPercent(){return dXe(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(c6.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(n=>{let i=this[`${n}Tracks`]()||[],r=i.length;for(;r--;){let s=i[r];n==="text"&&this.removeRemoteTextTrack(s),i.removeTrack(s)}})}cleanupAutoTextTracks(){let e=this.autoRemoteTextTracks_||[],n=e.length;for(;n--;){let i=e[n];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new Op(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?t_(0,0):t_()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){c6.names.forEach(e=>{let n=c6[e],i=()=>{this.trigger(`${e}trackchange`)},r=this[n.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),this.on("dispose",()=>{r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)})})}addWebVttScript_(){if(!di.default.WebVTT)if(Cr.default.body.contains(this.el())){if(!this.options_["vtt.js"]&&RP(kye.default)&&Object.keys(kye.default).length>0){this.trigger("vttjsloaded");return}let e=Cr.default.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),di.default.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){let e=this.textTracks(),n=this.remoteTextTracks(),i=a=>e.addTrack(a.track),r=a=>e.removeTrack(a.track);n.on("addtrack",i),n.on("removetrack",r),this.addWebVttScript_();let s=()=>this.trigger("texttrackchange"),o=()=>{s();for(let a=0;a<e.length;a++){let l=e[a];l.removeEventListener("cuechange",s),l.mode==="showing"&&l.addEventListener("cuechange",s)}};o(),e.addEventListener("change",o),e.addEventListener("addtrack",o),e.addEventListener("removetrack",o),this.on("dispose",function(){n.off("addtrack",i),n.off("removetrack",r),e.removeEventListener("change",o),e.removeEventListener("addtrack",o),e.removeEventListener("removetrack",o);for(let a=0;a<e.length;a++)e[a].removeEventListener("cuechange",s)})}addTextTrack(e,n,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return uci(this,e,n,i)}createRemoteTextTrack(e){let n=zu(e,{tech:this});return new NP.remoteTextEl.TrackClass(n)}addRemoteTextTrack(e={},n){let i=this.createRemoteTextTrack(e);return typeof n!="boolean"&&(n=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),n===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(i.track)),i}removeRemoteTextTrack(e){let n=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(n),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){let n=d6();return!this.isReady_||this.paused()?(this.queuedHanders_.add(n),this.one("playing",()=>{this.queuedHanders_.has(n)&&(this.queuedHanders_.delete(n),e())})):this.requestNamedAnimationFrame(n,e),n}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,n){return t.canPlayType(e.type)}static isTech(e){return e.prototype instanceof t||e instanceof t||e===t}static registerTech(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error(`Tech ${e} must be a Tech`);if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=rm(e),t.techs_[e]=n,t.techs_[nH(e)]=n,e!=="Tech"&&t.defaultTechOrder_.push(e),n}static getTech(e){if(e){if(t.techs_&&t.techs_[e])return t.techs_[e];if(e=rm(e),di.default&&di.default.videojs&&di.default.videojs[e])return uc.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),di.default.videojs[e]}}};Eg.names.forEach(function(t){let e=Eg[t];ou.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});ou.prototype.featuresVolumeControl=!0;ou.prototype.featuresMuteControl=!0;ou.prototype.featuresFullscreenResize=!1;ou.prototype.featuresPlaybackRate=!1;ou.prototype.featuresProgressEvents=!1;ou.prototype.featuresSourceset=!1;ou.prototype.featuresTimeupdateEvents=!1;ou.prototype.featuresNativeTextTracks=!1;ou.prototype.featuresVideoFrameCallback=!1;ou.withSourceHandlers=function(t){t.registerSourceHandler=function(n,i){let r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),i===void 0&&(i=r.length),r.splice(i,0,n)},t.canPlayType=function(n){let i=t.sourceHandlers||[],r;for(let s=0;s<i.length;s++)if(r=i[s].canPlayType(n),r)return r;return""},t.selectSourceHandler=function(n,i){let r=t.sourceHandlers||[],s;for(let o=0;o<r.length;o++)if(s=r[o].canHandleSource(n,i),s)return r[o];return null},t.canPlaySource=function(n,i){let r=t.selectSourceHandler(n,i);return r?r.canHandleSource(n,i):""},["seekable","seeking","duration"].forEach(function(n){let i=this[n];typeof i=="function"&&(this[n]=function(){return this.sourceHandler_&&this.sourceHandler_[n]?this.sourceHandler_[n].apply(this.sourceHandler_,arguments):i.apply(this,arguments)})},t.prototype),t.prototype.setSource=function(n){let i=t.selectSourceHandler(n,this.options_);i||(t.nativeSourceHandler?i=t.nativeSourceHandler:uc.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==t.nativeSourceHandler&&(this.currentSource_=n),this.sourceHandler_=i.handleSource(n,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},t.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};In.registerComponent("Tech",ou);ou.registerTech("Tech",ou);ou.defaultTechOrder_=[];BD={},ZQ={},XQ={};vci={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},yci={setCurrentTime:1,setMuted:1,setVolume:1},Wqe={play:1,pause:1};bci={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},QQ=function(t=""){let e=L_e(t);return bci[e.toLowerCase()]||""},wci=(t,e)=>{if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;let n=t.cache_.sources.filter(r=>r.src===e);if(n.length)return n[0].type;let i=t.$$("source");for(let r=0;r<i.length;r++){let s=i[r];if(s.type&&s.src&&s.src===e)return s.type}return QQ(e)},hXe=function(t){if(Array.isArray(t)){let e=[];t.forEach(function(n){n=hXe(n),Array.isArray(n)?e=e.concat(n):H5(n)&&e.push(n)}),t=e}else typeof t=="string"&&t.trim()?t=[Uqe({src:t})]:H5(t)&&typeof t.src=="string"&&t.src&&t.src.trim()?t=[Uqe(t)]:t=[];return t};Sci=`<svg xmlns="http://www.w3.org/2000/svg">
  <defs>
    <symbol viewBox="0 0 48 48" id="vjs-icon-play">
      <path d="M16 10v28l22-14z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-pause">
      <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-audio">
      <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-captions">
      <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
      <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
      <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
      <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
      <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
      <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
      <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
      <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
      <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
      <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
    </symbol>
    <symbol viewBox="0 0 24 24" id="vjs-icon-hd">
      <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
      <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
    </symbol>
    <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
      <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
      <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
      <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
      <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-share">
      <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-cog">
      <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-square">
      <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-circle">
      <circle cx="24" cy="24" r="20"></circle>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
      <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-replay">
      <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
      <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
    </symbol>
    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
      <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
    </symbol>
    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
      <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
    </symbol>
    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
      <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
    </symbol>
    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
      <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
    </symbol>
    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
      <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
    </symbol>
    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
      <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
    </symbol>
    <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
      <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
      <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
      <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
      <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-cast">
      <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
    </symbol>
    <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
      <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
    </symbol>
    <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
      <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
      <path fill="none" d="M-1-3h24v24H-1z"></path>
    </symbol>
    <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
      <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
    </symbol>
    <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
      <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
    </symbol>
    <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
      <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
    </symbol>
    <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
      <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
    </symbol>
    <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
      <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
    </symbol>
  </defs>
</svg>`,jqe=WQ?10009:UQ?461:8,bP={codes:{play:415,pause:19,ff:417,rw:412,back:jqe},names:{415:"play",19:"pause",417:"ff",412:"rw",[jqe]:"back"},isEventKey(t,e){return e=e.toLowerCase(),!!(this.names[t.keyCode]&&this.names[t.keyCode]===e)},getEventName(t){if(this.names[t.keyCode])return this.names[t.keyCode];if(this.codes[t.code]){let e=this.codes[t.code];return this.names[e]}return null}},$qe=5,Gye=class extends Ig{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){let n=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(n.key)){if(this.isPaused_)return;n.preventDefault();let i=n.key.substring(5).toLowerCase();this.move(i)}else if(bP.isEventKey(n,"play")||bP.isEventKey(n,"pause")||bP.isEventKey(n,"ff")||bP.isEventKey(n,"rw")){n.preventDefault();let i=bP.getEventName(n);this.performMediaAction_(i)}else bP.isEventKey(n,"Back")&&e.target&&e.target.closeable()&&(n.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+$qe);break;case"rw":this.userSeek_(this.player_.currentTime()-$qe);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){let n=e.relatedTarget,i=null,r=this.getCurrentComponent(e.target);n&&(i=!!n.closest(".video-js"),n.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!i||!n)&&(r&&r.name()==="CloseButton"?this.refocusComponent():(this.pause(),r&&r.el()&&(this.lastFocusedComponent_=r)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){let e=this.player_,n=[];function i(r){for(let s of r)s.hasOwnProperty("el_")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&n.push(s),s.hasOwnProperty("children_")&&s.children_.length>0&&i(s.children_)}return e.children_.forEach(r=>{if(r.hasOwnProperty("el_"))if(r.getIsFocusable&&r.getIsAvailableToBeFocused&&r.getIsFocusable()&&r.getIsAvailableToBeFocused(r.el())){n.push(r);return}else r.hasOwnProperty("children_")&&r.children_.length>0?i(r.children_):r.hasOwnProperty("items")&&r.items.length>0?i(r.items):this.findSuitableDOMChild(r)&&n.push(r);if(r.name_==="ErrorDisplay"&&r.opened_){let s=r.el_.querySelector(".vjs-errors-ok-button-container");s&&s.querySelectorAll("button").forEach((a,l)=>{n.push({name:()=>"ModalButton"+(l+1),el:()=>a,getPositions:()=>{let c=a.getBoundingClientRect(),d={x:c.x,y:c.y,width:c.width,height:c.height,top:c.top,right:c.right,bottom:c.bottom,left:c.left},u={x:c.left+c.width/2,y:c.top+c.height/2,width:0,height:0,top:c.top+c.height/2,right:c.left+c.width/2,bottom:c.top+c.height/2,left:c.left+c.width/2};return{boundingClientRect:d,center:u}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:c=>!0,focus:()=>a.focus()})})}}),this.focusableComponents=n,this.focusableComponents}findSuitableDOMChild(e){function n(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let r=0;r<i.children.length;r++){let s=i.children[r],o=n(s);if(o)return o}return null}return e.el()?n(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();let n=e||document.activeElement;if(this.focusableComponents.length){for(let i of this.focusableComponents)if(i.el()===n)return i}}add(e){let n=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&n.push(e),this.focusableComponents=n,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let n=0;n<this.focusableComponents.length;n++)if(this.focusableComponents[n].name()===e.name()){this.focusableComponents.splice(n,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){let n=this.getCurrentComponent();if(!n)return;let i=n.getPositions(),r=this.focusableComponents.filter(o=>o!==n&&this.isInDirection_(i.boundingClientRect,o.getPositions().boundingClientRect,e)),s=this.findBestCandidate_(i.center,r,e);s?this.focus(s):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:n})}findBestCandidate_(e,n,i){let r=1/0,s=null;for(let o of n){let a=o.getPositions().center,l=this.calculateDistance_(e,a,i);l<r&&(r=l,s=o)}return s}isInDirection_(e,n,i){switch(i){case"right":return n.left>=e.right;case"left":return n.right<=e.left;case"down":return n.top>=e.bottom;case"up":return n.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,n,i){let r=Math.abs(e.x-n.x),s=Math.abs(e.y-n.y),o;switch(i){case"right":case"left":o=r+s*100;break;case"up":o=s*2+r*.5;break;case"down":o=s*5+r;break;default:o=r+s}return o}searchForTrackSelect_(){let e=this;for(let n of e.updateFocusableComponents())if(n.constructor.name==="TextTrackSelect"){e.focus(n);break}}},Wye=class extends In{constructor(e,n,i){let r=zu({createEl:!1},n);if(super(e,r,i),!n.playerOptions.sources||n.playerOptions.sources.length===0)for(let s=0,o=n.playerOptions.techOrder;s<o.length;s++){let a=rm(o[s]),l=ou.getTech(a);if(a||(l=In.getComponent(a)),l&&l.isSupported()){e.loadTech_(a);break}}else e.src(n.playerOptions.sources)}};In.registerComponent("MediaLoader",Wye);VP=class extends In{constructor(e,n){super(e,n),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=i=>this.handleMouseOver(i),this.handleMouseOut_=i=>this.handleMouseOut(i),this.handleClick_=i=>this.handleClick(i),this.handleKeyDown_=i=>this.handleKeyDown(i),this.emitTapEvents(),this.enable()}createEl(e="div",n={},i={}){n=Object.assign({className:this.buildCSSClass(),tabIndex:0},n),e==="button"&&uc.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=n.tabIndex;let r=ga(e,n,i);return this.player_.options_.experimentalSvgIcons||r.appendChild(ga("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=ga("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,n=this.el()){if(e===void 0)return this.controlText_||"Need Text";let i=this.localize(e);this.controlText_=e,nw(this.controlTextEl_,i),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&n.setAttribute("title",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}};In.registerComponent("ClickableComponent",VP);hH=class extends VP{constructor(e,n){super(e,n),this.update(),this.update_=i=>this.update(i),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return ga("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){let n=this.player().poster();this.setSrc(n),n?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(ga("picture",{className:"vjs-poster",tabIndex:-1},{},ga("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?N5(this.player_.play()):this.player_.pause())}};hH.prototype.crossorigin=hH.prototype.crossOrigin;In.registerComponent("PosterImage",hH);l6="#222",Kqe="#ccc",Tci={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};Uye=class extends In{constructor(e,n,i){super(e,n,i);let r=o=>this.updateDisplay(o),s=o=>{this.updateDisplayOverlay(),this.updateDisplay(o)};e.on("loadstart",o=>this.toggleDisplay(o)),e.on("texttrackchange",r),e.on("loadedmetadata",o=>{this.updateDisplayOverlay(),this.preselectTrack(o)}),e.ready(nh(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",s),e.on("playerresize",s);let o=di.default.screen.orientation||di.default,a=di.default.screen.orientation?"change":"orientationchange";o.addEventListener(a,s),e.on("dispose",()=>o.removeEventListener(a,s));let l=this.options_.playerOptions.tracks||[];for(let c=0;c<l.length;c++)this.player_.addRemoteTextTrack(l[c],!0);this.preselectTrack()}))}preselectTrack(){let e={captions:1,subtitles:1},n=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage,r,s,o;for(let a=0;a<n.length;a++){let l=n[a];i&&i.enabled&&i.language&&i.language===l.language&&l.kind in e?l.kind===i.kind?o=l:o||(o=l):i&&!i.enabled?(o=null,r=null,s=null):l.default&&(l.kind==="descriptions"&&!r?r=l:l.kind in e&&!s&&(s=l))}o?o.mode="showing":s?s.mode="showing":r&&(r.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof di.default.WebVTT=="function"&&di.default.WebVTT.processCues(di.default,[],this.el_)}updateDisplay(){let e=this.player_.textTracks(),n=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),n){let o=[];for(let a=0;a<e.length;++a){let l=e[a];l.mode==="showing"&&o.push(l)}this.updateForTrack(o);return}let i=null,r=null,s=e.length;for(;s--;){let o=e[s];o.mode==="showing"&&(o.kind==="descriptions"?i=o:r=o)}r?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(r)):i&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}updateDisplayOverlay(){if(!this.player_.videoHeight()||!di.default.CSS.supports("inset-inline: 10px"))return;let e=this.player_.currentWidth(),n=this.player_.currentHeight(),i=e/n,r=this.player_.videoWidth()/this.player_.videoHeight(),s=0,o=0;Math.abs(i-r)>.1&&(i>r?s=Math.round((e-n*r)/2):o=Math.round((n-e/r)/2)),Xz(this.el_,"insetInline",Yqe(s)),Xz(this.el_,"insetBlock",Yqe(o))}updateDisplayState(e){let n=this.player_.textTrackSettings.getValues(),i=e.activeCues,r=i.length;for(;r--;){let s=i[r];if(!s)continue;let o=s.displayState;if(n.color&&(o.firstChild.style.color=n.color),n.textOpacity&&Xz(o.firstChild,"color",_ye(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(o.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&Xz(o.firstChild,"backgroundColor",_ye(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?Xz(o,"backgroundColor",_ye(n.windowColor,n.windowOpacity)):o.style.backgroundColor=n.windowColor),n.edgeStyle&&(n.edgeStyle==="dropshadow"?o.firstChild.style.textShadow=`2px 2px 3px ${l6}, 2px 2px 4px ${l6}, 2px 2px 5px ${l6}`:n.edgeStyle==="raised"?o.firstChild.style.textShadow=`1px 1px ${l6}, 2px 2px ${l6}, 3px 3px ${l6}`:n.edgeStyle==="depressed"?o.firstChild.style.textShadow=`1px 1px ${Kqe}, 0 1px ${Kqe}, -1px -1px ${l6}, 0 -1px ${l6}`:n.edgeStyle==="uniform"&&(o.firstChild.style.textShadow=`0 0 4px ${l6}, 0 0 4px ${l6}, 0 0 4px ${l6}, 0 0 4px ${l6}`)),n.fontPercent&&n.fontPercent!==1){let a=di.default.parseFloat(o.style.fontSize);o.style.fontSize=a*n.fontPercent+"px",o.style.height="auto",o.style.top="auto"}n.fontFamily&&n.fontFamily!=="default"&&(n.fontFamily==="small-caps"?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=Tci[n.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof di.default.WebVTT!="function"||e.every(i=>!i.activeCues))return;let n=[];for(let i=0;i<e.length;++i){let r=e[i];for(let s=0;s<r.activeCues.length;++s)n.push(r.activeCues[s])}di.default.WebVTT.processCues(di.default,n,this.el_);for(let i=0;i<e.length;++i){let r=e[i];for(let s=0;s<r.activeCues.length;++s){let o=r.activeCues[s].displayState;VD(o,"vjs-text-track-cue","vjs-text-track-cue-"+(r.language?r.language:i)),r.language&&FP(o,"lang",r.language)}this.player_.textTrackSettings&&this.updateDisplayState(r)}}};In.registerComponent("TextTrackDisplay",Uye);jye=class extends In{createEl(){let e=this.player_.isAudio(),n=this.localize(e?"Audio Player":"Video Player"),i=ga("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[n])}),r=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(i),r}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}};In.registerComponent("LoadingSpinner",jye);Z1=class extends VP{createEl(e,n={},i={}){e="button",n=Object.assign({className:this.buildCSSClass()},n),i=Object.assign({type:"button"},i);let r=ga(e,n,i);return this.player_.options_.experimentalSvgIcons||r.appendChild(ga("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r}addChild(e,n={}){let i=this.constructor.name;return uc.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),In.prototype.addChild.call(this,e,n)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}};In.registerComponent("Button",Z1);JQ=class extends Z1{constructor(e,n){super(e,n),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",i=>this.handleMouseDown(i))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){let n=this.player_.play();if(this.mouseused_&&"clientX"in e&&"clientY"in e){N5(n),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}let i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(!r){this.player_.tech(!0).focus();return}let s=()=>r.focus();rH(n)?n.then(s,()=>{}):this.setTimeout(s,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}};JQ.prototype.controlText_="Play Video";In.registerComponent("BigPlayButton",JQ);$ye=class extends Z1{constructor(e,n){super(e,n),this.setIcon("cancel"),this.controlText(n&&n.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}};In.registerComponent("CloseButton",$ye);eJ=class extends Z1{constructor(e,n={}){super(e,n),n.replay=n.replay===void 0||n.replay,this.setIcon("play"),this.on(e,"play",i=>this.handlePlay(i)),this.on(e,"pause",i=>this.handlePause(i)),n.replay&&this.on(e,"ended",i=>this.handleEnded(i))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?N5(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",n=>this.handleSeeked(n))}};eJ.prototype.controlText_="Play";In.registerComponent("PlayToggle",eJ);ew=class extends In{constructor(e,n){super(e,n),this.on(e,["timeupdate","ended","seeking"],i=>this.update(i)),this.updateTextNode_()}createEl(){let e=this.buildCSSClass(),n=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),i=ga("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)}\xA0`},{role:"presentation"});return n.appendChild(i),this.contentEl_=ga("span",{className:`${e}-display`},{role:"presentation"}),n.appendChild(this.contentEl_),n}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=HD(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let n=this.textNode_;n&&this.contentEl_.firstChild!==n&&(n=null,uc.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=Cr.default.createTextNode(this.formattedTime_),this.textNode_&&(n?this.contentEl_.replaceChild(this.textNode_,n):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}};ew.prototype.labelText_="Time";ew.prototype.controlText_="Time";In.registerComponent("TimeDisplay",ew);pH=class extends ew{buildCSSClass(){return"vjs-current-time"}updateContent(e){let n;this.player_.ended()?n=this.player_.duration():n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(n)}};pH.prototype.labelText_="Current Time";pH.prototype.controlText_="Current Time";In.registerComponent("CurrentTimeDisplay",pH);mH=class extends ew{constructor(e,n){super(e,n);let i=r=>this.updateContent(r);this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){let n=this.player_.duration();this.updateTextNode_(n)}};mH.prototype.labelText_="Duration";mH.prototype.controlText_="Duration";In.registerComponent("DurationDisplay",mH);Kye=class extends In{createEl(){let e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return n.appendChild(i),e.appendChild(n),e}};In.registerComponent("TimeDivider",Kye);fH=class extends ew{constructor(e,n){super(e,n),this.on(e,"durationchange",i=>this.updateContent(i))}buildCSSClass(){return"vjs-remaining-time"}createEl(){let e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(ga("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let n;this.player_.ended()?n=0:this.player_.remainingTimeDisplay?n=this.player_.remainingTimeDisplay():n=this.player_.remainingTime(),this.updateTextNode_(n)}};fH.prototype.labelText_="Remaining Time";fH.prototype.controlText_="Remaining Time";In.registerComponent("RemainingTimeDisplay",fH);Yye=class extends In{constructor(e,n){super(e,n),this.updateShowing(),this.on(this.player(),"durationchange",i=>this.updateShowing(i))}createEl(){let e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=ga("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(ga("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")}\xA0`})),this.contentEl_.appendChild(Cr.default.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}};In.registerComponent("LiveDisplay",Yye);tJ=class extends Z1{constructor(e,n){super(e,n),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=i=>this.updateLiveEdgeStatus(i),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){let e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=ga("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}};tJ.prototype.controlText_="Seek to live, currently playing live";In.registerComponent("SeekToLive",tJ);Dci=Object.freeze({__proto__:null,clamp:IH}),gH=class extends In{constructor(e,n){super(e,n),this.handleMouseDown_=i=>this.handleMouseDown(i),this.handleMouseUp_=i=>this.handleMouseUp(i),this.handleKeyDown_=i=>this.handleKeyDown(i),this.handleClick_=i=>this.handleClick(i),this.handleMouseMove_=i=>this.handleMouseMove(i),this.update_=i=>this.update(i),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;let e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,n={},i={}){return n.className=n.className+" vjs-slider",n=Object.assign({tabIndex:0},n),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,n,i)}handleMouseDown(e){let n=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!W5&&e.preventDefault(),jZe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(n,"mousemove",this.handleMouseMove_),this.on(n,"mouseup",this.handleMouseUp_),this.on(n,"touchmove",this.handleMouseMove_),this.on(n,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){let n=this.bar.el_.ownerDocument;$Ze(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(n,"mousemove",this.handleMouseMove_),this.off(n,"mouseup",this.handleMouseUp_),this.off(n,"touchmove",this.handleMouseMove_),this.off(n,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;let e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{let n=this.vertical()?"height":"width";this.bar.el().style[n]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(IH(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){let n=YJ(this.el_,e);return this.vertical()?n.y:n.x}handleKeyDown(e){let n=this.options_.playerOptions.spatialNavigation,i=n&&n.enabled,r=n&&n.horizontalSeek;i?r&&e.key==="ArrowLeft"||!r&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):r&&e.key==="ArrowRight"||!r&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}};In.registerComponent("Slider",gH);Cye=(t,e)=>IH(t/e*100,0,100).toFixed(2)+"%",qye=class extends In{constructor(e,n){super(e,n),this.partEls_=[],this.on(e,"progress",i=>this.update(i))}createEl(){let e=super.createEl("div",{className:"vjs-load-progress"}),n=ga("span",{className:"vjs-control-text"}),i=ga("span",{textContent:this.localize("Loaded")}),r=Cr.default.createTextNode(": ");return this.percentageEl_=ga("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(n),n.appendChild(i),n.appendChild(r),n.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{let n=this.player_.liveTracker,i=this.player_.buffered(),r=n&&n.isLive()?n.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),o=this.partEls_,a=Cye(s,r);this.percent_!==a&&(this.el_.style.width=a,nw(this.percentageEl_,a),this.percent_=a);for(let l=0;l<i.length;l++){let c=i.start(l),d=i.end(l),u=o[l];u||(u=this.el_.appendChild(ga()),o[l]=u),!(u.dataset.start===c&&u.dataset.end===d)&&(u.dataset.start=c,u.dataset.end=d,u.style.left=Cye(c,s),u.style.width=Cye(d-c,s))}for(let l=o.length;l>i.length;l--)this.el_.removeChild(o[l-1]);o.length=i.length})}};In.registerComponent("LoadProgressBar",qye);Zye=class extends In{constructor(e,n){super(e,n),this.update=U5(nh(this,this.update),u6)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,n,i){let r=cH(this.el_),s=LP(this.player_.el()),o=e.width*n;if(!s||!r)return;let a=e.left-s.left+o,l=e.width-o+(s.right-e.right);l||(l=e.width-o,a=o);let c=r.width/2;a<c?c+=c-a:l<c&&(c=l),c<0?c=0:c>r.width&&(c=r.width),c=Math.round(c),this.el_.style.right=`-${c}px`,this.write(i)}write(e){nw(this.el_,e)}updateTime(e,n,i,r){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let s,o=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){let a=this.player_.liveTracker.liveWindow(),l=a-n*a;s=(l<1?"":"-")+HD(l,a)}else s=HD(i,o);this.update(e,n,s),r&&r()})}};In.registerComponent("TimeTooltip",Zye);vH=class extends In{constructor(e,n){super(e,n),this.setIcon("circle"),this.update=U5(nh(this,this.update),u6)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,n){let i=this.getChild("timeTooltip");if(!i)return;let r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,n,r)}};vH.prototype.options_={children:[]};!kg&&!G5&&vH.prototype.options_.children.push("timeTooltip");In.registerComponent("PlayProgressBar",vH);iJ=class extends In{constructor(e,n){super(e,n),this.update=U5(nh(this,this.update),u6)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,n){let i=n*this.player_.duration();this.getChild("timeTooltip").updateTime(e,n,i,()=>{this.el_.style.left=`${e.width*n}px`})}};iJ.prototype.options_={children:["timeTooltip"]};In.registerComponent("MouseTimeDisplay",iJ);PQ=5,qqe=12,yH=class extends gH{constructor(e,n){super(e,n),this.setEventHandlers_()}setEventHandlers_(){this.update_=nh(this,this.update),this.update=U5(this.update_,u6),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Cr.default&&"visibilityState"in Cr.default&&this.on(Cr.default,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){Cr.default.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,u6))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(Cr.default.visibilityState==="hidden")return;let n=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{let i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),r=this.player_.liveTracker,s=this.player_.duration();r&&r.isLive()&&(s=this.player_.liveTracker.liveCurrentTime()),this.percent_!==n&&(this.el_.setAttribute("aria-valuenow",(n*100).toFixed(2)),this.percent_=n),(this.currentTime_!==i||this.duration_!==s)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[HD(i,s),HD(s,s)],"{1} of {2}")),this.currentTime_=i,this.duration_=s),this.bar&&this.bar.update(LP(this.el()),this.getProgress())}),n}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}getPercent(){let e=this.getCurrentTime_(),n,i=this.player_.liveTracker;return i&&i.isLive()?(n=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(n=1)):n=e/this.player_.duration(),n}handleMouseDown(e){dH(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,n=!1){if(!dH(e)||isNaN(this.player_.duration()))return;!n&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let i,r=this.calculateDistance(e),s=this.player_.liveTracker;if(!s||!s.isLive())i=r*this.player_.duration(),i===this.player_.duration()&&(i=i-.1);else{if(r>=.99){s.seekToLiveEdge();return}let o=s.seekableStart(),a=s.liveCurrentTime();if(i=o+r*s.liveWindow(),i>=a&&(i=a),i<=o&&(i=o+.1),i===1/0)return}this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();let e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();let e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?N5(this.player_.play()):this.update_()}stepForward(){this.userSeek_(this.player_.currentTime()+PQ)}stepBack(){this.userSeek_(this.player_.currentTime()-PQ)}handleAction(e){this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){let n=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();let i=parseInt(e.key,10)*.1;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-PQ*qqe)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+PQ*qqe)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Cr.default&&"visibilityState"in Cr.default&&this.off(Cr.default,"visibilitychange",this.toggleVisibility_),super.dispose()}};yH.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};!kg&&!G5&&yH.prototype.options_.children.splice(1,0,"mouseTimeDisplay");In.registerComponent("SeekBar",yH);nJ=class extends In{constructor(e,n){super(e,n),this.handleMouseMove=U5(nh(this,this.handleMouseMove),u6),this.throttledHandleMouseSeek=U5(nh(this,this.handleMouseSeek),u6),this.handleMouseUpHandler_=i=>this.handleMouseUp(i),this.handleMouseDownHandler_=i=>this.handleMouseDown(i),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){let n=this.getChild("seekBar");if(!n)return;let i=n.getChild("playProgressBar"),r=n.getChild("mouseTimeDisplay");if(!i&&!r)return;let s=n.el(),o=cH(s),a=YJ(s,e).x;a=IH(a,0,1),r&&r.update(o,a),i&&i.update(o,n.getProgress())}handleMouseSeek(e){let n=this.getChild("seekBar");n&&n.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){let e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&N5(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){let e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){let n=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(n,"mousemove",this.throttledHandleMouseSeek),this.on(n,"touchmove",this.throttledHandleMouseSeek),this.on(n,"mouseup",this.handleMouseUpHandler_),this.on(n,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){let n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}};nJ.prototype.options_={children:["seekBar"]};In.registerComponent("ProgressControl",nJ);rJ=class extends Z1{constructor(e,n){super(e,n),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],i=>this.handlePictureInPictureChange(i)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],i=>this.handlePictureInPictureEnabledChange(i)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){Cr.default.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in di.default?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof Cr.default.exitPictureInPicture=="function"&&super.show()}};rJ.prototype.controlText_="Picture-in-Picture";In.registerComponent("PictureInPictureToggle",rJ);sJ=class extends Z1{constructor(e,n){super(e,n),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",i=>this.handleFullscreenChange(i)),Cr.default[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}};sJ.prototype.controlText_="Fullscreen";In.registerComponent("FullscreenToggle",sJ);Eci=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},Xye=class extends In{createEl(){let e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}};In.registerComponent("VolumeLevel",Xye);Qye=class extends In{constructor(e,n){super(e,n),this.update=U5(nh(this,this.update),u6)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,n,i,r){if(!i){let s=LP(this.el_),o=LP(this.player_.el()),a=e.width*n;if(!o||!s)return;let l=e.left-o.left+a,c=e.width-a+(o.right-e.right),d=s.width/2;l<d?d+=d-l:c<d&&(d=c),d<0?d=0:d>s.width&&(d=s.width),this.el_.style.right=`-${d}px`}this.write(`${r}%`)}write(e){nw(this.el_,e)}updateVolume(e,n,i,r,s){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,n,i,r.toFixed(0)),s&&s()})}};In.registerComponent("VolumeLevelTooltip",Qye);oJ=class extends In{constructor(e,n){super(e,n),this.update=U5(nh(this,this.update),u6)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,n,i){let r=100*n;this.getChild("volumeLevelTooltip").updateVolume(e,n,i,r,()=>{i?this.el_.style.bottom=`${e.height*n}px`:this.el_.style.left=`${e.width*n}px`})}};oJ.prototype.options_={children:["volumeLevelTooltip"]};In.registerComponent("MouseVolumeLevelDisplay",oJ);BP=class extends gH{constructor(e,n){super(e,n),this.on("slideractive",i=>this.updateLastVolume_(i)),this.on(e,"volumechange",i=>this.updateARIAAttributes(i)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){dH(e)&&super.handleMouseDown(e)}handleMouseMove(e){let n=this.getChild("mouseVolumeLevelDisplay");if(n){let i=this.el(),r=LP(i),s=this.vertical(),o=YJ(i,e);o=s?o.y:o.x,o=IH(o,0,1),n.update(r,o,s)}dH(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){let n=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",n),this.el_.setAttribute("aria-valuetext",n+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){let e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}};BP.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!kg&&!G5&&BP.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");BP.prototype.playerEvent="volumechange";In.registerComponent("VolumeBar",BP);aJ=class extends In{constructor(e,n={}){n.vertical=n.vertical||!1,(typeof n.volumeBar>"u"||RP(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),super(e,n),Eci(this,e),this.throttledHandleMouseMove=U5(nh(this,this.handleMouseMove),u6),this.handleMouseUpHandler_=i=>this.handleMouseUp(i),this.on("mousedown",i=>this.handleMouseDown(i)),this.on("touchstart",i=>this.handleMouseDown(i)),this.on("mousemove",i=>this.handleMouseMove(i)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){let n=this.el_.ownerDocument;this.on(n,"mousemove",this.throttledHandleMouseMove),this.on(n,"touchmove",this.throttledHandleMouseMove),this.on(n,"mouseup",this.handleMouseUpHandler_),this.on(n,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){let n=this.el_.ownerDocument;this.off(n,"mousemove",this.throttledHandleMouseMove),this.off(n,"touchmove",this.throttledHandleMouseMove),this.off(n,"mouseup",this.handleMouseUpHandler_),this.off(n,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}};aJ.prototype.options_={children:["volumeBar"]};In.registerComponent("VolumeControl",aJ);Mci=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},lJ=class extends Z1{constructor(e,n){super(e,n),Mci(this,e),this.on(e,["loadstart","volumechange"],i=>this.update(i))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){let n=this.player_.volume(),i=this.player_.lastVolume_();if(n===0){let r=i<.1?.1:i;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){let e=this.player_.volume(),n=3;this.setIcon("volume-high"),kg&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),n=0):e<.33?(this.setIcon("volume-low"),n=1):e<.67&&(this.setIcon("volume-medium"),n=2),$J(this.el_,[0,1,2,3].reduce((i,r)=>i+`${r?" ":""}vjs-vol-${r}`,"")),VD(this.el_,`vjs-vol-${n}`)}updateControlText_(){let n=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==n&&this.controlText(n)}};lJ.prototype.controlText_="Mute";In.registerComponent("MuteToggle",lJ);cJ=class extends In{constructor(e,n={}){typeof n.inline<"u"?n.inline=n.inline:n.inline=!0,(typeof n.volumeControl>"u"||RP(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),super(e,n),this.handleKeyPressHandler_=i=>this.handleKeyPress(i),this.on(e,["loadstart"],i=>this.volumePanelState_(i)),this.on(this.muteToggle,"keyup",i=>this.handleKeyPress(i)),this.on(this.volumeControl,"keyup",i=>this.handleVolumeControlKeyUp(i)),this.on("keydown",i=>this.handleKeyPress(i)),this.on("mouseover",i=>this.handleMouseOver(i)),this.on("mouseout",i=>this.handleMouseOut(i)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),R4(Cr.default,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),_2(Cr.default,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}};cJ.prototype.options_={children:["muteToggle","volumeControl"]};In.registerComponent("VolumePanel",cJ);dJ=class extends Z1{constructor(e,n){super(e,n),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){let e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;let n=this.player_.currentTime(),i=this.player_.liveTracker,r=i&&i.isLive()?i.seekableEnd():this.player_.duration(),s;n+this.skipTime<=r?s=n+this.skipTime:s=r,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}};dJ.prototype.controlText_="Skip Forward";In.registerComponent("SkipForward",dJ);uJ=class extends Z1{constructor(e,n){super(e,n),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){let e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){let n=this.player_.currentTime(),i=this.player_.liveTracker,r=i&&i.isLive()&&i.seekableStart(),s;r&&n-this.skipTime<=r?s=r:n>=this.skipTime?s=n-this.skipTime:s=0,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}};uJ.prototype.controlText_="Skip Backward";In.registerComponent("SkipBackward",uJ);hJ=class extends In{constructor(e,n){super(e,n),n&&(this.menuButton_=n.menuButton),this.focusedChild_=-1,this.on("keydown",i=>this.handleKeyDown(i)),this.boundHandleBlur_=i=>this.handleBlur(i),this.boundHandleTapClick_=i=>this.handleTapClick(i)}addEventListenerForItem(e){e instanceof In&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof In&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){let n=this.addChild(e);n&&this.addEventListenerForItem(n)}createEl(){let e=this.options_.contentElType||"ul";this.contentEl_=ga(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");let n=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),R4(n,"click",function(i){i.preventDefault(),i.stopImmediatePropagation()}),n}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){let n=e.relatedTarget||Cr.default.activeElement;if(!this.children().some(i=>i.el()===n)){let i=this.menuButton_;i&&i.buttonPressed_&&n!==i.el().firstChild&&i.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();let n=this.children();if(!Array.isArray(n))return;let i=n.filter(r=>r.el()===e.target)[0];if(!i)return;i.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){let n=this.children().slice();n.length&&n[0].hasClass("vjs-menu-title")&&n.shift(),n.length>0&&(e<0?e=0:e>=n.length&&(e=n.length-1),this.focusedChild_=e,n[e].el_.focus())}};In.registerComponent("Menu",hJ);_H=class extends In{constructor(e,n={}){super(e,n),this.menuButton_=new Z1(e,n),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");let i=Z1.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;let r=s=>this.handleClick(s);this.handleMenuKeyUp_=s=>this.handleMenuKeyUp(s),this.on(this.menuButton_,"tap",r),this.on(this.menuButton_,"click",r),this.on(this.menuButton_,"keydown",s=>this.handleKeyDown(s)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),R4(Cr.default,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",s=>this.handleMouseLeave(s)),this.on("keydown",s=>this.handleSubmenuKeyDown(s))}update(){let e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){let e=new hJ(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){let n=ga("li",{className:"vjs-menu-title",textContent:rm(this.options_.title),tabIndex:-1}),i=new In(this.player_,{el:n});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";let n=Z1.prototype.buildCSSClass();return`vjs-menu-button ${e} ${n} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,n=this.menuButton_.el()){return this.menuButton_.controlText(e,n)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),_2(Cr.default,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Esc"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Esc"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Esc"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),kg&&zZe())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}};In.registerComponent("MenuButton",_H);CH=class extends _H{constructor(e,n){let i=n.tracks;if(super(e,n),this.items.length<=1&&this.hide(),!i)return;let r=nh(this,this.update);i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),i.addEventListener("labelchange",r),this.player_.on("ready",r),this.player_.on("dispose",function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r),i.removeEventListener("labelchange",r)})}};In.registerComponent("TrackButton",CH);WD=class extends VP{constructor(e,n){super(e,n),this.selectable=n.selectable,this.isSelected_=n.selected||!1,this.multiSelectable=n.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,n,i){this.nonIconControl=!0;let r=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},n),i),s=ga("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?r.appendChild(s):r.replaceChild(s,r.querySelector(".vjs-icon-placeholder")),r}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}};In.registerComponent("MenuItem",WD);UD=class extends WD{constructor(e,n){let i=n.track,r=e.textTracks();n.label=i.label||i.language||"Unknown",n.selected=i.mode==="showing",super(e,n),this.track=i,this.kinds=(n.kinds||[n.kind||this.track.kind]).filter(Boolean);let s=(...a)=>{this.handleTracksChange.apply(this,a)},o=(...a)=>{this.handleSelectedLanguageChange.apply(this,a)};if(e.on(["loadstart","texttrackchange"],s),r.addEventListener("change",s),r.addEventListener("selectedlanguagechange",o),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],s),r.removeEventListener("change",s),r.removeEventListener("selectedlanguagechange",o)}),r.onchange===void 0){let a;this.on(["tap","click"],function(){if(typeof di.default.Event!="object")try{a=new di.default.Event("change")}catch{}a||(a=Cr.default.createEvent("Event"),a.initEvent("change",!0,!0)),r.dispatchEvent(a)})}this.handleTracksChange()}handleClick(e){let n=this.track,i=this.player_.textTracks();if(super.handleClick(e),!!i)for(let r=0;r<i.length;r++){let s=i[r];this.kinds.indexOf(s.kind)!==-1&&(s===n?s.mode!=="showing"&&(s.mode="showing"):s.mode!=="disabled"&&(s.mode="disabled"))}}handleTracksChange(e){let n=this.track.mode==="showing";n!==this.isSelected_&&this.selected(n)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){let n=this.player_.cache_.selectedLanguage;if(n&&n.enabled&&n.language===this.track.language&&n.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}};In.registerComponent("TextTrackMenuItem",UD);pJ=class extends UD{constructor(e,n){n.track={player:e,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,super(e,n)}handleTracksChange(e){let n=this.player().textTracks(),i=!0;for(let r=0,s=n.length;r<s;r++){let o=n[r];if(this.options_.kinds.indexOf(o.kind)>-1&&o.mode==="showing"){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){let n=this.player().textTracks(),i=!0;for(let r=0,s=n.length;r<s;r++){let o=n[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&o.mode==="showing"){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}};In.registerComponent("OffTextTrackMenuItem",pJ);tw=class extends CH{constructor(e,n={}){n.tracks=e.textTracks(),super(e,n)}createItems(e=[],n=UD){let i;this.label_&&(i=`${this.label_} off`),e.push(new pJ(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;let r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let s=0;s<r.length;s++){let o=r[s];if(this.kinds_.indexOf(o.kind)>-1){let a=new n(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass(`vjs-${o.kind}-menu-item`),e.push(a)}}return e}};In.registerComponent("TextTrackButton",tw);mJ=class extends WD{constructor(e,n){let i=n.track,r=n.cue,s=e.currentTime();n.selectable=!0,n.multiSelectable=!1,n.label=r.text,n.selected=r.startTime<=s&&s<r.endTime,super(e,n),this.track=i,this.cue=r}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}};In.registerComponent("ChaptersTrackMenuItem",mJ);xH=class extends tw{constructor(e,n,i){super(e,n,i),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(r=>{r.selected(this.track_.activeCues[0]===r.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;let n=this.findChaptersTrack();n!==this.track_?(this.setTrack(n),super.update()):(!this.items||n&&n.cues&&n.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){let n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";let n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){let e=this.player_.textTracks()||[];for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(rm(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){let e=[];if(!this.track_)return e;let n=this.track_.cues;if(!n)return e;for(let i=0,r=n.length;i<r;i++){let s=n[i],o=new mJ(this.player_,{track:this.track_,cue:s});e.push(o)}return e}};xH.prototype.kind_="chapters";xH.prototype.controlText_="Chapters";In.registerComponent("ChaptersButton",xH);bH=class extends tw{constructor(e,n,i){super(e,n,i),this.setIcon("audio-description");let r=e.textTracks(),s=nh(this,this.handleTracksChange);r.addEventListener("change",s),this.on("dispose",function(){r.removeEventListener("change",s)})}handleTracksChange(e){let n=this.player().textTracks(),i=!1;for(let r=0,s=n.length;r<s;r++){let o=n[r];if(o.kind!==this.kind_&&o.mode==="showing"){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}};bH.prototype.kind_="descriptions";bH.prototype.controlText_="Descriptions";In.registerComponent("DescriptionsButton",bH);wH=class extends tw{constructor(e,n,i){super(e,n,i),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}};wH.prototype.kind_="subtitles";wH.prototype.controlText_="Subtitles";In.registerComponent("SubtitlesButton",wH);SH=class extends UD{constructor(e,n){n.track={player:e,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",super(e,n),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+n.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}};In.registerComponent("CaptionSettingsMenuItem",SH);TH=class extends tw{constructor(e,n,i){super(e,n,i),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new SH(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}};TH.prototype.kind_="captions";TH.prototype.controlText_="Captions";In.registerComponent("CaptionsButton",TH);fJ=class extends UD{createEl(e,n,i){let r=super.createEl(e,n,i),s=r.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",r):s.appendChild(ga("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(ga("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),r}};In.registerComponent("SubsCapsMenuItem",fJ);DH=class extends tw{constructor(e,n={}){super(e,n),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(rm(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new SH(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,fJ),e}};DH.prototype.kinds_=["captions","subtitles"];DH.prototype.controlText_="Subtitles";In.registerComponent("SubsCapsButton",DH);gJ=class extends WD{constructor(e,n){let i=n.track,r=e.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,super(e,n),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);let s=(...o)=>{this.handleTracksChange.apply(this,o)};r.addEventListener("change",s),this.on("dispose",()=>{r.removeEventListener("change",s)})}createEl(e,n,i){let r=super.createEl(e,n,i),s=r.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(s.appendChild(ga("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(ga("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){let n=this.player_.audioTracks();for(let i=0;i<n.length;i++){let r=n[i];r!==this.track&&(r.enabled=r===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}};In.registerComponent("AudioTrackMenuItem",gJ);vJ=class extends CH{constructor(e,n={}){n.tracks=e.audioTracks(),super(e,n),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;let n=this.player_.audioTracks();for(let i=0;i<n.length;i++){let r=n[i];e.push(new gJ(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e}};vJ.prototype.controlText_="Audio Track";In.registerComponent("AudioTrackButton",vJ);EH=class extends WD{constructor(e,n){let i=n.rate,r=parseFloat(i,10);n.label=i,n.selected=r===e.playbackRate(),n.selectable=!0,n.multiSelectable=!1,super(e,n),this.label=i,this.rate=r,this.on(e,"ratechange",s=>this.update(s))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}};EH.prototype.contentElType="button";In.registerComponent("PlaybackRateMenuItem",EH);yJ=class extends _H{constructor(e,n){super(e,n),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",i=>this.updateVisibility(i)),this.on(e,"ratechange",i=>this.updateLabel(i)),this.on(e,"playbackrateschange",i=>this.handlePlaybackRateschange(i))}createEl(){let e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=ga("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){let e=this.playbackRates(),n=[];for(let i=e.length-1;i>=0;i--)n.push(new EH(this.player(),{rate:e[i]+"x"}));return n}handlePlaybackRateschange(e){this.update()}playbackRates(){let e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}};yJ.prototype.controlText_="Playback Rate";In.registerComponent("PlaybackRateMenuButton",yJ);_J=class extends In{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",n={},i={}){return n.className||(n.className=this.buildCSSClass()),super.createEl(e,n,i)}};In.registerComponent("Spacer",_J);Jye=class extends _J{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:"\xA0"})}};In.registerComponent("CustomControlSpacer",Jye);CJ=class extends In{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}};CJ.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};In.registerComponent("ControlBar",CJ);xJ=class extends X7{constructor(e,n){super(e,n),this.on(e,"error",i=>{this.open(i)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){let e=this.player().error();return e?this.localize(e.message):""}};xJ.prototype.options_=Object.assign({},X7.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});In.registerComponent("ErrorDisplay",xJ);bJ=class extends In{constructor(e,n={}){super(e,n),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),ga("select",{id:this.options_.id},{},this.options_.SelectOptions.map(n=>{let i=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${d6()}`)+"-"+n[1].replace(/\W+/g,""),r=ga("option",{id:i,value:this.localize(n[0]),textContent:n[1]});return r.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${i}`),r}))}};In.registerComponent("TextTrackSelect",bJ);Ax=class extends In{constructor(e,n={}){super(e,n);let i=ga("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);let r=this.options_.selects;for(let s of r){let o=this.options_.selectConfigs[s],a=o.className,l=o.id.replace("%s",this.options_.id_),c=null,d=`vjs_select_${d6()}`;if(this.options_.type==="colors"){c=ga("span",{className:a});let m=ga("label",{id:l,className:"vjs-label",textContent:o.label});m.setAttribute("for",d),c.appendChild(m)}let u=new bJ(e,{SelectOptions:o.options,legendId:this.options_.legendId,id:d,labelId:l});this.addChild(u),this.options_.type==="colors"&&(c.appendChild(u.el()),this.el().appendChild(c))}}createEl(){return ga("fieldset",{className:this.options_.className})}};In.registerComponent("TextTrackFieldset",Ax);wJ=class extends In{constructor(e,n={}){super(e,n);let i=this.options_.textTrackComponentid,r=new Ax(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(r);let s=new Ax(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);let o=new Ax(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(o)}createEl(){return ga("div",{className:"vjs-track-settings-colors"})}};In.registerComponent("TextTrackSettingsColors",wJ);SJ=class extends In{constructor(e,n={}){super(e,n);let i=this.options_.textTrackComponentid,r=new Ax(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(r);let s=new Ax(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);let o=new Ax(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(o)}createEl(){return ga("div",{className:"vjs-track-settings-font"})}};In.registerComponent("TextTrackSettingsFont",SJ);TJ=class extends In{constructor(e,n={}){super(e,n);let i=this.localize("restore all settings to the default values"),r=new Z1(e,{controlText:i,className:"vjs-default-button"});r.el().classList.remove("vjs-control","vjs-button"),r.el().textContent=this.localize("Reset"),this.addChild(r);let s=new Z1(e,{controlText:i,className:"vjs-done-button"});s.el().classList.remove("vjs-control","vjs-button"),s.el().textContent=this.localize("Done"),this.addChild(s)}createEl(){return ga("div",{className:"vjs-track-settings-controls"})}};In.registerComponent("TrackSettingsControls",TJ);xye="vjs-text-track-settings",Zqe=["#000","Black"],Xqe=["#00F","Blue"],Qqe=["#0FF","Cyan"],Jqe=["#0F0","Green"],eZe=["#F0F","Magenta"],tZe=["#F00","Red"],iZe=["#FFF","White"],nZe=["#FF0","Yellow"],bye=["1","Opaque"],wye=["0.5","Semi-Transparent"],rZe=["0","Transparent"],$7={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Zqe,iZe,tZe,Jqe,Xqe,nZe,eZe,Qqe],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[bye,wye,rZe],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[iZe,Zqe,tZe,Jqe,Xqe,nZe,eZe,Qqe],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:t=>t==="1.00"?null:Number(t)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[bye,wye],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[rZe,wye,bye],className:"vjs-window-opacity vjs-opacity"}};$7.windowColor.options=$7.backgroundColor.options;e_e=class extends X7{constructor(e,n){n.temporary=!1,super(e,n),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=ga("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),n.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){let n=new wJ(e,{textTrackComponentid:this.id_,selectConfigs:$7,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(n);let i=new SJ(e,{textTrackComponentid:this.id_,selectConfigs:$7,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(i);let r=new TJ(e);this.addChild(r)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),DP($7,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return RZe($7,(e,n,i)=>{let r=kci(this.$(n.selector),n.parser);return r!==void 0&&(e[i]=r),e},{})}setValues(e){DP($7,(n,i)=>{Ici(this.$(n.selector),e[i],n.parser)})}setDefaults(){DP($7,e=>{let n=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=n})}restoreSettings(){let e;try{e=JSON.parse(di.default.localStorage.getItem(xye))}catch(n){uc.warn(n)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;let e=this.getValues();try{Object.keys(e).length?di.default.localStorage.setItem(xye,JSON.stringify(e)):di.default.localStorage.removeItem(xye)}catch(n){uc.warn(n)}}updateDisplay(){let e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}};In.registerComponent("TextTrackSettings",e_e);t_e=class extends In{constructor(e,n){let i=n.ResizeObserver||di.default.ResizeObserver;n.ResizeObserver===null&&(i=!1);let r=zu({createEl:!i,reportTouchActivity:!1},n);super(e,r),this.ResizeObserver=n.ResizeObserver||di.default.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=iXe(()=>{this.resizeHandler()},100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;let s=this.debouncedHandler_,o=this.unloadListener_=function(){_2(this,"resize",s),_2(this,"unload",o),o=null};R4(this.el_.contentWindow,"unload",o),R4(this.el_.contentWindow,"resize",s)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}};In.registerComponent("ResizeManager",t_e);Aci={trackingThreshold:20,liveTolerance:15},i_e=class extends In{constructor(e,n){let i=zu(Aci,n,{createEl:!1});super(e,i),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=r=>this.handlePlay(r),this.handleFirstTimeupdate_=r=>this.handleFirstTimeupdate(r),this.handleSeeked_=r=>this.handleSeeked(r),this.seekToLiveEdge_=r=>this.seekToLiveEdge(r),this.reset_(),this.on(this.player_,"durationchange",r=>this.handleDurationchange(r)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){let e=this.player_.seekable();if(!e||!e.length)return;let n=Number(di.default.performance.now().toFixed(4)),i=this.lastTime_===-1?0:(n-this.lastTime_)/1e3;this.lastTime_=n,this.pastSeekEnd_=this.pastSeekEnd()+i;let r=this.liveCurrentTime(),s=this.player_.currentTime(),o=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-s)>this.options_.liveTolerance;(!this.timeupdateSeen_||r===1/0)&&(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,u6),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){let e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){let e=this.player_.seekable(),n=[],i=e?e.length:0;for(;i--;)n.push(e.end(i));return n.length?n.sort()[n.length-1]:1/0}seekableStart(){let e=this.player_.seekable(),n=[],i=e?e.length:0;for(;i--;)n.push(e.start(i));return n.length?n.sort()[0]:0}liveWindow(){let e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){let e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}};In.registerComponent("LiveTracker",i_e);n_e=class extends In{constructor(e,n){super(e,n),this.on("statechanged",i=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:ga("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${d6()}`}),description:ga("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${d6()}`})},ga("div",{className:"vjs-title-bar"},{},FZe(this.els))}updateDom_(){let e=this.player_.tech_,n=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(r=>{let s=this.state[r],o=this.els[r],a=i[r];qJ(o),s&&nw(o,s),n&&(n.removeAttribute(a),s&&n.setAttribute(a,o.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){let e=this.player_.tech_,n=e&&e.el_;n&&(n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-describedby")),super.dispose(),this.els=null}};In.registerComponent("TitleBar",n_e);Pci={initialDisplay:4e3,position:[],takeFocus:!1},r_e=class extends Z1{constructor(e,n){n=zu(Pci,n),super(e,n),this.controlText(n.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],i=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){let e=ga("button",{},{type:"button",class:this.buildCSSClass()},ga("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}};In.registerComponent("TransientButton",r_e);s_e=t=>{let e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;let n=t.$$("source"),i=[],r="";if(!n.length)return!1;for(let s=0;s<n.length;s++){let o=n[s].src;o&&i.indexOf(o)===-1&&i.push(o)}return i.length?(i.length===1&&(r=i[0]),t.triggerSourceset(r),!0):!1},Rci=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(t){let e=Cr.default.createElement(this.nodeName.toLowerCase());e.innerHTML=t;let n=Cr.default.createDocumentFragment();for(;e.childNodes.length;)n.appendChild(e.childNodes[0]);return this.innerText="",di.default.Element.prototype.appendChild.call(this,n),this.innerHTML}}),mXe=(t,e)=>{let n={};for(let i=0;i<t.length&&(n=Object.getOwnPropertyDescriptor(t[i],e),!(n&&n.set&&n.get));i++);return n.enumerable=!0,n.configurable=!0,n},Fci=t=>mXe([t.el(),di.default.HTMLMediaElement.prototype,di.default.Element.prototype,Rci],"innerHTML"),sZe=function(t){let e=t.el();if(e.resetSourceWatch_)return;let n={},i=Fci(t),r=s=>(...o)=>{let a=s.apply(e,o);return s_e(t),a};["append","appendChild","insertAdjacentHTML"].forEach(s=>{e[s]&&(n[s]=e[s],e[s]=r(n[s]))}),Object.defineProperty(e,"innerHTML",zu(i,{set:r(i.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(n).forEach(s=>{e[s]=n[s]}),Object.defineProperty(e,"innerHTML",i)},t.one("sourceset",e.resetSourceWatch_)},Lci=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?uXe(di.default.Element.prototype.getAttribute.call(this,"src")):""},set(t){return di.default.Element.prototype.setAttribute.call(this,"src",t),t}}),Oci=t=>mXe([t.el(),di.default.HTMLMediaElement.prototype,Lci],"src"),Nci=function(t){if(!t.featuresSourceset)return;let e=t.el();if(e.resetSourceset_)return;let n=Oci(t),i=e.setAttribute,r=e.load;Object.defineProperty(e,"src",zu(n,{set:s=>{let o=n.set.call(e,s);return t.triggerSourceset(e.src),o}})),e.setAttribute=(s,o)=>{let a=i.call(e,s,o);return/src/i.test(s)&&t.triggerSourceset(e.src),a},e.load=()=>{let s=r.call(e);return s_e(t)||(t.triggerSourceset(""),sZe(t)),s},e.currentSrc?t.triggerSourceset(e.currentSrc):s_e(t)||sZe(t),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=r,e.setAttribute=i,Object.defineProperty(e,"src",n),e.resetSourceWatch_&&e.resetSourceWatch_()}},zs=class t extends ou{constructor(e,n){super(e,n);let i=e.source,r=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",i&&(this.el_.currentSrc!==i.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){let s=this.el_.childNodes,o=s.length,a=[];for(;o--;){let l=s[o];l.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(l),this.remoteTextTracks().addTrack(l.track),this.textTracks().addTrack(l.track),!r&&!this.el_.hasAttribute("crossorigin")&&JJ(l.src)&&(r=!0)):a.push(l))}for(let l=0;l<a.length;l++)this.el_.removeChild(a[l])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&r&&uc.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(lH||UJ)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Nci(this)}restoreMetadataTracksInIOSNativePlayer_(){let e=this.textTracks(),n,i=()=>{n=[];for(let s=0;s<e.length;s++){let o=e[s];o.kind==="metadata"&&n.push({track:o,storedMode:o.mode})}};i(),e.addEventListener("change",i),this.on("dispose",()=>e.removeEventListener("change",i));let r=()=>{for(let s=0;s<n.length;s++){let o=n[s];o.track.mode==="disabled"&&o.track.mode!==o.storedMode&&(o.track.mode=o.storedMode)}e.removeEventListener("change",r)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",i),e.removeEventListener("change",r),e.addEventListener("change",r)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",r)})}overrideNative_(e,n){if(n!==this[`featuresNative${e}Tracks`])return;let i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach(r=>{this.el()[`${i}Tracks`].removeEventListener(r,this[`${i}TracksListeners_`][r])}),this[`featuresNative${e}Tracks`]=!n,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){let n=c6[e],i=this.el()[n.getterName],r=this[n.getterName]();if(!this[`featuresNative${n.capitalName}Tracks`]||!i||!i.addEventListener)return;let s={change:a=>{let l={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(l),e==="text"&&this[NP.remoteText.getterName]().trigger(l)},addtrack(a){r.addTrack(a.track)},removetrack(a){r.removeTrack(a.track)}},o=function(){let a=[];for(let l=0;l<r.length;l++){let c=!1;for(let d=0;d<i.length;d++)if(i[d]===r[l]){c=!0;break}c||a.push(r[l])}for(;a.length;)r.removeTrack(a.shift())};this[n.getterName+"Listeners_"]=s,Object.keys(s).forEach(a=>{let l=s[a];i.addEventListener(a,l),this.on("dispose",c=>i.removeEventListener(a,l))}),this.on("loadstart",o),this.on("dispose",a=>this.off("loadstart",o))}proxyNativeTracks_(){c6.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){let i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),t.disposeMediaElement(e),e=i}else{e=Cr.default.createElement("video");let i=this.options_.tag&&j7(this.options_.tag),r=zu({},i);(!lH||this.options_.nativeControlsForTouch!==!0)&&delete r.controls,WZe(e,Object.assign(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&FP(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);let n=["loop","muted","playsinline","autoplay"];for(let i=0;i<n.length;i++){let r=n[i],s=this.options_[r];typeof s<"u"&&(s?FP(e,r,r):KJ(e,r),e[r]=s)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let i=!1,r=function(){i=!0};this.on("loadstart",r);let s=function(){i||this.trigger("loadstart")};this.on("loadedmetadata",s),this.ready(function(){this.off("loadstart",r),this.off("loadedmetadata",s),i||this.trigger("loadstart")});return}let n=["loadstart"];n.push("loadedmetadata"),e.readyState>=2&&n.push("loadeddata"),e.readyState>=3&&n.push("canplay"),e.readyState>=4&&n.push("canplaythrough"),this.ready(function(){n.forEach(function(i){this.trigger(i)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&jJ?this.el_.fastSeek(e):this.el_.currentTime=e}catch(n){uc(n,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&G5&&W5&&this.el_.currentTime===0){let e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;let e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},n=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",()=>{this.off("webkitbeginfullscreen",n),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){let e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)N5(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(n){this.trigger("fullscreenerror",n)}},0);else try{e.webkitEnterFullScreen()}catch(n){this.trigger("fullscreenerror",n)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}reset(){t.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,n,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,n,i):super.addTextTrack(e,n,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);let n=Cr.default.createElement("track");return e.kind&&(n.kind=e.kind),e.label&&(n.label=e.label),(e.language||e.srclang)&&(n.srclang=e.language||e.srclang),e.default&&(n.default=e.default),e.id&&(n.id=e.id),e.src&&(n.src=e.src),n}addRemoteTextTrack(e,n){let i=super.addRemoteTextTrack(e,n);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){let n=this.$$("track"),i=n.length;for(;i--;)(e===n[i]||e===n[i].track)&&this.el().removeChild(n[i])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();let e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),di.default.performance&&(e.creationTime=di.default.performance.now()),e}};HJ(zs,"TEST_VID",function(){if(!HP())return;let t=Cr.default.createElement("video"),e=Cr.default.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",t.appendChild(e),t});zs.isSupported=function(){try{zs.TEST_VID.volume=.5}catch{return!1}return!!(zs.TEST_VID&&zs.TEST_VID.canPlayType)};zs.canPlayType=function(t){return zs.TEST_VID.canPlayType(t)};zs.canPlaySource=function(t,e){return zs.canPlayType(t.type)};zs.canControlVolume=function(){try{let t=zs.TEST_VID.volume;zs.TEST_VID.volume=t/2+.1;let e=t!==zs.TEST_VID.volume;return e&&kg?(di.default.setTimeout(()=>{zs&&zs.prototype&&(zs.prototype.featuresVolumeControl=t!==zs.TEST_VID.volume)}),!1):e}catch{return!1}};zs.canMuteVolume=function(){try{let t=zs.TEST_VID.muted;return zs.TEST_VID.muted=!t,zs.TEST_VID.muted?FP(zs.TEST_VID,"muted","muted"):KJ(zs.TEST_VID,"muted","muted"),t!==zs.TEST_VID.muted}catch{return!1}};zs.canControlPlaybackRate=function(){if(G5&&W5&&GJ<58)return!1;try{let t=zs.TEST_VID.playbackRate;return zs.TEST_VID.playbackRate=t/2+.1,t!==zs.TEST_VID.playbackRate}catch{return!1}};zs.canOverrideAttributes=function(){try{let t=()=>{};Object.defineProperty(Cr.default.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(Cr.default.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(Cr.default.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(Cr.default.createElement("audio"),"innerHTML",{get:t,set:t})}catch{return!1}return!0};zs.supportsNativeTextTracks=function(){return jJ||kg&&W5};zs.supportsNativeVideoTracks=function(){return!!(zs.TEST_VID&&zs.TEST_VID.videoTracks)};zs.supportsNativeAudioTracks=function(){return!!(zs.TEST_VID&&zs.TEST_VID.audioTracks)};zs.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([t,e]){HJ(zs.prototype,t,()=>zs[e](),!0)});zs.prototype.featuresVolumeControl=zs.canControlVolume();zs.prototype.movingMediaElementInDOM=!kg;zs.prototype.featuresFullscreenResize=!0;zs.prototype.featuresProgressEvents=!0;zs.prototype.featuresTimeupdateEvents=!0;zs.prototype.featuresVideoFrameCallback=!!(zs.TEST_VID&&zs.TEST_VID.requestVideoFrameCallback);zs.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),typeof t.load=="function"&&function(){try{t.load()}catch{}}()}};zs.resetMediaElement=function(t){if(!t)return;let e=t.querySelectorAll("source"),n=e.length;for(;n--;)t.removeChild(e[n]);t.removeAttribute("src"),typeof t.load=="function"&&function(){try{t.load()}catch{}}()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){zs.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){zs.prototype["set"+rm(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(t){zs.prototype[t]=function(){return this.el_[t]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(t){zs.prototype["set"+rm(t)]=function(e){this.el_[t]=e}});["pause","load","play"].forEach(function(t){zs.prototype[t]=function(){return this.el_[t]()}});ou.withSourceHandlers(zs);zs.nativeSourceHandler={};zs.nativeSourceHandler.canPlayType=function(t){try{return zs.TEST_VID.canPlayType(t)}catch{return""}};zs.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return zs.nativeSourceHandler.canPlayType(t.type);if(t.src){let n=L_e(t.src);return zs.nativeSourceHandler.canPlayType(`video/${n}`)}return""};zs.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)};zs.nativeSourceHandler.dispose=function(){};zs.registerSourceHandler(zs.nativeSourceHandler);ou.registerTech("Html5",zs);fXe=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Sye={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},o_e=["tiny","xsmall","small","medium","large","xlarge","huge"],VQ={};o_e.forEach(t=>{let e=t.charAt(0)==="x"?`x-${t.substring(1)}`:t;VQ[t]=`vjs-layout-${e}`});Vci={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},km=class t extends In{constructor(e,n,i){if(e.id=e.id||n.id||`vjs_video_${d6()}`,n=Object.assign(t.getTagSettings(e),n),n.initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language){let o=e.closest("[lang]");o&&(n.language=o.getAttribute("lang"))}if(super(null,n,i),this.boundDocumentFullscreenChange_=o=>this.documentFullscreenChange_(o),this.boundFullWindowOnEscKey_=o=>this.fullWindowOnEscKey(o),this.boundUpdateStyleEl_=o=>this.updateStyleEl_(o),this.boundApplyInitTime_=o=>this.applyInitTime_(o),this.boundUpdateCurrentBreakpoint_=o=>this.updateCurrentBreakpoint_(o),this.boundHandleTechClick_=o=>this.handleTechClick_(o),this.boundHandleTechDoubleClick_=o=>this.handleTechDoubleClick_(o),this.boundHandleTechTouchStart_=o=>this.handleTechTouchStart_(o),this.boundHandleTechTouchMove_=o=>this.handleTechTouchMove_(o),this.boundHandleTechTouchEnd_=o=>this.handleTechTouchEnd_(o),this.boundHandleTechTap_=o=>this.handleTechTap_(o),this.boundUpdatePlayerHeightOnAudioOnlyMode_=o=>this.updatePlayerHeightOnAudioOnlyMode_(o),this.isFullscreen_=!1,this.log=AZe(this.id_),this.fsApi_=zQ,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&j7(e),this.language(this.options_.language),n.languages){let o={};Object.getOwnPropertyNames(n.languages).forEach(function(a){o[a.toLowerCase()]=n.languages[a]}),this.languages_=o}else this.languages_=t.prototype.options_.languages;this.resetCache_(),this.poster_=n.poster||"",this.controls_=!!n.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),n.plugins&&Object.keys(n.plugins).forEach(o=>{if(typeof this[o]!="function")throw new Error(`plugin "${o}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),P_e(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(R4(Cr.default,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);let r=zu(this.options_);if(n.plugins&&Object.keys(n.plugins).forEach(o=>{this[o](n.plugins[o])}),n.debug&&this.debug(!0),this.options_.playerOptions=r,this.middleware_=[],this.playbackRates(n.playbackRates),n.experimentalSvgIcons){let a=new di.default.DOMParser().parseFromString(Sci,"image/svg+xml");if(a.querySelector("parsererror"))uc.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{let c=a.documentElement;c.style.display="none",this.el_.appendChild(c),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),n.spatialNavigation&&n.spatialNavigation.enabled&&(this.spatialNavigation=new Gye(this),this.addClass("vjs-spatial-navigation-enabled")),lH&&this.addClass("vjs-touch-enabled"),kg||this.addClass("vjs-workinghover"),t.players[this.id_]=this;let s=Iye.split(".")[0];this.addClass(`vjs-v${s}`),this.userActive(!0),this.reportUserActivity(),this.one("play",o=>this.listenForUserActivity_(o)),this.on("keydown",o=>this.handleKeyDown(o)),this.on("languagechange",o=>this.handleLanguagechange(o)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),_2(Cr.default,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),_2(Cr.default,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Cci(this),Eg.names.forEach(e=>{let n=Eg[e],i=this[n.getterName]();i&&i.off&&i.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,n,i=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),r=this.tag.tagName.toLowerCase()==="video-js";i?n=this.el_=e.parentNode:r||(n=this.el_=super.createEl("div"));let s=j7(e);if(r){for(n=this.el_=e,e=this.tag=Cr.default.createElement("video");n.children.length;)e.appendChild(n.firstChild);iH(n,"video-js")||VD(n,"video-js"),n.appendChild(e),i=this.playerElIngest_=n,Object.keys(n).forEach(l=>{try{e[l]=n[l]}catch{}})}e.setAttribute("tabindex","-1"),s.tabindex="-1",W5&&WJ&&(e.setAttribute("role","application"),s.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach(function(l){r&&l==="class"||n.setAttribute(l,s[l]),r&&e.setAttribute(l,s[l])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=n.player=this,this.addClass("vjs-paused");let o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(l=>BZe[l]).map(l=>"vjs-device-"+l.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...o),di.default.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=eXe("vjs-styles-dimensions");let l=Z7(".vjs-styles-defaults"),c=Z7("head");c.insertBefore(this.styleEl_,l?l.nextSibling:c.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);let a=e.getElementsByTagName("a");for(let l=0;l<a.length;l++){let c=a.item(l);VD(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!i&&e.parentNode.insertBefore(n,e),Rye(e,n),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=n,n}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){uc.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,n){let i=e+"_";if(n===void 0)return this[i]||0;if(n===""||n==="auto"){this[i]=void 0,this.updateStyleEl_();return}let r=parseFloat(n);if(isNaN(r)){uc.error(`Improper value "${n}" supplied for for ${e}`);return}this[i]=r,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Ix(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),Jli(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(di.default.VIDEOJS_NO_DYNAMIC_STYLE===!0){let a=typeof this.width_=="number"?this.width_:this.options_.width,l=typeof this.height_=="number"?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();c&&(a>=0&&(c.width=a),l>=0&&(c.height=l));return}let e,n,i,r;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?i=this.aspectRatio_:this.videoWidth()>0?i=this.videoWidth()+":"+this.videoHeight():i="16:9";let s=i.split(":"),o=s[1]/s[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/o:e=this.videoWidth()||300,this.height_!==void 0?n=this.height_:n=e*o,/^[^a-zA-Z]/.test(this.id())?r="dimensions-"+this.id():r=this.id()+"-dimensions",this.addClass(r),tXe(this.styleEl_,`
      .${r} {
        width: ${e}px;
        height: ${n}px;
      }

      .${r}.vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: ${o*100}%;
      }
    `)}loadTech_(e,n){this.tech_&&this.unloadTech_();let i=rm(e),r=e.charAt(0).toLowerCase()+e.slice(1);i!=="Html5"&&this.tag&&(ou.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let s=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(s=!1);let o={source:n,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${r}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Eg.names.forEach(l=>{let c=Eg[l];o[c.getterName]=this[c.privateName]}),Object.assign(o,this.options_[i]),Object.assign(o,this.options_[r]),Object.assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),n&&n.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);let a=ou.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);this.tech_=new a(o),this.tech_.ready(nh(this,this.handleTechReady_),!0),Vqe.jsonToTextTracks(this.textTracksJson_||[],this.tech_),fXe.forEach(l=>{this.on(this.tech_,l,c=>this[`handleTech${rm(l)}_`](c))}),Object.keys(Sye).forEach(l=>{this.on(this.tech_,l,c=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${Sye[l]}_`].bind(this),event:c});return}this[`handleTech${Sye[l]}_`](c)})}),this.on(this.tech_,"loadstart",l=>this.handleTechLoadStart_(l)),this.on(this.tech_,"sourceset",l=>this.handleTechSourceset_(l)),this.on(this.tech_,"waiting",l=>this.handleTechWaiting_(l)),this.on(this.tech_,"ended",l=>this.handleTechEnded_(l)),this.on(this.tech_,"seeking",l=>this.handleTechSeeking_(l)),this.on(this.tech_,"play",l=>this.handleTechPlay_(l)),this.on(this.tech_,"pause",l=>this.handleTechPause_(l)),this.on(this.tech_,"durationchange",l=>this.handleTechDurationChange_(l)),this.on(this.tech_,"fullscreenchange",(l,c)=>this.handleTechFullscreenChange_(l,c)),this.on(this.tech_,"fullscreenerror",(l,c)=>this.handleTechFullscreenError_(l,c)),this.on(this.tech_,"enterpictureinpicture",l=>this.handleTechEnterPictureInPicture_(l)),this.on(this.tech_,"leavepictureinpicture",l=>this.handleTechLeavePictureInPicture_(l)),this.on(this.tech_,"error",l=>this.handleTechError_(l)),this.on(this.tech_,"posterchange",l=>this.handleTechPosterChange_(l)),this.on(this.tech_,"textdata",l=>this.handleTechTextData_(l)),this.on(this.tech_,"ratechange",l=>this.handleTechRateChange_(l)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(i!=="Html5"||!this.tag)&&Rye(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Eg.names.forEach(e=>{let n=Eg[e];this[n.privateName]=this[n.getterName]()}),this.textTracksJson_=Vqe.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&uc.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
See https://github.com/videojs/video.js/issues/2617 for more info.
`),this.tech_}version(){return{"video.js":Iye}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;let n=()=>{let r=this.muted();this.muted(!0);let s=()=>{this.muted(r)};this.playTerminatedQueue_.push(s);let o=this.play();if(rH(o))return o.catch(a=>{throw s(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${a||""}`)})},i;if(e==="any"&&!this.muted()?(i=this.play(),rH(i)&&(i=i.catch(n))):e==="muted"&&!this.muted()?i=n():i=this.play(),!!rH(i))return i.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let n=e,i="";typeof n!="string"&&(n=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],n&&!i&&(i=wci(this,n)),this.cache_.source=zu({},e,{src:n,type:i});let r=this.cache_.sources.filter(l=>l.src&&l.src===n),s=[],o=this.$$("source"),a=[];for(let l=0;l<o.length;l++){let c=j7(o[l]);s.push(c),c.src&&c.src===n&&a.push(c.src)}a.length&&!r.length?this.cache_.sources=s:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=n}handleTechSourceset_(e){if(!this.changingSrc_){let n=s=>this.updateSourceCaches_(s),i=this.currentSource().src,r=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(n=()=>{}),n(r),e.src||this.tech_.any(["sourceset","loadstart"],s=>{if(s.type==="sourceset")return;let o=this.techGet_("currentSrc");this.lastSource_.tech=o,this.updateSourceCaches_(o)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");let e=this.currentTime(),n=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",n))};this.on("timeupdate",n)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?N5(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),i=>i.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){let n=e.target.player;if(n&&n!==this)return;let i=this.el(),r=Cr.default[this.fsApi_.fullscreenElement]===i;!r&&i.matches&&(r=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}handleTechFullscreenChange_(e,n){n&&(n.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(n.isFullscreen))}handleTechFullscreenError_(e,n){this.trigger("fullscreenerror",n)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){let e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,n){this.ready(function(){if(e in yci)return gci(this.middleware_,this.tech_,e,n);if(e in Wqe)return Gqe(this.middleware_,this.tech_,e,n);try{this.tech_&&this.tech_[e](n)}catch(i){throw uc(i),i}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in vci)return fci(this.middleware_,this.tech_,e);if(e in Wqe)return Gqe(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(n){throw this.tech_[e]===void 0?(uc(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,n),n):n.name==="TypeError"?(uc(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,n),this.tech_.isReady_=!1,n):(uc(n),n)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=N5){this.playCallbacks_.push(e);let n=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),i=!!(jJ||kg);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n){this.waitToPlay_=o=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!n&&i&&this.load();return}let r=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),r===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)}runPlayTerminatedQueue_(){let e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(n){n()})}runPlayCallbacks_(e){let n=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],n.forEach(function(i){i(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||t_(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=t_(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=t_(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return dXe(this.buffered(),this.duration())}bufferedEnd(){let e=this.buffered(),n=this.duration(),i=e.end(e.length-1);return i>n&&(i=n),i}volume(e){let n;if(e!==void 0){n=Math.max(0,Math.min(1,e)),this.cache_.volume=n,this.techCall_("setVolume",n),n>0&&this.lastVolume_(n);return}return n=parseFloat(this.techGet_("volume")),isNaN(n)?1:n}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){let n=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==n&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();let n=this;return new Promise((i,r)=>{function s(){n.off("fullscreenerror",a),n.off("fullscreenchange",o)}function o(){s(),i()}function a(c,d){s(),r(d)}n.one("fullscreenchange",o),n.one("fullscreenerror",a);let l=n.requestFullscreenHelper_(e);l&&(l.then(s,s),l.then(i,r))})}requestFullscreenHelper_(e){let n;if(this.fsApi_.prefixed||(n=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(n=e)),this.fsApi_.requestFullscreen){let i=this.el_[this.fsApi_.requestFullscreen](n);return i&&i.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),i}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){let e=this;return new Promise((n,i)=>{function r(){e.off("fullscreenerror",o),e.off("fullscreenchange",s)}function s(){r(),n()}function o(l,c){r(),i(c)}e.one("fullscreenchange",s),e.one("fullscreenerror",o);let a=e.exitFullscreenHelper_();a&&(a.then(r,r),a.then(n,i))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){let e=Cr.default[this.fsApi_.exitFullscreen]();return e&&N5(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Cr.default.documentElement.style.overflow,R4(Cr.default,"keydown",this.boundFullWindowOnEscKey_),Cr.default.documentElement.style.overflow="hidden",VD(Cr.default.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,_2(Cr.default,"keydown",this.boundFullWindowOnEscKey_),Cr.default.documentElement.style.overflow=this.docOrigOverflow,$J(Cr.default.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&di.default.documentPictureInPicture){let e=Cr.default.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(ga("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),di.default.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(n=>(XZe(n),this.el_.parentNode.insertBefore(e,this.el_),n.document.body.appendChild(this.el_),n.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:n}),n.addEventListener("pagehide",i=>{let r=i.target.querySelector(".video-js");e.parentNode.replaceChild(r,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),n))}return"pictureInPictureEnabled"in Cr.default&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(di.default.documentPictureInPicture&&di.default.documentPictureInPicture.window)return di.default.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in Cr.default)return Cr.default.exitPictureInPicture()}handleKeyDown(e){let{userActions:n}=this.options_;!n||!n.hotkeys||(r=>{let s=r.tagName.toLowerCase();if(r.isContentEditable)return!0;let o=["button","checkbox","hidden","radio","reset","submit"];return s==="input"?o.indexOf(r.type)===-1:["textarea"].indexOf(s)!==-1})(this.el_.ownerDocument.activeElement)||(typeof n.hotkeys=="function"?n.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){let n=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=o=>e.key.toLowerCase()==="f",muteKey:r=o=>e.key.toLowerCase()==="m",playPauseKey:s=o=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=n;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();let o=In.getComponent("FullscreenToggle");Cr.default[this.fsApi_.fullscreenEnabled]!==!1&&o.prototype.handleClick.call(this,e)}else r.call(this,e)?(e.preventDefault(),e.stopPropagation(),In.getComponent("MuteToggle").prototype.handleClick.call(this,e)):s.call(this,e)&&(e.preventDefault(),e.stopPropagation(),In.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let n;for(let i=0,r=this.options_.techOrder;i<r.length;i++){let s=r[i],o=ou.getTech(s);if(o||(o=In.getComponent(s)),!o){uc.error(`The "${s}" tech is undefined. Skipped browser support check for that tech.`);continue}if(o.isSupported()&&(n=o.canPlayType(e),n))return n}return""}selectSource(e){let n=this.options_.techOrder.map(a=>[a,ou.getTech(a)]).filter(([a,l])=>l?l.isSupported():(uc.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`),!1)),i=function(a,l,c){let d;return a.some(u=>l.some(m=>{if(d=c(u,m),d)return!0})),d},r,s=a=>(l,c)=>a(c,l),o=([a,l],c)=>{if(l.canPlaySource(c,this.options_[a.toLowerCase()]))return{source:c,tech:a}};return this.options_.sourceOrder?r=i(e,n,s(o)):r=i(n,e,o),r||!1}handleSrc_(e,n){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();let i=hXe(e);if(!i.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,n||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),pci(this,i[0],(r,s)=>{if(this.middleware_=s,n||(this.cache_.sources=i),this.updateSourceCaches_(r),this.src_(r)){if(i.length>1)return this.handleSrc_(i.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}mci(s,this.tech_)}),i.length>1){let r=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},s=()=>{this.off("error",r)};this.one("error",r),this.one("playing",s),this.resetRetryOnError_=()=>{this.off("error",r),this.off("playing",s)}}}src(e){return this.handleSrc_(e,!1)}src_(e){let n=this.selectSource([e]);return n?oXe(n.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(n.tech,n.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{let e=this.play();N5(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Ix(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);let{currentTimeDisplay:e,durationDisplay:n,progressControl:i,remainingTimeDisplay:r}=this.controlBar||{},{seekBar:s}=i||{};e&&e.updateContent(),n&&n.updateContent(),r&&r.updateContent(),s&&(s.update(),s.loadProgressBar&&s.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){let e=this.currentSource(),n=[];return Object.keys(e).length!==0&&n.push(e),this.cache_.sources||n}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let n;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),n=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,n=typeof n>"u"?this.options_.autoplay:n,this.tech_&&this.techCall_("setAutoplay",n)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){let e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(q7("beforeerror").forEach(n=>{let i=n(this,e);if(!(H5(i)&&!Array.isArray(i)||typeof i=="string"||typeof i=="number"||i===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=i}),this.options_.suppressNotSupportedError&&e&&e.code===4){let n=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),this.one("loadstart",function(){this.off(["click","touchstart"],n)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new Op(e),this.addClass("vjs-error"),uc.error(`(CODE:${this.error_.code} ${Op.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),q7("error").forEach(n=>n(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(n){n.stopPropagation(),n.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,n,i,r=nh(this,this.reportUserActivity),s=function(u){(u.screenX!==n||u.screenY!==i)&&(n=u.screenX,i=u.screenY,r())},o=function(){r(),this.clearInterval(e),e=this.setInterval(r,250)},a=function(u){r(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",s),this.on("mouseup",a),this.on("mouseleave",a);let l=this.getChild("controlBar");l&&!kg&&!G5&&(l.on("mouseenter",function(u){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),l.on("mouseleave",function(u){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",r),this.on("keyup",r);let c,d=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(c);let u=this.options_.inactivityTimeout;u<=0||(c=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},u))};this.setInterval(d,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){let e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");let e=this.children(),n=this.getChild("ControlBar"),i=n&&n.currentHeight();e.forEach(r=>{r!==n&&r.el_&&!r.hasClass("vjs-hidden")&&(r.hide(),this.audioOnlyCache_.hiddenChildren.push(r))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){let n=[];return this.isInPictureInPicture()&&n.push(this.exitPictureInPicture()),this.isFullscreen()&&n.push(this.exitFullscreen()),this.audioPosterMode()&&n.push(this.audioPosterMode(!1)),Promise.all(n).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,n,i){if(this.tech_)return this.tech_.addTextTrack(e,n,i)}addRemoteTextTrack(e,n){if(this.tech_)return this.tech_.addRemoteTextTrack(e,n)}removeRemoteTextTrack(e={}){let{track:n}=e;if(n||(n=e),this.tech_)return this.tech_.removeRemoteTextTrack(n)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Ix(this)&&this.trigger("languagechange"))}languages(){return zu(t.prototype.options_.languages,this.languages_)}toJSON(){let e=zu(this.options_),n=e.tracks;e.tracks=[];for(let i=0;i<n.length;i++){let r=n[i];r=zu(r),r.player=void 0,e.tracks[i]=r}return e}createModal(e,n){n=n||{},n.content=e||"";let i=new X7(this,n);return this.addChild(i),i.on("dispose",()=>{this.removeChild(i)}),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;let e=this.currentBreakpoint(),n=this.currentWidth();for(let i=0;i<o_e.length;i++){let r=o_e[i],s=this.breakpoints_[r];if(n<=s){if(e===r)return;e&&this.removeClass(VQ[e]),this.addClass(VQ[r]),this.breakpoint_=r;break}}}removeCurrentBreakpoint_(){let e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},Vci,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;let n=this.responsive_;if(e!==n)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return VQ[this.breakpoint_]||""}loadMedia(e,n){if(!e||typeof e!="object")return;let i=this.crossOrigin();this.reset(),this.cache_.media=zu(e);let{artist:r,artwork:s,description:o,poster:a,src:l,textTracks:c,title:d}=this.cache_.media;!s&&a&&(this.cache_.media.artwork=[{src:a,type:QQ(a)}]),i&&this.crossOrigin(i),l&&this.src(l),a&&this.poster(a),Array.isArray(c)&&c.forEach(u=>this.addRemoteTextTrack(u,!1)),this.titleBar&&this.titleBar.update({title:d,description:o||r||""}),this.ready(n)}getMedia(){if(!this.cache_.media){let e=this.poster(),n=this.currentSources(),i=Array.prototype.map.call(this.remoteTextTracks(),s=>({kind:s.kind,label:s.label,language:s.language,src:s.src})),r={src:n,textTracks:i};return e&&(r.poster=e,r.artwork=[{src:r.poster,type:QQ(r.poster)}]),r}return zu(this.cache_.media)}static getTagSettings(e){let n={sources:[],tracks:[]},i=j7(e),r=i["data-setup"];if(iH(e,"vjs-fill")&&(i.fill=!0),iH(e,"vjs-fluid")&&(i.fluid=!0),r!==null){let[s,o]=(0,MZe.default)(r||"{}");s&&uc.error(s),Object.assign(i,o)}if(Object.assign(n,i),e.hasChildNodes()){let s=e.childNodes;for(let o=0,a=s.length;o<a;o++){let l=s[o],c=l.nodeName.toLowerCase();c==="source"?n.sources.push(j7(l)):c==="track"&&n.tracks.push(j7(l))}}return n}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(n=>typeof n=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}};Eg.names.forEach(function(t){let e=Eg[t];km.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});km.prototype.crossorigin=km.prototype.crossOrigin;km.players={};Qz=di.default.navigator;km.prototype.options_={techOrder:ou.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Qz&&(Qz.languages&&Qz.languages[0]||Qz.userLanguage||Qz.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1};fXe.forEach(function(t){km.prototype[`handleTech${rm(t)}_`]=function(){return this.trigger(t)}});In.registerComponent("Player",km);BQ="plugin",kP="activePlugins_",SP={},DJ=t=>SP.hasOwnProperty(t),RQ=t=>DJ(t)?SP[t]:void 0,gXe=(t,e)=>{t[kP]=t[kP]||{},t[kP][e]=!0},EJ=(t,e,n)=>{let i=(n?"before":"")+"pluginsetup";t.trigger(i,e),t.trigger(i+":"+e.name,e)},Bci=function(t,e){let n=function(){EJ(this,{name:t,plugin:e,instance:null},!0);let i=e.apply(this,arguments);return gXe(this,t),EJ(this,{name:t,plugin:e,instance:i}),i};return Object.keys(e).forEach(function(i){n[i]=e[i]}),n},oZe=(t,e)=>(e.prototype.name=t,function(...n){EJ(this,{name:t,plugin:e,instance:null},!0);let i=new e(this,...n);return this[t]=()=>i,EJ(this,i.getEventHash()),i}),iw=(()=>{class t{constructor(n){if(this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=n,this.log||(this.log=this.player.log.createLogger(this.name)),P_e(this),delete this.trigger,sXe(this,this.constructor.defaultState),gXe(n,this.name),this.dispose=this.dispose.bind(this),n.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(n={}){return n.name=this.name,n.plugin=this.constructor,n.instance=this,n}trigger(n,i={}){return WP(this.eventBusEl_,n,this.getEventHash(i))}handleStateChanged(n){}dispose(){let{name:n,player:i}=this;this.trigger("dispose"),this.off(),i.off("dispose",this.dispose),i[kP][n]=!1,this.player=this.state=null,i[n]=oZe(n,SP[n])}static isBasic(n){let i=typeof n=="string"?RQ(n):n;return typeof i=="function"&&!t.prototype.isPrototypeOf(i.prototype)}static registerPlugin(n,i){if(typeof n!="string")throw new Error(`Illegal plugin name, "${n}", must be a string, was ${typeof n}.`);if(DJ(n))uc.warn(`A plugin named "${n}" already exists. You may want to avoid re-registering plugins!`);else if(km.prototype.hasOwnProperty(n))throw new Error(`Illegal plugin name, "${n}", cannot share a name with an existing player method!`);if(typeof i!="function")throw new Error(`Illegal plugin for "${n}", must be a function, was ${typeof i}.`);return SP[n]=i,n!==BQ&&(t.isBasic(i)?km.prototype[n]=Bci(n,i):km.prototype[n]=oZe(n,i)),i}static deregisterPlugin(n){if(n===BQ)throw new Error("Cannot de-register base plugin.");DJ(n)&&(delete SP[n],delete km.prototype[n])}static getPlugins(n=Object.keys(SP)){let i;return n.forEach(r=>{let s=RQ(r);s&&(i=i||{},i[r]=s)}),i}static getPluginVersion(n){let i=RQ(n);return i&&i.VERSION||""}}return t.getPlugin=RQ,t.BASE_PLUGIN_NAME=BQ,t})();iw.registerPlugin(BQ,iw);km.prototype.usingPlugin=function(t){return!!this[kP]&&this[kP][t]===!0};km.prototype.hasPlugin=function(t){return!!DJ(t)};Hci={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"},vXe=t=>t.indexOf("#")===0?t.slice(1):t;Vi.hooks_=Mx;Vi.hooks=q7;Vi.hook=Bli;Vi.hookOnce=zli;Vi.removeHook=IZe;if(di.default.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&HP()){let t=Z7(".vjs-styles-defaults");if(!t){t=eXe("vjs-styles-defaults");let e=Z7("head");e&&e.insertBefore(t,e.firstChild),tXe(t,`
      .video-js {
        width: 300px;
        height: 150px;
      }

      .vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: 56.25%
      }
    `)}}Lye(1,Vi);Vi.VERSION=Iye;Vi.options=km.prototype.options_;Vi.getPlayers=()=>km.players;Vi.getPlayer=t=>{let e=km.players,n;if(typeof t=="string"){let i=vXe(t),r=e[i];if(r)return r;n=Z7("#"+i)}else n=t;if(GP(n)){let{player:i,playerId:r}=n;if(i||e[r])return i||e[r]}};Vi.getAllPlayers=()=>Object.keys(km.players).map(t=>km.players[t]).filter(Boolean);Vi.players=km.players;Vi.getComponent=In.getComponent;Vi.registerComponent=(t,e)=>(ou.isTech(e)&&uc.warn(`The ${t} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),In.registerComponent.call(In,t,e));Vi.getTech=ou.getTech;Vi.registerTech=ou.registerTech;Vi.use=hci;Object.defineProperty(Vi,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(Vi.middleware,"TERMINATOR",{value:XQ,writeable:!1,enumerable:!0});Vi.browser=BZe;Vi.obj=Wli;Vi.mergeOptions=i_(9,"videojs.mergeOptions","videojs.obj.merge",zu);Vi.defineLazyProperty=i_(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",HJ);Vi.bind=i_(9,"videojs.bind","native Function.prototype.bind",nh);Vi.registerPlugin=iw.registerPlugin;Vi.deregisterPlugin=iw.deregisterPlugin;Vi.plugin=(t,e)=>(uc.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),iw.registerPlugin(t,e));Vi.getPlugins=iw.getPlugins;Vi.getPlugin=iw.getPlugin;Vi.getPluginVersion=iw.getPluginVersion;Vi.addLanguage=function(t,e){return t=(""+t).toLowerCase(),Vi.options.languages=zu(Vi.options.languages,{[t]:e}),Vi.options.languages[t]};Vi.log=uc;Vi.createLogger=AZe;Vi.time=rci;Vi.createTimeRange=i_(9,"videojs.createTimeRange","videojs.time.createTimeRanges",t_);Vi.createTimeRanges=i_(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",t_);Vi.formatTime=i_(9,"videojs.formatTime","videojs.time.formatTime",HD);Vi.setFormatTime=i_(9,"videojs.setFormatTime","videojs.time.setFormatTime",lXe);Vi.resetFormatTime=i_(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",cXe);Vi.parseUrl=i_(9,"videojs.parseUrl","videojs.url.parseUrl",F_e);Vi.isCrossOrigin=i_(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",JJ);Vi.EventTarget=Ig;Vi.any=A_e;Vi.on=R4;Vi.one=XJ;Vi.off=_2;Vi.trigger=WP;Vi.xhr=D_e.default;Vi.TextTrack=GD;Vi.AudioTrack=YQ;Vi.VideoTrack=qQ;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(t=>{Vi[t]=function(){return uc.warn(`videojs.${t}() is deprecated; use videojs.dom.${t}() instead`),QZe[t].apply(null,arguments)}});Vi.computedStyle=i_(9,"videojs.computedStyle","videojs.dom.computedStyle",OP);Vi.dom=QZe;Vi.fn=Qli;Vi.num=Dci;Vi.str=ici;Vi.url=dci;Vi.Error=Hci;a_e=class{constructor(e){let n=this;return n.id=e.id,n.label=n.id,n.width=e.width,n.height=e.height,n.bitrate=e.bandwidth,n.frameRate=e.frameRate,n.enabled_=e.enabled,Object.defineProperty(n,"enabled",{get(){return n.enabled_()},set(i){n.enabled_(i)}}),n}},zP=class extends Vi.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let n=this.getQualityLevelById(e.id);if(n)return n;let i=this.levels_.length;return n=new a_e(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(n),this.trigger({qualityLevel:n,type:"addqualitylevel"}),n}removeQualityLevel(e){let n=null;for(let i=0,r=this.length;i<r;i++)if(this[i]===e){n=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return n&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),n}getQualityLevelById(e){for(let n=0,i=this.length;n<i;n++){let r=this[n];if(r.id===e)return r}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}};zP.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(let t in zP.prototype.allowedEvents_)zP.prototype["on"+t]=null;yXe="4.1.0",Gci=function(t,e){let n=t.qualityLevels,i=new zP,r=function(){i.dispose(),t.qualityLevels=n,t.off("dispose",r)};return t.on("dispose",r),t.qualityLevels=()=>i,t.qualityLevels.VERSION=yXe,i},_Xe=function(t){return Gci(this,Vi.obj.merge({},t))};Vi.registerPlugin("qualityLevels",_Xe);_Xe.VERSION=yXe;_3=aP,MJ=(t,e)=>e&&e.responseURL&&t!==e.responseURL?e.responseURL:t,h6=t=>Vi.log.debug?Vi.log.debug.bind(Vi,"VHS:",`${t} >`):function(){};V5=1/30,B5=V5*3,CXe=function(t,e){let n=[],i;if(t&&t.length)for(i=0;i<t.length;i++)e(t.start(i),t.end(i))&&n.push([t.start(i),t.end(i)]);return L0(n)},TP=function(t,e){return CXe(t,function(n,i){return n-B5<=e&&i+B5>=e})},FQ=function(t,e){return CXe(t,function(n){return n-V5>=e})},Uci=function(t){if(t.length<2)return L0();let e=[];for(let n=1;n<t.length;n++){let i=t.end(n-1),r=t.start(n);e.push([i,r])}return L0(e)},jci=function(t,e){let n=null,i=null,r=0,s=[],o=[];if(!t||!t.length||!e||!e.length)return L0();let a=t.length;for(;a--;)s.push({time:t.start(a),type:"start"}),s.push({time:t.end(a),type:"end"});for(a=e.length;a--;)s.push({time:e.start(a),type:"start"}),s.push({time:e.end(a),type:"end"});for(s.sort(function(l,c){return l.time-c.time}),a=0;a<s.length;a++)s[a].type==="start"?(r++,r===2&&(n=s[a].time)):s[a].type==="end"&&(r--,r===1&&(i=s[a].time)),n!==null&&i!==null&&(o.push([n,i]),n=null,i=null);return L0(o)},xXe=t=>{let e=[];if(!t||!t.length)return"";for(let n=0;n<t.length;n++)e.push(t.start(n)+" => "+t.end(n));return e.join(", ")},$ci=function(t,e,n=1){return((t.length?t.end(t.length-1):0)-e)/n},ND=t=>{let e=[];for(let n=0;n<t.length;n++)e.push({start:t.start(n),end:t.end(n)});return e},Kci=function(t,e){if(t===e)return!1;if(!t&&e||!e&&t||t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(t.start(n)!==e.start(n)||t.end(n)!==e.end(n))return!0;return!1},Tye=function(t){if(!(!t||!t.length||!t.end))return t.end(t.length-1)},N_e=function(t,e){let n=0;if(!t||!t.length)return n;for(let i=0;i<t.length;i++){let r=t.start(i),s=t.end(i);if(!(e>s)){if(e>r&&e<=s){n+=s-e;continue}n+=s-r}}return n},V_e=(t,e)=>{if(!e.preload)return e.duration;let n=0;return(e.parts||[]).forEach(function(i){n+=i.duration}),(e.preloadHints||[]).forEach(function(i){i.type==="PART"&&(n+=t.partTargetDuration)}),n},l_e=t=>(t.segments||[]).reduce((e,n,i)=>(n.parts?n.parts.forEach(function(r,s){e.push({duration:r.duration,segmentIndex:i,partIndex:s,part:r,segment:n})}):e.push({duration:n.duration,segmentIndex:i,partIndex:null,segment:n,part:null}),e),[]),bXe=t=>{let e=t.segments&&t.segments.length&&t.segments[t.segments.length-1];return e&&e.parts||[]},wXe=({preloadSegment:t})=>{if(!t)return;let{parts:e,preloadHints:n}=t,i=(n||[]).reduce((r,s)=>r+(s.type==="PART"?1:0),0);return i+=e&&e.length?e.length:0,i},SXe=(t,e)=>{if(e.endList)return 0;if(t&&t.suggestedPresentationDelay)return t.suggestedPresentationDelay;let n=bXe(e).length>0;return n&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:n&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},Yci=function(t,e){let n=0,i=e-t.mediaSequence,r=t.segments[i];if(r){if(typeof r.start<"u")return{result:r.start,precise:!0};if(typeof r.end<"u")return{result:r.end-r.duration,precise:!0}}for(;i--;){if(r=t.segments[i],typeof r.end<"u")return{result:n+r.end,precise:!0};if(n+=V_e(t,r),typeof r.start<"u")return{result:n+r.start,precise:!0}}return{result:n,precise:!1}},qci=function(t,e){let n=0,i,r=e-t.mediaSequence;for(;r<t.segments.length;r++){if(i=t.segments[r],typeof i.start<"u")return{result:i.start-n,precise:!0};if(n+=V_e(t,i),typeof i.end<"u")return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}},TXe=function(t,e,n){if(typeof e>"u"&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence)return 0;let i=Yci(t,e);if(i.precise)return i.result;let r=qci(t,e);return r.precise?r.result:i.result+n},DXe=function(t,e,n){if(!t)return 0;if(typeof n!="number"&&(n=0),typeof e>"u"){if(t.totalDuration)return t.totalDuration;if(!t.endList)return di.default.Infinity}return TXe(t,e,n)},sH=function({defaultDuration:t,durationList:e,startIndex:n,endIndex:i}){let r=0;if(n>i&&([n,i]=[i,n]),n<0){for(let s=n;s<Math.min(0,i);s++)r+=t;n=0}for(let s=n;s<i;s++)r+=e[s].duration;return r},EXe=function(t,e,n,i){if(!t||!t.segments)return null;if(t.endList)return DXe(t);if(e===null)return null;e=e||0;let r=TXe(t,t.mediaSequence+t.segments.length,e);return n&&(i=typeof i=="number"?i:SXe(null,t),r-=i),Math.max(0,r)},Zci=function(t,e,n){let r=e||0,s=EXe(t,e,!0,n);return s===null?L0():(s<r&&(s=r),L0(r,s))},Xci=function({playlist:t,currentTime:e,startingSegmentIndex:n,startingPartIndex:i,startTime:r,exactManifestTimings:s}){let o=e-r,a=l_e(t),l=0;for(let c=0;c<a.length;c++){let d=a[c];if(n===d.segmentIndex&&!(typeof i=="number"&&typeof d.partIndex=="number"&&i!==d.partIndex)){l=c;break}}if(o<0){if(l>0)for(let c=l-1;c>=0;c--){let d=a[c];if(o+=d.duration,s){if(o<0)continue}else if(o+V5<=0)continue;return{partIndex:d.partIndex,segmentIndex:d.segmentIndex,startTime:r-sH({defaultDuration:t.targetDuration,durationList:a,startIndex:l,endIndex:c})}}return{partIndex:a[0]&&a[0].partIndex||null,segmentIndex:a[0]&&a[0].segmentIndex||0,startTime:e}}if(l<0){for(let c=l;c<0;c++)if(o-=t.targetDuration,o<0)return{partIndex:a[0]&&a[0].partIndex||null,segmentIndex:a[0]&&a[0].segmentIndex||0,startTime:e};l=0}for(let c=l;c<a.length;c++){let d=a[c];o-=d.duration;let u=d.duration>V5,m=o===0,f=u&&o+V5>=0;if(!((m||f)&&c!==a.length-1)){if(s){if(o>0)continue}else if(o-V5>=0)continue;return{partIndex:d.partIndex,segmentIndex:d.segmentIndex,startTime:r+sH({defaultDuration:t.targetDuration,durationList:a,startIndex:l,endIndex:c})}}}return{segmentIndex:a[a.length-1].segmentIndex,partIndex:a[a.length-1].partIndex,startTime:e}},MXe=function(t){return t.excludeUntil&&t.excludeUntil>Date.now()},B_e=function(t){return t.excludeUntil&&t.excludeUntil===1/0},eee=function(t){let e=MXe(t);return!t.disabled&&!e},Qci=function(t){return t.disabled},Jci=function(t){for(let e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1},kXe=function(t,e){return e.attributes&&e.attributes[t]},edi=function(t,e,n,i=0){return kXe("BANDWIDTH",n)?(t*n.attributes.BANDWIDTH-i*8)/e:NaN},c_e=(t,e)=>{if(t.playlists.length===1)return!0;let n=e.attributes.BANDWIDTH||Number.MAX_VALUE;return t.playlists.filter(i=>eee(i)?(i.attributes.BANDWIDTH||0)<n:!1).length===0},z_e=(t,e)=>!t&&!e||!t&&e||t&&!e?!1:!!(t===e||t.id&&e.id&&t.id===e.id||t.resolvedUri&&e.resolvedUri&&t.resolvedUri===e.resolvedUri||t.uri&&e.uri&&t.uri===e.uri),aZe=function(t,e){let n=t&&t.mediaGroups&&t.mediaGroups.AUDIO||{},i=!1;for(let r in n){for(let s in n[r])if(i=e(n[r][s]),i)break;if(i)break}return!!i},AH=t=>{if(!t||!t.playlists||!t.playlists.length)return aZe(t,n=>n.playlists&&n.playlists.length||n.uri);for(let e=0;e<t.playlists.length;e++){let n=t.playlists[e],i=n.attributes&&n.attributes.CODECS;if(!(i&&i.split(",").every(s=>I6e(s))||aZe(t,s=>z_e(n,s))))return!1}return!0},C3={liveEdgeDelay:SXe,duration:DXe,seekable:Zci,getMediaInfoForTime:Xci,isEnabled:eee,isDisabled:Qci,isExcluded:MXe,isIncompatible:B_e,playlistEnd:EXe,isAes:Jci,hasAttribute:kXe,estimateSegmentRequestTime:edi,isLowestEnabledRendition:c_e,isAudioOnly:AH,playlistMatch:z_e,segmentDurationWithParts:V_e},{log:IXe}=Vi,IP=(t,e)=>`${t}-${e}`,AXe=(t,e,n)=>`placeholder-uri-${t}-${e}-${n}`,tdi=({onwarn:t,oninfo:e,manifestString:n,customTagParsers:i=[],customTagMappers:r=[],llhls:s})=>{let o=new hQ;t&&o.on("warn",t),e&&o.on("info",e),i.forEach(c=>o.addParser(c)),r.forEach(c=>o.addTagMapper(c)),o.push(n),o.end();let a=o.manifest;if(s||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(c){a.hasOwnProperty(c)&&delete a[c]}),a.segments&&a.segments.forEach(function(c){["parts","preloadHints"].forEach(function(d){c.hasOwnProperty(d)&&delete c[d]})})),!a.targetDuration){let c=10;a.segments&&a.segments.length&&(c=a.segments.reduce((d,u)=>Math.max(d,u.duration),0)),t&&t({message:`manifest has no targetDuration defaulting to ${c}`}),a.targetDuration=c}let l=bXe(a);if(l.length&&!a.partTargetDuration){let c=l.reduce((d,u)=>Math.max(d,u.duration),0);t&&(t({message:`manifest has no partTargetDuration defaulting to ${c}`}),IXe.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),a.partTargetDuration=c}return a},UP=(t,e)=>{t.mediaGroups&&["AUDIO","SUBTITLES"].forEach(n=>{if(t.mediaGroups[n])for(let i in t.mediaGroups[n])for(let r in t.mediaGroups[n][i]){let s=t.mediaGroups[n][i][r];e(s,n,i,r)}})},PXe=({playlist:t,uri:e,id:n})=>{t.id=n,t.playlistErrors_=0,e&&(t.uri=e),t.attributes=t.attributes||{}},idi=t=>{let e=t.playlists.length;for(;e--;){let n=t.playlists[e];PXe({playlist:n,id:IP(e,n.uri)}),n.resolvedUri=_3(t.uri,n.uri),t.playlists[n.id]=n,t.playlists[n.uri]=n,n.attributes.BANDWIDTH||IXe.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},ndi=t=>{UP(t,e=>{e.uri&&(e.resolvedUri=_3(t.uri,e.uri))})},rdi=(t,e)=>{let n=IP(0,e),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:di.default.location.href,resolvedUri:di.default.location.href,playlists:[{uri:e,id:n,resolvedUri:e,attributes:{}}]};return i.playlists[n]=i.playlists[0],i.playlists[e]=i.playlists[0],i},RXe=(t,e,n=AXe)=>{t.uri=e;for(let r=0;r<t.playlists.length;r++)if(!t.playlists[r].uri){let s=`placeholder-uri-${r}`;t.playlists[r].uri=s}let i=AH(t);UP(t,(r,s,o,a)=>{if(!r.playlists||!r.playlists.length){if(i&&s==="AUDIO"&&!r.uri)for(let l=0;l<t.playlists.length;l++){let c=t.playlists[l];if(c.attributes&&c.attributes.AUDIO&&c.attributes.AUDIO===o)return}r.playlists=[Fp({},r)]}r.playlists.forEach(function(l,c){let d=n(s,o,a,l),u=IP(c,d);l.uri?l.resolvedUri=l.resolvedUri||_3(t.uri,l.uri):(l.uri=c===0?d:u,l.resolvedUri=l.uri),l.id=l.id||u,l.attributes=l.attributes||{},t.playlists[l.id]=l,t.playlists[l.uri]=l})}),idi(t),ndi(t)},kJ=class{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;let[n]=e;n.programDateTime!==void 0&&(this.offset_=n.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;let[n]=e,i=n.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce((r,s)=>(r.set(s.id,s),r),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];let e={},n=[];this.pendingDateRanges_.forEach((i,r)=>{if(!this.processedDateRanges_.has(r)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),n.push(i),!!i.class))if(e[i.class]){let s=e[i.class].push(i);i.classListIndex=s-1}else e[i.class]=[i],i.classListIndex=0});for(let i of n){let r=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&r[i.classListIndex+1]?i.endTime=r[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return n}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((i,r)=>{i.startDate.getTime()<e&&this.processedDateRanges_.delete(r)})}},FXe=22,zD=({requestType:t,request:e,error:n,parseFailure:i})=>{let r=e.status<200||e.status>299,s=e.status>=400&&e.status<=499,o={uri:e.uri,requestType:t},a=r&&!s||i;if(n&&s)o.error=Fp({},n),o.errorType=Vi.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=Vi.Error.NetworkRequestAborted;else if(e.timedout)o.erroType=Vi.Error.NetworkRequestTimeout;else if(a){let l=i?Vi.Error.NetworkBodyParserFailed:Vi.Error.NetworkBadStatus;o.errorType=l,o.status=e.status,o.headers=e.headers}return o},{EventTarget:sdi}=Vi,odi=(t,e)=>{if(e.endList||!e.serverControl)return t;let n={};if(e.serverControl.canBlockReload){let{preloadSegment:i}=e,r=e.mediaSequence+e.segments.length;if(i){let s=i.parts||[],o=wXe(e)-1;o>-1&&o!==s.length-1&&(n._HLS_part=o),(o>-1||s.length)&&r--}n._HLS_msn=r}if(e.serverControl&&e.serverControl.canSkipUntil&&(n._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){let i=new di.default.URL(t);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(r){n.hasOwnProperty(r)&&i.searchParams.set(r,n[r])}),t=i.toString()}return t},adi=(t,e)=>{if(!t)return e;let n=Wd(t,e);if(t.preloadHints&&!e.preloadHints&&delete n.preloadHints,t.parts&&!e.parts)delete n.parts;else if(t.parts&&e.parts)for(let i=0;i<e.parts.length;i++)t.parts&&t.parts[i]&&(n.parts[i]=Wd(t.parts[i],e.parts[i]));return!t.skipped&&e.skipped&&(n.skipped=!1),t.preload&&!e.preload&&(n.preload=!1),n},ldi=(t,e,n)=>{let i=t.slice(),r=e.slice();n=n||0;let s=[],o;for(let a=0;a<r.length;a++){let l=i[a+n],c=r[a];l?(o=l.map||o,s.push(adi(l,c))):(o&&!c.map&&(c.map=o),s.push(c))}return s},LXe=(t,e)=>{!t.resolvedUri&&t.uri&&(t.resolvedUri=_3(e,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=_3(e,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=_3(e,t.map.uri)),t.map&&t.map.key&&!t.map.key.resolvedUri&&(t.map.key.resolvedUri=_3(e,t.map.key.uri)),t.parts&&t.parts.length&&t.parts.forEach(n=>{n.resolvedUri||(n.resolvedUri=_3(e,n.uri))}),t.preloadHints&&t.preloadHints.length&&t.preloadHints.forEach(n=>{n.resolvedUri||(n.resolvedUri=_3(e,n.uri))})},OXe=function(t){let e=t.segments||[],n=t.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints){for(let i=0;i<n.preloadHints.length;i++)if(n.preloadHints[i].type==="MAP")return e}n.duration=t.targetDuration,n.preload=!0,e.push(n)}return e},NXe=(t,e)=>t===e||t.segments&&e.segments&&t.segments.length===e.segments.length&&t.endList===e.endList&&t.mediaSequence===e.mediaSequence&&t.preloadSegment===e.preloadSegment,d_e=(t,e,n=NXe)=>{let i=Wd(t,{}),r=i.playlists[e.id];if(!r||n(r,e))return null;e.segments=OXe(e);let s=Wd(r,e);if(s.preloadSegment&&!e.preloadSegment&&delete s.preloadSegment,r.segments){if(e.skip){e.segments=e.segments||[];for(let o=0;o<e.skip.skippedSegments;o++)e.segments.unshift({skipped:!0})}s.segments=ldi(r.segments,e.segments,e.mediaSequence-r.mediaSequence)}s.segments.forEach(o=>{LXe(o,s.resolvedUri)});for(let o=0;o<i.playlists.length;o++)i.playlists[o].id===e.id&&(i.playlists[o]=s);return i.playlists[e.id]=s,i.playlists[e.uri]=s,UP(t,(o,a,l,c)=>{if(o.playlists)for(let d=0;d<o.playlists.length;d++)e.id===o.playlists[d].id&&(o.playlists[d]=s)}),i},u_e=(t,e)=>{let n=t.segments||[],i=n[n.length-1],r=i&&i.parts&&i.parts[i.parts.length-1],s=r&&r.duration||i&&i.duration;return e&&s?s*1e3:(t.partTargetDuration||t.targetDuration||10)*500},lZe=(t,e,n)=>{if(!t)return;let i=[];return t.forEach(r=>{if(!r.attributes)return;let{BANDWIDTH:s,RESOLUTION:o,CODECS:a}=r.attributes;i.push({id:r.id,bandwidth:s,resolution:o,codecs:a})}),{type:e,isLive:n,renditions:i}},Y7=class extends sdi{constructor(e,n,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=h6("PlaylistLoader");let{withCredentials:r=!1}=i;this.src=e,this.vhs_=n,this.withCredentials=r,this.addDateRangesToTextTrack_=i.addDateRangesToTextTrack;let s=n.options_;this.customTagParsers=s&&s.customTagParsers||[],this.customTagMappers=s&&s.customTagMappers||[],this.llhls=s&&s.llhls,this.dateRangesStorage_=new kJ,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){let e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);let n=this.dateRangesStorage_.getDateRangesToProcess();!n.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(n)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;let e=this.media(),n=_3(this.main.uri,e.uri);this.llhls&&(n=odi(n,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,r)=>{if(this.request){if(i)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,n,i){let{uri:r,id:s}=n;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${r}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:zD({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:n}){try{return tdi({onwarn:({message:i})=>this.logger_(`m3u8-parser warn for ${e}: ${i}`),oninfo:({message:i})=>this.logger_(`m3u8-parser info for ${e}: ${i}`),manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}catch(i){this.error=i,this.error.metadata={errorType:Vi.Error.StreamingHlsPlaylistParserError,error:i}}}haveMetadata({playlistString:e,playlistObject:n,url:i,id:r}){this.request=null,this.state="HAVE_METADATA";let s={playlistInfo:{type:"media",uri:i}};this.trigger({type:"playlistparsestart",metadata:s});let o=n||this.parseManifest_({url:i,manifestString:e});o.lastRequest=Date.now(),PXe({playlist:o,uri:i,id:r});let a=d_e(this.main,o);this.targetDuration=o.partTargetDuration||o.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(u_e(this.media(),!!a)),s.parsedPlaylist=lZe(this.main.playlists,s.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:s}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),di.default.clearTimeout(this.mediaUpdateTimeout),di.default.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new kJ,this.off()}stopRequest(){if(this.request){let e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,n){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(di.default.clearTimeout(this.finalRenditionTimeout),n){let a=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=di.default.setTimeout(this.media.bind(this,e,!1),a);return}let i=this.state,r=!this.media_||e.id!==this.media_.id,s=this.main.playlists[e.id];if(s&&s.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,r&&(this.trigger("mediachanging"),i==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(u_e(e,!0)),!r)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;let o={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:o}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(a,l)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=MJ(e.resolvedUri,l),a)return this.playlistRequestError(this.request,e,i);this.trigger({type:"playlistrequestcomplete",metadata:o}),this.haveMetadata({playlistString:l.responseText,url:e.uri,id:e.id}),i==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(di.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(di.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);let n=this.media();if(e){let i=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=di.default.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},i);return}if(!this.started){this.start();return}n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(di.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=di.default.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=di.default.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}let e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(n,i)=>{if(!this.request)return;if(this.request=null,n)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:zD({requestType:i.requestType,request:i,error:n})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=MJ(this.src,i),this.trigger({type:"playlistparsestart",metadata:e});let r=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=lZe(r.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(r)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,RXe(this.main,this.srcUri()),e.playlists.forEach(i=>{i.segments=OXe(i),i.segments.forEach(r=>{LXe(r,i.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}let n=this.srcUri()||di.default.location.href;this.main=rdi(e,n),this.haveMetadata({playlistObject:e,url:n,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,n){let i=this.main,r=e.ID,s=i.playlists.length;for(;s--;){let o=i.playlists[s];if(o.attributes["PATHWAY-ID"]===r){let a=o.resolvedUri,l=o.id;if(n){let c=this.createCloneURI_(o.resolvedUri,e),d=IP(r,c),u=this.createCloneAttributes_(r,o.attributes),m=this.createClonePlaylist_(o,d,e,u);i.playlists[s]=m,i.playlists[d]=m,i.playlists[c]=m}else i.playlists.splice(s,1);delete i.playlists[l],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,n)}updateOrDeleteCloneMedia(e,n){let i=this.main,r=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{if(!(!i.mediaGroups[s]||!i.mediaGroups[s][r])){for(let o in i.mediaGroups[s])if(o===r){for(let a in i.mediaGroups[s][o])i.mediaGroups[s][o][a].playlists.forEach((c,d)=>{let u=i.playlists[c.id],m=u.id,f=u.resolvedUri;delete i.playlists[m],delete i.playlists[f]});delete i.mediaGroups[s][o]}}}),n&&this.createClonedMediaGroups_(e)}addClonePathway(e,n={}){let i=this.main,r=i.playlists.length,s=this.createCloneURI_(n.resolvedUri,e),o=IP(e.ID,s),a=this.createCloneAttributes_(e.ID,n.attributes),l=this.createClonePlaylist_(n,o,e,a);i.playlists[r]=l,i.playlists[o]=l,i.playlists[s]=l,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){let n=e.ID,i=e["BASE-ID"],r=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{if(!(!r.mediaGroups[s]||r.mediaGroups[s][n]))for(let o in r.mediaGroups[s]){if(o===i)r.mediaGroups[s][n]={};else continue;for(let a in r.mediaGroups[s][o]){let l=r.mediaGroups[s][o][a];r.mediaGroups[s][n][a]=Fp({},l);let c=r.mediaGroups[s][n][a],d=this.createCloneURI_(l.resolvedUri,e);c.resolvedUri=d,c.uri=d,c.playlists=[],l.playlists.forEach((u,m)=>{let f=r.playlists[u.id],_=AXe(s,n,a),x=IP(n,_);if(f&&!r.playlists[x]){let D=this.createClonePlaylist_(f,x,e),E=D.resolvedUri;r.playlists[x]=D,r.playlists[E]=D}c.playlists[m]=this.createClonePlaylist_(u,x,e)})}}})}createClonePlaylist_(e,n,i,r){let s=this.createCloneURI_(e.resolvedUri,i),o={resolvedUri:s,uri:s,id:n};return e.segments&&(o.segments=[]),r&&(o.attributes=r),Wd(e,o)}createCloneURI_(e,n){let i=new URL(e);i.hostname=n["URI-REPLACEMENT"].HOST;let r=n["URI-REPLACEMENT"].PARAMS;for(let s of Object.keys(r))i.searchParams.set(s,r[s]);return i.href}createCloneAttributes_(e,n){let i={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(r=>{n[r]&&(i[r]=e)}),i}getKeyIdSet(e){if(e.contentProtection){let n=new Set;for(let i in e.contentProtection){let r=e.contentProtection[i].attributes.keyId;r&&n.add(r.toLowerCase())}return n}}},h_e=function(t,e,n,i){let r=t.responseType==="arraybuffer"?t.response:t.responseText;!e&&r&&(t.responseTime=Date.now(),t.roundTripTime=t.responseTime-t.requestTime,t.bytesReceived=r.byteLength||r.length,t.bandwidth||(t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3))),n.headers&&(t.responseHeaders=n.headers),e&&e.code==="ETIMEDOUT"&&(t.timedout=!0),!e&&!t.aborted&&n.statusCode!==200&&n.statusCode!==206&&n.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(t&&(r||t.responseText)))),i(e,t)},cdi=(t,e)=>{if(!t||!t.size)return;let n=e;return t.forEach(i=>{n=i(n)}),n},ddi=(t,e,n,i)=>{!t||!t.size||t.forEach(r=>{r(e,n,i)})},VXe=function(){let t=function e(n,i){n=Wd({timeout:45e3},n);let r=e.beforeRequest||Vi.Vhs.xhr.beforeRequest,s=e._requestCallbackSet||Vi.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||Vi.Vhs.xhr._responseCallbackSet;r&&typeof r=="function"&&(Vi.log.warn("beforeRequest is deprecated, use onRequest instead."),s.add(r));let a=Vi.Vhs.xhr.original===!0?Vi.xhr:Vi.Vhs.xhr,l=cdi(s,n);s.delete(r);let c=a(l||n,function(u,m){return ddi(o,c,u,m),h_e(c,u,m,i)}),d=c.abort;return c.abort=function(){return c.aborted=!0,d.apply(c,arguments)},c.uri=n.uri,c.requestType=n.requestType,c.requestTime=Date.now(),c};return t.original=!0,t},udi=function(t){let e,n=t.offset;return typeof t.offset=="bigint"||typeof t.length=="bigint"?e=di.default.BigInt(t.offset)+di.default.BigInt(t.length)-di.default.BigInt(1):e=t.offset+t.length-1,"bytes="+n+"-"+e},p_e=function(t){let e={};return t.byterange&&(e.Range=udi(t.byterange)),e},hdi=function(t,e){return t.start(e)+"-"+t.end(e)},pdi=function(t,e){let n=t.toString(16);return"00".substring(0,2-n.length)+n+(e%2?" ":"")},mdi=function(t){return t>=32&&t<126?String.fromCharCode(t):"."},BXe=function(t){let e={};return Object.keys(t).forEach(n=>{let i=t[n];F6e(i)?e[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:e[n]=i}),e},IJ=function(t){let e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",")},zXe=function(t){return t.resolvedUri},HXe=t=>{let e=Array.prototype.slice.call(t),n=16,i="",r,s;for(let o=0;o<e.length/n;o++)r=e.slice(o*n,o*n+n).map(pdi).join(""),s=e.slice(o*n,o*n+n).map(mdi).join(""),i+=r+" "+s+`
`;return i},fdi=({bytes:t})=>HXe(t),gdi=t=>{let e="",n;for(n=0;n<t.length;n++)e+=hdi(t,n)+" ";return e},vdi=Object.freeze({__proto__:null,createTransferableMessage:BXe,initSegmentId:IJ,segmentKeyId:zXe,hexDump:HXe,tagDump:fdi,textRanges:gdi}),GXe=.25,ydi=(t,e)=>{if(!e.dateTimeObject)return null;let n=e.videoTimingInfo.transmuxerPrependedSeconds,r=e.videoTimingInfo.transmuxedPresentationStart+n,s=t-r;return new Date(e.dateTimeObject.getTime()+s*1e3)},_di=t=>t.transmuxedPresentationEnd-t.transmuxedPresentationStart-t.transmuxerPrependedSeconds,Cdi=(t,e)=>{let n;try{n=new Date(t)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let i=e.segments[0];if(n<new Date(i.dateTimeObject))return null;for(let l=0;l<e.segments.length-1;l++){i=e.segments[l];let c=new Date(e.segments[l+1].dateTimeObject);if(n<c)break}let r=e.segments[e.segments.length-1],s=r.dateTimeObject,o=r.videoTimingInfo?_di(r.videoTimingInfo):r.duration+r.duration*GXe,a=new Date(s.getTime()+o*1e3);return n>a?null:(n>new Date(s)&&(i=r),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:C3.duration(e,e.mediaSequence+e.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})},xdi=(t,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let n=0,i;for(let s=0;s<e.segments.length&&(i=e.segments[s],n=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration,!(t<=n));s++);let r=e.segments[e.segments.length-1];if(r.videoTimingInfo&&r.videoTimingInfo.transmuxedPresentationEnd<t)return null;if(t>n){if(t>n+r.duration*GXe)return null;i=r}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},bdi=(t,e)=>{let n,i;try{n=new Date(t),i=new Date(e)}catch{}let r=n.getTime();return(i.getTime()-r)/1e3},wdi=t=>{if(!t.segments||t.segments.length===0)return!1;for(let e=0;e<t.segments.length;e++)if(!t.segments[e].dateTimeObject)return!1;return!0},Sdi=({playlist:t,time:e=void 0,callback:n})=>{if(!n)throw new Error("getProgramTime: callback must be provided");if(!t||e===void 0)return n({message:"getProgramTime: playlist and time must be provided"});let i=xdi(e,t);if(!i)return n({message:"valid programTime was not found"});if(i.type==="estimate")return n({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:i.estimatedStart});let r={mediaSeconds:e},s=ydi(e,i.segment);return s&&(r.programDateTime=s.toISOString()),n(null,r)},WXe=({programTime:t,playlist:e,retryCount:n=2,seekTo:i,pauseAfterSeek:r=!0,tech:s,callback:o})=>{if(!o)throw new Error("seekToProgramTime: callback must be provided");if(typeof t>"u"||!e||!i)return o({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!s.hasStarted_)return o({message:"player must be playing a live stream to start buffering"});if(!wdi(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});let a=Cdi(t,e);if(!a)return o({message:`${t} was not found in the stream`});let l=a.segment,c=bdi(l.dateTimeObject,t);if(a.type==="estimate"){if(n===0)return o({message:`${t} is not buffered yet. Try again`});i(a.estimatedStart+c),s.one("seeked",()=>{WXe({programTime:t,playlist:e,retryCount:n-1,seekTo:i,pauseAfterSeek:r,tech:s,callback:o})});return}let d=l.start+c,u=()=>o(null,s.currentTime());s.one("seeked",u),r&&s.pause(),i(d)},Dye=(t,e)=>{if(t.readyState===4)return e()},Tdi=(t,e,n,i)=>{let r=[],s,o=!1,a=function(u,m,f,_){return m.abort(),o=!0,n(u,m,f,_)},l=function(u,m){if(o)return;if(u)return u.metadata=zD({requestType:i,request:m,error:u}),a(u,m,"",r);let f=m.responseText.substring(r&&r.byteLength||0,m.responseText.length);if(r=YKe(r,fQ(f,!0)),s=s||RD(r),r.length<10||s&&r.length<s+2)return Dye(m,()=>a(u,m,"",r));let _=kQ(r);return _==="ts"&&r.length<188?Dye(m,()=>a(u,m,"",r)):!_&&r.length<376?Dye(m,()=>a(u,m,"",r)):a(null,m,_,r)},d=e({uri:t,beforeSend(u){u.overrideMimeType("text/plain; charset=x-user-defined"),u.addEventListener("progress",function({total:m,loaded:f}){return h_e(u,null,{statusCode:u.status},l)})}},function(u,m){return h_e(d,u,m,l)});return d},{EventTarget:Ddi}=Vi,cZe=function(t,e){if(!NXe(t,e)||t.sidx&&e.sidx&&(t.sidx.offset!==e.sidx.offset||t.sidx.length!==e.sidx.length))return!1;if(!t.sidx&&e.sidx||t.sidx&&!e.sidx||t.segments&&!e.segments||!t.segments&&e.segments)return!1;if(!t.segments&&!e.segments)return!0;for(let n=0;n<t.segments.length;n++){let i=t.segments[n],r=e.segments[n];if(i.uri!==r.uri)return!1;if(!i.byterange&&!r.byterange)continue;let s=i.byterange,o=r.byterange;if(s&&!o||!s&&o||s.offset!==o.offset||s.length!==o.length)return!1}return!0},Edi=(t,e,n,i)=>{let r=i.attributes.NAME||n;return`placeholder-uri-${t}-${e}-${r}`},Mdi=({mainXml:t,srcUrl:e,clientOffset:n,sidxMapping:i,previousManifest:r})=>{let s=oqe(t,{manifestUri:e,clientOffset:n,sidxMapping:i,previousManifest:r});return RXe(s,e,Edi),s},kdi=(t,e)=>{UP(t,(n,i,r,s)=>{s in e.mediaGroups[i][r]||delete t.mediaGroups[i][r][s]})},Idi=(t,e,n)=>{let i=!0,r=Wd(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let s=0;s<e.playlists.length;s++){let o=e.playlists[s];if(o.sidx){let l=Kz(o.sidx);n&&n[l]&&n[l].sidx&&DQ(o,n[l].sidx,o.sidx.resolvedUri)}let a=d_e(r,o,cZe);a&&(r=a,i=!1)}return UP(e,(s,o,a,l)=>{if(s.playlists&&s.playlists.length){let c=s.playlists[0].id,d=d_e(r,s.playlists[0],cZe);d&&(r=d,l in r.mediaGroups[o][a]||(r.mediaGroups[o][a][l]=s),r.mediaGroups[o][a][l].playlists[0]=r.playlists[c],i=!1)}}),kdi(r,e),e.minimumUpdatePeriod!==t.minimumUpdatePeriod&&(i=!1),i?null:r},Adi=(t,e)=>(!t.map&&!e.map||!!(t.map&&e.map&&t.map.byterange.offset===e.map.byterange.offset&&t.map.byterange.length===e.map.byterange.length))&&t.uri===e.uri&&t.byterange.offset===e.byterange.offset&&t.byterange.length===e.byterange.length,dZe=(t,e)=>{let n={};for(let i in t){let s=t[i].sidx;if(s){let o=Kz(s);if(!e[o])break;let a=e[o].sidxInfo;Adi(a,s)&&(n[o]=e[o])}}return n},Pdi=(t,e)=>{let i=dZe(t.playlists,e);return UP(t,(r,s,o,a)=>{if(r.playlists&&r.playlists.length){let l=r.playlists;i=Wd(i,dZe(l,e))}}),i},MH=class extends Ddi{constructor(e,n,i={},r){super(),this.mainPlaylistLoader_=r||this,r||(this.isMain_=!0);let{withCredentials:s=!1}=i;if(this.vhs_=n,this.withCredentials=s,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=h6("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}requestErrored_(e,n,i){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:n.status,message:"DASH request error at URL: "+n.uri,response:n.response,code:2,metadata:e.metadata},i&&(this.state=i),this.trigger("error"),!0}addSidxSegments_(e,n,i){let r=e.sidx&&Kz(e.sidx);if(!e.sidx||!r||this.mainPlaylistLoader_.sidxMapping_[r]){this.mediaRequest_=di.default.setTimeout(()=>i(!1),0);return}let s=MJ(e.sidx.resolvedUri),o=(l,c)=>{if(this.requestErrored_(l,c,n))return;let d=this.mainPlaylistLoader_.sidxMapping_,{requestType:u}=c,m;try{m=(0,kZe.default)(vo(c.response).subarray(8))}catch(f){f.metadata=zD({requestType:u,request:c,parseFailure:!0}),this.requestErrored_(f,c,n);return}return d[r]={sidxInfo:e.sidx,sidx:m},DQ(e,m,e.sidx.resolvedUri),i(!0)},a="dash-sidx";this.request=Tdi(s,this.vhs_.xhr,(l,c,d,u)=>{if(l)return o(l,c);if(!d||d!=="mp4"){let _=d||"unknown";return o({status:c.status,message:`Unsupported ${_} container type for sidx segment at URL: ${s}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},c)}let{offset:m,length:f}=e.sidx.byterange;if(u.length>=f+m)return o(l,{response:u.subarray(m,m+f),status:c.status,uri:c.uri});this.request=this.vhs_.xhr({uri:s,responseType:"arraybuffer",requestType:"dash-sidx",headers:p_e({byterange:e.sidx.byterange})},o)},a)}dispose(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},di.default.clearTimeout(this.minimumUpdatePeriodTimeout_),di.default.clearTimeout(this.mediaRequest_),di.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){let e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);let n=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}let i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,i&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,r=>{this.haveMetadata({startingState:n,playlist:e})}))}haveMetadata({startingState:e,playlist:n}){this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),di.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(di.default.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){di.default.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;let n=this.media();if(e){let i=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=di.default.setTimeout(()=>this.load(),i);return}if(!this.started){this.start();return}n&&!n.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){this.mediaRequest_=di.default.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,n)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){let n={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:n}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(i,r)=>{if(i){let{requestType:o}=r;i.metadata=zD({requestType:o,request:r,error:i})}if(this.requestErrored_(i,r)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:n});let s=r.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?this.mainLoaded_=Date.parse(r.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=MJ(this.mainPlaylistLoader_.srcUrl,r),s){this.handleMain_(),this.syncClientServerClock_(()=>e(r,s));return}return e(r,s)})}syncClientServerClock_(e){let n=aqe(this.mainPlaylistLoader_.mainXml_);if(n===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(n.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=n.value-Date.now(),e();this.request=this.vhs_.xhr({uri:_3(this.mainPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(i,r)=>{if(!this.request)return;if(i){let{requestType:o}=r;return this.error.metadata=zD({requestType:o,request:r,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let s;n.method==="HEAD"?!r.responseHeaders||!r.responseHeaders.date?s=this.mainLoaded_:s=Date.parse(r.responseHeaders.date):s=Date.parse(r.responseText),this.mainPlaylistLoader_.clientOffset_=s-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){this.mediaRequest_=null;let e=this.mainPlaylistLoader_.main,n={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:n});let i;try{i=Mdi({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(s){this.error=s,this.error.metadata={errorType:Vi.Error.StreamingDashManifestParserError,error:s},this.trigger("error")}e&&(i=Idi(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;let r=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(r&&r!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=r),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){let{duration:s,endList:o}=i,a=[];i.playlists.forEach(c=>{a.push({id:c.id,bandwidth:c.attributes.BANDWIDTH,resolution:c.attributes.RESOLUTION,codecs:c.attributes.CODECS})});let l={duration:s,isLive:!o,renditions:a};n.parsedManifest=l,this.trigger({type:"manifestparsecomplete",metadata:n})}return!!i}updateMinimumUpdatePeriodTimeout_(){let e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(di.default.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let n=e.main&&e.main.minimumUpdatePeriod;if(n===0&&(e.media()?n=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof n!="number"||n<=0){n<0&&this.logger_(`found invalid minimumUpdatePeriod of ${n}, not setting a timeout`);return}this.createMUPTimeout_(n)}createMUPTimeout_(e){let n=this.mainPlaylistLoader_;n.minimumUpdatePeriodTimeout_=di.default.setTimeout(()=>{n.minimumUpdatePeriodTimeout_=null,n.trigger("minimumUpdatePeriod"),n.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,n)=>{n&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=Pdi(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,i=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();let n=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==n[e];if(i?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){let r=()=>{this.media().endList||(this.mediaUpdateTimeout=di.default.setTimeout(()=>{this.trigger("mediaupdatetimeout"),r()},u_e(this.media(),!!i)))};r()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){let n=this.mainPlaylistLoader_.main.eventStream.map(i=>({cueTime:i.start,frames:[{data:i.messageData}]}));this.addMetadataToTextTrack("EventStream",n,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){let n=new Set;for(let i in e.contentProtection){let r=e.contentProtection[i].attributes["cenc:default_KID"];r&&n.add(r.replace(/-/g,"").toLowerCase())}return n}}},q1={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},Rdi=t=>{let e=new Uint8Array(new ArrayBuffer(t.length));for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e.buffer},UXe=function(t){return t.on=t.addEventListener,t.off=t.removeEventListener,t},Fdi=function(t){try{return URL.createObjectURL(new Blob([t],{type:"application/javascript"}))}catch{let n=new BlobBuilder;return n.append(t),URL.createObjectURL(n.getBlob())}},jXe=function(t){return function(){let e=Fdi(t),n=UXe(new Worker(e));n.objURL=e;let i=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(e),i.call(this)},n}},$Xe=function(t){return`var browserWorkerPolyFill = ${UXe.toString()};
browserWorkerPolyFill(self);
`+t},KXe=function(t){return t.toString().replace(/^function.+?{/,"").slice(0,-1)},Ldi=$Xe(KXe(function(){var t=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var q={};this.on=function(oe,he){q[oe]||(q[oe]=[]),q[oe]=q[oe].concat(he)},this.off=function(oe,he){var de;return q[oe]?(de=q[oe].indexOf(he),q[oe]=q[oe].slice(),q[oe].splice(de,1),de>-1):!1},this.trigger=function(oe){var he,de,De,Le;if(he=q[oe],!!he)if(arguments.length===2)for(De=he.length,de=0;de<De;++de)he[de].call(this,arguments[1]);else{for(Le=[],de=arguments.length,de=1;de<arguments.length;++de)Le.push(arguments[de]);for(De=he.length,de=0;de<De;++de)he[de].apply(this,Le)}},this.dispose=function(){q={}}}};e.prototype.pipe=function(q){return this.on("data",function(oe){q.push(oe)}),this.on("done",function(oe){q.flush(oe)}),this.on("partialdone",function(oe){q.partialFlush(oe)}),this.on("endedtimeline",function(oe){q.endTimeline(oe)}),this.on("reset",function(oe){q.reset(oe)}),q},e.prototype.push=function(q){this.trigger("data",q)},e.prototype.flush=function(q){this.trigger("done",q)},e.prototype.partialFlush=function(q){this.trigger("partialdone",q)},e.prototype.endTimeline=function(q){this.trigger("endedtimeline",q)},e.prototype.reset=function(q){this.trigger("reset",q)};var n=e,i=Math.pow(2,32),r=function(q){var oe=new DataView(q.buffer,q.byteOffset,q.byteLength),he;return oe.getBigUint64?(he=oe.getBigUint64(0),he<Number.MAX_SAFE_INTEGER?Number(he):he):oe.getUint32(0)*i+oe.getUint32(4)},s={getUint64:r,MAX_UINT32:i},o=s.MAX_UINT32,a,l,c,d,u,m,f,_,x,D,E,M,I,z,G,A,Y,X,ne,pe,ce,ie,le,Se,je,ze,Ge,Ae,Ye,ft,Ft,Tt,at,yt,_t,Re;(function(){var q;if(le={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(q in le)le.hasOwnProperty(q)&&(le[q]=[q.charCodeAt(0),q.charCodeAt(1),q.charCodeAt(2),q.charCodeAt(3)]);Se=new Uint8Array([105,115,111,109]),ze=new Uint8Array([97,118,99,49]),je=new Uint8Array([0,0,0,1]),Ge=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Ae=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ye={video:Ge,audio:Ae},Tt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ft=new Uint8Array([0,0,0,0,0,0,0,0]),at=new Uint8Array([0,0,0,0,0,0,0,0]),yt=at,_t=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Re=at,ft=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),a=function(q){var oe=[],he=0,de,De,Le;for(de=1;de<arguments.length;de++)oe.push(arguments[de]);for(de=oe.length;de--;)he+=oe[de].byteLength;for(De=new Uint8Array(he+8),Le=new DataView(De.buffer,De.byteOffset,De.byteLength),Le.setUint32(0,De.byteLength),De.set(q,4),de=0,he=8;de<oe.length;de++)De.set(oe[de],he),he+=oe[de].byteLength;return De},l=function(){return a(le.dinf,a(le.dref,Tt))},c=function(q){return a(le.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,q.audioobjecttype<<3|q.samplingfrequencyindex>>>1,q.samplingfrequencyindex<<7|q.channelcount<<3,6,1,2]))},d=function(){return a(le.ftyp,Se,je,Se,ze)},A=function(q){return a(le.hdlr,Ye[q])},u=function(q){return a(le.mdat,q)},G=function(q){var oe=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,q.duration>>>24&255,q.duration>>>16&255,q.duration>>>8&255,q.duration&255,85,196,0,0]);return q.samplerate&&(oe[12]=q.samplerate>>>24&255,oe[13]=q.samplerate>>>16&255,oe[14]=q.samplerate>>>8&255,oe[15]=q.samplerate&255),a(le.mdhd,oe)},z=function(q){return a(le.mdia,G(q),A(q.type),f(q))},m=function(q){return a(le.mfhd,new Uint8Array([0,0,0,0,(q&4278190080)>>24,(q&16711680)>>16,(q&65280)>>8,q&255]))},f=function(q){return a(le.minf,q.type==="video"?a(le.vmhd,ft):a(le.smhd,Ft),l(),X(q))},_=function(q,oe){for(var he=[],de=oe.length;de--;)he[de]=pe(oe[de]);return a.apply(null,[le.moof,m(q)].concat(he))},x=function(q){for(var oe=q.length,he=[];oe--;)he[oe]=M(q[oe]);return a.apply(null,[le.moov,E(4294967295)].concat(he).concat(D(q)))},D=function(q){for(var oe=q.length,he=[];oe--;)he[oe]=ce(q[oe]);return a.apply(null,[le.mvex].concat(he))},E=function(q){var oe=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(q&4278190080)>>24,(q&16711680)>>16,(q&65280)>>8,q&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return a(le.mvhd,oe)},Y=function(q){var oe=q.samples||[],he=new Uint8Array(4+oe.length),de,De;for(De=0;De<oe.length;De++)de=oe[De].flags,he[De+4]=de.dependsOn<<4|de.isDependedOn<<2|de.hasRedundancy;return a(le.sdtp,he)},X=function(q){return a(le.stbl,ne(q),a(le.stts,Re),a(le.stsc,yt),a(le.stsz,_t),a(le.stco,at))},function(){var q,oe;ne=function(he){return a(le.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),he.type==="video"?q(he):oe(he))},q=function(he){var de=he.sps||[],De=he.pps||[],Le=[],xt=[],Dt,Ut;for(Dt=0;Dt<de.length;Dt++)Le.push((de[Dt].byteLength&65280)>>>8),Le.push(de[Dt].byteLength&255),Le=Le.concat(Array.prototype.slice.call(de[Dt]));for(Dt=0;Dt<De.length;Dt++)xt.push((De[Dt].byteLength&65280)>>>8),xt.push(De[Dt].byteLength&255),xt=xt.concat(Array.prototype.slice.call(De[Dt]));if(Ut=[le.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(he.width&65280)>>8,he.width&255,(he.height&65280)>>8,he.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a(le.avcC,new Uint8Array([1,he.profileIdc,he.profileCompatibility,he.levelIdc,255].concat([de.length],Le,[De.length],xt))),a(le.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],he.sarRatio){var Jt=he.sarRatio[0],gi=he.sarRatio[1];Ut.push(a(le.pasp,new Uint8Array([(Jt&4278190080)>>24,(Jt&16711680)>>16,(Jt&65280)>>8,Jt&255,(gi&4278190080)>>24,(gi&16711680)>>16,(gi&65280)>>8,gi&255])))}return a.apply(null,Ut)},oe=function(he){return a(le.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(he.channelcount&65280)>>8,he.channelcount&255,(he.samplesize&65280)>>8,he.samplesize&255,0,0,0,0,(he.samplerate&65280)>>8,he.samplerate&255,0,0]),c(he))}}(),I=function(q){var oe=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(q.id&4278190080)>>24,(q.id&16711680)>>16,(q.id&65280)>>8,q.id&255,0,0,0,0,(q.duration&4278190080)>>24,(q.duration&16711680)>>16,(q.duration&65280)>>8,q.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(q.width&65280)>>8,q.width&255,0,0,(q.height&65280)>>8,q.height&255,0,0]);return a(le.tkhd,oe)},pe=function(q){var oe,he,de,De,Le,xt,Dt;return oe=a(le.tfhd,new Uint8Array([0,0,0,58,(q.id&4278190080)>>24,(q.id&16711680)>>16,(q.id&65280)>>8,q.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),xt=Math.floor(q.baseMediaDecodeTime/o),Dt=Math.floor(q.baseMediaDecodeTime%o),he=a(le.tfdt,new Uint8Array([1,0,0,0,xt>>>24&255,xt>>>16&255,xt>>>8&255,xt&255,Dt>>>24&255,Dt>>>16&255,Dt>>>8&255,Dt&255])),Le=92,q.type==="audio"?(de=ie(q,Le),a(le.traf,oe,he,de)):(De=Y(q),de=ie(q,De.length+Le),a(le.traf,oe,he,de,De))},M=function(q){return q.duration=q.duration||4294967295,a(le.trak,I(q),z(q))},ce=function(q){var oe=new Uint8Array([0,0,0,0,(q.id&4278190080)>>24,(q.id&16711680)>>16,(q.id&65280)>>8,q.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return q.type!=="video"&&(oe[oe.length-1]=0),a(le.trex,oe)},function(){var q,oe,he;he=function(de,De){var Le=0,xt=0,Dt=0,Ut=0;return de.length&&(de[0].duration!==void 0&&(Le=1),de[0].size!==void 0&&(xt=2),de[0].flags!==void 0&&(Dt=4),de[0].compositionTimeOffset!==void 0&&(Ut=8)),[0,0,Le|xt|Dt|Ut,1,(de.length&4278190080)>>>24,(de.length&16711680)>>>16,(de.length&65280)>>>8,de.length&255,(De&4278190080)>>>24,(De&16711680)>>>16,(De&65280)>>>8,De&255]},oe=function(de,De){var Le,xt,Dt,Ut,Jt,gi;for(Ut=de.samples||[],De+=20+16*Ut.length,Dt=he(Ut,De),xt=new Uint8Array(Dt.length+Ut.length*16),xt.set(Dt),Le=Dt.length,gi=0;gi<Ut.length;gi++)Jt=Ut[gi],xt[Le++]=(Jt.duration&4278190080)>>>24,xt[Le++]=(Jt.duration&16711680)>>>16,xt[Le++]=(Jt.duration&65280)>>>8,xt[Le++]=Jt.duration&255,xt[Le++]=(Jt.size&4278190080)>>>24,xt[Le++]=(Jt.size&16711680)>>>16,xt[Le++]=(Jt.size&65280)>>>8,xt[Le++]=Jt.size&255,xt[Le++]=Jt.flags.isLeading<<2|Jt.flags.dependsOn,xt[Le++]=Jt.flags.isDependedOn<<6|Jt.flags.hasRedundancy<<4|Jt.flags.paddingValue<<1|Jt.flags.isNonSyncSample,xt[Le++]=Jt.flags.degradationPriority&61440,xt[Le++]=Jt.flags.degradationPriority&15,xt[Le++]=(Jt.compositionTimeOffset&4278190080)>>>24,xt[Le++]=(Jt.compositionTimeOffset&16711680)>>>16,xt[Le++]=(Jt.compositionTimeOffset&65280)>>>8,xt[Le++]=Jt.compositionTimeOffset&255;return a(le.trun,xt)},q=function(de,De){var Le,xt,Dt,Ut,Jt,gi;for(Ut=de.samples||[],De+=20+8*Ut.length,Dt=he(Ut,De),Le=new Uint8Array(Dt.length+Ut.length*8),Le.set(Dt),xt=Dt.length,gi=0;gi<Ut.length;gi++)Jt=Ut[gi],Le[xt++]=(Jt.duration&4278190080)>>>24,Le[xt++]=(Jt.duration&16711680)>>>16,Le[xt++]=(Jt.duration&65280)>>>8,Le[xt++]=Jt.duration&255,Le[xt++]=(Jt.size&4278190080)>>>24,Le[xt++]=(Jt.size&16711680)>>>16,Le[xt++]=(Jt.size&65280)>>>8,Le[xt++]=Jt.size&255;return a(le.trun,Le)},ie=function(de,De){return de.type==="audio"?q(de,De):oe(de,De)}}();var ot={ftyp:d,mdat:u,moof:_,moov:x,initSegment:function(q){var oe=d(),he=x(q),de;return de=new Uint8Array(oe.byteLength+he.byteLength),de.set(oe),de.set(he,oe.byteLength),de}},jt=function(q){var oe,he,de=[],De=[];for(De.byteLength=0,De.nalCount=0,De.duration=0,de.byteLength=0,oe=0;oe<q.length;oe++)he=q[oe],he.nalUnitType==="access_unit_delimiter_rbsp"?(de.length&&(de.duration=he.dts-de.dts,De.byteLength+=de.byteLength,De.nalCount+=de.length,De.duration+=de.duration,De.push(de)),de=[he],de.byteLength=he.data.byteLength,de.pts=he.pts,de.dts=he.dts):(he.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(de.keyFrame=!0),de.duration=he.dts-de.dts,de.byteLength+=he.data.byteLength,de.push(he));return De.length&&(!de.duration||de.duration<=0)&&(de.duration=De[De.length-1].duration),De.byteLength+=de.byteLength,De.nalCount+=de.length,De.duration+=de.duration,De.push(de),De},zt=function(q){var oe,he,de=[],De=[];for(de.byteLength=0,de.nalCount=0,de.duration=0,de.pts=q[0].pts,de.dts=q[0].dts,De.byteLength=0,De.nalCount=0,De.duration=0,De.pts=q[0].pts,De.dts=q[0].dts,oe=0;oe<q.length;oe++)he=q[oe],he.keyFrame?(de.length&&(De.push(de),De.byteLength+=de.byteLength,De.nalCount+=de.nalCount,De.duration+=de.duration),de=[he],de.nalCount=he.length,de.byteLength=he.byteLength,de.pts=he.pts,de.dts=he.dts,de.duration=he.duration):(de.duration+=he.duration,de.nalCount+=he.length,de.byteLength+=he.byteLength,de.push(he));return De.length&&de.duration<=0&&(de.duration=De[De.length-1].duration),De.byteLength+=de.byteLength,De.nalCount+=de.nalCount,De.duration+=de.duration,De.push(de),De},qt=function(q){var oe;return!q[0][0].keyFrame&&q.length>1&&(oe=q.shift(),q.byteLength-=oe.byteLength,q.nalCount-=oe.nalCount,q[0][0].dts=oe.dts,q[0][0].pts=oe.pts,q[0][0].duration+=oe.duration),q},ui=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},_i=function(q,oe){var he=ui();return he.dataOffset=oe,he.compositionTimeOffset=q.pts-q.dts,he.duration=q.duration,he.size=4*q.length,he.size+=q.byteLength,q.keyFrame&&(he.flags.dependsOn=2,he.flags.isNonSyncSample=0),he},ln=function(q,oe){var he,de,De,Le,xt,Dt=oe||0,Ut=[];for(he=0;he<q.length;he++)for(Le=q[he],de=0;de<Le.length;de++)xt=Le[de],De=_i(xt,Dt),Dt+=De.size,Ut.push(De);return Ut},Rn=function(q){var oe,he,de,De,Le,xt,Dt=0,Ut=q.byteLength,Jt=q.nalCount,gi=Ut+4*Jt,Si=new Uint8Array(gi),Tr=new DataView(Si.buffer);for(oe=0;oe<q.length;oe++)for(De=q[oe],he=0;he<De.length;he++)for(Le=De[he],de=0;de<Le.length;de++)xt=Le[de],Tr.setUint32(Dt,xt.data.byteLength),Dt+=4,Si.set(xt.data,Dt),Dt+=xt.data.byteLength;return Si},bi=function(q,oe){var he,de=oe||0,De=[];return he=_i(q,de),De.push(he),De},Mn=function(q){var oe,he,de=0,De=q.byteLength,Le=q.length,xt=De+4*Le,Dt=new Uint8Array(xt),Ut=new DataView(Dt.buffer);for(oe=0;oe<q.length;oe++)he=q[oe],Ut.setUint32(de,he.data.byteLength),de+=4,Dt.set(he.data,de),de+=he.data.byteLength;return Dt},Fn={groupNalsIntoFrames:jt,groupFramesIntoGops:zt,extendFirstKeyFrame:qt,generateSampleTable:ln,concatenateNalData:Rn,generateSampleTableForFrame:bi,concatenateNalDataForFrame:Mn},or=[33,16,5,32,164,27],wn=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],gn=function(q){for(var oe=[];q--;)oe.push(0);return oe},ts=function(q){return Object.keys(q).reduce(function(oe,he){return oe[he]=new Uint8Array(q[he].reduce(function(de,De){return de.concat(De)},[])),oe},{})},no,Ho=function(){if(!no){var q={96e3:[or,[227,64],gn(154),[56]],88200:[or,[231],gn(170),[56]],64e3:[or,[248,192],gn(240),[56]],48e3:[or,[255,192],gn(268),[55,148,128],gn(54),[112]],44100:[or,[255,192],gn(268),[55,163,128],gn(84),[112]],32e3:[or,[255,192],gn(268),[55,234],gn(226),[112]],24e3:[or,[255,192],gn(268),[55,255,128],gn(268),[111,112],gn(126),[224]],16e3:[or,[255,192],gn(268),[55,255,128],gn(268),[111,255],gn(269),[223,108],gn(195),[1,192]],12e3:[wn,gn(268),[3,127,248],gn(268),[6,255,240],gn(268),[13,255,224],gn(268),[27,253,128],gn(259),[56]],11025:[wn,gn(268),[3,127,248],gn(268),[6,255,240],gn(268),[13,255,224],gn(268),[27,255,192],gn(268),[55,175,128],gn(108),[112]],8e3:[wn,gn(268),[3,121,16],gn(47),[7]]};no=ts(q)}return no},kn=9e4,Ts,ea,co,Zn,gl,sc,Xl;Ts=function(q){return q*kn},ea=function(q,oe){return q*oe},co=function(q){return q/kn},Zn=function(q,oe){return q/oe},gl=function(q,oe){return Ts(Zn(q,oe))},sc=function(q,oe){return ea(co(q),oe)},Xl=function(q,oe,he){return co(he?q:q-oe)};var Xs={ONE_SECOND_IN_TS:kn,secondsToVideoTs:Ts,secondsToAudioTs:ea,videoTsToSeconds:co,audioTsToSeconds:Zn,audioTsToVideoTs:gl,videoTsToAudioTs:sc,metadataTsToSeconds:Xl},Ya=Ho,qa=Xs,Nl=function(q){var oe,he,de=0;for(oe=0;oe<q.length;oe++)he=q[oe],de+=he.data.byteLength;return de},zh=function(q,oe,he,de){var De,Le=0,xt=0,Dt=0,Ut=0,Jt,gi,Si;if(oe.length&&(De=qa.audioTsToVideoTs(q.baseMediaDecodeTime,q.samplerate),Le=Math.ceil(qa.ONE_SECOND_IN_TS/(q.samplerate/1024)),he&&de&&(xt=De-Math.max(he,de),Dt=Math.floor(xt/Le),Ut=Dt*Le),!(Dt<1||Ut>qa.ONE_SECOND_IN_TS/2))){for(Jt=Ya()[q.samplerate],Jt||(Jt=oe[0].data),gi=0;gi<Dt;gi++)Si=oe[0],oe.splice(0,0,{data:Jt,dts:Si.dts-Le,pts:Si.pts-Le});return q.baseMediaDecodeTime-=Math.floor(qa.videoTsToAudioTs(Ut,q.samplerate)),Ut}},Hh=function(q,oe,he){return oe.minSegmentDts>=he?q:(oe.minSegmentDts=1/0,q.filter(function(de){return de.dts>=he?(oe.minSegmentDts=Math.min(oe.minSegmentDts,de.dts),oe.minSegmentPts=oe.minSegmentDts,!0):!1}))},Rf=function(q){var oe,he,de=[];for(oe=0;oe<q.length;oe++)he=q[oe],de.push({size:he.data.byteLength,duration:1024});return de},Id=function(q){var oe,he,de=0,De=new Uint8Array(Nl(q));for(oe=0;oe<q.length;oe++)he=q[oe],De.set(he.data,de),de+=he.data.byteLength;return De},aa={prefixWithSilence:zh,trimAdtsFramesByEarliestDts:Hh,generateSampleTable:Rf,concatenateFrameData:Id},jd=Xs.ONE_SECOND_IN_TS,du=function(q,oe){typeof oe.pts=="number"&&(q.timelineStartInfo.pts===void 0&&(q.timelineStartInfo.pts=oe.pts),q.minSegmentPts===void 0?q.minSegmentPts=oe.pts:q.minSegmentPts=Math.min(q.minSegmentPts,oe.pts),q.maxSegmentPts===void 0?q.maxSegmentPts=oe.pts:q.maxSegmentPts=Math.max(q.maxSegmentPts,oe.pts)),typeof oe.dts=="number"&&(q.timelineStartInfo.dts===void 0&&(q.timelineStartInfo.dts=oe.dts),q.minSegmentDts===void 0?q.minSegmentDts=oe.dts:q.minSegmentDts=Math.min(q.minSegmentDts,oe.dts),q.maxSegmentDts===void 0?q.maxSegmentDts=oe.dts:q.maxSegmentDts=Math.max(q.maxSegmentDts,oe.dts))},$i=function(q){delete q.minSegmentDts,delete q.maxSegmentDts,delete q.minSegmentPts,delete q.maxSegmentPts},md=function(q,oe){var he,de,De=q.minSegmentDts;return oe||(De-=q.timelineStartInfo.dts),he=q.timelineStartInfo.baseMediaDecodeTime,he+=De,he=Math.max(0,he),q.type==="audio"&&(de=q.samplerate/jd,he*=de,he=Math.floor(he)),he},Vl={clearDtsInfo:$i,calculateTrackBaseMediaDecodeTime:md,collectDtsInfo:du},Tl=4,ja=128,Dr=function(q){for(var oe=0,he={payloadType:-1,payloadSize:0},de=0,De=0;oe<q.byteLength&&q[oe]!==ja;){for(;q[oe]===255;)de+=255,oe++;for(de+=q[oe++];q[oe]===255;)De+=255,oe++;if(De+=q[oe++],!he.payload&&de===Tl){var Le=String.fromCharCode(q[oe+3],q[oe+4],q[oe+5],q[oe+6]);if(Le==="GA94"){he.payloadType=de,he.payloadSize=De,he.payload=q.subarray(oe,oe+De);break}else he.payload=void 0}oe+=De,de=0,De=0}return he},Ad=function(q){return q.payload[0]!==181||(q.payload[1]<<8|q.payload[2])!==49||String.fromCharCode(q.payload[3],q.payload[4],q.payload[5],q.payload[6])!=="GA94"||q.payload[7]!==3?null:q.payload.subarray(8,q.payload.length-1)},ds=function(q,oe){var he=[],de,De,Le,xt;if(!(oe[0]&64))return he;for(De=oe[0]&31,de=0;de<De;de++)Le=de*3,xt={type:oe[Le+2]&3,pts:q},oe[Le+2]&4&&(xt.ccData=oe[Le+3]<<8|oe[Le+4],he.push(xt));return he},_a=function(q){for(var oe=q.byteLength,he=[],de=1,De,Le;de<oe-2;)q[de]===0&&q[de+1]===0&&q[de+2]===3?(he.push(de+2),de+=2):de++;if(he.length===0)return q;De=oe-he.length,Le=new Uint8Array(De);var xt=0;for(de=0;de<De;xt++,de++)xt===he[0]&&(xt++,he.shift()),Le[de]=q[xt];return Le},fd={parseSei:Dr,parseUserData:Ad,parseCaptionPackets:ds,discardEmulationPreventionBytes:_a,USER_DATA_REGISTERED_ITU_T_T35:Tl},fr=n,Qs=fd,Nr=function(q){q=q||{},Nr.prototype.init.call(this),this.parse708captions_=typeof q.parse708captions=="boolean"?q.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Js(0,0),new Js(0,1),new Js(1,0),new Js(1,1)],this.parse708captions_&&(this.cc708Stream_=new Da({captionServices:q.captionServices})),this.reset(),this.ccStreams_.forEach(function(oe){oe.on("data",this.trigger.bind(this,"data")),oe.on("partialdone",this.trigger.bind(this,"partialdone")),oe.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Nr.prototype=new fr,Nr.prototype.push=function(q){var oe,he,de;if(q.nalUnitType==="sei_rbsp"&&(oe=Qs.parseSei(q.escapedRBSP),!!oe.payload&&oe.payloadType===Qs.USER_DATA_REGISTERED_ITU_T_T35&&(he=Qs.parseUserData(oe),!!he))){if(q.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(q.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}de=Qs.parseCaptionPackets(q.pts,he),this.captionPackets_=this.captionPackets_.concat(de),this.latestDts_!==q.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=q.dts}},Nr.prototype.flushCCStreams=function(q){this.ccStreams_.forEach(function(oe){return q==="flush"?oe.flush():oe.partialFlush()},this)},Nr.prototype.flushStream=function(q){if(!this.captionPackets_.length){this.flushCCStreams(q);return}this.captionPackets_.forEach(function(oe,he){oe.presortIndex=he}),this.captionPackets_.sort(function(oe,he){return oe.pts===he.pts?oe.presortIndex-he.presortIndex:oe.pts-he.pts}),this.captionPackets_.forEach(function(oe){oe.type<2?this.dispatchCea608Packet(oe):this.dispatchCea708Packet(oe)},this),this.captionPackets_.length=0,this.flushCCStreams(q)},Nr.prototype.flush=function(){return this.flushStream("flush")},Nr.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Nr.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(q){q.reset()})},Nr.prototype.dispatchCea608Packet=function(q){this.setsTextOrXDSActive(q)?this.activeCea608Channel_[q.type]=null:this.setsChannel1Active(q)?this.activeCea608Channel_[q.type]=0:this.setsChannel2Active(q)&&(this.activeCea608Channel_[q.type]=1),this.activeCea608Channel_[q.type]!==null&&this.ccStreams_[(q.type<<1)+this.activeCea608Channel_[q.type]].push(q)},Nr.prototype.setsChannel1Active=function(q){return(q.ccData&30720)===4096},Nr.prototype.setsChannel2Active=function(q){return(q.ccData&30720)===6144},Nr.prototype.setsTextOrXDSActive=function(q){return(q.ccData&28928)===256||(q.ccData&30974)===4138||(q.ccData&30974)===6186},Nr.prototype.dispatchCea708Packet=function(q){this.parse708captions_&&this.cc708Stream_.push(q)};var Ql={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ro=function(q){var oe=Ql[q]||q;return q&4096&&q===oe?"":String.fromCharCode(oe)},Ra=function(q){return 32<=q&&q<=127||160<=q&&q<=255},Ta=function(q){this.windowNum=q,this.reset()};Ta.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Ta.prototype.getText=function(){return this.rows.join(`
`)},Ta.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ta.prototype.newLine=function(q){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(q),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ta.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Ta.prototype.addText=function(q){this.rows[this.rowIdx]+=q},Ta.prototype.backspace=function(){if(!this.isEmpty()){var q=this.rows[this.rowIdx];this.rows[this.rowIdx]=q.substr(0,q.length-1)}};var $a=function(q,oe,he){this.serviceNum=q,this.text="",this.currentWindow=new Ta(-1),this.windows=[],this.stream=he,typeof oe=="string"&&this.createTextDecoder(oe)};$a.prototype.init=function(q,oe){this.startPts=q;for(var he=0;he<8;he++)this.windows[he]=new Ta(he),typeof oe=="function"&&(this.windows[he].beforeRowOverflow=oe)},$a.prototype.setCurrentWindow=function(q){this.currentWindow=this.windows[q]},$a.prototype.createTextDecoder=function(q){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(q)}catch(oe){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+q+" encoding. "+oe})}};var Da=function(q){q=q||{},Da.prototype.init.call(this);var oe=this,he=q.captionServices||{},de={},De;Object.keys(he).forEach(Le=>{De=he[Le],/^SERVICE/.test(Le)&&(de[Le]=De.encoding)}),this.serviceEncodings=de,this.current708Packet=null,this.services={},this.push=function(Le){Le.type===3?(oe.new708Packet(),oe.add708Bytes(Le)):(oe.current708Packet===null&&oe.new708Packet(),oe.add708Bytes(Le))}};Da.prototype=new fr,Da.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Da.prototype.add708Bytes=function(q){var oe=q.ccData,he=oe>>>8,de=oe&255;this.current708Packet.ptsVals.push(q.pts),this.current708Packet.data.push(he),this.current708Packet.data.push(de)},Da.prototype.push708Packet=function(){var q=this.current708Packet,oe=q.data,he=null,de=null,De=0,Le=oe[De++];for(q.seq=Le>>6,q.sizeCode=Le&63;De<oe.length;De++)Le=oe[De++],he=Le>>5,de=Le&31,he===7&&de>0&&(Le=oe[De++],he=Le),this.pushServiceBlock(he,De,de),de>0&&(De+=de-1)},Da.prototype.pushServiceBlock=function(q,oe,he){var de,De=oe,Le=this.current708Packet.data,xt=this.services[q];for(xt||(xt=this.initService(q,De));De<oe+he&&De<Le.length;De++)de=Le[De],Ra(de)?De=this.handleText(De,xt):de===24?De=this.multiByteCharacter(De,xt):de===16?De=this.extendedCommands(De,xt):128<=de&&de<=135?De=this.setCurrentWindow(De,xt):152<=de&&de<=159?De=this.defineWindow(De,xt):de===136?De=this.clearWindows(De,xt):de===140?De=this.deleteWindows(De,xt):de===137?De=this.displayWindows(De,xt):de===138?De=this.hideWindows(De,xt):de===139?De=this.toggleWindows(De,xt):de===151?De=this.setWindowAttributes(De,xt):de===144?De=this.setPenAttributes(De,xt):de===145?De=this.setPenColor(De,xt):de===146?De=this.setPenLocation(De,xt):de===143?xt=this.reset(De,xt):de===8?xt.currentWindow.backspace():de===12?xt.currentWindow.clearText():de===13?xt.currentWindow.pendingNewLine=!0:de===14?xt.currentWindow.clearText():de===141&&De++},Da.prototype.extendedCommands=function(q,oe){var he=this.current708Packet.data,de=he[++q];return Ra(de)&&(q=this.handleText(q,oe,{isExtended:!0})),q},Da.prototype.getPts=function(q){return this.current708Packet.ptsVals[Math.floor(q/2)]},Da.prototype.initService=function(q,oe){var de="SERVICE"+q,he=this,de,De;return de in this.serviceEncodings&&(De=this.serviceEncodings[de]),this.services[q]=new $a(q,De,he),this.services[q].init(this.getPts(oe),function(Le){he.flushDisplayed(Le,he.services[q])}),this.services[q]},Da.prototype.handleText=function(q,oe,he){var de=he&&he.isExtended,De=he&&he.isMultiByte,Le=this.current708Packet.data,xt=de?4096:0,Dt=Le[q],Ut=Le[q+1],Jt=oe.currentWindow,gi,Si;function Tr(ae){return ae.map(Ds=>("0"+(Ds&255).toString(16)).slice(-2)).join("")}if(De?(Si=[Dt,Ut],q++):Si=[Dt],oe.textDecoder_&&!de)gi=oe.textDecoder_.decode(new Uint8Array(Si));else if(De){let ae=Tr(Si);gi=String.fromCharCode(parseInt(ae,16))}else gi=ro(xt|Dt);return Jt.pendingNewLine&&!Jt.isEmpty()&&Jt.newLine(this.getPts(q)),Jt.pendingNewLine=!1,Jt.addText(gi),q},Da.prototype.multiByteCharacter=function(q,oe){var he=this.current708Packet.data,de=he[q+1],De=he[q+2];return Ra(de)&&Ra(De)&&(q=this.handleText(++q,oe,{isMultiByte:!0})),q},Da.prototype.setCurrentWindow=function(q,oe){var he=this.current708Packet.data,de=he[q],De=de&7;return oe.setCurrentWindow(De),q},Da.prototype.defineWindow=function(q,oe){var he=this.current708Packet.data,de=he[q],De=de&7;oe.setCurrentWindow(De);var Le=oe.currentWindow;return de=he[++q],Le.visible=(de&32)>>5,Le.rowLock=(de&16)>>4,Le.columnLock=(de&8)>>3,Le.priority=de&7,de=he[++q],Le.relativePositioning=(de&128)>>7,Le.anchorVertical=de&127,de=he[++q],Le.anchorHorizontal=de,de=he[++q],Le.anchorPoint=(de&240)>>4,Le.rowCount=de&15,de=he[++q],Le.columnCount=de&63,de=he[++q],Le.windowStyle=(de&56)>>3,Le.penStyle=de&7,Le.virtualRowCount=Le.rowCount+1,q},Da.prototype.setWindowAttributes=function(q,oe){var he=this.current708Packet.data,de=he[q],De=oe.currentWindow.winAttr;return de=he[++q],De.fillOpacity=(de&192)>>6,De.fillRed=(de&48)>>4,De.fillGreen=(de&12)>>2,De.fillBlue=de&3,de=he[++q],De.borderType=(de&192)>>6,De.borderRed=(de&48)>>4,De.borderGreen=(de&12)>>2,De.borderBlue=de&3,de=he[++q],De.borderType+=(de&128)>>5,De.wordWrap=(de&64)>>6,De.printDirection=(de&48)>>4,De.scrollDirection=(de&12)>>2,De.justify=de&3,de=he[++q],De.effectSpeed=(de&240)>>4,De.effectDirection=(de&12)>>2,De.displayEffect=de&3,q},Da.prototype.flushDisplayed=function(q,oe){for(var he=[],de=0;de<8;de++)oe.windows[de].visible&&!oe.windows[de].isEmpty()&&he.push(oe.windows[de].getText());oe.endPts=q,oe.text=he.join(`

`),this.pushCaption(oe),oe.startPts=q},Da.prototype.pushCaption=function(q){q.text!==""&&(this.trigger("data",{startPts:q.startPts,endPts:q.endPts,text:q.text,stream:"cc708_"+q.serviceNum}),q.text="",q.startPts=q.endPts)},Da.prototype.displayWindows=function(q,oe){var he=this.current708Packet.data,de=he[++q],De=this.getPts(q);this.flushDisplayed(De,oe);for(var Le=0;Le<8;Le++)de&1<<Le&&(oe.windows[Le].visible=1);return q},Da.prototype.hideWindows=function(q,oe){var he=this.current708Packet.data,de=he[++q],De=this.getPts(q);this.flushDisplayed(De,oe);for(var Le=0;Le<8;Le++)de&1<<Le&&(oe.windows[Le].visible=0);return q},Da.prototype.toggleWindows=function(q,oe){var he=this.current708Packet.data,de=he[++q],De=this.getPts(q);this.flushDisplayed(De,oe);for(var Le=0;Le<8;Le++)de&1<<Le&&(oe.windows[Le].visible^=1);return q},Da.prototype.clearWindows=function(q,oe){var he=this.current708Packet.data,de=he[++q],De=this.getPts(q);this.flushDisplayed(De,oe);for(var Le=0;Le<8;Le++)de&1<<Le&&oe.windows[Le].clearText();return q},Da.prototype.deleteWindows=function(q,oe){var he=this.current708Packet.data,de=he[++q],De=this.getPts(q);this.flushDisplayed(De,oe);for(var Le=0;Le<8;Le++)de&1<<Le&&oe.windows[Le].reset();return q},Da.prototype.setPenAttributes=function(q,oe){var he=this.current708Packet.data,de=he[q],De=oe.currentWindow.penAttr;return de=he[++q],De.textTag=(de&240)>>4,De.offset=(de&12)>>2,De.penSize=de&3,de=he[++q],De.italics=(de&128)>>7,De.underline=(de&64)>>6,De.edgeType=(de&56)>>3,De.fontStyle=de&7,q},Da.prototype.setPenColor=function(q,oe){var he=this.current708Packet.data,de=he[q],De=oe.currentWindow.penColor;return de=he[++q],De.fgOpacity=(de&192)>>6,De.fgRed=(de&48)>>4,De.fgGreen=(de&12)>>2,De.fgBlue=de&3,de=he[++q],De.bgOpacity=(de&192)>>6,De.bgRed=(de&48)>>4,De.bgGreen=(de&12)>>2,De.bgBlue=de&3,de=he[++q],De.edgeRed=(de&48)>>4,De.edgeGreen=(de&12)>>2,De.edgeBlue=de&3,q},Da.prototype.setPenLocation=function(q,oe){var he=this.current708Packet.data,de=he[q],De=oe.currentWindow.penLoc;return oe.currentWindow.pendingNewLine=!0,de=he[++q],De.row=de&15,de=he[++q],De.column=de&63,q},Da.prototype.reset=function(q,oe){var he=this.getPts(q);return this.flushDisplayed(he,oe),this.initService(oe.serviceNum,q)};var Gh={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ti=function(q){return q===null?"":(q=Gh[q]||q,String.fromCharCode(q))},Hs=14,Eo=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Mo=function(){for(var q=[],oe=Hs+1;oe--;)q.push({text:"",indent:0,offset:0});return q},Js=function(q,oe){Js.prototype.init.call(this),this.field_=q||0,this.dataChannel_=oe||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(he){var de,De,Le,xt,Dt;if(de=he.ccData&32639,de===this.lastControlCode_){this.lastControlCode_=null;return}if((de&61440)===4096?this.lastControlCode_=de:de!==this.PADDING_&&(this.lastControlCode_=null),Le=de>>>8,xt=de&255,de!==this.PADDING_)if(de===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(de===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(he.pts),this.flushDisplayed(he.pts),De=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=De,this.startPts_=he.pts;else if(de===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(he.pts);else if(de===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(he.pts);else if(de===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(he.pts);else if(de===this.CARRIAGE_RETURN_)this.clearFormatting(he.pts),this.flushDisplayed(he.pts),this.shiftRowsUp_(),this.startPts_=he.pts;else if(de===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(de===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(he.pts),this.displayed_=Mo();else if(de===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Mo();else if(de===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(he.pts),this.displayed_=Mo()),this.mode_="paintOn",this.startPts_=he.pts;else if(this.isSpecialCharacter(Le,xt))Le=(Le&3)<<8,Dt=Ti(Le|xt),this[this.mode_](he.pts,Dt),this.column_++;else if(this.isExtCharacter(Le,xt))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),Le=(Le&3)<<8,Dt=Ti(Le|xt),this[this.mode_](he.pts,Dt),this.column_++;else if(this.isMidRowCode(Le,xt))this.clearFormatting(he.pts),this[this.mode_](he.pts," "),this.column_++,(xt&14)===14&&this.addFormatting(he.pts,["i"]),(xt&1)===1&&this.addFormatting(he.pts,["u"]);else if(this.isOffsetControlCode(Le,xt)){let Jt=xt&3;this.nonDisplayed_[this.row_].offset=Jt,this.column_+=Jt}else if(this.isPAC(Le,xt)){var Ut=Eo.indexOf(de&7968);if(this.mode_==="rollUp"&&(Ut-this.rollUpRows_+1<0&&(Ut=this.rollUpRows_-1),this.setRollUp(he.pts,Ut)),Ut!==this.row_&&Ut>=0&&Ut<=14&&(this.clearFormatting(he.pts),this.row_=Ut),xt&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(he.pts,["u"]),(de&16)===16){let Jt=(de&14)>>1;this.column_=Jt*4,this.nonDisplayed_[this.row_].indent+=Jt}this.isColorPAC(xt)&&(xt&14)===14&&this.addFormatting(he.pts,["i"])}else this.isNormalChar(Le)&&(xt===0&&(xt=null),Dt=Ti(Le),Dt+=Ti(xt),this[this.mode_](he.pts,Dt),this.column_+=Dt.length)}};Js.prototype=new fr,Js.prototype.flushDisplayed=function(q){let oe=de=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+de+"."})},he=[];this.displayed_.forEach((de,De)=>{if(de&&de.text&&de.text.length){try{de.text=de.text.trim()}catch{oe(De)}de.text.length&&he.push({text:de.text,line:De+1,position:10+Math.min(70,de.indent*10)+de.offset*2.5})}else de==null&&oe(De)}),he.length&&this.trigger("data",{startPts:this.startPts_,endPts:q,content:he,stream:this.name_})},Js.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Mo(),this.nonDisplayed_=Mo(),this.lastControlCode_=null,this.column_=0,this.row_=Hs,this.rollUpRows_=2,this.formatting_=[]},Js.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Js.prototype.isSpecialCharacter=function(q,oe){return q===this.EXT_&&oe>=48&&oe<=63},Js.prototype.isExtCharacter=function(q,oe){return(q===this.EXT_+1||q===this.EXT_+2)&&oe>=32&&oe<=63},Js.prototype.isMidRowCode=function(q,oe){return q===this.EXT_&&oe>=32&&oe<=47},Js.prototype.isOffsetControlCode=function(q,oe){return q===this.OFFSET_&&oe>=33&&oe<=35},Js.prototype.isPAC=function(q,oe){return q>=this.BASE_&&q<this.BASE_+8&&oe>=64&&oe<=127},Js.prototype.isColorPAC=function(q){return q>=64&&q<=79||q>=96&&q<=127},Js.prototype.isNormalChar=function(q){return q>=32&&q<=127},Js.prototype.setRollUp=function(q,oe){if(this.mode_!=="rollUp"&&(this.row_=Hs,this.mode_="rollUp",this.flushDisplayed(q),this.nonDisplayed_=Mo(),this.displayed_=Mo()),oe!==void 0&&oe!==this.row_)for(var he=0;he<this.rollUpRows_;he++)this.displayed_[oe-he]=this.displayed_[this.row_-he],this.displayed_[this.row_-he]={text:"",indent:0,offset:0};oe===void 0&&(oe=this.row_),this.topRow_=oe-this.rollUpRows_+1},Js.prototype.addFormatting=function(q,oe){this.formatting_=this.formatting_.concat(oe);var he=oe.reduce(function(de,De){return de+"<"+De+">"},"");this[this.mode_](q,he)},Js.prototype.clearFormatting=function(q){if(this.formatting_.length){var oe=this.formatting_.reverse().reduce(function(he,de){return he+"</"+de+">"},"");this.formatting_=[],this[this.mode_](q,oe)}},Js.prototype.popOn=function(q,oe){var he=this.nonDisplayed_[this.row_].text;he+=oe,this.nonDisplayed_[this.row_].text=he},Js.prototype.rollUp=function(q,oe){var he=this.displayed_[this.row_].text;he+=oe,this.displayed_[this.row_].text=he},Js.prototype.shiftRowsUp_=function(){var q;for(q=0;q<this.topRow_;q++)this.displayed_[q]={text:"",indent:0,offset:0};for(q=this.row_+1;q<Hs+1;q++)this.displayed_[q]={text:"",indent:0,offset:0};for(q=this.topRow_;q<this.row_;q++)this.displayed_[q]=this.displayed_[q+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Js.prototype.paintOn=function(q,oe){var he=this.displayed_[this.row_].text;he+=oe,this.displayed_[this.row_].text=he};var td={CaptionStream:Nr,Cea608Stream:Js,Cea708Stream:Da},Ec={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Wh=n,gd=8589934592,eo=4294967296,Tu="shared",dp=function(q,oe){var he=1;for(q>oe&&(he=-1);Math.abs(oe-q)>eo;)q+=he*gd;return q},vd=function(q){var oe,he;vd.prototype.init.call(this),this.type_=q||Tu,this.push=function(de){if(de.type==="metadata"){this.trigger("data",de);return}this.type_!==Tu&&de.type!==this.type_||(he===void 0&&(he=de.dts),de.dts=dp(de.dts,he),de.pts=dp(de.pts,he),oe=de.dts,this.trigger("data",de))},this.flush=function(){he=oe,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){he=void 0,oe=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};vd.prototype=new Wh;var ch={TimestampRolloverStream:vd,handleRollover:dp},T1=(q,oe,he)=>{if(!q)return-1;for(var de=he;de<q.length;de++)if(q[de]===oe)return de;return-1},Wm={typedArrayIndexOf:T1},ia=Wm.typedArrayIndexOf,Fa={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},up=function(q,oe,he){var de,De="";for(de=oe;de<he;de++)De+="%"+("00"+q[de].toString(16)).slice(-2);return De},vl=function(q,oe,he){return decodeURIComponent(up(q,oe,he))},Jl=function(q,oe,he){return unescape(up(q,oe,he))},Du=function(q){return q[0]<<21|q[1]<<14|q[2]<<7|q[3]},uo={APIC:function(q){var oe=1,he,de,De="-->";q.data[0]===Fa.Utf8&&(he=ia(q.data,0,oe),!(he<0)&&(q.mimeType=Jl(q.data,oe,he),oe=he+1,q.pictureType=q.data[oe],oe++,de=ia(q.data,0,oe),!(de<0)&&(q.description=vl(q.data,oe,de),oe=de+1,q.mimeType===De?q.url=Jl(q.data,oe,q.data.length):q.pictureData=q.data.subarray(oe,q.data.length))))},"T*":function(q){q.data[0]===Fa.Utf8&&(q.value=vl(q.data,1,q.data.length).replace(/\0*$/,""),q.values=q.value.split("\0"))},TXXX:function(q){var oe;q.data[0]===Fa.Utf8&&(oe=ia(q.data,0,1),oe!==-1&&(q.description=vl(q.data,1,oe),q.value=vl(q.data,oe+1,q.data.length).replace(/\0*$/,""),q.data=q.value))},"W*":function(q){q.url=Jl(q.data,0,q.data.length).replace(/\0.*$/,"")},WXXX:function(q){var oe;q.data[0]===Fa.Utf8&&(oe=ia(q.data,0,1),oe!==-1&&(q.description=vl(q.data,1,oe),q.url=Jl(q.data,oe+1,q.data.length).replace(/\0.*$/,"")))},PRIV:function(q){var oe;for(oe=0;oe<q.data.length;oe++)if(q.data[oe]===0){q.owner=Jl(q.data,0,oe);break}q.privateData=q.data.subarray(oe+1),q.data=q.privateData}},yl=function(q){var oe,he,de=10,De=0,Le=[];if(!(q.length<10||q[0]!==73||q[1]!==68||q[2]!==51)){De=Du(q.subarray(6,10)),De+=10;var xt=q[5]&64;xt&&(de+=4,de+=Du(q.subarray(10,14)),De-=Du(q.subarray(16,20)));do{if(oe=Du(q.subarray(de+4,de+8)),oe<1)break;he=String.fromCharCode(q[de],q[de+1],q[de+2],q[de+3]);var Dt={id:he,data:q.subarray(de+10,de+oe+10)};Dt.key=Dt.id,uo[Dt.id]?uo[Dt.id](Dt):Dt.id[0]==="T"?uo["T*"](Dt):Dt.id[0]==="W"&&uo["W*"](Dt),Le.push(Dt),de+=10,de+=oe}while(de<De);return Le}},Bp={parseId3Frames:yl,parseSyncSafeInteger:Du,frameParsers:uo},zp=n,id=Ec,Bc=Bp,ec;ec=function(q){var oe={descriptor:q&&q.descriptor},he=0,de=[],De=0,Le;if(ec.prototype.init.call(this),this.dispatchType=id.METADATA_STREAM_TYPE.toString(16),oe.descriptor)for(Le=0;Le<oe.descriptor.length;Le++)this.dispatchType+=("00"+oe.descriptor[Le].toString(16)).slice(-2);this.push=function(xt){var Dt,Ut,Jt,gi,Si,Tr;if(xt.type==="timed-metadata"){if(xt.dataAlignmentIndicator&&(De=0,de.length=0),de.length===0&&(xt.data.length<10||xt.data[0]!==73||xt.data[1]!==68||xt.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(de.push(xt),De+=xt.data.byteLength,de.length===1&&(he=Bc.parseSyncSafeInteger(xt.data.subarray(6,10)),he+=10),!(De<he)){for(Dt={data:new Uint8Array(he),frames:[],pts:de[0].pts,dts:de[0].dts},Si=0;Si<he;)Dt.data.set(de[0].data.subarray(0,he-Si),Si),Si+=de[0].data.byteLength,De-=de[0].data.byteLength,de.shift();Ut=10,Dt.data[5]&64&&(Ut+=4,Ut+=Bc.parseSyncSafeInteger(Dt.data.subarray(10,14)),he-=Bc.parseSyncSafeInteger(Dt.data.subarray(16,20)));do{if(Jt=Bc.parseSyncSafeInteger(Dt.data.subarray(Ut+4,Ut+8)),Jt<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(Tr=String.fromCharCode(Dt.data[Ut],Dt.data[Ut+1],Dt.data[Ut+2],Dt.data[Ut+3]),gi={id:Tr,data:Dt.data.subarray(Ut+10,Ut+Jt+10)},gi.key=gi.id,Bc.frameParsers[gi.id]?Bc.frameParsers[gi.id](gi):gi.id[0]==="T"?Bc.frameParsers["T*"](gi):gi.id[0]==="W"&&Bc.frameParsers["W*"](gi),gi.owner==="com.apple.streaming.transportStreamTimestamp"){var ae=gi.data,Ds=(ae[3]&1)<<30|ae[4]<<22|ae[5]<<14|ae[6]<<6|ae[7]>>>2;Ds*=4,Ds+=ae[7]&3,gi.timeStamp=Ds,Dt.pts===void 0&&Dt.dts===void 0&&(Dt.pts=gi.timeStamp,Dt.dts=gi.timeStamp),this.trigger("timestamp",gi)}Dt.frames.push(gi),Ut+=10,Ut+=Jt}while(Ut<he);this.trigger("data",Dt)}}}},ec.prototype=new zp;var yd=ec,bo=n,ba=td,Bl=Ec,Yo=ch.TimestampRolloverStream,dh,mc,Pd,ju=188,hp=71;dh=function(){var q=new Uint8Array(ju),oe=0;dh.prototype.init.call(this),this.push=function(he){var de=0,De=ju,Le;for(oe?(Le=new Uint8Array(he.byteLength+oe),Le.set(q.subarray(0,oe)),Le.set(he,oe),oe=0):Le=he;De<Le.byteLength;){if(Le[de]===hp&&Le[De]===hp){this.trigger("data",Le.subarray(de,De)),de+=ju,De+=ju;continue}de++,De++}de<Le.byteLength&&(q.set(Le.subarray(de),0),oe=Le.byteLength-de)},this.flush=function(){oe===ju&&q[0]===hp&&(this.trigger("data",q),oe=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){oe=0,this.trigger("reset")}},dh.prototype=new bo,mc=function(){var q,oe,he,de;mc.prototype.init.call(this),de=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,q=function(De,Le){var xt=0;Le.payloadUnitStartIndicator&&(xt+=De[xt]+1),Le.type==="pat"?oe(De.subarray(xt),Le):he(De.subarray(xt),Le)},oe=function(De,Le){Le.section_number=De[7],Le.last_section_number=De[8],de.pmtPid=(De[10]&31)<<8|De[11],Le.pmtPid=de.pmtPid},he=function(De,Le){var xt,Dt,Ut,Jt;if(De[5]&1){for(de.programMapTable={video:null,audio:null,"timed-metadata":{}},xt=(De[1]&15)<<8|De[2],Dt=3+xt-4,Ut=(De[10]&15)<<8|De[11],Jt=12+Ut;Jt<Dt;){var gi=De[Jt],Si=(De[Jt+1]&31)<<8|De[Jt+2];gi===Bl.H264_STREAM_TYPE&&de.programMapTable.video===null?de.programMapTable.video=Si:gi===Bl.ADTS_STREAM_TYPE&&de.programMapTable.audio===null?de.programMapTable.audio=Si:gi===Bl.METADATA_STREAM_TYPE&&(de.programMapTable["timed-metadata"][Si]=gi),Jt+=((De[Jt+3]&15)<<8|De[Jt+4])+5}Le.programMapTable=de.programMapTable}},this.push=function(De){var Le={},xt=4;if(Le.payloadUnitStartIndicator=!!(De[1]&64),Le.pid=De[1]&31,Le.pid<<=8,Le.pid|=De[2],(De[3]&48)>>>4>1&&(xt+=De[xt]+1),Le.pid===0)Le.type="pat",q(De.subarray(xt),Le),this.trigger("data",Le);else if(Le.pid===this.pmtPid)for(Le.type="pmt",q(De.subarray(xt),Le),this.trigger("data",Le);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([De,xt,Le]):this.processPes_(De,xt,Le)},this.processPes_=function(De,Le,xt){xt.pid===this.programMapTable.video?xt.streamType=Bl.H264_STREAM_TYPE:xt.pid===this.programMapTable.audio?xt.streamType=Bl.ADTS_STREAM_TYPE:xt.streamType=this.programMapTable["timed-metadata"][xt.pid],xt.type="pes",xt.data=De.subarray(Le),this.trigger("data",xt)}},mc.prototype=new bo,mc.STREAM_TYPES={h264:27,adts:15},Pd=function(){var q=this,oe=!1,he={data:[],size:0},de={data:[],size:0},De={data:[],size:0},Le,xt=function(Ut,Jt){var gi;let Si=Ut[0]<<16|Ut[1]<<8|Ut[2];Jt.data=new Uint8Array,Si===1&&(Jt.packetLength=6+(Ut[4]<<8|Ut[5]),Jt.dataAlignmentIndicator=(Ut[6]&4)!==0,gi=Ut[7],gi&192&&(Jt.pts=(Ut[9]&14)<<27|(Ut[10]&255)<<20|(Ut[11]&254)<<12|(Ut[12]&255)<<5|(Ut[13]&254)>>>3,Jt.pts*=4,Jt.pts+=(Ut[13]&6)>>>1,Jt.dts=Jt.pts,gi&64&&(Jt.dts=(Ut[14]&14)<<27|(Ut[15]&255)<<20|(Ut[16]&254)<<12|(Ut[17]&255)<<5|(Ut[18]&254)>>>3,Jt.dts*=4,Jt.dts+=(Ut[18]&6)>>>1)),Jt.data=Ut.subarray(9+Ut[8]))},Dt=function(Ut,Jt,gi){var Si=new Uint8Array(Ut.size),Tr={type:Jt},ae=0,Ds=0,lo=!1,Zo;if(!(!Ut.data.length||Ut.size<9)){for(Tr.trackId=Ut.data[0].pid,ae=0;ae<Ut.data.length;ae++)Zo=Ut.data[ae],Si.set(Zo.data,Ds),Ds+=Zo.data.byteLength;xt(Si,Tr),lo=Jt==="video"||Tr.packetLength<=Ut.size,(gi||lo)&&(Ut.size=0,Ut.data.length=0),lo&&q.trigger("data",Tr)}};Pd.prototype.init.call(this),this.push=function(Ut){({pat:function(){},pes:function(){var Jt,gi;switch(Ut.streamType){case Bl.H264_STREAM_TYPE:Jt=he,gi="video";break;case Bl.ADTS_STREAM_TYPE:Jt=de,gi="audio";break;case Bl.METADATA_STREAM_TYPE:Jt=De,gi="timed-metadata";break;default:return}Ut.payloadUnitStartIndicator&&Dt(Jt,gi,!0),Jt.data.push(Ut),Jt.size+=Ut.data.byteLength},pmt:function(){var Jt={type:"metadata",tracks:[]};Le=Ut.programMapTable,Le.video!==null&&Jt.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Le.video,codec:"avc",type:"video"}),Le.audio!==null&&Jt.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Le.audio,codec:"adts",type:"audio"}),oe=!0,q.trigger("data",Jt)}})[Ut.type]()},this.reset=function(){he.size=0,he.data.length=0,de.size=0,de.data.length=0,this.trigger("reset")},this.flushStreams_=function(){Dt(he,"video"),Dt(de,"audio"),Dt(De,"timed-metadata")},this.flush=function(){if(!oe&&Le){var Ut={type:"metadata",tracks:[]};Le.video!==null&&Ut.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Le.video,codec:"avc",type:"video"}),Le.audio!==null&&Ut.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+Le.audio,codec:"adts",type:"audio"}),q.trigger("data",Ut)}oe=!1,this.flushStreams_(),this.trigger("done")}},Pd.prototype=new bo;var Uh={PAT_PID:0,MP2T_PACKET_LENGTH:ju,TransportPacketStream:dh,TransportParseStream:mc,ElementaryStream:Pd,TimestampRolloverStream:Yo,CaptionStream:ba.CaptionStream,Cea608Stream:ba.Cea608Stream,Cea708Stream:ba.Cea708Stream,MetadataStream:yd};for(var $u in Bl)Bl.hasOwnProperty($u)&&(Uh[$u]=Bl[$u]);var Um=Uh,Ff=n,Hp=Xs.ONE_SECOND_IN_TS,Eu,wo=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Eu=function(q){var oe,he=0;Eu.prototype.init.call(this),this.skipWarn_=function(de,De){this.trigger("log",{level:"warn",message:`adts skiping bytes ${de} to ${De} in frame ${he} outside syncword`})},this.push=function(de){var De=0,Le,xt,Dt,Ut,Jt;if(q||(he=0),de.type==="audio"){oe&&oe.length?(Dt=oe,oe=new Uint8Array(Dt.byteLength+de.data.byteLength),oe.set(Dt),oe.set(de.data,Dt.byteLength)):oe=de.data;for(var gi;De+7<oe.length;){if(oe[De]!==255||(oe[De+1]&246)!==240){typeof gi!="number"&&(gi=De),De++;continue}if(typeof gi=="number"&&(this.skipWarn_(gi,De),gi=null),xt=(~oe[De+1]&1)*2,Le=(oe[De+3]&3)<<11|oe[De+4]<<3|(oe[De+5]&224)>>5,Ut=((oe[De+6]&3)+1)*1024,Jt=Ut*Hp/wo[(oe[De+2]&60)>>>2],oe.byteLength-De<Le)break;this.trigger("data",{pts:de.pts+he*Jt,dts:de.dts+he*Jt,sampleCount:Ut,audioobjecttype:(oe[De+2]>>>6&3)+1,channelcount:(oe[De+2]&1)<<2|(oe[De+3]&192)>>>6,samplerate:wo[(oe[De+2]&60)>>>2],samplingfrequencyindex:(oe[De+2]&60)>>>2,samplesize:16,data:oe.subarray(De+7+xt,De+Le)}),he++,De+=Le}typeof gi=="number"&&(this.skipWarn_(gi,De),gi=null),oe=oe.subarray(De)}},this.flush=function(){he=0,this.trigger("done")},this.reset=function(){oe=void 0,this.trigger("reset")},this.endTimeline=function(){oe=void 0,this.trigger("endedtimeline")}},Eu.prototype=new Ff;var uh=Eu,rl;rl=function(q){var oe=q.byteLength,he=0,de=0;this.length=function(){return 8*oe},this.bitsAvailable=function(){return 8*oe+de},this.loadWord=function(){var De=q.byteLength-oe,Le=new Uint8Array(4),xt=Math.min(4,oe);if(xt===0)throw new Error("no bytes available");Le.set(q.subarray(De,De+xt)),he=new DataView(Le.buffer).getUint32(0),de=xt*8,oe-=xt},this.skipBits=function(De){var Le;de>De?(he<<=De,de-=De):(De-=de,Le=Math.floor(De/8),De-=Le*8,oe-=Le,this.loadWord(),he<<=De,de-=De)},this.readBits=function(De){var Le=Math.min(de,De),xt=he>>>32-Le;return de-=Le,de>0?he<<=Le:oe>0&&this.loadWord(),Le=De-Le,Le>0?xt<<Le|this.readBits(Le):xt},this.skipLeadingZeros=function(){var De;for(De=0;De<de;++De)if(he&2147483648>>>De)return he<<=De,de-=De,De;return this.loadWord(),De+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var De=this.skipLeadingZeros();return this.readBits(De+1)-1},this.readExpGolomb=function(){var De=this.readUnsignedExpGolomb();return 1&De?1+De>>>1:-1*(De>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var pp=rl,Gp=n,d0=pp,jm,nd,D1;nd=function(){var q=0,oe,he;nd.prototype.init.call(this),this.push=function(de){var De;he?(De=new Uint8Array(he.byteLength+de.data.byteLength),De.set(he),De.set(de.data,he.byteLength),he=De):he=de.data;for(var Le=he.byteLength;q<Le-3;q++)if(he[q+2]===1){oe=q+5;break}for(;oe<Le;)switch(he[oe]){case 0:if(he[oe-1]!==0){oe+=2;break}else if(he[oe-2]!==0){oe++;break}q+3!==oe-2&&this.trigger("data",he.subarray(q+3,oe-2));do oe++;while(he[oe]!==1&&oe<Le);q=oe-2,oe+=3;break;case 1:if(he[oe-1]!==0||he[oe-2]!==0){oe+=3;break}this.trigger("data",he.subarray(q+3,oe-2)),q=oe-2,oe+=3;break;default:oe+=3;break}he=he.subarray(q),oe-=q,q=0},this.reset=function(){he=null,q=0,this.trigger("reset")},this.flush=function(){he&&he.byteLength>3&&this.trigger("data",he.subarray(q+3)),he=null,q=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},nd.prototype=new Gp,D1={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},jm=function(){var q=new nd,oe,he,de,De,Le,xt,Dt;jm.prototype.init.call(this),oe=this,this.push=function(Ut){Ut.type==="video"&&(he=Ut.trackId,de=Ut.pts,De=Ut.dts,q.push(Ut))},q.on("data",function(Ut){var Jt={trackId:he,pts:de,dts:De,data:Ut,nalUnitTypeCode:Ut[0]&31};switch(Jt.nalUnitTypeCode){case 5:Jt.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:Jt.nalUnitType="sei_rbsp",Jt.escapedRBSP=Le(Ut.subarray(1));break;case 7:Jt.nalUnitType="seq_parameter_set_rbsp",Jt.escapedRBSP=Le(Ut.subarray(1)),Jt.config=xt(Jt.escapedRBSP);break;case 8:Jt.nalUnitType="pic_parameter_set_rbsp";break;case 9:Jt.nalUnitType="access_unit_delimiter_rbsp";break}oe.trigger("data",Jt)}),q.on("done",function(){oe.trigger("done")}),q.on("partialdone",function(){oe.trigger("partialdone")}),q.on("reset",function(){oe.trigger("reset")}),q.on("endedtimeline",function(){oe.trigger("endedtimeline")}),this.flush=function(){q.flush()},this.partialFlush=function(){q.partialFlush()},this.reset=function(){q.reset()},this.endTimeline=function(){q.endTimeline()},Dt=function(Ut,Jt){var gi=8,Si=8,Tr,ae;for(Tr=0;Tr<Ut;Tr++)Si!==0&&(ae=Jt.readExpGolomb(),Si=(gi+ae+256)%256),gi=Si===0?gi:Si},Le=function(Ut){for(var Jt=Ut.byteLength,gi=[],Si=1,Tr,ae;Si<Jt-2;)Ut[Si]===0&&Ut[Si+1]===0&&Ut[Si+2]===3?(gi.push(Si+2),Si+=2):Si++;if(gi.length===0)return Ut;Tr=Jt-gi.length,ae=new Uint8Array(Tr);var Ds=0;for(Si=0;Si<Tr;Ds++,Si++)Ds===gi[0]&&(Ds++,gi.shift()),ae[Si]=Ut[Ds];return ae},xt=function(Ut){var Jt=0,gi=0,Si=0,Tr=0,ae,Ds,lo,Zo,hr,h0,M_,k_,qu,p0,I_,Kd=[1,1],A_,O2;if(ae=new d0(Ut),Ds=ae.readUnsignedByte(),Zo=ae.readUnsignedByte(),lo=ae.readUnsignedByte(),ae.skipUnsignedExpGolomb(),D1[Ds]&&(hr=ae.readUnsignedExpGolomb(),hr===3&&ae.skipBits(1),ae.skipUnsignedExpGolomb(),ae.skipUnsignedExpGolomb(),ae.skipBits(1),ae.readBoolean()))for(I_=hr!==3?8:12,O2=0;O2<I_;O2++)ae.readBoolean()&&(O2<6?Dt(16,ae):Dt(64,ae));if(ae.skipUnsignedExpGolomb(),h0=ae.readUnsignedExpGolomb(),h0===0)ae.readUnsignedExpGolomb();else if(h0===1)for(ae.skipBits(1),ae.skipExpGolomb(),ae.skipExpGolomb(),M_=ae.readUnsignedExpGolomb(),O2=0;O2<M_;O2++)ae.skipExpGolomb();if(ae.skipUnsignedExpGolomb(),ae.skipBits(1),k_=ae.readUnsignedExpGolomb(),qu=ae.readUnsignedExpGolomb(),p0=ae.readBits(1),p0===0&&ae.skipBits(1),ae.skipBits(1),ae.readBoolean()&&(Jt=ae.readUnsignedExpGolomb(),gi=ae.readUnsignedExpGolomb(),Si=ae.readUnsignedExpGolomb(),Tr=ae.readUnsignedExpGolomb()),ae.readBoolean()&&ae.readBoolean()){switch(A_=ae.readUnsignedByte(),A_){case 1:Kd=[1,1];break;case 2:Kd=[12,11];break;case 3:Kd=[10,11];break;case 4:Kd=[16,11];break;case 5:Kd=[40,33];break;case 6:Kd=[24,11];break;case 7:Kd=[20,11];break;case 8:Kd=[32,11];break;case 9:Kd=[80,33];break;case 10:Kd=[18,11];break;case 11:Kd=[15,11];break;case 12:Kd=[64,33];break;case 13:Kd=[160,99];break;case 14:Kd=[4,3];break;case 15:Kd=[3,2];break;case 16:Kd=[2,1];break;case 255:{Kd=[ae.readUnsignedByte()<<8|ae.readUnsignedByte(),ae.readUnsignedByte()<<8|ae.readUnsignedByte()];break}}Kd&&Kd[0]/Kd[1]}return{profileIdc:Ds,levelIdc:lo,profileCompatibility:Zo,width:(k_+1)*16-Jt*2-gi*2,height:(2-p0)*(qu+1)*16-Si*2-Tr*2,sarRatio:Kd}}},jm.prototype=new Gp;var Lf={H264Stream:jm,NalByteStream:nd},Yr=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ps=function(q,oe){var he=q[oe+6]<<21|q[oe+7]<<14|q[oe+8]<<7|q[oe+9],de=q[oe+5],De=(de&16)>>4;return he=he>=0?he:0,De?he+20:he+10},$m=function(q,oe){return q.length-oe<10||q[oe]!==73||q[oe+1]!==68||q[oe+2]!==51?oe:(oe+=ps(q,oe),$m(q,oe))},hh=function(q){var oe=$m(q,0);return q.length>=oe+2&&(q[oe]&255)===255&&(q[oe+1]&240)===240&&(q[oe+1]&22)===16},Ku=function(q){return q[0]<<21|q[1]<<14|q[2]<<7|q[3]},E1=function(q,oe,he){var de,De="";for(de=oe;de<he;de++)De+="%"+("00"+q[de].toString(16)).slice(-2);return De},Wp=function(q,oe,he){return unescape(E1(q,oe,he))},Dl=function(q,oe){var he=(q[oe+5]&224)>>5,de=q[oe+4]<<3,De=q[oe+3]&6144;return De|de|he},M1=function(q,oe){return q[oe]===73&&q[oe+1]===68&&q[oe+2]===51?"timed-metadata":q[oe]&!0&&(q[oe+1]&240)===240?"audio":null},Ca=function(q){for(var oe=0;oe+5<q.length;){if(q[oe]!==255||(q[oe+1]&246)!==240){oe++;continue}return Yr[(q[oe+2]&60)>>>2]}return null},la=function(q){var oe,he,de,De;oe=10,q[5]&64&&(oe+=4,oe+=Ku(q.subarray(10,14)));do{if(he=Ku(q.subarray(oe+4,oe+8)),he<1)return null;if(De=String.fromCharCode(q[oe],q[oe+1],q[oe+2],q[oe+3]),De==="PRIV"){de=q.subarray(oe+10,oe+he+10);for(var Le=0;Le<de.byteLength;Le++)if(de[Le]===0){var xt=Wp(de,0,Le);if(xt==="com.apple.streaming.transportStreamTimestamp"){var Dt=de.subarray(Le+1),Ut=(Dt[3]&1)<<30|Dt[4]<<22|Dt[5]<<14|Dt[6]<<6|Dt[7]>>>2;return Ut*=4,Ut+=Dt[7]&3,Ut}break}}oe+=10,oe+=he}while(oe<q.byteLength);return null},oc={isLikelyAacData:hh,parseId3TagSize:ps,parseAdtsSize:Dl,parseType:M1,parseSampleRate:Ca,parseAacTimestamp:la},fc=n,Fs=oc,_d;_d=function(){var q=new Uint8Array,oe=0;_d.prototype.init.call(this),this.setTimestamp=function(he){oe=he},this.push=function(he){var de=0,De=0,Le,xt,Dt,Ut;for(q.length?(Ut=q.length,q=new Uint8Array(he.byteLength+Ut),q.set(q.subarray(0,Ut)),q.set(he,Ut)):q=he;q.length-De>=3;){if(q[De]===73&&q[De+1]===68&&q[De+2]===51){if(q.length-De<10||(de=Fs.parseId3TagSize(q,De),De+de>q.length))break;xt={type:"timed-metadata",data:q.subarray(De,De+de)},this.trigger("data",xt),De+=de;continue}else if((q[De]&255)===255&&(q[De+1]&240)===240){if(q.length-De<7||(de=Fs.parseAdtsSize(q,De),De+de>q.length))break;Dt={type:"audio",data:q.subarray(De,De+de),pts:oe,dts:oe},this.trigger("data",Dt),De+=de;continue}De++}Le=q.length-De,Le>0?q=q.subarray(De):q=new Uint8Array},this.reset=function(){q=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){q=new Uint8Array,this.trigger("endedtimeline")}},_d.prototype=new fc;var Go=_d,k1=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],H=k1,te=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],ge=te,ke=n,He=ot,Ne=Fn,ct=aa,kt=Vl,Ht=Um,hi=Xs,Li=uh,nn=Lf.H264Stream,Ii=Go,Oi=oc.isLikelyAacData,is=Xs.ONE_SECOND_IN_TS,Io=H,Ao=ge,sl,Ea,$d,rd,Ro=function(q,oe){oe.stream=q,this.trigger("log",oe)},gc=function(q,oe){for(var he=Object.keys(oe),de=0;de<he.length;de++){var De=he[de];De==="headOfPipeline"||!oe[De].on||oe[De].on("log",Ro.bind(q,De))}},ho=function(q,oe){var he;if(q.length!==oe.length)return!1;for(he=0;he<q.length;he++)if(q[he]!==oe[he])return!1;return!0},Fo=function(q,oe,he,de,De,Le){var xt=he-oe,Dt=de-oe,Ut=De-he;return{start:{dts:q,pts:q+xt},end:{dts:q+Dt,pts:q+Ut},prependedContentDuration:Le,baseMediaDecodeTime:q}};Ea=function(q,oe){var he=[],de,De=0,Le=0,xt=1/0;oe=oe||{},de=oe.firstSequenceNumber||0,Ea.prototype.init.call(this),this.push=function(Dt){kt.collectDtsInfo(q,Dt),q&&Io.forEach(function(Ut){q[Ut]=Dt[Ut]}),he.push(Dt)},this.setEarliestDts=function(Dt){De=Dt},this.setVideoBaseMediaDecodeTime=function(Dt){xt=Dt},this.setAudioAppendStart=function(Dt){Le=Dt},this.flush=function(){var Dt,Ut,Jt,gi,Si,Tr,ae;if(he.length===0){this.trigger("done","AudioSegmentStream");return}Dt=ct.trimAdtsFramesByEarliestDts(he,q,De),q.baseMediaDecodeTime=kt.calculateTrackBaseMediaDecodeTime(q,oe.keepOriginalTimestamps),ae=ct.prefixWithSilence(q,Dt,Le,xt),q.samples=ct.generateSampleTable(Dt),Jt=He.mdat(ct.concatenateFrameData(Dt)),he=[],Ut=He.moof(de,[q]),gi=new Uint8Array(Ut.byteLength+Jt.byteLength),de++,gi.set(Ut),gi.set(Jt,Ut.byteLength),kt.clearDtsInfo(q),Si=Math.ceil(is*1024/q.samplerate),Dt.length&&(Tr=Dt.length*Si,this.trigger("segmentTimingInfo",Fo(hi.audioTsToVideoTs(q.baseMediaDecodeTime,q.samplerate),Dt[0].dts,Dt[0].pts,Dt[0].dts+Tr,Dt[0].pts+Tr,ae||0)),this.trigger("timingInfo",{start:Dt[0].pts,end:Dt[0].pts+Tr})),this.trigger("data",{track:q,boxes:gi}),this.trigger("done","AudioSegmentStream")},this.reset=function(){kt.clearDtsInfo(q),he=[],this.trigger("reset")}},Ea.prototype=new ke,sl=function(q,oe){var he,de=[],De=[],Le,xt;oe=oe||{},he=oe.firstSequenceNumber||0,sl.prototype.init.call(this),delete q.minPTS,this.gopCache_=[],this.push=function(Dt){kt.collectDtsInfo(q,Dt),Dt.nalUnitType==="seq_parameter_set_rbsp"&&!Le&&(Le=Dt.config,q.sps=[Dt.data],Ao.forEach(function(Ut){q[Ut]=Le[Ut]},this)),Dt.nalUnitType==="pic_parameter_set_rbsp"&&!xt&&(xt=Dt.data,q.pps=[Dt.data]),de.push(Dt)},this.flush=function(){for(var Dt,Ut,Jt,gi,Si,Tr,ae=0,Ds,lo;de.length&&de[0].nalUnitType!=="access_unit_delimiter_rbsp";)de.shift();if(de.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(Dt=Ne.groupNalsIntoFrames(de),Jt=Ne.groupFramesIntoGops(Dt),Jt[0][0].keyFrame||(Ut=this.getGopForFusion_(de[0],q),Ut?(ae=Ut.duration,Jt.unshift(Ut),Jt.byteLength+=Ut.byteLength,Jt.nalCount+=Ut.nalCount,Jt.pts=Ut.pts,Jt.dts=Ut.dts,Jt.duration+=Ut.duration):Jt=Ne.extendFirstKeyFrame(Jt)),De.length){var Zo;if(oe.alignGopsAtEnd?Zo=this.alignGopsAtEnd_(Jt):Zo=this.alignGopsAtStart_(Jt),!Zo){this.gopCache_.unshift({gop:Jt.pop(),pps:q.pps,sps:q.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),de=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}kt.clearDtsInfo(q),Jt=Zo}kt.collectDtsInfo(q,Jt),q.samples=Ne.generateSampleTable(Jt),Si=He.mdat(Ne.concatenateNalData(Jt)),q.baseMediaDecodeTime=kt.calculateTrackBaseMediaDecodeTime(q,oe.keepOriginalTimestamps),this.trigger("processedGopsInfo",Jt.map(function(hr){return{pts:hr.pts,dts:hr.dts,byteLength:hr.byteLength}})),Ds=Jt[0],lo=Jt[Jt.length-1],this.trigger("segmentTimingInfo",Fo(q.baseMediaDecodeTime,Ds.dts,Ds.pts,lo.dts+lo.duration,lo.pts+lo.duration,ae)),this.trigger("timingInfo",{start:Jt[0].pts,end:Jt[Jt.length-1].pts+Jt[Jt.length-1].duration}),this.gopCache_.unshift({gop:Jt.pop(),pps:q.pps,sps:q.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),de=[],this.trigger("baseMediaDecodeTime",q.baseMediaDecodeTime),this.trigger("timelineStartInfo",q.timelineStartInfo),gi=He.moof(he,[q]),Tr=new Uint8Array(gi.byteLength+Si.byteLength),he++,Tr.set(gi),Tr.set(Si,gi.byteLength),this.trigger("data",{track:q,boxes:Tr}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),de=[],this.gopCache_.length=0,De.length=0,this.trigger("reset")},this.resetStream_=function(){kt.clearDtsInfo(q),Le=void 0,xt=void 0},this.getGopForFusion_=function(Dt){var Ut=45e3,Jt=1e4,gi=1/0,Si,Tr,ae,Ds,lo;for(lo=0;lo<this.gopCache_.length;lo++)Ds=this.gopCache_[lo],ae=Ds.gop,!(!(q.pps&&ho(q.pps[0],Ds.pps[0]))||!(q.sps&&ho(q.sps[0],Ds.sps[0])))&&(ae.dts<q.timelineStartInfo.dts||(Si=Dt.dts-ae.dts-ae.duration,Si>=-Jt&&Si<=Ut&&(!Tr||gi>Si)&&(Tr=Ds,gi=Si)));return Tr?Tr.gop:null},this.alignGopsAtStart_=function(Dt){var Ut,Jt,gi,Si,Tr,ae,Ds,lo;for(Tr=Dt.byteLength,ae=Dt.nalCount,Ds=Dt.duration,Ut=Jt=0;Ut<De.length&&Jt<Dt.length&&(gi=De[Ut],Si=Dt[Jt],gi.pts!==Si.pts);){if(Si.pts>gi.pts){Ut++;continue}Jt++,Tr-=Si.byteLength,ae-=Si.nalCount,Ds-=Si.duration}return Jt===0?Dt:Jt===Dt.length?null:(lo=Dt.slice(Jt),lo.byteLength=Tr,lo.duration=Ds,lo.nalCount=ae,lo.pts=lo[0].pts,lo.dts=lo[0].dts,lo)},this.alignGopsAtEnd_=function(Dt){var Ut,Jt,gi,Si,Tr,ae;for(Ut=De.length-1,Jt=Dt.length-1,Tr=null,ae=!1;Ut>=0&&Jt>=0;){if(gi=De[Ut],Si=Dt[Jt],gi.pts===Si.pts){ae=!0;break}if(gi.pts>Si.pts){Ut--;continue}Ut===De.length-1&&(Tr=Jt),Jt--}if(!ae&&Tr===null)return null;var Ds;if(ae?Ds=Jt:Ds=Tr,Ds===0)return Dt;var lo=Dt.slice(Ds),Zo=lo.reduce(function(hr,h0){return hr.byteLength+=h0.byteLength,hr.duration+=h0.duration,hr.nalCount+=h0.nalCount,hr},{byteLength:0,duration:0,nalCount:0});return lo.byteLength=Zo.byteLength,lo.duration=Zo.duration,lo.nalCount=Zo.nalCount,lo.pts=lo[0].pts,lo.dts=lo[0].dts,lo},this.alignGopsWith=function(Dt){De=Dt}},sl.prototype=new ke,rd=function(q,oe){this.numberOfTracks=0,this.metadataStream=oe,q=q||{},typeof q.remux<"u"?this.remuxTracks=!!q.remux:this.remuxTracks=!0,typeof q.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=q.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,rd.prototype.init.call(this),this.push=function(he){if(he.content||he.text)return this.pendingCaptions.push(he);if(he.frames)return this.pendingMetadata.push(he);this.pendingTracks.push(he.track),this.pendingBytes+=he.boxes.byteLength,he.track.type==="video"&&(this.videoTrack=he.track,this.pendingBoxes.push(he.boxes)),he.track.type==="audio"&&(this.audioTrack=he.track,this.pendingBoxes.unshift(he.boxes))}},rd.prototype=new ke,rd.prototype.flush=function(q){var oe=0,he={captions:[],captionStreams:{},metadata:[],info:{}},de,De,Le,xt=0,Dt;if(this.pendingTracks.length<this.numberOfTracks){if(q!=="VideoSegmentStream"&&q!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(xt=this.videoTrack.timelineStartInfo.pts,Ao.forEach(function(Ut){he.info[Ut]=this.videoTrack[Ut]},this)):this.audioTrack&&(xt=this.audioTrack.timelineStartInfo.pts,Io.forEach(function(Ut){he.info[Ut]=this.audioTrack[Ut]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?he.type=this.pendingTracks[0].type:he.type="combined",this.emittedTracks+=this.pendingTracks.length,Le=He.initSegment(this.pendingTracks),he.initSegment=new Uint8Array(Le.byteLength),he.initSegment.set(Le),he.data=new Uint8Array(this.pendingBytes),Dt=0;Dt<this.pendingBoxes.length;Dt++)he.data.set(this.pendingBoxes[Dt],oe),oe+=this.pendingBoxes[Dt].byteLength;for(Dt=0;Dt<this.pendingCaptions.length;Dt++)de=this.pendingCaptions[Dt],de.startTime=hi.metadataTsToSeconds(de.startPts,xt,this.keepOriginalTimestamps),de.endTime=hi.metadataTsToSeconds(de.endPts,xt,this.keepOriginalTimestamps),he.captionStreams[de.stream]=!0,he.captions.push(de);for(Dt=0;Dt<this.pendingMetadata.length;Dt++)De=this.pendingMetadata[Dt],De.cueTime=hi.metadataTsToSeconds(De.pts,xt,this.keepOriginalTimestamps),he.metadata.push(De);for(he.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",he),Dt=0;Dt<he.captions.length;Dt++)de=he.captions[Dt],this.trigger("caption",de);for(Dt=0;Dt<he.metadata.length;Dt++)De=he.metadata[Dt],this.trigger("id3Frame",De)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},rd.prototype.setRemux=function(q){this.remuxTracks=q},$d=function(q){var oe=this,he=!0,de,De;$d.prototype.init.call(this),q=q||{},this.baseMediaDecodeTime=q.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var Le={};this.transmuxPipeline_=Le,Le.type="aac",Le.metadataStream=new Ht.MetadataStream,Le.aacStream=new Ii,Le.audioTimestampRolloverStream=new Ht.TimestampRolloverStream("audio"),Le.timedMetadataTimestampRolloverStream=new Ht.TimestampRolloverStream("timed-metadata"),Le.adtsStream=new Li,Le.coalesceStream=new rd(q,Le.metadataStream),Le.headOfPipeline=Le.aacStream,Le.aacStream.pipe(Le.audioTimestampRolloverStream).pipe(Le.adtsStream),Le.aacStream.pipe(Le.timedMetadataTimestampRolloverStream).pipe(Le.metadataStream).pipe(Le.coalesceStream),Le.metadataStream.on("timestamp",function(xt){Le.aacStream.setTimestamp(xt.timeStamp)}),Le.aacStream.on("data",function(xt){xt.type!=="timed-metadata"&&xt.type!=="audio"||Le.audioSegmentStream||(De=De||{timelineStartInfo:{baseMediaDecodeTime:oe.baseMediaDecodeTime},codec:"adts",type:"audio"},Le.coalesceStream.numberOfTracks++,Le.audioSegmentStream=new Ea(De,q),Le.audioSegmentStream.on("log",oe.getLogTrigger_("audioSegmentStream")),Le.audioSegmentStream.on("timingInfo",oe.trigger.bind(oe,"audioTimingInfo")),Le.adtsStream.pipe(Le.audioSegmentStream).pipe(Le.coalesceStream),oe.trigger("trackinfo",{hasAudio:!!De,hasVideo:!!de}))}),Le.coalesceStream.on("data",this.trigger.bind(this,"data")),Le.coalesceStream.on("done",this.trigger.bind(this,"done")),gc(this,Le)},this.setupTsPipeline=function(){var Le={};this.transmuxPipeline_=Le,Le.type="ts",Le.metadataStream=new Ht.MetadataStream,Le.packetStream=new Ht.TransportPacketStream,Le.parseStream=new Ht.TransportParseStream,Le.elementaryStream=new Ht.ElementaryStream,Le.timestampRolloverStream=new Ht.TimestampRolloverStream,Le.adtsStream=new Li,Le.h264Stream=new nn,Le.captionStream=new Ht.CaptionStream(q),Le.coalesceStream=new rd(q,Le.metadataStream),Le.headOfPipeline=Le.packetStream,Le.packetStream.pipe(Le.parseStream).pipe(Le.elementaryStream).pipe(Le.timestampRolloverStream),Le.timestampRolloverStream.pipe(Le.h264Stream),Le.timestampRolloverStream.pipe(Le.adtsStream),Le.timestampRolloverStream.pipe(Le.metadataStream).pipe(Le.coalesceStream),Le.h264Stream.pipe(Le.captionStream).pipe(Le.coalesceStream),Le.elementaryStream.on("data",function(xt){var Dt;if(xt.type==="metadata"){for(Dt=xt.tracks.length;Dt--;)!de&&xt.tracks[Dt].type==="video"?(de=xt.tracks[Dt],de.timelineStartInfo.baseMediaDecodeTime=oe.baseMediaDecodeTime):!De&&xt.tracks[Dt].type==="audio"&&(De=xt.tracks[Dt],De.timelineStartInfo.baseMediaDecodeTime=oe.baseMediaDecodeTime);de&&!Le.videoSegmentStream&&(Le.coalesceStream.numberOfTracks++,Le.videoSegmentStream=new sl(de,q),Le.videoSegmentStream.on("log",oe.getLogTrigger_("videoSegmentStream")),Le.videoSegmentStream.on("timelineStartInfo",function(Ut){De&&!q.keepOriginalTimestamps&&(De.timelineStartInfo=Ut,Le.audioSegmentStream.setEarliestDts(Ut.dts-oe.baseMediaDecodeTime))}),Le.videoSegmentStream.on("processedGopsInfo",oe.trigger.bind(oe,"gopInfo")),Le.videoSegmentStream.on("segmentTimingInfo",oe.trigger.bind(oe,"videoSegmentTimingInfo")),Le.videoSegmentStream.on("baseMediaDecodeTime",function(Ut){De&&Le.audioSegmentStream.setVideoBaseMediaDecodeTime(Ut)}),Le.videoSegmentStream.on("timingInfo",oe.trigger.bind(oe,"videoTimingInfo")),Le.h264Stream.pipe(Le.videoSegmentStream).pipe(Le.coalesceStream)),De&&!Le.audioSegmentStream&&(Le.coalesceStream.numberOfTracks++,Le.audioSegmentStream=new Ea(De,q),Le.audioSegmentStream.on("log",oe.getLogTrigger_("audioSegmentStream")),Le.audioSegmentStream.on("timingInfo",oe.trigger.bind(oe,"audioTimingInfo")),Le.audioSegmentStream.on("segmentTimingInfo",oe.trigger.bind(oe,"audioSegmentTimingInfo")),Le.adtsStream.pipe(Le.audioSegmentStream).pipe(Le.coalesceStream)),oe.trigger("trackinfo",{hasAudio:!!De,hasVideo:!!de})}}),Le.coalesceStream.on("data",this.trigger.bind(this,"data")),Le.coalesceStream.on("id3Frame",function(xt){xt.dispatchType=Le.metadataStream.dispatchType,oe.trigger("id3Frame",xt)}),Le.coalesceStream.on("caption",this.trigger.bind(this,"caption")),Le.coalesceStream.on("done",this.trigger.bind(this,"done")),gc(this,Le)},this.setBaseMediaDecodeTime=function(Le){var xt=this.transmuxPipeline_;q.keepOriginalTimestamps||(this.baseMediaDecodeTime=Le),De&&(De.timelineStartInfo.dts=void 0,De.timelineStartInfo.pts=void 0,kt.clearDtsInfo(De),xt.audioTimestampRolloverStream&&xt.audioTimestampRolloverStream.discontinuity()),de&&(xt.videoSegmentStream&&(xt.videoSegmentStream.gopCache_=[]),de.timelineStartInfo.dts=void 0,de.timelineStartInfo.pts=void 0,kt.clearDtsInfo(de),xt.captionStream.reset()),xt.timestampRolloverStream&&xt.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(Le){De&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(Le)},this.setRemux=function(Le){var xt=this.transmuxPipeline_;q.remux=Le,xt&&xt.coalesceStream&&xt.coalesceStream.setRemux(Le)},this.alignGopsWith=function(Le){de&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(Le)},this.getLogTrigger_=function(Le){var xt=this;return function(Dt){Dt.stream=Le,xt.trigger("log",Dt)}},this.push=function(Le){if(he){var xt=Oi(Le);xt&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!xt&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),he=!1}this.transmuxPipeline_.headOfPipeline.push(Le)},this.flush=function(){he=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},$d.prototype=new ke;var zc={Transmuxer:$d,VideoSegmentStream:sl,AudioSegmentStream:Ea,AUDIO_PROPERTIES:Io,VIDEO_PROPERTIES:Ao,generateSegmentTimingInfo:Fo},Cd=function(q){return q>>>0},Mc=function(q){return("00"+q.toString(16)).slice(-2)},K={toUnsigned:Cd,toHexString:Mc},we=function(q){var oe="";return oe+=String.fromCharCode(q[0]),oe+=String.fromCharCode(q[1]),oe+=String.fromCharCode(q[2]),oe+=String.fromCharCode(q[3]),oe},Oe=we,mt=K.toUnsigned,vi=Oe,Bi=function(q,oe){var he=[],de,De,Le,xt,Dt;if(!oe.length)return null;for(de=0;de<q.byteLength;)De=mt(q[de]<<24|q[de+1]<<16|q[de+2]<<8|q[de+3]),Le=vi(q.subarray(de+4,de+8)),xt=De>1?de+De:q.byteLength,Le===oe[0]&&(oe.length===1?he.push(q.subarray(de+8,xt)):(Dt=Bi(q.subarray(de+8,xt),oe.slice(1)),Dt.length&&(he=he.concat(Dt)))),de=xt;return he},jn=Bi,Vr=K.toUnsigned,El=s.getUint64,Lo=function(q){var oe={version:q[0],flags:new Uint8Array(q.subarray(1,4))};return oe.version===1?oe.baseMediaDecodeTime=El(q.subarray(4)):oe.baseMediaDecodeTime=Vr(q[4]<<24|q[5]<<16|q[6]<<8|q[7]),oe},Er=Lo,yo=function(q){return{isLeading:(q[0]&12)>>>2,dependsOn:q[0]&3,isDependedOn:(q[1]&192)>>>6,hasRedundancy:(q[1]&48)>>>4,paddingValue:(q[1]&14)>>>1,isNonSyncSample:q[1]&1,degradationPriority:q[2]<<8|q[3]}},uu=yo,zl=uu,Mu=function(q){var oe={version:q[0],flags:new Uint8Array(q.subarray(1,4)),samples:[]},he=new DataView(q.buffer,q.byteOffset,q.byteLength),de=oe.flags[2]&1,De=oe.flags[2]&4,Le=oe.flags[1]&1,xt=oe.flags[1]&2,Dt=oe.flags[1]&4,Ut=oe.flags[1]&8,Jt=he.getUint32(4),gi=8,Si;for(de&&(oe.dataOffset=he.getInt32(gi),gi+=4),De&&Jt&&(Si={flags:zl(q.subarray(gi,gi+4))},gi+=4,Le&&(Si.duration=he.getUint32(gi),gi+=4),xt&&(Si.size=he.getUint32(gi),gi+=4),Ut&&(oe.version===1?Si.compositionTimeOffset=he.getInt32(gi):Si.compositionTimeOffset=he.getUint32(gi),gi+=4),oe.samples.push(Si),Jt--);Jt--;)Si={},Le&&(Si.duration=he.getUint32(gi),gi+=4),xt&&(Si.size=he.getUint32(gi),gi+=4),Dt&&(Si.flags=zl(q.subarray(gi,gi+4)),gi+=4),Ut&&(oe.version===1?Si.compositionTimeOffset=he.getInt32(gi):Si.compositionTimeOffset=he.getUint32(gi),gi+=4),oe.samples.push(Si);return oe},Of=Mu,K0=function(q){var oe=new DataView(q.buffer,q.byteOffset,q.byteLength),he={version:q[0],flags:new Uint8Array(q.subarray(1,4)),trackId:oe.getUint32(4)},de=he.flags[2]&1,De=he.flags[2]&2,Le=he.flags[2]&8,xt=he.flags[2]&16,Dt=he.flags[2]&32,Ut=he.flags[0]&65536,Jt=he.flags[0]&131072,gi;return gi=8,de&&(gi+=4,he.baseDataOffset=oe.getUint32(12),gi+=4),De&&(he.sampleDescriptionIndex=oe.getUint32(gi),gi+=4),Le&&(he.defaultSampleDuration=oe.getUint32(gi),gi+=4),xt&&(he.defaultSampleSize=oe.getUint32(gi),gi+=4),Dt&&(he.defaultSampleFlags=oe.getUint32(gi)),Ut&&(he.durationIsEmpty=!0),!de&&Jt&&(he.baseDataOffsetIsMoof=!0),he},Hc=K0,Rd;typeof window<"u"?Rd=window:typeof t<"u"?Rd=t:typeof self<"u"?Rd=self:Rd={};var Nf=Rd,jh=fd.discardEmulationPreventionBytes,$h=td.CaptionStream,_l=jn,kc=Er,Y0=Of,Up=Hc,Kg=Nf,Hl=function(q,oe){for(var he=q,de=0;de<oe.length;de++){var De=oe[de];if(he<De.size)return De;he-=De.size}return null},ol=function(q,oe,he){var de=new DataView(q.buffer,q.byteOffset,q.byteLength),De={logs:[],seiNals:[]},Le,xt,Dt,Ut;for(xt=0;xt+4<q.length;xt+=Dt)if(Dt=de.getUint32(xt),xt+=4,!(Dt<=0))switch(q[xt]&31){case 6:var Jt=q.subarray(xt+1,xt+1+Dt),gi=Hl(xt,oe);if(Le={nalUnitType:"sei_rbsp",size:Dt,data:Jt,escapedRBSP:jh(Jt),trackId:he},gi)Le.pts=gi.pts,Le.dts=gi.dts,Ut=gi;else if(Ut)Le.pts=Ut.pts,Le.dts=Ut.dts;else{De.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+xt+" for trackId "+he+". See mux.js#223."});break}De.seiNals.push(Le);break}return De},jp=function(q,oe,he){var de=oe,De=he.defaultSampleDuration||0,Le=he.defaultSampleSize||0,xt=he.trackId,Dt=[];return q.forEach(function(Ut){var Jt=Y0(Ut),gi=Jt.samples;gi.forEach(function(Si){Si.duration===void 0&&(Si.duration=De),Si.size===void 0&&(Si.size=Le),Si.trackId=xt,Si.dts=de,Si.compositionTimeOffset===void 0&&(Si.compositionTimeOffset=0),typeof de=="bigint"?(Si.pts=de+Kg.BigInt(Si.compositionTimeOffset),de+=Kg.BigInt(Si.duration)):(Si.pts=de+Si.compositionTimeOffset,de+=Si.duration)}),Dt=Dt.concat(gi)}),Dt},F2=function(q,oe){var he=_l(q,["moof","traf"]),de=_l(q,["mdat"]),De={},Le=[];return de.forEach(function(xt,Dt){var Ut=he[Dt];Le.push({mdat:xt,traf:Ut})}),Le.forEach(function(xt){var Dt=xt.mdat,Ut=xt.traf,Jt=_l(Ut,["tfhd"]),gi=Up(Jt[0]),Si=gi.trackId,Tr=_l(Ut,["tfdt"]),ae=Tr.length>0?kc(Tr[0]).baseMediaDecodeTime:0,Ds=_l(Ut,["trun"]),lo,Zo;oe===Si&&Ds.length>0&&(lo=jp(Ds,ae,gi),Zo=ol(Dt,lo,Si),De[Si]||(De[Si]={seiNals:[],logs:[]}),De[Si].seiNals=De[Si].seiNals.concat(Zo.seiNals),De[Si].logs=De[Si].logs.concat(Zo.logs))}),De},I1=function(q,oe,he){var de;if(oe===null)return null;de=F2(q,oe);var De=de[oe]||{};return{seiNals:De.seiNals,logs:De.logs,timescale:he}},q0=function(){var q=!1,oe,he,de,De,Le,xt;this.isInitialized=function(){return q},this.init=function(Dt){oe=new $h,q=!0,xt=Dt?Dt.isPartial:!1,oe.on("data",function(Ut){Ut.startTime=Ut.startPts/De,Ut.endTime=Ut.endPts/De,Le.captions.push(Ut),Le.captionStreams[Ut.stream]=!0}),oe.on("log",function(Ut){Le.logs.push(Ut)})},this.isNewInit=function(Dt,Ut){return Dt&&Dt.length===0||Ut&&typeof Ut=="object"&&Object.keys(Ut).length===0?!1:de!==Dt[0]||De!==Ut[de]},this.parse=function(Dt,Ut,Jt){var gi;if(this.isInitialized()){if(!Ut||!Jt)return null;if(this.isNewInit(Ut,Jt))de=Ut[0],De=Jt[de];else if(de===null||!De)return he.push(Dt),null}else return null;for(;he.length>0;){var Si=he.shift();this.parse(Si,Ut,Jt)}return gi=I1(Dt,de,De),gi&&gi.logs&&(Le.logs=Le.logs.concat(gi.logs)),gi===null||!gi.seiNals?Le.logs.length?{logs:Le.logs,captions:[],captionStreams:[]}:null:(this.pushNals(gi.seiNals),this.flushStream(),Le)},this.pushNals=function(Dt){if(!this.isInitialized()||!Dt||Dt.length===0)return null;Dt.forEach(function(Ut){oe.push(Ut)})},this.flushStream=function(){if(!this.isInitialized())return null;xt?oe.partialFlush():oe.flush()},this.clearParsedCaptions=function(){Le.captions=[],Le.captionStreams={},Le.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;oe.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){he=[],de=null,De=null,Le?this.clearParsedCaptions():Le={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Mt=q0,li=function(q){for(var oe=0,he=String.fromCharCode(q[oe]),de="";he!=="\0";)de+=he,oe++,he=String.fromCharCode(q[oe]);return de+=he,de},wi={uint8ToCString:li},Fe=wi.uint8ToCString,dt=s.getUint64,ht=function(q){var oe=4,he=q[0],de,De,Le,xt,Dt,Ut,Jt,gi;if(he===0){de=Fe(q.subarray(oe)),oe+=de.length,De=Fe(q.subarray(oe)),oe+=De.length;var Si=new DataView(q.buffer);Le=Si.getUint32(oe),oe+=4,Dt=Si.getUint32(oe),oe+=4,Ut=Si.getUint32(oe),oe+=4,Jt=Si.getUint32(oe),oe+=4}else if(he===1){var Si=new DataView(q.buffer);Le=Si.getUint32(oe),oe+=4,xt=dt(q.subarray(oe)),oe+=8,Ut=Si.getUint32(oe),oe+=4,Jt=Si.getUint32(oe),oe+=4,de=Fe(q.subarray(oe)),oe+=de.length,De=Fe(q.subarray(oe)),oe+=De.length}gi=new Uint8Array(q.subarray(oe,q.byteLength));var Tr={scheme_id_uri:de,value:De,timescale:Le||1,presentation_time:xt,presentation_time_delta:Dt,event_duration:Ut,id:Jt,message_data:gi};return Ni(he,Tr)?Tr:void 0},ci=function(q,oe,he,de){return q||q===0?q/oe:de+he/oe},Ni=function(q,oe){var he=oe.scheme_id_uri!=="\0",de=q===0&&Qi(oe.presentation_time_delta)&&he,De=q===1&&Qi(oe.presentation_time)&&he;return!(q>1)&&de||De},Qi=function(q){return q!==void 0||q!==null},Br={parseEmsgBox:ht,scaleTime:ci},hn=K.toUnsigned,us=K.toHexString,ns=jn,_r=Oe,xa=Br,xd=Hc,Gl=Of,bd=Er,Fd=s.getUint64,ss,hu,Vf,Bf,K3,Y3,Km,Ym=Nf,Yu=Bp.parseId3Frames;ss=function(q){var oe={},he=ns(q,["moov","trak"]);return he.reduce(function(de,De){var Le,xt,Dt,Ut,Jt;return Le=ns(De,["tkhd"])[0],!Le||(xt=Le[0],Dt=xt===0?12:20,Ut=hn(Le[Dt]<<24|Le[Dt+1]<<16|Le[Dt+2]<<8|Le[Dt+3]),Jt=ns(De,["mdia","mdhd"])[0],!Jt)?null:(xt=Jt[0],Dt=xt===0?12:20,de[Ut]=hn(Jt[Dt]<<24|Jt[Dt+1]<<16|Jt[Dt+2]<<8|Jt[Dt+3]),de)},oe)},hu=function(q,oe){var he;he=ns(oe,["moof","traf"]);var de=he.reduce(function(De,Le){var xt=ns(Le,["tfhd"])[0],Dt=hn(xt[4]<<24|xt[5]<<16|xt[6]<<8|xt[7]),Ut=q[Dt]||9e4,Jt=ns(Le,["tfdt"])[0],gi=new DataView(Jt.buffer,Jt.byteOffset,Jt.byteLength),Si;Jt[0]===1?Si=Fd(Jt.subarray(4,12)):Si=gi.getUint32(4);let Tr;return typeof Si=="bigint"?Tr=Si/Ym.BigInt(Ut):typeof Si=="number"&&!isNaN(Si)&&(Tr=Si/Ut),Tr<Number.MAX_SAFE_INTEGER&&(Tr=Number(Tr)),Tr<De&&(De=Tr),De},1/0);return typeof de=="bigint"||isFinite(de)?de:0},Vf=function(q,oe){var he=ns(oe,["moof","traf"]),de=0,De=0,Le;if(he&&he.length){var xt=ns(he[0],["tfhd"])[0],Dt=ns(he[0],["trun"])[0],Ut=ns(he[0],["tfdt"])[0];if(xt){var Jt=xd(xt);Le=Jt.trackId}if(Ut){var gi=bd(Ut);de=gi.baseMediaDecodeTime}if(Dt){var Si=Gl(Dt);Si.samples&&Si.samples.length&&(De=Si.samples[0].compositionTimeOffset||0)}}var Tr=q[Le]||9e4;typeof de=="bigint"&&(De=Ym.BigInt(De),Tr=Ym.BigInt(Tr));var ae=(de+De)/Tr;return typeof ae=="bigint"&&ae<Number.MAX_SAFE_INTEGER&&(ae=Number(ae)),ae},Bf=function(q){var oe=ns(q,["moov","trak"]),he=[];return oe.forEach(function(de){var De=ns(de,["mdia","hdlr"]),Le=ns(de,["tkhd"]);De.forEach(function(xt,Dt){var Ut=_r(xt.subarray(8,12)),Jt=Le[Dt],gi,Si,Tr;Ut==="vide"&&(gi=new DataView(Jt.buffer,Jt.byteOffset,Jt.byteLength),Si=gi.getUint8(0),Tr=Si===0?gi.getUint32(12):gi.getUint32(20),he.push(Tr))})}),he},Y3=function(q){var oe=q[0],he=oe===0?12:20;return hn(q[he]<<24|q[he+1]<<16|q[he+2]<<8|q[he+3])},K3=function(q){var oe=ns(q,["moov","trak"]),he=[];return oe.forEach(function(de){var De={},Le=ns(de,["tkhd"])[0],xt,Dt;Le&&(xt=new DataView(Le.buffer,Le.byteOffset,Le.byteLength),Dt=xt.getUint8(0),De.id=Dt===0?xt.getUint32(12):xt.getUint32(20));var Ut=ns(de,["mdia","hdlr"])[0];if(Ut){var Jt=_r(Ut.subarray(8,12));Jt==="vide"?De.type="video":Jt==="soun"?De.type="audio":De.type=Jt}var gi=ns(de,["mdia","minf","stbl","stsd"])[0];if(gi){var Si=gi.subarray(8);De.codec=_r(Si.subarray(4,8));var Tr=ns(Si,[De.codec])[0],ae,Ds;Tr&&(/^[asm]vc[1-9]$/i.test(De.codec)?(ae=Tr.subarray(78),Ds=_r(ae.subarray(4,8)),Ds==="avcC"&&ae.length>11?(De.codec+=".",De.codec+=us(ae[9]),De.codec+=us(ae[10]),De.codec+=us(ae[11])):De.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(De.codec)?(ae=Tr.subarray(28),Ds=_r(ae.subarray(4,8)),Ds==="esds"&&ae.length>20&&ae[19]!==0?(De.codec+="."+us(ae[19]),De.codec+="."+us(ae[20]>>>2&63).replace(/^0/,"")):De.codec="mp4a.40.2"):De.codec=De.codec.toLowerCase())}var lo=ns(de,["mdia","mdhd"])[0];lo&&(De.timescale=Y3(lo)),he.push(De)}),he},Km=function(q,oe=0){var he=ns(q,["emsg"]);return he.map(de=>{var De=xa.parseEmsgBox(new Uint8Array(de)),Le=Yu(De.message_data);return{cueTime:xa.scaleTime(De.presentation_time,De.timescale,De.presentation_time_delta,oe),duration:xa.scaleTime(De.event_duration,De.timescale),frames:Le}})};var mp={findBox:ns,parseType:_r,timescale:ss,startTime:hu,compositionStartTime:Vf,videoTrackIds:Bf,tracks:K3,getTimescaleFromMediaHeader:Y3,getEmsgID3:Km},L2=Ec,um=function(q){var oe=q[1]&31;return oe<<=8,oe|=q[2],oe},qm=function(q){return!!(q[1]&64)},u0=function(q){var oe=0;return(q[3]&48)>>>4>1&&(oe+=q[4]+1),oe},Kh=function(q,oe){var he=um(q);return he===0?"pat":he===oe?"pmt":oe?"pes":null},q3=function(q){var oe=qm(q),he=4+u0(q);return oe&&(he+=q[he]+1),(q[he+10]&31)<<8|q[he+11]},Zm=function(q){var oe={},he=qm(q),de=4+u0(q);if(he&&(de+=q[de]+1),!!(q[de+5]&1)){var De,Le,xt;De=(q[de+1]&15)<<8|q[de+2],Le=3+De-4,xt=(q[de+10]&15)<<8|q[de+11];for(var Dt=12+xt;Dt<Le;){var Ut=de+Dt;oe[(q[Ut+1]&31)<<8|q[Ut+2]]=q[Ut],Dt+=((q[Ut+3]&15)<<8|q[Ut+4])+5}return oe}},Yh=function(q,oe){var he=um(q),de=oe[he];switch(de){case L2.H264_STREAM_TYPE:return"video";case L2.ADTS_STREAM_TYPE:return"audio";case L2.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},A1=function(q){var oe=qm(q);if(!oe)return null;var he=4+u0(q);if(he>=q.byteLength)return null;var de=null,De;return De=q[he+7],De&192&&(de={},de.pts=(q[he+9]&14)<<27|(q[he+10]&255)<<20|(q[he+11]&254)<<12|(q[he+12]&255)<<5|(q[he+13]&254)>>>3,de.pts*=4,de.pts+=(q[he+13]&6)>>>1,de.dts=de.pts,De&64&&(de.dts=(q[he+14]&14)<<27|(q[he+15]&255)<<20|(q[he+16]&254)<<12|(q[he+17]&255)<<5|(q[he+18]&254)>>>3,de.dts*=4,de.dts+=(q[he+18]&6)>>>1)),de},Yg=function(q){switch(q){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},hv=function(q){for(var oe=4+u0(q),he=q.subarray(oe),de=0,De=0,Le=!1,xt;De<he.byteLength-3;De++)if(he[De+2]===1){de=De+5;break}for(;de<he.byteLength;)switch(he[de]){case 0:if(he[de-1]!==0){de+=2;break}else if(he[de-2]!==0){de++;break}De+3!==de-2&&(xt=Yg(he[De+3]&31),xt==="slice_layer_without_partitioning_rbsp_idr"&&(Le=!0));do de++;while(he[de]!==1&&de<he.length);De=de-2,de+=3;break;case 1:if(he[de-1]!==0||he[de-2]!==0){de+=3;break}xt=Yg(he[De+3]&31),xt==="slice_layer_without_partitioning_rbsp_idr"&&(Le=!0),De=de-2,de+=3;break;default:de+=3;break}return he=he.subarray(De),de-=De,De=0,he&&he.byteLength>3&&(xt=Yg(he[De+3]&31),xt==="slice_layer_without_partitioning_rbsp_idr"&&(Le=!0)),Le},J6={parseType:Kh,parsePat:q3,parsePmt:Zm,parsePayloadUnitStartIndicator:qm,parsePesType:Yh,parsePesTime:A1,videoPacketContainsKeyFrame:hv},zf=Ec,ph=ch.handleRollover,La={};La.ts=J6,La.aac=oc;var T=Xs.ONE_SECOND_IN_TS,N=188,Z=71,ue=function(q,oe){for(var he=0,de=N,De,Le;de<q.byteLength;){if(q[he]===Z&&q[de]===Z){switch(De=q.subarray(he,de),Le=La.ts.parseType(De,oe.pid),Le){case"pat":oe.pid=La.ts.parsePat(De);break;case"pmt":var xt=La.ts.parsePmt(De);oe.table=oe.table||{},Object.keys(xt).forEach(function(Dt){oe.table[Dt]=xt[Dt]});break}he+=N,de+=N;continue}he++,de++}},Pe=function(q,oe,he){for(var de=0,De=N,Le,xt,Dt,Ut,Jt,gi=!1;De<=q.byteLength;){if(q[de]===Z&&(q[De]===Z||De===q.byteLength)){switch(Le=q.subarray(de,De),xt=La.ts.parseType(Le,oe.pid),xt){case"pes":Dt=La.ts.parsePesType(Le,oe.table),Ut=La.ts.parsePayloadUnitStartIndicator(Le),Dt==="audio"&&Ut&&(Jt=La.ts.parsePesTime(Le),Jt&&(Jt.type="audio",he.audio.push(Jt),gi=!0));break}if(gi)break;de+=N,De+=N;continue}de++,De++}for(De=q.byteLength,de=De-N,gi=!1;de>=0;){if(q[de]===Z&&(q[De]===Z||De===q.byteLength)){switch(Le=q.subarray(de,De),xt=La.ts.parseType(Le,oe.pid),xt){case"pes":Dt=La.ts.parsePesType(Le,oe.table),Ut=La.ts.parsePayloadUnitStartIndicator(Le),Dt==="audio"&&Ut&&(Jt=La.ts.parsePesTime(Le),Jt&&(Jt.type="audio",he.audio.push(Jt),gi=!0));break}if(gi)break;de-=N,De-=N;continue}de--,De--}},st=function(q,oe,he){for(var de=0,De=N,Le,xt,Dt,Ut,Jt,gi,Si,Tr,ae=!1,Ds={data:[],size:0};De<q.byteLength;){if(q[de]===Z&&q[De]===Z){switch(Le=q.subarray(de,De),xt=La.ts.parseType(Le,oe.pid),xt){case"pes":if(Dt=La.ts.parsePesType(Le,oe.table),Ut=La.ts.parsePayloadUnitStartIndicator(Le),Dt==="video"&&(Ut&&!ae&&(Jt=La.ts.parsePesTime(Le),Jt&&(Jt.type="video",he.video.push(Jt),ae=!0)),!he.firstKeyFrame)){if(Ut&&Ds.size!==0){for(gi=new Uint8Array(Ds.size),Si=0;Ds.data.length;)Tr=Ds.data.shift(),gi.set(Tr,Si),Si+=Tr.byteLength;if(La.ts.videoPacketContainsKeyFrame(gi)){var lo=La.ts.parsePesTime(gi);lo?(he.firstKeyFrame=lo,he.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Ds.size=0}Ds.data.push(Le),Ds.size+=Le.byteLength}break}if(ae&&he.firstKeyFrame)break;de+=N,De+=N;continue}de++,De++}for(De=q.byteLength,de=De-N,ae=!1;de>=0;){if(q[de]===Z&&q[De]===Z){switch(Le=q.subarray(de,De),xt=La.ts.parseType(Le,oe.pid),xt){case"pes":Dt=La.ts.parsePesType(Le,oe.table),Ut=La.ts.parsePayloadUnitStartIndicator(Le),Dt==="video"&&Ut&&(Jt=La.ts.parsePesTime(Le),Jt&&(Jt.type="video",he.video.push(Jt),ae=!0));break}if(ae)break;de-=N,De-=N;continue}de--,De--}},ti=function(q,oe){if(q.audio&&q.audio.length){var he=oe;(typeof he>"u"||isNaN(he))&&(he=q.audio[0].dts),q.audio.forEach(function(Le){Le.dts=ph(Le.dts,he),Le.pts=ph(Le.pts,he),Le.dtsTime=Le.dts/T,Le.ptsTime=Le.pts/T})}if(q.video&&q.video.length){var de=oe;if((typeof de>"u"||isNaN(de))&&(de=q.video[0].dts),q.video.forEach(function(Le){Le.dts=ph(Le.dts,de),Le.pts=ph(Le.pts,de),Le.dtsTime=Le.dts/T,Le.ptsTime=Le.pts/T}),q.firstKeyFrame){var De=q.firstKeyFrame;De.dts=ph(De.dts,de),De.pts=ph(De.pts,de),De.dtsTime=De.dts/T,De.ptsTime=De.pts/T}}},Ei=function(q){for(var oe=!1,he=0,de=null,De=null,Le=0,xt=0,Dt;q.length-xt>=3;){var Ut=La.aac.parseType(q,xt);switch(Ut){case"timed-metadata":if(q.length-xt<10){oe=!0;break}if(Le=La.aac.parseId3TagSize(q,xt),Le>q.length){oe=!0;break}De===null&&(Dt=q.subarray(xt,xt+Le),De=La.aac.parseAacTimestamp(Dt)),xt+=Le;break;case"audio":if(q.length-xt<7){oe=!0;break}if(Le=La.aac.parseAdtsSize(q,xt),Le>q.length){oe=!0;break}de===null&&(Dt=q.subarray(xt,xt+Le),de=La.aac.parseSampleRate(Dt)),he++,xt+=Le;break;default:xt++;break}if(oe)return null}if(de===null||De===null)return null;var Jt=T/de,gi={audio:[{type:"audio",dts:De,pts:De},{type:"audio",dts:De+he*1024*Jt,pts:De+he*1024*Jt}]};return gi},Ui=function(q){var oe={pid:null,table:null},he={};ue(q,oe);for(var de in oe.table)if(oe.table.hasOwnProperty(de)){var De=oe.table[de];switch(De){case zf.H264_STREAM_TYPE:he.video=[],st(q,oe,he),he.video.length===0&&delete he.video;break;case zf.ADTS_STREAM_TYPE:he.audio=[],Pe(q,oe,he),he.audio.length===0&&delete he.audio;break}}return he},On=function(q,oe){var he=La.aac.isLikelyAacData(q),de;return he?de=Ei(q):de=Ui(q),!de||!de.audio&&!de.video?null:(ti(de,oe),de)},Wr={inspect:On,parseAudioPes_:Pe};let $s=function(q,oe){oe.on("data",function(he){let de=he.initSegment;he.initSegment={data:de.buffer,byteOffset:de.byteOffset,byteLength:de.byteLength};let De=he.data;he.data=De.buffer,q.postMessage({action:"data",segment:he,byteOffset:De.byteOffset,byteLength:De.byteLength},[he.data])}),oe.on("done",function(he){q.postMessage({action:"done"})}),oe.on("gopInfo",function(he){q.postMessage({action:"gopInfo",gopInfo:he})}),oe.on("videoSegmentTimingInfo",function(he){let de={start:{decode:Xs.videoTsToSeconds(he.start.dts),presentation:Xs.videoTsToSeconds(he.start.pts)},end:{decode:Xs.videoTsToSeconds(he.end.dts),presentation:Xs.videoTsToSeconds(he.end.pts)},baseMediaDecodeTime:Xs.videoTsToSeconds(he.baseMediaDecodeTime)};he.prependedContentDuration&&(de.prependedContentDuration=Xs.videoTsToSeconds(he.prependedContentDuration)),q.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:de})}),oe.on("audioSegmentTimingInfo",function(he){let de={start:{decode:Xs.videoTsToSeconds(he.start.dts),presentation:Xs.videoTsToSeconds(he.start.pts)},end:{decode:Xs.videoTsToSeconds(he.end.dts),presentation:Xs.videoTsToSeconds(he.end.pts)},baseMediaDecodeTime:Xs.videoTsToSeconds(he.baseMediaDecodeTime)};he.prependedContentDuration&&(de.prependedContentDuration=Xs.videoTsToSeconds(he.prependedContentDuration)),q.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:de})}),oe.on("id3Frame",function(he){q.postMessage({action:"id3Frame",id3Frame:he})}),oe.on("caption",function(he){q.postMessage({action:"caption",caption:he})}),oe.on("trackinfo",function(he){q.postMessage({action:"trackinfo",trackInfo:he})}),oe.on("audioTimingInfo",function(he){q.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Xs.videoTsToSeconds(he.start),end:Xs.videoTsToSeconds(he.end)}})}),oe.on("videoTimingInfo",function(he){q.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Xs.videoTsToSeconds(he.start),end:Xs.videoTsToSeconds(he.end)}})}),oe.on("log",function(he){q.postMessage({action:"log",log:he})})};class qo{constructor(oe,he){this.options=he||{},this.self=oe,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new zc.Transmuxer(this.options),$s(this.self,this.transmuxer)}pushMp4Captions(oe){this.captionParser||(this.captionParser=new Mt,this.captionParser.init());let he=new Uint8Array(oe.data,oe.byteOffset,oe.byteLength),de=this.captionParser.parse(he,oe.trackIds,oe.timescales);this.self.postMessage({action:"mp4Captions",captions:de&&de.captions||[],logs:de&&de.logs||[],data:he.buffer},[he.buffer])}probeMp4StartTime({timescales:oe,data:he}){let de=mp.startTime(oe,he);this.self.postMessage({action:"probeMp4StartTime",startTime:de,data:he},[he.buffer])}probeMp4Tracks({data:oe}){let he=mp.tracks(oe);this.self.postMessage({action:"probeMp4Tracks",tracks:he,data:oe},[oe.buffer])}probeEmsgID3({data:oe,offset:he}){let de=mp.getEmsgID3(oe,he);this.self.postMessage({action:"probeEmsgID3",id3Frames:de,emsgData:oe},[oe.buffer])}probeTs({data:oe,baseStartTime:he}){let de=typeof he=="number"&&!isNaN(he)?he*Xs.ONE_SECOND_IN_TS:void 0,De=Wr.inspect(oe,de),Le=null;De&&(Le={hasVideo:De.video&&De.video.length===2||!1,hasAudio:De.audio&&De.audio.length===2||!1},Le.hasVideo&&(Le.videoStart=De.video[0].ptsTime),Le.hasAudio&&(Le.audioStart=De.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:Le,data:oe},[oe.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(oe){let he=new Uint8Array(oe.data,oe.byteOffset,oe.byteLength);this.transmuxer.push(he)}reset(){this.transmuxer.reset()}setTimestampOffset(oe){let he=oe.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Xs.secondsToVideoTs(he)))}setAudioAppendStart(oe){this.transmuxer.setAudioAppendStart(Math.ceil(Xs.secondsToVideoTs(oe.appendStart)))}setRemux(oe){this.transmuxer.setRemux(oe.remux)}flush(oe){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(oe){this.transmuxer.alignGopsWith(oe.gopsToAlignWith.slice())}}self.onmessage=function(q){if(q.data.action==="init"&&q.data.options){this.messageHandlers=new qo(self,q.data.options);return}this.messageHandlers||(this.messageHandlers=new qo(self)),q.data&&q.data.action&&q.data.action!=="init"&&this.messageHandlers[q.data.action]&&this.messageHandlers[q.data.action](q.data)}})),Odi=jXe(Ldi),Ndi=(t,e,n)=>{let{type:i,initSegment:r,captions:s,captionStreams:o,metadata:a,videoFrameDtsTime:l,videoFramePtsTime:c}=t.data.segment;e.buffer.push({captions:s,captionStreams:o,metadata:a});let d=t.data.segment.boxes||{data:t.data.segment.data},u={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(r.data,r.byteOffset,r.byteLength)};typeof l<"u"&&(u.videoFrameDtsTime=l),typeof c<"u"&&(u.videoFramePtsTime=c),n(u)},Vdi=({transmuxedData:t,callback:e})=>{t.buffer=[],e(t)},Bdi=(t,e)=>{e.gopInfo=t.data.gopInfo},YXe=t=>{let{transmuxer:e,bytes:n,audioAppendStart:i,gopsToAlignWith:r,remux:s,onData:o,onTrackInfo:a,onAudioTimingInfo:l,onVideoTimingInfo:c,onVideoSegmentTimingInfo:d,onAudioSegmentTimingInfo:u,onId3:m,onCaptions:f,onDone:_,onEndedTimeline:x,onTransmuxerLog:D,isEndOfTimeline:E,segment:M,triggerSegmentEventFn:I}=t,z={buffer:[]},G=E,A=X=>{e.currentTransmux===t&&(X.data.action==="data"&&Ndi(X,z,o),X.data.action==="trackinfo"&&a(X.data.trackInfo),X.data.action==="gopInfo"&&Bdi(X,z),X.data.action==="audioTimingInfo"&&l(X.data.audioTimingInfo),X.data.action==="videoTimingInfo"&&c(X.data.videoTimingInfo),X.data.action==="videoSegmentTimingInfo"&&d(X.data.videoSegmentTimingInfo),X.data.action==="audioSegmentTimingInfo"&&u(X.data.audioSegmentTimingInfo),X.data.action==="id3Frame"&&m([X.data.id3Frame],X.data.id3Frame.dispatchType),X.data.action==="caption"&&f(X.data.caption),X.data.action==="endedtimeline"&&(G=!1,x()),X.data.action==="log"&&D(X.data.log),X.data.type==="transmuxed"&&(G||(e.onmessage=null,Vdi({transmuxedData:z,callback:_}),qXe(e))))},Y=()=>{let X={message:"Received an error message from the transmuxer worker",metadata:{errorType:Vi.Error.StreamingFailedToTransmuxSegment,segmentInfo:OD({segment:M})}};_(null,X)};if(e.onmessage=A,e.onerror=Y,i&&e.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(r)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),typeof s<"u"&&e.postMessage({action:"setRemux",remux:s}),n.byteLength){let X=n instanceof ArrayBuffer?n:n.buffer,ne=n instanceof ArrayBuffer?0:n.byteOffset;I({type:"segmenttransmuxingstart",segment:M}),e.postMessage({action:"push",data:X,byteOffset:ne,byteLength:n.byteLength},[X])}E&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},qXe=t=>{t.currentTransmux=null,t.transmuxQueue.length&&(t.currentTransmux=t.transmuxQueue.shift(),typeof t.currentTransmux=="function"?t.currentTransmux():YXe(t.currentTransmux))},uZe=(t,e)=>{t.postMessage({action:e}),qXe(t)},ZXe=(t,e)=>{if(!e.currentTransmux){e.currentTransmux=t,uZe(e,t);return}e.transmuxQueue.push(uZe.bind(null,e,t))},zdi=t=>{ZXe("reset",t)},Hdi=t=>{ZXe("endTimeline",t)},XXe=t=>{if(!t.transmuxer.currentTransmux){t.transmuxer.currentTransmux=t,YXe(t);return}t.transmuxer.transmuxQueue.push(t)},Gdi=t=>{let e=new Odi;e.currentTransmux=null,e.transmuxQueue=[];let n=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,n.call(e)),e.postMessage({action:"init",options:t}),e},Eye={reset:zdi,endTimeline:Hdi,transmux:XXe,createTransmuxer:Gdi},oH=function(t){let e=t.transmuxer,n=t.endAction||t.action,i=t.callback,r=Fp({},t,{endAction:null,transmuxer:null,callback:null}),s=o=>{o.data.action===n&&(e.removeEventListener("message",s),o.data.data&&(o.data.data=new Uint8Array(o.data.data,t.byteOffset||0,t.byteLength||o.data.data.byteLength),t.data&&(t.data=o.data.data)),i(o.data))};if(e.addEventListener("message",s),t.data){let o=t.data instanceof ArrayBuffer;r.byteOffset=o?0:t.data.byteOffset,r.byteLength=t.data.byteLength;let a=[o?t.data:t.data.buffer];e.postMessage(r,a)}else e.postMessage(r)},z5={FAILURE:2,TIMEOUT:-101,ABORTED:-102},m_e=t=>{t.forEach(e=>{e.abort()})},Wdi=t=>({bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}),Udi=t=>{let e=t.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return i.bytesReceived=t.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i},H_e=(t,e)=>{let{requestType:n}=e,i=zD({requestType:n,request:e,error:t});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:z5.TIMEOUT,xhr:e,metadata:i}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:z5.ABORTED,xhr:e,metadata:i}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:z5.FAILURE,xhr:e,metadata:i}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:z5.FAILURE,xhr:e,metadata:i}:null},hZe=(t,e,n,i)=>(r,s)=>{let o=s.response,a=H_e(r,s);if(a)return n(a,t);if(o.byteLength!==16)return n({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:z5.FAILURE,xhr:s},t);let l=new DataView(o),c=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let u=0;u<e.length;u++)e[u].bytes=c;let d={uri:s.uri};return i({type:"segmentkeyloadcomplete",segment:t,keyInfo:d}),n(null,t)},QXe=(t,e)=>{let n=kQ(t.map.bytes);if(n!=="mp4"){let i=t.map.resolvedUri||t.map.uri,r=n||"unknown";return e({internal:!0,message:`Found unsupported ${r} container for initialization segment at URL: ${i}`,code:z5.FAILURE,metadata:{mediaType:r}})}oH({action:"probeMp4Tracks",data:t.map.bytes,transmuxer:t.transmuxer,callback:({tracks:i,data:r})=>(t.map.bytes=r,i.forEach(function(s){t.map.tracks=t.map.tracks||{},!t.map.tracks[s.type]&&(t.map.tracks[s.type]=s,typeof s.id=="number"&&s.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[s.id]=s.timescale))}),e(null))})},jdi=({segment:t,finishProcessingFn:e,triggerSegmentEventFn:n})=>(i,r)=>{let s=H_e(i,r);if(s)return e(s,t);let o=new Uint8Array(r.response);if(n({type:"segmentloaded",segment:t}),t.map.key)return t.map.encryptedBytes=o,e(null,t);t.map.bytes=o,QXe(t,function(a){if(a)return a.xhr=r,a.status=r.status,e(a,t);e(null,t)})},$di=({segment:t,finishProcessingFn:e,responseType:n,triggerSegmentEventFn:i})=>(r,s)=>{let o=H_e(r,s);if(o)return e(o,t);i({type:"segmentloaded",segment:t});let a=n==="arraybuffer"||!s.responseText?s.response:Rdi(s.responseText.substring(t.lastReachedChar||0));return t.stats=Wdi(s),t.key?t.encryptedBytes=new Uint8Array(a):t.bytes=new Uint8Array(a),e(null,t)},Kdi=({segment:t,bytes:e,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:m,triggerSegmentEventFn:f})=>{let _=t.map&&t.map.tracks||{},x=!!(_.audio&&_.video),D=i.bind(null,t,"audio","start"),E=i.bind(null,t,"audio","end"),M=i.bind(null,t,"video","start"),I=i.bind(null,t,"video","end"),z=()=>XXe({bytes:e,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:x,onData:G=>{G.type=G.type==="combined"?"video":G.type,d(t,G)},onTrackInfo:G=>{n&&(x&&(G.isMuxed=!0),n(t,G))},onAudioTimingInfo:G=>{D&&typeof G.start<"u"&&(D(G.start),D=null),E&&typeof G.end<"u"&&E(G.end)},onVideoTimingInfo:G=>{M&&typeof G.start<"u"&&(M(G.start),M=null),I&&typeof G.end<"u"&&I(G.end)},onVideoSegmentTimingInfo:G=>{let A={pts:{start:G.start.presentation,end:G.end.presentation},dts:{start:G.start.decode,end:G.end.decode}};f({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:A}),r(G)},onAudioSegmentTimingInfo:G=>{let A={pts:{start:G.start.pts,end:G.end.pts},dts:{start:G.start.dts,end:G.end.dts}};f({type:"segmenttransmuxingtiminginfoavailable",segment:t,timingInfo:A}),s(G)},onId3:(G,A)=>{o(t,G,A)},onCaptions:G=>{a(t,[G])},isEndOfTimeline:l,onEndedTimeline:()=>{c()},onTransmuxerLog:m,onDone:(G,A)=>{u&&(G.type=G.type==="combined"?"video":G.type,f({type:"segmenttransmuxingcomplete",segment:t}),u(A,t,G))},segment:t,triggerSegmentEventFn:f});oH({action:"probeTs",transmuxer:t.transmuxer,data:e,baseStartTime:t.baseStartTime,callback:G=>{t.bytes=e=G.data;let A=G.result;A&&(n(t,{hasAudio:A.hasAudio,hasVideo:A.hasVideo,isMuxed:x}),n=null),z()}})},JXe=({segment:t,bytes:e,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:m,triggerSegmentEventFn:f})=>{let _=new Uint8Array(e);if(Eqe(_)){t.isFmp4=!0;let{tracks:x}=t.map,D={isFmp4:!0,hasVideo:!!x.video,hasAudio:!!x.audio};x.audio&&x.audio.codec&&x.audio.codec!=="enca"&&(D.audioCodec=x.audio.codec),x.video&&x.video.codec&&x.video.codec!=="encv"&&(D.videoCodec=x.video.codec),x.video&&x.audio&&(D.isMuxed=!0),n(t,D);let E=(M,I)=>{d(t,{data:_,type:D.hasAudio&&!D.isMuxed?"audio":"video"}),I&&I.length&&o(t,I),M&&M.length&&a(t,M),u(null,t,{})};oH({action:"probeMp4StartTime",timescales:t.map.timescales,data:_,transmuxer:t.transmuxer,callback:({data:M,startTime:I})=>{e=M.buffer,t.bytes=_=M,D.hasAudio&&!D.isMuxed&&i(t,"audio","start",I),D.hasVideo&&i(t,"video","start",I),oH({action:"probeEmsgID3",data:_,transmuxer:t.transmuxer,offset:I,callback:({emsgData:z,id3Frames:G})=>{if(e=z.buffer,t.bytes=_=z,!x.video||!z.byteLength||!t.transmuxer){E(void 0,G);return}oH({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:_,timescales:t.map.timescales,trackIds:[x.video.id],callback:A=>{e=A.data.buffer,t.bytes=_=A.data,A.logs.forEach(function(Y){m(Wd(Y,{stream:"mp4CaptionParser"}))}),E(A.captions,G)}})}})}});return}if(!t.transmuxer){u(null,t,{});return}if(typeof t.container>"u"&&(t.container=kQ(_)),t.container!=="ts"&&t.container!=="aac"){n(t,{hasAudio:!1,hasVideo:!1}),u(null,t,{});return}Kdi({segment:t,bytes:e,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:m,triggerSegmentEventFn:f})},eQe=function({id:t,key:e,encryptedBytes:n,decryptionWorker:i,segment:r,doneFn:s},o){let a=c=>{if(c.data.source===t){i.removeEventListener("message",a);let d=c.data.decrypted;o(new Uint8Array(d.bytes,d.byteOffset,d.byteLength))}};i.onerror=()=>{let c="An error occurred in the decryption worker",d=OD({segment:r}),u={message:c,metadata:{error:new Error(c),errorType:Vi.Error.StreamingFailedToDecryptSegment,segmentInfo:d,keyInfo:{uri:r.key.resolvedUri||r.map.key.resolvedUri}}};s(u,r)},i.addEventListener("message",a);let l;e.bytes.slice?l=e.bytes.slice():l=new Uint32Array(Array.prototype.slice.call(e.bytes)),i.postMessage(BXe({source:t,encrypted:n,key:l,iv:e.iv}),[n.buffer,l.buffer])},Ydi=({decryptionWorker:t,segment:e,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:m,triggerSegmentEventFn:f})=>{f({type:"segmentdecryptionstart"}),eQe({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:t,segment:e,doneFn:u},_=>{e.bytes=_,f({type:"segmentdecryptioncomplete",segment:e}),JXe({segment:e,bytes:e.bytes,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:m,triggerSegmentEventFn:f})})},qdi=({activeXhrs:t,decryptionWorker:e,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:m,triggerSegmentEventFn:f})=>{let _=0,x=!1;return(D,E)=>{if(!x){if(D)return x=!0,m_e(t),u(D,E);if(_+=1,_===t.length){let M=function(){if(E.encryptedBytes)return Ydi({decryptionWorker:e,segment:E,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:m,triggerSegmentEventFn:f});JXe({segment:E,bytes:E.bytes,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:u,onTransmuxerLog:m,triggerSegmentEventFn:f})};if(E.endOfAllRequests=Date.now(),E.map&&E.map.encryptedBytes&&!E.map.bytes)return f({type:"segmentdecryptionstart",segment:E}),eQe({decryptionWorker:e,id:E.requestId+"-init",encryptedBytes:E.map.encryptedBytes,key:E.map.key,segment:E,doneFn:u},I=>{E.map.bytes=I,f({type:"segmentdecryptioncomplete",segment:E}),QXe(E,z=>{if(z)return m_e(t),u(z,E);M()})});M()}}}},Zdi=({loadendState:t,abortFn:e})=>n=>{n.target.aborted&&e&&!t.calledAbortFn&&(e(),t.calledAbortFn=!0)},Xdi=({segment:t,progressFn:e,trackInfoFn:n,timingInfoFn:i,videoSegmentTimingInfoFn:r,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:a,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d})=>u=>{if(!u.target.aborted)return t.stats=Wd(t.stats,Udi(u)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),e(u,t)},Qdi=({xhr:t,xhrOptions:e,decryptionWorker:n,segment:i,abortFn:r,progressFn:s,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:m,endedTimelineFn:f,dataFn:_,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:E})=>{let M=[],I=qdi({activeXhrs:M,decryptionWorker:n,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:m,endedTimelineFn:f,dataFn:_,doneFn:x,onTransmuxerLog:D,triggerSegmentEventFn:E});if(i.key&&!i.key.bytes){let X=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&X.push(i.map.key);let ne=Wd(e,{uri:i.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),pe=hZe(i,X,I,E),ce={uri:i.key.resolvedUri};E({type:"segmentkeyloadstart",segment:i,keyInfo:ce});let ie=t(ne,pe);M.push(ie)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){let ie=Wd(e,{uri:i.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),le=hZe(i,[i.map.key],I,E),Se={uri:i.map.key.resolvedUri};E({type:"segmentkeyloadstart",segment:i,keyInfo:Se});let je=t(ie,le);M.push(je)}let ne=Wd(e,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:p_e(i.map),requestType:"segment-media-initialization"}),pe=jdi({segment:i,finishProcessingFn:I,triggerSegmentEventFn:E});E({type:"segmentloadstart",segment:i});let ce=t(ne,pe);M.push(ce)}let z=Wd(e,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:p_e(i),requestType:"segment"}),G=$di({segment:i,finishProcessingFn:I,responseType:z.responseType,triggerSegmentEventFn:E});E({type:"segmentloadstart",segment:i});let A=t(z,G);A.addEventListener("progress",Xdi({segment:i,progressFn:s,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:u,isEndOfTimeline:m,endedTimelineFn:f,dataFn:_})),M.push(A);let Y={};return M.forEach(X=>{X.addEventListener("loadend",Zdi({loadendState:Y,abortFn:r}))}),()=>m_e(M)},Jdi=h6("CodecUtils"),eui=function(t){let e=t.attributes||{};if(e.CODECS)return Jy(e.CODECS)},tQe=(t,e)=>{let n=e.attributes||{};return t&&t.mediaGroups&&t.mediaGroups.AUDIO&&n.AUDIO&&t.mediaGroups.AUDIO[n.AUDIO]},tui=(t,e)=>{if(!tQe(t,e))return!0;let n=e.attributes||{},i=t.mediaGroups.AUDIO[n.AUDIO];for(let r in i)if(!i[r].uri&&!i[r].playlists)return!0;return!1},AJ=function(t){let e={};return t.forEach(({mediaType:n,type:i,details:r})=>{e[n]=e[n]||[],e[n].push(k6e(`${i}${r}`))}),Object.keys(e).forEach(function(n){if(e[n].length>1){Jdi(`multiple ${n} codecs found as attributes: ${e[n].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[n]=null;return}e[n]=e[n][0]}),e},pZe=function(t){let e=0;return t.audio&&e++,t.video&&e++,e},aH=function(t,e){let n=e.attributes||{},i=AJ(eui(e)||[]);if(tQe(t,e)&&!i.audio&&!tui(t,e)){let r=AJ(GKe(t,n.AUDIO)||[]);r.audio&&(i.audio=r.audio)}return i},LQ=h6("PlaylistSelector"),mZe=function(t){if(!t||!t.playlist)return;let e=t.playlist;return JSON.stringify({id:e.id,bandwidth:t.bandwidth,width:t.width,height:t.height,codecs:e.attributes&&e.attributes.CODECS||""})},PJ=function(t,e){if(!t)return"";let n=di.default.getComputedStyle(t);return n?n[e]:""},AP=function(t,e){let n=t.slice();t.sort(function(i,r){let s=e(i,r);return s===0?n.indexOf(i)-n.indexOf(r):s})},G_e=function(t,e){let n,i;return t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||di.default.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||di.default.Number.MAX_VALUE,n-i},iui=function(t,e){let n,i;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||di.default.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||di.default.Number.MAX_VALUE,n===i&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:n-i},iQe=function(t,e,n,i,r,s){if(!t)return;let o={bandwidth:e,width:n,height:i,limitRenditionByPlayerDimensions:r},a=t.playlists;C3.isAudioOnly(t)&&(a=s.getAudioTrackPlaylists_(),o.audioOnly=!0);let l=a.map(G=>{let A,Y=G.attributes&&G.attributes.RESOLUTION&&G.attributes.RESOLUTION.width,X=G.attributes&&G.attributes.RESOLUTION&&G.attributes.RESOLUTION.height;return A=G.attributes&&G.attributes.BANDWIDTH,A=A||di.default.Number.MAX_VALUE,{bandwidth:A,width:Y,height:X,playlist:G}});AP(l,(G,A)=>G.bandwidth-A.bandwidth),l=l.filter(G=>!C3.isIncompatible(G.playlist));let c=l.filter(G=>C3.isEnabled(G.playlist));c.length||(c=l.filter(G=>!C3.isDisabled(G.playlist)));let d=c.filter(G=>G.bandwidth*q1.BANDWIDTH_VARIANCE<e),u=d[d.length-1],m=d.filter(G=>G.bandwidth===u.bandwidth)[0];if(r===!1){let G=m||c[0]||l[0];if(G&&G.playlist){let A="sortedPlaylistReps";return m&&(A="bandwidthBestRep"),c[0]&&(A="enabledPlaylistReps"),LQ(`choosing ${mZe(G)} using ${A} with options`,o),G.playlist}return LQ("could not choose a playlist with options",o),null}let f=d.filter(G=>G.width&&G.height);AP(f,(G,A)=>G.width-A.width);let _=f.filter(G=>G.width===n&&G.height===i);u=_[_.length-1];let x=_.filter(G=>G.bandwidth===u.bandwidth)[0],D,E,M;x||(D=f.filter(G=>G.width>n||G.height>i),E=D.filter(G=>G.width===D[0].width&&G.height===D[0].height),u=E[E.length-1],M=E.filter(G=>G.bandwidth===u.bandwidth)[0]);let I;if(s.leastPixelDiffSelector){let G=f.map(A=>(A.pixelDiff=Math.abs(A.width-n)+Math.abs(A.height-i),A));AP(G,(A,Y)=>A.pixelDiff===Y.pixelDiff?Y.bandwidth-A.bandwidth:A.pixelDiff-Y.pixelDiff),I=G[0]}let z=I||M||x||m||c[0]||l[0];if(z&&z.playlist){let G="sortedPlaylistReps";return I?G="leastPixelDiffRep":M?G="resolutionPlusOneRep":x?G="resolutionBestRep":m?G="bandwidthBestRep":c[0]&&(G="enabledPlaylistReps"),LQ(`choosing ${mZe(z)} using ${G} with options`,o),z.playlist}return LQ("could not choose a playlist with options",o),null},fZe=function(){let t=this.useDevicePixelRatio&&di.default.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(t=this.customPixelRatio),iQe(this.playlists.main,this.systemBandwidth,parseInt(PJ(this.tech_.el(),"width"),10)*t,parseInt(PJ(this.tech_.el(),"height"),10)*t,this.limitRenditionByPlayerDimensions,this.playlistController_)},nui=function(t){let e=-1,n=-1;if(t<0||t>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let i=this.useDevicePixelRatio&&di.default.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(i=this.customPixelRatio),e<0&&(e=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(e=t*this.systemBandwidth+(1-t)*e,n=this.systemBandwidth),iQe(this.playlists.main,e,parseInt(PJ(this.tech_.el(),"width"),10)*i,parseInt(PJ(this.tech_.el(),"height"),10)*i,this.limitRenditionByPlayerDimensions,this.playlistController_)}},rui=function(t){let{main:e,currentTime:n,bandwidth:i,duration:r,segmentDuration:s,timeUntilRebuffer:o,currentTimeline:a,syncController:l}=t,c=e.playlists.filter(_=>!C3.isIncompatible(_)),d=c.filter(C3.isEnabled);d.length||(d=c.filter(_=>!C3.isDisabled(_)));let m=d.filter(C3.hasAttribute.bind(null,"BANDWIDTH")).map(_=>{let D=l.getSyncPoint(_,r,a,n)?1:2,M=C3.estimateSegmentRequestTime(s,i,_)*D-o;return{playlist:_,rebufferingImpact:M}}),f=m.filter(_=>_.rebufferingImpact<=0);return AP(f,(_,x)=>G_e(x.playlist,_.playlist)),f.length?f[0]:(AP(m,(_,x)=>_.rebufferingImpact-x.rebufferingImpact),m[0]||null)},sui=function(){let t=this.playlists.main.playlists.filter(C3.isEnabled);return AP(t,(n,i)=>G_e(n,i)),t.filter(n=>!!aH(this.playlists.main,n).video)[0]||null},oui=t=>{let e=0,n;return t.bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach(i=>{n.set(i,e),e+=i.byteLength})),n};aui=function(t,e,n){if(!t[n]){e.trigger({type:"usage",name:"vhs-608"});let i=n;/^cc708_/.test(n)&&(i="SERVICE"+n.split("_")[1]);let r=e.textTracks().getTrackById(i);if(r)t[n]=r;else{let s=e.options_.vhs&&e.options_.vhs.captionServices||{},o=n,a=n,l=!1,c=s[i];c&&(o=c.label,a=c.language,l=c.default),t[n]=e.addRemoteTextTrack({kind:"captions",id:i,default:l,label:o,language:a},!1).track}}},lui=function({inbandTextTracks:t,captionArray:e,timestampOffset:n}){if(!e)return;let i=di.default.WebKitDataCue||di.default.VTTCue;e.forEach(r=>{let s=r.stream;r.content?r.content.forEach(o=>{let a=new i(r.startTime+n,r.endTime+n,o.text);a.line=o.line,a.align="left",a.position=o.position,a.positionAlign="line-left",t[s].addCue(a)}):t[s].addCue(new i(r.startTime+n,r.endTime+n,r.text))})},cui=function(t){Object.defineProperties(t.frame,{id:{get(){return Vi.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get(){return Vi.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get(){return Vi.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})},dui=({inbandTextTracks:t,metadataArray:e,timestampOffset:n,videoDuration:i})=>{if(!e)return;let r=di.default.WebKitDataCue||di.default.VTTCue,s=t.metadataTrack_;if(!s||(e.forEach(d=>{let u=d.cueTime+n;typeof u!="number"||di.default.isNaN(u)||u<0||!(u<1/0)||!d.frames||!d.frames.length||d.frames.forEach(m=>{let f=new r(u,u,m.value||m.url||m.data||"");f.frame=m,f.value=m,cui(f),s.addCue(f)})}),!s.cues||!s.cues.length))return;let o=s.cues,a=[];for(let d=0;d<o.length;d++)o[d]&&a.push(o[d]);let l=a.reduce((d,u)=>{let m=d[u.startTime]||[];return m.push(u),d[u.startTime]=m,d},{}),c=Object.keys(l).sort((d,u)=>Number(d)-Number(u));c.forEach((d,u)=>{let m=l[d],f=isFinite(i)?i:d,_=Number(c[u+1])||f;m.forEach(x=>{x.endTime=_})})},uui={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},hui=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),pui=({inbandTextTracks:t,dateRanges:e})=>{let n=t.metadataTrack_;if(!n)return;let i=di.default.WebKitDataCue||di.default.VTTCue;e.forEach(r=>{for(let s of Object.keys(r)){if(hui.has(s))continue;let o=new i(r.startTime,r.endTime,"");o.id=r.id,o.type="com.apple.quicktime.HLS",o.value={key:uui[s],data:r[s]},(s==="scte35Out"||s==="scte35In")&&(o.value.data=new Uint8Array(o.value.data.match(/[\da-f]{2}/gi)).buffer),n.addCue(o)}r.processDateRange()})},gZe=(t,e,n)=>{t.metadataTrack_||(t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,Vi.browser.IS_ANY_SAFARI||(t.metadataTrack_.inBandMetadataTrackDispatchType=e))},tH=function(t,e,n){let i,r;if(n&&n.cues)for(i=n.cues.length;i--;)r=n.cues[i],r.startTime>=t&&r.endTime<=e&&n.removeCue(r)},mui=function(t){let e=t.cues;if(!e)return;let n={};for(let i=e.length-1;i>=0;i--){let r=e[i],s=`${r.startTime}-${r.endTime}-${r.text}`;n[s]?t.removeCue(r):n[s]=r}},fui=(t,e,n)=>{if(typeof e>"u"||e===null||!t.length)return[];let i=Math.ceil((e-n+3)*K7.ONE_SECOND_IN_TS),r;for(r=0;r<t.length&&!(t[r].pts>i);r++);return t.slice(r)},gui=(t,e,n)=>{if(!e.length)return t;if(n)return e.slice();let i=e[0].pts,r=0;for(r;r<t.length&&!(t[r].pts>=i);r++);return t.slice(0,r).concat(e)},vui=(t,e,n,i)=>{let r=Math.ceil((e-i)*K7.ONE_SECOND_IN_TS),s=Math.ceil((n-i)*K7.ONE_SECOND_IN_TS),o=t.slice(),a=t.length;for(;a--&&!(t[a].pts<=s););if(a===-1)return o;let l=a+1;for(;l--&&!(t[l].pts<=r););return l=Math.max(l,0),o.splice(l,a-l+1),o},yui=function(t,e){if(!t&&!e||!t&&e||t&&!e)return!1;if(t===e)return!0;let n=Object.keys(t).sort(),i=Object.keys(e).sort();if(n.length!==i.length)return!1;for(let r=0;r<n.length;r++){let s=n[r];if(s!==i[r]||t[s]!==e[s])return!1}return!0},_ui=function(t,e,n){e=e||[];let i=[],r=0;for(let s=0;s<e.length;s++){let o=e[s];if(t===o.timeline&&(i.push(s),r+=o.duration,r>n))return s}return i.length===0?0:i[i.length-1]},Jz=1,Cui=500,vZe=t=>typeof t=="number"&&isFinite(t),OQ=1/60,xui=(t,e,n)=>t!=="main"||!e||!n?null:!n.hasAudio&&!n.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,bui=(t,e,n)=>{let i=e-q1.BACK_BUFFER_LENGTH;t.length&&(i=Math.max(i,t.start(0)));let r=e-n;return Math.min(r,i)},wP=t=>{let{startOfSegment:e,duration:n,segment:i,part:r,playlist:{mediaSequence:s,id:o,segments:a=[]},mediaIndex:l,partIndex:c,timeline:d}=t,u=a.length-1,m="mediaIndex/partIndex increment";t.getMediaInfoForTime?m=`getMediaInfoForTime (${t.getMediaInfoForTime})`:t.isSyncRequest&&(m="getSyncSegmentCandidate (isSyncRequest)"),t.independent&&(m+=` with independent ${t.independent}`);let f=typeof c=="number",_=t.segment.uri?"segment":"pre-segment",x=f?wXe({preloadSegment:i})-1:0;return`${_} [${s+l}/${s+u}]`+(f?` part [${c}/${x}]`:"")+` segment start/end [${i.start} => ${i.end}]`+(f?` part start/end [${r.start} => ${r.end}]`:"")+` startOfSegment [${e}] duration [${n}] timeline [${d}] selected by [${m}] playlist [${o}]`},yZe=t=>`${t}TimingInfo`,wui=({segmentTimeline:t,currentTimeline:e,startOfSegment:n,buffered:i,overrideCheck:r})=>!r&&t===e?null:t<e?n:i.length?i.end(i.length-1):n,_Ze=({timelineChangeController:t,currentTimeline:e,segmentTimeline:n,loaderType:i,audioDisabled:r})=>{if(e===n)return!1;if(i==="audio"){let s=t.lastTimelineChange({type:"main"});return!s||s.to!==n}if(i==="main"&&r){let s=t.pendingTimelineChange({type:"audio"});return!(s&&s.to===n)}return!1},CZe=t=>{if(!t)return!1;let e=t.pendingTimelineChange({type:"audio"}),n=t.pendingTimelineChange({type:"main"}),i=e&&n,r=i&&e.to!==n.to;return!!(i&&e.from!==-1&&n.from!==-1&&r)},xZe=t=>{t&&(t.pause(),t.resetEverything(),t.load())},Sui=t=>{let e=0;return["video","audio"].forEach(function(n){let i=t[`${n}TimingInfo`];if(!i)return;let{start:r,end:s}=i,o;typeof r=="bigint"||typeof s=="bigint"?o=di.default.BigInt(s)-di.default.BigInt(r):typeof r=="number"&&typeof s=="number"&&(o=s-r),typeof o<"u"&&o>e&&(e=o)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},bZe=({segmentDuration:t,maxDuration:e})=>t?Math.round(t)>e+V5:!1,Tui=(t,e)=>{if(e!=="hls")return null;let n=Sui({audioTimingInfo:t.audioTimingInfo,videoTimingInfo:t.videoTimingInfo});if(!n)return null;let i=t.playlist.targetDuration,r=bZe({segmentDuration:n,maxDuration:i*2}),s=bZe({segmentDuration:n,maxDuration:i}),o=`Segment with index ${t.mediaIndex} from playlist ${t.playlist.id} has a duration of ${n} when the reported duration is ${t.duration} and the target duration is ${i}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return r||s?{severity:r?"warn":"info",message:o}:null},OD=({type:t,segment:e})=>{if(!e)return;let n=!!(e.key||e.map&&e.map.ke),i=!!(e.map&&!e.map.bytes),r=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:t||e.type,uri:e.resolvedUri||e.uri,start:r,duration:e.duration,isEncrypted:n,isMediaInitialization:i}},kH=class extends Vi.EventTarget{constructor(e,n={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=h6(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(i){i!==this.state_&&(this.logger_(`${this.state_} -> ${i}`),this.state_=i,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),this.sourceUpdater_.on("codecschange",i=>{this.trigger(Fp({type:"codecschange"},i))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",i=>{this.trigger(Fp({type:"timelinechange"},i)),this.hasEnoughInfoToLoad_()&&this.processLoadQueue_(),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Eye.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&di.default.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,di.default.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Eye.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){let e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return L0();if(this.loaderType_==="main"){let{hasAudio:n,hasVideo:i,isMuxed:r}=e;if(i&&n&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,n=!1){if(!e)return null;let i=IJ(e),r=this.initSegments_[i];return n&&!r&&e.bytes&&(this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e}segmentKey(e,n=!1){if(!e)return null;let i=zXe(e),r=this.keyCache_[i];this.cacheEncryptionKeys_&&n&&!r&&e.bytes&&(this.keyCache_[i]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});let s={resolvedUri:(r||e).resolvedUri};return r&&(s.bytes=r.bytes),s}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,n={}){if(!e)return;let i=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=n,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let s=null;if(i&&(i.id?s=i.id:i.uri&&(s=i.uri)),this.logger_(`playlist update [${s} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
currentTime: ${this.currentTime_()}
bufferedEnd: ${Tye(this.buffered_())}
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}let o=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${o}]`),this.mediaIndex!==null)if(this.mediaIndex-=o,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{let a=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!a.parts||!a.parts.length||!a.parts[this.partIndex])){let l=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=l}}r&&(r.mediaIndex-=o,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(di.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Eye.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;let e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,n,i=()=>{},r=!1){if(n===1/0&&(n=this.duration_()),n<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let s=1,o=()=>{s--,s===0&&i()};(r||!this.audioDisabled_)&&(s++,this.sourceUpdater_.removeAudio(e,n,o)),(r||this.loaderType_==="main")&&(this.gopBuffer_=vui(this.gopBuffer_,e,n,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(e,n,o));for(let a in this.inbandTextTracks_)tH(e,n,this.inbandTextTracks_[a]);tH(e,n,this.segmentMetadataTrack_),o()}monitorBuffer_(){this.checkBufferTimeout_&&di.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=di.default.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&di.default.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=di.default.setTimeout(this.monitorBufferTick_.bind(this),Cui)}fillBuffer_(){if(this.sourceUpdater_.updating())return;let e=this.chooseNextRequest_();if(!e)return;let n={segmentInfo:OD({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:n}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,n=this.playlist_,i=this.partIndex){if(!n||!this.mediaSource_)return!1;let r=typeof e=="number"&&n.segments[e],s=e+1===n.segments.length,o=!r||!r.parts||i+1===r.parts.length;return n.endList&&this.mediaSource_.readyState==="open"&&s&&o}chooseNextRequest_(){let e=this.buffered_(),n=Tye(e)||0,i=N_e(e,this.currentTime_()),r=!this.hasPlayed_()&&i>=1,s=i>=this.goalBufferLength_(),o=this.playlist_.segments;if(!o.length||r||s)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);let a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(a.isSyncRequest)a.mediaIndex=_ui(this.currentTimeline_,o,n),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(this.mediaIndex!==null){let m=o[this.mediaIndex],f=typeof this.partIndex=="number"?this.partIndex:-1;a.startOfSegment=m.end?m.end:n,m.parts&&m.parts[f+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=f+1):a.mediaIndex=this.mediaIndex+1}else{let m,f,_,x=this.fetchAtBuffer_?n:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
For TargetTime: ${x}.
CurrentTime: ${this.currentTime_()}
BufferedEnd: ${n}
Fetch At Buffer: ${this.fetchAtBuffer_}
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){let D=this.getSyncInfoFromMediaSequenceSync_(x);if(!D){let E="No sync info found while using media sequence sync";return this.error({message:E,metadata:{errorType:Vi.Error.StreamingFailedToSelectNextSegment,error:new Error(E)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${D.start} --> ${D.end})`),m=D.segmentIndex,f=D.partIndex,_=D.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");let D=C3.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:x,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});m=D.segmentIndex,f=D.partIndex,_=D.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${x}`:`currentTime ${x}`,a.mediaIndex=m,a.startOfSegment=_,a.partIndex=f,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}let l=o[a.mediaIndex],c=l&&typeof a.partIndex=="number"&&l.parts&&l.parts[a.partIndex];if(!l||typeof a.partIndex=="number"&&!c)return null;typeof a.partIndex!="number"&&l.parts&&(a.partIndex=0,c=l.parts[0]);let d=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&c&&!d&&!c.independent)if(a.partIndex===0){let m=o[a.mediaIndex-1],f=m.parts&&m.parts.length&&m.parts[m.parts.length-1];f&&f.independent&&(a.mediaIndex-=1,a.partIndex=m.parts.length-1,a.independent="previous segment")}else l.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");let u=this.mediaSource_&&this.mediaSource_.readyState==="ended";return a.mediaIndex>=o.length-1&&u&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;let n=Math.max(e,this.mediaSequenceSync_.start);e!==n&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${n}`);let i=this.mediaSequenceSync_.getSyncInfoForTime(n);if(!i)return null;if(!i.isAppended)return i;let r=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return r?(r.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),r):null}generateSegmentInfo_(e){let{independent:n,playlist:i,mediaIndex:r,startOfSegment:s,isSyncRequest:o,partIndex:a,forceTimestampOffset:l,getMediaInfoForTime:c}=e,d=i.segments[r],u=typeof a=="number"&&d.parts[a],m={requestId:"segment-loader-"+Math.random(),uri:u&&u.resolvedUri||d.resolvedUri,mediaIndex:r,partIndex:u?a:null,isSyncRequest:o,startOfSegment:s,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:d.timeline,duration:u&&u.duration||d.duration,segment:d,part:u,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:c,independent:n},f=typeof l<"u"?l:this.isPendingTimestampOffset_;m.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:d.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:f});let _=Tye(this.sourceUpdater_.audioBuffered());return typeof _=="number"&&(m.audioAppendStart=_-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(m.gopsToAlignWith=fui(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),m}timestampOffsetForSegment_(e){return wui(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;let n=this.currentTime_(),i=e.bandwidth,r=this.pendingSegment_.duration,s=C3.estimateSegmentRequestTime(r,i,this.playlist_,e.bytesReceived),o=$ci(this.buffered_(),n,this.vhs_.tech_.playbackRate())-1;if(s<=o)return;let a=rui({main:this.vhs_.playlists.main,currentTime:n,bandwidth:i,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;let c=s-o-a.rebufferingImpact,d=.5;o<=V5&&(d=1),!(!a.playlist||a.playlist.uri===this.playlist_.uri||c<d)&&(this.bandwidth=a.playlist.attributes.BANDWIDTH*q1.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${wP(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,n){this.earlyAbortWhenNeeded_(n.stats),!this.checkForAbort_(n.requestId)&&this.trigger("progress")}handleTrackInfo_(e,n){let{hasAudio:i,hasVideo:r}=n,s={segmentInfo:OD({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:r}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:s}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(n)||(n=n||{},yui(this.currentMediaInfo_,n)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=n,this.currentMediaInfo_=n,this.logger_("trackinfo update",n),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=n,this.hasEnoughInfoToAppend_()&&this.processCallQueue_())))}handleTimingInfo_(e,n,i,r){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;let s=this.pendingSegment_,o=yZe(n);s[o]=s[o]||{},s[o][i]=r,this.logger_(`timinginfo: ${n} - ${i} - ${r}`),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}handleCaptions_(e,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(n.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,n));return}let r=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};n.forEach(o=>{s[o.stream]=s[o.stream]||{startTime:1/0,captions:[],endTime:0};let a=s[o.stream];a.startTime=Math.min(a.startTime,o.startTime+r),a.endTime=Math.max(a.endTime,o.endTime+r),a.captions.push(o)}),Object.keys(s).forEach(o=>{let{startTime:a,endTime:l,captions:c}=s[o],d=this.inbandTextTracks_;this.logger_(`adding cues from ${a} -> ${l} for ${o}`),aui(d,this.vhs_.tech_,o),tH(a,l,d[o]),lui({captionArray:c,inbandTextTracks:d,timestampOffset:r})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,n,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,n,i));return}this.addMetadataToTextTrack(i,n,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){let e=this.callQueue_;this.callQueue_=[],e.forEach(n=>n())}processLoadQueue_(){let e=this.loadQueue_;this.loadQueue_=[],e.forEach(n=>n())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;let e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()&&_Ze({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})?(CZe(this.timelineChangeController_)&&xZe(this),!1):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;let e=this.pendingSegment_,n=this.getCurrentMediaInfo_();if(!e||!n)return!1;let{hasAudio:i,hasVideo:r,isMuxed:s}=n;return r&&!e.videoTimingInfo||i&&!this.audioDisabled_&&!s&&!e.audioTimingInfo?!1:_Ze({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})?(CZe(this.timelineChangeController_)&&xZe(this),!1):!0}handleData_(e,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){this.callQueue_.push(this.handleData_.bind(this,e,n));return}let i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[yZe(n.type)].start;else{let r=this.getCurrentMediaInfo_(),s=this.loaderType_==="main"&&r&&r.hasVideo,o;s&&(o=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:o,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,n.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:this.loaderType_==="main"});let r=this.chooseNextRequest_();if(r.mediaIndex!==i.mediaIndex||r.partIndex!==i.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,n)}}updateAppendInitSegmentStatus(e,n){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[n]!==e.playlist&&(this.appendInitSegment_[n]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:n,map:i,playlist:r}){if(i){let s=IJ(i);if(this.activeInitSegmentId_===s)return null;n=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=s}return n&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=r,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,n):null}handleQuotaExceededError_({segmentInfo:e,type:n,bytes:i},r){let s=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+ND(s).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+ND(o).join(", "));let a=s.length?s.start(0):0,l=s.length?s.end(s.length-1):0,c=o.length?o.start(0):0,d=o.length?o.end(o.length-1):0;if(l-a<=Jz&&d-c<=Jz){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${ND(s).join(", ")}, video buffer: ${ND(o).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:n,bytes:i}));let m=this.currentTime_()-Jz;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${m}`),this.remove(0,m,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Jz}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=di.default.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Jz*1e3)},!0)}handleAppendError_({segmentInfo:e,type:n,bytes:i},r){if(r){if(r.code===FXe){this.handleQuotaExceededError_({segmentInfo:e,type:n,bytes:i});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",r),this.error({message:`${n} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:Vi.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r,bytes:s}){if(!s){let a=[r],l=r.byteLength;i&&(a.unshift(i),l+=i.byteLength),s=oui({bytes:l,segments:a})}let o={segmentInfo:OD({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:o}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:n,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:e,type:n,bytes:s}))}handleSegmentTimingInfo_(e,n,i){if(!this.pendingSegment_||n!==this.pendingSegment_.requestId)return;let r=this.pendingSegment_.segment,s=`${e}TimingInfo`;r[s]||(r[s]={}),r[s].transmuxerPrependedSeconds=i.prependedContentDuration||0,r[s].transmuxedPresentationStart=i.start.presentation,r[s].transmuxedDecodeStart=i.start.decode,r[s].transmuxedPresentationEnd=i.end.presentation,r[s].transmuxedDecodeEnd=i.end.decode,r[s].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,n){let{type:i,data:r}=n;if(!r||!r.byteLength||i==="audio"&&this.audioDisabled_)return;let s=this.getInitSegmentAndUpdateState_({type:i,initSegment:n.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:s,data:r})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){this.loadQueue_.push(()=>{let n=Fp({},e,{forceTimestampOffset:!0});Fp(e,this.generateSegmentInfo_(n)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));let n=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=this.mediaIndex!==null,s=e.timeline!==this.currentTimeline_&&e.timeline>0,o=i||r&&s;this.logger_(`Requesting
${nQe(e.uri)}
${wP(e)}`),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Qdi({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:o,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:a,level:l,stream:c})=>{this.logger_(`${wP(e)} logged from transmuxer stream ${c} as a ${l}: ${a}`)},triggerSegmentEventFn:({type:a,segment:l,keyInfo:c,trackInfo:d,timingInfo:u})=>{let f={segmentInfo:OD({segment:l})};c&&(f.keyInfo=c),d&&(f.trackInfo=d),u&&(f.timingInfo=u),this.trigger({type:a,metadata:f})}})}trimBackBuffer_(e){let n=bui(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);n>0&&this.remove(0,n)}createSimplifiedSegmentObj_(e){let n=e.segment,i=e.part,r=e.segment.key||e.segment.map&&e.segment.map.key,s=e.segment.map&&!e.segment.map.bytes,o={resolvedUri:i?i.resolvedUri:n.resolvedUri,byterange:i?i.byterange:n.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:r,isMediaInitialization:s},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===n.timeline&&(a.videoTimingInfo?o.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(o.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),n.key){let l=n.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(n.key),o.key.iv=l}return n.map&&(o.map=this.initSegmentForMap(n.map)),o}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,n){if(this.pendingSegment_.byteLength=n.bytesReceived,e<OQ){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${OQ}`);return}let i={bandwidthInfo:{from:this.bandwidth,to:n.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:i}),this.bandwidth=n.bandwidth,this.roundTrip=n.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,n,i){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,n,i));return}if(this.saveTransferStats_(n.stats),!this.pendingSegment_||n.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===z5.ABORTED)return;if(this.pause(),e.code===z5.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}let r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,n.stats),r.endOfAllRequests=n.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=gui(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}setTimeMapping_(e){let n=this.syncController_.mappingForTimeline(e);n!==null&&(this.timeMapping_=n)}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:e,playlist:n,mediaIndex:i,firstVideoFrameTimeForData:r,currentVideoTimestampOffset:s,useVideoTimingInfo:o,videoTimingInfo:a,audioTimingInfo:l}){if(typeof e<"u")return e;if(!o)return l.start;let c=n.segments[i-1];return i===0||!c||typeof c.start>"u"||c.end!==r+s?r:a.start}waitForAppendsToComplete_(e){let n=this.getCurrentMediaInfo_(e);if(!n){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}let{hasAudio:i,hasVideo:r,isMuxed:s}=n,o=this.loaderType_==="main"&&r,a=!this.audioDisabled_&&i&&!s;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}o&&e.waitingOnAppends++,a&&e.waitingOnAppends++,o&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){let n=xui(this.loaderType_,this.getCurrentMediaInfo_(),e);return n?(this.error({message:n,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let n=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),n=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),n=!0),n&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:n,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:n&&typeof n.transmuxedDecodeStart=="number"?n.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};let n=this.getMediaInfo_(),r=this.loaderType_==="main"&&n&&n.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;r&&(e.timingInfo.end=typeof r.end=="number"?r.end:r.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){let l={segmentInfo:OD({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:l})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}let e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});let n=Tui(e,this.sourceType_);if(n&&(n.severity==="warn"?Vi.log.warn(n.message):this.logger_(n.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${wP(e)}`);return}this.logger_(`Appended ${wP(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");let i=e.segment,r=e.part,s=i.end&&this.currentTime_()-i.end>e.playlist.targetDuration*3,o=r&&r.end&&this.currentTime_()-r.end>e.playlist.partTargetDuration*3;if(s||o){this.logger_(`bad ${s?"segment":"part"} ${wP(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<OQ){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${OQ}`);return}let n=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(r-n)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;let n=e.segment,i=n.start,r=n.end;if(!vZe(i)||!vZe(r))return;tH(i,r,this.segmentMetadataTrack_);let s=di.default.WebKitDataCue||di.default.VTTCue,o={custom:n.custom,dateTimeObject:n.dateTimeObject,dateTimeString:n.dateTimeString,programDateTime:n.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:r},a=JSON.stringify(o),l=new s(i,r,a);l.value=o,this.segmentMetadataTrack_.addCue(l)}};rQe=function(t){return typeof t!="string"?t:t.replace(/./,e=>e.toUpperCase())},Dui=["video","audio"],f_e=(t,e)=>{let n=e[`${t}Buffer`];return n&&n.updating||e.queuePending[t]},Eui=(t,e)=>{for(let n=0;n<e.length;n++){let i=e[n];if(i.type==="mediaSource")return null;if(i.type===t)return n}return null},PP=(t,e)=>{if(e.queue.length===0)return;let n=0,i=e.queue[n];if(i.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),i.action(e),i.doneFn&&i.doneFn(),PP("audio",e),PP("video",e));return}if(t!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||f_e(t,e))){if(i.type!==t){if(n=Eui(t,e.queue),n===null)return;i=e.queue[n]}if(e.queue.splice(n,1),e.queuePending[t]=i,i.action(t,e),!i.doneFn){e.queuePending[t]=null,PP(t,e);return}}},sQe=(t,e)=>{let n=e[`${t}Buffer`],i=rQe(t);n&&(n.removeEventListener("updateend",e[`on${i}UpdateEnd_`]),n.removeEventListener("error",e[`on${i}Error_`]),e.codecs[t]=null,e[`${t}Buffer`]=null)},O5=(t,e)=>t&&e&&Array.prototype.indexOf.call(t.sourceBuffers,e)!==-1,A4={appendBuffer:(t,e,n)=>(i,r)=>{let s=r[`${i}Buffer`];if(O5(r.mediaSource,s)){r.logger_(`Appending segment ${e.mediaIndex}'s ${t.length} bytes to ${i}Buffer`);try{s.appendBuffer(t)}catch(o){r.logger_(`Error with code ${o.code} `+(o.code===FXe?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${i}Buffer`),r.queuePending[i]=null,n(o)}}},remove:(t,e)=>(n,i)=>{let r=i[`${n}Buffer`];if(O5(i.mediaSource,r)){i.logger_(`Removing ${t} to ${e} from ${n}Buffer`);try{r.remove(t,e)}catch{i.logger_(`Remove ${t} to ${e} from ${n}Buffer failed`)}}},timestampOffset:t=>(e,n)=>{let i=n[`${e}Buffer`];O5(n.mediaSource,i)&&(n.logger_(`Setting ${e}timestampOffset to ${t}`),i.timestampOffset=t)},callback:t=>(e,n)=>{t()},endOfStream:t=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${t||""})`);try{e.mediaSource.endOfStream(t)}catch(n){Vi.log.warn("Failed to call media source endOfStream",n)}}},duration:t=>e=>{e.logger_(`Setting mediaSource duration to ${t}`);try{e.mediaSource.duration=t}catch(n){Vi.log.warn("Failed to set media source duration",n)}},abort:()=>(t,e)=>{if(e.mediaSource.readyState!=="open")return;let n=e[`${t}Buffer`];if(O5(e.mediaSource,n)){e.logger_(`calling abort on ${t}Buffer`);try{n.abort()}catch(i){Vi.log.warn(`Failed to abort on ${t}Buffer`,i)}}},addSourceBuffer:(t,e)=>n=>{let i=rQe(t),r=lP(e);n.logger_(`Adding ${t}Buffer with codec ${e} to mediaSource`);let s=n.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",n[`on${i}UpdateEnd_`]),s.addEventListener("error",n[`on${i}Error_`]),n.codecs[t]=e,n[`${t}Buffer`]=s},removeSourceBuffer:t=>e=>{let n=e[`${t}Buffer`];if(sQe(t,e),!!O5(e.mediaSource,n)){e.logger_(`Removing ${t}Buffer with codec ${e.codecs[t]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(n)}catch(i){Vi.log.warn(`Failed to removeSourceBuffer ${t}Buffer`,i)}}},changeType:t=>(e,n)=>{let i=n[`${e}Buffer`],r=lP(t);if(!O5(n.mediaSource,i))return;let s=t.substring(0,t.indexOf(".")),o=n.codecs[e];if(o.substring(0,o.indexOf("."))===s)return;let l={codecsChangeInfo:{from:o,to:t}};n.trigger({type:"codecschange",metadata:l}),n.logger_(`changing ${e}Buffer codec from ${o} to ${t}`);try{i.changeType(r),n.codecs[e]=t}catch(c){l.errorType=Vi.Error.StreamingCodecsChangeError,l.error=c,c.metadata=l,n.error_=c,n.trigger("error"),Vi.log.warn(`Failed to changeType on ${e}Buffer`,c)}}},P4=({type:t,sourceUpdater:e,action:n,doneFn:i,name:r})=>{e.queue.push({type:t,action:n,doneFn:i,name:r}),PP(t,e)},wZe=(t,e)=>n=>{let i=e[`${t}Buffered`](),r=Wci(i);if(e.logger_(`received "updateend" event for ${t} Source Buffer: `,r),e.queuePending[t]){let s=e.queuePending[t].doneFn;e.queuePending[t]=null,s&&s(e[`${t}Error_`])}PP(t,e)},RJ=class extends Vi.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>PP("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=h6("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=wZe("video",this),this.onAudioUpdateEnd_=wZe("audio",this),this.onVideoError_=n=>{this.videoError_=n},this.onAudioError_=n=>{this.audioError_=n},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,n){P4({type:"mediaSource",sourceUpdater:this,action:A4.addSourceBuffer(e,n),name:"addSourceBuffer"})}abort(e){P4({type:e,sourceUpdater:this,action:A4.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){Vi.log.error("removeSourceBuffer is not supported!");return}P4({type:"mediaSource",sourceUpdater:this,action:A4.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!Vi.browser.IS_FIREFOX&&di.default.MediaSource&&di.default.MediaSource.prototype&&typeof di.default.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return di.default.SourceBuffer&&di.default.SourceBuffer.prototype&&typeof di.default.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,n){if(!this.canChangeType()){Vi.log.error("changeType is not supported!");return}P4({type:e,sourceUpdater:this,action:A4.changeType(n),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(n=>{let i=e[n];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(n,i);this.canChangeType()&&this.changeType(n,i)})}appendBuffer(e,n){let{segmentInfo:i,type:r,bytes:s}=e;if(this.processedAppend_=!0,r==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,n]),this.logger_(`delayed audio append of ${s.length} until video append`);return}let o=n;if(P4({type:r,sourceUpdater:this,action:A4.appendBuffer(s,i||{mediaIndex:-1},o),doneFn:n,name:"appendBuffer"}),r==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;let a=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${a.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,a.forEach(l=>{this.appendBuffer.apply(this,l)})}}audioBuffered(){return O5(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:L0()}videoBuffered(){return O5(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:L0()}buffered(){let e=O5(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,n=O5(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return n&&!e?this.audioBuffered():e&&!n?this.videoBuffered():jci(this.audioBuffered(),this.videoBuffered())}setDuration(e,n=kx){P4({type:"mediaSource",sourceUpdater:this,action:A4.duration(e),name:"duration",doneFn:n})}endOfStream(e=null,n=kx){typeof e!="string"&&(e=void 0),P4({type:"mediaSource",sourceUpdater:this,action:A4.endOfStream(e),name:"endOfStream",doneFn:n})}removeAudio(e,n,i=kx){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){i();return}P4({type:"audio",sourceUpdater:this,action:A4.remove(e,n),doneFn:i,name:"remove"})}removeVideo(e,n,i=kx){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){i();return}P4({type:"video",sourceUpdater:this,action:A4.remove(e,n),doneFn:i,name:"remove"})}updating(){return!!(f_e("audio",this)||f_e("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(P4({type:"audio",sourceUpdater:this,action:A4.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(P4({type:"video",sourceUpdater:this,action:A4.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&P4({type:"audio",sourceUpdater:this,action:A4.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&P4({type:"video",sourceUpdater:this,action:A4.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),Dui.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>sQe(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}},SZe=t=>decodeURIComponent(escape(String.fromCharCode.apply(null,t))),Mui=t=>{let e=new Uint8Array(t);return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("")},TZe=new Uint8Array(`

`.split("").map(t=>t.charCodeAt(0))),g_e=class extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}},v_e=class extends kH{constructor(e,n={}){super(e,n),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}createTransmuxer_(){return null}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return L0();let e=this.subtitlesTrack_.cues,n=e[0].startTime,i=e[e.length-1].startTime;return L0([[n,i]])}initSegmentForMap(e,n=!1){if(!e)return null;let i=IJ(e),r=this.initSegments_[i];if(n&&!r&&e.bytes){let s=TZe.byteLength+e.bytes.byteLength,o=new Uint8Array(s);o.set(e.bytes),o.set(TZe,e.bytes.byteLength),this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return r||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,n){tH(e,n,this.subtitlesTrack_)}fillBuffer_(){let e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){let n=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",n),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,n,i){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(n.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===z5.TIMEOUT&&this.handleTimeout_(),e.code===z5.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}let r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,n.stats),n.key&&this.segmentKey(n.key,!0),this.state="APPENDING",this.trigger("appending");let s=r.segment;if(s.map&&(s.map.bytes=n.map.bytes),r.bytes=n.bytes,typeof di.default.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,n,i),()=>this.stopForError({message:"Error loading vtt.js"}));return}s.requested=!0;try{this.parseVTTCues_(r)}catch(o){this.stopForError({message:o.message,metadata:{errorType:Vi.Error.StreamingVttParserError,error:o}});return}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=s.duration,r.cues.forEach(o=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new di.default.VTTCue(o.startTime,o.endTime,o.text):o)}),mui(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(){}updateTimingInfoEnd_(){}parseVTTCues_(e){let n,i=!1;if(typeof di.default.WebVTT!="function")throw new g_e;typeof di.default.TextDecoder=="function"?n=new di.default.TextDecoder("utf8"):(n=di.default.WebVTT.StringDecoder(),i=!0);let r=new di.default.WebVTT.Parser(di.default,di.default.vttjs,n);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=o=>{e.timestampmap=o},r.onparsingerror=o=>{Vi.log.warn("Error encountered when parsing cues: "+o.message)},e.segment.map){let o=e.segment.map.bytes;i&&(o=SZe(o)),r.parse(o)}let s=e.bytes;i&&(s=SZe(s)),r.parse(s),r.flush()}updateTimeMapping_(e,n,i){let r=e.segment;if(!n)return;if(!e.cues.length){r.empty=!0;return}let{MPEGTS:s,LOCAL:o}=e.timestampmap,l=s/K7.ONE_SECOND_IN_TS-o+n.mapping;if(e.cues.forEach(c=>{let d=c.endTime-c.startTime,u=s===0?c.startTime+l:this.handleRollover_(c.startTime+l,n.time);c.startTime=Math.max(u,0),c.endTime=Math.max(u+d,0)}),!i.syncInfo){let c=e.cues[0].startTime,d=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(c,d-r.duration)}}}handleRollover_(e,n){if(n===null)return e;let i=e*K7.ONE_SECOND_IN_TS,r=n*K7.ONE_SECOND_IN_TS,s;for(r<i?s=-8589934592:s=8589934592;Math.abs(i-r)>4294967296;)i+=s;return i/K7.ONE_SECOND_IN_TS}},kui=function(t,e){let n=t.cues;for(let i=0;i<n.length;i++){let r=n[i];if(e>=r.adStartTime&&e<=r.adEndTime)return r}return null},Iui=function(t,e,n=0){if(!t.segments)return;let i=n,r;for(let s=0;s<t.segments.length;s++){let o=t.segments[s];if(r||(r=kui(e,i+o.duration/2)),r){if("cueIn"in o){r.endTime=i,r.adEndTime=i,i+=o.duration,r=null;continue}if(i<r.endTime){i+=o.duration;continue}r.endTime+=o.duration}else if("cueOut"in o&&(r=new di.default.VTTCue(i,i+o.duration,o.cueOut),r.adStartTime=i,r.adEndTime=i+parseFloat(o.cueOut),e.addCue(r)),"cueOutCont"in o){let[a,l]=o.cueOutCont.split("/").map(parseFloat);r=new di.default.VTTCue(i,i+o.duration,""),r.adStartTime=i-a,r.adEndTime=r.adStartTime+l,e.addCue(r)}i+=o.duration}},FJ=class{constructor({start:e,end:n,segmentIndex:i,partIndex:r=null,appended:s=!1}){this.start_=e,this.end_=n,this.segmentIndex_=i,this.partIndex_=r,this.appended_=s}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}},y_e=class{constructor(e,n=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=n}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}},LJ=class{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,n){let{mediaSequence:i,segments:r}=e;if(this.isReliable_=this.isReliablePlaylist_(i,r),!!this.isReliable_)return this.updateStorage_(r,i,this.calculateBaseTime_(i,n))}getSyncInfoForTime(e){for(let{segmentSyncInfo:n,partsSyncInfo:i}of this.storage_.values())if(i.length){for(let r of i)if(r.isInRange(e))return r}else if(n.isInRange(e))return n;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,n,i){let r=new Map,s=`
`,o=i,a=n;this.start_=o,e.forEach((l,c)=>{let d=this.storage_.get(a),u=o,m=u+l.duration,f=!!(d&&d.segmentSyncInfo&&d.segmentSyncInfo.isAppended),_=new FJ({start:u,end:m,appended:f,segmentIndex:c});l.syncInfo=_;let x=o,D=(l.parts||[]).map((E,M)=>{let I=x,z=x+E.duration,G=!!(d&&d.partsSyncInfo&&d.partsSyncInfo[M]&&d.partsSyncInfo[M].isAppended),A=new FJ({start:I,end:z,appended:G,segmentIndex:c,partIndex:M});return x=z,s+=`Media Sequence: ${a}.${M} | Range: ${I} --> ${z} | Appended: ${G}
`,E.syncInfo=A,A});r.set(a,new y_e(_,D)),s+=`${nQe(l.resolvedUri)} | Media Sequence: ${a} | Range: ${u} --> ${m} | Appended: ${f}
`,a++,o=m}),this.end_=o,this.storage_=r,this.diagnostics_=s}calculateBaseTime_(e,n){return this.storage_.size?this.storage_.has(e)?this.storage_.get(e).segmentSyncInfo.start:n:0}isReliablePlaylist_(e,n){return e!=null&&Array.isArray(n)&&n.length}},OJ=class extends LJ{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,n){if(!this.storage_.size){let i=this.parent_.getSyncInfoForMediaSequence(e);return i?i.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,n)}},Aui=86400,Mye=[{name:"VOD",run:(t,e,n,i,r)=>n!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(t,e,n,i,r,s)=>{let o=t.getMediaSequenceSync(s);if(!o||!o.isReliable)return null;let a=o.getSyncInfoForTime(r);return a?{time:a.start,partIndex:a.partIndex,segmentIndex:a.segmentIndex}:null}},{name:"ProgramDateTime",run:(t,e,n,i,r)=>{if(!Object.keys(t.timelineToDatetimeMappings).length)return null;let s=null,o=null,a=l_e(e);r=r||0;for(let l=0;l<a.length;l++){let c=e.endList||r===0?l:a.length-(l+1),d=a[c],u=d.segment,m=t.timelineToDatetimeMappings[u.timeline];if(!m||!u.dateTimeObject)continue;let _=u.dateTimeObject.getTime()/1e3+m;if(u.parts&&typeof d.partIndex=="number")for(let D=0;D<d.partIndex;D++)_+=u.parts[D].duration;let x=Math.abs(r-_);if(o!==null&&(x===0||o<x))break;o=x,s={time:_,segmentIndex:d.segmentIndex,partIndex:d.partIndex}}return s}},{name:"Segment",run:(t,e,n,i,r)=>{let s=null,o=null;r=r||0;let a=l_e(e);for(let l=0;l<a.length;l++){let c=e.endList||r===0?l:a.length-(l+1),d=a[c],u=d.segment,m=d.part&&d.part.start||u&&u.start;if(u.timeline===i&&typeof m<"u"){let f=Math.abs(r-m);if(o!==null&&o<f)break;(!s||o===null||o>=f)&&(o=f,s={time:m,segmentIndex:d.segmentIndex,partIndex:d.partIndex})}}return s}},{name:"Discontinuity",run:(t,e,n,i,r)=>{let s=null;if(r=r||0,e.discontinuityStarts&&e.discontinuityStarts.length){let o=null;for(let a=0;a<e.discontinuityStarts.length;a++){let l=e.discontinuityStarts[a],c=e.discontinuitySequence+a+1,d=t.discontinuities[c];if(d){let u=Math.abs(r-d.time);if(o!==null&&o<u)break;(!s||o===null||o>=u)&&(o=u,s={time:d.time,segmentIndex:l,partIndex:null})}}}return s}},{name:"Playlist",run:(t,e,n,i,r)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}],__e=class extends Vi.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};let n=new LJ,i=new OJ(n),r=new OJ(n);this.mediaSequenceStorage_={main:n,audio:i,vtt:r},this.logger_=h6("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,n,i,r,s){if(n!==1/0)return Mye.find(({name:l})=>l==="VOD").run(this,e,n);let o=this.runStrategies_(e,n,i,r,s);if(!o.length)return null;for(let a of o){let{syncPoint:l,strategy:c}=a,{segmentIndex:d,time:u}=l;if(d<0)continue;let m=e.segments[d],f=u,_=f+m.duration;if(this.logger_(`Strategy: ${c}. Current time: ${r}. selected segment: ${d}. Time: [${f} -> ${_}]}`),r>=f&&r<_)return this.logger_("Found sync point with exact match: ",l),l}return this.selectSyncPoint_(o,{key:"time",value:r})}getExpiredTime(e,n){if(!e||!e.segments)return null;let i=this.runStrategies_(e,n,e.discontinuitySequence,0);if(!i.length)return null;let r=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+sH({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))}runStrategies_(e,n,i,r,s){let o=[];for(let a=0;a<Mye.length;a++){let l=Mye[a],c=l.run(this,e,n,i,r,s);c&&(c.strategy=l.name,o.push({strategy:l.name,syncPoint:c}))}return o}selectSyncPoint_(e,n){let i=e[0].syncPoint,r=Math.abs(e[0].syncPoint[n.key]-n.value),s=e[0].strategy;for(let o=1;o<e.length;o++){let a=Math.abs(e[o].syncPoint[n.key]-n.value);a<r&&(r=a,i=e[o].syncPoint,s=e[o].strategy)}return this.logger_(`syncPoint for [${n.key}: ${n.value}] chosen with strategy [${s}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+(typeof i.partIndex=="number"?`,partIndex:${i.partIndex}`:"")+"]"),i}saveExpiredSegmentInfo(e,n){let i=n.mediaSequence-e.mediaSequence;if(i>Aui){Vi.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);return}for(let r=i-1;r>=0;r--){let s=e.segments[r];if(s&&typeof s.start<"u"){n.syncInfo={mediaSequence:e.mediaSequence+r,time:s.start},this.logger_(`playlist refresh sync: [time:${n.syncInfo.time}, mediaSequence: ${n.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){let n=e.segments[0],i=n.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[n.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:n}){let i=this.calculateSegmentTimeMapping_(e,e.timingInfo,n),r=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:r.start}));let s=r.dateTimeObject;r.discontinuity&&n&&s&&(this.timelineToDatetimeMappings[r.timeline]=-(s.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,n,i){let r=e.segment,s=e.part,o=this.timelines[e.timeline],a,l;if(typeof e.timestampOffset=="number")o={time:e.startOfSegment,mapping:e.startOfSegment-n.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),a=e.startOfSegment,l=n.end+o.mapping;else if(o)a=n.start+o.mapping,l=n.end+o.mapping;else return!1;return s&&(s.start=a,s.end=l),(!r.start||a<r.start)&&(r.start=a),r.end=l,!0}saveDiscontinuitySyncInfo_(e){let n=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(n.discontinuityStarts&&n.discontinuityStarts.length)for(let r=0;r<n.discontinuityStarts.length;r++){let s=n.discontinuityStarts[r],o=n.discontinuitySequence+r+1,a=s-e.mediaIndex,l=Math.abs(a);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>l){let c;a<0?c=i.start-sH({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:e.mediaIndex,endIndex:s}):c=i.end+sH({defaultDuration:n.targetDuration,durationList:n.segments,startIndex:e.mediaIndex+1,endIndex:s}),this.discontinuities[o]={time:c,accuracy:l}}}}dispose(){this.trigger("dispose"),this.off()}},C_e=class extends Vi.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:n,to:i}){return typeof n=="number"&&typeof i=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:n,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:n,to:i}){if(typeof n=="number"&&typeof i=="number"){this.lastTimelineChanges_[e]={type:e,from:n,to:i},delete this.pendingTimelineChanges_[e];let r={timelineChangeInfo:{from:n,to:i}};this.trigger({type:"timelinechange",metadata:r})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}},Pui=$Xe(KXe(function(){var t=function(){function x(){this.listeners={}}var D=x.prototype;return D.on=function(M,I){this.listeners[M]||(this.listeners[M]=[]),this.listeners[M].push(I)},D.off=function(M,I){if(!this.listeners[M])return!1;var z=this.listeners[M].indexOf(I);return this.listeners[M]=this.listeners[M].slice(0),this.listeners[M].splice(z,1),z>-1},D.trigger=function(M){var I=this.listeners[M];if(I)if(arguments.length===2)for(var z=I.length,G=0;G<z;++G)I[G].call(this,arguments[1]);else for(var A=Array.prototype.slice.call(arguments,1),Y=I.length,X=0;X<Y;++X)I[X].apply(this,A)},D.dispose=function(){this.listeners={}},D.pipe=function(M){this.on("data",function(I){M.push(I)})},x}();function e(x){return x.subarray(0,x.byteLength-x[x.byteLength-1])}let n=function(){let x=[[[],[],[],[],[]],[[],[],[],[],[]]],D=x[0],E=x[1],M=D[4],I=E[4],z,G,A,Y=[],X=[],ne,pe,ce,ie,le,Se;for(z=0;z<256;z++)X[(Y[z]=z<<1^(z>>7)*283)^z]=z;for(G=A=0;!M[G];G^=ne||1,A=X[A]||1)for(ie=A^A<<1^A<<2^A<<3^A<<4,ie=ie>>8^ie&255^99,M[G]=ie,I[ie]=G,ce=Y[pe=Y[ne=Y[G]]],Se=ce*16843009^pe*65537^ne*257^G*16843008,le=Y[ie]*257^ie*16843008,z=0;z<4;z++)D[z][G]=le=le<<24^le>>>8,E[z][ie]=Se=Se<<24^Se>>>8;for(z=0;z<5;z++)D[z]=D[z].slice(0),E[z]=E[z].slice(0);return x},i=null;class r{constructor(D){i||(i=n()),this._tables=[[i[0][0].slice(),i[0][1].slice(),i[0][2].slice(),i[0][3].slice(),i[0][4].slice()],[i[1][0].slice(),i[1][1].slice(),i[1][2].slice(),i[1][3].slice(),i[1][4].slice()]];let E,M,I,z=this._tables[0][4],G=this._tables[1],A=D.length,Y=1;if(A!==4&&A!==6&&A!==8)throw new Error("Invalid aes key size");let X=D.slice(0),ne=[];for(this._key=[X,ne],E=A;E<4*A+28;E++)I=X[E-1],(E%A===0||A===8&&E%A===4)&&(I=z[I>>>24]<<24^z[I>>16&255]<<16^z[I>>8&255]<<8^z[I&255],E%A===0&&(I=I<<8^I>>>24^Y<<24,Y=Y<<1^(Y>>7)*283)),X[E]=X[E-A]^I;for(M=0;E;M++,E--)I=X[M&3?E:E-4],E<=4||M<4?ne[M]=I:ne[M]=G[0][z[I>>>24]]^G[1][z[I>>16&255]]^G[2][z[I>>8&255]]^G[3][z[I&255]]}decrypt(D,E,M,I,z,G){let A=this._key[1],Y=D^A[0],X=I^A[1],ne=M^A[2],pe=E^A[3],ce,ie,le,Se=A.length/4-2,je,ze=4,Ge=this._tables[1],Ae=Ge[0],Ye=Ge[1],ft=Ge[2],Ft=Ge[3],Tt=Ge[4];for(je=0;je<Se;je++)ce=Ae[Y>>>24]^Ye[X>>16&255]^ft[ne>>8&255]^Ft[pe&255]^A[ze],ie=Ae[X>>>24]^Ye[ne>>16&255]^ft[pe>>8&255]^Ft[Y&255]^A[ze+1],le=Ae[ne>>>24]^Ye[pe>>16&255]^ft[Y>>8&255]^Ft[X&255]^A[ze+2],pe=Ae[pe>>>24]^Ye[Y>>16&255]^ft[X>>8&255]^Ft[ne&255]^A[ze+3],ze+=4,Y=ce,X=ie,ne=le;for(je=0;je<4;je++)z[(3&-je)+G]=Tt[Y>>>24]<<24^Tt[X>>16&255]<<16^Tt[ne>>8&255]<<8^Tt[pe&255]^A[ze++],ce=Y,Y=X,X=ne,ne=pe,pe=ce}}class s extends t{constructor(){super(t),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(D){this.jobs.push(D),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}let o=function(x){return x<<24|(x&65280)<<8|(x&16711680)>>8|x>>>24},a=function(x,D,E){let M=new Int32Array(x.buffer,x.byteOffset,x.byteLength>>2),I=new r(Array.prototype.slice.call(D)),z=new Uint8Array(x.byteLength),G=new Int32Array(z.buffer),A,Y,X,ne,pe,ce,ie,le,Se;for(A=E[0],Y=E[1],X=E[2],ne=E[3],Se=0;Se<M.length;Se+=4)pe=o(M[Se]),ce=o(M[Se+1]),ie=o(M[Se+2]),le=o(M[Se+3]),I.decrypt(pe,ce,ie,le,G,Se),G[Se]=o(G[Se]^A),G[Se+1]=o(G[Se+1]^Y),G[Se+2]=o(G[Se+2]^X),G[Se+3]=o(G[Se+3]^ne),A=pe,Y=ce,X=ie,ne=le;return z};class l{constructor(D,E,M,I){let z=l.STEP,G=new Int32Array(D.buffer),A=new Uint8Array(D.byteLength),Y=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(G.subarray(Y,Y+z),E,M,A)),Y=z;Y<G.length;Y+=z)M=new Uint32Array([o(G[Y-4]),o(G[Y-3]),o(G[Y-2]),o(G[Y-1])]),this.asyncStream_.push(this.decryptChunk_(G.subarray(Y,Y+z),E,M,A));this.asyncStream_.push(function(){I(null,e(A))})}static get STEP(){return 32e3}decryptChunk_(D,E,M,I){return function(){let z=a(D,E,M);I.set(z,D.byteOffset)}}}var c=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d;typeof window<"u"?d=window:typeof c<"u"?d=c:typeof self<"u"?d=self:d={};var u=d,m=function(D){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(D):D&&D.buffer instanceof ArrayBuffer},f=u.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var x=new Uint16Array([65484]),D=new Uint8Array(x.buffer,x.byteOffset,x.byteLength);return D[0]===255?"big":D[0]===204?"little":"unknown"}();let _=function(x){let D={};return Object.keys(x).forEach(E=>{let M=x[E];m(M)?D[E]={bytes:M.buffer,byteOffset:M.byteOffset,byteLength:M.byteLength}:D[E]=M}),D};self.onmessage=function(x){let D=x.data,E=new Uint8Array(D.encrypted.bytes,D.encrypted.byteOffset,D.encrypted.byteLength),M=new Uint32Array(D.key.bytes,D.key.byteOffset,D.key.byteLength/4),I=new Uint32Array(D.iv.bytes,D.iv.byteOffset,D.iv.byteLength/4);new l(E,M,I,function(z,G){self.postMessage(_({source:D.source,decrypted:G}),[G.buffer])})}})),Rui=jXe(Pui),Fui=t=>{let e=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},oQe=(t,e)=>{t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},x_e=(t,e)=>{e.activePlaylistLoader=t,t.load()},Lui=(t,e)=>()=>{let{segmentLoaders:{[t]:n,main:i},mediaTypes:{[t]:r}}=e,s=r.activeTrack(),o=r.getActiveGroup(),a=r.activePlaylistLoader,l=r.lastGroup_;if(!(o&&l&&o.id===l.id)&&(r.lastGroup_=o,r.lastTrack_=s,oQe(n,r),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){a&&i.resetEverything();return}n.resyncLoader(),x_e(o.playlistLoader,r)}},Oui=(t,e)=>()=>{let{segmentLoaders:{[t]:n},mediaTypes:{[t]:i}}=e;i.lastGroup_=null,n.abort(),n.pause()},Nui=(t,e)=>()=>{let{mainPlaylistLoader:n,segmentLoaders:{[t]:i,main:r},mediaTypes:{[t]:s}}=e,o=s.activeTrack(),a=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastTrack_;if(!(c&&o&&c.id===o.id)&&(s.lastGroup_=a,s.lastTrack_=o,oQe(i,s),!!a)){if(a.isMainPlaylist){if(!o||!c||o.id===c.id)return;let d=e.vhs.playlistController_,u=d.selectPlaylist();if(d.media()===u)return;s.logger_(`track change. Switching main audio from ${c.id} to ${o.id}`),n.pause(),r.resetEverything(),d.fastQualityChange_(u);return}if(t==="AUDIO"){if(!a.playlistLoader){r.setAudio(!0),r.resetEverything();return}i.setAudio(!0),r.setAudio(!1)}if(l===a.playlistLoader){x_e(a.playlistLoader,s);return}i.track&&i.track(o),i.resetEverything(),x_e(a.playlistLoader,s)}},NJ={AUDIO:(t,e)=>()=>{let{mediaTypes:{[t]:n},excludePlaylist:i}=e,r=n.activeTrack(),s=n.activeGroup(),o=(s.filter(l=>l.default)[0]||s[0]).id,a=n.tracks[o];if(r===a){i({error:{message:"Problem encountered loading the default audio track."}});return}Vi.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(let l in n.tracks)n.tracks[l].enabled=n.tracks[l]===a;n.onTrackChanged()},SUBTITLES:(t,e)=>()=>{let{mediaTypes:{[t]:n}}=e;Vi.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");let i=n.activeTrack();i&&(i.mode="disabled"),n.onTrackChanged()}},DZe={AUDIO:(t,e,n)=>{if(!e)return;let{tech:i,requestOptions:r,segmentLoaders:{[t]:s}}=n;e.on("loadedmetadata",()=>{let o=e.media();s.playlist(o,r),(!i.paused()||o.endList&&i.preload()!=="none")&&s.load()}),e.on("loadedplaylist",()=>{s.playlist(e.media(),r),i.paused()||s.load()}),e.on("error",NJ[t](t,n))},SUBTITLES:(t,e,n)=>{let{tech:i,requestOptions:r,segmentLoaders:{[t]:s},mediaTypes:{[t]:o}}=n;e.on("loadedmetadata",()=>{let a=e.media();s.playlist(a,r),s.track(o.activeTrack()),(!i.paused()||a.endList&&i.preload()!=="none")&&s.load()}),e.on("loadedplaylist",()=>{s.playlist(e.media(),r),i.paused()||s.load()}),e.on("error",NJ[t](t,n))}},Vui={AUDIO:(t,e)=>{let{vhs:n,sourceType:i,segmentLoaders:{[t]:r},requestOptions:s,main:{mediaGroups:o},mediaTypes:{[t]:{groups:a,tracks:l,logger_:c}},mainPlaylistLoader:d}=e,u=AH(d.main);(!o[t]||Object.keys(o[t]).length===0)&&(o[t]={main:{default:{default:!0}}},u&&(o[t].main.default.playlists=d.main.playlists));for(let m in o[t]){a[m]||(a[m]=[]);for(let f in o[t][m]){let _=o[t][m][f],x;if(u?(c(`AUDIO group '${m}' label '${f}' is a main playlist`),_.isMainPlaylist=!0,x=null):i==="vhs-json"&&_.playlists?x=new Y7(_.playlists[0],n,s):_.resolvedUri?x=new Y7(_.resolvedUri,n,s):_.playlists&&i==="dash"?x=new MH(_.playlists[0],n,s,d):x=null,_=Wd({id:f,playlistLoader:x},_),DZe[t](t,_.playlistLoader,e),a[m].push(_),typeof l[f]>"u"){let D=new Vi.AudioTrack({id:f,kind:Fui(_),enabled:!1,language:_.language,default:_.default,label:f});l[f]=D}}}r.on("error",NJ[t](t,e))},SUBTITLES:(t,e)=>{let{tech:n,vhs:i,sourceType:r,segmentLoaders:{[t]:s},requestOptions:o,main:{mediaGroups:a},mediaTypes:{[t]:{groups:l,tracks:c}},mainPlaylistLoader:d}=e;for(let u in a[t]){l[u]||(l[u]=[]);for(let m in a[t][u]){if(!i.options_.useForcedSubtitles&&a[t][u][m].forced)continue;let f=a[t][u][m],_;if(r==="hls")_=new Y7(f.resolvedUri,i,o);else if(r==="dash"){if(!f.playlists.filter(D=>D.excludeUntil!==1/0).length)return;_=new MH(f.playlists[0],i,o,d)}else r==="vhs-json"&&(_=new Y7(f.playlists?f.playlists[0]:f.resolvedUri,i,o));if(f=Wd({id:m,playlistLoader:_},f),DZe[t](t,f.playlistLoader,e),l[u].push(f),typeof c[m]>"u"){let x=n.addRemoteTextTrack({id:m,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:m},!1).track;c[m]=x}}}s.on("error",NJ[t](t,e))},"CLOSED-CAPTIONS":(t,e)=>{let{tech:n,main:{mediaGroups:i},mediaTypes:{[t]:{groups:r,tracks:s}}}=e;for(let o in i[t]){r[o]||(r[o]=[]);for(let a in i[t][o]){let l=i[t][o][a];if(!/^(?:CC|SERVICE)/.test(l.instreamId))continue;let c=n.options_.vhs&&n.options_.vhs.captionServices||{},d={label:a,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(c[d.instreamId]&&(d=Wd(d,c[d.instreamId])),d.default===void 0&&delete d.default,r[o].push(Wd({id:a},l)),typeof s[a]>"u"){let u=n.addRemoteTextTrack({id:d.instreamId,kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;s[a]=u}}}}},aQe=(t,e)=>{for(let n=0;n<t.length;n++)if(z_e(e,t[n])||t[n].playlists&&aQe(t[n].playlists,e))return!0;return!1},Bui=(t,e)=>n=>{let{mainPlaylistLoader:i,mediaTypes:{[t]:{groups:r}}}=e,s=i.media();if(!s)return null;let o=null;s.attributes[t]&&(o=r[s.attributes[t]]);let a=Object.keys(r);if(!o)if(t==="AUDIO"&&a.length>1&&AH(e.main))for(let l=0;l<a.length;l++){let c=r[a[l]];if(aQe(c,s)){o=c;break}}else r.main?o=r.main:a.length===1&&(o=r[a[0]]);return typeof n>"u"?o:n===null||!o?null:o.filter(l=>l.id===n.id)[0]||null},zui={AUDIO:(t,e)=>()=>{let{mediaTypes:{[t]:{tracks:n}}}=e;for(let i in n)if(n[i].enabled)return n[i];return null},SUBTITLES:(t,e)=>()=>{let{mediaTypes:{[t]:{tracks:n}}}=e;for(let i in n)if(n[i].mode==="showing"||n[i].mode==="hidden")return n[i];return null}},Hui=(t,{mediaTypes:e})=>()=>{let n=e[t].activeTrack();return n?e[t].activeGroup(n):null},Gui=t=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(c=>{Vui[c](c,t)});let{mediaTypes:e,mainPlaylistLoader:n,tech:i,vhs:r,segmentLoaders:{["AUDIO"]:s,main:o}}=t;["AUDIO","SUBTITLES"].forEach(c=>{e[c].activeGroup=Bui(c,t),e[c].activeTrack=zui[c](c,t),e[c].onGroupChanged=Lui(c,t),e[c].onGroupChanging=Oui(c,t),e[c].onTrackChanged=Nui(c,t),e[c].getActiveGroup=Hui(c,t)});let a=e.AUDIO.activeGroup();if(a){let c=(a.filter(u=>u.default)[0]||a[0]).id;e.AUDIO.tracks[c].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),s.setAudio(!0)):o.setAudio(!0)}n.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(c=>e[c].onGroupChanged())}),n.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(c=>e[c].onGroupChanging())});let l=()=>{e.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"})};i.audioTracks().addEventListener("change",l),i.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),r.on("dispose",()=>{i.audioTracks().removeEventListener("change",l),i.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),i.clearTracks("audio");for(let c in e.AUDIO.tracks)i.audioTracks().addTrack(e.AUDIO.tracks[c])},Wui=()=>{let t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:kx,activeTrack:kx,getActiveGroup:kx,onGroupChanged:kx,onTrackChanged:kx,lastTrack_:null,logger_:h6(`MediaGroups[${e}]`)}}),t},VJ=class{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=_3(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(n=>[n.ID,n])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}},b_e=class extends Vi.EventTarget{constructor(e,n){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new VJ,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=h6("Content Steering"),this.xhr_=e,this.getBandwidth_=n}assignTagProperties(e,n){this.manifestType_=n.serverUri?"HLS":"DASH";let i=n.serverUri||n.serverURL;if(!i){this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),this.trigger("error");return}if(i.startsWith("data:")){this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1));return}this.steeringManifest.reloadUri=_3(e,i),this.defaultPathway=n.pathwayId||n.defaultServiceLocation,this.queryBeforeStart=n.queryBeforeStart,this.proxyServerUrl_=n.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){let n=this.steeringManifest.reloadUri;if(!n)return;let i=e?n:this.getRequestURI(n);if(!i){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}let r={contentSteeringInfo:{uri:i}};this.trigger({type:"contentsteeringloadstart",metadata:r}),this.request_=this.xhr_({uri:i,requestType:"content-steering-manifest"},(s,o)=>{if(s){if(o.status===410){this.logger_(`manifest request 410 ${s}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),this.excludedSteeringManifestURLs.add(i);return}if(o.status===429){let c=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${s}.`),this.logger_(`content steering will retry in ${c} seconds.`),this.startTTLTimeout_(parseInt(c,10));return}this.logger_(`manifest failed to load ${s}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:r});let a;try{a=JSON.parse(this.request_.responseText)}catch(c){let d={errorType:Vi.Error.StreamingContentSteeringParserError,error:c};this.trigger({type:"error",metadata:d})}this.assignSteeringProperties_(a);let l={contentSteeringInfo:r.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:l}),this.startTTLTimeout_()})}setProxyServerUrl_(e){let n=new di.default.URL(e),i=new di.default.URL(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(n.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){let n=JSON.parse(di.default.atob(e));this.assignSteeringProperties_(n)}setSteeringParams_(e){let n=new di.default.URL(e),i=this.getPathway(),r=this.getBandwidth_();if(i){let s=`_${this.manifestType_}_pathway`;n.searchParams.set(s,i)}if(r){let s=`_${this.manifestType_}_throughput`;n.searchParams.set(s,r)}return n.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());let i=(r=>{for(let s of r)if(this.availablePathways_.has(s))return s;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==i&&(this.currentPathway=i,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;let n=r=>this.excludedSteeringManifestURLs.has(r);if(this.proxyServerUrl_){let r=this.setProxyServerUrl_(e);if(!n(r))return r}let i=this.setSteeringParams_(e);return n(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){let n=e*1e3;this.ttlTimeout_=di.default.setTimeout(()=>{this.requestSteeringManifest()},n)}clearTTLTimeout_(){di.default.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new VJ}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,n){return!n&&this.steeringManifest.reloadUri||n&&(_3(e,n.serverURL)!==this.steeringManifest.reloadUri||n.defaultServiceLocation!==this.defaultPathway||n.queryBeforeStart!==this.queryBeforeStart||n.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}},Uui=10,jui=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],$ui=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]},Kui=function({currentPlaylist:t,buffered:e,currentTime:n,nextPlaylist:i,bufferLowWaterLine:r,bufferHighWaterLine:s,duration:o,bufferBasedABR:a,log:l}){if(!i)return Vi.log.warn("We received no playlist to switch to. Please check your stream."),!1;let c=`allowing switch ${t&&t.id||"null"} -> ${i.id}`;if(!t)return l(`${c} as current playlist is not set`),!0;if(i.id===t.id)return!1;let d=!!TP(e,n).length;if(!t.endList)return!d&&typeof t.partTargetDuration=="number"?(l(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(l(`${c} as current playlist is live`),!0);let u=N_e(e,n),m=a?q1.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:q1.MAX_BUFFER_LOW_WATER_LINE;if(o<m)return l(`${c} as duration < max low water line (${o} < ${m})`),!0;let f=i.attributes.BANDWIDTH,_=t.attributes.BANDWIDTH;if(f<_&&(!a||u<s)){let x=`${c} as next bandwidth < current bandwidth (${f} < ${_})`;return a&&(x+=` and forwardBuffer < bufferHighWaterLine (${u} < ${s})`),l(x),!0}if((!a||f>_)&&u>=r){let x=`${c} as forwardBuffer >= bufferLowWaterLine (${u} >= ${r})`;return a&&(x+=` and next bandwidth > current bandwidth (${f} > ${_})`),l(x),!0}return l(`not ${c} as no switching criteria met`),!1},w_e=class extends Vi.EventTarget{constructor(e){super();let{src:n,withCredentials:i,tech:r,bandwidth:s,externVhs:o,useCueTags:a,playlistExclusionDuration:l,enableLowInitialPlaylist:c,sourceType:d,cacheEncryptionKeys:u,bufferBasedABR:m,leastPixelDiffSelector:f,captionServices:_}=e;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:x}=e;(x===null||typeof x>"u")&&(x=1/0),Ex=o,this.bufferBasedABR=!!m,this.leastPixelDiffSelector=!!f,this.withCredentials=i,this.tech_=r,this.vhs_=r.vhs,this.player_=e.player_,this.sourceType_=d,this.useCueTags_=a,this.playlistExclusionDuration=l,this.maxPlaylistRetries=x,this.enableLowInitialPlaylist=c,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:x,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=Wui(),this.mediaSource=new di.default.MediaSource,this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.seekable_=L0(),this.hasPlayed_=!1,this.syncController_=new __e(e),this.segmentMetadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.decrypter_=new Rui,this.sourceUpdater_=new RJ(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new C_e,this.keyStatusMap_=new Map;let D={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:_,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:u,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new MH(n,this.vhs_,Wd(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Y7(n,this.vhs_,Wd(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new kH(Wd(D,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new kH(Wd(D,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new v_e(Wd(D,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((I,z)=>{function G(){r.off("vttjserror",A),I()}function A(){r.off("vttjsloaded",G),z()}r.one("vttjsloaded",G),r.one("vttjserror",A),r.addWebVttScript_()})}),e);let E=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new b_e(this.vhs_.xhr,E),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),jui.forEach(I=>{this[I+"_"]=$ui.bind(this,I)}),this.logger_=h6("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;let M=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(M,()=>{let I=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-I,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){let e=this.mainAppendsToLoadedData_(),n=this.audioAppendsToLoadedData_();return e===-1||n===-1?-1:e+n}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){let n=this.selectPlaylist();n&&this.shouldSwitchToMedia_(n)&&this.switchMedia_(n,e)}switchMedia_(e,n,i){let r=this.media(),s=r&&(r.id||r.uri),o=e&&(e.id||e.uri);if(s&&s!==o){this.logger_(`switch media ${s} -> ${o} from ${n}`);let a={renditionInfo:{id:o,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:n};this.trigger({type:"renditionselected",metadata:a}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${n}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{let n=this.mediaTypes_[e],i=n?n.activeGroup():null,r=this.contentSteeringController_.getPathway();if(i&&r){let o=(i.length?i[0].playlists:i.playlists).filter(a=>a.attributes.serviceLocation===r);o.length&&this.mediaTypes_[e].activePlaylistLoader.media(o[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=di.default.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(di.default.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){let e=this.main(),n=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return n;let i=e.mediaGroups.AUDIO,r=Object.keys(i),s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{let a=i.main||r.length&&i[r[0]];for(let l in a)if(a[l].default){s={label:l};break}}if(!s)return n;let o=[];for(let a in i)if(i[a][s.label]){let l=i[a][s.label];if(l.playlists&&l.playlists.length)o.push.apply(o,l.playlists);else if(l.uri)o.push(l);else if(e.playlists.length)for(let c=0;c<e.playlists.length;c++){let d=e.playlists[c];d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===a&&o.push(d)}}return o.length?o:n}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{let n=this.mainPlaylistLoader_.media(),i=n.targetDuration*1.5*1e3;c_e(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=i,n.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(n,this.requestOptions_),this.mainSegmentLoader_.load()),Gui({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),n),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let n=this.mainPlaylistLoader_.media();if(!n){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let i;if(this.enableLowInitialPlaylist&&(i=this.selectInitialPlaylist()),i||(i=this.selectPlaylist()),!i||!this.shouldSwitchToMedia_(i)||(this.initialMedia_=i,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;n=this.initialMedia_}this.handleUpdatedMediaPlaylist(n)}),this.mainPlaylistLoader_.on("error",()=>{let n=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:n.playlist,error:n})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{let n=this.mainPlaylistLoader_.media(),i=n.targetDuration*1.5*1e3;c_e(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=i,this.sourceType_==="dash"&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(n,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{let n=this.mainPlaylistLoader_.media();if(n.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(n)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(n=>{this.mainPlaylistLoader_.on(n,i=>{this.player_.trigger(Fp({},i))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,n){let i=e.mediaGroups||{},r=!0,s=Object.keys(i.AUDIO);for(let o in i.AUDIO)for(let a in i.AUDIO[o])i.AUDIO[o][a].uri||(r=!1);r&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Ex.Playlist.isAes(n)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(i.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){let n=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),r=this.bufferLowWaterLine(),s=this.bufferHighWaterLine(),o=this.tech_.buffered();return Kui({buffered:o,currentTime:i,currentPlaylist:n,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:s,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{let i=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:i.playlist,error:i})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",i=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:Uui}))});let e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();let i=this.getCodecsOrExclude_();i&&this.sourceUpdater_.addOrChangeSourceBuffers(i)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(i=>{this.mainSegmentLoader_.on(i,r=>{this.player_.trigger(Fp({},r))}),this.audioSegmentLoader_.on(i,r=>{this.player_.trigger(Fp({},r))}),this.subtitleSegmentLoader_.on(i,r=>{this.player_.trigger(Fp({},r))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(()=>{this.mainSegmentLoader_.load()})}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();let e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){let e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){let n=this.seekable();if(!n.length)return!1;let i=n.end(0),r=i;if(e.start){let s=e.start.timeOffset;s<0?r=Math.max(i+s,n.start(0)):r=Math.min(i,s)}this.trigger("firstplay"),this.tech_.setCurrentTime(r)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){let e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,n=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;let e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;let n=this.duration();e[e.length-1].endTime=isNaN(n)||Math.abs(n)===1/0?Number.MAX_VALUE:n}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){let n=this.mainSegmentLoader_.getCurrentMediaInfo_();!n||n.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;let i=this.syncController_.getExpiredTime(e,this.duration());if(i===null)return!1;let r=Ex.Playlist.playlistEnd(e,i),s=this.tech_.currentTime(),o=this.tech_.buffered();if(!o.length)return r-s<=B5;let a=o.end(o.length-1);return a-s<=B5&&r-a<=B5}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:n={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||n.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=n,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;let r=this.mainPlaylistLoader_.main.playlists,s=r.filter(eee),o=s.length===1&&s[0]===e;if(r.length===1&&i!==1/0)return Vi.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(o);if(o){if(this.main().contentSteering){let _=this.pathwayAttribute_(e),x=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(_),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(_)},x);return}let f=!1;r.forEach(_=>{if(_===e)return;let x=_.excludeUntil;typeof x<"u"&&x!==1/0&&(f=!0,delete _.excludeUntil)}),f&&(Vi.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;e.playlistErrors_>this.maxPlaylistRetries?a=1/0:a=Date.now()+i*1e3,e.excludeUntil=a,n.reason&&(e.lastExcludeReason_=n.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});let l=this.selectPlaylist();if(!l){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}let c=n.internal?this.logger_:Vi.log.warn,d=n.message?" "+n.message:"";c(`${n.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${d} Switching to playlist ${l.id}.`),l.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);let u=l.targetDuration/2*1e3||5*1e3,m=typeof l.lastRequest=="number"&&Date.now()-l.lastRequest<=u;return this.switchMedia_(l,"exclude",o||m)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,n){let i=[],r=e==="all";(r||e==="main")&&i.push(this.mainPlaylistLoader_);let s=[];(r||e==="audio")&&s.push("AUDIO"),(r||e==="subtitle")&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach(o=>{let a=this.mediaTypes_[o]&&this.mediaTypes_[o].activePlaylistLoader;a&&i.push(a)}),["main","audio","subtitle"].forEach(o=>{let a=this[`${o}SegmentLoader_`];a&&(e===o||e==="all")&&i.push(a)}),i.forEach(o=>n.forEach(a=>{typeof o[a]=="function"&&o[a]()}))}setCurrentTime(e){let n=TP(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(n&&n.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;let e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Ex.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}onSyncInfoUpdate_(){let e;if(!this.mainPlaylistLoader_)return;let n=this.mainPlaylistLoader_.media();if(!n)return;let i=this.syncController_.getExpiredTime(n,this.duration());if(i===null)return;let r=this.mainPlaylistLoader_.main,s=Ex.Playlist.seekable(n,i,Ex.Playlist.liveEdgeDelay(r,n));if(s.length===0||this.mediaTypes_.AUDIO.activePlaylistLoader&&(n=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),i=this.syncController_.getExpiredTime(n,this.duration()),i===null||(e=Ex.Playlist.seekable(n,i,Ex.Playlist.liveEdgeDelay(r,n)),e.length===0)))return;let o,a;if(this.seekable_&&this.seekable_.length&&(o=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>s.end(0)||s.start(0)>e.end(0)?this.seekable_=s:this.seekable_=L0([[e.start(0)>s.start(0)?e.start(0):s.start(0),e.end(0)<s.end(0)?e.end(0):s.end(0)]]):this.seekable_=s,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===o&&this.seekable_.start(0)===a)return;this.logger_(`seekable updated [${xXe(this.seekable_)}]`);let l={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:l}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){let r=this.seekable();if(!r.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<r.end(r.length-1))&&this.sourceUpdater_.setDuration(r.end(r.length-1));return}let n=this.tech_.buffered(),i=Ex.Playlist.duration(this.mainPlaylistLoader_.media());n.length>0&&(i=Math.max(i,n.end(n.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{let n=this.mediaTypes_[e].groups;for(let i in n)n[i].forEach(r=>{r.playlistLoader&&r.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){let e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,n=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!n||!i)}getCodecsOrExclude_(){let e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;let i=aH(this.main(),n),r={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(r.video=i.video||e.main.videoCodec||WKe),e.main.isMuxed&&(r.video+=`,${i.audio||e.main.audioCodec||A6e}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||s)&&(r.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||A6e,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!r.audio&&!r.video){this.excludePlaylist({playlistToExclude:n,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}let o=(c,d)=>c?Rz(d):mQ(d),a={},l;if(["video","audio"].forEach(function(c){if(r.hasOwnProperty(c)&&!o(e[c].isFmp4,r[c])){let d=e[c].isFmp4?"browser":"muxer";a[d]=a[d]||[],a[d].push(r[c]),c==="audio"&&(l=d)}}),s&&l&&n.attributes.AUDIO){let c=n.attributes.AUDIO;this.main().playlists.forEach(d=>{(d.attributes&&d.attributes.AUDIO)===c&&d!==n&&(d.excludeUntil=1/0)}),this.logger_(`excluding audio group ${c} as ${l} does not support codec(s): "${r.audio}"`)}if(Object.keys(a).length){let c=Object.keys(a).reduce((d,u)=>(d&&(d+=", "),d+=`${u} does not support codec(s): "${a[u].join(",")}"`,d),"")+".";this.excludePlaylist({playlistToExclude:n,error:{internal:!0,message:c},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){let c=[];if(["video","audio"].forEach(d=>{let u=(Jy(this.sourceUpdater_.codecs[d]||"")[0]||{}).type,m=(Jy(r[d]||"")[0]||{}).type;u&&m&&u.toLowerCase()!==m.toLowerCase()&&c.push(`"${this.sourceUpdater_.codecs[d]}" -> "${r[d]}"`)}),c.length){this.excludePlaylist({playlistToExclude:n,error:{message:`Codec switching not supported: ${c.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return r}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;let e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);let n=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(n)}excludeUnsupportedVariants_(){let e=this.main().playlists,n=[];Object.keys(e).forEach(i=>{let r=e[i];if(n.indexOf(r.id)!==-1)return;n.push(r.id);let s=aH(this.main,r),o=[];s.audio&&!mQ(s.audio)&&!Rz(s.audio)&&o.push(`audio codec ${s.audio}`),s.video&&!mQ(s.video)&&!Rz(s.video)&&o.push(`video codec ${s.video}`),s.text&&s.text==="stpp.ttml.im1t"&&o.push(`text codec ${s.text}`),o.length&&(r.excludeUntil=1/0,this.logger_(`excluding ${r.id} for unsupported: ${o.join(", ")}`))})}excludeIncompatibleVariants_(e){let n=[],i=this.main().playlists,r=AJ(Jy(e)),s=pZe(r),o=r.video&&Jy(r.video)[0]||null,a=r.audio&&Jy(r.audio)[0]||null;Object.keys(i).forEach(l=>{let c=i[l];if(n.indexOf(c.id)!==-1||c.excludeUntil===1/0)return;n.push(c.id);let d=[],u=aH(this.mainPlaylistLoader_.main,c),m=pZe(u);if(!(!u.audio&&!u.video)){if(m!==s&&d.push(`codec count "${m}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){let f=u.video&&Jy(u.video)[0]||null,_=u.audio&&Jy(u.audio)[0]||null;f&&o&&f.type.toLowerCase()!==o.type.toLowerCase()&&d.push(`video codec "${f.type}" !== "${o.type}"`),_&&a&&_.type.toLowerCase()!==a.type.toLowerCase()&&d.push(`audio codec "${_.type}" !== "${a.type}"`)}d.length&&(c.excludeUntil=1/0,this.logger_(`excluding ${c.id}: ${d.join(" && ")}`))}})}updateAdCues_(e){let n=0,i=this.seekable();i.length&&(n=i.start(0)),Iui(e,this.cueTagsTrack_,n)}goalBufferLength(){let e=this.tech_.currentTime(),n=q1.GOAL_BUFFER_LENGTH,i=q1.GOAL_BUFFER_LENGTH_RATE,r=Math.max(n,q1.MAX_GOAL_BUFFER_LENGTH);return Math.min(n+e*i,r)}bufferLowWaterLine(){let e=this.tech_.currentTime(),n=q1.BUFFER_LOW_WATER_LINE,i=q1.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(n,q1.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(n,q1.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(n+e*i,this.bufferBasedABR?s:r)}bufferHighWaterLine(){return q1.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){gZe(this.inbandTextTracks_,"com.apple.streaming",this.tech_),pui({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,n,i){let r=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();gZe(this.inbandTextTracks_,e,this.tech_),dui({inbandTextTracks:this.inbandTextTracks_,metadataArray:n,timestampOffset:r,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){let e=this.main();if(e.contentSteering){for(let n of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(n));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(n=>{this.contentSteeringController_.on(n,i=>{this.trigger(Fp({},i))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{let n=this.main();(this.contentSteeringController_.didDASHTagChange(n.uri,n.contentSteering)||(()=>{let s=this.contentSteeringController_.getAvailablePathways(),o=[];for(let a of n.playlists){let l=a.attributes.serviceLocation;if(l&&(o.push(l),!s.has(l)))return!0}return!!(!o.length&&s.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){let e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();let i=this.main().playlists,r=new Set,s=!1;Object.keys(i).forEach(o=>{let a=i[o],l=this.pathwayAttribute_(a),c=l&&e!==l;a.excludeUntil===1/0&&a.lastExcludeReason_==="content-steering"&&!c&&(delete a.excludeUntil,delete a.lastExcludeReason_,s=!0);let u=!a.excludeUntil&&a.excludeUntil!==1/0;!r.has(a.id)&&c&&u&&(r.add(a.id),a.excludeUntil=1/0,a.lastExcludeReason_="content-steering",this.logger_(`excluding ${a.id} for ${a.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(o=>{let a=this.mediaTypes_[o];if(a.activePlaylistLoader){let l=a.activePlaylistLoader.media_;l&&l.attributes.serviceLocation!==e&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){let n=this.main().playlists,i=this.contentSteeringController_.currentPathwayClones,r=this.contentSteeringController_.nextPathwayClones;if(i&&i.size||r&&r.size){for(let[o,a]of i.entries())r.get(o)||(this.mainPlaylistLoader_.updateOrDeleteClone(a),this.contentSteeringController_.excludePathway(o));for(let[o,a]of r.entries()){let l=i.get(o);if(!l){n.filter(d=>d.attributes["PATHWAY-ID"]===a["BASE-ID"]).forEach(d=>{this.mainPlaylistLoader_.addClonePathway(a,d)}),this.contentSteeringController_.addAvailablePathway(o);continue}this.equalPathwayClones_(l,a)||(this.mainPlaylistLoader_.updateOrDeleteClone(a,!0),this.contentSteeringController_.addAvailablePathway(o))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...r])))}}equalPathwayClones_(e,n){if(e["BASE-ID"]!==n["BASE-ID"]||e.ID!==n.ID||e["URI-REPLACEMENT"].HOST!==n["URI-REPLACEMENT"].HOST)return!1;let i=e["URI-REPLACEMENT"].PARAMS,r=n["URI-REPLACEMENT"].PARAMS;for(let s in i)if(i[s]!==r[s])return!1;for(let s in r)if(i[s]!==r[s])return!1;return!0}changeSegmentPathway_(){let e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0,n="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(i=>{let r=this.mainPlaylistLoader_.getKeyIdSet(i);!r||!r.size||r.forEach(s=>{let o="usable",a=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===o,l=i.lastExcludeReason_===n&&i.excludeUntil===1/0;a?a&&l&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${s} is ${o}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==n&&(i.excludeUntil=1/0,i.lastExcludeReason_=n,this.logger_(`excluding playlist ${i.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${o}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(i=>{let r=i&&i.attributes&&i.attributes.RESOLUTION&&i.attributes.RESOLUTION.height<720,s=i.excludeUntil===1/0&&i.lastExcludeReason_===n;r&&s&&(delete i.excludeUntil,Vi.log.warn(`enabling non-HD playlist ${i.id} because all playlists were excluded due to ${n} key IDs`))})}addKeyStatus_(e,n){let s=(typeof e=="string"?e:Mui(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${n}' with key ID ${s} added to the keyStatusMap`),this.keyStatusMap_.set(s,n)}updatePlaylistByKeyStatus(e,n){this.addKeyStatus_(e,n),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}},Yui=(t,e,n)=>i=>{let r=t.main.playlists[e],s=B_e(r),o=eee(r);if(typeof i>"u")return o;i?delete r.disabled:r.disabled=!0;let a={renditionInfo:{id:e,bandwidth:r.attributes.BANDWIDTH,resolution:r.attributes.RESOLUTION,codecs:r.attributes.CODECS},cause:"fast-quality"};return i!==o&&!s&&(n(r),i?t.trigger({type:"renditionenabled",metadata:a}):t.trigger({type:"renditiondisabled",metadata:a})),i},S_e=class{constructor(e,n,i){let{playlistController_:r}=e,s=r.fastQualityChange_.bind(r);if(n.attributes){let o=n.attributes.RESOLUTION;this.width=o&&o.width,this.height=o&&o.height,this.bandwidth=n.attributes.BANDWIDTH,this.frameRate=n.attributes["FRAME-RATE"]}this.codecs=aH(r.main(),n),this.playlist=n,this.id=i,this.enabled=Yui(e.playlists,n.id,s)}},qui=function(t){t.representations=()=>{let e=t.playlistController_.main(),n=AH(e)?t.playlistController_.getAudioTrackPlaylists_():e.playlists;return n?n.filter(i=>!B_e(i)).map((i,r)=>new S_e(t,i,i.id)):[]}},EZe=["seeking","seeked","pause","playing","error"],T_e=class extends Vi.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=h6("PlaybackWatcher"),this.logger_("initialize");let n=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),r=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),o=this.playlistController_,a=["main","subtitle","audio"],l={};a.forEach(d=>{l[d]={reset:()=>this.resetSegmentDownloads_(d),updateend:()=>this.checkSegmentDownloads_(d)},o[`${d}SegmentLoader_`].on("appendsdone",l[d].updateend),o[`${d}SegmentLoader_`].on("playlistupdate",l[d].reset),this.tech_.on(["seeked","seeking"],l[d].reset)});let c=d=>{["main","audio"].forEach(u=>{o[`${u}SegmentLoader_`][d]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),c("off"))},this.clearSeekingAppendCheck_=()=>c("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),c("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",r),this.tech_.on(EZe,s),this.tech_.on("canplay",i),this.tech_.one("play",n),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",r),this.tech_.off(EZe,s),this.tech_.off("canplay",i),this.tech_.off("play",n),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),a.forEach(d=>{o[`${d}SegmentLoader_`].off("appendsdone",l[d].updateend),o[`${d}SegmentLoader_`].off("playlistupdate",l[d].reset),this.tech_.off(["seeked","seeking"],l[d].reset)}),this.checkCurrentTimeTimeout_&&di.default.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&di.default.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=di.default.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){let n=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=n.buffered_()}checkSegmentDownloads_(e){let n=this.playlistController_,i=n[`${e}SegmentLoader_`],r=i.buffered_(),s=Kci(this[`${e}Buffered_`],r);if(this[`${e}Buffered_`]=r,s){let o={bufferedRanges:r};n.trigger({type:"bufferedrangeschanged",metadata:o}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:ND(r)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&n.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;let e=this.tech_.currentTime(),n=this.tech_.buffered();if(this.lastRecordedTime===e&&(!n.length||e+B5>=n.end(n.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(L0([this.lastRecordedTime,e]));let i={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:i}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;let n=this.seekable(),i=this.tech_.currentTime(),r=this.afterSeekableWindow_(n,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow),s;if(r&&(s=n.end(n.length-1)),this.beforeSeekableWindow_(n,i)){let _=n.start(0);s=_+(_===n.end(0)?0:B5)}if(typeof s<"u")return this.logger_(`Trying to seek outside of seekable at time ${i} with seekable range ${xXe(n)}. Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0;let o=this.playlistController_.sourceUpdater_,a=this.tech_.buffered(),l=o.audioBuffer?o.audioBuffered():null,c=o.videoBuffer?o.videoBuffered():null,d=this.media(),u=d.partTargetDuration?d.partTargetDuration:(d.targetDuration-V5)*2,m=[l,c];for(let _=0;_<m.length;_++){if(!m[_])continue;if(N_e(m[_],i)<u)return!1}let f=FQ(a,i);return f.length===0?!1:(s=f.start(0)+B5,this.logger_(`Buffered region starts (${f.start(0)})  just beyond seek point (${i}). Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0)}waiting_(){if(this.techWaiting_())return;let e=this.tech_.currentTime(),n=this.tech_.buffered(),i=TP(n,e);if(i.length&&e+3<=i.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){let e=this.seekable(),n=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,n)){let a=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${n}. Seeking to live point (seekable end) ${a}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(a),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}let i=this.tech_.vhs.playlistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:n}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;let o=FQ(r,n);return o.length>0?(this.logger_(`Stopped at ${n} and seeking to ${o.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(n),!0):!1}afterSeekableWindow_(e,n,i,r=!1){if(!e.length)return!1;let s=e.end(e.length-1)+B5,o=!i.endList,a=typeof i.partTargetDuration=="number";return o&&(a||r)&&(s=e.end(e.length-1)+i.targetDuration*3),n>s}beforeSeekableWindow_(e,n){return!!(e.length&&e.start(0)>0&&n<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:n,currentTime:i}){if(!e)return;let r;if(e.length&&n.length){let s=TP(e,i-3),o=TP(e,i),a=TP(n,i);a.length&&!o.length&&s.length&&(r={start:s.end(0),end:a.end(0)})}else FQ(e,i).length||(r=this.gapFromVideoUnderflow_(e,i));return r?(this.logger_(`Encountered a gap in video from ${r.start} to ${r.end}. Seeking to current time ${i}`),!0):!1}skipTheGap_(e){let n=this.tech_.buffered(),i=this.tech_.currentTime(),r=FQ(n,i);if(this.resetTimeUpdate_(),r.length===0||i!==e)return;this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+V5);let s={gapInfo:{from:i,to:r.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,n){let i=Uci(e);for(let r=0;r<i.length;r++){let s=i.start(r),o=i.end(r);if(n-s<4&&n-s>2)return{start:s,end:o}}return null}},Zui={errorInterval:30,getSource(t){let n=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return t(n)}},lQe=function(t,e){let n=0,i=0,r=Wd(Zui,e);t.ready(()=>{t.trigger({type:"usage",name:"vhs-error-reload-initialized"})});let s=function(){i&&t.currentTime(i)},o=function(d){d!=null&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(d),t.trigger({type:"usage",name:"vhs-error-reload"}),t.play())},a=function(){if(Date.now()-n<r.errorInterval*1e3){t.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!r.getSource||typeof r.getSource!="function"){Vi.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return n=Date.now(),r.getSource.call(t,o)},l=function(){t.off("loadedmetadata",s),t.off("error",a),t.off("dispose",l)},c=function(d){l(),lQe(t,d)};t.on("error",a),t.on("dispose",l),t.reloadSourceOnError=c},Xui=function(t){lQe(this,t)},cQe="3.13.2",Qui="7.0.3",Jui="1.3.0",ehi="7.1.0",thi="4.0.1",Lp={PlaylistLoader:Y7,Playlist:C3,utils:vdi,STANDARD_PLAYLIST_SELECTOR:fZe,INITIAL_PLAYLIST_SELECTOR:sui,lastBandwidthSelector:fZe,movingAverageBandwidthSelector:nui,comparePlaylistBandwidth:G_e,comparePlaylistResolution:iui,xhr:VXe()};Object.keys(q1).forEach(t=>{Object.defineProperty(Lp,t,{get(){return Vi.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),q1[t]},set(e){if(Vi.log.warn(`using Vhs.${t} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){Vi.log.warn(`value of Vhs.${t} must be greater than or equal to 0`);return}q1[t]=e}})});dQe="videojs-vhs",uQe=function(t,e){let n=e.media(),i=-1;for(let r=0;r<t.length;r++)if(t[r].id===n.id){i=r;break}t.selectedIndex_=i,t.trigger({selectedIndex:i,type:"change"})},ihi=function(t,e){e.representations().forEach(n=>{t.addQualityLevel(n)}),uQe(t,e.playlists)};Lp.canPlaySource=function(){return Vi.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};nhi=(t,e,n)=>{if(!t)return t;let i={};e&&e.attributes&&e.attributes.CODECS&&(i=AJ(Jy(e.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(i.audio=n.attributes.CODECS);let r=lP(i.video),s=lP(i.audio),o={};for(let a in t)o[a]={},s&&(o[a].audioContentType=s),r&&(o[a].videoContentType=r),e.contentProtection&&e.contentProtection[a]&&e.contentProtection[a].pssh&&(o[a].pssh=e.contentProtection[a].pssh),typeof t[a]=="string"&&(o[a].url=t[a]);return Wd(t,o)},rhi=(t,e)=>t.reduce((n,i)=>{if(!i.contentProtection)return n;let r=e.reduce((s,o)=>{let a=i.contentProtection[o];return a&&a.pssh&&(s[o]={pssh:a.pssh}),s},{});return Object.keys(r).length&&n.push(r),n},[]),shi=({player:t,sourceKeySystems:e,audioMedia:n,mainPlaylists:i})=>{if(!t.eme.initializeMediaKeys)return Promise.resolve();let r=n?i.concat([n]):i,s=rhi(r,Object.keys(e)),o=[],a=[];return s.forEach(l=>{a.push(new Promise((c,d)=>{t.tech_.one("keysessioncreated",c)})),o.push(new Promise((c,d)=>{t.eme.initializeMediaKeys({keySystems:l},u=>{if(u){d(u);return}c()})}))}),Promise.race([Promise.all(o),Promise.race(a)])},ohi=({player:t,sourceKeySystems:e,media:n,audioMedia:i})=>{let r=nhi(e,n,i);return r?(t.currentSource().keySystems=r,r&&!t.eme?(Vi.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},hQe=()=>{if(!di.default.localStorage)return null;let t=di.default.localStorage.getItem(dQe);if(!t)return null;try{return JSON.parse(t)}catch{return null}},ahi=t=>{if(!di.default.localStorage)return!1;let e=hQe();e=e?Wd(e,t):t;try{di.default.localStorage.setItem(dQe,JSON.stringify(e))}catch{return!1}return e},lhi=t=>t.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(t.substring(t.indexOf(",")+1)):t,pQe=(t,e)=>{t._requestCallbackSet||(t._requestCallbackSet=new Set),t._requestCallbackSet.add(e)},mQe=(t,e)=>{t._responseCallbackSet||(t._responseCallbackSet=new Set),t._responseCallbackSet.add(e)},fQe=(t,e)=>{t._requestCallbackSet&&(t._requestCallbackSet.delete(e),t._requestCallbackSet.size||delete t._requestCallbackSet)},gQe=(t,e)=>{t._responseCallbackSet&&(t._responseCallbackSet.delete(e),t._responseCallbackSet.size||delete t._responseCallbackSet)};Lp.supportsNativeHls=function(){if(!Cr.default||!Cr.default.createElement)return!1;let t=Cr.default.createElement("video");return Vi.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(n){return/maybe|probably/i.test(t.canPlayType(n))}):!1}();Lp.supportsNativeDash=function(){return!Cr.default||!Cr.default.createElement||!Vi.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(Cr.default.createElement("video").canPlayType("application/dash+xml"))}();Lp.supportsTypeNatively=t=>t==="hls"?Lp.supportsNativeHls:t==="dash"?Lp.supportsNativeDash:!1;Lp.isSupported=function(){return Vi.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};Lp.xhr.onRequest=function(t){pQe(Lp.xhr,t)};Lp.xhr.onResponse=function(t){mQe(Lp.xhr,t)};Lp.xhr.offRequest=function(t){fQe(Lp.xhr,t)};Lp.xhr.offResponse=function(t){gQe(Lp.xhr,t)};chi=Vi.getComponent("Component"),BJ=class extends chi{constructor(e,n,i){if(super(n,i.vhs),typeof i.initialBandwidth=="number"&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=h6("VhsHandler"),n.options_&&n.options_.playerId){let r=Vi.getPlayer(n.options_.playerId);this.player_=r}if(this.tech_=n,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(Cr.default,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],r=>{let s=Cr.default.fullscreenElement||Cr.default.webkitFullscreenElement||Cr.default.mozFullScreenElement||Cr.default.msFullscreenElement;s&&s.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=Wd(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){let i=hQe();i&&i.bandwidth&&(this.options_.bandwidth=i.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),i&&i.throughput&&(this.options_.throughput=i.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=q1.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===q1.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(i=>{typeof this.source_[i]<"u"&&(this.options_[i]=this.source_[i])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio;let n=this.options_.customPixelRatio;typeof n=="number"&&n>=0&&(this.customPixelRatio=n)}setOptions(e={}){this.setOptions_(e)}src(e,n){if(!e)return;this.setOptions_(),this.options_.src=lhi(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Lp,this.options_.sourceType=P6e(n),this.options_.seekTo=s=>{this.tech_.setCurrentTime(s)},this.options_.player_=this.player_,this.playlistController_=new w_e(this.options_);let i=Wd({liveRangeSafeTimeDelta:B5},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new T_e(i),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{let s=Vi.players[this.tech_.options_.playerId],o=this.playlistController_.error;typeof o=="object"&&!o.code?o.code=3:typeof o=="string"&&(o={message:o,code:3}),s.error(o)});let r=this.options_.bufferBasedABR?Lp.movingAverageBandwidthSelector(.55):Lp.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.bind(this),this.playlistController_.selectInitialPlaylist=Lp.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(s){this.playlistController_.selectPlaylist=s.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(s){this.playlistController_.mainSegmentLoader_.throughput.rate=s,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let s=this.playlistController_.mainSegmentLoader_.bandwidth,o=di.default.navigator.connection||di.default.navigator.mozConnection||di.default.navigator.webkitConnection,a=1e7;if(this.options_.useNetworkInformationApi&&o){let l=o.downlink*1e3*1e3;l>=a&&s>=a?s=Math.max(s,l):s=l}return s},set(s){this.playlistController_.mainSegmentLoader_.bandwidth=s,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){let s=1/(this.bandwidth||1),o;return this.throughput>0?o=1/this.throughput:o=0,Math.floor(1/(s+o))},set(){Vi.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>ND(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>ND(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&ahi({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{qui(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=di.default.URL.createObjectURL(this.playlistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){let e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),shi({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(n=>{this.logger_("error while creating EME key session",n),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){let e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=ohi({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",i=>{this.playlistController_.updatePlaylistByKeyStatus(i.keyId,i.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!n){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){let e=Vi.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{ihi(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{uQe(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":cQe,"mux.js":Qui,"mpd-parser":Jui,"m3u8-parser":ehi,"aes-decrypter":thi}}version(){return this.constructor.version()}canChangeType(){return RJ.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&di.default.URL.revokeObjectURL&&(di.default.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,n){return Sdi({playlist:this.playlistController_.media(),time:e,callback:n})}seekToProgramTime(e,n,i=!0,r=2){return WXe({programTime:e,playlist:this.playlistController_.media(),retryCount:r,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:n})}setupXhrHooks_(){this.xhr.onRequest=e=>{pQe(this.xhr,e)},this.xhr.onResponse=e=>{mQe(this.xhr,e)},this.xhr.offRequest=e=>{fQe(this.xhr,e)},this.xhr.offResponse=e=>{gQe(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){let e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],n=["gapjumped","playedrangeschanged"];e.forEach(i=>{this.playlistController_.on(i,r=>{this.player_.trigger(Fp({},r))})}),n.forEach(i=>{this.playbackWatcher_.on(i,r=>{this.player_.trigger(Fp({},r))})})}},zJ={name:"videojs-http-streaming",VERSION:cQe,canHandleSource(t,e={}){let n=Wd(Vi.options,e);return zJ.canPlayType(t.type,n)},handleSource(t,e,n={}){let i=Wd(Vi.options,n);return e.vhs=new BJ(t,e,i),e.vhs.xhr=VXe(),e.vhs.setupXhrHooks_(),e.vhs.src(t.src,t.type),e.vhs},canPlayType(t,e){let n=P6e(t);if(!n)return"";let i=zJ.getOverrideNative(e);return!Lp.supportsTypeNatively(n)||i?"maybe":""},getOverrideNative(t={}){let{vhs:e={}}=t,n=!(Vi.browser.IS_ANY_SAFARI||Vi.browser.IS_IOS),{overrideNative:i=n}=e;return i}},dhi=()=>Rz("avc1.4d400d,mp4a.40.2");dhi()&&Vi.getTech("Html5").registerSourceHandler(zJ,0);Vi.VhsHandler=BJ;Vi.VhsSourceHandler=zJ;Vi.Vhs=Lp;Vi.use||Vi.registerComponent("Vhs",Lp);Vi.options.vhs=Vi.options.vhs||{};(!Vi.getPlugin||!Vi.getPlugin("reloadSourceOnError"))&&Vi.registerPlugin("reloadSourceOnError",Xui)});var X1,j5=Q(()=>{me();X1=(()=>{let e=class e{constructor(){e.instance=this}downloadBase64(i,r){let s="";r.indexOf("data:")===-1&&(i.toLowerCase().endsWith(".pdf")?s="data:application/pdf;base64,":i.toLowerCase().endsWith(".png")||i.toLowerCase().endsWith(".zip")&&(s="data:application/zip;base64,"));let o=s+r,a=document.createElement("a");a.href=o,a.download=i,a.click()}downloadUrl(i,r){return O(this,null,function*(){let o=yield(yield fetch(i)).blob(),a=document.createElement("a"),l=URL.createObjectURL(o);a.href=l,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(l)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function hhi(t,e){if(t&1&&(h(0,"div",7)(1,"div",8)(2,"video",9,0),ee(4,"source",10),p()()()),t&2){let n=w();g(4),b("src",n.src(),Ur)("type",n.mimeType())}}var uhi,$5,jP=Q(()=>{me();Gi();vQe();rP();Zi();ls();ji();gu();Ja();j5();Mp();me();uhi=["videoPlayer"];$5=(()=>{let e=class e extends bt{get transparentBackground(){return!0}set videoElement(i){i&&(this.player=Vi(i.nativeElement,{disablePictureInPicture:!0,controls:!0,autoplay:!0,preload:"auto",fluid:!0,fill:!0,bigPlayButton:!0}),this.player.on("touchstart",r=>{let s=r.touches[0].clientY;this.player.el().getBoundingClientRect().bottom-s>60&&(this.player.paused()?this.player.play():this.player.pause())}),this.player.on("click",r=>{let s=this.player.el(),o=s.getBoundingClientRect(),a=r.clientX-o.left,l=r.clientY-o.top,c=this.player.videoWidth(),d=this.player.videoHeight(),u=s.clientWidth,m=s.clientHeight,f=c/d,_=u,x=u/f;x>m&&(x=m,_=m*f);let D=(u-_)/2,E=(m-x)/2,I=l>=m-75,z=a>=D&&a<=D+_&&l>=E&&l<=E+x;I?console.log("Klick im unteren Randbereich von 75px"):z?console.log("Klick auf das Video"):this.dialogRef.close()}))}constructor(){super(),this.src=gt(""),this.filename=gt(""),this.mimeType=gt(""),this.cdRef=Ve(Kt),this.downloadService=Ve(X1),this.dialogRef=Ve(Gt),this.shortcutService=Ve(fu)}ngOnInit(){this.pushSubscription=this.shortcutService.onKeyPressExclusive.subscribe([Pn.Esc],()=>this.closeClicked())}nxtOnDestroy(){}loadDriveVideo(i){this.src.set(a6.getDriveLink(i.id)),this.mimeType.set(i.mimetype),this.filename.set(i.name)}closeClicked(){this.dialogRef.close()}downloadClicked(){this.downloadService.downloadUrl(this.src(),this.filename())}shareClicked(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-video"]],viewQuery:function(r,s){if(r&1&&ei(uhi,5),r&2){let o;Pt(o=Rt())&&(s.videoElement=o.first)}},standalone:!0,features:[et,xe],decls:11,vars:1,consts:[["videoPlayer",""],[1,"flex","h-full","w-full","flex-col",2,"background-color","transparent"],[1,"z-10","flex","w-full","flex-row","justify-between","p-3","p-absolute"],[1,"flex","flex-row","items-center","gap-4","icons"],["matTooltip","Teilen","fontSet","material-symbols-outlined",1,"cursor-pointer","share-icon",3,"click"],["matTooltip","Herunterladen","fontSet","material-symbols-outlined",1,"cursor-pointer",3,"click"],["matTooltip","Schlie\xDFen","fontSet","material-symbols-outlined",1,"cursor-pointer",3,"click"],[1,"flex","h-full","w-full","flex-col"],[1,"flex","h-full","w-full","justify-center","items-center",2,"background","transparent","overflow","hidden","border","0px solid blue"],["controls","","preload","auto","playsinline","",1,"video-js","vjs-default-skin"],[3,"src","type"]],template:function(r,s){r&1&&(h(0,"div",1)(1,"div",2),ee(2,"div"),h(3,"div",3)(4,"mat-icon",4),F("click",function(){return s.shareClicked()}),y(5,"share"),p(),h(6,"mat-icon",5),F("click",function(){return s.downloadClicked()}),y(7,"download"),p(),h(8,"mat-icon",6),F("click",function(){return s.closeClicked()}),y(9,"close"),p()()(),W(10,hhi,5,2,"div",7),p()),r&2&&(g(10),Je(s.src()&&s.mimeType()?10:-1))},dependencies:[Zr,dl],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;background-color:#000000e6!important}[_nghost-%COMP%]     .vjs-control-bar{height:60px;background-color:#000000e6}[_nghost-%COMP%]     .vjs-control-bar .vjs-control{font-size:16px}[_nghost-%COMP%]     .vjs-control-bar .vjs-picture-in-picture-control, [_nghost-%COMP%]     .vjs-control-bar .vjs-fullscreen-control{display:none}[_nghost-%COMP%]   .icons[_ngcontent-%COMP%]{background-color:#00000080;border-radius:4px;padding:0 4px}[_nghost-%COMP%]   .icons[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-size:40px;width:40px;height:40px}[_nghost-%COMP%]   .icons[_ngcontent-%COMP%]   .share-icon[_ngcontent-%COMP%]{font-size:32px}[_nghost-%COMP%]   .video-js[_ngcontent-%COMP%]{background-color:transparent;padding-top:0!important;height:inherit!important;max-height:100%;display:flex;justify-content:center;align-items:center}[_nghost-%COMP%]   .vjs-tech[_ngcontent-%COMP%]{max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;object-fit:contain;left:auto!important;top:auto!important}"],changeDetection:0});let t=e;return t})()});function mhi(t,e){if(t&1){let n=re();h(0,"div",3),ee(1,"img",7),Ce(2,"nxtEventFile"),h(3,"nxt-checkbox",8),F("valueChange",function(r){let s=V(n).$implicit,o=w(2);return B(o.triggerPhoto(s.id,r))}),p(),h(4,"div",9),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.triggerPhoto(r.id))}),h(5,"div",10),y(6),Ce(7,"nxtDriveFileSubType"),p(),h(8,"div",10),y(9),Ce(10,"nxtDate"),p()()()}if(t&2){let n=e.$implicit,i=w(2);g(),b("src",Nt(2,4,n.fileId,!0),Ur),g(2),b("value",i.photosSelected[n.id]),g(3),ye(tt(7,7,n.subType)),g(3),ye(Nt(10,9,n.createdAt,"dd.MM.yyyy HH:mm"))}}function fhi(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w(2);return B(r.save())}),y(1,"1 Foto mit diesem Termin verkn\xFCpfen"),p()}}function ghi(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w(2);return B(r.save())}),y(1),p()}if(t&2){let n=w(2);g(),Ke("",n.photosSelectedCount," Fotos mit diesem Termin verkn\xFCpfen")}}function vhi(t,e){if(t&1){let n=re();h(0,"div",0)(1,"div",1),y(2),p(),h(3,"div",2),Kn(4,mhi,11,12,"div",3,phi),p(),h(6,"div",4)(7,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(8,"Abbrechen"),p(),W(9,fhi,2,0,"nxt-button",6)(10,ghi,2,1,"nxt-button",6),p()()}if(t&2){let n=e,i=w();g(2),Ke("",n.length," Fotos / Videos"),g(2),Yn(n),g(5),b("ngIf",i.photosSelectedCount===1),g(),b("ngIf",i.photosSelectedCount>1)}}var phi,yQe,_Qe=Q(()=>{me();Zi();mg();ri();Vt();go();hz();Tz();me();yi();ji();Ci();Vt();phi=(t,e)=>e.id;yQe=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.cdRef=r,this.dialogRef=s,this.dialogService=o,this.eventId="",this.eventFilesClipboard=gt([]),this.photosSelected={},this.photosSelectedCount=0}ngOnInit(){return O(this,null,function*(){this.load()})}load(){return O(this,null,function*(){this.eventFilesClipboard.set(yield this.socketService.getEventFilesFromClipboard())})}save(){return O(this,null,function*(){let i=[];for(let r of Object.keys(this.photosSelected))this.photosSelected[r]&&i.push(r);if(i.length===0)this.dialogService.showOk("Du hast keine Bilder ausgew\xE4hlt");else if(yield this.dialogService.showYesNo("M\xF6chtest du "+i.length+" Foto(s) verkn\xFCpfen?")){let r=this.eventFilesClipboard().filter(s=>i.includes(s.id));this.socketService.reAssignEventFilesFromClipboard(this.eventId,r),this.dialogRef.close()}})}triggerPhoto(i,r){typeof r=="boolean"?this.photosSelected[i]=r:this.photosSelected[i]=!this.photosSelected[i];for(let s of Object.keys(this.photosSelected))this.photosSelected[s]||delete this.photosSelected[s];this.photosSelectedCount=Object.keys(this.photosSelected).length}delete(){return O(this,null,function*(){let i=[];for(let r of Object.keys(this.photosSelected))this.photosSelected[r]&&i.push(r);(yield this.dialogService.showYesNo("M\xF6chtest du "+i.length+" Foto(s) wirklich l\xF6schen?"))&&(yield this.socketService.updatePhotoSyncReimportUnknownDelete(i),this.load())})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Kt),R(Gt,8),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-event-files-clipboard"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[["fxLayout","column","fxLayoutAlign","center center",1,"w-full","h-100","o-hidden"],[1,"text-120"],["fxLayout","row","fxLayoutGap","5px",1,"w-full","p-3","scrollable"],[1,"relative","flex","flex-col","items-center","justify-center"],[1,"flex","flex-row","items-center","justify-center","gap-1","p-3"],[3,"click"],[3,"click",4,"ngIf"],[2,"max-width","none !important","height","220px",3,"src"],[2,"position","absolute","left","5px","top","5px","width","28px","height","28px","border-radius","4px","background-color","#0000006b",3,"valueChange","value"],["fxLayoutAlign","center center","fxLayout","column",1,"p-2","no-wrap",2,"position","absolute","bottom","0","background","rgba(0,0,0,0.5)","border-radius","4px 4px 0 0",3,"click"],[1,"mouse-pointer"]],template:function(r,s){if(r&1&&W(0,vhi,11,3,"div",0),r&2){let o;Je((o=s.eventFilesClipboard())?0:-1,o)}},dependencies:[At,Yt,$r,oi,Ct,H1,Lt,Hn,O7,V7],styles:["[_nghost-%COMP%]{display:flex;max-width:90vw}"],changeDetection:0});let t=e;return t})()});var xQe=xr(vn=>{var be=be||{version:"5.4.0"};typeof vn<"u"?vn.fabric=be:typeof define=="function"&&define.amd&&define([],function(){return be});typeof document<"u"&&typeof window<"u"?(document instanceof(typeof HTMLDocument<"u"?HTMLDocument:Document)?be.document=document:be.document=document.implementation.createHTMLDocument(""),be.window=window):(CQe=s4("jsdom"),W_e=new CQe.JSDOM(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window,be.document=W_e.document,be.jsdomImplForWrapper=s4("jsdom/lib/jsdom/living/generated/utils").implForWrapper,be.nodeCanvas=s4("jsdom/lib/jsdom/utils").Canvas,be.window=W_e,DOMParser=be.window.DOMParser);var CQe,W_e;be.isTouchSupported="ontouchstart"in be.window||"ontouchstart"in be.document||be.window&&be.window.navigator&&be.window.navigator.maxTouchPoints>0;be.isLikelyNode=typeof Buffer<"u"&&typeof window>"u";be.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"];be.DPI=96;be.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)";be.commaWsp="(?:\\s+,?\\s*|,\\s*)";be.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/ig;be.reNonWord=/[ \n\.,;!\?\-]/;be.fontPaths={};be.iMatrix=[1,0,0,1,0,0];be.svgNS="http://www.w3.org/2000/svg";be.perfLimitSizeTotal=2097152;be.maxCacheSideLimit=4096;be.minCacheSideLimit=256;be.charWidthsCache={};be.textureSize=2048;be.disableStyleCopyPaste=!1;be.enableGLFiltering=!0;be.devicePixelRatio=be.window.devicePixelRatio||be.window.webkitDevicePixelRatio||be.window.mozDevicePixelRatio||1;be.browserShadowBlurConstant=1;be.arcToSegmentsCache={};be.boundsOfCurveCache={};be.cachesBoundsOfCurve=!0;be.forceGLPutImageData=!1;be.initFilterBackend=function(){if(be.enableGLFiltering&&be.isWebglSupported&&be.isWebglSupported(be.textureSize))return console.log("max texture size: "+be.maxTextureSize),new be.WebglFilterBackend({tileSize:be.textureSize});if(be.Canvas2dFilterBackend)return new be.Canvas2dFilterBackend};typeof document<"u"&&typeof window<"u"&&(window.fabric=be);(function(){function t(o,a){if(this.__eventListeners[o]){var l=this.__eventListeners[o];a?l[l.indexOf(a)]=!1:be.util.array.fill(l,!1)}}function e(o,a){if(this.__eventListeners||(this.__eventListeners={}),arguments.length===1)for(var l in o)this.on(l,o[l]);else this.__eventListeners[o]||(this.__eventListeners[o]=[]),this.__eventListeners[o].push(a);return this}function n(o,a){var l=(function(){a.apply(this,arguments),this.off(o,l)}).bind(this);this.on(o,l)}function i(o,a){if(arguments.length===1)for(var l in o)n.call(this,l,o[l]);else n.call(this,o,a);return this}function r(o,a){if(!this.__eventListeners)return this;if(arguments.length===0)for(o in this.__eventListeners)t.call(this,o);else if(arguments.length===1&&typeof arguments[0]=="object")for(var l in o)t.call(this,l,o[l]);else t.call(this,o,a);return this}function s(o,a){if(!this.__eventListeners)return this;var l=this.__eventListeners[o];if(!l)return this;for(var c=0,d=l.length;c<d;c++)l[c]&&l[c].call(this,a||{});return this.__eventListeners[o]=l.filter(function(u){return u!==!1}),this}be.Observable={fire:s,on:e,once:i,off:r}})();be.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var t=0,e=arguments.length;t<e;t++)this._onObjectAdded(arguments[t]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(t,e,n){var i=this._objects;return n?i[e]=t:i.splice(e,0,t),this._onObjectAdded&&this._onObjectAdded(t),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var t=this._objects,e,n=!1,i=0,r=arguments.length;i<r;i++)e=t.indexOf(arguments[i]),e!==-1&&(n=!0,t.splice(e,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[i]));return this.renderOnAddRemove&&n&&this.requestRenderAll(),this},forEachObject:function(t,e){for(var n=this.getObjects(),i=0,r=n.length;i<r;i++)t.call(e,n[i],i,n);return this},getObjects:function(t){return typeof t>"u"?this._objects.concat():this._objects.filter(function(e){return e.type===t})},item:function(t){return this._objects[t]},isEmpty:function(){return this._objects.length===0},size:function(){return this._objects.length},contains:function(t,e){return this._objects.indexOf(t)>-1?!0:e?this._objects.some(function(n){return typeof n.contains=="function"&&n.contains(t,!0)}):!1},complexity:function(){return this._objects.reduce(function(t,e){return t+=e.complexity?e.complexity():0,t},0)}};be.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){t&&t.colorStops&&!(t instanceof be.Gradient)&&this.set(e,new be.Gradient(t))},_initPattern:function(t,e,n){t&&t.source&&!(t instanceof be.Pattern)?this.set(e,new be.Pattern(t,n)):n&&n()},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return typeof t=="object"?this._setObject(t):this._set(t,e),this},_set:function(t,e){this[t]=e},toggle:function(t){var e=this.get(t);return typeof e=="boolean"&&this.set(t,!e),this},get:function(t){return this[t]}};(function(t){var e=Math.sqrt,n=Math.atan2,i=Math.pow,r=Math.PI/180,s=Math.PI/2;be.util={cos:function(o){if(o===0)return 1;o<0&&(o=-o);var a=o/s;switch(a){case 1:case 3:return 0;case 2:return-1}return Math.cos(o)},sin:function(o){if(o===0)return 0;var a=o/s,l=1;switch(o<0&&(l=-1),a){case 1:return l;case 2:return 0;case 3:return-l}return Math.sin(o)},removeFromArray:function(o,a){var l=o.indexOf(a);return l!==-1&&o.splice(l,1),o},getRandomInt:function(o,a){return Math.floor(Math.random()*(a-o+1))+o},degreesToRadians:function(o){return o*r},radiansToDegrees:function(o){return o/r},rotatePoint:function(o,a,l){var c=new be.Point(o.x-a.x,o.y-a.y),d=be.util.rotateVector(c,l);return new be.Point(d.x,d.y).addEquals(a)},rotateVector:function(o,a){var l=be.util.sin(a),c=be.util.cos(a),d=o.x*c-o.y*l,u=o.x*l+o.y*c;return{x:d,y:u}},createVector:function(o,a){return new be.Point(a.x-o.x,a.y-o.y)},calcAngleBetweenVectors:function(o,a){return Math.acos((o.x*a.x+o.y*a.y)/(Math.hypot(o.x,o.y)*Math.hypot(a.x,a.y)))},getHatVector:function(o){return new be.Point(o.x,o.y).multiply(1/Math.hypot(o.x,o.y))},getBisector:function(o,a,l){var c=be.util.createVector(o,a),d=be.util.createVector(o,l),u=be.util.calcAngleBetweenVectors(c,d),m=be.util.calcAngleBetweenVectors(be.util.rotateVector(c,u),d),f=u*(m===0?1:-1)/2;return{vector:be.util.getHatVector(be.util.rotateVector(c,f)),angle:u}},projectStrokeOnPoints:function(o,a,l){var c=[],d=a.strokeWidth/2,u=a.strokeUniform?new be.Point(1/a.scaleX,1/a.scaleY):new be.Point(1,1),m=function(f){var _=d/Math.hypot(f.x,f.y);return new be.Point(f.x*_*u.x,f.y*_*u.y)};return o.length<=1||o.forEach(function(f,_){var x=new be.Point(f.x,f.y),D,E;_===0?(E=o[_+1],D=l?m(be.util.createVector(E,x)).addEquals(x):o[o.length-1]):_===o.length-1?(D=o[_-1],E=l?m(be.util.createVector(D,x)).addEquals(x):o[0]):(D=o[_-1],E=o[_+1]);var M=be.util.getBisector(x,D,E),I=M.vector,z=M.angle,G,A;if(a.strokeLineJoin==="miter"&&(G=-d/Math.sin(z/2),A=new be.Point(I.x*G*u.x,I.y*G*u.y),Math.hypot(A.x,A.y)/d<=a.strokeMiterLimit)){c.push(x.add(A)),c.push(x.subtract(A));return}G=-d*Math.SQRT2,A=new be.Point(I.x*G*u.x,I.y*G*u.y),c.push(x.add(A)),c.push(x.subtract(A))}),c},transformPoint:function(o,a,l){return l?new be.Point(a[0]*o.x+a[2]*o.y,a[1]*o.x+a[3]*o.y):new be.Point(a[0]*o.x+a[2]*o.y+a[4],a[1]*o.x+a[3]*o.y+a[5])},makeBoundingBoxFromPoints:function(o,a){if(a)for(var l=0;l<o.length;l++)o[l]=be.util.transformPoint(o[l],a);var c=[o[0].x,o[1].x,o[2].x,o[3].x],d=be.util.array.min(c),u=be.util.array.max(c),m=u-d,f=[o[0].y,o[1].y,o[2].y,o[3].y],_=be.util.array.min(f),x=be.util.array.max(f),D=x-_;return{left:d,top:_,width:m,height:D}},invertTransform:function(o){var a=1/(o[0]*o[3]-o[1]*o[2]),l=[a*o[3],-a*o[1],-a*o[2],a*o[0]],c=be.util.transformPoint({x:o[4],y:o[5]},l,!0);return l[4]=-c.x,l[5]=-c.y,l},toFixed:function(o,a){return parseFloat(Number(o).toFixed(a))},parseUnit:function(o,a){var l=/\D{0,2}$/.exec(o),c=parseFloat(o);switch(a||(a=be.Text.DEFAULT_SVG_FONT_SIZE),l[0]){case"mm":return c*be.DPI/25.4;case"cm":return c*be.DPI/2.54;case"in":return c*be.DPI;case"pt":return c*be.DPI/72;case"pc":return c*be.DPI/72*12;case"em":return c*a;default:return c}},falseFunction:function(){return!1},getKlass:function(o,a){return o=be.util.string.camelize(o.charAt(0).toUpperCase()+o.slice(1)),be.util.resolveNamespace(a)[o]},getSvgAttributes:function(o){var a=["instantiated_by_use","style","id","class"];switch(o){case"linearGradient":a=a.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":a=a.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":a=a.concat(["offset","stop-color","stop-opacity"]);break}return a},resolveNamespace:function(o){if(!o)return be;var a=o.split("."),l=a.length,c,d=t||be.window;for(c=0;c<l;++c)d=d[a[c]];return d},loadImage:function(o,a,l,c){if(!o){a&&a.call(l,o);return}var d=be.util.createImage(),u=function(){a&&a.call(l,d,!1),d=d.onload=d.onerror=null};d.onload=u,d.onerror=function(){be.log("Error loading "+d.src),a&&a.call(l,null,!0),d=d.onload=d.onerror=null},o.indexOf("data")!==0&&c!==void 0&&c!==null&&(d.crossOrigin=c),o.substring(0,14)==="data:image/svg"&&(d.onload=null,be.util.loadImageInDom(d,u)),d.src=o},loadImageInDom:function(o,a){var l=be.document.createElement("div");l.style.width=l.style.height="1px",l.style.left=l.style.top="-100%",l.style.position="absolute",l.appendChild(o),be.document.querySelector("body").appendChild(l),o.onload=function(){a(),l.parentNode.removeChild(l),l=null}},enlivenObjects:function(o,a,l,c){o=o||[];var d=[],u=0,m=o.length;function f(){++u===m&&a&&a(d.filter(function(_){return _}))}if(!m){a&&a(d);return}o.forEach(function(_,x){if(!_||!_.type){f();return}var D=be.util.getKlass(_.type,l);D.fromObject(_,function(E,M){M||(d[x]=E),c&&c(_,E,M),f()})})},enlivenObjectEnlivables:function(o,a,l){var c=be.Object.ENLIVEN_PROPS.filter(function(d){return!!o[d]});be.util.enlivenObjects(c.map(function(d){return o[d]}),function(d){var u={};c.forEach(function(m,f){u[m]=d[f],a&&(a[m]=d[f])}),l&&l(u)})},enlivenPatterns:function(o,a){o=o||[];function l(){++d===u&&a&&a(c)}var c=[],d=0,u=o.length;if(!u){a&&a(c);return}o.forEach(function(m,f){m&&m.source?new be.Pattern(m,function(_){c[f]=_,l()}):(c[f]=m,l())})},groupSVGElements:function(o,a,l){var c;return o&&o.length===1?(typeof l<"u"&&(o[0].sourcePath=l),o[0]):(a&&(a.width&&a.height?a.centerPoint={x:a.width/2,y:a.height/2}:(delete a.width,delete a.height)),c=new be.Group(o,a),typeof l<"u"&&(c.sourcePath=l),c)},populateWithProperties:function(o,a,l){if(l&&Array.isArray(l))for(var c=0,d=l.length;c<d;c++)l[c]in o&&(a[l[c]]=o[l[c]])},createCanvasElement:function(){return be.document.createElement("canvas")},copyCanvasElement:function(o){var a=be.util.createCanvasElement();return a.width=o.width,a.height=o.height,a.getContext("2d").drawImage(o,0,0),a},toDataURL:function(o,a,l){return o.toDataURL("image/"+a,l)},createImage:function(){return be.document.createElement("img")},multiplyTransformMatrices:function(o,a,l){return[o[0]*a[0]+o[2]*a[1],o[1]*a[0]+o[3]*a[1],o[0]*a[2]+o[2]*a[3],o[1]*a[2]+o[3]*a[3],l?0:o[0]*a[4]+o[2]*a[5]+o[4],l?0:o[1]*a[4]+o[3]*a[5]+o[5]]},qrDecompose:function(o){var a=n(o[1],o[0]),l=i(o[0],2)+i(o[1],2),c=e(l),d=(o[0]*o[3]-o[2]*o[1])/c,u=n(o[0]*o[2]+o[1]*o[3],l);return{angle:a/r,scaleX:c,scaleY:d,skewX:u/r,skewY:0,translateX:o[4],translateY:o[5]}},calcRotateMatrix:function(o){if(!o.angle)return be.iMatrix.concat();var a=be.util.degreesToRadians(o.angle),l=be.util.cos(a),c=be.util.sin(a);return[l,c,-c,l,0,0]},calcDimensionsMatrix:function(o){var a=typeof o.scaleX>"u"?1:o.scaleX,l=typeof o.scaleY>"u"?1:o.scaleY,c=[o.flipX?-a:a,0,0,o.flipY?-l:l,0,0],d=be.util.multiplyTransformMatrices,u=be.util.degreesToRadians;return o.skewX&&(c=d(c,[1,0,Math.tan(u(o.skewX)),1],!0)),o.skewY&&(c=d(c,[1,Math.tan(u(o.skewY)),0,1],!0)),c},composeMatrix:function(o){var a=[1,0,0,1,o.translateX||0,o.translateY||0],l=be.util.multiplyTransformMatrices;return o.angle&&(a=l(a,be.util.calcRotateMatrix(o))),(o.scaleX!==1||o.scaleY!==1||o.skewX||o.skewY||o.flipX||o.flipY)&&(a=l(a,be.util.calcDimensionsMatrix(o))),a},resetObjectTransform:function(o){o.scaleX=1,o.scaleY=1,o.skewX=0,o.skewY=0,o.flipX=!1,o.flipY=!1,o.rotate(0)},saveObjectTransform:function(o){return{scaleX:o.scaleX,scaleY:o.scaleY,skewX:o.skewX,skewY:o.skewY,angle:o.angle,left:o.left,flipX:o.flipX,flipY:o.flipY,top:o.top}},isTransparent:function(o,a,l,c){c>0&&(a>c?a-=c:a=0,l>c?l-=c:l=0);var d=!0,u,m,f=o.getImageData(a,l,c*2||1,c*2||1),_=f.data.length;for(u=3;u<_&&(m=f.data[u],d=m<=0,d!==!1);u+=4);return f=null,d},parsePreserveAspectRatioAttribute:function(o){var a="meet",l="Mid",c="Mid",d=o.split(" "),u;return d&&d.length&&(a=d.pop(),a!=="meet"&&a!=="slice"?(u=a,a="meet"):d.length&&(u=d.pop())),l=u!=="none"?u.slice(1,4):"none",c=u!=="none"?u.slice(5,8):"none",{meetOrSlice:a,alignX:l,alignY:c}},clearFabricFontCache:function(o){o=(o||"").toLowerCase(),o?be.charWidthsCache[o]&&delete be.charWidthsCache[o]:be.charWidthsCache={}},limitDimsByArea:function(o,a){var l=Math.sqrt(a*o),c=Math.floor(a/l);return{x:Math.floor(l),y:c}},capValue:function(o,a,l){return Math.max(o,Math.min(a,l))},findScaleToFit:function(o,a){return Math.min(a.width/o.width,a.height/o.height)},findScaleToCover:function(o,a){return Math.max(a.width/o.width,a.height/o.height)},matrixToSVG:function(o){return"matrix("+o.map(function(a){return be.util.toFixed(a,be.Object.NUM_FRACTION_DIGITS)}).join(" ")+")"},removeTransformFromObject:function(o,a){var l=be.util.invertTransform(a),c=be.util.multiplyTransformMatrices(l,o.calcOwnMatrix());be.util.applyTransformToObject(o,c)},addTransformToObject:function(o,a){be.util.applyTransformToObject(o,be.util.multiplyTransformMatrices(a,o.calcOwnMatrix()))},applyTransformToObject:function(o,a){var l=be.util.qrDecompose(a),c=new be.Point(l.translateX,l.translateY);o.flipX=!1,o.flipY=!1,o.set("scaleX",l.scaleX),o.set("scaleY",l.scaleY),o.skewX=l.skewX,o.skewY=l.skewY,o.angle=l.angle,o.setPositionByOrigin(c,"center","center")},sizeAfterTransform:function(o,a,l){var c=o/2,d=a/2,u=[{x:-c,y:-d},{x:c,y:-d},{x:-c,y:d},{x:c,y:d}],m=be.util.calcDimensionsMatrix(l),f=be.util.makeBoundingBoxFromPoints(u,m);return{x:f.width,y:f.height}},mergeClipPaths:function(o,a){var l=o,c=a;l.inverted&&!c.inverted&&(l=a,c=o),be.util.applyTransformToObject(c,be.util.multiplyTransformMatrices(be.util.invertTransform(l.calcTransformMatrix()),c.calcTransformMatrix()));var d=l.inverted&&c.inverted;return d&&(l.inverted=c.inverted=!1),new be.Group([l],{clipPath:c,inverted:d})},hasStyleChanged:function(o,a,l){return l=l||!1,o.fill!==a.fill||o.stroke!==a.stroke||o.strokeWidth!==a.strokeWidth||o.fontSize!==a.fontSize||o.fontFamily!==a.fontFamily||o.fontWeight!==a.fontWeight||o.fontStyle!==a.fontStyle||o.textBackgroundColor!==a.textBackgroundColor||o.deltaY!==a.deltaY||l&&(o.overline!==a.overline||o.underline!==a.underline||o.linethrough!==a.linethrough)},stylesToArray:function(l,a){for(var l=be.util.object.clone(l,!0),c=a.split(`
`),d=-1,u={},m=[],f=0;f<c.length;f++){if(!l[f]){d+=c[f].length;continue}for(var _=0;_<c[f].length;_++){d++;var x=l[f][_];if(x&&Object.keys(x).length>0){var D=be.util.hasStyleChanged(u,x,!0);D?m.push({start:d,end:d+1,style:x}):m[m.length-1].end++}u=x||{}}}return m},stylesFromArray:function(o,a){if(!Array.isArray(o))return o;for(var l=a.split(`
`),c=-1,d=0,u={},m=0;m<l.length;m++)for(var f=0;f<l[m].length;f++)c++,o[d]&&o[d].start<=c&&c<o[d].end&&(u[m]=u[m]||{},u[m][f]=Object.assign({},o[d].style),c===o[d].end-1&&d++);return u}}})(vn);(function(){var t=Array.prototype.join,e={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},n={m:"l",M:"L"};function i(ie,le,Se,je,ze,Ge,Ae,Ye,ft,Ft,Tt){var at=be.util.cos(ie),yt=be.util.sin(ie),_t=be.util.cos(le),Re=be.util.sin(le),ot=Se*ze*_t-je*Ge*Re+Ae,jt=je*ze*_t+Se*Ge*Re+Ye,zt=Ft+ft*(-Se*ze*yt-je*Ge*at),qt=Tt+ft*(-je*ze*yt+Se*Ge*at),ui=ot+ft*(Se*ze*Re+je*Ge*_t),_i=jt+ft*(je*ze*Re-Se*Ge*_t);return["C",zt,qt,ui,_i,ot,jt]}function r(ie,le,Se,je,ze,Ge,Ae){var Ye=Math.PI,ft=Ae*Ye/180,Ft=be.util.sin(ft),Tt=be.util.cos(ft),at=0,yt=0;Se=Math.abs(Se),je=Math.abs(je);var _t=-Tt*ie*.5-Ft*le*.5,Re=-Tt*le*.5+Ft*ie*.5,ot=Se*Se,jt=je*je,zt=Re*Re,qt=_t*_t,ui=ot*jt-ot*zt-jt*qt,_i=0;if(ui<0){var ln=Math.sqrt(1-ui/(ot*jt));Se*=ln,je*=ln}else _i=(ze===Ge?-1:1)*Math.sqrt(ui/(ot*zt+jt*qt));var Rn=_i*Se*Re/je,bi=-_i*je*_t/Se,Mn=Tt*Rn-Ft*bi+ie*.5,Fn=Ft*Rn+Tt*bi+le*.5,or=s(1,0,(_t-Rn)/Se,(Re-bi)/je),wn=s((_t-Rn)/Se,(Re-bi)/je,(-_t-Rn)/Se,(-Re-bi)/je);Ge===0&&wn>0?wn-=2*Ye:Ge===1&&wn<0&&(wn+=2*Ye);for(var gn=Math.ceil(Math.abs(wn/Ye*2)),ts=[],no=wn/gn,Ho=8/3*Math.sin(no/4)*Math.sin(no/4)/Math.sin(no/2),kn=or+no,Ts=0;Ts<gn;Ts++)ts[Ts]=i(or,kn,Tt,Ft,Se,je,Mn,Fn,Ho,at,yt),at=ts[Ts][5],yt=ts[Ts][6],or=kn,kn+=no;return ts}function s(ie,le,Se,je){var ze=Math.atan2(le,ie),Ge=Math.atan2(je,Se);return Ge>=ze?Ge-ze:2*Math.PI-(ze-Ge)}function o(ie,le,Se,je,ze,Ge,Ae,Ye){var ft;if(be.cachesBoundsOfCurve&&(ft=t.call(arguments),be.boundsOfCurveCache[ft]))return be.boundsOfCurveCache[ft];var Ft=Math.sqrt,Tt=Math.min,at=Math.max,yt=Math.abs,_t=[],Re=[[],[]],ot,jt,zt,qt,ui,_i,ln,Rn;jt=6*ie-12*Se+6*ze,ot=-3*ie+9*Se-9*ze+3*Ae,zt=3*Se-3*ie;for(var bi=0;bi<2;++bi){if(bi>0&&(jt=6*le-12*je+6*Ge,ot=-3*le+9*je-9*Ge+3*Ye,zt=3*je-3*le),yt(ot)<1e-12){if(yt(jt)<1e-12)continue;qt=-zt/jt,0<qt&&qt<1&&_t.push(qt);continue}ln=jt*jt-4*zt*ot,!(ln<0)&&(Rn=Ft(ln),ui=(-jt+Rn)/(2*ot),0<ui&&ui<1&&_t.push(ui),_i=(-jt-Rn)/(2*ot),0<_i&&_i<1&&_t.push(_i))}for(var Mn,Fn,or=_t.length,wn=or,gn;or--;)qt=_t[or],gn=1-qt,Mn=gn*gn*gn*ie+3*gn*gn*qt*Se+3*gn*qt*qt*ze+qt*qt*qt*Ae,Re[0][or]=Mn,Fn=gn*gn*gn*le+3*gn*gn*qt*je+3*gn*qt*qt*Ge+qt*qt*qt*Ye,Re[1][or]=Fn;Re[0][wn]=ie,Re[1][wn]=le,Re[0][wn+1]=Ae,Re[1][wn+1]=Ye;var ts=[{x:Tt.apply(null,Re[0]),y:Tt.apply(null,Re[1])},{x:at.apply(null,Re[0]),y:at.apply(null,Re[1])}];return be.cachesBoundsOfCurve&&(be.boundsOfCurveCache[ft]=ts),ts}function a(ie,le,Se){for(var je=Se[1],ze=Se[2],Ge=Se[3],Ae=Se[4],Ye=Se[5],ft=Se[6],Ft=Se[7],Tt=r(ft-ie,Ft-le,je,ze,Ae,Ye,Ge),at=0,yt=Tt.length;at<yt;at++)Tt[at][1]+=ie,Tt[at][2]+=le,Tt[at][3]+=ie,Tt[at][4]+=le,Tt[at][5]+=ie,Tt[at][6]+=le;return Tt}function l(ie){var le=0,Se=0,je=ie.length,ze=0,Ge=0,Ae,Ye,ft,Ft=[],Tt,at,yt;for(Ye=0;Ye<je;++Ye){switch(ft=!1,Ae=ie[Ye].slice(0),Ae[0]){case"l":Ae[0]="L",Ae[1]+=le,Ae[2]+=Se;case"L":le=Ae[1],Se=Ae[2];break;case"h":Ae[1]+=le;case"H":Ae[0]="L",Ae[2]=Se,le=Ae[1];break;case"v":Ae[1]+=Se;case"V":Ae[0]="L",Se=Ae[1],Ae[1]=le,Ae[2]=Se;break;case"m":Ae[0]="M",Ae[1]+=le,Ae[2]+=Se;case"M":le=Ae[1],Se=Ae[2],ze=Ae[1],Ge=Ae[2];break;case"c":Ae[0]="C",Ae[1]+=le,Ae[2]+=Se,Ae[3]+=le,Ae[4]+=Se,Ae[5]+=le,Ae[6]+=Se;case"C":at=Ae[3],yt=Ae[4],le=Ae[5],Se=Ae[6];break;case"s":Ae[0]="S",Ae[1]+=le,Ae[2]+=Se,Ae[3]+=le,Ae[4]+=Se;case"S":Tt==="C"?(at=2*le-at,yt=2*Se-yt):(at=le,yt=Se),le=Ae[3],Se=Ae[4],Ae[0]="C",Ae[5]=Ae[3],Ae[6]=Ae[4],Ae[3]=Ae[1],Ae[4]=Ae[2],Ae[1]=at,Ae[2]=yt,at=Ae[3],yt=Ae[4];break;case"q":Ae[0]="Q",Ae[1]+=le,Ae[2]+=Se,Ae[3]+=le,Ae[4]+=Se;case"Q":at=Ae[1],yt=Ae[2],le=Ae[3],Se=Ae[4];break;case"t":Ae[0]="T",Ae[1]+=le,Ae[2]+=Se;case"T":Tt==="Q"?(at=2*le-at,yt=2*Se-yt):(at=le,yt=Se),Ae[0]="Q",le=Ae[1],Se=Ae[2],Ae[1]=at,Ae[2]=yt,Ae[3]=le,Ae[4]=Se;break;case"a":Ae[0]="A",Ae[6]+=le,Ae[7]+=Se;case"A":ft=!0,Ft=Ft.concat(a(le,Se,Ae)),le=Ae[6],Se=Ae[7];break;case"z":case"Z":le=ze,Se=Ge;break;default:}ft||Ft.push(Ae),Tt=Ae[0]}return Ft}function c(ie,le,Se,je){return Math.sqrt((Se-ie)*(Se-ie)+(je-le)*(je-le))}function d(ie){return ie*ie*ie}function u(ie){return 3*ie*ie*(1-ie)}function m(ie){return 3*ie*(1-ie)*(1-ie)}function f(ie){return(1-ie)*(1-ie)*(1-ie)}function _(ie,le,Se,je,ze,Ge,Ae,Ye){return function(ft){var Ft=d(ft),Tt=u(ft),at=m(ft),yt=f(ft);return{x:Ae*Ft+ze*Tt+Se*at+ie*yt,y:Ye*Ft+Ge*Tt+je*at+le*yt}}}function x(ie,le,Se,je,ze,Ge,Ae,Ye){return function(ft){var Ft=1-ft,Tt=3*Ft*Ft*(Se-ie)+6*Ft*ft*(ze-Se)+3*ft*ft*(Ae-ze),at=3*Ft*Ft*(je-le)+6*Ft*ft*(Ge-je)+3*ft*ft*(Ye-Ge);return Math.atan2(at,Tt)}}function D(ie){return ie*ie}function E(ie){return 2*ie*(1-ie)}function M(ie){return(1-ie)*(1-ie)}function I(ie,le,Se,je,ze,Ge){return function(Ae){var Ye=D(Ae),ft=E(Ae),Ft=M(Ae);return{x:ze*Ye+Se*ft+ie*Ft,y:Ge*Ye+je*ft+le*Ft}}}function z(ie,le,Se,je,ze,Ge){return function(Ae){var Ye=1-Ae,ft=2*Ye*(Se-ie)+2*Ae*(ze-Se),Ft=2*Ye*(je-le)+2*Ae*(Ge-je);return Math.atan2(Ft,ft)}}function G(ie,le,Se){var je={x:le,y:Se},ze,Ge=0,Ae;for(Ae=1;Ae<=100;Ae+=1)ze=ie(Ae/100),Ge+=c(je.x,je.y,ze.x,ze.y),je=ze;return Ge}function A(ie,le){for(var Se=0,je=0,ze=ie.iterator,Ge={x:ie.x,y:ie.y},Ae,Ye,ft=.01,Ft=ie.angleFinder,Tt;je<le&&ft>1e-4;)Ae=ze(Se),Tt=Se,Ye=c(Ge.x,Ge.y,Ae.x,Ae.y),Ye+je>le?(Se-=ft,ft/=2):(Ge=Ae,Se+=ft,je+=Ye);return Ae.angle=Ft(Tt),Ae}function Y(ie){for(var le=0,Se=ie.length,je,ze=0,Ge=0,Ae=0,Ye=0,ft=[],Ft,Tt,at,yt=0;yt<Se;yt++){switch(je=ie[yt],Tt={x:ze,y:Ge,command:je[0]},je[0]){case"M":Tt.length=0,Ae=ze=je[1],Ye=Ge=je[2];break;case"L":Tt.length=c(ze,Ge,je[1],je[2]),ze=je[1],Ge=je[2];break;case"C":Ft=_(ze,Ge,je[1],je[2],je[3],je[4],je[5],je[6]),at=x(ze,Ge,je[1],je[2],je[3],je[4],je[5],je[6]),Tt.iterator=Ft,Tt.angleFinder=at,Tt.length=G(Ft,ze,Ge),ze=je[5],Ge=je[6];break;case"Q":Ft=I(ze,Ge,je[1],je[2],je[3],je[4]),at=z(ze,Ge,je[1],je[2],je[3],je[4]),Tt.iterator=Ft,Tt.angleFinder=at,Tt.length=G(Ft,ze,Ge),ze=je[3],Ge=je[4];break;case"Z":case"z":Tt.destX=Ae,Tt.destY=Ye,Tt.length=c(ze,Ge,Ae,Ye),ze=Ae,Ge=Ye;break}le+=Tt.length,ft.push(Tt)}return ft.push({length:le,x:ze,y:Ge}),ft}function X(ie,le,Se){Se||(Se=Y(ie));for(var je=0;le-Se[je].length>0&&je<Se.length-2;)le-=Se[je].length,je++;var ze=Se[je],Ge=le/ze.length,Ae=ze.command,Ye=ie[je],ft;switch(Ae){case"M":return{x:ze.x,y:ze.y,angle:0};case"Z":case"z":return ft=new be.Point(ze.x,ze.y).lerp(new be.Point(ze.destX,ze.destY),Ge),ft.angle=Math.atan2(ze.destY-ze.y,ze.destX-ze.x),ft;case"L":return ft=new be.Point(ze.x,ze.y).lerp(new be.Point(Ye[1],Ye[2]),Ge),ft.angle=Math.atan2(Ye[2]-ze.y,Ye[1]-ze.x),ft;case"C":return A(ze,le);case"Q":return A(ze,le)}}function ne(ie){var le=[],Se=[],je,ze,Ge=be.rePathCommand,Ae="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",Ye="("+Ae+")"+be.commaWsp,ft="([01])"+be.commaWsp+"?",Ft=Ye+"?"+Ye+"?"+Ye+ft+ft+Ye+"?("+Ae+")",Tt=new RegExp(Ft,"g"),at,yt,_t;if(!ie||!ie.match)return le;_t=ie.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);for(var Re=0,ot,jt=_t.length;Re<jt;Re++){je=_t[Re],yt=je.slice(1).trim(),Se.length=0;var zt=je.charAt(0);if(ot=[zt],zt.toLowerCase()==="a")for(var qt;qt=Tt.exec(yt);)for(var ui=1;ui<qt.length;ui++)Se.push(qt[ui]);else for(;at=Ge.exec(yt);)Se.push(at[0]);for(var ui=0,_i=Se.length;ui<_i;ui++)ze=parseFloat(Se[ui]),isNaN(ze)||ot.push(ze);var ln=e[zt.toLowerCase()],Rn=n[zt]||zt;if(ot.length-1>ln)for(var bi=1,Mn=ot.length;bi<Mn;bi+=ln)le.push([zt].concat(ot.slice(bi,bi+ln))),zt=Rn;else le.push(ot)}return le}function pe(ie,le){var Se=[],je,ze=new be.Point(ie[0].x,ie[0].y),Ge=new be.Point(ie[1].x,ie[1].y),Ae=ie.length,Ye=1,ft=0,Ft=Ae>2;for(le=le||0,Ft&&(Ye=ie[2].x<Ge.x?-1:ie[2].x===Ge.x?0:1,ft=ie[2].y<Ge.y?-1:ie[2].y===Ge.y?0:1),Se.push(["M",ze.x-Ye*le,ze.y-ft*le]),je=1;je<Ae;je++){if(!ze.eq(Ge)){var Tt=ze.midPointFrom(Ge);Se.push(["Q",ze.x,ze.y,Tt.x,Tt.y])}ze=ie[je],je+1<ie.length&&(Ge=ie[je+1])}return Ft&&(Ye=ze.x>ie[je-2].x?1:ze.x===ie[je-2].x?0:-1,ft=ze.y>ie[je-2].y?1:ze.y===ie[je-2].y?0:-1),Se.push(["L",ze.x+Ye*le,ze.y+ft*le]),Se}function ce(ie,le,Se){return Se&&(le=be.util.multiplyTransformMatrices(le,[1,0,0,1,-Se.x,-Se.y])),ie.map(function(je){for(var ze=je.slice(0),Ge={},Ae=1;Ae<je.length-1;Ae+=2)Ge.x=je[Ae],Ge.y=je[Ae+1],Ge=be.util.transformPoint(Ge,le),ze[Ae]=Ge.x,ze[Ae+1]=Ge.y;return ze})}be.util.joinPath=function(ie){return ie.map(function(le){return le.join(" ")}).join(" ")},be.util.parsePath=ne,be.util.makePathSimpler=l,be.util.getSmoothPathFromPoints=pe,be.util.getPathSegmentsInfo=Y,be.util.getBoundsOfCurve=o,be.util.getPointOnPath=X,be.util.transformPath=ce})();(function(){var t=Array.prototype.slice;function e(o,a){for(var l=t.call(arguments,2),c=[],d=0,u=o.length;d<u;d++)c[d]=l.length?o[d][a].apply(o[d],l):o[d][a].call(o[d]);return c}function n(o,a){return s(o,a,function(l,c){return l>=c})}function i(o,a){return s(o,a,function(l,c){return l<c})}function r(o,a){for(var l=o.length;l--;)o[l]=a;return o}function s(o,a,l){if(!(!o||o.length===0)){var c=o.length-1,d=a?o[c][a]:o[c];if(a)for(;c--;)l(o[c][a],d)&&(d=o[c][a]);else for(;c--;)l(o[c],d)&&(d=o[c]);return d}}be.util.array={fill:r,invoke:e,min:i,max:n}})();(function(){function t(n,i,r){if(r)if(!be.isLikelyNode&&i instanceof Element)n=i;else if(i instanceof Array){n=[];for(var s=0,o=i.length;s<o;s++)n[s]=t({},i[s],r)}else if(i&&typeof i=="object")for(var a in i)a==="canvas"||a==="group"?n[a]=null:i.hasOwnProperty(a)&&(n[a]=t({},i[a],r));else n=i;else for(var a in i)n[a]=i[a];return n}function e(n,i){return t({},n,i)}be.util.object={extend:t,clone:e},be.util.object.extend(be.util,be.Observable)})();(function(){function t(s){return s.replace(/-+(.)?/g,function(o,a){return a?a.toUpperCase():""})}function e(s,o){return s.charAt(0).toUpperCase()+(o?s.slice(1):s.slice(1).toLowerCase())}function n(s){return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function i(s){var o=0,a,l=[];for(o=0,a;o<s.length;o++)(a=r(s,o))!==!1&&l.push(a);return l}function r(s,o){var a=s.charCodeAt(o);if(isNaN(a))return"";if(a<55296||a>57343)return s.charAt(o);if(55296<=a&&a<=56319){if(s.length<=o+1)throw"High surrogate without following low surrogate";var l=s.charCodeAt(o+1);if(56320>l||l>57343)throw"High surrogate without following low surrogate";return s.charAt(o)+s.charAt(o+1)}if(o===0)throw"Low surrogate without preceding high surrogate";var c=s.charCodeAt(o-1);if(55296>c||c>56319)throw"Low surrogate without preceding high surrogate";return!1}be.util.string={camelize:t,capitalize:e,escapeXml:n,graphemeSplit:i}})();(function(){var t=Array.prototype.slice,e=function(){},n=function(){for(var a in{toString:1})if(a==="toString")return!1;return!0}(),i=function(a,l,c){for(var d in l)d in a.prototype&&typeof a.prototype[d]=="function"&&(l[d]+"").indexOf("callSuper")>-1?a.prototype[d]=function(u){return function(){var m=this.constructor.superclass;this.constructor.superclass=c;var f=l[u].apply(this,arguments);if(this.constructor.superclass=m,u!=="initialize")return f}}(d):a.prototype[d]=l[d],n&&(l.toString!==Object.prototype.toString&&(a.prototype.toString=l.toString),l.valueOf!==Object.prototype.valueOf&&(a.prototype.valueOf=l.valueOf))};function r(){}function s(a){for(var l=null,c=this;c.constructor.superclass;){var d=c.constructor.superclass.prototype[a];if(c[a]!==d){l=d;break}c=c.constructor.superclass.prototype}return l?arguments.length>1?l.apply(this,t.call(arguments,1)):l.call(this):console.log("tried to callSuper "+a+", method not found in prototype chain",this)}function o(){var a=null,l=t.call(arguments,0);typeof l[0]=="function"&&(a=l.shift());function c(){this.initialize.apply(this,arguments)}c.superclass=a,c.subclasses=[],a&&(r.prototype=a.prototype,c.prototype=new r,a.subclasses.push(c));for(var d=0,u=l.length;d<u;d++)i(c,l[d],a);return c.prototype.initialize||(c.prototype.initialize=e),c.prototype.constructor=c,c.prototype.callSuper=s,c}be.util.createClass=o})();(function(){var t=!!be.document.createElement("div").attachEvent,e=["touchstart","touchmove","touchend"];be.util.addListener=function(i,r,s,o){i&&i.addEventListener(r,s,t?!1:o)},be.util.removeListener=function(i,r,s,o){i&&i.removeEventListener(r,s,t?!1:o)};function n(i){var r=i.changedTouches;return r&&r[0]?r[0]:i}be.util.getPointer=function(i){var r=i.target,s=be.util.getScrollLeftTop(r),o=n(i);return{x:o.clientX+s.left,y:o.clientY+s.top}},be.util.isTouchEvent=function(i){return e.indexOf(i.type)>-1||i.pointerType==="touch"}})();(function(){function t(o,a){var l=o.style;if(!l)return o;if(typeof a=="string")return o.style.cssText+=";"+a,a.indexOf("opacity")>-1?s(o,a.match(/opacity:\s*(\d?\.?\d*)/)[1]):o;for(var c in a)if(c==="opacity")s(o,a[c]);else{var d=c==="float"||c==="cssFloat"?typeof l.styleFloat>"u"?"cssFloat":"styleFloat":c;l.setProperty(d,a[c])}return o}var e=be.document.createElement("div"),n=typeof e.style.opacity=="string",i=typeof e.style.filter=="string",r=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,s=function(o){return o};n?s=function(o,a){return o.style.opacity=a,o}:i&&(s=function(o,a){var l=o.style;return o.currentStyle&&!o.currentStyle.hasLayout&&(l.zoom=1),r.test(l.filter)?(a=a>=.9999?"":"alpha(opacity="+a*100+")",l.filter=l.filter.replace(r,a)):l.filter+=" alpha(opacity="+a*100+")",o}),be.util.setStyle=t})();(function(){var t=Array.prototype.slice;function e(f){return typeof f=="string"?be.document.getElementById(f):f}var n,i=function(f){return t.call(f,0)};try{n=i(be.document.childNodes)instanceof Array}catch{}n||(i=function(f){for(var _=new Array(f.length),x=f.length;x--;)_[x]=f[x];return _});function r(f,_){var x=be.document.createElement(f);for(var D in _)D==="class"?x.className=_[D]:D==="for"?x.htmlFor=_[D]:x.setAttribute(D,_[D]);return x}function s(f,_){f&&(" "+f.className+" ").indexOf(" "+_+" ")===-1&&(f.className+=(f.className?" ":"")+_)}function o(f,_,x){return typeof _=="string"&&(_=r(_,x)),f.parentNode&&f.parentNode.replaceChild(_,f),_.appendChild(f),_}function a(f){for(var _=0,x=0,D=be.document.documentElement,E=be.document.body||{scrollLeft:0,scrollTop:0};f&&(f.parentNode||f.host)&&(f=f.parentNode||f.host,f===be.document?(_=E.scrollLeft||D.scrollLeft||0,x=E.scrollTop||D.scrollTop||0):(_+=f.scrollLeft||0,x+=f.scrollTop||0),!(f.nodeType===1&&f.style.position==="fixed")););return{left:_,top:x}}function l(f){var _,x=f&&f.ownerDocument,D={left:0,top:0},E={left:0,top:0},M,I={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!x)return E;for(var z in I)E[I[z]]+=parseInt(c(f,z),10)||0;return _=x.documentElement,typeof f.getBoundingClientRect<"u"&&(D=f.getBoundingClientRect()),M=a(f),{left:D.left+M.left-(_.clientLeft||0)+E.left,top:D.top+M.top-(_.clientTop||0)+E.top}}var c;be.document.defaultView&&be.document.defaultView.getComputedStyle?c=function(f,_){var x=be.document.defaultView.getComputedStyle(f,null);return x?x[_]:void 0}:c=function(f,_){var x=f.style[_];return!x&&f.currentStyle&&(x=f.currentStyle[_]),x},function(){var f=be.document.documentElement.style,_="userSelect"in f?"userSelect":"MozUserSelect"in f?"MozUserSelect":"WebkitUserSelect"in f?"WebkitUserSelect":"KhtmlUserSelect"in f?"KhtmlUserSelect":"";function x(E){return typeof E.onselectstart<"u"&&(E.onselectstart=be.util.falseFunction),_?E.style[_]="none":typeof E.unselectable=="string"&&(E.unselectable="on"),E}function D(E){return typeof E.onselectstart<"u"&&(E.onselectstart=null),_?E.style[_]="":typeof E.unselectable=="string"&&(E.unselectable=""),E}be.util.makeElementUnselectable=x,be.util.makeElementSelectable=D}();function d(f){var _=be.jsdomImplForWrapper(f);return _._canvas||_._image}function u(f){if(be.isLikelyNode){var _=be.jsdomImplForWrapper(f);_&&(_._image=null,_._canvas=null,_._currentSrc=null,_._attributes=null,_._classList=null)}}function m(f,_){f.imageSmoothingEnabled=f.imageSmoothingEnabled||f.webkitImageSmoothingEnabled||f.mozImageSmoothingEnabled||f.msImageSmoothingEnabled||f.oImageSmoothingEnabled,f.imageSmoothingEnabled=_}be.util.setImageSmoothing=m,be.util.getById=e,be.util.toArray=i,be.util.addClass=s,be.util.makeElement=r,be.util.wrapElement=o,be.util.getScrollLeftTop=a,be.util.getElementOffset=l,be.util.getNodeCanvas=d,be.util.cleanUpJsdomNode=u})();(function(){function t(i,r){return i+(/\?/.test(i)?"&":"?")+r}function e(){}function n(i,r){r||(r={});var s=r.method?r.method.toUpperCase():"GET",o=r.onComplete||function(){},a=new be.window.XMLHttpRequest,l=r.body||r.parameters;return a.onreadystatechange=function(){a.readyState===4&&(o(a),a.onreadystatechange=e)},s==="GET"&&(l=null,typeof r.parameters=="string"&&(i=t(i,r.parameters))),a.open(s,i,!0),(s==="POST"||s==="PUT")&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.send(l),a}be.util.request=n})();be.log=console.log;be.warn=console.warn;(function(){var t=be.util.object.extend,e=be.util.object.clone,n=[];be.util.object.extend(n,{cancelAll:function(){var d=this.splice(0);return d.forEach(function(u){u.cancel()}),d},cancelByCanvas:function(d){if(!d)return[];var u=this.filter(function(m){return typeof m.target=="object"&&m.target.canvas===d});return u.forEach(function(m){m.cancel()}),u},cancelByTarget:function(d){var u=this.findAnimationsByTarget(d);return u.forEach(function(m){m.cancel()}),u},findAnimationIndex:function(d){return this.indexOf(this.findAnimation(d))},findAnimation:function(d){return this.find(function(u){return u.cancel===d})},findAnimationsByTarget:function(d){return d?this.filter(function(u){return u.target===d}):[]}});function i(){return!1}function r(d,u,m,f){return-m*Math.cos(d/f*(Math.PI/2))+m+u}function s(d){d||(d={});var u=!1,m,f=function(){var _=be.runningAnimations.indexOf(m);return _>-1&&be.runningAnimations.splice(_,1)[0]};return m=t(e(d),{cancel:function(){return u=!0,f()},currentValue:"startValue"in d?d.startValue:0,completionRate:0,durationRate:0}),be.runningAnimations.push(m),l(function(_){var x=_||+new Date,D=d.duration||500,E=x+D,M,I=d.onChange||i,z=d.abort||i,G=d.onComplete||i,A=d.easing||r,Y="startValue"in d?d.startValue.length>0:!1,X="startValue"in d?d.startValue:0,ne="endValue"in d?d.endValue:100,pe=d.byValue||(Y?X.map(function(ce,ie){return ne[ie]-X[ie]}):ne-X);d.onStart&&d.onStart(),function ce(ie){M=ie||+new Date;var le=M>E?D:M-x,Se=le/D,je=Y?X.map(function(Ge,Ae){return A(le,X[Ae],pe[Ae],D)}):A(le,X,pe,D),ze=Math.abs(Y?(je[0]-X[0])/pe[0]:(je-X)/pe);if(m.currentValue=Y?je.slice():je,m.completionRate=ze,m.durationRate=Se,!u){if(z(je,ze,Se)){f();return}if(M>E){m.currentValue=Y?ne.slice():ne,m.completionRate=1,m.durationRate=1,I(Y?ne.slice():ne,1,1),G(ne,1,1),f();return}else I(je,ze,Se),l(ce)}}(x)}),m.cancel}var o=be.window.requestAnimationFrame||be.window.webkitRequestAnimationFrame||be.window.mozRequestAnimationFrame||be.window.oRequestAnimationFrame||be.window.msRequestAnimationFrame||function(d){return be.window.setTimeout(d,1e3/60)},a=be.window.cancelAnimationFrame||be.window.clearTimeout;function l(){return o.apply(be.window,arguments)}function c(){return a.apply(be.window,arguments)}be.util.animate=s,be.util.requestAnimFrame=l,be.util.cancelAnimFrame=c,be.runningAnimations=n})();(function(){function t(n,i,r){var s="rgba("+parseInt(n[0]+r*(i[0]-n[0]),10)+","+parseInt(n[1]+r*(i[1]-n[1]),10)+","+parseInt(n[2]+r*(i[2]-n[2]),10);return s+=","+(n&&i?parseFloat(n[3]+r*(i[3]-n[3])):1),s+=")",s}function e(n,i,r,s){var o=new be.Color(n).getSource(),a=new be.Color(i).getSource(),l=s.onComplete,c=s.onChange;return s=s||{},be.util.animate(be.util.object.extend(s,{duration:r||500,startValue:o,endValue:a,byValue:a,easing:function(d,u,m,f){var _=s.colorEasing?s.colorEasing(d,f):1-Math.cos(d/f*(Math.PI/2));return t(u,m,_)},onComplete:function(d,u,m){if(l)return l(t(a,a,0),u,m)},onChange:function(d,u,m){if(c){if(Array.isArray(d))return c(t(d,d,0),u,m);c(d,u,m)}}}))}be.util.animateColor=e})();(function(){function t(ie,le,Se,je){return ie<Math.abs(le)?(ie=le,je=Se/4):le===0&&ie===0?je=Se/(2*Math.PI)*Math.asin(1):je=Se/(2*Math.PI)*Math.asin(le/ie),{a:ie,c:le,p:Se,s:je}}function e(ie,le,Se){return ie.a*Math.pow(2,10*(le-=1))*Math.sin((le*Se-ie.s)*(2*Math.PI)/ie.p)}function n(ie,le,Se,je){return Se*((ie=ie/je-1)*ie*ie+1)+le}function i(ie,le,Se,je){return ie/=je/2,ie<1?Se/2*ie*ie*ie+le:Se/2*((ie-=2)*ie*ie+2)+le}function r(ie,le,Se,je){return Se*(ie/=je)*ie*ie*ie+le}function s(ie,le,Se,je){return-Se*((ie=ie/je-1)*ie*ie*ie-1)+le}function o(ie,le,Se,je){return ie/=je/2,ie<1?Se/2*ie*ie*ie*ie+le:-Se/2*((ie-=2)*ie*ie*ie-2)+le}function a(ie,le,Se,je){return Se*(ie/=je)*ie*ie*ie*ie+le}function l(ie,le,Se,je){return Se*((ie=ie/je-1)*ie*ie*ie*ie+1)+le}function c(ie,le,Se,je){return ie/=je/2,ie<1?Se/2*ie*ie*ie*ie*ie+le:Se/2*((ie-=2)*ie*ie*ie*ie+2)+le}function d(ie,le,Se,je){return-Se*Math.cos(ie/je*(Math.PI/2))+Se+le}function u(ie,le,Se,je){return Se*Math.sin(ie/je*(Math.PI/2))+le}function m(ie,le,Se,je){return-Se/2*(Math.cos(Math.PI*ie/je)-1)+le}function f(ie,le,Se,je){return ie===0?le:Se*Math.pow(2,10*(ie/je-1))+le}function _(ie,le,Se,je){return ie===je?le+Se:Se*(-Math.pow(2,-10*ie/je)+1)+le}function x(ie,le,Se,je){return ie===0?le:ie===je?le+Se:(ie/=je/2,ie<1?Se/2*Math.pow(2,10*(ie-1))+le:Se/2*(-Math.pow(2,-10*--ie)+2)+le)}function D(ie,le,Se,je){return-Se*(Math.sqrt(1-(ie/=je)*ie)-1)+le}function E(ie,le,Se,je){return Se*Math.sqrt(1-(ie=ie/je-1)*ie)+le}function M(ie,le,Se,je){return ie/=je/2,ie<1?-Se/2*(Math.sqrt(1-ie*ie)-1)+le:Se/2*(Math.sqrt(1-(ie-=2)*ie)+1)+le}function I(ie,le,Se,je){var ze=1.70158,Ge=0,Ae=Se;if(ie===0)return le;if(ie/=je,ie===1)return le+Se;Ge||(Ge=je*.3);var Ye=t(Ae,Se,Ge,ze);return-e(Ye,ie,je)+le}function z(ie,le,Se,je){var ze=1.70158,Ge=0,Ae=Se;if(ie===0)return le;if(ie/=je,ie===1)return le+Se;Ge||(Ge=je*.3);var Ye=t(Ae,Se,Ge,ze);return Ye.a*Math.pow(2,-10*ie)*Math.sin((ie*je-Ye.s)*(2*Math.PI)/Ye.p)+Ye.c+le}function G(ie,le,Se,je){var ze=1.70158,Ge=0,Ae=Se;if(ie===0)return le;if(ie/=je/2,ie===2)return le+Se;Ge||(Ge=je*(.3*1.5));var Ye=t(Ae,Se,Ge,ze);return ie<1?-.5*e(Ye,ie,je)+le:Ye.a*Math.pow(2,-10*(ie-=1))*Math.sin((ie*je-Ye.s)*(2*Math.PI)/Ye.p)*.5+Ye.c+le}function A(ie,le,Se,je,ze){return ze===void 0&&(ze=1.70158),Se*(ie/=je)*ie*((ze+1)*ie-ze)+le}function Y(ie,le,Se,je,ze){return ze===void 0&&(ze=1.70158),Se*((ie=ie/je-1)*ie*((ze+1)*ie+ze)+1)+le}function X(ie,le,Se,je,ze){return ze===void 0&&(ze=1.70158),ie/=je/2,ie<1?Se/2*(ie*ie*(((ze*=1.525)+1)*ie-ze))+le:Se/2*((ie-=2)*ie*(((ze*=1.525)+1)*ie+ze)+2)+le}function ne(ie,le,Se,je){return Se-pe(je-ie,0,Se,je)+le}function pe(ie,le,Se,je){return(ie/=je)<1/2.75?Se*(7.5625*ie*ie)+le:ie<2/2.75?Se*(7.5625*(ie-=1.5/2.75)*ie+.75)+le:ie<2.5/2.75?Se*(7.5625*(ie-=2.25/2.75)*ie+.9375)+le:Se*(7.5625*(ie-=2.625/2.75)*ie+.984375)+le}function ce(ie,le,Se,je){return ie<je/2?ne(ie*2,0,Se,je)*.5+le:pe(ie*2-je,0,Se,je)*.5+Se*.5+le}be.util.ease={easeInQuad:function(ie,le,Se,je){return Se*(ie/=je)*ie+le},easeOutQuad:function(ie,le,Se,je){return-Se*(ie/=je)*(ie-2)+le},easeInOutQuad:function(ie,le,Se,je){return ie/=je/2,ie<1?Se/2*ie*ie+le:-Se/2*(--ie*(ie-2)-1)+le},easeInCubic:function(ie,le,Se,je){return Se*(ie/=je)*ie*ie+le},easeOutCubic:n,easeInOutCubic:i,easeInQuart:r,easeOutQuart:s,easeInOutQuart:o,easeInQuint:a,easeOutQuint:l,easeInOutQuint:c,easeInSine:d,easeOutSine:u,easeInOutSine:m,easeInExpo:f,easeOutExpo:_,easeInOutExpo:x,easeInCirc:D,easeOutCirc:E,easeInOutCirc:M,easeInElastic:I,easeOutElastic:z,easeInOutElastic:G,easeInBack:A,easeOutBack:Y,easeInOutBack:X,easeInBounce:ne,easeOutBounce:pe,easeInOutBounce:ce}})();(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.util.object.clone,r=e.util.toFixed,s=e.util.parseUnit,o=e.util.multiplyTransformMatrices,a=["path","circle","polygon","polyline","ellipse","rect","line","image","text"],l=["symbol","image","marker","pattern","view","svg"],c=["pattern","defs","symbol","metadata","clipPath","mask","desc"],d=["symbol","g","a","svg","clipPath","defs"],u={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},m={stroke:"strokeOpacity",fill:"fillOpacity"},f="font-size",_="clip-path";e.svgValidTagNamesRegEx=E(a),e.svgViewBoxElementsRegEx=E(l),e.svgInvalidAncestorsRegEx=E(c),e.svgValidParentsRegEx=E(d),e.cssRules={},e.gradientDefs={},e.clipPaths={};function x(Ge){return Ge in u?u[Ge]:Ge}function D(Ge,Ae,Ye,ft){var Ft=Array.isArray(Ae),Tt;if((Ge==="fill"||Ge==="stroke")&&Ae==="none")Ae="";else{if(Ge==="strokeUniform")return Ae==="non-scaling-stroke";if(Ge==="strokeDashArray")Ae==="none"?Ae=null:Ae=Ae.replace(/,/g," ").split(/\s+/).map(parseFloat);else if(Ge==="transformMatrix")Ye&&Ye.transformMatrix?Ae=o(Ye.transformMatrix,e.parseTransformAttribute(Ae)):Ae=e.parseTransformAttribute(Ae);else if(Ge==="visible")Ae=Ae!=="none"&&Ae!=="hidden",Ye&&Ye.visible===!1&&(Ae=!1);else if(Ge==="opacity")Ae=parseFloat(Ae),Ye&&typeof Ye.opacity<"u"&&(Ae*=Ye.opacity);else if(Ge==="textAnchor")Ae=Ae==="start"?"left":Ae==="end"?"right":"center";else if(Ge==="charSpacing")Tt=s(Ae,ft)/ft*1e3;else if(Ge==="paintFirst"){var at=Ae.indexOf("fill"),yt=Ae.indexOf("stroke"),Ae="fill";(at>-1&&yt>-1&&yt<at||at===-1&&yt>-1)&&(Ae="stroke")}else{if(Ge==="href"||Ge==="xlink:href"||Ge==="font")return Ae;if(Ge==="imageSmoothing")return Ae==="optimizeQuality";Tt=Ft?Ae.map(s):s(Ae,ft)}}return!Ft&&isNaN(Tt)?Ae:Tt}function E(Ge){return new RegExp("^("+Ge.join("|")+")\\b","i")}function M(Ge){for(var Ae in m)if(!(typeof Ge[m[Ae]]>"u"||Ge[Ae]==="")){if(typeof Ge[Ae]>"u"){if(!e.Object.prototype[Ae])continue;Ge[Ae]=e.Object.prototype[Ae]}if(Ge[Ae].indexOf("url(")!==0){var Ye=new e.Color(Ge[Ae]);Ge[Ae]=Ye.setAlpha(r(Ye.getAlpha()*Ge[m[Ae]],2)).toRgba()}}return Ge}function I(Ge,Ae){var Ye,ft=[],Ft,Tt,at;for(Tt=0,at=Ae.length;Tt<at;Tt++)Ye=Ae[Tt],Ft=Ge.getElementsByTagName(Ye),ft=ft.concat(Array.prototype.slice.call(Ft));return ft}e.parseTransformAttribute=function(){function Ge(bi,Mn){var Fn=e.util.cos(Mn[0]),or=e.util.sin(Mn[0]),wn=0,gn=0;Mn.length===3&&(wn=Mn[1],gn=Mn[2]),bi[0]=Fn,bi[1]=or,bi[2]=-or,bi[3]=Fn,bi[4]=wn-(Fn*wn-or*gn),bi[5]=gn-(or*wn+Fn*gn)}function Ae(bi,Mn){var Fn=Mn[0],or=Mn.length===2?Mn[1]:Mn[0];bi[0]=Fn,bi[3]=or}function Ye(bi,Mn,Fn){bi[Fn]=Math.tan(e.util.degreesToRadians(Mn[0]))}function ft(bi,Mn){bi[4]=Mn[0],Mn.length===2&&(bi[5]=Mn[1])}var Ft=e.iMatrix,Tt=e.reNum,at=e.commaWsp,yt="(?:(skewX)\\s*\\(\\s*("+Tt+")\\s*\\))",_t="(?:(skewY)\\s*\\(\\s*("+Tt+")\\s*\\))",Re="(?:(rotate)\\s*\\(\\s*("+Tt+")(?:"+at+"("+Tt+")"+at+"("+Tt+"))?\\s*\\))",ot="(?:(scale)\\s*\\(\\s*("+Tt+")(?:"+at+"("+Tt+"))?\\s*\\))",jt="(?:(translate)\\s*\\(\\s*("+Tt+")(?:"+at+"("+Tt+"))?\\s*\\))",zt="(?:(matrix)\\s*\\(\\s*("+Tt+")"+at+"("+Tt+")"+at+"("+Tt+")"+at+"("+Tt+")"+at+"("+Tt+")"+at+"("+Tt+")\\s*\\))",qt="(?:"+zt+"|"+jt+"|"+ot+"|"+Re+"|"+yt+"|"+_t+")",ui="(?:"+qt+"(?:"+at+"*"+qt+")*)",_i="^\\s*(?:"+ui+"?)\\s*$",ln=new RegExp(_i),Rn=new RegExp(qt,"g");return function(bi){var Mn=Ft.concat(),Fn=[];if(!bi||bi&&!ln.test(bi))return Mn;bi.replace(Rn,function(wn){var gn=new RegExp(qt).exec(wn).filter(function(Ho){return!!Ho}),ts=gn[1],no=gn.slice(2).map(parseFloat);switch(ts){case"translate":ft(Mn,no);break;case"rotate":no[0]=e.util.degreesToRadians(no[0]),Ge(Mn,no);break;case"scale":Ae(Mn,no);break;case"skewX":Ye(Mn,no,2);break;case"skewY":Ye(Mn,no,1);break;case"matrix":Mn=no;break}Fn.push(Mn.concat()),Mn=Ft.concat()});for(var or=Fn[0];Fn.length>1;)Fn.shift(),or=e.util.multiplyTransformMatrices(or,Fn[0]);return or}}();function z(Ge,Ae){var Ye,ft;Ge.replace(/;\s*$/,"").split(";").forEach(function(Ft){var Tt=Ft.split(":");Ye=Tt[0].trim().toLowerCase(),ft=Tt[1].trim(),Ae[Ye]=ft})}function G(Ge,Ae){var Ye,ft;for(var Ft in Ge)typeof Ge[Ft]>"u"||(Ye=Ft.toLowerCase(),ft=Ge[Ft],Ae[Ye]=ft)}function A(Ge,Ae){var Ye={};for(var ft in e.cssRules[Ae])if(Y(Ge,ft.split(" ")))for(var Ft in e.cssRules[Ae][ft])Ye[Ft]=e.cssRules[Ae][ft][Ft];return Ye}function Y(Ge,Ae){var Ye,ft=!0;return Ye=ne(Ge,Ae.pop()),Ye&&Ae.length&&(ft=X(Ge,Ae)),Ye&&ft&&Ae.length===0}function X(Ge,Ae){for(var Ye,ft=!0;Ge.parentNode&&Ge.parentNode.nodeType===1&&Ae.length;)ft&&(Ye=Ae.pop()),Ge=Ge.parentNode,ft=ne(Ge,Ye);return Ae.length===0}function ne(Ge,Ae){var Ye=Ge.nodeName,ft=Ge.getAttribute("class"),Ft=Ge.getAttribute("id"),Tt,at;if(Tt=new RegExp("^"+Ye,"i"),Ae=Ae.replace(Tt,""),Ft&&Ae.length&&(Tt=new RegExp("#"+Ft+"(?![a-zA-Z\\-]+)","i"),Ae=Ae.replace(Tt,"")),ft&&Ae.length)for(ft=ft.split(" "),at=ft.length;at--;)Tt=new RegExp("\\."+ft[at]+"(?![a-zA-Z\\-]+)","i"),Ae=Ae.replace(Tt,"");return Ae.length===0}function pe(Ge,Ae){var Ye;if(Ge.getElementById&&(Ye=Ge.getElementById(Ae)),Ye)return Ye;var ft,Ft,Tt,at=Ge.getElementsByTagName("*");for(Ft=0,Tt=at.length;Ft<Tt;Ft++)if(ft=at[Ft],Ae===ft.getAttribute("id"))return ft}function ce(Ge){for(var Ae=I(Ge,["use","svg:use"]),Ye=0;Ae.length&&Ye<Ae.length;){var ft=Ae[Ye],Ft=ft.getAttribute("xlink:href")||ft.getAttribute("href");if(Ft===null)return;var Tt=Ft.slice(1),at=ft.getAttribute("x")||0,yt=ft.getAttribute("y")||0,_t=pe(Ge,Tt).cloneNode(!0),Re=(_t.getAttribute("transform")||"")+" translate("+at+", "+yt+")",ot,jt=Ae.length,zt,qt,ui,_i,ln=e.svgNS;if(le(_t),/^svg$/i.test(_t.nodeName)){var Rn=_t.ownerDocument.createElementNS(ln,"g");for(qt=0,ui=_t.attributes,_i=ui.length;qt<_i;qt++)zt=ui.item(qt),Rn.setAttributeNS(ln,zt.nodeName,zt.nodeValue);for(;_t.firstChild;)Rn.appendChild(_t.firstChild);_t=Rn}for(qt=0,ui=ft.attributes,_i=ui.length;qt<_i;qt++)zt=ui.item(qt),!(zt.nodeName==="x"||zt.nodeName==="y"||zt.nodeName==="xlink:href"||zt.nodeName==="href")&&(zt.nodeName==="transform"?Re=zt.nodeValue+" "+Re:_t.setAttribute(zt.nodeName,zt.nodeValue));_t.setAttribute("transform",Re),_t.setAttribute("instantiated_by_use","1"),_t.removeAttribute("id"),ot=ft.parentNode,ot.replaceChild(_t,ft),Ae.length===jt&&Ye++}}var ie=new RegExp("^\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*$");function le(Ge){if(!e.svgViewBoxElementsRegEx.test(Ge.nodeName))return{};var Ae=Ge.getAttribute("viewBox"),Ye=1,ft=1,Ft=0,Tt=0,at,yt,_t,Re,ot=Ge.getAttribute("width"),jt=Ge.getAttribute("height"),zt=Ge.getAttribute("x")||0,qt=Ge.getAttribute("y")||0,ui=Ge.getAttribute("preserveAspectRatio")||"",_i=!Ae||!(Ae=Ae.match(ie)),ln=!ot||!jt||ot==="100%"||jt==="100%",Rn=_i&&ln,bi={},Mn="",Fn=0,or=0;if(bi.width=0,bi.height=0,bi.toBeParsed=Rn,_i&&(zt||qt)&&Ge.parentNode&&Ge.parentNode.nodeName!=="#document"&&(Mn=" translate("+s(zt)+" "+s(qt)+") ",_t=(Ge.getAttribute("transform")||"")+Mn,Ge.setAttribute("transform",_t),Ge.removeAttribute("x"),Ge.removeAttribute("y")),Rn)return bi;if(_i)return bi.width=s(ot),bi.height=s(jt),bi;if(Ft=-parseFloat(Ae[1]),Tt=-parseFloat(Ae[2]),at=parseFloat(Ae[3]),yt=parseFloat(Ae[4]),bi.minX=Ft,bi.minY=Tt,bi.viewBoxWidth=at,bi.viewBoxHeight=yt,ln?(bi.width=at,bi.height=yt):(bi.width=s(ot),bi.height=s(jt),Ye=bi.width/at,ft=bi.height/yt),ui=e.util.parsePreserveAspectRatioAttribute(ui),ui.alignX!=="none"&&(ui.meetOrSlice==="meet"&&(ft=Ye=Ye>ft?ft:Ye),ui.meetOrSlice==="slice"&&(ft=Ye=Ye>ft?Ye:ft),Fn=bi.width-at*Ye,or=bi.height-yt*Ye,ui.alignX==="Mid"&&(Fn/=2),ui.alignY==="Mid"&&(or/=2),ui.alignX==="Min"&&(Fn=0),ui.alignY==="Min"&&(or=0)),Ye===1&&ft===1&&Ft===0&&Tt===0&&zt===0&&qt===0)return bi;if((zt||qt)&&Ge.parentNode.nodeName!=="#document"&&(Mn=" translate("+s(zt)+" "+s(qt)+") "),_t=Mn+" matrix("+Ye+" 0 0 "+ft+" "+(Ft*Ye+Fn)+" "+(Tt*ft+or)+") ",Ge.nodeName==="svg"){for(Re=Ge.ownerDocument.createElementNS(e.svgNS,"g");Ge.firstChild;)Re.appendChild(Ge.firstChild);Ge.appendChild(Re)}else Re=Ge,Re.removeAttribute("x"),Re.removeAttribute("y"),_t=Re.getAttribute("transform")+_t;return Re.setAttribute("transform",_t),bi}function Se(Ge,Ae){for(;Ge&&(Ge=Ge.parentNode);)if(Ge.nodeName&&Ae.test(Ge.nodeName.replace("svg:",""))&&!Ge.getAttribute("instantiated_by_use"))return!0;return!1}e.parseSVGDocument=function(Ge,Ae,Ye,ft){if(Ge){ce(Ge);var Ft=e.Object.__uid++,Tt,at,yt=le(Ge),_t=e.util.toArray(Ge.getElementsByTagName("*"));if(yt.crossOrigin=ft&&ft.crossOrigin,yt.svgUid=Ft,_t.length===0&&e.isLikelyNode){_t=Ge.selectNodes('//*[name(.)!="svg"]');var Re=[];for(Tt=0,at=_t.length;Tt<at;Tt++)Re[Tt]=_t[Tt];_t=Re}var ot=_t.filter(function(zt){return le(zt),e.svgValidTagNamesRegEx.test(zt.nodeName.replace("svg:",""))&&!Se(zt,e.svgInvalidAncestorsRegEx)});if(!ot||ot&&!ot.length){Ae&&Ae([],{});return}var jt={};_t.filter(function(zt){return zt.nodeName.replace("svg:","")==="clipPath"}).forEach(function(zt){var qt=zt.getAttribute("id");jt[qt]=e.util.toArray(zt.getElementsByTagName("*")).filter(function(ui){return e.svgValidTagNamesRegEx.test(ui.nodeName.replace("svg:",""))})}),e.gradientDefs[Ft]=e.getGradientDefs(Ge),e.cssRules[Ft]=e.getCSSRules(Ge),e.clipPaths[Ft]=jt,e.parseElements(ot,function(zt,qt){Ae&&(Ae(zt,yt,qt,_t),delete e.gradientDefs[Ft],delete e.cssRules[Ft],delete e.clipPaths[Ft])},i(yt),Ye,ft)}};function je(Ge,Ae){var Ye=["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"],ft="xlink:href",Ft=Ae.getAttribute(ft).slice(1),Tt=pe(Ge,Ft);if(Tt&&Tt.getAttribute(ft)&&je(Ge,Tt),Ye.forEach(function(yt){Tt&&!Ae.hasAttribute(yt)&&Tt.hasAttribute(yt)&&Ae.setAttribute(yt,Tt.getAttribute(yt))}),!Ae.children.length)for(var at=Tt.cloneNode(!0);at.firstChild;)Ae.appendChild(at.firstChild);Ae.removeAttribute(ft)}var ze=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+e.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+e.reNum+"))?\\s+(.*)");n(e,{parseFontDeclaration:function(Ge,Ae){var Ye=Ge.match(ze);if(Ye){var ft=Ye[1],Ft=Ye[3],Tt=Ye[4],at=Ye[5],yt=Ye[6];ft&&(Ae.fontStyle=ft),Ft&&(Ae.fontWeight=isNaN(parseFloat(Ft))?Ft:parseFloat(Ft)),Tt&&(Ae.fontSize=s(Tt)),yt&&(Ae.fontFamily=yt),at&&(Ae.lineHeight=at==="normal"?1:at)}},getGradientDefs:function(Ge){var Ae=["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"],Ye=I(Ge,Ae),ft,Ft=0,Tt={};for(Ft=Ye.length;Ft--;)ft=Ye[Ft],ft.getAttribute("xlink:href")&&je(Ge,ft),Tt[ft.getAttribute("id")]=ft;return Tt},parseAttributes:function(Ge,Ae,Ye){if(Ge){var ft,Ft={},Tt,at;typeof Ye>"u"&&(Ye=Ge.getAttribute("svgUid")),Ge.parentNode&&e.svgValidParentsRegEx.test(Ge.parentNode.nodeName)&&(Ft=e.parseAttributes(Ge.parentNode,Ae,Ye));var yt=Ae.reduce(function(ui,_i){return ft=Ge.getAttribute(_i),ft&&(ui[_i]=ft),ui},{}),_t=n(A(Ge,Ye),e.parseStyleAttribute(Ge));yt=n(yt,_t),_t[_]&&Ge.setAttribute(_,_t[_]),Tt=at=Ft.fontSize||e.Text.DEFAULT_SVG_FONT_SIZE,yt[f]&&(yt[f]=Tt=s(yt[f],at));var Re,ot,jt={};for(var zt in yt)Re=x(zt),ot=D(Re,yt[zt],Ft,Tt),jt[Re]=ot;jt&&jt.font&&e.parseFontDeclaration(jt.font,jt);var qt=n(Ft,jt);return e.svgValidParentsRegEx.test(Ge.nodeName)?qt:M(qt)}},parseElements:function(Ge,Ae,Ye,ft,Ft){new e.ElementsParser(Ge,Ae,Ye,ft,Ft).parse()},parseStyleAttribute:function(Ge){var Ae={},Ye=Ge.getAttribute("style");return Ye&&(typeof Ye=="string"?z(Ye,Ae):G(Ye,Ae)),Ae},parsePointsAttribute:function(Ge){if(!Ge)return null;Ge=Ge.replace(/,/g," ").trim(),Ge=Ge.split(/\s+/);var Ae=[],Ye,ft;for(Ye=0,ft=Ge.length;Ye<ft;Ye+=2)Ae.push({x:parseFloat(Ge[Ye]),y:parseFloat(Ge[Ye+1])});return Ae},getCSSRules:function(Ge){var Ae=Ge.getElementsByTagName("style"),Ye,ft,Ft={},Tt;for(Ye=0,ft=Ae.length;Ye<ft;Ye++){var at=Ae[Ye].textContent;at=at.replace(/\/\*[\s\S]*?\*\//g,""),at.trim()!==""&&(Tt=at.split("}"),Tt=Tt.filter(function(yt){return yt.trim()}),Tt.forEach(function(yt){var _t=yt.split("{"),Re={},ot=_t[1].trim(),jt=ot.split(";").filter(function(_i){return _i.trim()});for(Ye=0,ft=jt.length;Ye<ft;Ye++){var zt=jt[Ye].split(":"),qt=zt[0].trim(),ui=zt[1].trim();Re[qt]=ui}yt=_t[0].trim(),yt.split(",").forEach(function(_i){_i=_i.replace(/^svg/i,"").trim(),_i!==""&&(Ft[_i]?e.util.object.extend(Ft[_i],Re):Ft[_i]=e.util.object.clone(Re))})}))}return Ft},loadSVGFromURL:function(Ge,Ae,Ye,ft){Ge=Ge.replace(/^\n\s*/,"").trim(),new e.util.request(Ge,{method:"get",onComplete:Ft});function Ft(Tt){var at=Tt.responseXML;if(!at||!at.documentElement)return Ae&&Ae(null),!1;e.parseSVGDocument(at.documentElement,function(yt,_t,Re,ot){Ae&&Ae(yt,_t,Re,ot)},Ye,ft)}},loadSVGFromString:function(Ge,Ae,Ye,ft){var Ft=new e.window.DOMParser,Tt=Ft.parseFromString(Ge.trim(),"text/xml");e.parseSVGDocument(Tt.documentElement,function(at,yt,_t,Re){Ae(at,yt,_t,Re)},Ye,ft)}})})(vn);be.ElementsParser=function(t,e,n,i,r,s){this.elements=t,this.callback=e,this.options=n,this.reviver=i,this.svgUid=n&&n.svgUid||0,this.parsingOptions=r,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=s};(function(t){t.parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},t.createObjects=function(){var e=this;this.elements.forEach(function(n,i){n.setAttribute("svgUid",e.svgUid),e.createObject(n,i)})},t.findTag=function(e){return be[be.util.string.capitalize(e.tagName.replace("svg:",""))]},t.createObject=function(e,n){var i=this.findTag(e);if(i&&i.fromElement)try{i.fromElement(e,this.createCallback(n,e),this.options)}catch(r){be.log(r)}else this.checkIfDone()},t.createCallback=function(e,n){var i=this;return function(r){var s;i.resolveGradient(r,n,"fill"),i.resolveGradient(r,n,"stroke"),r instanceof be.Image&&r._originalElement&&(s=r.parsePreserveAspectRatioAttribute(n)),r._removeTransformMatrix(s),i.resolveClipPath(r,n),i.reviver&&i.reviver(n,r),i.instances[e]=r,i.checkIfDone()}},t.extractPropertyDefinition=function(e,n,i){var r=e[n],s=this.regexUrl;if(s.test(r)){s.lastIndex=0;var o=s.exec(r)[1];return s.lastIndex=0,be[i][this.svgUid][o]}},t.resolveGradient=function(e,n,i){var r=this.extractPropertyDefinition(e,i,"gradientDefs");if(r){var s=n.getAttribute(i+"-opacity"),o=be.Gradient.fromElement(r,e,s,this.options);e.set(i,o)}},t.createClipPathCallback=function(e,n){return function(i){i._removeTransformMatrix(),i.fillRule=i.clipRule,n.push(i)}},t.resolveClipPath=function(e,n){var i=this.extractPropertyDefinition(e,"clipPath","clipPaths"),r,s,o,a,l,c;if(i){a=[],o=be.util.invertTransform(e.calcTransformMatrix());for(var d=i[0].parentNode,u=n;u.parentNode&&u.getAttribute("clip-path")!==e.clipPath;)u=u.parentNode;u.parentNode.appendChild(d);for(var m=0;m<i.length;m++)r=i[m],s=this.findTag(r),s.fromElement(r,this.createClipPathCallback(e,a),this.options);a.length===1?i=a[0]:i=new be.Group(a),l=be.util.multiplyTransformMatrices(o,i.calcTransformMatrix()),i.clipPath&&this.resolveClipPath(i,u);var c=be.util.qrDecompose(l);i.flipX=!1,i.flipY=!1,i.set("scaleX",c.scaleX),i.set("scaleY",c.scaleY),i.angle=c.angle,i.skewX=c.skewX,i.skewY=0,i.setPositionByOrigin({x:c.translateX,y:c.translateY},"center","center"),e.clipPath=i}else delete e.clipPath},t.checkIfDone=function(){--this.numElements===0&&(this.instances=this.instances.filter(function(e){return e!=null}),this.callback(this.instances,this.elements))}})(be.ElementsParser.prototype);(function(t){"use strict";var e=t.fabric||(t.fabric={});if(e.Point){e.warn("fabric.Point is already defined");return}e.Point=n;function n(i,r){this.x=i,this.y=r}n.prototype={type:"point",constructor:n,add:function(i){return new n(this.x+i.x,this.y+i.y)},addEquals:function(i){return this.x+=i.x,this.y+=i.y,this},scalarAdd:function(i){return new n(this.x+i,this.y+i)},scalarAddEquals:function(i){return this.x+=i,this.y+=i,this},subtract:function(i){return new n(this.x-i.x,this.y-i.y)},subtractEquals:function(i){return this.x-=i.x,this.y-=i.y,this},scalarSubtract:function(i){return new n(this.x-i,this.y-i)},scalarSubtractEquals:function(i){return this.x-=i,this.y-=i,this},multiply:function(i){return new n(this.x*i,this.y*i)},multiplyEquals:function(i){return this.x*=i,this.y*=i,this},divide:function(i){return new n(this.x/i,this.y/i)},divideEquals:function(i){return this.x/=i,this.y/=i,this},eq:function(i){return this.x===i.x&&this.y===i.y},lt:function(i){return this.x<i.x&&this.y<i.y},lte:function(i){return this.x<=i.x&&this.y<=i.y},gt:function(i){return this.x>i.x&&this.y>i.y},gte:function(i){return this.x>=i.x&&this.y>=i.y},lerp:function(i,r){return typeof r>"u"&&(r=.5),r=Math.max(Math.min(1,r),0),new n(this.x+(i.x-this.x)*r,this.y+(i.y-this.y)*r)},distanceFrom:function(i){var r=this.x-i.x,s=this.y-i.y;return Math.sqrt(r*r+s*s)},midPointFrom:function(i){return this.lerp(i)},min:function(i){return new n(Math.min(this.x,i.x),Math.min(this.y,i.y))},max:function(i){return new n(Math.max(this.x,i.x),Math.max(this.y,i.y))},toString:function(){return this.x+","+this.y},setXY:function(i,r){return this.x=i,this.y=r,this},setX:function(i){return this.x=i,this},setY:function(i){return this.y=i,this},setFromPoint:function(i){return this.x=i.x,this.y=i.y,this},swap:function(i){var r=this.x,s=this.y;this.x=i.x,this.y=i.y,i.x=r,i.y=s},clone:function(){return new n(this.x,this.y)}}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={});if(e.Intersection){e.warn("fabric.Intersection is already defined");return}function n(i){this.status=i,this.points=[]}e.Intersection=n,e.Intersection.prototype={constructor:n,appendPoint:function(i){return this.points.push(i),this},appendPoints:function(i){return this.points=this.points.concat(i),this}},e.Intersection.intersectLineLine=function(i,r,s,o){var a,l=(o.x-s.x)*(i.y-s.y)-(o.y-s.y)*(i.x-s.x),c=(r.x-i.x)*(i.y-s.y)-(r.y-i.y)*(i.x-s.x),d=(o.y-s.y)*(r.x-i.x)-(o.x-s.x)*(r.y-i.y);if(d!==0){var u=l/d,m=c/d;0<=u&&u<=1&&0<=m&&m<=1?(a=new n("Intersection"),a.appendPoint(new e.Point(i.x+u*(r.x-i.x),i.y+u*(r.y-i.y)))):a=new n}else l===0||c===0?a=new n("Coincident"):a=new n("Parallel");return a},e.Intersection.intersectLinePolygon=function(i,r,s){var o=new n,a=s.length,l,c,d,u;for(u=0;u<a;u++)l=s[u],c=s[(u+1)%a],d=n.intersectLineLine(i,r,l,c),o.appendPoints(d.points);return o.points.length>0&&(o.status="Intersection"),o},e.Intersection.intersectPolygonPolygon=function(i,r){var s=new n,o=i.length,a;for(a=0;a<o;a++){var l=i[a],c=i[(a+1)%o],d=n.intersectLinePolygon(l,c,r);s.appendPoints(d.points)}return s.points.length>0&&(s.status="Intersection"),s},e.Intersection.intersectPolygonRectangle=function(i,r,s){var o=r.min(s),a=r.max(s),l=new e.Point(a.x,o.y),c=new e.Point(o.x,a.y),d=n.intersectLinePolygon(o,l,i),u=n.intersectLinePolygon(l,a,i),m=n.intersectLinePolygon(a,c,i),f=n.intersectLinePolygon(c,o,i),_=new n;return _.appendPoints(d.points),_.appendPoints(u.points),_.appendPoints(m.points),_.appendPoints(f.points),_.points.length>0&&(_.status="Intersection"),_}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={});if(e.Color){e.warn("fabric.Color is already defined.");return}function n(r){r?this._tryParsingColor(r):this.setSource([0,0,0,1])}e.Color=n,e.Color.prototype={_tryParsingColor:function(r){var s;r in n.colorNameMap&&(r=n.colorNameMap[r]),r==="transparent"&&(s=[255,255,255,0]),s||(s=n.sourceFromHex(r)),s||(s=n.sourceFromRgb(r)),s||(s=n.sourceFromHsl(r)),s||(s=[0,0,0,1]),s&&this.setSource(s)},_rgbToHsl:function(r,s,o){r/=255,s/=255,o/=255;var a,l,c,d=e.util.array.max([r,s,o]),u=e.util.array.min([r,s,o]);if(c=(d+u)/2,d===u)a=l=0;else{var m=d-u;switch(l=c>.5?m/(2-d-u):m/(d+u),d){case r:a=(s-o)/m+(s<o?6:0);break;case s:a=(o-r)/m+2;break;case o:a=(r-s)/m+4;break}a/=6}return[Math.round(a*360),Math.round(l*100),Math.round(c*100)]},getSource:function(){return this._source},setSource:function(r){this._source=r},toRgb:function(){var r=this.getSource();return"rgb("+r[0]+","+r[1]+","+r[2]+")"},toRgba:function(){var r=this.getSource();return"rgba("+r[0]+","+r[1]+","+r[2]+","+r[3]+")"},toHsl:function(){var r=this.getSource(),s=this._rgbToHsl(r[0],r[1],r[2]);return"hsl("+s[0]+","+s[1]+"%,"+s[2]+"%)"},toHsla:function(){var r=this.getSource(),s=this._rgbToHsl(r[0],r[1],r[2]);return"hsla("+s[0]+","+s[1]+"%,"+s[2]+"%,"+r[3]+")"},toHex:function(){var r=this.getSource(),s,o,a;return s=r[0].toString(16),s=s.length===1?"0"+s:s,o=r[1].toString(16),o=o.length===1?"0"+o:o,a=r[2].toString(16),a=a.length===1?"0"+a:a,s.toUpperCase()+o.toUpperCase()+a.toUpperCase()},toHexa:function(){var r=this.getSource(),s;return s=Math.round(r[3]*255),s=s.toString(16),s=s.length===1?"0"+s:s,this.toHex()+s.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(r){var s=this.getSource();return s[3]=r,this.setSource(s),this},toGrayscale:function(){var r=this.getSource(),s=parseInt((r[0]*.3+r[1]*.59+r[2]*.11).toFixed(0),10),o=r[3];return this.setSource([s,s,s,o]),this},toBlackWhite:function(r){var s=this.getSource(),o=(s[0]*.3+s[1]*.59+s[2]*.11).toFixed(0),a=s[3];return r=r||127,o=Number(o)<Number(r)?0:255,this.setSource([o,o,o,a]),this},overlayWith:function(r){r instanceof n||(r=new n(r));var s=[],o=this.getAlpha(),a=.5,l=this.getSource(),c=r.getSource(),d;for(d=0;d<3;d++)s.push(Math.round(l[d]*(1-a)+c[d]*a));return s[3]=o,this.setSource(s),this}},e.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,e.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,e.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,e.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function i(r,s,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?r+(s-r)*6*o:o<1/2?s:o<2/3?r+(s-r)*(2/3-o)*6:r}e.Color.fromRgb=function(r){return n.fromSource(n.sourceFromRgb(r))},e.Color.sourceFromRgb=function(r){var s=r.match(n.reRGBa);if(s){var o=parseInt(s[1],10)/(/%$/.test(s[1])?100:1)*(/%$/.test(s[1])?255:1),a=parseInt(s[2],10)/(/%$/.test(s[2])?100:1)*(/%$/.test(s[2])?255:1),l=parseInt(s[3],10)/(/%$/.test(s[3])?100:1)*(/%$/.test(s[3])?255:1);return[parseInt(o,10),parseInt(a,10),parseInt(l,10),s[4]?parseFloat(s[4]):1]}},e.Color.fromRgba=n.fromRgb,e.Color.fromHsl=function(r){return n.fromSource(n.sourceFromHsl(r))},e.Color.sourceFromHsl=function(r){var s=r.match(n.reHSLa);if(s){var o=(parseFloat(s[1])%360+360)%360/360,a=parseFloat(s[2])/(/%$/.test(s[2])?100:1),l=parseFloat(s[3])/(/%$/.test(s[3])?100:1),c,d,u;if(a===0)c=d=u=l;else{var m=l<=.5?l*(a+1):l+a-l*a,f=l*2-m;c=i(f,m,o+1/3),d=i(f,m,o),u=i(f,m,o-1/3)}return[Math.round(c*255),Math.round(d*255),Math.round(u*255),s[4]?parseFloat(s[4]):1]}},e.Color.fromHsla=n.fromHsl,e.Color.fromHex=function(r){return n.fromSource(n.sourceFromHex(r))},e.Color.sourceFromHex=function(r){if(r.match(n.reHex)){var s=r.slice(r.indexOf("#")+1),o=s.length===3||s.length===4,a=s.length===8||s.length===4,l=o?s.charAt(0)+s.charAt(0):s.substring(0,2),c=o?s.charAt(1)+s.charAt(1):s.substring(2,4),d=o?s.charAt(2)+s.charAt(2):s.substring(4,6),u=a?o?s.charAt(3)+s.charAt(3):s.substring(6,8):"FF";return[parseInt(l,16),parseInt(c,16),parseInt(d,16),parseFloat((parseInt(u,16)/255).toFixed(2))]}},e.Color.fromSource=function(r){var s=new n;return s.setSource(r),s}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=["e","se","s","sw","w","nw","n","ne","e"],i=["ns","nesw","ew","nwse"],r={},s="left",o="top",a="right",l="bottom",c="center",d={top:l,bottom:o,left:a,right:s,center:c},u=e.util.radiansToDegrees,m=Math.sign||function(Re){return(Re>0)-(Re<0)||+Re};function f(Re,ot){var jt=Re.angle+u(Math.atan2(ot.y,ot.x))+360;return Math.round(jt%360/45)}function _(Re,ot){var jt=ot.transform.target,zt=jt.canvas,qt=e.util.object.clone(ot);qt.target=jt,zt&&zt.fire("object:"+Re,qt),jt.fire(Re,ot)}function x(Re,ot){var jt=ot.canvas,zt=jt.uniScaleKey,qt=Re[zt];return jt.uniformScaling&&!qt||!jt.uniformScaling&&qt}function D(Re){return Re.originX===c&&Re.originY===c}function E(Re,ot,jt){var zt=Re.lockScalingX,qt=Re.lockScalingY;return!!(zt&&qt||!ot&&(zt||qt)&&jt||zt&&ot==="x"||qt&&ot==="y")}function M(Re,ot,jt){var zt="not-allowed",qt=x(Re,jt),ui="";if(ot.x!==0&&ot.y===0?ui="x":ot.x===0&&ot.y!==0&&(ui="y"),E(jt,ui,qt))return zt;var _i=f(jt,ot);return n[_i]+"-resize"}function I(Re,ot,jt){var zt="not-allowed";if(ot.x!==0&&jt.lockSkewingY||ot.y!==0&&jt.lockSkewingX)return zt;var qt=f(jt,ot)%4;return i[qt]+"-resize"}function z(Re,ot,jt){return Re[jt.canvas.altActionKey]?r.skewCursorStyleHandler(Re,ot,jt):r.scaleCursorStyleHandler(Re,ot,jt)}function G(Re,ot,jt){var zt=Re[jt.canvas.altActionKey];if(ot.x===0)return zt?"skewX":"scaleY";if(ot.y===0)return zt?"skewY":"scaleX"}function A(Re,ot,jt){return jt.lockRotation?"not-allowed":ot.cursorStyle}function Y(Re,ot,jt,zt){return{e:Re,transform:ot,pointer:{x:jt,y:zt}}}function X(Re){return function(ot,jt,zt,qt){var ui=jt.target,_i=ui.getCenterPoint(),ln=ui.translateToOriginPoint(_i,jt.originX,jt.originY),Rn=Re(ot,jt,zt,qt);return ui.setPositionByOrigin(ln,jt.originX,jt.originY),Rn}}function ne(Re,ot){return function(jt,zt,qt,ui){var _i=ot(jt,zt,qt,ui);return _i&&_(Re,Y(jt,zt,qt,ui)),_i}}function pe(Re,ot,jt,zt,qt){var ui=Re.target,_i=ui.controls[Re.corner],ln=ui.canvas.getZoom(),Rn=ui.padding/ln,bi=ui.toLocalPoint(new e.Point(zt,qt),ot,jt);return bi.x>=Rn&&(bi.x-=Rn),bi.x<=-Rn&&(bi.x+=Rn),bi.y>=Rn&&(bi.y-=Rn),bi.y<=Rn&&(bi.y+=Rn),bi.x-=_i.offsetX,bi.y-=_i.offsetY,bi}function ce(Re){return Re.flipX!==Re.flipY}function ie(Re,ot,jt,zt,qt){if(Re[ot]!==0){var ui=Re._getTransformedDimensions()[zt],_i=qt/ui*Re[jt];Re.set(jt,_i)}}function le(Re,ot,jt,zt){var qt=ot.target,ui=qt._getTransformedDimensions(0,qt.skewY),_i=pe(ot,ot.originX,ot.originY,jt,zt),ln=Math.abs(_i.x*2)-ui.x,Rn=qt.skewX,bi;ln<2?bi=0:(bi=u(Math.atan2(ln/qt.scaleX,ui.y/qt.scaleY)),ot.originX===s&&ot.originY===l&&(bi=-bi),ot.originX===a&&ot.originY===o&&(bi=-bi),ce(qt)&&(bi=-bi));var Mn=Rn!==bi;if(Mn){var Fn=qt._getTransformedDimensions().y;qt.set("skewX",bi),ie(qt,"skewY","scaleY","y",Fn)}return Mn}function Se(Re,ot,jt,zt){var qt=ot.target,ui=qt._getTransformedDimensions(qt.skewX,0),_i=pe(ot,ot.originX,ot.originY,jt,zt),ln=Math.abs(_i.y*2)-ui.y,Rn=qt.skewY,bi;ln<2?bi=0:(bi=u(Math.atan2(ln/qt.scaleY,ui.x/qt.scaleX)),ot.originX===s&&ot.originY===l&&(bi=-bi),ot.originX===a&&ot.originY===o&&(bi=-bi),ce(qt)&&(bi=-bi));var Mn=Rn!==bi;if(Mn){var Fn=qt._getTransformedDimensions().x;qt.set("skewY",bi),ie(qt,"skewX","scaleX","x",Fn)}return Mn}function je(Re,ot,jt,zt){var qt=ot.target,ui=qt.skewX,_i,ln=ot.originY;if(qt.lockSkewingX)return!1;if(ui===0){var Rn=pe(ot,c,c,jt,zt);Rn.x>0?_i=s:_i=a}else ui>0&&(_i=ln===o?s:a),ui<0&&(_i=ln===o?a:s),ce(qt)&&(_i=_i===s?a:s);ot.originX=_i;var bi=ne("skewing",X(le));return bi(Re,ot,jt,zt)}function ze(Re,ot,jt,zt){var qt=ot.target,ui=qt.skewY,_i,ln=ot.originX;if(qt.lockSkewingY)return!1;if(ui===0){var Rn=pe(ot,c,c,jt,zt);Rn.y>0?_i=o:_i=l}else ui>0&&(_i=ln===s?o:l),ui<0&&(_i=ln===s?l:o),ce(qt)&&(_i=_i===o?l:o);ot.originY=_i;var bi=ne("skewing",X(Se));return bi(Re,ot,jt,zt)}function Ge(Re,ot,jt,zt){var qt=ot,ui=qt.target,_i=ui.translateToOriginPoint(ui.getCenterPoint(),qt.originX,qt.originY);if(ui.lockRotation)return!1;var ln=Math.atan2(qt.ey-_i.y,qt.ex-_i.x),Rn=Math.atan2(zt-_i.y,jt-_i.x),bi=u(Rn-ln+qt.theta),Mn=!0;if(ui.snapAngle>0){var Fn=ui.snapAngle,or=ui.snapThreshold||Fn,wn=Math.ceil(bi/Fn)*Fn,gn=Math.floor(bi/Fn)*Fn;Math.abs(bi-gn)<or?bi=gn:Math.abs(bi-wn)<or&&(bi=wn)}return bi<0&&(bi=360+bi),bi%=360,Mn=ui.angle!==bi,ui.angle=bi,Mn}function Ae(Re,ot,jt,zt,qt){qt=qt||{};var ui=ot.target,_i=ui.lockScalingX,ln=ui.lockScalingY,Rn=qt.by,bi,Mn,Fn,or,wn=x(Re,ui),gn=E(ui,Rn,wn),ts,no,Ho=ot.gestureScale;if(gn)return!1;if(Ho)Mn=ot.scaleX*Ho,Fn=ot.scaleY*Ho;else{if(bi=pe(ot,ot.originX,ot.originY,jt,zt),ts=Rn!=="y"?m(bi.x):1,no=Rn!=="x"?m(bi.y):1,ot.signX||(ot.signX=ts),ot.signY||(ot.signY=no),ui.lockScalingFlip&&(ot.signX!==ts||ot.signY!==no))return!1;if(or=ui._getTransformedDimensions(),wn&&!Rn){var kn=Math.abs(bi.x)+Math.abs(bi.y),Ts=ot.original,ea=Math.abs(or.x*Ts.scaleX/ui.scaleX)+Math.abs(or.y*Ts.scaleY/ui.scaleY),co=kn/ea;Mn=Ts.scaleX*co,Fn=Ts.scaleY*co}else Mn=Math.abs(bi.x*ui.scaleX/or.x),Fn=Math.abs(bi.y*ui.scaleY/or.y);D(ot)&&(Mn*=2,Fn*=2),ot.signX!==ts&&Rn!=="y"&&(ot.originX=d[ot.originX],Mn*=-1,ot.signX=ts),ot.signY!==no&&Rn!=="x"&&(ot.originY=d[ot.originY],Fn*=-1,ot.signY=no)}var Zn=ui.scaleX,gl=ui.scaleY;return Rn?(Rn==="x"&&ui.set("scaleX",Mn),Rn==="y"&&ui.set("scaleY",Fn)):(!_i&&ui.set("scaleX",Mn),!ln&&ui.set("scaleY",Fn)),Zn!==ui.scaleX||gl!==ui.scaleY}function Ye(Re,ot,jt,zt){return Ae(Re,ot,jt,zt)}function ft(Re,ot,jt,zt){return Ae(Re,ot,jt,zt,{by:"x"})}function Ft(Re,ot,jt,zt){return Ae(Re,ot,jt,zt,{by:"y"})}function Tt(Re,ot,jt,zt){return Re[ot.target.canvas.altActionKey]?r.skewHandlerX(Re,ot,jt,zt):r.scalingY(Re,ot,jt,zt)}function at(Re,ot,jt,zt){return Re[ot.target.canvas.altActionKey]?r.skewHandlerY(Re,ot,jt,zt):r.scalingX(Re,ot,jt,zt)}function yt(Re,ot,jt,zt){var qt=ot.target,ui=pe(ot,ot.originX,ot.originY,jt,zt),_i=qt.strokeWidth/(qt.strokeUniform?qt.scaleX:1),ln=D(ot)?2:1,Rn=qt.width,bi=Math.abs(ui.x*ln/qt.scaleX)-_i;return qt.set("width",Math.max(bi,0)),Rn!==bi}function _t(Re,ot,jt,zt){var qt=ot.target,ui=jt-ot.offsetX,_i=zt-ot.offsetY,ln=!qt.get("lockMovementX")&&qt.left!==ui,Rn=!qt.get("lockMovementY")&&qt.top!==_i;return ln&&qt.set("left",ui),Rn&&qt.set("top",_i),(ln||Rn)&&_("moving",Y(Re,ot,jt,zt)),ln||Rn}r.scaleCursorStyleHandler=M,r.skewCursorStyleHandler=I,r.scaleSkewCursorStyleHandler=z,r.rotationWithSnapping=ne("rotating",X(Ge)),r.scalingEqually=ne("scaling",X(Ye)),r.scalingX=ne("scaling",X(ft)),r.scalingY=ne("scaling",X(Ft)),r.scalingYOrSkewingX=Tt,r.scalingXOrSkewingY=at,r.changeWidth=ne("resizing",X(yt)),r.skewHandlerX=je,r.skewHandlerY=ze,r.dragHandler=_t,r.scaleOrSkewActionName=G,r.rotationStyleHandler=A,r.fireEvent=_,r.wrapWithFixedAnchor=X,r.wrapWithFireEvent=ne,r.getLocalPoint=pe,e.controlsUtils=r})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.degreesToRadians,i=e.controlsUtils;function r(o,a,l,c,d){c=c||{};var u=this.sizeX||c.cornerSize||d.cornerSize,m=this.sizeY||c.cornerSize||d.cornerSize,f=typeof c.transparentCorners<"u"?c.transparentCorners:d.transparentCorners,_=f?"stroke":"fill",x=!f&&(c.cornerStrokeColor||d.cornerStrokeColor),D=a,E=l,M;o.save(),o.fillStyle=c.cornerColor||d.cornerColor,o.strokeStyle=c.cornerStrokeColor||d.cornerStrokeColor,u>m?(M=u,o.scale(1,m/u),E=l*u/m):m>u?(M=m,o.scale(u/m,1),D=a*m/u):M=u,o.lineWidth=1,o.beginPath(),o.arc(D,E,M/2,0,2*Math.PI,!1),o[_](),x&&o.stroke(),o.restore()}function s(o,a,l,c,d){c=c||{};var u=this.sizeX||c.cornerSize||d.cornerSize,m=this.sizeY||c.cornerSize||d.cornerSize,f=typeof c.transparentCorners<"u"?c.transparentCorners:d.transparentCorners,_=f?"stroke":"fill",x=!f&&(c.cornerStrokeColor||d.cornerStrokeColor),D=u/2,E=m/2;o.save(),o.fillStyle=c.cornerColor||d.cornerColor,o.strokeStyle=c.cornerStrokeColor||d.cornerStrokeColor,o.lineWidth=1,o.translate(a,l),o.rotate(n(d.angle)),o[_+"Rect"](-D,-E,u,m),x&&o.strokeRect(-D,-E,u,m),o.restore()}i.renderCircleControl=r,i.renderSquareControl=s})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={});function n(i){for(var r in i)this[r]=i[r]}e.Control=n,e.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,sizeX:null,sizeY:null,touchSizeX:null,touchSizeY:null,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(i,r){return r.cursorStyle},getActionName:function(i,r){return r.actionName},getVisibility:function(i,r){var s=i._controlsVisibility;return s&&typeof s[r]<"u"?s[r]:this.visible},setVisibility:function(i){this.visible=i},positionHandler:function(i,r){var s=e.util.transformPoint({x:this.x*i.x+this.offsetX,y:this.y*i.y+this.offsetY},r);return s},calcCornerCoords:function(i,r,s,o,a){var l,c,d,u,m=a?this.touchSizeX:this.sizeX,f=a?this.touchSizeY:this.sizeY;if(m&&f&&m!==f){var _=Math.atan2(f,m),x=Math.sqrt(m*m+f*f)/2,D=_-e.util.degreesToRadians(i),E=Math.PI/2-_-e.util.degreesToRadians(i);l=x*e.util.cos(D),c=x*e.util.sin(D),d=x*e.util.cos(E),u=x*e.util.sin(E)}else{var M=m&&f?m:r;x=M*.7071067812;var D=e.util.degreesToRadians(45-i);l=d=x*e.util.cos(D),c=u=x*e.util.sin(D)}return{tl:{x:s-u,y:o-d},tr:{x:s+l,y:o-c},bl:{x:s-l,y:o+c},br:{x:s+u,y:o+d}}},render:function(i,r,s,o,a){switch(o=o||{},o.cornerStyle||a.cornerStyle){case"circle":e.controlsUtils.renderCircleControl.call(this,i,r,s,o,a);break;default:e.controlsUtils.renderSquareControl.call(this,i,r,s,o,a)}}}})(vn);(function(){function t(s,o){var a=s.getAttribute("style"),l=s.getAttribute("offset")||0,c,d,u,m;if(l=parseFloat(l)/(/%$/.test(l)?100:1),l=l<0?0:l>1?1:l,a){var f=a.split(/\s*;\s*/);for(f[f.length-1]===""&&f.pop(),m=f.length;m--;){var _=f[m].split(/\s*:\s*/),x=_[0].trim(),D=_[1].trim();x==="stop-color"?c=D:x==="stop-opacity"&&(u=D)}}return c||(c=s.getAttribute("stop-color")||"rgb(0,0,0)"),u||(u=s.getAttribute("stop-opacity")),c=new be.Color(c),d=c.getAlpha(),u=isNaN(parseFloat(u))?1:parseFloat(u),u*=d*o,{offset:l,color:c.toRgb(),opacity:u}}function e(s){return{x1:s.getAttribute("x1")||0,y1:s.getAttribute("y1")||0,x2:s.getAttribute("x2")||"100%",y2:s.getAttribute("y2")||0}}function n(s){return{x1:s.getAttribute("fx")||s.getAttribute("cx")||"50%",y1:s.getAttribute("fy")||s.getAttribute("cy")||"50%",r1:0,x2:s.getAttribute("cx")||"50%",y2:s.getAttribute("cy")||"50%",r2:s.getAttribute("r")||"50%"}}var i=be.util.object.clone;be.Gradient=be.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(s){s||(s={}),s.coords||(s.coords={});var o,a=this;Object.keys(s).forEach(function(l){a[l]=s[l]}),this.id?this.id+="_"+be.Object.__uid++:this.id=be.Object.__uid++,o={x1:s.coords.x1||0,y1:s.coords.y1||0,x2:s.coords.x2||0,y2:s.coords.y2||0},this.type==="radial"&&(o.r1=s.coords.r1||0,o.r2=s.coords.r2||0),this.coords=o,this.colorStops=s.colorStops.slice()},addColorStop:function(s){for(var o in s){var a=new be.Color(s[o]);this.colorStops.push({offset:parseFloat(o),color:a.toRgb(),opacity:a.getAlpha()})}return this},toObject:function(s){var o={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return be.util.populateWithProperties(this,o,s),o},toSVG:function(s,d){var a=i(this.coords,!0),l,c,d=d||{},u,m,f=i(this.colorStops,!0),_=a.r1>a.r2,x=this.gradientTransform?this.gradientTransform.concat():be.iMatrix.concat(),D=-this.offsetX,E=-this.offsetY,M=!!d.additionalTransform,I=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox";if(f.sort(function(X,ne){return X.offset-ne.offset}),I==="objectBoundingBox"?(D/=s.width,E/=s.height):(D+=s.width/2,E+=s.height/2),s.type==="path"&&this.gradientUnits!=="percentage"&&(D-=s.pathOffset.x,E-=s.pathOffset.y),x[4]-=D,x[5]-=E,m='id="SVGID_'+this.id+'" gradientUnits="'+I+'"',m+=' gradientTransform="'+(M?d.additionalTransform+" ":"")+be.util.matrixToSVG(x)+'" ',this.type==="linear"?u=["<linearGradient ",m,' x1="',a.x1,'" y1="',a.y1,'" x2="',a.x2,'" y2="',a.y2,`">
`]:this.type==="radial"&&(u=["<radialGradient ",m,' cx="',_?a.x1:a.x2,'" cy="',_?a.y1:a.y2,'" r="',_?a.r1:a.r2,'" fx="',_?a.x2:a.x1,'" fy="',_?a.y2:a.y1,`">
`]),this.type==="radial"){if(_)for(f=f.concat(),f.reverse(),l=0,c=f.length;l<c;l++)f[l].offset=1-f[l].offset;var z=Math.min(a.r1,a.r2);if(z>0){var G=Math.max(a.r1,a.r2),A=z/G;for(l=0,c=f.length;l<c;l++)f[l].offset+=A*(1-f[l].offset)}}for(l=0,c=f.length;l<c;l++){var Y=f[l];u.push("<stop ",'offset="',Y.offset*100+"%",'" style="stop-color:',Y.color,typeof Y.opacity<"u"?";stop-opacity: "+Y.opacity:";",`"/>
`)}return u.push(this.type==="linear"?`</linearGradient>
`:`</radialGradient>
`),u.join("")},toLive:function(s){var o,a=be.util.object.clone(this.coords),l,c;if(this.type){for(this.type==="linear"?o=s.createLinearGradient(a.x1,a.y1,a.x2,a.y2):this.type==="radial"&&(o=s.createRadialGradient(a.x1,a.y1,a.r1,a.x2,a.y2,a.r2)),l=0,c=this.colorStops.length;l<c;l++){var d=this.colorStops[l].color,u=this.colorStops[l].opacity,m=this.colorStops[l].offset;typeof u<"u"&&(d=new be.Color(d).setAlpha(u).toRgba()),o.addColorStop(m,d)}return o}}}),be.util.object.extend(be.Gradient,{fromElement:function(s,o,a,l){var c=parseFloat(a)/(/%$/.test(a)?100:1);c=c<0?0:c>1?1:c,isNaN(c)&&(c=1);var d=s.getElementsByTagName("stop"),u,m=s.getAttribute("gradientUnits")==="userSpaceOnUse"?"pixels":"percentage",f=s.getAttribute("gradientTransform")||"",_=[],x,D,E=0,M=0,I;for(s.nodeName==="linearGradient"||s.nodeName==="LINEARGRADIENT"?(u="linear",x=e(s)):(u="radial",x=n(s)),D=d.length;D--;)_.push(t(d[D],c));I=be.parseTransformAttribute(f),r(o,x,l,m),m==="pixels"&&(E=-o.left,M=-o.top);var z=new be.Gradient({id:s.getAttribute("id"),type:u,coords:x,colorStops:_,gradientUnits:m,gradientTransform:I,offsetX:E,offsetY:M});return z}});function r(s,o,a,l){var c,d;Object.keys(o).forEach(function(u){c=o[u],c==="Infinity"?d=1:c==="-Infinity"?d=0:(d=parseFloat(o[u],10),typeof c=="string"&&/^(\d+\.\d+)%|(\d+)%$/.test(c)&&(d*=.01,l==="pixels"&&((u==="x1"||u==="x2"||u==="r2")&&(d*=a.viewBoxWidth||a.width),(u==="y1"||u==="y2")&&(d*=a.viewBoxHeight||a.height)))),o[u]=d})}})();(function(){"use strict";var t=be.util.toFixed;be.Pattern=be.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(e,n){if(e||(e={}),this.id=be.Object.__uid++,this.setOptions(e),!e.source||e.source&&typeof e.source!="string"){n&&n(this);return}else{var i=this;this.source=be.util.createImage(),be.util.loadImage(e.source,function(r,s){i.source=r,n&&n(i,s)},null,this.crossOrigin)}},toObject:function(e){var n=be.Object.NUM_FRACTION_DIGITS,i,r;return typeof this.source.src=="string"?i=this.source.src:typeof this.source=="object"&&this.source.toDataURL&&(i=this.source.toDataURL()),r={type:"pattern",source:i,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:t(this.offsetX,n),offsetY:t(this.offsetY,n),patternTransform:this.patternTransform?this.patternTransform.concat():null},be.util.populateWithProperties(this,r,e),r},toSVG:function(e){var n=typeof this.source=="function"?this.source():this.source,i=n.width/e.width,r=n.height/e.height,s=this.offsetX/e.width,o=this.offsetY/e.height,a="";return(this.repeat==="repeat-x"||this.repeat==="no-repeat")&&(r=1,o&&(r+=Math.abs(o))),(this.repeat==="repeat-y"||this.repeat==="no-repeat")&&(i=1,s&&(i+=Math.abs(s))),n.src?a=n.src:n.toDataURL&&(a=n.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+s+'" y="'+o+'" width="'+i+'" height="'+r+`">
<image x="0" y="0" width="`+n.width+'" height="'+n.height+'" xlink:href="'+a+`"></image>
</pattern>
`},setOptions:function(e){for(var n in e)this[n]=e[n]},toLive:function(e){var n=this.source;return!n||typeof n.src<"u"&&(!n.complete||n.naturalWidth===0||n.naturalHeight===0)?"":e.createPattern(n,this.repeat)}})})();(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.toFixed;if(e.Shadow){e.warn("fabric.Shadow is already defined.");return}e.Shadow=e.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1,initialize:function(i){typeof i=="string"&&(i=this._parseShadow(i));for(var r in i)this[r]=i[r];this.id=e.Object.__uid++},_parseShadow:function(i){var r=i.trim(),s=e.Shadow.reOffsetsAndBlur.exec(r)||[],o=r.replace(e.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)";return{color:o.trim(),offsetX:parseFloat(s[1],10)||0,offsetY:parseFloat(s[2],10)||0,blur:parseFloat(s[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(i){var r=40,s=40,o=e.Object.NUM_FRACTION_DIGITS,a=e.util.rotateVector({x:this.offsetX,y:this.offsetY},e.util.degreesToRadians(-i.angle)),l=20,c=new e.Color(this.color);return i.width&&i.height&&(r=n((Math.abs(a.x)+this.blur)/i.width,o)*100+l,s=n((Math.abs(a.y)+this.blur)/i.height,o)*100+l),i.flipX&&(a.x*=-1),i.flipY&&(a.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+s+'%" height="'+(100+2*s)+'%" x="-'+r+'%" width="'+(100+2*r)+`%" >
	<feGaussianBlur in="SourceAlpha" stdDeviation="`+n(this.blur?this.blur/2:0,o)+`"></feGaussianBlur>
	<feOffset dx="`+n(a.x,o)+'" dy="'+n(a.y,o)+`" result="oBlur" ></feOffset>
	<feFlood flood-color="`+c.toRgb()+'" flood-opacity="'+c.getAlpha()+`"/>
	<feComposite in2="oBlur" operator="in" />
	<feMerge>
		<feMergeNode></feMergeNode>
		<feMergeNode in="SourceGraphic"></feMergeNode>
	</feMerge>
</filter>
`},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var i={},r=e.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach(function(s){this[s]!==r[s]&&(i[s]=this[s])},this),i}}),e.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(-?\d+(?:\.\d*)?(?:px)?(?:\s?|$))?(\d+(?:\.\d*)?(?:px)?)?(?:\s?|$)(?:$|\s)/})(vn);(function(){"use strict";if(be.StaticCanvas){be.warn("fabric.StaticCanvas is already defined.");return}var t=be.util.object.extend,e=be.util.getElementOffset,n=be.util.removeFromArray,i=be.util.toFixed,r=be.util.transformPoint,s=be.util.invertTransform,o=be.util.getNodeCanvas,a=be.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");be.StaticCanvas=be.util.createClass(be.CommonMethods,{initialize:function(c,d){d||(d={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(c,d)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:be.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(c,d){var u=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(c),this._initOptions(d),this.interactive||this._initRetinaScaling(),d.overlayImage&&this.setOverlayImage(d.overlayImage,u),d.backgroundImage&&this.setBackgroundImage(d.backgroundImage,u),d.backgroundColor&&this.setBackgroundColor(d.backgroundColor,u),d.overlayColor&&this.setOverlayColor(d.overlayColor,u),this.calcOffset()},_isRetinaScaling:function(){return be.devicePixelRatio>1&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?Math.max(1,be.devicePixelRatio):1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var c=be.devicePixelRatio;this.__initRetinaScaling(c,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(c,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(c,d,u){d.setAttribute("width",this.width*c),d.setAttribute("height",this.height*c),u.scale(c,c)},calcOffset:function(){return this._offset=e(this.lowerCanvasEl),this},setOverlayImage:function(c,d,u){return this.__setBgOverlayImage("overlayImage",c,d,u)},setBackgroundImage:function(c,d,u){return this.__setBgOverlayImage("backgroundImage",c,d,u)},setOverlayColor:function(c,d){return this.__setBgOverlayColor("overlayColor",c,d)},setBackgroundColor:function(c,d){return this.__setBgOverlayColor("backgroundColor",c,d)},__setBgOverlayImage:function(c,d,u,m){return typeof d=="string"?be.util.loadImage(d,function(f,_){if(f){var x=new be.Image(f,m);this[c]=x,x.canvas=this}u&&u(f,_)},this,m&&m.crossOrigin):(m&&d.setOptions(m),this[c]=d,d&&(d.canvas=this),u&&u(d,!1)),this},__setBgOverlayColor:function(c,d,u){return this[c]=d,this._initGradient(d,c),this._initPattern(d,c,u),this},_createCanvasElement:function(){var c=a();if(!c||(c.style||(c.style={}),typeof c.getContext>"u"))throw l;return c},_initOptions:function(c){var d=this.lowerCanvasEl;this._setOptions(c),this.width=this.width||parseInt(d.width,10)||0,this.height=this.height||parseInt(d.height,10)||0,this.lowerCanvasEl.style&&(d.width=this.width,d.height=this.height,d.style.width=this.width+"px",d.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(c){c&&c.getContext?this.lowerCanvasEl=c:this.lowerCanvasEl=be.util.getById(c)||this._createCanvasElement(),be.util.addClass(this.lowerCanvasEl,"lower-canvas"),this._originalCanvasStyle=this.lowerCanvasEl.style,this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(c,d){return this.setDimensions({width:c},d)},setHeight:function(c,d){return this.setDimensions({height:c},d)},setDimensions:function(c,d){var u;d=d||{};for(var m in c)u=c[m],d.cssOnly||(this._setBackstoreDimension(m,c[m]),u+="px",this.hasLostContext=!0),d.backstoreOnly||this._setCssDimension(m,u);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(this.contextTop),this._initRetinaScaling(),this.calcOffset(),d.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(c,d){return this.lowerCanvasEl[c]=d,this.upperCanvasEl&&(this.upperCanvasEl[c]=d),this.cacheCanvasEl&&(this.cacheCanvasEl[c]=d),this[c]=d,this},_setCssDimension:function(c,d){return this.lowerCanvasEl.style[c]=d,this.upperCanvasEl&&(this.upperCanvasEl.style[c]=d),this.wrapperEl&&(this.wrapperEl.style[c]=d),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(c){var d=this._activeObject,u=this.backgroundImage,m=this.overlayImage,f,_,x;for(this.viewportTransform=c,_=0,x=this._objects.length;_<x;_++)f=this._objects[_],f.group||f.setCoords(!0);return d&&d.setCoords(),u&&u.setCoords(!0),m&&m.setCoords(!0),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},zoomToPoint:function(c,d){var u=c,m=this.viewportTransform.slice(0);c=r(c,s(this.viewportTransform)),m[0]=d,m[3]=d;var f=r(c,m);return m[4]+=u.x-f.x,m[5]+=u.y-f.y,this.setViewportTransform(m)},setZoom:function(c){return this.zoomToPoint(new be.Point(0,0),c),this},absolutePan:function(c){var d=this.viewportTransform.slice(0);return d[4]=-c.x,d[5]=-c.y,this.setViewportTransform(d)},relativePan:function(c){return this.absolutePan(new be.Point(-c.x-this.viewportTransform[4],-c.y-this.viewportTransform[5]))},getElement:function(){return this.lowerCanvasEl},_onObjectAdded:function(c){this.stateful&&c.setupState(),c._set("canvas",this),c.setCoords(),this.fire("object:added",{target:c}),c.fire("added")},_onObjectRemoved:function(c){this.fire("object:removed",{target:c}),c.fire("removed"),delete c.canvas},clearContext:function(c){return c.clearRect(0,0,this.width,this.height),this},getContext:function(){return this.contextContainer},clear:function(){return this.remove.apply(this,this.getObjects()),this.backgroundImage=null,this.overlayImage=null,this.backgroundColor="",this.overlayColor="",this._hasITextHandlers&&(this.off("mouse:up",this._mouseUpITextHandler),this._iTextInstances=null,this._hasITextHandlers=!1),this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll(),this},renderAll:function(){var c=this.contextContainer;return this.renderCanvas(c,this._objects),this},renderAndReset:function(){this.isRendering=0,this.renderAll()},requestRenderAll:function(){return this.isRendering||(this.isRendering=be.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var c={},d=this.width,u=this.height,m=s(this.viewportTransform);return c.tl=r({x:0,y:0},m),c.br=r({x:d,y:u},m),c.tr=new be.Point(c.br.x,c.tl.y),c.bl=new be.Point(c.tl.x,c.br.y),this.vptCoords=c,c},cancelRequestedRender:function(){this.isRendering&&(be.util.cancelAnimFrame(this.isRendering),this.isRendering=0)},renderCanvas:function(c,d){var u=this.viewportTransform,m=this.clipPath;this.cancelRequestedRender(),this.calcViewportBoundaries(),this.clearContext(c),be.util.setImageSmoothing(c,this.imageSmoothingEnabled),this.fire("before:render",{ctx:c}),this._renderBackground(c),c.save(),c.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._renderObjects(c,d),c.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(c),m&&(m.canvas=this,m.shouldCache(),m._transformDone=!0,m.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(c)),this._renderOverlay(c),this.controlsAboveOverlay&&this.interactive&&this.drawControls(c),this.fire("after:render",{ctx:c})},drawClipPathOnCanvas:function(c){var d=this.viewportTransform,u=this.clipPath;c.save(),c.transform(d[0],d[1],d[2],d[3],d[4],d[5]),c.globalCompositeOperation="destination-in",u.transform(c),c.scale(1/u.zoomX,1/u.zoomY),c.drawImage(u._cacheCanvas,-u.cacheTranslationX,-u.cacheTranslationY),c.restore()},_renderObjects:function(c,d){var u,m;for(u=0,m=d.length;u<m;++u)d[u]&&d[u].render(c)},_renderBackgroundOrOverlay:function(c,d){var u=this[d+"Color"],m=this[d+"Image"],f=this.viewportTransform,_=this[d+"Vpt"];if(!(!u&&!m)){if(u){c.save(),c.beginPath(),c.moveTo(0,0),c.lineTo(this.width,0),c.lineTo(this.width,this.height),c.lineTo(0,this.height),c.closePath(),c.fillStyle=u.toLive?u.toLive(c,this):u,_&&c.transform(f[0],f[1],f[2],f[3],f[4],f[5]),c.transform(1,0,0,1,u.offsetX||0,u.offsetY||0);var x=u.gradientTransform||u.patternTransform;x&&c.transform(x[0],x[1],x[2],x[3],x[4],x[5]),c.fill(),c.restore()}if(m){c.save();var D=this.skipOffscreen;this.skipOffscreen=_,_&&c.transform(f[0],f[1],f[2],f[3],f[4],f[5]),m.render(c),this.skipOffscreen=D,c.restore()}}},_renderBackground:function(c){this._renderBackgroundOrOverlay(c,"background")},_renderOverlay:function(c){this._renderBackgroundOrOverlay(c,"overlay")},getCenter:function(){return{top:this.height/2,left:this.width/2}},getCenterPoint:function(){return new be.Point(this.width/2,this.height/2)},centerObjectH:function(c){return this._centerObject(c,new be.Point(this.getCenterPoint().x,c.getCenterPoint().y))},centerObjectV:function(c){return this._centerObject(c,new be.Point(c.getCenterPoint().x,this.getCenterPoint().y))},centerObject:function(c){var d=this.getCenterPoint();return this._centerObject(c,d)},viewportCenterObject:function(c){var d=this.getVpCenter();return this._centerObject(c,d)},viewportCenterObjectH:function(c){var d=this.getVpCenter();return this._centerObject(c,new be.Point(d.x,c.getCenterPoint().y)),this},viewportCenterObjectV:function(c){var d=this.getVpCenter();return this._centerObject(c,new be.Point(c.getCenterPoint().x,d.y))},getVpCenter:function(){var c=this.getCenterPoint(),d=s(this.viewportTransform);return r(c,d)},_centerObject:function(c,d){return c.setPositionByOrigin(d,"center","center"),c.setCoords(),this.renderOnAddRemove&&this.requestRenderAll(),this},toDatalessJSON:function(c){return this.toDatalessObject(c)},toObject:function(c){return this._toObjectMethod("toObject",c)},toDatalessObject:function(c){return this._toObjectMethod("toDatalessObject",c)},_toObjectMethod:function(c,d){var u=this.clipPath,m={version:be.version,objects:this._toObjects(c,d)};return u&&!u.excludeFromExport&&(m.clipPath=this._toObject(this.clipPath,c,d)),t(m,this.__serializeBgOverlay(c,d)),be.util.populateWithProperties(this,m,d),m},_toObjects:function(c,d){return this._objects.filter(function(u){return!u.excludeFromExport}).map(function(u){return this._toObject(u,c,d)},this)},_toObject:function(c,d,u){var m;this.includeDefaultValues||(m=c.includeDefaultValues,c.includeDefaultValues=!1);var f=c[d](u);return this.includeDefaultValues||(c.includeDefaultValues=m),f},__serializeBgOverlay:function(c,d){var u={},m=this.backgroundImage,f=this.overlayImage,_=this.backgroundColor,x=this.overlayColor;return _&&_.toObject?_.excludeFromExport||(u.background=_.toObject(d)):_&&(u.background=_),x&&x.toObject?x.excludeFromExport||(u.overlay=x.toObject(d)):x&&(u.overlay=x),m&&!m.excludeFromExport&&(u.backgroundImage=this._toObject(m,c,d)),f&&!f.excludeFromExport&&(u.overlayImage=this._toObject(f,c,d)),u},svgViewportTransformation:!0,toSVG:function(c,d){c||(c={}),c.reviver=d;var u=[];return this._setSVGPreamble(u,c),this._setSVGHeader(u,c),this.clipPath&&u.push('<g clip-path="url(#'+this.clipPath.clipPathId+`)" >
`),this._setSVGBgOverlayColor(u,"background"),this._setSVGBgOverlayImage(u,"backgroundImage",d),this._setSVGObjects(u,d),this.clipPath&&u.push(`</g>
`),this._setSVGBgOverlayColor(u,"overlay"),this._setSVGBgOverlayImage(u,"overlayImage",d),u.push("</svg>"),u.join("")},_setSVGPreamble:function(c,d){d.suppressPreamble||c.push('<?xml version="1.0" encoding="',d.encoding||"UTF-8",`" standalone="no" ?>
`,'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ',`"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
`)},_setSVGHeader:function(c,d){var u=d.width||this.width,m=d.height||this.height,f,_='viewBox="0 0 '+this.width+" "+this.height+'" ',x=be.Object.NUM_FRACTION_DIGITS;d.viewBox?_='viewBox="'+d.viewBox.x+" "+d.viewBox.y+" "+d.viewBox.width+" "+d.viewBox.height+'" ':this.svgViewportTransformation&&(f=this.viewportTransform,_='viewBox="'+i(-f[4]/f[0],x)+" "+i(-f[5]/f[3],x)+" "+i(this.width/f[0],x)+" "+i(this.height/f[3],x)+'" '),c.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',u,'" ','height="',m,'" ',_,`xml:space="preserve">
`,"<desc>Created with Fabric.js ",be.version,`</desc>
`,`<defs>
`,this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(d),`</defs>
`)},createSVGClipPathMarkup:function(c){var d=this.clipPath;return d?(d.clipPathId="CLIPPATH_"+be.Object.__uid++,'<clipPath id="'+d.clipPathId+`" >
`+this.clipPath.toClipPathSVG(c.reviver)+`</clipPath>
`):""},createSVGRefElementsMarkup:function(){var c=this,d=["background","overlay"].map(function(u){var m=c[u+"Color"];if(m&&m.toLive){var f=c[u+"Vpt"],_=c.viewportTransform,x={width:c.width/(f?_[0]:1),height:c.height/(f?_[3]:1)};return m.toSVG(x,{additionalTransform:f?be.util.matrixToSVG(_):""})}});return d.join("")},createSVGFontFacesMarkup:function(){var c="",d={},u,m,f,_,x,D,E,M,I,z=be.fontPaths,G=[];for(this._objects.forEach(function Y(X){G.push(X),X._objects&&X._objects.forEach(Y)}),M=0,I=G.length;M<I;M++)if(u=G[M],m=u.fontFamily,!(u.type.indexOf("text")===-1||d[m]||!z[m])&&(d[m]=!0,!!u.styles)){f=u.styles;for(x in f){_=f[x];for(E in _)D=_[E],m=D.fontFamily,!d[m]&&z[m]&&(d[m]=!0)}}for(var A in d)c+=[`		@font-face {
`,"			font-family: '",A,`';
`,"			src: url('",z[A],`');
`,`		}
`].join("");return c&&(c=['	<style type="text/css">',`<![CDATA[
`,c,"]]>",`</style>
`].join("")),c},_setSVGObjects:function(c,d){var u,m,f,_=this._objects;for(m=0,f=_.length;m<f;m++)u=_[m],!u.excludeFromExport&&this._setSVGObject(c,u,d)},_setSVGObject:function(c,d,u){c.push(d.toSVG(u))},_setSVGBgOverlayImage:function(c,d,u){this[d]&&!this[d].excludeFromExport&&this[d].toSVG&&c.push(this[d].toSVG(u))},_setSVGBgOverlayColor:function(c,d){var u=this[d+"Color"],m=this.viewportTransform,f=this.width,_=this.height;if(u)if(u.toLive){var x=u.repeat,D=be.util.invertTransform(m),E=this[d+"Vpt"],M=E?be.util.matrixToSVG(D):"";c.push('<rect transform="'+M+" translate(",f/2,",",_/2,')"',' x="',u.offsetX-f/2,'" y="',u.offsetY-_/2,'" ','width="',x==="repeat-y"||x==="no-repeat"?u.source.width:f,'" height="',x==="repeat-x"||x==="no-repeat"?u.source.height:_,'" fill="url(#SVGID_'+u.id+')"',`></rect>
`)}else c.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',u,'"',`></rect>
`)},sendToBack:function(c){if(!c)return this;var d=this._activeObject,u,m,f;if(c===d&&c.type==="activeSelection")for(f=d._objects,u=f.length;u--;)m=f[u],n(this._objects,m),this._objects.unshift(m);else n(this._objects,c),this._objects.unshift(c);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(c){if(!c)return this;var d=this._activeObject,u,m,f;if(c===d&&c.type==="activeSelection")for(f=d._objects,u=0;u<f.length;u++)m=f[u],n(this._objects,m),this._objects.push(m);else n(this._objects,c),this._objects.push(c);return this.renderOnAddRemove&&this.requestRenderAll(),this},sendBackwards:function(c,d){if(!c)return this;var u=this._activeObject,m,f,_,x,D,E=0;if(c===u&&c.type==="activeSelection")for(D=u._objects,m=0;m<D.length;m++)f=D[m],_=this._objects.indexOf(f),_>0+E&&(x=_-1,n(this._objects,f),this._objects.splice(x,0,f)),E++;else _=this._objects.indexOf(c),_!==0&&(x=this._findNewLowerIndex(c,_,d),n(this._objects,c),this._objects.splice(x,0,c));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(c,d,u){var m,f;if(u)for(m=d,f=d-1;f>=0;--f){var _=c.intersectsWithObject(this._objects[f])||c.isContainedWithinObject(this._objects[f])||this._objects[f].isContainedWithinObject(c);if(_){m=f;break}}else m=d-1;return m},bringForward:function(c,d){if(!c)return this;var u=this._activeObject,m,f,_,x,D,E=0;if(c===u&&c.type==="activeSelection")for(D=u._objects,m=D.length;m--;)f=D[m],_=this._objects.indexOf(f),_<this._objects.length-1-E&&(x=_+1,n(this._objects,f),this._objects.splice(x,0,f)),E++;else _=this._objects.indexOf(c),_!==this._objects.length-1&&(x=this._findNewUpperIndex(c,_,d),n(this._objects,c),this._objects.splice(x,0,c));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewUpperIndex:function(c,d,u){var m,f,_;if(u)for(m=d,f=d+1,_=this._objects.length;f<_;++f){var x=c.intersectsWithObject(this._objects[f])||c.isContainedWithinObject(this._objects[f])||this._objects[f].isContainedWithinObject(c);if(x){m=f;break}}else m=d+1;return m},moveTo:function(c,d){return n(this._objects,c),this._objects.splice(d,0,c),this.renderOnAddRemove&&this.requestRenderAll()},dispose:function(){return this.isRendering&&(be.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.forEachObject(function(c){c.dispose&&c.dispose()}),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose&&this.backgroundImage.dispose(),this.backgroundImage=null,this.overlayImage&&this.overlayImage.dispose&&this.overlayImage.dispose(),this.overlayImage=null,this._iTextInstances=null,this.contextContainer=null,this.lowerCanvasEl.classList.remove("lower-canvas"),be.util.setStyle(this.lowerCanvasEl,this._originalCanvasStyle),delete this._originalCanvasStyle,this.lowerCanvasEl.setAttribute("width",this.width),this.lowerCanvasEl.setAttribute("height",this.height),be.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),t(be.StaticCanvas.prototype,be.Observable),t(be.StaticCanvas.prototype,be.Collection),t(be.StaticCanvas.prototype,be.DataURLExporter),t(be.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(c){var d=a();if(!d||!d.getContext)return null;var u=d.getContext("2d");if(!u)return null;switch(c){case"setLineDash":return typeof u.setLineDash<"u";default:return null}}}),be.StaticCanvas.prototype.toJSON=be.StaticCanvas.prototype.toObject,be.isLikelyNode&&(be.StaticCanvas.prototype.createPNGStream=function(){var c=o(this.lowerCanvasEl);return c&&c.createPNGStream()},be.StaticCanvas.prototype.createJPEGStream=function(c){var d=o(this.lowerCanvasEl);return d&&d.createJPEGStream(c)})})();be.BaseBrush=be.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,limitedToCanvasSize:!1,_setBrushStyles:function(t){t.strokeStyle=this.color,t.lineWidth=this.width,t.lineCap=this.strokeLineCap,t.miterLimit=this.strokeMiterLimit,t.lineJoin=this.strokeLineJoin,t.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(t){var e=this.canvas.viewportTransform;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},_setShadow:function(){if(this.shadow){var t=this.canvas,e=this.shadow,n=t.contextTop,i=t.getZoom();t&&t._isRetinaScaling()&&(i*=be.devicePixelRatio),n.shadowColor=e.color,n.shadowBlur=e.blur*i,n.shadowOffsetX=e.offsetX*i,n.shadowOffsetY=e.offsetY*i}},needsFullRender:function(){var t=new be.Color(this.color);return t.getAlpha()<1||!!this.shadow},_resetShadow:function(){var t=this.canvas.contextTop;t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0},_isOutSideCanvas:function(t){return t.x<0||t.x>this.canvas.getWidth()||t.y<0||t.y>this.canvas.getHeight()}});(function(){be.PencilBrush=be.util.createClass(be.BaseBrush,{decimate:.4,drawStraightLine:!1,straightLineKey:"shiftKey",initialize:function(t){this.canvas=t,this._points=[]},needsFullRender:function(){return this.callSuper("needsFullRender")||this._hasStraightLine},_drawSegment:function(t,e,n){var i=e.midPointFrom(n);return t.quadraticCurveTo(e.x,e.y,i.x,i.y),i},onMouseDown:function(t,e){this.canvas._isMainEvent(e.e)&&(this.drawStraightLine=e.e[this.straightLineKey],this._prepareForDrawing(t),this._captureDrawingPath(t),this._render())},onMouseMove:function(t,e){if(this.canvas._isMainEvent(e.e)&&(this.drawStraightLine=e.e[this.straightLineKey],!(this.limitedToCanvasSize===!0&&this._isOutSideCanvas(t))&&this._captureDrawingPath(t)&&this._points.length>1))if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var n=this._points,i=n.length,r=this.canvas.contextTop;this._saveAndTransform(r),this.oldEnd&&(r.beginPath(),r.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(r,n[i-2],n[i-1],!0),r.stroke(),r.restore()}},onMouseUp:function(t){return this.canvas._isMainEvent(t.e)?(this.drawStraightLine=!1,this.oldEnd=void 0,this._finalizeAndAddPath(),!1):!0},_prepareForDrawing:function(t){var e=new be.Point(t.x,t.y);this._reset(),this._addPoint(e),this.canvas.contextTop.moveTo(e.x,e.y)},_addPoint:function(t){return this._points.length>1&&t.eq(this._points[this._points.length-1])?!1:(this.drawStraightLine&&this._points.length>1&&(this._hasStraightLine=!0,this._points.pop()),this._points.push(t),!0)},_reset:function(){this._points=[],this._setBrushStyles(this.canvas.contextTop),this._setShadow(),this._hasStraightLine=!1},_captureDrawingPath:function(t){var e=new be.Point(t.x,t.y);return this._addPoint(e)},_render:function(t){var e,n,i=this._points[0],r=this._points[1];if(t=t||this.canvas.contextTop,this._saveAndTransform(t),t.beginPath(),this._points.length===2&&i.x===r.x&&i.y===r.y){var s=this.width/1e3;i=new be.Point(i.x,i.y),r=new be.Point(r.x,r.y),i.x-=s,r.x+=s}for(t.moveTo(i.x,i.y),e=1,n=this._points.length;e<n;e++)this._drawSegment(t,i,r),i=this._points[e],r=this._points[e+1];t.lineTo(i.x,i.y),t.stroke(),t.restore()},convertPointsToSVGPath:function(t){var e=this.width/1e3;return be.util.getSmoothPathFromPoints(t,e)},_isEmptySVGPath:function(t){var e=be.util.joinPath(t);return e==="M 0 0 Q 0 0 0 0 L 0 0"},createPath:function(t){var e=new be.Path(t,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray});return this.shadow&&(this.shadow.affectStroke=!0,e.shadow=new be.Shadow(this.shadow)),e},decimatePoints:function(t,e){if(t.length<=2)return t;var n=this.canvas.getZoom(),i=Math.pow(e/n,2),r,s=t.length-1,o=t[0],a=[o],l;for(r=1;r<s-1;r++)l=Math.pow(o.x-t[r].x,2)+Math.pow(o.y-t[r].y,2),l>=i&&(o=t[r],a.push(o));return a.push(t[s]),a},_finalizeAndAddPath:function(){var t=this.canvas.contextTop;t.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var e=this.convertPointsToSVGPath(this._points);if(this._isEmptySVGPath(e)){this.canvas.requestRenderAll();return}var n=this.createPath(e);this.canvas.clearContext(this.canvas.contextTop),this.canvas.fire("before:path:created",{path:n}),this.canvas.add(n),this.canvas.requestRenderAll(),n.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:n})}})})();be.CircleBrush=be.util.createClass(be.BaseBrush,{width:10,initialize:function(t){this.canvas=t,this.points=[]},drawDot:function(t){var e=this.addPoint(t),n=this.canvas.contextTop;this._saveAndTransform(n),this.dot(n,e),n.restore()},dot:function(t,e){t.fillStyle=e.fill,t.beginPath(),t.arc(e.x,e.y,e.radius,0,Math.PI*2,!1),t.closePath(),t.fill()},onMouseDown:function(t){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(t)},_render:function(){var t=this.canvas.contextTop,e,n,i=this.points;for(this._saveAndTransform(t),e=0,n=i.length;e<n;e++)this.dot(t,i[e]);t.restore()},onMouseMove:function(t){this.limitedToCanvasSize===!0&&this._isOutSideCanvas(t)||(this.needsFullRender()?(this.canvas.clearContext(this.canvas.contextTop),this.addPoint(t),this._render()):this.drawDot(t))},onMouseUp:function(){var t=this.canvas.renderOnAddRemove,e,n;this.canvas.renderOnAddRemove=!1;var i=[];for(e=0,n=this.points.length;e<n;e++){var r=this.points[e],s=new be.Circle({radius:r.radius,left:r.x,top:r.y,originX:"center",originY:"center",fill:r.fill});this.shadow&&(s.shadow=new be.Shadow(this.shadow)),i.push(s)}var o=new be.Group(i);o.canvas=this.canvas,this.canvas.fire("before:path:created",{path:o}),this.canvas.add(o),this.canvas.fire("path:created",{path:o}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=t,this.canvas.requestRenderAll()},addPoint:function(t){var e=new be.Point(t.x,t.y),n=be.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,i=new be.Color(this.color).setAlpha(be.util.getRandomInt(0,100)/100).toRgba();return e.radius=n,e.fill=i,this.points.push(e),e}});be.SprayBrush=be.util.createClass(be.BaseBrush,{width:10,density:20,dotWidth:1,dotWidthVariance:1,randomOpacity:!1,optimizeOverlapping:!0,initialize:function(t){this.canvas=t,this.sprayChunks=[]},onMouseDown:function(t){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(t),this.render(this.sprayChunkPoints)},onMouseMove:function(t){this.limitedToCanvasSize===!0&&this._isOutSideCanvas(t)||(this.addSprayChunk(t),this.render(this.sprayChunkPoints))},onMouseUp:function(){var t=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var e=[],n=0,i=this.sprayChunks.length;n<i;n++)for(var r=this.sprayChunks[n],s=0,o=r.length;s<o;s++){var a=new be.Rect({width:r[s].width,height:r[s].width,left:r[s].x+1,top:r[s].y+1,originX:"center",originY:"center",fill:this.color});e.push(a)}this.optimizeOverlapping&&(e=this._getOptimizedRects(e));var l=new be.Group(e);this.shadow&&l.set("shadow",new be.Shadow(this.shadow)),this.canvas.fire("before:path:created",{path:l}),this.canvas.add(l),this.canvas.fire("path:created",{path:l}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=t,this.canvas.requestRenderAll()},_getOptimizedRects:function(t){var e={},n,i,r;for(i=0,r=t.length;i<r;i++)n=t[i].left+""+t[i].top,e[n]||(e[n]=t[i]);var s=[];for(n in e)s.push(e[n]);return s},render:function(t){var e=this.canvas.contextTop,n,i;for(e.fillStyle=this.color,this._saveAndTransform(e),n=0,i=t.length;n<i;n++){var r=t[n];typeof r.opacity<"u"&&(e.globalAlpha=r.opacity),e.fillRect(r.x,r.y,r.width,r.width)}e.restore()},_render:function(){var t=this.canvas.contextTop,e,n;for(t.fillStyle=this.color,this._saveAndTransform(t),e=0,n=this.sprayChunks.length;e<n;e++)this.render(this.sprayChunks[e]);t.restore()},addSprayChunk:function(t){this.sprayChunkPoints=[];var e,n,i,r=this.width/2,s;for(s=0;s<this.density;s++){e=be.util.getRandomInt(t.x-r,t.x+r),n=be.util.getRandomInt(t.y-r,t.y+r),this.dotWidthVariance?i=be.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):i=this.dotWidth;var o=new be.Point(e,n);o.width=i,this.randomOpacity&&(o.opacity=be.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(o)}this.sprayChunks.push(this.sprayChunkPoints)}});be.PatternBrush=be.util.createClass(be.PencilBrush,{getPatternSrc:function(){var t=20,e=5,n=be.util.createCanvasElement(),i=n.getContext("2d");return n.width=n.height=t+e,i.fillStyle=this.color,i.beginPath(),i.arc(t/2,t/2,t/2,0,Math.PI*2,!1),i.closePath(),i.fill(),n},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},getPattern:function(t){return t.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(t){this.callSuper("_setBrushStyles",t),t.strokeStyle=this.getPattern(t)},createPath:function(t){var e=this.callSuper("createPath",t),n=e._getLeftTopCoords().scalarAdd(e.strokeWidth/2);return e.stroke=new be.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-n.x,offsetY:-n.y}),e}});(function(){var t=be.util.getPointer,e=be.util.degreesToRadians,n=be.util.isTouchEvent;be.Canvas=be.util.createClass(be.StaticCanvas,{initialize:function(r,s){s||(s={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(r,s),this._initInteractive(),this._createCacheCanvas()},uniformScaling:!0,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",interactive:!0,selection:!0,selectionKey:"shiftKey",altSelectionKey:null,selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",notAllowedCursor:"not-allowed",containerClass:"canvas-container",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,isDrawingMode:!1,preserveObjectStacking:!1,snapAngle:0,snapThreshold:null,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,targets:[],enablePointerEvents:!1,_hoveredTarget:null,_hoveredTargets:[],_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=be.PencilBrush&&new be.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var r=this.getActiveObjects(),s,o,a;if(r.length>0&&!this.preserveObjectStacking){o=[],a=[];for(var l=0,c=this._objects.length;l<c;l++)s=this._objects[l],r.indexOf(s)===-1?o.push(s):a.push(s);r.length>1&&(this._activeObject._objects=a),o.push.apply(o,a)}else o=this._objects;return o},renderAll:function(){this.contextTopDirty&&!this._groupSelector&&!this.isDrawingMode&&(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&(this.renderTopLayer(this.contextTop),this.hasLostContext=!1);var r=this.contextContainer;return this.renderCanvas(r,this._chooseObjectsToRender()),this},renderTopLayer:function(r){r.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(r),this.contextTopDirty=!0),r.restore()},renderTop:function(){var r=this.contextTop;return this.clearContext(r),this.renderTopLayer(r),this.fire("after:render"),this},_normalizePointer:function(r,s){var o=r.calcTransformMatrix(),a=be.util.invertTransform(o),l=this.restorePointerVpt(s);return be.util.transformPoint(l,a)},isTargetTransparent:function(r,s,o){if(r.shouldCache()&&r._cacheCanvas&&r!==this._activeObject){var a=this._normalizePointer(r,{x:s,y:o}),l=Math.max(r.cacheTranslationX+a.x*r.zoomX,0),c=Math.max(r.cacheTranslationY+a.y*r.zoomY,0),f=be.util.isTransparent(r._cacheContext,Math.round(l),Math.round(c),this.targetFindTolerance);return f}var d=this.contextCache,u=r.selectionBackgroundColor,m=this.viewportTransform;r.selectionBackgroundColor="",this.clearContext(d),d.save(),d.transform(m[0],m[1],m[2],m[3],m[4],m[5]),r.render(d),d.restore(),r.selectionBackgroundColor=u;var f=be.util.isTransparent(d,s,o,this.targetFindTolerance);return f},_isSelectionKeyPressed:function(r){var s=!1;return Array.isArray(this.selectionKey)?s=!!this.selectionKey.find(function(o){return r[o]===!0}):s=r[this.selectionKey],s},_shouldClearSelection:function(r,s){var o=this.getActiveObjects(),a=this._activeObject;return!s||s&&a&&o.length>1&&o.indexOf(s)===-1&&a!==s&&!this._isSelectionKeyPressed(r)||s&&!s.evented||s&&!s.selectable&&a&&a!==s},_shouldCenterTransform:function(r,s,o){if(r){var a;return s==="scale"||s==="scaleX"||s==="scaleY"||s==="resizing"?a=this.centeredScaling||r.centeredScaling:s==="rotate"&&(a=this.centeredRotation||r.centeredRotation),a?!o:o}},_getOriginFromCorner:function(r,s){var o={x:r.originX,y:r.originY};return s==="ml"||s==="tl"||s==="bl"?o.x="right":(s==="mr"||s==="tr"||s==="br")&&(o.x="left"),s==="tl"||s==="mt"||s==="tr"?o.y="bottom":(s==="bl"||s==="mb"||s==="br")&&(o.y="top"),o},_getActionFromCorner:function(r,s,o,a){if(!s||!r)return"drag";var l=a.controls[s];return l.getActionName(o,l,a)},_setupCurrentTransform:function(r,s,o){if(s){var a=this.getPointer(r),l=s.__corner,c=s.controls[l],d=o&&l?c.getActionHandler(r,s,c):be.controlsUtils.dragHandler,u=this._getActionFromCorner(o,l,r,s),m=this._getOriginFromCorner(s,l),f=r[this.centeredKey],_={target:s,action:u,actionHandler:d,corner:l,scaleX:s.scaleX,scaleY:s.scaleY,skewX:s.skewX,skewY:s.skewY,offsetX:a.x-s.left,offsetY:a.y-s.top,originX:m.x,originY:m.y,ex:a.x,ey:a.y,lastX:a.x,lastY:a.y,theta:e(s.angle),width:s.width*s.scaleX,shiftKey:r.shiftKey,altKey:f,original:be.util.saveObjectTransform(s)};this._shouldCenterTransform(s,u,f)&&(_.originX="center",_.originY="center"),_.original.originX=m.x,_.original.originY=m.y,this._currentTransform=_,this._beforeTransform(r)}},setCursor:function(r){this.upperCanvasEl.style.cursor=r},_drawSelection:function(r){var s=this._groupSelector,o=new be.Point(s.ex,s.ey),a=be.util.transformPoint(o,this.viewportTransform),l=new be.Point(s.ex+s.left,s.ey+s.top),c=be.util.transformPoint(l,this.viewportTransform),d=Math.min(a.x,c.x),u=Math.min(a.y,c.y),m=Math.max(a.x,c.x),f=Math.max(a.y,c.y),_=this.selectionLineWidth/2;this.selectionColor&&(r.fillStyle=this.selectionColor,r.fillRect(d,u,m-d,f-u)),!(!this.selectionLineWidth||!this.selectionBorderColor)&&(r.lineWidth=this.selectionLineWidth,r.strokeStyle=this.selectionBorderColor,d+=_,u+=_,m-=_,f-=_,be.Object.prototype._setLineDash.call(this,r,this.selectionDashArray),r.strokeRect(d,u,m-d,f-u))},findTarget:function(r,s){if(!this.skipTargetFind){var o=!0,a=this.getPointer(r,o),l=this._activeObject,c=this.getActiveObjects(),d,u,m=n(r),f=c.length>1&&!s||c.length===1;if(this.targets=[],f&&l._findTargetCorner(a,m)||c.length>1&&!s&&l===this._searchPossibleTargets([l],a))return l;if(c.length===1&&l===this._searchPossibleTargets([l],a))if(this.preserveObjectStacking)d=l,u=this.targets,this.targets=[];else return l;var _=this._searchPossibleTargets(this._objects,a);return r[this.altSelectionKey]&&_&&d&&_!==d&&(_=d,this.targets=u),_}},_checkTarget:function(r,s,o){if(s&&s.visible&&s.evented&&s.containsPoint(r))if((this.perPixelTargetFind||s.perPixelTargetFind)&&!s.isEditing){var a=this.isTargetTransparent(s,o.x,o.y);if(!a)return!0}else return!0},_searchPossibleTargets:function(r,s){for(var o,a=r.length,l;a--;){var c=r[a],d=c.group?this._normalizePointer(c.group,s):s;if(this._checkTarget(d,c,s)){o=r[a],o.subTargetCheck&&o instanceof be.Group&&(l=this._searchPossibleTargets(o._objects,s),l&&this.targets.push(l));break}}return o},restorePointerVpt:function(r){return be.util.transformPoint(r,be.util.invertTransform(this.viewportTransform))},getPointer:function(r,s){if(this._absolutePointer&&!s)return this._absolutePointer;if(this._pointer&&s)return this._pointer;var o=t(r),a=this.upperCanvasEl,l=a.getBoundingClientRect(),c=l.width||0,d=l.height||0,u;(!c||!d)&&("top"in l&&"bottom"in l&&(d=Math.abs(l.top-l.bottom)),"right"in l&&"left"in l&&(c=Math.abs(l.right-l.left))),this.calcOffset(),o.x=o.x-this._offset.left,o.y=o.y-this._offset.top,s||(o=this.restorePointerVpt(o));var m=this.getRetinaScaling();return m!==1&&(o.x/=m,o.y/=m),c===0||d===0?u={width:1,height:1}:u={width:a.width/c,height:a.height/d},{x:o.x*u.width,y:o.y*u.height}},_createUpperCanvas:function(){var r=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),s=this.lowerCanvasEl,o=this.upperCanvasEl;o?o.className="":(o=this._createCanvasElement(),this.upperCanvasEl=o),be.util.addClass(o,"upper-canvas "+r),this.wrapperEl.appendChild(o),this._copyCanvasStyle(s,o),this._applyCanvasStyle(o),this.contextTop=o.getContext("2d")},getTopContext:function(){return this.contextTop},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=be.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),be.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),be.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(r){var s=this.width||r.width,o=this.height||r.height;be.util.setStyle(r,{position:"absolute",width:s+"px",height:o+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),r.width=s,r.height=o,be.util.makeElementUnselectable(r)},_copyCanvasStyle:function(r,s){s.style.cssText=r.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var r=this._activeObject;return r?r.type==="activeSelection"&&r._objects?r._objects.slice(0):[r]:[]},_onObjectRemoved:function(r){r===this._activeObject&&(this.fire("before:selection:cleared",{target:r}),this._discardActiveObject(),this.fire("selection:cleared",{target:r}),r.fire("deselected")),r===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",r)},_fireSelectionEvents:function(r,s){var o=!1,a=this.getActiveObjects(),l=[],c=[];r.forEach(function(d){a.indexOf(d)===-1&&(o=!0,d.fire("deselected",{e:s,target:d}),c.push(d))}),a.forEach(function(d){r.indexOf(d)===-1&&(o=!0,d.fire("selected",{e:s,target:d}),l.push(d))}),r.length>0&&a.length>0?o&&this.fire("selection:updated",{e:s,selected:l,deselected:c}):a.length>0?this.fire("selection:created",{e:s,selected:l}):r.length>0&&this.fire("selection:cleared",{e:s,deselected:c})},setActiveObject:function(r,s){var o=this.getActiveObjects();return this._setActiveObject(r,s),this._fireSelectionEvents(o,s),this},_setActiveObject:function(r,s){return this._activeObject===r||!this._discardActiveObject(s,r)||r.onSelect({e:s})?!1:(this._activeObject=r,!0)},_discardActiveObject:function(r,s){var o=this._activeObject;if(o){if(o.onDeselect({e:r,object:s}))return!1;this._activeObject=null}return!0},discardActiveObject:function(r){var s=this.getActiveObjects(),o=this.getActiveObject();return s.length&&this.fire("before:selection:cleared",{target:o,e:r}),this._discardActiveObject(r),this._fireSelectionEvents(s,r),this},dispose:function(){var r=this.wrapperEl;return this.removeListeners(),r.removeChild(this.upperCanvasEl),r.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach((function(s){be.util.cleanUpJsdomNode(this[s]),this[s]=void 0}).bind(this)),r.parentNode&&r.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,be.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(r){var s=this._activeObject;s&&s._renderControls(r)},_toObject:function(r,s,o){var a=this._realizeGroupTransformOnObject(r),l=this.callSuper("_toObject",r,s,o);return this._unwindGroupTransformOnObject(r,a),l},_realizeGroupTransformOnObject:function(r){if(r.group&&r.group.type==="activeSelection"&&this._activeObject===r.group){var s=["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"],o={};return s.forEach(function(a){o[a]=r[a]}),be.util.addTransformToObject(r,this._activeObject.calcOwnMatrix()),o}else return null},_unwindGroupTransformOnObject:function(r,s){s&&r.set(s)},_setSVGObject:function(r,s,o){var a=this._realizeGroupTransformOnObject(s);this.callSuper("_setSVGObject",r,s,o),this._unwindGroupTransformOnObject(s,a)},setViewportTransform:function(r){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),be.StaticCanvas.prototype.setViewportTransform.call(this,r)}});for(var i in be.StaticCanvas)i!=="prototype"&&(be.Canvas[i]=be.StaticCanvas[i])})();(function(){var t=be.util.addListener,e=be.util.removeListener,n=3,i=2,r=1,s={passive:!1};function o(a,l){return a.button&&a.button===l-1}be.util.object.extend(be.Canvas.prototype,{mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(t,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(a,l){var c=this.upperCanvasEl,d=this._getEventPrefix();a(be.window,"resize",this._onResize),a(c,d+"down",this._onMouseDown),a(c,d+"move",this._onMouseMove,s),a(c,d+"out",this._onMouseOut),a(c,d+"enter",this._onMouseEnter),a(c,"wheel",this._onMouseWheel),a(c,"contextmenu",this._onContextMenu),a(c,"dblclick",this._onDoubleClick),a(c,"dragover",this._onDragOver),a(c,"dragenter",this._onDragEnter),a(c,"dragleave",this._onDragLeave),a(c,"drop",this._onDrop),this.enablePointerEvents||a(c,"touchstart",this._onTouchStart,s),typeof eventjs<"u"&&l in eventjs&&(eventjs[l](c,"gesture",this._onGesture),eventjs[l](c,"drag",this._onDrag),eventjs[l](c,"orientation",this._onOrientationChange),eventjs[l](c,"shake",this._onShake),eventjs[l](c,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(e,"remove");var a=this._getEventPrefix();e(be.document,a+"up",this._onMouseUp),e(be.document,"touchend",this._onTouchEnd,s),e(be.document,a+"move",this._onMouseMove,s),e(be.document,"touchmove",this._onMouseMove,s)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._onDrop.bind(this),this.eventsBound=!0)},_onGesture:function(a,l){this.__onTransformGesture&&this.__onTransformGesture(a,l)},_onDrag:function(a,l){this.__onDrag&&this.__onDrag(a,l)},_onMouseWheel:function(a){this.__onMouseWheel(a)},_onMouseOut:function(a){var l=this._hoveredTarget;this.fire("mouse:out",{target:l,e:a}),this._hoveredTarget=null,l&&l.fire("mouseout",{e:a});var c=this;this._hoveredTargets.forEach(function(d){c.fire("mouse:out",{target:d,e:a}),d&&d.fire("mouseout",{e:a})}),this._hoveredTargets=[]},_onMouseEnter:function(a){!this._currentTransform&&!this.findTarget(a)&&(this.fire("mouse:over",{target:null,e:a}),this._hoveredTarget=null,this._hoveredTargets=[])},_onOrientationChange:function(a,l){this.__onOrientationChange&&this.__onOrientationChange(a,l)},_onShake:function(a,l){this.__onShake&&this.__onShake(a,l)},_onLongPress:function(a,l){this.__onLongPress&&this.__onLongPress(a,l)},_onDragOver:function(a){a.preventDefault();var l=this._simpleEventHandler("dragover",a);this._fireEnterLeaveEvents(l,a)},_onDrop:function(a){return this._simpleEventHandler("drop:before",a),this._simpleEventHandler("drop",a)},_onContextMenu:function(a){return this.stopContextMenu&&(a.stopPropagation(),a.preventDefault()),!1},_onDoubleClick:function(a){this._cacheTransformEventData(a),this._handleEvent(a,"dblclick"),this._resetTransformEventData(a)},getPointerId:function(a){var l=a.changedTouches;return l?l[0]&&l[0].identifier:this.enablePointerEvents?a.pointerId:-1},_isMainEvent:function(a){return a.isPrimary===!0?!0:a.isPrimary===!1?!1:a.type==="touchend"&&a.touches.length===0?!0:a.changedTouches?a.changedTouches[0].identifier===this.mainTouchId:!0},_onTouchStart:function(a){a.preventDefault(),this.mainTouchId===null&&(this.mainTouchId=this.getPointerId(a)),this.__onMouseDown(a),this._resetTransformEventData();var l=this.upperCanvasEl,c=this._getEventPrefix();t(be.document,"touchend",this._onTouchEnd,s),t(be.document,"touchmove",this._onMouseMove,s),e(l,c+"down",this._onMouseDown)},_onMouseDown:function(a){this.__onMouseDown(a),this._resetTransformEventData();var l=this.upperCanvasEl,c=this._getEventPrefix();e(l,c+"move",this._onMouseMove,s),t(be.document,c+"up",this._onMouseUp),t(be.document,c+"move",this._onMouseMove,s)},_onTouchEnd:function(a){if(!(a.touches.length>0)){this.__onMouseUp(a),this._resetTransformEventData(),this.mainTouchId=null;var l=this._getEventPrefix();e(be.document,"touchend",this._onTouchEnd,s),e(be.document,"touchmove",this._onMouseMove,s);var c=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout(function(){t(c.upperCanvasEl,l+"down",c._onMouseDown),c._willAddMouseDown=0},400)}},_onMouseUp:function(a){this.__onMouseUp(a),this._resetTransformEventData();var l=this.upperCanvasEl,c=this._getEventPrefix();this._isMainEvent(a)&&(e(be.document,c+"up",this._onMouseUp),e(be.document,c+"move",this._onMouseMove,s),t(l,c+"move",this._onMouseMove,s))},_onMouseMove:function(a){!this.allowTouchScrolling&&a.preventDefault&&a.preventDefault(),this.__onMouseMove(a)},_onResize:function(){this.calcOffset()},_shouldRender:function(a){var l=this._activeObject;return!!l!=!!a||l&&a&&l!==a?!0:(l&&l.isEditing,!1)},__onMouseUp:function(a){var l,c=this._currentTransform,d=this._groupSelector,u=!1,m=!d||d.left===0&&d.top===0;if(this._cacheTransformEventData(a),l=this._target,this._handleEvent(a,"up:before"),o(a,n)){this.fireRightClick&&this._handleEvent(a,"up",n,m);return}if(o(a,i)){this.fireMiddleClick&&this._handleEvent(a,"up",i,m),this._resetTransformEventData();return}if(this.isDrawingMode&&this._isCurrentlyDrawing){this._onMouseUpInDrawingMode(a);return}if(this._isMainEvent(a)){if(c&&(this._finalizeCurrentTransform(a),u=c.actionPerformed),!m){var f=l===this._activeObject;this._maybeGroupObjects(a),u||(u=this._shouldRender(l)||!f&&l===this._activeObject)}var _,x;if(l){if(_=l._findTargetCorner(this.getPointer(a,!0),be.util.isTouchEvent(a)),l.selectable&&l!==this._activeObject&&l.activeOn==="up")this.setActiveObject(l,a),u=!0;else{var D=l.controls[_],E=D&&D.getMouseUpHandler(a,l,D);E&&(x=this.getPointer(a),E(a,c,x.x,x.y))}l.isMoving=!1}if(c&&(c.target!==l||c.corner!==_)){var M=c.target&&c.target.controls[c.corner],I=M&&M.getMouseUpHandler(a,l,D);x=x||this.getPointer(a),I&&I(a,c,x.x,x.y)}this._setCursorFromEvent(a,l),this._handleEvent(a,"up",r,m),this._groupSelector=null,this._currentTransform=null,l&&(l.__corner=0),u?this.requestRenderAll():m||this.renderTop()}},_simpleEventHandler:function(a,l){var c=this.findTarget(l),d=this.targets,u={e:l,target:c,subTargets:d};if(this.fire(a,u),c&&c.fire(a,u),!d)return c;for(var m=0;m<d.length;m++)d[m].fire(a,u);return c},_handleEvent:function(a,l,c,d){var u=this._target,m=this.targets||[],f={e:a,target:u,subTargets:m,button:c||r,isClick:d||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};l==="up"&&(f.currentTarget=this.findTarget(a),f.currentSubTargets=this.targets),this.fire("mouse:"+l,f),u&&u.fire("mouse"+l,f);for(var _=0;_<m.length;_++)m[_].fire("mouse"+l,f)},_finalizeCurrentTransform:function(a){var l=this._currentTransform,c=l.target,d={e:a,target:c,transform:l,action:l.action};c._scaling&&(c._scaling=!1),c.setCoords(),(l.actionPerformed||this.stateful&&c.hasStateChanged())&&this._fire("modified",d)},_onMouseDownInDrawingMode:function(a){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(a).requestRenderAll();var l=this.getPointer(a);this.freeDrawingBrush.onMouseDown(l,{e:a,pointer:l}),this._handleEvent(a,"down")},_onMouseMoveInDrawingMode:function(a){if(this._isCurrentlyDrawing){var l=this.getPointer(a);this.freeDrawingBrush.onMouseMove(l,{e:a,pointer:l})}this.setCursor(this.freeDrawingCursor),this._handleEvent(a,"move")},_onMouseUpInDrawingMode:function(a){var l=this.getPointer(a);this._isCurrentlyDrawing=this.freeDrawingBrush.onMouseUp({e:a,pointer:l}),this._handleEvent(a,"up")},__onMouseDown:function(a){this._cacheTransformEventData(a),this._handleEvent(a,"down:before");var l=this._target;if(o(a,n)){this.fireRightClick&&this._handleEvent(a,"down",n);return}if(o(a,i)){this.fireMiddleClick&&this._handleEvent(a,"down",i);return}if(this.isDrawingMode){this._onMouseDownInDrawingMode(a);return}if(this._isMainEvent(a)&&!this._currentTransform){var c=this._pointer;this._previousPointer=c;var d=this._shouldRender(l),u=this._shouldGroup(a,l);if(this._shouldClearSelection(a,l)?this.discardActiveObject(a):u&&(this._handleGrouping(a,l),l=this._activeObject),this.selection&&(!l||!l.selectable&&!l.isEditing&&l!==this._activeObject)&&(this._groupSelector={ex:this._absolutePointer.x,ey:this._absolutePointer.y,top:0,left:0}),l){var m=l===this._activeObject;l.selectable&&l.activeOn==="down"&&this.setActiveObject(l,a);var f=l._findTargetCorner(this.getPointer(a,!0),be.util.isTouchEvent(a));if(l.__corner=f,l===this._activeObject&&(f||!u)){this._setupCurrentTransform(a,l,m);var _=l.controls[f],c=this.getPointer(a),x=_&&_.getMouseDownHandler(a,l,_);x&&x(a,this._currentTransform,c.x,c.y)}}this._handleEvent(a,"down"),(d||u)&&this.requestRenderAll()}},_resetTransformEventData:function(){this._target=null,this._pointer=null,this._absolutePointer=null},_cacheTransformEventData:function(a){this._resetTransformEventData(),this._pointer=this.getPointer(a,!0),this._absolutePointer=this.restorePointerVpt(this._pointer),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(a)||null},_beforeTransform:function(a){var l=this._currentTransform;this.stateful&&l.target.saveState(),this.fire("before:transform",{e:a,transform:l})},__onMouseMove:function(a){this._handleEvent(a,"move:before"),this._cacheTransformEventData(a);var l,c;if(this.isDrawingMode){this._onMouseMoveInDrawingMode(a);return}if(this._isMainEvent(a)){var d=this._groupSelector;d?(c=this._absolutePointer,d.left=c.x-d.ex,d.top=c.y-d.ey,this.renderTop()):this._currentTransform?this._transformObject(a):(l=this.findTarget(a)||null,this._setCursorFromEvent(a,l),this._fireOverOutEvents(l,a)),this._handleEvent(a,"move"),this._resetTransformEventData()}},_fireOverOutEvents:function(a,l){var c=this._hoveredTarget,d=this._hoveredTargets,u=this.targets,m=Math.max(d.length,u.length);this.fireSyntheticInOutEvents(a,l,{oldTarget:c,evtOut:"mouseout",canvasEvtOut:"mouse:out",evtIn:"mouseover",canvasEvtIn:"mouse:over"});for(var f=0;f<m;f++)this.fireSyntheticInOutEvents(u[f],l,{oldTarget:d[f],evtOut:"mouseout",evtIn:"mouseover"});this._hoveredTarget=a,this._hoveredTargets=this.targets.concat()},_fireEnterLeaveEvents:function(a,l){var c=this._draggedoverTarget,d=this._hoveredTargets,u=this.targets,m=Math.max(d.length,u.length);this.fireSyntheticInOutEvents(a,l,{oldTarget:c,evtOut:"dragleave",evtIn:"dragenter"});for(var f=0;f<m;f++)this.fireSyntheticInOutEvents(u[f],l,{oldTarget:d[f],evtOut:"dragleave",evtIn:"dragenter"});this._draggedoverTarget=a},fireSyntheticInOutEvents:function(a,l,c){var d,u,m=c.oldTarget,f,_,x=m!==a,D=c.canvasEvtIn,E=c.canvasEvtOut;x&&(d={e:l,target:a,previousTarget:m},u={e:l,target:m,nextTarget:a}),_=a&&x,f=m&&x,f&&(E&&this.fire(E,u),m.fire(c.evtOut,u)),_&&(D&&this.fire(D,d),a.fire(c.evtIn,d))},__onMouseWheel:function(a){this._cacheTransformEventData(a),this._handleEvent(a,"wheel"),this._resetTransformEventData()},_transformObject:function(a){var l=this.getPointer(a),c=this._currentTransform;c.reset=!1,c.shiftKey=a.shiftKey,c.altKey=a[this.centeredKey],this._performTransformAction(a,c,l),c.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(a,l,c){var d=c.x,u=c.y,m=l.action,f=!1,_=l.actionHandler;_&&(f=_(a,l,d,u)),m==="drag"&&f&&(l.target.isMoving=!0,this.setCursor(l.target.moveCursor||this.moveCursor)),l.actionPerformed=l.actionPerformed||f},_fire:be.controlsUtils.fireEvent,_setCursorFromEvent:function(a,l){if(!l)return this.setCursor(this.defaultCursor),!1;var c=l.hoverCursor||this.hoverCursor,d=this._activeObject&&this._activeObject.type==="activeSelection"?this._activeObject:null,u=(!d||!d.contains(l))&&l._findTargetCorner(this.getPointer(a,!0));u?this.setCursor(this.getCornerCursor(u,l,a)):(l.subTargetCheck&&this.targets.concat().reverse().map(function(m){c=m.hoverCursor||c}),this.setCursor(c))},getCornerCursor:function(a,l,c){var d=l.controls[a];return d.cursorStyleHandler(c,d,l)}})})();(function(){var t=Math.min,e=Math.max;be.util.object.extend(be.Canvas.prototype,{_shouldGroup:function(n,i){var r=this._activeObject;return r&&this._isSelectionKeyPressed(n)&&i&&i.selectable&&this.selection&&(r!==i||r.type==="activeSelection")&&!i.onSelect({e:n})},_handleGrouping:function(n,i){var r=this._activeObject;r.__corner||i===r&&(i=this.findTarget(n,!0),!i||!i.selectable)||(r&&r.type==="activeSelection"?this._updateActiveSelection(i,n):this._createActiveSelection(i,n))},_updateActiveSelection:function(n,i){var r=this._activeObject,s=r._objects.slice(0);r.contains(n)?(r.removeWithUpdate(n),this._hoveredTarget=n,this._hoveredTargets=this.targets.concat(),r.size()===1&&this._setActiveObject(r.item(0),i)):(r.addWithUpdate(n),this._hoveredTarget=r,this._hoveredTargets=this.targets.concat()),this._fireSelectionEvents(s,i)},_createActiveSelection:function(n,i){var r=this.getActiveObjects(),s=this._createGroup(n);this._hoveredTarget=s,this._setActiveObject(s,i),this._fireSelectionEvents(r,i)},_createGroup:function(n){var i=this._objects,r=i.indexOf(this._activeObject)<i.indexOf(n),s=r?[this._activeObject,n]:[n,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new be.ActiveSelection(s,{canvas:this})},_groupSelectedObjects:function(n){var i=this._collectObjects(n),r;i.length===1?this.setActiveObject(i[0],n):i.length>1&&(r=new be.ActiveSelection(i.reverse(),{canvas:this}),this.setActiveObject(r,n))},_collectObjects:function(n){for(var i=[],r,s=this._groupSelector.ex,o=this._groupSelector.ey,a=s+this._groupSelector.left,l=o+this._groupSelector.top,c=new be.Point(t(s,a),t(o,l)),d=new be.Point(e(s,a),e(o,l)),u=!this.selectionFullyContained,m=s===a&&o===l,f=this._objects.length;f--&&(r=this._objects[f],!(!(!r||!r.selectable||!r.visible)&&(u&&r.intersectsWithRect(c,d,!0)||r.isContainedWithinRect(c,d,!0)||u&&r.containsPoint(c,null,!0)||u&&r.containsPoint(d,null,!0))&&(i.push(r),m))););return i.length>1&&(i=i.filter(function(_){return!_.onSelect({e:n})})),i},_maybeGroupObjects:function(n){this.selection&&this._groupSelector&&this._groupSelectedObjects(n),this.setCursor(this.defaultCursor),this._groupSelector=null}})})();(function(){be.util.object.extend(be.StaticCanvas.prototype,{toDataURL:function(t){t||(t={});var e=t.format||"png",n=t.quality||1,i=(t.multiplier||1)*(t.enableRetinaScaling?this.getRetinaScaling():1),r=this.toCanvasElement(i,t);return be.util.toDataURL(r,e,n)},toCanvasElement:function(t,e){t=t||1,e=e||{};var n=(e.width||this.width)*t,i=(e.height||this.height)*t,r=this.getZoom(),s=this.width,o=this.height,a=r*t,l=this.viewportTransform,c=(l[4]-(e.left||0))*t,d=(l[5]-(e.top||0))*t,u=this.interactive,m=[a,0,0,a,c,d],f=this.enableRetinaScaling,_=be.util.createCanvasElement(),x=this.contextTop;return _.width=n,_.height=i,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=m,this.width=n,this.height=i,this.calcViewportBoundaries(),this.renderCanvas(_.getContext("2d"),this._objects),this.viewportTransform=l,this.width=s,this.height=o,this.calcViewportBoundaries(),this.interactive=u,this.enableRetinaScaling=f,this.contextTop=x,_}})})();be.util.object.extend(be.StaticCanvas.prototype,{loadFromJSON:function(t,e,n){if(t){var i=typeof t=="string"?JSON.parse(t):be.util.object.clone(t),r=this,s=i.clipPath,o=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete i.clipPath,this._enlivenObjects(i.objects,function(a){r.clear(),r._setBgOverlay(i,function(){s?r._enlivenObjects([s],function(l){r.clipPath=l[0],r.__setupCanvas.call(r,i,a,o,e)}):r.__setupCanvas.call(r,i,a,o,e)})},n),this}},__setupCanvas:function(t,e,n,i){var r=this;e.forEach(function(s,o){r.insertAt(s,o)}),this.renderOnAddRemove=n,delete t.objects,delete t.backgroundImage,delete t.overlayImage,delete t.background,delete t.overlay,this._setOptions(t),this.renderAll(),i&&i()},_setBgOverlay:function(t,e){var n={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(!t.backgroundImage&&!t.overlayImage&&!t.background&&!t.overlay){e&&e();return}var i=function(){n.backgroundImage&&n.overlayImage&&n.backgroundColor&&n.overlayColor&&e&&e()};this.__setBgOverlay("backgroundImage",t.backgroundImage,n,i),this.__setBgOverlay("overlayImage",t.overlayImage,n,i),this.__setBgOverlay("backgroundColor",t.background,n,i),this.__setBgOverlay("overlayColor",t.overlay,n,i)},__setBgOverlay:function(t,e,n,i){var r=this;if(!e){n[t]=!0,i&&i();return}t==="backgroundImage"||t==="overlayImage"?be.util.enlivenObjects([e],function(s){r[t]=s[0],n[t]=!0,i&&i()}):this["set"+be.util.string.capitalize(t,!0)](e,function(){n[t]=!0,i&&i()})},_enlivenObjects:function(t,e,n){if(!t||t.length===0){e&&e([]);return}be.util.enlivenObjects(t,function(i){e&&e(i)},null,n)},_toDataURL:function(t,e){this.clone(function(n){e(n.toDataURL(t))})},_toDataURLWithMultiplier:function(t,e,n){this.clone(function(i){n(i.toDataURLWithMultiplier(t,e))})},clone:function(t,e){var n=JSON.stringify(this.toJSON(e));this.cloneWithoutData(function(i){i.loadFromJSON(n,function(){t&&t(i)})})},cloneWithoutData:function(t){var e=be.util.createCanvasElement();e.width=this.width,e.height=this.height;var n=new be.Canvas(e);this.backgroundImage?(n.setBackgroundImage(this.backgroundImage.src,function(){n.renderAll(),t&&t(n)}),n.backgroundImageOpacity=this.backgroundImageOpacity,n.backgroundImageStretch=this.backgroundImageStretch):t&&t(n)}});(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.util.object.clone,r=e.util.toFixed,s=e.util.string.capitalize,o=e.util.degreesToRadians,a=!e.isLikelyNode,l=2;e.Object||(e.Object=e.util.createClass(e.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,touchCornerSize:24,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgb(178,204,255)",borderDashArray:null,cornerColor:"rgb(178,204,255)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,perPixelTargetFind:!1,includeDefaultValues:!0,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:a,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",activeOn:"down",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),colorProperties:"fill stroke backgroundColor".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(c){c&&this.setOptions(c)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=e.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(c){var d=e.perfLimitSizeTotal,u=c.width,m=c.height,f=e.maxCacheSideLimit,_=e.minCacheSideLimit;if(u<=f&&m<=f&&u*m<=d)return u<_&&(c.width=_),m<_&&(c.height=_),c;var x=u/m,D=e.util.limitDimsByArea(x,d),E=e.util.capValue,M=E(_,D.x,f),I=E(_,D.y,f);return u>M&&(c.zoomX/=u/M,c.width=M,c.capped=!0),m>I&&(c.zoomY/=m/I,c.height=I,c.capped=!0),c},_getCacheCanvasDimensions:function(){var c=this.getTotalObjectScaling(),d=this._getTransformedDimensions(0,0),u=d.x*c.scaleX/this.scaleX,m=d.y*c.scaleY/this.scaleY;return{width:u+l,height:m+l,zoomX:c.scaleX,zoomY:c.scaleY,x:u,y:m}},_updateCacheCanvas:function(){var c=this.canvas;if(this.noScaleCache&&c&&c._currentTransform){var d=c._currentTransform.target,u=c._currentTransform.action;if(this===d&&u.slice&&u.slice(0,5)==="scale")return!1}var m=this._cacheCanvas,f=this._limitCacheSize(this._getCacheCanvasDimensions()),_=e.minCacheSideLimit,x=f.width,D=f.height,E,M,I=f.zoomX,z=f.zoomY,G=x!==this.cacheWidth||D!==this.cacheHeight,A=this.zoomX!==I||this.zoomY!==z,Y=G||A,X=0,ne=0,pe=!1;if(G){var ce=this._cacheCanvas.width,ie=this._cacheCanvas.height,le=x>ce||D>ie,Se=(x<ce*.9||D<ie*.9)&&ce>_&&ie>_;pe=le||Se,le&&!f.capped&&(x>_||D>_)&&(X=x*.1,ne=D*.1)}return this instanceof e.Text&&this.path&&(Y=!0,pe=!0,X+=this.getHeightOfLine(0)*this.zoomX,ne+=this.getHeightOfLine(0)*this.zoomY),Y?(pe?(m.width=Math.ceil(x+X),m.height=Math.ceil(D+ne)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,m.width,m.height)),E=f.x/2,M=f.y/2,this.cacheTranslationX=Math.round(m.width/2-E)+E,this.cacheTranslationY=Math.round(m.height/2-M)+M,this.cacheWidth=x,this.cacheHeight=D,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(I,z),this.zoomX=I,this.zoomY=z,!0):!1},setOptions:function(c){this._setOptions(c),this._initGradient(c.fill,"fill"),this._initGradient(c.stroke,"stroke"),this._initPattern(c.fill,"fill"),this._initPattern(c.stroke,"stroke")},transform:function(c){var d=this.group&&!this.group._transformDone||this.group&&this.canvas&&c===this.canvas.contextTop,u=this.calcTransformMatrix(!d);c.transform(u[0],u[1],u[2],u[3],u[4],u[5])},toObject:function(c){var d=e.Object.NUM_FRACTION_DIGITS,u={type:this.type,version:e.version,originX:this.originX,originY:this.originY,left:r(this.left,d),top:r(this.top,d),width:r(this.width,d),height:r(this.height,d),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:r(this.strokeWidth,d),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeUniform:this.strokeUniform,strokeMiterLimit:r(this.strokeMiterLimit,d),scaleX:r(this.scaleX,d),scaleY:r(this.scaleY,d),angle:r(this.angle,d),flipX:this.flipX,flipY:this.flipY,opacity:r(this.opacity,d),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,skewX:r(this.skewX,d),skewY:r(this.skewY,d)};return this.clipPath&&!this.clipPath.excludeFromExport&&(u.clipPath=this.clipPath.toObject(c),u.clipPath.inverted=this.clipPath.inverted,u.clipPath.absolutePositioned=this.clipPath.absolutePositioned),e.util.populateWithProperties(this,u,c),this.includeDefaultValues||(u=this._removeDefaultValues(u)),u},toDatalessObject:function(c){return this.toObject(c)},_removeDefaultValues:function(c){var d=e.util.getKlass(c.type).prototype,u=d.stateProperties;return u.forEach(function(m){m==="left"||m==="top"||(c[m]===d[m]&&delete c[m],Array.isArray(c[m])&&Array.isArray(d[m])&&c[m].length===0&&d[m].length===0&&delete c[m])}),c},toString:function(){return"#<fabric."+s(this.type)+">"},getObjectScaling:function(){if(!this.group)return{scaleX:this.scaleX,scaleY:this.scaleY};var c=e.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(c.scaleX),scaleY:Math.abs(c.scaleY)}},getTotalObjectScaling:function(){var c=this.getObjectScaling(),d=c.scaleX,u=c.scaleY;if(this.canvas){var m=this.canvas.getZoom(),f=this.canvas.getRetinaScaling();d*=m*f,u*=m*f}return{scaleX:d,scaleY:u}},getObjectOpacity:function(){var c=this.opacity;return this.group&&(c*=this.group.getObjectOpacity()),c},_set:function(c,d){var u=c==="scaleX"||c==="scaleY",m=this[c]!==d,f=!1;return u&&(d=this._constrainScale(d)),c==="scaleX"&&d<0?(this.flipX=!this.flipX,d*=-1):c==="scaleY"&&d<0?(this.flipY=!this.flipY,d*=-1):c==="shadow"&&d&&!(d instanceof e.Shadow)?d=new e.Shadow(d):c==="dirty"&&this.group&&this.group.set("dirty",d),this[c]=d,m&&(f=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(c)>-1?(this.dirty=!0,f&&this.group.set("dirty",!0)):f&&this.stateProperties.indexOf(c)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:e.iMatrix.concat()},isNotVisible:function(){return this.opacity===0||!this.width&&!this.height&&this.strokeWidth===0||!this.visible},render:function(c){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(c.save(),this._setupCompositeOperation(c),this.drawSelectionBackground(c),this.transform(c),this._setOpacity(c),this._setShadow(c,this),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(c)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(c),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),c.restore())},renderCache:function(c){c=c||{},(!this._cacheCanvas||!this._cacheContext)&&this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,c.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this._cacheContext=null,this.cacheWidth=0,this.cacheHeight=0},hasStroke:function(){return this.stroke&&this.stroke!=="transparent"&&this.strokeWidth!==0},hasFill:function(){return this.fill&&this.fill!=="transparent"},needsItsOwnCache:function(){return!!(this.paintFirst==="stroke"&&this.hasFill()&&this.hasStroke()&&typeof this.shadow=="object"||this.clipPath)},shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(this.shadow.offsetX!==0||this.shadow.offsetY!==0)},drawClipPathOnCache:function(c,d){if(c.save(),d.inverted?c.globalCompositeOperation="destination-out":c.globalCompositeOperation="destination-in",d.absolutePositioned){var u=e.util.invertTransform(this.calcTransformMatrix());c.transform(u[0],u[1],u[2],u[3],u[4],u[5])}d.transform(c),c.scale(1/d.zoomX,1/d.zoomY),c.drawImage(d._cacheCanvas,-d.cacheTranslationX,-d.cacheTranslationY),c.restore()},drawObject:function(c,d){var u=this.fill,m=this.stroke;d?(this.fill="black",this.stroke="",this._setClippingProperties(c)):this._renderBackground(c),this._render(c),this._drawClipPath(c,this.clipPath),this.fill=u,this.stroke=m},_drawClipPath:function(c,d){d&&(d.canvas=this.canvas,d.shouldCache(),d._transformDone=!0,d.renderCache({forClipping:!0}),this.drawClipPathOnCache(c,d))},drawCacheOnCanvas:function(c){c.scale(1/this.zoomX,1/this.zoomY),c.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(c){if(this.isNotVisible())return!1;if(this._cacheCanvas&&this._cacheContext&&!c&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&this._cacheContext&&!c){var d=this.cacheWidth/this.zoomX,u=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-d/2,-u/2,d,u)}return!0}return!1},_renderBackground:function(c){if(this.backgroundColor){var d=this._getNonTransformedDimensions();c.fillStyle=this.backgroundColor,c.fillRect(-d.x/2,-d.y/2,d.x,d.y),this._removeShadow(c)}},_setOpacity:function(c){this.group&&!this.group._transformDone?c.globalAlpha=this.getObjectOpacity():c.globalAlpha*=this.opacity},_setStrokeStyles:function(c,d){var u=d.stroke;u&&(c.lineWidth=d.strokeWidth,c.lineCap=d.strokeLineCap,c.lineDashOffset=d.strokeDashOffset,c.lineJoin=d.strokeLineJoin,c.miterLimit=d.strokeMiterLimit,u.toLive?u.gradientUnits==="percentage"||u.gradientTransform||u.patternTransform?this._applyPatternForTransformedGradient(c,u):(c.strokeStyle=u.toLive(c,this),this._applyPatternGradientTransform(c,u)):c.strokeStyle=d.stroke)},_setFillStyles:function(c,d){var u=d.fill;u&&(u.toLive?(c.fillStyle=u.toLive(c,this),this._applyPatternGradientTransform(c,d.fill)):c.fillStyle=u)},_setClippingProperties:function(c){c.globalAlpha=1,c.strokeStyle="transparent",c.fillStyle="#000000"},_setLineDash:function(c,d){!d||d.length===0||(1&d.length&&d.push.apply(d,d),c.setLineDash(d))},_renderControls:function(c,d){var u=this.getViewportTransform(),m=this.calcTransformMatrix(),f,_,x;d=d||{},_=typeof d.hasBorders<"u"?d.hasBorders:this.hasBorders,x=typeof d.hasControls<"u"?d.hasControls:this.hasControls,m=e.util.multiplyTransformMatrices(u,m),f=e.util.qrDecompose(m),c.save(),c.translate(f.translateX,f.translateY),c.lineWidth=1*this.borderScaleFactor,this.group||(c.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),this.flipX&&(f.angle-=180),c.rotate(o(this.group?f.angle:this.angle)),d.forActiveSelection||this.group?_&&this.drawBordersInGroup(c,f,d):_&&this.drawBorders(c,d),x&&this.drawControls(c,d),c.restore()},_setShadow:function(c){if(this.shadow){var d=this.shadow,u=this.canvas,m,f=u&&u.viewportTransform[0]||1,_=u&&u.viewportTransform[3]||1;d.nonScaling?m={scaleX:1,scaleY:1}:m=this.getObjectScaling(),u&&u._isRetinaScaling()&&(f*=e.devicePixelRatio,_*=e.devicePixelRatio),c.shadowColor=d.color,c.shadowBlur=d.blur*e.browserShadowBlurConstant*(f+_)*(m.scaleX+m.scaleY)/4,c.shadowOffsetX=d.offsetX*f*m.scaleX,c.shadowOffsetY=d.offsetY*_*m.scaleY}},_removeShadow:function(c){this.shadow&&(c.shadowColor="",c.shadowBlur=c.shadowOffsetX=c.shadowOffsetY=0)},_applyPatternGradientTransform:function(c,d){if(!d||!d.toLive)return{offsetX:0,offsetY:0};var u=d.gradientTransform||d.patternTransform,m=-this.width/2+d.offsetX||0,f=-this.height/2+d.offsetY||0;return d.gradientUnits==="percentage"?c.transform(this.width,0,0,this.height,m,f):c.transform(1,0,0,1,m,f),u&&c.transform(u[0],u[1],u[2],u[3],u[4],u[5]),{offsetX:m,offsetY:f}},_renderPaintInOrder:function(c){this.paintFirst==="stroke"?(this._renderStroke(c),this._renderFill(c)):(this._renderFill(c),this._renderStroke(c))},_render:function(){},_renderFill:function(c){this.fill&&(c.save(),this._setFillStyles(c,this),this.fillRule==="evenodd"?c.fill("evenodd"):c.fill(),c.restore())},_renderStroke:function(c){if(!(!this.stroke||this.strokeWidth===0)){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(c),c.save(),this.strokeUniform&&this.group){var d=this.getObjectScaling();c.scale(1/d.scaleX,1/d.scaleY)}else this.strokeUniform&&c.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(c,this.strokeDashArray),this._setStrokeStyles(c,this),c.stroke(),c.restore()}},_applyPatternForTransformedGradient:function(c,d){var u=this._limitCacheSize(this._getCacheCanvasDimensions()),m=e.util.createCanvasElement(),f,_=this.canvas.getRetinaScaling(),x=u.x/this.scaleX/_,D=u.y/this.scaleY/_;m.width=Math.ceil(x),m.height=Math.ceil(D),f=m.getContext("2d"),f.beginPath(),f.moveTo(0,0),f.lineTo(x,0),f.lineTo(x,D),f.lineTo(0,D),f.closePath(),f.translate(x/2,D/2),f.scale(u.zoomX/this.scaleX/_,u.zoomY/this.scaleY/_),this._applyPatternGradientTransform(f,d),f.fillStyle=d.toLive(c),f.fill(),c.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),c.scale(_*this.scaleX/u.zoomX,_*this.scaleY/u.zoomY),c.strokeStyle=f.createPattern(m,"no-repeat")},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var c=e.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",c.scaleX),this.set("scaleY",c.scaleY),this.angle=c.angle,this.skewX=c.skewX,this.skewY=0}},_removeTransformMatrix:function(c){var d=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),d=e.util.transformPoint(d,this.transformMatrix)),this.transformMatrix=null,c&&(this.scaleX*=c.scaleX,this.scaleY*=c.scaleY,this.cropX=c.cropX,this.cropY=c.cropY,d.x+=c.offsetLeft,d.y+=c.offsetTop,this.width=c.width,this.height=c.height),this.setPositionByOrigin(d,"center","center")},clone:function(c,d){var u=this.toObject(d);this.constructor.fromObject?this.constructor.fromObject(u,c):e.Object._fromObject("Object",u,c)},cloneAsImage:function(c,d){var u=this.toCanvasElement(d);return c&&c(new e.Image(u)),this},toCanvasElement:function(c){c||(c={});var d=e.util,u=d.saveObjectTransform(this),m=this.group,f=this.shadow,_=Math.abs,x=(c.multiplier||1)*(c.enableRetinaScaling?e.devicePixelRatio:1);delete this.group,c.withoutTransform&&d.resetObjectTransform(this),c.withoutShadow&&(this.shadow=null);var D=e.util.createCanvasElement(),E=this.getBoundingRect(!0,!0),M=this.shadow,I,z={x:0,y:0},G,A,Y;M&&(G=M.blur,M.nonScaling?I={scaleX:1,scaleY:1}:I=this.getObjectScaling(),z.x=2*Math.round(_(M.offsetX)+G)*_(I.scaleX),z.y=2*Math.round(_(M.offsetY)+G)*_(I.scaleY)),A=E.width+z.x,Y=E.height+z.y,D.width=Math.ceil(A),D.height=Math.ceil(Y);var X=new e.StaticCanvas(D,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});c.format==="jpeg"&&(X.backgroundColor="#fff"),this.setPositionByOrigin(new e.Point(X.width/2,X.height/2),"center","center");var ne=this.canvas;X.add(this);var pe=X.toCanvasElement(x||1,c);return this.shadow=f,this.set("canvas",ne),m&&(this.group=m),this.set(u).setCoords(),X._objects=[],X.dispose(),X=null,pe},toDataURL:function(c){return c||(c={}),e.util.toDataURL(this.toCanvasElement(c),c.format||"png",c.quality||1)},isType:function(c){return arguments.length>1?Array.from(arguments).includes(this.type):this.type===c},complexity:function(){return 1},toJSON:function(c){return this.toObject(c)},rotate:function(c){var d=(this.originX!=="center"||this.originY!=="center")&&this.centeredRotation;return d&&this._setOriginToCenter(),this.set("angle",c),d&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(c,d){d=d||this.canvas.getPointer(c);var u=new e.Point(d.x,d.y),m=this._getLeftTopCoords();return this.angle&&(u=e.util.rotatePoint(u,m,o(-this.angle))),{x:u.x-m.x,y:u.y-m.y}},_setupCompositeOperation:function(c){this.globalCompositeOperation&&(c.globalCompositeOperation=this.globalCompositeOperation)},dispose:function(){e.runningAnimations&&e.runningAnimations.cancelByTarget(this)}}),e.util.createAccessors&&e.util.createAccessors(e.Object),n(e.Object.prototype,e.Observable),e.Object.NUM_FRACTION_DIGITS=2,e.Object.ENLIVEN_PROPS=["clipPath"],e.Object._fromObject=function(c,d,u,m){var f=e[c];d=i(d,!0),e.util.enlivenPatterns([d.fill,d.stroke],function(_){typeof _[0]<"u"&&(d.fill=_[0]),typeof _[1]<"u"&&(d.stroke=_[1]),e.util.enlivenObjectEnlivables(d,d,function(){var x=m?new f(d[m],d):new f(d);u&&u(x)})})},e.Object.__uid=0)})(vn);(function(){var t=be.util.degreesToRadians,e={left:-.5,center:0,right:.5},n={top:-.5,center:0,bottom:.5};be.util.object.extend(be.Object.prototype,{translateToGivenOrigin:function(i,r,s,o,a){var l=i.x,c=i.y,d,u,m;return typeof r=="string"?r=e[r]:r-=.5,typeof o=="string"?o=e[o]:o-=.5,d=o-r,typeof s=="string"?s=n[s]:s-=.5,typeof a=="string"?a=n[a]:a-=.5,u=a-s,(d||u)&&(m=this._getTransformedDimensions(),l=i.x+d*m.x,c=i.y+u*m.y),new be.Point(l,c)},translateToCenterPoint:function(i,r,s){var o=this.translateToGivenOrigin(i,r,s,"center","center");return this.angle?be.util.rotatePoint(o,i,t(this.angle)):o},translateToOriginPoint:function(i,r,s){var o=this.translateToGivenOrigin(i,"center","center",r,s);return this.angle?be.util.rotatePoint(o,i,t(this.angle)):o},getCenterPoint:function(){var i=new be.Point(this.left,this.top);return this.translateToCenterPoint(i,this.originX,this.originY)},getPointByOrigin:function(i,r){var s=this.getCenterPoint();return this.translateToOriginPoint(s,i,r)},toLocalPoint:function(i,r,s){var o=this.getCenterPoint(),a,l;return typeof r<"u"&&typeof s<"u"?a=this.translateToGivenOrigin(o,"center","center",r,s):a=new be.Point(this.left,this.top),l=new be.Point(i.x,i.y),this.angle&&(l=be.util.rotatePoint(l,o,-t(this.angle))),l.subtractEquals(a)},setPositionByOrigin:function(i,r,s){var o=this.translateToCenterPoint(i,r,s),a=this.translateToOriginPoint(o,this.originX,this.originY);this.set("left",a.x),this.set("top",a.y)},adjustPosition:function(i){var r=t(this.angle),s=this.getScaledWidth(),o=be.util.cos(r)*s,a=be.util.sin(r)*s,l,c;typeof this.originX=="string"?l=e[this.originX]:l=this.originX-.5,typeof i=="string"?c=e[i]:c=i-.5,this.left+=o*(c-l),this.top+=a*(c-l),this.setCoords(),this.originX=i},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var i=this.getCenterPoint();this.originX="center",this.originY="center",this.left=i.x,this.top=i.y},_resetOrigin:function(){var i=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=i.x,this.top=i.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}})})();(function(){function t(s){return[new be.Point(s.tl.x,s.tl.y),new be.Point(s.tr.x,s.tr.y),new be.Point(s.br.x,s.br.y),new be.Point(s.bl.x,s.bl.y)]}var e=be.util,n=e.degreesToRadians,i=e.multiplyTransformMatrices,r=e.transformPoint;e.object.extend(be.Object.prototype,{oCoords:null,aCoords:null,lineCoords:null,ownMatrixCache:null,matrixCache:null,controls:{},_getCoords:function(s,o){return o?s?this.calcACoords():this.calcLineCoords():((!this.aCoords||!this.lineCoords)&&this.setCoords(!0),s?this.aCoords:this.lineCoords)},getCoords:function(s,o){return t(this._getCoords(s,o))},intersectsWithRect:function(s,o,a,l){var c=this.getCoords(a,l),d=be.Intersection.intersectPolygonRectangle(c,s,o);return d.status==="Intersection"},intersectsWithObject:function(s,o,a){var l=be.Intersection.intersectPolygonPolygon(this.getCoords(o,a),s.getCoords(o,a));return l.status==="Intersection"||s.isContainedWithinObject(this,o,a)||this.isContainedWithinObject(s,o,a)},isContainedWithinObject:function(s,o,a){for(var l=this.getCoords(o,a),c=o?s.aCoords:s.lineCoords,d=0,u=s._getImageLines(c);d<4;d++)if(!s.containsPoint(l[d],u))return!1;return!0},isContainedWithinRect:function(s,o,a,l){var c=this.getBoundingRect(a,l);return c.left>=s.x&&c.left+c.width<=o.x&&c.top>=s.y&&c.top+c.height<=o.y},containsPoint:function(s,d,a,l){var c=this._getCoords(a,l),d=d||this._getImageLines(c),u=this._findCrossPoints(s,d);return u!==0&&u%2===1},isOnScreen:function(s){if(!this.canvas)return!1;var o=this.canvas.vptCoords.tl,a=this.canvas.vptCoords.br,l=this.getCoords(!0,s);return l.some(function(c){return c.x<=a.x&&c.x>=o.x&&c.y<=a.y&&c.y>=o.y})||this.intersectsWithRect(o,a,!0,s)?!0:this._containsCenterOfCanvas(o,a,s)},_containsCenterOfCanvas:function(s,o,a){var l={x:(s.x+o.x)/2,y:(s.y+o.y)/2};return!!this.containsPoint(l,null,!0,a)},isPartiallyOnScreen:function(s){if(!this.canvas)return!1;var o=this.canvas.vptCoords.tl,a=this.canvas.vptCoords.br;if(this.intersectsWithRect(o,a,!0,s))return!0;var l=this.getCoords(!0,s).every(function(c){return(c.x>=a.x||c.x<=o.x)&&(c.y>=a.y||c.y<=o.y)});return l&&this._containsCenterOfCanvas(o,a,s)},_getImageLines:function(s){var o={topline:{o:s.tl,d:s.tr},rightline:{o:s.tr,d:s.br},bottomline:{o:s.br,d:s.bl},leftline:{o:s.bl,d:s.tl}};return o},_findCrossPoints:function(s,o){var a,l,c,d,u,m=0,f;for(var _ in o)if(f=o[_],!(f.o.y<s.y&&f.d.y<s.y)&&!(f.o.y>=s.y&&f.d.y>=s.y)&&(f.o.x===f.d.x&&f.o.x>=s.x?u=f.o.x:(a=0,l=(f.d.y-f.o.y)/(f.d.x-f.o.x),c=s.y-a*s.x,d=f.o.y-l*f.o.x,u=-(c-d)/(a-l)),u>=s.x&&(m+=1),m===2))break;return m},getBoundingRect:function(s,o){var a=this.getCoords(s,o);return e.makeBoundingBoxFromPoints(a)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(s){return Math.abs(s)<this.minScaleLimit?s<0?-this.minScaleLimit:this.minScaleLimit:s===0?1e-4:s},scale:function(s){return this._set("scaleX",s),this._set("scaleY",s),this.setCoords()},scaleToWidth:function(s,o){var a=this.getBoundingRect(o).width/this.getScaledWidth();return this.scale(s/this.width/a)},scaleToHeight:function(s,o){var a=this.getBoundingRect(o).height/this.getScaledHeight();return this.scale(s/this.height/a)},calcLineCoords:function(){var s=this.getViewportTransform(),o=this.padding,a=n(this.angle),l=e.cos(a),c=e.sin(a),d=l*o,u=c*o,m=d+u,f=d-u,_=this.calcACoords(),x={tl:r(_.tl,s),tr:r(_.tr,s),bl:r(_.bl,s),br:r(_.br,s)};return o&&(x.tl.x-=f,x.tl.y-=m,x.tr.x+=m,x.tr.y-=f,x.bl.x-=m,x.bl.y+=f,x.br.x+=f,x.br.y+=m),x},calcOCoords:function(){var s=this._calcRotateMatrix(),o=this._calcTranslateMatrix(),a=this.getViewportTransform(),l=i(a,o),c=i(l,s),c=i(c,[1/a[0],0,0,1/a[3],0,0]),d=this._calculateCurrentDimensions(),u={};return this.forEachControl(function(m,f,_){u[f]=m.positionHandler(d,c,_)}),u},calcACoords:function(){var s=this._calcRotateMatrix(),o=this._calcTranslateMatrix(),a=i(o,s),l=this._getTransformedDimensions(),c=l.x/2,d=l.y/2;return{tl:r({x:-c,y:-d},a),tr:r({x:c,y:-d},a),bl:r({x:-c,y:d},a),br:r({x:c,y:d},a)}},setCoords:function(s){return this.aCoords=this.calcACoords(),this.lineCoords=this.group?this.aCoords:this.calcLineCoords(),s?this:(this.oCoords=this.calcOCoords(),this._setCornerCoords&&this._setCornerCoords(),this)},_calcRotateMatrix:function(){return e.calcRotateMatrix(this)},_calcTranslateMatrix:function(){var s=this.getCenterPoint();return[1,0,0,1,s.x,s.y]},transformMatrixKey:function(s){var o="_",a="";return!s&&this.group&&(a=this.group.transformMatrixKey(s)+o),a+this.top+o+this.left+o+this.scaleX+o+this.scaleY+o+this.skewX+o+this.skewY+o+this.angle+o+this.originX+o+this.originY+o+this.width+o+this.height+o+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(s){var o=this.calcOwnMatrix();if(s||!this.group)return o;var a=this.transformMatrixKey(s),l=this.matrixCache||(this.matrixCache={});return l.key===a?l.value:(this.group&&(o=i(this.group.calcTransformMatrix(!1),o)),l.key=a,l.value=o,o)},calcOwnMatrix:function(){var s=this.transformMatrixKey(!0),o=this.ownMatrixCache||(this.ownMatrixCache={});if(o.key===s)return o.value;var a=this._calcTranslateMatrix(),l={angle:this.angle,translateX:a[4],translateY:a[5],scaleX:this.scaleX,scaleY:this.scaleY,skewX:this.skewX,skewY:this.skewY,flipX:this.flipX,flipY:this.flipY};return o.key=s,o.value=e.composeMatrix(l),o.value},_getNonTransformedDimensions:function(){var s=this.strokeWidth,o=this.width+s,a=this.height+s;return{x:o,y:a}},_getTransformedDimensions:function(s,o){typeof s>"u"&&(s=this.skewX),typeof o>"u"&&(o=this.skewY);var a,l,c,d=s===0&&o===0;if(this.strokeUniform?(l=this.width,c=this.height):(a=this._getNonTransformedDimensions(),l=a.x,c=a.y),d)return this._finalizeDimensions(l*this.scaleX,c*this.scaleY);var u=e.sizeAfterTransform(l,c,{scaleX:this.scaleX,scaleY:this.scaleY,skewX:s,skewY:o});return this._finalizeDimensions(u.x,u.y)},_finalizeDimensions:function(s,o){return this.strokeUniform?{x:s+this.strokeWidth,y:o+this.strokeWidth}:{x:s,y:o}},_calculateCurrentDimensions:function(){var s=this.getViewportTransform(),o=this._getTransformedDimensions(),a=r(o,s,!0);return a.scalarAdd(2*this.padding)}})})();be.util.object.extend(be.Object.prototype,{sendToBack:function(){return this.group?be.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?be.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(t){return this.group?be.StaticCanvas.prototype.sendBackwards.call(this.group,this,t):this.canvas&&this.canvas.sendBackwards(this,t),this},bringForward:function(t){return this.group?be.StaticCanvas.prototype.bringForward.call(this.group,this,t):this.canvas&&this.canvas.bringForward(this,t),this},moveTo:function(t){return this.group&&this.group.type!=="activeSelection"?be.StaticCanvas.prototype.moveTo.call(this.group,this,t):this.canvas&&this.canvas.moveTo(this,t),this}});(function(){function t(n,i){if(i){if(i.toLive)return n+": url(#SVGID_"+i.id+"); ";var r=new be.Color(i),s=n+": "+r.toRgb()+"; ",o=r.getAlpha();return o!==1&&(s+=n+"-opacity: "+o.toString()+"; "),s}else return n+": none; "}var e=be.util.toFixed;be.util.object.extend(be.Object.prototype,{getSvgStyles:function(n){var i=this.fillRule?this.fillRule:"nonzero",r=this.strokeWidth?this.strokeWidth:"0",s=this.strokeDashArray?this.strokeDashArray.join(" "):"none",o=this.strokeDashOffset?this.strokeDashOffset:"0",a=this.strokeLineCap?this.strokeLineCap:"butt",l=this.strokeLineJoin?this.strokeLineJoin:"miter",c=this.strokeMiterLimit?this.strokeMiterLimit:"4",d=typeof this.opacity<"u"?this.opacity:"1",u=this.visible?"":" visibility: hidden;",m=n?"":this.getSvgFilter(),f=t("fill",this.fill),_=t("stroke",this.stroke);return[_,"stroke-width: ",r,"; ","stroke-dasharray: ",s,"; ","stroke-linecap: ",a,"; ","stroke-dashoffset: ",o,"; ","stroke-linejoin: ",l,"; ","stroke-miterlimit: ",c,"; ",f,"fill-rule: ",i,"; ","opacity: ",d,";",m,u].join("")},getSvgSpanStyles:function(n,i){var r="; ",o=n.fontFamily?"font-family: "+(n.fontFamily.indexOf("'")===-1&&n.fontFamily.indexOf('"')===-1?"'"+n.fontFamily+"'":n.fontFamily)+r:"",s=n.strokeWidth?"stroke-width: "+n.strokeWidth+r:"",o=o,a=n.fontSize?"font-size: "+n.fontSize+"px"+r:"",l=n.fontStyle?"font-style: "+n.fontStyle+r:"",c=n.fontWeight?"font-weight: "+n.fontWeight+r:"",d=n.fill?t("fill",n.fill):"",u=n.stroke?t("stroke",n.stroke):"",m=this.getSvgTextDecoration(n),f=n.deltaY?"baseline-shift: "+-n.deltaY+"; ":"";return m&&(m="text-decoration: "+m+r),[u,s,o,a,l,c,m,d,f,i?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(n){return["overline","underline","line-through"].filter(function(i){return n[i.replace("-","")]}).join(" ")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(n,i){var r=n?this.calcTransformMatrix():this.calcOwnMatrix(),s='transform="'+be.util.matrixToSVG(r);return s+(i||"")+'" '},_setSVGBg:function(n){if(this.backgroundColor){var i=be.Object.NUM_FRACTION_DIGITS;n.push("		<rect ",this._getFillAttributes(this.backgroundColor),' x="',e(-this.width/2,i),'" y="',e(-this.height/2,i),'" width="',e(this.width,i),'" height="',e(this.height,i),`"></rect>
`)}},toSVG:function(n){return this._createBaseSVGMarkup(this._toSVG(n),{reviver:n})},toClipPathSVG:function(n){return"	"+this._createBaseClipPathSVGMarkup(this._toSVG(n),{reviver:n})},_createBaseClipPathSVGMarkup:function(n,i){i=i||{};var r=i.reviver,s=i.additionalTransform||"",o=[this.getSvgTransform(!0,s),this.getSvgCommons()].join(""),a=n.indexOf("COMMON_PARTS");return n[a]=o,r?r(n.join("")):n.join("")},_createBaseSVGMarkup:function(n,i){i=i||{};var r=i.noStyle,s=i.reviver,o=r?"":'style="'+this.getSvgStyles()+'" ',a=i.withShadow?'style="'+this.getSvgFilter()+'" ':"",l=this.clipPath,c=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",d=l&&l.absolutePositioned,u=this.stroke,m=this.fill,f=this.shadow,_,x=[],D,E=n.indexOf("COMMON_PARTS"),M=i.additionalTransform;return l&&(l.clipPathId="CLIPPATH_"+be.Object.__uid++,D='<clipPath id="'+l.clipPathId+`" >
`+l.toClipPathSVG(s)+`</clipPath>
`),d&&x.push("<g ",a,this.getSvgCommons(),` >
`),x.push("<g ",this.getSvgTransform(!1),d?"":a+this.getSvgCommons(),` >
`),_=[o,c,r?"":this.addPaintOrder()," ",M?'transform="'+M+'" ':""].join(""),n[E]=_,m&&m.toLive&&x.push(m.toSVG(this)),u&&u.toLive&&x.push(u.toSVG(this)),f&&x.push(f.toSVG(this)),l&&x.push(D),x.push(n.join("")),x.push(`</g>
`),d&&x.push(`</g>
`),s?s(x.join("")):x.join("")},addPaintOrder:function(){return this.paintFirst!=="fill"?' paint-order="'+this.paintFirst+'" ':""}})})();(function(){var t=be.util.object.extend,e="stateProperties";function n(r,s,o){var a={},l=!0;o.forEach(function(c){a[c]=r[c]}),t(r[s],a,l)}function i(r,s,o){if(r===s)return!0;if(Array.isArray(r)){if(!Array.isArray(s)||r.length!==s.length)return!1;for(var a=0,l=r.length;a<l;a++)if(!i(r[a],s[a]))return!1;return!0}else if(r&&typeof r=="object"){var c=Object.keys(r),d;if(!s||typeof s!="object"||!o&&c.length!==Object.keys(s).length)return!1;for(var a=0,l=c.length;a<l;a++)if(d=c[a],!(d==="canvas"||d==="group")&&!i(r[d],s[d]))return!1;return!0}}be.util.object.extend(be.Object.prototype,{hasStateChanged:function(r){r=r||e;var s="_"+r;return Object.keys(this[s]).length<this[r].length?!0:!i(this[s],this,!0)},saveState:function(r){var s=r&&r.propertySet||e,o="_"+s;return this[o]?(n(this,o,this[s]),r&&r.stateProperties&&n(this,o,r.stateProperties),this):this.setupState(r)},setupState:function(r){r=r||{};var s=r.propertySet||e;return r.propertySet=s,this["_"+s]={},this.saveState(r),this}})})();(function(){var t=be.util.degreesToRadians;be.util.object.extend(be.Object.prototype,{_findTargetCorner:function(e,n){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var i=e.x,r=e.y,s,o,a=Object.keys(this.oCoords),l=a.length-1,c;for(this.__corner=0;l>=0;l--)if(c=a[l],!!this.isControlVisible(c)&&(o=this._getImageLines(n?this.oCoords[c].touchCorner:this.oCoords[c].corner),s=this._findCrossPoints({x:i,y:r},o),s!==0&&s%2===1))return this.__corner=c,c;return!1},forEachControl:function(e){for(var n in this.controls)e(this.controls[n],n,this)},_setCornerCoords:function(){var e=this.oCoords;for(var n in e){var i=this.controls[n];e[n].corner=i.calcCornerCoords(this.angle,this.cornerSize,e[n].x,e[n].y,!1),e[n].touchCorner=i.calcCornerCoords(this.angle,this.touchCornerSize,e[n].x,e[n].y,!0)}},drawSelectionBackground:function(e){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;e.save();var n=this.getCenterPoint(),i=this._calculateCurrentDimensions(),r=this.canvas.viewportTransform;return e.translate(n.x,n.y),e.scale(1/r[0],1/r[3]),e.rotate(t(this.angle)),e.fillStyle=this.selectionBackgroundColor,e.fillRect(-i.x/2,-i.y/2,i.x,i.y),e.restore(),this},drawBorders:function(e,n){n=n||{};var i=this._calculateCurrentDimensions(),r=this.borderScaleFactor,s=i.x+r,o=i.y+r,a=typeof n.hasControls<"u"?n.hasControls:this.hasControls,l=!1;return e.save(),e.strokeStyle=n.borderColor||this.borderColor,this._setLineDash(e,n.borderDashArray||this.borderDashArray),e.strokeRect(-s/2,-o/2,s,o),a&&(e.beginPath(),this.forEachControl(function(c,d,u){c.withConnection&&c.getVisibility(u,d)&&(l=!0,e.moveTo(c.x*s,c.y*o),e.lineTo(c.x*s+c.offsetX,c.y*o+c.offsetY))}),l&&e.stroke()),e.restore(),this},drawBordersInGroup:function(e,n,i){i=i||{};var r=be.util.sizeAfterTransform(this.width,this.height,n),s=this.strokeWidth,o=this.strokeUniform,a=this.borderScaleFactor,l=r.x+s*(o?this.canvas.getZoom():n.scaleX)+a,c=r.y+s*(o?this.canvas.getZoom():n.scaleY)+a;return e.save(),this._setLineDash(e,i.borderDashArray||this.borderDashArray),e.strokeStyle=i.borderColor||this.borderColor,e.strokeRect(-l/2,-c/2,l,c),e.restore(),this},drawControls:function(e,n){n=n||{},e.save();var i=1,r,s;return this.canvas&&(i=this.canvas.getRetinaScaling()),e.setTransform(i,0,0,i,0,0),e.strokeStyle=e.fillStyle=n.cornerColor||this.cornerColor,this.transparentCorners||(e.strokeStyle=n.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(e,n.cornerDashArray||this.cornerDashArray),this.setCoords(),this.group&&(r=this.group.calcTransformMatrix()),this.forEachControl(function(o,a,l){s=l.oCoords[a],o.getVisibility(l,a)&&(r&&(s=be.util.transformPoint(s,r)),o.render(e,s.x,s.y,n,l))}),e.restore(),this},isControlVisible:function(e){return this.controls[e]&&this.controls[e].getVisibility(this,e)},setControlVisible:function(e,n){return this._controlsVisibility||(this._controlsVisibility={}),this._controlsVisibility[e]=n,this},setControlsVisibility:function(e){e||(e={});for(var n in e)this.setControlVisible(n,e[n]);return this},onDeselect:function(){},onSelect:function(){}})})();be.util.object.extend(be.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(t,e){e=e||{};var n=function(){},i=e.onComplete||n,r=e.onChange||n,s=this;return be.util.animate({target:this,startValue:t.left,endValue:this.getCenterPoint().x,duration:this.FX_DURATION,onChange:function(o){t.set("left",o),s.requestRenderAll(),r()},onComplete:function(){t.setCoords(),i()}})},fxCenterObjectV:function(t,e){e=e||{};var n=function(){},i=e.onComplete||n,r=e.onChange||n,s=this;return be.util.animate({target:this,startValue:t.top,endValue:this.getCenterPoint().y,duration:this.FX_DURATION,onChange:function(o){t.set("top",o),s.requestRenderAll(),r()},onComplete:function(){t.setCoords(),i()}})},fxRemove:function(t,e){e=e||{};var n=function(){},i=e.onComplete||n,r=e.onChange||n,s=this;return be.util.animate({target:this,startValue:t.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(o){t.set("opacity",o),s.requestRenderAll(),r()},onComplete:function(){s.remove(t),i()}})}});be.util.object.extend(be.Object.prototype,{animate:function(){if(arguments[0]&&typeof arguments[0]=="object"){var t=[],e,n,i=[];for(e in arguments[0])t.push(e);for(var r=0,s=t.length;r<s;r++)e=t[r],n=r!==s-1,i.push(this._animate(e,arguments[0][e],arguments[1],n));return i}else return this._animate.apply(this,arguments)},_animate:function(t,e,n,i){var r=this,s;e=e.toString(),n?n=be.util.object.clone(n):n={},~t.indexOf(".")&&(s=t.split("."));var o=r.colorProperties.indexOf(t)>-1||s&&r.colorProperties.indexOf(s[1])>-1,a=s?this.get(s[0])[s[1]]:this.get(t);"from"in n||(n.from=a),o||(~e.indexOf("=")?e=a+parseFloat(e.replace("=","")):e=parseFloat(e));var l={target:this,startValue:n.from,endValue:e,byValue:n.by,easing:n.easing,duration:n.duration,abort:n.abort&&function(c,d,u){return n.abort.call(r,c,d,u)},onChange:function(c,d,u){s?r[s[0]][s[1]]=c:r.set(t,c),!i&&n.onChange&&n.onChange(c,d,u)},onComplete:function(c,d,u){i||(r.setCoords(),n.onComplete&&n.onComplete(c,d,u))}};return o?be.util.animateColor(l.startValue,l.endValue,l.duration,l):be.util.animate(l)}});(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.util.object.clone,r={x1:1,x2:1,y1:1,y2:1};if(e.Line){e.warn("fabric.Line is already defined");return}e.Line=e.util.createClass(e.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:e.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(o,a){o||(o=[0,0,0,0]),this.callSuper("initialize",a),this.set("x1",o[0]),this.set("y1",o[1]),this.set("x2",o[2]),this.set("y2",o[3]),this._setWidthHeight(a)},_setWidthHeight:function(o){o||(o={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in o?o.left:this._getLeftToOriginX(),this.top="top"in o?o.top:this._getTopToOriginY()},_set:function(o,a){return this.callSuper("_set",o,a),typeof r[o]<"u"&&this._setWidthHeight(),this},_getLeftToOriginX:s({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:s({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(o){o.beginPath();var a=this.calcLinePoints();o.moveTo(a.x1,a.y1),o.lineTo(a.x2,a.y2),o.lineWidth=this.strokeWidth;var l=o.strokeStyle;o.strokeStyle=this.stroke||o.fillStyle,this.stroke&&this._renderStroke(o),o.strokeStyle=l},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(o){return n(this.callSuper("toObject",o),this.calcLinePoints())},_getNonTransformedDimensions:function(){var o=this.callSuper("_getNonTransformedDimensions");return this.strokeLineCap==="butt"&&(this.width===0&&(o.y-=this.strokeWidth),this.height===0&&(o.x-=this.strokeWidth)),o},calcLinePoints:function(){var o=this.x1<=this.x2?-1:1,a=this.y1<=this.y2?-1:1,l=o*this.width*.5,c=a*this.height*.5,d=o*this.width*-.5,u=a*this.height*-.5;return{x1:l,x2:d,y1:c,y2:u}},_toSVG:function(){var o=this.calcLinePoints();return["<line ","COMMON_PARTS",'x1="',o.x1,'" y1="',o.y1,'" x2="',o.x2,'" y2="',o.y2,`" />
`]}}),e.Line.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),e.Line.fromElement=function(o,a,l){l=l||{};var c=e.parseAttributes(o,e.Line.ATTRIBUTE_NAMES),d=[c.x1||0,c.y1||0,c.x2||0,c.y2||0];a(new e.Line(d,n(c,l)))},e.Line.fromObject=function(o,a){function l(d){delete d.points,a&&a(d)}var c=i(o,!0);c.points=[o.x1,o.y1,o.x2,o.y2],e.Object._fromObject("Line",c,l,"points")};function s(o,a){var l=o.origin,c=o.axis1,d=o.axis2,u=o.dimension,m=a.nearest,f=a.center,_=a.farthest;return function(){switch(this.get(l)){case m:return Math.min(this.get(c),this.get(d));case f:return Math.min(this.get(c),this.get(d))+.5*this.get(u);case _:return Math.max(this.get(c),this.get(d))}}}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.degreesToRadians;if(e.Circle){e.warn("fabric.Circle is already defined.");return}e.Circle=e.util.createClass(e.Object,{type:"circle",radius:0,startAngle:0,endAngle:360,cacheProperties:e.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(r,s){return this.callSuper("_set",r,s),r==="radius"&&this.setRadius(s),this},toObject:function(r){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(r))},_toSVG:function(){var r,s=0,o=0,a=(this.endAngle-this.startAngle)%360;if(a===0)r=["<circle ","COMMON_PARTS",'cx="'+s+'" cy="'+o+'" ','r="',this.radius,`" />
`];else{var l=n(this.startAngle),c=n(this.endAngle),d=this.radius,u=e.util.cos(l)*d,m=e.util.sin(l)*d,f=e.util.cos(c)*d,_=e.util.sin(c)*d,x=a>180?"1":"0";r=['<path d="M '+u+" "+m," A "+d+" "+d," 0 ",+x+" 1"," "+f+" "+_,'" ',"COMMON_PARTS",` />
`]}return r},_render:function(r){r.beginPath(),r.arc(0,0,this.radius,n(this.startAngle),n(this.endAngle),!1),this._renderPaintInOrder(r)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(r){return this.radius=r,this.set("width",r*2).set("height",r*2)}}),e.Circle.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),e.Circle.fromElement=function(r,s){var o=e.parseAttributes(r,e.Circle.ATTRIBUTE_NAMES);if(!i(o))throw new Error("value of `r` attribute is required and can not be negative");o.left=(o.left||0)-o.radius,o.top=(o.top||0)-o.radius,s(new e.Circle(o))};function i(r){return"radius"in r&&r.radius>=0}e.Circle.fromObject=function(r,s){e.Object._fromObject("Circle",r,s)}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={});if(e.Triangle){e.warn("fabric.Triangle is already defined");return}e.Triangle=e.util.createClass(e.Object,{type:"triangle",width:100,height:100,_render:function(n){var i=this.width/2,r=this.height/2;n.beginPath(),n.moveTo(-i,r),n.lineTo(0,-r),n.lineTo(i,r),n.closePath(),this._renderPaintInOrder(n)},_toSVG:function(){var n=this.width/2,i=this.height/2,r=[-n+" "+i,"0 "+-i,n+" "+i].join(",");return["<polygon ","COMMON_PARTS",'points="',r,'" />']}}),e.Triangle.fromObject=function(n,i){return e.Object._fromObject("Triangle",n,i)}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=Math.PI*2;if(e.Ellipse){e.warn("fabric.Ellipse is already defined.");return}e.Ellipse=e.util.createClass(e.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:e.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(i){this.callSuper("initialize",i),this.set("rx",i&&i.rx||0),this.set("ry",i&&i.ry||0)},_set:function(i,r){switch(this.callSuper("_set",i,r),i){case"rx":this.rx=r,this.set("width",r*2);break;case"ry":this.ry=r,this.set("height",r*2);break}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(i){return this.callSuper("toObject",["rx","ry"].concat(i))},_toSVG:function(){return["<ellipse ","COMMON_PARTS",'cx="0" cy="0" ','rx="',this.rx,'" ry="',this.ry,`" />
`]},_render:function(i){i.beginPath(),i.save(),i.transform(1,0,0,this.ry/this.rx,0,0),i.arc(0,0,this.rx,0,n,!1),i.restore(),this._renderPaintInOrder(i)}}),e.Ellipse.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),e.Ellipse.fromElement=function(i,r){var s=e.parseAttributes(i,e.Ellipse.ATTRIBUTE_NAMES);s.left=(s.left||0)-s.rx,s.top=(s.top||0)-s.ry,r(new e.Ellipse(s))},e.Ellipse.fromObject=function(i,r){e.Object._fromObject("Ellipse",i,r)}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend;if(e.Rect){e.warn("fabric.Rect is already defined");return}e.Rect=e.util.createClass(e.Object,{stateProperties:e.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:e.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(i){this.callSuper("initialize",i),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(i){var r=this.rx?Math.min(this.rx,this.width/2):0,s=this.ry?Math.min(this.ry,this.height/2):0,o=this.width,a=this.height,l=-this.width/2,c=-this.height/2,d=r!==0||s!==0,u=1-.5522847498;i.beginPath(),i.moveTo(l+r,c),i.lineTo(l+o-r,c),d&&i.bezierCurveTo(l+o-u*r,c,l+o,c+u*s,l+o,c+s),i.lineTo(l+o,c+a-s),d&&i.bezierCurveTo(l+o,c+a-u*s,l+o-u*r,c+a,l+o-r,c+a),i.lineTo(l+r,c+a),d&&i.bezierCurveTo(l+u*r,c+a,l,c+a-u*s,l,c+a-s),i.lineTo(l,c+s),d&&i.bezierCurveTo(l,c+u*s,l+u*r,c,l+r,c),i.closePath(),this._renderPaintInOrder(i)},toObject:function(i){return this.callSuper("toObject",["rx","ry"].concat(i))},_toSVG:function(){var i=-this.width/2,r=-this.height/2;return["<rect ","COMMON_PARTS",'x="',i,'" y="',r,'" rx="',this.rx,'" ry="',this.ry,'" width="',this.width,'" height="',this.height,`" />
`]}}),e.Rect.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),e.Rect.fromElement=function(i,r,s){if(!i)return r(null);s=s||{};var o=e.parseAttributes(i,e.Rect.ATTRIBUTE_NAMES);o.left=o.left||0,o.top=o.top||0,o.height=o.height||0,o.width=o.width||0;var a=new e.Rect(n(s?e.util.object.clone(s):{},o));a.visible=a.visible&&a.width>0&&a.height>0,r(a)},e.Rect.fromObject=function(i,r){return e.Object._fromObject("Rect",i,r)}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.util.array.min,r=e.util.array.max,s=e.util.toFixed,o=e.util.projectStrokeOnPoints;if(e.Polyline){e.warn("fabric.Polyline is already defined");return}e.Polyline=e.util.createClass(e.Object,{type:"polyline",points:null,exactBoundingBox:!1,cacheProperties:e.Object.prototype.cacheProperties.concat("points"),initialize:function(a,l){l=l||{},this.points=a||[],this.callSuper("initialize",l),this._setPositionDimensions(l)},_projectStrokeOnPoints:function(){return o(this.points,this,!0)},_setPositionDimensions:function(a){var l=this._calcDimensions(a),c,d=this.exactBoundingBox?this.strokeWidth:0;this.width=l.width-d,this.height=l.height-d,a.fromSVG||(c=this.translateToGivenOrigin({x:l.left-this.strokeWidth/2+d/2,y:l.top-this.strokeWidth/2+d/2},"left","top",this.originX,this.originY)),typeof a.left>"u"&&(this.left=a.fromSVG?l.left:c.x),typeof a.top>"u"&&(this.top=a.fromSVG?l.top:c.y),this.pathOffset={x:l.left+this.width/2+d/2,y:l.top+this.height/2+d/2}},_calcDimensions:function(){var a=this.exactBoundingBox?this._projectStrokeOnPoints():this.points,l=i(a,"x")||0,c=i(a,"y")||0,d=r(a,"x")||0,u=r(a,"y")||0,m=d-l,f=u-c;return{left:l,top:c,width:m,height:f}},toObject:function(a){return n(this.callSuper("toObject",a),{points:this.points.concat()})},_toSVG:function(){for(var a=[],l=this.pathOffset.x,c=this.pathOffset.y,d=e.Object.NUM_FRACTION_DIGITS,u=0,m=this.points.length;u<m;u++)a.push(s(this.points[u].x-l,d),",",s(this.points[u].y-c,d)," ");return["<"+this.type+" ","COMMON_PARTS",'points="',a.join(""),`" />
`]},commonRender:function(a){var l,c=this.points.length,d=this.pathOffset.x,u=this.pathOffset.y;if(!c||isNaN(this.points[c-1].y))return!1;a.beginPath(),a.moveTo(this.points[0].x-d,this.points[0].y-u);for(var m=0;m<c;m++)l=this.points[m],a.lineTo(l.x-d,l.y-u);return!0},_render:function(a){this.commonRender(a)&&this._renderPaintInOrder(a)},complexity:function(){return this.get("points").length}}),e.Polyline.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polyline.fromElementGenerator=function(a){return function(l,c,d){if(!l)return c(null);d||(d={});var u=e.parsePointsAttribute(l.getAttribute("points")),m=e.parseAttributes(l,e[a].ATTRIBUTE_NAMES);m.fromSVG=!0,c(new e[a](u,n(m,d)))}},e.Polyline.fromElement=e.Polyline.fromElementGenerator("Polyline"),e.Polyline.fromObject=function(a,l){return e.Object._fromObject("Polyline",a,l,"points")}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.projectStrokeOnPoints;if(e.Polygon){e.warn("fabric.Polygon is already defined");return}e.Polygon=e.util.createClass(e.Polyline,{type:"polygon",_projectStrokeOnPoints:function(){return n(this.points,this)},_render:function(i){this.commonRender(i)&&(i.closePath(),this._renderPaintInOrder(i))}}),e.Polygon.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polygon.fromElement=e.Polyline.fromElementGenerator("Polygon"),e.Polygon.fromObject=function(i,r){e.Object._fromObject("Polygon",i,r,"points")}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.array.min,i=e.util.array.max,r=e.util.object.extend,s=e.util.object.clone,o=e.util.toFixed;if(e.Path){e.warn("fabric.Path is already defined");return}e.Path=e.util.createClass(e.Object,{type:"path",path:null,cacheProperties:e.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:e.Object.prototype.stateProperties.concat("path"),initialize:function(a,l){l=s(l||{}),delete l.path,this.callSuper("initialize",l),this._setPath(a||[],l)},_setPath:function(a,l){this.path=e.util.makePathSimpler(Array.isArray(a)?a:e.util.parsePath(a)),e.Polyline.prototype._setPositionDimensions.call(this,l||{})},_renderPathCommands:function(a){var l,c=0,d=0,u=0,m=0,f=0,_=0,x=-this.pathOffset.x,D=-this.pathOffset.y;a.beginPath();for(var E=0,M=this.path.length;E<M;++E)switch(l=this.path[E],l[0]){case"L":u=l[1],m=l[2],a.lineTo(u+x,m+D);break;case"M":u=l[1],m=l[2],c=u,d=m,a.moveTo(u+x,m+D);break;case"C":u=l[5],m=l[6],f=l[3],_=l[4],a.bezierCurveTo(l[1]+x,l[2]+D,f+x,_+D,u+x,m+D);break;case"Q":a.quadraticCurveTo(l[1]+x,l[2]+D,l[3]+x,l[4]+D),u=l[3],m=l[4],f=l[1],_=l[2];break;case"z":case"Z":u=c,m=d,a.closePath();break}},_render:function(a){this._renderPathCommands(a),this._renderPaintInOrder(a)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},toObject:function(a){return r(this.callSuper("toObject",a),{path:this.path.map(function(l){return l.slice()})})},toDatalessObject:function(a){var l=this.toObject(["sourcePath"].concat(a));return l.sourcePath&&delete l.path,l},_toSVG:function(){var a=e.util.joinPath(this.path);return["<path ","COMMON_PARTS",'d="',a,'" stroke-linecap="round" ',`/>
`]},_getOffsetTransform:function(){var a=e.Object.NUM_FRACTION_DIGITS;return" translate("+o(-this.pathOffset.x,a)+", "+o(-this.pathOffset.y,a)+")"},toClipPathSVG:function(a){var l=this._getOffsetTransform();return"	"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:a,additionalTransform:l})},toSVG:function(a){var l=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:a,additionalTransform:l})},complexity:function(){return this.path.length},_calcDimensions:function(){for(var a=[],l=[],c,d=0,u=0,m=0,f=0,_,x=0,D=this.path.length;x<D;++x){switch(c=this.path[x],c[0]){case"L":m=c[1],f=c[2],_=[];break;case"M":m=c[1],f=c[2],d=m,u=f,_=[];break;case"C":_=e.util.getBoundsOfCurve(m,f,c[1],c[2],c[3],c[4],c[5],c[6]),m=c[5],f=c[6];break;case"Q":_=e.util.getBoundsOfCurve(m,f,c[1],c[2],c[1],c[2],c[3],c[4]),m=c[3],f=c[4];break;case"z":case"Z":m=d,f=u;break}_.forEach(function(Y){a.push(Y.x),l.push(Y.y)}),a.push(m),l.push(f)}var E=n(a)||0,M=n(l)||0,I=i(a)||0,z=i(l)||0,G=I-E,A=z-M;return{left:E,top:M,width:G,height:A}}}),e.Path.fromObject=function(a,l){if(typeof a.sourcePath=="string"){var c=a.sourcePath;e.loadSVGFromURL(c,function(d){var u=d[0];u.setOptions(a),a.clipPath?e.util.enlivenObjects([a.clipPath],function(m){u.clipPath=m[0],l&&l(u)}):l&&l(u)})}else e.Object._fromObject("Path",a,l,"path")},e.Path.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(["d"]),e.Path.fromElement=function(a,l,c){var d=e.parseAttributes(a,e.Path.ATTRIBUTE_NAMES);d.fromSVG=!0,l(new e.Path(d.d,r(d,c)))}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.array.min,i=e.util.array.max;e.Group||(e.Group=e.util.createClass(e.Object,e.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,cacheProperties:[],useSetOnGroup:!1,initialize:function(r,s,o){s=s||{},this._objects=[],o&&this.callSuper("initialize",s),this._objects=r||[];for(var a=this._objects.length;a--;)this._objects[a].group=this;if(o)this._updateObjectsACoords();else{var l=s&&s.centerPoint;s.originX!==void 0&&(this.originX=s.originX),s.originY!==void 0&&(this.originY=s.originY),l||this._calcBounds(),this._updateObjectsCoords(l),delete s.centerPoint,this.callSuper("initialize",s)}this.setCoords()},_updateObjectsACoords:function(){for(var r=!0,s=this._objects.length;s--;)this._objects[s].setCoords(r)},_updateObjectsCoords:function(s){for(var s=s||this.getCenterPoint(),o=this._objects.length;o--;)this._updateObjectCoords(this._objects[o],s)},_updateObjectCoords:function(r,s){var o=r.left,a=r.top,l=!0;r.set({left:o-s.x,top:a-s.y}),r.group=this,r.setCoords(l)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(r){var s=!!this.group;return this._restoreObjectsState(),e.util.resetObjectTransform(this),r&&(s&&e.util.removeTransformFromObject(r,this.group.calcTransformMatrix()),this._objects.push(r),r.group=this,r._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.dirty=!0,s?this.group.addWithUpdate():this.setCoords(),this},removeWithUpdate:function(r){return this._restoreObjectsState(),e.util.resetObjectTransform(this),this.remove(r),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(r){this.dirty=!0,r.group=this,r._set("canvas",this.canvas)},_onObjectRemoved:function(r){this.dirty=!0,delete r.group},_set:function(r,s){var o=this._objects.length;if(this.useSetOnGroup)for(;o--;)this._objects[o].setOnGroup(r,s);if(r==="canvas")for(;o--;)this._objects[o]._set(r,s);e.Object.prototype._set.call(this,r,s)},toObject:function(r){var s=this.includeDefaultValues,o=this._objects.filter(function(l){return!l.excludeFromExport}).map(function(l){var c=l.includeDefaultValues;l.includeDefaultValues=s;var d=l.toObject(r);return l.includeDefaultValues=c,d}),a=e.Object.prototype.toObject.call(this,r);return a.objects=o,a},toDatalessObject:function(r){var s,o=this.sourcePath;if(o)s=o;else{var a=this.includeDefaultValues;s=this._objects.map(function(c){var d=c.includeDefaultValues;c.includeDefaultValues=a;var u=c.toDatalessObject(r);return c.includeDefaultValues=d,u})}var l=e.Object.prototype.toDatalessObject.call(this,r);return l.objects=s,l},render:function(r){this._transformDone=!0,this.callSuper("render",r),this._transformDone=!1},shouldCache:function(){var r=e.Object.prototype.shouldCache.call(this);if(r){for(var s=0,o=this._objects.length;s<o;s++)if(this._objects[s].willDrawShadow())return this.ownCaching=!1,!1}return r},willDrawShadow:function(){if(e.Object.prototype.willDrawShadow.call(this))return!0;for(var r=0,s=this._objects.length;r<s;r++)if(this._objects[r].willDrawShadow())return!0;return!1},isOnACache:function(){return this.ownCaching||this.group&&this.group.isOnACache()},drawObject:function(r){for(var s=0,o=this._objects.length;s<o;s++)this._objects[s].render(r);this._drawClipPath(r,this.clipPath)},isCacheDirty:function(r){if(this.callSuper("isCacheDirty",r))return!0;if(!this.statefullCache)return!1;for(var s=0,o=this._objects.length;s<o;s++)if(this._objects[s].isCacheDirty(!0)){if(this._cacheCanvas){var a=this.cacheWidth/this.zoomX,l=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-a/2,-l/2,a,l)}return!0}return!1},_restoreObjectsState:function(){var r=this.calcOwnMatrix();return this._objects.forEach(function(s){e.util.addTransformToObject(s,r),delete s.group,s.setCoords()}),this},destroy:function(){return this._objects.forEach(function(r){r.set("dirty",!0)}),this._restoreObjectsState()},dispose:function(){this.callSuper("dispose"),this.forEachObject(function(r){r.dispose&&r.dispose()}),this._objects=[]},toActiveSelection:function(){if(this.canvas){var r=this._objects,s=this.canvas;this._objects=[];var o=this.toObject();delete o.objects;var a=new e.ActiveSelection([]);return a.set(o),a.type="activeSelection",s.remove(this),r.forEach(function(l){l.group=a,l.dirty=!0,s.add(l)}),a.canvas=s,a._objects=r,s._activeObject=a,a.setCoords(),a}},ungroupOnCanvas:function(){return this._restoreObjectsState()},setObjectsCoords:function(){var r=!0;return this.forEachObject(function(s){s.setCoords(r)}),this},_calcBounds:function(r){for(var s=[],o=[],a,l,c,d=["tr","br","bl","tl"],u=0,m=this._objects.length,f,_=d.length;u<m;++u){for(a=this._objects[u],c=a.calcACoords(),f=0;f<_;f++)l=d[f],s.push(c[l].x),o.push(c[l].y);a.aCoords=c}this._getBounds(s,o,r)},_getBounds:function(r,s,o){var a=new e.Point(n(r),n(s)),l=new e.Point(i(r),i(s)),c=a.y||0,d=a.x||0,u=l.x-a.x||0,m=l.y-a.y||0;this.width=u,this.height=m,o||this.setPositionByOrigin({x:d,y:c},"left","top")},_toSVG:function(r){for(var s=["<g ","COMMON_PARTS",` >
`],o=0,a=this._objects.length;o<a;o++)s.push("		",this._objects[o].toSVG(r));return s.push(`</g>
`),s},getSvgStyles:function(){var r=typeof this.opacity<"u"&&this.opacity!==1?"opacity: "+this.opacity+";":"",s=this.visible?"":" visibility: hidden;";return[r,this.getSvgFilter(),s].join("")},toClipPathSVG:function(r){for(var s=[],o=0,a=this._objects.length;o<a;o++)s.push("	",this._objects[o].toClipPathSVG(r));return this._createBaseClipPathSVGMarkup(s,{reviver:r})}}),e.Group.fromObject=function(r,s){var o=r.objects,a=e.util.object.clone(r,!0);if(delete a.objects,typeof o=="string"){e.loadSVGFromURL(o,function(l){var c=e.util.groupSVGElements(l,r,o),d=a.clipPath;delete a.clipPath,c.set(a),d?e.util.enlivenObjects([d],function(u){c.clipPath=u[0],s&&s(c)}):s&&s(c)});return}e.util.enlivenObjects(o,function(l){e.util.enlivenObjectEnlivables(r,a,function(){s&&s(new e.Group(l,a,!0))})})})})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={});e.ActiveSelection||(e.ActiveSelection=e.util.createClass(e.Group,{type:"activeSelection",initialize:function(n,i){i=i||{},this._objects=n||[];for(var r=this._objects.length;r--;)this._objects[r].group=this;i.originX&&(this.originX=i.originX),i.originY&&(this.originY=i.originY),this._calcBounds(),this._updateObjectsCoords(),e.Object.prototype.initialize.call(this,i),this.setCoords()},toGroup:function(){var n=this._objects.concat();this._objects=[];var i=e.Object.prototype.toObject.call(this),r=new e.Group([]);if(delete i.type,r.set(i),n.forEach(function(o){o.canvas.remove(o),o.group=r}),r._objects=n,!this.canvas)return r;var s=this.canvas;return s.add(r),s._activeObject=r,r.setCoords(),r},onDeselect:function(){return this.destroy(),!1},toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(n,i,r){n.save(),n.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,r=r||{},typeof r.hasControls>"u"&&(r.hasControls=!1),r.forActiveSelection=!0;for(var s=0,o=this._objects.length;s<o;s++)this._objects[s]._renderControls(n,r);this.callSuper("_renderControls",n,i),n.restore()}}),e.ActiveSelection.fromObject=function(n,i){e.util.enlivenObjects(n.objects,function(r){delete n.objects,i&&i(new e.ActiveSelection(r,n,!0))})})})(vn);(function(t){"use strict";var e=be.util.object.extend;if(t.fabric||(t.fabric={}),t.fabric.Image){be.warn("fabric.Image is already defined.");return}be.Image=be.util.createClass(be.Object,{type:"image",strokeWidth:0,srcFromAttribute:!1,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:be.Object.prototype.stateProperties.concat("cropX","cropY"),cacheProperties:be.Object.prototype.cacheProperties.concat("cropX","cropY"),cacheKey:"",cropX:0,cropY:0,imageSmoothing:!0,initialize:function(n,i){i||(i={}),this.filters=[],this.cacheKey="texture"+be.Object.__uid++,this.callSuper("initialize",i),this._initElement(n,i)},getElement:function(){return this._element||{}},setElement:function(n,i){return this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._element=n,this._originalElement=n,this._initConfig(i),this.filters.length!==0&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters(),this},removeTexture:function(n){var i=be.filterBackend;i&&i.evictCachesForKey&&i.evictCachesForKey(n)},dispose:function(){this.callSuper("dispose"),this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach((function(n){be.util.cleanUpJsdomNode(this[n]),this[n]=void 0}).bind(this))},getCrossOrigin:function(){return this._originalElement&&(this._originalElement.crossOrigin||null)},getOriginalSize:function(){var n=this.getElement();return{width:n.naturalWidth||n.width,height:n.naturalHeight||n.height}},_stroke:function(n){if(!(!this.stroke||this.strokeWidth===0)){var i=this.width/2,r=this.height/2;n.beginPath(),n.moveTo(-i,-r),n.lineTo(i,-r),n.lineTo(i,r),n.lineTo(-i,r),n.lineTo(-i,-r),n.closePath()}},toObject:function(n){var i=[];this.filters.forEach(function(s){s&&i.push(s.toObject())});var r=e(this.callSuper("toObject",["cropX","cropY"].concat(n)),{src:this.getSrc(),crossOrigin:this.getCrossOrigin(),filters:i});return this.resizeFilter&&(r.resizeFilter=this.resizeFilter.toObject()),r},hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},_toSVG:function(){var n=[],i=[],r,s=this._element,o=-this.width/2,a=-this.height/2,l="",c="";if(!s)return[];if(this.hasCrop()){var d=be.Object.__uid++;n.push('<clipPath id="imageCrop_'+d+`">
`,'	<rect x="'+o+'" y="'+a+'" width="'+this.width+'" height="'+this.height+`" />
`,`</clipPath>
`),l=' clip-path="url(#imageCrop_'+d+')" '}if(this.imageSmoothing||(c='" image-rendering="optimizeSpeed'),i.push("	<image ","COMMON_PARTS",'xlink:href="',this.getSvgSrc(!0),'" x="',o-this.cropX,'" y="',a-this.cropY,'" width="',s.width||s.naturalWidth,'" height="',s.height||s.height,c,'"',l,`></image>
`),this.stroke||this.strokeDashArray){var u=this.fill;this.fill=null,r=["	<rect ",'x="',o,'" y="',a,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),`"/>
`],this.fill=u}return this.paintFirst!=="fill"?n=n.concat(r,i):n=n.concat(i,r),n},getSrc:function(n){var i=n?this._element:this._originalElement;return i?i.toDataURL?i.toDataURL():this.srcFromAttribute?i.getAttribute("src"):i.src:this.src||""},setSrc:function(n,i,r){return be.util.loadImage(n,function(s,o){this.setElement(s,r),this._setWidthHeight(),i&&i(this,o)},this,r&&r.crossOrigin),this},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var n=this.resizeFilter,i=this.minimumScaleTrigger,r=this.getTotalObjectScaling(),s=r.scaleX,o=r.scaleY,a=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!n||s>i&&o>i){this._element=a,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=s,this._lastScaleY=o;return}be.filterBackend||(be.filterBackend=be.initFilterBackend());var l=be.util.createCanvasElement(),c=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,d=a.width,u=a.height;l.width=d,l.height=u,this._element=l,this._lastScaleX=n.scaleX=s,this._lastScaleY=n.scaleY=o,be.filterBackend.applyFilters([n],a,d,u,this._element,c),this._filterScalingX=l.width/this._originalElement.width,this._filterScalingY=l.height/this._originalElement.height},applyFilters:function(n){if(n=n||this.filters||[],n=n.filter(function(a){return a&&!a.isNeutralState()}),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),n.length===0)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var i=this._originalElement,r=i.naturalWidth||i.width,s=i.naturalHeight||i.height;if(this._element===this._originalElement){var o=be.util.createCanvasElement();o.width=r,o.height=s,this._element=o,this._filteredEl=o}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,r,s),this._lastScaleX=1,this._lastScaleY=1;return be.filterBackend||(be.filterBackend=be.initFilterBackend()),be.filterBackend.applyFilters(n,this._originalElement,r,s,this._element,this.cacheKey),(this._originalElement.width!==this._element.width||this._originalElement.height!==this._element.height)&&(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(n){be.util.setImageSmoothing(n,this.imageSmoothing),this.isMoving!==!0&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(n),this._renderPaintInOrder(n)},drawCacheOnCanvas:function(n){be.util.setImageSmoothing(n,this.imageSmoothing),be.Object.prototype.drawCacheOnCanvas.call(this,n)},shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(n){var i=this._element;if(i){var r=this._filterScalingX,s=this._filterScalingY,o=this.width,a=this.height,l=Math.min,c=Math.max,d=c(this.cropX,0),u=c(this.cropY,0),m=i.naturalWidth||i.width,f=i.naturalHeight||i.height,_=d*r,x=u*s,D=l(o*r,m-_),E=l(a*s,f-x),M=-o/2,I=-a/2,z=l(o,m/r-d),G=l(a,f/s-u);i&&n.drawImage(i,_,x,D,E,M,I,z,G)}},_needsResize:function(){var n=this.getTotalObjectScaling();return n.scaleX!==this._lastScaleX||n.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(n,i){this.setElement(be.util.getById(n),i),be.util.addClass(this.getElement(),be.Image.CSS_CANVAS)},_initConfig:function(n){n||(n={}),this.setOptions(n),this._setWidthHeight(n)},_initFilters:function(n,i){n&&n.length?be.util.enlivenObjects(n,function(r){i&&i(r)},"fabric.Image.filters"):i&&i()},_setWidthHeight:function(n){n||(n={});var i=this.getElement();this.width=n.width||i.naturalWidth||i.width||0,this.height=n.height||i.naturalHeight||i.height||0},parsePreserveAspectRatioAttribute:function(){var n=be.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),i=this._element.width,r=this._element.height,s=1,o=1,a=0,l=0,c=0,d=0,u,m=this.width,f=this.height,_={width:m,height:f};return n&&(n.alignX!=="none"||n.alignY!=="none")?(n.meetOrSlice==="meet"&&(s=o=be.util.findScaleToFit(this._element,_),u=(m-i*s)/2,n.alignX==="Min"&&(a=-u),n.alignX==="Max"&&(a=u),u=(f-r*o)/2,n.alignY==="Min"&&(l=-u),n.alignY==="Max"&&(l=u)),n.meetOrSlice==="slice"&&(s=o=be.util.findScaleToCover(this._element,_),u=i-m/s,n.alignX==="Mid"&&(c=u/2),n.alignX==="Max"&&(c=u),u=r-f/o,n.alignY==="Mid"&&(d=u/2),n.alignY==="Max"&&(d=u),i=m/s,r=f/o)):(s=m/i,o=f/r),{width:i,height:r,scaleX:s,scaleY:o,offsetLeft:a,offsetTop:l,cropX:c,cropY:d}}}),be.Image.CSS_CANVAS="canvas-img",be.Image.prototype.getSvgSrc=be.Image.prototype.getSrc,be.Image.fromObject=function(n,i){var r=be.util.object.clone(n);be.util.loadImage(r.src,function(s,o){if(o){i&&i(null,!0);return}be.Image.prototype._initFilters.call(r,r.filters,function(a){r.filters=a||[],be.Image.prototype._initFilters.call(r,[r.resizeFilter],function(l){r.resizeFilter=l[0],be.util.enlivenObjectEnlivables(r,r,function(){var c=new be.Image(s,r);i(c,!1)})})})},null,r.crossOrigin)},be.Image.fromURL=function(n,i,r){be.util.loadImage(n,function(s,o){i&&i(new be.Image(s,r),o)},null,r&&r.crossOrigin)},be.Image.ATTRIBUTE_NAMES=be.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin image-rendering".split(" ")),be.Image.fromElement=function(n,i,r){var s=be.parseAttributes(n,be.Image.ATTRIBUTE_NAMES);be.Image.fromURL(s["xlink:href"],i,e(r?be.util.object.clone(r):{},s))}})(vn);be.util.object.extend(be.Object.prototype,{_getAngleValueForStraighten:function(){var t=this.angle%360;return t>0?Math.round((t-1)/90)*90:Math.round(t/90)*90},straighten:function(){return this.rotate(this._getAngleValueForStraighten())},fxStraighten:function(t){t=t||{};var e=function(){},n=t.onComplete||e,i=t.onChange||e,r=this;return be.util.animate({target:this,startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(s){r.rotate(s),i()},onComplete:function(){r.setCoords(),n()}})}});be.util.object.extend(be.StaticCanvas.prototype,{straightenObject:function(t){return t.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(t){return t.fxStraighten({onChange:this.requestRenderAllBound})}});(function(){"use strict";function t(n,i){var r="precision "+i+` float;
void main(){}`,s=n.createShader(n.FRAGMENT_SHADER);return n.shaderSource(s,r),n.compileShader(s),!!n.getShaderParameter(s,n.COMPILE_STATUS)}be.isWebglSupported=function(n){if(be.isLikelyNode)return!1;n=n||be.WebglFilterBackend.prototype.tileSize;var i=document.createElement("canvas"),r=i.getContext("webgl")||i.getContext("experimental-webgl"),s=!1;if(r){be.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),s=be.maxTextureSize>=n;for(var o=["highp","mediump","lowp"],a=0;a<3;a++)if(t(r,o[a])){be.webGlPrecision=o[a];break}}return this.isSupported=s,s},be.WebglFilterBackend=e;function e(n){n&&n.tileSize&&(this.tileSize=n.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}e.prototype={tileSize:2048,resources:{},setupGLContext:function(n,i){this.dispose(),this.createWebGLCanvas(n,i),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(n,i)},chooseFastestCopyGLTo2DMethod:function(n,i){var r=typeof window.performance<"u",s;try{new ImageData(1,1),s=!0}catch{s=!1}var o=typeof ArrayBuffer<"u",a=typeof Uint8ClampedArray<"u";if(r&&s&&o&&a){var l=be.util.createCanvasElement(),c=new ArrayBuffer(n*i*4);if(be.forceGLPutImageData){this.imageBuffer=c,this.copyGLTo2D=j_e;return}var d={imageBuffer:c,destinationWidth:n,destinationHeight:i,targetCanvas:l},u,m,f;l.width=n,l.height=i,u=window.performance.now(),U_e.call(d,this.gl,d),m=window.performance.now()-u,u=window.performance.now(),j_e.call(d,this.gl,d),f=window.performance.now()-u,m>f?(this.imageBuffer=c,this.copyGLTo2D=j_e):this.copyGLTo2D=U_e}},createWebGLCanvas:function(n,i){var r=be.util.createCanvasElement();r.width=n,r.height=i;var s={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},o=r.getContext("webgl",s);o||(o=r.getContext("experimental-webgl",s)),o&&(o.clearColor(0,0,0,0),this.canvas=r,this.gl=o)},applyFilters:function(n,i,r,s,o,a){var l=this.gl,c;a&&(c=this.getCachedTexture(a,i));var d={originalWidth:i.width||i.originalWidth,originalHeight:i.height||i.originalHeight,sourceWidth:r,sourceHeight:s,destinationWidth:r,destinationHeight:s,context:l,sourceTexture:this.createTexture(l,r,s,!c&&i),targetTexture:this.createTexture(l,r,s),originalTexture:c||this.createTexture(l,r,s,!c&&i),passes:n.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:o},u=l.createFramebuffer();return l.bindFramebuffer(l.FRAMEBUFFER,u),n.forEach(function(m){m&&m.applyTo(d)}),yhi(d),this.copyGLTo2D(l,d),l.bindTexture(l.TEXTURE_2D,null),l.deleteTexture(d.sourceTexture),l.deleteTexture(d.targetTexture),l.deleteFramebuffer(u),o.getContext("2d").setTransform(1,0,0,1,0,0),d},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(n,i,r,s,o){var a=n.createTexture();return n.bindTexture(n.TEXTURE_2D,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,o||n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,o||n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),s?n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,s):n.texImage2D(n.TEXTURE_2D,0,n.RGBA,i,r,0,n.RGBA,n.UNSIGNED_BYTE,null),a},getCachedTexture:function(n,i){if(this.textureCache[n])return this.textureCache[n];var r=this.createTexture(this.gl,i.width,i.height,i);return this.textureCache[n]=r,r},evictCachesForKey:function(n){this.textureCache[n]&&(this.gl.deleteTexture(this.textureCache[n]),delete this.textureCache[n])},copyGLTo2D:U_e,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var n=this.gl,i={renderer:"",vendor:""};if(!n)return i;var r=n.getExtension("WEBGL_debug_renderer_info");if(r){var s=n.getParameter(r.UNMASKED_RENDERER_WEBGL),o=n.getParameter(r.UNMASKED_VENDOR_WEBGL);s&&(i.renderer=s.toLowerCase()),o&&(i.vendor=o.toLowerCase())}return this.gpuInfo=i,i}}})();function yhi(t){var e=t.targetCanvas,n=e.width,i=e.height,r=t.destinationWidth,s=t.destinationHeight;(n!==r||i!==s)&&(e.width=r,e.height=s)}function U_e(t,e){var n=t.canvas,i=e.targetCanvas,r=i.getContext("2d");r.translate(0,i.height),r.scale(1,-1);var s=n.height-i.height;r.drawImage(n,0,s,i.width,i.height,0,0,i.width,i.height)}function j_e(t,e){var n=e.targetCanvas,i=n.getContext("2d"),r=e.destinationWidth,s=e.destinationHeight,o=r*s*4,a=new Uint8Array(this.imageBuffer,0,o),l=new Uint8ClampedArray(this.imageBuffer,0,o);t.readPixels(0,0,r,s,t.RGBA,t.UNSIGNED_BYTE,a);var c=new ImageData(l,r,s);i.putImageData(c,0,0)}(function(){"use strict";var t=function(){};be.Canvas2dFilterBackend=e;function e(){}e.prototype={evictCachesForKey:t,dispose:t,clearWebGLCaches:t,resources:{},applyFilters:function(n,i,r,s,o){var a=o.getContext("2d");a.drawImage(i,0,0,r,s);var l=a.getImageData(0,0,r,s),c=a.getImageData(0,0,r,s),d={sourceWidth:r,sourceHeight:s,imageData:l,originalEl:i,originalImageData:c,canvasEl:o,ctx:a,filterBackend:this};return n.forEach(function(u){u.applyTo(d)}),(d.imageData.width!==r||d.imageData.height!==s)&&(o.width=d.imageData.width,o.height=d.imageData.height),a.putImageData(d.imageData,0,0),d}}})();be.Image=be.Image||{};be.Image.filters=be.Image.filters||{};be.Image.filters.BaseFilter=be.util.createClass({type:"BaseFilter",vertexSource:`attribute vec2 aPosition;
varying vec2 vTexCoord;
void main() {
vTexCoord = aPosition;
gl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);
}`,fragmentSource:`precision highp float;
varying vec2 vTexCoord;
uniform sampler2D uTexture;
void main() {
gl_FragColor = texture2D(uTexture, vTexCoord);
}`,initialize:function(t){t&&this.setOptions(t)},setOptions:function(t){for(var e in t)this[e]=t[e]},createProgram:function(t,e,n){e=e||this.fragmentSource,n=n||this.vertexSource,be.webGlPrecision!=="highp"&&(e=e.replace(/precision highp float/g,"precision "+be.webGlPrecision+" float"));var i=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+t.getShaderInfoLog(i));var r=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(r,e),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+t.getShaderInfoLog(r));var s=t.createProgram();if(t.attachShader(s,i),t.attachShader(s,r),t.linkProgram(s),!t.getProgramParameter(s,t.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+t.getProgramInfoLog(s));var o=this.getAttributeLocations(t,s),a=this.getUniformLocations(t,s)||{};return a.uStepW=t.getUniformLocation(s,"uStepW"),a.uStepH=t.getUniformLocation(s,"uStepH"),{program:s,attributeLocations:o,uniformLocations:a}},getAttributeLocations:function(t,e){return{aPosition:t.getAttribLocation(e,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(t,e,n){var i=e.aPosition,r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW)},_setupFrameBuffer:function(t){var e=t.context,n,i;t.passes>1?(n=t.destinationWidth,i=t.destinationHeight,(t.sourceWidth!==n||t.sourceHeight!==i)&&(e.deleteTexture(t.targetTexture),t.targetTexture=t.filterBackend.createTexture(e,n,i)),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.targetTexture,0)):(e.bindFramebuffer(e.FRAMEBUFFER,null),e.finish())},_swapTextures:function(t){t.passes--,t.pass++;var e=t.targetTexture;t.targetTexture=t.sourceTexture,t.sourceTexture=e},isNeutralState:function(){var t=this.mainParameter,e=be.Image.filters[this.type].prototype;if(t)if(Array.isArray(e[t])){for(var n=e[t].length;n--;)if(this[t][n]!==e[t][n])return!1;return!0}else return e[t]===this[t];else return!1},applyTo:function(t){t.webgl?(this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)},retrieveShader:function(t){return t.programCache.hasOwnProperty(this.type)||(t.programCache[this.type]=this.createProgram(t.context)),t.programCache[this.type]},applyToWebGL:function(t){var e=t.context,n=this.retrieveShader(t);t.pass===0&&t.originalTexture?e.bindTexture(e.TEXTURE_2D,t.originalTexture):e.bindTexture(e.TEXTURE_2D,t.sourceTexture),e.useProgram(n.program),this.sendAttributeData(e,n.attributeLocations,t.aPosition),e.uniform1f(n.uniformLocations.uStepW,1/t.sourceWidth),e.uniform1f(n.uniformLocations.uStepH,1/t.sourceHeight),this.sendUniformData(e,n.uniformLocations),e.viewport(0,0,t.destinationWidth,t.destinationHeight),e.drawArrays(e.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(t,e,n){t.activeTexture(n),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE0)},unbindAdditionalTexture:function(t,e){t.activeTexture(e),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(t){this[this.mainParameter]=t},sendUniformData:function(){},createHelpLayer:function(t){if(!t.helpLayer){var e=document.createElement("canvas");e.width=t.sourceWidth,e.height=t.sourceHeight,t.helpLayer=e}},toObject:function(){var t={type:this.type},e=this.mainParameter;return e&&(t[e]=this[e]),t},toJSON:function(){return this.toObject()}});be.Image.filters.BaseFilter.fromObject=function(t,e){var n=new be.Image.filters[t.type](t);return e&&e(n),n};(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.ColorMatrix=i(n.BaseFilter,{type:"ColorMatrix",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
varying vec2 vTexCoord;
uniform mat4 uColorMatrix;
uniform vec4 uConstants;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
color *= uColorMatrix;
color += uConstants;
gl_FragColor = color;
}`,matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(r){this.callSuper("initialize",r),this.matrix=this.matrix.slice(0)},applyTo2d:function(r){var s=r.imageData,o=s.data,a=o.length,l=this.matrix,c,d,u,m,f,_=this.colorsOnly;for(f=0;f<a;f+=4)c=o[f],d=o[f+1],u=o[f+2],_?(o[f]=c*l[0]+d*l[1]+u*l[2]+l[4]*255,o[f+1]=c*l[5]+d*l[6]+u*l[7]+l[9]*255,o[f+2]=c*l[10]+d*l[11]+u*l[12]+l[14]*255):(m=o[f+3],o[f]=c*l[0]+d*l[1]+u*l[2]+m*l[3]+l[4]*255,o[f+1]=c*l[5]+d*l[6]+u*l[7]+m*l[8]+l[9]*255,o[f+2]=c*l[10]+d*l[11]+u*l[12]+m*l[13]+l[14]*255,o[f+3]=c*l[15]+d*l[16]+u*l[17]+m*l[18]+l[19]*255)},getUniformLocations:function(r,s){return{uColorMatrix:r.getUniformLocation(s,"uColorMatrix"),uConstants:r.getUniformLocation(s,"uConstants")}},sendUniformData:function(r,s){var o=this.matrix,a=[o[0],o[1],o[2],o[3],o[5],o[6],o[7],o[8],o[10],o[11],o[12],o[13],o[15],o[16],o[17],o[18]],l=[o[4],o[9],o[14],o[19]];r.uniformMatrix4fv(s.uColorMatrix,!1,a),r.uniform4fv(s.uConstants,l)}}),e.Image.filters.ColorMatrix.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Brightness=i(n.BaseFilter,{type:"Brightness",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform float uBrightness;
varying vec2 vTexCoord;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
color.rgb += uBrightness;
gl_FragColor = color;
}`,brightness:0,mainParameter:"brightness",applyTo2d:function(r){if(this.brightness!==0){var s=r.imageData,o=s.data,a,l=o.length,c=Math.round(this.brightness*255);for(a=0;a<l;a+=4)o[a]=o[a]+c,o[a+1]=o[a+1]+c,o[a+2]=o[a+2]+c}},getUniformLocations:function(r,s){return{uBrightness:r.getUniformLocation(s,"uBrightness")}},sendUniformData:function(r,s){r.uniform1f(s.uBrightness,this.brightness)}}),e.Image.filters.Brightness.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.Image.filters,r=e.util.createClass;i.Convolute=r(i.BaseFilter,{type:"Convolute",opaque:!1,matrix:[0,0,0,0,1,0,0,0,0],fragmentSource:{Convolute_3_1:`precision highp float;
uniform sampler2D uTexture;
uniform float uMatrix[9];
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
vec4 color = vec4(0, 0, 0, 0);
for (float h = 0.0; h < 3.0; h+=1.0) {
for (float w = 0.0; w < 3.0; w+=1.0) {
vec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1));
color += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)];
}
}
gl_FragColor = color;
}`,Convolute_3_0:`precision highp float;
uniform sampler2D uTexture;
uniform float uMatrix[9];
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
vec4 color = vec4(0, 0, 0, 1);
for (float h = 0.0; h < 3.0; h+=1.0) {
for (float w = 0.0; w < 3.0; w+=1.0) {
vec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0));
color.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)];
}
}
float alpha = texture2D(uTexture, vTexCoord).a;
gl_FragColor = color;
gl_FragColor.a = alpha;
}`,Convolute_5_1:`precision highp float;
uniform sampler2D uTexture;
uniform float uMatrix[25];
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
vec4 color = vec4(0, 0, 0, 0);
for (float h = 0.0; h < 5.0; h+=1.0) {
for (float w = 0.0; w < 5.0; w+=1.0) {
vec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));
color += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)];
}
}
gl_FragColor = color;
}`,Convolute_5_0:`precision highp float;
uniform sampler2D uTexture;
uniform float uMatrix[25];
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
vec4 color = vec4(0, 0, 0, 1);
for (float h = 0.0; h < 5.0; h+=1.0) {
for (float w = 0.0; w < 5.0; w+=1.0) {
vec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));
color.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)];
}
}
float alpha = texture2D(uTexture, vTexCoord).a;
gl_FragColor = color;
gl_FragColor.a = alpha;
}`,Convolute_7_1:`precision highp float;
uniform sampler2D uTexture;
uniform float uMatrix[49];
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
vec4 color = vec4(0, 0, 0, 0);
for (float h = 0.0; h < 7.0; h+=1.0) {
for (float w = 0.0; w < 7.0; w+=1.0) {
vec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));
color += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)];
}
}
gl_FragColor = color;
}`,Convolute_7_0:`precision highp float;
uniform sampler2D uTexture;
uniform float uMatrix[49];
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
vec4 color = vec4(0, 0, 0, 1);
for (float h = 0.0; h < 7.0; h+=1.0) {
for (float w = 0.0; w < 7.0; w+=1.0) {
vec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));
color.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)];
}
}
float alpha = texture2D(uTexture, vTexCoord).a;
gl_FragColor = color;
gl_FragColor.a = alpha;
}`,Convolute_9_1:`precision highp float;
uniform sampler2D uTexture;
uniform float uMatrix[81];
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
vec4 color = vec4(0, 0, 0, 0);
for (float h = 0.0; h < 9.0; h+=1.0) {
for (float w = 0.0; w < 9.0; w+=1.0) {
vec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));
color += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)];
}
}
gl_FragColor = color;
}`,Convolute_9_0:`precision highp float;
uniform sampler2D uTexture;
uniform float uMatrix[81];
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
vec4 color = vec4(0, 0, 0, 1);
for (float h = 0.0; h < 9.0; h+=1.0) {
for (float w = 0.0; w < 9.0; w+=1.0) {
vec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));
color.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)];
}
}
float alpha = texture2D(uTexture, vTexCoord).a;
gl_FragColor = color;
gl_FragColor.a = alpha;
}`},retrieveShader:function(s){var o=Math.sqrt(this.matrix.length),a=this.type+"_"+o+"_"+(this.opaque?1:0),l=this.fragmentSource[a];return s.programCache.hasOwnProperty(a)||(s.programCache[a]=this.createProgram(s.context,l)),s.programCache[a]},applyTo2d:function(s){var o=s.imageData,a=o.data,l=this.matrix,c=Math.round(Math.sqrt(l.length)),d=Math.floor(c/2),u=o.width,m=o.height,f=s.ctx.createImageData(u,m),_=f.data,x=this.opaque?1:0,D,E,M,I,z,G,A,Y,X,ne,pe,ce,ie;for(pe=0;pe<m;pe++)for(ne=0;ne<u;ne++){for(z=(pe*u+ne)*4,D=0,E=0,M=0,I=0,ie=0;ie<c;ie++)for(ce=0;ce<c;ce++)A=pe+ie-d,G=ne+ce-d,!(A<0||A>=m||G<0||G>=u)&&(Y=(A*u+G)*4,X=l[ie*c+ce],D+=a[Y]*X,E+=a[Y+1]*X,M+=a[Y+2]*X,x||(I+=a[Y+3]*X));_[z]=D,_[z+1]=E,_[z+2]=M,x?_[z+3]=a[z+3]:_[z+3]=I}s.imageData=f},getUniformLocations:function(s,o){return{uMatrix:s.getUniformLocation(o,"uMatrix"),uOpaque:s.getUniformLocation(o,"uOpaque"),uHalfSize:s.getUniformLocation(o,"uHalfSize"),uSize:s.getUniformLocation(o,"uSize")}},sendUniformData:function(s,o){s.uniform1fv(o.uMatrix,this.matrix)},toObject:function(){return n(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),e.Image.filters.Convolute.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Grayscale=i(n.BaseFilter,{type:"Grayscale",fragmentSource:{average:`precision highp float;
uniform sampler2D uTexture;
varying vec2 vTexCoord;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
float average = (color.r + color.b + color.g) / 3.0;
gl_FragColor = vec4(average, average, average, color.a);
}`,lightness:`precision highp float;
uniform sampler2D uTexture;
uniform int uMode;
varying vec2 vTexCoord;
void main() {
vec4 col = texture2D(uTexture, vTexCoord);
float average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;
gl_FragColor = vec4(average, average, average, col.a);
}`,luminosity:`precision highp float;
uniform sampler2D uTexture;
uniform int uMode;
varying vec2 vTexCoord;
void main() {
vec4 col = texture2D(uTexture, vTexCoord);
float average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;
gl_FragColor = vec4(average, average, average, col.a);
}`},mode:"average",mainParameter:"mode",applyTo2d:function(r){var s=r.imageData,o=s.data,a,l=o.length,c,d=this.mode;for(a=0;a<l;a+=4)d==="average"?c=(o[a]+o[a+1]+o[a+2])/3:d==="lightness"?c=(Math.min(o[a],o[a+1],o[a+2])+Math.max(o[a],o[a+1],o[a+2]))/2:d==="luminosity"&&(c=.21*o[a]+.72*o[a+1]+.07*o[a+2]),o[a]=c,o[a+1]=c,o[a+2]=c},retrieveShader:function(r){var s=this.type+"_"+this.mode;if(!r.programCache.hasOwnProperty(s)){var o=this.fragmentSource[this.mode];r.programCache[s]=this.createProgram(r.context,o)}return r.programCache[s]},getUniformLocations:function(r,s){return{uMode:r.getUniformLocation(s,"uMode")}},sendUniformData:function(r,s){var o=1;r.uniform1i(s.uMode,o)},isNeutralState:function(){return!1}}),e.Image.filters.Grayscale.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Invert=i(n.BaseFilter,{type:"Invert",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform int uInvert;
varying vec2 vTexCoord;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
if (uInvert == 1) {
gl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a);
} else {
gl_FragColor = color;
}
}`,invert:!0,mainParameter:"invert",applyTo2d:function(r){var s=r.imageData,o=s.data,a,l=o.length;for(a=0;a<l;a+=4)o[a]=255-o[a],o[a+1]=255-o[a+1],o[a+2]=255-o[a+2]},isNeutralState:function(){return!this.invert},getUniformLocations:function(r,s){return{uInvert:r.getUniformLocation(s,"uInvert")}},sendUniformData:function(r,s){r.uniform1i(s.uInvert,this.invert)}}),e.Image.filters.Invert.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.Image.filters,r=e.util.createClass;i.Noise=r(i.BaseFilter,{type:"Noise",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform float uStepH;
uniform float uNoise;
uniform float uSeed;
varying vec2 vTexCoord;
float rand(vec2 co, float seed, float vScale) {
return fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0);
}
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
color.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;
gl_FragColor = color;
}`,mainParameter:"noise",noise:0,applyTo2d:function(s){if(this.noise!==0){var o=s.imageData,a=o.data,l,c=a.length,d=this.noise,u;for(l=0,c=a.length;l<c;l+=4)u=(.5-Math.random())*d,a[l]+=u,a[l+1]+=u,a[l+2]+=u}},getUniformLocations:function(s,o){return{uNoise:s.getUniformLocation(o,"uNoise"),uSeed:s.getUniformLocation(o,"uSeed")}},sendUniformData:function(s,o){s.uniform1f(o.uNoise,this.noise/255),s.uniform1f(o.uSeed,Math.random())},toObject:function(){return n(this.callSuper("toObject"),{noise:this.noise})}}),e.Image.filters.Noise.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Pixelate=i(n.BaseFilter,{type:"Pixelate",blocksize:4,mainParameter:"blocksize",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform float uBlocksize;
uniform float uStepW;
uniform float uStepH;
varying vec2 vTexCoord;
void main() {
float blockW = uBlocksize * uStepW;
float blockH = uBlocksize * uStepW;
int posX = int(vTexCoord.x / blockW);
int posY = int(vTexCoord.y / blockH);
float fposX = float(posX);
float fposY = float(posY);
vec2 squareCoords = vec2(fposX * blockW, fposY * blockH);
vec4 color = texture2D(uTexture, squareCoords);
gl_FragColor = color;
}`,applyTo2d:function(r){var s=r.imageData,o=s.data,a=s.height,l=s.width,c,d,u,m,f,_,x,D,E,M,I;for(d=0;d<a;d+=this.blocksize)for(u=0;u<l;u+=this.blocksize)for(c=d*4*l+u*4,m=o[c],f=o[c+1],_=o[c+2],x=o[c+3],M=Math.min(d+this.blocksize,a),I=Math.min(u+this.blocksize,l),D=d;D<M;D++)for(E=u;E<I;E++)c=D*4*l+E*4,o[c]=m,o[c+1]=f,o[c+2]=_,o[c+3]=x},isNeutralState:function(){return this.blocksize===1},getUniformLocations:function(r,s){return{uBlocksize:r.getUniformLocation(s,"uBlocksize"),uStepW:r.getUniformLocation(s,"uStepW"),uStepH:r.getUniformLocation(s,"uStepH")}},sendUniformData:function(r,s){r.uniform1f(s.uBlocksize,this.blocksize)}}),e.Image.filters.Pixelate.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.Image.filters,r=e.util.createClass;i.RemoveColor=r(i.BaseFilter,{type:"RemoveColor",color:"#FFFFFF",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform vec4 uLow;
uniform vec4 uHigh;
varying vec2 vTexCoord;
void main() {
gl_FragColor = texture2D(uTexture, vTexCoord);
if(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) {
gl_FragColor.a = 0.0;
}
}`,distance:.02,useAlpha:!1,applyTo2d:function(s){var o=s.imageData,a=o.data,l,c=this.distance*255,d,u,m,f=new e.Color(this.color).getSource(),_=[f[0]-c,f[1]-c,f[2]-c],x=[f[0]+c,f[1]+c,f[2]+c];for(l=0;l<a.length;l+=4)d=a[l],u=a[l+1],m=a[l+2],d>_[0]&&u>_[1]&&m>_[2]&&d<x[0]&&u<x[1]&&m<x[2]&&(a[l+3]=0)},getUniformLocations:function(s,o){return{uLow:s.getUniformLocation(o,"uLow"),uHigh:s.getUniformLocation(o,"uHigh")}},sendUniformData:function(s,o){var a=new e.Color(this.color).getSource(),l=parseFloat(this.distance),c=[0+a[0]/255-l,0+a[1]/255-l,0+a[2]/255-l,1],d=[a[0]/255+l,a[1]/255+l,a[2]/255+l,1];s.uniform4fv(o.uLow,c),s.uniform4fv(o.uHigh,d)},toObject:function(){return n(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),e.Image.filters.RemoveColor.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass,r={Brownie:[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0],Vintage:[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0],Kodachrome:[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0],Technicolor:[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0],Polaroid:[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],Sepia:[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0],BlackWhite:[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]};for(var s in r)n[s]=i(n.ColorMatrix,{type:s,matrix:r[s],mainParameter:!1,colorsOnly:!0}),e.Image.filters[s].fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric,n=e.Image.filters,i=e.util.createClass;n.BlendColor=i(n.BaseFilter,{type:"BlendColor",color:"#F95C63",mode:"multiply",alpha:1,fragmentSource:{multiply:`gl_FragColor.rgb *= uColor.rgb;
`,screen:`gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);
`,add:`gl_FragColor.rgb += uColor.rgb;
`,diff:`gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);
`,subtract:`gl_FragColor.rgb -= uColor.rgb;
`,lighten:`gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);
`,darken:`gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);
`,exclusion:`gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);
`,overlay:`if (uColor.r < 0.5) {
gl_FragColor.r *= 2.0 * uColor.r;
} else {
gl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r);
}
if (uColor.g < 0.5) {
gl_FragColor.g *= 2.0 * uColor.g;
} else {
gl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g);
}
if (uColor.b < 0.5) {
gl_FragColor.b *= 2.0 * uColor.b;
} else {
gl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b);
}
`,tint:`gl_FragColor.rgb *= (1.0 - uColor.a);
gl_FragColor.rgb += uColor.rgb;
`},buildSource:function(r){return`precision highp float;
uniform sampler2D uTexture;
uniform vec4 uColor;
varying vec2 vTexCoord;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
gl_FragColor = color;
if (color.a > 0.0) {
`+this.fragmentSource[r]+`}
}`},retrieveShader:function(r){var s=this.type+"_"+this.mode,o;return r.programCache.hasOwnProperty(s)||(o=this.buildSource(this.mode),r.programCache[s]=this.createProgram(r.context,o)),r.programCache[s]},applyTo2d:function(r){var s=r.imageData,o=s.data,a=o.length,l,c,d,u,m,f,_,x=1-this.alpha;_=new e.Color(this.color).getSource(),l=_[0]*this.alpha,c=_[1]*this.alpha,d=_[2]*this.alpha;for(var D=0;D<a;D+=4)switch(u=o[D],m=o[D+1],f=o[D+2],this.mode){case"multiply":o[D]=u*l/255,o[D+1]=m*c/255,o[D+2]=f*d/255;break;case"screen":o[D]=255-(255-u)*(255-l)/255,o[D+1]=255-(255-m)*(255-c)/255,o[D+2]=255-(255-f)*(255-d)/255;break;case"add":o[D]=u+l,o[D+1]=m+c,o[D+2]=f+d;break;case"diff":case"difference":o[D]=Math.abs(u-l),o[D+1]=Math.abs(m-c),o[D+2]=Math.abs(f-d);break;case"subtract":o[D]=u-l,o[D+1]=m-c,o[D+2]=f-d;break;case"darken":o[D]=Math.min(u,l),o[D+1]=Math.min(m,c),o[D+2]=Math.min(f,d);break;case"lighten":o[D]=Math.max(u,l),o[D+1]=Math.max(m,c),o[D+2]=Math.max(f,d);break;case"overlay":o[D]=l<128?2*u*l/255:255-2*(255-u)*(255-l)/255,o[D+1]=c<128?2*m*c/255:255-2*(255-m)*(255-c)/255,o[D+2]=d<128?2*f*d/255:255-2*(255-f)*(255-d)/255;break;case"exclusion":o[D]=l+u-2*l*u/255,o[D+1]=c+m-2*c*m/255,o[D+2]=d+f-2*d*f/255;break;case"tint":o[D]=l+u*x,o[D+1]=c+m*x,o[D+2]=d+f*x}},getUniformLocations:function(r,s){return{uColor:r.getUniformLocation(s,"uColor")}},sendUniformData:function(r,s){var o=new e.Color(this.color).getSource();o[0]=this.alpha*o[0]/255,o[1]=this.alpha*o[1]/255,o[2]=this.alpha*o[2]/255,o[3]=this.alpha,r.uniform4fv(s.uColor,o)},toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),e.Image.filters.BlendColor.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric,n=e.Image.filters,i=e.util.createClass;n.BlendImage=i(n.BaseFilter,{type:"BlendImage",image:null,mode:"multiply",alpha:1,vertexSource:`attribute vec2 aPosition;
varying vec2 vTexCoord;
varying vec2 vTexCoord2;
uniform mat3 uTransformMatrix;
void main() {
vTexCoord = aPosition;
vTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;
gl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);
}`,fragmentSource:{multiply:`precision highp float;
uniform sampler2D uTexture;
uniform sampler2D uImage;
uniform vec4 uColor;
varying vec2 vTexCoord;
varying vec2 vTexCoord2;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
vec4 color2 = texture2D(uImage, vTexCoord2);
color.rgba *= color2.rgba;
gl_FragColor = color;
}`,mask:`precision highp float;
uniform sampler2D uTexture;
uniform sampler2D uImage;
uniform vec4 uColor;
varying vec2 vTexCoord;
varying vec2 vTexCoord2;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
vec4 color2 = texture2D(uImage, vTexCoord2);
color.a = color2.a;
gl_FragColor = color;
}`},retrieveShader:function(r){var s=this.type+"_"+this.mode,o=this.fragmentSource[this.mode];return r.programCache.hasOwnProperty(s)||(r.programCache[s]=this.createProgram(r.context,o)),r.programCache[s]},applyToWebGL:function(r){var s=r.context,o=this.createTexture(r.filterBackend,this.image);this.bindAdditionalTexture(s,o,s.TEXTURE1),this.callSuper("applyToWebGL",r),this.unbindAdditionalTexture(s,s.TEXTURE1)},createTexture:function(r,s){return r.getCachedTexture(s.cacheKey,s._element)},calculateMatrix:function(){var r=this.image,s=r._element.width,o=r._element.height;return[1/r.scaleX,0,0,0,1/r.scaleY,0,-r.left/s,-r.top/o,1]},applyTo2d:function(r){var s=r.imageData,o=r.filterBackend.resources,a=s.data,l=a.length,c=s.width,d=s.height,u,m,f,_,x,D,E,M,I,z,G=this.image,A;o.blendImage||(o.blendImage=e.util.createCanvasElement()),I=o.blendImage,z=I.getContext("2d"),I.width!==c||I.height!==d?(I.width=c,I.height=d):z.clearRect(0,0,c,d),z.setTransform(G.scaleX,0,0,G.scaleY,G.left,G.top),z.drawImage(G._element,0,0,c,d),A=z.getImageData(0,0,c,d).data;for(var Y=0;Y<l;Y+=4)switch(x=a[Y],D=a[Y+1],E=a[Y+2],M=a[Y+3],u=A[Y],m=A[Y+1],f=A[Y+2],_=A[Y+3],this.mode){case"multiply":a[Y]=x*u/255,a[Y+1]=D*m/255,a[Y+2]=E*f/255,a[Y+3]=M*_/255;break;case"mask":a[Y+3]=_;break}},getUniformLocations:function(r,s){return{uTransformMatrix:r.getUniformLocation(s,"uTransformMatrix"),uImage:r.getUniformLocation(s,"uImage")}},sendUniformData:function(r,s){var o=this.calculateMatrix();r.uniform1i(s.uImage,1),r.uniformMatrix3fv(s.uTransformMatrix,!1,o)},toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),e.Image.filters.BlendImage.fromObject=function(r,s){e.Image.fromObject(r.image,function(o){var a=e.util.object.clone(r);a.image=o,s(new e.Image.filters.BlendImage(a))})}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=Math.pow,i=Math.floor,r=Math.sqrt,s=Math.abs,o=Math.round,a=Math.sin,l=Math.ceil,c=e.Image.filters,d=e.util.createClass;c.Resize=d(c.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3,getUniformLocations:function(u,m){return{uDelta:u.getUniformLocation(m,"uDelta"),uTaps:u.getUniformLocation(m,"uTaps")}},sendUniformData:function(u,m){u.uniform2fv(m.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),u.uniform1fv(m.uTaps,this.taps)},retrieveShader:function(u){var m=this.getFilterWindow(),f=this.type+"_"+m;if(!u.programCache.hasOwnProperty(f)){var _=this.generateShader(m);u.programCache[f]=this.createProgram(u.context,_)}return u.programCache[f]},getFilterWindow:function(){var u=this.tempScale;return Math.ceil(this.lanczosLobes/u)},getTaps:function(){for(var u=this.lanczosCreate(this.lanczosLobes),m=this.tempScale,f=this.getFilterWindow(),_=new Array(f),x=1;x<=f;x++)_[x-1]=u(x*m);return _},generateShader:function(_){for(var m=new Array(_),f=this.fragmentSourceTOP,_,x=1;x<=_;x++)m[x-1]=x+".0 * uDelta";return f+="uniform float uTaps["+_+`];
`,f+=`void main() {
`,f+=`  vec4 color = texture2D(uTexture, vTexCoord);
`,f+=`  float sum = 1.0;
`,m.forEach(function(D,E){f+="  color += texture2D(uTexture, vTexCoord + "+D+") * uTaps["+E+`];
`,f+="  color += texture2D(uTexture, vTexCoord - "+D+") * uTaps["+E+`];
`,f+="  sum += 2.0 * uTaps["+E+`];
`}),f+=`  gl_FragColor = color / sum;
`,f+="}",f},fragmentSourceTOP:`precision highp float;
uniform sampler2D uTexture;
uniform vec2 uDelta;
varying vec2 vTexCoord;
`,applyTo:function(u){u.webgl?(u.passes++,this.width=u.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=u.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),u.destinationWidth=this.dW,this._setupFrameBuffer(u),this.applyToWebGL(u),this._swapTextures(u),u.sourceWidth=u.destinationWidth,this.height=u.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),u.destinationHeight=this.dH,this._setupFrameBuffer(u),this.applyToWebGL(u),this._swapTextures(u),u.sourceHeight=u.destinationHeight):this.applyTo2d(u)},isNeutralState:function(){return this.scaleX===1&&this.scaleY===1},lanczosCreate:function(u){return function(m){if(m>=u||m<=-u)return 0;if(m<11920929e-14&&m>-11920929e-14)return 1;m*=Math.PI;var f=m/u;return a(m)/m*a(f)/f}},applyTo2d:function(u){var m=u.imageData,f=this.scaleX,_=this.scaleY;this.rcpScaleX=1/f,this.rcpScaleY=1/_;var x=m.width,D=m.height,E=o(x*f),M=o(D*_),I;this.resizeType==="sliceHack"?I=this.sliceByTwo(u,x,D,E,M):this.resizeType==="hermite"?I=this.hermiteFastResize(u,x,D,E,M):this.resizeType==="bilinear"?I=this.bilinearFiltering(u,x,D,E,M):this.resizeType==="lanczos"&&(I=this.lanczosResize(u,x,D,E,M)),u.imageData=I},sliceByTwo:function(u,m,f,_,x){var D=u.imageData,E=.5,M=!1,I=!1,z=m*E,G=f*E,A=e.filterBackend.resources,Y,X,ne=0,pe=0,ce=m,ie=0;for(A.sliceByTwo||(A.sliceByTwo=document.createElement("canvas")),Y=A.sliceByTwo,(Y.width<m*1.5||Y.height<f)&&(Y.width=m*1.5,Y.height=f),X=Y.getContext("2d"),X.clearRect(0,0,m*1.5,f),X.putImageData(D,0,0),_=i(_),x=i(x);!M||!I;)m=z,f=G,_<i(z*E)?z=i(z*E):(z=_,M=!0),x<i(G*E)?G=i(G*E):(G=x,I=!0),X.drawImage(Y,ne,pe,m,f,ce,ie,z,G),ne=ce,pe=ie,ie+=G;return X.getImageData(ne,pe,_,x)},lanczosResize:function(u,m,f,_,x){function D(Se){var je,ze,Ge,Ae,Ye,ft,Ft,Tt,at,yt,_t;for(ie.x=(Se+.5)*G,le.x=i(ie.x),je=0;je<x;je++){for(ie.y=(je+.5)*A,le.y=i(ie.y),Ye=0,ft=0,Ft=0,Tt=0,at=0,ze=le.x-ne;ze<=le.x+ne;ze++)if(!(ze<0||ze>=m)){yt=i(1e3*s(ze-ie.x)),ce[yt]||(ce[yt]={});for(var Re=le.y-pe;Re<=le.y+pe;Re++)Re<0||Re>=f||(_t=i(1e3*s(Re-ie.y)),ce[yt][_t]||(ce[yt][_t]=z(r(n(yt*Y,2)+n(_t*X,2))/1e3)),Ge=ce[yt][_t],Ge>0&&(Ae=(Re*m+ze)*4,Ye+=Ge,ft+=Ge*E[Ae],Ft+=Ge*E[Ae+1],Tt+=Ge*E[Ae+2],at+=Ge*E[Ae+3]))}Ae=(je*_+Se)*4,I[Ae]=ft/Ye,I[Ae+1]=Ft/Ye,I[Ae+2]=Tt/Ye,I[Ae+3]=at/Ye}return++Se<_?D(Se):M}var E=u.imageData.data,M=u.ctx.createImageData(_,x),I=M.data,z=this.lanczosCreate(this.lanczosLobes),G=this.rcpScaleX,A=this.rcpScaleY,Y=2/this.rcpScaleX,X=2/this.rcpScaleY,ne=l(G*this.lanczosLobes/2),pe=l(A*this.lanczosLobes/2),ce={},ie={},le={};return D(0)},bilinearFiltering:function(u,m,f,_,x){var D,E,M,I,z,G,A,Y,X,ne,pe,ce,ie=0,le,Se=this.rcpScaleX,je=this.rcpScaleY,ze=4*(m-1),Ge=u.imageData,Ae=Ge.data,Ye=u.ctx.createImageData(_,x),ft=Ye.data;for(A=0;A<x;A++)for(Y=0;Y<_;Y++)for(z=i(Se*Y),G=i(je*A),X=Se*Y-z,ne=je*A-G,le=4*(G*m+z),pe=0;pe<4;pe++)D=Ae[le+pe],E=Ae[le+4+pe],M=Ae[le+ze+pe],I=Ae[le+ze+4+pe],ce=D*(1-X)*(1-ne)+E*X*(1-ne)+M*ne*(1-X)+I*X*ne,ft[ie++]=ce;return Ye},hermiteFastResize:function(u,m,f,_,x){for(var D=this.rcpScaleX,E=this.rcpScaleY,M=l(D/2),I=l(E/2),z=u.imageData,G=z.data,A=u.ctx.createImageData(_,x),Y=A.data,X=0;X<x;X++)for(var ne=0;ne<_;ne++){for(var pe=(ne+X*_)*4,ce=0,ie=0,le=0,Se=0,je=0,ze=0,Ge=0,Ae=(X+.5)*E,Ye=i(X*E);Ye<(X+1)*E;Ye++)for(var ft=s(Ae-(Ye+.5))/I,Ft=(ne+.5)*D,Tt=ft*ft,at=i(ne*D);at<(ne+1)*D;at++){var yt=s(Ft-(at+.5))/M,_t=r(Tt+yt*yt);_t>1&&_t<-1||(ce=2*_t*_t*_t-3*_t*_t+1,ce>0&&(yt=4*(at+Ye*m),Ge+=ce*G[yt+3],le+=ce,G[yt+3]<255&&(ce=ce*G[yt+3]/250),Se+=ce*G[yt],je+=ce*G[yt+1],ze+=ce*G[yt+2],ie+=ce))}Y[pe]=Se/ie,Y[pe+1]=je/ie,Y[pe+2]=ze/ie,Y[pe+3]=Ge/le}return A},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),e.Image.filters.Resize.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Contrast=i(n.BaseFilter,{type:"Contrast",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform float uContrast;
varying vec2 vTexCoord;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
float contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));
color.rgb = contrastF * (color.rgb - 0.5) + 0.5;
gl_FragColor = color;
}`,contrast:0,mainParameter:"contrast",applyTo2d:function(r){if(this.contrast!==0){var s=r.imageData,o,l,a=s.data,l=a.length,c=Math.floor(this.contrast*255),d=259*(c+255)/(255*(259-c));for(o=0;o<l;o+=4)a[o]=d*(a[o]-128)+128,a[o+1]=d*(a[o+1]-128)+128,a[o+2]=d*(a[o+2]-128)+128}},getUniformLocations:function(r,s){return{uContrast:r.getUniformLocation(s,"uContrast")}},sendUniformData:function(r,s){r.uniform1f(s.uContrast,this.contrast)}}),e.Image.filters.Contrast.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Saturation=i(n.BaseFilter,{type:"Saturation",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform float uSaturation;
varying vec2 vTexCoord;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
float rgMax = max(color.r, color.g);
float rgbMax = max(rgMax, color.b);
color.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00;
color.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00;
color.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00;
gl_FragColor = color;
}`,saturation:0,mainParameter:"saturation",applyTo2d:function(r){if(this.saturation!==0){var s=r.imageData,o=s.data,a=o.length,l=-this.saturation,c,d;for(c=0;c<a;c+=4)d=Math.max(o[c],o[c+1],o[c+2]),o[c]+=d!==o[c]?(d-o[c])*l:0,o[c+1]+=d!==o[c+1]?(d-o[c+1])*l:0,o[c+2]+=d!==o[c+2]?(d-o[c+2])*l:0}},getUniformLocations:function(r,s){return{uSaturation:r.getUniformLocation(s,"uSaturation")}},sendUniformData:function(r,s){r.uniform1f(s.uSaturation,-this.saturation)}}),e.Image.filters.Saturation.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Vibrance=i(n.BaseFilter,{type:"Vibrance",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform float uVibrance;
varying vec2 vTexCoord;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
float max = max(color.r, max(color.g, color.b));
float avg = (color.r + color.g + color.b) / 3.0;
float amt = (abs(max - avg) * 2.0) * uVibrance;
color.r += max != color.r ? (max - color.r) * amt : 0.00;
color.g += max != color.g ? (max - color.g) * amt : 0.00;
color.b += max != color.b ? (max - color.b) * amt : 0.00;
gl_FragColor = color;
}`,vibrance:0,mainParameter:"vibrance",applyTo2d:function(r){if(this.vibrance!==0){var s=r.imageData,o=s.data,a=o.length,l=-this.vibrance,c,d,u,m;for(c=0;c<a;c+=4)d=Math.max(o[c],o[c+1],o[c+2]),u=(o[c]+o[c+1]+o[c+2])/3,m=Math.abs(d-u)*2/255*l,o[c]+=d!==o[c]?(d-o[c])*m:0,o[c+1]+=d!==o[c+1]?(d-o[c+1])*m:0,o[c+2]+=d!==o[c+2]?(d-o[c+2])*m:0}},getUniformLocations:function(r,s){return{uVibrance:r.getUniformLocation(s,"uVibrance")}},sendUniformData:function(r,s){r.uniform1f(s.uVibrance,-this.vibrance)}}),e.Image.filters.Vibrance.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Blur=i(n.BaseFilter,{type:"Blur",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform vec2 uDelta;
varying vec2 vTexCoord;
const float nSamples = 15.0;
vec3 v3offset = vec3(12.9898, 78.233, 151.7182);
float random(vec3 scale) {
return fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453);
}
void main() {
vec4 color = vec4(0.0);
float total = 0.0;
float offset = random(v3offset);
for (float t = -nSamples; t <= nSamples; t++) {
float percent = (t + offset - 0.5) / nSamples;
float weight = 1.0 - abs(percent);
color += texture2D(uTexture, vTexCoord + uDelta * percent) * weight;
total += weight;
}
gl_FragColor = color / total;
}`,blur:0,mainParameter:"blur",applyTo:function(r){r.webgl?(this.aspectRatio=r.sourceWidth/r.sourceHeight,r.passes++,this._setupFrameBuffer(r),this.horizontal=!0,this.applyToWebGL(r),this._swapTextures(r),this._setupFrameBuffer(r),this.horizontal=!1,this.applyToWebGL(r),this._swapTextures(r)):this.applyTo2d(r)},applyTo2d:function(r){r.imageData=this.simpleBlur(r)},simpleBlur:function(r){var s=r.filterBackend.resources,o,a,l=r.imageData.width,c=r.imageData.height;s.blurLayer1||(s.blurLayer1=e.util.createCanvasElement(),s.blurLayer2=e.util.createCanvasElement()),o=s.blurLayer1,a=s.blurLayer2,(o.width!==l||o.height!==c)&&(a.width=o.width=l,a.height=o.height=c);var d=o.getContext("2d"),u=a.getContext("2d"),m=15,f,_,x,D,E=this.blur*.06*.5;for(d.putImageData(r.imageData,0,0),u.clearRect(0,0,l,c),D=-m;D<=m;D++)f=(Math.random()-.5)/4,_=D/m,x=E*_*l+f,u.globalAlpha=1-Math.abs(_),u.drawImage(o,x,f),d.drawImage(a,0,0),u.globalAlpha=1,u.clearRect(0,0,a.width,a.height);for(D=-m;D<=m;D++)f=(Math.random()-.5)/4,_=D/m,x=E*_*c+f,u.globalAlpha=1-Math.abs(_),u.drawImage(o,f,x),d.drawImage(a,0,0),u.globalAlpha=1,u.clearRect(0,0,a.width,a.height);r.ctx.drawImage(o,0,0);var M=r.ctx.getImageData(0,0,o.width,o.height);return d.globalAlpha=1,d.clearRect(0,0,o.width,o.height),M},getUniformLocations:function(r,s){return{delta:r.getUniformLocation(s,"uDelta")}},sendUniformData:function(r,s){var o=this.chooseRightDelta();r.uniform2fv(s.delta,o)},chooseRightDelta:function(){var r=1,s=[0,0],o;return this.horizontal?this.aspectRatio>1&&(r=1/this.aspectRatio):this.aspectRatio<1&&(r=this.aspectRatio),o=r*this.blur*.12,this.horizontal?s[0]=o:s[1]=o,s}}),n.Blur.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Gamma=i(n.BaseFilter,{type:"Gamma",fragmentSource:`precision highp float;
uniform sampler2D uTexture;
uniform vec3 uGamma;
varying vec2 vTexCoord;
void main() {
vec4 color = texture2D(uTexture, vTexCoord);
vec3 correction = (1.0 / uGamma);
color.r = pow(color.r, correction.r);
color.g = pow(color.g, correction.g);
color.b = pow(color.b, correction.b);
gl_FragColor = color;
gl_FragColor.rgb *= color.a;
}`,gamma:[1,1,1],mainParameter:"gamma",initialize:function(r){this.gamma=[1,1,1],n.BaseFilter.prototype.initialize.call(this,r)},applyTo2d:function(r){var s=r.imageData,o=s.data,a=this.gamma,l=o.length,c=1/a[0],d=1/a[1],u=1/a[2],m;for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),m=0,l=256;m<l;m++)this.rVals[m]=Math.pow(m/255,c)*255,this.gVals[m]=Math.pow(m/255,d)*255,this.bVals[m]=Math.pow(m/255,u)*255;for(m=0,l=o.length;m<l;m+=4)o[m]=this.rVals[o[m]],o[m+1]=this.gVals[o[m+1]],o[m+2]=this.bVals[o[m+2]]},getUniformLocations:function(r,s){return{uGamma:r.getUniformLocation(s,"uGamma")}},sendUniformData:function(r,s){r.uniform3fv(s.uGamma,this.gamma)}}),e.Image.filters.Gamma.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.Composed=i(n.BaseFilter,{type:"Composed",subFilters:[],initialize:function(r){this.callSuper("initialize",r),this.subFilters=this.subFilters.slice(0)},applyTo:function(r){r.passes+=this.subFilters.length-1,this.subFilters.forEach(function(s){s.applyTo(r)})},toObject:function(){return e.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map(function(r){return r.toObject()})})},isNeutralState:function(){return!this.subFilters.some(function(r){return!r.isNeutralState()})}}),e.Image.filters.Composed.fromObject=function(r,s){var o=r.subFilters||[],a=o.map(function(c){return new e.Image.filters[c.type](c)}),l=new e.Image.filters.Composed({subFilters:a});return s&&s(l),l}})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass;n.HueRotation=i(n.ColorMatrix,{type:"HueRotation",rotation:0,mainParameter:"rotation",calculateMatrix:function(){var r=this.rotation*Math.PI,s=e.util.cos(r),o=e.util.sin(r),a=1/3,l=Math.sqrt(a)*o,c=1-s;this.matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.matrix[0]=s+c/3,this.matrix[1]=a*c-l,this.matrix[2]=a*c+l,this.matrix[5]=a*c+l,this.matrix[6]=s+a*c,this.matrix[7]=a*c-l,this.matrix[10]=a*c-l,this.matrix[11]=a*c+l,this.matrix[12]=s+a*c},isNeutralState:function(r){return this.calculateMatrix(),n.BaseFilter.prototype.isNeutralState.call(this,r)},applyTo:function(r){this.calculateMatrix(),n.BaseFilter.prototype.applyTo.call(this,r)}}),e.Image.filters.HueRotation.fromObject=e.Image.filters.BaseFilter.fromObject})(vn);(function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.clone;if(e.Text){e.warn("fabric.Text is already defined");return}var i="fontFamily fontWeight fontSize text underline overline linethrough textAlign fontStyle lineHeight textBackgroundColor charSpacing styles direction path pathStartOffset pathSide pathAlign".split(" ");e.Text=e.util.createClass(e.Object,{_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles","path","pathStartOffset","pathSide","pathAlign"],_reNewline:/\r?\n/,_reSpacesAndTabs:/[ \t\r]/g,_reSpaceAndTab:/[ \t\r]/,_reWords:/\S+/g,type:"text",fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",underline:!1,overline:!1,linethrough:!1,textAlign:"left",fontStyle:"normal",lineHeight:1.16,superscript:{size:.6,baseline:-.35},subscript:{size:.6,baseline:.11},textBackgroundColor:"",stateProperties:e.Object.prototype.stateProperties.concat(i),cacheProperties:e.Object.prototype.cacheProperties.concat(i),stroke:null,shadow:null,path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.315,overline:-.88},_fontSizeMult:1.13,charSpacing:0,styles:null,_measuringContext:null,deltaY:0,direction:"ltr",_styleProperties:["stroke","strokeWidth","fill","fontFamily","fontSize","fontWeight","fontStyle","underline","overline","linethrough","deltaY","textBackgroundColor"],__charBounds:[],CACHE_FONT_SIZE:400,MIN_TEXT_WIDTH:2,initialize:function(r,s){this.styles=s?s.styles||{}:{},this.text=r,this.__skipDimension=!0,this.callSuper("initialize",s),this.path&&this.setPathInfo(),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},setPathInfo:function(){var r=this.path;r&&(r.segmentsInfo=e.util.getPathSegmentsInfo(r.path))},getMeasuringContext:function(){return e._measuringContext||(e._measuringContext=this.canvas&&this.canvas.contextCache||e.util.createCanvasElement().getContext("2d")),e._measuringContext},_splitText:function(){var r=this._splitTextIntoLines(this.text);return this.textLines=r.lines,this._textLines=r.graphemeLines,this._unwrappedTextLines=r._unwrappedLines,this._text=r.graphemeText,r},initDimensions:function(){this.__skipDimension||(this._splitText(),this._clearCache(),this.path?(this.width=this.path.width,this.height=this.path.height):(this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,this.height=this.calcTextHeight()),this.textAlign.indexOf("justify")!==-1&&this.enlargeSpaces(),this.saveState({propertySet:"_dimensionAffectingProps"}))},enlargeSpaces:function(){for(var r,s,o,a,l,c,d,u=0,m=this._textLines.length;u<m;u++)if(!(this.textAlign!=="justify"&&(u===m-1||this.isEndOfWrapping(u)))&&(a=0,l=this._textLines[u],s=this.getLineWidth(u),s<this.width&&(d=this.textLines[u].match(this._reSpacesAndTabs)))){o=d.length,r=(this.width-s)/o;for(var f=0,_=l.length;f<=_;f++)c=this.__charBounds[u][f],this._reSpaceAndTab.test(l[f])?(c.width+=r,c.kernedWidth+=r,c.left+=a,a+=r):c.left+=a}},isEndOfWrapping:function(r){return r===this._textLines.length-1},missingNewlineOffset:function(){return 1},toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},_getCacheCanvasDimensions:function(){var r=this.callSuper("_getCacheCanvasDimensions"),s=this.fontSize;return r.width+=s*r.zoomX,r.height+=s*r.zoomY,r},_render:function(r){var s=this.path;s&&!s.isNotVisible()&&s._render(r),this._setTextStyles(r),this._renderTextLinesBackground(r),this._renderTextDecoration(r,"underline"),this._renderText(r),this._renderTextDecoration(r,"overline"),this._renderTextDecoration(r,"linethrough")},_renderText:function(r){this.paintFirst==="stroke"?(this._renderTextStroke(r),this._renderTextFill(r)):(this._renderTextFill(r),this._renderTextStroke(r))},_setTextStyles:function(r,s,o){if(r.textBaseline="alphabetical",this.path)switch(this.pathAlign){case"center":r.textBaseline="middle";break;case"ascender":r.textBaseline="top";break;case"descender":r.textBaseline="bottom";break}r.font=this._getFontDeclaration(s,o)},calcTextWidth:function(){for(var r=this.getLineWidth(0),s=1,o=this._textLines.length;s<o;s++){var a=this.getLineWidth(s);a>r&&(r=a)}return r},_renderTextLine:function(r,s,o,a,l,c){this._renderChars(r,s,o,a,l,c)},_renderTextLinesBackground:function(r){if(!(!this.textBackgroundColor&&!this.styleHas("textBackgroundColor"))){for(var s,o,a=r.fillStyle,l,c,d=this._getLeftOffset(),u=this._getTopOffset(),m=0,f=0,_,x,D=this.path,E,M=0,I=this._textLines.length;M<I;M++){if(s=this.getHeightOfLine(M),!this.textBackgroundColor&&!this.styleHas("textBackgroundColor",M)){u+=s;continue}l=this._textLines[M],o=this._getLineLeftOffset(M),f=0,m=0,c=this.getValueOfPropertyAt(M,0,"textBackgroundColor");for(var z=0,G=l.length;z<G;z++)_=this.__charBounds[M][z],x=this.getValueOfPropertyAt(M,z,"textBackgroundColor"),D?(r.save(),r.translate(_.renderLeft,_.renderTop),r.rotate(_.angle),r.fillStyle=x,x&&r.fillRect(-_.width/2,-s/this.lineHeight*(1-this._fontSizeFraction),_.width,s/this.lineHeight),r.restore()):x!==c?(E=d+o+m,this.direction==="rtl"&&(E=this.width-E-f),r.fillStyle=c,c&&r.fillRect(E,u,f,s/this.lineHeight),m=_.left,f=_.width,c=x):f+=_.kernedWidth;x&&!D&&(E=d+o+m,this.direction==="rtl"&&(E=this.width-E-f),r.fillStyle=x,r.fillRect(E,u,f,s/this.lineHeight)),u+=s}r.fillStyle=a,this._removeShadow(r)}},getFontCache:function(r){var s=r.fontFamily.toLowerCase();e.charWidthsCache[s]||(e.charWidthsCache[s]={});var o=e.charWidthsCache[s],a=r.fontStyle.toLowerCase()+"_"+(r.fontWeight+"").toLowerCase();return o[a]||(o[a]={}),o[a]},_measureChar:function(r,s,o,a){var l=this.getFontCache(s),c=this._getFontDeclaration(s),d=this._getFontDeclaration(a),u=o+r,m=c===d,f,_,x,D=s.fontSize/this.CACHE_FONT_SIZE,E;if(o&&l[o]!==void 0&&(x=l[o]),l[r]!==void 0&&(E=f=l[r]),m&&l[u]!==void 0&&(_=l[u],E=_-x),f===void 0||x===void 0||_===void 0){var M=this.getMeasuringContext();this._setTextStyles(M,s,!0)}return f===void 0&&(E=f=M.measureText(r).width,l[r]=f),x===void 0&&m&&o&&(x=M.measureText(o).width,l[o]=x),m&&_===void 0&&(_=M.measureText(u).width,l[u]=_,E=_-x),{width:f*D,kernedWidth:E*D}},getHeightOfChar:function(r,s){return this.getValueOfPropertyAt(r,s,"fontSize")},measureLine:function(r){var s=this._measureLine(r);return this.charSpacing!==0&&(s.width-=this._getWidthOfCharSpacing()),s.width<0&&(s.width=0),s},_measureLine:function(r){var s=0,o,a,l=this._textLines[r],c,d,u=0,m=new Array(l.length),f=0,_,x,D=this.path,E=this.pathSide==="right";for(this.__charBounds[r]=m,o=0;o<l.length;o++)a=l[o],d=this._getGraphemeBox(a,r,o,c),m[o]=d,s+=d.kernedWidth,c=a;if(m[o]={left:d?d.left+d.width:0,width:0,kernedWidth:0,height:this.fontSize},D){switch(x=D.segmentsInfo[D.segmentsInfo.length-1].length,_=e.util.getPointOnPath(D.path,0,D.segmentsInfo),_.x+=D.pathOffset.x,_.y+=D.pathOffset.y,this.textAlign){case"left":f=E?x-s:0;break;case"center":f=(x-s)/2;break;case"right":f=E?0:x-s;break}for(f+=this.pathStartOffset*(E?-1:1),o=E?l.length-1:0;E?o>=0:o<l.length;E?o--:o++)d=m[o],f>x?f%=x:f<0&&(f+=x),this._setGraphemeOnPath(f,d,_),f+=d.kernedWidth}return{width:s,numOfSpaces:u}},_setGraphemeOnPath:function(r,s,o){var a=r+s.kernedWidth/2,l=this.path,c=e.util.getPointOnPath(l.path,a,l.segmentsInfo);s.renderLeft=c.x-o.x,s.renderTop=c.y-o.y,s.angle=c.angle+(this.pathSide==="right"?Math.PI:0)},_getGraphemeBox:function(r,s,o,a,l){var c=this.getCompleteStyleDeclaration(s,o),d=a?this.getCompleteStyleDeclaration(s,o-1):{},u=this._measureChar(r,c,a,d),m=u.kernedWidth,f=u.width,_;this.charSpacing!==0&&(_=this._getWidthOfCharSpacing(),f+=_,m+=_);var x={width:f,left:0,height:c.fontSize,kernedWidth:m,deltaY:c.deltaY};if(o>0&&!l){var D=this.__charBounds[s][o-1];x.left=D.left+D.width+u.kernedWidth-u.width}return x},getHeightOfLine:function(r){if(this.__lineHeights[r])return this.__lineHeights[r];for(var s=this._textLines[r],o=this.getHeightOfChar(r,0),a=1,l=s.length;a<l;a++)o=Math.max(this.getHeightOfChar(r,a),o);return this.__lineHeights[r]=o*this.lineHeight*this._fontSizeMult},calcTextHeight:function(){for(var r,s=0,o=0,a=this._textLines.length;o<a;o++)r=this.getHeightOfLine(o),s+=o===a-1?r/this.lineHeight:r;return s},_getLeftOffset:function(){return this.direction==="ltr"?-this.width/2:this.width/2},_getTopOffset:function(){return-this.height/2},_renderTextCommon:function(r,s){r.save();for(var o=0,a=this._getLeftOffset(),l=this._getTopOffset(),c=0,d=this._textLines.length;c<d;c++){var u=this.getHeightOfLine(c),m=u/this.lineHeight,f=this._getLineLeftOffset(c);this._renderTextLine(s,r,this._textLines[c],a+f,l+o+m,c),o+=u}r.restore()},_renderTextFill:function(r){!this.fill&&!this.styleHas("fill")||this._renderTextCommon(r,"fillText")},_renderTextStroke:function(r){(!this.stroke||this.strokeWidth===0)&&this.isEmptyStyles()||(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(r),r.save(),this._setLineDash(r,this.strokeDashArray),r.beginPath(),this._renderTextCommon(r,"strokeText"),r.closePath(),r.restore())},_renderChars:function(r,s,o,a,l,c){var d=this.getHeightOfLine(c),u=this.textAlign.indexOf("justify")!==-1,m,f,_="",x,D=0,E,M=this.path,I=!u&&this.charSpacing===0&&this.isEmptyStyles(c)&&!M,z=this.direction==="ltr",G=this.direction==="ltr"?1:-1,A,Y=s.canvas.getAttribute("dir");if(s.save(),Y!==this.direction&&(s.canvas.setAttribute("dir",z?"ltr":"rtl"),s.direction=z?"ltr":"rtl",s.textAlign=z?"left":"right"),l-=d*this._fontSizeFraction/this.lineHeight,I){this._renderChar(r,s,c,0,o.join(""),a,l,d),s.restore();return}for(var X=0,ne=o.length-1;X<=ne;X++)E=X===ne||this.charSpacing||M,_+=o[X],x=this.__charBounds[c][X],D===0?(a+=G*(x.kernedWidth-x.width),D+=x.width):D+=x.kernedWidth,u&&!E&&this._reSpaceAndTab.test(o[X])&&(E=!0),E||(m=m||this.getCompleteStyleDeclaration(c,X),f=this.getCompleteStyleDeclaration(c,X+1),E=e.util.hasStyleChanged(m,f,!1)),E&&(M?(s.save(),s.translate(x.renderLeft,x.renderTop),s.rotate(x.angle),this._renderChar(r,s,c,X,_,-D/2,0,d),s.restore()):(A=a,this._renderChar(r,s,c,X,_,A,l,d)),_="",m=f,a+=G*D,D=0);s.restore()},_applyPatternGradientTransformText:function(r){var s=e.util.createCanvasElement(),o,a=this.width+this.strokeWidth,l=this.height+this.strokeWidth;return s.width=a,s.height=l,o=s.getContext("2d"),o.beginPath(),o.moveTo(0,0),o.lineTo(a,0),o.lineTo(a,l),o.lineTo(0,l),o.closePath(),o.translate(a/2,l/2),o.fillStyle=r.toLive(o),this._applyPatternGradientTransform(o,r),o.fill(),o.createPattern(s,"no-repeat")},handleFiller:function(r,s,o){var a,l;return o.toLive?o.gradientUnits==="percentage"||o.gradientTransform||o.patternTransform?(a=-this.width/2,l=-this.height/2,r.translate(a,l),r[s]=this._applyPatternGradientTransformText(o),{offsetX:a,offsetY:l}):(r[s]=o.toLive(r,this),this._applyPatternGradientTransform(r,o)):(r[s]=o,{offsetX:0,offsetY:0})},_setStrokeStyles:function(r,s){return r.lineWidth=s.strokeWidth,r.lineCap=this.strokeLineCap,r.lineDashOffset=this.strokeDashOffset,r.lineJoin=this.strokeLineJoin,r.miterLimit=this.strokeMiterLimit,this.handleFiller(r,"strokeStyle",s.stroke)},_setFillStyles:function(r,s){return this.handleFiller(r,"fillStyle",s.fill)},_renderChar:function(r,s,o,a,l,c,d){var u=this._getStyleDeclaration(o,a),m=this.getCompleteStyleDeclaration(o,a),f=r==="fillText"&&m.fill,_=r==="strokeText"&&m.stroke&&m.strokeWidth,x,D;!_&&!f||(s.save(),f&&(x=this._setFillStyles(s,m)),_&&(D=this._setStrokeStyles(s,m)),s.font=this._getFontDeclaration(m),u&&u.textBackgroundColor&&this._removeShadow(s),u&&u.deltaY&&(d+=u.deltaY),f&&s.fillText(l,c-x.offsetX,d-x.offsetY),_&&s.strokeText(l,c-D.offsetX,d-D.offsetY),s.restore())},setSuperscript:function(r,s){return this._setScript(r,s,this.superscript)},setSubscript:function(r,s){return this._setScript(r,s,this.subscript)},_setScript:function(r,s,o){var a=this.get2DCursorLocation(r,!0),l=this.getValueOfPropertyAt(a.lineIndex,a.charIndex,"fontSize"),c=this.getValueOfPropertyAt(a.lineIndex,a.charIndex,"deltaY"),d={fontSize:l*o.size,deltaY:c+l*o.baseline};return this.setSelectionStyles(d,r,s),this},_getLineLeftOffset:function(r){var s=this.getLineWidth(r),o=this.width-s,a=this.textAlign,l=this.direction,d,c=0,d=this.isEndOfWrapping(r);return a==="justify"||a==="justify-center"&&!d||a==="justify-right"&&!d||a==="justify-left"&&!d?0:(a==="center"&&(c=o/2),a==="right"&&(c=o),a==="justify-center"&&(c=o/2),a==="justify-right"&&(c=o),l==="rtl"&&(c-=o),c)},_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]},_shouldClearDimensionCache:function(){var r=this._forceClearCache;return r||(r=this.hasStateChanged("_dimensionAffectingProps")),r&&(this.dirty=!0,this._forceClearCache=!1),r},getLineWidth:function(r){if(this.__lineWidths[r]!==void 0)return this.__lineWidths[r];var s=this.measureLine(r),o=s.width;return this.__lineWidths[r]=o,o},_getWidthOfCharSpacing:function(){return this.charSpacing!==0?this.fontSize*this.charSpacing/1e3:0},getValueOfPropertyAt:function(r,s,o){var a=this._getStyleDeclaration(r,s);return a&&typeof a[o]<"u"?a[o]:this[o]},_renderTextDecoration:function(r,s){if(!(!this[s]&&!this.styleHas(s))){r.save(),(s==="overline"||s==="linethrough")&&this._removeShadow(r);for(var o,a,l,c,d,u,m,f,_=this._getLeftOffset(),x=this._getTopOffset(),D,E,M,I,z,G,A,Y,X=this.path,ne=this._getWidthOfCharSpacing(),pe=this.offsets[s],ce=0,ie=this._textLines.length;ce<ie;ce++){if(o=this.getHeightOfLine(ce),!this[s]&&!this.styleHas(s,ce)){x+=o;continue}m=this._textLines[ce],G=o/this.lineHeight,c=this._getLineLeftOffset(ce),E=0,M=0,f=this.getValueOfPropertyAt(ce,0,s),Y=this.getValueOfPropertyAt(ce,0,"fill"),D=x+G*(1-this._fontSizeFraction),a=this.getHeightOfChar(ce,0),d=this.getValueOfPropertyAt(ce,0,"deltaY");for(var le=0,Se=m.length;le<Se;le++)if(I=this.__charBounds[ce][le],z=this.getValueOfPropertyAt(ce,le,s),A=this.getValueOfPropertyAt(ce,le,"fill"),l=this.getHeightOfChar(ce,le),u=this.getValueOfPropertyAt(ce,le,"deltaY"),X&&z&&A)r.save(),r.fillStyle=Y,r.translate(I.renderLeft,I.renderTop),r.rotate(I.angle),r.fillRect(-I.kernedWidth/2,pe*l+u,I.kernedWidth,this.fontSize/15),r.restore();else if((z!==f||A!==Y||l!==a||u!==d)&&M>0){var je=_+c+E;this.direction==="rtl"&&(je=this.width-je-M),f&&Y&&(r.fillStyle=Y,r.fillRect(je,D+pe*a+d,M,this.fontSize/15)),E=I.left,M=I.width,f=z,Y=A,a=l,d=u}else M+=I.kernedWidth;var je=_+c+E;this.direction==="rtl"&&(je=this.width-je-M),r.fillStyle=A,z&&A&&r.fillRect(je,D+pe*a+d,M-ne,this.fontSize/15),x+=o}r.restore()}},_getFontDeclaration:function(r,s){var o=r||this,a=this.fontFamily,l=e.Text.genericFonts.indexOf(a.toLowerCase())>-1,c=a===void 0||a.indexOf("'")>-1||a.indexOf(",")>-1||a.indexOf('"')>-1||l?o.fontFamily:'"'+o.fontFamily+'"';return[e.isLikelyNode?o.fontWeight:o.fontStyle,e.isLikelyNode?o.fontStyle:o.fontWeight,s?this.CACHE_FONT_SIZE+"px":o.fontSize+"px",c].join(" ")},render:function(r){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",r)))},_splitTextIntoLines:function(r){for(var s=r.split(this._reNewline),o=new Array(s.length),a=[`
`],l=[],c=0;c<s.length;c++)o[c]=e.util.string.graphemeSplit(s[c]),l=l.concat(o[c],a);return l.pop(),{_unwrappedLines:o,lines:s,graphemeText:l,graphemeLines:o}},toObject:function(r){var s=i.concat(r),o=this.callSuper("toObject",s);return o.styles=e.util.stylesToArray(this.styles,this.text),o.path&&(o.path=this.path.toObject()),o},set:function(r,s){this.callSuper("set",r,s);var o=!1,a=!1;if(typeof r=="object")for(var l in r)l==="path"&&this.setPathInfo(),o=o||this._dimensionAffectingProps.indexOf(l)!==-1,a=a||l==="path";else o=this._dimensionAffectingProps.indexOf(r)!==-1,a=r==="path";return a&&this.setPathInfo(),o&&(this.initDimensions(),this.setCoords()),this},complexity:function(){return 1}}),e.Text.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size letter-spacing text-decoration text-anchor".split(" ")),e.Text.DEFAULT_SVG_FONT_SIZE=16,e.Text.fromElement=function(r,s,o){if(!r)return s(null);var a=e.parseAttributes(r,e.Text.ATTRIBUTE_NAMES),l=a.textAnchor||"left";if(o=e.util.object.extend(o?n(o):{},a),o.top=o.top||0,o.left=o.left||0,a.textDecoration){var c=a.textDecoration;c.indexOf("underline")!==-1&&(o.underline=!0),c.indexOf("overline")!==-1&&(o.overline=!0),c.indexOf("line-through")!==-1&&(o.linethrough=!0),delete o.textDecoration}"dx"in a&&(o.left+=a.dx),"dy"in a&&(o.top+=a.dy),"fontSize"in o||(o.fontSize=e.Text.DEFAULT_SVG_FONT_SIZE);var d="";"textContent"in r?d=r.textContent:"firstChild"in r&&r.firstChild!==null&&"data"in r.firstChild&&r.firstChild.data!==null&&(d=r.firstChild.data),d=d.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var u=o.strokeWidth;o.strokeWidth=0;var m=new e.Text(d,o),f=m.getScaledHeight()/m.height,_=(m.height+m.strokeWidth)*m.lineHeight-m.height,x=_*f,D=m.getScaledHeight()+x,E=0;l==="center"&&(E=m.getScaledWidth()/2),l==="right"&&(E=m.getScaledWidth()),m.set({left:m.left-E,top:m.top-(D-m.fontSize*(.07+m._fontSizeFraction))/m.lineHeight,strokeWidth:typeof u<"u"?u:1}),s(m)},e.Text.fromObject=function(r,s){var o=n(r),a=r.path;return delete o.path,e.Object._fromObject("Text",o,function(l){l.styles=e.util.stylesFromArray(r.styles,r.text),a?e.Object._fromObject("Path",a,function(c){l.set("path",c),s(l)},"path"):s(l)},"text")},e.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],e.util.createAccessors&&e.util.createAccessors(e.Text)})(vn);(function(){be.util.object.extend(be.Text.prototype,{isEmptyStyles:function(t){if(!this.styles||typeof t<"u"&&!this.styles[t])return!0;var e=typeof t>"u"?this.styles:{line:this.styles[t]};for(var n in e)for(var i in e[n])for(var r in e[n][i])return!1;return!0},styleHas:function(t,e){if(!this.styles||!t||t===""||typeof e<"u"&&!this.styles[e])return!1;var n=typeof e>"u"?this.styles:{0:this.styles[e]};for(var i in n)for(var r in n[i])if(typeof n[i][r][t]<"u")return!0;return!1},cleanStyle:function(t){if(!this.styles||!t||t==="")return!1;var e=this.styles,n=0,i,r,s=!0,o=0,a;for(var l in e){i=0;for(var c in e[l]){var a=e[l][c],d=a.hasOwnProperty(t);n++,d?(r?a[t]!==r&&(s=!1):r=a[t],a[t]===this[t]&&delete a[t]):s=!1,Object.keys(a).length!==0?i++:delete e[l][c]}i===0&&delete e[l]}for(var u=0;u<this._textLines.length;u++)o+=this._textLines[u].length;s&&n===o&&(this[t]=r,this.removeStyle(t))},removeStyle:function(t){if(!(!this.styles||!t||t==="")){var e=this.styles,n,i,r;for(i in e){n=e[i];for(r in n)delete n[r][t],Object.keys(n[r]).length===0&&delete n[r];Object.keys(n).length===0&&delete e[i]}}},_extendStyles:function(t,e){var n=this.get2DCursorLocation(t);this._getLineStyle(n.lineIndex)||this._setLineStyle(n.lineIndex),this._getStyleDeclaration(n.lineIndex,n.charIndex)||this._setStyleDeclaration(n.lineIndex,n.charIndex,{}),be.util.object.extend(this._getStyleDeclaration(n.lineIndex,n.charIndex),e)},get2DCursorLocation:function(t,e){typeof t>"u"&&(t=this.selectionStart);for(var n=e?this._unwrappedTextLines:this._textLines,i=n.length,r=0;r<i;r++){if(t<=n[r].length)return{lineIndex:r,charIndex:t};t-=n[r].length+this.missingNewlineOffset(r,e)}return{lineIndex:r-1,charIndex:n[r-1].length<t?n[r-1].length:t}},getSelectionStyles:function(t,e,n){typeof t>"u"&&(t=this.selectionStart||0),typeof e>"u"&&(e=this.selectionEnd||t);for(var i=[],r=t;r<e;r++)i.push(this.getStyleAtPosition(r,n));return i},getStyleAtPosition:function(t,e){var n=this.get2DCursorLocation(t),i=e?this.getCompleteStyleDeclaration(n.lineIndex,n.charIndex):this._getStyleDeclaration(n.lineIndex,n.charIndex);return i||{}},setSelectionStyles:function(t,e,n){typeof e>"u"&&(e=this.selectionStart||0),typeof n>"u"&&(n=this.selectionEnd||e);for(var i=e;i<n;i++)this._extendStyles(i,t);return this._forceClearCache=!0,this},_getStyleDeclaration:function(t,e){var n=this.styles&&this.styles[t];return n?n[e]:null},getCompleteStyleDeclaration:function(t,e){for(var n=this._getStyleDeclaration(t,e)||{},i={},r,s=0;s<this._styleProperties.length;s++)r=this._styleProperties[s],i[r]=typeof n[r]>"u"?this[r]:n[r];return i},_setStyleDeclaration:function(t,e,n){this.styles[t][e]=n},_deleteStyleDeclaration:function(t,e){delete this.styles[t][e]},_getLineStyle:function(t){return!!this.styles[t]},_setLineStyle:function(t){this.styles[t]={}},_deleteLineStyle:function(t){delete this.styles[t]}})})();(function(){function t(e){e.textDecoration&&(e.textDecoration.indexOf("underline")>-1&&(e.underline=!0),e.textDecoration.indexOf("line-through")>-1&&(e.linethrough=!0),e.textDecoration.indexOf("overline")>-1&&(e.overline=!0),delete e.textDecoration)}be.IText=be.util.createClass(be.Text,be.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"",cursorDelay:1e3,cursorDuration:600,caching:!0,hiddenTextareaContainer:null,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(e,n){this.callSuper("initialize",e,n),this.initBehavior()},setSelectionStart:function(e){e=Math.max(e,0),this._updateAndFire("selectionStart",e)},setSelectionEnd:function(e){e=Math.min(e,this.text.length),this._updateAndFire("selectionEnd",e)},_updateAndFire:function(e,n){this[e]!==n&&(this._fireSelectionChanged(),this[e]=n),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(e){this.clearContextTop(),this.callSuper("render",e),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(e){this.callSuper("_render",e)},clearContextTop:function(e){if(!(!this.isEditing||!this.canvas||!this.canvas.contextTop)){var n=this.canvas.contextTop,i=this.canvas.viewportTransform;n.save(),n.transform(i[0],i[1],i[2],i[3],i[4],i[5]),this.transform(n),this._clearTextArea(n),e||n.restore()}},renderCursorOrSelection:function(){if(!(!this.isEditing||!this.canvas||!this.canvas.contextTop)){var e=this._getCursorBoundaries(),n=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(e,n):this.renderSelection(e,n),n.restore()}},_clearTextArea:function(e){var n=this.width+4,i=this.height+4;e.clearRect(-n/2,-i/2,n,i)},_getCursorBoundaries:function(e){typeof e>"u"&&(e=this.selectionStart);var n=this._getLeftOffset(),i=this._getTopOffset(),r=this._getCursorBoundariesOffsets(e);return{left:n,top:i,leftOffset:r.left,topOffset:r.top}},_getCursorBoundariesOffsets:function(e){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var n,i,r,s=0,o=0,a,l=this.get2DCursorLocation(e);r=l.charIndex,i=l.lineIndex;for(var c=0;c<i;c++)s+=this.getHeightOfLine(c);n=this._getLineLeftOffset(i);var d=this.__charBounds[i][r];return d&&(o=d.left),this.charSpacing!==0&&r===this._textLines[i].length&&(o-=this._getWidthOfCharSpacing()),a={top:s,left:n+(o>0?o:0)},this.direction==="rtl"&&(a.left*=-1),this.cursorOffsetCache=a,this.cursorOffsetCache},renderCursor:function(e,n){var i=this.get2DCursorLocation(),r=i.lineIndex,s=i.charIndex>0?i.charIndex-1:0,o=this.getValueOfPropertyAt(r,s,"fontSize"),a=this.scaleX*this.canvas.getZoom(),l=this.cursorWidth/a,c=e.topOffset,d=this.getValueOfPropertyAt(r,s,"deltaY");c+=(1-this._fontSizeFraction)*this.getHeightOfLine(r)/this.lineHeight-o*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(e,n),n.fillStyle=this.cursorColor||this.getValueOfPropertyAt(r,s,"fill"),n.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,n.fillRect(e.left+e.leftOffset-l/2,c+e.top+d,l,o)},renderSelection:function(e,n){for(var i=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,r=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,s=this.textAlign.indexOf("justify")!==-1,o=this.get2DCursorLocation(i),a=this.get2DCursorLocation(r),l=o.lineIndex,c=a.lineIndex,d=o.charIndex<0?0:o.charIndex,u=a.charIndex<0?0:a.charIndex,m=l;m<=c;m++){var f=this._getLineLeftOffset(m)||0,_=this.getHeightOfLine(m),x=0,D=0,E=0;if(m===l&&(D=this.__charBounds[l][d].left),m>=l&&m<c)E=s&&!this.isEndOfWrapping(m)?this.width:this.getLineWidth(m)||5;else if(m===c)if(u===0)E=this.__charBounds[c][u].left;else{var M=this._getWidthOfCharSpacing();E=this.__charBounds[c][u-1].left+this.__charBounds[c][u-1].width-M}x=_,(this.lineHeight<1||m===c&&this.lineHeight>1)&&(_/=this.lineHeight);var I=e.left+f+D,z=E-D,G=_,A=0;this.inCompositionMode?(n.fillStyle=this.compositionColor||"black",G=1,A=_):n.fillStyle=this.selectionColor,this.direction==="rtl"&&(I=this.width-I-z),n.fillRect(I,e.top+e.topOffset+A,z,G),e.topOffset+=x}},getCurrentCharFontSize:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fontSize")},getCurrentCharColor:function(){var e=this._getCurrentCharIndex();return this.getValueOfPropertyAt(e.l,e.c,"fill")},_getCurrentCharIndex:function(){var e=this.get2DCursorLocation(this.selectionStart,!0),n=e.charIndex>0?e.charIndex-1:0;return{l:e.lineIndex,c:n}}}),be.IText.fromObject=function(e,n){var i=be.util.stylesFromArray(e.styles,e.text),r=Object.assign({},e,{styles:i});if(delete r.path,t(r),r.styles)for(var s in r.styles)for(var o in r.styles[s])t(r.styles[s][o]);be.Object._fromObject("IText",r,function(a){e.path?be.Object._fromObject("Path",e.path,function(l){a.set("path",l),n(a)},"path"):n(a)},"text")}})();(function(){var t=be.util.object.clone;be.util.object.extend(be.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var e=this;this.on("added",function(){var n=e.canvas;n&&(n._hasITextHandlers||(n._hasITextHandlers=!0,e._initCanvasHandlers(n)),n._iTextInstances=n._iTextInstances||[],n._iTextInstances.push(e))})},initRemovedHandler:function(){var e=this;this.on("removed",function(){var n=e.canvas;n&&(n._iTextInstances=n._iTextInstances||[],be.util.removeFromArray(n._iTextInstances,e),n._iTextInstances.length===0&&(n._hasITextHandlers=!1,e._removeCanvasHandlers(n)))})},_initCanvasHandlers:function(e){e._mouseUpITextHandler=function(){e._iTextInstances&&e._iTextInstances.forEach(function(n){n.__isMousedown=!1})},e.on("mouse:up",e._mouseUpITextHandler)},_removeCanvasHandlers:function(e){e.off("mouse:up",e._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(e,n,i,r){var s;return s={isAborted:!1,abort:function(){this.isAborted=!0}},e.animate("_currentCursorOpacity",n,{duration:i,onComplete:function(){s.isAborted||e[r]()},onChange:function(){e.canvas&&e.selectionStart===e.selectionEnd&&e.renderCursorOrSelection()},abort:function(){return s.isAborted}}),s},_onTickComplete:function(){var e=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout(function(){e._currentTickCompleteState=e._animateCursor(e,0,this.cursorDuration/2,"_tick")},100)},initDelayedCursor:function(e){var n=this,i=e?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){n._tick()},i)},abortCursorAnimation:function(){var e=this._currentTickState||this._currentTickCompleteState,n=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,e&&n&&n.clearContext(n.contextTop||n.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(e){var n=0,i=e-1;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)n++,i--;for(;/\S/.test(this._text[i])&&i>-1;)n++,i--;return e-n},findWordBoundaryRight:function(e){var n=0,i=e;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)n++,i++;for(;/\S/.test(this._text[i])&&i<this._text.length;)n++,i++;return e+n},findLineBoundaryLeft:function(e){for(var n=0,i=e-1;!/\n/.test(this._text[i])&&i>-1;)n++,i--;return e-n},findLineBoundaryRight:function(e){for(var n=0,i=e;!/\n/.test(this._text[i])&&i<this._text.length;)n++,i++;return e+n},searchWordBoundary:function(e,n){for(var i=this._text,r=this._reSpace.test(i[e])?e-1:e,s=i[r],o=be.reNonWord;!o.test(s)&&r>0&&r<i.length;)r+=n,s=i[r];return o.test(s)&&(r+=n===1?0:1),r},selectWord:function(e){e=e||this.selectionStart;var n=this.searchWordBoundary(e,-1),i=this.searchWordBoundary(e,1);this.selectionStart=n,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(e){e=e||this.selectionStart;var n=this.findLineBoundaryLeft(e),i=this.findLineBoundaryRight(e);return this.selectionStart=n,this.selectionEnd=i,this._fireSelectionChanged(),this._updateTextarea(),this},enterEditing:function(e){if(!(this.isEditing||!this.editable))return this.canvas&&(this.canvas.calcOffset(),this.exitEditingOnOthers(this.canvas)),this.isEditing=!0,this.initHiddenTextarea(e),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this._fireSelectionChanged(),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.initMouseMoveHandler(),this.canvas.requestRenderAll(),this):this},exitEditingOnOthers:function(e){e._iTextInstances&&e._iTextInstances.forEach(function(n){n.selected=!1,n.isEditing&&n.exitEditing()})},initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler)},mouseMoveHandler:function(e){if(!(!this.__isMousedown||!this.isEditing)){document.activeElement!==this.hiddenTextarea&&this.hiddenTextarea.focus();var n=this.getSelectionStartFromPointer(e.e),i=this.selectionStart,r=this.selectionEnd;(n!==this.__selectionStartOnMouseDown||i===r)&&(i===n||r===n)||(n>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=n):(this.selectionStart=n,this.selectionEnd=this.__selectionStartOnMouseDown),(this.selectionStart!==i||this.selectionEnd!==r)&&(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(e,n,i){var r=i.slice(0,e),s=be.util.string.graphemeSplit(r).length;if(e===n)return{selectionStart:s,selectionEnd:s};var o=i.slice(e,n),a=be.util.string.graphemeSplit(o).length;return{selectionStart:s,selectionEnd:s+a}},fromGraphemeToStringSelection:function(e,n,i){var r=i.slice(0,e),s=r.join("").length;if(e===n)return{selectionStart:s,selectionEnd:s};var o=i.slice(e,n),a=o.join("").length;return{selectionStart:s,selectionEnd:s+a}},_updateTextarea:function(){if(this.cursorOffsetCache={},!!this.hiddenTextarea){if(!this.inCompositionMode){var e=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=e.selectionStart,this.hiddenTextarea.selectionEnd=e.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var e=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=e.selectionEnd,this.inCompositionMode||(this.selectionStart=e.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var e=this._calcTextareaPosition();this.hiddenTextarea.style.left=e.left,this.hiddenTextarea.style.top=e.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var e=this.inCompositionMode?this.compositionStart:this.selectionStart,n=this._getCursorBoundaries(e),i=this.get2DCursorLocation(e),r=i.lineIndex,s=i.charIndex,o=this.getValueOfPropertyAt(r,s,"fontSize")*this.lineHeight,a=n.leftOffset,l=this.calcTransformMatrix(),c={x:n.left+a,y:n.top+n.topOffset+o},d=this.canvas.getRetinaScaling(),u=this.canvas.upperCanvasEl,m=u.width/d,f=u.height/d,_=m-o,x=f-o,D=u.clientWidth/m,E=u.clientHeight/f;return c=be.util.transformPoint(c,l),c=be.util.transformPoint(c,this.canvas.viewportTransform),c.x*=D,c.y*=E,c.x<0&&(c.x=0),c.x>_&&(c.x=_),c.y<0&&(c.y=0),c.y>x&&(c.y=x),c.x+=this.canvas._offset.left,c.y+=this.canvas._offset.top,{left:c.x+"px",top:c.y+"px",fontSize:o+"px",charHeight:o}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var e=this._textBeforeEdit!==this.text,n=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,n&&(n.blur&&n.blur(),n.parentNode&&n.parentNode.removeChild(n)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),e&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),e&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var e in this.styles)this._textLines[e]||delete this.styles[e]},removeStyleFromTo:function(e,n){var i=this.get2DCursorLocation(e,!0),r=this.get2DCursorLocation(n,!0),s=i.lineIndex,o=i.charIndex,a=r.lineIndex,l=r.charIndex,c,d;if(s!==a){if(this.styles[s])for(c=o;c<this._unwrappedTextLines[s].length;c++)delete this.styles[s][c];if(this.styles[a])for(c=l;c<this._unwrappedTextLines[a].length;c++)d=this.styles[a][c],d&&(this.styles[s]||(this.styles[s]={}),this.styles[s][o+c-l]=d);for(c=s+1;c<=a;c++)delete this.styles[c];this.shiftLineStyles(a,s-a)}else if(this.styles[s]){d=this.styles[s];var u=l-o,m,f;for(c=o;c<l;c++)delete d[c];for(f in this.styles[s])m=parseInt(f,10),m>=l&&(d[m-u]=d[f],delete d[f])}},shiftLineStyles:function(e,n){var i=t(this.styles);for(var r in this.styles){var s=parseInt(r,10);s>e&&(this.styles[s+n]=i[s],i[s-n]||delete this.styles[s])}},restartCursorIfNeeded:function(){(!this._currentTickState||this._currentTickState.isAborted||!this._currentTickCompleteState||this._currentTickCompleteState.isAborted)&&this.initDelayedCursor()},insertNewlineStyleObject:function(e,n,i,r){var s,o={},a=!1,l=this._unwrappedTextLines[e].length,c=l===n;i||(i=1),this.shiftLineStyles(e,i),this.styles[e]&&(s=this.styles[e][n===0?n:n-1]);for(var d in this.styles[e]){var u=parseInt(d,10);u>=n&&(a=!0,o[u-n]=this.styles[e][d],c&&n===0||delete this.styles[e][d])}var m=!1;for(a&&!c&&(this.styles[e+i]=o,m=!0),(m||l>n)&&i--;i>0;)r&&r[i-1]?this.styles[e+i]={0:t(r[i-1])}:s?this.styles[e+i]={0:t(s)}:delete this.styles[e+i],i--;this._forceClearCache=!0},insertCharStyleObject:function(e,n,i,r){this.styles||(this.styles={});var s=this.styles[e],o=s?t(s):{};i||(i=1);for(var a in o){var l=parseInt(a,10);l>=n&&(s[l+i]=o[l],o[l-i]||delete s[l])}if(this._forceClearCache=!0,r){for(;i--;)Object.keys(r[i]).length&&(this.styles[e]||(this.styles[e]={}),this.styles[e][n+i]=t(r[i]));return}if(s)for(var c=s[n?n-1:1];c&&i--;)this.styles[e][n+i]=t(c)},insertNewStyleBlock:function(e,n,i){for(var r=this.get2DCursorLocation(n,!0),s=[0],o=0,a=0;a<e.length;a++)e[a]===`
`?(o++,s[o]=0):s[o]++;s[0]>0&&(this.insertCharStyleObject(r.lineIndex,r.charIndex,s[0],i),i=i&&i.slice(s[0]+1)),o&&this.insertNewlineStyleObject(r.lineIndex,r.charIndex+s[0],o);for(var a=1;a<o;a++)s[a]>0?this.insertCharStyleObject(r.lineIndex+a,0,s[a],i):i&&this.styles[r.lineIndex+a]&&i[0]&&(this.styles[r.lineIndex+a][0]=i[0]),i=i&&i.slice(s[a]+1);s[a]>0&&this.insertCharStyleObject(r.lineIndex+a,0,s[a],i)},setSelectionStartEndWithShift:function(e,n,i){i<=e?(n===e?this._selectionDirection="left":this._selectionDirection==="right"&&(this._selectionDirection="left",this.selectionEnd=e),this.selectionStart=i):i>e&&i<n?this._selectionDirection==="right"?this.selectionEnd=i:this.selectionStart=i:(n===e?this._selectionDirection="right":this._selectionDirection==="left"&&(this._selectionDirection="right",this.selectionStart=n),this.selectionEnd=i)},setSelectionInBoundaries:function(){var e=this.text.length;this.selectionStart>e?this.selectionStart=e:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>e?this.selectionEnd=e:this.selectionEnd<0&&(this.selectionEnd=0)}})})();be.util.object.extend(be.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(t){if(this.canvas){this.__newClickTime=+new Date;var e=t.pointer;this.isTripleClick(e)&&(this.fire("tripleclick",t),this._stopEvent(t.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=e,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y},_stopEvent:function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(t){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(t.e))},tripleClickHandler:function(t){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(t.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(t){!this.canvas||!this.editable||t.e.button&&t.e.button!==1||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(t.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(t){!this.canvas||!this.editable||t.e.button&&t.e.button!==1||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(t){if(this.__isMousedown=!1,!(!this.editable||this.group||t.transform&&t.transform.actionPerformed||t.e.button&&t.e.button!==1)){if(this.canvas){var e=this.canvas._activeObject;if(e&&e!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(t.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(t){var e=this.getSelectionStartFromPointer(t),n=this.selectionStart,i=this.selectionEnd;t.shiftKey?this.setSelectionStartEndWithShift(n,i,e):(this.selectionStart=e,this.selectionEnd=e),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(t){for(var e=this.getLocalPointer(t),n=0,i=0,r=0,s=0,o=0,a,l,c=0,d=this._textLines.length;c<d&&r<=e.y;c++)r+=this.getHeightOfLine(c)*this.scaleY,o=c,c>0&&(s+=this._textLines[c-1].length+this.missingNewlineOffset(c-1));a=this._getLineLeftOffset(o),i=a*this.scaleX,l=this._textLines[o],this.direction==="rtl"&&(e.x=this.width*this.scaleX-e.x+i);for(var u=0,m=l.length;u<m&&(n=i,i+=this.__charBounds[o][u].kernedWidth*this.scaleX,i<=e.x);u++)s++;return this._getNewSelectionStartFromOffset(e,n,i,s,m)},_getNewSelectionStartFromOffset:function(t,e,n,i,r){var s=t.x-e,o=n-t.x,a=o>s||o<0?0:1,l=i+a;return this.flipX&&(l=r-l),l>this._text.length&&(l=this._text.length),l}});be.util.object.extend(be.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=be.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var t=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+t.top+"; left: "+t.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: "+t.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):be.document.body.appendChild(this.hiddenTextarea),be.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),be.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),be.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),be.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),be.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),be.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),be.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),be.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),be.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(be.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(t){if(this.isEditing){var e=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(t.keyCode in e)this[e[t.keyCode]](t);else if(t.keyCode in this.ctrlKeysMapDown&&(t.ctrlKey||t.metaKey))this[this.ctrlKeysMapDown[t.keyCode]](t);else return;t.stopImmediatePropagation(),t.preventDefault(),t.keyCode>=33&&t.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(t){if(!this.isEditing||this._copyDone||this.inCompositionMode){this._copyDone=!1;return}if(t.keyCode in this.ctrlKeysMapUp&&(t.ctrlKey||t.metaKey))this[this.ctrlKeysMapUp[t.keyCode]](t);else return;t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.requestRenderAll()},onInput:function(t){var e=this.fromPaste;if(this.fromPaste=!1,t&&t.stopPropagation(),!!this.isEditing){var n=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,i=this._text.length,r=n.length,s,o,a=r-i,l=this.selectionStart,c=this.selectionEnd,d=l!==c,u,m,f;if(this.hiddenTextarea.value===""){this.styles={},this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll());return}var _=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),x=l>_.selectionStart;d?(s=this._text.slice(l,c),a+=c-l):r<i&&(x?s=this._text.slice(c+a,c):s=this._text.slice(l,l-a)),o=n.slice(_.selectionEnd-a,_.selectionEnd),s&&s.length&&(o.length&&(u=this.getSelectionStyles(l,l+1,!1),u=o.map(function(){return u[0]})),d?(m=l,f=c):x?(m=c-s.length,f=c):(m=c,f=c+s.length),this.removeStyleFromTo(m,f)),o.length&&(e&&o.join("")===be.copiedText&&!be.disableStyleCopyPaste&&(u=be.copiedTextStyle),this.insertNewStyleBlock(o,l,u)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(t){this.compositionStart=t.target.selectionStart,this.compositionEnd=t.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(be.copiedText=this.getSelectedText(),be.disableStyleCopyPaste?be.copiedTextStyle=null:be.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(t){return t&&t.clipboardData||be.window.clipboardData},_getWidthBeforeCursor:function(t,e){var n=this._getLineLeftOffset(t),i;return e>0&&(i=this.__charBounds[t][e-1],n+=i.left+i.width),n},getDownCursorOffset:function(t,e){var n=this._getSelectionForOffset(t,e),i=this.get2DCursorLocation(n),r=i.lineIndex;if(r===this._textLines.length-1||t.metaKey||t.keyCode===34)return this._text.length-n;var s=i.charIndex,o=this._getWidthBeforeCursor(r,s),a=this._getIndexOnLine(r+1,o),l=this._textLines[r].slice(s);return l.length+a+1+this.missingNewlineOffset(r)},_getSelectionForOffset:function(t,e){return t.shiftKey&&this.selectionStart!==this.selectionEnd&&e?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(t,e){var n=this._getSelectionForOffset(t,e),i=this.get2DCursorLocation(n),r=i.lineIndex;if(r===0||t.metaKey||t.keyCode===33)return-n;var s=i.charIndex,o=this._getWidthBeforeCursor(r,s),a=this._getIndexOnLine(r-1,o),l=this._textLines[r].slice(0,s),c=this.missingNewlineOffset(r-1);return-this._textLines[r-1].length+a-l.length+(1-c)},_getIndexOnLine:function(t,e){for(var n=this._textLines[t],i=this._getLineLeftOffset(t),r=i,s=0,o,a,l=0,c=n.length;l<c;l++)if(o=this.__charBounds[t][l].width,r+=o,r>e){a=!0;var d=r-o,u=r,m=Math.abs(d-e),f=Math.abs(u-e);s=f<m?l:l-1;break}return a||(s=n.length-1),s},moveCursorDown:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",t)},moveCursorUp:function(t){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",t)},_moveCursorUpOrDown:function(t,e){var n="get"+t+"CursorOffset",i=this[n](e,this._selectionDirection==="right");e.shiftKey?this.moveCursorWithShift(i):this.moveCursorWithoutShift(i),i!==0&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(t){var e=this._selectionDirection==="left"?this.selectionStart+t:this.selectionEnd+t;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,e),t!==0},moveCursorWithoutShift:function(t){return t<0?(this.selectionStart+=t,this.selectionEnd=this.selectionStart):(this.selectionEnd+=t,this.selectionStart=this.selectionEnd),t!==0},moveCursorLeft:function(t){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",t)},_move:function(t,e,n){var i;if(t.altKey)i=this["findWordBoundary"+n](this[e]);else if(t.metaKey||t.keyCode===35||t.keyCode===36)i=this["findLineBoundary"+n](this[e]);else return this[e]+=n==="Left"?-1:1,!0;if(typeof i<"u"&&this[e]!==i)return this[e]=i,!0},_moveLeft:function(t,e){return this._move(t,e,"Left")},_moveRight:function(t,e){return this._move(t,e,"Right")},moveCursorLeftWithoutShift:function(t){var e=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(e=this._moveLeft(t,"selectionStart")),this.selectionEnd=this.selectionStart,e},moveCursorLeftWithShift:function(t){if(this._selectionDirection==="right"&&this.selectionStart!==this.selectionEnd)return this._moveLeft(t,"selectionEnd");if(this.selectionStart!==0)return this._selectionDirection="left",this._moveLeft(t,"selectionStart")},moveCursorRight:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",t)},_moveCursorLeftOrRight:function(t,e){var n="moveCursor"+t+"With";this._currentCursorOpacity=1,e.shiftKey?n+="Shift":n+="outShift",this[n](e)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(t){if(this._selectionDirection==="left"&&this.selectionStart!==this.selectionEnd)return this._moveRight(t,"selectionStart");if(this.selectionEnd!==this._text.length)return this._selectionDirection="right",this._moveRight(t,"selectionEnd")},moveCursorRightWithoutShift:function(t){var e=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(e=this._moveRight(t,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,e},removeChars:function(t,e){typeof e>"u"&&(e=t+1),this.removeStyleFromTo(t,e),this._text.splice(t,e-t),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(t,e,n,i){typeof i>"u"&&(i=n),i>n&&this.removeStyleFromTo(n,i);var r=be.util.string.graphemeSplit(t);this.insertNewStyleBlock(r,n,e),this._text=[].concat(this._text.slice(0,n),r,this._text.slice(i)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}});(function(){var t=be.util.toFixed,e=/  +/g;be.util.object.extend(be.Text.prototype,{_toSVG:function(){var n=this._getSVGLeftTopOffsets(),i=this._getSVGTextAndBg(n.textTop,n.textLeft);return this._wrapSVGTextAndBg(i)},toSVG:function(n){return this._createBaseSVGMarkup(this._toSVG(),{reviver:n,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(n){var i=!0,r=this.getSvgTextDecoration(this);return[n.textBgRects.join(""),'		<text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",r?'text-decoration="'+r+'" ':"",'style="',this.getSvgStyles(i),'"',this.addPaintOrder()," >",n.textSpans.join(""),`</text>
`]},_getSVGTextAndBg:function(n,i){var r=[],s=[],o=n,a;this._setSVGBg(s);for(var l=0,c=this._textLines.length;l<c;l++)a=this._getLineLeftOffset(l),(this.textBackgroundColor||this.styleHas("textBackgroundColor",l))&&this._setSVGTextLineBg(s,l,i+a,o),this._setSVGTextLineText(r,l,i+a,o),o+=this.getHeightOfLine(l);return{textSpans:r,textBgRects:s}},_createTextCharSpan:function(n,i,r,s){var o=n!==n.trim()||n.match(e),a=this.getSvgSpanStyles(i,o),l=a?'style="'+a+'"':"",c=i.deltaY,d="",u=be.Object.NUM_FRACTION_DIGITS;return c&&(d=' dy="'+t(c,u)+'" '),['<tspan x="',t(r,u),'" y="',t(s,u),'" ',d,l,">",be.util.string.escapeXml(n),"</tspan>"].join("")},_setSVGTextLineText:function(n,i,r,s){var o=this.getHeightOfLine(i),a=this.textAlign.indexOf("justify")!==-1,l,c,d="",u,m,f=0,_=this._textLines[i],x;s+=o*(1-this._fontSizeFraction)/this.lineHeight;for(var D=0,E=_.length-1;D<=E;D++)x=D===E||this.charSpacing,d+=_[D],u=this.__charBounds[i][D],f===0?(r+=u.kernedWidth-u.width,f+=u.width):f+=u.kernedWidth,a&&!x&&this._reSpaceAndTab.test(_[D])&&(x=!0),x||(l=l||this.getCompleteStyleDeclaration(i,D),c=this.getCompleteStyleDeclaration(i,D+1),x=be.util.hasStyleChanged(l,c,!0)),x&&(m=this._getStyleDeclaration(i,D)||{},n.push(this._createTextCharSpan(d,m,r,s)),d="",l=c,r+=f,f=0)},_pushTextBgRect:function(n,i,r,s,o,a){var l=be.Object.NUM_FRACTION_DIGITS;n.push("		<rect ",this._getFillAttributes(i),' x="',t(r,l),'" y="',t(s,l),'" width="',t(o,l),'" height="',t(a,l),`"></rect>
`)},_setSVGTextLineBg:function(n,i,r,s){for(var o=this._textLines[i],a=this.getHeightOfLine(i)/this.lineHeight,l=0,c=0,d,u,m=this.getValueOfPropertyAt(i,0,"textBackgroundColor"),f=0,_=o.length;f<_;f++)d=this.__charBounds[i][f],u=this.getValueOfPropertyAt(i,f,"textBackgroundColor"),u!==m?(m&&this._pushTextBgRect(n,m,r+c,s,l,a),c=d.left,l=d.width,m=u):l+=d.kernedWidth;u&&this._pushTextBgRect(n,u,r+c,s,l,a)},_getFillAttributes:function(n){var i=n&&typeof n=="string"?new be.Color(n):"";return!i||!i.getSource()||i.getAlpha()===1?'fill="'+n+'"':'opacity="'+i.getAlpha()+'" fill="'+i.setAlpha(1).toRgb()+'"'},_getSVGLineTopOffset:function(n){for(var i=0,r=0,s=0;s<n;s++)i+=this.getHeightOfLine(s);return r=this.getHeightOfLine(s),{lineTop:i,offset:(this._fontSizeMult-this._fontSizeFraction)*r/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(n){var i=be.Object.prototype.getSvgStyles.call(this,n);return i+" white-space: pre;"}})})();(function(t){"use strict";var e=t.fabric||(t.fabric={});e.Textbox=e.util.createClass(e.IText,e.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:e.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),this.textAlign.indexOf("justify")!==-1&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(n){for(var i=0,r=0,s=0,o={},a=0;a<n.graphemeLines.length;a++)n.graphemeText[s]===`
`&&a>0?(r=0,s++,i++):!this.splitByGrapheme&&this._reSpaceAndTab.test(n.graphemeText[s])&&a>0&&(r++,s++),o[a]={line:i,offset:r},s+=n.graphemeLines[a].length,r+=n.graphemeLines[a].length;return o},styleHas:function(n,i){if(this._styleMap&&!this.isWrapping){var r=this._styleMap[i];r&&(i=r.line)}return e.Text.prototype.styleHas.call(this,n,i)},isEmptyStyles:function(n){if(!this.styles)return!0;var i=0,r=n+1,s,o,a=!1,l=this._styleMap[n],c=this._styleMap[n+1];l&&(n=l.line,i=l.offset),c&&(r=c.line,a=r===n,s=c.offset),o=typeof n>"u"?this.styles:{line:this.styles[n]};for(var d in o)for(var u in o[d])if(u>=i&&(!a||u<s))for(var m in o[d][u])return!1;return!0},_getStyleDeclaration:function(n,i){if(this._styleMap&&!this.isWrapping){var r=this._styleMap[n];if(!r)return null;n=r.line,i=r.offset+i}return this.callSuper("_getStyleDeclaration",n,i)},_setStyleDeclaration:function(n,i,r){var s=this._styleMap[n];n=s.line,i=s.offset+i,this.styles[n][i]=r},_deleteStyleDeclaration:function(n,i){var r=this._styleMap[n];n=r.line,i=r.offset+i,delete this.styles[n][i]},_getLineStyle:function(n){var i=this._styleMap[n];return!!this.styles[i.line]},_setLineStyle:function(n){var i=this._styleMap[n];this.styles[i.line]={}},_wrapText:function(n,i){var r=[],s;for(this.isWrapping=!0,s=0;s<n.length;s++)r=r.concat(this._wrapLine(n[s],s,i));return this.isWrapping=!1,r},_measureWord:function(n,i,r){var s=0,o,a=!0;r=r||0;for(var l=0,c=n.length;l<c;l++){var d=this._getGraphemeBox(n[l],i,l+r,o,a);s+=d.kernedWidth,o=n[l]}return s},_wrapLine:function(n,i,r,I){var o=0,a=this.splitByGrapheme,l=[],c=[],d=a?e.util.string.graphemeSplit(n):n.split(this._wordJoiners),u="",m=0,f=a?"":" ",_=0,x=0,D=0,E=!0,M=this._getWidthOfCharSpacing(),I=I||0;d.length===0&&d.push([]),r-=I;for(var z=0;z<d.length;z++)u=a?d[z]:e.util.string.graphemeSplit(d[z]),_=this._measureWord(u,i,m),m+=u.length,o+=x+_-M,o>r&&!E?(l.push(c),c=[],o=_,E=!0):o+=M,!E&&!a&&c.push(f),c=c.concat(u),x=a?0:this._measureWord([f],i,m),m++,E=!1,_>D&&(D=_);return z&&l.push(c),D+I>this.dynamicMinWidth&&(this.dynamicMinWidth=D-M+I),l},isEndOfWrapping:function(n){return!this._styleMap[n+1]||this._styleMap[n+1].line!==this._styleMap[n].line},missingNewlineOffset:function(n,i){return this.splitByGrapheme&&!i?this.isEndOfWrapping(n)?1:0:1},_splitTextIntoLines:function(n){for(var i=e.Text.prototype._splitTextIntoLines.call(this,n),r=this._wrapText(i.lines,this.width),s=new Array(r.length),o=0;o<r.length;o++)s[o]=r[o].join("");return i.lines=s,i.graphemeLines=r,i},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var n={};for(var i in this._styleMap)this._textLines[i]&&(n[this._styleMap[i].line]=1);for(var i in this.styles)n[i]||delete this.styles[i]},toObject:function(n){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(n))}}),e.Textbox.fromObject=function(n,i){var r=e.util.stylesFromArray(n.styles,n.text),s=Object.assign({},n,{styles:r});return delete s.path,e.Object._fromObject("Textbox",s,function(o){n.path?e.Object._fromObject("Path",n.path,function(a){o.set("path",a),i(o)},"path"):i(o)},"text")}})(vn);(function(){var t=be.controlsUtils,e=t.scaleSkewCursorStyleHandler,n=t.scaleCursorStyleHandler,i=t.scalingEqually,r=t.scalingYOrSkewingX,s=t.scalingXOrSkewingY,o=t.scaleOrSkewActionName,a=be.Object.prototype.controls;if(a.ml=new be.Control({x:-.5,y:0,cursorStyleHandler:e,actionHandler:s,getActionName:o}),a.mr=new be.Control({x:.5,y:0,cursorStyleHandler:e,actionHandler:s,getActionName:o}),a.mb=new be.Control({x:0,y:.5,cursorStyleHandler:e,actionHandler:r,getActionName:o}),a.mt=new be.Control({x:0,y:-.5,cursorStyleHandler:e,actionHandler:r,getActionName:o}),a.tl=new be.Control({x:-.5,y:-.5,cursorStyleHandler:n,actionHandler:i}),a.tr=new be.Control({x:.5,y:-.5,cursorStyleHandler:n,actionHandler:i}),a.bl=new be.Control({x:-.5,y:.5,cursorStyleHandler:n,actionHandler:i}),a.br=new be.Control({x:.5,y:.5,cursorStyleHandler:n,actionHandler:i}),a.mtr=new be.Control({x:0,y:-.5,actionHandler:t.rotationWithSnapping,cursorStyleHandler:t.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),be.Textbox){var l=be.Textbox.prototype.controls={};l.mtr=a.mtr,l.tr=a.tr,l.br=a.br,l.tl=a.tl,l.bl=a.bl,l.mt=a.mt,l.mb=a.mb,l.mr=new be.Control({x:.5,y:0,actionHandler:t.changeWidth,cursorStyleHandler:e,actionName:"resizing"}),l.ml=new be.Control({x:-.5,y:0,actionHandler:t.changeWidth,cursorStyleHandler:e,actionName:"resizing"})}})()});var _hi,Al,Im=Q(()=>{me();Gi();me();_hi=["*"],Al=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-page-content"]],standalone:!0,features:[et,xe],ngContentSelectors:_hi,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}"],changeDetection:0});let t=e;return t})()});var Chi,hc,Tf=Q(()=>{me();Gi();me();Chi=["*"],hc=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-page-header-title"]],standalone:!0,features:[et,xe],ngContentSelectors:Chi,decls:2,vars:0,consts:[[1,"my-2","md:my-0","md:mr-20","text-[140%]"]],template:function(r,s){r&1&&(gr(),h(0,"div",0),Ln(1),p())},encapsulation:2,changeDetection:0});let t=e;return t})()});var xhi,Kl,Df=Q(()=>{me();Gi();me();xhi=["*"],Kl=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-page-footer"]],standalone:!0,features:[et,xe],ngContentSelectors:xhi,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},encapsulation:2,changeDetection:0});let t=e;return t})()});function Shi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",3),F("click",function(){V(n);let r=w();return B(r.close())}),y(1,"close"),p()}}var bhi,whi,Yl,Am=Q(()=>{me();Gi();ls();me();bhi=[[["nxt-page-header-title"]],"*"],whi=["nxt-page-header-title","*"];Yl=(()=>{let e=class e extends bt{constructor(){super(),this.dialogRef=br(),this.beforeClose=br(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}close(){return O(this,null,function*(){typeof this.beforeClose()=="function"&&!(yield this.beforeClose()())||this.dialogRef()&&this.dialogRef().close()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-page-header"]],inputs:{dialogRef:[1,"dialogRef"],beforeClose:[1,"beforeClose"]},standalone:!0,features:[et,xe],ngContentSelectors:whi,decls:6,vars:1,consts:[[1,"flex","w-full","flex-row","justify-between","p-2"],[1,"flex","w-full","flex-col","items-center","md:flex-row"],[1,"mr-3","flex","flex-row","items-center","gap-8"],[3,"click"]],template:function(r,s){r&1&&(gr(bhi),h(0,"div",0)(1,"div",1),Ln(2),h(3,"div",2),Ln(4,1),p()(),W(5,Shi,2,0,"nxt-button-icon"),p()),r&2&&(g(5),Je(s.dialogRef()?5:-1))},dependencies:[an],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;width:100%}"],changeDetection:0});let t=e;return t})()});var Thi,Dhi,Pl,Pm=Q(()=>{me();Gi();me();Thi=[[["nxt-page-header"]],[["nxt-page-content"]],[["nxt-page-footer"]]],Dhi=["nxt-page-header","nxt-page-content","nxt-page-footer"],Pl=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-page"]],standalone:!0,features:[et,xe],ngContentSelectors:Dhi,decls:7,vars:0,consts:[[1,"flex","flex-col","h-full","w-full",2,"border","0px solid red"],[1,"flex","flex-row",2,"border","0px solid green"],[1,"nxt-page-content-wrapper","flex","flex-col","flex-grow","h-full","overflow-auto",2,"border","0px solid blue"],[1,"flex","flex-col","w-full",2,"border","0px solid yellow"]],template:function(r,s){r&1&&(gr(Thi),h(0,"div",0)(1,"div",1),Ln(2),p(),h(3,"div",2),Ln(4,1),p(),h(5,"div",3),Ln(6,2),p()())},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;background-color:#2a2a2a;color:#ccc}"],changeDetection:0});let t=e;return t})()});var rw,$P=Q(()=>{kl();me();rw=(()=>{let e=class e{constructor(){}transform(i,r){return fn.round(i,r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtRound",type:e,pure:!0,standalone:!0});let t=e;return t})()});var tee,$_e=Q(()=>{me();tee=(()=>{let e=class e{onClick(){this.renderer.setStyle(this.el.nativeElement,"transform","scale(0.8)"),setTimeout(()=>{this.renderer.setStyle(this.el.nativeElement,"transform","scale(1)")},this.durationMs)}constructor(i,r){this.el=i,this.renderer=r,this.durationMs=100,this.renderer.setStyle(this.el.nativeElement,"transition","transform "+this.durationMs+"ms ease-in-out")}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Ac))},e.\u0275dir=mi({type:e,selectors:[["","nxtClickAnimation",""]],hostBindings:function(r,s){r&1&&F("click",function(){return s.onClick()})},standalone:!0});let t=e;return t})()});var K_e,Y_e=Q(()=>{me();Nb();K_e=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=en({type:t});static \u0275inj=Ji({imports:[Tk]})}return t})();});var bQe,WKn,$D=Q(()=>{Nb();Nb();An();An();Vt();Vt();Y_e();Y_e();ri();me();me();bQe=(()=>{class t{static withConfig(n,i=[]){return{ngModule:t,providers:n.serverLoaded?[{provide:u4,useValue:ve(ve({},D$),n)},{provide:E$,useValue:i,multi:!0},{provide:q9,useValue:!0}]:[{provide:u4,useValue:ve(ve({},D$),n)},{provide:E$,useValue:i,multi:!0}]}}constructor(n,i){Z2(i)&&!n&&console.warn("Warning: Flex Layout loaded on the server without FlexLayoutServerModule")}static \u0275fac=function(i){return new(i||t)(it(q9),it(Fu))};static \u0275mod=en({type:t});static \u0275inj=Ji({imports:[At,Dn,K_e,At,Dn,K_e]})}return t})();WKn=new x8("18.0.1");});function khi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",7),F("click",function(){V(n);let r=w(2);return B(r.resetZoom())}),y(1,"zoom_out_map"),p()}}function Ihi(t,e){if(t&1){let n=re();W(0,khi,2,0,"nxt-button-icon",4),h(1,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.zoomOutClicked())}),y(2,"zoom_out"),p(),h(3,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.zoomInClicked())}),y(4,"zoom_in"),p()}if(t&2){let n=w();Je(n.currentZoom()!==1?0:-1)}}function Ahi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function Phi(t,e){t&1&&(h(0,"div",5),ee(1,"nxt-spinner"),p())}function Rhi(t,e){if(t&1){let n=re();h(0,"button",20),F("click",function(){V(n);let r=w(2);return B(r.switchLogoClicked())}),h(1,"mat-icon",21),y(2,"wallpaper"),p()(),h(3,"button",22),F("click",function(){V(n);let r=w(2);return B(r.rotateClicked(90))}),h(4,"mat-icon",21),y(5,"rotate_right"),p()(),h(6,"button",23),F("click",function(){V(n);let r=w(2);return B(r.downloadClicked())}),h(7,"mat-icon",21),y(8,"download"),p()(),h(9,"mat-menu",null,2)(11,"button",24),F("click",function(){V(n);let r=w(2);return B(r.shareToStudioSocialMediaMobileClicked())}),h(12,"span"),y(13,"Social Media Handy"),p()(),h(14,"button",24),F("click",function(){V(n);let r=w(2);return B(r.shareToClicked(r.MobileTools.Numbers.NiklasNXT))}),h(15,"span"),y(16,"Niklas"),p()(),h(17,"button",24),F("click",function(){V(n);let r=w(2);return B(r.shareToClicked(r.MobileTools.Numbers.CaponeNXT))}),h(18,"span"),y(19,"Capone"),p()(),h(20,"button",24),F("click",function(){V(n);let r=w(2);return B(r.shareToClicked(r.MobileTools.Numbers.Lili))}),h(21,"span"),y(22,"Lili"),p()(),h(23,"button",24),F("click",function(){V(n);let r=w(2);return B(r.shareToClicked(r.MobileTools.Numbers.Julian))}),h(24,"span"),y(25,"Julian"),p()()(),h(26,"button",25)(27,"mat-icon",21),y(28,"share"),p()(),h(29,"button",26),F("click",function(){V(n);let r=w(2);return B(r.saveClicked())}),h(30,"mat-icon",21),y(31,"save"),p()(),h(32,"button",27),F("click",function(){V(n);let r=w(2);return B(r.startCropping())}),h(33,"mat-icon",21),y(34,"crop"),p()()}if(t&2){let n=pr(10);g(26),b("matMenuTriggerFor",n)}}function Fhi(t,e){if(t&1){let n=re();h(0,"button",28),F("click",function(){V(n);let r=w(2);return B(r.cancelCropping())}),h(1,"mat-icon",21),y(2,"close"),p()(),h(3,"button",29),F("click",function(){V(n);let r=w(2);return B(r.applyCrop())}),h(4,"mat-icon",21),y(5,"done"),p()()}}function Lhi(t,e){if(t&1){let n=re();h(0,"div",8)(1,"div",9,0),ee(3,"canvas",10,1),p(),h(5,"div",11),W(6,Rhi,35,1)(7,Fhi,6,0),p(),h(8,"div",12)(9,"div",13)(10,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.settingsDown("brightness"))}),y(11,"\xA0-\xA0"),p(),h(12,"label",15),y(13,"Helligkeit"),ee(14,"br"),y(15),Ce(16,"nxtRound"),p(),h(17,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.settingsUp("brightness"))}),y(18,"\xA0+\xA0"),p()(),h(19,"div",16)(20,"label",17),y(21),Ce(22,"nxtRound"),p(),h(23,"mat-slider",18)(24,"input",19),Xe("ngModelChange",function(r){V(n);let s=w();return Ze(s.settings.brightness,r)||(s.settings.brightness=r),B(r)}),F("input",function(){V(n);let r=w();return B(r.applyAllSettings("input"))}),p()()(),h(25,"div",13)(26,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.settingsDown("contrast"))}),y(27,"\xA0-\xA0"),p(),h(28,"label",15),y(29,"Kontrast"),ee(30,"br"),y(31),Ce(32,"nxtRound"),p(),h(33,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.settingsUp("contrast"))}),y(34,"\xA0+\xA0"),p()(),h(35,"div",16)(36,"label",17),y(37),Ce(38,"nxtRound"),p(),h(39,"mat-slider",18)(40,"input",19),Xe("ngModelChange",function(r){V(n);let s=w();return Ze(s.settings.contrast,r)||(s.settings.contrast=r),B(r)}),F("input",function(){V(n);let r=w();return B(r.applyAllSettings("input"))}),p()()(),h(41,"div",13)(42,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.settingsDown("saturation"))}),y(43,"\xA0-\xA0"),p(),h(44,"label",15),y(45,"S\xE4ttigung"),ee(46,"br"),y(47),Ce(48,"nxtRound"),p(),h(49,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.settingsUp("saturation"))}),y(50,"\xA0+\xA0"),p()(),h(51,"div",16)(52,"label",17),y(53),Ce(54,"nxtRound"),p(),h(55,"mat-slider",18)(56,"input",19),Xe("ngModelChange",function(r){V(n);let s=w();return Ze(s.settings.saturation,r)||(s.settings.saturation=r),B(r)}),F("input",function(){V(n);let r=w();return B(r.applyAllSettings("input"))}),p()()(),h(57,"div",13)(58,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.settingsDown("blackPoint"))}),y(59,"\xA0-\xA0"),p(),h(60,"label",15),y(61,"Schwarz"),ee(62,"br"),y(63),Ce(64,"nxtRound"),p(),h(65,"nxt-button",14),F("click",function(){V(n);let r=w();return B(r.settingsUp("blackPoint"))}),y(66,"\xA0+\xA0"),p()(),h(67,"div",16)(68,"label",17),y(69),Ce(70,"nxtRound"),p(),h(71,"mat-slider",18)(72,"input",19),Xe("ngModelChange",function(r){V(n);let s=w();return Ze(s.settings.blackPoint,r)||(s.settings.blackPoint=r),B(r)}),F("input",function(){V(n);let r=w();return B(r.applyAllSettings("input"))}),p()()()()()}if(t&2){let n=w();mo("opacity",n.contentOpacity()),g(3),b("width",n.canvasWidth())("height",n.canvasHeight()),g(3),Je(n.isCropping()?-1:6),g(),Je(n.isCropping()?7:-1),g(8),ye(Nt(16,18,n.settings.brightness*100,0)),g(6),Ke("Helligkeit ",Nt(22,21,n.settings.brightness*100,0),""),g(3),qe("ngModel",n.settings.brightness),g(7),ye(Nt(32,24,n.settings.contrast*100,0)),g(6),Ke("Kontrast ",Nt(38,27,n.settings.contrast*100,0),""),g(3),qe("ngModel",n.settings.contrast),g(7),ye(Nt(48,30,n.settings.saturation*100,0)),g(6),Ke("S\xE4ttigung ",Nt(54,33,n.settings.saturation*100,0),""),g(3),qe("ngModel",n.settings.saturation),g(7),ye(Nt(64,36,n.settings.blackPoint*100,0)),g(6),Ke("Schwarz ",Nt(70,39,n.settings.blackPoint*100,0),""),g(3),qe("ngModel",n.settings.blackPoint)}}var Q1,Ehi,Mhi,Px,PH=Q(()=>{me();Q1=Gs(xQe());qn();rP();Zi();Ja();Im();Tf();Df();Am();Pm();ji();oo();$P();Mp();Gy();$_e();pa();Ci();yi();$D();SD();Cs();sX();fx();My();ls();o2();me();ma();qn();Ehi=["canvasElement"],Mhi=["canvasWrapper"];Px=(()=>{let e=class e{constructor(i){this.activatedRoute=i,this.currentZoom=gt(1),this.logText=gt("log"),this.cropper=null,this.isCropping=gt(!1),this.logoDefaultOpacity=.5,this.show=gt(!1),this.contentOpacity=gt(0),this.canvasWidth=gt(0),this.canvasHeight=gt(0),this.isPanning=!1,this.lastPosX=0,this.lastPosY=0,this.dialogRef=Ve(Gt,{optional:!0}),this.cdRef=Ve(Kt),this.dialogService=Ve(vt),this.socketService=Ve(lt),this.configService=Ve(Xi),this.settings={brightness:0,contrast:0,saturation:0,blackPoint:0,logoOpacity:0,logoPosition:"center"},this.fileId="c11aa59c-c00f-4b0c-ace1-5f953f987cb3",this.driveFile=gt(null),this.MobileTools=Kc,this.firstTouchMoveTwoFingers=!0,this.lastTouchDistance=null,this.activatedRoute.snapshot.paramMap.get("file-id")&&(this.fileId=this.activatedRoute.snapshot.paramMap.get("file-id").toString()),this.loadDriveFile().then()}loadDriveFile(){return O(this,null,function*(){})}onResize(){this.refreshCanvasSize()}refreshCanvasSize(){let i=this.canvas.width/this.canvas.height,r=this.canvasWrapper.nativeElement.clientWidth,s=this.canvasWrapper.nativeElement.clientHeight,o=this.canvas.getWidth(),a=this.canvas.getHeight(),l,c;r/s>i?(l=s*i,c=s):(l=r,c=r/i);let d=l/o,u=c/a;this.canvas.setWidth(l),this.canvas.setHeight(c),this.canvas.getObjects().forEach(m=>{m.scaleX=m.scaleX*d,m.scaleY=m.scaleY*u,m.left=m.left*d,m.top=m.top*u,m.setCoords()}),this.requestRenderAll()}ngOnInit(){this.canvasWidth.set(window.innerWidth),this.canvasHeight.set(window.innerHeight-150),Q1.fabric.textureSize=4096,this.show.set(!0)}ngAfterViewInit(){return O(this,null,function*(){this.driveFile.set(yield this.socketService.getDriveFile(this.fileId)),yield this.initLogo(),yield this.initializeCanvas(),this.settings.brightness=.01,this.applyAllSettings("ngAfterViewInit"),requestAnimationFrame(()=>{this.settings.brightness=0,this.applyAllSettings("ngAfterViewInit reset"),this.contentOpacity.set(1),this.refreshCanvasSize()})})}getFabricImage(i){return new Promise((r,s)=>{Q1.fabric.Image.fromURL(i,o=>{r(o)},{crossOrigin:"anonymous"})})}getFabricSvg(i){return new Promise((r,s)=>{Q1.fabric.loadSVGFromURL(i,(o,a)=>{r(Q1.fabric.util.groupSVGElements(o,a))})})}startCropping(){if(this.isCropping())return;this.resetZoom().then(),this.isCropping.set(!0);let i=this.canvas.getWidth(),r=this.canvas.getHeight();this.cropper=new Q1.fabric.Rect({left:i*.1,top:r*.1,width:i*.8,height:r*.8,fill:"rgba(0,0,0,0)",borderColor:"#b7860f",selectable:!0,hasBorders:!0,hasControls:!0,lockRotation:!0,lockUniScaling:!1,objectCaching:!1,hasRotatingPoint:!1,cornerStrokeColor:"#b7860f",cornerSize:20,cornerColor:"#b7860f"}),this.cropper.on("moving",s=>{let o=s.transform.target;o.left<0&&(o.left=0),o.top<0&&(o.top=0),o.left+o.getScaledWidth()>this.canvas.getWidth()&&(o.left=this.canvas.getWidth()-o.getScaledWidth()),o.top+o.getScaledHeight()>this.canvas.getHeight()&&(o.top=this.canvas.getHeight()-o.getScaledHeight())}),this.cropper.on("scaling",s=>{let o=s.transform.target;if(o.left+o.getScaledWidth()>this.canvas.getWidth()&&(o.scaleX=(this.canvas.getWidth()-o.left)/o.width),o.top+o.getScaledHeight()>this.canvas.getHeight()&&(o.scaleY=(this.canvas.getHeight()-o.top)/o.height),o.left<0){let a=-o.left;o.left=0,o.scaleX=(o.getScaledWidth()-a)/o.width}if(o.top<0){let a=-o.top;o.top=0,o.scaleY=(o.getScaledHeight()-a)/o.height}}),this.canvas.add(this.cropper),this.canvas.setActiveObject(this.cropper)}cancelCropping(){!this.isCropping||!this.cropper||(this.canvas.remove(this.cropper),this.cropper=null,this.isCropping.set(!1),this.canvas.discardActiveObject(),this.requestRenderAll())}initLogo(){return O(this,null,function*(){this.logoObject=yield this.getFabricSvg("assets/logo/logo_white.svg")})}initializeCanvas(){return O(this,null,function*(){this.canvas=new Q1.fabric.Canvas(this.canvasElement.nativeElement,{enableRetinaScaling:!0}),this.initMouse(),this.imageObject=yield this.getFabricImage(a6.getDriveLink(this.driveFile().id));let i=this.canvasElement.nativeElement.parentElement?.clientWidth||window.innerWidth,r=this.canvasElement.nativeElement.parentElement?.clientHeight||window.innerHeight,s=Math.min(i/this.imageObject.width,r/this.imageObject.height);this.canvas.setWidth(this.imageObject.width*s),this.canvas.setHeight(this.imageObject.height*s),this.imageObject.set({selectable:!1,evented:!1,scaleX:s,scaleY:s,originX:"left",originY:"top",left:0,top:0,objectCaching:!1}),this.canvas.add(this.imageObject),this.canvas.add(this.logoObject),this.requestRenderAll()})}applyAllSettings(i){requestAnimationFrame(()=>{this.applyLogoSettings(i+" -> applyAllSettings"),this.applyImageSettings(i+" -> applyAllSettings"),this.requestRenderAll()})}applyLogoSettings(i){if(this.logoObject){if(this.settings.logoPosition==="top-right"){let r=this.logoObject.getScaledWidth()/this.logoObject.scaleX,s=this.logoObject.getScaledHeight()/this.logoObject.scaleY,o=this.canvas.getWidth(),a=this.canvas.getWidth()/5,l=Math.min(a/r,a/s);this.logoObject.set({scaleX:l,scaleY:l,left:o-r*l-10,top:10,selectable:!1,evented:!1,opacity:this.settings.logoOpacity})}else if(this.settings.logoPosition==="center"){let r=this.canvas.getWidth(),s=this.canvas.getHeight(),o=r*.7;r>s&&(o=r*.5);let a=this.logoObject.height*(o/this.logoObject.width);this.logoObject.set({scaleX:o/this.logoObject.width,scaleY:a/this.logoObject.height,left:(r-o)/2,top:(s-a)/2,selectable:!1,evented:!1,opacity:this.settings.logoOpacity})}}}applyImageSettingsOld(){this.imageObject.filters=[new Q1.fabric.Image.filters.Brightness({brightness:this.settings.brightness}),new Q1.fabric.Image.filters.Contrast({contrast:this.settings.contrast}),new Q1.fabric.Image.filters.Saturation({saturation:this.settings.saturation}),new Q1.fabric.Image.filters.Gamma({gamma:[1+this.settings.blackPoint,1+this.settings.blackPoint,1+this.settings.blackPoint]})],this.imageObject.applyFilters()}applyImageSettings(i){let r=Date.now();(!this.imageObject.filters||this.imageObject.filters.length===0)&&(this.imageObject.filters=[new Q1.fabric.Image.filters.Brightness,new Q1.fabric.Image.filters.Contrast,new Q1.fabric.Image.filters.Saturation,new Q1.fabric.Image.filters.Gamma]);let s=this.imageObject.filters[0],o=this.imageObject.filters[1],a=this.imageObject.filters[2],l=this.imageObject.filters[3];s.brightness=this.settings.brightness,o.contrast=this.settings.contrast,a.saturation=this.settings.saturation,l.gamma=[1+this.settings.blackPoint,1+this.settings.blackPoint,1+this.settings.blackPoint],this.imageObject.applyFilters(),console.log("duration: "+(Date.now()-r))}ngOnDestroy(){this.canvas.dispose()}getDataUrl(i){return O(this,null,function*(){yield this.resetZoom();let s=this.imageObject.width/this.canvas.getWidth();i||this.canvas.remove(this.logoObject);let o=this.canvas.toDataURL({format:"jpeg",multiplier:s,quality:.9});return i||this.canvas.add(this.logoObject),o})}downloadClicked(){setTimeout(()=>O(this,null,function*(){let i=yield this.getDataUrl(!0),r=document.createElement("a");r.href=i,r.download=Date.now().dateFormat("yyyy-MM-dd HH:mm:ss")+".jpg",r.click()}))}saveClicked(){return O(this,null,function*(){if(yield this.dialogService.showYesNo("M\xF6chtest du deine \xC4nderungen speichern?",{noText:"Zur\xFCck",yesText:"Speichern"})){let i=yield this.getDataUrl(!1);try{this.dialogService.showLoading("Bild wird gespeichert..."),yield this.socketService.saveEditPhoto(this.driveFile().id,i),this.dialogService.hideLoading(),this.dialogRef.close()}catch(r){this.dialogService.hideLoading(),this.dialogService.showOk(`Fehler beim Speichern des Bildes!
`+r.message)}}})}rotateClicked(i){let r=this.imageObject.getScaledWidth(),s=this.imageObject.getScaledHeight(),o=this.imageObject.angle+i;o>=360&&(o-=360),o<0&&(o+=360),this.imageObject.rotate(o);let a=this.canvas.getHeight(),l=this.canvas.getWidth();this.canvas.setWidth(a),this.canvas.setHeight(l),this.imageObject.angle===0&&this.imageObject.set({left:0,top:0}),this.imageObject.angle===90&&this.imageObject.set({left:a,top:0}),this.imageObject.angle===180&&this.imageObject.set({left:a,top:l}),this.imageObject.angle===270&&this.imageObject.set({left:0,top:l}),this.refreshCanvasSize(),this.applyAllSettings("rotateClicked")}applyCrop(){return O(this,null,function*(){if(!this.isCropping||!this.cropper)return;this.dialogService.showLoading("Bild wird zugeschnitten..."),yield za.sleep(10);let i=this.cropper.getBoundingRect(),r=this.imageObject.scaleX||1,s=this.imageObject.scaleY||1,o=(i.left-this.imageObject.left)/r,a=(i.top-this.imageObject.top)/s,l=i.width/r,c=i.height/s,d=document.createElement("canvas");d.width=l,d.height=c;let u=d.getContext("2d"),m=so(this.settings);this.resetSettings(),this.applyImageSettings("applyCrop"),u?.drawImage(this.imageObject.getElement(),o,a,l,c,0,0,l,c),this.settings=m;let f=d.toDataURL();Q1.fabric.Image.fromURL(f,_=>{this.canvas.remove(this.logoObject),this.canvas.remove(this.imageObject),this.cropper&&(this.canvas.remove(this.cropper),this.cropper=null),this.isCropping.set(!1),this.imageObject=_,this.imageObject.set({selectable:!1,evented:!1,originX:"left",originY:"top",left:0,top:0,objectCaching:!0}),this.canvas.setWidth(l*r),this.canvas.setHeight(c*s),this.imageObject.scaleX=r,this.imageObject.scaleY=s,this.canvas.add(this.imageObject),this.canvas.add(this.logoObject),this.applyAllSettings("applyCrop"),this.refreshCanvasSize(),this.dialogService.hideLoading()})})}resetSettings(){this.settings.brightness=0,this.settings.contrast=0,this.settings.saturation=0,this.settings.blackPoint=0}shareToClicked(i){return O(this,null,function*(){this.dialogService.showLoading("Bild wird versendet...");let s=(yield this.getDataUrl(!0)).split(",")[1];yield this.socketService.sendWhatsAppDocument(i,this.driveFile().name,s),this.dialogService.hideLoading()})}switchLogoClicked(){this.settings.logoOpacity===0?this.centerLogoClicked():this.settings.logoPosition==="top-right"?this.hideLogoClicked():this.topRightLogoClicked()}topRightLogoClicked(){this.settings.logoOpacity=1,this.settings.logoPosition="top-right",this.applyAllSettings("topRightLogoClicked")}centerLogoClicked(){this.settings.logoPosition="center",this.settings.logoOpacity=this.logoDefaultOpacity,this.applyAllSettings("centerLogoClicked")}hideLogoClicked(){this.settings.logoOpacity=0,this.applyAllSettings("hideLogoClicked")}setZoomDelta(i){if(this.isCropping())return;let r=this.canvas.getZoom();r*=.999**i,r>20&&(r=20),r<.01&&(r=.01);let s=this.canvas.getCenter(),o=new Q1.fabric.Point(s.left,s.top);this.canvas.zoomToPoint(o,r),this.currentZoom.set(r)}initMouse(){this.canvas.on("mouse:wheel",i=>{let r=i.e.deltaY;this.setZoomDelta(r),i.e.preventDefault(),i.e.stopPropagation()}),this.canvas.on("mouse:down",i=>{if(i.e instanceof TouchEvent){this.touchDown(i.e);return}if(this.canvas.getZoom()!==1){this.isPanning=!0;let r=this.canvas.getPointer(i.e);this.lastPosX=r.x,this.lastPosY=r.y}}),this.canvas.on("mouse:up",()=>{this.isPanning=!1,this.firstTouchMoveTwoFingers=!0}),this.canvas.on("mouse:move",i=>{let r=i.e;if(r.type==="touchmove"){let s=r;this.toucheMove(s);return}if(this.isPanning){let s=this.canvas.viewportTransform;s&&(s[4]+=r.movementX,s[5]+=r.movementY,this.logText.set("x: "+r.type),this.requestRenderAll())}})}resetZoom(){return new Promise(i=>{this.canvas.setZoom(1),this.currentZoom.set(1),this.canvas.viewportTransform=[1,0,0,1,0,0],this.canvas.requestRenderAll(),requestAnimationFrame(()=>{i()})})}zoomInClicked(){this.setZoomDelta(-100)}zoomOutClicked(){this.setZoomDelta(100)}toucheMove(i){if(i.touches.length===1){if(this.firstTouchMoveTwoFingers=!0,this.logText.set("ein finger"),this.isPanning){let r=i.touches[0],s=this.canvas.viewportTransform;s&&(s[4]+=r.clientX-this.lastPosX,s[5]+=r.clientY-this.lastPosY,this.lastPosX=r.clientX,this.lastPosY=r.clientY,this.canvas.requestRenderAll())}}else i.touches.length===2&&this.toucheMoveTwoFingers(i)}touchDown(i){i.touches.length===1?this.canvas.getZoom()!==1&&(this.isPanning=!0,this.lastPosX=i.touches[0].clientX,this.lastPosY=i.touches[0].clientY):i.touches.length===2&&this.touchDownTwoFingers(i)}touchDownTwoFingers(i){this.logText.set("zwei finger");let r=i.touches[0],s=i.touches[1],o=Math.sqrt(Math.pow(s.clientX-r.clientX,2)+Math.pow(s.clientY-r.clientY,2));this.lastTouchDistance=o,this.logText.set("set lastTouchDistance"+o)}toucheMoveTwoFingers(i){if(this.firstTouchMoveTwoFingers){let r=i.touches[0],s=i.touches[1],o=Math.sqrt(Math.pow(s.clientX-r.clientX,2)+Math.pow(s.clientY-r.clientY,2));this.lastTouchDistance=o,this.logText.set("zwei finger set lastTouchDistance "+o)}if(this.firstTouchMoveTwoFingers=!1,i.touches.length===2&&this.lastTouchDistance){this.logText.set("zwei finger + last");let r=i.touches[0],s=i.touches[1],o=Math.sqrt(Math.pow(s.clientX-r.clientX,2)+Math.pow(s.clientY-r.clientY,2)),a=o/this.lastTouchDistance,l=this.canvas.getZoom();l*=a,l>20&&(l=20),l<.01&&(l=.01);let c=this.canvas.getCenter(),d=new Q1.fabric.Point(c.left,c.top);this.logText.set("zwei finger zoom to: "+l),this.canvas.zoomToPoint(d,l),this.currentZoom.set(l),this.lastTouchDistance=o}}shareToStudioSocialMediaMobileClicked(){return O(this,null,function*(){this.dialogService.showLoading("Bild wird versendet...");let r=(yield this.getDataUrl(!0)).split(",")[1];yield this.socketService.sendImageToSocialMedialMobile(r),this.dialogService.hideLoading()})}settingsDown(i){this.settings[i]-=.01,this.settings[i]<-1&&(this.settings[i]=-1),this.applyAllSettings("settingsDown")}settingsUp(i){this.settings[i]+=.01,this.settings[i]>1&&(this.settings[i]=1),this.applyAllSettings("settingsUp")}requestRenderAll(){this.canvas.requestRenderAll()}};e.\u0275fac=function(r){return new(r||e)(R(gs))},e.\u0275cmp=_e({type:e,selectors:[["nxt-photo-editor"]],viewQuery:function(r,s){if(r&1&&(ei(Ehi,5),ei(Mhi,5)),r&2){let o;Pt(o=Rt())&&(s.canvasElement=o.first),Pt(o=Rt())&&(s.canvasWrapper=o.first)}},hostBindings:function(r,s){r&1&&F("resize",function(a){return s.onResize(a)},!1,vy)},standalone:!0,features:[xe],decls:8,vars:4,consts:[["canvasWrapper",""],["canvasElement",""],["shareMenu",""],[1,"absolute","top-2","right-2","z-10","flex","flex-row","gap-2","buttons"],[1,"cursor-pointer"],[1,"absolute","flex","h-full","w-full","items-center","justify-center"],[1,"flex","h-full","w-full","flex-col","items-center","justify-center","photo-editor",3,"opacity"],[1,"cursor-pointer",3,"click"],[1,"flex","h-full","w-full","flex-col","items-center","justify-center","photo-editor"],[1,"flex","h-full","w-full","items-center","justify-center","overflow-hidden","canvas-wrapper",2,"border","0px solid blue"],[3,"width","height"],[1,"flex","flex-row","justify-center","gap-4","p-2"],[1,"grid","w-full","select-none","grid-cols-2","gap-x-2","gap-y-0","px-1","controls","md:w-9/12","md:grid-cols-4","md:gap-2",2,"border","0px solid red"],[1,"flex","flex-row","items-center","gap-3","md:hidden"],[1,"!w-full","!h-full",3,"click"],[1,"center"],[1,"hidden","md:flex"],[1,"no-wrap"],["min","-0.4","max","0.4","step","0.01",1,"!w-full"],["matSliderThumb","",3,"ngModelChange","input","ngModel"],["nxtClickAnimation","","matTooltip","Logo",3,"click"],["fontSet","material-symbols-outlined",1,"mat-icon-lg"],["nxtClickAnimation","","matTooltip","rechts drehen",3,"click"],["nxtClickAnimation","","matTooltip","Herunterladen",3,"click"],["mat-menu-item","",3,"click"],["nxtClickAnimation","","matTooltip","Teilen",3,"matMenuTriggerFor"],["nxtClickAnimation","","matTooltip","Speichern",3,"click"],["nxtClickAnimation","","matTooltip","Zuschneiden",3,"click"],["nxtClickAnimation","","matTooltip","Zuschneiden abbrechen",3,"click"],["nxtClickAnimation","","matTooltip","Zuschneiden anwenden",3,"click"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-content")(2,"div",3),W(3,Ihi,5,1)(4,Ahi,2,0,"nxt-button-icon",4),p(),W(5,Phi,2,0,"div",5)(6,Lhi,73,42,"div",6),p(),ee(7,"nxt-page-footer"),p()),r&2&&(g(3),Je(s.isCropping()?-1:3),g(),Je(s.dialogRef?4:-1),g(),Je(s.contentOpacity()===0?5:-1),g(),Je(s.show()?6:-1))},dependencies:[ko,mu,Ko,Dp,Lt,Zr,Pl,Al,Kl,rw,dl,yf,tee,At,M5,k5,_g,d3,Zy,an],styles:[".photo-editor[_ngcontent-%COMP%]{transition:opacity 1s;position:relative}canvas[_ngcontent-%COMP%]{border:0px solid red}[_nghost-%COMP%]     mat-slider{height:28px}[_nghost-%COMP%]     mat-slider input{height:26px!important}[_nghost-%COMP%]     mat-slider mat-slider-visual-thumb{height:28px!important}[_nghost-%COMP%]     .settings-button button{font-size:50px!important}"],changeDetection:0});let t=e;return t})()});var wQe,SQe=Q(()=>{me();yi();Ci();me();wQe=(()=>{let e=class e{constructor(){this.socketService=Ve(lt),this.dialogService=Ve(vt),setTimeout(()=>this.init())}init(){return O(this,null,function*(){})}showChangeIp(i=""){return O(this,null,function*(){let r=yield this.socketService.getThermalPrinterIp(),s=yield this.dialogService.showInput({title:"Belegdrucker IP \xE4ndern",message:i,prompt:r,placeholder:"IP-Adresse",okButtonText:"Speichern"});s&&s!==r&&(yield this.socketService.setThermalPrinterIp(s))})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var iee,q_e=Q(()=>{me();ma();Nu();Ul();me();ma();iee=(()=>{let e=class e{setCurrentComponent(i){this._currentComponent=i,this.onNewComponent.emit(i)}getCurrentRoute(){return this._currentRoute}getCurrentComponent(){return this._currentComponent}constructor(i,r){this.router=i,this.route=r,this.onNewComponent=new nt,this._currentRoute="",e.instance=this,i.events.subscribe(s=>{if(s instanceof Av&&window.location.hostname==="localhost"&&!s.url.startsWith("/login")&&s.url!=="/main"){let o=[];localStorage.getItem("localLastUrls")&&(o=Qn.parse(localStorage.getItem("localLastUrls"))),o=o.filter(a=>a!==s.url),o.unshift(s.url),o.length>5&&o.pop(),localStorage.setItem("localLastUrls",Qn.stringify(o))}})}isCurrentRoute(i){return i=cr.trimStart(i,"/"),i=cr.trimEnd(i,"/"),i.toLowerCase()===this.getCurrentRoute().toLowerCase()}isFirstRoutePart(i){return i=cr.trimStart(i,"/"),i=cr.trimEnd(i,"/"),i===this.getCurrentRoute().split("/")[0]}goTo(i){this.router.navigateByUrl(i)}};e.\u0275fac=function(r){return new(r||e)(it(Ll),it(gs))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var DQe,EQe=Q(()=>{aV();zn();me();yi();Kr();DQe=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.loginService=r}printShisha(i){this.socketService.printShisha(i)}printFreeWater(){this.socketService.printSmallText({text:`Ein kostenloses Wasser im Brudi's

Datum: `+Ie.formatNow("dd.MM.yyyy HH:mm")+`

Code: `+G8.generateCustom(6,!0),studio:this.loginService.getStudio(),orientation:"standard",margin_top:20,margin_bottom:20})}printFreeShot(i){this.socketService.printSmallText({text:`Ein kostenloser Shot im Brudi's

f\xFCr `+i+`

Datum: `+Ie.formatNow("dd.MM.yyyy HH:mm")+`

Code: `+G8.generateCustom(6,!0),studio:this.loginService.getStudio(),orientation:"standard",margin_top:20,margin_bottom:20})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(Fi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function Vhi(t,e){if(t&1){let n=re();h(0,"td",9)(1,"mat-button-toggle-group",10),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.jewelryState,r)||(s.jewelryState=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.JewelryStateChanged())}),h(2,"mat-button-toggle",14)(3,"div",15),y(4,"Schmuck"),ee(5,"br"),y(6,"von uns"),p()(),h(7,"mat-button-toggle",16)(8,"div",15),y(9,"Steriler"),ee(10,"br"),y(11,"Schmuck von uns"),p()(),h(12,"mat-button-toggle",17)(13,"div",15),y(14,"Selbst"),ee(15,"br"),y(16,"mitgebracht"),p()()()()}if(t&2){let n=w().$implicit;g(),qe("value",n.jewelryState)}}function Bhi(t,e){if(t&1){let n=re();h(0,"div",18)(1,"nxt-button-icon",5),F("click",function(){V(n);let r=w(2);return B(r.removePiercing())}),y(2,"remove"),p()()}}function zhi(t,e){if(t&1){let n=re();h(0,"div",7)(1,"table",8)(2,"tr")(3,"th",9),y(4),p()(),h(5,"tr")(6,"td"),y(7,"Bei uns gestochen"),p(),h(8,"td")(9,"nxt-slide-toggle",10),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.workFromUs,r)||(s.workFromUs=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.calcIncoming())}),p()()(),h(10,"tr"),W(11,Vhi,17,1,"td",11),p(),h(12,"tr")(13,"td"),y(14,"Bareinnahme"),p(),h(15,"td"),y(16),Ce(17,"money"),p()(),h(18,"tr")(19,"td",9)(20,"nxt-input",12),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.bodyPutPiercing,r)||(s.bodyPutPiercing=r),B(r)}),F("click",function(){let r=V(n).index,s=w();return B(s.bodyPutPiercingClick(r))}),p()()(),h(21,"tr")(22,"td"),y(23,"Artist %"),p(),h(24,"td"),y(25),p()(),h(26,"tr")(27,"td"),y(28,"Terminpreis"),p(),h(29,"td"),y(30),Ce(31,"money"),p()()(),W(32,Bhi,3,0,"div",13),p()}if(t&2){let n=e.$implicit,i=e.index,r=w();g(4),Ke("",i+1,". Piercing"),g(5),qe("value",n.workFromUs),g(2),b("ngIf",n),g(5),Ke(" ",tt(17,11,n.articlePrice)," "),g(4),b("readonly",!0)("validators",r.required),qe("value",n.bodyPutPiercing),b("cellRenderer",r.bodyPutPiercingCellRenderer),g(5),Ke("",n.artistPercentage,"%"),g(5),ye(tt(31,13,n.eventPrice)),g(2),b("ngIf",i>0)}}var nee,Z_e=Q(()=>{nc();Il();Zi();ls();Jr();oo();ri();Vt();i6();me();ji();z1();Ci();Vt();nee=(()=>{let e=class e{constructor(i,r,s){this.dialogRef=i,this.bodyPutService=r,this.dialogService=s,this.piercings=[],this.piercingArticlePrice=15,this.required=ii.requiredAndNotNaN,this.bodyPutPiercingCellRenderer=o=>o?(o=o.filter(a=>a!=="on"),this.bodyPutService.getGermanPathBodyPutPiercing(o)):""}ngOnInit(){this.addPiercing(),this.calcIncoming()}addPiercing(){this.piercings.push({workFromUs:!1,jewelryState:void 0,bodyPutPiercing:"",articlePrice:-1,artistPercentage:-1,eventPrice:-1}),this.calcIncoming()}bodyPutPiercingClick(i){return O(this,null,function*(){let r=yield this.bodyPutService.showBodyPutPiercingChooser();r&&(this.piercings[i].bodyPutPiercing=r)})}removePiercing(){this.piercings.pop()}calcIncoming(){this.piercings.forEach(i=>{i.articlePrice=0,i.jewelryState==="fromUs"?i.articlePrice=15:i.jewelryState==="fromUsSterile"&&(i.articlePrice=5),i.artistPercentage=i.workFromUs?100:50,i.eventPrice=i.workFromUs?5:10},0)}validate(){let i=[];for(let[r,s]of this.piercings.entries())s.bodyPutPiercing||i.push(r+1+". Piercing: K\xF6rperstelle fehlt"),s.jewelryState||i.push(r+1+". Piercing: Schumckherkunft fehlt");return i.length>0?(this.dialogService.showOk(i.join(`
`)),!1):!0}save(){if(this.validate()){let i=this.getResult();this.dialogRef.close(i)}}getResult(){let i=this.piercings.reduce((c,d)=>c+d.articlePrice,0),r=this.piercings.reduce((c,d)=>c+d.eventPrice,0),o=this.piercings.reduce((c,d)=>c+d.eventPrice*d.artistPercentage/100,0)/r*100,a=[];for(let c of this.piercings){let d="";c.workFromUs?d+="bei uns gestochen":d+="nicht bei uns gestochen",c.jewelryState==="own"?d+=" + eigener Schmuck":c.jewelryState==="fromUs"?d+=" + NXT Schmuck":c.jewelryState==="fromUsSterile"&&(d+=" + NXT steriler Schmuck"),a.push(d)}let l="Wechsel: "+a.join(" | ");return{eventPrice:r,artistPercentage:o,bodyPutsPiercing:this.piercings.map(c=>c.bodyPutPiercing),title:l,articlePrice:i}}JewelryStateChanged(){this.calcIncoming()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(Oc),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-piercing-change-book"]],standalone:!0,features:[xe],decls:13,vars:1,consts:[["fxLayout","column","fxLayoutAlign","center center",1,"nxt-page",2,"overflow","hidden"],["fxLayout","row",1,"p-3","text-140"],["fxLayout","row","fxLayoutAlign","center","fxLayoutGap","0.75em",1,"scrollable","w-full"],["style","border: 1px solid gray;","class","p-2","fxLayout","column",4,"ngFor","ngForOf"],["fxLayoutAlign","center center"],[3,"click"],["fxLayout","row","fxLayoutAlign","center",1,"pt-3"],["fxLayout","column",1,"p-2",2,"border","1px solid gray"],[1,"piercing-table"],["colspan","2"],[3,"valueChange","value"],["colspan","2",4,"ngIf"],["placeholder","K\xF6rperstelle",3,"valueChange","click","readonly","validators","value","cellRenderer"],["fxLayoutAlign","end end",4,"ngIf"],["value","fromUs"],[1,"leading-snug","h-full","flex","justify-center"],["value","fromUsSterile"],["value","own"],["fxLayoutAlign","end end"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),y(2,"Piercing Wechsel"),p(),h(3,"div",2),W(4,zhi,33,15,"div",3),h(5,"div",4)(6,"nxt-button-icon",5),F("click",function(){return s.addPiercing()}),y(7,"add"),p()()(),h(8,"div",6)(9,"nxt-button",5),F("click",function(){return s.dialogRef==null?null:s.dialogRef.close()}),y(10,"Abbrechen"),p(),h(11,"nxt-button",5),F("click",function(){return s.save()}),y(12,"Anlegen"),p()()()),r&2&&(g(4),b("ngForOf",s.piercings))},dependencies:[At,Yt,$r,oi,Hi,Nn,Yi,Ct,an,Lt,ks,nm,Dm],styles:[".piercing-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:5px}"]});let t=e;return t})()});var ree,X_e=Q(()=>{me();yi();Kr();ree=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.loginService=r}startWorkSession(i){return O(this,null,function*(){yield this.socketService.workSessionStart(i)})}isWorkSessionOpen(i){return O(this,null,function*(){return!1})}startCashRegister(i,r){return O(this,null,function*(){yield this.socketService.workSessionStartCashRegister(i,r)})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(Fi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var K5,KP=Q(()=>{me();zy();yi();X_e();Ci();Kr();K5=(()=>{let e=class e{constructor(i,r,s,o,a){this.firestoreService=i,this.socketService=r,this.workSessionService=s,this.dialogService=o,this.loginService=a}getById(i,r){return O(this,null,function*(){return this.socketService.cashReportCashGetById(i,r)})}upsert(i,r){return O(this,null,function*(){return this.socketService.cashReportCashUpsert(i,r)})}deleteById(i,r){return O(this,null,function*(){return this.socketService.cashReportCashDeleteById(i,r)})}};e.\u0275fac=function(r){return new(r||e)(it(ff),it(lt),it(ree),it(vt),it(Fi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var YP,oee=Q(()=>{me();n6();zn();Z_e();$n();Kr();Ci();KP();Cs();yi();me();YP=(()=>{let e=class e{constructor(){this.loginService=Ve(Fi),this.dialogService=Ve(vt),this.cashPaymentService=Ve(K5),this.configService=Ve(Xi),this.socketService=Ve(lt)}startWalkIn(i){return O(this,null,function*(){let r=yield this.getWalkInNewEventData();if(!r)return!1;i||(i=this.dialogService.showComponentFull(nu).componentInstance),i.loadEvent({newEventData:r.newEventData}).then(),r.articlePrice>0&&i.afterClosed.pipe(Jd()).subscribe(s=>O(this,null,function*(){if(s.op==="created"){let o={id:"",articleId:"piercing_jewelry",createdAtDateString:Ie.format(Date.now(),"yyyy-MM-dd"),createdAt:Date.now(),createdBy:this.loginService.getUsername(),studio:this.loginService.getStudio(),studioReal:this.loginService.getStudioReal(),description:"Piercingschmuck",_:!1,value:r.articlePrice,vatPercentage:19,eventId:""};yield this.cashPaymentService.upsert("incoming",o),yield this.dialogService.showOk("Nicht vergessen "+r.articlePrice.toMoneyString()+" f\xFCr den Schmuck kassieren, die Einnahme wurde automatisch gebucht!")}}))})}getWalkInNewEventData(){return O(this,null,function*(){let i=yield this.socketService.hasPiercingArtistToday(),r={value:"tattoo"};if(i&&(r=yield this.dialogService.showButtonChooserNew({buttonRows:[[{value:"piercing",text:"Piercing"},{value:"tattoo",text:"Tattoo"}]],title:"Piercing oder Tattoo?",hideBackButton:!0})),r?.value)return r.value==="piercing"?this.getPiercingWalkInNewEventData():this.getTattooWalkInNewEventData()})}getTattooWalkInNewEventData(){return O(this,null,function*(){let i=Ie.roundToNextMinute(Date.now(),15),r=i+30*60*1e3,s=Ie.format(i,"HH:mm"),o=Ie.format(r,"HH:mm");return{newEventData:{dateString:Ie.formatNowDate(),timeFromString:s,timeTillString:o,walkIn:!0,workType:"tattoo",openArtist:!0},articlePrice:0}})}getPiercingWalkInNewEventData(){return O(this,null,function*(){let i=(yield this.dialogService.showButtonChooserNew({buttonRows:[[{value:!0,text:"Neu"},{value:!1,text:"Wechsel"}]],title:"Neu oder Wechsel?",hideBackButton:!0}))?.value,s=(yield this.socketService.getAvailableArtistsDay(Ie.formatNowDate()))?.artists.filter(o=>o.workType==="piercing");if(i){let o=Ie.roundToNextMinute(Date.now(),15),a=o+15*60*1e3,l=Ie.format(o,"HH:mm"),c=Ie.format(a,"HH:mm");return{newEventData:{dateString:Ie.formatNowDate(),timeFromString:l,timeTillString:c,walkIn:!0,workType:"piercing",openPiercing:s.length!==1,artist:s.length===1?s[0].name:""},articlePrice:0}}else{let o=this.dialogService.showComponentDialog(nee,{}),a=yield Sn(o.afterClosed());if(a){let l=Ie.roundToNextMinute(Date.now(),15),c=l+15*60*1e3,d=Ie.format(l,"HH:mm"),u=Ie.format(c,"HH:mm");return{articlePrice:a.articlePrice,newEventData:{dateString:Ie.formatNowDate(),timeFromString:d,timeTillString:u,walkIn:!0,workType:"piercing",artistPercentage:a.artistPercentage,bodyPutsPiercing:a.bodyPutsPiercing.map(m=>({bodyPut:m})),priceEstimatedFrom:a.eventPrice,info:a.title,openPiercing:s.length!==1,artist:s.length===1?s[0].name:""}}}}})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function rpi(t,e){t&1&&(h(0,"div",11),y(1,'CHANGES!"'),p())}function spi(t,e){if(t&1){let n=re();h(0,"div",36),F("click",function(){V(n);let r=w(2);return B(r.showChangesClicked())}),y(1,"*"),p()}}function opi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",37),F("click",function(){V(n);let r=w(2);return B(r.saveAndCloseDialog(!0))}),y(1,"check_circle "),p()}t&2&&b("onlyOneClick",!0)}function api(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",38),F("click",function(){V(n);let r=w(2);return B(r.printFastWalkInNoFromEvent())}),y(1,"print "),p()}}function lpi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",39),F("click",function(){V(n);let r=w(2);return B(r.printFreeShot())}),y(1,"local_drink"),p()}}function cpi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",40),F("click",function(){V(n);let r=w(2);return B(r.saveAndFollowUp())}),y(1,"note_add "),p()}}function dpi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",41),F("click",function(){V(n);let r=w(2);return B(r.printShishaClicked())}),p()}if(t&2){let n=w(2);b("svg",n.IconTools.Awesome.Shisha)}}function upi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",42),F("click",function(){V(n);let r=w(2);return B(r.printQrClicked())}),y(1,"qr_code"),p()}}function hpi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",43),F("click",function(){V(n);let r=w(2);return B(r.printQrEvent(!0))}),y(1,"qr_code"),p()}}function ppi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",44),F("click",function(){V(n);let r=w(2);return B(r.deleteEvent())}),y(1,"delete "),p()}}function mpi(t,e){if(t&1){let n=re();h(0,"div",45)(1,"nxt-button",46),F("click",function(){V(n);let r=w(2);return B(r.reload())}),y(2,"Termin erneut laden"),p()()}}function fpi(t,e){t&1&&(h(0,"mat-icon"),y(1,"thumb_down"),p())}function gpi(t,e){t&1&&(h(0,"mat-icon"),y(1,"star_half"),p())}function vpi(t,e){t&1&&(h(0,"mat-icon"),y(1,"star"),p())}function ypi(t,e){if(t&1){let n=re();h(0,"mat-card",117),F("click",function(){V(n);let r=w(3);return B(r.showRatingClicked())}),W(1,fpi,2,0,"mat-icon")(2,gpi,2,0,"mat-icon")(3,vpi,2,0,"mat-icon"),y(4),p()}if(t&2){let n=w(3);g(),Je(n.originalEvent().ratingValue<5?1:n.originalEvent().ratingValue<7?2:3),g(3),Ke(" ",n.originalEvent().ratingValue," ")}}function _pi(t,e){if(t&1){let n=re();h(0,"div",118)(1,"div"),y(2,"Termin"),p(),h(3,"nxt-input",119),F("valueChange",function(r){V(n);let s=w(3);return s.followUp.index=r-1,B(s.followUpChanged())}),p(),h(4,"div"),y(5,"von"),p(),h(6,"nxt-input",119),Xe("valueChange",function(r){V(n);let s=w(3);return Ze(s.followUp.total,r)||(s.followUp.total=r),B(r)}),F("valueChange",function(){V(n);let r=w(3);return B(r.followUpChanged())}),p()()}if(t&2){let n=w(3);g(3),b("noPadding",!0)("isNumber",!0)("value",n.followUp.index+1),g(3),b("noPadding",!0)("isNumber",!0),qe("value",n.followUp.total)}}function Cpi(t,e){if(t&1){let n=re();h(0,"div",123)(1,"nxt-button-icon",124),F("click",function(){V(n);let r=w(4);return B(r.newReminder())}),y(2,"notification_add"),p()()}}function xpi(t,e){if(t&1&&(h(0,"div",59)(1,"div",125),y(2),Ce(3,"fromNowText"),Ce(4,"nxtDate"),p()()),t&2){let n=e.$implicit;g(2),F_(" ",Nt(3,4,n.reminderDateTime,!0)," ",Nt(4,7,n.reminderDateTime,"HH:mm"),"\xA0",n.createdBy," :\xA0",n.description," ")}}function bpi(t,e){if(t&1&&(h(0,"div",59),W(1,Cpi,3,0,"div",120),h(2,"div",121),W(3,xpi,5,10,"div",122),p()()),t&2){let n=w(3);g(),b("ngIf",!n.isNewEvent),g(2),b("ngForOf",n.reminders)}}function wpi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",126),F("click",function(){V(n);let r=w(3);return B(r.editContact())}),y(1,"edit "),p()}}function Spi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",46),F("click",function(){V(n);let r=w(3);return B(r.addCustomerClicked())}),y(2,"Kunde anlegen"),p()()}}function Tpi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button-icon",127),F("click",function(){V(n);let r=w(3);return B(r.showParsedContactsClicked())}),p()()}}function Dpi(t,e){if(t&1){let n=re();h(0,"div",134),Ce(1,"safeHtml"),F("click",function(){let r=V(n).$implicit,s=w(5);return B(s.removeTagline(r))}),p()}if(t&2){let n=e.$implicit;b("innerHTML",tt(1,1,n),Pi)}}function Epi(t,e){if(t&1&&W(0,Dpi,2,3,"div",133),t&2){let n=w(4);b("ngForOf",n.formGet("customer").value.taglines)}}function Mpi(t,e){if(t&1){let n=re();h(0,"nxt-col",71),ee(1,"nxt-divider",128),W(2,Epi,1,1,"div",129),h(3,"div",59)(4,"nxt-button-icon",130),F("click",function(){V(n);let r=w(3);return B(r.addCustomerTagline())}),y(5,"info"),p(),h(6,"nxt-button-icon",131),F("click",function(){V(n);let r=w(3);return B(r.requestImageFromCustomer())}),y(7,"image"),p(),h(8,"nxt-slide-toggle",132),Xe("valueChange",function(r){V(n);let s=w(3);return Ze(s.showCustomerRef,r)||(s.showCustomerRef=r),B(r)}),F("valueChange",function(r){V(n);let s=w(3);return B(s.showCustomerRefClicked(r))}),y(9,"anderer Chat "),p()()()}if(t&2){let n=w(3);g(2),Je(n.formGet("customer").value.taglines?2:-1),g(6),qe("value",n.showCustomerRef)}}function kpi(t,e){if(t&1){let n=re();h(0,"div",72)(1,"nxt-autocomplete",135,0),F("noEntryEnter",function(r){V(n);let s=w(3);return B(s.customerEmptyEnter(r))})("newItem",function(r){V(n);let s=w(3);return B(s.customerEmptyEnter(r))}),p(),h(3,"nxt-button-icon",136),F("click",function(){V(n);let r=w(3);return B(r.showWhatsAppChat("customerRef"))}),y(4,"chat "),p()()}if(t&2){let n=w(3);g(),b("displayWith",n.calendarEventEditDisplayFn.displayFn)("displayInOptionWith",n.calendarEventEditDisplayFn.displayCustomerOptionFn)("nxtFormControl",n.form.get("customerRef"))("filterFields",bn(9,IQe))("showClearIcon",!0)("useFuseSearch",!0)("maxOptionsToShow",50)("customSearchAsyncFn",n.customerSearch)("dateControlIfFirstCharDigit",!0)}}function Ipi(t,e){if(t&1){let n=re();h(0,"div",144)(1,"div",145),F("click",function(){let r=V(n).$implicit,s=w(5);return B(s.showEvent(r.eventId))}),h(2,"div",146),y(3),Ce(4,"nxtDate"),p()()()}if(t&2){let n=e.$implicit,i=w(5);g(2),ki("not-this-event",n.eventId!==i.eventId)("this-event",n.eventId===i.eventId),g(),Ke(" ",Nt(4,5,n.start,"dd.MM.yy")," ")}}function Api(t,e){if(t&1&&(h(0,"div",141)(1,"div",142),y(2),p(),W(3,Ipi,5,8,"div",143),p()),t&2){let n=w(4);g(2),Ke("abgesagt (",n.customerCanceledEvents.length,"):"),g(),b("ngForOf",n.customerCanceledEvents)}}function Ppi(t,e){if(t&1){let n=re();h(0,"div",144)(1,"div",145),F("click",function(){let r=V(n).$implicit,s=w(5);return B(s.showEvent(r.eventId))}),h(2,"div",147),y(3),Ce(4,"nxtDate"),p()()()}if(t&2){let n=e.$implicit,i=w(5);g(2),ki("not-this-event",n.eventId!==i.eventId)("this-event",n.eventId===i.eventId),g(),Ke(" ",Nt(4,5,n.start,"dd.MM.yy")," ")}}function Rpi(t,e){if(t&1&&(h(0,"div",141)(1,"div",142),y(2),p(),W(3,Ppi,5,8,"div",143),p()),t&2){let n=w(4);g(2),Ke("fertig (",n.customerClosedEvents.length,"):"),g(),b("ngForOf",n.customerClosedEvents)}}function Fpi(t,e){if(t&1){let n=re();h(0,"div",151),F("click",function(){V(n);let r=w().$implicit,s=w(5);return B(s.showEvent(r.eventId))}),h(1,"div",152),y(2),Ce(3,"nxtDate"),p()()}if(t&2){let n=w().$implicit,i=w(5);b("ngStyle",sn(9,ipi,n.eventId!==i.eventId?"pointer":"")),g(),ki("not-this-event",n.eventId!==i.eventId)("this-event",n.eventId===i.eventId),g(),Ke(" ",Nt(3,6,n.start,"dd.MM.yy")," ")}}function Lpi(t,e){if(t&1&&(h(0,"div",149),W(1,Fpi,4,11,"div",150),p()),t&2){let n=e.$implicit,i=w(5);g(),b("ngIf",!(n.eventId===i.eventId&&i.isNewEvent))}}function Opi(t,e){if(t&1&&(h(0,"div",141)(1,"div",142),y(2),p(),W(3,Lpi,2,1,"div",148),p()),t&2){let n=w(4);g(2),Ke("offen (",n.customerEvents.length,"):"),g(),b("ngForOf",n.customerEvents)}}function Npi(t,e){if(t&1){let n=re();h(0,"div",59)(1,"div",137)(2,"nxt-button-icon",138),F("click",function(){V(n);let r=w(3);return B(r.showCustomerEvents())}),y(3,"list"),p()(),h(4,"div",139),W(5,Api,4,2,"div",140)(6,Rpi,4,2,"div",140)(7,Opi,4,2,"div",140),p()()}if(t&2){let n=w(3);g(5),b("ngIf",n.customerCanceledEvents&&n.customerCanceledEvents.length>0),g(),b("ngIf",n.customerClosedEvents&&n.customerClosedEvents.length>0),g(),b("ngIf",n.customerEvents&&n.customerEvents.length>0)}}function Vpi(t,e){if(t&1&&(h(0,"span",155),y(1),p()),t&2){let n=w(4);g(),Ke("Dauer: ",n.durationText,"")}}function Bpi(t,e){if(t&1&&(h(0,"div",153),y(1,"Termin "),W(2,Vpi,2,1,"span",154),p()),t&2){let n=w(3);g(2),b("ngIf",n.durationText)}}function zpi(t,e){if(t&1){let n=re();h(0,"div",156),F("nxtOnMultiClick",function(){V(n);let r=w(3);return B(r.setTestData())}),y(1),p()}if(t&2){let n=w(3);jr(n.artistNotAvailableText!==""?"red":""),b("nxtMultiClick",3),g(),Ke(" Artist ",n.artistNotAvailableText," ")}}function Hpi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",157),F("click",function(){V(n);let r=w(3);return B(r.editArtist())}),y(1,"edit"),p()}}function Gpi(t,e){t&1&&(h(0,"div",160),y(1,"!!\xA0"),p())}function Wpi(t,e){t&1&&(h(0,"div",160),y(1,"\xA0!!"),p())}function Upi(t,e){if(t&1&&(h(0,"div",158),W(1,Gpi,2,0,"div",159),h(2,"div"),y(3),p(),W(4,Wpi,2,0,"div",159),p()),t&2){let n=e.ngIf;g(),b("ngIf",n<5),g(),ki("red",n<5)("bold",n<5),g(),Ke("Geschwindigkeit: ",n," / 10"),g(),b("ngIf",n<5)}}function jpi(t,e){if(t&1&&(h(0,"div",161)(1,"div"),y(2),Ce(3,"nxtDate"),p(),h(4,"div",97),y(5),p()()),t&2){let n=w(3);g(2),Ke("Abgesagt am ",Nt(3,3,n.formGetValue("canceledAt"),"dd.MM.yyyy HH:mm"),""),g(2),b("ngClass",sn(6,npi,!n.formGetValue("canceledInTime"))),g(),Ke("",n.formGetValue("canceledInTime")?"fr\xFCh genug abgesagt":"nicht fr\xFCh genug abgesagt"," ")}}function $pi(t,e){if(t&1&&(h(0,"mat-button-toggle",162),y(1),p()),t&2){let n=e.$implicit;b("value",n.value),g(),ye(n.text)}}function Kpi(t,e){if(t&1&&(h(0,"mat-button-toggle-group",98),Kn(1,$pi,2,2,"mat-button-toggle",162,qhi),p()),t&2){let n=w(3);b("formControl",n.formGet("artistFixReason"))("multiple",!0),g(),Yn(n.fixArtistReasonOptions)}}function Ypi(t,e){if(t&1&&(h(0,"nxt-slide-toggle",163),Ce(1,"permission"),y(2,"Piercing "),p()),t&2){let n=w(3);b("disabled",!tt(1,2,"CalendarEventEdit_ChangeWorkType"))("value",n.form.get("workType").value==="piercing")}}function qpi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=e.$implicit;g(),Ke(" ",n.key," ")}}function Zpi(t,e){if(t&1&&(h(0,"div"),W(1,qpi,2,1,"div",171),Ce(2,"keyvalue"),p()),t&2){let n=w(5);g(),b("ngForOf",tt(2,1,n.skill.boolSkills))}}function Xpi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=e.$implicit;g(),Ke(" ",n.key," ")}}function Qpi(t,e){if(t&1&&(h(0,"div"),W(1,Xpi,2,1,"div",171),Ce(2,"keyvalue"),p()),t&2){let n=w(5);g(),b("ngForOf",tt(2,1,n.skill.skills))}}function Jpi(t,e){if(t&1){let n=re();h(0,"div",106),F("click",function(){V(n);let r=w(4);return B(r.setSkill())}),W(1,Zpi,3,3,"div",69)(2,Qpi,3,3,"div",69),p()}if(t&2){let n=w(4);g(),b("ngIf",n.skill.boolSkills),g(),b("ngIf",n.skill.skills)}}function emi(t,e){t&1&&(h(0,"div",176),y(1,"Check ist deaktiviert"),p())}function tmi(t,e){if(t&1){let n=re();h(0,"div",172)(1,"nxt-rate-icons",173),F("click",function(){V(n);let r=w(4);return B(r.setSkill())}),p(),h(2,"div",174),ee(3,"nxt-slide-toggle",175),W(4,emi,2,0,"div",176),p()()}if(t&2){let n=w(4);g(),b("value",n.artistSkill.stars),g(2),b("placeholder",`Check
deaktivieren`)("nxtFormControl",n.form.get("disableSkillCheck")),g(),Je(n.form.get("disableSkillCheck").value?4:-1)}}function imi(t,e){if(t&1){let n=re();h(0,"nxt-button",46),F("click",function(){V(n);let r=w(4);return B(r.setSkill())}),y(1," Stil w\xE4hlen "),p()}}function nmi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",46),F("click",function(){V(n);let r=w().$index,s=w(5);return B(s.removeBodyPut("bodyPutsTattoo",r))}),y(1,"remove"),p()}}function rmi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",46),F("click",function(){V(n);let r=w(6);return B(r.addBodyPut("bodyPutsTattoo"))}),y(1,"add"),p()}}function smi(t,e){if(t&1){let n=re();h(0,"div")(1,"div",177)(2,"div",178),W(3,nmi,2,0,"nxt-button-icon")(4,rmi,2,0,"nxt-button-icon"),p(),h(5,"div",179)(6,"nxt-input",180,3),F("inputClick",function(){let r=V(n).$index,s=w(5);return B(s.bodyPutClick(r))}),p()(),h(8,"div",181),ee(9,"nxt-autocomplete",182,0),p(),h(11,"div",183),ee(12,"nxt-input",184,3),p(),h(14,"div")(15,"nxt-slide-toggle",82),y(16,"Rund"),p()(),h(17,"div")(18,"nxt-slide-toggle",82),y(19,"feine Linien"),p()()()()}if(t&2){let n=e.$implicit,i=e.$index,r=e.$count,s=w(),o=w(4);g(),b("fxLayoutGap",o.controlGap),g(2),Je(s.length>1?3:-1),g(),Je(i===r-1?4:-1),g(2),b("nxtFormControl",n.get("bodyPut"))("readonly",!0)("cellRenderer",o.bodyPutCellRenderer),g(3),b("maxOptionsToShow",999)("nxtFormControl",n.get("motive"))("filterFields",bn(12,AQe)),g(3),b("nxtFormControl",n.get("size")),g(3),b("nxtFormControl",n.get("round")),g(3),b("nxtFormControl",n.get("thinLines"))}}function omi(t,e){t&1&&Kn(0,smi,20,13,"div",null,sa),t&2&&Yn(e)}function ami(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",187),F("click",function(){V(n);let r=w(5);return B(r.removeBodyPut("bodyPutsTattoo"))}),y(1," remove "),p()}t&2&&b("smallHeight",!0)}function lmi(t,e){if(t&1){let n=re();h(0,"div",185),W(1,ami,2,1,"nxt-button-icon",186),h(2,"nxt-button-icon",187),F("click",function(){V(n);let r=w(4);return B(r.addBodyPut("bodyPutsTattoo"))}),y(3,"add"),p()()}if(t&2){let n=w(4);g(),b("ngIf",n.getFormControlGroups("bodyPutsTattoo").length>1),g(),b("smallHeight",!0)}}function cmi(t,e){if(t&1&&(h(0,"mat-card",74)(1,"div",164),W(2,Jpi,3,2,"div",165)(3,tmi,5,4,"div",166)(4,imi,2,0,"nxt-button",167),Ce(5,"keyvalue"),Ce(6,"keyvalue"),p()(),h(7,"div",50)(8,"nxt-smooth-height",168)(9,"mat-card",169),W(10,omi,2,0)(11,lmi,4,2,"div",170),p()()()),t&2){let n,i=w(3);g(2),b("ngIf",i.skill),g(),b("ngIf",i.artistSkill),g(),b("ngIf",i.skill&&tt(5,6,i.skill.skills).length===0&&tt(6,8,i.skill.boolSkills).length===0),g(4),b("trigger",i.getFormControlGroups("bodyPutsTattoo").length),g(2),Je((n=i.getFormControlGroups("bodyPutsTattoo"))?10:-1,n),g(),b("ngIf",!1)}}function dmi(t,e){if(t&1){let n=re();h(0,"div")(1,"div",59)(2,"nxt-input",180,3),F("inputClick",function(){let r=V(n).index,s=w(4);return B(s.bodyPutPiercingClick(r))}),p(),h(4,"div",189)(5,"nxt-slide-toggle",82),y(6,"mit Goldkugel"),p()()()()}if(t&2){let n=e.$implicit,i=w(4);g(2),b("nxtFormControl",n.get("bodyPut"))("readonly",!0)("cellRenderer",i.bodyPutPiercingCellRenderer),g(3),b("nxtFormControl",n.get("goldBall"))}}function umi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",187),F("click",function(){V(n);let r=w(4);return B(r.removeBodyPut("bodyPutsPiercing"))}),y(1,"remove "),p()}t&2&&b("smallHeight",!0)}function hmi(t,e){if(t&1){let n=re();h(0,"div",50)(1,"nxt-smooth-height",168)(2,"mat-card",188)(3,"div",153),y(4,"5. Piercing"),p(),W(5,dmi,7,4,"div",171),h(6,"div",185),W(7,umi,2,1,"nxt-button-icon",186),h(8,"nxt-button-icon",187),F("click",function(){V(n);let r=w(3);return B(r.addBodyPut("bodyPutsPiercing"))}),y(9,"add"),p()()()()()}if(t&2){let n=w(3);g(),b("trigger",n.getFormControlGroups("bodyPutsPiercing").length),g(4),b("ngForOf",n.getFormControlGroups("bodyPutsPiercing")),g(2),b("ngIf",n.getFormControlGroups("bodyPutsPiercing").length>1),g(),b("smallHeight",!0)}}function pmi(t,e){if(t&1){let n=re();h(0,"div")(1,"div",59)(2,"nxt-input",190,3),F("inputClick",function(){let r=V(n).index,s=w(4);return B(s.bodyPutBeautyClick(r))}),p()()()}if(t&2){let n=e.$implicit,i=w(4);g(2),b("nxtFormControl",n.get("bodyPut"))("readonly",!0)("cellRenderer",i.bodyPutBeautyCellRenderer)}}function mmi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",187),F("click",function(){V(n);let r=w(4);return B(r.removeBodyPut("bodyPutsBeauty"))}),y(1,"remove "),p()}t&2&&b("smallHeight",!0)}function fmi(t,e){if(t&1){let n=re();h(0,"div",50)(1,"nxt-smooth-height",168)(2,"mat-card",188)(3,"div",153),y(4,"5. Behandlung"),p(),W(5,pmi,4,3,"div",171),h(6,"div",185),W(7,mmi,2,1,"nxt-button-icon",186),h(8,"nxt-button-icon",187),F("click",function(){V(n);let r=w(3);return B(r.addBodyPut("bodyPutsBeauty"))}),y(9,"add"),p()()()()()}if(t&2){let n=w(3);g(),b("trigger",n.getFormControlGroups("bodyPutsBeauty").length),g(4),b("ngForOf",n.getFormControlGroups("bodyPutsBeauty")),g(2),b("ngIf",n.getFormControlGroups("bodyPutsBeauty").length>1),g(),b("smallHeight",!0)}}function gmi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(4);g(),cn(" ",n.form.get("discountPromotion").value.name,": ",n.formGet("discountPromotion").value.discountPercentage+"%"," ")}}function vmi(t,e){if(t&1&&(h(0,"div",194),y(1),p()),t&2){let n=w(5);g(),Ke("Promoter: ",n.form.get("promoOfferPromoterName").value,"")}}function ymi(t,e){if(t&1&&(h(0,"div",194),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w(5);g(),Ke("PromoCode erstellt: ",Nt(2,1,n.form.get("promoOfferCreatedAt").value,"dd.MM.yyyy HH:mm")," ")}}function _mi(t,e){if(t&1&&(h(0,"div",193),y(1),h(2,"div",194),y(3),p(),W(4,vmi,2,1,"div",195)(5,ymi,3,4,"div",195),p()),t&2){let n=w(4);g(),Ke(" ",n.form.get("discountPromotion").value.name," "),g(2),Ke("Rabattierte Gutscheine: ",n.form.get("discountPromotion").value.disableDiscountedGiftCards?"Nein":"Ja"," "),g(),b("ngIf",n.form.get("promoOfferPromoterName").value),g(),b("ngIf",n.form.get("promoOfferCreatedAt").value)}}function Cmi(t,e){if(t&1&&(h(0,"div",191),W(1,gmi,2,2,"div",69)(2,_mi,6,4,"div",192),p()),t&2){let n,i,r=w(3);g(),b("ngIf",((n=r.form.get("discountPromotion").value)==null?null:n.id)==="custom"),g(),b("ngIf",((i=r.form.get("discountPromotion").value)==null?null:i.id)!=="custom")}}function xmi(t,e){if(t&1&&(h(0,"div",196),y(1),p()),t&2){let n=w(3);g(),Ke(" Preis wird automatisch auf ",n.customerPayed.toMoneyString()+" angehoben"," ")}}function bmi(t,e){if(t&1&&(h(0,"nxt-slide-toggle",82),y(1,"Nachstechen (Artist bekommt Geld)"),p()),t&2){let n=w(3);b("nxtFormControl",n.formGet("improveArtistShouldGetMoney"))}}function wmi(t,e){if(t&1&&ee(0,"nxt-input",197),t&2){let n=w(3);b("isMoney",!0)("nxtFormControl",n.formGet("shouldDepositBackValue"))}}function Smi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),Ce(3,"nxtDate"),p(),h(4,"td"),y(5),p(),h(6,"td"),y(7),Ce(8,"money"),Ce(9,"money"),p(),h(10,"td"),y(11),p()()),t&2){let n=e.$implicit;g(2),ye(Nt(3,5,n.t,"dd.MM.yyyy HH:mm")),g(3),ye(n.u),g(2),cn("",tt(8,8,n.from)," \u279E ",tt(9,10,n.to),""),g(4),ye(n.i)}}function Tmi(t,e){if(t&1&&(h(0,"div")(1,"table",198),W(2,Smi,12,12,"tr",171),p()()),t&2){let n=w(3);g(2),b("ngForOf",n.priceChanges)}}function Dmi(t,e){if(t&1){let n=re();h(0,"nxt-context-menu",null,4)(2,"button",201),F("click",function(){let r=V(n).$implicit,s=w(4);return B(s.deleteTattooTemplateClicked(r))}),h(3,"span"),y(4,"L\xD6SCHEN"),p()()(),h(5,"a",202)(6,"img",203),F("contextmenu",function(r){V(n);let s=pr(1);return B(s.show(r))}),p()()}if(t&2){let n=e.$implicit;g(5),b("href",n.src,Ur),Bn("data-pswp-width",n.width)("data-pswp-height",n.height),g(),b("src",n.src,Ur)}}function Emi(t,e){if(t&1&&(h(0,"mat-card",115)(1,"div",199),y(2,"Neue Vorlagen"),p(),h(3,"div",200),Kn(4,Dmi,7,4,null,null,Zhi),p()(),ee(6,"nxt-divider")),t&2){let n=w(3);g(4),Yn(n.newTattooTemplates())}}function Mmi(t,e){if(t&1&&(h(0,"div",205),ee(1,"nxt-input",208),p()),t&2){let n=w(4);g(),b("nxtFormControl",n.form.get("durationPriceInfo"))}}function kmi(t,e){if(t&1&&(h(0,"nxt-slide-toggle",82),y(1,"Absagenachweis erbracht "),p()),t&2){let n=w(5);b("nxtFormControl",n.form.get("canceledApproved"))}}function Imi(t,e){if(t&1&&(h(0,"div",206),W(1,kmi,2,1,"nxt-slide-toggle",209),ee(2,"nxt-input",210),p()),t&2){let n=w(4);g(),b("ngIf",!n.form.get("canceledInTime").value),g(),b("nxtFormControl",n.form.get("canceledReason"))}}function Ami(t,e){if(t&1&&(h(0,"nxt-col",206),ee(1,"nxt-input",211),p()),t&2){let n=w(4);g(),b("nxtFormControl",n.form.get("noDepotNecessaryReason"))}}function Pmi(t,e){if(t&1){let n=re();h(0,"div",207),ee(1,"nxt-date-picker",212),h(2,"div",213)(3,"nxt-button",214),F("click",function(){V(n);let r=w(4);return B(r.setDepotDueDate(0))}),y(4,"Heute"),p(),h(5,"nxt-button",214),F("click",function(){V(n);let r=w(4);return B(r.setDepotDueDate(1))}),y(6,"+1 Tag"),p(),h(7,"nxt-button",214),F("click",function(){V(n);let r=w(4);return B(r.setDepotDueDate(2))}),y(8,"+2 Tage"),p(),h(9,"nxt-button",214),F("click",function(){V(n);let r=w(4);return B(r.setDepotDueDate(3))}),y(10,"+3 Tage"),p()()()}if(t&2){let n=w(4);g(),b("nxtFormControl",n.form.get("depotDueDate")),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("smallButton",!0)}}function Rmi(t,e){if(t&1&&(h(0,"div",206),ee(1,"nxt-autocomplete",215,0),Ce(3,"nxtDate"),p()),t&2){let n=w(4);g(),b("placeholder","Warum kommt die Kaution erst am "+(n.form.get("depotDueDate").value?Nt(3,4,n.form.get("depotDueDate").value,"dd.MM.yyyy"):""))("maxOptionsToShow",999)("nxtFormControl",n.form.get("depotDueDateReason"))("filterFields",bn(7,AQe))}}function Fmi(t,e){if(t&1&&(h(0,"mat-card",115)(1,"div",153),y(2,"9. Sonstiges"),p(),h(3,"div",204),W(4,Mmi,2,1,"div",205)(5,Imi,3,2,"div",206)(6,Ami,2,1,"nxt-col",206)(7,Pmi,11,5,"div",207)(8,Rmi,4,8,"div",206),p()()),t&2){let n=w(3);g(4),Je(n.showDurationPriceInfo?4:-1),g(),Je(n.isCanceled?5:-1),g(),Je(n.form.get("noDepotNecessary").value?6:-1),g(),Je(n.showDepositDueDate?7:-1),g(),Je(n.showDepositDueDate?8:-1)}}function Lmi(t,e){if(t&1&&ee(0,"nxt-divider",52),t&2){let n=w(3);b("height",n.cardSpace)}}function Omi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w(4);return B(r.sendSelectedEventFilesClicked())}),h(1,"div",115)(2,"mat-icon"),y(3,"share"),p(),h(4,"span",221),ee(5,"div",107),Ce(6,"safeHtml"),h(7,"div"),y(8),p()()()(),h(9,"button",201),F("click",function(){V(n);let r=w(4);return B(r.sendEventFileToUnknownFolderClicked())}),h(10,"div",115)(11,"mat-icon"),y(12,"error"),p(),h(13,"span",221),ee(14,"div",107),Ce(15,"safeHtml"),h(16,"div"),y(17,"\xA0 \u279E nicht von diesem Termin"),p()()()()}if(t&2){let n=w(4);g(5),b("innerHTML",tt(6,3,n.selectedEventFileText()),Pi),g(3),Ke("\xA0an ",n.formGet("customer").value.givenName," schicken"),g(6),b("innerHTML",tt(15,5,n.selectedEventFileText()),Pi)}}function Nmi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.updatePhotoType2(r,"templatePhoto"))}),h(1,"span"),y(2,"\u279E VORLAGE"),p()()}}function Vmi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.updatePhotoType2(r,"stencilPhoto"))}),h(1,"span"),y(2,"\u279E STENCIL"),p()()}}function Bmi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.updatePhotoType2(r,"preTattooPhoto"))}),h(1,"span"),y(2,"\u279E VORHER"),p()()}}function zmi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.updatePhotoType2(r,"tattooPhoto"))}),h(1,"span"),y(2,"\u279E TATTOO"),p()()}}function Hmi(t,e){if(t&1&&(h(0,"a",232),Ce(1,"nxtEventFile"),ee(2,"img",233),Ce(3,"nxtEventFile"),p()),t&2){let n=w().$implicit,i=w(4);b("id",n.id)("href",tt(1,5,n.id),Ur),Bn("data-pswp-width",n.width)("data-pswp-height",n.height),g(2),b("src",Xf(3,7,n.id,!0,i.eventFileThumbReloadIndicator()),Ur)}}function Gmi(t,e){if(t&1){let n=re();h(0,"img",234),Ce(1,"nxtEventFile"),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.videoClicked(r))}),p()}if(t&2){let n=w().$implicit;b("src",Nt(1,1,n.id,!0),Ur)}}function Wmi(t,e){if(t&1){let n=re();h(0,"nxt-context-menu",null,6),W(2,Nmi,3,0,"button",222)(3,Vmi,3,0,"button",222)(4,Bmi,3,0,"button",222)(5,zmi,3,0,"button",222),h(6,"button",223),F("click",function(){let r=V(n).$implicit,s=w(4);return B(s.deletePhotoClicked2(r))}),h(7,"span"),y(8,"L\xD6SCHEN"),p()()(),h(9,"div",224),F("contextmenu",function(r){V(n);let s=pr(1);return B(s.show(r))}),h(10,"div",225)(11,"div",226),y(12),Ce(13,"nxtDriveFileSubType"),p(),h(14,"div",227),y(15),Ce(16,"nxtDate"),p()(),h(17,"div",228)(18,"div",229)(19,"div",230)(20,"nxt-checkbox",231),F("valueChange",function(r){let s=V(n).$implicit,o=w(4);return B(o.selectEventFileClicked(s,r))}),p()(),W(21,Hmi,4,11,"a",232)(22,Gmi,2,4,"img",233),p()()()}if(t&2){let n=e.$implicit,i=w(4);g(2),Je(n.subType.startsWith("template")?-1:2),g(),Je(n.subType.startsWith("stencil")?-1:3),g(),Je(n.subType.startsWith("preTattoo")?-1:4),g(),Je(n.subType.startsWith("tattoo")?-1:5),g(7),ye(tt(13,8,n.subType)),g(3),ye(Nt(16,10,n.fileCreatedAt||n.createdAt,"dd.MM.yy HH:mm")),g(5),b("value",!!i.selectedEventFiles()[n.id]),g(),Je(n.type==="image"?21:n.type==="video"?22:-1)}}function Umi(t,e){if(t&1){let n=re();h(0,"div",235)(1,"div",225)(2,"div",226),y(3),Ce(4,"nxtDriveFileSubType"),p(),h(5,"div",227),y(6),Ce(7,"nxtDate"),p()(),h(8,"div",236)(9,"div",237),F("click",function(){let r=V(n).$implicit,s=w(5);return B(s.consentClicked(r))}),h(10,"div"),y(11),p(),h(12,"div"),y(13),p(),h(14,"div"),y(15),p()(),h(16,"img",238),Ce(17,"nxtEventFile"),F("click",function(){let r=V(n).$implicit,s=w(5);return B(s.consentClicked(r))}),p()()()}if(t&2){let n=e.$implicit;g(),ki("red",!(n.consentData!=null&&n.consentData.correctPageCount)||!(n.consentData!=null&&n.consentData.hasAllCustomerSigns)||!(n.consentData!=null&&n.consentData.hasAllDates)),g(2),Ke("",tt(4,20,n.subType)," "),g(3),ye(Nt(7,22,n.fileCreatedAt||n.createdAt,"dd.MM.yy HH:mm")),g(4),ki("green-light",n.consentData==null?null:n.consentData.hasAllCustomerSigns)("red",!(n.consentData!=null&&n.consentData.hasAllCustomerSigns)),g(),Ke(" Unterschrift: ",n.consentData!=null&&n.consentData.hasAllCustomerSigns?"OK":"Fehlt"," "),g(),ki("green-light",n.consentData==null?null:n.consentData.hasAllDates)("red",!(n.consentData!=null&&n.consentData.hasAllDates)),g(),Ke(" Datum: ",n.consentData!=null&&n.consentData.hasAllDates?"OK":"Fehlt"," "),g(),ki("green-light",n.consentData==null?null:n.consentData.correctPageCount)("red",!(n.consentData!=null&&n.consentData.correctPageCount)),g(),Ke(" Seitenzahl: ",n.consentData!=null&&n.consentData.correctPageCount?"OK":"Falsch"," "),g(),b("src",Nt(17,25,n.id,!0),Ur)}}function jmi(t,e){if(t&1&&(h(0,"div",219),Kn(1,Umi,18,28,"div",235,aee),p()),t&2){let n=w(4);g(),Yn(n.eventConsents())}}function $mi(t,e){if(t&1){let n=re();h(0,"div",239)(1,"nxt-button",46),F("click",function(){V(n);let r=w(4);return B(r.linkEventFileFromClipboard())}),y(2,"Fotos einf\xFCgen"),p()()}}function Kmi(t,e){if(t&1){let n=re();h(0,"mat-card",115)(1,"div",115)(2,"nxt-context-menu",null,5),W(4,Omi,18,7),h(5,"button",201),F("click",function(){V(n);let r=w(3);return B(r.selectTattooEventFilesClicked())}),h(6,"mat-icon"),y(7,"check_box"),p(),h(8,"span"),y(9,"Tattoo Bilder und Videos markieren"),p()()(),h(10,"mat-icon",216),F("click",function(r){V(n);let s=pr(3);return B(s.show(r))}),y(11,"menu"),p(),h(12,"div",217)(13,"div",218),F("nxtPhotoSwipeOnEditClicked",function(r){V(n);let s=w(3);return B(s.eventFileEditClicked(r))}),Kn(14,Wmi,23,13,null,null,aee),p()(),W(16,jmi,3,0,"div",219),p(),W(17,$mi,3,0,"div",220),p()}if(t&2){let n=w(3);g(4),Je(n.selectedEventFileText()?4:-1),g(9),b("nxtPhotoSwipeShowEditIcon",!0),g(),Yn(n.eventFiles()),g(2),Je(n.eventConsents().length>0?16:-1),g(),b("ngIf",!n.isNewEvent)}}function Ymi(t,e){t&1&&(h(0,"div")(1,"div",242),y(2,"Fotos werden geladen..."),p()())}function qmi(t,e){if(t&1){let n=re();h(0,"div",244)(1,"div",249)(2,"nxt-button",214),F("click",function(){V(n);let r=w(5);return B(r.sendSelectedMediaClicked())}),ee(3,"div",107),Ce(4,"safeHtml"),y(5),ee(6,"br"),y(7,"schicken "),p(),h(8,"nxt-button",214),F("click",function(){V(n);let r=w(5);return B(r.sendPhotosToUnknownFolder())}),ee(9,"div",107),Ce(10,"safeHtml"),y(11," sind nicht von"),ee(12,"br"),y(13,"diesem Termin "),p(),h(14,"nxt-button",214),F("click",function(){V(n);let r=w(5);return B(r.resetSelectedMediaClicked())}),y(15,"Markierung"),ee(16,"br"),y(17,"aufheben"),p()()()}if(t&2){let n=w(5);b("nxtDynamicSize",!!n.selectedMediaText()),g(2),b("smallButton",!0),g(),b("innerHTML",tt(4,7,n.selectedMediaText()),Pi),g(2),Ke(" an ",n.formGet("customer").value.givenName,""),g(3),b("smallButton",!0),g(),b("innerHTML",tt(10,9,n.selectedMediaText()),Pi),g(5),b("smallButton",!0)}}function Zmi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w().$implicit,s=w(5);return B(s.updatePhotoType(r,"templatePhoto"))}),h(1,"span"),y(2,"\u279E VORLAGE"),p()()}}function Xmi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w().$implicit,s=w(5);return B(s.updatePhotoType(r,"stencilPhoto"))}),h(1,"span"),y(2,"\u279E STENCIL"),p()()}}function Qmi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w().$implicit,s=w(5);return B(s.updatePhotoType(r,"preTattooPhoto"))}),h(1,"span"),y(2,"\u279E VORHER"),p()()}}function Jmi(t,e){if(t&1){let n=re();h(0,"button",201),F("click",function(){V(n);let r=w().$implicit,s=w(5);return B(s.updatePhotoType(r,"tattooPhoto"))}),h(1,"span"),y(2,"\u279E TATTOO"),p()()}}function efi(t,e){if(t&1&&(h(0,"div",251),y(1),Ce(2,"nxtPhotoType"),Ce(3,"uppercase"),p()),t&2){let n=w().$implicit;g(),Ke(" ",tt(3,3,tt(2,1,n.type))," ")}}function tfi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",256),F("click",function(){V(n);let r=w().$implicit,s=w(5);return B(s.eventPhotoClicked(r))}),y(1,"play_circle_outline "),p()}}function ifi(t,e){if(t&1){let n=re();h(0,"nxt-context-menu",null,7),W(2,Zmi,3,0,"button",222)(3,Xmi,3,0,"button",222)(4,Qmi,3,0,"button",222)(5,Jmi,3,0,"button",222),h(6,"button",223),F("click",function(){let r=V(n).$implicit,s=w(5);return B(s.deletePhotoClicked(r))}),h(7,"span"),y(8,"L\xD6SCHEN"),p()()(),h(9,"div",250),F("contextmenu",function(r){V(n);let s=pr(1);return B(s.show(r))}),W(10,efi,4,5,"div",251),h(11,"div",252),y(12),Ce(13,"nxtDate"),p(),h(14,"div",253),W(15,tfi,2,0,"nxt-button-icon",254),h(16,"div",230)(17,"nxt-checkbox",231),F("valueChange",function(r){let s=V(n).$implicit,o=w(5);return o.selectMedia(s,r),B(o.selectedPhotosChanged())}),p()(),h(18,"a",202),ee(19,"img",255),p()()()}if(t&2){let n=e.$implicit,i=w(5);g(2),Je(n.filename.startsWith("template")?-1:2),g(),Je(n.filename.startsWith("stencil")?-1:3),g(),Je(n.filename.startsWith("preTattoo")?-1:4),g(),Je(n.filename.startsWith("tattoo")?-1:5),g(5),Je(n.type?10:-1),g(2),Ke(" ",Nt(13,12,n.createdTime,"dd.MM.yy HH:mm")," "),g(3),b("ngIf",n.mimeType.startsWith("video")),g(2),b("value",!!i.selectedMedia()[n.id]),g(),b("href",n.src,Ur),Bn("data-pswp-width",n.width)("data-pswp-height",n.height),g(),b("src",n.thumbnailLink,Ur)}}function nfi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",256),F("click",function(){V(n);let r=w().$implicit,s=w(5);return B(s.eventPhotoClicked(r))}),y(1,"play_circle_outline "),p()}}function rfi(t,e){if(t&1){let n=re();h(0,"div",247)(1,"div"),y(2,"VIDEO"),p(),h(3,"div",252),y(4),Ce(5,"nxtDate"),p(),h(6,"div",253),W(7,nfi,2,0,"nxt-button-icon",254),h(8,"mat-checkbox",257),F("change",function(r){let s=V(n).$implicit,o=w(5);return o.selectMedia(s,r.checked),B(o.selectedPhotosChanged())}),p(),h(9,"img",258),Ce(10,"safeUrl"),F("click",function(){let r=V(n).$implicit,s=w(5);return B(s.eventPhotoClicked(r))}),p()()()}if(t&2){let n=e.$implicit,i=w(5);g(4),ye(Nt(5,4,n.createdTime,"dd.MM.yy HH:mm")),g(3),b("ngIf",n.mimeType.startsWith("video")),g(),b("checked",i.selectedMedia()[n.id]),g(),b("src",tt(10,7,n.thumbnailLink),Ur)}}function sfi(t,e){t&1&&(h(0,"div",262),y(1,"\u2705"),p())}function ofi(t,e){t&1&&(h(0,"div",262),y(1,"unvollst\xE4ndig"),p())}function afi(t,e){if(t&1){let n=re();h(0,"div",261),W(1,sfi,2,0,"div",262)(2,ofi,2,0,"div",262),h(3,"div",263)(4,"div"),y(5,"EINWILLIGUNG"),p()(),h(6,"img",258),Ce(7,"safeUrl"),F("click",function(){V(n);let r=w(6);return B(r.openConsentClicked())}),p()()}if(t&2){let n=e.$implicit,i=w(6);g(),Je(i.consentOk()?1:2),g(5),b("src",tt(7,2,n.thumbnailLink),Ur)}}function lfi(t,e){if(t&1&&(h(0,"div",259),W(1,afi,8,4,"div",260),p()),t&2){let n=w(5);g(),b("ngForOf",n.pdfs)}}function cfi(t,e){if(t&1&&(h(0,"div",243),W(1,qmi,18,11,"div",244),h(2,"div",245),Kn(3,ifi,20,15,null,null,aee),p(),h(5,"div",246),Kn(6,rfi,11,9,"div",247,aee),p(),W(8,lfi,2,1,"div",248),p()),t&2){let n=w(4);g(),Je((n.selectedMediaText(),1)),g(2),Yn(n.images),g(3),Yn(n.videos),g(2),b("ngIf",n.pdfs.length>0)}}function dfi(t,e){if(t&1&&(h(0,"mat-card",116)(1,"div",240),W(2,Ymi,3,0,"div",69)(3,cfi,9,2,"div",241),p()()),t&2){let n=w(3);g(2),b("ngIf",n.photoFolderId&&!n.photosAndVideos),g(),b("ngIf",n.photoFolderId&&n.photosAndVideos&&(n.photosAndVideos.length>0||n.pdfs.length>0))}}function ufi(t,e){if(t&1){let n=re();h(0,"div",47)(1,"div",48),W(2,ypi,5,2,"mat-card",49),h(3,"mat-card",50)(4,"div",51),F("nxtOnMultiClick",function(){V(n);let r=w(2);return B(r.toggleForceSaveHack())}),y(5),p()()(),ee(6,"nxt-divider",52),h(7,"div",48)(8,"mat-card",53)(9,"div",54),W(10,_pi,7,6,"div",55),h(11,"div",56),ee(12,"nxt-input",57),p(),h(13,"div",56),ee(14,"nxt-input",58),p(),h(15,"div",59),ee(16,"nxt-input",60),p()(),h(17,"div",61),ee(18,"nxt-input",62),p(),W(19,bpi,4,2,"div",59),p()(),ee(20,"nxt-divider",52),h(21,"div",59)(22,"mat-card",63)(23,"div",64)(24,"div",65)(25,"nxt-autocomplete",66,0),F("noEntryEnter",function(r){V(n);let s=w(2);return B(s.customerEmptyEnter(r))})("newItem",function(r){V(n);let s=w(2);return B(s.customerEmptyEnter(r))}),p(),W(27,wpi,2,0,"nxt-button-icon",67),p(),h(28,"div",68),W(29,Spi,3,0,"div",69)(30,Tpi,2,0,"div",69),Ce(31,"async"),p(),ee(32,"div",70),Ce(33,"safeHtml"),W(34,Mpi,10,2,"nxt-col",71),p(),W(35,kpi,5,10,"div",72)(36,Npi,8,3,"div",73),p(),h(37,"mat-card",74),W(38,Bpi,3,1,"div",75),h(39,"div",76)(40,"div",77),ee(41,"nxt-date-picker-2",78),h(42,"nxt-time-picker",79),F("valueChange",function(r){V(n);let s=w(2);return B(s.timeFromChanged(r))}),p(),ee(43,"nxt-time-picker",80,1),p(),h(45,"div",81)(46,"nxt-slide-toggle",82),y(47," Keine Terminerinnerung "),p()()()()(),ee(48,"nxt-divider",52),h(49,"nxt-smooth-height",83)(50,"div",48)(51,"mat-card",84),W(52,zpi,2,4,"div",85),h(53,"div",86)(54,"div",87)(55,"div",88),ee(56,"nxt-autocomplete",89,2),h(58,"div",90)(59,"nxt-button-icon",91),F("click",function(){V(n);let r=w(2);return B(r.checkOtherAvailableArtist())}),y(60,"change_circle"),p(),W(61,Hpi,2,0,"nxt-button-icon",92),p()(),h(62,"div",93),W(63,Upi,5,7,"div",94),p(),W(64,jpi,6,8,"div",95),p(),h(65,"div",96)(66,"div",97)(67,"nxt-slide-toggle",82),y(68,"Fix"),p(),W(69,Kpi,3,2,"mat-button-toggle-group",98),p(),W(70,Ypi,3,4,"nxt-slide-toggle",99),p()()(),W(71,cmi,12,10)(72,hmi,10,4,"div",50)(73,fmi,10,4,"div",50),p()(),ee(74,"nxt-divider",52),h(75,"nxt-payments",100),F("valueChange",function(){V(n);let r=w(2);return B(r.paymentsChanged())})("printCustomerReceipt",function(r){V(n);let s=w(2);return B(s.printCustomerReceipt(r))}),p(),ee(76,"nxt-divider",52),h(77,"mat-card",101)(78,"div")(79,"div",102)(80,"div",103),W(81,Cmi,3,2,"div",104)(82,xmi,2,1,"div",105),h(83,"div",106),F("click",function(){V(n);let r=w(2);return B(r.showPriceModal())}),ee(84,"div",107),Ce(85,"calendarEventEditPriceText"),Ce(86,"safeHtml"),p()(),h(87,"div",108)(88,"div",109)(89,"nxt-slide-toggle",82),y(90,"Fixpreis"),p(),h(91,"nxt-slide-toggle",82),y(92,"Preis evtl. anpassen"),p()(),h(93,"div",109)(94,"nxt-slide-toggle",82),y(95,"Kaution nicht n\xF6tig"),p()(),h(96,"div",109)(97,"nxt-slide-toggle",110),y(98,"fastWalkIn"),p(),h(99,"nxt-slide-toggle",82),y(100,"Nachstechen"),p(),W(101,bmi,2,1,"nxt-slide-toggle",82),p()()()(),h(102,"div",111)(103,"nxt-slide-toggle",82),y(104,"offene R\xFCckzahlung"),p(),W(105,wmi,1,2,"nxt-input",112),p(),W(106,Tmi,3,1,"div",69),p(),ee(107,"nxt-divider",52),W(108,Emi,7,0)(109,Fmi,9,5,"mat-card",113)(110,Lmi,1,1,"nxt-divider",114)(111,Kmi,18,4,"mat-card",115)(112,dfi,4,2,"mat-card",116),p()}if(t&2){let n,i,r,s=w(2);b("formGroup",s.form),g(2),Je(s.originalEvent().ratingValue?2:-1),g(2),mo("color",s.forceSaveHack?"red":""),b("nxtMultiClick",3),g(),Ke("",s.form.get("title").value?s.form.get("title").value:"\xA0"," "),g(),b("height",s.cardSpace),g(3),b("fxLayoutGap",s.controlGap),g(),b("ngIf",s.followUp),g(2),b("nxtFormControl",s.form.get("info"))("noPadding",!0),g(2),b("nxtFormControl",s.form.get("importantInfo"))("noPadding",!0),g(2),b("nxtFormControl",s.form.get("invoiceNumber"))("noPadding",!0),g(2),b("nxtFormControl",s.form.get("problems")),g(),Je(-1),g(),b("height",s.cardSpace),g(5),b("displayWith",s.calendarEventEditDisplayFn.displayFn)("displayInOptionWith",s.calendarEventEditDisplayFn.displayCustomerOptionFn)("nxtFormControl",s.form.get("customer"))("filterFields",bn(120,IQe))("showClearIcon",!0)("useFuseSearch",!0)("maxOptionsToShow",50)("customSearchAsyncFn",s.customerSearch)("dateControlIfFirstCharDigit",!0),g(2),b("ngIf",s.form.get("customer").value&&s.form.get("customer").value.id),g(2),b("ngIf",s.showAddCustomer),g(),b("ngIf",tt(31,112,s.cacheService.parsedContacts).length>0),g(2),b("innerHTML",tt(33,114,s.customerText),Pi),g(2),Je(s.form.get("customer").value?34:-1),g(),Je(s.showCustomerRef()?35:-1),g(),b("ngIf",s.customerHasMoreEvents),g(2),b("ngIf",s.durationText),g(3),b("readonly",s.isCanceled)("nxtFormControl",s.form.get("date"))("noPadding",!0),g(),b("readonly",s.isCanceled)("getText",s.getTimeChooserText)("noPadding",!0)("nxtFormControl",s.form.get("timeFrom")),g(),b("readonly",s.isCanceled)("minTime",s.form.get("timeFrom").value)("getText",s.getTimeChooserText)("noPadding",!0)("nxtFormControl",s.form.get("timeTill"))("showHourCounter",!0),g(3),b("nxtFormControl",s.formGet("noAppointmentReminder")),g(2),b("height",s.cardSpace),g(),b("trigger",s.artistSmoothHeightTrigger),g(3),Je(s.forceSaveHack?52:-1),g(4),b("displayWith",s.calendarEventEditDisplayFn.displayArtistCalendar)("displayInOptionWith",s.displayArtistCalendarOption)("options",s.artists)("nxtFormControl",s.form.get("artist"))("filterFields",bn(121,Jhi))("showClearIcon",!0)("useFuseSearch",!0)("maxOptionsToShow",30)("bottomNoPadding",!0),g(2),b("ngStyle",sn(122,epi,s.form.get("artist").value?"9px":"2px")),g(3),Je(!((n=s.form.get("artist").value)==null||n.invoiceData==null)&&n.invoiceData.name?61:-1),g(2),b("ngIf",(i=s.form.get("artist").value)==null||i.artistObj==null||i.artistObj.skills==null?null:i.artistObj.skills.speed),g(),b("ngIf",s.isCanceled&&s.formGetValue("canceledAt")),g(2),b("ngClass",sn(124,tpi,s.formGet("artistFix").value)),g(),b("nxtFormControl",s.formGet("artistFix")),g(2),Je(s.formGet("artistFix").value?69:-1),g(),b("ngIf",!1),g(),Je(s.form.get("workType").value==="tattoo"?71:s.form.get("workType").value==="piercing"?72:s.form.get("workType").value==="beauty"?73:-1),g(3),b("height",s.cardSpace),g(),b("formPayments",s.getFormPayments())("notAssignedPaypalTransactionsIn",s.notAssignedPaypalTransactionsIn)("notAssignedPaypalTransactionsOut",s.notAssignedPaypalTransactionsOut)("notAssignedKlarnaOrdersIn",s.notAssignedKlarnaOrdersIn)("notAssignedKlarnaOrdersOut",s.notAssignedKlarnaOrdersOut)("notAssignedBankTransactionsIn",s.notAssignedBankTransactionsIn)("notAssignedBankTransactionsOut",s.notAssignedBankTransactionsOut)("paymentTypes",s.possiblePaymentTypes)("paymentMethods",s.allPaymentMethods)("possiblePaymentMethods",s.possiblePaymentMethods)("possiblePaymentMethodsDepositBack",s.possiblePaymentMethodsDepositBack)("controlGap",s.controlGap)("priceEstimatedFrom",s.form.get("priceEstimatedFrom").value)("artistPercentage",s.form.get("artistPercentage").value)("eventDate",s.form.get("date").value)("eventIsClosed",s.form.get("closed").value)("eventCreateAt",s.originalEvent().createdAt)("isNewEvent",s.isNewEvent)("enableAddPayment",!s.paymentPayoutExist)("beforeAddPayment",s.beforeAddPayment)("discountPromotion",s.form.get("discountPromotion").value)("eventId",s.eventId)("forceSaveHack",s.forceSaveHack),g(),b("height",s.cardSpace),g(5),b("ngIf",s.form.get("discountPromotion").value&&((r=s.form.get("discountPromotion").value)==null?null:r.id)!=="none"),g(),b("ngIf",s.priceAutoChangedTo>0),g(2),b("innerHTML",tt(86,118,tt(85,116,s.form.getRawValue())),Pi),g(5),b("nxtFormControl",s.formGet("priceFix")),g(2),b("nxtFormControl",s.form.get("adjustPrice")),g(3),b("nxtFormControl",s.formGet("noDepotNecessary")),g(3),b("nxtFormControl",s.form.get("fastWalkIn")),g(2),b("nxtFormControl",s.formGet("improve")),g(2),Je(s.formGet("improve").value?101:-1),g(2),b("nxtFormControl",s.formGet("shouldDepositBack")),g(2),b("ngIf",s.formGet("shouldDepositBack").value),g(),b("ngIf",s.priceChanges&&s.priceChanges.length>0),g(),b("height",s.cardSpace),g(),Je(s.newTattooTemplates().length>0?108:-1),g(),b("ngIf",s.showDurationPriceInfo||s.form.get("noDepotNecessary").value||s.showDepositDueDate||s.isCanceled),g(),b("ngIf",s.showDurationPriceInfo||s.form.get("noDepotNecessary").value||s.showDepositDueDate||s.isCanceled),g(),Je(s.showOldPhotos()?112:111)}}function hfi(t,e){if(t&1&&(h(0,"div",264),ee(1,"div",107),Ce(2,"jsonFormatted"),p()),t&2){let n=w(2);g(),b("innerHTML",tt(2,1,n.originalEvent),Pi)}}function pfi(t,e){if(t&1){let n=re();h(0,"div",12)(1,"div",13),F("click",function(){V(n);let r=w();return B(r.hideAllToasts())}),W(2,spi,2,0,"div",14),h(3,"nxt-button-icon",15),F("click",function(){V(n);let r=w();return B(r.saveAndCloseDialog(!1))}),y(4,"save "),p(),W(5,opi,2,1,"nxt-button-icon",16)(6,api,2,0,"nxt-button-icon",17)(7,lpi,2,0,"nxt-button-icon",18)(8,cpi,2,0,"nxt-button-icon",19),h(9,"nxt-button-icon",20),F("click",function(){V(n);let r=w();return B(r.safeAndCloneEventClicked())}),y(10,"library_add "),p(),h(11,"nxt-button-icon",21),F("click",function(){V(n);let r=w();return B(r.showWhatsAppChat("customer"))}),y(12,"chat "),p(),W(13,dpi,1,1,"nxt-button-icon",22),h(14,"nxt-button-icon",23),F("click",function(){V(n);let r=w();return B(r.showHistoryClicked())}),y(15,"history "),p(),h(16,"nxt-button-icon",24),F("click",function(){V(n);let r=w();return B(r.shareEventClicked())}),y(17,"share "),p(),h(18,"nxt-button-icon",25),F("click",function(){V(n);let r=w();return B(r.copyEventToClipboardClicked())}),y(19,"content_copy "),p(),h(20,"nxt-button-icon",26),F("click",function(){V(n);let r=w();return B(r.showAppointmentConfirmationTextClicked())}),y(21,"forward "),p(),W(22,upi,2,0,"nxt-button-icon",27)(23,hpi,2,0,"nxt-button-icon",28)(24,ppi,2,0,"nxt-button-icon",29),h(25,"nxt-button-icon",30),F("click",function(){V(n);let r=w();return B(r.closeWithoutSaveClicked())}),y(26,"close "),p()(),W(27,mpi,3,0,"div",31),h(28,"div",32),W(29,ufi,113,126,"div",33),p(),W(30,hfi,3,3,"div",34),ee(31,"div",35),p()}if(t&2){let n=w();b("formGroup",n.form),g(),b("ngStyle",bn(15,Qhi)),g(),b("ngIf",n.changes().length>0),g(),b("onlyOneClick",!0),g(2),b("ngIf",!n.form.get("closed").value&&n.forceSaveHack),g(),b("ngIf",n.form.get("fastWalkIn").value&&!n.isNewEvent),g(),b("ngIf",n.isMallorca&&!1),g(),b("ngIf",!n.form.get("closed").value),g(5),b("ngIf",!n.isNewEvent),g(9),b("ngIf",!n.isNewEvent),g(),b("ngIf",!n.isNewEvent),g(),b("ngIf",n.forceSaveHack&&n.isJulian&&!n.isNewEvent),g(3),b("ngIf",!n.showContent&&n.showReloadEvent),g(2),b("ngIf",n.form&&n.form.get("customer")&&n.showContent),g(),b("ngIf",n.originalEvent&&n.showDebug)}}var kQe,J_e,Hhi,Ghi,Whi,Uhi,jhi,$hi,Khi,Yhi,qhi,Zhi,aee,Xhi,Qhi,IQe,Jhi,epi,tpi,ipi,npi,AQe,nu,n6=Q(()=>{me();Gi();qn();Ci();gu();$n();Jr();Ah();th();Ly();eje();tje();jc();a4();WA();Ld();Xge();Ep();MB();zn();nc();Yc();Bd();ije();jo();ef();$A();Ul();VX();kl();Nu();pa();tp();dT();i3();Vd();Zh();dz();LX();VN();BX();cve();xje();kQe=Gs(QI()),J_e=Gs(Jm());wje();hve();pve();DD();Tje();Rv();My();KX();Eje();kje();B1();P0();Il();YX();ha();mg();HX();s3();UA();oo();sg();Aje();aD();FX();Mp();ls();Vt();An();Zi();ri();il();Pje();go();r$e();Ph();xB();Lv();a3();i6();qA();_Z();s$e();aQ();Ja();e6e();Cl();sX();fx();k$e();I$e();hz();P$e();t6e();rP();Tz();jP();_Qe();PH();me();ji();qn();Kr();jl();yi();R7();Ci();SQe();gu();ma();w4();q_e();z1();nZ();BA();o1();Cs();GX();EQe();ug();oee();RA();vZ();K4e();An();Vt();Hhi=["customerSuggestionButton"],Ghi=["myTitleInput"],Whi=["nxtFormControlElemCustomer"],Uhi=["nxtFormControlElemArtist"],jhi=["nxtFormControlElemBodyPut"],$hi=["nxtFormControlEleLmDate"],Khi=["nxtFormControlElemTimeTill"],Yhi=["nxtFormControlElemDepotDueDateReason"],qhi=(t,e)=>e.value,Zhi=(t,e)=>e.messageId,aee=(t,e)=>e.id,Xhi=t=>({"nxt-page":t}),Qhi=()=>({margin:"0 20px"}),IQe=()=>["searchText"],Jhi=()=>["name"],epi=t=>({position:"relative",top:t}),tpi=t=>({"artist-fix-box":t}),ipi=t=>({cursor:t}),npi=t=>({red:t}),AQe=()=>[];nu=(()=>{let e=class e extends bt{get nxtPaymentsComponent(){return this._nxtPaymentsComponent}constructor(i,r,s,o,a,l,c,d,u,m,f,_,x,D,E,M,I,z,G,A,Y,X,ne,pe,ce,ie,le){super(),this.dialogRef=i,this.fb=r,this.loginService=s,this.permissionService=o,this.socketService=a,this.telegramService=l,this.cdRef=c,this.dialogService=d,this.thermalPrinterService=u,this.shortcutService=m,this.activatedRoute=f,this.clipboardService=_,this.routeService=x,this.bodyPutService=D,this.router=E,this.cdr=M,this.appointmentConfirmationService=I,this.contactService=z,this.cacheService=G,this.configService=A,this.windowService=Y,this.labelPrintService=X,this.clipboard=ne,this.walkInService=pe,this.reminderService=ce,this.workingDayService=ie,this.tattooTemplateService=le,this.originalFormRawValue={},this.showCustomerRef=gt(!1),this.consentOk=vr(()=>P5.hastCorrectPageCount2(this.originalEvent())),this.showOldPhotos=vr(()=>{if(this.originalEvent().id){if(this.originalEvent().start<"2024-09-01".dateParse()&&(!this.originalEvent().files||this.originalEvent().files.length===0))return!0;if((!this.originalEvent().files||this.originalEvent().files.length===0)&&this.originalEvent().mediaCount)return this.originalEvent().mediaCount.photo>0||this.originalEvent().mediaCount.video>0||this.originalEvent().mediaCount.pdf>0}}),this.availableArtistThisDate={},this.priceAutoChangedTo=null,this.isSafe=!1,this.nextNxtUpdateId="",this.availableSkills={skills:R0.skills,boolSkills:R0.boolSkills},this.showDebug2=!1,this.fixArtistReasonOptions=[{value:"",text:"Unbekannt"},{value:"design",text:"Design"},{value:"follow-up",text:"Folgetermin"},{value:"customer",text:"Kunde will"},{value:"partner",text:"Partner-Tattoo"}],this.originalEvent=gt(null),this.eventFiles=vr(()=>!this.originalEvent()||!this.originalEvent().files?[]:Sz.sortFiles(this.originalEvent().files.filter(Se=>Se.type!=="pdf"))),this.eventConsents=vr(()=>!this.originalEvent()||!this.originalEvent().files?[]:Sz.sortFiles(this.originalEvent().files.filter(Se=>Se.type==="pdf"))),this.customerHasMoreEvents=!1,this.restore=!1,this.isFromCalendarView=!1,this.pdf1Count=0,this.customerPayedMoreThanPriceEstimatedTill=0,this.customerPayedMoreThanPriceEstimatedFrom=0,this.customerPayed=0,this.shouldHaveSkill=!1,this.afterSaved=new nt,this.afterClosed=new nt,this.reOpened=!1,this.priceChanges=[],this.tattooPhotoCount=0,this.videoCount=0,this.photoFolderId="",this.photosAndVideos=[],this.images=[],this.videos=[],this.pdfs=[],this.fastWalkIn=!1,this.artists=[],this.eventIdIsInUrl=!1,this.motiveBlacklist=["fertig","machen","chat","session"],this.showDepositDueDate=!1,this.isCanceled=!1,this.showBackgroundColor=!1,this.forceSaveHack=!1,this.isJulian=this.loginService.isJulian(),this.onInitTimestamp=0,this.saveIsRunning=!1,this.changes=gt([]),this.eventFileThumbReloadIndicator=gt(""),this.showDurationPriceInfo=!1,this.customerText="",this.customerEvents=[],this.customerClosedEvents=[],this.customerCanceledEvents=[],this.createdToday=!1,this.calendarEventEditDisplayFn=OX,this.paymentPayoutExist=!1,this.displayLogArray=[],this.onNewContacts=new nt,this.lastSaved=0,this.showAddCustomer=!1,this.isEditContact=!1,this.isButtonChooserOpen=!1,this.isNewEvent=!1,this.newEventUuid="",this.disableFreeToggle=!1,this.durationText="",this.showDebug=!1,this.eventString="",this.eventUrl="",this.colorTools=xn,this.paymentSmoothHeightTrigger=0,this.artistSmoothHeightTrigger=0,this.priceFix=!1,this.showContent=!1,this.customerSuggestion=null,this.isNoArtistCalendar=!1,this.cardSpace="10px",this.formValueChangesSubscriptions=[],this.artistNotAvailableText="",this.showReloadEvent=!1,this.selectedMedia=gt({}),this.selectedEventFiles=gt({}),this.isMallorca=this.loginService.getStudio()==="Mallorca",this.controlGap="15px",this.saveAndCloseDialogRunning=!1,this.actionAfterSaved="",this.MobileTools=Kc,this.loadLog=new pz("loadEvent"),this.IconTools=Ir,this.isFirstCustomerEvent=!1,this.newTattooTemplates=gt([]),this.selectedMediaText=vr(()=>{let Se=[],je=0,ze=0,Ge=0;for(let Ae of oa(this.selectedMedia())){let Ye=this.selectedMedia()[Ae];Ye.type==="tattoo"&&je++,Ye.type==="stencil"&&ze++,Ye.type==="template"&&Ge++}return je===1?Se.push("1 Tattoo-Bild"):je>1&&Se.push(je+" Tattoo-Bilder"),ze===1?Se.push("1 Stencil"):ze>1&&Se.push(ze+" Stencil"),Ge===1?Se.push("1 Vorlage"):Ge>1&&Se.push(Ge+" Vorlagen"),Se.join(`
& `)}),this.selectedEventFileText=vr(()=>{let Se=[],je=oa(this.selectedEventFiles()).map(Ae=>this.selectedEventFiles()[Ae]),ze=je.filter(Ae=>Ae.type==="video").length,Ge=je.filter(Ae=>Ae.type==="image").length;return Ge===1?Se.push("1 Bild"):Ge>1&&Se.push(Ge+" Bilder"),ze===1?Se.push("1 Video"):ze>1&&Se.push(ze+" Videos"),Se.join(" & ")}),this.bodyPutCellRenderer=Se=>(Se=Se.filter(je=>je!=="on"),this.bodyPutService.getGermanPath(Se)),this.bodyPutPiercingCellRenderer=Se=>(Se=Se.filter(je=>je!=="on"),this.bodyPutService.getGermanPathBodyPutPiercing(Se)),this.bodyPutBeautyCellRenderer=Se=>this.bodyPutService.getBodyPutBeautyText(Se),this.getTimeChooserText=()=>Ie.format(this.form.get("date").value,"EEE dd.MM.yyyy")+"<br/>"+this.form.get("timeFrom").value+" - "+this.form.get("timeTill").value,this.customerSearch=(Se,je)=>O(this,null,function*(){return new Promise(ze=>O(this,null,function*(){xg.clear(this.searchTimeout),this.searchTimeout=setTimeout(()=>O(this,null,function*(){je?.length>=3?ze(yield this.socketService.findContactsWithEvents(je)):ze(["mind. 3 Zeichen"])}),500)}))}),this.beforeAddPayment=()=>{if(this.loginService.isReception()&&Ie.isToday(this.form.get("date").value)){let je=!1,ze=!1;if(this.form.get("bodyPutsTattoo").controls.forEach(Ge=>{Array.isArray(Ge.get("bodyPut").value)&&(Ge.get("bodyPut").value.includes("unknown")&&(je=!0),Vu.motiveOrBodyPutBlackList.some(Ae=>Ge.get("motive").value.toString().toLowerCase().includes(Ae.toLowerCase()))&&(ze=!0))}),je)return this.dialogService.showOk("Trage erst die K\xF6rperstelle ein!"),!1;if(ze)return this.dialogService.showOk("Trage erst das Motiv ein!"),!1}return!0},this.displayArtistCalendarOption=(Se,je)=>{let ze="?";return Se&&(ze=Se.calendarNumber+" "+Se.name),this.availableArtistThisDate[Se.name]&&(ze="\u2B50\uFE0F"+ze+"\u2B50\uFE0F"),je(ze)},this.pushSubscription=this.cacheService.artists.subscribe(Se=>{Se?.length>0&&(this.artists=[bf.getCancelArtist(),bf.getArtistOpenTattoo(),bf.getArtistOpenPiercing(),...Se.sortString("calendarNumber")])}),this.activatedRoute.snapshot.url.length>0&&this.activatedRoute.snapshot.url[0].path==="eventedit"&&(this.socketService.registerAsApp("Calendar"),setInterval(()=>this.windowService.setTitle("Kalender"),1e3)),window.location.href.includes("eventedit-from-calendar")&&this.registerCalendarViewer()}ngOnInit(){return O(this,null,function*(){this.onInitTimestamp=Date.now();let i="";try{i="0x001",this.subscribeSocketEvents(),i="0x002",zi.instance.send("setUsername",{username:this.loginService.getUsername(),studio:this.loginService.getStudio(),color:"#FFF"}),i="0x004",this.registerShortcutEvents(),document.body.style.backgroundColor="transparent !important",i="0x005",zi.instance.addRequestListener("startWalkIn",()=>O(this,null,function*(){zi.instance.showIframe("startWalkIn","Calendar"),(yield this.walkInService.startWalkIn(this))||zi.instance.hideIframe("startWalkIn")})),zi.instance.addRequestListener("showSearch",()=>O(this,null,function*(){zi.instance.showIframe("showSearch","Calendar");let r=this.dialogService.showComponentFull(I5);yield Sn(r.afterClosed()),this.dialogRef||zi.instance.hideIframe("showSearch")})),zi.instance.addRequestListener("getCalendarLogin",()=>O(this,null,function*(){return yield this.socketService.getCalendarPw()})),zi.instance.addRequestListener("usernameClicked",()=>{zi.instance.showIframe("usernameClicked","Calendar"),this.loginService.reLogin(!0)}),i="0x006",this.loadEventFromUrl(),this.discountPromotions$=this.cacheService.discountPromotions,i="0x007",this.routeService.setCurrentComponent(this)}catch(r){Gn.error(`calendar-event.edit ngOnInit failed
ErrorCode: `+i+`
`+r.message)}})}registerShortcutEvents(){this.shortcutSubscription&&this.shortcutSubscription.unsubscribe(),this.shortcutSubscription=this.shortcutService.onKeyPress.subscribe(i=>O(this,null,function*(){i===Pn.CtrlS?this.isEditContact?this.saveAndCloseEditContact():this.saveAndCloseDialog(!1).then():i===Pn.Esc?this.dialogRef||(this.isEditContact&&this.closeEditContact(),this.isButtonChooserOpen&&this.dialogService.closeButtonChooser()):i===Pn.Ctrl1||i===Pn.CtrlT||i===Pn.Alt1||i===Pn.Ctrl2||i===Pn.CtrlK||i===Pn.Alt2||i===Pn.Ctrl3||i===Pn.CtrlAUml||i===Pn.Alt3||i===Pn.Ctrl5||i===Pn.Alt5||i===Pn.Add||i===Pn.AltB||Pn.AltV}))}ngAfterViewInit(){}parseEventToForm(){return O(this,null,function*(){yield this.waitForArtistCalendars();let i=this.originalEvent();this.isNoArtistCalendar=!1,this.setIsCanceled(i.status==="canceled");let r=i.customer,s=i.customerRefId,o,a;r&&(o=yield this.socketService.getContactWithEvents(r.toString())),s&&(a=yield this.socketService.getContactWithEvents(s.toString())),this.showCustomerRef.set(!!s);let l=[],c=[],d=[];i.bodyPuts?.tattoo?.forEach(x=>{l.push(this.fb.group({bodyPut:new $t(x.bodyPut,[ii.requiredAndNotNaN]),motive:new $t(x.motive,[ii.requiredAndNotNaN]),round:new $t(x.round),thinLines:new $t(x.thinLines),size:new $t(x.size,this.isNewEvent?[ii.requiredAndNotNaN]:[])}))}),i.bodyPuts?.piercing?.forEach(x=>{d.push(this.fb.group({bodyPut:new $t(x.bodyPut,[ii.requiredAndNotNaN]),motive:new $t(x.motive,[ii.requiredAndNotNaN]),goldBall:new $t(!!x.goldBall)}))}),i.bodyPuts?.beauty?.forEach(x=>{c.push(this.fb.group({bodyPut:new $t(x.bodyPut,[ii.requiredAndNotNaN])}))});let u=i.payments;u||(u=[]);let m=[];for(let x of u){let D=new oA(x).getFormGroup(this.fb);D.get("paymentValue")?.disable(),D.get("paymentMethod")?.disable(),D.get("paymentType")?.disable(),D.get("paymentDate")?.disable(),D.get("paymentComment")?.disable(),D.get("paymentPaypalTransaction")?.disable(),D.get("paymentKlarnaOrder")?.disable(),D.get("paymentGiftCard")?.disable(),D.get("paymentBankTransaction")?.disable(),D.get("studio")?.disable(),D.get("studioReal")?.disable(),D.get("workplace")?.disable(),D.get("createdBy")?.disable(),m.push(D)}this.isSafe=i.visibility&&i?.visibility==="private",this.photoFolderId=i.photoFolderId,this.followUp=i.followUp,this.priceChanges=so(i.priceChanges)||[];let f=this.artists.find(x=>x.name===i.artist);i.status==="canceled"&&(f=this.artists.find(x=>x.name===bf.getCancelArtist().name)),Array.isArray(i.artistFixReason)||(i.artistFixReason&&i.artistFixReason.length>0&&typeof i.artistFixReason=="string"?i.artistFixReason=[i.artistFixReason]:i.artistFixReason=[]);let _=this.fb.group({title:new $t(i.title),info:new $t(i.info,[],"Info"),importantInfo:new $t(i.importantInfo,[],"Wichtige Info"),invoiceNumber:new $t(i.invoiceNumber,[],"Rechnungsnummer"),timeFrom:new $t(i.start.dateFormat("HH:mm"),[ii.requiredAndNotNaN],"Von"),timeTill:new $t(i.end.dateFormat("HH:mm"),[ii.requiredAndNotNaN],"Bis"),date:new $t(i.start.dateFormat("yyyy-MM-dd"),[ii.requiredAndNotNaN],"Datum"),customer:new $t(o,[ii.validCustomer,ii.requiredAndNotNaN],"Kunde"),customerRef:new $t(a,[],"Anderer Chat"),artist:new $t(f,[ii.requiredAndNotNaN,ii.hasProperty("name")],"Artist"),bodyPutsTattoo:this.fb.array(l),bodyPutsBeauty:this.fb.array(c),bodyPutsPiercing:this.fb.array(d),priceEstimatedFrom:new $t(i.priceEstimatedFrom,[ii.requiredAndNotNaN],"Preis"),priceEstimatedTill:new $t(i.priceEstimatedTill,[],"Preis"),payments:this.fb.array(m),closed:new $t(i.closed),artistPercentage:new $t(i.artistPercentage),priceFix:new $t(i.priceFix,[],"Fix Preis"),artistFix:new $t(i.artistFix,[],"Fix Artist"),artistFixReason:new $t(i.artistFixReason,[],"Grund fix Artist"),durationPriceInfo:new $t(i.durationPriceInfo,[],"Dauer Preis Grund"),noDepotNecessary:new $t(i.noDepotNecessary,[],"Keine Kaution n\xF6tig"),noDepotNecessaryReason:new $t(i.noDepotNecessaryReason,[],"Keine Kaution Grund"),depotDueDate:new $t(i.depotDueDate?(0,J_e.default)(i.depotDueDate):null,[]),depotDueDateReason:new $t(i.depotDueDateReason),discountPromotion:new $t(i.discountPromotion),noAppointmentReminder:new $t(i.noAppointmentReminder),improveArtistShouldGetMoney:new $t(i.improveArtistShouldGetMoney),improve:new $t(i.improve,[],"Nachstechen"),canceledApproved:new $t(i.canceledApproved),canceledReason:new $t(i.canceledReason,[],"Absagegrund"),canceledAt:new $t(i.canceledAt),canceledInTime:new $t(i.canceledInTime),adjustPrice:new $t(i.adjustPrice,[],"Preis evtl. anpassen"),fastWalkIn:new $t(i.fastWalkIn),fastWalkInNo:new $t(i.fastWalkInNo),shouldDepositBack:new $t(i.shouldDepositBack),shouldDepositBackValue:new $t(i.shouldDepositBackValue),shouldDepositBackCreatedAt:new $t(i.shouldDepositBackCreatedAt),promoOfferId:new $t(i.promoOfferId),promoOfferPromoterName:new $t(i.promoOfferPromoterName),promoOfferCreatedAt:new $t(i.promoOfferCreatedAt),workType:new $t(i.workType),problems:new $t(i.problems||""),disableSkillCheck:new $t(!!i.disableSkillCheck)});if(this.pdf1Count=i.pdf1Count,i.workType==="tattoo"?(this.skill=i.skill,this.skill||(this.skill={boolSkills:{},skills:{}})):this.skill=void 0,this.artistAssignedAt=i.artistAssignedAt,this.shouldHaveSkill=Ie.parse(i.createdAt)>"2023-03-03".dateParse(),!this.form)this.form=_;else for(let x of Object.keys(_.controls))if(x==="bodyPutsPiercing"){this.form.get(x).controls.length=0;for(let D of this.fb.array(d).controls)this.form.get(x).controls.push(D)}else if(x==="bodyPutsTattoo"){this.form.get(x).controls.length=0;for(let D of this.fb.array(l).controls)this.form.get(x).controls.push(D)}else if(x==="payments"){this.form.get(x).controls.length=0;for(let D of this.fb.array(m).controls)this.form.get(x).controls.push(D)}else try{this.form.get(x).setValue(_.controls[x].value)}catch(D){Gn.error("reset controls failed",D)}this.form?.get("title").disable(),this.permissionService.isJulian()||this.form?.get("invoiceNumber").disable(),this.registerFormValueChanged(),this.getAvailableArtistThisDay(),this.loadReminder(),setTimeout(()=>{this.registerFormControlChangeListener(),this.form.get("title").setValue(this.form.get("title").value),this.form.get("info").setValue(this.form.get("info").value),this.form.get("priceEstimatedFrom").setValue(i.priceEstimatedFrom),this.form.get("artistPercentage").setValue(i.artistPercentage),this.form.get("priceFix").setValue(i.priceFix),this.form.get("artistFix").setValue(i.artistFix),this.form.get("artistFixReason").setValue(i.artistFixReason),this.form.get("durationPriceInfo").setValue(i.durationPriceInfo),this.form.get("priceEstimatedTill").setValue(i.priceEstimatedTill),this.form.get("customer").setValue(this.form.get("customer").value),this.form.get("artist").setValue(this.form.get("artist").value),this.form.get("timeFrom").setValue(this.form.get("timeFrom").value),this.form.get("timeTill").setValue(this.form.get("timeTill").value),this.form.get("discountPromotion").setValue(this.form.get("discountPromotion").value),this.form.get("noDepotNecessary").setValue(i.noDepotNecessary),this.form.get("fastWalkIn").setValue(i.fastWalkIn),this.fastWalkIn=i.fastWalkIn,this.form.get("fastWalkInNo").setValue(i.fastWalkInNo);for(let x of l)x?.get("bodyPut").setValue(x.get("bodyPut").value),x?.get("motive").setValue(x.get("motive").value);for(let x of d)x?.get("bodyPut").setValue(x.get("bodyPut").value),x?.get("motive").setValue(x.get("motive").value);for(let x of m)x?.get("paymentValue").setValue(x.get("paymentValue").value),x?.get("paymentMethod").setValue(x.get("paymentMethod").value),x?.get("paymentPaypalTransaction").setValue(x.get("paymentPaypalTransaction").value),x?.get("paymentKlarnaOrder").setValue(x.get("paymentKlarnaOrder").value),x?.get("paymentGiftCard").setValue(x.get("paymentGiftCard").value);this.form&&m.length===0&&this.form.get("payments").setValue([]),this.checkPublicHoliday(),this.workTypeChanged(),this.setPossiblePaymentTypesAndMethods(),this.setIsCanceled(this.isCanceled),this.clearChanges(),setTimeout(()=>{this.checkLoadNewEventData(),this.refreshCustomerForm(),this.calcHasArtistPayment(),this.calcDepotDueDate(),this.checkNoDepotNecessaryReason(),this.calcCustomerText(),this.checkArtistAvailable(),setTimeout(()=>{this.calcArtistSkill(),this.generateTitle(),zi.instance.sendEval(P1.closeGoogleEvent),this.clearChanges()},200)},100)},100),this.reOpened=!1})}enableDurationPriceInfo(i){this.isCanceled&&(i=!1),this.form.get("durationPriceInfo").clearValidators(),i&&this.form.get("durationPriceInfo").setValidators([ii.requiredAndNotNaN]),this.form.get("durationPriceInfo").updateValueAndValidity({emitEvent:!1}),this.showDurationPriceInfo=i}checkShowAddCustomer(){this.showAddCustomer=typeof this.form?.get("customer").value=="string"&&this.form?.get("customer").value.length>3}loadEventFromUrl(){try{let i=this.activatedRoute.snapshot.paramMap?.get("eventId");i&&this.loadEvent({eventId:i})}catch(i){throw Error("calendar-event-edit loadEventFromUrl failed"+i.message)}}loadEvent(i){return O(this,null,function*(){this.loadLog=new pz("loadEvent"),this.loadLog.logAfter("START"),this.newEventData=null,this.resetCalendarEvent(),this.loadLog.logAfter("resetCalendarEvent"),this.showReloadEvent=!1,this.photosAndVideos=null,this.videos=null,this.images=null,this.calcCustomerText(),this.loadLog.logAfter("calcCustomerText"),this.showBackgroundColor=!0,this.fastWalkIn=!1;try{this.unRegisterFormControlChangeListener(),this.loadLog.logAfter("unRegisterFormControlChangeListener"),this.forceSaveHack=!1,zi.instance.send("setUsername",{username:this.loginService.getUsername(),studio:this.loginService.getStudio(),color:"#FFF"});let r=NX.new("LOAD-EVENT");this.unsavedImages=[],zi.instance.showIframe("calendar-event-edit loadEvent() start","Calendar"),i.eventId?this.loadEventLoadingTimeout=setTimeout(()=>{this.dialogService.showLoading(_n.CalendarEventEditLoading,"lade Termin...")},500):this.dialogService.showLoading(_n.CalendarEventEditLoading,"lade leeren Termin..."),this.loadLog.logAfter("showLoading"),setTimeout(()=>O(this,null,function*(){this.dialogService.updateLoadingText("lade Kunden..."),this.customerSuggestion=null,this.eventId=i.eventId,this.isNewEvent=!1,this.newEventUuid="";try{if(i.eventId==="new")this.isNewEvent=!0,this.originalEvent.set(Vu.getEmptyEvent(Ie.todayAt("22:00")));else if(i.calendarEvent)this.originalEvent.set(i.calendarEvent),this.originalEvent().workType||this.originalEvent.update(s=>St(ve({},s),{workType:"tattoo"}));else if(i.eventId)this.dialogService.updateLoadingText("lade Termin"),this.loadLog.logAfter("start getCalendarEvent2"),this.originalEvent.set(yield this.socketService.getCalendarEventWithCustomer(this.eventId)),this.loadLog.logAfter("end getCalendarEvent2");else{this.dialogService.updateLoadingText("empty event");let s=Ie.roundToNextMinute(Date.now,15),o=s+Qt.DURATION_1HOUR;this.originalEvent.set(Vu.getEmptyEvent(s,o)),this.isNewEvent=!0,this.newEventUuid=ua.generate(),i.newEventData?(this.eventId="new",this.newEventData=i.newEventData):this.newEventData=null}this.isNewEvent?this.fixArtistReasonOptions=[{value:"design",text:"Design"},{value:"follow-up",text:"Folgetermin"},{value:"customer",text:"Kunde will"},{value:"partner",text:"Partner-Tattoo"}]:this.fixArtistReasonOptions=[{value:"",text:"Unbekannt"},{value:"design",text:"Design"},{value:"follow-up",text:"Folgetermin"},{value:"customer",text:"Kunde will"},{value:"partner",text:"Partner-Tattoo"}],this.createdToday=Ie.isToday(this.originalEvent()?.createdAt),this.eventUrl=window.location.origin+"/e/"+this.originalEvent().id,this.eventString=Qn.stringifyFormat(this.originalEvent(),"&nbsp;&nbsp;&nbsp;"),this.loadLog.logAfter("start parseEventToForm"),yield this.parseEventToForm(),this.loadLog.logAfter("end parseEventToForm"),this.showContent=!0,this.loadLog.writeToLog(),this.registerTattooTemplates(),document.body.focus(),this.isNoArtistCalendar||zi.instance.showIframe("calendar-event-edit loadEvent() end","Calendar")}catch(s){this.log(`Laden des Termins nicht erfolgreich
`+Qn.stringify(s)),s?.errorId===v2.getCalendarEvent_IsAvailableArtist||(s?.errorId===v2.getCalendarEvent_EventIsFromPrimaryCalendar?this.dialogRef||zi.instance.hideIframe("calender-event is from primaray calenar"):s?.errorId?this.dialogService.showOk(yx.getMessage(s)):Gn.error(`CALENDAR-EVENT-EDIT
inner loadEvent fehlgeschlagen
event-id: `+this.eventId,s)),this.hideLoadingEventDialog();return}setTimeout(()=>{this.hideLoadingEventDialog(),this.cdr.detectChanges(),r.log(""),this.loadPhotos("load event"),this.clearChanges(),setTimeout(()=>{this.clearChanges()},200)},200)}),10)}catch(r){throw Error("calendar-event-edit loadEvent failed"+r.message)}})}save(i,r=0){return O(this,null,function*(){if(!this.forceSaveHack&&this.hasMotiveDescriptionWithoutSkill())return;this.log("start save"),this.isCanceled||(this.form?.get("canceledAt").setValue(null),this.form?.get("canceledInTime").setValue(!1));let s=this.form.getRawValue(),o=this.getFormPayments().getRawValue(),a=o.filter(I=>I.isNewPayment),l=this.originalEvent().payments.filter(I=>!o.some(z=>z.paymentUuid===I.paymentUuid));this.fixPaymentsBeforeSaveAndSetToCalendarEvent(o),this.log("new ExtendedCalendarEventProperties");let c=this.form.get("date").value,d=this.form.get("timeFrom").value,u=this.form.get("timeTill").value,m="",f={start:Ie.parse(Ie.format(c,"yyyy-MM-dd")+" "+d,"yyyy-MM-dd HH:mm"),end:Ie.parse(Ie.format(c,"yyyy-MM-dd")+" "+u,"yyyy-MM-dd HH:mm"),artistPercentage:s.artistPercentage,customer:s.customer,customerName:s.customer?.givenName+" "+s.customer?.familyName,artistName:s.artist?.name,artistCalendarNumber:parseInt(s.artist?.calendarNumber,10),fastWalkIn:!!this.form.get("fastWalkIn").value,studio:s.studio,priceEstimatedFrom:s.priceEstimatedFrom};f.end<f.start&&(f.end=Ie.addDays(f.end,1));let _=!1,x=!1;if((!this.originalEvent().start||this.originalEvent().start!==f.start)&&(_=!0),(!this.originalEvent().end||this.originalEvent().end!==f.end)&&(x=!0),this.saveIsRunning){this.telegramService.sendAdmin("Doppel speichern wird verhindert");return}if(this.log("start ok checks"),a.some(I=>I.paymentValue===0&&I.paymentType!=="payout")){yield this.dialogService.showOk("\u274CZahlung mit 0 Euro?\u274C");return}if(l.some(I=>I.paymentMethod==="cash"&&I.paymentType!=="payout"))if(this.loginService.isJulian()){if(yield this.dialogService.showYesNo("Bar-Zahlungen k\xF6nnen nicht gel\xF6scht werden!",{yesText:"OK",noText:"FORCE"}))return}else{this.dialogService.showOk("Bar-Zahlungen k\xF6nnen nicht gel\xF6scht werden!");return}if(!this.permissionService.hasPermission(Zt.CalendarEventEdit_canMoveEventEarlierThan3Days)&&this.dateIsChangedToShort()){yield this.dialogService.showOk("\u274CTermin kann nicht verschoben werden, 3 Tage-Regel. Termin kann nur auf Abgesagt gesetzen werden (Kaution wird einbehalten)!\u274C");return}if(i&&this.form.get("closed").value&&!this.forceSaveHack&&!this.reOpened&&o.some(I=>I.paymentType==="payout")){yield this.dialogService.showOk(`\u274CTermin kann nicht gespeichert werden!\u274C
Er ist bereits eine Arist-Auszahlung`);return}if(this.form.get("invoiceNumber").value&&!this.forceSaveHack){yield this.dialogService.showOk(`\u274CTermin kann nicht gespeichert werden!\u274C
Es existiert bereits eine Rechnung / Gutschrift`);return}if(this.hasNewPayments("cash")&&(yield this.isCashRegisterTodayClosed())&&!this.forceSaveHack){yield this.dialogService.showOk("Deine Kasse ist bereits geschlossen");return}if(f.start.dateFormatDate()===Ie.formatNowDate()&&this.loginService.isReception()&&a.length>0&&f.customer.birthday&&vx.getBirthdayInfo(f.customer.birthday.dateParse()).age<18&&this.dialogService.showOk("Achtung "+f.customer.givenName+" ist noch nicht 18 Jahre alt!"),f.start.dateFormatDate()!==Ie.formatNowDate()&&this.loginService.isReception()&&a.some(I=>["rest","total"].includes(I.paymentType))&&!(yield this.dialogService.showYesNo("Der Termin ist nicht heute, bist du dir Sicher das du diesen Termin meinst?",{noText:"Zur\xFCck",yesText:"Ja, Speichern!"}))||this.artistNotAvailableText&&s?.artist?.id!=="canceled"&&!(yield this.dialogService.showYesNo("Artist ist nicht verf\xFCgbar, trotzdem speichern?")))return;if(this.form.get("workType").value==="tattoo"){for(let I of s.bodyPutsTattoo)if(I.motive.toLowerCase().split(" ").find(z=>this.motiveBlacklist.includes(z))&&!(yield this.dialogService.showYesNo('Bist du dir sicher, dass "'+I.motive+'" eine genaue Motivbeschreibung ist?',{yesText:"Ja, das ist korrekt",noText:"Oh, das pass ich lieber nochmal an"})))return}if(!this.checkArtistBodyPutBlackList()||(this.log("checkArtistBodyPutBlackList"),!this.isNewEvent&&this.originalEvent().artistFix&&f.artistName!==this.originalEvent().artist&&!f.artistName.includes("ABGESAGT")&&!(yield this.dialogService.showYesNo("Du m\xF6chtest den Fix-Artist "+this.originalEvent().artist+" auf "+f.artistName+` \xE4ndern.
Bitte best\xE4tigen`,{yesText:"Ja, ist korrekt",noText:"Abbrechen"}))))return;if(!this.isNewEvent&&f.fastWalkIn&&this.originalEvent().startDateString!==f.start.dateFormat("yyyy-MM-dd")&&!this.forceSaveHack){yield this.dialogService.showOk("Datums\xE4nderung an einem Walk-In nicht m\xF6glich");return}if(!x&&this.customerPayedMoreThanPriceEstimatedTill>0&&a.length>0&&(yield this.dialogService.showYesNo("Du hast nachkassiert, musst du dann nicht auch das Ende anpassen?",{yesText:"Oh ja, ich passe es jetzt an",noText:"Nein "+u+" Uhr ist ok"}))||this.customerPayedMoreThanPriceEstimatedFrom>0&&a.length>0&&(m=yield this.dialogService.showInput({message:"Warum hast du nachkassiert?"}),!m)||!(yield this.checkPriceChangeBeforeSave(this.originalEvent().priceEstimatedFrom,f.priceEstimatedFrom))||a.some(I=>I.paymentType==="deposit-back"&&I.paymentValue>50)&&!this.loginService.isBackoffice()&&(yield this.dialogService.showYesNo("Eine R\xFCckzahlung gr\xF6\xDFer 50 \u20AC muss mit dem Shop-Manager abgesprochen sein",{yesText:"Nicht speichern und Zur\xFCck",noText:"Ist mit dem Shop-Manager abgesprochen"}))||(this.log("CalendarEventEdit_DisableFollowEventInfo"),this.customerEvents.filter(I=>I.eventId!==this.eventId&&I.start>f.start).length>0&&this.form.get("workType").value==="tattoo"&&!this.isNewEvent&&(this.permissionService.hasPermission(Zt.CalendarEventEdit_DisableFollowEventInfo)||(yield this.dialogService.showOk(`Der Termin hat mindestens einen Folgetermin!

Behalte im Auge wie weit der Artist heute kommt!`,{buttonText:"Ja, habe ich im Blick",title:"Folgetermin-Info"}))),f.artistCalendarNumber<990&&!(yield this.checkOverlap({eventId:this.eventId,start:f.start,end:f.end,artist:f.artistName,customerName:f.customerName})))||f.artistCalendarNumber<990&&!(yield this.checkNotAvailable({eventId:this.eventId,start:f.start,end:f.end,artist:f.artistName,customerName:f.customerName})))return;if(!this.isNewEvent&&this.loginService.isReception()&&parseInt(this.originalEvent().calendarNumber,10)>990&&f.artistCalendarNumber<990&&f.start.dateFormat("yyyy-MM-dd")===Ie.formatNowDate()){let I=f.start.dateFormat("HH:mm"),z=f.end.dateFormat("HH:mm"),G=f.end-f.start,A=Ie.formatNow("HH:mm"),Y=(Date.now()+G).dateFormat("HH:mm");if((yield this.dialogService.showYesNo("Du hast eben ein Artist zugewiesen, soll die Startzeit auf jetzt gesetzt werden?",{yesText:"Ja, auf "+A+" - "+Y+" Uhr setzen",noText:"Nein, bei "+I+" - "+z+" Uhr bleiben"}))&&(f.start=Ie.parse(Ie.formatNowDate()+" "+A+":00"),f.end=Ie.parse(Ie.formatNowDate()+" "+Y+":00"),f.end<f.start&&(f.end=Ie.addDays(f.end,1)),G<0)){let X="Artist offen -> "+f.artistName;X+=`
oldStartTime: `+I,X+=`
oldEndTime: `+z,X+=`
newStartTimeAfterArtistChange: `+A,X+=`
newEndTimeAfterArtistChange: `+Y,X+=`
duration: `+G,X+=`
durationMin: `+G/Qt.DURATION_1MINUTE,X+=`
`+pg.getLinkForEvent(this.eventId),this.socketService.sendTelegramAdmin(X)}}if(!(yield this.checkArtistSkillBeforeSave()))return;if(this.isNewEvent&&f.start+Qt.DURATION_1HOUR<Date.now()&&!this.forceSaveHack){this.dialogService.showOk(`Du kannst keinen Termin in die Vergangenheit anlegen,
bitte kontrolliere das Datum!`);return}if(!this.beforeSaveHook({newPayments:a,newCustomer:f.customer,newDateString:this.form.get("date").value}))return;this.isNewEvent||!this.configService.config.value.isFranchise&&Math.abs(this.originalEvent().artistPercentage-f.artistPercentage)>1&&this.originalEvent().workType==="piercing"&&this.telegramService.sendBackofficeHeads(this.loginService.getUsername()+` \xE4ndert die Artist-Prozente
`+this.originalEvent().artistPercentage+"% "+cr.arrowRight+" "+f.artistPercentage+`%
`+pg.getLinkForEvent(this.eventId)),yield this.checkShouldDeposit(),this.log("checkShouldDeposit"),this.saveIsRunning=!0;let E="Termin wird "+(this.isNewEvent?"angelegt":"gespeichert")+"...";r>0&&(E+=`

Versuch: `+r),this.dialogService.showLoading(_n.CalendarEventEditSave,E);let M;try{let I=so(this.originalEvent());I.title=this.form.get("title").value,I.start=f.start,I.end=f.end;let z="";this.form.get("depotDueDate").value&&(z=Ie.format(this.form.get("depotDueDate").value,"yyyy-MM-dd"));let G=this.prependFollowUpText(this.form.get("info").value,this.followUp);this.artistAssignedAt||(this.artistAssignedAt=0),this.artistAssignedAt===0&&f.artistCalendarNumber<990&&(this.artistAssignedAt=Date.now()),I.customer=this.form.get("customer")?.value?.id,I.customerRefId=this.form.get("customerRef")?.value?.id,I.priceEstimatedFrom=this.form.get("priceEstimatedFrom").value,I.priceEstimatedTill=this.form.get("priceEstimatedTill").value,I.closed=this.form.get("closed").value,I.artistPercentage=this.form.get("artistPercentage").value,I.info=G,I.importantInfo=this.form.get("importantInfo").value,I.invoiceNumber=this.form.get("invoiceNumber").value,I.priceFix=this.form.get("priceFix").value,I.artistFix=this.form.get("artistFix").value,I.artistFixReason=this.form.get("artistFixReason").value,I.durationPriceInfo=this.form.get("durationPriceInfo").value,I.noDepotNecessary=this.form.get("noDepotNecessary").value,I.noDepotNecessaryReason=this.form.get("noDepotNecessaryReason").value,I.depotDueDate=z,I.depotDueDateReason=this.form.get("depotDueDateReason").value,I.workType=this.form.get("workType").value,I.discountPromotion=this.form.get("discountPromotion").value,I.noAppointmentReminder=this.form.get("noAppointmentReminder").value,I.improveArtistShouldGetMoney=this.form.get("improveArtistShouldGetMoney").value,I.canceledApproved=this.form.get("canceledApproved").value,I.canceledReason=this.form.get("canceledReason").value,I.canceledAt=this.form.get("canceledAt").value,I.canceledInTime=this.form.get("canceledInTime").value,I.adjustPrice=this.form.get("adjustPrice").value,I.fastWalkIn=this.form.get("fastWalkIn").value,I.fastWalkInNo=this.form.get("fastWalkInNo").value,I.shouldDepositBack=this.form.get("shouldDepositBack").value,I.shouldDepositBackValue=this.form.get("shouldDepositBackValue").value,I.shouldDepositBackCreatedAt=this.form.get("shouldDepositBackCreatedAt").value,I.promoOfferPromoterName=this.form.get("promoOfferPromoterName").value,I.promoOfferCreatedAt=this.form.get("promoOfferCreatedAt").value||0,I.improve=!!this.form.get("improve").value,I.followUp=this.followUp,I.priceChanges=this.priceChanges,I.skill=this.skill,I.artistAssignedAt=this.artistAssignedAt,I.promoOfferId=this.form.get("promoOfferId").value,I.problems=this.form.get("problems").value,I.disableSkillCheck=!!this.form.get("disableSkillCheck").value,I.bodyPuts={tattoo:s.bodyPutsTattoo,piercing:s.bodyPutsPiercing},I.payments=[];for(let A of o){let Y=this.originalEvent().payments.find(X=>X.paymentUuid===A.paymentUuid);Y?I.payments.push(ve(ve({},Y),A)):I.payments.push(A)}if((o.length>0||I.noDepotNecessary)&&(I.depotDueDate="",I.depotDueDateReason=""),this.lastSaved=Date.now(),this.customerPayedMoreThanPriceEstimatedFrom>0&&a.length>0){if(I.priceEstimatedFrom=this.customerPayed,m||(m='automatisch:  "Preis bis" ausgereizt'),this.priceChanges.push({from:s.priceEstimatedFrom,to:this.customerPayed,t:Date.now(),u:this.loginService.getUsername(),i:m}),I.priceChanges=this.priceChanges,s.priceEstimatedTill&&s.priceEstimatedTill<this.customerPayed&&(I.priceEstimatedTill=null,s.priceEstimatedTill=null),s.discountPromotion&&s.discountPromotion.priceFixValue){let A=fn.roundMoney(s.artistPercentage*s.priceEstimatedFrom/100);I.artistPercentage=fn.round(A/this.customerPayed*100,5),s.artistPercentage=f.artistPercentage}s.priceEstimatedFrom=this.customerPayed,s.priceEstimatedFrom===s.priceEstimatedTill&&(I.priceEstimatedTill=null,s.priceEstimatedTill=null)}if(I.priceEstimatedFrom===I.priceEstimatedTill&&(I.priceEstimatedTill=null),I.artist=this.form.get("artist").value.name,I.nextNxtUpdateId=this.nextNxtUpdateId,this.isNewEvent){let A=yield this.socketService.upsertCalendarEvent2(I,this.newTattooTemplates(),this.nextNxtUpdateId);this.tattooTemplateService.clear(this.eventId),this.clearChanges(),this.eventId=A.id,A.fastWalkIn&&this.form.get("fastWalkInNo").setValue(A.fastWalkInNo),this.afterSaved.emit(A),this.afterClosed.emit({op:"created",newCalendarEvent:A}),A.fastWalkIn&&this.loginService.getStudio()!=="Staging"&&(this.dialogService.updateLoadingText("Walk-In-Nummer wird gedruckt"),yield this.printFastWalkInNo(A.fastWalkInNo,A.workType),this.isArtistOpen()&&this.configService.config.value.printSecondWalkInNoIfArtistOpen&&(yield this.printFastWalkInNo(A.fastWalkInNo,A.workType))),M=A}else{let A=yield this.socketService.upsertCalendarEvent2(I,this.newTattooTemplates(),this.nextNxtUpdateId);this.tattooTemplateService.clear(this.eventId),M=A,this.clearChanges(),this.afterSaved.emit(A),this.afterClosed.emit({op:"updated",newCalendarEvent:A})}if((this.isNewEvent||_||a.length>0||this.isCanceled)&&this.loginService.isBackoffice()&&(yield this.showAppointmentConfirmationText()),this.dialogService.hideLoading(_n.CalendarEventEditSave),this.isNewEvent&&this.loginService.isReception()&&this.form.get("fastWalkIn").value){let A=this.form.get("artist")?.value;A&&!bf.isArtistOpen(A.name)&&(yield this.printQrEvent(!1))}if(this.actionAfterSaved)switch(this.actionAfterSaved){case"print-qr":yield this.printQrEvent(!1);break;case"appointment-reminder":yield this.showAppointmentConfirmationText();break}}catch(I){this.saveIsRunning=!1,I.message.includes("Belegdrucker reagiert nicht")?this.thermalPrinterService.showChangeIp(I.message).then():Gn.error(I)}return this.dialogService.hideLoading(_n.CalendarEventEditSave),this.saveIsRunning=!1,this.eventId&&(this.showReloadEvent=!0),M})}closeWithoutSaveClicked(){return O(this,null,function*(){if(this.changes().length>0){let i="- "+this.changes().join(`
- `);(yield this.dialogService.showYesNo(`\xC4nderungen gehen verloren, wirklich ohne Speichern schlie\xDFen?

Deine \xC4nderungen:
`+i,{yesText:"Ohne Speichern schlie\xDFen",noText:"Zur\xFCck"}))&&this.close(!0)}else this.close(!0)})}close(i){return O(this,null,function*(){this.closeEditContact(),this.dialogRef||zi.instance.hideIframe("calendar-event-edit close"),this.showContent=!1,zi.instance.sendEval(P1.closeGoogleEvent),this.dialogRef?.close(),i&&this.afterClosed.emit({op:"canceled"});try{this.eventIdIsInUrl&&window.close()}catch{}})}hasMotiveDescriptionWithoutSkill(){let i=Vu.getMissingSkills(this.skill,this.form.get("bodyPutsTattoo").getRawValue(),this.availableSkills);if(i.length>0)return i.length===1?this.dialogService.showOk('Es steht "'+i[0]+'" in der Motiv-Beschreibung, der Stil ist aber nicht ausgew\xE4hlt!'):this.dialogService.showOk('Es steht "'+i.join(" & ")+'" in der Motiv-Beschreibung, die Stile sind aber aber nicht ausgew\xE4hlt!'),!0}saveAndCloseDialog(i,r=!0){return O(this,null,function*(){if(this.saveAndCloseDialogRunning)return;this.saveAndCloseDialogRunning=!0;let s=!1,o=Is.getErrors(this.form);if(o.push(...this.getAdditionalErrors()),this.forceSaveHack&&(o=o.filter(a=>a!=="skill")),o.length>0){let a=`Na, hast du nicht was vergessen einzutragen?

`+this.getErrorText(o);yield this.dialogService.showOk(a,{title:"Fehlende Eingaben!"}),this.saveAndCloseDialogRunning=!1;return}else i?(yield this.checkForCloseEvent())&&(yield this.dialogService.showYesNo("Termin abschlie\xDFen?",{yesText:"Ja, Termin abschlie\xDFen"}))&&this.checkBeforeClose()&&(this.form.get("closed").setValue(!0),s=!0):s=!0;if(s){if(yield this.checkEnterCustomerBirthday()){this.saveAndCloseDialogRunning=!1;return}let a=yield this.save(!i);if(a)return this.dialogRef||zi.instance.hideIframe("calendar-event-edit saveAndClose"),this.showContent=!1,r&&(zi.instance.sendEval(P1.closeGoogleEvent),this.dialogRef?.close()),this.saveAndCloseDialogRunning=!1,a;this.saveAndCloseDialogRunning=!1;return}if(this.saveAndCloseDialogRunning=!1,!s)debugger})}editContact(){return O(this,null,function*(){this.showContactFormById(this.form.get("customer").value.id)})}closeEditContact(){this.editContactDialogRef&&this.editContactDialogRef.close(),this.isEditContact=!1}saveAndCloseEditContact(){this.editContactDialogRef.componentInstance.saveAndClose(),this.isEditContact=!1}toggleShowDebug(){return O(this,null,function*(){this.showDebug=!this.showDebug,this.showDebug?window.debug=!0:delete window.debug})}getFormPayments(){return this.form?.get("payments")}unRegisterFormControlChangeListener(){this.formValueChangesSubscriptions.forEach(i=>i?.unsubscribe())}registerFormControlChangeListener(){return O(this,null,function*(){yield this.waitForForm(),this.unRegisterFormControlChangeListener(),this.formValueChangesSubscriptions.length=0,this.formValueChangesSubscriptions.push(this.form.get("priceFix")?.valueChanges.subscribe(()=>{this.priceFix=this.form.get("priceFix")?.value;let i=this.formGetValue("discountPromotion");i&&(i.priceFix=this.priceFix)})),this.formValueChangesSubscriptions.push(this.form.get("timeFrom")?.valueChanges.subscribe(()=>{this.calcDurationText(),this.dateOrTimeOrPriceOrPaymentsChanged()})),this.formValueChangesSubscriptions.push(this.form.get("timeTill")?.valueChanges.subscribe(()=>{this.calcDurationText(),this.dateOrTimeOrPriceOrPaymentsChanged()})),this.formValueChangesSubscriptions.push(this.form.get("customer")?.valueChanges.subscribe(()=>{this.calcCustomerText(),this.checkShowAddCustomer(),this.calcIsFirstCustomerEvent(),this.isNewEvent})),this.formValueChangesSubscriptions.push(this.form.get("title")?.valueChanges.subscribe(()=>{this.checkShowAddCustomer()})),this.formValueChangesSubscriptions.push(this.form.get("date")?.valueChanges.subscribe(()=>{this.getAvailableArtistThisDay(),this.checkPublicHoliday(),this.dateOrTimeOrPriceOrPaymentsChanged(),this.calcDepotDueDate(),this.checkArtistAvailable()})),this.formValueChangesSubscriptions.push(this.form.get("priceEstimatedFrom").valueChanges.subscribe(i=>{this.dateOrTimeOrPriceOrPaymentsChanged(),this.priceEstimatedFromChanged(i)})),this.formValueChangesSubscriptions.push(this.form.get("artist").valueChanges.subscribe(i=>{if(typeof i=="string")return;let r=i?.id==="canceled";i?.workType!==this.form.get("workType").value&&!r&&this.form.get("workType").setValue(i?.workType),this.artistSmoothHeightTrigger=Math.random(),this.checkArtistAvailable(),this.setIsCanceled(i?.id==="canceled"),this.checkArtistBodyPutBlackList(),this.calcArtistSkill(),this.checkArtistEmployed()})),this.formValueChangesSubscriptions.push(this.form.get("noDepotNecessary").valueChanges.subscribe(()=>{this.checkNoDepotNecessaryReason()})),this.formValueChangesSubscriptions.push(this.form.get("depotDueDate")?.valueChanges.subscribe(()=>{})),this.formValueChangesSubscriptions.push(this.form.get("fastWalkIn")?.valueChanges.subscribe(i=>{let r=i&&this.isNewEvent;Is.setValidators(this.form.get("customer"),r?[]:[ii.validCustomer,ii.requiredAndNotNaN]),r&&this.form.get("workType").value==="piercing"&&this.form.get("priceEstimatedFrom").setValidators([ii.money]),this.form.get("priceEstimatedFrom").updateValueAndValidity({emitEvent:!1}),this.form.get("bodyPutsPiercing").controls.forEach(s=>{Is.setValidators(s.get("bodyPut"),r?[]:[ii.requiredAndNotNaN])})})),this.formValueChangesSubscriptions.push(this.form.get("shouldDepositBack").valueChanges.subscribe(i=>{this.shouldDepositBackChanged(i)})),this.formValueChangesSubscriptions.push(this.form.get("shouldDepositBackValue").valueChanges.subscribe(i=>O(this,null,function*(){this.isNewEvent?i&&this.form.get("shouldDepositBackCreatedAt").setValue(Date.now()):this.originalEvent().shouldDepositBackValue!==i&&this.form.get("shouldDepositBackCreatedAt").setValue(Date.now())}))),this.formValueChangesSubscriptions.push(this.form.get("workType").valueChanges.subscribe(()=>O(this,null,function*(){this.workTypeChanged()}))),this.formValueChangesSubscriptions.push(this.form.get("bodyPutsBeauty").valueChanges.subscribe(()=>O(this,null,function*(){debugger}))),this.formValueChangesSubscriptions.push(this.form.get("improve").valueChanges.subscribe(i=>O(this,null,function*(){i||this.form.get("improveArtistShouldGetMoney").setValue(!1)})))})}shouldDepositBackChanged(i){this.form&&(i?this.originalEvent().shouldDepositBack||this.form.get("shouldDepositBackValue").setValidators([ii.requiredAndNotNaN]):(this.form.get("shouldDepositBackValue").setValidators([]),this.form.get("shouldDepositBackValue").setValue(null)),this.form.get("shouldDepositBackValue").updateValueAndValidity({emitEvent:!1}))}checkPublicHoliday(){let i=this.form?.get("date").value;if(!i)return;let r=kv.getPublicHoliday(i,this.configService.config.value.invoiceData.fromRegion);r&&this.dialogService.showOk(`Feiertag!
`+Ie.format(i,"dd.MM.yyyy")+" ist "+r.name)}displayLog(i){this.displayLogArray.push("["+Ie.now.format("HH:mm:ss")+"] "+i),this.displayLogArray.length>10&&this.displayLogArray.shift()}bodyPutClick(i){return O(this,null,function*(){this.isButtonChooserOpen=!0;let r=yield this.bodyPutService.showBodyPutChooser();r&&this.getFormControlGroups("bodyPutsTattoo")[i].get("bodyPut").setValue(r),this.isButtonChooserOpen=!1})}bodyPutPiercingClick(i){return O(this,null,function*(){this.isButtonChooserOpen=!0;let r=yield this.bodyPutService.showBodyPutPiercingChooser();r&&this.getFormControlGroups("bodyPutsPiercing")[i].get("bodyPut").setValue(r),this.isButtonChooserOpen=!1})}bodyPutBeautyClick(i){return O(this,null,function*(){this.isButtonChooserOpen=!0;let r=yield this.bodyPutService.showBodyPutBeautyChooser();r&&this.getFormControlGroups("bodyPutsBeauty")[i].get("bodyPut").setValue(r),this.isButtonChooserOpen=!1})}getErrorText(i){let r={title:"Titel",customer:"Kunde",artist:"Artist",bodyPut:"K\xF6rperstelle",priceEstimatedFrom:"Preisabsprache ca. von",paymentComment:"Zahlungsinfo",noDepotNecessaryReason:"Warum ist keine Kaution n\xF6tig",date:"Datum",paymentPaypalTransaction:"w\xE4hle eine Paypal-Buchung aus",paymentValue:"Betrag fehlt",paymentKlarnaOrder:"w\xE4hle eine Klarna-Buchung aus",paymentGiftCard:"w\xE4hle einen Gutschein aus",paymentBankTransaction:"w\xE4hle eine Bank-Zahlung aus",tattooMotive:"Motiv",durationPriceInfo:"Warum passt der Preis zur Dauer nicht?",depotDueDate:"Wann kommt die Kaution",depotDueDateReason:"Warum kommt die Kation versp\xE4tet",canceledReason:"Warum wurde der Termin abgesagt?",shouldDepositBackValue:"Wie viel soll zur\xFCck gezahlt werden?",skill:"Stil",motive:"Motiv",size:"Gr\xF6\xDFe"};return"- "+i.map(s=>r[s]?r[s]:s).join(`
- `)}triggerPaymentHeight(){this.paymentSmoothHeightTrigger=Math.random()}paymentsChanged(){this.setChanged("neue Zahlung"),this.calcHasArtistPayment(),this.calcDepotDueDate(),this.triggerPaymentHeight(),this.checkNoDepotNecessaryReason(),this.dateOrTimeOrPriceOrPaymentsChanged(),this.getFormPayments().length>0&&(this.form.get("priceEstimatedFrom").setValidators([ii.money]),this.form.get("priceEstimatedFrom").updateValueAndValidity({emitEvent:!1}))}subscribeSocketEvents(){return O(this,null,function*(){this.pushSocketSubscription=this.socketService.subscribeNew("calendarEventChanged",i=>O(this,null,function*(){this.showContent&&!this.isNewEvent&&i.record.id===this.originalEvent().id&&this.nextNxtUpdateId!==i.record.nxtUpdateId&&(i.record.updatedBy===this.loginService.getUsername()?(this.dialogService.hideLoading(),this.reload()):i.record.updatedBy==="NewEventFile"?(this.originalEvent.update(r=>(r.files=i.record.files,r.seqId=i.record.seqId,r.nxtUpdateId=i.record.nxtUpdateId,ve({},r))),this.loadPhotos("NewEventFile").then(),this.eventFileThumbReloadIndicator.set(Date.now().toString())):(yield this.dialogService.showOk("Der Termin wurde zwischenzeitlich von "+i.record.updatedBy+` ge\xE4ndert
Deine \xC4nderungen gehen leider verloren`,{buttonText:"Termin neu laden"}),this.reload()))})),this.pushSocketSubscription=this.socketService.subscribeNew("newEventPhotoAvailable",i=>O(this,null,function*(){this.showContent&&i===this.eventId&&this.loadPhotos("newEventPhotoAvailable")})),this.pushSocketSubscription=this.socketService.subscribeNew("getNotAssignedBankTransactions",i=>{this.notAssignedBankTransactionsIn=i.filter(r=>r.direction==="in").sort(Hr.sortDate("createdAt",!0)),this.notAssignedBankTransactionsOut=i.filter(r=>r.direction==="out").sort(Hr.sortDate("createdAt",!0))},{emitInitial:!0}),this.pushSocketSubscription=this.socketService.subscribeNew("getNotAssignedPaypalTransactions",i=>{i=Hr.sort(i,"transactionTime",!0),this.notAssignedPaypalTransactionsIn=i.filter(r=>r.direction==="in"),this.notAssignedPaypalTransactionsOut=i.filter(r=>r.direction==="out")},{emitInitial:!0}),this.pushSocketSubscription=this.socketService.subscribeNew("getNotAssignedKlarnaOrders",i=>{i=Hr.sort(i,"createdAt",!0),this.notAssignedKlarnaOrdersIn=i.filter(r=>r.direction==="in"||!r.direction),this.notAssignedKlarnaOrdersOut=i.filter(r=>r.direction==="out")},{emitInitial:!0}),this.pushSocketSubscription=this.socketService.subscribeNew("setContactDataFromWhatsApp",i=>{this.addContactFromWhatsApp(i)},{emitInitial:!0}),this.pushSocketSubscription=this.socketService.subscribeNew("eventArtistChanged",i=>{this.form.get("artist")?.value?.id===i.record.id&&(this.form.get("artist").setValue(i.record),this.calcArtistSkill()),this.addContactFromWhatsApp(i)})})}checkBeforeClose(){if(this.form.get)return!0}generateTitle(){if(!this.form)return;let i=" | ",r="";this.form.get("fastWalkInNo").value&&(this.form.get("workType").value==="piercing"?r+=i+"#P"+this.form.get("fastWalkInNo").value:r+=i+"#"+this.form.get("fastWalkInNo").value);let s=this.form.get("customer").value;s?.givenName&&(r+=i+s.givenName+" "+s.familyName);let o=Xo.getPaymentSumByPaymentTypeControl(this.getFormPayments().controls,[Pv.Deposit]),a=Xo.getPaymentSumByPaymentTypeControl(this.getFormPayments().controls,Xo.customerPayedPaymentTypes);a-=Xo.getPaymentSumByPaymentTypeControl(this.getFormPayments().controls,[Pv.DepositBack]);let l=this.getFormPayments().controls.filter(_=>_.get("paymentType").value==="deposit"),c=this.getFormPayments().controls.filter(_=>_.get("paymentType").value===Pv.Complete);if(this.form.get("noDepotNecessary").value||c.length===0&&l.length===0&&this.form.get("priceEstimatedFrom").value>0&&(r+=i+" KAUTION FEHLT"),o>0)for(let _ of l)r+=i+" Kaution: "+Wn.toMoneyString(_.get("paymentValue").value,"\u20AC",!1)+" via "+Xo.getPaymentMethodText(_.get("paymentMethod").value);else l.length>1&&(r+=i+"keine Kaution n\xF6tig");let d=!!this.form.get("priceEstimatedFrom").value,u=!!this.form.get("priceEstimatedTill").value,m=0;if(this.form.get("priceEstimatedFrom").value&&(m=this.form.get("priceEstimatedFrom").value-a,m<0&&(m=0),r+=i+Wn.toMoneyString(m,u?"":"\u20AC",!1)),this.form.get("priceEstimatedTill").value){let _=this.form.get("priceEstimatedTill").value-a;m>0&&_>0?r+="-"+Wn.toMoneyString(_,"\u20AC",!1):r+=" \u20AC"}d&&(r+=" offen"),r=r.replace("| 0 \u20AC offen","| voll bezahlt"),this.form.get("priceEstimatedFrom").value===0?r+=i+"kostenlos":this.priceFix&&(r+=i+"Fixpreis");let f=this.formGetValue("discountPromotion");if(f&&f.id!=="none"&&(f.id==="custom"?r+=i+f.discountPercentage+"% Rabatt":r+=i+f.name),this.form.get("artistFix").value&&(r+=i+"fix Artist!"),this.form.get("workType").value==="tattoo")if(this.getFormControlGroups("bodyPutsTattoo").length===1){let _=!1,x=this.getFormControlGroups("bodyPutsTattoo")[0].get("motive").value,D=this.getFormControlGroups("bodyPutsTattoo")[0].get("bodyPut").value;if(D.length>0){let E=this.bodyPutService.getGermanPath(D);Es.isString(E)&&E.toLowerCase()!=="unbekannt"&&(_=!0,r+=i+x+" auf "+E)}!_&&x&&(r+=i+x)}else this.getFormControlGroups("bodyPutsTattoo").length>1&&(r+=i+"mehrere Motive");if(this.form.get("workType").value==="piercing")if(this.getFormControlGroups("bodyPutsPiercing").length===1){let _=this.getFormControlGroups("bodyPutsPiercing")[0].get("bodyPut").value;if(_.length>0){let x=this.bodyPutService.getGermanPathBodyPutPiercing(_);r+=i+"Piercing "+x}}else this.getFormControlGroups("bodyPutsPiercing").length>1&&(r+=i+" "+this.getFormControlGroups("bodyPutsPiercing").length+" Piercings");this.form.get("importantInfo").value&&(r+=i+"\u203C\uFE0F "+this.form.get("importantInfo").value+" \u203C\uFE0F"),this.form.get("adjustPrice").value&&(r+=i+"\u203C\uFE0F Preis evtl. anpassen \u203C\uFE0F"),this.form.get("info").value&&(r+=i+this.form.get("info").value),r.startsWith(i)&&(r=r.substring(3)),this.form.get("title").setValue(r,{emitEvent:!1})}checkForCloseEvent(){return O(this,null,function*(){return!0})}getEndFromForm(){let i=this.form.get("date").value,r=this.form.get("timeTill").value;return Ie.parse(Ie.format(i,"yyyy-MM-dd")+" "+r,"yyyy-MM-dd HH:mm")}getStartFromForm(){let i=this.form.get("date").value,r=this.form.get("timeFrom").value;return Ie.parse(Ie.format(i,"yyyy-MM-dd")+" "+r,"yyyy-MM-dd HH:mm")}calcHasArtistPayment(){this.paymentPayoutExist=this.getFormPayments()?.controls.filter(i=>i.get("paymentType").value==="payout").length>0}showAppointmentConfirmationText(){return O(this,null,function*(){let i=yield this.getAppointmentConfirmationText("de",this.isCanceled);if(i){let s=this.form.get("customer").value?.mobileFormatted,o=[{text:"Deutsch",value:"german"},{text:"Deutsch senden",value:"send-german"},{text:"Englisch",value:"english"},{text:"Englisch senden",value:"send-english"}];s||(o=o.filter(l=>!l.value.includes("send")));let a=yield this.dialogService.showButtons(i,{buttons:o});if(a.value.includes("english")&&(i=yield this.getAppointmentConfirmationText("en",this.isCanceled)),a.value.includes("send"))try{yield this.socketService.sendWhatsAppMessage(s,i)}catch(l){l.errorId?yield this.dialogService.showOk(l.message+`
Handynummer: `+s):yield this.dialogService.showOk("Fehler beim Senden an Handynummer: "+s),this.showAppointmentConfirmationText()}else this.clipboardService.copyToClipboard(i)}})}getAppointmentConfirmationText(i,r){return O(this,null,function*(){let s=Ie.parse(Ie.format(this.form.get("date")?.value,"yyyy-MM-dd")+" "+this.form.get("timeFrom")?.value,"yyyy-MM-dd HH:mm"),o=this.form.get("customer")?.value,a=this.getCurrentPayments().find(c=>c.paymentType==="deposit-back"),l=this.getCurrentPayments().filter(c=>c.paymentType==="deposit"&&c.paymentMethod!=="klarna").reduce((c,d)=>c+d.paymentValue,0);if(o?.givenName)return yield this.appointmentConfirmationService.getConfirmationText({customerName:o.fullName??"",start:s,appointmentType:this.form.get("workType")?.value,priceEstimatedFrom:this.form.get("priceEstimatedFrom")?.value,priceEstimatedTill:this.form.get("priceEstimatedTill")?.value,priceFix:this.form.get("priceFix").value,lang:i,canceled:r,depositBackValue:a?.paymentValue.toMoneyString(),depositBackMethod:Xo.getPaymentMethodText(a?.paymentMethod),depositPayed:l,discountPromotion:this.form.get("discountPromotion").value})})}typeof(i){return typeof i}showHistoryClicked(){return O(this,null,function*(){this.dialogService.showComponentFull(JA).componentInstance.setData(this.eventId)})}timeFromChanged(i){this.form.get("workType").value==="piercing"?this.setDurationPiercing():setTimeout(()=>{this.nxtFormControlElemTimeTill.inputClick()},100)}hideAllToasts(){}addCustomerTagline(){return O(this,null,function*(){let i=this.form.get("customer").value.id;yield this.contactService.showAddTaglineDialog(i)})}removeTagline(i){return O(this,null,function*(){if(yield this.dialogService.showYesNo(i+" entfernen?")){let s=this.form.get("customer").value.id,o=yield this.socketService.removeTaglineFromNxtContact({contactId:s,tagline:i})}})}refreshCustomerForm(){return O(this,null,function*(){if(this.form?.get("customer")?.value?.id){let i=yield this.socketService.getContactWithEvents(this.form?.get("customer")?.value?.id);i&&this.form.get("customer").setValue(i)}})}customerEmptyEnter(i){return O(this,null,function*(){this.addCustomerClicked()})}addCustomerClicked(){return O(this,null,function*(){let i={taglines:[],id:""},r=[],s=this.form.get("customer").value;typeof s=="string"&&(s&&(r=s.trim().split(" ")),r.length===1?i.givenName=cr.firstCharUppercase(r[0]):r.length===2?(i.givenName=cr.firstCharUppercase(r[0]),i.familyName=cr.firstCharUppercase(r[1])):r.length===3?r[1].toLowerCase().match(/van|von/g)?(i.givenName=cr.firstCharUppercase(r[0]),i.familyName=r[1]+" "+cr.firstCharUppercase(r[2])):(i.givenName=cr.firstCharUppercase(r[0])+" "+cr.firstCharUppercase(r[1]),i.familyName=cr.firstCharUppercase(r[2])):r.length===4&&(r[1].toLowerCase().match(/van|von/g)?r[2].toLowerCase().match(/der/g)?(i.givenName=cr.firstCharUppercase(r[0]),i.familyName=r[1]+" "+r[2]+" "+cr.firstCharUppercase(r[3])):(i.givenName=cr.firstCharUppercase(r[0]),i.familyName=r[1]+" "+cr.firstCharUppercase(r[2])):(i.givenName=cr.firstCharUppercase(r[0])+" "+cr.firstCharUppercase(r[1]),i.familyName=cr.firstCharUppercase(r[2]))),this.showContactForm(i))})}setPossiblePaymentTypesAndMethods(){this.allPaymentMethods=Xo.paymentMethods.sort(Hr.sortString("text")),this.possiblePaymentTypes=Xo.paymentTypes.filter(i=>i.eventBookable).sort(Hr.sortString("text")),this.isSafe?(this.possiblePaymentMethods=Xo.paymentMethods.filter(i=>!["none","paypal","klarna","bank","transfer","gift-card"].includes(i.value)).sort(Hr.sortString("text")),this.possiblePaymentMethodsDepositBack=Xo.paymentMethods.filter(i=>["none","paypal","klarna","bank","transfer","gift-card"].indexOf(i.value)===-1).sort(Hr.sortString("text"))):(this.possiblePaymentMethods=Xo.paymentMethods.filter(i=>["none","transfer"].indexOf(i.value)===-1).sort(Hr.sortString("text")),this.possiblePaymentMethodsDepositBack=Xo.paymentMethods.filter(i=>!["none","transfer","gift-card"].includes(i.value)).sort(Hr.sortString("text")))}getCurrentCustomerPaymentSum(){return Xo.getCustomerPayedSumFromPayments(this.getCurrentPayments())}getCurrentPayments(){return this.getFormPayments().controls.map(i=>i.getRawValue())}saveAndFollowUp(){return O(this,null,function*(){if(this.form.get("artistFix").value||(yield this.dialogService.showYesNo("Folgetermin ohne Artist-Fix?",{noText:"Ohne Artist-Fix weiter",yesText:"Oh vergessen, ja Artist-Fix"}))&&(this.form.get("artistFix").setValue(!0),this.form.get("artistFixReason").value.includes("follow-up")||this.form.get("artistFixReason").setValue([...this.form.get("artistFixReason").value,"follow-up"])),!this.followUp?.id){let r=yield this.dialogService.showInput({message:`Wie viele Termine sind es insgesamt?

ACHTUNG NEU
Du brauchst keine Infos mehr \xFCber Folgetermine in die Info eintragen, das passiert nun automatisch \u{1F389}
Hast du es bereits beim ersten Termin hier gemacht, klick auf Abbrechen und l\xF6sche es raus.`,isNumber:!0});if(r)this.followUp={total:r,id:ua.generate(),index:0,eventIds:[]};else return}let i=yield this.saveAndCloseDialog(!1,!1);if(i){let r=Vu.getEmptyEvent(),s=so(i);r.end=s.end,r.start=s.start,r.calendarNumber=s.calendarNumber,r.priceEstimatedFrom=s.priceEstimatedFrom,r.priceEstimatedTill=s.priceEstimatedTill,r.customer=s.customer,r.customerObj=s.customerObj,r.bodyPuts=s.bodyPuts,r.importantInfo=s.importantInfo,r.durationPriceInfo=s.durationPriceInfo,r.artistPercentage=s.artistPercentage,r.visibility=s.visibility,r.workType=s.workType,r.noAppointmentReminder=s.noAppointmentReminder,r.skill=s.skill,r.artistFix=s.artistFix,r.artistFixReason=s.artistFixReason,r.depotDueDate=s.depotDueDate,r.noDepotNecessaryReason=s.noDepotNecessaryReason,r.noDepotNecessary=s.noDepotNecessary,r.depotDueDateReason=s.depotDueDateReason,r.artist=s.artist,r.priceFix=s.priceFix;let o=St(ve({},this.followUp),{index:this.followUp.index+1,eventIds:[...this.followUp.eventIds,this.eventId]});r.info=this.prependFollowUpText(r.info,o),r.followUp=o,yield this.loadEvent({calendarEvent:r});let a=yield Sr.waitFor(()=>this.form.get("date").element,"saveAndFollowUp");this.form.get("date").setValue(null),a.click()}})}calcDurationText(){if(this.form){let i=Qt.parse(this.form.get("timeFrom").value),r=Qt.parse(this.form.get("timeTill").value);i>r&&(r+=Qt.DURATION_1DAY),this.durationText=Qt.format(r-i,"HH:mm")}}checkEnterCustomerBirthday(){return O(this,null,function*(){if(this.loginService.getWorkplace()==="reception"){let i=this.form.get("customer").value;if(i&&(!i.birthday||!i.mobile)&&this.getFormPayments().controls.find(r=>r.get("isNewPayment").value)){let r=[];if(i.birthday||r.push("Geburtstag"),i.mobile||r.push("Handy"),yield this.dialogService.showYesNo("Bitte trage "+r.join(" + ")+" des Kunden ein.",{yesText:"eintragen",noText:"ist gerade nicht m\xF6glich"}))return this.editContact(),!0;{let o="ask-again";for(;o==="ask-again";)o=(yield this.dialogService.showButtons(`Warum ist es nicht m\xF6glich?
Wenn der Kunde gerade bezahlt hat, dann frag ihn JETZT`,{buttons:[{text:"Ich bin zu faul ihn zu fragen",value:"ask-again"},{text:"Kunde ist nicht (mehr) im Haus",value:"out"},{text:"Oh ich kann ihn doch jetzt fragen",value:"do-it"}]})).value;if(o==="do-it")return this.editContact(),!0;this.socketService.sendTelegramStudioInfo(this.loginService.getUsername()+": Geburtstag von "+i?.givenName+" "+i.familyName+` eintragen nicht m\xF6glich
Kunde ist nicht (mehr) im Haus`)}}}return!1})}calcCustomerText(){let i=this.form?.get("customer").value;if(this.customerText="",this.customerClosedEvents=[],this.customerCanceledEvents=[],this.customerEvents=[],this.customerHasMoreEvents=!1,i){if(this.customerText=i.mobileFormatted,i.birthday){let r=Ie.parse(i.birthday),s=vx.getBirthdayInfo(r);this.customerText+="<br/>"+s.age+" Jahre  "+Ie.format(r,"dd.MM.yyyy"),s.daysToBirthday>-3&&s.daysToBirthday<=3&&(this.customerText+=" "+s.text)}this.customerClosedEvents=i.closedEvents,this.customerCanceledEvents=i.canceledEvents,this.customerEvents=i.events?i.events:[],this.customerEvents=this.customerEvents.sortNumber("start"),this.customerHasMoreEvents=this.customerClosedEvents&&this.customerClosedEvents.length>0||this.customerCanceledEvents&&this.customerCanceledEvents.length>0||this.customerEvents&&this.customerEvents.length>0}}showEvent(i){this.eventId!==i&&(this.loadEvent({eventId:i}),this.eventIdIsInUrl&&this.router.navigateByUrl("/e/"+i))}addContactFromTextString(){return O(this,null,function*(){let i=yield this.dialogService.showInput({message:"Hier Name & Geburtstag aus WhatsApp einf\xFCgen"});i&&this.addContactFromWhatsApp({mobile:"",clipboard:i})})}addContactFromWhatsApp(i){return O(this,null,function*(){if(this.form&&!this.formGetValue("customer")){let r={taglines:[],mobile:i.mobile,id:""};if(i.clipboard){let s=cr.getNameAttributesByText(i.clipboard);s.birthday&&(r.birthday=s.birthday.dateParse().dateFormat("dd.MM.yyyy")),s.postalCode&&(r.postalCode=s.postalCode),s.givenName&&(r.givenName=s.givenName),s.familyName&&(r.familyName=s.familyName)}else if(this.cacheService.parsedContacts.value.length===1){let s=this.cacheService.parsedContacts.value[0];r.givenName=s.parsedContact.givenName,r.familyName=s.parsedContact.familyName,!r.mobile&&s.parsedContact.mobile&&(r.mobile=s.parsedContact.mobile),r.birthday=s.parsedContact.birthday,r.postalCode=s.parsedContact.postalCode}r.mobile&&(r.mobile=r.mobile.replaceAll(" ","")),this.showContactForm(r)}})}showContactFormById(i){return O(this,null,function*(){let r=yield this.socketService.getContactById(i);this.showContactForm(r)})}showContactForm(i){return O(this,null,function*(){this.isEditContact=!0,this.editContactDialogRef=this.dialogService.showContactForm(i);let r=yield this.editContactDialogRef.afterClosed().toPromise();if(this.isEditContact=!1,r){this.form.get("customer").setValue(r);let s=this.onNewContacts.subscribe(()=>O(this,null,function*(){s.unsubscribe();let o=yield this.socketService.getContactWithEvents(r.id);this.form?.get("customer").setValue(o)}));return r}})}dateIsChangedToShort(){if(this.isNewEvent)return!1;let i=this.form?.get("date").value,r=this.form?.get("timeFrom").value,s=Ie.clearTime(Ie.parse(Ie.format(i,"yyyy-MM-dd")+" "+r,"yyyy-MM-dd HH:mm")),o=Ie.clearTime(Ie.parse(this.originalEvent().start));if(s!==o){let a=Ie.clearTime(Date.now()),l=0;for(;l<2;)a=Ie.addDays(a,1),m4.isWorkingDay(a,this.configService.config.value.invoiceData.fromRegion)&&l++;if(o<=a)return!0}}calcCustomerPayedMore(){if(this.customerPayedMoreThanPriceEstimatedTill=0,this.customerPayedMoreThanPriceEstimatedFrom=0,this.customerPayed=0,this.form){let i=this.form.get("priceEstimatedFrom").value,r=this.form.get("priceEstimatedTill").value;this.customerPayed=this.getCurrentCustomerPaymentSum(),this.priceAutoChangedTo=null,r&&this.customerPayed>r&&(this.customerPayedMoreThanPriceEstimatedTill=this.customerPayed-r,this.priceAutoChangedTo=this.customerPayed),this.customerPayed>i&&(this.customerPayedMoreThanPriceEstimatedFrom=this.customerPayed-i,r||(this.priceAutoChangedTo=this.customerPayed))}}dateOrTimeOrPriceOrPaymentsChanged(){if(this.calcCustomerPayedMore(),this.form){let i=this.form.get("priceEstimatedFrom").value,r=this.form.get("priceEstimatedTill").value,s=i+this.customerPayedMoreThanPriceEstimatedFrom;r&&(s=r+this.customerPayedMoreThanPriceEstimatedTill);let o=this.getEndFromForm()-this.getStartFromForm();o<0&&(o=this.getEndFromForm()+Qt.DURATION_1DAY-this.getStartFromForm());let a=F7.timeCheck(o,s),l=!1;this.form.get("discountPromotion").value&&this.form.get("discountPromotion").value.id!=="none"&&(l=!0);let c=l?130:100;o/Qt.DURATION_1HOUR>=3&&(c=l?200:150),Math.abs(a.calculatedPriceDiff)>c?this.enableDurationPriceInfo(!0):this.enableDurationPriceInfo(!1)}}reload(){this.loadEvent({eventId:this.eventId})}formGet(i){return this.form.get(i)}formGetValue(i){if(!this.form)throw Error("formGetValue zu fr\xFCh aufgerufen! ["+i+"]");return this.form.get(i).value}toggleForceSaveHack(){this.permissionService.hasPermission(Zt.CalendarEventEdit_SaveWithoutChecks)&&(this.form.get("closed").value&&!this.permissionService.hasPermission(Zt.Admin)?this.dialogService.showOk(`Der Termin ist bereits geschlossen
Somit w\xFCrdest du die Buchhaltung ver\xE4ndern, das geht nicht`):(this.permissionService.hasPermission(Zt.SuperAdmin)||this.socketService.sendTelegramAdmin(this.loginService.getUsername()+` benutzt den speicher-hack ohne SuperAdmin zu sein
`+pg.getLinkForEvent(this.eventId)),this.forceSaveHack=!this.forceSaveHack))}calcDepotDueDate(){if(this.form){let i=Ie.format(this.form.get("date").value,"yyyy-MM-dd");this.showDepositDueDate=this.getCurrentPayments().length===0&&this.form.get("priceEstimatedFrom").value>0&&!this.form.get("noDepotNecessary").value&&(i!==Ie.todayDateString||!this.createdToday)&&!this.isCanceled,Is.setValidators(this.form.get("depotDueDate"),this.showDepositDueDate?[ii.requiredAndNotNaN]:[]),Is.setValidators(this.form.get("depotDueDateReason"),this.showDepositDueDate?[ii.requiredAndNotNaN]:[])}}priceEstimatedFromChanged(i){requestAnimationFrame(()=>{this.calcDepotDueDate()}),Es.isNumber(i)&&(i===0?(this.form.get("noDepotNecessary").setValue(!0),this.form.get("noDepotNecessaryReason").setValue("kostenlos")):(this.form.get("noDepotNecessary").setValue(!1),this.form.get("noDepotNecessaryReason").value==="kostenlos"&&this.form.get("noDepotNecessaryReason").setValue("")))}showEventFinder(i){return O(this,null,function*(){let r=this.dialogService.showComponentFull(WX);if(i.pathName&&r.componentInstance.setWeekFromGoogleCalendar(i.pathName),i.fromDateString&&(r.componentInstance.fromDateString=i.fromDateString),i.fromTime&&(r.componentInstance.filters[0].startTime=i.fromTime),i.skills&&(r.componentInstance.currentSkillFilterObj=i.skills),i.boolSkills&&(r.componentInstance.currentBoolSkillFilterObj=i.boolSkills),yield r.componentInstance.loadData(),i.selectDurationOnStart&&!(yield r.componentInstance.selectDuration())){r.close(),this.close(!0);return}let s=yield Sn(r.afterClosed());if(s){if(this.form.get("date").setValue(s.event.date),this.form.get("timeFrom").setValue(s.event.timeFrom),this.form.get("timeTill").setValue(s.event.timeTill),s.skill&&(this.skill=s.skill),s.artist?.name){let o=this.artists.find(a=>a.name===s.artist.name);o&&this.form.get("artist").setValue(o)}requestAnimationFrame(()=>{this.calcArtistSkill()})}else this.close(!0)})}setDurationPiercing(){let i=this.form.get("timeFrom").value,r=Qt.format(Qt.parse(i)+Qt.DURATION_1MINUTE*15,"HH:mm");this.form.get("timeTill").setValue(r)}checkArtistAvailable(){return O(this,null,function*(){if(!this.form.get("date").value)return;this.artistNotAvailableText="";let i=this.form.get("artist").value;if(i?.name&&parseInt(i.calendarNumber,10)<990){let r=this.form.get("date").value,s=yield this.socketService.isArtistAvailable(i.name,Ie.parseFormat(r,"yyyy-MM-dd"));i.name.toLowerCase().includes("piercing")||(s==="NOT_AVAILABLE"?this.isCanceled||(this.artistNotAvailableText=" (NICHT VERF\xDCGBAR)"):s==="WALK_IN"&&(this.artistNotAvailableText=" (WALK IN)"))}})}showWhatsAppChat(i){return O(this,null,function*(){let r=this.form.get(i).value;if(!r)yield this.dialogService.showOk("Du hast noch keinen Kunden ausgew\xE4hlt");else{let s=this.form.get("bodyPutsTattoo").getRawValue(),o=[...oa(this.skill.skills).filter(a=>this.skill.skills[a]),...oa(this.skill.boolSkills).filter(a=>this.skill.boolSkills[a])];this.contactService.showWhatsAppChat(r,this.form.get("artist").value,{eventId:this.originalEvent()?.id||"new",bodyPutsTattoo:s,skills:o})}})}setBodyPutRequired(i,r){r&&this.getFormControlGroups(i).length===0&&this.addBodyPut(i),this.getFormControlGroups(i).forEach(s=>{requestAnimationFrame(()=>{s.get("bodyPut").setValidators(r?[ii.requiredAndNotNaN]:[]),s.get("bodyPut").updateValueAndValidity({emitEvent:!1}),s.get("motive").setValidators(r&&i==="bodyPutsTattoo"?[ii.requiredAndNotNaN]:[]),s.get("motive").updateValueAndValidity({emitEvent:!1}),i==="bodyPutsTattoo"&&(s.get("size").setValidators(r&&i==="bodyPutsTattoo"&&this.isNewEvent?[ii.requiredAndNotNaN,ii.custom(this.checkBodyPutSize.bind(this))]:[]),s.get("size").updateValueAndValidity({emitEvent:!1}))})})}checkBodyPutSize(i){return i.toLowerCase()==="x"?"X ist keine g\xFCltige Gr\xF6\xDFe":""}clearBodyPuts(i){this.form.get(i).controls=[]}getFormControlGroups(i){return this.form.get(i).controls}addBodyPut(i,r={}){let s=this.fb.group({bodyPut:new $t(r.bodyPut??[],[ii.requiredAndNotNaN]),motive:new $t(r.motive??"",i==="bodyPutsTattoo"?[ii.requiredAndNotNaN]:[]),round:new $t(!!r.round),thinLines:new $t(!!r.thinLines),size:new $t(r.size??"",i==="bodyPutsTattoo"?[ii.requiredAndNotNaN]:[]),goldBall:new $t(!!r.goldBall)});s.valueChanges.subscribe(()=>this.setChanged("Motive oder K\xF6rperstelle ge\xE4ndert")),s.valueChanges.subscribe(()=>this.bodyPutChanged()),this.getFormControlGroups(i).push(s),this.registerFormValueChanged(),this.setChanged("neue K\xF6rperstelle")}removeBodyPut(i,r=-1){r===-1?this.getFormControlGroups(i).pop():this.getFormControlGroups(i).splice(r,1),this.setChanged("K\xF6rperstelle entfernt")}registerFormValueChanged(){requestAnimationFrame(()=>{this.formValueChangeSubscription?.unsubscribe(),this.formValueChangeSubscription=this.form.valueChanges.subscribe(i=>{let r=this.form.getRawValue();for(let s in r)["payments","title"].includes(s)||Sr.compare(r[s],this.originalFormRawValue[s])||this.setChanged(s)})})}workTypeChanged(){this.form.get("workType").value||this.form.get("workType").setValue("tattoo"),this.form.get("workType").value==="piercing"&&(this.skill={skills:{},boolSkills:{}}),this.setBodyPutRequired("bodyPutsTattoo",!1),this.setBodyPutRequired("bodyPutsPiercing",!1),this.form.get("workType").value==="tattoo"?(this.setBodyPutRequired("bodyPutsTattoo",!0),this.clearBodyPuts("bodyPutsPiercing"),this.clearBodyPuts("bodyPutsBeauty"),this.form.get("noDepotNecessaryReason").value==="Piercing"&&(this.form.get("noDepotNecessary").setValue(!1),this.form.get("noDepotNecessaryReason").setValue(""))):this.form.get("workType").value==="piercing"?(this.setBodyPutRequired("bodyPutsPiercing",!0),this.clearBodyPuts("bodyPutsTattoo"),this.clearBodyPuts("bodyPutsBeauty"),this.form.get("noDepotNecessary").setValue(!0),this.form.get("noDepotNecessaryReason").setValue("Piercing"),this.setDurationPiercing()):this.form.get("workType").value==="beauty"&&(this.setBodyPutRequired("bodyPutsBeauty",!0),this.clearBodyPuts("bodyPutsTattoo"),this.clearBodyPuts("bodyPutsPiercing"),this.form.get("noDepotNecessary").setValue(!0),this.form.get("noDepotNecessaryReason").setValue("Beauty"))}showPriceModal(){return O(this,null,function*(){if(this.form.get("workType").value==="beauty"&&(yield this.dialogService.showYesNo("Preis festlegen",{yesText:"Automatisch",noText:"Manuell"}))){this.autoPriceByBeauty();return}if(this.getCurrentPayments().some(s=>s.paymentType==="payout")&&!this.forceSaveHack){yield this.dialogService.showOk("Es gibt bereits eine Artist-Auszahlung!");return}let i=this.dialogService.showComponentDialog(Cje,{},{minWidth:"400px"});i.componentInstance.discountPromotion=this.formGetValue("discountPromotion"),i.componentInstance.price.set(this.formGetValue("priceEstimatedFrom")||null),i.componentInstance.artistPercentage=this.formGetValue("artistPercentage"),i.componentInstance.priceTill=this.formGetValue("priceEstimatedTill"),i.componentInstance.priceFixWithoutDiscountPromotion=this.formGetValue("priceFix"),i.componentInstance.currentPriceEstimatedFrom=this.formGetValue("priceEstimatedFrom"),i.componentInstance.isNewEvent=this.isNewEvent,i.componentInstance.eventCreatedAt=this.originalEvent().createdAt,i.componentInstance.eventId=this.eventId,i.componentInstance.artist=this.getArtistFromForm(),i.componentInstance.promoOfferId=this.formGetValue("promoOfferId"),i.componentInstance.promoOfferCreatedAt=this.formGetValue("promoOfferCreatedAt"),i.componentInstance.promoOfferPromoterName=this.formGetValue("promoOfferPromoterName"),i.componentInstance.discountPromotions=Sr.clone(this.discountPromotions$.value).filter(s=>!s.disabled);let r=yield Sn(i.afterClosed());if(r){r.discountPromotion.priceLike||this.form.get("priceFix").setValue(r.discountPromotion.priceFix),this.form.get("priceEstimatedTill").setValue(r.priceTill),r.discountPromotion.priceFix&&this.form.get("priceEstimatedTill").setValue(null),this.form.get("discountPromotion").setValue(r.discountPromotion),this.form.get("priceEstimatedFrom").setValue(r.price),r.artistPercentage>-1&&this.form.get("artistPercentage").setValue(r.artistPercentage),r.artistPercentage>-1&&this.form.get("artistPercentage").setValue(r.artistPercentage);let s="Termin bis max. 18 Uhr, danach neuer Termin!";this.form.get("importantInfo").value&&this.form.get("importantInfo").value.includes(s)&&this.form.get("importantInfo").setValue(this.form.get("importantInfo").value.replaceAll(s,"")),r?.discountPromotion?.additionalPayAfterEnd&&this.form.get("importantInfo").setValue(this.form.get("importantInfo").value+" "+s),this.form.get("promoOfferId").setValue(r.promoOfferId),this.form.get("promoOfferCreatedAt").setValue(r.promoOfferCreatedAt),this.form.get("promoOfferPromoterName").setValue(r.promoOfferPromoterName)}})}checkOverlap(i){return O(this,null,function*(){if(this.form.get("workType").value==="piercing")return!0;let r=setTimeout(()=>{this.dialogService.showLoading(_n.CalendarEventEditCheckOverlap,"Es wird gepr\xFCft, ob der Artist verf\xFCgbar ist...")},500),s=yield this.socketService.getOverlappedEvents(i),o=Ie.format(i.start,"dd.MM.yyyy HH:mm"),a=Ie.format(i.end,"HH:mm"),l=[];for(let c of s){let d=Ie.format(c.start,"HH:mm"),u=Ie.format(c.end,"HH:mm"),m=fn.round(c.overlapDuration/Qt.DURATION_1HOUR,1),f="";m<=.5?f=xn.Orange:f=xn.Red;let _='<a href="/#/e/'+c.id+'" target="_blank">anzeigen</a>',x='<div style="display: inline-block; color:'+f+'">Fehler:&nbsp;'+m+"&nbsp;Std.</div>";l.push(x+" | "+d+" - "+u+" | "+c?.customerObj?.givenName+" "+c?.customerObj?.familyName+" "+_)}if(l.length>0){let c=`Du willst anlegen:
`+o+" - "+a+" | "+i.customerName,d=i.artist+" ist bereits belegt!",u=c+`

Bereits angelegt:
`+l.join(`
`);return this.dialogService.hideLoading(_n.CalendarEventEditCheckOverlap),xg.clear(r),yield this.dialogService.showYesNo(u,{yesText:"Trotzdem speichern",noText:"Zur\xFCck",title:d})}return this.dialogService.hideLoading(_n.CalendarEventEditCheckOverlap),xg.clear(r),!0})}checkNotAvailable(i){return O(this,null,function*(){i.start.clearDate()>i.end.clearDate();let r=i.start.dateFormatDate(),s=yield this.socketService.getArtistSpotByArtistAndDate(i.artist,r,!1);if(!s)return!0;let o=[];if(s.workTimeWindows){let a=s.workTimeWindows.find(l=>l.dateString===r);a.start>i.start.clearDate()&&o.push(i.artist+" ist erst ab "+Qt.format(a.start,"HH:mm")+" verf\xFCgbar!"),a.end>0&&a.end<i.end.clearDate()&&o.push(i.artist+" ist nur bis "+Qt.format(a.end,"HH:mm")+" verf\xFCgbar!")}return o.length===0?!0:this.dialogService.showYesNo(o.join(`
`),{yesText:"Trotzdem speichern",noText:"Zur\xFCck",title:"\u2757Artist nicht verf\xFCgbar\u2757"})})}checkCancelReasonVisible(){if(this.form){let i=m4.addWorkingDays(Ie.clearTime(Date.now()),3,this.configService.config.value.invoiceData.fromRegion),r=Ie.clearTime(this.getStartFromForm());this.form.get("canceledReason").setValidators(this.isCanceled?[ii.requiredAndNotNaN]:[]),this.form.get("canceledReason").updateValueAndValidity({emitEvent:!1})}}setIsCanceled(i){if(i)this.form?.get("customer").setValidators([]),this.form?.get("customer").updateValueAndValidity({emitEvent:!1}),this.fastWalkIn&&(this.form.get("priceEstimatedFrom").setValidators([]),this.form.get("priceEstimatedFrom").updateValueAndValidity({emitEvent:!1}),this.form.get("bodyPutsTattoo").controls.forEach(r=>{Is.setValidators(r.get("bodyPut"),[]),Is.setValidators(r.get("motive"),[]),Is.setValidators(r.get("size"),[])}),this.form.get("bodyPutsPiercing").controls.forEach(r=>{r.get("bodyPut").setValidators([]),r.get("bodyPut").updateValueAndValidity({emitEvent:!1})}));else{let r=this.fastWalkIn&&this.isNewEvent;this.form?.get("customer").setValidators(r?[]:[ii.validCustomer,ii.requiredAndNotNaN]),this.form?.get("customer").updateValueAndValidity({emitEvent:!1})}if(i&&this.originalEvent().status!=="canceled"){this.form?.get("canceledAt").setValue(Date.now());let r=m4.addWorkingDays(Ie.clearTime(Date.now()),3,this.configService.config.value.invoiceData.fromRegion),s=Ie.clearTime(this.getStartFromForm());this.form?.get("canceledInTime").setValue(s>=r)}this.isCanceled=i,this.dateOrTimeOrPriceOrPaymentsChanged(),this.calcDepotDueDate(),this.checkCancelReasonVisible()}checkNoDepotNecessaryReason(){if(this.form){let i=this.form.get("noDepotNecessary").value;this.calcDepotDueDate(),i||this.form.get("noDepotNecessaryReason").setValue(""),this.form.get("noDepotNecessaryReason").setValidators(i?[ii.requiredAndNotNaN]:[]),this.form.get("noDepotNecessaryReason").updateValueAndValidity({emitEvent:!1})}}printQrEvent(i=!1){return O(this,null,function*(){let r=Ie.parse(this.form.get("date").value+" "+this.form.get("timeFrom").value+":00");if(Ie.formatNowDate()!==r.dateFormatDate()&&!this.forceSaveHack&&r>Date.now()&&!this.loginService.isJulian()){this.dialogService.showOk("Der Trmin ist nicht von heute, drucken nicht m\xF6glich!");return}let s=window.location.origin+"/event-qr-2/"+this.eventId;if(i){let f=yield kQe.toDataURL(s,{width:500,color:{dark:"#ffffff",light:"#2A2A2A"}});this.dialogService.showOk('<div style="width: 100%; text-align: center;"><br/><img src="'+f+'" /></div>',{title:"QR-Code den Artist scannen lassen!"});return}this.dialogService.showLoading(_n.PrintWalkInNo,"QR-Code wird gedruckt...");let o=Ie.parseFormat(this.form.get("date").value,"dd.MM.yyyy"),a=this.form.get("timeFrom").value,l=o+" "+a,c=this.form.get("customer").value?.fullName,d=c.length>25,u=l+`
`+c;this.form.get("artist")?.value?.name&&(u+=`
bei `+this.form.get("artist")?.value?.name),this.form.get("fastWalkIn").value&&(u+=`
WalkIn-Nr:  `+this.form.get("fastWalkInNo").value,this.form.get("fastWalkInNo").value||this.socketService.sendTelegramAdmin("WalkIn-Nr:  "+this.form.get("fastWalkInNo").value+` hat keine Nummer!
`+pg.getLinkForEvent(this.eventId)));let m;this.configService.config.value.studioRegion==="STAGING"?(yield this.dialogService.showOk(`Bei Staging wird der QR-Code nur angezeigt
QR-Code:

`+u),m=""):this.configService.config.value.studioRegion==="AC"&&this.loginService.isBackoffice()?m=yield this.socketService.printQrCode("Backoffice",s,u,d):m=yield this.socketService.printQrCode(this.loginService.getStudio(),s,u,d),m===""?this.dialogService.hideLoading(_n.PrintWalkInNo):(yield this.dialogService.showYesNo(`Fehler beim drucken
`+m,{yesText:"Nochmal drucken",noText:"Abbrechen"}))&&(yield this.printQrEvent()),this.dialogService.hideLoading(_n.PrintWalkInNo)})}printFastWalkInNo(i,r,s=!1){return O(this,null,function*(){s&&this.dialogService.showLoading(_n.PrintWalkInNo,"Walk-In-Nummer wird gedruckt...");let o=(r==="piercing"?"P":"")+i,a=yield this.socketService.printFastWalkInNo(o,this.loginService.getStudio(),r);a===""?this.dialogService.hideLoading(_n.PrintWalkInNo):(yield this.dialogService.showYesNo(`Fehler beim drucken
`+a,{yesText:"Nochmal",noText:"Abbrechen"}))&&(yield this.printFastWalkInNo(i,r,s)),s&&this.dialogService.hideLoading(_n.PrintWalkInNo)})}printFastWalkInNoFromEvent(){return O(this,null,function*(){let i=this.form.get("fastWalkInNo").value;yield this.printFastWalkInNo(i,this.form.get("workType").value)})}checkOtherAvailableArtist(){return O(this,null,function*(){let i=yield this.dialogService.showComponentDialog(bje,{},{});i.componentInstance.load({dateString:Ie.parse(this.form.get("date").value).dateFormat("yyyy-MM-dd"),from:this.form.get("timeFrom").value,till:this.form.get("timeTill").value,eventId:this.eventId,skillFilter:Object.keys(this.skill.skills),boolSkillFilter:Object.keys(this.skill.boolSkills)});let r=yield Sn(i.afterClosed());if(r){let s=this.artists.find(o=>o.name===r);s&&this.form.get("artist").setValue(s)}})}checkArtistBodyPutBlackList(){let i=this.form.getRawValue();if(i.bodyPutsTattoo&&i?.artist?.bodyPutBlacklist){let r=i?.artist?.bodyPutTattooBlacklist,s=i?.artist?.name;for(let o of i.bodyPutsTattoo)if(r.includes(o.bodyPut.join(","))){let a=this.bodyPutService.getGermanPath(o.bodyPut);return this.dialogService.showOk(s+" t\xE4towiert nicht auf "+a),!1}}if(i.bodyPutsTattoo&&i?.artist?.motiveTattooBlacklist){let r=i?.artist?.motiveTattooBlacklist,s=i?.artist?.name;for(let o of i.bodyPutsTattoo){if(o.round&&r.includes("round"))return this.dialogService.showOk(s+" kann keine runden Kreise"),!1;if(o.thinLines&&r.includes("thinLines"))return this.dialogService.showOk(s+" kann keine feine geraden Linien"),!1}}return!0}waitForForm(){return O(this,null,function*(){return new Promise((i,r)=>{this.form?i():setTimeout(()=>i(this.waitForForm()),50)})})}checkShouldDeposit(){return O(this,null,function*(){if(this.form.get("shouldDepositBack").value){let r=this.form.get("shouldDepositBackValue").value,s=this.form.get("shouldDepositBackCreatedAt").value,a=this.getCurrentPayments().filter(l=>l.paymentType==="deposit-back"&&l.createdAt>s).reduce((l,c)=>l+(c?.paymentValue??0),0);if(a>0)if(a<r){let l=r-a;yield this.dialogService.showOk(`Es wurde nicht der komplett festgelegte Betrag zur\xFCck gezahlt
Offene R\xFCckzahlung wird auf `+Wn.toMoneyString(l)+" gesetzt"),this.form.get("shouldDepositBackValue")?.setValue(l),this.form.get("shouldDepositBackCreatedAt")?.setValue(Date.now())}else yield this.dialogService.showOk("Offene R\xFCckzahlung erledigt"),this.form.get("shouldDepositBackValue")?.setValue(null),this.form.get("shouldDepositBack")?.setValue(!1)}})}registerCalendarViewer(){this.isFromCalendarView=!0,this.socketService.registerCalendarViewer()}loadPhotos(i){return O(this,null,function*(){Gn.debug("loadPhotos -"+i),this.photosAndVideos=yield this.socketService.getEventPhotos(this.eventId),this.videos=this.photosAndVideos.filter(r=>r.mimeType.startsWith("video")),this.images=this.photosAndVideos.filter(r=>r.mimeType.startsWith("image"));for(let[r,s]of this.images.entries())s.type==="template"&&(s.sortValue=1+s.filename),s.type==="preTattoo"&&(s.sortValue=2+s.filename),s.type==="stencil"&&(s.sortValue=3+s.filename),s.type==="tattoo"&&(s.sortValue=4+s.filename);this.images=this.images.sortString("sortValue");for(let[r,s]of this.images.entries())s.title=r+1+" / "+this.images.length+"&nbsp;&nbsp;&nbsp;"+this.form.get("artist").value?.name;this.pdfs=this.photosAndVideos.filter(r=>r.filename.endsWith(".pdf")),this.pdfs.forEach(r=>{r.complete=!r.filename.includes("unvollst\xE4ndig")}),this.pdfs.some(r=>r.complete)&&(this.pdfs=this.pdfs.filter(r=>r.complete)),this.photosAndVideos=this.photosAndVideos.filter(r=>!r.filename.endsWith(".pdf")),this.tattooPhotoCount=this.photosAndVideos.filter(r=>r.filename.startsWith("tattoo")&&r.mimeType.startsWith("image")).length,this.videoCount=this.photosAndVideos.filter(r=>r.mimeType.startsWith("video")).length,this.autoSelectMedia()})}autoSelectMedia(){this.selectedMedia.set({});let i={};for(let r of this.images)r.filename.startsWith("tattoo")&&(i[r.id]=r);this.selectedMedia.set(i)}openGoogleDriveFolder(){window.open("https://drive.google.com/drive/folders/"+this.photoFolderId,"_blank")}hasNewPayments(i,r=!1){return!!this.getCurrentPayments().find(s=>{let o=r?s.paymentType!=="deposit-back":!0,a=!i||s.paymentMethod===i;return s.isNewPayment&&o&&a})}setTestData(){return O(this,null,function*(){if(["AC","STAGING"].includes(this.configService.config.value.studioRegion)){this.form.get("info").setValue((this.form.get("info").value??"")+" TEST");let i=yield this.socketService.findContactsWithEvents("Test Kunde");this.form.get("priceEstimatedFrom").setValue(10),this.form.get("customer").setValue(fn.getRandomFromArray(i)),this.form.get("noDepotNecessary").setValue(!0),this.form.get("timeFrom").setValue("22:00"),this.form.get("timeTill").setValue("23:00"),this.form.get("importantInfo").setValue("Wichtig bla bla"),this.form.get("improveArtistShouldGetMoney").setValue(!0),this.form.get("priceFix").setValue(!0),this.form.get("artistFix").setValue(!0),this.form.get("adjustPrice").setValue(!0),this.form.get("artistFixReason").setValue(["design"]),this.skill={boolSkills:{},skills:{Coverup:!0}},this.form.get("noDepotNecessaryReason").setValue("test");let r=this.artists.find(s=>s.name==="Test-Artist 2");this.form.get("artist").setValue(r),this.form.get("bodyPutsTattoo").controls[0].setValue({bodyPut:["unknown"],motive:"test",round:!0,thinLines:!0,size:"10cm",goldBall:!1})}else if(this.configService.config.value.studioRegion==="MA"){this.form.get("info").setValue((this.form.get("info").value??"")+" TEST Julian");let i=yield this.socketService.findContactsWithEvents("Yvonne Hennes");this.form.get("priceEstimatedFrom").setValue(50),this.form.get("customer").setValue(i[0]),this.form.get("noDepotNecessary").setValue(!0),this.form.get("noDepotNecessaryReason").setValue("test");let r=this.artists.find(s=>s.name==="Test Julian");this.form.get("artist").setValue(r),this.form.get("bodyPutsTattoo").controls[0].setValue({bodyPut:["unknown"],motive:"test",round:!1,thinLines:!1,size:"10cm",goldBall:!1})}})}prependFollowUpText(i,r){if(!r)return i;let s="[Folgetermin "+(r.index+1)+" von "+r.total+"]",o=new RegExp(/\[Folgetermin[^\]]+]/g).exec(i);return o&&o.length>0?i.replace(o[0],s):s+" "+i}showCustomerEvents(){return O(this,null,function*(){if(this.openerComponent==="ArtistEventsViewComponent")this.close(!0);else if(this.form.get("customer").value?.id){let i=this.dialogService.showEventsByContact(this.form.get("customer").value.id,!0),r=yield Sn(i.afterClosed());r?.eventId&&this.loadEvent(r),r?.newEventData&&this.loadEvent({newEventData:r.newEventData})}})}checkPriceChangeBeforeSave(i,r){return O(this,null,function*(){if(i&&i!==r&&this.loginService.isReception()){let s=yield this.dialogService.showInput({message:`Warum hat sich der Preis ge\xE4ndert?

Vorher: `+i.toMoneyString()+`
Jetzt: `+r.toMoneyString(),width:"600px",title:"Preis\xE4nderung"});if(s&&(this.priceChanges.push({from:i,to:r,t:Date.now(),u:this.loginService.getUsername(),i:s}),this.priceChanges=this.priceChanges.sortNumber("t",!0)),!s)return!1}return!0})}isArtistOpen(){return this.form.get("artist").value?.summary?.includes("offen")}deleteEvent(){return O(this,null,function*(){if(yield this.dialogService.showYesNo("Willst du wirklich den Termin l\xF6schen?")){this.dialogService.showLoading("Termin wird gel\xF6scht...");let i=yield this.socketService.deleteCalendarEvent2(this.eventId);this.dialogService.hideLoading(),this.close(!1),this.afterClosed.emit({op:"deleted"})}})}selectedPhotosChanged(){for(let i of Object.keys(this.selectedMedia()))this.selectedMedia()[i]?this.photosAndVideos.find(s=>s.id===i).size>1024*1024*40&&(requestAnimationFrame(()=>{this.selectedMedia.update(s=>(delete s[i],ve({},s)))}),this.dialogService.showOk("Video ist zu gro\xDF!")):this.selectedMedia.update(r=>(delete r[i],ve({},r)))}newReminder(){return O(this,null,function*(){yield this.reminderService.showCreateReminder({eventId:this.eventId}),this.loadReminder()})}loadReminder(){return O(this,null,function*(){this.eventId?this.reminders=yield this.socketService.getRemindersByEventId(this.eventId):this.reminders=[]})}log(i){Gn.info("CALENDAR-EVENT-EDIT | "+i)}closeAndSave(){this.form.get("closed").setValue(!0),this.saveAndCloseDialog(!1)}linkArtistPhotos(){let i=this.form.get("artist").value.artist;this.dialogService.showComponentDialog(jX,{eventId:this.eventId,artist:i})}linkArtistPhotosFromClipboard(){this.dialogService.showComponentDialog(Sje,{eventId:this.eventId})}getSelectedPhotoIds(){let i=[];for(let r of Object.keys(this.selectedMedia()))this.selectedMedia()[r]&&i.push(this.selectedMedia()[r].id);return i}getSelectedEventFileIds(){let i=[];for(let r of Object.keys(this.selectedEventFiles()))this.selectedEventFiles()[r]&&i.push(this.selectedEventFiles()[r].id);return i}sendPhotosToUnknownFolder(){return O(this,null,function*(){let i=this.getSelectedPhotoIds(),r=this.photosAndVideos.filter(o=>i.includes(o.id)),s="Die "+r.length+" markierten Fotos geh\xF6ren nicht zu diesem Termin?";(yield this.dialogService.showYesNo(s))&&(this.socketService.sendEventPhotosToClipboard({eventId:this.eventId,photos:r.map(o=>({name:o.filename,fileId:o.id,thumbnailLink:o.thumbnailLink,createdAt:o.createdTime,mimeType:o.mimeType}))}),this.selectedMedia.set({}),this.dialogService.showOk('Gehe nun in den Termin zu dem die Fotos geh\xF6ren und f\xFCge sie dort \xFCber "Fotos aus anderem Termin einf\xFCgen" ein'))})}printArtist(){return O(this,null,function*(){let i=this.form.get("artist").value;if(i){let r=[];r.push(i.invoiceData.name),r.push(i.invoiceData.street),r.push(i.invoiceData.country+"-"+i.invoiceData.postalCode+" "+i.invoiceData.city),yield this.socketService.printSmallText({text:r.join(`
`),studio:"Backoffice",orientation:"standard",margin_top:20,margin_bottom:20})}})}fixPaymentsBeforeSaveAndSetToCalendarEvent(i){let r=0;for(let s of i){if(s.paymentMethod==="gift-card"&&typeof s.paymentGiftCard=="string")throw Error("defekter Gutschein");typeof s.paymentValue=="string"&&(s.paymentValue=parseFloat(s.paymentValue.replace(",","."))),s.paymentDate.toString().length>10&&(s.paymentDate=Ie.format(Ie.parse(s.paymentDate),"yyyy-MM-dd")),typeof s.createdAt=="string"&&(s.createdAt=Ie.parse(s.createdAt)),r++}}setSkill(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog($X);i.componentInstance.currentSkills=so(this.skill.skills),i.componentInstance.currentBoolSkills=so(this.skill.boolSkills);let r=yield Sn(i.afterClosed());r&&!Sr.equal(this.skill,r)&&(this.skill=r,this.calcArtistSkill(),this.skill.skills.Mandala&&this.dialogService.showOk('Ein Mandala ist aufwendiger als ein "normales" Tattoo, beachte dies auch im Preis \u{1F4B8}',{title:"Mandala",buttonText:"Ja beachte ich!"}),this.skill.skills.Maori&&this.dialogService.showOk('Ein Maori ist aufwendiger als ein "normales" Tattoo, beachte dies auch im Preis \u{1F4B8}',{title:"Maori",buttonText:"Ja beachte ich!"}),this.form.get("disableSkillCheck").setValue(!1)),this.setChanged("Skill gesetzt")})}getAdditionalErrors(){let i=[];return this.form.get("workType").value==="tattoo"&&Object.keys(this.skill.skills).length===0&&Object.keys(this.skill.boolSkills).length===0&&i.push("skill"),i}calcArtistSkill(){if(this.form.get("workType").value==="tattoo"){this.artistSkill=void 0;let i=this.form.get("artist").value;if(i){if(i.id==="canceled"||bf.isArtistOpen(i.name))return;this.skill&&i&&(Object.keys(this.skill.skills).length>0||Object.keys(this.skill.boolSkills).length>0)&&(this.artistSkill=R0.getArtistSkillResultFromEvent(this.skill,i))}}}checkArtistSkillBeforeSave(){return O(this,null,function*(){if(this.forceSaveHack||!this.artistSkill||this.form.get("disableSkillCheck").value)return!0;if(this.artistSkill.canUse){if(this.artistSkill.attention&&!(yield this.dialogService.showYesNo("Der Artist hat nur "+this.artistSkill.stars.roundToString(1)+` Sterne
bist du dir sicher?`,{yesText:"Ja trotz "+this.artistSkill.stars.roundToString(1)+" Sterne speichern",noText:"Abbrechen"})))return!1}else{let i=this.form.get("artist").value;if(i.name){let r=i.name+` ist
`+this.artistSkill.infoLines.join(`
und `);r+=`

Wenn du der Meinung bist, `+i.name+` kann das,
spricht bitte das Backoffice an,
damit die Artist-F\xE4higkeiten angepasst werden`,yield this.dialogService.showOk(r,{title:"Speichern nicht m\xF6glich"})}return!1}return!0})}requestImageFromCustomer(){return O(this,null,function*(){if(this.configService.config.value.studioRegion==="MA"){this.dialogService.showOk("Bitte mit dem QR-Code arbeiten");return}let i=this.form.get("customer").value;if(i.id&&i.mobileFormatted){let r=`Hey ${i.givenName},
wir w\xFCrden dich bitten in diesen Chat hier kurz deine Vorlagen bzw. Beispielbilder zu senden, damit wir sofort mit der Designerstellung starten k\xF6nnen!
Sofern du gerne ein Datum, eine Uhrzeit oder einen Schriftzug in deinem Design h\xE4ttest, schick uns dieses/diesen doch bitte zus\xE4tzlich einfach als Nachricht hier in den Chat.
Dankesch\xF6n :)`,s=yield this.dialogService.showTextareaOld({message:"Text an Kunden schicken",prompt:r});(yield Sn(s.afterClosed()))&&this.socketService.sendWhatsAppMessage(i.mobileFormatted,r)}})}transactionMoreShorten(i,r){i.paymentBankTransaction&&i.paymentBankTransaction.name.length>r&&(i.paymentBankTransaction.name=i.paymentBankTransaction.name.substring(0,i.paymentBankTransaction.name.length-r)),i.paymentPaypalTransaction&&i.paymentPaypalTransaction.message.length>r&&(i.paymentPaypalTransaction.message=i.paymentPaypalTransaction.message.substring(0,i.paymentPaypalTransaction.message.length-r))}resetCalendarEvent(){this.nextNxtUpdateId=ua.generate(),this.isSafe=!1,this.restore=!1,this.calcDurationText(),this.dateOrTimeOrPriceOrPaymentsChanged(),this.shouldDepositBackChanged(!1),this.form?.markAsUntouched(),this.photosAndVideos=[],this.pdfs=[],this.originalEvent.set(Vu.getEmptyEvent()),this.originalFormRawValue={},setTimeout(()=>{this.clearChanges()},1e3)}printFreeShot(){this.form.get("customer").value&&this.labelPrintService.printFreeShot(this.form.get("customer").value.givenName)}nxtOnDestroy(){this.formValueChangeSubscription?.unsubscribe(),this.shortcutSubscription.unsubscribe(),this.shortcutSubscription=null,this.tattooTemplateSubscription?.unsubscribe()}beforeSaveHook(i){let r=!!i.newCustomer,s=i.newDateString===Ie.formatNowDate(),o=i.newPayments.some(a=>a.workplace==="reception");if(r&&s&&o){let a=[];if(i.newCustomer.mobile||a.push("Handynummer"),i.newCustomer.postalCode||a.push("PLZ"),a.length>0)return this.dialogService.showOk("F\xFCr den Kunden "+i.newCustomer.givenName+" fehlt "+a.join(" & "),{title:"Speichern noch nicht m\xF6glich"}),!1}return!0}safeAndCloneEventClicked(){return O(this,null,function*(){let i=yield this.saveAndCloseDialog(!1,!1);if(i){let r={dateString:i.startDateString,timeFromString:i.start.dateFormat("HH:mm"),timeTillString:i.end.dateFormat("HH:mm"),artist:i.artist,workType:i.workType,info:i.info,importantInfo:i.importantInfo,skill:i.skill,priceEstimatedFrom:i.priceEstimatedFrom,priceEstimatedTill:i.priceEstimatedTill,discountPromotionId:i.promoOfferId?null:i.discountPromotion?.id,bodyPutsTattoo:i.bodyPuts.tattoo,bodyPutsPiercing:i.bodyPuts.piercing,bodyPutsBeauty:i.bodyPuts.beauty,artistPercentage:i.artistPercentage,noAppointmentReminder:i.noAppointmentReminder,priceFix:i.priceFix,adjustPrice:i.adjustPrice,artistFix:i.artistFix,artistFixReason:i.artistFixReason,customer:i.customer,improveArtistShouldGetMoney:i.improveArtistShouldGetMoney,fastWalkIn:i.fastWalkIn};this.loadEvent({newEventData:r}).then()}})}checkLoadNewEventData(){requestAnimationFrame(()=>O(this,null,function*(){if(this.newEventData){if(this.newEventData.timeFromString?this.form.get("timeFrom").setValue(this.newEventData.timeFromString):this.form.get("timeFrom").setValue("11:00"),this.newEventData.timeTillString?this.form.get("timeTill").setValue(this.newEventData.timeTillString):this.form.get("timeTill").setValue("18:00"),this.newEventData.dateString&&!this.newEventData.showEventFinder&&this.form.get("date").setValue(this.newEventData.dateString),this.newEventData.artist){let i=this.artists.find(r=>r.name===this.newEventData.artist);i&&this.form.get("artist").setValue(i)}if(this.newEventData.contact&&this.form.get("customer").setValue(this.newEventData.contact),this.newEventData.walkIn&&(this.form.get("fastWalkIn").setValue(!0),this.fastWalkIn=!0),this.newEventData.workType&&this.form.get("workType").value!==this.newEventData.workType&&this.form.get("workType").setValue(this.newEventData.workType),this.newEventData.artistPercentage&&this.form.get("artistPercentage").setValue(this.newEventData.artistPercentage),this.newEventData.priceEstimatedFrom&&this.form.get("priceEstimatedFrom").setValue(this.newEventData.priceEstimatedFrom),this.newEventData.priceEstimatedTill&&this.form.get("priceEstimatedTill").setValue(this.newEventData.priceEstimatedTill),this.newEventData.info&&this.form.get("info").setValue(this.newEventData.info),this.newEventData.importantInfo&&this.form.get("importantInfo").setValue(this.newEventData.importantInfo),this.newEventData.bodyPutsPiercing){this.removeBodyPut("bodyPutsPiercing");for(let i of this.newEventData.bodyPutsPiercing)this.addBodyPut("bodyPutsPiercing",i)}if(this.newEventData.bodyPutsTattoo){this.removeBodyPut("bodyPutsTattoo");for(let i of this.newEventData.bodyPutsTattoo)this.addBodyPut("bodyPutsTattoo",i)}if(this.newEventData.bodyPutPiercingCount)for(let i=1;i<this.newEventData.bodyPutPiercingCount;i++)this.addBodyPut("bodyPutsPiercing");if(this.newEventData.openArtist){let i=this.artists.find(r=>r.name===bf.getArtistOpenTattoo().name);i&&this.form.get("artist").setValue(i)}if(this.newEventData.openPiercing){let i=this.artists.find(r=>r.name===bf.getArtistOpenPiercing().name);i&&this.form.get("artist").setValue(i)}if(this.newEventData.skill&&(this.skill=this.newEventData.skill),typeof this.newEventData.improveArtistShouldGetMoney=="boolean"&&this.form.get("improveArtistShouldGetMoney").setValue(this.newEventData.improveArtistShouldGetMoney),typeof this.newEventData.artistFix=="boolean"&&this.form.get("artistFix").setValue(this.newEventData.artistFix),this.newEventData.artistFixReason&&this.form.get("artistFixReason").setValue(this.newEventData.artistFixReason),typeof this.newEventData.noDepotNecessary=="boolean"&&this.form.get("noDepotNecessary").setValue(this.newEventData.noDepotNecessary),this.newEventData.customer){let i=yield this.socketService.getContactById(this.newEventData.customer);i&&this.form.get("customer").setValue(i)}if(this.newEventData.discountPromotionId){let i=this.discountPromotions$.value.find(r=>r.id===this.newEventData.discountPromotionId);i&&this.form.get("discountPromotion").setValue(i)}if(typeof this.newEventData.noAppointmentReminder=="boolean"&&this.form.get("noAppointmentReminder").setValue(this.newEventData.noAppointmentReminder),typeof this.newEventData.priceFix=="boolean"&&this.form.get("priceFix").setValue(this.newEventData.priceFix),typeof this.newEventData.adjustPrice=="boolean"&&this.form.get("adjustPrice").setValue(this.newEventData.adjustPrice),typeof this.newEventData.fastWalkIn=="boolean"&&this.form.get("fastWalkIn").setValue(this.newEventData.fastWalkIn),this.newEventData.askWorkType&&!this.newEventData.workType){let r=(yield this.socketService.getAvailableArtistsDay(this.newEventData.dateString)).artists.filter(s=>s.workType==="piercing");if(r.length>0){let s=[{value:"piercing",text:"Piercing"},{value:"tattoo",text:"Tattoo"}],o=yield this.dialogService.showButtonChooserNew({buttonRows:[s],title:"Piercing oder Tattoo",hideCancelButton:!0,hideBackButton:!0});o&&(this.form.get("workType").setValue(o.value),o.value==="piercing"&&(this.form.get("date").setValue(this.newEventData.dateString),r.length===1?this.form.get("artist").setValue(this.artists.find(a=>a.name===r[0].name)):this.form.get("artist").setValue(this.artists.find(a=>a.name===bf.getArtistOpenPiercing().name))))}else this.form.get("workType").setValue("tattoo")}if(this.newEventData.showEventFinder&&this.form.get("workType").value==="tattoo"){let i=this.configService.config.value.studioWorkStart;this.newEventData.timeFromString&&(i=Qt.parse(this.newEventData.timeFromString)/Qt.DURATION_1HOUR),this.showEventFinder({fromDateString:this.newEventData.dateString,fromTime:i,selectDurationOnStart:!0,selectSkillsOnStart:!1,skills:this.newEventData.skill?.skills,boolSkills:this.newEventData.skill?.boolSkills})}typeof this.newEventData.improve=="boolean"&&this.form.get("improve").setValue(this.newEventData.improve)}}))}eventPhotoClicked(i){return O(this,null,function*(){if(i.mimeType.startsWith("video")){this.openGoogleDriveFolder();return}let r=this.photosAndVideos.filter(a=>!a.mimeType.startsWith("video")),s=a=>O(this,null,function*(){let l=yield this.socketService.getEventPhoto(this.eventId,r[a].id);return{src:"data:"+l.mimeType+";base64,"+l.base64,isFirst:a===0,isLast:a===r.length-1,title:"Foto "+(a+1)+"/"+r.length+`
`+r[a].filename}}),o=this.dialogService.showImagesAsync(r.length,r.indexOf(i),s);o.componentInstance.buttonClicked.subscribe(()=>O(this,null,function*(){let a=this.getArtistFromForm();if(a){let l=bf.badPhotoTexts.map(d=>({value:d.replaceAll("{{artist}}",a.name),text:d.replaceAll("{{artist}}",a.name)})),c=yield this.dialogService.showButtons("Die Nachricht wird in die Sprache des Artists \xFCbersetzt",{title:"Schicke eine Nachricht an den Artist",buttons:l,showCancelButton:!0,buttonDirection:"column",textAlign:"center"});if(c){let d=r[o.componentInstance.currentIndex].id;yield this.socketService.sendBadPhotoToArtist(this.eventId,c.value,d),this.dialogService.showOk("Nachricht wurde an "+a.name+" geschickt")}}}))})}checkArtistEmployed(){let i=this.getArtistFromForm();i&&i.employed&&this.form.get("artistPercentage").setValue(0)}getArtistFromForm(){let i=this.form.get("artist").value;if(i?.name)return i}isCashRegisterTodayClosed(){return O(this,null,function*(){let i=yield this.socketService.canBook(Date.now(),this.loginService.getStudio());return i?!(yield this.dialogService.showOkWithForceIfJulian(i)):!1})}showAppointmentConfirmationTextClicked(){return O(this,null,function*(){if(this.isNewEvent||this.changes().length>0){if(yield this.dialogService.showYesNo("Du musst erst deine \xC4nderungen speichern",{yesText:"Speichern dann Terminerinnerung",noText:"Abbrechen"})){this.actionAfterSaved="appointment-reminder";let i=yield this.saveAndCloseDialog(!1);this.actionAfterSaved=""}return}else this.showAppointmentConfirmationText()})}printQrClicked(){return O(this,null,function*(){if(this.changes().length>0){if(yield this.dialogService.showYesNo("Du musst erst deine \xC4nderungen speichern",{yesText:"Speichern dann drucken",noText:"Abbrechen"})){this.actionAfterSaved="print-qr";let i=yield this.saveAndCloseDialog(!1);this.actionAfterSaved=""}return}this.printQrEvent(!1).then()})}waitForArtistCalendars(){return O(this,null,function*(){return new Promise(i=>{this.artists.length>0?i():this.cacheService.artists.pipe(Ks(r=>r.length>0)).pipe(Jd()).subscribe(()=>i())})})}hideLoadingEventDialog(){xg.clear(this.loadEventLoadingTimeout),this.dialogService.hideLoading(_n.CalendarEventEditLoading)}printCustomerReceipt(i){return O(this,null,function*(){try{if(this.changes().length>0){yield this.dialogService.showOk("Termin erst speichern");return}this.dialogService.showLoading("Drucke Beleg");let r=yield this.socketService.printCustomerReceipt(this.eventId,i);this.dialogService.hideLoading(),r&&(yield this.dialogService.showOk(r))}catch(r){Gn.error(r),yield this.dialogService.showOk(r.message),this.thermalPrinterService.showChangeIp().then(),this.dialogService.hideLoading()}})}showParsedContactsClicked(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(n$e),r=yield Sn(i.afterClosed());r&&(r.action==="createContact"?(yield this.showContactForm(r.parsedContact))&&this.socketService.deleteParsedContact(r.id).then():r.action==="useContact"&&(this.form.get("customer").setValue(r.contact),this.socketService.deleteParsedContact(r.id).then()))})}followUpChanged(){this.form.get("info").setValue(this.prependFollowUpText(this.form.get("info").value,this.followUp))}calcIsFirstCustomerEvent(){this.isFirstCustomerEvent=!1;let i=this.form.get("customer").value,r=this.form.get("date").value;i&&r&&(this.isFirstCustomerEvent=Uv.isFirstAppointment(i,Ie.parse(r)))}printShishaClicked(){return O(this,null,function*(){this.dialogService.showLoading("Wird gedruckt..");let i=yield this.socketService.printShisha(this.originalEvent().id);this.dialogService.hideLoading(),i&&this.dialogService.showOk(i).then()})}clearChanges(){this.changes.set([]),this.originalFormRawValue={},this.form&&(this.originalFormRawValue=this.form.getRawValue())}getFormName(i){let r=this.form.get(i)?.name;if(r)return r;switch(i){case"bodyPutsTattoo":return"Tattoo-K\xF6rperstelle"}return i}setChanged(i){i=this.getFormName(i),this.changes().includes(i)||(this.changes.update(r=>(r.push(i),[...r])),this.generateTitle(),this.originalFormRawValue=this.form.getRawValue())}openAdmin(){this.router.navigateByUrl("/admin"),this.close(!0)}reSortArtists(){this.artists=this.artists.sort((i,r)=>{let s=this.availableArtistThisDate[i.name],o=this.availableArtistThisDate[r.name];return s&&!o?-1:!s&&o?1:i.calendarNumber.localeCompare(r.calendarNumber)})}setDepotDueDate(i){let r=this.workingDayService.addDaysUntilWorkingDay(Date.now().clearTime().dateAddDays(i));this.form.get("depotDueDate").setValue((0,J_e.default)(r))}getAvailableArtistThisDay(){return O(this,null,function*(){let i=yield this.socketService.getAvailableArtistsDay(this.form.get("date").value);this.availableArtistThisDate={},i?.artists&&i?.artists.forEach(r=>this.availableArtistThisDate[r.name]=!0),this.reSortArtists()})}editArtist(){this.dialogService.showComponentFull(Xy).componentInstance.setData(this.form.get("artist").value.id)}bodyPutChanged(){}autoPriceByBeauty(){let i=this.form.get("bodyPutsBeauty").getRawValue();if(i){let r=0;for(let s of i){let o=this.bodyPutService.getBodyPutBeauty(s.bodyPut);o.price&&(r+=o.price)}r&&this.form.get("priceEstimatedFrom").setValue(r)}}showRatingClicked(){this.openerComponent==="EventsRatingComponent"?this.closeWithoutSaveClicked():this.dialogService.showEventRating(this.originalEvent().id,"CalendarEventEditComponent")}registerTattooTemplates(){this.tattooTemplateSubscription?.unsubscribe(),this.tattooTemplateSubscription=this.tattooTemplateService.currentTattooTemplates.pipe(lr(i=>i.filter(r=>r.eventId===this.eventId))).subscribe(i=>{this.newTattooTemplates.set(i),i.length>0&&this.setChanged("Tattoo-Vorlage")})}selectMedia(i,r){this.selectedMedia.update(s=>(r?s[i.id]=i:delete s[i.id],ve({},s)))}resetSelectedMediaClicked(){this.selectedMedia.set({})}sendSelectedMediaClicked(){return O(this,null,function*(){let i=oa(this.selectedMedia()),r=this.form.get("customer").value,s="M\xF6chtest du "+this.selectedMediaText()+" an "+r.fullName+" schicken?";(yield this.dialogService.showYesNo(s))&&(this.socketService.sendEventPhotosToCustomer({eventId:this.eventId,fileIds:i,contactId:r.id}),this.dialogService.showOk("Bilder werden im Hintergrund verschickt"),this.selectedMedia.set({}))})}updatePhotoType(i,r){if(this.changes().length>0){this.dialogService.showOk("Foto-Typ \xE4ndern geht nur ohne \xC4nderungen am Termin, speicher erst den Termin");return}return this.socketService.setEventPhotoTypeOld(this.eventId,i.id,r)}showChangesClicked(){this.dialogService.showOk(this.changes().join(`
`))}deleteTattooTemplateClicked(i){this.tattooTemplateService.deleteTattooTemplate(i)}deletePhotoClicked(i){return O(this,null,function*(){(yield this.dialogService.showYesNo("Foto l\xF6schen?"))&&this.socketService.deleteEventFile(this.eventId,i.id).then()})}shareEventClicked(){return O(this,null,function*(){if(!this.eventId){this.dialogService.showOk("Speicher erst den Termin, dann kannst du in senden");return}let i=[{value:Kc.Numbers.Julian,text:"Julian"},{value:Kc.Numbers.NiklasNXT,text:"Niklas"},{value:Kc.Numbers.CaponeNXT,text:"Capone"},{value:Kc.Numbers.Lili,text:"Lili"}],r=yield this.dialogService.showButtons("Mit wem m\xF6chtest du den Termin teilen?",{buttons:i,showCancelButton:!0});if(r){let s=yield this.dialogService.showInput({message:"Info dazu"});this.socketService.sendWhatsAppMessage(r.value,"von "+this.loginService.getUsername()+`

`+s+`

`+window.location.origin+"/e/"+this.eventId)}})}copyEventToClipboardClicked(){this.clipboard.copy(this.eventUrl)}openConsentClicked(){let i=P5.getBestConsent(this.originalEvent());if(i){let r=a6.getDriveLink(i.id);this.dialogService.showPdfSrc(r,"Einverst\xE4ndniserkl\xE4rung.pdf")}else this.openGoogleDriveFolder()}videoClicked(i){this.dialogService.showComponentFull($5).componentInstance.loadDriveVideo(i)}consentClicked(i){let r=a6.getDriveLink(i.id);this.dialogService.showPdfSrc(r,"Einverst\xE4ndniserkl\xE4rung.pdf")}updatePhotoType2(i,r){i.type==="video"&&(r==="tattooPhoto"?r="tattooVideo":r==="preTattooVideo"?r="preTattooVideo":r==="stencilPhoto"&&(r="stencilVideo")),this.socketService.updateEventFileSubType(this.eventId,i.id,r)}deletePhotoClicked2(i){}selectEventFileClicked(i,r){this.selectedEventFiles.update(s=>(r?s[i.id]=i:delete s[i.id],ve({},s)))}resetSelectedEventFilesClicked(){this.selectedEventFiles.set({})}sendEventFileToUnknownFolderClicked(){return O(this,null,function*(){let i=oa(this.selectedEventFiles()).map(s=>this.selectedEventFiles()[s]),r=this.selectedEventFileText()+" geh\xF6ren nicht zu diesem Termin?";(yield this.dialogService.showYesNo(r))&&(this.socketService.sendEventFilesToClipboard(this.eventId,i),this.selectedEventFiles.set({}),this.dialogService.showOk('Gehe nun in den Termin zu dem die Fotos geh\xF6ren und f\xFCge sie dort \xFCber "Fotos aus anderem Termin einf\xFCgen" ein'))})}sendSelectedEventFilesClicked(){return O(this,null,function*(){let i=oa(this.selectedEventFiles()).map(o=>this.selectedEventFiles()[o]),r=yield this.socketService.createEventFileAlbum(this.eventId,i);if(yield this.dialogService.showYesNo("Link kopieren oder direkt senden?",{yesText:"Per WhatsApp senden",noText:"Link kopieren"})){let o=this.form.get("customer").value;this.socketService.sendEventFileAlbumToContact(o.id,r)}else this.clipboard.copy(r)})}linkEventFileFromClipboard(){let i=this.dialogService.showComponentDialog(yQe);i.componentInstance.eventId=this.eventId}selectTattooEventFilesClicked(){this.selectedEventFiles.set({}),this.eventFiles().filter(r=>r.subType.startsWith("tattoo")).forEach(r=>this.selectEventFileClicked(r,!0))}eventFileEditClicked(i){requestAnimationFrame(()=>{let r=this.dialogService.showComponentFull(Px);r.componentInstance.fileId=i.id})}test(){this.eventFileThumbReloadIndicator.set(ua.generate())}showCustomerRefClicked(i){i||this.form.get("customerRef").setValue(null)}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(ad),R(Fi),R(ws),R(lt),R(p3),R(Kt),R(vt),R(wQe),R(fu),R(gs),R(ep),R(iee),R(Oc),R(Ll),R(Kt),R(tA),R(D5),R(cc),R(Xi),R(QA),R(DQe),R(_u),R(YP),R(T5),R(lA),R(yX))},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-event-edit-2"]],viewQuery:function(r,s){if(r&1&&(ei(Hhi,7),ei(Ghi,5),ei(Whi,5),ei(Uhi,5),ei(jhi,5),ei($hi,5),ei(Khi,5),ei(Yhi,5)),r&2){let o;Pt(o=Rt())&&(s.customerSugBtn=o.first),Pt(o=Rt())&&(s.myTitleInputRefEl=o.first),Pt(o=Rt())&&(s.nxtFormControlElemCustomer=o.first),Pt(o=Rt())&&(s.nxtFormControlElemArtist=o.first),Pt(o=Rt())&&(s.nxtFormControlElemBodyPut=o.first),Pt(o=Rt())&&(s.nxtFormControlElemDate=o.first),Pt(o=Rt())&&(s.nxtFormControlElemTimeTill=o.first),Pt(o=Rt())&&(s.nxtFormControlElemDepotDueDateReason=o.first)}},standalone:!0,features:[et,xe],decls:3,vars:5,consts:[["nxtFormControlElemCustomer",""],["nxtFormControlElemTimeTill",""],["nxtFormControlElemArtist",""],["nxtFormControlElemBodyPut",""],["templateMenu",""],["eventFileMenu",""],["photoContextMenu2",""],["photoContextMenu",""],["style","z-index:99999; position: fixed; top:0; left: 0; background-color: red; font-size: 200%",4,"ngIf"],[2,"position","relative","width","100%","height","100%","padding","0",3,"ngClass"],["style","height:100%","fxLayout","column",3,"formGroup",4,"ngIf"],[2,"z-index","99999","position","fixed","top","0","left","0","background-color","red","font-size","200%"],["fxLayout","column",2,"height","100%",3,"formGroup"],["fxLayout","row","fxLayoutAlign","space-between",3,"click","ngStyle"],["style","position: fixed; left: 3px; top: 3px",3,"click",4,"ngIf"],["tooltip","Speichern",3,"click","onlyOneClick"],["tooltip","Speichern und Termin schlie\xDFen",3,"onlyOneClick","click",4,"ngIf"],["tooltip","Walk-In-Nummer nochmal drucken",3,"click",4,"ngIf"],["matTooltip","Free Shot",3,"click",4,"ngIf"],["tooltip","Speichern und Folgetermin anlegen",3,"click",4,"ngIf"],["tooltip","Speichern & Klonen",3,"click"],["tooltip","WhatsApp-Chat",3,"click"],["nxtPermission","IsMa","matTooltip","Shisha",3,"svg","click",4,"ngIf"],["tooltip","Verlauf",3,"click"],["tooltip","Termin teilen",3,"click"],["tooltip","Termin in die Zwischenablage kopieren",3,"click"],["tooltip","Terminbest\xE4tigung",3,"click"],["tooltip","QR-Code drucken",3,"click",4,"ngIf"],["tooltip","QR-Code anzeigen",3,"click",4,"ngIf"],["tooltip","Termin l\xF6schen",3,"click",4,"ngIf"],["tooltip","Ohne speichern schlie\xDFen",3,"click"],["class","w-full text-150 h-100 mouse-pointer","fxLayoutAlign","center center",4,"ngIf"],["fxFlex","",1,"form-scroll-container"],["class","form-wrapper",3,"formGroup",4,"ngIf"],["style","font-size:14px; z-index: 99999; color: #fff; position:absolute; bottom: 20px; left: 0; right:0; overflow:auto; height: 500px; background-color: #000;",4,"ngIf"],[1,"info-div",2,"position","fixed","left","0","bottom","0","right","0"],[2,"position","fixed","left","3px","top","3px",3,"click"],["tooltip","Speichern und Termin schlie\xDFen",3,"click","onlyOneClick"],["tooltip","Walk-In-Nummer nochmal drucken",3,"click"],["matTooltip","Free Shot",3,"click"],["tooltip","Speichern und Folgetermin anlegen",3,"click"],["nxtPermission","IsMa","matTooltip","Shisha",3,"click","svg"],["tooltip","QR-Code drucken",3,"click"],["tooltip","QR-Code anzeigen",3,"click"],["tooltip","Termin l\xF6schen",3,"click"],["fxLayoutAlign","center center",1,"w-full","text-150","h-100","mouse-pointer"],[3,"click"],[1,"form-wrapper",3,"formGroup"],["fxLayout","row","fxLayout.lt-sm","column"],[1,"mr-2","flex","cursor-pointer","items-center","justify-center"],["fxFlex","","fxFlex.lt-sm","100%"],[1,"p-2","text-120",3,"nxtOnMultiClick","nxtMultiClick"],[3,"height"],["fxFlex","100%","fxFlex.lt-sm","100%",1,"pb-2"],["fxLayout","row",3,"fxLayoutGap"],["class","flex flex-row items-end justify-center",4,"ngIf"],["fxLayout","row","fxFlex",""],["placeholder","Info",3,"nxtFormControl","noPadding"],["color","red","placeholder","Wichtige Info",3,"nxtFormControl","noPadding"],["fxLayout","row"],["placeholder","Rechnungsnummer",3,"nxtFormControl","noPadding"],[1,"mt-2"],["color","red","placeholder","Probleme am Tag des Termins",3,"nxtFormControl"],["fxFlex","",1,"o-hidden"],["fxLayout","row","fxLayout.lt-sm","column","fxLayoutAlign","start center",1,"screen-col-container","h-100"],["fxFlex","400px","fxFlex.xs","100%","fxLayout","row"],["requiredError","ein Tattoo ohne einen Kunden?","minWidth","300px","placeholder","Vor- und Nachname",3,"noEntryEnter","newItem","displayWith","displayInOptionWith","nxtFormControl","filterFields","showClearIcon","useFuseSearch","maxOptionsToShow","customSearchAsyncFn","dateControlIfFirstCharDigit"],["matTooltip","Kunde bearbeiten",3,"click",4,"ngIf"],[1,"flex","h-full","flex-row","items-center","gap-2","pb-3","pl-3","contact-buttons"],[4,"ngIf"],["fxFlex.xs","100%","fxLayout","column",2,"padding","0 10px",3,"innerHTML"],["fxFlex","20%","fxFlex.xs","100%","align","start"],[1,"flex","flex-row","gap-2","w-[400px]"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxFlex.lt-sm","100%",1,"mat-card-left-margin"],["class","card-title",4,"ngIf"],["fxLayoutAlign","center center","fxLayout","column",1,"h-100"],["fxLayout","row","fxLayoutAlign","start end","fxLayoutGap","8px"],["placeholder","Datum","format","EE dd.MM.yyyy",1,"w-[120px]",3,"readonly","nxtFormControl","noPadding"],["title","Startzeit w\xE4hlen","minTime","10:00","placeholder","von",3,"valueChange","readonly","getText","noPadding","nxtFormControl"],["title","Endezeit w\xE4hlen","placeholder","bis",3,"readonly","minTime","getText","noPadding","nxtFormControl","showHourCounter"],["fxLayout","row","fxLayoutAlign","center",1,"pt-3"],[3,"nxtFormControl"],[3,"trigger"],["fxLayout","column","fxFlex","420px","fxFlex.lt-sm","100%"],[1,"absolute","card-title",3,"class","nxtMultiClick"],["fxFlex","","fxLayout","row","fxLayoutAlign","center center"],["fxLayout","column",1,"w-full"],["fxLayout","row",1,"pb-1"],["requiredError","ein Tattoo ohne einen Artist?","placeholder","Artist","nxtMatOptionClass","artist-calendar-option",1,"mt-3",3,"displayWith","displayInOptionWith","options","nxtFormControl","filterFields","showClearIcon","useFuseSearch","maxOptionsToShow","bottomNoPadding"],[1,"flex","flex-col","justify-center",3,"ngStyle"],["tooltip","Anderer Artist",3,"click"],["nxtPermission","Artists_Read","tooltip","Artist bearbeiten"],["fxLayout","row",2,"padding","0 10px"],["class","flex flex-row items-center",4,"ngIf"],["style","padding: 0 10px",4,"ngIf"],["fxLayout","column","fxLayoutGap","8px"],[3,"ngClass"],[1,"flex","!flex-col","!border-0","mt-2",3,"formControl","multiple"],[3,"disabled","value",4,"ngIf"],["titleText","Zahlungen",3,"valueChange","printCustomerReceipt","formPayments","notAssignedPaypalTransactionsIn","notAssignedPaypalTransactionsOut","notAssignedKlarnaOrdersIn","notAssignedKlarnaOrdersOut","notAssignedBankTransactionsIn","notAssignedBankTransactionsOut","paymentTypes","paymentMethods","possiblePaymentMethods","possiblePaymentMethodsDepositBack","controlGap","priceEstimatedFrom","artistPercentage","eventDate","eventIsClosed","eventCreateAt","isNewEvent","enableAddPayment","beforeAddPayment","discountPromotion","eventId","forceSaveHack"],["fxLayout","column"],[1,"flex","w-full","flex-row"],[1,"flex","flex-col",2,"border","0px solid red"],["fxLayout","row","class","red",4,"ngIf"],["class","green",4,"ngIf"],[1,"mouse-pointer",3,"click"],[3,"innerHTML"],[1,"flex","flex-grow","flex-row","items-center","justify-around",2,"border","0px solid blue"],[1,"flex","h-full","flex-col","justify-around"],["nxtPermission","Admin",3,"nxtFormControl"],["fxLayout","row","fxLayoutAlign","start center",1,"pb-3"],["fxFlex","285px","placeholder","wie viel soll zur\xFCck gezahlt werden?",3,"isMoney","nxtFormControl",4,"ngIf"],["class","flex flex-row",4,"ngIf"],[3,"height",4,"ngIf"],[1,"flex","flex-row"],["fxLayout","column",2,"overflow","auto"],[1,"mr-2","flex","cursor-pointer","items-center","justify-center",3,"click"],[1,"flex","flex-row","items-end","justify-center"],[1,"w-[30px]",3,"valueChange","noPadding","isNumber","value"],["fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center start"],["fxLayout","row",4,"ngFor","ngForOf"],["fxLayoutAlign","center center"],["matTooltipPosition","above","matTooltip","neue Aufgabe",3,"click"],[1,"py-1","mouse-pointer"],["matTooltip","Kunde bearbeiten",3,"click"],["fa","sparkles",3,"click"],["width","10px"],[1,"tagline-button",3,"innerHTML"],["matTooltip","neue Kundeninfo",3,"click"],["matTooltip","Bild per WhatsApp anfordern",3,"click"],["nxtPermission","IsJulian",3,"valueChange","value"],["class","tagline-button",3,"innerHTML","click",4,"ngFor","ngForOf"],[1,"tagline-button",3,"click","innerHTML"],["minWidth","250px","placeholder","Anderer Chat",3,"noEntryEnter","newItem","displayWith","displayInOptionWith","nxtFormControl","filterFields","showClearIcon","useFuseSearch","maxOptionsToShow","customSearchAsyncFn","dateControlIfFirstCharDigit"],["tooltip","Anderer WhatsApp-Chat",3,"click"],["fxLayout","column","fxLayoutAlign","center center",1,"pr-2"],["matTooltip","Terminsliste",3,"click"],["fxLayout","column","fxLayoutAlign","center start","fxLayoutGap","4px",1,"mb-1","pb-1","o-auto",2,"font-size","85%"],["fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","8px",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","8px"],[2,"width","100px"],["fxLayout","row","fxLayoutAlign","center center",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center center"],[2,"cursor","pointer",3,"click"],[1,"canceled"],[1,"closed"],["fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","5px",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","5px"],[3,"ngStyle","click",4,"ngIf"],[3,"click","ngStyle"],[1,"future"],[1,"card-title"],["style","float:right",4,"ngIf"],[2,"float","right"],[1,"absolute","card-title",3,"nxtOnMultiClick","nxtMultiClick"],["nxtPermission","Artists_Read","tooltip","Artist bearbeiten",3,"click"],[1,"flex","flex-row","items-center"],["class","red text-150 bold",4,"ngIf"],[1,"red","text-150","bold"],[2,"padding","0 10px"],[1,"!text-[80%]","!border-0",3,"value"],[3,"disabled","value"],["fxFlex","","fxLayout","column","fxLayoutAlign","center center"],["class","mouse-pointer",3,"click",4,"ngIf"],["class","flex flex-col items-center justify-center pt-2",4,"ngIf"],[3,"click",4,"ngIf"],["fxFlex","",3,"trigger"],["fxFlex.lt-sm","100%",1,"flex","h-full","flex-col","justify-center","pt-2","mat-card-left-margin"],["fxLayout","row","style","position: relative; top: -7px",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"flex","flex-col","items-center","justify-center","pt-2"],["icon","star",1,"cursor-pointer",3,"click","value"],[1,"flex","pt-2","text-[75%]"],["nxtPermission","SkillCheck_Disable",3,"placeholder","nxtFormControl"],["nxtPermission","","permissionNot","SkillCheck_Disable"],["fxFlex","","fxLayout","row","fxLayoutAlign","center center",3,"fxLayoutGap"],[1,"flex","h-full","pt-1"],["fxFlex","181px",1,"flex","flex-row"],["placeholder","K\xF6rperstelle",3,"inputClick","nxtFormControl","readonly","cellRenderer"],["fxFlex",""],["minWidth","300px","placeholder","Motiv","cachedTextId","tattoo-motives",3,"maxOptionsToShow","nxtFormControl","filterFields"],["fxFlex","200px"],["placeholder","Gr\xF6\xDFe",3,"nxtFormControl"],["fxLayout","row",2,"position","relative","top","-7px"],[3,"smallHeight","click",4,"ngIf"],[3,"click","smallHeight"],["fxFlex","",1,"mat-card-left-margin"],[1,"flex","flex-col","justify-center","w-[190px]"],["placeholder","Behandlung",3,"inputClick","nxtFormControl","readonly","cellRenderer"],["fxLayout","row",1,"red"],["class","flex flex-row items-center gap-6",4,"ngIf"],[1,"flex","flex-row","items-center","gap-6"],[2,"font-size","80%"],["style","font-size: 80%;",4,"ngIf"],[1,"green"],["fxFlex","285px","placeholder","wie viel soll zur\xFCck gezahlt werden?",3,"isMoney","nxtFormControl"],[1,"price-change-table"],[1,"h-full"],["nxtPhotoSwipe","",1,"flex","flex-row","items-center","gap-1"],["mat-menu-item","",3,"click"],[3,"href"],[2,"max-width","180px",3,"contextmenu","src"],[1,"flex","flex-grow","flex-row","gap-3"],[1,"flex","flex-grow","flex-col"],[1,"flex","flex-grow"],[1,"flex","flex-col","w-[300px]"],["placeholder","Warum passt der Preis zur Dauer nicht?",3,"nxtFormControl"],[3,"nxtFormControl",4,"ngIf"],["placeholder","Warum abgesagt?",3,"nxtFormControl"],["placeholder","Warum keine Kaution n\xF6tig?",3,"nxtFormControl"],["placeholder","Wann kommt die Kaution?","width","300px",3,"nxtFormControl"],[1,"flex","flex-row","justify-around",2,"position","relative","top","-12px"],[3,"click","smallButton"],["cachedTextId","depot-due-date-reason",3,"placeholder","maxOptionsToShow","nxtFormControl","filterFields"],[1,"cursor-pointer",3,"click"],[1,"flex","overflow-auto"],["nxtPhotoSwipe","",1,"flex","flex-row","gap-1",3,"nxtPhotoSwipeOnEditClicked","nxtPhotoSwipeShowEditIcon"],[1,"ml-3","flex","flex-grow","flex-row","justify-end"],["class","p-1","fxLayoutAlign","center center",4,"ngIf"],[1,"flex","flex-row","whitespace-nowrap"],["mat-menu-item",""],["nxtPermission","EventPhoto_Delete","mat-menu-item","",3,"click"],[1,"relative","flex","flex-col","items-center","justify-center",3,"contextmenu"],[1,"whitespace-nowrap"],[1,"text-sm","file-header"],[1,"text-xs","file-header"],[1,"flex","items-center","justify-center",2,"min-height","180px"],[1,"relative","flex","h-fit"],[2,"position","absolute","left","8px","top","8px","padding","4px","border-radius","4px","background-color","rgba(0,0,0,0.66)"],[3,"valueChange","value"],[1,"flex","h-full","items-center","justify-center",3,"id","href"],[2,"max-height","180px","max-width","135px","height","fit-content",3,"src"],[2,"max-height","180px","max-width","135px","height","fit-content",3,"click","src"],[1,"flex","flex-col","items-center","justify-center"],[1,"relative","flex","items-center","justify-center"],[1,"absolute","flex","cursor-pointer","flex-col","items-center","justify-end","px-2","py-1","text-[70%]",2,"background-color","rgb(31 31 31 / 88%)","border-radius","0.5rem",3,"click"],[1,"cursor-pointer",2,"max-height","180px","max-width","135px","height","fit-content",3,"click","src"],["fxLayoutAlign","center center",1,"p-1"],["nxtDragScroll","",1,"flex","flex-row","overflow-auto"],["fxLayout","row","fxLayoutGap","15px","style","padding: 0 0; border: 0 solid green",4,"ngIf"],[1,"py-4","text-120"],["fxLayout","row","fxLayoutGap","15px",2,"padding","0 0","border","0 solid green"],["nxtDynamicSizeMode","width",3,"nxtDynamicSize"],["nxtPhotoSwipe","",1,"flex","flex-row","gap-1"],[1,"flex","flex-row","gap-1"],["fxLayout","column","fxLayoutAlign","center center"],["class","pl-3","fxLayout","row","fxLayoutGap","5px",4,"ngIf"],[1,"flex","h-full","flex-col","items-center","justify-center","gap-4","overflow-hidden"],["fxLayout","column","fxLayoutAlign","center center",3,"contextmenu"],[1,"no-wrap","text-[90%]"],[1,"pb-2","no-wrap","text-[90%]"],["fxLayoutAlign","center center",1,"image-wrapper","p-relative"],["backgroundColor","#00000075","color","gray","style","position:absolute;",3,"click",4,"ngIf"],["draggable","false","alt","",2,"max-width","150px","max-height","180px",3,"src"],["backgroundColor","#00000075","color","gray",2,"position","absolute",3,"click"],[2,"position","absolute","left","5px","top","5px",3,"change","checked"],[2,"cursor","pointer","max-width","150px","max-height","180px",3,"click","src"],["fxLayout","row","fxLayoutGap","5px",1,"pl-3"],["fxLayout","column","fxLayoutAlign","center center","class","w-full p-relative",4,"ngFor","ngForOf"],["fxLayout","column","fxLayoutAlign","center center",1,"w-full","p-relative"],[1,"red",2,"position","absolute","top","50%","font-weight","bold"],["fxLayout","column",1,"pb-2"],[2,"font-size","14px","z-index","99999","color","#fff","position","absolute","bottom","20px","left","0","right","0","overflow","auto","height","500px","background-color","#000"]],template:function(r,s){r&1&&(W(0,rpi,2,0,"div",8),h(1,"div",9),W(2,pfi,32,16,"div",10),p()),r&2&&(b("ngIf",s.showDebug2),g(),b("ngClass",sn(3,Xhi,s.showBackgroundColor)),g(),b("ngIf",s.form))},dependencies:[Zs,Ct,Lt,_s,Dn,No,rs,At,Yt,$r,oi,qi,ko,Ko,$_,Ia,$c,e1,rr,an,dl,RX,jv,Hi,Ije,Yi,Qu,Ga,tl,cf,Nn,A5,XA,JUe,H1,Hn,fEe,Or,eP,ks,E5,ld,Mje,Dje,Xu,_f,nm,Dm,uA,V_,nP,Zr,E$e,rX,_g,M$e,O7,A$e,V7],styles:["[_nghost-%COMP%]    {display:flex;height:100%;width:100%}[_nghost-%COMP%]     .artist-calendar-option{border-bottom:1px solid white}*[_ngcontent-%COMP%]{--clock-hand-color: #626668 !important;--dial-background-color: #626668 !important}a[_ngcontent-%COMP%]{text-decoration:none}.nxt-toolbar-top[_ngcontent-%COMP%]{top:0}@media (max-width: 599.9px){.nxt-toolbar-top[_ngcontent-%COMP%]{top:5px}}.nxt-toolbar-left[_ngcontent-%COMP%]{left:40px}@media (max-width: 599.9px){.nxt-toolbar-left[_ngcontent-%COMP%]{left:15px}}.nxt-toolbar-right[_ngcontent-%COMP%]{right:15px}@media (max-width: 599.9px){.nxt-toolbar-right[_ngcontent-%COMP%]{right:15px}}.nxt-toolbar-bottom[_ngcontent-%COMP%]{bottom:10px;font-size:12px;color:#bbb;text-align:right}.nxt-toolbar-bottom[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{display:inline}.table-form[_ngcontent-%COMP%]   .table-form-td[_ngcontent-%COMP%]{width:16.6%;min-width:16.6%}.logo-wrapper[_ngcontent-%COMP%]{height:25px;width:100%;text-align:center}@media (min-width: 960px){.logo-wrapper[_ngcontent-%COMP%]{margin-top:10px}}.logo-wrapper[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:25px;margin:0 20px}.event-load-error[_ngcontent-%COMP%]{color:#fff;font-size:24px}.info-div[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-size:14px}.form-scroll-container[_ngcontent-%COMP%]{overflow-y:auto}.form-scroll-container[_ngcontent-%COMP%]   .form-wrapper[_ngcontent-%COMP%]{padding:1px 10px}@media (max-width: 599.9px){.form-scroll-container[_ngcontent-%COMP%]   .form-wrapper[_ngcontent-%COMP%]{padding:0 5px}}.form-scroll-container[_ngcontent-%COMP%]   .form-wrapper[_ngcontent-%COMP%]   .nxt-time-picker[_ngcontent-%COMP%]{width:100%}.form-scroll-container[_ngcontent-%COMP%]   .form-wrapper[_ngcontent-%COMP%]   .divider[_ngcontent-%COMP%]{width:40px;height:40px;display:inline-block}.form-scroll-container[_ngcontent-%COMP%]   .form-wrapper[_ngcontent-%COMP%]   .divider-new-line[_ngcontent-%COMP%]{width:40px;height:10px;display:flex}.button-edit-contact[_ngcontent-%COMP%]{margin:auto}.event-img-container[_ngcontent-%COMP%]{padding:0 10px}.event-img-container[_ngcontent-%COMP%]   .event-img[_ngcontent-%COMP%]{max-width:20vw;max-height:25vh}@media (min-width: 600px){.mat-card-left-margin[_ngcontent-%COMP%]{margin-left:10px}}.studio-radio-button[_ngcontent-%COMP%]{margin:0 0 5px 5px}.tagline-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:10px!important}.important-info[_ngcontent-%COMP%], .important-info[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{color:green!important}.customer-events-table[_ngcontent-%COMP%]{border-collapse:collapse}.customer-events-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:0 5px;text-align:center}.not-this-event[_ngcontent-%COMP%], .this-event[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:1px solid;border-radius:4px;padding:0 4px;height:fit-content}.this-event[_ngcontent-%COMP%]{border:1px solid #ff8321;color:#ff8321}.price-change-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 5px}mat-card[_ngcontent-%COMP%]{padding:4px 8px;max-width:100%}.artist-fix-box[_ngcontent-%COMP%]{border:3px solid #333333;border-radius:4px;padding:4px}.artist-fix-box[_ngcontent-%COMP%]   nxt-slide-toggle[_ngcontent-%COMP%]{justify-content:center}.artist-fix-box[_ngcontent-%COMP%]   nxt-radio[_ngcontent-%COMP%]{font-size:75%}"]});let t=e;return t})()});function gfi(t,e){if(t&1){let n=re();h(0,"img",5,1),F("load",function(){V(n);let r=w();return B(r.imageLoadedInView())})("mousedown",function(r){V(n);let s=w();return B(s.startMove(r,s.moveTypes.Drag))})("touchstart",function(r){V(n);let s=w();return B(s.startMove(r,s.moveTypes.Drag))})("error",function(r){V(n);let s=w();return B(s.loadImageError(r))}),p()}if(t&2){let n=w();mo("visibility",n.imageVisible?"visible":"hidden")("transform",n.safeTransformStyle),ki("ngx-ic-draggable",!n.disabled&&n.allowMoveImage),b("src",n.safeImgDataUrl,Ur),Bn("alt",n.imageAltText)}}function vfi(t,e){if(t&1){let n=re();vs(0),h(1,"span",9),F("mousedown",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"topleft"))})("touchstart",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"topleft"))}),ee(2,"span",10),p(),h(3,"span",11),ee(4,"span",10),p(),h(5,"span",12),F("mousedown",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"topright"))})("touchstart",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"topright"))}),ee(6,"span",10),p(),h(7,"span",13),ee(8,"span",10),p(),h(9,"span",14),F("mousedown",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"bottomright"))})("touchstart",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"bottomright"))}),ee(10,"span",10),p(),h(11,"span",15),ee(12,"span",10),p(),h(13,"span",16),F("mousedown",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"bottomleft"))})("touchstart",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"bottomleft"))}),ee(14,"span",10),p(),h(15,"span",17),ee(16,"span",10),p(),h(17,"span",18),F("mousedown",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"top"))})("touchstart",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"top"))}),p(),h(18,"span",19),F("mousedown",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"right"))})("touchstart",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"right"))}),p(),h(19,"span",20),F("mousedown",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"bottom"))})("touchstart",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"bottom"))}),p(),h(20,"span",21),F("mousedown",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"left"))})("touchstart",function(r){V(n);let s=w(2);return B(s.startMove(r,s.moveTypes.Resize,"left"))}),p(),ys()}}function yfi(t,e){if(t&1){let n=re();h(0,"div",6),F("keydown",function(r){V(n);let s=w();return B(s.keyboardAccess(r))}),h(1,"div",7),F("mousedown",function(r){V(n);let s=w();return B(s.startMove(r,s.moveTypes.Move))})("touchstart",function(r){V(n);let s=w();return B(s.startMove(r,s.moveTypes.Move))}),p(),W(2,vfi,21,0,"ng-container",8),p()}if(t&2){let n=w();mo("top",n.cropper.y1,"px")("left",n.cropper.x1,"px")("width",n.cropper.x2-n.cropper.x1,"px")("height",n.cropper.y2-n.cropper.y1,"px")("margin-left",n.alignImage==="center"?n.marginLeft:null)("visibility",n.imageVisible?"visible":"hidden"),ki("ngx-ic-round",n.roundCropper),Bn("aria-label",n.cropperFrameAriaLabel),g(2),b("ngIf",!n.hideResizeSquares)}}function _fi(t){switch(t){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";case"ArrowLeft":default:return"left"}}function Cfi(t){switch(t){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";case"ArrowLeft":default:return"right"}}function xfi(t,e){switch(t){case"ArrowUp":return{clientX:0,clientY:e*-1};case"ArrowRight":return{clientX:e,clientY:0};case"ArrowDown":return{clientX:0,clientY:e};case"ArrowLeft":default:return{clientX:e*-1,clientY:0}}}function bfi(t,e,n){let i=t.width,r=t.height;e=Math.round(e),n=Math.round(n);let s=i/e,o=r/n,a=Math.ceil(s/2),l=Math.ceil(o/2),c=t.getContext("2d");if(c){let d=c.getImageData(0,0,i,r),u=c.createImageData(e,n),m=d.data,f=u.data;for(let _=0;_<n;_++)for(let x=0;x<e;x++){let D=(x+_*e)*4,E=_*o,M=0,I=0,z=0,G=0,A=0,Y=0,X=0,ne=Math.floor(x*s),pe=Math.floor(_*o),ce=Math.ceil((x+1)*s),ie=Math.ceil((_+1)*o);ce=Math.min(ce,i),ie=Math.min(ie,r);for(let le=pe;le<ie;le++){let Se=Math.abs(E-le)/l,je=x*s,ze=Se*Se;for(let Ge=ne;Ge<ce;Ge++){let Ae=Math.abs(je-Ge)/a,Ye=Math.sqrt(ze+Ae*Ae);if(Ye>=1)continue;M=2*Ye*Ye*Ye-3*Ye*Ye+1;let ft=4*(Ge+le*i);X+=M*m[ft+3],z+=M,m[ft+3]<255&&(M=M*m[ft+3]/250),G+=M*m[ft],A+=M*m[ft+1],Y+=M*m[ft+2],I+=M}}f[D]=G/I,f[D+1]=A/I,f[D+2]=Y/I,f[D+3]=X/z}t.width=e,t.height=n,c.putImageData(u,0,0)}}function PQe(t,e){return t/100*e}function Dfi(){return new Promise(t=>{let e=new Image;e.onload=()=>{let n=e.width===1&&e.height===2;t(n)},e.src=Tfi})}function Efi(t){switch(typeof t=="object"&&(t=Mfi(t)),t){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}function Mfi(t){let e=new DataView(t);if(e.getUint16(0,!1)!==65496)return-2;let n=e.byteLength,i=2;for(;i<n;){if(e.getUint16(i+2,!1)<=8)return-1;let r=e.getUint16(i,!1);if(i+=2,r==65505){if(e.getUint32(i+=2,!1)!==1165519206)return-1;let s=e.getUint16(i+=6,!1)==18761;i+=e.getUint32(i+4,s);let o=e.getUint16(i,s);i+=2;for(let a=0;a<o;a++)if(e.getUint16(i+a*12,s)==274)return e.getUint16(i+a*12+8,s)}else{if((r&65280)!==65280)break;i+=e.getUint16(i,!1)}}return-1}var mfi,ffi,e5e,p6,wfi,Sfi,Tfi,kfi,RQe,FQe,t5e=Q(()=>{me();me();od();od();Cl();$n();ri();ri();mfi=["wrapper"],ffi=["sourceImage"];e5e=class{constructor(){this.format="png",this.output="blob",this.maintainAspectRatio=!0,this.transform={},this.aspectRatio=1,this.resetCropOnAspectRatioChange=!0,this.resizeToWidth=0,this.resizeToHeight=0,this.cropperMinWidth=0,this.cropperMinHeight=0,this.cropperMaxHeight=0,this.cropperMaxWidth=0,this.cropperStaticWidth=0,this.cropperStaticHeight=0,this.canvasRotation=0,this.initialStepSize=3,this.roundCropper=!1,this.onlyScaleDown=!1,this.imageQuality=92,this.autoCrop=!0,this.backgroundColor=null,this.containWithinAspectRatio=!1,this.hideResizeSquares=!1,this.alignImage="center",this.cropperFrameAriaLabel="Crop photo",this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.cropperScaledMaxWidth=20,this.cropperScaledMaxHeight=20,this.stepSize=this.initialStepSize}setOptions(e){Object.keys(e).filter(n=>n in this).forEach(n=>this[n]=e[n]),this.validateOptions()}setOptionsFromChanges(e){Object.keys(e).filter(n=>n in this).forEach(n=>this[n]=e[n].currentValue),this.validateOptions()}validateOptions(){if(this.maintainAspectRatio&&!this.aspectRatio)throw new Error("`aspectRatio` should > 0 when `maintainAspectRatio` is enabled")}},p6=function(t){return t.Drag="drag",t.Move="move",t.Resize="resize",t.Pinch="pinch",t}(p6||{});wfi=(()=>{class t{crop(n,i,r,s,o){let a=this.getImagePosition(n,i,r,o),l=a.x2-a.x1,c=a.y2-a.y1,d=document.createElement("canvas");d.width=l,d.height=c;let u=d.getContext("2d");if(!u)return null;r.backgroundColor!=null&&(u.fillStyle=r.backgroundColor,u.fillRect(0,0,l,c));let m=(r.transform.scale||1)*(r.transform.flipH?-1:1),f=(r.transform.scale||1)*(r.transform.flipV?-1:1),{translateH:_,translateV:x}=this.getCanvasTranslate(n,r,o),D=n.transformed;u.setTransform(m,0,0,f,D.size.width/2+_,D.size.height/2+x),u.translate(-a.x1/m,-a.y1/f),u.rotate((r.transform.rotate||0)*Math.PI/180),u.drawImage(D.image,-D.size.width/2,-D.size.height/2);let E={width:l,height:c,imagePosition:a,cropperPosition:ve({},i)};r.containWithinAspectRatio&&(E.offsetImagePosition=this.getOffsetImagePosition(n,i,r,o));let M=this.getResizeRatio(l,c,r);return M!==1&&(E.width=Math.round(l*M),E.height=r.maintainAspectRatio?Math.round(E.width/r.aspectRatio):Math.round(c*M),bfi(d,E.width,E.height)),s==="blob"?this.cropToBlob(E,d,r):(E.base64=d.toDataURL("image/"+r.format,this.getQuality(r)),E)}cropToBlob(n,i,r){return O(this,null,function*(){return n.blob=yield new Promise(s=>i.toBlob(s,"image/"+r.format,this.getQuality(r))),n.blob&&(n.objectUrl=URL.createObjectURL(n.blob)),n})}getCanvasTranslate(n,i,r){if(i.transform.translateUnit==="px"){let s=this.getRatio(n,r);return{translateH:(i.transform.translateH||0)*s,translateV:(i.transform.translateV||0)*s}}else return{translateH:i.transform.translateH?PQe(i.transform.translateH,n.transformed.size.width):0,translateV:i.transform.translateV?PQe(i.transform.translateV,n.transformed.size.height):0}}getRatio(n,i){return n.transformed.size.width/i.width}getImagePosition(n,i,r,s){let o=this.getRatio(n,s),a={x1:Math.round(i.x1*o),y1:Math.round(i.y1*o),x2:Math.round(i.x2*o),y2:Math.round(i.y2*o)};return r.containWithinAspectRatio||(a.x1=Math.max(a.x1,0),a.y1=Math.max(a.y1,0),a.x2=Math.min(a.x2,n.transformed.size.width),a.y2=Math.min(a.y2,n.transformed.size.height)),a}getOffsetImagePosition(n,i,r,s){let o=r.canvasRotation+n.exifTransform.rotate,a=this.getRatio(n,s),l,c;o%2?(l=(n.transformed.size.width-n.original.size.height)/2,c=(n.transformed.size.height-n.original.size.width)/2):(l=(n.transformed.size.width-n.original.size.width)/2,c=(n.transformed.size.height-n.original.size.height)/2);let d={x1:Math.round(i.x1*a)-l,y1:Math.round(i.y1*a)-c,x2:Math.round(i.x2*a)-l,y2:Math.round(i.y2*a)-c};return r.containWithinAspectRatio||(d.x1=Math.max(d.x1,0),d.y1=Math.max(d.y1,0),d.x2=Math.min(d.x2,n.transformed.size.width),d.y2=Math.min(d.y2,n.transformed.size.height)),d}getResizeRatio(n,i,r){let s=r.resizeToWidth/n,o=r.resizeToHeight/i,a=new Array;r.resizeToWidth>0&&a.push(s),r.resizeToHeight>0&&a.push(o);let l=a.length===0?1:Math.min(...a);return l>1&&!r.onlyScaleDown?l:Math.min(l,1)}getQuality(n){return Math.min(1,Math.max(0,n.imageQuality/100))}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Sfi=(()=>{class t{resetCropperPosition(n,i,r,s){if(n?.nativeElement)if(r.cropperStaticHeight&&r.cropperStaticWidth)i.x1=0,i.x2=s.width>r.cropperStaticWidth?r.cropperStaticWidth:s.width,i.y1=0,i.y2=s.height>r.cropperStaticHeight?r.cropperStaticHeight:s.height;else{let o=Math.min(r.cropperScaledMaxWidth,s.width),a=Math.min(r.cropperScaledMaxHeight,s.height);if(!r.maintainAspectRatio)i.x1=0,i.x2=o,i.y1=0,i.y2=a;else if(s.width/r.aspectRatio<s.height){i.x1=0,i.x2=o;let l=o/r.aspectRatio;i.y1=(s.height-l)/2,i.y2=i.y1+l}else{i.y1=0,i.y2=a;let l=a*r.aspectRatio;i.x1=(s.width-l)/2,i.x2=i.x1+l}}}move(n,i,r){let s=this.getClientX(n)-i.clientX,o=this.getClientY(n)-i.clientY;r.x1=i.x1+s,r.y1=i.y1+o,r.x2=i.x2+s,r.y2=i.y2+o}resize(n,i,r,s,o){let a=this.getClientX(n)-i.clientX,l=this.getClientY(n)-i.clientY;switch(i.position){case"left":r.x1=Math.min(Math.max(i.x1+a,r.x2-o.cropperScaledMaxWidth),r.x2-o.cropperScaledMinWidth);break;case"topleft":r.x1=Math.min(Math.max(i.x1+a,r.x2-o.cropperScaledMaxWidth),r.x2-o.cropperScaledMinWidth),r.y1=Math.min(Math.max(i.y1+l,r.y2-o.cropperScaledMaxHeight),r.y2-o.cropperScaledMinHeight);break;case"top":r.y1=Math.min(Math.max(i.y1+l,r.y2-o.cropperScaledMaxHeight),r.y2-o.cropperScaledMinHeight);break;case"topright":r.x2=Math.max(Math.min(i.x2+a,r.x1+o.cropperScaledMaxWidth),r.x1+o.cropperScaledMinWidth),r.y1=Math.min(Math.max(i.y1+l,r.y2-o.cropperScaledMaxHeight),r.y2-o.cropperScaledMinHeight);break;case"right":r.x2=Math.max(Math.min(i.x2+a,r.x1+o.cropperScaledMaxWidth),r.x1+o.cropperScaledMinWidth);break;case"bottomright":r.x2=Math.max(Math.min(i.x2+a,r.x1+o.cropperScaledMaxWidth),r.x1+o.cropperScaledMinWidth),r.y2=Math.max(Math.min(i.y2+l,r.y1+o.cropperScaledMaxHeight),r.y1+o.cropperScaledMinHeight);break;case"bottom":r.y2=Math.max(Math.min(i.y2+l,r.y1+o.cropperScaledMaxHeight),r.y1+o.cropperScaledMinHeight);break;case"bottomleft":r.x1=Math.min(Math.max(i.x1+a,r.x2-o.cropperScaledMaxWidth),r.x2-o.cropperScaledMinWidth),r.y2=Math.max(Math.min(i.y2+l,r.y1+o.cropperScaledMaxHeight),r.y1+o.cropperScaledMinHeight);break;case"center":let c=n.scale,d=Math.min(Math.max(o.cropperScaledMinWidth,Math.abs(i.x2-i.x1)*c),o.cropperScaledMaxWidth),u=Math.min(Math.max(o.cropperScaledMinHeight,Math.abs(i.y2-i.y1)*c),o.cropperScaledMaxHeight);r.x1=i.clientX-d/2,r.x2=i.clientX+d/2,r.y1=i.clientY-u/2,r.y2=i.clientY+u/2,r.x1<0?(r.x2-=r.x1,r.x1=0):r.x2>s.width&&(r.x1-=r.x2-s.width,r.x2=s.width),r.y1<0?(r.y2-=r.y1,r.y1=0):r.y2>s.height&&(r.y1-=r.y2-s.height,r.y2=s.height);break}o.maintainAspectRatio&&this.checkAspectRatio(i.position,r,s,o)}checkAspectRatio(n,i,r,s){let o=0,a=0;switch(n){case"top":i.x2=i.x1+(i.y2-i.y1)*s.aspectRatio,o=Math.max(i.x2-r.width,0),a=Math.max(0-i.y1,0),(o>0||a>0)&&(i.x2-=a*s.aspectRatio>o?a*s.aspectRatio:o,i.y1+=a*s.aspectRatio>o?a:o/s.aspectRatio);break;case"bottom":i.x2=i.x1+(i.y2-i.y1)*s.aspectRatio,o=Math.max(i.x2-r.width,0),a=Math.max(i.y2-r.height,0),(o>0||a>0)&&(i.x2-=a*s.aspectRatio>o?a*s.aspectRatio:o,i.y2-=a*s.aspectRatio>o?a:o/s.aspectRatio);break;case"topleft":i.y1=i.y2-(i.x2-i.x1)/s.aspectRatio,o=Math.max(0-i.x1,0),a=Math.max(0-i.y1,0),(o>0||a>0)&&(i.x1+=a*s.aspectRatio>o?a*s.aspectRatio:o,i.y1+=a*s.aspectRatio>o?a:o/s.aspectRatio);break;case"topright":i.y1=i.y2-(i.x2-i.x1)/s.aspectRatio,o=Math.max(i.x2-r.width,0),a=Math.max(0-i.y1,0),(o>0||a>0)&&(i.x2-=a*s.aspectRatio>o?a*s.aspectRatio:o,i.y1+=a*s.aspectRatio>o?a:o/s.aspectRatio);break;case"right":case"bottomright":i.y2=i.y1+(i.x2-i.x1)/s.aspectRatio,o=Math.max(i.x2-r.width,0),a=Math.max(i.y2-r.height,0),(o>0||a>0)&&(i.x2-=a*s.aspectRatio>o?a*s.aspectRatio:o,i.y2-=a*s.aspectRatio>o?a:o/s.aspectRatio);break;case"left":case"bottomleft":i.y2=i.y1+(i.x2-i.x1)/s.aspectRatio,o=Math.max(0-i.x1,0),a=Math.max(i.y2-r.height,0),(o>0||a>0)&&(i.x1+=a*s.aspectRatio>o?a*s.aspectRatio:o,i.y2-=a*s.aspectRatio>o?a:o/s.aspectRatio);break;case"center":i.x2=i.x1+(i.y2-i.y1)*s.aspectRatio,i.y2=i.y1+(i.x2-i.x1)/s.aspectRatio;let l=Math.max(0-i.x1,0),c=Math.max(i.x2-r.width,0),d=Math.max(i.y2-r.height,0),u=Math.max(0-i.y1,0);(l>0||c>0||d>0||u>0)&&(i.x1+=d*s.aspectRatio>l?d*s.aspectRatio:l,i.x2-=u*s.aspectRatio>c?u*s.aspectRatio:c,i.y1+=u*s.aspectRatio>c?u:c/s.aspectRatio,i.y2-=d*s.aspectRatio>l?d:l/s.aspectRatio);break}}getClientX(n){return n.touches?.[0].clientX||n.clientX||0}getClientY(n){return n.touches?.[0].clientY||n.clientY||0}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Tfi="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==";kfi=(()=>{class t{constructor(){this.autoRotateSupported=Dfi()}loadImageFile(n,i){return O(this,null,function*(){let r=yield n.arrayBuffer();return yield this.checkImageTypeAndLoadImageFromArrayBuffer(r,n.type,i)})}checkImageTypeAndLoadImageFromArrayBuffer(n,i,r){return this.isValidImageType(i)?this.loadImageFromArrayBuffer(n,r,i):Promise.reject(new Error("Invalid image type"))}isValidImageType(n){return/image\/(png|jpg|jpeg|bmp|gif|tiff|svg|webp|x-icon|vnd.microsoft.icon)/.test(n)}loadImageFromURL(n,i){return O(this,null,function*(){let s=yield(yield fetch(n)).blob(),o=yield s.arrayBuffer();return yield this.loadImageFromArrayBuffer(o,i,s.type)})}loadBase64Image(n,i){let r=this.base64ToArrayBuffer(n);return this.loadImageFromArrayBuffer(r,i)}base64ToArrayBuffer(n){n=n.replace(/^data:([^;]+);base64,/gmi,"");let i=atob(n),r=i.length,s=new Uint8Array(r);for(let o=0;o<r;o++)s[o]=i.charCodeAt(o);return s.buffer}loadImageFromArrayBuffer(n,i,r){return O(this,null,function*(){let s=yield new Promise((o,a)=>O(this,null,function*(){try{let l=new Blob([n],r?{type:r}:void 0),c=URL.createObjectURL(l),d=new Image,m=r==="image/svg+xml"?yield this.getSvgImageSize(l):void 0;d.onload=()=>o({originalImage:d,originalImageSize:m,originalObjectUrl:c,originalArrayBuffer:n}),d.onerror=a,d.src=c}catch(l){a(l)}}));return yield this.transformImageFromArrayBuffer(s,i,s.originalImageSize!=null)})}getSvgImageSize(n){return O(this,null,function*(){let s=new DOMParser().parseFromString(yield n.text(),"image/svg+xml").querySelector("svg");if(!s)throw Error("Failed to parse SVG image");let o=s.getAttribute("width"),a=s.getAttribute("height");if(o&&a)return null;let l=s.getAttribute("viewBox")||s.getAttribute("viewbox");if(l){let c=l.split(" ");return{width:+c[2],height:+c[3]}}throw Error("Failed to load SVG image. SVG must have width + height or viewBox definition.")})}transformImageFromArrayBuffer(n,i,r=!1){return O(this,null,function*(){let s=yield this.autoRotateSupported,o=Efi(s?-1:n.originalArrayBuffer);if(!n.originalImage||!n.originalImage.complete)return Promise.reject(new Error("No image loaded"));let a={original:{objectUrl:n.originalObjectUrl,image:n.originalImage,size:n.originalImageSize??{width:n.originalImage.naturalWidth,height:n.originalImage.naturalHeight}},exifTransform:o};return this.transformLoadedImage(a,i,r)})}transformLoadedImage(n,i,r=!1){return O(this,null,function*(){let s=i.canvasRotation+n.exifTransform.rotate,o=n.original.size;if(!r&&s===0&&!n.exifTransform.flip&&!i.containWithinAspectRatio)return{original:{objectUrl:n.original.objectUrl,image:n.original.image,size:ve({},o)},transformed:{objectUrl:n.original.objectUrl,image:n.original.image,size:ve({},o)},exifTransform:n.exifTransform};let a=this.getTransformedSize(o,n.exifTransform,i),l=document.createElement("canvas");l.width=a.width,l.height=a.height;let c=l.getContext("2d");c?.setTransform(n.exifTransform.flip?-1:1,0,0,1,l.width/2,l.height/2),c?.rotate(Math.PI*(s/2)),c?.drawImage(n.original.image,-o.width/2,-o.height/2);let d=yield new Promise(f=>l.toBlob(f,i.format));if(!d)throw new Error("Failed to get Blob for transformed image.");let u=URL.createObjectURL(d),m=yield this.loadImageFromObjectUrl(u);return{original:{objectUrl:n.original.objectUrl,image:n.original.image,size:ve({},o)},transformed:{objectUrl:u,image:m,size:{width:m.width,height:m.height}},exifTransform:n.exifTransform}})}loadImageFromObjectUrl(n){return new Promise((i,r)=>{let s=new Image;s.onload=()=>i(s),s.onerror=r,s.src=n})}getTransformedSize(n,i,r){let s=r.canvasRotation+i.rotate;if(r.containWithinAspectRatio)if(s%2){let o=n.width*r.aspectRatio,a=n.height/r.aspectRatio;return{width:Math.max(n.height,o),height:Math.max(n.width,a)}}else{let o=n.height*r.aspectRatio,a=n.width/r.aspectRatio;return{width:Math.max(n.width,o),height:Math.max(n.height,a)}}return s%2?{height:n.width,width:n.height}:{width:n.width,height:n.height}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),RQe=(()=>{class t{constructor(n,i,r,s,o,a,l){this.cropService=n,this.cropperPositionService=i,this.loadImageService=r,this.sanitizer=s,this.cd=o,this.zone=a,this.hammerLoader=l,this.settings=new e5e,this.setImageMaxSizeRetries=0,this.resizedWhileHidden=!1,this.marginLeft="0px",this.maxSize={width:0,height:0},this.moveTypes=p6,this.imageVisible=!1,this.cropperFrameAriaLabel=this.settings.cropperFrameAriaLabel,this.output=this.settings.output,this.format=this.settings.format,this.transform={},this.maintainAspectRatio=this.settings.maintainAspectRatio,this.aspectRatio=this.settings.aspectRatio,this.resetCropOnAspectRatioChange=this.settings.resetCropOnAspectRatioChange,this.resizeToWidth=this.settings.resizeToWidth,this.resizeToHeight=this.settings.resizeToHeight,this.cropperMinWidth=this.settings.cropperMinWidth,this.cropperMinHeight=this.settings.cropperMinHeight,this.cropperMaxHeight=this.settings.cropperMaxHeight,this.cropperMaxWidth=this.settings.cropperMaxWidth,this.cropperStaticWidth=this.settings.cropperStaticWidth,this.cropperStaticHeight=this.settings.cropperStaticHeight,this.canvasRotation=this.settings.canvasRotation,this.initialStepSize=this.settings.initialStepSize,this.roundCropper=this.settings.roundCropper,this.onlyScaleDown=this.settings.onlyScaleDown,this.imageQuality=this.settings.imageQuality,this.autoCrop=this.settings.autoCrop,this.backgroundColor=this.settings.backgroundColor,this.containWithinAspectRatio=this.settings.containWithinAspectRatio,this.hideResizeSquares=this.settings.hideResizeSquares,this.allowMoveImage=!1,this.cropper={x1:-100,y1:-100,x2:1e4,y2:1e4},this.alignImage=this.settings.alignImage,this.disabled=!1,this.hidden=!1,this.imageCropped=new nt,this.startCropImage=new nt,this.imageLoaded=new nt,this.cropperReady=new nt,this.loadImageFailed=new nt,this.transformChange=new nt,this.reset()}ngOnChanges(n){this.onChangesUpdateSettings(n),this.onChangesInputImage(n),this.loadedImage?.original.image.complete&&(n.containWithinAspectRatio||n.canvasRotation)&&this.loadImageService.transformLoadedImage(this.loadedImage,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i)),(n.cropper||n.maintainAspectRatio||n.aspectRatio)&&(this.setMaxSize(),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize(),this.maintainAspectRatio&&(this.resetCropOnAspectRatioChange||!this.aspectRatioIsCorrect())&&(n.maintainAspectRatio||n.aspectRatio)?this.resetCropperPosition():n.cropper&&(this.checkCropperPosition(!1),this.doAutoCrop())),n.transform&&(this.transform=this.transform||{},this.setCssTransform(),this.doAutoCrop()),n.hidden&&this.resizedWhileHidden&&!this.hidden&&setTimeout(()=>{this.onResize(),this.resizedWhileHidden=!1})}onChangesUpdateSettings(n){this.settings.setOptionsFromChanges(n),this.settings.cropperStaticHeight&&this.settings.cropperStaticWidth&&(this.hideResizeSquares=!0,this.settings.setOptions({hideResizeSquares:!0,cropperMinWidth:this.settings.cropperStaticWidth,cropperMinHeight:this.settings.cropperStaticHeight,cropperMaxHeight:this.settings.cropperStaticHeight,cropperMaxWidth:this.settings.cropperStaticWidth,maintainAspectRatio:!1}))}onChangesInputImage(n){(n.imageChangedEvent||n.imageURL||n.imageBase64||n.imageFile)&&this.reset(),n.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),n.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),n.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),n.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}isValidImageChangedEvent(){return this.imageChangedEvent?.target?.files?.length>0}setCssTransform(){let n=this.transform?.translateUnit||"%";this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle(`translate(${this.transform.translateH||0}${n}, ${this.transform.translateV||0}${n}) scaleX(`+(this.transform.scale||1)*(this.transform.flipH?-1:1)+") scaleY("+(this.transform.scale||1)*(this.transform.flipV?-1:1)+") rotate("+(this.transform.rotate||0)+"deg)")}ngOnInit(){this.settings.stepSize=this.initialStepSize,this.activatePinchGesture()}reset(){this.imageVisible=!1,this.loadedImage=void 0,this.safeImgDataUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",this.moveStart={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},this.maxSize={width:0,height:0},this.cropper.x1=-100,this.cropper.y1=-100,this.cropper.x2=1e4,this.cropper.y2=1e4}loadImageFile(n){this.loadImageService.loadImageFile(n,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadBase64Image(n){this.loadImageService.loadBase64Image(n,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadImageFromURL(n){this.loadImageService.loadImageFromURL(n,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}setLoadedImage(n){this.loadedImage=n,this.safeImgDataUrl=this.sanitizer.bypassSecurityTrustResourceUrl(n.transformed.objectUrl),this.cd.markForCheck()}loadImageError(n){console.error(n),this.loadImageFailed.emit()}imageLoadedInView(){this.loadedImage!=null&&(this.imageLoaded.emit(this.loadedImage),this.setImageMaxSizeRetries=0,setTimeout(()=>this.checkImageMaxSizeRecursively()))}checkImageMaxSizeRecursively(){this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize(),this.resetCropperPosition(),this.cropperReady.emit(ve({},this.maxSize)),this.cd.markForCheck()):(this.setImageMaxSizeRetries++,setTimeout(()=>this.checkImageMaxSizeRecursively(),50))}sourceImageLoaded(){return this.sourceImage?.nativeElement?.offsetWidth>0}onResize(){if(this.loadedImage)if(this.hidden)this.resizedWhileHidden=!0;else{let n=ve({},this.maxSize);this.setMaxSize(),this.resizeCropperPosition(n),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize()}}activatePinchGesture(){return O(this,null,function*(){yield this.hammerLoader?.();let n=window?.Hammer||null;if(n){let i=new n(this.wrapper.nativeElement);i.get("pinch").set({enable:!0}),i.on("pinchmove",this.onPinch.bind(this)),i.on("pinchend",this.pinchStop.bind(this)),i.on("pinchstart",this.startPinch.bind(this))}else MO()&&console.warn("[NgxImageCropper] Could not find HammerJS - Pinch Gesture won't work")})}resizeCropperPosition(n){(n.width!==this.maxSize.width||n.height!==this.maxSize.height)&&(this.cropper.x1=this.cropper.x1*this.maxSize.width/n.width,this.cropper.x2=this.cropper.x2*this.maxSize.width/n.width,this.cropper.y1=this.cropper.y1*this.maxSize.height/n.height,this.cropper.y2=this.cropper.y2*this.maxSize.height/n.height)}resetCropperPosition(){this.cropperPositionService.resetCropperPosition(this.sourceImage,this.cropper,this.settings,this.maxSize),this.doAutoCrop(),this.imageVisible=!0}keyboardAccess(n){this.changeKeyboardStepSize(n),this.keyboardMoveCropper(n)}changeKeyboardStepSize(n){let i=+n.key;i>=1&&i<=9&&(this.settings.stepSize=i)}keyboardMoveCropper(n){if(!["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(n.key))return;let r=n.shiftKey?p6.Resize:p6.Move,s=n.altKey?Cfi(n.key):_fi(n.key),o=xfi(n.key,this.settings.stepSize);n.preventDefault(),n.stopPropagation(),this.startMove({clientX:0,clientY:0},r,s),this.handleMouseMove(o),this.handleMouseUp()}startMove(n,i,r=null){this.disabled||this.moveStart?.active&&this.moveStart?.type===p6.Pinch||i===p6.Drag&&!this.allowMoveImage||(n.preventDefault&&n.preventDefault(),this.moveStart=ve({active:!0,type:i,position:r,transform:ve({},this.transform),clientX:this.cropperPositionService.getClientX(n),clientY:this.cropperPositionService.getClientY(n)},this.cropper),this.initMouseMove())}initMouseMove(){ra(bh(document,"mousemove"),bh(document,"touchmove")).pipe(Mr(ra(bh(document,"mouseup"),bh(document,"touchend")).pipe(Jd()))).subscribe({next:n=>this.zone.run(()=>{this.handleMouseMove(n),this.cd.markForCheck()}),complete:()=>this.zone.run(()=>{this.handleMouseUp(),this.cd.markForCheck()})})}startPinch(n){this.safeImgDataUrl&&(n.preventDefault&&n.preventDefault(),this.moveStart=ve({active:!0,type:p6.Pinch,position:"center",clientX:this.cropper.x1+(this.cropper.x2-this.cropper.x1)/2,clientY:this.cropper.y1+(this.cropper.y2-this.cropper.y1)/2},this.cropper))}handleMouseMove(n){if(this.moveStart.active){if(n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),this.moveStart.type===p6.Move)this.cropperPositionService.move(n,this.moveStart,this.cropper),this.checkCropperPosition(!0);else if(this.moveStart.type===p6.Resize)!this.cropperStaticWidth&&!this.cropperStaticHeight&&this.cropperPositionService.resize(n,this.moveStart,this.cropper,this.maxSize,this.settings),this.checkCropperPosition(!1);else if(this.moveStart.type===p6.Drag){let i=this.cropperPositionService.getClientX(n)-this.moveStart.clientX,r=this.cropperPositionService.getClientY(n)-this.moveStart.clientY;this.transform=St(ve({},this.transform),{translateH:(this.moveStart.transform?.translateH||0)+i,translateV:(this.moveStart.transform?.translateV||0)+r}),this.setCssTransform()}}}onPinch(n){this.moveStart.active&&(n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),this.moveStart.type===p6.Pinch&&(this.cropperPositionService.resize(n,this.moveStart,this.cropper,this.maxSize,this.settings),this.checkCropperPosition(!1)),this.cd.markForCheck())}setMaxSize(){if(this.sourceImage){let n=getComputedStyle(this.sourceImage.nativeElement);this.maxSize.width=parseFloat(n.width),this.maxSize.height=parseFloat(n.height),this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.maxSize.width/2+"px)")}}setCropperScaledMinSize(){this.loadedImage?.transformed?.image?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.settings.cropperScaledMinWidth=20,this.settings.cropperScaledMinHeight=20)}setCropperScaledMinWidth(){this.settings.cropperScaledMinWidth=this.cropperMinWidth>0?Math.max(20,this.cropperMinWidth/this.loadedImage.transformed.image.width*this.maxSize.width):20}setCropperScaledMinHeight(){this.maintainAspectRatio?this.settings.cropperScaledMinHeight=Math.max(20,this.settings.cropperScaledMinWidth/this.aspectRatio):this.cropperMinHeight>0?this.settings.cropperScaledMinHeight=Math.max(20,this.cropperMinHeight/this.loadedImage.transformed.image.height*this.maxSize.height):this.settings.cropperScaledMinHeight=20}setCropperScaledMaxSize(){if(this.loadedImage?.transformed?.image){let n=this.loadedImage.transformed.size.width/this.maxSize.width;this.settings.cropperScaledMaxWidth=this.cropperMaxWidth>20?this.cropperMaxWidth/n:this.maxSize.width,this.settings.cropperScaledMaxHeight=this.cropperMaxHeight>20?this.cropperMaxHeight/n:this.maxSize.height,this.maintainAspectRatio&&(this.settings.cropperScaledMaxWidth>this.settings.cropperScaledMaxHeight*this.aspectRatio?this.settings.cropperScaledMaxWidth=this.settings.cropperScaledMaxHeight*this.aspectRatio:this.settings.cropperScaledMaxWidth<this.settings.cropperScaledMaxHeight*this.aspectRatio&&(this.settings.cropperScaledMaxHeight=this.settings.cropperScaledMaxWidth/this.aspectRatio))}else this.settings.cropperScaledMaxWidth=this.maxSize.width,this.settings.cropperScaledMaxHeight=this.maxSize.height}checkCropperPosition(n=!1){this.cropper.x1<0&&(this.cropper.x2-=n?this.cropper.x1:0,this.cropper.x1=0),this.cropper.y1<0&&(this.cropper.y2-=n?this.cropper.y1:0,this.cropper.y1=0),this.cropper.x2>this.maxSize.width&&(this.cropper.x1-=n?this.cropper.x2-this.maxSize.width:0,this.cropper.x2=this.maxSize.width),this.cropper.y2>this.maxSize.height&&(this.cropper.y1-=n?this.cropper.y2-this.maxSize.height:0,this.cropper.y2=this.maxSize.height)}handleMouseUp(){this.moveStart.active&&(this.moveStart.active=!1,this.moveStart?.type===p6.Drag?this.transformChange.emit(this.transform):this.doAutoCrop())}pinchStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}doAutoCrop(){this.autoCrop&&this.crop()}crop(n=this.settings.output){if(this.loadedImage?.transformed?.image!=null){if(this.startCropImage.emit(),n==="blob")return this.cropToBlob();if(n==="base64")return this.cropToBase64()}return null}cropToBlob(){return new Promise((n,i)=>this.zone.run(()=>O(this,null,function*(){let r=yield this.cropService.crop(this.loadedImage,this.cropper,this.settings,"blob",this.maxSize);r?(this.imageCropped.emit(r),n(r)):i("Crop image failed")})))}cropToBase64(){let n=this.cropService.crop(this.loadedImage,this.cropper,this.settings,"base64",this.maxSize);return n?(this.imageCropped.emit(n),n):null}aspectRatioIsCorrect(){return(this.cropper.x2-this.cropper.x1)/(this.cropper.y2-this.cropper.y1)===this.aspectRatio}}return t.\u0275fac=function(n){return new(n||t)(R(wfi),R(Sfi),R(kfi),R(Uo),R(Kt),R(pn),R(MMe,8))},t.\u0275cmp=_e({type:t,selectors:[["image-cropper"]],viewQuery:function(n,i){if(n&1&&(ei(mfi,7),ei(ffi,5)),n&2){let r;Pt(r=Rt())&&(i.wrapper=r.first),Pt(r=Rt())&&(i.sourceImage=r.first)}},hostVars:6,hostBindings:function(n,i){n&1&&F("resize",function(){return i.onResize()},!1,vy),n&2&&(mo("text-align",i.alignImage),ki("disabled",i.disabled)("ngx-ix-hidden",i.hidden))},inputs:{imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",imageAltText:"imageAltText",cropperFrameAriaLabel:"cropperFrameAriaLabel",output:"output",format:"format",transform:"transform",maintainAspectRatio:"maintainAspectRatio",aspectRatio:"aspectRatio",resetCropOnAspectRatioChange:"resetCropOnAspectRatioChange",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperMaxHeight:"cropperMaxHeight",cropperMaxWidth:"cropperMaxWidth",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",autoCrop:"autoCrop",backgroundColor:"backgroundColor",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",allowMoveImage:"allowMoveImage",cropper:"cropper",alignImage:"alignImage",disabled:"disabled",hidden:"hidden"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed",transformChange:"transformChange"},features:[yn],decls:5,vars:10,consts:[["wrapper",""],["sourceImage",""],["class","ngx-ic-source-image","role","presentation",3,"src","visibility","transform","ngx-ic-draggable","load","mousedown","touchstart","error",4,"ngIf"],[1,"ngx-ic-overlay"],["class","ngx-ic-cropper","tabindex","0",3,"ngx-ic-round","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],["role","presentation",1,"ngx-ic-source-image",3,"load","mousedown","touchstart","error","src"],["tabindex","0",1,"ngx-ic-cropper",3,"keydown"],["role","presentation",1,"ngx-ic-move",3,"mousedown","touchstart"],[4,"ngIf"],["role","presentation",1,"ngx-ic-resize","ngx-ic-topleft",3,"mousedown","touchstart"],[1,"ngx-ic-square"],[1,"ngx-ic-resize","ngx-ic-top"],["role","presentation",1,"ngx-ic-resize","ngx-ic-topright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-right"],["role","presentation",1,"ngx-ic-resize","ngx-ic-bottomright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-bottom"],["role","presentation",1,"ngx-ic-resize","ngx-ic-bottomleft",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-left"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-top",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-right",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-bottom",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-left",3,"mousedown","touchstart"]],template:function(n,i){n&1&&(h(0,"div",null,0),W(2,gfi,2,8,"img",2),ee(3,"div",3),W(4,yfi,3,16,"div",4),p()),n&2&&(mo("background",i.imageVisible&&i.backgroundColor),g(2),b("ngIf",i.safeImgDataUrl),g(),mo("width",i.maxSize.width,"px")("height",i.maxSize.height,"px")("margin-left",i.alignImage==="center"?i.marginLeft:null),g(),b("ngIf",i.imageVisible))},dependencies:[Ct],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%]   img.ngx-ic-source-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]   img.ngx-ic-source-image.ngx-ic-draggable[_ngcontent-%COMP%]{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}[_nghost-%COMP%]   .ngx-ic-overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:#53535c;background:transparent;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color, rgba(255, 255, 255, .3)) solid 100vw;touch-action:none}@media (orientation: portrait){[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]{outline-width:100vh}}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-move[_ngcontent-%COMP%]{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]:focus   .ngx-ic-move[_ngcontent-%COMP%]{border-color:#1e90ff;border-width:2px}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize[_ngcontent-%COMP%]   .ngx-ic-square[_ngcontent-%COMP%]{display:inline-block;background:#53535C;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize.ngx-ic-left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar.ngx-ic-top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar.ngx-ic-right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar.ngx-ic-left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%]   .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%]   .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw #ffffff4d;box-shadow:0 0 0 100vw var(--cropper-outline-color, rgba(255, 255, 255, .3))}@media (orientation: portrait){[_nghost-%COMP%]   .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}[_nghost-%COMP%]   .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]   .ngx-ic-move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-resize-bar[_ngcontent-%COMP%], .disabled[_nghost-%COMP%]   .ngx-ic-cropper[_ngcontent-%COMP%]   .ngx-ic-move[_ngcontent-%COMP%]{display:none}.ngx-ix-hidden[_nghost-%COMP%]{display:none}'],changeDetection:0}),t})(),FQe=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({imports:[[sd]]}),t})()});function Afi(t,e){if(t&1&&ee(0,"img",6),t&2){let n=w();b("src",n.croppedImage,Ur)}}var LQe,OQe=Q(()=>{me();Gi();t5e();ri();Zi();ls();me();ji();od();t5e();LQe=(()=>{let e=class e extends bt{constructor(i,r){super(),this.dialogRef=i,this.sanitizer=r,this.src=gt(""),this.showPreview=gt(!0),this.croppedImage=gt(""),this.canvasRotation=gt(0),this.buttonText=gt("OK")}ngOnInit(){}nxtOnDestroy(){}setData(i){this.src.set(URL.createObjectURL(new Blob([i])))}imageCropped(i){this.croppedImage.set(this.sanitizer.bypassSecurityTrustUrl(i.objectUrl).toString()),this.currentBlob=i.blob}rotateLeftClicked(){this.canvasRotation.update(i=>i+1)}buttonClicked(){this.dialogRef.close(new Response(this.currentBlob).arrayBuffer())}cancelClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(Uo))},e.\u0275cmp=_e({type:e,selectors:[["nxt-image-crop"]],standalone:!0,features:[et,xe],decls:11,vars:6,consts:[[1,"flex","flex-col"],[1,"flex","flex-col","justify-center","items-center",2,"border","0px solid red","max-width","50vw","max-height","50vh"],[2,"border","0px solid green",3,"imageCropped","imageURL","maintainAspectRatio","canvasRotation","imageQuality"],["style","height: 25vh; width: fit-content",3,"src",4,"ngIf"],[1,"flex","flex-row","justify-around"],[3,"click"],[2,"height","25vh","width","fit-content",3,"src"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"image-cropper",2),F("imageCropped",function(a){return s.imageCropped(a)}),p()(),W(3,Afi,1,1,"img",3),h(4,"div",4)(5,"nxt-button",5),F("click",function(){return s.cancelClicked()}),y(6,"Abbrechen"),p(),h(7,"nxt-button",5),F("click",function(){return s.rotateLeftClicked()}),y(8,"Bild drehen"),p(),h(9,"nxt-button",5),F("click",function(){return s.buttonClicked()}),y(10),p()()()),r&2&&(g(2),b("imageURL",s.src())("maintainAspectRatio",!1)("canvasRotation",s.canvasRotation())("imageQuality",100),g(),b("ngIf",s.src()&&s.showPreview()),g(7),ye(s.buttonText()))},dependencies:[FQe,RQe,Ct,Lt],styles:["[_nghost-%COMP%]     image-cropper{--cropper-overlay-color: #000000}[_nghost-%COMP%]     image-cropper .ngx-ic-cropper{outline:var(--cropper-outline-color, rgba(255, 255, 255, .26)) solid 100vw!important}[_nghost-%COMP%]     image-cropper>div{display:flex;justify-content:center;align-content:center}"],changeDetection:0});let t=e;return t})()});var Pfi,NQe,VQe=Q(()=>{me();Gi();ED();Yc();Qo();ls();Vt();me();ji();Vt();Pfi=()=>["update","create"],NQe=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.contactId=gt(""),this.propDefs=[{field:"weeklyBroadcast",name:"Weekly Broadcast",type:Ee.Boolean},{field:"taglines",name:"Interne Infos",type:Ee.Text},{field:"oldMobilesFormatted",name:"Alte Nummern",valueGetter:r=>r.map(s=>s.m).join(", "),type:Ee.Text},{field:"birthday",name:"Geburtstag",type:Ee.Date_germanDate}],this.hiddenProps=["testBroadcast","suffix"],this.debugProps=[],this.showTitle=!1,this.showDebug=!1,this.hiddenProps.push(...this.debugProps)}setData(i){this.contactId.set(i.replace(/\//g,"_"))}ngOnInit(){this.propDefs=this.propDefs.sort(Hr.sortString("name"))}nxtOnDestroy(){}prepareRawData(i){return i}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-contact-history"]],viewQuery:function(r,s){if(r&1&&ei($1,5),r&2){let o;Pt(o=Rt())&&(s.historyComponent=o.first)}},standalone:!0,features:[et,xe],decls:6,vars:6,consts:[["historyComponent",""],["fxLayout","column",1,"nxt-page","w-full","h-100"],["fxLayout","row","fxLayoutAlign","end"],[3,"click"],["table","contacts",1,"w-full","h-100",3,"id","actions","propDefs","prepareRawData","hiddenProps"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"nxt-button-icon",3),F("click",function(){return V(o),B(s.close())}),y(3,"close"),p()(),ee(4,"nxt-history",4,0),p()}r&2&&(g(4),b("id",s.contactId())("actions",bn(5,Pfi))("propDefs",s.propDefs)("prepareRawData",s.prepareRawData)("hiddenProps",s.hiddenProps))},dependencies:[At,Yt,oi,an,$1]});let t=e;return t})()});function Rfi(t,e){t&1&&(h(0,"th"),y(1,"Vorname"),p())}function Ffi(t,e){t&1&&(h(0,"th"),y(1,"Nachname"),p())}function Lfi(t,e){t&1&&(h(0,"th"),y(1,"Geburtstag"),p())}function Ofi(t,e){t&1&&(h(0,"th"),y(1,"Handy"),p())}function Nfi(t,e){t&1&&(h(0,"th"),y(1,"E-Mail"),p())}function Vfi(t,e){t&1&&(h(0,"th"),y(1,"Stra\xDFe"),p())}function Bfi(t,e){t&1&&(h(0,"th"),y(1,"PLZ"),p())}function zfi(t,e){t&1&&(h(0,"th"),y(1,"Ort"),p())}function Hfi(t,e){t&1&&(h(0,"th"),y(1,"Land"),p())}function Gfi(t,e){t&1&&(h(0,"th"),y(1,"Sprache"),p())}function Wfi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w(2).$implicit,i=w(2);g(),ye(Nt(2,1,i.possibleAttributes()[n][0],"dd.MM.yyyy"))}}function Ufi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2).$implicit,i=w(2);g(),ye(i.possibleAttributes()[n][0])}}function jfi(t,e){if(t&1&&(h(0,"td"),W(1,Wfi,3,4,"div")(2,Ufi,2,1,"div"),p()),t&2){let n=w().$implicit;g(),Je(n==="birthday"?1:2)}}function $fi(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w().$implicit,s=w(2).$implicit,o=w(2);return B(o.setAttrClicked(s,r))}),y(1),Ce(2,"nxtDate"),p()}if(t&2){let n=w().$implicit;g(),ye(Nt(2,1,n,"dd.MM.yyyy"))}}function Kfi(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w().$implicit,s=w(2).$implicit,o=w(2);return B(o.setAttrClicked(s,r))}),y(1),p()}if(t&2){let n=w().$implicit;g(),ye(n)}}function Yfi(t,e){if(t&1&&W(0,$fi,3,4,"nxt-button")(1,Kfi,2,1,"nxt-button"),t&2){let n=w(2).$implicit;Je(n==="birthday"?0:1)}}function qfi(t,e){if(t&1&&(h(0,"td")(1,"div",11),Kn(2,Yfi,2,1,null,null,sa),p()()),t&2){let n=w().$implicit,i=w(2);ki("background-dark-red",i.newContact()[n]===null)("background-green",i.newContact()[n]!==null),g(2),Yn(i.possibleAttributes()[n])}}function Zfi(t,e){if(t&1&&W(0,jfi,3,1,"td")(1,qfi,4,4,"td",10),t&2){let n=e.$implicit,i=w(2);Je(i.possibleAttributes()[n].length===1?0:-1),g(),Je(i.possibleAttributes()[n].length>1?1:-1)}}function Xfi(t,e){t&1&&(h(0,"tr")(1,"td",12)(2,"div",13),y(3,"Ergebnis"),p()()())}function Qfi(t,e){if(t&1&&(y(0),Ce(1,"nxtDate")),t&2){let n=w(2).$implicit,i=w(3);Ke(" ",Nt(1,1,i.newContact()[n],"dd.MM.yyyy")," ")}}function Jfi(t,e){if(t&1&&y(0),t&2){let n=w(2).$implicit,i=w(3);Ke(" ",i.newContact()[n]," ")}}function e1i(t,e){if(t&1&&(h(0,"td")(1,"div",16),W(2,Qfi,2,4)(3,Jfi,1,1),p()()),t&2){let n=w().$implicit,i=w(3);ki("background-dark-red",i.newContact()[n]===null),g(2),Je(n==="birthday"?2:3)}}function t1i(t,e){if(t&1&&W(0,e1i,4,3,"td",15),t&2){let n=e.$implicit,i=w(3);Je(i.possibleAttributes()[n].length>0?0:-1)}}function i1i(t,e){if(t&1&&(h(0,"tr",14),Kn(1,t1i,1,1,null,null,sa),p()),t&2){let n=w(2);g(),Yn(n.attributes())}}function n1i(t,e){if(t&1&&(h(0,"table",3)(1,"tr",7),W(2,Rfi,2,0,"th",8)(3,Ffi,2,0,"th",8)(4,Lfi,2,0,"th",8)(5,Ofi,2,0,"th",8)(6,Nfi,2,0,"th",8)(7,Vfi,2,0,"th",8)(8,Bfi,2,0,"th",8)(9,zfi,2,0,"th",8)(10,Hfi,2,0,"th",8)(11,Gfi,2,0,"th",8),p(),h(12,"tr"),Kn(13,Zfi,2,2,null,null,sa),p(),W(15,Xfi,4,0,"tr",8)(16,i1i,3,0,"tr",9),p()),t&2){let n=w();g(2),b("ngIf",n.possibleAttributes().givenName.length>0),g(),b("ngIf",n.possibleAttributes().familyName.length>0),g(),b("ngIf",n.possibleAttributes().birthday.length>0),g(),b("ngIf",n.possibleAttributes().mobile.length>0),g(),b("ngIf",n.possibleAttributes().email.length>0),g(),b("ngIf",n.possibleAttributes().streetAddress.length>0),g(),b("ngIf",n.possibleAttributes().postalCode.length>0),g(),b("ngIf",n.possibleAttributes().city.length>0),g(),b("ngIf",n.possibleAttributes().country.length>0),g(),b("ngIf",n.possibleAttributes().lang.length>0),g(2),Yn(n.attributes()),g(2),b("ngIf",n.newContact),g(),b("ngIf",n.newContact())}}function r1i(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.combine())}),y(1,"Zusammenf\xFChren"),p()}}var i5e,BQe,zQe=Q(()=>{me();Gi();yi();Ci();go();Zi();oo();mg();ri();xB();pa();i5e=Gs(P7());Ul();Kr();me();ji();BQe=(()=>{let e=class e extends bt{constructor(i,r){super(),this.cdRef=i,this.dialogRef=r,this.possibleAttributes=gt(null),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.loginService=Ve(Fi),this.newContact=gt(null),this.contacts=gt([]),this.attributes=gt([]),this.canCombine=vr(()=>{for(let s of this.attributes())if(this.newContact()[s]===null)return!1;return!0})}ngOnInit(){}nxtOnDestroy(){}setContactAttr(i,r){this.newContact.update(s=>(s[i]=r,so(s)))}setContacts(i){return O(this,null,function*(){let r=yield Promise.all(i.map(s=>O(this,null,function*(){return this.socketService.getContactById(s)})));if(this.contacts.set(r.filter(s=>!!s)),this.contacts().length>1){this.possibleAttributes.set(Uv.getPossibleCombineAttributes(this.contacts())),this.newContact.set(so(this.contacts()[0]));for(let s of(0,i5e.keys)(this.possibleAttributes()))this.possibleAttributes()[s].length===0?this.setContactAttr(s,""):this.possibleAttributes()[s].length===1?this.setContactAttr(s,this.possibleAttributes()[s][0]):this.setContactAttr(s,null)}else this.dialogService.showOk("Du musst mehr als ein Kontakt ausw\xE4hlen"),this.socketService.sendTelegramAdmin(`Du musst mehr als ein Kontakt ausw\xE4hlen

`+this.loginService.getUsername()+`

`+i.join("&")+`

`+Qn.stringifyFormat(this.contacts())),this.dialogRef.close();this.attributes.set((0,i5e.keys)(this.possibleAttributes()))})}close(){this.dialogRef.close()}setAttribute(i,r){console.log(i,r)}combine(){return O(this,null,function*(){this.dialogService.showLoading("Kontakte werden zusammengef\xFChrt..."),this.newContact.set(St(ve({},this.newContact()),{fullName:this.newContact().givenName+" "+this.newContact().familyName})),yield this.socketService.combineContacts2(this.newContact(),this.contacts().map(i=>i.id)),this.dialogService.hideLoading(),this.dialogRef.close()})}setAttrClicked(i,r){this.setContactAttr(i,r)}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(Gt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-combine-contacts-2"]],standalone:!0,features:[et,xe],decls:11,vars:2,consts:[[1,"flex","flex-col","nxt-page"],[1,"flex","flex-col"],[1,"center","text-xl","w-full","my-4"],[1,"nxt-table",2,"border","none"],[1,"flex","flex-row","mt-4","justify-around"],[3,"click"],[3,"click",4,"ngIf"],[1,"header-tr"],[4,"ngIf"],["style","font-weight: bold",4,"ngIf"],[3,"background-dark-red","background-green"],[1,"flex","flex-col","items-center","gap-3"],["colspan","8",1,"center",2,"border","none"],[1,"text-xl","pt-3"],[2,"font-weight","bold"],[3,"background-dark-red"],[1,"flex","flex-row","items-center"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),y(3," Kontakte zusammenf\xFChren "),p(),h(4,"div"),y(5,"W\xE4hle die Korrekten Daten!"),p(),W(6,n1i,17,12,"table",3),h(7,"div",4)(8,"nxt-button",5),F("click",function(){return s.close()}),y(9,"Abbrechen"),p(),W(10,r1i,2,0,"nxt-button",6),p()()()),r&2&&(g(6),Je(s.possibleAttributes()?6:-1),g(4),b("ngIf",s.canCombine()))},dependencies:[Ct,Lt,Hn],styles:["[_nghost-%COMP%]   table[_ngcontent-%COMP%]{font-size:85%}[_nghost-%COMP%]   table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0});let t=e;return t})()});var s1i,HQe,GQe=Q(()=>{me();Gi();ED();Yc();Qo();ls();Vt();me();ji();Vt();s1i=()=>["update","create"],HQe=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.employeeId=gt(""),this.propDefs=[{field:"weeklyBroadcast",name:"Weekly Broadcast",type:Ee.Boolean},{field:"taglines",name:"Interne Infos",type:Ee.Text},{field:"oldMobilesFormatted",name:"Alte Nummern",valueGetter:r=>r.map(s=>s.m).join(", "),type:Ee.Text},{field:"birthday",name:"Geburtstag",type:Ee.Date_germanDate}],this.hiddenProps=["testBroadcast","suffix"],this.debugProps=[],this.showTitle=!1,this.showDebug=!1,this.hiddenProps.push(...this.debugProps)}setData(i){this.employeeId.set(i)}ngOnInit(){this.propDefs=this.propDefs.sort(Hr.sortString("name"))}nxtOnDestroy(){}prepareRawData(i){return i}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-history"]],viewQuery:function(r,s){if(r&1&&ei($1,5),r&2){let o;Pt(o=Rt())&&(s.historyComponent=o.first)}},standalone:!0,features:[et,xe],decls:6,vars:6,consts:[["historyComponent",""],["fxLayout","column",1,"nxt-page","w-full","h-100"],["fxLayout","row","fxLayoutAlign","end"],[3,"click"],["table","employee",1,"w-full","h-100",3,"id","actions","propDefs","prepareRawData","hiddenProps"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"nxt-button-icon",3),F("click",function(){return V(o),B(s.close())}),y(3,"close"),p()(),ee(4,"nxt-history",4,0),p()}r&2&&(g(4),b("id",s.employeeId())("actions",bn(5,s1i))("propDefs",s.propDefs)("prepareRawData",s.prepareRawData)("hiddenProps",s.hiddenProps))},dependencies:[At,Yt,oi,an,$1]});let t=e;return t})()});var x3,n5e=Q(()=>{x3=(()=>{let e=class e{};e.colors={red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},deepPurple:{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},lightBlue:{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},lightGreen:{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},deepOrange:{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},blueGrey:{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"}};let t=e;return t})()});function o1i(t,e){if(t&1&&(h(0,"div",1),y(1),p()),t&2){let n=w();g(),ye(n.title())}}function a1i(t,e){if(t&1){let n=re();h(0,"div",4),F("click",function(){let r=V(n).$implicit,s=w().$implicit,o=w();return B(o.setCurrentColor(s,r))}),y(1),p()}if(t&2){let n=e.$implicit,i=w().$implicit,r=w();mo("color",r.ColorTools.getLightOrDarkFontColorByBackground(r.MaterialColors.colors[i][n]))("background-color",r.MaterialColors.colors[i][n]),ki("current",r.currentIndex()===i+n),g(),Ke("",r.colorInfos()[r.MaterialColors.colors[i][n]]," ")}}function l1i(t,e){if(t&1&&(h(0,"div",0),Kn(1,a1i,2,7,"div",3,sa),p()),t&2){let n=w();g(),Yn(n.colorSteps)}}var lee,WQe,UQe=Q(()=>{me();Gi();jc();n5e();lee=Gs(P7());ji();P0();me();WQe=(()=>{let e=class e extends bt{constructor(){super(),this.colorInfos=mj({}),this.color=gt("#ab47bc"),this.title=gt(""),this.cdRef=Ve(Kt),this.dialogRef=Ve(Gt),this.colors=(0,lee.keys)(x3.colors),this.colorSteps=["200","300","400","500","600","700","800","900"],this.currentIndex=vr(()=>{for(let i of(0,lee.keys)(x3.colors))for(let r of(0,lee.keys)(x3.colors[i]))if(x3.colors[i][r]===this.color())return i+r;return""}),this.ColorTools=xn,this.MaterialColors=x3}setCurrentColor(i,r){this.dialogRef.close(x3.colors[i][r])}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-color-picker"]],inputs:{colorInfos:[1,"colorInfos"]},outputs:{colorInfos:"colorInfosChange"},standalone:!0,features:[et,xe],decls:5,vars:1,consts:[[1,"flex","flex-col"],[1,"text-[130%]","center","w-full"],[1,"flex","flex-row","p-3"],[1,"flex","text-60","color-item","o-hidden","items-center","justify-center","text-center","cursor-pointer",3,"color","current","background-color"],[1,"flex","text-60","color-item","o-hidden","items-center","justify-center","text-center","cursor-pointer",3,"click"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,o1i,2,1,"div",1),h(2,"div",2),Kn(3,l1i,3,0,"div",0,sa),p()()),r&2&&(g(),Je(s.title()?1:-1),g(2),Yn(s.colors))},styles:[".color-item[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:4px;margin:1px}.color-item.current[_ngcontent-%COMP%]{transition:transform .2s;outline:3px solid #fff;transform:scale(1.3)}"],changeDetection:0});let t=e;return t})()});var c1i,jQe,$Qe=Q(()=>{me();Gi();ED();Yc();ls();Vt();me();ji();Vt();c1i=()=>["update","create"],jQe=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.artistSpotId=gt(""),this.propDefs=[],this.hiddenProps=[],this.debugProps=[],this.showTitle=!1,this.showDebug=!1,this.hiddenProps.push(...this.debugProps)}setData(i){this.artistSpotId.set(i)}ngOnInit(){this.propDefs=this.propDefs.sort(Hr.sortString("name"))}nxtOnDestroy(){}prepareRawData(i){return i}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-spot-history"]],viewQuery:function(r,s){if(r&1&&ei($1,5),r&2){let o;Pt(o=Rt())&&(s.historyComponent=o.first)}},standalone:!0,features:[et,xe],decls:6,vars:6,consts:[["historyComponent",""],["fxLayout","column",1,"nxt-page","w-full","h-100"],["fxLayout","row","fxLayoutAlign","end"],[3,"click"],["table","artist-spot",1,"w-full","h-100",3,"id","actions","propDefs","prepareRawData","hiddenProps"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"nxt-button-icon",3),F("click",function(){return V(o),B(s.close())}),y(3,"close"),p()(),ee(4,"nxt-history",4,0),p()}r&2&&(g(4),b("id",s.artistSpotId())("actions",bn(5,c1i))("propDefs",s.propDefs)("prepareRawData",s.prepareRawData)("hiddenProps",s.hiddenProps))},dependencies:[At,Yt,oi,an,$1]});let t=e;return t})()});function p1i(t,e){if(t&1){let n=re();h(0,"div",2)(1,"nxt-date-picker-2",7),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.dateString,r)||(s.dateString=r),B(r)}),p(),h(2,"div",8)(3,"nxt-slide-toggle",9),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showEventsOnlyWithPhotosOrVideos,r)||(s.showEventsOnlyWithPhotosOrVideos=r),B(r)}),y(4,"Nur mit Tattoo-Fotos"),p(),h(5,"nxt-slide-toggle",9),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showEventsOnlyToFewRatings,r)||(s.showEventsOnlyToFewRatings=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.showEventsOnlyToFewRatingsChanged())}),y(6,"zu wenig Bewertungen"),p(),h(7,"nxt-slide-toggle",9),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showEventsOnlyWithoutMyCheck,r)||(s.showEventsOnlyWithoutMyCheck=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.showEventsOnlyWithoutMyCheckChanged())}),y(8,"Ohne Bewertung von mir "),p()()()}if(t&2){let n=w();g(),b("jumpDays",!0)("noPadding",!0),qe("value",n.dateString),g(2),qe("value",n.showEventsOnlyWithPhotosOrVideos),g(2),qe("value",n.showEventsOnlyToFewRatings),g(2),qe("value",n.showEventsOnlyWithoutMyCheck)}}function m1i(t,e){if(t&1&&(h(0,"div",4),y(1),p()),t&2){let n=w();g(),ye(n.artist())}}function f1i(t,e){t&1&&(h(0,"div"),y(1,"noch 1 Termin"),p())}function g1i(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2);g(),cn("",n.currentIndex()+1," / ",n.eventsFiltered().length," Termine")}}function v1i(t,e){if(t&1&&(h(0,"div",5),W(1,f1i,2,0,"div")(2,g1i,2,2,"div"),p()),t&2){let n=w();g(),Je(n.eventsFiltered().length===1?1:2)}}function y1i(t,e){t&1&&y(0," Keine Termine, die du noch nicht bewertet hast. ")}function _1i(t,e){t&1&&y(0," Keine Termine ohne Bewertungen. ")}function C1i(t,e){t&1&&y(0," Keine Termine zum Bewerten. ")}function x1i(t,e){if(t&1&&(h(0,"div",6),W(1,y1i,1,0)(2,_1i,1,0)(3,C1i,1,0),p()),t&2){let n=w();g(),Je(n.showEventsOnlyWithoutMyCheck()?1:n.showEventsOnlyToFewRatings()?2:3)}}function b1i(t,e){if(t&1){let n=re();h(0,"div",12)(1,"nxt-button-icon",11),F("click",function(){V(n);let r=w(2);return B(r.prevClicked())}),y(2,"arrow_back_ios_new"),p(),h(3,"nxt-button-icon",11),F("click",function(){V(n);let r=w(2);return B(r.nextClicked())}),y(4,"arrow_forward_ios"),p()()}}function w1i(t,e){if(t&1){let n=re();h(0,"nxt-button",21),F("click",function(){V(n);let r=w(2);return B(r.showEventClicked())}),y(1,"Termin \xF6ffnen"),p()}t&2&&b("smallButton",!0)}function S1i(t,e){t&1&&(h(0,"div"),y(1,"l\xE4uft noch"),p())}function T1i(t,e){if(t&1){let n=re();h(0,"nxt-button",21),F("click",function(){V(n);let r=w(3);return B(r.showArtistClicked())}),y(1,"mehr vom Artist"),p()}t&2&&b("smallButton",!0)}function D1i(t,e){if(t&1&&(h(0,"td"),y(1),W(2,T1i,2,1,"nxt-button",15),p()),t&2){let n=w(),i=w();g(),Ke("",n.artist," "),g(),Je(i.artist()?-1:2)}}function E1i(t,e){t&1&&(h(0,"td"),y(1,"*"),p())}function M1i(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"nxtDate"),Ce(3,"money2"),p()),t&2){let n=e.$implicit;g(),F_("",Nt(2,4,n.t,"HH:mm"),": ",n.u," -> ",tt(3,7,n.v),"\xA0\xA0\xA0",n.p,"%")}}function k1i(t,e){if(t&1&&(h(0,"td"),Kn(1,M1i,4,9,"div",null,d1i),p()),t&2){let n=w();g(),Yn(n.percentageAfterClosed)}}function I1i(t,e){t&1&&(h(0,"td"),y(1,"noch nicht angepasst"),p())}function A1i(t,e){if(t&1&&(h(0,"tr")(1,"td",22),y(2),p()()),t&2){let n=e.$implicit;g(2),ye(n)}}function P1i(t,e){if(t&1&&(h(0,"div",24),y(1),Ce(2,"nxtRound"),p()),t&2){let n=w(2);g(),ye(Nt(2,1,n.ratingValue,1))}}function R1i(t,e){t&1&&(h(0,"div",24),y(1,"*"),p())}function F1i(t,e){if(t&1&&(h(0,"td",26),y(1),p()),t&2){let n=w().$implicit;g(),ye(n.value)}}function L1i(t,e){t&1&&(h(0,"td",26),y(1,"*"),p())}function O1i(t,e){if(t&1){let n=re();h(0,"nxt-button",29),F("click",function(){let r=V(n).$implicit,s=w(6);return B(s.showRatingLogDetails(r))}),y(1),Ce(2,"duration2"),p()}if(t&2){let n=e.$implicit;b("smallButton",!0),g(),Ke("",Nt(2,2,n.end-n.start,!1)," ")}}function N1i(t,e){if(t&1&&(h(0,"td"),Kn(1,O1i,3,5,"nxt-button",28,sa),p()),t&2){let n=w().$implicit,i=w(4);g(),Yn(i.ratingsLog[n.username])}}function V1i(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2),p(),W(3,F1i,2,1,"td",26)(4,L1i,2,0,"td",26),h(5,"td"),y(6),p(),h(7,"td",25)(8,"mat-icon",27),F("click",function(){let r=V(n).$index,s=w(4);return B(s.deleteRatingClicked(r))}),y(9,"delete"),p()(),W(10,N1i,3,0,"td"),p()}if(t&2){let n=e.$implicit,i=w(4);g(2),ye(n.username),g(),Je(i.showRatingAndArtist()?3:4),g(3),ye(n.comment),g(4),Je(i.ratingsLog[n.username]?10:-1)}}function B1i(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"von"),p(),h(3,"td"),y(4,"Bewertung"),p(),h(5,"td"),y(6,"Info"),p(),ee(7,"td",25),p(),Kn(8,V1i,11,4,"tr",null,u1i)),t&2){let n=w(3);g(8),Yn(n.allRatings())}}function z1i(t,e){if(t&1){let n=re();h(0,"div",17)(1,"table",14)(2,"tr")(3,"td",23),F("nxtOnMultiClick",function(){V(n);let r=w(2);return B(r.showRatingLogClicked())}),y(4,"Aktuelle Bewertung "),W(5,P1i,3,4,"div",24)(6,R1i,2,0,"div",24),p()(),W(7,B1i,10,0),p()()}if(t&2){let n=w(2);g(3),b("nxtMultiClick",3),g(2),Je(n.showRatingAndArtist()?5:6),g(2),Je(n.allRatings().length>0?7:-1)}}function H1i(t,e){t&1&&(h(0,"div",18),y(1,"loading..."),p())}function G1i(t,e){if(t&1&&(h(0,"a",34),Ce(1,"nxtEventFile"),ee(2,"img",35),Ce(3,"nxtEventFile"),p()),t&2){let n=w().$implicit,i=w(3);b("href",tt(1,5,n.id),Ur)("id",n.id),Bn("data-pswp-width",n.width)("data-pswp-height",n.height),g(2),b("src",Xf(3,7,n.id,!0,i.eventFileThumbReloadIndicator()),Ur)}}function W1i(t,e){if(t&1){let n=re();h(0,"img",37),Ce(1,"nxtEventFile"),F("click",function(){V(n);let r=w().$implicit,s=w(3);return B(s.videoClicked(r))}),p()}if(t&2){let n=w().$implicit;b("src",Nt(1,1,n.id,!0),Ur)}}function U1i(t,e){if(t&1&&(ee(0,"div",36),Ce(1,"safeHtml")),t&2){let n=w().$implicit,i=w(3);b("innerHTML",tt(1,1,i.additionImageText[n.id]),Pi)}}function j1i(t,e){if(t&1&&(h(0,"div",31)(1,"div",32)(2,"div",33),y(3),Ce(4,"nxtDriveFileSubType"),p()(),W(5,G1i,4,11,"a",34)(6,W1i,2,4,"img",35)(7,U1i,2,3,"div",36),p()),t&2){let n=e.$implicit,i=w(3);g(3),ye(tt(4,3,n.subType)),g(2),Je(n.type==="image"?5:n.type==="video"?6:-1),g(2),Je(i.additionImageText[n.id]?7:-1)}}function $1i(t,e){if(t&1){let n=re();h(0,"div",19)(1,"div",30),F("nxtPhotoSwipeOnOpen",function(r){V(n);let s=w(2);return B(s.openImage(r))})("nxtPhotoSwipeOnClose",function(r){V(n);let s=w(2);return B(s.closeImage(r))})("nxtPhotoSwipeOnEditClicked",function(r){V(n);let s=w(2);return B(s.eventFileEditClicked(r))}),Kn(2,j1i,8,5,"div",31,h1i),p()()}if(t&2){let n=w(2);g(),b("nxtPhotoSwipeShowEditIcon",!0),g(),Yn(n.imagesAndVideos())}}function K1i(t,e){if(t&1){let n=re();h(0,"div",38)(1,"mat-button-toggle-group",9),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.myRatingValue,r)||(s.myRatingValue=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.changed=!0)}),h(2,"mat-button-toggle",39),y(3,"1"),p(),h(4,"mat-button-toggle",39),y(5,"2"),p(),h(6,"mat-button-toggle",39),y(7,"3"),p(),h(8,"mat-button-toggle",39),y(9,"4"),p(),h(10,"mat-button-toggle",39),y(11,"5"),p(),h(12,"mat-button-toggle",39),y(13,"6"),p(),h(14,"mat-button-toggle",39),y(15,"7"),p(),h(16,"mat-button-toggle",39),y(17,"8"),p(),h(18,"mat-button-toggle",39),y(19,"9"),p(),h(20,"mat-button-toggle",39),y(21,"10"),p()(),h(22,"div",31)(23,"div"),y(24,"1\xA0\xA0Augenkrebs"),p(),h(25,"div"),y(26,"2\xA0\xA0Schrott schrott"),p(),h(27,"div"),y(28,"3\xA0\xA0Total verkackt"),p(),h(29,"div"),y(30,"4\xA0\xA0Kann man nicht machen"),p(),h(31,"div"),y(32,"5\xA0\xA0Entspricht nicht unseren Anspr\xFCchen"),p(),h(33,"div"),y(34,"6\xA0\xA0Entspricht gerade so unseren Anspr\xFCchen"),p(),h(35,"div"),y(36,"7\xA0\xA0Gut gestochen mehr davon"),p(),h(37,"div"),y(38,"8\xA0\xA0Echt Gut!"),p(),h(39,"div"),y(40,"9\xA0\xA0Mega!"),p(),h(41,"div"),y(42,"10\xA0\xA0Endstufe"),p()()(),h(43,"div",17)(44,"nxt-textarea",40),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.myRatingComment,r)||(s.myRatingComment=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.changed=!0)}),p()()}if(t&2){let n=w(2);g(),qe("value",n.myRatingValue),g(),b("value",1),g(2),b("value",2),g(2),b("value",3),g(2),b("value",4),g(2),b("value",5),g(2),b("value",6),g(2),b("value",7),g(2),b("value",8),g(2),b("value",9),g(2),b("value",10),g(24),qe("value",n.myRatingComment)}}function Y1i(t,e){if(t&1){let n=re();h(0,"nxt-button",11),F("click",function(){V(n);let r=w(3);return B(r.saveClicked(!0))}),y(1,"Speichern + N\xE4chstes"),p()}}function q1i(t,e){if(t&1){let n=re();h(0,"div",20)(1,"nxt-button",11),F("click",function(){V(n);let r=w(2);return B(r.saveClicked(!1))}),y(2,"Speichern"),p(),W(3,Y1i,2,0,"nxt-button"),p()}if(t&2){let n=w(2);g(3),Je(n.singleEventId()?-1:3)}}function Z1i(t,e){if(t&1){let n=re();h(0,"div",10)(1,"div")(2,"nxt-button-icon",11),F("click",function(){V(n);let r=w();return B(r.copyLinkClicked())}),y(3,"content_copy"),p()(),W(4,b1i,5,0,"div",12),h(5,"div",13)(6,"table",14)(7,"tr")(8,"td"),y(9,"Wann"),p(),h(10,"td"),y(11),Ce(12,"nxtDate"),Ce(13,"nxtDate"),W(14,w1i,2,1,"nxt-button",15),p()(),h(15,"tr")(16,"td"),y(17,"Dauer"),p(),h(18,"td")(19,"div",16)(20,"div"),y(21),Ce(22,"duration2"),p(),W(23,S1i,2,0,"div"),p()()(),h(24,"tr")(25,"td"),y(26,"Artist"),p(),W(27,D1i,3,2,"td")(28,E1i,2,0,"td"),p(),h(29,"tr")(30,"td"),y(31,"Artist bekommt"),p(),h(32,"td"),y(33),Ce(34,"money2"),p()(),h(35,"tr")(36,"td"),y(37,"Artist-Prozente"),p(),W(38,k1i,3,0,"td")(39,I1i,2,0,"td"),p(),h(40,"tr")(41,"td"),y(42,"Preis"),p(),h(43,"td"),y(44),p()(),h(45,"tr")(46,"td"),y(47,"Stil"),p(),h(48,"td"),y(49),p()(),Kn(50,A1i,3,1,"tr",null,sa),p(),W(52,z1i,8,3,"div",17),p()(),W(53,H1i,2,0,"div",18)(54,$1i,4,1,"div",19)(55,K1i,45,12)(56,q1i,4,1,"div",20)}if(t&2){let n=e,i=w();g(4),Je(i.singleEventId()?-1:4),g(7),cn(" ",Nt(12,15,n.start,"dd.MM.yyyy HH:mm")," - ",Nt(13,18,n.end,"HH:mm")," "),g(3),Je(i.openerComponent!=="CalendarEventEditComponent"?14:-1),g(7),ye(tt(22,21,n.end-n.start)),g(2),Je(n.closed?-1:23),g(4),Je(i.showRatingAndArtist()?27:28),g(6),ye(tt(34,23,n.artistTotalGet)),g(5),Je(n.percentageAfterClosed&&n.percentageAfterClosed.length>0?38:39),g(6),ye(i.EventTools.getPriceText(n)),g(5),ye(i.EventTools.getSkillsCombined(n).join(" & ")),g(),Yn(i.bodyPutService.getTextFromEvent(n)),g(2),Je(n.ratingValue&&i.showRatingAndArtist()?52:-1),g(),Je(i.loading()?53:54),g(2),Je(i.hasRatingFromMe()?-1:55),g(),Je(i.hasRatingFromMe()?-1:56)}}var d1i,u1i,h1i,sw,cee=Q(()=>{me();Gi();yi();Zi();i6();oX();wz();go();W_();Ci();Pm();Am();Tf();Im();Df();oo();z1();n1();Kr();Rv();zn();ls();a3();ji();$P();ug();ma();aQ();Zh();sg();il();Ja();hz();Tz();jP();Il();$n();jo();ha();jl();Cs();PH();me();d1i=(t,e)=>e.t,u1i=(t,e)=>e.username,h1i=(t,e)=>e.id;sw=(()=>{let e=class e extends bt{constructor(){super(),this.eventFileThumbReloadIndicator=vr(()=>(this.event(),Date.now().toString())),this.events=gt([]),this.event=gt(null),this.loading=gt(!1),this.photos=gt([]),this.imagesAndVideos=gt([]),this.myRatingValue=gt(null),this.myRatingComment=gt(""),this.allRatings=gt([]),this.showEventsOnlyWithPhotosOrVideos=gt(!0),this.showEventsOnlyToFewRatings=gt(!1),this.showEventsOnlyWithoutMyCheck=gt(!1),this.dateString=gt(Ie.formatNowDate()),this.currentIndex=vr(()=>this.eventsFiltered().findIndex(i=>i.id===this.event()?.id)),this.singleEventId=gt(null),this.artist=gt(null),this.hasRatingFromMe=vr(()=>this.event()?.ratings&&this.event().ratings.some(i=>i.username===this.loginService.getUsername())),this.forceShowRatingAndArtist=gt(!1),this.showRatingAndArtist=vr(()=>this.hasRatingFromMe()||this.forceShowRatingAndArtist()||this.artist()),this.eventsFiltered=vr(()=>{let i=this.events();return this.showEventsOnlyWithPhotosOrVideos()&&(i=i.filter(r=>r.closed&&r.files&&r.files.some(s=>s.subType==="tattooPhoto"||s.subType==="tattooVideo"))),this.showEventsOnlyToFewRatings()&&(i=i.filter(r=>!r.ratings||r.ratings.length<this.configService.config.value.mustEventRatingMin||this.additionalEventIdAfterLoad===r.id)),this.showEventsOnlyWithoutMyCheck()&&(i=i.filter(r=>!r.ratings||!r.ratings.some(s=>s.username===this.loginService.getUsername())||this.additionalEventIdAfterLoad===r.id)),i}),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.loginService=Ve(Fi),this.dialogService=Ve(vt),this.configService=Ve(Xi),this.bodyPutService=Ve(Oc),this.permissionService=Ve(ws),this.dialogRef=Ve(Gt,{optional:!0}),this.clipboard=Ve(_u),this.activatedRoute=Ve(gs),this.router=Ve(Ll),this.EventTools=Vu,this.changed=!1,this.photoEventId="",this.showHeaderButtons=vr(()=>!this.singleEventId()&&!this.artist()),this.ratingLog={eventId:"",imageCount:0,imageViews:[],duration:0,end:0,start:0},this.ratingsLog={},this.additionImageText={},this.pushSubscription=Tp(this.event).subscribe(i=>this.loadEvent()),qh(()=>{this.event()&&(this.ratingsLog={},this.resetRatingLog(),this.permissionService.isJulian()&&this.showRatingLogClicked())}),qh(()=>{this.dateString()&&(this.singleEventId(),this.artist(),this.load())}),this.activatedRoute.snapshot.paramMap.get("eventId")&&this.singleEventId.set(this.activatedRoute.snapshot.paramMap.get("eventId")),this.activatedRoute.snapshot.paramMap.get("artist")&&this.artist.set(this.activatedRoute.snapshot.paramMap.get("artist"))}ngOnInit(){this.pushSocketSubscription=this.socketService.subscribeNew("calendarEventChanged",i=>{this.events().some(r=>r.id===i.record.id)&&this.load()})}nxtOnDestroy(){}loadEvent(){return O(this,null,function*(){this.event()&&(this.loading.set(!0),this.allRatings.set([]),this.event().ratings&&this.allRatings.set(this.event().ratings),this.event()&&(this.photoEventId,this.event().id,this.imagesAndVideos.set(this.event().files.filter(i=>i.type==="image"||i.type==="video")),this.event()?this.photoEventId=this.event().id:this.photoEventId=""),this.loading.set(!1))})}load(){return O(this,null,function*(){let i;this.singleEventId()?i=yield this.socketService.getEventRatingEvent(this.singleEventId()):this.artist()?i=yield this.socketService.getEventRatingArtist(this.artist()):i=yield this.socketService.getEventRatingData(this.dateString()),console.log(i),this.events.set(i.events),this.jumpEventIdAfterLoad&&(this.event()&&this.event().id===this.jumpEventIdAfterLoad&&this.nextClicked(),this.jumpEventIdAfterLoad=""),this.additionalEventIdAfterLoad&&this.event()&&this.event().id!==this.additionalEventIdAfterLoad&&this.event.set(this.eventsFiltered().find(r=>r.id===this.additionalEventIdAfterLoad)),this.refreshView()})}nextClicked(){return O(this,null,function*(){this.additionalEventIdAfterLoad="",this.currentIndex()<this.eventsFiltered().length&&this.event.set(this.eventsFiltered()[this.currentIndex()+1])})}showEventClicked(){this.openerComponent==="CalendarEventEditComponent"?this.dialogRef.close():this.dialogService.showEvent(this.event().id,"EventsRatingComponent")}showArtistClicked(){this.singleEventId.set(null),this.artist.set(this.event().artist)}closeClicked(){this.dialogRef?.close()}saveClicked(i){return O(this,null,function*(){if(!Es.isNumber(this.myRatingValue())){yield this.dialogService.showOk("Speichern geht nur mit einer Bewertung");return}this.jumpEventIdAfterLoad=i?this.event().id:"",this.additionalEventIdAfterLoad=i?"":this.event().id,this.ratingLog.end=Date.now(),yield this.socketService.setEventRating(this.event().id,this.myRatingValue(),this.myRatingComment(),this.ratingLog),this.myRatingValue.set(null),this.myRatingComment.set("")})}prevClicked(){this.additionalEventIdAfterLoad="",this.currentIndex()>0&&this.currentIndex()<this.eventsFiltered().length&&this.event.set(this.eventsFiltered()[this.currentIndex()-1])}setEventId(i){this.singleEventId.set(i)}showEventsOnlyToFewRatingsChanged(){this.jumpEventIdAfterLoad="",this.additionalEventIdAfterLoad="",this.showEventsOnlyToFewRatings()&&this.showEventsOnlyWithoutMyCheck()&&this.showEventsOnlyWithoutMyCheck.set(!1),this.refreshView()}showEventsOnlyWithoutMyCheckChanged(){this.showEventsOnlyToFewRatings()&&this.showEventsOnlyWithoutMyCheck()&&this.showEventsOnlyToFewRatings.set(!1),this.refreshView()}copyLinkClicked(){this.clipboard.copy(window.origin+"/events-rating/"+this.event().id)}deleteRatingClicked(i){return O(this,null,function*(){let r=this.event().ratings[i].username;(yield this.dialogService.showYesNo('Bewertung von "'+r+'" l\xF6schen?'))&&this.socketService.deleteEventRating(this.event().id,r)})}refreshView(){let i=this.event()&&this.eventsFiltered().find(r=>r.id===this.event().id);i?(this.myRatingValue(),this.event.set(i)):this.event.set(this.eventsFiltered()[0])}videoClicked(i){return O(this,null,function*(){this.startUserWatchPhoto(i.id);let r=this.dialogService.showComponentFull($5);r.componentInstance.loadDriveVideo(i),yield Sn(r.afterClosed()),this.stopUserWatchPhoto(i.id)})}startUserWatchPhoto(i){this.ratingLog.imageViews.push({id:i,start:Date.now(),end:0})}stopUserWatchPhoto(i){let r=this.ratingLog.imageViews.find(s=>s.id===i&&!s.end);r&&(r.end=Date.now())}resetRatingLog(){this.additionImageText={},this.ratingLog={eventId:this.event().id,imageCount:this.event().files.filter(i=>i.type==="image").length,imageViews:[],duration:0,end:0,start:Date.now()}}openImage(i){this.startUserWatchPhoto(i.id)}closeImage(i){this.stopUserWatchPhoto(i.id)}showRatingLogClicked(){return O(this,null,function*(){this.ratingsLog={};let i=yield this.socketService.getEventRatingLog(this.event().id);for(let r of i)this.ratingsLog[r.createdBy]||(this.ratingsLog[r.createdBy]=[]),this.ratingsLog[r.createdBy].push(r);this.cdRef.detectChanges()})}showRatingLogDetails(i){this.additionImageText={};for(let r of i.imageViews)this.additionImageText[r.id]?this.additionImageText[r.id]+=`
`+Qt.format2(r.end-r.start,{pastPrefix:"",futurePrefix:""}):this.additionImageText[r.id]=Qt.format2(r.end-r.start,{pastPrefix:"",futurePrefix:""})}eventFileEditClicked(i){requestAnimationFrame(()=>{let r=this.dialogService.showComponentFull(Px);r.componentInstance.fileId=i.id})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-events-rating"]],standalone:!0,features:[et,xe],decls:13,vars:7,consts:[[3,"dialogRef"],[3,"nxtOnMultiClick","nxtMultiClick"],[1,"flex","flex-col","items-center","justify-center","gap-4","md:flex-row"],[1,"flex","flex-col","nxt-page"],[1,"flex","w-full","flex-row","justify-center","text-2xl"],[1,"flex","w-full","flex-row","justify-center"],[1,"flex","h-full","w-full","flex-row","items-center","justify-center","text-center","text-3xl"],[3,"valueChange","jumpDays","noPadding","value"],[1,"flex","flex-col","gap-2","md:flex-row","md:gap-4"],[3,"valueChange","value"],[1,"flex","w-full","flex-col","items-center"],[3,"click"],[1,"mt-4","mb-4","flex","flex-row","items-center","justify-center","gap-8"],[1,"flex","flex-col","gap-2","md:flex-row"],[1,"nxt-table"],[1,"mr-3",3,"smallButton"],[1,"flex","flex-col"],[1,"flex","flex-row","justify-center"],[1,"flex","w-full","flex-row","items-center","justify-center","h-[220px]"],[1,"outer-photo-container"],[1,"mt-4","mb-4","flex","flex-row","items-center","justify-center","gap-5"],[1,"mr-3",3,"click","smallButton"],["colspan","2"],["colspan","4",1,"text-center",3,"nxtOnMultiClick","nxtMultiClick"],[1,"text-xl","font-bold"],["nxtPermission","EventRating_Delete"],[1,"text-center"],[1,"cursor-pointer",3,"click"],[1,"m-2",3,"smallButton"],[1,"m-2",3,"click","smallButton"],["nxtPhotoSwipe","",1,"gap-5","photo-container",3,"nxtPhotoSwipeOnOpen","nxtPhotoSwipeOnClose","nxtPhotoSwipeOnEditClicked","nxtPhotoSwipeShowEditIcon"],[1,"flex","flex-col","items-center","justify-center"],[1,"whitespace-nowrap"],[1,"text-sm","file-header"],[1,"flex","h-full","items-center","justify-center",3,"href","id"],[2,"max-height","180px","max-width","135px","height","fit-content",3,"src"],[3,"innerHTML"],[2,"max-height","180px","max-width","135px","height","fit-content",3,"click","src"],[1,"mt-4","flex","w-full","flex-col","items-center","justify-center","p-1"],[3,"value"],["placeholder","Info",1,"flex","w-full","md:w-1/2",3,"valueChange","value"]],template:function(r,s){if(r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title",1),F("nxtOnMultiClick",function(){return s.forceShowRatingAndArtist.set(!s.forceShowRatingAndArtist())}),y(3,"Tattoo-Bewertung "),p(),W(4,p1i,9,6,"div",2),p(),h(5,"nxt-page-content")(6,"div",3),W(7,m1i,2,1,"div",4)(8,v1i,3,1,"div",5)(9,x1i,4,1,"div",6),h(10,"div"),W(11,Z1i,57,25),p()()(),ee(12,"nxt-page-footer"),p()),r&2){let o;g(),b("dialogRef",s.dialogRef),g(),b("nxtMultiClick",3),g(2),Je(s.showHeaderButtons()?4:-1),g(3),Je(s.artist()?7:-1),g(),Je(s.singleEventId()?-1:8),g(),Je(s.eventsFiltered().length===0?9:-1),g(2),Je((o=s.event())?11:-1,o)}},dependencies:[Lt,nm,Dm,iUe,N7,Hn,Pl,Yl,hc,Al,Kl,Nn,yu,an,_f,rw,nP,Qu,Zs,Zr,O7,V7,Or],styles:[".outer-photo-container[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%}.outer-photo-container[_ngcontent-%COMP%]   .photo-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;width:100%;padding:10px;box-sizing:border-box}.outer-photo-container[_ngcontent-%COMP%]   .photo-container[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{background-color:#3498db;color:#fff;padding:20px;margin:10px;text-align:center;width:150px}"],changeDetection:0});let t=e;return t})()});function X1i(t,e){if(t&1&&(h(0,"div",2)(1,"div",7),y(2,"\u2705 Verbunden \u2705"),p(),h(3,"div",8),y(4),p(),h(5,"div",9),y(6),Ce(7,"nxtDate"),p(),h(8,"div",10),y(9,"Danke. Du kannst diese Seite nun wieder schlie\xDFen."),p()()),t&2){let n=w(2);g(4),Ke("+",n.state().connectedId,""),g(2),Ke("seit ",Nt(7,2,n.state().connectedSince,"dd.MM.yyyy HH:mm"),"")}}function Q1i(t,e){if(t&1){let n=re();h(0,"div",3)(1,"div"),y(2,"Der QR-Code ist ung\xFCltig."),p(),h(3,"nxt-button",11),F("click",function(){V(n);let r=w(2);return B(r.reloadQrCodeClicked())}),y(4,"Neuen QR-Code anfordern"),p()()}}function J1i(t,e){if(t&1){let n=re();h(0,"div",4)(1,"div",12)(2,"ol",13)(3,"li"),y(4,"\xD6ffne WhatsApp-Business auf dem NXT-Whats-App-Handy."),p(),h(5,"li")(6,"div",14)(7,"div",15),y(8," Tippe auf\xA0"),h(9,"strong"),y(10,"Men\xFC"),p(),y(11,"\xA0 "),$p(),h(12,"svg",16),ee(13,"rect",17)(14,"path",18),p(),y(15," \xA0oder\xA0"),gy(),h(16,"strong"),y(17,"Einstellungen"),p(),y(18,"\xA0 "),$p(),h(19,"svg",19),ee(20,"rect",20)(21,"path",21),p()(),gy(),h(22,"div",15),y(23," \xA0und w\xE4hle\xA0"),h(24,"strong"),y(25,"Verkn\xFCpfte Ger\xE4te"),p(),y(26,"\xA0aus. "),p()()(),h(27,"li")(28,"span"),y(29,'L\xF6sche die Verbindung "NXT", falls sie vorhanden ist.'),p()(),h(30,"li")(31,"span"),y(32,"Tippe auf "),h(33,"strong"),y(34,"Ger\xE4t hinzuf\xFCgen"),p(),y(35,"."),p()(),h(36,"li")(37,"span"),y(38,"Richte das Telefon auf diesen Bildschirm,"),ee(39,"br"),y(40,"um den QR-Code zu scannen."),p()(),h(41,"li")(42,"span"),y(43,'Gebe der Verbindung den Name "NXT"'),p()()()(),h(44,"div",5),ee(45,"qrcode",22),h(46,"div"),y(47),p(),h(48,"div"),y(49),p(),h(50,"div",23)(51,"nxt-button",11),F("click",function(){V(n);let r=w(2);return B(r.reloadQrCodeClicked())}),y(52,"WhatsApp neu starten"),p()()()()}if(t&2){let n=w(2);g(45),b("qrdata",n.state().qrCode)("width",300),g(2),Ke("",n.state().qrCodeCounter," / 6 QR-Codes"),g(2),ye(n.newQrCodeIn())}}function e0i(t,e){if(t&1){let n=re();h(0,"div",5)(1,"div",24),ee(2,"nxt-spinner"),p(),h(3,"div"),y(4),p(),h(5,"div",25)(6,"nxt-button",11),F("click",function(){V(n);let r=w(2);return B(r.reloadQrCodeClicked())}),y(7,"WhatsApp neu starten"),p()()()}if(t&2){let n=w(2);g(4),ye(n.state().loadingMessage)}}function t0i(t,e){if(t&1&&(h(0,"div"),y(1,"Unbekannter Zustand"),p(),ee(2,"div",26),Ce(3,"jsonFormatted")),t&2){let n=w(2);g(2),b("innerHTML",tt(3,1,n.state()),Pi)}}function i0i(t,e){if(t&1&&(h(0,"div",1),W(1,X1i,10,5,"div",2)(2,Q1i,5,0,"div",3)(3,J1i,53,4,"div",4)(4,e0i,8,1,"div",5)(5,t0i,4,3),h(6,"div",6)(7,"div"),y(8),p(),h(9,"div"),y(10),p(),h(11,"div"),y(12),p()()()),t&2){let n=w();g(),Je(n.view()==="connected"?1:n.view()==="qrCodeInvalide"?2:n.view()==="qrCode"?3:n.view()==="loading"?4:5),g(7),Ke("letzter erfolgreicher Verbindungstest: ",n.lastConnectedTimestamp(),""),g(2),Ke("WhatsApp Starts: ",n.state().initCounter,""),g(2),Ke("letzter WhatsApp Start: vor ",n.initTimestamp(),"")}}var dee,r5e=Q(()=>{me();Gi();B1();Gy();d2();An();Vt();ri();go();Zi();oX();gX();$v();jo();pZ();P0();me();yi();Vt();An();d2();dee=(()=>{let e=class e extends bt{constructor(i){super(),this.socketService=i,this.view=vr(()=>this.state().connected?"connected":this.state().qrCodeInvalide?"qrCodeInvalide":this.state().loadingMessage?"loading":this.state().qrCode?"qrCode":"unknown"),this.state=gt({connected:!1,lastConnectedTimestamp:0,qrCode:"",qrCodeTimestamp:0,qrCodeInvalide:!1,qrCodeCounter:0,connectedId:"",waState:null,loadingMessage:"",connectedSince:0,initTimestamp:0,initCounter:0,qrCodeIsLoading:!1,qrCodeLoadingTimestamp:0}),this.serverDate=Wy.now(),this.qrCodeTimestamp=gt(""),this.initTimestamp=gt(""),this.lastConnectedTimestamp=gt(""),this.newQrCodeIn=gt(""),this.ServerDate=Wy,this.load()}ngOnInit(){this.viewInterval=setInterval(()=>{if(this.initTimestamp.set(Qt.format2(Wy.now()-this.state().initTimestamp)+" ("+this.state().initTimestamp.dateFormat("dd.MM.yy HH:mm:ss")+")"),this.state().lastConnectedTimestamp&&this.lastConnectedTimestamp.set(Qt.format2(Wy.now()-this.state().lastConnectedTimestamp)+" ("+this.state().lastConnectedTimestamp.dateFormat("dd.MM.yy HH:mm:ss")+")"),this.state().qrCodeTimestamp){this.qrCodeTimestamp.set(Qt.format2(Wy.now()-this.state().qrCodeTimestamp));let i=0;this.state().qrCodeCounter===1?i=this.state().qrCodeTimestamp+Qt.DURATION_1MINUTE:i=this.state().qrCodeTimestamp+2e4;let r=i-Wy.now();if(this.state().qrCodeCounter===6)this.newQrCodeIn.set("QR-Code noch g\xFCltig: "+Qt.format2(r));else if(r<0)this.newQrCodeIn.set("QR-Code abgelaufen");else if(r>Qt.DURATION_1MINUTE*2){this.newQrCodeIn.set("Fehler, bitte WhatsApp neustarten");debugger}else this.newQrCodeIn.set("Neuer QR-Code in "+Qt.format2(r))}},1e3)}nxtOnDestroy(){Cu.clear(this.viewInterval)}load(){return O(this,null,function*(){this.pushSocketSubscription=this.socketService.subscribeNew("getWhatsAppState",r=>{this.state.set(r)},{emitInitial:!0,emitAfterReconnect:!0});let i=yield this.socketService.getWhatsAppState()})}reloadQrCodeClicked(){this.socketService.whatsAppRestart()}};e.\u0275fac=function(r){return new(r||e)(R(lt))},e.\u0275cmp=_e({type:e,selectors:[["ng-component"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["fxFlex","","fxLayoutAlign","center center","fxLayout","column","class","w-full h-100 nxt-page",4,"ngIf"],["fxFlex","","fxLayoutAlign","center center","fxLayout","column",1,"w-full","h-100","nxt-page"],["fxLayout","column","fxLayoutAlign","center center",2,"line-height","1.7"],[1,"flex","flex-col","items-center","justify-center","gap-3"],["fxLayout","row","fxLayoutAlign","center center"],["fxLayout","column","fxLayoutAlign","center center"],[1,"flex","flex-col","items-center","justify-center",2,"position","absolute","bottom","20px"],[1,"text-170"],[1,"text-120"],[1,"text-80"],[1,"pt-4","text-90"],[3,"click"],["fxLayout","column","fxHide.lt-sm","",1,"operation-manual",2,"line-height","2"],[1,"list-decimal"],[1,"flex","flex-col"],[1,"flex","flex-row"],["height","24px","viewBox","0 0 24 24","width","24px"],["fill","#f2f2f2","height","24","rx","3","width","24"],["d","m12 15.5c.825 0 1.5.675 1.5 1.5s-.675 1.5-1.5 1.5-1.5-.675-1.5-1.5.675-1.5 1.5-1.5zm0-2c-.825 0-1.5-.675-1.5-1.5s.675-1.5 1.5-1.5 1.5.675 1.5 1.5-.675 1.5-1.5 1.5zm0-5c-.825 0-1.5-.675-1.5-1.5s.675-1.5 1.5-1.5 1.5.675 1.5 1.5-.675 1.5-1.5 1.5z","fill","#818b90"],["width","24","height","24","viewBox","0 0 24 24"],["fill","#F2F2F2","width","24","height","24","rx","3"],["d","M12 18.69c-1.08 0-2.1-.25-2.99-.71L11.43 14c.24.06.4.08.56.08.92 0 1.67-.59 1.99-1.59h4.62c-.26 3.49-3.05 6.2-6.6 6.2zm-1.04-6.67c0-.57.48-1.02 1.03-1.02.57 0 1.05.45 1.05 1.02 0 .57-.47 1.03-1.05 1.03-.54.01-1.03-.46-1.03-1.03zM5.4 12c0-2.29 1.08-4.28 2.78-5.49l2.39 4.08c-.42.42-.64.91-.64 1.44 0 .52.21 1 .65 1.44l-2.44 4C6.47 16.26 5.4 14.27 5.4 12zm8.57-.49c-.33-.97-1.08-1.54-1.99-1.54-.16 0-.32.02-.57.08L9.04 5.99c.89-.44 1.89-.69 2.96-.69 3.56 0 6.36 2.72 6.59 6.21h-4.62zM12 19.8c.22 0 .42-.02.65-.04l.44.84c.08.18.25.27.47.24.21-.03.33-.17.36-.38l.14-.93c.41-.11.82-.27 1.21-.44l.69.61c.15.15.33.17.54.07.17-.1.24-.27.2-.48l-.2-.92c.35-.24.69-.52.99-.82l.86.36c.2.08.37.05.53-.14.14-.15.15-.34.03-.52l-.5-.8c.25-.35.45-.73.63-1.12l.95.05c.21.01.37-.09.44-.29.07-.2.01-.38-.16-.51l-.73-.58c.1-.4.19-.83.22-1.27l.89-.28c.2-.07.31-.22.31-.43s-.11-.35-.31-.42l-.89-.28c-.03-.44-.12-.86-.22-1.27l.73-.59c.16-.12.22-.29.16-.5-.07-.2-.23-.31-.44-.29l-.95.04c-.18-.4-.39-.77-.63-1.12l.5-.8c.12-.17.1-.36-.03-.51-.16-.18-.33-.22-.53-.14l-.86.35c-.31-.3-.65-.58-.99-.82l.2-.91c.03-.22-.03-.4-.2-.49-.18-.1-.34-.09-.48.01l-.74.66c-.39-.18-.8-.32-1.21-.43l-.14-.93a.426.426 0 00-.36-.39c-.22-.03-.39.05-.47.22l-.44.84-.43-.02h-.22c-.22 0-.42.01-.65.03l-.44-.84c-.08-.17-.25-.25-.48-.22-.2.03-.33.17-.36.39l-.13.88c-.42.12-.83.26-1.22.44l-.69-.61c-.15-.15-.33-.17-.53-.06-.18.09-.24.26-.2.49l.2.91c-.36.24-.7.52-1 .82l-.86-.35c-.19-.09-.37-.05-.52.13-.14.15-.16.34-.04.51l.5.8c-.25.35-.45.72-.64 1.12l-.94-.04c-.21-.01-.37.1-.44.3-.07.2-.02.38.16.5l.73.59c-.1.41-.19.83-.22 1.27l-.89.29c-.21.07-.31.21-.31.42 0 .22.1.36.31.43l.89.28c.03.44.1.87.22 1.27l-.73.58c-.17.12-.22.31-.16.51.07.2.23.31.44.29l.94-.05c.18.39.39.77.63 1.12l-.5.8c-.12.18-.1.37.04.52.16.18.33.22.52.14l.86-.36c.3.31.64.58.99.82l-.2.92c-.04.22.03.39.2.49.2.1.38.08.54-.07l.69-.61c.39.17.8.33 1.21.44l.13.93c.03.21.16.35.37.39.22.03.39-.06.47-.24l.44-.84c.23.02.44.04.66.04z","fill","#818b90"],["errorCorrectionLevel","M","colorDark","#FFF","colorLight","#2A2A2A",3,"qrdata","width"],[1,"pt-3"],["fxLayoutAlign","center center",2,"width","300px","height","200px","border","0px solid blue"],[1,"pt-4"],[3,"innerHTML"]],template:function(r,s){r&1&&W(0,i0i,13,4,"div",0),r&2&&b("ngIf",s.state)},dependencies:[Ct,At,Yt,oi,qi,Dn,Dv,c2,r3,yf,Hn,Lt,E5],styles:["[_nghost-%COMP%]{height:100%;width:100%}.operation-manual[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{padding:5px}"]});let t=e;return t})()});function n0i(t,e){if(t&1){let n=re();h(0,"div",1)(1,"button",2),F("click",function(){V(n);let r=w();return B(r.action())}),y(2),p()()}if(t&2){let n=w();g(2),Ke(" ",n.data.action," ")}}function s0i(t,e){}function p0i(){return new qP}var r0i,o0i,RH,KQe,qP,a0i,l0i,c0i,YQe,d0i,u0i,h0i,m0i,s5e,qQe,o5e=Q(()=>{me();me();P8();$n();ri();ng();bv();Wc();Xh();WO();WO();Qf();Qf();Cl();bl();r0i=["label"];o0i=Math.pow(2,31)-1,RH=class{constructor(e,n){this._overlayRef=n,this._afterDismissed=new Mi,this._afterOpened=new Mi,this._onAction=new Mi,this._dismissedByAction=!1,this.containerInstance=e,e._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(e){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(e,o0i))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},KQe=new Ri("MatSnackBarData"),qP=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},a0i=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0});let t=e;return t})(),l0i=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0});let t=e;return t})(),c0i=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0});let t=e;return t})(),YQe=(()=>{let e=class e{constructor(i,r){this.snackBarRef=i,this.data=r}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}};e.\u0275fac=function(r){return new(r||e)(R(RH),R(KQe))},e.\u0275cmp=_e({type:e,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[xe],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(r,s){r&1&&(h(0,"div",0),y(1),p(),W(2,n0i,3,1,"div",1)),r&2&&(g(),Ke(" ",s.data.message,`
`),g(),Je(s.hasAction?2:-1))},dependencies:[G_,a0i,l0i,c0i],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0});let t=e;return t})(),d0i={snackBarState:Nd("state",[bc("void, hidden",So({transform:"scale(0.8)",opacity:0})),bc("visible",So({transform:"scale(1)",opacity:1})),cl("* => visible",Ml("150ms cubic-bezier(0, 0, 0.2, 1)")),cl("* => void, * => hidden",Ml("75ms cubic-bezier(0.4, 0.0, 1, 1)",So({opacity:0})))])},u0i=0,h0i=(()=>{let e=class e extends Mb{constructor(i,r,s,o,a){super(),this._ngZone=i,this._elementRef=r,this._changeDetectorRef=s,this._platform=o,this.snackBarConfig=a,this._document=Ve(Lr),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Mi,this._onExit=new Mi,this._onEnter=new Mi,this._animationState="void",this._liveElementId=`mat-snack-bar-container-live-${u0i++}`,this.attachDomPortal=l=>{this._assertNotAttached();let c=this._portalOutlet.attachDomPortal(l);return this._afterPortalAttached(),c},a.politeness==="assertive"&&!a.announcementMessage?this._live="assertive":a.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(i){this._assertNotAttached();let r=this._portalOutlet.attachComponentPortal(i);return this._afterPortalAttached(),r}attachTemplatePortal(i){this._assertNotAttached();let r=this._portalOutlet.attachTemplatePortal(i);return this._afterPortalAttached(),r}onAnimationEnd(i){let{fromState:r,toState:s}=i;if((s==="void"&&r!=="void"||s==="hidden")&&this._completeExit(),s==="visible"){let o=this._onEnter;this._ngZone.run(()=>{o.next(),o.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let i=this._elementRef.nativeElement,r=this.snackBarConfig.panelClass;r&&(Array.isArray(r)?r.forEach(a=>i.classList.add(a)):i.classList.add(r)),this._exposeToModals();let s=this._label.nativeElement,o="mdc-snackbar__label";s.classList.toggle(o,!s.querySelector(`.${o}`))}_exposeToModals(){let i=this._liveElementId,r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let s=0;s<r.length;s++){let o=r[s],a=o.getAttribute("aria-owns");this._trackedModals.add(o),a?a.indexOf(i)===-1&&o.setAttribute("aria-owns",a+" "+i):o.setAttribute("aria-owns",i)}}_clearFromModals(){this._trackedModals.forEach(i=>{let r=i.getAttribute("aria-owns");if(r){let s=r.replace(this._liveElementId,"").trim();s.length>0?i.setAttribute("aria-owns",s):i.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let i=this._elementRef.nativeElement.querySelector("[aria-hidden]"),r=this._elementRef.nativeElement.querySelector("[aria-live]");if(i&&r){let s=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&i.contains(document.activeElement)&&(s=document.activeElement),i.removeAttribute("aria-hidden"),r.appendChild(i),s?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}};e.\u0275fac=function(r){return new(r||e)(R(pn),R(fi),R(Kt),R(Oo),R(qP))},e.\u0275cmp=_e({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(r,s){if(r&1&&(ei(w0,7),ei(r0i,7)),r&2){let o;Pt(o=Rt())&&(s._portalOutlet=o.first),Pt(o=Rt())&&(s._label=o.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:1,hostBindings:function(r,s){r&1&&C8("@state.done",function(a){return s.onAnimationEnd(a)}),r&2&&_y("@state",s._animationState)},standalone:!0,features:[et,xe],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(r,s){r&1&&(h(0,"div",1)(1,"div",2,0)(3,"div",3),W(4,s0i,0,0,"ng-template",4),p(),ee(5,"div"),p()()),r&2&&(g(5),Bn("aria-live",s._live)("role",s._role)("id",s._liveElementId))},dependencies:[w0],styles:[".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}.cdk-high-contrast-active .mat-mdc-snackbar-surface{outline:solid 1px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-app-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-app-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font, var(--mat-app-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-app-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-app-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-app-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-snack-bar-button-color, var(--mat-app-inverse-primary));--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],encapsulation:2,data:{animation:[d0i.snackBarState]}});let t=e;return t})();m0i=new Ri("mat-snack-bar-default-options",{providedIn:"root",factory:p0i}),s5e=(()=>{let e=class e{get _openedSnackBarRef(){let i=this._parentSnackBar;return i?i._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(i){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=i:this._snackBarRefAtThisLevel=i}constructor(i,r,s,o,a,l){this._overlay=i,this._live=r,this._injector=s,this._breakpointObserver=o,this._parentSnackBar=a,this._defaultConfig=l,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=YQe,this.snackBarContainerComponent=h0i,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(i,r){return this._attach(i,r)}openFromTemplate(i,r){return this._attach(i,r)}open(i,r="",s){let o=ve(ve({},this._defaultConfig),s);return o.data={message:i,action:r},o.announcementMessage===i&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(i,r){let s=r&&r.viewContainerRef&&r.viewContainerRef.injector,o=$o.create({parent:s||this._injector,providers:[{provide:qP,useValue:r}]}),a=new e2(this.snackBarContainerComponent,r.viewContainerRef,o),l=i.attach(a);return l.instance.snackBarConfig=r,l.instance}_attach(i,r){let s=ve(ve(ve({},new qP),this._defaultConfig),r),o=this._createOverlay(s),a=this._attachSnackBarContainer(o,s),l=new RH(a,o);if(i instanceof Ma){let c=new of(i,null,{$implicit:s.data,snackBarRef:l});l.instance=a.attachTemplatePortal(c)}else{let c=this._createInjector(s,l),d=new e2(i,void 0,c),u=a.attachComponentPortal(d);l.instance=u.instance}return this._breakpointObserver.observe(n$.HandsetPortrait).pipe(Mr(o.detachments())).subscribe(c=>{o.overlayElement.classList.toggle(this.handsetCssClass,c.matches)}),s.announcementMessage&&a._onAnnounce.subscribe(()=>{this._live.announce(s.announcementMessage,s.politeness)}),this._animateSnackBar(l,s),this._openedSnackBarRef=l,this._openedSnackBarRef}_animateSnackBar(i,r){i.afterDismissed().subscribe(()=>{this._openedSnackBarRef==i&&(this._openedSnackBarRef=null),r.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{i.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):i.containerInstance.enter(),r.duration&&r.duration>0&&i.afterOpened().subscribe(()=>i._dismissAfter(r.duration))}_createOverlay(i){let r=new Xg;r.direction=i.direction;let s=this._overlay.position().global(),o=i.direction==="rtl",a=i.horizontalPosition==="left"||i.horizontalPosition==="start"&&!o||i.horizontalPosition==="end"&&o,l=!a&&i.horizontalPosition!=="center";return a?s.left("0"):l?s.right("0"):s.centerHorizontally(),i.verticalPosition==="top"?s.top("0"):s.bottom("0"),r.positionStrategy=s,this._overlay.create(r)}_createInjector(i,r){let s=i&&i.viewContainerRef&&i.viewContainerRef.injector;return $o.create({parent:s||this._injector,providers:[{provide:RH,useValue:r},{provide:KQe,useValue:i.data}]})}};e.\u0275fac=function(r){return new(r||e)(it(xl),it(d$),it($o),it(mk),it(e,12),it(m0i))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qQe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[s5e],imports:[T0,c4,Ob,zr,YQe,zr]});let t=e;return t})()});var ZQe,_n,vt,Ci=Q(()=>{nke();oke();Lhe();pa();ERe();VFe();zFe();Ld();UFe();KFe();Ov();gu();ZFe();me();XFe();JFe();sBe();Vd();xge();$n();Oge();ji();jo();qge();iHe();rHe();n6();OQe();VQe();KX();a4();zQe();GQe();UQe();$Qe();cee();r5e();me();ji();o5e();ma();gu();ZQe="data:image/webp;base64,UklGRq5VAABXRUJQVlA4WAoAAAAQAAAA/wEA/wEAQUxQSFcXAAANIQVt20iKXP6k78EQ0f8JiJ1hbY3pQuXmq1chKWjbRprDH/a9DCJiAgaqFMymr2ZVMdO2Tcof9AhEyxsxARPgSbJt2ZIkSVrrXFarvHaf/yTrQuid1SDiioT40aNeREwAHTeSBEmSWdT8/8G3U2FCD07u0CJiAohfmwGZfMGrCGBG0Vv9Bn+irx0VlBmCDCCKoOh7om+IgECvCqK+ZhxAh5l1zCUIQmCpKFBUEEBAAqGAaGG/XGYAMZg8gGhEClUUoYBOuoDmsAaBURss1ReKms4r3KxmQAaQEGjjdTCjupikuwqZa4vVEtUXiYgi0hZd2qo2TiClKIivKS4IwkU2DLEDO8kGVF8fiqicym2XLaBhwtFkjGkGESGqICCWnRpXTEZYaSn64hBUxFZ6vctGhWrmYHCYVzPB1vWqZFl3YmrI0WFUkn1VXxjigNHlVlEuLeIGCAGDODTHlY22qKHAbGqWAziqhzGJiy8NgcGtdjMMCDYMAkOCAWd2NdqFseECXJvFnBBpZvQgEVFfEwIobbTJkmhDEBSQLoFgrdimASEIMIBAiTSBgzOnWKMvCEGQ2LxyowEYEyCMIIxkaSgKqhkVCBjAeLMQMByFkUr6ahBAItis0usw7rxFgEGQIF4LLSBOIKEA8joEK5mmlCOErV8KCmK1UbOJ7AFT+cF4U40IW4DAxgEkxN7QILDdTFAbJenrYAShIHeX15PuoPErIxAoCEA146cDkBIvCGAUM+lrQHA0oK7IpbMOEr83QuON+I2BRS6+6qQZ9CWAb9Luwk5pGvI+432mEFvS5KCxQ89f6Dhwwe50mYh8uMXbjTvoTpRPX1gkSFkqJB+3a9do6E6zT58bGZIgGPKhBx3asTTy0TOMljBnEaePLcF2YEcrCZ87hIV2V9czGMOHn7bMBlojT72CxtVrh52B+PCzkJhgGdJHThdRYLlYcGLk45cscXGzPeLjpu5AhNhrBiT+hCkUWW4jPm6CA70CJuJq+HPGd91KBx82Rm22FnEljD9wEaQ+bCJOVK0NYPxpEsFtQwafMyGcmKUgUOOPKxHKVicfNNAWS4gUEv84JM5GG808ZiIEV4YTkCJ/5MypLU8PmUBItWHMIBl/ZmOCq2z0CQtViqWWEUTyDwVCsMHwiFnTALRFMgjGn9oVan3KQgiJJIAB+XMHJlUHecAtklTWDDD+7GvbpIgPlwYRGSAif/iANoQR5Nk2DFpWUVf++Nnu0nhMebQFwcgqG+zPB1eX13gOuj1agAJUhqX88WPp2s75NrLLkx0CEw0sNMQt3Jc6/uMM+/JskU2ObRIhd7C9iPPtHzP99cKDHazk4mAacQ9im/Pt2+Gvv3quQuBiR0Reyy0MNl9xvSzPtVRKy8S8cRPzwr6db17XxYNdIyx4oTn3gXA9M9v2XJUgA+2URnch4eLMIMuTveRIBqzKjVydRrbnKqLEI2wYt3LFmXq2FuPwWuJe7iDGo10sU47C7cBAqMeqDBBJ7mgySTzXG4JK3FMB4sneYICJvCFirj1WhTTTbMYdnYx4sq8GRua6J4LkPlaFNHRWl+6IAi3hIwUrcICVWzqpuySPdEAzrMh1SyYOtgv5RFFjjm14S+gbQ8uu+DwtuDOiS3VDTGeoa6UHii6GGZANbwgdTbe2yaepjZ0ZhzXijgrObL0gPE5w1XqcCZabKoIXrZMPU7SJIyY31UaIgkWfpnUxD9JNMdyDbK3DwxysKU1yW21Yg3jTJ8mV12Z5W4AGrRaUBzkEyWiW+5oCREEyzxHFjBDLnZUU6YVlhgc5DWYqbvDUaSuZ5yhmqLH25qQxe5EqT3GyOIcNujkILmRpPkUxSEPJzTVAoYVVH6FkB4egujmAgLak8QylnUl34wanTp2t9RHKTfEswnp/EGP2Ms18foDO0LQZN7hppmbZxJ6eWCbHcWPvkCBpAUXz8AA1DOEid1nSyx2THp0I0TTc7lEIw45bzPr44MDEIvdYXsdcwtLgcxNkqpl1k14bLoQJ+NwUjjZLxL02c42YfGiCaGSy8E4lwFRXyjw1y6IOUtadghhaF5DJZ4ZYlAFI7vVQwlIN4hNTizCIcb/DlWELRh7YsGVsLOt2AZIlQfq8sOueDjCL3HBpiK5k5HnNXEXLumN1QJcuQR8Xlj2puHLPZWdgL2J4XAJWJ6Hu2h6Ldvc0+rCwpIzU1D0D16ldcHhc2EBmKLxpNhbXEjNPS7gmIDc+kJbFQZ8Vlnwd1G0TC1pkeFqDQCXvG4S4heLDwoKGgDcOpSXAhyUpnMDl1oXsivKwhhATeOuQwgXxWYGQ13Hzkq1BntYEaLJbZ1iQ+KwkK/IZnLKaHhbSEvL2gYvE00JIcv/FZNMeF1fw9plga+nD8mYA3jqQ02VNPKrmkg3GnTeZopXmUUGgDMwbRzNBsQwPS8AiyK2XGtsV8VFByHa4+82wGyiPqmRlJnjnsJSF9EkBWQjFuPECupspT6pgLDXgnSPGykX8wAR8I/ocINBmat45NKbiw7ZRUJJ6VQG+0X0zKkO59zZSS+jHozHYCE0Fy4JiYFHbHRONrgTBG2cMspF8tCINMbgaGVuJmcKyBWy3C9EXawcn7nzfwGpJPxRtUtLcabFYaBJwYt1ad3G7XWIbNOGtE0a6FtAPQwSZ0mtpN7wIbBzRqeASd5sX3O6WeO2SA944Q5mrBeUjFDBteN3KdVVtNnBGnYHFguiwcTFbNwqFKlDuvQO0S4N/L5M3xbRZaOnlqqUG0/FwMnJrnNEw5kJr/wb+SH8QUWoBDO8cKGwL6t9GoMlMYwJiqawwpnCOvFls40HHQYHZath6PzIK+EZAEfUHwFe7i8zEjTfF9gLl7yESCOxJYq5zQRVke4ITKmSuy8IJx8MwOiMQu0n7LnQYRCEjKICwjT46lFhy9c4BGrHh8DecNDoLdFrTy9zKVWCmmVURKKrQ+gaC6jk6NOXWTvVblBnDwQEwgCXIuMKi/dDEdgknvHkAuyj43pTJZDEI8JJ1CQzOdQ4jGEbJtmAwIDvZN3WcES+JXYLeEhUhfAvGmJkOLhVG8uZCbwLbh4WCV4Ry602w2ND35jDNzou5QM02l6yQe4BzQBB5sw0iFQiMAcUhOVOsK+QrGYNC6JXjmyQbl7G8FqWpZpFrl1WLgNRZWG/c6wlewncn4BjTxbaxy0oDwoEx+WEzftDVZmeaNRfgZWqtAScGBlKQAF/FBCxcXS1XQ4pMKgryktvLN7MYdDHs1k1yRco7awRx113aEmtW5DAiv1kCYZosZGeJy+JkJ4ZhyAIwMs5C1/ayu8s2NDHYDAyjArv9v38SM+gwscaNt6ZgweFdW1rbbpVCIB44CPIeXQUhJbSIBS8HUCJqjTeb3Liui2t32TpkYw3i4DBC6f/+d15UjCBx7xuw4rXvqfHijQQC30ynwXifBqbs7GCa2+yeTYTioiUw06JedrkC2zOFEINUHBxM4H/+ZzPSBlfozkkmC8g7Dldiia4BnJx0yHjHZkBnRUzQa7aYoG25WgHByN0WQIJDqiTEopmwDsx//y9qkAMQ9z5HigV8L8FqVi2iM2gaf0vDMBQEyXVhXbYNASMhCAZMBucI8WZAgBtnGf77f1NbRtGiW8chYSvfSwALliBIfIQmoIAFl+ECIgpQzKtZVWTGeNuABXPTsP7nfxVjJUc38s4JewauMN7NxgEsiI/TcmJgJVhbTUTezNlSOAgH5ftBSBCWsP7P/ywWXjPJm9044pu2tanvIhaSQQA/EDAQoQxCGtRXgZaYJ0HAvvd2GpVU/p//IAaraROsd05E3M14H0vAzKIhH6uZIZSQTKN8PwQwRH5xgEaxf/2rWRQ6wDLdOBib2k3xHUSbs98sXT5ewwDjTY2/YRh1/ZNayQiuduckB1ou8V1U4uxMK7fVBeqYAUuMGHnjyMlpNxN/WxHN6MWUtyVmoTGr0iNk2Y0TnG0r9T0Ug+o2cWczNIM1c5wrbr0hShuAv41LPbYan/tonQM10Y0jVbzaVX9XQcrIrp+90GmwZb1zAkK78PsoHCFcPv3RDEZhN45kXhXC/JZ47dhCn74E8ywrcefltW2Xo79Nh6bNzx87zLnA4t7H6O6uiv4OyhFZ3D59hAlnKe+dvJ4rLh1+YyocaAs/f7gNkwTdOsDMFkx/HTWH4bKIz3/LJJDm7RN3LeXXpzSzp40eAVimcWqnW2egznUB/qoQxsYNwkeglVFWuXfgqxYW8NfQogeSzXgCW8QxKG9ejkLXivkLIgRlWCiewIIcGiG6daLpXgswvyQ3cUzjMazAYwXeOhKni2094k/VrnhSFx+DjZyhybJbJ015XTDiL6ANZ4KJ59BdYIbMuPcNxUU4w89vpXKSeBA3882lvHfWUDGB+RN5xY4q+SRkwZgS0J0DS4EgfmZhZXSRZ7ENZwaWkrs/KktBP1HBNMo+DQTCGEA3z3EwXorwJ8Axgp6HOIfrLOW9Ux3pqgX50YjGCRefBSpUxl515wQ9U1tF/tgyHb0kHseA4cRC3PpGAZdrRfBH2GGQeh7W0FNTYXfOUGvZsz8WgYOUzwMEjueKWO8cTFDGNjB8P7AhXH0elmYUXBa7cbqQsDClO2/1agbXLp7HRnCCLePOh0ACmyI/rNDqAyHoINdCfAJdBiCAgIAz5mXbE6GO7UKfgAwndjDiCoicE1w8kY5+a1mW4vYLEB5qsbaWdMaFfSAc57RdF5nePoJB3SmWa5dqVLx4Ij0zUy9Xi8gn0HKAomavraUZXHefB8/xeP318kLD6CcABtAqubq2BW3WeB7PzHC9/HURM8PnMIQyk22XCCN6HGYYuf66ruWbjn4KtICwObYbcvEi8jjq0Ze/XjYHz/BJDAloPGOwQG49Dir0stfKzAyfyASG/ccZUC638HFAhr/aS3TGz8R3Z854VimIx1Fo4UU7DJ/NBq8zzpxJKp5Icy/cQT8baZlznJGn0igIOXw2JQx0Rn0qgBUao88GaLvgOE9GuELKJ7QMQcGnIt5U+pSIIWg8lAFNU+YnBOLhjNcphn1GHtAWxgTjCz4SYID4kq86avFFnwgClV9ygUPuAB0ckuxgcfMljRB5cQGrmNjNbTgwUNO9AVvyGBgHX6sMTC52b5sLo1x97uInuBdHayLq683Rgo+EnVwRozJ9dG1QDTKyFJ5bQIyzEmTXRoUOA5XcG2TiULh5b7nAQD8t2LlBs4NOLxb3XgGP9FTYuX2uOFLExRcyKEUXtwQzz2blwQGhMIXRva3ZOOSWHHzlYLNCJwfEDLBpJ7c88nccfEWMgos3l4Iash4c1IxmJRf/7qCSCHRtLYYy0kpeG7nQYChh10bVwIy5FJ4bSYNkiV3b56LyZ5jHFiCIlUB4axCfGbO6U3NsECGfrjOBtxZAQCI4gaeG7UrKxzwanlppTTGbj/MQ4p0BaQwv5vA8AumhQUxRpDzPMCwCHlmDGb7LkDM8E0Af/i9vSlDW7fcNmzFnYBDif4cXBQYW//79rqSPIaTSH+IoiBeFINPv/r7/sRQPqoX4gew8Q3LVgvvv931/dyFWE6GAyRmYH8ObEuGh3/d9f3cXNgQZqBWecXomrlocgbf33X6hYilFiB5n0rNCfR5kadlqgaaat4LU6bBgdHwM4gXCMnbadgkmLtsZZZ5mRyIyodiXdt64bmcm5VnRANYEfXm39roAhycFmEgjAdfdls7rUxQDSxgcYbcz+1tAGh2z2Ja49RgxRCLi2iV1aJGIrg1DFmcxDj5ttZVGO7YgGAqUHG49gCQLRu59CVYYJ+49yJRZynuLdVWDJg4+AEkmufc+Z5jZjYOPAMbEPbkKHQM5Ohl73K2DWyjnZ9mRk9/Xv9kuboOGB4iTj2pG21kvjg0ZeCIOfqPRoSUvjlhHgY2Dj1JHIk4u6xnKbo5N8JmKiy/SmYqbg2IQXU5+QXRcqoujdUaW0oNbEh+kWA4+S30WyoOLfJqsjIuvZpyo5eDDdODDiwOUmTa2iwsckFi5eEGnherehBCZKO7dUASruHYnYaGJkDo1BZGIbDbk0BWQiDBLLl2RCXvNAuPQFVV817cQYe5McTCKfWeRUxc0xO0FQtTOTAYcWLY2BpM4cjUGqo3XHVSRG9fkJ9lte5EJJ65cVHKjd6GBMT0yUZ6lrSXI/ZnkysUmp3o3En5ovDNU2C0qHUnOXNCMrc2hCeXOk0aiJWBWjUOfbNeWhMEnLt0S3HKnB1w5dEGAlwLDlEM31xYjkUHizkUkKwhEOXRNTJZiimMXJ2ALWcZbUwTZNdixpUNTPiy3mnZE7lxxsuVdgR7i0AUmrNZ2GK5dGIuN1TQ9NFEpdn2xMeXQBQN32QZB49RS3C3IHBhuXZaCVRSJU3eB8tX0j2OX2XwhxeTeYzbBFTn2CgxJlGsvlNKmuPc0SMoGzy2rEKZJDn5tNIPo3rKQEZaLj0yEtKsDYSA7tz5QJnIvTkqHgMBri1cFhhLj3FxyxhWWe89omCAuvmrQBqiLg5CRSO49FxzJrHurSEeLuPlE0OLgq4aZaYmDj8gmB6iDy5eZmc2Sg3/Tnpzi4ld2h2cC1oNrESYN495zYRiIuPggHITq4GJhxozk4kqamawOLljmMWs9uaLGQciLY9NhYI2LW8mhweXgs1X6qfDkAJyaqJvLRoHi4CMcheLkM8GJ6OQI/AnZ6uBCtKeVOLiMaUTfOPnIH20jurdCZSa38tySBR/AIu59NXEoLi5YRknj4CMNtTj6zQEBOrjCcCxOPlgbUPfkIISxsO6tIH+AWOTco5wdxIiLox4Vlrj3WrAfjJMPWkZF6uDYxAYJDy5gmeEzLn5pYGTt4qJyBiC5uAh1jO3kFvBp4uazTR7T9uQW0x5CTo5FR2zz5srJGOrgIujBqfDiglGXMO49PmWMlouPdca1pJtDdKrw3lrBmQCWk6/JgYIOrmgGJV+8twjwQTbj4ljV4NlObsFR2ZB7zyQnozj4pUZGyJNjWR8TNw+uAhyh2S6O1saBwIMjUmwW496LREQ3Tj5AmRfz4IJGCYuTT+TJ3Xkvrj8GcaOba1SLOPmkQZebj+BxkrajUxGCPbiAxoEKu7hVP4jFi0scKTKuPQjH0KX4PiYwaUpmLEi+j018cgOFyS2+j00AZ7KsJDNR6BfiuwdVcxHVoO370JQguiz5aFjIua8szAwF9b0ImCZsYoNW+oVwfQXOwQRZCEYhJL6Zg4OgsTkM4PKldCVF0woZzeWLaVAUaEeUndfvxSd2MxjNjK+lKzCnCBvDTNLy1TSSlsuIbvINnSCE89Ds9s2wBHPQg3cYG1a+nMZBz4KGsVn6cnxS8zUVIw+ugHkgYLn4cmLwTQ4+5oUfALcublFHKPLg4P0Y6p249wXjgYH24tjlQckdDn4RcITq4mgbn4y4+BbTgVm6ONgGx3W5+CJUBPfkFmAG5lduftORZDu4lvyEVS4+SBGri4uXYSYjD64wBi3j4mhHZ4Xl5AKEhzj6j5nCurggQW29uZCHXImbX/GBgg4uECemJS+ucNSdZbn3QJyJljw4ShiF2O6tYGcGXPLgYBFGoPDeNhuHJtY491xgNDIOvkj/oLq3KGTEari4NQe5+oUdHgm2g4tfRYVZvDj7VZnnxbi4hR0nnhcPLiIbZjUu3g0Dp7j4cgUBOfuFJvHmylkXBPDgcAMXHC7eGnYJ1fDcGKItd5iJgx9jd8sR8dqEsX5bc4bODVHYfUlmyGsbGZb3XRv13nhg2N1fzBny2pwBdvdFRc5deajdDWY4+MEH3nYBxHNzQHm3UOPeHWlol5CLQ6mkwINDA3gRyYPLgaUQyXOTIqPQ4eAVlgUQ8N5ArDLl4tUsNtOLgxEXFsKDEwZdiOLiBZlihS4OMQfaqwMnxF08uEBUCrcOTCB/gMpP2Mz7Cpr48dCsou4LhvR7FdQYRHLfFvIDUMlaBd1XIPoDRb5S1MqJB/OP70FBuSs3HkXfAABWUDggMD4AALB+AZ0BKgACAAI+nUieTCWkIqqkUWtBUBOJZ26C9dgKuiWTvjff6GRFnzj2+LmmL8h1j37uR77EkVUokT+d3zGmPXi3Mq6i5D68HFv8r2SU8vcrh8ZUPoPFX+X6D/FEoBeVD4Mf3T1Eelx6NJYsaAqgHFmP97ctX6L32rsQL7YSgMFdRdm1etEgsjdnZhG5QLwEORpSjA7bWci+l/qBHxgdPL5EH37SJqz/TmWhj9vM7MbrVdUMxMJX0qz6fcW/KX8fs6VQ/VihyWgoivBBNXNqA7bWci+l/qBHxdvFLGHZM66vGWYL9OZiL4bcD5JI2ETC7qm9YRW8cOLPeg5Jx8x79ZDwVYGVtz0pr4KbJKA7bWci+l/qA2iRKRf/Pl7lKcxIuCtds9Vjk8Y8K/vhNUTQJ6qTP2Z8VpDjVJP5v1bcx1JuRf2AdtrORfS/1Aj4u1MpoZfGQZr+K4dfqqcVZ/2ng2y+tzs/4/spARlVWWLQ2UjrohKKvS87LW2qxGQKtBtvPzpj+3fYG4BIy7/9ducXd7Npf6gR8YHbazjiEgTRL5++gzVX46xex6A2gK3czZr/sR+SugZ/FlHOvBV8j7Z1iR9Rw0yoaKKGdWpPwFBxSGY7fYTb16C9gTz5drXSYCybmy5Wz4Z8z1Aj4wO21nIvozCLE9ZID+eRkzuf/GAQwNgDL5xcH1hU7ijGipyz6bVxS+sIx5pNzfmcQpWXgPwPqQpp9XhwD+UFC4KqeaKv30Ehno+l/qBHxgdtrNEfp84jvJDBwAE+d4I3BIFc+LXmo2SHlp8PS7pn5rb0h/4K04WXfs4lmdWxh9ngjwC+UmJcWtjCG69vGGzYVu3gpoBeszswIESKClooiu4XwIn4ijC9SEu7VntCslK+RqeulobIA3qOlmnQMH5aTqwYJha2VVSpu6kR79lY6gGH75uzxbf9Jxl44DNZjYlZUUXpQe3cnU2Zfy8Hn6ZJC3eO7akSQpx2QLUiA0m3IMMqA012ClyIpG40D/SwKgg/UG2zp79IgCmpHtzQFUZBasgHyp+EBt0TRdCU28oyqbWPltE4NQ52jUe/cs1/DGvTn318Eb/jiLTsr3HXIk0XlCL/H6LT8HE7ZY5mCUU+krujv54hVY7EbkagHPl+j1fZUNfnKtRqSsJI6gX3/3jU+lwWr5nuh7AkRUc3+wn/07YwnlbM1NtrMs5W6TROvJbNpZw92r0+/7jj0FhMPNp2tUVTXY/TFnha5knMo/KsM7F9hN+8hIkrbvU9noadln2xX10xxOA/6DS6NyKy+i0lNCiPOpTTjxc2B61uZ6X/3mowol3lp0ixX+xYAKHpkyIAyH/L9jnlBLJQpZu7Vekgr8hwHB0waTOHyxM710ZpXHuD36CJksSa7XevslC/mvv9kxWZYlZtcyWQNvnQAgF5OWOEs50VTPdJN9uJfQUeZ3DcLsxbmlAUYbsw6mo+0E9xz/1it6EJQIFXKmYwPXpaY54gObTVYLFhJ27xsl+tw/VEM6KcYRDtVIHvRk7WQIOyQFbYUqiy3gha2I8tVibM8FHi5tHxPpxtjLd8Pe3f9F/1X6fkfdLfjK11yQFFfP/PR2wymX0a/r1Mj/QSYKTQCjlRCYQvH81YALNM6iZVA88FSsZ5RY+8QspO8svQfEK1rmLjgcM8AIQjZbBP9LpGY6NKvYmE8RlZm3QB7CjcRRCwG/rga6yZ0JEsVWI/IrXV9KM5wo56BpuehjjsttVJghXd6OM4kR/kd3tGML1h4WLa3BzBHKbDU/CCy2i0RALWgz2AHgwO88c+Wx7OndPiv7T+ZXDjXDA4MQ607Q2NB42gk762K7CcUuP/3u8s+UhHisFIFLW1qUtGyt0H1w2oDMpey2+8zSoXHDwgtxMi2bx2m878UiNktKNu5D0pN1tkDUdPB3UT6YTrews3mLw3HAnxgdtspS2/EGr52ZEj9gJBYo/EvJHyphhtH8PSP9oka3bcsszaFO4G0ZK1RPY5mYP8/AQbFpw5z6ZgYzV+/SoUQlXcbW9pCIz/ncW3YzSEK1NCciA6Zo7MpUap4vPqZ36mYBdZTSVqv+l/qA4kaEWYo1/PSmBQFC17DGEnn4I70ciKLKrU9rMCPHKMxF3pnCC72JfI8NClvoA83e6Uvojgh5PqH4HCGUq8rdfOE5SEfqUbql5RPEVJoV0T5gHIcqbfBQHAhKTqK6sQQTgX+oEe+NRrHJ6Bbs8Wmh1pt+vC6CpvW34pkNTb9zHXqmHCnbGi0Bvu2TqatMJnBFStKiIsD/vAHD+UMmdbrUs6l0Ml5B+MRUYVZp67BpMmtFt1vG0XUaw5zcUhgdqwc9P2vNRzpnq7wqPYE9VBHQMk7t6jFmYRJm4JAd1yDuYHnMd+N+6erxHdv7ydGE5OOanGD5udpzGI8m8YAFVwpISa2ZRHnyTvRBg/jCUmIWN6B23UsUwljPNn+ynoq9mlREOu55YjkZlYoMLIpI7SBiUKwxjvKVNXfLQ2iPBnZ6Ykdmlh75Zb233rY03iFhDMww0gP4UHO1zBORpF/W3+3RPgapUrE/o8m4Lxhn9b883WSJ6JBABgdrPAUHXssgvvmdRX2g7maVsw/p1SnOMTooVQuSJBPoWCW7nGhdAGXIpQiBBGgBraS1MkZB+FyRPSRqCOXLMdr9uRANwRH+eCI2aPK8J0ry9fkugCVsfvs3Lg7XNNGAlJTnA6ZJDEpxaMeIY5fk14guP4zFz1+XyHO8+tc6J04zv3LVIg/2TnqbYEGyouXZUAFONKFk4RU1pNJWm/UPRlZjG2I5XjWod1BpaR70X+4pMZTrKA6z2EBWDiMDXvIp8gv/pREcMo5CVXIVHVR4FXXPq/iE4RUfsYKOZUgUCP67PKOa5F8l5znJgSWG7YTcIidhvyFGqpJ8yQLEzQJiPkzGh0X2DMiFvD0vJgnhx317nfPUgeGeNwHJK61xbxWbnMc3UApg/gGN4pvf0HsRTE18i88UsppS5lxpiC4UbqIoq65Na6+oggd261Rg2Q0x2wkwklnSzgkT39hKx9jtVG4V3/PEJUpoCx+I7P4YRii1oNZNyIU7yHJiFNT45TsDGpALmckiT0UqWh+NhXougHBEFYFEIK13uewY3Uls2JVqwyBvRpHaiktEd4ZueWhViPgprVwVooPl2qO41E1s37xav7PBI+5bJAiqstcs3fG1wI3wHiSvnfe49bg381PxATHyYnFJIBTgLvSBOpT1mSCuMuBrQsXEm0j5OWqMeiXmmEtJHJsFcCw5M5dNm97QqRTHJbjXmK/5egVTZUhhdLmSPHcdMelvHmyIW0iuLugBRkYtmLuLpvNVsRxiYs5n3hz5IBU1PzQtXwe3Xw3bOk6dan5Micww3hqKG7gy7jQu+4BTUH0u+dT8TlU3PuuoZ+BiA9X6e5QNohMONnZ7onGhhkIAvEDVMC3WW/yY0d0lQwfsEoH/Rs1AB7ZYXL78I9J7Ha/IXwRU6+REH6Ox4Bl9NFqcAWkjWWRBj/kebF/jwePsKCWvYXOShbqdKDbOX6t0ZiscpFO6myaMxFQQIhmB/3lb+b0GPiv6fQ6sCbC7//VLEhgNUMNNTWoqhV0buWSxVlpoVfwQercw6pOOdzf/y72rO93c+eThHh2Dxfxl3yooPzcRjDr25nUcstSwp9lsosKqcZnk1sgh/zqADE5ZLYDljONM16S2OEKfFTl2ipck6gccaj0TBvzYaYesug+OOpte0fkfrd6K1ov3UNEhC6aP97IdyGz9sbNzDntEUwFTtNDFpOqwgUqHpUSswQ9VsiG1eSD4ORZxyJxH7E1qkR3c1uxDMt4brCnXzLQWyVBaANEDeMR7tZ6O2foFGw1TXwHGjRmzfQUnWMgzI4PeVsOi402J5oA8a8InppoYJ0dccgpz49bBqr3C2wdnS0fQHgaKdhMHQuLIBuBvryPUeRB89o5dE+xrv2wFYo39Cmaz+WigKzWef5q02RL/iSjIAt4mZXbRRruZGtO6UdsmVqi1jb/13brQtUpqLRo9Q+ZfV7pSEOfKdRGrCVnvjzNbcvyu3oD0OPgIwgUkNoCleS1/9W8eEqdJ4wsCqfNVAA/vFWgAAzatnLeOOSp+0YZhDlz8QdYpoZI8Sd9zcgtHcIZgxEO2TDI+MnnMoWyDTdOkAs6pCe9kfYBcbXuf1p0zKryjglVdLLqPpY9jrjjTUC6WCYaXvIFoFDyZsTzPb5sN+n61//XqfN4DT2I4n6V2krm7PxHh+y6DTb1hYI9TVE4OmX1kDmc6OtLIpBfa4SRbGTXkCRKUA01Mpcn3BdVWUBPTQWmoUc/phBIyc26tfwu0bFfeoHtV0z/g4GjIevazvUhbeW/sAMEv9QWszEDI3mXdcZNXIOIquMPPgomGosNAAAAAAHemnVS6ulDOzDMlwOF771Os9Y599SuvDQ0v/BeeTwreIh7o/Risf7h/kC74ws8x1HxjK6X3wuha1E4OYPuDKRP3ErE8hUGhaxEVfykeRPdmdpDFFEDB0kpUY9DcbCSUt7NwC8AUt03BMWHoVE8w7gvSkU0cym9Uyxq3ndWM8a33Jt0a7ncMvRrpIuGXeAqsZ3+gyD7+eMVTiLrMKERe0jWt84CHkxb3ps+RmfARsiH9tNxoGyidEmgiFtADuptkgjeLINpDAOF0pWrKovr9PGEGyQSqTbdvxtGwgA5UrFOMH6K2UXP0f6bIcHlmxgKlJo6Hl0TuAVGR2tdgTvGu5EI7tB8Uk0ceDN4Af7IXhXZsKmfR+DklJK6bGdBYPcOGeeWVGVRQYZd6A0/qsGFV843kKI+ZarNNzabGpzNRfi42LPUr1dOBLB3aUf5omWAAAAAKWyKFULZN3CZ/uWuDbY5D7yQLim2ZNllY++G1zIBaqgHCUeqWtoBjczmSe6EOrqPRnR+HhDFJLKAceHcu+V6WQTSYAVfx8lcWw5DXo7hPv8H6o5ZnHSs0BigPZeYVlpNIdCBs97OJ+J/Tjt7JFXDbu4NJF75s4kd/FLXx2Dy70lo/Oqwf5oLf4d6hRP3JQ2CS8+m5UAFsbE2esKvAfIOKDYCX+x2CJota6QSVk/A4U+tno+TMVLPwy8GuGBZ0EaWUlHapuBHEFxp7P7J67NEBLsLb7zjPXk3x5ihI/VpyVT4O98xOwv3bWTUfMlwrzyR8MBe1zoVHMeeVdMJsQKukjMgq8M/SKX861fVa+E5rJdcGQ+ctTC2N73UHXbUcVmGxrHwL8AAAAAZschwpBIYPFctDHn/ae1W+PH8lx78kR8oM130w/7NDchgPlQVK8BEmvczGG8CNQAEXTnpuvmpQYq2Co+phw9DZ70fgdoLOCdWDxxLPyWKN5lDVZHygOofeOO3tujy8XNHsMkvlfVpQyb7nZW5LxUaRZCdnAmFT1RtZzla7b/jvZAwGTxyQvnz2JC517yPYApQ8caUn1jpMgXBSm8odjevUkFGq0qHj43dSU7ZiTgRXTwATF80CxDswKebTxTazkFOHM9o0CW8O9Of3OH4OIP08BOSxt2K4/VXvZXw8G11XbYBihOLIc2c+J4vLHUms35zl1TFyPgZdoZEilLm6Qeh7FszgzzNQ+3dBHv8UKnvufKK6zNdxBn9eRAlMmypVN1UXqWqAQCQ4OSB4HYAEDfXf1AAAAAAd/zeLMDSFPW4/iVpZ1S2sOaHMNXIVskwQoFpZlxb1E24j8qTQ7oWjJZvNYoqTpWWQ/Y1rgmva9voLUYQj1y11ZZiAlsynu5xGcbuEGbO2nVvK2OfxOdVVyP/OYsFlj8oZBG8SUtms5ND1qPcsDezkZXylFot31iM5BAq65kGZeS1PmwolNk+E69icVhR3qjYB2zuRf0YUC6IutbkMRccSKNdox1gT9qInMIjUg72cGYx0H8iqLzc5VrwKQxYfXf7xIrOQUvvM8hMWAmlLeIG1gb7Gtns2cvNEk82tC9BBaycGLmOLAlUkGBfVR6/eadWMmO0KIWE3L1FCrOseEBZnzF7bh3XmsTAAqGNteu7J7qSwTmcbQ39DsypjZoPIGLmb2zn+vxdke/Ejy6nY4nooGwtLWaZ01MBOV5tT4wZzUPgR1BkRlozcsjnmINQHeaWZHZMe6CzvOyPDDpFaTMm9Wrdy62LHWwvdPPp6lGL4eZej3bZ4xSgAAAG59G3Jp41gqoa5sghe75w4a5WKf7OAEaM0LPiYSLRAktVUrePWSQ2d7b3X/RD5p1x40BGjNpvkaIjXMl5RXP72OMZNwe9W3sgPBVx0YTNQdV7IdL9LtIAclsi+TbdTwiVrc8+r8kpmrVAQirOkoFx30jUgQeL7Fvyn5m9NAvqN1jeI4FerfMGJOEIjuYoiwBiUH5zTDIeMjlRK/bN//auJ6CCsNFHHaAgJ8/t5lsINMihoMFKq+tHCFPXSi0MjMIEOyoqehl7lRYCkAGR7PHCFke/q1jcoM+gAz8pY0cQ9/A/ZEbuFGqk1pDa+38SJ0ohCSPtalKTX7wHdsE+HRuWbiRlPW96Z4MabgBR6z8j/f3kBQbpnoNalYdVr+2UEENjx0/ZzCn/zPAIzeAAPXYAusBU0unHmJLauY3N39bNBplhC/EQfAacCPGVMX9EJAGE+GLbCJt/SdPG0gTaxZD6Sg3/aceT1cHpFjdMdpHkRdSMt+5HEAAAAABHpsysqLVUIS9GCXJEQ6pXaZiXbFiF7z3SwCFxg9Y69XGUiOc9tJh2r6jqCn01in78YEaV14x735GZ9rgXgBTM5Wz5ZZIxgT97Mv+rDxDdnvvTWSe+tZ+7C0NsPdwvC+N+xxSsG9dZBSKGPRmVB1Ax+MQlDbfQw1BGLjCReh7S1YSlVGUvFvex4lWRtZ9Hm/l0ZzA6TFdGJCbJFY05JQp0iepETVE2zlrQ+5NjowiA+SofZ0qbeZkYIM+9BzHr6RDPd3N95xigQ1reTj3hl/g4EIbAX3xiz/fiUOI5hDqYu0fSrxopVGmXfgXkFgRoqL7ecnowOwJGIjKptotTfiKOwzI0syxAfo5X3Opz1GBXdIUH/SbZRh94DhE0dX+EzQXNq0WUS9eS4yKgbXefjNNZWOaHEE7+33Hl0B8a8XCKTd51U8FespgesHLU7sEwecX0tj/mqjISsmYGCZny7hdTmrrVMCjCSFp4qoibWeoQDkYgGPFGBAAAAFjXiBYOgqtSO89XN2OIZEXNYxEu6rOPpNQ213Kgpg8vifQqnXQi3kF6ynCwUm0AVO2FyCwcK4nBObX4lizffVKHM03k0lgZbuSRvV84ueu6LlZHGIItjJqp8FS88uHJlviWtF6Fe0icJDBQqUQTXGVpIYBIeDpG2WbcECQB4LTZB0qBpfd5OxVZzIFmpRR+UfJavgXeT+RfPyEdwILcu9dguhsZAVY82Zv2GjLt8efNhrsTSID7yTZbrlgdlGRZJXOULc4zmJzKa/A8dvuYyjSh4S7GVY/I4670bFE1FUXEPik7VVujxH5lwKpuDZoFrynYBYEVmMSbMKtxVsZR1U6Q4Xq1eQv1rynXeooR0SSEYbdDryIu4TuFW/LN71SHqN03s1Z74FIcgG91q43ojjz/hXX8MxWETsgvM7H1xaJNE1E+4t2WR7XwSzml6LPgYnbM4vNTKzCUpyZRuklrULg0YV2IFNf6SQUSM8AF3GhhsAfCqz9aX5JtOCz6xiJuup4e/bYsSDRuuFFA4XYImDzE/qOEAn7+iPRMQXpINPyHZH/bwjEt/YxdfzCDE/7PL9iMQAyaAAHkI4wFlyRF0vB6VOsoDSpcmlezH9BZ9kl80oHCAwwQyzCYbI97IemkJHTLKB5NiTJSORA+b0nx/iIkXyijLVTxIzKh4xtRvNGBj0oH0Dvjuw7qbRheEfEIA00ptMLBLVRrgWX9wUjTQRWYAZMSEnnojYRBa1xSoPUhqPbYBVt4/6QDnUkwhp4Tua71bp3t1Qq4SRsCGcNAulYoauoJEqgHnwEnSmbIc/5WJ2zXF7D9uhywFUxhY+GIHJnCN041/PUd9FssMCX4Zn4rZ3znIUI7G44JcS0YaOeVkjaWwruRaMaMVjyyKAnKcOnsf8cLJhn1wo4q1r7i2c7sog/8BWdmJJNUJlEsWbvYHxRSxGPBcnYjPdcfv2huQFDf8mruuiM3NkVLRo952OMcIiopuTB0QSup6l42qwpdtSd7T5w9tDNDESINjrK+VaaQYvjiD/ShUc2rcZQGjUBAlfXbj9pGtj5JAG4oVfjk8KCmxr+h1JMYroJ2eKVauhfsOnmvHzhj+bPdHj4X2+rWCga2lbf1uB72VsDsXZ99s5vGpLM2kSLRfZfV3hid2Z6mNRFmYQmz8sytW6LHDjdNfJZZG80ZUhc78nJKRoGe2kjWNar13v9UcqpBX924CZFsEll7mseRNCJt7uKvo8kzF3KdJPwWQyhaO0v6vcFUDe4Oppp6kxG6lSOOS2RcSb7IJMNG9UIrcQH6ykJ4S9Ih5o34kWsJ4OIKNlTDNvtzhIeO+OmGCdt6yE62nsH2aYJk8Pvf7BJ1GtpWcO3wxCVDSK4GkrtNnLUJfDJoh2+czloI7Q1wQT8MwysDe0E6BzR9WMMgnpJAVLTerFpcVSnr8Pq4/TkEO8XrUQ1Ng1OJa0frQOy98Tyh0NddUPKA4y2prJPbMu3VtxhFmpQLdGiD/H3sDLzAcKa44s6wwSS2SyBgrIzEYqW6tBdEjlYZ4vbRqBJd/0qTiNb3yRQQLNAhBH6Esh2hbQktkBCLSrNoOo4ht1GbGKWgVKuJN4kPBVxdB6yb7LdnHTI3ygqDQU4i6V+VDQs9McjwBSFBZOOxvJRXmneJEqWTUXkrmHTloC7idilHXVsMFXXlk5FpNMNeRsf8mvAEZ2GXp+43DIYeJ9gDHcitfQ8psyYey9hMp8MvFJwnNGgm0G9+pmkOksngMIYMM+PcLMsHLabG6vmeQD4ROvLQENWr1FVHNhUOgPSIGmxBUmIdpXlGxhEXMtliaqO0C2T5FIWpopYSOMBjOZ5RL7thsVEPkAgiHitIk8xzbZcVBiCsJZxhZGUtSrReFQUvwT7kMGcIQ0gtf/ceC/97JRYFniLlASdB4WZLUnVseA7wdthzaQB3BSefyzx4c/A9tp1568bx9hvGzZbcCLcEQTai+bLO2y2ZXpf4kbrhfguoujx41mHUCecMdBejGDxqYocS1sMzZMzUKAQgPCjDajHlqOGdKp8r4+AWncxjITzer64EhgWbwLoJH4vUPNK2HP4eGwtFQdYcnhld3gyYnZECRuh2c1j5HHgoxb/+38QzrjZcs/kcPD/d5DovzzRKn/wHuZf4XGfR8bAkClZuaGJdnFH4P3tTJKMe9oi1xlc3gsahPR7C+LvZ9zP/hjeKKF7Cjr0yySwOnPR4gcmQFjfYlkzLRv7axvYndiJF9FcqNUvd667B6zLe4TFyqkMKuk6LkNe4fpptaGGe4yAC7GrtTwm77VdK/OHB1jlb9DhW6xQLYh14Iq2lkRlNMIcXs9sBfcZ+iVc6kfOZTwlQND0rFAZh+GLowRPzI9Frav3QroODdzyyUqZtzY6l/Xq1m6EnbwSGfHKeP8GvsM2HLdQJiSgsmIW1YbBsGnvWWULCgB6pgzV0nzmffvbeAVS79ni7FB0jFOrbLxgStfO2fvB0CMY/uQ6GK2AwghehDpe+XsFAl3ESs6zJzxPlUF4eM/0dneCbuEkLq3rbAK19T7phZKzNDSXNwyy4BdMaZwyk5zfwII8sMMl5hpZBf6b7WzTc2b6uo/T+PgleSV12titnPvTEkXyUlW5nTts+Rg6cPk50zIeuddI35YB81q/mJcdaUWXmrZm4iAJXuEFzVaSe9F80a0PZ3hGpBTeIjGCkl8f3xys8ZVDK2VOTWbFbbLid7jIqwRyTC4yKMYFdW0bPPKRldMovpTAJ3lyho5V3+ZZDSKSjuETkNTqMEngBZfDCu+PopXgD3xSPWepQ8/xwMzawpr1J2EJ2vB9zj7uxVRKyGdNRyi5IYU/Ryr0NUrQO0ONSvBSULivcXWhiLTr7EPepFYMk/DVEzNC/gRVgdgdVtU1wpAXQjzJvWdRrLAYoPc5fAbCX6S1FG1aigme3iJxgPUB8U70NdJjkJiTpy8m0PP33Yn642aVK62YJH1kv/CuXczoexB7XgQmZbLeKXWimPXHtw9njEy1Pbaxm/8Rg1xxaYLCi7GkQBGpl9WlczvRhP6/glvslranMJdiH+IUkAIZRNdnWiRLGTkKtOMo1l9zc9eOp9c+VHnQfULAeDotffiC8l7EzCiLlCXDUtkujtfwAF/35WQTXjGBaJGgSOehOjI9kQe72gAMyqzZOk6OCo9QwZG9/PozQd8t5hS1cRP/XEZialiHKUv9+Ztj8jLWZqClOvBQBOlA+0n70HdZd8qqocuziu38INq4fgLNRMWwJJIGeyt/sSCfRSNHGooEC2yKry3uyIv7FpkymjYHCcfpsgI9qJfkJFJuuMMIzVtzhbmJuKv4scyf2LyMjZ420gavLjkXHjNWCnqE5KL2ngSHSKijHjVTES2I3dyUTXfh5w0vJA169kINJhY9fnw65JppbF3JVNr5jbNZ6Zppqd3PNmcc1faZ88mlxMtYUyT9jQ5a0j/t7Z910YzYiROa9PFzwSWDpiQ2qiMEd0H5FlxnhZbJ3HMPqnjPvdRrdDbEB9O9mDv5yPrsVZEl+sr4iCP2274+/ubPhXbqtNc/ETa8rMN430/z3kQHzCV5n35sN74NtUC4MbcBcAHTHO2quTBxbaZygFnb4WkpJ6blDWJRKztF59n/qvt+chImVUyLNhffwj0IgdSbS4dn6dimgbjh/Zd71f4GYE7oFNgvRkJH7YkaOzJb9qAdkbU5/Z2RYpgMp9O+nexchEOQujxBa4M+2u9aixSW1+amVP5R2IXFW9FINDJu0ZlAwvl7gEOGe0EkTfZ5/esmw/OjrcKoG6BxjYsx2ECKE/lO7HO+apSgG2wZrzjax1RqDOjmZ5O2Zr7MF/czmrrw64uwsVtlyw+2QPlTefA9x+yDHiKDAi8lgaiWuaDplawZkyJRnZqh8aEmRsqlIFQ782msrccUrMHuqsaw0QrWCbE9PUwPD1LTDe9tMpbXUVjApTo5tITZLf4zzMQFzp9sw0lO/hdcDAORjXUmO4U7Iu4RF/5T9J4MgZagNReMBOprQMhtmXXpmoJE0GONyGUiFbUJXGJ99zPdgi51rkM3cbfhHwYg8khv5oLATZgFQvPMx0iBvR2QjR0EyNvc0gBMtvHgA4aFxMbU4LH8UgcrPW2iO9dH16uZokdg59sg7KWf82sVYkAJz7cAcQZkCF0yVhMuOZZo4kSwz0yYAs3Pe/V2QsZ1pP3e5zIBvNh5oTtvoW57ZD2rSpEz0n8KzD7LiCW8MyVSwBISPS72dN4MhQeywMjtD+j+DouXhWAO1gBpq6oRjP52uvL3cpzkeiN/yhnRKG7fVod3KaZ13hli57X2v/VtT9zto3l7C3zELVVX+DNRc9kMJ24AtvLrJVpEQVHXIqMiYYXZtl3AdndKTw4AloSdI4wMdEIYfBycpI9jcSFsGl23BHNphuvKJn+KG6wjJ3iofSWw56paKCI3oVTVazBHDab62cssxoITEe+so4iAXnk+mKrbb7DjBq2MCaDI44cZ2Jo8yoqd9ESFi4XTVwGycfav3FUqbEq432Zx/baDyusKXIuvKR0tho2/LNCX76ZRVdoLdm0pUBjFdXPVtgPgfuov96E+hN0FGTNmc3O9wvKov+mehWyiCxHaAX8GYYdkUa87HFOS3KOtRD3NwLu/qORtqVZCCU6aN5j/NdzLad2UDwEAa0jgo7hPiBBjEYjjbRMjJHbeMCTzBWp3pNLihRcWK2ToAFb85DGiH0DH/QZUcqFSdRW2Yb7r7dGHgxCKOZ2M27l+uiKxkAy6fGch1G8iEd8kdAT1wdVmGpiTdZDd66P7D0GMA+TWHpxgS3smn/HfBQL9rH0XIeKpnQTd8SPRxyI8G8AcLGhpKu0OYRC+BQQ7D6fjdaJkjr6JNiAE3xrof5BNPXFT5vFmbTm7T0cNVPXmxeR4jqg3kQSjkW1bMQYpH7KSTw/1meW7ARhhMf94QeYd0e2PnDhRrgqvwIWxRm1qanH/+ycQCwZ9vduPImm9HyWhwL5w0NAK8KcuJCxwDnj2+KINnMr/Q0y8pkszwkXesSRVKRgqqUnMx4f4ATIetDXLRpPofNFoSGBtbM3VvGvCzwagrYto6Hf7XpowWakK4n9TkrgLBuZg7kCl6NJhqcajJsW0rSrSoN4QkG7Yy8gjBQV3m32TjIiONrKnUNLwFWiOLmGEEdggzZZzuaR78rdToEjiIOsi46mA/a8q9uwRCWcafD1WVyFY6JOYQ7B3JkFJ2kkDjHJ9O7fnz/7LnLZZ9w9C7VDWEbH0i8G0p6yFklT2Asju/puRPUQtMnh6HEHiJ0bm7KWBpxPEJlPfpSUyr2oCsYrBfo2RDSCeu+G1c5qb2RkEKhA7yBlCqeoiwLP6IVpvx6npXuGncN+YNsoSVfsAplVcer0O+C0vyvO7P9GZgCRB/d2BOPMI4MuMS10ybRR8h49zpRnGuAXR4DMogELp9Im9jQ84J2va39g66wHCnbjHBtvmbyZg2HULUu8gLNhaPuYA6Vp48zZDKhS0HzMak4MIR2A5etndvC4j+6yhOLU0SmO0ceZ88HyYUUuA762O+RFKFcgpgVNQZJSa5uxXRg6JZvPDmMA4FBqvu8cJCfxrM9Ft0qhl+PkDrnC/WqzDY6S+P8yV2KffQHtRbdb+izSCAVfJGDjISHstxnubneieBKl7fbkuzWJ/G2X9FN+sBWg4JxGNtfpneVhLh/iHc7gBwfGfUxMHoODInt2g2fOTGpwlBkFJYLrD7hKQoZ5yAUMPGbWUJVSuDCPrEqtcakIRfOx6/W0nBAF6vWjvCoeZOQ7M9JRdlLVVKGbNZidScTWk3cKlalkg22Kr6N3o7BlkRXKzH9MmZO7RIqGknGEizQFKFIxxt2BdDBIGs4QUR5URCLkqGPaJfc209TNvF5QKlfiu6RWyihrgM3PU6ABRDSt99xXS+Mtj+KL6RPf6f+K9wuH8ucrbvlm1xrPqv0TbLqdN2u54IFjkuCNCqyDbwg8y7FhfTx9h1re37GNnAhKtORWzsDS7B4OiIrcnAIUdrnJlCnzTVSBTS+xO9mqgFmCCEBuAEpRpwtQDdltmGBA2DkCJ22M0si2d+Mn6vDCxIKF8HKzZ6KHg3gdsHO65H4R4ViftxqlXRDpVSjlIPl1DiXVp79LL702thxIvrAd1FynRSBY/BOV2RauZ/5Uu3pcq9DM36kh8krucVnepTpQ4+9N0VveNhF5tAuQ2+Zwkzy9BG72aZMyIturY6izJesbWgMPfod8gLHa0UJHWJAQpSEhBRwjfC6AZ8AgRIz08mfziMKNlZ6jDVRfiwCG0dJOqub45xFQmpk3fpB/7eTemSgP7kQSPErSRfBRj6+vYzMtliA9EcdcB5Q8epw0EFcS1TwubtkStY2SjtSBXnJPRACkJRi1f/VBun5uPIIjf48j1h/S7o1JFJp+M7D6OrGLo+2kuFI3fVsFlPSFU+SpNrALrbk0FgMh01kwPW+qRidNOOKdvRxo4ULwqXUuOl9HAjgxqDr1ON4d3jMd5wM85f5r2+C/enMc/YtXVxdrUx4v2aAc23I/DnEwkAACehPSivuPSi1m9e90KSA9Bd2bt/Hy8cU8lu3CqFqIl2XDlpBEd6cWd/hWS98dFDLawL9p4dAn2L5wOQ2l8FGKwByeGYXGFeIlUr1NMmuPGzQOGOJH6tfevA5etsXwgAfkCo1EZLf6WLV+tHN1ylRe3NY8TTbqtjybvOHncqd4uSPmbj3CGn+Kt7yZlRDSO6XvWuug/14/kXTn41sQNTYNRI5/K7bJUBpCGn734L0KYhnh9qFh4lJbsRuerQsWOG/95igyz2s3F8DpcQTgZuzCxS6XBaTNeUAYoP1n0eOASo1IX7MD9broM24IVqZt+9gKnL5hG8TJbLPHzZqnlxpKJ8A7pmmFLTGpzvudC6bbRcwt8aU0CyxG3lp6PLQ78zp7/yXrni7CGtB4ZWH5EC0kKZWDaNpoYAh80aPmTHe6fdXVzgLH72PC3sl/5M+XWdwXdoOhLM8uwOd7tdkYgSnGzzgLZfSalXfWSkK8gCJXEzzFiwfDiCK97q3pjP9+ESLWBiVIABmZPpojZ9L1ULDx76t85IpcsIRc9b7tv18nJDbp6SzBWfKEDCwJCuEuBEFuJVA+wflV7aU9hYAsMWcTR/+LFvL2GfTgXkM01e2hGYMhggVrcmEumi9rPmUPdq1GSjkY76zX5ORRSvILc7QHFDM3wEpIgA/w18+9FlBCfloEU4LR/6noxFmLaxQtyfJFAjFGGMktzHvi+79zCkFcWm9SyyGDKHxeAnUtOCYmb1+wbaLNEKKz/wWdG55nxLqrMWjHfro42gAQMKqu+6BrZ4HK2QMdBBWYy9LQU4CoeuMUzIP+sHOFEu/7AvNHSOzv+Y9zG0OyLbSSBtZRnIW66SFNYD2xdnXq+L9H/amMbY6ju2EFwRgOOd27zkprBKDppbmpbZUCFWwcTQbO++9CwtIryIOrMRxA8Yzdr1FBdjU/f2qf4+rsGz7ul5Py6lTbjsaILmQ+xpPE8lDf+1YOfjkBP9+mWSd2EiJiFicVrIQ8fvWVgPP2/4Ry2NCD5cKv+cex46CyCI209uhijgakay8SSPhfhebfqJ1mZKjqLJwfqO5A+kArPqM3gEDQPsTdo6R9MSBUdNIyQrbW9eZoFKqQBQqYBQgEMhRcJAEI1wpGJivFyujHj9bBEjDn2OgJidxrbK2Aw9/HD0i4pdIdU0Gz50DQJvm5AHHVdGrizzZYH+JVntTEBE7T3S52o6LP4e+hTZK3hmx4vmuDXuHtmXVN+gax8Gg7VAdPTgwE53jpNypGh7zaIoLMiFSdjTUGBXupS0iFM4RXU7Vv6TJJxdaO7/4hvc6fSH9mPQ4oypBlTMx3p+uvNjhgi2xzFkQ0IzRCnJeE/rBdCuyj9DG8h2QnD75KI2uZ5deSp9YnqprbgRGEVsho98a8fgCViEFBC/JC9wQ9tts1gonvaKV7jQEZDfBAXU9UByaEE4JEc8yZQUii6+GM2RTbJd0CKBMsTDHKAXFOxqKACYaqlijFyltVomgh5SR6pnfvhgk+eOZyN1TbM1yzyDIyQpQ8BvjdD6kNT3QQOAk/grS/wb/gAdpCAeE5RcdFiv7Mv+iRGxnunvBlFaB1Uzr0MLeewUsvs3EzDebEmLoIa37Gu17gKHND7RDqwC9L7HKunA0lSOqhl4Pl+Zb4WVvKSQ9ich9YA6rZZqt2T+A+lTd7Cs/4VUE3NbvMHY9fHJEPi+jjB1Y3le8L09Chm4Opr250yoEK064ChgX5Q2WkWLxuSLJTtZY04LsSa6gvmlJ7R484rwc5HX0H/j3Trf+zFJ+ir5gUv+f4zab2f4s2yzzVHKJF7AbcvuBVQVz5/FTuhki2CjUA+/zuqcr8Tr2I56Qbr7VwijyhvFV4tOWv8SlVoHLpzMIPa6vOOt+7G1xIYbB/MT0dprIVsRyYTsCcyWex7NIxieON3ijvSQPm6tQCNHRdMsBwW+Y+laMhl43lQxcByM4SN6b8NcwIYmx7jdWaO9m8qPlulbwhZhLyqoi5QErGrGRuDoT9hGHGh+/+yexvjBmeexsxgyyUxiwhjo7a0Kabeo01/2NyC9BNvQFIv8Z5dPx6h4/cpMCHtSC6dGqr1Rju9PW5/fOrzz82uMZinsnQBVz43so1UmD9JN360aeu3qSsFssY5sBOJadZqfR939UGPENHsgxLNwXMsSCscwEPaQfXW8zAkm7odKPaXcKZNyC9GpbZJ0ztOS64IcN5gcPyuogoX5OjuRK5aaaNOQzxh6ZoC/qYcWwDP4rSgZqSqIfBJbRo1mIlmS2Z5nYB+ec30vc7MwikW5ImvSMJ6VtH4BETetbAoDOb1/+AssLJEbpGy3crYEcUgLGBJu+3CtOjq3HOHRugV+E1nTvpqsD/ehpGjxCWDZZPmiad6p6BTi3IAdo0LE66jsYQ/Yrn5SWy91f3/lIzBEK6FO8lDDN/W8uQMalvMFhJTsxdDDzcS4rgsiOsJkHKzb7Y7W1LGQ27c6WbOqUGjPJ9A43tJb0eXYyTrLRntVC+zXrqJsYgUFEy70iwQAzjGqYfJ0a2+B0VWdSNv89/1xObhQtaGfvQIhtkCoMHBNEVlunk03YK3IZcNpbY/b6qCY3ybCzZNaSPHwJo5+E4jU4y7rHIKqh/VCZ4j2BJS3BmxZNOc0nppcb3cDbFQCoXqxCgR7VYciufnvsXz2LkR4PBd85SeC8B8kDWQGrHDHh9D+i5R0ILec9zi4fgjeBnYU1KMRJfed33zSt5uvX8Kx1qdQ/xZu5vYQD3THdjj6HmybmdF9+RxL2lu2vjXy5mATWIyzJePcSLi4Yta6IPMSy8GPx/M8kXJkD9WWGgHuNOK7mDwqALyoeltyfk5wWiGh9Nrm3kMSn2Om+ghOHnB08GNm2sTP6Qpsr4/H53c9DnCZcMGKbxe6xPWO4yA9qq+IuPmzz2nhSfu2F9/L+EsfxFmYqEoyDt+CGk9faZiPjEDiWGEaZ6KC0O5jrFMPnUvPZ/Dt0jyroBSU393uC2wpPUgPSMG83pOx0LPkAbGIgWuegeeqRnqTplqkiISwDYmrJsM/yWWTLb0Bv93XCOtiQZX+OJOz4ouLWFQAbpmTD5svmotNOYCQ91XfP0KZ/YEbFYfbQjfusC0PQZB5Qju2OxYWbwKM+dRVPSJ6nFfX0kvX1OYMKA43YlHnnM3t8AZZQ3BuNAGZroMO96q/mb3FggI5ljuy/PlBOg06wde79zMd9dMSx2FYZdr/Qwk7uJ5bz+pzmm0ixT2O1oo105A7k84hM3L/rOM7Y+hZT5spLJLo+ounwtaAFtppCZqkMu92+tivUB2eub7Jmh8QdP49XDSPN9Rk8YOJX4KLNucqo5+PR6yrcsnG2vmfx54aGbFPrC55WtCPLqPll8PPfqMwD71lgrrFx1xJZyDM/3in9sFu9dj763Bg4VQ0x7hA2IFVxZ4IPPTK4JH7SP17bRmSDYHA71jNwFgc/LYeZQWKzParB/UYglD5g6uDimQTsvEVeYi0yT/iwegKrELzV/mqP4OaO/YSxhC4puVERKBkFh9TzAR1gsT+crtJkCMfRMAWxv5jWfLPc8JMaBOkdvIMlXd73iKd1zl/KSwj5VNlv0HvkjjSUnVey2D9o3qeDvxZm3wCJuCIBOPwXvIvncQ94PdodqJPul+siq6mNSxtsw+VC4iEBy8Mp0AYBxRjVFMjZVuajkVVZVidz+M+Pd40bq9oQA6Q41kjewc6spj8ciZpyS38KhAs6wqdoAttrSNLRl8XSfsCEko2Rq6aXeXR8KR393W8/6mwISBB02QkgH8ttqGq/HsiOWJ6Vk6GaEpUULpJUWhJbdNIB9HD7BZos/HsLlfdJ5Rf5ZpFDo875xbyzFtXQ1EahAA+C+a6X3JDeZtYH/TPYwzLyj1Cp25N9IfqTePTAvFC9bKsFwZprUQGwANnOmBiIckkYwaFNEMbqJThBUcwr5SfXdyDtHKGb2eOnugJMhO51NtN/D4nJd39meTKlMNiLXsMymQBu40mvx2MUa8dYBZq7Z1Roth1RUVOMyZ5XZJRTHOKbU7Egp+QeP1OUxKlUJMspc0RLZoKqHZa7zhCAGzIcaGy9M2bL2vJpmO3li62Tf2PFV7RWey7+KURZnrA00jC3kwLUlX56CZFkPaHy46rMLJ25dPWZAownr6Pv7Pv2BSkyuzcYAQS6FrpvSRZ8sGg67WXfSrYjxmCrJMhpyweVtYd/ygPXyYGd9eUqpwmzfMaOtCLXWZXeVbiCVHSiHCBHOCjt1++yTXohHXCOY2RZqxZ+zADBhudf5rEyYdgacK6PM2IF6yysFFyKEsUlHGSkxkHnPouEshJlxbrAHdfpSxbu3xZg19u+HK+lgzAzyZQbq0SVPcnMHNow0TStzCqm3/MqVBkRertlVsYz2EnUeSFRgrLUI5pL9ISriGVsY5aDdWel2nzJwrwo5PK9vdbqogNpD6a9vpQAJnSum4TDoj9r7PVzxMBIlvAvrziNx1Sk8LbqnoVc05NT7UiODYlCA8g4uvzbCdRYuZOQBMgvAxBfd1Ine4L0NOayre/jKJNiwjp8Z/LpKToos0yIqytyHMpBOsnTNrRCXMUmioQWOhMgWRcgzqmNLtlRbMV+L3cdgLM75kaQlsFV3eKOfummopUHvIDh/wmubU0cJ9fMW8aEA0jlSbdwiM8y1YZLPc1YnzICvHR5m1mh3elZnNCvHGU6Ju7CAVnaG7Cez4YIFd9PVi8x+lPmGWBRm0WwRn1z/HsVH1v4z0X85UTeaDy6qAF3bk8LeNWyT1EcTy/OAWvEGjCVObOi6H1iXZo1mK8iDUekYKRBCG5BpTY0wxxRoZeEGcwIeqmuuEkrYYErvfLOXO959Gipe1svt4rdYNU1ZYtmGmu3m2CSyJGeKZuoOidjkxM1Ohc+byohvnCQlKdH2aYKy+JcjkftXDwRshdyJYAlOwu70YG4vsO4aVOs/Qwsn8MgRHypK5oq8QiQV9UJ3r9DBIaNB+TXnPQAp6lUeF6Y6k1cvVoRfNLVXNcgt3LLW5STas+gCoFwltTBu5vMd3OuS5CQ+CSO+wnOi4OJfunX79TvDZTnOGf06K+5Y9GdhFEQxM8IJicBvBfbIkSbmVxziyyY8ETk01VGNaGjyFVqpeaURJi8FPRuSO15TfvNMr3mCGbanOfnqyoZYCjiUIuQGNKIH9mqrHfXjQiA8elHAbYAdqQDOxll2aKEYQJCv+ouiNrQR2wZrI+CiiKNJMG2r/7qT3Rpl2r7yQY/ATrIPco45XuZmpaVuHCll38AJmiN7oiZqHpgt36itOKMpr/7epuTzTiieNAKlZzthKAPMOFyjhGVnIwDApOQE+GDGfBqjsyyBqu9VeyxeyuBTwElM3+HgcBnV+g7YoKWVf/jZZifikRqpfRYFZHaWCGB0gYKfbkffXtwSR0T+br2GbTdFJu+6bmN3YZQTK6OxAdpmzTEZ9A/m/zpn0z4VYyxhxkYIHsAkCXcsN0cyM9SmS6KxTMCvcVTevVgwkOR/1CaM1OQZsI6YvWZk0vz6oNn4q3IPgvXtdsSYiBQn6fGBpkKfqY2x/12SnLOSIT6269lV0zeYl8bE3nCv0//hQSwohG8A7v9SfjdSJeHXtPfQcmFoy6CKitAlgmO53U4h8Ig0OsHA3QsQD2jX1XNLXJlRAQnL2bFGWRvJYu8f7oVhIA3Aqr81vOpLKJhsNF89Y6nPOuUmYOecQBQ/XDkVJpNlPgUsgKXgVLGpbMYRCABaN1gqkjayjWnfAeEPh77op01465CwbpiiJrwggMh6sET8Y6IHN2Z4KxYlRV+w47kOZXeoySp4HpAtE/YjN85BXk7xb9eSh7JMEq02OkFnXAQuteXtGqNrWj9IOSfj1XnSOIK+ut+gq9L5A3y8EWYmNgOtZGKRqQbn4NNdMCn8vJqn4VVmbENEfqemguPUZkx5kPImwY7GMSp7nT8a0+no26He+4cyzUY+NTYMN5mmQRAJtkVxtbOrHJ83EBQW1i/C3aArZaQJ9c2XFcBUFg3/pkcabsYv8qg1Vrq9KAzYhdguG+3DllnOBg6/FToRuY+Qr0aaNLZPMZLFKMyGFwgWLhvZeKmiCm0v8pjlpUTZxHYqPLcugZm8a2Qllee5zCMrf/e+mhbyJx7abxZygKlctRZvEBX3J3SWApv/frLfc95fcN/RfAerIlKhFLYqMN36odHTtbKv5UP99Q1Y1P559kJ+agh6D/nfL98P2vSSyNTeZit5drq56WHjGrWthNp4zUeJ7cDilcemqNVHcnVAchIwUpeQ1jxMwZQJwWTw+0K/dDPKUTdyQQDevcc/PgI00j0T0mMsN+XdFfSZeDHIEHwuARVcEBwufmcmJbpL5eobxalSqOUFRAWyB2W1/4cThOXo+5Nbskb6iFLCVIURIuo6Xh902t91GVo62QZoruqpjM0RLpqCXmnYMJ7kYQ11pugT/5cPwrz5mMX138045D+mDOHFYsgock9/2s7sC5nall+4O5mwF0jPWdTKA3MfGBKsAFQN5GdO02NBzhbeBXup/qFQ+QX2iYBKhc15jZ/E/4tK6rPhGXQmpPTZl2L4aUaOfTZGAP58JTInYYm4Vnrf+qxCPJuGMhYH27NT2oXOoeLp5p9M+Ki1fPzNxcpeAQ2/dNcMlMNiJc01XZwFtBbN4wHK1u1ZWFBS9YMZ82EL3vf9h90dsaJjHxG5aukpJYOK9HpX52TBzxrA00tHRcSfAP+nnpH5bmN2h4uAG+x1I9sbpeLYmEyKEDwz8Vjn2DUcIPSerGgLMSsgasYmz8SPWrTwWQsXevo2PpeWSmFMAQKZL6ENh1doOh3ulyJ0tB+4kggHzifCO+/QaSAWx7srAQ4LxWuoQ/AEh6ug+todhoUQN9YdBVIHpui6j6hAJosF1dUP0I9g78QFPhsKjvr0qpEh1Nut3EBvoYRjm3rf4tQc786Znet1GToPNjbYMbNuDzUukoShqERLirSoUL52L0PJ2LuiynZDgUFUtwHDQqrT5DiTOCXoF9qUdKFpnP0YfGteJPGRjIb29cxmRlzgqR8xCwmSM1KgjqREYOPQ/LFkSZqqEe7gduE5rWmYVUSYaSvz+x5JXyqAezkY/gjY67OBI1lA56Yg/qxAHHDG7ao2v1qPIqG2bY0lqTmP7n8Zdsqm7fyEBBqF2yqcyVN9NbkM5aLbEyQTL42xT2J1ubg9Xj9IIeLaUhC65qneF30c2OR83lf4bd3ZQ5Ou64BaCqBusvxHjs4bIBaCOTJrjPUHFkKcBUpwaw8V39Ud6fmMbAVRIpNEhMB5cWsdiV6VytctZil273GBwymbnRNlnOX5IpEteLoa1ojrM6IoFci5hA/9ySwS6iXlZi03iVnlg8kNrvqGsD9kvgpMGn2c6VQQFMgYfRJ8V8dSmLuQFoyfUZvElocHmztkk6t5qxW4GWRJX2OApSO4UzKqkE2ws7cfVJDBhqrjcabvRpYAGmV2AzUwETVdLP3wuNoEuOAAA",_n=function(t){return t[t.CalendarEventEditSave=0]="CalendarEventEditSave",t[t.CalendarEventEditLoading=1]="CalendarEventEditLoading",t[t.CreateCustomer=2]="CreateCustomer",t[t.None=3]="None",t[t.Login=4]="Login",t[t.Test=5]="Test",t[t.AutoArtistPayout=6]="AutoArtistPayout",t[t.PrintPdf=7]="PrintPdf",t[t.CloseEvent=8]="CloseEvent",t[t.NewVersion=9]="NewVersion",t[t.StudioFeeLoading=10]="StudioFeeLoading",t[t.DownloadVoucher=11]="DownloadVoucher",t[t.WhatsAppImageForwardToArtist=12]="WhatsAppImageForwardToArtist",t[t.SyncArtistAc=13]="SyncArtistAc",t[t.DynamicDataSave=14]="DynamicDataSave",t[t.CalendarEventEditCheckOverlap=15]="CalendarEventEditCheckOverlap",t[t.PrintWalkInNo=16]="PrintWalkInNo",t[t.Default=17]="Default",t[t.Temp=18]="Temp",t[t.CreateArtistCalendar=19]="CreateArtistCalendar",t[t.PrintQrCode=20]="PrintQrCode",t[t.SaveSettings=21]="SaveSettings",t[t.ImportTest=22]="ImportTest",t[t.DeleteContact=23]="DeleteContact",t[t.Download=24]="Download",t[t.GeneratePromoCode=25]="GeneratePromoCode",t[t.PreUpdate=26]="PreUpdate",t[t.InventorySort=27]="InventorySort",t[t.LoadPdfs=28]="LoadPdfs",t[t.BroadcastLoading=29]="BroadcastLoading",t[t.LoadingContacts=30]="LoadingContacts",t[t.ArtistConfirm=31]="ArtistConfirm",t[t.ServerDoRestart=32]="ServerDoRestart",t}(_n||{}),vt=(()=>{let e=class e{constructor(i,r,s,o){this.dialog=i,this.snackBar=r,this.router=s,this.shortcutService=o,this.showTattooTicket=new nt,this.showShopOrder=new nt,this.currentLoadingId=_n.None,this.escCounter=0,this.componentDialogStack=[],this.defaultShowOkTimeout=-1,this.updateIsPreparing=!1,this.isJulian=!1,setTimeout(()=>this.initShortcuts(),500)}showTimeChooser(i,r,s="",o,a,l,c){return O(this,null,function*(){let d=[[],[],[],[],[],[]],u=[];c&&c.some(M=>M.position==="start")&&u.push(...c.filter(M=>M.position==="start"));let m=1,f=28;o&&(m=parseInt(o.split(":")[0],10)),a&&(f=parseInt(a.split(":")[0],10));for(let M=m;M<=f;M++){let I=Math.floor((M-m)/5),z=M;z>=24&&(z-=24),u.includes(z.toString())||u.push(z.toString())}c&&c.some(M=>M.position==="end")&&u.push(...c.filter(M=>M.position==="end"));for(let[M,I]of u.entries()){let z=Math.floor(M/5);d[z].push(I)}let _;o&&(_=Qt.parse(o)/Qt.DURATION_1HOUR);let x={buttonRows:d,title:r,text:s,minWidth:"95%",value:i,showHourCounter:l,hourCounterStart:_},D=this.dialog.open(WFe,{minWidth:x.minWidth,data:x,panelClass:"component-dialog"});return yield Sn(D.afterClosed())})}showButtonChooserNew(i){return O(this,null,function*(){i.text||(i.text=""),i.value||(i.value="");let r=yield this.showButtonChooser(i);if(typeof r!="string")return r})}showButtonChooser(i){return O(this,null,function*(){return i=Sr.combineWithDefaultOptions(i,{minWidth:"70vw"}),this.buttonChooserDialogRef=this.dialog.open(NFe,{hasBackdrop:!0,disableClose:!0,minWidth:i.minWidth,data:i,panelClass:"component-dialog"}),yield this.buttonChooserDialogRef.afterClosed().toPromise()})}closeButtonChooser(){this.buttonChooserDialogRef&&this.buttonChooserDialogRef.close()}showInputWhatsApp(i,r){return O(this,null,function*(){r=Sr.combineWithDefaultOptions(r,{timeout:-1,minWidth:"300px",buttonText:"OK",prompt:""}),r.buttonText=r.buttonText.toUpperCase();let s,o=this.dialog.open(DRe,{minWidth:r.minWidth,data:{message:i,buttonText:r.buttonText,showColorPicker:r.showColorPicker},panelClass:"component-dialog"});if(r.timeoutSeconds>0){let l=r.timeoutSeconds,c=()=>{l--,o.componentInstance.buttonText=r.buttonText+" ("+l+")",l===0&&(clearInterval(s),o.close())};c(),s=setInterval(()=>c(),1e3)}return yield o.afterClosed().toPromise()})}showImage(i){return O(this,null,function*(){let r=this.dialog.open(BFe,{hasBackdrop:!0,disableClose:!0,autoFocus:!1,backdropClass:"backdrop-default",panelClass:"component-dialog",data:i});return Sn(yield r.afterClosed())})}showImageViewer(i,r=0){return O(this,null,function*(){let s=this.dialog.open($Fe,{hasBackdrop:!0,disableClose:!0,autoFocus:!1,backdropClass:"backdrop-default",panelClass:"component-dialog"});s.componentInstance.imagesSrc=i})}showImagesAsync(i,r,s){let o=this.dialog.open(nHe,{hasBackdrop:!0,disableClose:!0,autoFocus:!1,backdropClass:"backdrop-default",panelClass:"component-dialog"});return o.componentInstance.imageCount=i,o.componentInstance.currentIndex=r,o.componentInstance.getImageSrc=s,o.componentInstance.buttons=[{text:"Kein gutes Foto?",value:"send-message-to-artist"}],o}showSelect(i,r,s){return O(this,null,function*(){s=Sr.combineWithDefaultOptions(s,{okButtonText:"OK",minWidth:"400px"});let o=this.showComponentDialog(rBe);return o.componentInstance.setData(ve({message:i,items:r},s)),Sn(o.afterClosed())})}showOk(i,r){return O(this,null,function*(){r=Sr.combineWithDefaultOptions(r,{timeoutSeconds:-1,minWidth:"300px",buttonText:"OK"}),r.buttonText=r.buttonText.toUpperCase(),this.defaultShowOkTimeout>-1&&r.timeoutSeconds===-1&&(r.timeoutSeconds=60);let s,o={titleText:r.title,showOkButtonTimeoutSeconds:r.showOkButtonTimeoutSeconds},a=this.showComponentDialog(Mhe,o,{minWidth:r.minWidth});if(a.componentInstance.message.set(i),a.componentInstance.buttonText.set(r.buttonText),r.timeoutSeconds>0){let l=r.timeoutSeconds,c=()=>{l--,a.componentInstance&&a.componentInstance.buttonText.set(r.buttonText+" ("+l+")"),(!a.componentInstance||l===0)&&(clearInterval(s),a.close())};c(),s=setInterval(()=>c(),1e3)}return Sn(a.afterClosed())})}showYesNo(i,r){return O(this,null,function*(){let s=this.showComponentDialog(ske,St(ve({},r),{message:i}));return yield Sn(s.afterClosed())})}showYesNoCancel(i,r){return O(this,null,function*(){return(yield this.showButtons(i,{title:r.title,buttons:[{text:r?.noText?r.noText:"Nein",value:!1},{text:r?.cancelText?r.cancelText:"Abbrechen",value:null},{text:r?.yesText?r.yesText:"Ja",value:!0}],fontSize:r.fontSize||"100%",textAlign:r.textAlign||"left"})).value})}showButtons(i,r){return O(this,null,function*(){let s=this.showComponentDialog(QFe);return s.componentInstance.setData(St(ve({},r),{message:i,returnValue:!1})),Sn(s.afterClosed())})}showMessagePromise(i,r){return this.dialog.open(Mhe,{minWidth:r?.minWidth,minHeight:r?.minHeight,hasBackdrop:!0,disableClose:!0,autoFocus:!0,panelClass:"component-dialog",backdropClass:r?.backdropClass,data:{message:i,icon:r?.icon,titleText:r?.titleText}})}showContactForm(i){i||(i={taglines:[],id:""});let r=this.showComponentDialog(DB);return r.componentInstance.load(i),r}hideLoading(i,r=!1){typeof i!="number"&&(i=_n.Default),(r||this.currentLoadingId===i)&&(this.loadingTimeoutTimeout&&clearTimeout(this.loadingTimeoutTimeout),this.currentLoadingDialog&&this.currentLoadingDialog?.close())}getLoadingDialogConfig(){return{disableClose:!0,autoFocus:!0,panelClass:"nxt-dialog-loading",hasBackdrop:!0,backdropClass:"backdrop-default"}}getGiftCardDialogConfig(){return{disableClose:!0,autoFocus:!0,panelClass:"nxt-dialog-with-border",hasBackdrop:!0,backdropClass:"backdrop-default"}}getDefaultDialogConfig(){return{disableClose:!0,autoFocus:!0,panelClass:"nxt-dialog-loading",hasBackdrop:!0,backdropClass:"backdrop-default",width:"100vw",height:"100vh"}}getEventEditDialogConfig(){return{disableClose:!0,autoFocus:!0,panelClass:"nxt-dialog-event-edit",hasBackdrop:!1,width:"100vw",height:"100vh"}}getLoginNewDialogConfig(){return{disableClose:!0,autoFocus:!0,panelClass:"nxt-dialog-login-new",hasBackdrop:!0}}showLoading(i,r){typeof i=="string"&&(r=i,i=_n.Default),this.currentLoadingDialog&&this.currentLoadingDialog.close(),this.currentLoadingId=i;let s=this.getLoadingDialogConfig();s.data=r?.replace(`/
/g`,"<br/>"),this.currentLoadingDialog=this.dialog.open(Rke,s)}updateLoadingText(i){this.currentLoadingDialog.componentInstance&&(this.currentLoadingDialog.componentInstance.data=i)}showEvent(i,r){let s=this.showComponentFull(nu);return setTimeout(()=>{s.componentInstance.loadEvent({eventId:i}),s.componentInstance.openerComponent=r},50),s}showEventsByContact(i,r=!1){let s=this.showComponentFull(rZ);return setTimeout(()=>{s.componentInstance.load(i),s.componentInstance.isFromCalendarEventEditComponent=r},100),s}showComponentFull(i){let r={disableClose:!0,autoFocus:!0,hasBackdrop:!1,backdropClass:"backdrop-default"};r.panelClass=[],r.panelClass.push("component-full"),i.prototype.transparentBackground&&r.panelClass.push("component-full-transparent");let s=this.dialog.open(i,r);try{s.componentInstance.dialogRef=s}catch{}let o=s.afterClosed().pipe(Jd()).subscribe(()=>{this.removeComponentDialogFromStack(s),o.unsubscribe()});return this.componentDialogStack.push(s),s}showComponentDialog(i,r,s){let o=zi.instance.showIframe("showComponentDialog","Dialog"),a=new K9;a.disableClose=!0,a.autoFocus=!0,a.data=r,a.hasBackdrop=!0,a.minWidth="300px",a.panelClass="component-dialog",s&&(s.minHeight&&(a.minHeight=s.minHeight),s.minWidth&&(a.minWidth=s.minWidth));let l=this.dialog.open(i,a);if(r!==null&&typeof r=="object")for(let d of Object.keys(r))l.componentInstance[d]=r[d];let c=l.afterClosed().pipe(Jd()).subscribe(()=>{this.removeComponentDialogFromStack(l),c.unsubscribe()});return this.componentDialogStack.push(l),l.afterClosed().subscribe(()=>{o===_v.Hide&&zi.instance.hideIframe("Dialog")}),l}closeAllDialogs(i){for(let r of this.dialog.openDialogs)r.componentInstance instanceof i&&(r.close(),Gn.error("is open!!!"))}getConnectionLostDialogMessage(i=""){let r=`<img src="${ZQe}" style="width:100px; float:left; transform: scaleX(-1);" /><img src="${ZQe}" style="width:100px; float:right" />`;return`${i.replace(/\n/g,"<br/>")}<br/><br/>Bitte warten...`}showConnectionLostDialog(){this.updateIsPreparing||this.isConnectionLostVisible||(this.isConnectionLostVisible=!0,this.connectionDialogRef=this.showMessagePromise(this.getConnectionLostDialogMessage(),{icon:"error",backdropClass:"backdrop-default",titleText:"Verbindungsfehler"}))}setConnectionLostDialogAdditionalMessage(i){this.isConnectionLostVisible&&this.connectionDialogRef&&this.connectionDialogRef.componentInstance&&this.connectionDialogRef.componentInstance.message.set(this.getConnectionLostDialogMessage(i))}hideConnectionListDialog(){this.connectionDialogRef&&(this.isConnectionLostVisible=!1,this.connectionDialogRef.close())}closeThisDialogIfOnTop(i,r){return this.componentDialogStack.indexOf(i)===0?(i.close(r),!0):!1}removeComponentDialogFromStack(i){this.componentDialogStack=wc.removeFromArray(this.componentDialogStack,i)}initShortcuts(){this.shortcutService.onKeyPress.subscribe(i=>{i===Pn.Esc?(this.escCounter++,setTimeout(()=>this.escCounter=0,200)):this.escCounter=0,this.escCounter===2&&this.closeDialogOnTop()})}closeDialogOnTop(i){this.componentDialogStack.length>0&&this.componentDialogStack[0].close(i)}showInputOld(i){return O(this,null,function*(){let r=this.showComponentDialog(Dfe);return r.componentInstance.setOptions(i),r})}showInput(i){return O(this,null,function*(){let r=this.showComponentDialog(Dfe);return r.componentInstance.setOptions(i),yield Sn(r.afterClosed())})}showTextareaOld(i){return O(this,null,function*(){let r=this.showComponentDialog(Efe);return r.componentInstance.setOptions(i),r})}showTextarea(i){return O(this,null,function*(){let r=this.showComponentDialog(Efe);return r.componentInstance.setOptions(i),Sn(r.afterClosed())})}showEPCQR(i,r,s,o){let a=[];a.push("BCD"),a.push("002"),a.push("2"),a.push("SCT"),a.push(""),a.push(i),a.push(r),a.push("EUR"+Wn.toMoneyString(s,"").replace(",",".")),a.push(""),a.push(""),a.push(o);let l=this.dialog.open(Kq,{panelClass:"component-dialog",hasBackdrop:!0,disableClose:!1});return l.componentInstance.qrData=a.join(`
`),l}updateLoadingAllowCancel(){this.currentLoadingDialog.componentInstance.allowCancel()}newEvent(i){this.showComponentFull(nu).componentInstance.loadEvent({newEventData:i})}showPdf(i,r,s){let o=this.showComponentDialog(Zge);return o.componentInstance.setData(i,r,s),o}showPdfSrc(i,r,s){let o=this.showComponentDialog(Zge);return o.componentInstance.setDataSrc(i,r,s),o}showCombineContacts(i){return O(this,null,function*(){let r=this.showComponentDialog(BQe);return r.componentInstance.setContacts(i),Sn(r.afterClosed())})}hideLoadingSimple(){this.hideLoading(_n.Default)}showOkWithForceIfJulian(i){return O(this,null,function*(){return this.isJulian?this.showYesNo(i,{yesText:"Force!",noText:"OK"}):this.showOk(i)})}isInFront(i){return this.componentDialogStack.length===0?!0:this.componentDialogStack[this.componentDialogStack.length-1].componentInstance===i}showImageCrop(i,r,s){let o=this.showComponentDialog(LQe);return o.componentInstance.showPreview.set(!!s?.showPreview),s?.buttonText&&o.componentInstance.buttonText.set(s.buttonText),o.componentInstance.setData(r),Sn(o.afterClosed())}showHistory(i,r){i==="contact"?this.showComponentFull(NQe).componentInstance.setData(r):i==="calendarEvent"?this.showComponentFull(JA).componentInstance.setData(r):i==="employee"?this.showComponentFull(HQe).componentInstance.setData(r):i==="artistSpot"&&this.showComponentFull(jQe).componentInstance.setData(r)}showColorPicker(i,r,s){return O(this,null,function*(){let o=this.showComponentDialog(WQe);return o.componentInstance.title.set(i),o.componentInstance.colorInfos.set(s),o.componentInstance.color.set(r),Sn(o.afterClosed())})}showEventNew(i){let r=this.showComponentFull(nu);return setTimeout(()=>{r.componentInstance.loadEvent({newEventData:i})},500),r}showEventRating(i,r){let s=this.showComponentFull(sw);return s.componentInstance.setEventId(i),s.componentInstance.openerComponent=r,s}showConnectWhatsApp(){let i=this.showComponentFull(dee);return Sn(i.afterClosed())}};e.\u0275fac=function(r){return new(r||e)(it(she),it(s5e),it(Ll),it(fu))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var uee,XQe=Q(()=>{uee=class{constructor(e,n){this.register=e,this.unsubscribe=n,this.subscription=this.register("initial")}registerNewOnReconnected(){this.subscription?.unsubscribe(),this.subscription=this.register("reconnect")}registerInitial(){this.subscription?.unsubscribe(),this.subscription=this.register("initial")}}});var n_,FH,LH,hee=Q(()=>{n_=Object.create(null);n_.open="0";n_.close="1";n_.ping="2";n_.pong="3";n_.message="4";n_.upgrade="5";n_.noop="6";FH=Object.create(null);Object.keys(n_).forEach(t=>{FH[n_[t]]=t});LH={type:"error",data:"parser error"}});function JQe(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function nJe(t,e){if(eJe&&t.data instanceof Blob)return t.data.arrayBuffer().then(JQe).then(e);if(tJe&&(t.data instanceof ArrayBuffer||iJe(t.data)))return e(JQe(t.data));OH(t,!1,n=>{a5e||(a5e=new TextEncoder),e(a5e.encode(n))})}var eJe,tJe,iJe,OH,QQe,a5e,rJe=Q(()=>{hee();eJe=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",tJe=typeof ArrayBuffer=="function",iJe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,OH=({type:t,data:e},n,i)=>eJe&&e instanceof Blob?n?i(e):QQe(e,i):tJe&&(e instanceof ArrayBuffer||iJe(e))?n?i(e):QQe(new Blob([e]),i):i(n_[t]+(e||"")),QQe=(t,e)=>{let n=new FileReader;return n.onload=function(){let i=n.result.split(",")[1];e("b"+(i||""))},n.readAsDataURL(t)}});var sJe,NH,oJe,aJe=Q(()=>{sJe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NH=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<sJe.length;t++)NH[sJe.charCodeAt(t)]=t;oJe=t=>{let e=t.length*.75,n=t.length,i,r=0,s,o,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let c=new ArrayBuffer(e),d=new Uint8Array(c);for(i=0;i<n;i+=4)s=NH[t.charCodeAt(i)],o=NH[t.charCodeAt(i+1)],a=NH[t.charCodeAt(i+2)],l=NH[t.charCodeAt(i+3)],d[r++]=s<<2|o>>4,d[r++]=(o&15)<<4|a>>2,d[r++]=(a&3)<<6|l&63;return c}});var g0i,VH,v0i,lJe,cJe=Q(()=>{hee();aJe();g0i=typeof ArrayBuffer=="function",VH=(t,e)=>{if(typeof t!="string")return{type:"message",data:lJe(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:v0i(t.substring(1),e)}:FH[n]?t.length>1?{type:FH[n],data:t.substring(1)}:{type:FH[n]}:LH},v0i=(t,e)=>{if(g0i){let n=oJe(t);return lJe(n,e)}else return{base64:!0,data:t}},lJe=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}}});function pJe(){return new TransformStream({transform(t,e){nJe(t,n=>{let i=n.length,r;if(i<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,i);else if(i<65536){r=new Uint8Array(3);let s=new DataView(r.buffer);s.setUint8(0,126),s.setUint16(1,i)}else{r=new Uint8Array(9);let s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(i))}t.data&&typeof t.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(n)})}})}function pee(t){return t.reduce((e,n)=>e+n.length,0)}function mee(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),i=0;for(let r=0;r<e;r++)n[r]=t[0][i++],i===t[0].length&&(t.shift(),i=0);return t.length&&i<t[0].length&&(t[0]=t[0].slice(i)),n}function mJe(t,e){l5e||(l5e=new TextDecoder);let n=[],i=0,r=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(i===0){if(pee(n)<1)break;let l=mee(n,1);s=(l[0]&128)===128,r=l[0]&127,r<126?i=3:r===126?i=1:i=2}else if(i===1){if(pee(n)<2)break;let l=mee(n,2);r=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),i=3}else if(i===2){if(pee(n)<8)break;let l=mee(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue(LH);break}r=d*Math.pow(2,32)+c.getUint32(4),i=3}else{if(pee(n)<r)break;let l=mee(n,r);a.enqueue(VH(s?l:l5e.decode(l),e)),i=0}if(r===0||r>t){a.enqueue(LH);break}}}})}var dJe,uJe,hJe,l5e,c5e,ZP=Q(()=>{rJe();cJe();hee();dJe="",uJe=(t,e)=>{let n=t.length,i=new Array(n),r=0;t.forEach((s,o)=>{OH(s,!1,a=>{i[o]=a,++r===n&&e(i.join(dJe))})})},hJe=(t,e)=>{let n=t.split(dJe),i=[];for(let r=0;r<n.length;r++){let s=VH(n[r],e);if(i.push(s),s.type==="error")break}return i};c5e=4});function rh(t){if(t)return y0i(t)}function y0i(t){for(var e in rh.prototype)t[e]=rh.prototype[e];return t}var KD=Q(()=>{rh.prototype.on=rh.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};rh.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};rh.prototype.off=rh.prototype.removeListener=rh.prototype.removeAllListeners=rh.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var i,r=0;r<n.length;r++)if(i=n[r],i===e||i.fn===e){n.splice(r,1);break}return n.length===0&&delete this._callbacks["$"+t],this};rh.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,r=n.length;i<r;++i)n[i].apply(this,e)}return this};rh.prototype.emitReserved=rh.prototype.emit;rh.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};rh.prototype.hasListeners=function(t){return!!this.listeners(t).length}});var C2,BH=Q(()=>{C2=typeof self<"u"?self:typeof window<"u"?window:Function("return this")()});function fee(t,...e){return e.reduce((n,i)=>(t.hasOwnProperty(i)&&(n[i]=t[i]),n),{})}function Rx(t,e){e.useNativeTimers?(t.setTimeoutFn=_0i.bind(C2),t.clearTimeoutFn=C0i.bind(C2)):(t.setTimeoutFn=C2.setTimeout.bind(C2),t.clearTimeoutFn=C2.clearTimeout.bind(C2))}function fJe(t){return typeof t=="string"?b0i(t):Math.ceil((t.byteLength||t.size)*x0i)}function b0i(t){let e=0,n=0;for(let i=0,r=t.length;i<r;i++)e=t.charCodeAt(i),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(i++,n+=4);return n}var _0i,C0i,x0i,XP=Q(()=>{BH();_0i=C2.setTimeout,C0i=C2.clearTimeout;x0i=1.33});function gJe(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function vJe(t){let e={},n=t.split("&");for(let i=0,r=n.length;i<r;i++){let s=n[i].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var d5e=Q(()=>{});var gee,Fx,zH=Q(()=>{ZP();KD();XP();d5e();gee=class extends Error{constructor(e,n,i){super(e),this.description=n,this.context=i,this.type="TransportError"}},Fx=class extends rh{constructor(e){super(),this.writable=!1,Rx(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,i){return super.emitReserved("error",new gee(e,n,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=VH(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=gJe(e);return n.length?"?"+n:""}}});function CJe(t){let e="";do e=xJe[t%u5e]+e,t=Math.floor(t/u5e);while(t>0);return e}function yee(){let t=CJe(+new Date);return t!==_Je?(yJe=0,_Je=t):t+"."+CJe(yJe++)}var xJe,u5e,w0i,yJe,vee,_Je,h5e=Q(()=>{"use strict";xJe="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),u5e=64,w0i={},yJe=0,vee=0;for(;vee<u5e;vee++)w0i[xJe[vee]]=vee});var bJe,wJe,SJe=Q(()=>{bJe=!1;try{bJe=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}wJe=bJe});function p5e(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||wJe))return new XMLHttpRequest}catch{}if(!e)try{return new C2[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var TJe=Q(()=>{SJe();BH()});function S0i(){}function DJe(){for(let t in _ee.requests)_ee.requests.hasOwnProperty(t)&&_ee.requests[t].abort()}var T0i,Cee,_ee,EJe=Q(()=>{zH();h5e();ZP();TJe();KD();XP();BH();T0i=function(){return new p5e({xdomain:!1}).responseType!=null}(),Cee=class extends Fx{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){let i=location.protocol==="https:",r=location.port;r||(r=i?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}let n=e&&e.forceBase64;this.supportsBinary=T0i&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};hJe(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,uJe(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=yee()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new _ee(this.uri(),e)}doWrite(e,n){let i=this.request({method:"POST",data:e});i.on("success",n),i.on("error",(r,s)=>{this.onError("xhr post error",r,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=e}},_ee=(()=>{class t extends rh{constructor(n,i){super(),Rx(this,i),this.opts=i,this.method=i.method||"GET",this.uri=n,this.data=i.data!==void 0?i.data:null,this.create()}create(){var n;let i=fee(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this.opts.xd;let r=this.xhr=new p5e(i);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this.opts.extraHeaders[s])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(n=this.opts.cookieJar)===null||n===void 0||n.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this.opts.cookieJar)===null||s===void 0||s.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(s){this.setTimeoutFn(()=>{this.onError(s)},0);return}typeof document<"u"&&(this.index=t.requestsCount++,t.requests[this.index]=this)}onError(n){this.emitReserved("error",n,this.xhr),this.cleanup(!0)}cleanup(n){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=S0i,n)try{this.xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this.index],this.xhr=null}}onLoad(){let n=this.xhr.responseText;n!==null&&(this.emitReserved("data",n),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}return t.requestsCount=0,t.requests={},t})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",DJe);else if(typeof addEventListener=="function"){let t="onpagehide"in C2?"pagehide":"unload";addEventListener(t,DJe,!1)}}});var YD,HH,xee,MJe,GH=Q(()=>{BH();YD=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),HH=C2.WebSocket||C2.MozWebSocket,xee=!0,MJe="arraybuffer"});var kJe,bee,IJe=Q(()=>{zH();h5e();XP();GH();ZP();kJe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",bee=class extends Fx{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;let e=this.uri(),n=this.opts.protocols,i=kJe?{}:fee(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=xee&&!kJe?n?new HH(e,n):new HH(e):new HH(e,n,i)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let i=e[n],r=n===e.length-1;OH(i,this.supportsBinary,s=>{let o={};xee||(i.options&&(o.compress=i.options.compress),this.opts.perMessageDeflate&&(typeof s=="string"?Buffer.byteLength(s):s.length)<this.opts.perMessageDeflate.threshold&&(o.compress=!1));try{xee?this.ws.send(s):this.ws.send(s,o)}catch{}r&&YD(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=yee()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!HH}}});var wee,AJe=Q(()=>{zH();GH();ZP();wee=class extends Fx{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{let n=mJe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=e.readable.pipeThrough(n).getReader(),r=pJe();r.readable.pipeTo(e.writable),this.writer=r.writable.getWriter();let s=()=>{i.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let i=e[n],r=n===e.length-1;this.writer.write(i).then(()=>{r&&YD(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}});var m5e,f5e=Q(()=>{EJe();IJe();AJe();m5e={websocket:bee,webtransport:wee,polling:Cee}});function QP(t){if(t.length>2e3)throw"URI too long";let e=t,n=t.indexOf("["),i=t.indexOf("]");n!=-1&&i!=-1&&(t=t.substring(0,n)+t.substring(n,i).replace(/:/g,";")+t.substring(i,t.length));let r=D0i.exec(t||""),s={},o=14;for(;o--;)s[E0i[o]]=r[o]||"";return n!=-1&&i!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=M0i(s,s.path),s.queryKey=k0i(s,s.query),s}function M0i(t,e){let n=/\/{2,9}/g,i=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&i.splice(0,1),e.slice(-1)=="/"&&i.splice(i.length-1,1),i}function k0i(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,r,s){r&&(n[r]=s)}),n}var D0i,E0i,g5e=Q(()=>{D0i=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,E0i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var See,PJe=Q(()=>{f5e();XP();d5e();g5e();KD();ZP();GH();See=(()=>{class t extends rh{constructor(n,i={}){super(),this.binaryType=MJe,this.writeBuffer=[],n&&typeof n=="object"&&(i=n,n=null),n?(n=QP(n),i.hostname=n.host,i.secure=n.protocol==="https"||n.protocol==="wss",i.port=n.port,n.query&&(i.query=n.query)):i.host&&(i.hostname=QP(i.host).host),Rx(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=i.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=vJe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(n){let i=Object.assign({},this.opts.query);i.EIO=c5e,i.transport=n,this.id&&(i.sid=this.id);let r=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[n]);return new m5e[n](r)}open(){let n;if(this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)n="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else n=this.transports[0];this.readyState="opening";try{n=this.createTransport(n)}catch{this.transports.shift(),this.open();return}n.open(),this.setTransport(n)}setTransport(n){this.transport&&this.transport.removeAllListeners(),this.transport=n,n.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",i=>this.onClose("transport close",i))}probe(n){let i=this.createTransport(n),r=!1;t.priorWebsocketSuccess=!1;let s=()=>{r||(i.send([{type:"ping",data:"probe"}]),i.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;t.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{let f=new Error("probe error");f.transport=i.name,this.emitReserved("upgradeError",f)}}))};function o(){r||(r=!0,u(),i.close(),i=null)}let a=m=>{let f=new Error("probe error: "+m);f.transport=i.name,o(),this.emitReserved("upgradeError",f)};function l(){a("transport closed")}function c(){a("socket closed")}function d(m){i&&m.name!==i.name&&o()}let u=()=>{i.removeListener("open",s),i.removeListener("error",a),i.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};i.once("open",s),i.once("error",a),i.once("close",l),this.once("close",c),this.once("upgrading",d),this.upgrades.indexOf("webtransport")!==-1&&n!=="webtransport"?this.setTimeoutFn(()=>{r||i.open()},200):i.open()}onOpen(){if(this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let n=0,i=this.upgrades.length;for(;n<i;n++)this.probe(this.upgrades[n])}}onPacket(n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",n),this.emitReserved("heartbeat"),this.resetPingTimeout(),n.type){case"open":this.onHandshake(JSON.parse(n.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":let i=new Error("server error");i.code=n.data,this.onError(i);break;case"message":this.emitReserved("data",n.data),this.emitReserved("message",n.data);break}}onHandshake(n){this.emitReserved("handshake",n),this.id=n.sid,this.transport.query.sid=n.sid,this.upgrades=this.filterUpgrades(n.upgrades),this.pingInterval=n.pingInterval,this.pingTimeout=n.pingTimeout,this.maxPayload=n.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let n=this.getWritablePackets();this.transport.send(n),this.prevBufferLen=n.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let r=0;r<this.writeBuffer.length;r++){let s=this.writeBuffer[r].data;if(s&&(i+=fJe(s)),r>0&&i>this.maxPayload)return this.writeBuffer.slice(0,r);i+=2}return this.writeBuffer}write(n,i,r){return this.sendPacket("message",n,i,r),this}send(n,i,r){return this.sendPacket("message",n,i,r),this}sendPacket(n,i,r,s){if(typeof i=="function"&&(s=i,i=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let o={type:n,data:i,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),s&&this.once("flush",s),this.flush()}close(){let n=()=>{this.onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),n()},r=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():n()}):this.upgrading?r():n()),this}onError(n){t.priorWebsocketSuccess=!1,this.emitReserved("error",n),this.onClose("transport error",n)}onClose(n,i){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",n,i),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(n){let i=[],r=0,s=n.length;for(;r<s;r++)~this.transports.indexOf(n[r])&&i.push(n[r]);return i}}return t.protocol=c5e,t})()});var Iir,v5e=Q(()=>{PJe();zH();f5e();XP();g5e();GH();Iir=See.protocol});function RJe(t,e="",n){let i=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),i=QP(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";let s=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port+e,i.href=i.protocol+"://"+s+(n&&n.port===i.port?"":":"+i.port),i}var FJe=Q(()=>{v5e()});function UH(t){return I0i&&(t instanceof ArrayBuffer||A0i(t))||P0i&&t instanceof Blob||R0i&&t instanceof File}function WH(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,i=t.length;n<i;n++)if(WH(t[n]))return!0;return!1}if(UH(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return WH(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&WH(t[n]))return!0;return!1}var I0i,A0i,LJe,P0i,R0i,y5e=Q(()=>{I0i=typeof ArrayBuffer=="function",A0i=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,LJe=Object.prototype.toString,P0i=typeof Blob=="function"||typeof Blob<"u"&&LJe.call(Blob)==="[object BlobConstructor]",R0i=typeof File=="function"||typeof File<"u"&&LJe.call(File)==="[object FileConstructor]"});function OJe(t){let e=[],n=t.data,i=t;return i.data=_5e(n,e),i.attachments=e.length,{packet:i,buffers:e}}function _5e(t,e){if(!t)return t;if(UH(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let i=0;i<t.length;i++)n[i]=_5e(t[i],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){let n={};for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=_5e(t[i],e));return n}return t}function NJe(t,e){return t.data=C5e(t.data,e),delete t.attachments,t}function C5e(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=C5e(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=C5e(t[n],e));return t}var VJe=Q(()=>{y5e()});var T5e={};Bde(T5e,{Decoder:()=>b5e,Encoder:()=>x5e,PacketType:()=>Sc,protocol:()=>S5e});function BJe(t){return Object.prototype.toString.call(t)==="[object Object]"}var F0i,S5e,Sc,x5e,b5e,w5e,Tee=Q(()=>{KD();VJe();y5e();F0i=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],S5e=5,Sc=function(t){return t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK",t}(Sc||{}),x5e=class{constructor(e){this.replacer=e}encode(e){return(e.type===Sc.EVENT||e.type===Sc.ACK)&&WH(e)?this.encodeAsBinary({type:e.type===Sc.EVENT?Sc.BINARY_EVENT:Sc.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===Sc.BINARY_EVENT||e.type===Sc.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){let n=OJe(e),i=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(i),r}};b5e=class t extends rh{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let i=n.type===Sc.BINARY_EVENT;i||n.type===Sc.BINARY_ACK?(n.type=i?Sc.EVENT:Sc.ACK,this.reconstructor=new w5e(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(UH(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,i={type:Number(e.charAt(0))};if(Sc[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===Sc.BINARY_EVENT||i.type===Sc.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let o=e.substring(s,n);if(o!=Number(o)||e.charAt(n)!=="-")throw new Error("Illegal attachments");i.attachments=Number(o)}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););i.nsp=e.substring(s,n)}else i.nsp="/";let r=e.charAt(n+1);if(r!==""&&Number(r)==r){let s=n+1;for(;++n;){let o=e.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===e.length)break}i.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(i.type,s))i.data=s;else throw new Error("invalid payload")}return i}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case Sc.CONNECT:return BJe(n);case Sc.DISCONNECT:return n===void 0;case Sc.CONNECT_ERROR:return typeof n=="string"||BJe(n);case Sc.EVENT:case Sc.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&F0i.indexOf(n[0])===-1);case Sc.ACK:case Sc.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},w5e=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=NJe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}});function F4(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var D5e=Q(()=>{});var L0i,qD,E5e=Q(()=>{Tee();D5e();KD();L0i=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),qD=class extends rh{constructor(e,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[F4(e,"open",this.onopen.bind(this)),F4(e,"packet",this.onpacket.bind(this)),F4(e,"error",this.onerror.bind(this)),F4(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(L0i.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let i={type:Sc.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let o=this.ids++,a=n.pop();this._registerAckCallback(o,a),i.id=o}let r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var i;let r=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(r===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[e]=(...o)=>{this.io.clearTimeoutFn(s),n.apply(this,[null,...o])}}emitWithAck(e,...n){let i=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((r,s)=>{n.push((o,a)=>i?o?s(o):r(a):r(o)),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...s)=>i!==this._queue[0]?void 0:(r!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...s)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Sc.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Sc.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Sc.EVENT:case Sc.BINARY_EVENT:this.onevent(e);break;case Sc.ACK:case Sc.BINARY_ACK:this.onack(e);break;case Sc.DISCONNECT:this.ondisconnect();break;case Sc.CONNECT_ERROR:this.destroy();let i=new Error(e.data.message);i.data=e.data.data,this.emitReserved("connect_error",i);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let i of n)i.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,i=!1;return function(...r){i||(i=!0,n.packet({type:Sc.ACK,id:e,data:r}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Sc.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let i=0;i<n.length;i++)if(e===n[i])return n.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let n=this._anyOutgoingListeners;for(let i=0;i<n.length;i++)if(e===n[i])return n.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let i of n)i.apply(this,e.data)}}}});function ZD(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}var zJe=Q(()=>{ZD.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0};ZD.prototype.reset=function(){this.attempts=0};ZD.prototype.setMin=function(t){this.ms=t};ZD.prototype.setMax=function(t){this.max=t};ZD.prototype.setJitter=function(t){this.jitter=t}});var XD,HJe=Q(()=>{v5e();E5e();Tee();D5e();zJe();KD();XD=class extends rh{constructor(e,n){var i;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Rx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new ZD({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let r=n.parser||T5e;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new See(this.uri,this.opts);let n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;let r=F4(n,"open",function(){i.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=F4(n,"error",s);if(this._timeout!==!1){let a=this._timeout,l=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(r),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(F4(e,"ping",this.onping.bind(this)),F4(e,"data",this.ondata.bind(this)),F4(e,"error",this.onerror.bind(this)),F4(e,"close",this.onclose.bind(this)),F4(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){YD(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let i=this.nsps[e];return i?this._autoConnect&&!i.active&&i.connect():(i=new qD(this,e,n),this.nsps[e]=i),i}_destroy(e){let n=Object.keys(this.nsps);for(let i of n)if(this.nsps[i].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let i=0;i<n.length;i++)this.engine.write(n[i],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let i=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}});var M5e={};Bde(M5e,{Manager:()=>XD,Socket:()=>qD,connect:()=>QD,default:()=>QD,io:()=>QD,protocol:()=>S5e});function QD(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=RJe(t,e.path||"/socket.io"),i=n.source,r=n.id,s=n.path,o=jH[r]&&s in jH[r].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o,l;return a?l=new XD(i,e):(jH[r]||(jH[r]=new XD(i,e)),l=jH[r]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}var jH,GJe=Q(()=>{FJe();HJe();E5e();Tee();jH={};Object.assign(QD,{Manager:XD,Socket:qD,io:QD,connect:QD})});function O0i(t){return new JP(t)}var JP,WJe,UJe,k5e=Q(()=>{me();me();$n();Cl();GJe();JP=class{config;subscribersCounter={};eventObservables$={};ioSocket;emptyConfig={url:"",options:{}};constructor(e){this.config=e,e===void 0&&(e=this.emptyConfig);let n=e.url,i=e.options,r=QD?QD:M5e;this.ioSocket=r(n,i)}of(e){this.ioSocket.of(e)}on(e,n){this.ioSocket.on(e,n)}once(e,n){this.ioSocket.once(e,n)}connect(e){return this.ioSocket.connect(e)}disconnect(e){return this.ioSocket.disconnect.apply(this.ioSocket,arguments)}emit(e,...n){return this.ioSocket.emit.apply(this.ioSocket,arguments)}removeListener(e,n){return this.ioSocket.removeListener.apply(this.ioSocket,arguments)}removeAllListeners(e){return this.ioSocket.removeAllListeners.apply(this.ioSocket,arguments)}fromEvent(e){return this.subscribersCounter[e]||(this.subscribersCounter[e]=0),this.subscribersCounter[e]++,this.eventObservables$[e]||(this.eventObservables$[e]=new Qa(n=>{let i=r=>{n.next(r)};return this.ioSocket.on(e,i),()=>{this.subscribersCounter[e]--,this.subscribersCounter[e]===0&&(this.ioSocket.removeListener(e,i),delete this.eventObservables$[e])}}).pipe(W2())),this.eventObservables$[e]}fromOneTimeEvent(e){return new Promise(n=>this.once(e,n))}listeners(e){return this.ioSocket.listeners(e)}listenersAny(){return this.ioSocket.listenersAny()}listenersAnyOutgoing(){return this.ioSocket.listenersAnyOutgoing()}off(e,n){return e?e&&!n?this.ioSocket.off(e):this.ioSocket.off(e,n):this.ioSocket.offAny()}onAny(e){return this.ioSocket.onAny(e)}onAnyOutgoing(e){return this.ioSocket.onAnyOutgoing(e)}prependAny(e){return this.ioSocket.prependAny(e)}prependAnyOutgoing(e){return this.ioSocket.prependAnyOutgoing(e)}timeout(e){return this.ioSocket.timeout(e)}volatile(){return this.ioSocket.volatile}};WJe=new Ri("__SOCKET_IO_CONFIG__"),UJe=(()=>{class t{static forRoot(n){return{ngModule:t,providers:[{provide:WJe,useValue:n},{provide:JP,useFactory:O0i,deps:[WJe]}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=en({type:t});static \u0275inj=Ji({})}return t})()});var jJe,lt,yi=Q(()=>{me();a4();Ci();$n();Ld();zn();ef();Ul();$v();XQe();jJe=Gs(P7());o2();rP();me();k5e();Ci();Jk();ag();Cs();lt=(()=>{let e=class e{constructor(i,r,s,o,a){this.socket=i,this.dialogService=r,this.firebaseLoginService=s,this.storageService=o,this.configService=a,this.connectionClientId=new qs(""),this.storageClientId=new qs(this.readClientId()),this.onAuthenticated=new nt,this.nxtSessionId=ua.generateNxt(),this.tryConnectCounter=new qs(0),this.onSubscribeError=new nt,this.allSocketSubscriptions=[],this.state=new qs({authenticated:!1,connected:!1}),this.lastDisconnect=0,this.subscriptionsNew={},this.subscriptionsDone=!1,this.suppressSocketConnect=!0,this.onSocketUnauthorized=new nt,this.currentUser$=new qs(null),this.disableSocket=!1,this.lastErrorType="",this.lastErrorTimestamp=0,this.autoReconnectIntervalMs=200,this.findContactsWithEventsCounter=0,this.authenticatedCounter=0,this.openSubscriptions=new qs(0),this.generateStaticPromoCode=l=>this.emit("generateStaticPromoCode",l),e.instance=this,this.registerPrivateSubscriptions(),this.registerSocketConnectedEvent(),this.readClientId(),this.registerOnSocketUnAuthentiactedListener(),this.registerSocketConnectionChangeListener(),this.registerUserChangedListener()}registerPrivateSubscriptions(){this.tryConnectCounter.subscribe(i=>{i>50?this.setAutoReconnectIntervalMs(1e4):i>10?this.setAutoReconnectIntervalMs(3e3):this.setAutoReconnectIntervalMs(1e3)})}startReconnectInterval(){return O(this,null,function*(){Cu.clear(this.reconnectInterval),this.reconnectInterval=setInterval(()=>{try{if(!this.state.getValue().connected&&!this.disableSocket){if(this.dialogService.isConnectionLostVisible){let i="";this.lastDisconnect===0?i="initiale Verbindung zum Server wird aufgebaut":(i=`Verbindung wird wiederhergestellt...

letzte Vebindung: `+Ie.dateDiffToNowText(this.lastDisconnect),this.lastErrorType&&(i+=`

Fehler: `+this.lastErrorType)),i+=`

Versuch:`+this.tryConnectCounter.value,this.dialogService.setConnectionLostDialogAdditionalMessage(i)}this.connectSocket()}}catch(i){Gn.error("ReconnectInterval failed",i)}},this.autoReconnectIntervalMs)})}setAutoReconnectIntervalMs(i){i!==this.autoReconnectIntervalMs&&(this.autoReconnectIntervalMs=i,this.startReconnectInterval(),Gn.debug("new AutoReconnectIntervalMs: "+this.autoReconnectIntervalMs))}askForSocketUrl(){return O(this,null,function*(){return(yield this.dialogService.showInputWhatsApp("socket url",{prompt:window.location.origin,showColorPicker:!1})).toString()})}login(i,r,s,o,a){this.lastLogin={username:i,studio:r,studioReal:s,workplace:o,manualLogin:a},this.connectSocket()}registerOnSocketUnAuthentiactedListener(){this.socket.removeListener("unauthorized"),this.socket.removeListener("unauthorized"),this.socket.on("unauthorized",i=>{this.setAuthenticated(!1),this.onSocketUnauthorized.emit(i)})}registerSocketConnectedEvent(){this.state.subscribe(i=>{i.connected&&setTimeout(()=>{this.dialogService.hideLoading(_n.ServerDoRestart)},5e3),i.connected&&!i.authenticated&&this.lastLogin&&this.firebaseLoginService.isLoggedIn.getValue()&&this.startAuthentication(),i.connected||this.setAuthenticated(!1),i.connected&&i.authenticated&&this.authenticatedCounter++}),setTimeout(()=>{this.subscribeNew("eventNgConfigChanged",()=>{this.reloadNgConfig()})},2e3)}startAuthentication(){return O(this,null,function*(){this.connectionClientId.next(ua.generateNxt());let i=yield this.firebaseLoginService.getToken(),r={username:this.lastLogin.username,token:i,studio:this.lastLogin.studio,studioReal:this.lastLogin.studioReal,workplace:this.lastLogin.workplace,manualLogin:this.lastLogin.manualLogin,forceDailyLogin:this.storageService.get("ForceDailyLogin",!1),nxtSessionId:this.nxtSessionId,storageClientId:this.storageClientId.value,connectionClientId:this.connectionClientId.value};this.socket.emit("authentication",r),this.lastLogin.manualLogin=!1,this.socket.removeListener("authenticated"),this.socket.removeListener("authenticated"),this.socket.removeListener("authenticated"),this.socket.on("authenticated",s=>{e.LOGIN_HASH=s.loginHash,e.NODE_SERVER_VERSION=s.serverVersion,a6.driveGetToken=s.driveToken,this.currentUser$.next(s.user),this.configService.setConfig(s.ngConfig),Gn.log("socket.service | authenticated"),this.setAuthenticated(!0),setTimeout(()=>{this.registerSocketEventListeners()},500)})})}setAuthenticated(i){i!==this.state.getValue().authenticated&&this.setState(this.state.value.connected,i)}registerSocketEventListeners(){this.subscriptionsDone||(this.socket.on("showWhatsAppContact",i=>{zi.instance.send("eval","window.setChat('"+i+"');")}),this.authenticatedCounter>1&&this.allSocketSubscriptions.forEach(i=>i.registerNewOnReconnected()),this.authenticatedCounter===1&&this.allSocketSubscriptions.forEach(i=>i.registerInitial()))}setConnected(i){i!==this.state.getValue().connected&&this.setState(i,this.state.value.authenticated)}setState(i,r){(i!==this.state.getValue().connected||r!==this.state.getValue().authenticated)&&(this.state.next({connected:i,authenticated:r}),r&&setTimeout(()=>this.onAuthenticated.emit(),200))}emit(i,r){return O(this,null,function*(){if(!(!this.state.value.connected||!this.state.value.authenticated))return new Promise((s,o)=>O(this,null,function*(){try{let a=yield this.socket.emit(i,r??null,(l,c)=>{if(l)if(l.errorId)o(l);else if(typeof l=="string"&&l.indexOf("{")===0){let d=Qn.parse(l);o(d)}else{typeof o!="function"&&Gn.onSocketError.emit(l);let d=new Error(l);o(d)}else s(c)})}catch(a){Gn.error("SOCKET EMIT FEHLER 2!"),Gn.error(a),o(a)}}))})}getCalendarEventWithCustomer(i){return O(this,null,function*(){return this.emit("getCalendarEventWithCustomer",i)})}setNewContactData(i){return O(this,null,function*(){return this.emit("setNewContactData",i)})}getNewContactData(){return O(this,null,function*(){return this.emit("getNewContactData")})}getNotAssignedPaypalTransactions(){return O(this,null,function*(){return this.emit("getNotAssignedPaypalTransactions")})}getYearFinish(i){return O(this,null,function*(){return this.emit("getYearFinish",i)})}getOverlappedEvents(i){return O(this,null,function*(){return this.emit("getOverlappedEvents",i)})}getObservable(i){return new Qa(r=>{let s=this.subscribeNew(i,o=>{r.next(o)},{emitInitial:!0});r.add(()=>{s.unsubscribe()})})}subscribeNew(i,r,s){this.openSubscriptions.next(this.openSubscriptions.value+1),s||(s={emitInitial:!1,emitInitialData:!1,emitAfterReconnect:!0}),typeof s.emitAfterReconnect!="boolean"&&(s.emitAfterReconnect=!0),this.subscriptionsNew[i]||(this.subscriptionsNew[i]=new nt(!0)),s?.emitInitial&&this.state.pipe(Jd(a=>a.authenticated&&a.connected)).subscribe(()=>O(this,null,function*(){yield za.sleep(100);let a=yield this.emit(i,s.emitInitialData);a&&this.subscriptionsNew[i].emit(a)}));let o=new uee(a=>(this.socket.removeListener(i),this.socket.on(i,l=>{this.subscriptionsNew[i].emit(l)}),this.emit("subscribe",i),a==="reconnect"&&s?.emitAfterReconnect&&setTimeout(()=>O(this,null,function*(){let l=yield this.emit(i);this.subscriptionsNew[i].emit(l)}),200),this.subscriptionsNew[i].subscribe(r)),()=>{o?.subscription&&this.unsubscribeNew(o.subscription),this.allSocketSubscriptions=this.allSocketSubscriptions.filter(a=>a!==o),o=null});return this.allSocketSubscriptions.push(o),o}unsubscribeNew(i){if(this.openSubscriptions.next(this.openSubscriptions.value-1),i){let r=-1,s=-1,o="";for(let a of(0,jJe.keys)(this.subscriptionsNew))if(this.subscriptionsNew[a]?.observers?.find(c=>c===i)){r=this.subscriptionsNew[a]?.observers.length,o=a;break}i.unsubscribe(),o&&(s=this.subscriptionsNew[o]?.observers.length,s===0&&this.emit("unsubscribe",o))}}unsubscribe(i){return O(this,null,function*(){return this.emit("unsubscribe",i)})}createCalendarEvent(i,r,s,o){return O(this,null,function*(){return r.extendedProperties.private.nxtCreateId=o,this.emit("createCalendarEvent",{calendarId:i,calendarEvent:r,newEventUuid:s})})}translate(i,r){return O(this,null,function*(){return this.emit("translate",{text:i,to:r})})}sendTelegramStudioInfo(i){return O(this,null,function*(){return this.emit("sendTelegram",{text:i})})}getReviews(){return O(this,null,function*(){return this.emit("getReviews")})}getWait(){return O(this,null,function*(){return new Promise((i,r)=>{try{this.socket.emit("getWait");let s=this.socket.fromEvent("wait").subscribe(o=>{i(parseInt(o,10)),s.unsubscribe()})}catch(s){Gn.info("getWait failed: ",s.message),r("getWait failed: "+s.message)}})})}updateContact(i,r){return this.emit("updateContact",{contact:i,force:r})}getCode(){return this.emit("getCode")}createContact(i){return this.emit("createContact",i)}registerAsApp(i){return this.emit("register"+i+"Viewer")}printPdf(i){return this.emit("createUserAction",{userAction:"printPdf",userActionData:i})}alexaTTS(i,r,s){return this.emit("alexaTTS",{devices:i,text:r,volume:s})}createUserAction(i){return this.emit("createUserAction",i)}getWhatsAppState(){return this.emit("getWhatsAppState")}registerOn(i,r){this.socket.on(i,s=>{r(s)})}setPaypalData(i){return Gn.info("SET-PAYPAL-DATA to socket-server"),this.emit("setPaypalData",i)}showWhatsAppContact(i){this.socket.emit("showWhatsAppContact",i)}getWhatsAppChat(i,r){return this.emit("getWhatsAppChat",{mobileOrWhatsAppId:i,reason:r})}getWhatsAppChatFromClient(i){return this.emit("getWhatsAppChatFromClient",i)}getWhatsAppImage(i){return this.emit("getWhatsAppImage",i)}setCode(i){return this.emit("setCode",i)}setCodeInterval(i){return this.emit("setCodeInterval",i)}setWhatsAppImage(i){return this.emit("setWhatsAppImage",i)}addEventImage(i){return this.emit("addEventImage",i)}getEventImages(i){return this.emit("getEventImages",i)}deleteEventImage(i,r){return this.emit("deleteEventImage",{imageId:i,eventId:r})}addTaglineToNxtContact(i){return this.emit("addTaglineToNxtContact",i)}removeTaglineFromNxtContact(i){return this.emit("removeTaglineFromNxtContact",i)}createPaymentPossibilityRecord(i,r){return O(this,null,function*(){return this.emit("createPaymentPossibilityRecord",{record:i,print:r})})}printFastWalkInNo(i,r,s){return O(this,null,function*(){return this.emit("printFastWalkInNo",{fastWalkInNo:i,studio:r,workType:s})})}printSmallText(i){return O(this,null,function*(){return this.emit("printSmallText",i)})}printQrCode(i,r,s,o){return O(this,null,function*(){return this.emit("printQrCode",{qrCode:r,studio:i,text:s,longName:o})})}isPrinterAvailable(i){return this.emit("isPrinterAvailable",i)}getInvoicePdfBase64v3(i,r){return this.emit("getInvoicePdfBase64v3",{eventIds:i,invoiceDateString:r})}connectSocket(){return O(this,null,function*(){try{if(this.tryConnectCounter.next(this.tryConnectCounter.value+1),!this.firebaseLoginService.isLoggedIn.getValue())return;Gn.log("socket.service | socket.disconnect"),this.socket.disconnect(!0),this.setConnected(!1),yield this.registerSocketConnectionChangeListener(),this.socket.connect(),Gn.log("socket.service | socket.connect")}catch(i){Gn.error(i)}})}registerSocketConnectionChangeListener(){return O(this,null,function*(){this.socket.removeListener("connect"),this.socket.removeListener("disconnect"),this.socket.removeListener("close"),this.socket.removeListener("connect_error"),this.socket.on("connect",()=>{this.sessionId=this.socket.ioSocket.id,this.lastErrorType="",this.lastErrorTimestamp=0,this.tryConnectCounter.next(0),Gn.log("socket.service | socket.connected"),this.setConnected(!0)}),this.socket.on("disconnect",()=>{Gn.log("socket.service | socket.disconnected"),this.lastDisconnect=Date.now(),this.setState(!1,!1)}),this.socket.on("close",()=>{Gn.log("socket.service | socket.closed"),this.setConnected(!1)}),this.socket.on("connect_error",i=>{this.lastErrorType=i.type,this.lastErrorTimestamp=Date.now(),Gn.log("socket.service | socket.connect_error"+i),this.setConnected(!1)})})}disconnectSocket(){Gn.log("[SOCKET-SERVICE] force disconnect from socket"),this.socket.disconnect(!0)}sendBrudiTvAction(i){return this.emit("brudiTvAction",i)}getAppointmentConfirmationText(i){return this.emit("getAppointmentConfirmationText",i)}getAppointmentConfirmationTextCanceled(i){return this.emit("getAppointmentConfirmationTextCanceled",i)}getAppointmentConfirmationStudioText(i,r){return this.emit("getAppointmentConfirmationStudioText",{studio:i,lang:r})}setAppointmentConfirmationText(i,r){return this.emit("setAppointmentConfirmationText",{text:i,lang:r})}setAppointmentConfirmationTextCanceled(i,r){return this.emit("setAppointmentConfirmationTextCanceled",{text:i,lang:r})}setAppointmentConfirmationStudioText(i,r,s){return this.emit("setAppointmentConfirmationStudioText",{studio:i,text:r,lang:s})}getVoucherPdf(i,r,s){return this.emit("getVoucherPdf",{value:i,code:r,createdAt:s})}getVoucherPdfByCode(i){return this.emit("getVoucherPdfByCode",i)}setCustomerBirthdayMessageTemplate(i){return this.emit("setCustomerBirthdayMessageTemplate",i)}getCustomerBirthdayMessageTemplate(){return this.emit("getCustomerBirthdayMessageTemplate")}setCustomerAppointmentReminderMessageTemplate(i){return this.emit("setCustomerAppointmentReminderMessageTemplate",i)}getCustomerAppointmentReminderMessageTemplate(){return this.emit("getCustomerAppointmentReminderMessageTemplate")}addContactFromWhatsApp(i){return this.emit("addContactFromWhatsApp",i)}processWhatsAppMessage(i,r){return this.emit("processWhatsAppMessage",{message:i,type:r})}sendTelegramAdmin(i){return this.emit("sendTelegramAdmin",{text:i})}sendBackofficeHeads(i){return this.emit("sendBackofficeHeads",{text:i})}sendBackofficeHeadsNoFranchise(i){return this.emit("sendBackofficeHeads",{text:i,noFranchise:!0})}updateUser(i){return this.emit("updateUser",i)}sendTelegramDayFinish(i,r,s){return s=i+" "+r+`
`+s,this.emit("sendTelegramDayFinish",{text:s})}sendTelegramDayFinishDirect(i){return this.emit("sendTelegramDayFinish",{text:i})}sendTelegramError(i){return this.emit("sendTelegramError",{text:i})}getBackofficeViewData(i){return O(this,null,function*(){return this.emit("getBackofficeViewData",{date:i})})}readClientId(){let i=window.localStorage.getItem("clientId");return i||(i=ua.generate()),i}setClientId(i){this.storageClientId!==i&&(window.localStorage.setItem("clientId",i),this.storageClientId=i)}eventFinder(i){return O(this,null,function*(){return this.emit("getEventFinderData",i)})}getStudioFeeData(i){return O(this,null,function*(){return this.emit("getStudioFeeData",i)})}setStudioFeeMonthData(i){return this.emit("setStudioFeeMonthData",i)}getArtists(){return this.emit("getArtists")}getBigPayoutArtists(){return this.emit("getBigPayoutArtists")}upsertArtist(i){return this.emit("upsertArtist",i)}logoutUsernameAll(){return this.emit("logoutUsernameAll")}createUser(i,r){return this.emit("createUser",{user:i,password:r})}deleteUser(i){return this.emit("deleteUser",i)}getInvoiceExternStudio(i){return O(this,null,function*(){return this.emit("getInvoiceExternStudio",i)})}upsertUser(i){return O(this,null,function*(){return this.emit("upsertUser",i)})}getTaglinesFromUnknowns(){return O(this,null,function*(){return this.emit("getTaglinesFromUnknowns")})}isArtistAvailable(i,r){return O(this,null,function*(){return this.emit("isArtistAvailable",{artist:i,dateString:r})})}getContactWithEvents(i){return O(this,null,function*(){return this.emit("getContactWithEvents",i)})}addSale(i){return O(this,null,function*(){return this.emit("addSale",i)})}getInvoiceFromInvoiceForm(i){return this.emit("getInvoiceFromInvoiceForm",i)}getOpenWebFormSubmits(){return O(this,null,function*(){return this.emit("getOpenWebFormSubmits",{})})}updateWebFormSubmit(i){return O(this,null,function*(){return this.emit("updateWebFormSubmit",i)})}forwardWhatsAppImageToArtist(i,r){return this.emit("forwardWhatsAppImageToArtist",{artistId:r,messageId:i})}forwardWhatsAppMessageToArtist(i,r,s){return this.emit("forwardWhatsAppMessageToArtist",{artistId:r,messageId:i,forwardOnlyImage:s})}forwardWhatsAppMessageToAllAvailableArtist(i,r){return this.emit("forwardWhatsAppMessageToAllAvailableArtist",{messageId:i,forwardOnlyImage:r})}forwardWhatsAppImageToMobile(i,r,s){return this.emit("forwardWhatsAppImageToMobile",{mobile:r,messageId:i,forwardOnlyImage:s})}syncArtistsFromAc(){return O(this,null,function*(){return this.emit("syncArtistsFromAc",{})})}triggerSubscriptionTest(){return this.emit("triggerSubscriptionTest",{})}triggerSubscription(i){return this.emit("triggerSubscription",i)}sendToJulian(){return O(this,null,function*(){return this.emit("sendToJulian",{})})}getUsers(){return O(this,null,function*(){return this.emit("getUsers",{})})}getUser(i){return this.emit("getUser",i)}assignSourceDestPayments(i,r,s,o){return this.emit("assignSourceDestPayments",{source:i,dest:r,value:s,paymentValue:o})}assignOpenPayment(i,r,s){return this.emit("assignOpenPayment",{payment:i,reasonId:r,reason:s})}getLatestWhatsAppMessages(i,r){return this.emit("getLatestWhatsAppMessages",{sinceMinutes:i,dateTime:r})}reloadWhatsAppImage(i){return this.emit("reloadWhatsAppImage",i)}getDynamicData(i){return O(this,null,function*(){return this.emit("getDynamicData",i)})}upsertDynamicDataBatch(i){return this.emit("upsertDynamicDataBatch",i)}deleteDynamicData(i){return this.emit("deleteDynamicData",i)}getClientConnections(){return this.emit("getClientConnections",{})}restartServer(){return this.emit("restartServer",{})}invalidate(i){return this.emit("invalidate",i)}sendWhatsAppMessage(i,r){return this.emit("sendWhatsAppMessage",{mobileOrWhatsAppId:i,message:r})}sendWhatsAppDocument(i,r,s){return this.emit("sendWhatsAppDocument",{mobileOrWhatsAppId:i,filename:r,base64:s})}updateMissingArtistWhatsAppChat(i){return this.emit("updateMissingArtistWhatsAppChat",i)}setWhatsAppChatPinnedState(i){return this.emit("setWhatsAppChatPinnedState",i)}getGiftCardBySearch(i,r){return this.emit("getGiftCardBySearch",{filterValue:i,hasValue:r})}getPaymentPossibilityRecord(i){return O(this,null,function*(){return this.emit("getPaymentPossibilityRecord",i)})}updateGiftCardPaymentValue(i,r){return O(this,null,function*(){return this.emit("updateGiftCardPaymentValue",{id:i,paymentValue:r})})}getCareInstructionsText(i){return O(this,null,function*(){return this.emit("getCareInstructionsText",i)})}setCareInstructionsText(i,r,s){return this.emit("setCareInstructionsText",{text:i,workType:r,lang:s})}search(i){return this.emit("search",i)}findGiftCard(i){return this.emit("findGiftCard",{name:i})}getTodo(i){return this.emit("getTodo",i)}findContactsWithEvents(i){return O(this,null,function*(){let r=this.findContactsWithEventsCounter;this.findContactsWithEventsCounter++,Gn.debug("send findContactsWithEvents #"+r);let s=yield this.emit("findContactsWithEvents",i);return Gn.debug("received findContactsWithEvents #"+r+" [length: "+s.length+"]"),s})}getDiscountAnalysis(i){return this.emit("getDiscountAnalysis",i)}deletePaypalTransaction(i){return O(this,null,function*(){return this.emit("deletePaypalTransaction",i)})}sendPayoutsToArtists(i){return this.emit("sendPayoutsToArtists",i)}getPrePayoutData(i){return this.emit("getPrePayoutData",i)}userIsActive(i){return this.emit("userIsActive",i)}alexaTTSGetVolume(){return O(this,null,function*(){return this.emit("alexaTTSGetVolume",{})})}canEditArtist(i){return this.emit("canEditArtist",i)}loadWhatsAppBroadcast(i,r,s){return this.emit("loadWhatsAppBroadcast",{broadcastId:i,messageId:r,options:s})}startWhatsAppBroadcast(i,r,s){return this.emit("startWhatsAppBroadcast",{broadcastId:i,messageId:r,options:s})}getWhatsAppBroadcastStatusStack(){return O(this,null,function*(){return this.emit("getWhatsAppBroadcastStatusStack",{})})}abortWhatsAppBroadcast(){return this.emit("abortWhatsAppBroadcast",{})}errorTest(){return this.emit("errorTest",{})}registerCalendarViewer(){Cu.clear(this.registerCalendarViewerInterval),this.emit("registerCalendarViewer",{}),this.registerCalendarViewerInterval=setInterval(()=>this.emit("registerCalendarViewer",{}),20*1e3)}getCanceledEventsByContactId(i){return this.emit("getCanceledEventsByContactId",i)}getLastBroadcast(){return O(this,null,function*(){return this.emit("getLastBroadcast",{})})}getEventPhotos(i){let r=window.location.hostname==="localhost";return this.emit("getEventPhotos",{eventId:i,preload:r})}getGoogleDriveFolder(i){let r=window.location.hostname==="localhost";return this.emit("getGoogleDriveFolder",{folderId:i,preload:r})}getNxtCalendarEvent(i){return O(this,null,function*(){return this.emit("getNxtCalendarEvent",i)})}setEventQr(i){return this.emit("setEventQr",i)}sendEventPhotosToMobile(i){return this.emit("sendEventPhotosToMobile",i)}sendEventPhotosToCustomer(i){return this.emit("sendEventPhotosToCustomer",i)}getContactsByMobile(i){return O(this,null,function*(){return this.emit("getContactsByMobile",i)})}getEventsByContactId(i){return O(this,null,function*(){return this.emit("getEventsByContactId",i)})}getEventsByArtistAndDate(i,r){return O(this,null,function*(){return this.emit("getEventsByArtistAndDate",{artist:i,dateString:r})})}updateCalendarEventProperty(i,r){return this.emit("updateCalendarEventProperty",{eventId:i,properties:r})}getContactById(i){return O(this,null,function*(){return this.emit("getContactById",i)})}setShopOrderRefunded(i){return O(this,null,function*(){return this.emit("setShopOrderRefunded",i)})}createReminder(i){return this.emit("createReminder",i)}getRemindersByEventId(i){return this.emit("getRemindersByEventId",i)}getRemindersByDate(i){return this.emit("getRemindersByDate",i)}setReminderDone(i,r){return O(this,null,function*(){return this.emit("setReminderDone",{reminderId:i,force:r})})}updateReminder(i){return O(this,null,function*(){return this.emit("updateReminder",i)})}paypalRefund(i){return this.emit("paypalRefund",i)}paypalRefundShopOrderItem(i){return this.emit("paypalRefundShopOrderItem",i)}klarnaRefundShopOrderItem(i){return O(this,null,function*(){return this.emit("klarnaRefundShopOrderItem",i)})}generatePayPalCheckoutLink(i){return this.emit("generatePayPalCheckoutLink",i)}upsertArtistSpot(i){return O(this,null,function*(){return this.emit("upsertArtistSpot",i)})}deleteArtistSpot(i){return O(this,null,function*(){return this.emit("deleteArtistSpot",i)})}getArtistSpot(i){return O(this,null,function*(){return this.emit("getArtistSpot",i)})}getArticles(){return this.emit("getArticles")}deleteCalendarEvent(i,r){return this.emit("deleteCalendarEvent",{eventId:i,calendarId:r})}EventSort_GetEvents(i){return this.emit("EventSort_GetEvents",i)}setWhatsAppChatRead(i){return this.emit("setWhatsAppChatRead",i)}setWhatsAppChatUnRead(i){return this.emit("setWhatsAppChatUnRead",i)}setGlobalConfig(i,r){return this.emit("setGlobalConfig",{key:i,value:r})}getGlobalConfig(i){return this.emit("getGlobalConfig",i)}fakeWhatsAppStatus(){return this.emit("fakeWhatsAppStatus",{})}updatePhotoSyncReimportUnknown(i,r,s){return this.emit("updatePhotoSyncReimportUnknown",{ids:i,eventId:r,artist:s})}updatePhotoSyncReimportUnknownDelete(i){return this.emit("updatePhotoSyncReimportUnknownDelete",{ids:i})}getPhotoSyncUnknownUploadsNotFixed(){return this.emit("getPhotoSyncUnknownUploadsNotFixed",{})}setEventTo_FromPayment2(i){return O(this,null,function*(){return this.emit("setEventTo_FromPayment2",i)})}setEventBackFrom_FromPayment2(i){return O(this,null,function*(){return this.emit("setEventBackFrom_FromPayment2",i)})}sendEventPhotosToClipboard(i){return this.emit("sendEventPhotosToClipboard",i)}upsertInventoryOrder(i){return this.emit("upsertInventoryOrder",i)}getWhatsappFastAnswers(){return O(this,null,function*(){return this.emit("getWhatsappFastAnswers",{})})}insertWhatsappFastAnswer(i){return O(this,null,function*(){return this.emit("insertWhatsappFastAnswer",i)})}updateWhatsappFastAnswer(i){return O(this,null,function*(){return this.emit("updateWhatsappFastAnswer",i)})}getArtistContract(i){return this.emit("getArtistContract",i)}bankImportTest(i){return this.emit("bankImportTest",i)}paypalImportTest(i){return O(this,null,function*(){return this.emit("paypalImportTest",i)})}getServerConfig(i){return O(this,null,function*(){return this.emit("getServerConfig",i)})}setServerConfig(i){return O(this,null,function*(){return this.emit("setServerConfig",i)})}deleteContact(i){return O(this,null,function*(){return this.emit("deleteContact",i)})}sendPaypalCheckoutLink(i){return this.emit("sendPaypalCheckoutLink",i)}getTextTemplates(){return this.emit("getTextTemplates")}getCalendarPw(){return O(this,null,function*(){return this.emit("getCalendarPw")})}getWhatsAppFastAnswersFromAc(){return O(this,null,function*(){return this.emit("getWhatsAppFastAnswersFromAc")})}postponeReminder(i){return this.emit("postponeReminder",i)}getArtistsFromAc(){return this.emit("getArtistsFromAc")}getPromoByOfferId(i){return O(this,null,function*(){return this.emit("getPromoByOfferId",i)})}getCurrentArtistPhoto(i){return O(this,null,function*(){return this.emit("getCurrentArtistPhoto",i)})}reloadCalendarEvents(){return this.emit("reloadCalendarEvents")}addArtistPayouts2(i){return O(this,null,function*(){return this.emit("addArtistPayouts2",i)})}earlyArtistPayout2(i,r){return O(this,null,function*(){return this.emit("earlyArtistPayout2",{dateString:i,artist:r})})}getTime(){return O(this,null,function*(){return this.emit("getTime")})}getTime2(){return O(this,null,function*(){return this.emit("getTime2")})}getArtistSpotByArtistAndDate(i,r,s=!1){return this.emit("getArtistSpotByArtistAndDate",{artist:i,dateString:r,getLastIfNotExists:s})}getAvailableArtistsDay(i){return this.emit("getAvailableArtistsDay",i)}setWelcomeMessageRead(){return this.emit("setWelcomeMessageRead")}getCityByPostalCode(i){return this.emit("getCityByPostalCode",i)}getPriceBuilderRandomPrePhotos(){return this.emit("getPriceBuilderRandomPrePhotos","Abc")}getGoogleDriveFile(i){return this.emit("getGoogleDriveFile",i)}getArticle(i){return this.emit("getArticle",i)}getOutgoingsImagesZip(i){return O(this,null,function*(){return this.emit("getOutgoingsImagesZip",i)})}setNextDocScanWithoutQrCodeData(i){return this.emit("setNextDocScanWithoutQrCodeData",i)}getPromoUsers(){return O(this,null,function*(){return this.emit("getPromoUsers")})}getPromoPromotions(){return O(this,null,function*(){return this.emit("getPromoPromotions")})}getClientServerConnections(){return this.emit("getClientServerConnections")}clientServerRunNpmI(i){return this.emit("clientServerRunNpmI",i)}clientServerRunUpdate(i){return this.emit("clientServerRunUpdate",i)}clientServerPing(i){return this.emit("clientServerPing",i)}getPaypalTransaction(i){return this.emit("getPaypalTransaction",i)}getPaypalTransactionFirstParent(i){return this.emit("getPaypalTransactionFirstParent",i)}setClientServerDescription(i,r){return this.emit("setClientServerDescription",{machineId:i,description:r})}clientServerRestart(i){return this.emit("clientServerRestart",i)}clientServerReboot(i){return this.emit("clientServerReboot",i)}sendArtistStencilRequest(i){return O(this,null,function*(){return this.emit("sendArtistStencilRequest",i)})}setUserActive(){if(this.state.value.authenticated&&this.state.value.connected)return this.emit("setUserActive")}setArtistSkillsToAc(i){return this.emit("setArtistSkillsToAc",i)}getCustomer(i){return this.emit("getCustomer",i)}sendStencilSeenMessageToCustomer(i){return O(this,null,function*(){return this.emit("sendStencilSeenMessageToCustomer",i)})}getTextTemplatesByType(i){return O(this,null,function*(){return this.emit("getTextTemplatesByType",i)})}updateAllTextTemplateTypes(i,r){return O(this,null,function*(){return this.emit("updateAllTextTemplateTypes",{type:i,textTemplates:r})})}deleteInventoryOrder(i){return this.emit("deleteInventoryOrder",i)}openAiQuestion(i){return this.emit("openAiQuestion",i)}getTextTemplatesFromAc(i){return O(this,null,function*(){return this.emit("getTextTemplatesFromAc",i)})}sendWhatsAppMessageToAllArtists(i){return O(this,null,function*(){return this.emit("sendWhatsAppMessageToAllArtists",i)})}userWantReLogin(){return this.emit("userWantReLogin")}getEventPhotosFromClipboard(){return O(this,null,function*(){return this.emit("getEventPhotosFromClipboard")})}reAssignEventPhotoFromClipboard(i,r){return O(this,null,function*(){return this.emit("reAssignEventPhotoFromClipboard",{photos:i,newEventId:r})})}piercingManagerStartCustomer(i){return O(this,null,function*(){return this.emit("piercingManagerStartCustomer",i)})}piercingManagerNotHere(i,r){return O(this,null,function*(){return this.emit("piercingManagerNotHere",{eventId:i,toAdd:r})})}piercingManagerEventFinished(i){return O(this,null,function*(){return this.emit("piercingManagerEventFinished",i)})}piercingManagerGetNextCustomer(){return O(this,null,function*(){return this.emit("piercingManagerGetNextCustomer")})}piercingManagerGetArtistSession(){return O(this,null,function*(){return this.emit("piercingManagerGetArtistSession")})}piercingManagerStartArtistSession(i){return O(this,null,function*(){return this.emit("piercingManagerStartArtistSession",i)})}piercingManagerGetAvailableArtists(){return O(this,null,function*(){return this.emit("piercingManagerGetAvailableArtists")})}piercingManagerGetSession(){return O(this,null,function*(){return this.emit("piercingManagerGetSession")})}piercingManagerStartSession(){return O(this,null,function*(){return this.emit("piercingManagerStartSession")})}piercingManagerClearSession(){return O(this,null,function*(){return this.emit("piercingManagerClearSession")})}piercingManagerReOpenEvents(){return O(this,null,function*(){return this.emit("piercingManagerReOpenEvents")})}piercingManagerClearSortValues(){return O(this,null,function*(){return this.emit("piercingManagerClearSortValues")})}piercingManagerStartPause(){return O(this,null,function*(){return this.emit("piercingManagerStartPause")})}piercingManagerSetEventsToToday(i){return O(this,null,function*(){return this.emit("piercingManagerSetEventsToToday",i)})}piercingManagerSendRegisterLink(i){return this.emit("piercingManagerSendRegisterLink",i)}getRemindersSince(i,r){return this.emit("getRemindersSince",{dateString:i,appendRefObjs:r})}cashReportCashUpsert(i,r){return this.emit("cashReportCashUpsert",{cashType:i,data:r})}cashReportCashDeleteById(i,r){return this.emit("cashReportCashDeleteById",{id:i,cashType:r})}cashReportCashGetById(i,r){return this.emit("cashReportCashGetById",{id:i,cashType:r})}studioCashReport2GetData(i,r,s){return this.emit("studioCashReport2GetData",{dateString:i,studio:r,noCache:s})}getCalendarEventsForCalendar(i,r){return this.emit("getCalendarEventsForCalendar",{dateString:i,daysCount:r})}workSessionStart(i){return this.emit("workSessionStart",i)}workSessionStartCashRegister(i,r){return this.emit("workSessionStartCashRegister",{dateString:i,startMoney:r})}workSessionUpdateCashRegister(i){return this.emit("workSessionUpdateCashRegister",i)}workSessionUpdateWorkSession(i){return this.emit("workSessionUpdateWorkSession",i)}getDayFinishReport2(i,r,s){return O(this,null,function*(){return this.emit("getDayFinishReport2",{dateString:i,studio:r,employeeName:s})})}resetDayFinish2(i,r){return O(this,null,function*(){return this.emit("resetDayFinish2",{workSessionDateString:i,withEarlyPayouts:r})})}bookBankAndSafe(i,r,s,o){return O(this,null,function*(){return this.emit("bookBankAndSafe",{dateString:i,bankValue:r,safeValue:s,shouldValueBeforePayoutsWithoutSafe:o})})}dayFinishCreateLog(i){return this.emit("dayFinishCreateLog",i)}dayFinishDeleteLog(i){return this.emit("dayFinishDeleteLog",i)}getDayFinishLog(i){return this.emit("getDayFinishLog",i)}workSessionSetPostponeEvents(i,r){return O(this,null,function*(){return this.emit("workSessionSetPostponeEvents",{dateString:i,eventIds:r})})}printInvoices(i){return this.emit("printInvoices",i)}printDayFinishReports(i,r,s){return this.emit("printDayFinishReports",{dateString:i,studio:r,employeeName:s})}getMergedInvoices(i){return this.emit("getMergedInvoices",i)}getMergedDayFinishReports(i,r,s){return this.emit("getMergedDayFinishReports",{dateString:i,studio:r,employeeName:s})}openGate(){return O(this,null,function*(){return this.emit("openGate")})}openDoor(){return O(this,null,function*(){return this.emit("openDoor")})}upsertPromoUser(i){return this.emit("promoService_upsertPromoUser",i)}getWhatsAppInstaResponses(){return O(this,null,function*(){return this.emit("getWhatsAppInstaResponses")})}registerUserChangedListener(){this.subscribeNew("eventUserUpdated",i=>{i.username===this.currentUser$.value.username&&this.currentUser$.next(i)})}emitUserChanged(){return this.emit("emitUserChanged")}combineContacts2(i,r){return this.emit("combineContacts2",{contact:i,allContactIds:r})}bookSideCashRegisterTransfer(i,r,s,o){return this.emit("bookSideCashRegisterTransfer",{dateString:i,cashRegisterStudio:r,transferValue:s,transferSafeValue:o})}acceptCashRegisterTransfer(i,r,s){return this.emit("acceptCashRegisterTransfer",{dateString:i,transfer:r,studio:s})}getWhatsApp20(){return this.emit("getWhatsApp20")}getDeclarationOfConsentTattoo(i,r,s){return this.emit("getDeclarationOfConsentTattoo",{page:i,lang:r,withParents:s})}getDeclarationOfConsentPiercing(i,r,s,o){return this.emit("getDeclarationOfConsentPiercing",{page:i,artistEmployed:r,lang:s,withParents:o})}getAfterCareInstructionPiercing(i){return this.emit("getAfterCareInstructionPiercing",{page:i})}getAfterCareInstructionTattoo(i){return this.emit("getAfterCareInstructionTattoo",{page:i})}getEventPhoto(i,r){return O(this,null,function*(){return this.emit("getEventPhoto",{eventId:i,googleDriveFileId:r})})}getAdditionalCanNotFinishReasons(i){return O(this,null,function*(){return this.emit("getAdditionalCanNotFinishReasons",i)})}getCacheList(i){return this.emit("getCacheList",i)}canBook(i,r){return this.emit("canBook",{bookDateTime:i,cashRegisterStudio:r})}sendBadPhotoToArtist(i,r,s){return this.emit("sendBadPhotoToArtist",{eventId:i,text:r,photoId:s})}eventList(i){return this.emit("eventList",i)}getNotAssignedBankTransfer(){return this.emit("getNotAssignedBankTransfer")}upsertCalendarEvent2(i,r,s){return O(this,null,function*(){return this.emit("upsertCalendarEvent2",{calendarEvent:i,newTattooTemplates:r,nextNxtUpdateId:s})})}getPiercingInventoryStockItems(){return this.emit("getPiercingInventoryStockItems")}deleteCalendarEvent2(i){return this.emit("deleteCalendarEvent2",i)}getPayPalIpn(i){return O(this,null,function*(){return this.emit("getPayPalIpn",i)})}reSendGiftCardsViaWhatsApp(i,r){return O(this,null,function*(){return this.emit("reSendGiftCardsViaWhatsApp",{orderId:i,mobile:r})})}reSendGiftCardsViaEmail(i){return O(this,null,function*(){return this.emit("reSendGiftCardsViaEmail",i)})}getKlarnaOrderRaw(i){return O(this,null,function*(){return this.emit("getKlarnaOrderRaw",i)})}getGiftCardCodeByByShopOrderLineItemId(i){return this.emit("getGiftCardCodeByByShopOrderLineItemId",i)}getKlarnaOrdersByKlarnaOrderId(i){return this.emit("getKlarnaOrdersByKlarnaOrderId",i)}getShopOrder(i){return O(this,null,function*(){return this.emit("getShopOrder",i)})}getShopOrderByLineItemId(i){return O(this,null,function*(){return this.emit("getShopOrderByLineItemId",i)})}sendArtistInvoicesByYear(i,r){return O(this,null,function*(){return this.emit("sendArtistInvoicesByYear",{artist:i,year:r})})}getKlarnaShopOrdersBetweenWithRaw(i,r){return O(this,null,function*(){return this.emit("getKlarnaShopOrdersBetweenWithRaw",{fromDateString:i,tillDateString:r})})}updateKlarnaOrder(i){return this.emit("updateKlarnaOrder",i)}reloadNgConfig(){return O(this,null,function*(){let i=yield this.getNgConfig();this.configService.setConfig(i)})}getNgConfig(){return this.emit("getNgConfig")}getKlarnaOrdersSplitted(i){return this.emit("getKlarnaOrdersSplitted",i)}getRefundsByOrderLineItemId(i){return this.emit("getRefundsByOrderLineItemId",i)}getKlarnaOrdersOutByShopOrderLineItemId(i){return this.emit("getKlarnaOrdersOutByShopOrderLineItemId",i)}syncShopOrder(i){return this.emit("syncShopOrder",i)}getPayPalTattooTicket(i){return this.emit("getPayPalTattooTicket",i)}sendMessageToClient(i,r){return this.emit("sendMessageToClient",{socketClientId:i,message:r})}getGiftCardForView(i){return this.emit("getGiftCardForView",i)}getKlarnaTattooTicketForView(i){return this.emit("getKlarnaTattooTicketForView",i)}getShopOrderForView(i){return this.emit("getShopOrderForView",i)}printCustomerReceipt(i,r){return O(this,null,function*(){return this.emit("printCustomerReceipt",{eventId:i,paymentUuid:r})})}getKlarnaOrdersOriginalFromTill(i,r){return O(this,null,function*(){return this.emit("getKlarnaOrdersOriginalFromTill",{from:i,till:r})})}setEventToNoWalkIn(i){return this.emit("setEventToNoWalkIn",i)}setWalkInToday(i){return this.emit("setIsWalkInToday",i)}importAdditionalBankTransaction(i){return this.emit("importAdditionalBankTransaction",i)}reduceArtistPayout(i,r){return this.emit("reduceArtistPayout",{eventId:i,toReduce:r})}deleteParsedContact(i){return this.emit("deleteParsedContact",i)}swapParsedContactAttribute(i,r,s){return this.emit("swapParsedContactAttribute",{fromId:i,toId:r,attribute:s})}getArtist(i){return O(this,null,function*(){return this.emit("getArtist",i)})}getArtistByName(i){return O(this,null,function*(){return this.emit("getArtistByName",i)})}uploadArtistFile(i,r,s,o){return O(this,null,function*(){return this.emit("uploadArtistFile",{artist:i,type:r,filename:s,arrayBuffer:o})})}checkEventsOnContacts(i){return O(this,null,function*(){return this.emit("checkEventsOnContacts",i)})}upsertArticle(i){return this.emit("upsertArticle",i)}setWhatsAppMessageIdAsBroadcast(i){return this.emit("setWhatsAppMessageIdAsBroadcast",i)}printShisha(i){return this.emit("printShisha",i)}getIp(){return this.emit("getIp")}getDiscountedOrDaySessionGiftCards(i,r){return this.emit("getDiscountedOrDaySessionGiftCards",{startDateString:i,endDateString:r})}getDynamicDataById(i){return this.emit("getDynamicDataById",i)}resetUserPassword(i){return this.emit("resetUserPassword",i)}piercingManagerAddInfo(i,r){return this.emit("piercingManagerAddInfo",{eventId:i,info:r})}getDailyNote(i){return this.emit("getDailyNote",i)}upsertDailyNote(i){return O(this,null,function*(){return this.emit("upsertDailyNote",i)})}deleteDailyNote(i){return O(this,null,function*(){return this.emit("deleteDailyNote",i)})}getCalendarEvent2ByGoogleId(i){return O(this,null,function*(){return this.emit("getCalendarEvent2ByGoogleId",i)})}hasPiercingArtistToday(){return O(this,null,function*(){return this.emit("hasPiercingArtistToday")})}createCashRegisterHandover(i){return O(this,null,function*(){return this.emit("createCashRegisterHandover",i)})}createArtistConfirm(i){return O(this,null,function*(){return this.emit("createArtistConfirm",i)})}cancelArtistConfirm(i){return O(this,null,function*(){return this.emit("cancelArtistConfirm",i)})}upsertEmployee(i){return O(this,null,function*(){return this.emit("upsertEmployee",i)})}getEmployeeHolidays(i){return O(this,null,function*(){return this.emit("getEmployeeHolidays",i)})}getEmployee(i){return O(this,null,function*(){return this.emit("getEmployee",i)})}getEmployees(){return O(this,null,function*(){return this.emit("getEmployees")})}getArtistConfirmByArtistAndWorkSessionDateTime(i,r){return O(this,null,function*(){return this.emit("getArtistConfirmByArtistAndWorkSessionDateTime",{artist:i,workSessionDateString:r})})}sendStudioTransferGiftCard(i,r){return O(this,null,function*(){return this.emit("sendStudioTransferGiftCard",{paymentPossibilityRecordId:i,toStudio:r})})}getEmployeeEvents(i,r){return O(this,null,function*(){return this.emit("getEmployeeEvents",{fromDateString:i,tillDateString:r})})}upsertEmployeeEvent(i){return this.emit("upsertEmployeeEvent",i)}getEmployeeEvent(i){return this.emit("getEmployeeEvent",i)}getAppUsers(){return O(this,null,function*(){return this.emit("getAppUsers")})}sendWhatsAppMessageToArtist(i,r){return O(this,null,function*(){return this.emit("sendWhatsAppMessageToArtist",{artistId:i,text:r})})}createArtistTelegramChatReminder(i){return O(this,null,function*(){return this.emit("createArtistTelegramChatReminder",i)})}checkArtistTelegramChat(i){return O(this,null,function*(){return this.emit("checkArtistTelegramChat",i)})}getReminderBySubId(i){return O(this,null,function*(){return this.emit("getReminderBySubId",i)})}getEventRatingData(i){return this.emit("getEventRatingData",i)}getEventRatingEvent(i){return this.emit("getEventRatingEvent",i)}getEventRatingArtist(i){return this.emit("getEventRatingArtist",i)}checkEventPhotoCache(i){return O(this,null,function*(){return this.emit("checkEventPhotoCache",i)})}deleteEmployeeEvent(i){return this.emit("deleteEmployeeEvent",i)}checkEmployeeEvents(i){return O(this,null,function*(){return this.emit("checkEmployeeEvents",i)})}getArtistSpotGateOpenText(i){return O(this,null,function*(){return this.emit("getArtistSpotGateOpenText",i)})}getArtistKeySafeCodes(){return O(this,null,function*(){return this.emit("getArtistKeySafeCodes")})}setArtistKeySafeCodes(i){return this.emit("setArtistKeySafeCodes",i)}getEmployeeWorks(){return this.emit("getEmployeeWorks")}getMoneyAccounts(){return this.emit("getMoneyAccounts")}getMoneyAccount(i){return O(this,null,function*(){return this.emit("getMoneyAccount",i)})}upsertMoneyAccount(i){return O(this,null,function*(){return this.emit("upsertMoneyAccount",i)})}upsertMoneyTransaction(i,r){return O(this,null,function*(){return this.emit("upsertMoneyTransaction",{transaction:i,createPeerTransaction:r})})}upsertMoneyTransactionRegion(i){return O(this,null,function*(){return this.emit("upsertMoneyTransactionRegion",i)})}upsertMoneyTransactionLabel(i){return O(this,null,function*(){return this.emit("upsertMoneyTransactionLabel",i)})}upsertMoneyTransactionCategory(i){return O(this,null,function*(){return this.emit("upsertMoneyTransactionCategory",i)})}deleteMoneyTransactionRegion(i){return this.emit("deleteMoneyTransactionRegion",i)}deleteMoneyTransactionLabel(i){return this.emit("deleteMoneyTransactionLabel",i)}deleteMoneyTransactionCategory(i){return this.emit("deleteMoneyTransactionCategory",i)}getMoneyTransactions(i){return O(this,null,function*(){return this.emit("getMoneyTransactions",i)})}getMoneyTransactionsWithPre(i){return O(this,null,function*(){return this.emit("getMoneyTransactionsWithPre",i)})}acceptMoneyPreTransaction(i,r,s,o){return O(this,null,function*(){return this.emit("acceptMoneyPreTransaction",{moneyPreTransactionId:i,regionId:r,categoryId:s,info:o})})}reCalcAccountBalance(i,r){return O(this,null,function*(){return this.emit("reCalcAccountBalance",{accountId:i,fromDatetime:r})})}deleteMoneyTransaction(i){return O(this,null,function*(){return this.emit("deleteMoneyTransaction",i)})}createPeerMoneyTransaction(i){return O(this,null,function*(){return this.emit("createPeerMoneyTransaction",i)})}getEventsConsentCheckInvalid(){return O(this,null,function*(){return this.emit("getEventsConsentCheckInvalid")})}createEmployeeWorkWeekPayout(i){return this.emit("createEmployeeWorkWeekPayout",i)}getKlarnaDisputes(){return O(this,null,function*(){return this.emit("getKlarnaDisputes")})}getArtistInvoice(i){return O(this,null,function*(){return this.emit("getArtistInvoice",i)})}throwErrorToolsInfo(){return this.emit("throwErrorToolsInfo")}throwErrorToolsError(){return this.emit("throwErrorToolsError")}throwError(){return this.emit("throwError")}setEventRating(i,r,s,o){return this.emit("setEventRating",{eventId:i,value:r,comment:s,ratingLog:o})}whatsAppDelete(){return this.emit("whatsAppDelete")}getWhatsAppScreenshot(){return O(this,null,function*(){return this.emit("getWhatsAppScreenshot")})}deleteEventRating(i,r){return this.emit("deleteEventRating",{eventId:i,username:r})}readOldChatsShort(i){return O(this,null,function*(){return this.emit("readOldChatsShort",i)})}setEventPhotoTypeOld(i,r,s){return this.emit("setEventPhotoTypeOld",{eventId:i,photoId:r,subType:s})}deleteEventFile(i,r){return this.emit("deleteEventFile",{eventId:i,fileId:r})}getEventQrCodeSecret(){return this.emit("getEventQrCodeSecret")}calcArtistRating(i,r){return O(this,null,function*(){return this.emit("calcArtistRating",{from:i,till:r})})}resetEarlyArtistPayout(i,r){return this.emit("resetEarlyArtistPayout",{dateString:i,artist:r})}tts(i){return this.emit("tts",i)}whatsAppRestart(){return this.emit("whatsAppRestart")}getLastPhotoDevice(){return O(this,null,function*(){return this.emit("getLastPhotoDevice")})}getIcloudState(){return O(this,null,function*(){return this.emit("getIcloudState")})}icloudAction(i,r){return O(this,null,function*(){return this.emit("icloudAction",{type:i,data:r})})}getEventsByFromTill(i,r){return O(this,null,function*(){return this.emit("getEventsByFromTill",{fromDateString:i,tillDateString:r})})}getEventsBestPhoto(){return O(this,null,function*(){return this.emit("getEventsBestPhoto")})}correctGrammar(i){return O(this,null,function*(){return this.emit("correctGrammar",i)})}updateEventFileSubType(i,r,s){return this.emit("updateEventFileSubType",{eventId:i,fileId:r,subType:s})}createEventFileAlbum(i,r){return this.emit("createEventFileAlbum",{eventId:i,files:r})}sendEventFileAlbumToContact(i,r){return this.emit("sendEventFileAlbumToContact",{contactId:i,url:r})}sendEventFilesToClipboard(i,r){return this.emit("sendEventFilesToClipboard",{eventId:i,eventFiles:r})}getEventFilesFromClipboard(){return O(this,null,function*(){return this.emit("getEventFilesFromClipboard")})}reAssignEventFilesFromClipboard(i,r){return this.emit("reAssignEventFilesFromClipboard",{newEventId:i,eventFiles:r})}saveEditPhoto(i,r){return O(this,null,function*(){return this.emit("saveEditPhoto",{fileId:i,base64Url:r})})}getDriveFile(i){return O(this,null,function*(){return this.emit("getDriveFile",i)})}getEventRatingLog(i){return O(this,null,function*(){return this.emit("getEventRatingLog",i)})}eventQuery(i){return O(this,null,function*(){return this.emit("eventQuery",i)})}getFonts(){return O(this,null,function*(){return this.emit("getFonts")})}deleteGiftCard(i){return O(this,null,function*(){return this.emit("deleteGiftCard",i)})}startDriveMigration(i,r){return this.emit("startDriveMigration",{from:i,till:r})}getDriveMigrationLogs(){return this.emit("getDriveMigrationLog")}getThermalPrinterIp(){return O(this,null,function*(){return this.emit("getThermalPrinterIp")})}setThermalPrinterIp(i){return O(this,null,function*(){return this.emit("setThermalPrinterIp",i)})}getStudioSocialMediaTelegramChatId(){return O(this,null,function*(){return this.emit("getStudioSocialMediaTelegramChatId")})}sendImageToSocialMedialMobile(i){return O(this,null,function*(){return this.emit("sendImageToSocialMedialMobile",{base64:i})})}getContactsForMap(){return O(this,null,function*(){return this.emit("getContactsForMap")})}beforeWhatsAppClientMessageSent(i){return this.emit("beforeWhatsAppClientMessageSent",i)}getChatsToRecheck(){return O(this,null,function*(){return this.emit("getChatsToRecheck")})}setChatRecheck(i,r){return this.emit("setChatRecheck",{chatId:i,doCheck:r})}getWhatsAppChatPinned(i){return O(this,null,function*(){return this.emit("getWhatsAppChatPinned",i)})}deletePaymentPossibilityRecord(i){return O(this,null,function*(){return this.emit("deletePaymentPossibilityRecord",i)})}getQontoTransactionsByDate(i){return O(this,null,function*(){return this.emit("getQontoTransactionsByDate",i)})}getQontoTransaction(i){return O(this,null,function*(){return this.emit("getQontoTransaction",i)})}};e.\u0275fac=function(r){return new(r||e)(it(JP),it(vt),it(q_),it(vu),it(Xi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Cxe={};Bde(Cxe,{AG_CHARTS_LOCALE_EN_US:()=>ott,AgCharts:()=>DE,AgErrorBarSupportedSeriesTypes:()=>B0i,AgTooltipPositionType:()=>RCe,ICONS_LEGACY:()=>att,Marker:()=>w2,VERSION:()=>GG,_ModuleSupport:()=>R3,_Scale:()=>O6,_Scene:()=>Wi,_Theme:()=>Lm,_Util:()=>Zl,time:()=>mte});function tCe(t,e){eCe.has(e)||(eCe.set(e,!0),t())}function $Je(t){return t}function*Dee(...t){for(let e of t)yield*VM(e)}function KJe(t,e=0,n){let{leading:i=!0,trailing:r=!0}=n??{},s,o,a=!1;function l(){r&&o?(s=setTimeout(l,e),t(...o)):a=!1,o=null}function c(...d){a?o=d:(a=!0,s=setTimeout(l,e),i?t(...d):o=d)}return Object.assign(c,{cancel(){clearTimeout(s),a=!1,o=null}})}function U0i(...t){return()=>{for(let e of t)e()}}function j0i(t){return t.getTime()}function $0i(t){return new Date(t)}function Y0i(t){return Math.floor((t.getTime()-ltt)/dw)}function q0i(t){return new Date(ltt+t*dw)}function Z0i(t){return Math.floor((t.getTime()-ctt)/V0)}function X0i(t){return new Date(ctt+t*V0)}function Q0i(t){return Math.floor((t.getTime()-dtt)/Ag)}function J0i(t){return new Date(dtt+t*Ag)}function e2i(t){let e=t.getTimezoneOffset()*V0;return Math.floor((t.getTime()-e)/D6)}function t2i(t){let e=new Date(1970,0,1);return e.setDate(e.getDate()+t),e}function EE(t){let n=(7+t-4)%7;function i(s){let o=s.getTimezoneOffset()*V0;return Math.floor((s.getTime()-o)/zx-n/7)}function r(s){let o=new Date(1970,0,1);return o.setDate(o.getDate()+s*7+n),o}return new B4(i,r)}function i2i(t){return t.getFullYear()*12+t.getMonth()}function n2i(t){let e=Math.floor(t/12),n=t-e*12;return new Date(e,n,1)}function r2i(t){return t.getFullYear()}function s2i(t){let e=new Date;return e.setFullYear(t),e.setMonth(0,1),e.setHours(0,0,0,0),e}function o2i(t){return Math.floor(t.getTime()/V0)}function a2i(t){return new Date(t*V0)}function l2i(t){return Math.floor(t.getTime()/Ag)}function c2i(t){return new Date(t*Ag)}function d2i(t){return Math.floor(t.getTime()/D6)}function u2i(t){let e=new Date(0);return e.setUTCDate(e.getUTCDate()+t),e.setUTCHours(0,0,0,0),e}function h2i(t){return t.getUTCFullYear()*12+t.getUTCMonth()}function p2i(t){let e=Math.floor(t/12),n=t-e*12;return new Date(Date.UTC(e,n,1))}function m2i(t){return t.getUTCFullYear()}function f2i(t){let e=new Date;return e.setUTCFullYear(t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0),e}function wtt(){nCe.clear()}function k6(t){let e=t.constructor,n=Object.hasOwn(e,"className")?e.className:e.name;if(!n)throw new Error(`The ${e} is missing the 'className' property.`);let i=(nCe.get(n)??0)+1;return nCe.set(n,i),`${n}-${i}`}function g2i(){return URL.createObjectURL(new Blob).split("/").at(-1)}function Stt(t){return typeof t!="object"||t==null||!(Symbol.iterator in t)?Dtt(t):t}function*Ttt(...t){for(let e of t)for(let n of e)yield n}function*Dtt(...t){for(let e of t)yield e}function gte(t,e,n,i=1/0){let r={nearest:void 0,distanceSquared:i};for(let s of n){let o=s.distanceSquared(t,e);if(o===0)return{nearest:s,distanceSquared:0};o<r.distanceSquared&&(r.nearest=s,r.distanceSquared=o)}return r}function v2i(t,e,n,i=1/0){let{x:r,y:s}=n.transformPoint(t,e),o={nearest:void 0,distanceSquared:i};for(let a of n.children){let{nearest:l,distanceSquared:c}=a.nearestSquared(r,s,o.distanceSquared);if(c===0)return{nearest:l,distanceSquared:c};c<o.distanceSquared&&(o.nearest=l,o.distanceSquared=c)}return o}function Wa(t,e,n){return Math.min(n,Math.max(t,e))}function Jee(t,e){let[n,i]=N4(e);return Wa(n,t,i)}function N4(t){if(t.length===0)return[];let e=[1/0,-1/0];for(let n of t)n<e[0]&&(e[0]=n),n>e[1]&&(e[1]=n);return e}function fR(t){let[e,n]=N4(t);return n-e}function fE(t,e,n=1e-10){return Math.abs(t-e)<n}function AG(t){return Math.sign(t)===-1||Object.is(t,-0)}function vte(t,e=2){let n=10**e;return Math.round(t*n)/n}function yte(t,e=2){let n=Math.floor(Math.log(Math.abs(t))/Math.LN10);return n>=0||!isFinite(n)?t.toFixed(e):t.toFixed(Math.abs(n)-1+e)}function _te(t,e){return Math.floor(t%e+(t<0?e:0))}function PG(t){return Math.floor(t)===t?0:String(t).split(".")[1]?.length??0}function WCe(t,e){return e=e??navigator.language,new Intl.NumberFormat(e,{style:"percent"}).format(t)}function UCe(t,e){return WCe(t/100,e)}function Ss(t){return function(e,n){let i=`__${n}`;e[n]||y2i(e,n,i,t)}}function y2i(t,e,n,i){let{redraw:r=1,type:s="normal",changeCb:o,convertor:a,checkDirtyOnAssignment:l=!1}=i??{},c={redraw:r,type:s,changeCb:o,checkDirtyOnAssignment:l,convertor:a},d;switch(s){case"normal":d=b2i(n,c);break;case"transform":d=w2i(n,c);break;case"path":d=S2i(n,c);break;case"font":d=T2i(n,c);break}d=x2i(C2i(_2i(d,c),c),c),Object.defineProperty(t,e,{set:d,get:function(){return this[n]},enumerable:!0,configurable:!0})}function _2i(t,e){let{convertor:n}=e;return n?function(i){t.call(this,n(i))}:t}function C2i(t,e){let{changeCb:n}=e;return n?function(i){let r=t.call(this,i);return r!==wR&&n.call(this,this),r}:t}function x2i(t,e){let{checkDirtyOnAssignment:n}=e;return n?function(i){let r=t.call(this,i);return r!==wR&&i!=null&&i._dirty>0&&this.markDirty(i,i._dirty),r}:t}function b2i(t,e){let{redraw:n=1,changeCb:i}=e;return function(r){let s=this[t];return r!==s?(this[t]=r,this.markDirty(this,n),i?.(this),r):wR}}function w2i(t,e){let{redraw:n=1}=e;return function(i){let r=this[t];return i!==r?(this[t]=i,this.markDirtyTransform(n),i):wR}}function S2i(t,e){let{redraw:n=1}=e;return function(i){let r=this[t];return i!==r?(this[t]=i,this._dirtyPath||(this._dirtyPath=!0,this.markDirty(this,n)),i):wR}}function T2i(t,e){let{redraw:n=1}=e;return function(i){let r=this[t];return i!==r?(this[t]=i,this._dirtyFont||(this._dirtyFont=!0,this.markDirty(this,n)),i):wR}}function ktt(t,e){return n=>Number(t)*(1-n)+Number(e)*n}function Itt(t,e){if(typeof t=="string")try{t=X5.fromString(t)}catch{t=X5.fromArray([0,0,0])}if(typeof e=="string")try{e=X5.fromString(e)}catch{e=X5.fromArray([0,0,0])}return n=>X5.mix(t,e,n).toRgbaString()}function Att(t,e){Object.getOwnPropertyDescriptor(t,aR)==null&&Object.defineProperty(t,aR,{value:{}});let n=t[aR],i=e.toString();if(typeof n[i]<"u")return n[i];let r=new WeakMap;n[i]={setters:[],getters:[],observers:[],valuesMap:r};let s=Object.getOwnPropertyDescriptor(t,e),o=s?.set,a=s?.get;return Object.defineProperty(t,e,{set:function(d){let{setters:u,observers:m}=n[i],f;u.some(_=>_.length>2)&&(f=a?a.call(this):r.get(this));for(let _ of u)if(d=_(this,e,d,f),d===ete)return;o?o.call(this,d):r.set(this,d);for(let _ of m)_(this,d,f)},get:function(){let d=a?a.call(this):r.get(this);for(let u of n[i].getters)if(d=u(this,e,d),d===ete)return;return d},enumerable:!0,configurable:!1}),n[i]}function Ux(t,e,n){return(i,r)=>{let s=Att(i,r);s.setters.push(t),e&&s.getters.unshift(e),n&&Object.assign(s,n)}}function M2i(t){return(e,n)=>{Att(e,n).observers.push(t)}}function Cte(t){return typeof t<"u"&&aR in t}function lR(t){let e=new Set;for(;Cte(t);)e.add(t?.[aR]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(n=>Object.keys(n))}function k2i(t){return lR(t).reduce((e,n)=>(e[n]=t[n]??null,e),{})}function I2i(t,e){let n=e.toString();for(;Cte(t);){let i=t[aR];if(Object.hasOwn(i,n))return i[n];t=Object.getPrototypeOf(t)}}function vG(t){return t!=null}function sp(t){return Array.isArray(t)}function jCe(t){return typeof t=="boolean"}function RG(t){return t instanceof Date}function FG(t){return RG(t)&&!isNaN(Number(t))}function Ptt(t){return t instanceof RegExp}function jx(t){return typeof t=="function"}function D3(t){return typeof t=="object"&&t!==null&&!sp(t)}function A2i(t){return sp(t)||E6(t)}function E6(t){return typeof t=="object"&&t!==null&&t.constructor===Object}function E3(t){return typeof t=="string"}function O4(t){return typeof t=="number"}function Tc(t){return Number.isFinite(t)}function Rtt(t){return typeof window<"u"&&t instanceof HTMLElement}function P2i(t,e){return E3(e)&&Object.keys(t).includes(e)}function Ftt(t,e){return Object.values(t).includes(e)}function Ltt(t){return typeof t=="symbol"}function R2i(...t){return ql(...t.reverse())}function ql(...t){let e={};for(let n of t){if(!D3(n))continue;let i=Cte(n)?lR(n):Object.keys(n);for(let r of i)E6(e[r])&&E6(n[r])?e[r]=ql(e[r],n[r]):e[r]??(e[r]=n[r])}return e}function sCe(t,...e){return e&&sp(t)?t.map(n=>ql(n,...e)):t}function $Ce(t,e){return Object.entries(t).reduce((n,[i,r])=>(n[i]=e(r,i,t),n),{})}function oCe(t,e){let n=ve({},t);for(let i of e)delete n[i];return n}function KCe(t,e){return(sp(e)?e:e.split(".")).reduce((i,r)=>i[r],t)}function qCe(t,e,n){let i=sp(e)?e.slice():e.split("."),r=i.pop();if(i.some(o=>YCe.has(o)))return;let s=i.reduce((o,a)=>o[a],t);return s[r]=n,s[r]}function uE(t,e,n){if(n===void 0)return e;for(let i of t){let r=n[i];r!==void 0&&(e[i]=r)}return e}function eC(t){return t instanceof pl||t instanceof xte}function V4(t,e,n){if(sp(e)){if(!sp(t)||t.length!==e.length||e.some((i,r)=>V4(t[r],i)!=null))return e}else if(E6(e)){if(!E6(t))return e;let i={},r=new Set([...Object.keys(t),...Object.keys(e)]);for(let s of r)if(!(t[s]===e[s]||n?.includes(s)))if(typeof t[s]==typeof e[s]){let o=V4(t[s],e[s]);o!==null&&(i[s]=o)}else i[s]=e[s];return Object.keys(i).length?i:null}else if(t!==e)return e;return null}function N0(t,e){return sp(t)?t.map(n=>N0(n,e)):E6(t)?$Ce(t,(n,i)=>e?.shallow?.includes(i)?tte(n):N0(n,e)):tte(t)}function tte(t){return sp(t)?[...t]:E6(t)?ve({},t):RG(t)?new Date(t):Ptt(t)?new RegExp(t.source,t.flags):t}function J5(t,e,n,...i){if(sp(t))e(t,...i),t.forEach((r,s)=>{J5(r,e,n,...qJe(i,s))});else if(E6(t)){e(t,...i);for(let r of Object.keys(t)){if(n?.skip?.includes(r))continue;let s=t[r];(sp(s)||E6(s))&&J5(s,e,n,...qJe(i,r))}}}function cR(t,e,n={}){let{path:i,matcherPath:r=i?.replace(/(\[[0-9+]+])/i,"[]"),skip:s=[]}=n;if(t==null)throw new Error(`AG Charts - target is uninitialised: ${i??"<root>"}`);if(e==null)return t;if(eC(t))return t.set(e);let o=t,a=P5e(t);for(let l in e){if(YCe.has(l))continue;let c=`${r?r+".":""}${l}`;if(s.includes(c))continue;let d=e[l],u=`${i?i+".":""}${l}`,m=o.constructor,f=o[l];try{let _=P5e(f),x=P5e(d);if(a===aCe&&!(l in t)){yr.warn(`unable to set [${u}] in ${m?.name} - property is unknown`);continue}if(_!=null&&x!=null&&x!==_&&(_!==aCe||x!=="object")){yr.warn(`unable to set [${u}] in ${m?.name} - can't apply type of [${x}], allowed types are: [${_}]`);continue}eC(f)?o[l].set(d):x==="object"?(f==null&&(o[l]={}),cR(f??o[l],d,St(ve({},n),{path:u,matcherPath:c}))):o[l]=d}catch(_){yr.warn(`unable to set [${u}] in [${m?.name}]; nested error is: ${_.message}`)}}return t}function qJe(t,e){return t.map(n=>n?.[e])}function P5e(t){return t==null?null:Rtt(t)||RG(t)?"primitive":sp(t)?"array":D3(t)?E6(t)?"object":aCe:jx(t)?"function":"primitive"}function B2i(t){return t.every(e=>e instanceof SR)}function bte(t){return B2i(t)?{nodes:t,selections:[]}:{nodes:[],selections:t}}function om(t,e,n,i,r,s,o){let{fromFn:a,toFn:l,intermediateFn:c}=r,{nodes:d,selections:u}=bte(i),m=(_,x)=>{let D,E=0,M=0;for(let G of x){let A=_[E]===G,Y={last:M>=x.length-1,lastLive:E>=_.length-1,prev:x[M-1],prevFromProps:D,prevLive:_[E-1],next:x[M+1],nextLive:_[E+(A?1:0)]},X=`${t}_${e}_${G.id}`;n.stopByAnimationId(X);let ne="unknown";A?s&&o&&(ne=z2i(G,G.datum,s,o)):ne="removed";let I=a(G,G.datum,ne,Y),{phase:pe,start:ce,finish:ie,delay:le,duration:Se}=I,je=al(I,["phase","start","finish","delay","duration"]),z=l(G,G.datum,ne,Y),{phase:ze,start:Ge,finish:Ae,delay:Ye,duration:ft}=z,Ft=al(z,["phase","start","finish","delay","duration"]),Tt=ie==null&&Ae==null;n.animate({id:X,groupId:t,phase:pe??ze??"update",duration:Se??ft,delay:le??Ye,from:je,to:Ft,ease:yG,collapsable:Tt,onPlay:()=>{G.setProperties(ve(ve({},ce),Ge))},onUpdate(at){G.setProperties(at),c&&G.setProperties(c(G,G.datum,ne,Y))},onStop:()=>{G.setProperties(ve(ve(ve(ve(ve(ve({},ce),Ge),je),Ft),ie),Ae))}}),A&&E++,M++,D=je}},f=0;for(let _ of u){let x=_.nodes(),D=x.filter(E=>!_.isGarbage(E));m(D,x),n.animate({id:`${t}_${e}_selection_${f}`,groupId:t,phase:"end",from:0,to:1,ease:yG,onStop(){_.cleanup()}}),f++}m(d,d)}function rC(t,e,n,i,r,s,o){let{nodes:a,selections:l}=bte(i),{start:c,finish:d,phase:u}=o,m=d==null;n.animate({id:`${t}_${e}`,groupId:t,phase:u??"update",from:r,to:s,ease:yG,collapsable:m,onPlay:()=>{if(c){for(let f of a)f.setProperties(c);for(let f of l)for(let _ of f.nodes())_.setProperties(c)}},onUpdate(f){for(let _ of a)_.setProperties(f);for(let _ of l)for(let x of _.nodes())x.setProperties(f)},onStop:()=>{for(let f of a)f.setProperties(ve(ve({},s),d));for(let f of l){for(let _ of f.nodes())_.setProperties(ve(ve({},s),d));f.cleanup()}}})}function z2i(t,e,n,i){let r=n(t,e);return i.added.has(r)?"added":i.removed.has(r)?"removed":"updated"}function XCe(t,e=new Date(t.getFullYear(),0,1)){let n=t.getTimezoneOffset()-e.getTimezoneOffset(),i=t.getTime()-e.getTime()+n*6e4,r=36e5*24;return Math.floor(i/r)}function ZJe(t,e){let i=new Date(t.getFullYear(),0,1).getDay(),r=(e-i+7)%7,s=new Date(t.getFullYear(),0,r+1);return s<=t?Math.floor(XCe(t,s)/7)+1:0}function Gtt(t,e=t.getFullYear()){let i=new Date(e,0,1).getDay(),r=(XJe-i+7)%7,s=new Date(e,0,r-(XJe-Htt)+1);return s<=t?Math.floor(XCe(t,s)/7)+1:Gtt(t,e-1)}function G2i(t){let e=t.getTimezoneOffset(),n=Math.abs(e);return`${e>0?"-":"+"}${O0(Math.floor(n/60),2,"0")}${O0(Math.floor(n%60),2,"0")}`}function O0(t,e,n){let i=String(Math.floor(t));return i.length>=e?i:`${n.repeat(e-i.length)}${i}`}function LG(t){let e=[];for(;t.length>0;){let n=t.indexOf("%");if(n!==0){let a=n>0?t.substring(0,n):t;e.push(a)}if(n<0)break;let i=t[n+1],r=U2i[i];r!=null&&n++;let s=t[n+1],o=W2i[s];if(typeof o=="function")e.push([o,r]);else if(typeof o=="string"){let a=LG(o);e.push([a,r])}else e.push(`${r??""}${s}`);t=t.substring(n+2)}return n=>{let i=typeof n=="number"?new Date(n):n;return e.map(r=>typeof r=="string"?r:r[0](i,r[1])).join("")}}function S3(t){return t instanceof Date?t.getTime():t}function QCe(t,e,n){let i=Wtt(t,e,n),r=LG(i);return s=>r(s)}function Wtt(t=[],e=t,n=0){let i=1/0;for(let l=1;l<t.length;l++)i=Math.min(i,Math.abs(t[l]-t[l-1]));let r=new Date(e[0]).getFullYear(),o=new Date(e.at(-1)).getFullYear()-r>0,a=isFinite(i)?j2i(i,t):$2i(t[0]);return Y2i(Math.max(a-n,0),o,t)}function j2i(t,e){return t<dw?0:t<V0?1:t<Ag?2:t<D6?3:t<zx?4:t<D6*28||t<D6*31&&K2i(e)?5:t<mR?6:7}function $2i(t){return ZH.floor(t)<t?0:XH.floor(t)<t?1:QH.floor(t)<t?2:iCe.floor(t)<t?3:eR.floor(t)<t?Uee.floor(t)<t?4:5:GCe.floor(t)<t?6:7}function K2i(t){let e=new Date(t[0]).getMonth();for(let n=1;n<t.length;n++){let i=new Date(t[n]).getMonth();if(e===i)return!0;e=i}return!1}function Y2i(t,e,n){let i=S3(n[0]),r=S3(n.at(-1)),s=Math.abs(r-i),o=e||t===7,a=s===0,c=[["hour",6*Ag,14*D6,3,"%I %p"],["hour",V0,6*Ag,3,"%I:%M"],["second",1e3,6*Ag,1,":%S"],["ms",0,6*Ag,0,".%L"],["am/pm",V0,6*Ag,3,"%p"]," ",["day",D6,zx,4,"%a"],["month",a?0:zx,52*zx,5,"%b %d"],["month",5*zx,10*mR,6,"%B"]," ",["year",o?0:mR,1/0,7,"%Y"]].filter(m=>{if(typeof m=="string")return!0;let[f,_,x,D]=m;return D>=t&&_<=s&&s<x}).reduce((m,f)=>(typeof f=="string"?m.result.push(f):m.used.has(f[0])||(m.result.push(f),m.used.add(f[0])),m),{result:[],used:new Set}).result,d=c.findIndex(m=>typeof m!="string"),u=c.length-[...c].reverse().findIndex(m=>typeof m!="string");return c.slice(d,u).map(m=>typeof m=="string"?m:m[4]).join("").replaceAll(/\s+/g," ").trim()}function $e(t,e={}){let{optional:n=!1,property:i}=e;return Ux((r,s,o)=>{let a=St(ve({},e),{target:r,property:s});if(n&&typeof o>"u"||t(o,a))return eC(r[s])&&!eC(o)?(r[s].set(o),r[s]):o;let l=i??String(s).replace(/^_*/,""),c=r.constructor.className??r.constructor.name.replace(/Properties$/,""),d=oG(o),u=50;if(d!=null&&d.length>u){let m=d.length-u;d=d.slice(0,u)+`... (+${m} characters)`}return yr.warn(`Property [${l}] of [${c}] cannot be set to [${d}]${t.message?`; expecting ${OG(t,a)}`:""}, ignoring.`),ete},void 0,{optional:n})}function Su(t,e="a"){return au(n=>t.includes(n),`${e} keyword such as ${tgi(t)}`)}function au(t,e){return t.message=e,t}function tgi(t){let e=t.map(i=>`'${i}'`);if(e.length===1)return e[0];let n=e.pop();return`${e.join(", ")} or ${n}`}function OG(t,e){return jx(t.message)?t.message(e):t.message}function igi(t){return e=>OG(e,t)}function ngi(t){return Object.assign(t,{restrict({length:e,minLength:n}={}){let i="an array";return O4(n)&&n>0?i="a non-empty array":O4(e)&&(i=`an array of length ${e}`),au(r=>sp(r)&&(O4(e)?r.length===e:!0)&&(O4(n)?r.length>=n:!0),i)}})}function rgi(t){return Object.assign(t,{restrict({min:e,max:n}={}){let i=["a number"],r=O4(e),s=O4(n);return r&&s?i.push(`between ${e} and ${n} inclusive`):r?i.push(`greater than or equal to ${e}`):s&&i.push(`less than or equal to ${n}`),au(o=>Tc(o)&&(r?o>=e:!0)&&(s?o<=n:!0),i.join(" "))}})}function eit(t){return Object.assign(t,{restrict(e){return au(n=>n instanceof e,n=>OG(t,n)??`an instance of ${e.name}`)}})}function oG(t){if(typeof t=="number"){if(isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity"}return JSON.stringify(t)}function Ef(t,e){let{nodes:n,selections:i}=bte(t);for(let r of i){for(let s of r.nodes()){let o=e(s,s.datum);s.setProperties(o)}r.cleanup()}for(let r of n){let s=e(r,r.datum);r.setProperties(s)}}function iit(t){let e,n,i=ogi.exec(t);i&&([,e,t,n]=i);let r=sgi.exec(t);if(!r)throw new Error(`The number formatter is invalid: ${t}`);let[,s,o,a,l,c,d,u,m,f,_]=r;return{fill:s,align:o,sign:a,symbol:l,zero:c,width:parseInt(d),comma:u,precision:parseInt(m),trim:!!f,type:_,prefix:e,suffix:n}}function nit(t){let e=typeof t=="string"?iit(t):t,{fill:n,align:i,sign:r="-",symbol:s,zero:o,width:a,comma:l,type:c,prefix:d="",suffix:u="",precision:m}=e,{trim:f}=e,_=m==null||isNaN(m),x;if(!c)x=w6.g,f=!0;else if(c in w6&&c in rR)x=_?rR[c]:w6[c];else if(c in w6)x=w6[c];else if(c in rR)x=rR[c];else throw new Error(`The number formatter type is invalid: ${c}`);let D;return m==null||_?D=c?6:12:D=m,E=>{let M=x(E,D);return f&&(M=cgi(M)),l&&(M=dgi(M,l)),M=hgi(E,M,r),s&&s!=="#"&&(M=`${s}${M}`),s==="#"&&c==="x"&&(M=`0x${M}`),c==="s"&&(M=`${M}${ugi(E)}`),(c==="%"||c==="p")&&(M=`${M}%`),a!=null&&!isNaN(a)&&(M=pgi(M,a,n??o,i)),M=`${d}${M}${u}`,M}}function kee(t){return Math.floor(Math.abs(t))}function cgi(t){return t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function dgi(t,e){let n=t.indexOf(".");n<0&&(n=t.length);let i=t.substring(0,n).split(""),r=t.substring(n);for(let s=i.length-3;s>0;s-=3)i.splice(s,0,e);return`${i.join("")}${r}`}function ugi(t){return agi[oit(t)]}function oit(t){return Wa(rit,t?Math.floor(Math.log10(Math.abs(t))/3)*3:0,sit)}function hgi(t,e,n=""){if(n==="(")return t>=0?e:`(${e})`;let i=n==="+"?"+":"";return`${t>=0?i:lgi}${e}`}function pgi(t,e,n=" ",i=">"){let r=t;if(i===">"||!i)r=r.padStart(e,n);else if(i==="<")r=r.padEnd(e,n);else if(i==="^"){let s=Math.max(0,e-r.length),o=Math.ceil(s/2),a=Math.floor(s/2);r=r.padStart(o+r.length,n),r=r.padEnd(a+r.length,n)}return r}function ait(t,e){let n=[];for(let i=0;i<t;i++)n.push(e(i));return n}function sC(t){if(t.length===0)return;let e=1/0,n=-1/0;for(let r of t)r instanceof Date&&(r=r.getTime()),typeof r=="number"&&(r<e&&(e=r),r>n&&(n=r));let i=[e,n];if(i.every(isFinite))return i}function lit(t,e,n){return NG(t,e,n).extent}function NG(t,e,n){let i=!1;return t.length>2&&(t=sC(t)??[NaN,NaN]),isNaN(e)||(i||(i=e>t[0]),t=[e,t[1]]),isNaN(n)||(i||(i=n<t[1]),t=[t[0],n]),t[0]>t[1]&&(t=[]),{extent:t,clipped:i}}function gE(t,e){if(t==null||e==null||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(Array.isArray(t[n])&&Array.isArray(e[n])){if(!gE(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function cCe(t){return typeof t>"u"?[]:Array.isArray(t)?t:[t]}function Mte(t){return Array.from(new Set(t))}function s8e(t,e){return t.reduce((n,i)=>{let r=e(i);return n[r]??(n[r]=[]),n[r].push(i),n},{})}function dCe(t,e,n=0){if(t.length===0)return[];let i=[];for(let r=0;r<e;r++)i.push(t.at((r+n)%t.length));return i}function cit(t,e){return e.reduce(([n,i],r)=>t(r)?[[...n,r],i]:[n,[...i,r]],[[],[]])}function*mgi(t,e){for(let n of t)yield e(n)}function fgi(t,e){return t.includes(e)}function ggi(t,e){return fgi(t,e)}function vgi(t,e){return!e.some(n=>!ggi(t,n))}function kte(t,e,n,i,r){if(n<2)return CG(t,e,e-t);let s=gR(t,e,n,i,r);return isNaN(s)?[]:(t=Math.ceil(t/s)*s,e=Math.floor(e/s)*s,CG(t,e,s))}function QJe(t,e,n,i,r,s){let o=s??Math.abs(e-t)/Math.max(n,1),a=0;for(let m of eG){if(o<=m.duration)break;a++}if(a===0){let m=Math.max(gR(t,e,n,i,r),1);return K0i.every(m)}else if(a===eG.length){let m=s==null?gR(t/mR,e/mR,n,i,r):1;return GCe.every(m)}let l=eG[a-1],c=eG[a],{timeInterval:d,step:u}=o-l.duration<c.duration-o?l:c;return d.every(u)}function gR(t,e,n,i=0,r=1/0){if(t===e)return 1;if(n<1)return NaN;let s=Math.abs(e-t),o=10**Math.floor(Math.log10(s/n)),a=NaN,l=1/0,c=!1;for(let d of dit){let u=Math.ceil(s/(d*o)),m=u>=i&&u<=r;if(c&&!m)continue;let f=Math.abs(u-n);(l>f||c!==m)&&(c||(c=m),l=f,a=d)}return a*o}function JJe(t){for(let e=t.length-1;e>=0;e-=1)if(t[e]!=="0")return e+1;return 0}function uit(t,e){let n=iit(e??",f");(n.precision==null||isNaN(n.precision))&&(!n.type||"eEFgGnprs".includes(n.type)?n.precision=Math.max(...t.map(r=>{if(!Number.isFinite(r))return 0;let[s,o]=r.toExponential((n.type?6:12)-1).split(/\.|e/g);return(s!=="1"&&s!=="-1"?1:0)+JJe(o)+1})):"f%".includes(n.type)&&(n.precision=Math.max(...t.map(r=>{if(!Number.isFinite(r)||r===0)return 0;let s=Math.floor(Math.log10(Math.abs(r))),o=n.type?6:12,[a,l]=r.toExponential(o-1).split(/\.|e/g),c=JJe(l);return Math.max(0,c-s)}))));let i=nit(n);return r=>i(Number(r))}function CG(t,e,n){let i=Math.ceil(Math.abs(e-t)/n),r=10**PG(n),s=Math.min(t,e);return ait(i+1,o=>Math.round((s+n*o)*r)/r)}function xG(t,e){return t>=e?(yr.warnOnce("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0):!1}function ygi(t,e){let n=Math.abs(e-t),i=10**Math.floor(Math.log10(n)),r=1/0,s=[t,e];for(let o of dit){let a=o*i,l=Math.floor(t/a)*a,c=Math.ceil(e/a)*a,d=1-n/Math.abs(c-l);r>d&&(r=d,s=[l,c])}return s}function _gi(t,e,n,i,r){r=Math.max(r,t/(i+1)),isNaN(e)&&(e=r),isNaN(n)&&(n=t),e>n&&(e===r?e=n:n=e);let s=Wa(1,Math.floor(t/e),Math.min(Math.floor(t),100)),o=Math.min(s,Math.ceil(t/n)),a=Wa(o,i,s);return{minTickCount:o,maxTickCount:s,tickCount:a}}function Cgi(t,e){return t-e}function mit(t,e){return typeof t=="number"&&typeof e=="number"?t-e:typeof t=="string"&&typeof e=="string"?t.localeCompare(e):t==null&&e==null?0:t==null?-1:e==null?1:String(t).localeCompare(String(e))}function eet(t){return typeof t=="function"?t():t}function fit(t,e,n){for(let i in t){let r=n(eet(t[i]),eet(e[i]));if(r!==0)return r}return 0}function l_(t){return t?tC.document?.[t]:tC.document}function d_(t){return t?tC.window?.[t]:tC.window}function Rm(t,e,n){let i=l_().createElement(t);return typeof e=="object"&&(n=e,e=void 0),e&&i.classList.add(e),n&&Object.assign(i.style,n),i}function hCe(t,e){return l_().createElementNS(t,e)}function vit(t,e){let{body:n}=l_(),i=Rm("a",{display:"none"});i.href=t,i.download=e,n.appendChild(i),i.click(),setTimeout(()=>n.removeChild(i))}function yit(t){tC.document=t}function _it(t){tC.window=t}function fw(t,e){t&&(t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.x}px`,t.style.top=`${e.y}px`)}function Nh(t){return t%=T6,t+=T6,t%=T6,t}function wgi(t){return t%=T6,t+=T6,t!==T6&&(t%=T6),t}function bG(t){return t%=T6,t<-Math.PI?t+=T6:t>=Math.PI&&(t-=T6),t}function hw(t,e,n){let i=Nh(t),r=Nh(e),s=Nh(n);return r<s?r<=i&&i<=s:r>s?r<=i||i<=s:!0}function Rg(t){return t/180*Math.PI}function Sgi(t){return t/Math.PI*180}function Cit(t,e,n){n&&([t,e]=[e,t]);let i=Nh(t);return(Nh(e)+T6-i)%T6}function Ate(t,e){return t=Nh(t),e=Nh(e),e-t+(t>e?2*Math.PI:0)}function Tgi(t,e,n,i){let r=t+n*Math.cos(i),s=e+n*Math.sin(i);return{x:r,y:s}}function aG(t,e,n,i){let r=t-n,s=e-i;return r*r+s*s}function Kee(t,e,n,i,r,s,o){if(n===r&&i===s)return Math.min(o,aG(t,e,n,i));let a=r-n,l=s-i,c=Math.max(0,Math.min(1,((t-n)*a+(e-i)*l)/(a*a+l*l))),d=n+c*a,u=i+c*l;return Math.min(o,aG(t,e,d,u))}function Dgi(t,e,n,i,r,s,o,a,l){a&&([o,s]=[s,o]);let c=Math.atan2(e-i,t-n);if(!hw(c,s,o)){let u=n+Math.cos(s)*r,m=i+Math.sin(s)*r,f=n+Math.cos(s)*r,_=i+Math.sin(s)*r;return Math.min(l,aG(t,e,u,m),aG(t,e,f,_))}let d=r-Math.sqrt(aG(t,e,n,i));return Math.min(l,d*d)}function Igi(t=0,e=0){return new OffscreenCanvas(t,e).getContext("2d")}function Pte(t){let{redraw:e=3,changeCb:n}=t??{};return Ss({redraw:e,type:"font",changeCb:n})}function Agi(t,e,n,i,r,s){if(t.size===0)return!1;let o=t.x,a=t.y;e!=null&&(o-=(e.x-.5)*t.size,a-=(e.y-.5)*t.size);let l=o;o<n?l=n:o>n+r&&(l=n+r);let c=a;a<i?c=i:a>i+s&&(c=i+s);let d=o-l,u=a-c;return Math.sqrt(d*d+u*u)<=t.size*.5}function bit(t,e,n,i,r){let s=t.x+t.width>e&&t.x<e+i,o=t.y+t.height>n&&t.y<n+r;return s&&o}function Pgi(t,e,n,i,r){return e+i<t.x+t.width&&e>t.x&&n>t.y&&n+r<t.y+t.height}function Rgi(t){return t!=null&&typeof t.point=="object"&&typeof t.label=="object"}function Lgi(t,e,n=5){let i=[];t=t.map(r=>r.slice().sort((s,o)=>o.point.size-s.point.size));for(let r=0;r<t.length;r++){let s=i[r]=[],o=t[r];if(o?.length&&o[0].label)for(let a=0,l=o.length;a<l;a++){let c=o[a],{point:d,label:u,marker:m}=c,{text:f,width:_,height:x}=u,D=d.size*.5,E=0,M=0;if(D>0&&c.placement!=null){let X=Fgi[c.placement];E=(_*.5+D+n)*X.x,M=(x*.5+D+n)*X.y}let I=d.x-_*.5+E-((m?.center.x??.5)-.5)*d.size,z=d.y-x*.5+M-((m?.center.y??.5)-.5)*d.size;!(!e||Pgi(e,I,z,_,x))||t.some(X=>X.some(ne=>Agi(ne.point,ne.marker?.center,I,z,_,x)))||i.some(X=>X.some(ne=>bit(ne,I,z,_,x)))||s.push({index:a,text:f,x:I,y:z,width:_,height:x,datum:c})}}return i}function Ogi(t,e){let n=[];for(let i=0;i<t.length;i++){let r=t[i],{point:{x:s,y:o},label:{text:a}}=r,{width:l,height:c}=r.label;if(l+=e??0,c+=e??0,n.some(d=>bit(d,s,o,l,c)))return!0;n.push({index:i,text:a,x:s,y:o,width:l,height:c,datum:r})}return!1}function wit(t,e){return t.length===e.length&&t.every((n,i)=>Number(n)===Number(e[i]))}function m1(t,e){let n=sp(t)?t:t.split(".");if(n.length===1){let[i]=n;return Ux((r,s,o)=>r[i]=o,r=>r[i],e)}return Ux((i,r,s)=>qCe(i,n,s),i=>KCe(i,n),e)}function Ngi(t){return Ux((e,n,i)=>e[t]=i)}function z0(t,e){return Ux((n,i,r)=>n[t][e??i]=r)}function Fg(t){let{newValue:e,oldValue:n,changeValue:i}=t;return Ux((r,s,o,a)=>(o!==a&&(a!==void 0&&n?.call(r,a),o!==void 0&&e?.call(r,o),i?.call(r,o,a)),o))}function Lg(t){return M2i(t)}function TE(t,e,n){n===void 0||n===""?t?.removeAttribute(e):t?.setAttribute(e,n.toString())}function tG(t,e,n){t.ariaHidden=`${n}`,t.classList.toggle(e,n)}function Sit(t,e,n,i){let{top:r,right:s,bottom:o,left:a,width:l,height:c}=i;return a!=null?l!=null?s=n.width-a+l:s!=null&&(l=n.width-a-s):s!=null&&l!=null&&(a=n.width-s-l),r!=null?c!=null?o=n.height-r-c:o!=null&&(c=n.height-o-r):o!=null&&c!=null&&(r=n.height-o-c),l==null?c==null?(l=t,c=e):l=Math.ceil(t*c/e):c==null&&(c=Math.ceil(e*l/t)),a==null&&(s==null?a=Math.floor((n.width-l)/2):a=n.width-s-l),r==null&&(o==null?r=Math.floor((n.height-c)/2):r=n.height-c-o),{x:a,y:r,width:l,height:c}}function Bgi(t){let e=(n,i,r)=>i===0||r[i-1]!=="."?". ":" ";return t.replace(/<br\s*\/?>/g,e).replace(/<\/p\s+>/g,e).replace(/<\/li\s*>/g,e).replace(/<[^<>]+>/g,"").replace(/\n+/g," ").replace(/\s+/g," ")}function vR(t,e){if(typeof t=="string")return{html:t,ariaLabel:t};let{content:n=e?.content??"",title:i=e?.title,color:r=e?.color??"white",backgroundColor:s=e?.backgroundColor??"#888"}=t,o=i?`<div class="${Z5}-title"
        style="color: ${r}; background-color: ${s}">${i}</div>`:"",a=i?`${i}: `:"",l=n?`<div class="${Z5}-content">${n}</div>`:"";return{html:`${o}${l}`,ariaLabel:Bgi(`${a}${n}`)}}function rte(t){let{parallelFlipRotation:e=0,regularFlipRotation:n=0}=t,i=t.rotation?Nh(Rg(t.rotation)):0,r=!i&&e>=0&&e<=Math.PI?-1:1,s=!i&&n>=0&&n<=Math.PI?-1:1,o=0;return t.parallel?o=r*Math.PI/2:s===-1&&(o=Math.PI),{configuredRotation:i,defaultRotation:o,parallelFlipFlag:r,regularFlipFlag:s}}function zgi(t,e){return isNaN(t)?e?0:10:t}function Hgi(t,e,n,i){return t&&!e?n*i===-1?"hanging":"bottom":"middle"}function L5e(t,e,n,i,r){let s=e>0&&e<=Math.PI,o=n>0&&n<=Math.PI,a=s||o?-1:1;if(t)if(e||n){if(i*a===-1)return"end"}else return"center";else if(i*r===-1)return"end";return"start"}function Ggi(t,e,n){let{x:i,y:r,width:s,height:o}=e,a=new Os(i,r,0,0);n.transformBBox(a,e);let{x:l,y:c}=e;return{point:{x:l,y:c},label:{text:t,width:s,height:o}}}function Eit(t){return t!=null&&Object.hasOwn(t,"toString")&&E3(t.toString())}function Mit(t){return t!=null&&Object.hasOwn(t,"valueOf")&&Tc(t.valueOf())}function Rte(t){return Tc(t)||FG(t)||Mit(t)}function pCe(t,e){return t!=null&&(!e||Rte(t))}function dR(t){return Eit(t)&&Object.hasOwn(t,"id")?t.id:t}function mCe({yDirection:t,padding:e=0,position:n="top",bbox:i}){let r=t?Wgi:Ugi,{xTranslationDirection:s,yTranslationDirection:o}=r[n],a=t?i.width:i.height,l=t?i.height:i.width,c=s*(e+a/2),d=o*(e+l/2);return{xTranslation:c,yTranslation:d}}function Iit({yDirection:t,bbox:e,padding:n=0,position:i="top"}){let r={};return i.startsWith("inside")||(i==="top"&&!t?r.top=n+e.height:i==="bottom"&&!t?r.bottom=n+e.height:i==="left"&&t?r.left=n+e.width:i==="right"&&t&&(r.right=n+e.width)),r}function Tw(t,e=[void 0]){return Ux((n,i,r)=>e.includes(r)?jx(t)?t(r):t:r)}function fCe(t){let[e,n]=N4(t.range),i=Math.floor(e),r=Math.ceil(n);return{min:i,max:r,visible:i!==r}}function Zgi(t,e){return Math.abs(e-t)<qgi?e:t>e?e+gCe:e-gCe}function Fit(t){let e=(o,a)=>{let[l=t.min,c=t.max]=N4(a??[]);return o<l||o>c};return{tick:{fromFn(o,a,l){let c=o.y1+o.translationY,d=o.opacity;return(l==="added"||e(o.datum.translationY,o.datum.range))&&(c=a.translationY,d=0),{y:0,translationY:c,opacity:d,phase:Pg[l]}},toFn(o,a,l){let c=a.translationY,d=1;return l==="removed"&&(d=0),{y:0,translationY:c,opacity:d,finish:{y:c,translationY:0}}},intermediateFn(o,a,l){return{visible:!e(o.y)}}},line:{fromFn(o,a){return St(ve({},o.previousDatum??a),{phase:Pg.updated})},toFn(o,a){return ve({},a)}},label:{fromFn(o,a,l){let c=o.previousDatum??a,d=c.x,u=c.y,m=c.rotationCenterX,f=Math.round(o.translationY),_=c.rotation,x=o.opacity;return l==="removed"||e(c.y,c.range)?_=a.rotation:(l==="added"||e(o.datum.y,o.datum.range))&&(f=Math.round(c.translationY),x=0,_=a.rotation),{x:d,y:u,rotationCenterX:m,translationY:f,rotation:_,opacity:x,phase:Pg[l]}},toFn(o,a,l){let c=a.x,d=a.y,u=a.rotationCenterX,m=Math.round(a.translationY),f=0,_=1;return l==="added"?(_=1,f=a.rotation):l==="removed"?(_=0,f=a.rotation):f=Zgi(o.previousDatum?.rotation??a.rotation,a.rotation),{x:c,y:d,rotationCenterX:u,translationY:m,rotation:f,opacity:_,finish:{rotation:a.rotation}}}},group:{fromFn(o,a){let{rotation:l,translationX:c,translationY:d}=o;return{rotation:l,translationX:c,translationY:d,phase:Pg.updated}},toFn(o,a){let{rotation:l,translationX:c,translationY:d}=a;return{rotation:l,translationX:c,translationY:d}}}}}function Lit(){return(t,e)=>({rotation:e.rotation,rotationCenterX:e.rotationCenterX,rotationCenterY:e.rotationCenterY,translationX:e.translationX,translationY:e.translationY})}function Oit(t){let{visible:e,min:n,max:i}=t;return(r,s)=>{let o=s.translationY,a=e&&o>=n&&o<=i;return{y:o,translationY:0,opacity:1,visible:a}}}function Nit(){return(t,e)=>({x:e.x,y:e.y,translationY:e.translationY,rotation:e.rotation,rotationCenterX:e.rotationCenterX})}function Vit(){return(t,e)=>ve({},e)}function Xgi(t,e=!0){let n=new Hit,i=0;return e&&t.forEach(r=>i=Math.max(i,r.labels.length)),t.forEach(r=>{if(e)for(;r.labels.length<i;)r.labels.unshift("");Qgi(n,r)}),n}function Qgi(t,e){let n=e.labels.slice().reverse(),i=n.length-1;n.forEach((r,s)=>{let o=t.children,a=o.find(c=>c.label===r),l=s!==i;if(a&&l)t=a;else{let c=new Hit(r,t);c.number=o.length,o.push(c),l&&(t=c)}})}function Jgi(t,e,n){let i=e.number-t.number,r=n/i;e.change-=r,e.shift+=n,t.change+=r,e.prelim+=n,e.mod+=n}function e3i(t,e,n){return e.getSiblings().indexOf(t.ancestor)>=0?t.ancestor:n}function t3i(t){let e=t.children;if(e){let n=0,i=0;for(let r=e.length-1;r>=0;r--){let s=e[r];s.prelim+=n,s.mod+=n,i+=s.change,n+=s.shift+i}}}function i3i(t,e,n){let i=t.getLeftSibling();if(i){let r=t,s=t,o=i,a=s.getLeftmostSibling(),l=s.mod,c=r.mod,d=o.mod,u=a.mod;for(;o.nextRight()&&s.nextLeft();){o=o.nextRight(),s=s.nextLeft(),a=a.nextLeft(),r=r.nextRight(),r.ancestor=t;let m=o.prelim+d-(s.prelim+l)+n;m>0&&(Jgi(e3i(o,t,e),t,m),l+=m,c+=m),d+=o.mod,l+=s.mod,u+=a.mod,c+=r.mod}o.nextRight()&&!r.nextRight()?(r.thread=o.nextRight(),r.mod+=d-c):(s.nextLeft()&&!a.nextLeft()&&(a.thread=s.nextLeft(),a.mod+=l-u),e=t)}return e}function Git(t,e){let n=t.children;if(n.length){let i=n[0];n.forEach(o=>{Git(o,e),i=i3i(o,i,e)}),t3i(t);let r=(n[0].prelim+n.at(-1).prelim)/2,s=t.getLeftSibling();s?(t.prelim=s.prelim+e,t.mod=t.prelim-r):t.prelim=r}else{let i=t.getLeftSibling();t.prelim=i?i.prelim+e:0}}function Wit(t,e,n){t.x=t.prelim+e,t.y=t.depth,n.update(t),t.children.forEach(i=>Wit(i,e+t.mod,n))}function Uit(t){let e=t.children,n=0;e.forEach(i=>{Uit(i),i.children.length?n+=i.leafCount:n++}),t.leafCount=n,e.length?(t.subtreeLeft=e[0].subtreeLeft,t.subtreeRight=e[t.children.length-1].subtreeRight,t.x=(t.subtreeLeft+t.subtreeRight)/2):(t.subtreeLeft=t.x,t.subtreeRight=t.x)}function n3i(t){let e=new r3i;return Git(t,1),Wit(t,-t.prelim,e),Uit(t),e}function s3i(t){return new Promise(e=>{setTimeout(()=>e(void 0),t)})}function Yit(t){return qit((e,n)=>requestAnimationFrame(e),t)}function a3i(t){return qit((e,n=0)=>setTimeout(e,n),t)}function qit(t,e){let n=0,i=!1,r,s,o=()=>i,a=()=>{i=!1,s?.(),s=void 0,r=void 0,n>0&&t(l)},l=()=>{let d=n;n=0,i=!0;let u=e({count:d});if(!u){a();return}u.then(a,a)};return{schedule(d){n===0&&!o()&&t(l,d),n++},await(){return O(this,null,function*(){if(o())for(r==null&&(r=new Promise(d=>{s=d}));o();)yield r})}}}function c3i(){if(typeof navigator>"u")return!1;let t=navigator.userAgent.match(/\(iPhone; CPU iPhone OS (\d+_\d+_\d+) like Mac OS X\)/);if(t==null)return!1;let[e,n]=t[1].split("_").map(Number);return e<16||e===16&&n<6}function uet(t,e,n,i,r={},s=Os.zero){if(!bu.check("scene:stats","scene:stats:verbose"))return;let{layersRendered:o=0,layersSkipped:a=0,nodesRendered:l=0,nodesSkipped:c=0}=i??{},d=performance.now(),A=e,{start:u}=A,m=al(A,["start"]),f=Object.entries(m).map(([Y,X])=>pet(Y,X)).filter(Y=>Y!=null).join(" + "),_=Object.entries(r).map(([Y,X])=>`${Y}: ${X}`).join(" ; "),x=bu.check("scene:stats:verbose"),D=[`${pet("\u23F1\uFE0F",u,d)} (${f})`,`${_}`,`Layers: ${x?het(o,a):t.size}`,x?`Nodes: ${het(l,c)}`:null].filter(E3),E=new l8e(Y=>n.measureText(Y)),M=new Map(D.map(Y=>[Y,E.measureLines(Y)])),I=Math.max(...Array.from(M.values(),Y=>Y.width)),z=h3i(M.values(),Y=>Y.height);n.save(),n.fillStyle="white",n.fillRect(0,0,I,z),n.fillStyle="black";let G=0;for(let[Y,X]of M.entries())G+=X.height,n.fillText(Y,2+s.x,G);n.restore()}function u3i(t,e){t.save();for(let[n,i]of Object.entries(e)){let r=i.computeTransformedBBox();if(!r){yr.log(`Scene.render() - no bbox for debugged node [${n}].`);continue}t.globalAlpha=.8,t.strokeStyle="red",t.lineWidth=1,t.strokeRect(r.x,r.y,r.width,r.height),t.fillStyle="red",t.strokeStyle="white",t.font="16px sans-serif",t.textBaseline="top",t.textAlign="left",t.lineWidth=2,t.strokeText(n,r.x,r.y,r.width),t.fillText(n,r.x,r.y,r.width)}t.restore()}function qee(t){return bu.check(!0,"scene")?ve(ve({node:t,name:t.name??t.id,dirty:mw[t.dirty]},t.parent?.isVirtual?{virtualParentDirty:mw[t.parent.dirty],virtualParent:t.parent}:{}),t.children.map(e=>qee(e)).reduce((e,n)=>{let{name:i}=n,{node:{visible:r,opacity:s,zIndex:o,zIndexSubOrder:a,translationX:l,translationY:c,rotation:d,scalingX:u,scalingY:m},node:f,virtualParent:_}=n;(!r||s<=0)&&(i=`(${i})`),f instanceof xo&&f.isLayer()&&(i=`*${i}*`);let x=[`${i??"<unknown>"}`,`z: ${o}`,a&&`zo: ${a.map(M=>typeof M=="function"?`${M()} (fn)`:M).join(" / ")}`,_&&"(virtual parent)",l&&`x: ${l}`,c&&`y: ${c}`,d&&`r: ${d}`,u!==1&&`sx: ${u}`,m!==1&&`sy: ${m}`].filter(M=>!!M).join(" "),D=x,E=1;for(;e[D]!=null&&E<100;)D=`${x} (${E++})`;return e[D]=n,e},{})):{}}function Jit(t){if(t.dirty===0)return{dirtyTree:{},paths:[]};let e=t.children.map(r=>Jit(r)).filter(r=>r.paths.length>0),n=xo.is(t)?t.name??t.id:t.id,i=e.length?e.flatMap(r=>r.paths).map(r=>`${n}.${r}`):[n];return{dirtyTree:ve({name:n,node:t,dirty:mw[t.dirty]},e.map(r=>r.dirtyTree).filter(r=>r.dirty!=null).reduce((r,s)=>(r[s.name??"<unknown>"]=s,r),{})),paths:i}}function het(t,e){let n=t+e;return`${t} / ${n} (${Math.round(100*t/n)}%)`}function pet(t,e,n){let i=n!=null?n-e:e;return`${t}: ${Math.round(i*100)/100}ms`}function h3i(t,e){let n=0;for(let i of t)n+=e(i);return n}function x3i(t,e){if(typeof IntersectionObserver>"u")return;let n=new IntersectionObserver(i=>{for(let r of i)r.target===t&&e(r.intersectionRatio)},{root:t});return n.observe(t),n}function b3i(t,e){let n=-e/t;return t!==0&&n>=0&&n<=1?[n]:[]}function w3i(t,e,n){if(t===0)return b3i(e,n);let i=e*e-4*t*n,r=[];if(i===0){let s=-e/(2*t);s>=0&&s<=1&&r.push(s)}else if(i>0){let s=Math.sqrt(i),o=(-e-s)/(2*t),a=(-e+s)/(2*t);o>=0&&o<=1&&r.push(o),a>=0&&a<=1&&r.push(a)}return r}function S3i(t,e,n,i){if(t===0)return w3i(e,n,i);let r=e/t,s=n/t,o=i/t,a=(3*s-r*r)/9,l=(9*r*s-27*o-2*r*r*r)/54,c=a*a*a+l*l,d=1/3,u=[];if(c>=0){let m=Math.sqrt(c),f=Math.sign(l+m)*Math.pow(Math.abs(l+m),d),_=Math.sign(l-m)*Math.pow(Math.abs(l-m),d),x=Math.abs(Math.sqrt(3)*(f-_)/2),D=-d*r+(f+_);if(D>=0&&D<=1&&u.push(D),x===0){let E=-d*r-(f+_)/2;E>=0&&E<=1&&u.push(E)}}else{let m=Math.acos(l/Math.sqrt(-a*a*a)),f=d*r,_=2*Math.sqrt(-a),x=_*Math.cos(d*m)-f,D=_*Math.cos(d*(m+2*Math.PI))-f,E=_*Math.cos(d*(m+4*Math.PI))-f;x>=0&&x<=1&&u.push(x),D>=0&&D<=1&&u.push(D),E>=0&&E<=1&&u.push(E)}return u}function sR(t,e,n,i,r,s,o,a){let l=(n-t)*(a-s)-(i-e)*(o-r);if(l===0)return 0;let c=((o-r)*(e-s)-(t-r)*(a-s))/l,d=((n-t)*(e-s)-(i-e)*(t-r))/l;return c>=0&&c<=1&&d>=0&&d<=1?1:0}function T3i(t,e,n,i,r,s,o,a,l,c,d,u){let m=0,f=c-u,_=d-l,x=l*(u-c)-c*(d-l),D=met(t,n,r,o),E=met(e,i,s,a),M=f*D[0]+_*E[0],I=f*D[1]+_*E[1],z=f*D[2]+_*E[2],G=f*D[3]+_*E[3]+x,A=S3i(M,I,z,G);for(let Y of A){let X=Y*Y,ne=Y*X,pe=D[0]*ne+D[1]*X+D[2]*Y+D[3],ce=E[0]*ne+E[1]*X+E[2]*Y+E[3],ie;l===d?ie=(ce-c)/(u-c):ie=(pe-l)/(d-l),ie>=0&&ie<=1&&m++}return m}function met(t,e,n,i){return[-t+3*e-3*n+i,3*t-6*e+3*n,-3*t+3*e,t]}function nnt(t,e,n,i,r,s,o,a,l,c){if(isNaN(t)||isNaN(e))return 0;s&&([r,i]=[i,r]);let d=(c-a)/(l-o),u=a-d*o,m=Math.pow(d,2)+1,f=2*(d*(u-e)-t),_=Math.pow(t,2)+Math.pow(u-e,2)-Math.pow(n,2),x=Math.pow(f,2)-4*m*_;if(x<0)return 0;let D=(-f+Math.sqrt(x))/2/m,E=(-f-Math.sqrt(x))/2/m,M=0;return[D,E].forEach(I=>{if(!(I>=Math.min(o,l)&&I<=Math.max(o,l)))return;let G=d*I+u,A=I-t,Y=G-e,X=Math.atan2(Y,A);hw(X,i,r)&&M++}),M}function va(t){let{redraw:e=3,changeCb:n,convertor:i}=t??{};return Ss({redraw:e,type:"path",convertor:i,changeCb:n})}function V5e(t,e){return e.params?.type===t}function k3i(t){if(t==="button")return Rm("button");if(t==="slider")return Rm("input");if(t==="toolbar"||t==="group")return Rm("div");if(t==="text")return new M3i;throw Error("AG Charts - error allocating meta")}function fet(t){let e={params:t,result:void 0};return e.result=k3i(e.params.type),e}function SG(t){let e=St(ve({},t),{preventDefault(){e.sourceEvent?.preventDefault()}});return e}function nG(t,e){t.dispatchWrapHandlers(e.type,(n,i)=>n(i),SG(e))}function F3i(t){return g8e.includes(t)}function L3i(t){return A3i.includes(t)}function O3i(t){return P3i.includes(t)}function _et(t){return t==null?!0:!isNaN(t)&&t>=0&&t<=2}function V3i(t,e){let n=t.screenX-e.screenX,i=t.screenY-e.screenY;return n*n+i*i}function Cet(t,e){return Math.sqrt(V3i(t,e))}function bet(t,e,n,i,r=16){return t?.addListener(n,s=>{e.getState()&r&&i(s)})??(()=>{})}function Tet(t){return["floating-top","floating-bottom"].includes(t)}function j3i(t){return t.map(e=>D3(e)?JSON.stringify(e):e).join("-")}function $3i(t){return Number.isInteger(t)?t:Math.abs(t)>1e4?Math.trunc(t):Math.round(t*1e4)/1e4}function K3i(t){if(t==null)return[];let[e,n]=t.map(Number);return e===0&&n===0?[0,1]:e===1/0&&n===-1/0?[]:(e===1/0?e=0:n===-1/0&&(n=0),Tc(e)&&Tc(n)?[e,n]:[])}function M3(t,e){let n=K3i(t);if(n.length===0)return n;let[i,r]=n;if(i===r){let[s,o]=e?.calculatePadding(i,r)??[1,1];i-=s,r+=o}return[i,r]}function v8e(t,e){return e?.get(t.id)??0}function Dnt(t){let e=[],n=0,i,r=/((?:(?:^|\.)\s*\w+|\[\s*(?:'(?:[^']|\\')*'|"(?:[^"]|\\")*"|-?\d+)\s*\])\s*)/g;for(;i=r.exec(t);){if(i.index!==n)return;n=i.index+i[0].length;let s=i[1].trim();if(s.startsWith("."))e.push(s.slice(1).trim());else if(s.startsWith("[")){let o=s.slice(1,-1).trim();o.startsWith("'")?e.push(o.slice(1,-1).replace(new RegExp("(?<!\\\\)\\\\'","g"),"'")):o.startsWith('"')?e.push(o.slice(1,-1).replace(new RegExp('(?<!\\\\)\\\\"',"g"),'"')):e.push(o)}else e.push(s)}if(n===t.length)return e}function Y3i(t){return e=>{let n=e;for(let i of t)n=n[i];return n}}function q3i(t){let e=(n,i)=>{i.length>0&&(yr.log(`DataModel.processData() - ${n}`),yr.table(i))};if(yr.log("DataModel.processData() - processedData",t),e("Key Domains",t.domain.keys),e("Group Domains",t.domain.groups??[]),e("Value Domains",t.domain.values),e("Aggregate Domains",t.domain.aggValues??[]),t.type==="grouped"){let n=t.data.reduce((i,r)=>{let s=r.keys??[],o=r.aggValues??[],a=r.keys.map(()=>{}),l=o?.map(()=>{});return i.push(...r.values.map((c,d)=>[...d===0?s:a,...c??[],...d==0?o:l])),i},[]);e("Values",n)}else{let n=t.data.reduce((i,r)=>{let s=r.aggValues??[];return i.push([...r.keys,...r.values,...s]),i},[]);e("Values",n)}}function Q3i(t){return RR.some(e=>e.type==="series"&&e.identifier===t)}function UG(t){return RR.find(e=>e.type==="series"&&e.identifier===t)?.chartTypes}function J3i(t){return UG(t)?.find(n=>n==="cartesian")==="cartesian"}function e4i(t){return UG(t)?.find(n=>n==="polar")==="polar"}function t4i(t){return UG(t)?.find(n=>n==="hierarchy")==="hierarchy"}function i4i(t){return UG(t)?.find(n=>n==="topology")==="topology"}function n4i(t){return UG(t)?.find(n=>n==="flow-proportion")==="flow-proportion"}function r4i(t){return t.packageType==="enterprise"}function s4i(t){if(!r4i(t))throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");let e=RR.find(n=>n.type===t.type&&n.optionsKey===t.optionsKey&&n.identifier===t.identifier&&t.chartTypes.every(i=>n.chartTypes.includes(i)));return e&&(e.useCount??(e.useCount=0),e.useCount++),e!=null}function o4i(){return RR.filter(({useCount:t})=>t==null||t===0)}function h4i(t){return typeof t=="string"&&Pnt.includes(t)}function p4i(t){let e=[],n=[],i=[...Pnt];for(let r of t)r instanceof AR&&(h4i(r.position)?n.push(r.position):e.push(r));for(let r of e){let s;do s=i.pop();while(s&&n.includes(s));if(s==null)break;r.position=s}}function f4i(t,e,n){let i=(d,u,m)=>{let f=[d];for(let _ of m4i)_ in u&&u[_]!=null&&f.push(`${_}=${u[_]}`);return m?.seriesGrouping&&f.push(`seriesGrouping.groupId=${m?.seriesGrouping.groupId}`),f.join(";")},r=new Map,s=0;for(let d of t){let u=i(d.type,d.properties,n?.[s]);r.has(u)||r.set(u,[]),r.get(u)?.push([d,s++])}let o=new Map;for(let d of e){let u=i(d.type,d,d);o.has(u)||o.set(u,[]),o.get(u)?.push(d)}if(![...r.keys()].some(d=>o.has(d)))return{status:"no-overlap",oldKeys:r.keys(),newKeys:o.keys()};let l=[],c=-1;for(let[d,u]of o.entries())for(let m of u){c++;let f=r.get(d);if(f==null||f.length<1){l.push({opts:m,idx:c,status:"add"}),r.delete(d);continue}let[_,x]=f.shift(),D=n?.[x]??{},E=V4(D,m??{}),{groupIndex:M,stackIndex:I}=E?.seriesGrouping??{};M!=null||I!=null?l.push({opts:m,series:_,diff:E,idx:x,status:"series-grouping"}):E?l.push({opts:m,series:_,diff:E,idx:x,status:"update"}):l.push({opts:m,series:_,idx:x,status:"no-op"}),f.length===0&&r.delete(d)}for(let d of r.values())for(let[u,m]of d)l.push({series:u,idx:m,status:"remove"});return{status:"overlap",changes:l}}function AE(t){return t.series?.[0]?.type??"line"}function vE(t){let e=AE(t);return e==null?!0:e==="cartesian"?(yr.warnOnce(`type '${e}' is deprecated, use a series type instead`),!0):p1.isCartesian(e)||J3i(e)}function Nte(t){let e=AE(t);return e==null?!1:e==="polar"?(yr.warnOnce(`type '${e}' is deprecated, use a series type instead`),!0):p1.isPolar(e)||e4i(e)}function x8e(t){let e=AE(t);return e==null?!1:e==="hierarchy"?(yr.warnOnce(`type '${e}' is deprecated, use a series type instead`),!0):p1.isHierarchy(e)||t4i(e)}function b8e(t){let e=AE(t);return e==null?!1:e==="topology"?(yr.warnOnce(`type '${e}' is deprecated, use a series type instead`),!0):p1.isTopology(e)||i4i(e)}function w8e(t){let e=AE(t);return e==null?!1:e==="flow-proportion"?(yr.warnOnce(`type '${e}' is deprecated, use a series type instead`),!0):p1.isFlowProportion(e)||n4i(e)}function g4i(t){let e=AE(t);return Nte(t)&&e!=="pie"&&e!=="donut"}function v4i(t){return t==null?!1:p1.has(t)}function y4i(t){return t==null?!1:Hx.has(t)}function C4i(t,e){let{animationDuration:n}=_G.add,i=n*e,r=Rm("div",`${bCe}--loading`,{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",height:"100%",boxSizing:"border-box",font:"13px Verdana, sans-serif",userSelect:"none",animation:`ag-charts-loading ${i}ms linear 50ms both`}),s=Rm("span",{width:"45px",height:"40px",backgroundImage:["linear-gradient(#0000 calc(1 * 100% / 6), #ccc 0 calc(3 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(2 * 100% / 6), #ccc 0 calc(4 * 100% / 6), #0000 0), ","linear-gradient(#0000 calc(3 * 100% / 6), #ccc 0 calc(5 * 100% / 6), #0000 0)"].join(""),backgroundSize:"10px 400%",backgroundRepeat:"no-repeat",animation:"ag-charts-loading-matrix 1s infinite linear"}),o=Rm("p",{marginTop:"1em"});o.innerText=t;let a=Rm("div",`${bCe}__loading-background`,{position:"absolute",inset:"0",opacity:"0.5",zIndex:"-1"}),l=Rm("style");return l.innerText=["@keyframes ag-charts-loading { from { opacity: 0 } to { opacity: 1 } }","@keyframes ag-charts-loading-matrix {","0% { background-position: 0% 0%, 50% 0%, 100% 0%; }","100% { background-position: 0% 100%, 50% 100%, 100% 100%; }","}"].join(" "),r.replaceChildren(l,s,o,a),r}function Vte(t,e=[0,0]){for(let n of t)typeof n=="number"&&(n<0&&(e[0]+=n),n>0&&(e[1]+=n));return e}function x4i(t,e){return{id:t,matchGroupIds:[e],type:"aggregate",aggregateFunction:i=>Vte(i)}}function Rnt(t,e){return{id:t,type:"aggregate",matchGroupIds:e?[e]:void 0,aggregateFunction:n=>Vte(n),groupAggregateFunction:(n,i=[0,0])=>(i[0]+=n?.[0]??0,i[1]+=n?.[1]??0,i)}}function Fnt(t,e){return{id:t,matchGroupIds:[e],type:"aggregate",aggregateFunction:i=>nR.extendDomain(i)}}function wCe(t){return{id:t,type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(e,n=[0,0])=>(n[0]+=e?.[0]??0,n[1]+=e?.[1]??0,n)}}function Lnt(t,e){return{id:t,matchGroupIds:e?[e]:void 0,type:"aggregate",aggregateFunction:i=>Vte(i),groupAggregateFunction:(i,r=[0,0,-1])=>(r[0]+=i?.[0]??0,r[1]+=i?.[1]??0,r[2]++,r),finalFunction:(i=[0,0,0])=>{let r=i[0]+i[1];return r>=0?[0,r/i[2]]:[r/i[2],0]}}}function SCe(t,e,n){let i={id:t,matchGroupIds:n?[n]:void 0,type:"aggregate",aggregateFunction:(r,s=[])=>{let o=s[1]-s[0];return e.aggregateFunction(r).map(a=>a/o)}};return e.groupAggregateFunction&&(i.groupAggregateFunction=e.groupAggregateFunction),i}function Ont(t){return()=>{let e=0;return n=>Tc(n)?(e+=t?Math.max(0,n):n,e):n}}function Nnt(){return()=>{let t=0;return e=>{if(!Tc(e))return e;let n=t;return t+=e,n}}}function ote(t,e){let n=JSON.stringify(t,null,0);return KH.has(e)||KH.set(e,new Map),KH.get(e)?.has(n)||KH.get(e)?.set(n,e(t)),KH.get(e)?.get(n)}function b4i({normaliseTo:t,mode:e}){let n=(i,r)=>{let s=i*t/r;return s>=0?Math.min(t,s):Math.max(-t,s)};return()=>()=>(i,r)=>{let s=[0,0];for(let a of r){let l=i[a],c=typeof l=="number"?l:Math.max(...l),d=c<0?0:1;e==="sum"?s[d]+=c:d===0?s[d]=Math.min(s[d],c):s[d]=Math.max(s[d],c)}let o=Math.max(Math.abs(s[0]),s[1]);for(let a of r){let l=i[a];i[a]=typeof l=="number"?n(l,o):l.map(c=>n(c,o))}}}function Bte(t,e,n="sum"){return{type:"group-value-processor",matchGroupIds:t,adjust:ote({normaliseTo:e,mode:n},b4i)}}function w4i({normaliseTo:t,zeroDomain:e,rangeMin:n,rangeMax:i}){let r=t[1]-t[0],s=(o,a,l)=>{let c=t[0]+(o-a)/l*r;return l===0?e:c>=t[1]?t[1]:c<t[0]?t[0]:c};return()=>(o,a)=>{let[l,c]=o.domain.values[a];n!=null&&(l=n),i!=null&&(c=i);let d=c-l;o.domain.values[a]=[t[0],t[1]];for(let u of o.data){let m=u.values;o.type==="ungrouped"&&(m=[m]);for(let f of m)f[a]=s(f[a],l,d)}}}function yE(t,e,n,i,r){return{type:"property-value-processor",property:t,adjust:ote({normaliseTo:e,rangeMin:i,rangeMax:r,zeroDomain:n},w4i)}}function FR(t){return{type:"processor",property:"animationValidation",calculate(e){let{keys:n,values:i}=e.defs,{input:r,data:s}=e,o=!0,a=!0,l=[];for(let d=0;d<i.length;d++)t?.includes(i[d].id)&&l.push([d,i[d]]);let c=(d,u,m)=>{if(u.valueType==="category"){let _=e.domain[m][d];o&&(o=_.length===r.count);return}let f=s[0]?.[m][d];for(let _=1;(o||a)&&_<s.length;_++){let x=s[_][m][d];a&&(a=f<=x),o&&(o=f!==x),f=x}};for(let d=0;(o||a)&&d<n.length;d++)c(d,n[d],"keys");for(let d=0;(o||a)&&d<l.length;d++){let[u,m]=l[d];c(u,m,"values")}return{uniqueKeys:o,orderedKeys:a}}}}function S4i({mode:t,separateNegative:e}){return()=>()=>(n,i)=>{let r=[0,0];for(let s of i){let o=n[s],a=AG(o)&&e?0:1;Tc(o)&&(t==="normal"&&(r[a]+=o),n[s]=r[a],t==="trailing"&&(r[a]+=o))}}}function T4i({mode:t,sum:e}){return()=>{let n=[],i=!0;return()=>(r,s)=>{let o=0;for(let a of s){let l=r[a],c=i&&e==="current"?0:n[a];n[a]=l;let d=e==="current"?l:c;if(!Tc(l)||!Tc(c)){r[a]=o;continue}t==="normal"&&(o+=d),r[a]=o,t==="trailing"&&(o+=d)}i=!1}}}function Hnt(t,e,n,i=!1){let r;if(e.startsWith("window")){let s=e.endsWith("-trailing")?"trailing":"normal";r=ote({mode:s,sum:n},T4i)}else r=ote({mode:e,separateNegative:i},S4i);return{type:"group-value-processor",matchGroupIds:[t],adjust:r}}function D4i(){return()=>(t,e)=>{let n=new Float64Array(32),i=0;for(let r of e){let s=t[r];n[i]=Number.isFinite(s)?s:NaN,i+=1,t[r]=n.subarray(0,i)}}}function Gnt(t){return{type:"group-value-processor",matchGroupIds:[t],adjust:D4i}}function PE(t,e=!0){return{type:"processor",property:"diff",calculate:n=>{let i=new Map,r=new Map,s=new Map,o=new Map,a=Math.max(t.data.length,n.data.length);for(let c=0;c<a;c++){let d=t.data[c],u=n.data[c],m=d?Gx(d.keys):"",f=u?Gx(u.keys):"";if(u&&d&&m===f){gE(d.values,u.values)||s.set(f,u);continue}o.has(f)?((e||!gE(o.get(f).values,u.values))&&(s.set(f,u),i.set(f,u)),o.delete(f)):u&&r.set(f,u),r.has(m)?((e||!gE(r.get(m).values,d.values))&&(s.set(m,d),i.set(m,d)),r.delete(m)):d&&(s.delete(m),o.set(m,d))}return{changed:r.size>0||s.size>0||o.size>0,added:r,updated:s,removed:o,moved:i}}}}function Gx(t,...e){let n;return sp(t)?n=t.map(r=>dR(r)).join("___"):n=dR(t),(typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n instanceof Date)&&e.length>0&&(n+=`___${e.join("___")}`),n}function S8e(t){return t!=null&&Rte(t)}function E4i(t){return t!=null}function Unt(t){switch(t){case"number":case"log":case"ordinal-time":case"time":case"color":return S8e;default:return E4i}}function jnt(t){switch(t){case"number":case"log":case"time":case"color":return"range";default:return"category"}}function B0(t,e,n={}){return ve({property:t,type:"key",valueType:jnt(e),validation:Unt(e)},n)}function Qc(t,e,n={}){return ve({property:t,type:"value",valueType:jnt(e),validation:Unt(e)},n)}function T8e(t,e={}){let s=e,{min:n=-1/0,max:i=1/0}=s,r=al(s,["min","max"]);return ve({type:"value",property:t,valueType:"range",validation:S8e,processor:()=>o=>Tc(o)?Wa(n,o,i):o},r)}function TG(t,e,n={}){let o=n,{onlyPositive:i}=o,r=al(o,["onlyPositive"]);return St(ve({},Qc(t,e,r)),{processor:Ont(i)})}function M4i(t,e,n={}){return St(ve({},Qc(t,e,n)),{processor:Nnt()})}function vw(t,e,n="current",i,r){return[Qc(t,r,i),Hnt(i.groupId,e,n,i.separateNegative),...i.rangeId!=null?[Fnt(i.rangeId,i.groupId)]:[]]}function $nt(t,e,n){return[Qc(t,e,n),Gnt(n.groupId)]}function k4i({defs:t,values:e,xAxis:n,yAxis:i}){if(!(n&&i))throw new Error("Axes must be defined");let r={};for(let[s,{def:o}]of t)if(Object.hasOwn(e,s)){let{scale:a}=o.type==="key"?n:i;r[s]=Math.round(a.convert(e[s]))}return r}function CR(t,e,n,i){let r=[...t].reverse(),s;for(let o of r){if(!o.visible||!o.rootGroup.visible)continue;let{match:a,distance:l}=o.pickNode(e,n,i)??{};if(!(!a||l==null)&&((!s||s.distance>l)&&(s={series:o,distance:l,datum:a}),l===0))break}return s}function A4i(t){return t instanceof Os?t.computeCenter():t?.computeTransformedBBox()?.computeCenter()}function P4i(t,e){let{bounds:n,showFocusBox:i}=e;i&&t?.updateBounds(n)}function Knt(t,e){P4i(t,e);let{x:n,y:i}=A4i(e.bounds)??{};if(n!==void 0&&i!==void 0)return{type:"keyboard",offsetX:n,offsetY:i}}function irt(t){return typeof t=="string"&&evi.includes(t)}function iC(t=ate){return irt(t)?trt[t]:typeof t=="function"?t:ate}function nvi(t,e,n){let[i,r]=N4(t);i=rvi(Math.floor(i),r,e);let s=ovi(i,r,e),o=e-1;r=i+o*s;let a=n?[r,i]:[i,r],l=svi(i,s,e);return{domain:a,ticks:l}}function rvi(t,e,n){let i=Math.abs(e-t)/(n-1),r=Math.floor(Math.log10(i)),s=Math.pow(10,r);return Math.floor(t/s)*s}function svi(t,e,n){let i=Math.floor(Math.log10(e)),r=e>0&&e<1?Math.abs(i):0,s=Math.pow(10,r),o=[];for(let a=0;a<n;a++){let l=t+e*a;o[a]=Math.round(l*s)/s}return o}function ovi(t,e,n){let i=n-1,r=(e-t)/i;return avi(r)}function avi(t){let e=Math.floor(Math.log10(t)),n=Math.pow(10,e),i=t/n*10;return i>0&&i<=1?n/10:i>1&&i<=2?2*n/10:i>1&&i<=5?5*n/10:i>5&&i<=10?10*n/10:i>10&&i<=20?20*n/10:i>20&&i<=40?40*n/10:i>40&&i<=50?50*n/10:i>50&&i<=100?100*n/10:i}function CE(t,e,n,i){e.addEventListener(n,i),t.push(()=>e.removeEventListener(n,i))}function TCe(t,e,n){CE(t,e,"keydown",i=>{i.key==="Escape"&&n(i)})}function art(t,e,...n){return!(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)&&(t.key===e||n.some(i=>t.key===i))}function Aet(t,e,n,i){n&&CE(t,e,"keydown",r=>{art(r,i)&&n.focus()})}function lrt(t,e,n,i,r,s){Aet(t,e,r,s),Aet(t,e,n,i),CE(t,e,"keydown",o=>{art(o,i,s)&&o.preventDefault()})}function Gte(t){let{orientation:e,toolbar:n,buttons:i,onEscape:r,onFocus:s,onBlur:o}=t,{nextKey:a,prevKey:l}=crt[e],c=i.length===0;n.role="toolbar",n.ariaOrientation=e,n.ariaHidden=c.toString();let d=m=>{m.target&&"tabIndex"in m.target&&(i.forEach(f=>f.tabIndex=-1),m.target.tabIndex=0)},u=[];for(let m=0;m<i.length;m++){let f=i[m-1],_=i[m],x=i[m+1];CE(u,_,"focus",d),s&&CE(u,_,"focus",s),o&&CE(u,_,"blur",o),r&&TCe(u,_,r),lrt(u,_,f,l,x,a),_.tabIndex=m===0?0:-1}return u}function cvi(t){let{orientation:e,menu:n,buttons:i,onEscape:r}=t,{nextKey:s,prevKey:o}=crt[e];n.role="menu",n.ariaOrientation=e;let a=[];for(let l=0;l<i.length;l++){let c=i[(i.length+l-1)%i.length],d=i[l],u=i[(i.length+l+1)%i.length];r&&TCe(a,d,r),lrt(a,d,c,o,u,s),d.tabIndex=-1}return n.tabIndex=-1,r&&TCe(a,n,r),CE(a,n,"keydown",l=>{l.target===n&&(l.key===s||l.key===o)&&(l.preventDefault(),i[0]?.focus())}),a}function drt(t,e){return n=>{if(t.ariaDisabled==="true")return n.preventDefault();e(n)}}function dvi({orientation:t,bboxes:e,maxHeight:n,maxWidth:i,itemPaddingY:r=0,itemPaddingX:s=0,forceResult:o=!1}){let a=t==="horizontal",l={max:a?i:n,fn:a?m=>m.width:m=>m.height,padding:a?s:r},c={max:a?n:i,fn:a?m=>m.height:m=>m.width,padding:a?r:s},d=0,u=[];for(;d<e.length;){let m=e.slice(d),f=uvi(m,d,l,c,o);if(!f)return;d+=f.processedBBoxCount,u.push(f.pageIndices)}return pvi(u,t,e,r,s)}function uvi(t,e,n,i,r){let o=fvi(t,n);if(o<1){if(!r)return;o=1}let a=o;for(;a>=1;){let l=hvi(t,e,a,n,i,r);if(l==null&&a<=1)return;if(l==null){a--;continue}if(typeof l=="number"){if(l<=1)return;a=l<a&&l>1?l:a,a--;continue}return{processedBBoxCount:l.length*l[0].length,pageIndices:l}}}function hvi(t,e,n,i,r,s){let o=[],a=0,l=0,c=[],d=[];for(let u=0;u<t.length;u++){let m=(u+n)%n;m===0&&(a+=l,l=0,c.length>0&&o.push(c),c=[]);let f=i.fn(t[u])+i.padding;d[m]=Math.max(d[m]??0,f),l=Math.max(l,r.fn(t[u])+r.padding);let _=a+l,x=!s||o.length>0;if(_>r.max&&x){c=[];break}if(d.reduce((E,M)=>E+M,0)>i.max&&!s)return d.length<n?d.length:void 0;c.push(u+e)}return c.length>0&&o.push(c),o.length>0?o:void 0}function pvi(t,e,n,i,r){let s=0,o=0;return{pages:t.map(l=>{e==="horizontal"&&(l=mvi(l));let c=0,d=l.map(f=>{let _=f.map(E=>(c=Math.max(E,c),n[E])),x=0,D=0;return _.forEach(E=>{x+=E.height+i,D=Math.max(D,E.width+r)}),{indices:f,bboxes:_,columnHeight:Math.ceil(x),columnWidth:Math.ceil(D)}}),u=0,m=0;return d.forEach(f=>{u+=f.columnWidth,m=Math.max(m,f.columnHeight)}),s=Math.max(u,s),o=Math.max(m,o),{columns:d,startIndex:l[0][0],endIndex:c,pageWidth:u,pageHeight:m}}),maxPageWidth:s,maxPageHeight:o}}function mvi(t){let e=[];for(let n of t[0])e.push([]);return t.forEach((n,i)=>{n.forEach((r,s)=>{e[s][i]=r})}),e}function fvi(t,e){let n=t.length,i=0;for(let r=0;r<n;r++)if(i+=e.fn(t[r])+e.padding,i>e.max)return n/r<2?Math.ceil(n/2):r;return n}function zR({takeColors:t}){let{fills:[e],strokes:[n]}=t(1);return{fill:e,stroke:n}}function Ute(t){return{marker:zR(t)}}function Srt(t,e,n,i,r){let{addPhaseFn:s,updatePhaseFn:o,removePhaseFn:a}=r,l=(c,d,u)=>{n.animate({id:`${t}_${e}_${d.id}_${c}`,groupId:t,from:0,to:1,ease:yG,collapsable:!1,onUpdate(m,f){f&&c!=="removed"||(d.path.clear(!0),u(m,d),d.checkPathDirty())},onStop(){c==="added"&&(d.path.clear(!0),u(1,d),d.checkPathDirty())},phase:Pg[c]})};for(let c of i)n.isSkipped()||(l("removed",c,a),l("updated",c,o)),l("added",c,s)}function Lh(t){if(t!=null)return t===""?"":(Pee??(Pee=Rm("div")),Pee.textContent=String(t),Pee.innerHTML)}function Xc({id:t},e,n,...i){rC(t,e,n,i,{opacity:0},{opacity:1},{phase:"trailing"})}function pw({id:t},e,n,...i){rC(t,e,n,i,{opacity:1},{opacity:0},{phase:"remove"})}function Qx(t){return{opacity:1}}function xvi(t,e,n,i,r){return(1-r)**3*t+3*(1-r)**2*r*e+3*(1-r)+r**2*n+r**3*i}function cte(t,e,n,i,r){if(r<=Math.min(t,i))return t<i?0:1;if(r>=Math.max(t,i))return t<i?1:0;let s=0,o=1,a=NaN;for(let l=0;l<8;l+=1)a=(s+o)/2,(1-a)**3*t+3*(1-a)**2*a*e+3*(1-a)*a**2*n+a**3*i<r?s=a:o=a;return a}function dte(t,e,n,i,r,s,o,a,l){let c=(1-l)*t+l*n,d=(1-l)*e+l*i,u=(1-l)*n+l*r,m=(1-l)*i+l*s,f=(1-l)*r+l*o,_=(1-l)*s+l*a,x=(1-l)*c+l*u,D=(1-l)*d+l*m,E=(1-l)*u+l*f,M=(1-l)*m+l*_,I=(1-l)*x+l*E,z=(1-l)*D+l*M;return[[{x:t,y:e},{x:c,y:d},{x,y:D},{x:I,y:z}],[{x:I,y:z},{x:E,y:M},{x:f,y:_},{x:o,y:a}]]}function S6(t){switch(t.type){case"linear":case"step":return[{x:t.x0,y:t.y0},{x:t.x1,y:t.y1}];case"cubic":return[{x:t.cp0x,y:t.cp0y},{x:t.cp3x,y:t.cp3y}]}}function krt(t){switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:t.x1,y0:t.y1,x1:t.x0,y1:t.y0};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:t.cp3x,cp0y:t.cp3y,cp1x:t.cp2x,cp1y:t.cp2y,cp2x:t.cp1x,cp2y:t.cp1y,cp3x:t.cp0x,cp3y:t.cp0y};case"step":return{type:"step",moveTo:t.moveTo,x0:t.x1,y0:t.y1,x1:t.x0,y1:t.y0,stepX:t.stepX}}}function Ree(t,e){let{x:n,y:i}=e;switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:n,y0:i,x1:n,y1:i};case"step":return{type:"step",moveTo:t.moveTo,x0:n,y0:i,x1:n,y1:i,stepX:n};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:n,cp0y:i,cp1x:n,cp1y:i,cp2x:n,cp2y:i,cp3x:n,cp3y:i}}}function T3(t,e,n){let[i,r]=S6(t),s=r.x!==i.x?(n.x-e.x)/(r.x-i.x):0,o=r.y!==i.y?(n.y-e.y)/(r.y-i.y):0;switch(t.type){case"linear":return{type:"linear",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:n.x,y1:n.y};case"cubic":return{type:"cubic",moveTo:t.moveTo,cp0x:e.x,cp0y:e.y,cp1x:n.x-(t.cp2x-i.x)*s,cp1y:n.y-(t.cp2y-i.y)*o,cp2x:n.x-(t.cp1x-i.x)*s,cp2y:n.y-(t.cp1y-i.y)*o,cp3x:n.x,cp3y:n.y};case"step":return{type:"step",moveTo:t.moveTo,x0:e.x,y0:e.y,x1:n.x,y1:n.y,stepX:n.x-(t.stepX-i.x)*s}}}function Ret(t,e){return t.moveTo!==e?St(ve({},t),{moveTo:e}):t}function Fet(t,e){let[n,i]=S6(t),r,s,o,a;if(n.x<i.x?(r=n.x,s=n.y,o=i.x,a=i.y):(r=i.x,s=i.y,o=n.x,a=n.y),e<r)return[T3(t,n,n),Ret(t,!1)];if(e>o)return[t,Ret(T3(t,i,i),!1)];switch(t.type){case"linear":{let l=s===a?s:(a-s)/(o-r)*(e-r)+s;return[{type:"linear",moveTo:t.moveTo,x0:r,y0:s,x1:e,y1:l},{type:"linear",moveTo:!1,x0:e,y0:l,x1:o,y1:a}]}case"step":return e<t.stepX?[{type:"step",moveTo:t.moveTo,x0:r,y0:s,x1:e,y1:s,stepX:e},{type:"step",moveTo:!1,x0:e,y0:s,x1:o,y1:a,stepX:t.stepX}]:[{type:"step",moveTo:t.moveTo,x0:r,y0:s,x1:e,y1:a,stepX:t.stepX},{type:"step",moveTo:!1,x0:e,y0:a,x1:o,y1:a,stepX:e}];case"cubic":{let l=cte(t.cp0x,t.cp1x,t.cp2x,t.cp3x,e),[c,d]=dte(t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,l);return[{type:"cubic",moveTo:t.moveTo,cp0x:c[0].x,cp0y:c[0].y,cp1x:c[1].x,cp1y:c[1].y,cp2x:c[2].x,cp2y:c[2].y,cp3x:c[3].x,cp3y:c[3].y},{type:"cubic",moveTo:!1,cp0x:d[0].x,cp0y:d[0].y,cp1x:d[1].x,cp1y:d[1].y,cp2x:d[2].x,cp2y:d[2].y,cp3x:d[3].x,cp3y:d[3].y}]}}}function Fee(t,e,n){let{moveTo:i}=t,[r,s]=S6(t),o,a,l,c;if(r.x<s.x?(o=r.x,a=r.y,l=s.x,c=s.y):(o=s.x,a=s.y,l=r.x,c=r.y),n<o)return T3(t,r,r);if(e>l)return T3(t,s,s);switch(t.type){case"linear":{let d=a===c?void 0:(c-a)/(l-o),u=d==null?a:d*(e-o)+a,m=d==null?a:d*(n-o)+a;return{type:"linear",moveTo:i,x0:e,y0:u,x1:n,y1:m}}case"step":if(n<=t.stepX){let d=t.y0;return{type:"step",moveTo:i,x0:e,y0:d,x1:n,y1:d,stepX:n}}else if(e>=t.stepX){let d=t.y1;return{type:"step",moveTo:i,x0:e,y0:d,x1:n,y1:d,stepX:e}}else{let{y0:d,y1:u,stepX:m}=t;return{type:"step",moveTo:i,x0:e,y0:d,x1:n,y1:u,stepX:m}}case"cubic":{let d=cte(t.cp0x,t.cp1x,t.cp2x,t.cp3x,e),[u,m]=dte(t.cp0x,t.cp0y,t.cp1x,t.cp1y,t.cp2x,t.cp2y,t.cp3x,t.cp3y,d),f=cte(m[0].x,m[1].x,m[2].x,m[3].x,n);return[m,u]=dte(m[0].x,m[0].y,m[1].x,m[1].y,m[2].x,m[2].y,m[3].x,m[3].y,f),{type:"cubic",moveTo:i,cp0x:m[0].x,cp0y:m[0].y,cp1x:m[1].x,cp1y:m[1].y,cp2x:m[2].x,cp2y:m[2].y,cp3x:m[3].x,cp3y:m[3].y}}}}function Let(t,e,n){if(t.type==="cubic"&&e.type==="cubic")return{type:"cubic",moveTo:t.moveTo,cp0x:(e.cp0x-t.cp0x)*n+t.cp0x,cp0y:(e.cp0y-t.cp0y)*n+t.cp0y,cp1x:(e.cp1x-t.cp1x)*n+t.cp1x,cp1y:(e.cp1y-t.cp1y)*n+t.cp1y,cp2x:(e.cp2x-t.cp2x)*n+t.cp2x,cp2y:(e.cp2y-t.cp2y)*n+t.cp2y,cp3x:(e.cp3x-t.cp3x)*n+t.cp3x,cp3y:(e.cp3y-t.cp3y)*n+t.cp3y};if(t.type==="step"&&e.type==="step")return{type:"step",moveTo:t.moveTo,x0:(e.x0-t.x0)*n+t.x0,y0:(e.y0-t.y0)*n+t.y0,x1:(e.x1-t.x1)*n+t.x1,y1:(e.y1-t.y1)*n+t.y1,stepX:(e.stepX-t.stepX)*n+t.stepX};let[i,r]=S6(t),[s,o]=S6(e);return{type:"linear",moveTo:t.moveTo,x0:(s.x-i.x)*n+i.x,y0:(s.y-i.y)*n+i.y,x1:(o.x-r.x)*n+r.x,y1:(o.y-r.y)*n+r.y}}function mG(t,e,n=e.moveTo?1:0){let[i]=S6(e);switch(n){case 1:t.moveTo(i.x,i.y);break;case 2:t.lineTo(i.x,i.y);break}switch(e.type){case"linear":t.lineTo(e.x1,e.y1);break;case"cubic":t.cubicCurveTo(e.cp1x,e.cp1y,e.cp2x,e.cp2y,e.cp3x,e.cp3y);break;case"step":t.lineTo(e.stepX,e.y0),t.lineTo(e.stepX,e.y1),t.lineTo(e.x1,e.y1);break}}function bvi(t){let e=[],n=0,i=NaN,r=NaN;for(let{x:s,y:o}of t){if(n>0){let a=n===1;e.push({type:"linear",moveTo:a,x0:i,y0:r,x1:s,y1:o})}n+=1,i=s,r=o}return e}function Svi(t,e){let n=[],i=0,r=NaN,s=NaN,o=typeof e=="number"?e:wvi[e];for(let{x:a,y:l}of t){if(i>0){let c=i===1,d=r+(a-r)*o;n.push({type:"step",moveTo:c,x0:r,y0:s,x1:a,y1:l,stepX:d})}i+=1,r=a,s=l}return n}function Tvi(t,e){let n=Array.isArray(t)?t:Array.from(t);if(n.length<=1)return[];let i=n.map((s,o)=>{let a=o===0?s:n[o-1],l=o===n.length-1?s:n[o+1],c=o===0||o===n.length-1;if(Math.sign(a.y-s.y)===Math.sign(l.y-s.y))return 0;if(!c){let d=Math.abs(a.y-l.y),u=Math.abs(s.y-a.y)/d,m=Math.abs(s.y-l.y)/d;if(u<=Lee||1-u<=Lee||m<=Lee||1-m<=Lee)return 0}return(l.y-a.y)/(l.x-a.x)});i[1]===0&&(i[0]*=2),i[i.length-2]===0&&(i[i.length-1]*=2);let r=[];for(let s=1;s<n.length;s+=1){let o=n[s-1],a=i[s-1],l=n[s],c=i[s],d=l.x-o.x,u=l.y-o.y,m=d*e/3,f=d*a*e/3,_=d*e/3,x=d*c*e/3;c===0&&Math.abs(f)>Math.abs(u)&&(m*=Math.abs(u/f),f=Math.sign(f)*Math.abs(u)),a===0&&Math.abs(x)>Math.abs(u)&&(_*=Math.abs(u/x),x=Math.sign(x)*Math.abs(u)),r.push({type:"cubic",moveTo:s===1,cp0x:o.x,cp0y:o.y,cp1x:o.x+m,cp1y:o.y+f,cp2x:l.x-_,cp2y:l.y-x,cp3x:l.x,cp3y:l.y})}return r}function DG({id:t},e,n,...i){let r={phase:n?Pg[n]:"trailing"};rC(t,"markers",e,i,{opacity:0},{opacity:1},r),i.forEach(s=>s.cleanup())}function q8e({id:t},e,...n){rC(t,"markers",e,n,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1},{phase:"initial"}),n.forEach(i=>i.cleanup())}function Z8e({id:t,nodeDataDependencies:e},n,...i){let r=e.seriesRectWidth;om(t,"markers",n,i,{fromFn:(a,l)=>{let c=l.midPoint?.x??r,d=Wa(0,Vtt(c/r),1);return isNaN(d)&&(d=0),{scalingX:0,scalingY:0,delay:d,duration:ite,phase:"initial"}},toFn:()=>({scalingX:1,scalingY:1})})}function XG(t){return{opacity:1,scalingX:1,scalingY:1}}function EG(t,e){return{translationX:e.point?.x??NaN,translationY:e.point?.y??NaN}}function X8e(t,e){let n=(o,a)=>{let l=t[a][o];return Array.isArray(l)?l[0]:l},i=o=>{let{xValue:a}=o;return t.moved[a]?{point:n(a,"moved"),status:"updated"}:t.removed[a]?{point:n(a,"removed"),status:"removed"}:t.added[a]?{point:n(a,"added"),status:"added"}:{status:"unknown"}};return{fromFn:(o,a)=>{let{status:l,point:c}=i(a);if(l==="unknown")return{opacity:0};let d={translationX:c?.from?.x??o.translationX,translationY:c?.from?.y??o.translationY,opacity:o.opacity,phase:Pg[l]};return e==="added"?St(ve({},d),{opacity:0,translationX:c?.to?.x,translationY:c?.to?.y,phase:Pg.added}):(l==="added"&&(d.opacity=0),d)},toFn:(o,a)=>{let{status:l,point:c}=i(a);if(l==="unknown")return{opacity:0};let d={translationX:a.point.x,translationY:a.point.y,opacity:1,phase:Pg[l]};return l==="removed"||e==="removed"?St(ve({},d),{translationX:c?.to?.x,translationY:c?.to?.y,opacity:0,phase:Pg.removed}):d}}}function QG(t,{datumIndex:e}){let n=t.getNodeData();if(n===void 0)return;let i=n[e];if(i===void 0||i.point===void 0)return;let r=t.getFormattedMarkerStyle(i).size,s=r/2,{x:o,y:a}=t.contentGroup.inverseTransformPoint(i.point.x-s,i.point.y-s);return new Os(o,a,r,r)}function Dvi(t,e,n){let i=n;for(let{x:r,y:s}of e)i?t.lineTo(r,s):(t.moveTo(r,s),i=!0)}function Evi(t,e,n,i){let r=Array.isArray(e)?e:Array.from(e);if(r.length===0||(i?t.lineTo(r[0].x,r[0].y):t.moveTo(r[0].x,r[0].y),r.length<=1))return;let s=r.map((o,a)=>{let l=a===0?o:r[a-1],c=a===r.length-1?o:r[a+1],d=a===0||a===r.length-1;if(Math.sign(l.y-o.y)===Math.sign(c.y-o.y))return 0;if(!d){let u=Math.abs(l.y-c.y),m=Math.abs(o.y-l.y)/u,f=Math.abs(o.y-c.y)/u;if(m<=Oee||1-m<=Oee||f<=Oee||1-f<=Oee)return 0}return(c.y-l.y)/(c.x-l.x)});s[1]===0&&(s[0]*=2),s[s.length-2]===0&&(s[s.length-1]*=2);for(let o=1;o<r.length;o+=1){let a=r[o-1],l=s[o-1],c=r[o],d=s[o],u=c.x-a.x,m=c.y-a.y,f=u*n/3,_=u*l*n/3,x=u*n/3,D=u*d*n/3;d===0&&Math.abs(_)>Math.abs(m)&&(f*=Math.abs(m/_),_=Math.sign(_)*Math.abs(m)),l===0&&Math.abs(D)>Math.abs(m)&&(x*=Math.abs(m/D),D=Math.sign(D)*Math.abs(m)),t.cubicCurveTo(a.x+f,a.y+_,c.x-x,c.y-D,c.x,c.y)}}function Mvi(t,e,n,i){let r;for(let s of e){if(r!=null){let o=r.x<s.x?n:1-n,a=(s.x-r.x)*o+r.x;t.lineTo(a,r?.y??s.y),t.lineTo(a,s.y),t.lineTo(s.x,s.y)}else i?t.lineTo(s.x,s.y):t.moveTo(s.x,s.y);r=s}}function DCe(t){return t.reduce(({min:e,max:n},i)=>((e==null||e.point.x>i.point.x)&&(e=i),(n==null||n.point.x<i.point.x)&&(n=i),{min:e,max:n}),{})}function Oet(t,e,n){let i=(e.y-t.y)/(e.x-t.x),r=(n-t.x)*i+t.y;return{x:n,y:r}}function Net(t,e,n,i){let r=-1,s=0,o=[];for(;s<t.length;){if(t[s].change===e){o.push(t[s]),s++;continue}if(t[s].change===n){s++;continue}o.length>0&&(i(o,r,s),o.length=0),r=s,s++}o.length>0&&i(o,r,s)}function Q8e(t,e){Net(t,"out","in",(n,i,r)=>{i===-1&&t[r]?n.forEach(s=>s.to=t[r].from):r===t.length&&t[i]?n.forEach(s=>s.to=t[i].from):e==="intersect"&&t[i]?.from&&t[r]?.from?n.forEach(s=>s.to=Oet(t[i].from,t[r].from,s.from.x)):n.forEach(s=>s.to=s.from)}),Net(t,"in","out",(n,i,r)=>{i===-1&&t[r]?n.forEach(s=>s.from=t[r].to):r===t.length&&t[i]?n.forEach(s=>s.from=t[i].to):e==="intersect"&&t[i]?.to&&t[r]?.to?n.forEach(s=>s.from=Oet(t[i].to,t[r].to,s.to.x)):n.forEach(s=>s.from=s.to)})}function Vet(t,e,n){let i=isNaN(t.x)?e.x:t.x,r=isNaN(t.y)?e.y:t.y,s=e.x-t.x,o=e.y-t.y,a=isNaN(s)?0:s*n,l=isNaN(o)?0:o*n;return{x:i+a,y:r+l}}function J8e(t,e,n,i=!1){let{path:r}=e;n?.type==="smooth"?Evi(r,t,n.tension??1,i):n?.type==="step"?Mvi(r,t,kvi[n.position??"end"],i):Dvi(r,t,i)}function Irt(t,e){let n,i,r=[],s=()=>{i!=null&&(r.push(i),i=void 0)};for(let o of t){let{from:a,to:l}=o,c=e[o.change];if(c==null||a==null||l==null)continue;let d=Vet(a,l,c);if(o.moveTo===!1)i??(i=[]),i.push(d);else if(o.moveTo===!0||!n)s(),i=[d];else if(n){let u=o.moveTo==="in"?c:1-c,{x:m,y:f}=Vet(n,d,u);i??(i=[]),i.push({x:m,y:f}),s(),i=[d]}n=d}return s(),r}function Art(t,e,n,i){Irt(t,e).forEach(r=>{J8e(r,n,i)})}function exe({id:t,visible:e,nodeDataDependencies:n},i,...r){let{seriesRectWidth:s,seriesRectHeight:o}=n;rC(t,"path_properties",i,r,{clipX:0},{clipX:s},{phase:"initial",start:{clipMode:"normal",clipY:o,visible:e},finish:{clipMode:void 0,visible:e}})}function fG({id:t},e,n,i="add",...r){rC(t,e,n,r,{opacity:0},{opacity:1},{phase:i})}function Ivi({id:t},e,n,...i){rC(t,e,n,i,{opacity:1},{opacity:0},{phase:"remove"})}function txe(t){return e=>({visible:t.getVisible(),opacity:t.getOpacity(),clipScalingX:1,clipMode:void 0})}function ute({nodeDataDependencies:t},e){let n=i=>isFinite(i)?i:0;e.clipX=n(t.seriesRectWidth),e.clipY=n(t.seriesRectHeight)}function Bet(t){return t.type==="continuous"||t.type==="log"}function zet(t){return t.type==="category"}function Het(t,e){return t.domain.length===e.domain.length&&t.range.length===e.range.length&&t.domain.every((n,i)=>n===e.domain[i])&&t.range.every((n,i)=>n===e.range[i])}function Get(t,e){return t===void 0||e===void 0?t!==void 0||e!==void 0:Bet(t)&&Bet(e)?t.type===e.type&&Het(t,e):zet(t)&&zet(e)?Het(t,e):!1}function hte(t){return t==null||!t.range.every(e=>Number.isFinite(e))?!1:t.type==="category"?t.domain.every(e=>e!=null):t.domain.every(e=>Number.isFinite(e)||e instanceof Date)}function*Prt(t){let e=-1,n=0;for(let{point:i}of t){if(i.moveTo){let r=e>=0?{start:e,end:n}:void 0;e=n,n=e,r!==void 0&&(yield r)}n+=1}e!==-1&&(yield{start:e,end:n})}function*Rrt(t,{start:e,end:n}){for(let i=e;i<n;i+=1)yield t[i].point}function*Avi(t,{start:e,end:n}){for(let i=n-1;i>=e;i-=1)yield t[i].point}function Pvi(t,e){return t==null||e==null||typeof t!="object"||typeof e!="object"?!1:"id"in t&&"id"in e?t.id===e.id:t.toString()===e.toString()}function e0(t,e){if(!e)return NaN;if(t instanceof Date&&(t=t.getTime()),e.type==="continuous"&&typeof t=="number")return(t-e.domain[0])/(e.domain[1]-e.domain[0])*(e.range[1]-e.range[0])+e.range[0];if(e.type==="log"&&typeof t=="number")return e.convert(t);let n=e.domain.findIndex(r=>r===t);if(n>=0)return e.range[n];let i=e.domain.findIndex(r=>Pvi(t,r));return i>=0?e.range[i]:NaN}function Rvi(t,e){return!Get(t.scales.x,e.scales.x)||!Get(t.scales.y,e.scales.y)}function Fvi(t,e){let n=Number(t),i=Number(e);return!isNaN(n)&&!isNaN(i)?Math.abs(i-n)<.25:t===e}function Frt(t=!1,e=!1){return t===e?!!t:t?"in":"out"}function ixe(t,e,n={}){let{backfillSplitMode:i="intersect"}=n,r=[],s={added:{},moved:{},removed:{}},o=(f,_,x,D="move")=>{f&&(isNaN(f.point.x)||isNaN(f.point.y))&&(f=_);let E={from:f?.point,to:_?.point,moveTo:Frt(f?.point.moveTo,_?.point.moveTo),change:D};D==="move"?(s.moved[x]=E,u++,m++):D==="in"?(s.added[x]=E,m++):D==="out"&&(s.removed[x]=E,u++),r.push(E)},{min:a,max:l}=DCe(e.nodeData),{min:c,max:d}=DCe(t.nodeData),u=0,m=0;for(;u<e.nodeData.length||m<t.nodeData.length;){let f=e.nodeData[u],_=t.nodeData[m],x=f?e0(f.xValue??NaN,t.scales.x):void 0,D=_?e0(_.xValue??NaN,e.scales.x):void 0,E=void 0;if(x!=null&&Fvi(x,_?.point.x))o(f,_,_.xValue,"move");else if(x!=null&&x<(c?.point.x??-1/0))o(f,E,f.xValue,"out");else if(x!=null&&x>(d?.point.x??1/0))o(f,E,f.xValue,"out");else if(D!=null&&D<(a?.point.x??-1/0))o(E,_,_.xValue,"in");else if(D!=null&&D>(l?.point.x??1/0))o(E,_,_.xValue,"in");else if(x!=null&&x<_?.point.x)o(f,E,f.xValue,"out");else if(D!=null&&D<f?.point.x)o(E,_,_.xValue,"in");else if(f)o(f,E,f.xValue,"out");else if(_)o(E,_,_.xValue,"in");else throw new Error("Unable to process points")}return Q8e(r,i),{result:r,resultMap:s}}function nxe(t,e,n,i={}){let{backfillSplitMode:r="intersect",multiDatum:s=!1}=i,o=[],a={added:{},moved:{},removed:{}},l={added:{},moved:{},removed:{}},c={in:"added",move:"moved",out:"removed"},d,u,m=(E,M)=>{var I;let z=c[M.change];s?((I=l[z])[E]??(I[E]=[]),l[z][E].push(M)):a[z][E]=M,d=M,u=dR(E)},f=0,_=0,x=!1;for(;f<e.nodeData.length||_<t.nodeData.length;){let E=e.nodeData[f],M=t.nodeData[_],I=dR(E?.xValue),z=dR(M?.xValue),G;if(I===z)G={change:"move",moveTo:Frt(E.point.moveTo??!1,M.point.moveTo),from:E.point,to:M.point},m(E?.xValue,G),f++,_++;else if(n?.removed.has(String(I)))G={change:"out",moveTo:E.point.moveTo??!1,from:E.point},m(E?.xValue,G),f++;else if(n?.added.has(String(z)))G={change:"in",moveTo:M.point.moveTo??!1,to:M.point},m(M?.xValue,G),_++;else if(s&&d&&u===I)G=ve({},d),m(E?.xValue,G),f++;else if(s&&d&&u===z)G=ve({},d),m(M?.xValue,G),_++;else{x=!0;break}o.push(G)}let D=-1/0;return x||(x=o.some(E=>{let{change:M,to:{x:I=-1/0}={}}=E;if(M==="out")return;let z=I<D;return D=I,z})),x?{result:void 0,resultMap:void 0}:(Q8e(o,r),{result:o,resultMap:s?l:a})}function Lrt(t,e,n){let i="updated",r=s=>s.visible;if(!r(e)&&r(t))i="added";else if(r(e)&&!r(t))i="removed";else for(let s=0;s<n.length&&!(n[s].change!=="move"||n[s].from?.x!==n[s].to?.x||n[s].from?.y!==n[s].to?.y);s++)if(s===n.length-1)return"no-op";return i}function rxe(t,e){let n=e==="none"?"updated":t,i={fromFn:r=>{let s;return t==="removed"?s={finish:{visible:!1}}:t==="added"?s={start:{visible:!0}}:s={},ve({phase:Pg[n]},s)},toFn:r=>({phase:Pg[n]})};return e==="fade"?{fromFn:r=>{let s=t==="added"?0:r.opacity;return ve({opacity:s},i.fromFn(r))},toFn:r=>ve({opacity:t==="removed"?0:1},i.toFn(r))}:i}function Ort(t,e,n,i,r,s){let o=Lrt(t,e,n),a=(u,m)=>{s(n,{move:0,out:u},m,r)},l=(u,m)=>{s(n,{move:u},m,r)},c=(u,m)=>{s(n,{move:1,in:u},m,r)},d=rxe(o,i);return{status:o,path:{addPhaseFn:c,updatePhaseFn:l,removePhaseFn:a},pathProperties:d}}function Nrt(t,e,n,i){let r=t.scales.x?.type==="category",s=e.scales.x?.type==="category";if(r!==s||!hte(t.scales.x)||!hte(e.scales.x))return;let{result:o,resultMap:a}=r?nxe(t,e,n):ixe(t,e),l="updated";if(e.visible&&!t.visible?l="removed":!e.visible&&t.visible&&(l="added"),o===void 0||a===void 0)return;let c=(n?.changed??!0)||Rvi(t,e)||l!=="updated",d=Ort(t,e,o,"fade",i,Art),u=X8e(a,l);return St(ve({},d),{marker:u,hasMotion:c})}function Vx(t,e,n=1e-6){return t===e||1-Math.min(t,e)/Math.max(t,e)<n?0:t<e?-1:1}function Nee(t,e,n){if(t===e)return!0;let i=Number(t),r=Number(e);return Number.isFinite(i)&&Number.isFinite(r)&&Vx(i,r,n)===0}function Wet(t,{x:e,y:n}){let i,r=[],s=1/0,o=-1/0;for(let l of t){let c=e0(l.xValue0,e),d=e0(l.yValue0,n),u=e0(l.xValue1,e),m=e0(l.yValue1,n),f=Number.isFinite(c),_=Number.isFinite(u);if(f&&_&&i==null){let x=l.span,D=T3(x,{x:c,y:d},{x:u,y:m}),E={unshifted:x,shifted:D};s=Math.min(s,c),o=Math.max(o,u),r.push(E)}else if(f&&!_&&i==null)i=[l];else if(!f&&!_&&i!=null)i?.push(l);else if(!f&&_&&i!=null){i.push(l);let x=i.at(0),D=i.at(-1),E={x:e0(x.xValue0,e),y:e0(x.yValue0,n)},M={x:e0(D.xValue1,e),y:e0(D.yValue1,n)},I=(M.x-E.x)/(i.length-1);for(let z=0;z<i.length;z+=1){let{span:G,yValue0:A,yValue1:Y}=i[z],X=T3(G,{x:E.x+I*(z+0),y:e0(A,n)},{x:E.x+I*(z+1),y:e0(Y,n)});r.push({unshifted:G,shifted:X})}s=Math.min(s,E.x),o=Math.max(o,M.x),i=void 0}else if(!f&&_&&i==null){let x=l.span,D=T3(x,{x:u,y:d},{x:u,y:m});r.push({unshifted:x,shifted:D})}else i=void 0}if(i!=null){let l=i.at(0),c=e0(l.xValue0,e);for(let{span:d,yValue0:u,yValue1:m}of i){let f=T3(d,{x:c,y:e0(u,n)},{x:c,y:e0(m,n)});r.push({unshifted:d,shifted:f})}}return{interpolatingInvalidSpans:r,shiftedXRange:[s,o]}}function Uet(t,e,n){let i=Wet(e.data,t.scales),r=Wet(t.data,e.scales),[s,o]=i.shiftedXRange,[a,l]=r.shiftedXRange,c=[],d=[];for(let m of i.interpolatingInvalidSpans){let f=m.unshifted,_=m.shifted,[{x,y:D},{x:E,y:M}]=S6(f),I=!1;for(let z of r.interpolatingInvalidSpans){let G=z.shifted,A=z.unshifted,[{x:Y},{x:X}]=S6(G);if(!(Vx(x,X)!==-1||Vx(E,Y)!==1)){if(Nee(x,Y)&&Nee(E,X))c.push({from:f,to:f}),d.push({from:f,to:A});else if(x<=Y&&E>=X)c.push({from:f,to:f}),d.push({from:f,to:_});else{let[{x:ne},{x:pe}]=S6(_),[{x:ce},{x:ie}]=S6(A),le=Math.max(x,Y),Se=Math.min(E,X),je=Fee(f,le,Se),ze=Fee(G,le,Se),Ge=Math.max(ne,ce),Ae=Math.min(pe,ie),Ye=Fee(A,Ge,Ae);c.push({from:je,to:ze}),d.push({from:ze,to:Ye})}I=!0}}if(!I){if(Vx(E,a)!==1)c.push({from:f,to:T3(f,{x:a,y:D},{x:a,y:M})});else if(Vx(x,l)!==-1)c.push({from:f,to:T3(f,{x:l,y:D},{x:l,y:M})});else if(n===0){let z=e0(0,e.scales.y);c.push({from:f,to:T3(f,{x,y:z},{x:E,y:z})})}else if(n===1){let[z,G]=Fet(f,(x+E)/2);c.push({from:z,to:Ree(z,{x,y:D})},{from:G,to:Ree(G,{x:E,y:M})})}}}let u=[];for(let m of t.data){let f=m.span,[{x:_,y:x},{x:D,y:E}]=S6(f),M=!1;for(let I of i.interpolatingInvalidSpans){let z=I.shifted,[{x:G},{x:A}]=S6(z);if(!(Vx(G,D)!==-1||Vx(A,_)!==1)){if(Nee(G,_)&&Nee(A,D))u.push({from:f,to:f});else if(G<=_&&A>=D){let Y=Fee(z,_,D);u.push({from:Y,to:f})}else u.push({from:f,to:f});M=!0}}if(!M){if(Vx(D,s)!==1)u.push({from:T3(f,{x:s,y:x},{x:s,y:E}),to:f});else if(Vx(_,o)!==-1)u.push({from:T3(f,{x:o,y:x},{x:o,y:E}),to:f});else if(n===0){let I=e0(0,t.scales.y);u.push({from:T3(f,{x:_,y:I},{x:D,y:I}),to:f})}else if(n===1){let[I,z]=Fet(f,(_+D)/2);u.push({from:Ree(I,{x:_,y:x}),to:f},{from:Ree(z,{x:D,y:E}),to:f})}}}return{added:u,moved:d,removed:c}}function U5e(t,e,n,i){for(let r=0;r<n.length;r+=1){let s=n[r],o=i[r];mG(e.path,Let(s.from,s.to,t),1),mG(e.path,krt(Let(o.from,o.to,t)),2),e.path.closePath()}}function Lvi(t,e,n,i){let r=(l,c)=>U5e(l,c,e.removed,n.removed),s=(l,c)=>U5e(l,c,e.moved,n.moved),o=(l,c)=>U5e(l,c,e.added,n.added),a=rxe(t,i);return{status:t,path:{addPhaseFn:o,updatePhaseFn:s,removePhaseFn:r},pathProperties:a}}function Brt(t,e,n){let i=t.scales.x?.type==="category",r=e.scales.x?.type==="category";if(i!==r||!hte(t.scales.x)||!hte(e.scales.x))return;let s="updated";e.visible&&!t.visible?s="removed":!e.visible&&t.visible&&(s="added");let o=Uet({scales:t.scales,data:t.fillData.spans,visible:t.visible},{scales:e.scales,data:e.fillData.spans,visible:e.visible},0),a=Uet({scales:t.scales,data:t.fillData.phantomSpans,visible:t.visible},{scales:e.scales,data:e.fillData.phantomSpans,visible:e.visible},0),l=()=>i?nxe(t,e,n,{backfillSplitMode:"static",multiDatum:!0}):ixe(t,e,{backfillSplitMode:"static"}),{resultMap:c}=l();if(c===void 0)return;let m=Lvi(s,o,a,!0?"none":"fade"),f=X8e(c,s);return{status:s,fill:m,marker:f}}function*zrt(t){for(let e of t.children)yield e}function sxe(t,e){for(let n of e){let i=n.datum;i===void 0?yr.error("undefined datum"):t.addValue(n,i)}}function oxe(t,e){let{x:n,y:i}=t.contentGroup.transformPoint(e.x,e.y),{nearest:r,distanceSquared:s}=t.getQuadTree().find(n,i);if(r!==void 0)return{datum:r.value,distance:Math.sqrt(s)}}function Wrt(t,e){t.crisp=e.crisp??!0,t.fill=e.fill,t.stroke=e.stroke,t.strokeWidth=e.strokeWidth,t.fillOpacity=e.fillOpacity,t.strokeOpacity=e.strokeOpacity,t.lineDash=e.lineDash,t.lineDashOffset=e.lineDashOffset,t.fillShadow=e.fillShadow,t.topLeftCornerRadius=e.topLeftCornerRadius!==!1?e.cornerRadius??0:0,t.topRightCornerRadius=e.topRightCornerRadius!==!1?e.cornerRadius??0:0,t.bottomRightCornerRadius=e.bottomRightCornerRadius!==!1?e.cornerRadius??0:0,t.bottomLeftCornerRadius=e.bottomLeftCornerRadius!==!1?e.cornerRadius??0:0,t.visible=e.visible??!0}function Urt(l){var c=l,{datum:t,isHighlighted:e,style:n,highlightStyle:i,itemStyler:r,seriesId:s,ctx:{callbackCache:o}}=c,a=al(c,["datum","isHighlighted","style","highlightStyle","itemStyler","seriesId","ctx"]);let{fill:d,fillOpacity:u,stroke:m,strokeWidth:f,strokeOpacity:_,lineDash:x,lineDashOffset:D,cornerRadius:E=0}=ql(e&&i,n),M;return r&&(M=o.call(r,ve({datum:t.datum,xKey:t.xKey,fill:d,fillOpacity:u,stroke:m,strokeWidth:f,strokeOpacity:_,lineDash:x,lineDashOffset:D,cornerRadius:E,highlighted:e,seriesId:s},a))),{fill:M?.fill??d,fillOpacity:M?.fillOpacity??u,stroke:M?.stroke??m,strokeWidth:M?.strokeWidth??f,strokeOpacity:M?.strokeOpacity??_,lineDash:M?.lineDash??x,lineDashOffset:M?.lineDashOffset??D,cornerRadius:M?.cornerRadius??E,topLeftCornerRadius:n.topLeftCornerRadius,topRightCornerRadius:n.topRightCornerRadius,bottomRightCornerRadius:n.bottomRightCornerRadius,bottomLeftCornerRadius:n.bottomLeftCornerRadius,fillShadow:n.fillShadow}}function jrt(t,e,n,i){if(e!=null){let[r,s]=e;if(r!==0||s!==1)return!1}if(Ud.is(t)){let r=t.calcBandwidth(i)-t.calcBandwidth(n);if(r>0&&r<1)return!1}return!0}function MG(t,e,n){let{startingX:i,startingY:r}=Bvi(t,e);return{isVertical:t,calculate:(o,a)=>{let l=t?o.x:i,c=t?r:o.y,d=t?o.width:0,u=t?0:o.height,{opacity:m}=o;a&&(isNaN(l)||isNaN(c))&&({x:l,y:c}=a,d=t?a.width:0,u=t?0:a.height,t&&!j5e(a)?c+=a.height:!t&&j5e(a)&&(l+=a.width));let f;return o.clipBBox==null?f=void 0:j5e(o)?f=t?new Os(l,c-u,d,u):new Os(l-d,c,d,u):f=new Os(l,c,d,u),{x:l,y:c,width:d,height:u,clipBBox:f,opacity:m}},mode:n}}function Vvi(t,e){return{isVertical:t,calculate:n=>({x:t?n.x:n.x+n.width/2,y:t?n.y+n.height/2:n.y,width:t?n.width:0,height:t?0:n.height,clipBBox:n.clipBBox,opacity:n.opacity}),mode:e}}function kG(t){let e=r=>r==null||isNaN(r.x)||isNaN(r.y);return{toFn:(r,s,o)=>{let a;return o==="removed"&&r.datum==null&&t.mode==="fade"?a=St(ve({},IG(r,s)),{opacity:0}):o==="removed"||e(s)?a=t.calculate(s,r.previousDatum):a={x:s.x,y:s.y,width:s.width,height:s.height,clipBBox:s.clipBBox,opacity:s.opacity},a},fromFn:(r,s,o)=>{o==="updated"&&e(s)?o="removed":o==="updated"&&e(r.previousDatum)&&(o="added");let a;o==="added"&&r.previousDatum==null&&t.mode==="fade"?a=St(ve({},IG(r,s)),{opacity:0}):o==="unknown"||o==="added"?a=t.calculate(s,r.previousDatum):a={x:r.x,y:r.y,width:r.width,height:r.height,clipBBox:r.clipBBox,opacity:r.opacity};let l=Pg[o];return St(ve({},a),{phase:l})}}}function Bvi(t,e){let n=e[t?"y":"x"],i=1/0,r=0;return n?(t?r=n.scale.convert(Ud.is(n.scale)?0:Math.max(...n.range)):i=n.scale.convert(Ud.is(n.scale)?0:Math.min(...n.range)),{startingX:i,startingY:r}):{startingX:i,startingY:r}}function IG(t,{x:e,y:n,width:i,height:r,clipBBox:s,opacity:o}){return{x:e,y:n,width:i,height:r,clipBBox:s,opacity:o}}function lxe(t,e,n){if(t===void 0)return;let{x:i,y:r,width:s,height:o}=t;return e.inverseTransformBBox(new Os(i,r,s,o)).clip(n)}function $rt(t,e,n){if(e.enabled&&n){let{x:i,y:r,text:s,textAlign:o,textBaseline:a}=n,{color:l,fontStyle:c,fontWeight:d,fontSize:u,fontFamily:m}=e;t.setProperties({visible:!0,x:i,y:r,text:s,fill:l,fontStyle:c,fontWeight:d,fontSize:u,fontFamily:m,textAlign:o,textBaseline:a})}else t.visible=!1}function Krt({isPositive:t,isVertical:e,placement:n,padding:i=0,rect:r}){let s=r.x+r.width/2,o=r.y+r.height/2,a="center",l="middle";switch(n){case"start":{e?(o=t?r.y+r.height+i:r.y-i,l=t?"top":"bottom"):(s=t?r.x-i:r.x+r.width+i,a=t?"start":"end");break}case"outside":case"end":{e?(o=t?r.y-i:r.y+r.height+i,l=t?"bottom":"top"):(s=t?r.x+r.width+i:r.x-i,a=t?"start":"end");break}}return{x:s,y:o,textAlign:a,textBaseline:l}}function Xrt({startAngle:t,endAngle:e,innerRadius:n,outerRadius:i}){let r=1/0,s=1/0,o=-1/0,a=-1/0,l=(c,d)=>{r=Math.min(c,r),s=Math.min(d,s),o=Math.max(c,o),a=Math.max(d,a)};return l(n*Math.cos(t),n*Math.sin(t)),l(n*Math.cos(e),n*Math.sin(e)),l(i*Math.cos(t),i*Math.sin(t)),l(i*Math.cos(e),i*Math.sin(e)),hw(0,t,e)&&l(i,0),hw(Math.PI*.5,t,e)&&l(0,i),hw(Math.PI,t,e)&&l(-i,0),hw(Math.PI*1.5,t,e)&&l(0,-i),new Os(r,s,o-r,a-s)}function pte(t,e,n){let i=Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),{innerRadius:r,outerRadius:s}=n;if(n.startAngle===n.endAngle||i<Math.min(r,s)||i>Math.max(r,s))return!1;let o=bG(n.startAngle),a=bG(n.endAngle),l=Math.atan2(e,t);return o<a?l<=a&&l>=o:l<=a&&l>=-Math.PI||l>=o&&l<=Math.PI}function Yet(t,e){let{startAngle:n,endAngle:i,innerRadius:r,outerRadius:s}=e,o={x:s*Math.cos(n),y:s*Math.sin(n)},a={x:s*Math.cos(i),y:s*Math.sin(i)},l=r===0?{x:0,y:0}:{x:r*Math.cos(n),y:r*Math.sin(n)},c=r===0?{x:0,y:0}:{x:r*Math.cos(i),y:r*Math.sin(i)};return sR(t.start.x,t.start.y,t.end.x,t.end.y,o.x,o.y,l.x,l.y)||sR(t.start.x,t.start.y,t.end.x,t.end.y,a.x,a.y,c.x,c.y)||nnt(0,0,s,n,i,!0,t.start.x,t.start.y,t.end.x,t.end.y)}function Qrt(t,e){let n={x:t.x,y:t.y},i={x:t.x+t.width,y:t.y},r={x:t.x,y:t.y+t.height},s={x:t.x+t.width,y:t.y+t.height};return Yet({start:n,end:i},e)||Yet({start:r,end:s},e)}function qet(t,e,n,i){if(n===0&&i===0)return 0;if(Math.asin(Math.abs(1*n)/(t+1*n))+Math.asin(Math.abs(1*i)/(t+1*i))-e<0)return 1;let s=0,o=1;for(let a=0;a<8;a+=1){let l=(s+o)/2;Math.asin(Math.abs(l*n)/(t+l*n))+Math.asin(Math.abs(l*i)/(t+l*i))-e<0?s=l:o=l}return s}function yw(t,e){return Ate(t,e)<Qvi?e:Nh(t-e)+e}function Vee(t,e,n=0){let r=Math.abs(e-t)>=2*Math.PI?2*Math.PI:Nh(e-t);return t=yw(t,n),e=t+r,{startAngle:t,endAngle:e}}function Bee(t,e,n,i,r,s){let o=Math.sin(s),a=Math.cos(s),l=t**2+e**2-n**2,c=NaN,d=NaN,u=NaN,m=NaN;if(a>.5){let I=o/a,z=1+I**2,G=-2*(t+e*I),A=G**2-4*z*l;if(A<0)return;let Y=(-G+Math.sqrt(A))/(2*z),X=(-G-Math.sqrt(A))/(2*z);c=Y,d=Y*I,u=X,m=X*I}else{let I=a/o,z=1+I**2,G=-2*(e+t*I),A=G**2-4*z*l;if(A<0)return;let Y=(-G+Math.sqrt(A))/(2*z),X=(-G-Math.sqrt(A))/(2*z);c=Y*I,d=Y,u=X*I,m=X}let f=a,_=o,x=c*f+d*_,D=u*f+m*_,E=x>0?yw(Math.atan2(d-e,c-t),i):NaN,M=D>0?yw(Math.atan2(m-e,u-t),i):NaN;if(E>=i&&E<=r)return E;if(M>=i&&M<=r)return M}function zee(t,e,n,i,r,s){let o=Math.hypot(t,e),a=(o**2-n**2+s**2)/(2*o),l=o-a,c=Math.atan2(e,t),d=Math.acos(-l/n),u=yw(c+d,i),m=yw(c-d,i);if(u>=i&&u<=r)return u;if(m>=i&&m<=r)return m}function wE(t,e,n,i){let r=[n.convert(0),n.convert(1)],s=[i.convert(0),i.convert(1)],o=Math.PI/-2+Rg(e),a=t?"initial":"update",l=({radius:_})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*_}),c=({radius:_})=>({innerRadius:s[0],outerRadius:s[0]+(s[1]-s[0])*_});return{nodes:{toFn:(_,x,D,{prevLive:E})=>{let{startAngle:M,endAngle:I,innerRadius:z,outerRadius:G}=x,{stroke:A,fill:Y}=x.sectorFormat;if(D==="removed"&&E?(M=E.datum?.endAngle,I=E.datum?.endAngle):D==="removed"&&!E&&(M=o,I=o),D==="removed"){let X=l(x);z=X.innerRadius,G=X.outerRadius}return{startAngle:M,endAngle:I,outerRadius:G,innerRadius:z,stroke:A,fill:Y}},fromFn:(_,x,D,{prevFromProps:E})=>{let{startAngle:M,endAngle:I,innerRadius:z,outerRadius:G}=_,{fill:A,stroke:Y}=x.sectorFormat;if(D==="unknown"||D==="added"&&!E?(M=o,I=o,z=x.innerRadius,G=x.outerRadius):D==="added"&&E&&(M=E.endAngle??o,I=E.endAngle??o,z=E.innerRadius??x.innerRadius,G=E.outerRadius??x.outerRadius),D==="added"&&!t){let X=c(x);z=X.innerRadius,G=X.outerRadius}return D==="updated"&&(A=_.fill??A,Y=_.stroke??Y),{startAngle:M,endAngle:I,innerRadius:z,outerRadius:G,fill:A,stroke:Y,phase:a}}},innerCircle:{fromFn:(_,x)=>({size:_.previousDatum?.radius??_.size??0,phase:a}),toFn:(_,x)=>({size:x.radius??0})}}}function pxe(t,e){return{startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,fill:e.sectorFormat.fill,stroke:e.sectorFormat.stroke}}function mxe(t,e){let n=e.y-t.centerY,i=e.x-t.centerX,r=Math.atan2(n,i),s=t.getItemNodes();for(let o of s)if(o.datum.missing!==!0&&hw(r,o.startAngle,o.endAngle)){let a=Math.sqrt(i*i+n*n),l=0;return a<o.innerRadius?l=o.innerRadius-a:a>o.outerRadius&&(l=a-o.outerRadius),{datum:o.datum,distance:l}}}function m6i(){gw.register(ort,gvi,vvi,urt,p6i,Nvi,Hvi,jvi,qvi,Xvi,n6i,o6i,Kvi);for(let t of[xR,PR,Hte,yR,qG])Hx.register(t.type,{moduleFactory:e=>new t(e),hidden:t===yR})}function f6i(){for(let t of gw.modules){if(t.packageType==="enterprise"&&!s4i(t)&&yr.errorOnce("Unexpected enterprise module registered: "+t.identifier),t.type==="root"&&t.themeTemplate)for(let e of t.chartTypes)xCe.set(e,t.themeTemplate);if(t.type==="series"){if(t.chartTypes.length>1)throw new Error(`AG Charts - Module definition error: ${t.identifier}`);w3.register(t.identifier,t)}if(t.type==="series-option"&&t.themeTemplate)for(let e of t.seriesTypes)w3.setThemeTemplate(e,t.themeTemplate);if(t.type==="axis-option"&&t.themeTemplate)for(let e of t.axisTypes){let n=Hx.getThemeTemplate(e),i=ql(t.themeTemplate,n);Hx.setThemeTemplate(e,i)}t.type==="axis"&&Hx.register(t.identifier,t),t.type==="legend"&&y8e.register(t.identifier,t)}if(gw.hasEnterpriseModules()){let t=o4i();t.length>0&&yr.errorOnce("Enterprise modules expected but not registered: ",t)}}function g6i(t){return t.type==="sankey"||t.type==="chord"}function Xet(t){return t.type==="map-shape"||t.type==="map-line"||t.type==="map-marker"||t.type==="map-shape-background"||t.type==="map-line-background"}function h1(t,e){if(D3(t))return e(t)}function b6i(t,e){let le=t,{xKey:n,dateKey:i=n??"date",highKey:r="high",openKey:s="open",lowKey:o="low",closeKey:a="close",volumeKey:l="volume",chartType:c="candlestick",navigator:d=!1,volume:u=!0,rangeToolbar:m,rangeButtons:f=m??!0,statusBar:_=!0,annotations:x,toolbar:D=x??!0,zoom:E=!0,theme:M,data:I}=le,z=al(le,["xKey","dateKey","highKey","openKey","lowKey","closeKey","volumeKey","chartType","navigator","volume","rangeToolbar","rangeButtons","statusBar","annotations","toolbar","zoom","theme","data"]);n!=null&&yr.warnOnce("Property [xKey] is deprecated, use [dateKey] instead."),m!=null&&yr.warnOnce("Property [rangeToolbar] is deprecated, use [rangeButtons] instead."),x!=null&&yr.warnOnce("Property [annotations] is deprecated, use [toolbar] instead.");let G=S6i(M,c,i,r,o,s,a),A=w6i(M,e,s,a,u,l),X={navigator:ve({enabled:d},u?{miniChart:{enabled:d,series:[{type:"line",xKey:i,yKey:l,marker:{enabled:!1}}]}}:null)},ne=_?{statusBar:{enabled:!0,data:I,highKey:r,openKey:s,lowKey:o,closeKey:a,volumeKey:u?l:void 0}}:null,pe={zoom:{enabled:E,enableIndependentAxes:!0}},ce={chartToolbar:{enabled:!0},toolbar:{seriesType:{enabled:D},annotationOptions:{enabled:D},annotations:{enabled:D},ranges:{enabled:f}}},ie=u?[{type:"number",position:"left",keys:[l],label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percentage",align:"end"}}]:[];return ve(ve(ve(ve(ve({theme:typeof M=="string"?M:ve({baseTheme:"ag-financial"},M??{}),animation:{enabled:!1},legend:{enabled:!1},series:[...A,...G],padding:{top:6,right:8,bottom:5},axes:[{type:"number",position:"right",keys:[s,a,r,o],interval:{maxSpacing:h1(M,Se=>Se.overrides?.common?.axes?.number?.interval?.maxSpacing)??45},label:{format:h1(M,Se=>Se.overrides?.common?.axes?.number?.label?.format)??".2f"},crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percentage",align:"start"}},...ie,{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}],annotations:{enabled:D},tooltip:{enabled:!1},data:I,titlePadding:4},X),ne),pe),ce),z)}function w6i(t,e,n,i,r,s){if(!r)return[];let o=h1(t,l=>l.overrides?.bar?.series?.fill),a=o?{fill:o}:{itemStyler({datum:l}){let{up:c,down:d}=e().palette;return{fill:l[n]<l[i]?c?.fill:d?.fill}}};return[ve({type:"bar",xKey:"date",yKey:s,tooltip:{enabled:!1},highlight:{enabled:!1},fillOpacity:h1(t,l=>l.overrides?.bar?.series?.fillOpacity)??.5},a)]}function S6i(t,e,n,i,r,s,o){e===Hee&&(yr.warnOnce(`type '${e}' is deprecated, use 'hlc' chart type instead`),e="hlc");let a={xKey:n,openKey:s,closeKey:o,highKey:i,lowKey:r},l={xKey:n,yKey:o},c={pickOutsideVisibleMinorAxis:!0};switch(e??"candlestick"){case"ohlc":return[ve(ve({type:"ohlc"},c),a)];case"line":return[St(ve(ve({type:"line"},c),l),{stroke:h1(t,f=>f.overrides?.line?.series?.stroke)??pG,marker:h1(t,f=>f.overrides?.line?.series?.marker)??{enabled:!1}})];case"step-line":return[St(ve(ve({type:"line"},c),l),{stroke:h1(t,f=>f.overrides?.line?.series?.stroke)??pG,interpolation:h1(t,f=>f.overrides?.line?.series?.interpolation)??{type:"step"},marker:h1(t,f=>f.overrides?.line?.series?.marker)??{enabled:!1}})];case"hlc":let d=Qet(Hee,t);return[St(ve({type:Hee},c),{xKey:n,yHighKey:i,yLowKey:o,fill:d.fill??O8e,stroke:d.stroke??F8e,fillOpacity:h1(t,f=>f.overrides?.["range-area"]?.series?.fillOpacity)??.3,strokeWidth:h1(t,f=>f.overrides?.["range-area"]?.series?.strokeWidth)??2}),St(ve({type:Hee},c),{xKey:n,yHighKey:o,yLowKey:r,fill:d.fill??N8e,stroke:d.stroke??L8e,fillOpacity:h1(t,f=>f.overrides?.["range-area"]?.series?.fillOpacity)??.3,strokeWidth:h1(t,f=>f.overrides?.["range-area"]?.series?.strokeWidth)??2}),St(ve(ve({type:"line"},c),l),{stroke:h1(t,f=>f.overrides?.line?.series?.stroke)??B8e,strokeWidth:h1(t,f=>f.overrides?.line?.series?.strokeWidth)??2,marker:h1(t,f=>f.overrides?.line?.series?.marker)??{enabled:!1}})];case"high-low":let u=Qet("range-bar",t);return[St(ve({type:"range-bar"},c),{xKey:n,yHighKey:i,yLowKey:r,fill:u.fill??V8e,stroke:u.stroke??pG,tooltip:{range:"nearest"}})];case"candlestick":return[ve(ve({type:"candlestick"},c),a)];case"hollow-candlestick":let m=h1(t,f=>f.overrides?.candlestick?.series?.item);return[St(ve(ve({type:"candlestick"},c),a),{item:{up:{fill:m?.up?.fill??"transparent"}}})];default:return yr.warnOnce(`unknown chart type: ${e}; expected one of: ${x6i.join(", ")}`),[ve(ve({type:"candlestick"},c),a)]}}function Qet(t,e){let n=h1(e,r=>r.overrides?.[t]?.series?.fill),i=h1(e,r=>r.overrides?.[t]?.series?.stroke);return{fill:n,stroke:i}}function Jet(t,e){let n=[],i=p1.get(AE(t));for(let{type:r,chartTypes:s,optionsKey:o,optionsInnerKey:a,identifier:l}of RR)if(!(i!=="unknown"&&!s.includes(i))){if(r==="root"||r==="legend"){let c=t[o];if(c==null)continue;a?c[a]&&(n.push(`${o}.${a}`),delete c[a]):(n.push(o),delete t[o])}else if(r==="axis"){if(!("axes"in t)||!t.axes?.some(c=>c.type===l))continue;n.push(`axis[type=${l}]`),t.axes=t.axes.filter(c=>c.type!==l)}else if(r==="axis-option"){if(!("axes"in t)||!t.axes?.some(c=>c[o]))continue;n.push(`axis.${o}`),t.axes.forEach(c=>{c[o]&&delete c[o]})}else if(r==="series"){if(!t.series?.some(c=>c.type===l))continue;n.push(`series[type=${l}]`),t.series=t.series.filter(c=>c.type!==l)}else if(r==="series-option"){if(!t.series?.some(c=>c[o]))continue;n.push(`series.${o}`),t.series.forEach(c=>{c[o]&&delete c[o]})}}if(n.length&&!e){let r="ag-charts-enterprise",s="https://charts.ag-grid.com/javascript/installation/";t.mode==="integrated"&&(r="ag-grid-charts-enterprise' or 'ag-grid-enterprise/charts-enterprise",s="https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/"),yr.warnOnce([`unable to use these enterprise features as '${r}' has not been loaded:`,"",...n,"",`See: ${s}`].join(`
`))}}function D6i(t,e=1/0){switch(typeof t){case"undefined":return"undefined";case"number":if(isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";default:return t=JSON.stringify(t),t.length>e?`${t.slice(0,e)}... (+${t.length-e} characters)`:t}}function M6i(t,e,n){let{errors:i}=rst(t,e,n);for(let{message:r}of i)yr.warn(r);return i.length===0}function ett(t,e,n){let i=E3(n)?n:n[qte],r=i?`; expecting ${i}`:"";return`${t?`Option \`${t}\``:"Value"} cannot be set to \`${D6i(e)}\`${r}, ignoring.`}function rst(t,e,n=""){if(!D3(t))return{valid:null,errors:[{path:n,value:t,message:ett(n,t,"an object")}]};let i=new Set(Object.keys(t)),r=[],s={};function o(a){return sp(e)?`${n}[${a}]`:n?`${n}.${a}`:a}for(let[a,l]of Object.entries(e)){i.delete(a);let c=t[a];if(!(!l[E6i]&&typeof c>"u"))if(jx(l))l(c)?s[a]=c:r.push({key:a,path:n,value:c,message:ett(o(a),c,l)});else{let d=rst(c,l,o(a));s[a]=d.valid,r.push(...d.errors)}}for(let a of i)r.push({key:a,path:n,unknown:!0,message:`Unknown option \`${o(a)}\`, ignoring.`});return{valid:s,errors:r}}function aC(t,e){return Object.assign(n=>t(n),{[qte]:e})}function ICe(t){return t?.up||t?.down||t?.neutral?"user-full":t?.fills||t?.strokes?"user-indexed":"inbuilt"}function gxe(t){if(t instanceof Jx)return t;if(t==null||typeof t=="string"){let e=lst[t];return e?e():(yr.warnOnce(`the theme [${t}] is invalid, using [ag-default] instead.`),pR())}if(M6i(t,W6i,"theme")){let e=G6i(t),n=e.baseTheme?gxe(e.baseTheme):pR();return new n.constructor(e)}return pR()}function G6i(t){let e=t,n,i=[];for(;typeof e=="object";)n??(n=e.palette),e.overrides&&i.push(e.overrides),e=e.baseTheme;return{baseTheme:e,overrides:ql(...i),palette:n}}function ntt(t){if(vE(t))return"cartesian";if(Nte(t))return"polar";if(x8e(t))return"hierarchy";if(b8e(t))return"topology";if(w8e(t))return"flow-proportion";throw new Error(`AG Chart - unknown type of chart for options with type: ${t.type}`)}function J5e(t,e,n){let i=Math.sqrt(t**2+e**2),s=Math.atan2(e,t)+n;return{x:Math.cos(s)*i,y:Math.sin(s)*i}}function j6i(t,e,n,i,r){let s=Ate(t,e),o=s*(1-i)/2;if(t+=o,e-=o,s<.001)return 2*n*r;if(s>=2*Math.PI){let f=t+s/2;t=f-Math.PI,e=f+Math.PI}let a=n*Math.cos(t),l=n*Math.sin(t),c=n*Math.cos(e),d=n*Math.sin(e),u=Math.floor(Math.sqrt((a-c)**2+(l-d)**2)),m=2*n*r;return Math.max(1,Math.min(m,u))}function q6i(t,e){return{x:t.x+e.x,y:t.y+e.y}}function yxe(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Z6i(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function X6i(t){return t.x*t.x+t.y*t.y}function Q6i(t,e){let n=yxe(t,e);return Math.sqrt(n.x*n.x+n.y*n.y)}function J6i(t,e){let n=yxe(t,e);return n.x*n.x+n.y*n.y}function eyi(t,e){return Math.atan2(t.y,t.x)-Math.atan2(e.y,e.x)}function tyi(t,e,n=ust()){let i=dst.length(t);return{x:n.x+i*Math.cos(e),y:n.y+i*Math.sin(e)}}function iyi(t,e){return t.x===e.x&&t.y===e.y}function nyi(t,e){return{x:t,y:e}}function ryi(t){return{x:t.offsetX,y:t.offsetY}}function syi(t,e){return t.x=e.x,t.y=e.y,t}function ust(t){return{x:t?.x??0,y:t?.y??0}}function oyi(t,e){let n={};if(Array.isArray(e))for(let i=0;i<t.length;i++)n[`${t[i]}`]=e[i];else for(let i=0;i<t.length;i++)n[`${t[i]}`]=e;return n}function _xe(){return(t,e)=>{let n=[`Property [${t}] is deprecated.`,e].filter(Boolean).join(" ");yr.warnOnce(n)}}function ayi(t,e){let n=_xe(),i=e?.default;return Ux((r,s,o)=>(o!==i&&n(s.toString(),t),o))}function lyi(t,e){let n=_xe();return Ux((i,r,s)=>(s!==i[t]&&(n(r.toString(),`Use [${t}] instead.`),qCe(i,t,e?e(s):s)),ete),(i,r)=>(n(r.toString(),`Use [${t}] instead.`),KCe(i,t)))}function cyi(t,e,n){if(t>e)return;let i;for(;e>=t;){let r=Math.floor((e+t)/2),s=n(r);s==null?e=r-1:(i=s,t=r+1)}return i}function pyi(){let t=new Map;return e=>{let n=t.get(e);return n?(t.set(e,n+1),`${e}${n}`):(t.set(e,1),e)}}var stt,V0i,nC,Me,ott,B0i,z0i,H0i,att,RCe,G0i,W0i,mte,eCe,yr,SE,B4,FCe,K0i,Tnr,dw,V0,Ag,D6,zx,$H,mR,ltt,LCe,ZH,ctt,OCe,XH,dtt,NCe,QH,VCe,iCe,BCe,utt,htt,ptt,mtt,ftt,gtt,Uee,zCe,eR,HCe,GCe,vtt,ytt,_tt,Ctt,xtt,btt,nCe,fte,YJe,gG,Os,mw,wR,D2i,rCe,uw,Ett,z4,SR,Eee,I5e,A5e,E2i,X5,ete,aR,YCe,pl,xte,aCe,ZCe,Ntt,F2i,yG,L2i,O2i,N2i,V2i,Vtt,ite,iR,_G,Btt,ztt,Pg,Mee,H2i,Htt,XJe,W2i,U2i,r0,wte,_w,I6,ME,Us,jtt,Jo,k3,Gr,wu,Ste,Rr,ud,xw,TR,DR,$x,nte,ER,MR,JCe,e8e,$tt,kd,A6,q2i,Tte,Ktt,Z2i,Ytt,X2i,Q2i,Kx,t8e,bw,ww,Dte,qtt,J2i,egi,Ztt,Xtt,Ete,i8e,Qtt,Jtt,n8e,r8e,tit,Sw,Ud,sgi,ogi,rR,w6,rit,sit,agi,lgi,Np,eG,dit,hit,o8e,Ite,VG,a_,git,xo,tC,xgi,tet,bgi,bu,Oh,T6,Egi,Mgi,kgi,H4,M6,i0,a8e,Yx,xit,Mf,l8e,I3,Gu,Fgi,R5e,F5e,Vgi,BG,c8e,Z5,Tit,qx,kR,P6,Vh,oC,f1,Dit,d8e,kit,Wgi,Ugi,ste,iet,net,ret,jgi,set,oet,aet,cet,Ait,$gi,R6,F6,O5e,Pit,Kgi,Ygi,Fte,Rit,kE,g1,zG,IR,u_,gCe,qgi,IE,u8e,h8e,p8e,AR,PR,Hit,det,r3i,jit,yR,HG,$it,gw,o3i,Kit,Dw,GG,Zit,l3i,Xit,m8e,d3i,ent,p3i,Ew,b2,m3i,f3i,Lte,g3i,v3i,y3i,_3i,f8e,C3i,N5e,tnt,int,wG,Og,rnt,yCe,D3i,_Ce,E3i,M3i,I3i,get,g8e,A3i,P3i,B5e,vet,yet,WG,snt,R3i,ont,ant,lnt,N3i,dnt,unt,_R,pnt,mnt,B3i,fnt,gnt,vnt,z5e,xet,ynt,_nt,H5e,wet,lG,oR,Cnt,Ote,xnt,z3i,G5e,H3i,G3i,W3i,cG,bnt,U3i,wnt,Det,nR,JD,Ent,Z3i,Mnt,X3i,Hx,RR,a4i,y8e,knt,l4i,p1,Int,xCe,c4i,w3,_8e,d4i,Ant,u4i,C8e,Pnt,m4i,_4i,bCe,Eet,dG,jG,KH,Vnt,Bnt,znt,Wnt,$G,D8e,KG,I4i,R4i,F4i,L4i,O4i,Met,N4i,V4i,B4i,z4i,r_,E8e,n0,LR,H4i,G4i,W4i,U4i,w2,_E,j4i,$4i,K4i,Qnt,Y4i,q4i,Z4i,X4i,ate,Q4i,J4i,uR,trt,evi,M8e,Zx,zte,nrt,k8e,YG,L6,RE,FE,I8e,Xx,Mw,tvi,ivi,Zee,ket,c_,xR,srt,qG,Hte,rG,Iet,Iee,W5e,A3,OR,ort,lvi,crt,LE,Cw,NR,Wx,Wte,VR,kw,BR,A8e,Iw,P8e,Aee,Pet,G4,gvi,R8e,vvi,xE,yvi,_vi,Aw,urt,hrt,prt,mrt,frt,grt,vrt,uG,sm,t0,yrt,OE,bE,bR,Xee,hG,lte,NE,Cvi,lw,hE,pE,F8e,L8e,O8e,N8e,pG,V8e,_rt,Crt,xrt,brt,wrt,B8e,z8e,W4,H8e,G8e,U4,W8e,j4,U8e,j8e,$8e,K8e,ZG,Bx,Pee,Y8e,h_,Trt,P3,Drt,Ng,Ert,Mrt,HR,v1,wvi,Lee,Oee,kvi,Vrt,Ovi,Nvi,axe,Hrt,Grt,Fm,j5e,zvi,Hvi,jet,$5e,$et,Gvi,VE,cxe,Yrt,sh,Wvi,Uvi,jvi,kf,Ket,$vi,Kvi,s0,Yvi,qvi,qrt,am,Zvi,Xvi,Zrt,Qvi,K5e,S2,x2,q5,Jrt,dxe,uxe,GR,hxe,jte,pc,$te,Jvi,e6i,t6i,i6i,est,n6i,tst,WR,fxe,Kte,hd,r6i,s6i,o6i,Q5,Zet,YH,J1,ist,nst,Y5e,a6i,l6i,c6i,d6i,u6i,h6i,p6i,v6i,y6i,hR,_6i,Yte,q5e,Z5e,X5e,Q5e,MCe,C6i,cw,x6i,Hee,T6i,qte,E6i,k6i,Dnr,Enr,Mnr,knr,ttt,Lx,sst,ost,Inr,Anr,Pnr,Rnr,itt,Gee,ACe,I6i,b6,Jx,Wee,m6,eE,UR,f6,tE,A6i,g6,iE,P6i,v6,nE,R6i,y6,rE,F6i,s_,sE,L6i,o_,oE,O6i,L4,ow,N6i,_6,Ox,V6i,C6,aE,B6i,x6,lE,z6i,pR,H6i,lst,W6i,U6i,cst,qH,DE,mE,rtt,Wi,lC,Zte,cC,vxe,$6i,K6i,Lm,Y6i,O6,Zl,dst,R3,dyi,sG,uyi,Pw,hyi,myi,fyi,gyi,Ka=Q(()=>{stt=Object.defineProperty,V0i=Object.getOwnPropertyDescriptor,nC=(t,e)=>{for(var n in e)stt(t,n,{get:e[n],enumerable:!0})},Me=(t,e,n,i)=>{for(var r=i>1?void 0:i?V0i(e,n):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(r=(i?o(e,n,r):o(r))||r);return i&&r&&stt(e,n,r),r},ott={ariaAnnounceVisible:"visible",ariaAnnounceHidden:"hidden",ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelColorPicker:"Color picker",ariaLabelFinancialCharts:"Financial Charts",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number], ",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelZoomToolbar:"Zoom",ariaValuePanRange:"${min}[percent] to ${max}[percent]",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsColor:"Color",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here"},B0i=["bar","line","scatter"],z0i={},H0i=void 0;H0i=z0i;att=["delete-legacy","disjoint-channel","disjoint-channel-legacy","horizontal-line-legacy","line-color-legacy","lock","lock-legacy","pan-end-legacy","pan-left-legacy","pan-right-legacy","pan-start-legacy","parallel-channel","parallel-channel-legacy","reset-legacy","trend-line","trend-line-legacy","unlock","unlock-legacy","vertical-line","vertical-line-legacy","zoom-in-legacy","zoom-in-alt","zoom-in-alt-legacy","zoom-out-legacy","zoom-out-alt","zoom-out-alt-legacy"],RCe=(t=>(t.POINTER="pointer",t.NODE="node",t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.BOTTOM_RIGHT="bottom-right",t.BOTTOM_LEFT="bottom-left",t))(RCe||{}),G0i={},W0i=void 0;W0i=G0i;mte={};nC(mte,{TimeInterval:()=>SE,day:()=>VCe,friday:()=>ftt,hour:()=>NCe,millisecond:()=>FCe,minute:()=>OCe,monday:()=>utt,month:()=>zCe,saturday:()=>gtt,second:()=>LCe,sunday:()=>BCe,thursday:()=>mtt,tuesday:()=>htt,utcDay:()=>_tt,utcHour:()=>ytt,utcMinute:()=>vtt,utcMonth:()=>Ctt,utcYear:()=>xtt,wednesday:()=>ptt,year:()=>HCe});eCe=new Map;tCe.clear=()=>eCe.clear();yr={log(...t){console.log(...t)},warn(t,...e){console.warn(`AG Charts - ${t}`,...e)},error(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)},table(...t){console.table(...t)},warnOnce(t,...e){tCe(()=>yr.warn(t,...e),`Logger.warn: ${t}`)},errorOnce(t,...e){tCe(()=>yr.error(t,...e),`Logger.error: ${t}`)}},SE=class{constructor(t,e,n){this._encode=t,this._decode=e,this._rangeCallback=n}floor(t){let e=new Date(t),n=this._encode(e);return this._decode(n)}ceil(t){let e=new Date(Number(t)-1),n=this._encode(e);return this._decode(n+1)}range(t,e,n){let i=this._rangeCallback?.(t,e),r=this._encode(n?this.floor(t):this.ceil(t)),s=this._encode(n?this.ceil(e):this.floor(e));if(s<r)return[];let o=[];for(let a=r;a<=s;a++){let l=this._decode(a);o.push(l)}return i?.(),o}},B4=class extends SE{getOffset(t,e){let n=typeof t=="number"||t instanceof Date?this._encode(new Date(t)):0;return Math.floor(n)%e}every(t,e){let n=0,i,r=t;t=Math.max(1,Math.round(t)),r!==t&&yr.warnOnce(`interval step of [${r}] rounded to [${t}].`);let{snapTo:s="start"}=e??{};if(typeof s=="string"){let l=n;i=(c,d)=>{let u=s==="start"?c:d;return n=this.getOffset(u,t),()=>n=l}}else typeof s=="number"?n=this.getOffset(new Date(s),t):s instanceof Date&&(n=this.getOffset(s,t));let o=l=>{let c=this._encode(l);return Math.floor((c-n)/t)},a=l=>this._decode(l*t+n);return new SE(o,a,i)}};FCe=new B4(j0i,$0i),K0i=FCe,Tnr=new Date(0).getFullYear(),dw=1e3,V0=dw*60,Ag=V0*60,D6=Ag*24,zx=D6*7,$H=D6*30,mR=D6*365,ltt=new Date().getTimezoneOffset()*V0;LCe=new B4(Y0i,q0i),ZH=LCe,ctt=new Date().getTimezoneOffset()*V0;OCe=new B4(Z0i,X0i),XH=OCe,dtt=new Date().getTimezoneOffset()*V0;NCe=new B4(Q0i,J0i),QH=NCe;VCe=new B4(e2i,t2i),iCe=VCe;BCe=EE(0),utt=EE(1),htt=EE(2),ptt=EE(3),mtt=EE(4),ftt=EE(5),gtt=EE(6),Uee=BCe;zCe=new B4(i2i,n2i),eR=zCe;HCe=new B4(r2i,s2i),GCe=HCe;vtt=new B4(o2i,a2i);ytt=new B4(l2i,c2i);_tt=new B4(d2i,u2i);Ctt=new B4(h2i,p2i);xtt=new B4(m2i,f2i),btt={};nC(btt,{NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Pg,fromToMotion:()=>om,staticFromToMotion:()=>rC});nCe=new Map;fte="$interpolate",YJe=t=>t[fte]!=null;gG=class tR{constructor(e,n,i,r){this.x=e,this.y=n,this.width=i,this.height=r}static fromDOMRect({x:e,y:n,width:i,height:r}){return new tR(e,n,i,r)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:this.x+this.width,bottom:this.y+this.height,toJSON(){return{}}}}clone(){let{x:e,y:n,width:i,height:r}=this;return new tR(e,n,i,r)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,n){return e>=this.x&&e<=this.x+this.width&&n>=this.y&&n<=this.y+this.height}intersection(e){if(!this.collidesBBox(e))return;let n=Wa(e.x,this.x,e.x+e.width),i=Wa(e.y,this.y,e.y+e.height),r=Wa(e.x,this.x+this.width,e.x+e.width),s=Wa(e.y,this.y+this.height,e.y+e.height);return new tR(n,i,r-n,s-i)}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,n){if(this.containsPoint(e,n))return 0;let i=e-Wa(this.x,e,this.x+this.width),r=n-Wa(this.y,n,this.y+this.height);return i*i+r*r}static nearestBox(e,n,i){return gte(e,n,i)}clip(e){if(e===void 0)return this;let n=Math.max(this.x,e.x),i=Math.max(this.y,e.y),r=Math.min(this.x+this.width,e.x+e.width),s=Math.min(this.y+this.height,e.y+e.height);return this.x=n,this.y=i,this.width=Math.max(0,r-n),this.height=Math.max(0,s-i),this}shrink(e,n){let i=(r,s)=>{switch(r){case"top":this.y+=s;case"bottom":this.height-=s;break;case"left":this.x+=s;case"right":this.width-=s;break;case"vertical":this.y+=s,this.height-=s*2;break;case"horizontal":this.x+=s,this.width-=s*2;break;case void 0:this.x+=s,this.width-=s*2,this.y+=s,this.height-=s*2;break;default:}};return typeof e=="number"?i(n,e):typeof e=="object"&&Object.entries(e).forEach(([r,s])=>i(r,s)),this}grow(e,n){if(typeof e=="number")this.shrink(-e,n);else{let i=ve({},e);for(let r in i)i[r]*=-1;this.shrink(i)}return this}translate(e,n){return this.x+=e,this.y+=n,this}combine(e){let{x:n,y:i,width:r,height:s}=this;this.x=Math.min(n,e.x),this.y=Math.min(i,e.y),this.width=Math.max(n+r,e.x+e.width)-this.x,this.height=Math.max(i+s,e.y+e.height)-this.y}static merge(e){let n=1/0,i=1/0,r=-1/0,s=-1/0;for(let o of e)o.x<n&&(n=o.x),o.y<i&&(i=o.y),o.x+o.width>r&&(r=o.x+o.width),o.y+o.height>s&&(s=o.y+o.height);return new tR(n,i,r-n,s-i)}[fte](e,n){return new tR(this.x*(1-n)+e.x*n,this.y*(1-n)+e.y*n,this.width*(1-n)+e.width*n,this.height*(1-n)+e.height*n)}};gG.zero=Object.freeze(new gG(0,0,0,0));gG.NaN=Object.freeze(new gG(NaN,NaN,NaN,NaN));Os=gG,mw=(t=>(t[t.NONE=0]="NONE",t[t.TRIVIAL=1]="TRIVIAL",t[t.MINOR=2]="MINOR",t[t.MAJOR=3]="MAJOR",t))(mw||{});wR=Symbol("no-change");D2i=class{constructor(){this._dirty=3}markDirty(t,e=1){this._dirty<e&&(this._dirty=e)}markClean(t){this._dirty=0}isDirty(){return this._dirty>0}},rCe=class JH{get e(){return[...this.elements]}constructor(e=[1,0,0,1,0,0]){this.elements=e}setElements(e){let n=this.elements;return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],this}get identity(){let e=this.elements;return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0}AxB(e,n,i){let r=e[0]*n[0]+e[2]*n[1],s=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],l=e[0]*n[4]+e[2]*n[5]+e[4],c=e[1]*n[4]+e[3]*n[5]+e[5];i=i??e,i[0]=r,i[1]=s,i[2]=o,i[3]=a,i[4]=l,i[5]=c}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(e){let n=new Array(6);return this.AxB(this.elements,e.elements,n),new JH(n)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){let e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=1/(n*s-i*r);return n*=l,i*=l,r*=l,s*=l,new JH([s,-i,-r,n,r*a-s*o,i*o-n*a])}inverseTo(e){let n=this.elements,i=n[0],r=n[1],s=n[2],o=n[3],a=n[4],l=n[5],c=1/(i*o-r*s);return i*=c,r*=c,s*=c,o*=c,e.setElements([o,-r,-s,i,s*l-o*a,r*a-i*l]),this}invertSelf(){let e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=1/(n*s-i*r);return n*=l,i*=l,r*=l,s*=l,e[0]=s,e[1]=-i,e[2]=-r,e[3]=n,e[4]=r*a-s*o,e[5]=i*o-n*a,this}transformPoint(e,n){let i=this.elements;return{x:e*i[0]+n*i[2]+i[4],y:e*i[1]+n*i[3]+i[5]}}transformBBox(e,n){let i=this.elements,r=i[0],s=i[1],o=i[2],a=i[3],l=e.width*.5,c=e.height*.5,d=e.x+l,u=e.y+c,m=Math.abs(l*r)+Math.abs(c*o),f=Math.abs(l*s)+Math.abs(c*a);return n??(n=new Os(0,0,0,0)),n.x=d*r+u*o+i[4]-m,n.y=d*s+u*a+i[5]-f,n.width=m+m,n.height=f+f,n}toContext(e){if(this.identity)return;let n=this.elements;e.transform(n[0],n[1],n[2],n[3],n[4],n[5])}static flyweight(e){return JH.instance.setElements(e.elements)}static updateTransformMatrix(e,n,i,r,s,o,a){let l=n,c=i,d,u;l===1&&c===1?(d=0,u=0):(d=a?.scalingCenterX??0,u=a?.scalingCenterY??0);let m=r,f=Math.cos(m),_=Math.sin(m),x,D;m===0?(x=0,D=0):(x=a?.rotationCenterX??0,D=a?.rotationCenterY??0);let E=s,M=o,I=d*(1-l)-x,z=u*(1-c)-D;return e.setElements([f*l,_*l,-_*c,f*c,f*I-_*z+x+E,_*I+f*z+D+M]),e}static fromContext(e){let n=e.getTransform();return new JH([n.a,n.b,n.c,n.d,n.e,n.f])}};rCe.instance=new rCe;uw=rCe,Ett=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(Ett||{}),z4=(()=>{let t=class Mtt extends D2i{constructor({isVirtual:n,tag:i,zIndex:r,name:s}={}){super(),this.serialNumber=Mtt._nextSerialNumber++,this.id=k6(this),this.isContainerNode=!1,this._virtualChildren=[],this._children=[],this.childSet={},this.matrix=new uw,this.dirtyTransform=!1,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0,this.translationX=0,this.translationY=0,this._childNodeCounts={groups:0,nonGroups:0},this.visible=!0,this.dirtyZIndex=!1,this.zIndex=0,this.zIndexSubOrder=void 0,this.pointerEvents=0,this.name=s,this.isVirtual=n??!1,this.tag=i??NaN,this.zIndex=r??0}get datum(){return this._datum??this._parent?.datum}get previousDatum(){return this._previousDatum}set datum(n){this._datum!==n&&(this._previousDatum=this._datum),this._datum=n}_setLayerManager(n){this._layerManager=n,this._debug=n?.debug;for(let i of this._children)i._setLayerManager(n);for(let i of this._virtualChildren)i._setLayerManager(n)}get layerManager(){return this._layerManager}*ancestors(){let n=this;for(;n=n.parent;)yield n}*traverseUp(){yield this,yield*VM(this.ancestors())}get parent(){return this._parent}get children(){return this._virtualChildren.length?this._children.concat(this._virtualChildren.flatMap(n=>n.children)):this._children}get virtualChildren(){return this._virtualChildren}hasVirtualChildren(){return this._virtualChildren.length>0}setProperties(n,i){if(i)for(let r of i)this[r]=n[r];else Object.assign(this,n);return this}append(n){n=Stt(n);for(let i of n){if(i.parent)throw new Error(`${i} already belongs to another parent: ${i.parent}.`);if(i.layerManager)throw new Error(`${i} already belongs to a scene: ${i.layerManager}.`);if(this.childSet[i.id])throw new Error(`Duplicate ${i.constructor.name} node: ${i}`);i.isVirtual?this._virtualChildren.push(i):this._children.push(i),this.childSet[i.id]=!0,i._parent=this,i._setLayerManager(this.layerManager)}this.dirtyZIndex=!0,this.markDirty(this,3)}appendChild(n){return this.append(n),n}removeChild(n){let i=()=>{throw new Error("The node to be removed is not a child of this node.")};if(n.parent!==this&&i(),n.isVirtual){let r=this._virtualChildren.indexOf(n);r<0&&i(),this._virtualChildren.splice(r,1)}else{let r=this._children.indexOf(n);r<0&&i(),this._children.splice(r,1)}return delete this.childSet[n.id],n._parent=void 0,n._setLayerManager(),this.dirtyZIndex=!0,this.markDirty(n,3),n}clear(){for(let n of Ttt(this._virtualChildren,this._children))n._parent=void 0,n._setLayerManager();this._virtualChildren.length=0,this._children.length=0,this.childSet={}}calculateCumulativeMatrix(){this.computeTransformMatrix();let n=uw.flyweight(this.matrix);for(let i of this.ancestors())i.computeTransformMatrix(),n.preMultiplySelf(i.matrix);return n}transformPoint(n,i){return this.calculateCumulativeMatrix().invertSelf().transformPoint(n,i)}inverseTransformPoint(n,i){return this.calculateCumulativeMatrix().transformPoint(n,i)}transformBBox(n){return this.calculateCumulativeMatrix().invertSelf().transformBBox(n)}inverseTransformBBox(n){return this.calculateCumulativeMatrix().transformBBox(n)}markDirtyTransform(){this.dirtyTransform=!0,this.markDirty(this,3)}destroy(){this.parent?.removeChild(this)}containsPoint(n,i){return!1}pickNode(n,i){if(!this.visible||this.pointerEvents===1||!this.containsPoint(n,i))return;let{children:r}=this;if(r.length>1e3)for(let s=r.length-1;s>=0;s--){let o=r[s],l=o.computeTransformedBBox()?.containsPoint(n,i)?o.pickNode(n,i):void 0;if(l)return l}else if(r.length)for(let s=r.length-1;s>=0;s--){let o=r[s].pickNode(n,i);if(o)return o}else if(!this.isContainerNode)return this}getBBox(n=!1){return(this.cachedBBox==null||n)&&(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}computeTransformedBBox(){let n=this.getBBox()?.clone();if(!n)return;this.computeTransformMatrix();let i=uw.flyweight(this.matrix);for(let r of this.ancestors())r.computeTransformMatrix(),i.preMultiplySelf(r.matrix);return i.transformBBox(n,n),n}computeTransformMatrix(){if(!this.dirtyTransform)return;let{matrix:n,scalingX:i,scalingY:r,rotation:s,translationX:o,translationY:a,scalingCenterX:l,scalingCenterY:c,rotationCenterX:d,rotationCenterY:u}=this;uw.updateTransformMatrix(n,i,r,s,o,a,{scalingCenterX:l,scalingCenterY:c,rotationCenterX:d,rotationCenterY:u}),this.dirtyTransform=!1}transformRenderContext(n,i){return this.computeTransformMatrix(),this.matrix.toContext(i??n.ctx),this.matrix}preRender(){this._childNodeCounts.groups=0,this._childNodeCounts.nonGroups=1;for(let n of this.children){let i=n.preRender();this._childNodeCounts.groups+=i.groups,this._childNodeCounts.nonGroups+=i.nonGroups}return this._childNodeCounts}render(n){let{stats:i}=n;this._dirty=0,this.cachedBBox=this.computeBBox(),i&&i.nodesRendered++}markDirty(n,i=1,r=i){this.cachedBBox=void 0,!(this._dirty>i||this._dirty===i&&i===r)&&(this._dirty=i,this.parent?this.parent.markDirty(this,r):this.layerManager&&this.layerManager.markDirty())}get dirty(){return this._dirty}markClean(n){let{force:i=!1,recursive:r=!0}=n??{};if(!(this._dirty===0&&!i)){if(this._dirty=0,r!==!1)for(let s of this._virtualChildren)s.markClean({force:i});if(r===!0)for(let s of this._children)s.markClean({force:i})}}onVisibleChange(){}get nodeCount(){let n=1,i=this._dirty>=0||this.dirtyTransform?1:0,r=this.visible?1:0,s=o=>{let{count:a,visibleCount:l,dirtyCount:c}=o.nodeCount;n+=a,r+=l,i+=c};for(let o of this._children)s(o);for(let o of this._virtualChildren)s(o);return{count:n,visibleCount:r,dirtyCount:i}}onZIndexChange(){this.parent&&(this.parent.dirtyZIndex=!0)}};return t._nextSerialNumber=0,t})();Me([Ss({type:"transform"})],z4.prototype,"scalingX",2);Me([Ss({type:"transform"})],z4.prototype,"scalingY",2);Me([Ss({type:"transform"})],z4.prototype,"scalingCenterX",2);Me([Ss({type:"transform"})],z4.prototype,"scalingCenterY",2);Me([Ss({type:"transform"})],z4.prototype,"rotationCenterX",2);Me([Ss({type:"transform"})],z4.prototype,"rotationCenterY",2);Me([Ss({type:"transform"})],z4.prototype,"rotation",2);Me([Ss({type:"transform"})],z4.prototype,"translationX",2);Me([Ss({type:"transform"})],z4.prototype,"translationY",2);Me([Ss({redraw:3,changeCb:t=>t.onVisibleChange()})],z4.prototype,"visible",2);Me([Ss({redraw:1,changeCb:t=>t.onZIndexChange()})],z4.prototype,"zIndex",2);Me([Ss({redraw:1,changeCb:t=>t.onZIndexChange()})],z4.prototype,"zIndexSubOrder",2);SR=z4,Eee=(t,e,n)=>t*(1-n)+e*n,I5e=t=>{let e=t<0?-1:1,n=Math.abs(t);return n<=.04045?t/12.92:e*((n+.055)/1.055)**2.4},A5e=t=>{let e=t<0?-1:1,n=Math.abs(t);return n>.0031308?e*(1.055*n**(1/2.4)-.055):12.92*t},E2i=(()=>{let t=class Hu{constructor(n,i,r,s=1){this.r=Wa(0,n||0,1),this.g=Wa(0,i||0,1),this.b=Wa(0,r||0,1),this.a=Wa(0,s||0,1)}static validColorString(n){return n.indexOf("#")>=0?!!Hu.parseHex(n):n.indexOf("rgb")>=0?!!Hu.stringToRgba(n):!!Hu.nameToHex[n.toLowerCase()]}static fromString(n){if(n.indexOf("#")>=0)return Hu.fromHexString(n);let i=Hu.nameToHex[n.toLowerCase()];if(i)return Hu.fromHexString(i);if(n.indexOf("rgb")>=0)return Hu.fromRgbaString(n);throw new Error(`Invalid color string: '${n}'`)}static parseHex(n){n=n.replace(/ /g,"").slice(1);let i;switch(n.length){case 6:case 8:i=[];for(let r=0;r<n.length;r+=2)i.push(parseInt(`${n[r]}${n[r+1]}`,16));break;case 3:case 4:i=n.split("").map(r=>parseInt(r,16)).map(r=>r+r*16);break}if(i?.length>=3&&i.every(r=>r>=0))return i.length===3&&i.push(255),i}static fromHexString(n){let i=Hu.parseHex(n);if(i){let[r,s,o,a]=i;return new Hu(r/255,s/255,o/255,a/255)}throw new Error(`Malformed hexadecimal color string: '${n}'`)}static stringToRgba(n){let i=-1,r=-1;for(let l=0;l<n.length;l++){let c=n[l];if(i===-1&&c==="(")i=l;else if(c===")"){r=l;break}}if(i===-1||r===-1)return;let o=n.substring(i+1,r).split(","),a=[];for(let l=0;l<o.length;l++){let c=o[l],d=parseFloat(c);if(!Number.isFinite(d))return;c.indexOf("%")>=0?(d=Wa(0,d,100),d/=100):l===3?d=Wa(0,d,1):(d=Wa(0,d,255),d/=255),a.push(d)}return a}static fromRgbaString(n){let i=Hu.stringToRgba(n);if(i){if(i.length===3)return new Hu(i[0],i[1],i[2]);if(i.length===4)return new Hu(i[0],i[1],i[2],i[3])}throw new Error(`Malformed rgb/rgba color string: '${n}'`)}static fromArray(n){if(n.length===4)return new Hu(n[0],n[1],n[2],n[3]);if(n.length===3)return new Hu(n[0],n[1],n[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(n,i,r,s=1){let o=Hu.HSBtoRGB(n,i,r);return new Hu(o[0],o[1],o[2],s)}static fromHSL(n,i,r,s=1){let o=Hu.HSLtoRGB(n,i,r);return new Hu(o[0],o[1],o[2],s)}static fromOKLCH(n,i,r,s=1){let o=Hu.OKLCHtoRGB(n,i,r);return new Hu(o[0],o[1],o[2],s)}static padHex(n){return n.length===1?"0"+n:n}toHexString(){let n="#"+Hu.padHex(Math.round(this.r*255).toString(16))+Hu.padHex(Math.round(this.g*255).toString(16))+Hu.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(n+=Hu.padHex(Math.round(this.a*255).toString(16))),n}toRgbaString(n=3){let i=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],r=Math.pow(10,n);return this.a!==1?(i.push(Math.round(this.a*r)/r),`rgba(${i.join(", ")})`):`rgb(${i.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return Hu.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(n,i,r){let s=I5e(n),o=I5e(i),a=I5e(r),l=Math.cbrt(.4122214708*s+.5363325363*o+.0514459929*a),c=Math.cbrt(.2119034982*s+.6806995451*o+.1073969566*a),d=Math.cbrt(.0883024619*s+.2817188376*o+.6299787005*a),u=.2104542553*l+.793617785*c-.0040720468*d,m=1.9779984951*l-2.428592205*c+.4505937099*d,f=.0259040371*l+.7827717662*c-.808675766*d,_=Math.atan2(f,m)*180/Math.PI,x=u,D=Math.hypot(m,f),E=_>=0?_:_+360;return[x,D,E]}static OKLCHtoRGB(n,i,r){let s=n,o=i*Math.cos(r*Math.PI/180),a=i*Math.sin(r*Math.PI/180),l=(s+.3963377774*o+.2158037573*a)**3,c=(s-.1055613458*o-.0638541728*a)**3,d=(s-.0894841775*o-1.291485548*a)**3,u=4.0767416621*l-3.3077115913*c+.2309699292*d,m=-1.2684380046*l+2.6097574011*c-.3413193965*d,f=-.0041960863*l-.7034186147*c+1.707614701*d,_=A5e(u),x=A5e(m),D=A5e(f);return[_,x,D]}static RGBtoHSL(n,i,r){let s=Math.min(n,i,r),o=Math.max(n,i,r),a=(o+s)/2,l,c;if(o===s)l=0,c=0;else{let d=o-s;c=a>.5?d/(2-o-s):d/(o+s),o===n?l=(i-r)/d+(i<r?6:0):o===i?l=(r-n)/d+2:l=(n-i)/d+4,l*=60}return[l,c,a]}static HSLtoRGB(n,i,r){if(n=(n%360+360)%360,i===0)return[r,r,r];let s=r<.5?r*(1+i):r+i-r*i,o=2*r-s;function a(u){return u<0&&(u+=1),u>1&&(u-=1),u<.16666666666666666?o+(s-o)*6*u:u<.5?s:u<.6666666666666666?o+(s-o)*(.6666666666666666-u)*6:o}let l=a(n/360+1/3),c=a(n/360),d=a(n/360-1/3);return[l,c,d]}static RGBtoHSB(n,i,r){let s=Math.min(n,i,r),o=Math.max(n,i,r),a=o===0?0:(o-s)/o,l=0;if(s!==o){let c=o-s,d=(o-n)/c,u=(o-i)/c,m=(o-r)/c;n===o?l=m-u:i===o?l=2+d-m:l=4+u-d,l/=6,l<0&&(l=l+1)}return[l*360,a,o]}static HSBtoRGB(n,i,r){n=(n%360+360)%360/360;let s=0,o=0,a=0;if(i===0)s=o=a=r;else{let l=(n-Math.floor(n))*6,c=l-Math.floor(l),d=r*(1-i),u=r*(1-i*c),m=r*(1-i*(1-c));switch(l>>0){case 0:s=r,o=m,a=d;break;case 1:s=u,o=r,a=d;break;case 2:s=d,o=r,a=m;break;case 3:s=d,o=u,a=r;break;case 4:s=m,o=d,a=r;break;case 5:s=r,o=d,a=u;break}}return[s,o,a]}static mix(n,i,r){return new Hu(Eee(n.r,i.r,r),Eee(n.g,i.g,r),Eee(n.b,i.b,r),Eee(n.a,i.a,r))}};return t.nameToHex={__proto__:null,aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",transparent:"#00000000",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},t})(),X5=E2i;ete=Symbol("BREAK"),aR="__decorator_config";YCe=new Set(["__proto__","constructor","prototype"]);pl=class{set(t){let{className:e=this.constructor.name}=this.constructor;if(typeof t!="object")return yr.warn(`unable to set ${e} - expecting a properties object`),this;let n=new Set(Object.keys(t));for(let i of lR(this))if(n.has(i)){let r=t[i],s=this;eC(s[i])?s[i]=s[i]instanceof xte?s[i].reset(r):s[i].set(r):s[i]=r,n.delete(i)}for(let i of n)yr.warn(`unable to set [${i}] in ${e} - property is unknown`);return this}isValid(t){return lR(this).every(e=>{let{optional:n}=I2i(this,e),i=n===!0||typeof this[e]<"u";return i||yr.warnOnce(`${t??""}[${e}] is required.`),i})}toJson(){return lR(this).reduce((t,e)=>{let n=this[e];return t[e]=eC(n)?n.toJson():n,t},{})}},xte=class Ott extends Array{constructor(e,...n){super(n.length);let r=(s=>!!s?.prototype?.constructor?.name)(e)?s=>new e().set(s):e;Object.defineProperty(this,"itemFactory",{value:r,enumerable:!1,configurable:!1}),this.set(n)}set(e){if(sp(e)){this.length=e.length;for(let n=0;n<e.length;n++)this[n]=this.itemFactory(e[n])}return this}reset(e){return new Ott(this.itemFactory,...e)}toJson(){return this.map(e=>e?.toJson?.()??e)}};aCe="class-instance";ZCe={};nC(ZCe,{easeIn:()=>F2i,easeInOut:()=>L2i,easeInOutQuad:()=>V2i,easeInQuad:()=>O2i,easeOut:()=>yG,easeOutQuad:()=>N2i,inverseEaseOut:()=>Vtt,linear:()=>Ntt});Ntt=t=>t,F2i=t=>1-Math.cos(t*Math.PI/2),yG=t=>Math.sin(t*Math.PI/2),L2i=t=>-(Math.cos(t*Math.PI)-1)/2,O2i=t=>t*t,N2i=t=>1-(1-t)**2,V2i=t=>t<.5?2*t*t:1-(-2*t+2)**2/2,Vtt=t=>2*Math.asin(t)/Math.PI,ite=.2,iR=["initial","remove","update","add","trailing","end","none"],_G={initial:{animationDuration:1,animationDelay:0},add:{animationDuration:.25,animationDelay:.75},remove:{animationDuration:.25,animationDelay:0},update:{animationDuration:.5,animationDelay:.25},trailing:{animationDuration:ite,animationDelay:1,skipIfNoEarlierAnimations:!0},end:{animationDelay:1+ite,animationDuration:0,skipIfNoEarlierAnimations:!0},none:{animationDuration:0,animationDelay:0}},Btt=(t=>(t.Loop="loop",t.Reverse="reverse",t))(Btt||{});ztt=class{constructor(t){this.isComplete=!1,this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1,this.id=t.id,this.groupId=t.groupId,this.autoplay=t.autoplay??!0,this.ease=t.ease??Ntt,this.phase=t.phase;let e=t.duration??_G[this.phase].animationDuration;this.duration=e*t.defaultDuration,this.delay=(t.delay??0)*t.defaultDuration,this.onComplete=t.onComplete,this.onPlay=t.onPlay,this.onStop=t.onStop,this.onUpdate=t.onUpdate,this.interpolate=this.createInterpolator(t.from,t.to),this.from=t.from,t.skip===!0&&(this.onUpdate?.(t.to,!1,this),this.onStop?.(this),this.onComplete?.(this),this.isComplete=!0),t.collapsable!==!1&&(this.duration=this.checkCollapse(t,this.duration))}checkCollapse(t,e){return t.from===t.to?0:(typeof t.from=="object"?V4(t.from,t.to):null)?e:0}play(t=!1){this.isPlaying||this.isComplete||(this.isPlaying=!0,this.onPlay?.(this),this.autoplay&&(this.autoplay=!1,t&&this.onUpdate?.(this.from,!0,this)))}pause(){this.isPlaying=!1}stop(){this.isPlaying=!1,this.isComplete||(this.isComplete=!0,this.onStop?.(this))}update(t){if(this.isComplete)return t;!this.isPlaying&&this.autoplay&&this.play(!0);let e=this.elapsed;if(this.elapsed+=t,this.delay>this.elapsed)return 0;let n=this.interpolate(this.isReverse?1-this.delta:this.delta);this.onUpdate?.(n,!1,this);let i=this.delay+this.duration;return this.elapsed>=i?(this.stop(),this.isComplete=!0,this.onComplete?.(this),t-(i-e)):0}get delta(){return this.ease(Wa(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(t,e){if(typeof e!="object"||YJe(e))return this.interpolateValue(t,e);let n=[];for(let i in e){let r=this.interpolateValue(t[i],e[i]);r!=null&&n.push([i,r])}return i=>{let r={};for(let[s,o]of n)r[s]=o(i);return r}}interpolateValue(t,e){if(!(t===void 0||e===void 0)){if(YJe(t))return n=>t[fte](e,n);try{switch(typeof t){case"number":return ktt(t,e);case"string":return Itt(t,e);case"boolean":if(t===e)return()=>t;break}}catch{}throw new Error(`Unable to interpolate values: ${t}, ${e}`)}}},Pg={added:"add",updated:"update",removed:"remove",unknown:"initial","no-op":"none"};Mee={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};H2i=0,Htt=1,XJe=4;W2i={a:t=>Mee.shortDays[t.getDay()],A:t=>Mee.days[t.getDay()],b:t=>Mee.shortMonths[t.getMonth()],B:t=>Mee.months[t.getMonth()],c:"%x, %X",d:(t,e)=>O0(t.getDate(),2,e??"0"),e:"%_d",f:(t,e)=>O0(t.getMilliseconds()*1e3,6,e??"0"),H:(t,e)=>O0(t.getHours(),2,e??"0"),I:(t,e)=>{let n=t.getHours()%12;return n===0?"12":O0(n,2,e??"0")},j:(t,e)=>O0(XCe(t)+1,3,e??"0"),m:(t,e)=>O0(t.getMonth()+1,2,e??"0"),M:(t,e)=>O0(t.getMinutes(),2,e??"0"),L:(t,e)=>O0(t.getMilliseconds(),3,e??"0"),p:t=>t.getHours()<12?"AM":"PM",Q:t=>String(t.getTime()),s:t=>String(Math.floor(t.getTime()/1e3)),S:(t,e)=>O0(t.getSeconds(),2,e??"0"),u:t=>{let e=t.getDay();return e<1&&(e+=7),String(e%7)},U:(t,e)=>O0(ZJe(t,H2i),2,e??"0"),V:(t,e)=>O0(Gtt(t),2,e??"0"),w:(t,e)=>O0(t.getDay(),2,e??"0"),W:(t,e)=>O0(ZJe(t,Htt),2,e??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(t,e)=>O0(t.getFullYear()%100,2,e??"0"),Y:(t,e)=>O0(t.getFullYear(),4,e??"0"),Z:t=>G2i(t),"%":()=>"%"},U2i={_:" ",0:"0","-":""};r0=(t,e)=>{let n=Symbol(String(e));t[n]=void 0,Object.defineProperty(t,e,{get(){return this[n]},set(i){this[n]!==i&&(this[n]=i,this.invalid=!0)},enumerable:!0,configurable:!1})},wte=class Utt{constructor(){this.type="band",this.invalid=!0,this.range=[0,1],this.round=!1,this.interval=void 0,this.index=new Map,this.ordinalRange=[],this._domain=[],this._bandwidth=1,this._step=1,this._inset=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0}static is(e){return e instanceof Utt}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&yr.warnOnce("Expected update to not invalidate scale"))}set domain(e){this.index=new Map,this.invalid=!0,this._domain=[];for(let n of e){let i=S3(n);this.getIndex(i)===void 0&&this.index.set(i,this._domain.push(n)-1)}}get domain(){return this._domain}getDomain(){return this._domain}ticks(){return this.refresh(),this._domain}convert(e){this.refresh();let n=this.getIndex(e);return n==null?NaN:this.ordinalRange[n]??NaN}invert(e){this.refresh();let n=this.ordinalRange.findIndex(i=>i===e);return this.domain[n]}invertNearest(e){this.refresh();let n=-1,i=1/0,r=this.ordinalRange.findIndex((s,o)=>{if(s===e)return!0;let a=Math.abs(e-s);return a<i&&(i=a,n=o),!1});return this.domain[r]??this.domain[n]}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get inset(){return this.refresh(),this._inset}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(e){e=Wa(0,e,1),this._paddingInner=e,this._paddingOuter=e}get padding(){return this._paddingInner}set paddingInner(e){this._paddingInner=Wa(0,e,1)}get paddingInner(){return this._paddingInner}set paddingOuter(e){this._paddingOuter=Wa(0,e,1)}get paddingOuter(){return this._paddingOuter}update(){let e=this._domain.length;if(e===0)return;let[n,i]=this.range,{_paddingInner:r}=this,{_paddingOuter:s,round:o}=this,a=i-n,l,c,d;e===1?(r=0,l=a*(1-s*2),c=o?Math.round(l):l,d=a*s):(l=a/Math.max(1,e-r+s*2),c=o?Math.floor(l):l,d=n+(a-c*(e-r))/2);let u=c*(1-r);o&&(d=Math.round(d),u=Math.round(u)),this._step=c,this._inset=d,this._bandwidth=u,this._rawBandwidth=l*(1-r),this.ordinalRange=this._domain.map((m,f)=>d+c*f)}getIndex(e){return this.index.get(e instanceof Date?e.getTime():e)}};Me([r0],wte.prototype,"range",2);Me([r0],wte.prototype,"round",2);Me([r0],wte.prototype,"interval",2);_w=wte;I6=(...t)=>{let e=[];return au((n,i)=>(e.length=0,t.every(r=>{let s=r(n,i);return s||e.push(OG(r,i)),s})),()=>e.filter(Boolean).join(" AND "))},ME=(...t)=>au((e,n)=>t.some(i=>i(e,n)),e=>t.map(igi(e)).filter(Boolean).join(" OR ")),Us=eit(au((t,e)=>eC(t)||D3(t)&&eC(e.target[e.property]),"a properties object")),jtt=eit(au(t=>D3(t),"an object")),Jo=au(jCe,"a boolean"),k3=au(jx,"a function"),Gr=au(E3,"a string"),wu=rgi(au(Tc,"a number")),Ste=au(t=>O4(t)&&isNaN(t),"NaN"),Rr=wu.restrict({min:0}),ud=wu.restrict({min:0,max:1}),xw=wu.restrict({min:-360,max:360}),TR=ME(wu,Ste),DR=ngi(au(sp,"an array")),$x=(t,e)=>au((n,i)=>sp(n)&&n.every(r=>t(r,i)),n=>{let i=OG(DR,n)??"";return e?`${i} of ${e}`:i}),nte=t=>Tc(t)||FG(t),ER=t=>au((e,n)=>!nte(e)||!nte(n.target[t])||e<n.target[t],`to be less than ${t}`),MR=t=>au((e,n)=>!nte(e)||!nte(n.target[t])||e>n.target[t],`to be greater than ${t}`),JCe=au(FG,"Date object"),e8e=ME(JCe,Rr),$tt="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",kd=au(t=>E3(t)&&X5.validColorString(t),`color String. ${$tt}`),A6=au($x(kd),`color strings. ${$tt}`),q2i=$x(Jo,"boolean values"),Tte=$x(wu,"numbers"),Ktt=$x(Gr,"strings"),Z2i=au($x(JCe),"Date objects"),Ytt=au($x(Us),"objects"),X2i=Su(["butt","round","square"],"a line cap"),Q2i=Su(["round","bevel","miter"],"a line join"),Kx=au($x(Rr),"numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),t8e=Su(["top","right","bottom","left"],"a position"),bw=Su(["normal","italic","oblique"],"a font style"),ww=ME(Su(["normal","bold","bolder","lighter"],"a font weight"),wu.restrict({min:1,max:1e3})),Dte=Su(["never","always","hyphenate","on-space"],"a text wrap strategy"),qtt=Su(["left","center","right"],"a text align"),J2i=Su(["top","middle","bottom"],"a vertical align"),egi=Su(["ellipsis","hide"],"an overflow strategy"),Ztt=Su(["horizontal","vertical"],"a direction"),Xtt=Su(["inside","outside"],"a placement"),Ete=ME(Su(["exact","nearest"],"interaction range"),wu),i8e=Su(["top","bottom","left","right"]);Qtt=ME(I6(wu.restrict({min:1}),ER("maxSpacing")),Ste),Jtt=ME(I6(wu.restrict({min:1}),MR("minSpacing")),Ste);n8e=(t=>(t.X="x",t.Y="y",t))(n8e||{}),r8e=class{constructor(){this.moduleMap=new Map}*modules(){let t=["toolbar","navigator"];for(let e of this.moduleMap.values())t.includes(e.module.optionsKey)||(yield e.moduleInstance);for(let e of t){let n=this.moduleMap.get(e);n&&(yield n.moduleInstance)}}addModule(t,e){if(this.moduleMap.has(t.optionsKey))throw new Error(`AG Charts - module already initialised: ${t.optionsKey}`);this.moduleMap.set(t.optionsKey,{module:t,moduleInstance:e(t)})}removeModule(t){let e=E3(t)?t:t.optionsKey;this.moduleMap.get(e)?.moduleInstance.destroy(),this.moduleMap.delete(e)}getModule(t){return this.moduleMap.get(E3(t)?t:t.optionsKey)?.moduleInstance}isEnabled(t){return this.moduleMap.has(E3(t)?t:t.optionsKey)}mapModules(t){return Array.from(this.moduleMap.values(),(e,n)=>t(e.moduleInstance,n))}destroy(){for(let t of this.moduleMap.keys())this.moduleMap.get(t)?.moduleInstance.destroy();this.moduleMap.clear()}},tit={};nC(tit,{resetMotion:()=>Ef});Sw=(()=>{let t=class lCe{constructor(n,i){this.invalid=!0,this.nice=!1,this.interval=void 0,this.tickCount=lCe.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.domain=n,this.range=i}static is(n){return n instanceof lCe}transform(n){return n}transformInvert(n){return n}calcBandwidth(n=1){let i=this.getDomain(),r=this.getPixelRange(),s=Math.abs(i[1]-i[0])/n+1,o=Math.floor(r),a=Math.min(s,o);return r/Math.max(1,a)}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(n,i){let r=i?.clampMode??this.defaultClampMode;if(!this.domain||this.domain.length<2)return NaN;this.refresh();let s=this.getDomain().map(u=>this.transform(u)),[o,a]=s,{range:l}=this,[c,d]=l;if(n=this.transform(n),r==="clamped"){let[u,m]=N4(s.map(Number));if(Number(n)<u)return c;if(Number(n)>m)return d}return o===a?(c+d)/2:n===o?c:n===a?d:c+(Number(n)-Number(o))/(Number(a)-Number(o))*(d-c)}invert(n){this.refresh();let i=this.getDomain().map(f=>this.transform(f)),[r,s]=i,{range:o}=this,[a,l]=o,c=a>l,d=c?l:a,u=c?a:l,m;return n<d?c?s:r:n>u?c?r:s:(a===l?m=this.toDomain((Number(r)+Number(s))/2):m=this.toDomain(Number(r)+(n-a)/(l-a)*(Number(s)-Number(r))),this.transformInvert(m))}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&yr.warnOnce("Expected update to not invalidate scale"))}getPixelRange(){let[n,i]=this.range;return Math.abs(i-n)}};return t.defaultTickCount=5,t.defaultMaxTickCount=6,t})();Me([r0],Sw.prototype,"domain",2);Me([r0],Sw.prototype,"range",2);Me([r0],Sw.prototype,"nice",2);Me([r0],Sw.prototype,"interval",2);Me([r0],Sw.prototype,"tickCount",2);Me([r0],Sw.prototype,"minTickCount",2);Me([r0],Sw.prototype,"maxTickCount",2);Ud=Sw;sgi=/^(?:(.)?([<>=^]))?([+\-( ])?([$€£¥₣₹#])?(0)?(\d+)?(,)?(?:\.(\d+))?(~)?([%a-z])?$/i,ogi=/^((?:[^#]|#[^{])*)#{([^}]+)}(.*)$/,rR={b:t=>kee(t).toString(2),c:t=>String.fromCharCode(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>kee(t).toString(8),x:t=>kee(t).toString(16),X:t=>rR.x(t).toUpperCase(),n:t=>rR.d(t),"%":t=>`${kee(t*100).toFixed(0)}`},w6={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>w6.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>w6.f(t,e).toUpperCase(),g:(t,e)=>{if(t===0)return"0";let n=Math.abs(t),i=Math.floor(Math.log10(n));return i>=-4&&i<e?n.toFixed(e-1-i):n.toExponential(e-1)},G:(t,e)=>w6.g(t,e).toUpperCase(),n:(t,e)=>w6.g(t,e),p:(t,e)=>w6.r(t*100,e),r:(t,e)=>{if(t===0)return"0";let n=Math.abs(t),r=Math.floor(Math.log10(n))-(e-1);if(r<=0)return n.toFixed(-r);let s=10**r;return(Math.round(n/s)*s).toFixed()},s:(t,e)=>{let n=oit(t);return w6.r(t/10**n,e)},"%":(t,e)=>w6.f(t*100,e)},rit=-24,sit=24,agi={[rit]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"\xB5",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[sit]:"Y"},lgi="\u2212";Np=(t,e,n)=>({duration:e*n,timeInterval:t,step:n}),eG=[Np(ZH,dw,1),Np(ZH,dw,5),Np(ZH,dw,15),Np(ZH,dw,30),Np(XH,V0,1),Np(XH,V0,5),Np(XH,V0,15),Np(XH,V0,30),Np(QH,Ag,1),Np(QH,Ag,3),Np(QH,Ag,6),Np(QH,Ag,12),Np(iCe,D6,1),Np(iCe,D6,2),Np(Uee,zx,1),Np(Uee,zx,2),Np(Uee,zx,3),Np(eR,$H,1),Np(eR,$H,2),Np(eR,$H,3),Np(eR,$H,4),Np(eR,$H,6),Np(GCe,mR,1)],dit=[1,2,5,10];hit=class uCe extends Ud{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.baseLog=$Je,this.basePow=$Je,this.log=e=>Math.min(...this.domain)>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>Math.min(...this.domain)>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return Math.min(...this.domain)>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return Math.min(...this.domain)>=0?Math.exp(e):-Math.exp(-e)}refresh(){this.base<=0&&(this.base=0,yr.warnOnce("expecting a finite Number greater than to 0")),super.refresh()}update(){!this.domain||this.domain.length<2||(this.baseLog=uCe.getBaseLogMethod(this.base),this.basePow=uCe.getBasePowerMethod(this.base),this.nice&&this.updateNiceDomain())}updateNiceDomain(){let[e,n]=this.domain,i=e>n?Math.ceil:Math.floor,r=e>n?Math.floor:Math.ceil,s=this.pow(i(this.log(e))),o=this.pow(r(this.log(n)));this.niceDomain=[s,o]}ticks(){let e=this.tickCount??10;if(!this.domain||this.domain.length<2||e<1)return[];this.refresh();let n=this.base,[i,r]=this.getDomain(),s=Math.min(i,r),o=Math.max(i,r),a=this.log(s),l=this.log(o);if(this.interval){let x=M=>M>=s&&M<=o,D=Math.min(Math.abs(this.interval),Math.abs(l-a)),E=CG(a,l,D).map(this.pow).filter(x);if(!xG(E.length,this.getPixelRange()))return E}let c=n%1===0,d=l-a>=e;if(!c||d)return kte(a,l,Math.min(l-a,e)).map(this.pow);let u=[],m=s>0;a=Math.floor(a)-1,l=Math.round(l)+1;let f=fR(this.range)/e,_=1/0;for(let x=a;x<=l;x++){let D=this.convert(this.pow(x+1));for(let E=1;E<n;E++){let M=m?E:n-E+1,I=this.pow(x)*M,z=this.convert(I),G=Math.abs(_-z),A=Math.abs(z-D),Y=G>=f&&A>=f;I>=s&&I<=o&&(E===1||Y||u.length===0)&&(u.push(I),_=z)}}return u}tickFormat({count:e,ticks:n,specifier:i}){return e!==1/0&&n==null&&this.ticks(),i??(i=this.base===10?".0e":","),E3(i)?nit(i):i}static getBaseLogMethod(e){switch(e){case 10:return Math.log10;case Math.E:return Math.log;case 2:return Math.log2;default:let n=Math.log(e);return i=>Math.log(i)/n}}static getBasePowerMethod(e){switch(e){case 10:return n=>n>=0?10**n:1/10**-n;case Math.E:return Math.exp;default:return n=>e**n}}};Me([r0],hit.prototype,"base",2);o8e=hit,Ite=class jee extends Ud{constructor(){super([],[0,1]),this.type="time"}toDomain(e){return new Date(e)}convert(e,n){return super.convert(new Date(e),n)}invert(e){return new Date(super.invert(e))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();let{interval:e,nice:n,tickCount:i,minTickCount:r,maxTickCount:s}=this,[o,a]=N4(this.getDomain().map(S3));return e!=null?jee.getTicksForInterval({start:o,stop:a,interval:e,availableRange:this.getPixelRange()})??jee.getDefaultTicks({start:o,stop:a,tickCount:i,minTickCount:r,maxTickCount:s}):n&&i===2?this.niceDomain:n&&i===1?this.niceDomain.slice(0,1):jee.getDefaultTicks({start:o,stop:a,tickCount:i,minTickCount:r,maxTickCount:s})}static getDefaultTicks({start:e,stop:n,tickCount:i,minTickCount:r,maxTickCount:s}){let o=QJe(e,n,i,r,s);return o?o.range(new Date(e),new Date(n)):[]}static getTicksForInterval({start:e,stop:n,interval:i,availableRange:r}){if(!i)return[];if(i instanceof SE){let u=i.range(new Date(e),new Date(n));return xG(u.length,r)?void 0:u}let s=Math.abs(i);if(xG((n-e)/s,r))return;let a=[...eG].reverse().find(u=>s%u.duration===0);if(a)return a.timeInterval.every(s/(a.duration/a.step)).range(new Date(e),new Date(n));let l=new Date(e),c=new Date(n),d=[];for(;l<=c;)d.push(l),l=new Date(l),l.setMilliseconds(l.getMilliseconds()+s);return d}tickFormat({ticks:e,domain:n,specifier:i,formatOffset:r}){return i==null?QCe(e,n,r):LG(i)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}updateNiceDomain(){let[n,i]=this.domain;for(let r=0;r<4;r++){this.updateNiceDomainIteration(n,i);let[s,o]=this.niceDomain;if(S3(n)===S3(s)&&S3(i)===S3(o))break;n=s,i=o}}updateNiceDomainIteration(e,n){let i=Math.min(S3(e),S3(n)),r=Math.max(S3(e),S3(n)),s=e>n,{interval:o}=this,a;if(o instanceof SE)a=o;else{let l=typeof o=="number"?(r-i)/Math.max(o,1):this.tickCount;a=QJe(i,r,l,this.minTickCount,this.maxTickCount)}if(a){let l=a.range(new Date(i),new Date(r),!0),c=s?[...l].reverse():l,d=c[0],u=c.at(-1);this.niceDomain=[d,u]}}};VG=class pit extends _w{constructor(){super(...arguments),this.type="ordinal-time",this.tickCount=Ud.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.interval=void 0,this._domain=[],this.timestamps=[],this.sortedTimestamps=[],this.visibleRange=[0,1]}static is(e){return e instanceof pit}setVisibleRange(e){this.visibleRange=e}set domain(e){if(this.invalid=!0,e.length===0){this._domain=[];return}this._domain=e,this.timestamps=Mte(e.map(S3)),this.sortedTimestamps=this.timestamps.slice().sort(Cgi)}get domain(){return this._domain}ticks(){this.refresh();let[e,n]=[this.timestamps[0],this.timestamps.at(-1)],i=Math.min(e,n),r=Math.max(e,n),s=e>n,o;if(this.interval==null)o=this.getDefaultTicks(this.maxTickCount,s);else{let[l,c]=this.range,d=Math.abs(c-l);o=Ite.getTicksForInterval({start:i,stop:r,interval:this.interval,availableRange:d})??[]}let a=new Set;return o.filter(l=>{let c=this.convert(l);return isNaN(c)||a.has(c)?!1:(a.add(c),!0)})}getDefaultTicks(e,n){let i=[],r=this.timestamps.length,s=Math.ceil(r*(this.visibleRange[1]-this.visibleRange[0])/e),o=Math.floor(s/2);for(let[a,l]of this.timestamps.entries())s>0&&(a+o)%s||(n?i.push(new Date(this.timestamps[r-a-1])):i.push(new Date(l)));return i}convert(e){this.refresh();let n=Number(e);if(n<this.sortedTimestamps[0])return NaN;let i=this.findInterval(n);return this.timestamps[0]!==this.sortedTimestamps[0]&&(i=this.timestamps.length-i-1),this.ordinalRange[i]??NaN}findInterval(e){let{sortedTimestamps:n}=this,i=0,r=n.length-1;for(;i<=r;){let s=Math.floor((i+r)/2);if(n[s]===e)return s;n[s]<e?i=s+1:r=s-1}return i}tickFormat({ticks:e,domain:n,specifier:i}){return i==null?QCe(e,n):LG(i)}invert(e){this.refresh();let n=this.ordinalRange.findIndex(i=>e<=i);return this.domain[n]}invertNearest(e){return new Date(super.invertNearest(e))}};Me([r0],VG.prototype,"tickCount",2);Me([r0],VG.prototype,"minTickCount",2);Me([r0],VG.prototype,"maxTickCount",2);Me([r0],VG.prototype,"interval",2);a_=VG;git=(()=>{let t=class $ee extends SR{constructor(n){super({isVirtual:n?.isVirtual,name:n?.name}),this.opts=n,this.opacity=1,this.lastBBox=void 0;let{zIndex:i,zIndexSubOrder:r}=n??{};this.isContainerNode=!0,i!==void 0&&(this.zIndex=i),r!==void 0&&(this.zIndexSubOrder=r)}static is(n){return n instanceof $ee}onZIndexChange(){super.onZIndexChange(),this.layer&&this._layerManager?.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder)}isLayer(){return this.layer!=null}_setLayerManager(n){if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw new Error("AG Charts - unable to deregister scene rendering layer!");super._setLayerManager(n)}initialiseLayer(){this.layer||!this._layerManager||this.opts?.layer!==!0||(this.layer=this._layerManager.addLayer({name:this.name,zIndex:this.zIndex,zIndexSubOrder:this.zIndexSubOrder,getComputedOpacity:()=>this.getComputedOpacity(),getVisibility:()=>this.getVisibility()}))}getComputedOpacity(){let n=1;for(let i of this.traverseUp())i instanceof $ee&&(n*=i.opacity);return n}getVisibility(){for(let n of this.traverseUp())if(!n.visible)return!1;return!0}onVisibleChange(){this.layer&&(this.layer.enabled=this.visible)}markDirty(n,i=1){if(this.isVirtual){super.markDirty(n,i);return}let r=i;(i<2||this.layer!=null)&&(r=1),super.markDirty(n,i,r)}containsPoint(n,i){return!0}computeBBox(){return this.computeTransformMatrix(),$ee.computeBBox(this.children)}computeTransformedBBox(){return this.getBBox()}computeTransformedRegionBBox(){return this.clipRect?(this.computeTransformMatrix(),this.matrix.transformBBox(this.clipRect)):this.computeTransformedBBox()}preRender(){let n=super.preRender();return n.groups+=1,n.nonGroups-=1,this.opts?.layer!==!0||this.layer!=null||(n.nonGroups>0&&this.initialiseLayer(),this.opts?.nonEmptyChildDerivedZIndex&&n.nonGroups>0&&this.deriveZIndexFromChildren()),n}deriveZIndexFromChildren(){let n=this.children.filter(r=>r._childNodeCounts.nonGroups>0);this.sortChildren(n);let i=n.at(-1);this.zIndex=i?.zIndex??-1/0,this.zIndexSubOrder=i?.zIndexSubOrder}render(n){let{opts:{name:i=void 0}={},_debug:r}=this,{dirty:s,dirtyZIndex:o,layer:a,children:l,clipRect:c,dirtyTransform:d}=this,{ctx:u,forceRender:m,clipBBox:f}=n,{resized:_,stats:x}=n,D=u.getTransform(),E=s>=2||o||_,M=E,I=!1;for(let pe of l)if(M||(M=pe.layerManager==null&&pe.dirty>=1),I||(I=pe.layerManager!=null&&pe.dirty>=1),M)break;if(i&&r?.({name:i,group:this,isDirty:E,isChildDirty:M,dirtyTransform:d,renderCtx:n,forceRender:m}),d)m="dirtyTransform";else if(a){let pe=this.getBBox();(this.lastBBox===void 0||!this.lastBBox.equals(pe))&&(m="dirtyTransform",this.lastBBox=pe)}if(!E&&!M&&!I&&!m){i&&x&&r?.({name:i,result:"skipping",renderCtx:n,counts:this.nodeCount,group:this}),a&&x&&(x.layersSkipped++,x.nodesSkipped+=this.nodeCount.count),this.markClean({recursive:!1});return}let z=this.visible;if(a){if(u=a.context,u.save(),u.setTransform(a.pixelRatio,0,0,a.pixelRatio,0,0),m!=="dirtyTransform"&&(m=M||o),m&&a.clear(),f){let{width:pe,height:ce,x:ie,y:le}=f;r?.(()=>({name:i,clipBBox:f,ctxTransform:u.getTransform(),renderCtx:n,group:this})),u.beginPath(),u.rect(ie,le,pe,ce),u.clip()}u.setTransform(D)}else u.globalAlpha*=this.opacity;let G=this.transformRenderContext(n,u);if(c){let{x:pe,y:ce,width:ie,height:le}=c;u.save(),r?.(()=>({name:i,clipRect:c,ctxTransform:u.getTransform(),renderCtx:n,group:this})),u.beginPath(),u.rect(pe,ce,ie,le),u.clip(),f=G.transformBBox(c)}let A=this.hasVirtualChildren();o?(this.sortChildren(l),m!=="dirtyTransform"&&(m=!0)):A&&this.sortChildren(l);let X=m!==n.forceRender||f!==n.clipBBox||u!==n.ctx?St(ve({},n),{ctx:u,forceRender:m,clipBBox:f}):n,ne=0;for(let pe of l){if(!pe.visible||!z){pe.markClean(),x&&(ne+=pe.nodeCount.count);continue}if(!m&&pe.dirty===0){x&&(ne+=pe.nodeCount.count);continue}u.save(),pe.render(X),u.restore()}if(x&&(x.nodesSkipped+=ne),super.render(n),c&&u.restore(),A)for(let pe of this.virtualChildren)pe.markClean({recursive:"virtual"});a&&(x&&x.layersRendered++,u.restore(),m&&a.snapshot(),a.context.verifyDepthZero?.()),i&&x&&r?.({name:i,result:"rendered",skipped:ne,renderCtx:n,counts:this.nodeCount,group:this})}sortChildren(n){this.dirtyZIndex=!1,n.sort((i,r)=>fit([i.zIndex,...i.zIndexSubOrder??[void 0,void 0],i.serialNumber],[r.zIndex,...r.zIndexSubOrder??[void 0,void 0],r.serialNumber],mit))}static computeBBox(n,i){let r=1/0,s=-1/0,o=1/0,a=-1/0,l=i?.skipInvisible??!0;for(let c of n){if(l&&!c.visible)continue;let d=c.computeTransformedBBox();if(!d)continue;let{x:u,y:m,width:f,height:_}=d;u<r&&(r=u),m<o&&(o=m),u+f>s&&(s=u+f),m+_>a&&(a=m+_)}return new Os(r,o,s-r,a-o)}setClipRectInGroupCoordinateSpace(n){this.clipRect=n?this.transformBBox(n):void 0}};return t.className="Group",t})();Me([Ss({redraw:3,convertor:t=>Wa(0,t,1)})],git.prototype,"opacity",2);xo=git,tC={};typeof window<"u"?tC.window=window:typeof global<"u"&&(tC.window=global.window);typeof document<"u"?tC.document=document:typeof global<"u"&&(tC.document=global.document);xgi=2e3,tet=Date.now(),bgi=()=>{let t=Date.now()-tet;if(t>xgi){let e=(Math.floor(t/100)/10).toFixed(1);yr.log(`**** ${e}s since last log message ****`)}tet=Date.now()},bu={create(...t){return Object.assign((...n)=>{bu.check(...t)&&(typeof n[0]=="function"&&(n=cCe(n[0]())),bgi(),yr.log(...n))},{check:()=>bu.check(...t)})},check(...t){return t.length===0&&t.push(!0),cCe(d_("agChartsDebug")).some(n=>t.includes(n))}},Oh=class cE{constructor(e,n,i=!0){this.parentNode=e,this.autoCleanup=i,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=bu.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(SR,n)?()=>new n:n}static select(e,n,i=!0){return new cE(e,n,i)}static selectAll(e,n){let i=[],r=s=>{n(s)&&i.push(s),s.children.forEach(r)};return r(e),i}static selectByClass(e,n,...i){return cE.selectAll(e,r=>r instanceof n||i.some(s=>r instanceof s))}static selectByTag(e,n){return cE.selectAll(e,i=>i.tag===n)}createNode(e,n,i){let r=this.nodeFactory(e);return r.datum=e,n?.(r),i==null?this._nodes.push(r):this._nodes.splice(i,0,r),this.parentNode.appendChild(r),r}update(e,n,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){let r=new Map(e.map((s,o)=>[i(s),[s,o]]));for(let[s,o]of this._nodesMap.entries())if(r.has(o)){let[a]=r.get(o);s.datum=a,this.garbageBin.delete(s),r.delete(o)}else this.garbageBin.add(s);for(let[s,[o,a]]of r.entries())this._nodesMap.set(this.createNode(o,n,a),s)}else{let r=Math.max(e.length,this.data.length);for(let s=0;s<r;s++)s>=e.length?this.garbageBin.add(this._nodes[s]):s>=this._nodes.length?this.createNode(e[s],n):(this._nodes[s].datum=e[s],this.garbageBin.delete(this._nodes[s]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return this.garbageBin.size===0?this:(this._nodes=this._nodes.filter(e=>this.garbageBin.has(e)?(this._nodesMap.delete(e),this.garbageBin.delete(e),e.destroy(),!1):!0),this)}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}each(e){for(let n of this._nodes.entries())e(n[1],n[1].datum,n[0]);return this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){let n=this._nodes[e],i=this._nodes[e].datum;yield{node:n,datum:i,index:e}}}select(e){return cE.selectAll(this.parentNode,e)}selectByClass(e){return cE.selectByClass(this.parentNode,e)}selectByTag(e){return cE.selectByTag(this.parentNode,e)}nodes(){return this._nodes}at(e){return this._nodes.at(e)}},T6=Math.PI*2;Egi=class{constructor(t=[]){this.stops=t}},Mgi=class extends Egi{constructor(t,e=0){super(t),this.angle=e}createGradient(t,e){let{stops:i,angle:r}=this,s=Nh(Rg(r+90)),o=Math.cos(s),a=Math.sin(s),l=e.width,c=e.height,d=e.x+l*.5,u=e.y+c*.5;if(l>0&&c>0){let m=Math.sqrt(c*c+l*l)/2,f=Math.atan2(c,l),_;s<Math.PI/2?_=s:s<Math.PI?_=Math.PI-s:s<1.5*Math.PI?_=s-Math.PI:_=2*Math.PI-s;let x=m*Math.abs(Math.cos(_-f)),D=t.createLinearGradient(d+o*x,u+a*x,d-o*x,u-a*x);for(let E of i)D.addColorStop(E.offset,E.color);return D}return"black"}},kgi=/^linear-gradient\((-?[\d.]+)deg,(.*?)\)$/i,H4=(()=>{let t=class Y5 extends SR{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=Y5.defaultStyles.fill,this.stroke=Y5.defaultStyles.stroke,this.strokeWidth=Y5.defaultStyles.strokeWidth,this.lineDash=Y5.defaultStyles.lineDash,this.lineDashOffset=Y5.defaultStyles.lineDashOffset,this.lineCap=Y5.defaultStyles.lineCap,this.lineJoin=Y5.defaultStyles.lineJoin,this.miterLimit=void 0,this.opacity=Y5.defaultStyles.opacity,this.fillShadow=Y5.defaultStyles.fillShadow}restoreOwnStyles(){let{defaultStyles:n}=this.constructor;Object.assign(this,n)}onFillChange(){let{fill:n}=this,i;if(n?.startsWith("linear-gradient")&&(i=kgi.exec(n))){let r=parseFloat(i[1]),s=[],o=i[2],a=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi,l;for(;l=a.exec(o);)s.push(l[0]);this.gradient=new Mgi(s.map((c,d)=>({color:c,offset:d/(s.length-1)})),r)}else this.gradient=void 0}align(n,i){let r=this.layerManager?.canvas?.pixelRatio??1,s=Math.round(n*r)/r;return i==null?s:i===0?0:i<1?Math.ceil(i*r)/r:Math.round((i+n)*r)/r-s}fillStroke(n,i){this.renderFill(n,i),this.renderStroke(n,i)}renderFill(n,i){if(this.fill){let{globalAlpha:r}=n;this.applyFill(n),this.applyFillAlpha(n),this.applyShadow(n),this.executeFill(n,i),n.globalAlpha=r}n.shadowColor="rgba(0, 0, 0, 0)"}executeFill(n,i){i?n.fill(i):n.fill()}applyFill(n){n.fillStyle=this.gradient?.createGradient(n,this.getBBox())??this.fill}applyFillAlpha(n){n.globalAlpha*=this.opacity*this.fillOpacity}applyShadow(n){let i=this.layerManager?.canvas.pixelRatio??1,r=this.fillShadow;r?.enabled&&(n.shadowColor=r.color,n.shadowOffsetX=r.xOffset*i,n.shadowOffsetY=r.yOffset*i,n.shadowBlur=r.blur*i)}renderStroke(n,i){if(this.stroke&&this.strokeWidth){let{globalAlpha:r}=n;n.strokeStyle=this.stroke,n.globalAlpha*=this.opacity*this.strokeOpacity,n.lineWidth=this.strokeWidth,this.lineDash&&n.setLineDash(this.lineDash),this.lineDashOffset&&(n.lineDashOffset=this.lineDashOffset),this.lineCap&&(n.lineCap=this.lineCap),this.lineJoin&&(n.lineJoin=this.lineJoin),this.miterLimit!=null&&(n.miterLimit=this.miterLimit),this.executeStroke(n,i),n.globalAlpha=r}}executeStroke(n,i){i?n.stroke(i):n.stroke()}containsPoint(n,i){return this.isPointInPath(n,i)}};return t.defaultStyles={fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0},t})();Me([Ss({redraw:2})],H4.prototype,"fillOpacity",2);Me([Ss({redraw:2})],H4.prototype,"strokeOpacity",2);Me([Ss({redraw:2,changeCb:t=>t.onFillChange()})],H4.prototype,"fill",2);Me([Ss({redraw:2})],H4.prototype,"stroke",2);Me([Ss({redraw:2})],H4.prototype,"strokeWidth",2);Me([Ss({redraw:2})],H4.prototype,"lineDash",2);Me([Ss({redraw:2})],H4.prototype,"lineDashOffset",2);Me([Ss({redraw:2})],H4.prototype,"lineCap",2);Me([Ss({redraw:2})],H4.prototype,"lineJoin",2);Me([Ss({redraw:2})],H4.prototype,"miterLimit",2);Me([Ss({redraw:2,convertor:t=>Wa(0,t,1)})],H4.prototype,"opacity",2);Me([Ss({redraw:2,checkDirtyOnAssignment:!0})],H4.prototype,"fillShadow",2);M6=H4,i0=class extends M6{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(t){this.x1=t,this.x2=t}set y(t){this.y1=t,this.y2=t}computeBBox(){return new Os(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(t,e){if(this.x1===this.x2||this.y1===this.y2){let{x:n,y:i}=this.transformPoint(t,e);return this.getBBox().clone().grow(this.strokeWidth/2).containsPoint(n,i)}return!1}distanceSquared(t,e){let{x1:n,y1:i,x2:r,y2:s}=this;return Kee(t,e,n,i,r,s,1/0)}render(t){let{ctx:e,forceRender:n,stats:i,devicePixelRatio:r}=t;if(this.dirty===0&&!n){i&&(i.nodesSkipped+=this.nodeCount.count);return}this.transformRenderContext(t);let{x1:s,y1:o,x2:a,y2:l}=this;if(s===a){let{strokeWidth:c}=this,d=Math.round(s*r)/r+Math.trunc(c*r)%2/(r*2);s=d,a=d}else if(o===l){let{strokeWidth:c}=this,d=Math.round(o*r)/r+Math.trunc(c*r)%2/(r*2);o=d,l=d}e.beginPath(),e.moveTo(s,o),e.lineTo(a,l),this.fillStroke(e),this.fillShadow?.markClean(),super.render(t)}};i0.className="Line";i0.defaultStyles=Object.assign({},M6.defaultStyles,{fill:void 0,strokeWidth:1});Me([Ss({redraw:3})],i0.prototype,"x1",2);Me([Ss({redraw:3})],i0.prototype,"y1",2);Me([Ss({redraw:3})],i0.prototype,"x2",2);Me([Ss({redraw:3})],i0.prototype,"y2",2);a8e=class{constructor(t=5){this.maxCacheSize=t,this.store=new Map}get(t){if(!this.store.has(t))return;let e=this.store.get(t);return this.store.delete(t),this.store.set(t,e),e}has(t){return this.store.has(t)}set(t,e){if(this.store.set(t,e),this.store.size>this.maxCacheSize){let n=this.store.keys(),i=this.store.size-this.maxCacheSize;for(;i>0;){let r=n.next();r.done||this.store.delete(r.value),i--}}return e}clear(){this.store.clear()}},Yx=class{static measureText(t,e){return this.getMeasurer(e).measureText(t)}static measureLines(t,e){return this.getMeasurer(e).measureLines(t)}static getMeasurer(t){let e=typeof t.font=="string"?t.font:Mf.toFontString(t.font),n=`${e}-${t.textAlign??"start"}-${t.textBaseline??"alphabetic"}`;return this.instanceMap.get(n)??this.createFontMeasurer(e,t,n)}static createFontMeasurer(t,e,n){let i=Igi();i.font=t,i.textAlign=e.textAlign??"start",i.textBaseline=e.textBaseline??"alphabetic";let r=new xit(i,e);return this.instanceMap.set(n,r),r}};Yx.instanceMap=new a8e(10);xit=class{constructor(t,e){this.ctx=t,this.measureMap=new a8e(100),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline),t.font=typeof e.font=="string"?e.font:Mf.toFontString(e.font),this.textMeasurer=new l8e(n=>this.cachedCtxMeasureText(n),e.textBaseline??"alphabetic")}textWidth(t,e){return this.textMeasurer.textWidth(t,e)}measureText(t){return this.textMeasurer.measureText(t)}measureLines(t){return this.textMeasurer.measureLines(t)}cachedCtxMeasureText(t){if(!this.measureMap.has(t)){let e=this.ctx.measureText(t);this.measureMap.set(t,{actualBoundingBoxAscent:e.actualBoundingBoxAscent,emHeightAscent:e.emHeightAscent,emHeightDescent:e.emHeightDescent,actualBoundingBoxDescent:e.actualBoundingBoxDescent,actualBoundingBoxLeft:e.actualBoundingBoxLeft,actualBoundingBoxRight:e.actualBoundingBoxRight,alphabeticBaseline:e.alphabeticBaseline,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent,hangingBaseline:e.hangingBaseline,ideographicBaseline:e.ideographicBaseline,width:e.width})}return this.measureMap.get(t)}},Mf=(()=>{let t=class{static toFontString({fontSize:e=10,fontStyle:n,fontWeight:i,fontFamily:r,lineHeight:s}){let o="";return n&&(o+=`${n} `),i&&(o+=`${i} `),o+=`${e}px`,s&&(o+=`/${s}px`),o+=` ${r}`,o.trim()}static getLineHeight(e){return Math.ceil(e*this.defaultLineHeight)}static getVerticalModifier(e){switch(e){case"hanging":case"top":return 0;case"middle":return .5;case"alphabetic":case"bottom":case"ideographic":default:return 1}}};return t.EllipsisChar="\u2026",t.defaultLineHeight=1.15,t.lineSplitter=/\r?\n/g,t})(),l8e=class{constructor(t,e="alphabetic"){this.measureTextFn=t,this.textBaseline=e,this.charMap=new Map}getMetrics(t){let e=this.measureTextFn(t);return e.fontBoundingBoxAscent??(e.fontBoundingBoxAscent=e.emHeightAscent),e.fontBoundingBoxDescent??(e.fontBoundingBoxDescent=e.emHeightDescent),{width:e.width,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,lineHeight:e.fontBoundingBoxAscent+e.fontBoundingBoxDescent,offsetTop:e.actualBoundingBoxAscent,offsetLeft:e.actualBoundingBoxLeft}}getMultilineMetrics(t){let e=0,n=0,i=0,r=0,s=0,o=Mf.getVerticalModifier(this.textBaseline),a=[],l=0,c=t.length;for(let d of t){let u=this.measureTextFn(d);u.fontBoundingBoxAscent??(u.fontBoundingBoxAscent=u.emHeightAscent),u.fontBoundingBoxDescent??(u.fontBoundingBoxDescent=u.emHeightDescent),e<u.width&&(e=u.width),r<u.actualBoundingBoxLeft&&(r=u.actualBoundingBoxLeft),l===0?(n+=u.actualBoundingBoxAscent,i+=u.actualBoundingBoxAscent):s+=u.fontBoundingBoxAscent,l===c-1?n+=u.actualBoundingBoxDescent:s+=u.fontBoundingBoxDescent,a.push({text:d,width:u.width,height:u.actualBoundingBoxAscent+u.actualBoundingBoxDescent,lineHeight:u.fontBoundingBoxAscent+u.fontBoundingBoxDescent,offsetTop:u.actualBoundingBoxAscent,offsetLeft:u.actualBoundingBoxLeft}),l++}return n+=s,i+=s*o,{width:e,height:n,offsetTop:i,offsetLeft:r,lineMetrics:a}}textWidth(t,e){if(e){let n=0;for(let i=0;i<t.length;i++)n+=this.textWidth(t.charAt(i));return n}return t.length>1?this.measureTextFn(t).width:this.charMap.get(t)??this.charWidth(t)}measureText(t){return this.getMetrics(t)}measureLines(t){let e=typeof t=="string"?t.split(Mf.lineSplitter):t;return this.getMultilineMetrics(e)}charWidth(t){let{width:e}=this.measureTextFn(t);return this.charMap.set(t,e),e}};I3=class Yee extends M6{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=Yee.defaultStyles.textAlign,this.textBaseline=Yee.defaultStyles.textBaseline}onTextChange(){this.lines=this.text?.split(`
`).map(e=>e.trim())??[]}static computeBBox(e,n,i,r){let{offsetTop:s,offsetLeft:o,width:a,height:l}=Yx.measureLines(e,r);return new Os(n-o,i-s,a,l)}computeBBox(){let{x:e,y:n,lines:i,textBaseline:r,textAlign:s}=this;return Yee.computeBBox(i,e,n,{font:this,textBaseline:r,textAlign:s})}isPointInPath(e,n){let i=this.transformPoint(e,n),r=this.getBBox();return r?r.containsPoint(i.x,i.y):!1}render(e){let{ctx:n,forceRender:i,stats:r}=e;if(this.dirty===0&&!i){r&&(r.nodesSkipped+=this.nodeCount.count);return}if(!this.lines.length||!this.layerManager){r&&(r.nodesSkipped+=this.nodeCount.count);return}this.transformRenderContext(e);let{fill:s,stroke:o,strokeWidth:a}=this,{pixelRatio:l}=this.layerManager.canvas;if(n.font=Mf.toFontString(this),n.textAlign=this.textAlign,n.textBaseline=this.textBaseline,s){n.fillStyle=s,n.globalAlpha*=this.opacity*this.fillOpacity;let{fillShadow:c}=this;c?.enabled&&(n.shadowColor=c.color,n.shadowOffsetX=c.xOffset*l,n.shadowOffsetY=c.yOffset*l,n.shadowBlur=c.blur*l),this.renderLines((d,u,m)=>n.fillText(d,u,m))}if(o&&a){n.strokeStyle=o,n.lineWidth=a,n.globalAlpha*=this.opacity*this.strokeOpacity;let{lineDash:c,lineDashOffset:d,lineCap:u,lineJoin:m}=this;c&&n.setLineDash(c),d&&(n.lineDashOffset=d),u&&(n.lineCap=u),m&&(n.lineJoin=m),this.renderLines((f,_,x)=>n.strokeText(f,_,x))}super.render(e)}renderLines(e){let{lines:n,x:i,y:r}=this,s=this.lineHeight??Mf.getLineHeight(this.fontSize),o=(s-s*n.length)*Mf.getVerticalModifier(this.textBaseline);for(let a of n)e(a,i,r+o),o+=s}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}};I3.className="Text";I3.defaultLineHeightRatio=1.15;I3.defaultStyles=Object.assign({},M6.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"});Me([Ss({redraw:3})],I3.prototype,"x",2);Me([Ss({redraw:3})],I3.prototype,"y",2);Me([Ss({redraw:3,changeCb:t=>t.onTextChange()})],I3.prototype,"text",2);Me([Pte()],I3.prototype,"fontStyle",2);Me([Pte()],I3.prototype,"fontWeight",2);Me([Pte()],I3.prototype,"fontSize",2);Me([Pte()],I3.prototype,"fontFamily",2);Me([Ss({redraw:3})],I3.prototype,"textAlign",2);Me([Ss({redraw:3})],I3.prototype,"textBaseline",2);Me([Ss({redraw:3})],I3.prototype,"lineHeight",2);Gu=I3;Fgi={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0}};R5e="color: green",F5e="color: grey",Vgi=(()=>{let t=class b3{constructor(n,i,r){this.defaultState=n,this.states=i,this.enterEach=r,this.debug=bu.create(!0,"animation"),this.state=n,this.debug(`%c${this.constructor.name} | init -> ${n}`,R5e)}transition(n,i){if(!this.transitionChild(n,i)||this.state===b3.child||this.state===b3.parent)return;let s=this.state,o=this.states[this.state],a=o[n],l=`%c${this.constructor.name} | ${this.state} -> ${n} ->`;if(Array.isArray(a))a=a.find(u=>{if(!u.guard)return!0;let m=u.guard(i);return m||this.debug(`${l} ${u.target} (guarded)`,F5e),m});else if(typeof a=="object"&&!(a instanceof b3)&&a.guard&&!a.guard(i)){this.debug(`${l} ${a.target} (guarded)`,F5e);return}if(!a){this.debug(`${l} ${this.state}`,F5e);return}let c=this.getDestinationState(a),d=c===this.state?void 0:o.onExit;this.debug(`${l} ${c}`,R5e),this.state=c,typeof a=="function"?a(i):typeof a=="object"&&!(a instanceof b3)&&a.action?.(i),d?.(),this.enterEach?.(s,c),c!==s&&c!==b3.child&&c!==b3.parent&&this.states[c].onEnter?.(s,i)}is(n){return this.state===b3.child&&this.childState?this.childState.is(n):this.state===n}resetHierarchy(){this.debug(`%c${this.constructor.name} | ${this.state} -> [resetHierarchy] -> ${this.defaultState}`,"color: green"),this.state=this.defaultState}transitionChild(n,i){return this.state!==b3.child||!this.childState||(this.childState.transition(n,i),!this.childState.is(b3.parent))?!0:(this.debug(`%c${this.constructor.name} | ${this.state} -> ${n} -> ${this.defaultState}`,R5e),this.state=this.defaultState,this.states[this.state].onEnter?.(),this.childState.resetHierarchy(),!1)}getDestinationState(n){let i=this.state;return typeof n=="string"?i=n:n instanceof b3?(this.childState=n,i=b3.child):typeof n=="object"&&(n.target instanceof b3?(this.childState=n.target,i=b3.child):i=n.target),i}};return t.child="__child",t.parent="__parent",t})(),BG=Vgi,c8e=class{static wrapText(t,e){return this.wrapLines(t,e).join(`
`)}static wrapLines(t,e){let n=this.textWrap(t,e);return e.overflow==="hide"&&n.some(i=>i.endsWith(Mf.EllipsisChar))?[]:n}static appendEllipsis(t){return t.replace(/[.,]{1,5}$/,"")+Mf.EllipsisChar}static truncateLine(t,e,n,i){let r=e.textWidth(Mf.EllipsisChar),s=0,o=0;for(;o<t.length;o++){let a=e.textWidth(t.charAt(o));if(s+a>n)break;s+=a}if(t.length===o&&(!i||s+r<=n))return i?t+Mf.EllipsisChar:t;for(t=t.slice(0,o).trimEnd();t.length&&e.textWidth(t)+r>n;)t=t.slice(0,-1).trimEnd();return t+Mf.EllipsisChar}static textWrap(t,e){let n=t.split(Mf.lineSplitter),i=Yx.getMeasurer(e);if(e.textWrap==="never")return n.map(a=>this.truncateLine(a.trimEnd(),i,e.maxWidth));let r=[],s=e.textWrap==="hyphenate",o=e.textWrap==null||e.textWrap==="on-space";for(let a of n){if(a=a.trimEnd(),a===""){r.push(a);continue}for(let l=0,c=0,d=0;l<a.length;l++){let u=a.charAt(l);if(c+=i.textWidth(u),u===" "&&(d=l),c>e.maxWidth){if(l===0)break;let m=i.textWidth(a.slice(0,l+1));if(m<=e.maxWidth){c=m;continue}if(d){let x=this.getWordAt(a,d+1),D=i.textWidth(x);if(D<=e.maxWidth){r.push(a.slice(0,d).trimEnd()),a=a.slice(d).trimStart(),l=-1,c=0,d=0;continue}else o&&D>e.maxWidth&&r.push(a.slice(0,d).trimEnd(),this.truncateLine(a.slice(d).trimStart(),i,e.maxWidth,!0))}else o&&r.push(this.truncateLine(a,i,e.maxWidth,!0));if(o){a="";break}let f=s?"-":"",_=a.slice(0,l).trim();for(;_.length&&i.textWidth(_+f)>e.maxWidth;)_=_.slice(0,-1).trimEnd();if(r.push(_+f),!_.length){a="";break}a=a.slice(_.length).trimStart(),l=-1,c=0,d=0}}a&&r.push(a)}return this.avoidOrphans(r,i,e),this.clipLines(r,i,e)}static getWordAt(t,e){let n=t.indexOf(" ",e);return n===-1?t.slice(e):t.slice(e,n)}static clipLines(t,e,n){if(!n.maxHeight)return t;let{height:i,lineMetrics:r}=e.measureLines(t);if(i<=n.maxHeight)return t;for(let s=0,o=0;s<r.length;s++){let{lineHeight:a}=r[s];if(o+=a,o>n.maxHeight){if(n.overflow==="hide")return[];let l=t.slice(0,s||1),c=l.pop();return l.concat(this.truncateLine(c,e,n.maxWidth,!0))}}return t}static avoidOrphans(t,e,n){if(n.avoidOrphans===!1||t.length<2)return;let{length:i}=t,r=t[i-1],s=t[i-2];if(s.length<r.length)return;let o=s.lastIndexOf(" ");if(o===-1||o===s.indexOf(" ")||r.includes(" "))return;let a=s.slice(o+1);e.textWidth(r+a)<=n.maxWidth&&(t[i-2]=s.slice(0,o),t[i-1]=a+" "+r)}};Z5="ag-chart-tooltip",Tit="ag-chart-dark-tooltip",qx={html:"",ariaLabel:""};kR=class extends pl{constructor(){super(...arguments),this.type="pointer",this.xOffset=0,this.yOffset=0}};Me([$e(Su(["pointer","node","top","right","bottom","left","top-left","top-right","bottom-right","bottom-left"],"a position type"))],kR.prototype,"type",2);Me([$e(wu)],kR.prototype,"xOffset",2);Me([$e(wu)],kR.prototype,"yOffset",2);P6=class extends pl{constructor(){super(),this.enabled=!0,this.delay=0,this.range=void 0,this.wrapping="hyphenate",this.position=new kR,this.darkTheme=!1,this.bounds="extended",this.enableInteraction=!1,this.lastVisibilityChange=Date.now(),this.wrapTypes=["always","hyphenate","on-space","never"],this.showTimeout=0,this._showArrow=!0}get interactive(){return this.enableInteraction}setup(t){this.element=t.addChild("canvas-overlay",Z5),this.element.classList.add(Z5),TE(this.element,"aria-hidden",!0)}destroy(t){t.removeChild("canvas-overlay",Z5)}isVisible(){return!this.element?.classList.contains(Z5+"-hidden")}show(t,e,n,i,r=!1){let{element:s}=this;if(i!=null&&s!=null)s.innerHTML=i.html;else if(!s?.innerHTML){this.toggle(!1);return}let o=n.position?.type??this.position.type,a=n.position?.xOffset??0,l=n.position?.yOffset??0,c=this.getTooltipBounds({positionType:o,meta:n,yOffset:l,xOffset:a,canvasRect:e}),d={x:t.x-e.x,y:t.y-e.y,width:t.width,height:t.height},u=Sit(s.clientWidth,s.clientHeight,d,c),m=d.x,f=d.y,_=d.width-s.clientWidth-1+m,x=d.height-s.clientHeight+f,D=Wa(m,u.x,_),E=Wa(f,u.y,x),M=D!==u.x||E!==u.y,I=(o==="node"||o==="pointer")&&!M&&!a&&!l,z=n.showArrow??this.showArrow??I;this.updateShowArrow(z),s.style.transform=`translate(${Math.round(D)}px, ${Math.round(E)}px)`,s.style.pointerEvents=n.enableInteraction?"auto":"none",s.setAttribute("data-pointer-capture","retain"),this.enableInteraction=n.enableInteraction??!1,this.delay>0&&!r?(this.toggle(!1),this.showTimeout=setTimeout(()=>{this.toggle(!0)},this.delay)):this.toggle(!0)}toggle(t){if(!this.element)return;let{classList:e}=this.element,n=(l,c)=>e.toggle(`${Z5}-${l}`,c),i=this.isVisible(),r=1/0;if(t||clearTimeout(this.showTimeout),i!==t){let l=Date.now();r=l-this.lastVisibilityChange,this.lastVisibilityChange=l}let s=100,o=5,a=!i&&t&&r>s;r>o&&n("no-animation",a),n("no-interaction",!this.enableInteraction),n("hidden",!t),n("arrow",this._showArrow),e.toggle(Tit,this.darkTheme);for(let l of this.wrapTypes)e.toggle(`${Z5}-wrap-${l}`,l===this.wrapping)}updateShowArrow(t){this._showArrow=t}getTooltipBounds(t){if(!this.element)return{};let{positionType:e,meta:n,yOffset:i,xOffset:r,canvasRect:s}=t,{clientWidth:o,clientHeight:a}=this.element,l={width:o,height:a};switch(e){case"node":case"pointer":return l.top=n.offsetY+i-a-8,l.left=n.offsetX+r-o/2,l;case"top":return l.top=i,l.left=s.width/2-o/2+r,l;case"right":return l.top=s.height/2-a/2+i,l.left=s.width-o/2+r,l;case"left":return l.top=s.height/2-a/2+i,l.left=r,l;case"bottom":return l.top=s.height-a+i,l.left=s.width/2-o/2+r,l;case"top-left":return l.top=i,l.left=r,l;case"top-right":return l.top=i,l.left=s.width-o+r,l;case"bottom-right":return l.top=s.height-a+i,l.left=s.width-o+r,l;case"bottom-left":return l.top=s.height-a+i,l.left=r,l}}};Me([$e(Jo)],P6.prototype,"enabled",2);Me([$e(Jo,{optional:!0})],P6.prototype,"showArrow",2);Me([Lg((t,e,n)=>{e&&t.element?.classList.add(e),n&&t.element?.classList.remove(n)}),$e(Gr,{optional:!0})],P6.prototype,"class",2);Me([$e(Rr)],P6.prototype,"delay",2);Me([$e(Ete,{optional:!0})],P6.prototype,"range",2);Me([$e(Dte)],P6.prototype,"wrapping",2);Me([$e(Us)],P6.prototype,"position",2);Me([$e(Jo)],P6.prototype,"darkTheme",2);Me([$e(Su(["extended","canvas"]))],P6.prototype,"bounds",2);Vh=(()=>{let t=class extends pl{constructor(){super(...arguments),this.id=k6(this),this.node=new Gu({zIndex:1}).setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.truncated=!1,this.layoutStyle="block"}registerInteraction(e){let{regionManager:n,proxyInteractionService:i,layoutService:r}=e,s=n.getRegion("root"),o=[r.addListener("layout-complete",()=>this.updateA11yText(i)),s.addListener("hover",a=>this.handleMouseMove(e,a)),s.addListener("leave",a=>this.handleMouseLeave(e,a))];return U0i(...o)}computeTextWrap(e,n){let{text:i,wrapping:r}=this,s=Math.min(this.maxWidth??1/0,e),o=this.maxHeight??n;if(!isFinite(s)&&!isFinite(o)){this.node.text=i;return}let a=c8e.wrapText(i??"",{maxWidth:s,maxHeight:o,font:this,textWrap:r});this.node.text=a,this.truncated=a.includes(Mf.EllipsisChar)}updateA11yText(e){if(this.enabled&&this.text){let n=this.node.computeTransformedBBox();if(n){let{id:i}=this;this.proxyText??(this.proxyText=e.createProxyElement({type:"text",id:i,parent:"canvas-proxy"})),this.proxyText.textContent=this.text,this.proxyText.updateBounds(n)}}else this.proxyText?.remove(),this.proxyText=void 0}handleMouseMove(e,n){if(n!==void 0&&this.enabled&&this.node.visible&&this.truncated){let{offsetX:i,offsetY:r}=n;e.tooltipManager.updateTooltip(this.id,{offsetX:i,offsetY:r,lastPointerEvent:n,showArrow:!1},vR({content:this.text}))}}handleMouseLeave(e,n){e.tooltipManager.removeTooltip(this.id)}};return t.SMALL_PADDING=10,t.LARGE_PADDING=20,t})();Me([$e(Jo)],Vh.prototype,"enabled",2);Me([$e(Gr,{optional:!0}),z0("node")],Vh.prototype,"text",2);Me([$e(qtt,{optional:!0}),z0("node")],Vh.prototype,"textAlign",2);Me([$e(bw,{optional:!0}),z0("node")],Vh.prototype,"fontStyle",2);Me([$e(ww,{optional:!0}),z0("node")],Vh.prototype,"fontWeight",2);Me([$e(Rr),z0("node")],Vh.prototype,"fontSize",2);Me([$e(Gr),z0("node")],Vh.prototype,"fontFamily",2);Me([$e(kd,{optional:!0}),z0("node","fill")],Vh.prototype,"color",2);Me([$e(Rr,{optional:!0})],Vh.prototype,"spacing",2);Me([$e(Rr,{optional:!0})],Vh.prototype,"lineHeight",2);Me([$e(Rr,{optional:!0})],Vh.prototype,"maxWidth",2);Me([$e(Rr,{optional:!0})],Vh.prototype,"maxHeight",2);Me([$e(Dte)],Vh.prototype,"wrapping",2);Me([$e(Gr)],Vh.prototype,"layoutStyle",2);oC=class extends M6{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.isRange=!1,this.restoreOwnStyles()}computeBBox(){return new Os(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(t,e){return!1}render(t){let{ctx:e,forceRender:n,stats:i}=t;if(this.dirty===0&&!n){i&&(i.nodesSkipped+=this.nodeCount.count);return}this.transformRenderContext(t);let{x1:r,y1:s,x2:o,y2:a}=this;r=this.align(r),s=this.align(s),o=this.align(o),a=this.align(a);let{fill:l,opacity:c,isRange:d}=this;if(!!(d&&l)){let{fillOpacity:E}=this;e.fillStyle=l,e.globalAlpha=c*E,e.beginPath(),e.moveTo(r,s),e.lineTo(o,s),e.lineTo(o,a),e.lineTo(r,a),e.closePath(),e.fill()}let{stroke:m,strokeWidth:f,startLine:_,endLine:x}=this;if(!!((_||x)&&m&&f)){let{strokeOpacity:E,lineDash:M,lineDashOffset:I,lineCap:z,lineJoin:G}=this;e.strokeStyle=m,e.globalAlpha=c*E,e.lineWidth=f,M&&e.setLineDash(M),I&&(e.lineDashOffset=I),z&&(e.lineCap=z),G&&(e.lineJoin=G),e.beginPath(),_&&(e.moveTo(r,s),e.lineTo(o,s)),x&&(e.moveTo(o,a),e.lineTo(r,a)),e.stroke()}this.fillShadow?.markClean(),super.render(t)}};oC.className="Range";oC.defaultStyles=St(ve({},M6.defaultStyles),{strokeWidth:1});Me([Ss({redraw:2})],oC.prototype,"x1",2);Me([Ss({redraw:2})],oC.prototype,"y1",2);Me([Ss({redraw:2})],oC.prototype,"x2",2);Me([Ss({redraw:2})],oC.prototype,"y2",2);Me([Ss({redraw:2})],oC.prototype,"startLine",2);Me([Ss({redraw:2})],oC.prototype,"endLine",2);Me([Ss({redraw:2})],oC.prototype,"isRange",2);f1=class extends pl{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return Mf.toFontString(this)}};Me([$e(Jo)],f1.prototype,"enabled",2);Me([$e(kd,{optional:!0})],f1.prototype,"color",2);Me([$e(bw,{optional:!0})],f1.prototype,"fontStyle",2);Me([$e(ww,{optional:!0})],f1.prototype,"fontWeight",2);Me([$e(Rr)],f1.prototype,"fontSize",2);Me([$e(Gr)],f1.prototype,"fontFamily",2);Me([$e(k3,{optional:!0})],f1.prototype,"formatter",2);Dit=(t=>(t[t.SERIES_BACKGROUND_ZINDEX=0]="SERIES_BACKGROUND_ZINDEX",t[t.AXIS_GRID_ZINDEX=1]="AXIS_GRID_ZINDEX",t[t.AXIS_ZINDEX=2]="AXIS_ZINDEX",t[t.SERIES_CROSSLINE_RANGE_ZINDEX=3]="SERIES_CROSSLINE_RANGE_ZINDEX",t[t.SERIES_LAYER_ZINDEX=4]="SERIES_LAYER_ZINDEX",t[t.SERIES_HIGHLIGHT_ZINDEX=5]="SERIES_HIGHLIGHT_ZINDEX",t[t.AXIS_FOREGROUND_ZINDEX=6]="AXIS_FOREGROUND_ZINDEX",t[t.SERIES_CROSSHAIR_ZINDEX=7]="SERIES_CROSSHAIR_ZINDEX",t[t.SERIES_LABEL_ZINDEX=8]="SERIES_LABEL_ZINDEX",t[t.SERIES_CROSSLINE_LINE_ZINDEX=9]="SERIES_CROSSLINE_LINE_ZINDEX",t[t.SERIES_ANNOTATION_ZINDEX=10]="SERIES_ANNOTATION_ZINDEX",t[t.CHART_ANNOTATION_ZINDEX=11]="CHART_ANNOTATION_ZINDEX",t[t.CHART_ANNOTATION_FOCUSED_ZINDEX=12]="CHART_ANNOTATION_FOCUSED_ZINDEX",t[t.LEGEND_ZINDEX=13]="LEGEND_ZINDEX",t[t.NAVIGATOR_ZINDEX=14]="NAVIGATOR_ZINDEX",t[t.FOREGROUND_ZINDEX=15]="FOREGROUND_ZINDEX",t))(Dit||{});d8e=t=>t==="value"?au((e,n)=>n.target.type==="line",e=>e.target.type==="range"?"crossLine type 'range' to have a 'range' property instead of 'value'":"crossLine property 'type' to be 'line'"):au((e,n)=>n.target.type==="range",e=>e.target.type==="line"?"crossLine type 'line' to have a 'value' property instead of 'range'":"crossLine property 'type' to be 'range'"),kit=(t,e,n,i)=>{let r=t==="line"&&e!==void 0,s=t==="range"&&n!==void 0;if(!r&&!s)return!0;let[o,a]=n??[e,void 0],l=Ud.is(i)||a_.is(i),c=pCe(o,l)&&!isNaN(i.convert(o)),d=pCe(a,l)&&!isNaN(i.convert(a));if(r&&c||s&&c&&d)return!0;let u=["Expecting crossLine"];return s?(c||u.push(`range start ${oG(o)}`),d||u.push(`${c?"":"and "}range end ${oG(a)}`)):u.push(`value ${oG(o)}`),u.push("to match the axis scale domain."),yr.warnOnce(u.join(" ")),!1},Wgi={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},topLeft:{xTranslationDirection:1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:-1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:1},bottomRight:{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:1,yTranslationDirection:0},insideRight:{xTranslationDirection:-1,yTranslationDirection:0},insideTop:{xTranslationDirection:0,yTranslationDirection:1},insideBottom:{xTranslationDirection:0,yTranslationDirection:-1},insideTopLeft:{xTranslationDirection:1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomRight:{xTranslationDirection:-1,yTranslationDirection:-1}},Ugi={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},topLeft:{xTranslationDirection:-1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},bottomRight:{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:0,yTranslationDirection:1},insideRight:{xTranslationDirection:0,yTranslationDirection:-1},insideTop:{xTranslationDirection:-1,yTranslationDirection:0},insideBottom:{xTranslationDirection:1,yTranslationDirection:0},insideTopLeft:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:-1},insideBottomRight:{xTranslationDirection:1,yTranslationDirection:-1}};ste=({yDirection:t,xEnd:e,yStart:n,yEnd:i})=>t?{x:e/2,y:n}:{x:e,y:isNaN(i)?n:(n+i)/2},iet=({yDirection:t,xStart:e,xEnd:n,yStart:i,yEnd:r})=>t?{x:e,y:isNaN(r)?i:(i+r)/2}:{x:n/2,y:i},net=({yDirection:t,xEnd:e,yStart:n,yEnd:i})=>t?{x:e,y:isNaN(i)?n:(n+i)/2}:{x:e/2,y:isNaN(i)?n:i},ret=({yDirection:t,xStart:e,xEnd:n,yStart:i,yEnd:r})=>t?{x:n/2,y:isNaN(r)?i:r}:{x:e,y:isNaN(r)?i:(i+r)/2},jgi=({xEnd:t,yStart:e,yEnd:n})=>({x:t/2,y:isNaN(n)?e:(e+n)/2}),set=({yDirection:t,xStart:e,xEnd:n,yStart:i})=>t?{x:e/2,y:i}:{x:n,y:i},oet=({yDirection:t,xStart:e,yStart:n,yEnd:i})=>t?{x:e,y:isNaN(i)?n:i}:{x:e,y:n},aet=({yDirection:t,xEnd:e,yStart:n,yEnd:i})=>t?{x:e,y:n}:{x:e,y:isNaN(i)?n:i},cet=({yDirection:t,xStart:e,xEnd:n,yStart:i,yEnd:r})=>t?{x:n,y:isNaN(r)?i:r}:{x:e,y:isNaN(r)?i:r},Ait={top:{c:ste},bottom:{c:ret},left:{c:iet},right:{c:net},topLeft:{c:set},topRight:{c:aet},bottomLeft:{c:oet},bottomRight:{c:cet},inside:{c:jgi},insideLeft:{c:iet},insideRight:{c:net},insideTop:{c:ste},insideBottom:{c:ret},insideTopLeft:{c:set},insideBottomLeft:{c:oet},insideTopRight:{c:aet},insideBottomRight:{c:cet}},$gi=Su(["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],"crossLine label position"),R6=class extends pl{constructor(){super(...arguments),this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)"}};Me([$e(Jo,{optional:!0})],R6.prototype,"enabled",2);Me([$e(Gr,{optional:!0})],R6.prototype,"text",2);Me([$e(bw,{optional:!0})],R6.prototype,"fontStyle",2);Me([$e(ww,{optional:!0})],R6.prototype,"fontWeight",2);Me([$e(Rr)],R6.prototype,"fontSize",2);Me([$e(Gr)],R6.prototype,"fontFamily",2);Me([$e(wu)],R6.prototype,"padding",2);Me([$e(kd,{optional:!0})],R6.prototype,"color",2);Me([$e($gi,{optional:!0})],R6.prototype,"position",2);Me([$e(xw,{optional:!0})],R6.prototype,"rotation",2);Me([$e(Jo,{optional:!0})],R6.prototype,"parallel",2);F6=(()=>{let t=class iG extends pl{constructor(){super(),this.id=k6(this),this.label=new R6,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction="x",this.group=new xo({name:`${this.id}`,layer:!0,zIndex:iG.LINE_LAYER_ZINDEX}),this.labelGroup=new xo({name:`${this.id}`,layer:!0,zIndex:iG.LABEL_LAYER_ZINDEX}),this.crossLineRange=new oC,this.crossLineLabel=new Gu,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1,this.group.append(this.crossLineRange),this.labelGroup.append(this.crossLineLabel),this.crossLineRange.pointerEvents=1}update(n){let{enabled:i,data:r,type:s,value:o,range:a,scale:l}=this;if(!s||!l||!i||!n||!kit(s,o,a,l)||r.length===0){this.group.visible=!1,this.labelGroup.visible=!1;return}this.group.visible=n,this.labelGroup.visible=n,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()}calculateLayout(n,i){if(!n)return;let{scale:r,gridLength:s,sideFlag:o,direction:a,label:{position:l="top"},clippedRange:c,strokeWidth:d=0}=this;if(this.data=[],!r)return;let u=r.bandwidth??0,m=r.step??0,f=(i?-1:1)*(r instanceof _w?(m-u)/2:0),[_,x]=[0,o*s],[D,E]=this.getRange(),M=E===void 0&&a_.is(r)?u/2+f:0,[I,z]=[Number(r.convert(D,{clampMode:"clamped"}))-f+M,r.convert(E,{clampMode:"clamped"})+u+f];I=Jee(I,c),z=Jee(z,c),[D,E]=[Number(r.convert(D))+M,r.convert(E)+u];let G=(D===I||E===z||I!==z)&&Math.abs(z-I)>0;if(G&&I>z&&([I,z]=[z,I],[D,E]=[E,D]),D-f>=I&&(D-=f),E+f<=z&&(E+=f),this.isRange=G,this.startLine=d>0&&D>=I&&D<=I+f,this.endLine=d>0&&E>=z-u-f&&E<=z,!(!G&&!this.startLine&&!this.endLine)&&(this.data=[I,z],this.label.enabled)){let A=a==="y",{c:Y=ste}=Ait[l]??{},{x:X,y:ne}=Y({yDirection:A,xStart:_,xEnd:x,yStart:I,yEnd:z});this.labelPoint={x:X,y:ne}}}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}updateRangeNode(){let{crossLineRange:n,sideFlag:i,gridLength:r,data:s,startLine:o,endLine:a,isRange:l,fill:c,fillOpacity:d,stroke:u,strokeWidth:m,lineDash:f}=this;n.x1=0,n.x2=i*r,n.y1=s[0],n.y2=s[1],n.startLine=o,n.endLine=a,n.isRange=l,n.fill=c,n.fillOpacity=d??1,n.stroke=u,n.strokeWidth=m??1,n.strokeOpacity=this.strokeOpacity??1,n.lineDash=f}updateLabel(){let{crossLineLabel:n,label:i}=this;i.text&&(n.fontStyle=i.fontStyle,n.fontWeight=i.fontWeight,n.fontSize=i.fontSize,n.fontFamily=i.fontFamily,n.fill=i.color,n.text=i.text)}positionLabel(){let{crossLineLabel:n,labelPoint:{x:i=void 0,y:r=void 0}={},label:{parallel:s,rotation:o,position:a="top",padding:l=0},direction:c,parallelFlipRotation:d,regularFlipRotation:u}=this;if(i===void 0||r===void 0)return;let{defaultRotation:m,configuredRotation:f}=rte({rotation:o,parallel:s,regularFlipRotation:u,parallelFlipRotation:d});n.rotation=m+f,n.textBaseline="middle",n.textAlign="center";let _=n.computeTransformedBBox();if(!_)return;let x=c==="y",{xTranslation:D,yTranslation:E}=mCe({yDirection:x,padding:l,position:a,bbox:_});n.translationX=i+D,n.translationY=r+E}getZIndex(n=!1){return n?iG.RANGE_LAYER_ZINDEX:iG.LINE_LAYER_ZINDEX}getRange(){let{value:n,range:i,scale:r}=this,s=Ud.is(r)||a_.is(r),o=i?.[0]??n,a=i?.[1];return!s&&a===void 0&&(a=o),s&&o===a&&(a=void 0),[o,a]}computeLabelBBox(){let{label:n}=this;if(!n.enabled)return;let i=new Gu;i.fontFamily=n.fontFamily,i.fontSize=n.fontSize,i.fontStyle=n.fontStyle,i.fontWeight=n.fontWeight,i.text=n.text;let{labelPoint:{x:r=void 0,y:s=void 0}={},label:{parallel:o,rotation:a,position:l="top",padding:c=0},direction:d,parallelFlipRotation:u,regularFlipRotation:m}=this;if(r===void 0||s===void 0)return;let{configuredRotation:f}=rte({rotation:a,parallel:o,regularFlipRotation:m,parallelFlipRotation:u});i.rotation=f,i.textBaseline="middle",i.textAlign="center";let _=i.computeTransformedBBox();if(!_)return;let x=d==="y",{xTranslation:D,yTranslation:E}=mCe({yDirection:x,padding:c,position:l,bbox:_});return i.translationX=r+D,i.translationY=s+E,i.computeTransformedBBox()}calculatePadding(n){let{isRange:i,startLine:r,endLine:s,direction:o,label:{padding:a=0,position:l="top"}}=this;if(!i&&!r&&!s)return;let c=this.computeLabelBBox();if(c?.x==null||c?.y==null)return;let d=Iit({yDirection:o==="y",padding:a,position:l,bbox:c});n.left=Math.max(n.left??0,d.left??0),n.right=Math.max(n.right??0,d.right??0),n.top=Math.max(n.top??0,d.top??0),n.bottom=Math.max(n.bottom??0,d.bottom??0)}};return t.LINE_LAYER_ZINDEX=9,t.RANGE_LAYER_ZINDEX=3,t.LABEL_LAYER_ZINDEX=8,t.className="CrossLine",t})();Me([$e(Jo,{optional:!0})],F6.prototype,"enabled",2);Me([$e(Su(["range","line"],"a crossLine type"),{optional:!0})],F6.prototype,"type",2);Me([$e(I6(d8e("range"),DR.restrict({length:2})),{optional:!0})],F6.prototype,"range",2);Me([$e(d8e("value"),{optional:!0})],F6.prototype,"value",2);Me([$e(kd,{optional:!0})],F6.prototype,"fill",2);Me([$e(ud,{optional:!0})],F6.prototype,"fillOpacity",2);Me([$e(kd,{optional:!0})],F6.prototype,"stroke",2);Me([$e(wu,{optional:!0})],F6.prototype,"strokeWidth",2);Me([$e(ud,{optional:!0})],F6.prototype,"strokeOpacity",2);Me([$e(Kx,{optional:!0})],F6.prototype,"lineDash",2);Me([$e(Us)],F6.prototype,"label",2);O5e=F6,Pit=(t=>(t.TITLE="title",t.SUBTITLE="subtitle",t.FOOTNOTE="footnote",t.LEGEND="legend",t.NAVIGATOR="navigator",t.PAGINATION="pagination",t.ROOT="root",t.SERIES="series",t.HORIZONTAL_AXES="horizontal-axes",t.VERTICAL_AXES="vertical-axes",t.TOOLBAR="toolbar",t))(Pit||{}),Kgi=["stroke","lineDash"],Ygi=$x(t=>D3(t)&&Object.keys(t).every(e=>Kgi.includes(e)),"objects with gridline style properties such as 'stroke' or 'lineDash'"),Fte=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}};Me([$e(Jo)],Fte.prototype,"enabled",2);Me([$e(Rr)],Fte.prototype,"width",2);Me([$e(Ygi)],Fte.prototype,"style",2);Rit=au(t=>Tc(t)&&t>0||t instanceof SE,"a non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),kE=class extends pl{constructor(){super(...arguments),this.minSpacing=NaN,this.maxSpacing=NaN}};Me([$e(Rit,{optional:!0})],kE.prototype,"step",2);Me([$e(DR,{optional:!0})],kE.prototype,"values",2);Me([$e(Qtt),Tw(NaN)],kE.prototype,"minSpacing",2);Me([$e(Jtt),Tw(NaN)],kE.prototype,"maxSpacing",2);g1=class extends pl{constructor(){super(...arguments),this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="#575757",this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1}getSideFlag(){return this.mirrored?1:-1}};Me([$e(Jo)],g1.prototype,"enabled",2);Me([$e(bw,{optional:!0})],g1.prototype,"fontStyle",2);Me([$e(ww,{optional:!0})],g1.prototype,"fontWeight",2);Me([$e(wu.restrict({min:1}))],g1.prototype,"fontSize",2);Me([$e(Gr)],g1.prototype,"fontFamily",2);Me([$e(Rr)],g1.prototype,"padding",2);Me([$e(TR),Tw(NaN)],g1.prototype,"minSpacing",2);Me([$e(kd,{optional:!0})],g1.prototype,"color",2);Me([$e(xw,{optional:!0})],g1.prototype,"rotation",2);Me([$e(Jo)],g1.prototype,"avoidCollisions",2);Me([$e(Jo)],g1.prototype,"mirrored",2);Me([$e(Jo)],g1.prototype,"parallel",2);Me([$e(k3,{optional:!0})],g1.prototype,"formatter",2);Me([$e(Gr,{optional:!0})],g1.prototype,"format",2);zG=class{constructor(){this.enabled=!0,this.width=1,this.stroke=void 0}};Me([$e(Jo)],zG.prototype,"enabled",2);Me([$e(Rr)],zG.prototype,"width",2);Me([$e(kd,{optional:!0})],zG.prototype,"stroke",2);IR=class extends pl{constructor(){super(...arguments),this.enabled=!0,this.width=1,this.size=6}};Me([$e(Jo)],IR.prototype,"enabled",2);Me([$e(Rr)],IR.prototype,"width",2);Me([$e(Rr)],IR.prototype,"size",2);Me([$e(kd,{optional:!0})],IR.prototype,"stroke",2);u_=class extends pl{constructor(){super(...arguments),this.enabled=!1,this.spacing=Vh.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}};Me([$e(Jo)],u_.prototype,"enabled",2);Me([$e(Gr,{optional:!0})],u_.prototype,"text",2);Me([$e(Rr,{optional:!0})],u_.prototype,"spacing",2);Me([$e(bw,{optional:!0})],u_.prototype,"fontStyle",2);Me([$e(ww,{optional:!0})],u_.prototype,"fontWeight",2);Me([$e(Rr)],u_.prototype,"fontSize",2);Me([$e(Gr)],u_.prototype,"fontFamily",2);Me([$e(kd,{optional:!0})],u_.prototype,"color",2);Me([$e(Dte)],u_.prototype,"wrapping",2);Me([$e(k3,{optional:!0})],u_.prototype,"formatter",2);gCe=Math.PI*2,qgi=gCe/2;IE=(()=>{let t=class Bit{constructor(n,i){this.moduleCtx=n,this.scale=i,this.id=k6(this),this.nice=!0,this.reverse=!1,this.keys=[],this.interval=new kE,this.dataDomain={domain:[],clipped:!1},this.layoutConstraints={stacked:!0,align:"start",width:100,unit:"percent"},this.boundSeries=[],this.includeInvisibleDomains=!1,this.interactionEnabled=!0,this.axisGroup=new xo({name:`${this.id}-axis`,zIndex:2}),this.lineNode=this.axisGroup.appendChild(new i0({name:`${this.id}-Axis-line`})),this.tickLineGroup=this.axisGroup.appendChild(new xo({name:`${this.id}-Axis-tick-lines`,zIndex:2})),this.tickLabelGroup=this.axisGroup.appendChild(new xo({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.crossLineGroup=new xo({name:`${this.id}-CrossLines`}),this.labelGroup=new xo({name:`${this.id}-Labels`,zIndex:10}),this.gridGroup=new xo({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new xo({name:`${this.id}-gridLines`,zIndex:1})),this.tickLineGroupSelection=Oh.select(this.tickLineGroup,i0,!1),this.tickLabelGroupSelection=Oh.select(this.tickLabelGroup,Gu,!1),this.gridLineGroupSelection=Oh.select(this.gridLineGroup,i0,!1),this._crossLines=[],this.line=new zG,this.tick=new IR,this.gridLine=new Fte,this.label=this.createLabel(),this.defaultTickMinSpacing=Bit.defaultTickMinSpacing,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,padding:this.label.padding,format:this.label.format}},this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=new u_,this._titleCaption=new Vh,this.gridLength=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.maxThickness=1/0,this.moduleMap=new r8e,this.range=this.scale.range.slice(),this.crossLines.forEach(s=>this.initCrossLine(s)),this.destroyFns.push(this._titleCaption.registerInteraction(this.moduleCtx)),this._titleCaption.node.rotation=-Math.PI/2,this.axisGroup.appendChild(this._titleCaption.node),this.animationManager=n.animationManager,this.animationState=new BG("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()},reset:"empty"},ready:{update:s=>this.animateReadyUpdate(s),resize:()=>this.resetSelectionNodes(),reset:"empty"}}),this._crossLines=[];let r;this.destroyFns.push(n.layoutService.addListener("layout-complete",s=>{r!=null&&V4(s.chart,r)!=null&&this.animationState.transition("resize"),r=ve({},s.chart)}))}get type(){return this.constructor.type??""}set crossLines(n){let{CrossLineConstructor:i}=this.constructor;this._crossLines.forEach(r=>this.detachCrossLine(r)),this._crossLines=n.map(r=>{let s=new i;return s.set(r),s}),this._crossLines.forEach(r=>{this.attachCrossLine(r),this.initCrossLine(r)})}get crossLines(){return this._crossLines}resetAnimation(n){n==="initial"&&this.animationState.transition("reset")}attachCrossLine(n){this.crossLineGroup.appendChild(n.group),this.crossLineGroup.appendChild(n.labelGroup)}detachCrossLine(n){this.crossLineGroup.removeChild(n.group),this.crossLineGroup.removeChild(n.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach(n=>n())}updateRange(){let{range:n,visibleRange:i,scale:r}=this,s=(n[1]-n[0])/(i[1]-i[0]),o=s*i[0],a=n[0]-o;r.setVisibleRange?.(i),r.range=[a,a+s],this.crossLines.forEach(l=>{l.clippedRange=[n[0],n[1]]})}setCrossLinesVisible(n){this.crossLineGroup.visible=n}attachAxis(n,i){i.appendChild(this.gridGroup),n.appendChild(this.axisGroup),n.appendChild(this.crossLineGroup),n.appendChild(this.labelGroup)}attachLabel(n){this.labelGroup.append(n)}detachAxis(n,i){i.removeChild(this.gridGroup),n.removeChild(this.axisGroup),n.removeChild(this.crossLineGroup),n.removeChild(this.labelGroup)}getAxisGroup(){return this.axisGroup}inRange(n,i=0){let[r,s]=N4(this.range);return n>=r-i&&n<=s+i}onFormatChange(n,i,r,s){let{scale:o}=this,a=o instanceof o8e,l=c=>a?String:d=>typeof d=="number"?d.toFixed(i+c):String(d);if(s&&o&&o.tickFormat)try{let c=o.tickFormat({ticks:n,specifier:s});this.labelFormatter=c,this.datumFormatter=c}catch{this.labelFormatter=l(0),this.datumFormatter=l(1),yr.warnOnce(`the axis label format string ${s} is invalid. No formatting will be applied`)}else this.labelFormatter=l(0),this.datumFormatter=l(1)}setTickInterval(n){this.scale.interval=this.interval?.step??n}onGridLengthChange(n,i){(i&&!n||!i&&n)&&this.onGridVisibilityChange(),this.crossLines.forEach(r=>this.initCrossLine(r))}onGridVisibilityChange(){this.gridLineGroupSelection.clear()}createLabel(){return new g1}update(n=0,i=!0){if(!this.tickGenerationResult)return;let{rotation:r,parallelFlipRotation:s,regularFlipRotation:o}=this.calculateRotations(),a=this.label.getSideFlag();this.updatePosition();let l=this.getAxisLineCoordinates(),{tickData:c,combinedRotation:d,textBaseline:u,textAlign:m,primaryTickCount:f}=this.tickGenerationResult,_=this.tickLabelGroupSelection.nodes().map(x=>x.datum.tickId);if(this.updateSelections(l,c.ticks,{combinedRotation:d,textAlign:m,textBaseline:u,range:this.scale.range}),!i||this.animationManager.isSkipped())this.resetSelectionNodes();else{let x=this.calculateUpdateDiff(_,c);this.animationState.transition("update",x)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(a),this.updateTickLines(),this.updateTitle({anyTickVisible:c.ticks.length>0}),this.updateCrossLines({rotation:r,parallelFlipRotation:s,regularFlipRotation:o}),this.updateLayoutState(c.fractionDigits),f}getAxisLineCoordinates(){let[n,i]=N4(this.range);return{x:0,y1:n,y2:i}}getTickLineCoordinates(n){let r=this.label.getSideFlag()*this.getTickSize(),s=Math.min(0,r),o=s+Math.abs(r),a=n.translationY;return{x1:s,x2:o,y:a}}getTickLabelProps(n,i){let{label:r}=this,{combinedRotation:s,textBaseline:o,textAlign:a,range:l}=i,c=n.tickLabel,u=r.getSideFlag()*(this.getTickSize()+r.padding+this.seriesAreaPadding),m=c!==""&&c!=null;return{tickId:n.tickId,translationY:n.translationY,fill:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontWeight:r.fontWeight,rotation:s,rotationCenterX:u,text:c,textAlign:a,textBaseline:o,visible:m,x:u,y:0,range:l}}getTickSize(){return this.tick.enabled?this.tick.size:6}setTitleProps(n,i){let{title:r}=this;if(!r.enabled){n.enabled=!1,n.node.visible=!1;return}n.color=r.color,n.fontFamily=r.fontFamily,n.fontSize=r.fontSize,n.fontStyle=r.fontStyle,n.fontWeight=r.fontWeight,n.enabled=r.enabled,n.wrapping=r.wrapping;let s=n.node,o=(r.spacing??0)+i.spacing,a=this.label.getSideFlag(),l=Nh(this.rotation),c=a===-1&&l>Math.PI&&l<Math.PI*2?-1:1,d=c*a*Math.PI/2,u=c===1?"bottom":"top",{range:m}=this,f=Math.floor(c*a*(m[0]+m[1])/2),_=Math.floor(a===-1?c*-o:-o),{callbackCache:x}=this.moduleCtx,{formatter:D=M=>M.defaultValue}=r,E=x.call(D,this.getTitleFormatterParams());s.setProperties({rotation:d,text:E,textBaseline:u,visible:!0,x:f,y:_})}calculateLayout(n){let{rotation:i,parallelFlipRotation:r,regularFlipRotation:s}=this.calculateRotations(),o=this.label.getSideFlag(),a=o*(this.getTickSize()+this.label.padding+this.seriesAreaPadding);this.updateScale(),this.tickGenerationResult=this.generateTicks({primaryTickCount:n,parallelFlipRotation:r,regularFlipRotation:s,labelX:a,sideFlag:o});let G=this.tickGenerationResult,{tickData:l,combinedRotation:c,textBaseline:d,textAlign:u}=G,m=al(G,["tickData","combinedRotation","textBaseline","textAlign"]);this.updateLayoutState(l.fractionDigits);let f=[],{x:_,y1:x,y2:D}=this.getAxisLineCoordinates(),E=new Os(_+Math.min(o*this.seriesAreaPadding,0),x,this.seriesAreaPadding,D-x);if(f.push(E),this.tick.enabled&&l.ticks.forEach(A=>{let{x1:Y,x2:X,y:ne}=this.getTickLineCoordinates(A),pe=new Os(Y,ne,X-Y,0);f.push(pe)}),this.label.enabled){let A=new Gu;l.ticks.forEach(Y=>{let X=this.getTickLabelProps(Y,{combinedRotation:c,textAlign:u,textBaseline:d,range:this.scale.range});if(!X.visible)return;A.setProperties(St(ve({},X),{translationY:Math.round(Y.translationY)}));let ne=A.computeTransformedBBox();ne&&f.push(ne)})}if(this.title?.enabled){let A=new Vh,Y=Os.merge(f).width;this.setTitleProps(A,{spacing:Y});let ne=A.node.computeTransformedBBox();ne&&f.push(ne)}let M=Os.merge(f),I=this.getTransformBox(M),z=this.isAnySeriesActive();return this.crossLines.forEach(A=>{var Y;A.sideFlag=-o,A.direction=i===-Math.PI/2?"x":"y",A instanceof O5e&&((Y=A.label).parallel??(Y.parallel=this.label.parallel)),A.parallelFlipRotation=r,A.regularFlipRotation=s,A.calculateLayout?.(z,this.reverse)}),{primaryTickCount:m.primaryTickCount,bbox:I}}updateLayoutState(n){this.layout.label={fractionDigits:n,padding:this.label.padding,format:this.label.format}}getTransformBox(n){let i=new uw,{rotation:r,translationX:s,translationY:o,rotationCenterX:a,rotationCenterY:l}=this.getAxisTransform();return uw.updateTransformMatrix(i,1,1,r,s,o,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:a,rotationCenterY:l}),i.transformBBox(n)}setDomain(n){this.dataDomain=this.normaliseDataDomain(n),this.reverse&&this.dataDomain.domain.reverse(),this.scale.domain=this.dataDomain.domain}updateScale(){this.updateRange(),this.calculateDomain(),this.setTickInterval(this.interval.step);let{scale:n,nice:i}=this;Ud.is(n)&&(n.nice=i,n.update())}calculateRotations(){let n=Rg(this.rotation),i=Nh(n),r=Nh(n-Math.PI/2);return{rotation:n,parallelFlipRotation:i,regularFlipRotation:r}}generateTicks({primaryTickCount:n,parallelFlipRotation:i,regularFlipRotation:r,labelX:s,sideFlag:o}){let{scale:a,interval:{minSpacing:l,maxSpacing:c},label:{parallel:d,rotation:u,fontFamily:m,fontSize:f,fontStyle:_,fontWeight:x}}=this,D=n!==void 0,{defaultRotation:E,configuredRotation:M,parallelFlipFlag:I,regularFlipFlag:z}=rte({rotation:u,parallel:d,regularFlipRotation:r,parallelFlipRotation:i}),G=M+E,A=new uw,{maxTickCount:Y}=this.estimateTickCount({minSpacing:l,maxSpacing:c}),ne=!(Ud.is(a)||a_.is(a))||isNaN(Y)?10:Y,pe=L5e(d,M,0,o,z),ce=Hgi(d,M,o,I),ie=Mf.toFontString({fontFamily:m,fontSize:f,fontStyle:_,fontWeight:x}),le=Yx.getMeasurer({font:ie}),Se={fontFamily:m,fontSize:f,fontStyle:_,fontWeight:x,textBaseline:ce,textAlign:pe},je={rawTicks:[],fractionDigits:0,ticks:[],labelCount:0},ze=0,Ge=0,Ae=!0,Ye=!1;for(;Ae&&ze<=ne&&!Ye;){Ge=0,pe=L5e(d,M,0,o,z);let Ft=this.getTickStrategies({secondaryAxis:D,index:ze});for(let Tt of Ft){({tickData:je,index:ze,autoRotation:Ge,terminate:Ye}=Tt({index:ze,tickData:je,textProps:Se,labelOverlap:Ae,terminate:Ye,primaryTickCount:n}));let at=M!==0||Ge!==0,yt=G+Ge;pe=L5e(d,M,Ge,o,z),Ae=this.label.avoidCollisions?this.checkLabelOverlap(yt,at,A,je.ticks,s,le):!1}}let ft=E+M+Ge;return!D&&je.rawTicks.length>0&&(n=je.rawTicks.length),{tickData:je,primaryTickCount:n,combinedRotation:ft,textBaseline:ce,textAlign:pe}}getTickStrategies({index:n,secondaryAxis:i}){let{scale:r,label:s}=this,{minSpacing:o}=this.interval,a=Ud.is(r)||a_.is(r),l=s.enabled&&s.avoidCollisions,c=!a&&n!==0&&l,d=s.autoRotate===!0&&s.rotation===void 0,u=[],m;this.interval.values?m=3:i?m=1:c?m=2:m=0;let f=({index:_,tickData:x,primaryTickCount:D,terminate:E})=>this.createTickData(m,_,x,E,D);if(u.push(f),!a&&!isNaN(o)){let _=({index:x,tickData:D,primaryTickCount:E,terminate:M})=>this.createTickData(2,x,D,M,E);u.push(_)}if(!l)return u;if(d){let _=({index:x,tickData:D,labelOverlap:E,terminate:M})=>({index:x,tickData:D,autoRotation:this.getAutoRotation(E),terminate:M});u.push(_)}return u}createTickData(n,i,r,s,o){let{scale:a}=this,{step:l,values:c,minSpacing:d,maxSpacing:u}=this.interval,{maxTickCount:m,minTickCount:f,defaultTickCount:_}=this.estimateTickCount({minSpacing:d,maxSpacing:u}),x=Ud.is(a)||a_.is(a),D=!x||isNaN(m)?10:m,E=x?Math.max(_-i,f):m,M=l===void 0&&c===void 0&&E>f&&(x||n===2),I=!0;for(;I&&i<=D;){let G=r.rawTicks;E=x?Math.max(_-i,f):m;let{rawTicks:A,fractionDigits:Y,ticks:X,labelCount:ne}=this.getTicks({tickGenerationType:n,previousTicks:G,tickCount:E,minTickCount:f,maxTickCount:m,primaryTickCount:o});r.rawTicks=A,r.fractionDigits=Y,r.ticks=X,r.labelCount=ne,I=M?wit(A,G):!1,i++}return s||(s=l!==void 0||c!==void 0),{tickData:r,index:i,autoRotation:0,terminate:s}}checkLabelOverlap(n,i,r,s,o,a){uw.updateTransformMatrix(r,1,1,n,0,0);let l=this.createLabelData(s,o,r,a),c=zgi(this.label.minSpacing,i);return Ogi(l,c)}createLabelData(n,i,r,s){let o=[];for(let{tickLabel:a,translationY:l}of n){if(!a)continue;let{width:c,height:d}=s.measureLines(a),u=new Os(i,l,c,d),m=Ggi(a,u,r);o.push(m)}return o}getAutoRotation(n){return n?Nh(Rg(this.label.autoRotateAngle??0)):0}getTicks({tickGenerationType:n,previousTicks:i,tickCount:r,minTickCount:s,maxTickCount:o,primaryTickCount:a}){let{range:l,scale:c,visibleRange:d}=this,u;switch(n){case 3:if(u=this.interval.values,Ud.is(c)){let[z,G]=N4(c.getDomain().map(Number));u=u.filter(A=>A>=z&&A<=G).sort((A,Y)=>A-Y)}break;case 1:Ud.is(c)?u=this.updateSecondaryAxisTicks(a):u=this.createTicks(r,s,o);break;case 2:u=this.filterTicks(i,r);break;default:u=this.createTicks(r,s,o);break}let m=u.reduce((z,G)=>Math.max(z,PG(G)),0),f=(c.bandwidth??0)/2,_=[],x=0,D=new Map,E=Math.max(0,Math.floor(d[0]*u.length)),M=Math.min(u.length,Math.ceil(d[1]*u.length)),I=u.slice(E,M);this.onFormatChange(I,m,u,this.label.format);for(let z=0;z<I.length;z++){let G=I[z],A=c.convert(G)+f;if(l.length>0&&!this.inRange(A,.001))continue;let Y=this.formatTick(G,m,E+z),X=Y;if(D.has(X)){let ne=D.get(X);D.set(X,ne+1),X=`${X}_${ne}`}else D.set(X,1);_.push({tick:G,tickId:X,tickLabel:Y,translationY:Math.floor(A)}),!(Y===""||Y==null)&&x++}return{rawTicks:u,fractionDigits:m,ticks:_,labelCount:x}}filterTicks(n,i){let{minSpacing:r,maxSpacing:s}=this.interval,a=!isNaN(r)||!isNaN(s)?Math.ceil(n.length/i):2;return n.filter((l,c)=>c%a===0)}createTicks(n,i,r){let{scale:s}=this;return n&&(Ud.is(s)||a_.is(s))&&(typeof n=="number"?(s.tickCount=n,s.minTickCount=i??0,s.maxTickCount=r??1/0):s instanceof Ite&&this.setTickInterval(n)),s.ticks?.()??[]}estimateTickCount({minSpacing:n,maxSpacing:i}){if(!this.label.avoidCollisions)return{minTickCount:Ud.defaultMaxTickCount,maxTickCount:Ud.defaultMaxTickCount,defaultTickCount:Ud.defaultMaxTickCount};let r=this.calculateRangeWithBleed(),s=Math.max(this.defaultTickMinSpacing,r/Ud.defaultMaxTickCount),o=!isNaN(i);isNaN(n)&&(n=s),isNaN(i)&&(i=r),n>i&&(n===s?n=i:i=n);let a=2;o&&(o=a<s);let l=Wa(1,Math.floor(r/n),o?Math.min(Math.floor(r/a),100):100),c=Math.min(l,Math.ceil(r/i)),d=Wa(c,Ud.defaultTickCount,l);return{minTickCount:c,maxTickCount:l,defaultTickCount:d}}updateVisibility(){this.moduleCtx.animationManager.isSkipped()&&this.resetSelectionNodes(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled}updateCrossLines({rotation:n,parallelFlipRotation:i,regularFlipRotation:r}){let s=this.label.getSideFlag(),o=this.isAnySeriesActive();this.crossLines.forEach(a=>{a.sideFlag=-s,a.direction=n===-Math.PI/2?"x":"y",a instanceof O5e&&(a.label.parallel=a.label.parallel??this.label.parallel),a.parallelFlipRotation=i,a.regularFlipRotation=r,a.update(o)})}updateTickLines(){let{tick:n,label:i}=this,r=i.getSideFlag();this.tickLineGroupSelection.each(s=>{s.strokeWidth=n.width,s.stroke=n.stroke,s.x1=r*this.getTickSize(),s.x2=0})}calculateAvailableRange(){return fR(this.range)}calculateRangeWithBleed(){let n=1/fR(this.visibleRange);return vte(this.calculateAvailableRange()*n,2)}calculateDomain(){let i=this.boundSeries.filter(r=>this.includeInvisibleDomains||r.isEnabled()).flatMap(r=>r.getDomain(this.direction));this.setDomain(i)}getAxisTransform(){return{rotation:Rg(this.rotation),rotationCenterX:0,rotationCenterY:0,translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){let{crossLineGroup:n,axisGroup:i,gridGroup:r,translation:s,gridLineGroupSelection:o,gridPadding:a,gridLength:l}=this,{rotation:c}=this.calculateRotations(),d=this.label.getSideFlag(),u=Math.floor(s.x),m=Math.floor(s.y);n.setProperties({rotation:c,translationX:u,translationY:m}),r.setProperties({rotation:c,translationX:u,translationY:m}),i.datum=this.getAxisTransform(),o.each(f=>{f.x1=a,f.x2=-d*l+a})}updateSecondaryAxisTicks(n){throw new Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")}updateSelections(n,i,r){this.lineNode.datum=n,this.gridLineGroupSelection.update(this.gridLength?i:[],s=>s.append(new i0),s=>s.tickId),this.tickLineGroupSelection.update(i,s=>s.appendChild(new i0),s=>s.tickId),this.tickLabelGroupSelection.update(i.map(s=>this.getTickLabelProps(s,r)),s=>s.appendChild(new Gu),s=>s.tickId)}updateAxisLine(){let{line:n}=this,i=n.enabled?n.width:0;this.lineNode.setProperties({stroke:n.stroke,strokeWidth:i})}updateGridLines(n){let{gridLine:{style:i,width:r},gridPadding:s,gridLength:o}=this;o===0||i.length===0||this.gridLineGroupSelection.each((a,l,c)=>{let{stroke:d,lineDash:u}=i[c%i.length];a.setProperties({x1:s,x2:-n*o+s,fill:void 0,stroke:d,strokeWidth:r,lineDash:u})})}updateLabels(){let{label:n}=this;n.enabled&&this.tickLabelGroupSelection.each((i,r)=>{i.setProperties(r,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])})}updateTitle(n){let{rotation:i,title:r,_titleCaption:s,lineNode:o,tickLineGroup:a,tickLabelGroup:l}=this,c=0;if(r.enabled&&n.anyTickVisible){let d=xo.computeBBox([a,l,o]),u=i===0?d.width:d.height;c+=u+(this.tickLabelGroup.visible?0:this.seriesAreaPadding)}this.setTitleProps(s,{spacing:c})}formatTick(n,i,r){return String(this.getFormatter(r,!0)(n,i))}formatDatum(n){return String(this.getFormatter()(n))}getFormatter(n=0,i){let{label:r,labelFormatter:s,datumFormatter:o,moduleCtx:{callbackCache:a}}=this;return r.formatter?(l,c)=>a.call(r.formatter,{value:l,index:n,fractionDigits:c})??l:!i&&o?l=>a.call(o,l)??String(l):s?l=>a.call(s,l)??String(l):l=>String(l)}getBBox(){return this.axisGroup.getBBox()}getRegionBBoxProvider(){let{axisGroup:n}=this;return{id:this.id,computeTransformedBBox(){return n.computeTransformedBBox()},computeTransformedRegionBBox(){return n.computeTransformedRegionBBox()},get visible(){return n.visible}}}initCrossLine(n){n.scale=this.scale,n.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(n=>this.includeInvisibleDomains||n.isEnabled())}clipTickLines(n,i,r,s){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new Os(n,i,r,s))}clipGrid(n,i,r,s){this.gridGroup.setClipRectInGroupCoordinateSpace(new Os(n,i,r,s))}calculatePadding(n,i){let r=Math.abs(this.reverse?i:n)*.01;return[r,r]}getTitleFormatterParams(){let n=this.boundSeries.reduce((i,r)=>{let s=r.getKeys(this.direction),o=r.getNames(this.direction);for(let a=0;a<s.length;a++)i.push({key:s[a],name:o[a]});return i},[]);return{direction:this.direction,boundSeries:n,defaultValue:this.title?.text}}normaliseDataDomain(n){return{domain:[...n],clipped:!1}}getLayoutState(){return ve({id:this.id,rect:this.getBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize(),direction:this.direction,domain:this.dataDomain.domain,scale:this.scale},this.layout)}getModuleMap(){return this.moduleMap}createModuleContext(){return this.axisContext??(this.axisContext=this.createAxisContext()),St(ve({},this.moduleCtx),{parent:this.axisContext})}createAxisContext(){let{scale:n}=this;return{axisId:this.id,direction:this.direction,continuous:Ud.is(n)||a_.is(n),keys:()=>this.boundSeries.flatMap(i=>i.getKeys(this.direction)),seriesKeyProperties:()=>this.boundSeries.reduce((i,r)=>(r.getKeyProperties(this.direction).forEach(o=>{i.indexOf(o)<0&&i.push(o)}),i),[]),scaleValueFormatter:i=>this.getScaleValueFormatter(i),scaleBandwidth:()=>n.bandwidth??0,scaleDomain:()=>n.getDomain?.(),scaleConvert:i=>n.convert(i),scaleInvert:a_.is(n)?i=>n.invertNearest?.(i):i=>n.invert?.(i),scaleInvertNearest:i=>n.invertNearest?.(i),attachLabel:i=>this.attachLabel(i),inRange:(i,r)=>this.inRange(i,r)}}getScaleValueFormatter(n){let{scale:i}=this;if(n&&i&&i.tickFormat)try{return i.tickFormat({specifier:n})}catch{yr.warnOnce(`the format string ${n} is invalid, ignoring.`)}return this.getFormatter()}animateReadyUpdate(n){let{animationManager:i}=this.moduleCtx,r=fCe(this),s=Fit(r);om(this.id,"axis-group",i,[this.axisGroup],s.group),om(this.id,"line",i,[this.lineNode],s.line),om(this.id,"line-paths",i,[this.gridLineGroupSelection,this.tickLineGroupSelection],s.tick,(o,a)=>a.tickId,n),om(this.id,"tick-labels",i,[this.tickLabelGroupSelection],s.label,(o,a)=>a.tickId,n)}resetSelectionNodes(){let{gridLineGroupSelection:n,tickLineGroupSelection:i,tickLabelGroupSelection:r,lineNode:s}=this,o=fCe(this);Ef([this.axisGroup],Lit()),Ef([n,i],Oit(o)),Ef([r],Nit()),Ef([s],Vit())}calculateUpdateDiff(n,i){let r=new Set,s=new Set,o={},a=Math.max(n.length,i.ticks.length);for(let l=0;l<a;l++){let c=i.ticks[l],d=n[l],u=c?.tickId;o[u??d]=c,d!==u&&(s.has(u)?s.delete(u):u&&r.add(u),r.has(d)?r.delete(d):d&&s.add(d))}return{changed:r.size>0||s.size>0,added:r,removed:s}}isReversed(){return this.reverse}};return t.defaultTickMinSpacing=50,t.CrossLineConstructor=O5e,t})();Me([$e(Jo)],IE.prototype,"nice",2);Me([$e(Jo)],IE.prototype,"reverse",2);Me([$e(Ktt)],IE.prototype,"keys",2);Me([$e(Us)],IE.prototype,"interval",2);Me([$e(Us,{optional:!0})],IE.prototype,"title",2);Me([Lg((t,e,n)=>t.onGridLengthChange(e,n))],IE.prototype,"gridLength",2);u8e=IE,h8e=class extends g1{constructor(){super(...arguments),this.autoRotateAngle=335}};Me([$e(Jo,{optional:!0})],h8e.prototype,"autoRotate",2);Me([$e(xw)],h8e.prototype,"autoRotateAngle",2);p8e=class zit extends u8e{constructor(){super(...arguments),this.thickness=0}static is(e){return e instanceof zit}get direction(){return["top","bottom"].includes(this.position)?"x":"y"}updateDirection(){switch(this.position){case"top":this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1;break}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}update(e,n){return this.updateDirection(),super.update(e,n)}calculateLayout(e){return this.updateDirection(),super.calculateLayout(e)}createAxisContext(){return St(ve({},super.createAxisContext()),{position:this.position})}createLabel(){return new h8e}};Me([$e(Rr)],p8e.prototype,"thickness",2);Me([$e(t8e)],p8e.prototype,"position",2);AR=p8e,PR=(()=>{let t=class extends AR{constructor(e,n=new _w){super(e,n),this._paddingOverrideEnabled=!1,this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}set paddingInner(e){this._paddingOverrideEnabled=!0,this.scale.paddingInner=e}get paddingInner(){return this._paddingOverrideEnabled=!0,this.scale.paddingInner}set paddingOuter(e){this.scale.paddingOuter=e}get paddingOuter(){return this.scale.paddingOuter}normaliseDataDomain(e){let n=[],i=new Set;for(let r of e){let s=r instanceof Date?r.getTime():r;i.has(s)||(i.add(s),n.push(r))}return{domain:n,clipped:!1}}calculateDomain(){if(!this._paddingOverrideEnabled){let e=1/0,n=-1/0;for(let i of this.boundSeries){let r=i.getBandScalePadding?.();r!=null&&(e=Math.min(e,r.inner),n=Math.max(n,r.outer))}this.scale.paddingInner=Number.isFinite(e)?e:0,this.scale.paddingOuter=Number.isFinite(n)?n:0}return super.calculateDomain()}};return t.className="CategoryAxis",t.type="category",t})();Me([$e(ud)],PR.prototype,"groupPaddingInner",2);Hit=class{constructor(t="",e,n=0){this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=t,this.parent=e,this.depth=e?e.depth+1:0,this.number=n}getLeftSibling(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0}getLeftmostSibling(){return this.number>0&&this.parent?this.parent.children[0]:void 0}nextLeft(){return this.children?this.children[0]:this.thread}nextRight(){return this.children?this.children[this.children.length-1]:this.thread}getSiblings(){return this.parent?this.parent.children.filter((t,e)=>e!==this.number):[]}};det=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(t,e){let{x:n,y:i}=e(t);n>this.right&&(this.right=n),n<this.left&&(this.left=n),i>this.bottom&&(this.bottom=i),i<this.top&&(this.top=i)}};r3i=class{constructor(){this.dimensions=new det,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}update(t){this.dimensions.update(t,e=>({x:e.x,y:e.y})),t.children.length?this.nonLeafNodes.push(t):(this.leafCount++,this.leafNodes.push(t)),t.depth>this.depth&&(this.depth=t.depth),this.nodes.push(t)}resize(t,e,n=0,i=0,r=!1){let s=this.leafCount-1,o=this.depth,a=this.dimensions,l=1,c=1;if(t>0&&s){let f=(a.right-a.left)/s;l=t/s/f,r&&(l=-l)}if(e>0&&o){let f=(a.bottom-a.top)/o;c=e/o/f}let d=new det;this.nodes.forEach(f=>{f.screenX=f.x*l,f.screenY=f.y*c,d.update(f,_=>({x:_.screenX,y:_.screenY}))});let u=-d.left,m=-d.top;this.nodes.forEach(f=>{f.screenX+=u+n,f.screenY+=m+i})}},jit=class extends g1{constructor(){super(...arguments),this.grid=!1}};Me([$e(Jo)],jit.prototype,"grid",2);yR=(()=>{let t=class extends AR{constructor(e){let n=new _w;n.paddingOuter=.1,n.paddingInner=n.paddingOuter*2,super(e,n),this.tickScale=new _w,this.line=new zG,this.label=new jit,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;let{tickLineGroup:i,tickLabelGroup:r,gridLineGroup:s,tickScale:o}=this;o.paddingInner=1,o.paddingOuter=0,this.gridLineSelection=Oh.select(s,i0),this.axisLineSelection=Oh.select(i,i0),this.separatorSelection=Oh.select(i,i0),this.labelSelection=Oh.select(r,Gu),this.lineNode.visible=!1}updateRange(){let{range:e,visibleRange:n,scale:i}=this,r=(e[1]-e[0])/(n[1]-n[0]),s=r*n[0],o=e[0]-s;this.tickScale.range=i.range=[o,o+r],this.resizeTickTree()}resizeTickTree(){let e=this.scale,n=e.domain.length?[e.convert(e.domain[0]),e.convert(e.domain[e.domain.length-1])]:e.range,i=this.tickTreeLayout,r=this.lineHeight;i&&i.resize(Math.abs(n[1]-n[0]),i.depth*r,(Math.min(n[0],n[1])||0)+(e.bandwidth??0)/2,-i.depth*r,n[1]-n[0]<0)}get lineHeight(){return this.label.fontSize*1.5}onGridVisibilityChange(){this.gridLineSelection.clear(),this.labelSelection.clear()}calculateDomain(){let{direction:e}=this,n=null,i=this.boundSeries.filter(s=>s.visible).flatMap(s=>{if(e==="y"||n)return s.getDomain(e);if(n===null){let o=s.getDomain(e);return n=O4(o[0]),o}return[]});this.setDomain(sC(i)??Mte(i));let{domain:r}=this.dataDomain;this.tickTreeLayout=n3i(Xgi(r)),this.tickScale.domain=r.concat(""),this.resizeTickTree()}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){let{_titleCaption:e}=this;e.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;let{tickLabelLayout:e}=this.computedLayout;this.labelSelection.update(e).each((i,r)=>{i.setProperties(r)})}updateSeparators(){if(!this.computedLayout)return;let{separatorLayout:e}=this.computedLayout,{range:n}=this,i=1e-7;this.separatorSelection.update(e).each((s,o)=>{s.x1=o.x1,s.x2=o.x2,s.y1=o.y,s.y2=o.y,s.visible=this.tick.enabled&&o.y>=n[0]-i&&o.y<=n[1]+i,s.stroke=this.tick.stroke,s.fill=void 0,s.strokeWidth=1})}updateAxisLines(){if(!this.computedLayout)return;let{axisLineLayout:e}=this.computedLayout;this.axisLineSelection.update(e).each((i,r)=>{i.setProperties(St(ve({},r),{stroke:this.line.stroke,strokeWidth:this.line.width})),i.x1=r.x,i.x2=r.x,i.y1=r.y1,i.y2=r.y2,i.strokeWidth=this.line.width,i.stroke=this.line.stroke})}updateCategoryGridLines(){let{gridLength:e,gridLine:n,label:i,range:r,tickScale:s}=this,o=s.ticks(),a=i.getSideFlag(),l=this.gridLineSelection.update(e?o:[]);if(e){let{width:c,style:d}=n,u=d.length;l.each((m,f,_)=>{let x=Math.round(s.convert(f));m.x1=0,m.x2=-a*e,m.y1=x,m.y2=x,m.visible=n.enabled&&x>=r[0]&&x<=r[1];let{stroke:D,lineDash:E}=d[_%u];m.stroke=D,m.strokeWidth=c,m.lineDash=E,m.fill=void 0})}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();let{scale:e,label:n,label:{parallel:i},moduleCtx:{callbackCache:r},range:s,title:o,title:{formatter:a=Re=>Re.defaultValue}={}}=this,l=e.range[0],c=e.range[1],u=Math.abs(c-l)/e.domain.length||0,m=Math.ceil(n.fontSize/u),f=Rg(this.rotation),_=Math.abs(Math.cos(f))<1e-8,x=n.getSideFlag(),D=this.lineHeight,E=this.tickTreeLayout,M=e.ticks(),I=E?E.nodes:[],z=E?E.depth>1:!1,{defaultRotation:G,configuredRotation:A,parallelFlipFlag:Y}=rte({rotation:n.rotation,parallel:i,regularFlipRotation:Nh(f-Math.PI/2),parallelFlipRotation:Nh(f)}),X=[],ne=Re=>({fill:Re.fill,fontFamily:Re.fontFamily,fontSize:Re.fontSize,fontStyle:Re.fontStyle,fontWeight:Re.fontWeight,rotation:Re.rotation,rotationCenterX:Re.rotationCenterX,rotationCenterY:Re.rotationCenterY,text:Re.text,textAlign:Re.textAlign,textBaseline:Re.textBaseline,translationX:Re.translationX,translationY:Re.translationY,visible:Re.visible,x:Re.x,y:Re.y}),pe=new Map,ce=0,ie=new Gu,le=(Re,ot)=>{if(ie.setProperties({fill:n.color,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontWeight:n.fontWeight,textAlign:"center",textBaseline:Y===-1?"bottom":"hanging",translationX:Re.screenY-n.fontSize*.25,translationY:Re.screenX}),ot===0){if(!(o?.enabled&&M.length>0))return!1;let zt=r.call(a,this.getTitleFormatterParams());ie.setProperties({fill:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,text:zt,textBaseline:"hanging",translationX:Re.screenY-n.fontSize*.25,translationY:Re.screenX})}else if(ot%m===0){if(!(Re.screenX>=s[0]&&Re.screenX<=s[1]))return!1;n.formatter?ie.text=r.call(n.formatter,{value:String(Re.label),index:ot})??String(Re.label):ie.text=String(Re.label)}else return!1;return!0};I.forEach((Re,ot)=>{if(!le(Re,ot))return;let zt=ie.computeTransformedBBox();if(!zt)return;pe.set(ot,zt),!Re.children.length&&zt.width>ce&&(ce=zt.width)});let Se=x*n.padding,je=this.label.grid,ze=[];I.forEach((Re,ot)=>{let jt=le(Re,ot),zt=ot;ie.x=Se,ie.rotationCenterX=Se;let qt=!Re.children.length;if(qt)ie.rotation=A,ie.textAlign="end",ie.textBaseline="middle";else{ie.translationX-=ce-D+this.label.padding;let _i=Re.leafCount*u,ln=pe.get(zt);ln&&ln.width>_i?(jt=!1,pe.delete(zt)):_?ie.rotation=G:ie.rotation=-Math.PI/2}if(Re.parent&&z){let _i=qt?Re.screenX-u/2:Re.screenX-Re.leafCount*u/2;if(qt)(Re.number!==Re.children.length-1||je)&&ze.push({y:_i,x1:0,x2:-ce-this.label.padding*2});else{let ln=-ce-this.label.padding*2+Re.screenY;ze.push({y:_i,x1:ln+D,x2:ln})}}let ui;if(jt){let _i=ie.computeTransformedBBox();_i&&pe.set(ot,_i),ui=St(ve({},ne(ie)),{visible:jt})}else pe.delete(ot),ui={visible:jt};X.push(ui)});let Ge=0;ze.forEach(Re=>Ge=Math.min(Ge,Re.x2)),ze.push({y:Math.max(l,c),x1:0,x2:Ge});let Ae=[],Ye=[],ft=1e-7;ze.forEach(Re=>{if(Re.y>=s[0]-ft&&Re.y<=s[1]+ft){let{x1:ot,x2:jt,y:zt}=Re,qt=new Os(Math.min(ot,jt),zt,Math.abs(ot-jt),0);Ye.push(qt),Ae.push({x1:ot,x2:jt,y:zt})}});let Ft=[],Tt=[],at=E?E.depth+1:1;for(let Re=0;Re<at;Re++){let ot=M.length>0&&(Re===0||je&&z),jt=Re>0?-ce-this.label.padding*2-(Re-1)*D:0,zt=new Os(jt,Math.min(...s),0,Math.abs(s[1]-s[0]));Tt.push(zt),Ft.push({x:jt,y1:s[0],y2:s[1],visible:ot})}let yt=Os.merge([...pe.values(),...Ye,...Tt]);return{bbox:this.getTransformBox(yt),tickLabelLayout:X,separatorLayout:Ae,axisLineLayout:Ft}}calculateLayout(){let{axisLineLayout:e,separatorLayout:n,tickLabelLayout:i,bbox:r}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:n,tickLabelLayout:i},{bbox:r,primaryTickCount:void 0}}};return t.className="GroupedCategoryAxis",t.type="grouped-category",t})();Me([$e(kd,{optional:!0})],yR.prototype,"labelColor",2);HG=class{constructor(){this.destroyFns=[]}destroy(){for(let t of this.destroyFns)t()}},$it=class{constructor(){this.modules=[],this.dependencies=new Map,this.dependents=new Map}register(...t){for(let e of t){this.registerDependencies(e);let n=this.modules.find(i=>e.type===i.type&&e.optionsKey===i.optionsKey&&e.identifier===i.identifier);if(n){if(e.packageType==="enterprise"&&n.packageType==="community"){let i=this.modules.indexOf(n);this.modules.splice(i,1,e)}}else this.modules.push(e)}}hasEnterpriseModules(){return this.modules.some(t=>t.packageType==="enterprise")}*byType(...t){let{dependents:e}=this,n=new Set,i=0,r=3,s=this.modules.filter(o=>t.includes(o.type));do{for(let o of s)if(!(n.has(o.optionsKey)||e.has(o.optionsKey))){yield o,n.add(o.optionsKey);for(let[a,l]of e.entries())l.delete(o.optionsKey),l.size===0&&e.delete(a)}i++}while(n.size<s.length&&i<r);if(e.size>0)throw new Error(`Could not resolve module dependencies: [${[...e.keys()]}]`)}registerDependencies(t){if(!(t.dependencies==null||t.dependencies.length===0)){for(let e of t.dependencies){let n=this.dependencies.get(e)??new Set;n.add(t.optionsKey),this.dependencies.set(e,n)}this.dependents.set(t.optionsKey,new Set(t.dependencies))}}},gw=new $it;o3i=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(t){return new Promise(e=>{this.acquireQueue.push([t,e]),this.available&&this.dispatchNext().catch(n=>yr.errorOnce(n))})}acquireImmediately(t){return O(this,null,function*(){return this.available?(yield this.acquire(t),!0):!1})}waitForClearAcquireQueue(){return O(this,null,function*(){return this.acquire(()=>O(this,null,function*(){}))})}dispatchNext(){return O(this,null,function*(){this.available=!1;let[t,e]=this.acquireQueue.shift()??[];for(;t;){try{yield t(),e?.()}catch(n){yr.error("mutex callback error",n),e?.()}[t,e]=this.acquireQueue.shift()??[]}this.available=!0})}},Kit=class{constructor(){this.eventListeners=new Map}addEventListener(t,e){if(typeof e!="function")throw new Error("AG Charts - listener must be a Function");let n=this.eventListeners.get(t);n?n.add(e):this.eventListeners.set(t,new Set([e]))}removeEventListener(t,e){this.eventListeners.get(t)?.delete(e),this.eventListeners.size===0&&this.eventListeners.delete(t)}hasEventListener(t){return this.eventListeners.has(t)}clearEventListeners(){this.eventListeners.clear()}fireEvent(t){this.eventListeners.get(t.type)?.forEach(e=>e(t))}},Dw=class extends pl{constructor(t=0,e=t,n=t,i=e){super(),this.top=t,this.right=e,this.bottom=n,this.left=i}clear(){this.top=this.right=this.bottom=this.left=0}};Me([$e(Rr)],Dw.prototype,"top",2);Me([$e(Rr)],Dw.prototype,"right",2);Me([$e(Rr)],Dw.prototype,"bottom",2);Me([$e(Rr)],Dw.prototype,"left",2);GG="10.1.0",Zit=class{constructor(t){this.version=t.split("-")[0]}save(...t){let e={version:this.version};for(let n of Object.values(t))e[n.mementoOriginatorKey]=this.encode(n,n.createMemento());return e}restore(t,...e){if(typeof t!="object"){yr.warnOnce(`Could not restore data of type [${typeof t}], expecting an object, ignoring.`);return}if(t==null){yr.warnOnce("Could not restore data of type [null], expecting an object, ignoring.");return}if(!("version"in t)||typeof t.version!="string"){yr.warnOnce("Could not restore data, missing [version] string in object, ignoring.");return}for(let n of e){if(!(n.mementoOriginatorKey in t))continue;let i=this.decode(n,t[n.mementoOriginatorKey]);if(!n.guardMemento(i)){yr.warnOnce(`Could not restore [${n.mementoOriginatorKey}] data, value was invalid, ignoring.`,i);return}n.restoreMemento(this.version,t.version,i)}}encode(t,e){try{return JSON.parse(JSON.stringify(e,this.encodeTypes))}catch(n){throw new Error(`Failed to encode [${t.mementoOriginatorKey}] value [${n}].`,{cause:n})}}decode(t,e){try{return JSON.parse(JSON.stringify(e),this.decodeTypes)}catch(n){throw new Error(`Failed to decode [${t.mementoOriginatorKey}] value [${n}].`,{cause:n})}}encodeTypes(t,e){return RG(this[t])?{__type:"date",value:String(this[t])}:e}decodeTypes(t,e){return D3(this[t])&&"__type"in this[t]&&this[t].__type==="date"?new Date(this[t].value):e}},l3i=class{constructor(){this.caretaker=new Zit(GG),this.state=new Map}setState(t,e){V4(this.state.get(t.mementoOriginatorKey),e)!=null&&(this.state.set(t.mementoOriginatorKey,e),this.restoreState(t))}restoreState(t){let{caretaker:e,state:n}=this;if(!n.has(t.mementoOriginatorKey))return;let i=n.get(t.mementoOriginatorKey);e.restore({version:e.version,[t.mementoOriginatorKey]:i},t)}};Xit=class vCe{constructor(e){this.enabled=!0,this.width=600,this.height=300;let{width:n,height:i,pixelRatio:r,canvasConstructor:s,willReadFrequently:o=!1}=e;this.pixelRatio=c3i()?1:r??d_("devicePixelRatio"),this.element=s?.()??Rm("canvas"),this.element.style.display="block",this.element.style.width=(n??this.width)+"px",this.element.style.height=(i??this.height)+"px",this.element.width=Math.round((n??this.width)*this.pixelRatio),this.element.height=Math.round((i??this.height)*this.pixelRatio),this.context=this.element.getContext("2d",{willReadFrequently:o}),this.onEnabledChange(),this.resize(n??0,i??0),vCe.debugContext(this.context)}static is(e){return e instanceof vCe}drawImage(e,n=0,i=0){return e.drawImage(this.context.canvas,n,i)}toDataURL(e){return this.element.toDataURL(e)}resize(e,n){if(!(e>0&&n>0))return;let{element:i,context:r,pixelRatio:s}=this;i.width=Math.round(e*s),i.height=Math.round(n*s),r.setTransform(s,0,0,s,0,0),i.style.width=e+"px",i.style.height=n+"px",this.width=e,this.height=n}snapshot(){}clear(){this.context.save(),this.context.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}onEnabledChange(){this.element&&(this.element.style.display=this.enabled?"":"none")}static debugContext(e){if(bu.check("canvas")){let n=e.save.bind(e),i=e.restore.bind(e),r=0;Object.assign(e,{save(){n(),r++},restore(){if(r===0)throw new Error("AG Charts - Unable to restore() past depth 0");i(),r--},verifyDepthZero(){if(r!==0)throw new Error(`AG Charts - Save/restore depth is non-zero: ${r}`)}})}}};Me([Lg(t=>t.onEnabledChange())],Xit.prototype,"enabled",2);m8e=Xit,d3i=class Qit{constructor(e,n){this.canvas=e,this.markDirty=n,this.debug=bu.create(!0,"scene"),this.layersMap=new Map,this.nextZIndex=0,this.nextLayerId=0}static sortLayers(e,n){return fit([e.zIndex,...e.zIndexSubOrder??[void 0,void 0],e.id],[n.zIndex,...n.zIndexSubOrder??[void 0,void 0],n.id],mit)}get size(){return this.layersMap.size}forEach(e){Array.from(this.layersMap.values()).sort(Qit.sortLayers).forEach(e)}resize(e,n){this.canvas.resize(e,n),this.layersMap.forEach(({canvas:i})=>i.resize(e,n))}addLayer(e){let{width:n,height:i,pixelRatio:r}=this.canvas,{zIndex:s=this.nextZIndex++,name:o,zIndexSubOrder:a,getComputedOpacity:l,getVisibility:c}=e,d=new m8e({width:n,height:i,pixelRatio:r}),u={id:this.nextLayerId++,name:o,canvas:d,zIndex:s,zIndexSubOrder:a,getComputedOpacity:l,getVisibility:c};return s>=this.nextZIndex&&(this.nextZIndex=s+1),this.layersMap.set(d,u),this.debug("Scene.addLayer() - layers",this.layersMap),u.canvas}removeLayer(e){this.layersMap.has(e)&&(this.layersMap.delete(e),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() -  layers",this.layersMap))}moveLayer(e,n,i){let r=this.layersMap.get(e);r&&(r.zIndex=n,r.zIndexSubOrder=i,this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layersMap))}clear(){this.layersMap.clear()}};ent=(()=>{let t=class{constructor({width:e,height:n,pixelRatio:i,domManager:r}){this.debug=bu.create(!0,"scene"),this.id=k6(this),this.root=null,this.isDirty=!1,this.domManager=r;let s={width:e,height:n,pixelRatio:i};r&&(s.canvasConstructor=()=>r.addChild("canvas","scene-canvas")),this.canvas=new m8e(s),this.layersManager=new d3i(this.canvas,()=>{this.isDirty=!0})}get width(){return this.pendingSize?.[0]??this.canvas.width}get height(){return this.pendingSize?.[1]??this.canvas.height}setContainer(e){if((i=>typeof i.tagName<"u")(e)){let{element:i}=this.canvas;i.parentElement?.removeChild(i),e.appendChild(i)}else this.domManager=e,this.domManager.addChild("canvas","scene-canvas",this.canvas.element);return this}setRoot(e){return this.root===e?this:(this.isDirty=!0,this.root?._setLayerManager(),this.root=e,e&&(e.visible=!0,e._setLayerManager(this.layersManager)),this)}attachNode(e,n){if(!n)return this.root?.appendChild(e),()=>this.removeChild(e);let i=this.root?.children.find(r=>r instanceof xo&&r.name===n);if(!i)throw new Error("AG Charts - Unrecognized root group name: "+n);return i.appendChild(e),()=>i.removeChild(e)}appendChild(e){return this.root?.appendChild(e),this}removeChild(e){return this.root?.removeChild(e),this}download(e,n){vit(this.canvas.toDataURL(n),e?.trim()??"image")}getDataURL(e){return this.canvas.toDataURL(e)}resize(e,n){return e=Math.round(e),n=Math.round(n),e>0&&n>0&&(e!==this.width||n!==this.height)?(this.pendingSize=[e,n],this.isDirty=!0,!0):!1}render(e){return O(this,null,function*(){let{debugSplitTimes:n={start:performance.now()},extraDebugStats:i,seriesRect:r}=e??{},{canvas:s,canvas:{context:o}={},root:a,pendingSize:l}=this;if(!o)return;let c=performance.now();if(l&&(this.layersManager.resize(...l),this.pendingSize=void 0),a&&!a.visible){this.isDirty=!1;return}if(a&&!this.isDirty){this.debug.check()&&this.debug("Scene.render() - no-op",{redrawType:mw[a.dirty],tree:qee(a)}),uet(this.layersManager,n,o,void 0,i,r);return}let d={ctx:o,devicePixelRatio:this.canvas.pixelRatio??1,forceRender:!0,resized:!!l,debugNodes:{}};bu.check("scene:stats:verbose")&&(d.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0});let u=!1;if((!a||a.dirty>=1)&&(u=!0,s.clear()),a&&bu.check("scene:dirtyTree")){let{dirtyTree:m,paths:f}=Jit(a);bu.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:m,paths:f})}if(a&&u&&(this.debug("Scene.render() - before",{redrawType:mw[a.dirty],canvasCleared:u,tree:qee(a)}),a.visible&&(a.preRender(),o.save(),a.render(d),o.restore())),n["\u270D\uFE0F"]=performance.now()-c,this.layersManager.size&&u){let m=performance.now();o.save(),o.resetTransform(),this.layersManager.forEach(f=>{f.canvas.enabled&&f.getVisibility()&&(o.globalAlpha=f.getComputedOpacity(),f.canvas.drawImage(o))}),o.restore(),n["\u26D9"]=performance.now()-m}o.verifyDepthZero?.(),this.isDirty=!1,uet(this.layersManager,n,o,d.stats,i,r),u3i(o,d.debugNodes),a&&this.debug.check()&&this.debug("Scene.render() - after",{redrawType:mw[a.dirty],tree:qee(a),canvasCleared:u})})}strip(){let{context:e,pixelRatio:n}=this.canvas;e.setTransform(n,0,0,n,0,0),this.layersManager.clear(),this.setRoot(null),this.isDirty=!1}destroy(){this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0})}};return t.className="Scene",t})(),p3i=class{constructor(){this.cache=new WeakMap}call(t,...e){let n,i=this.cache.get(t);try{n=JSON.stringify(e)}catch{return this.invoke(t,e,i)}return i==null&&(i=new Map,this.cache.set(t,i)),i.has(n)?i.get(n):this.invoke(t,e,i,n)}invoke(t,e,n,i){try{let r=t(...e);return n&&i!=null&&n.set(i,r),r}catch(r){yr.warnOnce("User callback errored, ignoring",r);return}}invalidateCache(){this.cache=new WeakMap}},Ew=class{constructor(){this.registeredListeners=new Map}addListener(t,e){let n={symbol:Symbol(t),handler:e};return this.registeredListeners.has(t)?this.registeredListeners.get(t).push(n):this.registeredListeners.set(t,[n]),()=>this.removeListener(n.symbol)}removeListener(t){for(let[e,n]of this.registeredListeners.entries()){let i=n.findIndex(r=>r.symbol===t);if(i>=0){n.splice(i,1),n.length===0&&this.registeredListeners.delete(e);break}}}dispatch(t,...e){for(let n of this.getListenersByType(t))try{n.handler(...e)}catch(i){yr.errorOnce(i)}}dispatchWrapHandlers(t,e,...n){for(let i of this.getListenersByType(t))try{e(i.handler,...n)}catch(r){yr.errorOnce(r)}}getListenersByType(t){return this.registeredListeners.get(t)??[]}destroy(){this.registeredListeners.clear()}},b2=class{constructor(){this.listeners=new Ew,this.destroyFns=[]}addListener(t,e){return this.listeners.addListener(t,e)}destroy(){this.listeners.destroy(),this.destroyFns.forEach(t=>t())}},m3i=class extends b2{constructor(t){super(),this.annotationRoot=t,this.mementoOriginatorKey="annotations",this.annotations=[]}createMemento(){return this.annotations}guardMemento(t){return sp(t)}restoreMemento(t,e,n){let i=this.cleanData(n).map(r=>{let s=this.getAnnotationTypeStyles(r.type);return ql(r,s)});this.listeners.dispatch("restore-annotations",{type:"restore-annotations",annotations:i})}updateData(t){this.annotations=this.cleanData(t??[])}attachNode(t){return this.annotationRoot.append(t),()=>(this.annotationRoot?.removeChild(t),this)}setAnnotationStyles(t){this.styles=t}getAnnotationTypeStyles(t){return this.styles?.[t]}cleanData(t){for(let e of t)"textAlign"in e&&delete e.textAlign;return t}},f3i=class{constructor(t){this.sceneRoot=t,this.axes=new Map,this.axisGridGroup=new xo({name:"Axes-Grids",layer:!0,zIndex:1}),this.axisGroup=new xo({name:"Axes",layer:!0,zIndex:2}),this.sceneRoot.appendChild(this.axisGroup),this.sceneRoot.appendChild(this.axisGridGroup)}updateAxes(t,e){for(let n of t)e.includes(n)||(n.detachAxis(this.axisGroup,this.axisGridGroup),n.destroy());for(let n of e)t?.includes(n)||n.attachAxis(this.axisGroup,this.axisGridGroup);this.axes.clear();for(let n of e){let i=n.createAxisContext();this.axes.has(i.direction)?this.axes.get(i.direction)?.push(i):this.axes.set(i.direction,[i])}}getAxisContext(t){return[...this.axes.get(t)??[]]}destroy(){this.axes.clear(),this.sceneRoot.removeChild(this.axisGroup),this.sceneRoot.removeChild(this.axisGridGroup)}},Lte=class extends Ew{constructor(t){super(),this.animationManager=t,this.dispatchOnlyLatest=!0,this.dispatchThrottle=0,this.requestThrottle=300,this.isLoadingInitialData=!1,this.isLoadingData=!1,this.freshRequests=[],this.requestCounter=0,this.debug=bu.create(!0,"data-model","data-source"),this.throttledFetch=this.createThrottledFetch(this.requestThrottle),this.throttledDispatch=this.createThrottledDispatch(this.dispatchThrottle)}updateCallback(t){typeof t=="function"&&(this.debug("DataService - updated data source callback"),this.dataSourceCallback=t,this.isLoadingInitialData=!0,this.animationManager.skip(),this.dispatch("data-source-change"))}clearCallback(){this.dataSourceCallback=void 0}load(t){this.isLoadingData=!0,this.throttledFetch(t)}isLazy(){return this.dataSourceCallback!=null}isLoading(){return this.isLazy()&&(this.isLoadingInitialData||this.isLoadingData)}createThrottledFetch(t){return KJe(e=>this.fetch(e),t,{leading:!1,trailing:!0})}createThrottledDispatch(t){return KJe((e,n)=>{this.debug(`DataService - dispatching 'data-load' | ${e}`),this.dispatch("data-load",{type:"data-load",data:n})},t,{leading:!0,trailing:!0})}fetch(t){return O(this,null,function*(){if(!this.dataSourceCallback)throw new Error("DataService - [dataSource.getData] callback not initialised");let e=performance.now(),n=this.requestCounter++;this.debug(`DataService - requesting | ${n}`),this.freshRequests.push(n);let i;try{i=yield this.dataSourceCallback(t),this.debug(`DataService - response | ${performance.now()-e}ms | ${n}`)}catch(s){this.debug(`DataService - request failed | ${n}`),yr.errorOnce(`DataService - request failed | [${s}]`)}this.isLoadingInitialData=!1;let r=this.freshRequests.findIndex(s=>s===n);if(r===-1||this.dispatchOnlyLatest&&r!==this.freshRequests.length-1){this.debug(`DataService - discarding stale request | ${n}`);return}this.freshRequests=this.freshRequests.slice(r+1),this.freshRequests.length===0&&(this.isLoadingData=!1),Array.isArray(i)?this.throttledDispatch(n,i):this.dispatch("data-error")})}};Me([Fg({newValue(t){this.throttledDispatch=this.createThrottledDispatch(t)}})],Lte.prototype,"dispatchThrottle",2);Me([Fg({newValue(t){this.throttledFetch=this.createThrottledFetch(t)}})],Lte.prototype,"requestThrottle",2);g3i=`.ag-charts-wrapper,.ag-charts-wrapper:focus,.ag-charts-wrapper:after,.ag-charts-wrapper:before,.ag-charts-wrapper *,.ag-charts-wrapper *:focus,.ag-charts-wrapper *:after,.ag-charts-wrapper *:before{box-sizing:border-box;outline:none}.ag-charts-wrapper{position:relative}.ag-charts-canvas-center{width:100%;height:100%;position:absolute;touch-action:auto;display:flex;align-items:var(--ag-charts-align);justify-content:var(--ag-charts-justify)}.ag-charts-canvas-container,.ag-charts-canvas{position:relative}.ag-charts-canvas-container>*,.ag-charts-canvas>*{display:block}.ag-charts-canvas-proxy{position:absolute;top:0;left:0;opacity:0;pointer-events:none}.ag-charts-tab-guard{width:0;height:0;opacity:0}.ag-charts-canvas-overlay{pointer-events:none;position:absolute;inset:0}.ag-charts-canvas-overlay>*{position:absolute;pointer-events:auto}.ag-charts-theme-default,.ag-charts-theme-default-dark{--ag-charts-active-color: var(--ag-active-color, #2196f3);--ag-charts-background-color: var(--ag-background-color, #fff);--ag-charts-foreground-color: var(--ag-foreground-color, #181d1f);--ag-charts-border-color: var(--ag-border-color, #dddddd);--ag-charts-font-family: "Verdana", sans-serif;--ag-charts-font-size: var(--ag-font-size, 14px);--ag-charts-size: var(--ag-grid-size, 8px);--ag-charts-border: var(--ag-charts-border-color) var(--ag-borders, solid 1px);--ag-charts-border-critical: var(--ag-borders-critical, solid 1px);--ag-charts-layer-ui-overlay: 5;--ag-charts-layer-tooltip: 4;--ag-charts-layer-toolbar: 3;--ag-charts-layer-crosshair: 2;--ag-charts-layer-annotations: 1;--ag-charts-align: center;--ag-charts-justify: center;--ag-charts-axis-label-background-color: #474747;--ag-charts-axis-label-color: #ffffff;--ag-charts-toolbar-foreground-color: var(--ag-header-foreground-color, var(--ag-charts-foreground-color));--ag-charts-toolbar-background-color: var( --ag-header-background-color, color-mix(in srgb, var(--ag-charts-background-color), var(--ag-charts-foreground-color) 2%) );--ag-charts-toolbar-size: 34px;--ag-charts-toolbar-size-small: 24px;--ag-charts-toolbar-border: var(--ag-charts-border-critical, solid 1px) var(--ag-charts-border-color);--ag-charts-toolbar-hover-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 12% );--ag-charts-toolbar-focus-color: var(--ag-charts-active-color);--ag-charts-toolbar-active-background-color: var(--ag-charts-toolbar-hover-color);--ag-charts-toolbar-active-color: var(--ag-charts-active-color);--ag-charts-toolbar-disabled-foreground-color: var( --ag-disabled-foreground-color, color-mix(in srgb, transparent, var(--ag-charts-toolbar-foreground-color) 50%) );--ag-charts-toolbar-disabled-background-color: color-mix( in srgb, var(--ag-charts-toolbar-background-color), var(--ag-charts-toolbar-foreground-color) 6% );--ag-charts-toolbar-gap: var(--ag-charts-size);--ag-charts-toolbar-font-size: 13px;--ag-charts-toolbar-font-size-small: 12px;--ag-charts-toolbar-button-padding: 6px;--ag-charts-toolbar-button-padding-small: 1px;--ag-charts-popover-background-color: var(--ag-charts-toolbar-background-color);--ag-charts-popover-foreground-color: var(--ag-charts-toolbar-foreground-color);--ag-charts-popover-border: var(--ag-charts-toolbar-border);--ag-charts-popover-active-color: var(--ag-charts-toolbar-active-color);--ag-charts-popover-hover-color: var(--ag-charts-toolbar-hover-color);--ag-charts-popover-active-background-color: var(--ag-charts-toolbar-active-background-color);--ag-charts-popover-font-size-small: var(--ag-charts-toolbar-font-size-small);--ag-charts-button-radius: var(--ag-border-radius, 4px);--ag-charts-focus-border-color: var(--ag-input-focus-border-color, var(--ag-charts-active-color));--ag-charts-focus-border: solid 1px var(--ag-charts-focus-border-color);--ag-charts-focus-border-shadow: var( --ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color, var(--ag-charts-active-color)) 20%) );--ag-charts-icon-font-family: "agChartsDefault";--ag-charts-icon-font-weight: normal;--ag-charts-icon-font-color: color-mix(in srgb, transparent, var(--ag-charts-foreground-color), 90%);--ag-charts-icon-size: 20px;--ag-charts-text-annotations-placeholder: #888888}.ag-charts-theme-default-dark{--ag-charts-background-color: var(--ag-background-color, color-mix(in srgb, #fff, #182230 97%));--ag-charts-foreground-color: var(--ag-foreground-color, #fff);--ag-charts-border-color: var(--ag-border-color, rgba(255, 255, 255, .16));--ag-charts-hover-color: var( --ag-row-hover-color, color-mix(in srgb, transparent, var(--ag-charts-active-color) 20%) );--ag-charts-axis-label-background-color: #9caebb;--ag-charts-axis-label-color: #000000;--ag-charts-toolbar-background-color: var(--ag-header-background-color, color-mix(in srgb, #fff, #182230 93%));--ag-charts-toolbar-hover-color: color-mix( in srgb, var(--ag-charts-background-color), var(--ag-charts-active-color) 18% );--ag-charts-focus-border-shadow: var( --ag-input-focus-box-shadow, 0 0 0 3px color-mix(in srgb, transparent, var(--ag-input-focus-border-color, var(--ag-charts-active-color)) 20%) );--ag-charts-text-annotations-placeholder: #aaaaaa}.ag-charts-icon{display:block;width:var(--ag-charts-icon-size);height:var(--ag-charts-icon-size);speak:none;speak:never;mask:var(--icon) center / contain no-repeat;background-color:currentColor;transition:background-color .25s ease-in-out}.ag-charts-icon-callout-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtNC41MTRhMjYgMjYgMCAwIDAtMi4wMTcgMS41NGwtLjMxNC4yNmMtLjU1LjQ1Ny0xLjExNS45MjYtMS43NiAxLjQtLjY2OS40OTEtMS41NjItLjAxMi0xLjU2Mi0uOFYxNEg0LjVBMS41IDEuNSAwIDAgMSAzIDEyLjV6TTQuNSA0YS41LjUgMCAwIDAtLjUuNXY4YS41LjUgMCAwIDAgLjUuNWgxLjgzM3YzLjM3MmEzNiAzNiAwIDAgMCAxLjY3OC0xLjMzOGwuMzItLjI2NWEyNiAyNiAwIDAgMSAyLjIyNS0xLjY4NWwuMTI2LS4wODRIMTUuNWEuNS41IDAgMCAwIC41LS41di04YS41LjUgMCAwIDAtLjUtLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyAxdjNoMnYxMkg3djNINnYtM0g0VjRoMlYxek01IDVoM3YxMEg1ek0xMSAxNFY2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6bTEtN2gzdjZoLTN6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-comment-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy41MTMgMy45OTVhNi41IDYuNSAwIDAgMSA2LjA5OCAxMS40MWMtLjU4OC4zOTMtMS4yMTcuNTM2LTEuODI5LjU4NWExMyAxMyAwIDAgMS0xLjI3LjAxN0EyNyAyNyAwIDAgMCAxMCAxNkg0LjVhLjUuNSAwIDAgMS0uNS0uNVYxMHEwLS4yNDctLjAwNy0uNTEzYy0uMDA4LS40MTYtLjAxNi0uODU3LjAxNy0xLjI2OS4wNS0uNjEyLjE5Mi0xLjI0LjU4NS0xLjgzYTYuNSA2LjUgMCAwIDEgMi45MTgtMi4zOTNtMy41Ni42MWE1LjUgNS41IDAgMCAwLTUuNjQ2IDIuMzRjLS4yNjYuMzk3LS4zNzkuODQyLS40MiAxLjM1NC0uMDMuMzYtLjAyMi43MTgtLjAxNSAxLjEwOFE1IDkuNjg5IDUgMTB2NWg1cS4zMTEuMDAxLjU5My4wMDhjLjM5LjAwNy43NDcuMDE1IDEuMTA4LS4wMTUuNTEyLS4wNDEuOTU3LS4xNTQgMS4zNTUtLjQyYTUuNSA1LjUgMCAwIDAtMS45ODMtOS45NjciIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-crosshair-add-line{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-delete{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTguNDk2IDguOTk2QS41LjUgMCAwIDEgOSA5LjQ5MnY0YS41LjUgMCAxIDEtMSAuMDA4di00YS41LjUgMCAwIDEgLjQ5Ni0uNTA0TTEyIDkuNWEuNS41IDAgMCAwLTEgMHY0YS41LjUgMCAwIDAgMSAweiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTYgNVYzLjVBMi41IDIuNSAwIDAgMSA4LjUgMWgzQTIuNSAyLjUgMCAwIDEgMTQgMy41VjVoMi44MzNhLjUuNSAwIDAgMSAwIDFIMTV2MTAuMjVjMCAuNDE1LS4wNjYuODYzLS4zIDEuMjIxLS4yNTcuMzk0LS42NzIuNjEyLTEuMi42MTJoLTdjLS41MjggMC0uOTQzLS4yMTgtMS4yLS42MTItLjIzNC0uMzU4LS4zLS44MDYtLjMtMS4yMjFWNkgzLjMzM2EuNS41IDAgMCAxIDAtMXptMS0xLjVBMS41IDEuNSAwIDAgMSA4LjUgMmgzQTEuNSAxLjUgMCAwIDEgMTMgMy41VjVIN3pNNiAxNi4yNVY2aDh2MTAuMjVjMCAuMzM1LS4wNTkuNTU0LS4xMzguNjc1LS4wNTUuMDg1LS4xNC4xNTgtLjM2Mi4xNThoLTdjLS4yMjIgMC0uMzA3LS4wNzMtLjM2Mi0uMTU4LS4wOC0uMTIxLS4xMzgtLjM0LS4xMzgtLjY3NSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-disjoint-channel,.ag-charts-icon-disjoint-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTkuMDI4IDE3LjQ2YTIuMjUgMi4yNSAwIDAgMC00LjA5Mi0xLjg1bC05LjUxMS0yLjM3OGEyLjI1IDIuMjUgMCAxIDAtLjIyNS45NzRsOS40NzUgMi4zNjlhMi4yNTEgMi4yNTEgMCAwIDAgNC4zNTMuODg2bS0xLjY2Mi0xLjk2NWExLjI1IDEuMjUgMCAxIDEtLjg4NSAyLjMzOCAxLjI1IDEuMjUgMCAwIDEgLjg4NS0yLjMzOE00LjM0MyAxMy42NjlhMS4yNSAxLjI1IDAgMSAwLTIuMzM4LS44ODUgMS4yNSAxLjI1IDAgMCAwIDIuMzM4Ljg4NU0zLjk3IDguNzY5YTIuMjUgMi4yNSAwIDAgMCAxLjQ1NS0yLjExbDkuNTExLTIuMzc4YTIuMjUgMi4yNSAwIDEgMC0uMjYtLjk2NUw1LjIgNS42ODVhMi4yNSAyLjI1IDAgMSAwLTEuMjMgMy4wODRtLjM3My0yLjU0N2ExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjc1LTMuNDM4YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hollow-candlestick-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1vcGFjaXR5PSIuMTUiIGQ9Ik01IDVoM3YxMEg1eiIvPjxwYXRoIGZpbGw9IiMxMzE3MjIiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMXYzaDJ2MTJIN3YzSDZ2LTNINFY0aDJWMXpNNSA1aDN2MTBINXptNyAyaDN2NmgtM3ptLTEgN1Y2aDJWMy4yNWgxVjZoMnY4aC0ydjIuNzVoLTFWMTR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-horizontal-line,.ag-charts-icon-horizontal-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNLjUgOS41aDcuMzA2YTIuMjUgMi4yNSAwIDAgMSA0LjM4OCAwSDE5LjV2MWgtNy4zMDZhMi4yNSAyLjI1IDAgMCAxLTQuMzg4IDBILjV6bTkuNSAxLjc1YTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQuMjQyIDIuNzIyYy0uNjEyIDAtMS4yLjI0My0xLjYzMi42NzVsLTEuMzQzIDEuMzQ0YS41LjUgMCAwIDAtLjExMi4xMTJMNC4wNSAxMS45NTljLS4yMDcuMjA3LS4zNi40Ni0uNDQ2Ljc0di4wMDFsLS42OSAyLjc2N3YuMDAyYS44Mi44MiAwIDAgMCAxLjAyMiAxLjAyMWguMDAybDIuNjM0LS44MjJjLjI4LS4wODUuNTM0LS4yMzcuNzQtLjQ0M2w3LjEwNy03LjEwOGEuNS41IDAgMCAwIC4xMTItLjExMmwxLjM0My0xLjM0M2EyLjMwOCAyLjMwOCAwIDAgMC0xLjYzMi0zLjk0TTE0LjEyMiA3bDEuMDQ0LTEuMDQ1YTEuMzA4IDEuMzA4IDAgMSAwLTEuODQ5LTEuODVMMTIuMjcxIDUuMTV6bS0yLjU1OC0xLjE0Mi02LjgwNyA2LjgwOWEuOC44IDAgMCAwLS4xOTYuMzI1bC0uNzUgMi40NjggMi40Ny0uNzQ5YS44LjggMCAwIDAgLjMyNS0uMTk0bDYuODA4LTYuODF6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTcuMzYyIDQuODczLTQuNTk0IDYuNjU0LTQuODUtMy4zMTctNC4yNTEgNi45NzctLjg1NC0uNTJMNy42MTIgNi43OWw0Ljg5OSAzLjM1IDQuMDI4LTUuODM2eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-line-with-markers-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTk4IDQuODg4LTMuNTU2IDQuOTE4YTIuMjUgMi4yNSAwIDEgMS0zLjg2Ni43NWwtMS40MzItLjlhMi4yNCAyLjI0IDAgMCAxLTIuMDA5LjQzNWwtMy44MjggNi40MjgtLjg2LS41MTJMNi40NSA5LjYyM2EyLjI1IDIuMjUgMCAxIDEgMy41MS0uNzYxbDEuMzI5LjgzNWEyLjI0IDIuMjQgMCAwIDEgMi41NTctLjQ5N2wzLjU0Mi00Ljg5OHptLTQuOTYgNS4xNTNhMS4yNSAxLjI1IDAgMSAwLS42NCAyLjQxOSAxLjI1IDEuMjUgMCAwIDAgLjY0LTIuNDE5TTkuMSA4LjMyMXEuMDY2LS4xOTIuMDY3LS40MDRhMS4yNSAxLjI1IDAgMSAwLS4wNjcuNDA0IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-lock,.ag-charts-icon-locked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuMjA3IDMuNzY0YTIuODk0IDIuODk0IDAgMCAwLTIuODk1IDIuODk0VjloNS43ODlWNi42NThhMi44OTQgMi44OTQgMCAwIDAtMi44OTUtMi44OTRNMTQuMSA5VjYuNjU4YTMuODk0IDMuODk0IDAgMSAwLTcuNzg5IDB2Mi4zNDlBMi41IDIuNSAwIDAgMCA0IDExLjV2M0EyLjUgMi41IDAgMCAwIDYuNSAxN2g4YTIuNSAyLjUgMCAwIDAgMi41LTIuNXYtM0EyLjUgMi41IDAgMCAwIDE0LjUgOXpNNi41IDEwQTEuNSAxLjUgMCAwIDAgNSAxMS41djNBMS41IDEuNSAwIDAgMCA2LjUgMTZoOGExLjUgMS41IDAgMCAwIDEuNS0xLjV2LTNhMS41IDEuNSAwIDAgMC0xLjUtMS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-note-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyA0LjVBMS41IDEuNSAwIDAgMSA0LjUgM2gxMUExLjUgMS41IDAgMCAxIDE3IDQuNXY4YTEuNSAxLjUgMCAwIDEtMS41IDEuNWgtMy4yMWwtMS40NjkgMi41N2ExIDEgMCAwIDEtMS42ODIuMDg1TDcuMjQzIDE0SDQuNUExLjUgMS41IDAgMCAxIDMgMTIuNXpNNC41IDRhLjUuNSAwIDAgMC0uNS41djhhLjUuNSAwIDAgMCAuNS41aDMuMjU3bDIuMTk2IDMuMDc0TDExLjcxIDEzaDMuNzlhLjUuNSAwIDAgMCAuNS0uNXYtOGEuNS41IDAgMCAwLS41LS41eiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNi41IDYuNUEuNS41IDAgMCAxIDcgNmg2YS41LjUgMCAwIDEgMCAxSDdhLjUuNSAwIDAgMS0uNS0uNU02LjUgOS41QS41LjUgMCAwIDEgNyA5aDZhLjUuNSAwIDAgMSAwIDFIN2EuNS41IDAgMCAxLS41LS41IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-ohlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZD0iTTEzIDExaC0zdi0xaDNWM2gxdjJoNHYxaC00djExaC0xek02IDE3di0yaDN2LTFINlY0SDV2MUgydjFoM3YxMXoiLz48L3N2Zz4=)}.ag-charts-icon-fill-color{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtOC4wNzEgNC4wNi0uOTI0LS45MjQuNzA3LS43MDcgNy4yODggNy4yODgtNC45NSA0Ljk1YTMuNSAzLjUgMCAwIDEtNC45NSAwbC0xLjQxNC0xLjQxNGEzLjUgMy41IDAgMCAxIDAtNC45NXptLjcwNy43MDhMNC41MzYgOS4wMWEyLjUgMi41IDAgMCAwIDAgMy41MzZMNS45NSAxMy45NmEyLjUgMi41IDAgMCAwIDMuNTM1IDBsNC4yNDMtNC4yNDN6bTYuOSA3LjIwMi0uMzQ1LjM2My0uMzQ0LS4zNjNhLjUuNSAwIDAgMSAuNjg4IDBtLS4zNDUgMS4wOGE4IDggMCAwIDAtLjI4LjMyMyA0LjMgNC4zIDAgMCAwLS40MDkuNTgyYy0uMTEzLjIwMS0uMTQ0LjMyNi0uMTQ0LjM3OGEuODMzLjgzMyAwIDAgMCAxLjY2NyAwYzAtLjA1Mi0uMDMxLS4xNzctLjE0NC0uMzc4YTQuMyA0LjMgMCAwIDAtLjQxLS41ODIgOCA4IDAgMCAwLS4yOC0uMzIybS0uMzQ0LTEuMDguMzQ0LjM2My4zNDQtLjM2My4wMDIuMDAyLjAwNC4wMDQuMDEzLjAxMmE2IDYgMCAwIDEgLjIwNi4yMDhjLjEzMS4xMzYuMzA4LjMyNy40ODUuNTQ1LjE3Ni4yMTUuMzYzLjQ2Ny41MDcuNzI0LjEzNy4yNDMuMjczLjU1My4yNzMuODY4YTEuODMzIDEuODMzIDAgMSAxLTMuNjY3IDBjMC0uMzE1LjEzNi0uNjI1LjI3My0uODY4LjE0NC0uMjU3LjMzLS41MDkuNTA3LS43MjRhOSA5IDAgMCAxIC42NDUtLjcwOGwuMDQ2LS4wNDUuMDEzLS4wMTIuMDA0LS4wMDR6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-pan-end{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0ibTYuNjQ2IDEzLjgxMy0uMzUzLjM1NC43MDcuNzA3LjM1NC0uMzU0ek0xMS4xNjYgMTBsLjM1NC4zNTQuMzU0LS4zNTQtLjM1NC0uMzU0ek03LjM1NSA1LjQ4IDcgNS4xMjZsLS43MDcuNzA3LjM1My4zNTR6bTAgOS4wNCA0LjE2Ni00LjE2Ni0uNzA3LS43MDgtNC4xNjcgNC4xNjd6bTQuMTY2LTQuODc0TDcuMzU0IDUuNDhsLS43MDguNzA3IDQuMTY3IDQuMTY3ek0xMy4wODMgNXYxMGgxVjV6Ii8+PC9zdmc+)}.ag-charts-icon-pan-left{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuNzkgNS44MzMgOC42MjUgMTBsNC4xNjYgNC4xNjctLjcwNy43MDdMNy4yMSAxMGw0Ljg3My00Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-right{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNy4yMSAxNC4xNjcgMTEuMzc2IDEwIDcuMjEgNS44MzNsLjcwNy0uNzA3TDEyLjc5IDEwbC00Ljg3MyA0Ljg3NHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-start{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTYgNXYxMGgxVjV6TTkuNjI0IDEwbDQuMTY2LTQuMTY3LS43MDctLjcwN0w4LjIxIDEwbDQuODc0IDQuODc0LjcwNy0uNzA3eiIvPjwvc3ZnPg==)}.ag-charts-icon-parallel-channel,.ag-charts-icon-parallel-channel-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTcuNzIgNS4zMzFBMi4yNSAyLjI1IDAgMSAwIDE0LjcwNSAzLjZsLTkuNDkgNC41NjJhMi4yNSAyLjI1IDAgMSAwIC4yMDkgMS4wMWw5LjY2Mi00LjY0NmEyLjI1IDIuMjUgMCAwIDAgMi42MzQuODA1bS4zNzMtMi41NDdhMS4yNSAxLjI1IDAgMSAxLTIuMzM4Ljg4NSAxLjI1IDEuMjUgMCAwIDEgMi4zMzgtLjg4NU00LjM0MyA4LjY3YTEuMjUgMS4yNSAwIDEgMS0yLjMzOC44ODUgMS4yNSAxLjI1IDAgMCAxIDIuMzM4LS44ODVNNS4zMDcgMTYuNzI4YTIuMjUgMi4yNSAwIDEgMS0uNTI1LS44NThsOS45MjMtNC43N2EyLjI1IDIuMjUgMCAxIDEgLjM4MS45MjZ6bS0uOTY0LjI3NGExLjI1IDEuMjUgMCAxIDEtMi4zMzguODg1IDEuMjUgMS4yNSAwIDAgMSAyLjMzOC0uODg1bTEzLjAyMy01LjEwNmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-price-label-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNC41IDNBMS41IDEuNSAwIDAgMCAzIDQuNVYxM2ExLjUgMS41IDAgMCAwIDEuNSAxLjVoLjgzM3YuMDU3Yy4yNDItLjI5OS41OTctLjUwMyAxLS41NDhWMTMuNUg0LjVBLjUuNSAwIDAgMSA0IDEzVjQuNWEuNS41IDAgMCAxIC41LS41aDExYS41LjUgMCAwIDEgLjUuNXY4YS41LjUgMCAwIDEtLjUuNWgtNC44MThsLS4xMjYuMDg0YTI2IDI2IDAgMCAwLTIuMjI1IDEuNjg1bC0uMzIuMjY1LS4wNjguMDU2YTEuNSAxLjUgMCAwIDEtMi42MDkgMS4zNTRjLjAzMy43NjMuOTA1IDEuMjM4IDEuNTYuNzU2LjY0Ni0uNDc0IDEuMjEtLjk0MyAxLjc2MS0xLjRsLjMxMy0uMjZBMjYgMjYgMCAwIDEgMTAuOTg2IDE0SDE1LjVhMS41IDEuNSAwIDAgMCAxLjUtMS41di04QTEuNSAxLjUgMCAwIDAgMTUuNSAzeiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43MTYgMTQuODE1YTIuMjUgMi4yNSAwIDEgMS00LjIxIDEuNTkzIDIuMjUgMi4yNSAwIDAgMSA0LjIxLTEuNTkzbS0xLjY2MiAxLjk2NmExLjI1IDEuMjUgMCAxIDAtLjg4NS0yLjMzOSAxLjI1IDEuMjUgMCAwIDAgLjg4NSAyLjMzOSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-reset{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuMDQgNC40NDVhNS44MSA1LjgxIDAgMCAwLTcuMjU3IDIuNDUzLjUuNSAwIDAgMS0uODY1LS41MDJBNi44MSA2LjgxIDAgMSAxIDMgOS44MTNhLjUuNSAwIDAgMSAxIDAgNS44MSA1LjgxIDAgMSAwIDguMDQtNS4zNjgiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMjg5IDMuMDAyYS41LjUgMCAwIDEgLjUuNXYyLjY1NWgyLjY1NWEuNS41IDAgMCAxIDAgMUg0LjI5YS41LjUgMCAwIDEtLjUtLjVWMy41MDJhLjUuNSAwIDAgMSAuNS0uNSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ag-charts-icon-step-line-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzE4MUQxRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNiA0aDV2OGgzVjhoNXYxaC00djRoLTVWNUg3djEwSDJ2LTFoNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-text-annotation{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00IDRIMTZWN0gxNVY1SDEwLjVWMTVIMTRWMTZINlYxNUg5LjVWNUg1VjdINFY0WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==)}.ag-charts-icon-trend-line,.ag-charts-icon-trend-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS4zMTQgMTAuOTM4YTIuMjUgMi4yNSAwIDEgMSAuMDEtMWg5LjM1MmEyLjI1IDIuMjUgMCAxIDEgLjAxIDF6bS0yLjE4OS43MjlhMS4yNSAxLjI1IDAgMSAwIDAtMi41IDEuMjUgMS4yNSAwIDAgMCAwIDIuNW0xMy43NSAwYTEuMjUgMS4yNSAwIDEgMCAwLTIuNSAxLjI1IDEuMjUgMCAwIDAgMCAyLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock,.ag-charts-icon-unlocked{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNjUxIDMuNWEyLjg5NCAyLjg5NCAwIDAgMC0yLjg5NCAyLjg5NFY5SDE0LjVhMi41IDIuNSAwIDAgMSAyLjUgMi41djNhMi41IDIuNSAwIDAgMS0yLjUgMi41aC04QTIuNSAyLjUgMCAwIDEgNCAxNC41di0zQTIuNSAyLjUgMCAwIDEgNi41IDloLjI1N1Y2LjM5NGEzLjg5NCAzLjg5NCAwIDEgMSA3Ljc4OSAwIC41LjUgMCAwIDEtMSAwQTIuODk0IDIuODk0IDAgMCAwIDEwLjY1IDMuNU02LjUgMTBBMS41IDEuNSAwIDAgMCA1IDExLjV2M0ExLjUgMS41IDAgMCAwIDYuNSAxNmg4YTEuNSAxLjUgMCAwIDAgMS41LTEuNXYtM2ExLjUgMS41IDAgMCAwLTEuNS0xLjV6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-vertical-line,.ag-charts-icon-vertical-line-drawing{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTAuNSA3LjgwNmEyLjI1IDIuMjUgMCAwIDEgMCA0LjM4OFYxOS41aC0xdi03LjMwNmEyLjI1IDIuMjUgMCAwIDEgMC00LjM4OFYuNWgxem0tLjUuOTQ0YTEuMjUgMS4yNSAwIDEgMSAwIDIuNSAxLjI1IDEuMjUgMCAwIDEgMC0yLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-zoom-in{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTEwIDUuNWEuNS41IDAgMCAxIC41LjV2My41aDMuODc1YS41LjUgMCAwIDEgMCAxSDEwLjV2NC4yNWEuNS41IDAgMSAxLTEgMFYxMC41SDUuNjI1YS41LjUgMCAxIDEgMC0xSDkuNVY2YS41LjUgMCAwIDEgLjUtLjUiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNS41IDEwYS41LjUgMCAwIDEgLjUtLjVoOGEuNS41IDAgMCAxIDAgMUg2YS41LjUgMCAwIDEtLjUtLjUiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-high-low-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNyA0aDJ2MTJINFY0aDNNNSA1aDN2MTBINXpNMTEgMTRWNmg1djhoLTVtMS03aDN2NmgtM3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-icon-hlc-series{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzEzMTcyMiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMTguMTYzIDEuODM3LTUuMzM0IDExLjYyMUw2Ljk1NyA4LjEybC00LjE5OSA5LjYyMi0uOTE2LS40IDQuNzU2LTEwLjlMMTIuNDkgMTEuOCAxNy4yNTQgMS40MnoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjxwYXRoIGZpbGw9IiMwMDAiIGZpbGwtb3BhY2l0eT0iLjQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTUuODI1IDIuNzA0LjU1IDEzLjc4NWwuOTAyLjQzIDQuNzI0LTkuOTE5IDYuMDM0IDUuMDI5IDMuMjU1LTguMTQtLjkyOC0uMzctMi43NDUgNi44NnptNy44NTIgMTQuNjM2IDUuNzgtMTMuMTM5LS45MTUtLjQwMi01LjIxOSAxMS44Ni02LjAwNS01LjUwNC0zLjI3OCA3LjY0OC45Mi4zOTQgMi43MjItNi4zNTJ6IiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljc1IDQuNWEuNzUuNzUgMCAwIDAtMS41IDB2Mi43NUg0LjVhLjc1Ljc1IDAgMCAwIDAgMS41aDIuNzV2Mi43NWEuNzUuNzUgMCAwIDAgMS41IDBWOC43NWgyLjc1YS43NS43NSAwIDAgMCAwLTEuNUg4Ljc1VjQuNVoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-out-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjc1IDhhLjc1Ljc1IDAgMCAxIC43NS0uNzVoN2EuNzUuNzUgMCAwIDEgMCAxLjVoLTdBLjc1Ljc1IDAgMCAxIDMuNzUgOFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-zoom-in-alt,.ag-charts-icon-zoom-in-alt-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20taW4iPjxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiLz48bGluZSB4MT0iMjEiIHgyPSIxNi42NSIgeTE9IjIxIiB5Mj0iMTYuNjUiLz48bGluZSB4MT0iMTEiIHgyPSIxMSIgeTE9IjgiIHkyPSIxNCIvPjxsaW5lIHgxPSI4IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjExIi8+PC9zdmc+)}.ag-charts-icon-zoom-out-alt,.ag-charts-icon-zoom-out-alt-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXpvb20tb3V0Ij48Y2lyY2xlIGN4PSIxMSIgY3k9IjExIiByPSI4Ii8+PGxpbmUgeDE9IjIxIiB4Mj0iMTYuNjUiIHkxPSIyMSIgeTI9IjE2LjY1Ii8+PGxpbmUgeDE9IjgiIHgyPSIxNCIgeTE9IjExIiB5Mj0iMTEiLz48L3N2Zz4=)}.ag-charts-icon-reset-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00LjQxMiA0LjA1OCAyLjc1IDIuMzk2VjYuNzVoLjc0NGEuNzYuNzYgMCAwIDAgLjAxMiAwaDMuNTk4TDUuNDc4IDUuMTI1YTQuMTI1IDQuMTI1IDAgMCAxIDIuNTIzLS44NzUgMy43NSAzLjc1IDAgMSAxLTMuMTE5IDUuODMzLjc1Ljc1IDAgMCAwLTEuMjQ3LjgzNEE1LjI1IDUuMjUgMCAxIDAgOCAyLjc1aC0uMDAzYTUuNjI1IDUuNjI1IDAgMCAwLTMuNTg1IDEuMzA4WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-pan-left-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC4wMyA0LjQ3YS43NS43NSAwIDAgMSAwIDEuMDZMNy41NiA4bDIuNDcgMi40N2EuNzUuNzUgMCAxIDEtMS4wNiAxLjA2bC0zLTNhLjc1Ljc1IDAgMCAxIDAtMS4wNmwzLTNhLjc1Ljc1IDAgMCAxIDEuMDYgMFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-pan-right-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01Ljk3IDExLjUzYS43NS43NSAwIDAgMSAwLTEuMDZMOC40NCA4IDUuOTcgNS41M2EuNzUuNzUgMCAwIDEgMS4wNi0xLjA2bDMgM2EuNzUuNzUgMCAwIDEgMCAxLjA2bC0zIDNhLjc1Ljc1IDAgMCAxLTEuMDYgMFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-pan-start-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tZmlyc3QiPjxwYXRoIGQ9Im0xNyAxOC02LTYgNi02Ii8+PHBhdGggZD0iTTcgNnYxMiIvPjwvc3ZnPg==)}.ag-charts-icon-pan-end-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tbGFzdCI+PHBhdGggZD0ibTcgMTggNi02LTYtNiIvPjxwYXRoIGQ9Ik0xNyA2djEyIi8+PC9zdmc+)}.ag-charts-icon-trend-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMi41IiBjeT0iOCIgcj0iMS43NSIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxjaXJjbGUgY3g9IjEzLjUiIGN5PSI4IiByPSIxLjc1IiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMS41Ii8+PHBhdGggc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTQgOGg4Ii8+PC9zdmc+)}.ag-charts-icon-horizontal-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC4zODYgOC43NWEyLjUwMSAyLjUwMSAwIDAgMS00Ljc3MiAwSC43NWEuNzUuNzUgMCAwIDEgMC0xLjVoNC44NjRhMi41MDEgMi41MDEgMCAwIDEgNC43NzIgMGg0Ljg2NGEuNzUuNzUgMCAwIDEgMCAxLjVoLTQuODY0Wk05IDhhMSAxIDAgMSAxLTIgMCAxIDEgMCAwIDEgMiAwWiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-vertical-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljc1IDUuNjE0YTIuNTAxIDIuNTAxIDAgMCAxIDAgNC43NzJ2NC44NjRhLjc1Ljc1IDAgMCAxLTEuNSAwdi00Ljg2NGEyLjUwMSAyLjUwMSAwIDAgMSAwLTQuNzcyVi43NWEuNzUuNzUgMCAwIDEgMS41IDB2NC44NjRaTTggN2ExIDEgMCAxIDEgMCAyIDEgMSAwIDAgMSAwLTJaIiBmaWxsPSIjMDAwIi8+PC9zdmc+)}.ag-charts-icon-parallel-channel-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC40MjQgNC45MmEyLjUgMi41IDAgMSAwLTMuMzc3LTIuMTRsLTYuNjMgMi45YTIuNTAxIDIuNTAxIDAgMSAwIC42MDcgMS4zNzJsNi41ODUtMi44OGEyLjUwMSAyLjUwMSAwIDAgMCAyLjgxNS43NDhabS4wNS0yLjY5M2ExIDEgMCAxIDEtMS44Ny43MDggMSAxIDAgMCAxIDEuODctLjcwOFptLTExIDQuNzVhMSAxIDAgMSAxLTEuODcuNzA4IDEgMSAwIDAgMSAxLjg3LS43MDhabTEuNTUgNi4wNzVhMi41MDEgMi41MDEgMCAxIDEtLjYwNy0xLjM3Mmw2LjYzLTIuOWEyLjUwMSAyLjUwMSAwIDEgMSAuNTYyIDEuMzkxbC02LjU4NSAyLjg4Wm0tMS41NS0uMDc1YTEgMSAwIDEgMS0xLjg3LjcwOCAxIDEgMCAwIDEgMS44Ny0uNzA4Wm0xMC40Mi0zLjQ2YTEgMSAwIDEgMC0uNzA5LTEuODcgMSAxIDAgMCAwIC43MDggMS44N1oiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-disjoint-channel-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC40MjQgNC45MmEyLjUgMi41IDAgMSAwLTMuMzgzLTIuNDUzTDQuNjkgNC4wNTVhMi41IDIuNSAwIDEgMCAuMzQ0IDEuNDZsNi4zOTItMS41OThhMi41MDEgMi41MDEgMCAwIDAgMyAxLjAwM1ptLjA1LTIuNjkzYTEgMSAwIDEgMS0xLjg3LjcwOCAxIDEgMCAwIDEgMS44Ny0uNzA4Wm0tMTEgMi43NWExIDEgMCAxIDEtMS44Ny43MDggMSAxIDAgMCAxIDEuODctLjcwOFptMS41NiA1LjQyYTIuNSAyLjUgMCAxIDAtLjM0NSAxLjQ2MWw2LjM1MiAxLjU4OGEyLjUgMi41IDAgMSAwIC4zODQtMS40NWwtNi4zOTItMS41OThabS0xLjU2LjUzOGExIDEgMCAxIDAtMS44Ny0uNzA4IDEgMSAwIDAgMCAxLjg3LjcwOFptMTAuNDIgMS40NjFhMSAxIDAgMSAxLS43MDkgMS44NyAxIDEgMCAwIDEgLjcwOC0xLjg3WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-line-color-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjc4OC41ODNhMi42MyAyLjYzIDAgMCAwLTEuODYuNzdMOS41NDQgMi43MzhhLjc1Ny43NTcgMCAwIDAtLjE0LjE0TDIuMDMyIDEwLjI1di4wMDFjLS4yNDIuMjQxLS40Mi41MzgtLjUyLjg2NGwtLjAwMi4wMDItLjg4IDIuOTAyLS4wMDEuMDAzYTEuMDgzIDEuMDgzIDAgMCAwIDEuMzUgMS4zNDdoLjAwMWwyLjkwMi0uODhoLjAwMWMuMzI2LS4xLjYyMy0uMjc3Ljg2NS0uNTE4di0uMDAxbDcuMzc1LTcuMzc2YS43NjMuNzYzIDAgMCAwIC4xMzktLjEzOWwxLjM4NC0xLjM4NEEyLjYzIDIuNjMgMCAwIDAgMTIuNzg4LjU4M1ptLS4xMjYgNC4zNTIuOTI0LS45MjRhMS4xMyAxLjEzIDAgMCAwLTEuNTk3LTEuNTk3bC0uOTI0LjkyNCAxLjU5NyAxLjU5N1ptLTIuNjU3LS41MzYtNi45MTMgNi45MTRIMy4wOWEuNTgzLjU4MyAwIDAgMC0uMTQ2LjI0MmwtLjY1MyAyLjE1MyAyLjE1NS0uNjU0YS41ODMuNTgzIDAgMCAwIC4yNDEtLjE0NGw2LjkxNC02LjkxNC0xLjU5Ny0xLjU5N1oiIGZpbGw9IiMwMDAiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDE2djE2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+)}.ag-charts-icon-delete-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjA4MyAyLjY2N2MwLS4wOS4wNTMtLjI0Mi4xOTctLjM4Ny4xNDUtLjE0NC4yOTctLjE5Ny4zODctLjE5N2gyLjY2N2MuMDg5IDAgLjI0MS4wNTMuMzg2LjE5Ny4xNDUuMTQ1LjE5Ny4yOTcuMTk3LjM4N3YuNTgzSDYuMDg0di0uNTgzWk01LjMzIDQuNzVIMTEuOTE3djguNTgzYzAgLjA5LS4wNTIuMjQyLS4xOTcuMzg3LS4xNDUuMTQ0LS4yOTcuMTk3LS4zODYuMTk3SDQuNjY3Yy0uMDkgMC0uMjQyLS4wNTMtLjM4Ny0uMTk3LS4xNDQtLjE0NS0uMTk3LS4yOTctLjE5Ny0uMzg3VjQuNzVINS4zM1ptLS43NDUtMS41di0uNTgzYzAtLjU3OC4yOC0xLjA5Mi42MzYtMS40NDcuMzU1LS4zNTYuODctLjYzNyAxLjQ0Ny0uNjM3aDIuNjY3Yy41NzcgMCAxLjA5MS4yODEgMS40NDcuNjM3LjM1NS4zNTUuNjM2Ljg3LjYzNiAxLjQ0N3YuNTgzSDE0YS43NS43NSAwIDAgMSAwIDEuNWgtLjU4M3Y4LjU4M2MwIC41NzgtLjI4MSAxLjA5Mi0uNjM2IDEuNDQ3LS4zNTYuMzU2LS44Ny42MzctMS40NDcuNjM3SDQuNjY3Yy0uNTc3IDAtMS4wOTItLjI4MS0xLjQ0Ny0uNjM3LS4zNTUtLjM1NS0uNjM3LS44Ny0uNjM3LTEuNDQ3VjQuNzVIMmEuNzUuNzUgMCAwIDEgMC0xLjVoMi41ODNabTIuMDgzIDMuMzMzYS43NS43NSAwIDAgMSAuNzUuNzV2NGEuNzUuNzUgMCAxIDEtMS41IDB2LTRhLjc1Ljc1IDAgMCAxIC43NS0uNzVabTMuNDE3Ljc1YS43NS43NSAwIDAgMC0xLjUgMHY0YS43NS43NSAwIDEgMCAxLjUgMHYtNFoiIGZpbGw9IiMwMDAiLz48L3N2Zz4=)}.ag-charts-icon-lock-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjE3MyAyLjg0YTIuNTgzIDIuNTgzIDAgMCAxIDQuNDEgMS44Mjd2MS45MTZINS40MTZWNC42NjdjMC0uNjg1LjI3My0xLjM0My43NTctMS44MjdaTTMuOTE3IDYuNTgzVjQuNjY3YTQuMDgzIDQuMDgzIDAgMCAxIDguMTY2IDB2MS45MTZoLjU4NGMxLjE1IDAgMi4wODMuOTMzIDIuMDgzIDIuMDg0djQuNjY2YzAgMS4xNS0uOTMzIDIuMDg0LTIuMDgzIDIuMDg0SDMuMzMzYTIuMDgzIDIuMDgzIDAgMCAxLTIuMDgzLTIuMDg0VjguNjY3YzAtMS4xNTEuOTMzLTIuMDg0IDIuMDgzLTIuMDg0aC41ODNabTcuNDE2IDEuNWgtOGEuNTgzLjU4MyAwIDAgMC0uNTgzLjU4NHY0LjY2NmMwIC4zMjIuMjYxLjU4NC41ODMuNTg0aDkuMzM0YS41ODMuNTgzIDAgMCAwIC41ODMtLjU4NFY4LjY2N2EuNTgzLjU4MyAwIDAgMC0uNTgzLS41ODRoLTEuMzM0WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-unlock-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02LjkyMyAyLjg0YTIuNTgzIDIuNTgzIDAgMCAxIDMuNjUzIDAgMyAzIDAgMCAxIC41Ny43OThjLjEzNC4yNzguMTcuNDc0LjE3LjU0NWEuNzUuNzUgMCAwIDAgMS41IDBjMC0uMzgxLS4xMzItLjgwOS0uMzItMS4xOThhNC41MDEgNC41MDEgMCAwIDAtLjg1OS0xLjIwNiA0LjA4MyA0LjA4MyAwIDAgMC02Ljk3IDIuODg4djEuOTE2aC0uNTg0QzIuOTMzIDYuNTgzIDIgNy41MTYgMiA4LjY2N3Y0LjY2NmMwIDEuMTUuOTMzIDIuMDg0IDIuMDgzIDIuMDg0aDkuMzM0YzEuMTUgMCAyLjA4My0uOTMzIDIuMDgzLTIuMDg0VjguNjY3YzAtMS4xNTEtLjkzMy0yLjA4NC0yLjA4My0yLjA4NGgtNy4yNVY0LjY2N2MwLS42ODUuMjcyLTEuMzQzLjc1Ni0xLjgyN1pNNS40MTcgOC4wODNINC4wODJhLjU4My41ODMgMCAwIDAtLjU4My41ODR2NC42NjZjMCAuMzIyLjI2MS41ODQuNTgzLjU4NGg5LjMzNGEuNTgzLjU4MyAwIDAgMCAuNTgzLS41ODRWOC42NjdhLjU4My41ODMgMCAwIDAtLjU4My0uNTg0aC04WiIgZmlsbD0iIzAwMCIvPjwvc3ZnPg==)}.ag-charts-icon-plus-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXBsdXMiPjxwYXRoIGQ9Ik01IDEyaDE0Ii8+PHBhdGggZD0iTTEyIDV2MTQiLz48L3N2Zz4=)}.ag-charts-icon-crossline-add-line-legacy{--icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOC43NSA0LjVhLjc1Ljc1IDAgMCAwLTEuNSAwdjIuNzVINC41YS43NS43NSAwIDAgMCAwIDEuNWgyLjc1djIuNzVhLjc1Ljc1IDAgMCAwIDEuNSAwVjguNzVoMi43NWEuNzUuNzUgMCAwIDAgMC0xLjVIOC43NXoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==)}.ag-charts-focus.ag-charts-focus__indicator{position:absolute;display:block;pointer-events:none;user-select:none;width:100%;height:100%}.ag-charts-focus.ag-charts-focus__indicator>div{position:absolute;outline:var(--ag-charts-focus-border);outline-width:2px;box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-focus.ag-charts-focus__indicator>svg{width:100%;height:100%;fill:none;stroke:var(--ag-charts-focus-border-color);stroke-width:2px}.ag-charts-focus--hidden{visibility:hidden}.ag-charts-toolbar{align-items:center;background:none;border:none;display:flex;flex-wrap:nowrap;opacity:1;position:absolute;transform:translateY(0);transition:opacity .2s ease-in-out,transform .2s ease-in-out}.ag-charts-toolbar--hidden,.ag-charts-toolbar--prevent-flash{visibility:hidden}.ag-charts-toolbar--floating-hidden{opacity:0;transition:opacity .4s ease-in-out}.ag-charts-toolbar--small{--ag-charts-toolbar-size: var(--ag-charts-toolbar-size-small);--ag-charts-toolbar-font-size: var(--ag-charts-toolbar-font-size-small);--ag-charts-toolbar-button-padding: var(--ag-charts-toolbar-button-padding-small)}.ag-charts-toolbar--top,.ag-charts-toolbar--bottom{flex-direction:row;width:100%}.ag-charts-toolbar--left,.ag-charts-toolbar--right{flex-direction:column}.ag-charts-toolbar--floating,.ag-charts-toolbar--floating-top,.ag-charts-toolbar--floating-bottom{background:none;border:none;flex-direction:row;pointer-events:none;width:100%}.ag-charts-toolbar--floating{padding:0;width:auto;z-index:var(--ag-charts-layer-toolbar)}.ag-charts-toolbar--floating-top{height:calc(var(--ag-charts-toolbar-size) + 10px);padding-top:10px}.ag-charts-toolbar--floating-bottom{height:calc(var(--ag-charts-toolbar-size) + 10px);padding-bottom:10px;overflow:hidden}.ag-charts-toolbar__align{display:flex;flex-direction:inherit;flex-wrap:inherit;gap:var(--ag-charts-toolbar-gap);max-width:100%;width:100%}.ag-charts-toolbar__align--start{justify-content:start}.ag-charts-toolbar__align--center{justify-content:center}.ag-charts-toolbar__align--end{justify-content:end}.ag-charts-toolbar__align--center,.ag-charts-toolbar__align--end{margin-left:auto}.ag-charts-toolbar--left .ag-charts-toolbar__align--center,.ag-charts-toolbar--left .ag-charts-toolbar__align--end,.ag-charts-toolbar--right .ag-charts-toolbar__align--center,.ag-charts-toolbar--right .ag-charts-toolbar__align--end{margin-left:0;margin-top:auto}.ag-charts-toolbar--floating-top .ag-charts-toolbar__align,.ag-charts-toolbar--floating-bottom .ag-charts-toolbar__align{transition:transform .4s ease-in-out;width:auto}.ag-charts-toolbar__section{display:inherit;flex-direction:inherit;flex-wrap:inherit;justify-content:inherit;max-width:inherit;width:inherit}.ag-charts-toolbar__button{--transition: background-color .25s ease-in-out, border-color .25s ease-in-out, color .25s ease-in-out;align-items:center;background:var(--ag-charts-toolbar-background-color);border:var(--ag-charts-toolbar-border);color:var(--ag-charts-toolbar-foreground-color);display:flex;font:var(--ag-charts-toolbar-font-size) var(--ag-charts-font-family);justify-content:center;margin:0 0 0 -1px;min-height:var(--ag-charts-toolbar-size);min-width:var(--ag-charts-toolbar-size);padding:var(--ag-charts-toolbar-button-padding);pointer-events:all;position:relative;transition:var(--transition);white-space:nowrap}.ag-charts-toolbar__button[data-toolbar-group=ranges]{padding:var(--ag-charts-toolbar-button-padding) calc(var(--ag-charts-toolbar-button-padding) * 1.5)}.ag-charts-toolbar--top,.ag-charts-toolbar--bottom,.ag-charts-toolbar--floating,.ag-charts-toolbar--floating-top,.ag-charts-toolbar--floating-bottom{.ag-charts-toolbar__button:nth-child(1 of:not(.ag-charts-toolbar__button--hidden-toggled)){border-bottom-left-radius:var(--ag-charts-button-radius);border-top-left-radius:var(--ag-charts-button-radius);margin:0}.ag-charts-toolbar__button:nth-last-child(1 of:not(.ag-charts-toolbar__button--hidden-toggled)){border-bottom-right-radius:var(--ag-charts-button-radius);border-top-right-radius:var(--ag-charts-button-radius)}}.ag-charts-toolbar--left,.ag-charts-toolbar--right{.ag-charts-toolbar__button{border-radius:0;margin:-1px 0 0;max-width:100%}.ag-charts-toolbar__button:nth-child(1 of:not(.ag-charts-toolbar__button--hidden-toggled)){border-top-left-radius:var(--ag-charts-button-radius);border-top-right-radius:var(--ag-charts-button-radius);margin:0}.ag-charts-toolbar__button:nth-last-child(1 of:not(.ag-charts-toolbar__button--hidden-toggled)){border-bottom-left-radius:var(--ag-charts-button-radius);border-bottom-right-radius:var(--ag-charts-button-radius)}}.ag-charts-toolbar__button--hidden-value,.ag-charts-toolbar__button--hidden-toggled{display:none}.ag-charts-toolbar__button:hover{background:var(--ag-charts-toolbar-hover-color);z-index:1}.ag-charts-toolbar__button:focus-visible{border-color:var(--ag-charts-toolbar-focus-color);box-shadow:var(--ag-charts-focus-border-shadow);z-index:3}.ag-charts-toolbar__button.ag-charts-toolbar__button--active{background:var(--ag-charts-toolbar-active-background-color);border-color:var(--ag-charts-toolbar-active-color);color:var(--ag-charts-toolbar-active-color);z-index:2}.ag-charts-toolbar__button[aria-disabled=true]{background:var(--ag-charts-toolbar-disabled-background-color);color:var(--ag-charts-toolbar-disabled-foreground-color)}.ag-charts-toolbar__button:not([aria-disabled=true]){cursor:pointer}.ag-charts-toolbar__button--fill-visible:after{content:"";display:block;position:absolute;bottom:3px;left:5px;right:5px;height:4px;border-radius:99px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ag-charts-foreground-color) 10%,transparent);background:var(--fill)}.ag-charts-toolbar__button--fill-visible[aria-disabled=true]:after{filter:grayscale(1);opacity:.5}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{margin-left:var(--ag-charts-toolbar-gap)}.ag-charts-toolbar__icon,.ag-charts-toolbar__label{pointer-events:none}.ag-chart-overlay{color:#181d1f;pointer-events:none}.ag-chart-overlay.ag-chart-dark-overlay{color:#fff}.ag-chart-overlay--loading{color:#8c8c8c}.ag-chart-overlay__loading-background{background:#fff;pointer-events:none}.ag-chart-overlay.ag-chart-dark-overlay .ag-chart-overlay__loading-background{background:#192232}.ag-chart-tooltip{transition:transform .1s ease;width:max-content;z-index:99999;font:12px Verdana,sans-serif;color:#464646;box-shadow:0 4px 8px #00000014}.ag-chart-tooltip-wrap-always{overflow-wrap:break-word;word-break:break-word;hyphens:none}.ag-chart-tooltip-wrap-hyphenate{overflow-wrap:break-word;word-break:break-word;hyphens:auto}.ag-chart-tooltip-wrap-on-space{overflow-wrap:normal;word-break:normal}.ag-chart-tooltip-wrap-never{white-space:pre;text-overflow:ellipsis}.ag-chart-tooltip-no-interaction{pointer-events:none;user-select:none}.ag-chart-tooltip-no-animation{transition:none!important}.ag-chart-tooltip-hidden{visibility:hidden}.ag-chart-tooltip-title{overflow:hidden;position:relative;padding:8px 14px;border-top-left-radius:2px;border-top-right-radius:2px;color:#fff;background-color:#888;z-index:1;text-overflow:inherit}.ag-chart-tooltip-title:only-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.ag-chart-tooltip-content{overflow:hidden;padding:6px 14px;line-height:1.7em;background:#fff;border-bottom-left-radius:2px;border-bottom-right-radius:2px;border:1px solid rgba(0,0,0,.15);text-overflow:inherit}.ag-chart-tooltip-arrow:before{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid #d9d9d9;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;width:0;height:0;margin:0 auto}.ag-chart-tooltip-arrow:after{content:"";position:absolute;top:calc(100% - 1px);left:50%;transform:translate(-50%);border:5px solid white;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;width:0;height:0;margin:0 auto}
`,v3i=class{constructor(t,e,n){this.element=t,this.topTabGuard=e,this.bottomTabGuard=n,this.destroyFns=[],this.guardTabIndex=0,this.element.tabIndex=-1,this.initEventListener(this.element,"blur",()=>this.onBlur()),this.initEventListener(this.element,"focus",()=>this.onFocus()),this.initEventListener(this.topTabGuard,"focus",i=>this.onTabStart(i,this.topTabGuard)),this.initEventListener(this.bottomTabGuard,"focus",i=>this.onTabStart(i,this.bottomTabGuard))}set tabIndex(t){t>=0&&(this.guardTabIndex=t),t>0?(this.topTabGuard.tabIndex=t,this.bottomTabGuard.style.display="none"):(this.topTabGuard.tabIndex=t,this.bottomTabGuard.tabIndex=t)}destroy(){for(let t of this.destroyFns)t();this.destroyFns.length=0}initEventListener(t,e,n){t.addEventListener(e,n),this.destroyFns.push(()=>t.removeEventListener(e,n))}onBlur(){this.element.tabIndex===-1&&(this.tabIndex=this.guardTabIndex,this.guardTarget=void 0,this.guessedDelta=void 0)}onFocus(){this.element.tabIndex===-1&&(this.tabIndex=-1)}onTabStart(t,e){if(e.tabIndex>0&&(this.guessedDelta=0,t.relatedTarget!=null&&"tabIndex"in t.relatedTarget)){let n=Number(t.relatedTarget.tabIndex);!isNaN(n)&&n>0&&(this.guessedDelta=n<e.tabIndex?1:-1)}this.guardTarget=e,this.element.focus()}getBrowserFocusDelta(){let{guessedDelta:t,guardTarget:e,topTabGuard:n,bottomTabGuard:i}=this;return t!==void 0?t:e===n?1:e===i?-1:0}},y3i=class{constructor(){this.elements=new Map,this.documentReady=!1,this.queuedObserveRequests=[],this.onLoad=()=>{this.documentReady=!0,this.queuedObserveRequests.forEach(([t,e])=>this.observe(t,e)),this.queuedObserveRequests=[]},!(typeof ResizeObserver>"u")&&(this.resizeObserver=new ResizeObserver(t=>{for(let{target:e,contentRect:{width:n,height:i}}of t){let r=this.elements.get(e);this.checkSize(r,e,n,i)}}),this.documentReady=l_("readyState")==="complete",this.documentReady||d_()?.addEventListener("load",this.onLoad))}destroy(){d_()?.removeEventListener("load",this.onLoad),this.resizeObserver?.disconnect(),this.resizeObserver=null}checkSize(t,e,n,i){t&&(n!==t.size?.width||i!==t.size?.height)&&(t.size={width:n,height:i},t.cb(t.size,e))}observe(t,e){if(!this.documentReady){this.queuedObserveRequests.push([t,e]);return}this.elements.has(t)?this.removeFromQueue(t):this.resizeObserver?.observe(t);let n={cb:e};this.elements.set(t,n),this.checkSize(n,t,t.offsetWidth,t.offsetHeight)}unobserve(t){this.resizeObserver?.unobserve(t),this.elements.delete(t),this.removeFromQueue(t),this.elements.size||this.destroy()}removeFromQueue(t){this.queuedObserveRequests=this.queuedObserveRequests.filter(([e])=>e!==t)}},_3i='<div role="presentation" class="ag-charts-wrapper ag-charts-styles" data-ag-charts><div role="presentation" class="ag-charts-canvas-center"><div role="figure" class="ag-charts-canvas-container"><div role="presentation" class="ag-charts-tab-guard"></div><div role="presentation" class="ag-charts-canvas"></div><div role="presentation" class="ag-charts-canvas-proxy"></div><div role="presentation" class="ag-charts-tab-guard"></div><div role="presentation" class="ag-charts-canvas-overlay"></div></div></div></div>',f8e="canvas-center",C3i=["styles",f8e,"canvas","canvas-proxy","canvas-overlay"],N5e=new Map([["styles",{childElementType:"style"}],["canvas",{childElementType:"canvas",eventTypes:["focus","blur"]}],["canvas-proxy",{childElementType:"div"}],["canvas-overlay",{childElementType:"div"}],[f8e,{childElementType:"div"}]]);tnt={x:0,y:0,width:0,height:0,top:0,bottom:0,left:0,right:0,toJSON(){return tnt}},int=class extends b2{constructor(t){super(),this.styles={},this.container=void 0,this.containerSize=void 0,this.sizeMonitor=new y3i;let e=Rm("div");e.innerHTML=_3i,this.element=e.children.item(0),this.rootElements=C3i.reduce((i,r)=>{let s=`ag-charts-${r}`,o=this.element.classList.contains(s)?this.element:this.element.querySelector(`.${s}`);if(!o)throw new Error(`AG Charts - unable to find DOM element ${s}`);return i[r]={element:o,children:new Map,listeners:[]},i},{});let n=!1;this.observer=x3i(this.element,i=>{i===0&&!n&&this.listeners.dispatch("hidden",{type:"hidden"}),n=i===0}),this.setSizeOptions(),this.addStyles("ag-charts-community",g3i),t&&this.setContainer(t)}destroy(){super.destroy(),this.observer?.unobserve(this.element),this.container&&this.sizeMonitor.unobserve(this.container),Object.values(this.rootElements).forEach(t=>{t.children.forEach(e=>e.remove()),t.element.remove()}),this.guardedElement?.destroy(),this.element.remove()}setSizeOptions(t=300,e=300,n,i){let{style:r}=this.element;r.width=`${n??t}px`,r.height=`${i??e}px`}updateContainerSize(){let{style:t}=this.rootElements[f8e].element;t.width=`${this.containerSize?.width??0}px`,t.height=`${this.containerSize?.height??0}px`}setContainer(t){if(t===this.container)return;if(this.container&&(this.container.removeChild(this.element),this.sizeMonitor.unobserve(this.container)),!(this.getDocumentRoot(t)!=null))for(let n of this.rootElements.styles.children.keys())this.removeChild("styles",n);t.appendChild(this.element),this.sizeMonitor.observe(t,n=>{this.containerSize=n,this.updateContainerSize(),this.listeners.dispatch("resize",{type:"resize"})}),this.container=t;for(let[n,i]of Object.entries(this.styles))this.addStyles(n,i);this.listeners.dispatch("container-changed",{type:"container-changed"})}setThemeClass(t){let e="ag-charts-theme-";this.element.classList.forEach(n=>{n.startsWith(e)&&n!==t&&this.element.classList.remove(n)}),this.element.classList.add(t)}createTabGuards(){let t=this.rootElements.canvas.element.querySelector("canvas"),e=this.element.querySelectorAll(".ag-charts-tab-guard");if(t==null||e[0]==null||e[1]==null)throw new Error("AG Charts - error initialising canvas tab guards");return new v3i(t,e[0],e[1])}setTabIndex(t){this.guardedElement??(this.guardedElement=this.createTabGuards()),this.guardedElement.tabIndex=t}getBrowserFocusDelta(){return this.guardedElement?.getBrowserFocusDelta()??0}addEventListenerOnElement(t,e,n,i){let{element:r}=this.rootElements[t];return r.addEventListener(e,n,i),()=>{r.removeEventListener(e,n,i)}}addEventListener(t,e,n){this.element.addEventListener(t,e,n),N5e.forEach((i,r)=>{if(!i.eventTypes?.includes(t))return;let s=this.rootElements[r];s.listeners.push([t,e,n]),s.children.forEach(o=>{o.addEventListener(t,e)})})}removeEventListener(t,e,n){this.element.removeEventListener(t,e,n),N5e.forEach((i,r)=>{if(!i.eventTypes?.includes(t))return;let s=this.rootElements[r];s.listeners=s.listeners.filter(([o,a])=>o!==t&&a!==e),s.children.forEach(o=>{o.removeEventListener(t,e,n)})})}getBoundingClientRect(){return this.rootElements.canvas.element.getBoundingClientRect()}getOverlayClientRect(){let t=d_(),e=new Os(0,0,t.innerWidth,t.innerHeight),n=this.getRawOverlayClientRect(),i=Os.fromDOMRect(n??this.getBoundingClientRect());return e.intersection(i)?.toDOMRect()??tnt}getRawOverlayClientRect(){let t=this.element;for(;t!=null;){let n=t.computedStyleMap?.(),i=n?.get("overflow-x")?.toString(),r=n?.get("overflow-y")?.toString();if(i!=null&&i!=="visible"||r&&r!=="visible")return t.getBoundingClientRect();t=t.parentElement}let e=this.getDocumentRoot();if(e)return e.getBoundingClientRect()}getDocumentRoot(t=this.container){let e=t?.ownerDocument?.body??l_("body");for(;t!=null;){if(t===e)return;if(t.parentNode instanceof DocumentFragment)return t;t=t.parentNode}}getChildBoundingClientRect(t){let{children:e}=this.rootElements[t],n=[];for(let i of e.values())n.push(Os.fromDOMRect(i.getBoundingClientRect()));return Os.merge(n)}calculateCanvasPosition(t){let e=0,n=0,{x:i=0,y:r=0}=this.getChildBoundingClientRect("canvas")??{},s=t.getBoundingClientRect();return e=s.x-i,n=s.y-r,{x:e,y:n}}isManagedChildDOMElement(t,e,n){let{children:i}=this.rootElements[e],r=i?.get(n);return r!=null&&t.contains(r)}isEventOverElement(t){let e=t.target;return e!=null&&this.element.contains(e)}addStyles(t,e){if(this.styles[t]=e,this.container==null)return;let n="data-ag-charts",i=this.getDocumentRoot(),r;if(i!=null)r=this.addChild("styles",t);else{let s=l_("head");for(let o of s.children)if(o.getAttribute(n)===t)return;r=Rm("style"),s.appendChild(r)}r.getAttribute(n)!==t&&(r.setAttribute(n,t),r.innerHTML=e)}removeStyles(t){this.removeChild("styles",t)}updateCursor(t){this.element.style.cursor=t}getCursor(){return this.element.style.cursor}addChild(t,e,n){let{element:i,children:r,listeners:s}=this.rootElements[t];if(!r)throw new Error("AG Charts - unable to create DOM elements after destroy()");let o=r.get(e);if(o!=null)return o;let{childElementType:a="div"}=N5e.get(t)??{};if(n&&n.tagName.toLowerCase()!==a.toLowerCase())throw new Error("AG Charts - mismatching DOM element type");let l=n??Rm(a);for(let[c,d,u]of s)l.addEventListener(c,d,u);return r.set(e,l),i?.appendChild(l),l}removeChild(t,e){let{children:n}=this.rootElements[t];n&&(n.get(e)?.remove(),n.delete(e))}incrementDataCounter(t){let{dataset:e}=this.element;e[t]??(e[t]="0"),e[t]=String(Number(e[t])+1)}getIconClassNames(t){return`ag-charts-icon ag-charts-icon-${t}`}};wG=class{constructor(){this.path2d=new Path2D,this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.openedPath=!1,this.closedPath=!1}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length||this.previousCommands.toString()!==this.commands.toString()||this.previousParams.toString()!==this.params.toString()}getPath2D(){return this.path2d}moveTo(t,e){this.openedPath=!0,this.path2d.moveTo(t,e),this.commands.push(0),this.params.push(t,e)}lineTo(t,e){this.openedPath?(this.path2d.lineTo(t,e),this.commands.push(1),this.params.push(t,e)):this.moveTo(t,e)}rect(t,e,n,i){this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.closePath()}roundRect(t,e,n,i,r){r=Math.min(r,n/2,i/2),this.moveTo(t,e+r),this.arc(t+r,e+r,r,Math.PI,1.5*Math.PI),this.lineTo(t+r,e),this.lineTo(t+n-r,e),this.arc(t+n-r,e+r,r,1.5*Math.PI,2*Math.PI),this.lineTo(t+n,e+r),this.lineTo(t+n,e+i-r),this.arc(t+n-r,e+i-r,r,0,Math.PI/2),this.lineTo(t+n-r,e+i),this.lineTo(t+r,e+i),this.arc(t+ +r,e+i-r,r,Math.PI/2,Math.PI),this.lineTo(t,e+i-r),this.closePath()}arc(t,e,n,i,r,s){this.openedPath=!0,this.path2d.arc(t,e,n,i,r,s),this.commands.push(2),this.params.push(t,e,n,i,r,s?1:0)}cubicCurveTo(t,e,n,i,r,s){this.openedPath||this.moveTo(t,e),this.path2d.bezierCurveTo(t,e,n,i,r,s),this.commands.push(3),this.params.push(t,e,n,i,r,s)}closePath(){this.openedPath&&(this.path2d.closePath(),this.commands.push(4),this.openedPath=!1,this.closedPath=!0)}clear(t){t&&(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this.closedPath),this.path2d=new Path2D,this.openedPath=!1,this.closedPath=!1,this.commands=[],this.params=[]}isPointInPath(t,e){let n=this.commands,i=this.params,r=n.length,s=-1e4,o=-1e4,a=NaN,l=NaN,c=0,d=0,u=0;for(let m=0,f=0;m<r;m++)switch(n[m]){case 0:u+=sR(a,l,c,d,s,o,t,e),c=i[f++],a=c,d=i[f++],l=d;break;case 1:u+=sR(c,d,i[f++],i[f++],s,o,t,e),c=i[f-2],d=i[f-1];break;case 3:u+=T3i(c,d,i[f++],i[f++],i[f++],i[f++],i[f++],i[f++],s,o,t,e),c=i[f-2],d=i[f-1];break;case 2:let _=i[f++],x=i[f++],D=i[f++],E=i[f++],M=i[f++],I=!!i[f++];if(u+=nnt(_,x,D,E,M,I,s,o,t,e),!isNaN(a)){let z=_+Math.cos(E)*D,G=x+Math.sin(E)*D;u+=sR(c,d,z,G,s,o,t,e)}c=_+Math.cos(M)*D,d=x+Math.sin(M)*D;break;case 4:u+=sR(a,l,c,d,s,o,t,e);break}return u%2===1}distanceSquared(t,e){let n=1/0,i=this.commands,r=this.params,s=i.length,o=NaN,a=NaN,l=0,c=0;for(let d=0,u=0;d<s;d++)switch(i[d]){case 0:l=o=r[u++],c=a=r[u++];break;case 1:{let m=r[u++],f=r[u++];n=Kee(t,e,l,c,m,f,n);break}case 3:yr.error("Command.Curve distanceSquare not implemented");break;case 2:{let m=r[u++],f=r[u++],_=r[u++],x=r[u++],D=r[u++],E=m+Math.cos(x)*_,M=f+Math.sin(x)*_,I=!!r[u++];n=Kee(t,e,l,c,E,M,n),n=Dgi(t,e,m,f,_,x,D,I,n),l=m+Math.cos(D)*_,c=f+Math.sin(D)*_;break}case 4:n=Kee(t,e,l,c,o,a,n);break}return n}getPoints(){let{commands:t,params:e}=this,n=[],i=0;for(let r=0;r<t.length;r++)switch(t[r]){case 0:case 1:n.push({x:e[i++],y:e[i++]});break;case 3:i+=4,n.push({x:e[i++],y:e[i++]});break;case 2:n.push({x:e[i++],y:e[i++]}),i+=4;break;case 4:break}return n}computeSVGDataPath(t,e){let n=[],{commands:i,params:r}=this,s=0;for(let o=0;o<i.length;o++)switch(i[o]){case 0:n.push("M",t+r[s++],e+r[s++]);break;case 1:n.push("L",t+r[s++],e+r[s++]);break;case 3:n.push("C",t+r[s++],e+r[s++],t+r[s++],e+r[s++],t+r[s++],e+r[s++]);break;case 2:let[a,l,c,d,u,m]=[r[s++],r[s++],r[s++],r[s++],r[s++],r[s++]],f=t+a+Math.cos(d)*c,_=e+l+Math.sin(d)*c,x=t+a+Math.cos(u)*c,D=e+l+Math.sin(u)*c,E=Cit(d,u,!!m)>Math.PI?1:0,M=(m+1)%2,I=n.length===0?"M":"L";n.push(I,f,_,"A",c,c,0,E,M,x,D);break;case 4:n.push("Z");break}return n.join(" ")}};Og=(()=>{let t=class extends M6{constructor(){super(...arguments),this.path=new wG,this._clipX=NaN,this._clipY=NaN,this._dirtyPath=!0}set clipX(e){this._clipX=e,this.dirtyPath=!0}set clipY(e){this._clipY=e,this.dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,3))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){this._dirtyPath||(this.dirtyPath=this.path.isDirty()||(this.fillShadow?.isDirty()??!1)||(this._clipPath?.isDirty()??!1))}isPointInPath(e,n){let i=this.transformPoint(e,n);return this.path.closedPath&&this.path.isPointInPath(i.x,i.y)}distanceSquared(e,n){let i=this.transformPoint(e,n);return this.distanceSquaredTransformedPoint(i.x,i.y)}computeSVGDataPath(){let{x:e,y:n}=this.inverseTransformPoint(0,0);return this.dirtyPath&&(this.updatePath(),this.dirtyPath=!1),this.path.computeSVGDataPath(e,n)}distanceSquaredTransformedPoint(e,n){return this.path.closedPath&&this.path.isPointInPath(e,n)?0:this.path.distanceSquared(e,n)}isDirtyPath(){return!1}updatePath(){}render(e){let{ctx:n,forceRender:i,stats:r}=e;if(this.dirty===0&&!i){r&&(r.nodesSkipped+=this.nodeCount.count);return}if(this.transformRenderContext(e),(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),!isNaN(this._clipX)&&!isNaN(this._clipY)&&this.clipMode!=null){n.save();let s=this.strokeWidth/2;if(this._clipPath??(this._clipPath=new wG),this._clipPath.clear(),this._clipPath.rect(-s,-s,this._clipX+s,this._clipY+s+s),this.clipMode==="normal"&&n.clip(this._clipPath?.getPath2D()),this._clipX>0&&this._clipY>0&&this.drawPath(n),this.clipMode==="punch-out"){n.clip(this._clipPath?.getPath2D());let{x:o=-1e4,y:a=-1e4,width:l=2e4,height:c=2e4}=this.getBBox()??{};n.clearRect(o,a,l,c)}n.restore()}else this.drawPath(n);this.fillShadow?.markClean(),super.render(e)}drawPath(e){this.fillStroke(e,this.path.getPath2D())}};return t.className="Path",t})();Me([va()],Og.prototype,"clipMode",2);Me([va()],Og.prototype,"clipX",1);Me([va()],Og.prototype,"clipY",1);rnt={};nC(rnt,{block:()=>yCe,elements:()=>D3i,modifiers:()=>_Ce});yCe="ag-charts-focus",D3i={indicator:"ag-charts-focus__indicator",svg:"ag-charts-focus__svg"},_Ce={hidden:"ag-charts-focus--hidden"},E3i=class{constructor(t){this.domManager=t;let{block:e,elements:n,modifiers:i}=rnt;this.div=l_().createElement("div"),this.svg=l_().createElementNS("http://www.w3.org/2000/svg","svg"),this.path=l_().createElementNS("http://www.w3.org/2000/svg","path"),this.svg.append(this.path),this.element=t.addChild("canvas-overlay",e),this.element.classList.add(e,n.indicator,i.hidden),this.element.ariaHidden="true",this.element.append(this.svg)}destroy(){this.domManager.removeStyles(yCe),this.domManager.removeChild("canvas-overlay",yCe)}updateBounds(t){t===void 0?this.element.classList.add(_Ce.hidden):t instanceof Og?(this.path.setAttribute("d",t.computeSVGDataPath()),this.show(this.svg)):(fw(this.div,t),this.show(this.div))}show(t){this.element.classList.remove(_Ce.hidden),this.element.innerHTML="",this.element.append(t)}},M3i=class{set textContent(t){this.textElement.textContent=t;let n=this.textElement.getBBox?.();n&&this.svgElement.setAttribute("viewBox",`${n.x} ${n.y} ${n.width} ${n.height}`)}get textContent(){return this.textElement.textContent}constructor(){this.textElement=hCe("http://www.w3.org/2000/svg","text"),this.textElement.role="presentation",this.svgElement=hCe("http://www.w3.org/2000/svg","svg"),this.svgElement.appendChild(this.textElement),this.svgElement.style.width="100%",this.svgElement.style.opacity="0",this.svgElement.role="presentation",this.boundedContainer=Rm("div"),this.boundedContainer.appendChild(this.svgElement),this.boundedContainer.role="presentation"}remove(){this.boundedContainer.remove()}getContainer(){return this.boundedContainer}updateBounds(t){fw(this.boundedContainer,t)}};I3i=class{constructor(t,e,n,i){this.localeManager=e,this.domManager=n,this.focusIndicator=i,this.debugShowDOMProxies=bu.check("showDOMProxies"),this.destroyFns=[],this.destroyFns.push(t.addListener("update-complete",()=>this.update()))}destroy(){this.destroyFns.forEach(t=>t())}update(){this.focusable&&this.focusIndicator.updateBounds(this.focusable.computeTransformedBBox())}addLocalisation(t){t(),this.destroyFns.push(this.localeManager.addListener("locale-changed",t))}createProxyContainer(t){let e=fet(t),{params:n,result:i}=e;return this.domManager.addChild("canvas-overlay",n.id,i),i.classList.add(...n.classList),i.style.pointerEvents="none",i.role=n.type,i.ariaOrientation=n.ariaOrientation,typeof n.ariaHidden=="boolean"&&(i.ariaHidden=n.ariaHidden.toString()),this.addLocalisation(()=>{i.ariaLabel=this.localeManager.t(n.ariaLabel.id,n.ariaLabel.params)}),i}createProxyElement(t){let e=fet(t);if(V5e("button",e)){let{params:n,result:i}=e;if(this.initInteract(n,i),typeof n.textContent=="string")i.textContent=n.textContent;else{let{textContent:r}=n;this.addLocalisation(()=>{i.textContent=this.localeManager.t(r.id,r.params)})}}if(V5e("slider",e)){let{params:n,result:i}=e;this.initInteract(n,i),i.type="range",i.role="presentation",i.style.margin="0px",i.ariaOrientation=n.ariaOrientation,this.addLocalisation(()=>{i.ariaLabel=this.localeManager.t(n.ariaLabel.id,n.ariaLabel.params)})}if(V5e("text",e)){let{params:n,result:i}=e;this.initElement(n,i.getContainer())}return e.result}initElement(t,e){let{id:n,parent:i}=t;e.id=n,e.style.pointerEvents="none",e.style.opacity=this.debugShowDOMProxies?"0.25":"0",e.style.position="absolute",e.style.overflow="hidden",typeof i=="string"?this.domManager.addChild(i,n,e):i.appendChild(e)}initInteract(t,e){let{focusable:n,onclick:i,onchange:r,onfocus:s,onblur:o,tabIndex:a}=t;this.initElement(t,e),a!==void 0&&(e.tabIndex=a),e.addEventListener("focus",l=>{this.focusable=n,e.style.setProperty("pointerEvents",null),this.focusIndicator.updateBounds(n.computeTransformedBBox())}),e.addEventListener("blur",l=>{this.focusable=void 0,e.style.pointerEvents="none",this.focusIndicator.updateBounds(void 0)}),i&&e.addEventListener("click",i),s&&e.addEventListener("focus",s),o&&e.addEventListener("blur",o),r&&e.addEventListener("change",r)}},get=class{constructor(t){this.maxAnimationTime=t,this.debug=bu.create(!0,"animation"),this.controllers=new Map,this.stoppedCbs=new Set,this.currentPhase=0,this.phases=new Map(iR.map(e=>[e,[]])),this.skipAnimations=!1,this.animationTimeConsumed=0,this.isReady=!1}get size(){return this.controllers.size}get consumedTimeMs(){return this.animationTimeConsumed}isActive(){return this.controllers.size>0}getActiveControllers(){return this.phases.get(iR[this.currentPhase])??[]}checkOverlappingId(t){t!=null&&this.controllers.has(t)&&(this.controllers.get(t).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${t}`),this.skip())}addAnimation(t){if(t.isComplete)return;if(iR.indexOf(t.phase)<this.currentPhase){this.debug("Skipping animation due to being for an earlier phase",t.id),t.stop();return}this.controllers.set(t.id,t),this.phases.get(t.phase)?.push(t)}removeAnimation(t){this.controllers.delete(t.id);let e=this.phases.get(t.phase),n=e?.indexOf(t);n!=null&&n>=0&&e?.splice(n,1)}progress(t){if(!this.isReady)return;let e=t===0?.01:t,n=()=>{let c=iR[this.currentPhase];return{phaseControllers:[...this.getActiveControllers()],phase:c,phaseMeta:_G[c]}},{phase:i,phaseControllers:r,phaseMeta:s}=n(),o=()=>iR[this.currentPhase]==null,a=()=>{for({phase:i,phaseControllers:r,phaseMeta:s}=n();!o()&&r.length===0;)this.currentPhase++,{phase:i,phaseControllers:r,phaseMeta:s}=n(),this.debug(`AnimationBatch - phase changing to ${i}`,{unusedTime:e},r)},l=this.controllers.size;this.debug(`AnimationBatch - ${t}ms; phase ${i} with ${r?.length} of ${l}`);do{let c=e,d=s.skipIfNoEarlierAnimations&&this.animationTimeConsumed===0,u=0;for(let m of r)d?m.stop():e=Math.min(m.update(c),e),m.isComplete&&(u++,this.removeAnimation(m));this.animationTimeConsumed+=c-e,this.debug(`AnimationBatch - updated ${r.length} controllers; ${u} completed`),this.debug(`AnimationBatch - animationTimeConsumed: ${this.animationTimeConsumed}`),a()}while(e>0&&!o());this.animationTimeConsumed>this.maxAnimationTime&&(yr.warnOnce("Animation batch exceeded max animation time, skipping.",new Map(this.controllers.entries())),this.stop())}ready(){if(this.isReady)return;this.isReady=!0,this.debug(`AnimationBatch - ready; skipped: ${this.skipAnimations}`,[...this.controllers]);let t=!0;for(let[,e]of this.controllers)if(e.duration>0&&_G[e.phase].skipIfNoEarlierAnimations!==!0){t=!1;break}if(!t)for(let[,e]of this.controllers)e.autoplay&&e.play(!0)}skip(t=!0){if(this.skipAnimations===!1&&t===!0){for(let e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=t}play(){for(let t of this.controllers.values())t.play()}pause(){for(let t of this.controllers.values())t.pause()}stop(){for(let t of this.controllers.values())try{t.stop(),this.removeAnimation(t)}catch(e){yr.error("Error during animation stop",e)}this.dispatchStopped()}stopByAnimationId(t){if(t!=null&&this.controllers.has(t)){let e=this.controllers.get(t);e&&(e.stop(),this.removeAnimation(e))}}stopByAnimationGroupId(t){for(let e of this.controllers.values())e.groupId===t&&this.stopByAnimationId(e.id)}dispatchStopped(){this.stoppedCbs.forEach(t=>t()),this.stoppedCbs.clear()}isSkipped(){return this.skipAnimations}destroy(){this.stop(),this.controllers.clear()}};g8e=["click","dblclick","contextmenu","hover","drag-start","drag","drag-end","leave","enter","page-left","wheel"],A3i=["blur","focus"],P3i=["keydown","keyup"],B5e=["mousemove","mouseup"],vet=["pagehide","mousemove","mouseup"],yet=["click","dblclick","contextmenu","mousedown","mouseleave","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel","blur","focus","keydown","keyup"],WG=(t=>(t[t.Default=16]="Default",t[t.ZoomDrag=8]="ZoomDrag",t[t.Annotations=4]="Annotations",t[t.ContextMenu=2]="ContextMenu",t[t.Animation=1]="Animation",t[t.All=31]="All",t))(WG||{}),snt=(t=>(t.Retain="retain",t.Exclusive="exclusive",t))(snt||{}),R3i=new Set(Object.values(snt));ont=class CCe extends b2{constructor(e,n){super(),this.keyboardOptions=e,this.domManager=n,this.debug=bu.create(!0,"interaction"),this.eventHandler=i=>this.processEvent(i),this.overlayEventHandler=i=>this.processCanvasOverlayEvent(i),this.mouseDown=!1,this.touchDown=!1,this.pointerCaptureCanvasElement=void 0,this.clickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.dblclickHistory=[{offsetX:NaN,offsetY:NaN,type:"mousedown"},{offsetX:NaN,offsetY:NaN,type:"mouseup"},{offsetX:NaN,offsetY:NaN,type:"mousedown"}],this.stateQueue=17,this.rootElement=this.domManager.getDocumentRoot();for(let i of yet)i.startsWith("touch")||i==="wheel"?this.domManager.addEventListener(i,this.eventHandler,{passive:!1}):this.domManager.addEventListener(i,this.eventHandler);for(let i of vet)d_().addEventListener(i,this.eventHandler);this.destroyFns.push(this.domManager.addEventListenerOnElement("canvas-overlay","mouseover",this.overlayEventHandler),this.domManager.addEventListenerOnElement("canvas-overlay","mouseout",this.overlayEventHandler)),this.containerChanged(!0),this.domManager.addListener("container-changed",()=>this.containerChanged())}containerChanged(e=!1){let n=this.domManager.getDocumentRoot();if(!(!e&&n===this.rootElement)){for(let i of B5e)this.rootElement?.removeEventListener(i,this.eventHandler);this.rootElement=n,this.debug("[InteractionManager] Switching rootElement to:",this.rootElement);for(let i of B5e)this.rootElement?.addEventListener(i,this.eventHandler)}}destroy(){super.destroy();for(let e of vet)d_().removeEventListener(e,this.eventHandler);for(let e of B5e)this.rootElement?.removeEventListener(e,this.eventHandler);for(let e of yet)this.domManager.removeEventListener(e,this.eventHandler);this.domManager.removeStyles("interactionManager")}addListener(e,n,i=16){return super.addListener(e,r=>{this.getState()&i&&n(r)})}pushState(e){this.stateQueue|=e}popState(e){this.stateQueue&=~e}getState(){return this.stateQueue&-this.stateQueue}processCanvasOverlayEvent(e){let n=this.calculateCoordinates(e);if(n==null)return;let i=e.target,r=null;for(;i!=null&&(r=i.getAttribute("data-pointer-capture"),r==null);)i=i.parentElement;if(i==null||r==null||!R3i.has(r))return;let s=e.type==="mouseover",o=s?i:void 0;this.pointerCaptureCanvasElement!==o&&(this.pointerCaptureCanvasElement=o,r==="exclusive"&&nG(this.listeners,this.buildPointerEvent(ve({type:s?"leave":"enter",event:e},n))))}processEvent(e){let n=this.decideInteractionEventTypes(e),i=e.target;if(e.type==="click"&&i?.ariaDisabled==="true"){e.preventDefault();return}n!=null&&this.dispatchEvent(e,n).catch(r=>yr.errorOnce(r))}dispatchEvent(e,n){return O(this,null,function*(){if(F3i(n)){this.dispatchPointerEvent(e,n);return}let{relatedElement:i,targetElement:r}=this.extractElements(e);if(L3i(n)){let s=e;nG(this.listeners,{type:n,sourceEvent:s,relatedElement:i,targetElement:r})}else if(O3i(n)){let s=e;nG(this.listeners,{type:n,sourceEvent:s,relatedElement:i,targetElement:r})}})}extractElements(e){let n,i;return"relatedTarget"in e&&e.relatedTarget instanceof HTMLElement&&(n=e.relatedTarget),"target"in e&&e.target instanceof HTMLElement&&(i=e.target),{relatedElement:n,targetElement:i}}dispatchPointerEvent(e,n){let i=this.calculateCoordinates(e);i!=null&&nG(this.listeners,this.buildPointerEvent(ve({type:n,event:e},i)))}getEventHTMLTarget(e){if(e.target instanceof HTMLElement)return e.target;if(e.currentTarget instanceof HTMLElement)return e.currentTarget}recordDown(e){e instanceof MouseEvent&&(uE(["offsetX","offsetY"],this.clickHistory[0],e),uE(["offsetX","offsetY"],this.dblclickHistory[2],this.dblclickHistory[0]),uE(["offsetX","offsetY"],this.dblclickHistory[0],e)),this.dragStartElement=this.getEventHTMLTarget(e)}recordUp(e){e instanceof MouseEvent&&uE(["offsetX","offsetY"],this.dblclickHistory[1],e),this.dragStartElement=void 0}decideInteractionEventTypes(e){let n="drag-start";if(this.pointerCaptureCanvasElement?.isConnected===!1&&(this.pointerCaptureCanvasElement=void 0),this.pointerCaptureCanvasElement==null)switch(e.type){case"blur":case"focus":case"keydown":case"keyup":return this.keyboardOptions.enabled?e.type:void 0;case"click":case"dblclick":case"contextmenu":case"wheel":return e.type;case"mousedown":return this.isEventOverElement(e)?(this.mouseDown=!0,this.recordDown(e),n):void 0;case"touchstart":return this.isEventOverElement(e)?(this.touchDown=!0,this.recordDown(e),n):void 0;case"touchmove":case"mousemove":return!this.mouseDown&&!this.touchDown&&!this.isEventOverElement(e)?void 0:this.mouseDown||this.touchDown?"drag":"hover";case"mouseup":return!this.mouseDown&&!this.isEventOverElement(e)?void 0:(this.mouseDown=!1,this.recordUp(e),"drag-end");case"touchend":return!this.touchDown&&!this.isEventOverElement(e)?void 0:(this.touchDown=!1,this.recordUp(e),"drag-end");case"mouseleave":case"touchcancel":return"leave";case"mouseenter":return"enter";case"pagehide":return"page-left"}}isEventOverElement(e){return this.domManager.isEventOverElement(e)}calculateCoordinates(e){if(e instanceof MouseEvent)return this.getMouseEventCoords(e);if(typeof TouchEvent<"u"&&e instanceof TouchEvent){let n=e.touches[0]??e.changedTouches[0],{clientX:i,clientY:r,pageX:s,pageY:o}=n;return St(ve({},CCe.NULL_COORDS),{clientX:i,clientY:r,pageX:s,pageY:o})}else if(e instanceof PageTransitionEvent)return e.persisted?void 0:CCe.NULL_COORDS}getMouseEventCoords(e){let{clientX:n,clientY:i,pageX:r,pageY:s}=e,{offsetX:o,offsetY:a}=e,l=this.getEventHTMLTarget(e),{x:c=0,y:d=0}=l?this.domManager.calculateCanvasPosition(l):{};if(this.dragStartElement!=null&&e.target!==this.dragStartElement){let u=this.domManager.calculateCanvasPosition(this.dragStartElement);o-=u.x-c,a-=u.y-d}else o+=c,a+=d;return{clientX:n,clientY:i,pageX:r,pageY:s,offsetX:o,offsetY:a}}isWheelEvent(e){return e.type==="wheel"}buildPointerEvent(e){let{type:n,event:i,clientX:r,clientY:s}=e,{offsetX:o,offsetY:a,pageX:l,pageY:c}=e;if(!Tc(o)||!Tc(a)){let E=this.domManager.getBoundingClientRect();o=r-E.left,a=s-E.top}if(!Tc(l)||!Tc(c)){let E=this.rootElement?.getBoundingClientRect();l=r-(E?.left??0),c=s-(E?.top??0)}let[d,u]=[NaN,NaN];if(this.isWheelEvent(i)){let E=i.deltaMode===0?.01:1;d=i.deltaX*E,u=i.deltaY*E}let m=[];i.type==="click"?m=this.clickHistory:i.type==="dblclick"&&(m=this.dblclickHistory);let{relatedElement:f,targetElement:_}=this.extractElements(i),x="button"in i?Number(i.button):0,D={type:n,offsetX:o,offsetY:a,pageX:l,pageY:c,deltaX:d,deltaY:u,button:x,pointerHistory:m,sourceEvent:i,relatedElement:f,targetElement:_};return this.debug("InteractionManager - builtEvent: ",D),D}};ont.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};ant=ont;lnt=class extends b2{constructor(t,e){super(),this.interactionManager=t,this.chartUpdateMutex=e,this.defaultDuration=1e3,this.batch=new get(this.defaultDuration*1.5),this.debug=bu.create(!0,"animation"),this.rafAvailable=typeof requestAnimationFrame<"u",this.isPlaying=!1,this.requestId=null,this.skipAnimations=!1,this.currentAnonymousAnimationId=0}animate(e){var t=al(e,[]);let n=this.batch;try{n.checkOverlappingId(t.id)}catch(l){this.failsafeOnError(l);return}let{id:i}=t;i==null&&(i=`__${this.currentAnonymousAnimationId}`,this.currentAnonymousAnimationId+=1);let r=this.isSkipped()||t.phase==="none";r&&this.debug("AnimationManager - skipping animation");let{delay:s,duration:o}=t;if(!_et(s))throw new Error(`Animation delay of ${s} is unsupported (${i})`);if(!_et(o))throw new Error(`Animation duration of ${o} is unsupported (${i})`);let a=new ztt(St(ve({},t),{id:i,skip:r,autoplay:this.isPlaying?t.autoplay:!1,phase:t.phase,defaultDuration:this.defaultDuration}));if(!this.forceTimeJump(a,this.defaultDuration))return this.batch.addAnimation(a),a}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");try{this.batch.play()}catch(t){this.failsafeOnError(t)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");try{this.batch.pause()}catch(t){this.failsafeOnError(t)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()"),this.batch.stop()}stopByAnimationId(t){try{this.batch.stopByAnimationId(t)}catch(e){this.failsafeOnError(e)}}stopByAnimationGroupId(t){try{this.batch.stopByAnimationGroupId(t)}catch(e){this.failsafeOnError(e)}}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(t=!0){this.skipAnimations=t}isSkipped(){return!this.rafAvailable||this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){this.debug.check()&&this.debug("AnimationManager - skipCurrentBatch()",{stack:new Error().stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(t){this.requestId=requestAnimationFrame(t)}forceTimeJump(t,e){return!1}requestAnimation(){if(!this.rafAvailable||!this.batch.isActive()||this.requestId!==null)return;let t,e=n=>O(this,null,function*(){let i=()=>O(this,null,function*(){let r=n-(t??n);t=n,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.size,deltaTime:r}),this.interactionManager.pushState(1);try{this.batch.progress(r)}catch(s){this.failsafeOnError(s)}this.listeners.dispatch("animation-frame",{type:"animation-frame",deltaMs:r})});this.isSkippingFrames()?yield this.chartUpdateMutex.acquireImmediately(i):yield this.chartUpdateMutex.acquire(i),this.batch.isActive()?this.scheduleAnimationFrame(e):(this.batch.stop(),this.listeners.dispatch("animation-stop",{type:"animation-stop",deltaMs:this.batch.consumedTimeMs}))});this.listeners.dispatch("animation-start",{type:"animation-start",deltaMs:0}),this.scheduleAnimationFrame(e)}cancelAnimation(){this.requestId!==null&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(t,e=!0){yr.error("Error during animation, skipping animations",t),e&&this.cancelAnimation()}startBatch(t){this.debug(`AnimationManager - startBatch() with skipAnimations=${t}.`),this.reset(),this.batch.stop(),this.batch.destroy(),this.batch=new get(this.defaultDuration*1.5),t===!0&&this.batch.skip()}endBatch(){this.batch.isActive()?(this.batch.ready(),this.requestAnimation()):(this.interactionManager.popState(1),this.batch.isSkipped()&&this.batch.skip(!1))}onBatchStop(t){this.batch.stoppedCbs.add(t)}},N3i=class cnt{constructor(e,n,i){this.localeManager=e,this.domManager=n,this.layoutService=i,this.debug=bu.create(!0,"aria"),this.destroyFns=[],this.liveElem=cnt.createAnnouncer(),this.domManager.addChild("canvas-proxy","ag-charts-canvas-proxy",this.liveElem),this.destroyFns.push(this.layoutService.addListener("layout-complete",r=>this.onResize(r)),()=>this.domManager.removeChild("canvas-proxy","ag-charts-canvas-proxy"))}static createAnnouncer(){let e=l_().createElement("div");return e.classList.add("ag-charts-aria-announcer"),TE(e,"role","status"),TE(e,"aria-live","assertive"),e}destroy(){this.destroyFns.forEach(e=>e())}onResize(e){this.liveElem.style.width=`${e.chart.width}px`,this.liveElem.style.height=`${e.chart.height}px`}announceValue(e,n){let{localeManager:i,liveElem:r}=this,s=i.t(e,n);this.debug(`AriaAnnouncementService - announceValue: ${s}`),r.textContent="\xA0",setTimeout(()=>r.innerText=s,16)}},dnt=class extends b2{legendItemClick(t,e,n,i){let r={type:"legend-item-click",series:t,itemId:e,enabled:n,legendItemName:i};this.listeners.dispatch("legend-item-click",r)}legendItemDoubleClick(t,e,n,i,r){let s={type:"legend-item-double-click",series:t,itemId:e,enabled:n,legendItemName:r,numVisibleItems:i};this.listeners.dispatch("legend-item-double-click",s)}axisHover(t,e){let n={type:"axis-hover",axisId:t,direction:e};this.listeners.dispatch("axis-hover",n)}},unt=class hnt{constructor(e){this.defaultActions=[],this.disabledActions=new Set,this.hiddenActions=new Set,this.listeners=new Ew;let{Default:n,ContextMenu:i}=WG;this.destroyFns=[e.listenAll("contextmenu",r=>this.onContextMenu(r),n|i)]}destroy(){this.destroyFns.forEach(e=>e())}onContextMenu(e){hnt.toContextType(e.region)==="all"&&this.dispatchContext("all",e,{})}static toContextType(e){return e==="legend"||e==="series"?e:"all"}static check(e,n){return n.type===e}static checkCallback(e,n,i){return e===n}dispatchContext(e,n,i){let{offsetX:r,offsetY:s,sourceEvent:o}=n;this.listeners.dispatch("",SG({type:e,x:r,y:s,context:i,sourceEvent:o}))}addListener(e){return this.listeners.addListener("",e)}filterActions(e){return this.defaultActions.filter(n=>n.id&&!this.hiddenActions.has(n.id)&&["all",e].includes(n.type))}registerDefaultAction(e){e.id&&this.defaultActions.find(({id:n})=>n===e.id)||this.defaultActions.push(e)}enableAction(e){this.disabledActions.delete(e)}disableAction(e){this.disabledActions.add(e)}setActionVisiblity(e,n){n?this.hiddenActions.delete(e):this.hiddenActions.add(e)}isDisabled(e){return this.disabledActions.has(e)}},_R=class extends Map{constructor(t,e){super(),this.defaultValue=t,this.defaultState=e}set(t,e){return this.delete(t),typeof e<"u"&&super.set(t,e),this}stateId(){return Array.from(this.keys()).pop()??this.defaultState}stateValue(){return Array.from(this.values()).pop()??this.defaultValue}},pnt=(t=>(t.Auto="auto",t.Default="default",t.Grab="grab",t.Grabbing="grabbing",t.Move="move",t.NotAllowed="not-allowed",t.Pointer="pointer",t.EWResize="ew-resize",t.NSResize="ns-resize",t.ZoomIn="zoom-in",t.ZoomOut="zoom-out",t))(pnt||{}),mnt=class{constructor(t){this.domManager=t,this.stateTracker=new _R("default")}updateCursor(t,e){this.stateTracker.set(t,e),this.domManager.updateCursor(this.stateTracker.stateValue())}getCursor(){return this.domManager.getCursor()}};B3i=1,fnt=class extends b2{constructor(t){super(),this.domManager=t,this.touchstart=e=>this.onTouchStart(e),this.touchmove=e=>this.onTouchMove(e),this.touchend=e=>this.onTouchEnd(e),this.touchcancel=e=>this.onTouchCancel(e),this.pinch={finger1:{identifier:NaN,screenX:NaN,screenY:NaN},finger2:{identifier:NaN,screenX:NaN,screenY:NaN},origin:{x:NaN,y:NaN},distance:NaN,status:0},this.domManager.addEventListener("touchstart",this.touchstart,{passive:!0}),this.domManager.addEventListener("touchmove",this.touchmove,{passive:!1}),this.domManager.addEventListener("touchend",this.touchend),this.domManager.addEventListener("touchcancel",this.touchcancel)}destroy(){this.domManager.removeEventListener("touchstart",this.touchstart),this.domManager.removeEventListener("touchmove",this.touchmove),this.domManager.removeEventListener("touchend",this.touchend),this.domManager.removeEventListener("touchcancel",this.touchcancel)}findPinchTouches(t){let{touches:e}=t,{finger1:n,finger2:i}=this.pinch;if(this.pinch.status!==0&&e.length===2){if(e[0].identifier===n.identifier&&e[1].identifier===i.identifier)return[e[0],e[1]];if(e[0].identifier===i.identifier&&e[1].identifier===n.identifier)return[e[1],e[0]]}}copyTouchData(t){let e=["identifier","screenX","screenY"];uE(e,this.pinch.finger1,t.touches[0]),uE(e,this.pinch.finger2,t.touches[1]),this.pinch.distance=Cet(this.pinch.finger1,this.pinch.finger2)}dispatchPinchEvent(t,e,n){let{finger1:i,finger2:r,origin:s}=this.pinch;this.listeners.dispatch(t,SG({sourceEvent:n,type:t,finger1:i,finger2:r,deltaDistance:e,origin:s}))}onTouchStart(t){this.stopPinchTracking(t);let{pinch:e}=this;t.touches.length===2&&(e.status=1,this.copyTouchData(t),e.origin.x=(t.touches[0].clientX+t.touches[1].clientX)/2,e.origin.y=(t.touches[0].clientY+t.touches[1].clientY)/2)}onTouchMove(t){let e=this.findPinchTouches(t);if(e!==void 0){let[n,i]=e,{pinch:r}=this,s=Cet(n,i),o=s-r.distance;r.status===1?Math.abs(o)>B3i&&(r.status=2,this.copyTouchData(t),this.dispatchPinchEvent("pinch-start",0,t)):r.status===2?(r.distance=s,this.copyTouchData(t),this.dispatchPinchEvent("pinch-move",o,t)):yr.error(`unexpected pinch.status: ${r.status}`)}}onTouchEnd(t){this.stopPinchTracking(t)}onTouchCancel(t){this.stopPinchTracking(t)}stopPinchTracking(t){let{pinch:e}=this;e.status===2&&this.dispatchPinchEvent("pinch-end",0,t),this.pinch.status=0}},gnt=class extends b2{constructor(){super(...arguments),this.highlightStates=new _R}updateHighlight(t,e){let{activeHighlight:n}=this;this.highlightStates.set(t,e),this.activeHighlight=this.highlightStates.stateValue(),this.isEqual(this.activeHighlight,n)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:n,callerId:t})}getActiveHighlight(){return this.activeHighlight}isEqual(t,e){return t===e||t!=null&&e!=null&&t?.series===e?.series&&t?.itemId===e?.itemId&&t?.datum===e?.datum}},vnt=class extends b2{constructor(t,e){super(),this.domManager=e,this.hasBrowserFocus=!1,this.isMouseBlurred=!1,this.isClicking=!1,this.destroyFns.push(t.addListener("drag-start",n=>this.onClickStart(n),31),t.addListener("click",n=>this.onClickStop(n),31),t.addListener("drag-end",n=>this.onClickStop(n),31),t.addListener("wheel",n=>this.mouseBlur(n)),t.addListener("hover",n=>this.mouseBlur(n)),t.addListener("drag",n=>this.mouseBlur(n)),t.addListener("blur",n=>this.onBlur(n),31),t.addListener("focus",n=>this.onFocus(n),31),t.addListener("keydown",n=>this.onKeyDown(n),31))}destroy(){super.destroy()}onClickStart(t){this.isClicking=!0,this.mouseBlur(t)}onClickStop(t){this.mouseBlur(t),this.isClicking=!1}mouseBlur(t){this.hasBrowserFocus&&(this.isMouseBlurred||(this.dispatch("blur",0,t),this.isMouseBlurred=!0))}onBlur(t){this.hasBrowserFocus=!1,this.isMouseBlurred=!1,this.dispatch("blur",0,t)}onFocus(t){let e=this.domManager.getBrowserFocusDelta();this.dispatch("browserfocus",e,t),this.hasBrowserFocus=!0;let n=t.relatedElement==null&&t.targetElement?.tagName==="CANVAS";if(this.isClicking||n){this.isMouseBlurred=!0;return}this.dispatch("tab",e,t)}onKeyDown(t){if(!this.hasBrowserFocus)return;this.isMouseBlurred=!1;let{code:e,altKey:n,shiftKey:i,metaKey:r,ctrlKey:s}=t.sourceEvent;if(e==="Tab")return i?this.dispatch("tab",-1,t):this.dispatch("tab",1,t);if(!(n||i||r||s)){switch(e){case"ArrowDown":return this.dispatch("nav-vert",1,t);case"ArrowUp":return this.dispatch("nav-vert",-1,t);case"ArrowLeft":return this.dispatch("nav-hori",-1,t);case"ArrowRight":return this.dispatch("nav-hori",1,t);case"ZoomIn":case"Add":return this.dispatch("nav-zoom",1,t);case"ZoomOut":case"Substract":return this.dispatch("nav-zoom",-1,t);case"Space":case"Enter":return this.dispatch("submit",0,t);case"Escape":return this.dispatch("cancel",0,t);case"Backspace":case"Delete":return this.dispatch("delete",0,t)}switch(t.sourceEvent.key){case"+":return this.dispatch("nav-zoom",1,t);case"-":return this.dispatch("nav-zoom",-1,t)}}}dispatch(t,e,n){nG(this.listeners,{type:t,delta:e,sourceEvent:n})}},z5e=["series"],xet=class extends Ew{};ynt=class{constructor(t,e,n){this.interactionManager=t,this.keyNavManager=e,this.focusIndicator=n,this.currentTabIndex=0,this.isDragging=!1,this.leftCanvas=!1,this.regions=new Map,this.destroyFns=[],this.allRegionsListeners=new xet,this.destroyFns.push(...g8e.map(i=>t.addListener(i,this.processPointerEvent.bind(this),31)),this.keyNavManager.addListener("blur",this.onNav.bind(this)),this.keyNavManager.addListener("browserfocus",this.onBrowserFocus.bind(this)),this.keyNavManager.addListener("tab",this.onTab.bind(this)),this.keyNavManager.addListener("nav-vert",this.onNav.bind(this)),this.keyNavManager.addListener("nav-hori",this.onNav.bind(this)),this.keyNavManager.addListener("nav-zoom",this.onNav.bind(this)),this.keyNavManager.addListener("submit",this.onNav.bind(this)),this.keyNavManager.addListener("cancel",this.onNav.bind(this)),this.keyNavManager.addListener("delete",this.onNav.bind(this)))}destroy(){this.destroyFns.forEach(t=>t()),this.currentRegion=void 0;for(let t of this.regions.values())t.listeners.destroy();this.focusIndicator.destroy(),this.regions.clear()}addRegion(t,...e){if(this.regions.has(t))throw new Error(`AG Charts - Region: ${t} already exists`);let n={properties:{name:t,bboxproviders:[...e]},listeners:new xet};return this.regions.set(t,n),this.makeObserver(n)}updateRegion(t,...e){let n=this.regions.get(t);if(n)n.properties.bboxproviders=[...e];else throw new Error("AG Charts - unknown region: "+t)}getRegion(t){return this.makeObserver(this.regions.get(t))}listenAll(t,e,n=16){return bet(this.allRegionsListeners,this.interactionManager,t,e,n)}makeObserver(t){let{interactionManager:e}=this;class n{addListener(r,s,o=16){return bet(t?.listeners,e,r,s,o)}}return new n}checkPointerHistory(t,e){for(let n of e.pointerHistory){let{region:i}=this.pickRegion(n.offsetX,n.offsetY);if(t.properties.name!==i?.properties.name)return!1}return!0}dispatch(t,e,n){if(t==null)return;let i=SG(St(ve({},e),{region:t.properties.name,bboxProviderId:n}));this.allRegionsListeners.dispatch(i.type,i),t.listeners.dispatch(i.type,i)}handleDragging(t){let{currentRegion:e}=this;switch(t.type){case"drag-start":this.isDragging=!0,this.leftCanvas=!1;break;case"leave":return this.leftCanvas=!0,this.isDragging;case"enter":return this.leftCanvas=!1,this.isDragging;case"drag":if(this.isDragging)return this.dispatch(e,t),!0;break;case"drag-end":if(this.isDragging)return this.isDragging=!1,this.dispatch(e,t),this.leftCanvas&&this.dispatch(e,St(ve({},t),{type:"leave"})),!0;break}return!1}processPointerEvent(t){if(this.handleDragging(t))return;let{currentRegion:e}=this;if(t.type==="leave"){this.dispatch(e,St(ve({},t),{type:"leave"})),this.currentRegion=void 0;return}let{region:n,bboxProviderId:i}=this.pickRegion(t.offsetX,t.offsetY);e!==void 0&&n?.properties.name!==e.properties.name&&this.dispatch(e,St(ve({},t),{type:"leave"}),this.currentBBoxProviderId),n!==void 0&&n.properties.name!==e?.properties.name&&this.dispatch(n,St(ve({},t),{type:"enter"}),i),n!==void 0&&this.checkPointerHistory(n,t)&&this.dispatch(n,t,i),this.currentRegion=n,this.currentBBoxProviderId=i}pickRegion(t,e){let n=1/0,i,r;for(let s of this.regions.values())for(let o of s.properties.bboxproviders){if(o.visible===!1)continue;let a=o.computeTransformedRegionBBox?.()??o.computeTransformedBBox(),l=a.width*a.height;l<n&&a.containsPoint(t,e)&&(n=l,i=s,r=o.id)}return{region:i,bboxProviderId:r}}getTabRegion(t){if(t!==void 0&&t>=0&&t<z5e.length)return this.regions.get(z5e[t])}getNextInteractableTabIndex(t,e){let n=e<0?-1:1,i=t;for(;e!==0;){if(this.getTabRegion(i+n)===void 0)return;e=e-n,i=i+n}return i}validateCurrentTabIndex(){this.getTabRegion(this.currentTabIndex)!==void 0&&(this.currentTabIndex=this.getNextInteractableTabIndex(-1,1)??0)}onBrowserFocus(t){t.delta>0?this.currentTabIndex=-1:t.delta<0&&(this.currentTabIndex=z5e.length)}onTab(t){this.validateCurrentTabIndex();let e=this.getNextInteractableTabIndex(this.currentTabIndex,t.delta),n=this.getTabRegion(e),i=this.getTabRegion(this.currentTabIndex);if(e!==void 0&&(this.currentTabIndex=e),i!==void 0&&n?.properties.name!==i.properties.name){let{delta:r,sourceEvent:s}=t,o=SG({type:"blur",delta:r,sourceEvent:s});this.dispatch(i,o)}n===void 0?this.focusIndicator.updateBounds(void 0):this.dispatch(n,t)}onNav(t){let e=this.getTabRegion(this.currentTabIndex);this.dispatch(e,t)}},_nt=["start","center","end"],H5e=["seriesType","annotations","annotationOptions","ranges","zoom"],wet={seriesType:0,annotations:1,annotationOptions:2,ranges:3,zoom:4},lG=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t.Floating="floating",t.FloatingTop="floating-top",t.FloatingBottom="floating-bottom",t))(lG||{}),oR=Object.values(lG);Cnt=class extends b2{static isGroup(t,e){return e.group===t}static isChildElement(t,e){for(let n of oR)if(t.isManagedChildDOMElement(e,"canvas-overlay",`toolbar-${n}`))return!0;return!1}pressButton(t,e,n,i){this.listeners.dispatch("button-pressed",{type:"button-pressed",group:t,id:e,value:n,rect:i})}cancel(t){this.listeners.dispatch("cancelled",{type:"cancelled",group:t})}toggleButton(t,e,n){let{active:i=!1,enabled:r=!0,visible:s=!0}=n;this.listeners.dispatch("button-toggled",{type:"button-toggled",group:t,id:e,active:i,enabled:r,visible:s})}updateButton(t,e,n){this.listeners.dispatch("button-updated",ve({type:"button-updated",group:t,id:e},n))}toggleGroup(t,e,n){let{active:i,visible:r}=n;this.listeners.dispatch("group-toggled",{type:"group-toggled",caller:t,group:e,active:i,visible:r})}changeFloatingAnchor(t,e){this.listeners.dispatch("floating-anchor-changed",{type:"floating-anchor-changed",group:t,anchor:e})}buttonMoved(t,e,n,i){this.listeners.dispatch("button-moved",{type:"button-moved",group:t,value:e,rect:n,groupRect:i})}proxyGroupOptions(t,e,n){this.listeners.dispatch("proxy-group-options",{type:"proxy-group-options",caller:t,group:e,options:n})}},Ote=class{constructor(t,e){this.domManager=t,this.tooltip=e,this.stateTracker=new _R,this.suppressState=new _R(!1),this.appliedState=null,e.setup(t),t.addListener("hidden",()=>this.tooltip.toggle(!1))}updateTooltip(t,e,n){this.tooltip.enabled&&(n??(n=this.stateTracker.get(t)?.content),this.stateTracker.set(t,{content:n,meta:e}),this.applyStates())}removeTooltip(t){this.tooltip.enabled&&(this.stateTracker.delete(t),this.applyStates())}suppressTooltip(t){this.suppressState.set(t,!0)}unsuppressTooltip(t){this.suppressState.delete(t)}getTooltipMeta(t){return this.stateTracker.get(t)?.meta}destroy(){this.domManager.removeStyles("tooltip")}applyStates(){let t=this.stateTracker.stateId(),e=t?this.stateTracker.get(t):null;if(this.suppressState.stateValue()||e?.meta==null||e?.content==null){this.appliedState=null,this.tooltip.toggle(!1);return}let n=this.domManager.getBoundingClientRect(),i=this.tooltip.bounds==="extended"?this.domManager.getOverlayClientRect():n;if(this.appliedState?.content===e?.content){let r=this.tooltip.isVisible();this.tooltip.show(i,n,e?.meta,null,r)}else this.tooltip.show(i,n,e?.meta,e?.content);this.appliedState=e}static makeTooltipMeta(t,e){let{offsetX:n,offsetY:i}=t,{tooltip:r}=e.series.properties,s={offsetX:n,offsetY:i,enableInteraction:r.interaction?.enabled??!1,lastPointerEvent:{type:t.type,offsetX:n,offsetY:i},showArrow:r.showArrow,position:{type:r.position.type,xOffset:r.position.xOffset,yOffset:r.position.yOffset}},o=e.yBar?.upperPoint??e.midPoint??e.series.datumMidPoint?.(e);if(r.position.type==="node"&&o){let{x:a,y:l}=o,c=e.series.contentGroup.inverseTransformPoint(a,l);return St(ve({},s),{offsetX:Math.round(c.x),offsetY:Math.round(c.y)})}return s}},xnt=class extends Ew{constructor(){super(...arguments),this.layoutComplete="layout-complete",this.debug=bu.create(!0,"layout")}addListener(t,e){if(this.isLayoutStage(t)||this.isLayoutComplete(t))return super.addListener(t,e);throw new Error(`AG Charts - unsupported listener type: ${t}`)}dispatchPerformLayout(t,e){return this.isLayoutStage(t)?this.getListenersByType(t).reduce((n,i)=>{try{let r=i.handler(n);return this.debug("[LayoutService] Context updated to: ",ve({},r),i),r}catch(r){return yr.errorOnce(r),n}},e):e}dispatchLayoutComplete(t){this.dispatch(this.layoutComplete,t)}isLayoutStage(t){return t!==this.layoutComplete}isLayoutComplete(t){return t===this.layoutComplete}},z3i=/\$\{(\w+)}(?:\[(\w+)])?/gi,G5e={number:new Intl.NumberFormat("en-US"),percent:new Intl.NumberFormat("en-US",{style:"percent"}),date:new Intl.DateTimeFormat("en-US",{dateStyle:"full"}),time:new Intl.DateTimeFormat("en-US",{timeStyle:"full"}),datetime:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeStyle:"full"})},H3i=({defaultValue:t,variables:e})=>t?.replaceAll(z3i,(n,i,r)=>{let s=e[i],o=r!=null?G5e[r]:void 0;return r!=null&&o==null&&yr.warnOnce(`Format style [${r}] is not supported`),o!=null?o.format(s):typeof s=="number"?G5e.number.format(s):s instanceof Date?G5e.datetime.format(s):String(s)}),G3i=class extends Ew{constructor(){super(...arguments),this.localeText=void 0,this.getLocaleText=void 0}setLocaleText(t){this.localeText!==t&&(this.localeText=t,this.dispatch("locale-changed"))}setLocaleTextFormatter(t){this.getLocaleText=t,this.getLocaleText!==t&&(this.getLocaleText=t,this.dispatch("locale-changed"))}t(t,e={}){let{localeText:n=ott,getLocaleText:i}=this,r=n[t];return i?.({key:t,defaultValue:r,variables:e})??H3i({key:t,defaultValue:r,variables:e})??t}},W3i=class{constructor(){this.groups={}}registerSeries({id:t,seriesGrouping:e,visible:n,type:i}){var r;e&&((r=this.groups)[i]??(r[i]={}),this.groups[i][t]={grouping:e,visible:n})}deregisterSeries({id:t,type:e}){this.groups[e]&&delete this.groups[e][t],this.groups[e]&&Object.keys(this.groups[e]).length===0&&delete this.groups[e]}getVisiblePeerGroupIndex({type:t,seriesGrouping:e,visible:n}){if(!e)return{visibleGroupCount:n?1:0,visibleSameStackCount:n?1:0,index:0};let i=new Set,r=new Set;for(let o of Object.values(this.groups[t]??{}))o.visible&&(i.add(o.grouping.groupIndex),o.grouping.groupIndex===e.groupIndex&&r.add(o.grouping.stackIndex));let s=Array.from(i);return s.sort((o,a)=>o-a),{visibleGroupCount:s.length,visibleSameStackCount:r.size,index:s.indexOf(e.groupIndex)}}},cG=(t=>(t[t.FULL=0]="FULL",t[t.UPDATE_DATA=1]="UPDATE_DATA",t[t.PROCESS_DATA=2]="PROCESS_DATA",t[t.PERFORM_LAYOUT=3]="PERFORM_LAYOUT",t[t.SERIES_UPDATE=4]="SERIES_UPDATE",t[t.PRE_SCENE_RENDER=5]="PRE_SCENE_RENDER",t[t.SCENE_RENDER=6]="SCENE_RENDER",t[t.NONE=7]="NONE",t))(cG||{}),bnt=class extends Ew{constructor(t){super(),this.updateCallback=t}update(t=0,e){this.updateCallback(t,e)}dispatchUpdateComplete(t){this.dispatch("update-complete",{type:"update-complete",minRect:t?.minRect,minVisibleRect:t?.minVisibleRect})}dispatchPreSceneRender(t){this.dispatch("pre-scene-render",ve({type:"pre-scene-render"},t))}},U3i=class{constructor(t,e){let{scene:n,root:i,syncManager:r,container:s,updateCallback:o,updateMutex:a,overrideDevicePixelRatio:l}=e;this.chartService=t,this.syncManager=r,this.zoomManager=t.zoomManager,this.domManager=new int(s),n?.setContainer(this.domManager),this.scene=n??new ent({pixelRatio:l,domManager:this.domManager}),this.scene.setRoot(i),this.axisManager=new f3i(i),this.localeManager=new G3i,this.annotationManager=new m3i(t.annotationRoot),this.chartEventManager=new dnt,this.cursorManager=new mnt(this.domManager),this.highlightManager=new gnt,this.interactionManager=new ant(t.keyboard,this.domManager),this.keyNavManager=new vnt(this.interactionManager,this.domManager),this.focusIndicator=new E3i(this.domManager),this.regionManager=new ynt(this.interactionManager,this.keyNavManager,this.focusIndicator),this.contextMenuRegistry=new unt(this.regionManager),this.toolbarManager=new Cnt,this.gestureDetector=new fnt(this.domManager),this.layoutService=new xnt,this.ariaAnnouncementService=new N3i(this.localeManager,this.domManager,this.layoutService),this.updateService=new bnt(o),this.proxyInteractionService=new I3i(this.updateService,this.localeManager,this.domManager,this.focusIndicator),this.seriesStateManager=new W3i,this.stateManager=new l3i,this.callbackCache=new p3i,this.animationManager=new lnt(this.interactionManager,a),this.animationManager.skip(),this.animationManager.play(),this.dataService=new Lte(this.animationManager),this.tooltipManager=new Ote(this.domManager,t.tooltip)}destroy(){this.tooltipManager.destroy(),this.contextMenuRegistry.destroy(),this.regionManager.destroy(),this.proxyInteractionService.destroy(),this.focusIndicator.destroy(),this.keyNavManager.destroy(),this.interactionManager.destroy(),this.animationManager.stop(),this.animationManager.destroy(),this.ariaAnnouncementService.destroy(),this.chartEventManager.destroy(),this.highlightManager.destroy(),this.callbackCache.invalidateCache(),this.animationManager.reset(),this.syncManager.destroy(),this.domManager.destroy(),this.axisManager.destroy()}},wnt=class extends pl{constructor(){super(...arguments),this.range="tooltip"}};Me([$e(Su(["tooltip","node"],"a range"))],wnt.prototype,"range",2);Det=class Snt{constructor(){this.domain=new Set}static is(e){return e instanceof Snt}extend(e){this.domain.add(e)}getDomain(){return Array.from(this.domain)}},nR=class Tnt{constructor(){this.domain=[1/0,-1/0]}static is(e){return e instanceof Tnt}static extendDomain(e,n=[1/0,-1/0]){for(let i of e)typeof i=="number"&&(n[0]>i&&(n[0]=i),n[1]<i&&(n[1]=i));return n}extend(e){this.domain[0]>e&&(this.domain[0]=e),this.domain[1]<e&&(this.domain[1]=e)}getDomain(){return[...this.domain]}};JD=Symbol("invalid");Ent=class{constructor(t,e="standalone"){this.opts=t,this.mode=e,this.debug=bu.create(!0,"data-model"),this.scopeCache=new Map,this.keys=[],this.values=[],this.aggregates=[],this.groupProcessors=[],this.propertyProcessors=[],this.reducers=[],this.processors=[];let n=!0;for(let r of t.props){if(r.type==="key"&&!n)throw new Error("AG Charts - internal config error: keys must come before values.");r.type==="value"&&n&&(n=!1)}let i=({matchGroupIds:r=[]})=>{for(let s of r)if(this.values.every(o=>o.groupId!==s))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${s}).`)};for(let r of t.props)switch(r.type){case"key":this.keys.push(St(ve({},r),{index:this.keys.length,missing:new Map}));break;case"value":if(r.property==null)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(r)}`);this.values.push(St(ve({},r),{index:this.values.length,missing:new Map}));break;case"aggregate":i(r),this.aggregates.push(St(ve({},r),{index:this.aggregates.length}));break;case"group-value-processor":i(r),this.groupProcessors.push(St(ve({},r),{index:this.groupProcessors.length}));break;case"property-value-processor":this.propertyProcessors.push(St(ve({},r),{index:this.propertyProcessors.length}));break;case"reducer":this.reducers.push(St(ve({},r),{index:this.reducers.length}));break;case"processor":this.processors.push(St(ve({},r),{index:this.processors.length}));break}}resolveProcessedDataDefById(t,e){let n=this.scopeCache.get(t.id)?.get(e);if(!n)throw new Error(`AG Charts - didn't find property definition for [${e}, ${t.id}]`);return{index:n.index,def:n}}resolveProcessedDataIndexById(t,e){return this.resolveProcessedDataDefById(t,e).index}resolveProcessedDataDefsByIds(t,e){return e.map(n=>[n,this.resolveProcessedDataDefById(t,n)])}resolveProcessedDataDefsValues(t,{keys:e,values:n}){let i={};for(let[r,{index:s,def:o}]of t){let a=o.type==="key"?e:n;i[r]=a[s]}return i}getDomain(t,e,n="value",i){return this.getDomainsByType(n,i)?.[this.resolveProcessedDataIndexById(t,e)]??[]}getDomainsByType(t,e){switch(t){case"key":return e.domain.keys;case"value":return e.domain.values;case"aggregate":return e.domain.aggValues;case"group-value-processor":return e.domain.groups;default:return null}}processData(t,e){let{opts:{groupByKeys:n,groupByFn:i},aggregates:r,groupProcessors:s,reducers:o,processors:a,propertyProcessors:l}=this,c=performance.now();if(n&&this.keys.length===0)return;let d=this.extractData(t,e);if(n?d=this.groupData(d):i&&(d=this.groupData(d,i(d))),s.length>0&&this.postProcessGroups(d),r.length>0&&this.aggregateData(d),l.length>0&&this.postProcessProperties(d),o.length>0&&this.reduceData(d),a.length>0&&this.postProcessData(d),t.length>0){for(let m of Dee(this.keys,this.values))for(let[f,_]of m.missing)if(_>=t.length){let x=f==null?"":` for ${f}`;yr.warnOnce(`the key '${m.property}' was not found in any data element${x}.`)}}let u=performance.now();d.time=u-c,this.debug.check()&&q3i(d),this.scopeCache.clear();for(let m of Dee(this.keys,this.values,this.aggregates))if(m.idsMap)for(let[f,_]of m.idsMap)for(let x of _)if(!this.scopeCache.has(f))this.scopeCache.set(f,new Map([[x,m]]));else{if(this.scopeCache.get(f)?.has(x))throw new Error("duplicate definition ids on the same scope are not allowed.");this.scopeCache.get(f).set(x,m)}return d}valueGroupIdxLookup({matchGroupIds:t}){let e=[];for(let[n,i]of this.values.entries())(!t||i.groupId&&t.includes(i.groupId))&&e.push(n);return e}valueIdxLookup(t,e){let n=t==null||t.length===0,i=typeof e=="string"?e:e.id,r=o=>{if(o.idsMap){for(let[a,l]of o.idsMap)if(t?.includes(a)&&l.has(i))return!0}return!1},s=this.values.findIndex(o=>(o.scopes==null||n&&!o.scopes.length||o.scopes.some(l=>t?.includes(l)))&&(o.property===i||o.id===i||r(o)));if(s===-1)throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(e)} in scope(s) ${JSON.stringify(t)}`);return s}extractData(t,e){let{dataDomain:n,processValue:i,scopes:r,allScopesHaveSameDefs:s}=this.initDataDomainProcessor(),o=new Map(e?.map(f=>[f.id,f])),{keys:a,values:l}=this,c=new Array(t.length),d=0,u=0;for(let[f,_]of t.entries()){let x={},D=r.size>0?new Set(r):void 0,E=new Array(a.length),M=0,I;for(let Y of a){if(I=i(Y,_,I),I===JD)break;E&&(E[M++]=I)}if(I===JD)continue;let z=l.length>0?new Array(l.length):void 0,G;for(let[Y,X]of l.entries()){for(let ne of X.scopes??r){let pe=o.get(ne),ce=pe?.data[f]??_;if(G=i(X,ce,G,ne),!(G===JD||!z)){if(pe!=null&&X.includeProperty!==!1){let ie=X.includeProperty&&X.id!=null?X.id:X.property;x[ne]??(x[ne]={}),x[ne][ie]=G}z[Y]=G}}if(G===JD){if(s)break;for(let ne of X.scopes??r)D?.delete(ne);if(D?.size===0)break}}if(G===JD&&s||D?.size===0)continue;let A={datum:ve(ve({},_),x),keys:E,values:z};!s&&D&&D.size<r.size&&(u++,A.validScopes=new Set(D)),c[d++]=A}c.length=d;let m=f=>{let _=n.get(f),x=_.getDomain();return nR.is(_)&&x[0]>x[1]?[]:x};return{type:"ungrouped",input:{count:t.length},data:c,domain:{keys:a.map(m),values:l.map(m)},defs:{allScopesHaveSameDefs:s,keys:a,values:l},partialValidDataCount:u,time:0}}groupData(t,e){let n=new Map;for(let o of t.data){let{keys:a,values:l,datum:c,validScopes:d}=o,u=e?.(o)??a,m=j3i(u);if(n.has(m)){let f=n.get(m);if(f.values.push(l),f.datum.push(c),d!=null&&f.validScopes!=null)for(let _ of f.validScopes)d.has(_)||f.validScopes.delete(_)}else n.set(m,{keys:u,values:[l],datum:[c],validScopes:d})}let i=new Array(n.size),r=new Array(n.size),s=0;for(let{keys:o,values:a,datum:l,validScopes:c}of n.values())c?.size!==0&&(r[s]=o,i[s++]={keys:o,values:a,datum:l,validScopes:c});return St(ve({},t),{type:"grouped",data:i,domain:St(ve({},t.domain),{groups:r})})}aggregateData(t){let e=t.type==="ungrouped";t.domain.aggValues=[];for(let[n,i]of this.aggregates.entries()){let r=this.valueGroupIdxLookup(i),s=[1/0,-1/0];for(let o of t.data){if(o.aggValues??(o.aggValues=new Array(this.aggregates.length)),o.validScopes)continue;let a=e?[o.values]:o.values,l=i.groupAggregateFunction?.()??[1/0,-1/0];for(let d of a){let u=r.map(f=>d[f]),m=i.aggregateFunction(u,o.keys);m&&(l=i.groupAggregateFunction?.(m,l)??nR.extendDomain(m,l))}let c=(i.finalFunction?.(l)??l).map(d=>$3i(d));o.aggValues[n]=c,nR.extendDomain(c,s)}t.domain.aggValues.push(s)}}postProcessGroups(t){let{groupProcessors:e}=this,n=new Set,i=new Map,r=new Map,s=new Map;for(let a of e){let l=this.valueGroupIdxLookup(a);r.set(a,l),s.set(a,a.adjust());for(let c of l){let u=this.values[c].valueType==="category";n.add(c),i.set(c,u?new Det:new nR)}}let o=a=>{for(let l of n)i.get(l)?.extend(a[l])};for(let a of t.data){for(let l of e){if(a.validScopes)continue;let c=r.get(l)??[],d=s.get(l)?.();if(d)if(t.type==="grouped")for(let u of a.values)u&&d(u,c);else a.values&&d(a.values,c)}if(t.type==="grouped")for(let l of a.values)o(l);else o(a.values)}for(let[a,l]of i)t.domain.values[a]=l.getDomain()}postProcessProperties(t){for(let{adjust:e,property:n,scopes:i}of this.propertyProcessors)e()(t,this.valueIdxLookup(i,n))}reduceData(t){t.reduced??(t.reduced={});for(let e of this.reducers){let n=e.reducer(),i=e.initialValue;for(let r of t.data)(!r.validScopes||e.scopes?.some(s=>r.validScopes?.has(s)))&&(i=n(i,r));t.reduced[e.property]=i}}postProcessData(t){t.reduced??(t.reduced={});for(let e of this.processors)t.reduced[e.property]=e.calculate(t)}initDataDomainProcessor(){let{keys:t,values:e}=this,n=new Set;for(let c of e)if(c.scopes)for(let d of c.scopes)n.add(d);let i=new Map,r=new Map,s=!0,o=()=>{for(let c of Dee(t,e))c.valueType==="category"?i.set(c,new Det):(i.set(c,new nR),s&&(s=(c.scopes??[]).length===n.size))};o();let a=this.buildAccessors(Dee(t,e));return{dataDomain:i,processValue:(c,d,u,m)=>{let f,_;if(a.has(c.property)){try{_=a.get(c.property)(d)}catch{}f=_!=null}else f=c.property in d,_=f?d[c.property]:c.missingValue;c.forceValue!=null&&(_=f&&AG(_)?-1*c.forceValue:c.forceValue,f=!0);let x="missingValue"in c;if(!f&&!x){let D=c.missing.get(m)??0;c.missing.set(m,D+1)}if(i.has(c)||o(),f&&c.validation?.(_,d)===!1)if("invalidValue"in c)_=c.invalidValue;else return this.mode!=="integrated"&&yr.warnOnce(`invalid value of type [${typeof _}] for [${c.scopes} / ${c.id}] ignored:`,`[${_}]`),JD;return c.processor&&(r.has(c)||r.set(c,c.processor()),_=r.get(c)?.(_,u===JD?void 0:u)),i.get(c)?.extend(_),_},initDataDomain:o,scopes:n,allScopesHaveSameDefs:s}}buildAccessors(t){let e=new Map;if(this.mode==="integrated")return e;for(let n of t){if(!(n.property.includes(".")||n.property.includes("[")))continue;let r=Dnt(n.property);if(r==null){yr.warnOnce("Invalid property path [%s]",n.property);continue}let s=Y3i(r);e.set(n.property,s)}return e}};Z3i=(()=>{let t=class Nx{constructor(n){this.mode=n,this.debug=bu.create(!0,"data-model"),this.requested=[],this.status="setup"}request(n,i,r){return O(this,null,function*(){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");return new Promise((s,o)=>{this.requested.push({id:n,opts:r,data:i,resolve:s,reject:o})})})}execute(){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);let n=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",n);let i=this.mergeRequested(n);this.debug("DataController.execute() - merged",i),this.debug.check()&&(d_().processedData=[]);let r=this.requested.map(({id:o})=>o),s=this.hasMultipleDataSources(n);for(let{opts:o,data:a,resolves:l,rejects:c,ids:d}of i)try{let u=new Ent(o,this.mode),m=u.processData(a,n);this.debug.check()&&d_("processedData").push(m),m?.partialValidDataCount===0?l.forEach((f,_)=>f({dataModel:u,processedData:this.processScopedData(d[_],m,r,s)})):m?this.splitResult(u,m,d,l):c.forEach(f=>f(new Error("AG Charts - no processed data generated")))}catch(u){c.forEach(m=>m(u))}}hasMultipleDataSources(n){if(n.length){let[{data:i},...r]=n;return r.some(s=>i!==s.data)}return!1}processScopedData(n,i,r,s){let o=l=>{if(Array.isArray(l))return l.map(o);let c=s?ve(ve({},l),l[n]):l;for(let d of r)delete c[d];return c},a=l=>Array.isArray(l)?l.map(a):l?.[n]??l;return St(ve({},i),{data:i.data.map(l=>St(ve({},l),{datum:o(l.datum),values:s?l.values?.map(a):l.values}))})}validateRequests(n){let i=[];for(let[r,s]of n.entries())r>0&&s.data.length!==n[0].data.length&&s.opts.groupByData===!1?s.reject(new Error("all series[].data arrays must be of the same length and have matching keys.")):i.push(s);return i}mergeRequested(n){let i=[];for(let r of n){let s=i.find(Nx.groupMatch(r));s?s.push(r):i.push([r])}return i.map(Nx.mergeRequests)}splitResult(n,i,r,s){for(let o=0;o<r.length;o++){let a=r[o],l=s[o];l({dataModel:n,processedData:St(ve({},i),{data:i.data.filter(({validScopes:c})=>c?.has(a)??!0)})})}}static groupMatch({data:n,opts:i}){function r(s){return s.filter(o=>o.type==="key").map(o=>o.property).join(";")}return([s])=>(i.groupByData===!1||s.data===n)&&s.opts.groupByKeys===i.groupByKeys&&s.opts.groupByFn===i.groupByFn&&r(s.opts.props)===r(i.props)}static mergeRequests(n){return n.reduce((i,d)=>{var{id:r,data:s,resolve:o,reject:a,opts:u}=d,m=u,{props:l}=m,c=al(m,["props"]);i.ids.push(r),i.rejects.push(a),i.resolves.push(o),i.data??(i.data=s),i.opts??(i.opts=St(ve({},c),{props:[]}));for(let f of l){let _=St(ve({},f),{scopes:[r]});Nx.createIdsMap(r,_);let x=i.opts.props.find(D=>D.type===_.type&&Nx.deepEqual(D,_));if(!x){i.opts.props.push(_);continue}x.scopes??(x.scopes=[]),x.scopes.push(..._.scopes??[]),(x.type==="key"||x.type==="value")&&_.idsMap?.size&&Nx.mergeIdsMap(_.idsMap,x.idsMap)}return i},{ids:[],rejects:[],resolves:[],data:null,opts:null})}static mergeIdsMap(n,i){for(let[r,s]of n){let o=i.get(r);if(o!=null)for(let a of s)o.add(a);else i.set(r,new Set(s))}}static createIdsMap(n,i){i.id!=null&&(i.idsMap??(i.idsMap=new Map),i.idsMap.has(n)?i.idsMap.get(n).add(i.id):i.idsMap.set(n,new Set([i.id])))}static deepEqual(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;let r,s;if(Array.isArray(n)){if(s=n.length,s!==i.length)return!1;for(r=s-1;r>=0;r--)if(!Nx.deepEqual(n[r],i[r]))return!1;return!0}let o=Object.keys(n);if(s=o.length,s!==Object.keys(i).length)return!1;for(r=s-1;r>=0;r--){let a=o[r];if(!Nx.skipKeys.has(a)&&(!Object.hasOwn(i,a)||!Nx.deepEqual(n[a],i[a])))return!1}return!0}return!1}};return t.skipKeys=new Set(["id","idsMap","type","scopes"]),t})(),Mnt=Z3i,X3i=class{constructor(){this.axesMap=new Map,this.hidden=new Set,this.themeTemplates=new Map}register(t,e){this.axesMap.set(t,e.moduleFactory),e.themeTemplate&&this.setThemeTemplate(t,e.themeTemplate),e.hidden&&this.hidden.add(t)}create(t,e){let n=this.axesMap.get(t);if(n)return n(e);throw new Error(`AG Charts - unknown axis type: ${t}`)}has(t){return this.axesMap.has(t)}keys(){return this.axesMap.keys()}publicKeys(){return[...this.keys()].filter(t=>!this.hidden.has(t))}setThemeTemplate(t,e){return this.themeTemplates.set(t,e),this}getThemeTemplate(t){return this.themeTemplates.get(t)}},Hx=new X3i,RR=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"]},{type:"root",optionsKey:"annotations",chartTypes:["cartesian"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"],optionsInnerKey:"image"},{type:"root",optionsKey:"foreground",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"],optionsInnerKey:"image"},{type:"root",optionsKey:"chartToolbar",chartTypes:["cartesian"]},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"]},{type:"root",optionsKey:"statusBar",chartTypes:["cartesian"],identifier:"status-bar"},{type:"root",optionsKey:"dataSource",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"]},{type:"root",optionsKey:"sync",chartTypes:["cartesian"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian","topology"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"],identifier:"gradient"},{type:"root",optionsKey:"navigator",chartTypes:["cartesian"],optionsInnerKey:"miniChart"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["cartesian"],identifier:"ordinal-time"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"candlestick"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"ohlc"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bullet"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-marker"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-shape-background"},{type:"series",optionsKey:"series[]",chartTypes:["topology"],identifier:"map-line-background"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"chord"},{type:"series",optionsKey:"series[]",chartTypes:["flow-proportion"],identifier:"sankey"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"}];a4i=class{constructor(){this.legendMap=new Map,this.themeTemplates=new Map}register(t,{optionsKey:e,moduleFactory:n,themeTemplate:i}){this.legendMap.set(t,{optionsKey:e,moduleFactory:n}),this.themeTemplates.set(e,i)}create(t,e){let n=this.legendMap.get(t)?.moduleFactory;if(n)return n(e);throw new Error(`AG Charts - unknown legend type: ${t}`)}getThemeTemplates(){return Object.fromEntries(this.themeTemplates)}getKeys(){return Array.from(this.legendMap.entries()).reduce((t,[e,n])=>(t[e]=n.optionsKey,t),{})}},y8e=new a4i,knt=class extends Map{get(t){return super.get(t)??"unknown"}isCartesian(t){return this.get(t)==="cartesian"}isPolar(t){return this.get(t)==="polar"}isHierarchy(t){return this.get(t)==="hierarchy"}isTopology(t){return this.get(t)==="topology"}isFlowProportion(t){return this.get(t)==="flow-proportion"}get seriesTypes(){return Array.from(this.keys())}get cartesianTypes(){return this.seriesTypes.filter(t=>this.isCartesian(t))}get polarTypes(){return this.seriesTypes.filter(t=>this.isPolar(t))}get hierarchyTypes(){return this.seriesTypes.filter(t=>this.isHierarchy(t))}get topologyTypes(){return this.seriesTypes.filter(t=>this.isTopology(t))}get flowProportionTypes(){return this.seriesTypes.filter(t=>this.isFlowProportion(t))}},l4i=class extends Map{set(t,e){return super.set(t,ql(e,this.get(t)))}},p1=new knt,Int=new knt,xCe=new l4i,c4i=class{constructor(){this.seriesMap=new Map,this.themeTemplates=new Map}register(t,{chartTypes:[e],moduleFactory:n,tooltipDefaults:i,defaultAxes:r,themeTemplate:s,paletteFactory:o,solo:a,stackable:l,groupable:c,stackedByDefault:d,swapDefaultAxesCondition:u,hidden:m}){this.setThemeTemplate(t,s),this.seriesMap.set(t,{moduleFactory:n,tooltipDefaults:i,defaultAxes:r,paletteFactory:o,solo:a,stackable:l,groupable:c,stackedByDefault:d,swapDefaultAxesCondition:u}),p1.set(t,e),m||Int.set(t,e)}create(t,e){let n=this.seriesMap.get(t)?.moduleFactory;if(n)return n(e);throw new Error(`AG Charts - unknown series type: ${t}`)}cloneDefaultAxes(t){let e=this.seriesMap.get(t)?.defaultAxes;return e?{axes:N0(e)}:null}setThemeTemplate(t,e){let n=this.themeTemplates.get(t);this.themeTemplates.set(t,ql(e,n))}getThemeTemplate(t){return this.themeTemplates.get(t)}getPaletteFactory(t){return this.seriesMap.get(t)?.paletteFactory}getTooltipDefauls(t){return this.seriesMap.get(t)?.tooltipDefaults}isSolo(t){return this.seriesMap.get(t)?.solo??!1}isGroupable(t){return this.seriesMap.get(t)?.groupable??!1}isStackable(t){return this.seriesMap.get(t)?.stackable??!1}isStackedByDefault(t){return this.seriesMap.get(t)?.stackedByDefault??!1}isDefaultAxisSwapNeeded(t){let e;for(let n of t.series??[]){let{type:i="line"}=n,r=this.seriesMap.get(i)?.swapDefaultAxesCondition?.(n);if(r!=null){if(e!=null&&e!=r)throw new Error("AG Charts - The provided series have incompatible directions");e=r}}return e}},w3=new c4i,_8e=class dE extends b2{constructor(e){super(),this.chart=e}subscribe(e=dE.DEFAULT_GROUP){let n=this.get(e);return n||(n=new Set,dE.chartsGroups.set(e,n)),n.add(this.chart),this}unsubscribe(e=dE.DEFAULT_GROUP){return this.get(e)?.delete(this.chart),this}getChart(){return this.chart}getGroup(e=dE.DEFAULT_GROUP){let n=this.get(e);return n?Array.from(n):[]}getGroupSiblings(e=dE.DEFAULT_GROUP){return this.getGroup(e).filter(n=>n!==this.chart)}get(e){return dE.chartsGroups.get(e)}};_8e.chartsGroups=new Map;_8e.DEFAULT_GROUP=Symbol("sync-group-default");d4i=_8e,Ant=class extends b2{constructor(){super(...arguments),this.axisZoomManagers=new Map,this.state=new _R(void 0,"initial"),this.rejectCallbacks=new Map}updateAxes(t){let e=new Map(t.map(n=>[n.id,this.axisZoomManagers.get(n.id)]));this.axisZoomManagers.clear();for(let n of t)this.axisZoomManagers.set(n.id,e.get(n.id)??new u4i(n));this.state.size>0&&t.length>0&&this.updateZoom(this.state.stateId(),this.state.stateValue())}updateZoom(t,e,n=!0,i){if(i&&this.rejectCallbacks.set(t,i),this.axisZoomManagers.size===0){let r=this.state.stateId();r==="initial"||r===t||n?(this.state.set(t,e),r!==t&&this.rejectCallbacks.get(r)?.(t)):i?.(r);return}this.state.set(t,e),this.axisZoomManagers.forEach(r=>{r.updateZoom(t,e?.[r.getDirection()])}),this.applyChanges(t)}updateAxisZoom(t,e,n){this.axisZoomManagers.get(e)?.updateZoom(t,n),this.applyChanges(t)}fireZoomPanStartEvent(t){this.listeners.dispatch("zoom-pan-start",{type:"zoom-pan-start",callerId:t})}getZoom(){let t,e;if(this.axisZoomManagers.forEach(n=>{n.getDirection()==="x"?t??(t=n.getZoom()):n.getDirection()==="y"&&(e??(e=n.getZoom()))}),t||e)return{x:t,y:e}}getAxisZoom(t){return this.axisZoomManagers.get(t)?.getZoom()??{min:0,max:1}}getAxisZooms(){let t={};for(let[e,n]of this.axisZoomManagers.entries())t[e]={direction:n.getDirection(),zoom:n.getZoom()};return t}applyChanges(t){if(!Array.from(this.axisZoomManagers.values(),i=>i.applyChanges()).some(Boolean))return;let n={};for(let[i,r]of this.axisZoomManagers.entries())n[i]=r.getZoom();this.listeners.dispatch("zoom-change",St(ve({type:"zoom-change"},this.getZoom()),{axes:n,callerId:t}))}},u4i=class{constructor(t){this.axis=t;let[e=0,n=1]=t.visibleRange;this.state=new _R({min:e,max:n}),this.currentZoom=this.state.stateValue()}getDirection(){return this.axis.direction}updateZoom(t,e){this.state.set(t,e)}getZoom(){return N0(this.state.stateValue())}applyChanges(){let t=this.currentZoom;return this.currentZoom=this.state.stateValue(),t.min!==this.currentZoom.min||t.max!==this.currentZoom.max}},C8e=class extends pl{constructor(){super(...arguments),this.enabled=!1}};Me([$e(Jo)],C8e.prototype,"enabled",2);Me([$e(wu)],C8e.prototype,"tabIndex",2);Pnt=["top","right","bottom","left"];m4i=["direction","xKey","yKey","sizeKey","angleKey","radiusKey","normalizedTo"];_4i=class extends r8e{applyOptions(t){for(let e of this.moduleMap.values())e.module.optionsKey in t&&eC(e.moduleInstance)&&e.moduleInstance.set(t[e.module.optionsKey])}*legends(){for(let{module:t,moduleInstance:e}of this.moduleMap.values())t.type==="legend"&&(yield{legendType:t.identifier,legend:e})}},bCe="ag-chart-overlay",Eet="ag-chart-dark-overlay",dG=class extends pl{constructor(t,e){super(),this.className=t,this.defaultMessageId=e}getText(t){return t.t(this.text??this.defaultMessageId)}getElement(t,e,n){if(this.content?.remove(),this.focusBox=n,this.renderer){let i=this.renderer();if(i instanceof HTMLElement)this.content=i;else{let r=Rm("div");r.innerHTML=i,this.content=r.firstElementChild}}else{let i=Rm("div",{display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"100%",margin:"8px",font:"12px Verdana, sans-serif"});i.innerText=this.getText(e),this.content=i,t?.animate({from:0,to:1,id:"overlay",phase:"add",groupId:"opacity",onUpdate(r){i.style.opacity=String(r)},onStop(){i.style.opacity="1"}})}return this.content}removeElement(t=()=>this.content?.remove(),e){if(this.content){if(e){let{content:n}=this;e.animate({from:1,to:0,phase:"remove",id:"overlay",groupId:"opacity",onUpdate(i){n.style.opacity=String(i)},onStop(){t?.()}})}else t?.();this.content=void 0,this.focusBox=void 0}}};Me([$e(Gr,{optional:!0})],dG.prototype,"text",2);Me([$e(k3,{optional:!0})],dG.prototype,"renderer",2);jG=class extends pl{constructor(){super(...arguments),this.darkTheme=!1,this.loading=new dG("ag-chart-loading-overlay","overlayLoadingData"),this.noData=new dG("ag-chart-no-data-overlay","overlayNoData"),this.noVisibleSeries=new dG("ag-chart-no-visible-series","overlayNoVisibleSeries")}getFocusInfo(t){for(let e of[this.loading,this.noData,this.noVisibleSeries])if(e.focusBox!==void 0)return{text:e.getText(t),rect:e.focusBox}}destroy(){this.loading.removeElement(),this.noData.removeElement(),this.noVisibleSeries.removeElement()}};Me([$e(Jo)],jG.prototype,"darkTheme",2);Me([$e(Us)],jG.prototype,"loading",2);Me([$e(Us)],jG.prototype,"noData",2);Me([$e(Us)],jG.prototype,"noVisibleSeries",2);KH=new WeakMap;Vnt={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let t=NaN;return(e=1/0,n)=>{let i=n.keys[0],r=Math.abs(i-t);return t=i,!isNaN(r)&&r>0&&r<e?r:e}}},Bnt={type:"reducer",property:"largestKeyInterval",initialValue:-1/0,reducer:()=>{let t=NaN;return(e=-1/0,n)=>{let i=n.keys[0],r=Math.abs(i-t);return t=i,!isNaN(r)&&r>0&&r>e?r:e}}},znt={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:t}})=>t?.slice().sort((e,n)=>{for(let i=0;i<e.length;i++){let r=e[i]-n[i];if(r!==0)return r}return 0})};Wnt=(t=>(t[t.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",t[t.NEAREST_BY_MAIN_AXIS_FIRST=1]="NEAREST_BY_MAIN_AXIS_FIRST",t[t.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",t[t.NEAREST_NODE=3]="NEAREST_NODE",t))(Wnt||{});$G=class{constructor(t,e,{datum:n},i){this.type=t,this.event=e,this.datum=n,this.seriesId=i.id}},D8e=class{constructor(t,e,n){this.series=t,this.seriesGrouping=e,this.oldGrouping=n,this.type="groupingChanged"}},KG=(()=>{let t=class extends Kit{constructor(e){super(),this.destroyFns=[],this.seriesGrouping=void 0,this.NodeEvent=$G,this.internalId=k6(this),this.rootGroup=new xo({name:"seriesRoot",isVirtual:!0}),this.axes={x:void 0,y:void 0},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new r8e,this._declarationOrder=-1,this.seriesListeners=new Ew,this._pickNodeCache=new a8e;let{moduleCtx:n,pickModes:i=[1],directionKeys:r={},directionNames:s={},contentGroupVirtual:o=!0,canHaveAxes:a=!1}=e;this.ctx=n,this.directionKeys=r,this.directionNames=s,this.canHaveAxes=a,this.contentGroup=this.rootGroup.appendChild(new xo({name:`${this.internalId}-content`,isVirtual:o,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new xo({name:`${this.internalId}-highlight`,isVirtual:o,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}),this.highlightNode=this.highlightGroup.appendChild(new xo({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new xo({name:"highlightLabel",zIndex:10})),this.pickModes=i,this.labelGroup=this.rootGroup.appendChild(new xo({name:`${this.internalId}-series-labels`,zIndex:8})),this.annotationGroup=new xo({name:`${this.id}-annotation`,isVirtual:o,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}get id(){return this.properties?.id??this.internalId}get type(){return this.constructor.type??""}get data(){return this._data??this._chartData}set visible(e){this.properties.visible=e,this.visibleMaybeChanged()}get visible(){return this.properties.visible}get hasData(){return this.data!=null&&this.data.length>0}get tooltipEnabled(){return this.properties.tooltip?.enabled??!1}onDataChange(){this.nodeDataRefresh=!0,this._pickNodeCache.clear()}setOptionsData(e){this._data=e,this.onDataChange()}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}onSeriesGroupingChange(e,n){let{internalId:i,type:r,visible:s}=this;e&&this.ctx.seriesStateManager.deregisterSeries({id:i,type:r}),n&&this.ctx.seriesStateManager.registerSeries({id:i,type:r,visible:s,seriesGrouping:n}),this.fireEvent(new D8e(this,n,e))}getBandScalePadding(){return{inner:1,outer:0}}getGroupZIndexSubOrder(e,n=0){let i=0;switch(e){case"data":case"paths":break;case"labels":i+=2e4;break;case"marker":i+=1e4;break;case"highlight":n+=15e3;break;case"annotation":i+=15e3;break}return[()=>this._declarationOrder+i,n]}addListener(e,n){return this.seriesListeners.addListener(e,n)}dispatch(e,n){this.seriesListeners.dispatch(e,n)}addChartEventListeners(){}destroy(){this.destroyFns.forEach(e=>e()),this.destroyFns=[],this.ctx.seriesStateManager.deregisterSeries(this)}getDirectionValues(e,n){let i=this.resolveKeyDirection(e),r=n?.[i],s=[];if(!r)return s;let o=(...a)=>{for(let l of a)Array.isArray(l)?o(...l):typeof l=="object"?o(...Object.values(l)):s.push(l)};return o(...r.map(a=>this.properties[a])),s}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getKeyProperties(e){return this.directionKeys[this.resolveKeyDirection(e)]??[]}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){let n=this.getSeriesDomain(e),i=this.moduleMap.mapModules(r=>r.getDomain(e));return n.concat(i.flat())}markNodeDataDirty(){this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.visibleMaybeChanged()}visibleMaybeChanged(){this.ctx.seriesStateManager.registerSeries(this)}getOpacity(){let{dimOpacity:n=1,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||n===1)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;case 2:default:return n}}getStrokeWidth(e){let{strokeWidth:n,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||n===void 0)return e;switch(this.isItemIdHighlighted()){case 1:return n;case 0:case 2:return e}}isItemIdHighlighted(){let e=this.ctx.highlightManager?.getActiveHighlight()?.series;return e==null?0:e!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapModules(e=>e.getTooltipParams()).reduce((e,n)=>Object.assign(e,n),{})}pickNode(e,n,i=!1){let{pickModes:r,visible:s,rootGroup:o}=this;if(!s||!o.visible||n==="highlight"&&!this.properties.highlight.enabled||n==="highlight-tooltip"&&!this.properties.highlight.enabled||n==="highlight"&&!this.properties.highlight.enabled)return;let a=1/0;if(n==="tooltip"||n==="highlight-tooltip"){let{tooltip:m}=this.properties;a=typeof m.range=="number"?m.range:1/0,i||(i=m.range==="exact")}else if(n==="event"){let{nodeClickRange:m}=this.properties;a=typeof m=="number"?m:1/0,i||(i=m==="exact")}let l=r.filter(m=>!i||m===0),{x:c,y:d}=e,u=JSON.stringify({x:c,y:d,maxDistance:a,selectedPickModes:l});if(this._pickNodeCache.has(u))return this._pickNodeCache.get(u);for(let m of l){let f;switch(m){case 0:f=this.pickNodeExactShape(e);break;case 1:case 2:f=this.pickNodeMainAxisFirst(e,m===2);break;case 3:f=this.pickNodeClosestDatum(e);break}if(f&&f.distance<=a)return this._pickNodeCache.set(u,{pickMode:m,match:f.datum,distance:f.distance})}return this._pickNodeCache.set(u,void 0)}pickNodeExactShape(e){let n=this.contentGroup.pickNode(e.x,e.y);if(n&&n.datum.missing!==!0)return{datum:n.datum,distance:0}}pickNodeClosestDatum(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeNearestDistantObject(e,n){let i=gte(e.x,e.y,n);if(i.nearest!==void 0&&i.nearest.datum.missing!==!0)return{datum:i.nearest.datum,distance:Math.sqrt(i.distanceSquared)}}pickNodeMainAxisFirst(e,n){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,n){this.fireEvent(new this.NodeEvent("nodeClick",e,n,this))}fireNodeDoubleClickEvent(e,n){this.fireEvent(new this.NodeEvent("nodeDoubleClick",e,n,this))}createNodeContextMenuActionEvent(e,n){return new this.NodeEvent("nodeContextMenuAction",e,n,this)}toggleSeriesItem(e,n){this.visible=n,this.nodeDataRefresh=!0,this._pickNodeCache.clear(),this.dispatch("visibility-changed",{itemId:e,enabled:n})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return St(ve({},this.ctx),{series:this})}getLabelText(e,n,i=String){return e.formatter?this.ctx.callbackCache.call(e.formatter,ve({seriesId:this.id},n))??i(n.value):i(n.value)}getMarkerStyle(e,n,i=e.getStyle()){let r={size:n.datum.point?.size??0},s=ql(r,i);if(e.itemStyler){let o=this.ctx.callbackCache.call(e.itemStyler,St(ve(ve({seriesId:this.id},s),n),{datum:n.datum.datum}));return ql(o,s)}return s}updateMarkerStyle(e,n,i,r=n.getStyle(),{applyTranslation:s=!0}={}){let{point:o}=i.datum,a=this.getMarkerStyle(n,i,r),l=this.visible&&a.size>0&&o&&!isNaN(o.x)&&!isNaN(o.y);s?e.setProperties(St(ve({visible:l},a),{translationX:o?.x,translationY:o?.y})):e.setProperties(ve({visible:l},a)),typeof n.shape=="function"&&!e.dirtyPath&&(e.path.clear(!0),e.updatePath(),e.checkPathDirty())}getMinRects(e,n){}get nodeDataDependencies(){return this._nodeDataDependencies??{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(e){let{width:n,height:i}=e??{width:NaN,height:NaN},r=e?{seriesRectWidth:n,seriesRectHeight:i}:void 0,s=V4(this.nodeDataDependencies,r)!=null;return s&&(this._nodeDataDependencies=r,this.markNodeDataDirty()),s}pickFocus(e){}};return t.highlightedZIndex=1e12,t})();Me([Fg({changeValue:function(t,e){this.onSeriesGroupingChange(e,t)}})],KG.prototype,"seriesGrouping",2);I4i=class extends b2{constructor(t,e,n){super(),this.id=t,this.chart=e,this.ctx=n,this.series=[];let i=this.ctx.regionManager.getRegion("series"),r=this.ctx.regionManager.getRegion("horizontal-axes"),s=this.ctx.regionManager.getRegion("vertical-axes");this.destroyFns.push(this.ctx.regionManager.listenAll("click",o=>this.onClick(o)),this.ctx.regionManager.listenAll("dblclick",o=>this.onClick(o)),this.ctx.layoutService.addListener("layout-complete",o=>this.layoutComplete(o)),i.addListener("hover",o=>this.onHover(o)),i.addListener("leave",()=>this.onLeave()),r.addListener("leave",()=>this.onLeave()),s.addListener("leave",()=>this.onLeave()))}seriesChanged(t){this.series=t}dataChanged(){this.lastHover=void 0}preSceneRender(){this.lastHover&&this.onHover(this.lastHover)}update(t,e){this.ctx.updateService.update(t,e)}layoutComplete(t){this.seriesRect=t.series.paddedRect}onLeave(){this.lastHover=void 0,this.ctx.cursorManager.updateCursor(this.id)}onHover({offsetX:t,offsetY:e}){let n=CR(this.series,{x:t,y:e},"event");n?.series.hasEventListener("nodeClick")||n?.series.hasEventListener("nodeDoubleClick")?this.ctx.cursorManager.updateCursor(this.id,"pointer"):this.ctx.cursorManager.updateCursor(this.id)}onClick(t){if(this.seriesRect?.containsPoint(t.offsetX,t.offsetY)&&this.checkSeriesNodeClick(t)){this.update(4),t.preventDefault();return}let e={type:t.type==="click"?"click":"doubleClick",event:t.sourceEvent};this.chart.fireEvent(e)}checkSeriesNodeClick(t){let e=CR(this.series,{x:t.offsetX,y:t.offsetY},"event");return e==null?!1:t.type==="click"?(e.series.fireNodeClickEvent(t.sourceEvent,e.datum),!0):t.type==="dblclick"?(t.preventZoomDblClick=e.distance===0,e.series.fireNodeDoubleClickEvent(t.sourceEvent,e.datum),!0):!1}};R4i=class extends b2{constructor(t,e,n,i,r){super(),this.id=t,this.chart=e,this.ctx=n,this.chartType=i,this.overlays=r,this.series=[],this.focus={hasFocus:!1,series:void 0,seriesIndex:0,datumIndex:0,datum:void 0};let s=this.ctx.regionManager.getRegion("series");this.destroyFns.push(this.ctx.layoutService.addListener("layout-complete",o=>this.layoutComplete(o)),this.ctx.animationManager.addListener("animation-start",()=>this.onAnimationStart()),s.addListener("blur",()=>this.onBlur()),s.addListener("tab",o=>this.onTab(o)),s.addListener("nav-vert",o=>this.onNavVert(o)),s.addListener("nav-hori",o=>this.onNavHori(o)),s.addListener("submit",o=>this.onSubmit(o)),this.ctx.keyNavManager.addListener("browserfocus",o=>this.onBrowserFocus(o)),this.ctx.zoomManager.addListener("zoom-change",()=>{this.ctx.focusIndicator.updateBounds(void 0)}))}seriesChanged(t){this.series=t,this.onBlur()}dataChanged(){this.ctx.focusIndicator.updateBounds(void 0)}preSceneRender(){this.refreshFocus()}layoutComplete(t){this.seriesRect=t.series.rect}refreshFocus(){this.focus.hasFocus&&this.handleSeriesFocus(0,0)}onTab(t){this.handleFocus(0,0),t.preventDefault(),this.focus.hasFocus=!0}onNavVert(t){this.focus.seriesIndex+=t.delta,this.handleFocus(t.delta,0),t.preventDefault()}onNavHori(t){this.focus.datumIndex+=t.delta,this.handleFocus(0,t.delta),t.preventDefault()}onBrowserFocus(t){t.delta>0?(this.focus.datum=void 0,this.focus.series=void 0,this.focus.datumIndex=0,this.focus.seriesIndex=0):t.delta<0&&(this.focus.datum=void 0,this.focus.series=void 0,this.focus.datumIndex=1/0,this.focus.seriesIndex=1/0)}onAnimationStart(){this.focus.hasFocus&&this.onBlur()}onBlur(){this.ctx.focusIndicator.updateBounds(void 0),this.focus.hasFocus=!1}handleFocus(t,e){this.focus.hasFocus=!0;let n=this.overlays.getFocusInfo(this.ctx.localeManager);n==null?this.handleSeriesFocus(t,e):(this.ctx.focusIndicator.updateBounds(n.rect),this.ctx.ariaAnnouncementService.announceValue(n.text))}handleSeriesFocus(t,e){if(this.chartType==="hierarchy"){this.handleHierarchySeriesFocus(t,e);return}let{focus:n,seriesRect:i,series:r}=this,s=r.filter(c=>c.visible);if(s.length===0)return;n.seriesIndex=Wa(0,n.seriesIndex,s.length-1),n.series=s[n.seriesIndex];let{datumIndex:o,seriesIndex:a}=n,l=n.series.pickFocus({datumIndex:o,datumIndexDelta:e,otherIndex:a,otherIndexDelta:t,seriesRect:i});this.updatePickedFocus(l)}handleHierarchySeriesFocus(t,e){this.focus.series=this.series[0];let{focus:{series:n,seriesIndex:i,datumIndex:r},seriesRect:s}=this;if(n===void 0)return;let o=n.pickFocus({datumIndex:r,datumIndexDelta:e,otherIndex:i,otherIndexDelta:t,seriesRect:s});this.updatePickedFocus(o)}updatePickedFocus(t){let{focus:e}=this;if(t===void 0||e.series===void 0)return;let{datum:n,datumIndex:i}=t;e.datumIndex=i,e.datum=n;let r=Knt(this.ctx.focusIndicator,t);if(r!==void 0){let s=e.series.getTooltipHtml(n),o=Ote.makeTooltipMeta(r,n),a=this.getDatumAriaText(n,s);this.ctx.highlightManager.updateHighlight(this.id,n),this.ctx.tooltipManager.updateTooltip(this.id,o,s),this.ctx.ariaAnnouncementService.announceValue("ariaAnnounceHoverDatum",{datum:a})}}onSubmit(t){let{series:e,datum:n}=this.focus,i=t.sourceEvent.sourceEvent;e!==void 0&&n!==void 0?e.fireNodeClickEvent(i,n):this.chart.fireEvent({type:"click",event:i}),t.preventDefault()}getDatumAriaText(t,e){let n=e.ariaLabel;return t.series.getDatumAriaText?.(t,n)??n}},F4i=class extends b2{constructor(t,e,n,i){super(),this.id=t,this.chart=e,this.ctx=n,this.highlight=i,this.series=[],this.hoverScheduler=Yit(()=>{if(this.pendingHoverEvent){if(this.chart.performUpdateType<=4){this.hoverScheduler.schedule();return}this.handleHover(!1)}});let r=this.ctx.regionManager.getRegion("series"),s=this.ctx.regionManager.getRegion("horizontal-axes"),o=this.ctx.regionManager.getRegion("vertical-axes"),a=20;this.destroyFns.push(this.ctx.layoutService.addListener("layout-complete",l=>this.layoutComplete(l)),this.ctx.highlightManager.addListener("highlight-change",l=>this.changeHighlightDatum(l)),r.addListener("hover",l=>this.onHover(l),a),r.addListener("drag",l=>this.onHover(l),a),s.addListener("hover",l=>this.onHover(l)),o.addListener("hover",l=>this.onHover(l)),this.ctx.domManager.addListener("resize",()=>this.clearHighlight()),r.addListener("leave",()=>this.clearHighlight(),a),r.addListener("blur",()=>this.clearHighlight()),this.ctx.animationManager.addListener("animation-start",()=>this.clearHighlight()),this.ctx.zoomManager.addListener("zoom-pan-start",()=>this.clearHighlight()),this.ctx.zoomManager.addListener("zoom-change",()=>this.clearHighlight()))}seriesChanged(t){this.series=t}dataChanged(){this.stashedHoverEvent??(this.stashedHoverEvent=this.appliedHoverEvent),this.clearHighlight()}preSceneRender(){this.stashedHoverEvent!=null&&(this.pendingHoverEvent=this.stashedHoverEvent,this.stashedHoverEvent=void 0,this.handleHover(!0))}update(t,e){this.ctx.updateService.update(t,e)}layoutComplete(t){this.hoverRect=t.series.paddedRect}clearHighlight(){this.pendingHoverEvent=void 0,this.appliedHoverEvent=void 0,this.ctx.highlightManager.updateHighlight(this.id)}onHover(t){this.pendingHoverEvent=t,this.hoverScheduler.schedule()}handleHover(t){this.appliedHoverEvent=this.pendingHoverEvent,this.pendingHoverEvent=void 0;let e=this.appliedHoverEvent;if(!e)return;let n=this.ctx.interactionManager.getState();if(n!==16&&n!==4)return;let{offsetX:i,offsetY:r}=e;if(t?this.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(i,r)){this.clearHighlight();return}let{range:s}=this.highlight,o=s==="tooltip"?"highlight-tooltip":"highlight",a=CR(this.series,{x:e.offsetX,y:e.offsetY},o);if(a){this.ctx.highlightManager.updateHighlight(this.id,a.datum);return}this.ctx.highlightManager.updateHighlight(this.id)}changeHighlightDatum(t){let e=new Set,{series:n=void 0,datum:i}=t.currentHighlight??{},{series:r=void 0,datum:s}=t.previousHighlight??{};r&&e.add(r),n&&e.add(n),r?.properties.cursor&&s&&this.ctx.cursorManager.updateCursor(r.id),n?.properties.cursor&&n?.properties.cursor!=="default"&&i&&this.ctx.cursorManager.updateCursor(n.id,n.properties.cursor),n==null||r==null?this.update(4):this.update(4,{seriesToUpdate:e})}},L4i=class extends b2{constructor(t,e,n,i){super(),this.id=t,this.chart=e,this.ctx=n,this.tooltip=i,this.series=[],this.hoverScheduler=Yit(()=>{if(this.lastHover){if(this.chart.performUpdateType<=4){this.hoverScheduler.schedule();return}this.handleHover(this.lastHover,!1)}});let r=this.ctx.regionManager.getRegion("series"),s=this.ctx.regionManager.getRegion("horizontal-axes"),o=this.ctx.regionManager.getRegion("vertical-axes");this.destroyFns.push(this.ctx.layoutService.addListener("layout-complete",a=>this.layoutComplete(a)),r.addListener("hover",a=>this.onHover(a),20),s.addListener("hover",a=>this.onHover(a)),o.addListener("hover",a=>this.onHover(a)),r.addListener("leave",()=>this.clearTooltip()),r.addListener("blur",()=>this.clearTooltip()),r.addListener("contextmenu",()=>this.clearTooltip(),31),s.addListener("leave",()=>this.clearTooltip()),o.addListener("leave",()=>this.clearTooltip()),this.ctx.animationManager.addListener("animation-start",()=>this.clearTooltip()),this.ctx.domManager.addListener("resize",()=>this.clearTooltip()),this.ctx.zoomManager.addListener("zoom-pan-start",()=>this.clearTooltip()),this.ctx.zoomManager.addListener("zoom-change",()=>this.clearTooltip()))}seriesChanged(t){this.series=t}dataChanged(){this.ctx.tooltipManager.removeTooltip(this.id)}preSceneRender(){this.lastHover!=null&&this.handleHover(this.lastHover,!0)}layoutComplete(t){this.hoverRect=t.series.paddedRect}onHover(t){this.lastHover=t,this.hoverScheduler.schedule()}clearTooltip(){this.ctx.tooltipManager.removeTooltip(this.id),this.lastHover=void 0}handleHover(t,e){let n=this.ctx.interactionManager.getState();if(n!==16&&n!==4)return;let{offsetX:i,offsetY:r,targetElement:s}=t;if(e?this.ctx.animationManager.isActive():!this.hoverRect?.containsPoint(i,r)){this.clearTooltip();return}if(s&&this.tooltip.interactive&&this.ctx.domManager.isManagedChildDOMElement(s,"canvas-overlay",Z5))return;let o=CR(this.series,{x:i,y:r},"tooltip");if(!o){this.clearTooltip();return}let a=o.series.getTooltipHtml(o.datum);if(this.tooltip.enabled&&o.series.tooltipEnabled&&a!=null){let d=Ote.makeTooltipMeta(t,o.datum);this.ctx.tooltipManager.updateTooltip(this.id,d,a)}}},O4i=class extends b2{constructor(t,e,n,i,r,s){super(),this.ctx=e,this.id=k6(this),this.series=[],this.subManagers=[new R4i(this.id,t,e,n,s),new F4i(this.id,t,e,r),new L4i(this.id,t,e,i),new I4i(this.id,t,e)];let o=this.ctx.regionManager.getRegion("series");this.destroyFns.push(()=>this.subManagers.forEach(a=>a.destroy()),o.addListener("contextmenu",a=>this.onContextMenu(a),31),this.ctx.updateService.addListener("pre-scene-render",()=>this.preSceneRender()))}dataChanged(){for(let t of this.subManagers)t.dataChanged?.()}preSceneRender(){for(let t of this.subManagers)t.preSceneRender?.()}seriesChanged(t){this.series=t;for(let e of this.subManagers)e.seriesChanged(t)}onContextMenu(t){let{Default:e,ContextMenu:n}=WG,i;if(this.ctx.interactionManager.getState()&(e|n)){let r=CR(this.series,{x:t.offsetX,y:t.offsetY},"context-menu");r&&(this.ctx.highlightManager.updateHighlight(this.id),i=r.datum)}this.ctx.contextMenuRegistry.dispatchContext("series",t,{pickedNode:i})}},Met=30,N4i=class{constructor(t,e,n){this.seriesRoot=t,this.highlightRoot=e,this.annotationRoot=n,this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal"}setSeriesCount(t){this.expectedSeriesCount=t}requestGroup(t){var e,n;let{internalId:i,type:r,rootGroup:s,highlightGroup:o,annotationGroup:a,seriesGrouping:l}=t,{groupIndex:c=i}=l??{};if(this.series[i]!=null)throw new Error(`AG Charts - series already has an allocated layer: ${this.series[i]}`);Object.keys(this.series).length===0&&(this.mode=this.expectedSeriesCount>=Met?"aggressive-grouping":"normal"),(e=this.groups)[r]??(e[r]={});let d=this.lookupIdx(c),u=this.groups[r][d];return u||(u=(n=this.groups[r])[d]??(n[d]={type:r,id:d,seriesIds:[],group:this.seriesRoot.appendChild(new xo({name:`${r}-content`,layer:!0,zIndex:4,zIndexSubOrder:t.getGroupZIndexSubOrder("data")})),highlight:this.highlightRoot.appendChild(new xo({name:`${r}-highlight`,zIndex:4,zIndexSubOrder:t.getGroupZIndexSubOrder("highlight")})),annotation:this.annotationRoot.appendChild(new xo({name:`${r}-annotation`,zIndex:4,zIndexSubOrder:t.getGroupZIndexSubOrder("annotation")}))})),this.series[i]={layerState:u,seriesConfig:t},u.seriesIds.push(i),u.group.appendChild(s),u.highlight.appendChild(o),u.annotation.appendChild(a),u.group}changeGroup(t){let{internalId:e,seriesGrouping:n,type:i,rootGroup:r,highlightGroup:s,annotationGroup:o,oldGrouping:a}=t,{groupIndex:l=e}=n??{};this.groups[i]?.[l]?.seriesIds.includes(e)||(this.series[e]!=null&&this.releaseGroup({internalId:e,seriesGrouping:a,type:i,rootGroup:r,highlightGroup:s,annotationGroup:o}),this.requestGroup(t))}releaseGroup(t){let{internalId:e,rootGroup:n,highlightGroup:i,annotationGroup:r,type:s}=t;if(this.series[e]==null)throw new Error(`AG Charts - series doesn't have an allocated layer: ${e}`);let o=this.series[e]?.layerState;if(o&&(o.seriesIds=o.seriesIds.filter(a=>a!==e),o.group.removeChild(n),o.highlight.removeChild(i),o.annotation.removeChild(r)),o?.seriesIds.length===0)this.seriesRoot.removeChild(o.group),this.highlightRoot.removeChild(o.highlight),this.annotationRoot.removeChild(o.annotation),delete this.groups[o.type][o.id],delete this.groups[s][e];else if(o?.seriesIds.length>0){let a=this.series[o?.seriesIds?.[0]]?.seriesConfig;o.group.zIndexSubOrder=a?.getGroupZIndexSubOrder("data"),o.highlight.zIndexSubOrder=a?.getGroupZIndexSubOrder("highlight"),o.annotation.zIndexSubOrder=a?.getGroupZIndexSubOrder("annotation")}delete this.series[e]}lookupIdx(t){return this.mode==="normal"?t:typeof t=="string"&&(t=Number(t.split("-").at(-1)),!t)?0:Math.floor(Wa(0,t/this.expectedSeriesCount,1)*Met)}destroy(){for(let t of Object.values(this.groups))for(let e of Object.values(t))this.seriesRoot.removeChild(e.group),this.highlightRoot.removeChild(e.highlight),this.annotationRoot.removeChild(e.annotation);this.groups={},this.series={}}},V4i=class{constructor(t,e){this.chartLike=t,this.layoutService=e,this.destroyFns=[],this.destroyFns.push(this.layoutService.addListener("start-layout",n=>this.positionPadding(n)),this.layoutService.addListener("layout-complete",n=>this.alignCaptions(n)),this.layoutService.addListener("start-layout",n=>this.positionCaptions(n)))}destroy(){this.destroyFns.forEach(t=>t())}positionPadding(t){let{shrinkRect:e}=t,{padding:n}=this.chartLike;return e.shrink(n.left,"left"),e.shrink(n.top,"top"),e.shrink(n.right,"right"),e.shrink(n.bottom,"bottom"),St(ve({},t),{shrinkRect:e})}positionCaptions(t){let{shrinkRect:e,positions:n,padding:i}=t,{title:r,subtitle:s,footnote:o,titlePadding:a}=this.chartLike,l=e.clone().shrink(a),c=e.clone(),d=_=>{let x=e.height/10,D=_.lineHeight??_.fontSize*Gu.defaultLineHeightRatio,E=e.width,M=Math.max(D,x);_.computeTextWrap(E,M)},u=_=>_==="left"?l.x:_==="right"?l.x+l.width:(_!=="center"&&yr.error(`invalid textAlign value: ${_}`),l.x+l.width/2),m=(_,x)=>{let D=l.y;_.node.x=u(_.textAlign),_.node.y=D,_.node.textBaseline="top",d(_);let E=_.node.getBBox(),M=Math.ceil(E.y-D+E.height+x);return _.layoutStyle==="block"&&(c.shrink(M+2*a,"top"),l.shrink(M,"top")),E},f=(_,x)=>{let D=l.y+l.height;_.node.x=u(_.textAlign),_.node.y=D,_.node.textBaseline="bottom",d(_);let E=_.node.getBBox(),M=Math.ceil(D-E.y+x);return _.layoutStyle==="block"&&(c.shrink(M+2*a,"bottom"),l.shrink(M,"bottom")),E};if(r.node.visible=r.enabled,s.node.visible=s.enabled,o.node.visible=o.enabled,r.enabled){let{spacing:_=s.enabled?Vh.SMALL_PADDING:Vh.LARGE_PADDING}=r;n.title=m(r,_)}return s.enabled&&(n.subtitle=m(s,s.spacing??0)),o.enabled&&(n.footnote=f(o,o.spacing??0)),i.title=a,St(ve({},t),{shrinkRect:c,positions:n})}alignCaptions(t){let{rect:e}=t.series,{title:n,subtitle:i,footnote:r,titlePadding:s}=this.chartLike;for(let o of[n,i,r])if(o.layoutStyle==="overlay"){if(o.textAlign==="left")o.node.x=e.x+s;else if(o.textAlign==="right"){let a=o.node.getBBox();o.node.x=e.x+e.width-a.width-s}}}},B4i=class{constructor(t,e,n,i){this.chart=t,this.dataService=e,this.updateService=n,this.zoomManager=i,this.dirtyZoom=!1,this.dirtyDataSource=!1,this.lastAxisZooms=new Map,this.destroyFns=[],this.destroyFns.push(this.dataService.addListener("data-source-change",()=>this.onDataSourceChange()),this.dataService.addListener("data-load",()=>this.onDataLoad()),this.dataService.addListener("data-error",()=>this.onDataError()),this.updateService.addListener("update-complete",()=>this.onUpdateComplete()),this.zoomManager.addListener("zoom-change",()=>this.onZoomChange()))}destroy(){this.destroyFns.forEach(t=>t())}onDataLoad(){this.updateService.update(1)}onDataError(){this.updateService.update(3)}onDataSourceChange(){this.dirtyDataSource=!0}onUpdateComplete(){!this.dirtyZoom&&!this.dirtyDataSource||this.updateWindow().catch(t=>yr.errorOnce(t))}onZoomChange(){this.dirtyZoom=!0}updateWindow(){return O(this,null,function*(){if(!this.dataService.isLazy())return;let t=this.getValidAxis(),e,n=!0;if(t){let i=this.zoomManager.getAxisZoom(t.id);e=this.getAxisWindow(t,i),n=this.shouldRefresh(t,i)}this.dirtyZoom=!1,this.dirtyDataSource=!1,n&&this.dataService.load({windowStart:e?.min,windowEnd:e?.max})})}getValidAxis(){return this.chart.axes.find(t=>t.type==="time")}shouldRefresh(t,e){if(this.dirtyDataSource)return!0;if(!this.dirtyZoom)return!1;let n=this.lastAxisZooms.get(t.id);return n&&e.min===n.min&&e.max===n.max?!1:(this.lastAxisZooms.set(t.id,e),!0)}getAxisWindow(t,e){let n=t.scale.getDomain?.();if(!e||!n||n.length===0||isNaN(Number(n[0])))return;let i=Number(n[1])-Number(n[0]),r=new Date(Number(n[0])+i*e.min),s=new Date(Number(n[0])+i*e.max);return{min:r,max:s}}},z4i=class{constructor(t,e,n,i,r,s,o){this.chartLike=t,this.overlays=e,this.dataService=n,this.layoutService=i,this.localeManager=r,this.animationManager=s,this.domManager=o,this.destroyFns=[],this.overlayElem=this.domManager.addChild("canvas-overlay","overlay"),this.overlayElem.role="status",this.overlayElem.ariaAtomic="false",this.overlayElem.ariaLive="polite",this.overlayElem.classList.toggle(bCe),this.destroyFns.push(this.layoutService.addListener("layout-complete",a=>this.onLayoutComplete(a)))}destroy(){this.destroyFns.forEach(t=>t()),this.domManager.removeStyles("overlays"),this.domManager.removeChild("canvas-overlay","overlay")}onLayoutComplete({series:{rect:t}}){let e=this.dataService.isLoading(),n=this.chartLike.series.some(r=>r.hasData),i=this.chartLike.series.some(r=>r.visible);this.overlays.darkTheme?this.overlayElem.classList.add(Eet):this.overlayElem.classList.remove(Eet),this.overlayElem.style.left=`${t.x}px`,this.overlayElem.style.top=`${t.y}px`,this.overlayElem.style.width=`${t.width}px`,this.overlayElem.style.height=`${t.height}px`,this.toggleOverlay(this.overlays.loading,t,e),this.toggleOverlay(this.overlays.noData,t,!e&&!n),this.toggleOverlay(this.overlays.noVisibleSeries,t,n&&!i)}toggleOverlay(t,e,n){if(this.overlayElem.ariaHidden=(!n).toString(),n){let i=t.getElement(this.animationManager,this.localeManager,e);this.overlayElem.appendChild(i)}else t.removeElement(()=>{this.overlayElem.innerText="\xA0"},this.animationManager)}},r_=bu.create(!0,"opts"),E8e=class extends pl{constructor(){super(...arguments),this.padding=new Dw(0)}};Me([$e(Jo,{optional:!0})],E8e.prototype,"clip",2);Me([$e(Us)],E8e.prototype,"padding",2);n0=(()=>{let t=class Ynt extends Kit{constructor(n,i){var r;super(),this.id=k6(this),this.seriesRoot=new xo({name:`${this.id}-series-root`}),this.highlightRoot=new xo({name:`${this.id}-highlight-root`,layer:!0,zIndex:5,nonEmptyChildDerivedZIndex:!0}),this.annotationRoot=new xo({name:`${this.id}-annotation-root`,layer:!0,zIndex:10}),this.debug=bu.create(),this.extraDebugStats={},this.data=[],this._firstAutoSize=!0,this.padding=new Dw(20),this.titlePadding=0,this.seriesArea=new E8e,this.title=new Vh,this.subtitle=new Vh,this.footnote=new Vh,this.keyboard=new C8e,this.mode="standalone",this.destroyed=!1,this._skipSync=!1,this._destroyFns=[],this.chartAnimationPhase="initial",this.modulesManager=new _4i,this.zoomManager=new Ant,this.processors=[],this.queuedUserOptions=[],this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateSkipAnimations=!1,this.performUpdateType=7,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new o3i,this.updateRequestors={},this.performUpdateTrigger=a3i(_=>O(this,[_],function*({count:f}){this.destroyed||this.updateMutex.acquire(()=>O(this,null,function*(){try{yield this.performUpdate(f)}catch(x){yr.error("update error",x)}})).catch(x=>yr.errorOnce(x))})),this._performUpdateSplits={},this.axes=[],this.series=[],this.onSeriesNodeClick=f=>{let _=St(ve({},f),{type:"seriesNodeClick"});Object.defineProperty(_,"series",{enumerable:!1,get:()=>f.series}),this.fireEvent(_)},this.onSeriesNodeDoubleClick=f=>{let _=St(ve({},f),{type:"seriesNodeDoubleClick"});this.fireEvent(_)},this.seriesGroupingChanged=f=>{if(!(f instanceof D8e))return;let{series:_,seriesGrouping:x,oldGrouping:D}=f;_.rootGroup.parent!=null&&this.seriesLayerManager.changeGroup({internalId:_.internalId,type:_.type,rootGroup:_.rootGroup,highlightGroup:_.highlightGroup,annotationGroup:_.annotationGroup,getGroupZIndexSubOrder:E=>_.getGroupZIndexSubOrder(E),seriesGrouping:x,oldGrouping:D})},this.dataProcessListeners=new Set,this.chartOptions=n;let s=i?.scene,o=i?.container,a=new xo({name:"root"}),l=new xo({name:"titles",layer:!0,zIndex:8});a.visible=!1,a.append(l),a.append(this.seriesRoot),a.append(this.highlightRoot),a.append(this.annotationRoot),l.append(this.title.node),l.append(this.subtitle.node),l.append(this.footnote.node);let{overrideDevicePixelRatio:c}=n.specialOverrides;this.tooltip=new P6,this.seriesLayerManager=new N4i(this.seriesRoot,this.highlightRoot,this.annotationRoot);let d=this.ctx=new U3i(this,{scene:s,root:a,syncManager:new d4i(this),container:o,updateCallback:(f=0,_)=>this.update(f,_),updateMutex:this.updateMutex,overrideDevicePixelRatio:c});this._destroyFns.push(d.domManager.addListener("resize",()=>this.parentResize(d.domManager.containerSize))),this.overlays=new jG,(r=this.overlays.loading).renderer??(r.renderer=()=>C4i(this.overlays.loading.getText(d.localeManager),d.animationManager.defaultDuration)),this.processors=[new V4i(this,d.layoutService),new B4i(this,d.dataService,d.updateService,d.zoomManager),new z4i(this,this.overlays,d.dataService,d.layoutService,d.localeManager,d.animationManager,d.domManager)],this.highlight=new wnt,this.container=o;let u=this.getModuleContext();d.regionManager.addRegion("series",this.seriesRoot,this.ctx.axisManager.axisGridGroup),d.regionManager.addRegion("horizontal-axes"),d.regionManager.addRegion("vertical-axes");let m=this;this.seriesAreaManager=new O4i({fireEvent:this.fireEvent.bind(m),get performUpdateType(){return m.performUpdateType}},d,this.getChartType(),this.tooltip,this.highlight,this.overlays),d.regionManager.addRegion("root",a),this._destroyFns.push(d.dataService.addListener("data-load",f=>{this.data=f.data}),this.title.registerInteraction(u),this.subtitle.registerInteraction(u),this.footnote.registerInteraction(u),d.interactionManager.addListener("page-left",()=>this.destroy()),d.animationManager.addListener("animation-frame",()=>{this.update(6)}),d.zoomManager.addListener("zoom-change",()=>{this.series.map(_=>_.animationState?.transition("updateData"));let f=this.chartAnimationPhase!=="initial";this.update(3,{forceNodeDataRefresh:!0,skipAnimations:f})})),this.parentResize(d.domManager.containerSize)}static getInstance(n){return Ynt.chartsInstances.get(n)}get canvasElement(){return this.ctx.scene.canvas.element}download(n,i){this.ctx.scene.download(n,i)}getCanvasDataURL(n){return this.ctx.scene.getDataURL(n)}getOptions(){return this.queuedUserOptions.at(-1)??this.chartOptions.userOptions}getModuleContext(){return this.ctx}getCaptionText(){return[this.title,this.subtitle,this.footnote].filter(n=>n.enabled&&n.text).map(n=>n.text).join(". ")}getAriaLabel(){return this.ctx.localeManager.t("ariaAnnounceChart",{seriesCount:this.series.length})}resetAnimations(){this.chartAnimationPhase="initial";for(let n of this.series)n.resetAnimation(this.chartAnimationPhase);for(let n of this.axes)n.resetAnimation(this.chartAnimationPhase);this.animationRect=void 0,this.ctx.animationManager.reset()}skipAnimations(){this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0}destroy(n){if(this.destroyed)return;let i=n?.keepTransferableResources,r;return this.performUpdateType=7,this._destroyFns.forEach(s=>s()),this.processors.forEach(s=>s.destroy()),this.tooltip.destroy(this.ctx.domManager),this.overlays.destroy(),this.modulesManager.destroy(),i?(this.ctx.scene.strip(),r={container:this.container,scene:this.ctx.scene}):(this.ctx.scene.destroy(),this.container=void 0),this.destroySeries(this.series),this.seriesLayerManager.destroy(),this.axes.forEach(s=>s.destroy()),this.axes=[],this.animationRect=void 0,this.ctx.destroy(),this.zoomManager.destroy(),this.destroyed=!0,Object.freeze(this),r}requestFactoryUpdate(n){this.destroyed||(this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(()=>O(this,null,function*(){this.destroyed||(yield n(this),!this.destroyed&&this._pendingFactoryUpdatesCount--)})).catch(i=>yr.errorOnce(i)))}update(n=0,i){let{forceNodeDataRefresh:r=!1,skipAnimations:s,seriesToUpdate:o=this.series,newAnimationBatch:a}=i??{};r&&this.series.forEach(l=>l.markNodeDataDirty());for(let l of o)this.seriesToUpdate.add(l);if(s&&(this.ctx.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),a&&this.ctx.animationManager.isActive()&&(this._performUpdateSkipAnimations=!0),this._skipSync=i?.skipSync??!1,this.debug.check()){let l=new Error().stack??"<unknown>";l=l.replace(/\([^)]*/g,""),this.updateRequestors[l]=n}n<this.performUpdateType&&(this.performUpdateType=n,this.performUpdateTrigger.schedule(i?.backOffMs))}performUpdate(n){return O(this,null,function*(){let{performUpdateType:i,extraDebugStats:r,_performUpdateSplits:s,ctx:o}=this,a=[...this.seriesToUpdate];this.performUpdateType=7,this.seriesToUpdate.clear(),this.updateShortcutCount===0&&i<6&&(o.animationManager.startBatch(this._performUpdateSkipAnimations),o.animationManager.onBatchStop(()=>this.chartAnimationPhase="ready")),this.debug("Chart.performUpdate() - start",cG[i]);let l=performance.now();s.start??(s.start=l);let c=m=>{s[m]??(s[m]=0),s[m]+=performance.now()-l,l=performance.now()},d=!1;switch(i){case 0:this.updateDOM();case 1:yield this.updateData(),c("\u2B07\uFE0F");case 2:yield this.processData(),this.seriesAreaManager.dataChanged(),c("\u{1F3ED}");case 3:if(this.checkUpdateShortcut(3))break;if(!this.checkFirstAutoSize(a)){d=!0;break}yield this.processLayout(),c("\u2316");case 4:if(this.checkUpdateShortcut(4))break;let{seriesRect:m}=this;yield Promise.all(a.map(f=>f.update({seriesRect:m}))),c("\u{1F914}");case 5:if(this.checkUpdateShortcut(5))break;o.updateService.dispatchPreSceneRender(this.getMinRects()),c("\u2196");case 6:if(this.checkUpdateShortcut(6))break;o.animationManager.endBatch(),r.updateShortcutCount=this.updateShortcutCount,yield o.scene.render({debugSplitTimes:s,extraDebugStats:r,seriesRect:this.seriesRect}),this.extraDebugStats={};for(let f in s)delete s[f];this.ctx.domManager.incrementDataCounter("sceneRenders");case 7:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=!1,o.animationManager.endBatch()}d||o.updateService.dispatchUpdateComplete(this.getMinRects());let u=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round((u-s.start)*100)/100,count:n,performUpdateType:cG[i]})})}updateThemeClassName(){let{theme:n}=this.chartOptions.processedOptions,i="ag-charts-theme-",r=[`${i}default`,`${i}default-dark`],s=r[0],o=!1;typeof n=="string"?(s=n.replace("ag-",i),o=n.includes("-dark")):typeof n?.baseTheme=="string"&&(s=n.baseTheme.replace("ag-",i),o=n.baseTheme.includes("-dark")),r.includes(s)||(s=o?r[1]:r[0]),this.ctx.domManager.setThemeClass(s)}updateDOM(){this.updateThemeClassName();let{enabled:n,tabIndex:i}=this.keyboard;this.ctx.domManager.setTabIndex(n?i??0:-1),TE(this.ctx.scene.canvas.element,"role","img"),TE(this.ctx.scene.canvas.element,"aria-label",this.getAriaLabel())}checkUpdateShortcut(n){return this.updateShortcutCount>3?(yr.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=n?(this.updateShortcutCount++,!0):!1}checkFirstAutoSize(n){if(!(this.width!=null&&this.height!=null)){if(!this._lastAutoSize){let i=this._performUpdateNoRenderCount++,r=(i+1)**2*40;if(i<8)return this.update(3,{seriesToUpdate:n,backOffMs:r}),this.debug("Chart.checkFirstAutoSize() - backing off until first size update",r),!1;this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}}return this._performUpdateNoRenderCount=0,!0}onAxisChange(n,i){i==null&&n.length===0||this.ctx.axisManager.updateAxes(i??[],n)}onSeriesChange(n,i){let r=i?.filter(s=>!n.includes(s))??[];this.destroySeries(r),this.seriesLayerManager?.setSeriesCount(n.length);for(let s of n){if(i?.includes(s))continue;s.rootGroup.parent==null&&this.seriesLayerManager.requestGroup(s);let o=this;s.chart={get mode(){return o.mode},get isMiniChart(){return!1},get seriesRect(){return o.seriesRect},placeLabels(){return o.placeLabels()}},s.resetAnimation(this.chartAnimationPhase),this.addSeriesListeners(s),s.addChartEventListeners()}this.seriesAreaManager?.seriesChanged(n)}destroySeries(n){n?.forEach(i=>{i.removeEventListener("nodeClick",this.onSeriesNodeClick),i.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),i.removeEventListener("groupingChanged",this.seriesGroupingChanged),i.destroy(),this.seriesLayerManager.releaseGroup(i),i.chart=void 0})}addSeriesListeners(n){this.hasEventListener("seriesNodeClick")&&n.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&n.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),n.addEventListener("groupingChanged",this.seriesGroupingChanged)}updateAllSeriesListeners(){this.series.forEach(n=>{n.removeEventListener("nodeClick",this.onSeriesNodeClick),n.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),this.addSeriesListeners(n)})}assignSeriesToAxes(){this.axes.forEach(n=>{n.boundSeries=this.series.filter(i=>i.axes[n.direction]===n)})}assignAxesToSeries(){let n=s8e(this.axes,i=>i.direction);this.series.forEach(i=>{i.directions.forEach(r=>{let s=n[r];if(!s){yr.warnOnce(`no available axis for direction [${r}]; check series and axes configuration.`);return}let o=i.getKeys(r),a=s.find(l=>!l.keys.length||o.some(c=>l.keys.includes(c)));if(!a){yr.warnOnce(`no matching axis for direction [${r}] and keys [${o}]; check series and axes configuration.`);return}i.axes[r]=a})})}parentResize(n){if(n==null||this.width!=null&&this.height!=null)return;let{width:i,height:r}=n;if(i=Math.floor(i),r=Math.floor(r),i===0&&r===0)return;let[s=0,o=0]=this._lastAutoSize??[];s===i&&o===r||(this._lastAutoSize=[i,r],this.resize("SizeMonitor",{}))}resize(n,i){let{scene:r,animationManager:s}=this.ctx,{inWidth:o,inHeight:a,inMinWidth:l,inMinHeight:c}=i;this.ctx.domManager.setSizeOptions(l??this.minWidth,c??this.minHeight,o??this.width,a??this.height);let d=o??this.width??this._lastAutoSize?.[0],u=a??this.height??this._lastAutoSize?.[1];if(this.debug(`Chart.resize() from ${n}`,{width:d,height:u,stack:new Error().stack}),!(d==null||u==null||!Tc(d)||!Tc(u))&&r.resize(d,u)){s.reset();let m=!0;(this.width==null||this.height==null)&&this._firstAutoSize&&(m=!1,this._firstAutoSize=!1),this.update(3,{forceNodeDataRefresh:!0,skipAnimations:m})}}updateData(){return O(this,null,function*(){this.series.forEach(i=>i.setChartData(this.data));let n=this.modulesManager.mapModules(i=>i.updateData?.({data:this.data}));yield Promise.all(n)})}processData(){return O(this,null,function*(){if(this.series.some(s=>s.canHaveAxes)){this.assignAxesToSeries();let s=this.modulesManager.getModule("sync");s?.enabled?s.syncAxes(this._skipSync):this.assignSeriesToAxes()}let n=new Mnt(this.mode),i=this.series.map(s=>s.processData(n)),r=this.modulesManager.mapModules(s=>s.processData?.({dataController:n}));n.execute(),yield Promise.all([...i,...r]);for(let{legendType:s,legend:o}of this.modulesManager.legends())o.data=this.getLegendData(s,this.mode!=="integrated");this.dataProcessListeners.forEach(s=>s()),this.dataProcessListeners.clear()})}placeLabels(){let n=[],i=[];for(let d of this.series){if(!d.visible)continue;let u=d.getLabelData();Rgi(u?.[0])&&(i.push(u),n.push(d))}let{seriesRect:r}=this,{top:s,right:o,bottom:a,left:l}=this.seriesArea.padding,c=r&&i.length>0?Lgi(i,{x:-l,y:-s,width:r.width+l+o,height:r.height+s+a}):[];return new Map(c.map((d,u)=>[n[u],d]))}getLegendData(n,i){var r;let s=this.series.filter(a=>a.properties.showInLegend).flatMap(a=>a.getLegendData(n));if(i&&(a=>a.every(l=>l.legendType==="category"))(s)){let a={},l=new Map(this.series.map(c=>[c.id,c.type]));for(let{seriesId:c,symbols:[{marker:d}],label:u}of s){if(d.fill==null)continue;let m=l.get(c),f=a[m]??(a[m]={});f[r=u.text]??(f[r]=d.fill),f[u.text]!==d.fill&&yr.warnOnce(`legend item '${u.text}' has multiple fill colors, this may cause unexpected behaviour.`)}}return s}processLayout(){return O(this,null,function*(){let n=this.animationRect;yield this.performLayout(),n&&!this.animationRect?.equals(n)&&this.ctx.animationManager.skipCurrentBatch(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)})}performLayout(){return O(this,null,function*(){let{width:n,height:i}=this.ctx.scene,r={shrinkRect:new Os(0,0,n,i),positions:{},padding:{}};r=this.ctx.layoutService.dispatchPerformLayout("start-layout",r),r=this.ctx.layoutService.dispatchPerformLayout("before-series",r);for(let s of this.modulesManager.modules())s.performLayout!=null&&(r=yield s.performLayout(r));return r.shrinkRect})}waitForUpdate(n=1e4,i=!1){return O(this,null,function*(){let r=performance.now();for(this._pendingFactoryUpdatesCount>0&&(yield this.updateMutex.waitForClearAcquireQueue());this.performUpdateType!==7;){if(performance.now()-r>n){let s=`Chart.waitForUpdate() timeout of ${n} reached - first chart update taking too long.`;if(i)throw new Error(s);yr.warnOnce(s)}yield s3i(50)}yield this.updateMutex.waitForClearAcquireQueue()})}waitForDataProcess(n){return new Promise(i=>{this.dataProcessListeners.add(i),O4(n)&&setTimeout(()=>{this.dataProcessListeners.has(i)&&(this.dataProcessListeners.delete(i),i())},n)})}getMinRects(){let{width:n,height:i}=this.ctx.scene,r=this.series.map(u=>u.getMinRects(n,i)).filter(vG);if(r.length===0)return;let s=0,o=0,a=0,l=0;for(let{minRect:u,minVisibleRect:m}of r)s=Math.max(s,u.width),o=Math.max(o,u.height),a=Math.max(a,m.width),l=Math.max(l,m.height);let c=new Os(0,0,s,o),d=c.clone();return a>0&&l>0&&(d=new Os(0,0,a,l)),{minRect:c,minVisibleRect:d}}filterMiniChartSeries(n){return n?.filter(i=>i.showInMiniChart!==!1)}applyOptions(n){let r=n!==this.chartOptions?this.chartOptions.processedOptions:{},s=n.processedOptions,o=n.diffOptions(r);if(o==null)return;r_("Chart.applyOptions() - applying delta",o);let a=this.applyModules(s),l=["type","data","series","listeners","preset","theme","legend.listeners","navigator.miniChart.series","navigator.miniChart.label","locale.localeText","axes","topology","nodes","initialState"];o.listeners&&this.registerListeners(this,o.listeners),cR(this,o,{skip:l});let c=!1,d="no-op";o.series!=null&&(d=this.applySeries(this,o.series,r?.series),c=!0),d==="replaced"&&this.resetAnimations(),this.applyAxes(this,s,r,d,[],!0)&&(c=!0),o.data&&(this.data=o.data),o.legend?.listeners&&this.modulesManager.isEnabled("legend")&&Object.assign(this.legend.listeners,o.legend.listeners),o.listeners&&this.updateAllSeriesListeners(),o.locale?.localeText&&(this.modulesManager.getModule("locale").localeText=o.locale?.localeText),this.chartOptions=n;let u=this.modulesManager.getModule("navigator"),m=this.modulesManager.getModule("zoom");!u?.enabled&&!m?.enabled&&this.ctx.zoomManager.updateZoom("chart");let f=u?.miniChart,_=s.navigator?.miniChart?.series??s.series;f?.enabled===!0&&_!=null?this.applyMiniChartOptions(f,_,s,r):f?.enabled===!1&&(f.series=[],f.axes=[]),this.ctx.annotationManager.setAnnotationStyles(n.annotationThemes),c||(c=this.shouldForceNodeDataRefresh(o,d));let D=c||a?0:3;this.maybeResetAnimations(d),r_("Chart.applyOptions() - update type",cG[D],{seriesStatus:d,forceNodeDataRefresh:c}),this.update(D,{forceNodeDataRefresh:c,newAnimationBatch:!0}),o.initialState&&this.applyInitialState(n.userOptions.initialState)}applyInitialState(n){let{ctx:{annotationManager:i,stateManager:r}}=this;if(n?.annotations!=null){let s=n.annotations.map(o=>{let a=i.getAnnotationTypeStyles(o.type);return ql(o,a)});r.setState(i,s)}}maybeResetAnimations(n){if(this.mode==="standalone")switch(n){case"series-grouping-change":case"replaced":this.resetAnimations();break;default:}}shouldForceNodeDataRefresh(n,i){let r=!!n.data||i==="data-change"||i==="replaced",s=y8e.getKeys(),o=Object.values(s).some(l=>n[l]!=null),a=n.title!=null&&n.subtitle!=null;return r||o||a}applyMiniChartOptions(n,i,r,s){let o=s?.navigator?.miniChart?.series??s?.series,a=this.applySeries(n,this.filterMiniChartSeries(i),this.filterMiniChartSeries(o));this.applyAxes(n,r,s,a,["axes[].tick","axes[].thickness","axes[].title","axes[].crosshair","axes[].gridLine","axes[].label"]);let l=n.axes,c=l.find(d=>d.direction==="x");for(let d of l)d.gridLine.enabled=!1,d.label.enabled=d===c,d.tick.enabled=!1,d.interactionEnabled=!1;if(c!=null){let d=r.navigator?.miniChart,u=d?.label,m=d?.label?.interval;c.line.enabled=!1,c.label.set(oCe(u,["interval","rotation","minSpacing","autoRotate","autoRotateAngle"])),c.tick.set(oCe(m,["enabled","width","size","color","interval","step"]));let f=m?.step;f!=null&&(c.interval.step=f)}}applyModules(n){let{type:i}=this.constructor,r=!1;for(let s of gw.byType("root","legend")){let a=n[s.optionsKey]!=null&&s.chartTypes.includes(i);a!==this.modulesManager.isEnabled(s)&&(a?(this.modulesManager.addModule(s,l=>l.moduleFactory(this.getModuleContext())),s.type==="legend"&&this.modulesManager.getModule(s)?.attachLegend(this.ctx.scene),this[s.optionsKey]=this.modulesManager.getModule(s)):(this.modulesManager.removeModule(s),delete this[s.optionsKey]),r=!0)}return r}applySeries(n,i,r){if(!i)return"no-change";let s=f4i(n.series,i,r);if(s.status==="no-overlap")return r_(`Chart.applySeries() - creating new series instances, status: ${s.status}`,s),n.series=i.map(d=>this.createSeries(d)),"replaced";r_("Chart.applySeries() - matchResult",s);let o=[],a=!1,l=!1,c=!1;for(let d of s.changes)switch(l||(l=d.status==="series-grouping"),a||(a=d.diff?.data!=null),c||(c=d.status!=="no-op"),d.status){case"add":let u=this.createSeries(d.opts);o.push(u),r_("Chart.applySeries() - created new series",u);break;case"remove":r_(`Chart.applySeries() - removing series at previous idx ${d.idx}`,d.series);break;case"no-op":o.push(d.series),r_(`Chart.applySeries() - no change to series at previous idx ${d.idx}`,d.series);break;case"series-grouping":case"update":default:let{series:m,diff:f,idx:_}=d;r_(`Chart.applySeries() - applying series diff previous idx ${_}`,f,m),this.applySeriesValues(m,f),m.markNodeDataDirty(),o.push(m)}for(let d=0;d<o.length;d++)o[d]._declarationOrder=d;return r_("Chart.applySeries() - final series instances",o),n.series=o,l?"series-grouping-change":a?"data-change":c?"updated":"no-op"}applyAxes(n,i,r,s,o=[],a=!1){if(!("axes"in i)||!i.axes)return!1;o=["axes[].type",...o];let{axes:l}=i;if(!(s==="replaced")&&n.axes.length===l.length&&n.axes.every((m,f)=>m.type===l[f].type)&&vE(r))return n.axes.forEach((m,f)=>{let _=r.axes?.[f]??{},x=V4(_,l[f]);r_(`Chart.applyAxes() - applying axis diff idx ${f}`,x);let D=`axes[${f}]`;cR(m,x,{path:D,skip:o})}),!0;r_(`Chart.applyAxes() - creating new axes instances; seriesStatus: ${s}`),n.axes=this.createAxis(l,o);let u={x:[],y:[]};return n.axes.forEach(m=>u[m.direction].push(m.getRegionBBoxProvider())),a&&(this.ctx.regionManager.updateRegion("horizontal-axes",...u.x),this.ctx.regionManager.updateRegion("vertical-axes",...u.y)),!0}createSeries(n){let i=w3.create(n.type,this.getModuleContext());return this.applySeriesOptionModules(i,n),this.applySeriesValues(i,n),i}applySeriesOptionModules(n,i){let r=n.createModuleContext(),s=n.getModuleMap();for(let o of gw.byType("series-option"))o.optionsKey in i&&o.seriesTypes.includes(n.type)&&s.addModule(o,a=>a.moduleFactory(r))}applySeriesValues(n,i){let r=n.getModuleMap(),u=i,{type:s,data:o,listeners:a,seriesGrouping:l,showInMiniChart:c}=u,d=al(u,["type","data","listeners","seriesGrouping","showInMiniChart"]);for(let m of RR)if(m.type==="series-option"&&m.optionsKey in d){let f=r.getModule(m.optionsKey);if(f){let _=d[m.optionsKey];delete d[m.optionsKey],f.properties.set(_)}}n.properties.set(d),"data"in i&&n.setOptionsData(o),a&&this.registerListeners(n,a),"seriesGrouping"in i&&(l==null?n.seriesGrouping=void 0:n.seriesGrouping=ve(ve({},n.seriesGrouping),l))}createAxis(n,i){let r=[],s=this.getModuleContext();for(let o=0;o<n.length;o++){let a=n[o],l=Hx.create(a.type,s);this.applyAxisModules(l,a),cR(l,a,{path:`axes[${o}]`,skip:i}),r.push(l)}return p4i(r),r}applyAxisModules(n,i){let r=n.createModuleContext(),s=n.getModuleMap();for(let o of gw.byType("axis-option")){let a=i[o.optionsKey]!=null;a!==s.isEnabled(o)&&(a?(s.addModule(o,l=>l.moduleFactory(r)),n[o.optionsKey]=s.getModule(o)):(s.removeModule(o),delete n[o.optionsKey]))}}registerListeners(n,i){n.clearEventListeners();for(let[r,s]of Object.entries(i))jx(s)&&n.addEventListener(r,s)}};return t.chartsInstances=new WeakMap,t})();Me([Fg({newValue(t){this.destroyed||(this.ctx.domManager.setContainer(t),n0.chartsInstances.set(t,this))},oldValue(t){n0.chartsInstances.delete(t)}})],n0.prototype,"container",2);Me([Fg({newValue(t){this.resize("width option",{inWidth:t})}})],n0.prototype,"width",2);Me([Fg({newValue(t){this.resize("height option",{inHeight:t})}})],n0.prototype,"height",2);Me([Fg({newValue(t){this.resize("minWidth option",{inMinWidth:t})}})],n0.prototype,"minWidth",2);Me([Fg({newValue(t){this.resize("minHeight option",{inMinHeight:t})}})],n0.prototype,"minHeight",2);Me([$e(Us)],n0.prototype,"padding",2);Me([$e(wu)],n0.prototype,"titlePadding",2);Me([$e(Us)],n0.prototype,"seriesArea",2);Me([$e(Us)],n0.prototype,"title",2);Me([$e(Us)],n0.prototype,"subtitle",2);Me([$e(Us)],n0.prototype,"footnote",2);Me([$e(Us)],n0.prototype,"keyboard",2);Me([$e(Su(["standalone","integrated"],"a chart mode"))],n0.prototype,"mode",2);Me([Fg({changeValue(t,e){this.onAxisChange(t,e)}})],n0.prototype,"axes",2);Me([Fg({changeValue(t,e){this.onSeriesChange(t,e)}})],n0.prototype,"series",2);LR=n0,H4i=class{constructor(t,e,n){this.root=new U4i(t,e,n)}clear(t){this.root.clear(t)}addValue(t,e){let n={hitTester:t,value:e,distanceSquared:(i,r)=>t.distanceSquared(i,r)};this.root.addElem(n)}find(t,e){let n={best:{nearest:void 0,distanceSquared:1/0}};return this.root.find(t,e,n),n.best}},G4i=class{constructor(t,e,n,i){this.nw=t,this.ne=e,this.sw=n,this.se=i}addElem(t){this.nw.addElem(t),this.ne.addElem(t),this.sw.addElem(t),this.se.addElem(t)}find(t,e,n){this.nw.find(t,e,n),this.ne.find(t,e,n),this.sw.find(t,e,n),this.se.find(t,e,n)}},W4i=class{constructor(t,e,n){this.capacity=t,this.maxdepth=e,this.boundary=n??Os.NaN,this.elems=[],this.subdivisions=void 0}clear(t){this.elems.length=0,this.boundary=t,this.subdivisions=void 0}addElem(t){this.addCondition(t)&&(this.subdivisions===void 0?this.maxdepth===0||this.elems.length<this.capacity?this.elems.push(t):this.subdivide(t):this.subdivisions.addElem(t))}find(t,e,n){this.findCondition(t,e,n)&&(this.subdivisions===void 0?this.findAction(t,e,n):this.subdivisions.find(t,e,n))}subdivide(t){this.subdivisions=this.makeSubdivisions();for(let e of this.elems)this.subdivisions.addElem(e);this.subdivisions.addElem(t),this.elems.length=0}makeSubdivisions(){let{x:t,y:e,width:n,height:i}=this.boundary,{capacity:r}=this,s=this.maxdepth-1,o=n/2,a=i/2,l=new Os(t,e,o,a),c=new Os(t+o,e,o,a),d=new Os(t,e+a,o,a),u=new Os(t+o,e+a,o,a);return new G4i(this.child(r,s,l),this.child(r,s,c),this.child(r,s,d),this.child(r,s,u))}},U4i=class qnt extends W4i{addCondition(e){let{x:n,y:i}=e.hitTester.midPoint;return this.boundary.containsPoint(n,i)}findCondition(e,n,i){let{best:r}=i;return r.distanceSquared!==0&&this.boundary.distanceSquared(e,n)<r.distanceSquared}findAction(e,n,i){let r=gte(e,n,this.elems,i.best.distanceSquared);r.nearest!==void 0&&r.distanceSquared<i.best.distanceSquared&&(i.best=r)}child(e,n,i){return new qnt(e,n,i)}},w2=(()=>{let t=class extends Og{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}computeBBox(){let{x:e,y:n,size:i}=this,{center:r}=this.constructor;return new Os(e-i*r.x,n-i*r.y,i,i)}computeTransformedBBox(){return super.computeTransformedBBox()}applyPath(e,n){let{path:i}=this,{x:r,y:s}=this;this.repeat!=null&&(r=0,s=0),i.clear();for(let{x:o,y:a,t:l}of n)r+=o*e,s+=a*e,l==="move"?i.moveTo(r,s):i.lineTo(r,s);i.closePath()}executeFill(e,n){if(!n)return;if(this.repeat==null)return super.executeFill(e,n);e.save();let i=this.translationX,r=this.translationY;for(let s of this.repeat)e.translate(s.x-i,s.y-r),e.fill(n),i=s.x,r=s.y;e.restore()}executeStroke(e,n){if(!n)return;if(this.repeat==null)return super.executeStroke(e,n);e.save();let i=this.translationX,r=this.translationY;for(let s of this.repeat)e.translate(s.x-i,s.y-r),e.stroke(n),i=s.x,r=s.y;e.restore()}};return t.center={x:.5,y:.5},t})();Me([va()],w2.prototype,"x",2);Me([va()],w2.prototype,"y",2);Me([va({convertor:Math.abs})],w2.prototype,"size",2);Me([va()],w2.prototype,"repeat",2);_E=(()=>{let t=class extends w2{updatePath(){let{x:e,y:n,path:i,size:r}=this,s=r/2;i.clear(),i.arc(e,n,s,0,Math.PI*2),i.closePath()}};return t.className="Circle",t})(),j4i=(()=>{let t=class Znt extends w2{updatePath(){let n=this.size/4.2;super.applyPath(n,Znt.moves)}};return t.className="Cross",t.moves=[{x:-1,y:0,t:"move"},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:-1,y:1},{x:-1,y:-1}],t})(),$4i=j4i,K4i=(()=>{let t=class Xnt extends w2{updatePath(){let n=this.size/2;super.applyPath(n,Xnt.moves)}};return t.className="Diamond",t.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}],t})(),Qnt=K4i,Y4i=(()=>{let t=class extends w2{rad(e){return e/180*Math.PI}updatePath(){let{x:e,path:n,size:i,rad:r}=this,s=i/4,o=this.y+s/2;n.clear(),n.arc(e-s,o-s,s,r(130),r(330)),n.arc(e+s,o-s,s,r(220),r(50)),n.lineTo(e,o+s),n.closePath()}};return t.className="Heart",t})(),q4i=(()=>{let t=class extends w2{updatePath(){let{path:e,x:n,y:i}=this,r=this.size,s=.5,o=1;e.clear(),e.moveTo(n+(.15625-s)*r,i+(.34375-o)*r),e.cubicCurveTo(n+(.15625-s)*r,i+(.151491-o)*r,n+(.307741-s)*r,i+(0-o)*r,n+(.5-s)*r,i+(0-o)*r),e.cubicCurveTo(n+(.692259-s)*r,i+(0-o)*r,n+(.84375-s)*r,i+(.151491-o)*r,n+(.84375-s)*r,i+(.34375-o)*r),e.cubicCurveTo(n+(.84375-s)*r,i+(.493824-o)*r,n+(.784625-s)*r,i+(.600181-o)*r,n+(.716461-s)*r,i+(.695393-o)*r),e.cubicCurveTo(n+(.699009-s)*r,i+(.719769-o)*r,n+(.681271-s)*r,i+(.743104-o)*r,n+(.663785-s)*r,i+(.766105-o)*r),e.cubicCurveTo(n+(.611893-s)*r,i+(.834367-o)*r,n+(.562228-s)*r,i+(.899699-o)*r,n+(.528896-s)*r,i+(.980648-o)*r),e.cubicCurveTo(n+(.524075-s)*r,i+(.992358-o)*r,n+(.512663-s)*r,i+(1-o)*r,n+(.5-s)*r,i+(1-o)*r),e.cubicCurveTo(n+(.487337-s)*r,i+(1-o)*r,n+(.475925-s)*r,i+(.992358-o)*r,n+(.471104-s)*r,i+(.980648-o)*r),e.cubicCurveTo(n+(.487337-s)*r,i+(1-o)*r,n+(.475925-s)*r,i+(.992358-o)*r,n+(.471104-s)*r,i+(.980648-o)*r),e.cubicCurveTo(n+(.437772-s)*r,i+(.899699-o)*r,n+(.388107-s)*r,i+(.834367-o)*r,n+(.336215-s)*r,i+(.766105-o)*r),e.cubicCurveTo(n+(.318729-s)*r,i+(.743104-o)*r,n+(.300991-s)*r,i+(.719769-o)*r,n+(.283539-s)*r,i+(.695393-o)*r),e.cubicCurveTo(n+(.215375-s)*r,i+(.600181-o)*r,n+(.15625-s)*r,i+(.493824-o)*r,n+(.15625-s)*r,i+(.34375-o)*r),e.closePath()}};return t.className="MapPin",t.center={x:.5,y:1},t})(),Z4i=(()=>{let t=class Jnt extends w2{updatePath(){let n=this.size/3;super.applyPath(n,Jnt.moves)}};return t.className="Plus",t.moves=[{x:-.5,y:-.5,t:"move"},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:-1},{x:-1,y:0},{x:0,y:-1}],t})(),X4i=Z4i,ate=(()=>{let t=class extends w2{updatePath(){let{path:e,x:n,y:i}=this,r=this.size/2;e.clear(),e.moveTo(this.align(n-r),this.align(i-r)),e.lineTo(this.align(n+r),this.align(i-r)),e.lineTo(this.align(n+r),this.align(i+r)),e.lineTo(this.align(n-r),this.align(i+r)),e.closePath()}};return t.className="Square",t})(),Q4i=(()=>{let t=class extends w2{updatePath(){let{x:e,y:n,path:i,size:r}=this,s=5,o=r/2,a=Math.PI/2;i.clear();for(let l=0;l<s*2;l++){let c=l%2===0?r:o,d=l*Math.PI/s-a,u=e+Math.cos(d)*c,m=n+Math.sin(d)*c;i.lineTo(u,m)}i.closePath()}};return t.className="Star",t})(),J4i=(()=>{let t=class ert extends w2{updatePath(){let n=this.size*1.1;super.applyPath(n,ert.moves)}};return t.className="Triangle",t.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}],t})(),uR=J4i,trt={circle:_E,cross:$4i,diamond:Qnt,heart:Y4i,pin:q4i,plus:X4i,square:ate,star:Q4i,triangle:uR},evi=Object.keys(trt);M8e=class extends KG{constructor(){super(...arguments),this.showFocusBox=!0}getScaleInformation({xScale:t,yScale:e}){let n=Ud.is(t),i=Ud.is(e);return{isContinuousX:n,isContinuousY:i,xScaleType:t?.type,yScaleType:e?.type}}getModulePropertyDefinitions(){let t=this.axes.x?.scale,e=this.axes.y?.scale;return this.moduleMap.mapModules(n=>n.getPropertyDefinitions(this.getScaleInformation({xScale:t,yScale:e}))).flat()}requestDataModel(t,e,n){return O(this,null,function*(){n.props.push(...this.getModulePropertyDefinitions());let{dataModel:i,processedData:r}=yield t.request(this.id,e??[],n);return this.dataModel=i,this.processedData=r,this.dispatch("data-processed",{dataModel:i,processedData:r}),{dataModel:i,processedData:r}})}isProcessedDataAnimatable(){let t=this.processedData?.reduced?.animationValidation;if(!t)return!0;let{orderedKeys:e,uniqueKeys:n}=t;return e&&n}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}pickFocus(t){let e=this.getNodeData();if(e===void 0||e.length===0)return;let n=this.computeFocusDatumIndex(t,e);if(n===void 0)return;let{showFocusBox:i}=this,r=e[n],s=St(ve({},t),{datumIndex:n}),o=this.computeFocusBounds(s);if(o!==void 0)return{bounds:o,showFocusBox:i,datum:r,datumIndex:n}}computeFocusDatumIndex(t,e){let n=a=>{let{missing:l=!1,enabled:c=!0,focusable:d=!0}=e[a];return!l&&c&&d},i=a=>{for(;a>=0&&!n(a);)a--;return a===-1?void 0:a},r=a=>{for(;a<e.length&&!n(a);)a++;return a===e.length?void 0:a},s,o=Wa(0,t.datumIndex,e.length-1);return t.datumIndexDelta<0?s=i(o):t.datumIndexDelta>0?s=r(o):(s??(s=r(o)),s??(s=i(o))),s===void 0?t.datumIndexDelta===0?void 0:t.datumIndex-t.datumIndexDelta:s}},Zx=class extends pl{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}};Me([$e(kd,{optional:!0})],Zx.prototype,"fill",2);Me([$e(ud,{optional:!0})],Zx.prototype,"fillOpacity",2);Me([$e(kd,{optional:!0})],Zx.prototype,"stroke",2);Me([$e(Rr,{optional:!0})],Zx.prototype,"strokeWidth",2);Me([$e(ud,{optional:!0})],Zx.prototype,"strokeOpacity",2);Me([$e(Kx,{optional:!0})],Zx.prototype,"lineDash",2);Me([$e(Rr,{optional:!0})],Zx.prototype,"lineDashOffset",2);zte=class extends pl{};Me([$e(Rr,{optional:!0})],zte.prototype,"strokeWidth",2);Me([$e(ud,{optional:!0})],zte.prototype,"dimOpacity",2);Me([$e(Jo,{optional:!0})],zte.prototype,"enabled",2);nrt=class extends pl{constructor(){super(...arguments),this.color="black"}};Me([$e(kd,{optional:!0})],nrt.prototype,"color",2);k8e=class extends pl{constructor(){super(...arguments),this.enabled=!0}};Me([$e(Jo,{optional:!0})],k8e.prototype,"enabled",2);YG=class extends pl{constructor(){super(...arguments),this.item=new Zx,this.series=new zte,this.text=new nrt}};Me([$e(Us)],YG.prototype,"item",2);Me([$e(Us)],YG.prototype,"series",2);Me([$e(Us)],YG.prototype,"text",2);L6=class extends pl{constructor(){super(...arguments),this.visible=!0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlight=new k8e,this.highlightStyle=new YG}};Me([$e(Gr,{optional:!0})],L6.prototype,"id",2);Me([$e(Jo)],L6.prototype,"visible",2);Me([$e(Jo)],L6.prototype,"showInLegend",2);Me([$e(Gr)],L6.prototype,"cursor",2);Me([$e(Ete)],L6.prototype,"nodeClickRange",2);Me([$e(Us)],L6.prototype,"highlight",2);Me([$e(Us)],L6.prototype,"highlightStyle",2);RE={x:["xKey"],y:["yKey"]},FE={x:["xName"],y:["yName"]},I8e=class extends $G{constructor(t,e,n,i){super(t,e,n,i),this.xKey=i.properties.xKey,this.yKey=i.properties.yKey}},Xx=class extends L6{constructor(){super(...arguments),this.pickOutsideVisibleMinorAxis=!1}};Me([$e(Gr,{optional:!0})],Xx.prototype,"legendItemName",2);Me([$e(Jo,{optional:!0})],Xx.prototype,"pickOutsideVisibleMinorAxis",2);Mw=class extends M8e{constructor(u){var m=u,{pathsPerSeries:t=["path"],hasMarkers:e=!1,hasHighlightedLabels:n=!1,pathsZIndexSubOrderOffset:i=[],datumSelectionGarbageCollection:r=!0,markerSelectionGarbageCollection:s=!0,animationAlwaysUpdateSelections:o=!1,animationResetFns:a,directionKeys:l,directionNames:c}=m,d=al(m,["pathsPerSeries","hasMarkers","hasHighlightedLabels","pathsZIndexSubOrderOffset","datumSelectionGarbageCollection","markerSelectionGarbageCollection","animationAlwaysUpdateSelections","animationResetFns","directionKeys","directionNames"]);if(super(ve({directionKeys:l,directionNames:c,canHaveAxes:!0},d)),this.NodeEvent=I8e,this.dataNodeGroup=this.contentGroup.appendChild(new xo({name:`${this.id}-series-dataNodes`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.markerGroup=this.contentGroup.appendChild(new xo({name:`${this.id}-series-markers`,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("marker")})),this.labelGroup=this.contentGroup.appendChild(new xo({name:`${this.id}-series-labels`,zIndex:8,zIndexSubOrder:this.getGroupZIndexSubOrder("labels")})),this.labelSelection=Oh.select(this.labelGroup,Gu),this.highlightSelection=Oh.select(this.highlightNode,()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory()),this.highlightLabelSelection=Oh.select(this.highlightLabel,Gu),this.annotationSelections=new Set,this.minRectsCache={dirtyNodeData:!0},this.debug=bu.create(),!l||!c)throw new Error(`Unable to initialise series type ${this.type}`);this.opts={pathsPerSeries:t,hasMarkers:e,hasHighlightedLabels:n,pathsZIndexSubOrderOffset:i,directionKeys:l,directionNames:c,animationResetFns:a,animationAlwaysUpdateSelections:o,datumSelectionGarbageCollection:r,markerSelectionGarbageCollection:s},this.paths=[];for(let f=0;f<t.length;f++)this.paths[f]=new Og({name:`${this.id}-${t[f]}`}),this.paths[f].zIndex=4,this.paths[f].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",f),this.contentGroup.appendChild(this.paths[f]);this.datumSelection=Oh.select(this.dataNodeGroup,()=>this.nodeFactory(),r),this.markerSelection=Oh.select(this.markerGroup,()=>this.markerFactory(),s),this.animationState=new BG("empty",{empty:{update:{target:"ready",action:f=>this.animateEmptyUpdateReady(f)},reset:"empty",skip:"ready",disable:"disabled"},ready:{updateData:"waiting",clear:"clearing",highlight:f=>this.animateReadyHighlight(f),highlightMarkers:f=>this.animateReadyHighlightMarkers(f),resize:f=>this.animateReadyResize(f),reset:"empty",skip:"ready",disable:"disabled"},waiting:{update:{target:"ready",action:f=>this.animateWaitingUpdateReady(f)},reset:"empty",skip:"ready",disable:"disabled"},disabled:{update:f=>this.resetAllAnimation(f),reset:"empty"},clearing:{update:{target:"empty",action:f=>this.animateClearingUpdateEmpty(f)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData}getNodeData(){return this.contextNodeData?.nodeData}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"?this.animationState.transition("skip"):t==="disabled"&&this.animationState.transition("disable")}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",t=>this.onLegendItemClick(t)),this.ctx.chartEventManager.addListener("legend-item-double-click",t=>this.onLegendItemDoubleClick(t)))}destroy(){super.destroy(),this._contextNodeData=void 0}update(e){return O(this,arguments,function*({seriesRect:t}){let{visible:n,_contextNodeData:i}=this,s=this.ctx.highlightManager?.getActiveHighlight()?.series===this,o=this.checkResize(t),a=yield this.updateHighlightSelection(s);yield this.updateSelections(n),yield this.updateNodes(a,s,n);let l=this.getAnimationData(t,i);l&&(o&&this.animationState.transition("resize",l),this.animationState.transition("update",l))})}updateSelections(t){return O(this,null,function*(){var e;let n=!this.opts.animationAlwaysUpdateSelections&&this.ctx.animationManager.isSkipped();if(!(!t&&n)&&!(!this.nodeDataRefresh&&!this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this.markQuadtreeDirty(),this._contextNodeData=yield this.createNodeData();let i=this.isProcessedDataAnimatable();this._contextNodeData&&((e=this._contextNodeData).animationValid??(e.animationValid=i)),this.minRectsCache.dirtyNodeData=!0;let{dataModel:r,processedData:s}=this;r!==void 0&&s!==void 0&&this.dispatch("data-update",{dataModel:r,processedData:s})}yield this.updateSeriesSelections()}})}updateSeriesSelections(t){return O(this,null,function*(){let{datumSelection:e,labelSelection:n,markerSelection:i,paths:r}=this,s=this._contextNodeData;if(!s)return;let{nodeData:o,labelData:a,itemId:l}=s;yield this.updatePaths({seriesHighlighted:t,itemId:l,contextData:s,paths:r}),this.datumSelection=yield this.updateDatumSelection({nodeData:o,datumSelection:e}),this.labelSelection=yield this.updateLabelSelection({labelData:a,labelSelection:n}),this.opts.hasMarkers&&(this.markerSelection=yield this.updateMarkerSelection({nodeData:o,markerSelection:i}))})}markerFactory(){let t=iC();return new t}getGroupZIndexSubOrder(t,e=0){let n=super.getGroupZIndexSubOrder(t,e);if(t==="paths"){let[i]=n,r=this.opts.pathsZIndexSubOrderOffset[e]??0;n[0]=jx(i)?()=>Number(i())+r:Number(i)+r}return n}updateNodes(t,e,n){return O(this,null,function*(){let{highlightSelection:i,highlightLabelSelection:r,opts:{hasMarkers:s,hasHighlightedLabels:o}}=this,a=!this.ctx.animationManager.isSkipped(),l=this.visible&&this._contextNodeData!=null&&n;this.rootGroup.visible=a||l,this.contentGroup.visible=a||l,this.highlightGroup.visible=(a||l)&&e;let c=this.getOpacity();s?(yield this.updateMarkerNodes({markerSelection:i,isHighlight:!0}),this.animationState.transition("highlightMarkers",i)):(yield this.updateDatumNodes({datumSelection:i,isHighlight:!0}),this.animationState.transition("highlight",i)),o&&(yield this.updateLabelNodes({labelSelection:r}));let{dataNodeGroup:d,markerGroup:u,datumSelection:m,labelSelection:f,markerSelection:_,paths:x,labelGroup:D}=this,{itemId:E}=this.contextNodeData??{};d.opacity=c,d.visible=a||l,D.visible=l,s&&(u.opacity=c,u.zIndex=d.zIndex>=4?d.zIndex:d.zIndex+1,u.visible=l),D&&(D.opacity=c),yield this.updatePathNodes({seriesHighlighted:e,itemId:E,paths:x,opacity:c,visible:l,animationEnabled:a}),d.visible&&(yield this.updateDatumNodes({datumSelection:m,highlightedItems:t,isHighlight:!1}),yield this.updateLabelNodes({labelSelection:f}),s&&(yield this.updateMarkerNodes({markerSelection:_,isHighlight:!1})))})}getHighlightLabelData(t,e){let n=t.filter(i=>i.datum===e.datum&&i.itemId===e.itemId);return n.length===0?void 0:n}getHighlightData(t,e){return e?[e]:void 0}updateHighlightSelection(t){return O(this,null,function*(){let{highlightSelection:e,highlightLabelSelection:n,_contextNodeData:i}=this;if(!i)return;let r=this.ctx.highlightManager?.getActiveHighlight(),s=t&&r?.datum?r:void 0,o,a;if(s!=null){let l=this.isLabelEnabled(),{labelData:c,nodeData:d}=i;a=this.getHighlightData(d,s),o=l?this.getHighlightLabelData(c,s):void 0}return this.highlightSelection=yield this.updateHighlightSelectionItem({items:a,highlightSelection:e}),this.highlightLabelSelection=yield this.updateHighlightSelectionLabel({items:o,highlightLabelSelection:n}),a})}markQuadtreeDirty(){this.quadtree=void 0}*datumNodesIter(){for(let{node:t}of this.datumSelection)t.datum.missing!==!0&&(yield t)}getQuadTree(){if(this.quadtree===void 0){let{width:t,height:e}=this.ctx.scene.canvas,n=new Os(0,0,t,e);this.quadtree=new H4i(100,10,n),this.initQuadTree(this.quadtree)}return this.quadtree}initQuadTree(t){}pickNodeExactShape(t){let e=super.pickNodeExactShape(t);if(e)return e;let{x:n,y:i}=t,{opts:{hasMarkers:r}}=this,s,{dataNodeGroup:o,markerGroup:a}=this;if(s=o.pickNode(n,i),!s&&r&&(s=a?.pickNode(n,i)),s&&s.datum.missing!==!0)return{datum:s.datum,distance:0};for(let l of this.moduleMap.modules()){let{datum:c}=l.pickNodeExact(t)??{};if(c!=null&&c?.missing!==!0)return{datum:c,distance:0}}}pickNodeClosestDatum(t){let{x:e,y:n}=t,{axes:i,rootGroup:r,_contextNodeData:s}=this;if(!s)return;let o=i.x,a=i.y,l=r.transformPoint(e,n),c=1/0,d;for(let u of s.nodeData){let{point:{x:m=NaN,y:f=NaN}={}}=u;if(isNaN(m)||isNaN(f)||!(o?.inRange(m)&&a?.inRange(f)))continue;let x=Math.max((l.x-m)**2+(l.y-f)**2,0);x<c&&(c=x,d=u)}for(let u of this.moduleMap.modules()){let m=u.pickNodeNearest(t);if(m!==void 0&&m.distanceSquared<c){c=m.distanceSquared,d=m.datum;break}}if(d){let u=Math.max(Math.sqrt(c)-(d.point?.size??0),0);return{datum:d,distance:u}}}pickNodeMainAxisFirst(t,e){let{x:n,y:i}=t,{axes:r,rootGroup:s,_contextNodeData:o}=this,{pickOutsideVisibleMinorAxis:a}=this.properties;if(!o)return;let l=r.x,c=r.y,d=[l,c].filter(D=>D instanceof PR).map(D=>D.direction);if(e&&d.length===0)return;let[u="x"]=d,m=s.transformPoint(n,i),f=[m.x,m.y];u!=="x"&&f.reverse();let _=[1/0,1/0],x;for(let D of o.nodeData){let{x:E=NaN,y:M=NaN}=D.point??D.midPoint??{};if(isNaN(E)||isNaN(M)||D.missing===!0)continue;let I=[l?.inRange(E),c?.inRange(M)];if(u!=="x"&&I.reverse(),!I[0]||!a&&!I[1])continue;let z=[E,M];u!=="x"&&z.reverse();let G=!0;for(let A=0;A<z.length;A++){let Y=Math.abs(z[A]-f[A]);if(Y>_[A]){G=!1;break}Y<_[A]&&(_[A]=Y,_.fill(1/0,A+1,_.length))}G&&(x=D)}if(x){let D=Math.max(_[0]**2+_[1]**2-(x.point?.size??0),0);for(let E of this.moduleMap.modules()){let M=E.pickNodeMainAxisFirst(t);if(M!==void 0&&M.distanceSquared<D){x=M.datum,D=M.distanceSquared;break}}return{datum:x,distance:Math.sqrt(D)}}}onLegendItemClick(t){let{legendItemName:e}=this.properties,{enabled:n,itemId:i,series:r}=t,s=e!=null&&e===t.legendItemName;(r.id===this.id||s)&&this.toggleSeriesItem(i,n)}onLegendItemDoubleClick(t){let{enabled:e,itemId:n,series:i,numVisibleItems:r}=t,{legendItemName:s}=this.properties,o=s!=null&&s===t.legendItemName;i.id===this.id||o?this.toggleSeriesItem(n,!0):e&&r===1?this.toggleSeriesItem(n,!0):this.toggleSeriesItem(n,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRects(t,e){let{dirtyNodeData:n,sizeCache:i,minRect:r,minVisibleRect:s}=this.minRectsCache,o=JSON.stringify({width:t,height:e});if(!(o!==i)&&!n&&r&&s)return{minRect:r,minVisibleRect:s};let l=this.computeMinRects(t,e);return this.minRectsCache={dirtyNodeData:!1,sizeCache:o,minRect:l?.minRect,minVisibleRect:l?.minVisibleRect},l}computeMinRects(t,e){let n=this._contextNodeData;if(!n?.nodeData.length)return;let{nodeData:i}=n,r=Array(i.length),s=Array(i.length);for(let[M,{midPoint:I}]of i.entries())r[M]=I?.x??0,s[M]=I?.y??0;r.sort((M,I)=>M-I),s.sort((M,I)=>M-I);let o,a,l,c,d=0,u=0;for(let M=1;M<i.length;M++)r[M]>=0&&(o??(o=M)),r[M]>t&&(a??(a=M)),s[M]>=0&&(l??(l=M)),s[M]>e&&(c??(c=M)),d=Math.max(d,r[M]-r[M-1]),u=Math.max(u,s[M]-s[M-1]);a??(a=i.length),c??(c=i.length);let m=o!=null&&a!=null?r.slice(o,a):[],f=l!=null&&c!=null?s.slice(l,c):[],_=0,x=0;for(let M=1;M<Math.max(m.length,f.length);M++){let I=m[M],z=m[M-1],G=f[M],A=f[M-1];I!=null&&z!=null&&(_=Math.max(_,I-z)),G!=null&&A!=null&&(x=Math.max(x,G-A))}let D=new Os(0,0,d,u),E=new Os(0,0,_,x);return{minRect:D,minVisibleRect:E}}updateHighlightSelectionItem(t){let{opts:{hasMarkers:e}}=this,{items:n,highlightSelection:i}=t,r=n??[];if(e){let s=i;return this.updateMarkerSelection({nodeData:r,markerSelection:s})}else return this.updateDatumSelection({nodeData:r,datumSelection:i})}updateHighlightSelectionLabel(t){return this.updateLabelSelection({labelData:t.items??[],labelSelection:t.highlightLabelSelection})}updateDatumSelection(t){return O(this,null,function*(){return t.datumSelection})}updateDatumNodes(t){return O(this,null,function*(){})}updateMarkerSelection(t){return O(this,null,function*(){return t.markerSelection})}updateMarkerNodes(t){return O(this,null,function*(){})}updatePaths(t){return O(this,null,function*(){t.paths.forEach(e=>e.visible=!1)})}updatePathNodes(t){return O(this,null,function*(){let{paths:e,opacity:n,visible:i}=t;for(let r of e)r.opacity=n,r.visible=i})}resetPathAnimation(t){let{path:e}=this.opts?.animationResetFns??{};e&&t.paths.forEach(n=>{Ef([n],e)})}resetDatumAnimation(t){let{datum:e}=this.opts?.animationResetFns??{};e&&Ef([t.datumSelection],e)}resetLabelAnimation(t){let{label:e}=this.opts?.animationResetFns??{};e&&Ef([t.labelSelection],e)}resetMarkerAnimation(t){let{marker:e}=this.opts?.animationResetFns??{};e&&this.opts.hasMarkers&&Ef([t.markerSelection],e)}resetAllAnimation(t){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.resetPathAnimation(t),this.resetDatumAnimation(t),this.resetLabelAnimation(t),this.resetMarkerAnimation(t),t.contextData?.animationValid===!1&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){let{datum:e}=this.opts?.animationResetFns??{};e&&Ef([t],e)}animateReadyHighlightMarkers(t){let{marker:e}=this.opts?.animationResetFns??{};e&&Ef([t],e)}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animationTransitionClear(){let t=this.getAnimationData();t&&this.animationState.transition("clear",t)}getAnimationData(t,e){let{_contextNodeData:n}=this;return n?{datumSelection:this.datumSelection,markerSelection:this.markerSelection,labelSelection:this.labelSelection,annotationSelections:[...this.annotationSelections],contextData:n,previousContextData:e,paths:this.paths,seriesRect:t}:void 0}calculateScaling(){let t={};for(let e of Object.values(n8e)){let n=this.axes[e];if(n){if(n.scale instanceof o8e){let{range:i,domain:r}=n.scale;t[e]={type:"log",convert:s=>n.scale.convert(s),domain:[r[0],r[1]],range:[i[0],i[1]]}}else if(n.scale instanceof Ud){let{range:i}=n.scale,r=n.scale.getDomain();t[e]={type:"continuous",domain:[r[0],r[1]],range:[i[0],i[1]]}}else if(n.scale){let{domain:i}=n.scale;t[e]={type:"category",domain:i,range:i.map(r=>n.scale.convert(r))}}}}return t}},tvi=["top","right","bottom","left"],ivi=(()=>{let t=class e extends LR{constructor(n,i){super(n,i),this.paired=!0,this.firstSeriesTranslation=!0,this._lastCrossLineIds=void 0,this._lastAxisAreaWidths=new Map,this._lastClipSeries=!1,this._lastVisibility={crossLines:!0,series:!0}}onAxisChange(n,i){super.onAxisChange(n,i),this.zoomManager.updateAxes(n)}destroySeries(n){super.destroySeries(n),this.firstSeriesTranslation=!0}getChartType(){return"cartesian"}performLayout(){return O(this,null,function*(){let n=yield py(e.prototype,this,"performLayout").call(this),{firstSeriesTranslation:i,seriesRoot:r,annotationRoot:s,highlightRoot:o}=this,{animationRect:a,seriesRect:l,visibility:c,clipSeries:d}=this.updateAxes(n);this.seriesRoot.visible=c.series,this.seriesRect=l,this.animationRect=a;let{x:u,y:m}=l;if(i){for(let D of[r,s,o])D.translationX=Math.floor(u),D.translationY=Math.floor(m);this.firstSeriesTranslation=!1}else{let{translationX:D,translationY:E}=r;rC(this.id,"seriesRect",this.ctx.animationManager,[r,o,s],{translationX:D,translationY:E},{translationX:Math.floor(u),translationY:Math.floor(m)},{phase:"update"})}let f=l.clone().grow(this.seriesArea.padding),_=this.seriesArea.clip||d?f:void 0;r.setClipRectInGroupCoordinateSpace(_),o.setClipRectInGroupCoordinateSpace(_),s.setClipRectInGroupCoordinateSpace(_),this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:d,series:{rect:l,paddedRect:f,visible:c.series,shouldFlipXY:this.shouldFlipXY()},axes:this.axes.map(D=>D.getLayoutState())});let x=this.modulesManager.mapModules(D=>D.performCartesianLayout?.({seriesRect:l}));return yield Promise.all(x),n})}updateAxes(n){let i=this.axes.flatMap(M=>M.crossLines??[]).map(M=>M.id),r=this._lastCrossLineIds!=null&&this._lastCrossLineIds.length===i.length&&this._lastCrossLineIds.every((M,I)=>i[I]===M),s,o,a;r?(s=new Map(this._lastAxisAreaWidths.entries()),o=this._lastClipSeries,a=ve({},this._lastVisibility)):(s=new Map,o=!1,a={crossLines:!0,series:!0},this._lastCrossLineIds=i);let l=new Set(this.axes.map(M=>M.position));for(let M of s.keys())l.has(M)||s.delete(M);let c=(M,I,z)=>[...M.keys()].some(G=>!s.has(G))||a.crossLines!==z.crossLines||a.series!==z.series||o!==I?!1:[...s.entries()].every(([G,A])=>{let Y=M.get(G);return A!=null||Y!=null?A===Y:!0}),d=M=>{for(let[I,z]of M.entries()){if(z&&Math.abs(z)===1/0){M.set(I,0);continue}M.set(I,z!=null?Math.ceil(z):z)}return M},u=new Map,m={},f=!1,_=this.seriesRect?.clone(),x=0,D={};do{s=new Map(u.entries()),o=f,Object.assign(a,m);let M=this.updateAxesPass(s,n.clone(),_);if(u=d(M.axisAreaWidths),m=M.visibility,f=M.clipSeries,{seriesRect:_,primaryTickCounts:D}=M,x++>10){yr.warn("unable to find stable axis layout.");break}}while(!c(u,f,m));this.axes.forEach(M=>{M.update(D[M.direction])});let E=5;return this.axes.forEach(M=>{if(M.setCrossLinesVisible(a.crossLines),!!_)switch(M.clipGrid(_.x,_.y,_.width+E,_.height+E),M.position){case"left":case"right":M.clipTickLines(n.x,_.y,n.width+E,_.height+E);break;case"top":case"bottom":M.clipTickLines(_.x,n.y,_.width+E,n.height+E);break}}),this._lastAxisAreaWidths=s,this._lastVisibility=a,this._lastClipSeries=o,{seriesRect:_,animationRect:n,visibility:a,clipSeries:o}}updateAxesPass(n,i,r){let s=new Map,o=new Map,a={series:!0,crossLines:!0},l=!1,c={},d=this.applySeriesPadding(i),u=r?this.buildCrossLinePadding(n):{},m=this.buildAxisBound(d,n,u,a),f=this.buildSeriesRect(m,n);for(let D of this.axes){let{position:E="left"}=D,{clipSeries:M,axisThickness:I}=this.calculateAxisDimensions({axis:D,seriesRect:f,paddedBounds:d,primaryTickCounts:c,clipSeries:l});s.set(D.id,I),o.has(E)||o.set(E,[]),o.get(E)?.push(D),l=l||M}let _=new Map,x=new Map;for(let[D,E]of o.entries())_.set(D,this.calculateAxisArea(E,s,x));for(let[D,E]of o.entries())this.positionAxes({axes:E,position:D,axisWidths:s,axisOffsets:x,axisAreaWidths:_,axisBound:m,seriesRect:f});return{clipSeries:l,seriesRect:f,axisAreaWidths:_,visibility:a,primaryTickCounts:c}}buildCrossLinePadding(n){let i={};this.axes.forEach(r=>{r.crossLines?.forEach(s=>{s.calculatePadding?.(i)})});for(let[r,s=0]of Object.entries(i))i[r]=Math.max(s-(n.get(r)??0),0);return i}applySeriesPadding(n){let i=n.clone(),r=this.axes.slice().reverse();return tvi.forEach(s=>{let o=this.seriesArea.padding[s],a=r.find(l=>l.position===s);a?a.seriesAreaPadding=o:i.shrink(o,s)}),i}buildAxisBound(n,i,r,s){let o=n.clone(),{top:a=0,right:l=0,bottom:c=0,left:d=0}=r,u=d+l,m=a+c,f=(i.get("left")??0)+(i.get("right")??0)+u,_=(i.get("top")??0)+(i.get("bottom")??0)+m;return o.width<=f||o.height<=_?(s.crossLines=!1,s.series=!1,o):(o.x+=d,o.y+=a,o.width-=u,o.height-=m,o)}buildSeriesRect(n,i){let r=n.clone();return r.x+=i.get("left")??0,r.y+=i.get("top")??0,r.width-=(i.get("left")??0)+(i.get("right")??0),r.height-=(i.get("top")??0)+(i.get("bottom")??0),r.width=Math.max(0,r.width),r.height=Math.max(0,r.height),r}clampToOutsideSeriesRect(n,i,r,s){let{x:o,y:a,width:l,height:c}=n,u=[o,a,o+l,a+c][(r==="x"?0:1)+(s===1?0:2)];return(s===1?Math.min:Math.max)(i,u)}calculateAxisDimensions(n){let{axis:i,seriesRect:r,paddedBounds:s,primaryTickCounts:o}=n,{clipSeries:a}=n,{position:l="left",direction:c}=i;this.sizeAxis(i,r,l);let d=i.nice?o[c]:void 0,u=c==="y",m=.3;i.thickness?i.maxThickness=i.thickness:i.maxThickness=(u?s.width:s.height)*m;let f=i.calculateLayout(d);d=f.primaryTickCount,o[c]??(o[c]=d),a||(a=i.dataDomain.clipped||i.visibleRange[0]>0||i.visibleRange[1]<1);let _;return i.thickness!=null&&i.thickness>0?_=i.thickness:_=u?f.bbox.width:f.bbox.height,_=Math.ceil(_),{clipSeries:a,axisThickness:_,primaryTickCount:d}}sizeAxis(n,i,r){let s=n instanceof PR||n instanceof yR,o=r==="left"||r==="right",{min:a,max:l}=this.ctx.zoomManager.getAxisZoom(n.id),{width:c,height:d}=i,u=0,m=o?d:c,f=u,_=m,{width:x,unit:D,align:E}=n.layoutConstraints;D==="px"?_=f+x:_=_*x/100,E==="end"&&(f=m-(_-f),_=m),s&&o?[a,l]=[1-l,1-a]:o&&([f,_]=[_,f]),n.range=[f,_],n.visibleRange=[a,l],n.gridLength=o?c:d}calculateAxisArea(n,i,r){let s=0,o=0;for(let a of n){r.set(a.id,o);let l=i.get(a.id)??0;s=Math.max(s,o+l),a.layoutConstraints.stacked&&(o+=l+15)}return s}positionAxes(n){let{axes:i,axisBound:r,axisWidths:s,axisOffsets:o,axisAreaWidths:a,seriesRect:l,position:c}=n,d=a.get(c)??0,u="x",m="y",f=1,_=0;(c==="top"||c==="bottom")&&(u="y",m="x",_+=1),_+=r[u],(c==="right"||c==="bottom")&&(f=-1,_+=u==="x"?r.width:r.height);for(let x of i){let D=a.get(m==="x"?"left":"top")??0;x.translation[m]=r[m]+D;let E=s.get(x.id)??0,M=o.get(x.id)??0;x.translation[u]=this.clampToOutsideSeriesRect(l,_+f*(M+E),u,f),x.gridPadding=d-M-E,x.updatePosition()}}shouldFlipXY(){return!this.series.some(n=>!(n instanceof Mw&&n.shouldFlipXY()))}};return t.className="CartesianChart",t.type="cartesian",t})(),Zee=(()=>{let t=class rrt{constructor(n,i,r){this.factoryApi=i,this.licenseManager=r,this.chart=n,n.publicApi=this}static isInstance(n){return n instanceof rrt||n.constructor?.name==="AgChartInstanceProxy"&&n.chart!=null?!0:n.chart!=null&&this.validateImplementation(n)}static validateImplementation(n){let i=["getOptions","destroy"],r=Object.keys(Object.getPrototypeOf(n)??{});return i.every(s=>r.includes(s))}update(n){return O(this,null,function*(){this.factoryApi.createOrUpdate(n,this),yield this.chart.waitForUpdate()})}updateDelta(n){return O(this,null,function*(){this.factoryApi.updateUserDelta(this,n),yield this.chart.waitForUpdate()})}getOptions(){let n=N0(this.chart.getOptions());for(let i in n)i.startsWith("_")&&delete n[i];return n}waitForUpdate(){return this.chart.waitForUpdate()}download(n){return O(this,null,function*(){let i=yield this.prepareResizedChart(this,n);try{i.chart.download(n?.fileName,n?.fileFormat)}finally{i.destroy()}})}getImageDataURL(n){return O(this,null,function*(){let i=yield this.prepareResizedChart(this,n);try{return i.chart.getCanvasDataURL(n?.fileFormat)}finally{i.destroy()}})}getState(){return this.factoryApi.caretaker.save(this.chart.ctx.annotationManager)}setState(n){return O(this,null,function*(){this.factoryApi.caretaker.restore(n,this.chart.ctx.annotationManager),yield this.chart.waitForUpdate()})}resetAnimations(){this.chart.resetAnimations()}skipAnimations(){this.chart.skipAnimations()}destroy(){this.chart.publicApi=void 0,this.chart.destroy()}prepareResizedChart(r){return O(this,arguments,function*(n,i={}){let{chart:s}=n,o=i.width??s.width??s.ctx.scene.canvas.width,a=i.height??s.height??s.ctx.scene.canvas.height,l=n.getState(),c=gw.hasEnterpriseModules(),d={},u=s.chartOptions.getOptions();c&&(d.animation={enabled:!1},vE(u)&&(d.toolbar={enabled:!1}),this.licenseManager?.isDisplayWatermark()&&(d.foreground={text:this.licenseManager.getWatermarkMessage(),image:{url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=",width:170,height:25,right:25,bottom:50,opacity:.7}}));let m=ql({container:document.createElement("div"),width:o,height:a},d,u),f=yield this.factoryApi.createOrUpdate(m);return yield f.setState(l),f.chart.ctx.zoomManager.updateZoom("agChartV2",s.ctx.zoomManager.getZoom()),s.series.forEach((_,x)=>{_.visible||(f.chart.series[x].visible=!1)}),s.update(0,{forceNodeDataRefresh:!0}),yield f.waitForUpdate(),f})}};return t.chartInstances=new WeakMap,t})();Me([Fg({oldValue(t){Zee.chartInstances.delete(t)},newValue(t){Zee.chartInstances.set(t,this)}})],Zee.prototype,"chart",2);ket=Zee,c_=class extends Ud{constructor(){super([0,1],[0,1]),this.type="number"}toDomain(t){return t}ticks(){let t=this.tickCount??Ud.defaultTickCount;if(!this.domain||this.domain.length<2||t<1||!this.domain.every(isFinite))return[];this.refresh();let[e,n]=this.getDomain();if(this.interval){let i=Math.abs(this.interval);if(!xG((n-e)/i,this.getPixelRange()))return CG(e,n,i)}return kte(e,n,t,this.minTickCount,this.maxTickCount)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}getTickStep(t,e){return this.interval??gR(t,e,this.tickCount,this.minTickCount,this.maxTickCount)}updateNiceDomain(){let t=this.tickCount;if(t<1){this.niceDomain=[...this.domain];return}let[e,n]=this.domain;if(t===1)[e,n]=ygi(e,n);else{let i=e>n?Math.ceil:Math.floor,r=n<e?Math.floor:Math.ceil,s=4;for(let o=0;o<s;o++){let a=e,l=n,c=this.getTickStep(e,n),[d,u]=this.domain;if(c>=1)e=i(d/c)*c,n=r(u/c)*c;else{let m=1/c;e=i(d*m)/m,n=r(u*m)/m}if(e===a&&n===l)break}}this.niceDomain=[e,n]}tickFormat({ticks:t,specifier:e}){return uit(t??this.ticks(),e)}};xR=(()=>{let t=class extends AR{constructor(e,n=new c_){super(e,n),this.min=NaN,this.max=NaN}normaliseDataDomain(e){let{min:n,max:i}=this,{extent:r,clipped:s}=NG(e,n,i);return{domain:r,clipped:s}}updateSecondaryAxisTicks(e){if(this.dataDomain==null)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(this.dataDomain.domain.length===0)return[];let{domain:n,ticks:i}=nvi(this.dataDomain.domain,e??0,this.reverse);return this.scale.nice=!1,this.scale.domain=n,this.scale.update(),i}};return t.className="NumberAxis",t.type="number",t})();Me([$e(I6(TR,ER("max"))),Tw(NaN)],xR.prototype,"min",2);Me([$e(I6(TR,MR("min"))),Tw(NaN)],xR.prototype,"max",2);srt=au(t=>O4(t)&&t!==0,"a non-zero number"),qG=(()=>{let t=class extends xR{constructor(e){super(e,new o8e),this.min=NaN,this.max=NaN}normaliseDataDomain(e){let{min:n,max:i}=this,{extent:r,clipped:s}=NG(e,n,i),o=r[0]>r[1],a=r[0]<0&&r[1]>0,l=r[0]===0&&r[1]===0;return(o||a||l)&&(a?yr.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):l&&yr.warn("the data domain has 0 extent, no data is rendered.")),r[0]===0&&(r[0]=1),r[1]===0&&(r[1]=-1),{domain:r,clipped:s}}set base(e){this.scale.base=e}get base(){return this.scale.base}};return t.className="LogAxis",t.type="log",t})();Me([$e(I6(TR,srt,ER("max"))),Tw(NaN)],qG.prototype,"min",2);Me([$e(I6(TR,srt,MR("min"))),Tw(NaN)],qG.prototype,"max",2);Hte=(()=>{let t=class extends AR{constructor(e){super(e,new Ite),this.min=void 0,this.max=void 0}normaliseDataDomain(e){let{min:n,max:i}=this,r=!1;return typeof n=="number"&&(n=new Date(n)),typeof i=="number"&&(i=new Date(i)),e.length>2&&(e=(sC(e)??[0,1e3]).map(s=>new Date(s))),n instanceof Date&&(r||(r=n>e[0]),e=[n,e[1]]),i instanceof Date&&(r||(r=i<e[1]),e=[e[0],i]),e[0]>e[1]&&(e=[]),{domain:e,clipped:r}}onFormatChange(e,n,i,r){r?super.onFormatChange(e,n,i,r):(this.labelFormatter=this.scale.tickFormat({ticks:e,domain:i}),this.datumFormatter=this.scale.tickFormat({ticks:e,domain:i,formatOffset:1}))}calculatePadding(){return[0,0]}};return t.className="TimeAxis",t.type="time",t})();Me([$e(I6(e8e,ER("max")),{optional:!0})],Hte.prototype,"min",2);Me([$e(I6(e8e,MR("min")),{optional:!0})],Hte.prototype,"max",2);rG=(t,{x0:e,y0:n,x1:i,y1:r,cx:s,cy:o},a,l)=>{if(l&&t.moveTo(e,n),e!==i||n!==r){let c=Math.atan2(n-o,e-s),d=Math.atan2(r-o,i-s);t.arc(s,o,a,c,d)}else t.lineTo(e,n)},Iet=1e-6,Iee=(t,e,n,i,r)=>{let s=!1,o=!1,a=i-Math.sqrt(Math.max(r**2-n**2,0)),l=0,c=0,d=n-Math.sqrt(Math.max(r**2-i**2,0));return a>t?(s=!0,a=t,l=n-Math.sqrt(Math.max(r**2-(i-t)**2))):a<Iet&&(a=0),d>e?(o=!0,c=i-Math.sqrt(Math.max(r**2-(n-e)**2)),d=e):d<Iet&&(d=0),{leading0:a,leading1:l,trailing0:c,trailing1:d,leadingClipped:s,trailingClipped:o}},W5e=(t,e,n,i,r,s,o)=>{let{topLeft:a,topRight:l,bottomRight:c,bottomLeft:d}=s,u=Math.max(a+d,l+c),m=Math.max(a+l,d+c);if(u<=0&&m<=0){o==null?t.rect(e,n,i,r):t.rect(o.x,o.y,o.width,o.height);return}else if(o==null&&a===l&&a===c&&a===d){t.roundRect(e,n,i,r,a);return}if(i<0&&(e+=i,i=Math.abs(i)),r<0&&(n+=r,r=Math.abs(r)),i<=0||r<=0)return;if(o==null)o=new Os(e,n,i,r);else{let Y=Math.max(e,o.x),X=Math.min(e+i,o.x+o.width),ne=Math.max(n,o.y),pe=Math.min(n+r,o.y+o.height);o=new Os(Y,ne,X-Y,pe-ne)}let f=Math.max(u/r,m/i,1);f>1&&(a/=f,l/=f,c/=f,d/=f);let _=!0,x=!0,D=!0,E=!0,M,I,z,G;if(_){let Y=Iee(o.height,o.width,Math.max(e+a-o.x,0),Math.max(n+a-o.y,0),a);Y.leadingClipped&&(E=!1),Y.trailingClipped&&(x=!1);let X=Math.max(o.x+Y.leading1,o.x),ne=Math.max(o.y+Y.leading0,o.y),pe=Math.max(o.x+Y.trailing1,o.x),ce=Math.max(o.y+Y.trailing0,o.y),ie=e+a,le=n+a;M={x0:X,y0:ne,x1:pe,y1:ce,cx:ie,cy:le}}if(x){let Y=Iee(o.width,o.height,Math.max(n+l-o.y,0),Math.max(o.x+o.width-(e+i-l),0),l);Y.leadingClipped&&(_=!1),Y.trailingClipped&&(D=!1);let X=Math.min(o.x+o.width-Y.leading0,o.x+o.width),ne=Math.max(o.y+Y.leading1,o.y),pe=Math.min(o.x+o.width-Y.trailing0,o.x+o.width),ce=Math.max(o.y+Y.trailing1,o.y),ie=e+i-l,le=n+l;I={x0:X,y0:ne,x1:pe,y1:ce,cx:ie,cy:le}}if(D){let Y=Iee(o.height,o.width,Math.max(o.x+o.width-(e+i-c),0),Math.max(o.y+o.height-(n+r-c),0),c);Y.leadingClipped&&(x=!1),Y.trailingClipped&&(E=!1);let X=Math.min(o.x+o.width-Y.leading1,o.x+o.width),ne=Math.min(o.y+o.height-Y.leading0,o.y+o.height),pe=Math.min(o.x+o.width-Y.trailing1,o.x+o.width),ce=Math.min(o.y+o.height-Y.trailing0,o.y+o.height),ie=e+i-c,le=n+r-c;z={x0:X,y0:ne,x1:pe,y1:ce,cx:ie,cy:le}}if(E){let Y=Iee(o.width,o.height,Math.max(o.y+o.height-(n+r-d),0),Math.max(e+d-o.x,0),d);Y.leadingClipped&&(D=!1),Y.trailingClipped&&(_=!1);let X=Math.max(o.x+Y.leading0,o.x),ne=Math.min(o.y+o.height-Y.leading1,o.y+o.height),pe=Math.max(o.x+Y.trailing0,o.x),ce=Math.min(o.y+o.height-Y.trailing1,o.y+o.height),ie=e+d,le=n+r-d;G={x0:X,y0:ne,x1:pe,y1:ce,cx:ie,cy:le}}let A=!1;_&&M!=null&&(rG(t,M,a,!A),A||(A=!0)),x&&I!=null&&(rG(t,I,l,!A),A||(A=!0)),D&&z!=null&&(rG(t,z,c,!A),A||(A=!0)),E&&G!=null&&(rG(t,G,d,!A),A||(A=!0)),t.closePath()},A3=(()=>{let t=class extends Og{constructor(){super(...arguments),this.borderPath=new wG,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.clipBBox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=M6.defaultStyles.strokeWidth,this.effectiveStrokeWidth=M6.defaultStyles.strokeWidth,this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint,this.microPixelEffectOpacity=1}set cornerRadius(e){this.topLeftCornerRadius=e,this.topRightCornerRadius=e,this.bottomRightCornerRadius=e,this.bottomLeftCornerRadius=e}isDirtyPath(){return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty())}updatePath(){let{path:e,borderPath:n,crisp:i,topLeftCornerRadius:r,topRightCornerRadius:s,bottomRightCornerRadius:o,bottomLeftCornerRadius:a}=this,{x:l,y:c,width:d,height:u,strokeWidth:m,clipBBox:f}=this,x=1/(this.layerManager?.canvas.pixelRatio??1),D=1;if(e.clear(!0),n.clear(!0),i&&(d<=x&&(D*=d/x),u<=x&&(D*=u/x),d=this.align(l,d),u=this.align(c,u),l=this.align(l),c=this.align(c),f=f!=null?new Os(this.align(f.x),this.align(f.y),this.align(f.x,f.width),this.align(f.y,f.height)):void 0),m)if(d<x){let E=l+x/2;n.moveTo(E,c),n.lineTo(E,c+u),m=x,this.borderClipPath=void 0}else if(u<x){let E=c+x/2;n.moveTo(l,E),n.lineTo(l+d,E),m=x,this.borderClipPath=void 0}else if(m<d&&m<u){let E=m/2;l+=E,c+=E,d-=m,u-=m;let M=f?.clone().shrink(E),I={topLeft:r>0?r-m:0,topRight:s>0?s-m:0,bottomRight:o>0?o-m:0,bottomLeft:a>0?a-m:0};this.borderClipPath=void 0,d>0&&u>0&&(M==null||M?.width>0&&M?.height>0)&&(W5e(e,l,c,d,u,I,M),W5e(n,l,c,d,u,I,M))}else this.borderClipPath=this.borderClipPath??new wG,this.borderClipPath.clear(!0),this.borderClipPath.rect(l,c,d,u),n.rect(l,c,d,u);else{let E={topLeft:r,topRight:s,bottomRight:o,bottomLeft:a};this.borderClipPath=void 0,W5e(e,l,c,d,u,E,f)}[r,s,o,a].every(E=>E===0)?(this.hittester=(E,M)=>{let I=this.transformPoint(E,M);return this.getBBox().containsPoint(I.x,I.y)},this.distanceSquared=(E,M)=>this.getBBox().distanceSquared(E,M)):(this.hittester=super.isPointInPath,this.distanceCalculator=super.distanceSquaredTransformedPoint),this.effectiveStrokeWidth=m,this.lastUpdatePathStrokeWidth=m,this.microPixelEffectOpacity=D}computeBBox(){let{x:e,y:n,width:i,height:r,clipBBox:s}=this;return s?.clone()??new Os(e,n,i,r)}isPointInPath(e,n){return this.hittester(e,n)}get midPoint(){return{x:this.x+this.width/2,y:this.y+this.height/2}}distanceSquared(e,n){return this.distanceCalculator(e,n)}applyFillAlpha(e){let{fillOpacity:n,microPixelEffectOpacity:i,opacity:r}=this;e.globalAlpha*=r*n*i}renderStroke(e){let{stroke:n,effectiveStrokeWidth:i}=this;if(n&&i){let{globalAlpha:r}=e,{strokeOpacity:s,lineDash:o,lineDashOffset:a,lineCap:l,lineJoin:c,borderPath:d,borderClipPath:u,opacity:m,microPixelEffectOpacity:f}=this;u&&e.clip(u.getPath2D()),e.strokeStyle=n,e.globalAlpha*=m*s*f,e.lineWidth=i,o&&e.setLineDash(o),a&&(e.lineDashOffset=a),l&&(e.lineCap=l),c&&(e.lineJoin=c),e.stroke(d.getPath2D()),e.globalAlpha=r}}};return t.className="Rect",t})();Me([va()],A3.prototype,"x",2);Me([va()],A3.prototype,"y",2);Me([va()],A3.prototype,"width",2);Me([va()],A3.prototype,"height",2);Me([va()],A3.prototype,"topLeftCornerRadius",2);Me([va()],A3.prototype,"topRightCornerRadius",2);Me([va()],A3.prototype,"bottomRightCornerRadius",2);Me([va()],A3.prototype,"bottomLeftCornerRadius",2);Me([va()],A3.prototype,"clipBBox",2);Me([va()],A3.prototype,"crisp",2);OR=class extends HG{constructor(t,e=0,n=!1){super(),this.zIndex=e,this.layer=n,this.rectNode=new A3,this.textNode=new Gu,this.fill="white",this.node=new xo({name:"background",zIndex:this.zIndex,layer:this.layer}),this.node.append([this.rectNode,this.textNode]),this.visible=!0,this.destroyFns.push(t.scene.attachNode(this.node),t.layoutService.addListener("layout-complete",i=>this.onLayoutComplete(i)))}onLayoutComplete(t){let{width:e,height:n}=t.chart;this.rectNode.width=e,this.rectNode.height=n}};Me([$e(Jo),z0("node","visible")],OR.prototype,"visible",2);Me([$e(kd,{optional:!0}),z0("rectNode","fill")],OR.prototype,"fill",2);Me([$e(Us,{optional:!0})],OR.prototype,"image",2);Me([$e(Gr,{optional:!0}),z0("textNode")],OR.prototype,"text",2);ort={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"],moduleFactory:t=>new OR(t)},lvi=class{constructor(){this.offscreenCanvas=new OffscreenCanvas(1,1);let t=this.offscreenCanvas.getContext("2d");if(t==null)throw new TypeError("AG Charts - invalid 2d context");this.renderCtx={ctx:t,devicePixelRatio:1,forceRender:!0,resized:!1,debugNodes:{}}}resize({spritePixelRatio:t,spriteWidth:e,spriteHeight:n}){this.offscreenCanvas.width=Math.max(e,0)*t,this.offscreenCanvas.height=Math.max(n,0)*t}renderSprite(t,e){t=Stt(t);let{renderCtx:n,renderCtx:{ctx:i},offscreenCanvas:r}=this,{scale:s=1,translateX:o=0,translateY:a=0}=e??{};i.resetTransform(),i.clearRect(0,0,r.width,r.height),i.save(),i.beginPath(),i.setTransform(s,0,0,s,o,a);for(let l of t)l.render(n);return i.closePath(),i.restore(),r.transferToImageBitmap()}};crt={horizontal:{nextKey:"ArrowRight",prevKey:"ArrowLeft"},vertical:{nextKey:"ArrowDown",prevKey:"ArrowUp"}};LE=class extends SR{constructor(t){super(),this.sourceImage=t,this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1}updateBitmap(t,e,n,i){this.sourceImage=t,this.width=t.width/e,this.height=t.height/e,this.x=n/e,this.y=i/e,this.markDirty(this,3)}render(t){let{ctx:e,forceRender:n,stats:i}=t;if(this.dirty===0&&!n){i&&i.nodesSkipped++;return}let r=this.sourceImage;r&&(this.transformRenderContext(t),e.globalAlpha=this.opacity,e.drawImage(r,0,0,r.width,r.height,this.x,this.y,this.width,this.height),super.render(t))}};Me([Ss({redraw:3})],LE.prototype,"x",2);Me([Ss({redraw:3})],LE.prototype,"y",2);Me([Ss({redraw:3})],LE.prototype,"width",2);Me([Ss({redraw:3})],LE.prototype,"height",2);Me([Ss({redraw:3})],LE.prototype,"opacity",2);Cw=(()=>{let t=class extends xo{constructor(){super({name:"markerLabelGroup"}),this.label=new Gu,this.symbolsGroup=new xo({name:"legend-markerLabel-symbols"}),this.bitmap=new LE,this.bitmapDirty=!0,this.enabled=!0,this.pageIndex=NaN,this._markers=[],this._lines=[];let{markers:e,label:n,lines:i}=this;n.textBaseline="middle",n.fontSize=12,n.fontFamily="Verdana, sans-serif",n.fill="black",n.y=1,this.updateSymbols(e,i),this.append(Dtt(this.symbolsGroup,n))}destroy(){super.destroy(),this.proxyButton?.remove()}get markers(){return this._markers}get lines(){return this._lines}updateSymbols(e,n){gE(this._markers,e)&&gE(this._lines,n)||(this.bitmapDirty=!0,this._markers=e,this._lines=n,this.symbolsGroup.clear(),this.symbolsGroup.append([this.bitmap,...e,...n]))}setEnabled(e){this.enabled=e,this.refreshVisibilities()}refreshVisibilities(){let e=this.enabled?1:.5;this.label.opacity=e,this.opacity=e,this.bitmap.opacity=e,this.setBitmapVisibility(!this.enabled)}setBitmapVisibility(e){let{lines:n,markers:i}=this;[n,i].forEach(r=>r.forEach(s=>s.visible=!e)),this.bitmap.visible=e}update(e,{spriteAAPadding:n,spritePixelRatio:i},r){let{markers:s,lines:o}=this,a=0,l=0,c=0;for(let M=0;M<Math.max(s.length,o.length);M++){let{length:I,spacing:z}=r[M]??0,G=s[M],A=o[M],Y=G?.size??0,X=1/0,ne=1/0,pe=1/0;if(G){let ce=G.constructor.center,ie=(Y+G.strokeWidth)/2;G.x=(ce.x-.5)*Y+I/2+c,G.y=(ce.y-.5)*Y,ne=G.y-ie,pe=G.x-ie}A&&(A.x1=c,A.x2=c+I,A.y1=0,A.y2=0,A.markDirtyTransform(),X=-A.strokeWidth/2),c+=z+Math.max(I,Y),a=Math.min(a,A.x1,A.x2,pe),l=Math.min(l,X,ne)}let d=r.at(-1),u=this.lines.at(-1),m=this.markers.at(-1),f=u?u.x2:-1/0,_=(m?.x??0)+(m?.size??0)/2;if(this.label.x=Math.max(f,_)+(d?.spacing??0),this.bitmapDirty){this.setBitmapVisibility(!1);let M=(n+a)*i,I=(n-l)*i,z=e.renderSprite(this.symbolsGroup,{scale:i,translateX:Math.floor(M),translateY:Math.floor(I)});this.bitmap.updateBitmap(z,i,Math.ceil(-M),Math.ceil(-I)),this.bitmapDirty=!1,this.refreshVisibilities()}if(r.length<2)return;let x=this.symbolsGroup.getBBox(),D=Math.max(m?.size??0,d?.length??0),E=new Os(x.x+D/2,x.y,D,x.height);this.symbolsGroup.setClipRectInGroupCoordinateSpace(E)}computeBBox(){let{label:e,lines:n,markers:i}=this;return xo.computeBBox(Ttt([e],n,i),{skipInvisible:!1})}};return t.className="MarkerLabel",t})();Me([z0("label")],Cw.prototype,"text",2);Me([z0("label")],Cw.prototype,"fontStyle",2);Me([z0("label")],Cw.prototype,"fontWeight",2);Me([z0("label")],Cw.prototype,"fontSize",2);Me([z0("label")],Cw.prototype,"fontFamily",2);Me([z0("label","fill")],Cw.prototype,"color",2);NR=class extends pl{constructor(){super(...arguments),this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};Me([$e(kd)],NR.prototype,"color",2);Me([$e(bw,{optional:!0})],NR.prototype,"fontStyle",2);Me([$e(ww,{optional:!0})],NR.prototype,"fontWeight",2);Me([$e(Rr)],NR.prototype,"fontSize",2);Me([$e(Gr)],NR.prototype,"fontFamily",2);Wx=class extends pl{constructor(){super(...arguments),this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};Me([$e(Rr)],Wx.prototype,"size",2);Me([$e(kd,{optional:!0})],Wx.prototype,"fill",2);Me([$e(ud,{optional:!0})],Wx.prototype,"fillOpacity",2);Me([$e(kd,{optional:!0})],Wx.prototype,"stroke",2);Me([$e(Rr)],Wx.prototype,"strokeWidth",2);Me([$e(ud)],Wx.prototype,"strokeOpacity",2);Wte=class extends pl{constructor(t){super(),this.parent=t,this.shape=uR,this.size=15,this.padding=8}};Me([Fg({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],Wte.prototype,"shape",2);Me([$e(Rr)],Wte.prototype,"size",2);Me([$e(Rr)],Wte.prototype,"padding",2);VR=(()=>{let t=class extends pl{constructor(e,n,i,r){super(),this.chartUpdateCallback=e,this.pageUpdateCallback=n,this.regionManager=i,this.cursorManager=r,this.id=k6(this),this.marker=new Wte(this),this.activeStyle=new Wx,this.inactiveStyle=new Wx,this.highlightStyle=new Wx,this.label=new NR,this.group=new xo({name:"pagination"}),this.labelNode=new Gu,this.destroyFns=[],this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this._nextButton=new uR,this._previousButton=new uR,this.labelNode.setProperties({textBaseline:"middle",fontSize:12,fontFamily:"Verdana, sans-serif",fill:"black",y:1}),this.group.append([this.nextButton,this.previousButton,this.labelNode]);let s=this.regionManager.addRegion("pagination",this.group);this.destroyFns.push(s.addListener("click",o=>this.onPaginationClick(o)),s.addListener("hover",o=>this.onPaginationMouseMove(o))),this.update(),this.updateMarkers()}destroy(){this.destroyFns.forEach(e=>e())}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(e){switch(this._orientation=e,e){case"horizontal":{this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2;break}case"vertical":default:this.previousButton.rotation=0,this.nextButton.rotation=Math.PI}}get orientation(){return this._orientation}set nextButton(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))}get nextButton(){return this._nextButton}set previousButton(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))}get previousButton(){return this._previousButton}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){let{size:e,padding:n}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+n}updateNextButtonPosition(){let e=this.labelNode.getBBox();this.nextButton.translationX=e.x+e.width+this.marker.size/2+this.marker.padding}updateLabel(){let{currentPage:e,totalPages:n,labelNode:i,label:{color:r,fontStyle:s,fontWeight:o,fontSize:a,fontFamily:l}}=this;i.text=`${e+1} / ${n}`,i.fill=r,i.fontStyle=s,i.fontWeight=o,i.fontSize=a,i.fontFamily=l}updateMarkers(){let{nextButton:e,previousButton:n,nextButtonDisabled:i,previousButtonDisabled:r,activeStyle:s,inactiveStyle:o,highlightStyle:a,highlightActive:l}=this,c=(d,u)=>u?o:d===l?a:s;this.updateMarker(e,c("next",i)),this.updateMarker(n,c("previous",r))}updateMarker(e,n){let{size:i}=this.marker;e.size=i,e.fill=n.fill,e.fillOpacity=n.fillOpacity??1,e.stroke=n.stroke,e.strokeWidth=n.strokeWidth,e.strokeOpacity=n.strokeOpacity}enableOrDisableButtons(){let{currentPage:e,totalPages:n}=this,i=n===0,r=e===n-1,s=e===0;this.nextButtonDisabled=r||i,this.previousButtonDisabled=s||i}nextButtonContainsPoint(e,n){return!this.nextButtonDisabled&&this.nextButton.containsPoint(e,n)}previousButtonContainsPoint(e,n){return!this.previousButtonDisabled&&this.previousButton.containsPoint(e,n)}clickNext(){this.incrementPage(),this.onPaginationChanged()}clickPrevious(){this.decrementPage(),this.onPaginationChanged()}setPage(e){e=Wa(0,e,this.totalPages-1),this.currentPage!==e&&(this.currentPage=e,this.onPaginationChanged())}onPaginationClick(e){let{offsetX:n,offsetY:i}=e;e.preventDefault(),this.nextButtonContainsPoint(n,i)?this.clickNext():this.previousButtonContainsPoint(n,i)&&this.clickPrevious()}onPaginationMouseMove(e){let{offsetX:n,offsetY:i}=e;this.nextButtonContainsPoint(n,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"):this.previousButtonContainsPoint(n,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0),this.updateMarkers(),this.chartUpdateCallback(6)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){let e=iC(this.marker.shape||uR);this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(6)}attachPagination(e){e.append(this.group)}getBBox(){return this.group.getBBox(!0)}computeCSSBounds(){let e=this._previousButton.computeTransformedBBox(),n=this._nextButton.computeTransformedBBox();return{prev:e,next:n}}};return t.className="Pagination",t})();Me([$e(Us)],VR.prototype,"marker",2);Me([$e(Us)],VR.prototype,"activeStyle",2);Me([$e(Us)],VR.prototype,"inactiveStyle",2);Me([$e(Us)],VR.prototype,"highlightStyle",2);Me([$e(Us)],VR.prototype,"label",2);kw=class extends pl{constructor(){super(...arguments),this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};Me([$e(Rr,{optional:!0})],kw.prototype,"maxLength",2);Me([$e(kd)],kw.prototype,"color",2);Me([$e(bw,{optional:!0})],kw.prototype,"fontStyle",2);Me([$e(ww,{optional:!0})],kw.prototype,"fontWeight",2);Me([$e(Rr)],kw.prototype,"fontSize",2);Me([$e(Gr)],kw.prototype,"fontFamily",2);Me([$e(k3,{optional:!0})],kw.prototype,"formatter",2);BR=class extends pl{constructor(){super(...arguments),this.size=15,this.padding=8}};Me([Lg(t=>t.parent?.onMarkerShapeChange())],BR.prototype,"shape",2);Me([$e(Rr)],BR.prototype,"size",2);Me([$e(Rr)],BR.prototype,"padding",2);Me([$e(Rr,{optional:!0})],BR.prototype,"strokeWidth",2);Me([$e(Jo)],BR.prototype,"enabled",2);A8e=class extends pl{};Me([$e(Rr,{optional:!0})],A8e.prototype,"strokeWidth",2);Me([$e(Rr,{optional:!0})],A8e.prototype,"length",2);Iw=class extends pl{constructor(){super(...arguments),this.paddingX=16,this.paddingY=8,this.showSeriesStroke=!1,this.marker=new BR,this.label=new kw,this.line=new A8e}};Me([$e(Rr,{optional:!0})],Iw.prototype,"maxWidth",2);Me([$e(Rr)],Iw.prototype,"paddingX",2);Me([$e(Rr)],Iw.prototype,"paddingY",2);Me([$e(Jo)],Iw.prototype,"showSeriesStroke",2);Me([$e(Us)],Iw.prototype,"marker",2);Me([$e(Us)],Iw.prototype,"label",2);Me([$e(Us)],Iw.prototype,"line",2);P8e=class extends pl{};Me([$e(k3,{optional:!0})],P8e.prototype,"legendItemClick",2);Me([$e(k3,{optional:!0})],P8e.prototype,"legendItemDoubleClick",2);Aee="legend-visibility",Pet="legend-other-series",G4=(()=>{let t=class extends pl{constructor(e){super(),this.ctx=e,this.id=k6(this),this.group=new xo({name:"legend",layer:!0,zIndex:13}),this.itemSelection=Oh.select(this.group,Cw),this.spriteRenderer=new lvi,this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.truncatedItems=new Set,this._data=[],this.toggleSeries=!0,this.item=new Iw,this.listeners=new P8e,this.enabled=!0,this.position="bottom",this.spacing=20,this.destroyFns=[],this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new VR(l=>e.updateService.update(l),l=>this.updatePageNumber(l),e.regionManager,e.cursorManager),this.pagination.attachPagination(this.group),e.contextMenuRegistry.registerDefaultAction({id:Aee,type:"legend",label:"contextMenuToggleSeriesVisibility",action:l=>this.contextToggleVisibility(l)}),e.contextMenuRegistry.registerDefaultAction({id:Pet,type:"legend",label:"contextMenuToggleOtherSeries",action:l=>this.contextToggleOtherSeries(l)});let{Default:n,Animation:i,ContextMenu:r}=WG,s=n|i,o=n|i|r,a=e.regionManager.addRegion("legend",this.group);this.destroyFns.push(a.addListener("contextmenu",l=>this.checkContextClick(l),o),a.addListener("click",l=>this.checkLegendClick(l),s),a.addListener("dblclick",l=>this.checkLegendDoubleClick(l),s),a.addListener("hover",l=>this.handleLegendMouseMove(l),s),a.addListener("leave",()=>this.handleLegendMouseExit(),s),a.addListener("enter",l=>this.handleLegendMouseEnter(l),s),e.layoutService.addListener("start-layout",l=>this.positionLegend(l)),e.localeManager.addListener("locale-changed",()=>this.onLocaleChanged()),()=>this.group.parent?.removeChild(this.group)),this.proxyLegendToolbar=this.ctx.proxyInteractionService.createProxyContainer({type:"toolbar",id:`${this.id}-toolbar`,classList:["ag-charts-proxy-legend-toolbar"],ariaLabel:{id:"ariaLabelLegend"},ariaOrientation:"horizontal",ariaHidden:!0}),this.proxyLegendPagination=this.ctx.proxyInteractionService.createProxyContainer({type:"group",id:`${this.id}-pagination`,classList:["ag-charts-proxy-legend-pagination"],ariaLabel:{id:"ariaLabelLegendPagination"},ariaOrientation:"horizontal",ariaHidden:!0})}set data(e){this._data=e,this.updateGroupVisibility()}get data(){return this._data}destroy(){this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-toolbar`),this.ctx.domManager.removeChild("canvas-overlay",`${this.id}-pagination`),this.destroyFns.forEach(e=>e()),this.pagination.destroy(),this.itemSelection.clear()}initLegendItemToolbar(){this.itemSelection.each((n,i,r)=>{n.proxyButton??(n.proxyButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`ag-charts-legend-item-${r}`,textContent:this.getItemAriaText(r),parent:this.proxyLegendToolbar,focusable:n,onclick:()=>{this.doClick(n.datum),n.proxyButton.textContent=this.getItemAriaText(r,!n.datum.enabled)},onblur:()=>this.handleLegendMouseExit(),onfocus:()=>{let s=n?.computeTransformedBBox(),o=Knt(this.ctx.focusIndicator,{bounds:s,showFocusBox:!0});this.doHover(o,n.datum),this.pagination.setPage(n.pageIndex)}}))});let e=this.itemSelection.nodes().map(n=>n.proxyButton).filter(n=>!!n);Gte({orientation:this.getOrientation(),buttons:e,toolbar:this.proxyLegendToolbar})}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(this.group,2)}getOrientation(){if(this.orientation!==void 0)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(e){e.appendChild(this.group)}getItemLabel(e){let{ctx:{callbackCache:n}}=this,{formatter:i}=this.item.label;return i?n.call(i,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId}):e.label.text}calcLayout(e,n){let{paddingX:i,paddingY:r,label:s,maxWidth:o,label:{maxLength:a=1/0,fontStyle:l,fontWeight:c,fontSize:d,fontFamily:u}}=this.item,m=[...this.data];this.reverseOrder&&m.reverse();let f=this.itemSelection.nodes().length===0;this.itemSelection.update(m),f&&this.initLegendItemToolbar();let _=[],x=Mf.toFontString(s),E=o??e*.8,M=this.calculateSpriteDimensions();if(this.spriteRenderer.resize(M),this.itemSelection.each((ce,ie)=>{ce.fontStyle=l,ce.fontWeight=c,ce.fontSize=d,ce.fontFamily=u;let le=this.updateMarkerLabel(ce,ie,M),Se=ie.itemId??ie.id,ze=(this.getItemLabel(ie)??"<unknown>").replace(/\r?\n/g," ");ce.text=this.truncate(ze,a,E,le,x,Se),_.push(ce.getBBox())}),e=Math.max(1,e),n=Math.max(1,n),!isFinite(e))return{};let I=this.size,z=this.oldSize;I[0]=e,I[1]=n,(I[0]!==z[0]||I[1]!==z[1])&&(z[0]=I[0],z[1]=I[1]);let{pages:G,maxPageHeight:A,maxPageWidth:Y}=this.updatePagination(_,e,n),X=this.pages;this.pages=G,this.maxPageSize=[Y-i,A-r];let ne=this.pagination.currentPage,pe=this.pages[ne];return this.pages.length<1||!pe?(this.visible=!1,{oldPages:X}):(this.visible=!0,this.updatePositions(ne),this.update(),{oldPages:X})}calcSymbolsEnabled(e){let{showSeriesStroke:n,marker:i}=this.item,r=!!i.enabled||!n||(e.marker.enabled??!0),s=!!(e.line&&n);return{markerEnabled:r,lineEnabled:s}}calcSymbolsLengths(e){let{marker:n,line:i}=this.item,{markerEnabled:r,lineEnabled:s}=this.calcSymbolsEnabled(e),{strokeWidth:o}=this.getMarkerStyles(e),{strokeWidth:a}=s?this.getLineStyles(e):{strokeWidth:0},l=r?n.size:0,c=s?i.length??25:0;return{markerLength:l,markerStrokeWidth:o,lineLength:c,lineStrokeWidth:a}}calculateSpriteDimensions(){let e=0,n=0,i=0,r=0;return this.itemSelection.each((o,a)=>{a.symbols.forEach(l=>{let{markerLength:c,markerStrokeWidth:d,lineLength:u,lineStrokeWidth:m}=this.calcSymbolsLengths(l),f=c+d;r=Math.max(r,u,c),n=Math.max(n,u,f),i=Math.max(i,m,f),e=Math.max(e,d+.5)})}),n+=e*2,i+=e*2,{spritePixelRatio:d_().devicePixelRatio,spriteAAPadding:e,spriteWidth:n,spriteHeight:i,markerWidth:r}}updateMarkerLabel(e,n,i){let{marker:r,paddingX:s}=this.item,{markerWidth:o}=i,a=[],l=s;if(e.markers.length!==n.symbols.length&&e.lines.length!==n.symbols.length){let c=[],d=[];n.symbols.forEach(u=>{let{shape:m=u.marker.shape}=r,f=iC(m);d.push(new i0),c.push(new f)}),e.updateSymbols(c,d)}return n.symbols.forEach((c,d)=>{let u=c.marker.padding??r.padding,{markerEnabled:m,lineEnabled:f}=this.calcSymbolsEnabled(c);e.markers[d].size=m||!f?r.size:0,a.push({length:o,spacing:u}),(m||f)&&(l+=u+o);let _=e.markers[d],x=e.lines[d];if(_){let{strokeWidth:D,fill:E,stroke:M,fillOpacity:I,strokeOpacity:z}=this.getMarkerStyles(c);_.fill=E,_.stroke=M,_.strokeWidth=D,_.fillOpacity=I,_.strokeOpacity=z}if(x){let D=this.getLineStyles(c);x.stroke=D.stroke,x.strokeOpacity=D.strokeOpacity,x.strokeWidth=D.strokeWidth,x.lineDash=D.lineDash}}),e.update(this.spriteRenderer,i,a),l}truncate(e,n,i,r,s,o){let a=!1;e.length>n&&(e=e.substring(0,n),a=!0);let l=Yx.getMeasurer({font:s}),c=c8e.truncateLine(e,l,i-r,a);return c.endsWith(Mf.EllipsisChar)?this.truncatedItems.add(o):this.truncatedItems.delete(o),c}updatePagination(e,n,i){let r=this.getOrientation(),s=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=r,this.pagination.translationX=0,this.pagination.translationY=0;let{pages:o,maxPageHeight:a,maxPageWidth:l,paginationBBox:c,paginationVertical:d}=this.calculatePagination(e,n,i),u=o.findIndex(z=>z.endIndex>=s);this.pagination.currentPage=Wa(0,u,o.length-1);let{paddingX:m,paddingY:f}=this.item,_=8,x=l-m,D=a-f,E=0,M=-c.y-this.item.marker.size/2;d?M+=D+_:(E+=-c.x+x+_,M+=(D-c.height)/2),this.pagination.translationX=E,this.pagination.translationY=M,this.pagination.update(),this.pagination.updateMarkers();let I=0;return this.itemSelection.each((z,G,A)=>{A>(o[I]?.endIndex??1/0)&&I++,z.pageIndex=I}),{maxPageHeight:a,maxPageWidth:l,pages:o}}updateItemProxyButtons(){this.itemSelection.each(e=>{let n=e.computeTransformedBBox()?.clone();n.translate(this.group.translationX,this.group.translationY),fw(e.proxyButton,n)})}updatePaginationProxyButtons(e){this.proxyLegendPagination.style.display=this.pagination.visible?"absolute":"none";let n=(e?.length??this.pages.length)>1,i=this.pages.length>1;n!==i&&(i?(this.proxyPrevButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`${this.id}-prev-page`,textContent:{id:"ariaLabelLegendPagePrevious"},tabIndex:0,parent:this.proxyLegendPagination,focusable:this.pagination.previousButton,onclick:()=>this.pagination.clickPrevious()}),this.proxyNextButton??(this.proxyNextButton=this.ctx.proxyInteractionService.createProxyElement({type:"button",id:`${this.id}-next-page`,textContent:{id:"ariaLabelLegendPageNext"},tabIndex:0,parent:this.proxyLegendPagination,focusable:this.pagination.nextButton,onclick:()=>this.pagination.clickNext()}))):(this.proxyNextButton?.remove(),this.proxyPrevButton?.remove(),[this.proxyNextButton,this.proxyPrevButton]=[void 0,void 0]));let{prev:r,next:s}=this.pagination.computeCSSBounds();fw(this.proxyPrevButton,r),fw(this.proxyNextButton,s)}calculatePagination(e,n,i){let{paddingX:r,paddingY:s}=this.item,o=this.getOrientation(),a=["left","right"].includes(this.position),l=this.pagination.getBBox(),c=new Os(0,0,0,0),d=[],u=0,m=0,f=0,_=D=>D.width===l.width&&D.height===l.height,x=this.maxWidth!==void 0&&this.maxHeight!==void 0;do{if(f++>10){yr.warn("unable to find stable legend layout.");break}l=c;let D=n-(a?0:l.width),E=i-(a?l.height:0),M=dvi({orientation:o,bboxes:e,maxHeight:E,maxWidth:D,itemPaddingY:s,itemPaddingX:r,forceResult:x});d=M?.pages??[],u=M?.maxPageWidth??0,m=M?.maxPageHeight??0;let I=d.length;if(this.pagination.visible=I>1,this.pagination.totalPages=I,this.pagination.update(),c=this.pagination.getBBox(),!this.pagination.visible)break}while(!_(c));return{maxPageWidth:u,maxPageHeight:m,pages:d,paginationBBox:l,paginationVertical:a}}updatePositions(e=0){let{item:{paddingY:n},itemSelection:i,pages:r}=this;if(r.length<1||!r[e])return;let{columns:s,startIndex:o,endIndex:a}=r[e],l=0,c=0,d=s.length,u=s[0].indices.length,m=this.getOrientation()==="horizontal",f=s[0].bboxes[0].height+n,_=[];i.each((x,D,E)=>{if(E<o||E>a){x.visible=!1;return}let M=E-o,I,z;m?(I=M%d,z=Math.floor(M/d)):(I=Math.floor(M/u),z=M%u),x.visible=!0;let G=s[I];G&&(c=Math.floor(f*z),l=Math.floor(_[z]??0),_[z]=(_[z]??0)+G.columnWidth,x.translationX=l,x.translationY=c)})}updatePageNumber(e){let{pages:n}=this,{startIndex:i,endIndex:r}=n[e];i===0?this.paginationTrackingIndex=0:e===n.length-1?this.paginationTrackingIndex=r:this.paginationTrackingIndex=Math.floor((i+r)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.ctx.updateService.update(6)}update(){let{label:{color:e}}=this.item;this.itemSelection.each((n,i)=>{n.setEnabled(i.enabled),n.color=e}),this.updateContextMenu()}updateContextMenu(){let{toggleSeries:e}=this;this.ctx.contextMenuRegistry.setActionVisiblity(Aee,e),this.ctx.contextMenuRegistry.setActionVisiblity(Pet,e)}getLineStyles(e){let{stroke:n,strokeOpacity:i=1,strokeWidth:r,lineDash:s}=e.line??{},o=Math.min(2,r??1);return{stroke:n,strokeOpacity:i,strokeWidth:this.item.line.strokeWidth??o,lineDash:s}}getMarkerStyles(e){let{fill:n,stroke:i,strokeOpacity:r=1,fillOpacity:s=1,strokeWidth:o}=e.marker,a=Math.min(2,o??1);return{fill:n,stroke:i,strokeOpacity:r,fillOpacity:s,strokeWidth:this.item.marker.strokeWidth??a}}getDatumForPoint(e,n){let i=[],r={dist:1/0,datum:void 0};for(let o of this.group.children){if(!o.visible||!(o instanceof Cw))continue;let a=o.getBBox().clone();if(a.grow(this.item.paddingX/2,"horizontal"),a.grow(this.item.paddingY/2,"vertical"),a.containsPoint(e,n))return o.datum;let l=e-a.x-this.item.paddingX/2,c=n-a.y-this.item.paddingY/2,d=l**2+c**2;l>=0&&c>=0&&d<r.dist&&(r.dist=d,r.datum=o.datum),i.push(a)}if(Os.merge(i).containsPoint(e,n))return r.datum}computePagedBBox(){let e=this.group.getBBox();if(this.pages.length<=1)return e;let[n,i]=this.maxPageSize;return e=e.clone(),e.height=Math.max(i,e.height),e.width=Math.max(n,e.width),e}contextToggleVisibility(e){let n=this.data.find(i=>i.itemId===e.itemId);this.doClick(n)}contextToggleOtherSeries(e){let n=this.data.find(i=>i.itemId===e.itemId);this.doDoubleClick(n)}checkContextClick(e){let n=this.getDatumForPoint(e.offsetX,e.offsetY);this.preventHidingAll&&this.contextMenuDatum?.enabled&&this.getVisibleItemCount()<=1?this.ctx.contextMenuRegistry.disableAction(Aee):this.ctx.contextMenuRegistry.enableAction(Aee),this.ctx.contextMenuRegistry.dispatchContext("legend",e,{legendItem:n})}checkLegendClick(e){let n=this.getDatumForPoint(e.offsetX,e.offsetY);this.doClick(n)&&e.preventDefault()}getVisibleItemCount(){return this.ctx.chartService.series.flatMap(e=>e.getLegendData("category")).filter(e=>e.enabled).length}doClick(e){let{listeners:{legendItemClick:n},ctx:{chartService:i,highlightManager:r},preventHidingAll:s,toggleSeries:o}=this;if(!e)return!1;let{id:a,itemId:l,enabled:c}=e,d=i.series.find(m=>m.id===a);if(!d)return!1;let u=c;if(o){u=!c,s&&!u&&this.getVisibleItemCount()<2&&(u=!0);let m=u?"ariaAnnounceVisible":"ariaAnnounceHidden";this.ctx.ariaAnnouncementService.announceValue(m),this.ctx.chartEventManager.legendItemClick(d,l,u,e.legendItemName)}return u?r.updateHighlight(this.id,{series:d,itemId:l,datum:void 0}):r.updateHighlight(this.id),this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),n?.({type:"click",enabled:u,itemId:l,seriesId:d.id}),!0}checkLegendDoubleClick(e){let n=this.getDatumForPoint(e.offsetX,e.offsetY);this.doDoubleClick(n)&&e.preventDefault()}doDoubleClick(e){let{listeners:{legendItemDoubleClick:n},ctx:{chartService:i},toggleSeries:r}=this;if(i.mode==="integrated"||!e)return!1;let{id:s,itemId:o,seriesId:a}=e,l=i.series.find(c=>c.id===s);if(!l)return!1;if(r){let c=i.series.flatMap(m=>m.getLegendData("category")),d=c.filter(m=>m.enabled).length,u=c.find(m=>m.itemId===o&&m.seriesId===a);this.ctx.chartEventManager.legendItemDoubleClick(l,o,u?.enabled??!1,d,u?.legendItemName)}return this.ctx.updateService.update(2,{forceNodeDataRefresh:!0}),n?.({type:"dblclick",enabled:!0,itemId:o,seriesId:l.id}),!0}handleLegendMouseMove(e){if(!this.enabled)return;let{offsetX:n,offsetY:i}=e;e.preventDefault();let r=this.getDatumForPoint(n,i);this.doHover(e,r)}doHover(e,n){let{toggleSeries:i,listeners:r}=this;if(e===void 0||n===void 0){this.ctx.cursorManager.updateCursor(this.id),this.updateHighlight();return}let s=n?this.ctx.chartService.series.find(o=>o.id===n?.id):void 0;if(n&&this.truncatedItems.has(n.itemId??n.id)){let{offsetX:o,offsetY:a}=e;this.ctx.tooltipManager.updateTooltip(this.id,{offsetX:o,offsetY:a,lastPointerEvent:e,showArrow:!1},vR({content:this.getItemLabel(n)}))}else this.ctx.tooltipManager.removeTooltip(this.id);(i||r.legendItemClick!=null||r.legendItemDoubleClick!=null)&&this.ctx.cursorManager.updateCursor(this.id,"pointer"),n?.enabled&&s?this.updateHighlight({series:s,itemId:n?.itemId,datum:void 0}):this.updateHighlight()}handleLegendMouseExit(){this.ctx.cursorManager.updateCursor(this.id),this.ctx.tooltipManager.removeTooltip(this.id),this.updateHighlight()}updateHighlight(e){let n=this.ctx.interactionManager.getState();n===16?this.ctx.highlightManager.updateHighlight(this.id,e):n===1&&(this.pendingHighlightDatum=e,this.ctx.animationManager.onBatchStop(()=>{this.ctx.highlightManager.updateHighlight(this.id,this.pendingHighlightDatum)}))}handleLegendMouseEnter(e){let{enabled:n,toggleSeries:i,listeners:{legendItemClick:r,legendItemDoubleClick:s}}=this,o=this.getDatumForPoint(e.offsetX,e.offsetY);n&&o!==void 0&&(i||r!=null||s!=null)&&this.ctx.cursorManager.updateCursor(this.id,"pointer")}onLocaleChanged(){this.itemSelection.each(({proxyButton:e},n,i)=>{e!=null&&(e.textContent=this.getItemAriaText(i))})}getItemAriaText(e,n){let i=this.data[e],r=i&&this.getItemLabel(i);n??(n=i.enabled);let s=this.ctx.localeManager;if(e>=0&&r){let o=e+1,a=this.data.length,l=s.t("ariaLabelLegendItem",{label:r,index:o,count:a}),c=s.t(n?"ariaAnnounceVisible":"ariaAnnounceHidden");return[l,c].join("")}return s.t("ariaLabelLegendItemUnknown")}positionLegend(e){let{shrinkRect:n}=e,i=n.clone();if(!this.enabled||!this.data.length)return St(ve({},e),{shrinkRect:i});let[r,s]=this.calculateLegendDimensions(n);this.group.translationX=0,this.group.translationY=0;let{oldPages:o}=this.calcLayout(r,s),a=this.computePagedBBox(),l=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return n.height-a.height;case"right":default:return n.width-a.width}};if(this.visible){let c=this.spacing,d,u;switch(this.position){case"top":case"bottom":d=(n.width-a.width)/2,u=l(),i.shrink(a.height+c,this.position);break;case"left":case"right":default:d=l(),u=(n.height-a.height)/2,i.shrink(a.width+c,this.position)}this.group.translationX=Math.floor(-a.x+n.x+d),this.group.translationY=Math.floor(-a.y+n.y+u),this.proxyLegendToolbar.style.removeProperty("display"),this.proxyLegendToolbar.ariaOrientation=this.getOrientation()}else this.proxyLegendToolbar.style.display="none";return this.updateItemProxyButtons(),this.updatePaginationProxyButtons(o),St(ve({},e),{shrinkRect:i})}calculateLegendDimensions(e){let{width:n,height:i}=e,r=n/i,s=.5,o=.2,a=.25,l,c;switch(this.position){case"top":case"bottom":let d=r<1?Math.min(s,o*(1/r)):o;l=this.maxWidth?Math.min(this.maxWidth,n):n,c=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*d);break;case"left":case"right":default:let u=r>1?Math.min(s,a*r):a;l=this.maxWidth?Math.min(this.maxWidth,n):Math.round(n*u),c=this.maxHeight?Math.min(this.maxHeight,i):i}return[l,c]}};return t.className="Legend",t})();Me([$e(Jo)],G4.prototype,"toggleSeries",2);Me([$e(Us)],G4.prototype,"pagination",2);Me([$e(Us)],G4.prototype,"item",2);Me([$e(Us)],G4.prototype,"listeners",2);Me([Lg(t=>t.updateGroupVisibility()),$e(Jo)],G4.prototype,"enabled",2);Me([$e(t8e)],G4.prototype,"position",2);Me([$e(Rr,{optional:!0})],G4.prototype,"maxWidth",2);Me([$e(Rr,{optional:!0})],G4.prototype,"maxHeight",2);Me([$e(Jo,{optional:!0})],G4.prototype,"reverseOrder",2);Me([$e(Su(["horizontal","vertical"],"an orientation"),{optional:!0})],G4.prototype,"orientation",2);Me([$e(Jo,{optional:!0})],G4.prototype,"preventHidingAll",2);Me([$e(Rr)],G4.prototype,"spacing",2);gvi={type:"legend",optionsKey:"legend",identifier:"category",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"],moduleFactory:t=>new G4(t),packageType:"community"},R8e=class extends HG{constructor(t){super(),this.ctx=t,this.localeText=void 0}};Me([Lg(t=>{t.ctx.localeManager.setLocaleText(t.localeText)}),$e(jtt,{optional:!0})],R8e.prototype,"localeText",2);Me([Lg(t=>{t.ctx.localeManager.setLocaleTextFormatter(t.getLocaleText)}),$e(k3,{optional:!0})],R8e.prototype,"getLocaleText",2);vvi={type:"root",optionsKey:"locale",packageType:"community",chartTypes:["cartesian","polar","hierarchy","topology","flow-proportion"],moduleFactory:t=>new R8e(t)},xE=(()=>{let t=class extends Og{constructor(){super(...arguments),this.zIndex=3,this.centerX=0,this.centerY=0,this.width=8,this.height=16,this.gripLineGap=2,this.gripLineLength=8}setCenter(e,n){this.dirtyPath=!0,this.centerX=e,this.centerY=n}static align(e,n,i,r,s,o,a,l){let c=e.strokeWidth/2,d=e.align(i+s*a)+c,u=d+e.align(i+s*a,s*(l-a))-2*c,m=e.align(r+o/2)+c;e.setCenter(d,m),n.setCenter(u,m)}computeBBox(){let{centerX:e,centerY:n,width:i,height:r}=this,s=e-i/2,o=n-r/2;return new Os(s,o,i,r)}computeTransformedBBox(){return super.computeTransformedBBox()}isPointInPath(e,n){let i=this.transformPoint(e,n);return this.getBBox().containsPoint(i.x,i.y)}updatePath(){let{centerX:e,centerY:n,path:i,strokeWidth:r,gripLineGap:s,gripLineLength:o}=this,a=this.layerManager?.canvas?.pixelRatio??1;i.clear();let l=Math.floor(this.width/2*a)/a,c=Math.floor(this.height/2*a)/a;i.moveTo(e-l,n-c),i.lineTo(e+l,n-c),i.lineTo(e+l,n+c),i.lineTo(e-l,n+c),i.closePath();let d=Math.floor((s+r)/2*a)/a,u=Math.floor(o/2*a)/a;i.moveTo(e-d,n-u),i.lineTo(e-d,n+u),i.moveTo(e+d,n-u),i.lineTo(e+d,n+u)}};return t.className="RangeHandle",t})();Me([$e(Rr),Ss({redraw:3,type:"path"})],xE.prototype,"width",2);Me([$e(Rr),Ss({redraw:3,type:"path"})],xE.prototype,"height",2);Me([$e(Rr),Ss({redraw:3,type:"path"})],xE.prototype,"gripLineGap",2);Me([$e(Rr),Ss({redraw:3,type:"path"})],xE.prototype,"gripLineLength",2);yvi=(()=>{let t=class extends Og{constructor(){super(...arguments),this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1}layout(e,n,i,r){this.x=e,this.y=n,this.width=i,this.height=r,this.dirtyPath=!0}update(e,n){this.min=isNaN(e)?this.min:e,this.max=isNaN(n)?this.max:n,this.dirtyPath=!0}computeBBox(){let{x:e,y:n,width:i,height:r}=this;return new Os(e,n,i,r)}computeVisibleRangeBBox(){let{x:e,y:n,width:i,height:r,min:s,max:o}=this,a=e+i*s,l=e+i*o;return new Os(a,n,l-a,r)}updatePath(){let{path:e,x:n,y:i,width:r,height:s,min:o,max:a,strokeWidth:l}=this,c=l/2;e.clear();let d=this.align(n)+c,u=this.align(i)+c,m=d+this.align(n,r)-2*c,f=u+this.align(i,s)-2*c;e.moveTo(d,u),e.lineTo(m,u),e.lineTo(m,f),e.lineTo(d,f),e.closePath();let _=this.align(n+r*o)+c,x=_+this.align(n+r*o,r*(a-o))-2*c;e.moveTo(_,u),e.lineTo(_,f),e.lineTo(x,f),e.lineTo(x,u),e.closePath()}};return t.className="RangeMask",t})(),_vi=class extends xo{constructor(t){super({name:"rangeSelectorGroup",layer:!0,zIndex:14}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.isContainerNode=!0,this.background=new xo({name:"navigator-background"}),this.background.zIndex=1,this.appendChild(this.background),this.append(t)}layout(t,e,n,i,r,s){this.x=t,this.y=e,this.width=n,this.height=i,this.lOffset=r,this.rOffset=s,this.background.translationX=t,this.background.translationY=e}updateBackground(t,e){t!=null&&this.background.removeChild(t),e!=null&&this.background.appendChild(e)}computeBBox(){let{x:t,y:e,width:n,height:i,lOffset:r,rOffset:s}=this;return new Os(t-r,e,n+(r+s),i)}},Aw=class extends HG{constructor(t){super(),this.ctx=t,this.miniChart=void 0,this.enabled=!1,this.mask=new yvi,this.minHandle=new xE,this.maxHandle=new xE,this.maskVisibleRange={id:"navigator-mask-visible-range",getBBox:()=>this.mask.computeVisibleRangeBBox(),computeTransformedBBox:()=>this.mask.computeVisibleRangeBBox()},this.height=30,this.spacing=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new _vi([this.mask,this.minHandle,this.maxHandle]),this._min=0,this._max=1,this.minRange=.001;let e=t.regionManager.addRegion("navigator",this.rangeSelector),n=25;this.destroyFns.push(t.scene.attachNode(this.rangeSelector),e.addListener("hover",i=>this.onHover(i),n),e.addListener("drag-start",i=>this.onDragStart(i),n),e.addListener("drag",i=>this.onDrag(i),n),e.addListener("drag-end",()=>this.onDragEnd(),n),e.addListener("leave",i=>this.onLeave(i),n),this.ctx.localeManager.addListener("locale-changed",()=>this.updateZoom()),t.zoomManager.addListener("zoom-change",i=>this.onZoomChange(i))),this.proxyNavigatorToolbar=this.ctx.proxyInteractionService.createProxyContainer({type:"toolbar",id:"navigator-toolbar",classList:["ag-charts-proxy-navigator-toolbar"],ariaOrientation:"vertical",ariaLabel:{id:"ariaLabelNavigator"}}),this.updateGroupVisibility(),this.proxyNavigatorElements=[this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-min",ariaLabel:{id:"ariaLabelNavigatorMinimum"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,focusable:this.minHandle,onchange:i=>this.onMinSliderChange(i)}),this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-pan",ariaLabel:{id:"ariaLabelNavigatorRange"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,focusable:this.maskVisibleRange,onchange:i=>this.onPanSliderChange(i)}),this.ctx.proxyInteractionService.createProxyElement({type:"slider",id:"ag-charts-navigator-max",ariaLabel:{id:"ariaLabelNavigatorMaximum"},ariaOrientation:"horizontal",parent:this.proxyNavigatorToolbar,focusable:this.maxHandle,onchange:i=>this.onMaxSliderChange(i)})],Gte({orientation:"vertical",toolbar:this.proxyNavigatorToolbar,buttons:this.proxyNavigatorElements}),this.destroyFns.push(()=>{this.proxyNavigatorElements.forEach(i=>i.remove()),this.proxyNavigatorToolbar.remove()})}updateBackground(t,e){this.rangeSelector?.updateBackground(t,e)}updateGroupVisibility(){let{enabled:t}=this;this.rangeSelector==null||t===this.rangeSelector.visible||(this.rangeSelector.visible=t,this.proxyNavigatorToolbar.ariaHidden=(!t).toString(),t?this.updateZoom():this.ctx.zoomManager.updateZoom("navigator"))}performLayout(t){return O(this,null,function*(){let{shrinkRect:e}=t;if(this.enabled){let n=this.height+this.spacing;e.shrink(n,"bottom"),this.y=e.y+e.height+this.spacing}else this.y=0;return St(ve({},t),{shrinkRect:e})})}performCartesianLayout(t){return O(this,null,function*(){let{x:e,width:n}=t.seriesRect;if(this.enabled){let{y:i,height:r}=this;this.layoutNodes(e,i,n,r),fw(this.proxyNavigatorToolbar,{x:e,y:i,width:n,height:r}),this.proxyNavigatorToolbar.style.removeProperty("display")}else this.proxyNavigatorToolbar.style.display="none";this.x=e,this.width=n})}onHover(t){if(!this.enabled)return;let{mask:e,minHandle:n,maxHandle:i}=this,{offsetX:r,offsetY:s}=t;n.containsPoint(r,s)||i.containsPoint(r,s)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):e.computeVisibleRangeBBox().containsPoint(r,s)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator")}onDragStart(t){if(!this.enabled)return;let{mask:e,minHandle:n,maxHandle:i,x:r,width:s,_min:o}=this,{offsetX:a,offsetY:l}=t;n.zIndex<i.zIndex?i.containsPoint(a,l)?this.dragging="max":n.containsPoint(a,l)&&(this.dragging="min"):n.containsPoint(a,l)?this.dragging="min":i.containsPoint(a,l)&&(this.dragging="max"),this.dragging==null&&e.computeVisibleRangeBBox().containsPoint(a,l)&&(this.dragging="pan",this.panStart=(a-r)/s-o),this.dragging!=null&&this.ctx.zoomManager.fireZoomPanStartEvent("navigator")}onDrag(t){if(!this.enabled||this.dragging==null)return;let{dragging:e,minRange:n,panStart:i,x:r,width:s}=this,{_min:o,_max:a}=this,{offsetX:l}=t,c=(l-r)/s;if(e==="min")o=Wa(0,c,a-n);else if(e==="max")a=Wa(o+n,c,1);else if(e==="pan"&&i!=null){let d=a-o;o=Wa(0,c-i,1-d),a=o+d}this._min=o,this._max=a,this.updateZoom()}onDragEnd(){this.dragging=void 0}onLeave(t){this.ctx.cursorManager.updateCursor("navigator")}onZoomChange(t){let{x:e}=t;e&&(this._min=e.min,this._max=e.max,this.updateNodes(e.min,e.max),this.setPanSliderValue(e.min,e.max),this.setSliderRatio(this.proxyNavigatorElements[0],e.min),this.setSliderRatio(this.proxyNavigatorElements[2],e.max))}onPanSliderChange(t){let e=this.getSliderRatio(this.proxyNavigatorElements[1]),n=this._max-this._min;this._min=Wa(0,e,1-n),this._max=this._min+n,this.updateZoom()}onMinSliderChange(t){let e=this.proxyNavigatorElements[0];this._min=this.setSliderRatioClamped(e,0,this._max-this.minRange),this.updateZoom()}onMaxSliderChange(t){let e=this.proxyNavigatorElements[2];this._max=this.setSliderRatioClamped(e,this._min+this.minRange,1),this.updateZoom()}setPanSliderValue(t,e){this.proxyNavigatorElements[1].value=`${Math.round(t*100)}`,this.proxyNavigatorElements[1].ariaValueText=this.ctx.localeManager.t("ariaValuePanRange",{min:t,max:e})}setSliderRatioClamped(t,e,n){let i=this.getSliderRatio(t),r=Wa(e,i,n);return r!==i&&this.setSliderRatio(t,r),r}setSliderRatio(t,e){let n=Math.round(e*100);t.value=`${n}`,t.ariaValueText=UCe(n)}getSliderRatio(t){return parseFloat(t.value)/100}layoutNodes(t,e,n,i){let{rangeSelector:r,mask:s,minHandle:o,maxHandle:a,_min:l,_max:c}=this;r.layout(t,e,n,i,o.width/2,a.width/2),s.layout(t,e,n,i),xE.align(o,a,t,e,n,i,l,c),l+(c-l)/2<.5?(o.zIndex=3,a.zIndex=4):(o.zIndex=4,a.zIndex=3),[o,this.maskVisibleRange,a].forEach((d,u)=>{let m=d.getBBox(),f={x:m.x-t,y:m.y-e,height:m.height,width:m.width};fw(this.proxyNavigatorElements[u],f)})}updateNodes(t,e){this.mask.update(t,e)}updateZoom(){if(!this.enabled)return;let{_min:t,_max:e}=this;if(t==null||e==null)return;let n=i=>{this.min==null&&this.max==null||yr.warnOnce(`Could not apply [navigator.min] or [navigator.max] as [${i}] has modified the initial zoom state.`)};return this.ctx.zoomManager.updateZoom("navigator",{x:{min:t,max:e}},!1,n)}};Me([$e(Us,{optional:!0})],Aw.prototype,"miniChart",2);Me([$e(Jo),Lg(t=>t.updateGroupVisibility())],Aw.prototype,"enabled",2);Me([$e(Rr)],Aw.prototype,"height",2);Me([$e(Rr)],Aw.prototype,"spacing",2);Me([Fg({newValue(t){this._min=t,this.updateZoom()}}),$e(I6(ud,ER("max")),{optional:!0})],Aw.prototype,"min",2);Me([Fg({newValue(t){this._max=t,this.updateZoom()}}),$e(I6(ud,MR("min")),{optional:!0})],Aw.prototype,"max",2);urt={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],moduleFactory:t=>new Aw(t),themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:9,height:16,gripLineGap:1,gripLineLength:8}}}};hrt=(t=>(t[t.SMALL=12]="SMALL",t[t.MEDIUM=13]="MEDIUM",t[t.LARGE=17]="LARGE",t))(hrt||{}),prt=(t=>(t.NORMAL="normal",t.BOLD="bold",t.BOLDER="bolder",t.LIGHTER="lighter",t))(prt||{}),mrt=(t=>(t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t))(mrt||{}),frt=(t=>(t.CATEGORY="category",t.ORDINAL_TIME="ordinal-time",t.NUMBER="number",t.TIME="time",t.LOG="log",t))(frt||{}),grt=(t=>(t.ANGLE_CATEGORY="angle-category",t.ANGLE_NUMBER="angle-number",t.RADIUS_CATEGORY="radius-category",t.RADIUS_NUMBER="radius-number",t))(grt||{}),vrt=(t=>(t.CIRCLE="circle",t.POLYGON="polygon",t))(vrt||{}),uG=Symbol("is-dark-theme"),sm=Symbol("default-font"),t0=Symbol("default-label-colour"),yrt=Symbol("default-inverted-label-colour"),OE=Symbol("default-inside-series-label-colour"),bE=Symbol("default-muted-label-colour"),bR=Symbol("default-axis-grid-colour"),Xee=Symbol("default-axis-line-colour"),hG=Symbol("default-cross-lines-colour"),lte=Symbol("default-background-colour"),NE=Symbol("default-shadow-colour"),Cvi=Symbol("default-colours"),lw=Symbol("default-padding"),hE=Symbol("default-caption-layout-style"),pE=Symbol("default-caption-alignment"),F8e=Symbol("palette-up-stroke"),L8e=Symbol("palette-down-stroke"),O8e=Symbol("palette-up-fill"),N8e=Symbol("palette-down-fill"),pG=Symbol("palette-neutral-stroke"),V8e=Symbol("palette-neutral-fill"),_rt=Symbol("palette-alt-up-stroke"),Crt=Symbol("palette-alt-down-stroke"),xrt=Symbol("palette-alt-up-fill"),brt=Symbol("palette-alt-down-fill"),wrt=Symbol("palette-gray-fill"),B8e=Symbol("palette-gray-stroke"),z8e=Symbol("default-polar-series-stroke"),W4=Symbol("default-diverging-series-colour-range"),H8e=Symbol("default-hierarchy-fills"),G8e=Symbol("default-hierarchy-strokes"),U4=Symbol("default-annotation-stroke"),W8e=Symbol("default-text-annotation-color"),j4=Symbol("default-annotation-background-fill"),U8e=Symbol("default-annotation-handle-fill"),j8e=Symbol("default-textbox-fill"),$8e=Symbol("default-textbox-stroke"),K8e=Symbol("default-textbox-color"),ZG=Symbol("default-toolbar-position"),Bx=Symbol("default-gridline-enabled");Pee=null;Y8e=class extends pl{constructor(){super(...arguments),this._dirty=3}markDirty(t,e=1){this._dirty<e&&(this._dirty=e)}markClean(t){this._dirty=0}isDirty(){return this._dirty>0}},h_=class extends Y8e{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};Me([$e(Jo),Ss({redraw:3})],h_.prototype,"enabled",2);Me([$e(kd),Ss({redraw:3})],h_.prototype,"color",2);Me([$e(wu),Ss({redraw:3})],h_.prototype,"xOffset",2);Me([$e(wu),Ss({redraw:3})],h_.prototype,"yOffset",2);Me([$e(Rr),Ss({redraw:3})],h_.prototype,"blur",2);Trt=au(t=>irt(t)||typeof t=="function"&&Object.create(t.prototype)instanceof w2,"a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),P3=class extends Y8e{constructor(){super(...arguments),this.enabled=!0,this.shape=_E,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){let{size:t,shape:e,fill:n,fillOpacity:i,stroke:r,strokeWidth:s,strokeOpacity:o}=this;return{size:t,shape:e,fill:n,fillOpacity:i,stroke:r,strokeWidth:s,strokeOpacity:o}}getDiameter(){return this.size+this.strokeWidth}};Me([$e(Jo),Ss({redraw:3})],P3.prototype,"enabled",2);Me([$e(Trt),Ss({redraw:3})],P3.prototype,"shape",2);Me([$e(Rr),Ss({redraw:3})],P3.prototype,"size",2);Me([$e(kd,{optional:!0}),Ss({redraw:3})],P3.prototype,"fill",2);Me([$e(ud),Ss({redraw:3})],P3.prototype,"fillOpacity",2);Me([$e(kd,{optional:!0}),Ss({redraw:3})],P3.prototype,"stroke",2);Me([$e(Rr),Ss({redraw:3})],P3.prototype,"strokeWidth",2);Me([$e(ud),Ss({redraw:3})],P3.prototype,"strokeOpacity",2);Me([$e(k3,{optional:!0}),Ss({redraw:3})],P3.prototype,"itemStyler",2);Drt=class extends pl{constructor(){super(...arguments),this.enabled=!1}};Me([$e(Jo)],Drt.prototype,"enabled",2);Ng=class extends pl{constructor(){super(...arguments),this.enabled=!0,this.interaction=new Drt,this.position=new kR,this.range=void 0}toTooltipHtml(t,e){return this.renderer?vR(this.renderer(e),t):vR(t)}};Me([$e(Jo)],Ng.prototype,"enabled",2);Me([$e(Jo,{optional:!0})],Ng.prototype,"showArrow",2);Me([$e(k3,{optional:!0})],Ng.prototype,"renderer",2);Me([$e(Us)],Ng.prototype,"interaction",2);Me([$e(Us)],Ng.prototype,"position",2);Me([$e(Ete,{optional:!0})],Ng.prototype,"range",2);Ert=Su(["linear","smooth","step"],"a line style"),Mrt=Su(["start","middle","end"]),HR=class extends pl{constructor(){super(...arguments),this.type="linear",this.tension=1,this.position="end"}};Me([$e(Ert)],HR.prototype,"type",2);Me([$e(ud)],HR.prototype,"tension",2);Me([$e(Mrt)],HR.prototype,"position",2);v1=class extends Xx{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new HR,this.shadow=new h_,this.marker=new P3,this.label=new f1,this.tooltip=new Ng,this.connectMissingData=!1}};Me([$e(Gr)],v1.prototype,"xKey",2);Me([$e(Gr,{optional:!0})],v1.prototype,"xName",2);Me([$e(Gr)],v1.prototype,"yKey",2);Me([$e(Gr,{optional:!0})],v1.prototype,"yName",2);Me([$e(Rr,{optional:!0})],v1.prototype,"normalizedTo",2);Me([$e(kd)],v1.prototype,"fill",2);Me([$e(ud)],v1.prototype,"fillOpacity",2);Me([$e(kd)],v1.prototype,"stroke",2);Me([$e(Rr)],v1.prototype,"strokeWidth",2);Me([$e(ud)],v1.prototype,"strokeOpacity",2);Me([$e(Kx)],v1.prototype,"lineDash",2);Me([$e(Rr)],v1.prototype,"lineDashOffset",2);Me([$e(Us)],v1.prototype,"interpolation",2);Me([$e(Us)],v1.prototype,"shadow",2);Me([$e(Us)],v1.prototype,"marker",2);Me([$e(Us)],v1.prototype,"label",2);Me([$e(Us)],v1.prototype,"tooltip",2);Me([$e(Jo)],v1.prototype,"connectMissingData",2);wvi={start:0,middle:.5,end:1};Lee=.05;Oee=.05;kvi={start:0,middle:.5,end:1};Vrt=(t=>(t[t.Fill=0]="Fill",t[t.Stroke=1]="Stroke",t[t.Marker=2]="Marker",t[t.Label=3]="Label",t))(Vrt||{});Ovi=(()=>{let t=class extends Mw{constructor(e){super({moduleCtx:e,directionKeys:RE,directionNames:FE,pathsPerSeries:["fill","stroke"],pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[1,0],animationResetFns:{path:txe({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:Qx,marker:(n,i)=>ve(ve({},XG(n)),EG(n,i))}}),this.properties=new v1}processData(e){return O(this,null,function*(){if(this.data==null||!this.properties.isValid())return;let{data:n,visible:i,seriesGrouping:{groupIndex:r=this.id,stackCount:s=1}={}}=this,{xKey:o,yKey:a,connectMissingData:l,normalizedTo:c}=this.properties,d=!this.ctx.animationManager.isSkipped(),u=this.axes.x?.scale,m=this.axes.y?.scale,{isContinuousX:f,xScaleType:_,yScaleType:x}=this.getScaleInformation({xScale:u,yScale:m}),D={value:`area-stack-${r}-yValue`,values:`area-stack-${r}-yValues`,stack:`area-stack-${r}-yValue-stack`,marker:`area-stack-${r}-yValues-marker`},E=[];vG(c)&&E.push(Bte(Object.values(D),c,"range")),!f&&d&&this.processedData&&E.push(PE(this.processedData)),d&&E.push(FR());let M={invalidValue:null};l&&s>1&&(M.invalidValue=0),i||(M.forceValue=0),yield this.requestDataModel(e,n,{props:[B0(o,_,{id:"xValue"}),Qc(a,x,ve({id:"yValueRaw"},M)),...$nt(a,x,St(ve({id:"yValueStack"},M),{groupId:D.stack})),Qc(a,x,St(ve({id:"yValue"},M),{groupId:D.value})),...vw(a,"window","current",St(ve({id:"yValueEnd"},M),{groupId:D.values}),x),...vw(a,"normal","current",St(ve({id:"yValueCumulative"},M),{groupId:D.marker}),x),...E],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")})}getSeriesDomain(e){let{processedData:n,dataModel:i,axes:r}=this;if(!n||!i||n.data.length===0)return[];let s=r.x,o=r.y,a=i.resolveProcessedDataDefById(this,"xValue"),l=i.getDomain(this,"xValue","key",n),c=i.getDomain(this,"yValueEnd","value",n);if(e==="x")return a?.def.type==="key"&&a.def.valueType==="category"?l:M3(sC(l),s);if(o instanceof qG||o instanceof Hte)return M3(c,o);{let d=[c[0]>0?0:c[0],c[1]<0?0:c[1]];return M3(d,o)}}createNodeData(){return O(this,null,function*(){let{axes:e,data:n,processedData:{data:i}={},dataModel:r}=this,s=e.x,o=e.y;if(!s||!o||!n||!r||!this.properties.isValid())return;let{yKey:a,xKey:l,marker:c,label:d,fill:u,stroke:m,connectMissingData:f}=this.properties,{scale:_}=s,{scale:x}=o,{isContinuousY:D}=this.getScaleInformation({xScale:_,yScale:x}),E=(_.bandwidth??0)/2,M=r.resolveProcessedDataDefsByIds(this,["yValueEnd","yValueRaw","yValueCumulative"]),I=r.resolveProcessedDataIndexById(this,"yValueStack"),z=(at,yt,_t)=>{let Re;return(vG(this.properties.normalizedTo)?D&&Rte(_t):!isNaN(_t))&&(Re=yt),{x:_.convert(at)+E,y:x.convert(Re),size:c.size}},G=a,A=[],Y=[],{visibleSameStackCount:X}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this),ne=-1;i?.forEach(at=>{let{keys:yt,keys:[_t],datum:Re,values:ot}=at;ot.forEach((jt,zt)=>{ne++;let qt=Re[zt],ui=r.resolveProcessedDataDefsValues(M,{keys:yt,values:jt}),{yValueRaw:_i,yValueCumulative:ln,yValueEnd:Rn}=ui,bi=Number.isFinite(_i),Mn=z(_t,+ln,_i);if(bi&&c&&Y.push({index:ne,series:this,itemId:G,datum:qt,midPoint:{x:Mn.x,y:Mn.y},cumulativeValue:Rn,yValue:_i,xValue:_t,yKey:a,xKey:l,point:Mn,fill:c.fill??u,stroke:c.stroke??m,strokeWidth:c.strokeWidth??this.getStrokeWidth(this.properties.strokeWidth)}),bi&&d){let Fn=this.getLabelText(d,{value:_i,datum:qt,xKey:l,yKey:a,xName:this.properties.xName,yName:this.properties.yName},or=>Tc(or)?or.toFixed(2):String(or));A.push({index:ne,series:this,itemId:a,datum:qt,x:Mn.x,y:Mn.y,label:Fn?{text:Fn,fontStyle:d.fontStyle,fontWeight:d.fontWeight,fontSize:d.fontSize,fontFamily:d.fontFamily,textAlign:"center",textBaseline:"bottom",fill:d.color}:void 0})}})});let{interpolation:pe}=this.properties,ce=at=>{let yt,_t=at.map(Re=>Re.point);switch(pe.type){case"linear":yt=bvi(_t);break;case"smooth":yt=Tvi(_t,pe.tension);break;case"step":yt=Svi(_t,pe.position);break}return yt.map((Re,ot)=>({span:Re,xValue0:at[ot].xDatum,yValue0:at[ot].yDatum,xValue1:at[ot+1].xDatum,yValue1:at[ot+1].yDatum}))},ie=at=>at.flatMap(yt=>Array.isArray(yt)?ce(yt):new Array(yt.skip).fill(null)),le=i?.flatMap(at=>{let{keys:[yt],values:_t}=at;return _t.map(Re=>({xDatum:yt,values:Re}))}),Se=(at,yt)=>({point:{x:_.convert(at)+E,y:x.convert(yt)},xDatum:at,yDatum:yt}),je=at=>{let yt=[];if(le==null)return[];for(let _t=0;_t<le.length;_t+=1){let{xDatum:Re,values:ot}=le[_t],jt=ot[I],zt=jt[at],qt=Number.isFinite(zt);if(f&&!qt)continue;let ui=le[_t-1]?.values[I],_i=le[_t+1]?.values[I],ln=0,Rn=0;for(let Mn=0;Mn<=at;Mn+=1){let Fn=jt[Mn];if(Number.isFinite(Fn)){let or=ui==null||Number.isFinite(ui[Mn]),wn=_i==null||Number.isFinite(_i[Mn]);or&&(ln+=Fn),wn&&(Rn+=Fn)}}let bi=yt[yt.length-1];if(!f&&(ln!==Rn||!qt))if(!qt&&Array.isArray(bi)&&bi.length===1)yt[yt.length-1]={skip:1};else{let Mn=Se(Re,ln),Fn=Se(Re,Rn);Array.isArray(bi)?bi.push(Mn):bi!=null&&(bi.skip+=1),yt.push(qt?[Fn]:{skip:0})}else{let Mn=Math.max(ln,Rn),Fn=Se(Re,Mn);Array.isArray(bi)?bi.push(Fn):bi!=null?(bi.skip+=1,yt.push([Fn])):yt.push([Fn])}}return ie(yt)},ze=this.seriesGrouping?.stackIndex??0,Ge=()=>{if(le==null)return[];let at=le.map(({xDatum:yt,values:_t})=>{let ot=_t[I][ze];if(!(f&&!Number.isFinite(ot)))return Se(yt,0)}).filter(yt=>yt!=null);return ce(at)},Ae=je(ze),Ye=Ae.map(()=>null);for(let at=ze-1;at>=-1;at-=1){let yt;for(let _t=0;_t<Ye.length;_t+=1)Ye[_t]==null&&(yt??(yt=at!==-1?je(at):Ge()),Ye[_t]=yt[_t])}let ft=Ae.map((at,yt)=>at??Ye[yt]),Ft=Ae.filter(at=>at!=null);return{itemId:G,fillData:{itemId:G,spans:ft,phantomSpans:Ye},strokeData:{itemId:G,spans:Ft},labelData:A,nodeData:Y,scales:this.calculateScaling(),visible:this.visible,stackVisible:X>0}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){let{shape:e}=this.properties.marker,n=iC(e);return new n}updatePathNodes(e){return O(this,null,function*(){let{opacity:n,visible:i,animationEnabled:r}=e,[s,o]=e.paths,a=this.getStrokeWidth(this.properties.strokeWidth);o.setProperties({tag:1,fill:void 0,lineJoin:o.lineCap="round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:a,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:n,visible:i}),s.setProperties({tag:0,stroke:void 0,lineJoin:"round",pointerEvents:1,fill:this.properties.fill,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,strokeOpacity:this.properties.strokeOpacity,fillShadow:this.properties.shadow,opacity:n,visible:i||r,strokeWidth:a}),ute(this,o),ute(this,s)})}updatePaths(e){return O(this,null,function*(){this.updateAreaPaths(e.paths,e.contextData)})}updateAreaPaths(e,n){this.updateFillPath(e,n),this.updateStrokePath(e,n)}updateFillPath(e,n){let{spans:i,phantomSpans:r}=n.fillData,[s]=e,{path:o}=s;o.clear(!0);for(let a=0;a<i.length;a+=1){let{span:l}=i[a],c=r[a].span;mG(o,l,1),mG(o,krt(c),2),o.closePath()}s.checkPathDirty()}updateStrokePath(e,n){let{spans:i}=n.strokeData,[,r]=e,{path:s}=r;s.clear(!0);for(let{span:o}of i)mG(s,o);r.checkPathDirty()}updateMarkerSelection(e){return O(this,null,function*(){let{nodeData:n,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?n:[])})}updateMarkerNodes(e){return O(this,null,function*(){let{markerSelection:n,isHighlight:i}=e,{xKey:r,yKey:s,marker:o,fill:a,stroke:l,strokeWidth:c,fillOpacity:d,strokeOpacity:u,highlightStyle:m}=this.properties,f=ql(i&&m.item,o.getStyle(),{fill:a,stroke:l,strokeWidth:c,fillOpacity:d,strokeOpacity:u});n.each((_,x)=>{this.updateMarkerStyle(_,o,{datum:x,highlighted:i,xKey:r,yKey:s},f)}),i||this.properties.marker.markClean()})}updateLabelSelection(e){return O(this,null,function*(){let{labelData:n,labelSelection:i}=e;return i.update(n,r=>{r.tag=3})})}updateLabelNodes(e){return O(this,null,function*(){let{labelSelection:n}=e,{enabled:i,fontStyle:r,fontWeight:s,fontSize:o,fontFamily:a,color:l}=this.properties.label;n.each((c,d)=>{let{x:u,y:m,label:f}=d;f&&i&&this.visible?(c.fontStyle=r,c.fontWeight=s,c.fontSize=o,c.fontFamily=a,c.textAlign=f.textAlign,c.textBaseline=f.textBaseline,c.text=f.text,c.x=u,c.y=m-10,c.fill=l,c.visible=!0):c.visible=!1})})}getTooltipHtml(e){let{id:n,axes:i,dataModel:r}=this,{xKey:s,xName:o,yName:a,tooltip:l,marker:c}=this.properties,{yKey:d,xValue:u,yValue:m,datum:f,itemId:_}=e,x=i.x,D=i.y;if(!this.properties.isValid()||!(x&&D&&Tc(m))||!r)return qx;let E=x.formatDatum(u),M=D.formatDatum(m),I=Lh(a),z=Lh(E+": "+M),G=ql({fill:this.properties.fill},c.getStyle(),{stroke:this.properties.stroke,strokeWidth:this.properties.strokeWidth}),{fill:A}=this.getMarkerStyle(c,{datum:e,xKey:s,yKey:d,highlighted:!1},G);return l.toTooltipHtml({title:I,content:z,backgroundColor:A},{datum:f,itemId:_,xKey:s,xName:o,yKey:d,yName:a,color:A,title:I,seriesId:n})}getLegendData(e){if(!this.data?.length||!this.properties.isValid()||!this.properties.showInLegend||e!=="category")return[];let{yKey:n,yName:i,fill:r,stroke:s,fillOpacity:o,strokeOpacity:a,strokeWidth:l,lineDash:c,marker:d,visible:u,legendItemName:m}=this.properties,f=!d.enabled||d.fill===void 0;return[{legendType:e,id:this.id,itemId:n,seriesId:this.id,enabled:u,label:{text:m??i??n},symbols:[{marker:{shape:d.shape,fill:f?r:d.fill,fillOpacity:f?o:d.fillOpacity,stroke:d.stroke??s,strokeOpacity:d.strokeOpacity??a,strokeWidth:d.strokeWidth??0,enabled:d.enabled||l<=0},line:{stroke:s,strokeOpacity:a,strokeWidth:l,lineDash:c}}],legendItemName:m}]}animateEmptyUpdateReady(e){let{markerSelection:n,labelSelection:i,contextData:r,paths:s}=e,{animationManager:o}=this.ctx;this.updateAreaPaths(s,r),exe(this,o,...s),Ef([n],EG),Z8e(this,o,n),Xc(this,"labels",o,i)}animateReadyResize(e){let{contextData:n,paths:i}=e;this.updateAreaPaths(i,n),super.animateReadyResize(e)}animateWaitingUpdateReady(e){let{animationManager:n}=this.ctx,{markerSelection:i,labelSelection:r,contextData:s,paths:o,previousContextData:a}=e,[l,c]=o;if(l==null&&c==null)return;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);let d=()=>{this.resetPathAnimation(e),this.updateAreaPaths(o,s),this.updateStrokePath(o,s)},u=()=>{n.skipCurrentBatch(),d()};if(s==null||a==null){d(),DG(this,n,"added",i),fG(this,"fill_path_properties",n,"add",l),fG(this,"stroke",n,"trailing",c),Xc(this,"labels",n,r);return}let m=Brt(s,a,this.processedData?.reduced?.diff);if(m===void 0){u();return}else if(m.status==="no-op")return;DG(this,n,void 0,i),om(this.id,"fill_path_properties",n,[l],m.fill.pathProperties),Srt(this.id,"fill_path_update",n,[l],m.fill.path),this.updateStrokePath(o,s),fG(this,"stroke",n,"trailing",c),Xc(this,"labels",n,r)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new xo}getFormattedMarkerStyle(e){let{xKey:n,yKey:i}=e;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:n,yKey:i,highlighted:!0})}computeFocusBounds(e){return QG(this,e)}};return t.className="AreaSeries",t.type="area",t})(),Nvi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",moduleFactory:t=>new Ovi(t),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{nodeClickRange:"nearest",tooltip:{position:{type:"node"}},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:NE,xOffset:3,yOffset:3,blur:5},interpolation:{type:"linear",tension:1,position:"end"},marker:{enabled:!1,shape:"circle",size:7,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:sm,color:t0}}},paletteFactory:t=>{let{marker:e}=Ute(t);return{fill:e.fill,stroke:e.stroke,marker:e}}};axe=class extends Xx{constructor(){super(...arguments),this.direction="vertical"}};Me([$e(Ztt)],axe.prototype,"direction",2);Hrt=class extends Mw{constructor(){super(...arguments),this.groupScale=new _w,this.smallestDataInterval=void 0,this.largestDataInterval=void 0}getBandScalePadding(){return{inner:.3,outer:.15}}shouldFlipXY(){return!this.isVertical()}isVertical(){return this.properties.direction==="vertical"}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){let t=this.getBarDirection();return this.axes[t]}getCategoryAxis(){let t=this.getCategoryDirection();return this.axes[t]}updateGroupScale(t){let{groupScale:e,smallestDataInterval:n,ctx:{seriesStateManager:i}}=this,r=t.scale,s=Ud.is(r)?r.calcBandwidth(n):r.bandwidth,o=[],{index:a,visibleGroupCount:l}=i.getVisiblePeerGroupIndex(this);for(let d=0;d<l;d++)o.push(String(d));return e.domain=o,e.range=[0,s??0],t instanceof PR?e.paddingInner=t.groupPaddingInner:t instanceof yR?e.padding=.1:e.padding=0,e.round=e.padding!==0,{barWidth:e.bandwidth>=1?e.bandwidth:e.rawBandwidth,groupIndex:a}}resolveKeyDirection(t){return this.getBarDirection()==="x"?t==="x"?"y":"x":t}initQuadTree(t){sxe(t,this.datumNodesIter())}pickNodeClosestDatum(t){return oxe(this,t)}},Grt=class extends f1{constructor(){super(...arguments),this.placement="inside"}};Me([$e(Xtt)],Grt.prototype,"placement",2);Fm=class extends axe{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.crisp=void 0,this.shadow=new h_,this.label=new Grt,this.tooltip=new Ng}};Me([$e(Gr)],Fm.prototype,"xKey",2);Me([$e(Gr,{optional:!0})],Fm.prototype,"xName",2);Me([$e(Gr)],Fm.prototype,"yKey",2);Me([$e(Gr,{optional:!0})],Fm.prototype,"yName",2);Me([$e(Gr,{optional:!0})],Fm.prototype,"yFilterKey",2);Me([$e(Gr,{optional:!0})],Fm.prototype,"stackGroup",2);Me([$e(wu,{optional:!0})],Fm.prototype,"normalizedTo",2);Me([$e(kd)],Fm.prototype,"fill",2);Me([$e(ud)],Fm.prototype,"fillOpacity",2);Me([$e(kd)],Fm.prototype,"stroke",2);Me([$e(Rr)],Fm.prototype,"strokeWidth",2);Me([$e(ud)],Fm.prototype,"strokeOpacity",2);Me([$e(Kx)],Fm.prototype,"lineDash",2);Me([$e(Rr)],Fm.prototype,"lineDashOffset",2);Me([$e(Rr)],Fm.prototype,"cornerRadius",2);Me([$e(Jo,{optional:!0})],Fm.prototype,"crisp",2);Me([$e(k3,{optional:!0})],Fm.prototype,"itemStyler",2);Me([$e(Us,{optional:!0})],Fm.prototype,"shadow",2);Me([$e(Us)],Fm.prototype,"label",2);Me([$e(Us)],Fm.prototype,"tooltip",2);j5e=t=>AG(t.yValue??0);zvi=(()=>{let t=class extends Hrt{constructor(e){super({moduleCtx:e,directionKeys:RE,directionNames:FE,pickModes:[3,0],pathsPerSeries:[],hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationAlwaysUpdateSelections:!0,animationResetFns:{datum:IG,label:Qx}}),this.properties=new Fm}crossFilteringEnabled(){return this.properties.yFilterKey!=null&&(this.seriesGrouping==null||this.seriesGrouping.stackIndex===0)}processData(e){return O(this,null,function*(){if(!this.properties.isValid()||!this.data)return;let{seriesGrouping:{groupIndex:n=this.id}={},data:i=[]}=this,{xKey:r,yKey:s,yFilterKey:o,normalizedTo:a}=this.properties,l=!this.ctx.animationManager.isSkipped(),c=this.getCategoryAxis()?.scale,d=this.getValueAxis()?.scale,{isContinuousX:u,xScaleType:m,yScaleType:f}=this.getScaleInformation({xScale:c,yScale:d}),_=`bar-stack-${n}-yValues`,x=`${_}-trailing`,D=[];Tc(a)&&D.push(Bte([_,x],Math.abs(a),"range")),l&&this.processedData&&D.push(PE(this.processedData)),l&&D.push(FR());let E=this.visible?{}:{forceValue:0},{processedData:M}=yield this.requestDataModel(e,i,{props:[B0(r,m,{id:"xValue"}),Qc(s,f,ve({id:"yValue-raw",invalidValue:null},E)),...this.crossFilteringEnabled()?[Qc(o,f,ve({id:"yFilterValue",invalidValue:null},E))]:[],...vw(s,"normal","current",ve({id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:_,separateNegative:!0},E),f),...vw(s,"trailing","current",ve({id:"yValue-start",invalidValue:null,missingValue:0,groupId:x,separateNegative:!0},E),f),...u?[Vnt,Bnt]:[],...D],groupByKeys:!0,groupByData:!1});this.smallestDataInterval=M.reduced?.smallestKeyInterval,this.largestDataInterval=M.reduced?.largestKeyInterval,this.animationState.transition("updateData")})}getSeriesDomain(e){let{processedData:n,dataModel:i,smallestDataInterval:r}=this;if(!n||!i||n.data.length===0)return[];let s=this.getCategoryAxis(),o=this.getValueAxis(),a=i.resolveProcessedDataDefById(this,"xValue"),l=i.getDomain(this,"xValue","key",n),c=i.getDomain(this,"yValue-end","value",n),d=this.crossFilteringEnabled()?i.getDomain(this,"yFilterValue","value",n):void 0;if(d!=null&&(c=[Math.min(c[0],d[0]),Math.max(c[1],d[1])]),e===this.getCategoryDirection()){if(a?.def.type==="key"&&a.def.valueType==="category")return l;let u=Tc(r)?r*.5:0,m=sC(l)??[NaN,NaN],f=m[0]+-u,_=m[1]+u;return M3([f,_],s)}else{if(this.getValueAxis()instanceof qG)return M3(c,o);{let u=[Math.min(0,c[0]),Math.max(0,c[1])];return M3(u,o)}}}createNodeData(){return O(this,null,function*(){let{dataModel:e}=this,n=this.getCategoryAxis(),i=this.getValueAxis();if(!e||!n||!i||!this.properties.isValid())return;let r=n.scale,s=i.scale,{xKey:o,yKey:a,xName:l,yName:c,fill:d,stroke:u,strokeWidth:m,cornerRadius:f,legendItemName:_,label:x}=this.properties,D=i.isReversed(),{barWidth:E,groupIndex:M}=this.updateGroupScale(n),I=Ud.is(r)?E*-.5:0,z=e.resolveProcessedDataIndexById(this,"xValue"),G=e.resolveProcessedDataIndexById(this,"yValue-raw"),A=this.crossFilteringEnabled()?e.resolveProcessedDataIndexById(this,"yFilterValue"):void 0,Y=e.resolveProcessedDataIndexById(this,"yValue-start"),X=e.resolveProcessedDataIndexById(this,"yValue-end"),ne=e.resolveProcessedDataIndexById(this,"yValue-range"),pe=!this.ctx.animationManager.isSkipped(),ce=({datum:Ge,valueIndex:Ae,xValue:Ye,yValue:ft,cumulativeValue:Ft,phantom:Tt,currY:at,prevY:yt,isPositive:_t,yRange:Re,labelText:ot,crossScale:jt=1})=>{let zt=r.convert(Ye),qt=_t!==D,ui=zt+ie.convert(String(M))+I,_i=s.convert(at),ln=s.convert(yt),Rn=this.getBarDirection()==="x",bi=s.convert(Re),Mn=s.convert(0),Fn=E*.5*(1-jt),or={x:Rn?Math.min(_i,ln):ui+Fn,y:Rn?ui+Fn:Math.min(_i,ln),width:Rn?Math.abs(ln-_i):E*jt,height:Rn?E*jt:Math.abs(ln-_i)},wn=new Os(or.x,or.y,or.width,or.height),gn={x:Rn?Math.min(Mn,bi):ui+Fn,y:Rn?ui+Fn:Math.min(Mn,bi),width:Rn?Math.abs(Mn-bi):E*jt,height:Rn?E*jt:Math.abs(Mn-bi)},{fontStyle:ts,fontWeight:no,fontSize:Ho,fontFamily:kn,color:Ts,placement:ea}=x,co=this.shouldFlipXY()?or.height:or.width;return{series:this,itemId:Tt?Gx(a,Tt):a,datum:Ge,valueIndex:Ae,cumulativeValue:Ft,phantom:Tt,xValue:Ye,yValue:ft,yKey:a,xKey:o,capDefaults:{lengthRatioMultiplier:co,lengthMax:co},x:gn.x,y:gn.y,width:gn.width,height:gn.height,midPoint:{x:or.x+or.width/2,y:or.y+or.height/2},fill:d,stroke:u,opacity:1,strokeWidth:m,cornerRadius:f,topLeftCornerRadius:Rn!==qt,topRightCornerRadius:qt,bottomRightCornerRadius:Rn===qt,bottomLeftCornerRadius:!qt,clipBBox:wn,label:ot!=null?ve({text:ot,fill:Ts,fontStyle:ts,fontWeight:no,fontSize:Ho,fontFamily:kn},Krt({isPositive:_t,isVertical:!Rn,placement:ea,rect:or})):void 0,missing:ft==null,focusable:!Tt}},{groupScale:ie,processedData:le}=this,Se=[],je=[],ze=[];return le?.data.forEach(({keys:Ge,datum:Ae,values:Ye,aggValues:ft})=>{Ye.forEach((Ft,Tt)=>{let at=Ge[z],yt=Ft[G],_t=Number(Ft[Y]),Re=A!=null?Number(Ft[A]):void 0,ot=Number(Ft[X]),jt=yt>=0&&!Object.is(yt,-0),zt=ft?.[ne][jt?1:0]??0;if(!Number.isFinite(ot)||Re!=null&&!Number.isFinite(Re))return;let qt=yt!=null?this.getLabelText(this.properties.label,{datum:Ae[Tt],value:Re??yt,xKey:o,yKey:a,xName:l,yName:c,legendItemName:_},ln=>Tc(ln)?ln.toFixed(2):String(ln)):void 0,ui=Re!=null&&Re>yt,_i=ce({datum:Ae[Tt],valueIndex:Tt,xValue:at,yValue:Re??yt,cumulativeValue:Re??ot,phantom:!1,currY:Re!=null?_t+Re:ot,prevY:_t,isPositive:jt,yRange:Math.max(_t+(Re??-1/0),zt),labelText:qt,crossScale:ui?.6:void 0});if(je.push(_i),ze.push(_i),Re!=null){let ln=ce({datum:Ae[Tt],valueIndex:Tt,xValue:at,yValue:Re,cumulativeValue:Re,phantom:!0,currY:ot,prevY:_t,isPositive:jt,yRange:zt,labelText:void 0,crossScale:void 0});Se.push(ln)}})}),{itemId:a,nodeData:Se.length>0?[...Se,...je]:je,labelData:ze,scales:this.calculateScaling(),visible:this.visible||pe}})}nodeFactory(){return new A3}getHighlightData(e,n){let i=e.find(r=>r.datum===n.datum&&!r.phantom);return i!=null?[i]:void 0}updateDatumSelection(e){return O(this,null,function*(){return e.datumSelection.update(e.nodeData,void 0,n=>Gx(n.xValue,n.valueIndex,n.phantom))})}updateDatumNodes(e){return O(this,null,function*(){if(!this.properties.isValid())return;let{yKey:n,stackGroup:i,fill:r,fillOpacity:s,stroke:o,strokeWidth:a,strokeOpacity:l,lineDash:c,lineDashOffset:d,itemStyler:u,shadow:m,highlightStyle:{item:f}}=this.properties,_=this.axes.x,x=this.properties.crisp??jrt(_?.scale,_?.visibleRange,this.smallestDataInterval,this.largestDataInterval),D=this.getCategoryDirection()==="x",E={fill:r,stroke:o,lineDash:c,lineDashOffset:d,fillShadow:m,strokeWidth:this.getStrokeWidth(a),fillOpacity:0,strokeOpacity:0},M={datum:void 0,ctx:this.ctx,seriesId:this.id,isHighlighted:e.isHighlight,highlightStyle:f,yKey:n,style:E,itemStyler:u,stackGroup:i};e.datumSelection.each((I,z)=>{E.fillOpacity=s*(z.phantom?.2:1),E.strokeOpacity=l*(z.phantom?.2:1),E.cornerRadius=z.cornerRadius,E.topLeftCornerRadius=z.topLeftCornerRadius,E.topRightCornerRadius=z.topRightCornerRadius,E.bottomRightCornerRadius=z.bottomRightCornerRadius,E.bottomLeftCornerRadius=z.bottomLeftCornerRadius;let G=D?(z.clipBBox?.width??z.width)>0:(z.clipBBox?.height??z.height)>0;M.datum=z;let A=Urt(M);A.crisp=x,A.visible=G,Wrt(I,A)})})}updateLabelSelection(e){return O(this,null,function*(){let n=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(n,i=>{i.pointerEvents=1})})}updateLabelNodes(e){return O(this,null,function*(){e.labelSelection.each((n,i)=>{$rt(n,this.properties.label,i.label)})})}getTooltipHtml(e){let{id:n,processedData:i,ctx:{callbackCache:r}}=this,s=this.getCategoryAxis(),o=this.getValueAxis();if(!i||!this.properties.isValid()||!s||!o)return qx;let{xKey:a,yKey:l,xName:c,yName:d,fill:u,stroke:m,strokeWidth:f,tooltip:_,itemStyler:x,stackGroup:D,legendItemName:E}=this.properties,{xValue:M,yValue:I,datum:z,itemId:G}=e,A=s.formatDatum(M),Y=o.formatDatum(I),X=Lh(d),ne=Lh(A+": "+Y),pe;x&&(pe=r.call(x,{seriesId:n,datum:z,xKey:a,yKey:l,stackGroup:D,fill:u,stroke:m,strokeWidth:this.getStrokeWidth(f),highlighted:!1,cornerRadius:this.properties.cornerRadius,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash??[],lineDashOffset:this.properties.lineDashOffset}));let ce=pe?.fill??u;return _.toTooltipHtml({title:X,content:ne,backgroundColor:ce},ve({seriesId:n,itemId:G,datum:z,xKey:a,yKey:l,xName:c,yName:d,stackGroup:D,title:X,color:ce,legendItemName:E},this.getModuleTooltipParams()))}getLegendData(e){let{showInLegend:n}=this.properties;if(e!=="category"||!this.data?.length||!this.properties.isValid()||!n)return[];let{yKey:i,yName:r,fill:s,stroke:o,strokeWidth:a,fillOpacity:l,strokeOpacity:c,legendItemName:d,visible:u}=this.properties;return[{legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:u,label:{text:d??r??i},symbols:[{marker:{fill:s,fillOpacity:l,stroke:o,strokeWidth:a,strokeOpacity:c}}],legendItemName:d}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:n,annotationSelections:i}){let r=kG(MG(this.isVertical(),this.axes,"normal"));om(this.id,"nodes",this.ctx.animationManager,[e],r),Xc(this,"labels",this.ctx.animationManager,n),Xc(this,"annotations",this.ctx.animationManager,...i)}animateWaitingUpdateReady(e){let{datumSelection:n,labelSelection:i,annotationSelections:r,previousContextData:s}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id);let o=this.processedData?.reduced?.diff,a=s==null?"fade":"normal",l=kG(MG(this.isVertical(),this.axes,a));om(this.id,"nodes",this.ctx.animationManager,[n],l,(d,u)=>Gx(u.xValue,u.valueIndex,u.phantom),o),(o?.changed??!0)&&(Xc(this,"labels",this.ctx.animationManager,i),Xc(this,"annotations",this.ctx.animationManager,...r))}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:n}){let i=this.contextNodeData?.nodeData[e].clipBBox;return lxe(i,this.contentGroup,n)}};return t.className="BarSeries",t.type="bar",t})(),Hvi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",moduleFactory:t=>new zvi(t),stackable:!0,groupable:!0,tooltipDefaults:{range:"exact"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],swapDefaultAxesCondition:t=>t?.direction==="horizontal",themeTemplate:{series:{direction:"vertical",fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontWeight:"normal",fontSize:12,fontFamily:sm,color:OE,placement:"inside"},shadow:{enabled:!1,color:NE,xOffset:3,yOffset:3,blur:5},errorBar:{cap:{lengthRatio:.3}}}},paletteFactory:zR},jet=t=>{let e=X5.fromString(t),[n,i,r]=X5.RGBtoOKLCH(e.r,e.g,e.b);return{l:n,c:i,h:r,a:e.a}},$5e=1e-6,$et=t=>t.c<$5e||t.l<$5e||t.l>1-$5e,Gvi=(t,e,n)=>{n=Wa(0,n,1);let i;if($et(t))i=e.h;else if($et(e))i=t.h;else{let a=t.h,l=e.h,c=e.h-t.h;c>180?l-=360:c<-180&&(l+=360),i=a*(1-n)+l*n}let r=t.c*(1-n)+e.c*n,s=t.l*(1-n)+e.l*n,o=t.a*(1-n)+e.a*n;return X5.fromOKLCH(s,r,i,o)},VE=class{constructor(){this.type="color",this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(jet)}update(){let{domain:t,range:e}=this;t.length<2&&(yr.warnOnce("`colorDomain` should have at least 2 values."),t.length===0?t.push(0,1):t.length===1&&t.push(t[0]+1));for(let n=1;n<t.length;n++){let i=t[n-1],r=t[n];if(i>=r){yr.warnOnce("`colorDomain` values should be supplied in ascending order."),t.sort((s,o)=>s-o);break}}if(e.length<t.length)for(let n=e.length;n<t.length;n++)e.push(e.length>0?e[0]:"black");this.parsedRange=this.range.map(jet)}convert(t){this.refresh();let{domain:e,range:n,parsedRange:i}=this,r=e[0],s=e.at(-1),o=n[0],a=n[n.length-1];if(t<=r)return o;if(t>=s)return a;let l,c;if(e.length===2){let m=(t-r)/(s-r),f=1/(n.length-1);l=n.length<=2?0:Math.min(Math.floor(m*(n.length-1)),n.length-2),c=(m-l*f)/f}else{for(l=0;l<e.length-2&&!(t<e[l+1]);l++);let m=e[l],f=e[l+1];c=(t-m)/(f-m)}let d=i[l],u=i[l+1];return Gvi(d,u,c).toRgbaString()}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&yr.warnOnce("Expected update to not invalidate scale"))}};Me([r0],VE.prototype,"domain",2);Me([r0],VE.prototype,"range",2);cxe=class extends P3{constructor(){super(...arguments),this.maxSize=30}};Me([$e(Rr),Ss({redraw:3})],cxe.prototype,"maxSize",2);Me([$e(Tte,{optional:!0}),Ss({redraw:3})],cxe.prototype,"domain",2);Yrt=class extends f1{constructor(){super(...arguments),this.placement="top"}};Me([$e(i8e)],Yrt.prototype,"placement",2);sh=class extends Xx{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.label=new Yrt,this.tooltip=new Ng,this.marker=new cxe}};Me([$e(Gr)],sh.prototype,"xKey",2);Me([$e(Gr)],sh.prototype,"yKey",2);Me([$e(Gr)],sh.prototype,"sizeKey",2);Me([$e(Gr,{optional:!0})],sh.prototype,"labelKey",2);Me([$e(Gr,{optional:!0})],sh.prototype,"colorKey",2);Me([$e(Gr,{optional:!0})],sh.prototype,"xName",2);Me([$e(Gr,{optional:!0})],sh.prototype,"yName",2);Me([$e(Gr,{optional:!0})],sh.prototype,"sizeName",2);Me([$e(Gr,{optional:!0})],sh.prototype,"labelName",2);Me([$e(Gr,{optional:!0})],sh.prototype,"colorName",2);Me([$e(Tte,{optional:!0})],sh.prototype,"colorDomain",2);Me([$e(A6)],sh.prototype,"colorRange",2);Me([$e(Gr,{optional:!0})],sh.prototype,"title",2);Me([m1("marker.shape")],sh.prototype,"shape",2);Me([m1("marker.size")],sh.prototype,"size",2);Me([m1("marker.maxSize")],sh.prototype,"maxSize",2);Me([m1("marker.domain",{optional:!0})],sh.prototype,"domain",2);Me([m1("marker.fill",{optional:!0})],sh.prototype,"fill",2);Me([m1("marker.fillOpacity")],sh.prototype,"fillOpacity",2);Me([m1("marker.stroke",{optional:!0})],sh.prototype,"stroke",2);Me([m1("marker.strokeWidth")],sh.prototype,"strokeWidth",2);Me([m1("marker.strokeOpacity")],sh.prototype,"strokeOpacity",2);Me([m1("marker.itemStyler",{optional:!0})],sh.prototype,"itemStyler",2);Me([$e(Us)],sh.prototype,"label",2);Me([$e(Us)],sh.prototype,"tooltip",2);Wvi=class extends I8e{constructor(t,e,n,i){super(t,e,n,i),this.sizeKey=i.properties.sizeKey}},Uvi=(()=>{let t=class extends Mw{constructor(e){super({moduleCtx:e,directionKeys:RE,directionNames:FE,pickModes:[2,3,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:Qx,marker:XG}}),this.NodeEvent=Wvi,this.properties=new sh,this.sizeScale=new c_,this.colorScale=new VE}processData(e){return O(this,null,function*(){if(!this.properties.isValid()||this.data==null||!this.visible)return;let n=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:r,yScaleType:s}=this.getScaleInformation({xScale:n,yScale:i}),o=this.colorScale.type,a=this.sizeScale.type,{xKey:l,yKey:c,sizeKey:d,labelKey:u,colorDomain:m,colorRange:f,colorKey:_,marker:x}=this.properties,{dataModel:D,processedData:E}=yield this.requestDataModel(e,this.data,{props:[B0(l,r,{id:"xKey-raw"}),B0(c,s,{id:"yKey-raw"}),...u?[B0(u,"band",{id:"labelKey-raw"})]:[],Qc(l,r,{id:"xValue"}),Qc(c,s,{id:"yValue"}),Qc(d,a,{id:"sizeValue"}),..._?[Qc(_,o,{id:"colorValue"})]:[],...u?[Qc(u,"band",{id:"labelValue"})]:[]]}),M=D.resolveProcessedDataIndexById(this,"sizeValue"),I=E.domain.values[M]??[];if(this.sizeScale.domain=x.domain?x.domain:I,_){let z=D.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=m??E.domain.values[z]??[],this.colorScale.range=f,this.colorScale.update()}this.animationState.transition("updateData")})}getSeriesDomain(e){let{dataModel:n,processedData:i}=this;if(!i||!n)return[];let r=e==="x"?"xValue":"yValue",s=n.resolveProcessedDataDefById(this,r),o=n.getDomain(this,r,"value",i);if(s?.def.type==="value"&&s?.def.valueType==="category")return o;let a=this.axes[e];return M3(sC(o),a)}createNodeData(){return O(this,null,function*(){let{axes:e,dataModel:n,processedData:i,colorScale:r,sizeScale:s}=this,{xKey:o,yKey:a,sizeKey:l,labelKey:c,xName:d,yName:u,sizeName:m,labelName:f,label:_,colorKey:x,marker:D,visible:E}=this.properties,M=iC(D.shape),{placement:I}=_,z=e.x,G=e.y;if(!(n&&i&&E&&z&&G))return;let A=n.resolveProcessedDataIndexById(this,"xValue"),Y=n.resolveProcessedDataIndexById(this,"yValue"),X=l?n.resolveProcessedDataIndexById(this,"sizeValue"):-1,ne=x?n.resolveProcessedDataIndexById(this,"colorValue"):-1,pe=c?n.resolveProcessedDataIndexById(this,"labelValue"):-1,ce=z.scale,ie=G.scale,le=(ce.bandwidth??0)/2,Se=(ie.bandwidth??0)/2,je=[];s.range=[D.size,D.maxSize];let ze=_.getFont(),Ge=Yx.getMeasurer({font:ze});for(let{values:Ae,datum:Ye}of i.data??[]){let ft=Ae[A],Ft=Ae[Y],Tt=ce.convert(ft)+le,at=ie.convert(Ft)+Se,yt=this.getLabelText(_,{value:c?Ae[pe]:Ft,datum:Ye,xKey:o,yKey:a,sizeKey:l,labelKey:c,xName:d,yName:u,sizeName:m,labelName:f}),_t=Ge.measureText(String(yt)),Re=l?s.convert(Ae[X]):D.size,ot=x?r.convert(Ae[ne]):void 0;je.push({series:this,itemId:a,yKey:a,xKey:o,datum:Ye,xValue:ft,yValue:Ft,sizeValue:Ae[X],point:{x:Tt,y:at,size:Re},midPoint:{x:Tt,y:at},fill:ot,label:ve({text:yt},_t),marker:M,placement:I})}return{itemId:a,nodeData:je,labelData:je,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.contextNodeData?.labelData??[]}markerFactory(){let{shape:e}=this.properties.marker,n=iC(e);return new n}updateMarkerSelection(e){return O(this,null,function*(){let{nodeData:n,markerSelection:i}=e;this.properties.marker.isDirty()&&(i.clear(),i.cleanup());let r=this.properties.marker.enabled?n:[];return i.update(r,void 0,s=>Gx([s.xValue,s.yValue,s.label.text]))})}updateMarkerNodes(e){return O(this,null,function*(){let{markerSelection:n,isHighlight:i}=e,{xKey:r,yKey:s,sizeKey:o,labelKey:a,marker:l}=this.properties,{size:c,shape:d,fill:u,fillOpacity:m,stroke:f,strokeWidth:_,strokeOpacity:x}=ql(i&&this.properties.highlightStyle.item,l.getStyle()),D={size:c,shape:d,fill:u,fillOpacity:m,stroke:f,strokeWidth:_,strokeOpacity:x};this.sizeScale.range=[l.size,l.maxSize],n.each((E,M)=>{this.updateMarkerStyle(E,l,{datum:M,highlighted:i,xKey:r,yKey:s,sizeKey:o,labelKey:a},D)}),i||this.properties.marker.markClean()})}updateLabelSelection(e){return O(this,null,function*(){let n=this.properties.label.enabled?this.chart?.placeLabels().get(this)??[]:[];return e.labelSelection.update(n.map(i=>St(ve({},i.datum),{point:{x:i.x,y:i.y,size:i.datum.point.size}})))})}updateLabelNodes(e){return O(this,null,function*(){let{label:n}=this.properties;e.labelSelection.each((i,r)=>{i.text=r.label.text,i.fill=n.color,i.x=r.point?.x??0,i.y=r.point?.y??0,i.fontStyle=n.fontStyle,i.fontWeight=n.fontWeight,i.fontSize=n.fontSize,i.fontFamily=n.fontFamily,i.textAlign="left",i.textBaseline="top"})})}getTooltipHtml(e){let n=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!n||!i)return qx;let{xKey:r,yKey:s,sizeKey:o,labelKey:a,xName:l,yName:c,sizeName:d,labelName:u,marker:m,tooltip:f}=this.properties,_=this.properties.title??c,x=ql({fill:e.fill,strokeWidth:this.getStrokeWidth(m.strokeWidth)},m.getStyle()),{fill:D="gray"}=this.getMarkerStyle(m,{datum:e,highlighted:!1,xKey:r,yKey:s,sizeKey:o,labelKey:a},x),{datum:E,xValue:M,yValue:I,sizeValue:z,label:{text:G},itemId:A}=e,Y=Lh(n.formatDatum(M)),X=Lh(i.formatDatum(I)),ne=`<b>${Lh(l??r)}</b>: ${Y}<br><b>${Lh(c??s)}</b>: ${X}`;return o&&(ne+=`<br><b>${Lh(d??o)}</b>: ${Lh(String(z))}`),a&&(ne=`<b>${Lh(u??a)}</b>: ${Lh(G)}<br>`+ne),f.toTooltipHtml({title:_,content:ne,backgroundColor:D},{datum:E,itemId:A,xKey:r,xName:l,yKey:s,yName:c,sizeKey:o,sizeName:d,labelKey:a,labelName:u,title:_,color:D,seriesId:this.id})}getLegendData(){if(!this.data?.length||!this.properties.isValid())return[];let{yKey:e,yName:n,title:i,marker:r,visible:s}=this.properties,{shape:o,fill:a,stroke:l,fillOpacity:c,strokeOpacity:d,strokeWidth:u}=r;return[{legendType:"category",id:this.id,itemId:e,seriesId:this.id,enabled:s,label:{text:i??n??e},symbols:[{marker:{shape:o,fill:a??"rgba(0, 0, 0, 0)",stroke:l??"rgba(0, 0, 0, 0)",fillOpacity:c??1,strokeOpacity:d??1,strokeWidth:u??0}}]}]}animateEmptyUpdateReady({markerSelection:e,labelSelection:n}){q8e(this,this.ctx.animationManager,e),Xc(this,"labels",this.ctx.animationManager,n)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new xo}getFormattedMarkerStyle(e){let{xKey:n,yKey:i,sizeKey:r,labelKey:s}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:n,yKey:i,sizeKey:r,labelKey:s,highlighted:!1})}computeFocusBounds(e){return QG(this,e)}};return t.className="BubbleSeries",t.type="bubble",t})(),jvi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",moduleFactory:t=>new Uvi(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,maxSize:30,fillOpacity:.8,tooltip:{position:{type:"node"}},label:{enabled:!1,fontSize:12,fontFamily:sm,color:t0}}},paletteFactory:zR},kf=class extends Xx{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new h_,this.label=new f1,this.tooltip=new Ng}};Me([$e(Gr)],kf.prototype,"xKey",2);Me([$e(Gr,{optional:!0})],kf.prototype,"yKey",2);Me([$e(Gr,{optional:!0})],kf.prototype,"xName",2);Me([$e(Gr,{optional:!0})],kf.prototype,"yName",2);Me([$e(kd,{optional:!0})],kf.prototype,"fill",2);Me([$e(ud)],kf.prototype,"fillOpacity",2);Me([$e(kd,{optional:!0})],kf.prototype,"stroke",2);Me([$e(Rr)],kf.prototype,"strokeWidth",2);Me([$e(ud)],kf.prototype,"strokeOpacity",2);Me([$e(Kx)],kf.prototype,"lineDash",2);Me([$e(Rr)],kf.prototype,"lineDashOffset",2);Me([$e(Rr)],kf.prototype,"cornerRadius",2);Me([$e(Jo)],kf.prototype,"areaPlot",2);Me([$e(DR,{optional:!0})],kf.prototype,"bins",2);Me([$e(Su(["count","sum","mean"],"a histogram aggregation"))],kf.prototype,"aggregation",2);Me([$e(Rr,{optional:!0})],kf.prototype,"binCount",2);Me([$e(Us)],kf.prototype,"shadow",2);Me([$e(Us)],kf.prototype,"label",2);Me([$e(Us)],kf.prototype,"tooltip",2);Ket=10,$vi=(()=>{let t=class extends Mw{constructor(e){super({moduleCtx:e,directionKeys:RE,directionNames:FE,pickModes:[3,0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:IG,label:Qx}}),this.properties=new kf,this.calculatedBins=[]}deriveBins(e){let n=kte(e[0],e[1],Ket),i=gR(e[0],e[1],Ket),[r]=n,s=o=>[o,o+i];return[[r-i,r],...n.map(s)]}calculateNiceBins(e,n){let i=Math.floor(e[0]),r=e[1],s=n||1,{start:o,binSize:a}=this.calculateNiceStart(i,r,s);return this.getBins(o,r,a,s)}getBins(e,n,i,r){let s=[],o=this.calculatePrecision(i);for(let a=0;a<r;a++){let l=Math.round((e+a*i)*o)/o,c=Math.round((e+(a+1)*i)*o)/o;a===r-1&&(c=Math.max(c,n)),s[a]=[l,c]}return s}calculatePrecision(e){let n=10;if(isFinite(e)&&e>0)for(;e<1;)n*=10,e*=10;return n}calculateNiceStart(e,n,i){let r=Math.abs(n-e)/i,s=Math.floor(Math.log10(r)),o=Math.pow(10,s);return{start:Math.floor(e/o)*o,binSize:r}}processData(e){return O(this,null,function*(){this.visible||(this.processedData=void 0,this.animationState.transition("updateData"));let{xKey:n,yKey:i,areaPlot:r,aggregation:s}=this.properties,o=this.axes.x?.scale,a=this.axes.y?.scale,{xScaleType:l,yScaleType:c}=this.getScaleInformation({yScale:a,xScale:o}),d=[B0(n,l),znt];if(i){let m=wCe("groupAgg");s==="count"||(s==="sum"?m=Rnt("groupAgg"):s==="mean"&&(m=Lnt("groupAgg"))),r&&(m=SCe("groupAgg",m)),d.push(Qc(i,c,{invalidValue:void 0}),m)}else{let m=wCe("groupAgg");r&&(m=SCe("groupAgg",m)),d.push(m)}let u=m=>{let f=M3(m.domain.keys[0]);if(f.length===0)return m.domain.groups=[],()=>[];let _=O4(this.properties.binCount)?this.calculateNiceBins(f,this.properties.binCount):this.properties.bins??this.deriveBins(f),x=_.length;return this.calculatedBins=[..._],D=>{let E=D.keys[0];for(let M=0;M<x;M++){let I=_[M];if(E>=I[0]&&E<I[1]||M===x-1&&E<=I[1])return I}return[]}};!this.ctx.animationManager.isSkipped()&&this.processedData&&d.push(PE(this.processedData,!1)),yield this.requestDataModel(e,this.data,{props:d,groupByFn:u}),this.animationState.transition("updateData")})}getSeriesDomain(e){let{processedData:n,dataModel:i}=this;if(!n||!i||!this.calculatedBins.length)return[];let r=i.getDomain(this,"groupAgg","aggregate",n),s=this.calculatedBins?.[0][0],o=this.calculatedBins?.[(this.calculatedBins?.length??0)-1][1];return M3(e==="x"?[s,o]:r)}createNodeData(){return O(this,null,function*(){let{id:e,axes:n,processedData:i,ctx:{callbackCache:r}}=this,s=n.x,o=n.y;if(!s||!o)return;let{scale:a}=s,{scale:l}=o,{xKey:c,yKey:d,xName:u,yName:m,fill:f,stroke:_,strokeWidth:x,cornerRadius:D}=this.properties,{formatter:E=ne=>String(ne.value),fontStyle:M,fontWeight:I,fontSize:z,fontFamily:G,color:A}=this.properties.label,Y=[],X={itemId:this.properties.yKey??this.id,nodeData:Y,labelData:Y,scales:this.calculateScaling(),animationValid:!0,visible:this.visible};return!this.visible||!i||i.type!=="grouped"||(i.data.forEach(ne=>{let{aggValues:[[pe,ce]]=[[0,0]],datum:ie,datum:{length:le},keys:Se,keys:[je,ze]}=ne,Ge=a.convert(je),Ae=a.convert(ze),Ye=pe+ce,ft=l.convert(0),Ft=l.convert(Ye),Tt=Math.abs(Ae-Ge),at=Math.abs(Ft-ft),yt=Math.min(Ge,Ae),_t=Math.min(ft,Ft),Re;Ye!==0&&(Re={text:r.call(E,{value:Ye,datum:ie,seriesId:e,xKey:c,yKey:d,xName:u,yName:m})??String(Ye),fontStyle:M,fontWeight:I,fontSize:z,fontFamily:G,fill:A,x:yt+Tt/2,y:_t+at/2});let ot={x:yt+Tt/2,y:_t+at/2},jt=o.isReversed();Y.push({series:this,datum:ie,aggregatedValue:Ye,frequency:le,domain:Se,yKey:d,xKey:c,x:yt,y:_t,xValue:Ge,yValue:Ft,width:Tt,height:at,midPoint:ot,fill:f,stroke:_,cornerRadius:D,topLeftCornerRadius:!jt,topRightCornerRadius:!jt,bottomRightCornerRadius:jt,bottomLeftCornerRadius:jt,opacity:1,strokeWidth:x,label:Re})}),Y.sort((ne,pe)=>ne.x-pe.x)),X})}nodeFactory(){return new A3}updateDatumSelection(e){return O(this,null,function*(){let{nodeData:n,datumSelection:i}=e;return i.update(n,r=>{r.tag=0,r.crisp=!0},r=>r.domain.join("_"))})}updateDatumNodes(e){return O(this,null,function*(){let{isHighlight:n}=e,{fillOpacity:i,strokeOpacity:r,lineDash:s,lineDashOffset:o,shadow:a,highlightStyle:{item:{fill:l,fillOpacity:c=i,stroke:d,strokeWidth:u}}}=this.properties;e.datumSelection.each((m,f,_)=>{let{cornerRadius:x,topLeftCornerRadius:D,topRightCornerRadius:E,bottomRightCornerRadius:M,bottomLeftCornerRadius:I}=f,z=n&&u!==void 0?u:f.strokeWidth,G=n?c:i;m.fill=(n?l:void 0)??f.fill,m.stroke=(n?d:void 0)??f.stroke,m.fillOpacity=G,m.strokeOpacity=r,m.strokeWidth=z,m.lineDash=s,m.lineDashOffset=o,m.topLeftCornerRadius=D?x:0,m.topRightCornerRadius=E?x:0,m.bottomRightCornerRadius=M?x:0,m.bottomLeftCornerRadius=I?x:0,m.fillShadow=a,m.zIndex=n?KG.highlightedZIndex:_,m.visible=f.height>0})})}updateLabelSelection(e){return O(this,null,function*(){let{labelData:n,labelSelection:i}=e;return i.update(n,r=>{r.tag=1,r.pointerEvents=1,r.textAlign="center",r.textBaseline="middle"})})}updateLabelNodes(e){return O(this,null,function*(){let n=this.isLabelEnabled();e.labelSelection.each((i,r)=>{let s=r.label;s&&n?(i.text=s.text,i.x=s.x,i.y=s.y,i.fontStyle=s.fontStyle,i.fontWeight=s.fontWeight,i.fontSize=s.fontSize,i.fontFamily=s.fontFamily,i.fill=s.fill,i.visible=!0):i.visible=!1})})}initQuadTree(e){sxe(e,zrt(this.contentGroup.children[0]))}pickNodeClosestDatum(e){return oxe(this,e)}getTooltipHtml(e){let n=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!n||!i)return qx;let{xKey:r,yKey:s,xName:o,yName:a,fill:l,aggregation:c,tooltip:d}=this.properties,{aggregatedValue:u,frequency:m,domain:[f,_],itemId:x}=e,D=`${Lh(o??r)}: ${n.formatDatum(f)} - ${n.formatDatum(_)}`,E=s?`<b>${Lh(a??s)} (${c})</b>: ${i.formatDatum(u)}<br>`:"";E+=`<b>Frequency</b>: ${m}`;let M={title:D,backgroundColor:l,content:E};return d.toTooltipHtml(M,{datum:{data:e.datum,aggregatedValue:e.aggregatedValue,domain:e.domain,frequency:e.frequency},itemId:x,xKey:r,xName:o,yKey:s,yName:a,color:l,title:D,seriesId:this.id})}getLegendData(e){if(!this.data?.length||e!=="category")return[];let{xKey:n,yName:i,fill:r,fillOpacity:s,stroke:o,strokeWidth:a,strokeOpacity:l,visible:c}=this.properties;return[{legendType:"category",id:this.id,itemId:n,seriesId:this.id,enabled:c,label:{text:i??n??"Frequency"},symbols:[{marker:{fill:r??"rgba(0, 0, 0, 0)",stroke:o??"rgba(0, 0, 0, 0)",fillOpacity:s,strokeOpacity:l,strokeWidth:a}}]}]}animateEmptyUpdateReady({datumSelection:e,labelSelection:n}){let i=kG(MG(!0,this.axes,"normal"));om(this.id,"datums",this.ctx.animationManager,[e],i),Xc(this,"labels",this.ctx.animationManager,n)}animateWaitingUpdateReady(e){let n=this.processedData?.reduced?.diff,i=kG(MG(!0,this.axes,"normal"));om(this.id,"datums",this.ctx.animationManager,[e.datumSelection],i,(r,s)=>Gx(s.domain),n),Xc(this,"labels",this.ctx.animationManager,e.labelSelection)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e,seriesRect:n}){return lxe(this.contextNodeData?.nodeData[e],this.contentGroup,n)}};return t.className="HistogramSeries",t.type="histogram",t})(),Kvi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",moduleFactory:t=>new $vi(t),tooltipDefaults:{range:"exact"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontSize:12,fontFamily:sm,color:OE},shadow:{enabled:!1,color:NE,xOffset:3,yOffset:3,blur:5}}},paletteFactory:({takeColors:t})=>{let{fills:[e],strokes:[n]}=t(1);return{fill:e,stroke:n}}},s0=class extends Xx{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new HR,this.marker=new P3,this.label=new f1,this.tooltip=new Ng,this.connectMissingData=!1}};Me([$e(Gr)],s0.prototype,"xKey",2);Me([$e(Gr)],s0.prototype,"yKey",2);Me([$e(Gr,{optional:!0})],s0.prototype,"xName",2);Me([$e(Gr,{optional:!0})],s0.prototype,"yName",2);Me([$e(Gr,{optional:!0})],s0.prototype,"stackGroup",2);Me([$e(Rr,{optional:!0})],s0.prototype,"normalizedTo",2);Me([$e(Gr,{optional:!0})],s0.prototype,"title",2);Me([$e(kd)],s0.prototype,"stroke",2);Me([$e(Rr)],s0.prototype,"strokeWidth",2);Me([$e(ud)],s0.prototype,"strokeOpacity",2);Me([$e(Kx)],s0.prototype,"lineDash",2);Me([$e(Rr)],s0.prototype,"lineDashOffset",2);Me([$e(Us)],s0.prototype,"interpolation",2);Me([$e(Us)],s0.prototype,"marker",2);Me([$e(Us)],s0.prototype,"label",2);Me([$e(Us)],s0.prototype,"tooltip",2);Me([$e(Jo)],s0.prototype,"connectMissingData",2);Yvi=(()=>{let t=class extends Mw{constructor(e){super({moduleCtx:e,directionKeys:RE,directionNames:FE,hasMarkers:!0,pickModes:[2,3,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:txe({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:Qx,marker:(n,i)=>ve(ve({},XG(n)),EG(n,i))}}),this.properties=new s0}processData(e){return O(this,null,function*(){if(this.data==null||!this.properties.isValid())return;let{data:n,visible:i,seriesGrouping:{groupIndex:r=this.id,stackCount:s=1}={}}=this,{xKey:o,yKey:a,connectMissingData:l,normalizedTo:c}=this.properties,d=!this.ctx.animationManager.isSkipped(),u=this.axes.x?.scale,m=this.axes.y?.scale,{isContinuousX:f,xScaleType:_,yScaleType:x}=this.getScaleInformation({xScale:u,yScale:m}),D={invalidValue:null};l&&s>1&&(D.invalidValue=0),i||(D.forceValue=0);let E=[];if(f||E.push(B0(o,_,{id:"xKey"})),E.push(Qc(o,_,{id:"xValue"}),Qc(a,x,St(ve({id:"yValueRaw"},D),{invalidValue:void 0}))),s>1){let M=[`line-stack-${r}-yValues`,`line-stack-${r}-yValues-trailing`,`line-stack-${r}-yValues-marker`];E.push(...vw(a,"window","current",St(ve({id:"yValueEnd"},D),{groupId:M[0]}),x),...vw(a,"window-trailing","current",St(ve({id:"yValueStart"},D),{groupId:M[1]}),x),...vw(a,"normal","current",St(ve({id:"yValueCumulative"},D),{groupId:M[2]}),x)),vG(c)&&E.push(Bte([M[0],M[1],M[2]],c,"range"))}d&&(E.push(FR(f?["xValue"]:void 0)),this.processedData&&E.push(PE(this.processedData))),yield this.requestDataModel(e,n,{props:E}),this.animationState.transition("updateData")})}getSeriesDomain(e){let{processedData:n,dataModel:i,axes:r}=this;if(!n||!i||n.data.length===0)return[];let s=r.x,o=r.y,a=i.resolveProcessedDataDefById(this,"xValue");if(e==="x"){let l=i.getDomain(this,"xValue","value",n);return a?.def.type==="value"&&a.def.valueType==="category"?l:M3(sC(l),s)}else{let c=(this.seriesGrouping?.stackCount??1)>1?i.getDomain(this,"yValueEnd","value",n):i.getDomain(this,"yValueRaw","value",n);return M3(c,o)}}createNodeData(){return O(this,null,function*(){let{processedData:e,dataModel:n,axes:i}=this,r=i.x,s=i.y;if(!e||!n||!r||!s)return;let{xKey:o,yKey:a,xName:l,yName:c,marker:d,label:u,connectMissingData:m,legendItemName:f}=this.properties,_=(this.seriesGrouping?.stackCount??1)>1,x=r.scale,D=s.scale,E=(x.bandwidth??0)/2,M=(D.bandwidth??0)/2,I=[],z=d.enabled?d.size:0,G=n.resolveProcessedDataIndexById(this,"xValue"),A=n.resolveProcessedDataIndexById(this,"yValueRaw"),Y=_?n.resolveProcessedDataIndexById(this,"yValueCumulative"):A,X=_?n.resolveProcessedDataIndexById(this,"yValueEnd"):void 0,ne=!0;return e.data?.forEach(({datum:pe,values:ce})=>{let ie=ce[G],le=ce[A],Se=ce[Y],je=X!=null?ce[X]:void 0;if(le==null){ne||(ne=!m);return}let ze=x.convert(ie)+E;if(isNaN(ze)){ne||(ne=!m);return}let Ge=D.convert(Se)+M,Ae=this.getLabelText(u,{value:le,datum:pe,xKey:o,yKey:a,xName:l,yName:c,legendItemName:f},Ye=>Tc(Ye)?Ye.toFixed(2):String(Ye));I.push({series:this,datum:pe,yKey:a,xKey:o,point:{x:ze,y:Ge,moveTo:ne,size:z},midPoint:{x:ze,y:Ge},cumulativeValue:je,yValue:le,xValue:ie,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},label:Ae?{text:Ae,fontStyle:u.fontStyle,fontWeight:u.fontWeight,fontSize:u.fontSize,fontFamily:u.fontFamily,textAlign:"center",textBaseline:"bottom",fill:u.color}:void 0}),ne=!1}),{itemId:a,nodeData:I,labelData:I,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){let{shape:e}=this.properties.marker,n=iC(e);return new n}updatePathNodes(e){return O(this,null,function*(){let{paths:[n],opacity:i,visible:r,animationEnabled:s}=e;n.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:i,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),s||(n.visible=r),ute(this,n)})}updateMarkerSelection(e){return O(this,null,function*(){let{nodeData:n}=e,{markerSelection:i}=e,{shape:r,enabled:s}=this.properties.marker;return n=r&&s?n:[],this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(n,void 0,o=>Gx(o.xValue))})}updateMarkerNodes(e){return O(this,null,function*(){let{markerSelection:n,isHighlight:i}=e,{xKey:r,yKey:s,stroke:o,strokeWidth:a,strokeOpacity:l,marker:c,highlightStyle:d}=this.properties,u=ql(i&&d.item,c.getStyle(),{stroke:o,strokeWidth:a,strokeOpacity:l}),m=this.ctx.animationManager.isSkipped();n.each((f,_)=>{this.updateMarkerStyle(f,c,{datum:_,highlighted:i,xKey:r,yKey:s},u,{applyTranslation:m})}),i||c.markClean()})}updateLabelSelection(e){return O(this,null,function*(){return e.labelSelection.update(this.isLabelEnabled()?e.labelData:[])})}updateLabelNodes(e){return O(this,null,function*(){let{enabled:n,fontStyle:i,fontWeight:r,fontSize:s,fontFamily:o,color:a}=this.properties.label;e.labelSelection.each((l,c)=>{let{point:d,label:u}=c;c&&u&&n?(l.fontStyle=i,l.fontWeight=r,l.fontSize=s,l.fontFamily=o,l.textAlign=u.textAlign,l.textBaseline=u.textBaseline,l.text=u.text,l.x=d.x,l.y=d.y-10,l.fill=a,l.visible=!0):l.visible=!1})})}getTooltipHtml(e){let n=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!n||!i)return qx;let{xKey:r,yKey:s,xName:o,yName:a,strokeWidth:l,marker:c,tooltip:d}=this.properties,{datum:u,xValue:m,yValue:f,itemId:_}=e,x=n.formatDatum(m),D=i.formatDatum(f),E=Lh(this.properties.title??a),M=Lh(x+": "+D),I=ql({fill:c.stroke},c.getStyle(),{strokeWidth:l}),{fill:z}=this.getMarkerStyle(c,{datum:e,xKey:r,yKey:s,highlighted:!1},I);return d.toTooltipHtml({title:E,content:M,backgroundColor:z},ve({datum:u,itemId:_,xKey:r,xName:o,yKey:s,yName:a,title:E,color:z,seriesId:this.id},this.getModuleTooltipParams()))}getLegendData(e){if(!(this.data?.length&&this.properties.isValid()&&e==="category"))return[];let{yKey:n,yName:i,stroke:r,strokeOpacity:s,strokeWidth:o,lineDash:a,title:l,marker:c,visible:d,legendItemName:u}=this.properties,m="rgba(0, 0, 0, 0)";return[{legendType:"category",id:this.id,itemId:n,legendItemName:u,seriesId:this.id,enabled:d,label:{text:u??l??i??n},symbols:[{marker:{shape:c.shape,fill:c.fill??m,stroke:c.stroke??r??m,fillOpacity:c.fillOpacity??1,strokeOpacity:c.strokeOpacity??s??1,strokeWidth:c.strokeWidth??0,enabled:c.enabled},line:{stroke:r??m,strokeOpacity:s,strokeWidth:o,lineDash:a}}]}]}updatePaths(e){return O(this,null,function*(){this.updateLinePaths(e.paths,e.contextData)})}updateLinePaths(e,n){let{interpolation:i}=this.properties,{nodeData:r}=n,[s]=e;s.path.clear(!0);for(let o of Prt(r))J8e(Rrt(r,o),s,i);s.checkPathDirty()}animateEmptyUpdateReady(e){let{markerSelection:n,labelSelection:i,annotationSelections:r,contextData:s,paths:o}=e,{animationManager:a}=this.ctx;this.updateLinePaths(o,s),exe(this,a,...o),Ef([n],EG),Z8e(this,a,n),Xc(this,"labels",a,i),Xc(this,"annotations",a,...r)}animateReadyResize(e){let{contextData:n,paths:i}=e;this.updateLinePaths(i,n),super.animateReadyResize(e)}animateWaitingUpdateReady(e){let{animationManager:n}=this.ctx,{markerSelection:i,labelSelection:r,annotationSelections:s,contextData:o,paths:a,previousContextData:l}=e,[c]=a;this.resetMarkerAnimation(e),this.resetLabelAnimation(e);let d=()=>{this.resetPathAnimation(e),this.updateLinePaths(a,o)},u=()=>{n.skipCurrentBatch(),d()};if(o==null||l==null){d(),DG(this,n,"added",i),fG(this,"path_properties",n,"add",c),Xc(this,"labels",n,r),Xc(this,"annotations",n,...s);return}let m=Nrt(o,l,this.processedData?.reduced?.diff,this.properties.interpolation);if(m===void 0){u();return}else if(m.status==="no-op")return;DG(this,n,void 0,i),om(this.id,"path_properties",n,[c],m.pathProperties),Srt(this.id,"path_update",n,[c],m.path),m.hasMotion&&(Xc(this,"labels",n,r),Xc(this,"annotations",n,...s))}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new xo}getFormattedMarkerStyle(e){let{xKey:n,yKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:n,yKey:i,highlighted:!0})}computeFocusBounds(e){return QG(this,e)}};return t.className="LineSeries",t.type="line",t})(),qvi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",moduleFactory:t=>new Yvi(t),stackable:!0,tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"left"},{type:"category",position:"bottom"}],themeTemplate:{series:{tooltip:{position:{type:"node"}},strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,interpolation:{type:"linear",tension:1,position:"end"},marker:{shape:"circle",size:7,strokeWidth:0},label:{enabled:!1,fontSize:12,fontFamily:sm,color:t0},errorBar:{cap:{lengthRatio:1}}}},paletteFactory:t=>{let{marker:e}=Ute(t);return{stroke:e.fill,marker:e}}},qrt=class extends f1{constructor(){super(...arguments),this.placement="top"}};Me([$e(i8e)],qrt.prototype,"placement",2);am=class extends Xx{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.label=new qrt,this.tooltip=new Ng,this.marker=new P3}};Me([$e(Gr)],am.prototype,"xKey",2);Me([$e(Gr)],am.prototype,"yKey",2);Me([$e(Gr,{optional:!0})],am.prototype,"labelKey",2);Me([$e(Gr,{optional:!0})],am.prototype,"colorKey",2);Me([$e(Gr,{optional:!0})],am.prototype,"xName",2);Me([$e(Gr,{optional:!0})],am.prototype,"yName",2);Me([$e(Gr,{optional:!0})],am.prototype,"labelName",2);Me([$e(Gr,{optional:!0})],am.prototype,"colorName",2);Me([$e(Tte,{optional:!0})],am.prototype,"colorDomain",2);Me([$e(A6)],am.prototype,"colorRange",2);Me([$e(Gr,{optional:!0})],am.prototype,"title",2);Me([m1("marker.shape")],am.prototype,"shape",2);Me([m1("marker.size")],am.prototype,"size",2);Me([m1("marker.fill")],am.prototype,"fill",2);Me([m1("marker.fillOpacity")],am.prototype,"fillOpacity",2);Me([m1("marker.stroke")],am.prototype,"stroke",2);Me([m1("marker.strokeWidth")],am.prototype,"strokeWidth",2);Me([m1("marker.strokeOpacity")],am.prototype,"strokeOpacity",2);Me([m1("marker.itemStyler",{optional:!0})],am.prototype,"itemStyler",2);Me([$e(Us)],am.prototype,"label",2);Me([$e(Us)],am.prototype,"tooltip",2);Zvi=(()=>{let t=class extends Mw{constructor(e){super({moduleCtx:e,directionKeys:RE,directionNames:FE,pickModes:[2,3,0],pathsPerSeries:[],hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:XG,label:Qx}}),this.properties=new am,this.colorScale=new VE}processData(e){return O(this,null,function*(){if(!this.properties.isValid()||this.data==null||!this.visible)return;let n=this.axes.x?.scale,i=this.axes.y?.scale,{xScaleType:r,yScaleType:s}=this.getScaleInformation({xScale:n,yScale:i}),o=this.colorScale.type,{xKey:a,yKey:l,labelKey:c,colorKey:d,colorDomain:u,colorRange:m}=this.properties,{dataModel:f,processedData:_}=yield this.requestDataModel(e,this.data,{props:[B0(a,r,{id:"xKey-raw"}),B0(l,s,{id:"yKey-raw"}),...c?[B0(c,"band",{id:"labelKey-raw"})]:[],Qc(a,r,{id:"xValue"}),Qc(l,s,{id:"yValue"}),...d?[Qc(d,o,{id:"colorValue"})]:[],...c?[Qc(c,"band",{id:"labelValue"})]:[]]});if(d){let x=f.resolveProcessedDataIndexById(this,"colorValue");this.colorScale.domain=u??_.domain.values[x]??[],this.colorScale.range=m,this.colorScale.update()}this.animationState.transition("updateData")})}getSeriesDomain(e){let{dataModel:n,processedData:i}=this;if(!i||!n)return[];let r=e==="x"?"xValue":"yValue",s=n.resolveProcessedDataDefById(this,r),o=n.getDomain(this,r,"value",i);if(s?.def.type==="value"&&s?.def.valueType==="category")return o;let a=this.axes[e];return M3(sC(o),a)}createNodeData(){return O(this,null,function*(){let{axes:e,dataModel:n,processedData:i,colorScale:r}=this,{xKey:s,yKey:o,labelKey:a,colorKey:l,xName:c,yName:d,labelName:u,marker:m,label:f,visible:_}=this.properties,{placement:x}=f,D=iC(m.shape),E=e.x,M=e.y;if(!(n&&i&&_&&E&&M))return;let I=n.resolveProcessedDataIndexById(this,"xValue"),z=n.resolveProcessedDataIndexById(this,"yValue"),G=l?n.resolveProcessedDataIndexById(this,"colorValue"):-1,A=a?n.resolveProcessedDataIndexById(this,"labelValue"):-1,Y=E.scale,X=M.scale,ne=(Y.bandwidth??0)/2,pe=(X.bandwidth??0)/2,ce=[],ie=f.getFont(),le=Yx.getMeasurer({font:ie});for(let{values:Se,datum:je}of i.data??[]){let ze=Se[I],Ge=Se[z],Ae=Y.convert(ze)+ne,Ye=X.convert(Ge)+pe,ft=this.getLabelText(f,{value:a?Se[A]:Ge,datum:je,xKey:s,yKey:o,labelKey:a,xName:c,yName:d,labelName:u}),Ft=le.measureText(ft),Tt=l?r.convert(Se[G]):void 0;ce.push({series:this,itemId:o,yKey:o,xKey:s,datum:je,xValue:ze,yValue:Ge,capDefaults:{lengthRatioMultiplier:m.getDiameter(),lengthMax:1/0},point:{x:Ae,y:Ye,size:m.size},midPoint:{x:Ae,y:Ye},fill:Tt,label:ve({text:ft},Ft),marker:D,placement:x})}return{itemId:o,nodeData:ce,labelData:ce,scales:this.calculateScaling(),visible:this.visible}})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){return this.contextNodeData?.labelData??[]}markerFactory(){let{shape:e}=this.properties.marker,n=iC(e);return new n}updateMarkerSelection(e){return O(this,null,function*(){let{nodeData:n,markerSelection:i}=e;return this.properties.marker.isDirty()&&(i.clear(),i.cleanup()),i.update(this.properties.marker.enabled?n:[])})}updateMarkerNodes(e){return O(this,null,function*(){let{markerSelection:n,isHighlight:i}=e,{xKey:r,yKey:s,labelKey:o,marker:a,highlightStyle:l}=this.properties,c=ql(i&&l.item,a.getStyle());n.each((d,u)=>{this.updateMarkerStyle(d,a,{datum:u,highlighted:i,xKey:r,yKey:s,labelKey:o},c)}),i||a.markClean()})}updateLabelSelection(e){return O(this,null,function*(){let n=this.isLabelEnabled()?this.chart?.placeLabels().get(this)??[]:[];return e.labelSelection.update(n.map(({datum:i,x:r,y:s})=>St(ve({},i),{point:{x:r,y:s,size:i.point.size},placement:"top"})),i=>{i.pointerEvents=1})})}updateLabelNodes(e){return O(this,null,function*(){let{label:n}=this.properties;e.labelSelection.each((i,r)=>{i.text=r.label.text,i.fill=n.color,i.x=r.point?.x??0,i.y=r.point?.y??0,i.fontStyle=n.fontStyle,i.fontWeight=n.fontWeight,i.fontSize=n.fontSize,i.fontFamily=n.fontFamily,i.textAlign="left",i.textBaseline="top"})})}getTooltipHtml(e){let n=this.axes.x,i=this.axes.y;if(!this.properties.isValid()||!n||!i)return qx;let{xKey:r,yKey:s,labelKey:o,xName:a,yName:l,labelName:c,title:d=l,marker:u,tooltip:m}=this.properties,{datum:f,xValue:_,yValue:x,label:D,itemId:E}=e,M=ql({fill:e.fill,strokeWidth:this.getStrokeWidth(u.strokeWidth)},u.getStyle()),{fill:I="gray"}=this.getMarkerStyle(u,{datum:e,highlighted:!1,xKey:r,yKey:s,labelKey:o},M),z=Lh(n.formatDatum(_)),G=Lh(i.formatDatum(x)),A=`<b>${Lh(a??r)}</b>: ${z}<br><b>${Lh(l??s)}</b>: ${G}`;return o&&(A=`<b>${Lh(c??o)}</b>: ${Lh(D.text)}<br>`+A),m.toTooltipHtml({title:d,content:A,backgroundColor:I},ve({datum:f,itemId:E,xKey:r,xName:a,yKey:s,yName:l,labelKey:o,labelName:c,title:d,color:I,seriesId:this.id},this.getModuleTooltipParams()))}getLegendData(e){let{yKey:n,yName:i,title:r,marker:s,visible:o}=this.properties,{fill:a,stroke:l,fillOpacity:c,strokeOpacity:d,strokeWidth:u}=s;return!this.data?.length||!this.properties.isValid()||e!=="category"?[]:[{legendType:"category",id:this.id,itemId:n,seriesId:this.id,enabled:o,label:{text:r??i??n},symbols:[{marker:{shape:s.shape,fill:s.fill??a??"rgba(0, 0, 0, 0)",stroke:s.stroke??l??"rgba(0, 0, 0, 0)",fillOpacity:c??1,strokeOpacity:d??1,strokeWidth:u??0}}]}]}animateEmptyUpdateReady(e){let{markerSelection:n,labelSelection:i,annotationSelections:r}=e;q8e(this,this.ctx.animationManager,n),Xc(this,"labels",this.ctx.animationManager,i),Xc(this,"annotations",this.ctx.animationManager,...r)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new xo}getFormattedMarkerStyle(e){let{xKey:n,yKey:i,labelKey:r}=this.properties;return this.getMarkerStyle(this.properties.marker,{datum:e,xKey:n,yKey:i,labelKey:r,highlighted:!0})}computeFocusBounds(e){return QG(this,e)}};return t.className="ScatterSeries",t.type="scatter",t})(),Xvi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",moduleFactory:t=>new Zvi(t),tooltipDefaults:{range:"nearest"},defaultAxes:[{type:"number",position:"bottom"},{type:"number",position:"left"}],themeTemplate:{series:{shape:"circle",size:7,fillOpacity:.8,tooltip:{position:{type:"node"}},label:{enabled:!1,fontSize:12,fontFamily:sm,color:t0},errorBar:{cap:{lengthRatio:1}}}},paletteFactory:zR},Zrt=class ECe{constructor(e,n,i,r){this.startAngle=e,this.endAngle=n,this.innerRadius=i,this.outerRadius=r}clone(){let{startAngle:e,endAngle:n,innerRadius:i,outerRadius:r}=this;return new ECe(e,n,i,r)}[fte](e,n){return new ECe(this.startAngle*(1-n)+e.startAngle*n,this.endAngle*(1-n)+e.endAngle*n,this.innerRadius*(1-n)+e.innerRadius*n,this.outerRadius*(1-n)+e.outerRadius*n)}};Qvi=1e-6;K5e=class{constructor(t,e,n,i,r){this.cx=t,this.cy=e,this.r=n,this.a0=i,this.a1=r,this.a0>=this.a1&&(this.a0=NaN,this.a1=NaN)}isValid(){return Number.isFinite(this.a0)&&Number.isFinite(this.a1)}pointAt(t){return{x:this.cx+this.r*Math.cos(t),y:this.cy+this.r*Math.sin(t)}}clipStart(t){t==null||!this.isValid()||t<this.a0||(this.a0=t,(Number.isNaN(t)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}clipEnd(t){t==null||!this.isValid()||t>this.a1||(this.a1=t,(Number.isNaN(t)||this.a0>=this.a1)&&(this.a0=NaN,this.a1=NaN))}},S2=(()=>{let t=class extends Og{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=Math.PI*2,this.clipSector=void 0,this.concentricEdgeInset=0,this.radialEdgeInset=0,this.startOuterCornerRadius=0,this.endOuterCornerRadius=0,this.startInnerCornerRadius=0,this.endInnerCornerRadius=0}set inset(e){this.concentricEdgeInset=e,this.radialEdgeInset=e}set cornerRadius(e){this.startOuterCornerRadius=e,this.endOuterCornerRadius=e,this.startInnerCornerRadius=e,this.endInnerCornerRadius=e}computeBBox(){return Xrt(this).translate(this.centerX,this.centerY)}normalizedRadii(){let{concentricEdgeInset:e}=this,{innerRadius:n,outerRadius:i}=this;return n=n>0?n+e:0,i=Math.max(i-e,0),{innerRadius:n,outerRadius:i}}normalizedClipSector(){let{clipSector:e}=this;if(e==null)return;let{startAngle:n,endAngle:i}=Vee(this.startAngle,this.endAngle),{innerRadius:r,outerRadius:s}=this.normalizedRadii(),o=Vee(e.startAngle,e.endAngle,n);return new Zrt(Math.max(n,o.startAngle),Math.min(i,o.endAngle),Math.max(r,e.innerRadius),Math.min(s,e.outerRadius))}getAngleOffset(e){return e>0?this.radialEdgeInset/e:0}arc(e,n,i,r,s,o,a,l){if(e<=0)return;let{startAngle:c,endAngle:d}=Vee(this.startAngle,this.endAngle),{innerRadius:u,outerRadius:m}=this.normalizedRadii(),f=this.normalizedClipSector();if(l&&u<=0)return;let _=this.getAngleOffset(u),x=this.getAngleOffset(m),D=l?this.getAngleOffset(u+e):this.getAngleOffset(m-e),E=a?c+D+n:d-D-n,M=l?u+e:m-e,I=M*Math.cos(E),z=M*Math.sin(E);if(f!=null&&(!a&&!(E>=c-1e-6&&E<=f.endAngle-1e-6)||a&&!(E>=f.startAngle+1e-6&&E<=d-1e-6)||l&&!(M>=f.innerRadius-1e-6)||!l&&!(M<=f.outerRadius+1e-6)))return;let G=new K5e(I,z,e,i,r);if(f!=null){l?(G.clipStart(Bee(I,z,e,i,r,f.endAngle-_)),G.clipEnd(Bee(I,z,e,i,r,f.startAngle+_))):(G.clipStart(Bee(I,z,e,i,r,f.startAngle+x)),G.clipEnd(Bee(I,z,e,i,r,f.endAngle-x)));let pe,ce;if(a?(pe=zee(I,z,e,i,r,f.innerRadius),ce=zee(I,z,e,i,r,f.outerRadius)):(pe=zee(I,z,e,i,r,f.outerRadius),ce=zee(I,z,e,i,r,f.innerRadius)),G.clipStart(pe),G.clipEnd(ce),pe!=null){let{x:ie,y:le}=G.pointAt(pe),Se=yw(Math.atan2(le,ie),c);a?o?.clipStart(Se):s.clipEnd(Se)}if(ce!=null){let{x:ie,y:le}=G.pointAt(ce),Se=yw(Math.atan2(le,ie),c);a?s.clipStart(Se):o?.clipEnd(Se)}}if(f!=null){let{x:pe,y:ce}=G.pointAt((G.a0+G.a1)/2);if(!pte(pe,ce,f))return}let{x:A,y:Y}=G.pointAt(a===l?G.a0:G.a1),X=yw(Math.atan2(Y,A),c),ne=l?o:s;return a?ne?.clipStart(X):ne?.clipEnd(X),G}updatePath(){let{path:n,centerX:i,centerY:r,concentricEdgeInset:s,radialEdgeInset:o}=this,{startOuterCornerRadius:a,endOuterCornerRadius:l,startInnerCornerRadius:c,endInnerCornerRadius:d}=this,{startAngle:u,endAngle:m}=Vee(this.startAngle,this.endAngle),{innerRadius:f,outerRadius:_}=this.normalizedRadii(),x=this.normalizedClipSector(),D=m-u,E=D>=2*Math.PI-1e-6;if(n.clear(),f===0&&_===0||f>_)return;if((x?.startAngle??u)===(x?.endAngle??m))return;if(E&&this.clipSector==null&&a===0&&l===0&&c===0&&d===0){n.moveTo(i+_*Math.cos(u),r+_*Math.sin(u)),n.arc(i,r,_,u,m),f>s&&(n.moveTo(i+f*Math.cos(m),r+f*Math.sin(m)),n.arc(i,r,f,m,u,!0)),n.closePath();return}else if(this.clipSector==null&&Math.abs(f-_)<1e-6){n.arc(i,r,_,u,m,!1),n.arc(i,r,_,m,u,!0),n.closePath();return}let M=this.getAngleOffset(f),I=this.getAngleOffset(_);if(D<2*I)return;let G=(x?.innerRadius??f)>s,A=f<s||D<2*M,Y=_-f,X=Math.max(a,c,l,d),ne=X>0?Math.min(Y/X,1):1;a*=ne,l*=ne,c*=ne,d*=ne;let pe=qet(_,D-2*I,-a,-l);if(a*=pe,l*=pe,!A&&G){let zt=qet(f,D-2*M,c,d);c*=zt,d*=zt}else c=0,d=0;let ce=Math.max(a+c,l+d),ie=ce>0?Math.min(Y/ce,1):1;a*=ie,l*=ie,c*=ie,d*=ie;let le=0,Se=0,je=a/(_-a),ze=l/(_-l);if(je>=0&&je<.999999)le=Math.asin(je);else{le=D/2;let zt=_/(1/Math.sin(le)+1);a=Math.min(zt,a)}if(ze>=0&&ze<.999999)Se=Math.asin(ze);else{Se=D/2;let zt=_/(1/Math.sin(Se)+1);l=Math.min(zt,l)}let Ge=Math.asin(c/(f+c)),Ae=Math.asin(d/(f+d)),Ye=x?.outerRadius??_,ft=this.getAngleOffset(Ye),Ft=new K5e(0,0,Ye,u+ft,m-ft),Tt=x?.innerRadius??f,at=this.getAngleOffset(Tt),yt=G?new K5e(0,0,Tt,u+at,m-at):void 0;x!=null&&(Ft.clipStart(x.startAngle),Ft.clipEnd(x.endAngle),yt?.clipStart(x.startAngle),yt?.clipEnd(x.endAngle));let _t=this.arc(a,le,u-Math.PI*.5,u+le,Ft,yt,!0,!1),Re=this.arc(l,Se,m-Se,m+Math.PI*.5,Ft,yt,!1,!1),ot=this.arc(d,Ae,m+Math.PI*.5,m+Math.PI-Ae,Ft,yt,!1,!0),jt=this.arc(c,Ge,u+Math.PI+Ge,u+Math.PI*1.5,Ft,yt,!0,!0);if(A){let zt=D<Math.PI*.5?o*(1+Math.cos(D))/Math.sin(D):NaN,qt;zt>0&&zt<_?qt=Math.max(Math.hypot(o,zt),f):qt=o,qt=Math.max(qt,f);let ui=u+D*.5;n.moveTo(i+qt*Math.cos(ui),r+qt*Math.sin(ui))}else if(!(jt?.isValid()===!0||yt?.isValid()===!0)){let zt=u+D/2,qt=f*Math.cos(zt),ui=f*Math.sin(zt);n.moveTo(i+qt,r+ui)}if(_t?.isValid()===!0){let{cx:zt,cy:qt,r:ui,a0:_i,a1:ln}=_t;n.arc(i+zt,r+qt,ui,_i,ln)}if(Ft.isValid()){let{r:zt,a0:qt,a1:ui}=Ft;n.arc(i,r,zt,qt,ui)}if(Re?.isValid()===!0){let{cx:zt,cy:qt,r:ui,a0:_i,a1:ln}=Re;n.arc(i+zt,r+qt,ui,_i,ln)}if(!A){if(ot?.isValid()===!0){let{cx:zt,cy:qt,r:ui,a0:_i,a1:ln}=ot;n.arc(i+zt,r+qt,ui,_i,ln)}if(yt?.isValid()===!0){let{r:zt,a0:qt,a1:ui}=yt;n.arc(i,r,zt,ui,qt,!0)}if(jt?.isValid()===!0){let{cx:zt,cy:qt,r:ui,a0:_i,a1:ln}=jt;n.arc(i+zt,r+qt,ui,_i,ln)}}n.closePath()}isPointInPath(e,n){let i=this.transformPoint(e,n),{startAngle:r,endAngle:s,innerRadius:o,outerRadius:a}=this.clipSector??this;return pte(i.x-this.centerX,i.y-this.centerY,{startAngle:r,endAngle:s,innerRadius:Math.min(o,a),outerRadius:Math.max(o,a)})}};return t.className="Sector",t})();Me([va()],S2.prototype,"centerX",2);Me([va()],S2.prototype,"centerY",2);Me([va()],S2.prototype,"innerRadius",2);Me([va()],S2.prototype,"outerRadius",2);Me([va()],S2.prototype,"startAngle",2);Me([va()],S2.prototype,"endAngle",2);Me([va()],S2.prototype,"clipSector",2);Me([va()],S2.prototype,"concentricEdgeInset",2);Me([va()],S2.prototype,"radialEdgeInset",2);Me([va()],S2.prototype,"startOuterCornerRadius",2);Me([va()],S2.prototype,"endOuterCornerRadius",2);Me([va()],S2.prototype,"startInnerCornerRadius",2);Me([va()],S2.prototype,"endInnerCornerRadius",2);x2={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},q5={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},Jrt=class extends Vh{constructor(){super(...arguments),this.showInLegend=!1}};Me([$e(Jo)],Jrt.prototype,"showInLegend",2);dxe=class extends f1{constructor(){super(...arguments),this.spacing=2}set(t,e){return super.set(t)}};Me([$e(Gr)],dxe.prototype,"text",2);Me([$e(wu)],dxe.prototype,"spacing",2);uxe=class extends pl{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};Me([$e(kd)],uxe.prototype,"fill",2);Me([$e(ud)],uxe.prototype,"fillOpacity",2);GR=class extends f1{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};Me([$e(Rr)],GR.prototype,"offset",2);Me([$e(xw)],GR.prototype,"minAngle",2);Me([$e(Rr)],GR.prototype,"minSpacing",2);Me([$e(Rr)],GR.prototype,"maxCollisionOffset",2);Me([$e(Jo)],GR.prototype,"avoidCollisions",2);hxe=class extends f1{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};Me([$e(wu)],hxe.prototype,"positionOffset",2);Me([$e(ud)],hxe.prototype,"positionRatio",2);jte=class extends pl{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};Me([$e(A6,{optional:!0})],jte.prototype,"colors",2);Me([$e(Rr)],jte.prototype,"length",2);Me([$e(Rr)],jte.prototype,"strokeWidth",2);pc=class extends L6{constructor(){super(...arguments),this.fills=Object.values(x2),this.strokes=Object.values(q5),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.innerLabels=new xte(dxe),this.title=new Jrt,this.innerCircle=new uxe,this.shadow=new h_,this.calloutLabel=new GR,this.sectorLabel=new hxe,this.calloutLine=new jte,this.tooltip=new Ng}isValid(){let t=super.isValid();return this.innerRadiusRatio==null&&this.innerRadiusOffset==null?(yr.warnOnce("Either an [innerRadiusRatio] or an [innerRadiusOffset] must be set to render a donut series."),!1):t}};Me([$e(Gr)],pc.prototype,"angleKey",2);Me([$e(Gr,{optional:!0})],pc.prototype,"angleName",2);Me([$e(Gr,{optional:!0})],pc.prototype,"angleFilterKey",2);Me([$e(Gr,{optional:!0})],pc.prototype,"radiusKey",2);Me([$e(Gr,{optional:!0})],pc.prototype,"radiusName",2);Me([$e(Rr,{optional:!0})],pc.prototype,"radiusMin",2);Me([$e(Rr,{optional:!0})],pc.prototype,"radiusMax",2);Me([$e(Gr,{optional:!0})],pc.prototype,"calloutLabelKey",2);Me([$e(Gr,{optional:!0})],pc.prototype,"calloutLabelName",2);Me([$e(Gr,{optional:!0})],pc.prototype,"sectorLabelKey",2);Me([$e(Gr,{optional:!0})],pc.prototype,"sectorLabelName",2);Me([$e(Gr,{optional:!0})],pc.prototype,"legendItemKey",2);Me([$e(A6)],pc.prototype,"fills",2);Me([$e(A6)],pc.prototype,"strokes",2);Me([$e(ud)],pc.prototype,"fillOpacity",2);Me([$e(ud)],pc.prototype,"strokeOpacity",2);Me([$e(Kx)],pc.prototype,"lineDash",2);Me([$e(Rr)],pc.prototype,"lineDashOffset",2);Me([$e(Rr)],pc.prototype,"cornerRadius",2);Me([$e(k3,{optional:!0})],pc.prototype,"itemStyler",2);Me([$e(xw)],pc.prototype,"rotation",2);Me([$e(wu)],pc.prototype,"outerRadiusOffset",2);Me([$e(ud)],pc.prototype,"outerRadiusRatio",2);Me([$e(wu,{optional:!0})],pc.prototype,"innerRadiusOffset",2);Me([$e(ud,{optional:!0})],pc.prototype,"innerRadiusRatio",2);Me([$e(Rr)],pc.prototype,"strokeWidth",2);Me([$e(wu)],pc.prototype,"sectorSpacing",2);Me([$e(Ytt)],pc.prototype,"innerLabels",2);Me([$e(Us)],pc.prototype,"title",2);Me([$e(Us)],pc.prototype,"innerCircle",2);Me([$e(Us)],pc.prototype,"shadow",2);Me([$e(Us)],pc.prototype,"calloutLabel",2);Me([$e(Us)],pc.prototype,"sectorLabel",2);Me([$e(Us)],pc.prototype,"calloutLine",2);Me([$e(Us)],pc.prototype,"tooltip",2);$te=class extends M8e{constructor(s){var o=s,{useLabelLayer:t=!1,pickModes:e=[3,0],canHaveAxes:n=!1,animationResetFns:i}=o,r=al(o,["useLabelLayer","pickModes","canHaveAxes","animationResetFns"]);super(St(ve({},r),{useLabelLayer:t,pickModes:e,contentGroupVirtual:!1,directionKeys:{x:["angleKey"],y:["radiusKey"]},directionNames:{x:["angleName"],y:["radiusName"]},canHaveAxes:n})),this.itemGroup=this.contentGroup.appendChild(new xo),this.nodeData=[],this.itemSelection=Oh.select(this.itemGroup,()=>this.nodeFactory(),!1),this.labelSelection=Oh.select(this.labelGroup,()=>this.labelFactory(),!1),this.highlightSelection=Oh.select(this.highlightGroup,()=>this.nodeFactory()),this.highlightLabelSelection=Oh.select(this.highlightLabel,()=>this.labelFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.itemGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=i,this.animationState=new BG("empty",{empty:{update:{target:"ready",action:a=>this.animateEmptyUpdateReady(a)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:a=>this.animateReadyHighlight(a),highlightMarkers:a=>this.animateReadyHighlightMarkers(a),resize:a=>this.animateReadyResize(a),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:a=>this.animateWaitingUpdateReady(a)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:a=>this.animateClearingUpdateEmpty(a)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getItemNodes(){return this.itemGroup.children}getNodeData(){return this.nodeData}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}labelFactory(){let t=new Gu;return t.pointerEvents=1,t}getInnerRadius(){return 0}getLabelData(){return[]}computeLabelsBBox(t,e){return null}resetAllAnimation(){let{item:t,label:e}=this.animationResetFns??{};this.ctx.animationManager.stopByAnimationGroupId(this.id),t&&Ef([this.itemSelection,this.highlightSelection],t),e&&Ef([this.labelSelection,this.highlightLabelSelection],e),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup(),this.highlightLabelSelection.cleanup()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(t){let{item:e,label:n}=this.animationResetFns??{};e&&Ef([this.highlightSelection],e),n&&Ef([this.highlightLabelSelection],n)}animateReadyHighlightMarkers(t){}animateReadyResize(t){this.resetAllAnimation()}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(t){return{seriesRect:t}}computeFocusBounds(t){let e=this.getNodeData()?.[t.datumIndex];if(e!==void 0)return this.itemSelection.select(n=>n instanceof Og&&n.datum===e)[0]}},Jvi=class extends $G{constructor(t,e,n,i){super(t,e,n,i),this.angleKey=i.properties.angleKey,this.radiusKey=i.properties.radiusKey,this.calloutLabelKey=i.properties.calloutLabelKey,this.sectorLabelKey=i.properties.sectorLabelKey}},e6i=(()=>{let t=class extends $te{constructor(e){super({moduleCtx:e,pickModes:[3,0],useLabelLayer:!0,animationResetFns:{item:pxe,label:Qx}}),this.properties=new pc,this.phantomNodeData=void 0,this.previousRadiusScale=new c_,this.radiusScale=new c_,this.phantomGroup=this.contentGroup.appendChild(new xo),this.phantomSelection=Oh.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new xo({name:"pieCalloutLabels"})),this.calloutLabelSelection=new Oh(this.calloutLabelGroup,xo),this.backgroundGroup=this.rootGroup.appendChild(new xo({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new xo({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new _E),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new _E),this.innerLabelsGroup=this.contentGroup.appendChild(new xo({name:"innerLabels"})),this.innerCircleGroup=this.backgroundGroup.appendChild(new xo({name:`${this.id}-innerCircle`})),this.innerLabelsSelection=Oh.select(this.innerLabelsGroup,Gu),this.innerCircleSelection=Oh.select(this.innerCircleGroup,_E),this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=Jvi,this.angleScale=new c_,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(n=>n+Math.PI/2),this.phantomGroup.opacity=.2,this.phantomGroup.zIndexSubOrder=[()=>this._declarationOrder,0]}get calloutNodeData(){return this.phantomNodeData??this.nodeData}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(this.seriesItemEnabled.length===0||this.seriesItemEnabled.some(e=>e))}nodeFactory(){return new S2}getSeriesDomain(e){return e==="x"?this.angleScale.domain:this.radiusScale.domain}processData(e){return O(this,null,function*(){if(this.data==null||!this.properties.isValid())return;let{data:n}=this,{visible:i,seriesItemEnabled:r}=this,{angleKey:s,angleFilterKey:o,radiusKey:a,calloutLabelKey:l,sectorLabelKey:c,legendItemKey:d}=this.properties,u=!this.ctx.animationManager.isSkipped(),m=[],f=[];d?m.push(B0(d,"band",{id:"legendItemKey"})):l?m.push(B0(l,"band",{id:"calloutLabelKey"})):c&&m.push(B0(c,"band",{id:"sectorLabelKey"}));let _=this.radiusScale.type,x=this.radiusScale.type;a&&f.push(T8e(a,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax}),Qc(a,_,{id:"radiusRaw"}),yE("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),l&&f.push(Qc(l,"band",{id:"calloutLabelValue"})),c&&f.push(Qc(c,"band",{id:"sectorLabelValue"})),d&&f.push(Qc(d,"band",{id:"legendItemValue"})),o&&f.push(TG(o,x,{id:"angleFilterValue",onlyPositive:!0}),Qc(o,x,{id:"angleFilterRaw"}),yE("angleFilterValue",[0,1],0,0)),u&&this.processedData&&m.length>0&&f.push(PE(this.processedData)),f.push(FR()),n=n.map((D,E)=>i&&r[E]?D:St(ve({},D),{[s]:0})),yield this.requestDataModel(e,n,{props:[...m,TG(s,x,{id:"angleValue",onlyPositive:!0}),Qc(s,x,{id:"angleRaw"}),yE("angleValue",[0,1],0,0),...f]});for(let D of this.processedData?.defs?.values??[]){let{id:E,missing:M,property:I}=D,z=v8e(this,M);E!=="angleRaw"&&z>0&&yr.warnOnce(`no value was found for the key '${String(I)}' on ${z} data element${z>1?"s":""}`)}this.animationState.transition("updateData")})}maybeRefreshNodeData(){return O(this,null,function*(){if(!this.nodeDataRefresh)return;let{nodeData:e=[],phantomNodeData:n}=(yield this.createNodeData())??{};this.nodeData=e,this.phantomNodeData=n,this.nodeDataRefresh=!1})}getProcessedDataIndexes(e){let n=e.resolveProcessedDataIndexById(this,"angleValue"),i=e.resolveProcessedDataIndexById(this,"angleRaw"),r=this.properties.angleFilterKey!=null?e.resolveProcessedDataIndexById(this,"angleFilterValue"):void 0,s=this.properties.angleFilterKey!=null?e.resolveProcessedDataIndexById(this,"angleFilterRaw"):void 0,o=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):void 0,a=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusRaw"):void 0,l=this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):void 0,c=this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):void 0,d=this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):void 0;return{angleIdx:n,angleRawIdx:i,angleFilterIdx:r,angleFilterRawIdx:s,radiusIdx:o,radiusRawIdx:a,calloutLabelIdx:l,sectorLabelIdx:c,legendItemIdx:d}}createNodeData(){return O(this,null,function*(){let{id:e,processedData:n,dataModel:i,angleScale:r}=this,{rotation:s,innerRadiusRatio:o}=this.properties;if(!this.properties.isValid())return this.zerosumOuterRing.visible=!0,this.zerosumInnerRing.visible=!0,{itemId:e,nodeData:[],labelData:[]};if(!n||!i||n.type!=="ungrouped")return;let{angleIdx:a,angleRawIdx:l,angleFilterIdx:c,angleFilterRawIdx:d,radiusIdx:u,radiusRawIdx:m,calloutLabelIdx:f,sectorLabelIdx:_,legendItemIdx:x}=this.getProcessedDataIndexes(i),D=d!=null&&n.data.some(({values:G})=>G[d]>G[l]),E=0,M=0,I=[],z=d!=null?[]:void 0;return n.data.forEach((G,A)=>{let{datum:Y,values:X}=G,ne=D?X[c]:X[a],pe=d!=null&&!D?Math.sqrt(X[d]/X[l]):1,ce=r.convert(E)+Rg(s);E=ne,M+=ne;let ie=r.convert(E)+Rg(s),le=Math.abs(ie-ce),Se=ce+le/2,je=X[l],Ge=(u!=null?X[u]??1:1)*pe,Ae=m!=null?X[m]:void 0,Ye=x!=null?X[x]:void 0,ft=this.getLabels(Y,Se,le,!0,f!=null?X[f]:void 0,_!=null?X[_]:void 0,Ye),Ft=this.getSectorFormat(Y,A,!1),Tt=ve({itemId:A,series:this,datum:Y,index:A,angleValue:je,midAngle:Se,midCos:Math.cos(Se),midSin:Math.sin(Se),startAngle:ce,endAngle:ie,radius:Ge,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(Ge),0),sectorFormat:Ft,radiusValue:Ae,legendItemValue:Ye,enabled:this.seriesItemEnabled[A],focusable:!0},ft);I.push(Tt),z?.push(St(ve({},Tt),{radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0),focusable:!1}))}),this.zerosumOuterRing.visible=M===0,this.zerosumInnerRing.visible=M===0&&o!=null&&o!==1&&o>0,{itemId:e,nodeData:I,labelData:I,phantomNodeData:z}})}getLabels(e,n,i,r,s,o,a){let{calloutLabel:l,sectorLabel:c,legendItemKey:d}=this.properties,u=!r||l.enabled?this.properties.calloutLabelKey:void 0,m=!r||c.enabled?this.properties.sectorLabelKey:void 0;if(!u&&!m&&!d)return{};let f={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},_={};return u&&i>Rg(l.minAngle)&&(_.calloutLabel=St(ve({},this.getTextAlignment(n)),{text:this.getLabelText(l,St(ve({},f),{value:s})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),m&&(_.sectorLabel={text:this.getLabelText(c,St(ve({},f),{value:o}))}),d!=null&&a!=null&&(_.legendItem={key:d,text:a}),_}getTextAlignment(e){let n=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=bG(e),r=-.75*Math.PI,s=i-r,o=Math.floor(s/(Math.PI/2)),a=_te(o,n.length);return n[a]}getSectorFormat(e,n,i){let{callbackCache:r}=this.ctx,{angleKey:s,radiusKey:o,calloutLabelKey:a,sectorLabelKey:l,legendItemKey:c,fills:d,strokes:u,itemStyler:m}=this.properties,f=u[n%u.length],{fill:_,fillOpacity:x,stroke:D,strokeWidth:E,strokeOpacity:M,lineDash:I,lineDashOffset:z,cornerRadius:G}=ql(i&&this.properties.highlightStyle.item,{fill:d.length>0?d[n%d.length]:void 0,stroke:f,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties),A;return m&&(A=r.call(m,{datum:e,angleKey:s,radiusKey:o,calloutLabelKey:a,sectorLabelKey:l,legendItemKey:c,fill:_,fillOpacity:x,stroke:D,strokeWidth:E,strokeOpacity:M,lineDash:I,lineDashOffset:z,cornerRadius:G,highlighted:i,seriesId:this.id})),{fill:A?.fill??_,fillOpacity:A?.fillOpacity??x,stroke:A?.stroke??D,strokeWidth:A?.strokeWidth??E,strokeOpacity:A?.strokeOpacity??M,lineDash:A?.lineDash??I,lineDashOffset:A?.lineDashOffset??z,cornerRadius:A?.cornerRadius??G}}getInnerRadius(){let{radius:e}=this,{innerRadiusRatio:n=1,innerRadiusOffset:i=0}=this.properties,r=e*n+i;return r===e||r<0?0:r}getOuterRadius(){let{outerRadiusRatio:e,outerRadiusOffset:n}=this.properties;return Math.max(this.radius*e+n,0)}updateRadiusScale(e){let n=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=n,e&&(this.previousRadiusScale.range=n);let i=r=>St(ve({},r),{innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(r.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){let e=Math.max(0,this.radiusScale.range[1]);if(e===0)return NaN;let i=2+(this.properties.title?.spacing??0),r=Math.max(0,-e);return-e-i-r}update(n){return O(this,arguments,function*({seriesRect:e}){let{title:i}=this.properties,r={seriesRectWidth:e?.width,seriesRectHeight:e?.height},s=V4(this.nodeDataDependencies,r)!=null;if(s&&(this._nodeDataDependencies=r),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),i){let o=this.getTitleTranslationY(),a=i.node.getBBox();i.node.visible=i.enabled&&isFinite(o)&&!this.bboxIntersectsSurroundingSeries(a,0,o),i.node.translationY=isFinite(o)?o:0}for(let o of[this.zerosumInnerRing,this.zerosumOuterRing])o.fillOpacity=0,o.stroke=this.properties.calloutLabel.color,o.strokeWidth=1,o.strokeOpacity=1;this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(e)})}updateTitleNodes(){let{oldTitle:e}=this,{title:n}=this.properties;e!==n&&(e&&this.labelGroup?.removeChild(e.node),n&&(n.node.textBaseline="bottom",this.labelGroup?.appendChild(n.node)),this.oldTitle=n)}updateNodeMidPoint(){let e=n=>{let i=n.innerRadius+(n.outerRadius-n.innerRadius)/2;n.midPoint={x:n.midCos*Math.max(0,i),y:n.midSin*Math.max(0,i)}};this.nodeData.forEach(e),this.phantomNodeData?.forEach(e)}updateSelections(){return O(this,null,function*(){yield this.updateGroupSelection(),this.updateInnerCircleSelection()})}updateGroupSelection(){return O(this,null,function*(){let{itemSelection:e,highlightSelection:n,phantomSelection:i,highlightLabelSelection:r,calloutLabelSelection:s,labelSelection:o,innerLabelsSelection:a}=this,l=this.nodeData.map(d=>St(ve({},d),{sectorFormat:ve({},d.sectorFormat)})),c=(d,u)=>{d.update(u,void 0,m=>this.getDatumId(m)),this.ctx.animationManager.isSkipped()&&d.cleanup()};c(e,this.nodeData),c(n,l),c(i,this.phantomNodeData??[]),s.update(this.calloutNodeData,d=>{let u=new i0;u.tag=0,u.pointerEvents=1,d.appendChild(u);let m=new Gu;m.tag=1,m.pointerEvents=1,d.appendChild(m)}),o.update(this.nodeData),r.update(l),a.update(this.properties.innerLabels,d=>{d.pointerEvents=1})})}updateInnerCircleSelection(){let{innerCircle:e}=this.properties,n=0,i=this.getInnerRadius();if(i>0){let s=Math.min(i,this.getOuterRadius());n=Math.ceil(s*2+1)}let r=e?[{radius:n}]:[];this.innerCircleSelection.update(r)}updateNodes(e){return O(this,null,function*(){let n=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&n?.series===this,this.highlightLabel.visible=i&&n?.series===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((o,{radius:a})=>{o.setProperties({fill:this.properties.innerCircle?.fill,opacity:this.properties.innerCircle?.fillOpacity,size:a})});let r=this.ctx.animationManager.isSkipped(),s=(o,a,l,c)=>{let d=this.getSectorFormat(a.datum,a.itemId,c);a.sectorFormat.fill=d.fill,a.sectorFormat.stroke=d.stroke,r&&(o.startAngle=a.startAngle,o.endAngle=a.endAngle,o.innerRadius=a.innerRadius,o.outerRadius=a.outerRadius),(c||r)&&(o.fill=d.fill,o.stroke=d.stroke),o.strokeWidth=d.strokeWidth,o.fillOpacity=d.fillOpacity,o.strokeOpacity=d.strokeOpacity,o.lineDash=d.lineDash,o.lineDashOffset=d.lineDashOffset,o.cornerRadius=d.cornerRadius,o.fillShadow=this.properties.shadow;let u=Math.max((this.properties.sectorSpacing+(d.stroke!=null?d.strokeWidth:0))/2,0);o.inset=u,o.lineJoin=this.properties.sectorSpacing>=0||u>0?"miter":"round"};this.itemSelection.each((o,a,l)=>s(o,a,l,!1)),this.highlightSelection.each((o,a,l)=>{a.itemId===n?.itemId?(o.visible=!0,s(o,a,l,!0)):o.visible=!1}),this.phantomSelection.each((o,a,l)=>s(o,a,l,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")})}updateCalloutLineNodes(){let{calloutLine:e}=this.properties,n=e.length,i=e.strokeWidth,r=e.colors??this.properties.strokes,{offset:s}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((o,a)=>{let l=o.datum,{calloutLabel:c,outerRadius:d}=l;if(c?.text&&!c.hidden&&d!==0){o.visible=!0,o.strokeWidth=i,o.stroke=r[a%r.length],o.fill=void 0;let u=l.midCos*d,m=l.midSin*d,f=l.midCos*(d+n),_=l.midSin*(d+n);if((c.collisionTextAlign??c.collisionOffsetY!==0)&&c.box!=null){let D=c.box,E=f,M=_;f<D.x?E=D.x:f>D.x+D.width&&(E=D.x+D.width),_<D.y?M=D.y:_>D.y+D.height&&(M=D.y+D.height);let I=E-f,z=M-_,G=Math.sqrt(Math.pow(I,2)+Math.pow(z,2)),A=G-s;A>0&&(f=f+I*A/G,_=_+z*A/G)}o.x1=u,o.y1=m,o.x2=f,o.y2=_}else o.visible=!1})}getLabelOverflow(e,n,i){let r=i.x-this.centerX,s=i.x+i.width-this.centerX,o=i.y-this.centerY,a=i.y+i.height-this.centerY,l=1,c=1;n.x+l<r?c=(n.x+n.width-r)/n.width:n.x+n.width-l>s&&(c=(s-n.x)/n.width);let d=n.y+l<o||n.y+n.height-l>a,u=c===1?e.length:Math.floor(e.length*c)-1,m=this.bboxIntersectsSurroundingSeries(n);return{textLength:u,hasVerticalOverflow:d,hasSurroundingSeriesOverflow:m}}bboxIntersectsSurroundingSeries(e,n=0,i=0){let{surroundingRadius:r}=this;if(r==null)return!1;let s=[{x:e.x+n,y:e.y+i},{x:e.x+e.width+n,y:e.y+i},{x:e.x+e.width+n,y:e.y+e.height+i},{x:e.x+n,y:e.y+e.height+i}],o=r**2;return s.some(a=>a.x**2+a.y**2>o)}computeCalloutLabelCollisionOffsets(){let{radiusScale:e}=this,{calloutLabel:n,calloutLine:i}=this.properties,{offset:r,minSpacing:s}=n,o=e.convert(0),a=M=>!M.calloutLabel||M.outerRadius===0,l=this.calloutNodeData,c=l.filter(M=>!a(M));if(c.forEach(M=>{let I=M.calloutLabel;I!=null&&(I.hidden=!1,I.collisionTextAlign=void 0,I.collisionOffsetY=0)}),c.length<=1)return;let d=c.filter(M=>M.midCos<0).sort((M,I)=>M.midSin-I.midSin),u=c.filter(M=>M.midCos>=0).sort((M,I)=>M.midSin-I.midSin),m=c.filter(M=>M.midSin<0&&M.calloutLabel?.textAlign==="center").sort((M,I)=>M.midCos-I.midCos),f=c.filter(M=>M.midSin>=0&&M.calloutLabel?.textAlign==="center").sort((M,I)=>M.midCos-I.midCos),_=M=>{let I=M.calloutLabel;if(I==null)return Os.zero.clone();let z=M.outerRadius+i.length+r,G=M.midCos*z,A=M.midSin*z+I.collisionOffsetY,Y=I.collisionTextAlign??I.textAlign,X=I.textBaseline;return Gu.computeBBox(I.text,G,A,{font:this.properties.calloutLabel,textAlign:Y,textBaseline:X})},x=(M,I,z)=>{let G=_(M).grow(s/2),A=_(I).grow(s/2);if(G.x<A.x+A.width&&G.x+G.width>A.x&&(z==="to-top"?G.y<A.y+A.height:G.y+G.height>A.y)){let X=z==="to-top"?G.y-A.y-A.height:G.y+G.height-A.y;I.calloutLabel.collisionOffsetY=X}},D=M=>{let I=M.slice().sort((G,A)=>Math.abs(G.midSin)-Math.abs(A.midSin))[0],z=M.indexOf(I);for(let G=z-1;G>=0;G--){let A=M[G+1],Y=M[G];x(A,Y,"to-top")}for(let G=z+1;G<M.length;G++){let A=M[G-1],Y=M[G];x(A,Y,"to-bottom")}},E=M=>{let I=c.some(ne=>ne.calloutLabel.collisionOffsetY!==0),z=M.map(ne=>_(ne)),G=z.map(ne=>ne.clone().grow(s/2)),A=!1;for(let ne=0;ne<G.length&&!A;ne++){let pe=G[ne];for(let ce=ne+1;ce<M.length;ce++){let ie=G[ce];if(pe.collidesBBox(ie)){A=!0;break}}}let Y=l.map(ne=>{let{startAngle:pe,endAngle:ce,outerRadius:ie}=ne;return{startAngle:pe,endAngle:ce,innerRadius:o,outerRadius:ie}}),X=z.some(ne=>Y.some(pe=>Qrt(ne,pe)));!A&&!I&&!X||M.filter(ne=>ne.calloutLabel.textAlign==="center").forEach(ne=>{let pe=ne.calloutLabel;ne.midCos<0?pe.collisionTextAlign="right":ne.midCos>0?pe.collisionTextAlign="left":pe.collisionTextAlign="center"})};D(d),D(u),E(m),E(f)}updateCalloutLabelNodes(e){let{radiusScale:n}=this,{calloutLabel:i,calloutLine:r}=this.properties,s=r.length,{offset:o,color:a}=i,l=new Gu;this.calloutLabelSelection.selectByTag(1).forEach(c=>{let{datum:d}=c,u=d.calloutLabel,m=n.convert(d.radius),f=Math.max(0,m);if(!u?.text||f===0||u.hidden){c.visible=!1;return}let _=f+s+o,x=d.midCos*_,D=d.midSin*_+u.collisionOffsetY,E={textAlign:u.collisionTextAlign??u.textAlign,textBaseline:u.textBaseline};l.text=u.text,l.x=x,l.y=D,l.setFont(this.properties.calloutLabel),l.setAlign(E);let M=l.getBBox(),I=u.text,z=!0;if(i.avoidCollisions){let{textLength:G,hasVerticalOverflow:A}=this.getLabelOverflow(u.text,M,e);I=u.text.length===G?u.text:`${u.text.substring(0,G)}\u2026`,z=!A}c.text=I,c.x=x,c.y=D,c.setFont(this.properties.calloutLabel),c.setAlign(E),c.fill=a,c.visible=z})}computeLabelsBBox(e,n){return O(this,null,function*(){let{calloutLabel:i,calloutLine:r}=this.properties,s=r.length,{offset:o,maxCollisionOffset:a,minSpacing:l}=i;if(!i.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();let c=[],d=new Gu,u,{title:m}=this.properties;if(m?.text&&m.enabled){let f=this.getTitleTranslationY();isFinite(f)&&(d.text=m.text,d.x=0,d.y=f,d.setFont(m),d.setAlign({textBaseline:"bottom",textAlign:"center"}),u=d.getBBox(),c.push(u))}return this.calloutNodeData.forEach(f=>{let _=f.calloutLabel;if(!_||f.outerRadius===0)return null;let x=f.outerRadius+s+o,D=f.midCos*x,E=f.midSin*x+_.collisionOffsetY;d.text=_.text,d.x=D,d.y=E,d.setFont(this.properties.calloutLabel),d.setAlign({textAlign:_.collisionTextAlign??_.textAlign,textBaseline:_.textBaseline});let M=d.getBBox();if(_.box=M,Math.abs(_.collisionOffsetY)>a){_.hidden=!0;return}if(u){let I=n.y-this.centerY,z=new Os(u.x-l,I,u.width+2*l,u.y+u.height+l-I);if(M.collidesBBox(z)){_.hidden=!0;return}}if(e.hideWhenNecessary){let{textLength:I,hasVerticalOverflow:z,hasSurroundingSeriesOverflow:G}=this.getLabelOverflow(_.text,M,n),A=_.text.length>2&&I<2;if(z||A||G){_.hidden=!0;return}}_.hidden=!1,c.push(M)}),c.length===0?null:Os.merge(c)})}updateSectorLabelNodes(){let{radiusScale:e}=this,n=e.convert(0),{fontSize:i,fontStyle:r,fontWeight:s,fontFamily:o,positionOffset:a,positionRatio:l,color:c}=this.properties.sectorLabel,d=(u,m)=>{let{sectorLabel:f,outerRadius:_}=m,x=!1;if(f&&_!==0){let D=n*(1-l)+_*l+a;u.fill=c,u.fontStyle=r,u.fontWeight=s,u.fontSize=i,u.fontFamily=o,u.text=f.text,u.x=m.midCos*D,u.y=m.midSin*D,u.textAlign="center",u.textBaseline="middle";let E=u.getBBox(),M=[[E.x,E.y],[E.x+E.width,E.y],[E.x+E.width,E.y+E.height],[E.x,E.y+E.height]],{startAngle:I,endAngle:z}=m,G={startAngle:I,endAngle:z,innerRadius:n,outerRadius:_};M.every(([A,Y])=>pte(A,Y,G))&&(x=!0)}u.visible=x};this.labelSelection.each(d),this.highlightLabelSelection.each(d)}updateInnerLabelNodes(){let e=[],n=[];this.innerLabelsSelection.each((u,m)=>{let{fontStyle:f,fontWeight:_,fontSize:x,fontFamily:D,color:E}=m;u.fontStyle=f,u.fontWeight=_,u.fontSize=x,u.fontFamily=D,u.text=m.text,u.x=0,u.y=0,u.fill=E,u.textAlign="center",u.textBaseline="alphabetic",e.push(u.getBBox()),n.push(m.spacing)});let i=u=>u===0?0:n[u],r=u=>u===n.length-1?0:n[u],s=e.reduce((u,m,f)=>u+m.height+i(f)+r(f),0),o=Math.max(...e.map(u=>u.width)),a=this.getInnerRadius(),c=Math.sqrt(Math.pow(o/2,2)+Math.pow(s/2,2))<=(a>0?a:this.getOuterRadius()),d=[];for(let u=0,m=-s/2;u<e.length;u++){let _=e[u].height+m+i(u);d.push(_),m=_+r(u)}this.innerLabelsSelection.each((u,m,f)=>{u.y=d[f],u.visible=c})}updateZerosumRings(){this.zerosumOuterRing.size=this.getOuterRadius()*2,this.zerosumInnerRing.size=this.getInnerRadius()*2}getDatumLegendName(e){let{angleKey:n,calloutLabelKey:i,sectorLabelKey:r,legendItemKey:s}=this.properties,{sectorLabel:o,calloutLabel:a,legendItem:l}=e;if(s&&l!==void 0)return l.text;if(i&&i!==n&&a?.text!==void 0)return a.text;if(r&&r!==n&&o?.text!==void 0)return o.text}pickNodeClosestDatum(e){return mxe(this,e)}getTooltipHtml(e){if(!this.properties.isValid())return qx;let{datum:n,angleValue:i,sectorFormat:{fill:r},itemId:s}=e,o=Lh(this.properties.title?.text),a=Tc(i)?yte(i):String(i),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:o??l,content:o&&l?`${l}: ${a}`:a,backgroundColor:r},{datum:n,itemId:s,title:o,color:r,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){let{visible:n,processedData:i,dataModel:r}=this;if(!r||!i?.data.length||!this.properties.isValid()||e!=="category")return[];let{angleKey:s,calloutLabelKey:o,sectorLabelKey:a,legendItemKey:l}=this.properties;if(!l&&(!o||o===s)&&(!a||a===s))return[];let{calloutLabelIdx:c,sectorLabelIdx:d,legendItemIdx:u}=this.getProcessedDataIndexes(r),m=this.properties.title?.showInLegend&&this.properties.title.text,f=[];for(let _=0;_<i.data.length;_++){let{datum:x,values:D}=i.data[_],E=[];m&&E.push(m);let M=this.getLabels(x,2*Math.PI,2*Math.PI,!1,c!=null?D[c]:void 0,d!=null?D[d]:void 0,u!=null?D[u]:void 0);if(l&&M.legendItem!==void 0?E.push(M.legendItem.text):o&&o!==s&&M.calloutLabel?.text!==void 0?E.push(M.calloutLabel?.text):a&&a!==s&&M.sectorLabel?.text!==void 0&&E.push(M.sectorLabel?.text),E.length===0)continue;let I=this.getSectorFormat(x,_,!1);f.push({legendType:"category",id:this.id,itemId:_,seriesId:this.id,enabled:n&&this.seriesItemEnabled[_],label:{text:E.join(" - ")},symbols:[{marker:{fill:I.fill,stroke:I.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}}],legendItemName:l!=null?x[l]:void 0})}return f}onLegendItemClick(e){let{enabled:n,itemId:i,series:r,legendItemName:s}=e;r.id===this.id?this.toggleSeriesItem(i,n):s!=null&&this.toggleOtherSeriesItems(s,n)}toggleSeriesItem(e,n){this.seriesItemEnabled[e]=n,this.nodeData[e]&&(this.nodeData[e].enabled=n),this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,n){if(!this.properties.legendItemKey||!this.dataModel)return;let i=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");this.processedData?.data.forEach(({values:r},s)=>{r[i]===e&&this.toggleSeriesItem(s,n)})}animateEmptyUpdateReady(e){let{animationManager:n}=this.ctx,i=wE(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);om(this.id,"nodes",n,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(r,s)=>this.getDatumId(s)),om(this.id,"innerCircle",n,[this.innerCircleSelection],i.innerCircle),Xc(this,"callout",n,this.calloutLabelSelection),Xc(this,"sector",n,this.labelSelection),Xc(this,"highlight",n,this.highlightLabelSelection),Xc(this,"inner",n,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){let{itemSelection:e,highlightSelection:n,phantomSelection:i,processedData:r,radiusScale:s,previousRadiusScale:o}=this,{animationManager:a}=this.ctx,l=r?.reduced?.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);let c=(l?.moved.size??0)===0,d=(r?.defs.keys.length??0)>0,u=r?.reduced?.animationValidation?.uniqueKeys??!0;(!c||!d||!u)&&this.ctx.animationManager.skipCurrentBatch();let m=wE(!1,this.properties.rotation,s,o);om(this.id,"nodes",a,[e,n,i],m.nodes,(f,_)=>this.getDatumId(_),l),om(this.id,"innerCircle",a,[this.innerCircleSelection],m.innerCircle),Xc(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Xc(this,"sector",this.ctx.animationManager,this.labelSelection),Xc(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),Xc(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){let{itemSelection:e,highlightSelection:n,phantomSelection:i,radiusScale:r,previousRadiusScale:s}=this,{animationManager:o}=this.ctx,a=wE(!1,this.properties.rotation,r,s);om(this.id,"nodes",o,[e,n,i],a.nodes,(l,c)=>this.getDatumId(c)),om(this.id,"innerCircle",o,[this.innerCircleSelection],a.innerCircle),pw(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),pw(this,"sector",this.ctx.animationManager,this.labelSelection),pw(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),pw(this,"inner",this.ctx.animationManager,this.innerLabelsSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){let{calloutLabelKey:n,sectorLabelKey:i,legendItemKey:r}=this.properties;if(this.processedData?.reduced?.animationValidation?.uniqueKeys){if(r)return e[r];if(n)return e[n];if(i)return e[i]}}getDatumId(e){let{index:n}=e,i=this.getDatumIdFromData(e.datum);return i!=null?String(i):`${n}`}onDataChange(){let{data:e,seriesItemEnabled:n}=this;this.seriesItemEnabled=e?.map((i,r)=>n[r]??!0)??[]}};return t.className="DonutSeries",t.type="donut",t})(),t6i={series:{title:{enabled:!0,fontWeight:"normal",fontSize:14,fontFamily:sm,color:bE,spacing:5},calloutLabel:{enabled:!0,fontSize:12,fontFamily:sm,color:t0,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontWeight:"normal",fontSize:12,fontFamily:sm,color:OE,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:NE,xOffset:3,yOffset:3,blur:5},innerLabels:{fontSize:12,fontFamily:sm,color:t0,spacing:2}}},i6i={series:{title:{enabled:!0,fontWeight:"normal",fontSize:14,fontFamily:sm,color:bE,spacing:5},calloutLabel:{enabled:!0,fontSize:12,fontFamily:sm,color:t0,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontWeight:"normal",fontSize:12,fontFamily:sm,color:OE,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,rotation:0,sectorSpacing:1,shadow:{enabled:!1,color:NE,xOffset:3,yOffset:3,blur:5}}},est=({takeColors:t,colorsCount:e})=>{let{fills:n,strokes:i}=t(e);return{fills:n,strokes:i,calloutLine:{colors:i}}},n6i={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"donut",moduleFactory:t=>new e6i(t),tooltipDefaults:{range:"exact"},themeTemplate:t6i,paletteFactory:est},tst=class extends Vh{constructor(){super(...arguments),this.showInLegend=!1}};Me([$e(Jo)],tst.prototype,"showInLegend",2);WR=class extends f1{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};Me([$e(Rr)],WR.prototype,"offset",2);Me([$e(xw)],WR.prototype,"minAngle",2);Me([$e(Rr)],WR.prototype,"minSpacing",2);Me([$e(Rr)],WR.prototype,"maxCollisionOffset",2);Me([$e(Jo)],WR.prototype,"avoidCollisions",2);fxe=class extends f1{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};Me([$e(wu)],fxe.prototype,"positionOffset",2);Me([$e(ud)],fxe.prototype,"positionRatio",2);Kte=class extends pl{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};Me([$e(A6,{optional:!0})],Kte.prototype,"colors",2);Me([$e(Rr)],Kte.prototype,"length",2);Me([$e(Rr)],Kte.prototype,"strokeWidth",2);hd=class extends L6{constructor(){super(...arguments),this.fills=Object.values(x2),this.strokes=Object.values(q5),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=0,this.title=new tst,this.shadow=new h_,this.calloutLabel=new WR,this.sectorLabel=new fxe,this.calloutLine=new Kte,this.tooltip=new Ng}};Me([$e(Gr)],hd.prototype,"angleKey",2);Me([$e(Gr,{optional:!0})],hd.prototype,"angleName",2);Me([$e(Gr,{optional:!0})],hd.prototype,"angleFilterKey",2);Me([$e(Gr,{optional:!0})],hd.prototype,"radiusKey",2);Me([$e(Gr,{optional:!0})],hd.prototype,"radiusName",2);Me([$e(Rr,{optional:!0})],hd.prototype,"radiusMin",2);Me([$e(Rr,{optional:!0})],hd.prototype,"radiusMax",2);Me([$e(Gr,{optional:!0})],hd.prototype,"calloutLabelKey",2);Me([$e(Gr,{optional:!0})],hd.prototype,"calloutLabelName",2);Me([$e(Gr,{optional:!0})],hd.prototype,"sectorLabelKey",2);Me([$e(Gr,{optional:!0})],hd.prototype,"sectorLabelName",2);Me([$e(Gr,{optional:!0})],hd.prototype,"legendItemKey",2);Me([$e(A6)],hd.prototype,"fills",2);Me([$e(A6)],hd.prototype,"strokes",2);Me([$e(ud)],hd.prototype,"fillOpacity",2);Me([$e(ud)],hd.prototype,"strokeOpacity",2);Me([$e(Kx)],hd.prototype,"lineDash",2);Me([$e(Rr)],hd.prototype,"lineDashOffset",2);Me([$e(Rr)],hd.prototype,"cornerRadius",2);Me([$e(k3,{optional:!0})],hd.prototype,"itemStyler",2);Me([$e(xw)],hd.prototype,"rotation",2);Me([$e(wu)],hd.prototype,"outerRadiusOffset",2);Me([$e(ud)],hd.prototype,"outerRadiusRatio",2);Me([$e(Rr)],hd.prototype,"strokeWidth",2);Me([$e(wu)],hd.prototype,"sectorSpacing",2);Me([$e(Us)],hd.prototype,"title",2);Me([$e(Us)],hd.prototype,"shadow",2);Me([$e(Us)],hd.prototype,"calloutLabel",2);Me([$e(Us)],hd.prototype,"sectorLabel",2);Me([$e(Us)],hd.prototype,"calloutLine",2);Me([$e(Us)],hd.prototype,"tooltip",2);r6i=class extends $G{constructor(t,e,n,i){super(t,e,n,i),this.angleKey=i.properties.angleKey,this.radiusKey=i.properties.radiusKey,this.calloutLabelKey=i.properties.calloutLabelKey,this.sectorLabelKey=i.properties.sectorLabelKey}},s6i=(()=>{let t=class extends $te{constructor(e){super({moduleCtx:e,pickModes:[3,0],useLabelLayer:!0,animationResetFns:{item:pxe,label:Qx}}),this.properties=new hd,this.phantomNodeData=void 0,this.previousRadiusScale=new c_,this.radiusScale=new c_,this.phantomGroup=this.contentGroup.appendChild(new xo),this.phantomSelection=Oh.select(this.phantomGroup,()=>this.nodeFactory(),!1),this.calloutLabelGroup=this.contentGroup.appendChild(new xo({name:"pieCalloutLabels"})),this.calloutLabelSelection=new Oh(this.calloutLabelGroup,xo),this.backgroundGroup=this.rootGroup.appendChild(new xo({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new xo({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new _E),this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeEvent=r6i,this.angleScale=new c_,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(n=>n+Math.PI/2),this.phantomGroup.opacity=.2,this.phantomGroup.zIndexSubOrder=[()=>this._declarationOrder,0]}get calloutNodeData(){return this.phantomNodeData??this.nodeData}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager?.addListener("legend-item-click",e=>this.onLegendItemClick(e)))}get visible(){return super.visible&&(this.seriesItemEnabled.length===0||this.seriesItemEnabled.some(e=>e))}nodeFactory(){let e=new S2;return e.miterLimit=1e9,e}getSeriesDomain(e){return e==="x"?this.angleScale.domain:this.radiusScale.domain}processData(e){return O(this,null,function*(){if(this.data==null||!this.properties.isValid())return;let{data:n}=this,{visible:i,seriesItemEnabled:r}=this,{angleKey:s,angleFilterKey:o,radiusKey:a,calloutLabelKey:l,sectorLabelKey:c,legendItemKey:d}=this.properties,u=!this.ctx.animationManager.isSkipped(),m=[],f=[];d?m.push(B0(d,"band",{id:"legendItemKey"})):l?m.push(B0(l,"band",{id:"calloutLabelKey"})):c&&m.push(B0(c,"band",{id:"sectorLabelKey"}));let _=this.radiusScale.type,x=this.radiusScale.type;a&&f.push(T8e(a,{id:"radiusValue",min:this.properties.radiusMin??0,max:this.properties.radiusMax}),Qc(a,_,{id:"radiusRaw"}),yE("radiusValue",[0,1],1,this.properties.radiusMin??0,this.properties.radiusMax)),l&&f.push(Qc(l,"band",{id:"calloutLabelValue"})),c&&f.push(Qc(c,"band",{id:"sectorLabelValue"})),d&&f.push(Qc(d,"band",{id:"legendItemValue"})),o&&f.push(TG(o,x,{id:"angleFilterValue",onlyPositive:!0}),Qc(o,x,{id:"angleFilterRaw"}),yE("angleFilterValue",[0,1],0,0)),u&&this.processedData?.reduced?.animationValidation?.uniqueKeys&&m.length>0&&f.push(PE(this.processedData)),f.push(FR()),n=n.map((D,E)=>i&&r[E]?D:St(ve({},D),{[s]:0})),yield this.requestDataModel(e,n,{props:[...m,TG(s,x,{id:"angleValue",onlyPositive:!0}),Qc(s,x,{id:"angleRaw"}),yE("angleValue",[0,1],0,0),...f]});for(let D of this.processedData?.defs?.values??[]){let{id:E,missing:M,property:I}=D,z=v8e(this,M);E!=="angleRaw"&&z>0&&yr.warnOnce(`no value was found for the key '${String(I)}' on ${z} data element${z>1?"s":""}`)}this.animationState.transition("updateData")})}maybeRefreshNodeData(){return O(this,null,function*(){if(!this.nodeDataRefresh)return;let{nodeData:e=[],phantomNodeData:n}=(yield this.createNodeData())??{};this.nodeData=e,this.phantomNodeData=n,this.nodeDataRefresh=!1})}getProcessedDataIndexes(e){let n=e.resolveProcessedDataIndexById(this,"angleValue"),i=e.resolveProcessedDataIndexById(this,"angleRaw"),r=this.properties.angleFilterKey!=null?e.resolveProcessedDataIndexById(this,"angleFilterValue"):void 0,s=this.properties.angleFilterKey!=null?e.resolveProcessedDataIndexById(this,"angleFilterRaw"):void 0,o=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue"):void 0,a=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusRaw"):void 0,l=this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue"):void 0,c=this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue"):void 0,d=this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue"):void 0;return{angleIdx:n,angleRawIdx:i,angleFilterIdx:r,angleFilterRawIdx:s,radiusIdx:o,radiusRawIdx:a,calloutLabelIdx:l,sectorLabelIdx:c,legendItemIdx:d}}createNodeData(){return O(this,null,function*(){let{id:e,processedData:n,dataModel:i,angleScale:r}=this,{rotation:s}=this.properties;if(!n||!i||n.type!=="ungrouped")return;let{angleIdx:o,angleRawIdx:a,angleFilterIdx:l,angleFilterRawIdx:c,radiusIdx:d,radiusRawIdx:u,calloutLabelIdx:m,sectorLabelIdx:f,legendItemIdx:_}=this.getProcessedDataIndexes(i),x=c!=null&&n.data.some(({values:z})=>z[c]>z[a]),D=0,E=0,M=[],I=c!=null?[]:void 0;return n.data.forEach((z,G)=>{let{datum:A,values:Y}=z,X=x?Y[l]:Y[o],ne=c!=null&&!x?Math.sqrt(Y[c]/Y[a]):1,pe=r.convert(D)+Rg(s);D=X,E+=X;let ce=r.convert(D)+Rg(s),ie=Math.abs(ce-pe),le=pe+ie/2,Se=Y[a],ze=(d!=null?Y[d]??1:1)*ne,Ge=u!=null?Y[u]:void 0,Ae=_!=null?Y[_]:void 0,Ye=this.getLabels(A,le,ie,!0,m!=null?Y[m]:void 0,f!=null?Y[f]:void 0,Ae),ft=this.getSectorFormat(A,G,!1),Ft=ve({itemId:G,series:this,datum:A,index:G,angleValue:Se,midAngle:le,midCos:Math.cos(le),midSin:Math.sin(le),startAngle:pe,endAngle:ce,radius:ze,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(ze),0),sectorFormat:ft,radiusValue:Ge,legendItemValue:Ae,enabled:this.seriesItemEnabled[G]},Ye);M.push(Ft),I?.push(St(ve({},Ft),{radius:1,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(1),0)}))}),this.zerosumOuterRing.visible=E===0,{itemId:e,nodeData:M,labelData:M,phantomNodeData:I}})}getLabels(e,n,i,r,s,o,a){let{calloutLabel:l,sectorLabel:c,legendItemKey:d}=this.properties,u=!r||l.enabled?this.properties.calloutLabelKey:void 0,m=!r||c.enabled?this.properties.sectorLabelKey:void 0;if(!u&&!m&&!d)return{};let f={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},_={};return u&&i>Rg(l.minAngle)&&(_.calloutLabel=St(ve({},this.getTextAlignment(n)),{text:this.getLabelText(l,St(ve({},f),{value:s})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),m&&(_.sectorLabel={text:this.getLabelText(c,St(ve({},f),{value:o}))}),d!=null&&a!=null&&(_.legendItem={key:d,text:a}),_}getTextAlignment(e){let n=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=bG(e),r=-.75*Math.PI,s=i-r,o=Math.floor(s/(Math.PI/2)),a=_te(o,n.length);return n[a]}getSectorFormat(e,n,i){let{callbackCache:r}=this.ctx,{angleKey:s,radiusKey:o,calloutLabelKey:a,sectorLabelKey:l,legendItemKey:c,fills:d,strokes:u,itemStyler:m}=this.properties,f=u[n%u.length],{fill:_,fillOpacity:x,stroke:D,strokeWidth:E,strokeOpacity:M,lineDash:I,lineDashOffset:z,cornerRadius:G}=ql(i&&this.properties.highlightStyle.item,{fill:d.length>0?d[n%d.length]:void 0,stroke:f,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()},this.properties),A;return m&&(A=r.call(m,{datum:e,angleKey:s,radiusKey:o,calloutLabelKey:a,sectorLabelKey:l,legendItemKey:c,fill:_,strokeOpacity:M,stroke:D,strokeWidth:E,fillOpacity:x,lineDash:I,lineDashOffset:z,cornerRadius:G,highlighted:i,seriesId:this.id})),{fill:A?.fill??_,fillOpacity:A?.fillOpacity??x,stroke:A?.stroke??D,strokeWidth:A?.strokeWidth??E,strokeOpacity:A?.strokeOpacity??M,lineDash:A?.lineDash??I,lineDashOffset:A?.lineDashOffset??z,cornerRadius:A?.cornerRadius??G}}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(e){let n=[0,this.getOuterRadius()];this.radiusScale.range=n,e&&(this.previousRadiusScale.range=n);let i=r=>St(ve({},r),{innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(r.radius),0)});this.nodeData=this.nodeData.map(i),this.phantomNodeData=this.phantomNodeData?.map(i)}getTitleTranslationY(){let e=Math.max(0,this.radiusScale.range[1]);if(e===0)return NaN;let i=2+(this.properties.title?.spacing??0),r=Math.max(0,-e);return-e-i-r}update(n){return O(this,arguments,function*({seriesRect:e}){let{title:i}=this.properties,r={seriesRectWidth:e?.width,seriesRectHeight:e?.height},s=V4(this.nodeDataDependencies,r)!=null;if(s&&(this._nodeDataDependencies=r),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),i){let o=this.getTitleTranslationY(),a=i.node.getBBox();i.node.visible=i.enabled&&isFinite(o)&&!this.bboxIntersectsSurroundingSeries(a,0,o),i.node.translationY=isFinite(o)?o:0}this.zerosumOuterRing.fillOpacity=0,this.zerosumOuterRing.stroke=this.properties.calloutLabel.color,this.zerosumOuterRing.strokeWidth=1,this.zerosumOuterRing.strokeOpacity=1,this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(e)})}updateTitleNodes(){let{oldTitle:e}=this,{title:n}=this.properties;e!==n&&(e&&this.labelGroup?.removeChild(e.node),n&&(n.node.textBaseline="bottom",this.labelGroup?.appendChild(n.node)),this.oldTitle=n)}updateNodeMidPoint(){let e=n=>{let i=n.innerRadius+(n.outerRadius-n.innerRadius)/2;n.midPoint={x:n.midCos*Math.max(0,i),y:n.midSin*Math.max(0,i)}};this.nodeData.forEach(e),this.phantomNodeData?.forEach(e)}updateSelections(){return O(this,null,function*(){yield this.updateGroupSelection()})}updateGroupSelection(){return O(this,null,function*(){let{itemSelection:e,highlightSelection:n,phantomSelection:i,highlightLabelSelection:r,calloutLabelSelection:s,labelSelection:o}=this,a=this.nodeData.map(c=>St(ve({},c),{sectorFormat:ve({},c.sectorFormat)})),l=(c,d)=>{c.update(d,void 0,u=>this.getDatumId(u)),this.ctx.animationManager.isSkipped()&&c.cleanup()};l(e,this.nodeData),l(n,a),l(i,this.phantomNodeData??[]),s.update(this.calloutNodeData,c=>{let d=new i0;d.tag=0,d.pointerEvents=1,c.appendChild(d);let u=new Gu;u.tag=1,u.pointerEvents=1,c.appendChild(u)}),o.update(this.nodeData),r.update(a)})}updateNodes(e){return O(this,null,function*(){let n=this.ctx.highlightManager.getActiveHighlight(),i=this.visible&&this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&n?.series===this,this.highlightLabel.visible=i&&n?.series===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity();let r=this.ctx.animationManager.isSkipped(),s=(o,a,l,c)=>{let d=this.getSectorFormat(a.datum,a.itemId,c);a.sectorFormat.fill=d.fill,a.sectorFormat.stroke=d.stroke,r&&(o.startAngle=a.startAngle,o.endAngle=a.endAngle,o.innerRadius=a.innerRadius,o.outerRadius=a.outerRadius),(c||r)&&(o.fill=d.fill,o.stroke=d.stroke),o.strokeWidth=d.strokeWidth,o.fillOpacity=d.fillOpacity,o.strokeOpacity=d.strokeOpacity,o.lineDash=d.lineDash,o.lineDashOffset=d.lineDashOffset,o.cornerRadius=d.cornerRadius,o.fillShadow=this.properties.shadow;let u=Math.max((this.properties.sectorSpacing+(d.stroke!=null?d.strokeWidth:0))/2,0);o.inset=u,o.lineJoin=this.properties.sectorSpacing>=0||u>0?"miter":"round"};this.itemSelection.each((o,a,l)=>s(o,a,l,!1)),this.highlightSelection.each((o,a,l)=>{s(o,a,l,!0),a.itemId===n?.itemId?(o.visible=!0,s(o,a,l,!0)):o.visible=!1}),this.phantomSelection.each((o,a,l)=>s(o,a,l,!1)),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")})}updateCalloutLineNodes(){let{calloutLine:e}=this.properties,n=e.length,i=e.strokeWidth,r=e.colors??this.properties.strokes,{offset:s}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(0).forEach((o,a)=>{let l=o.datum,{calloutLabel:c,outerRadius:d}=l;if(c?.text&&!c.hidden&&d!==0){o.visible=!0,o.strokeWidth=i,o.stroke=r[a%r.length],o.fill=void 0;let u=l.midCos*d,m=l.midSin*d,f=l.midCos*(d+n),_=l.midSin*(d+n);if((c.collisionTextAlign??c.collisionOffsetY!==0)&&c.box!=null){let D=c.box,E=f,M=_;f<D.x?E=D.x:f>D.x+D.width&&(E=D.x+D.width),_<D.y?M=D.y:_>D.y+D.height&&(M=D.y+D.height);let I=E-f,z=M-_,G=Math.sqrt(Math.pow(I,2)+Math.pow(z,2)),A=G-s;A>0&&(f=f+I*A/G,_=_+z*A/G)}o.x1=u,o.y1=m,o.x2=f,o.y2=_}else o.visible=!1})}getLabelOverflow(e,n,i){let r=i.x-this.centerX,s=i.x+i.width-this.centerX,o=i.y-this.centerY,a=i.y+i.height-this.centerY,l=1,c=1;n.x+l<r?c=(n.x+n.width-r)/n.width:n.x+n.width-l>s&&(c=(s-n.x)/n.width);let d=n.y+l<o||n.y+n.height-l>a,u=c===1?e.length:Math.floor(e.length*c)-1,m=this.bboxIntersectsSurroundingSeries(n);return{textLength:u,hasVerticalOverflow:d,hasSurroundingSeriesOverflow:m}}bboxIntersectsSurroundingSeries(e,n=0,i=0){let{surroundingRadius:r}=this;if(r==null)return!1;let s=[{x:e.x+n,y:e.y+i},{x:e.x+e.width+n,y:e.y+i},{x:e.x+e.width+n,y:e.y+e.height+i},{x:e.x+n,y:e.y+e.height+i}],o=r**2;return s.some(a=>a.x**2+a.y**2>o)}computeCalloutLabelCollisionOffsets(){let{radiusScale:e}=this,{calloutLabel:n,calloutLine:i}=this.properties,{offset:r,minSpacing:s}=n,o=e.convert(0),a=M=>!M.calloutLabel||M.outerRadius===0,l=this.calloutNodeData,c=l.filter(M=>!a(M));if(c.forEach(M=>{let I=M.calloutLabel;I!=null&&(I.hidden=!1,I.collisionTextAlign=void 0,I.collisionOffsetY=0)}),c.length<=1)return;let d=c.filter(M=>M.midCos<0).sort((M,I)=>M.midSin-I.midSin),u=c.filter(M=>M.midCos>=0).sort((M,I)=>M.midSin-I.midSin),m=c.filter(M=>M.midSin<0&&M.calloutLabel?.textAlign==="center").sort((M,I)=>M.midCos-I.midCos),f=c.filter(M=>M.midSin>=0&&M.calloutLabel?.textAlign==="center").sort((M,I)=>M.midCos-I.midCos),_=M=>{let I=M.calloutLabel;if(I==null)return Os.zero.clone();let z=M.outerRadius+i.length+r,G=M.midCos*z,A=M.midSin*z+I.collisionOffsetY,Y=I.collisionTextAlign??I.textAlign,X=I.textBaseline;return Gu.computeBBox(I.text,G,A,{font:this.properties.calloutLabel,textAlign:Y,textBaseline:X})},x=(M,I,z)=>{let G=_(M).grow(s/2),A=_(I).grow(s/2);if(G.x<A.x+A.width&&G.x+G.width>A.x&&(z==="to-top"?G.y<A.y+A.height:G.y+G.height>A.y)){let X=z==="to-top"?G.y-A.y-A.height:G.y+G.height-A.y;I.calloutLabel.collisionOffsetY=X}},D=M=>{let I=M.slice().sort((G,A)=>Math.abs(G.midSin)-Math.abs(A.midSin))[0],z=M.indexOf(I);for(let G=z-1;G>=0;G--){let A=M[G+1],Y=M[G];x(A,Y,"to-top")}for(let G=z+1;G<M.length;G++){let A=M[G-1],Y=M[G];x(A,Y,"to-bottom")}},E=M=>{let I=c.some(ne=>ne.calloutLabel.collisionOffsetY!==0),z=M.map(ne=>_(ne)),G=z.map(ne=>ne.clone().grow(s/2)),A=!1;for(let ne=0;ne<G.length&&!A;ne++){let pe=G[ne];for(let ce=ne+1;ce<M.length;ce++){let ie=G[ce];if(pe.collidesBBox(ie)){A=!0;break}}}let Y=l.map(ne=>{let{startAngle:pe,endAngle:ce,outerRadius:ie}=ne;return{startAngle:pe,endAngle:ce,innerRadius:o,outerRadius:ie}}),X=z.some(ne=>Y.some(pe=>Qrt(ne,pe)));!A&&!I&&!X||M.filter(ne=>ne.calloutLabel.textAlign==="center").forEach(ne=>{let pe=ne.calloutLabel;ne.midCos<0?pe.collisionTextAlign="right":ne.midCos>0?pe.collisionTextAlign="left":pe.collisionTextAlign="center"})};D(d),D(u),E(m),E(f)}updateCalloutLabelNodes(e){let{radiusScale:n}=this,{calloutLabel:i,calloutLine:r}=this.properties,s=r.length,{offset:o,color:a}=i,l=new Gu;this.calloutLabelSelection.selectByTag(1).forEach(c=>{let{datum:d}=c,u=d.calloutLabel,m=n.convert(d.radius),f=Math.max(0,m);if(!u?.text||f===0||u.hidden){c.visible=!1;return}let _=f+s+o,x=d.midCos*_,D=d.midSin*_+u.collisionOffsetY,E={textAlign:u.collisionTextAlign??u.textAlign,textBaseline:u.textBaseline};l.text=u.text,l.x=x,l.y=D,l.setFont(this.properties.calloutLabel),l.setAlign(E);let M=l.getBBox(),I=u.text,z=!0;if(i.avoidCollisions){let{textLength:G,hasVerticalOverflow:A}=this.getLabelOverflow(u.text,M,e);I=u.text.length===G?u.text:`${u.text.substring(0,G)}\u2026`,z=!A}c.text=I,c.x=x,c.y=D,c.setFont(this.properties.calloutLabel),c.setAlign(E),c.fill=a,c.visible=z})}computeLabelsBBox(e,n){return O(this,null,function*(){let{calloutLabel:i,calloutLine:r}=this.properties,s=r.length,{offset:o,maxCollisionOffset:a,minSpacing:l}=i;if(!i.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();let c=[],d=new Gu,u,{title:m}=this.properties;if(m?.text&&m.enabled){let f=this.getTitleTranslationY();isFinite(f)&&(d.text=m.text,d.x=0,d.y=f,d.setFont(m),d.setAlign({textBaseline:"bottom",textAlign:"center"}),u=d.getBBox(),c.push(u))}return this.calloutNodeData.forEach(f=>{let _=f.calloutLabel;if(!_||f.outerRadius===0)return null;let x=f.outerRadius+s+o,D=f.midCos*x,E=f.midSin*x+_.collisionOffsetY;d.text=_.text,d.x=D,d.y=E,d.setFont(this.properties.calloutLabel),d.setAlign({textAlign:_.collisionTextAlign??_.textAlign,textBaseline:_.textBaseline});let M=d.getBBox();if(_.box=M,Math.abs(_.collisionOffsetY)>a){_.hidden=!0;return}if(u){let I=n.y-this.centerY,z=new Os(u.x-l,I,u.width+2*l,u.y+u.height+l-I);if(M.collidesBBox(z)){_.hidden=!0;return}}if(e.hideWhenNecessary){let{textLength:I,hasVerticalOverflow:z,hasSurroundingSeriesOverflow:G}=this.getLabelOverflow(_.text,M,n),A=_.text.length>2&&I<2;if(z||A||G){_.hidden=!0;return}}_.hidden=!1,c.push(M)}),c.length===0?null:Os.merge(c)})}updateSectorLabelNodes(){let{radiusScale:e}=this,n=e.convert(0),{fontSize:i,fontStyle:r,fontWeight:s,fontFamily:o,positionOffset:a,positionRatio:l,color:c}=this.properties.sectorLabel,d=n>0,u=this.seriesItemEnabled.filter(Boolean).length===1,m=(f,_)=>{let{sectorLabel:x,outerRadius:D,startAngle:E,endAngle:M}=_,I=!1;if(x&&D!==0){let z=n*(1-l)+D*l+a;f.fill=c,f.fontStyle=r,f.fontWeight=s,f.fontSize=i,f.fontFamily=o,f.text=x.text,!d&&u?(f.x=0,f.y=0):(f.x=_.midCos*z,f.y=_.midSin*z),f.textAlign="center",f.textBaseline="middle";let A=f.getBBox(),Y=[[A.x,A.y],[A.x+A.width,A.y],[A.x+A.width,A.y+A.height],[A.x,A.y+A.height]],X={startAngle:E,endAngle:M,innerRadius:n,outerRadius:D};Y.every(([ne,pe])=>pte(ne,pe,X))&&(I=!0)}f.visible=I};this.labelSelection.each(m),this.highlightLabelSelection.each(m)}updateZerosumRings(){this.zerosumOuterRing.size=this.getOuterRadius()*2}getDatumLegendName(e){let{angleKey:n,calloutLabelKey:i,sectorLabelKey:r,legendItemKey:s}=this.properties,{sectorLabel:o,calloutLabel:a,legendItem:l}=e;if(s&&l!==void 0)return l.text;if(i&&i!==n&&a?.text!==void 0)return a.text;if(r&&r!==n&&o?.text!==void 0)return o.text}pickNodeClosestDatum(e){return mxe(this,e)}getTooltipHtml(e){if(!this.properties.isValid())return qx;let{datum:n,angleValue:i,sectorFormat:{fill:r},itemId:s}=e,o=Lh(this.properties.title?.text),a=Tc(i)?yte(i):String(i),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:o??l,content:o&&l?`${l}: ${a}`:a,backgroundColor:r},{datum:n,itemId:s,title:o,color:r,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey})}getLegendData(e){let{visible:n,processedData:i,dataModel:r}=this;if(!r||!i?.data.length||e!=="category")return[];let{angleKey:s,calloutLabelKey:o,sectorLabelKey:a,legendItemKey:l}=this.properties;if(!l&&(!o||o===s)&&(!a||a===s))return[];let{calloutLabelIdx:c,sectorLabelIdx:d,legendItemIdx:u}=this.getProcessedDataIndexes(r),m=this.properties.title?.showInLegend&&this.properties.title.text,f=[];for(let _=0;_<i.data.length;_++){let{datum:x,values:D}=i.data[_],E=[];m&&E.push(m);let M=this.getLabels(x,2*Math.PI,2*Math.PI,!1,c!=null?D[c]:void 0,d!=null?D[d]:void 0,u!=null?D[u]:void 0);if(l&&M.legendItem!==void 0?E.push(M.legendItem.text):o&&o!==s&&M.calloutLabel?.text!==void 0?E.push(M.calloutLabel?.text):a&&a!==s&&M.sectorLabel?.text!==void 0&&E.push(M.sectorLabel?.text),E.length===0)continue;let I=this.getSectorFormat(x,_,!1);f.push({legendType:"category",id:this.id,itemId:_,seriesId:this.id,enabled:n&&this.seriesItemEnabled[_],label:{text:E.join(" - ")},symbols:[{marker:{fill:I.fill,stroke:I.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}}],legendItemName:l!=null?x[l]:void 0})}return f}onLegendItemClick(e){let{enabled:n,itemId:i,series:r,legendItemName:s}=e;r.id===this.id?this.toggleSeriesItem(i,n):s!=null&&this.toggleOtherSeriesItems(s,n)}toggleSeriesItem(e,n){this.seriesItemEnabled[e]=n,this.nodeData[e]&&(this.nodeData[e].enabled=n),this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,n){if(!this.properties.legendItemKey||!this.dataModel)return;let i=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue");this.processedData?.data.forEach(({values:r},s)=>{r[i]===e&&this.toggleSeriesItem(s,n)})}animateEmptyUpdateReady(e){let{animationManager:n}=this.ctx,i=wE(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);om(this.id,"nodes",n,[this.itemSelection,this.highlightSelection,this.phantomSelection],i.nodes,(r,s)=>this.getDatumId(s)),Xc(this,"callout",n,this.calloutLabelSelection),Xc(this,"sector",n,this.labelSelection),Xc(this,"highlight",n,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){let{itemSelection:e,highlightSelection:n,phantomSelection:i,processedData:r,radiusScale:s,previousRadiusScale:o}=this,{animationManager:a}=this.ctx,l=r?.reduced?.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);let c=(l?.moved.size??0)===0,d=(r?.defs.keys.length??0)>0,u=r?.reduced?.animationValidation?.uniqueKeys??!0;(!c||!d||!u)&&this.ctx.animationManager.skipCurrentBatch();let m=wE(!1,this.properties.rotation,s,o);om(this.id,"nodes",a,[e,n,i],m.nodes,(f,_)=>this.getDatumId(_),l),Xc(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),Xc(this,"sector",this.ctx.animationManager,this.labelSelection),Xc(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){let{itemSelection:e,highlightSelection:n,phantomSelection:i,radiusScale:r,previousRadiusScale:s}=this,{animationManager:o}=this.ctx,a=wE(!1,this.properties.rotation,r,s);om(this.id,"nodes",o,[e,n,i],a.nodes,(l,c)=>this.getDatumId(c)),pw(this,"callout",this.ctx.animationManager,this.calloutLabelSelection),pw(this,"sector",this.ctx.animationManager,this.labelSelection),pw(this,"highlight",this.ctx.animationManager,this.highlightLabelSelection),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){let{calloutLabelKey:n,sectorLabelKey:i,legendItemKey:r}=this.properties;if(this.processedData?.reduced?.animationValidation?.uniqueKeys){if(r)return e[r];if(n)return e[n];if(i)return e[i]}}getDatumId(e){let{index:n}=e,i=this.getDatumIdFromData(e.datum);return i!=null?String(i):`${n}`}onDataChange(){let{data:e,seriesItemEnabled:n}=this;this.seriesItemEnabled=e?.map((i,r)=>n[r]??!0)??[]}};return t.className="PieSeries",t.type="pie",t})(),o6i={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",moduleFactory:t=>new s6i(t),tooltipDefaults:{range:"exact"},themeTemplate:i6i,paletteFactory:est},Q5=class extends pl{constructor(t,e){super(),this.onChange=t,this.onButtonsChange=e,this.align="start",this.position="top",this.size="normal",this.buttonOverrides=new Map}buttonConfigurations(){return this.buttons?.map(t=>{let e=t.id??t.value,n=this.buttonOverrides.get(e);return n!=null?ve(ve({},t),n):t})??[]}buttonsChanged(t){this.onButtonsChange(this.buttonConfigurations(),t)}overrideButtonConfiguration(t,e){let n=this.buttonOverrides.get(t);n==null&&(n=Object.create(null),this.buttonOverrides.set(t,n));for(let i in e){let r=e[i];r==null?delete n[i]:n[i]=r}this.buttonsChanged(!0)}};Me([Lg(t=>{t.onChange(t.enabled)}),$e(Jo)],Q5.prototype,"enabled",2);Me([Lg(t=>{t.onChange(t.enabled)}),$e(Su([..._nt]),{optional:!0})],Q5.prototype,"align",2);Me([Lg(t=>{t.onChange(t.enabled)}),$e(Su(oR),{optional:!0})],Q5.prototype,"position",2);Me([Lg(t=>{t.onChange(t.enabled)}),$e(Su(["small","normal"]),{optional:!0})],Q5.prototype,"size",2);Me([Lg(t=>{for(let e of t.buttons??[])e.icon!=null&&att.includes(e.icon)&&yr.warnOnce(`Icon '${e.icon}' is deprecated, use another icon instead.`),e.ariaLabel==="toolbarAnnotationsColor"&&yr.warnOnce(`Aria label '${e.ariaLabel}' is deprecated, use 'toolbarAnnotationsLineColor' instead.`);t.buttonsChanged(!1)}),$e(DR,{optional:!0})],Q5.prototype,"buttons",2);Zet="ag-charts-toolbar",YH={align:"ag-charts-toolbar__align",section:"ag-charts-toolbar__section",button:"ag-charts-toolbar__button",icon:"ag-charts-toolbar__icon",label:"ag-charts-toolbar__label"},J1={top:"ag-charts-toolbar--top",right:"ag-charts-toolbar--right",bottom:"ag-charts-toolbar--bottom",left:"ag-charts-toolbar--left",floating:"ag-charts-toolbar--floating","floating-top":"ag-charts-toolbar--floating-top","floating-bottom":"ag-charts-toolbar--floating-bottom",small:"ag-charts-toolbar--small",normal:"ag-charts-toolbar--normal",hidden:"ag-charts-toolbar--hidden",preventFlash:"ag-charts-toolbar--prevent-flash",floatingHidden:"ag-charts-toolbar--floating-hidden",align:{start:"ag-charts-toolbar__align--start",center:"ag-charts-toolbar__align--center",end:"ag-charts-toolbar__align--end"},button:{active:"ag-charts-toolbar__button--active",hiddenValue:"ag-charts-toolbar__button--hidden-value",hiddenToggled:"ag-charts-toolbar__button--hidden-toggled",fillVisible:"ag-charts-toolbar__button--fill-visible"}},ist=class extends HG{constructor(t){super(),this.ctx=t,this.enabled=!0,this.seriesType=new Q5(this.onGroupChanged.bind(this,"seriesType"),this.onGroupButtonsChanged.bind(this,"seriesType")),this.annotations=new Q5(this.onGroupChanged.bind(this,"annotations"),this.onGroupButtonsChanged.bind(this,"annotations")),this.annotationOptions=new Q5(this.onGroupChanged.bind(this,"annotationOptions"),this.onGroupButtonsChanged.bind(this,"annotationOptions")),this.ranges=new Q5(this.onGroupChanged.bind(this,"ranges"),this.onGroupButtonsChanged.bind(this,"ranges")),this.zoom=new Q5(this.onGroupChanged.bind(this,"zoom"),this.onGroupButtonsChanged.bind(this,"zoom")),this.horizontalSpacing=10,this.verticalSpacing=10,this.floatingDetectionRange=38,this.positions={top:new Set,right:new Set,bottom:new Set,left:new Set,floating:new Set,"floating-top":new Set,"floating-bottom":new Set},this.positionAlignments={top:{},right:{},bottom:{},left:{},floating:{},"floating-top":{},"floating-bottom":{}},this.groupCallers={seriesType:new Set,annotations:new Set,annotationOptions:new Set,ranges:new Set,zoom:new Set},this.groupButtons={seriesType:[],annotations:[],annotationOptions:[],ranges:[],zoom:[]},this.ariaToolbars=[{groups:["seriesType","annotations"],destroyFns:[]},{groups:["annotationOptions"],destroyFns:[]},{groups:["ranges"],destroyFns:[]},{groups:["zoom"],destroyFns:[]}],this.pendingButtonToggledEvents=[],this.groupProxied=new Map,this.hasNewLocale=!0,this.elements={};for(let e of oR)this.elements[e]=t.domManager.addChild("canvas-overlay",`toolbar-${e}`),this.elements[e].role="presentation",this.renderToolbar(e);this.toggleVisibilities(),this.destroyFns.push(t.interactionManager.addListener("hover",this.onHover.bind(this),31),t.interactionManager.addListener("leave",this.onLeave.bind(this),31),t.toolbarManager.addListener("button-toggled",this.onButtonToggled.bind(this)),t.toolbarManager.addListener("button-updated",this.onButtonUpdated.bind(this)),t.toolbarManager.addListener("group-toggled",this.onGroupToggled.bind(this)),t.toolbarManager.addListener("floating-anchor-changed",this.onFloatingAnchorChanged.bind(this)),t.toolbarManager.addListener("proxy-group-options",this.onProxyGroupOptions.bind(this)),t.layoutService.addListener("layout-complete",this.onLayoutComplete.bind(this)),t.localeManager.addListener("locale-changed",()=>{this.hasNewLocale=!0}),()=>this.destroyElements())}destroyElements(){this.ctx.domManager.removeStyles(Zet);for(let t of Object.keys(this.elements))this.ctx.domManager.removeChild("canvas-overlay",`toolbar-${t}`)}onHover(t){let{enabled:e,elements:n,floatingDetectionRange:i,ctx:{scene:r}}=this,{offsetY:s,sourceEvent:{target:o}}=t,{FloatingBottom:a,FloatingTop:l}=lG;if(!e)return;let c=n[a],d=n[l],u=c.offsetTop-i,m=s>u&&s<r.canvas.element.offsetHeight||o===c,f=d.offsetTop+d.offsetHeight+i,_=s>0&&s<f||o===d;this.translateFloatingElements(a,m),this.translateFloatingElements(l,_)}onLeave(t){let{enabled:e,ctx:{scene:n}}=this,{relatedElement:i,targetElement:r}=t,{FloatingBottom:s,FloatingTop:o}=lG;!e||r!==n.canvas.element||H5e.some(l=>this.groupButtons[l].some(c=>c===i))||(this.translateFloatingElements(s,!1),this.translateFloatingElements(o,!1))}onGroupChanged(t){this[t]==null||this.groupProxied.has(t)||(this.createGroup(t),this.toggleVisibilities())}onGroupButtonsChanged(t,e,n){if(!(!this.enabled||this.groupProxied.has(t))){if(n)for(let i of this[t].buttonConfigurations())this.refreshButtonContent(t,i);else this.createGroupButtons(t,e);this.toggleVisibilities()}}onLayoutComplete(){for(let t of oR)this.elements[t].classList.remove(J1.preventFlash)}onButtonUpdated(t){let s=t,{type:e,group:n,id:i}=s,r=al(s,["type","group","id"]);this[n].overrideButtonConfiguration(i,ve({},r))}setButtonActive(t,e){t.classList.toggle(J1.button.active,e)}onButtonToggled(t){let{group:e,id:n,active:i,enabled:r,visible:s}=t;if(this.groupButtons[e].length===0){this.pendingButtonToggledEvents.push(t);return}for(let o of this.groupButtons[e])o.dataset.toolbarId===`${n}`&&(o.ariaDisabled=`${!r}`,tG(o,J1.button.hiddenToggled,!s),this.setButtonActive(o,i))}onGroupToggled(t){let{caller:e,group:n,active:i,visible:r}=t;this.toggleGroup(e,n,i,r),this.toggleVisibilities()}onFloatingAnchorChanged(t){let{elements:e,groupButtons:n,positions:i,horizontalSpacing:r,verticalSpacing:s,ctx:{domManager:o,toolbarManager:a}}=this,{group:l,anchor:c}=t;if(!i.floating.has(l))return;let d=e.floating;if(d.classList.contains(J1.hidden))return;let u=c.position??"above",{offsetWidth:m,offsetHeight:f}=d,_=c.y-f-s,x=c.x-m/2;u==="right"?(_=c.y-f/2,x=c.x+r):u==="above-left"&&(x=c.x);let D=o.getBoundingClientRect();_=Wa(0,_,D.height-f),x=Wa(0,x,D.width-m),d.style.top=`${_}px`,d.style.left=`${x}px`;let E=new Os(x,_,m,f);for(let M of n[l]){if(M.classList.contains(J1.button.hiddenToggled))continue;let I=M.offsetParent;a.buttonMoved(l,M.dataset.toolbarId,new Os(M.offsetLeft+(I?.offsetLeft??0),M.offsetTop+(I?.offsetTop??0),M.offsetWidth,M.offsetHeight),E)}}buttonRect(t,e=this.ctx.domManager.getBoundingClientRect()){let n=t.getBoundingClientRect();return new Os(n.left-e.left,n.top-e.top,n.width,n.height)}onProxyGroupOptions(t){if(!this.enabled)return;let{caller:e,group:n,options:i}=t;this.groupProxied.set(n,i),this[n].set(i),this.toggleGroup(e,n,void 0,i.enabled),this.createGroup(n,i.enabled,i.position),i.enabled&&this.createGroupButtons(n,i.buttons)}createGroup(t,e,n){e??(e=this[t].enabled),n??(n=this[t].position);for(let i of oR)e&&n===i?this.positions[i].add(t):this.positions[i].delete(t)}createGroupButtons(t,e=[]){for(let _ of this.groupButtons[t])_.remove();let n=this.getAriaToolbar(t);if(this.groupButtons[t]=[],n.destroyFns.forEach(_=>_()),n.destroyFns=[],e.length===0)return;let{align:i,position:r}=this[t],s=this.positionAlignments[r][i];if(!s)return;let o=_=>{let x=Array.from(s.children),D="data-group",E="data-section",M=x.find(I=>I.getAttribute(D)===t&&I.getAttribute(E)===(_??""));if(!M){M=Rm("div"),M.role="presentation",M.setAttribute(D,t),M.setAttribute(E,_??"");let I=wet[t],z=x.find(G=>{let A=G.getAttribute(D);return wet[A]>I});z!=null?s.insertBefore(M,z):s.appendChild(M),this.destroyFns.push(()=>M.remove())}return M.classList.add(YH.section,J1[this[t].size]),M},a=e.at(0)?.section,l=o(a);for(let _ of e){a!==_.section&&(l=o(_.section)),a=_.section;let x=this.createButtonElement(t,_);l.appendChild(x),this.groupButtons[t].push(x)}let c=()=>{this.ctx.toolbarManager.cancel(t)},d,u;Tet(r)&&(d=()=>this.translateFloatingElements(r,!0),u=()=>this.translateFloatingElements(r,!1));let m=this.computeAriaOrientation(this[t].position),f=n.groups.map(_=>this.groupButtons[_]).flat();n.destroyFns=Gte({orientation:m,toolbar:s,buttons:f,onEscape:c,onFocus:d,onBlur:u}),this.updateToolbarAriaLabel(t,s)}computeAriaOrientation(t){return{top:"horizontal",right:"vertical",bottom:"horizontal",left:"vertical",floating:"horizontal","floating-top":"horizontal","floating-bottom":"horizontal"}[t]}toggleGroup(t,e,n,i){if(i===!0?this.groupCallers[e].add(t):i===!1&&this.groupCallers[e].delete(t),n!=null)for(let r of this.groupButtons[e])this.setButtonActive(r,n)}processPendingEvents(){let t=(this.pendingButtonToggledEvents??[]).slice();for(let e of t)this.onButtonToggled(e);this.pendingButtonToggledEvents=[]}performLayout(t){return O(this,null,function*(){return this.enabled&&(this.refreshOuterLayout(t.shrinkRect),this.refreshLocale()),t})}performCartesianLayout(t){return O(this,null,function*(){this.enabled&&this.refreshInnerLayout(t.seriesRect)})}refreshOuterLayout(t){let{elements:e,horizontalSpacing:n,verticalSpacing:i}=this;e.top.classList.contains(J1.hidden)||t.shrink(e.top.offsetHeight+i,"top"),e.right.classList.contains(J1.hidden)||t.shrink(e.right.offsetWidth+n,"right"),e.bottom.classList.contains(J1.hidden)||(t.shrink(e.bottom.offsetHeight+i,"bottom"),e.bottom.style.top=`${t.y+t.height+i}px`),e.left.classList.contains(J1.hidden)||t.shrink(e.left.offsetWidth+n,"left")}refreshLocale(){let{hasNewLocale:t}=this;if(t){for(let e of H5e){let n=this[e].buttonConfigurations();for(let i of n)this.refreshButtonContent(e,i);this.updateToolbarAriaLabel(e)}this.hasNewLocale=!1}}refreshInnerLayout(t){let{elements:e,verticalSpacing:n}=this,{FloatingBottom:i,FloatingTop:r}=lG;e.top.style.top=`${t.y-e.top.offsetHeight-n}px`,e.top.style.left=`${t.x}px`,e.top.style.width=`${t.width}px`,e.bottom.style.left=`${t.x}px`,e.bottom.style.width=`${t.width}px`,e.right.style.top=`${t.y}px`,e.right.style.right="0px",e.right.style.height=`${t.height}px`,e.left.style.top=`${t.y}px`,e.left.style.left="0px",e.left.style.height=`${t.height}px`,e[r].style.top=`${t.y}px`,e[i].style.top=`${t.y+t.height-e[i].offsetHeight}px`}refreshButtonContent(t,e){let n=this.buttonId(e),i=this.groupProxied.get(t)?.buttons?.find(s=>this.buttonId(s)===n)??e,r=this.groupButtons[t].find(s=>s.getAttribute("data-toolbar-id")===n);r!=null&&this.updateButton(r,i)}toggleVisibilities(){if(this.elements==null)return;let t=n=>this[n].enabled&&this.groupCallers[n].size>0,e=n=>i=>{let r=this.buttonId(i);return r==null||r===n.dataset.toolbarId};for(let n of oR){let i=this.enabled&&Array.from(this.positions[n].values()).some(t);tG(this.elements[n],J1.hidden,!i)}for(let n of H5e){if(this[n]==null)continue;let i=t(n);for(let r of this.groupButtons[n]){let s=i&&this[n].buttonConfigurations().some(e(r));tG(r,J1.button.hiddenValue,!s)}}}translateFloatingElements(t,e){let{elements:n,verticalSpacing:i,positionAlignments:r}=this,s=n[t],o=Object.values(r[t]);tG(s,J1.floatingHidden,!e);let a=t==="floating-bottom"?1:-1;for(let l of o)l.style.transform=e&&l.style.transform!==""?"translateY(0)":`translateY(${(s.offsetHeight+i)*a}px)`}renderToolbar(t="top"){let e=this.elements[t];e.classList.add(Zet,J1[t],J1.preventFlash),Tet(t)&&e.classList.add(J1.floatingHidden);for(let n of _nt){let i=Rm("div");i.role="presentation",i.classList.add(YH.align,J1.align[n]),i.dataset.pointerCapture="exclusive",e.appendChild(i),this.positionAlignments[t][n]=i}}createButtonElement(t,e){let n=Rm("button");return n.classList.add(YH.button),n.dataset.toolbarGroup=t,n.tabIndex=-1,n.dataset.toolbarId=this.buttonId(e),n.onclick=drt(n,this.onButtonPress.bind(this,n,t,e.id,e.value)),this.updateButton(n,e),this.destroyFns.push(()=>n.remove()),n}getAriaToolbar(t){for(let e of this.ariaToolbars)if(e.groups.includes(t))return e;throw new Error(`AG Charts - cannot find aria-toolbar of '${t}'`)}updateToolbarAriaLabel(t,e){if(!e){let{align:i,position:r}=this[t];if(e=this.positionAlignments[r][i],!e)return}let n={seriesType:"ariaLabelFinancialCharts",annotations:"ariaLabelFinancialCharts",annotationOptions:"ariaLabelAnnotationOptionsToolbar",ranges:"ariaLabelRangesToolbar",zoom:"ariaLabelZoomToolbar"};e.ariaLabel=this.ctx.localeManager.t(n[t])}updateButton(t,e){let{ctx:{domManager:n,localeManager:i}}=this;if(e.tooltip){let o=i.t(e.tooltip);t.title=o}let r="";if(e.icon!=null&&(r=`<span class="${n.getIconClassNames(e.icon)} ${YH.icon}"></span>`),e.label!=null){let o=i.t(e.label);r=`${r}<span class="${YH.label}">${o}</span>`}t.innerHTML=r,t.classList.toggle(J1.button.fillVisible,e.fill!=null),t.style.setProperty("--fill",e.fill??null);let s=e.ariaLabel?this.ctx.localeManager.t(e.ariaLabel):void 0;TE(t,"aria-label",s)}onButtonPress(t,e,n,i){this.ctx.toolbarManager.pressButton(e,this.buttonId({id:n,value:i}),i,this.buttonRect(t))}buttonId(t){let{id:e,value:n,label:i}=t;return e??(n!=null&&typeof n!="object"?String(n):i??"")}};Me([Lg(t=>{t.processPendingEvents(),t.toggleVisibilities()}),$e(Jo)],ist.prototype,"enabled",2);nst=1e3*60*60*24,Y5e=nst*30,a6i=nst*365,l6i={enabled:!1,position:"left",align:"start",buttons:[{tooltip:"toolbarSeriesTypeDropdown",value:"type"}]},c6i={enabled:!0,position:"left",align:"start",buttons:[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu",section:"line-annotations"},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu",section:"text-annotations"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear",section:"tools"}]},d6i={enabled:!0,position:"floating",align:"start",buttons:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextColor",value:"text-color"},{icon:"line-color",tooltip:"toolbarAnnotationsLineColor",value:"line-color"},{icon:"fill-color",tooltip:"toolbarAnnotationsFillColor",value:"fill-color"},{tooltip:"toolbarAnnotationsTextSize",value:"text-size"},{icon:"unlocked",tooltip:"toolbarAnnotationsLock",value:"lock"},{icon:"locked",tooltip:"toolbarAnnotationsUnlock",value:"unlock"},{icon:"delete",tooltip:"toolbarAnnotationsDelete",value:"delete"}]},u6i={enabled:!1,position:ZG,align:"start",buttons:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:Y5e},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:3*Y5e},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:6*Y5e},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(t,e)=>[new Date(`${new Date(e).getFullYear()}-01-01`).getTime(),e],id:"year-to-date"},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:a6i},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:(t,e)=>[t,e],id:"all"}]},h6i={enabled:!0,position:"top",align:"end",buttons:[{icon:"zoom-out",tooltip:"toolbarZoomZoomOut",value:"zoom-out"},{icon:"zoom-in",tooltip:"toolbarZoomZoomIn",value:"zoom-in"},{icon:"pan-left",tooltip:"toolbarZoomPanLeft",value:"pan-left"},{icon:"pan-right",tooltip:"toolbarZoomPanRight",value:"pan-right"},{icon:"pan-start",tooltip:"toolbarZoomPanStart",value:"pan-start"},{icon:"pan-end",tooltip:"toolbarZoomPanEnd",value:"pan-end"},{icon:"reset",tooltip:"toolbarZoomReset",value:"reset"}]},p6i={type:"root",optionsKey:"toolbar",packageType:"community",chartTypes:["cartesian"],moduleFactory:t=>new ist(t),themeTemplate:{toolbar:{enabled:!0,seriesType:l6i,annotations:c6i,annotationOptions:d6i,ranges:u6i,zoom:h6i}}};v6i=(()=>{let t=class e extends LR{getChartType(){return"flow-proportion"}updateData(){return O(this,null,function*(){yield py(e.prototype,this,"updateData").call(this);let{nodes:n}=this.getOptions();this.series.forEach(i=>{g6i(i)&&i.setChartNodes(n)})})}performLayout(){return O(this,null,function*(){let n=yield py(e.prototype,this,"performLayout").call(this),{seriesArea:{padding:i},seriesRoot:r,annotationRoot:s,highlightRoot:o}=this,a=n.clone();n.shrink(i.left,"left"),n.shrink(i.top,"top"),n.shrink(i.right,"right"),n.shrink(i.bottom,"bottom"),this.seriesRect=n,this.animationRect=n;let l=this.series.some(c=>c.visible);r.visible=l;for(let c of[r,s,o])c.translationX=Math.floor(n.x),c.translationY=Math.floor(n.y),c.setClipRectInGroupCoordinateSpace(new Os(a.x,a.y,a.width,a.height));return this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:a,paddedRect:n,visible:l},axes:[]}),n})}};return t.className="FlowProportionChart",t.type="flow-proportion",t})(),y6i=(()=>{let t=class e extends LR{constructor(n,i){super(n,i)}getChartType(){return"hierarchy"}performLayout(){return O(this,null,function*(){let n=yield py(e.prototype,this,"performLayout").call(this),{seriesArea:{padding:i},seriesRoot:r,annotationRoot:s,highlightRoot:o}=this,a=n.clone();n.shrink(i.left,"left"),n.shrink(i.top,"top"),n.shrink(i.right,"right"),n.shrink(i.bottom,"bottom"),this.seriesRect=n,this.animationRect=n;for(let l of[r,s,o])l.translationX=Math.floor(n.x),l.translationY=Math.floor(n.y);return yield Promise.all(this.series.map(l=>O(this,null,function*(){yield l.update({seriesRect:n})}))),r.visible=this.series[0].visible,r.setClipRectInGroupCoordinateSpace(new Os(n.x,n.y,n.width,n.height)),this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:a,paddedRect:n,visible:!0},axes:[]}),n})}getAriaLabel(){return`hierarchical chart, ${this.getCaptionText()}`}};return t.className="HierarchyChart",t.type="hierarchy",t})(),hR=class extends u8e{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(t,e){return null}};Me([$e(Su(["polygon","circle"],"a polar axis shape"))],hR.prototype,"shape",2);Me([$e(ud)],hR.prototype,"innerRadiusRatio",2);_6i=(()=>{let t=class e extends LR{constructor(n,i){super(n,i),this.padding=new Dw(40),this.ctx.axisManager.axisGroup.zIndex=6}getChartType(){return"polar"}performLayout(){return O(this,null,function*(){let n=yield py(e.prototype,this,"performLayout").call(this),i=n.clone();return this.computeSeriesRect(n),yield this.computeCircle(n),this.axes.forEach(r=>r.update()),this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:i,paddedRect:n,visible:!0},axes:[]}),n})}updateAxes(n,i,r){let s=this.axes.find(d=>d.direction==="x"),o=this.axes.find(d=>d.direction==="y");if(!(s instanceof hR)||!(o instanceof hR))return;let a=s.scale,l=a.ticks?.().map(d=>a.convert(d)),c=o.innerRadiusRatio;s.innerRadiusRatio=c,s.computeRange?.(),s.gridLength=r,o.gridAngles=l,o.gridRange=s.range,o.range=[r,r*c],[s,o].forEach(d=>{d.translation.x=n,d.translation.y=i,d.calculateLayout()})}computeSeriesRect(n){let{seriesArea:{padding:i}}=this;n.shrink(i.left,"left"),n.shrink(i.top,"top"),n.shrink(i.right,"right"),n.shrink(i.bottom,"bottom"),this.seriesRect=n,this.animationRect=n}computeCircle(n){return O(this,null,function*(){let i=this.series.filter(u=>u instanceof $te),r=this.axes.filter(u=>u instanceof hR),s=(u,m,f)=>{this.updateAxes(u,m,f),i.forEach(x=>{x.centerX=u,x.centerY=m,x.radius=f});let _=i.filter(x=>x.type==="donut"||x.type==="pie");if(_.length>1){let x=_.map(D=>{let E=D.getInnerRadius();return{series:D,innerRadius:E}}).sort((D,E)=>D.innerRadius-E.innerRadius);x.at(-1).series.surroundingRadius=void 0;for(let D=0;D<x.length-1;D++)x[D].series.surroundingRadius=x[D+1].innerRadius}},o=n.x+n.width/2,a=n.y+n.height/2,l=Math.max(0,Math.min(n.width,n.height)/2),c=l;s(o,a,c);let d=(...m)=>O(this,[...m],function*({hideWhenNecessary:u=!1}={}){let f=[];for(let D of[...r,...i]){let E=yield D.computeLabelsBBox({hideWhenNecessary:u},n);E&&f.push(E)}if(f.length===0){s(o,a,l);return}let _=Os.merge(f),x=this.refineCircle(_,c,n);s(x.centerX,x.centerY,x.radius),x.radius!==c&&(c=x.radius)});return yield d(),yield d(),yield d(),yield d({hideWhenNecessary:!0}),yield d({hideWhenNecessary:!0}),{radius:c,centerX:o,centerY:a}})}refineCircle(n,i,r){let o=-i,a=-i,l=i,c=i,d=Math.max(0,o-n.x),u=Math.max(0,a-n.y),m=Math.max(0,n.x+n.width-l),f=Math.max(0,n.y+n.height-c);d=m=Math.max(d,m),u=f=Math.max(u,f);let _=r.width-d-m,x=r.height-u-f,D=Math.min(_,x)/2,E=.5*r.width/2,M=.5*r.height/2,I=Math.min(E,M);if(D<I){D=I;let A=d+m,Y=u+f;if(2*D+Y>r.height){let X=r.height-2*D;Math.min(u,f)*2>X?(u=X/2,f=X/2):u>f?u=X-f:f=X-u}if(2*D+A>r.width){let X=r.width-2*D;Math.min(d,m)*2>X?(d=X/2,m=X/2):d>m?d=X-m:m=X-d}}let z=d+2*D+m,G=u+2*D+f;return{centerX:r.x+(r.width-z)/2+d+D,centerY:r.y+(r.height-G)/2+u+D,radius:D}}};return t.className="PolarChart",t.type="polar",t})(),Yte=Math.PI/180,q5e=t=>t*Yte,Z5e=t=>-Math.log(Math.tan(Math.PI*.25+t*Yte*.5)),X5e=t=>t/Yte,Q5e=t=>(Math.atan(Math.exp(-t))-Math.PI*.25)/(Yte*.5),MCe=class kCe{constructor(e,n){this.domain=e,this.range=n,this.type="mercator",this.bounds=kCe.bounds(e)}static bounds(e){let[[n,i],[r,s]]=e,o=q5e(n),a=Z5e(i),l=q5e(r),c=Z5e(s);return new Os(Math.min(o,l),Math.min(a,c),Math.abs(l-o),Math.abs(c-a))}static fixedScale(){return new kCe([[X5e(0),Q5e(0)],[X5e(1),Q5e(1)]],[[0,0],[1,1]])}convert([e,n]){let[[i,r],[s,o]]=this.range,a=(s-i)/this.bounds.width,l=(o-r)/this.bounds.height;return[(q5e(e)-this.bounds.x)*a+i,(Z5e(n)-this.bounds.y)*l+r]}invert([e,n]){let[[i,r],[s,o]]=this.range,a=(s-i)/this.bounds.width,l=(o-r)/this.bounds.height;return[X5e((e-i)/a+this.bounds.x),Q5e((n-r)/l+this.bounds.y)]}};C6i=(()=>{let t=class e extends LR{constructor(n,i){super(n,i),this.xAxis=new xR(this.getModuleContext()),this.xAxis.position="bottom",this.yAxis=new xR(this.getModuleContext()),this.yAxis.position="left",this.ctx.zoomManager.updateAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}updateData(){return O(this,null,function*(){yield py(e.prototype,this,"updateData").call(this);let{topology:n}=this.getOptions();this.series.forEach(i=>{Xet(i)&&i.setChartTopology(n)})})}performLayout(){return O(this,null,function*(){let n=yield py(e.prototype,this,"performLayout").call(this),{seriesArea:{padding:i},seriesRoot:r,annotationRoot:s,highlightRoot:o}=this,a=n.clone();n.shrink(i.left,"left"),n.shrink(i.top,"top"),n.shrink(i.right,"right"),n.shrink(i.bottom,"bottom"),this.seriesRect=n,this.animationRect=n;let l=this.series.filter(Xet),c=l.reduce((m,f)=>{if(!f.visible)return m;let _=f.topologyBounds;return _==null?m:m==null?_:(m.merge(_),m)},void 0),d;if(c!=null){let{lon0:m,lat0:f,lon1:_,lat1:x}=c,D=[[m,f],[_,x]],E=MCe.bounds(D),{width:M,height:I}=n,z=Math.min(M/E.width,I/E.height),G=E.width*z,A=E.height*z,Y=(M-G)/2,X=(I-A)/2,ne=Y,pe=X,ce=Y+G,ie=X+A,le=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),Se=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),je=(ce-ne)/(le.max-le.min),ze=ne-je*le.min,Ge=(ie-pe)/(1-Se.min-(1-Se.max)),Ae=pe-Ge*(1-Se.max);d=new MCe(D,[[ze,Ae],[ze+je,Ae+Ge]])}l.forEach(m=>{m.scale=d});let u=this.series.some(m=>m.visible);r.visible=u;for(let m of[r,s,o])m.translationX=Math.floor(n.x),m.translationY=Math.floor(n.y),m.setClipRectInGroupCoordinateSpace(new Os(n.x,n.y,n.width,n.height));return this.ctx.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.ctx.scene.width,height:this.ctx.scene.height},clipSeries:!1,series:{rect:a,paddedRect:n,visible:u},axes:[]}),n})}};return t.className="TopologyChart",t.type="topology",t})(),cw={isEnterprise:!1};x6i=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"];Hee="range-area";T6i={"price-volume":b6i};qte=Symbol("description"),E6i=Symbol("required");k6i=(...t)=>aC(e=>t.some(n=>n(e)),t.map(e=>e[qte]).filter(Boolean).join(" or ")),Dnr=aC(sp,"an array"),Enr=aC(jCe,"a boolean"),Mnr=aC(jx,"a function"),knr=aC(Tc,"a number"),ttt=aC(D3,"an object"),Lx=aC(E3,"a string"),sst=(t,e=!0)=>aC(n=>Tc(n)&&(n>t||e&&n===t),`a number greater than ${e?"or equal to ":""}${t}`),ost=(t,e)=>aC(n=>Tc(n)&&n>=t&&n<=e,`a number between ${t} and ${e} inclusive`),Inr=sst(0),Anr=sst(1),Pnr=ost(0,1),Rnr=ost(0,360),itt=(t,e)=>aC(n=>sp(n)&&n.every(t),e??`${t[qte]} array`);Gee="white",ACe={get cartesian(){return{seriesTypes:p1.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:p1.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:p1.hierarchyTypes,commonOptions:[]}},get topology(){return{seriesTypes:p1.topologyTypes,commonOptions:[]}},get"flow-proportion"(){return{seriesTypes:p1.flowProportionTypes,commonOptions:[]}}},I6i=Object.values(ACe).reduce((t,{commonOptions:e})=>t.concat(e),[]),b6=class ast{static getAxisDefaults(e){return ql(e,{title:{enabled:!1,text:"Axis Title",spacing:25,fontWeight:"normal",fontSize:13,fontFamily:sm,color:t0},label:{fontSize:12,fontFamily:sm,padding:5,color:t0,avoidCollisions:!0},line:{enabled:!0,width:1,stroke:Xee},tick:{enabled:!1,width:1,stroke:Xee},gridLine:{enabled:!0,style:[{stroke:bR,lineDash:[]}]},crossLines:{enabled:!1,fill:hG,stroke:hG,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontSize:12,fontFamily:sm,padding:5,color:t0}},crosshair:{enabled:!0}})}getChartDefaults(){return{minHeight:300,minWidth:300,background:{visible:!0,fill:lte},padding:{top:lw,right:lw,bottom:lw,left:lw},keyboard:{enabled:!0},title:{enabled:!1,text:"Title",fontWeight:"normal",fontSize:17,fontFamily:sm,color:t0,wrapping:"hyphenate",layoutStyle:hE,textAlign:pE},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontSize:13,fontFamily:sm,color:bE,wrapping:"hyphenate",layoutStyle:hE,textAlign:pE},footnote:{enabled:!1,text:"Footnote",spacing:20,fontSize:13,fontFamily:sm,color:"rgb(140, 140, 140)",wrapping:"hyphenate",layoutStyle:hE,textAlign:pE},legend:{position:"bottom",spacing:30,listeners:{},toggleSeries:!0,item:{paddingX:16,paddingY:8,marker:{size:15,padding:8},showSeriesStroke:!0,label:{color:t0,fontSize:12,fontFamily:sm}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:t0},inactiveStyle:{fill:bE},highlightStyle:{fill:t0},label:{color:t0}}},tooltip:{enabled:!0,darkTheme:uG,delay:0},overlays:{darkTheme:uG},listeners:{}}}constructor(e={}){let{overrides:n,palette:i}=N0(e),r=this.createChartConfigPerChartType(this.getDefaults());n&&this.mergeOverrides(r,n);let l=this.getDefaultColors(),{fills:s,strokes:o}=l,a=al(l,["fills","strokes"]);this.palette=ql(i,ve({fills:Object.values(s),strokes:Object.values(o)},a)),this.paletteType=ICe(i),this.config=Object.freeze(this.templateTheme(r))}mergeOverrides(e,n){for(let{seriesTypes:i,commonOptions:r}of Object.values(ACe)){let s=ve({},n.common);for(let o of I6i)r.includes(o)||delete s[o];if(s)for(let o of i){let a=o;e[a]=ql(s,e[a])}}p1.seriesTypes.forEach(i=>{let r=i;n[r]&&(e[r]=ql(n[r],e[r]))})}createChartConfigPerChartType(e){for(let[n,{seriesTypes:i}]of Object.entries(ACe)){let r=xCe.get(n);for(let s of i)e[s]||(e[s]=N0(r))}return e}getDefaults(){let e=(n,i)=>{let r={},s=ve(ve(ve({axes:{}},y8e.getThemeTemplates()),this.getChartDefaults()),xCe.get(n));for(let o of i){r[o]=ql(w3.getThemeTemplate(o),r[o]??N0(s));let{axes:a}=r[o];for(let l of Hx.keys())a[l]=ql(a[l],Hx.getThemeTemplate(l),ast.cartesianAxisDefault[l])}return r};return ql(e("cartesian",p1.cartesianTypes),e("polar",p1.polarTypes),e("hierarchy",p1.hierarchyTypes),e("topology",p1.topologyTypes),e("flow-proportion",p1.flowProportionTypes))}templateTheme(e){let n=N0(e),i=this.getTemplateParameters();return J5(n,r=>{if(sp(r))for(let s=0;s<r.length;s++){let o=r[s];i.has(o)&&(r[s]=i.get(o))}else for(let[s,o]of Object.entries(r))i.has(o)&&(r[s]=i.get(o))}),N0(n)}getDefaultColors(){return{fills:x2,strokes:q5,up:{fill:x2.GREEN,stroke:q5.GREEN},down:{fill:x2.RED,stroke:q5.RED},neutral:{fill:x2.GRAY,stroke:q5.GRAY},altUp:{fill:x2.BLUE,stroke:q5.BLUE},altDown:{fill:x2.ORANGE,stroke:q5.ORANGE},altNeutral:{fill:x2.GRAY,stroke:q5.GRAY}}}getTemplateParameters(){let e=new Map;e.set(uG,!1),e.set(sm,"Verdana, sans-serif"),e.set(t0,"rgb(70, 70, 70)"),e.set(yrt,"white"),e.set(bE,"rgb(140, 140, 140)"),e.set(bR,"rgb(224,234,241)"),e.set(Xee,"rgb(195, 195, 195)"),e.set(hG,"rgb(70, 70, 70)"),e.set(OE,Gee),e.set(lte,Gee),e.set(NE,"rgba(0, 0, 0, 0.5)"),e.set(W4,[x2.ORANGE,x2.YELLOW,x2.GREEN]),e.set(lw,20),e.set(hE,"block"),e.set(pE,"center"),e.set(H8e,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),e.set(G8e,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),e.set(z8e,Gee),e.set(U4,x2.BLUE),e.set(W8e,x2.BLUE),e.set(j4,x2.BLUE),e.set(U8e,Gee),e.set(j8e,"#fafafa"),e.set($8e,"#dddddd"),e.set(K8e,"#000000"),e.set(ZG,"top"),e.set(Bx,!1);let n=this.getDefaultColors();return e.set(F8e,this.palette.up?.stroke??n.up.stroke),e.set(O8e,this.palette.up?.fill??n.up.fill),e.set(L8e,this.palette.down?.stroke??n.down.stroke),e.set(N8e,this.palette.down?.fill??n.down.fill),e.set(pG,this.palette.neutral?.stroke??n.neutral.stroke),e.set(V8e,this.palette.neutral?.fill??n.neutral.fill),e.set(_rt,this.palette.altUp?.stroke??n.up.stroke),e.set(xrt,this.palette.altUp?.fill??n.up.fill),e.set(Crt,this.palette.altDown?.stroke??n.down.stroke),e.set(brt,this.palette.altDown?.fill??n.down.fill),e.set(wrt,this.palette.altNeutral?.fill??n.altNeutral.fill),e.set(B8e,this.palette.altNeutral?.stroke??n.altNeutral.stroke),e}};b6.cartesianAxisDefault={number:b6.getAxisDefaults({line:{enabled:!1}}),log:b6.getAxisDefaults({base:10,line:{enabled:!1}}),category:b6.getAxisDefaults({groupPaddingInner:.1,label:{autoRotate:!0},gridLine:{enabled:Bx},crosshair:{enabled:!1}}),time:b6.getAxisDefaults({gridLine:{enabled:Bx}}),"ordinal-time":b6.getAxisDefaults({groupPaddingInner:0,label:{autoRotate:!1},gridLine:{enabled:Bx}}),"angle-category":b6.getAxisDefaults({gridLine:{enabled:Bx}}),"angle-number":b6.getAxisDefaults({gridLine:{enabled:Bx}}),"radius-category":b6.getAxisDefaults({line:{enabled:!1}}),"radius-number":b6.getAxisDefaults({line:{enabled:!1}}),"grouped-category":b6.getAxisDefaults({tick:{enabled:!0}})};Jx=b6,Wee="#192232",m6={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},eE={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},UR=class extends Jx{getDefaultColors(){return{fills:m6,strokes:eE,up:{fill:m6.GREEN,stroke:eE.GREEN},down:{fill:m6.RED,stroke:eE.RED},neutral:{fill:m6.GRAY,stroke:eE.GRAY},altUp:{fill:m6.BLUE,stroke:eE.BLUE},altDown:{fill:m6.ORANGE,stroke:eE.ORANGE},altNeutral:{fill:m6.GRAY,stroke:eE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(uG,!0),t.set(z8e,Wee),t.set(t0,"white"),t.set(bE,"#7D91A0"),t.set(bR,"#545A6E"),t.set(hG,"white"),t.set(W4,[m6.ORANGE,m6.YELLOW,m6.GREEN]),t.set(H8e,["#192834","#253746","#324859","#3f596c","#4d6a80"]),t.set(G8e,["#192834","#3b5164","#496275","#577287","#668399"]),t.set(lte,Wee),t.set(OE,Wee),t.set(U4,m6.BLUE),t.set(W8e,"white"),t.set(j4,m6.BLUE),t.set(U8e,Wee),t.set(j8e,"#28313e"),t.set($8e,"#4b525d"),t.set(K8e,"#ffffff"),t}constructor(t){super(t)}},f6={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},tE={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},A6i=class extends UR{getDefaultColors(){return{fills:ve({},f6),strokes:ve({},tE),up:{fill:f6.GREEN,stroke:tE.GREEN},down:{fill:f6.RED,stroke:tE.RED},neutral:{fill:f6.BLUE,stroke:tE.BLUE},altUp:{fill:f6.GREEN,stroke:tE.GREEN},altDown:{fill:f6.RED,stroke:tE.RED},altNeutral:{fill:f6.GRAY,stroke:tE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[f6.GREEN,f6.BLUE,f6.RED]),t.set(U4,f6.BLUE),t.set(j4,f6.BLUE),t.set(bR,"#343A4E"),t.set(lw,0),t.set(hE,"overlay"),t.set(pE,"left"),t.set(ZG,"bottom"),t.set(Bx,!0),t}},g6={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#A9A9A9"},iE={GREEN:"#089981",RED:"#F23645",BLUE:"#5090dc",GRAY:"#909090"},P6i=class extends Jx{getDefaultColors(){return{fills:ve({},g6),strokes:ve({},iE),up:{fill:g6.GREEN,stroke:iE.GREEN},down:{fill:g6.RED,stroke:iE.RED},neutral:{fill:g6.BLUE,stroke:iE.BLUE},altUp:{fill:g6.GREEN,stroke:iE.GREEN},altDown:{fill:g6.RED,stroke:iE.RED},altNeutral:{fill:g6.GRAY,stroke:iE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[g6.GREEN,g6.BLUE,g6.RED]),t.set(U4,g6.BLUE),t.set(j4,g6.BLUE),t.set(bR,"#F2F3F3"),t.set(lw,0),t.set(hE,"overlay"),t.set(pE,"left"),t.set(ZG,"bottom"),t.set(Bx,!0),t}},v6={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},nE={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},R6i=class extends UR{getDefaultColors(){return{fills:v6,strokes:nE,up:{fill:v6.GREEN,stroke:nE.GREEN},down:{fill:v6.RED,stroke:nE.RED},neutral:{fill:v6.GRAY,stroke:nE.GRAY},altUp:{fill:v6.BLUE,stroke:nE.BLUE},altDown:{fill:v6.RED,stroke:nE.RED},altNeutral:{fill:v6.GRAY,stroke:nE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[v6.ORANGE,v6.YELLOW,v6.GREEN]),t.set(U4,v6.BLUE),t.set(j4,v6.BLUE),t}},y6={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},rE={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},F6i=class extends Jx{getDefaultColors(){return{fills:y6,strokes:rE,up:{fill:y6.GREEN,stroke:rE.GREEN},down:{fill:y6.RED,stroke:rE.RED},neutral:{fill:y6.GRAY,stroke:rE.GRAY},altUp:{fill:y6.BLUE,stroke:rE.BLUE},altDown:{fill:y6.RED,stroke:rE.RED},altNeutral:{fill:y6.GRAY,stroke:rE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[y6.ORANGE,y6.YELLOW,y6.GREEN]),t.set(U4,y6.BLUE),t.set(j4,y6.BLUE),t}},s_={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},sE={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff",GRAY:"#eeeeee"},L6i=class extends UR{getDefaultColors(){return{fills:s_,strokes:sE,up:{fill:s_.GREEN,stroke:sE.GREEN},down:{fill:s_.RED,stroke:sE.RED},neutral:{fill:s_.GRAY,stroke:sE.GRAY},altUp:{fill:s_.BLUE,stroke:sE.BLUE},altDown:{fill:s_.RED,stroke:sE.RED},altNeutral:{fill:s_.GRAY,stroke:sE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[s_.BLUE,s_.RED]),t.set(U4,s_.BLUE),t.set(j4,s_.BLUE),t}},o_={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4",GRAY:"#bbbbbb"},oE={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb",GRAY:"#888888"},O6i=class extends Jx{getDefaultColors(){return{fills:o_,strokes:oE,up:{fill:o_.GREEN,stroke:oE.GREEN},down:{fill:o_.RED,stroke:oE.RED},neutral:{fill:o_.GRAY,stroke:oE.GRAY},altUp:{fill:o_.BLUE,stroke:oE.BLUE},altDown:{fill:o_.RED,stroke:oE.RED},altNeutral:{fill:o_.GRAY,stroke:oE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[o_.BLUE,o_.RED]),t.set(U4,o_.BLUE),t.set(j4,o_.BLUE),t}},L4={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},ow={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},N6i=class extends UR{getDefaultColors(){return{fills:St(ve({},L4),{RED:L4.ORANGE}),strokes:St(ve({},ow),{RED:ow.ORANGE}),up:{fill:L4.GREEN,stroke:ow.GREEN},down:{fill:L4.ORANGE,stroke:ow.ORANGE},neutral:{fill:L4.GRAY,stroke:ow.GRAY},altUp:{fill:L4.BLUE,stroke:ow.BLUE},altDown:{fill:L4.ORANGE,stroke:ow.ORANGE},altNeutral:{fill:L4.GRAY,stroke:ow.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[L4.ORANGE,L4.YELLOW,L4.GREEN]),t.set(U4,L4.BLUE),t.set(j4,L4.BLUE),t}},_6={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},Ox={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},V6i=class extends Jx{getDefaultColors(){return{fills:St(ve({},_6),{RED:_6.ORANGE}),strokes:St(ve({},Ox),{RED:Ox.ORANGE}),up:{fill:_6.GREEN,stroke:Ox.GREEN},down:{fill:_6.ORANGE,stroke:Ox.ORANGE},neutral:{fill:Ox.GRAY,stroke:Ox.GRAY},altUp:{fill:_6.BLUE,stroke:Ox.BLUE},altDown:{fill:_6.ORANGE,stroke:Ox.ORANGE},altNeutral:{fill:_6.GRAY,stroke:Ox.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[_6.ORANGE,_6.YELLOW,_6.GREEN]),t.set(U4,_6.BLUE),t.set(j4,_6.BLUE),t}},C6={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},aE={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#fff653",YELLOW:"#c18aff",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},B6i=class extends UR{getDefaultColors(){return{fills:C6,strokes:aE,up:{fill:C6.GREEN,stroke:aE.GREEN},down:{fill:C6.RED,stroke:aE.RED},neutral:{fill:C6.GRAY,stroke:aE.GRAY},altUp:{fill:C6.BLUE,stroke:aE.BLUE},altDown:{fill:C6.ORANGE,stroke:aE.ORANGE},altNeutral:{fill:C6.GRAY,stroke:aE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[C6.ORANGE,C6.YELLOW,C6.GREEN]),t.set(U4,C6.BLUE),t.set(j4,C6.BLUE),t}},x6={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},lE={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},z6i=class extends Jx{getDefaultColors(){return{fills:x6,strokes:lE,up:{fill:x6.GREEN,stroke:lE.GREEN},down:{fill:x6.RED,stroke:lE.RED},neutral:{fill:x6.GRAY,stroke:lE.GRAY},altUp:{fill:x6.BLUE,stroke:lE.BLUE},altDown:{fill:x6.ORANGE,stroke:lE.ORANGE},altNeutral:{fill:x6.GRAY,stroke:lE.GRAY}}}getTemplateParameters(){let t=super.getTemplateParameters();return t.set(W4,[x6.ORANGE,x6.YELLOW,x6.GREEN]),t.set(U4,x6.BLUE),t.set(j4,x6.BLUE),t}},pR=()=>new Jx,H6i=()=>new UR,lst={"ag-default-dark":H6i,"ag-sheets-dark":()=>new N6i,"ag-polychroma-dark":()=>new L6i,"ag-vivid-dark":()=>new B6i,"ag-material-dark":()=>new R6i,"ag-financial-dark":()=>new A6i,null:pR,undefined:pR,"ag-default":pR,"ag-sheets":()=>new V6i,"ag-polychroma":()=>new O6i,"ag-vivid":()=>new z6i,"ag-material":()=>new F6i,"ag-financial":()=>new P6i};W6i={baseTheme:k6i(Lx,ttt),overrides:ttt,palette:{fills:itt(Lx),strokes:itt(Lx),up:{fill:Lx,stroke:Lx},down:{fill:Lx,stroke:Lx},neutral:{fill:Lx,stroke:Lx}}},U6i=new Set(["map-shape-background","map-line-background"]),cst=class{constructor(t,e){this.debug=bu.create(!0,"opts");var n;let i={shallow:["data"]};t=N0(t,i);let r=this.optionsType(t);cw.isEnterprise||Jet(t);let s=N0(t,i);if(this.type=e?.type,this.type!=null){let x=T6i[this.type]?.(s,()=>this.activeTheme)??s;this.debug(">>> AgCharts.createOrUpdate() - applying preset",s,x),s=x}this.activeTheme=gxe(s.theme),this.type&&(s=this.activeTheme.templateTheme(s)),this.sanityCheckAndCleanup(s),this.defaultAxes=this.getDefaultAxes(s),this.specialOverrides=this.specialOverridesDefaults(ve({},e));let u=this.getSeriesThemeConfig(r),{axes:o={},annotations:m={}}=u,f=m,{axesButtons:a=null}=f,l=al(f,["axesButtons"]),_=u,{series:c}=_,d=al(_,["axes","annotations","series"]);this.userOptions=t,this.processedOptions=N0(ql(s,a!=null?{annotations:{axesButtons:a}}:{},d,this.defaultAxes),i),this.processAxesOptions(this.processedOptions,o),this.processSeriesOptions(this.processedOptions),this.processMiniChartSeriesOptions(this.processedOptions),this.annotationThemes=l,(vE(this.processedOptions)||g4i(this.processedOptions))&&this.processedOptions.legend?.enabled==null&&((n=this.processedOptions).legend??(n.legend={}),this.processedOptions.legend.enabled=this.processedOptions.series.length>1),this.enableConfiguredOptions(this.processedOptions),cw.isEnterprise||Jet(this.processedOptions,!0)}getOptions(){return this.processedOptions??{}}diffOptions(t){return V4(t,this.processedOptions)}getSeriesThemeConfig(t){let e=N0(this.activeTheme?.config[t]??{});return this.removeLeftoverSymbols(e),e}getDefaultAxes(t){let e=this.optionsType(t),n=w3.cloneDefaultAxes(e);return w3.isDefaultAxisSwapNeeded(t)&&this.swapAxesPosition(n),n}optionsType(t){return t.series?.[0]?.type??"line"}sanityCheckAndCleanup(t){this.deprecationWarnings(t),this.axesTypeIntegrity(t),this.seriesTypeIntegrity(t),this.soloSeriesIntegrity(t),this.removeDisabledOptions(t),this.removeLeftoverSymbols(t),t.series?.some(e=>e.type==="bullet")&&t.sync!=null&&t.sync.enabled!==!1&&(yr.warnOnce("bullet series cannot be synced, disabling synchronization."),delete t.sync)}swapAxesPosition(t){if(vE(t)){let[e,n]=t.axes??[];t.axes=[St(ve({},e),{position:n.position}),St(ve({},n),{position:e.position})]}}processAxesOptions(t,e){"axes"in t&&(t.axes=t.axes.map(n=>{let u=ql(e[n.type]?.[n.position],e[n.type]),{crossLines:i}=u,r=al(u,["crossLines"]);n.crossLines&&(n.crossLines=sCe(n.crossLines,i));let s=r.gridLine?.style;n.gridLine?.style&&s?.length&&(n.gridLine.style=n.gridLine.style.map((f,_)=>f.stroke!=null||f.lineDash!=null?ql(f,s.at(_%s.length)):f));let m=ql(n,r),{top:o,right:a,bottom:l,left:c}=m;return al(m,["top","right","bottom","left"])}))}processSeriesOptions(t){let e=this.getDefaultSeriesType(t),n=this.getTooltipPositionDefaults(t),i=D3(t.theme)?ICe(t.theme?.palette):"inbuilt",r={colourIndex:0,userPalette:i},s=t.series?.map(o=>{o.type??(o.type=e);let f=this.getSeriesThemeConfig(o.type).series??{},{innerLabels:a}=f,l=al(f,["innerLabels"]),c=U6i.has(o.type)?{colourIndex:0,userPalette:i}:r,d=this.getSeriesPalette(o.type,c),u=this.getTooltipRangeDefaults(t,o.type),m=ql(this.getSeriesGroupingOptions(o),o,n,u,l,d,{visible:!0});return m.innerLabels&&(m.innerLabels=sCe(m.innerLabels,a)),this.activeTheme.templateTheme(m)});t.series=this.setSeriesGroupingOptions(s??[])}processMiniChartSeriesOptions(t){let e=t.navigator?.miniChart?.series;if(e==null)return;let n={colourIndex:0,userPalette:D3(t.theme)?ICe(t.theme.palette):"inbuilt"};e=e.map(i=>{i.type??(i.type="line");let a=this.getSeriesThemeConfig(i.type).series??{},{innerLabels:r}=a,s=al(a,["innerLabels"]),o=ql(this.getSeriesGroupingOptions(i),i,s,this.getSeriesPalette(i.type,n));return this.activeTheme.templateTheme(o)}),t.navigator.miniChart.series=this.setSeriesGroupingOptions(e)}getSeriesPalette(t,e){let n=w3.getPaletteFactory(t),{colourIndex:i,userPalette:r}=e,{fills:s=[],strokes:o=[]}=this.activeTheme.palette;return n?.({userPalette:r,colorsCount:Math.max(s.length,o.length),themeTemplateParameters:this.activeTheme.getTemplateParameters(),palette:this.activeTheme.palette,takeColors(a){return e.colourIndex+=a,{fills:dCe(s,a,i),strokes:dCe(o,a,i)}}})}getSeriesGroupingOptions(t){let e=w3.isGroupable(t.type),n=w3.isStackable(t.type),i=w3.isStackedByDefault(t.type);t.grouped&&!e&&yr.warnOnce(`unsupported grouping of series type "${t.type}".`),(t.stacked||t.stackGroup)&&!n&&yr.warnOnce(`unsupported stacking of series type "${t.type}".`);let{grouped:r,stacked:s}=t;return s??(s=(i||t.stackGroup!=null)&&!(e&&r)),r??(r=!0),{stacked:n&&s,grouped:e&&r&&!(n&&s)}}setSeriesGroupingOptions(t){let e=this.getSeriesGrouping(t);this.debug("setSeriesGroupingOptions() - series grouping: ",e);let n={},i=e.reduce((r,s)=>{var o;return s.groupType==="default"||(r[o=s.seriesType]??(r[o]=0),r[s.seriesType]+=s.groupType==="stack"?1:s.series.length),r},{});return e.flatMap(r=>{var s;switch(n[s=r.seriesType]??(n[s]=0),r.groupType){case"stack":let o=n[r.seriesType]++;return r.series.map((a,l)=>Object.assign(a,{seriesGrouping:{groupId:r.groupId,groupIndex:o,groupCount:i[r.seriesType],stackIndex:l,stackCount:r.series.length}}));case"group":return r.series.map(a=>Object.assign(a,{seriesGrouping:{groupId:r.groupId,groupIndex:n[r.seriesType]++,groupCount:i[r.seriesType],stackIndex:0,stackCount:0}}))}return r.series}).map(a=>{var l=a,{stacked:r,grouped:s}=l,o=al(l,["stacked","grouped"]);return o})}getSeriesGroupId(t){return[t.type,t.xKey,t.stacked?t.stackGroup??"stacked":"grouped"].filter(Boolean).join("-")}getSeriesGrouping(t){let e=new Map;return t.reduce((n,i)=>{let r=i.type;if(!i.stacked&&!i.grouped)n.push({groupType:"default",seriesType:r,series:[i],groupId:"__default__"});else{let s=this.getSeriesGroupId(i);if(!e.has(s)){let a={groupType:i.stacked?"stack":"group",seriesType:r,series:[],groupId:s};e.set(s,a),n.push(a)}e.get(s).series.push(i)}return n},[])}getDefaultSeriesType(t){if(vE(t))return"line";if(Nte(t))return"pie";if(x8e(t))return"treemap";if(b8e(t))return"map-shape";if(w8e(t))return"sankey";throw new Error("Invalid chart options type detected.")}getTooltipPositionDefaults(t){let e=t.tooltip?.position;if(!E6(e))return;let{type:n,xOffset:i,yOffset:r}=e,s={};return E3(n)&&Ftt(RCe,n)&&(s.type=n),Tc(i)&&(s.xOffset=i),Tc(r)&&(s.yOffset=r),{tooltip:{position:s}}}getTooltipRangeDefaults(t,e){return{tooltip:{range:t.tooltip?.range??w3.getTooltipDefauls(e)?.range}}}deprecationWarnings(t){Object.entries({yKeys:"yKey",yNames:"yName"}).forEach(([n,i])=>{t.series?.some(r=>r[n]!=null)&&yr.warnOnce(`Property [series.${n}] is deprecated, please use [series.${i}] and multiple series instead.`)})}axesTypeIntegrity(t){if("axes"in t){let e=t.axes??[];for(let{type:n}of e)if(!y4i(n)){delete t.axes;let i=Hx.publicKeys().join(", ");yr.warnOnce(`unknown axis type: ${n}; expected one of: ${i}`)}}}seriesTypeIntegrity(t){t.series=t.series?.filter(({type:e})=>{if(e==null||v4i(e)||Q3i(e))return!0;yr.warnOnce(`unknown series type: ${e}; expected one of: ${Int.seriesTypes.join(", ")}`)})}soloSeriesIntegrity(t){let e=t.series;if(e&&e.length>1&&e.some(n=>w3.isSolo(n.type))){let n=this.optionsType(t);if(w3.isSolo(n))yr.warn(`series[0] of type '${n}' is incompatible with other series types. Only processing series[0]`),t.series=e.slice(0,1);else{let{solo:i,nonSolo:r}=s8e(e,o=>w3.isSolo(o.type)?"solo":"nonSolo"),s=Mte(i.map(o=>o.type)).join(", ");yr.warn(`Unable to mix these series types with the lead series type: ${s}`),t.series=r}}}enableConfiguredOptions(t){J5(this.userOptions,(e,n)=>{n&&"enabled"in n&&!n._enabledFromTheme&&e.enabled==null&&(n.enabled=!0)},{skip:["data","theme"]},t),J5(t,e=>{e._enabledFromTheme!=null&&delete e._enabledFromTheme},{skip:["data","theme"]})}removeDisabledOptions(t){J5(t,e=>{"enabled"in e&&e.enabled===!1&&Object.keys(e).forEach(n=>{n!=="enabled"&&delete e[n]})},{skip:["data","theme"]})}removeLeftoverSymbols(t){J5(t,e=>{if(!(!e||!D3(e)))for(let[n,i]of Object.entries(e))Ltt(i)&&delete e[n]},{skip:["data"]})}specialOverridesDefaults(t){if(t.window!=null?_it(t.window):typeof window<"u"?t.window=window:typeof global<"u"&&(t.window=global.window),t.document!=null?yit(t.document):typeof document<"u"?t.document=document:typeof global<"u"&&(t.document=global.document),t.window==null)throw new Error("AG Charts - unable to resolve global window");if(t.document==null)throw new Error("AG Charts - unable to resolve global document");return t}},qH=bu.create(!0,"opts");DE=(()=>{let t=class{static licenseCheck(e){this.licenseChecked||(this.licenseManager=cw.licenseManager?.(e),this.licenseManager?.setLicenseKey(this.licenseKey,this.gridContext),this.licenseManager?.validateLicense(),this.licenseChecked=!0)}static setLicenseKey(e){this.licenseKey=e}static setGridContext(e){this.gridContext=e}static getLicenseDetails(e){return cw.licenseManager?.({}).getLicenseDetails(e)}static getInstance(e){return rtt.getInstance(e)}static create(e){this.licenseCheck(e);let n=rtt.createOrUpdate(e,void 0,this.licenseManager);return cw.styles!=null&&n.chart.ctx.domManager.addStyles("ag-charts-enterprise",cw.styles),this.licenseManager?.isDisplayWatermark()&&this.licenseManager&&cw.injectWatermark?.(n.chart.ctx.domManager,this.licenseManager.getWatermarkMessage()),n}static createFinancialChart(e){return this.create(ve({_type:"price-volume"},e))}};return t.licenseChecked=!1,t.gridContext=!1,t})(),mE=class aw{static getInstance(e){let n=LR.getInstance(e);return n?ket.chartInstances.get(n):void 0}static initialiseModules(){aw.initialised||(m6i(),f6i(),aw.initialised=!0)}static createOrUpdate(e,n,i){aw.initialiseModules(),qH(">>> AgCharts.createOrUpdate() user options",e);let r=n?.chart.chartOptions.type,_=e,{_type:s=r}=_,a=al(_,["_type"]);DE.optionsMutationFn&&(a=DE.optionsMutationFn(a,s),qH(">>> AgCharts.createOrUpdate() MUTATED user options",e));let x=a,{overrideDevicePixelRatio:l,document:c,window:d}=x,u=al(x,["overrideDevicePixelRatio","document","window"]),m=new cst(u,{overrideDevicePixelRatio:l,document:c,window:d,type:s}),f=n?.chart;return(f==null||ntt(u)!==ntt(f?.chartOptions.processedOptions))&&(f=aw.createChartInstance(m,f)),n==null?n=new ket(f,aw.callbackApi,i):n.chart=f,qH.check()&&typeof window<"u"&&(window.agChartInstances??(window.agChartInstances={}),window.agChartInstances[f.id]=f),f.queuedUserOptions.push(u),f.requestFactoryUpdate(D=>{D.applyOptions(m);let E=D.queuedUserOptions.indexOf(u)+1;D.queuedUserOptions.splice(0,E)}),n}static updateUserDelta(e,n){n=N0(n,{shallow:["data"]}),J5(n,o=>{if(typeof o=="object")for(let[a,l]of Object.entries(o))typeof l>"u"&&Object.assign(o,{[a]:Symbol("UNSET")})},{skip:["data"]});let{chart:i}=e,r=i.getOptions(),s=ql(n,r);qH(">>> AgCharts.updateUserDelta() user delta",n),qH("AgCharts.updateUserDelta() - base options",r),aw.createOrUpdate(s,e)}static createChartInstance(e,n){let i=n?.destroy({keepTransferableResources:!0}),r=aw.getChartByOptions(e.processedOptions);return new r(e,i)}static getChartByOptions(e){if(vE(e))return ivi;if(x8e(e))return y6i;if(Nte(e))return _6i;if(b8e(e))return C6i;if(w8e(e))return v6i;throw new Error("AG Charts - couldn't apply configuration, check options are correctly structured and series types are specified")}};mE.caretaker=new Zit(GG);mE.initialised=!1;mE.callbackApi={caretaker:mE.caretaker,createOrUpdate(t,e){return mE.createOrUpdate(t,e)},updateUserDelta(t,e){return mE.updateUserDelta(t,e)}};rtt=mE,Wi={};nC(Wi,{Arc:()=>lC,BBox:()=>Os,BandScale:()=>_w,Caption:()=>Vh,ChangeDetectableProperties:()=>Y8e,Circle:()=>_E,ContinuousScale:()=>Ud,Diamond:()=>Qnt,DropShadow:()=>h_,ExtendedPath2D:()=>wG,Group:()=>xo,HdpiCanvas:()=>m8e,Image:()=>LE,Label:()=>f1,Line:()=>i0,LinearGradientFill:()=>Zte,LinearScale:()=>c_,Marker:()=>w2,Node:()=>SR,OrdinalTimeScale:()=>a_,Path:()=>Og,PointerEvents:()=>Ett,RadialColumnShape:()=>cC,Rect:()=>A3,RedrawType:()=>mw,Scene:()=>ent,SceneChangeDetection:()=>Ss,ScenePathChangeDetection:()=>va,Sector:()=>S2,SectorBox:()=>Zrt,Selection:()=>Oh,Shape:()=>M6,Square:()=>ate,SvgPath:()=>vxe,Text:()=>Gu,Tooltip:()=>P6,Triangle:()=>uR,drawCorner:()=>rG,easing:()=>ZCe,evaluateBezier:()=>xvi,getFont:()=>K6i,getMarker:()=>iC,getRadialColumnWidth:()=>j6i,motion:()=>$6i,sectorBox:()=>Xrt,solveBezier:()=>cte,splitBezier:()=>dte,toRadians:()=>Rg,toTooltipHtml:()=>vR});lC=class extends Og{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=Math.PI*2,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return fE(Nh(this.startAngle),Nh(this.endAngle))}updatePath(){let t=this.path;t.clear(),t.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===1?t.closePath():this.type===2&&!this.fullPie&&(t.lineTo(this.centerX,this.centerY),t.closePath())}computeBBox(){return new Os(this.centerX-this.radius,this.centerY-this.radius,this.radius*2,this.radius*2)}isPointInPath(t,e){let n=this.transformPoint(t,e),i=this.getBBox();return this.type!==0&&i.containsPoint(n.x,n.y)&&this.path.isPointInPath(n.x,n.y)}};lC.className="Arc";lC.defaultStyles=Object.assign({},M6.defaultStyles,{lineWidth:1,fillStyle:null});Me([va()],lC.prototype,"centerX",2);Me([va()],lC.prototype,"centerY",2);Me([va()],lC.prototype,"radius",2);Me([va()],lC.prototype,"startAngle",2);Me([va()],lC.prototype,"endAngle",2);Me([va()],lC.prototype,"counterClockwise",2);Me([va()],lC.prototype,"type",2);Zte=class extends M6{constructor(){super(...arguments),this.direction="to-right",this.stops=void 0,this._mask=void 0}get mask(){return this._mask}set mask(t){this._mask!=null&&this.removeChild(this._mask),t!=null&&this.appendChild(t),this._mask=t}isPointInPath(t,e){return this.mask?.isPointInPath(t,e)??!1}computeBBox(){return this.mask?.getBBox()}render(t){let{mask:e,stops:n}=this,{ctx:i,devicePixelRatio:r}=t,s=1/r,o=e?.computeTransformedBBox();if(e==null||n==null||o==null)return;e.dirtyPath&&(e.updatePath(),e.dirtyPath=!1),i.save(),i.clip(e.path.getPath2D()),i.setTransform(r,0,0,r,0,0);let a=Math.floor(o.x),l=Math.ceil(o.x+o.width),c=Math.floor(o.y),d=Math.ceil(o.y+o.height),u=this.direction==="to-right"||this.direction==="to-left",m=this.direction==="to-top"||this.direction==="to-left",f=new VE,[_,x]=u?[a,l]:[c,d];f.domain=n.map((M,I)=>_+(x-_)*I/(n.length-1)),f.range=m?n.slice().reverse():n,f.update();let D=d-c,E=l-a;switch(this.direction){case"to-right":case"to-left":for(let M=a;M<=l;M+=s)i.fillStyle=f.convert(M),i.fillRect(M,c,s,D);break;case"to-bottom":case"to-top":for(let M=c;M<=d;M+=s)i.fillStyle=f.convert(M),i.fillRect(a,M,E,s);break}i.restore()}};Me([Ss({redraw:3})],Zte.prototype,"direction",2);Me([Ss({redraw:3})],Zte.prototype,"stops",2);Me([Ss({redraw:3})],Zte.prototype,"_mask",2);cC=(()=>{let t=class extends Og{constructor(){super(...arguments),this.isBeveled=!0,this.columnWidth=0,this.startAngle=0,this.endAngle=0,this.outerRadius=0,this.innerRadius=0,this.axisInnerRadius=0,this.axisOuterRadius=0,this.isRadiusAxisReversed=!1}set cornerRadius(e){}computeBBox(){let{innerRadius:e,outerRadius:n,columnWidth:i}=this,r=this.getRotation(),s=-i/2,o=i/2,a=-n,l=-e,c=1/0,d=1/0,u=-1/0,m=-1/0;for(let f=0;f<4;f+=1){let{x:_,y:x}=J5e(f%2===0?s:o,f<2?a:l,r);c=Math.min(_,c),d=Math.min(x,d),u=Math.max(_,u),m=Math.max(x,m)}return new Os(c,d,u-c,m-d)}getRotation(){let{startAngle:e,endAngle:n}=this,i=Ate(e,n);return Nh(e+i/2+Math.PI/2)}updatePath(){let{isBeveled:e}=this;e?this.updateBeveledPath():this.updateRectangularPath(),this.checkPathDirty()}updateRectangularPath(){let{columnWidth:e,innerRadius:n,outerRadius:i,path:r}=this,s=-e/2,o=e/2,a=-i,l=-n,c=this.getRotation(),d=[[s,l],[s,a],[o,a],[o,l]].map(([u,m])=>J5e(u,m,c));r.clear(!0),r.moveTo(d[0].x,d[0].y),r.lineTo(d[1].x,d[1].y),r.lineTo(d[2].x,d[2].y),r.lineTo(d[3].x,d[3].y),r.closePath()}updateBeveledPath(){let{columnWidth:e,path:n,outerRadius:i,innerRadius:r,axisInnerRadius:s,axisOuterRadius:o,isRadiusAxisReversed:a}=this,l=fE(r,s),c=Math.asin(e/2/r),d=this.getRotation(),u=(ne,pe)=>J5e(ne,pe,d),m=(ne,pe)=>Math.sqrt(ne**2+pe**2),f=(ne,pe)=>pe>ne?0:Math.sqrt(ne**2-pe**2),_=(ne,pe,ce)=>ce?ne<pe:ne>pe,x=l&&!isNaN(c)&&c<Math.PI/6,D=-e/2,E=e/2,M=-i,I=-r*(x?Math.cos(c):1),z=_(o,m(r,e/2),!a);if(z){let ne=f(o,r);D=-ne,E=ne}n.clear(!0);let G=u(D,I);n.moveTo(G.x,G.y);let A=fE(r,i),Y=_(o,m(i,e/2),!a);if(A&&x)n.arc(0,0,r,Nh(-c-Math.PI/2)+d,Nh(c-Math.PI/2)+d,!1);else if(Y){let ne=-f(o,e/2),pe=f(o,i);if(!z){let ce=u(D,ne);n.lineTo(ce.x,ce.y)}if(n.arc(0,0,o,Math.atan2(ne,D)+d,Math.atan2(M,-pe)+d,!1),!fE(pe,0)){let ce=u(pe,M);n.lineTo(ce.x,ce.y)}n.arc(0,0,o,Math.atan2(M,pe)+d,Math.atan2(ne,E)+d,!1)}else{let ne=u(D,M),pe=u(E,M);n.lineTo(ne.x,ne.y),n.lineTo(pe.x,pe.y)}let X=u(E,I);if(n.lineTo(X.x,X.y),x)n.arc(0,0,r,Nh(c-Math.PI/2)+d,Nh(-c-Math.PI/2)+d,!0);else{let ne=u(D,I);n.lineTo(ne.x,ne.y)}n.closePath()}};return t.className="RadialColumnShape",t})();Me([va()],cC.prototype,"isBeveled",2);Me([va()],cC.prototype,"columnWidth",2);Me([va()],cC.prototype,"startAngle",2);Me([va()],cC.prototype,"endAngle",2);Me([va()],cC.prototype,"outerRadius",2);Me([va()],cC.prototype,"innerRadius",2);Me([va()],cC.prototype,"axisInnerRadius",2);Me([va()],cC.prototype,"axisOuterRadius",2);Me([va()],cC.prototype,"isRadiusAxisReversed",2);vxe=class extends Og{constructor(t){super(),this.x=0,this.y=0,this.commands=[];for(let[e,n,i]of t.matchAll(/([A-Z])([0-9. ]+)/g)){let r=i.split(" ").map(Number);this.commands.push([n,r])}}updatePath(){let{path:t,x:e,y:n}=this;t.clear();let i=e,r=n;for(let[s,o]of this.commands)switch(s){case"M":t.moveTo(e+o[0],n+o[1]),i=e+o[0];break;case"C":t.cubicCurveTo(e+o[0],n+o[1],e+o[2],n+o[3],e+o[4],n+o[5]),i=e+o[4],r=n+o[5];break;case"H":t.lineTo(e+o[0],r),i=n+o[0];break;case"L":t.lineTo(e+o[0],n+o[1]),i=e+o[0],r=n+o[1];break;case"V":t.lineTo(i,n+o[0]),r=n+o[0];break;default:throw new Error(`Could not translate command '${s}' with '${o.join(" ")}'`)}t.closePath()}};Me([va()],vxe.prototype,"x",2);Me([va()],vxe.prototype,"y",2);$6i=ve(ve({},btt),tit),K6i=Mf.toFontString,Lm={};nC(Lm,{CARTESIAN_AXIS_TYPE:()=>frt,ChartTheme:()=>Jx,DEFAULT_ANNOTATION_BACKGROUND_FILL:()=>j4,DEFAULT_ANNOTATION_COLOR:()=>U4,DEFAULT_ANNOTATION_HANDLE_FILL:()=>U8e,DEFAULT_AXIS_GRID_COLOUR:()=>bR,DEFAULT_AXIS_LINE_COLOUR:()=>Xee,DEFAULT_BACKGROUND_COLOUR:()=>lte,DEFAULT_CAPTION_ALIGNMENT:()=>pE,DEFAULT_CAPTION_LAYOUT_STYLE:()=>hE,DEFAULT_COLOURS:()=>Cvi,DEFAULT_CROSS_LINES_COLOUR:()=>hG,DEFAULT_DIVERGING_SERIES_COLOUR_RANGE:()=>W4,DEFAULT_FONT_FAMILY:()=>sm,DEFAULT_GRIDLINE_ENABLED:()=>Bx,DEFAULT_HIERARCHY_FILLS:()=>H8e,DEFAULT_HIERARCHY_STROKES:()=>G8e,DEFAULT_INSIDE_SERIES_LABEL_COLOUR:()=>OE,DEFAULT_INVERTED_LABEL_COLOUR:()=>yrt,DEFAULT_LABEL_COLOUR:()=>t0,DEFAULT_MUTED_LABEL_COLOUR:()=>bE,DEFAULT_PADDING:()=>lw,DEFAULT_POLAR_SERIES_STROKE:()=>z8e,DEFAULT_SHADOW_COLOUR:()=>NE,DEFAULT_TEXTBOX_COLOR:()=>K8e,DEFAULT_TEXTBOX_FILL:()=>j8e,DEFAULT_TEXTBOX_STROKE:()=>$8e,DEFAULT_TEXT_ANNOTATION_COLOR:()=>W8e,DEFAULT_TOOLBAR_POSITION:()=>ZG,FONT_SIZE:()=>hrt,FONT_WEIGHT:()=>prt,IS_DARK_THEME:()=>uG,PALETTE_ALT_DOWN_FILL:()=>brt,PALETTE_ALT_DOWN_STROKE:()=>Crt,PALETTE_ALT_NEUTRAL_FILL:()=>wrt,PALETTE_ALT_NEUTRAL_STROKE:()=>B8e,PALETTE_ALT_UP_FILL:()=>xrt,PALETTE_ALT_UP_STROKE:()=>_rt,PALETTE_DOWN_FILL:()=>N8e,PALETTE_DOWN_STROKE:()=>L8e,PALETTE_NEUTRAL_FILL:()=>V8e,PALETTE_NEUTRAL_STROKE:()=>pG,PALETTE_UP_FILL:()=>O8e,PALETTE_UP_STROKE:()=>F8e,POLAR_AXIS_SHAPE:()=>vrt,POLAR_AXIS_TYPE:()=>grt,POSITION:()=>mrt,getChartTheme:()=>gxe,markerPaletteFactory:()=>Ute,singleSeriesPaletteFactory:()=>zR,themes:()=>Y6i});Y6i=$Ce(lst,t=>t?.()),O6={};nC(O6,{BandScale:()=>_w,ColorScale:()=>VE,ContinuousScale:()=>Ud,Invalidating:()=>r0,LinearScale:()=>c_,OrdinalTimeScale:()=>a_,TimeScale:()=>Ite});Zl={};nC(Zl,{Color:()=>X5,Debug:()=>bu,Logger:()=>yr,Padding:()=>Dw,TimeInterval:()=>SE,Vec2:()=>dst,angleBetween:()=>Ate,angleDiff:()=>Cit,areArrayNumbersEqual:()=>wit,bifurcate:()=>cit,checkDatum:()=>pCe,clamp:()=>Wa,clampArray:()=>Jee,countFractionDigits:()=>PG,createId:()=>k6,day:()=>VCe,deepClone:()=>N0,displacePointFromVector:()=>Tgi,extent:()=>sC,findMinMax:()=>N4,findRangeExtent:()=>fR,formatNormalizedPercentage:()=>WCe,formatPercentage:()=>UCe,friday:()=>ftt,hour:()=>NCe,interpolateColor:()=>Itt,interpolateNumber:()=>ktt,isBetweenAngles:()=>hw,isContinuous:()=>Rte,isDate:()=>FG,isDenseInterval:()=>xG,isEqual:()=>fE,isNegative:()=>AG,isNumber:()=>Tc,isNumberEqual:()=>fE,isNumberObject:()=>Mit,isString:()=>E3,isStringObject:()=>Eit,jsonApply:()=>cR,jsonDiff:()=>V4,jsonWalk:()=>J5,millisecond:()=>FCe,minute:()=>OCe,mod:()=>_te,monday:()=>utt,month:()=>zCe,normalisedExtent:()=>lit,normalisedExtentWithMetadata:()=>NG,normalizeAngle180:()=>bG,normalizeAngle360:()=>Nh,normalizeAngle360Inclusive:()=>wgi,range:()=>CG,resetIds:()=>wtt,round:()=>vte,sanitizeHtml:()=>Lh,saturday:()=>gtt,second:()=>LCe,setAttribute:()=>TE,setVisibility:()=>tG,shallowClone:()=>tte,sunday:()=>BCe,thursday:()=>mtt,tickFormat:()=>uit,tickStep:()=>gR,ticks:()=>kte,toDegrees:()=>Sgi,toFixed:()=>yte,toRadians:()=>Rg,transformIntegratedCategoryValue:()=>dR,tuesday:()=>htt,utcDay:()=>_tt,utcHour:()=>ytt,utcMinute:()=>vtt,utcMonth:()=>Ctt,utcYear:()=>xtt,uuid:()=>g2i,wednesday:()=>ptt,year:()=>HCe,zipObject:()=>oyi});dst={add:q6i,angle:eyi,apply:syi,equal:iyi,distance:Q6i,distanceSquared:J6i,from:nyi,fromOffset:ryi,length:Z6i,lengthSquared:X6i,required:ust,rotate:tyi,sub:yxe};R3={};nC(R3,{AND:()=>I6,ARRAY:()=>DR,ARRAY_OF:()=>$x,AbstractBarSeries:()=>Hrt,AbstractBarSeriesProperties:()=>axe,ActionOnSet:()=>Fg,Animation:()=>ztt,AnimationManager:()=>lnt,AreaSeriesTag:()=>Vrt,Axis:()=>u8e,AxisInterval:()=>kE,AxisLabel:()=>g1,AxisTick:()=>IR,AxisTicks:()=>fyi,BOOLEAN:()=>Jo,BOOLEAN_ARRAY:()=>q2i,Background:()=>OR,BackgroundModule:()=>ort,BaseModuleInstance:()=>HG,BaseProperties:()=>pl,COLOR_STRING:()=>kd,COLOR_STRING_ARRAY:()=>A6,CachedTextMeasurer:()=>xit,CachedTextMeasurerPool:()=>Yx,CartesianAxis:()=>AR,CartesianSeries:()=>Mw,CartesianSeriesNodeEvent:()=>I8e,CartesianSeriesProperties:()=>Xx,CategoryAxis:()=>PR,ChartAxisDirection:()=>n8e,ChartEventManager:()=>dnt,ChartOptions:()=>cst,ChartUpdateType:()=>cG,ContextMenuRegistry:()=>unt,Cursor:()=>pnt,CursorManager:()=>mnt,DATE:()=>JCe,DATE_ARRAY:()=>Z2i,DATE_OR_DATETIME_MS:()=>e8e,DEFAULT_CARTESIAN_DIRECTION_KEYS:()=>RE,DEFAULT_CARTESIAN_DIRECTION_NAMES:()=>FE,DEFAULT_TOOLTIP_CLASS:()=>Z5,DEFAULT_TOOLTIP_DARK_CLASS:()=>Tit,DEGREE:()=>xw,DIRECTION:()=>Ztt,DOMManager:()=>int,DataController:()=>Mnt,DataModel:()=>Ent,DataModelSeries:()=>M8e,DataService:()=>Lte,Default:()=>Tw,Deprecated:()=>ayi,DeprecatedAndRenamedTo:()=>lyi,EMPTY_TOOLTIP_CONTENT:()=>qx,FONT_STYLE:()=>bw,FONT_WEIGHT:()=>ww,FUNCTION:()=>k3,GREATER_THAN:()=>MR,GestureDetector:()=>fnt,GroupedCategoryAxis:()=>yR,HierarchyNode:()=>sG,HierarchySeries:()=>uyi,HierarchySeriesProperties:()=>Pw,HighlightManager:()=>gnt,HighlightProperties:()=>k8e,HighlightStyle:()=>YG,INTERACTION_RANGE:()=>Ete,INTERPOLATION_STEP_POSITION:()=>Mrt,INTERPOLATION_TYPE:()=>Ert,InteractionManager:()=>ant,InteractionState:()=>WG,InterpolationProperties:()=>HR,KeyNavManager:()=>vnt,LABEL_PLACEMENT:()=>i8e,LARGEST_KEY_INTERVAL:()=>Bnt,LESS_THAN:()=>ER,LINE_CAP:()=>X2i,LINE_DASH:()=>Kx,LINE_JOIN:()=>Q2i,Layers:()=>Dit,LayoutService:()=>xnt,LonLatBBox:()=>hyi,MARKER_SHAPE:()=>Trt,MATCHING_CROSSLINE_TYPE:()=>d8e,MAX_SPACING:()=>Jtt,MIN_SPACING:()=>Qtt,MercatorScale:()=>MCe,ModuleRegistry:()=>$it,Motion:()=>ZCe,NAN:()=>Ste,NODE_UPDATE_STATE_TO_PHASE_MAPPING:()=>Pg,NUMBER:()=>wu,NUMBER_ARRAY:()=>Tte,NUMBER_OR_NAN:()=>TR,Navigator:()=>Aw,NavigatorModule:()=>urt,OBJECT:()=>Us,OBJECT_ARRAY:()=>Ytt,OR:()=>ME,OVERFLOW_STRATEGY:()=>egi,ObserveChanges:()=>Lg,PHASE_METADATA:()=>_G,PHASE_ORDER:()=>iR,PLACEMENT:()=>Xtt,PLAIN_OBJECT:()=>jtt,POINTER_INTERACTION_TYPES:()=>g8e,POSITION:()=>t8e,POSITION_TOP_COORDINATES:()=>ste,POSITIVE_NUMBER:()=>Rr,PolarAxis:()=>hR,PolarSeries:()=>$te,PropertiesArray:()=>xte,ProxyOnWrite:()=>Ngi,ProxyProperty:()=>m1,ProxyPropertyOnWrite:()=>z0,QUICK_TRANSITION:()=>ite,RATIO:()=>ud,REGIONS:()=>Pit,RegionManager:()=>ynt,RepeatType:()=>Btt,SKIP_JS_BUILTINS:()=>YCe,SMALLEST_KEY_INTERVAL:()=>Vnt,SORT_DOMAIN_GROUPS:()=>znt,STRING:()=>Gr,STRING_ARRAY:()=>Ktt,Series:()=>KG,SeriesGroupingChangedEvent:()=>D8e,SeriesItemHighlightStyle:()=>Zx,SeriesMarker:()=>P3,SeriesNodeEvent:()=>$G,SeriesNodePickMode:()=>Wnt,SeriesProperties:()=>L6,SeriesTooltip:()=>Ng,SimpleTextMeasurer:()=>l8e,StateMachine:()=>BG,TEXT_ALIGN:()=>qtt,TEXT_WRAP:()=>Dte,TICK_INTERVAL:()=>Rit,TextUtils:()=>Mf,TextWrapper:()=>c8e,ToolbarManager:()=>Cnt,Tooltip:()=>P6,TooltipManager:()=>Ote,TooltipPosition:()=>kR,UNION:()=>Su,UpdateService:()=>bnt,VERTICAL_ALIGN:()=>J2i,Validate:()=>$e,ZoomManager:()=>Ant,__FORCE_MODULE_DETECTION:()=>gyi,accumulateGroup:()=>Hnt,accumulateStack:()=>Gnt,accumulatedValue:()=>Ont,accumulativeValueProperty:()=>TG,addHitTestersToQuadtree:()=>sxe,adjustLabelPlacement:()=>Krt,allInStringUnion:()=>vgi,animationValidation:()=>FR,area:()=>SCe,arraysEqual:()=>gE,backfillPathPointData:()=>Q8e,basicContinuousCheckDatumValidation:()=>S8e,bifurcate:()=>cit,buildFormatter:()=>LG,buildResetPathFn:()=>txe,calculateDefaultTimeTickFormat:()=>Wtt,calculateLabelChartPadding:()=>Iit,calculateLabelTranslation:()=>mCe,calculatePlacement:()=>Sit,checkCrisp:()=>jrt,childrenIter:()=>zrt,circularSliceArray:()=>dCe,clamp:()=>Wa,clampArray:()=>Jee,collapsedStartingBarPosition:()=>MG,computeBarFocusBounds:()=>lxe,computeMarkerFocusBounds:()=>QG,convertValuesToScaleByDefs:()=>k4i,countFractionDigits:()=>PG,createDatumId:()=>Gx,createDeprecationWarning:()=>_xe,createElement:()=>Rm,createElementNS:()=>hCe,dateToNumber:()=>S3,deconstructSelectionsOrNodes:()=>bte,deepClone:()=>N0,deepMerge:()=>R2i,defaultTimeTickFormat:()=>QCe,determinePathStatus:()=>Lrt,diff:()=>PE,downloadUrl:()=>vit,enterpriseModule:()=>cw,extent:()=>sC,extractDecoratedProperties:()=>k2i,findMaxValue:()=>cyi,findMinMax:()=>N4,findQuadtreeMatch:()=>oxe,findRangeExtent:()=>fR,fixNumericExtent:()=>M3,formatNormalizedPercentage:()=>WCe,formatPercentage:()=>UCe,fromToMotion:()=>om,getDocument:()=>l_,getMissCount:()=>v8e,getPath:()=>KCe,getPathComponents:()=>Dnt,getRectConfig:()=>Urt,getWindow:()=>d_,groupAccumulativeValueProperty:()=>vw,groupAverage:()=>Lnt,groupBy:()=>s8e,groupCount:()=>wCe,groupStackValueProperty:()=>$nt,groupSum:()=>Rnt,initMenuKeyNav:()=>cvi,initToolbarKeyNav:()=>Gte,isArray:()=>sp,isBoolean:()=>jCe,isDate:()=>RG,isDecoratedObject:()=>Cte,isDefined:()=>vG,isEnumKey:()=>P2i,isEnumValue:()=>Ftt,isEqual:()=>fE,isFiniteNumber:()=>Tc,isFunction:()=>jx,isHtmlElement:()=>Rtt,isNegative:()=>AG,isNumber:()=>O4,isObject:()=>D3,isObjectLike:()=>A2i,isPlainObject:()=>E6,isProperties:()=>eC,isRegExp:()=>Ptt,isString:()=>E3,isSymbol:()=>Ltt,isValidDate:()=>FG,jsonApply:()=>cR,jsonDiff:()=>V4,jsonWalk:()=>J5,keyProperty:()=>B0,labelDirectionHandling:()=>Ait,listDecoratedProperties:()=>lR,makeAccessibleClickListener:()=>drt,mapIterable:()=>mgi,mapValues:()=>$Ce,markerFadeInAnimation:()=>DG,markerPaletteFactory:()=>Ute,markerScaleInAnimation:()=>q8e,markerSwipeScaleInAnimation:()=>Z8e,mergeArrayDefaults:()=>sCe,mergeDefaults:()=>ql,midpointStartingBarPosition:()=>Vvi,minMax:()=>DCe,mod:()=>_te,moduleRegistry:()=>gw,nearestSquared:()=>gte,nearestSquaredInContainer:()=>v2i,normaliseGroupTo:()=>Bte,normalisePropertyTo:()=>yE,normalisedExtent:()=>lit,normalisedExtentWithMetadata:()=>NG,pairCategoryData:()=>nxe,pairContinuousData:()=>ixe,partialAssign:()=>uE,pathFadeInAnimation:()=>fG,pathFadeOutAnimation:()=>Ivi,pathRangePoints:()=>Rrt,pathRangePointsReverse:()=>Avi,pathRanges:()=>Prt,pathSwipeInAnimation:()=>exe,pickByMatchingAngle:()=>mxe,pickNode:()=>CR,plotPath:()=>J8e,predicateWithMessage:()=>au,prepareAreaPathAnimation:()=>Brt,prepareAxisAnimationContext:()=>fCe,prepareAxisAnimationFunctions:()=>Fit,prepareBarAnimationFunctions:()=>kG,prepareLinePathAnimation:()=>Nrt,prepareLinePathAnimationFns:()=>Ort,prepareLinePathPropertyAnimation:()=>rxe,prepareMarkerAnimation:()=>X8e,preparePieSeriesAnimationFunctions:()=>wE,range:()=>Fnt,rangedValueProperty:()=>T8e,renderPartialPath:()=>Art,resetAxisGroupFn:()=>Lit,resetAxisLabelSelectionFn:()=>Nit,resetAxisLineSelectionFn:()=>Vit,resetAxisSelectionFn:()=>Oit,resetBarSelectionsFn:()=>IG,resetIds:()=>wtt,resetLabelFn:()=>Qx,resetMarkerFn:()=>XG,resetMarkerPositionFn:()=>EG,resetMotion:()=>Ef,resetPieSelectionsFn:()=>pxe,round:()=>vte,scale:()=>e0,seriesLabelFadeInAnimation:()=>Xc,seriesLabelFadeOutAnimation:()=>pw,setDocument:()=>yit,setElementBBox:()=>fw,setPath:()=>qCe,setWindow:()=>_it,shallowClone:()=>tte,singleSeriesPaletteFactory:()=>zR,splitPairData:()=>Irt,staticFromToMotion:()=>rC,stringify:()=>oG,sum:()=>x4i,sumValues:()=>Vte,times:()=>ait,toArray:()=>cCe,toFixed:()=>yte,toTooltipHtml:()=>vR,trailingAccumulatedValue:()=>Nnt,trailingAccumulatedValueProperty:()=>M4i,unique:()=>Mte,updateClipPath:()=>ute,updateLabelNode:()=>$rt,updateRect:()=>Wrt,validateCrossLineValues:()=>kit,valueProperty:()=>Qc,without:()=>oCe});dyi=(()=>{let t=class Qee{constructor(n,i,r,s,o,a,l,c,d,u,m){this.series=n,this.index=i,this.datum=r,this.size=s,this.colorValue=o,this.fill=a,this.stroke=l,this.sumSize=c,this.depth=d,this.parent=u,this.children=m,this.midPoint={x:0,y:0}}contains(n){let i=n;for(;i!=null&&i.index>=this.index;){if(i===this)return!0;i=i.parent}return!1}walk(n,i=Qee.Walk.PreOrder){i===Qee.Walk.PreOrder&&n(this),this.children.forEach(r=>{r.walk(n,i)}),i===Qee.Walk.PostOrder&&n(this)}*[Symbol.iterator](){yield this;for(let n of this.children)yield*VM(n)}};return t.Walk={PreOrder:0,PostOrder:1},t})(),sG=dyi,uyi=class extends KG{constructor(t){super({moduleCtx:t,pickModes:[3,0],contentGroupVirtual:!1}),this.rootNode=new sG(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.focusPath=[],this.animationState=new BG("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}resetAnimation(t){t==="initial"?this.animationState.transition("reset"):t==="ready"&&this.animationState.transition("skip")}processData(){return O(this,null,function*(){let{childrenKey:t,sizeKey:e,colorKey:n,fills:i,strokes:r,colorRange:s}=this.properties,o=0,a=()=>(o+=1,o),l=0,c=1/0,d=-1/0,u=new Array((this.data?.length??0)+1).fill(void 0),m=(E,M)=>{let I=a(),z=M.depth!=null?M.depth+1:0,G=t!=null?E[t]:void 0,A=G==null||G.length===0,Y=e!=null?E[e]:void 0;Number.isFinite(Y)?Y=Math.max(Y,0):Y=A?1:0;let X=Y;l=Math.max(l,z);let ne=n!=null?E[n]:void 0;return typeof ne=="number"&&(u[I]=ne,c=Math.min(c,ne),d=Math.max(d,ne)),f(new sG(this,I,E,Y,ne,void 0,void 0,X,z,M,[]),G)},f=(E,M)=>(M?.forEach(I=>{let z=m(I,E);E.children.push(z),E.sumSize+=z.sumSize}),E),_=f(new sG(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),x=[c,d],D;s!=null&&Number.isFinite(c)&&Number.isFinite(d)&&(D=new VE,D.domain=x,D.range=s,D.update()),_.children.forEach((E,M)=>{E.walk(I=>{let z,G=u[I.index];G!=null&&(z=D?.convert(G)),z??(z=i?.[M%i.length]),I.fill=z,I.stroke=D==null?r?.[M%r.length]:"rgba(0, 0, 0, 0.2)"})}),this.rootNode=_,this.maxDepth=l,this.colorDomain=x,this.focusPath=[{nodeDatum:this.rootNode,childIndex:0}]})}update(e){return O(this,arguments,function*({seriesRect:t}){yield this.updateSelections(),yield this.updateNodes();let n=this.getAnimationData();this.checkResize(t)&&this.animationState.transition("resize",n),this.animationState.transition("update",n)})}resetAllAnimation(t){let e=this.animationResetFns?.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),e!=null&&Ef(t.datumSelections,e)}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){let e=this.animationResetFns?.datum;e!=null&&Ef([t],e)}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){return{datumSelections:[this.groupSelection]}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[NaN,NaN]}getLegendData(t){let{colorKey:e,colorName:n,colorRange:i,visible:r}=this.properties;return t==="gradient"&&e!=null&&i!=null?[{legendType:"gradient",enabled:r,seriesId:this.id,colorName:n,colorRange:i,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(t){return`${t.index}`}getDatumId(t){return this.getDatumIdFromData(t)}pickFocus(t){if(this.rootNode.children.length===0)return;this.focusPath.length===0&&yr.error("this.focusPath should not be empty");let{datumIndexDelta:e,otherIndexDelta:n}=t,{focusPath:i}=this,r=i.length-2;if(n!==0||i.length===1){let s=Math.max(0,r+n);if(i[s+1]!==void 0)return i.length=s+2,this.computeFocusOutputs(i[s+1]);{let o=i[i.length-1];for(;o.nodeDatum.children.length>0&&(o.nodeDatum.depth??-1)<s;){let a={nodeDatum:o.nodeDatum.children[0],childIndex:0};i.push(a),o=a}return this.computeFocusOutputs(o)}}else if(e!==0){let s=i[r+1].childIndex+e,o=i[r].nodeDatum,a=o?.children?.length;if(a!==void 0){let l=Wa(0,s,a-1),c={nodeDatum:o.children[l],childIndex:l};return i[r+1]=c,i.length=r+2,this.computeFocusOutputs(c)}}else return this.computeFocusOutputs(i[i.length-1])}getDatumAriaText(t,e){if(!(t instanceof sG)){yr.error(`datum is not HierarchyNode: ${t}`);return}return this.ctx.localeManager.t("ariaAnnounceHierarchyDatum",{level:(t.depth??-1)+1,count:t.children.length,description:e})}computeFocusOutputs({nodeDatum:t,childIndex:e}){let n=this.computeFocusBounds(t);if(n)return{datum:t,datumIndex:e,otherIndex:t.depth,bounds:n,showFocusBox:!0}}},Pw=class extends L6{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(x2),this.strokes=Object.values(q5)}};Me([$e(Gr)],Pw.prototype,"childrenKey",2);Me([$e(Gr,{optional:!0})],Pw.prototype,"sizeKey",2);Me([$e(Gr,{optional:!0})],Pw.prototype,"colorKey",2);Me([$e(Gr,{optional:!0})],Pw.prototype,"colorName",2);Me([$e(A6)],Pw.prototype,"fills",2);Me([$e(A6)],Pw.prototype,"strokes",2);Me([$e(A6,{optional:!0})],Pw.prototype,"colorRange",2);hyi=class{constructor(t,e,n,i){this.lon0=t,this.lat0=e,this.lon1=n,this.lat1=i}merge(t){this.lon0=Math.min(this.lon0,t.lon0),this.lat0=Math.min(this.lat0,t.lat0),this.lon1=Math.max(this.lon1,t.lon1),this.lat1=Math.max(this.lat1,t.lat1)}};myi=(()=>{let t=class PCe{constructor(){this.id=k6(this),this.axisGroup=new xo({name:`${this.id}-AxisTicks`,zIndex:2}),this.labelSelection=Oh.select(this.axisGroup,Gu,!1),this.interval=new kE,this.label=new g1,this.scale=new c_,this.position="bottom",this.translationX=0,this.translationY=0,this.padding=0}attachAxis(n){n.appendChild(this.axisGroup)}calculateLayout(){this.scale.interval=this.interval.step;let n=[],i=this.generateTicks(),{translationX:r,translationY:s}=this;return this.labelSelection.update(i.ticks.map(o=>this.createLabelDatum(o)),o=>o.appendChild(new Gu),o=>o.tickId),this.labelSelection.each((o,a)=>{o.setProperties(a),a.visible&&n.push(o.getBBox())}),this.axisGroup.setProperties({translationX:r,translationY:s}),Os.merge(n)}getLabelParams(n){let{padding:i}=this,{translate:r}=n;switch(this.position){case"top":case"bottom":return{x:r,y:i,textAlign:"center",textBaseline:"top"};case"left":case"right":return{x:i,y:r,textAlign:"start",textBaseline:"middle"}}}inRange(n,i=.001){let[r,s]=N4(this.scale.range);return n>=r-i&&n<=s+i}createLabelDatum(n){let{x:i,y:r,textBaseline:s,textAlign:o}=this.getLabelParams(n);return{visible:!!n.tickLabel,tickId:n.tickId,fill:this.label.color,fontFamily:this.label.fontFamily,fontSize:this.label.fontSize,fontStyle:this.label.fontStyle,fontWeight:this.label.fontWeight,rotation:0,rotationCenterX:0,text:n.tickLabel,textAlign:o,textBaseline:s,x:i,y:r}}generateTicks(){let{minSpacing:n,maxSpacing:i}=this.interval,r=vte(fR(this.scale.range),2),{maxTickCount:s,minTickCount:o,tickCount:a}=_gi(r,n,i,PCe.DefaultTickCount,PCe.DefaultMinSpacing);a&&(this.scale.tickCount=a,this.scale.minTickCount=o,this.scale.maxTickCount=s);let l=this.getTicksData();if(this.position==="bottom"||this.position==="top"){let c=Yx.getMeasurer({font:this.label}),d=-1/0;l.ticks=l.ticks.filter(u=>{if(d<u.translate)return d=u.translate+c.textWidth(u.tickLabel,!0),!0})}return l}getTicksData(){let n=[],i=this.scale.ticks(),r=i.reduce((a,l)=>Math.max(a,PG(l)),0),s=pyi(),o=this.label.format?this.scale.tickFormat({ticks:i,specifier:this.label.format}):a=>O4(a)?a.toFixed(r):String(a);for(let a=0;a<i.length;a++){let l=i[a],c=this.scale.convert(l);if(!this.inRange(c))continue;let d=this.label.formatter?.({value:l,index:a,fractionDigits:r})??o(l),u=s(d);n.push({tick:l,tickId:u,tickLabel:d,translate:c})}return{rawTicks:i,fractionDigits:r,ticks:n}}};return t.DefaultTickCount=5,t.DefaultMinSpacing=50,t})(),fyi=myi,gyi=0});function Tyi(t){let e=t.cssIdentifier||"default",n=t.direction||"vertical";return`
        <div class="ag-group ag-${e}-group" role="presentation">
            <div data-ref="eToolbar" class="ag-group-toolbar ag-${e}-group-toolbar">
                <ag-checkbox data-ref="cbGroupEnabled"></ag-checkbox>
            </div>
            <div data-ref="eContainer" class="ag-group-container ag-group-container-${n} ag-${e}-group-container"></div>
        </div>
    `}function Dyi(t){let e=t.cssIdentifier??"default",n=t.suppressKeyboardNavigation?"presentation":"role";return`
        <div class="ag-group-title-bar ag-${e}-group-title-bar ag-unselectable" role="${n}">
            <span class="ag-group-title-bar-icon ag-${e}-group-title-bar-icon" data-ref="eGroupOpenedIcon" role="presentation"></span>
            <span class="ag-group-title-bar-icon ag-${e}-group-title-bar-icon" data-ref="eGroupClosedIcon" role="presentation"></span>
            <span data-ref="eTitle" class="ag-group-title ag-${e}-group-title"></span>
        </div>
    `}function Ayi(t){return`<div class="ag-virtual-list-viewport ag-${t}-virtual-list-viewport" role="presentation">
            <div class="ag-virtual-list-container ag-${t}-virtual-list-container" data-ref="eContainer"></div>
        </div>`}function Ryi(t){let e=t.cssIdentifier||"default";return`<div class="ag-panel ag-${e}-panel" tabindex="-1">
        <div data-ref="eTitleBar" class="ag-panel-title-bar ag-${e}-panel-title-bar ag-unselectable">
            <span data-ref="eTitle" class="ag-panel-title-bar-title ag-${e}-panel-title-bar-title"></span>
            <div data-ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${e}-panel-title-bar-buttons"></div>
        </div>
        <div data-ref="eContentWrapper" class="ag-panel-content-wrapper ag-${e}-panel-content-wrapper"></div>
    </div>`}function Lyi(t){return`<div class="ag-tabs ${t}">
        <div data-ref="eHeader"></div>
        <div data-ref="eBody" role="presentation" class="ag-tabs-body ${t?`${t}-body`:""}"></div>
    </div>`}function Nyi(t){return t.filterManager?.getAdvancedFilterModel()??null}function Vyi(t,e){t.filterManager?.setAdvancedFilterModel(e)}function Byi(t){t.filterManager?.toggleAdvancedFilterBuilder(!0,"api")}function zyi(t){t.filterManager?.toggleAdvancedFilterBuilder(!1,"api")}function Fxe(t,e,n){if(!t)return"";let i=n-e;return i?t.slice(0,t.length-i):t}function Bw(t,e,n,i,r,s,o){let a=n+(!t.length||o?0:1),l=0;return r&&(t[a]===" "?l=1:(i+=" ",s&&(i+='"'))),{updatedValue:t.slice(0,e)+i+t.slice(a),updatedPosition:e+i.length+l}}function Gyi(t,e,n){let i=e;for(;i<n&&t[i]===" ";)i++;return i}function Lxe(t,e,n,i){let r=e,s=!1;for(;r<t.length;){let o=t[r];if(o==="("){i&&t[r-1]===" "?s=!0:r=r-1;break}else if(o===" "||n&&o===")"){r=r-1;break}r++}return{endPosition:r,isEmpty:s}}function nbe(t,e,n,i){n!==e&&(t.expression=Bw(t.expression,i-e.length+1,i,n).updatedValue)}function Wyi(t){return t.replace(/(['"])/,"\\$1")}function Cie(t,e,n){let i=!1,r=t.toLocaleLowerCase(),s=r+" ",o=Object.entries(e).find(([,a])=>{let l=n(a).toLocaleLowerCase();return l.startsWith(s)&&(i=!0),l===r});return o?o[0]:i?null:void 0}function rbe(t,e){return(e??Object.keys(t)).map(i=>({key:i,displayValue:t[i].displayValue}))}function cot(t,e){return{pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderAddField",pickerAriaLabelValue:"Advanced Filter Builder Add Field",pickerType:"ag-list",valueList:[{key:"condition",displayValue:t("advancedFilterBuilderAddCondition")},{key:"join",displayValue:t("advancedFilterBuilderAddJoin")}],valueFormatter:n=>n==null?null:n.displayValue??n.key,pickerIcon:"advancedFilterBuilderAdd",maxPickerWidth:`${e??120}px`,wrapperClassName:"ag-advanced-filter-builder-item-button",ariaLabel:t("advancedFilterBuilderAddButtonTooltip")}}function p_i(t){return t.rangeService?.getCellRanges()??null}function m_i(t,e){t.rangeService?.addCellRange(e)}function f_i(t){t.rangeService?.removeAllCellRanges()}function v_i(t){let e=t.length,n=0;if(e<=1)return t;for(let u=0;u<t.length;u++){let m=t[u],f=m.toString().split("e-");if(f.length>1){n=Math.max(n,parseInt(f[1],10));continue}Math.floor(m)!==m&&(n=Math.max(n,m.toString().split(".")[1].length))}let i=0,r=0,s=0,o=0,a=0;for(let u=0;u<e;u++)a=t[u],i+=u,r+=a,o+=u*u,s+=u*a;let l=(e*s-i*r)/(e*o-i*i),c=r/e-l*i/e,d=[];for(let u=0;u<=e;u++)d.push(parseFloat((u*l+c).toFixed(n)));return d}function b_i(t){return!!fot[t]}function cbe(t){return nz.COMBO_CHART_TYPES.includes(t)}function zw(t,e){return!!fot[t]?.[e]}function w_i(t){return zw(oh(t),"isEnterprise")}function T_i(t){return S_i.has(t)}function Nw(t){return zw(t,"isCartesian")}function Oxe(t){return zw(t,"isPolar")}function D_i(t){return zw(t,"isRadial")}function WE(t){return zw(t,"isHierarchical")}function dW(t){return t==="doughnut"?"donut":t}function got(t){return nz.CHART_TYPE_TO_SERIES_TYPE[t]}function oh(t){return got(t)??"line"}function vot(t){return zw(t,"isPie")}function E_i(t){return t==="pie"||t==="waterfall"||t==="histogram"}function Nxe(t){return WE(oh(t))?void 0:1}function cie(t){return WE(oh(t))?2:E_i(t)?1:void 0}function yot(t){return!cbe(t)&&zw(oh(t),"canInvert")}function M_i(t){return zw(oh(t),"canSwitchDirection")}function dbe(t){switch(t){case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":case"stackedArea":case"normalizedArea":return`${t}Full`;case"doughnut":return"donut";case"areaColumnCombo":return"AreaColumnCombo";default:return t}}function Z_i(t){switch(t){case"bar":case"stackedBar":case"normalizedBar":return["number","category"];case"groupedBar":return["number","grouped-category"];case"column":case"stackedColumn":case"normalizedColumn":case"line":case"area":case"stackedArea":case"normalizedArea":case"histogram":return["category","number"];case"groupedColumn":return["grouped-category","number"];case"scatter":case"bubble":return["number","number"];default:return}}function HE(t,e,n){if(t==null)return n;let i=e.split("."),r=t;for(;i.length>1;)if(r=r[i.shift()],r==null)return n;let s=r[i[0]];return s??n}function X_i(t,e,n){if(t==null)return;let i=e.split("."),r=t;i.forEach((s,o)=>{r[s]||(r[s]={}),o<i.length-1&&(r=r[s])}),r[i[i.length-1]]=n}function Q_i(t,e,n,i,r){let{chartOptionsToRestore:s,chartPaletteToRestore:o,chartThemeToRestore:a}=t,l=n5i(t),c=ube(l),d=c?{baseTheme:l}:wot(t,l)??{},u=t.getGridOptionsChartThemeOverrides(),m=t.apiChartThemeOverrides,f=oh(t.chartType),_=t.crossFiltering?e5i(e,t,f):void 0,E=[c?i5i(t,n,(()=>{let M=I=>I?Object.keys(I).some(z=>HE(I[z],"title.enabled",!1)):!1;return M(u)||M(m)})()):void 0,i,_,u,m,ve({},s??{}),r].filter(M=>!!M).reduce((M,I)=>({baseTheme:M,overrides:I}),d);if(o&&l===a){let M=Lm.getChartTheme(d).palette;J_i(o,M)||(E.palette=o)}return E}function J_i(t,e){let n=(i,r)=>i===r?!0:i?.length!==r?.length?!1:i?.every((s,o)=>s===r?.[o])??!1;return n(t.fills,e.fills)&&n(t.strokes,e.strokes)}function ube(t){return Sl(Object.keys(Lm.themes),t)}function e5i(t,e,n){let i={listeners:{legendItemClick:r=>{t.getChart().series.forEach(o=>{o.toggleSeriesItem(r.itemId,r.enabled),o.toggleSeriesItem(`${r.itemId}-filtered-out`,r.enabled)})}}};return{[n]:{tooltip:{delay:500},legend:i,listeners:{click:r=>e.crossFilterCallback(r,!0)}}}}function i5i(t,e,n){let i=t.getExtraPaddingDirections();return{common:St(ve({},e?{animation:{duration:500}}:void 0),{axes:t5i,padding:{top:!n&&i.includes("top")?40:20,right:i.includes("right")?30:20,bottom:i.includes("bottom")?40:20,left:i.includes("left")?30:20}}),pie:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}},donut:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}}}}function n5i(t){let e=t.getChartThemeName(),n=t.getChartThemes();return Sl(n,e)||(e=n[0]),e}function wot(t,e){let{customChartThemes:n}=t,i=n&&n[e];return i||wt(`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`),i}function Jte(t,e,n,i){let r;for(let s of e){let{property:o,validationFn:a,warnMessage:l,warnIfFixed:c}=s;if(o in t){let d=t[o],u=a(d);if(u===!0)continue;if(u===!1)return wt(l(d)),!1;r=r||ve({},t),r[o]=u,c&&wt(l(d))}}if(n){for(let s in t)if(!n.includes(s))return wt(`Unexpected property supplied. ${i} does not contain: \`${s}\`.`),!1}return r||!0}function yst(t){return t.chart!=null?t.chart:t}function _st(t,e){let n=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16);return e?`rgba(${n}, ${i}, ${r}, ${e})`:`rgba(${n}, ${i}, ${r})`}function Cst(t,e){return t.map(n=>{let i=Zl.Color.fromString(n);return new Zl.Color(i.r,i.g,i.b,e).toHexString()})}function _5i(t,e){let n=Iot(t,i,r);return hbe(n);function i(o){return e.length}function r(o,a){let l=e[a],c=o[l];return s(c)}function s(o){return o==null?null:String(o)}}function C5i(t,e){let n=Iot(t,i,r);return hbe(n);function i(s){return e(s)?.length??0}function r(s,o){let a=e(s);if(!a)return null;let l=a.length-1-o;return a[l]}}function hbe(t,e=null,n){let{depth:i,rootValues:r,value:s,children:o}=t;if(r)return r.map(l=>ve({[rie]:e},l));if(i===0)return[ve({[rie]:e},s)];let a=[];for(let[l,c]of o.entries())a.push(...hbe(c,l,!0));return n?[ve({[rie]:e,children:a},s??{})]:a}function Iot(t,e,n){let i={depth:0,children:new Map};return t.forEach(s=>{let o=e(s);r(s,o,n,0,i)}),i;function r(s,o,a,l,c){if(l===o)return l===0?(c.rootValues||(c.rootValues=[]),c.rootValues.push(s)):c.value=s,c;{let d=a(s,l),u=c.children.get(d),m=r(s,o,a,l+1,u||{depth:0,children:new Map});return c.children.set(d,m),c.depth=Math.max(1+m.depth,c.depth),c}}}function b5i(t){let e=t.currentOffset;t.currentOffset-=t.offsetAmount;let n=t.currentOffset;return t.currentOffset-=t.offsetAmount,{outerRadiusOffset:e,innerRadiusOffset:n}}function T5i(t,e){return t.reduce((n,i,r,s)=>n.concat(e(i,r,s)),new Array)}function I5i(t){let{xKey:e,yKey:n,colorKey:i,yName:r,datum:s}=t;return{title:"",content:[{label:r,value:s[n]},{label:s[e],value:i&&s[i]}].map(({label:l,value:c})=>`<b>${xst(String(l))}:</b> ${xst(String(c))}`).join("<br>")}}function xst(t){let e={"&":"&amp;","<":"&lt;",">":"&gt;"},n=`[${Object.keys(e).join("")}]`,i=new RegExp(n,"g");return t.replace(i,r=>e[r])}function Rot(t){return["square","circle","cross","diamond","plus","triangle","heart"].map(e=>({value:e,text:t.translate(e)}))}function pW(t){let{stacked:e,size:n,padding:i,xScalePadding:r,xScaleDomain:s,yScaleDomain:o}=t,a=new Wi.BandScale;a.domain=s,a.range=[i,n-i],a.paddingInner=r,a.paddingOuter=r;let l=new Wi.LinearScale;l.domain=o,l.range=[n-i,i];let c=(d,u,m)=>d.map((f,_)=>{let x=m.convert(f),D=new Wi.Rect;return D.x=u.convert(_),D.y=x,D.width=u.bandwidth,D.height=m.convert(0)-x,D.strokeWidth=0,D.crisp=!0,D});return e?t.data.map(d=>c(d,a,l)):c(t.data,a,l)}function pbe(t,e,n,i){let r=new Wi.LinearScale;r.domain=[0,4],r.range=[i,n-i];let s=new Wi.LinearScale;s.domain=[0,10],s.range=[n-i,i];let o=e.map(l=>{let c=new Wi.Path;return c.strokeWidth=3,c.lineCap="round",c.fill=void 0,l.forEach((d,u)=>{c.path[u>0?"lineTo":"moveTo"](r.convert(u),s.convert(d))}),c}),a=new Wi.Group;return a.setClipRectInGroupCoordinateSpace(new Wi.BBox(i,i,n-i*2,n-i*2)),a.append(o),t.append(a),o}function Fot(t,e,n,i,r,s=0){let o=new Wi.LinearScale;o.domain=[0,7],o.range=[-Math.PI,Math.PI].map(m=>m+Math.PI/2);let a=new Wi.LinearScale;a.domain=[0,10],a.range=[i,r];let l=[],c=e.map(m=>{let f=new Wi.Path;return f.strokeWidth=1,f.strokeOpacity=.5,f.lineCap="round",f.fill=void 0,f.fillOpacity=.8,m.forEach((_,x)=>{let D=o.convert(x),E=i+r-a.convert(_),M=E*Math.cos(D),I=E*Math.sin(D);if(f.path[x>0?"lineTo":"moveTo"](M,I),s>0){let z=new Wi.Circle;z.x=M,z.y=I,z.size=s,l.push(z)}}),f.path.closePath(),f}),d=new Wi.Group,u=n/2;return d.translationX=u,d.translationY=u,d.append([...c,...l]),t.append(d),{paths:c,markers:l}}function xie(t){let[e,n]=[1/0,-1/0];return{processedData:t.reduce((r,s,o)=>{let a=o>0?r[o-1]:void 0;r[o]??(r[o]=[]);let l=r[o];return s.forEach((c,d)=>{a&&(c+=a[d]),l[d]=c,l[d]<e&&(e=l[d]),l[d]>n&&(n=l[d])}),r},[]),min:e,max:n}}function Txe(t){let{offset:e,length:n,pattern:i}=t,r=a(e,n,i),s=0,o=n;return(r.length===0||r[0][0]!==s)&&r.unshift(l(s,e,i)),r[r.length-1][0]!==o&&r.push(l(o,e,i)),r;function a(d,u,m){let{period:f}=m,_=d/f,D=[0,.5].map(M=>M-_).map(bst).sort((M,I)=>M-I);return Array.from({length:Math.floor(D.length*(f/u))},(M,I)=>D[I%D.length]+Math.floor(I/D.length)).map(M=>M*f).map(M=>l(M,d,m))}function l(d,u,m){return[d,c(u+d,m)]}function c(d,u){let{low:m,high:f,period:_}=u,x=bst(d/_),D=x>.5?1-2*(x-.5):2*x;return m+(f-m)*D}}function bst(t){let e=t%1;return e<0?e+1:e}function wst(t,e,n){let i=[...t],r=i[e];return i[e]=i[n],i[n]=r,i}function i8i(t,e){return b_i(t)&&e.type===t}function r8i(t){let e=t.version;return t.version==null&&(t.version=y8i(t)),t=Vg("23.0.0",t,s8i),t=Vg("24.0.0",t,o8i),t=Vg("25.1.0",t,a8i),t=Vg("26.0.0",t,l8i),t=Vg("26.1.0",t,c8i),t=Vg("26.2.0",t,d8i),t=Vg("28.0.0",t,u8i),t=Vg("28.2.0",t,h8i),t=Vg("29.0.0",t,p8i),t=Vg("29.1.0",t,$ot),t=Vg("29.2.0",t,Kot),t=Vg("30.0.0",t,m8i),t=Vg("31.0.0",t,f8i),t=Vg("32.0.0",t,g8i),t=v8i(t),t=Vg(UE,t,n=>n),uW&&e!==t.version&&console.log("AG Grid: ChartModel migration complete",{model:t}),t}function s8i(t){return t=zg("chartOptions.legend.item.marker.type","shape",t),t=zg("chartOptions.seriesDefaults.marker.type","shape",t),t=zg("chartOptions.legend.padding","spacing",t),t}function o8i(t){t=E2("chartOptions.seriesDefaults.marker.minSize",t);let d=t,{chartType:e,chartPalette:n,chartOptions:u}=d,m=u,{xAxis:i,yAxis:r}=m,s=al(m,["xAxis","yAxis"]),o=al(d,["chartType","chartPalette","chartOptions"]),l=Z_i(e)?.map((f,_)=>ve({type:f},_===0?i:r));return ve({chartType:e,chartThemeName:{borneo:"ag-default",material:"ag-material",bright:"ag-vivid"}[n]??"ag-default",chartOptions:St(ve({},s),{axes:l,xAxis:i,yAxis:r})},o)}function a8i(t){return t=zg("chartOptions.seriesDefaults.label.minRequiredAngle","minAngle",t),t}function l8i(t){return t=ib("chartOptions.seriesDefaults.highlightStyle",t,r=>{var s=r,{dimOpacity:n}=s,i=al(s,["dimOpacity"]);return ve(ve({},i),n!=null?{series:{dimOpacity:n}}:{})}),t=E2("chart",t),t=E2("chartOptions.seriesDefaults.tooltipClass",t),t=E2("chartOptions.seriesDefaults.tooltipTracking",t),t=Dst("chartOptions.axes[].label.rotation",0,t),t=Dst("chartOptions.axes[].label.rotation",335,t),t}function c8i(t){let e=s=>{var o=s,{item:n,series:i}=o,r=al(o,["item","series"]);return ve({item:ve(ve({},r),n)},i?{series:i}:{})};return t=ib("chartOptions.seriesDefaults.highlightStyle",t,e),t=ib("chartOptions.series[].highlightStyle",t,e),t}function d8i(t){t=sie("chartOptions.seriesDefaults.fill.opacity","chartOptions.seriesDefaults.fillOpacity",t),t=sie("chartOptions.seriesDefaults.stroke.opacity","chartOptions.seriesDefaults.strokeOpacity",t),t=sie("chartOptions.seriesDefaults.stroke.width","chartOptions.seriesDefaults.strokeWidth",t),t=E2("chartOptions.seriesDefaults.fill",t),t=E2("chartOptions.seriesDefaults.stroke",t),t=E2("chartOptions.seriesDefaults.callout.colors",t),t=E2("chartOptions.xAxis",t),t=E2("chartOptions.yAxis",t);let m=t,{chartType:e,chartOptions:f}=m,_=f,{axes:n,series:i,seriesDefaults:r}=_,s=al(_,["axes","series","seriesDefaults"]),o=al(m,["chartType","chartOptions"]),a=dW(e),l=oh(a),c=[l],d={};if(!vot(l)){let x={top:{},bottom:{},left:{},right:{}},D=n.map(I=>{var z=I,{type:E}=z,M=al(z,["type"]);return{[E]:ve(ve({},x),M)}}).reduce(Est,{});bot.filter(E=>D[E]==null).forEach(E=>{D[E]=ve({},x)}),d.axes=D}let u=c.map(x=>({[x]:ve(St(ve({},d),{series:r}),s)})).reduce(Est,{});return t=St(ve({},o),{chartType:a,chartOptions:u}),t}function u8i(t){return t=E2("chartOptions.*.title.padding",t),t=E2("chartOptions.*.subtitle.padding",t),t=E2("chartOptions.*.axes.*.title.padding",t),t=gbe("chartOptions.*.axes.*.title.enabled",!1,t),t}function h8i(t){return t=zg("chartOptions.pie.series.callout","calloutLine",t),t=zg("chartOptions.pie.series.label","calloutLabel",t),t=zg("chartOptions.pie.series.labelKey","sectorLabelKey",t),t=zg("chartOptions.pie.series.labelName","sectorLabelName",t),t=zg("chartOptions.donut.series.callout","calloutLine",t),t=zg("chartOptions.donut.series.label","calloutLabel",t),t=zg("chartOptions.donut.series.labelKey","sectorLabelKey",t),t=zg("chartOptions.donut.series.labelName","sectorLabelName",t),t}function p8i(t){return t=JG("chartOptions.scatter.series.fill","chartOptions.scatter.series.marker.fill",t),t=JG("chartOptions.scatter.series.fillOpacity","chartOptions.scatter.series.marker.fillOpacity",t),t=JG("chartOptions.scatter.series.stroke","chartOptions.scatter.series.marker.stroke",t),t=JG("chartOptions.scatter.series.strokeOpacity","chartOptions.scatter.series.marker.strokeOpacity",t),t=JG("chartOptions.scatter.series.strokeWidth","chartOptions.scatter.series.marker.strokeWidth",t),t=sie("chartOptions.scatter.series.paired","chartOptions.scatter.paired",t),t}function $ot(t){return t=E2("chartOptions.axes[].tick.count",t),t}function Kot(t){return t=ib("chartOptions.*.tooltip",t,r=>{var s=r,{tracking:n}=s,i=al(s,["tracking"]);let o=ve({},i);return n===!1?(o.position??(o.position={type:"pointer"}),o.range??(o.range="nearest")):n===!0&&(o.position??(o.position={type:"node"}),o.range??(o.range="nearest")),o}),t}function m8i(t){return t=zg("chartOptions.pie.series.labelKey","sectorLabelKey",t),t=zg("chartOptions.pie.series.labelName","sectorLabelName",t),t=$ot(t),t=Kot(t),t=E2("chartOptions.*.series.flipXY",t),t=Yot("chartOptions.common.legend.enabled",!0,t),t=gbe("chartOptions.common.legend.position","right",t),t}function f8i(t){let e={"ag-pastel":"ag-sheets","ag-solar":"ag-polychroma"},n=zg("chartOptions.column","bar",t),i=e[n.chartThemeName]||n.chartThemeName;return St(ve({},n),{chartThemeName:i})}function g8i(t){return t=rb("chartOptions.*.autoSize",!0,t,(e,n)=>{e[n]===!0||e[n]===!1&&(e.minHeight=600,e.minWidth=300),delete e[n]}),t}function v8i(t){return t=E2("chartOptions.*.width",t),t=E2("chartOptions.*.height",t),t=gbe("chartOptions.*.axes.category.label.autoRotate",!0,t),t}function y8i(t){let e=t;if(t.version!=null)return t.version;let n=(c,...d)=>Object.keys(c||{}).some(u=>d.includes(u)),i=e.chartOptions,r=n(i,"seriesDefaults")?i?.seriesDefaults:i?.[Object.keys(i)[0]],s={"27.0.0":n(e,"seriesChartTypes"),"26.2.0":!n(i,"seriesDefaults"),"26.1.0":n(r?.highlightStyle,"item"),"26.0.0":n(r?.highlightStyle,"series"),"25.1.0":n(r?.label,"minAngle"),"25.0.0":n(e,"modelType","aggFunc","unlinkChart","suppressChartRanges")||n(r,"lineDash","lineDashOffset"),"24.0.0":n(e,"chartThemeName","chart")||n(i,"series"),"23.2.0":n(i,"navigator"),"23.0.0":n(i?.legend?.item?.marker,"shape"),"22.1.0":n(e,"chartPalette","chartType")},o="27.1.0",a=Object.entries(s).filter(([c,d])=>d);uW&&console.log("AG Grid: ChartModel migration",{heuristicVersionCandidates:a});let[l=o]=a[0];return uW&&console.log("AG Grid: ChartModel migration",{heuristicVersion:l}),l}function Vg(t,e,n){if(Tst(t)>Tst(e.version)){uW&&console.log("AG Grid: ChartModel migration",{migratingTo:t});let i=n(e);return i.version=t,uW&&console.log("AG Grid: ChartModel migration",{migratedTo:t,result:i}),i}return e}function _8i(t){let e=typeof t=="string"?t.split(".").map(n=>Number(n)):[];if(e.length!==3||e.some(n=>isNaN(n)))throw new Error("AG Grid - Illegal version string: "+t);return{major:e[0],minor:e[1],patch:e[2]}}function Tst(t){let{major:e,minor:n,patch:i}=_8i(t);return e*1e4+n*100+i}function Dst(t,e,n){return rb(t,!0,n,(i,r)=>{i[r]===e&&delete i[r]})}function gbe(t,e,n){return rb(t,!1,n,(i,r)=>{i[r]==null&&(i[r]=e)})}function Yot(t,e,n){typeof t=="string"&&(t=t.split("."));let i=t[0];return t.length>1&&(n[i]=Yot(t.slice(1),e,n[i]??{})),Object.keys(n).includes(i)||(n[i]=e),n}function sie(t,e,n){let i,r=!1;return n=rb(t,!0,n,(s,o)=>{r=!0,i=s[o],delete s[o]}),r?rb(e,!1,n,(s,o)=>{s[o]=i}):n}function JG(t,e,n){let i,r=!1;return n=rb(t,!0,n,(s,o)=>{r=!0,i=s[o],delete s[o]}),r?rb(e,!1,n,(s,o)=>{s[o]===void 0&&(s[o]=i)}):n}function zg(t,e,n){return rb(t,!0,n,(i,r)=>{i[e]=i[r],delete i[r]})}function E2(t,e){return rb(t,!0,e,(n,i)=>delete n[i])}function rb(t,e,n,i){let r=t instanceof Array?t:t.split("."),s=r.slice(0,r.length-1),o=r[r.length-1];return ib(s,n,a=>{let l=Object.keys(a).includes(o);if(e&&!l)return a;let c=ve({},a);return i(c,o),c})}function ib(t,e,n){let i=t instanceof Array?t:t.split(".");if(e=ve({},e),i.length===0)return n(e);if(i[0].startsWith("{")){let r=i[0].substring(1,i[0].lastIndexOf("}")).split(",");for(let s of r)e[s]!=null&&(e[s]=ib(i.slice(1),e[s],n))}else if(i[0].endsWith("[]")){let r=i[0].substring(0,t[0].indexOf("["));e[r]instanceof Array&&(e[r]=e[r].map(s=>ib(i.slice(1),s,n)))}else if(i[0]==="*")for(let r in e)e[r]=ib(i.slice(1),e[r],n);else e[i[0]]!=null&&(e[i[0]]=ib(i.slice(1),e[i[0]],n));return e}function C8i(t){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.getChartModels())}function x8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.getChartRef(e))}function b8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.getChartImageDataURL(e))}function w8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.downloadChart(e))}function S8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.openChartToolPanel(e))}function T8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.closeChartToolPanel(e.chartId))}function D8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.createRangeChart(e,!0))}function E8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.createPivotChart(e,!0))}function M8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.createCrossFilterChart(e,!0))}function k8i(t,e){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.updateChart(e))}function I8i(t,e,n){return t.frameworkOverrides.wrapIncoming(()=>t.chartService?.restoreChart(e,n))}function Gxe(t){return t&&t.match(/\d+\.\d+\.\d+/)}function A8i({gridMajorVersion:t,chartsMajorVersion:e}){let n=parseInt(t,10),i=parseInt(e,10),r=n-qot,s=i-Zot,o=r>=0;return r===s&&o}function P8i(t){if(!t||!Gxe(t))return;let[e,n]=t.split(".")||[],i=`${e}.${n}.x`,s=parseInt(e,10)-qot+Zot;if(s<0)return;let a=`${s}.${n}.x`;return{gridMajorMinor:i,chartsMajorMinor:a}}function tie({type:t,gridVersion:e,chartsVersion:n}){let i="AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.";if(!e)return i;let r=P8i(e);if(!r)return i;let{gridMajorMinor:s,chartsMajorMinor:o}=r;return t==="incompatible"?`AG Grid version ${e} and AG Charts version ${n} is not supported. AG Grid version ${s} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:t==="invalidCharts"?`AG Grid version ${s} should be used with AG Chart ${o}. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.`:i}function R8i({gridVersion:t,chartsVersion:e}){if(!Gxe(e))return{isValid:!1,message:tie({type:"invalidCharts",gridVersion:t,chartsVersion:e})};if(!Gxe(t))return{isValid:!1,message:tie({type:"invalidGrid",gridVersion:t,chartsVersion:e})};let[n,i]=t.split(".")||[],[r,s,o]=e.split(".")||[],a=A8i({gridMajorVersion:n,chartsMajorVersion:r});return a&&i===s||o.includes("beta")?{isValid:!0}:!a||i!==s?{isValid:!1,message:tie({type:"incompatible",gridVersion:t,chartsVersion:e})}:{isValid:!1,message:tie({type:"invalid",gridVersion:t,chartsVersion:e})}}function L8i(t,e){t.clipboardService?.copyToClipboard(e)}function O8i(t,e){t.clipboardService?.cutToClipboard(e)}function N8i(t,e){t.clipboardService?.copySelectedRowsToClipboard(e)}function V8i(t,e){t.clipboardService?.copySelectedRangeToClipboard(e)}function B8i(t){t.clipboardService?.copyRangeDown()}function z8i(t){t.clipboardService?.pasteFromClipboard()}function j8i(t){let{values:e}=t,n=null;for(let i=0;i<e.length;i++){let r=e[i];typeof r=="number"?n===null?n=r:n+=typeof n=="number"?r:BigInt(r):typeof r=="bigint"&&(n===null?n=r:n=(typeof n=="bigint"?n:BigInt(n))+r)}return n}function $8i(t){return t.values.length>0?t.values[0]:null}function K8i(t){return t.values.length>0?Ar(t.values):null}function Y8i(t){let{values:e}=t,n=null;for(let i=0;i<e.length;i++){let r=e[i];(typeof r=="number"||typeof r=="bigint")&&(n===null||n>r)&&(n=r)}return n}function q8i(t){let{values:e}=t,n=null;for(let i=0;i<e.length;i++){let r=e[i];(typeof r=="number"||typeof r=="bigint")&&(n===null||n<r)&&(n=r)}return n}function Z8i(t){let{values:e}=t,n=0;for(let r=0;r<e.length;r++){let s=e[r];n+=s!=null&&typeof s.value=="number"?s.value:1}let i=t.rowNode?.aggData?.[t.column.getColId()];return i&&i.value===n?i:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function X8i(t){let{values:e}=t,n=0,i=0;for(let o=0;o<e.length;o++){let a=e[o],l=null;typeof a=="number"||typeof a=="bigint"?(l=a,i++):a!=null&&(typeof a.value=="number"||typeof a.value=="bigint")&&typeof a.count=="number"&&(l=a.value*(typeof a.value=="number"?a.count:BigInt(a.count)),i+=a.count),typeof l=="number"?n+=typeof n=="number"?l:BigInt(l):typeof l=="bigint"&&(n=(typeof n=="bigint"?n:BigInt(n))+l)}let r=null;i>0&&(r=n/(typeof n=="number"?i:BigInt(i)));let s=t.rowNode?.aggData?.[t.column?.getColId()];return s&&s.count===i&&s.value===r?s:{count:i,value:r,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}function Mxe(t,e){return e?e.getId()+"-"+t:t}function uxi(t,e){let n=[],i=new Map,r=new Set;for(let a=0;a<e.length;a++){let l=e[a],c=l.id;i.set(c,l),r.add(c)}let s=[t],o=0;for(;o<s.length;){let a=s[o];if(o++,a===void 0)continue;let{id:l,childrenAfterGroup:c}=a,d=l&&i.get(l);if(d&&(n.push(d),r.delete(l)),r.size===0)return n;if(c)for(let u=0;u<c.length;u++)s.push(c[u])}return n}function fxi(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function gxi(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function vxi(t){t.aggFuncService&&t.aggFuncService.clear()}function yxi(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function _xi(t){return t.columnModel.isPivotMode()}function Cxi(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function xxi(t,e){t.funcColsService.setValueColumns(e,"api")}function bxi(t){return t.funcColsService.getValueColumns()}function wxi(t,e){t.funcColsService.removeValueColumns([e],"api")}function Sxi(t,e){t.funcColsService.removeValueColumns(e,"api")}function Txi(t,e){t.funcColsService.addValueColumns([e],"api")}function Dxi(t,e){t.funcColsService.addValueColumns(e,"api")}function Exi(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function Mxi(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function kxi(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function Ixi(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function Axi(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function Pxi(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function Rxi(t){return t.funcColsService.getRowGroupColumns()}function Fxi(t,e){t.funcColsService.setPivotColumns(e,"api")}function Lxi(t,e){t.funcColsService.removePivotColumns([e],"api")}function Oxi(t,e){t.funcColsService.removePivotColumns(e,"api")}function Nxi(t,e){t.funcColsService.addPivotColumns([e],"api")}function Vxi(t,e){t.funcColsService.addPivotColumns(e,"api")}function Bxi(t){return t.funcColsService.getPivotColumns()}function zxi(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function Hxi(t){let e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}function jxi(t){return t.sideBarService?.getSideBarComp().isDisplayed()??!1}function $xi(t,e){t.sideBarService?.getSideBarComp().setDisplayed(e)}function Kxi(t,e){t.sideBarService?.getSideBarComp().setSideBarPosition(e)}function Yxi(t,e){t.sideBarService?.getSideBarComp().openToolPanel(e,"api")}function qxi(t){t.sideBarService?.getSideBarComp().close("api")}function Zxi(t){return t.sideBarService?.getSideBarComp().openedItem()??null}function Xxi(t){t.sideBarService?.getSideBarComp().refresh()}function Qxi(t){return t.sideBarService?.getSideBarComp().isToolPanelShowing()??!1}function Jxi(t,e){let n=t.sideBarService?.getSideBarComp().getToolPanelInstance(e);return cx(n)}function ebi(t){return t.sideBarService?.getSideBarComp().getDef()}function Uxe(t){if(!t)return;if(t===!0)return{toolPanels:[sat,oat],defaultToolPanel:"columns"};if(typeof t=="string")return Uxe([t]);if(Array.isArray(t)){let n=[];return t.forEach(i=>{let r=bbe[i];if(!r){aat(i);return}n.push(r)}),n.length===0?void 0:{toolPanels:n,defaultToolPanel:n[0].id}}return{toolPanels:rbi(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}function aat(t){wt(`the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(bbe).join(",")}`)}function rbi(t){let e=[];return t&&t.forEach(n=>{let i=null;if(typeof n=="string"){let r=bbe[n];if(!r){aat(n);return}i=r}else i=n;e.push(i)}),e}function k7i(t){let e=t.split(/(\[[^\]]*\])/);for(let n=0;n<e.length;n++){let i=e[n];i.length&&(i.startsWith("[")||(i=i.replace(/\$/g,'"$"')),e[n]=nl(i))}return e.join("")}function cwi(t,e,n,i,r){return(t-e)/(n-e)*(r-i)+i}function bat(t){return t.excelCreator?.getFactoryMode()===_D.MULTI_SHEET?(wt("The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1):!0}function dSi(t,e){if(bat(t))return t.excelCreator?.getDataAsExcel(e)}function uSi(t,e){bat(t)&&t.excelCreator?.exportDataAsExcel(e)}function hSi(t,e){return t.excelCreator?.setFactoryMode(_D.MULTI_SHEET),t.excelCreator?.getSheetDataForExcel(e)}function pSi(t,e){return t.excelCreator?.getMultipleSheetsAsExcel(e)}function mSi(t,e){t.excelCreator?.exportMultipleSheetsAsExcel(e)}function SSi(t,e,n){t.detailGridApiService?.addDetailGridInfo(e,n)}function TSi(t,e){t.detailGridApiService?.removeDetailGridInfo(e)}function DSi(t,e){return t.detailGridApiService?.getDetailGridInfo(e)}function ESi(t,e){t.detailGridApiService?.forEachDetailGridInfo(e)}function zSi(t,e){let{rowNode:n,column:i,value:r,x:s,y:o}=e||{},{x:a,y:l}=t.menuService.getContextMenuPosition(n,i);s!=null&&(a=s),o!=null&&(l=o),t.menuService.showContextMenu({mouseEvent:new MouseEvent("mousedown",{clientX:a,clientY:l}),rowNode:n,column:i,value:r})}function HSi(t,e){t.menuService.showColumnChooser({chooserParams:e})}function GSi(t){t.menuService.hideColumnChooser()}function r9i(t){return t.selectionService.getSelectionState()}function s9i(t,e){t.selectionService.setSelectionState(e,"api")}function o9i(t,e){return t.ssrmTransactionManager?.applyTransaction(e)}function a9i(t,e){let n=e.startRow??0,i=e.route??[];if(n<0){wt(`invalid value ${e.startRow} for startRow, the value should be >= 0`);return}t.rowModelHelperService?.getServerSideRowModel()?.applyRowData(e.successParams,n,i)}function l9i(t,e,n){return t.ssrmTransactionManager?.applyTransactionAsync(e,n)}function c9i(t){t.rowModelHelperService?.getServerSideRowModel()?.retryLoads()}function d9i(t){return t.ssrmTransactionManager?.flushAsyncTransactions()}function u9i(t,e){t.rowModelHelperService?.getServerSideRowModel()?.refreshStore(e)}function h9i(t){return t.rowModelHelperService?.getServerSideRowModel()?.getStoreState()??[]}function Ust(t){(t.justCurrentPage||t.justFiltered)&&wt("selecting just filtered only works when gridOptions.rowModelType='clientSide'")}function Zxe(t,e,n){let i=t;return i?(i=i.map(r=>G1(xu(r))),!e&&n&&i.some(r=>r==null)?Ar(i)==null?null:i.filter(r=>r!=null):i):null}function gie(t,e="solid"){let n={solid:[],dash:[4,3],dot:[1,3],dashDot:[4,3,1,3],dashDotDot:[4,3,1,3,1,3],shortDot:[1,1],shortDash:[3,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],longDash:[8,3],longDashDot:[8,3,1,3],longDashDotDot:[8,3,1,3,1,3]},i={solid:[],dash:[3,3],dot:[0,3],dashDot:[3,3,0,3],dashDotDot:[3,3,0,3,0,3],shortDot:[0,2],shortDash:[2,2],shortDashDot:[2,2,0,2],shortDashDotDot:[2,2,0,2,0,2],longDash:[7,3],longDashDot:[7,3,0,3],longDashDotDot:[7,3,0,3,0,3]};return t==="round"||t==="square"?i[e]==null?(jst(e),i.solid):i[e]:n[e]==null?(jst(e),n.solid):n[e]}function jst(t){wt(`'${t}' is not a valid 'lineDash' option.`)}function jat(t){switch(t){case"circle":return Wi.Circle;case"square":return Wi.Square;case"diamond":return Wi.Diamond;default:return Wi.Circle}}function qR(t,e){if(typeof t=="string")return t;e=e??{};let{content:n=e.content??"",title:i=e.title??void 0,color:r=e.color,backgroundColor:s=e.backgroundColor,opacity:o=e.opacity??1}=t,a,l;r?(a=i?`<span class="${tb}-title"; style="color: ${r}">${i}</span>`:"",l=`<span class="${tb}-content" style="color: ${r}">${n}</span>`):(a=i?`<span class="${tb}-title">${i}</span>`:"",l=`<span class="${tb}-content">${n}</span>`);let c=`opacity: ${o}`;return s&&(c+=`; background-color: ${s.toLowerCase()}`),`<div class="${tb}" style="${c}">
                ${a}
                ${l}
            </div>`}function lTi(t="line"){switch(t){case"column":return new eTi;case"bar":return new Q9i;case"area":return new K9i;case"line":default:return new sTi}}function cTi(t,e){switch(e.type){case"bar":Xst(t,e);break;case"column":Xst(t,e);break;case"area":hTi(t,e);break;case"line":default:uTi(t,e);break}}function dTi(t,e){ya(t,"context",e.context,e),ya(t,"width",e.width,e),ya(t,"height",e.height,e),ya(t,"container",e.container,e),ya(t,"xKey",e.xKey,e),ya(t,"yKey",e.yKey,e),e.padding&&pTi(t.padding,e.padding),e.axis&&fTi(t.axis,e.axis),e.highlightStyle&&gTi(t.highlightStyle,e.highlightStyle)}function uTi(t,e){e.marker&&Kat(t.marker,e.marker),e.line&&Yat(t.line,e.line),e.crosshairs&&qat(t.crosshairs,e.crosshairs)}function hTi(t,e){ya(t,"fill",e.fill,e),e.marker&&Kat(t.marker,e.marker),e.line&&Yat(t.line,e.line),e.crosshairs&&qat(t.crosshairs,e.crosshairs)}function Xst(t,e){ya(t,"valueAxisDomain",e.valueAxisDomain,e),ya(t,"fill",e.fill,e),ya(t,"stroke",e.stroke,e),ya(t,"strokeWidth",e.strokeWidth,e),ya(t,"paddingInner",e.paddingInner,e),ya(t,"paddingOuter",e.paddingOuter,e),ya(t,"formatter",e.formatter,e),e.label&&mTi(t.label,e.label)}function pTi(t,e){ya(t,"top",e.top,e),ya(t,"right",e.right,e),ya(t,"bottom",e.bottom,e),ya(t,"left",e.left,e)}function Kat(t,e){ya(t,"enabled",e.enabled,e),ya(t,"size",e.size,e),ya(t,"shape",e.shape,e),ya(t,"fill",e.fill,e),ya(t,"stroke",e.stroke,e),ya(t,"strokeWidth",e.strokeWidth,e),ya(t,"formatter",e.formatter,e)}function mTi(t,e){ya(t,"enabled",e.enabled,e),ya(t,"fontStyle",e.fontStyle,e),ya(t,"fontWeight",e.fontWeight,e),ya(t,"fontSize",e.fontSize,e),ya(t,"fontFamily",e.fontFamily,e),ya(t,"textAlign",e.textAlign,e),ya(t,"textBaseline",e.textBaseline,e),ya(t,"color",e.color,e),ya(t,"formatter",e.formatter,e),ya(t,"placement",e.placement,e)}function Yat(t,e){ya(t,"stroke",e.stroke,e),ya(t,"strokeWidth",e.strokeWidth,e)}function fTi(t,e){ya(t,"type",e.type,e),ya(t,"stroke",e.stroke,e),ya(t,"strokeWidth",e.strokeWidth,e)}function gTi(t,e){ya(t,"fill",e.fill,e),ya(t,"size",e.size,e),ya(t,"stroke",e.stroke,e),ya(t,"strokeWidth",e.strokeWidth,e)}function qat(t,e){t.xLine&&e.xLine&&Qst(t.xLine,e.xLine),t.yLine&&e.yLine&&Qst(t.yLine,e.yLine)}function Qst(t,e){ya(t,"enabled",e.enabled,e),ya(t,"stroke",e.stroke,e),ya(t,"strokeWidth",e.strokeWidth,e),ya(t,"lineDash",e.lineDash,e),ya(t,"lineCap",e.lineCap,e)}function ya(t,e,n,i){if(e in i)if(e in t){let r=vTi[e];(r?r(e,n,t[e]):!0)&&t[e]!==n&&(t[e]=n)}else wt(`Property ${e} does not exist on the target object.`)}function ETi(t,e){let n=t.statusBarService.getStatusPanel(e);return cx(n)}var eot,vyi,yyi,_yi,tot,hst,iot,not,Cyi,Xte,pst,xyi,Qte,byi,wyi,vie,Syi,KE,y1,uC,xxe,Eyi,ah,Myi,kyi,Iyi,YE,mst,fst,Pyi,yie,Qxe,Jxe,Fyi,ebe,ZR,XR,sot,lie,bxe,tbe,ibe,_ie,Oyi,cW,Hyi,Uyi,jyi,$yi,GE,gst,wxe,Kyi,Yyi,qyi,Zyi,Xyi,Qyi,oot,Jyi,e_i,aot,lot,t_i,i_i,n_i,r_i,s_i,Sxe,o_i,a_i,l_i,c_i,d_i,u_i,sbe,uot,h_i,hot,obe,g_i,pot,y_i,__i,C_i,abe,mot,x_i,lbe,fot,S_i,_ot,k_i,I_i,A_i,P_i,R_i,Cot,hC,F_i,L_i,O_i,Y4,N3,N_i,V_i,B_i,z_i,H_i,G_i,W_i,U_i,j_i,$_i,nie,K_i,Y_i,q_i,UE,bot,t5i,r5i,s5i,o5i,a5i,l5i,nb,QR,vst,Dot,c5i,eb,Eot,If,Mot,kot,d5i,hW,Hw,u5i,h5i,p5i,m5i,f5i,g5i,v5i,y5i,rie,x5i,w5i,S5i,D5i,E5i,M5i,k5i,Aot,A5i,P5i,R5i,F5i,L5i,O5i,Pot,N5i,V5i,jE,B5i,z5i,H5i,G5i,W5i,U5i,$E,j5i,$5i,K5i,eie,Y5i,q5i,Z5i,X5i,Q5i,J5i,eCi,tCi,iCi,nCi,rCi,sCi,oCi,aCi,Om,F3,$4,T2,K4,H0,BE,lCi,nW,cCi,dCi,uCi,hCi,pCi,mCi,JR,M2,fCi,gCi,Oot,vCi,yCi,_Ci,CCi,Bot,xCi,bCi,N6,zxe,wCi,SCi,TCi,DCi,ECi,MCi,kCi,mbe,fbe,ICi,ACi,eF,PCi,RCi,FCi,LCi,OCi,NCi,VCi,BCi,zCi,HCi,GCi,WCi,UCi,jCi,$Ci,Sst,KCi,YCi,qCi,ZCi,XCi,QCi,Uot,JCi,e8i,t8i,n8i,uW,Est,Mst,qot,Zot,Xot,F8i,vbe,Qot,Dxe,Exe,kst,Ist,H8i,ybe,eat,G8i,tat,W8i,U8i,Q8i,J8i,exi,txi,_be,die,uie,ixi,nxi,rxi,sxi,oxi,axi,rW,lxi,cxi,dxi,hxi,Ast,pxi,Pst,mxi,Gxi,mW,Cbe,Wxi,nat,Uxi,xbe,Wxe,rat,tbi,ibi,nbi,sat,oat,bbe,sbi,obi,abi,lbi,cbi,wbe,lat,dbi,bie,Rst,ubi,hbi,Fst,cat,dat,pbi,mbi,fbi,gbi,vbi,ybi,Sbe,Lst,_bi,Cbi,xbi,uat,bbi,Ost,wbi,jR,Sbi,oie,Tbi,Dbi,Bg,YR,jxe,Ebi,Mbi,kbi,Ibi,Abi,Pbi,Rbi,Nst,Fbi,Lbi,Vst,Obi,Nbi,Vbi,Bbi,zbi,Hbi,Gbi,Wbi,Ubi,jbi,eW,$bi,Kbi,Ybi,qbi,Zbi,Xbi,Qbi,Jbi,e7i,Vw,iie,t7i,i7i,tW,n7i,r7i,s7i,o7i,a7i,l7i,c7i,d7i,u7i,h7i,hat,p7i,m7i,f7i,g7i,v7i,y7i,_7i,C7i,x7i,b7i,w7i,S7i,T7i,D7i,E7i,M7i,I7i,A7i,P7i,R7i,hie,KR,sW,oW,aW,pat,pie,mat,$xe,fat,gat,F7i,L7i,O7i,N7i,V7i,B7i,z7i,H7i,G7i,W7i,U7i,V6,j7i,$7i,sr,K7i,Y7i,dC,kxe,mie,Kxe,Ixe,Axe,q7i,Z7i,X7i,Q7i,J7i,ewi,twi,iwi,nwi,rwi,swi,owi,awi,lwi,vat,dwi,uwi,Bst,hwi,pwi,mwi,fwi,gwi,vwi,ywi,_wi,Cwi,xwi,bwi,wwi,Swi,Twi,Dwi,Ewi,Mwi,kwi,Iwi,Awi,Pwi,Rwi,Fwi,Lwi,Owi,Nwi,Vwi,Bwi,zwi,Hwi,Gwi,Wwi,Uwi,jwi,$wi,Kwi,Ywi,qwi,Zwi,Xwi,Qwi,Jwi,eSi,tSi,p_,rc,iSi,nSi,rSi,sSi,oSi,aSi,lSi,_at,Cat,Yxe,xat,cSi,Tbe,wat,fSi,Sat,gSi,vSi,Tat,Rw,ySi,_Si,CSi,xSi,Eat,Mat,bSi,wSi,Dbe,kat,MSi,Iat,kSi,ISi,ASi,PSi,$R,RSi,FSi,zst,LSi,OSi,Lw,Ow,Fw,aie,NSi,VSi,BSi,WSi,USi,Ebe,Pat,jSi,Rat,fie,$Si,Mbe,Lat,KSi,Oat,Hst,YSi,Nat,qSi,ZSi,XSi,QSi,JSi,e9i,t9i,qxe,Vat,i9i,Pxe,lW,n9i,p9i,Bat,Gst,Wst,m9i,f9i,g9i,v9i,kbe,zat,y9i,Hat,O3,_9i,C9i,Gat,x9i,b9i,w9i,S9i,T9i,D9i,Ibe,E9i,M9i,k9i,I9i,Abe,Wat,A9i,Uat,P9i,R9i,iW,F9i,L9i,$st,O9i,N9i,Rxe,V9i,Kst,B9i,z9i,Pbe,tb,H9i,G9i,W9i,U9i,j9i,$9i,K9i,Y9i,q9i,Z9i,$at,X9i,Yst,Q9i,J9i,qst,eTi,tTi,Zst,iTi,nTi,rTi,sTi,oTi,aTi,Jst,vTi,yTi,_Ti,CTi,Zat,fW,xTi,bTi,wTi,STi,TTi,DTi,MTi,kTi,ITi,Rbe,Xat,ATi,Qat,PTi,RTi,Jat,elt=Q(()=>{Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Ka();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Ka();Xt();Ka();Xt();Ka();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Ka();Xt();Xt();Ka();Xt();Ka();Xt();Xt();Xt();Xt();Xt();Ka();Ka();Xt();Ka();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Ka();Ka();Xt();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Ka();Xt();Ka();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Ka();Ka();Xt();Ka();Xt();Ka();Ka();Ka();Ka();Ka();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();Xt();eot=Object.defineProperty,vyi=Object.getOwnPropertyDescriptor,yyi=Object.getOwnPropertyNames,_yi=Object.prototype.hasOwnProperty,tot=(t,e)=>{for(var n in e)eot(t,n,{get:e[n],enumerable:!0})},hst=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yyi(e))!_yi.call(t,r)&&r!==n&&eot(t,r,{get:()=>e[r],enumerable:!(i=vyi(e,r))||i.enumerable});return t},iot=(t,e,n)=>(hst(t,e,"default"),n&&hst(n,e,"default")),not={};tot(not,{AdvancedFilterModule:()=>hot,AgDialog:()=>ZR,AgGroupComponent:()=>uC,AgGroupComponentSelector:()=>ah,AgMenuItemComponent:()=>lie,AgMenuItemRenderer:()=>KE,AgMenuList:()=>XR,AgMenuPanel:()=>sot,AgPanel:()=>ebe,AgPrimaryCols:()=>Sbe,AgRichSelect:()=>yie,ClipboardModule:()=>tat,ColumnsToolPanelModule:()=>uat,EnterpriseCoreModule:()=>y1,ExcelExportModule:()=>Sat,FiltersToolPanelModule:()=>Eat,GridChartsModule:()=>vbe,GroupCellRenderer:()=>cW,GroupCellRendererCtrl:()=>_ie,LicenseManager:()=>vie,MasterDetailModule:()=>Iat,MenuModule:()=>Rat,MultiFilter:()=>fie,MultiFilterModule:()=>Oat,PillDragComp:()=>Qxe,PillDropZonePanel:()=>Jxe,PivotDropZonePanel:()=>die,RangeSelectionModule:()=>lbe,RichSelectModule:()=>Nat,RowGroupDropZonePanel:()=>uie,RowGroupingModule:()=>xbe,ServerSideRowModelModule:()=>Hat,SetFilter:()=>Ibe,SetFilterModule:()=>Uat,SideBarModule:()=>bie,SparklinesModule:()=>Zat,StatusBarModule:()=>Qat,TabbedLayout:()=>ibe,ToolPanelColDefService:()=>rat,ValuesDropZonePanel:()=>Wxe,ViewportRowModelModule:()=>Jat,VirtualList:()=>YE,VirtualListDragFeature:()=>tbe,agCharts:()=>Qot,exportMultipleSheetsAsExcel:()=>xat,getMultipleSheetsAsExcel:()=>Yxe});Cyi=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(t,e){let n=t[0],i=t[1],r=t[2],s=t[3];n=this.ff(n,i,r,s,e[0],7,-680876936),s=this.ff(s,n,i,r,e[1],12,-389564586),r=this.ff(r,s,n,i,e[2],17,606105819),i=this.ff(i,r,s,n,e[3],22,-1044525330),n=this.ff(n,i,r,s,e[4],7,-176418897),s=this.ff(s,n,i,r,e[5],12,1200080426),r=this.ff(r,s,n,i,e[6],17,-1473231341),i=this.ff(i,r,s,n,e[7],22,-45705983),n=this.ff(n,i,r,s,e[8],7,1770035416),s=this.ff(s,n,i,r,e[9],12,-1958414417),r=this.ff(r,s,n,i,e[10],17,-42063),i=this.ff(i,r,s,n,e[11],22,-1990404162),n=this.ff(n,i,r,s,e[12],7,1804603682),s=this.ff(s,n,i,r,e[13],12,-40341101),r=this.ff(r,s,n,i,e[14],17,-1502002290),i=this.ff(i,r,s,n,e[15],22,1236535329),n=this.gg(n,i,r,s,e[1],5,-165796510),s=this.gg(s,n,i,r,e[6],9,-1069501632),r=this.gg(r,s,n,i,e[11],14,643717713),i=this.gg(i,r,s,n,e[0],20,-373897302),n=this.gg(n,i,r,s,e[5],5,-701558691),s=this.gg(s,n,i,r,e[10],9,38016083),r=this.gg(r,s,n,i,e[15],14,-660478335),i=this.gg(i,r,s,n,e[4],20,-405537848),n=this.gg(n,i,r,s,e[9],5,568446438),s=this.gg(s,n,i,r,e[14],9,-1019803690),r=this.gg(r,s,n,i,e[3],14,-187363961),i=this.gg(i,r,s,n,e[8],20,1163531501),n=this.gg(n,i,r,s,e[13],5,-1444681467),s=this.gg(s,n,i,r,e[2],9,-51403784),r=this.gg(r,s,n,i,e[7],14,1735328473),i=this.gg(i,r,s,n,e[12],20,-1926607734),n=this.hh(n,i,r,s,e[5],4,-378558),s=this.hh(s,n,i,r,e[8],11,-2022574463),r=this.hh(r,s,n,i,e[11],16,1839030562),i=this.hh(i,r,s,n,e[14],23,-35309556),n=this.hh(n,i,r,s,e[1],4,-1530992060),s=this.hh(s,n,i,r,e[4],11,1272893353),r=this.hh(r,s,n,i,e[7],16,-155497632),i=this.hh(i,r,s,n,e[10],23,-1094730640),n=this.hh(n,i,r,s,e[13],4,681279174),s=this.hh(s,n,i,r,e[0],11,-358537222),r=this.hh(r,s,n,i,e[3],16,-722521979),i=this.hh(i,r,s,n,e[6],23,76029189),n=this.hh(n,i,r,s,e[9],4,-640364487),s=this.hh(s,n,i,r,e[12],11,-421815835),r=this.hh(r,s,n,i,e[15],16,530742520),i=this.hh(i,r,s,n,e[2],23,-995338651),n=this.ii(n,i,r,s,e[0],6,-198630844),s=this.ii(s,n,i,r,e[7],10,1126891415),r=this.ii(r,s,n,i,e[14],15,-1416354905),i=this.ii(i,r,s,n,e[5],21,-57434055),n=this.ii(n,i,r,s,e[12],6,1700485571),s=this.ii(s,n,i,r,e[3],10,-1894986606),r=this.ii(r,s,n,i,e[10],15,-1051523),i=this.ii(i,r,s,n,e[1],21,-2054922799),n=this.ii(n,i,r,s,e[8],6,1873313359),s=this.ii(s,n,i,r,e[15],10,-30611744),r=this.ii(r,s,n,i,e[6],15,-1560198380),i=this.ii(i,r,s,n,e[13],21,1309151649),n=this.ii(n,i,r,s,e[4],6,-145523070),s=this.ii(s,n,i,r,e[11],10,-1120210379),r=this.ii(r,s,n,i,e[2],15,718787259),i=this.ii(i,r,s,n,e[9],21,-343485551),t[0]=this.add32(n,t[0]),t[1]=this.add32(i,t[1]),t[2]=this.add32(r,t[2]),t[3]=this.add32(s,t[3])}cmn(t,e,n,i,r,s){return e=this.add32(this.add32(e,t),this.add32(i,s)),this.add32(e<<r|e>>>32-r,n)}ff(t,e,n,i,r,s,o){return this.cmn(e&n|~e&i,t,e,r,s,o)}gg(t,e,n,i,r,s,o){return this.cmn(e&i|n&~i,t,e,r,s,o)}hh(t,e,n,i,r,s,o){return this.cmn(e^n^i,t,e,r,s,o)}ii(t,e,n,i,r,s,o){return this.cmn(n^(e|~i),t,e,r,s,o)}md51(t){let e=t.length,n=[1732584193,-271733879,-1732584194,271733878],i;for(i=64;i<=t.length;i+=64)this.md5cycle(n,this.md5blk(t.substring(i-64,i)));t=t.substring(i-64);let r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<t.length;i++)r[i>>2]|=t.charCodeAt(i)<<(i%4<<3);if(r[i>>2]|=128<<(i%4<<3),i>55)for(this.md5cycle(n,r),i=0;i<16;i++)r[i]=0;return r[14]=e*8,this.md5cycle(n,r),n}md5blk(t){let e=[];for(let n=0;n<64;n+=4)e[n>>2]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24);return e}rhex(t){let e="0123456789abcdef".split(""),n="",i=0;for(;i<4;i++)n+=e[t>>i*8+4&15]+e[t>>i*8&15];return n}hex(t){for(let e=0;e<t.length;e++)t[e]=this.rhex(t[e]);return t.join("")}md5(t){return this.hex(this.md51(t))}add32(t,e){return this.ieCompatibility?this.add32Compat(t,e):this.add32Std(t,e)}add32Std(t,e){return t+e&4294967295}add32Compat(t,e){let n=(t&65535)+(e&65535);return(t>>16)+(e>>16)+(n>>16)<<16|n&65535}},Xte={"01":"GRID","02":"CHARTS","0102":"BOTH"},pst="https://ag-grid.com/licensing/",xyi=(()=>{let t=class L3{constructor(n){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=n,this.md5=new Cyi,this.md5.init()}validateLicense(){let n=this.getLicenseDetails(L3.licenseKey),i=`AG Grid ${n.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,r=n.suppliedLicenseType===void 0?"":`AG ${n.suppliedLicenseType==="BOTH"?"Grid and AG Charts":n.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(n.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(n.expired){let s=L3.getGridReleaseDate(),o=L3.formatDate(s);this.outputExpiredKey(n.expiry,o,i,r)}else n.valid?n.isTrial&&n.trialExpired&&this.outputExpiredTrialKey(n.expiry,i,r):this.outputInvalidLicenseKey(!!n.incorrectLicenseType,i,r)}static extractExpiry(n){let i=n.substring(n.lastIndexOf("_")+1,n.length);return new Date(parseInt(L3.decode(i),10))}static extractLicenseComponents(n){let i=n.replace(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replace(/\r?\n|\r/g,""),n.length<=32)return{md5:null,license:n,version:null,isTrial:null};let r=i.length-32,s=i.substring(r),o=i.substring(0,r),[a,l,c]=L3.extractBracketedInformation(i);return{md5:s,license:o,version:a,isTrial:l,type:c}}getLicenseDetails(n){let i=L3.chartsLicenseManager?"BOTH":"GRID";if(Gd(n))return{licenseKey:n,valid:!1,missing:!0,currentLicenseType:i};let r=L3.getGridReleaseDate(),{md5:s,license:o,version:a,isTrial:l,type:c}=L3.extractLicenseComponents(n),d=s===this.md5.md5(o)&&n.indexOf("For_Trialing_ag-Grid_Only")===-1,u,m,f=null,_=!1,x;function D(){u=f<new Date,m=void 0}if(d&&(f=L3.extractExpiry(o),d=!isNaN(f.getTime()),d))switch(m=r>f,a){case"legacy":case"2":{l&&D();break}case"3":Gd(c)?d=!1:(x=c,c!==Xte["01"]&&c!==Xte["0102"]||i==="BOTH"&&x!=="BOTH"?(d=!1,_=!0):l&&D())}return d?{licenseKey:n,valid:d,expiry:L3.formatDate(f),expired:m,version:a,isTrial:l,trialExpired:u,incorrectLicenseType:_,currentLicenseType:i,suppliedLicenseType:x}:{licenseKey:n,valid:d,incorrectLicenseType:_,currentLicenseType:i,suppliedLicenseType:x}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!Gd(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){let i=(this.document.defaultView||window).location,{hostname:r=""}=i;return r}isForceWatermark(){let i=(this.document.defaultView||window).location,{pathname:r}=i;return r?r.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){return this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(n){let i=["January","February","March","April","May","June","July","August","September","October","November","December"],r=n.getDate(),s=n.getMonth(),o=n.getFullYear();return r+" "+i[s]+" "+o}static getGridReleaseDate(){return new Date(parseInt(L3.decode(L3.RELEASE_INFORMATION),10))}static decode(n){let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="",s,o,a,l,c,d,u,m=0,f=n.replace(/[^A-Za-z0-9+/=]/g,"");for(;m<f.length;)l=i.indexOf(f.charAt(m++)),c=i.indexOf(f.charAt(m++)),d=i.indexOf(f.charAt(m++)),u=i.indexOf(f.charAt(m++)),s=l<<2|c>>4,o=(c&15)<<4|d>>2,a=(d&3)<<6|u,r=r+String.fromCharCode(s),d!=64&&(r=r+String.fromCharCode(o)),u!=64&&(r=r+String.fromCharCode(a));return r=L3.utf8_decode(r),r}static utf8_decode(n){n=n.replace(/rn/g,"n");let i="";for(let r=0;r<n.length;r++){let s=n.charCodeAt(r);s<128?i+=String.fromCharCode(s):s>127&&s<2048?(i+=String.fromCharCode(s>>6|192),i+=String.fromCharCode(s&63|128)):(i+=String.fromCharCode(s>>12|224),i+=String.fromCharCode(s>>6&63|128),i+=String.fromCharCode(s&63|128))}return i}static setChartsLicenseManager(n){this.chartsLicenseManager=n}static setLicenseKey(n){this.licenseKey=n,this.chartsLicenseManager&&this.chartsLicenseManager.setLicenseKey(n,!0)}static extractBracketedInformation(n){if(!n.includes("["))return["legacy",!1,void 0];let i=n.match(/\[(.*?)\]/g).map(l=>l.replace("[","").replace("]",""));if(!i||i.length===0)return["legacy",!1,void 0];let r=i.filter(l=>l==="TRIAL").length===1,s=i.filter(l=>l.indexOf("v")===0)[0],o=s?s.replace("v",""):"legacy",a=Xte[i.filter(l=>Xte[l])[0]];return[o,r,a]}centerPadAndOutput(n){let i=this.totalMessageLength-n.length;console.error(n.padStart(i/2+n.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(n,i="*",r=""){console.error(n.padEnd(this.totalMessageLength-r.length,i)+r)}outputInvalidLicenseKey(n,i,r){n?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${r} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${pst}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${pst}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(n,i,r){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${r} expired on ${n}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(n){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${n} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${n} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(n,i,r,s){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${r} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${s} released before ${n}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${i}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};return t.RELEASE_INFORMATION="MTcyMjc4NTg4MDQxOA==",t})(),Qte=xyi,byi=class extends ai{constructor(){super(`<div class="ag-watermark">
                <div data-ref="eLicenseTextRef" class="ag-watermark-text"></div>
            </div>`),this.eLicenseTextRef=Bt}wireBeans(t){this.licenseManager=t.licenseManager}postConstruct(){let t=this.shouldDisplayWatermark();this.setDisplayed(t),t&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}},wyi={selector:"AG-WATERMARK",component:byi},vie=class extends Ot{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new Qte(this.gos.getDocument()),this.licenseManager.validateLicense()}static getLicenseDetails(t){return new Qte(null).getLicenseDetails(t)}getWatermarkSelector(){return wyi}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(t){Qte.setLicenseKey(t)}static setChartsLicenseManager(t){Qte.setChartsLicenseManager(t)}},Syi="32.1.0",KE=class extends ai{constructor(){super(),this.setTemplate("<div></div>")}init(t){this.params=t,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;let t=Rp(`<span data-ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`),{checked:e,icon:n}=this.params;e?t.appendChild(tr("check",this.gos)):n&&(qB(n)?t.appendChild(n):typeof n=="string"?t.innerHTML=n:wt("menu item icon must be DOM node or string")),this.getGui().appendChild(t)}addName(){let t=Rp(`<span data-ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(t)}addShortcut(){if(this.params.isCompact)return;let t=Rp(`<span data-ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(t)}addSubMenu(){let t=Rp(`<span data-ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),e=this.getGui();if(this.params.subMenu){let n=this.gos.get("enableRtl")?"smallLeft":"smallRight";ip(e,!1),t.appendChild(tr(n,this.gos))}e.appendChild(t)}getClassName(t){return`${this.cssClassPrefix}-${t}`}destroy(){super.destroy()}},y1={version:Syi,moduleName:wr.EnterpriseCoreModule,beans:[vie],userComponents:[{name:"agMenuItem",classImp:KE}]};uC=class extends ai{constructor(t={}){super(Tyi(t),[d1]),this.params=t,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1,this.eToolbar=Bt,this.cbGroupEnabled=Bt,this.eContainer=Bt;let{enabled:e,items:n,suppressEnabledCheckbox:i,expanded:r,suppressToggleExpandOnEnableChange:s,useToggle:o}=t;this.cssIdentifier=t.cssIdentifier||"default",this.enabled=e??!0,this.items=n||[],this.useToggle=o??!1,this.alignItems=t.alignItems||"center",this.expanded=r??!0,i!=null&&(this.suppressEnabledCheckbox=i),s!=null&&(this.suppressToggleExpandOnEnableChange=s)}postConstruct(){if(this.setupTitleBar(),this.items.length){let r=this.items;this.items=[],this.addItems(r)}let t=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(t("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);let{onEnableChange:e,onExpandedChange:n,suppressOpenCloseIcons:i}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(i??!1),this.refreshChildDisplay(),Vn(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(r=>{this.setEnabled(r,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(r)}),e!=null&&this.onEnableChange(e),n!=null&&this.onExpandedChange(n)}refreshChildDisplay(){Vn(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),this.eTitleBar?.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(t){this.alignItems!==t&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=t;let e=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(e),this}toggleGroupExpand(t,e){if(this.eTitleBar?.isSuppressCollapse()&&!this.useToggle)t=!0,e=!0;else if(t=t??!this.expanded,this.expanded===t)return this;return this.expanded=t,this.refreshChildDisplay(),Vn(this.eContainer,t),e||this.dispatchLocalEvent({type:t?"expanded":"collapsed"}),this}addItems(t){t.forEach(e=>this.addItem(e))}prependItem(t){this.insertItem(t,!0)}addItem(t){this.insertItem(t,!1)}insertItem(t,e){let n=this.eContainer,i=t instanceof ai?t.getGui():t;i.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),e?(n.insertAdjacentElement("afterbegin",i),this.items.unshift(i)):(n.appendChild(i),this.items.push(i))}hideItem(t,e){let n=this.items[e];Vn(n,!t)}getItemIndex(t){let e=t instanceof ai?t.getGui():t;return this.items.indexOf(e)}setTitle(t){return this.eTitleBar?.setTitle(t),this}addTitleBarWidget(t){return this.eTitleBar?.addWidget(t),this}addCssClassToTitleBar(t){this.eTitleBar?.addCssClass(t)}dispatchEnableChangeEvent(t){let e={type:"enableChange",enabled:t};this.dispatchLocalEvent(e)}setEnabled(t,e,n){return this.enabled=t,this.refreshDisabledStyles(),n||this.toggleGroupExpand(t),e||(this.cbGroupEnabled.setValue(t),this.eToggle?.setValue(t)),this}isEnabled(){return this.enabled}onEnableChange(t){return this.addManagedListeners(this,{enableChange:e=>t(e.enabled)}),this}onExpandedChange(t){return this.addManagedListeners(this,{expanded:()=>t(!0),collapsed:()=>t(!1)}),this}hideEnabledCheckbox(t){return this.suppressEnabledCheckbox=t,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(t){return this.eTitleBar?.hideOpenCloseIcons(t),this}refreshDisabledStyles(){let t=!this.enabled;this.eContainer.classList.toggle("ag-disabled",t),this.eTitleBar?.refreshDisabledStyles(this.suppressEnabledCheckbox&&t),this.eContainer.classList.toggle("ag-disabled-group-container",t)}setupTitleBar(){let t=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",t.getGui())}createDefaultTitleBar(){let t=this.createManagedBean(new Eyi(this.params));return this.eTitleBar=t,t.refreshOnExpand(this.expanded),this.addManagedListeners(t,{expandedChanged:e=>this.toggleGroupExpand(e.expanded)}),t}createToggleTitleBar(){let t=this.createManagedBean(new qy({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:e=>{this.setEnabled(e,!0),this.dispatchEnableChangeEvent(e)}}));return t.addCssClass("ag-group-title-bar"),t.addCssClass(`ag-${this.params.cssIdentifier??"default"}-group-title-bar ag-unselectable`),this.eToggle=t,this.toggleGroupExpand(this.enabled),t}},xxe="ag-disabled-group-title-bar";Eyi=class extends ai{constructor(t={}){super(Dyi(t)),this.suppressOpenCloseIcons=!1,this.suppressKeyboardNavigation=!1,this.eGroupOpenedIcon=Bt,this.eGroupClosedIcon=Bt,this.eTitle=Bt;let{title:e,suppressOpenCloseIcons:n,suppressKeyboardNavigation:i}=t;e&&e.length>0&&(this.title=e),n!=null&&(this.suppressOpenCloseIcons=n),this.suppressKeyboardNavigation=i??!1}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild($y("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild($y("columnSelectOpen",this.gos,null)),this.addManagedElementListeners(this.getGui(),{click:()=>this.dispatchExpandChanged(),keydown:t=>{switch(t.key){case It.ENTER:case It.SPACE:t.preventDefault(),this.dispatchExpandChanged();break;case It.RIGHT:case It.LEFT:t.preventDefault(),this.dispatchExpandChanged(t.key===It.RIGHT);break}}})}refreshOnExpand(t){this.refreshAriaStatus(t),this.refreshOpenCloseIcons(t)}refreshAriaStatus(t){this.suppressOpenCloseIcons||ip(this.getGui(),t)}refreshOpenCloseIcons(t){let e=!this.suppressOpenCloseIcons;Vn(this.eGroupOpenedIcon,e&&t),Vn(this.eGroupClosedIcon,e&&!t)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(t){let e={type:"expandedChanged",expanded:t};this.dispatchLocalEvent(e)}setTitle(t){let e=this.getGui(),n=!!t&&t.length>0;t=n?t:void 0,this.eTitle.textContent=t??"",Vn(e,n),t!==this.title&&(this.title=t);let i=e.classList.contains(xxe);return this.refreshDisabledStyles(i),this}addWidget(t){return this.getGui().appendChild(t),this}hideOpenCloseIcons(t){return this.suppressOpenCloseIcons=t,t&&this.dispatchExpandChanged(!0),this}refreshDisabledStyles(t){let e=this.getGui();t?(e.classList.add(xxe),e.removeAttribute("tabindex")):(e.classList.remove(xxe),typeof this.title=="string"&&!this.suppressKeyboardNavigation?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex"))}},ah={selector:"AG-GROUP-COMPONENT",component:uC},Myi=class extends ai{constructor(t){super(`
            <div class="ag-pill" role="option">
                <span class="ag-pill-text" data-ref="eText"></span>
                <span class="ag-button ag-pill-button" data-ref="eButton" role="presentation"></span>
            </div>
        `),this.config=t,this.eText=Bt,this.eButton=Bt}postConstruct(){let{config:t,eButton:e}=this,{onKeyDown:n,onButtonClick:i}=t;this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),this.addGuiEventListener("focus",()=>{this.eButton.focus()}),n&&this.addGuiEventListener("keydown",n),i&&this.addManagedElementListeners(e,{click:i})}toggleCloseButtonClass(t,e){this.eButton.classList.toggle(t,e)}setText(t){this.eText.textContent=t}getText(){return this.eText.textContent}},kyi=class extends ai{constructor(){super(`
            <div class="ag-pill-container" role="listbox"></div>
            `),this.pills=[]}wireBeans(t){this.focusService=t.focusService}init(t){this.params=t,this.refresh()}refresh(){this.clearPills();let{params:t,onPillKeyDown:e}=this,n=t.getValue();if(!Array.isArray(n))return;let i=n.length;for(let r=0;r<i;r++){let s=n[r],o=this.createBean(new Myi({onButtonClick:()=>this.onPillButtonClick(o),onKeyDown:e.bind(this)})),a=o.getGui();gD(a,r+1),fD(a,i),t.onPillMouseDown&&o.addGuiEventListener("mousedown",t.onPillMouseDown),t.announceItemFocus&&o.addGuiEventListener("focus",t.announceItemFocus),o.setText(s),o.toggleCloseButtonClass("ag-icon-cancel",!0),this.appendChild(a),this.pills.push(o)}}onNavigationKeyDown(t){let{key:e}=t;if(!this.pills.length||e!==It.LEFT&&e!==It.RIGHT)return;t.preventDefault();let n=this.gos.getActiveDomElement(),i=this.getGui(),{params:r,focusService:s}=this;if(i.contains(n)){let o=s.findNextFocusableElement(i,!1,e===It.LEFT);o?o.focus():r.eWrapper&&r.eWrapper.focus()}else{let o=s.findFocusableElements(i);o.length>0&&o[e===It.RIGHT?0:o.length-1].focus()}}clearPills(){let t=this.getGui();t.contains(this.gos.getActiveDomElement())&&this.params.eWrapper&&this.params.eWrapper.focus(),zo(t),this.destroyBeans(this.pills),this.pills=[]}onPillButtonClick(t){this.deletePill(t)}onPillKeyDown(t){let e=t.key;if(e!==It.DELETE&&e!==It.BACKSPACE)return;t.preventDefault();let n=this.gos.getDocument(),i=this.pills.findIndex(s=>s.getGui().contains(n.activeElement));if(i===-1)return;let r=this.pills[i];r&&this.deletePill(r,i)}deletePill(t,e){let n=t.getText(),i=(this.params.getValue()||[]).filter(r=>r!==n);if(this.params.setValue(i),!i.length&&this.params.eWrapper)this.params.eWrapper.focus();else if(e!=null){let r=this.pills[Math.min(e,this.pills.length-1)];r&&r.getFocusableElement().focus()}}destroy(){this.clearPills(),super.destroy()}},Iyi=class extends ai{constructor(t){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=t}wireBeans(t){this.userComponentFactory=t.userComponentFactory}setState(t){let e="",{params:n}=this;n.valueFormatter&&(e=n.valueFormatter(t)),this.populateWithRenderer(t,e)||this.populateWithoutRenderer(t,e),this.value=t}highlightString(t){let{parsedValue:e}=this;if(this.params.cellRenderer||!Di(e))return;let n=Di(t);if(n){let i=e?.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());if(i>=0){let r=i+t.length,s=nl(e.slice(0,i),!0),o=nl(e.slice(i,r),!0),a=nl(e.slice(r));this.renderValueWithoutRenderer(`${s}<span class="ag-rich-select-row-text-highlight">${o}</span>${a}`)}else n=!1}n||this.renderValueWithoutRenderer(e)}updateSelected(t){let e=this.getGui();bA(e.parentElement,t),this.addOrRemoveCssClass("ag-rich-select-row-selected",t)}getValue(){return this.value}toggleHighlighted(t){this.addOrRemoveCssClass("ag-rich-select-row-highlighted",t)}populateWithoutRenderer(t,e){let n=this.gos.getDocument(),i=this.getGui(),r=n.createElement("span");r.style.overflow="hidden",r.style.textOverflow="ellipsis";let s=nl(Di(e)?e:t,!0);this.parsedValue=Di(s)?s:null,i.appendChild(r),this.renderValueWithoutRenderer(s),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth})}renderValueWithoutRenderer(t){let e=this.getGui().querySelector("span");e&&(e.innerHTML=Di(t)?t:"&nbsp;")}populateWithRenderer(t,e){let n,i;if(this.params.cellRenderer){let r=this.getParentComponent()?.getParentComponent();i=this.userComponentFactory.getEditorRendererDetails(this.params,{value:t,valueFormatted:e,getValue:()=>r?.getValue(),setValue:s=>{r?.setValue(s,!0)},setTooltip:(s,o)=>{this.setTooltip({newTooltipText:s,shouldDisplayTooltip:o})}})}return i&&(n=i.newAgStackInstance()),n&&WZ(n,this.getGui()),n?(n.then(r=>{this.addDestroyFunc(()=>{this.destroyBean(r)})}),!0):!1}};YE=class extends j1{constructor(t){super(Ayi(t?.cssIdentifier||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=Bt;let{cssIdentifier:e="default",ariaRole:n="listbox",listName:i}=t||{};this.cssIdentifier=e,this.ariaRole=n,this.listName=i}wireBeans(t){this.resizeObserverService=t.resizeObserverService,this.animationFrameService=t.animationFrameService,this.environment=t.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:t=>this.onFocusIn(t),onFocusOut:t=>this.onFocusOut(t),focusInnerElement:t=>this.focusInnerElement(t),onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t)}),this.setAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(t){t.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}setAriaProperties(){let e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),n=this.eContainer;dd(n,this.ariaRole),hl(n,e)}addResizeObserver(){let t=()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()),e=this.resizeObserverService.observeResize(this.getGui(),t);this.addDestroyFunc(e)}focusInnerElement(t){this.focusRow(t?this.model.getRowCount()-1:0)}onFocusIn(t){let e=t.target;e.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=oGe(e)-1)}onFocusOut(t){this.getFocusableElement().contains(t.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(t){switch(t.key){case It.UP:case It.DOWN:this.navigate(t.key===It.UP)&&t.preventDefault();break;case It.PAGE_HOME:case It.PAGE_END:case It.PAGE_UP:case It.PAGE_DOWN:this.navigateToPage(t.key)!==null&&t.preventDefault();break}}onTabKeyDown(t){Zc(t),this.forceFocusOutOfContainer(t.shiftKey)}navigate(t){if(this.lastFocusedRowIndex==null)return!1;let e=this.lastFocusedRowIndex+(t?-1:1);return e<0||e>=this.model.getRowCount()?!1:(this.focusRow(e),!0)}navigateToPage(t,e="focused"){let n=!1;e==="focused"&&(e=this.getLastFocusedRow(),n=!0);let i=this.model.getRowCount()-1,r=-1;return t===It.PAGE_HOME?r=0:t===It.PAGE_END?r=i:t===It.PAGE_DOWN?r=Math.min(e+this.pageSize,i):t===It.PAGE_UP&&(r=Math.max(e-this.pageSize,0)),r===-1?null:(n?this.focusRow(r):this.ensureIndexVisible(r),r)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(t){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(t),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;let e=this.renderedRows.get(t);e&&e.eDiv.focus()}))}getComponentAt(t){let e=this.renderedRows.get(t);return e&&e.rowComponent}forEachRenderedRow(t){this.renderedRows.forEach((e,n)=>t(e.rowComponent,n))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(t,e=!0){let n=this.model.getRowCount();if(typeof t!="number"||t<0||t>=n)return wt("invalid row index for ensureIndexVisible: ",t),!1;let i=t*this.rowHeight,r=i+this.rowHeight,s=this.getGui(),o=s.scrollTop,a=s.offsetHeight,l=o+a,c=e?0:this.rowHeight,d=o>i+c,u=l<r-c;if(d)return s.scrollTop=i,!0;if(u){let m=r-a;return s.scrollTop=m,!0}return!1}setComponentCreator(t){this.componentCreator=t}setComponentUpdater(t){this.componentUpdater=t}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(t){this.isHeightFromTheme=!1,this.rowHeight=t,this.refresh()}refresh(t){if(this.model==null||!this.isAlive())return;let e=this.model.getRowCount();this.eContainer.style.height=`${e*this.rowHeight}px`,O3e(()=>this.eContainer.clientHeight>=e*this.rowHeight,()=>{this.isAlive()&&(this.canSoftRefresh(t)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}canSoftRefresh(t){return!!(t&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((t,e)=>this.removeRow(e))}drawVirtualRows(t){if(!this.isAlive()||!this.model)return;let e=this.getGui(),n=e.scrollTop,i=n+e.offsetHeight,r=Math.floor(n/this.rowHeight),s=Math.floor(i/this.rowHeight);this.pageSize=Math.floor((i-n)/this.rowHeight),this.ensureRowsRendered(r,s,t)}ensureRowsRendered(t,e,n){this.renderedRows.forEach((i,r)=>{(r<t||r>e)&&r!==this.lastFocusedRowIndex&&this.removeRow(r)}),n&&this.refreshRows();for(let i=t;i<=e;i++)this.renderedRows.has(i)||i<this.model.getRowCount()&&this.insertRow(i)}insertRow(t){let e=this.model.getRow(t),n=document.createElement("div");n.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),dd(n,this.ariaRole==="tree"?"treeitem":"option"),fD(n,this.model.getRowCount()),gD(n,t+1),n.setAttribute("tabindex","-1"),n.style.height=`${this.rowHeight}px`,n.style.top=`${this.rowHeight*t}px`;let i=this.componentCreator(e,n);i.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=t),n.appendChild(i.getGui()),this.renderedRows.has(t-1)?this.renderedRows.get(t-1).eDiv.insertAdjacentElement("afterend",n):this.renderedRows.has(t+1)?this.renderedRows.get(t+1).eDiv.insertAdjacentElement("beforebegin",n):this.eContainer.appendChild(n),this.renderedRows.set(t,{rowComponent:i,eDiv:n,value:e})}removeRow(t){let e=this.renderedRows.get(t);this.eContainer.removeChild(e.eDiv),this.destroyBean(e.rowComponent),this.renderedRows.delete(t)}refreshRows(){let t=this.model.getRowCount();this.renderedRows.forEach((e,n)=>{if(n>=t)this.removeRow(n);else{let i=this.model.getRow(n);this.model.areRowsEqual?.(e.value,i)?this.componentUpdater(i,e.rowComponent):this.removeRow(n)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(t){this.model=t}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),super.destroy())}},mst="ag-rich-select-list",fst="ag-rich-select-row",Pyi=class extends YE{constructor(t,e,n){super({cssIdentifier:"rich-select"}),this.params=t,this.richSelectWrapper=e,this.getSearchString=n,this.lastRowHovered=-1,this.selectedItems=new Set,this.params=t,this.setComponentCreator(this.createRowComponent.bind(this)),this.setComponentUpdater(()=>{})}postConstruct(){super.postConstruct(),this.createLoadingElement();let{cellRowHeight:t,pickerAriaLabelKey:e,pickerAriaLabelValue:n}=this.params;t&&this.setRowHeight(t);let i=this.getGui(),r=this.getAriaElement();this.addManagedListeners(i,{mousemove:this.onMouseMove.bind(this),mouseout:this.onMouseOut.bind(this),mousedown:this.onMouseDown.bind(this),click:this.onClick.bind(this)}),i.classList.add(mst);let s=`${mst}-${this.getCompId()}`;r.setAttribute("id",s);let a=this.localeService.getLocaleTextFunc()(e,n);hl(r,a),KB(this.richSelectWrapper,r)}navigateToPage(t){let e=super.navigateToPage(t,this.lastRowHovered);return e!=null&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightIndex(e)}),e}drawVirtualRows(t){super.drawVirtualRows(t),this.refreshSelectedItems()}highlightFilterMatch(t){this.forEachRenderedRow(e=>{e.highlightString(t)})}onNavigationKeyDown(t,e){this.animationFrameService.requestAnimationFrame(()=>{if(!this.currentList||!this.isAlive())return;let n=this.currentList.length,i=this.lastRowHovered,r=t===It.DOWN?1:-1,s=Math.min(Math.max(i===-1?0:i+r,0),n-1);this.highlightIndex(s),e()})}selectValue(t){if(!this.currentList){this.eLoading&&this.appendChild(this.eLoading);return}if(this.eLoading?.offsetParent&&this.eLoading.parentElement?.removeChild(this.eLoading),t==null)return;let e=this.getIndicesForValues(t);e.length>0&&(this.refresh(),this.ensureIndexVisible(e[0]),this.refresh(!0)),this.selectListItems(Array.isArray(t)?t:[t])}selectListItems(t,e=!1){e||this.selectedItems.clear();for(let n=0;n<t.length;n++){let i=t[n];this.selectedItems.has(i)||this.selectedItems.add(i)}this.refreshSelectedItems()}getCurrentList(){return this.currentList}setCurrentList(t){this.currentList=t,this.setModel({getRowCount:()=>t.length,getRow:e=>t[e],areRowsEqual:(e,n)=>e===n})}getSelectedItems(){return this.selectedItems}getLastItemHovered(){return this.currentList[this.lastRowHovered]}highlightIndex(t,e){this.currentList&&(t<0||t>=this.currentList.length?this.lastRowHovered=-1:(this.lastRowHovered=t,this.ensureIndexVisible(t,!e)&&!e&&this.refresh(!0)),this.forEachRenderedRow((n,i)=>{let r=t===i;if(n.toggleHighlighted(r),r){let s=`${fst}-${n.getCompId()}`;BZ(this.richSelectWrapper,s),this.richSelectWrapper.setAttribute("data-active-option",s)}}))}getIndicesForValues(t){let{currentList:e}=this;if(!e||e.length===0||t==null)return[];if(Array.isArray(t)||(t=[t]),t.length===0)return[];let n=[];for(let i=0;i<t.length;i++){let r=e.indexOf(t[i]);r>=0&&n.push(r)}return n}toggleListItemSelection(t){this.selectedItems.has(t)?this.selectedItems.delete(t):this.selectedItems.add(t),this.refreshSelectedItems(),this.dispatchValueSelected()}refreshSelectedItems(){this.forEachRenderedRow(t=>{let e=this.selectedItems.has(t.getValue());t.updateSelected(e)})}createLoadingElement(){let t=this.gos.getDocument(),e=this.localeService.getLocaleTextFunc(),n=t.createElement("div");n.classList.add("ag-loading-text"),n.innerText=e("loadingOoo","Loading..."),this.eLoading=n}createRowComponent(t,e){let n=new Iyi(this.params);e.setAttribute("id",`${fst}-${n.getCompId()}`),n.setParentComponent(this),this.createBean(n),n.setState(t);let{highlightMatch:i,searchType:r="fuzzy"}=this.params;return i&&r!=="fuzzy"&&n.highlightString(this.getSearchString()),n}getRowForMouseEvent(t){let n=this.getGui().getBoundingClientRect(),i=this.getScrollTop(),r=t.clientY-n.top+i;return Math.floor(r/this.getRowHeight())}onMouseMove(t){let e=this.getRowForMouseEvent(t);e!==-1&&e!=this.lastRowHovered&&(this.lastRowHovered=e,this.highlightIndex(e,!0))}onMouseDown(t){t.preventDefault()}onMouseOut(t){this.getGui().contains(t.relatedTarget)||this.highlightIndex(-1)}onClick(t){let{multiSelect:e}=this.params;if(!this.currentList)return;let n=this.getRowForMouseEvent(t),i=this.currentList[n];e?this.toggleListItemSelection(i):(this.selectListItems([i]),this.dispatchValueSelected())}dispatchValueSelected(){this.dispatchLocalEvent({type:"richSelectListRowSelected",fromEnterKey:!1,value:this.selectedItems})}destroy(){super.destroy(),this.eLoading=void 0}},yie=class extends QB{constructor(t){super(St(ve({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:t?.template??`
            <div class="ag-picker-field" role="presentation">
                <div data-ref="eLabel"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
                    <span data-ref="eDisplayField" class="ag-picker-field-display"></span>
                    <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
                    <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
                    <span data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></span>
                </div>
            </div>`,agComponents:[xf],modalPicker:!1},t),{maxPickerHeight:t?.maxPickerHeight??"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.searchStringCreator=null,this.eInput=Bt,this.eDeselect=Bt,this.skipWrapperAnnouncement=!1;let{value:e,valueList:n,searchStringCreator:i}=t||{};e!==void 0&&(this.value=e),n!=null&&(this.values=n),i&&(this.searchStringCreator=i)}wireBeans(t){super.wireBeans(t),this.userComponentFactory=t.userComponentFactory,this.ariaAnnouncementService=t.ariaAnnouncementService}postConstruct(){super.postConstruct(),this.createListComponent(),this.eDeselect.appendChild(tr("cancel",this.gos));let{allowTyping:t,placeholder:e,suppressDeselectAll:n}=this.config;this.eDeselect.classList.add("ag-hidden"),t?(this.eInput.setAutoComplete(!1).setInputPlaceholder(e),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.setupAriaProperties();let{searchDebounceDelay:i=300}=this.config;this.clearSearchString=Ap(this.clearSearchString,i),this.renderSelectedValue(),t&&this.eInput.onValueChange(r=>this.searchTextFromString(r)),this.addManagedElementListeners(this.eWrapper,{focus:this.onWrapperFocus.bind(this)}),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)}),n||this.addManagedElementListeners(this.eDeselect,{mousedown:this.onDeselectAllMouseDown.bind(this),click:this.onDeselectAllClick.bind(this)})}setupAriaProperties(){let{eWrapper:t,gos:e,localeService:n}=this;t.tabIndex=e.get("tabIndex");let i=n.getLocaleTextFunc();this.ariaDeleteSelection=i("ariaLabelRichSelectDeleteSelection","Press DELETE to deselect item"),this.ariaDeselectAllItems=i("ariaLabelRichSelectDeselectAllItems","Press DELETE to deselect all items"),this.ariaToggleSelection=i("ariaLabelRichSelectToggleSelection","Press SPACE to toggle selection")}createListComponent(){this.listComponent=this.createBean(new Pyi(this.config,this.eWrapper,()=>this.searchString)),this.listComponent.setParentComponent(this),this.addManagedListeners(this.listComponent,{richSelectListRowSelected:t=>{this.onListValueSelected(t.value,t.fromEnterKey)}})}renderSelectedValue(){let{value:t,eDisplayField:e,config:n}=this,{allowTyping:i,cellRenderer:r,initialInputValue:s,multiSelect:o,suppressDeselectAll:a,suppressMultiSelectPillRenderer:l}=n,c=this.config.valueFormatter?this.config.valueFormatter(t):t;if(i){this.eInput.setValue(s??c);return}if(o&&!a){let m=t==null||Array.isArray(t)&&t.length===0;this.eDeselect.classList.toggle("ag-hidden",m)}let d;if(o&&!l){this.createOrUpdatePillContainer(e);return}r&&(d=this.userComponentFactory.getEditorRendererDetails(n,{value:t,valueFormatted:c,getValue:()=>this.getValue(),setValue:m=>{this.setValue(m,!0)},setTooltip:(m,f)=>{this.setTooltip({newTooltipText:m,shouldDisplayTooltip:f})}}));let u;if(d&&(u=d.newAgStackInstance()),u)zo(e),WZ(u,e),u.then(m=>{this.addDestroyFunc(()=>this.destroyBean(m))});else{if(Di(this.value))e.innerText=c,e.classList.remove("ag-display-as-placeholder");else{let{placeholder:m}=n;Di(m)?(e.innerHTML=`${nl(m)}`,e.classList.add("ag-display-as-placeholder")):zo(e)}this.setTooltip({newTooltipText:c??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}createPickerComponent(){let{values:t}=this;return t&&this.setValueList({valueList:t}),this.listComponent}setSearchStringCreator(t){this.searchStringCreator=t}setValueList(t){let{valueList:e,refresh:n}=t;!this.listComponent||this.listComponent.getCurrentList()===e||(this.listComponent.setCurrentList(e),n&&(this.values?this.listComponent.refresh(!0):(this.values=e,this.isPickerDisplayed&&this.listComponent.selectValue(this.value)),this.alignPickerToComponent()))}showPicker(){super.showPicker();let{listComponent:t,value:e}=this;if(!t)return;let n=null;this.value!=null&&(t.selectValue(this.value),n=t.getIndicesForValues(Array.isArray(e)?e:[e])[0]),n!=null?t.highlightIndex(n):t.refresh(),this.displayOrHidePicker()}beforeHidePicker(){super.beforeHidePicker()}createOrUpdatePillContainer(t){if(!this.pillContainer){let e=this.pillContainer=this.createBean(new kyi);this.addDestroyFunc(()=>{this.destroyBean(this.pillContainer),this.pillContainer=null}),zo(t),t.appendChild(e.getGui()),e.init({eWrapper:this.eWrapper,onPillMouseDown:n=>{n.stopImmediatePropagation()},announceItemFocus:()=>{this.announceAriaValue(this.ariaDeleteSelection)},getValue:()=>this.getValue(),setValue:n=>this.setValue(n,!0)})}this.doWhileBlockingAnnouncement(()=>this.pillContainer?.refresh())}doWhileBlockingAnnouncement(t){this.skipWrapperAnnouncement=!0,t(),this.skipWrapperAnnouncement=!1}onWrapperFocus(){let{eInput:t,config:e}=this,{allowTyping:n,multiSelect:i,suppressDeselectAll:r}=e;if(n){let s=t.getFocusableElement();s.focus(),s.select()}else i&&!r&&!this.skipWrapperAnnouncement&&this.announceAriaValue(this.ariaDeselectAllItems)}onWrapperFocusOut(t){this.eWrapper.contains(t.relatedTarget)||this.hidePicker()}onDeselectAllMouseDown(t){t.stopImmediatePropagation()}onDeselectAllClick(){this.setValue([],!0)}buildSearchStringFromKeyboardEvent(t){let{key:e}=t;if(e===It.BACKSPACE)this.searchString=this.searchString.slice(0,-1),e="";else if(!UZ(t))return;t.preventDefault(),this.searchTextFromCharacter(e)}searchTextFromCharacter(t){this.searchString+=t,this.runSearch(),this.clearSearchString()}searchTextFromString(t){t==null&&(t=""),this.searchString=t,this.runSearch()}buildSearchStrings(t){let{valueFormatter:e=i=>i}=this.config,n;return typeof t[0]=="number"||typeof t[0]=="string"?n=t.map(i=>e(i)):typeof t[0]=="object"&&this.searchStringCreator&&(n=this.searchStringCreator(t)),n}filterListModel(t){let{filterList:e}=this.config;e&&this.setValueList({valueList:t,refresh:!0})}runSearch(){if(!this.listComponent)return;let{values:t}=this,e=this.buildSearchStrings(t);if(!e){this.listComponent.highlightIndex(-1);return}let{suggestions:n,filteredValues:i}=this.getSuggestionsAndFilteredValues(this.searchString,e),{filterList:r,highlightMatch:s,searchType:o="fuzzy"}=this.config,a=i.length,l=!!(r&&this.searchString!=="");if(this.filterListModel(l?i:t),n.length){let c=l?0:e.indexOf(n[0]);this.listComponent?.highlightIndex(c)}else if(this.listComponent?.highlightIndex(-1),!l||a)this.listComponent?.ensureIndexVisible(0);else if(l){this.getAriaElement().removeAttribute("data-active-option");let c=this.listComponent?.getAriaElement();c&&BZ(c,null)}s&&o!=="fuzzy"&&this.listComponent?.highlightFilterMatch(this.searchString),this.displayOrHidePicker()}getSuggestionsAndFilteredValues(t,e){let n=[],i=[];if(!t.length)return{suggestions:n,filteredValues:i};let{searchType:r="fuzzy",filterList:s}=this.config;if(r==="fuzzy"){let o=DA(t,e,!0);n=o.values;let a=o.indices;if(s&&a.length)for(let l=0;l<a.length;l++)i.push(this.values[a[l]])}else n=e.filter((o,a)=>{let l=o.toLocaleLowerCase(),c=this.searchString.toLocaleLowerCase(),d=r==="match"?l.startsWith(c):l.indexOf(c)!==-1;return s&&d&&i.push(this.values[a]),d});return{suggestions:n,filteredValues:i}}displayOrHidePicker(){if(!this.listComponent)return;let t=this.listComponent.getGui(),e=this.listComponent.getCurrentList(),n=e?e.length===0:!1;t.classList.toggle("ag-hidden",n)}clearSearchString(){this.searchString=""}setValue(t,e,n,i){if(this.value===t)return this;let r=Array.isArray(t);if(t!=null){if(!r){let s=this.listComponent?.getCurrentList();if((s?s.indexOf(t):-1)===-1)return this}n||this.listComponent?.selectValue(t)}return super.setValue(t,e),i||this.renderSelectedValue(),this}onNavigationKeyDown(t,e,n){t.preventDefault();let i=e===It.DOWN;if(!this.isPickerDisplayed&&i){this.showPicker();return}this.listComponent?.onNavigationKeyDown(e,n)}onEnterKeyDown(t){if(this.isPickerDisplayed&&(t.preventDefault(),this.listComponent?.getCurrentList())){let e=this.listComponent.getLastItemHovered();this.config.multiSelect||!e?this.dispatchPickerEventAndHidePicker(this.value,!0):this.onListValueSelected(new Set([e]),!0)}}onDeleteKeyDown(t){let{eWrapper:e,gos:n}=this;n.getActiveDomElement()===e&&(t.preventDefault(),this.setValue([],!0))}onTabKeyDown(){let{config:t,isPickerDisplayed:e,listComponent:n}=this,{multiSelect:i}=t;if(!(!e||!n))if(i){let r=this.getValueFromSet(n.getSelectedItems());r&&this.setValue(r,!1,!0,!0)}else this.setValue(n.getLastItemHovered(),!1,!0)}getValueFromSet(t){let{multiSelect:e}=this.config,n=null;for(let i of t){if(t.size===1&&!e){n=i;break}n||(n=[]),n.push(i)}return Array.isArray(n)&&n.sort(),n}onListValueSelected(t,e){let n=this.getValueFromSet(t);this.setValue(n,!1,!0),this.config.multiSelect||this.dispatchPickerEventAndHidePicker(n,e)}dispatchPickerEventAndHidePicker(t,e){let n={type:"fieldPickerValueSelected",fromEnterKey:e,value:t};this.dispatchLocalEvent(n),this.hidePicker()}getFocusableElement(){let{allowTyping:t}=this.config;return t?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(t){let{key:e}=t,{isPickerDisplayed:n,config:i,listComponent:r,pickerComponent:s}=this,{allowTyping:o,multiSelect:a,suppressDeselectAll:l}=i;switch(e){case It.LEFT:case It.RIGHT:(!o||this.pillContainer)&&(t.preventDefault(),this.pillContainer&&(this.listComponent?.highlightIndex(-1),this.pillContainer.onNavigationKeyDown(t)));break;case It.PAGE_HOME:case It.PAGE_END:if(o){t.preventDefault();let c=this.eInput.getInputElement(),d=e===It.PAGE_HOME?0:c.value.length;c.setSelectionRange(d,d);break}case It.PAGE_UP:case It.PAGE_DOWN:t.preventDefault(),s&&r?.navigateToPage(e);break;case It.DOWN:case It.UP:this.onNavigationKeyDown(t,e,()=>{a&&(this.doWhileBlockingAnnouncement(()=>this.eWrapper.focus()),this.announceAriaValue(this.ariaToggleSelection))});break;case It.ESCAPE:n&&(l1(this.listComponent.getGui())&&(t.preventDefault(),Zc(t)),this.hidePicker());break;case It.ENTER:this.onEnterKeyDown(t);break;case It.SPACE:if(n&&a&&r){t.preventDefault();let c=r.getLastItemHovered();c&&r.toggleListItemSelection(c)}break;case It.TAB:this.onTabKeyDown();break;case It.DELETE:a&&!l&&this.onDeleteKeyDown(t);break;default:o||this.buildSearchStringFromKeyboardEvent(t)}}announceAriaValue(t){this.ariaAnnouncementService.announceValue(t,"richSelect")}destroy(){this.listComponent&&(this.listComponent=this.destroyBean(this.listComponent)),super.destroy()}},Qxe=class extends ai{constructor(t,e,n,i,r){super(),this.dragSourceDropTarget=t,this.ghost=e,this.horizontal=n,this.template=i,this.agComponents=r,this.eText=Bt,this.eDragHandle=Bt,this.eButton=Bt}wireBeans(t){this.dragAndDropService=t.dragAndDropService}postConstruct(){this.setTemplate(this.template??`
            <span role="option">
              <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
              <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
              <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
            </span>`,this.agComponents);let t=this.getGui();this.addElementClasses(t),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(tr("columnDrag",this.gos)),this.eButton.appendChild(tr("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){let t=this.localeService.getLocaleTextFunc(),e=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(e,t),hl(this.getGui(),e.join(". "))}addAdditionalAriaInstructions(t,e){if(this.isRemovable()){let n=e("ariaDropZoneColumnComponentDescription","Press DELETE to remove");t.push(n)}}setupTooltip(){let t=()=>{let e=this.getTooltip();this.setTooltip({newTooltipText:e})};t(),this.addManagedEventListeners({newColumnsLoaded:t})}getDragSourceId(){}getDefaultIconName(){return"notAllowed"}addDragSource(){let{dragAndDropService:t,eDragHandle:e}=this,n=this.createGetDragItem(),i=this.getDefaultIconName(),r={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:e,getDefaultIconName:()=>i,getDragItem:n,dragItemName:this.getDisplayName()};t.addDragSource(r,!0),this.addDestroyFunc(()=>t.removeDragSource(r))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){Vn(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();let t={type:"columnRemove"};this.addGuiEventListener("keydown",n=>this.onKeyDown(n)),this.addManagedElementListeners(this.eButton,{click:n=>{this.dispatchLocalEvent(t),n.stopPropagation()}});let e=new Zv(this.eButton);this.addManagedListeners(e,{tap:()=>this.dispatchLocalEvent(t)}),this.addDestroyFunc(e.destroy.bind(e))}onKeyDown(t){t.key===It.DELETE&&this.isRemovable()&&(t.preventDefault(),this.dispatchLocalEvent({type:"columnRemove"}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){let t=this.getDisplayValue(),e=nl(t);this.eText.innerHTML=e}addElementClasses(t,e){e=e?`-${e}`:"";let n=this.horizontal?"horizontal":"vertical";t.classList.add(`ag-column-drop-cell${e}`,`ag-column-drop-${n}-cell${e}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}},Jxe=class extends ai{constructor(t){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=t,this.state="notDragging",this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),dd(this.ePillDropList,"listbox")}wireBeans(t){this.focusService=t.focusService,this.dragAndDropService=t.dragAndDropService}isHorizontal(){return this.horizontal}toggleResizable(t){this.positionableFeature.setResizable(t?{bottom:!0}:!1),this.resizeEnabled=t}isSourceEventFromTarget(t){let{dropZoneTarget:e,dragSource:n}=t;return e.contains(n.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(t=>t()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,zo(this.getGui()),zo(this.ePillDropList)}init(t){this.params=t??{},this.createManagedBean(new Ky(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.onKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new xD(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),hl(this.ePillDropList,this.getAriaLabel())}onTabKeyDown(t){let e=this.focusService.findFocusableElements(this.getFocusableElement(),null,!0),n=e.length;if(n===0)return;let{shiftKey:i}=t,r=this.gos.getActiveDomElement(),s=r===e[0],o=r===Ar(e);n===1||s&&i||o&&!i||e[i?0:n-1].focus()}onKeyDown(t){let{key:e}=t,n=!this.horizontal,i=e===It.DOWN,r=e===It.UP;if(!n){let o=this.gos.get("enableRtl");i=!o&&e===It.RIGHT||o&&e===It.LEFT,r=!o&&e===It.LEFT||o&&e===It.RIGHT}if(!i&&!r)return;let s=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,r);s&&(t.preventDefault(),s.focus())}addElementClasses(t,e){e=e?`-${e}`:"";let n=this.horizontal?"horizontal":"vertical";t.classList.add(`ag-column-drop${e}`,`ag-column-drop-${n}${e}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(t){let e=this.getNewInsertIndex(t);if(e<0)return!1;let n=this.minimumAllowedNewInsertIndex(),i=Math.max(n,e),r=i!==this.insertIndex;return r&&(this.insertIndex=i),r}getNewInsertIndex(t){let e=t.event,n=this.horizontal?e.clientX:e.clientY,i=this.childPillComponents.map(s=>s.getGui().getBoundingClientRect()),r=i.findIndex(s=>this.horizontal?s.right>n&&s.left<n:s.top<n&&s.bottom>n);if(r===-1){let s=this.gos.get("enableRtl");return i.every(l=>n>(this.horizontal?l.right:l.bottom))?s&&this.horizontal?0:this.childPillComponents.length:i.every(l=>n<(this.horizontal?l.left:l.top))?s&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=r?r+1:r}checkDragStartedBySelf(t){this.state==="notDragging"&&(this.state="rearrangeItems",this.potentialDndItems=this.getItems(t.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(t),this.refreshGui())}onDragging(t){this.checkDragStartedBySelf(t),this.checkInsertIndex(t)&&this.refreshGui()}handleDragEnterEnd(t){}onDragEnter(t){let e=this.getItems(t.dragSource.getDragItem());this.state="newItemsIn";let n=e.filter(r=>this.isItemDroppable(r,t)),i=n.every(r=>this.childPillComponents.map(s=>s.getItem()).indexOf(r)!==-1);if(n.length!==0){if(this.potentialDndItems=n,i){this.state="notDragging";return}this.handleDragEnterEnd(t),this.checkInsertIndex(t),this.refreshGui()}}isPotentialDndItems(){return _5(this.potentialDndItems)}handleDragLeaveEnd(t){}onDragLeave(t){if(this.state==="rearrangeItems"){let e=this.getItems(t.dragSource.getDragItem());this.removeItems(e)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(t),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}onDragStop(){this.isPotentialDndItems()&&(this.state==="newItemsIn"?this.addItems(this.potentialDndItems):this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],this.refreshGui()),this.state="notDragging"}removeItems(t){let e=this.getExistingItems().filter(n=>!Sl(t,n));this.updateItems(e)}addItems(t){if(!t)return;let e=this.getExistingItems().slice(),n=t.filter(i=>e.indexOf(i)<0);A3e(e,n,this.insertIndex),this.updateItems(e)}addItem(t){this.insertIndex=this.getExistingItems().length,this.addItems([t]),this.refreshGui()}rearrangeItems(t){let e=this.getNonGhostItems().slice();return A3e(e,t,this.insertIndex),Cf(e,this.getExistingItems())?!1:(this.updateItems(e),!0)}refreshGui(){let t=this.ePillDropList.scrollTop,e=this.resizeEnabled,n=this.getFocusedItem(),i=this.focusService.findNextFocusableElement();i||(i=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=t),e&&this.toggleResizable(e),this.focusService.isKeyboardMode()&&this.restoreFocus(n,i)}getFocusedItem(){let t=this.getGui(),e=this.gos.getActiveDomElement();return t.contains(e)?Array.from(t.querySelectorAll(".ag-column-drop-cell")).indexOf(e):-1}restoreFocus(t,e){let n=this.getGui(),i=Array.from(n.querySelectorAll(".ag-column-drop-cell"));if(t===-1)return;i.length===0&&e.focus();let r=Math.min(i.length-1,t),s=i[r];s&&s.focus()}focusList(t){let e=t?this.childPillComponents.length-1:0;this.restoreFocus(e,this.getFocusableElement())}getNonGhostItems(){let t=this.getExistingItems();return this.isPotentialDndItems()?t.filter(e=>!Sl(this.potentialDndItems,e)):t}addItemsToGui(){let e=this.getNonGhostItems().map(n=>this.createItemComponent(n,!1));if(this.isPotentialDndItems()){let n=this.potentialDndItems.map(i=>this.createItemComponent(i,!0));this.insertIndex>=e.length?e.push(...n):e.splice(this.insertIndex,0,...n)}this.appendChild(this.ePillDropList),e.forEach((n,i)=>{i>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(n.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((t,e)=>{let n=t.getGui();gD(n,e+1),fD(n,this.childPillComponents.length)})}createItemComponent(t,e){let n=this.createPillComponent(t,this.dropTarget,e,this.horizontal);return n.addEventListener("columnRemove",this.removeItems.bind(this,[t])),this.createBean(n),this.guiDestroyFunctions.push(()=>this.destroyBean(n)),e||this.childPillComponents.push(n),n}addIconAndTitleToGui(){let{title:t,icon:e}=this.params;if(!t||!e)return;let n=document.createElement("div");if($B(n,!0),this.addElementClasses(n,"title-bar"),this.addElementClasses(e,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),n.appendChild(e),!this.horizontal){let i=document.createElement("span");this.addElementClasses(i,"title"),i.innerHTML=t,n.appendChild(i)}this.appendChild(n)}isExistingItemsEmpty(){return this.getExistingItems().length===0}addEmptyMessageToGui(){let{emptyMessage:t}=this.params;if(!t||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;let e=document.createElement("span");e.innerHTML=t,this.addElementClasses(e,"empty-message"),this.ePillDropList.appendChild(e)}addArrow(t){if(this.horizontal){let e=this.gos.get("enableRtl"),n=tr(e?"smallLeft":"smallRight",this.gos);this.addElementClasses(n,"cell-separator"),t.appendChild(n)}}};Fyi=(()=>{let t=class rot extends ai{constructor(n){super(Ryi(n)),this.config=n,this.closable=!0,this.eContentWrapper=Bt,this.eTitleBar=Bt,this.eTitleBarButtons=Bt,this.eTitle=Bt}postConstruct(){let{component:n,closable:i,hideTitleBar:r,title:s,minWidth:o=250,width:a,minHeight:l=250,height:c,centered:d,popup:u,x:m,y:f}=this.config;this.positionableFeature=new xD(this.getGui(),{minWidth:o,width:a,minHeight:l,height:c,centered:d,x:m,y:f,popup:u,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);let _=this.getGui();n&&this.setBodyComponent(n),r?Vn(this.eTitleBar,!1):(s&&this.setTitle(s),this.setClosable(i??this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:x=>{if(_.contains(x.relatedTarget)||_.contains(this.gos.getActiveDomElement())||this.eTitleBarButtons.contains(x.target)){x.preventDefault();return}let D=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");D&&D.focus()}}),!(u&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){let n=this.getGui();n.focus(),this.close=()=>{n.parentElement.removeChild(n),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(n){this.positionableFeature.setHeight(n)}getWidth(){return this.positionableFeature.getWidth()}setWidth(n){this.positionableFeature.setWidth(n)}setClosable(n){if(n!==this.closable&&(this.closable=n),n){let i=this.closeButtonComp=new ai(rot.CLOSE_BTN_TEMPLATE);this.createBean(i);let r=i.getGui(),s=tr("close",this.gos);s.classList.add("ag-panel-title-bar-button-icon"),r.appendChild(s),this.addTitleBarButton(i),i.addManagedElementListeners(r,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){let i=this.closeButtonComp.getGui();i.parentElement.removeChild(i),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(n){n.setParentComponent(this),this.eContentWrapper.appendChild(n.getGui())}addTitleBarButton(n,i){let r=this.eTitleBarButtons,s=r.children,o=s.length;i==null&&(i=o),i=Math.max(0,Math.min(i,o)),n.addCssClass("ag-panel-title-bar-button");let a=n.getGui();i===0?r.insertAdjacentElement("afterbegin",a):i===o?r.insertAdjacentElement("beforeend",a):s[i-1].insertAdjacentElement("afterend",a),n.setParentComponent(this)}getBodyHeight(){return YB(this.eContentWrapper)}getBodyWidth(){return yD(this.eContentWrapper)}setTitle(n){this.eTitle.innerText=n}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));let n=this.getGui();n&&l1(n)&&this.close(),super.destroy()}};return t.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',t})(),ebe=Fyi,ZR=class extends ebe{constructor(t){super(St(ve({},t),{popup:!0})),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(t){this.popupService=t.popupService,this.focusService=t.focusService}postConstruct(){let t=this.getGui(),{movable:e,resizable:n,maximizable:i,modal:r,postProcessPopupParams:s}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),s){let{type:o,eventSource:a,column:l,mouseEvent:c,rowNode:d}=s;this.popupService.callPostProcessPopup(o,t,a,c,l,d)}if(this.tabGuardFeature=this.createManagedBean(new h4e(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{let o=this.gos.getDocument(),{activeElement:a}=o;this.popupService.bringPopupToFront(t)&&!this.gos.isNothingFocused()&&a?.focus?.()},onTabKeyDown:o=>{if(r)return;let a=o.shiftKey,l=this.focusService.findNextFocusableElement(t,!1,a);(!l||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(l))&&this.focusService.focusNextGridCoreContainer(a)&&o.preventDefault()}}),e&&this.setMovable(e),i&&this.setMaximizable(i),n&&this.setResizable(n),!this.config.modal){let{focusService:o}=this;o.addFocusableContainer(this),this.addDestroyFunc(()=>o.removeFocusableContainer(this))}}setAllowFocus(t){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(t)}renderComponent(){let t=this.getGui(),{alwaysOnTop:e,modal:n,title:i,afterGuiAttached:r}=this.config,s=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({modal:n,eChild:t,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:e,ariaLabel:i||s("ariaLabelDialog","Dialog"),afterGuiAttached:r});o&&(this.close=o.hideFunc)}onClosed(t){this.destroy(),this.config.closedCallback?.(t)}toggleMaximize(){let t=this.positionableFeature.getPosition();if(this.isMaximized){let{x:e,y:n,width:i,height:r}=this.lastPosition;this.setWidth(i),this.setHeight(r),this.positionableFeature.offsetElement(e,n)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=t.x,this.lastPosition.y=t.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){Vn(this.maximizeIcon,!this.isMaximized),Vn(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(t=>t()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(t){this.positionableFeature.setResizable(t)}setMovable(t){this.positionableFeature.setMovable(t,this.eTitleBar)}setMaximizable(t){if(!t){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}let e=this.eTitleBar;if(!e||t===this.isMaximizable)return;let n=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),n.addManagedElementListeners(n.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(n,0),this.maximizeListeners.push(...this.addManagedElementListeners(e,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){let t=this.maximizeButtonComp=this.createBean(new ai('<div class="ag-dialog-button"></span>')),e=t.getGui();return this.maximizeIcon=tr("maximize",this.gos),e.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=tr("minimize",this.gos),e.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),t}},XR=class extends j1{constructor(t=0,e){super('<div class="ag-menu-list" role="tree"></div>'),this.level=t,this.menuItems=[],this.params=e??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t),onFocusIn:t=>this.handleFocusIn(t),onFocusOut:t=>this.handleFocusOut(t)})}onTabKeyDown(t){let e=this.getParentComponent(),n=e&&e.getGui();n&&n.classList.contains("ag-focus-managed")||t.preventDefault(),t.shiftKey&&this.closeIfIsChild(t)}handleKeyDown(t){switch(t.key){case It.UP:case It.RIGHT:case It.DOWN:case It.LEFT:t.preventDefault(),this.handleNavKey(t.key);break;case It.ESCAPE:this.closeIfIsChild()&&Zc(t);break}}handleFocusIn(t){let e=t.relatedTarget;!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(e)&&(this.getGui().contains(e)||this.activeMenuItem?.getSubMenuGui()?.contains(e))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(t){let e=t.relatedTarget;!this.activeMenuItem||this.getGui().contains(e)||this.activeMenuItem.getSubMenuGui()?.contains(e)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(t){t!=null&&io.all(t.map(e=>e==="separator"?io.resolve({eGui:this.createSeparator()}):typeof e=="string"?(wt(`unrecognised menu item ${e}`),io.resolve({eGui:null})):this.addItem(e))).then(e=>{e.forEach(n=>{n?.eGui&&(this.appendChild(n.eGui),n.comp&&this.menuItems.push(n.comp))})})}addItem(t){let e=this.createManagedBean(new lie);return e.init({menuItemDef:t,isAnotherSubMenuOpen:()=>this.menuItems.some(n=>n.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(e.setParentComponent(this),this.addManagedListeners(e,{closeMenu:n=>{this.dispatchLocalEvent(n)},menuItemActivated:n=>{this.activeMenuItem&&this.activeMenuItem!==n.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=n.menuItem}}),{comp:e,eGui:e.getGui()}))}activateFirstItem(){let t=this.menuItems.filter(e=>!e.isDisabled())[0];t&&t.activate()}createSeparator(){return Rp(`
            <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>`)}handleNavKey(t){switch(t){case It.UP:case It.DOWN:{let n=this.findNextItem(t===It.UP);n&&n!==this.activeMenuItem&&n.activate();return}}let e=this.gos.get("enableRtl")?It.RIGHT:It.LEFT;t===e?this.closeIfIsChild():this.openChild()}closeIfIsChild(t){let e=this.getParentComponent();return e&&e instanceof lie?(t&&t.preventDefault(),e.closeSubMenu(),e.getGui().focus(),!0):!1}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(t){let e=this.menuItems.filter(r=>!r.isDisabled());if(!e.length)return;if(!this.activeMenuItem)return t?Ar(e):e[0];t&&e.reverse();let n,i=!1;for(let r=0;r<e.length;r++){let s=e[r];if(!i){s===this.activeMenuItem&&(i=!0);continue}n=s;break}return i&&!n?e[0]:n||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},sot=class extends j1{constructor(t){super(),this.setTemplateFromElement(t.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t)})}handleKeyDown(t){t.key===It.ESCAPE&&this.closePanel()}onTabKeyDown(t){t.defaultPrevented||(this.closePanel(),t.preventDefault())}closePanel(){let t=this.parentComponent;t.closeSubMenu(),setTimeout(()=>t.getGui().focus(),0)}},lie=class extends Ot{constructor(){super(...arguments),this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}wireBeans(t){this.popupService=t.popupService,this.userComponentFactory=t.userComponentFactory}init(t){let{menuItemDef:e,isAnotherSubMenuOpen:n,level:i,childComponent:r,contextParams:s}=t;return this.params=t.menuItemDef,this.level=i,this.isAnotherSubMenuOpen=n,this.childComponent=r,this.contextParams=s,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,St(ve({},e),{level:i,isAnotherSubMenuOpen:n,openSubMenu:a=>this.openSubMenu(a),closeSubMenu:()=>this.closeSubMenu(),closeMenu:a=>this.closeMenu(a),updateTooltip:(a,l)=>this.refreshTooltip(a,l),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(a=>{this.menuItemComp=a;let l=a.configureDefaults?.();l&&this.configureDefaults(l===!0?void 0:l)})}addListeners(t,e){e?.suppressClick||this.addManagedElementListeners(t,{click:n=>this.onItemSelected(n)}),e?.suppressKeyboardSelect||this.addManagedElementListeners(t,{keydown:n=>{(n.key===It.ENTER||n.key===It.SPACE)&&(n.preventDefault(),this.onItemSelected(n))}}),e?.suppressMouseDown||this.addManagedElementListeners(t,{mousedown:n=>{n.stopPropagation(),n.preventDefault()}}),e?.suppressMouseOver||this.addManagedElementListeners(t,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(t=!1,e){if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;let n=Rp('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=n;let i,r=()=>{this.subMenuIsOpening=!1};if(this.childComponent){let c=this.createBean(new sot(this.childComponent));c.setParentComponent(this);let d=c.getGui(),u="mouseenter",m=()=>this.cancelDeactivate();d.addEventListener(u,m),i=()=>d.removeEventListener(u,m),n.appendChild(d),this.childComponent.afterGuiAttached&&(r=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){let c=this.createBean(new XR(this.level+1,this.contextParams));c.setParentComponent(this),c.addMenuItems(this.params.subMenu),n.appendChild(c.getGui()),this.addManagedListeners(c,{closeMenu:d=>this.dispatchLocalEvent(d)}),c.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),i=()=>this.destroyBean(c),t&&(r=()=>{c.activateFirstItem(),this.subMenuIsOpening=!1})}let{popupService:s}=this,o=()=>{let c=this.eGui;s.positionPopupForMenu({eventSource:c,ePopup:n});let{column:d,node:u}=this.contextParams;s.callPostProcessPopup("subMenu",n,c,e instanceof MouseEvent?e:void 0,d,u)},a=this.localeService.getLocaleTextFunc(),l=s.addPopup({modal:!0,eChild:n,positionCallback:o,anchorToElement:this.eGui,ariaLabel:a("ariaLabelSubMenu","SubMenu"),afterGuiAttached:r});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{l&&l.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),i(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(t){this.suppressAria||ip(this.eGui,t)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(t){this.cancelActivate(),!this.params.disabled&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),t&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(t){this.parentComponent=t}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(t){this.menuItemComp.select?.(),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams(ve({},this.contextParams)))):this.openSubMenu(t&&t.type==="keydown",t),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(t)}closeMenu(t){let e={type:"closeMenu"};t&&(t instanceof MouseEvent?e.mouseEvent=t:e.keyboardEvent=t),this.dispatchLocalEvent(e)}onItemActivated(){let t={type:"menuItemActivated",menuItem:this};this.dispatchLocalEvent(t)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(t){if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(t));return}let e=this.menuItemComp.getGui(),n=this.menuItemComp.getRootElement?.();n&&(t?.suppressRootStyles||e.classList.add("ag-menu-option-custom"),e=n),this.eGui=e,this.suppressRootStyles=!!t?.suppressRootStyles,this.suppressRootStyles||(e.classList.add(this.cssClassPrefix),this.params.cssClasses?.forEach(i=>e.classList.add(i)),this.params.disabled&&e.classList.add(`${this.cssClassPrefix}-disabled`)),t?.suppressTooltip||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!t?.suppressAria,this.suppressAria||(dd(e,"treeitem"),C5(e,this.level+1),this.params.disabled&&wA(e,!0)),t?.suppressTabIndex||e.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(e,t),this.suppressFocus=!!t?.suppressFocus}refreshTooltip(t,e){this.tooltip=t,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),!(!t||!this.menuItemComp)&&(this.tooltipFeature=this.createBean(new W1({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:e})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.menuItemComp?.destroy?.(),super.destroy()}},bxe="ag-list-item-hovered",tbe=class extends Ot{constructor(t,e,n){super(),this.comp=t,this.virtualList=e,this.params=n,this.currentDragValue=null,this.lastHoveredListItem=null}wireBeans(t){this.dragAndDropService=t.dragAndDropService}postConstruct(){this.addManagedListeners(this.params.eventSource,{[this.params.listItemDragStartEvent]:this.listItemDragStart.bind(this),[this.params.listItemDragEndEvent]:this.listItemDragEnd.bind(this)}),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(t){this.currentDragValue=this.params.getCurrentDragValue(t),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){let t={isInterestedIn:e=>e===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:e=>this.onDragging(e),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave()};this.dragAndDropService.addDropTarget(t)}createAutoScrollService(){let t=this.virtualList.getGui();this.autoScrollService=new XB({scrollContainer:t,scrollAxis:"y",getVerticalPosition:()=>t.scrollTop,setVerticalPosition:e=>t.scrollTop=e})}onDragging(t){if(!this.currentDragValue||this.moveBlocked)return;let e=this.getListDragItem(t),n=this.virtualList.getComponentAt(e.rowIndex);if(!n)return;let i=n.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===e.rowIndex&&this.lastHoveredListItem.position===e.position||(this.autoScrollService.check(t.event),this.clearHoveredItems(),this.lastHoveredListItem=e,SA(i,bxe),SA(i,`ag-item-highlight-${e.position}`))}getListDragItem(t){let e=this.virtualList.getGui(),n=parseFloat(window.getComputedStyle(e).paddingTop),i=this.virtualList.getRowHeight(),r=this.virtualList.getScrollTop(),s=Math.max(0,(t.y-n+r)/i),o=this.params.getNumRows(this.comp)-1,a=Math.min(o,s)|0;return{rowIndex:a,position:Math.round(s)>s||s>o?"bottom":"top",component:this.virtualList.getComponentAt(a)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())}onDragLeave(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${bxe}`).forEach(e=>{[bxe,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(n=>{e.classList.remove(n)})}),this.lastHoveredListItem=null}};ibe=class extends j1{constructor(t){super(Lyi(t.cssClass)),this.eHeader=Bt,this.eBody=Bt,this.items=[],this.tabbedItemScrollMap=new Map,this.params=t}wireBeans(t){this.focusService=t.focusService}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(t=>this.addItem(t)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>this.activeItem?.tabbedItem?.afterDetachedCallback?.())}setupHeader(){let{enableCloseButton:t,cssClass:e}=this.params,n=(i,r)=>{i.classList.add(`ag-tabs-${r}`),e&&i.classList.add(`${e}-${r}`)};t?(this.setupCloseButton(n),this.eTabHeader=this.gos.getDocument().createElement("div"),n(this.eHeader,"header-wrapper"),dd(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,dd(this.eTabHeader,"tablist"),n(this.eTabHeader,"header")}setupCloseButton(t){let e=this.gos.getDocument(),n=e.createElement("button");t(n,"close-button");let i=tr("close",this.gos,void 0,!0);hl(n,this.params.closeButtonAriaLabel),n.appendChild(i),this.addManagedElementListeners(n,{click:()=>this.params.onCloseClicked?.()});let r=e.createElement("div");t(r,"close-button-wrapper"),dd(r,"presentation"),r.appendChild(n),this.eHeader.appendChild(r),this.eCloseButton=n}handleKeyDown(t){switch(t.key){case It.RIGHT:case It.LEFT:{if(!this.eTabHeader.contains(this.gos.getActiveDomElement()))return;let e=t.key===It.RIGHT,n=this.gos.get("enableRtl"),i=this.items.indexOf(this.activeItem),r=e!==n?Math.min(i+1,this.items.length-1):Math.max(i-1,0);if(i===r)return;t.preventDefault();let s=this.items[r];this.showItemWrapper(s),s.eHeaderButton.focus();break}case It.UP:case It.DOWN:t.stopPropagation();break}}onTabKeyDown(t){if(t.defaultPrevented)return;let{focusService:e,eHeader:n,eBody:i,activeItem:r,params:s}=this,{suppressTrapFocus:o,enableCloseButton:a}=s,l=this.gos.getActiveDomElement(),c=t.target,d=t.shiftKey;if(n.contains(l)){t.preventDefault(),a&&d&&!this.eCloseButton?.contains(l)?this.eCloseButton?.focus():o&&d?this.focusService.findFocusableElementBeforeTabGuard(this.gos.getDocument().body,c)?.focus():this.focusBody(t.shiftKey);return}let u=null;if(e.isTargetUnderManagedComponent(i,c)&&(d&&(u=this.focusService.findFocusableElementBeforeTabGuard(i,c)),!u&&!o&&(u=r.eHeaderButton)),!u&&i.contains(l)&&(u=e.findNextFocusableElement(i,!1,d),!u)){o&&!d?this.forceFocusOutOfContainer(d):a&&!d?(t.preventDefault(),this.eCloseButton?.focus()):(t.preventDefault(),this.focusHeader());return}u&&(t.preventDefault(),u.focus())}focusInnerElement(t){t?this.focusBody(!0):this.focusHeader()}focusHeader(t){this.activeItem.eHeaderButton.focus({preventScroll:t})}focusBody(t){this.focusService.focusInto(this.eBody,t)}setAfterAttachedParams(t){this.afterAttachedParams=t}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(t){let e=document.createElement("span");dd(e,"tab"),e.setAttribute("tabindex","-1"),e.appendChild(t.title),e.classList.add("ag-tab"),this.eTabHeader.appendChild(e),hl(e,t.titleLabel);let n={tabbedItem:t,eHeaderButton:e};this.items.push(n),e.addEventListener("click",this.showItemWrapper.bind(this,n))}showItem(t){let e=this.items.find(n=>n.tabbedItem===t);e&&this.showItemWrapper(e)}showItemWrapper(t){let{tabbedItem:e,eHeaderButton:n}=t;if(this.params.onItemClicked?.({item:e}),this.activeItem===t){this.params.onActiveItemClicked?.();return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),zo(this.eBody),e.bodyPromise.then(i=>{this.eBody.appendChild(i);let r=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,r),e.afterAttachedCallback&&e.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){let s=e.getScrollableContainer&&e.getScrollableContainer()||i;[this.lastScrollListener]=this.addManagedElementListeners(s,{scroll:()=>{this.tabbedItemScrollMap.set(e.name,s.scrollTop)}});let o=this.tabbedItemScrollMap.get(e.name);o!==void 0&&setTimeout(()=>{s.scrollTop=o},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.()),n.classList.add("ag-tab-selected"),this.activeItem=t}},_ie=class extends Ot{wireBeans(t){this.expressionService=t.expressionService,this.valueService=t.valueService,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.userComponentFactory=t.userComponentFactory,this.ctrlsService=t.ctrlsService,this.funcColsService=t.funcColsService}init(t,e,n,i,r,s,o){this.params=o,this.eGui=e,this.eCheckbox=n,this.eExpanded=i,this.eContracted=r,this.comp=t,this.compClass=s;let{node:a,colDef:l}=o,c=this.isTopLevelFooter();if(!c){if(this.isEmbeddedRowMismatch())return;if(a.footer&&this.gos.get("groupHideOpenParents")){let u=l&&l.showRowGroup,m=a.rowGroupColumn&&a.rowGroupColumn.getColId();if(u!==m)return}}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!c){let d=o.node.footer&&o.node.rowGroupIndex===this.funcColsService.getRowGroupColumns().findIndex(E=>E.getColId()===o.colDef?.showRowGroup),m=this.gos.get("groupDisplayType")!="multipleColumns"||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!o.node.footer&&(!o.node.group||o.node.rowGroupIndex!=null&&o.node.rowGroupIndex>this.funcColsService.getRowGroupColumns().findIndex(E=>E.getColId()===o.colDef?.showRowGroup)),f=!a.group&&(this.params.colDef?.field||this.params.colDef?.valueGetter),_=this.isExpandable(),x=this.columnModel.isPivotMode()&&a.leafGroup&&a.rowGroupColumn?.getColId()===o.column?.getColDef().showRowGroup;if(!this.showingValueForOpenedParent&&!_&&!f&&!m&&!d&&!x)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}getCellAriaRole(){let t=this.params.colDef?.cellAriaRole,e=this.params.column?.getColDef().cellAriaRole;return t||e||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){let{node:t,eGridCell:e}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){zZ(e);return}let n=()=>{ip(e,this.showingValueForOpenedParent||!!t.expanded)};[this.expandListener]=this.addManagedListeners(t,{expandedChanged:n})||null,n()}isTopLevelFooter(){if(!this.gos.getGrandTotalRow()||this.params.value!=null||this.params.node.level!=-1)return!1;let e=this.params.colDef;if(e==null||e.showRowGroup===!0)return!0;let i=this.funcColsService.getRowGroupColumns();return!i||i.length===0?!0:i[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;let t=this.params.pinned==="left",e=this.params.pinned==="right",n=!t&&!e;return this.gos.get("enableRtl")?this.visibleColsService.isPinningLeft()?!e:!n:this.visibleColsService.isPinningLeft()?!t:!n}findDisplayedGroupNode(){let t=this.params.column,e=this.params.node;if(this.showingValueForOpenedParent){let n=e.parent;for(;n!=null;){if(n.rowGroupColumn&&t.isRowGroupDisplayed(n.rowGroupColumn.getId())){this.displayedGroupNode=n;break}n=n.parent}}Ls(this.displayedGroupNode)&&(this.displayedGroupNode=e)}setupShowingValueForOpenedParent(){let t=this.params.node,e=this.params.column;if(!this.gos.get("groupHideOpenParents")){this.showingValueForOpenedParent=!1;return}if(!t.groupData){this.showingValueForOpenedParent=!1;return}if(t.rowGroupColumn!=null){let r=t.rowGroupColumn.getId();if(e.isRowGroupDisplayed(r)){this.showingValueForOpenedParent=!1;return}}let i=t.groupData[e.getId()]!=null;this.showingValueForOpenedParent=i}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){let t=this.adjustParamsWithDetailsFromRelatedColumn(),e=this.getInnerCompDetails(t),{valueFormatted:n,value:i}=t,r=n;if(r==null){let s=this.displayedGroupNode.rowGroupColumn&&this.params.column?.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId());this.displayedGroupNode.key===""&&this.displayedGroupNode.group&&s?r=this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):r=i??null}this.comp.setInnerRenderer(e,r)}adjustParamsWithDetailsFromRelatedColumn(){let t=this.displayedGroupNode.rowGroupColumn,e=this.params.column;if(!t)return this.params;if(e!=null&&!e.isRowGroupDisplayed(t.getId()))return this.params;let i=this.params,{value:r,node:s}=this.params,o=this.valueService.formatValue(t,s,r);return St(ve({},i),{valueFormatted:o})}addFooterValue(){let t=this.params.totalValueGetter;if(!t){let i=this.params.footerValueGetter;i&&(t=i,wt("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let e="";if(t){let i=T7(this.params);i.value=this.params.value,typeof t=="function"?e=t(i):typeof t=="string"?e=this.expressionService.evaluate(t,i):wt("footerValueGetter should be either a function or a string (expression)")}else e=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(this.params.value!=null?this.params.value:"");let n=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(n,e)}getInnerCompDetails(t){if(t.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),t);let e=this.userComponentFactory.getInnerRendererDetails(t,t),n=o=>o&&o.componentClass==this.compClass;if(e&&!n(e))return e;let i=this.displayedGroupNode.rowGroupColumn,r=i?i.getColDef():void 0;if(!r)return;let s=this.userComponentFactory.getCellRendererDetails(r,t);if(s&&!n(s))return s;if(n(s)&&r.cellRendererParams&&r.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(r.cellRendererParams,t)}addChildCount(){this.params.suppressCount||(this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:this.updateChildCount.bind(this)}),this.updateChildCount())}updateChildCount(){let t=this.displayedGroupNode.allChildrenCount,i=this.isShowRowGroupForThisRow()&&t!=null&&t>=0?`(${t})`:"";this.comp.setChildCount(i)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;let t=this.displayedGroupNode.rowGroupColumn;if(!t)return!1;let e=this.params.column;return e==null||e.isRowGroupDisplayed(t.getId())}addExpandAndContract(){let t=this.params,e=tr("groupExpanded",this.gos,null),n=tr("groupContracted",this.gos,null);e&&this.eExpanded.appendChild(e),n&&this.eContracted.appendChild(n);let i=t.eGridCell;!(this.params.column?.isCellEditable(t.node)&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!t.suppressDoubleClickExpand&&this.addManagedListeners(i,{dblclick:this.onCellDblClicked.bind(this)}),this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(i,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(t.node,{expandedChanged:this.showExpandAndContractIcons.bind(this)}),this.showExpandAndContractIcons();let s=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListeners(this.displayedGroupNode,{allChildrenCountChanged:s,masterChanged:s,groupChanged:s,hasChildrenChanged:s})}onExpandClicked(t){gg(t)||(Zc(t),this.onExpandOrContract(t))}onExpandOrContract(t){let e=this.displayedGroupNode,n=!e.expanded;!n&&e.sticky&&this.scrollToStickyNode(e),e.setExpanded(n,t)}scrollToStickyNode(t){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(t.rowTop-t.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;let t=this.displayedGroupNode,e=this.columnModel.isPivotMode()&&t.leafGroup;if(!(t.isExpandable()&&!t.footer&&!e))return!1;let i=this.params.column;return i!=null&&typeof i.getColDef().showRowGroup=="string"?this.isShowRowGroupForThisRow():!0}showExpandAndContractIcons(){let{params:t,displayedGroupNode:e,columnModel:n}=this,{node:i}=t,r=this.isExpandable();if(r){let c=this.showingValueForOpenedParent?!0:i.expanded;this.comp.setExpandedDisplayed(c),this.comp.setContractedDisplayed(!c)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);let s=n.isPivotMode(),o=s&&e.leafGroup,a=r&&!o,l=i.footer&&i.level===-1;this.comp.addOrRemoveCssClass("ag-cell-expandable",a),this.comp.addOrRemoveCssClass("ag-row-group",a),s?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",!!o):l||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!a)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){let t=this.params.node;this.params.suppressPadding||(this.addManagedListeners(t,{uiLevelChanged:this.setIndent.bind(this)}),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;let t=this.params,e=t.node,n=!!t.colDef,i=this.gos.get("treeData"),s=!n||i||t.colDef.showRowGroup===!0?e.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+s,this.comp.addOrRemoveCssClass(this.indentClass,!0),this.eGui.style.setProperty("--ag-indentation-level",String(s))}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;let t=new GB(()=>this.params.value,this.params.node);this.createManagedBean(t),this.eGui.insertAdjacentElement("afterbegin",t.getGui())}isUserWantsSelected(){let t=this.params.checkbox;return typeof t=="function"||t===!0}addCheckboxIfNeeded(){let t=this.displayedGroupNode,e=this.isUserWantsSelected()&&!t.footer&&!t.rowPinned&&!t.detail;if(e){let n=new a4e;this.createBean(n),n.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(n.getGui()),this.addDestroyFunc(()=>this.destroyBean(n))}this.comp.setCheckboxVisible(e)}onKeyDown(t){!(t.key===It.ENTER)||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(t)}onCellDblClicked(t){if(gg(t))return;NZ(this.eExpanded,t)||NZ(this.eContracted,t)||this.onExpandOrContract(t)}},Oyi=`<span class="ag-cell-wrapper">
        <span class="ag-group-expanded" data-ref="eExpanded"></span>
        <span class="ag-group-contracted" data-ref="eContracted"></span>
        <span class="ag-group-checkbox ag-invisible" data-ref="eCheckbox"></span>
        <span class="ag-group-value" data-ref="eValue"></span>
        <span class="ag-group-child-count" data-ref="eChildCount"></span>
    </span>`,cW=class extends ai{constructor(){super(Oyi),this.eExpanded=Bt,this.eContracted=Bt,this.eCheckbox=Bt,this.eValue=Bt,this.eChildCount=Bt}init(t){let e={setInnerRenderer:(s,o)=>this.setRenderDetails(s,o),setChildCount:s=>this.eChildCount.textContent=s,addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),setContractedDisplayed:s=>Vn(this.eContracted,s),setExpandedDisplayed:s=>Vn(this.eExpanded,s),setCheckboxVisible:s=>this.eCheckbox.classList.toggle("ag-invisible",!s)},n=this.createManagedBean(new _ie),i=!t.colDef,r=this.getGui();n.init(e,r,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,t),i&&dd(r,n.getCellAriaRole())}setRenderDetails(t,e){if(t){let n=t.newAgStackInstance();if(n==null)return;n.then(i=>{if(!i)return;let r=()=>this.destroyBean(i);this.isAlive()?(this.eValue.appendChild(i.getGui()),this.addDestroyFunc(r)):r()})}else this.eValue.innerText=e}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}};Hyi={ariaAdvancedFilterBuilderItem:t=>`${t[0]}. Level ${t[1]}. Press ENTER to edit`,ariaAdvancedFilterBuilderItemValidation:t=>`${t[0]}. Level ${t[1]}. ${t[2]} Press ENTER to edit`,ariaAdvancedFilterBuilderList:"Advanced Filter Builder List",ariaAdvancedFilterBuilderFilterItem:"Filter Condition",ariaAdvancedFilterBuilderGroupItem:"Filter Group",ariaAdvancedFilterBuilderColumn:"Column",ariaAdvancedFilterBuilderOption:"Option",ariaAdvancedFilterBuilderValue:"Value",ariaAdvancedFilterBuilderJoinOperator:"Join Operator",ariaAdvancedFilterInput:"Advanced Filter Input",ariaLabelAdvancedFilterAutocomplete:"Advanced Filter Autocomplete",advancedFilterContains:"contains",advancedFilterNotContains:"does not contain",advancedFilterTextEquals:"equals",advancedFilterTextNotEqual:"does not equal",advancedFilterStartsWith:"begins with",advancedFilterEndsWith:"ends with",advancedFilterBlank:"is blank",advancedFilterNotBlank:"is not blank",advancedFilterEquals:"=",advancedFilterNotEqual:"!=",advancedFilterGreaterThan:">",advancedFilterGreaterThanOrEqual:">=",advancedFilterLessThan:"<",advancedFilterLessThanOrEqual:"<=",advancedFilterTrue:"is true",advancedFilterFalse:"is false",advancedFilterAnd:"AND",advancedFilterOr:"OR",advancedFilterApply:"Apply",advancedFilterBuilder:"Builder",advancedFilterValidationMissingColumn:"Column is missing",advancedFilterValidationMissingOption:"Option is missing",advancedFilterValidationMissingValue:"Value is missing",advancedFilterValidationInvalidColumn:"Column not found",advancedFilterValidationInvalidOption:"Option not found",advancedFilterValidationMissingQuote:"Value is missing an end quote",advancedFilterValidationNotANumber:"Value is not a number",advancedFilterValidationInvalidDate:"Value is not a valid date",advancedFilterValidationMissingCondition:"Condition is missing",advancedFilterValidationJoinOperatorMismatch:"Join operators within a condition must be the same",advancedFilterValidationInvalidJoinOperator:"Join operator not found",advancedFilterValidationMissingEndBracket:"Missing end bracket",advancedFilterValidationExtraEndBracket:"Too many end brackets",advancedFilterValidationMessage:t=>`Expression has an error. ${t[0]} - ${t[1]}.`,advancedFilterValidationMessageAtEnd:t=>`Expression has an error. ${t[0]} at end of expression.`,advancedFilterBuilderTitle:"Advanced Filter",advancedFilterBuilderApply:"Apply",advancedFilterBuilderCancel:"Cancel",advancedFilterBuilderAddButtonTooltip:"Add Filter or Group",advancedFilterBuilderRemoveButtonTooltip:"Remove",advancedFilterBuilderMoveUpButtonTooltip:"Move Up",advancedFilterBuilderMoveDownButtonTooltip:"Move Down",advancedFilterBuilderAddJoin:"Add Group",advancedFilterBuilderAddCondition:"Add Filter",advancedFilterBuilderSelectColumn:"Select a column",advancedFilterBuilderSelectOption:"Select an option",advancedFilterBuilderEnterValue:"Enter a value...",advancedFilterBuilderValidationAlreadyApplied:"Current filter already applied.",advancedFilterBuilderValidationIncomplete:"Not all conditions are complete.",advancedFilterBuilderValidationSelectColumn:"Must select a column.",advancedFilterBuilderValidationSelectOption:"Must select an option.",advancedFilterBuilderValidationEnterValue:"Must enter a value."};Uyi=class{constructor(t,e){this.params=t,this.startPosition=e,this.type="column",this.valid=!0,this.hasStartChar=!1,this.hasEndChar=!1,this.colName=""}parse(t,e){if(t===GE.COL_START_CHAR&&!this.colName)this.hasStartChar=!0;else if(t===GE.COL_END_CHAR&&this.hasStartChar){if(this.parseColumn(!1,e))return this.hasEndChar=!0,!1;this.colName+=t}else this.colName+=t}getDisplayValue(){return(this.hasStartChar?GE.COL_START_CHAR:"")+this.colName+(this.hasEndChar?GE.COL_END_CHAR:"")}getColId(){return this.colId}complete(t){this.parseColumn(!0,t)}getValidationError(){return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidColumn"),startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}}parseColumn(t,e){this.endPosition=e;let n=this.params.advancedFilterExpressionService.getColId(this.colName);return n&&this.hasStartChar&&(this.colId=n.colId,nbe(this.params,this.colName,n.columnName,e-1),this.colName=n.columnName,this.column=this.params.columnModel.getColDefCol(this.colId),this.column)?(this.baseCellDataType=this.params.dataTypeService?.getBaseDataType(this.column)??"text",!0):(t&&(this.valid=!1),this.baseCellDataType="text",!1)}},jyi=class{constructor(t,e,n){this.params=t,this.startPosition=e,this.baseCellDataType=n,this.type="operator",this.valid=!0,this.expectedNumOperands=0,this.operator=""}parse(t,e){if(t===" "||t===")"){if(this.parseOperator(!1,e-1))return!0;this.operator+=t}else this.operator+=t}complete(t){this.parseOperator(!0,t)}getValidationError(){return this.valid?null:{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidOption"),startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}}getDisplayValue(){return this.operator}getOperatorKey(){return this.parsedOperator}parseOperator(t,e){let n=this.params.advancedFilterExpressionService.getDataTypeExpressionOperator(this.baseCellDataType),i=n.findOperator(this.operator);if(this.endPosition=e,i){this.parsedOperator=i;let s=n.operators[i];this.expectedNumOperands=s.numOperands;let o=s.displayValue;return nbe(this.params,this.operator,o,e),this.operator=o,!0}return(t||!(i===null))&&(this.valid=!1),!1}},$yi=class{constructor(t,e,n,i){this.params=t,this.startPosition=e,this.baseCellDataType=n,this.column=i,this.type="operand",this.valid=!0,this.operand="",this.validationMessage=null}parse(t,e){if(t===" ")if(this.quotes)this.operand+=t;else return this.parseOperand(!1,e),!0;else if(t===")"){if(this.baseCellDataType==="number"||!this.quotes)return this.parseOperand(!1,e-1),!0;this.operand+=t}else if(!this.operand&&!this.quotes&&(t==="'"||t==='"'))this.quotes=t;else{if(this.quotes&&t===this.quotes)return this.parseOperand(!1,e),!1;this.operand+=t}}complete(t){this.parseOperand(!0,t)}getValidationError(){return this.validationMessage?{message:this.validationMessage,startPosition:this.startPosition,endPosition:this.endPosition??this.params.expression.length-1}:null}getRawValue(){return this.operand}getModelValue(){return this.modelValue}parseOperand(t,e){let{advancedFilterExpressionService:n}=this.params;if(this.endPosition=e,this.modelValue=this.operand,t&&this.quotes)this.valid=!1,this.validationMessage=n.translate("advancedFilterValidationMissingQuote");else if(this.modelValue==="")this.valid=!1,this.validationMessage=n.translate("advancedFilterValidationMissingValue");else{let i=n.getOperandModelValue(this.operand,this.baseCellDataType,this.column);switch(i!=null&&(this.modelValue=i),this.baseCellDataType){case"number":(this.quotes||isNaN(this.modelValue))&&(this.valid=!1,this.validationMessage=n.translate("advancedFilterValidationNotANumber"));break;case"date":case"dateString":i==null&&(this.valid=!1,this.validationMessage=n.translate("advancedFilterValidationInvalidDate"));break}}}},GE=(()=>{let t=class{constructor(e,n){this.params=e,this.startPosition=n,this.isAwaiting=!0}parseExpression(){let e=this.startPosition,{expression:n}=this.params;for(;e<n.length;){let i=n[e];if(!(i===" "&&this.isAwaiting)){if(this.isAwaiting=!1,!this.parser){let s;this.columnParser?this.operatorParser?(this.operandParser=new $yi(this.params,e,this.columnParser.baseCellDataType,this.columnParser.column),s=this.operandParser):(this.operatorParser=new jyi(this.params,e,this.columnParser.baseCellDataType),s=this.operatorParser):(this.columnParser=new Uyi(this.params,e),s=this.columnParser),this.parser=s}let r=this.parser.parse(i,e);if(r!=null){if(this.isComplete())return this.returnEndPosition(r?e-1:e,!0);this.parser=void 0,this.isAwaiting=!0}}e++}return this.parser?.complete?.(e-1),this.returnEndPosition(e)}isValid(){return this.isComplete()&&this.columnParser.valid&&this.operatorParser.valid&&(!this.operandParser||this.operandParser.valid)}getValidationError(){let e=this.columnParser?.getValidationError()??this.operatorParser?.getValidationError()??this.operandParser?.getValidationError();if(e)return e;let n=this.params.expression.length,i;return this.columnParser?this.operatorParser?this.operatorParser.expectedNumOperands&&!this.operandParser&&(i="advancedFilterValidationMissingValue"):i="advancedFilterValidationMissingOption":i="advancedFilterValidationMissingColumn",i?{message:this.params.advancedFilterExpressionService.translate(i),startPosition:n,endPosition:n}:null}getFunctionString(e){return this.getFunctionCommon(e,(n,i,r,s)=>{let o=Wyi(r),a=n==null?"":`, params.operands[${n}]`;return`params.operators[${i}].evaluator(expressionProxy.getValue('${o}', node), node, params.evaluatorParams[${s}]${a})`})}getFunctionParsed(e){return this.getFunctionCommon(e,(n,i,r,s)=>(o,a,l)=>l.operators[i].evaluator(o.getValue(r,a),a,l.evaluatorParams[s],n==null?void 0:l.operands[n]))}getAutocompleteListParams(e){if(this.isColumnPosition(e))return this.getColumnAutocompleteListParams(e);if(this.isOperatorPosition(e))return this.getOperatorAutocompleteListParams(e);if(!this.isBeyondEndPosition(e))return{enabled:!1}}updateExpression(e,n,i){let{expression:r}=this.params;if(this.isColumnPosition(e))return Bw(this.params.expression,this.startPosition,this.columnParser?.getColId()?this.columnParser.endPosition:Lxe(r,e).endPosition,this.params.advancedFilterExpressionService.getColumnValue(n),!0);if(this.isOperatorPosition(e)){let s=this.getBaseCellDataTypeFromOperatorAutocompleteType(i),o=this.hasOperand(s,n.key),a=o&&this.doesOperandNeedQuotes(s),l;if(this.operatorParser?.startPosition!=null&&e<this.operatorParser.startPosition)l=Bw(r,e,e,n.displayValue??n.key,o,a);else{let c,d=!1;if(this.operatorParser?.getOperatorKey())c=this.operatorParser.endPosition;else{let{endPosition:u,isEmpty:m}=Lxe(r,e,!0,!0);c=u,d=m}l=Bw(r,Gyi(r,this.columnParser.endPosition+1,c),c,n.displayValue??n.key,o,a,d)}return St(ve({},l),{hideAutocomplete:!o})}return null}getModel(){let e=this.columnParser.getColId(),n={filterType:this.columnParser.baseCellDataType,colId:e,type:this.operatorParser.getOperatorKey()};return this.operatorParser.expectedNumOperands&&(n.filter=this.operandParser.getModelValue()),n}getFunctionCommon(e,n){let i=this.columnParser.getColId(),r=this.operatorParser?.getOperatorKey(),{operators:s,evaluatorParams:o,operands:a}=e,l=this.params.advancedFilterExpressionService.getExpressionOperator(this.columnParser.baseCellDataType,r),c=this.addToListAndGetIndex(s,l),d=this.params.advancedFilterExpressionService.getExpressionEvaluatorParams(i),u=this.addToListAndGetIndex(o,d),m=this.operatorParser?.expectedNumOperands===0?void 0:this.addToListAndGetIndex(a,this.getOperandValue());return n(m,c,i,u)}getOperandValue(){let e=this.operandParser.getRawValue(),{baseCellDataType:n,column:i}=this.columnParser;switch(n){case"number":e=Number(e);break;case"date":case"dateString":e=this.params.valueService.parseValue(i,null,e,void 0);break}if(n==="dateString"){let{dataTypeService:r}=this.params;return r?r.getDateParserFunction(i)(e):e}return e}isComplete(){return!!(this.operatorParser&&(!this.operatorParser.expectedNumOperands||this.operatorParser.expectedNumOperands&&this.operandParser))}isColumnPosition(e){return!this.columnParser||this.columnParser.endPosition==null||e<=this.columnParser.endPosition+1}isOperatorPosition(e){return!this.operatorParser||this.operatorParser.endPosition==null||e<=this.operatorParser.endPosition+1}isBeyondEndPosition(e){return this.isComplete()&&this.endPosition!=null&&e>this.endPosition+1&&this.endPosition+1<this.params.expression.length}returnEndPosition(e,n){return this.endPosition=n?e:e-1,e}getColumnAutocompleteListParams(e){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column",this.getColumnSearchString(e))}getColumnSearchString(e){let n=this.columnParser?.getDisplayValue()??"",i=Fxe(n,e,this.columnParser?.endPosition==null?this.params.expression.length:this.columnParser.endPosition+1),r=this.columnParser?.hasStartChar&&i.length>0,s=this.columnParser?.hasEndChar&&i.length===n.length+2;return r?i.slice(1,s?-1:void 0):i}getOperatorAutocompleteListParams(e){let n=this.columnParser?.column;if(!n)return{enabled:!1};let i=this.columnParser.baseCellDataType,r=this.operatorParser?.startPosition!=null&&e<this.operatorParser.startPosition?"":Fxe(this.operatorParser?.getDisplayValue()??"",e,this.operatorParser?.endPosition==null?this.params.expression.length:this.operatorParser.endPosition+1);return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getOperatorAutocompleteEntries(n,i),`operator-${i}`,r)}getBaseCellDataTypeFromOperatorAutocompleteType(e){return e?.replace("operator-","")}hasOperand(e,n){return!e||!n||(this.params.advancedFilterExpressionService.getExpressionOperator(e,n)?.numOperands??0)>0}doesOperandNeedQuotes(e){return e!=="number"}addToListAndGetIndex(e,n){let i=e.length;return e.push(n),i}};return t.COL_START_CHAR="[",t.COL_END_CHAR="]",t})();gst=class{constructor(t){this.params=t,this.initOperators()}getEntries(t){return rbe(this.operators,t)}findOperator(t){return Cie(t,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:t}=this.params;this.operators={contains:{displayValue:t("advancedFilterContains"),evaluator:(e,n,i,r)=>this.evaluateExpression(e,n,i,r,!1,(s,o)=>s.includes(o)),numOperands:1},notContains:{displayValue:t("advancedFilterNotContains"),evaluator:(e,n,i,r)=>this.evaluateExpression(e,n,i,r,!0,(s,o)=>!s.includes(o)),numOperands:1},equals:{displayValue:t("advancedFilterTextEquals"),evaluator:(e,n,i,r)=>this.evaluateExpression(e,n,i,r,!1,(s,o)=>s===o),numOperands:1},notEqual:{displayValue:t("advancedFilterTextNotEqual"),evaluator:(e,n,i,r)=>this.evaluateExpression(e,n,i,r,!0,(s,o)=>s!=o),numOperands:1},startsWith:{displayValue:t("advancedFilterStartsWith"),evaluator:(e,n,i,r)=>this.evaluateExpression(e,n,i,r,!1,(s,o)=>s.startsWith(o)),numOperands:1},endsWith:{displayValue:t("advancedFilterEndsWith"),evaluator:(e,n,i,r)=>this.evaluateExpression(e,n,i,r,!1,(s,o)=>s.endsWith(o)),numOperands:1},blank:{displayValue:t("advancedFilterBlank"),evaluator:e=>e==null||typeof e=="string"&&e.trim().length===0,numOperands:0},notBlank:{displayValue:t("advancedFilterNotBlank"),evaluator:e=>e!=null&&(typeof e!="string"||e.trim().length>0),numOperands:0}}}evaluateExpression(t,e,n,i,r,s){return t==null?r:n.caseSensitive?s(n.valueConverter(t,e),i):s(n.valueConverter(t,e).toLocaleLowerCase(),i.toLocaleLowerCase())}},wxe=class{constructor(t){this.params=t,this.initOperators()}getEntries(t){return rbe(this.operators,t)}findOperator(t){return Cie(t,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:t,equals:e}=this.params;this.operators={equals:{displayValue:t("advancedFilterEquals"),evaluator:(n,i,r,s)=>this.evaluateSingleOperandExpression(n,i,r,s,!!r.includeBlanksInEquals,e),numOperands:1},notEqual:{displayValue:t("advancedFilterNotEqual"),evaluator:(n,i,r,s)=>this.evaluateSingleOperandExpression(n,i,r,s,!!r.includeBlanksInEquals,(o,a)=>!e(o,a)),numOperands:1},greaterThan:{displayValue:t("advancedFilterGreaterThan"),evaluator:(n,i,r,s)=>this.evaluateSingleOperandExpression(n,i,r,s,!!r.includeBlanksInGreaterThan,(o,a)=>o>a),numOperands:1},greaterThanOrEqual:{displayValue:t("advancedFilterGreaterThanOrEqual"),evaluator:(n,i,r,s)=>this.evaluateSingleOperandExpression(n,i,r,s,!!r.includeBlanksInGreaterThan,(o,a)=>o>=a),numOperands:1},lessThan:{displayValue:t("advancedFilterLessThan"),evaluator:(n,i,r,s)=>this.evaluateSingleOperandExpression(n,i,r,s,!!r.includeBlanksInLessThan,(o,a)=>o<a),numOperands:1},lessThanOrEqual:{displayValue:t("advancedFilterLessThanOrEqual"),evaluator:(n,i,r,s)=>this.evaluateSingleOperandExpression(n,i,r,s,!!r.includeBlanksInLessThan,(o,a)=>o<=a),numOperands:1},blank:{displayValue:t("advancedFilterBlank"),evaluator:n=>n==null,numOperands:0},notBlank:{displayValue:t("advancedFilterNotBlank"),evaluator:n=>n!=null,numOperands:0}}}evaluateSingleOperandExpression(t,e,n,i,r,s){return t==null?r:s(n.valueConverter(t,e),i)}},Kyi=class{constructor(t){this.params=t,this.initOperators()}getEntries(t){return rbe(this.operators,t)}findOperator(t){return Cie(t,this.operators,({displayValue:e})=>e)}initOperators(){let{translate:t}=this.params;this.operators={true:{displayValue:t("advancedFilterTrue"),evaluator:e=>!!e,numOperands:0},false:{displayValue:t("advancedFilterFalse"),evaluator:e=>e===!1,numOperands:0},blank:{displayValue:t("advancedFilterBlank"),evaluator:e=>e==null,numOperands:0},notBlank:{displayValue:t("advancedFilterNotBlank"),evaluator:e=>e!=null,numOperands:0}}}},Yyi=class extends Ot{constructor(){super(...arguments),this.beanName="advancedFilterExpressionService",this.columnNameToIdMap={},this.columnAutocompleteEntries=null,this.expressionEvaluatorParams={}}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.dataTypeService=t.dataTypeService}postConstruct(){this.expressionJoinOperators=this.generateExpressionJoinOperators(),this.expressionOperators=this.generateExpressionOperators()}parseJoinOperator(t){let{type:e}=t;return this.expressionJoinOperators[e]??e}getColumnDisplayValue(t){let{colId:e}=t,i=this.getColumnAutocompleteEntries().find(({key:s})=>s===e),r;return i?(r=i.displayValue,this.columnNameToIdMap[r.toLocaleUpperCase()]={colId:e,columnName:r}):r=e,r}getOperatorDisplayValue(t){return this.getExpressionOperator(t.filterType,t.type)?.displayValue??t.type}getOperandModelValue(t,e,n){switch(e){case"number":return Di(t)?Number(t):null;case"date":return vg(this.valueService.parseValue(n,null,t,void 0),!1);case"dateString":{let i=this.valueService.parseValue(n,null,t,void 0);return this.dataTypeService?vg(this.dataTypeService.getDateParserFunction(n)(i)??null,!1):i}}return t}getOperandDisplayValue(t,e){let{colId:n,filter:i}=t,r=this.columnModel.getColDefCol(n),s="";if(i!=null){let o;switch(t.filterType){case"number":o=G1(i)??"";break;case"date":{let a=A0(i);o=r?this.valueService.formatValue(r,null,a):null;break}case"dateString":{let a;if(this.dataTypeService){let l=A0(i);a=r?this.dataTypeService?.getDateFormatterFunction(r)(l??void 0):null}else a=i;o=r?this.valueService.formatValue(r,null,a):null;break}}t.filterType!=="number"&&(o=o??G1(i)??"",e||(o=`"${o}"`)),s=e?o:` ${o}`}return s}parseColumnFilterModel(t){let e=this.getColumnDisplayValue(t)??"",n=this.getOperatorDisplayValue(t)??"",i=this.getOperandDisplayValue(t);return`[${e}] ${n}${i}`}updateAutocompleteCache(t,e){if(e==="column"){let{key:n,displayValue:i}=t;this.columnNameToIdMap[t.displayValue.toLocaleUpperCase()]={colId:n,columnName:i}}}translate(t,e){let n=Hyi[t];return typeof n=="function"&&(n=n(e)),this.localeService.getLocaleTextFunc()(t,n,e)}generateAutocompleteListParams(t,e,n){return{enabled:!0,type:e,searchString:n,entries:t}}getColumnAutocompleteEntries(){if(this.columnAutocompleteEntries)return this.columnAutocompleteEntries;let t=this.columnModel.getColDefCols()??[],e=[],n=this.gos.get("includeHiddenColumnsInAdvancedFilter");return t.forEach(i=>{i.getColDef().filter&&(n||i.isVisible()||i.isRowGroupActive())&&e.push({key:i.getColId(),displayValue:this.columnNameService.getDisplayNameForColumn(i,"advancedFilter")})}),e.sort((i,r)=>{let s=i.displayValue??"",o=r.displayValue??"";return s<o?-1:o>s?1:0}),e}getOperatorAutocompleteEntries(t,e){let n=this.getActiveOperators(t);return this.getDataTypeExpressionOperator(e).getEntries(n)}getJoinOperatorAutocompleteEntries(){return Object.entries(this.expressionJoinOperators).map(([t,e])=>({key:t,displayValue:e}))}getDefaultAutocompleteListParams(t){return this.generateAutocompleteListParams(this.getColumnAutocompleteEntries(),"column",t)}getDataTypeExpressionOperator(t){return this.expressionOperators[t]}getExpressionOperator(t,e){return this.getDataTypeExpressionOperator(t)?.operators?.[e]}getExpressionJoinOperators(){return this.expressionJoinOperators}getColId(t){let e=t.toLocaleUpperCase(),n=this.columnNameToIdMap[e];if(n)return n;let r=this.getColumnAutocompleteEntries().find(({displayValue:s})=>s.toLocaleUpperCase()===e);if(r){let{key:s,displayValue:o}=r,a={colId:s,columnName:o};return this.columnNameToIdMap[e]=a,a}return null}getExpressionEvaluatorParams(t){let e=this.expressionEvaluatorParams[t];if(e)return e;let n=this.columnModel.getColDefCol(t);if(!n)return{valueConverter:s=>s};switch(this.dataTypeService?.getBaseDataType(n)){case"dateString":e={valueConverter:this.dataTypeService?.getDateParserFunction(n)??(s=>s)};break;case"object":n.getColDef().filterValueGetter?e={valueConverter:s=>s}:e={valueConverter:(s,o)=>this.valueService.formatValue(n,o,s)??(typeof s.toString=="function"?s.toString():"")};break;case"text":case void 0:e={valueConverter:s=>G1(s)};break;default:e={valueConverter:s=>s};break}let{filterParams:r}=n.getColDef();return r&&["caseSensitive","includeBlanksInEquals","includeBlanksInLessThan","includeBlanksInGreaterThan"].forEach(s=>{let o=r[s];o&&(e[s]=o)}),this.expressionEvaluatorParams[t]=e,e}getColumnDetails(t){let e=this.columnModel.getColDefCol(t)??void 0,n=(e?this.dataTypeService?.getBaseDataType(e):void 0)??"text";return{column:e,baseCellDataType:n}}generateExpressionOperators(){let t=(e,n)=>this.translate(e,n);return{text:new gst({translate:t}),boolean:new Kyi({translate:t}),object:new gst({translate:t}),number:new wxe({translate:t,equals:(e,n)=>e===n}),date:new wxe({translate:t,equals:(e,n)=>e.getTime()===n.getTime()}),dateString:new wxe({translate:t,equals:(e,n)=>e.getTime()===n.getTime()})}}getColumnValue({displayValue:t}){return`${GE.COL_START_CHAR}${t}${GE.COL_END_CHAR}`}generateExpressionJoinOperators(){return{AND:this.translate("advancedFilterAnd"),OR:this.translate("advancedFilterOr")}}getActiveOperators(t){let e=t.getColDef().filterParams?.filterOptions;return e&&e.every(i=>typeof i=="string")?e:void 0}resetColumnCaches(){this.columnAutocompleteEntries=null,this.columnNameToIdMap={},this.expressionEvaluatorParams={}}},qyi=class extends ai{constructor(){super(`
        <div class="ag-autocomplete-row" role="presentation">
            <div class="ag-autocomplete-row-label"></div>
        </div>`),this.hasHighlighting=!1}setState(t,e){this.value=t,this.render(),this.updateSelected(e)}updateSelected(t){this.addOrRemoveCssClass("ag-autocomplete-row-selected",t)}setSearchString(t){let e=!1;if(Di(t)){let n=this.value?.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());if(n>=0){e=!0,this.hasHighlighting=!0;let i=n+t.length,r=nl(this.value.slice(0,n)),s=nl(this.value.slice(n,i)),o=nl(this.value.slice(i));this.getGui().lastElementChild.innerHTML=`${r}<b>${s}</b>${o}`}}!e&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){this.getGui().lastElementChild.innerHTML=nl(this.value)??"&nbsp;"}},Zyi=class extends w5{constructor(t){super(`<div class="ag-autocomplete-list-popup">
            <div data-ref="eList" class="ag-autocomplete-list"></div>
        <div>`),this.params=t,this.eList=Bt,this.searchString=""}destroy(){super.destroy()}postConstruct(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new YE({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:e=>this.autocompleteEntries[e]});let t=this.virtualList.getGui();this.addManagedListeners(t,{click:()=>this.params.onConfirmed(),mousemove:this.onMouseMove.bind(this),mousedown:e=>e.preventDefault()}),this.setSelectedValue(0)}onNavigationKeyDown(t,e){t.preventDefault();let n=this.autocompleteEntries.indexOf(this.selectedValue),i=e===It.UP?n-1:n+1;this.checkSetSelectedValue(i)}setSearch(t){this.searchString=t,Di(t)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(t,e){let n,i=!1,r=t.toLocaleLowerCase(),s=e.filter(o=>{let l=o.toLocaleLowerCase().indexOf(r),c=l===0,d=l>=0;return d&&(!n||!i&&c||i===c&&o.length<n.length)&&(n=o,i=c),d});return!n&&s.length&&(n=s[0]),{topMatch:n,allMatches:s}}runSearch(){let{autocompleteEntries:t}=this.params,e=t.map(o=>o.displayValue??o.key),n,i;if(this.params.useFuzzySearch)n=DA(this.searchString,e,!0).values,i=n.length?n[0]:void 0;else{let o=this.runContainsSearch(this.searchString,e);n=o.allMatches,i=o.topMatch}let r=t.filter(({key:o,displayValue:a})=>n.includes(a??o));if(!r.length&&this.selectedValue&&this.params?.forceLastSelection?.(this.selectedValue,this.searchString)&&(r=[this.selectedValue]),this.autocompleteEntries=r,this.virtualList.refresh(),!i)return;let s=n.indexOf(i);this.checkSetSelectedValue(s)}updateSearchInList(){this.virtualList.forEachRenderedRow(t=>t.setSearchString(this.searchString))}checkSetSelectedValue(t){t>=0&&t<this.autocompleteEntries.length&&this.setSelectedValue(t)}setSelectedValue(t){let e=this.autocompleteEntries[t];this.selectedValue!==e&&(this.selectedValue=e,this.virtualList.ensureIndexVisible(t),this.virtualList.forEachRenderedRow((n,i)=>{n.updateSelected(t===i)}))}createRowComponent(t){let e=new qyi;return this.createBean(e),e.setState(t.displayValue??t.key,t===this.selectedValue),e}onMouseMove(t){let e=this.virtualList.getGui().getBoundingClientRect(),n=this.virtualList.getScrollTop(),i=t.clientY-e.top+n,r=Math.floor(i/this.virtualList.getRowHeight());this.checkSetSelectedValue(r)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){return this.autocompleteEntries.length?this.selectedValue??null:null}},Xyi=class extends ai{constructor(){super(`
            <div class="ag-autocomplete" role="presentation">
                <ag-input-text-field data-ref="eAutocompleteInput"></ag-input-text-field>
            </div>`,[xf]),this.eAutocompleteInput=Bt,this.isListOpen=!1,this.lastPosition=0,this.valid=!0}wireBeans(t){this.popupService=t.popupService}postConstruct(){this.eAutocompleteInput.onValueChange(t=>this.onValueChanged(t)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList)}),this.addGuiEventListener("focusout",()=>this.onFocusOut())}onValueChanged(t){let e=xu(t);this.updateValue(e),this.updateAutocompleteList(e)}updateValue(t){this.updateLastPosition(),this.dispatchLocalEvent({type:"eventValueChanged",value:t}),this.validate(t)}updateAutocompleteList(t){let e=this.listGenerator?.(t,this.lastPosition)??{enabled:!1};if((!e.type||e.type!==this.autocompleteListParams?.type)&&this.isListOpen&&this.closeList(),this.autocompleteListParams=e,this.autocompleteListParams?.enabled){this.isListOpen||this.openList();let{searchString:n}=this.autocompleteListParams;this.autocompleteList.setSearch(n??"")}else this.isListOpen&&this.closeList()}onKeyDown(t){let e=t.key;switch(this.updateLastPosition(),e){case It.ENTER:this.onEnterKeyDown(t);break;case It.TAB:this.onTabKeyDown(t);break;case It.DOWN:case It.UP:this.onUpDownKeyDown(t,e);break;case It.LEFT:case It.RIGHT:case It.PAGE_HOME:case It.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case It.ESCAPE:this.onEscapeKeyDown(t);break;case It.SPACE:t.ctrlKey&&!this.isListOpen&&(t.preventDefault(),this.forceOpenList());break}}confirmSelection(){let t=this.autocompleteList?.getSelectedValue();t&&(this.closeList(),this.dispatchLocalEvent({type:"eventOptionSelected",value:this.getValue(),position:this.lastPosition,updateEntry:t,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.confirmSelection())}onEnterKeyDown(t){t.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(t,e){t.preventDefault(),this.isListOpen?this.autocompleteList?.onNavigationKeyDown(t,e):this.forceOpenList()}onEscapeKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){this.updateLastPosition(),this.updateAutocompleteList(this.eAutocompleteInput.getValue()??null)}setCaret(t,e){e&&this.gos.isNothingFocused()&&this.eAutocompleteInput.getFocusableElement().focus();let n=this.eAutocompleteInput.getInputElement();n.setSelectionRange(t,t),t===n.value.length&&(n.scrollLeft=n.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){this.lastPosition=this.eAutocompleteInput.getInputElement().selectionStart??0}validate(t){this.validator&&(this.validationMessage=this.validator(t),this.eAutocompleteInput.getInputElement().setCustomValidity(this.validationMessage??""),this.valid=!this.validationMessage,this.dispatchLocalEvent({type:"eventValidChanged",isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new Zyi({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));let t=this.autocompleteList.getGui(),e={ePopup:t,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},n=this.popupService.addPopup({eChild:t,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(e),ariaLabel:this.listAriaLabel});this.hidePopup=n.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchLocalEvent({type:"eventValueConfirmed",value:this.getValue(),isValid:this.isValid()})}getValue(){return xu(this.eAutocompleteInput.getValue())}setInputPlaceholder(t){return this.eAutocompleteInput.setInputPlaceholder(t),this}setInputAriaLabel(t){return this.eAutocompleteInput.setInputAriaLabel(t),this}setListAriaLabel(t){return this.listAriaLabel=t,this}setListGenerator(t){return this.listGenerator=t,this}setValidator(t){return this.validator=t,this}isValid(){return this.valid}setValue(t){let{value:e,position:n,silent:i,updateListOnlyIfOpen:r,restoreFocus:s}=t;this.eAutocompleteInput.setValue(e,!0),this.setCaret(n??this.lastPosition,s),i||this.updateValue(e),(!r||this.isListOpen)&&this.updateAutocompleteList(e)}setForceLastSelection(t){return this.forceLastSelection=t,this}setInputDisabled(t){return this.eAutocompleteInput.setDisabled(t),this}},Qyi={selector:"AG-AUTOCOMPLETE",component:Xyi},oot=class extends ai{constructor(){super(`
            <div class="ag-advanced-filter" role="presentation" tabindex="-1">
                <ag-autocomplete data-ref="eAutocomplete"></ag-autocomplete>
                <button class="ag-button ag-standard-button ag-advanced-filter-apply-button" data-ref="eApplyFilterButton"></button>
                <button class="ag-advanced-filter-builder-button" data-ref="eBuilderFilterButton">
                    <span data-ref="eBuilderFilterButtonIcon" aria-hidden="true"></span>
                    <span class="ag-advanced-filter-builder-button-label" data-ref="eBuilderFilterButtonLabel"></span>
                </button>
            </div>`,[Qyi]),this.eAutocomplete=Bt,this.eApplyFilterButton=Bt,this.eBuilderFilterButton=Bt,this.eBuilderFilterButtonIcon=Bt,this.eBuilderFilterButtonLabel=Bt,this.expressionParser=null,this.isApplyDisabled=!0,this.builderOpen=!1}wireBeans(t){this.advancedFilterExpressionService=t.advancedFilterExpressionService,this.advancedFilterService=t.advancedFilterService,this.filterManager=t.filterManager}postConstruct(){this.eAutocomplete.setListGenerator((t,e)=>this.generateAutocompleteListParams(e)).setValidator(()=>this.validateValue()).setForceLastSelection((t,e)=>this.forceLastSelection(t,e)).setInputAriaLabel(this.advancedFilterExpressionService.translate("ariaAdvancedFilterInput")).setListAriaLabel(this.advancedFilterExpressionService.translate("ariaLabelAdvancedFilterAutocomplete")),this.refresh(),this.addManagedListeners(this.eAutocomplete,{eventValueChanged:({value:t})=>this.onValueChanged(t),eventValueConfirmed:({isValid:t})=>this.onValueConfirmed(t),eventOptionSelected:({position:t,updateEntry:e,autocompleteType:n})=>this.onOptionSelected(t,e,n),eventValidChanged:({isValid:t,validationMessage:e})=>this.onValidChanged(t,e)}),this.setupApplyButton(),this.setupBuilderButton()}refresh(){let t=this.advancedFilterService.getExpressionDisplayValue();this.eAutocomplete.setValue({value:t??"",position:t?.length,updateListOnlyIfOpen:!0})}setInputDisabled(t){this.eAutocomplete.setInputDisabled(t),c3(this.eApplyFilterButton,t||this.isApplyDisabled)}getTooltipParams(){let t=super.getTooltipParams();return t.location="advancedFilter",t}setupApplyButton(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedElementListeners(this.eApplyFilterButton,{click:()=>this.onValueConfirmed(this.eAutocomplete.isValid())}),c3(this.eApplyFilterButton,this.isApplyDisabled)}setupBuilderButton(){this.eBuilderFilterButtonIcon.appendChild(tr("advancedFilterBuilder",this.gos)),this.eBuilderFilterButtonLabel.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilder"),this.activateTabIndex([this.eBuilderFilterButton]),this.addManagedElementListeners(this.eBuilderFilterButton,{click:()=>this.openBuilder()}),this.addManagedListeners(this.advancedFilterService.getCtrl(),{advancedFilterBuilderClosed:()=>this.closeBuilder()})}onValueChanged(t){t=xu(t),this.advancedFilterService.setExpressionDisplayValue(t),this.expressionParser=this.advancedFilterService.createExpressionParser(t);let e=this.expressionParser?.parseExpression();e&&e!==t&&this.eAutocomplete.setValue({value:e,silent:!0,restoreFocus:!0})}onValueConfirmed(t){!t||this.isApplyDisabled||(c3(this.eApplyFilterButton,!0),this.advancedFilterService.applyExpression(),this.filterManager?.onFilterChanged({source:"advancedFilter"}))}onOptionSelected(t,e,n){let{updatedValue:i,updatedPosition:r,hideAutocomplete:s}=this.updateExpression(t,e,n);this.eAutocomplete.setValue({value:i,position:r,updateListOnlyIfOpen:s,restoreFocus:!0})}validateValue(){return this.expressionParser?.isValid()?null:this.expressionParser?.getValidationMessage()??null}onValidChanged(t,e){this.isApplyDisabled=!t||this.advancedFilterService.isCurrentExpressionApplied(),c3(this.eApplyFilterButton,this.isApplyDisabled),this.setTooltip({newTooltipText:e,showDelayOverride:1e3})}generateAutocompleteListParams(t){return this.expressionParser?this.expressionParser.getAutocompleteListParams(t):this.advancedFilterExpressionService.getDefaultAutocompleteListParams("")}updateExpression(t,e,n){return this.advancedFilterExpressionService.updateAutocompleteCache(e,n),this.expressionParser?.updateExpression(t,e,n)??this.advancedFilterService.getDefaultExpression(e)}forceLastSelection({key:t,displayValue:e},n){return!!n.toLocaleLowerCase().match(`^${(e??t).toLocaleLowerCase()}\\s*$`)}openBuilder(){this.builderOpen||(this.builderOpen=!0,c3(this.eBuilderFilterButton,!0),this.advancedFilterService.getCtrl().toggleFilterBuilder({source:"ui",eventSource:this.eBuilderFilterButton}))}closeBuilder(){this.builderOpen&&(this.builderOpen=!1,c3(this.eBuilderFilterButton,!1),this.eBuilderFilterButton.focus())}},Jyi=class extends ai{constructor(t){super(`
            <div class="ag-advanced-filter-header" role="row">
            </div>`),this.enabled=t}wireBeans(t){this.columnModel=t.columnModel,this.focusService=t.focusService,this.headerNavigationService=t.headerNavigationService}postConstruct(){this.setupAdvancedFilter(this.enabled),this.addDestroyFunc(()=>this.destroyBean(this.eAdvancedFilter));let t=()=>{this.enabled&&this.setEnabledHeight()};this.addManagedEventListeners({gridColumnsChanged:()=>this.onGridColumnsChanged(),columnHeaderHeightChanged:t,gridStylesChanged:t}),this.addManagedPropertyListener("headerHeight",t),this.addManagedPropertyListener("floatingFiltersHeight",t),this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addGuiEventListener("focusout",e=>{this.getFocusableElement().contains(e.relatedTarget)||this.focusService.clearAdvancedFilterColumn()})}getFocusableElement(){return this.eAdvancedFilter?.getGui()??this.getGui()}setEnabled(t){t!==this.enabled&&this.setupAdvancedFilter(t)}refresh(){this.eAdvancedFilter?.refresh()}getHeight(){return this.height}setInputDisabled(t){this.eAdvancedFilter?.setInputDisabled(t)}setupAdvancedFilter(t){let e=this.getGui();if(t){this.eAdvancedFilter=this.createBean(new oot);let n=this.eAdvancedFilter.getGui();this.eAdvancedFilter.addCssClass("ag-advanced-filter-header-cell"),this.setEnabledHeight(),this.setAriaRowIndex(),dd(n,"gridcell"),GZ(n,1),this.setAriaColumnCount(n),e.appendChild(n)}else zo(e),this.destroyBean(this.eAdvancedFilter),this.height=0;Vn(e,t),this.enabled=t}setEnabledHeight(){let t=this.getGui();this.height=this.columnModel.getFloatingFiltersHeight();let e=`${this.height}px`;t.style.height=e,t.style.minHeight=e}setAriaColumnCount(t){z3e(t,this.columnModel.getCols().length)}setAriaRowIndex(){HZ(this.getGui(),this.headerNavigationService.getHeaderRowCount())}onGridColumnsChanged(){this.eAdvancedFilter&&(this.setAriaColumnCount(this.eAdvancedFilter.getGui()),this.setAriaRowIndex())}onKeyDown(t){switch(t.key){case It.ENTER:{this.hasFocus()&&this.focusService.focusInto(this.getFocusableElement())&&t.preventDefault();break}case It.ESCAPE:this.hasFocus()||this.getFocusableElement().focus();break;case It.UP:this.navigateUpDown(!0,t);break;case It.DOWN:this.navigateUpDown(!1,t);break;case It.TAB:if(this.hasFocus())this.navigateLeftRight(t);else{let e=this.focusService.findNextFocusableElement(this.getFocusableElement(),null,t.shiftKey);e?(t.preventDefault(),e.focus()):this.navigateLeftRight(t)}break}}navigateUpDown(t,e){this.hasFocus()&&this.focusService.focusNextFromAdvancedFilter(t)&&e.preventDefault()}navigateLeftRight(t){(t.shiftKey?this.focusService.focusLastHeader():this.focusService.focusNextFromAdvancedFilter(!1,!0))&&t.preventDefault()}hasFocus(){return this.gos.getActiveDomElement()===this.getFocusableElement()}},e_i=class extends Ot{constructor(t,e){super(),this.comp=t,this.virtualList=e}postConstruct(){this.createManagedBean(new tbe(this.comp,this.virtualList,{dragSourceType:u1.AdvancedFilterBuilder,listItemDragStartEvent:"advancedFilterBuilderDragStarted",listItemDragEndEvent:"advancedFilterBuilderDragEnded",eventSource:this,getCurrentDragValue:t=>this.getCurrentDragValue(t),isMoveBlocked:()=>!1,getNumRows:t=>t.getNumItems(),moveItem:(t,e)=>this.moveItem(t,e)}))}getCurrentDragValue(t){return t.item}moveItem(t,e){this.comp.moveItem(t,e)}},aot=class extends yie{constructor(t){super(St(ve({},t),{template:`
                <div class="ag-picker-field" role="presentation">
                    <div data-ref="eLabel"></div>
                    <div data-ref="eWrapper" class="ag-wrapper ag-picker-collapsed">
                        <div data-ref="eDisplayField" class="ag-picker-field-display"></div>
                        <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
                        <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
                        <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
                    </div>
                </div>`,agComponents:[xf]})),this.params=t}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();let{wrapperClassName:t,ariaLabel:e}=this.params;Vn(this.eDisplayField,!1),t&&this.eWrapper.classList.add(t),jy(this.eWrapper,""),hl(this.eWrapper,e)}onEnterKeyDown(t){Zc(t),this.isPickerDisplayed?super.onEnterKeyDown(t):(t.preventDefault(),this.showPicker())}},lot=class extends Ot{constructor(t,e,n){super(),this.eGui=t,this.focusWrapper=e,this.eFocusableComp=n}postConstruct(){this.addManagedElementListeners(this.eGui,{keydown:e=>{switch(e.key){case It.TAB:e.defaultPrevented||Zc(e);break;case It.UP:case It.DOWN:Zc(e);break;case It.ESCAPE:if(gg(e))return;this.eGui.contains(this.gos.getActiveDomElement())&&(e.preventDefault(),Zc(e),this.focusWrapper.focus());break}}});let t="ag-advanced-filter-builder-virtual-list-item-highlight";this.addManagedListeners(this.focusWrapper,{keydown:e=>{switch(e.key){case It.ENTER:if(gg(e))return;this.gos.getActiveDomElement()===this.focusWrapper&&(e.preventDefault(),Zc(e),this.eFocusableComp.getFocusableElement().focus());break}},focusin:()=>{this.focusWrapper.classList.add(t)},focusout:e=>{this.focusWrapper.contains(e.relatedTarget)||this.focusWrapper.classList.remove(t)}})}};t_i=class extends ai{constructor(t,e){super(`
            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">
                <div data-ref="eItem" class="ag-advanced-filter-builder-item" role="presentation">
                    <div class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true">
                        <div class="ag-advanced-filter-builder-item-tree-line-vertical-top ag-advanced-filter-builder-item-tree-line-horizontal"></div>
                    </div>
                </div>
            </div>
        `),this.item=t,this.focusWrapper=e,this.eItem=Bt}wireBeans(t){this.advancedFilterExpressionService=t.advancedFilterExpressionService}postConstruct(){C5(this.focusWrapper,2);let t=cot(n=>this.advancedFilterExpressionService.translate(n),this.gos.get("advancedFilterBuilderParams")?.addSelectWidth),e=this.createManagedBean(new aot(t));this.addManagedListeners(e,{fieldPickerValueSelected:({value:n})=>{this.dispatchLocalEvent({type:"advancedFilterBuilderAdded",item:this.item,isJoin:n.key==="join"})}}),this.eItem.appendChild(e.getGui()),this.createManagedBean(new W1({getGui:()=>e.getGui(),getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")})),this.createManagedBean(new lot(this.getGui(),this.focusWrapper,e)),hl(this.focusWrapper,this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip"),`${this.item.level+1}`]))}afterAdd(){}},i_i=class extends ai{constructor(){super(`
            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>
        `),this.validationMessage=null}wireBeans(t){this.advancedFilterExpressionService=t.advancedFilterExpressionService}init(t){let{item:e,createPill:n}=t;this.item=e,this.createPill=n,this.filterModel=e.filterModel,this.setupColumnCondition(this.filterModel),this.validate(),this.addDestroyFunc(()=>this.destroyBeans([this.eColumnPill,this.eOperatorPill,this.eOperandPill]))}getDragName(){return this.filterModel.colId?this.advancedFilterExpressionService.parseColumnFilterModel(this.filterModel):this.getDefaultColumnDisplayValue()}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderFilterItem")} ${this.getDragName()}`}getValidationMessage(){return this.validationMessage}getFocusableElement(){return this.eColumnPill.getFocusableElement()}setupColumnCondition(t){let e=this.advancedFilterExpressionService.getColumnDetails(t.colId);this.baseCellDataType=e.baseCellDataType,this.column=e.column,this.numOperands=this.getNumOperands(this.getOperatorKey()),this.eColumnPill=this.createPill({key:this.getColumnKey(),displayValue:this.getColumnDisplayValue()??this.getDefaultColumnDisplayValue(),cssClass:"ag-advanced-filter-builder-column-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getColumnAutocompleteEntries()}),update:n=>this.setColumnKey(n),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderColumnSelectField",pickerAriaLabelValue:"Advanced Filter Builder Column Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderColumn")}),this.getGui().appendChild(this.eColumnPill.getGui()),Di(this.getColumnKey())&&(this.createOperatorPill(),this.hasOperand()&&this.createOperandPill())}createOperatorPill(){this.eOperatorPill=this.createPill({key:this.getOperatorKey(),displayValue:this.getOperatorDisplayValue()??this.getDefaultOptionSelectValue(),cssClass:"ag-advanced-filter-builder-option-pill",isSelect:!0,getEditorParams:()=>({values:this.getOperatorAutocompleteEntries()}),update:t=>this.setOperatorKey(t),pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderOptionSelectField",pickerAriaLabelValue:"Advanced Filter Builder Option Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderOption")}),this.eColumnPill.getGui().insertAdjacentElement("afterend",this.eOperatorPill.getGui())}createOperandPill(){let t=this.getOperandDisplayValue()??"";this.eOperandPill=this.createPill({key:t,displayValue:t,baseCellDataType:this.baseCellDataType,cssClass:"ag-advanced-filter-builder-value-pill",isSelect:!1,update:e=>this.setOperand(e),ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderValue")}),this.getGui().appendChild(this.eOperandPill.getGui())}getColumnKey(){return this.filterModel.colId}getColumnDisplayValue(){return this.advancedFilterExpressionService.getColumnDisplayValue(this.filterModel)}getOperatorKey(){return this.filterModel.type}getOperatorDisplayValue(){return this.advancedFilterExpressionService.getOperatorDisplayValue(this.filterModel)}getOperandDisplayValue(){return this.advancedFilterExpressionService.getOperandDisplayValue(this.filterModel,!0)}hasOperand(){return this.numOperands>0}getOperatorAutocompleteEntries(){return this.column?this.advancedFilterExpressionService.getOperatorAutocompleteEntries(this.column,this.baseCellDataType):[]}setColumnKey(t){this.eOperatorPill||this.createOperatorPill();let e=this.advancedFilterExpressionService.getColumnDetails(t);this.column=e.column;let n=e.baseCellDataType;this.baseCellDataType!==n&&(this.baseCellDataType=n,this.setOperatorKey(void 0),this.eOperatorPill&&(dc(this.eOperatorPill.getGui()),this.destroyBean(this.eOperatorPill),this.createOperatorPill()),this.validate()),this.filterModel.colId=t,this.filterModel.filterType=this.baseCellDataType}setOperatorKey(t){let e=this.getNumOperands(t);e!==this.numOperands&&(this.numOperands=e,e===0?this.destroyOperandPill():(this.createOperandPill(),this.baseCellDataType!=="number"&&this.setOperand(""))),this.filterModel.type=t,this.validate()}setOperand(t){let e=t;this.column&&(e=this.advancedFilterExpressionService.getOperandModelValue(t,this.baseCellDataType,this.column)??""),this.filterModel.filter=e,this.validate()}getNumOperands(t){return this.advancedFilterExpressionService.getExpressionOperator(this.baseCellDataType,t)?.numOperands??0}destroyOperandPill(){delete this.filterModel.filter,this.getGui().removeChild(this.eOperandPill.getGui()),this.destroyBean(this.eOperandPill),this.eOperandPill=void 0}validate(){let t=null;Di(this.getColumnKey())?Di(this.getOperatorKey())?this.numOperands>0&&!Di(this.getOperandDisplayValue())&&(t=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationEnterValue")):t=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectOption"):t=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationSelectColumn"),this.item.valid=!t,t!==this.validationMessage&&(this.validationMessage=t,this.dispatchLocalEvent({type:"advancedFilterBuilderValidChanged"}))}getDefaultColumnDisplayValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectColumn")}getDefaultOptionSelectValue(){return this.advancedFilterExpressionService.translate("advancedFilterBuilderSelectOption")}},n_i=class extends ai{constructor(t){super(`
            <div class="ag-advanced-filter-builder-pill-wrapper" role="presentation">
                <div data-ref="ePill" class="ag-advanced-filter-builder-pill" role="button">
                    <span data-ref="eLabel" class="ag-advanced-filter-builder-pill-display"></span>
                </div>
            </div>
        `),this.params=t,this.ePill=Bt,this.eLabel=Bt,this.value=t.value}wireBeans(t){this.advancedFilterExpressionService=t.advancedFilterExpressionService}postConstruct(){let{cssClass:t,ariaLabel:e}=this.params;this.ePill.classList.add(t),this.activateTabIndex([this.ePill]),this.eLabel.id=`${this.getCompId()}`,D7(this.ePill,this.eLabel.id),hl(this.ePill,e),this.renderValue(),this.addManagedListeners(this.ePill,{click:n=>{n.preventDefault(),this.showEditor()},keydown:n=>{switch(n.key){case It.ENTER:n.preventDefault(),Zc(n),this.showEditor();break}}}),this.addDestroyFunc(()=>this.destroyBean(this.eEditor))}getFocusableElement(){return this.ePill}showEditor(){if(this.eEditor)return;Vn(this.ePill,!1),this.eEditor=this.createEditorComp(this.params.type),this.eEditor.setValue(this.value);let t=this.eEditor.getGui();this.eEditor.addManagedElementListeners(t,{keydown:e=>{switch(e.key){case It.ENTER:e.preventDefault(),Zc(e),this.updateValue(!0);break;case It.ESCAPE:e.preventDefault(),Zc(e),this.hideEditor(!0);break}},focusout:()=>this.updateValue(!1)}),this.getGui().appendChild(t),this.eEditor.getFocusableElement().focus()}createEditorComp(t){let e;switch(t){case"text":e=new yg;break;case"number":e=new JB;break;case"date":e=new c4e;break}return this.createBean(e)}hideEditor(t){let{eEditor:e}=this;e&&(this.eEditor=void 0,this.getGui().removeChild(e.getGui()),this.destroyBean(e),Vn(this.ePill,!0),t&&this.ePill.focus())}renderValue(){let t;this.eLabel.classList.remove("ag-advanced-filter-builder-value-empty","ag-advanced-filter-builder-value-number","ag-advanced-filter-builder-value-text"),Di(this.value)?this.params.type==="number"?(t=this.value,this.eLabel.classList.add("ag-advanced-filter-builder-value-number")):(t=`"${this.value}"`,this.eLabel.classList.add("ag-advanced-filter-builder-value-text")):(t=this.advancedFilterExpressionService.translate("advancedFilterBuilderEnterValue"),this.eLabel.classList.add("ag-advanced-filter-builder-value-empty")),this.eLabel.innerText=t}updateValue(t){if(!this.eEditor)return;let e=this.eEditor.getValue()??"";this.dispatchLocalEvent({type:"fieldValueChanged",value:e}),this.value=e,this.renderValue(),this.hideEditor(t)}},r_i=class extends ai{wireBeans(t){this.advancedFilterExpressionService=t.advancedFilterExpressionService}constructor(){super(`
            <div class="ag-advanced-filter-builder-item-condition" role="presentation"></div>
        `)}init(t){let{item:e,createPill:n}=t,i=e.filterModel;this.filterModel=i,this.ePill=n({key:i.type,displayValue:this.advancedFilterExpressionService.parseJoinOperator(i),cssClass:"ag-advanced-filter-builder-join-pill",isSelect:!0,getEditorParams:()=>({values:this.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries()}),update:r=>i.type=r,pickerAriaLabelKey:"ariaLabelAdvancedFilterBuilderJoinSelectField",pickerAriaLabelValue:"Advanced Filter Builder Join Operator Select Field",ariaLabel:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderJoinOperator")}),this.getGui().appendChild(this.ePill.getGui()),this.addDestroyFunc(()=>this.destroyBean(this.ePill))}getDragName(){return this.advancedFilterExpressionService.parseJoinOperator(this.filterModel)}getAriaLabel(){return`${this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderGroupItem")} ${this.getDragName()}`}getValidationMessage(){return null}getFocusableElement(){return this.ePill.getFocusableElement()}},s_i=class extends yie{constructor(t){super(St(ve({},t),{template:`
                <div class="ag-picker-field ag-advanced-filter-builder-pill-wrapper" role="presentation">
                    <div data-ref="eLabel"></div>
                    <div data-ref="eWrapper" class="ag-wrapper ag-advanced-filter-builder-pill ag-picker-collapsed">
                        <div data-ref="eDisplayField" class="ag-picker-field-display ag-advanced-filter-builder-pill-display"></div>
                        <ag-input-text-field data-ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
                        <span data-ref="eDeselect" class="ag-rich-select-deselect-button ag-picker-field-icon" role="presentation"></span>
                        <div data-ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
                    </div>
                </div>`,agComponents:[xf]})),this.params=t}getFocusableElement(){return this.eWrapper}showPicker(){setTimeout(()=>super.showPicker())}hidePicker(){setTimeout(()=>super.hidePicker())}postConstruct(){super.postConstruct();let{wrapperClassName:t,ariaLabel:e}=this.params;this.eWrapper.classList.add(t),jy(this.eWrapper,""),hl(this.eWrapper,e)}createPickerComponent(){if(!this.values){let{values:t}=this.params.getEditorParams();this.values=t;let e=this.value.key,n=t.find(i=>i.key===e)??{key:e,displayValue:this.value.displayValue};this.value=n}return super.createPickerComponent()}onEnterKeyDown(t){Zc(t),this.isPickerDisplayed?super.onEnterKeyDown(t):(t.preventDefault(),this.showPicker())}},Sxe=class extends j1{constructor(t,e,n){super(`
            <div class="ag-advanced-filter-builder-item-wrapper" role="presentation">
                <div class="ag-advanced-filter-builder-item" role="presentation">
                    <div data-ref="eTreeLines" class="ag-advanced-filter-builder-item-tree-lines" aria-hidden="true"></div>
                    <span data-ref="eDragHandle" class="ag-drag-handle" aria-hidden="true"></span>
                    <span data-ref="eValidation" class="ag-advanced-filter-builder-item-button ag-advanced-filter-builder-invalid" aria-hidden="true"></span>
                </div>
                <div data-ref="eButtons" class="ag-advanced-filter-builder-item-buttons">
                    <span data-ref="eMoveUpButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
                    <span data-ref="eMoveDownButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
                    <div data-ref="eAddButton" role="presentation"></div>
                    <span data-ref="eRemoveButton" class="ag-advanced-filter-builder-item-button" role="button"></span>
                </div>
            </div>
        `),this.item=t,this.dragFeature=e,this.focusWrapper=n,this.eTreeLines=Bt,this.eDragHandle=Bt,this.eButtons=Bt,this.eValidation=Bt,this.eMoveUpButton=Bt,this.eMoveDownButton=Bt,this.eAddButton=Bt,this.eRemoveButton=Bt,this.moveUpDisabled=!1,this.moveDownDisabled=!1}wireBeans(t){this.dragAndDropService=t.dragAndDropService,this.advancedFilterExpressionService=t.advancedFilterExpressionService}postConstruct(){let{filterModel:t,level:e,showMove:n}=this.item,i=t.filterType==="join";if(this.ePillWrapper=this.createManagedBean(i?new r_i:new i_i),this.ePillWrapper.init({item:this.item,createPill:r=>this.createPill(r)}),this.eDragHandle.insertAdjacentElement("afterend",this.ePillWrapper.getGui()),e===0){let r=document.createElement("div");r.classList.add("ag-advanced-filter-builder-item-tree-line-vertical-bottom"),r.classList.add("ag-advanced-filter-builder-item-tree-line-root"),this.eTreeLines.appendChild(r),Vn(this.eDragHandle,!1),Vn(this.eButtons,!1),ip(this.focusWrapper,!0)}else this.setupTreeLines(e),this.eDragHandle.appendChild(tr("advancedFilterBuilderDrag",this.gos)),this.setupValidation(),this.setupMoveButtons(n),this.setupAddButton(),this.setupRemoveButton(),this.setupDragging(),this.updateAriaExpanded();C5(this.focusWrapper,e+1),this.initialiseTabGuard({}),this.createManagedBean(new lot(this.getGui(),this.focusWrapper,this.ePillWrapper)),this.updateAriaLabel(),this.addManagedListeners(this.ePillWrapper,{advancedFilterBuilderValueChanged:()=>this.dispatchLocalEvent({type:"advancedFilterBuilderValueChanged"}),advancedFilterBuilderValidChanged:()=>this.updateValidity()})}setState(t){let{level:e}=this.item;if(e===0)return;let{showMove:n}=this.item,{disableMoveUp:i,disableMoveDown:r,treeLines:s,showStartTreeLine:o}=t;this.updateTreeLines(s,o),this.updateAriaExpanded(),n&&(this.moveUpDisabled=!!i,this.moveDownDisabled=!!r,this.eMoveUpButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",i),this.eMoveDownButton.classList.toggle("ag-advanced-filter-builder-item-button-disabled",r),wA(this.eMoveUpButton,!!i),wA(this.eMoveDownButton,!!r),this.moveUpTooltipFeature.refreshToolTip(),this.moveDownTooltipFeature.refreshToolTip())}focusMoveButton(t){(t?this.eMoveUpButton:this.eMoveDownButton).focus()}afterAdd(){this.ePillWrapper.getFocusableElement().focus()}setupTreeLines(t){for(let e=0;e<t;e++){let n=document.createElement("div");this.eTreeLines.appendChild(n)}}updateTreeLines(t,e){let n=t.length-1,{children:i}=this.eTreeLines;for(let s=0;s<n;s++){let o=i.item(s);o&&o.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!t[s])}let r=i.item(n);if(r){r.classList.add("ag-advanced-filter-builder-item-tree-line-horizontal");let s=t[n];r.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-top",s),r.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical",!s)}this.eDragHandle.classList.toggle("ag-advanced-filter-builder-item-tree-line-vertical-bottom",e)}setupValidation(){this.eValidation.appendChild(tr("advancedFilterBuilderInvalid",this.gos)),this.validationTooltipFeature=this.createManagedBean(new W1({getGui:()=>this.eValidation,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.ePillWrapper.getValidationMessage(),getTooltipShowDelayOverride:()=>1e3})),this.updateValidity()}setupAddButton(){let t=cot(n=>this.advancedFilterExpressionService.translate(n),this.gos.get("advancedFilterBuilderParams")?.addSelectWidth),e=this.createManagedBean(new aot(t));this.addManagedListeners(e,{fieldPickerValueSelected:({value:n})=>this.dispatchLocalEvent({type:"advancedFilterBuilderAdded",item:this.item,isJoin:n.key==="join"})}),this.eAddButton.appendChild(e.getGui()),this.createManagedBean(new W1({getGui:()=>this.eAddButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderAddButtonTooltip")}))}setupRemoveButton(){this.eRemoveButton.appendChild(tr("advancedFilterBuilderRemove",this.gos)),this.addManagedListeners(this.eRemoveButton,{click:()=>this.removeItem(),keydown:t=>{switch(t.key){case It.ENTER:t.preventDefault(),Zc(t),this.removeItem();break}}}),this.createManagedBean(new W1({getGui:()=>this.eRemoveButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")})),hl(this.eRemoveButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderRemoveButtonTooltip")),this.activateTabIndex([this.eRemoveButton])}setupMoveButtons(t){t?(this.eMoveUpButton.appendChild(tr("advancedFilterBuilderMoveUp",this.gos)),this.addManagedListeners(this.eMoveUpButton,{click:()=>this.moveItem(!0),keydown:e=>{switch(e.key){case It.ENTER:e.preventDefault(),Zc(e),this.moveItem(!0);break}}}),this.moveUpTooltipFeature=this.createManagedBean(new W1({getGui:()=>this.eMoveUpButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveUpDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")})),hl(this.eMoveUpButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveUpButtonTooltip")),this.eMoveDownButton.appendChild(tr("advancedFilterBuilderMoveDown",this.gos)),this.addManagedListeners(this.eMoveDownButton,{click:()=>this.moveItem(!1),keydown:e=>{switch(e.key){case It.ENTER:e.preventDefault(),Zc(e),this.moveItem(!1);break}}}),this.moveDownTooltipFeature=this.createManagedBean(new W1({getGui:()=>this.eMoveDownButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.moveDownDisabled?null:this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")})),hl(this.eMoveDownButton,this.advancedFilterExpressionService.translate("advancedFilterBuilderMoveDownButtonTooltip")),this.activateTabIndex([this.eMoveUpButton,this.eMoveDownButton])):(Vn(this.eMoveUpButton,!1),Vn(this.eMoveDownButton,!1))}updateValidity(){U3e(this.eValidation,!this.item.valid),this.validationTooltipFeature.refreshToolTip(),this.updateAriaLabel()}createPill(t){let{key:e,displayValue:n,cssClass:i,update:r,ariaLabel:s}=t,o=a=>{a!=null&&(r(a),this.dispatchLocalEvent({type:"advancedFilterBuilderValueChanged"}))};if(t.isSelect){let{getEditorParams:a,pickerAriaLabelKey:l,pickerAriaLabelValue:c}=t,d=this.gos.get("advancedFilterBuilderParams"),u=`${d?.pillSelectMinWidth??140}px`,m=`${d?.pillSelectMaxWidth??200}px`,f=this.createBean(new s_i({pickerAriaLabelKey:l,pickerAriaLabelValue:c,pickerType:"ag-list",value:{key:e,displayValue:n},valueFormatter:_=>_==null?null:_.displayValue??_.key,variableWidth:!0,minPickerWidth:u,maxPickerWidth:m,getEditorParams:a,wrapperClassName:i,ariaLabel:s}));return this.addManagedListeners(f,{fieldPickerValueSelected:({value:_})=>o(_?.key)}),f}else{let a=this.createBean(new n_i({value:n,cssClass:i,type:this.getInputType(t.baseCellDataType),ariaLabel:s}));return this.addManagedListeners(a,{fieldValueChanged:({value:l})=>o(l)}),a}}getInputType(t){switch(t){case"text":case"object":case"boolean":return"text";case"number":return"number";case"date":case"dateString":return"date"}}setupDragging(){let t={type:u1.AdvancedFilterBuilder,eElement:this.eDragHandle,dragItemName:()=>this.ePillWrapper.getDragName(),getDefaultIconName:()=>"notAllowed",getDragItem:()=>({}),onDragStarted:()=>this.dragFeature.dispatchLocalEvent({type:"advancedFilterBuilderDragStarted",item:this.item}),onDragStopped:()=>this.dragFeature.dispatchLocalEvent({type:"advancedFilterBuilderDragEnded"})};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(t))}updateAriaLabel(){let t=this.ePillWrapper.getAriaLabel(),e=`${this.item.level+1}`,n=this.ePillWrapper.getValidationMessage(),i;n?i=this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItemValidation",[t,e,n]):i=this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderItem",[t,e]),hl(this.focusWrapper,i)}updateAriaExpanded(){zZ(this.focusWrapper);let{filterModel:t}=this.item;t?.filterType==="join"&&t.conditions.length&&ip(this.focusWrapper,!0)}removeItem(){this.dispatchLocalEvent({type:"advancedFilterBuilderRemoved",item:this.item})}moveItem(t){this.dispatchLocalEvent({type:"advancedFilterBuilderMoved",item:this.item,backwards:t})}},o_i=class extends ai{constructor(){super(`
            <div role="presentation" class="ag-advanced-filter-builder" tabindex="-1">
                <div role="presentation" class="ag-advanced-filter-builder-list" data-ref="eList"></div>
                <div role="presentation" class="ag-advanced-filter-builder-button-panel">
                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-apply-button" data-ref="eApplyFilterButton"></button>
                    <button class="ag-button ag-standard-button ag-advanced-filter-builder-cancel-button" data-ref="eCancelFilterButton"></button>
                </div>
            </div>`),this.eList=Bt,this.eApplyFilterButton=Bt,this.eCancelFilterButton=Bt,this.validationMessage=null}wireBeans(t){this.filterManager=t.filterManager,this.advancedFilterService=t.advancedFilterService,this.advancedFilterExpressionService=t.advancedFilterExpressionService}postConstruct(){let{showMoveButtons:t}=this.gos.get("advancedFilterBuilderParams")??{};this.showMove=!!t,this.addManagedPropertyListener("advancedFilterBuilderParams",({currentValue:e})=>{this.showMove=!!e?.showMoveButtons,this.refreshList(!1)}),this.filterModel=this.setupFilterModel(),this.setupVirtualList(),this.dragFeature=this.createManagedBean(new e_i(this,this.virtualList)),this.setupButtons()}refresh(){let t=this.virtualList.getLastFocusedRow();this.setupFilterModel(),this.validateItems(),this.refreshList(!1),t!=null&&(this.virtualList.getComponentAt(t)||(t=0),this.virtualList.focusRow(t))}getNumItems(){return this.items.length}moveItem(t,e){!e||!t||this.moveItemToIndex(t,e.rowIndex,e.position)}afterGuiAttached(){this.virtualList.focusRow(0)}setupVirtualList(){this.virtualList=this.createManagedBean(new YE({cssIdentifier:"advanced-filter-builder",ariaRole:"tree",listName:this.advancedFilterExpressionService.translate("ariaAdvancedFilterBuilderList")})),this.virtualList.setComponentCreator(this.createItemComponent.bind(this)),this.virtualList.setComponentUpdater(this.updateItemComponent.bind(this)),this.virtualList.setRowHeight(40),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.items.length,getRow:t=>this.items[t],areRowsEqual:(t,e)=>t===e}),this.buildList(),this.virtualList.refresh()}setupButtons(){this.eApplyFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderApply"),this.activateTabIndex([this.eApplyFilterButton]),this.addManagedElementListeners(this.eApplyFilterButton,{click:()=>{this.advancedFilterService.setModel(this.filterModel),this.filterManager?.onFilterChanged({source:"advancedFilter"}),this.close()}}),this.validationTooltipFeature=this.createManagedBean(new W1({getGui:()=>this.eApplyFilterButton,getLocation:()=>"advancedFilter",getTooltipValue:()=>this.validationMessage,getTooltipShowDelayOverride:()=>1e3})),this.validate();let t=e=>this.addOrRemoveCssClass("ag-advanced-filter-builder-validation",e);this.addManagedListeners(this.eApplyFilterButton,{mouseenter:()=>t(!0),mouseleave:()=>t(!1)}),this.eCancelFilterButton.innerText=this.advancedFilterExpressionService.translate("advancedFilterBuilderCancel"),this.activateTabIndex([this.eCancelFilterButton]),this.addManagedElementListeners(this.eCancelFilterButton,{click:()=>this.close()})}removeItemFromParent(t){let e=t.parent.conditions.indexOf(t.filterModel);return t.parent.conditions.splice(e,1),e}moveItemToIndex(t,e,n){let i=this.items[e],r=i.filterModel?.filterType==="join"&&n==="bottom",s=r?i.filterModel:i.parent;if(!s||this.isChildOrSelf(s,t.filterModel)||i===t)return;this.removeItemFromParent(t);let o;r?o=0:(o=s.conditions.indexOf(i.filterModel),o===-1?o=s.conditions.length:n==="bottom"&&(o+=1)),s.conditions.splice(o,0,t.filterModel),this.refreshList(!1)}isChildOrSelf(t,e){return t===e||e.filterType==="join"&&e.conditions.some(n=>this.isChildOrSelf(t,n))}setupFilterModel(){let t=this.formatFilterModel(this.advancedFilterService.getModel());return this.stringifiedModel=JSON.stringify(t),t}formatFilterModel(t){return t=t??{filterType:"join",type:"AND",conditions:[]},t.filterType!=="join"&&(t={filterType:"join",type:"AND",conditions:[t]}),t}buildList(){let t=(e,n,i,r)=>{n.push({filterModel:e,level:i,parent:r,valid:!0,showMove:this.showMove}),e.filterType==="join"&&(e.conditions.forEach(s=>t(s,n,i+1,e)),i===0&&n.push({filterModel:null,level:i+1,parent:e,valid:!0}))};this.items=[],t(this.filterModel,this.items,0)}refreshList(t){if(!t){let e=[];this.items.forEach(n=>{n.valid||e.push(n.filterModel)}),this.buildList(),e.length&&this.items.forEach(n=>{n.filterModel&&e.includes(n.filterModel)&&(n.valid=!1)})}this.virtualList.refresh(t),this.validate()}updateItemComponent(t,e){let n=this.items.indexOf(t),i=(a,l)=>{let d=this.items.find(u=>u.filterModel===a)?.parent;if(d){let{conditions:u}=d;i(d,l),l.push(u[u.length-1]===a)}},r=[],{filterModel:s}=t;s&&(i(s,r),r[0]=!1);let o=s?.filterType==="join"&&!!s.conditions.length;e.setState({disableMoveUp:n===1,disableMoveDown:!this.canMoveDown(t,n),treeLines:r,showStartTreeLine:o})}createItemComponent(t,e){let n=this.createBean(t.filterModel?new Sxe(t,this.dragFeature,e):new t_i(t,e));return n.addManagedListeners(n,{advancedFilterBuilderRemoved:({item:i})=>this.removeItem(i),advancedFilterBuilderValueChanged:()=>this.validate(),advancedFilterBuilderAdded:({item:i,isJoin:r})=>this.addItem(i,r),advancedFilterBuilderMoved:({item:i,backwards:r})=>this.moveItemUpDown(i,r)}),n instanceof Sxe&&this.updateItemComponent(t,n),n}addItem(t,e){let{parent:n,level:i,filterModel:r}=t,s=r?.filterType==="join",o=e?{filterType:"join",type:"AND",conditions:[]}:{},a=s?r:n,l=s?0:a.conditions.indexOf(r);l>=0?(s||(l+=1),a.conditions.splice(l,0,o)):a.conditions.push(o);let c=this.items.indexOf(t),d=c>=0;if(d){t.filterModel&&c++;let u=[{filterModel:o,level:s?i+1:i,parent:a,valid:e,showMove:this.showMove}];this.items.splice(c,0,...u)}this.refreshList(d),d&&this.virtualList.getComponentAt(c)?.afterAdd()}removeItem(t){let e=t.parent,{filterModel:n}=t,i=e.conditions.indexOf(n);e.conditions.splice(i,1);let r=t.filterModel?.filterType==="join",s=this.items.indexOf(t),o=!r&&s>=0;o&&this.items.splice(s,1),this.refreshList(o),s>=0&&this.virtualList.focusRow(s)}moveItemUpDown(t,e){let n=this.items.indexOf(t),i=e?n-1:n+1;if(i===0||!e&&!this.canMoveDown(t,n))return;let r=this.items[i],s=this.removeItemFromParent(t),{level:o,filterModel:a,parent:l}=t,{level:c,filterModel:d,parent:u}=r;if(e)if(c===o&&d.filterType==="join")d.conditions.push(a);else if(c<=o){let f=u.conditions.indexOf(d);u.conditions.splice(f,0,a)}else l.conditions[s-1].conditions.push(a);else if(c===o)if(d.filterType==="join")d.conditions.splice(0,0,a);else{let f=u.conditions.indexOf(d);u.conditions.splice(f+1,0,a)}else if(s<l.conditions.length)l.conditions.splice(s+1,0,a);else{let f=this.items.find(x=>x.filterModel===l),_=f.parent.conditions.indexOf(f.filterModel)+1;f.parent.conditions.splice(_,0,a)}this.refreshList(!1);let m=this.items.findIndex(({filterModel:f})=>f===a);if(m>=0){let f=this.virtualList.getComponentAt(m);f instanceof Sxe&&f.focusMoveButton(e)}}canMoveDown(t,e){return!(t.level===1&&e===this.items.length-2||t.level===1&&t.parent.conditions[t.parent.conditions.length-1]===t.filterModel)}close(){this.advancedFilterService.getCtrl().toggleFilterBuilder({source:"ui"})}validate(){let t=!this.items.every(({valid:e})=>e);t?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationIncomplete"):(t=JSON.stringify(this.filterModel)===this.stringifiedModel,t?this.validationMessage=this.advancedFilterExpressionService.translate("advancedFilterBuilderValidationAlreadyApplied"):this.validationMessage=null),c3(this.eApplyFilterButton,t),this.validationTooltipFeature.refreshToolTip()}validateItems(){let t=n=>{n.type=void 0},e=n=>{delete n.filter};this.items.forEach(n=>{if(!n.valid||!n.filterModel||n.filterModel.filterType==="join")return;let{filterModel:i}=n,{colId:r}=i,s=this.advancedFilterExpressionService.getColumnAutocompleteEntries().find(({key:c})=>c===r),o=this.advancedFilterExpressionService.getColumnDetails(i.colId);if(!s||!o.column){n.valid=!1,i.colId=void 0,t(i),e(i);return}let l=this.advancedFilterExpressionService.getDataTypeExpressionOperator(o.baseCellDataType).operators[i.type];if(!l){n.valid=!1,t(i),e(i);return}if(l.numOperands>0&&!Di(i.filter)){n.valid=!1;return}})}},a_i=class extends Ot{constructor(t){super(),this.enabled=t}wireBeans(t){this.ctrlsService=t.ctrlsService,this.popupService=t.popupService,this.advancedFilterExpressionService=t.advancedFilterExpressionService,this.environment=t.environment}postConstruct(){this.hasAdvancedFilterParent=!!this.gos.get("advancedFilterParent"),this.ctrlsService.whenReady(()=>this.setAdvancedFilterComp()),this.addManagedEventListeners({advancedFilterEnabledChanged:({enabled:t})=>this.onEnabledChanged(t)}),this.addManagedPropertyListener("advancedFilterParent",()=>this.updateComps()),this.addDestroyFunc(()=>{this.destroyAdvancedFilterComp(),this.destroyBean(this.eBuilderComp),this.eBuilderDialog&&this.eBuilderDialog.isAlive()&&this.destroyBean(this.eBuilderDialog)})}setupHeaderComp(t){this.eHeaderComp=this.createManagedBean(new Jyi(this.enabled&&!this.hasAdvancedFilterParent)),t.insertAdjacentElement("beforebegin",this.eHeaderComp.getGui())}focusHeaderComp(){return this.eHeaderComp?(this.eHeaderComp.getFocusableElement().focus(),!0):!1}refreshComp(){this.eFilterComp?.refresh(),this.eHeaderComp?.refresh()}refreshBuilderComp(){this.eBuilderComp?.refresh()}getHeaderHeight(){return this.eHeaderComp?.getHeight()??0}setInputDisabled(t){this.eFilterComp?.setInputDisabled(t),this.eHeaderComp?.setInputDisabled(t)}toggleFilterBuilder(t){let{source:e,force:n,eventSource:i}=t;if(n&&this.eBuilderDialog||n===!1&&!this.eBuilderDialog)return;if(this.eBuilderDialog){this.builderDestroySource=e,this.destroyBean(this.eBuilderDialog);return}this.setInputDisabled(!0);let{width:r,height:s,minWidth:o}=this.getBuilderDialogSize();this.eBuilderComp=this.createBean(new o_i),this.eBuilderDialog=this.createBean(new ZR({title:this.advancedFilterExpressionService.translate("advancedFilterBuilderTitle"),component:this.eBuilderComp,width:r,height:s,resizable:!0,movable:!0,maximizable:!0,centered:!0,closable:!0,minWidth:o,afterGuiAttached:()=>this.eBuilderComp?.afterGuiAttached(),postProcessPopupParams:{type:"advancedFilterBuilder",eventSource:i}})),this.dispatchFilterBuilderVisibleChangedEvent(e,!0),this.eBuilderDialog.addEventListener("destroyed",()=>{this.destroyBean(this.eBuilderComp),this.eBuilderComp=void 0,this.eBuilderDialog=void 0,this.setInputDisabled(!1),this.dispatchLocalEvent({type:"advancedFilterBuilderClosed"}),this.dispatchFilterBuilderVisibleChangedEvent(this.builderDestroySource??"ui",!1),this.builderDestroySource=void 0})}dispatchFilterBuilderVisibleChangedEvent(t,e){this.eventService.dispatchEvent({type:"advancedFilterBuilderVisibleChanged",source:t,visible:e})}getBuilderDialogSize(){let t=this.gos.get("advancedFilterBuilderParams")?.minWidth??500,e=this.popupService.getPopupParent(),n=Math.round(v5(e))-2,i=Math.round(TA(e)*.75)-2,r=Math.min(Math.max(600,t),n),s=Math.min(600,i);return{width:r,height:s,minWidth:t}}onEnabledChanged(t){this.enabled=t,this.updateComps()}updateComps(){this.setAdvancedFilterComp(),this.setHeaderCompEnabled(),this.eventService.dispatchEvent({type:"headerHeightChanged"})}setAdvancedFilterComp(){if(this.destroyAdvancedFilterComp(),!this.enabled)return;let t=this.gos.get("advancedFilterParent");if(this.hasAdvancedFilterParent=!!t,t){let e=this.createBean(new oot),n=e.getGui();this.environment.applyThemeClasses(n),n.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),t.appendChild(n),this.eFilterComp=e}}setHeaderCompEnabled(){this.eHeaderComp?.setEnabled(this.enabled&&!this.hasAdvancedFilterParent)}destroyAdvancedFilterComp(){this.eFilterComp&&(dc(this.eFilterComp.getGui()),this.destroyBean(this.eFilterComp))}},l_i=class{constructor(t){this.params=t,this.operators=[],this.operatorStartPositions=[],this.operatorEndPositions=[],this.activeOperator=0,this.validationError=null}parseExpression(t){this.operators.push(""),this.operatorStartPositions.push(t),this.operatorEndPositions.push(void 0);let{expression:e}=this.params;for(;t<e.length;){let n=e[t];if(n===" "){if(this.parseOperator(t-1))return this.activeOperator++,t-1;this.operators[this.activeOperator]+=n}else this.operators[this.activeOperator]+=n;t++}return this.parseOperator(t-1),t}isValid(){return!this.validationError&&(!this.operators.length||!!this.parsedOperator)}getValidationError(){return this.validationError}getFunction(){return this.parsedOperator==="OR"?"||":"&&"}getModel(){return this.parsedOperator==="OR"?"OR":"AND"}getAutocompleteListParams(t,e){let n;if(e==null)n="";else{let r=this.operators[e],s=this.operatorEndPositions[e];n=Fxe(r,t,s==null?this.params.expression.length:s+1)}let i=this.params.advancedFilterExpressionService.getJoinOperatorAutocompleteEntries();return(e||e==null&&this.activeOperator)&&(i=i.filter(({key:r})=>r===this.parsedOperator)),this.params.advancedFilterExpressionService.generateAutocompleteListParams(i,"join",n)}updateExpression(t,e,n){let{expression:i}=this.params,r=e.displayValue??e.key;if(n===0)for(let a=this.operatorEndPositions.length-1;a>0;a--){let l=this.operatorEndPositions[a];l!=null&&(i=Bw(i,this.operatorStartPositions[a],l,r).updatedValue)}let s=this.operatorStartPositions.length>n?this.operatorStartPositions[n]:t,o=(this.operatorEndPositions.length>n?this.operatorEndPositions[n]:void 0)??Lxe(i,t,!0).endPosition;return Bw(i,s,o,r,!0)}getNumOperators(){return this.operators.length}getLastOperatorEndPosition(){return this.operatorEndPositions[this.operatorEndPositions.length-1]}parseOperator(t){let e=this.operators.length>this.activeOperator?this.operators[this.activeOperator]:"",n=this.params.advancedFilterExpressionService.getExpressionJoinOperators(),i=Cie(e,n,r=>r);if(i){this.operatorEndPositions[this.activeOperator]=t;let r=n[i];if(this.activeOperator){if(i!==this.parsedOperator)return this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationJoinOperatorMismatch"),startPosition:t-e.length+1,endPosition:t}),!1}else this.parsedOperator=i;return e!==r&&(nbe(this.params,e,r,t),this.operators[this.activeOperator]=r),!0}else return i===null?!1:(this.validationError||(this.validationError={message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationInvalidJoinOperator"),startPosition:t-e.length+1,endPosition:t}),!0)}},c_i=class dot{constructor(e,n){this.params=e,this.startPosition=n,this.expectingExpression=!0,this.expectingOperator=!1,this.expressionParsers=[],this.operatorParser=new l_i(this.params),this.missingEndBracket=!1,this.extraEndBracket=!1}parseExpression(){let e=this.startPosition,{expression:n}=this.params;for(;e<n.length;){let i=n[e];if(i==="("&&!this.expectingOperator){let r=new dot(this.params,e+1);e=r.parseExpression(),this.expressionParsers.push(r),this.expectingExpression=!1,this.expectingOperator=!0}else{if(i===")")return this.endPosition=e-1,this.startPosition===0&&(this.extraEndBracket=!0),e;if(i!==" ")if(this.expectingExpression){let r=new GE(this.params,e);e=r.parseExpression(),this.expressionParsers.push(r),this.expectingExpression=!1,this.expectingOperator=!0}else this.expectingOperator&&(e=this.operatorParser.parseExpression(e),this.expectingOperator=!1,this.expectingExpression=!0)}e++}return this.startPosition>0&&(this.missingEndBracket=!0),e}isValid(){return!this.missingEndBracket&&!this.extraEndBracket&&this.expressionParsers.length===this.operatorParser.getNumOperators()+1&&this.operatorParser.isValid()&&this.expressionParsers.every(e=>e.isValid())}getValidationError(){let e=this.operatorParser.getValidationError();for(let i=0;i<this.expressionParsers.length;i++){let r=this.expressionParsers[i].getValidationError();if(r)return e&&e.startPosition<r.startPosition?e:r}if(e)return e;if(this.extraEndBracket)return{message:this.params.advancedFilterExpressionService.translate("advancedFilterValidationExtraEndBracket"),startPosition:this.endPosition+1,endPosition:this.endPosition+1};let n;return this.expressionParsers.length===this.operatorParser.getNumOperators()?n="advancedFilterValidationMissingCondition":this.missingEndBracket&&(n="advancedFilterValidationMissingEndBracket"),n?{message:this.params.advancedFilterExpressionService.translate(n),startPosition:this.params.expression.length,endPosition:this.params.expression.length}:null}getFunctionString(e){let n=this.expressionParsers.length>1,i=this.expressionParsers.map(r=>r.getFunctionString(e)).join(` ${this.operatorParser.getFunction()} `);return n?`(${i})`:i}getFunctionParsed(e){let n=this.operatorParser.getFunction(),i=this.expressionParsers.map(s=>s.getFunctionParsed(e)),r=n==="&&"?"every":"some";return(s,o,a)=>i[r](l=>l(s,o,a))}getAutocompleteListParams(e){if(this.endPosition!=null&&e>this.endPosition+1)return;if(!this.expressionParsers.length)return this.getColumnAutocompleteListParams();let n=this.getExpressionParserIndex(e);if(n==null)return this.params.expression[e]==="("?{enabled:!1}:this.getColumnAutocompleteListParams();let r=this.expressionParsers[n].getAutocompleteListParams(e);if(!r){if(n<this.expressionParsers.length-1)return this.operatorParser.getAutocompleteListParams(e,n);if(this.expressionParsers.length===this.operatorParser.getNumOperators()){let s=this.operatorParser.getLastOperatorEndPosition();return s==null||e<=s+1?this.operatorParser.getAutocompleteListParams(e,this.operatorParser.getNumOperators()-1):this.getColumnAutocompleteListParams()}return this.params.expression[e-1]===")"?{enabled:!1}:this.operatorParser.getAutocompleteListParams(e)}return r}updateExpression(e,n,i){let r=this.params.expression,s=this.getExpressionParserIndex(e);if(s==null){let l=i==="column"?this.params.advancedFilterExpressionService.getColumnValue(n):n.displayValue??n.key;return Bw(r,this.startPosition,this.startPosition,l,!0)}let a=this.expressionParsers[s].updateExpression(e,n,i);return a??(i==="column"?Bw(r,e,r.length-1,this.params.advancedFilterExpressionService.getColumnValue(n),!0):this.endPosition!=null&&e>this.endPosition+1?null:this.operatorParser.updateExpression(e,n,s))}getModel(){return this.expressionParsers.length>1?{filterType:"join",type:this.operatorParser.getModel(),conditions:this.expressionParsers.map(e=>e.getModel())}:this.expressionParsers[0].getModel()}getColumnAutocompleteListParams(){return this.params.advancedFilterExpressionService.generateAutocompleteListParams(this.params.advancedFilterExpressionService.getColumnAutocompleteEntries(),"column","")}getExpressionParserIndex(e){let n;for(let i=0;i<this.expressionParsers.length&&!(this.expressionParsers[i].startPosition>e);i++)n=i;return n}},d_i=class{constructor(t){this.params=t,this.valid=!1}parseExpression(){this.joinExpressionParser=new c_i(this.params,0);let t=this.joinExpressionParser.parseExpression();return this.valid=t>=this.params.expression.length-1&&this.joinExpressionParser.isValid(),this.params.expression}isValid(){return this.valid}getValidationMessage(){let t=this.joinExpressionParser.getValidationError();if(!t)return null;let{message:e,startPosition:n,endPosition:i}=t;return n<this.params.expression.length?this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessage",[e,this.params.expression.slice(n,i+1).trim()]):this.params.advancedFilterExpressionService.translate("advancedFilterValidationMessageAtEnd",[e])}getFunctionString(){let t=this.createFunctionParams();return{functionString:`return ${this.joinExpressionParser.getFunctionString(t)};`,params:t}}getFunctionParsed(){let t=this.createFunctionParams();return{expressionFunction:this.joinExpressionParser.getFunctionParsed(t),params:t}}getAutocompleteListParams(t){return this.joinExpressionParser.getAutocompleteListParams(t)??{enabled:!1}}updateExpression(t,e,n){return this.joinExpressionParser.updateExpression(t,e,n)}getModel(){return this.isValid()?this.joinExpressionParser.getModel():null}createFunctionParams(){return{operands:[],operators:[],evaluatorParams:[]}}},u_i=class extends Ot{constructor(){super(...arguments),this.beanName="advancedFilterService",this.appliedExpression=null,this.expression=null,this.isValid=!0}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.dataTypeService=t.dataTypeService,this.rowModel=t.rowModel,this.advancedFilterExpressionService=t.advancedFilterExpressionService}postConstruct(){this.setEnabled(this.gos.get("enableAdvancedFilter"),!0),this.ctrl=this.createManagedBean(new a_i(this.enabled)),this.expressionProxy={getValue:(t,e)=>{let n=this.columnModel.getColDefCol(t);return n?this.valueService.getValue(n,e,!0):void 0}},this.addManagedPropertyListener("enableAdvancedFilter",t=>this.setEnabled(!!t.currentValue)),this.addManagedEventListeners({newColumnsLoaded:t=>this.onNewColumnsLoaded(t)}),this.addManagedPropertyListener("includeHiddenColumnsInAdvancedFilter",()=>this.updateValidity())}isEnabled(){return this.enabled}isFilterPresent(){return!!this.expressionFunction}doesFilterPass(t){return this.expressionFunction(this.expressionProxy,t,this.expressionParams)}getModel(){let t=this.createExpressionParser(this.appliedExpression);return t?.parseExpression(),t?.getModel()??null}setModel(t){let e=(i,r)=>{if(i.filterType==="join"){let s=this.advancedFilterExpressionService.parseJoinOperator(i),o=i.conditions.map(a=>e(a)).filter(a=>Di(a)).join(` ${s} `);return r||i.conditions.length<=1?o:`(${o})`}else return this.advancedFilterExpressionService.parseColumnFilterModel(i)},n=t?e(t,!0):null;this.setExpressionDisplayValue(n),this.applyExpression(),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp()}getExpressionDisplayValue(){return this.expression}setExpressionDisplayValue(t){this.expression=t}isCurrentExpressionApplied(){return this.appliedExpression===this.expression}createExpressionParser(t){return t?new d_i({expression:t,columnModel:this.columnModel,dataTypeService:this.dataTypeService,valueService:this.valueService,advancedFilterExpressionService:this.advancedFilterExpressionService}):null}getDefaultExpression(t){let e=this.advancedFilterExpressionService.getColumnValue(t)+" ";return{updatedValue:e,updatedPosition:e.length}}isHeaderActive(){return!this.gos.get("advancedFilterParent")}getCtrl(){return this.ctrl}setEnabled(t,e){let n=this.enabled,i=this.rowModel.getType(),r=i==="clientSide"||i==="serverSide";t&&!i&&wt("Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model."),this.enabled=t&&r,!e&&this.enabled!==n&&this.eventService.dispatchEvent({type:"advancedFilterEnabledChanged",enabled:this.enabled})}applyExpression(){let t=this.createExpressionParser(this.expression);t?.parseExpression(),this.applyExpressionFromParser(t)}applyExpressionFromParser(t){if(this.isValid=!t||t.isValid(),!t||!this.isValid){this.expressionFunction=null,this.expressionParams=null,this.appliedExpression=null;return}let{expressionFunction:e,params:n}=this.getFunction(t);this.expressionFunction=e,this.expressionParams=n,this.appliedExpression=this.expression}getFunction(t){if(this.gos.get("suppressAdvancedFilterEval"))return t.getFunctionParsed();{let{functionString:e,params:n}=t.getFunctionString();return{expressionFunction:new Function("expressionProxy","node","params",e),params:n}}}updateValidity(){this.advancedFilterExpressionService.resetColumnCaches();let t=this.createExpressionParser(this.expression);t?.parseExpression();let n=(!t||t.isValid())!==this.isValid;return this.applyExpressionFromParser(t),this.ctrl.refreshComp(),this.ctrl.refreshBuilderComp(),n}onNewColumnsLoaded(t){if(t.source!=="gridInitializing"||!this.dataTypeService?.isPendingInference())return;this.ctrl.setInputDisabled(!0);let[e]=this.addManagedEventListeners({dataTypesInferred:()=>{e?.(),this.ctrl.setInputDisabled(!1)}})}},sbe="32.1.0",uot={version:sbe,moduleName:`${wr.AdvancedFilterModule}-core`,beans:[u_i,Yyi],dependantModules:[y1,ez]},h_i={version:sbe,moduleName:`${wr.AdvancedFilterModule}-api`,apiFunctions:{getAdvancedFilterModel:Nyi,setAdvancedFilterModel:Vyi,showAdvancedFilterBuilder:Byi,hideAdvancedFilterBuilder:zyi},dependantModules:[uot]},hot={version:sbe,moduleName:wr.AdvancedFilterModule,dependantModules:[uot,h_i]},obe={};tot(obe,{GridChartsModule:()=>vbe,agCharts:()=>Qot});g_i=class extends Ot{constructor(){super(...arguments),this.beanName="rangeService",this.cellRanges=[],this.bodyScrollListener=this.onBodyScroll.bind(this),this.dragging=!1,this.intersectionRange=!1}wireBeans(t){this.rowModel=t.rowModel,this.dragService=t.dragService,this.columnModel=t.columnModel,this.visibleColsService=t.visibleColsService,this.cellNavigationService=t.cellNavigationService,this.pinnedRowModel=t.pinnedRowModel,this.rowPositionUtils=t.rowPositionUtils,this.cellPositionUtils=t.cellPositionUtils,this.ctrlsService=t.ctrlsService,this.valueService=t.valueService}postConstruct(){let t=this.onColumnsChanged.bind(this),e=()=>this.removeAllCellRanges(),n=this.refreshLastRangeStart.bind(this);this.addManagedEventListeners({newColumnsLoaded:t,columnVisible:t,columnValueChanged:t,columnPivotModeChanged:e,columnRowGroupChanged:e,columnPivotChanged:e,columnGroupOpened:n,columnMoved:n,columnPinned:n}),this.ctrlsService.whenReady(i=>{let r=i.gridBodyCtrl;this.autoScrollService=new XB({scrollContainer:r.getBodyViewportElement(),scrollAxis:"xy",getVerticalPosition:()=>r.getScrollFeature().getVScrollPosition().top,setVerticalPosition:s=>r.getScrollFeature().setVerticalScrollPosition(s),getHorizontalPosition:()=>r.getScrollFeature().getHScrollPosition().left,setHorizontalPosition:s=>r.getScrollFeature().setHorizontalScrollPosition(s),shouldSkipVerticalScroll:()=>!this.gos.isDomLayout("normal"),shouldSkipHorizontalScroll:()=>!r.getScrollFeature().isHorizontalScrollShowing()})})}onColumnsChanged(){this.refreshLastRangeStart();let t=this.visibleColsService.getAllCols();this.cellRanges.forEach(n=>{let i=n.columns;n.columns=n.columns.filter(s=>s.isVisible()&&t.indexOf(s)!==-1),!Cf(i,n.columns)&&this.dispatchChangedEvent(!1,!0,n.id)});let e=this.cellRanges.length;this.cellRanges=this.cellRanges.filter(n=>n.columns.length>0),e>this.cellRanges.length&&this.dispatchChangedEvent(!1,!0)}refreshLastRangeStart(){let t=Ar(this.cellRanges);t&&this.refreshRangeStart(t)}isContiguousRange(t){let e=t.columns;if(!e.length)return!1;let n=this.visibleColsService.getAllCols(),i=e.map(r=>n.indexOf(r)).sort((r,s)=>r-s);return Ar(i)-i[0]+1===e.length}getRangeStartRow(t){return t.startRow&&t.endRow?this.rowPositionUtils.before(t.startRow,t.endRow)?t.startRow:t.endRow:{rowIndex:0,rowPinned:this.pinnedRowModel.getPinnedTopRowCount()>0?"top":null}}getRangeEndRow(t){if(t.startRow&&t.endRow)return this.rowPositionUtils.before(t.startRow,t.endRow)?t.endRow:t.startRow;let e=this.pinnedRowModel.getPinnedBottomRowCount();return e>0?{rowIndex:e-1,rowPinned:"bottom"}:{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}}setRangeToCell(t,e=!1){if(!this.gos.get("enableRangeSelection"))return;let n=this.calculateColumnsBetween(t.column,t.column);if(!n)return;(this.gos.get("suppressMultiRangeSelection")||!e||Ls(this.cellRanges))&&this.removeAllCellRanges(!0);let r={rowIndex:t.rowIndex,rowPinned:t.rowPinned},s={startRow:r,endRow:r,columns:n,startColumn:t.column};this.cellRanges.push(s),this.setNewestRangeStartCell(t),this.onDragStop(),this.dispatchChangedEvent(!0,!0)}extendLatestRangeToCell(t){if(this.isEmpty()||!this.newestRangeStartCell)return;let e=Ar(this.cellRanges);this.updateRangeEnd(e,t)}updateRangeEnd(t,e,n=!1){let i=e.column,r=this.calculateColumnsBetween(t.startColumn,i);!r||this.isLastCellOfRange(t,e)||(t.columns=r,t.endRow={rowIndex:e.rowIndex,rowPinned:e.rowPinned},n||this.dispatchChangedEvent(!0,!0,t.id))}refreshRangeStart(t){let{startColumn:e,columns:n}=t,i=(l,c)=>{let d=t.columns.filter(u=>u!==l);l?(t.startColumn=l,t.columns=c?[l,...d]:[...d,l]):t.columns=d},{left:r,right:s}=this.getRangeEdgeColumns(t);if(e===n[0]&&e!==r){i(r,!0);return}if(e===Ar(n)&&e===s){i(s,!1);return}}getRangeEdgeColumns(t){let e=this.visibleColsService.getAllCols(),n=t.columns.map(i=>e.indexOf(i)).filter(i=>i>-1).sort((i,r)=>i-r);return{left:e[n[0]],right:e[Ar(n)]}}extendLatestRangeInDirection(t){if(this.isEmpty()||!this.newestRangeStartCell)return;let e=t.key,n=t.ctrlKey||t.metaKey,i=Ar(this.cellRanges),r=this.newestRangeStartCell,s=i.columns[0],o=Ar(i.columns),a=i.endRow.rowIndex,l=i.endRow.rowPinned,d={column:r.column===s?o:s,rowIndex:a,rowPinned:l},u=this.cellNavigationService.getNextCellToFocus(e,d,n);if(u)return this.setCellRange({rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:u.rowIndex,rowEndPinned:u.rowPinned,columnStart:r.column,columnEnd:u.column}),u}setCellRange(t){this.gos.get("enableRangeSelection")&&(this.removeAllCellRanges(!0),this.addCellRange(t))}setCellRanges(t){OZ(this.cellRanges,t)||(this.removeAllCellRanges(!0),t.forEach(e=>{e.columns&&e.startRow&&this.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.columns[0]}),this.cellRanges.push(e)}),this.dispatchChangedEvent(!1,!0))}setNewestRangeStartCell(t){this.newestRangeStartCell=t}clearCellRangeCellValues(t){let{cellRanges:e}=t,{cellEventSource:n="rangeService",dispatchWrapperEvents:i,wrapperEventSource:r="deleteKey"}=t;i&&this.eventService.dispatchEvent({type:"rangeDeleteStart",source:r}),e||(e=this.cellRanges),e.forEach(s=>{this.forEachRowInRange(s,o=>{let a=this.rowPositionUtils.getRowNode(o);if(a)for(let l=0;l<s.columns.length;l++){let c=this.columnModel.getCol(s.columns[l]);if(!c||!c.isCellEditable(a))continue;let d=this.valueService.parseValue(c,a,"",a.getValueFromValueService(c))??null;a.setDataValue(c,d,n)}})}),i&&this.eventService.dispatchEvent({type:"rangeDeleteEnd",source:r})}createCellRangeFromCellRangeParams(t){return this.createPartialCellRangeFromRangeParams(t,!1)}createPartialCellRangeFromRangeParams(t,e){let n,i=!1;if(t.columns)n=t.columns.map(o=>this.columnModel.getCol(o)).filter(o=>o);else{let o=this.columnModel.getCol(t.columnStart),a=this.columnModel.getCol(t.columnEnd);if(!o||!a)return;n=this.calculateColumnsBetween(o,a),n&&n.length&&(i=n[0]!==o)}if(!n||!e&&n.length===0)return;let r=t.rowStartIndex!=null?{rowIndex:t.rowStartIndex,rowPinned:t.rowStartPinned||null}:void 0,s=t.rowEndIndex!=null?{rowIndex:t.rowEndIndex,rowPinned:t.rowEndPinned||null}:void 0;return{startRow:r,endRow:s,columns:n,startColumn:i?Ar(n):n[0]}}addCellRange(t){if(!this.gos.get("enableRangeSelection"))return;let e=this.createCellRangeFromCellRangeParams(t);e&&(e.startRow&&this.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.startColumn}),this.cellRanges.push(e),this.dispatchChangedEvent(!1,!0,e.id))}getCellRanges(){return this.cellRanges}isEmpty(){return this.cellRanges.length===0}isMoreThanOneCell(){let t=this.cellRanges.length;if(t===0)return!1;if(t>1)return!0;let e=this.cellRanges[0],n=this.getRangeStartRow(e),i=this.getRangeEndRow(e);return n.rowPinned!==i.rowPinned||n.rowIndex!==i.rowIndex||e.columns.length!==1}areAllRangesAbleToMerge(){let t=new Map;if(this.cellRanges.length<=1)return!0;this.cellRanges.forEach(i=>{this.forEachRowInRange(i,r=>{let s=`${r.rowPinned||"normal"}_${r.rowIndex}`,o=t.get(s),a=i.columns.map(l=>l.getId());if(o){let l=a.filter(c=>o.indexOf(c)===-1);o.push(...l)}else t.set(s,a)})});let n;for(let i of t.values()){let r=i.sort().join();if(n===void 0){n=r;continue}if(n!==r)return!1}return!0}forEachRowInRange(t,e){let n=this.getRangeStartRow(t),i=this.getRangeEndRow(t),r=n;for(;r&&(e(r),!this.rowPositionUtils.sameRow(r,i));)r=this.cellNavigationService.getRowBelow(r)}removeAllCellRanges(t){this.isEmpty()||(this.onDragStop(),this.cellRanges.length=0,t||this.dispatchChangedEvent(!1,!0))}onBodyScroll(){this.dragging&&this.lastMouseEvent&&this.onDragging(this.lastMouseEvent)}isCellInAnyRange(t){return this.getCellRangeCount(t)>0}isCellInSpecificRange(t,e){let n=e.columns!==null&&Sl(e.columns,t.column),i=this.isRowInRange(t.rowIndex,t.rowPinned,e);return n&&i}isLastCellOfRange(t,e){let{startRow:n,endRow:i}=t,r=this.rowPositionUtils.before(n,i)?i:n,s=e.rowIndex===r.rowIndex&&e.rowPinned===r.rowPinned,o=t.columns[0],a=Ar(t.columns),l=t.startColumn===o?a:o;return e.column===l&&s}isBottomRightCell(t,e){let n=this.visibleColsService.getAllCols(),i=t.columns.map(c=>n.indexOf(c)).sort((c,d)=>c-d),{startRow:r,endRow:s}=t,o=this.rowPositionUtils.before(r,s)?s:r,a=n.indexOf(e.column)===Ar(i),l=e.rowIndex===o.rowIndex&&xu(e.rowPinned)===xu(o.rowPinned);return a&&l}getCellRangeCount(t){return this.isEmpty()?0:this.cellRanges.filter(e=>this.isCellInSpecificRange(t,e)).length}isRowInRange(t,e,n){let i=this.getRangeStartRow(n),r=this.getRangeEndRow(n),s={rowIndex:t,rowPinned:e||null},o=s.rowIndex===i.rowIndex&&s.rowPinned==i.rowPinned,a=s.rowIndex===r.rowIndex&&s.rowPinned==r.rowPinned;if(o||a)return!0;let l=!this.rowPositionUtils.before(s,i),c=this.rowPositionUtils.before(s,r);return l&&c}getDraggingRange(){return this.draggingRange}onDragStart(t){if(!this.gos.get("enableRangeSelection"))return;let{ctrlKey:e,metaKey:n,shiftKey:i}=t,r=e||n,o=!this.gos.get("suppressMultiRangeSelection")?r:!1,a=i&&_5(this.cellRanges);!o&&(!a||Di(Ar(this.cellRanges).type))&&this.removeAllCellRanges(!0);let l=this.dragService.getStartTarget();if(l&&this.updateValuesOnMove(l),!!this.lastCellHovered){if(this.dragging=!0,this.lastMouseEvent=t,this.intersectionRange=o&&this.getCellRangeCount(this.lastCellHovered)>1,a||this.setNewestRangeStartCell(this.lastCellHovered),this.cellRanges.length>0)this.draggingRange=Ar(this.cellRanges);else{let c={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned};this.draggingRange={startRow:c,endRow:c,columns:[this.lastCellHovered.column],startColumn:this.newestRangeStartCell.column},this.cellRanges.push(this.draggingRange)}this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener),this.dispatchChangedEvent(!0,!1,this.draggingRange.id)}}intersectLastRange(t){if(t&&this.dragging||this.gos.get("suppressMultiRangeSelection")||this.isEmpty())return;let e=this.rowPositionUtils,n=Ar(this.cellRanges),i=this.getRangeStartRow(n),r=this.getRangeEndRow(n),s=[];this.cellRanges.slice(0,-1).forEach(o=>{let a=this.getRangeStartRow(o),l=this.getRangeEndRow(o),c=o.columns,d=c.filter(m=>n.columns.indexOf(m)===-1);if(d.length===c.length){s.push(o);return}if(e.before(r,a)||e.before(l,i)){s.push(o);return}let u=s.length;if(e.before(a,i)){let m={columns:[...c],startColumn:n.startColumn,startRow:ve({},a),endRow:this.cellNavigationService.getRowAbove(i)};s.push(m)}if(d.length>0){let m={columns:d,startColumn:Sl(d,n.startColumn)?n.startColumn:d[0],startRow:this.rowMax([ve({},i),ve({},a)]),endRow:this.rowMin([ve({},r),ve({},l)])};s.push(m)}e.before(r,l)&&s.push({columns:[...c],startColumn:n.startColumn,startRow:this.cellNavigationService.getRowBelow(r),endRow:ve({},l)}),s.length-u===1&&(s[s.length-1].id=o.id)}),this.cellRanges=s,t&&this.dispatchChangedEvent(!1,!0)}rowMax(t){let e;return t.forEach(n=>{(e===void 0||this.rowPositionUtils.before(e,n))&&(e=n)}),e}rowMin(t){let e;return t.forEach(n=>{(e===void 0||this.rowPositionUtils.before(n,e))&&(e=n)}),e}updateValuesOnMove(t){let n=BB(this.gos,t,dx.DOM_DATA_KEY_CELL_CTRL)?.getCellPosition();this.cellHasChanged=!1,!(!n||this.lastCellHovered&&this.cellPositionUtils.equals(n,this.lastCellHovered))&&(this.lastCellHovered&&(this.cellHasChanged=!0),this.lastCellHovered=n)}onDragging(t){if(!this.dragging||!t)return;this.updateValuesOnMove(t.target),this.lastMouseEvent=t;let e=this.lastCellHovered,n=s=>e&&e.rowPinned===s&&this.newestRangeStartCell.rowPinned===s,i=n("top")||n("bottom");if(this.autoScrollService.check(t,i),!this.cellHasChanged)return;let r=this.calculateColumnsBetween(this.newestRangeStartCell.column,e.column);r&&(this.draggingRange.endRow={rowIndex:e.rowIndex,rowPinned:e.rowPinned},this.draggingRange.columns=r,this.dispatchChangedEvent(!1,!1,this.draggingRange.id))}onDragStop(){if(!this.dragging)return;let{id:t}=this.draggingRange;this.autoScrollService.ensureCleared(),this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener),this.lastMouseEvent=null,this.dragging=!1,this.draggingRange=void 0,this.lastCellHovered=void 0,this.intersectionRange&&(this.intersectionRange=!1,this.intersectLastRange()),this.dispatchChangedEvent(!1,!0,t)}dispatchChangedEvent(t,e,n){this.eventService.dispatchEvent({type:"rangeSelectionChanged",started:t,finished:e,id:n})}calculateColumnsBetween(t,e){let n=this.visibleColsService.getAllCols(),i=t===e,r=n.indexOf(t),s=d=>wt(`column ${d.getId()} is not visible`);if(r<0){s(t);return}let o=i?r:n.indexOf(e);if(o<0){s(e);return}if(i)return[t];let a=Math.min(r,o),l=a===r?o:r,c=[];for(let d=a;d<=l;d++)c.push(n[d]);return c}},pot=class extends ai{constructor(){super(...arguments),this.changedCalculatedValues=!1,this.dragging=!1,this.shouldDestroyOnEndDragging=!1}wireBeans(t){this.dragService=t.dragService,this.rangeService=t.rangeService,this.mouseEventService=t.mouseEventService,this.rowPositionUtils=t.rowPositionUtils,this.cellPositionUtils=t.cellPositionUtils,this.ctrlsService=t.ctrlsService}postConstruct(){this.dragService.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragStart:this.onDragStart.bind(this),onDragging:t=>{this.dragging=!0,this.rangeService.autoScrollService.check(t),this.changedCalculatedValues&&(this.onDrag(t),this.changedCalculatedValues=!1)},onDragStop:t=>{this.dragging=!1,this.onDragEnd(t),this.clearValues(),this.rangeService.autoScrollService.ensureCleared(),document.body.classList.remove(this.getDraggingCssClass()),this.shouldDestroyOnEndDragging&&this.destroy()}}),this.addManagedElementListeners(this.getGui(),{mousedown:this.preventRangeExtension.bind(this)})}isDragging(){return this.dragging}getCellCtrl(){return this.cellCtrl}setCellCtrl(t){this.cellCtrl=t}getCellRange(){return this.cellRange}setCellRange(t){this.cellRange=t}getRangeStartRow(){return this.rangeStartRow}setRangeStartRow(t){this.rangeStartRow=t}getRangeEndRow(){return this.rangeEndRow}setRangeEndRow(t){this.rangeEndRow=t}getLastCellHovered(){return this.lastCellHovered}preventRangeExtension(t){t.stopPropagation()}onDragStart(t){[this.cellHoverListener]=this.addManagedElementListeners(this.ctrlsService.get("gridCtrl").getGui(),{mousemove:this.updateValuesOnMove.bind(this)}),document.body.classList.add(this.getDraggingCssClass())}getDraggingCssClass(){return`ag-dragging-${this.type===px.FILL?"fill":"range"}-handle`}updateValuesOnMove(t){let e=this.mouseEventService.getCellPositionForEvent(t);!e||this.lastCellHovered&&this.cellPositionUtils.equals(e,this.lastCellHovered)||(this.lastCellHovered=e,this.changedCalculatedValues=!0)}getType(){return this.type}refresh(t){let e=this.getCellCtrl(),n=this.getGui(),i=Ar(this.rangeService.getCellRanges()),r=i.startRow,s=i.endRow;if(r&&s&&(this.rowPositionUtils.before(s,r)?(this.setRangeStartRow(s),this.setRangeEndRow(r)):(this.setRangeStartRow(r),this.setRangeEndRow(s))),e!==t||!l1(n)){this.setCellCtrl(t);let o=t.getComp().getParentOfValue();o&&o.appendChild(n)}this.setCellRange(i)}clearValues(){this.lastCellHovered=void 0,this.removeListeners()}removeListeners(){this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0)}destroy(){if(!this.shouldDestroyOnEndDragging&&this.isDragging()){Vn(this.getGui(),!1),this.shouldDestroyOnEndDragging=!0;return}this.shouldDestroyOnEndDragging=!1,super.destroy(),this.removeListeners();let t=this.getGui();t.parentElement&&t.parentElement.removeChild(t)}};y_i=class extends pot{constructor(){super('<div class="ag-fill-handle"></div>'),this.markedCells=[],this.cellValues=[],this.isUp=!1,this.isLeft=!1,this.isReduce=!1,this.type=px.FILL}wireBeans(t){super.wireBeans(t),this.valueService=t.valueService,this.navigationService=t.navigationService,this.cellNavigationService=t.cellNavigationService,this.visibleColsService=t.visibleColsService}updateValuesOnMove(t){super.updateValuesOnMove(t),this.initialXY||(this.initialXY=this.mouseEventService.getNormalisedPosition(t));let{x:e,y:n}=this.initialXY,{x:i,y:r}=this.mouseEventService.getNormalisedPosition(t),s=Math.abs(e-i),o=Math.abs(n-r),a=this.getFillHandleDirection(),l;a==="xy"?l=s>o?"x":"y":l=a,l!==this.dragAxis&&(this.dragAxis=l,this.changedCalculatedValues=!0)}onDrag(t){if(!this.initialPosition){let n=this.getCellCtrl();if(!n)return;this.initialPosition=n.getCellPosition()}let e=this.getLastCellHovered();e&&this.markPathFrom(this.initialPosition,e)}onDragEnd(t){if(this.initialXY=null,!this.markedCells.length)return;let e=this.dragAxis==="x",n=this.getCellRange(),i=n.columns.length,r=this.getRangeStartRow(),s=this.getRangeEndRow(),o;if(!this.isUp&&!this.isLeft)o=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,columnStart:n.columns[0],rowEndIndex:e?s.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:e?s.rowPinned:this.lastCellMarked.rowPinned,columnEnd:e?this.lastCellMarked.column:n.columns[i-1]});else{let a=e?r:this.lastCellMarked;o=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,columnStart:e?this.lastCellMarked.column:n.columns[0],rowEndIndex:s.rowIndex,rowEndPinned:s.rowPinned,columnEnd:n.columns[i-1]})}o&&(this.eventService.dispatchEvent({type:"fillStart"}),this.handleValueChanged(n,o,t),this.rangeService.setCellRanges([o]),this.eventService.dispatchEvent({type:"fillEnd",initialRange:n,finalRange:o}))}getFillHandleDirection(){let t=this.gos.get("fillHandleDirection");return t?t!=="x"&&t!=="y"&&t!=="xy"?(wt("valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'."),"xy"):t:"xy"}handleValueChanged(t,e,n){let i=this.rangeService.getRangeEndRow(t),r=this.rangeService.getRangeStartRow(t),s=this.rangeService.getRangeEndRow(e),o=this.rangeService.getRangeStartRow(e),a=this.dragAxis==="y";if(this.isReduce&&!this.gos.get("suppressClearOnFillReduction")){let E=a?t.columns:t.columns.filter(I=>e.columns.indexOf(I)<0),M=a?this.cellNavigationService.getRowBelow(s):o;M&&this.clearCellsInRange(M,i,E);return}let l=[],c=[],d=[],u=[],m=!0,f=0,_=()=>{l.length=0,c.length=0,d.length=0,u.length=0,f=0},x=(E,M)=>{let I=this.isUp?i:r,z=!1;for(a&&(m=!0,_());!z&&I;){let G=this.rowPositionUtils.getRowNode(I);if(!G)break;a&&E?D(l,E,G,()=>!this.rowPositionUtils.sameRow(I,this.isUp?r:i)):M&&(m=!0,_(),M.forEach(A=>D(l,A,G,()=>A!==(this.isLeft?t.columns[0]:Ar(t.columns))))),z=this.rowPositionUtils.sameRow(I,this.isUp?o:s),I=this.isUp?this.cellNavigationService.getRowAbove(I):this.cellNavigationService.getRowBelow(I)}},D=(E,M,I,z)=>{let G,A=!1;if(m)G=this.valueService.getValue(M,I),c.push(G),d.push(this.valueService.getValue(M,I,void 0,!0)),u.push(this.valueService.formatValue(M,I,G)),m=z();else{let{value:Y,fromUserFunction:X,sourceCol:ne,sourceRowNode:pe}=this.processValues({event:n,values:E,initialValues:c,initialNonAggregatedValues:d,initialFormattedValues:u,col:M,rowNode:I,idx:f++});if(G=Y,M.isCellEditable(I)){let ce=this.valueService.getValue(M,I);X||(ne&&ne.getColDef()?.useValueFormatterForExport!==!1&&(G=this.valueService.formatValue(ne,pe,G)??G),M.getColDef().useValueParserForImport!==!1&&(G=this.valueService.parseValue(M,I,ne?G:G1(G),ce))),!X||ce!==G?I.setDataValue(M,G,"rangeService"):A=!0}}A||E.push({value:G,column:M,rowNode:I})};if(a)t.columns.forEach(E=>{x(E)});else{let E=this.isLeft?[...e.columns].reverse():e.columns;x(void 0,E)}}clearCellsInRange(t,e,n){let i={startRow:t,endRow:e,columns:n,startColumn:n[0]};this.rangeService.clearCellRangeCellValues({cellRanges:[i]})}processValues(t){let{event:e,values:n,initialValues:i,initialNonAggregatedValues:r,initialFormattedValues:s,col:o,rowNode:a,idx:l}=t,c=this.gos.getCallback("fillOperation"),d=this.dragAxis==="y",u;if(d?u=this.isUp?"up":"down":u=this.isLeft?"left":"right",c){let f={event:e,values:n.map(({value:x})=>x),initialValues:i,initialNonAggregatedValues:r,initialFormattedValues:s,currentIndex:l,currentCellValue:this.valueService.getValue(o,a),direction:u,column:o,rowNode:a},_=c(f);if(_!==!1)return{value:_,fromUserFunction:!0}}let m=!n.some(({value:f})=>{let _=parseFloat(f);return isNaN(_)||_.toString()!==f.toString()});if(e.altKey||!m){if(m&&i.length===1){let D=this.isUp||this.isLeft?-1:1;return{value:parseFloat(Ar(n).value)+1*D,fromUserFunction:!1}}let{value:f,column:_,rowNode:x}=n[l%n.length];return{value:f,fromUserFunction:!1,sourceCol:_,sourceRowNode:x}}return{value:Ar(v_i(n.map(({value:f})=>Number(f)))),fromUserFunction:!1}}clearValues(){this.clearMarkedPath(),this.clearCellValues(),this.lastCellMarked=void 0,super.clearValues()}clearMarkedPath(){this.markedCells.forEach(t=>{if(!t.isAlive())return;let e=t.getComp();e.addOrRemoveCssClass("ag-selection-fill-top",!1),e.addOrRemoveCssClass("ag-selection-fill-right",!1),e.addOrRemoveCssClass("ag-selection-fill-bottom",!1),e.addOrRemoveCssClass("ag-selection-fill-left",!1)}),this.markedCells.length=0,this.isUp=!1,this.isLeft=!1,this.isReduce=!1}clearCellValues(){this.cellValues.length=0}markPathFrom(t,e){if(this.clearMarkedPath(),this.clearCellValues(),this.dragAxis==="y"){if(this.rowPositionUtils.sameRow(e,t))return;let n=this.rowPositionUtils.before(e,t),i=this.getRangeStartRow(),r=this.getRangeEndRow();n&&(e.rowPinned==i.rowPinned&&e.rowIndex>=i.rowIndex||i.rowPinned!=r.rowPinned&&e.rowPinned==r.rowPinned&&e.rowIndex<=r.rowIndex)?(this.reduceVertical(t,e),this.isReduce=!0):(this.extendVertical(t,e,n),this.isReduce=!1)}else{let n=t.column,i=e.column;if(n===i)return;let r=this.visibleColsService.getAllCols(),s=r.indexOf(n),o=r.indexOf(i);o<=s&&o>=r.indexOf(this.getCellRange().columns[0])?(this.reduceHorizontal(t,e),this.isReduce=!0):(this.extendHorizontal(t,e,o<s),this.isReduce=!1)}this.lastCellMarked=e}extendVertical(t,e,n){let{navigationService:i,rangeService:r}=this,s=t;do{let o=this.getCellRange(),a=o.columns.length;for(let l=0;l<a;l++){let c=o.columns[l],d={rowIndex:s.rowIndex,rowPinned:s.rowPinned},u=St(ve({},d),{column:c}),m=r.isCellInSpecificRange(u,o),f=this.rowPositionUtils.sameRow(s,t);if(n&&(this.isUp=!0),!f){let _=i.getCellByPosition(u);if(_){this.markedCells.push(_);let x=_.getComp();m||(x.addOrRemoveCssClass("ag-selection-fill-left",l===0),x.addOrRemoveCssClass("ag-selection-fill-right",l===a-1)),x.addOrRemoveCssClass(n?"ag-selection-fill-top":"ag-selection-fill-bottom",this.rowPositionUtils.sameRow(s,e))}}}if(this.rowPositionUtils.sameRow(s,e))break}while(s=n?this.cellNavigationService.getRowAbove(s):this.cellNavigationService.getRowBelow(s))}reduceVertical(t,e){let n=t;do{let i=this.getCellRange(),r=i.columns.length,s=this.rowPositionUtils.sameRow(n,e);for(let o=0;o<r;o++){let a={rowIndex:n.rowIndex,rowPinned:n.rowPinned},l=St(ve({},a),{column:i.columns[o]}),c=this.navigationService.getCellByPosition(l);c&&(this.markedCells.push(c),c.getComp().addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(n,e)))}if(s)break}while(n=this.cellNavigationService.getRowAbove(n))}extendHorizontal(t,e,n){let i=this.visibleColsService.getAllCols(),r=i.indexOf(n?e.column:t.column),s=i.indexOf(n?this.getCellRange().columns[0]:e.column),o=n?0:1,a=i.slice(r+o,s+o),l=this.getRangeStartRow(),c=this.getRangeEndRow();a.forEach(d=>{let u=l,m=!1;do{m=this.rowPositionUtils.sameRow(u,c);let f=this.navigationService.getCellByPosition({rowIndex:u.rowIndex,rowPinned:u.rowPinned,column:d});if(f){this.markedCells.push(f);let _=f.getComp();_.addOrRemoveCssClass("ag-selection-fill-top",this.rowPositionUtils.sameRow(u,l)),_.addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(u,c)),n?(this.isLeft=!0,_.addOrRemoveCssClass("ag-selection-fill-left",d===a[0])):_.addOrRemoveCssClass("ag-selection-fill-right",d===Ar(a))}u=this.cellNavigationService.getRowBelow(u)}while(!m)})}reduceHorizontal(t,e){let n=this.visibleColsService.getAllCols(),i=n.indexOf(e.column),r=n.indexOf(t.column),s=n.slice(i,r),o=this.getRangeStartRow(),a=this.getRangeEndRow();s.forEach(l=>{let c=o,d=!1;do{d=this.rowPositionUtils.sameRow(c,a);let u=this.navigationService.getCellByPosition({rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:l});u&&(this.markedCells.push(u),u.getComp().addOrRemoveCssClass("ag-selection-fill-right",l===s[0])),c=this.cellNavigationService.getRowBelow(c)}while(!d)})}refresh(t){let e=this.rangeService.getCellRanges()[0];if(!e.startRow||!e.endRow){this.destroy();return}super.refresh(t)}},__i=class extends pot{constructor(){super('<div class="ag-range-handle"></div>'),this.type=px.RANGE,this.rangeFixed=!1}onDrag(t){let e=this.getLastCellHovered();if(!e)return;let n=this.rangeService.getCellRanges(),i=Ar(n);this.rangeFixed||(this.fixRangeStartEnd(i),this.rangeFixed=!0),this.endPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column},n.length===2&&n[0].type===S5.DIMENSION&&i.type===S5.VALUE&&!this.rowPositionUtils.sameRow(this.endPosition,this.rangeService.getRangeEndRow(i))&&this.rangeService.updateRangeEnd(n[0],St(ve({},this.endPosition),{column:n[0].columns[0]}),!0),this.rangeService.extendLatestRangeToCell(this.endPosition)}onDragEnd(t){let e=Ar(this.rangeService.getCellRanges());this.fixRangeStartEnd(e),this.rangeFixed=!1}fixRangeStartEnd(t){let e=this.rangeService.getRangeStartRow(t),n=this.rangeService.getRangeEndRow(t),i=t.columns[0];t.startRow=e,t.endRow=n,t.startColumn=i}},C_i=class extends Ot{constructor(){super(...arguments),this.beanName="selectionHandleFactory"}createSelectionHandle(t){return this.createBean(t===px.RANGE?new __i:new y_i)}},abe="32.1.0",mot={version:abe,moduleName:`${wr.RangeSelectionModule}-core`,beans:[g_i,C_i],dependantModules:[y1]},x_i={version:abe,moduleName:`${wr.RangeSelectionModule}-api`,apiFunctions:{getCellRanges:p_i,addCellRange:m_i,clearRangeSelection:f_i},dependantModules:[mot]},lbe={version:abe,moduleName:wr.RangeSelectionModule,dependantModules:[mot,x_i]};iot(obe,Cxe);fot={area:{isCartesian:!0,canInvert:!0},bar:{isCartesian:!0,canInvert:!0},histogram:{isCartesian:!0},line:{isCartesian:!0,canInvert:!0},pie:{isPie:!0},donut:{isPie:!0,canInvert:!0},scatter:{isCartesian:!0},bubble:{isCartesian:!0},"radial-column":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radial-bar":{isPolar:!0,isEnterprise:!0,isRadial:!0,canInvert:!0},"radar-line":{isPolar:!0,isEnterprise:!0,canInvert:!0},"radar-area":{isPolar:!0,isEnterprise:!0,canInvert:!0},nightingale:{isPolar:!0,isEnterprise:!0,canInvert:!0},"range-bar":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},"range-area":{isCartesian:!0,isEnterprise:!0},"box-plot":{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0},treemap:{isEnterprise:!0,isHierarchical:!0},sunburst:{isEnterprise:!0,isHierarchical:!0},heatmap:{isCartesian:!0,isEnterprise:!0},waterfall:{isCartesian:!0,isEnterprise:!0,canSwitchDirection:!0}};S_i=new Set(["stackedColumn","normalizedColumn","stackedBar","normalizedBar"]);_ot=class extends Ot{constructor(t,e,n,i){super(),this.chartController=t,this.eGui=e,this.cssClass=n,this.createPanels=i,this.panels=[]}postConstruct(){this.addManagedListeners(this.chartController,{chartUpdated:()=>this.refreshPanels(!0),chartApiUpdate:()=>this.refreshPanels(!1)})}addComponent(t){this.createBean(t),this.panels.push(t),t.addCssClass(this.cssClass),this.eGui.appendChild(t.getGui())}refreshPanels(t){let e=this.chartController.getChartType(),n=this.chartController.isGrouping(),i=oh(e);t&&e===this.chartType&&n===this.isGrouping||(this.destroyPanels(),this.createPanels(e,i),this.chartType=e,this.isGrouping=n)}destroyPanels(){this.panels.forEach(t=>{dc(t.getGui()),this.destroyBean(t)}),this.panels=[]}destroy(){this.destroyPanels(),super.destroy()}},k_i=class extends ai{constructor(t){super(),this.chartMenuParamsFactory=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t=this.chartMenuParamsFactory.addEnableParams("animation.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("animation"),suppressEnabledCheckbox:!0,useToggle:!0}),e=this.chartMenuParamsFactory.getDefaultNumberInputParams("animation.duration","durationMillis",{min:0});this.setTemplate(`<div>
            <ag-group-component data-ref="animationGroup">
                <ag-input-number-field data-ref="animationHeightInput"></ag-input>
            </ag-group-component>
        </div>`,[ah,bD],{animationGroup:t,animationHeightInput:e})}},I_i=class extends yg{constructor(){super({template:`
            <div role="presentation" class="ag-color-input">
                <div data-ref="eLabel" class="ag-input-field-label"></div>
                <div data-ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
                    <input data-ref="eInput" class="ag-input-field-input">
                    <div data-ref="eColor" class="ag-color-input-color"></div>
                </div>
            </div>`}),this.eColor=Bt}wireBeans(t){this.chartTranslationService=t.chartTranslationService}setColor(t){let e=t.toRgbaString();this.setValue(Zl.Color.fromString(e).toHexString().toUpperCase(),!0),this.eColor.style.backgroundColor=e}setValue(t,e){let n=Zl.Color.validColorString(t??"");return this.eInput.setCustomValidity(n?"":this.chartTranslationService.translate("invalidColor")),super.setValue(t,e),n&&!e&&this.dispatchLocalEvent({type:"colorChanged"}),this}onColorChanged(t){this.addManagedListeners(this,{colorChanged:()=>t(Zl.Color.fromString(this.value))})}},A_i={selector:"AG-COLOR-INPUT",component:I_i},P_i=(()=>{let t=class zE extends ai{constructor(n){super(`<div class="ag-color-panel" tabindex="-1">
            <div data-ref="spectrumColor" class="ag-spectrum-color">
                <div class="ag-spectrum-sat ag-spectrum-fill">
                    <div data-ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">
                        <div data-ref="spectrumDragger" class="ag-spectrum-dragger"></div>
                    </div>
                </div>
            </div>
            <div class="ag-spectrum-tools">
                <div data-ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">
                    <div class="ag-spectrum-hue-background"></div>
                    <div data-ref="spectrumHueSlider" class="ag-spectrum-slider"></div>
                </div>
                <div data-ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">
                    <div class="ag-spectrum-alpha-background"></div>
                    <div data-ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>
                </div>
                <ag-color-input data-ref="colorInput"></ag-color-input>
                <div data-ref="recentColors" class="ag-recent-colors"></div>
            </div>
        </div>`,[A_i]),this.H=1,this.S=1,this.B=1,this.A=1,this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1,this.colorChanged=!1,this.spectrumColor=Bt,this.spectrumVal=Bt,this.spectrumDragger=Bt,this.spectrumHue=Bt,this.spectrumHueSlider=Bt,this.spectrumAlpha=Bt,this.spectrumAlphaSlider=Bt,this.colorInput=Bt,this.recentColors=Bt,this.picker=n.picker}postConstruct(){this.initTabIndex(),this.initRecentColors(),this.addGuiEventListener("focus",()=>this.spectrumColor.focus()),this.addGuiEventListener("keydown",n=>{n.key===It.ENTER&&!n.defaultPrevented&&this.destroy()}),this.addManagedListeners(this.spectrumColor,{keydown:n=>this.moveDragger(n)}),this.addManagedListeners(this.spectrumAlphaSlider,{keydown:n=>this.moveAlphaSlider(n)}),this.addManagedListeners(this.spectrumHueSlider,{keydown:n=>this.moveHueSlider(n)}),this.addManagedListeners(this.spectrumVal,{mousedown:this.onSpectrumDraggerDown.bind(this)}),this.addManagedListeners(this.spectrumHue,{mousedown:this.onSpectrumHueDown.bind(this)}),this.addManagedListeners(this.spectrumAlpha,{mousedown:this.onSpectrumAlphaDown.bind(this)}),this.addGuiEventListener("mousemove",n=>{this.onSpectrumDraggerMove(n),this.onSpectrumHueMove(n),this.onSpectrumAlphaMove(n)}),this.addManagedListeners(document,{mouseup:this.onMouseUp.bind(this)}),this.colorInput.onColorChanged(this.setColor.bind(this)),this.addManagedListeners(this.recentColors,{click:this.onRecentColorClick.bind(this),keydown:n=>{(n.key===It.ENTER||n.key===It.SPACE)&&(n.preventDefault(),this.onRecentColorClick(n))}})}initTabIndex(){let n=this.tabIndex=this.gos.get("tabIndex").toString();this.spectrumColor.setAttribute("tabindex",n),this.spectrumHueSlider.setAttribute("tabindex",n),this.spectrumAlphaSlider.setAttribute("tabindex",n)}refreshSpectrumRect(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()}refreshHueRect(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()}refreshAlphaRect(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()}onSpectrumDraggerDown(n){this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(n)}onSpectrumDraggerMove(n){this.isSpectrumDragging&&this.moveDragger(n)}onSpectrumHueDown(n){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(n)}onSpectrumHueMove(n){this.isSpectrumHueDragging&&this.moveHueSlider(n)}onSpectrumAlphaDown(n){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(n)}onSpectrumAlphaMove(n){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(n)}onMouseUp(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1}moveDragger(n){let i=this.spectrumValRect;if(!i)return;let r,s;if(n instanceof MouseEvent)r=n.clientX-i.left,s=n.clientY-i.top;else{let o=n.key===It.LEFT,a=n.key===It.RIGHT,l=n.key===It.UP,c=n.key===It.DOWN,d=l||c,u=o||a;if(!d&&!u)return;n.preventDefault();let{x:m,y:f}=this.getSpectrumValue();r=m+(u?o?-5:5:0),s=f+(d?l?-5:5:0)}r=Math.max(r,0),r=Math.min(r,i.width),s=Math.max(s,0),s=Math.min(s,i.height),this.setSpectrumValue(r/i.width,1-s/i.height)}moveHueSlider(n){let i=this.spectrumHueRect;if(!i)return;let r=this.moveSlider(this.spectrumHueSlider,n);r!=null&&(this.H=1-r/i.width,this.update())}moveAlphaSlider(n){let i=this.spectrumAlphaRect;if(!i)return;let r=this.moveSlider(this.spectrumAlphaSlider,n);r!=null&&(this.A=r/i.width,this.update())}moveSlider(n,i){let r=n.getBoundingClientRect(),s=n.parentElement?.getBoundingClientRect();if(!n||!s)return null;let o=r.width/2,a;if(i instanceof MouseEvent)a=Math.floor(i.clientX-s.left);else{let l=i.key===It.LEFT,c=i.key===It.RIGHT;if(!l&&!c)return null;i.preventDefault();let d=l?-5:5;a=parseFloat(n.style.left)+o+d}return a=Math.max(a,0),a=Math.min(a,s.width),n.style.left=a-o+"px",a}update(n){let i=this.H*360,r=Zl.Color.fromHSB(i,this.S,this.B,this.A),s=r.toRgbaString(),a=Zl.Color.fromHSB(i,this.S,this.B).toRgbaString(),c=Zl.Color.fromHSB(i,1,1).toRgbaString(),d=this.picker;Zl.Color.fromString(d.getValue()).toRgbaString()!==s&&(this.colorChanged=!0),d.setValue(s),this.spectrumColor.style.backgroundColor=c,this.spectrumDragger.style.backgroundColor=a,this.spectrumHueSlider.style.backgroundColor=c,this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color-from",Zl.Color.fromHSB(i,this.S,this.B,0).toRgbaString()),this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color-to",a),this.spectrumAlpha.style.setProperty("--ag-internal-spectrum-alpha-color",s),n||this.colorInput.setColor(r)}setSpectrumValue(n,i,r){let s=this.spectrumValRect||this.refreshSpectrumRect();if(s==null)return;let o=this.spectrumDragger,a=o.getBoundingClientRect();n=Math.max(0,n),n=Math.min(1,n),i=Math.max(0,i),i=Math.min(1,i),this.S=n,this.B=i,o.style.left=n*s.width-a.width/2+"px",o.style.top=(1-i)*s.height-a.height/2+"px",this.update(r)}getSpectrumValue(){let n=this.spectrumDragger,i=n.getBoundingClientRect(),r=parseFloat(n.style.left)+i.width/2,s=parseFloat(n.style.top)+i.height/2;return{x:r,y:s}}initRecentColors(){let n=zE.recentColors,i=n.map((r,s)=>`<div class="ag-recent-color" id=${s} style="background-color: ${r}; width: 15px; height: 15px;" recent-color="${r}" tabIndex="${this.tabIndex}"></div>`);this.recentColors.innerHTML=i.join(""),Vn(this.recentColors,!!n.length)}setValue(n){let i=Zl.Color.fromString(n);this.setColor(i,!0)}setColor(n,i){let[r,s,o]=n.toHSB();this.H=(isNaN(r)?0:r)/360,this.A=n.a;let a=this.spectrumHueRect||this.refreshHueRect(),l=this.spectrumAlphaRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=`${(this.H-1)*-a.width-this.spectrumHueSlider.getBoundingClientRect().width/2}px`,this.spectrumAlphaSlider.style.left=`${this.A*l.width-this.spectrumAlphaSlider.getBoundingClientRect().width/2}px`,this.setSpectrumValue(s,o,!i)}onRecentColorClick(n){let i=n.target;if(!Di(i.id))return;let r=parseInt(i.id,10);this.setValue(zE.recentColors[r]),this.destroy()}addRecentColor(){let i=Zl.Color.fromHSB(this.H*360,this.S,this.B,this.A).toRgbaString(),r=zE.recentColors;!this.colorChanged||r[0]===i||(r=r.filter(s=>s!=i),r=[i].concat(r),r.length>zE.maxRecentColors&&(r=r.slice(0,zE.maxRecentColors)),zE.recentColors=r)}destroy(){this.addRecentColor(),super.destroy()}};return t.maxRecentColors=8,t.recentColors=[],t})(),R_i=P_i,Cot=class extends QB{constructor(t){super(ve({pickerAriaLabelKey:"ariaLabelColorPicker",pickerAriaLabelValue:"Color Picker",pickerType:"ag-list",className:"ag-color-picker",pickerIcon:"smallDown"},t))}postConstruct(){let t=this.gos.getDocument();this.eDisplayFieldColor=t.createElement("span"),this.eDisplayFieldColor.classList.add("ag-color-picker-color"),this.eDisplayFieldText=t.createElement("span"),this.eDisplayFieldText.classList.add("ag-color-picker-value"),this.eDisplayField.appendChild(this.eDisplayFieldColor),this.eDisplayField.appendChild(this.eDisplayFieldText),super.postConstruct(),this.value&&this.setValue(this.value)}createPickerComponent(){let t=this.eWrapper.getBoundingClientRect(),e=this.popupService.getParentRect();return this.createBean(new ZR({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:t.right-e.left-190,y:t.top-e.top-250-(this.config.pickerGap??0),postProcessPopupParams:{type:"colorPicker",eventSource:this.eWrapper}}))}renderAndPositionPicker(){let t=this.pickerComponent,e=this.createBean(new R_i({picker:this}));return t.addCssClass("ag-color-dialog"),e.addDestroyFunc(()=>{t.isAlive()&&this.destroyBean(t)}),t.setParentComponent(this),t.setBodyComponent(e),e.setValue(this.getValue()),e.getGui().focus(),t.addDestroyFunc(()=>{this.isDestroyingPicker?this.isDestroyingPicker=!1:(this.beforeHidePicker(),this.isDestroyingPicker=!0,e.isAlive()&&this.destroyBean(e),this.isAlive()&&this.getFocusableElement().focus())}),()=>this.pickerComponent?.close()}setValue(t){return this.value===t?this:(this.eDisplayFieldColor.style.backgroundColor=t,this.eDisplayFieldText.textContent=Zl.Color.fromString(t).toHexString().toUpperCase(),super.setValue(t))}getValue(){return this.value}},hC={selector:"AG-COLOR-PICKER",component:Cot},F_i=class extends ai{constructor(t){super(),this.chartMenuParamsFactory=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t=this.chartMenuParamsFactory.addEnableParams("crosshair.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("crosshair"),suppressEnabledCheckbox:!0,useToggle:!0}),e=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.label.enabled","crosshairLabel"),n=this.chartMenuParamsFactory.getDefaultCheckboxParams("crosshair.snap","crosshairSnap"),i=this.chartMenuParamsFactory.getDefaultColorPickerParams("crosshair.stroke","color");this.setTemplate(`<div>
            <ag-group-component data-ref="crosshairGroup">
                <ag-checkbox data-ref="crosshairLabelCheckbox"></ag-checkbox>
                <ag-checkbox data-ref="crosshairSnapCheckbox"></ag-checkbox>
                <ag-color-picker data-ref="crosshairStrokeColorPicker"></ag-color-picker>
            </ag-group-component>
        </div>`,[ah,d1,hC],{crosshairGroup:t,crosshairLabelCheckbox:e,crosshairSnapCheckbox:n,crosshairStrokeColorPicker:i})}},L_i=class extends lx{constructor(t){super(t,"ag-range-field","range")}postConstruct(){super.postConstruct();let{min:t,max:e,step:n}=this.config;t!=null&&this.setMinValue(t),e!=null&&this.setMaxValue(e),this.setStep(n||1)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:t=>{let e=t.target.value;this.setValue(e)}})}setMinValue(t){return this.min=t,this.eInput.setAttribute("min",t.toString()),this}setMaxValue(t){return this.max=t,this.eInput.setAttribute("max",t.toString()),this}setStep(t){return this.eInput.setAttribute("step",t.toString()),this}setValue(t,e){this.min!=null&&(t=Math.max(parseFloat(t),this.min).toString()),this.max!=null&&(t=Math.min(parseFloat(t),this.max).toString());let n=super.setValue(t,e);return this.eInput.value=t,n}},O_i={selector:"AG-INPUT-RANGE",component:L_i},Y4=class extends ZB{constructor(t){super(t,`<div class="ag-slider">
            <label data-ref="eLabel"></label>
            <div class="ag-wrapper ag-slider-wrapper">
                <ag-input-range data-ref="eSlider"></ag-input-range>
                <ag-input-number-field data-ref="eText"></ag-input-number-field>
            </div>
        </div>`,[O_i,bD]),this.eLabel=Bt,this.eSlider=Bt,this.eText=Bt,this.labelAlignment="top"}postConstruct(){super.postConstruct(),this.eSlider.addCssClass("ag-slider-field");let{minValue:t,maxValue:e,textFieldWidth:n,step:i,value:r,onValueChange:s}=this.config;t!=null&&this.setMinValue(t),e!=null&&this.setMaxValue(e),n!=null&&this.setTextFieldWidth(n),i!=null&&this.setStep(i),r!=null&&this.setValue(r),s!=null&&this.onValueChange(s)}onValueChange(t){return this.addManagedListeners(this.eText,{fieldValueChanged:()=>{let e=parseFloat(this.eText.getValue());this.eSlider.setValue(e.toString(),!0),t(e||0)}}),this.addManagedListeners(this.eSlider,{fieldValueChanged:()=>{let e=this.eSlider.getValue();this.eText.setValue(e,!0),t(parseFloat(e))}}),this}setSliderWidth(t){return this.eSlider.setWidth(t),this}setTextFieldWidth(t){return this.eText.setWidth(t),this}setMinValue(t){return this.eSlider.setMinValue(t),this.eText.setMin(t),this}setMaxValue(t){return this.eSlider.setMaxValue(t),this.eText.setMax(t),this}getValue(){return this.eText.getValue()}setValue(t,e){return this.getValue()===t?this:(this.eText.setValue(t,!0),this.eSlider.setValue(t,!0),e||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}setStep(t){return this.eSlider.setStep(t),this.eText.setStep(t),this}},N3={selector:"AG-SLIDER",component:Y4},N_i=class extends ai{constructor(t){super(),this.chartMenuParamsFactory=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t=this.chartMenuParamsFactory.addEnableParams("navigator.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("navigator"),suppressEnabledCheckbox:!0,useToggle:!0}),e=this.chartMenuParamsFactory.getDefaultSliderParams("navigator.height","height",60);e.minValue=10;let n=this.chartMenuParamsFactory.getDefaultCheckboxParams("navigator.miniChart.enabled","miniChart");this.setTemplate(`<div>
            <ag-group-component data-ref="navigatorGroup">
                <ag-slider data-ref="navigatorHeightSlider"></ag-slider>
                <ag-checkbox data-ref="navigatorMiniChartCheckbox"></ag-checkbox>
            </ag-group-component>
        </div>`,[ah,N3,d1],{navigatorGroup:t,navigatorHeightSlider:e,navigatorMiniChartCheckbox:n})}},V_i=class extends ai{constructor(t){super(),this.chartMenuParamsFactory=t,this.zoomScrollingStepInput=Bt}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t=this.chartMenuParamsFactory.addEnableParams("zoom.enabled",{cssIdentifier:"charts-advanced-settings-top-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("zoom"),suppressEnabledCheckbox:!0,useToggle:!0}),e=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableScrolling","scrollingZoom"),n=this.chartMenuParamsFactory.getDefaultSliderParams("zoom.scrollingStep","scrollingStep",1);n.step=.01,n.minValue=n.step;let i=this.chartMenuParamsFactory.getDefaultCheckboxParams("zoom.enableSelecting","selectingZoom");e.onValueChange=(r=>s=>{r&&(r(s),this.zoomScrollingStepInput.setDisabled(!s))})(e.onValueChange),this.setTemplate(`<div>
            <ag-group-component data-ref="zoomGroup">
                <ag-checkbox data-ref="zoomSelectingCheckbox"></ag-checkbox>
                <ag-checkbox data-ref="zoomScrollingCheckbox"></ag-checkbox>
                <ag-slider data-ref="zoomScrollingStepInput"></ag-slider>
            </ag-group-component>
        </div>`,[ah,d1,N3],{zoomGroup:t,zoomScrollingCheckbox:e,zoomScrollingStepInput:n,zoomSelectingCheckbox:i}),this.zoomScrollingStepInput.setDisabled(!e.value)}},B_i=["navigator","zoom","animation","crosshair"],z_i=class extends ai{constructor(t){super('<div class="ag-chart-advanced-settings-wrapper"></div>'),this.chartMenuContext=t}postConstruct(){this.chartPanelFeature=this.createManagedBean(new _ot(this.chartMenuContext.chartController,this.getGui(),"ag-chart-advanced-settings-section",(t,e)=>this.createPanels(t,e))),this.chartPanelFeature.refreshPanels()}createPanels(t,e){B_i.forEach(n=>{if(!this.isGroupPanelShownForSeries(n,e))return;let i=this.createPanel(n);this.chartPanelFeature.addComponent(i)})}isGroupPanelShownForSeries(t,e){return t==="animation"||Nw(e)}createPanel(t){let{chartMenuParamsFactory:e,chartAxisMenuParamsFactory:n}=this.chartMenuContext;switch(t){case"navigator":return new N_i(e);case"zoom":return new V_i(e);case"animation":return new k_i(e);case"crosshair":return new F_i(n)}}},H_i=class extends Ot{constructor(){super(...arguments),this.beanName="advancedSettingsMenuFactory"}wireBeans(t){this.focusService=t.focusService,this.chartTranslationService=t.chartTranslationService}showMenu(t,e){this.hideMenu();let n=this.createBean(new G_i(t));this.activeDialog=this.createBean(new ZR({title:this.chartTranslationService.translate("advancedSettings"),component:n,width:300,height:400,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{this.focusService.findFocusableElements(n.getGui())[0]?.focus()},closedCallback:()=>{this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=void 0,e?.focus({preventScroll:!0})}})),this.activeMenu=n}hideMenu(){this.activeDialog&&this.destroyBean(this.activeDialog)}destroy(){this.activeMenu=this.destroyBean(this.activeMenu),this.activeDialog=this.destroyBean(this.activeDialog),super.destroy()}},G_i=class extends j1{constructor(t){super('<div class="ag-chart-advanced-settings"></div>'),this.chartMenuContext=t}wireBeans(t){this.focusService=t.focusService}postConstruct(){this.advancedSettingsPanel=this.createManagedBean(new z_i(this.chartMenuContext)),this.getGui().appendChild(this.advancedSettingsPanel.getGui()),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),focusTrapActive:!0})}onTabKeyDown(t){if(t.defaultPrevented)return;t.preventDefault();let e=t.shiftKey,n=this.advancedSettingsPanel.getGui(),i=this.focusService.findNextFocusableElement(n,!1,e);if(i)i.focus();else{let r=this.focusService.findFocusableElements(n);r.length&&r[e?r.length-1:0].focus()}}},W_i=class extends Ot{constructor(){super(...arguments),this.beanName="chartMenuListFactory"}wireBeans(t){this.popupService=t.popupService,this.chartMenuService=t.chartMenuService,this.chartTranslationService=t.chartTranslationService}showMenuList(t){let{eventSource:e,showMenu:n,chartMenuContext:i}=t,r=this.chartMenuService.doChartToolPanelsExist(i.chartController),s=this.mapWithStockItems(this.getMenuItems(i.chartController,r),i,n,e,r);if(!s.length)return;let o=this.createBean(new U_i(s));this.activeChartMenuList=o;let a=-1,l="left";this.gos.get("enableRtl")&&(a=1,l="right");let c=o.getGui();this.popupService.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:()=>{this.destroyBean(o),this.activeChartMenuList=void 0,this.gos.isNothingFocused()&&e.focus({preventScroll:!0})},afterGuiAttached:d=>o.afterGuiAttached(d),positionCallback:()=>{this.popupService.positionPopupByComponent({type:"chartMenu",eventSource:e,ePopup:c,alignSide:l,nudgeX:4*a,nudgeY:4,position:"under",keepWithinBounds:!0})},ariaLabel:"Chart Menu"})}getMenuItems(t,e){let n=[...e?["chartEdit"]:[],...t.isEnterprise()?["chartAdvancedSettings"]:[],t.isChartLinked()?"chartUnlink":"chartLink","chartDownload"],i=this.gos.get("chartMenuItems");return i?Array.isArray(i)?i:i(this.gos.addGridCommonParams({defaultItems:n})):n}mapWithStockItems(t,e,n,i,r){if(!t)return[];let s=[];return t.forEach(o=>{let a;if(typeof o=="string"?a=this.getStockMenuItem(o,e,n,i,r):a=ve({},o),!a)return;let{subMenu:l}=a;Array.isArray(l)&&(a.subMenu=this.mapWithStockItems(l,e,n,i,r)),s.push(a)}),s}getStockMenuItem(t,e,n,i,r){switch(t){case"chartEdit":return r?this.createMenuItem(this.chartTranslationService.translate("chartEdit"),"chartsMenuEdit",n):null;case"chartAdvancedSettings":return this.createMenuItem(this.chartTranslationService.translate("chartAdvancedSettings"),"chartsMenuAdvancedSettings",()=>this.chartMenuService.openAdvancedSettings(e,i));case"chartUnlink":return e.chartController.isChartLinked()?this.createMenuItem(this.chartTranslationService.translate("chartUnlink"),"unlinked",()=>this.chartMenuService.toggleLinked(e)):null;case"chartLink":return e.chartController.isChartLinked()?null:this.createMenuItem(this.chartTranslationService.translate("chartLink"),"linked",()=>this.chartMenuService.toggleLinked(e));case"chartDownload":return this.createMenuItem(this.chartTranslationService.translate("chartDownload"),"save",()=>this.chartMenuService.downloadChart(e))}return null}createMenuItem(t,e,n){return{name:t,icon:tr(e,this.gos,null),action:n}}destroy(){this.destroyBean(this.activeChartMenuList),super.destroy()}},U_i=class extends ai{constructor(t){super(`
            <div data-ref="eChartsMenu" role="presentation" class="ag-menu ag-chart-menu-popup"></div>
        `),this.menuItems=t,this.eChartsMenu=Bt}wireBeans(t){this.focusService=t.focusService}postConstruct(){this.mainMenuList=this.createManagedBean(new XR(0)),this.mainMenuList.addMenuItems(this.menuItems),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eChartsMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(){this.hidePopupFunc?.()}afterGuiAttached({hidePopup:t}){t&&(this.hidePopupFunc=t,this.addDestroyFunc(t)),this.focusService.focusInto(this.mainMenuList.getGui())}},j_i=class Vxe extends Ot{constructor(){super(...arguments),this.beanName="chartCrossFilterService"}wireBeans(e){this.columnModel=e.columnModel,this.valueService=e.valueService,this.filterManager=e.filterManager,e.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=e.rowModel)}filter(e,n=!1){let i=this.filterManager?.getFilterModel()??{};if(n){this.resetFilters(i);return}let r=Vxe.extractFilterColId(e);this.isValidColumnFilter(r)?this.updateFilters(i,e,r):wt("cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '"+r+"'")}resetFilters(e){Object.keys(e).length>0&&(this.filterManager?.setFilterModel(null),this.filterManager?.onFilterChanged({source:"api"}))}updateFilters(e,n,i){let r=Vxe.extractFilterColId(n),s=n.datum[r];if(s===void 0)return;let o=s.toString();if(n.event.metaKey||n.event.ctrlKey){let a=this.getCurrentGridValuesForCategory(i),l=Sl(a,o),c;l?c=a.filter(d=>d!==o):(c=a,c.push(o)),e[i]=this.getUpdatedFilterModel(i,c)}else{let a=[o];e={[i]:this.getUpdatedFilterModel(i,a)}}this.filterManager?.setFilterModel(e)}getUpdatedFilterModel(e,n){return this.getColumnFilterType(e)==="agMultiColumnFilter"?{filterType:"multi",filterModels:[null,{filterType:"set",values:n}]}:{filterType:"set",values:n}}getCurrentGridValuesForCategory(e){let n=[],i=this.getColumnById(e);return this.clientSideRowModel?.forEachNodeAfterFilter(r=>{if(i&&!r.group){let s=this.valueService.getValue(i,r)+"";n.includes(s)||n.push(s)}}),n}static extractFilterColId(e){return e.xKey||e.calloutLabelKey}isValidColumnFilter(e){e.indexOf("-filtered-out")&&(e=e.replace("-filtered-out",""));let n=this.getColumnFilterType(e);return typeof n=="boolean"?n:Sl(["agSetColumnFilter","agMultiColumnFilter"],n)}getColumnFilterType(e){let n=this.getColumnById(e);if(n)return n.getColDef().filter}getColumnById(e){return this.columnModel.getCol(e)}},$_i=["chartUnlink","chartLink","chartDownload","chartMenu"],nie={settings:"chartSettings",data:"chartData",format:"chartFormat"},K_i=class extends Ot{constructor(){super(...arguments),this.beanName="chartMenuService"}wireBeans(t){this.advancedSettingsMenuFactory=t.advancedSettingsMenuFactory}downloadChart(t,e,n,i){t.chartController.getChartProxy().downloadChart(e,n,i)}toggleLinked(t){t.chartController.detachChartRange()}openAdvancedSettings(t,e){this.advancedSettingsMenuFactory.showMenu(t,e)}hideAdvancedSettings(){this.advancedSettingsMenuFactory.hideMenu()}getChartToolbarOptions(){let t=["chartMenu"],e=this.gos.getCallback("getChartToolbarItems");return e?e({defaultItems:t}).filter(i=>$_i.includes(i)?!0:(wt(`'${i}' is not a valid Chart Toolbar Option`),!1)):t}getChartToolPanels(t){let e=this.gos.get("chartToolPanelsDef"),i=e?.panels?.map(o=>{let a=nie[o];return a||wt(`Invalid panel in chartToolPanelsDef.panels: '${o}'`),a}).filter(o=>!!o)??Object.values(nie);t.isPivotChart()&&(i=i.filter(o=>o!=="chartData"));let r=e?.defaultToolPanel,s=r&&nie[r]||i[0];return{panels:i,defaultPanel:s}}doesChartToolbarExist(){return this.getChartToolbarOptions().length>0}doChartToolPanelsExist(t){let{panels:e}=this.getChartToolPanels(t);return e.length>0}},Y_i=(()=>{let t=class xot extends Ot{constructor(){super(...arguments),this.beanName="chartTranslationService"}translate(n){let i=this.localeService.getLocaleTextFunc(),r=xot.DEFAULT_TRANSLATIONS[n];return i(n,r)}};return t.DEFAULT_TRANSLATIONS={pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Chart",data:"Set Up",format:"Customize",categories:"Categories",defaultCategory:"(None)",series:"Series",switchCategorySeries:"Switch Category / Series",categoryValues:"Category Values",seriesLabels:"Series Labels",aggregate:"Aggregate",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",xAxis:"Horizontal Axis",yAxis:"Vertical Axis",polarAxis:"Polar Axis",radiusAxis:"Radius Axis",navigator:"Navigator",zoom:"Zoom",animation:"Animation",crosshair:"Crosshair",color:"Color",thickness:"Thickness",preferredLength:"Preferred Length",xType:"X Type",axisType:"Axis Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",timeFormat:"Time Format",autoRotate:"Auto Rotate",labelRotation:"Rotation",circle:"Circle",polygon:"Polygon",square:"Square",cross:"Cross",diamond:"Diamond",plus:"Plus",triangle:"Triangle",heart:"Heart",orientation:"Orientation",fixed:"Fixed",parallel:"Parallel",perpendicular:"Perpendicular",radiusAxisPosition:"Position",ticks:"Ticks",gridLines:"Grid Lines",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chartStyle:"Chart Style",title:"Title",chartTitles:"Titles",chartTitle:"Chart Title",chartSubtitle:"Subtitle",horizontalAxisTitle:"Horizontal Axis Title",verticalAxisTitle:"Vertical Axis Title",polarAxisTitle:"Polar Axis Title",titlePlaceholder:"Chart Title",background:"Background",font:"Font",weight:"Weight",top:"Top",right:"Right",bottom:"Bottom",left:"Left",labels:"Labels",calloutLabels:"Callout Labels",sectorLabels:"Sector Labels",positionRatio:"Position Ratio",size:"Size",shape:"Shape",minSize:"Minimum Size",maxSize:"Maximum Size",legend:"Legend",position:"Position",markerSize:"Marker Size",markerStroke:"Marker Stroke",markerPadding:"Marker Padding",itemSpacing:"Item Spacing",itemPaddingX:"Item Padding X",itemPaddingY:"Item Padding Y",layoutHorizontalSpacing:"Horizontal Spacing",layoutVerticalSpacing:"Vertical Spacing",strokeWidth:"Stroke Width",offset:"Offset",offsets:"Offsets",tooltips:"Tooltips",callout:"Callout",markers:"Markers",shadow:"Shadow",blur:"Blur",xOffset:"X Offset",yOffset:"Y Offset",lineWidth:"Line Width",lineDash:"Line Dash",lineDashOffset:"Dash Offset",scrollingZoom:"Scrolling",scrollingStep:"Scrolling Step",selectingZoom:"Selecting",durationMillis:"Duration (ms)",crosshairLabel:"Label",crosshairSnap:"Snap to Node",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeColor:"Line Color",strokeOpacity:"Line Opacity",miniChart:"Mini-Chart",histogramBinCount:"Bin count",connectorLine:"Connector Line",seriesItems:"Series Items",seriesItemType:"Item Type",seriesItemPositive:"Positive",seriesItemNegative:"Negative",seriesItemLabels:"Item Labels",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",polarGroup:"Polar",statisticalGroup:"Statistical",hierarchicalGroup:"Hierarchical",specializedGroup:"Specialized",combinationGroup:"Combination",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",donutTooltip:"Donut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",radialColumnTooltip:"Radial Column",radialBarTooltip:"Radial Bar",radarLineTooltip:"Radar Line",radarAreaTooltip:"Radar Area",nightingaleTooltip:"Nightingale",rangeBarTooltip:"Range Bar",rangeAreaTooltip:"Range Area",boxPlotTooltip:"Box Plot",treemapTooltip:"Treemap",sunburstTooltip:"Sunburst",waterfallTooltip:"Waterfall",heatmapTooltip:"Heatmap",columnLineComboTooltip:"Column & Line",areaColumnComboTooltip:"Area & Column",customComboTooltip:"Custom Combination",innerRadius:"Inner Radius",startAngle:"Start Angle",endAngle:"End Angle",reverseDirection:"Reverse Direction",groupPadding:"Group Padding",seriesPadding:"Series Padding",tile:"Tile",whisker:"Whisker",cap:"Cap",capLengthRatio:"Length Ratio",labelPlacement:"Placement",inside:"Inside",outside:"Outside",noDataToChart:"No data available to be charted.",pivotChartRequiresPivotMode:"Pivot Chart requires Pivot Mode enabled.",chartSettingsToolbarTooltip:"Menu",chartLinkToolbarTooltip:"Linked to Grid",chartUnlinkToolbarTooltip:"Unlinked from Grid",chartDownloadToolbarTooltip:"Download Chart",chartMenuToolbarTooltip:"Menu",chartEdit:"Edit Chart",chartAdvancedSettings:"Advanced Settings",chartLink:"Link to Grid",chartUnlink:"Unlink from Grid",chartDownload:"Download Chart",histogramFrequency:"Frequency",seriesChartType:"Series Chart Type",seriesType:"Series Type",secondaryAxis:"Secondary Axis",seriesAdd:"Add a series",categoryAdd:"Add a category",bar:"Bar",column:"Column",histogram:"Histogram",advancedSettings:"Advanced Settings",direction:"Direction",horizontal:"Horizontal",vertical:"Vertical",seriesGroupType:"Group Type",groupedSeriesGroupType:"Grouped",stackedSeriesGroupType:"Stacked",normalizedSeriesGroupType:"100% Stacked",legendEnabled:"Enabled",invalidColor:"Color value is invalid",groupedColumnFull:"Grouped Column",stackedColumnFull:"Stacked Column",normalizedColumnFull:"100% Stacked Column",groupedBarFull:"Grouped Bar",stackedBarFull:"Stacked Bar",normalizedBarFull:"100% Stacked Bar",stackedAreaFull:"Stacked Area",normalizedAreaFull:"100% Stacked Area",customCombo:"Custom Combination",groupedColumn:"Grouped",stackedColumn:"Stacked",pie:"Pie",donut:"Donut",line:"Line",scatter:"Scatter",bubble:"Bubble",area:"Area",stackedArea:"Stacked",radarLine:"Radar Line",radarArea:"Radar Area",nightingale:"Nightingale",radialColumn:"Radial Column",radialBar:"Radial Bar",boxPlot:"Box Plot",rangeBar:"Range Bar",rangeArea:"Range Area",treemap:"Treemap",sunburst:"Sunburst",waterfall:"Waterfall",heatmap:"Heatmap",columnLineCombo:"Column & Line",AreaColumnCombo:"Area & Column",ariaChartMenuClose:"Close Chart Edit Menu",ariaChartSelected:"Selected",group:"Group",timeFormatSlashesDDMMYYYY:"DD/MM/YYYY",timeFormatSlashesMMDDYYYY:"MM/DD/YYYY",timeFormatSlashesDDMMYY:"DD/MM/YY",timeFormatSlashesMMDDYY:"MM/DD/YY",timeFormatDotsDDMYY:"DD.M.YY",timeFormatDotsMDDYY:"M.DD.YY",timeFormatDashesYYYYMMDD:"YYYY-MM-DD",timeFormatSpacesDDMMMMYYYY:"DD MMMM YYYY",timeFormatHHMMSS:"HH:MM:SS",timeFormatHHMMSSAmPm:"HH:MM:SS AM/PM",sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},t})(),q_i=Y_i,UE="32.1.0",bot=["number","category","grouped-category","log","time"];t5i=bot.reduce((t,e)=>St(ve({},t),{[e]:{title:{_enabledFromTheme:!0}}}),{});r5i=class Sot extends Ot{wireBeans(e){this.sortController=e.sortController,this.gridRowModel=e.rowModel,this.columnModel=e.columnModel,this.valueService=e.valueService,this.pivotResultColsService=e.pivotResultColsService,this.rowNodeSorter=e.rowNodeSorter,this.aggregationStage=e.aggregationStage}getData(e){if(e.crossFiltering){if(e.grouping)return wt("crossing filtering with row grouping is not supported."),{chartData:[],columnNames:{}};if(!this.gos.isRowModelType("clientSide"))return wt("crossing filtering is only supported in the client side row model."),{chartData:[],columnNames:{}}}this.gos.isRowModelType("serverSide")&&e.pivoting&&this.updatePivotKeysForSSRM();let i=this.extractRowsFromGridRowModel(e);return i.chartData=this.aggregateRowsByDimension(e,i.chartData),i}extractRowsFromGridRowModel(e){let{crossFiltering:n,startRow:i,endRow:r,valueCols:s,dimensionCols:o,grouping:a}=e,l=[],c={},d={},u={},m={},f=[],_;if(n)m=this.getFilteredRowNodes(),f=this.getAllRowNodes(),_=f.length;else{let M=this.gridRowModel.getRowCount()-1;i===r&&i===0&&o.length===0&&s.length===0?_=0:_=(r>=0?Math.min(r,M):M)-i+1}_>0&&s.forEach(M=>{let I=[],z=M.getColDef().pivotKeys;z&&(I=z.slice());let G=M.getColDef().headerName;G&&I.push(G),I.length>0&&(c[M.getId()]=I)});let x=0,D=0;for(let M=0;M<_;M++){let I=n?f[M]:this.gridRowModel.getRow(M+i);if(I.footer||I.detail){x++;continue}let z={};o.forEach(G=>{let A=G.colId,Y=this.columnModel.getCol(A);if(Y){let X=this.valueService.getValue(Y,I);if(a){let ne=X&&X.toString?String(X.toString()):"",pe=Sot.getGroupLabels(I,ne);z[A]={labels:pe,id:D++,toString:function(){return this.labels.filter(ie=>!!ie).reverse().join(" - ")}},I.group&&(d[pe.toString()]=M-x);let ce=pe.slice(1,pe.length).toString();ce&&(u[ce]=d[ce])}else z[A]=X}else z[nb.DEFAULT_CATEGORY]=M+1}),s.forEach(G=>{let A=G.getColId();if(n){let Y=A+"-filtered-out",X=this.valueService.getValue(G,I),ne=X!=null&&typeof X.toNumber=="function"?X.toNumber():X;m[I.id]?(z[A]=ne,z[Y]=e.aggFunc||e.isScatter?void 0:0):(z[A]=e.aggFunc||e.isScatter?void 0:0,z[Y]=ne)}else{let Y=this.valueService.getValue(G,I);Y&&Object.prototype.hasOwnProperty.call(Y,"toString")&&(Y=parseFloat(Y.toString())),z[A]=Y!=null&&typeof Y.toNumber=="function"?Y.toNumber():Y}}),l.push(z)}let E;if(a){let M=_A(u),I=l;l=[],E=[];for(let z=0;z<I.length;z++)(Sl(M,z)?E:l).push(I[z])}return{chartData:l,columnNames:c,groupChartData:E}}aggregateRowsByDimension(e,n){let i=e.dimensionCols;if(!e.aggFunc||i.length===0)return n;let r=Ar(i),s=r&&r.colId,o={},a=[];if(n.forEach(l=>{let c=o;i.forEach(d=>{let u=d.colId,m=l[u];if(u===s){let f=c[m];f||(f={__children:[]},i.forEach(_=>{let x=_.colId;f[x]=l[x]}),c[m]=f,a.push(f)),f.__children.push(l)}else c[m]||(c[m]={}),c=c[m]})}),Sa.__assertRegistered(wr.RowGroupingModule,"Charting Aggregation",this.gridId)){let l=this.aggregationStage;a.forEach(c=>e.valueCols.forEach(d=>{if(e.crossFiltering)e.valueCols.forEach(u=>{let m=u.getColId(),f=c.__children.filter(M=>typeof M[m]<"u").map(M=>M[m]),_=l.aggregateValues(f,e.aggFunc);c[u.getId()]=_&&typeof _.value<"u"?_.value:_;let x=`${m}-filtered-out`,D=c.__children.filter(M=>typeof M[x]<"u").map(M=>M[x]),E=l.aggregateValues(D,e.aggFunc);c[x]=E&&typeof E.value<"u"?E.value:E});else{let u=c.__children.map(f=>f[d.getId()]),m=l.aggregateValues(u,e.aggFunc);c[d.getId()]=m&&typeof m.value<"u"?m.value:m}}))}return a}updatePivotKeysForSSRM(){let e=this.pivotResultColsService.getPivotResultCols()?.list;if(!e)return;let n=this.extractPivotKeySeparator(e);e.forEach(i=>{if(n==="")i.getColDef().pivotKeys=[];else{let r=i.getColId().split(n);i.getColDef().pivotKeys=r.slice(0,r.length-1)}})}extractPivotKeySeparator(e){if(e.length===0)return"";let n=(r,s)=>{let o=r.getGroupId();return r.getParent()?n(r.getParent(),o):s.split(o)[1][0]},i=e[0];return i.getParent()==null?"":n(i.getParent(),i.getColId())}static getGroupLabels(e,n){let i=[n];for(;e&&e.level!==0;)e=e.parent,e&&i.push(e.key);return i}getFilteredRowNodes(){let e={};return this.gridRowModel.forEachNodeAfterFilterAndSort(n=>{e[n.id]=n}),e}getAllRowNodes(){let e=[];return this.gridRowModel.forEachNode(n=>{e.push(n)}),this.sortRowNodes(e)}sortRowNodes(e){let n=this.sortController.getSortOptions();return!n||n.length==0?e:this.rowNodeSorter.doFullSort(e,n)}},s5i=class extends Ot{constructor(){super(...arguments),this.beanName="chartColumnService",this.valueColsWithoutSeriesType=new Set}wireBeans(t){this.columnModel=t.columnModel,this.showRowGroupColsService=t.showRowGroupColsService,this.columnNameService=t.columnNameService,this.visibleColsService=t.visibleColsService,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.rowPositionUtils=t.rowPositionUtils}postConstruct(){let t=()=>this.valueColsWithoutSeriesType.clear();this.addManagedEventListeners({newColumnsLoaded:t,rowDataUpdated:t})}getColumn(t){return this.columnModel.getColDefCol(t)}getAllDisplayedColumns(){return this.visibleColsService.getAllCols()}getColDisplayName(t,e){let n="chart",i=this.columnNameService.getDisplayNameForColumn(t,n);if(e){let r=[i],s=o=>{if(!o)return;let a=this.columnNameService.getDisplayNameForColumnGroup(o,n);Gd(a)||(r.unshift(a),s(o.getParent()))};return s(t.getParent()),r.join(" - ")}return i}getRowGroupColumns(){return this.funcColsService.getRowGroupColumns()}getGroupDisplayColumns(){return this.showRowGroupColsService?.getShowRowGroupCols()??[]}isPivotMode(){return this.columnModel.isPivotMode()}isPivotActive(){return this.columnModel.isPivotActive()}getChartColumns(){let t=this.columnModel.getCols(),e=new Set,n=new Set;return t.forEach(i=>{let r=i.getColDef(),s=r.chartDataType;if(s)switch(s){case"category":case"time":e.add(i);return;case"series":n.add(i);return;case"excluded":return;default:wt(`unexpected chartDataType value '${s}' supplied, instead use 'category', 'series' or 'excluded'`);break}if(r.colId==="ag-Grid-AutoColumn"){e.add(i);return}if(!i.isPrimary()){n.add(i);return}(this.isInferredValueCol(i)?n:e).add(i)}),{dimensionCols:e,valueCols:n}}isInferredValueCol(t){let e=t.getColId();if(e==="ag-Grid-AutoColumn")return!1;let n=this.rowPositionUtils.getRowNode({rowIndex:0,rowPinned:null});if(!n)return this.valueColsWithoutSeriesType.has(e);let i=this.valueService.getValue(t,n);i==null&&(i=this.extractLeafData(n,t)),i!=null&&typeof i.toNumber=="function"&&(i=i.toNumber());let r=typeof i=="number";return r&&this.valueColsWithoutSeriesType.add(e),r}extractLeafData(t,e){if(!t.allLeafChildren)return null;for(let n=0;n<t.allLeafChildren.length;n++){let i=t.allLeafChildren[n],r=this.valueService.getValue(e,i);if(r!=null)return r}return null}destroy(){this.valueColsWithoutSeriesType.clear(),super.destroy()}},o5i=(()=>{let t=class Tot extends Ot{constructor(n){super(),this.suppressComboChartWarnings=!1,this.chartDataModel=n,this.seriesChartTypes=n.params.seriesChartTypes??[]}postConstruct(){this.initComboCharts()}update(n){this.seriesChartTypes=n??this.seriesChartTypes,this.initComboCharts(),this.updateSeriesChartTypes()}initComboCharts(){let n=this.seriesChartTypes&&this.seriesChartTypes.length>0;(this.chartDataModel.chartType==="customCombo"||n)&&(this.chartDataModel.chartType="customCombo",this.savedCustomSeriesChartTypes=this.seriesChartTypes||[])}updateSeriesChartTypes(){if(this.chartDataModel.isComboChart()){if(this.seriesChartTypes=this.seriesChartTypes.map(n=>{let i=["groupedColumn","stackedColumn","stackedArea"].includes(n.chartType);return n.secondaryAxis=i?!1:n.secondaryAxis,n}),this.chartDataModel.chartType==="customCombo"){this.updateSeriesChartTypesForCustomCombo();return}this.updateChartSeriesTypesForBuiltInCombos()}}updateSeriesChartTypesForCustomCombo(){!(this.seriesChartTypes&&this.seriesChartTypes.length>0)&&!this.suppressComboChartWarnings&&wt("'seriesChartTypes' are required when the 'customCombo' chart type is specified."),this.seriesChartTypes=this.seriesChartTypes.map(s=>(Tot.SUPPORTED_COMBO_CHART_TYPES.includes(s.chartType)||(wt(`invalid chartType '${s.chartType}' supplied in 'seriesChartTypes', converting to 'line' instead.`),s.chartType="line"),s));let i=s=>{(!this.savedCustomSeriesChartTypes||this.savedCustomSeriesChartTypes.length===0)&&(this.savedCustomSeriesChartTypes=this.seriesChartTypes);let o=this.savedCustomSeriesChartTypes.find(a=>a.colId===s.colId);return o||(s.selected&&!this.suppressComboChartWarnings&&wt(`no 'seriesChartType' found for colId = '${s.colId}', defaulting to 'line'.`),{colId:s.colId,chartType:"line",secondaryAxis:!1})},r=this.chartDataModel.valueColState.map(i);this.seriesChartTypes=r,this.savedCustomSeriesChartTypes=r,this.suppressComboChartWarnings=!0}updateChartSeriesTypesForBuiltInCombos(){let{chartType:n,valueColState:i}=this.chartDataModel,r=n==="columnLineCombo"?"groupedColumn":"stackedArea",s=n==="columnLineCombo"?"line":"groupedColumn",o=i.filter(l=>l.selected),a=Math.ceil(o.length/2);this.seriesChartTypes=o.map((l,c)=>{let d=c>=a?s:r;return{colId:l.colId,chartType:d,secondaryAxis:!1}})}};return t.SUPPORTED_COMBO_CHART_TYPES=["line","groupedColumn","stackedColumn","area","stackedArea"],t})(),a5i=o5i,l5i=(()=>{let t=class Bxe extends Ot{constructor(n){super(),this.unlinked=!1,this.chartData=[],this.valueColState=[],this.dimensionColState=[],this.columnNames={},this.crossFiltering=!1,this.grouping=!1,this.params=n,this.chartId=n.chartId,this.setParams(n)}wireBeans(n){this.rangeService=n.rangeService,this.chartTranslationService=n.chartTranslationService}setParams(n){let{chartType:i,pivotChart:r,chartThemeName:s,switchCategorySeries:o,aggFunc:a,cellRange:l,suppressChartRanges:c,unlinkChart:d,crossFiltering:u,seriesGroupType:m}=n;this.chartType=i,this.pivotChart=r??!1,this.chartThemeName=s,this.switchCategorySeries=!!o,this.aggFunc=a,this.referenceCellRange=l,this.suppliedCellRange=l,this.suppressChartRanges=c??!1,this.unlinked=!!d,this.crossFiltering=!!u,this.seriesGroupType=m}postConstruct(){this.datasource=this.createManagedBean(new r5i),this.chartColumnService=this.createManagedBean(new s5i),this.comboChartModel=this.createManagedBean(new a5i(this)),this.updateCellRanges({setColsFromRange:!0}),this.updateData()}updateModel(n){let{cellRange:i,seriesChartTypes:r}=n;i!==this.suppliedCellRange&&(this.dimensionCellRange=void 0,this.valueCellRange=void 0),this.setParams(n),this.updateSelectedDimensions(i?.columns),this.updateCellRanges({setColsFromRange:!0}),(this.isComboChart()||r)&&this.comboChartModel.update(r),this.unlinked||this.updateData()}updateCellRanges(n){let{updatedColState:i,resetOrder:r,maintainColState:s,setColsFromRange:o}=n??{};this.valueCellRange&&(this.referenceCellRange=this.valueCellRange);let{dimensionCols:a,valueCols:l}=this.chartColumnService.getChartColumns(),c=this.getAllColumnsFromRanges();i&&this.updateColumnState(i,r),this.setDimensionCellRange(a,c,i),this.setValueCellRange(l,c,o),!i&&!s&&(this.resetColumnState(),this.syncDimensionCellRange()),this.comboChartModel.updateSeriesChartTypes()}updateData(){let{startRow:n,endRow:i}=this.getRowIndexes();this.pivotChart&&this.resetColumnState(),this.grouping=this.isGrouping();let r={aggFunc:this.aggFunc,dimensionCols:this.getSelectedDimensions(),grouping:this.grouping,pivoting:this.isPivotActive(),crossFiltering:this.crossFiltering,valueCols:this.getSelectedValueCols(),startRow:n,endRow:i,isScatter:Sl(["scatter","bubble"],this.chartType)},{chartData:s,columnNames:o,groupChartData:a}=this.datasource.getData(r);this.chartData=s,this.groupChartData=a,this.columnNames=o,this.categoryAxisType=void 0}isGrouping(){let n=this.gos.get("treeData"),i=n?null:this.chartColumnService.getRowGroupColumns(),r=n||i&&i.length>0,s=this.getSelectedDimensions().map(({colId:l})=>l),a=this.chartColumnService.getGroupDisplayColumns().map(l=>l.getColId()).some(l=>s.includes(l));return!!r&&a}getSelectedValueCols(){return this.valueColState.filter(n=>n.selected).map(n=>n.column)}getSelectedDimensions(){return this.dimensionColState.filter(n=>n.selected)}getColDisplayName(n,i){return this.chartColumnService.getColDisplayName(n,i)}isPivotMode(){return this.chartColumnService.isPivotMode()}getChartDataType(n){let i=this.chartColumnService.getColumn(n);return i?i.getColDef().chartDataType:void 0}isPivotActive(){return this.chartColumnService.isPivotActive()}createCellRange(n,...i){return{id:this.chartId,startRow:this.referenceCellRange.startRow,endRow:this.referenceCellRange.endRow,columns:i,startColumn:n===S5.DIMENSION||this.referenceCellRange.startColumn==null?i[0]:this.referenceCellRange.startColumn,type:n}}getAllColumnsFromRanges(){if(this.pivotChart)return new Set(this.chartColumnService.getAllDisplayedColumns());let n=this.dimensionCellRange||this.valueCellRange?[]:this.referenceCellRange.columns;return this.dimensionCellRange&&n.push(...this.dimensionCellRange.columns),this.valueCellRange&&n.push(...this.valueCellRange.columns),new Set(n)}getRowIndexes(){let n=0,i=0,{rangeService:r,valueCellRange:s,dimensionCellRange:o}=this,a=s||o;if(r&&a){n=r.getRangeStartRow(a).rowIndex;let l=r.getRangeEndRow(a);i=l.rowPinned==="bottom"?-1:l.rowIndex}return{startRow:n,endRow:i}}resetColumnState(){let{dimensionCols:n,valueCols:i}=this.chartColumnService.getChartColumns(),r=this.getAllColumnsFromRanges(),s=this.valueColState.length<1;this.dimensionColState=[],this.valueColState=[];let o=WE(oh(this.chartType)),a=!1,l=1,c=this.suppliedCellRange.columns[0];n.forEach(m=>{let f=m.getColId()==="ag-Grid-AutoColumn",_=!1;this.crossFiltering&&this.aggFunc?c.getColId()===m.getColId()&&(_=!0):_=f?!0:(!a||o)&&r.has(m),this.dimensionColState.push({column:m,colId:m.getColId(),displayName:this.getColDisplayName(m),selected:_,order:l++}),_&&(a=!0)});let d={colId:Bxe.DEFAULT_CATEGORY,displayName:this.chartTranslationService.translate("defaultCategory"),selected:!a,order:0};this.dimensionColState.unshift(d);let u=this.referenceCellRange.columns.filter(m=>i.has(m));i.forEach(m=>{s&&Sl(this.referenceCellRange.columns,m)&&(m=u.shift()),this.valueColState.push({column:m,colId:m.getColId(),displayName:this.getColDisplayName(m),selected:r.has(m),order:l++})})}updateColumnState(n,i){let r=u=>u.colId===n.colId,{dimensionColState:s,valueColState:o}=this,a=s.find(r),l=o.find(r);if(a)if(WE(oh(this.chartType)))a.selected=n.selected;else{let m=n.selected?a:s.filter(f=>f!==a).find(({selected:f})=>f);s.forEach(f=>f.selected=f===m)}else l&&(l.selected=n.selected);let c=[...s,...o],d=[];i||(c.forEach((u,m)=>{m===n.order&&d.push(n.colId),u.colId!==n.colId&&d.push(u.colId)}),c.forEach(u=>{let m=d.indexOf(u.colId);u.order=m>=0?d.indexOf(u.colId):c.length-1})),this.reorderColState()}reorderColState(){let n=(i,r)=>i.order-r.order;this.dimensionColState.sort(n),this.valueColState.sort(n)}setDimensionCellRange(n,i,r){this.dimensionCellRange=void 0;let s=WE(oh(this.chartType));if(!r&&!this.dimensionColState.length){let c=new Array;n.forEach(d=>{c.length>0&&!s||!i.has(d)||c.push(d)}),c.length>0&&(this.dimensionCellRange=this.createCellRange(S5.DIMENSION,...c));return}let o=r?[r]:[];if(this.crossFiltering&&this.aggFunc){let c=this.suppliedCellRange.columns[0];o=this.dimensionColState.filter(d=>d.colId===c.getColId())}else(s||o.length===0||o.some(({column:c})=>!c||!n.has(c)))&&(o=this.dimensionColState.filter(c=>c.selected));let a=o.length===1?o[0].colId===Bxe.DEFAULT_CATEGORY:!1,l=o.map(({column:c})=>c).filter(c=>c!=null);l.length>0&&!a&&(this.dimensionCellRange=this.createCellRange(S5.DIMENSION,...l))}setValueCellRange(n,i,r){this.valueCellRange=void 0;let s=[],o=cie(this.chartType),a=0;if(n.forEach(l=>{r?(o==null||a<o)&&i.has(l)&&(s.push(l),a++):this.valueColState.some(c=>c.selected&&c.colId===l.getColId())&&s.push(l)}),s.length>0){let l=[];this.valueColState.length>0?l=this.valueColState.map(c=>c.colId):i.forEach(c=>l.push(c.getColId())),s.sort((c,d)=>l.indexOf(c.getColId())-l.indexOf(d.getColId())),this.valueCellRange=this.createCellRange(S5.VALUE,...s)}}resetCellRanges(n,i){if(!n&&!i)return;let{dimensionCols:r,valueCols:s}=this.chartColumnService.getChartColumns(),o=this.getAllColumnsFromRanges();n&&this.setDimensionCellRange(r,o),i&&this.setValueCellRange(s,o)}updateSelectedDimensions(n){let i=new Set(n.map(s=>s.getColId()));if(WE(oh(this.chartType))){let s=this.dimensionColState.filter(a=>i.has(a.colId)),o=new Set(s.map(a=>a.colId));this.dimensionColState=this.dimensionColState.map(a=>St(ve({},a),{selected:o.has(a.colId)}))}else{let o=(this.dimensionColState.find(a=>i.has(a.colId))||this.dimensionColState[0]).colId;this.dimensionColState=this.dimensionColState.map(a=>St(ve({},a),{selected:a.colId===o}))}}syncDimensionCellRange(){let n=this.getSelectedDimensions();if(n.length===0)return;let i=n.map(({column:r})=>r).filter(r=>r!=null);i.length>0&&(this.dimensionCellRange=this.createCellRange(S5.DIMENSION,...i))}isComboChart(n){return cbe(n??this.chartType)}};return t.DEFAULT_CATEGORY="AG-GRID-DEFAULT-CATEGORY",t})(),nb=l5i,QR=t=>e=>e==null?!0:t(e),vst=t=>typeof t=="string",Dot=t=>typeof t=="boolean",c5i=t=>typeof t=="object",eb=(t,e)=>n=>`AG Grid - unable to update chart as invalid params supplied:  \`${t}: ${n}\`, expected ${e}.`,Eot=t=>`${t} is not supported in AG Charts Community (either 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded). See https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/ for more details.`,If=class D2{static isEnterprise(){return R3.enterpriseModule.isEnterprise}static isValidChartType(e){return!!got(e)||cbe(e)}static isLegacyChartType(e){return D2.legacyChartTypes.includes(e)}static validateUpdateParams(e){switch(e.type){case"rangeChartUpdate":return D2.validateUpdateRangeChartParams(e);case"pivotChartUpdate":return D2.validateUpdatePivotChartParams(e);case"crossFilterChartUpdate":return D2.validateUpdateCrossFilterChartParams(e);default:return wt(`Invalid value supplied for 'type': ${e.type}. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`),!1}}static validateCreateParams(e){return Jte(e,[D2.enterpriseChartTypeValidation,D2.switchCategorySeriesValidation])}static validateUpdateRangeChartParams(e){let n=[...D2.commonUpdateValidations,D2.enterpriseChartTypeValidation,...D2.cellRangeValidations,{property:"seriesChartTypes",validationFn:i=>i===void 0||Array.isArray(i)&&i.every(c5i),warnMessage:eb("seriesChartTypes","Array of SeriesChartType")}];return Jte(e,n,[...D2.baseUpdateChartParams,"cellRange","suppressChartRanges","switchCategorySeries","aggFunc","seriesChartTypes","seriesGroupType"],"UpdateRangeChartParams")}static validateUpdatePivotChartParams(e){let n=[...D2.commonUpdateValidations];return Jte(e,n,[...D2.baseUpdateChartParams],"UpdatePivotChartParams")}static validateUpdateCrossFilterChartParams(e){let n=[...D2.commonUpdateValidations,...D2.cellRangeValidations];return Jte(e,n,[...D2.baseUpdateChartParams,"cellRange","suppressChartRanges","aggFunc"],"UpdateCrossFilterChartParams")}};If.legacyChartTypes=["doughnut"];If.baseUpdateChartParams=["type","chartId","chartType","chartThemeName","chartThemeOverrides","unlinkChart"];If.validateChartType=QR(t=>{if(If.isValidChartType(t))return!0;if(If.isLegacyChartType(t)){let e=dW(t);return wt(`The chart type '${t}' has been deprecated. Please use '${e}' instead.`),e}return!1});If.validateAgChartThemeOverrides=QR(t=>typeof t=="object");If.validateChartParamsCellRange=QR(t=>typeof t=="object");If.validateAggFunc=QR(t=>typeof t=="string"||typeof t=="function");If.enterpriseChartTypeValidation={property:"chartType",validationFn:QR(t=>If.isEnterprise()||!t||!w_i(t)),warnMessage:t=>Eot(`The '${t}' chart type`)};If.switchCategorySeriesValidation={property:"switchCategorySeries",validationFn:QR(t=>{if(!t||If.isEnterprise())return!0}),warnMessage:()=>Eot("'switchCategorySeries' has been ignored as it"),warnIfFixed:!0};If.commonUpdateValidations=[{property:"chartId",validationFn:vst,warnMessage:eb("chartId","string")},{property:"chartType",validationFn:If.validateChartType,warnMessage:eb("chartType","ChartType")},{property:"chartThemeName",validationFn:vst,warnMessage:eb("chartThemeName","string")},{property:"chartThemeOverrides",validationFn:If.validateAgChartThemeOverrides,warnMessage:eb("chartThemeOverrides","AgChartThemeOverrides")},{property:"unlinkChart",validationFn:Dot,warnMessage:eb("unlinkChart","boolean")}];If.cellRangeValidations=[{property:"cellRange",validationFn:If.validateChartParamsCellRange,warnMessage:eb("cellRange","ChartParamsCellRange")},{property:"suppressChartRanges",validationFn:Dot,warnMessage:eb("suppressChartRanges","boolean")},{property:"aggFunc",validationFn:If.validateAggFunc,warnMessage:eb("aggFunc","string or IAggFunc")},If.switchCategorySeriesValidation];Mot=If;kot=["ag-default","ag-material","ag-sheets","ag-polychroma","ag-vivid"],d5i=class extends Ot{constructor(t){super(),this.model=t,this.isEnterprise=()=>R3.enterpriseModule.isEnterprise}wireBeans(t){this.rangeService=t.rangeService}postConstruct(){this.setChartRange(),this.model.unlinked&&this.rangeService&&this.rangeService.setCellRanges([]);let t=this.updateForGridChange.bind(this);this.addManagedEventListeners({rangeSelectionChanged:e=>{e.id&&e.id===this.model.chartId&&this.updateForRangeChange()},columnMoved:t,columnPinned:t,columnVisible:t,columnRowGroupChanged:t,modelUpdated:t,cellValueChanged:this.updateForDataChange.bind(this)})}update(t){if(!this.validUpdateType(t))return!1;let e=Mot.validateUpdateParams(t);if(!e)return!1;let n=e===!0?t:e;return this.applyValidatedChartParams(n),!0}applyValidatedChartParams(t){let{chartId:e,chartType:n,chartThemeName:i,unlinkChart:r}=t,s={chartId:e,pivotChart:this.model.pivotChart,chartType:n??this.model.chartType,chartThemeName:i??this.model.chartThemeName,unlinkChart:r??this.model.unlinked,cellRange:this.model.suppliedCellRange,switchCategorySeries:this.model.switchCategorySeries,aggFunc:this.model.aggFunc,seriesChartTypes:void 0,suppressChartRanges:!1,crossFiltering:!1},o=ve({},s);switch(t.type){case"rangeChartUpdate":o.cellRange=this.createCellRange(t)??this.model.suppliedCellRange,o.switchCategorySeries=t.switchCategorySeries??this.model.switchCategorySeries,o.aggFunc=t.aggFunc??this.model.aggFunc,o.seriesChartTypes=t.seriesChartTypes,o.suppressChartRanges=t.suppressChartRanges??this.model.suppressChartRanges,o.seriesGroupType=t.seriesGroupType??this.model.seriesGroupType;break;case"crossFilterChartUpdate":o.cellRange=this.createCellRange(t)??this.model.suppliedCellRange,o.switchCategorySeries=!1,o.aggFunc=t.aggFunc??this.model.aggFunc,o.crossFiltering=!0,o.suppressChartRanges=t.suppressChartRanges??this.model.suppressChartRanges;break;case"pivotChartUpdate":o.switchCategorySeries=!1;break}this.model.updateModel(o),o.unlinkChart||o.suppressChartRanges?this.rangeService?.setCellRanges([]):this.setChartRange()}updateForGridChange(t){if(this.model.unlinked)return;let{maintainColState:e,setColsFromRange:n}=t??{};this.model.updateCellRanges({maintainColState:e,setColsFromRange:n}),this.model.updateData(),this.setChartRange()}updateForDataChange(){this.model.unlinked||(this.model.updateData(),this.raiseChartModelUpdateEvent())}updateForRangeChange(){this.updateForGridChange({setColsFromRange:!0}),this.raiseChartRangeSelectionChangedEvent()}updateForPanelChange(t){this.model.updateCellRanges(t),this.model.updateData(),t.skipAnimation&&this.getChartProxy().getChartRef().skipAnimations(),this.setChartRange(),this.raiseChartRangeSelectionChangedEvent()}updateThemeOverrides(t){this.chartProxy.updateThemeOverrides(t)}getChartUpdateParams(t){let n=this.getSelectedValueColState().map(o=>({colId:o.colId,displayName:o.displayName})),i=this.getChartData(),r=this.getSelectedDimensions(),s={data:i,groupData:this.model.groupChartData,grouping:this.isGrouping(),categories:r.map(o=>({id:o.colId,name:o.displayName,chartDataType:this.model.categoryAxisType??this.model.getChartDataType(o.colId)})),fields:n,chartId:this.getChartId(),getCrossFilteringContext:()=>({lastSelectedChartId:"xxx"}),seriesChartTypes:this.getSeriesChartTypes(),updatedOverrides:t,seriesGroupType:this.model.seriesGroupType};return this.isCategorySeriesSwitched()?this.invertCategorySeriesParams(s):s}invertCategorySeriesParams(t){let[e]=t.categories,n=[{id:nb.DEFAULT_CATEGORY,name:""}],i=t.data.map((s,o)=>{let a=`${e.id}:${o}`,l=s[e.id],c=l==null?"":String(l);return{colId:a,displayName:c}}),r=t.fields.map(s=>{let o={[nb.DEFAULT_CATEGORY]:s.displayName};for(let[a,l]of t.data.entries()){let c=`${e.id}:${a}`,d=l[s.colId];o[c]=d}return o});return St(ve({},t),{categories:n,fields:i,data:r})}getChartModel(){let t=this.model.pivotChart?"pivot":"range",e=this.isComboChart()?this.model.comboChartModel.seriesChartTypes:void 0;return{modelType:t,chartId:this.model.chartId,chartType:this.model.chartType,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides(),chartPalette:this.chartProxy.getChartPalette(),cellRange:this.getCellRangeParams(),switchCategorySeries:this.model.switchCategorySeries,suppressChartRanges:this.model.suppressChartRanges,aggFunc:this.model.aggFunc,unlinkChart:this.model.unlinked,seriesChartTypes:e,seriesGroupType:this.model.seriesGroupType}}getChartId(){return this.model.chartId}getChartData(){return this.model.chartData}getChartType(){return this.model.chartType}setChartType(t){this.updateMultiSeriesAndCategory(this.model.chartType,t),this.model.chartType=t,this.model.comboChartModel.updateSeriesChartTypes(),this.model.switchCategorySeries=!1,this.model.categoryAxisType=void 0,this.model.seriesGroupType=void 0,this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()}isCategorySeriesSwitched(){return this.model.switchCategorySeries&&!this.model.isGrouping()}switchCategorySeries(t){yot(this.getChartType())&&(this.model.switchCategorySeries=t,this.raiseChartModelUpdateEvent())}getAggFunc(){return this.model.aggFunc}setAggFunc(t,e){this.model.aggFunc!==t&&(this.model.aggFunc=t,!e&&(this.model.updateData(),this.raiseChartModelUpdateEvent()))}updateMultiSeriesAndCategory(t,e){let n=(a,l)=>{let c=0;for(let d of a)d.selected&&(c>=l?d.selected=!1:c++);c===0&&(a[0].selected=!0)},i=Nxe(e),r=cie(e),s=i!=null&&(Nxe(t)??100)>(i??100),o=r!=null&&(cie(t)??100)>(r??100);s&&n(this.model.dimensionColState,i),o&&n(this.model.valueColState,r),(s||o)&&(this.model.resetCellRanges(s,o),this.setChartRange(!0))}setChartThemeName(t,e){this.model.chartThemeName=t,e||(this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent())}getChartThemeName(){return this.model.chartThemeName}isPivotChart(){return this.model.pivotChart}isPivotMode(){return this.model.isPivotMode()}isGrouping(){return this.model.isGrouping()}isCrossFilterChart(){return this.model.crossFiltering}getThemeNames(){return this.gos.get("chartThemes")||kot}getThemes(){return this.getThemeNames().map(e=>{let i=ube(e)?e:this.chartProxy.lookupCustomChartTheme(e);return Lm.getChartTheme(i)})}getPalettes(){return this.getThemes().map(e=>e.palette)}getThemeTemplateParameters(){return this.getThemes().map(e=>e.getTemplateParameters())}getValueColState(){return this.model.valueColState.map(this.displayNameMapper.bind(this))}getSelectedValueColState(){return this.getValueColState().filter(t=>t.selected)}getSelectedDimensions(){return this.model.getSelectedDimensions()}displayNameMapper(t){let{column:e}=t;if(e)t.displayName=this.model.getColDisplayName(e,this.model.isPivotMode());else{let n=this.model.columnNames[t.colId];t.displayName=n?n.join(" - "):this.model.getColDisplayName(e)}return t}getColStateForMenu(){return{dimensionCols:this.model.dimensionColState,valueCols:this.getValueColState()}}setChartRange(t=!1){this.rangeService&&!this.model.suppressChartRanges&&!this.model.unlinked&&this.rangeService.setCellRanges(this.getCellRanges()),t||this.raiseChartModelUpdateEvent()}detachChartRange(){this.model.unlinked=!this.model.unlinked,this.model.unlinked?this.rangeService&&this.rangeService.setCellRanges([]):this.updateForGridChange(),this.dispatchLocalEvent({type:"chartLinkedChanged"})}setChartProxy(t){this.chartProxy=t}getChartProxy(){return this.chartProxy}isActiveXYChart(){return["scatter","bubble"].includes(this.getChartType())}isChartLinked(){return!this.model.unlinked}customComboExists(){let t=this.model.comboChartModel.savedCustomSeriesChartTypes;return t&&t.length>0}getSeriesChartTypes(){return this.model.comboChartModel.seriesChartTypes}isComboChart(t){return this.model.isComboChart(t)}updateSeriesChartType(t,e,n){let i=this.model.comboChartModel.seriesChartTypes.find(r=>r.colId===t);if(i){let r=this.model.chartType!=="customCombo";r&&(this.model.chartType="customCombo");let s=i.chartType;e!=null&&(i.chartType=e),n!=null&&(i.secondaryAxis=n),this.model.comboChartModel.savedCustomSeriesChartTypes=this.model.comboChartModel.seriesChartTypes,this.model.comboChartModel.updateSeriesChartTypes(),this.updateForDataChange(),r&&this.dispatchLocalEvent({type:"chartTypeChanged"}),s!==e&&this.dispatchLocalEvent({type:"chartSeriesChartTypeChanged"}),this.raiseChartOptionsChangedEvent()}}getActiveSeriesChartTypes(){let t=this.getSelectedValueColState().map(e=>e.colId);return this.getSeriesChartTypes().filter(e=>t.includes(e.colId))}getChartSeriesTypes(t){let e=t??this.getChartType();return this.isComboChart(e)?["line","bar","area"]:[oh(e)]}getChartSeriesType(){let t=this.getSeriesChartTypes();if(t.length===0)return"bar";let e=t[0].chartType;return e==="columnLineCombo"?"bar":e==="areaColumnCombo"?"area":oh(e)}getCellRanges(){return[this.model.dimensionCellRange,this.model.valueCellRange].filter(t=>t)}createCellRange(t){return t.cellRange&&this.rangeService?.createPartialCellRangeFromRangeParams(t.cellRange,!0)}validUpdateType(t){if(!t.type)return wt("Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'."),!1;let e={"Range Chart":()=>!this.isPivotChart()&&!this.isCrossFilterChart(),"Pivot Chart":()=>this.isPivotChart(),"Cross Filter Chart":()=>this.isCrossFilterChart()},n=Object.keys(e).find(r=>e[r]())??"Range Chart",i=t.type===`${n[0].toLowerCase()}${n.slice(1).replace(/ /g,"")}Update`;return i||wt(`Unable to update chart as a '${t.type}' update type is not permitted on a ${n}.`),i}getCellRangeParams(){let t=this.getCellRanges(),e=t[0],n=e&&e.startRow||null,i=e&&e.endRow||null;return{rowStartIndex:n&&n.rowIndex,rowStartPinned:n&&n.rowPinned,rowEndIndex:i&&i.rowIndex,rowEndPinned:i&&i.rowPinned,columns:t.reduce((r,s)=>r.concat(s.columns.map(o=>o.getId())),[])}}setCategoryAxisType(t){this.model.categoryAxisType=t,this.raiseChartModelUpdateEvent()}getSeriesGroupType(){return this.model.seriesGroupType??this.chartProxy.getSeriesGroupType()}setSeriesGroupType(t){this.model.seriesGroupType=t,this.raiseChartModelUpdateEvent()}raiseChartModelUpdateEvent(){this.dispatchLocalEvent({type:"chartModelUpdate"})}raiseChartUpdatedEvent(){this.dispatchLocalEvent({type:"chartUpdated"})}raiseChartApiUpdateEvent(){this.dispatchLocalEvent({type:"chartApiUpdate"})}raiseChartOptionsChangedEvent(){let{chartId:t,chartType:e}=this.getChartModel();this.eventService.dispatchEvent({type:"chartOptionsChanged",chartId:t,chartType:e,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides()})}raiseChartRangeSelectionChangedEvent(){this.eventService.dispatchEvent({type:"chartRangeSelectionChanged",id:this.model.chartId,chartId:this.model.chartId,cellRange:this.getCellRangeParams()})}destroy(){super.destroy(),this.rangeService&&this.rangeService.setCellRanges([])}};hW=class{constructor(t){this.chartProxyParams=t,this.clearThemeOverrides=!1,this.isEnterpriseCharts=R3.enterpriseModule.isEnterprise,this.chart=t.chartInstance,this.chartType=t.chartType,this.crossFiltering=t.crossFiltering,this.crossFilterCallback=t.crossFilterCallback,this.standaloneChartType=oh(this.chartType),this.chart==null?this.chart=DE.create(this.getCommonChartOptions()):this.clearThemeOverrides=!0}crossFilteringReset(){}update(t){this.getChartRef().update(this.getUpdateOptions(t,this.getCommonChartOptions(t.updatedOverrides)))}updateThemeOverrides(t){this.getChartRef().updateDelta({theme:{overrides:t}})}getChart(){return yst(this.chart)}getChartRef(){return this.chart}downloadChart(t,e,n){let{chart:i}=this,r=yst(i),s=e||(r.title?r.title.text:"chart"),{width:o,height:a}=t||{};i.download({width:o,height:a,fileName:s,fileFormat:n})}getChartImageDataURL(t){return this.getChart().getCanvasDataURL(t)}getChartOptions(){return this.chart.getOptions()}getChartThemeOverrides(){return this.getChartOptions().theme.overrides??{}}getChartPalette(){return Lm.getChartTheme(this.getChartOptions().theme).palette}setPaired(t){let e=oh(this.chartProxyParams.chartType);this.chart.updateDelta({theme:{overrides:{[e]:{paired:t}}}})}isPaired(){let t=oh(this.chartProxyParams.chartType);return HE(this.getChartThemeOverrides(),`${t}.paired`,!0)}lookupCustomChartTheme(t){return wot(this.chartProxyParams,t)}getSeriesGroupType(){}transformCategoryData(t,e){return t.map((n,i)=>{let r=n[e],s=r&&r.toString?r.toString():"",o=ve({},n);return o[e]={id:i,value:r,toString:()=>s},o})}getCommonChartOptions(t){let e=this.clearThemeOverrides?{}:this.chart?.getOptions()??{},n=this.chart!=null?this.getActiveFormattingPanelOverrides():void 0;this.clearThemeOverrides=!1;let i=Q_i(this.chartProxyParams,this,this.isEnterpriseCharts,this.getChartThemeDefaults(),t??n),r=St(ve({},e),{mode:"integrated"});return r.theme=i,r.container=this.chartProxyParams.parentElement,r}getChartThemeDefaults(){let t=this.getSeriesChartThemeDefaults(),e=t?{[this.standaloneChartType]:t}:{},n={enabled:!0,snap:!0,label:{enabled:!1}},i=this.isEnterpriseCharts?{zoom:{enabled:!0},animation:{enabled:!0,duration:500},axes:{number:{crosshair:n},category:{crosshair:n},log:{crosshair:n},time:{crosshair:n}}}:{};return i.minHeight=0,i.minWidth=0,i.navigator={enabled:!1},ve({common:i},e)}getSeriesChartThemeDefaults(){}getActiveFormattingPanelOverrides(){return this.clearThemeOverrides?{}:this.chart?.getOptions().theme?.overrides??{}}destroy({keepChartInstance:t=!1}={}){if(t)return this.chart.resetAnimations(),this.chart;this.destroyChart()}destroyChart(){this.chart&&(this.chart.destroy(),this.chart=void 0)}},Hw=class extends hW{constructor(t){super(t),this.crossFilteringAllPoints=new Set,this.crossFilteringSelectedPoints=[]}getUpdateOptions(t,e){let n=this.getAxes(t,e);return St(ve({},e),{data:this.getData(t,n),axes:n,series:this.getSeries(t)})}getData(t,e){let n=["area","line"].includes(this.standaloneChartType);return this.crossFiltering&&n?this.getCrossFilterData(t):this.getDataTransformedData(t,e)}getDataTransformedData(t,e){let n=e[0].type,{categories:i,data:r}=t,[s]=i;switch(n){case"category":return this.transformCategoryData(r,s.id);case"time":return this.transformTimeData(r,s.id);default:return r}}getXAxisType(t){return t.grouping?"grouped-category":this.isXAxisOfType(t,"time",e=>e instanceof Date)?"time":this.isXAxisOfType(t,"number")?"number":"category"}isXAxisOfType(t,e,n){let[i]=t.categories;if(i?.chartDataType)return i.chartDataType===e;if(!n)return!1;let r=t.data[0];return r?n(r[i.id]):!1}transformTimeData(t,e){return t[0]?.[e]instanceof Date?t:t.map(i=>{let r=i[e];return typeof r=="string"?St(ve({},i),{[e]:new Date(r)}):i})}crossFilteringReset(){this.crossFilteringSelectedPoints=[],this.crossFilteringAllPoints.clear()}crossFilteringPointSelected(t){return this.crossFilteringSelectedPoints.length==0||this.crossFilteringSelectedPoints.includes(t)}crossFilteringDeselectedPoints(){return this.crossFilteringSelectedPoints.length>0&&this.crossFilteringAllPoints.size!==this.crossFilteringSelectedPoints.length}extractLineAreaCrossFilterSeries(t,e){let[n]=e.categories,i=r=>this.standaloneChartType==="area"?e.getCrossFilteringContext().lastSelectedChartId===e.chartId?r+"-total":r:r+"-total";return t.map(r=>(r.yKey=i(r.yKey),r.listeners={nodeClick:s=>{let o=s.datum[r.xKey],a=s.event.metaKey||s.event.ctrlKey;this.crossFilteringAddSelectedPoint(a,o),this.crossFilterCallback(s)}},r.marker={itemStyler:s=>{let o=s.datum[n.id];return{fill:s.highlighted?"yellow":s.fill,size:s.highlighted?14:this.crossFilteringPointSelected(o)?8:0}}},this.standaloneChartType==="area"&&(r.fillOpacity=this.crossFilteringDeselectedPoints()?.3:1),this.standaloneChartType==="line"&&(r.strokeOpacity=this.crossFilteringDeselectedPoints()?.3:1),r))}getCrossFilterData(t){this.crossFilteringAllPoints.clear();let[e]=t.categories,n=t.fields[0].colId,i=`${n}-filtered-out`,r=t.getCrossFilteringContext().lastSelectedChartId;return t.data.map(s=>{let o=s[e.id];this.crossFilteringAllPoints.add(o);let a=this.crossFilteringPointSelected(o);return this.standaloneChartType==="area"&&r===t.chartId&&(s[`${n}-total`]=a?s[n]:s[n]+s[i]),this.standaloneChartType==="line"&&(s[`${n}-total`]=a?s[n]:s[n]+s[i]),s})}crossFilteringAddSelectedPoint(t,e){t?this.crossFilteringSelectedPoints.push(e):this.crossFilteringSelectedPoints=[e]}isHorizontal(t){let e=this.standaloneChartType;if(e!=="waterfall"&&e!=="box-plot"&&e!=="range-bar")return!1;let n=t.theme,i=r=>{let s=r?.overrides?.[e]?.series?.direction;return s!=null?s==="horizontal":typeof r?.baseTheme=="object"?i(r.baseTheme):!1};return i(n)}},u5i=class extends Hw{constructor(t){super(t)}getAxes(t){let e=[{type:this.getXAxisType(t),position:"bottom"},{type:"number",position:"left"}];if(this.isNormalised()){let n=e[1];n.label=St(ve({},n.label),{formatter:i=>Math.round(i.value)+"%"})}return e}getSeries(t){let[e]=t.categories,n=t.fields.map(i=>({type:this.standaloneChartType,xKey:e.id,xName:e.name,yKey:i.colId,yName:i.displayName,normalizedTo:this.chartType==="normalizedArea"?100:void 0,stacked:["normalizedArea","stackedArea"].includes(this.chartType)}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(n,t):n}isNormalised(){return!this.crossFiltering&&this.chartType==="normalizedArea"}};h5i=new Set(["bar","groupedBar","stackedBar","normalizedBar"]),p5i=class extends Hw{constructor(t){super(t)}getAxes(t){let e=[{type:this.getXAxisType(t),position:this.isHorizontal()?"left":"bottom"},{type:"number",position:this.isHorizontal()?"bottom":"left"}];if(this.isNormalised()){let n=e[1];n.label=St(ve({},n.label),{formatter:i=>Math.round(i.value)+"%"})}return e}getSeries(t){let[e]=t.categories,n=t.fields.map(i=>({type:this.standaloneChartType,direction:this.isHorizontal()?"horizontal":"vertical",stacked:this.crossFiltering||T_i(this.chartType),normalizedTo:this.isNormalised()?100:void 0,xKey:e.id,xName:e.name,yKey:i.colId,yName:i.displayName}));return this.crossFiltering?this.extractCrossFilterSeries(n):n}extractCrossFilterSeries(t){let e=this.getChartPalette(),n=(s,o)=>St(ve({},s),{highlightStyle:{item:{fill:void 0}},fill:e?.fills?.[o],stroke:e?.strokes?.[o],listeners:{nodeClick:this.crossFilterCallback}}),i=s=>{let o=s.yKey+"-filtered-out";return St(ve({},s),{yKey:o,fill:_st(s.fill,"0.3"),stroke:_st(s.stroke,"0.3"),showInLegend:!1})},r=[];for(let s=0;s<t.length;s++){let o=t[s];r.push(n(o,s)),r.push(i(n(o,s)))}return r}isNormalised(){let t=["normalizedColumn","normalizedBar"];return!this.crossFiltering&&Sl(t,this.chartType)}isHorizontal(){return h5i.has(this.chartType)}},m5i=class extends Hw{constructor(t){super(t)}getSeries(t){let e=t.fields[0];return[{type:this.standaloneChartType,xKey:e.colId,xName:e.displayName,yName:this.chartProxyParams.translate("histogramFrequency"),areaPlot:!1}]}getAxes(t){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}},f5i=class extends Hw{constructor(t){super(t)}getAxes(t){return[{type:this.getXAxisType(t),position:"bottom"},{type:"number",position:"left"}]}getSeries(t){let[e]=t.categories,n=t.fields.map(i=>({type:this.standaloneChartType,xKey:e.id,xName:e.name,yKey:i.colId,yName:i.displayName}));return this.crossFiltering?this.extractLineAreaCrossFilterSeries(n,t):n}},g5i=class extends Hw{constructor(t){super(t)}getAxes(t){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]}getSeries(t){let[e]=t.categories,n=this.isPaired(),i=this.getSeriesDefinitions(t.fields,n),r=e.id===nb.DEFAULT_CATEGORY?void 0:e,s=i.map(o=>o?.sizeField?{type:"bubble",xKey:o.xField.colId,xName:o.xField.displayName??void 0,yKey:o.yField.colId,yName:o.yField.displayName??void 0,title:`${o.yField.displayName} vs ${o.xField.displayName}`,sizeKey:o.sizeField.colId,sizeName:o.sizeField.displayName??"",labelKey:r?r.id:o.yField.colId,labelName:r?r.name:void 0}:{type:"scatter",xKey:o.xField.colId,xName:o.xField.displayName??void 0,yKey:o.yField.colId,yName:o.yField.displayName??void 0,title:`${o.yField.displayName} vs ${o.xField.displayName}`,labelKey:r?r.id:o.yField.colId,labelName:r?r.name:void 0});return this.crossFiltering?this.extractCrossFilterSeries(s,t):s}extractCrossFilterSeries(t,e){let{data:n}=e,i=this.getChartPalette(),r=c=>`${c}-filtered-out`,s=(c,d)=>{let u=[1/0,-1/0];if(d!=null)for(let m of c){let f=m[d]??m[r(d)];f<u[0]&&(u[0]=f),f>u[1]&&(u[1]=f)}if(u[0]<=u[1])return u},o=(c,d)=>{let u=i?.fills?.[d],m=i?.strokes?.[d],f;if(c.type==="bubble"){let{sizeKey:_}=c;f=s(n,_)}return St(ve({},c),{fill:u,stroke:m,domain:f,highlightStyle:{item:{fill:"yellow"}},listeners:St(ve({},c.listeners),{nodeClick:this.crossFilterCallback})})},a=c=>{let{yKey:d,xKey:u}=c,m={};return c.type==="bubble"&&(m={sizeKey:r(c.sizeKey)}),St(ve(ve({},c),m),{yKey:r(d),xKey:r(u),fillOpacity:.3,strokeOpacity:.3,showInLegend:!1,listeners:St(ve({},c.listeners),{nodeClick:f=>{let _=f.datum[r(u)],x=St(ve({},f),{xKey:u,datum:St(ve({},f.datum),{[u]:_})});this.crossFilterCallback(x)}})})},l=t.map(o);return[...l,...l.map(a)]}getSeriesDefinitions(t,e){if(t.length<2)return[];let n=this.chartType==="bubble";if(e)return n?t.map((r,s)=>s%3===0?{xField:r,yField:t[s+1],sizeField:t[s+2]}:null).filter(r=>r&&r.yField&&r.sizeField):t.map((r,s)=>s%2===0?{xField:r,yField:t[s+1]}:null).filter(r=>r&&r.yField);let i=t[0];return n?t.map((r,s)=>s%2===1?{xField:i,yField:r,sizeField:t[s+1]}:null).filter(r=>r&&r.sizeField):t.filter((r,s)=>s>0).map(r=>({xField:i,yField:r}))}},v5i=class extends Hw{constructor(t){super(t)}getAxes(t,e){return[{type:this.getXAxisType(t),position:this.isHorizontal(e)?"left":"bottom"},{type:"number",position:this.isHorizontal(e)?"bottom":"left"}]}getSeries(t){let[e]=t.categories,[n]=t.fields;return[{type:this.standaloneChartType,xKey:e.id,xName:e.name,yKey:n.colId,yName:n.displayName??void 0}]}},y5i=class extends Hw{constructor(t){super(t)}getAxes(t){let e=t?t.fields:[],n=new Map(e.map(o=>[o.colId,o])),{primaryYKeys:i,secondaryYKeys:r}=this.getYKeys(e,t.seriesChartTypes),s=[{type:this.getXAxisType(t),position:"bottom"}];return i.length>0&&s.push({type:"number",keys:i,position:"left"}),r.length>0&&r.forEach(o=>{let a=n.get(o);if(!(a&&a.colId===o))return;let c={type:"number",keys:[o],position:"right"};s.push(c)}),s}getSeries(t){let{fields:e,seriesChartTypes:n}=t,[i]=t.categories;return e.map(r=>{let s=n.find(o=>o.colId===r.colId);if(s){let o=s.chartType,l=["groupedColumn","groupedBar"].includes(o)?{grouped:!0}:{};return ve({type:oh(o),xKey:i.id,yKey:r.colId,yName:r.displayName,stacked:["stackedArea","stackedColumn"].includes(o)},l)}})}getYKeys(t,e){let n=[],i=[];return t.forEach(r=>{let s=r.colId,o=e.find(a=>a.colId===s);o&&(o.secondaryAxis?i.push(s):n.push(s))}),{primaryYKeys:n,secondaryYKeys:i}}},rie="AG-GRID-DEFAULT-LABEL-KEY";x5i=class extends hW{constructor(t){super(t)}getUpdateOptions(t,e){let{fields:n}=t,[i,r]=n;return St(ve({},e),{series:this.getSeries(i,r),data:this.getData(t,i,r)})}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}}}}getSeries(t,e){return[{type:this.standaloneChartType,labelKey:rie,sizeKey:t?.colId,sizeName:t?.displayName??void 0,colorKey:e?.colId,colorName:e?.displayName??void 0}]}getData(t,e,n){let{categories:i,data:r,groupData:s,grouping:o}=t;if(o){let a=n?r.concat(s?.map(l=>{let c=ve({},l);return delete c[e.colId],c})??[]):r;return C5i(a,l=>l[Xv]?.labels??null)}else{let a=i.map(({id:l})=>l);return _5i(r,a)}}};w5i=class extends hW{constructor(t){super(t)}getUpdateOptions(t,e){return St(ve({},e),{data:this.crossFiltering?this.getCrossFilterData(t):t.data,series:this.getSeries(t)})}getSeries(t){let[e]=t.categories,n=t.fields.length,i={currentOffset:0,offsetAmount:n>1?20:40},r=this.getFields(t).map(s=>{let o={type:this.standaloneChartType,angleKey:s.colId,angleName:s.displayName,sectorLabelKey:s.colId,calloutLabelName:e.name,calloutLabelKey:e.id};if(this.chartType==="donut"||this.chartType==="doughnut"){let{outerRadiusOffset:a,innerRadiusOffset:l}=b5i(i),c=s.displayName?{title:{text:s.displayName,showInLegend:n>1}}:void 0;return St(ve(St(ve({},o),{type:"donut",outerRadiusOffset:a,innerRadiusOffset:l}),c),{calloutLine:{colors:this.getChartPalette()?.strokes}})}return o});return this.crossFiltering?this.extractCrossFilterSeries(r):r}getCrossFilterData(t){let e=t.fields[0].colId,n=`${e}-filtered-out`;return t.data.map(i=>{let r=i[e]+i[n];return i[`${e}-total`]=r,i[n]=1,i[e]=i[e]/r,i})}extractCrossFilterSeries(t){let e=this.getChartPalette(),n=a=>St(ve({},a),{legendItemKey:a.calloutLabelKey,calloutLabel:{enabled:!1},highlightStyle:{item:{fill:void 0}},radiusKey:a.angleKey,angleKey:a.angleKey+"-total",radiusMin:0,radiusMax:1,listeners:{nodeClick:this.crossFilterCallback}}),i=(a,l)=>St(ve({},o),{radiusKey:l+"-filtered-out",fills:Cst(a.fills??e?.fills??[],.3),strokes:Cst(a.strokes??e?.strokes??[],.3),showInLegend:!1}),r=t[0],s=r.angleKey,o=n(r);return[i(n(r),s),o]}getFields(t){return this.chartType==="pie"?t.fields.slice(0,1):t.fields}},S5i=class extends hW{constructor(t){super(t)}getAxes(t){let e=this.standaloneChartType==="radial-bar";return[{type:e?"angle-number":"angle-category"},{type:e?"radius-category":"radius-number"}]}getSeries(t){let{fields:e,categories:n,seriesGroupType:i}=t,[r]=n,s=this.standaloneChartType==="radial-bar",o=this.getSeriesGroupTypeOptions(i);return e.map(a=>ve({type:this.standaloneChartType,angleKey:s?a.colId:r.id,angleName:s?a.displayName??void 0:r.name,radiusKey:s?r.id:a.colId,radiusName:s?r.name:a.displayName??void 0},o))}getSeriesGroupType(){let t=this.standaloneChartType;if(!["nightingale","radial-bar","radial-column"].includes(t))return;let e=this.getChart().series?.[0]?.properties.toJson(),n=()=>e.normalizedTo?"normalized":"stacked";return t==="nightingale"?e.grouped?"grouped":n():e.stacked?n():"grouped"}getUpdateOptions(t,e){let n=this.getAxes(t);return St(ve({},e),{data:this.getData(t,n),axes:n,series:this.getSeries(t)})}getData(t,e){if(e.some(i=>i.type==="angle-category"||i.type==="radius-category")){let[i]=t.categories;return this.transformCategoryData(t.data,i.id)}else return t.data}getSeriesGroupTypeOptions(t){return t?{grouped:t==="grouped"||void 0,stacked:t!=="grouped"||void 0,normalizedTo:t==="normalized"?100:void 0}:{}}};D5i="AG-GRID-DEFAULT-HEATMAP-CATEGORY-KEY",E5i="AG-GRID-DEFAULT-HEATMAP-SERIES-KEY",M5i="AG-GRID-DEFAULT-HEATMAP-VALUE-KEY",k5i=class extends hW{constructor(t){super(t)}getUpdateOptions(t,e){let n=E5i,i=M5i,r=D5i;return St(ve({},e),{series:this.getSeries(t,n,i,r),data:this.getData(t,n,i,r)})}getSeries(t,e,n,i){let[r]=t.categories;return[{type:this.standaloneChartType,yKey:i,xKey:e,colorKey:n,yName:r.name,xName:void 0,colorName:void 0}]}getData(t,e,n,i){let[r]=t.categories;return T5i(t.data,(s,o)=>{let a=s[r.id],l=a==null?"":String(a),c={id:o,value:a,toString:()=>l};return t.fields.map(({colId:d,displayName:u})=>St(ve({},s),{[e]:u,[n]:s[d],[i]:c}))})}getSeriesChartThemeDefaults(){return{gradientLegend:{gradient:{preferredLength:200}},series:{tooltip:{renderer:I5i}}}}};Aot=class extends Hw{constructor(t){super(t)}getAxes(t,e){return[{type:this.getXAxisType(t),position:this.isHorizontal(e)?"left":"bottom"},{type:"number",position:this.isHorizontal(e)?"bottom":"left"}]}computeSeriesStatistics(t,e){let{data:n,fields:i}=t,[r]=t.categories,s=r.id||nb.DEFAULT_CATEGORY,o=this.groupDataByCategory(s,n);return Array.from(o).map(([a,l])=>{let c={[r.id]:a};return i.forEach((d,u)=>{let m=l.map(f=>f[d.colId]).filter(f=>typeof f=="number"&&!isNaN(f));Object.entries(e(m)).forEach(([f,_])=>{let x=`${f}:${u}`;c[x]=m.length>0?_:null})}),c})}groupDataByCategory(t,e){let n=i=>{if(t===nb.DEFAULT_CATEGORY)return 1;let r=i[t];return r==null?"":r instanceof Date?r.getTime():r};return e.reduce((i,r)=>{let s=n(r),o=i.get(s);return o?o.push(r):i.set(s,[r]),i},new Map)}},A5i=class extends Aot{constructor(t){super(t)}getSeries(t){let[e]=t.categories;return t.fields.map((n,i)=>({type:this.standaloneChartType,xKey:e.id,xName:e.name,yName:n.displayName??void 0,minName:"Min",q1Name:"Q1",medianName:"Median",q3Name:"Q3",maxName:"Max",minKey:`min:${i}`,q1Key:`q1:${i}`,medianKey:`median:${i}`,q3Key:`q3:${i}`,maxKey:`max:${i}`}))}getData(t){return this.computeSeriesStatistics(t,e=>{let n=e.sort((i,r)=>i-r);return{min:n[0],q1:this.quantile(n,.25),median:this.quantile(n,.5),q3:this.quantile(n,.75),max:n[n.length-1]}})}quantile(t,e){let n=(t.length-1)*e,i=Math.floor(n),r=n-i;return t[i+1]!==void 0?t[i]+r*(t[i+1]-t[i]):t[i]}},P5i=class extends Aot{constructor(t){super(t)}getSeries(t){let[e]=t.categories;return t.fields.map((n,i)=>({type:this.standaloneChartType,xKey:e.id,xName:e.name,yName:n.displayName??void 0,yLowName:"Min",yHighName:"Max",yLowKey:`min:${i}`,yHighKey:`max:${i}`}))}getData(t){return this.computeSeriesStatistics(t,e=>({min:Math.min(...e),max:Math.max(...e)}))}},R5i=class extends ai{constructor(){super('<div class="ag-chart-menu" data-ref="eMenu"></div>'),this.eMenu=Bt,this.buttonListenersDestroyFuncs=[]}wireBeans(t){this.chartTranslationService=t.chartTranslationService}updateParams(t){let{buttons:e}=t;this.createButtons(e)}createButtons(t){this.buttonListenersDestroyFuncs.forEach(n=>n?.()),this.buttonListenersDestroyFuncs=[];let e=this.eMenu;zo(e),t.forEach(n=>{let{buttonName:i,iconName:r,callback:s}=n,o=this.createButton(r),a=this.chartTranslationService.translate(i+"ToolbarTooltip");a&&o instanceof HTMLElement&&(o.title=a),this.buttonListenersDestroyFuncs.push(...this.addManagedElementListeners(o,{click:l=>s(l.currentTarget)})),e.appendChild(o)})}createButton(t){let e=tr(t,this.gos,void 0,!0);e.classList.add("ag-chart-menu-icon");let n=this.gos.getDocument().createElement("button");return n.appendChild(e),n.classList.add("ag-chart-menu-toolbar-button"),n}destroy(){this.buttonListenersDestroyFuncs=[],super.destroy()}},F5i=class extends ai{constructor(t){super('<div class="ag-pill-select" role="presentation"></div>'),this.config=t??{};let{selectedValueList:e,valueFormatter:n,valueList:i}=this.config;this.selectedValues=e??[],this.valueList=i??[],this.valueFormatter=n??(r=>nl(r))}postConstruct(){let{ariaLabel:t,onValuesChange:e,dragSourceId:n}=this.config;this.dropZonePanel=this.createManagedBean(new O5i({getValues:()=>this.selectedValues,setValues:r=>this.updateValues(r),isDraggable:()=>this.selectedValues.length>1},r=>this.valueFormatter(r),t,n)),this.getGui().appendChild(this.dropZonePanel.getGui()),this.initSelect(),e!=null&&(this.onValuesChange=e)}setValues(t,e){let{added:n,removed:i,updated:r}=this.getChanges(this.valueList,t),s=!1;return(n.length||i.length||r.length)&&(s=!0),this.valueList=t,this.updateValues(e,s,!0),this}setValueFormatter(t){return this.valueFormatter=t,this}initSelect(){let t=this.createSelectOptions();if(!t.length)return!1;let{selectPlaceholder:e}=this.config;return this.eSelect=this.createBean(new np({options:t,placeholder:e,onValueChange:n=>this.addValue(n),pickerIcon:"chartsMenuAdd"})),this.getGui().appendChild(this.eSelect.getGui()),!0}createSelectOptions(){let t=[],{maxSelection:e}=this.config;return e&&this.selectedValues.length>=e||this.valueList.forEach(n=>{this.selectedValues.includes(n)||t.push({value:n,text:this.valueFormatter(n)})}),t}addValue(t){this.dropZonePanel.addItem(t)}updateValues(t,e,n){let i=this.selectedValues;this.selectedValues=t;let r=this.getChanges(i,t),s=e||r.added.length||r.removed.length,o=this.gos.getActiveDomElement(),a=this.eSelect?.getGui().contains(o),l=this.dropZonePanel?.getGui().contains(o);n||this.onValuesChange?.(r);let c=s?!this.refreshSelect():!1;this.dropZonePanel.refreshGui(),s&&a&&(c?this.dropZonePanel.focusList(!0):this.eSelect?.getFocusableElement().focus()),l&&!t.length&&this.eSelect?.getFocusableElement().focus()}getChanges(t,e){let n=e.filter(s=>!t.includes(s)),i=t.filter(s=>!e.includes(s)),r=e.filter((s,o)=>t[o]!==s);return{added:n,removed:i,updated:r,selected:e}}refreshSelect(){if(!this.eSelect)return this.initSelect();let t=this.createSelectOptions();return t.length?(this.eSelect.clearOptions().addOptions(t).setValue(void 0,!0),!0):(dc(this.eSelect.getGui()),this.eSelect=this.destroyBean(this.eSelect),!1)}destroy(){this.destroyBean(this.eSelect),super.destroy()}},L5i=class extends Qxe{constructor(t,e,n,i,r,s){super(e,n,!1),this.value=t,this.valueFormatter=i,this.draggable=r,this.sourceId=s}getItem(){return this.value}getDisplayName(){return this.valueFormatter(this.value)}getAriaDisplayName(){return this.getDisplayName()}getTooltip(){}createGetDragItem(){return()=>({value:this.value})}getDragSourceType(){return u1.ChartPanel}getDragSourceId(){return this.sourceId}isDraggable(){return this.draggable}},O5i=class extends Jxe{constructor(t,e,n,i){super(!1),this.model=t,this.valueFormatter=e,this.ariaLabel=n,this.sourceId=i}postConstruct(){super.init()}isItemDroppable(t,e){return this.isSourceEventFromTarget(e)||this.sourceId!=null&&this.sourceId===e.dragSource.sourceId}updateItems(t){this.model.setValues(t)}getExistingItems(){return this.model.getValues()}getIconName(){return this.isPotentialDndItems()?"move":"notAllowed"}getAriaLabel(){return this.ariaLabel}createPillComponent(t,e,n){return new L5i(t,e,n,this.valueFormatter,this.model.isDraggable(),this.sourceId)}getItems(t){return[t.value]}isInterestedIn(t){return t===u1.ChartPanel}},Pot=class extends ai{constructor(t,e,n,i){super(i),this.chartController=t,this.allowMultipleSelection=e,this.maxSelection=n}wireBeans(t){this.chartTranslationService=t.chartTranslationService}addItem(t){this.groupComp.addItem(t)}createGroup(t,e,n,i,r){if(this.allowMultipleSelection){let s=t.filter(o=>o.selected);this.valuePillSelect=this.groupComp.createManagedBean(new F5i({valueList:t,selectedValueList:s,valueFormatter:e,selectPlaceholder:this.chartTranslationService.translate(n),dragSourceId:i,onValuesChange:o=>this.onValueChange(o),maxSelection:this.maxSelection})),this.groupComp.addItem(this.valuePillSelect)}else{let s=this.createValueSelectParams(t);s.onValueChange=o=>{t.forEach(a=>{a.selected=!1}),o.selected=!0,o.colId===nb.DEFAULT_CATEGORY&&this.chartController.setAggFunc(void 0,!0),this.chartController.updateForPanelChange({updatedColState:o,skipAnimation:r?.()})},this.valueSelect=this.groupComp.createManagedBean(new np(s)),this.groupComp.addItem(this.valueSelect)}}refreshValueSelect(t){if(!this.valueSelect)return;let{options:e,value:n}=this.createValueSelectParams(t);this.valueSelect.clearOptions().addOptions(e).setValue(n,!0)}createValueSelectParams(t){let e;return{options:t.map(i=>{let r=i.displayName??"";return i.selected&&(e=i),{value:i,text:r}}),value:e}}onValueChange({added:t,updated:e,removed:n,selected:i}){let r,s,o=()=>{i.forEach((a,l)=>{a.order=l}),s=!0};t.length?(r=t[0],r.selected=!0,o()):n.length?(r=n[0],r.selected=!1):e.length&&(o(),r=e[0]),r&&this.chartController.updateForPanelChange({updatedColState:r,resetOrder:s})}destroy(){this.valuePillSelect=void 0,this.valueSelect=void 0,super.destroy()}},N5i="sum",V5i=class extends Pot{constructor(t,e,n,i,r){super(t,n,void 0,'<div id="categoriesGroup"></div>'),this.title=e,this.dimensionCols=i,this.isOpen=r}postConstruct(){this.groupComp=this.createBean(new uC({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.createGroup(this.dimensionCols,t=>t.displayName??"","categoryAdd","categorySelect",()=>!this.chartController.getAggFunc()),this.createAggFuncControls(this.dimensionCols),this.getGui().appendChild(this.groupComp.getGui())}refresh(t){this.valuePillSelect?.setValues(t,t.filter(e=>e.selected)),this.refreshValueSelect(t),this.refreshAggFuncControls(t,this.chartController.getAggFunc())}createAggFuncControls(t){let e=this.chartController.getAggFunc();this.groupComp.addItem(this.aggFuncToggle=this.createBean(new qy({label:this.chartTranslationService.translate("aggregate"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:e!=null,onValueChange:n=>{let i=n?N5i:void 0;this.chartController.setAggFunc(i),this.aggFuncSelect?.setValue(i,!0),this.aggFuncSelect?.setDisplayed(i!=null)}}))),this.groupComp.addItem(this.aggFuncSelect=this.createBean(new np({options:[{value:"sum",text:this.chartTranslationService.translate("sum")},{value:"first",text:this.chartTranslationService.translate("first")},{value:"last",text:this.chartTranslationService.translate("last")},{value:"min",text:this.chartTranslationService.translate("min")},{value:"max",text:this.chartTranslationService.translate("max")},{value:"count",text:this.chartTranslationService.translate("count")},{value:"avg",text:this.chartTranslationService.translate("avg")}],value:typeof e=="string"?e:void 0,onValueChange:n=>{this.chartController.setAggFunc(n)}}))),this.refreshAggFuncControls(t,e)}refreshAggFuncControls(t,e){let i=t.filter(r=>r.selected).some(r=>r.colId!==nb.DEFAULT_CATEGORY);this.aggFuncToggle?.setValue(e!=null),this.aggFuncSelect?.setValue(typeof e=="string"?e:void 0,!0),this.aggFuncToggle?.setDisplayed(i),this.aggFuncSelect?.setDisplayed(i&&e!=null)}clearAggFuncControls(){this.aggFuncToggle=this.destroyBean(this.aggFuncToggle),this.aggFuncSelect=this.destroyBean(this.aggFuncSelect)}destroy(){this.clearAggFuncControls(),this.groupComp=this.destroyBean(this.groupComp),super.destroy()}},jE=class extends Ot{constructor(t){super(),this.chartOptionsProxy=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}getDefaultColorPickerParams(t,e,n){return this.addValueParams(t,{label:this.chartTranslationService.translate(e??"color"),labelWidth:"flex",inputWidth:"flex",labelAlignment:"top",pickerGap:6},n)}getDefaultNumberInputParams(t,e,n){return this.addValueParams(t,{label:this.chartTranslationService.translate(e),labelAlignment:"top",labelWidth:"flex",inputWidth:"flex",precision:n?.precision,step:n?.step,min:n?.min,max:n?.max},{parseInputValue:i=>{let r=Number(i);return isNaN(r)?void 0:r},formatInputValue:i=>i==null?"":`${i}`})}getDefaultSliderParams(t,e,n,i){let r=this.chartOptionsProxy.getValue(t)??0;i&&Array.isArray(r)&&(r=r[0]);let s=this.getDefaultSliderParamsWithoutValueParams(r,e,n);return s.onValueChange=o=>this.chartOptionsProxy.setValue(t,i?[o]:o),s}getDefaultSliderParamsWithoutValueParams(t,e,n){return{label:this.chartTranslationService.translate(e),minValue:0,maxValue:Math.max(t,n),textFieldWidth:45,value:`${t}`}}getDefaultCheckboxParams(t,e,n){let i=this.chartOptionsProxy.getValue(t),r={label:this.chartTranslationService.translate(e),value:i,readOnly:n?.readOnly,passive:n?.passive};return r.onValueChange=s=>{this.chartOptionsProxy.setValue(t,typeof s=="boolean"?s:void 0)},r}getDefaultSelectParams(t,e,n){return this.getDefaultSelectParamsWithoutValueParams(e,n,this.chartOptionsProxy.getValue(t),i=>{this.chartOptionsProxy.setValue(t,i)})}getDefaultSelectParamsWithoutValueParams(t,e,n,i){return{label:this.chartTranslationService.translate(t),labelAlignment:"top",options:e,pickerGap:6,value:n,onValueChange:i}}getDefaultFontPanelParams(t,e){let n=i=>`${t}.${i}`;return this.addEnableParams(n("enabled"),{name:this.chartTranslationService.translate(e),suppressEnabledCheckbox:!1,chartMenuParamsFactory:this,keyMapper:n})}addValueParams(t,e,n){let i=this.chartOptionsProxy.getValue(t);return e.value=n?.formatInputValue?n.formatInputValue(i):i,e.onValueChange=r=>{let s=n?.parseInputValue?n.parseInputValue(r):r;this.chartOptionsProxy.setValue(t,s)},e}addEnableParams(t,e){return e.enabled=this.chartOptionsProxy.getValue(t)??!1,e.onEnableChange=n=>this.chartOptionsProxy.setValue(t,n),e}getChartOptions(){return this.chartOptionsProxy}},B5i=class extends ai{constructor(t,e){super(),this.chartMenuContext=t,this.isOpen=e,this.chartSpecificGroup=Bt,this.hasContent=!1}wireBeans(t){this.chartTranslationService=t.chartTranslationService,this.chartService=t.chartService}postConstruct(){let e={title:this.getTitle(),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen,items:[...this.createDirectionSelect(),this.createGroupTypeSelect()]};this.setTemplate(`
            <div id="chartSpecificGroup">
                <ag-group-component data-ref="chartSpecificGroup"></ag-group-component>
            </div>`,[ah],{chartSpecificGroup:e}),this.setDisplayed(this.hasContent)}refresh(){this.hasContent=!1,this.chartSpecificGroup.setTitle(this.getTitle()),this.updateDirectionSelect(),this.updateGroupTypeSelect(),this.setDisplayed(this.hasContent)}getTitle(){let t=this.chartMenuContext.chartController.getChartType();return this.chartTranslationService.translate(dbe(t))}createDirectionSelect(){if(!this.chartService.isEnterprise())return[];let{chartOptionsService:t,chartController:e}=this.chartMenuContext,n=t.getSeriesOptionsProxy(()=>oh(e.getChartType())),i=this.createManagedBean(new jE(n)),r=["horizontal","vertical"].map(a=>({value:a,text:this.chartTranslationService.translate(a)})),s=i.getDefaultSelectParams("direction","direction",r),o=s.onValueChange;return s.onValueChange=a=>{o(a),e.raiseChartModelUpdateEvent()},this.directionSelect=this.createManagedBean(new np(s)),this.updateDirectionSelect(),[this.directionSelect]}updateDirectionSelect(){let t=M_i(this.chartMenuContext.chartController.getChartType());this.updateDisplayed(this.directionSelect,t)}createGroupTypeSelect(){let{chartController:t,chartMenuParamsFactory:e}=this.chartMenuContext;return this.groupTypeSelect=this.createManagedBean(new np(e.getDefaultSelectParamsWithoutValueParams("seriesGroupType",nz.SERIES_GROUP_TYPES.map(n=>({value:n,text:this.chartTranslationService.translate(`${n}SeriesGroupType`)})),t.getSeriesGroupType(),n=>t.setSeriesGroupType(n)))),this.updateGroupTypeSelect(),this.groupTypeSelect}updateGroupTypeSelect(){let t=["radialColumn","radialBar","nightingale"].includes(this.chartMenuContext.chartController.getChartType());this.updateDisplayed(this.groupTypeSelect,t)}updateDisplayed(t,e){t?.setDisplayed(e),t&&(this.hasContent=this.hasContent||e)}},z5i=class extends ai{constructor(t,e,n){super('<div id="seriesChartTypeGroup"></div>'),this.chartController=t,this.columns=e,this.isOpen=n,this.selectedColIds=[],this.chartTypeComps=new Map,this.secondaryAxisComps=new Map}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){this.createSeriesChartTypeGroup(this.columns)}refresh(t){Cf(this.getValidColIds(t),this.selectedColIds)?this.refreshComps():this.recreate(t)}recreate(t){this.isOpen=this.seriesChartTypeGroupComp.isExpanded(),zo(this.getGui()),this.destroyBean(this.seriesChartTypeGroupComp),this.columns=t,this.selectedColIds=[],this.clearComps(),this.postConstruct()}getValidColIds(t){let e=this.chartController.getSeriesChartTypes();return t.filter(n=>n.selected&&!!e.filter(i=>i.colId===n.colId)[0]).map(({colId:n})=>n)}createSeriesChartTypeGroup(t){this.seriesChartTypeGroupComp=this.createBean(new uC({title:this.chartTranslationService.translate("seriesChartType"),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen}));let e=this.chartController.getSeriesChartTypes();t.forEach(n=>{if(!n.selected)return;let i=e.filter(c=>c.colId===n.colId)[0];if(!i)return;this.selectedColIds.push(n.colId);let r=this.seriesChartTypeGroupComp.createManagedBean(new uC({title:n.displayName,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-format-sub-level"})),s=c=>["groupedColumn","stackedColumn","stackedArea"].includes(c),o=this.seriesChartTypeGroupComp.createManagedBean(new b5({label:this.chartTranslationService.translate("secondaryAxis"),labelWidth:"flex",disabled:s(i.chartType),value:!!i.secondaryAxis,onValueChange:c=>this.chartController.updateSeriesChartType(n.colId,void 0,c)}));r.addItem(o);let a=["line","area","stackedArea","groupedColumn","stackedColumn"].map(c=>({value:c,text:this.chartTranslationService.translate(dbe(c))})),l=r.createManagedBean(new np({options:a,value:i.chartType,onValueChange:c=>this.chartController.updateSeriesChartType(n.colId,c)}));r.addItem(l),this.seriesChartTypeGroupComp.addItem(r),this.chartTypeComps.set(n.colId,l),this.secondaryAxisComps.set(n.colId,o)}),this.getGui().appendChild(this.seriesChartTypeGroupComp.getGui())}refreshComps(){let t=this.chartController.getSeriesChartTypes();this.selectedColIds.forEach(e=>{let n=t.find(s=>s.colId===e);if(!n)return;let i=this.chartTypeComps.get(e),r=this.secondaryAxisComps.get(e);i?.setValue(n.chartType),r?.setValue(!!n.secondaryAxis),r?.setDisabled(this.isSecondaryAxisDisabled(n.chartType))})}clearComps(){this.chartTypeComps.clear(),this.secondaryAxisComps.clear()}isSecondaryAxisDisabled(t){return["groupedColumn","stackedColumn","stackedArea"].includes(t)}destroy(){this.clearComps(),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp),super.destroy()}},H5i=class extends Pot{constructor(t,e,n,i,r,s,o){super(t,i,r,'<div id="seriesGroup"></div>'),this.chartOptionsService=e,this.title=n,this.valueCols=s,this.isOpen=o}postConstruct(){if(this.groupComp=this.createBean(new uC({title:this.title,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data",expanded:this.isOpen})),this.chartController.isActiveXYChart()){let t=this.groupComp.createManagedBean(new qy({label:this.chartTranslationService.translate("paired"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartOptionsService.getPairedMode(),onValueChange:e=>{this.chartOptionsService.setPairedMode(!!e),this.chartController.updateForGridChange({maintainColState:!0})}}));this.groupComp.addItem(t)}this.createGroup(this.valueCols,this.generateGetSeriesLabel(this.valueCols),"seriesAdd","seriesSelect"),this.getGui().appendChild(this.groupComp.getGui())}refresh(t){this.valuePillSelect?.setValueFormatter(this.generateGetSeriesLabel(t)),this.valuePillSelect?.setValues(t,t.filter(e=>e.selected)),this.refreshValueSelect(t)}generateGetSeriesLabel(t){if(!this.chartController.isActiveXYChart())return s=>s.displayName??"";let e=t.filter(s=>s.selected),n=this.chartController.getChartType()==="bubble",i=this.chartOptionsService.getPairedMode(),r=new Map;return r.set(0,"X"),r.set(1,"Y"),r.set(2,"size"),s=>{let o=s.displayName??"";if(!s.selected)return o;let a=e.indexOf(s);if(a===-1)return o;let l;return i?l=r.get(a%(n?3:2)):a===0?l="X":l=n&&a%2===0?"size":"Y",`${o} (${l})`}}destroy(){this.groupComp=this.destroyBean(this.groupComp),super.destroy()}},G5i={groups:[{type:"categories",isOpen:!0},{type:"series",isOpen:!0},{type:"seriesChartType",isOpen:!0},{type:"chartSpecific",isOpen:!0}]},W5i=class extends ai{constructor(t){super('<div class="ag-chart-data-wrapper ag-scrollable-container"></div>'),this.chartMenuContext=t,this.isSwitchCategorySeriesToggled=!1,this.restoreSwitchCategorySeriesToggleFocus=!1,this.panels=[],this.chartController=t.chartController}wireBeans(t){this.chartTranslationService=t.chartTranslationService,this.chartService=t.chartService}postConstruct(){this.createSwitchCategorySeriesToggle(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched(),this.updatePanels();let t=this.updatePanels.bind(this);this.addManagedListeners(this.chartController,{chartModelUpdate:t,chartApiUpdate:t})}destroy(){this.clearPanelComponents(),super.destroy()}updatePanels(){let t=this.chartType,e=this.isSwitchCategorySeriesToggled,{dimensionCols:n,valueCols:i}=this.chartController.getColStateForMenu();this.chartType=this.chartController.getChartType(),this.isSwitchCategorySeriesToggled=this.chartController.isCategorySeriesSwitched();let r=this.isSwitchCategorySeriesToggled!==e;this.canRefresh(t,this.chartType)&&!r?(this.categoriesDataPanel?.refresh(n),this.seriesDataPanel?.refresh(i),this.seriesChartTypePanel?.refresh(i),this.chartSpecificPanel?.refresh()):this.recreatePanels(n,i);let s=yot(this.chartType)&&this.chartService.isEnterprise()&&!this.chartController.isGrouping();Vn(this.switchCategorySeriesToggle.getGui(),s),r&&this.switchCategorySeriesToggle?.setValue(this.chartController.isCategorySeriesSwitched()),this.restoreSwitchCategorySeriesToggleFocus&&(this.restoreSwitchCategorySeriesToggleFocus=!1,s&&this.switchCategorySeriesToggle.getFocusableElement().focus())}canRefresh(t,e){if(t===void 0)return!1;if(t===e)return!0;let n=i=>["columnLineCombo","areaColumnCombo","customCombo"].includes(i);return!!(n(t)&&n(e))}recreatePanels(t,e){this.clearPanelComponents();let{chartType:n}=this;if(!n)return;let i=this.chartController.isCategorySeriesSwitched();this.getDataPanelDef().groups?.forEach(({type:r,isOpen:s})=>{r===(i?"series":"categories")?(this.categoriesDataPanel=this.createBean(new V5i(this.chartController,this.getCategoryGroupTitle(i),this.getCategoryGroupMultipleSelect(n,i),t,s)),this.panels.push(this.categoriesDataPanel)):r===(i?"categories":"series")?(this.seriesDataPanel=this.createBean(new H5i(this.chartController,this.chartMenuContext.chartOptionsService,this.getSeriesGroupTitle(i),this.getSeriesGroupMultipleSelect(n,i),this.getSeriesGroupMaxSelection(n,i),e,s)),this.panels.push(this.seriesDataPanel)):r==="seriesChartType"?this.chartController.isComboChart()&&(this.seriesChartTypePanel=this.createBean(new z5i(this.chartController,e,s)),this.panels.push(this.seriesChartTypePanel)):r==="chartSpecific"?(this.chartSpecificPanel=this.createBean(new B5i(this.chartMenuContext,s)),this.panels.push(this.chartSpecificPanel)):wt(`Invalid charts data panel group name supplied: '${r}'`)}),(i?this.categoriesDataPanel:this.seriesDataPanel)?.addItem(this.switchCategorySeriesToggle.getGui()),this.addPanelComponents()}addPanelComponents(){if(!this.panels.length)return;let e=this.gos.getDocument().createDocumentFragment();for(let n of this.panels)n.addCssClass("ag-chart-data-section"),e.appendChild(n.getGui());this.getGui().appendChild(e)}clearPanelComponents(){let t=this.getGui();this.panels.forEach(e=>{t.removeChild(e.getGui()),this.destroyBean(e)}),this.panels=[]}getDataPanelDef(){return this.gos.get("chartToolPanelsDef")?.dataPanel??G5i}getCategoryGroupTitle(t){return t?this.chartTranslationService.translate("seriesLabels"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"labels":"categories")}getCategoryGroupMultipleSelect(t,e){return e?!1:Nxe(t)!==1}getSeriesGroupTitle(t){return t?this.chartTranslationService.translate("categoryValues"):this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"xyValues":"series")}getSeriesGroupMultipleSelect(t,e){return this.getSeriesGroupMaxSelection(t,e)!==1}getSeriesGroupMaxSelection(t,e){if(!e)return cie(t)}createSwitchCategorySeriesToggle(){this.switchCategorySeriesToggle=this.createManagedBean(new qy({label:this.chartTranslationService.translate("switchCategorySeries"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex",value:this.chartController.isCategorySeriesSwitched(),onValueChange:t=>{this.restoreSwitchCategorySeriesToggleFocus=!0,this.chartController.switchCategorySeries(t)}}))}},U5i=class extends ZB{constructor(t){super(t,`<div class="ag-angle-select">
            <div data-ref="eLabel"></div>
            <div class="ag-wrapper ag-angle-select-wrapper">
                <div class="ag-angle-select-field">
                    <div data-ref="eParentCircle" class="ag-angle-select-parent-circle">
                        <div data-ref="eChildCircle" class="ag-angle-select-child-circle"></div>
                    </div>
                </div>
                <ag-input-number-field data-ref="eAngleValue"></ag-input-number-field>
            </div>
        </div>`,[bD]),this.eLabel=Bt,this.eParentCircle=Bt,this.eChildCircle=Bt,this.eAngleValue=Bt,this.radius=0,this.offsetX=0,this.offsetY=0}wireBeans(t){this.dragService=t.dragService}postConstruct(){super.postConstruct();let{value:t,onValueChange:e}=this.config;t!=null&&this.setValue(t,void 0,!0),e!=null&&this.onValueChange(e),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:()=>{this.parentCircleRect=this.eParentCircle.getBoundingClientRect()},onDragging:n=>this.calculateAngleDrag(n),onDragStop:()=>{}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(`${this.degrees}`).onValueChange(n=>{(n==null||n==="")&&(n="0"),n=this.eAngleValue.normalizeValue(n);let i=parseFloat(n);i>180&&(i=i-360),this.setValue(i)}),this.updateNumberInput(),Di(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListeners(this,{fieldValueChanged:()=>{this.eAngleValue.getInputElement().contains(this.gos.getActiveDomElement())||this.updateNumberInput()}})}updateNumberInput(){let t=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(t.toString())}positionChildCircle(t){let e=this.parentCircleRect||{width:24,height:24},n=this.eChildCircle,i=e.width/2,r=e.height/2;n.style.left=`${i+Math.cos(t)*8}px`,n.style.top=`${r+Math.sin(t)*8}px`}calculatePolar(){let t=this.offsetX,e=this.offsetY,n=Math.atan2(e,t);this.degrees=this.toDegrees(n),this.radius=Math.sqrt(t*t+e*e),this.positionChildCircle(n)}calculateCartesian(){let t=this.toRadians(this.getValue()),e=this.getRadius();this.setOffsetX(Math.cos(t)*e).setOffsetY(Math.sin(t)*e)}setOffsetX(t){return this.offsetX!==t&&(this.offsetX=t,this.calculatePolar()),this}setOffsetY(t){return this.offsetY!==t&&(this.offsetY=t,this.calculatePolar()),this}calculateAngleDrag(t){let e=this.parentCircleRect,n=e.width/2,i=e.height/2,r=t.clientX-e.left,s=t.clientY-e.top,o=r-n,a=s-i,l=Math.atan2(a,o);this.setValue(l,!0)}toDegrees(t){return t/Math.PI*180}toRadians(t){return t/180*Math.PI}normalizeNegativeValue(t){return t<0?360+t:t}normalizeAngle180(t){return t%=Math.PI*2,t<-Math.PI?t+=Math.PI*2:t>=Math.PI&&(t-=Math.PI*2),t}getRadius(){return this.radius}setRadius(t){return this.radius===t?this:(this.radius=t,this.calculateCartesian(),this)}onValueChange(t){return this.addManagedListeners(this,{fieldValueChanged:()=>{t(this.degrees)}}),this}getValue(t){return t?this.toRadians(this.degrees):this.degrees}setValue(t,e,n){let i;return e?i=t:i=this.normalizeAngle180(this.toRadians(t)),t=this.toDegrees(i),this.degrees!==t&&(this.degrees=Math.floor(t),this.calculateCartesian(),this.positionChildCircle(i),n||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}setWidth(t){return E4(this.getGui(),t),this}setDisabled(t){return super.setDisabled(t),this.eAngleValue.setDisabled(t),this}destroy(){this.dragService.removeDragSource(this.dragListener),super.destroy()}},$E=class extends ai{constructor(t){super(),this.params=t,this.fontGroup=Bt,this.activeComps=[],this.chartOptions=t.chartMenuParamsFactory.getChartOptions()}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let{cssIdentifier:t="charts-format-sub-level",name:e,enabled:n,onEnableChange:i,suppressEnabledCheckbox:r,chartMenuParamsFactory:s,keyMapper:o}=this.params,a={cssIdentifier:t,direction:"vertical",suppressOpenCloseIcons:!0,title:e,enabled:n,suppressEnabledCheckbox:!0,onEnableChange:l=>{i&&i(l)},useToggle:!r};this.setTemplate(`<div class="ag-font-panel">
        <ag-group-component data-ref="fontGroup">
            <ag-select data-ref="familySelect"></ag-select>
            <ag-select data-ref="weightStyleSelect"></ag-select>
            <div class="ag-charts-font-size-color">
                <ag-select data-ref="sizeSelect"></ag-select>
                <ag-color-picker data-ref="colorPicker"></ag-color-picker>
            </div>
        </ag-group-component>
    </div>`,[ah,hx,hC],{fontGroup:a,familySelect:this.getFamilySelectParams(),weightStyleSelect:this.getWeightStyleSelectParams(),sizeSelect:this.getSizeSelectParams(),colorPicker:s.getDefaultColorPickerParams(o("color"))}),this.addOrRemoveCssClass("ag-font-panel-no-header",!e)}addItem(t,e){e?this.fontGroup.prependItem(t):this.fontGroup.addItem(t),this.activeComps.push(t)}setEnabled(t){this.fontGroup.setEnabled(t)}getFamilySelectParams(){let t=["Arial, sans-serif","Aria Black, sans-serif","Book Antiqua,  serif","Charcoal, sans-serif","Comic Sans MS, cursive","Courier, monospace","Courier New, monospace","Gadget, sans-serif","Geneva, sans-serif","Helvetica, sans-serif","Impact, sans-serif","Lucida Console, monospace","Lucida Grande, sans-serif","Lucida Sans Unicode,  sans-serif","Monaco, monospace","Palatino Linotype, serif","Palatino, serif","Times New Roman, serif","Times, serif","Verdana, sans-serif"],e=this.getInitialFontValue("fontFamily"),n=t[0];if(e){let s=t.map(o=>o.toLowerCase()).indexOf(e.toLowerCase());if(s>=0)n=t[s];else{let o=QHe(e);t.push(o),n=o}}let i=t.sort().map(r=>({value:r,text:r}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("font",i,`${n}`,r=>this.setFont({fontFamily:r}))}getSizeSelectParams(){let t=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36],e=this.getInitialFontValue("fontSize");Sl(t,e)||t.push(e);let n=t.sort((i,r)=>i-r).map(i=>({value:`${i}`,text:`${i}`}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("size",n,`${e}`,i=>this.setFont({fontSize:parseInt(i,10)}))}getWeightStyleSelectParams(){let t=this.getInitialFontValue("fontWeight")??"normal",e=this.getInitialFontValue("fontStyle")??"normal",n=[{name:"normal",weight:"normal",style:"normal"},{name:"bold",weight:"bold",style:"normal"},{name:"italic",weight:"normal",style:"italic"},{name:"boldItalic",weight:"bold",style:"italic"}],i=n.find(s=>s.weight===t&&s.style===e);i||(i={name:"predefined",weight:t,style:e},n.unshift(i));let r=n.map(s=>({value:s.name,text:this.chartTranslationService.translate(s.name)}));return this.params.chartMenuParamsFactory.getDefaultSelectParamsWithoutValueParams("weight",r,i.name,s=>{let o=n.find(a=>a.name===s);this.setFont({fontWeight:o.weight,fontStyle:o.style})})}destroyActiveComps(){this.activeComps.forEach(t=>{dc(t.getGui()),this.destroyBean(t)})}destroy(){this.destroyActiveComps(),super.destroy()}setFont(t){let{keyMapper:e}=this.params;Object.entries(t).forEach(([n,i])=>{i&&this.chartOptions.setValue(e(n),i)})}getInitialFontValue(t){let{keyMapper:e}=this.params;return this.chartOptions.getValue(e(t))}},j5i=class extends ai{constructor(t){super(),this.chartMenuUtils=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let{chartMenuUtils:t}=this,e=t.addEnableParams("tick.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("ticks"),suppressEnabledCheckbox:!0,useToggle:!0}),n=t.getDefaultColorPickerParams("tick.stroke"),i=t.getDefaultSliderParams("tick.width","width",10),r=t.getDefaultSliderParams("tick.size","length",30);this.setTemplate(`<div>
            <ag-group-component data-ref="axisTicksGroup">
                <ag-color-picker data-ref="axisTicksColorPicker"></ag-color-picker>
                <ag-slider data-ref="axisTicksWidthSlider"></ag-slider>
                <ag-slider data-ref="axisTicksSizeSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,hC,N3],{axisTicksGroup:e,axisTicksColorPicker:n,axisTicksWidthSlider:i,axisTicksSizeSlider:r})}},$5i=class extends ai{constructor(t){super(),this.chartMenuUtils=t,this.chartOptions=t.getChartOptions()}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t=this.chartMenuUtils.addEnableParams("gridLine.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("gridLines"),suppressEnabledCheckbox:!0,useToggle:!0}),e=this.getGridLineColorPickerParams("color"),n=this.getGridLineWidthSliderParams("thickness"),i=this.getGridLineDashSliderParams("lineDash");this.setTemplate(`<div>
            <ag-group-component data-ref="gridLineGroup">
                <ag-color-picker data-ref="gridLineColorPicker"></ag-color-picker>
                <ag-slider data-ref="gridLineWidthSlider"></ag-slider>
                <ag-slider data-ref="gridLineLineDashSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,hC,N3],{gridLineGroup:t,gridLineColorPicker:e,gridLineWidthSlider:n,gridLineLineDashSlider:i})}getGridLineColorPickerParams(t){return this.chartMenuUtils.getDefaultColorPickerParams("gridLine.style",t,{formatInputValue:e=>e?.[0]?.stroke,parseInputValue:e=>{let n=this.chartOptions.getValue("gridLine.style")??[];return n.length===0?[{stroke:e,lineDash:[]}]:[St(ve({},n[0]),{stroke:e})]}})}getGridLineWidthSliderParams(t){return this.chartMenuUtils.getDefaultSliderParams("gridLine.width",t,10)}getGridLineDashSliderParams(t){let n=this.chartOptions.getValue("gridLine.style")?.[0]?.lineDash?.[0],i=this.chartMenuUtils.getDefaultSliderParamsWithoutValueParams(n??0,t,30);return i.onValueChange=r=>{let s=this.chartOptions.getValue("gridLine.style.0.stroke");this.chartOptions.setValue("gridLine.style",[{lineDash:[r],stroke:s}])},i}},K5i="%d %B %Y",eie=class extends ai{constructor(t,e){super(),this.axisType=t,this.options=e,this.axisGroup=Bt,this.axisTypeSelect=Bt,this.axisPositionSelect=Bt,this.axisTimeFormatSelect=Bt,this.activePanels=[],this.axisLabelUpdateFuncs=[];let{chartOptionsService:n,seriesType:i}=e;this.chartOptionsSeriesProxy=n.getSeriesOptionsProxy(()=>i)}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let{isExpandedOnInit:t,chartOptionsService:e,chartController:n,registerGroupComponent:i}=this.options,r=this.axisType,s={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate(r),expanded:t,suppressEnabledCheckbox:!0},o=e.getCartesianAxisOptionsProxy(this.axisType),a=this.createManagedBean(new jE(o)),l=this.createManagedBean(new jE(e.getCartesianAxisThemeOverridesProxy(this.axisType))),c=this.getAxisTypeSelectParams(a,e.getCartesianAxisAppliedThemeOverridesProxy(this.axisType)),d=this.getAxisPositionSelectParams(a),u=this.getAxisTimeFormatSelectParams(a),m=this.getAxisColorInputParams(l),f=this.getAxisLineWidthSliderParams(l);this.setTemplate(`<div>
            <ag-group-component data-ref="axisGroup">
                <ag-select data-ref="axisTypeSelect"></ag-select>
                <ag-select data-ref="axisTimeFormatSelect"></ag-select>
                <ag-select data-ref="axisPositionSelect"></ag-select>
                <ag-color-picker data-ref="axisColorInput"></ag-color-picker>
                <ag-slider data-ref="axisLineWidthSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,hx,hC,N3],{axisGroup:s,axisTypeSelect:c??void 0,axisPositionSelect:d??void 0,axisTimeFormatSelect:u??void 0,axisColorInput:m,axisLineWidthSlider:f}),i(this.axisGroup),this.axisTypeSelect.setDisplayed(!!c.options?.length),d||this.removeTemplateComponent(this.axisPositionSelect);let _=()=>{let D=o.getValue("type")==="time";Vn(this.axisTimeFormatSelect.getGui(),D)};u?(_(),this.addManagedEventListeners({chartOptionsChanged:()=>{_()}})):this.removeTemplateComponent(this.axisTimeFormatSelect),this.initGridLines(l),this.initAxisTicks(l),this.initAxisLabels(l);let x=()=>this.axisLabelUpdateFuncs.forEach(D=>D());this.addManagedListeners(n,{chartUpdated:x,chartModelUpdate:()=>setTimeout(()=>{this.refreshAxisTypeSelect(a),_()})})}getAxisTypeSelectParams(t,e){let n=t.getChartOptions(),i=this.getAxisTypeSelectOptions(),r=t.getDefaultSelectParams("type","axisType",i);return r.onValueChange=s=>{let o=n.getValue("type");if(s===o)return;let a=e.getValue("*"),l=o==="time",c=s==="time",d=l!==c?c?K5i:void 0:null;if(this.options.chartOptionsService.setCartesianCategoryAxisType(this.axisType,s),d!==null){let u=n.getValue("label")??{};n.setValue("label",St(ve({},u),{format:d}))}e.setValue("*",a)},r}refreshAxisTypeSelect(t){let e=this.getAxisTypeSelectOptions(),n=!!e.length;this.axisTypeSelect.setDisplayed(n),n&&this.axisTypeSelect.clearOptions().addOptions(e).setValue(t.getChartOptions().getValue("type"))}getAxisTypeSelectOptions(){let{chartController:t}=this.options,e=t.getChartType(),n=()=>{let i=t.getChartData()[0];return i?t.getSelectedDimensions().every(r=>!isNaN(parseFloat(i[r.colId]))):!1};return["heatmap","histogram","boxPlot","rangeBar","scatter","bubble"].includes(e)||t.isGrouping()||!this.isCategoryAxis()||t.isCategorySeriesSwitched()||!n()?[]:["category","number","time"].map(i=>({value:i,text:this.translate(i)}))}isCategoryAxis(){let t=this.chartOptionsSeriesProxy.getValue("direction")==="horizontal";return t&&this.axisType==="yAxis"||!t&&this.axisType==="xAxis"}getAxisPositionSelectParams(t){let e=((n,i)=>{switch(n){case"heatmap":return null;default:switch(i){case"xAxis":return[{value:"top",text:this.translate("top")},{value:"bottom",text:this.translate("bottom")}];case"yAxis":return[{value:"left",text:this.translate("left")},{value:"right",text:this.translate("right")}]}}})(this.options.chartController.getChartType(),this.axisType);return e?t.getDefaultSelectParams("position","position",e):null}getAxisTimeFormatSelectParams(t){if(!this.isCategoryAxis())return null;let e=[{value:"%d/%m/%Y",text:this.translate("timeFormatSlashesDDMMYYYY")},{value:"%m/%d/%Y",text:this.translate("timeFormatSlashesMMDDYYYY")},{value:"%d/%m/%y",text:this.translate("timeFormatSlashesDDMMYY")},{value:"%m/%d/%y",text:this.translate("timeFormatSlashesMMDDYY")},{value:"%d.%e.%y",text:this.translate("timeFormatDotsDDMYY")},{value:"%e.%d.%y",text:this.translate("timeFormatDotsMDDYY")},{value:"%Y-%m-%d",text:this.translate("timeFormatDashesYYYYMMDD")},{value:"%d %B %Y",text:this.translate("timeFormatSpacesDDMMMMYYYY")},{value:"%H:%M:%S",text:this.translate("timeFormatHHMMSS")},{value:"%I:%M:%S %p",text:this.translate("timeFormatHHMMSSAmPm")}];return t.getDefaultSelectParams("label.format","timeFormat",e)}getAxisColorInputParams(t){return t.getDefaultColorPickerParams("line.stroke")}getAxisLineWidthSliderParams(t){let e=t.getChartOptions(),n=()=>e.getValue("line.enabled")?e.getValue("line.width"):null,i=s=>{e.setValues([{expression:"line.enabled",value:s!=null},{expression:"line.width",value:s??0}])},r=t.getDefaultSliderParamsWithoutValueParams(n()??0,"thickness",10);return r.onValueChange=s=>{i(s===0?null:s)},r}initGridLines(t){if(this.options.chartController.getChartType()==="heatmap")return;let n=this.createBean(new $5i(t));this.axisGroup.addItem(n),this.activePanels.push(n)}initAxisTicks(t){if(!this.hasConfigurableAxisTicks())return;let e=this.createBean(new j5i(t));this.axisGroup.addItem(e),this.activePanels.push(e)}hasConfigurableAxisTicks(){switch(this.options.chartController.getChartType()){case"radarLine":case"radarArea":case"rangeBar":case"boxPlot":case"waterfall":return!1;default:return!0}}initAxisLabels(t){let e={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:t,keyMapper:i=>`label.${i}`},n=this.createBean(new $E(e));this.axisGroup.addItem(n),this.activePanels.push(n),this.addAdditionalLabelComps(n,t)}addAdditionalLabelComps(t,e){this.addLabelPadding(t,e);let n=this.createRotationWidget("labelRotation",e),i=this.initLabelRotation(n,e);t.addItem(i),t.addItem(n)}initLabelRotation(t,e){let n=e.getChartOptions(),i=()=>n.getValue("label.rotation"),r=()=>n.getValue("label.autoRotate"),s=c=>{c&&(this.prevRotation=i()),n.setValues([{expression:"label.autoRotate",value:c},{expression:"label.rotation",value:c?void 0:this.prevRotation}]),t.setDisplayed(!c)},a=typeof i()=="number"?!1:r(),l=this.createBean(new b5({label:this.translate("autoRotate"),value:a,onValueChange:s}));return t.setDisplayed(!a),l}createRotationWidget(t,e){let n=e.getChartOptions(),i=()=>n.getValue("label.rotation"),r=l=>n.setValue("label.rotation",l),o=`${this.chartTranslationService.translate(t)} \xB0`,a=new U5i({label:o,labelWidth:"flex",value:i()??0,onValueChange:r});return this.axisLabelUpdateFuncs.push(()=>{a.setValue(i()??0)}),this.createBean(a)}addLabelPadding(t,e){let n=this.createBean(new Y4(e.getDefaultSliderParams("label.padding","padding",30)));t.addItem(n)}translate(t){return this.chartTranslationService.translate(t)}removeTemplateComponent(t){dc(t.getGui()),this.destroyBean(t)}destroyActivePanels(){this.activePanels.forEach(t=>{dc(t.getGui()),this.destroyBean(t)})}destroy(){this.destroyActivePanels(),super.destroy()}},Y5i=class extends ai{constructor(t){super(),this.options=t,this.axisGroup=Bt}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let{isExpandedOnInit:t,chartAxisMenuParamsFactory:e,registerGroupComponent:n}=this.options,i={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("polarAxis"),expanded:t,suppressEnabledCheckbox:!0},r=e.getDefaultColorPickerParams("line.stroke"),s=e.getDefaultSliderParams("line.width","thickness",10);this.setTemplate(`<div>
            <ag-group-component data-ref="axisGroup">
                <ag-color-picker data-ref="axisColorInput"></ag-color-picker>
                <ag-slider data-ref="axisLineWidthSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,hC,N3],{axisGroup:i,axisColorInput:r,axisLineWidthSlider:s}),n(this.axisGroup),this.initAxis(),this.initAxisLabels(),this.initRadiusAxis()}initAxis(){let t=this.options.chartController.getChartType();if(["radarLine","radarArea"].includes(t)){let n=[{value:"circle",text:this.translate("circle")},{value:"polygon",text:this.translate("polygon")}];this.axisGroup.addItem(this.createSelect({labelKey:"shape",options:n,property:"shape"}))}t!=="pie"&&this.axisGroup.addItem(this.createSlider({labelKey:"innerRadius",defaultMaxValue:1,property:"innerRadiusRatio"}))}initAxisLabels(){let t={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:this.options.chartAxisMenuParamsFactory,keyMapper:i=>`label.${i}`},e=this.createManagedBean(new $E(t)),n=this.createOrientationWidget();e.addItem(n),this.axisGroup.addItem(e)}createOrientationWidget(){let t=[{value:"fixed",text:this.translate("fixed")},{value:"parallel",text:this.translate("parallel")},{value:"perpendicular",text:this.translate("perpendicular")}];return this.createSelect({labelKey:"orientation",options:t,property:"label.orientation"})}initRadiusAxis(){let t=oh(this.options.chartController.getChartType());if(!D_i(t))return;let e=[this.createSlider({labelKey:"groupPadding",defaultMaxValue:1,property:"paddingInner"}),this.createSlider({labelKey:"seriesPadding",defaultMaxValue:1,property:"groupPaddingInner"})],n=this.createManagedBean(new uC({cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,enabled:!0,suppressEnabledCheckbox:!0,title:this.translate("padding"),items:e})).hideEnabledCheckbox(!0).hideOpenCloseIcons(!0);this.axisGroup.addItem(n)}createSlider(t){let{labelKey:e,defaultMaxValue:n,step:i=.05,property:r}=t,s=this.options.chartAxisMenuParamsFactory.getDefaultSliderParams(r,e,n);return s.step=i,this.createManagedBean(new Y4(s))}createSelect(t){let{labelKey:e,options:n,property:i}=t;return this.createManagedBean(new np(this.options.chartAxisMenuParamsFactory.getDefaultSelectParams(i,e,n)))}translate(t){return this.chartTranslationService.translate(t)}},q5i=class extends ai{constructor(t){super(),this.chartMenuUtils=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t=this.chartMenuUtils.addEnableParams("background.visible",{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("background"),suppressEnabledCheckbox:!0,useToggle:!0}),e=this.chartMenuUtils.getDefaultColorPickerParams("background.fill");this.setTemplate(`<div>
            <ag-group-component data-ref="chartBackgroundGroup">
                <ag-color-picker data-ref="colorPicker"></ag-color-picker>
            </ag-group-component>
        <div>`,[ah,hC],{chartBackgroundGroup:t,colorPicker:e})}},Z5i=class extends ai{constructor(t,e){super(),this.chartMenuUtils=t,this.chartController=e,this.paddingTopSlider=Bt}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t={cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("padding"),suppressEnabledCheckbox:!0},e=n=>this.chartMenuUtils.getDefaultSliderParams("padding."+n,n,200);this.setTemplate(`<div>
            <ag-group-component data-ref="chartPaddingGroup">
                <ag-slider data-ref="paddingTopSlider"></ag-slider>
                <ag-slider data-ref="paddingRightSlider"></ag-slider>
                <ag-slider data-ref="paddingBottomSlider"></ag-slider>
                <ag-slider data-ref="paddingLeftSlider"></ag-slider>
            </ag-group-component>
        <div>`,[ah,N3],{chartPaddingGroup:t,paddingTopSlider:e("top"),paddingRightSlider:e("right"),paddingBottomSlider:e("bottom"),paddingLeftSlider:e("left")}),this.addManagedEventListeners({chartOptionsChanged:n=>{this.updateTopPadding(n.chartOptions)}})}updateTopPadding(t){let e=[...this.chartController.getChartSeriesTypes(),"common"].map(n=>t[n]?.padding?.top).find(n=>n!=null);e!=null&&this.paddingTopSlider.setValue(`${e}`)}},X5i=class extends ai{constructor(t){super(),this.options=t,this.chartGroup=Bt}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let{chartController:t,chartMenuParamsFactory:e,isExpandedOnInit:n,registerGroupComponent:i}=this.options,r={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chartStyle"),expanded:n,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new Z5i(e,t)),this.createManagedBean(new q5i(e))]};this.setTemplate(`<div>
            <ag-group-component data-ref="chartGroup"></ag-group-component>
        </div>`,[ah],{chartGroup:r}),i(this.chartGroup)}},Q5i=class extends Ot{constructor(t){super(),this.groupContainer=t,this.id=0,this.groupComponents=new Map}addGroupComponent(t){let e=this.id++;this.groupComponents.set(e,t),t.isExpanded()&&(this.expandedGroupComponent=e),t.onExpandedChange(n=>{if(n){let i=this.expandedGroupComponent;if(this.expandedGroupComponent=e,i!=null){let r=t.getGui(),s=r.offsetTop-this.groupContainer.parentElement.scrollTop;this.groupComponents.get(i)?.toggleGroupExpand(!1,!0);let o=r.offsetTop-s;o<0&&(o=0),o!==this.groupContainer.parentElement.scrollTop&&(this.groupContainer.parentElement.scrollTop=o)}}else this.expandedGroupComponent=void 0})}destroy(){this.groupComponents.clear(),super.destroy()}},J5i=class extends ai{constructor(t){super(),this.options=t,this.legendGroup=Bt,this.isGradient=["treemap","sunburst","heatmap"].includes(t.seriesType),this.key=this.isGradient?"gradientLegend":"legend"}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let{chartMenuParamsFactory:t,isExpandedOnInit:e,registerGroupComponent:n}=this.options,i=this.createManagedBean(new np(t.getDefaultSelectParams(`${this.key}.position`,"position",["top","right","bottom","left"].map(o=>({value:o,text:this.chartTranslationService.translate(o)}))))),r=this.createManagedBean(new uC(t.addEnableParams(`${this.key}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("legendEnabled"),suppressEnabledCheckbox:!0,useToggle:!0,items:[this.createLabelPanel(t),i,...this.getItems(t)]}))),s={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("legend"),suppressEnabledCheckbox:!0,expanded:e,items:[r]};this.setTemplate(`<div>
            <ag-group-component data-ref="legendGroup">
            </ag-group-component>
        </div>`,[ah],{legendGroup:s}),n(this.legendGroup)}getItems(t){let e=(n,i,r)=>this.createManagedBean(new Y4(t.getDefaultSliderParams(`${this.key}.${n}`,i,r)));return this.isGradient?[this.createManagedBean(new b5(t.addValueParams("gradientLegend.reverseOrder",{label:this.chartTranslationService.translate("reverseDirection"),labelWidth:"flex"}))),e("gradient.thickness","thickness",40),e("gradient.preferredLength","preferredLength",300),e("spacing","spacing",200)]:[e("spacing","spacing",200),e("item.marker.size","markerSize",40),e("item.marker.strokeWidth","markerStroke",10),e("item.marker.padding","itemSpacing",20),e("item.paddingX","layoutHorizontalSpacing",50),e("item.paddingY","layoutVerticalSpacing",50)]}createLabelPanel(t){let e=this.isGradient?"gradientLegend.scale.label":"legend.item.label",n={enabled:!0,suppressEnabledCheckbox:!0,chartMenuParamsFactory:t,keyMapper:i=>`${e}.${i}`,cssIdentifier:"charts-format-sub-level-no-header"};return this.createManagedBean(new $E(n))}},eCi=class extends ai{constructor(t){super(),this.chartMenuUtils=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("callout"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="calloutGroup">
                <ag-slider data-ref="calloutLengthSlider"></ag-slider>
                <ag-slider data-ref="calloutStrokeWidthSlider"></ag-slider>
                <ag-slider data-ref="labelOffsetSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,N3],{calloutGroup:t,calloutLengthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.length","length",40),calloutStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLine.strokeWidth","strokeWidth",10),labelOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("calloutLabel.offset","offset",30)})}},tCi=class extends ai{constructor(t){super(),this.chartMenuUtils=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("cap"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0},e=this.chartMenuUtils.getDefaultSliderParams("cap.lengthRatio","capLengthRatio",1);e.step=.05,this.setTemplate(`<div>
            <ag-group-component data-ref="capsGroup">
                <ag-slider data-ref="capLengthRatioSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,N3],{capsGroup:t,capLengthRatioSlider:e})}},iCi=class extends ai{constructor(t){super(),this.chartMenuUtils=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("connectorLine"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="lineGroup">
                <ag-color-picker data-ref="lineColorPicker"></ag-color-picker>
                <ag-slider data-ref="lineStrokeWidthSlider"></ag-slider>
                <ag-slider data-ref="lineOpacitySlider"></ag-slider>
                <ag-slider data-ref="lineDashSlider"></ag-slider>                
            </ag-group-component>
        </div>`,[ah,hC,N3],{lineGroup:t,lineColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("line.stroke"),lineStrokeWidthSlider:this.getSliderParams("strokeWidth",10,"line.strokeWidth"),lineDashSlider:this.getSliderParams("lineDash",30,"line.lineDash",1,!0),lineOpacitySlider:this.getSliderParams("strokeOpacity",1,"line.strokeOpacity",.05)})}getSliderParams(t,e,n,i=1,r=!1){let s=this.chartMenuUtils.getDefaultSliderParams(n,t,e,r);return s.step=i,s}};nCi=class extends ai{constructor(t){super(),this.chartMenuUtils=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t=this.chartMenuUtils.addEnableParams("marker.enabled",{cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("markers"),suppressEnabledCheckbox:!0,useToggle:!0,suppressOpenCloseIcons:!0});this.setTemplate(`<div>
            <ag-group-component data-ref="seriesMarkersGroup">
                <ag-select data-ref="seriesMarkerShapeSelect"></ag-select>
                <ag-slider data-ref="seriesMarkerSizeSlider"></ag-slider>
                <ag-slider data-ref="seriesMarkerStrokeWidthSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,hx,N3],{seriesMarkersGroup:t,seriesMarkerShapeSelect:this.chartMenuUtils.getDefaultSelectParams("marker.shape","shape",Rot(this.chartTranslationService)),seriesMarkerSizeSlider:this.chartMenuUtils.getDefaultSliderParams("marker.size","size",60),seriesMarkerStrokeWidthSlider:this.chartMenuUtils.getDefaultSliderParams("marker.strokeWidth","strokeWidth",10)})}},rCi=class extends ai{constructor(t){super(),this.chartMenuUtils=t,this.seriesItemsGroup=Bt,this.activePanels=[]}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("seriesItems"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="seriesItemsGroup">
                <ag-select data-ref="seriesItemSelect"></ag-select>
            </ag-group-component>
        </div>`,[ah,hx],{seriesItemsGroup:t,seriesItemSelect:this.getSeriesItemsParams()}),this.initSeriesControls()}getSeriesItemsParams(){let t=[{value:"positive",text:this.chartTranslationService.translate("seriesItemPositive")},{value:"negative",text:this.chartTranslationService.translate("seriesItemNegative")}],e=n=>{this.destroyActivePanels(),this.initSeriesControls(n)};return this.chartMenuUtils.getDefaultSelectParamsWithoutValueParams("seriesItemType",t,"positive",e)}initSeriesControls(t="positive"){this.initSlider("strokeWidth",10,`item.${t}.strokeWidth`),this.initSlider("lineDash",30,`item.${t}.lineDash`,1,!0),this.initSlider("strokeOpacity",1,`item.${t}.strokeOpacity`,.05,!1),this.initSlider("fillOpacity",1,`item.${t}.fillOpacity`,.05,!1),this.initItemLabels(t)}initSlider(t,e,n,i=1,r=!1){let s=this.chartMenuUtils.getDefaultSliderParams(n,t,e,r);s.step=i;let o=this.seriesItemsGroup.createManagedBean(new Y4(s));this.seriesItemsGroup.addItem(o),this.activePanels.push(o)}initItemLabels(t){let e=this.chartMenuUtils.getDefaultFontPanelParams(`item.${t}.label`,"seriesItemLabels"),n=this.createBean(new $E(e));this.seriesItemsGroup.addItem(n),this.activePanels.push(n)}destroyActivePanels(){this.activePanels.forEach(t=>{dc(t.getGui()),this.destroyBean(t)})}destroy(){this.destroyActivePanels(),super.destroy()}},sCi=class extends ai{constructor(t,e="shadow"){super(),this.chartMenuUtils=t,this.propertyKey=e}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t=this.propertyKey,e=this.chartMenuUtils.addEnableParams(`${t}.enabled`,{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0,title:this.chartTranslationService.translate("shadow"),suppressEnabledCheckbox:!0,useToggle:!0}),n=this.chartMenuUtils.getDefaultColorPickerParams(`${t}.color`);this.setTemplate(`<div>
            <ag-group-component data-ref="shadowGroup">
                <ag-color-picker data-ref="shadowColorPicker"></ag-color-picker>
                <ag-slider data-ref="shadowBlurSlider"></ag-slider>
                <ag-slider data-ref="shadowXOffsetSlider"></ag-slider>
                <ag-slider data-ref="shadowYOffsetSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,hC,N3],{shadowGroup:e,shadowColorPicker:n,shadowBlurSlider:this.getSliderParams("blur",0,20),shadowXOffsetSlider:this.getSliderParams("xOffset",-10,10),shadowYOffsetSlider:this.getSliderParams("yOffset",-10,10)})}getSliderParams(t,e,n){let i=`${this.propertyKey}.${t}`,r=this.chartMenuUtils.getDefaultSliderParams(i,t,n);return r.minValue=e,r}},oCi=class extends ai{constructor(t){super(),this.chartMenuUtils=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t={cssIdentifier:"charts-format-sub-level",direction:"vertical",enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="groupSpacing">
                <ag-slider data-ref="groupPaddingSlider"></ag-slider>
                <ag-slider data-ref="groupSpacingSlider"></ag-slider>
            </ag-group-component>
            <ag-group-component data-ref="tileSpacing">
                <ag-slider data-ref="tilePaddingSlider"></ag-slider>
                <ag-slider data-ref="tileSpacingSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,N3],{groupSpacing:St(ve({},t),{title:this.chartTranslationService.translate("group")}),tileSpacing:St(ve({},t),{title:this.chartTranslationService.translate("tile")}),groupPaddingSlider:this.getSliderParams("padding","group.padding"),groupSpacingSlider:this.getSliderParams("spacing","group.gap"),tilePaddingSlider:this.getSliderParams("padding","tile.padding"),tileSpacingSlider:this.getSliderParams("spacing","tile.gap")})}getSliderParams(t,e){return this.chartMenuUtils.getDefaultSliderParams(e,t,10)}},aCi=class extends ai{constructor(t){super(),this.chartMenuUtils=t}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let t={cssIdentifier:"charts-format-sub-level",direction:"vertical",title:this.chartTranslationService.translate("whisker"),enabled:!0,suppressOpenCloseIcons:!0,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="whiskersGroup">
                <ag-color-picker data-ref="whiskerColorPicker"></ag-color-picker>
                <ag-slider data-ref="whiskerThicknessSlider"></ag-slider>
                <ag-slider data-ref="whiskerOpacitySlider"></ag-slider>
                <ag-slider data-ref="whiskerLineDashSlider"></ag-slider>
                <ag-slider data-ref="whiskerLineDashOffsetSlider"></ag-slider>
            </ag-group-component>
        </div>`,[ah,hC,N3],{whiskersGroup:t,whiskerColorPicker:this.chartMenuUtils.getDefaultColorPickerParams("whisker.stroke"),whiskerThicknessSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeWidth","strokeWidth",10),whiskerOpacitySlider:this.chartMenuUtils.getDefaultSliderParams("whisker.strokeOpacity","strokeOpacity",1),whiskerLineDashSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDash","lineDash",30,!0),whiskerLineDashOffsetSlider:this.chartMenuUtils.getDefaultSliderParams("whisker.lineDashOffset","lineDashOffset",30)})}},Om="tooltips",F3="strokeWidth",$4="lineDash",T2="lineOpacity",K4="fillOpacity",H0="labels",BE="shadow",lCi=class extends ai{constructor(t){super(),this.options=t,this.seriesGroup=Bt,this.activePanels=[],this.widgetFuncs={lineWidth:()=>this.initStrokeWidth("lineWidth"),[F3]:()=>this.initStrokeWidth("strokeWidth"),lineColor:()=>this.initLineColor(),[$4]:()=>this.initLineDash(),[T2]:()=>this.initOpacity("strokeOpacity"),[K4]:()=>this.initOpacity("fillOpacity"),markers:()=>new nCi(this.chartMenuUtils),[H0]:()=>this.initLabels(),sectorLabels:()=>this.initSectorLabels(),[BE]:()=>new sCi(this.chartMenuUtils),[Om]:()=>this.initTooltips(),bins:()=>this.initBins(),whiskers:()=>new aCi(this.chartMenuUtils),caps:()=>new tCi(this.chartMenuUtils),connectorLine:()=>new iCi(this.chartMenuUtils),seriesItems:()=>new rCi(this.chartMenuUtils),tileSpacing:()=>new oCi(this.chartMenuUtils),shape:()=>this.initShape(),size:()=>this.initSize("size","size"),minSize:()=>this.initSize("size","minSize"),maxSize:()=>this.initSize("maxSize","maxSize")},this.seriesWidgetMappings={bar:[Om,F3,$4,T2,K4,H0,BE],pie:[Om,F3,T2,K4,H0,"sectorLabels",BE],donut:[Om,F3,T2,K4,H0,"sectorLabels",BE],line:[Om,"lineWidth",$4,T2,"markers",H0],scatter:[Om,"shape","size",F3,H0],bubble:[Om,"shape","minSize","maxSize",F3,H0],area:[Om,"lineWidth",$4,T2,K4,"markers",H0,BE],histogram:[Om,"bins",F3,$4,T2,K4,H0,BE],"radial-column":[Om,F3,$4,T2,K4,H0],"radial-bar":[Om,F3,$4,T2,K4,H0],"radar-line":[Om,F3,$4,T2,"markers",H0],"radar-area":[Om,F3,$4,T2,K4,"markers",H0],nightingale:[Om,F3,$4,T2,K4,H0],"box-plot":[Om,F3,$4,T2,K4,"whiskers","caps"],"range-bar":[Om,F3,$4,T2,K4,H0],"range-area":[Om,"lineWidth",$4,T2,K4,"markers",H0,BE],treemap:[Om,"tileSpacing"],sunburst:[Om],heatmap:[Om,H0,"lineColor","lineWidth",T2],waterfall:[Om,"connectorLine","seriesItems"]},this.seriesType=t.seriesType}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let{isExpandedOnInit:t,chartOptionsService:e,chartController:n,registerGroupComponent:i}=this.options,r={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.translate("series"),expanded:t,suppressEnabledCheckbox:!0};this.setTemplate(`<div>
            <ag-group-component data-ref="seriesGroup">
            </ag-group-component>
        </div>`,[ah],{seriesGroup:r}),i(this.seriesGroup),this.chartMenuUtils=this.createManagedBean(new jE(e.getSeriesOptionsProxy(()=>this.seriesType))),this.addManagedListeners(n,{chartSeriesChartTypeChanged:this.refreshWidgets.bind(this)}),this.refreshWidgets()}refreshWidgets(){let{chartController:t}=this.options;this.destroyActivePanels(),t.getChartProxy().getChart().waitForUpdate().then(()=>{this.isAlive()&&(t.isComboChart()&&(this.updateSeriesType(),this.initSeriesSelect()),(this.seriesWidgetMappings[this.seriesType]??[]).forEach(i=>{let r=this.widgetFuncs[i](),s;if(Array.isArray(r)){let o=this.createBean(r[0]);s=o,r[1](o)}else s=this.createBean(r);this.seriesGroup.addItem(s),this.activePanels.push(s)}))}).catch(n=>Do("chart rendering failed",n))}initSeriesSelect(){let t=this.createBean(new np(this.chartMenuUtils.getDefaultSelectParamsWithoutValueParams("seriesType",this.getSeriesSelectOptions(),`${this.seriesType}`,e=>{this.seriesType=e,this.refreshWidgets()})));this.seriesGroup.addItem(t),this.activePanels.push(t)}initTooltips(){return new qy(this.chartMenuUtils.addValueParams("tooltip.enabled",{label:this.translate("tooltips"),labelAlignment:"left",labelWidth:"flex",inputWidth:"flex"}))}initLineColor(){return new Cot(this.chartMenuUtils.getDefaultColorPickerParams("stroke","strokeColor"))}initStrokeWidth(t){return new Y4(this.chartMenuUtils.getDefaultSliderParams("strokeWidth",t,10))}initLineDash(){return new Y4(this.chartMenuUtils.getDefaultSliderParams("lineDash","lineDash",30,!0))}initOpacity(t){let e=this.chartMenuUtils.getDefaultSliderParams(t,t,1);return e.step=.05,new Y4(e)}initLabels(){let t=vot(this.seriesType),e=t?"calloutLabel":"label",n=t?"calloutLabels":"labels",i=this.chartMenuUtils.getDefaultFontPanelParams(e,n);return[new $E(i),o=>{if(t){let a=o.createManagedBean(new eCi(this.chartMenuUtils));o.addItem(a),this.activePanels.push(a)}if(this.seriesType==="range-bar"){let a=[{value:"inside",text:this.translate("inside")},{value:"outside",text:this.translate("outside")}],l=o.createManagedBean(new np(this.chartMenuUtils.getDefaultSelectParams("label.placement","labelPlacement",a)));o.addItem(l),this.activePanels.push(l);let c=o.createManagedBean(new Y4(this.chartMenuUtils.getDefaultSliderParams("label.padding","padding",200)));o.addItem(c),this.activePanels.push(c)}}]}initSectorLabels(){let t=this.chartMenuUtils.getDefaultFontPanelParams("sectorLabel","sectorLabels");return[new $E(t),i=>{let r=this.chartMenuUtils.getDefaultSliderParams("sectorLabel.positionRatio","positionRatio",1);r.step=.05;let s=i.createManagedBean(new Y4(r));i.addItem(s)}]}initBins(){let t=this.chartMenuUtils.getDefaultSliderParams("binCount","histogramBinCount",20),e=this.chartMenuUtils.getChartOptions(),n=(e.getValue("bins")??e.getValue("calculatedBins",!0)).length;return t.value=`${n}`,t.maxValue=Math.max(n,20),new Y4(t)}initShape(){return new np(this.chartMenuUtils.getDefaultSelectParams("shape","shape",Rot(this.chartTranslationService)))}initSize(t,e){return new Y4(this.chartMenuUtils.getDefaultSliderParams(t,e,60))}getSeriesSelectOptions(){let t=this.getActiveSeriesTypes();return["area","bar","line"].filter(e=>t.includes(e)).map(e=>({value:e,text:this.translate(e)}))}updateSeriesType(){let t=this.getActiveSeriesTypes();!t.includes(this.seriesType)&&t.length>0&&(this.seriesType=t[0])}getActiveSeriesTypes(){return this.options.chartController.getActiveSeriesChartTypes().map(t=>oh(t.chartType))}translate(t){return this.chartTranslationService.translate(t)}destroyActivePanels(){this.activePanels.forEach(t=>{dc(t.getGui()),this.destroyBean(t)})}destroy(){this.destroyActivePanels(),super.destroy()}},nW=class extends ai{constructor(t,e,n){super("<div></div>"),this.chartMenuUtils=t,this.name=e,this.key=n,this.chartOptions=t.getChartOptions()}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){this.initFontPanel()}hasTitle(){let t=this.chartOptions.getValue(this.key);return t&&t.enabled&&t.text&&t.text.length>0}initFontPanel(){let t=this.hasTitle(),e={name:this.chartTranslationService.translate(this.name),enabled:t,suppressEnabledCheckbox:!1,chartMenuParamsFactory:this.chartMenuUtils,keyMapper:n=>`${this.key}.${n}`,onEnableChange:n=>this.onEnableChange(n)};this.fontPanel=this.createManagedBean(new $E(e)),this.fontPanel.addItem(this.createBean(new yg(this.getTextInputParams())),!0),this.fontPanel.addItem(this.createBean(new Y4(this.getSpacingSliderParams()))),this.getGui().appendChild(this.fontPanel.getGui())}getTextInputParams(){return this.chartMenuUtils.addValueParams(`${this.key}.text`,{label:this.chartTranslationService.translate("title"),labelAlignment:"top"})}getSpacingSliderParams(){return this.chartMenuUtils.getDefaultSliderParams(`${this.key}.spacing`,"spacing",100)}onEnableChange(t){this.chartOptions.setValue(`${this.key}.enabled`,t)}},cCi=class extends nW{wireBeans(t){super.wireBeans(t),this.chartMenuService=t.chartMenuService}postConstruct(){this.titlePlaceholder=this.chartTranslationService.translate("titlePlaceholder"),super.postConstruct(),this.addManagedEventListeners({chartTitleEdit:()=>{this.fontPanel.setEnabled(this.hasTitle())}})}getTextInputParams(){let t=super.getTextInputParams();return this.shouldOverrideTextWithPlaceholder(t.value)&&(t.value=this.titlePlaceholder),t}getSpacingSliderParams(){let t=super.getSpacingSliderParams();return t.value="10",t}onEnableChange(t){if(this.chartMenuService.doesChartToolbarExist()){let n=this.chartOptions.getValue("padding.top");this.chartOptions.setValue("padding.top",t?n-20:n+20)}this.chartOptions.setValue(`${this.key}.enabled`,t);let e=this.chartOptions.getValue(`${this.key}.text`);t&&this.shouldOverrideTextWithPlaceholder(e)&&this.chartOptions.setValue(`${this.key}.text`,this.titlePlaceholder)}shouldOverrideTextWithPlaceholder(t){return t==="Title"||t?.trim().length===0}},dCi=class extends ai{constructor(t){super(),this.options=t,this.titleGroup=Bt}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){let{chartMenuParamsFactory:t,chartAxisMenuParamsFactory:e,chartOptionsService:n,seriesType:i,isExpandedOnInit:r=!1,registerGroupComponent:s}=this.options,o=[];if(Nw(i)){let l=c=>this.createManagedBean(new jE(n.getCartesianAxisThemeOverridesProxy(c)));o.push(this.createManagedBean(new nW(l("xAxis"),"horizontalAxisTitle","title"))),o.push(this.createManagedBean(new nW(l("yAxis"),"verticalAxisTitle","title")))}else Oxe(i)&&o.push(this.createManagedBean(new nW(e,"polarAxisTitle","title")));let a={cssIdentifier:"charts-format-top-level",direction:"vertical",title:this.chartTranslationService.translate("chartTitles"),expanded:r,suppressEnabledCheckbox:!0,items:[this.createManagedBean(new cCi(t,"chartTitle","title")),this.createManagedBean(new nW(t,"chartSubtitle","subtitle")),...o]};this.setTemplate(`<div>
            <ag-group-component data-ref="titleGroup"></ag-group-component>
        </div>`,[ah],{titleGroup:a}),s(this.titleGroup)}},uCi={groups:[{type:"chart"},{type:"titles"},{type:"legend"},{type:"series"},{type:"axis"}]},hCi=class extends ai{constructor(t){super('<div class="ag-chart-format-wrapper"></div>'),this.chartMenuContext=t}postConstruct(){this.groupExpansionFeature=this.createManagedBean(new Q5i(this.getGui())),this.chartPanelFeature=this.createManagedBean(new _ot(this.chartMenuContext.chartController,this.getGui(),"ag-chart-format-section",(t,e)=>this.createPanels(e))),this.chartPanelFeature.refreshPanels()}createPanels(t){let e=!1;this.getFormatPanelDef().groups?.forEach(({type:n,isOpen:i=!1})=>{if(!this.isGroupPanelShownInSeries(n,t))return;i&&(e&&wt(`As of v32, only one charts customize panel group can be expanded at a time. '${n}' will not be expanded.`),e=!0);let r=o=>this.groupExpansionFeature.addGroupComponent(o),s=St(ve({},this.chartMenuContext),{isExpandedOnInit:i,seriesType:t,registerGroupComponent:r});switch(n){case"chart":this.chartPanelFeature.addComponent(new X5i(s));break;case"titles":this.chartPanelFeature.addComponent(new dCi(s));break;case"legend":this.chartPanelFeature.addComponent(new J5i(s));break;case"axis":Oxe(t)?this.chartPanelFeature.addComponent(new Y5i(s)):Nw(t)&&(this.chartPanelFeature.addComponent(new eie("xAxis",s)),this.chartPanelFeature.addComponent(new eie("yAxis",s)));break;case"horizontalAxis":this.chartPanelFeature.addComponent(new eie("xAxis",s));break;case"verticalAxis":this.chartPanelFeature.addComponent(new eie("yAxis",s));break;case"series":this.chartPanelFeature.addComponent(new lCi(s));break;case"navigator":wt("'navigator' is now displayed in the charts advanced settings instead of the customize panel, and this setting will be ignored.");break;default:wt(`Invalid charts customize panel group name supplied: '${n}'`)}})}getFormatPanelDef(){let t=this.gos.get("chartToolPanelsDef")?.formatPanel;return t||uCi}isGroupPanelShownInSeries(t,e){return["chart","titles","legend","series"].includes(t)||Nw(e)&&["axis","horizontalAxis","verticalAxis"].includes(t)||Oxe(e)&&t==="axis"}};pCi="ag-chart-mini-thumbnail-canvas",mCi="AG Grid - chart update failed",JR=class extends ai{constructor(t,e){super(),this.tooltipName=e,this.size=58,this.padding=5,this.root=new Wi.Group;let n=new Wi.Scene({width:this.size,height:this.size,domManager:{addChild(i,r,s){let o=s??t.ownerDocument.createElement(i);return t.appendChild(o),o}}});n.canvas.element.classList.add(pCi),n.setRoot(this.root),this.scene=n}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){this.scene.canvas.element.title=this.chartTranslationService.translate(this.tooltipName),this.scene.render().catch(t=>{Do(`${mCi}`,t)})}},M2=class extends JR{constructor(t,e){super(t,e),this.stroke="gray",this.axisOvershoot=3}postConstruct(){let t=this.size,e=this.padding,n=new Wi.Line;n.x1=e,n.y1=e,n.x2=e,n.y2=t-e+this.axisOvershoot,n.stroke=this.stroke;let i=new Wi.Line;i.x1=e-this.axisOvershoot+1,i.y1=t-e,i.x2=t-e+1,i.y2=t-e,i.stroke=this.stroke;let r=this.root;r.append(n),r.append(i),super.postConstruct()}},fCi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"groupedColumnTooltip"),this.columnData=[2,3,4];let{root:r,columnData:s,size:o,padding:a}=this;this.columns=pW({stacked:!1,root:r,data:s,size:o,padding:a,xScaleDomain:[0,1,2],yScaleDomain:[0,4],xScalePadding:.3}),r.append(this.columns),this.updateColors(n,i)}updateColors(e,n){this.columns.forEach((i,r)=>{i.fill=e[r],i.stroke=n[r]})}};return t.chartType="groupedColumn",t})(),gCi=(()=>{let t=class Lot extends M2{constructor(n,i,r,s,o,a=Lot.data,l=[0,16],c="stackedColumnTooltip"){super(n,c);let{root:d,size:u,padding:m}=this;this.stackedColumns=pW({stacked:!0,root:d,data:a,size:u,padding:m,xScaleDomain:[0,1,2],yScaleDomain:l,xScalePadding:.3}),d.append([].concat.apply([],this.stackedColumns)),this.updateColors(i,r)}updateColors(n,i){this.stackedColumns.forEach((r,s)=>r.forEach(o=>{o.fill=n[s],o.stroke=i[s]}))}};return t.chartType="stackedColumn",t.data=[[8,12,16],[6,9,12],[2,3,4]],t})(),Oot=gCi,vCi=(()=>{let t=class Not extends Oot{constructor(n,i,r,s,o){super(n,i,r,s,o,Not.data,[0,10],"normalizedColumnTooltip")}};return t.chartType="normalizedColumn",t.data=[[10,10,10],[6,7,8],[2,4,6]],t})(),yCi=vCi,_Ci=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"groupedBarTooltip");let r=this.padding,s=this.size,o=[2,3,4],a=new Wi.BandScale;a.domain=[0,1,2],a.range=[r,s-r],a.paddingInner=.3,a.paddingOuter=.3;let l=new Wi.LinearScale;l.domain=[0,4],l.range=[s-r,r];let c=l.convert(0),d=a.bandwidth;this.bars=o.map((u,m)=>{let f=new Wi.Rect;return f.x=r,f.y=a.convert(m),f.width=c-l.convert(u),f.height=d,f.strokeWidth=0,f.crisp=!0,f}),this.updateColors(n,i),this.root.append(this.bars)}updateColors(e,n){this.bars.forEach((i,r)=>{i.fill=e[r],i.stroke=n[r]})}};return t.chartType="groupedBar",t})(),CCi=(()=>{let t=class Vot extends M2{constructor(n,i,r,s,o,a=Vot.data,l=[0,16],c="stackedBarTooltip"){super(n,c);let d=this.size,u=this.padding,m=new Wi.BandScale;m.domain=[0,1,2],m.range=[u,d-u],m.paddingInner=.3,m.paddingOuter=.3;let f=new Wi.LinearScale;f.domain=l,f.range=[d-u,u];let _=f.convert(0),x=m.bandwidth;this.bars=a.map(D=>D.map((E,M)=>{let I=new Wi.Rect;return I.x=u,I.y=m.convert(M),I.width=_-f.convert(E),I.height=x,I.strokeWidth=0,I.crisp=!0,I})),this.updateColors(i,r),this.root.append([].concat.apply([],this.bars))}updateColors(n,i){this.bars.forEach((r,s)=>r.forEach(o=>{o.fill=n[s],o.stroke=i[s]}))}};return t.chartType="stackedBar",t.data=[[8,12,16],[6,9,12],[2,3,4]],t})(),Bot=CCi,xCi=(()=>{let t=class zot extends Bot{constructor(n,i,r,s,o){super(n,i,r,s,o,zot.data,[0,10],"normalizedBarTooltip")}};return t.chartType="normalizedBar",t.data=[[10,10,10],[6,7,8],[2,4,6]],t})(),bCi=xCi,N6=Wi.toRadians,zxe=(()=>{let t=class extends JR{constructor(e,n,i,r,s,o=.6,a="donutTooltip"){super(e,a);let l=(this.size-this.padding*2)/2,c=l+this.padding,d=[[N6(-90),N6(30)],[N6(30),N6(120)],[N6(120),N6(180)],[N6(180),N6(210)],[N6(210),N6(240)],[N6(240),N6(270)]];this.sectors=d.map(([u,m])=>{let f=new Wi.Sector;return f.centerX=c,f.centerY=c,f.innerRadius=l*o,f.outerRadius=l,f.startAngle=u,f.endAngle=m,f.stroke=void 0,f.strokeWidth=0,f.inset=.75,f}),this.updateColors(n,i),this.root.append(this.sectors)}updateColors(e,n){this.sectors.forEach((i,r)=>{i.fill=e[r%e.length],i.stroke=n[r%n.length]})}};return t.chartType="donut",t})(),wCi=(()=>{let t=class extends zxe{constructor(e,n,i,r,s){super(e,n,i,r,s,0,"pieTooltip")}};return t.chartType="pie",t})(),SCi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"lineTooltip"),this.data=[[9,7,8,5,6],[5,6,3,4,1],[1,3,4,8,7]],this.lines=pbe(this.root,this.data,this.size,this.padding),this.updateColors(n,i)}updateColors(e,n){this.lines.forEach((i,r)=>{i.stroke=e[r]})}};return t.chartType="line",t})(),TCi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"scatterTooltip");let r=this.size,s=this.padding,o=[[[.3,3],[1.1,.9],[2,.4],[3.4,2.4]],[[0,.3],[1,2],[2.4,1.4],[3,0]]],a=new Wi.LinearScale;a.domain=[-.5,4],a.range=[s*2,r-s];let l=new Wi.LinearScale;l.domain=[-.5,3.5],l.range=[r-s,s];let c=[];o.forEach(u=>{u.forEach(([m,f])=>{let _=new Wi.Arc;_.strokeWidth=0,_.centerX=a.convert(m),_.centerY=l.convert(f),_.radius=2.5,c.push(_)})}),this.points=c,this.updateColors(n,i);let d=new Wi.Group;d.setClipRectInGroupCoordinateSpace(new Wi.BBox(s,s,r-s*2,r-s*2)),d.append(this.points),this.root.append(d)}updateColors(e,n){this.points.forEach((i,r)=>{i.stroke=n[r%n.length],i.fill=e[r%e.length]})}};return t.chartType="scatter",t})(),DCi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"bubbleTooltip");let r=this.size,s=this.padding,o=[[[.1,.3,5],[.5,.4,7],[.2,.8,7]],[[.8,.7,5],[.7,.3,9]]],a=new Wi.LinearScale;a.domain=[0,1],a.range=[s*2,r-s];let l=new Wi.LinearScale;l.domain=[0,1],l.range=[r-s,s];let c=[];o.forEach(u=>{u.forEach(([m,f,_])=>{let x=new Wi.Arc;x.strokeWidth=0,x.centerX=a.convert(m),x.centerY=l.convert(f),x.radius=_,x.fillOpacity=.7,c.push(x)})}),this.points=c,this.updateColors(n,i);let d=new Wi.Group;d.setClipRectInGroupCoordinateSpace(new Wi.BBox(s,s,r-s*2,r-s*2)),d.append(this.points),this.root.append(d)}updateColors(e,n){this.points.forEach((i,r)=>{i.stroke=n[r%n.length],i.fill=e[r%e.length]})}};return t.chartType="bubble",t})(),ECi=(()=>{let t=class Hot extends M2{constructor(n,i,r,s,o,a=Hot.data){super(n,"groupedAreaTooltip");let l=this.size,c=this.padding,d=new Wi.BandScale;d.domain=[0,1,2],d.paddingInner=1,d.paddingOuter=0,d.range=[c+.5,l-c-.5];let u=new Wi.LinearScale;u.domain=[0,6],u.range=[l-c+.5,c];let f=a.length*2-1,_=[],x=u.convert(0);a.forEach((D,E)=>{let M=d.convert(E);D.forEach((I,z)=>{let G=u.convert(I),A=_[z]||(_[z]=[]);A[E]={x:M,y:G},A[f-E]={x:M,y:x}})}),this.areas=_.reverse().map(D=>{let E=new Wi.Path;E.strokeWidth=1,E.strokeOpacity=.75,E.fillOpacity=.7;let M=E.path;return M.clear(),D.forEach((I,z)=>M[z>0?"lineTo":"moveTo"](I.x,I.y)),M.closePath(),E}),this.updateColors(i,r),this.root.append(this.areas)}updateColors(n,i){this.areas.forEach((r,s)=>{r.fill=n[s],r.stroke=i[s]})}};return t.chartType="area",t.data=[[1,3,5],[2,6,4],[5,3,1]],t})(),MCi=ECi,kCi=(()=>{let t=class Got extends M2{constructor(n,i,r,s,o,a=Got.data,l="stackedAreaTooltip"){super(n,l);let c=this.size,d=this.padding,u=new Wi.BandScale;u.domain=[0,1,2],u.paddingInner=1,u.paddingOuter=0,u.range=[d+.5,c-d-.5];let m=new Wi.LinearScale;m.domain=[0,16],m.range=[c-d+.5,d+.5];let _=a.length*2-1,x=[];a.forEach((D,E)=>{let M=u.convert(E),I=0;D.forEach((z,G)=>{let A=m.convert(I+z),Y=x[G]||(x[G]=[]);Y[E]={x:M,y:A},Y[_-E]={x:M,y:m.convert(I)},I+=z})}),this.areas=x.map(D=>{let E=new Wi.Path;E.strokeWidth=0;let M=E.path;return M.clear(),D.forEach((I,z)=>M[z>0?"lineTo":"moveTo"](I.x,I.y)),M.closePath(),E}),this.updateColors(i,r),this.root.append(this.areas)}updateColors(n,i){this.areas.forEach((r,s)=>{r.fill=n[s],r.stroke=i[s]})}};return t.chartType="stackedArea",t.data=[[2,3,2],[3,6,5],[6,2,2]],t})(),mbe=kCi,fbe=class Wot extends mbe{constructor(e,n,i,r,s,o=Wot.data){super(e,n,i,r,s,o,"normalizedAreaTooltip")}};fbe.chartType="normalizedArea";fbe.data=mbe.data.map(t=>{let e=t.reduce((n,i)=>n+i,0);return t.map(n=>n/e*16)});ICi=fbe,ACi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"histogramTooltip");let r=this.padding,s=this.size,o=[2,5,11,13,10,6,1],a=new Wi.LinearScale;a.domain=[0,o.length],a.range=[r,s-r];let l=new Wi.LinearScale;l.domain=[0,o.reduce((d,u)=>Math.max(d,u),0)],l.range=[s-r,r];let c=l.convert(0);this.bars=o.map((d,u)=>{let m=l.convert(d),f=a.convert(u),_=a.convert(u+1),x=new Wi.Rect;return x.x=f,x.y=m,x.width=_-f,x.height=c-m,x.strokeWidth=1,x.strokeOpacity=.75,x.crisp=!0,x}),this.updateColors(n,i),this.root.append(this.bars)}updateColors([e],[n]){this.bars.forEach(i=>{i.fill=e,i.stroke=n})}};return t.chartType="histogram",t})(),eF=class extends JR{constructor(t,e){super(t,e),this.stroke="gray",this.showRadiusAxisLine=!0,this.showAngleAxisLines=!0}postConstruct(){let t=this.size,e=this.padding,n=e*2,i=(t-n)/2,r=this.showAngleAxisLines?[i,i*.8,i*.6,i*.4]:[],s=new Wi.Line;s.x1=t/2,s.y1=e,s.x2=t/2,s.y2=t-e-i-r[r.length-1],s.stroke=this.stroke,s.strokeOpacity=.5,s.fill=void 0,s.visible=this.showRadiusAxisLine;let o=e+i;this.gridLines=r.map((l,c)=>{let d=new Wi.Path;return d.path.arc(o,o,l,0,2*Math.PI),d.strokeWidth=1,d.stroke=this.stroke,d.strokeOpacity=c===0?.5:.2,d.fill=void 0,d});let a=this.root;a.append(s),this.gridLines.length>0&&a.append(this.gridLines),super.postConstruct()}},PCi=(()=>{let t=class extends eF{constructor(e,n,i){super(e,"radialColumnTooltip"),this.data=[[6,8,10,2,6,5],[4,4,3,6,4,4],[5,4,2,9,8,9]],this.showRadiusAxisLine=!1;let{padding:r,size:s,data:o}=this,a=(s-r*2)/2,c=a*.4,d=new Wi.BandScale;d.domain=o[0].map((D,E)=>E),d.range=[0,2*Math.PI],d.paddingInner=0,d.paddingOuter=0;let u=d.bandwidth*.7,{processedData:m,max:f}=xie(o),_=new Wi.LinearScale;_.domain=[0,f],_.range=[c,a];let x=this.size/2;this.series=m.map((D,E)=>{let I=E===0?void 0:m[E-1],z=new Wi.Group({zIndex:1e6}),G=D.map((A,Y)=>{let X=I?.[Y],ne=_.convert(A),pe=_.convert(X??0),ce=d.convert(Y),ie=ce+u,le=Wi.getRadialColumnWidth(ce,ie,a,.5,.5),Se=new Wi.RadialColumnShape;return Se.scalingCenterX=x,Se.scalingCenterY=x,Se.columnWidth=le,Se.innerRadius=pe,Se.outerRadius=ne,Se.startAngle=ce,Se.endAngle=ie,Se.isBeveled=!0,Se.axisInnerRadius=c,Se.axisOuterRadius=a,Se.stroke=void 0,Se.strokeWidth=0,Se});return z.append(G),z.translationX=x,z.translationY=x,z}),this.root.append(this.series),this.updateColors(n,i)}updateColors(e,n){this.series.forEach((i,r)=>{i.children?.forEach(s=>{s.fill=e[r%e.length],s.stroke=n[r%n.length]})})}};return t.chartType="radialColumn",t})(),RCi=(()=>{let t=class extends eF{constructor(e,n,i){super(e,"radialBarTooltip"),this.data=[[6,8,10],[4,4,3],[5,4,2]],this.showRadiusAxisLine=!1;let r=(this.size-this.padding)/2,o=r*.4,a=new Wi.BandScale;a.domain=this.data[0].map((x,D)=>D),a.range=[o,r],a.paddingInner=.5,a.paddingOuter=0;let l=a.bandwidth,{processedData:c,max:d}=xie(this.data),u=new Wi.LinearScale;u.domain=[0,Math.ceil(d*1.5)];let m=3/2*Math.PI,f=m+2*Math.PI;u.range=[m,f];let _=this.size/2;this.series=c.map((x,D)=>{let E=D<0?void 0:c[D-1],M=new Wi.Group({zIndex:1e6}),I=x.map((z,G)=>{let A=E?.[G]??0,Y=a.convert(G),X=Y-l,ne=u.convert(A),pe=u.convert(z),ce=new Wi.Sector;return ce.centerX=_,ce.centerY=_,ce.innerRadius=X,ce.outerRadius=Y,ce.startAngle=ne,ce.endAngle=pe,ce.stroke=void 0,ce.strokeWidth=0,ce});return M.append(I),M}),this.root.append(this.series),this.updateColors(n,i)}updateColors(e,n){this.series.forEach((i,r)=>{i.children?.forEach(s=>{s.fill=e[r%e.length],s.stroke=n[r%n.length]})})}};return t.chartType="radialBar",t})(),FCi=(()=>{let t=class extends eF{constructor(e,n,i){super(e,"radarLineTooltip"),this.markerSize=4,this.data=[[8,7,8,7,8,8,7,8],[6,8,5,10,6,7,4,6],[0,3,3,5,4,4,2,0]],this.showRadiusAxisLine=!1;let r=(this.size-this.padding*2)/2,s=0,{paths:o,markers:a}=Fot(this.root,this.data,this.size,r,s,this.markerSize);this.lines=o,this.markers=a,this.updateColors(n,i)}updateColors(e,n){this.lines.forEach((i,r)=>{let s=this.data[r].length;i.stroke=e[r];let o=r*s,a=o+s;this.markers.slice(o,a).forEach(c=>{c.stroke=n[r],c.fill=e[r]})})}};return t.chartType="radarLine",t})(),LCi=(()=>{let t=class extends eF{constructor(e,n,i){super(e,"radarAreaTooltip"),this.data=[[8,10,5,7,4,1,5,8],[1,1,2,7,7,8,10,1],[4,5,9,9,4,2,3,4]],this.showRadiusAxisLine=!1;let r=(this.size-this.padding*2)/2,s=r-this.size*.3;this.areas=Fot(this.root,this.data,this.size,r,s).paths,this.updateColors(n,i)}updateColors(e,n){this.areas.forEach((i,r)=>{i.fill=e[r],i.stroke=n[r]})}};return t.chartType="radarArea",t})(),OCi=(()=>{let t=class extends eF{constructor(e,n,i){super(e,"nightingaleTooltip"),this.data=[[6,10,9,8,7,8],[4,6,5,4,5,5],[3,5,4,3,4,7]],this.showRadiusAxisLine=!1;let r=(this.size-this.padding*2)/2,s=new Wi.BandScale;s.domain=this.data[0].map((u,m)=>m),s.range=[-Math.PI,Math.PI],s.paddingInner=0,s.paddingOuter=0;let o=s.bandwidth*.7,{processedData:a,max:l}=xie(this.data),c=new Wi.LinearScale;c.domain=[0,l],c.range=[0,r];let d=this.size/2;this.series=a.map((u,m)=>{let f=m<0?void 0:a[m-1],_=new Wi.Group({zIndex:1e6}),x=u.map((D,E)=>{let M=f?.[E],I=c.convert(D),z=c.convert(M??0),G=s.convert(E),A=G+o,Y=new Wi.Sector;return Y.centerX=d,Y.centerY=d,Y.innerRadius=z,Y.outerRadius=I,Y.startAngle=G,Y.endAngle=A,Y.stroke=void 0,Y.strokeWidth=0,Y});return _.append(x),_}),this.root.append(this.series),this.updateColors(n,i)}updateColors(e,n){this.series.forEach((i,r)=>{i.children?.forEach(s=>{s.fill=e[r%e.length],s.stroke=n[r%n.length]})})}};return t.chartType="nightingale",t})(),NCi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"rangeBarTooltip");let r=[3,3.5,3];this.bars=this.createRangeBar(this.root,r,this.size,this.padding,"vertical"),this.updateColors(n,i)}updateColors(e,n){this.bars.forEach((i,r)=>{i.fill=e[r],i.stroke=n[r]})}createRangeBar(e,n,i,r,s){let o=s==="horizontal",a=2*r,l=new Wi.BandScale;l.domain=n.map((_,x)=>x),l.range=[r,i-r],l.paddingInner=.3,l.paddingOuter=.3;let c=.7,d=1.3,u=new Wi.LinearScale;u.domain=[n.reduce((_,x)=>Math.min(_,x),1/0)*c,n.reduce((_,x)=>Math.max(_,x),0)*d],u.range=[a,i-a];let m=l.bandwidth,f=n.map((_,x)=>{let[D,E]=[_*c,_*d],M=l.convert(x),I=u.convert(D),z=u.convert(E)-I,G=new Wi.Rect;return G.x=o?I:M,G.y=o?M:I,G.width=o?z:m,G.height=o?m:z,G.strokeWidth=0,G.crisp=!0,G});return e.append(f),f}};return t.chartType="rangeBar",t})(),VCi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"rangeAreaTooltip");let r=4,s=[Txe({offset:.375*r,length:r,pattern:{low:3,high:5,period:r}}),Txe({offset:.375*r,length:r,pattern:{low:2.25,high:4.25,period:r}}),Txe({offset:.75*r,length:r,pattern:{low:2.5,high:4.5,period:r}})],o=1.75,a=s.map(d=>d.map(([u,m])=>({x:u,low:m-.5*o,high:m+.5*o}))),{lines:l,areas:c}=this.createRangeArea(this.root,a,this.size,this.padding);this.lines=l,this.areas=c,this.updateColors(n,i)}updateColors(e,n){e=wst(e,1,2),n=wst(n,1,2),this.lines.forEach(([i,r],s)=>{i.fill=void 0,i.stroke=n[s],r.fill=void 0,r.stroke=n[s]}),this.areas.forEach((i,r)=>{i.fill=e[r]})}createRangeArea(e,n,i,r){let s=n.reduce((x,D)=>D.reduce((E,{x:M})=>Math.min(E,M),x),1/0),o=n.reduce((x,D)=>D.reduce((E,{x:M})=>Math.max(E,M),x),-1/0),a=n.reduce((x,D)=>D.reduce((E,{low:M})=>Math.min(E,M),x),1/0),l=n.reduce((x,D)=>D.reduce((E,{high:M})=>Math.max(E,M),x),-1/0),c=new Wi.LinearScale;c.domain=[s,o],c.range=[r,i-r];let d=2*r,u=new Wi.LinearScale;u.domain=[a,l],u.range=[i-d,d];let m=[],f=[];return n.map(x=>{let D=new Wi.Path,E=new Wi.Path,M=new Wi.Path;return m.push([D,E]),f.push(M),D.strokeWidth=0,E.strokeWidth=0,M.strokeWidth=0,M.fillOpacity=.8,D.path.clear(),E.path.clear(),M.path.clear(),x.map((I,z)=>{let{x:G,low:A,high:Y}=I,X=c.convert(G),ne=u.convert(A),pe=u.convert(Y),ce=z>0?"lineTo":"moveTo";return D.path[ce](X,pe),E.path[ce](X,ne),M.path[ce](X,pe),[X,ne]})}).forEach((x,D)=>{let E=x.length-1,M=f[D];for(let I=E;I>=0;I--){let[z,G]=x[I];M.path.lineTo(z,G)}}),e.append(f.concat(...m)),{lines:m,areas:f}}};return t.chartType="rangeArea",t})();BCi=(()=>{let t=class extends M2{constructor(e,n,i,r,s){super(e,"boxPlotTooltip");let o=this.padding,a=this.size,l=[11,11.5,10.5],c=1.2,d=1.1,u=.9,m=.8,f=new Wi.LinearScale;f.domain=[l.reduce((E,M)=>Math.min(E,M),1/0)*m,l.reduce((E,M)=>Math.max(E,M),0)*c],f.range=[a-1.5*o,o];let _=new Wi.BandScale;_.domain=l.map((E,M)=>M),_.range=[o,a-o],_.paddingInner=.4,_.paddingOuter=.2;let x=Math.round(_.bandwidth),D=Math.round(_.bandwidth/2);this.boxPlotGroups=l.map((E,M)=>{let[I,z,G,A]=[E*m,E*u,E*d,E*c],Y=Math.round(f.convert(G)),X=Math.round(_.convert(M)),ne=Math.round(X+x),pe=Math.round(f.convert(z)),ce=Math.round(f.convert(I)),ie=Math.round(f.convert(E)),le=Math.round(f.convert(A)),Se=X+D,je=new Wi.Group,ze=new Wi.Rect,Ge=new Wi.Line,Ae=new Wi.Line,Ye=new Wi.Line,ft=new Wi.Line,Ft=new Wi.Line;return ze.x=X,ze.y=Y,ze.width=x,ze.height=pe-Y,ze.strokeWidth=1,ze.strokeOpacity=.75,ze.crisp=!0,this.setLineProperties(Ge,X,ne,ie,ie),this.setLineProperties(Ae,Se,Se,le,Y),this.setLineProperties(Ye,Se,Se,ce,pe),this.setLineProperties(ft,X,ne,le,le),this.setLineProperties(Ft,X,ne,ce,ce),je.append([ze,Ge,Ae,Ye,ft,Ft]),je}),this.updateColors(n,i,r,s),this.root.append(this.boxPlotGroups)}updateColors(e,n,i,r){let s=i?.get(Lm.DEFAULT_BACKGROUND_COLOUR),o=(Array.isArray(s)?s[0]:s)??"white";this.boxPlotGroups.forEach((a,l)=>{a.children?.forEach(c=>{let d=e[l%e.length];c.fill=r?d:Zl.interpolateColor(d,o)(.7),c.stroke=n[l%n.length]})})}setLineProperties(e,n,i,r,s){e.x1=n,e.x2=i,e.y1=r,e.y2=s,e.strokeOpacity=.75}};return t.chartType="boxPlot",t})(),zCi=(()=>{let t=class extends JR{constructor(e,n,i,r,s){super(e,"treemapTooltip");let{size:o,padding:a}=this,l=[[1,1],[3,2,1]],d=l.length%2===0?.3:.2,u=[a,o-a],m=l.length,f=m*(m+1)/2,_=d/(m-1),x=u[1]-u[0],D=x-d,E=u[0];this.rects=l.reduce((I,z,G)=>{I??(I=[]);let A=(m-G)/f,Y=D*A,X=z.length,ne=z.reduce((Se,je)=>Se+=je,0),pe=d/(X-1||1),ce=X>1?x-d:x,ie=u[0],le=z.map(Se=>{let je=new Wi.Rect,ze=ce*Se/ne;return je.x=E,je.y=ie,je.width=Y,je.height=ze,je.strokeWidth=.75,je.crisp=!0,ie+=ze+pe,je});return E+=Y+_,I.push(...le),I},[]),this.updateColors(n,i,r,s);let M=new Wi.Group;M.setClipRectInGroupCoordinateSpace(new Wi.BBox(a,a,o-a,o-a)),M.append(this.rects),this.root.append(M)}updateColors(e,n,i,r){let s=i?.get(Lm.DEFAULT_BACKGROUND_COLOUR),o=(Array.isArray(s)?s[0]:s)??"white";this.rects.forEach((a,l)=>{a.fill=e[l%n.length],a.stroke=r?n[l%n.length]:o})}};return t.chartType="treemap",t})(),HCi=(()=>{let t=class extends eF{constructor(e,n,i){super(e,"sunburstTooltip"),this.data=[[[],[]],[[],[]],[[],[]]],this.angleOffset=-Math.PI/2,this.innerRadiusRatio=0,this.showRadiusAxisLine=!1,this.showAngleAxisLines=!1;let{data:r,size:s,padding:o,angleOffset:a,innerRadiusRatio:l}=this,c=(s-o*2)/2,d=[a+0,a+2*Math.PI],u=Math.abs(d[1]-d[0]),m=[c*l,c],f=Math.abs(m[1]-m[0]),_=0,x=(z,G)=>{z.forEach(A=>{let Y=G+1;_=Math.max(_,Y),x(A,Y)})};x(r,0);let D=f/_,E=this.size/2,M=d[0];this.series=[];let I=(z,G,A,Y,X)=>{if(!Array.isArray(z))return;let pe=G+1,ce=A;z.forEach((ie,le,Se)=>{let je=X;je||(je=new Wi.Group,this.series.push(je));let ze=m[0]+G*D,Ge=m[0]+pe*D,Ae=1/Se.length,Ye=ce,ft=Ye+Y*Ae,Ft=new Wi.Sector;Ft.centerX=E,Ft.centerY=E,Ft.innerRadius=ze,Ft.outerRadius=Ge,Ft.startAngle=Ye,Ft.endAngle=ft,Ft.stroke=void 0,Ft.strokeWidth=0,Ft.inset=.75,ce=ft,je.append(Ft),I(ie,pe,Ye,Math.abs(ft-Ye),je)})};I(r,0,M,u),this.root.append(this.series),this.updateColors(n,i)}updateColors(e,n){this.series.forEach((i,r)=>{i.children?.forEach(s=>{s.fill=e[r%e.length],s.stroke=n[r%n.length]})})}};return t.chartType="sunburst",t})(),GCi=(()=>{let t=class extends JR{constructor(e,n,i,r,s){super(e,"heatmapTooltip");let{size:o,padding:a}=this,l=3,c=Array.from({length:l},(D,E)=>Array.from({length:l},(M,I)=>I)),d=c.map((D,E)=>E),u=new Wi.BandScale;u.domain=d,u.range=[a,o-a],u.paddingInner=.01,u.paddingOuter=.1;let m=new Wi.BandScale;m.domain=d,m.range=[a,o-a],m.paddingInner=.01,m.paddingOuter=.1;let f=u.bandwidth??0,_=m.bandwidth??0;this.rects=c.reduce((D,E,M)=>{D??(D=[]);let I=E.map((z,G)=>{let A=new Wi.Rect;return A.x=u.convert(M),A.y=m.convert(G),A.width=f,A.height=_,A.strokeWidth=0,A.crisp=!0,A});return D.push(...I),D},[]),this.updateColors(n,i,r,s);let x=new Wi.Group;x.setClipRectInGroupCoordinateSpace(new Wi.BBox(a,a,o-a,o-a)),x.append(this.rects),this.root.append(x)}updateColors(e,n,i,r){let s=i?.get(Lm.DEFAULT_DIVERGING_SERIES_COLOUR_RANGE),o=i?.get(Lm.DEFAULT_BACKGROUND_COLOUR),a=(Array.isArray(o)?o[0]:o)??"white",l=r?[e[0],e[1]]:s,c=r?n[0]:a,d=Zl.interpolateColor(l[0],l[1]);this.rects.forEach((u,m)=>{u.fill=d(m*.2),u.stroke=c})}};return t.chartType="heatmap",t})(),WCi=(()=>{let t=class extends M2{constructor(e,n,i,r,s){super(e,"waterfallTooltip"),this.data=[4,3,-3,6,-3],this.bars=this.createWaterfall(this.root,this.data,this.size,this.padding,"vertical").bars,this.updateColors(n,i,r,s)}updateColors(e,n,i,r){let{data:s}=this,o={fill:r?e[0]:i?.get(Lm.PALETTE_ALT_UP_FILL),stroke:r?n[0]:i?.get(Lm.PALETTE_ALT_UP_STROKE)},a={fill:r?e[1]:i?.get(Lm.PALETTE_ALT_DOWN_FILL),stroke:r?n[1]:i?.get(Lm.PALETTE_ALT_DOWN_STROKE)};this.bars.forEach((l,c)=>{let d=s[c]>=0;l.fill=d?o.fill:a.fill,l.stroke=d?o.stroke:a.stroke})}createWaterfall(e,n,i,r,s){let o=2*r,{processedData:a,min:l,max:c}=xie(n.map(I=>[I])),d=a.reduce((I,z)=>I.concat(z),[]),u=new Wi.LinearScale;u.domain=[Math.min(l,0),c],u.range=[i-o,o];let m=new Wi.BandScale;m.domain=n.map((I,z)=>z),m.range=[r,i-r],m.paddingInner=.2,m.paddingOuter=.3;let f=m.bandwidth,_=new Wi.Path;_.stroke="#575757",_.strokeWidth=0;let x=Math.floor(_.strokeWidth)%2/2,D=_.path;D.clear();let E=s==="horizontal",M=d.map((I,z)=>{let G=z>0?d[z-1]:0,Y=n[z]>0,X=Math.round(u.convert(I)),ne=Math.round(u.convert(G)),pe=(Y?X:ne)-x,ce=(Y?ne:X)+x,ie=Math.abs(ce-pe),le=m.convert(z),Se=new Wi.Rect;Se.x=E?pe:le,Se.y=E?le:pe,Se.width=E?ie:f,Se.height=E?f:ie,Se.strokeWidth=0,Se.crisp=!0;let je=X+x,ze=ne+x;if(z>0){let Ye=E?ze:Se.x,ft=E?Se.y:ze;D.lineTo(Ye,ft)}let Ge=E?je:Se.x,Ae=E?Se.y:je;return D.moveTo(Ge,Ae),Se});return e.append([_,...M]),{bars:M}}};return t.chartType="waterfall",t})(),UCi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"columnLineComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];let{root:r,columnData:s,lineData:o,size:a,padding:l}=this;this.columns=pW({stacked:!1,root:r,data:s,size:a,padding:l,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),r.append(this.columns),this.lines=pbe(r,o,a,l),this.updateColors(n,i)}updateColors(e,n){this.columns.forEach((i,r)=>{i.fill=e[r],i.stroke=n[r]}),this.lines.forEach((i,r)=>{i.stroke=e[r+2]})}};return t.chartType="columnLineCombo",t})(),jCi=(()=>{let t=class extends M2{constructor(e,n,i){super(e,"areaColumnComboTooltip"),this.columnData=[3,4.5],this.areaData=[[5,4,6,5,4]];let{root:r,columnData:s,areaData:o,size:a,padding:l}=this;this.columns=pW({stacked:!1,root:r,data:s,size:a,padding:l,xScaleDomain:[0,1],yScaleDomain:[0,6],xScalePadding:.5});let c=new Wi.BandScale;c.range=[l,a-l],c.domain=[0,1,2,3,4],c.paddingInner=1,c.paddingOuter=0;let d=new Wi.LinearScale;d.range=[a-l,l],d.domain=[0,6];let u=[],m=d.convert(0),f=c.convert(0);o.forEach((_,x)=>{let D=u[x]||(u[x]=[]);_.forEach((M,I)=>{let z=M,G=I,A=c.convert(G),Y=d.convert(z);D[I]={x:A,y:Y}});let E=c.convert(_.length-1);u[x].push({x:E,y:m},{x:f,y:m})}),this.areas=u.map(_=>{let x=new Wi.Path;x.strokeWidth=0,x.fillOpacity=.8;let D=x.path;return _.forEach((E,M)=>D[M>0?"lineTo":"moveTo"](E.x,E.y)),x}),r.append(this.areas),r.append([].concat.apply([],this.columns)),this.updateColors(n,i)}updateColors(e,n){this.areas.forEach((i,r)=>{i.fill=e[r],i.stroke=n[r]}),this.columns.forEach((i,r)=>{i.fill=e[r+1],i.stroke=n[r+1]})}};return t.chartType="areaColumnCombo",t})(),$Ci=(()=>{let t=class extends JR{constructor(e,n,i){super(e,"customComboTooltip"),this.columnData=[3,4],this.lineData=[[5,4,6,5,4]];let{root:r,columnData:s,lineData:o,size:a,padding:l}=this;this.columns=pW({stacked:!1,root:r,data:s,size:a,padding:l,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),r.append(this.columns),this.lines=pbe(r,o,a,l);let c="grey",d=3,u=new Wi.Line;u.x1=l,u.y1=l,u.x2=l,u.y2=a-l+d,u.stroke=c;let m=new Wi.Line;m.x1=l-d+1,m.y1=a-l,m.x2=a-l+1,m.y2=a-l,m.stroke=c;let f=new Wi.Path;this.buildPenIconPath(f),f.fill="whitesmoke",f.stroke="darkslategrey",f.strokeWidth=1,r.append([m,u,f]),this.updateColors(n,i)}updateColors(e,n){this.columns.forEach((i,r)=>{i.fill=e[r],i.stroke=n[r]}),this.lines.forEach((i,r)=>{i.stroke=e[r+2]})}buildPenIconPath(e){let{path:n}=e;n.moveTo(25.76,43.46),n.lineTo(31.27,48.53),n.moveTo(49.86,22),n.lineTo(49.86,22),n.cubicCurveTo(49.01994659053345,21.317514933510974,47.89593834348529,21.09645997825817,46.86,21.41),n.lineTo(46.86,21.41),n.cubicCurveTo(45.55460035985361,21.77260167850787,44.38777081121966,22.517979360321792,43.51,23.55),n.lineTo(25.51,43.8),n.lineTo(25.43,43.89),n.lineTo(23.01,51.89),n.lineTo(22.83,52.46),n.lineTo(31.02,48.86),n.lineTo(49.02,28.52),n.lineTo(49.02,28.52),n.cubicCurveTo(49.940716461596224,27.521914221246085,50.54302631059587,26.2720342455763,50.75,24.93),n.lineTo(50.75,24.93),n.cubicCurveTo(50.95363374988308,23.866379846512814,50.62080640232334,22.77066734274871,49.86,22),n.closePath(),n.moveTo(41.76,25.5),n.lineTo(47.34,30.5),n.moveTo(40.74,26.65),n.lineTo(46.25,31.71)}};return t.chartType="customCombo",t})(),Sst={columnGroup:{column:{range:!0,pivot:!0,enterprise:!1,icon:fCi},stackedColumn:{range:!0,pivot:!0,enterprise:!1,icon:Oot},normalizedColumn:{range:!0,pivot:!0,enterprise:!1,icon:yCi}},barGroup:{bar:{range:!0,pivot:!0,enterprise:!1,icon:_Ci},stackedBar:{range:!0,pivot:!0,enterprise:!1,icon:Bot},normalizedBar:{range:!0,pivot:!0,enterprise:!1,icon:bCi}},pieGroup:{pie:{range:!0,pivot:!0,enterprise:!1,icon:wCi},donut:{range:!0,pivot:!0,enterprise:!1,icon:zxe},doughnut:{range:!0,pivot:!0,enterprise:!1,icon:zxe}},lineGroup:{line:{range:!0,pivot:!0,enterprise:!1,icon:SCi}},scatterGroup:{scatter:{range:!0,pivot:!0,enterprise:!1,icon:TCi},bubble:{range:!0,pivot:!0,enterprise:!1,icon:DCi}},areaGroup:{area:{range:!0,pivot:!0,enterprise:!1,icon:MCi},stackedArea:{range:!0,pivot:!0,enterprise:!1,icon:mbe},normalizedArea:{range:!0,pivot:!0,enterprise:!1,icon:ICi}},polarGroup:{radarLine:{range:!0,pivot:!1,enterprise:!0,icon:FCi},radarArea:{range:!0,pivot:!1,enterprise:!0,icon:LCi},nightingale:{range:!0,pivot:!1,enterprise:!0,icon:OCi},radialColumn:{range:!0,pivot:!1,enterprise:!0,icon:PCi},radialBar:{range:!0,pivot:!1,enterprise:!0,icon:RCi}},statisticalGroup:{boxPlot:{range:!0,pivot:!1,enterprise:!0,icon:BCi},histogram:{range:!0,pivot:!1,enterprise:!1,icon:ACi},rangeBar:{range:!0,pivot:!1,enterprise:!0,icon:NCi},rangeArea:{range:!0,pivot:!1,enterprise:!0,icon:VCi}},hierarchicalGroup:{treemap:{range:!0,pivot:!0,enterprise:!0,icon:zCi},sunburst:{range:!0,pivot:!0,enterprise:!0,icon:HCi}},specializedGroup:{heatmap:{range:!0,pivot:!1,enterprise:!0,icon:GCi},waterfall:{range:!0,pivot:!1,enterprise:!0,icon:WCi}},combinationGroup:{columnLineCombo:{range:!0,pivot:!0,enterprise:!1,icon:UCi},areaColumnCombo:{range:!0,pivot:!0,enterprise:!1,icon:jCi},customCombo:{range:!0,pivot:!0,enterprise:!1,icon:$Ci}}},KCi={columnGroup:["column","stackedColumn","normalizedColumn"],barGroup:["bar","stackedBar","normalizedBar"],pieGroup:["pie","donut"],lineGroup:["line"],scatterGroup:["scatter","bubble"],areaGroup:["area","stackedArea","normalizedArea"],polarGroup:["radarLine","radarArea","nightingale","radialColumn","radialBar"],statisticalGroup:["boxPlot","histogram","rangeBar","rangeArea"],hierarchicalGroup:["treemap","sunburst"],specializedGroup:["heatmap","waterfall"],combinationGroup:["columnLineCombo","areaColumnCombo","customCombo"]},YCi=class extends ai{constructor(t,e,n,i,r,s=KCi){super('<div class="ag-chart-settings-mini-wrapper"></div>'),this.wrappers=new Map,this.chartController=t,this.fills=e,this.strokes=n,this.themeTemplateParameters=i,this.isCustomTheme=r,this.chartGroups=ve({},s)}wireBeans(t){this.chartTranslationService=t.chartTranslationService}postConstruct(){!this.chartController.customComboExists()&&this.chartGroups.combinationGroup&&(this.chartGroups.combinationGroup=this.chartGroups.combinationGroup.filter(s=>s!=="customCombo"));let t=this.getGui(),e=this.chartController.isEnterprise(),n=this.chartController.isPivotChart(),i=!n,r=Object.keys(this.chartGroups).map(s=>{let o=s in Sst?Sst[s]:void 0;if(!o)return wt(`invalid chartGroupsDef config '${s}'`),null;let l=(this.chartGroups[s]??[]).map(c=>{let d=c in o?o[c]:void 0;return d?!e&&d.enterprise?null:i&&d.range||n&&d.pivot?d:null:(wt(`invalid chartGroupsDef config '${s}.${c}'`),null)}).filter(c=>c!=null);return l.length===0?null:{label:this.chartTranslationService.translate(s),items:l}}).filter(s=>s!=null);for(let{label:s,items:o}of r){let a=this.createBean(new uC({title:s,suppressEnabledCheckbox:!0,enabled:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-settings",direction:"horizontal",suppressKeyboardNavigation:!0}));for(let l of o){let c=l.icon,d=document.createElement("div");d.classList.add("ag-chart-mini-thumbnail"),d.setAttribute("tabindex","0"),d.setAttribute("role","button");let u=c.chartType,m=()=>{this.chartController.setChartType(u),this.updateSelectedMiniChart()};this.addManagedListeners(d,{click:m,keydown:f=>{(f.key==It.ENTER||f.key===It.SPACE)&&(f.preventDefault(),m())}}),this.wrappers.set(u,d),this.createBean(new c(d,this.fills,this.strokes,this.themeTemplateParameters,this.isCustomTheme)),a.addItem(d)}t.appendChild(a.getGui())}this.updateSelectedMiniChart()}updateSelectedMiniChart(){let t=this.chartController.getChartType();this.wrappers.forEach((e,n)=>{let i=n===t;e.classList.toggle("ag-selected",i);let r=this.chartTranslationService.translate(dbe(n)),s=i?`${r}. ${this.chartTranslationService.translate("ariaChartSelected")}`:r;hl(e,s)})}destroy(){this.wrappers.clear(),super.destroy()}},qCi=class extends ai{constructor(t){super(`<div class="ag-chart-settings-wrapper">
            <div data-ref="eMiniChartsContainer" class="ag-chart-settings-mini-charts-container ag-scrollable-container"></div>
            <div data-ref="eNavBar" class="ag-chart-settings-nav-bar">
                <div data-ref="ePrevBtn" class="ag-chart-settings-prev">
                    <button type="button" class="ag-button ag-chart-settings-prev-button"></button>
                </div>
                <div data-ref="eCardSelector" class="ag-chart-settings-card-selector"></div>
                <div data-ref="eNextBtn" class="ag-chart-settings-next">
                    <button type="button" class="ag-button ag-chart-settings-next-button"></button>
                </div>
            </div>
        </div>`),this.chartController=t,this.eMiniChartsContainer=Bt,this.eNavBar=Bt,this.eCardSelector=Bt,this.ePrevBtn=Bt,this.eNextBtn=Bt,this.miniChartsContainers=[],this.cardItems=[],this.activePaletteIndex=0,this.palettes=[],this.themes=[]}postConstruct(){this.resetPalettes(),this.ePrevBtn.insertAdjacentElement("afterbegin",tr("previous",this.gos)),this.eNextBtn.insertAdjacentElement("afterbegin",tr("next",this.gos)),this.addManagedElementListeners(this.ePrevBtn,{click:()=>this.setActivePalette(this.getPrev(),"left")}),this.addManagedElementListeners(this.eNextBtn,{click:()=>this.setActivePalette(this.getNext(),"right")});let t=()=>this.resetPalettes(!0);this.addManagedListeners(this.chartController,{chartTypeChanged:t,chartApiUpdate:t}),this.scrollSelectedIntoView()}scrollSelectedIntoView(){setTimeout(()=>{let t=i=>!i.getGui().classList.contains("ag-hidden"),n=this.miniChartsContainers.find(t).getGui().querySelector(".ag-selected");if(n){let i=n.offsetParent;i&&this.eMiniChartsContainer.scrollTo(0,i.offsetTop)}},250)}resetPalettes(t){let e=this.chartController.getPalettes(),n=this.chartController.getThemeTemplateParameters(),i=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;if(OZ(e,this.palettes)&&!t||this.isAnimating)return;this.palettes=e,this.themes=this.chartController.getThemeNames(),this.activePaletteIndex=this.themes.findIndex(s=>s===this.chartController.getChartThemeName()),this.cardItems=[],zo(this.eCardSelector),this.destroyMiniCharts();let{themes:r}=this;this.palettes.forEach((s,o)=>{let a=this.activePaletteIndex===o,{fills:l=[],strokes:c=[]}=s,d=r[o],u=!ube(d),m=this.createBean(new YCi(this.chartController,l,c,n[o],u,i));this.miniChartsContainers.push(m),this.eMiniChartsContainer.appendChild(m.getGui()),this.addCardLink(o),a?m.updateSelectedMiniChart():m.setDisplayed(!1)}),Vn(this.eNavBar,this.palettes.length>1),SA(this.cardItems[this.activePaletteIndex],"ag-selected","ag-not-selected")}addCardLink(t){let e=document.createElement("div");e.classList.add("ag-chart-settings-card-item"),this.addManagedElementListeners(e,{click:()=>{this.setActivePalette(t,t<this.activePaletteIndex?"left":"right")}}),this.eCardSelector.appendChild(e),this.cardItems.push(e)}getPrev(){let t=this.activePaletteIndex-1;return t<0&&(t=this.palettes.length-1),t}getNext(){let t=this.activePaletteIndex+1;return t>=this.palettes.length&&(t=0),t}setActivePalette(t,e){if(this.isAnimating||this.activePaletteIndex===t)return;SA(this.cardItems[t],"ag-selected","ag-not-selected");let n=this.miniChartsContainers[this.activePaletteIndex],i=n.getGui(),r=this.miniChartsContainers[t],s=r.getGui();n.updateSelectedMiniChart(),r.updateSelectedMiniChart();let o=e==="left"?-1:1,a=s.style.left=`${v5(this.getGui())*o}px`;this.activePaletteIndex=t,this.isAnimating=!0;let l="ag-animating";r.setDisplayed(!0),n.addCssClass(l),r.addCssClass(l),this.chartController.setChartThemeName(this.themes[t]),window.setTimeout(()=>{i.style.left=`${-parseFloat(a)}px`,s.style.left="0px"},0),window.setTimeout(()=>{this.isAnimating=!1,n.removeCssClass(l),r.removeCssClass(l),n.setDisplayed(!1)},300)}destroyMiniCharts(){zo(this.eMiniChartsContainer),this.miniChartsContainers=this.destroyBeans(this.miniChartsContainers)}destroy(){this.destroyMiniCharts(),super.destroy()}},ZCi=(()=>{let t=class Hxe extends ai{constructor(n,i){super(),this.panels=n,this.chartMenuContext=i,this.tabs=[]}wireBeans(n){this.chartTranslationService=n.chartTranslationService}postConstruct(){this.panels.forEach(n=>{let i=n.replace("chart","").toLowerCase(),r=this.createPanel(i),s=this.createTab(n,i,r);this.tabs.push(s),this.addDestroyFunc(()=>this.destroyBean(r))}),this.tabbedLayout=new ibe({items:this.tabs,cssClass:"ag-chart-tabbed-menu",keepScrollPosition:!0,suppressFocusBodyOnOpen:!0,suppressTrapFocus:!0,enableCloseButton:!0,closeButtonAriaLabel:this.chartTranslationService.translate("ariaChartMenuClose"),onCloseClicked:()=>{this.eventSource?.focus({preventScroll:!0}),this.dispatchLocalEvent({type:"closed"})}}),this.createBean(this.tabbedLayout)}createTab(n,i,r){let s=document.createElement("div");s.classList.add("ag-chart-tab",`ag-chart-${i}`),this.createBean(r),s.appendChild(r.getGui());let o=document.createElement("div"),a=this.chartTranslationService.translate(i);return o.innerText=a,{title:o,titleLabel:a,bodyPromise:io.resolve(s),getScrollableContainer:()=>s.querySelector(".ag-scrollable-container")||s,name:n}}showTab(n){let i=this.tabs[n];this.tabbedLayout.showItem(i)}getGui(){return this.tabbedLayout&&this.tabbedLayout.getGui()}showMenu(n,i){this.eventSource=n,i||this.tabbedLayout?.focusHeader(!0)}destroy(){this.parentComponent&&this.parentComponent.isAlive()&&this.destroyBean(this.parentComponent),super.destroy()}createPanel(n){switch(n){case Hxe.TAB_DATA:return new W5i(this.chartMenuContext);case Hxe.TAB_FORMAT:return new hCi(this.chartMenuContext);default:return new qCi(this.chartMenuContext.chartController)}}};return t.TAB_DATA="data",t.TAB_FORMAT="format",t})(),XCi=ZCi,QCi=class extends ai{constructor(t,e,n){super('<div class="ag-chart-menu-wrapper"></div>'),this.eChartContainer=t,this.eMenuPanelContainer=e,this.chartMenuContext=n,this.buttons={chartLink:{iconName:"linked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartUnlink:{iconName:"unlinked",callback:()=>this.chartMenuService.toggleLinked(this.chartMenuContext)},chartDownload:{iconName:"save",callback:()=>this.chartMenuService.downloadChart(this.chartMenuContext)},chartMenu:{iconName:"menuAlt",callback:i=>this.showMenuList(i)}},this.panels=[],this.menuVisible=!1,this.chartController=n.chartController}wireBeans(t){this.chartMenuService=t.chartMenuService,this.chartMenuListFactory=t.chartMenuListFactory,this.environment=t.environment}postConstruct(){this.chartToolbar=this.createManagedBean(new R5i),this.getGui().appendChild(this.chartToolbar.getGui()),this.refreshToolbarAndPanels(),this.addManagedEventListeners({chartCreated:t=>{t.chartId===this.chartController.getChartId()&&this.gos.get("chartToolPanelsDef")?.defaultToolPanel&&this.showMenu({panel:this.defaultPanel,suppressFocus:!0})}}),this.addManagedListeners(this.chartController,{chartLinkedChanged:this.refreshToolbarAndPanels.bind(this)}),this.refreshMenuClasses(),this.addManagedListeners(this.chartController,{chartApiUpdate:this.refreshToolbarAndPanels.bind(this)})}isVisible(){return this.menuVisible}getExtraPaddingDirections(){return["chartMenu","chartLink","chartUnlink","chartDownload"].some(t=>this.chartToolbarOptions.includes(t))?["top"]:[]}refreshToolbarAndPanels(){this.initToolbarOptionsAndPanels(),this.updateToolbar()}initToolbarOptionsAndPanels(){let{panels:t,defaultPanel:e}=this.chartMenuService.getChartToolPanels(this.chartController);this.panels=t,this.defaultPanel=e,this.chartToolbarOptions=this.chartMenuService.getChartToolbarOptions()}updateToolbar(){let t=this.chartToolbarOptions.map(e=>{let{iconName:n,callback:i}=this.buttons[e];return{buttonName:e,iconName:n,callback:i}});this.chartToolbar.updateParams({buttons:t})}createMenuPanel(t){let e=this.menuPanel=this.createBean(new ebe({height:"100%",closable:!0,hideTitleBar:!0,cssIdentifier:"chart-menu"}));return e.setParentComponent(this),this.eMenuPanelContainer.appendChild(e.getGui()),this.tabbedMenu=this.createBean(new XCi(this.panels,this.chartMenuContext)),this.addManagedListeners(this.tabbedMenu,{closed:()=>{this.hideMenu()}}),this.addManagedListeners(e,{destroyed:()=>this.destroyBean(this.tabbedMenu)}),new io(n=>{window.setTimeout(()=>{e.setBodyComponent(this.tabbedMenu),this.tabbedMenu.showTab(t),n(e)},100)})}showContainer(t,e){this.menuPanel&&(this.menuVisible=!0,this.refreshMenuClasses(),this.tabbedMenu.showMenu(t,e))}showMenu(t){let{panel:e,eventSource:n,suppressFocus:i}=t??{};if(this.menuPanel&&!e)this.showContainer(n,i);else{let r=e||this.defaultPanel,s=this.panels.indexOf(r);s<0&&(wt(`'${e}' is not a valid Chart Tool Panel name`),s=this.panels.indexOf(this.defaultPanel)),this.menuPanel?(this.tabbedMenu.showTab(s),this.showContainer(n,i)):this.createMenuPanel(s).then(()=>this.showContainer(n,i))}}hideMenu(){this.menuVisible=!1,this.refreshMenuClasses()}refreshMenuClasses(){this.eChartContainer.classList.toggle("ag-chart-menu-visible",this.menuVisible),this.eChartContainer.classList.toggle("ag-chart-menu-hidden",!this.menuVisible)}showMenuList(t){this.chartMenuListFactory.showMenuList({eventSource:t,showMenu:()=>this.showMenu({eventSource:t}),chartMenuContext:this.chartMenuContext})}destroy(){super.destroy(),this.menuPanel&&this.menuPanel.isAlive()&&this.destroyBean(this.menuPanel),this.tabbedMenu&&this.tabbedMenu.isAlive()&&this.destroyBean(this.tabbedMenu)}},Uot=["number","category","time","grouped-category"],JCi=["angle-category","angle-number","radius-category","radius-number"],e8i=[...Uot,...JCi],t8i=class extends Ot{constructor(t){super(),this.chartController=t}getChartThemeOverridesProxy(){return{getValue:t=>this.getChartOption(t),setValue:(t,e)=>this.setChartThemeOverrides([{expression:t,value:e}]),setValues:t=>this.setChartThemeOverrides(t)}}getAxisThemeOverridesProxy(){return{getValue:t=>this.getAxisProperty(t),setValue:(t,e)=>this.setAxisThemeOverrides([{expression:t,value:e}]),setValues:t=>this.setAxisThemeOverrides(t)}}getCartesianAxisOptionsProxy(t){return{getValue:e=>this.getCartesianAxisProperty(t,e),setValue:(e,n)=>this.setCartesianAxisOptions(t,[{expression:e,value:n}]),setValues:e=>this.setCartesianAxisOptions(t,e)}}getCartesianAxisThemeOverridesProxy(t){return{getValue:e=>this.getCartesianAxisProperty(t,e),setValue:(e,n)=>this.setCartesianAxisThemeOverrides(t,[{expression:e,value:n}]),setValues:e=>this.setCartesianAxisThemeOverrides(t,e)}}getCartesianAxisAppliedThemeOverridesProxy(t){return{getValue:e=>this.getCartesianAxisThemeOverride(t,e==="*"?null:e),setValue:(e,n)=>this.setCartesianAxisThemeOverrides(t,[{expression:e==="*"?null:e,value:n}]),setValues:e=>this.setCartesianAxisThemeOverrides(t,e)}}getSeriesOptionsProxy(t){return{getValue:(e,n)=>this.getSeriesOption(t(),e,n),setValue:(e,n)=>this.setSeriesOptions(t(),[{expression:e,value:n}]),setValues:e=>this.setSeriesOptions(t(),e)}}getPersistedChartThemeOverrides(t,e,n,i){let r=this.getRetainedChartThemeOverrideKeys(n,i),s=this.getRetainedChartAxisThemeOverrideKeys(null,n,i),o=this.createChartOptions();for(let a of r){let l=this.retrieveChartOptionsThemeOverride(t,n,a);l!==void 0&&this.assignChartOptionsThemeOverride(o,i,a,l)}return e&&this.assignPersistedAxisOverrides({existingAxes:e,retainedChartAxisThemeOverrideKeys:s,existingChartOptions:t,targetChartOptions:o,existingChartType:n,targetChartType:i}),o.theme.overrides}assignPersistedAxisOverrides(t){let{existingAxes:e,retainedChartAxisThemeOverrideKeys:n,existingChartOptions:i,targetChartOptions:r,existingChartType:s,targetChartType:o}=t;for(let{expression:a,targetAxisTypes:l}of n)for(let c of e.map(d=>d.type)){let d=this.retrieveChartOptionsThemeOverride(i,s,["axes",c,a].join("."));if(d!==void 0)for(let u of l)this.assignChartOptionsThemeOverride(r,o,["axes",u,a].join("."),d)}}getRetainedChartThemeOverrideKeys(t,e){let n=["animation"],i=["zoom","navigator"],r=((s,o)=>{let a=new Array;return Nw(oh(s))&&Nw(oh(o))&&a.push(...i),a})(t,e);return[...n,...r]}getRetainedChartAxisThemeOverrideKeys(t,e,n){return Nw(oh(e))&&Nw(oh(n))?this.getRetainedCartesianAxisThemeOverrideKeys(t).map(r=>({expression:r,targetAxisTypes:Uot})):[]}getRetainedCartesianAxisThemeOverrideKeys(t){let e=t==="xAxis"?["",".top",".bottom"]:t==="yAxis"?["",".left",".right"]:["",".left",".right",".top",".bottom"],n=["crosshair"],i=new Array;for(let r of n)for(let s of e)i.push(`${r}${s}`);return i}getChartOption(t){return HE(this.getChart(),t,void 0)}setChartThemeOverrides(t){let e=this.getChartType(),n=this.createChartOptions();for(let{expression:i,value:r}of t)this.assignChartOptionsThemeOverride(n,e,i,r);this.applyChartOptions(n)}applyChartOptions(t,e){if(Object.keys(t).length===0)return;this.updateChart(t),!e?.silent&&this.raiseChartOptionsChangedEvent()}awaitChartOptionUpdate(t){this.chartController.getChartProxy().getChart().waitForUpdate().then(()=>t()).catch(n=>Do("chart update failed",n))}getAxisProperty(t){return HE(this.getChart().axes?.[0],t,void 0)}setAxisThemeOverrides(t){let e=this.getChart(),n=this.getChartType(),i=this.createChartOptions();for(let{expression:r,value:s}of t){let o=e.axes?.filter(a=>{let l=r.split("."),c=a;for(let d of l){if(!(d in c))return!1;c=c[d]}return!0});if(o)for(let a of o)this.isValidAxisType(a)&&this.assignChartAxisThemeOverride(i,n,a.type,null,r,s)}this.applyChartOptions(i)}getCartesianAxisProperty(t,e){let n=this.getChartAxes(),i=this.getCartesianAxis(n,t);return HE(i,e,void 0)}getCartesianAxisThemeOverride(t,e){let n=this.getChartAxes(),i=this.getCartesianAxis(n,t);if(!i||!this.isValidAxisType(i))return;let r=this.getChartType(),s=this.getChart().getOptions();return this.retrieveChartAxisThemeOverride(s,r,i.type,t==="yAxis"?["left","right"]:["bottom","top"],e)}setCartesianAxisThemeOverrides(t,e){let n=this.getChartAxes(),i=this.getCartesianAxis(n,t);if(!i||!this.isValidAxisType(i))return;let r=this.getChartType(),s=this.createChartOptions();for(let{expression:o,value:a}of e)this.assignChartAxisThemeOverride(s,r,i.type,t==="yAxis"?["left","right"]:["bottom","top"],o,a);this.applyChartOptions(s)}setCartesianAxisOptions(t,e){this.updateCartesianAxisOptions(t,(n,i,r)=>{let s=i.indexOf(r);for(let{expression:o,value:a}of e)this.assignChartOption(n,`axes.${s}.${o}`,a)})}updateCartesianAxisOptions(t,e){let n=this.getChart().getOptions(),i="axes"in n?n.axes:void 0;if(!n||!i)return;let r=this.getChartAxes(),s=this.getCartesianAxis(r,t);if(!s)return;let o=this.createChartOptions();o.axes=i,e(o,r,s,n),this.applyChartOptions(o)}setCartesianCategoryAxisType(t,e){this.updateCartesianAxisOptions(t,(n,i,r,s)=>{let o=this.getChartType();this.assignPersistedAxisOverrides({existingAxes:[r],retainedChartAxisThemeOverrideKeys:this.getRetainedChartAxisThemeOverrideKeys(t,o,o),existingChartOptions:s,targetChartOptions:n,existingChartType:o,targetChartType:o}),this.assignChartOption(n,"axes.0.type",e),this.chartController.setCategoryAxisType(e)})}getCartesianAxis(t,e){if(!(t.length<2))switch(e){case"xAxis":return t[0].direction==="x"?t[0]:t[1];case"yAxis":return t[1].direction==="y"?t[1]:t[0]}}getSeriesOption(t,e,n){let i=this.getChart().series.find(r=>i8i(t,r));return HE(n?i:i?.properties.toJson(),e,void 0)}setSeriesOptions(t,e){let n=this.createChartOptions();for(let{expression:i,value:r}of e)this.assignChartOptionsSeriesThemeOverride(n,t,`series.${i}`,r);this.applyChartOptions(n)}getPairedMode(){return this.chartController.getChartProxy().isPaired()}setPairedMode(t){this.chartController.getChartProxy().setPaired(t)}getChartAxes(){return this.getChart().axes??[]}retrieveChartAxisThemeOverride(t,e,n,i,r){if(i)for(let s of i){let o=this.retrieveChartOptionsThemeOverride(t,e,["axes",n,s,...r?[r]:[]].join("."));if(o!==void 0)return o}else return this.retrieveChartOptionsThemeOverride(t,e,["axes",n,...r?[r]:[]].join("."))}assignChartAxisThemeOverride(t,e,n,i,r,s){if(i)for(let o of i)this.assignChartOptionsThemeOverride(t,e,["axes",n,o,...r?[r]:[]].join("."),s);else this.assignChartOptionsThemeOverride(t,e,["axes",n,...r?[r]:[]].join("."),s)}isValidAxisType(t){return e8i.includes(t.type)}getChartType(){return this.chartController.getChartType()}getChart(){return this.chartController.getChartProxy().getChart()}updateChart(t){let e=this.chartController.getChartProxy().getChartRef();e.skipAnimations(),e.updateDelta(t)}createChartOptions(){return{theme:{overrides:{}}}}retrieveChartOptionsThemeOverride(t,e,n){let i=this.getChartThemeOverridesSeriesTypeKeys(e);for(let r of i){let s=this.retrieveChartOptionsSeriesThemeOverride(t,r,n);if(s!==void 0)return s}}assignChartOptionsThemeOverride(t,e,n,i){let r=this.getChartThemeOverridesSeriesTypeKeys(e);for(let s of r)this.assignChartOptionsSeriesThemeOverride(t,s,n,i)}retrieveChartOptionsSeriesThemeOverride(t,e,n){return this.retrieveChartOption(t,["theme","overrides",e,...n?[n]:[]].join("."))}assignChartOptionsSeriesThemeOverride(t,e,n,i){this.assignChartOption(t,["theme","overrides",e,...n?[n]:[]].join("."),i)}getChartThemeOverridesSeriesTypeKeys(t){let e=this.chartController.getChartSeriesTypes(t);return this.chartController.isComboChart()&&e.push("common"),e}retrieveChartOption(t,e){return HE(t,e,void 0)}assignChartOption(t,e,n){X_i(t,e,n)}raiseChartOptionsChangedEvent(){let t=this.chartController.getChartModel();this.eventService.dispatchEvent({type:"chartOptionsChanged",chartId:t.chartId,chartType:t.chartType,chartThemeName:this.chartController.getChartThemeName(),chartOptions:t.chartOptions})}destroy(){super.destroy()}};n8i=class jot extends ai{constructor(e){super(`<div class="ag-chart">
            <div data-ref="eChartContainer" class="ag-chart-components-wrapper ag-chart-menu-hidden">
                <div data-ref="eChart" class="ag-chart-canvas-wrapper"></div>
                <div data-ref="eEmpty" class="ag-chart-empty-text ag-unselectable"></div>
            </div>
            <div data-ref="eMenuContainer" class="ag-chart-docked-container"></div>
            </div>`),this.eChart=Bt,this.eChartContainer=Bt,this.eMenuContainer=Bt,this.eEmpty=Bt,this.params=e}wireBeans(e){this.crossFilterService=e.chartCrossFilterService,this.chartTranslationService=e.chartTranslationService,this.chartMenuService=e.chartMenuService,this.focusService=e.focusService,this.popupService=e.popupService}postConstruct(){let e=St(ve({},this.params),{chartType:dW(this.params.chartType),chartThemeName:this.getThemeName()}),n=this.gos.get("enableRtl");this.addCssClass(n?"ag-rtl":"ag-ltr");let i=this.createBean(new nb(e));this.chartController=this.createManagedBean(new d5i(i)),this.chartOptionsService=this.createManagedBean(new t8i(this.chartController)),this.validateCustomThemes(),this.createChart(),this.params.insideDialog&&this.addDialog(),this.addMenu(),this.addManagedElementListeners(this.getGui(),{focusin:this.setActiveChartCellRange.bind(this)}),this.addManagedListeners(this.chartController,{chartModelUpdate:this.update.bind(this)}),this.addManagedPropertyListeners(["chartThemeOverrides","chartThemes"],this.reactivePropertyUpdate.bind(this)),this.update(),this.raiseChartCreatedEvent()}createChart(){let e;this.chartProxy&&(e=this.chartProxy.destroy({keepChartInstance:!0}));let n=(s,o)=>{let a=this.params.crossFilteringContext;a.lastSelectedChartId=o?"":this.chartController.getChartId(),o&&this.params.crossFilteringResetCallback(),this.crossFilterService.filter(s,o)},i=this.chartController.getChartType(),r={chartType:i,chartInstance:e,getChartThemeName:this.getChartThemeName.bind(this),getChartThemes:this.getChartThemes.bind(this),customChartThemes:this.gos.get("customChartThemes"),getGridOptionsChartThemeOverrides:()=>this.getGridOptionsChartThemeOverrides(),getExtraPaddingDirections:()=>this.chartMenu?.getExtraPaddingDirections()??[],apiChartThemeOverrides:this.params.chartThemeOverrides,crossFiltering:this.params.crossFiltering??!1,crossFilterCallback:n,parentElement:this.eChart,grouping:this.chartController.isGrouping(),chartThemeToRestore:this.params.chartThemeName,chartOptionsToRestore:this.params.chartOptionsToRestore,chartPaletteToRestore:this.params.chartPaletteToRestore,seriesChartTypes:this.chartController.getSeriesChartTypes(),translate:s=>this.chartTranslationService.translate(s)};if(this.params.chartOptionsToRestore=void 0,this.chartType=i,this.chartProxy=jot.createChartProxy(r),!this.chartProxy){wt("invalid chart type supplied: "+r.chartType);return}this.chartController.setChartProxy(this.chartProxy),this.createMenuContext()}createMenuContext(){if(this.chartMenuContext)return;let e=this.createManagedBean(new jE(this.chartOptionsService.getChartThemeOverridesProxy())),n=this.createManagedBean(new jE(this.chartOptionsService.getAxisThemeOverridesProxy()));this.chartMenuContext={chartController:this.chartController,chartOptionsService:this.chartOptionsService,chartMenuParamsFactory:e,chartAxisMenuParamsFactory:n}}getChartThemeName(){return this.chartController.getChartThemeName()}getChartThemes(){return this.chartController.getThemeNames()}getGridOptionsChartThemeOverrides(){return this.gos.get("chartThemeOverrides")}static createChartProxy(e){switch(e.chartType){case"column":case"bar":case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":return new p5i(e);case"pie":case"donut":case"doughnut":return new w5i(e);case"area":case"stackedArea":case"normalizedArea":return new u5i(e);case"line":return new f5i(e);case"scatter":case"bubble":return new g5i(e);case"histogram":return new m5i(e);case"radarLine":case"radarArea":case"nightingale":case"radialColumn":case"radialBar":return new S5i(e);case"rangeBar":case"rangeArea":return new P5i(e);case"boxPlot":return new A5i(e);case"treemap":case"sunburst":return new x5i(e);case"heatmap":return new k5i(e);case"waterfall":return new v5i(e);case"columnLineCombo":case"areaColumnCombo":case"customCombo":return new y5i(e);default:throw`AG Grid: Unable to create chart as an invalid chartType = '${e.chartType}' was supplied.`}}addDialog(){let e=this.chartTranslationService.translate(this.params.pivotChart?"pivotChartTitle":"rangeChartTitle"),{width:n,height:i}=this.getBestDialogSize(),r=this.params.focusDialogOnOpen?()=>setTimeout(()=>this.focusService.focusInto(this.getGui())):void 0;this.chartDialog=new ZR({resizable:!0,movable:!0,maximizable:!0,title:e,width:n,height:i,component:this,centered:!0,closable:!0,afterGuiAttached:r,postProcessPopupParams:{type:"chart"}}),this.createBean(this.chartDialog),this.chartDialog.addEventListener("destroyed",()=>{this.destroy(),this.chartMenuService.hideAdvancedSettings();let s=this.focusService.getFocusedCell();setTimeout(()=>{s?this.focusService.setFocusedCell(St(ve({},s),{forceBrowserFocus:!0})):this.focusService.focusGridInnerElement()})})}getBestDialogSize(){let e=this.popupService.getPopupParent(),n=v5(e)*.75,i=TA(e)*.75,r=.553,s=this.chartProxy.getChart(),o=this.params.insideDialog?850:s.width,a=this.params.insideDialog?470:s.height;return(o>n||a>i)&&(o=Math.min(o,n),a=Math.round(o*r),a>i&&(a=i,o=Math.min(o,Math.round(a/r)))),{width:o,height:a}}addMenu(){this.params.crossFiltering||(this.chartMenu=this.createBean(new QCi(this.eChartContainer,this.eMenuContainer,this.chartMenuContext)),this.eChartContainer.appendChild(this.chartMenu.getGui()))}update(e){if(e?.chartId&&!this.chartController.update(e))return;let n=this.chartTypeChanged(e),i=n||this.chartEmpty?(s=>{let o=this.chartType,a=s,l=this.chartProxy.getChart(),c=l?.getOptions(),d=l?.axes;return this.chartOptionsService.getPersistedChartThemeOverrides(c,d,o,a??o)})(n):void 0;n&&this.createChart(),i&&e?.chartThemeOverrides&&im(i,e.chartThemeOverrides);let r=i??e?.chartThemeOverrides;this.updateChart(r),e?.chartId&&this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartApiUpdateEvent()})}updateChart(e){let{chartProxy:n}=this,i=this.chartController.getSelectedValueColState(),r=this.chartController.getChartData(),s=this.handleEmptyChart(r,i.length);if(this.chartEmpty=s,s){e&&this.chartController.updateThemeOverrides(e);return}let o=this.chartController.getChartUpdateParams(e);n.update(o),this.chartProxy.getChart().waitForUpdate().then(()=>{this.chartController.raiseChartUpdatedEvent()})}chartTypeChanged(e){let[n,i]=[this.chartController.getChartType(),e?.chartType],r=i?dW(i):void 0;return this.chartType!==n?r??n:r&&n!==r?r:null}getChartModel(){return this.chartController.getChartModel()}getChartImageDataURL(e){return this.chartProxy.getChartImageDataURL(e)}handleEmptyChart(e,n){let i=this.chartController.isPivotChart()&&!this.chartController.isPivotMode(),r=this.chartController.getChartType(),s=1;this.chartController.isActiveXYChart()?s=r==="bubble"?3:2:WE(oh(r))&&(s=0);let o=n<s||e.length===0;if(this.eChart){let a=i||o;Vn(this.eChart,!a),Vn(this.eEmpty,a)}return i?(this.eEmpty.innerText=this.chartTranslationService.translate("pivotChartRequiresPivotMode"),!0):o?(this.eEmpty.innerText=this.chartTranslationService.translate("noDataToChart"),!0):!1}downloadChart(e,n,i){this.chartProxy.downloadChart(e,n,i)}openChartToolPanel(e){let n=e&&nie[e];this.chartMenu.showMenu({panel:n})}closeChartToolPanel(){this.chartMenu.hideMenu()}getChartId(){return this.chartController.getChartId()}getUnderlyingChart(){return this.chartProxy.getChartRef()}crossFilteringReset(){this.chartProxy.crossFilteringReset()}setActiveChartCellRange(e){this.getGui().contains(e.relatedTarget)||(this.chartController.setChartRange(!0),this.focusService.clearFocusedCell())}getThemeName(){let e=this.gos.get("chartThemes")||kot;if(e.length===0)throw new Error("Cannot create chart: no chart themes available.");let{chartThemeName:n}=this.params;return Sl(e,n)?n:e[0]}getAllKeysInObjects(e){let n={};return e.filter(i=>i!=null).forEach(i=>{Object.keys(i).forEach(r=>n[r]=null)}),Object.keys(n)}validateCustomThemes(){let e=this.getChartThemes(),n=this.gos.get("customChartThemes");n&&this.getAllKeysInObjects([n]).forEach(i=>{Sl(e,i)||wt("a custom chart theme with the name '"+i+"' has been supplied but not added to the 'chartThemes' list")})}reactivePropertyUpdate(){this.chartController.setChartThemeName(this.getThemeName(),!0);let e=this.getChartId(),n=this.chartController.isCrossFilterChart()?"crossFilter":this.getChartModel().modelType,i=this.gos.get("chartThemeOverrides")||{};this.update({type:`${n}ChartUpdate`,chartId:e,chartThemeOverrides:i})}raiseChartCreatedEvent(){this.chartProxy.getChart().waitForUpdate().then(()=>{this.eventService.dispatchEvent({type:"chartCreated",chartId:this.chartController.getChartId()})})}raiseChartDestroyedEvent(){this.eventService.dispatchEvent({type:"chartDestroyed",chartId:this.chartController.getChartId()})}destroy(){super.destroy(),this.chartProxy&&this.chartProxy.destroy(),this.destroyBean(this.chartMenu),this.chartDialog&&this.chartDialog.isAlive()&&this.destroyBean(this.chartDialog),this.onDestroyColorSchemeChangeListener?.();let e=this.getGui();zo(e),dc(e),this.raiseChartDestroyedEvent()}},uW=!1;Est=(t,e)=>ve(ve({},t),e),Mst=(()=>{let t=class extends Ot{constructor(){super(...arguments),this.beanName="chartService",this.activeCharts=new Set,this.activeChartComps=new Set,this.crossFilteringContext={lastSelectedChartId:""},this.isEnterprise=()=>R3.enterpriseModule.isEnterprise}wireBeans(e){this.visibleColsService=e.visibleColsService,this.rangeService=e.rangeService,this.environment=e.environment,this.focusService=e.focusService}updateChart(e){if(this.activeChartComps.size===0){wt("No active charts to update.");return}let n=[...this.activeChartComps].find(i=>i.getChartId()===e.chartId);if(!n){wt(`Unable to update chart. No active chart found with ID: ${e.chartId}.`);return}n.update(e)}getChartModels(){let e=[],n=i=>St(ve({},i),{version:UE});return this.activeChartComps.forEach(i=>e.push(n(i.getChartModel()))),e}getChartRef(e){let n;return this.activeCharts.forEach(i=>{i.chartId===e&&(n=i)}),n}getChartComp(e){let n;return this.activeChartComps.forEach(i=>{i.getChartId()===e&&(n=i)}),n}getChartImageDataURL(e){let n;return this.activeChartComps.forEach(i=>{i.getChartId()===e.chartId&&(n=i.getChartImageDataURL(e.fileFormat))}),n}downloadChart(e){Array.from(this.activeChartComps).find(i=>i.getChartId()===e.chartId)?.downloadChart(e.dimensions,e.fileName,e.fileFormat)}openChartToolPanel(e){Array.from(this.activeChartComps).find(i=>i.getChartId()===e.chartId)?.openChartToolPanel(e.panel)}closeChartToolPanel(e){Array.from(this.activeChartComps).find(i=>i.getChartId()===e)?.closeChartToolPanel()}createChartFromCurrentRange(e="groupedColumn",n){let i=this.getSelectedRange();return this.createChart({cellRange:i,chartType:e,focusDialogOnOpen:!n})}restoreChart(e,n){if(!e){wt("unable to restore chart as no chart model is provided");return}e.version!==UE&&(e=r8i(e));let i,r,s,o;if(e.modelType==="pivot"?(this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"}),i=this.createCellRange(void 0,!0),r=!0,s=!0):(i=this.createCellRange(e.cellRange),o=e.chartPalette,s=e.suppressChartRanges),!!i)return this.createChart(St(ve({},e),{cellRange:i,pivotChart:r,suppressChartRanges:s,chartContainer:n,chartOptionsToRestore:e.chartOptions,chartPaletteToRestore:o}))}createRangeChart(e,n){let i=this.createCellRange(e.cellRange);if(i)return this.createChart(St(ve({},e),{cellRange:i,focusDialogOnOpen:!n}))}createPivotChart(e,n){this.gos.updateGridOptions({options:{pivotMode:!0},source:"pivotChart"});let i=this.createCellRange(void 0,!0);if(i)return this.createChart(St(ve({},e),{cellRange:i,pivotChart:!0,suppressChartRanges:!0,focusDialogOnOpen:!n}))}createCrossFilterChart(e,n){let i=this.createCellRange(e.cellRange);if(!i)return;let s=typeof e.suppressChartRanges<"u"&&e.suppressChartRanges!==null?e.suppressChartRanges:!0;return this.createChart(St(ve({},e),{cellRange:i,suppressChartRanges:s,crossFiltering:!0,focusDialogOnOpen:!n}))}createChart(e){let n=Mot.validateCreateParams(e);if(!n)return;e=n===!0?e:n;let{chartType:i,chartContainer:r}=e,s=this.gos.getCallback("createChartContainer"),o=St(ve({},e),{chartId:this.generateId(),chartType:dW(i),insideDialog:!(r||s),crossFilteringContext:this.crossFilteringContext,crossFilteringResetCallback:()=>this.activeChartComps.forEach(c=>c.crossFilteringReset())}),a=new n8i(o);this.createBean(a);let l=this.createChartRef(a);if(r){r.appendChild(a.getGui());let c=this.environment.getThemeAncestorElement();c&&!c.contains(r)&&this.environment.applyThemeClasses(r)}else s?s(l):a.addEventListener("destroyed",()=>{this.activeChartComps.delete(a),this.activeCharts.delete(l)});return l}createChartRef(e){let n={destroyChart:()=>{this.activeCharts.has(n)&&(this.destroyBean(e),this.activeChartComps.delete(e),this.activeCharts.delete(n))},focusChart:()=>{this.focusService.focusInto(e.getGui())},chartElement:e.getGui(),chart:e.getUnderlyingChart(),chartId:e.getChartModel().chartId};return this.activeCharts.add(n),this.activeChartComps.add(e),n}getSelectedRange(){let e=this.rangeService?.getCellRanges()??[];return e.length>0?e[0]:{columns:[]}}generateId(){return`id-${Math.random().toString(36).substring(2,18)}`}createCellRange(e,n){let i=n?{rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.visibleColsService.getAllCols().map(s=>s.getColId())}:e,r=i&&this.rangeService?.createPartialCellRangeFromRangeParams(i,!0);return r||wt(`unable to create chart as ${n?"there are no columns in the grid":"no range is selected"}.`),r}destroy(){this.activeCharts.forEach(e=>e.destroyChart()),super.destroy()}};return t.CHARTS_VERSION=GG,t})();qot=28,Zot=6;Xot={version:UE,validate:()=>R8i({gridVersion:UE,chartsVersion:Mst.CHARTS_VERSION}),moduleName:`${wr.GridChartsModule}-core`,beans:[Mst,q_i,j_i,W_i,K_i,H_i],userComponents:[{name:"agMenuItem",classImp:KE}],dependantModules:[lbe,y1]},F8i={version:UE,moduleName:`${wr.GridChartsModule}-api`,apiFunctions:{getChartModels:C8i,getChartRef:x8i,getChartImageDataURL:b8i,downloadChart:w8i,openChartToolPanel:S8i,closeChartToolPanel:T8i,createRangeChart:D8i,createPivotChart:E8i,createCrossFilterChart:M8i,updateChart:k8i,restoreChart:I8i},dependantModules:[Xot]},vbe={version:UE,moduleName:wr.GridChartsModule,dependantModules:[Xot,F8i]},Qot={time:mte,AgCharts:DE};Dxe="paste",Exe="dragCopy",kst="clipboard",Ist=t=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${t}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,H8i=class Jot extends Ot{constructor(){super(...arguments),this.beanName="clipboardService",this.lastPasteOperationTime=0,this.navigatorApiFailed=!1}wireBeans(e){this.csvCreator=e.csvCreator,this.selectionService=e.selectionService,this.rowModel=e.rowModel,this.ctrlsService=e.ctrlsService,this.valueService=e.valueService,this.focusService=e.focusService,this.rowRenderer=e.rowRenderer,this.visibleColsService=e.visibleColsService,this.funcColsService=e.funcColsService,this.cellNavigationService=e.cellNavigationService,this.cellPositionUtils=e.cellPositionUtils,this.rowPositionUtils=e.rowPositionUtils,this.rangeService=e.rangeService}postConstruct(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl})}pasteFromClipboard(){!this.gos.get("suppressClipboardApi")&&!this.navigatorApiFailed&&navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch(n=>{wt(`${n}
${Ist("readText")}`),this.navigatorApiFailed=!0,this.pasteFromClipboardLegacy()}):this.pasteFromClipboardLegacy()}pasteFromClipboardLegacy(){let e=!1,n=i=>{let r=new Date().getTime();r-this.lastPasteOperationTime<50&&(e=!0,i.preventDefault()),this.lastPasteOperationTime=r};this.executeOnTempElement(i=>{i.addEventListener("paste",n),i.focus({preventScroll:!0})},i=>{let r=i.value;e?this.refocusLastFocusedCell():this.processClipboardData(r),i.removeEventListener("paste",n)})}refocusLastFocusedCell(){let e=this.focusService.getFocusedCell();e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0})}getClipboardDelimiter(){let e=this.gos.get("clipboardDelimiter");return Di(e)?e:"	"}processClipboardData(e){if(e==null)return;let n=Jot.stringToArray(e,this.getClipboardDelimiter()),i=this.gos.getCallback("processDataFromClipboard");if(i&&(n=i({data:n})),n==null)return;this.gos.get("suppressLastEmptyLineOnPaste")&&this.removeLastLineIfBlank(n);let r=(s,o,a,l)=>{this.rangeService?.isMoreThanOneCell()&&!this.hasOnlyOneValueToPaste(n)?this.pasteIntoActiveRange(this.rangeService,n,s,o,l):this.pasteStartingFromFocusedCell(n,s,o,a,l)};this.doPasteOperation(r)}static stringToArray(e,n=","){let i=[],r=o=>o==="\r"||o===`
`,s=!1;if(e==="")return[[""]];for(let o=0,a=0,l=0;l<e.length;l++){let c=e[l-1],d=e[l],u=e[l+1],m=()=>{i[o]||(i[o]=[]),i[o][a]||(i[o][a]="")};if(m(),d==='"'&&(s?u==='"'?(i[o][a]+='"',l++):s=!1:(c===void 0||c===n||r(c))&&(s=!0)),!s&&d!=='"'){if(d===n){a++,m();continue}else if(r(d)){a=0,o++,m(),d==="\r"&&u===`
`&&l++;continue}}i[o][a]+=d}return i}doPasteOperation(e){let n="clipboard";this.eventService.dispatchEvent({type:"pasteStart",source:n});let i;if(this.clientSideRowModel){let l=this.gos.get("aggregateOnlyChangedColumns");i=new MA(l,this.clientSideRowModel.getRootNode())}let r={},s=[],o=this.focusService.getFocusedCell();e(r,s,o,i);let a=[...s];i&&(this.clientSideRowModel.doAggregate(i),i.forEachChangedNodeDepthFirst(l=>{a.push(l)})),this.rowRenderer.refreshCells({rowNodes:a}),this.dispatchFlashCells(r),this.fireRowChanged(s),this.refocusLastFocusedCell(),this.eventService.dispatchEvent({type:"pasteEnd",source:n})}pasteIntoActiveRange(e,n,i,r,s){let o=this.getRangeSize(e)%n.length!=0,a=0,l=0,c=(d,u,m,f)=>{if(f-a>=n.length){if(o)return;a+=l,l=0}let x=n[f-a];r.push(u);let D=this.gos.getCallback("processCellFromClipboard");m.forEach((E,M)=>{if(!E.isCellEditable(u)||E.isSuppressPaste(u))return;M>=x.length&&(M=M%x.length);let I=this.processCell(u,E,x[M],Exe,D,!0);u.setDataValue(E,I,Dxe),s&&s.addParentNode(u.parent,[E]);let{rowIndex:z,rowPinned:G}=d,A=this.cellPositionUtils.createIdFromValues({rowIndex:z,column:E,rowPinned:G});i[A]=!0}),l++};this.iterateActiveRanges(!1,c)}getDisplayedColumnsStartingAt(e){let n=e,i=[];for(;n!=null;)i.push(n),n=this.visibleColsService.getColAfter(n);return i}pasteStartingFromFocusedCell(e,n,i,r,s){if(!r)return;let o={rowIndex:r.rowIndex,rowPinned:r.rowPinned},a=this.getDisplayedColumnsStartingAt(r.column);this.isPasteSingleValueIntoRange(e)?this.pasteSingleValueIntoRange(e,i,n,s):this.pasteMultipleValues(e,o,i,a,n,kst,s)}isPasteSingleValueIntoRange(e){return this.hasOnlyOneValueToPaste(e)&&this.rangeService!=null&&!this.rangeService.isEmpty()}pasteSingleValueIntoRange(e,n,i,r){let s=e[0][0],o=(a,l,c)=>{n.push(l),c.forEach(d=>this.updateCellValue(l,d,s,i,kst,r))};this.iterateActiveRanges(!1,o)}hasOnlyOneValueToPaste(e){return e.length===1&&e[0].length===1}copyRangeDown(){if(!this.rangeService||this.rangeService.isEmpty())return;let e=[],n=(i,r,s,o)=>{let a=this.gos.getCallback("processCellForClipboard"),l=this.gos.getCallback("processCellFromClipboard"),c=(d,u,m)=>{e.length?(r.push(u),m.forEach((f,_)=>{if(!f.isCellEditable(u)||f.isSuppressPaste(u))return;let x=this.processCell(u,f,e[_],Exe,l,!0);u.setDataValue(f,x,Dxe),o&&o.addParentNode(u.parent,[f]);let{rowIndex:D,rowPinned:E}=d,M=this.cellPositionUtils.createIdFromValues({rowIndex:D,column:f,rowPinned:E});i[M]=!0})):m.forEach(f=>{let _=this.processCell(u,f,this.valueService.getValue(f,u),Exe,a,!1,!0);e.push(_)})};this.iterateActiveRanges(!0,c)};this.doPasteOperation(n)}removeLastLineIfBlank(e){let n=Ar(e);if(n&&n.length===1&&n[0]===""){if(e.length===1)return;Ip(e,n)}}fireRowChanged(e){this.gos.get("editType")==="fullRow"&&e.forEach(n=>{this.eventService.dispatchEvent({type:"rowValueChanged",node:n,data:n.data,rowIndex:n.rowIndex,rowPinned:n.rowPinned})})}pasteMultipleValues(e,n,i,r,s,o,a){let l=n,c=this.clientSideRowModel!=null&&!this.gos.get("enableGroupEdit")&&!this.gos.get("treeData"),d=()=>{for(;;){if(!l)return null;let u=this.rowPositionUtils.getRowNode(l);if(l=this.cellNavigationService.getRowBelow({rowPinned:l.rowPinned,rowIndex:l.rowIndex}),u==null)return null;if(!(u.detail||u.footer||c&&u.group))return u}};e.forEach(u=>{let m=d();m&&(u.forEach((f,_)=>this.updateCellValue(m,r[_],f,s,o,a)),i.push(m))})}updateCellValue(e,n,i,r,s,o){if(!e||!n||!n.isCellEditable(e)||n.isSuppressPaste(e)||e.group&&n.isValueActive())return;let a=this.processCell(e,n,i,s,this.gos.getCallback("processCellFromClipboard"),!0);e.setDataValue(n,a,Dxe);let{rowIndex:l,rowPinned:c}=e,d=this.cellPositionUtils.createIdFromValues({rowIndex:l,column:n,rowPinned:c});r[d]=!0,o&&o.addParentNode(e.parent,[n])}copyToClipboard(e={}){this.copyOrCutToClipboard(e)}cutToClipboard(e={},n="api"){this.gos.get("suppressCutToClipboard")||(this.eventService.dispatchEvent({type:"cutStart",source:n}),this.copyOrCutToClipboard(e,!0),this.eventService.dispatchEvent({type:"cutEnd",source:n}))}copyOrCutToClipboard(e,n){let{includeHeaders:i,includeGroupHeaders:r}=e;i==null&&(i=this.gos.get("copyHeadersToClipboard")),r==null&&(r=this.gos.get("copyGroupHeadersToClipboard"));let s={includeHeaders:i,includeGroupHeaders:r},o=!this.gos.get("suppressCopyRowsToClipboard"),a=null;this.rangeService&&!this.rangeService.isEmpty()&&!this.shouldSkipSingleCellRange(this.rangeService)?(this.copySelectedRangeToClipboard(s),a=0):o&&!this.selectionService.isEmpty()?(this.copySelectedRowsToClipboard(s),a=1):this.focusService.isAnyCellFocused()&&(this.copyFocusedCellToClipboard(s),a=2),n&&a!==null&&this.clearCellsAfterCopy(a)}clearCellsAfterCopy(e){if(this.eventService.dispatchEvent({type:"keyShortcutChangedCellStart"}),e===0)this.rangeService.clearCellRangeCellValues({cellEventSource:"clipboardService"});else if(e===1)this.clearSelectedRows();else{let n=this.focusService.getFocusedCell();if(n==null)return;let i=this.rowPositionUtils.getRowNode(n);i&&this.clearCellValue(i,n.column)}this.eventService.dispatchEvent({type:"keyShortcutChangedCellEnd"})}clearSelectedRows(){let e=this.selectionService.getSelectedNodes(),n=this.visibleColsService.getAllCols();for(let i of e)for(let r of n)this.clearCellValue(i,r)}clearCellValue(e,n){if(!n.isCellEditable(e))return;let i=this.valueService.parseValue(n,e,"",e.getValueFromValueService(n))??null;e.setDataValue(n,i,"clipboardService")}shouldSkipSingleCellRange(e){return this.gos.get("suppressCopySingleCellRanges")&&!e.isMoreThanOneCell()}iterateActiveRanges(e,n,i){if(!this.rangeService||this.rangeService.isEmpty())return;let r=this.rangeService.getCellRanges();e?this.iterateActiveRange(r[0],n,i,!0):r.forEach((s,o)=>this.iterateActiveRange(s,n,i,o===r.length-1))}iterateActiveRange(e,n,i,r){if(!this.rangeService)return;let s=this.rangeService.getRangeStartRow(e),o=this.rangeService.getRangeEndRow(e);i&&e.columns&&i(e.columns);let a=0,l=!1;for(;!l&&s!=null;){let c=this.rowPositionUtils.getRowNode(s);l=this.rowPositionUtils.sameRow(s,o),n(s,c,e.columns,a++,l&&r),s=this.cellNavigationService.getRowBelow(s)}}copySelectedRangeToClipboard(e={}){if(!this.rangeService||this.rangeService.isEmpty())return;let n=this.rangeService.areAllRangesAbleToMerge(),{data:i,cellsToFlash:r}=n?this.buildDataFromMergedRanges(this.rangeService,e):this.buildDataFromRanges(this.rangeService,e);this.copyDataToClipboard(i),this.dispatchFlashCells(r)}buildDataFromMergedRanges(e,n){let i=new Set,r=e.getCellRanges(),s=new Map,o=[],a={};r.forEach(u=>{u.columns.forEach(_=>i.add(_));let{rowPositions:m,cellsToFlash:f}=this.getRangeRowPositionsAndCellsToFlash(e,u);m.forEach(_=>{let x=`${_.rowIndex}-${_.rowPinned||"null"}`;s.get(x)||(s.set(x,!0),o.push(_))}),Object.assign(a,f)});let l=this.visibleColsService.getAllCols(),c=Array.from(i);return c.sort((u,m)=>{let f=l.indexOf(u),_=l.indexOf(m);return f-_}),{data:this.buildExportParams({columns:c,rowPositions:o,includeHeaders:n.includeHeaders,includeGroupHeaders:n.includeGroupHeaders}),cellsToFlash:a}}buildDataFromRanges(e,n){let i=e.getCellRanges(),r=[],s={};return i.forEach(o=>{let{rowPositions:a,cellsToFlash:l}=this.getRangeRowPositionsAndCellsToFlash(e,o);Object.assign(s,l),r.push(this.buildExportParams({columns:o.columns,rowPositions:a,includeHeaders:n.includeHeaders,includeGroupHeaders:n.includeGroupHeaders}))}),{data:r.join(`
`),cellsToFlash:s}}getRangeRowPositionsAndCellsToFlash(e,n){let i=[],r={},s=e.getRangeStartRow(n),o=e.getRangeEndRow(n),a=s;for(;a&&(i.push(a),n.columns.forEach(l=>{let{rowIndex:c,rowPinned:d}=a,u=this.cellPositionUtils.createIdFromValues({rowIndex:c,column:l,rowPinned:d});r[u]=!0}),!this.rowPositionUtils.sameRow(a,o));)a=this.cellNavigationService.getRowBelow(a);return{rowPositions:i,cellsToFlash:r}}getCellsToFlashFromRowNodes(e){let n=this.visibleColsService.getAllCols(),i={};for(let r=0;r<e.length;r++){let{rowIndex:s,rowPinned:o}=e[r];if(s!=null)for(let a=0;a<n.length;a++){let l=n[a],c=this.cellPositionUtils.createIdFromValues({rowIndex:s,column:l,rowPinned:o});i[c]=!0}}return i}copyFocusedCellToClipboard(e={}){let n=this.focusService.getFocusedCell();if(n==null)return;let i=this.cellPositionUtils.createId(n),r={rowPinned:n.rowPinned,rowIndex:n.rowIndex},s=n.column,o=this.buildExportParams({columns:[s],rowPositions:[r],includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});this.copyDataToClipboard(o),this.dispatchFlashCells({[i]:!0})}copySelectedRowsToClipboard(e={}){let{columnKeys:n,includeHeaders:i,includeGroupHeaders:r}=e,s=this.buildExportParams({columns:n,includeHeaders:i,includeGroupHeaders:r});this.copyDataToClipboard(s);let o=this.selectionService.getSelectedNodes()||[];this.dispatchFlashCells(this.getCellsToFlashFromRowNodes(o))}buildExportParams(e){let{columns:n,rowPositions:i,includeHeaders:r=!1,includeGroupHeaders:s=!1}=e,o={columnKeys:n,rowPositions:i,skipColumnHeaders:!r,skipColumnGroupHeaders:!s,suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!i,processCellCallback:this.gos.getCallback("processCellForClipboard"),processRowGroupCallback:a=>this.processRowGroupCallback(a),processHeaderCallback:this.gos.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:this.gos.getCallback("processGroupHeaderForClipboard")};return this.csvCreator.getDataAsCsv(o,!0)}processRowGroupCallback(e){let{node:n,column:i}=e,r=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),a=(()=>{if(r||s||!i)return n.key;let c=n.groupData?.[i.getId()];return!c||!n.rowGroupColumn||n.rowGroupColumn.getColDef().useValueFormatterForExport===!1?c:this.valueService.formatValue(n.rowGroupColumn,n,c)??c})();if(e.node.footer){let c="";a&&a.length&&(c=` ${a}`),a=`Total${c}`}let l=this.gos.getCallback("processCellForClipboard");if(l){let c=n.rowGroupColumn;return!c&&n.footer&&n.level===-1&&(c=this.funcColsService.getRowGroupColumns()[0]),l({value:a,node:n,column:c,type:"clipboard",formatValue:d=>this.valueService.formatValue(c,n,d)??d,parseValue:d=>this.valueService.parseValue(c,n,d,this.valueService.getValue(c,n))})}return a}dispatchFlashCells(e){window.setTimeout(()=>{this.eventService.dispatchEvent({type:"flashCells",cells:e})},0)}processCell(e,n,i,r,s,o,a){return s?s({column:n,node:e,value:i,type:r,formatValue:c=>this.valueService.formatValue(n,e??null,c)??c,parseValue:c=>this.valueService.parseValue(n,e??null,c,this.valueService.getValue(n,e))}):o&&n.getColDef().useValueParserForImport!==!1?this.valueService.parseValue(n,e??null,i,this.valueService.getValue(n,e)):a&&n.getColDef().useValueFormatterForExport!==!1?this.valueService.formatValue(n,e??null,i)??i:i}copyDataToClipboard(e){let n=this.gos.getCallback("sendToClipboard");if(n){n({data:e});return}if(!this.gos.get("suppressClipboardApi")&&navigator.clipboard){navigator.clipboard.writeText(e).catch(r=>{wt(`${r}
${Ist("writeText")}`),this.copyDataToClipboardLegacy(e)});return}this.copyDataToClipboardLegacy(e)}copyDataToClipboardLegacy(e){this.executeOnTempElement(n=>{let i=this.gos.getDocument(),r=this.gos.getActiveDomElement();n.value=e||" ",n.select(),n.focus({preventScroll:!0}),i.execCommand("copy")||wt("Browser did not allow document.execCommand('copy'). Ensure api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons."),r!=null&&r.focus!=null&&r.focus({preventScroll:!0})})}executeOnTempElement(e,n){let i=this.gos.getDocument(),r=i.createElement("textarea");r.style.width="1px",r.style.height="1px",r.style.top=i.documentElement.scrollTop+"px",r.style.left=i.documentElement.scrollLeft+"px",r.style.position="absolute",r.style.opacity="0";let s=this.gridCtrl.getGui();s.appendChild(r);try{e(r)}catch{wt("Browser does not support document.execCommand('copy') for clipboard operations")}n?window.setTimeout(()=>{n(r),s.removeChild(r)},100):s.removeChild(r)}getRangeSize(e){let n=e.getCellRanges(),i=0,r=0;return n.length>0&&(i=e.getRangeStartRow(n[0]).rowIndex,r=e.getRangeEndRow(n[0]).rowIndex),i-r+1}},ybe="32.1.0",eat={version:ybe,moduleName:`${wr.ClipboardModule}-core`,beans:[H8i],dependantModules:[y1,rz]},G8i={version:ybe,moduleName:`${wr.ClipboardModule}-api`,apiFunctions:{copyToClipboard:L8i,cutToClipboard:O8i,copySelectedRowsToClipboard:N8i,copySelectedRangeToClipboard:V8i,copySelectedRangeDown:B8i,pasteFromClipboard:z8i},dependantModules:[eat]},tat={version:ybe,moduleName:wr.ClipboardModule,dependantModules:[eat,G8i]},W8i={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},U8i=class extends Ot{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){let t=this.aggFuncsMap;t.sum=j8i,t.first=$8i,t.last=K8i,t.min=Y8i,t.max=q8i,t.count=Z8i,t.avg=X8i,this.initialised=!0}isAggFuncPossible(t,e){let n=this.getFuncNames(t),i=Sl(n,e),r=Di(this.aggFuncsMap[e]);return i&&r}getDefaultFuncLabel(t){return W8i[t]??t}getDefaultAggFunc(t){let e=t.getColDef().defaultAggFunc;if(Di(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";let n=this.getFuncNames(t);return _5(n)?n[0]:null}addAggFuncs(t){this.init(),Rh(t,(e,n)=>{this.aggFuncsMap[e]=n})}getAggFunc(t){return this.init(),this.aggFuncsMap[t]}getFuncNames(t){let e=t.getColDef().allowedAggFuncs;return e??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};Q8i=class extends Ot{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(t){this.columnModel=t.columnModel,this.aggFuncService=t.aggFuncService,this.funcColsService=t.funcColsService,this.pivotResultColsService=t.pivotResultColsService,this.valueService=t.valueService}execute(t){let e=Gd(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),i=t.changedPath&&t.changedPath.isActive();if(e&&n&&i)return;let r=this.createAggDetails(t);this.recursivelyCreateAggData(r)}createAggDetails(t){let e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),i=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!this.gos.getGrandTotalRow(),changedPath:t.changedPath,valueColumns:n,pivotColumns:i,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return this.gos.getGroupAggFiltering()!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(t){let e=n=>{if(!n.hasChildren()){n.aggData&&n.setAggData(null);return}if(n.level===-1&&!t.groupIncludeTotalFooter){let s=!this.columnModel.isPivotMode();if(!t.alwaysAggregateAtRootLevel&&s){n.setAggData(null);return}}this.aggregateRowNode(n,t)};t.changedPath.forEachChangedNodeDepthFirst(e,!0)}aggregateRowNode(t,e){let n=e.valueColumns.length===0,i=e.pivotColumns.length===0,r;e.userAggFunc?r=e.userAggFunc({nodes:t.childrenAfterFilter}):n?r=null:i?r=this.aggregateRowNodeUsingValuesOnly(t,e):r=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(r),t.sibling&&t.sibling.setAggData(r)}aggregateRowNodeUsingValuesAndPivot(t){let e={},n=this.pivotResultColsService.getPivotResultCols()?.list??[],i=!0;for(let r=0;r<n.length;r++){let s=n[r],o=s.getColDef();if(o.pivotTotalColumnIds!=null){i=!1;continue}let a=o.pivotKeys??[],l;t.leafGroup?l=this.getValuesFromMappedSet(t.childrenMapped,a,o.pivotValueColumn):l=this.getValuesPivotNonLeaf(t,o.colId),e[o.colId]=this.aggregateValues(l,o.pivotValueColumn.getAggFunc(),o.pivotValueColumn,t,s)}if(!i)for(let r=0;r<n.length;r++){let s=n[r],o=s.getColDef();if(o.pivotTotalColumnIds==null||!o.pivotTotalColumnIds.length)continue;let a=o.pivotTotalColumnIds.map(l=>e[l]);e[o.colId]=this.aggregateValues(a,o.pivotValueColumn.getAggFunc(),o.pivotValueColumn,t,s)}return e}aggregateRowNodeUsingValuesOnly(t,e){let n={},i=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,r=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,s=this.getValuesNormal(t,i,e.filteredOnly),o=t.aggData;return i.forEach((a,l)=>{n[a.getId()]=this.aggregateValues(s[l],a.getAggFunc(),a,t)}),r&&o&&r.forEach(a=>{n[a.getId()]=o[a.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let i=t;for(let r=0;r<e.length;r++){let s=e[r];i=i?i[s]:null}return i?i.map(r=>this.valueService.getValue(n,r)):[]}getValuesNormal(t,e,n){let i=[];e.forEach(()=>i.push([]));let r=e.length,s=n?t.childrenAfterFilter:t.childrenAfterGroup,o=s.length;for(let a=0;a<o;a++){let l=s[a];for(let c=0;c<r;c++){let d=e[c],u=this.valueService.getValue(d,l);i[c].push(u)}}return i}aggregateValues(t,e,n,i,r){let s=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof s!="function")return Do(`unrecognised aggregation function ${e}`),null;let o=s,a=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:r,rowNode:i,data:i?i.data:void 0});return o(a)}},J8i=class extends Ot{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.columnFactory=t.columnFactory}createAutoCols(t){let e=[],n=this.gos.get("treeData"),i=this.gos.isGroupMultiAutoColumn();return n&&i&&(wt('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),i=!1),i?t.forEach((r,s)=>{e.push(this.createOneAutoCol(r,s))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((n,i)=>this.updateOneAutoCol(n,i,e))}createOneAutoCol(t,e){let n;t?n=`${Xv}-${t.getId()}`:n=Xv;let i=this.createAutoColDef(n,t,e);i.colId=n;let r=new VZ(i,null,n,!0);return this.createBean(r),r}updateOneAutoCol(t,e,n){let i=t.getColDef(),r=typeof i.showRowGroup=="string"?i.showRowGroup:void 0,s=r!=null?this.columnModel.getColDefCol(r):void 0,o=this.createAutoColDef(t.getId(),s??void 0,e);t.setColDef(o,null,n),this.columnFactory.applyColumnState(t,o,n)}createAutoColDef(t,e,n){let i=this.createBaseColDef(e),r=this.gos.get("autoGroupColumnDef");im(i,r),i=this.columnFactory.addColumnDefaultAndTypes(i,t),this.gos.get("treeData")||Ls(i.field)&&Ls(i.valueGetter)&&Ls(i.filterValueGetter)&&i.filter!=="agGroupColumnFilter"&&(i.filter=!1),n&&n>0&&(i.headerCheckboxSelection=!1);let s=this.gos.isColumnsSortingCoupledToGroup(),o=i.valueGetter||i.field!=null;return s&&!o&&(i.sortIndex=void 0,i.initialSort=void 0),i}createBaseColDef(t){let e=this.gos.get("autoGroupColumnDef"),i={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(e&&(e.cellRenderer||e.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer"),t){let s=t.getColDef();Object.assign(i,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:s.headerValueGetter}),s.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:s.cellRenderer,innerRendererParams:s.cellRendererParams}}),i.showRowGroup=t.getColId()}else i.showRowGroup=!0;return i}},exi=class extends Qxe{constructor(t,e,n,i,r){super(e,n,r,`
                <span role="option">
                    <span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
                    <span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
                    <ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
                    <span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
                </span>
            `,[K3e]),this.column=t,this.dropZonePurpose=i,this.eSortIndicator=Bt,this.popupShowing=!1}wireBeans(t){super.wireBeans(t),this.popupService=t.popupService,this.sortController=t.sortController,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.aggFuncService=t.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(t,e){let n=this.gos.get("rowGroupPanelSuppressSort"),i=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!i){let r=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(r)}if(this.isGroupingZone()&&this.column.isSortable()&&!n){let r=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(r)}super.addAdditionalAriaInstructions(t,e)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){let t=this.localeService.getLocaleTextFunc(),{name:e,aggFuncName:n}=this.getColumnAndAggFuncName(),i=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),r={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},s=this.column.getSort(),o=this.gos.get("rowGroupPanelSuppressSort");return[n&&`${n}${i}`,e,this.isGroupingZone()&&!o&&s&&`, ${r[s]}`].filter(a=>!!a).join("")}getColumnAndAggFuncName(){let t=this.displayName,e="";if(this.isAggregationZone()){let n=this.column.getAggFunc(),i=typeof n=="string"?n:"agg";e=this.localeService.getLocaleTextFunc()(i,i)}return{name:t,aggFuncName:e}}setupSort(){let t=this.column.isSortable(),e=this.isGroupingZone();if(!(!t||!e)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);let n=i=>{i.preventDefault();let s=this.gos.get("multiSortKey")==="ctrl"?i.ctrlKey||i.metaKey:i.shiftKey;this.sortController.progressSort(this.column,s,"uiColumnSorted")};this.addGuiEventListener("click",n),this.addGuiEventListener("keydown",i=>{i.key===It.ENTER&&this.isGroupingZone()&&n(i)})}}getDefaultIconName(){return"hide"}createGetDragItem(){let{column:t}=this;return()=>{let e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(t){super.onKeyDown(t),t.key===It.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(t.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){let{name:t,aggFuncName:e}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${e}(${t})`:t}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;let t=new YE({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),n=this.getGui(),i=t.getGui();t.setModel({getRow:function(d){return e[d]},getRowCount:function(){return e.length}}),this.createBean(t);let r=Rp('<div class="ag-select-agg-func-popup"></div>');r.style.top="0px",r.style.left="0px",r.appendChild(i),r.style.width=`${n.clientWidth}px`;let[s]=this.addManagedElementListeners(r,{focusout:d=>{!r.contains(d.relatedTarget)&&l&&l.hideFunc()}}),o=d=>{this.destroyBean(t),this.popupShowing=!1,d?.key==="Escape"&&n.focus(),s&&s()},a=this.localeService.getLocaleTextFunc(),l=this.popupService.addPopup({modal:!0,eChild:r,closeOnEsc:!0,closedCallback:o,ariaLabel:a("ariaLabelAggregationFunction","Aggregation Function")});l&&t.setComponentCreator(this.createAggSelect.bind(this,l.hideFunc)),t.addGuiEventListener("keydown",d=>{if(d.key===It.ENTER||d.key===It.SPACE){let u=t.getLastFocusedRow();if(u==null)return;let m=t.getComponentAt(u);m&&m.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:r,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let c=e.findIndex(d=>d===this.column.getAggFunc());c===-1&&(c=0),t.focusRow(c)}createAggSelect(t,e){let n=()=>{t(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},i=this.localeService.getLocaleTextFunc(),r=e.toString(),s=i(r,r);return new txi(n,s)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return u1.ToolPanel}destroy(){super.destroy(),this.column=null}},txi=class extends ai{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},_be=class extends Jxe{constructor(t,e){super(t),this.dropZonePurpose=e}wireBeans(t){super.wireBeans(t),this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}init(t){super.init(t),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(t){return t.columns??[]}isInterestedIn(t){return t===u1.HeaderCell||t===u1.ToolPanel}minimumAllowedNewInsertIndex(){let t=this.gos.get("groupLockGroupColumns"),e=this.funcColsService.getRowGroupColumns().length;return t===-1?e:Math.min(t,e)}showOrHideColumnOnExit(t){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!t.fromNudge}handleDragEnterEnd(t){if(this.showOrHideColumnOnExit(t)){let i=t.dragSource.getDragItem().columns;this.setColumnsVisible(i,!1,"uiColumnDragged")}}handleDragLeaveEnd(t){if(this.showOrHideColumnOnExit(t)){let n=t.dragSource.getDragItem();this.setColumnsVisible(n.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,n){if(t){let i=t.filter(r=>!r.getColDef().lockVisible);this.columnModel.setColsVisible(i,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,i){return new exi(t,e,n,this.dropZonePurpose,i)}},die=class extends _be{constructor(t){super(t,"pivot")}postConstruct(){let t=this.localeService.getLocaleTextFunc(),e=t("pivotColumnsEmptyMessage","Drag here to set column labels"),n=t("pivots","Column Labels");super.init({icon:tr("pivotPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){let t=super.getTooltipParams();return t.location="pivotColumnsList",t}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){let t=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(t);break;case"onlyWhenPivoting":{let e=this.columnModel.isPivotActive();this.setDisplayed(t&&e);break}default:this.setDisplayed(!1);break}else this.setDisplayed(t)}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowPivot()&&(!t.isPivotActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setPivotColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},uie=class extends _be{constructor(t){super(t,"rowGroup")}postConstruct(){let t=this.localeService.getLocaleTextFunc(),e=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),n=t("groups","Row Groups");super.init({icon:tr("rowGroupPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){let t=super.getTooltipParams();return t.location="rowGroupColumnsList",t}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowRowGroup()&&(!t.isRowGroupActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setRowGroupColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},ixi=class extends ai{wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());let t=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:t,newColumnsLoaded:t}),this.addManagedPropertyListener("rowGroupPanelShow",t),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){let t=document.createElement("div");t.classList.add("ag-column-drop-wrapper"),dd(t,"presentation"),this.rowGroupComp=new uie(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new die(!0),this.createManagedBean(this.pivotComp),t.appendChild(this.rowGroupComp.getGui()),t.appendChild(this.pivotComp.getGui());let e=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:e}),this.addManagedListeners(this.pivotComp,{displayChanged:e}),this.onDropPanelVisible(),t}onDropPanelVisible(){let t=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),e="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(e,t),this.pivotComp.addOrRemoveCssClass(e,t)}onRowGroupChanged(){if(!this.rowGroupComp)return;let t=this.gos.get("rowGroupPanelShow");if(t==="always")this.rowGroupComp.setDisplayed(!0);else if(t==="onlyWhenGrouping"){let e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;let t=this.gos.get("pivotPanelShow");if(t==="always")this.pivotComp.setDisplayed(!0);else if(t==="onlyWhenPivoting"){let e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}},nxi={selector:"AG-GRID-HEADER-DROP-ZONES",component:ixi},rxi=class extends Ot{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return nxi}},sxi=class extends Ot{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){let e=this.columnModel.isPivotMode(),n=this.filterManager?.isAggregateFilterPresent()||this.filterManager?.isAggregateQuickFilterPresent(),i=c=>!c.node.group,r=c=>c.node.leafGroup,s=this.gos.getGroupAggFiltering()||(e?r:i),{changedPath:o}=t,a=(c,d=!1)=>{c.childrenAfterFilter&&(c.childrenAfterAggFilter=c.childrenAfterFilter,d&&c.childrenAfterAggFilter.forEach(u=>a(u,d)),this.setAllChildrenCount(c)),c.sibling&&(c.sibling.childrenAfterAggFilter=c.childrenAfterAggFilter)},l=c=>{c.childrenAfterAggFilter=c.childrenAfterFilter?.filter(d=>s({node:d})&&this.filterManager.doesRowPassAggregateFilters({rowNode:d})?(a(d,!0),!0):d.childrenAfterAggFilter?.length)||null,this.setAllChildrenCount(c),c.sibling&&(c.sibling.childrenAfterAggFilter=c.childrenAfterAggFilter)};o.forEachChangedNodeDepthFirst(n?l:a,!0)}setAllChildrenCountTreeData(t){let e=0;t.childrenAfterAggFilter.forEach(n=>{e++,e+=n.allChildrenCount}),t.setAllChildrenCount(e)}setAllChildrenCountGridGrouping(t){let e=0;t.childrenAfterAggFilter.forEach(n=>{n.group?e+=n.allChildrenCount:e++}),t.setAllChildrenCount(e)}setAllChildrenCount(t){if(!t.hasChildren()){t.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(t):this.setAllChildrenCountGridGrouping(t)}},oxi=class extends j1{constructor(){super(`
            <div class="ag-group-filter">
                <div data-ref="eGroupField"></div>
                <div data-ref="eUnderlyingFilter"></div>
            </div>
        `),this.eGroupField=Bt,this.eUnderlyingFilter=Bt}wireBeans(t){this.filterManager=t.filterManager,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(t){return this.updateParams(t).then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})})}refresh(t){return this.updateParams(t),!0}updateParams(t){return this.params=t,this.validateParams(),this.updateGroups()}validateParams(){let{colDef:t}=this.params;t.field&&wt('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&wt('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&wt('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){let t=this.updateGroupField();return this.getUnderlyingFilters(t)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return wt("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];let t=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return t||(wt("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){zo(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);let t=this.getSourceColumns(),e=t.filter(n=>n.isFilterAllowed());return e.length?(t.length===1?(this.selectedColumn=e[0],Vn(this.eGroupField,!1)):((!this.selectedColumn||!e.some(n=>n.getId()===this.selectedColumn.getId()))&&(this.selectedColumn=e[0]),this.createGroupFieldSelectElement(e),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(Rp('<div class="ag-filter-separator"></div>')),Vn(this.eGroupField,!0)),e):(this.selectedColumn=void 0,Vn(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new np);let e=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(e("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(t.map(n=>({value:n.getId(),text:this.columnNameService.getDisplayNameForColumn(n,"groupFilter",!1)??void 0}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(n=>this.updateSelectedColumn(n)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),t.length===1&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(t){if(!t)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),io.resolve();let e=[],n=[];return t.forEach(i=>{let r=this.filterManager.getOrCreateFilterWrapper(i);r?.filterPromise&&e.push(r.filterPromise.then(s=>(s&&n.push({filter:s,column:i}),i.getId()===this.selectedColumn.getId()&&(this.selectedFilter=s??void 0),s)))}),io.all(e).then(()=>{this.filterColumnPairs=n,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){if(zo(this.eUnderlyingFilter),!this.selectedColumn)return io.resolve();let t=this.createManagedBean(new CD(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=t,t.hasFilter()?(this.eUnderlyingFilter.appendChild(t.getGui()),t.getFilter()?.then(()=>{t.afterGuiAttached?.(this.afterGuiAttachedParams),!this.afterGuiAttachedParams?.suppressFocus&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()})??io.resolve()):io.resolve()}updateSelectedColumn(t){if(!t)return;this.filterWrapperComp?.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);let e=this.getFilterColumnPair(t);this.selectedColumn=e?.column,this.selectedFilter=e?.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){return!!this.filterColumnPairs?.some(({filter:t})=>t.isFilterActive())}doesFilterPass(){return!0}getModel(){return null}setModel(){return io.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){zo(this.eUnderlyingFilter),this.selectedFilter?.afterGuiDetached?.()}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}onFilterDestroyed({column:t,source:e}){if(e==="gridDestroyed")return;let n=t.getColId();this.filterColumnPairs?.some(({column:i})=>i.getColId()===n)&&setTimeout(()=>{this.updateGroups()})}getFilterColumnPair(t){if(t)return this.filterColumnPairs?.find(({column:e})=>e.getId()===t)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},axi=class extends ai{constructor(){super(`
            <div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>
        `),this.eFloatingFilter=Bt,this.haveAddedColumnListeners=!1}wireBeans(t){this.columnNameService=t.columnNameService,this.filterManager=t.filterManager}init(t){this.params=t;let e=this.gos.get("groupDisplayType")==="multipleColumns";return new io(n=>{this.params.parentFilterInstance(i=>{this.parentFilterInstance=i,e?this.setupUnderlyingFloatingFilterElement().then(()=>n()):(this.setupReadOnlyFloatingFilterElement(),n())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams()}setParams(){let t=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),e=this.localeService.getLocaleTextFunc();this.eFloatingFilterText?.setInputAriaLabel(`${t} ${e("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new yg),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,zo(this.eFloatingFilter);let t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){let e=this.filterManager.getFloatingFilterCompDetails(t,this.params.showParentFilter);if(e)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(t,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),e.newAgStackInstance().then(n=>{this.underlyingFloatingFilter=n,this.underlyingFloatingFilter?.onParentModelChanged(this.parentFilterInstance.getSelectedFilter()?.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),io.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){if(!t.column)return;let e=this.filterManager.getFloatingFilterCompDetails(t.column,this.params.showParentFilter);e&&(this.underlyingFloatingFilter?.refresh?this.underlyingFloatingFilter.refresh(e.params):this.underlyingFloatingFilter?.onParamsUpdated?.(e.params))}onParentModelChanged(t,e){this.showingUnderlyingFloatingFilter?this.underlyingFloatingFilter?.onParentModelChanged(this.parentFilterInstance.getSelectedFilter()?.getModel(),e):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;let t=this.parentFilterInstance.getSelectedFilter();if(!t){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),t.getModelAsString){let e=t.getModel();this.eFloatingFilterText.setValue(e==null?"":t.getModelAsString(e))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},rW=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(t,e){let n=this.getSet(t);n.removeFromChildrenAfterGroup[e.id]=!0}isRemoveFromAllLeafChildren(t,e){return!!this.getSet(t).removeFromAllLeafChildren[e.id]}preventRemoveFromAllLeafChildren(t,e){let n=this.getSet(t);delete n.removeFromAllLeafChildren[e.id]}removeFromAllLeafChildren(t,e){let n=this.getSet(t);n.removeFromAllLeafChildren[e.id]=!0}getSet(t){return this.allSets[t.id]||(this.allSets[t.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(t)),this.allSets[t.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(t=>{let e=this.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter(n=>!e.removeFromChildrenAfterGroup[n.id]),t.allLeafChildren=t.allLeafChildren?.filter(n=>!e.removeFromAllLeafChildren[n.id])??null,t.updateHasChildren(),t.sibling&&(t.sibling.childrenAfterGroup=t.childrenAfterGroup,t.sibling.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}},lxi=class extends Ot{wireBeans(t){this.beans=t,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.selectionService=t.selectionService,this.showRowGroupColsService=t.showRowGroupColsService}execute(t){let e=this.createGroupingDetails(t);if(e.transactions)this.handleTransaction(e);else{let n=t.afterColumnsChanged===!0;this.shotgunResetEverything(e,n)}this.positionLeafsAndGroups(t.changedPath),this.orderGroups(e)}positionLeafsAndGroups(t){t.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){let n=[],i=[],r;e.childrenAfterGroup.forEach(s=>{s.childrenAfterGroup?.length?s.key===""&&!r?r=s:i.push(s):n.push(s)}),r&&i.push(r),e.childrenAfterGroup=[...n,...i]}},!1)}createGroupingDetails(t){let{rowNode:e,changedPath:n,rowNodeTransactions:i,rowNodeOrder:r}=t,s=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:s,rootNode:e,pivotMode:this.columnModel.isPivotMode(),groupedColCount:s?.length??0,rowNodeOrder:r,transactions:i,changedPath:n,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:s?.map(a=>a.getColDef().keyCreator)??[]}}handleTransaction(t){t.transactions.forEach(e=>{let n=new rW;_5(e.remove)&&this.removeNodes(e.remove,t,n),_5(e.update)&&this.moveNodesInWrongPath(e.update,t,n),_5(e.add)&&this.insertNodes(e.add,t);let i=n.getAllParents().slice();n.flush(),this.removeEmptyGroups(i,t)}),t.rowNodeOrder&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{iz(e.childrenAfterGroup,t.rowNodeOrder)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){let e=t.initialGroupOrderComparator;Di(e)&&n(t.rootNode);function n(i){Di(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((s,o)=>e({nodeA:s,nodeB:o})),i.childrenAfterGroup.forEach(s=>n(s)))}}getExistingPathForNode(t,e){let n=[],i=t.parent;for(;i&&i!==e.rootNode;)n.push({key:i.key,rowGroupColumn:i.rowGroupColumn,field:i.field}),i=i.parent;return n.reverse(),n}moveNodesInWrongPath(t,e,n){t.forEach(i=>{e.changedPath.isActive()&&e.changedPath.addParentNode(i.parent);let r=l=>l.key,s=this.getExistingPathForNode(i,e).map(r),o=this.getGroupInfo(i,e).map(r);Cf(s,o)||this.moveNode(i,e,n)})}moveNode(t,e,n){if(this.removeNodesFromParents([t],e,n),this.insertOneNode(t,e,n),t.setData(t.data),e.changedPath.isActive()){let i=t.parent;e.changedPath.addParentNode(i)}}removeNodes(t,e,n){this.removeNodesFromParents(t,e,n),e.changedPath.isActive()&&t.forEach(i=>e.changedPath.addParentNode(i.parent))}forEachParentGroup(t,e,n){let i=e;for(;i&&i!==t.rootNode;)n(i),i=i.parent}removeNodesFromParents(t,e,n){let i=n==null,r=n||new rW;t.forEach(s=>{this.removeFromParent(s,r),this.forEachParentGroup(e,s.parent,o=>{r.removeFromAllLeafChildren(o,s)})}),i&&r.flush()}removeEmptyGroups(t,e){let n=!0,i=r=>{let s=this.getChildrenMappedKey(r.key,r.rowGroupColumn),o=r.parent;return(o?.childrenMapped?!o.childrenMapped[s]:!0)?!1:r.isEmptyRowGroupNode()};for(;n;){n=!1;let r=new rW;t.forEach(s=>{this.forEachParentGroup(e,s,o=>{i(o)&&(n=!0,this.removeFromParent(o,r),o.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),r.flush()}}removeFromParent(t,e){t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(Ip(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));let n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);t.parent?.childrenMapped!=null&&delete t.parent.childrenMapped[n],t.setRowTop(null),t.setRowIndex(null)}addToParent(t,e){let n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);e?.childrenMapped!=null&&e?.childrenMapped?.[n]!==t&&(e.childrenMapped[n]=t,e.childrenAfterGroup.push(t),e.setGroup(!0))}areGroupColsEqual(t,e){return t==null||e==null||t.pivotMode!==e.pivotMode?!1:Cf(t.groupedCols,e.groupedCols)&&Cf(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){let e=n=>{n&&n.forEach(i=>{if(!i.group)return;let s={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:i.allLeafChildren?.[0]};this.setGroupData(i,s,t),e(i.childrenAfterGroup)})};e(t.rootNode.childrenAfterGroup)}shotgunResetEverything(t,e){if(this.noChangeInGroupingColumns(t,e))return;this.selectionService.filterFromSelection(s=>s&&!s.group);let{rootNode:n,groupedCols:i}=t;n.leafGroup=i.length===0,n.childrenAfterGroup=[],n.childrenMapped={},n.updateHasChildren();let r=n.sibling;r&&(r.childrenAfterGroup=n.childrenAfterGroup,r.childrenMapped=n.childrenMapped),this.insertNodes(n.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let n=!1,i=this.showRowGroupColsService.getShowRowGroupCols(),r=i?i.map(s=>s.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==r&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=r,n}insertNodes(t,e){t.forEach(n=>{this.insertOneNode(n,e),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)})}insertOneNode(t,e,n){let i=this.getGroupInfo(t,e),r=this.findParentForNode(t,i,e,n);r.group||wt("duplicate group keys for row data, keys should be unique",[r.data,t.data]),t.parent=r,t.level=i.length,r.childrenAfterGroup.push(t),r.updateHasChildren()}findParentForNode(t,e,n,i){let r=n.rootNode;return e.forEach((s,o)=>{r=this.getOrCreateNextNode(r,e,s,o,n),i?.isRemoveFromAllLeafChildren(r,t)?i?.preventRemoveFromAllLeafChildren(r,t):r.allLeafChildren.push(t)}),r}getOrCreateNextNode(t,e,n,i,r){let s=this.getChildrenMappedKey(n.key,n.rowGroupColumn),o=t?.childrenMapped?.[s];return o||(o=this.createGroup(n,t,i,r),this.addToParent(o,t)),o}createGroup(t,e,n,i){let r=new Pp(this.beans);return r.group=!0,r.field=t.field,r.rowGroupColumn=t.rowGroupColumn,this.setGroupData(r,t,i),r.key=t.key,r.id=this.createGroupId(r,e,n),r.level=n,r.leafGroup=n===i.groupedColCount-1,r.allLeafChildren=[],r.setAllChildrenCount(0),r.rowGroupIndex=n,r.childrenAfterGroup=[],r.childrenMapped={},r.updateHasChildren(),r.parent=e,this.setExpandedInitialValue(i,r),r}createGroupId(t,e,n){let i=(r,s)=>{if(!r.rowGroupColumn)return null;let o=s?i(s,s.parent,0):null;return`${o==null?"":o+"-"}${r.rowGroupColumn.getColId()}-${r.key}`};return Pp.ID_PREFIX_ROW_GROUP+i(t,e,n)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(r=>{let s=t.rowGroupColumn;s!==null&&r.isRowGroupDisplayed(s.getId())&&(n.suppressGroupMaintainValueType?t.groupData[r.getColId()]=e.key:t.groupData[r.getColId()]=this.valueService.getValue(s,e.leafNode))})}getChildrenMappedKey(t,e){return e?e.getId()+"-"+t:t}setExpandedInitialValue(t,e){if(t.pivotMode&&e.leafGroup){e.expanded=!1;return}let n=t.isGroupOpenByDefault;if(n){let i={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(i)==!0;return}if(t.expandByDefault===-1){e.expanded=!0;return}e.expanded=e.level<t.expandByDefault}getGroupInfo(t,e){let n=[];return e.groupedCols.forEach(i=>{let r=this.valueService.getKeyForNode(i,t),s=r!=null&&r!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!s&&(r="",s=!0),s){let a={key:r,field:i.getColDef().field,rowGroupColumn:i,leafNode:t};n.push(a)}}),n}},cxi=class iat{constructor(e){this.map=null,this.row=null,this.key=e}upsert(e){let n,i=this.map;return i?n=i.get(e):(i=new Map,this.map=i),n||(n=new iat(e),i.set(e,n)),n}},dxi=class extends Ot{constructor(){super(...arguments),this.root=new cxi("")}wireBeans(t){this.beans=t,this.selectionService=t.selectionService,this.showRowGroupColsService=t.showRowGroupColsService}execute(t){let{rowNode:e,changedPath:n,rowNodeTransactions:i,rowNodeOrder:r}=t,s={expandByDefault:this.gos.get("groupDefaultExpanded"),rowNodeOrder:r,transactions:i,changedPath:n,isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),getDataPath:this.gos.get("getDataPath")},o=this.root.row;if(o!==e&&(this.root.row=e,o&&this.root.map?.clear()),s.transactions)this.handleTransaction(s);else{let a=t.afterColumnsChanged===!0;this.shotgunResetEverything(s,a)}}setTreeNodeRow(t,e){let n=t.row;n!==e&&(n?.data&&!e.data||(t.row=e))}handleTransaction(t){for(let{remove:e,update:n,add:i}of t.transactions)e?.length&&this.removeNodes(e,t),n?.length&&this.moveNodesInWrongPath(n,t),i?.length&&this.insertNodes(i,t);t.rowNodeOrder&&t.changedPath.forEachChangedNodeDepthFirst(e=>{iz(e.childrenAfterGroup,t.rowNodeOrder)&&t.changedPath.addParentNode(e)},!1,!0)}isNodeInTheRightPath(t,e){let n=this.getDataPath(t,e),i=t;for(let r=n.length-1;r>=0;r--){if(!i||i.key!==n[r])return!1;i=i.parent}return i===this.root.row}moveNodesInWrongPath(t,e){let n=uxi(this.root.row,t);for(let i of n)e.changedPath.isActive()&&e.changedPath.addParentNode(i.parent),this.isNodeInTheRightPath(i,e)||this.moveNode(i,e)}moveNode(t,e){if(this.removeNodesInStages([t],e),this.insertOneNode(t,e,!0),t.setData(t.data),e.changedPath.isActive()){let n=t.parent;e.changedPath.addParentNode(n)}}removeNodes(t,e){let{changedPath:n}=e;if(this.removeNodesInStages(t,e),n.isActive())for(let i of t)n.addParentNode(i.parent)}removeNodesInStages(t,e){let n=new rW;for(let r of t){this.removeFromParent(r,n);for(let s=r.parent,o;s&&s!==this.root.row;s=o)o=s.parent,n.removeFromAllLeafChildren(s,r)}n.flush();let i=t.map(r=>r.parent);this.removeEmptyGroups(i,e)}removeEmptyGroups(t,e){let n=!0;for(;n;){n=!1;let i=new rW;for(let r of t)for(let s=r,o;s&&s!==this.root.row;s=o){o=s.parent;let a=Mxe(s.key,s.rowGroupColumn),l=s.parent;!(l?.childrenMapped?!l.childrenMapped[a]:!0)&&s.isEmptyRowGroupNode()&&(s.data&&e.getDataPath?.(s.data)?s.setGroup((s.childrenAfterGroup&&s.childrenAfterGroup.length>0)??!1):(n=!0,this.removeFromParent(s,i),s.setSelectedParams({newValue:!1,source:"rowGroupChanged"})))}i.flush()}}removeFromParent(t,e){t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(Ip(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren())),t.parent?.childrenMapped&&delete t.parent.childrenMapped[Mxe(t.key,t.rowGroupColumn)],t.setRowTop(null),t.setRowIndex(null)}addToParent(t,e){let n=e?.childrenMapped;if(n){let i=Mxe(t.key,t.rowGroupColumn);n[i]!==t&&(n[i]=t,e.childrenAfterGroup.push(t),e.setGroup(!0))}}shotgunResetEverything(t,e){if(e||this.oldGroupDisplayColIds===void 0){let r=this.showRowGroupColsService.getShowRowGroupCols()?.map(s=>s.getId()).join("-")??"";if(e){this.oldGroupDisplayColIds!==r&&this.checkAllGroupDataAfterColsChanged(this.root.row.childrenAfterGroup);return}this.oldGroupDisplayColIds=r}this.selectionService.filterFromSelection(r=>r&&!r.group);let n=this.root.row;n.leafGroup=!1,n.childrenAfterGroup=[],n.childrenMapped={},n.updateHasChildren();let i=n.sibling;i&&(i.childrenAfterGroup=n.childrenAfterGroup,i.childrenMapped=n.childrenMapped),this.insertNodes(n.allLeafChildren,t)}checkAllGroupDataAfterColsChanged(t){if(t)for(let e of t){let n={field:e.field,key:e.key,rowGroupColumn:e.rowGroupColumn,leafNode:e.allLeafChildren?.[0]};this.setGroupData(e,n),this.checkAllGroupDataAfterColsChanged(e.childrenAfterGroup)}}insertNodes(t,e){this.buildNodeCacheFromRows(t,e);for(let n of t)this.insertOneNode(n,e,!1),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)}insertOneNode(t,e,n,i){let r=this.getDataPath(t,e),s=r.length-1,o=r[s],a=this.root,l=this.root.row,c=null;for(let d=0,u=r.length-1;d<u;++d){let m=r[d];a=a.upsert(m);let f=l?.childrenMapped?.[m];f?this.setTreeNodeRow(a,f):(f=a.row,f?f.parent=l:(f=this.createGroup(m,l,d,e),this.setTreeNodeRow(a,f)),this.addToParent(f,l)),l=f,f.level!==d&&(f.level=d,c=f),i?.isRemoveFromAllLeafChildren(l,t)?i?.preventRemoveFromAllLeafChildren(l,t):l.allLeafChildren.push(t)}t.parent=l,t.level=s,this.ensureRowNodeFields(t,o),this.setGroupData(t,{key:o,field:null,rowGroupColumn:null}),n||this.setExpandedInitialValue(e,t),this.addToParent(t,l),c&&this.fixLevels(c,c.level)}fixLevels(t,e){t.level=e,t.childrenAfterGroup?.forEach(n=>this.fixLevels(n,e+1))}buildNodeCacheFromRows(t,e){this.root.map?.clear();for(let n=0;n<t.length;n++){let i=t[n],r=this.getDataPath(i,e),s=this.root;for(let o=0;o<r.length;o++){let a=o===r.length-1,l=r[o];s=s.upsert(l),a&&(this.setTreeNodeRow(s,i),this.ensureRowNodeFields(i,l))}}this.backfillGroups(this.root,0,e)}ensureRowNodeFields(t,e){return e!==void 0&&(t.key=e),t.childrenMapped??(t.childrenMapped={}),t.allLeafChildren??(t.allLeafChildren=[]),t.childrenAfterGroup??(t.childrenAfterGroup=[]),t}backfillGroups(t,e,n){let i=t.map;if(i)for(let r of i.values()){let s=r.row;s||(s=this.createGroup(r.key,t.row,e,n),this.setTreeNodeRow(r,s)),r.map&&this.backfillGroups(r,e+1,n)}}createGroup(t,e,n,i){let r=new Pp(this.beans);return r.group=!0,r.field=null,this.setGroupData(r,{key:t,field:null,rowGroupColumn:null}),r.key=t,r.id=Pp.ID_PREFIX_ROW_GROUP+this.createGroupIdEnd(r,e,n),r.level=n,r.leafGroup=!1,r.allLeafChildren=[],r.setAllChildrenCount(0),r.rowGroupIndex=null,r.childrenAfterGroup=[],r.childrenMapped={},r.updateHasChildren(),r.parent=e,this.setExpandedInitialValue(i,r),r}createGroupIdEnd(t,e,n){if(n<0)return null;let i=e?this.createGroupIdEnd(e,e.parent,n-1):null;return`${i==null?"":i+"-"}${n}-${t.key}`}setGroupData(t,e){t.groupData={};let n=this.showRowGroupColsService.getShowRowGroupCols();for(let i of n)t.groupData[i.getColId()]=e.key}setExpandedInitialValue(t,e){let n=t.isGroupOpenByDefault;if(n){let i={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(i)==!0;return}if(t.expandByDefault===-1){e.expanded=!0;return}e.expanded=e.level<t.expandByDefault}getDataPath({data:t},{getDataPath:e}){let n=e?.(t)||[];return n.length||wt(`getDataPath() should not return an empty path for data ${t}`),n}};hxi=class extends Ot{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){let e=this.gos.get("treeData")?dxi:lxi,n=this.strategy;n?.constructor!==e&&(this.destroyBean(n),n=this.createManagedBean(new e),this.strategy=n),n.execute(t),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},Ast="PivotRowTotal_",pxi=class extends Ot{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.columnNameService=t.columnNameService}postConstruct(){let t=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=t(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=t()});let e=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=e(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=e()})}createPivotColumnDefs(t){let e=this.createPivotColumnsFromUniqueValues(t);function n(s,o=[]){return s.forEach(a=>{a.children!==void 0?n(a.children,o):o.push(a)}),o}let i=n(e);this.addRowGroupTotals(e,i),this.addExpandablePivotGroups(e,i),this.addPivotTotalsToGroups(e,i);let r=i.map(s=>T7(s));return{pivotColumnGroupDefs:e,pivotColumnDefs:r}}createPivotColumnsFromUniqueValues(t){let e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,i,r){let s=this.funcColsService.getValueColumns();if(t>=i)return this.buildMeasureCols(n);let o=r[t].getColDef(),a=this.headerNameComparator.bind(this,o.pivotComparator);if(s.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===i-1){let c=[];return Rh(e,d=>{let u=[...n,d],m=this.createColDef(s[0],d,u);m.columnGroupShow="open",c.push(m)}),c.sort(a),c}let l=[];return Rh(e,(c,d)=>{let u=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,m=[...n,c];l.push({children:this.recursivelyBuildGroup(t+1,d,m,i,r),headerName:c,pivotKeys:m,columnGroupShow:"open",openByDefault:u,groupId:this.generateColumnGroupId(m)})}),l.sort(a),l}buildMeasureCols(t){let e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(n=>{let i=this.columnNameService.getDisplayNameForColumn(n,"header");return St(ve({},this.createColDef(n,i,t)),{columnGroupShow:"open"})})}addExpandablePivotGroups(t,e){if(this.gos.get("suppressExpandablePivotGroups")||this.gos.get("pivotColumnGroupTotals"))return;let n=(i,r,s)=>{let o=i;if(o.children){let a=new Map;o.children.forEach(c=>{n(c,r,a)});let l=!o.children.some(c=>c.children);this.funcColsService.getValueColumns().forEach(c=>{let d=this.columnNameService.getDisplayNameForColumn(c,"header"),u=this.createColDef(c,d,i.pivotKeys);u.pivotTotalColumnIds=a.get(c.getColId()),u.columnGroupShow="closed",u.aggFunc=c.getAggFunc(),l||(i.children.push(u),r.push(u))}),this.merge(s,a)}else{let a=i;if(!a.pivotValueColumn)return;let l=a.pivotValueColumn.getColId(),c=s.has(l)?s.get(l):[];c.push(a.colId),s.set(l,c)}};t.forEach(i=>{n(i,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;let n=this.gos.get("pivotColumnGroupTotals")==="after",i=this.funcColsService.getValueColumns(),r=i.map(o=>o.getAggFunc());if(!r||r.length<1||!this.sameAggFuncs(r))return;let s=i[0];t.forEach(o=>{this.recursivelyAddPivotTotal(o,e,s,n)})}recursivelyAddPivotTotal(t,e,n,i){let r=t;if(!r.children){let o=t;return o.colId?[o.colId]:null}let s=[];if(r.children.forEach(o=>{let a=this.recursivelyAddPivotTotal(o,e,n,i);a&&(s=s.concat(a))}),r.children.length>1){let a=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),l=this.createColDef(n,a,t.pivotKeys,!0);l.pivotTotalColumnIds=s,l.aggFunc=n.getAggFunc(),l.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;let c=t.children;i?c.push(l):c.unshift(l),e.push(l)}return s}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;let n=this.gos.get("pivotRowTotals")==="after",i=this.funcColsService.getValueColumns(),r=n?i.slice():i.slice().reverse();for(let s=0;s<r.length;s++){let o=r[s],a=[];t.forEach(c=>{a=a.concat(this.extractColIdsForValueColumn(c,o))});let l=r.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");this.createRowGroupTotal(t,e,o,a,n,l)}}extractColIdsForValueColumn(t,e){let n=t;if(!n.children){let r=n;return r.pivotValueColumn===e&&r.colId?[r.colId]:[]}let i=[];return n.children.forEach(r=>{this.extractColIdsForValueColumn(r,e);let s=this.extractColIdsForValueColumn(r,e);i=i.concat(s)}),i}createRowGroupTotal(t,e,n,i,r,s){let o=this.funcColsService.getValueColumns(),a;if(o.length===0)a=this.createColDef(null,"-",[]);else{let c=this.columnNameService.getDisplayNameForColumn(n,"header");a=this.createColDef(n,c,[]),a.pivotTotalColumnIds=i}a.colId=Ast+a.colId,e.push(a);let l=s?{children:[a],pivotKeys:[],groupId:`${Ast}_pivotGroup_${n.getColId()}`}:a;r?t.push(l):t.unshift(l)}createColDef(t,e,n,i=!1){let r={};if(t){let s=t.getColDef();Object.assign(r,s),r.hide=!1}return r.headerName=e,r.colId=this.generateColumnId(n||[],t&&!i?t.getColId():""),r.field=r.colId,r.valueGetter=s=>s.data?.[s.colDef.field],r.pivotKeys=n,r.pivotValueColumn=t,r.filter===!0&&(r.filter="agNumberColumnFilter"),r}sameAggFuncs(t){if(t.length==1)return!0;for(let e=1;e<t.length;e++)if(t[e]!==t[0])return!1;return!0}headerNameComparator(t,e,n){return t?t(e.headerName,n.headerName):e.headerName&&!n.headerName?1:!e.headerName&&n.headerName?-1:!e.headerName||!n.headerName?0:e.headerName<n.headerName?-1:e.headerName>n.headerName?1:0}merge(t,e){e.forEach((n,i)=>{let s=[...t.has(i)?t.get(i):[],...n];t.set(i,s)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(n=>n.getColId()).join("-")}_${t.join("-")}`}generateColumnId(t,e){return`pivot_${this.funcColsService.getPivotColumns().map(i=>i.getColId()).join("-")}_${t.join("-")}_${e}`}createColDefsFromFields(t){let e={};for(let r=0;r<t.length;r++){let o=t[r].split(this.fieldSeparator),a=e;for(let l=0;l<o.length;l++){let c=o[l];a[c]==null&&(a[c]={}),a=a[c]}}let n=(r,s,o,a)=>{let l=[];for(let u in o){let m=o[u],f=n(`${r}${this.fieldSeparator}${u}`,u,m,a+1);l.push(f)}if(l.length===0){let u=this.columnModel.getColDefCol(s);if(u){let f=this.columnNameService.getDisplayNameForColumn(u,"header")??s,_=this.createColDef(u,f,void 0,!1);return _.colId=r,_.aggFunc=u.getAggFunc(),_.valueGetter=x=>x.data?.[r],_}return{colId:r,headerName:s,valueGetter:f=>f.data?.[r]}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&l.length===1&&"colId"in l[0]?(l[0].headerName=s,l[0]):{openByDefault:this.pivotDefaultExpanded===-1||a<this.pivotDefaultExpanded,groupId:r,headerName:s,children:l}},i=[];for(let r in e){let s=e[r],o=n(r,r,s,0);i.push(o)}return i}},Pst="Exceeded maximum allowed pivot column count.",mxi=class extends Ot{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService,this.pivotColDefService=t.pivotColDefService}execute(t){let e=t.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(e):this.executePivotOff(e)}executePivotOff(t){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),t&&t.setInactive())}executePivotOn(t){let e=this.funcColsService.getValueColumns().length??1,n=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=n===-1?-1:n/e;let i;try{i=this.bucketUpRowNodes(t)}catch(E){if(E.message===Pst){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:E.message}),this.lastTimeFailed=!0;return}throw E}let r=this.setUniqueValues(i),s=this.funcColsService.getValueColumns(),o=s.map(E=>`${E.getId()}-${E.getColDef().headerName}`).join("#"),a=s.map(E=>E.getAggFunc().toString()).join("#"),l=this.aggregationColumnsHashLastTime!==o,c=this.aggregationFuncsHashLastTime!==a;this.aggregationColumnsHashLastTime=o,this.aggregationFuncsHashLastTime=a;let d=this.funcColsService.getRowGroupColumns().map(E=>E.getId()).join("#"),u=d!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=d;let m=this.gos.get("pivotRowTotals"),f=this.gos.get("pivotColumnGroupTotals"),_=this.gos.get("suppressExpandablePivotGroups"),x=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),D=m!==this.pivotRowTotalsLastTime||f!==this.pivotColumnGroupTotalsLastTime||_!==this.suppressExpandablePivotGroupsLastTime||x!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=m,this.pivotColumnGroupTotalsLastTime=f,this.suppressExpandablePivotGroupsLastTime=_,this.removePivotHeaderRowWhenSingleValueColumnLastTime=x,this.lastTimeFailed||r||l||u||c||D){let{pivotColumnGroupDefs:E,pivotColumnDefs:M}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=M,this.pivotResultColsService.setPivotResultCols(E,"rowModelUpdated"),t&&t.setInactive()}this.lastTimeFailed=!1}setUniqueValues(t){let e=JSON.stringify(t),n=JSON.stringify(this.uniqueValues);return e!==n?(this.uniqueValues=t,!0):!1}bucketUpRowNodes(t){this.currentUniqueCount=0;let e={};t.forEachChangedNodeDepthFirst(i=>{i.leafGroup&&(i.childrenMapped=null)});let n=i=>{i.leafGroup?this.bucketRowNode(i,e):i.childrenAfterFilter?.forEach(n)};return t.executeFromRootNode(n),e}bucketRowNode(t,e){let n=this.funcColsService.getPivotColumns();n.length===0?t.childrenMapped=null:t.childrenMapped=this.bucketChildren(t.childrenAfterFilter,n,0,e),t.sibling&&(t.sibling.childrenMapped=t.childrenMapped)}bucketChildren(t,e,n,i){let r={},s=e[n];if(t.forEach(o=>{let a=this.valueService.getKeyForNode(s,o);if(Ls(a)&&(a=""),!i[a]){this.currentUniqueCount+=1,i[a]={};let l=this.maxUniqueValues!==-1,c=this.currentUniqueCount>this.maxUniqueValues;if(l&&c)throw Error(Pst)}r[a]||(r[a]=[]),r[a].push(o)}),n===e.length-1)return r;{let o={};return Rh(r,(a,l)=>{o[a]=this.bucketChildren(l,e,n+1,i[a])}),o}}getPivotColumnDefs(){return this.pivotColumnDefs}};Gxi=class extends Ot{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(t=>{let n=t.getColDef().showRowGroup,i=typeof n=="string";!i&&!(n===!0)||(this.showRowGroupCols.push(t),i?this.showRowGroupColsMap[n]=t:this.funcColsService.getRowGroupColumns().forEach(o=>{this.showRowGroupColsMap[o.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},mW="32.1.0",Cbe={version:mW,moduleName:`${wr.RowGroupingModule}-core`,beans:[Q8i,sxi,hxi,pxi,mxi,U8i,J8i,Gxi,rxi],userComponents:[{name:"agGroupRowRenderer",classImp:cW},{name:"agGroupCellRenderer",classImp:cW}],controllers:[{name:"groupCellRendererCtrl",classImp:_ie}],dependantModules:[y1]},Wxi={version:mW,moduleName:`${wr.RowGroupingModule}-api`,apiFunctions:{addAggFunc:fxi,addAggFuncs:gxi,clearAggFuncs:vxi,setColumnAggFunc:yxi,isPivotMode:_xi,getPivotResultColumn:Cxi,setValueColumns:xxi,getValueColumns:bxi,removeValueColumn:wxi,removeValueColumns:Sxi,addValueColumn:Txi,addValueColumns:Dxi,setRowGroupColumns:Exi,removeRowGroupColumn:Mxi,removeRowGroupColumns:kxi,addRowGroupColumn:Ixi,addRowGroupColumns:Axi,getRowGroupColumns:Rxi,moveRowGroupColumn:Pxi,setPivotColumns:Fxi,removePivotColumn:Lxi,removePivotColumns:Oxi,addPivotColumn:Nxi,addPivotColumns:Vxi,getPivotColumns:Bxi,setPivotResultColumns:zxi,getPivotResultColumns:Hxi},dependantModules:[Cbe]},nat={version:mW,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:oxi}],dependantModules:[Cbe,e6]},Uxi={version:mW,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:axi}],dependantModules:[nat,YZ]},xbe={version:mW,moduleName:wr.RowGroupingModule,dependantModules:[Cbe,Wxi,nat,Uxi]},Wxe=class extends _be{constructor(t){super(t,"aggregation")}postConstruct(){let t=this.localeService.getLocaleTextFunc(),e=t("valueColumnsEmptyMessage","Drag here to aggregate"),n=t("values","Values");super.init({icon:tr("valuePanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){let t=super.getTooltipParams();return t.location="valueColumnsList",t}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowValue()&&(!t.isValueActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setValueColumns(t,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}},rat=class extends Ot{constructor(){super(...arguments),this.beanName="toolPanelColDefService",this.isColGroupDef=t=>t&&typeof t.children<"u",this.getId=t=>this.isColGroupDef(t)?t.groupId:t.colId}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){let e=[],n=(r,s)=>{if(this.isColGroupDef(r)){let o=r,a=typeof o.groupId<"u"?o.groupId:o.headerName,l=new CA(o,a,!1,s),c=[];return o.children.forEach(d=>{let u=n(d,s+1);u&&c.push(u)}),l.setChildren(c),l}else{let o=r,a=o.colId?o.colId:o.field,l=this.columnModel.getColDefCol(a);return l||e.push(o),l}},i=[];return t.forEach(r=>{let s=n(r,0);s&&i.push(s)}),e.length>0&&wt("unable to find grid columns for the supplied colDef(s):",e),i}syncLayoutWithGrid(t){let e=this.getLeafPathTrees(),n=this.mergeLeafPathTrees(e);t(n)}getLeafPathTrees(){let t=(i,r)=>{let s;if(Md(i))if(i.isPadding())s=r;else{let a=Object.assign({},i.getColGroupDef());a.groupId=i.getGroupId(),a.children=[r],s=a}else{let a=Object.assign({},i.getColDef());a.colId=i.getColId(),s=a}let o=i.getOriginalParent();return o?t(o,s):s};return this.columnModel.getCols().filter(i=>{let r=i.getColDef();return i.isPrimary()&&!r.showRowGroup}).map(i=>t(i,i.getColDef()))}mergeLeafPathTrees(t){let e=(r,s)=>this.isColGroupDef(r)&&this.isColGroupDef(s)&&this.getId(r)===this.getId(s),n=(r,s)=>{if(!this.isColGroupDef(s))return r;let o=r,a=s;return a.children&&a.groupId&&this.addChildrenToGroup(o,a.groupId,a.children[0])||a.children.forEach(l=>n(o,l)),o},i=[];for(let r=1;r<=t.length;r++){let s=t[r-1],o=t[r];e(s,o)?t[r]=n(s,o):i.push(s)}return i}addChildrenToGroup(t,e,n){let i=(o,a)=>{let l=o.children.map(this.getId),c=Sl(l,this.getId(a)),d=Ar(o.children),u=d&&this.getId(d)!==this.getId(a);return c&&u};if(!this.isColGroupDef(t))return!0;let r=t,s=n;if(i(r,s))return r.children.push(s),!0;if(r.groupId===e){let o=r.children.map(this.getId);if(!Sl(o,this.getId(s)))return r.children.push(s),!0}return r.children.forEach(o=>this.addChildrenToGroup(o,e,n)),!1}};tbi=class extends ai{constructor(t){super(),this.eToggleButton=Bt,this.eIconWrapper=Bt,this.eLabel=Bt,this.toolPanelDef=t}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){let t=this.createTemplate();this.setTemplate(t,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
                <button type="button" data-ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">
                    <div data-ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>
                    <span data-ref="eLabel" class="ag-side-button-label"></span>
                </button>
            </div>`}setLabel(){let t=this.localeService.getLocaleTextFunc(),e=this.toolPanelDef,n=t(e.labelKey,e.labelDefault);this.eLabel.innerText=n}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",tr(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),ip(this.eToggleButton,t)}getButtonElement(){return this.eToggleButton}},ibi=class extends ai{constructor(){super('<div class="ag-side-buttons" role="tablist"></div>'),this.buttonComps=[]}wireBeans(t){this.focusService=t.focusService,this.visibleColsService=t.visibleColsService}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(t){if(!(t.key!==It.TAB||!t.shiftKey)){if(this.focusService.focusNextGridCoreContainer(!0)){t.preventDefault();return}Zc(t)}}setActiveButton(t){this.buttonComps.forEach(e=>{e.setSelected(t===e.getToolPanelId())})}addButtonComp(t){let e=this.createBean(new tbi(t));return this.buttonComps.push(e),this.appendChild(e),e.addEventListener("toggleButtonClicked",()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:t.id})}),e}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),zo(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}},nbi={selector:"AG-SIDE-BAR-BUTTONS",component:ibi},sat={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},oat={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},bbe={columns:sat,filters:oat};sbi=class extends ai{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}wireBeans(t){this.horizontalResizeService=t.horizontalResizeService}setElementToResize(t){this.elementToResize=t}postConstruct(){let t=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(t),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(t,e,n){this.eventService.dispatchEvent({type:"toolPanelSizeChanged",width:n,started:t,ended:e})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(t){return this.onResizing(t,!0)}onResizing(t,e=!1){let n=this.inverted?-1:1,i=Math.max(this.minWidth,Math.floor(this.startingWidth-t*n));this.maxWidth!=null&&(i=Math.min(this.maxWidth,i)),this.elementToResize.style.width=`${i}px`,this.dispatchResizeEvent(!1,e,i)}setInverted(t){this.inverted=t}setMaxWidth(t){this.maxWidth=t}setMinWidth(t){t!=null?this.minWidth=t:this.minWidth=100}},obi=class extends ai{wireBeans(t){this.userComponentFactory=t.userComponentFactory}constructor(){super('<div class="ag-tool-panel-wrapper" role="tabpanel"/>')}postConstruct(){let t=this.getGui(),e=this.resizeBar=this.createManagedBean(new sbi);t.setAttribute("id",`ag-${this.getCompId()}`),e.setElementToResize(t),this.appendChild(e)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(t,e){let{id:n,minWidth:i,maxWidth:r,width:s}=t;this.toolPanelId=n,this.width=s;let o=this.userComponentFactory.getToolPanelCompDetails(t,e),a=o.newAgStackInstance();if(this.params=o.params,a==null){wt(`error processing tool panel component ${n}. You need to specify 'toolPanel'`);return}a.then(this.setToolPanelComponent.bind(this)),i!=null&&this.resizeBar.setMinWidth(i),r!=null&&this.resizeBar.setMaxWidth(r)}setToolPanelComponent(t){this.toolPanelCompInstance=t,this.appendChild(t.getGui()),this.addDestroyFunc(()=>{this.destroyBean(t)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(t){let e=this.gos.get("enableRtl"),n=t==="left",i=e?n:!n;this.resizeBar.setInverted(i)}refresh(){this.toolPanelCompInstance?.refresh(this.params)}},abi=class extends ai{constructor(){super(`<div class="ag-side-bar ag-unselectable">
            <ag-side-bar-buttons data-ref="sideBarButtons"></ag-side-bar-buttons>
        </div>`,[nbi]),this.sideBarButtons=Bt,this.toolPanelWrappers=[]}wireBeans(t){this.focusService=t.focusService,this.filterManager=t.filterManager,this.sideBarService=t.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));let{sideBar:t}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:Uxe(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);let e=this.getFocusableElement();this.createManagedBean(new Ky(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),f4e(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;let{focusService:e,sideBarButtons:n}=this,i=this.getGui(),r=n.getGui(),s=this.gos.getActiveDomElement(),o=i.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),a=t.target;if(!o)return;if(r.contains(s)){e.focusInto(o,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let l=null;o.contains(s)?l=this.focusService.findNextFocusableElement(o,void 0,!0):e.isTargetUnderManagedComponent(o,a)&&t.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(o,a)),l||(l=r.querySelector(".ag-selected button")),l&&l!==t.target&&(t.preventDefault(),l.focus())}handleKeyDown(t){let e=this.gos.getActiveDomElement();if(!this.sideBarButtons.getGui().contains(e))return;let n=this.sideBarButtons.getGui(),i=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),r=i.findIndex(a=>a.contains(e)),s=null;switch(t.key){case It.LEFT:case It.UP:s=Math.max(0,r-1);break;case It.RIGHT:case It.DOWN:s=Math.min(r+1,i.length-1);break}if(s===null)return;let o=i[s].querySelector("button");o&&(o.focus(),t.preventDefault())}onToolPanelButtonClicked(t){let e=t.toolPanelId;this.openedItem()===e?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(e,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:t,sideBarState:e,existingToolPanelWrappers:n}){if(this.setDisplayed(!1),this.sideBar=t,this.sideBar&&this.sideBar.toolPanels){let i=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(i,e,n),!this.toolPanelWrappers.length)return;let r=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(r),this.setSideBarPosition(e?e.position:this.sideBar.position),r)if(e){let{openToolPanel:s}=e;s&&this.openToolPanel(s,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(t){t||(t="right"),this.position=t;let e=t==="left",n=e?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",e),this.addOrRemoveCssClass("ag-side-bar-right",!e),this.toolPanelWrappers.forEach(i=>{i.setResizerSizerSide(n)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){let t={};return this.toolPanelWrappers.forEach(e=>{t[e.getToolPanelId()]=e.getToolPanelInstance()?.getState?.()}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,n){for(let i of t)this.createToolPanelAndSideButton(i,e?.toolPanels?.[i.id],n?.[i.id])}validateDef(t){if(t.id==null)return wt("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(t.toolPanel==="agColumnsToolPanel"&&!Sa.__assertRegistered(wr.ColumnsToolPanelModule,"Column Tool Panel",this.gridId))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!Sa.__assertRegistered(wr.FiltersToolPanelModule,"Filters Tool Panel",this.gridId))return!1;if(this.filterManager?.isAdvancedFilterEnabled())return wt("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(t,e,n){if(!this.validateDef(t))return;let i=this.sideBarButtons.addButtonComp(t),r;n?r=n:(r=this.createBean(new obi),r.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),r.setDisplayed(!1);let s=r.getGui();this.appendChild(s),this.toolPanelWrappers.push(r),KB(i.getButtonElement(),s)}refresh(){this.toolPanelWrappers.forEach(t=>t.refresh())}openToolPanel(t,e="api"){let n=this.openedItem();if(n===t)return;this.toolPanelWrappers.forEach(s=>{let o=t===s.getToolPanelId();s.setDisplayed(o)});let i=this.openedItem();n!==i&&(this.sideBarButtons.setActiveButton(t),this.raiseToolPanelVisibleEvent(t,n??void 0,e))}getToolPanelInstance(t){let e=this.toolPanelWrappers.filter(n=>n.getToolPanelId()===t)[0];if(!e){wt(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,n){let i=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:e,visible:!1,switchingToolPanel:i}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:t,visible:!0,switchingToolPanel:i})}close(t="api"){this.openToolPanel(void 0,t)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let t=null;return this.toolPanelWrappers.forEach(e=>{e.isDisplayed()&&(t=e.getToolPanelId())}),t}onSideBarUpdated(){let t=Uxe(this.gos.get("sideBar")),e={};t&&this.sideBar&&t.toolPanels?.forEach(n=>{let{id:i}=n;if(!i)return;let r=this.sideBar.toolPanels?.find(l=>l.id===i);if(!r||n.toolPanel!==r.toolPanel)return;let s=this.toolPanelWrappers.find(l=>l.getToolPanelId()===i);if(!s)return;let o=this.gos.addGridCommonParams(St(ve({},n.toolPanelParams??{}),{onStateUpdated:()=>this.dispatchSideBarUpdated()}));s.getToolPanelInstance()?.refresh(o)===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(l=>l!==s),dc(s.getGui()),e[i]=s)}),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{dc(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},lbi={selector:"AG-SIDE-BAR",component:abi},cbi=class extends Ot{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return lbi}},wbe="32.1.0",lat={version:wbe,moduleName:`${wr.SideBarModule}-core`,beans:[rat,cbi],dependantModules:[y1]},dbi={version:wbe,moduleName:`${wr.SideBarModule}-api`,apiFunctions:{isSideBarVisible:jxi,setSideBarVisible:$xi,setSideBarPosition:Kxi,openToolPanel:Yxi,closeToolPanel:qxi,getOpenedToolPanel:Zxi,refreshToolPanel:Xxi,isToolPanelShowing:Qxi,getToolPanelInstance:Jxi,getSideBar:ebi},dependantModules:[lat]},bie={version:wbe,moduleName:wr.SideBarModule,dependantModules:[lat,dbi]},Rst=300,ubi=class extends ai{constructor(){super(`<div class="ag-column-select-header" role="presentation">
            <div data-ref="eExpand" class="ag-column-select-header-icon"></div>
            <ag-checkbox data-ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>
            <ag-input-text-field class="ag-column-select-header-filter-wrapper" data-ref="eFilterTextField"></ag-input-text-field>
        </div>`,[d1,xf]),this.eExpand=Bt,this.eSelect=Bt,this.eFilterTextField=Bt}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===It.SPACE&&(e.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});let t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){let t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t)}init(t){this.params=t;let e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=tr("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=tr("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=tr("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){let t=!this.params.suppressColumnFilter,e=!this.params.suppressColumnSelectAll,n=!this.params.suppressColumnExpandAll,i=this.columnModel.isProvidedColGroupsPresent(),r=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(r("searchOoo","Search...")),Vn(this.eFilterTextField.getGui(),t),Vn(this.eSelect.getGui(),e),Vn(this.eExpand,n&&i)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=Ap(()=>{let t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},Rst)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===It.ENTER&&setTimeout(()=>this.onSelectClicked(),Rst)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(t){this.expandState=t,Vn(this.eExpandChecked,this.expandState===0),Vn(this.eExpandUnchecked,this.expandState===1),Vn(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(t){this.selectState=t,this.eSelect.setValue(this.selectState)}},hbi={selector:"AG-PRIMARY-COLS-HEADER",component:ubi},Fst=class{constructor(t,e,n,i=!1,r){this.localEventService=new y5,this.displayName=t,this.dept=n,this.group=i,i?(this.columnGroup=e,this.expanded=r,this.children=[]):this.column=e}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(t){t!==this.expanded&&(this.expanded=t,this.localEventService.dispatchEvent({type:"expandedChanged"}))}setPassesFilter(t){this.passesFilter=t}addEventListener(t,e){this.localEventService.addEventListener(t,e)}removeEventListener(t,e){this.localEventService.removeEventListener(t,e)}},cat=class extends ai{constructor(t,e,n){super('<div class="ag-menu"></div>'),this.column=t,this.mouseEvent=e,this.parentEl=n,this.displayName=null}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.popupService=t.popupService,this.focusService=t.focusService}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),f5(this.column)?this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();let t=this.getMappedMenuItems();if(t.length===0)return;this.displayContextMenu(t)}}initializeProperties(t){Md(t)?this.columns=t.getLeafColumns():this.columns=[t],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){let t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColGroupLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${t("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${t("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{let e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>t("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>t("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{let e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>t("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>t("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{let e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{let e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(t){return[...t].concat(this.columns.filter(e=>t.indexOf(e)===-1))}removeColumnsFromList(t){return t.filter(e=>this.columns.indexOf(e)===-1)}displayContextMenu(t){let e=this.getGui(),n=this.createBean(new XR),i=this.localeService.getLocaleTextFunc(),r=()=>{};e.appendChild(n.getGui()),n.addMenuItems(t),n.addManagedListeners(n,{closeMenu:()=>{this.parentEl.focus(),r()}});let s=this.popupService.addPopup({modal:!0,eChild:e,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(n.getGui()),ariaLabel:i("ariaLabelContextMenu","Context Menu"),closedCallback:o=>{o instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(n)}});s&&(r=s.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:e})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){let t=[];for(let e of this.menuItemMap.values()){let n=this.columns.some(r=>e.allowedFunction(r)&&!e.activeFunction(r)),i=this.columns.some(r=>e.allowedFunction(r)&&e.activeFunction(r));n&&t.push({name:e.activateLabel(this.displayName),icon:tr(e.addIcon,this.gos,null),action:()=>e.activateFunction()}),i&&t.push({name:e.deactivateLabel(this.displayName),icon:tr(e.removeIcon,this.gos,null),action:()=>e.deActivateFunction()})}return t}},dat=class extends ai{constructor(t,e,n,i){super(),this.modelItem=t,this.allowDragging=e,this.eventType=n,this.focusWrapper=i,this.cbSelect=Bt,this.eLabel=Bt,this.eGroupOpenedIcon=Bt,this.eGroupClosedIcon=Bt,this.eColumnGroupIcons=Bt,this.processingColumnStateChange=!1,this.modelItem=t,this.columnGroup=t.getColumnGroup(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName(),this.allowDragging=e}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column-group" aria-hidden="true">
            <span class="ag-column-group-icons" data-ref="eColumnGroupIcons" >
                <span class="ag-column-group-closed-icon" data-ref="eGroupClosedIcon"></span>
                <span class="ag-column-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
            </span>
            <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
            <span class="ag-column-select-column-label" data-ref="eLabel"></span>
        </div>`,[d1]),this.eDragHandle=tr("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");let t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),$Z(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(i=>this.addOrRemoveCssClass(i,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){let t=this.columnGroup.getColGroupDef();if(!t)return;let e=this.gos.get("tooltipShowMode")==="whenTruncated",n;e&&(n=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);let i=()=>{let r=t.headerTooltip;this.setTooltip({newTooltipText:r,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:n})};i(),this.addManagedEventListeners({newColumnsLoaded:i})}getTooltipParams(){let t=super.getTooltipParams();return t.location="columnToolPanelColumnGroup",t}handleKeyDown(t){switch(t.key){case It.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case It.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case It.SPACE:t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(t){let{columnGroup:e,gos:n}=this;if(n.get("functionsReadOnly"))return;let i=this.createBean(new cat(e,t,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}addVisibilityListenersToAllChildren(){let t=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(e=>{this.addManagedListeners(e,{visibleChanged:t,columnValueChanged:t,columnPivotChanged:t,columnRowGroupChanged:t})})}setupDragging(){if(!this.allowDragging){Vn(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns"),e={type:u1.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:n?.visibleState,pivotState:n?.pivotState,eventType:this.eventType})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){let t=this.columnGroup.getLeafColumns(),e={},n={};return t.forEach(i=>{let r=i.getId();e[r]=i.isVisible(),n[r]=this.modelItemUtils.createPivotState(i)}),{columns:t,visibleState:e,pivotState:n}}setupExpandContract(){this.eGroupClosedIcon.appendChild($y("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild($y("columnSelectOpen",this.gos,null));let t=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:t}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:t});let e=new Zv(this.eColumnGroupIcons,!0);this.addManagedListeners(e,{tap:t}),this.addDestroyFunc(e.destroy.bind(e))}onLabelClicked(){let t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}getVisibleLeafColumns(){let t=[],e=n=>{n.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?e(i.getChildren()):t.push(i.getColumn()))})};return e(this.modelItem.getChildren()),t}onChangeCommon(t){this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),t,this.eventType)}refreshAriaLabel(){let t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnGroup","Column Group"),n=this.cbSelect.getValue(),i=n===void 0?t("ariaIndeterminate","indeterminate"):n?t("ariaVisible","visible"):t("ariaHidden","hidden"),r=t("ariaToggleVisibility","Press SPACE to toggle visibility");hl(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${r} (${i})`),D7(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){let t=this.workOutSelectedValue(),e=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(t),this.cbSelect.setReadOnly(e),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",e),this.processingColumnStateChange=!1}workOutSelectedValue(){let t=this.columnModel.isPivotMode(),e=this.getVisibleLeafColumns(),n=0,i=0;if(e.forEach(r=>{!t&&r.getColDef().lockVisible||(this.isColumnChecked(r,t)?n++:i++)}),!(n>0&&i>0))return n>0}workOutReadOnlyValue(){let t=this.columnModel.isPivotMode(),e=0;return this.columnGroup.getLeafColumns().forEach(n=>{t?n.isAnyFunctionAllowed()&&e++:n.getColDef().lockVisible||e++}),e===0}isColumnChecked(t,e){if(e){let n=t.isPivotActive(),i=t.isRowGroupActive(),r=t.isValueActive();return n||i||r}return t.isVisible()}onExpandOrContractClicked(){let t=this.modelItem.isExpanded();this.modelItem.setExpanded(!t)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){let t=this.modelItem.isExpanded();Vn(this.eGroupClosedIcon,!t),Vn(this.eGroupOpenedIcon,t)}refreshAriaExpanded(){ip(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(t){let e=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(t&&!e||!t&&e)&&this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(t){this.cbSelect.setValue(t,!0)}},pbi=class extends Ot{constructor(t,e){super(),this.comp=t,this.virtualList=e}wireBeans(t){this.columnModel=t.columnModel,this.columnMoveService=t.columnMoveService}postConstruct(){this.createManagedBean(new tbe(this.comp,this.virtualList,{dragSourceType:u1.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:this.eventService,getCurrentDragValue:t=>this.getCurrentDragValue(t),isMoveBlocked:t=>this.isMoveBlocked(t),getNumRows:t=>t.getDisplayedColsList().length,moveItem:(t,e)=>this.moveItem(t,e)}))}getCurrentDragValue(t){return t.column}isMoveBlocked(t){return this.gos.get("suppressMovableColumns")?!0:!!this.getCurrentColumns(t).find(r=>{let s=r.getColDef();return!!s.suppressMovable||!!s.lockPosition})}moveItem(t,e){let n=this.getTargetIndex(t,e),i=this.getCurrentColumns(t);n!=null&&this.columnMoveService.moveColumns(i,n,"toolPanelUi")}getMoveDiff(t,e){let n=this.columnModel.getCols(),i=this.getCurrentColumns(t),r=i[0],s=i.length;return n.indexOf(r)<e?s:0}getCurrentColumns(t){return Md(t)?t.getLeafColumns():[t]}getTargetIndex(t,e){if(!e)return null;let n=e.component,i=e.position==="top",r;if(n instanceof dat?(r=n.getColumns()[0],i=!0):r=n.getColumn(),this.getCurrentColumns(t).indexOf(r)!==-1)return null;let o=this.columnModel.getCols().indexOf(r),a=i?o:o+1,l=this.getMoveDiff(t,a);return a-l}},mbi=class extends ai{constructor(t,e,n,i){super(),this.allowDragging=e,this.groupsExist=n,this.focusWrapper=i,this.eLabel=Bt,this.cbSelect=Bt,this.processingColumnStateChange=!1,this.column=t.getColumn(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName()}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column" aria-hidden="true">
            <ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
            <span class="ag-column-select-column-label" data-ref="eLabel"></span>
        </div>`,[d1]),this.eDragHandle=tr("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");let t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1");let n=nl(this.displayName);this.eLabel.innerHTML=n;let i=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${i}`),this.getGui().style.setProperty("--ag-indentation-level",String(i)),this.setupDragging();let r=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:r}),this.addManagedListeners(this.column,{columnValueChanged:r,columnPivotChanged:r,columnRowGroupChanged:r,visibleChanged:r}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),$Z(this.column.getColDef(),this.gos,this.column,null).forEach(o=>this.addOrRemoveCssClass(o,!0))}getColumn(){return this.column}setupTooltip(){let t=this.gos.get("tooltipShowMode")==="whenTruncated",e;t&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);let n=()=>{let i=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};n(),this.addManagedEventListeners({newColumnsLoaded:n})}getTooltipParams(){let t=super.getTooltipParams();return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t}onContextMenu(t){let{column:e,gos:n}=this;if(n.get("functionsReadOnly"))return;let i=this.createBean(new cat(e,t,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}handleKeyDown(t){t.key===It.SPACE&&(t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;let t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}onChangeCommon(t){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.setColumn(this.column,t,"toolPanelUi"))}refreshAriaLabel(){let t=this.localeService.getLocaleTextFunc(),e=t("ariaColumn","Column"),n=this.cbSelect.getValue()?t("ariaVisible","visible"):t("ariaHidden","hidden"),i=t("ariaToggleVisibility","Press SPACE to toggle visibility");hl(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${i} (${n})`),D7(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){Vn(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns"),e={type:u1.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:n?.visibleState,pivotState:n?.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){let t=this.column.getColId(),e={[t]:this.column.isVisible()},n={[t]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:e,pivotState:n}}onColumnStateChanged(){this.processingColumnStateChange=!0;let t=this.columnModel.isPivotMode();if(t){let i=this.column.isAnyFunctionActive();this.cbSelect.setValue(i)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,n=!0;if(t){let i=this.gos.get("functionsReadOnly"),r=!this.column.isAnyFunctionAllowed();e=!i&&!r,n=e}else{let{enableRowGroup:i,enableValue:r,lockPosition:s,suppressMovable:o,lockVisible:a}=this.column.getColDef(),l=!!i||!!r,c=!!s||!!o;e=!a,n=l||!c}this.cbSelect.setReadOnly(!e),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!e),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(t){t!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(t){wt("can not expand a column item that does not represent a column group header")}},fbi=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},gbi="ag-column-select-list",vbi=class extends ai{constructor(){super(`<div class="${gbi}" role="presentation"></div>`),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.colDefService=t.toolPanelColDefService,this.modelItemUtils=t.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(t=>t()),this.destroyColumnItemFuncs=[]}init(t,e,n){this.params=t,this.allowDragging=e,this.eventType=n,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});let i=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:i,columnPivotModeChanged:i,columnRowGroupChanged:i,columnValueChanged:i,columnVisible:i,newColumnsLoaded:i}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new YE({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((r,s)=>(C5(s,r.getDept()+1),this.createComponentFromItem(r,s))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new pbi(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){let i=new dat(t,this.allowDragging,this.eventType,e);return this.createBean(i),i}let n=new mbi(t,this.allowDragging,this.groupsExist,e);return this.createBean(n),n}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);let t=this.getExpandedStates(),e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){let t={};if(this.isInitialState){let{expandedGroupIds:e}=this.params.initialState;return e.forEach(n=>{t[n]=!0}),t}return this.allColsTree?(this.forEachItem(e=>{if(!e.isGroup())return;let n=e.getColumnGroup();n&&(t[n.getId()]=e.isExpanded())}),t):{}}setExpandedStates(t){if(!this.allColsTree)return;let{isInitialState:e}=this;this.forEachItem(n=>{if(!n.isGroup())return;let i=n.getColumnGroup();if(i){let r=t[i.getId()];(r!=null||e)&&n.setExpanded(!!r)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(t){let e=this.colDefService.createColumnTree(t);this.buildListModel(e),this.groupsExist=t.some(n=>n&&typeof n.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(t){let e=this.onColumnExpanded.bind(this),n=o=>{o.addEventListener("expandedChanged",e);let a=o.removeEventListener.bind(o,"expandedChanged",e);this.destroyColumnItemFuncs.push(a)},i=(o,a,l)=>{o.forEach(c=>{Md(c)?r(c,a,l):s(c,a,l)})},r=(o,a,l)=>{let c=o.getColGroupDef();if(c&&c.suppressColumnsToolPanel)return;if(o.isPadding()){i(o.getChildren(),a,l);return}let u=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,o,"columnToolPanel"),m=new Fst(u,o,a,!0,this.expandGroupsByDefault);l.push(m),n(m),i(o.getChildren(),a+1,m.getChildren())},s=(o,a,l)=>{if(o.getColDef()&&o.getColDef().suppressColumnsToolPanel)return;let d=this.columnNameService.getDisplayNameForColumn(o,"columnToolPanel");l.push(new Fst(d,o,a))};this.destroyColumnTree(),i(t,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];let t=n=>{n.isPassesFilter()&&(this.displayedColsList.push(n),n.isGroup()&&n.isExpanded()&&n.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new fbi(this.displayedColsList));let e=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),e!=null&&this.focusRowIfAlive(e),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){let t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnPanelList","Column List"),n=t("columns","Columns"),i=this.displayedColsList.length;hl(this.virtualList.getAriaElement(),`${e} ${i} ${n}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){let e=n=>{n.forEach(i=>{t(i),i.isGroup()&&e(i.getChildren())})};this.allColsTree&&e(this.allColsTree)}doSetExpandedAll(t){this.forEachItem(e=>{e.isGroup()&&e.setExpanded(t)})}setGroupsExpanded(t,e){if(!e){this.doSetExpandedAll(t);return}let n=[];this.forEachItem(r=>{if(!r.isGroup())return;let s=r.getColumnGroup().getId();e.indexOf(s)>=0&&(r.setExpanded(t),n.push(s))});let i=e.filter(r=>!Sl(n,r));i.length>0&&wt("unable to find group(s) for supplied groupIds:",i)}getExpandState(){let t=0,e=0;return this.forEachItem(n=>{n.isGroup()&&(n.isExpanded()?t++:e++)}),t>0&&e>0?2:e>0?1:0}doSetSelectedAll(t){this.modelItemUtils.selectAllChildren(this.allColsTree,t,this.eventType)}getSelectionState(){let t=0,e=0,n=this.columnModel.isPivotMode();if(this.forEachItem(i=>{if(i.isGroup()||!i.isPassesFilter())return;let r=i.getColumn(),s=r.getColDef(),o;if(n){if(!r.isAllowPivot()&&!r.isAllowRowGroup()&&!r.isAllowValue())return;o=r.isValueActive()||r.isPivotActive()||r.isRowGroupActive()}else{if(s.lockVisible)return;o=r.isVisible()}o?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=Di(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){let t=n=>{if(!Di(this.filterText))return!0;let i=n.getDisplayName();return i==null||i.toLowerCase().indexOf(this.filterText)!==-1},e=(n,i)=>{let r=!1;if(n.isGroup()){let o=t(n);n.getChildren().forEach(a=>{let l=e(a,o||i);l&&(r=l)})}let s=i||r?!0:t(n);return n.setPassesFilter(s),s};this.allColsTree.forEach(n=>e(n,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){let t=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:t})}fireSelectionChangedEvent(){if(!this.allColsTree)return;let t=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:t})}getExpandedGroups(){let t=[];return this.allColsTree&&this.forEachItem(e=>{e.isGroup()&&e.isExpanded()&&t.push(e.getColumnGroup().getId())}),t}},ybi={selector:"AG-PRIMARY-COLS-LIST",component:vbi},Sbe=class extends ai{constructor(){super(`<div class="ag-column-select">
            <ag-primary-cols-header data-ref="primaryColsHeaderPanel"></ag-primary-cols-header>
            <ag-primary-cols-list data-ref="primaryColsListPanel"></ag-primary-cols-list>
        </div>`,[hbi,ybi]),this.primaryColsHeaderPanel=Bt,this.primaryColsListPanel=Bt}init(t,e,n){this.allowDragging=t,this.params=e,this.eventType=n,this.primaryColsHeaderPanel.init(this.params);let i=this.params.suppressColumnFilter,r=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&i&&r&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListeners(this.primaryColsListPanel,{groupExpanded:this.onGroupExpanded.bind(this),selectionChanged:this.onSelectionChange.bind(this)}),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListeners(this.primaryColsHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),selectAll:this.onSelectAll.bind(this),unselectAll:this.onUnselectAll.bind(this),filterChanged:this.onFilterChanged.bind(this)}),this.positionableFeature=new xD(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(t){this.positionableFeature.setResizable(t?{bottom:!0}:!1)}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(t){this.primaryColsListPanel.setGroupsExpanded(!0,t)}collapseGroups(t){this.primaryColsListPanel.setGroupsExpanded(!1,t)}setColumnLayout(t){this.primaryColsListPanel.setColumnLayout(t)}onFilterChanged(t){this.primaryColsListPanel.setFilterText(t.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(t){this.primaryColsHeaderPanel.setExpandState(t.state),this.params.onStateUpdated()}onSelectionChange(t){this.primaryColsHeaderPanel.setSelectionState(t.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},Lst=class extends ai{constructor(){super(...arguments),this.cbPivotMode=Bt}wireBeans(t){this.columnModel=t.columnModel,this.ctrlsService=t.ctrlsService}createTemplate(){return`<div class="ag-pivot-mode-panel">
                <ag-toggle-button data-ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>
            </div>`}postConstruct(){this.setTemplate(this.createTemplate(),[hWe]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());let t=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(t("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});let e=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnPivotModeChanged:e})}onBtPivotMode(){let t=!!this.cbPivotMode.getValue();t!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:t},source:"toolPanelUi"}),this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}onPivotModeChanged(){let t=this.columnModel.isPivotMode();this.cbPivotMode.setValue(t)}},_bi=class extends ai{constructor(){super('<div class="ag-column-panel"></div>'),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(t){super.setDisplayed(t),t&&!this.initialised&&this.init(this.params)}init(t){let e=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params=ve(ve({},e),t),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new Lst),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new Sbe),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new uie(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Wxe(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new die(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();let[n]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});this.childDestroyFuncs.push(()=>n())}this.initialised=!0}setPivotModeSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(t):t&&(this.pivotModePanel=this.createBean(new Lst),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(t):t&&(this.rowGroupDropZonePanel=this.createManagedBean(new uie(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(t):t&&(this.valuesDropZonePanel=this.createManagedBean(new Wxe(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(t):t&&(this.pivotDropZonePanel=this.createManagedBean(new die(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(t)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(t=>{if(!t)return;let e=t.getGui();t.toggleResizable(!e.classList.contains("ag-last-column-drop")&&!e.classList.contains("ag-hidden"))})}setLastVisible(){let t=this.getGui();Array.prototype.slice.call(t.querySelectorAll(".ag-column-drop")).forEach(r=>r.classList.remove("ag-last-column-drop"));let n=t.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),i=Ar(n);i&&i.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){let e=this.getGui().children;for(let n=0;n<e.length;n++){let i=e[n];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return Sa.__assertRegistered(wr.RowGroupingModule,"Row Grouping",this.gridId)}expandColumnGroups(t){this.primaryColsPanel.expandGroups(t)}collapseColumnGroups(t){this.primaryColsPanel.collapseGroups(t)}setColumnLayout(t){this.primaryColsPanel.setColumnLayout(t)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(t=>t()),this.childDestroyFuncs.length=0,zo(this.getGui())}refresh(t){return this.destroyChildren(),this.init(t),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},Cbi=class extends Ot{constructor(){super(...arguments),this.beanName="modelItemUtils"}wireBeans(t){this.aggFuncService=t.aggFuncService,this.columnModel=t.columnModel,this.columnApplyStateService=t.columnApplyStateService}selectAllChildren(t,e,n){let i=this.extractAllLeafColumns(t);this.setAllColumns(i,e,n)}setColumn(t,e,n){this.setAllColumns([t],e,n)}setAllColumns(t,e,n){this.columnModel.isPivotMode()?this.setAllPivot(t,e,n):this.setAllVisible(t,e,n)}extractAllLeafColumns(t){let e=[],n=i=>{i.forEach(r=>{r.isPassesFilter()&&(r.isGroup()?n(r.getChildren()):e.push(r.getColumn()))})};return n(t),e}setAllVisible(t,e,n){let i=[];t.forEach(r=>{r.getColDef().lockVisible||r.isVisible()!=e&&i.push({colId:r.getId(),hide:!e})}),i.length>0&&this.columnApplyStateService.applyColumnState({state:i},n)}setAllPivot(t,e,n){this.setAllPivotActive(t,e,n)}setAllPivotActive(t,e,n){let i=[],o=e?a=>{if(!a.isAnyFunctionActive())if(a.isAllowValue()){let l=typeof a.getAggFunc()=="string"?a.getAggFunc():this.aggFuncService?.getDefaultAggFunc(a);i.push({colId:a.getId(),aggFunc:l})}else a.isAllowRowGroup()?i.push({colId:a.getId(),rowGroup:!0}):a.isAllowPivot()&&i.push({colId:a.getId(),pivot:!0})}:a=>{(a.isPivotActive()||a.isRowGroupActive()||a.isValueActive())&&i.push({colId:a.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(o),i.length>0&&this.columnApplyStateService.applyColumnState({state:i},n)}updateColumns(t){let{columns:e,visibleState:n,pivotState:i,eventType:r}=t,s=e.map(o=>{let a=o.getColId();if(this.columnModel.isPivotMode()){let l=i?.[a];return{colId:a,pivot:l?.pivot,rowGroup:l?.rowGroup,aggFunc:l?.aggFunc}}else return{colId:a,hide:!n?.[a]}});this.columnApplyStateService.applyColumnState({state:s},r)}createPivotState(t){return{pivot:t.isPivotActive(),rowGroup:t.isRowGroupActive(),aggFunc:t.isValueActive()?t.getAggFunc():void 0}}},xbi="32.1.0",uat={version:xbi,moduleName:wr.ColumnsToolPanelModule,beans:[Cbi],userComponents:[{name:"agColumnsToolPanel",classImp:_bi},{name:"agMenuItem",classImp:KE}],dependantModules:[y1,xbe,bie]},bbi=9525,Ost={0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49},wbi=t=>Math.round(t*96/72),jR=t=>Math.ceil(t*bbi),Sbi=t=>{if(t===void 0)return;let n=["Automatic","Roman","Swiss","Modern","Script","Decorative"].indexOf(t||"Automatic");return Math.max(n,0)},oie=(t,e)=>{if(!e)return;let n;return typeof e=="number"?n=e:n=e({rowIndex:t}),n},Tbi=(t,e)=>{let{colSpan:n,column:i}=t.position;if(t.width)if(n){let r=e.slice(i-1,i+n-1),s=0;for(let o=0;o<r.length;o++){let a=r[o].getActualWidth();if(t.width<s+a){t.position.colSpan=o+1,t.totalWidth=t.width,t.width=t.totalWidth-s;break}s+=a}}else t.totalWidth=t.width},Dbi=(t,e)=>{let{rowSpan:n,row:i}=t.position;if(t.height)if(n){let r=0,s=0;for(let o=i;o<i+n;o++){let a=wbi(oie(o,e)||20);if(t.height<r+a){t.position.rowSpan=s+1,t.totalHeight=t.height,t.height=t.totalHeight-r;break}r+=a,s++}}else t.totalHeight=t.height},Bg=(t,e)=>{let n=w4e.createHeader({encoding:"UTF-8",standalone:"yes"}),i=w4e.createXml(t);return e?i:`${n}${i}`},YR=t=>{let i=String.fromCharCode,r=Math.floor(t/26),s=t%26;return!r||t===26?i(65+t-1):s?r<26?i(65+r-1)+i(65+s-1):YR(r)+i(65+s-1):YR(r-1)+"Z"},jxe=t=>{if(t==null)return null;let e="";for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);if(i>=0&&i<=31&&i!==10){let o=`_x${i.toString(16).toUpperCase().padStart(4,"0")}_`;e+=o}else e+=t[n]}return e},Ebi=t=>{let e=[];for(let n of t.keys()){let i=n.toString(),r={name:"t",textNode:nl(jxe(i),!1)};i.trim().length!==i.length&&(r.properties={rawMap:{"xml:space":"preserve"}}),e.push({name:"si",children:[r]})}return e},Mbi={getTemplate(t){let{name:e,ContentType:n,Extension:i,PartName:r}=t;return{name:e,properties:{rawMap:{Extension:i,PartName:r,ContentType:n}}}}},kbi=Mbi,Ibi={getTemplate(t){let e=new Array(t).fill(void 0).map((d,u)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:`/xl/worksheets/sheet${u+1}.xml`})),n=rc.worksheetImages.size,i=rc.worksheetHeaderFooterImages.size,r=rc.worksheetDataTables.size,s={};rc.workbookImageIds.forEach(d=>{let u=d.type==="jpg"?"jpeg":d.type;s[u]=!0});let o=new Array(n).fill(void 0).map((d,u)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:`/xl/drawings/drawing${u+1}.xml`})),a=new Array(r).fill(void 0).map((d,u)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",PartName:`/xl/tables/${rc.getTableNameFromIndex(u)}.xml`})),l=Object.keys(s).map(d=>({name:"Default",ContentType:`image/${d}`,Extension:d}));i&&l.push({name:"Default",Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"});let c=[...l,{name:"Default",Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"},{name:"Default",ContentType:"application/xml",Extension:"xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",PartName:"/xl/workbook.xml"},...e,{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml",PartName:"/xl/theme/theme1.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",PartName:"/xl/styles.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",PartName:"/xl/sharedStrings.xml"},...o,...a,{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"}].map(d=>kbi.getTemplate(d));return{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:c}}},Abi=Ibi,Pbi={getTemplate(t){let n=new Date().toJSON();return{name:"cp:coreProperties",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"}}]},children:[{name:"dc:creator",textNode:t},{name:"dc:title",textNode:"Workbook"},{name:"dcterms:created",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:n},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:n}]}}},Rbi=Pbi,Nst=(t,e)=>({name:`xdr:${t}`,children:[{name:"xdr:col",textNode:e.col.toString()},{name:"xdr:colOff",textNode:e.offsetX.toString()},{name:"xdr:row",textNode:e.row.toString()},{name:"xdr:rowOff",textNode:e.offsetY.toString()}]}),Fbi=t=>{let e=[{name:"a:ext",properties:{rawMap:{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}},children:[{name:"a16:creationId",properties:{rawMap:{id:"{822E6D20-D7BC-2841-A643-D49A6EF008A2}","xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main"}}}]}];switch(t.recolor&&t.recolor.toLowerCase()){case"grayscale":case"sepia":case"washout":e.push({name:"a:ext",properties:{rawMap:{uri:"{C183D7F6-B498-43B3-948B-1728B52AA6E4}"}},children:[{name:"adec:decorative",properties:{rawMap:{val:"0","xmlns:adec":"http://schemas.microsoft.com/office/drawing/2017/decorative"}}}]})}return{name:"a:extLst",children:e}},Lbi=(t,e)=>({name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:e,name:t.id,descr:t.altText!=null?t.altText:void 0}},children:[Fbi(t)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]}),Vst=t=>{if(!t.saturation&&!t.tint)return;let e=[];return t.saturation&&e.push({name:"a:satMod",properties:{rawMap:{val:t.saturation*1e3}}}),t.tint&&e.push({name:"a:tint",properties:{rawMap:{val:t.tint*1e3}}}),e},Obi=(t,e)=>({name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:t.color}},children:Vst(t)},{name:"a:srgbClr",properties:{rawMap:{val:e.color}},children:Vst(e)}]}),Nbi=(t,e)=>{let n;if(t.transparency){let i=Math.min(Math.max(t.transparency,0),100);n=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(i*1e3)}}}]}if(t.recolor)switch(n||(n=[]),t.recolor.toLocaleLowerCase()){case"grayscale":n.push({name:"a:grayscl"});break;case"sepia":n.push(Obi({color:"black"},{color:"D9C3A5",tint:50,saturation:180}));break;case"washout":n.push({name:"a:lum",properties:{rawMap:{bright:"70000",contrast:"-70000"}}});break;default:}return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":`rId${e}`,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:n},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}},Vbi=(t,e)=>{let n={name:"a:xfrm",children:[{name:"a:off",properties:{rawMap:{x:0,y:0}}},{name:"a:ext",properties:{rawMap:{cx:e.width,cy:e.height}}}]};if(t.rotation){let s=t.rotation;n.properties={rawMap:{rot:Math.min(Math.max(s,0),360)*6e4}}}return{name:"xdr:spPr",children:[n,{name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]}]}},Bbi=t=>{t.fitCell=!!t.fitCell||!t.width||!t.height;let{position:e={},fitCell:n,width:i=0,height:r=0,totalHeight:s,totalWidth:o}=t,{offsetX:a=0,offsetY:l=0,row:c=1,rowSpan:d=1,column:u=1,colSpan:m=1}=e;return{from:{row:c-1,col:u-1,offsetX:jR(a),offsetY:jR(l)},to:{row:c-1+(n?1:d-1),col:u-1+(n?1:m-1),offsetX:jR(i+a),offsetY:jR(r+l)},height:jR(s||r),width:jR(o||i)}},zbi=(t,e,n,i)=>({name:"xdr:pic",children:[Lbi(t,e+1),Nbi(t,n+1),Vbi(t,i)]}),Hbi={getTemplate(t){let{sheetIndex:e}=t,n=rc.worksheetImages.get(e),i=rc.worksheetImageIds.get(e),r=n.map((s,o)=>{let a=Bbi(s);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[Nst("from",a.from),Nst("to",a.to),zbi(s,o,i.get(s.id).index,a),{name:"xdr:clientData"}]}});return{name:"xdr:wsDr",properties:{rawMap:{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"}},children:r}}},Gbi=Hbi,Wbi={getTemplate(t){let{Id:e,Type:n,Target:i}=t;return{name:"Relationship",properties:{rawMap:{Id:e,Type:n,Target:i}}}}},Ubi=Wbi,jbi={getTemplate(t){let e=t.map(n=>Ubi.getTemplate(n));return{name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:e}}},eW=jbi,$bi={getTemplate(t){return{name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.size,uniqueCount:t.size}},children:Ebi(t)}}},Kbi=$bi,Ybi=t=>{switch(t){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}},qbi={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot",Continuous:"Continuous"},Zbi=["Dashed","DashDot","DashDotDot"],Xbi={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinDiagStripe:"lightUp",ThinHorzCross:"lightGrid",ThinDiagCross:"lightTrellis",Gray125:"gray125",Gray0625:"gray0625"},Qbi={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},Jbi={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},e7i=t=>t?Xbi[t]||t:"none",Vw=t=>t==null?t:(t.charAt(0)==="#"&&(t=t.substring(1)),t.length===6?"FF"+t:t),iie=(t,e)=>{if(!t)return"thin";let n=Ybi(e);if(t==="Continuous")return n;let i=qbi[t];return n==="medium"&&Zbi.some(r=>r===i)?`medium${i}`:`${i.charAt(0).toLowerCase()}${i.substring(1)}`},t7i=t=>Qbi[t]||"general",i7i=t=>Jbi[t]||void 0,tW=t=>({name:"color",properties:{rawMap:{rgb:Vw(t||"#000000")}}}),n7i={getTemplate(t){let{left:e,right:n,top:i,bottom:r,diagonal:s}=t,o=e?[tW(e.color)]:void 0,a=n?[tW(n.color)]:void 0,l=i?[tW(i.color)]:void 0,c=r?[tW(r.color)]:void 0,d=s?[tW(s.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:e&&e.style}},children:o},{name:"right",properties:{rawMap:{style:n&&n.style}},children:a},{name:"top",properties:{rawMap:{style:i&&i.style}},children:l},{name:"bottom",properties:{rawMap:{style:r&&r.style}},children:c},{name:"diagonal",properties:{rawMap:{style:s&&s.style}},children:d}]}}},r7i=n7i,s7i={getTemplate(t){return{name:"borders",properties:{rawMap:{count:t.length}},children:t.map(e=>r7i.getTemplate(e))}}},o7i=s7i,a7i=t=>{let n=["Context","LeftToRight","RightToLeft"].indexOf(t);return Math.max(n,0)},l7i={getTemplate(t){let{horizontal:e,indent:n,readingOrder:i,rotate:r,shrinkToFit:s,vertical:o,wrapText:a}=t;return{name:"alignment",properties:{rawMap:{horizontal:e&&t7i(e),indent:n,readingOrder:i&&a7i(i),textRotation:r,shrinkToFit:s,vertical:o&&i7i(o),wrapText:a}}}}},c7i=l7i,d7i={getTemplate(t){let e=t.protected===!1?0:1;return{name:"protection",properties:{rawMap:{hidden:t.hideFormula===!0?1:0,locked:e}}}}},u7i=d7i,h7i={getTemplate(t){let{alignment:e,borderId:n,fillId:i,fontId:r,numFmtId:s,protection:o,quotePrefix:a,xfId:l}=t,c=[];return e&&c.push(c7i.getTemplate(e)),o&&c.push(u7i.getTemplate(o)),{name:"xf",properties:{rawMap:{applyAlignment:e?1:void 0,applyProtection:o?1:void 0,applyBorder:n?1:void 0,applyFill:i?1:void 0,borderId:n,fillId:i,applyFont:r?1:void 0,fontId:r,applyNumberFormat:s?1:void 0,numFmtId:s,quotePrefix:a?1:void 0,xfId:l}},children:c.length?c:void 0}}},hat=h7i,p7i={getTemplate(t){return{name:"cellStyleXfs",properties:{rawMap:{count:t.length}},children:t.map(e=>hat.getTemplate(e))}}},m7i=p7i,f7i={getTemplate(t){let{builtinId:e,name:n,xfId:i}=t;return{name:"cellStyle",properties:{rawMap:{builtinId:e,name:n,xfId:i}}}}},g7i=f7i,v7i={getTemplate(t){return{name:"cellStyles",properties:{rawMap:{count:t.length}},children:t.map(e=>g7i.getTemplate(e))}}},y7i=v7i,_7i={getTemplate(t){return{name:"cellXfs",properties:{rawMap:{count:t.length}},children:t.map(e=>hat.getTemplate(e))}}},C7i=_7i,x7i={getTemplate(t){let{patternType:e,fgTheme:n,fgTint:i,fgRgb:r,bgRgb:s,bgIndexed:o}=t,a={name:"patternFill",properties:{rawMap:{patternType:e}}};return(n||i||r)&&(a.children=[{name:"fgColor",properties:{rawMap:{theme:n,tint:i,rgb:r}}}]),(o||s)&&(a.children||(a.children=[]),a.children.push({name:"bgColor",properties:{rawMap:{indexed:o,rgb:s}}})),{name:"fill",children:[a]}}},b7i=x7i,w7i={getTemplate(t){return{name:"fills",properties:{rawMap:{count:t.length}},children:t.map(e=>b7i.getTemplate(e))}}},S7i=w7i,T7i={getTemplate(t){let{size:e,colorTheme:n,color:i="FF000000",fontName:r="Calibri",family:s,scheme:o,italic:a,bold:l,strikeThrough:c,outline:d,shadow:u,underline:m,verticalAlign:f}=t,_=[{name:"sz",properties:{rawMap:{val:e}}},{name:"color",properties:{rawMap:{theme:n,rgb:i}}},{name:"name",properties:{rawMap:{val:r}}}];return s&&_.push({name:"family",properties:{rawMap:{val:s}}}),o&&_.push({name:"scheme",properties:{rawMap:{val:o}}}),a&&_.push({name:"i"}),l&&_.push({name:"b"}),c&&_.push({name:"strike"}),d&&_.push({name:"outline"}),u&&_.push({name:"shadow"}),m&&_.push({name:"u",properties:{rawMap:{val:m}}}),f&&_.push({name:"vertAlign",properties:{rawMap:{val:f}}}),{name:"font",children:_}}},D7i=T7i,E7i={getTemplate(t){return{name:"fonts",properties:{rawMap:{count:t.length}},children:t.map(e=>D7i.getTemplate(e))}}},M7i=E7i;I7i={getTemplate(t){let{formatCode:e,numFmtId:n}=t;return e.length&&(e=k7i(e)),{name:"numFmt",properties:{rawMap:{formatCode:e,numFmtId:n}}}}},A7i=I7i,P7i={getTemplate(t){return{name:"numFmts",properties:{rawMap:{count:t.length}},children:t.map(e=>A7i.getTemplate(e))}}},R7i=P7i,fat=(t,e)=>(t.indexOf("mixedStyle")!==-1&&e>1&&(t+=`_${e}`),t),gat=()=>{hie={base:0},KR=[],sW=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],oW=[{patternType:"none"},{patternType:"gray125"}],aW=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],pat=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],pie=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],mat=[{builtinId:0,name:"Normal",xfId:0}]},F7i=t=>{let e=e7i(t.pattern),n=Vw(t.color),i=Vw(t.patternColor),r=oW.findIndex(s=>{let{patternType:o,fgRgb:a,bgRgb:l}=s;return!(o!=e||a!=n||l!=i)});return r===-1&&(r=oW.length,oW.push({patternType:e,fgRgb:n,bgRgb:i})),r},L7i=t=>{if(Ost[t])return Ost[t];let e=KR.findIndex(n=>n.formatCode===t);return e===-1?(e=KR.length+164,KR.push({formatCode:t,numFmtId:e})):e=KR[e].numFmtId,e},O7i=t=>{let{borderBottom:e,borderTop:n,borderLeft:i,borderRight:r}=t,s,o,a,l,c,d,u,m;i&&(a=iie(i.lineStyle,i.weight),u=Vw(i.color)),r&&(l=iie(r.lineStyle,r.weight),m=Vw(r.color)),e&&(s=iie(e.lineStyle,e.weight),c=Vw(e.color)),n&&(o=iie(n.lineStyle,n.weight),d=Vw(n.color));let f=aW.findIndex(_=>{let{left:x,right:D,top:E,bottom:M}=_;if(!x&&(a||u)||!D&&(l||m)||!E&&(o||d)||!M&&(s||c))return!1;let{style:I,color:z}=x||{},{style:G,color:A}=D||{},{style:Y,color:X}=E||{},{style:ne,color:pe}=M||{};return!(I!=a||z!=u||G!=l||A!=m||Y!=o||X!=d||ne!=s||pe!=c)});return f===-1&&(f=aW.length,aW.push({left:{style:a,color:u},right:{style:l,color:m},top:{style:o,color:d},bottom:{style:s,color:c},diagonal:{style:void 0,color:void 0}})),f},N7i=t=>{let{fontName:e="Calibri",color:n,size:i,bold:r,italic:s,outline:o,shadow:a,strikeThrough:l,underline:c,family:d,verticalAlign:u}=t,m=Vw(n),f=Sbi(d),_=c?c.toLocaleLowerCase():void 0,x=u?u.toLocaleLowerCase():void 0,D=sW.findIndex(E=>!(E.fontName!=e||E.color!=m||E.size!=i||E.bold!=r||E.italic!=s||E.outline!=o||E.shadow!=a||E.strikeThrough!=l||E.underline!=_||E.verticalAlign!=x||E.family!=f));return D===-1&&(D=sW.length,sW.push({fontName:e,color:m,size:i,bold:r,italic:s,outline:o,shadow:a,strikeThrough:l,underline:_,verticalAlign:x,family:f?.toString()})),D},V7i=t=>{let{alignment:e,borders:n,font:i,interior:r,numberFormat:s,protection:o,quotePrefix:a}=t,{id:l}=t,c=0,d=0,u=0,m=0;l&&(l=fat(l,$xe),hie[l]==null&&(r&&(c=F7i(r)),n&&(d=O7i(n)),i&&(u=N7i(i)),s&&(m=L7i(s.format)),hie[l]=pie.length,pie.push({alignment:e,borderId:d||0,fillId:c||0,fontId:u||0,numFmtId:m||0,protection:o,quotePrefix:a,xfId:0})))},B7i={getTemplate(t){let e=R7i.getTemplate(KR),n=M7i.getTemplate(sW.map(l=>St(ve({},l),{size:l.size!=null?l.size:t}))),i=S7i.getTemplate(oW),r=o7i.getTemplate(aW),s=m7i.getTemplate(pat),o=C7i.getTemplate(pie),a=y7i.getTemplate(mat);return gat(),{name:"styleSheet",properties:{rawMap:{"mc:Ignorable":"x14ac x16r2 xr",xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision"}},children:[e,n,i,r,s,o,a,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},z7i=(t,e)=>hie[fat(t,e)]||0,H7i=(t,e)=>{$xe=e,$xe===1&&gat(),t.forEach(V7i)},G7i=B7i,W7i={getTemplate(t,e){let{name:n,columns:i,rowCount:r,displayName:s,headerRowIndex:o,showRowStripes:a,showColumnStripes:l,showFilterButtons:c,highlightFirstColumn:d,highlightLastColumn:u}=t||{};if(!t||!n||!Array.isArray(i)||!i.length||!r)return{name:"table"};let m=i.map((I,z)=>({name:"filterColumn",properties:{rawMap:{colId:z.toString(),hiddenButton:c[z]?0:1}}})),f=o+1,_=(e+1).toString(),x=`A${f}`,D=`${String.fromCharCode(64+i.length)}${f+r}`,E=`${x}:${D}`,M=e?`${s}_${e+1}`:s;return{name:"table",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",name:n,displayName:M,ref:E,totalsRowShown:0,id:_}},children:[{name:"autoFilter",properties:{rawMap:{ref:E}},children:m},{name:"tableColumns",properties:{rawMap:{count:i.length}},children:i.map((I,z)=>({name:"tableColumn",properties:{rawMap:{id:(z+1).toString(),name:I,dataCellStyle:"Normal"}}}))},{name:"tableStyleInfo",properties:{rawMap:{name:"TableStyleLight1",showFirstColumn:d?1:0,showLastColumn:u?1:0,showRowStripes:a?1:0,showColumnStripes:l?1:0}}}]}}},U7i=W7i,V6=t=>{let[e,n,i,r]=t;return{name:`a:${e}`,children:[{name:`a:${n}`,properties:{rawMap:{val:i,lastClr:r}}}]}},j7i={getTemplate(){return{name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[V6(["dk1","sysClr","windowText","000000"]),V6(["lt1","sysClr","window","FFFFFF"]),V6(["dk2","srgbClr","44546A"]),V6(["lt2","srgbClr","E7E6E6"]),V6(["accent1","srgbClr","4472C4"]),V6(["accent2","srgbClr","ED7D31"]),V6(["accent3","srgbClr","A5A5A5"]),V6(["accent4","srgbClr","FFC000"]),V6(["accent5","srgbClr","5B9BD5"]),V6(["accent6","srgbClr","70AD47"]),V6(["hlink","srgbClr","0563C1"]),V6(["folHlink","srgbClr","954F72"])]}}},$7i=j7i,sr=t=>{let[e,n,i,r]=t;return{name:`a:${e}`,properties:{rawMap:{script:i,typeface:n,panose:r}}}},K7i={getTemplate(){return{name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[sr(["latin","Calibri Light",void 0,"020F0302020204030204"]),sr(["ea",""]),sr(["cs",""]),sr(["font","\u6E38\u30B4\u30B7\u30C3\u30AF Light","Jpan"]),sr(["font","\uB9D1\uC740 \uACE0\uB515","Hang"]),sr(["font","\u7B49\u7EBF Light","Hans"]),sr(["font","\u65B0\u7D30\u660E\u9AD4","Hant"]),sr(["font","Times New Roman","Arab"]),sr(["font","Times New Roman","Hebr"]),sr(["font","Tahoma","Thai"]),sr(["font","Nyala","Ethi"]),sr(["font","Vrinda","Beng"]),sr(["font","Shruti","Gujr"]),sr(["font","MoolBoran","Khmr"]),sr(["font","Tunga","Knda"]),sr(["font","Raavi","Guru"]),sr(["font","Euphemia","Cans"]),sr(["font","Plantagenet Cherokee","Cher"]),sr(["font","Microsoft Yi Baiti","Yiii"]),sr(["font","Microsoft Himalaya","Tibt"]),sr(["font","MV Boli","Thaa"]),sr(["font","Mangal","Deva"]),sr(["font","Gautami","Telu"]),sr(["font","Latha","Taml"]),sr(["font","Estrangelo Edessa","Syrc"]),sr(["font","Kalinga","Orya"]),sr(["font","Kartika","Mlym"]),sr(["font","DokChampa","Laoo"]),sr(["font","Iskoola Pota","Sinh"]),sr(["font","Mongolian Baiti","Mong"]),sr(["font","Times New Roman","Viet"]),sr(["font","Microsoft Uighur","Uigh"]),sr(["font","Sylfaen","Geor"]),sr(["font","Arial","Armn"]),sr(["font","Leelawadee UI","Bugi"]),sr(["font","Microsoft JhengHei","Bopo"]),sr(["font","Javanese Text","Java"]),sr(["font","Segoe UI","Lisu"]),sr(["font","Myanmar Text","Mymr"]),sr(["font","Ebrima","Nkoo"]),sr(["font","Nirmala UI","Olck"]),sr(["font","Ebrima","Osma"]),sr(["font","Phagspa","Phag"]),sr(["font","Estrangelo Edessa","Syrn"]),sr(["font","Estrangelo Edessa","Syrj"]),sr(["font","Estrangelo Edessa","Syre"]),sr(["font","Nirmala UI","Sora"]),sr(["font","Microsoft Tai Le","Tale"]),sr(["font","Microsoft New Tai Lue","Talu"]),sr(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[sr(["latin","Calibri",void 0,"020F0502020204030204"]),sr(["ea",""]),sr(["cs",""]),sr(["font","\u6E38\u30B4\u30B7\u30C3\u30AF","Jpan"]),sr(["font","\uB9D1\uC740 \uACE0\uB515","Hang"]),sr(["font","\u7B49\u7EBF","Hans"]),sr(["font","\u65B0\u7D30\u660E\u9AD4","Hant"]),sr(["font","Arial","Arab"]),sr(["font","Arial","Hebr"]),sr(["font","Tahoma","Thai"]),sr(["font","Nyala","Ethi"]),sr(["font","Vrinda","Beng"]),sr(["font","Shruti","Gujr"]),sr(["font","DaunPenh","Khmr"]),sr(["font","Tunga","Knda"]),sr(["font","Raavi","Guru"]),sr(["font","Euphemia","Cans"]),sr(["font","Plantagenet Cherokee","Cher"]),sr(["font","Microsoft Yi Baiti","Yiii"]),sr(["font","Microsoft Himalaya","Tibt"]),sr(["font","MV Boli","Thaa"]),sr(["font","Mangal","Deva"]),sr(["font","Gautami","Telu"]),sr(["font","Latha","Taml"]),sr(["font","Estrangelo Edessa","Syrc"]),sr(["font","Kalinga","Orya"]),sr(["font","Kartika","Mlym"]),sr(["font","DokChampa","Laoo"]),sr(["font","Iskoola Pota","Sinh"]),sr(["font","Mongolian Baiti","Mong"]),sr(["font","Arial","Viet"]),sr(["font","Microsoft Uighur","Uigh"]),sr(["font","Sylfaen","Geor"]),sr(["font","Arial","Armn"]),sr(["font","Leelawadee UI","Bugi"]),sr(["font","Microsoft JhengHei","Bopo"]),sr(["font","Javanese Text","Java"]),sr(["font","Segoe UI","Lisu"]),sr(["font","Myanmar Text","Mymr"]),sr(["font","Ebrima","Nkoo"]),sr(["font","Nirmala UI","Olck"]),sr(["font","Ebrima","Osma"]),sr(["font","Phagspa","Phag"]),sr(["font","Estrangelo Edessa","Syrn"]),sr(["font","Estrangelo Edessa","Syrj"]),sr(["font","Estrangelo Edessa","Syre"]),sr(["font","Nirmala UI","Sora"]),sr(["font","Microsoft Tai Le","Tale"]),sr(["font","Microsoft New Tai Lue","Talu"]),sr(["font","Ebrima","Tfng"])]}]}}},Y7i=K7i,dC=(t,e,n)=>({name:`a:${t}`,properties:{rawMap:{val:e}},children:n}),kxe=t=>{let[e,n,i,r,s,o]=t,a=[];return a.push(dC("satMod",i)),r&&a.push(dC("lumMod",r)),s&&a.push(dC("tint",s)),o&&a.push(dC("shade",o)),{name:"a:gs",properties:{rawMap:{pos:e}},children:[{name:"a:schemeClr",properties:{rawMap:{val:n}},children:a}]}},mie=(t,e)=>({name:"a:solidFill",children:[dC("schemeClr",t,e)]}),Kxe=t=>{let[e,n,i,r,s]=t,[o,a]=s;return{name:"a:gradFill",properties:{rawMap:{rotWithShape:e}},children:[{name:"a:gsLst",children:[kxe(n),kxe(i),kxe(r)]},{name:"a:lin",properties:{rawMap:{ang:o,scaled:a}}}]}},Ixe=t=>{let[e,n,i,r]=t;return{name:"a:ln",properties:{rawMap:{w:e,cap:n,cmpd:i,algn:r}},children:[mie("phClr"),dC("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},Axe=t=>{let e=[];if(t){let[n,i,r,s,o]=t;e.push({name:"a:outerShdw",properties:{rawMap:{blurRad:n,dist:i,dir:r,algn:s,rotWithShape:o}},children:[dC("srgbClr","000000",[dC("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},e.length?{children:e}:{})]}},q7i=()=>({name:"a:fillStyleLst",children:[mie("phClr"),Kxe(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),Kxe(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]}),Z7i=()=>({name:"a:lnStyleLst",children:[Ixe(["6350","flat","sng","ctr"]),Ixe(["12700","flat","sng","ctr"]),Ixe(["19050","flat","sng","ctr"])]}),X7i=()=>({name:"a:effectStyleLst",children:[Axe(),Axe(),Axe(["57150","19050","5400000","ctr","0"])]}),Q7i=()=>({name:"a:bgFillStyleLst",children:[mie("phClr"),mie("phClr",[dC("tint","95000"),dC("satMod","170000")]),Kxe(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}),J7i={getTemplate(){return{name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[q7i(),Z7i(),X7i(),Q7i()]}}},ewi=J7i,twi={getTemplate(){return{name:"a:themeElements",children:[$7i.getTemplate(),Y7i.getTemplate(),ewi.getTemplate()]}}},iwi=twi,nwi={getTemplate(){return{name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[iwi.getTemplate(),{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]}}},rwi=nwi,swi=()=>({name:"o:shapelayout",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}]},children:[{name:"o:idmap",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:{data:"1"}}}]}),owi=()=>({name:"v:stroke",properties:{rawMap:{joinstyle:"miter"}}}),awi=t=>({name:"v:formulas",children:t.map(e=>({name:"v:f",properties:{rawMap:{eqn:e}}}))}),lwi=()=>({name:"v:path",properties:{prefixedAttributes:[{prefix:"o:",map:{connecttype:"rect",extrusionok:"f"}}],rawMap:{gradientshapeok:"t"}}}),vat=t=>{let{aspectratio:e,rotation:n}=t||{},i={};return e&&(i.aspectratio="t"),n&&(i.rotation="t"),{name:"o:lock",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:i}}};dwi=(t,e)=>{let n,{recolor:i,brightness:r,contrast:s,id:o}=t;if(i&&(n={},(i==="Washout"||i==="Grayscale")&&(n.gain="19661f",n.blacklevel="22938f"),(i==="Black & White"||i==="Grayscale")&&(n.grayscale="t",i==="Black & White"&&(n.bilevel="t"))),!i||i==="Grayscale"){if(n||(n={}),s!=null&&s!==50){let a="1";s>=0&&(s<50?a=String(s/50):s<100?a=String(50/(100-s)):s===100&&(a="2147483647f")),n.gain=a}r!=null&&r!==50&&(n.blacklevel=cwi(r,0,100,-.5,.5).toString())}return{name:"v:imagedata",properties:{prefixedAttributes:[{prefix:"o:",map:{relid:`rId${e}`,title:o}}],rawMap:n}}},uwi=()=>{let t=["if lineDrawn pixelLineWidth 0","sum @0 1 0","sum 0 0 @1","prod @2 1 2","prod @3 21600 pixelWidth","prod @3 21600 pixelHeight","sum @0 0 1","prod @6 1 2","prod @7 21600 pixelWidth","sum @8 21600 0","prod @7 21600 pixelHeight","sum @10 21600 0"];return{name:"v:shapetype",properties:{prefixedAttributes:[{prefix:"o:",map:{spt:"75",preferrelative:"t"}}],rawMap:{coordsize:"21600,21600",filled:"f",id:"_x0000_t75",path:"m@4@5l@4@11@9@11@9@5xe",stroked:"f"}},children:[owi(),awi(t),lwi(),vat({aspectratio:!0})]}},Bst=t=>Math.floor((t??0)*.74999943307122),hwi=(t,e)=>{let{width:n=0,height:i=0,altText:r}=t,s=Bst(n),o=Bst(i);return{name:"v:shape",properties:{rawMap:{id:t.headerFooterPosition,"o:spid":"_x0000_s1025",style:`position: absolute; margin-left: 0; margin-top: 10in; margin-bottom: 0; margin-right: 0; width: ${s}pt; height: ${o}pt; z-index: ${e+1}`,type:"#_x0000_t75",alt:r}},children:[dwi(t,e+1),vat({rotation:!0})]}},pwi={getTemplate(t){let e=rc.worksheetHeaderFooterImages.get(t.sheetIndex)||[],n=[swi(),uwi(),...e.map((i,r)=>hwi(i,r))];return{name:"xml",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{v:"urn:schemas-microsoft-com:vml",o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel"}}]},children:n}}},mwi=pwi,fwi={getTemplate(t,e){let n=(e+1).toString();return{name:"sheet",properties:{rawMap:{name:t,sheetId:n,"r:id":`rId${n}`}}}}},gwi=fwi,vwi={getTemplate(t){return{name:"sheets",children:t.map((e,n)=>gwi.getTemplate(e,n))}}},ywi=vwi,_wi={getTemplate(t,e){return{name:"workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:[{name:"bookViews",children:[{name:"workbookView",properties:{rawMap:{activeTab:e}}}]},ywi.getTemplate(t)]}}},Cwi=_wi,xwi=t=>Math.ceil((t-12)/7+1),bwi={getTemplate(t){let{min:e,max:n,outlineLevel:i,s:r,width:s,hidden:o,bestFit:a}=t,l=1,c="0";return s>1&&(l=xwi(s),c="1"),{name:"col",properties:{rawMap:{min:e,max:n,outlineLevel:i??void 0,width:l,style:r,hidden:o?"1":"0",bestFit:a?"1":"0",customWidth:c}}}}},wwi=bwi,Swi={getTemplate(t){return{name:"mergeCell",properties:{rawMap:{ref:t}}}}},Twi=Swi,Dwi=t=>{let e=t.charAt(0).toLowerCase();return e==="s"?"inlineStr":e},Ewi={getTemplate(t,e,n){let{ref:i,data:r,styleId:s}=t,{type:o,value:a}=r||{type:"empty",value:null},l=o;o==="f"?l="str":o.charAt(0)===o.charAt(0).toUpperCase()&&(l=Dwi(o));let c={name:"c",properties:{rawMap:{r:i,t:l==="empty"?void 0:l,s:s?z7i(s,n):void 0}}};if(l==="empty")return c;let d;return l==="str"&&o==="f"?d=[{name:"f",textNode:nl(jxe(a),!1)}]:l==="inlineStr"?d=[{name:"is",children:[{name:"t",textNode:nl(jxe(a),!1)}]}]:d=[{name:"v",textNode:a}],Object.assign({},c,{children:d})}},Mwi=Ewi,kwi=(t,e)=>{let n=[],i=0;for(let r=0;r<t.length;r++){let s=t[r];s.mergeAcross&&(n.push({pos:r,excelPos:i}),i+=s.mergeAcross),i++}if(n.length)for(let r=n.length-1;r>=0;r--){let s=[],o=t[n[r].pos];for(let a=1;a<=o.mergeAcross;a++)s.push({ref:`${YR(n[r].excelPos+1+a)}${e+1}`,styleId:o.styleId,data:{type:"empty",value:null}});s.length&&t.splice(n[r].pos+1,0,...s)}},Iwi=t=>t.data?.value!==""||t.styleId!==void 0,Awi={getTemplate(t,e,n){let{collapsed:i,hidden:r,height:s,outlineLevel:o,cells:a=[]}=t;kwi(a,e);let l=a.filter(Iwi).map((c,d)=>Mwi.getTemplate(c,d,n));return{name:"row",properties:{rawMap:{r:e+1,collapsed:i?"1":"0",hidden:r?"1":"0",ht:s,customHeight:s!=null?"1":"0",spans:"1:1",outlineLevel:o||void 0}},children:l}}},Pwi=Awi,Rwi=(t,e,n)=>{let i=[],r=[];t.forEach((a,l)=>{let c=a.cells,d=0,u;c.forEach((m,f)=>{let _=f+d+1,x=YR(_),D=l+1;if(m.mergeAcross){d+=m.mergeAcross;let M=YR(f+d+1);i.push(`${x}${D}:${M}${D}`)}e[_-1]||(e[_-1]={});let{collapsibleRanges:E}=m;E&&E.forEach(M=>{r.push([_+M[0],_+M[1]])}),u=e[_-1],u.min=_,u.max=_,m.ref=`${x}${D}`})}),r.sort((a,l)=>a[0]!==l[0]?a[0]-l[0]:l[1]-a[1]);let s=new Map,o=new Map;return r.filter(a=>{let l=a.toString();return s.get(l)?!1:(s.set(l,!0),!0)}).forEach(a=>{let l=e.find(d=>d.min==a[0]&&d.max==a[1]),c=o.get(a[0]);e.push({min:a[0],max:a[1],outlineLevel:n?void 0:c||1,width:(l||{width:100}).width}),o.set(a[0],(c||0)+1)}),i},Fwi=t=>!t||t!=="Portrait"&&t!=="Landscape"?"portrait":t.toLocaleLowerCase(),Lwi=t=>{if(t==null)return 1;let n=["Letter","Letter Small","Tabloid","Ledger","Legal","Statement","Executive","A3","A4","A4 Small","A5","A6","B4","B5","Folio","Envelope","Envelope DL","Envelope C5","Envelope B5","Envelope C3","Envelope C4","Envelope C6","Envelope Monarch","Japanese Postcard","Japanese Double Postcard"].indexOf(t);return n===-1?1:n+1},Owi=t=>(Rh({"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F","&[Picture]":"&G"},(n,i)=>{t=t.replace(n,i)}),t),Nwi=t=>t==="Center"?"C":t==="Right"?"R":"L",Vwi=(t,e)=>(e&&(t+="&amp;&quot;",t+=e.fontName||"Calibri",e.bold!==e.italic?t+=e.bold?",Bold":",Italic":e.bold?t+=",Bold Italic":t+=",Regular",t+="&quot;",e.size&&(t+=`&amp;${e.size}`),e.strikeThrough&&(t+="&amp;S"),e.underline&&(t+=`&amp;${e.underline==="Double"?"E":"U"}`),e.color&&(t+=`&amp;K${e.color.replace("#","").toUpperCase()}`)),t),Bwi=(t,e,n)=>t.reduce((i,r,s)=>{let o=Nwi(r.position),a=Vwi(`${i}&amp;${o}`,r.font),l=["Left","Center","Right"];r.position||(r.position=l[s]);let{image:c}=r;if(r.value==="&[Picture]"&&c){let d=`${o}${e}${n}`;rc.addHeaderFooterImageToMap(c,d)}return`${a}${nl(Owi(r.value))}`},""),zwi=t=>{let e=["all","first","even"],n=[];return e.forEach(i=>{let r=t[i],s=i==="all"?"odd":i;if(r)for(let[o,a]of Object.entries(r)){let l=`${o.charAt(0).toUpperCase()}${o.slice(1)}`,c=o[0].toUpperCase();if(a){let d=i==="all"?"":i.toUpperCase();n.push({name:`${s}${l}`,properties:{rawMap:{"xml:space":"preserve"}},textNode:Bwi(a,c,d)})}}}),n},Hwi=t=>e=>(t.length&&e.children.push({name:"cols",children:t.map(n=>wwi.getTemplate(n))}),e),Gwi=(t,e)=>n=>(t.length&&n.children.push({name:"sheetData",children:t.map((i,r)=>Pwi.getTemplate(i,r,e))}),n),Wwi=t=>e=>(t.length&&e.children.push({name:"mergeCells",properties:{rawMap:{count:t.length}},children:t.map(n=>Twi.getTemplate(n))}),e),Uwi=t=>e=>{let{top:n=.75,right:i=.7,bottom:r=.75,left:s=.7,header:o=.3,footer:a=.3}=t;return e.children.push({name:"pageMargins",properties:{rawMap:{bottom:r,footer:a,header:o,left:s,right:i,top:n}}}),e},jwi=t=>e=>(t&&e.children.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:Fwi(t.orientation),paperSize:Lwi(t.pageSize)}}}),e),$wi=t=>e=>{if(!t)return e;let n=t.first!=null?1:0,i=t.even!=null?1:0;return e.children.push({name:"headerFooter",properties:{rawMap:{differentFirst:n,differentOddEven:i}},children:zwi(t)}),e},Kwi=t=>e=>(t&&e.children.push({name:"tableParts",properties:{rawMap:{count:"1"}},children:[{name:"tablePart",properties:{rawMap:{"r:id":`rId${++e.rIdCounter}`}}}]}),e),Ywi=t=>e=>(rc.worksheetImages.get(t)?.length&&e.children.push({name:"drawing",properties:{rawMap:{"r:id":`rId${++e.rIdCounter}`}}}),e),qwi=t=>e=>(rc.worksheetHeaderFooterImages.get(t)&&e.children.push({name:"legacyDrawingHF",properties:{rawMap:{"r:id":`rId${++e.rIdCounter}`}}}),e),Zwi=(t=0,e=0)=>{let n=t>0||e>0;return n?[{name:"pane",properties:{rawMap:{state:n?"frozen":void 0,topLeftCell:n?`${YR(t+1)}${e+1}`:void 0,xSplit:t===0?void 0:t,ySplit:e===0?void 0:e}}}]:void 0},Xwi=(t=!1,e,n)=>i=>(i.children.push({name:"sheetViews",children:[{name:"sheetView",properties:{rawMap:{rightToLeft:t===!0?"1":"0",workbookViewId:"0"}},children:Zwi(e,n)}]}),i),Qwi=()=>t=>(t.children.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),t),Jwi=t=>e=>{let n=t.reduce((i,r)=>r.outlineLevel&&r.outlineLevel>i?r.outlineLevel:i,0);return e.children.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:n||void 0}}}),e},eSi={getTemplate(t){let{worksheet:e,currentSheet:n,config:i}=t,{margins:r={},pageSetup:s,headerFooterConfig:o,suppressColumnOutline:a,rightToLeft:l,frozenRowCount:c,frozenColumnCount:d}=i,{table:u}=e,{rows:m,columns:f}=u,_=f&&f.length?Rwi(m,f,!!a):[],{worksheetDataTables:x}=rc,D=x.get(n),E=N3e(Qwi(),Xwi(l,d,c),Jwi(m),Hwi(f),Gwi(m,n+1),Wwi(_),Uwi(r),jwi(s),$wi(o),Ywi(n),qwi(n),Kwi(D)),{children:M}=E({children:[],rIdCounter:0});return{name:"worksheet",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:M}}},tSi=eSi,p_=class yat{static createExcel(e,n,i){this.addSheetName(n),H7i(e,this.sheetNames.length);let r=Object.assign({},i);return i.exportAsExcelTable&&(i.columnModel.isPivotActive()&&(this.showExcelTableNonCompatibleFeaturesWarning("pivot mode"),r.exportAsExcelTable=!1),i.gos.get("masterDetail")&&(this.showExcelTableNonCompatibleFeaturesWarning("master/detail"),r.exportAsExcelTable=!1)),this.processTableConfig(n,r),this.createWorksheet(n,r)}static showExcelTableNonCompatibleFeaturesWarning(e){wt(`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
Please turn off ${e} to enable Excel table exports.`)}static getTableNameFromIndex(e){return`table${e+1}`}static getSanitizedTableName(e){return e.replace(/^[^a-zA-Z_]+/,"_").replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"_")}static addTableToSheet(e,n){if(this.worksheetDataTables.has(e)){wt("Unable to add data table to Excel sheet: A table already exists.");return}this.worksheetDataTables.set(e,n)}static processTableConfig(e,n){if(!n.exportAsExcelTable)return;let i=typeof n.exportAsExcelTable=="boolean"?{}:n.exportAsExcelTable,{name:r,showColumnStripes:s,showRowStripes:o,showFilterButton:a,highlightFirstColumn:l,highlightLastColumn:c}=i,d=this.getSanitizedTableName(r||yat.defaultTableDisplayName),u=this.sheetNames.length-1,{table:m}=e,{rows:f,columns:_}=m,x=n.columnModel.getHeaderRowCount(),D=x-1,E=f.length,M=_.length,I=[],z=[];for(let G=0;G<M;G++){let A=_[G];I.push(A.displayName||""),z.push(a==="match"||a===void 0?A.filterAllowed??!1:a)}if(!I||!I.length||!E||!d){wt("Unable to add data table to Excel sheet: Missing required parameters.");return}this.addTableToSheet(u,{name:this.getTableNameFromIndex(u),displayName:d,columns:I,showFilterButtons:z,headerRowIndex:D,rowCount:E-x,showRowStripes:o??!0,showColumnStripes:s??!1,highlightFirstColumn:l??!1,highlightLastColumn:c??!1})}static addHeaderFooterImageToMap(e,n){let i=this.sheetNames.length-1,r=e;r.headerFooterPosition=n,this.buildImageMap({imageToAdd:r,idx:i});let s=this.worksheetHeaderFooterImages.get(i);s||(s=[],this.worksheetHeaderFooterImages.set(i,s)),s.find(o=>o.id===e.id)||s.push(e)}static addBodyImageToMap(e,n,i,r,s){let o=this.sheetNames.length,{row:a,column:l}=e.position||{},c=e;r&&(n!=null&&i!=null&&(!a||!l)&&(e.position||(e.position={}),e.position=Object.assign({},e.position,{row:n,column:r.indexOf(i)+1})),Tbi(c,r),Dbi(c,s)),this.buildImageMap({imageToAdd:c,idx:o});let d=this.worksheetImageIds.get(o);d||(d=new Map,this.worksheetImageIds.set(o,d));let u=this.worksheetImages.get(o);u?u.push(c):this.worksheetImages.set(o,[c]),d.get(e.id)||d.set(e.id,{index:d.size,type:e.imageType})}static buildImageMap(e){let{imageToAdd:n,idx:i}=e,r=this.images.get(n.id);if(r){let s=r.find(o=>o.sheetId===i);s?s.image.push(n):r.push({sheetId:i,image:[n]})}else this.images.set(n.id,[{sheetId:i,image:[n]}]),this.workbookImageIds.set(n.id,{type:n.imageType,index:this.workbookImageIds.size})}static addSheetName(e){let n=nl(e.name)||"",i="";for(;this.sheetNames.indexOf(`${n}${i}`)!==-1;)i===""?i="_1":i=`_${parseInt(i.slice(1),10)+1}`;e.name=`${n}${i}`,this.sheetNames.push(e.name)}static getStringPosition(e){return this.sharedStrings.has(e)?this.sharedStrings.get(e):(this.sharedStrings.set(e,this.sharedStrings.size),this.sharedStrings.size-1)}static resetFactory(){this.sharedStrings=new Map,this.images=new Map,this.worksheetImages=new Map,this.worksheetHeaderFooterImages=new Map,this.workbookImageIds=new Map,this.worksheetImageIds=new Map,this.worksheetDataTables=new Map,this.sheetNames=[],this.factoryMode=_D.SINGLE_SHEET}static createWorkbook(e){return Bg(Cwi.getTemplate(this.sheetNames,e))}static createStylesheet(e){return Bg(G7i.getTemplate(e))}static createSharedStrings(){return Bg(Kbi.getTemplate(this.sharedStrings))}static createCore(e){return Bg(Rbi.getTemplate(e))}static createContentTypes(e){return Bg(Abi.getTemplate(e))}static createRels(){let e=eW.getTemplate([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"},{Id:"rId2",Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"}]);return Bg(e)}static createTheme(){return Bg(rwi.getTemplate())}static createTable(e,n){return Bg(U7i.getTemplate(e,n))}static createWorkbookRels(e){let n=new Array(e).fill(void 0).map((r,s)=>({Id:`rId${s+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${s+1}.xml`})),i=eW.getTemplate([...n,{Id:`rId${e+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:`rId${e+2}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:`rId${e+3}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}]);return Bg(i)}static createDrawing(e){return Bg(Gbi.getTemplate({sheetIndex:e}))}static createDrawingRel(e){let n=this.worksheetImageIds.get(e)||[],i=[];for(let[r,s]of n)i.push({Id:`rId${s.index+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${this.workbookImageIds.get(r).index+1}.${s.type}`});return Bg(eW.getTemplate(i))}static createVmlDrawing(e){return Bg(mwi.getTemplate({sheetIndex:e}),!0)}static createVmlDrawingRel(e){let n=this.worksheetHeaderFooterImages.get(e)||[],i=[];for(let r=0;r<n.length;r++){let s=n[r],o=this.workbookImageIds.get(s.id);if(!o)continue;let{index:a,type:l}=o,c=l==="jpg"?"jpeg":l;i.push({Id:`rId${r+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${a+1}.${c}`})}return Bg(eW.getTemplate(i))}static createRelationships({drawingIndex:e,vmlDrawingIndex:n,tableIndex:i}={}){if(e===void 0&&n===void 0&&i===void 0)return"";let r=[];e!=null&&r.push({Id:`rId${r.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${e+1}.xml`}),n!=null&&r.push({Id:`rId${r.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${n+1}.vml`}),i!=null&&r.push({Id:`rId${r.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/${this.getTableNameFromIndex(i)}.xml`});let s=eW.getTemplate(r);return Bg(s)}static createWorksheet(e,n){return Bg(tSi.getTemplate({worksheet:e,currentSheet:this.sheetNames.length-1,config:n}))}};p_.sharedStrings=new Map;p_.sheetNames=[];p_.images=new Map;p_.worksheetImages=new Map;p_.worksheetHeaderFooterImages=new Map;p_.workbookImageIds=new Map;p_.worksheetImageIds=new Map;p_.worksheetDataTables=new Map;p_.defaultTableDisplayName="AG-GRID-TABLE";p_.factoryMode=_D.SINGLE_SHEET;rc=p_,iSi=class extends x4e{constructor(t){super(t),this.mixedStyles={},this.mixedStyleCounter=0,this.rows=[],this.frozenRowCount=0,this.skipFrozenRows=!1,this.frozenColumnCount=0,this.skipFrozenColumns=!1,this.config=Object.assign({},t),this.stylesByIds={},this.config.baseExcelStyles.forEach(e=>{this.stylesByIds[e.id]=e}),this.excelStyles=[...this.config.baseExcelStyles,{id:"_quotePrefix",quotePrefix:1}]}addCustomContent(t){t.forEach(e=>{let n=this.rows.length+1,i;!this.config.suppressRowOutline&&e.outlineLevel!=null&&(i=e.outlineLevel);let r={height:oie(n,e.height||this.config.rowHeight),cells:(e.cells||[]).map((s,o)=>{let a=this.addImage(n,this.columnsToExport[o],s.data?.value),l=null;s.styleId&&(l=typeof s.styleId=="string"?[s.styleId]:s.styleId);let c=this.getStyleId(l);if(a)return this.createCell(c,this.getDataTypeForValue(a.value),a.value==null?"":a.value);let d=s.data?.value??"",u=this.getDataTypeForValue(d);return s.mergeAcross?this.createMergedCell(c,u,d,s.mergeAcross):this.createCell(c,u,d)}),outlineLevel:i};e.collapsed!=null&&(r.collapsed=e.collapsed),e.hidden!=null&&(r.hidden=e.hidden),this.rows.push(r)})}onNewHeaderGroupingRow(){let t=[],{freezeRows:e,headerRowHeight:n}=this.config;return this.rows.push({cells:t,height:oie(this.rows.length+1,n)}),e&&this.frozenRowCount++,{onColumn:(i,r,s,o,a)=>{let l=this.config.styleLinker({rowType:E7.HEADER_GROUPING,rowIndex:1,value:`grouping-${r}`,columnGroup:i});t.push(St(ve({},this.createMergedCell(this.getStyleId(l),this.getDataTypeForValue("string"),r,o)),{collapsibleRanges:a}))}}}onNewHeaderRow(){let{freezeRows:t,headerRowHeight:e}=this.config;return t&&this.frozenRowCount++,this.onNewRow(this.onNewHeaderColumn,e)}onNewBodyRow(t){let{freezeRows:e,rowHeight:n}=this.config;this.skipFrozenRows||(e==="headersAndPinnedRows"&&t?.rowPinned==="top"?this.frozenRowCount++:typeof e=="function"?e(St(ve({},this.gos.getGridCommonParams()),{node:t}))?this.frozenRowCount++:this.skipFrozenRows=!0:this.skipFrozenRows=!0);let i=this.onNewRow(this.onNewBodyColumn,n);return t&&this.addRowOutlineIfNecessary(t),i}prepare(t){super.prepare(t),this.columnsToExport=[...t],this.cols=t.map((e,n)=>this.convertColumnToExcel(e,n))}parse(){let t=this.rows.reduce((r,s)=>Math.max(r,s.cells.length),0);for(;this.cols.length<t;)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));let{config:e}=this,n;if(e.sheetName!=null){let{sheetName:r}=e,s=typeof r=="function"?r(this.gos.getGridCommonParams()):r;n=String(s).substring(0,31)}else n="ag-grid";let i={name:n,table:{columns:this.cols,rows:this.rows}};return this.createExcel(i)}addRowOutlineIfNecessary(t){let{gos:e,suppressRowOutline:n,rowGroupExpandState:i="expanded"}=this.config;if(e.get("groupHideOpenParents")||n||t.level==null)return;let s=t.footer?1:0,o=Ar(this.rows);if(o.outlineLevel=t.level+s,i==="expanded")return;let a=i==="collapsed";if(t.isExpandable()){let l=!a&&t.expanded;o.collapsed=!l}o.hidden=!!t.parent&&t.parent.level!==-1&&(a||this.isAnyParentCollapsed(t.parent))}isAnyParentCollapsed(t){for(;t&&t.level!==-1;){if(!t.expanded)return!0;t=t.parent}return!1}convertColumnToExcel(t,e){let n=this.config.columnWidth,r=(t?this.extractHeaderValue(t):void 0)??"",s=t?t.isFilterAllowed():!1;return n?typeof n=="number"?{width:n,displayName:r,filterAllowed:s}:{width:n({column:t,index:e}),displayName:r,filterAllowed:s}:t?{width:Math.max(t.getActualWidth(),75),displayName:r,filterAllowed:s}:{displayName:r,filterAllowed:s}}onNewHeaderColumn(t,e){return n=>{let i=this.extractHeaderValue(n),r=this.config.styleLinker({rowType:E7.HEADER,rowIndex:t,value:i,column:n});e.push(this.createCell(this.getStyleId(r),this.getDataTypeForValue("string"),i))}}onNewBodyColumn(t,e){let n=0,{freezeColumns:i,rightToLeft:r}=this.config;return(s,o,a)=>{if(n>0){n-=1;return}if(!this.skipFrozenColumns){let _=s.getPinned();i==="pinned"&&_&&(_===!0||_==="left")!==r?this.frozenColumnCount++:typeof i=="function"&&i(St(ve({},this.gos.getGridCommonParams()),{column:s}))?this.frozenColumnCount++:this.skipFrozenColumns=!0}let{value:l,valueFormatted:c}=this.extractRowCellValue(s,o,t,"excel",a),d=this.config.styleLinker({rowType:E7.BODY,rowIndex:t,value:l,column:s,node:a}),u=this.getStyleId(d),m=s.getColSpan(a),f=this.addImage(t,s,l);f?e.push(this.createCell(u,this.getDataTypeForValue(f.value),f.value==null?"":f.value)):m>1?(n=m-1,e.push(this.createMergedCell(u,this.getDataTypeForValue(l),l,m-1))):e.push(this.createCell(u,this.getDataTypeForValue(l),l,c))}}onNewRow(t,e){let n=[];return this.rows.push({cells:n,height:oie(this.rows.length+1,e)}),{onColumn:t.bind(this,this.rows.length,n)()}}createExcel(t){let{excelStyles:e,config:n}=this;return this.frozenColumnCount&&(n.frozenColumnCount=this.frozenColumnCount),this.frozenRowCount&&(n.frozenRowCount=this.frozenRowCount),rc.createExcel(e,t,n)}getDataTypeForValue(t){return t===void 0?"empty":this.isNumerical(t)?"n":"s"}getTypeFromStyle(t,e){if(this.isFormula(e))return"f";if(t&&t.dataType)switch(t.dataType.toLocaleLowerCase()){case"formula":return"f";case"string":return"s";case"number":return"n";case"datetime":return"d";case"error":return"e";case"boolean":return"b";default:wt(`Unrecognized data type for excel export [${t.id}.dataType=${t.dataType}]`)}return null}addImage(t,e,n){if(!this.config.addImageToCell)return;let i=this.config.addImageToCell(t,e,n);if(i)return rc.addBodyImageToMap(i.image,t,e,this.columnsToExport,this.config.rowHeight),i}createCell(t,e,n,i){let r=this.getStyleById(t);!r?.dataType&&e==="s"&&i&&(n=i);let s=this.getTypeFromStyle(r,n)||e,{value:o,escaped:a}=this.getCellValue(s,n),l=[];return r&&l.push(t),a&&l.push("_quotePrefix"),t=this.getStyleId(l)||void 0,{styleId:t,data:{type:s,value:o}}}createMergedCell(t,e,n,i){let r=n??"";return{styleId:this.getStyleById(t)?t:void 0,data:{type:e,value:e==="s"?rc.getStringPosition(r).toString():n},mergeAcross:i}}getCellValue(t,e){let n=!1;if(e==null||t==="s"&&e==="")return{value:"",escaped:!1};if(t==="s")e&&e[0]==="'"&&(n=!0,e=e.slice(1)),e=rc.getStringPosition(e).toString();else if(t==="f")e=e.slice(1);else if(t==="n"){let i=Number(e);isNaN(i)?e="":e!==""&&(e=i.toString())}return{value:e,escaped:n}}getStyleId(t){if(!t||!t.length)return null;if(t.length===1)return t[0];let e=t.join("-");return this.mixedStyles[e]||this.addNewMixedStyle(t),this.mixedStyles[e].excelID}deepCloneObject(t){return JSON.parse(JSON.stringify(t))}addNewMixedStyle(t){this.mixedStyleCounter+=1;let e=`mixedStyle${this.mixedStyleCounter}`,n={};for(let r of t)for(let s of this.excelStyles)s.id===r&&im(n,this.deepCloneObject(s));n.id=e,n.name=e;let i=t.join("-");this.mixedStyles[i]={excelID:e,key:i,result:n},this.excelStyles.push(n),this.stylesByIds[e]=n}isFormula(t){return t==null?!1:this.config.autoConvertFormulas&&t.toString().startsWith("=")}isNumerical(t){return typeof t=="bigint"?!0:isFinite(t)&&t!==""&&!isNaN(parseFloat(t))}getStyleById(t){return t==null?null:this.stylesByIds[t]||null}},nSi=()=>{Tm.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]);let{images:t}=rc;if(!t.size)return;Tm.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);let e=0;t.forEach(n=>{let i=n[0].image[0],{base64:r,imageType:s}=i,o=s==="jpg"?"jpeg":s;Tm.addFile(`xl/media/image${++e}.${o}`,r,!0)})},rSi=t=>{let e=0,n=0,i=0,{images:r,worksheetDataTables:s,worksheetImages:o,worksheetHeaderFooterImages:a}=rc;for(let l=0;l<t.length;l++){let c=t[l];Tm.addFile(`xl/worksheets/sheet${l+1}.xml`,c,!1);let d=r.size>0&&o.has(l),u=s.size>0&&s.has(l),m=r.size&&a.has(l);if(!d&&!u&&!m)continue;let f,_,x;d&&(sSi(l,e),_=e,e++),m&&(oSi(l,n),x=n,n++),u&&(f=i++);let D=`xl/worksheets/_rels/sheet${l+1}.xml.rels`;Tm.addFile(D,rc.createRelationships({tableIndex:f,drawingIndex:_,vmlDrawingIndex:x}))}},sSi=(t,e)=>{let n="xl/drawings",i=`${n}/drawing${e+1}.xml`,r=`${n}/_rels/drawing${e+1}.xml.rels`;Tm.addFile(r,rc.createDrawingRel(t)),Tm.addFile(i,rc.createDrawing(t))},oSi=(t,e)=>{let n="xl/drawings",i=`${n}/vmlDrawing${e+1}.vml`,r=`${n}/_rels/vmlDrawing${e+1}.vml.rels`;Tm.addFile(i,rc.createVmlDrawing(t)),Tm.addFile(r,rc.createVmlDrawingRel(t))},aSi=()=>{let{worksheetDataTables:t}=rc,e=t,n=Array.from(e.keys());for(let i=0;i<n.length;i++){let r=n[i],s=e.get(r);s&&Tm.addFile(`xl/tables/${s.name}.xml`,rc.createTable(s,i))}},lSi=(t,e,n,i)=>{Tm.addFile("xl/workbook.xml",rc.createWorkbook(i)),Tm.addFile("xl/styles.xml",rc.createStylesheet(t)),Tm.addFile("xl/sharedStrings.xml",rc.createSharedStrings()),Tm.addFile("xl/theme/theme1.xml",rc.createTheme()),Tm.addFile("xl/_rels/workbook.xml.rels",rc.createWorkbookRels(n)),Tm.addFile("docProps/core.xml",rc.createCore(e)),Tm.addFile("[Content_Types].xml",rc.createContentTypes(n)),Tm.addFile("_rels/.rels",rc.createRels())},_at=(t,e={})=>{if(!t||t.length===0)return wt("Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty."),rc.resetFactory(),!1;let{fontSize:n=11,author:i="AG Grid",activeTab:r=0}=e,s=t.length,o=Math.max(Math.min(r,s-1),0);return nSi(),aSi(),rSi(t),lSi(n,i,s,o),rc.resetFactory(),!0},Cat=t=>{let{data:e,fontSize:n,author:i,activeSheetIndex:r}=t,s=t.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return _at(e,{author:i,fontSize:n,activeTab:r})?Tm.getZipFile(s):Promise.resolve(void 0)},Yxe=t=>{let{data:e,fontSize:n,author:i,activeSheetIndex:r}=t,s=t.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if(_at(e,{author:i,fontSize:n,activeTab:r}))return Tm.getUncompressedZipFile(s)},xat=t=>{let{fileName:e="export.xlsx"}=t;Cat(t).then(n=>{if(n){let i=typeof e=="function"?e():e;JZ.download(i,n)}})},cSi=class extends C4e{constructor(){super(...arguments),this.beanName="excelCreator"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.stylingService=t.stylingService,this.gridSerializer=t.gridSerializer,this.gos=t.gos}postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(t){let e=this.gos.get("defaultExcelExportParams");return Object.assign({},e,t)}export(t){if(this.isExportSuppressed()){wt("Export cancelled. Export is not allowed as per your configuration.");return}let e=this.getMergedParams(t),i={data:[this.getData(e)],fontSize:e.fontSize,author:e.author,mimeType:e.mimeType};this.packageCompressedFile(i).then(r=>{if(r){let{fileName:s}=e,o=typeof s=="function"?s(this.gos.getGridCommonParams()):s;JZ.download(this.getFileName(o),r)}})}exportDataAsExcel(t){this.export(t)}getDataAsExcel(t){let e=this.getMergedParams(t),i={data:[this.getData(e)],fontSize:e.fontSize,author:e.author,mimeType:e.mimeType};return this.packageFile(i)}setFactoryMode(t){rc.factoryMode=t}getFactoryMode(){return rc.factoryMode}getSheetDataForExcel(t){let e=this.getMergedParams(t);return this.getData(e)}getMultipleSheetsAsExcel(t){return Yxe(t)}exportMultipleSheetsAsExcel(t){xat(t)}getDefaultFileExtension(){return"xlsx"}createSerializingSession(t){let{columnModel:e,columnNameService:n,funcColsService:i,valueService:r,gos:s}=this,o=St(ve({},t),{columnModel:e,columnNameService:n,funcColsService:i,valueService:r,gos:s,suppressRowOutline:t.suppressRowOutline||t.skipRowGroups,headerRowHeight:t.headerRowHeight||t.rowHeight,baseExcelStyles:this.gos.get("excelStyles")||[],rightToLeft:t.rightToLeft??this.gos.get("enableRtl"),styleLinker:this.styleLinker.bind(this)});return new iSi(o)}styleLinker(t){let{rowType:e,rowIndex:n,value:i,column:r,columnGroup:s,node:o}=t,a=e===E7.HEADER,l=e===E7.HEADER_GROUPING,c=a?r:s,d=[];if(a||l)return d.push("header"),l&&d.push("headerGroup"),c&&(d=d.concat(jZ(c.getDefinition(),this.gos,r||null,s||null))),d;let u=this.gos.get("excelStyles"),m=["cell"];if(!u||!u.length)return m;let f=u.map(x=>x.id),_=r.getDefinition();return this.stylingService.processAllCellClasses(_,this.gos.addGridCommonParams({value:i,data:o.data,node:o,colDef:_,column:r,rowIndex:n}),x=>{f.indexOf(x)>-1&&m.push(x)}),m.sort((x,D)=>f.indexOf(x)<f.indexOf(D)?-1:1)}isExportSuppressed(){return this.gos.get("suppressExcelExport")}packageCompressedFile(t){return Cat(t)}packageFile(t){return Yxe(t)}};Tbe="32.1.0",wat={version:Tbe,moduleName:`${wr.ExcelExportModule}-core`,beans:[cSi],dependantModules:[eX,y1]},fSi={version:Tbe,moduleName:`${wr.ExcelExportModule}-api`,apiFunctions:{getDataAsExcel:dSi,exportDataAsExcel:uSi,getSheetDataForExcel:hSi,getMultipleSheetsAsExcel:pSi,exportMultipleSheetsAsExcel:mSi},dependantModules:[wat]},Sat={version:Tbe,moduleName:wr.ExcelExportModule,dependantModules:[wat,fSi]},gSi=class extends ai{constructor(){super(...arguments),this.eExpand=Bt,this.eFilterTextField=Bt}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.setTemplate(`<div class="ag-filter-toolpanel-search" role="presentation">
                <div data-ref="eExpand" class="ag-filter-toolpanel-expand"></div>
                <ag-input-text-field data-ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>
            </div>`,[xf]);let t=this.localeService.getLocaleTextFunc();this.eFilterTextField.setAutoComplete(!1).setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")).onValueChange(this.onSearchTextChanged.bind(this)),this.createExpandIcons(),this.setExpandState(0),this.addManagedElementListeners(this.eExpand,{click:this.onExpandClicked.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)})}init(t){this.params=t,this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=tr("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=tr("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=tr("columnSelectIndeterminate",this.gos))}showOrHideOptions(){let t=!this.params.suppressFilterSearch,e=!this.params.suppressExpandAll,n=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(n("searchOoo","Search..."));let i=s=>s.getOriginalParent()&&s.isFilterAllowed(),r=this.columnModel.getCols().some(i);Vn(this.eFilterTextField.getGui(),t),Vn(this.eExpand,e&&r)}onSearchTextChanged(){this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=Ap(()=>{this.dispatchLocalEvent({type:"searchChanged",searchText:this.eFilterTextField.getValue()})},300)),this.onSearchTextChangedDebounced()}onExpandClicked(){let t=this.currentExpandState===0?{type:"collapseAll"}:{type:"expandAll"};this.dispatchLocalEvent(t)}setExpandState(t){this.currentExpandState=t,Vn(this.eExpandChecked,this.currentExpandState===0),Vn(this.eExpandUnchecked,this.currentExpandState===1),Vn(this.eExpandIndeterminate,this.currentExpandState===2)}},vSi={selector:"AG-FILTERS-TOOL-PANEL-HEADER",component:gSi},Tat=class extends ai{constructor(t,e){super(`
            <div class="ag-filter-toolpanel-instance">
                <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" data-ref="eFilterToolPanelHeader" role="button" aria-expanded="false">
                    <div data-ref="eExpand" class="ag-filter-toolpanel-expand"></div>
                    <span data-ref="eFilterName" class="ag-header-cell-text"></span>
                    <span data-ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>
                </div>
                <div class="ag-filter-toolpanel-instance-body ag-filter" data-ref="agFilterToolPanelBody"></div>
            </div>`),this.expandedCallback=e,this.eFilterToolPanelHeader=Bt,this.eFilterName=Bt,this.agFilterToolPanelBody=Bt,this.eFilterIcon=Bt,this.eExpand=Bt,this.expanded=!1,this.hideHeader=t}wireBeans(t){this.filterManager=t.filterManager,this.columnNameService=t.columnNameService}postConstruct(){this.eExpandChecked=tr("columnSelectOpen",this.gos),this.eExpandUnchecked=tr("columnSelectClosed",this.gos),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)}setColumn(t){this.column=t,this.eFilterName.innerText=this.columnNameService.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListeners(this.eFilterToolPanelHeader,{click:this.toggleExpanded.bind(this),keydown:this.onKeyDown.bind(this)}),this.addManagedEventListeners({filterOpened:this.onFilterOpened.bind(this)}),this.addInIcon("filter",this.eFilterIcon,this.column),Vn(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),Vn(this.eExpandChecked,!1),this.hideHeader?(Vn(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListeners(this.column,{filterChanged:this.onFilterChanged.bind(this)})}onKeyDown(t){let{key:e}=t,{ENTER:n,SPACE:i,LEFT:r,RIGHT:s}=It;e!==n&&e!==i&&e!==r&&e!==s||(t.preventDefault(),e===n||e===i?this.toggleExpanded():e===It.LEFT?this.collapse():this.expand())}getColumn(){return this.column}getColumnFilterName(){return this.columnNameService.getDisplayNameForColumn(this.column,"filterToolPanel",!1)}addCssClassToTitleBar(t){this.eFilterToolPanelHeader.classList.add(t)}addInIcon(t,e,n){if(e==null)return;let i=tr(t,this.gos,n);e.appendChild(i)}isFilterActive(){return!!this.filterManager?.isFilterActive(this.column)}onFilterChanged(){Vn(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchLocalEvent({type:"filterChanged"})}toggleExpanded(){this.expanded?this.collapse():this.expand()}expand(){this.expanded||(this.expanded=!0,ip(this.eFilterToolPanelHeader,!0),Vn(this.eExpandChecked,!0),Vn(this.eExpandUnchecked,!1),this.addFilterElement(),this.expandedCallback())}addFilterElement(t){let e=Rp('<div class="ag-filter-toolpanel-instance-filter"></div>'),n=this.createManagedBean(new CD(this.column,"TOOLBAR"));this.filterWrapperComp=n,n.hasFilter()&&n.getFilter()?.then(i=>{this.underlyingFilter=i,i&&(e.appendChild(n.getGui()),this.agFilterToolPanelBody.appendChild(e),n.afterGuiAttached({container:"toolPanel",suppressFocus:t}))})}collapse(){this.expanded&&(this.expanded=!1,ip(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),Vn(this.eExpandChecked,!1),Vn(this.eExpandUnchecked,!0),this.filterWrapperComp?.afterGuiDetached(),this.destroyBean(this.filterWrapperComp),this.expandedCallback())}removeFilterElement(){zo(this.agFilterToolPanelBody)}isExpanded(){return this.expanded}refreshFilter(t){if(!this.expanded)return;let e=this.underlyingFilter;e&&(t?typeof e.refreshVirtualList=="function"&&e.refreshVirtualList():e.afterGuiDetached?.())}onFilterOpened(t){t.source==="COLUMN_MENU"&&t.column===this.column&&this.expanded&&this.collapse()}},Rw=class Dat extends ai{constructor(e,n,i,r,s){super(),this.filterGroupComp=Bt,this.columnGroup=e,this.childFilterComps=n,this.depth=r,this.expandedCallback=i,this.showingColumn=s}wireBeans(e){this.columnNameService=e.columnNameService}postConstruct(){let e={cssIdentifier:"filter-toolpanel",direction:"vertical"};this.setTemplate(`<div class="ag-filter-toolpanel-group-wrapper">
            <ag-group-component data-ref="filterGroupComp"></ag-group-component>
        </div>`,[ah],{filterGroupComp:e}),this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass(`ag-filter-toolpanel-group-level-${this.depth}`),this.filterGroupComp.getGui().style.setProperty("--ag-indentation-level",String(this.depth)),this.filterGroupComp.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth}-header`),this.childFilterComps.forEach(n=>{this.filterGroupComp.addItem(n),n.addCssClassToTitleBar(`ag-filter-toolpanel-group-level-${this.depth+1}-header`),n.getGui().style.setProperty("--ag-indentation-level",String(this.depth+1))}),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip(),this.addInIcon("filter")}setupTooltip(){if(!this.showingColumn)return;let e=this.gos.get("tooltipShowMode")==="whenTruncated",n;e&&(n=()=>{let s=this.filterGroupComp.getGui().querySelector(".ag-group-title");return s?s.scrollWidth>s.clientWidth:!0});let i=()=>{let r=this.columnGroup.getColDef().headerTooltip;this.setTooltip({newTooltipText:r,location:"filterToolPanelColumnGroup",shouldDisplayTooltip:n})};i(),this.addManagedEventListeners({newColumnsLoaded:i})}getTooltipParams(){let e=super.getTooltipParams();return e.location="filterToolPanelColumnGroup",e}addCssClassToTitleBar(e){this.filterGroupComp.addCssClassToTitleBar(e)}refreshFilters(e){this.childFilterComps.forEach(n=>{n instanceof Dat?n.refreshFilters(e):n.refreshFilter(e)})}isColumnGroup(){return Md(this.columnGroup)}isExpanded(){return this.filterGroupComp.isExpanded()}getChildren(){return this.childFilterComps}getFilterGroupName(){return this.filterGroupName?this.filterGroupName:""}getFilterGroupId(){return this.columnGroup.getId()}hideGroupItem(e,n){this.filterGroupComp.hideItem(e,n)}hideGroup(e){this.setDisplayed(!e)}addInIcon(e){let n=tr(e,this.gos);n&&n.classList.add("ag-filter-toolpanel-group-instance-header-icon"),this.filterGroupComp.addTitleBarWidget(n)}forEachToolPanelFilterChild(e){this.childFilterComps.forEach(n=>{n instanceof Tat&&e(n)})}addExpandCollapseListeners(){let e=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(i=>i.expand()),n=this.isColumnGroup()?()=>this.expandedCallback():()=>this.forEachToolPanelFilterChild(i=>i.collapse());this.addManagedListeners(this.filterGroupComp,{expanded:e,collapsed:n})}getColumns(){return Md(this.columnGroup)?this.columnGroup.getLeafColumns():[this.columnGroup]}addFilterChangedListeners(){this.getColumns().forEach(e=>{this.addManagedListeners(e,{filterChanged:()=>this.refreshFilterClass()})}),Md(this.columnGroup)||this.addManagedEventListeners({filterOpened:this.onFilterOpened.bind(this)})}refreshFilterClass(){let e=this.getColumns(),n=()=>e.some(i=>i.isFilterActive());this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",n())}onFilterOpened(e){e.source==="COLUMN_MENU"&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()}expand(){this.filterGroupComp.toggleGroupExpand(!0)}collapse(){this.filterGroupComp.toggleGroupExpand(!1)}setGroupTitle(){this.filterGroupName=Md(this.columnGroup)?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")}getColumnGroupName(e){return this.columnNameService.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")}getColumnName(e){return this.columnNameService.getDisplayNameForColumn(e,"filterToolPanel",!1)}destroyFilters(){this.childFilterComps=this.destroyBeans(this.childFilterComps),zo(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}},ySi=class extends ai{constructor(){super('<div class="ag-filter-list-panel"></div>'),this.initialised=!1,this.hasLoadedInitialState=!1,this.isInitialState=!1,this.filterGroupComps=[],this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending=!1}wireBeans(t){this.toolPanelColDefService=t.toolPanelColDefService,this.columnModel=t.columnModel}init(t){this.initialised=!0;let e=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});im(e,t),this.params=e,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:()=>this.onColumnsChanged()}),this.addManagedEventListeners({newColumnsLoaded:()=>this.onColumnsChanged(),toolPanelVisibleChanged:n=>{n.key==="filters"&&this.refreshFilters(n.visible)},dragStarted:()=>{this.suppressOnColumnsChanged=!0},dragStopped:()=>{this.suppressOnColumnsChanged=!1,this.onColumnsChangedPending&&(this.onColumnsChangedPending=!1,this.onColumnsChanged())}}),this.columnModel.isReady()&&this.onColumnsChanged()}onColumnsChanged(){if(this.suppressOnColumnsChanged){this.onColumnsChangedPending=!0;return}let t=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!t?this.syncFilterLayout():this.buildTreeFromProvidedColumnDefs(),this.refreshAriaLabel()}syncFilterLayout(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this)),this.refreshAriaLabel()}buildTreeFromProvidedColumnDefs(){let t=this.columnModel.getColDefColTree();this.recreateFilters(t)}setFiltersLayout(t){let e=this.toolPanelColDefService.createColumnTree(t);this.recreateFilters(e)}recreateFilters(t){let e=this.gos.getActiveDomElement();this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);let n=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(t,0,n);let i=this.filterGroupComps.length;i&&(this.filterGroupComps.forEach(r=>this.appendChild(r)),this.setFirstAndLastVisible(0,i-1)),Di(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(e)&&e.focus(),this.isInitialState=!1,this.refreshAriaLabel()}recursivelyAddComps(t,e,n){return WB(t.map(i=>{if(Md(i))return WB(this.recursivelyAddFilterGroupComps(i,e,n));let r=i;if(!this.shouldDisplayFilter(r))return[];let s=e===0,o=new Tat(s,()=>this.onFilterExpanded());if(this.createBean(o),o.setColumn(r),n.get(r.getId())&&o.expand(),e>0)return o;let a=this.createBean(new Rw(r,[o],this.onGroupExpanded.bind(this),e,!0));return a.addCssClassToTitleBar("ag-filter-toolpanel-header"),n.get(a.getFilterGroupId())||a.collapse(),a}))}refreshAriaLabel(){let t=this.localeService.getLocaleTextFunc(),e=t("ariaFilterPanelList","Filter List"),n=t("filters","Filters"),l=this.getGui().querySelectorAll(".ag-filter-toolpanel-group-item:not(.ag-filter-toolpanel-group-wrapper, .ag-hidden)").length;hl(this.getAriaElement(),`${e} ${l} ${n}`)}recursivelyAddFilterGroupComps(t,e,n){if(!this.filtersExistInChildren(t.getChildren()))return;let i=t.getColGroupDef();if(i&&i.suppressFiltersToolPanel)return[];let r=t.isPadding()?e:e+1,s=WB(this.recursivelyAddComps(t.getChildren(),r,n));if(t.isPadding())return s;let o=new Rw(t,s,this.onGroupExpanded.bind(this),e,!1);this.createBean(o),o.addCssClassToTitleBar("ag-filter-toolpanel-header");let a=n.get(o.getFilterGroupId());return(this.isInitialState&&!a||a===!1)&&o.collapse(),[o]}filtersExistInChildren(t){return t.some(e=>Md(e)?this.filtersExistInChildren(e.getChildren()):this.shouldDisplayFilter(e))}shouldDisplayFilter(t){let e=t.getColDef()&&t.getColDef().suppressFiltersToolPanel;return t.isFilterAllowed()&&!e}getExpansionState(){let t=new Map;if(this.isInitialState){let{expandedColIds:n,expandedGroupIds:i}=this.params.initialState;return n.forEach(r=>t.set(r,!0)),i.forEach(r=>t.set(r,!0)),t}let e=n=>{t.set(n.getFilterGroupId(),n.isExpanded()),n.getChildren().forEach(i=>{i instanceof Rw?e(i):t.set(i.getColumn().getId(),i.isExpanded())})};return this.filterGroupComps.forEach(e),t}refresh(){}setVisible(t){super.setDisplayed(t),t&&!this.initialised&&this.init(this.params)}expandFilterGroups(t,e){let n=[],i=r=>{let s=r.getFilterGroupId();(!e||Sl(e,s))&&(t&&r.isColumnGroup()?r.expand():r.collapse(),n.push(s)),r.getChildren().forEach(a=>{a instanceof Rw&&i(a)})};if(this.filterGroupComps.forEach(i),this.onGroupExpanded(),e){let r=e.filter(s=>n.indexOf(s)<0);r.length>0&&wt("unable to find groups for these supplied groupIds:",r)}}expandFilters(t,e){let n=[],i=r=>{if(r instanceof Rw){let a=!1;return r.getChildren().forEach(l=>{i(l)&&(t?(r.expand(),a=!0):r.isColumnGroup()||r.collapse())}),a}let s=r.getColumn().getColId(),o=!e||Sl(e,s);return o&&(t?r.expand():r.collapse(),n.push(s)),o};if(this.filterGroupComps.forEach(i),this.onGroupExpanded(),e){let r=e.filter(s=>n.indexOf(s)<0);r.length>0&&wt("unable to find columns for these supplied colIds:"+r)}}onGroupExpanded(){this.fireExpandedEvent()}onFilterExpanded(){this.dispatchLocalEvent({type:"filterExpanded"})}fireExpandedEvent(){let t=0,e=0,n=r=>{r.isColumnGroup()&&(r.isExpanded()?t++:e++,r.getChildren().forEach(s=>{s instanceof Rw&&n(s)}))};this.filterGroupComps.forEach(n);let i;t>0&&e>0?i=2:e>0?i=1:i=0,this.dispatchLocalEvent({type:"groupExpanded",state:i})}performFilterSearch(t){this.searchFilterText=Di(t)?t.toLowerCase():null,this.searchFilters(this.searchFilterText)}searchFilters(t){let e=s=>!Di(t)||s.toLowerCase().indexOf(t)!==-1,n=(s,o)=>{if(!(s instanceof Rw))return e(s.getColumnFilterName()||"");let a=s.getChildren(),l=e(s.getFilterGroupName()),c=o||l;if(c){s.hideGroup(!1);for(let u=0;u<a.length;u++)n(a[u],c),s.hideGroupItem(!1,u);return!0}let d=!1;return a.forEach((u,m)=>{let f=n(u,o);s.hideGroupItem(!f,m),f&&(d=!0)}),s.hideGroup(!d),d},i,r;this.filterGroupComps.forEach((s,o)=>{n(s,!1),i===void 0?s.containsCssClass("ag-hidden")||(i=o,r=o):!s.containsCssClass("ag-hidden")&&r!==o&&(r=o)}),this.setFirstAndLastVisible(i,r),this.refreshAriaLabel()}setFirstAndLastVisible(t,e){this.filterGroupComps.forEach((n,i)=>{n.removeCssClass("ag-first-group-visible"),n.removeCssClass("ag-last-group-visible"),i===t&&n.addCssClass("ag-first-group-visible"),i===e&&n.addCssClass("ag-last-group-visible")})}refreshFilters(t){this.filterGroupComps.forEach(e=>e.refreshFilters(t))}getExpandedFiltersAndGroups(){let t=[],e=new Set,n=i=>{if(i instanceof Rw){i.getChildren().forEach(s=>n(s));let r=i.getFilterGroupId();i.isExpanded()&&!e.has(r)&&t.push(r)}else i.isExpanded()&&e.add(i.getColumn().getColId())};return this.filterGroupComps.forEach(n),{expandedGroupIds:t,expandedColIds:Array.from(e)}}destroyFilters(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),zo(this.getGui())}destroy(){this.destroyFilters(),super.destroy()}},_Si={selector:"AG-FILTERS-TOOL-PANEL-LIST",component:ySi},CSi=class extends ai{constructor(){super(`<div class="ag-filter-toolpanel">
            <ag-filters-tool-panel-header data-ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>
            <ag-filters-tool-panel-list data-ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>
         </div>`,[vSi,_Si]),this.filtersToolPanelHeaderPanel=Bt,this.filtersToolPanelListPanel=Bt,this.initialised=!1,this.listenerDestroyFuncs=[]}init(t){this.initialised&&(this.listenerDestroyFuncs.forEach(r=>r()),this.listenerDestroyFuncs=[]),this.initialised=!0;let e=this.gos.addGridCommonParams({suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1});this.params=ve(ve({},e),t),this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);let n=this.params.suppressExpandAll,i=this.params.suppressFilterSearch;n&&i&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(...this.addManagedListeners(this.filtersToolPanelHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),searchChanged:this.onSearchChanged.bind(this)}),...this.addManagedListeners(this.filtersToolPanelListPanel,{filterExpanded:this.onFilterExpanded.bind(this),groupExpanded:this.onGroupExpanded.bind(this)}))}setVisible(t){super.setDisplayed(t),t&&!this.initialised&&this.init(this.params)}onExpandAll(){this.filtersToolPanelListPanel.expandFilterGroups(!0)}onCollapseAll(){this.filtersToolPanelListPanel.expandFilterGroups(!1)}onSearchChanged(t){this.filtersToolPanelListPanel.performFilterSearch(t.searchText)}setFilterLayout(t){this.filtersToolPanelListPanel.setFiltersLayout(t)}onFilterExpanded(){this.params.onStateUpdated()}onGroupExpanded(t){this.filtersToolPanelHeaderPanel.setExpandState(t.state),this.params.onStateUpdated()}expandFilterGroups(t){this.filtersToolPanelListPanel.expandFilterGroups(!0,t)}collapseFilterGroups(t){this.filtersToolPanelListPanel.expandFilterGroups(!1,t)}expandFilters(t){this.filtersToolPanelListPanel.expandFilters(!0,t)}collapseFilters(t){this.filtersToolPanelListPanel.expandFilters(!1,t)}syncLayoutWithGrid(){this.filtersToolPanelListPanel.syncFilterLayout()}refresh(t){return this.init(t),!0}getState(){return this.filtersToolPanelListPanel.getExpandedFiltersAndGroups()}destroy(){super.destroy()}},xSi="32.1.0",Eat={version:xSi,moduleName:wr.FiltersToolPanelModule,beans:[],userComponents:[{name:"agFiltersToolPanel",classImp:CSi}],dependantModules:[bie,y1,e6]},Mat=class extends Ot{constructor(){super(...arguments),this.loadRowDataVersion=0}wireBeans(t){this.focusService=t.focusService,this.rowPositionUtils=t.rowPositionUtils,this.environment=t.environment}init(t,e){this.params=e,this.comp=t,e.pinned==null&&(this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.addThemeToDetailGrid(),this.createDetailGrid(),this.loadRowData(),this.addManagedEventListeners({fullWidthRowFocused:this.onFullWidthRowFocused.bind(this)}))}onFullWidthRowFocused(t){let e=this.params,n={rowIndex:e.node.rowIndex,rowPinned:e.node.rowPinned},i={rowIndex:t.rowIndex,rowPinned:t.rowPinned};this.rowPositionUtils.sameRow(n,i)&&this.focusService.focusInto(this.comp.getGui(),t.fromBelow)}setAutoHeightClasses(){let t=this.gos.get("detailRowAutoHeight"),e=t?"ag-details-row-auto-height":"ag-details-row-fixed-height",n=t?"ag-details-grid-auto-height":"ag-details-grid-fixed-height";this.comp.addOrRemoveCssClass(e,!0),this.comp.addOrRemoveDetailGridCssClass(n,!0)}setupRefreshStrategy(){let t=this.params.refreshStrategy;if(t=="everything"||t=="nothing"||t=="rows"){this.refreshStrategy=t;return}t!=null&&wt("invalid cellRendererParams.refreshStrategy = '"+t+"' supplied, defaulting to refreshStrategy = 'rows'."),this.refreshStrategy="rows"}addThemeToDetailGrid(){for(let t of this.environment.getThemeClasses())this.comp.addOrRemoveDetailGridCssClass(t,!0)}createDetailGrid(){if(Ls(this.params.detailGridOptions)){wt("could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions");return}let t=this.gos.get("detailRowAutoHeight"),e=ve({},this.params.detailGridOptions);t&&(e.domLayout="autoHeight"),this.comp.setDetailGrid(e)}registerDetailWithMaster(t){let e=this.params.node.id,n=this.params.api,i={id:e,api:t},r=this.params.node;n.isDestroyed()||(n.addDetailGridInfo(e,i),r.detailGridInfo=i,this.addDestroyFunc(()=>{r.detailGridInfo===i&&(n.isDestroyed()||n.removeDetailGridInfo(e),r.detailGridInfo=null)}))}loadRowData(){this.loadRowDataVersion++;let t=this.loadRowDataVersion;if(this.params.detailGridOptions?.rowModelType==="serverSide"){this.params.node.detailGridInfo?.api?.refreshServerSide({purge:!0});return}let e=this.params.getDetailRowData;if(!e){wt("could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData");return}let n=r=>{this.loadRowDataVersion===t&&this.comp.setRowData(r)},i={node:this.params.node,data:this.params.node.data,successCallback:n,context:this.gos.getGridCommonParams().context};e(i)}refresh(){switch(this.refreshStrategy){case"nothing":return!0;case"everything":return!1}return this.loadRowData(),!0}},bSi=class extends ai{constructor(){super(...arguments),this.eDetailGrid=Bt}wireBeans(t){this.context=t.context}init(t){this.params=t,this.selectAndSetTemplate();let e={addOrRemoveCssClass:(n,i)=>this.addOrRemoveCssClass(n,i),addOrRemoveDetailGridCssClass:(n,i)=>this.eDetailGrid.classList.toggle(n,i),setDetailGrid:n=>this.setDetailGrid(n),setRowData:n=>this.setRowData(n),getGui:()=>this.eDetailGrid};this.ctrl=this.createManagedBean(new Mat),this.ctrl.init(e,t)}refresh(){return this.ctrl&&this.ctrl.refresh()}destroy(){super.destroy()}selectAndSetTemplate(){if(this.params.pinned){this.setTemplate('<div class="ag-details-row"></div>');return}let t=()=>{this.setTemplate(`<div class="ag-details-row" role="gridcell">
                <div data-ref="eDetailGrid" class="ag-details-grid" role="presentation"></div>
            </div>`)};if(Ls(this.params.template))t();else if(typeof this.params.template=="string")this.setTemplate(this.params.template,[]);else if(typeof this.params.template=="function"){let e=this.params.template,n=e(this.params);this.setTemplate(n,[])}else wt("detailCellRendererParams.template should be function or string"),t();this.eDetailGrid==null&&wt('Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.')}setDetailGrid(t){if(!this.eDetailGrid)return;let e=this.context.getBean("agGridReact"),n=e?T7(e):void 0,i=this.context.getBean("frameworkComponentWrapper"),r=this.getFrameworkOverrides(),s=XZ(this.eDetailGrid,t,{frameworkOverrides:r,providedBeanInstances:{agGridReact:n,frameworkComponentWrapper:i},modules:Sa.__getGridRegisteredModules(this.params.api.getGridId())});this.detailApi=s,this.ctrl.registerDetailWithMaster(s),this.addDestroyFunc(()=>{s?.destroy()})}setRowData(t){this.detailApi&&this.detailApi.setGridOption("rowData",t)}},wSi=class extends Ot{constructor(){super(...arguments),this.beanName="detailGridApiService",this.detailGridInfoMap={}}addDetailGridInfo(t,e){this.detailGridInfoMap[t]=e}removeDetailGridInfo(t){delete this.detailGridInfoMap[t]}getDetailGridInfo(t){return this.detailGridInfoMap[t]}forEachDetailGridInfo(t){let e=0;Rh(this.detailGridInfoMap,(n,i)=>{Di(i)&&(t(i,e),e++)})}destroy(){this.detailGridInfoMap={},super.destroy()}};Dbe="32.1.0",kat={version:Dbe,moduleName:`${wr.MasterDetailModule}-core`,userComponents:[{name:"agGroupRowRenderer",classImp:cW},{name:"agGroupCellRenderer",classImp:cW},{name:"agDetailCellRenderer",classImp:bSi}],controllers:[{name:"detailCellRenderer",classImp:Mat},{name:"groupCellRendererCtrl",classImp:_ie}],dependantModules:[y1]},MSi={version:Dbe,moduleName:`${wr.MasterDetailModule}-api`,beans:[wSi],apiFunctions:{addDetailGridInfo:SSi,removeDetailGridInfo:TSi,getDetailGridInfo:DSi,forEachDetailGridInfo:ESi},dependantModules:[kat]},Iat={version:Dbe,moduleName:wr.MasterDetailModule,dependantModules:[kat,MSi]},kSi=class Aat extends Ot{constructor(){super(...arguments),this.beanName="chartMenuItemMapper"}wireBeans(e){this.chartService=e.chartService}getChartItems(e){if(!this.chartService){Sa.__assertRegistered(wr.GridChartsModule,`the Context Menu key "${e}"`,this.gridId);return}let n=e==="pivotChart"?new ISi(this.gos,this.chartService,this.localeService):new ASi(this.gos,this.chartService,this.localeService),i=this.chartService.isEnterprise(),r=n.getMenuItem();if(r&&r.subMenu&&!i){let o=a=>St(ve({},a),{subMenu:a.subMenu?.filter(l=>!l._enterprise).map(l=>o(l))});r=o(r)}let s=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;return s&&(r=Aat.filterAndOrderChartMenu(r,s,n.getConfigLookup())),this.cleanInternals(r)}cleanInternals(e){if(!e)return e;let n=i=>(delete i?._key,delete i?._enterprise,i?.subMenu?.forEach(r=>n(r)),i);return n(e)}static buildLookup(e){let n={},i=r=>{n[r._key]=r,r.subMenu&&r.subMenu.forEach(s=>i(s))};return i(e),n}static filterAndOrderChartMenu(e,n,i){let r=this.buildLookup(e),s=St(ve({},e),{subMenu:[]});if(Object.entries(n).forEach(([o,a])=>{let l=i[o];if(l===null)return;if(l==null){wt(`invalid chartGroupsDef config '${o}'`);return}let c=r[l._key];if(c)if(c.subMenu){let d=a.map(u=>{let m=l[u];if(m==null){wt(`invalid chartGroupsDef config '${o}.${u}'`);return}return r[m]}).filter(u=>u!==void 0);d.length>0&&(c.subMenu=d,s.subMenu?.push(c))}else s.subMenu?.push(c)}),s.subMenu?.length!=0)return s}},ISi=class{constructor(t,e,n){this.gos=t,this.chartService=e,this.localeService=n}getMenuItem(){let t=this.localeService.getLocaleTextFunc(),e=(n,i,r,s,o=!1)=>({name:t(n,i),action:()=>this.chartService.createPivotChart({chartType:r}),_key:s,_enterprise:o});return{name:t("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:t("columnChart","Column"),subMenu:[e("groupedColumn","Grouped&lrm;","groupedColumn","pivotGroupedColumn"),e("stackedColumn","Stacked&lrm;","stackedColumn","pivotStackedColumn"),e("normalizedColumn","100% Stacked&lrm;","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:t("barChart","Bar"),subMenu:[e("groupedBar","Grouped&lrm;","groupedBar","pivotGroupedBar"),e("stackedBar","Stacked&lrm;","stackedBar","pivotStackedBar"),e("normalizedBar","100% Stacked&lrm;","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:t("pieChart","Pie"),subMenu:[e("pie","Pie&lrm;","pie","pivotPie"),e("donut","Donut&lrm;","donut","pivotDonut")]},e("line","Line&lrm;","line","pivotLineChart"),{_key:"pivotXYChart",name:t("xyChart","X Y (Scatter)"),subMenu:[e("scatter","Scatter&lrm;","scatter","pivotScatter"),e("bubble","Bubble&lrm;","bubble","pivotBubble")]},{_key:"pivotAreaChart",name:t("areaChart","Area"),subMenu:[e("area","Area&lrm;","area","pivotArea"),e("stackedArea","Stacked&lrm;","stackedArea","pivotStackedArea"),e("normalizedArea","100% Stacked&lrm;","normalizedArea","pivotNormalizedArea")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:t("statisticalChart","Statistical"),subMenu:[e("histogramChart","Histogram&lrm;","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:t("hierarchicalChart","Hierarchical"),subMenu:[e("treemapChart","Treemap&lrm;","treemap","pivotTreemap",!0),e("sunburstChart","Sunburst&lrm;","sunburst","pivotSunburst",!0)]},{_key:"pivotCombinationChart",name:t("combinationChart","Combination"),subMenu:[e("columnLineCombo","Column & Line&lrm;","columnLineCombo","pivotColumnLineCombo"),e("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","pivotAreaColumnCombo")]}],icon:tr("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},polarGroup:null,specializedGroup:null}}},ASi=class{constructor(t,e,n){this.gos=t,this.chartService=e,this.localeService=n}getMenuItem(){let t=this.localeService.getLocaleTextFunc(),e=(n,i,r,s,o=!1)=>({name:t(n,i),action:()=>this.chartService.createChartFromCurrentRange(r),_key:s,_enterprise:o});return{name:t("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:t("columnChart","Column"),subMenu:[e("groupedColumn","Grouped&lrm;","groupedColumn","rangeGroupedColumn"),e("stackedColumn","Stacked&lrm;","stackedColumn","rangeStackedColumn"),e("normalizedColumn","100% Stacked&lrm;","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:t("barChart","Bar"),subMenu:[e("groupedBar","Grouped&lrm;","groupedBar","rangeGroupedBar"),e("stackedBar","Stacked&lrm;","stackedBar","rangeStackedBar"),e("normalizedBar","100% Stacked&lrm;","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:t("pieChart","Pie"),subMenu:[e("pie","Pie&lrm;","pie","rangePie"),e("donut","Donut&lrm;","donut","rangeDonut")],_key:"rangePieChart"},e("line","Line&lrm;","line","rangeLineChart"),{name:t("xyChart","X Y (Scatter)"),subMenu:[e("scatter","Scatter&lrm;","scatter","rangeScatter"),e("bubble","Bubble&lrm;","bubble","rangeBubble")],_key:"rangeXYChart"},{name:t("areaChart","Area"),subMenu:[e("area","Area&lrm;","area","rangeArea"),e("stackedArea","Stacked&lrm;","stackedArea","rangeStackedArea"),e("normalizedArea","100% Stacked&lrm;","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:t("polarChart","Polar"),subMenu:[e("radarLine","Radar Line&lrm;","radarLine","rangeRadarLine"),e("radarArea","Radar Area&lrm;","radarArea","rangeRadarArea"),e("nightingale","Nightingale&lrm;","nightingale","rangeNightingale"),e("radialColumn","Radial Column&lrm;","radialColumn","rangeRadialColumn"),e("radialBar","Radial Bar&lrm;","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:t("statisticalChart","Statistical"),subMenu:[e("boxPlot","Box Plot&lrm;","boxPlot","rangeBoxPlot",!0),e("histogramChart","Histogram&lrm;","histogram","rangeHistogram",!1),e("rangeBar","Range Bar&lrm;","rangeBar","rangeRangeBar",!0),e("rangeArea","Range Area&lrm;","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:t("hierarchicalChart","Hierarchical"),subMenu:[e("treemap","Treemap&lrm;","treemap","rangeTreemap"),e("sunburst","Sunburst&lrm;","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:t("specializedChart","Specialized"),subMenu:[e("heatmap","Heatmap&lrm;","heatmap","rangeHeatmap"),e("waterfall","Waterfall&lrm;","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:t("combinationChart","Combination"),subMenu:[e("columnLineCombo","Column & Line&lrm;","columnLineCombo","rangeColumnLineCombo"),e("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:tr("chart",this.gos,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},PSi=class extends Ot{constructor(){super(...arguments),this.beanName="columnChooserFactory"}wireBeans(t){this.focusService=t.focusService,this.menuUtils=t.menuUtils,this.visibleColsService=t.visibleColsService}createColumnSelectPanel(t,e,n,i){let r=t.createManagedBean(new Sbe),s=i??e?.getColDef().columnChooserParams??e?.getColDef().columnsMenuParams??{},{contractColumnSelection:o,suppressColumnExpandAll:a,suppressColumnFilter:l,suppressColumnSelectAll:c,suppressSyncLayoutWithGrid:d,columnLayout:u}=s;return r.init(!!n,this.gos.addGridCommonParams({suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!o,suppressColumnExpandAll:!!a,suppressColumnFilter:!!l,suppressColumnSelectAll:!!c,suppressSyncLayoutWithGrid:!!u||!!d,onStateUpdated:()=>{}}),"columnMenu"),u&&r.setColumnLayout(u),r}showColumnChooser({column:t,chooserParams:e,eventSource:n}){this.hideActiveColumnChooser();let i=this.createColumnSelectPanel(this,t,!0,e),r=this.localeService.getLocaleTextFunc(),s=this.visibleColsService.getAllCols().indexOf(t),o=t?this.focusService.getFocusedHeader():null;this.activeColumnChooserDialog=this.createBean(new ZR({title:r("chooseColumns","Choose Columns"),component:i,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{this.focusService.findNextFocusableElement(i.getGui())?.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,t)},closedCallback:a=>{let l=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,t),t&&this.menuUtils.restoreFocusOnClose({column:t,headerPosition:o,columnIndex:s,eventSource:n},l,a,!0)},postProcessPopupParams:{type:"columnChooser",column:t,eventSource:n}})),this.activeColumnChooser=i}hideActiveColumnChooser(){this.activeColumnChooserDialog&&this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(t,e){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:t,switchingTab:!1,key:"columnChooser",column:e??null})}},$R="separator",RSi=class extends Ot{constructor(){super(...arguments),this.beanName="columnMenuFactory"}wireBeans(t){this.menuItemMapper=t.menuItemMapper,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.rowModel=t.rowModel,this.menuService=t.menuService}createMenu(t,e,n){let i=t.createManagedBean(new XR(0,{column:e??null,node:null,value:null})),r=this.getMenuItems(e),s=this.menuItemMapper.mapWithStockItems(r,e??null,n,"columnMenu");return i.addMenuItems(s),i}getMenuItems(t){let e=this.getDefaultMenuOptions(t),n,i=t?.getColDef().mainMenuItems;if(Array.isArray(i))n=i;else if(typeof i=="function")n=i(this.gos.addGridCommonParams({column:t,defaultItems:e}));else{let r=this.gos.getCallback("getMainMenuItems");r&&t?n=r({column:t,defaultItems:e}):n=e}return jHe(n,$R),n}getDefaultMenuOptions(t){let e=[],n=this.menuService.isLegacyMenuEnabled();if(!t)return n||e.push("columnChooser"),e.push("resetColumns"),e;let i=!t.getColDef().lockPinned,r=this.funcColsService.getRowGroupColumns().length,s=r>0,o=t.isAllowValue(),a=t.isAllowRowGroup(),l=t.isPrimary(),c=this.columnModel.isPivotMode(),d=this.rowModel.getType()==="clientSide",u=this.gos.get("treeData"),m=l&&s&&o||!l;if(!n&&t.isSortable()){let x=t.getSort();x!=="asc"&&e.push("sortAscending"),x!=="desc"&&e.push("sortDescending"),x&&e.push("sortUnSort"),e.push($R)}return this.menuService.isFilterMenuItemEnabled(t)&&(e.push("columnFilter"),e.push($R)),i&&e.push("pinSubMenu"),m&&e.push("valueAggSubMenu"),(i||m)&&e.push($R),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push($R),t.getColDef().showRowGroup?e.push("rowUnGroup"):a&&t.isPrimary()&&(t.isRowGroupActive()?this.columnModel.isColGroupLocked(t)||e.push("rowUnGroup"):e.push("rowGroup")),e.push($R),n||e.push("columnChooser"),e.push("resetColumns"),d&&(u||r>(c?1:0))&&(e.push("expandAll"),e.push("contractAll")),e}},FSi="ag-menu",zst="ag-context-menu-open",LSi=class extends Ot{constructor(){super(...arguments),this.beanName="contextMenuFactory"}wireBeans(t){this.popupService=t.popupService,this.ctrlsService=t.ctrlsService,this.columnModel=t.columnModel,this.menuUtils=t.menuUtils,this.rangeService=t.rangeService}hideActiveMenu(){this.destroyBean(this.activeMenu)}getMenuItems(t,e,n){let i=[];if(Di(t)&&Sa.__isRegistered(wr.ClipboardModule,this.gridId)&&e&&(this.gos.get("suppressCutToClipboard")||i.push("cut"),i.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")),this.gos.get("enableCharts")&&Sa.__isRegistered(wr.GridChartsModule,this.gridId)&&(this.columnModel.isPivotMode()&&i.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&i.push("chartRange")),Di(t)){let a=!Sa.__isRegistered(wr.CsvExportModule,this.gridId),l=!Sa.__isRegistered(wr.ExcelExportModule,this.gridId),c=this.gos.get("suppressExcelExport")||l,d=this.gos.get("suppressCsvExport")||a;!x5()&&(!c||!d)&&i.push("export")}let r=i.length?i:void 0,s=e?.getColDef().contextMenuItems;if(Array.isArray(s))return s;if(typeof s=="function")return s(this.gos.addGridCommonParams({column:e,node:t,value:n,defaultItems:r}));let o=this.gos.getCallback("getContextMenuItems");return o?o({column:e,node:t,value:n,defaultItems:r}):i}onContextMenu(t,e,n,i,r,s){this.menuUtils.onContextMenu(t,e,o=>this.showMenu(n,i,r,o,s))}showMenu(t,e,n,i,r){let s=this.getMenuItems(t,e,n),o=this.ctrlsService.getGridBodyCtrl().getGui();if(s===void 0||Gd(s))return!1;let a=new OSi(s,e,t,n);this.createBean(a);let l=a.getGui(),c={column:e,rowNode:t,type:"contextMenu",mouseEvent:i,ePopup:l,nudgeY:1},d=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:f=>{o.classList.remove(zst),this.destroyBean(a),this.dispatchVisibleChangedEvent(!1,f===void 0?"api":"ui")},click:i,positionCallback:()=>{let f=this.gos.get("enableRtl");this.popupService.positionPopupUnderMouseEvent(St(ve({},c),{nudgeX:f?(l.offsetWidth+1)*-1:1}))},anchorToElement:r,ariaLabel:d("ariaLabelContextMenu","Context Menu")});u&&(o.classList.add(zst),a.afterGuiAttached({container:"contextMenu",hidePopup:u.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=a,a.addEventListener("destroyed",()=>{this.activeMenu===a&&(this.activeMenu=null)}),u&&a.addEventListener("closeMenu",f=>u.hideFunc({mouseEvent:f.mouseEvent??void 0,keyboardEvent:f.keyboardEvent??void 0,forceHide:!0}));let m=i&&i instanceof MouseEvent&&i.type==="mousedown";return this.dispatchVisibleChangedEvent(!0,m?"api":"ui"),!0}dispatchVisibleChangedEvent(t,e="ui"){this.eventService.dispatchEvent({type:"contextMenuVisibleChanged",visible:t,source:e})}},OSi=class extends ai{constructor(t,e,n,i){super(`<div class="${FSi}" role="presentation"></div>`),this.menuItems=t,this.column=e,this.node=n,this.value=i,this.menuList=null,this.focusedCell=null}wireBeans(t){this.focusService=t.focusService,this.menuItemMapper=t.menuItemMapper,this.cellPositionUtils=t.cellPositionUtils}postConstruct(){let t=this.createManagedBean(new XR(0,{column:this.column,node:this.node,value:this.value})),e=this.menuItemMapper.mapWithStockItems(this.menuItems,null,()=>this.getGui(),"contextMenu");t.addMenuItems(e),this.appendChild(t),this.menuList=t,t.addEventListener("closeMenu",n=>this.dispatchLocalEvent(n))}afterGuiAttached(t){t.hidePopup&&this.addDestroyFunc(t.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())}restoreFocusedCell(){let t=this.focusService.getFocusedCell();if(t&&this.focusedCell&&this.cellPositionUtils.equals(t,this.focusedCell)){let{rowIndex:e,rowPinned:n,column:i}=this.focusedCell;this.gos.isNothingFocused()&&this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!this.focusService.isKeyboardMode()})}}destroy(){this.restoreFocusedCell(),super.destroy()}},Lw="filterMenuTab",Ow="generalMenuTab",Fw="columnsMenuTab",aie=[Ow,Lw,Fw],NSi=class extends Ot{constructor(){super(...arguments),this.beanName="enterpriseMenuFactory"}wireBeans(t){this.popupService=t.popupService,this.focusService=t.focusService,this.ctrlsService=t.ctrlsService,this.visibleColsService=t.visibleColsService,this.filterManager=t.filterManager,this.menuUtils=t.menuUtils,this.menuService=t.menuService}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(t,e,n,i){let r=i?"filterMenuTab":void 0;this.showMenu(t,s=>{let o=s.getGui();this.popupService.positionPopupUnderMouseEvent({type:n,column:t,mouseEvent:e,ePopup:o}),r&&s.showTab?.(r),this.dispatchVisibleChangedEvent(!0,!1,t,r)},n,r,void 0,e.target)}showMenuAfterButtonClick(t,e,n,i){let r=-1,s="left";this.gos.get("enableRtl")&&(r=1,s="right");let o=i?"filterMenuTab":void 0,a=o?[o]:void 0,l=this.menuService.isLegacyMenuEnabled(),c=(l?9:4)*r,d=l?-23:4;this.showMenu(t,u=>{let m=u.getGui();this.popupService.positionPopupByComponent({type:n,column:t,eventSource:e,ePopup:m,alignSide:s,nudgeX:c,nudgeY:d,position:"under",keepWithinBounds:!0}),o&&u.showTab?.(o),this.dispatchVisibleChangedEvent(!0,!1,t,o)},n,o,a,e)}showMenu(t,e,n,i,r,s){let{menu:o,eMenuGui:a,anchorToElement:l,restoreFocusParams:c}=this.getMenuParams(t,r,s),d=[];d.push(m=>{let f=o.getGui();this.destroyBean(o),t&&(t.setMenuVisible(!1,"contextMenu"),this.menuUtils.restoreFocusOnClose(c,f,m))});let u=this.localeService.getLocaleTextFunc();if(this.popupService.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:m=>{d.forEach(f=>f(m)),this.dispatchVisibleChangedEvent(!1,!1,t,i)},afterGuiAttached:m=>o.afterGuiAttached(Object.assign({},{container:n},m)),positionCallback:i?()=>e(o):void 0,ariaLabel:u("ariaLabelColumnMenu","Column Menu")}),i||(o.showTabBasedOnPreviousSelection?.(),e(o)),this.menuService.isColumnMenuAnchoringEnabled()){let m=this.popupService.setPopupPositionRelatedToElement(a,l);m&&t&&this.addStopAnchoring(m,t,d)}o.addEventListener("tabSelected",m=>{this.dispatchVisibleChangedEvent(!1,!0,t),this.lastSelectedTab=m.key,this.dispatchVisibleChangedEvent(!0,!0,t)}),t?.setMenuVisible(!0,"contextMenu"),this.activeMenu=o,o.addEventListener("destroyed",()=>{this.activeMenu===o&&(this.activeMenu=null)})}addStopAnchoring(t,e,n){t.then(i=>{e.addEventListener("leftChanged",i),e.addEventListener("visibleChanged",i),n.push(()=>{e.removeEventListener("leftChanged",i),e.removeEventListener("visibleChanged",i)})})}getMenuParams(t,e,n){let i={column:t,headerPosition:this.focusService.getFocusedHeader(),columnIndex:this.visibleColsService.getAllCols().indexOf(t),eventSource:n},r=this.createMenu(t,i,e,n);return{menu:r,eMenuGui:r.getGui(),anchorToElement:n||this.ctrlsService.getGridBodyCtrl().getGui(),restoreFocusParams:i}}createMenu(t,e,n,i){return this.menuService.isLegacyMenuEnabled()?this.createBean(new VSi(t,e,this.lastSelectedTab,n,i)):this.createBean(new BSi(t,e,i))}dispatchVisibleChangedEvent(t,e,n,i){this.eventService.dispatchEvent({type:"columnMenuVisibleChanged",visible:t,switchingTab:e,key:this.lastSelectedTab??i??(this.menuService.isLegacyMenuEnabled()?Ow:"columnMenu"),column:n??null})}isMenuEnabled(t){if(!this.menuService.isLegacyMenuEnabled())return!0;let e=!this.filterManager?.isFilterAllowed(t),n=t.getColDef().menuTabs??aie;return(e&&n.includes(Lw)?n.length-1:n.length)>0}showMenuAfterContextMenuEvent(t,e,n){this.menuUtils.onContextMenu(e,n,i=>(this.showMenuAfterMouseEvent(t,i,"columnMenu"),!0))}},VSi=class extends Ot{constructor(t,e,n,i,r){super(),this.column=t,this.restoreFocusParams=e,this.initialSelection=n,this.restrictTo=i,this.sourceElement=r,this.tabFactories={},this.includeChecks={},this.tabFactories[Ow]=this.createMainPanel.bind(this),this.tabFactories[Lw]=this.createFilterPanel.bind(this),this.tabFactories[Fw]=this.createColumnsPanel.bind(this),this.includeChecks[Ow]=()=>!0,this.includeChecks[Lw]=()=>t?!!this.filterManager?.isFilterAllowed(t):!1,this.includeChecks[Fw]=()=>!0}wireBeans(t){this.filterManager=t.filterManager,this.columnChooserFactory=t.columnChooserFactory,this.columnMenuFactory=t.columnMenuFactory,this.menuUtils=t.menuUtils}postConstruct(){let t=this.getTabsToCreate().map(e=>this.createTab(e));this.tabbedLayout=new ibe({items:t,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout),this.addDestroyFunc(()=>this.destroyBean(this.tabbedLayout))}getTabsToCreate(){return this.restrictTo?this.restrictTo:(this.column?.getColDef().menuTabs??aie).filter(t=>this.isValidMenuTabItem(t)).filter(t=>this.isNotSuppressed(t)).filter(t=>this.isModuleLoaded(t))}isModuleLoaded(t){return t===Fw?Sa.__isRegistered(wr.ColumnsToolPanelModule,this.gridId):!0}isValidMenuTabItem(t){let e=!0,n=aie;return this.restrictTo!=null&&(e=this.restrictTo.indexOf(t)>-1,n=this.restrictTo),e=e&&aie.indexOf(t)>-1,e||wt(`Trying to render an invalid menu item '${t}'. Check that your 'menuTabs' contains one of [${n}]`),e}isNotSuppressed(t){return this.includeChecks[t]()}createTab(t){return this.tabFactories[t]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(t){this.tabItemColumns&&t===Fw?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&t===Lw?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&t===Ow?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()}onTabItemClicked(t){let e=null;switch(t.item){case this.tabItemColumns:e=Fw;break;case this.tabItemFilter:e=Lw;break;case this.tabItemGeneral:e=Ow;break}e&&this.activateTab(e)}activateTab(t){let e={type:"tabSelected",key:t};this.dispatchLocalEvent(e)}createMainPanel(){return this.mainMenuList=this.columnMenuFactory.createMenu(this,this.column,()=>this.sourceElement??this.getGui()),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.tabItemGeneral={title:tr("menu",this.gos,this.column),titleLabel:Ow.replace("MenuTab",""),bodyPromise:io.resolve(this.mainMenuList.getGui()),name:Ow},this.tabItemGeneral}onHidePopup(t){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,t)}createFilterPanel(){let t=this.column?this.createBean(new CD(this.column,"COLUMN_MENU")):null;if(this.filterComp=t,!t?.hasFilter())throw new Error("AG Grid - Unable to instantiate filter");let e=i=>t.afterGuiAttached(i),n=()=>t.afterGuiDetached();return this.tabItemFilter={title:tr("filter",this.gos,this.column),titleLabel:Lw.replace("MenuTab",""),bodyPromise:io.resolve(t?.getGui()),afterAttachedCallback:e,afterDetachedCallback:n,name:Lw},this.tabItemFilter}createColumnsPanel(){let t=document.createElement("div");t.classList.add("ag-menu-column-select-wrapper");let n=this.columnChooserFactory.createColumnSelectPanel(this,this.column).getGui();return n.classList.add("ag-menu-column-select"),t.appendChild(n),this.tabItemColumns={title:tr("columns",this.gos,this.column),titleLabel:Fw.replace("MenuTab",""),bodyPromise:io.resolve(t),name:Fw},this.tabItemColumns}afterGuiAttached(t){let{container:e,hidePopup:n}=t;this.tabbedLayout.setAfterAttachedParams({container:e,hidePopup:n}),n&&(this.hidePopupFunc=n,this.addDestroyFunc(n))}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},BSi=class extends ai{constructor(t,e,n){super(`
            <div data-ref="eColumnMenu" role="presentation" class="ag-menu ag-column-menu"></div>
        `),this.column=t,this.restoreFocusParams=e,this.sourceElement=n,this.eColumnMenu=Bt}wireBeans(t){this.columnMenuFactory=t.columnMenuFactory,this.menuUtils=t.menuUtils,this.focusService=t.focusService}postConstruct(){this.mainMenuList=this.columnMenuFactory.createMenu(this,this.column,()=>this.sourceElement??this.getGui()),this.mainMenuList.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(this.mainMenuList.getGui())}onHidePopup(t){this.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,t)}afterGuiAttached({hidePopup:t}){t&&(this.hidePopupFunc=t,this.addDestroyFunc(t)),this.focusService.focusInto(this.mainMenuList.getGui())}};WSi=class extends Ot{constructor(){super(...arguments),this.beanName="menuItemMapper"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.columnApplyStateService=t.columnApplyStateService,this.funcColsService=t.funcColsService,this.focusService=t.focusService,this.rowPositionUtils=t.rowPositionUtils,this.chartMenuItemMapper=t.chartMenuItemMapper,this.menuService=t.menuService,this.sortController=t.sortController,this.columnAutosizeService=t.columnAutosizeService,this.expansionService=t.expansionService,this.clipboardService=t.clipboardService,this.aggFuncService=t.aggFuncService,this.csvCreator=t.csvCreator,this.excelCreator=t.excelCreator}mapWithStockItems(t,e,n,i){if(!t)return[];let r=[];return t.forEach(s=>{let o;if(typeof s=="string"?o=this.getStockMenuItem(s,e,n,i):o=ve({},s),!o)return;let a=o,{subMenu:l}=a;l&&l instanceof Array&&(a.subMenu=this.mapWithStockItems(l,e,n,i)),o!=null&&r.push(o)}),r}getStockMenuItem(t,e,n,i){let r=this.localeService.getLocaleTextFunc(),s=this.gos.get("skipHeaderOnAutoSize");switch(t){case"pinSubMenu":return{name:r("pinColumn","Pin Column"),icon:tr("menuPin",this.gos,null),subMenu:["clearPinned","pinLeft","pinRight"]};case"pinLeft":return{name:r("pinLeft","Pin Left"),action:()=>this.columnModel.setColsPinned([e],"left",i),checked:!!e&&e.isPinnedLeft()};case"pinRight":return{name:r("pinRight","Pin Right"),action:()=>this.columnModel.setColsPinned([e],"right",i),checked:!!e&&e.isPinnedRight()};case"clearPinned":return{name:r("noPin","No Pin"),action:()=>this.columnModel.setColsPinned([e],null,i),checked:!!e&&!e.isPinned()};case"valueAggSubMenu":return Sa.__assertRegistered(wr.RowGroupingModule,"Aggregation from Menu",this.gridId)?!e?.isPrimary()&&!e?.getColDef().pivotValueColumn?null:{name:r("valueAggregation","Value Aggregation"),icon:tr("menuValue",this.gos,null),subMenu:this.createAggregationSubMenu(e,this.aggFuncService),disabled:this.gos.get("functionsReadOnly")}:null;case"autoSizeThis":return{name:r("autosizeThisColumn","Autosize This Column"),action:()=>this.columnAutosizeService.autoSizeColumn(e,i,s)};case"autoSizeAll":return{name:r("autosizeAllColumns","Autosize All Columns"),action:()=>this.columnAutosizeService.autoSizeAllColumns(i,s)};case"rowGroup":return{name:r("groupBy","Group by")+" "+nl(this.columnNameService.getDisplayNameForColumn(e,"header")),disabled:this.gos.get("functionsReadOnly")||e?.isRowGroupActive()||!e?.getColDef().enableRowGroup,action:()=>this.funcColsService.addRowGroupColumns([e],i),icon:tr("menuAddRowGroup",this.gos,null)};case"rowUnGroup":{let o=tr("menuRemoveRowGroup",this.gos,null),a=e?.getColDef().showRowGroup,l=this.gos.get("groupLockGroupColumns");if(a===!0)return{name:r("ungroupAll","Un-Group All"),disabled:this.gos.get("functionsReadOnly")||l===-1||l>=this.funcColsService.getRowGroupColumns().length,action:()=>this.funcColsService.setRowGroupColumns(this.funcColsService.getRowGroupColumns().slice(0,l),i),icon:o};if(typeof a=="string"){let c=this.columnModel.getColDefCol(a),d=c!=null?nl(this.columnNameService.getDisplayNameForColumn(c,"header")):a;return{name:r("ungroupBy","Un-Group by")+" "+d,disabled:this.gos.get("functionsReadOnly")||c!=null&&this.columnModel.isColGroupLocked(c),action:()=>this.funcColsService.removeRowGroupColumns([a],i),icon:o}}return{name:r("ungroupBy","Un-Group by")+" "+nl(this.columnNameService.getDisplayNameForColumn(e,"header")),disabled:this.gos.get("functionsReadOnly")||!e?.isRowGroupActive()||!e?.getColDef().enableRowGroup||this.columnModel.isColGroupLocked(e),action:()=>this.funcColsService.removeRowGroupColumns([e],i),icon:o}}case"resetColumns":return{name:r("resetColumns","Reset Columns"),action:()=>this.columnApplyStateService.resetColumnState(i)};case"expandAll":return{name:r("expandAll","Expand All Row Groups"),action:()=>this.expansionService.expandAll(!0)};case"contractAll":return{name:r("collapseAll","Collapse All Row Groups"),action:()=>this.expansionService.expandAll(!1)};case"copy":return Sa.__assertRegistered(wr.ClipboardModule,"Copy from Menu",this.gridId)?{name:r("copy","Copy"),shortcut:r("ctrlC","Ctrl+C"),icon:tr("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard()}:null;case"copyWithHeaders":return Sa.__assertRegistered(wr.ClipboardModule,"Copy with Headers from Menu",this.gridId)?{name:r("copyWithHeaders","Copy with Headers"),icon:tr("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return Sa.__assertRegistered(wr.ClipboardModule,"Copy with Group Headers from Menu",this.gridId)?{name:r("copyWithGroupHeaders","Copy with Group Headers"),icon:tr("clipboardCopy",this.gos,null),action:()=>this.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(Sa.__assertRegistered(wr.ClipboardModule,"Cut from Menu",this.gridId)){let o=this.focusService.getFocusedCell(),a=o?this.rowPositionUtils.getRowNode(o):null,l=a?o?.column.isCellEditable(a):!1;return{name:r("cut","Cut"),shortcut:r("ctrlX","Ctrl+X"),icon:tr("clipboardCut",this.gos,null),disabled:!l||this.gos.get("suppressCutToClipboard"),action:()=>this.clipboardService.cutToClipboard(void 0,"contextMenu")}}else return null;case"paste":return Sa.__assertRegistered(wr.ClipboardModule,"Paste from Clipboard",this.gridId)?{name:r("paste","Paste"),shortcut:r("ctrlV","Ctrl+V"),disabled:!0,icon:tr("clipboardPaste",this.gos,null),action:()=>this.clipboardService.pasteFromClipboard()}:null;case"export":{let o=[],a=Sa.__isRegistered(wr.CsvExportModule,this.gridId),l=Sa.__isRegistered(wr.ExcelExportModule,this.gridId);return!this.gos.get("suppressCsvExport")&&a&&o.push("csvExport"),!this.gos.get("suppressExcelExport")&&l&&o.push("excelExport"),{name:r("export","Export"),subMenu:o,icon:tr("save",this.gos,null)}}case"csvExport":return{name:r("csvExport","CSV Export"),icon:tr("csvExport",this.gos,null),action:()=>this.csvCreator?.exportDataAsCsv()};case"excelExport":return{name:r("excelExport","Excel Export"),icon:tr("excelExport",this.gos,null),action:()=>this.excelCreator?.exportDataAsExcel()};case"separator":return"separator";case"pivotChart":case"chartRange":return this.chartMenuItemMapper.getChartItems(t)??null;case"columnFilter":return e?{name:r("columnFilter","Column Filter"),icon:tr("filter",this.gos,null),action:()=>this.menuService.showFilterMenu({column:e,buttonElement:n(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":return Sa.__isRegistered(wr.ColumnsToolPanelModule,this.gridId)?{name:r("columnChooser","Choose Columns"),icon:tr("columns",this.gos,null),action:()=>this.menuService.showColumnChooser({column:e,eventSource:n()})}:null;case"sortAscending":return{name:r("sortAscending","Sort Ascending"),icon:tr("sortAscending",this.gos,null),action:()=>this.sortController.setSortForColumn(e,"asc",!1,i)};case"sortDescending":return{name:r("sortDescending","Sort Descending"),icon:tr("sortDescending",this.gos,null),action:()=>this.sortController.setSortForColumn(e,"desc",!1,i)};case"sortUnSort":return{name:r("sortUnSort","Clear Sort"),icon:tr("sortUnSort",this.gos,null),action:()=>this.sortController.setSortForColumn(e,null,!1,i)};default:return wt(`unknown menu item type ${t}`),null}}createAggregationSubMenu(t,e){let n=this.localeService.getLocaleTextFunc(),i;if(t.isPrimary())i=t;else{let s=t.getColDef().pivotValueColumn;i=Di(s)?s:void 0}let r=[];if(i){let s=i.isValueActive(),o=e.getFuncNames(i);r.push({name:n("noAggregation","None"),action:()=>{this.funcColsService.removeValueColumns([i],"contextMenu"),this.funcColsService.setColumnAggFunc(i,void 0,"contextMenu")},checked:!s}),o.forEach(a=>{r.push({name:n(a,e.getDefaultFuncLabel(a)),action:()=>{this.funcColsService.setColumnAggFunc(i,a,"contextMenu"),this.funcColsService.addValueColumns([i],"contextMenu")},checked:s&&i.getAggFunc()===a})})}return r}},USi=class extends Ot{constructor(){super(...arguments),this.beanName="menuUtils"}wireBeans(t){this.focusService=t.focusService,this.headerNavigationService=t.headerNavigationService,this.visibleColsService=t.visibleColsService}restoreFocusOnClose(t,e,n,i){let{eventSource:r}=t,s=n instanceof KeyboardEvent;if(!i&&!s||!r)return;let o=this.gos.getActiveDomElement();!e.contains(o)&&!this.gos.isNothingFocused()||this.focusHeaderCell(t)}closePopupAndRestoreFocusOnSelect(t,e,n){let i;n&&n.keyboardEvent&&(i=n.keyboardEvent),t(i&&{keyboardEvent:i});let r=this.focusService.getFocusedCell();if(this.gos.isNothingFocused())if(r){let{rowIndex:s,rowPinned:o,column:a}=r;this.focusService.setFocusedCell({rowIndex:s,column:a,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(e)}onContextMenu(t,e,n){if(!this.gos.get("allowContextMenuWithControlKey")&&t&&(t.ctrlKey||t.metaKey)||(t&&this.blockMiddleClickScrollsIfNeeded(t),this.gos.get("suppressContextMenu")))return;let i=t??e.touches[0];if(n(i)){let r=t??e;r&&r.cancelable&&r.preventDefault()}}focusHeaderCell(t){return O(this,null,function*(){let{column:e,columnIndex:n,headerPosition:i,eventSource:r}=t,s=yield this.visibleColsService.getAllCols().some(o=>o===e);if(!(e&&!e.isAlive())){if(s&&r&&l1(r)){let o=this.focusService.findTabbableParent(r);o&&(e&&this.headerNavigationService.scrollToColumn(e),o.focus())}else if(i&&n!==-1){let o=this.visibleColsService.getAllCols(),a=o[n]||Ar(o);a&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:i.headerRowIndex,column:a}})}}})}blockMiddleClickScrollsIfNeeded(t){this.gos.get("suppressMiddleClickScrolls")&&t.which===2&&t.preventDefault()}},Ebe="32.1.0",Pat={version:Ebe,moduleName:`${wr.MenuModule}-core`,beans:[NSi,LSi,WSi,kSi,PSi,RSi,USi],dependantModules:[y1],userComponents:[{name:"agMenuItem",classImp:KE}]},jSi={version:Ebe,moduleName:`${wr.MenuModule}-api`,apiFunctions:{showContextMenu:zSi,showColumnChooser:HSi,hideColumnChooser:GSi},dependantModules:[Pat,m4e]},Rat={version:Ebe,moduleName:wr.MenuModule,dependantModules:[Pat,jSi]},fie=class Fat extends j1{constructor(){super('<div class="ag-multi-filter ag-menu-list-compact"></div>'),this.filterDefs=[],this.filters=[],this.guiDestroyFuncs=[],this.filterGuis=[],this.activeFilterIndices=[],this.lastActivatedMenuItem=null,this.afterFiltersReadyFuncs=[]}wireBeans(e){this.filterManager=e.filterManager,this.userComponentFactory=e.userComponentFactory,this.focusService=e.focusService}postConstruct(){this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e)})}static getFilterDefs(e){let{filters:n}=e;return n&&n.length>0?n:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]}init(e){this.params=e,this.filterDefs=Fat.getFilterDefs(e);let{column:n,filterChangedCallback:i}=e;this.column=n,this.filterChangedCallback=i;let r=[];return this.filterDefs.forEach((s,o)=>{let a=this.createFilter(s,o);a!=null&&r.push(a)}),new io(s=>{io.all(r).then(o=>{this.filters=o,this.refreshGui("columnMenu").then(()=>{s()})})}).then(()=>{this.afterFiltersReadyFuncs.forEach(s=>s()),this.afterFiltersReadyFuncs.length=0})}refreshGui(e){return e===this.lastOpenedInContainer?io.resolve():(this.tabGuardFeature.removeAllChildrenExceptTabGuards(),this.destroyChildren(),io.all(this.filters.map((n,i)=>{let r=this.filterDefs[i],s=this.getFilterTitle(n,r),o;if(r.display==="subMenu"&&e!=="toolPanel")o=this.insertFilterMenu(n,s).then(a=>a.getGui());else if(r.display==="subMenu"||r.display==="accordion"){let a=this.insertFilterGroup(n,s);o=io.resolve(a.getGui())}else o=io.resolve(n.getGui());return o})).then(n=>{n.forEach((i,r)=>{r>0&&this.appendChild(Rp('<div class="ag-filter-separator"></div>')),this.appendChild(i)}),this.filterGuis=n,this.lastOpenedInContainer=e}))}getFilterTitle(e,n){return n.title!=null?n.title:e instanceof EA?e.getFilterTitle():"Filter"}destroyChildren(){this.guiDestroyFuncs.forEach(e=>e()),this.guiDestroyFuncs.length=0,this.filterGuis.length=0}insertFilterMenu(e,n){let i=this.createBean(new lie);return i.init({menuItemDef:{name:n,subMenu:[],cssClasses:["ag-multi-filter-menu-item"],menuItem:KE,menuItemParams:{cssClassPrefix:"ag-compact-menu-option",isCompact:!0}},level:0,isAnotherSubMenuOpen:()=>!1,childComponent:e,contextParams:{column:null,node:null,value:null}}).then(()=>{i.setParentComponent(this),this.guiDestroyFuncs.push(()=>this.destroyBean(i)),this.addManagedListeners(i,{menuItemActivated:s=>{this.lastActivatedMenuItem&&this.lastActivatedMenuItem!==s.menuItem&&this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=s.menuItem}});let r=i.getGui();return i.addManagedElementListeners(r,{keydown:s=>{let{key:o}=s;switch(o){case It.UP:case It.RIGHT:case It.DOWN:case It.LEFT:s.preventDefault(),o===It.RIGHT&&i.openSubMenu(!0);break}},focusin:()=>i.activate(),focusout:()=>{!i.isSubMenuOpen()&&!i.isSubMenuOpening()&&i.deactivate()}}),i})}insertFilterGroup(e,n){let i=this.createBean(new uC({title:n,cssIdentifier:"multi-filter"}));return this.guiDestroyFuncs.push(()=>this.destroyBean(i)),i.addItem(e.getGui()),i.toggleGroupExpand(!1),e.afterGuiAttached&&i.addManagedListeners(i,{expanded:()=>e.afterGuiAttached({container:this.lastOpenedInContainer,suppressFocus:!0,hidePopup:this.hidePopup})}),i}isFilterActive(){return this.filters.some(e=>e.isFilterActive())}getLastActiveFilterIndex(){return this.activeFilterIndices.length>0?this.activeFilterIndices[this.activeFilterIndices.length-1]:null}doesFilterPass(e,n){let i=!0;return this.filters.forEach(r=>{!i||r===n||!r.isFilterActive()||(i=r.doesFilterPass(e))}),i}getFilterType(){return"multi"}getModelFromUi(){return{filterType:this.getFilterType(),filterModels:this.filters.map(n=>{let i=n;return typeof i.getModelFromUi=="function"?i.getModelFromUi():null})}}getModel(){return this.isFilterActive()?{filterType:this.getFilterType(),filterModels:this.filters.map(n=>n.isFilterActive()?n.getModel():null)}:null}setModel(e){let n=(r,s)=>new io(o=>{let a=r.setModel(s);a?a.then(()=>o()):o()}),i=[];return e==null?i=this.filters.map((r,s)=>n(r,null).then(()=>{this.updateActiveList(s)})):this.filters.forEach((r,s)=>{let o=e.filterModels.length>s?e.filterModels[s]:null,a=n(r,o).then(()=>{this.updateActiveList(s)});i.push(a)}),io.all(i).then(()=>{})}applyModel(e="api"){let n=!1;return this.filters.forEach(i=>{i instanceof EA&&(n=i.applyModel(e)||n)}),n}getChildFilterInstance(e){return this.filters[e]}afterGuiAttached(e){let n;e?(this.hidePopup=e.hidePopup,n=this.refreshGui(e.container)):(this.hidePopup=void 0,n=io.resolve());let i=e?.suppressFocus;n.then(()=>{let{filterDefs:r}=this,s=!!i;r&&P3e(r,(a,l)=>{let c=l===0,d=a.display&&a.display!=="inline",u=i||!c||d,m=St(ve({},e??{}),{suppressFocus:u}),f=this.filters?.[l];if(f&&(this.executeFunctionIfExistsOnFilter(f,"afterGuiAttached",m),c&&!u&&(s=!0)),!i&&c&&d){let _=this.filterGuis[l];_&&(this.focusService.focusInto(_)||_.focus(),s=!0)}});let o=this.gos.getActiveDomElement();!s&&(this.gos.isNothingFocused()||this.getGui().contains(o))&&this.forceFocusOutOfContainer(!0)})}afterGuiDetached(){this.executeFunctionIfExists("afterGuiDetached")}onAnyFilterChanged(){this.executeFunctionIfExists("onAnyFilterChanged")}onNewRowsLoaded(){this.executeFunctionIfExists("onNewRowsLoaded")}destroy(){this.filters.forEach(e=>this.destroyBean(e)),this.filters.length=0,this.destroyChildren(),this.hidePopup=void 0,super.destroy()}executeFunctionIfExists(e,...n){P3e(this.filters,i=>{this.executeFunctionIfExistsOnFilter(i,e,n)})}executeFunctionIfExistsOnFilter(e,n,...i){let r=e[n];typeof r=="function"&&r.apply(e,i)}createFilter(e,n){let{filterModifiedCallback:i,doesRowPassOtherFilter:r}=this.params,s,o=St(ve({},this.filterManager.createFilterParams(this.column,this.column.getColDef())),{filterModifiedCallback:i,filterChangedCallback:c=>{this.executeWhenAllFiltersReady(()=>this.filterChanged(n,c))},doesRowPassOtherFilter:c=>r(c)&&this.doesFilterPass({node:c,data:c.data},s)}),a=this.userComponentFactory.getFilterDetails(e,o,"agTextColumnFilter");if(!a)return null;let l=a.newAgStackInstance();return l&&l.then(c=>s=c),l}executeWhenAllFiltersReady(e){this.filters&&this.filters.length>0?e():this.afterFiltersReadyFuncs.push(e)}updateActiveList(e){let n=this.filters[e];Ip(this.activeFilterIndices,e),n.isFilterActive()&&this.activeFilterIndices.push(e)}filterChanged(e,n){this.updateActiveList(e),this.filterChangedCallback(n);let i=this.filters[e];this.filters.forEach(r=>{r!==i&&typeof r.onAnyFilterChanged=="function"&&r.onAnyFilterChanged()})}onFocusIn(e){this.lastActivatedMenuItem!=null&&!this.lastActivatedMenuItem.getGui().contains(e.target)&&(this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=null)}getModelAsString(e){if(!this.filters||!e?.filterModels?.length)return"";let n=this.getLastActiveFilterIndex()??0;return this.filters[n].getModelAsString?.(e.filterModels[n])??""}},$Si=class extends ai{constructor(){super('<div class="ag-multi-floating-filter ag-floating-filter-input"></div>'),this.floatingFilters=[],this.compDetailsList=[]}wireBeans(t){this.userComponentFactory=t.userComponentFactory,this.filterManager=t.filterManager}init(t){this.params=t;let{compDetailsList:e}=this.getCompDetailsList(t);return this.setParams(e)}setParams(t){let e=[];return t.forEach(n=>{let i=n?.newAgStackInstance();i!=null&&(this.compDetailsList.push(n),e.push(i))}),io.all(e).then(n=>{n.forEach((i,r)=>{this.floatingFilters.push(i);let s=i.getGui();this.appendChild(s),r>0&&Vn(s,!1)})})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t;let{compDetailsList:e,floatingFilterParamsList:n}=this.getCompDetailsList(t);e.length===this.compDetailsList.length&&e.every((r,s)=>!this.filterManager?.areFilterCompsDifferent(this.compDetailsList[s],r))?n.forEach((r,s)=>{let o=this.floatingFilters[s],a=!1;o.refresh&&o.refresh(r)!==null&&(a=!0),a||o.onParamsUpdated?.(r)}):(zo(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(e))}getCompDetailsList(t){let e=[],n=[],i=t.filterParams;return fie.getFilterDefs(i).forEach((r,s)=>{let o=St(ve({},t),{parentFilterInstance:l=>{this.parentMultiFilterInstance(c=>{let d=c.getChildFilterInstance(s);d!=null&&l(d)})}});im(o.filterParams,r.filterParams);let a=this.getCompDetails(r,o);a&&(e.push(a),n.push(o))}),{compDetailsList:e,floatingFilterParamsList:n}}onParentModelChanged(t,e){e&&e.afterFloatingFilter||this.parentMultiFilterInstance(n=>{if(t==null)this.floatingFilters.forEach((i,r)=>{i.onParentModelChanged(null,e),Vn(i.getGui(),r===0)});else{let i=n.getLastActiveFilterIndex();this.floatingFilters.forEach((r,s)=>{let o=t.filterModels.length>s?t.filterModels[s]:null;r.onParentModelChanged(o,e);let a=i==null?s===0:s===i;Vn(r.getGui(),a)})}})}destroy(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,super.destroy()}getCompDetails(t,e){let n=J3e(this.frameworkOverrides,t,()=>this.filterManager.getDefaultFloatingFilter(this.params.column))??"agReadOnlyFloatingFilter";return this.userComponentFactory.getFloatingFilterCompDetails(t,e,n)}parentMultiFilterInstance(t){this.params.parentFilterInstance(e=>{if(!(e instanceof fie))throw new Error("AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent");t(e)})}},Mbe="32.1.0",Lat={version:Mbe,moduleName:`${wr.MultiFilterModule}-core`,userComponents:[{name:"agMultiColumnFilter",classImp:fie},{name:"agMenuItem",classImp:KE}],dependantModules:[y1,e6]},KSi={version:Mbe,moduleName:"@ag-grid-enterprise/multi-floating-filter",userComponents:[{name:"agMultiColumnFloatingFilter",classImp:$Si}],dependantModules:[Lat,t4e]},Oat={version:Mbe,moduleName:wr.MultiFilterModule,dependantModules:[Lat,KSi]},Hst=class extends w5{constructor(){super('<div class="ag-cell-edit-wrapper"></div>')}init(t){this.params=t;let{cellStartedEdit:e,values:n}=t;Ls(n)&&wt("agRichSelectCellEditor requires cellEditorParams.values to be set");let{params:i,valuesPromise:r}=this.buildRichSelectParams();this.richSelect=this.createManagedBean(new yie(i)),this.richSelect.addCssClass("ag-cell-editor"),this.appendChild(this.richSelect),r&&r.then(s=>{this.richSelect.setValueList({valueList:s,refresh:!0});let o=this.getSearchStringCallback(s);o&&this.richSelect.setSearchStringCreator(o)}),this.addManagedListeners(this.richSelect,{fieldPickerValueSelected:this.onEditorPickerValueSelected.bind(this)}),this.focusAfterAttached=e}onEditorPickerValueSelected(t){setTimeout(()=>this.params.stopEditing(!t.fromEnterKey))}buildRichSelectParams(){let{cellRenderer:t,cellHeight:e,value:n,values:i,formatValue:r,searchDebounceDelay:s,valueListGap:o,valueListMaxHeight:a,valueListMaxWidth:l,allowTyping:c,filterList:d,searchType:u,highlightMatch:m,valuePlaceholder:f,eventKey:_,multiSelect:x,suppressDeselectAll:D,suppressMultiSelectPillRenderer:E}=this.params,M={value:n,cellRenderer:t,cellRowHeight:e,searchDebounceDelay:s,valueFormatter:r,pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"virtual-list",pickerGap:o,allowTyping:c,filterList:d,searchType:u,highlightMatch:m,maxPickerHeight:a,maxPickerWidth:l,placeholder:f,initialInputValue:_?.length===1?_:void 0,multiSelect:x,suppressDeselectAll:D,suppressMultiSelectPillRenderer:E},I,z;return typeof i=="function"?I=i(this.params):I=i??[],Array.isArray(I)?(M.valueList=I,M.searchStringCreator=this.getSearchStringCallback(I)):z=I,x&&c&&(this.params.allowTyping=M.allowTyping=!1,wt("agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.")),{params:M,valuesPromise:z}}getSearchStringCallback(t){let{colDef:e}=this.params;if(!(typeof t[0]!="object"||!e.keyCreator))return n=>n.map(i=>{let r=this.gos.addGridCommonParams({value:i,colDef:this.params.colDef,column:this.params.column,node:this.params.node,data:this.params.data});return e.keyCreator(r)})}afterGuiAttached(){let{focusAfterAttached:t,params:e}=this;setTimeout(()=>{if(!this.isAlive())return;if(t){let i=this.richSelect.getFocusableElement();i.focus();let{allowTyping:r,eventKey:s}=this.params;r&&(!s||s.length!==1)&&i.select()}this.richSelect.showPicker();let{eventKey:n}=e;n&&n?.length===1&&this.richSelect.searchTextFromString(n)})}focusIn(){this.richSelect.getFocusableElement().focus()}getValue(){return this.richSelect.getValue()}isPopup(){return!1}},YSi="32.1.0",Nat={version:YSi,moduleName:wr.RichSelectModule,beans:[],userComponents:[{name:"agRichSelect",classImp:Hst},{name:"agRichSelectCellEditor",classImp:Hst}],dependantModules:[y1,mx]},qSi="ag-Grid-MissingKey",ZSi=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmBlockUtils"}wireBeans(t){this.valueService=t.valueService,this.showRowGroupColsService=t.showRowGroupColsService,this.nodeManager=t.ssrmNodeManager,this.beans=t,this.expansionService=t.expansionService,this.serverSideRowModel=t.rowModel,this.storeFactory=t.ssrmStoreFactory}createRowNode(t){let e=new Pp(this.beans),n=t.rowHeight!=null?t.rowHeight:this.gos.getRowHeightAsNumber();return e.setRowHeight(n),e.group=t.group,e.leafGroup=t.leafGroup,e.level=t.level,e.uiLevel=t.level,e.parent=t.parent,e.stub=!0,e.__needsRefreshWhenVisible=!1,e.group&&(e.expanded=!1,e.field=t.field,e.rowGroupColumn=t.rowGroupColumn),e}destroyRowNodes(t){t&&t.forEach(e=>this.destroyRowNode(e))}destroyRowNode(t,e=!1){t.childStore&&!e&&(this.destroyBean(t.childStore),t.childStore=null),t.sibling&&!t.footer&&this.destroyRowNode(t.sibling,!1),t.clearRowTopAndRowIndex(),t.id!=null&&this.nodeManager.removeNode(t)}setTreeGroupInfo(t){t.updateHasChildren();let e=this.gos.get("getServerSideGroupKey");t.hasChildren()&&e!=null&&(t.key=e(t.data)),!t.hasChildren()&&t.childStore!=null&&(this.destroyBean(t.childStore),t.childStore=null,t.expanded=!1)}setRowGroupInfo(t){if(t.key=this.valueService.getValue(t.rowGroupColumn,t),(t.key===null||t.key===void 0)&&jB(()=>{wt("null and undefined values are not allowed for server side row model keys"),t.rowGroupColumn&&wt(`column = ${t.rowGroupColumn.getId()}`),wt("data is "+t.data)},"ServerSideBlock-CannotHaveNullOrUndefinedForKey"),this.gos.get("groupAllowUnbalanced")&&t.key===""){let r=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(r,t))}this.beans.gos.getGroupTotalRowCallback()({node:t})&&(t.createFooter(),t.sibling&&(t.sibling.uiLevel=t.uiLevel+1))}setMasterDetailInfo(t){let e=this.gos.get("isRowMaster");e!=null?t.master=e(t.data):t.master=!0}updateDataIntoRowNode(t,e){t.updateData(e),this.gos.get("treeData")?(this.setTreeGroupInfo(t),this.setChildCountIntoRowNode(t)):t.group?(this.setChildCountIntoRowNode(t),t.footer||(this.beans.gos.getGroupTotalRowCallback()({node:t})?t.sibling?t.sibling.updateData(e):t.createFooter():t.sibling&&t.destroyFooter())):this.gos.get("masterDetail")}setDataIntoRowNode(t,e,n,i){t.stub=!1;let r=this.gos.get("treeData");Di(e)?(t.setDataAndId(e,n),r?this.setTreeGroupInfo(t):t.group?this.setRowGroupInfo(t):this.gos.get("masterDetail")&&this.setMasterDetailInfo(t)):(t.setDataAndId(void 0,void 0),t.key=null),(r||t.group)&&(this.setGroupDataIntoRowNode(t),this.setChildCountIntoRowNode(t)),Di(e)&&(t.setRowHeight(this.gos.getRowHeightForNode(t,!1,i).height),t.sibling?.setRowHeight(this.gos.getRowHeightForNode(t.sibling,!1,i).height))}setChildCountIntoRowNode(t){let e=this.gos.get("getChildCount");e&&t.setAllChildrenCount(e(t.data))}setGroupDataIntoRowNode(t){let e=this.showRowGroupColsService?.getShowRowGroupCols()??[],n=this.gos.get("treeData");e.forEach(i=>{if(t.groupData==null&&(t.groupData={}),n)t.groupData[i.getColId()]=t.key;else if(i.isRowGroupDisplayed(t.rowGroupColumn.getId())){let r=this.valueService.getValue(t.rowGroupColumn,t);t.groupData[i.getColId()]=r}})}clearDisplayIndex(t){t.clearRowTopAndRowIndex(),t.hasChildren()&&Di(t.childStore)&&t.childStore.clearDisplayIndexes(),t.master&&t.detailNode&&t.detailNode.clearRowTopAndRowIndex()}setDisplayIndex(t,e,n,i){let r=this.gos.get("groupAllowUnbalanced")&&t.group&&t.key==="";if(this.gos.get("groupHideOpenParents")&&t.group&&t.expanded||r?(t.setRowIndex(null),t.setRowTop(null)):(t.setRowIndex(e.next()),t.setRowTop(n.value),n.value+=t.rowHeight),t.setUiLevel(i),t.footer)return;if(t.master&&(t.expanded&&t.detailNode?(t.detailNode.setRowIndex(e.next()),t.detailNode.setRowTop(n.value),n.value+=t.detailNode.rowHeight):t.detailNode&&t.detailNode.clearRowTopAndRowIndex()),t.hasChildren()&&Di(t.childStore)){let l=t.childStore;t.expanded||r?l.setDisplayIndexes(e,n,r?i:i+1):l.clearDisplayIndexes()}}binarySearchForDisplayIndex(t,e){let n=0,i=e.length-1;if(Ls(i)||Ls(n)){wt(`error: topPointer = ${i}, bottomPointer = ${n}`);return}for(;;){let r=Math.floor((n+i)/2),s=e[r];if(s.rowIndex===t)return s;let o=s.master&&s.expanded,a=s.detailNode;if(o&&a&&a.rowIndex===t)return s.detailNode;let l=s.childStore;if(s.expanded&&l&&l.isDisplayIndexInStore(t))return l.getRowUsingDisplayIndex(t);if(s.rowIndex<t)n=r+1;else if(s.rowIndex>t)i=r-1;else{wt(`error: unable to locate rowIndex = ${t} in cache`);return}}}extractRowBounds(t,e){let n=i=>({rowHeight:i.rowHeight,rowTop:i.rowTop});if(t.rowIndex===e)return n(t);if(t.hasChildren()&&t.expanded&&Di(t.childStore)){let i=t.childStore;if(i.isDisplayIndexInStore(e))return i.getRowBounds(e)}else if(t.master&&t.expanded&&Di(t.detailNode)&&t.detailNode.rowIndex===e)return n(t.detailNode)}getIndexAtPixel(t,e){if(t.isPixelInRange(e))return t.rowIndex;let n=t.master&&t.expanded,i=t.detailNode;if(n&&i&&i.isPixelInRange(e))return t.detailNode.rowIndex;if(t.hasChildren()&&t.expanded&&Di(t.childStore)){let r=t.childStore;if(r.isPixelInRange(e))return r.getRowIndexAtPixel(e)}return null}createNodeIdPrefix(t){let e=[],n=t;for(;n&&n.level>=0;)n.key===""?e.push(qSi):e.push(n.key),n=n.parent;if(e.length>0)return e.reverse().join("-")}checkOpenByDefault(t){return this.expansionService.checkOpenByDefault(t)}},XSi=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmExpandListener"}wireBeans(t){this.serverSideRowModel=t.rowModel,this.storeFactory=t.ssrmStoreFactory,this.beans=t}postConstruct(){this.gos.isRowModelType("serverSide")&&this.addManagedEventListeners({rowGroupOpened:this.onRowGroupOpened.bind(this)})}onRowGroupOpened(t){let e=t.node;if(e.expanded){if(e.master)this.createDetailNode(e);else if(Ls(e.childStore)){let n=this.serverSideRowModel.getParams();e.childStore=this.createBean(this.storeFactory.createStore(n,e))}}else this.gos.get("purgeClosedRowNodes")&&Di(e.childStore)&&(e.childStore=this.destroyBean(e.childStore));this.eventService.dispatchEvent({type:"storeUpdated"})}createDetailNode(t){if(Di(t.detailNode))return t.detailNode;let e=new Pp(this.beans);e.detail=!0,e.selectable=!1,e.parent=t,Di(t.id)&&(e.id="detail_"+t.id),e.data=t.data,e.level=t.level+1;let n=200,i=this.gos.getRowHeightForNode(e).height;return e.rowHeight=i||n,t.detailNode=e,e}},QSi=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmFilterListener"}wireBeans(t){this.serverSideRowModel=t.rowModel,this.filterManager=t.filterManager,this.listenerUtils=t.ssrmListenerUtils}postConstruct(){this.gos.isRowModelType("serverSide")&&this.addManagedEventListeners({advancedFilterEnabledChanged:()=>this.onFilterChanged(!0),filterChanged:()=>this.onFilterChanged()})}onFilterChanged(t){let e=this.serverSideRowModel.getParams();if(!e)return;let n=e.filterModel,i,r;if(this.filterManager?.isAdvancedFilterEnabled()){i=this.filterManager.getAdvancedFilterModel();let l=t?Object.keys(n??{}):this.getAdvancedFilterColumns(n),c=this.getAdvancedFilterColumns(i);l.forEach(d=>c.add(d)),r=Array.from(c)}else if(i=this.filterManager?.getFilterModel()??{},t){let l=this.getAdvancedFilterColumns(n);Object.keys(i).forEach(c=>l.add(c)),r=Array.from(l)}else r=this.findChangedColumns(n,i);let s=this.listenerUtils.isSortingWithValueColumn(r),o=this.listenerUtils.isSortingWithSecondaryColumn(r),a={valueColChanged:s,secondaryColChanged:o,changedColumns:r};this.serverSideRowModel.refreshAfterFilter(i,a)}findChangedColumns(t,e){let n={};Object.keys(t).forEach(r=>n[r]=!0),Object.keys(e).forEach(r=>n[r]=!0);let i=[];return Object.keys(n).forEach(r=>{let s=JSON.stringify(t[r]),o=JSON.stringify(e[r]);s!=o&&i.push(r)}),i}getAdvancedFilterColumns(t){let e=new Set;if(!t)return e;let n=i=>{i.filterType==="join"?i.conditions.forEach(r=>n(r)):e.add(i.colId)};return n(t),e}},JSi=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmListenerUtils"}wireBeans(t){this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService}isSortingWithValueColumn(t){let e=this.funcColsService.getValueColumns().map(n=>n.getColId());for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}isSortingWithSecondaryColumn(t){let e=this.pivotResultColsService.getPivotResultCols();if(!e)return!1;let n=e.list.map(i=>i.getColId());for(let i=0;i<t.length;i++)if(n.indexOf(t[i])>-1)return!0;return!1}},e9i=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmSortService"}wireBeans(t){this.sortController=t.sortController,this.serverSideRowModel=t.rowModel,this.listenerUtils=t.ssrmListenerUtils}postConstruct(){this.gos.isRowModelType("serverSide")&&this.addManagedEventListeners({sortChanged:this.onSortChanged.bind(this)})}onSortChanged(){let t=this.serverSideRowModel.getParams();if(!t)return;let e=this.sortController.getSortModel(),n=t.sortModel,i=this.findChangedColumnsInSort(e,n),r=this.listenerUtils.isSortingWithValueColumn(i),s=this.listenerUtils.isSortingWithSecondaryColumn(i),o={valueColChanged:r,secondaryColChanged:s,changedColumns:i};this.serverSideRowModel.refreshAfterSort(e,o)}findChangedColumnsInSort(t,e){let n=[];[t,e].forEach(s=>{if(s){let o=s.map(a=>a.colId);n=n.concat(o)}});let i=(s,o)=>{let a=s?s.sort:null,l=o?o.sort:null;return a!==l},r=(s,o)=>{let a=s?e.indexOf(s):-1,l=o?t.indexOf(o):-1;return a!==l};return n.filter(s=>{let o=e.find(l=>l.colId===s),a=t.find(l=>l.colId===s);return i(o,a)||r(o,a)})}},t9i=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmNodeManager",this.rowNodes={}}addRowNode(t){let e=t.id;this.rowNodes[e]&&(wt(`Duplicate node id ${t.id}. Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`),wt("first instance",this.rowNodes[e].data),wt("second instance",t.data)),this.rowNodes[e]=t}removeNode(t){let e=t.id;this.rowNodes[e]&&(this.rowNodes[e]=void 0)}destroy(){this.clear(),super.destroy()}clear(){this.rowNodes={},super.destroy()}},qxe=class extends d4e{constructor(t,e,n){super(0),this.nodeIdSequence=new c1,this.info={},this.ssrmParams=t,this.parentRowNode=n,this.level=n.level+1,this.groupLevel=t.rowGroupCols?this.level<t.rowGroupCols.length:void 0,this.leafGroup=t.rowGroupCols?this.level===t.rowGroupCols.length-1:!1}wireBeans(t){this.storeUtils=t.ssrmStoreUtils,this.blockUtils=t.ssrmBlockUtils,this.funcColsService=t.funcColsService,this.rowNodeBlockLoader=t.rowNodeBlockLoader,this.rowNodeSorter=t.rowNodeSorter,this.sortController=t.sortController,this.selectionService=t.selectionService,this.nodeManager=t.ssrmNodeManager,this.filterManager=t.filterManager,this.transactionManager=t.ssrmTransactionManager,this.serverSideRowModel=t.rowModel}postConstruct(){if(this.usingTreeData=this.gos.get("treeData"),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){let i=this.ssrmParams.rowGroupCols[this.level];this.groupField=i.field,this.rowGroupColumn=this.funcColsService.getRowGroupColumns()[this.level]}let t=1,e=this.parentRowNode.level===-1,n=this.storeUtils.getServerSideInitialRowCount();e&&n!=null&&(t=n),this.initialiseRowNodes(t),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc(()=>this.rowNodeBlockLoader.removeBlock(this)),this.postSortFunc=this.gos.getCallback("postSortRows"),n!=null&&this.eventService.dispatchEventOnce({type:"rowCountReady"})}destroy(){this.destroyRowNodes(),super.destroy()}destroyRowNodes(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}}initialiseRowNodes(t,e=!1){this.destroyRowNodes();for(let n=0;n<t;n++){let i=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});e&&(i.failedLoad=!0),this.allRowNodes.push(i),this.nodesAfterFilter.push(i),this.nodesAfterSort.push(i)}}getBlockStateJson(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}}loadFromDatasource(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,success:this.success.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})}getStartRow(){return 0}getEndRow(){return this.nodesAfterSort.length}createDataNode(t,e){let n=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});e!=null?pD(this.allRowNodes,n,e):this.allRowNodes.push(n);let i=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(n,t,i,void 0),this.nodeManager.addRowNode(n),this.blockUtils.checkOpenByDefault(n),this.allNodesMap[n.id]=n,n}prefixId(t){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+t:t.toString()}processServerFail(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}processServerResult(t){if(!this.isAlive())return;let e=t.groupLevelInfo;e&&Object.assign(this.info,e),t.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(t.pivotResultFields);let n=this.allRowNodes.length>0?this.allNodesMap:void 0;this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},t.rowData||wt('"params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.'),this.createOrRecycleNodes(n,t.rowData),n&&this.blockUtils.destroyRowNodes(m5(n)),this.level===0&&this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}createOrRecycleNodes(t,e){if(!e)return;let n=r=>{if(!t)return;let s=this.gos.getRowIdCallback();if(!s)return;let o=this.parentRowNode.getGroupKeys(),a=this.level,l=s({data:r,parentKeys:o.length>0?o:void 0,level:a}),c=t[l];if(c)return delete t[l],c},i=(r,s)=>{this.allNodesMap[r.id]=r,this.blockUtils.updateDataIntoRowNode(r,s),this.allRowNodes.push(r)};e.forEach(r=>{let s=n(r);s?i(s,r):this.createDataNode(r)})}flushAsyncTransactions(){window.setTimeout(()=>this.transactionManager.flushAsyncTransactions(),0)}filterAndSortNodes(){this.filterRowNodes(),this.sortRowNodes()}sortRowNodes(){let t=this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerSideSortOnServer(),e=this.sortController.getSortOptions(),n=!e||e.length==0;if(t||n){this.nodesAfterSort=this.nodesAfterFilter;return}if(this.nodesAfterSort=this.rowNodeSorter.doFullSort(this.nodesAfterFilter,e),this.postSortFunc){let i={nodes:this.nodesAfterSort};this.postSortFunc(i)}}filterRowNodes(){let t=!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerSideFilterOnServer(),e=this.groupLevel;if(t||e){this.nodesAfterFilter=this.allRowNodes;return}this.nodesAfterFilter=this.filterManager?this.allRowNodes.filter(n=>this.filterManager.doesRowPassFilter({rowNode:n})):this.allRowNodes}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEach(t=>this.blockUtils.clearDisplayIndex(t))}getDisplayIndexEnd(){return this.displayIndexEnd}isDisplayIndexInStore(t){return this.getRowCount()===0?!1:t>=this.displayIndexStart&&t<this.displayIndexEnd}setDisplayIndexes(t,e,n){this.displayIndexStart=t.peek(),this.topPx=e.value;let i={};this.nodesAfterSort.forEach(r=>{this.blockUtils.setDisplayIndex(r,t,e,n),i[r.id]=!0}),this.allRowNodes.forEach(r=>{i[r.id]||this.blockUtils.clearDisplayIndex(r)}),this.displayIndexEnd=t.peek(),this.heightPx=e.value-this.topPx}forEachStoreDeep(t,e=new c1){t(this,e.next()),this.allRowNodes.forEach(n=>{let i=n.childStore;i&&i.forEachStoreDeep(t,e)})}forEachNodeDeep(t,e=new c1){this.allRowNodes.forEach(n=>{t(n,e.next());let i=n.childStore;i&&i.forEachNodeDeep(t,e)})}forEachNodeDeepAfterFilterAndSort(t,e=new c1,n=!1){this.nodesAfterSort.forEach(i=>{t(i,e.next());let r=i.childStore;r&&r.forEachNodeDeepAfterFilterAndSort(t,e,n)}),n&&this.parentRowNode.sibling&&t(this.parentRowNode.sibling,e.next())}getRowUsingDisplayIndex(t){return this.isDisplayIndexInStore(t)?this.blockUtils.binarySearchForDisplayIndex(t,this.nodesAfterSort):void 0}getRowBounds(t){for(let e=0;e<this.nodesAfterSort.length;e++){let n=this.nodesAfterSort[e],i=this.blockUtils.extractRowBounds(n,t);if(i)return i}return null}isPixelInRange(t){return t>=this.topPx&&t<this.topPx+this.heightPx}getRowIndexAtPixel(t){if(t<=this.topPx)return this.nodesAfterSort[0].rowIndex;if(t>=this.topPx+this.heightPx){let s=this.nodesAfterSort[this.nodesAfterSort.length-1];if(!s)return null;let o=s.rowTop+s.rowHeight;if(t>=o&&s.expanded){if(s.childStore&&s.childStore.getRowCount()>0)return s.childStore.getRowIndexAtPixel(t);if(s.detailNode)return s.detailNode.rowIndex}return s.rowIndex}let i=null;return this.nodesAfterSort.forEach(s=>{let o=this.blockUtils.getIndexAtPixel(s,t);o!=null&&(i=o)}),i??this.displayIndexEnd-1}getChildStore(t){return this.storeUtils.getChildStore(t,this,e=>this.allRowNodes.find(i=>i.key==e))}forEachChildStoreShallow(t){this.allRowNodes.forEach(e=>{let n=e.childStore;n&&t(n)})}refreshAfterFilter(t){let e=this.storeUtils.isServerSideFilterOnServer(),n=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,t);if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||e&&n){this.refreshStore(!0),this.sortRowNodes();return}this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(r=>r.refreshAfterFilter(t))}refreshAfterSort(t){let e=this.storeUtils.isServerSideSortOnServer(),n=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,t);if(this.storeUtils.isServerSideSortAllLevels()||e&&n){this.refreshStore(!0),this.filterRowNodes();return}this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(r=>r.refreshAfterSort(t))}applyTransaction(t){switch(this.getState()){case"failed":return{status:U1.StoreLoadingFailed};case"loading":return{status:U1.StoreLoading};case"needsLoading":return{status:U1.StoreWaitingToLoad}}let e=this.gos.getCallback("isApplyServerSideTransaction");if(e){let r={transaction:t,parentNode:this.parentRowNode,groupLevelInfo:this.info};if(!e(r))return{status:U1.Cancelled}}let n={status:U1.Applied,remove:[],update:[],add:[]},i=[];return this.executeAdd(t,n),this.executeRemove(t,n,i),this.executeUpdate(t,n,i),this.filterAndSortNodes(),this.updateSelection(i),n}updateSelection(t){t.length>0&&(this.selectionService.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,clearSelection:!1,source:"rowDataChanged"}),this.eventService.dispatchEvent({type:"selectionChanged",source:"rowDataChanged"}))}executeAdd(t,e){let{add:n,addIndex:i}=t;if(Gd(n))return;typeof i=="number"&&i>=0?n.reverse().forEach(s=>{let o=this.createDataNode(s,i);e.add.push(o)}):n.forEach(s=>{let o=this.createDataNode(s);e.add.push(o)})}executeRemove(t,e,n){let{remove:i}=t;if(i==null)return;let r={};i.forEach(s=>{let o=this.lookupRowNode(s);o&&(o.isSelected()&&n.push(o),o.clearRowTopAndRowIndex(),r[o.id]=!0,delete this.allNodesMap[o.id],e.remove.push(o),this.nodeManager.removeNode(o))}),this.allRowNodes=this.allRowNodes.filter(s=>!r[s.id])}executeUpdate(t,e,n){let{update:i}=t;i?.forEach(r=>{let s=this.lookupRowNode(r);s&&(this.blockUtils.updateDataIntoRowNode(s,r),!s.selectable&&s.isSelected()&&n.push(s),e.update.push(s))})}lookupRowNode(t){let e=this.gos.getRowIdCallback();if(e!=null){let n=this.parentRowNode.getGroupKeys(),i=e({data:t,parentKeys:n.length>0?n:void 0,level:this.level}),r=this.allNodesMap[i];return r||(Do(`could not find row id=${i}, data item was not found for this id`),null)}else{let n=this.allRowNodes.find(i=>i.data===t);return n||(Do("could not find data item as object was not found",t),null)}}addStoreStates(t){t.push({suppressInfiniteScroll:!0,route:this.parentRowNode.getGroupKeys(),rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow(e=>e.addStoreStates(t))}refreshStore(t){if(t){let e=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(e)}this.scheduleLoad(),this.fireStoreUpdatedEvent()}retryLoads(){this.getState()==="failed"&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow(t=>t.retryLoads())}scheduleLoad(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()}fireStoreUpdatedEvent(){this.eventService.dispatchEvent({type:"storeUpdated"})}getRowCount(){return this.nodesAfterSort.length}getTopLevelRowDisplayedIndex(t){return this.nodesAfterSort[t].rowIndex}isLastRowIndexKnown(){return this.getState()=="loaded"}getRowNodesInRange(t,e){let n=[],i=!1;return Ls(t)&&(i=!0),this.nodesAfterSort.forEach(s=>{let o=s===t||s===e;(i||o)&&n.push(s),o&&(i=!i)}),i?[]:n}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}},Vat=(()=>{let t=class extends Ot{constructor(){super(...arguments),this.beanName="lazyBlockLoadingService",this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}wireBeans(e){this.rowNodeBlockLoader=e.rowNodeBlockLoader,this.rowRenderer=e.rowRenderer,this.rowModel=e.rowModel}postConstruct(){this.addManagedListeners(this.rowNodeBlockLoader,{blockLoaded:()=>this.queueLoadCheck()})}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}queueLoadAction(){let e=this.getBlockToLoad();if(!e)return;let n=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!n&&(!this.nextBlockToLoad||!n)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);let i=Number(this.nextBlockToLoad.index),r=this.nextBlockToLoad.cache,s=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{r.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(r,i,s),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,n,i){let r=this.rowNodeBlockLoader.getAvailableLoadingCount();r!=null&&r===0||(this.rowNodeBlockLoader.registerLoads(1),this.executeLoad(e,n,i),this.queueLoadCheck())}executeLoad(e,n,i){let r=e.getSsrmParams(),s={startRow:n,endRow:i,rowGroupCols:r.rowGroupCols,valueCols:r.valueCols,pivotCols:r.pivotCols,pivotMode:r.pivotMode,groupKeys:e.store.getParentNode().getGroupKeys(),filterModel:r.filterModel,sortModel:r.sortModel},o=this.cacheLoadingNodesMap.get(e),a=()=>{for(let m=0;m<i-n;m++)o.delete(n+m)},l=()=>{for(let m=0;m<i-n;m++)o.add(n+m)},c=m=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadSuccess(n,i-n,m),a()},d=()=>{this.rowNodeBlockLoader.loadComplete(),e.onLoadFailed(n,i-n),a()},u=this.gos.addGridCommonParams({request:s,success:c,fail:d,parentNode:e.store.getParentNode()});l(),e.getSsrmParams().datasource?.getRows(u)}getBlockToLoad(){let e=this.rowRenderer.getFirstVirtualRenderedRow(),n=this.rowRenderer.getLastVirtualRenderedRow();for(let l=e;l<=n;l++){let c=this.rowModel.getRow(l);if(!c)continue;let d=c.parent&&c.parent.childStore;if(!d||!(d instanceof lW))continue;let u=d.getCache(),m=u.getNodes().getBy("node",c);if(!(!m||this.cacheLoadingNodesMap.get(u)?.has(m.index))&&(c.__needsRefreshWhenVisible||c.stub&&!c.failedLoad))return{cache:u,index:u.getBlockStartIndex(m.index)}}let i=null,r=null,s=Number.MAX_SAFE_INTEGER;for(let l of this.cacheLoadingNodesMap.keys())l.getNodesToRefresh().forEach(d=>{if(d.rowIndex==null){r=d,i=l;return}let u=l.getNodes().getBy("node",d);if(!u||this.cacheLoadingNodesMap.get(l)?.has(u.index))return;let f=Math.abs(e-d.rowIndex),_=Math.abs(d.rowIndex-n);f<s&&(r=d,s=f,i=l),_<s&&(r=d,s=_,i=l)});if(!i)return;let o=i,a=o.getNodes().getBy("node",r)?.index;return a==null?void 0:{cache:o,index:o.getBlockStartIndex(a)}}isRowLoading(e,n){return this.cacheLoadingNodesMap.get(e)?.has(n)??!1}};return t.DEFAULT_BLOCK_SIZE=100,t})(),i9i=class{constructor(...t){if(t.length<1)throw new Error("AG Grid: At least one index must be provided.");this.indexes=t,this.maps=new Map(this.indexes.map(e=>[e,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(t,e){let n=this.maps.get(t);if(!n)throw new Error(`AG Grid: ${String(t)} not found`);return n.get(e)}set(t){this.indexes.forEach(e=>{let n=this.maps.get(e);if(!n)throw new Error(`AG Grid: ${String(e)} not found`);n.set(t[e],t)})}delete(t){this.indexes.forEach(e=>{let n=this.maps.get(e);if(!n)throw new Error(`AG Grid: ${String(e)} not found`);n.delete(t[e])})}clear(){this.maps.forEach(t=>t.clear())}getIterator(t){let e=this.maps.get(t);if(!e)throw new Error(`AG Grid: ${String(t)} not found`);return e.values()}forEach(t){let e=this.getIterator(this.indexes[0]),n;for(;(n=e.next())&&!n.done;)t(n.value)}find(t){let e=this.getIterator(this.indexes[0]),n;for(;(n=e.next())&&!n.done;)if(t(n.value))return n.value}filter(t){let e=this.getIterator(this.indexes[0]),n,i=[];for(;(n=e.next())&&!n.done;)t(n.value)&&i.push(n.value);return i}},Pxe=class extends Ot{constructor(t,e,n,i){super(),this.live=!0,this.removedNodeCache=new Map,this.store=t,this.numberOfRows=e,this.isLastRowKnown=n,this.storeParams=i}wireBeans(t){this.rowRenderer=t.rowRenderer,this.blockUtils=t.ssrmBlockUtils,this.focusService=t.focusService,this.nodeManager=t.ssrmNodeManager,this.serverSideRowModel=t.rowModel,this.rowNodeSorter=t.rowNodeSorter,this.sortController=t.sortController,this.lazyBlockLoadingService=t.lazyBlockLoadingService}postConstruct(){this.lazyBlockLoadingService.subscribe(this),this.nodeMap=new i9i("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=this.gos.getRowIdCallback(),this.isMasterDetail=this.gos.get("masterDetail")}destroy(){this.lazyBlockLoadingService.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEach(t=>this.blockUtils.destroyRowNode(t.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1,super.destroy()}getRowByDisplayIndex(t){if(!this.store.isDisplayIndexInStore(t))return;let e=this.nodeDisplayIndexMap.get(t);if(e)return(e.stub||e.__needsRefreshWhenVisible)&&this.lazyBlockLoadingService.queueLoadCheck(),e;if(this.gos.get("groupHideOpenParents")||this.gos.get("groupAllowUnbalanced")){let l=this.nodeMap.find(c=>!!c.node.childStore?.isDisplayIndexInStore(t));if(l)return l.node.childStore?.getRowUsingDisplayIndex(t)}if(t===this.store.getDisplayIndexStart())return this.createStubNode(0,t);let i=this.nodeDisplayIndexMap.get(t-1);if(i){if(this.isMasterDetail&&i.master&&i.expanded)return i.detailNode;if(i.expanded&&i.childStore?.isDisplayIndexInStore(t))return i.childStore?.getRowUsingDisplayIndex(t);let l=this.nodeMap.getBy("node",i);return this.createStubNode(l.index+1,t)}let r=this.getSurroundingNodesByDisplayIndex(t);if(r==null){let l=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-t);return this.createStubNode(l,t)}let{previousNode:s,nextNode:o}=r;if(s&&s.node.expanded&&s.node.childStore?.isDisplayIndexInStore(t))return s.node.childStore?.getRowUsingDisplayIndex(t);if(o){let l=o.node.rowIndex-t,c=o.index-l;return this.createStubNode(c,t)}let a=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-t);return this.createStubNode(a,t)}createStubNode(t,e){let n=this.store.getRowBounds(e),i=this.createRowAtIndex(t,null,r=>{r.setRowIndex(e),r.setRowTop(n.rowTop),this.nodeDisplayIndexMap.set(e,r)});if(t===0&&this.gos.get("groupHideOpenParents")){let r=this.store.getParentNode().groupData;for(let s in r)i.setGroupValue(s,r[s])}return this.lazyBlockLoadingService.queueLoadCheck(),i}getRowByStoreIndex(t){return this.nodeMap.getBy("index",t)?.node}skipDisplayIndexes(t,e,n){if(t===0)return;let i=this.gos.getRowHeightAsNumber();e.skip(t),n.value+=t*i}setDisplayIndexes(t,e,n){this.nodeDisplayIndexMap.clear();let i={};this.nodeMap.forEach(o=>{i[o.index]=o.node});let r=-1;for(let o in i){let a=i[o],l=Number(o),c=l-1-r;this.skipDisplayIndexes(c,t,e);let d=l===0;if(a.setFirstChild(d),d&&this.gos.get("groupHideOpenParents")){let u=this.store.getParentNode().groupData;for(let m in u)a.setGroupValue(m,d?u[m]:void 0)}this.blockUtils.setDisplayIndex(a,t,e,n),a.rowIndex!=null&&this.nodeDisplayIndexMap.set(a.rowIndex,a),r=l}let s=this.numberOfRows-1-r;this.skipDisplayIndexes(s,t,e),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(t,e){if(t<0)throw new Error("AG Grid: setRowCount can only accept a positive row count.");this.numberOfRows=t,e!=null&&(this.isLastRowKnown=e,e===!1&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(t){return this.nodeDisplayIndexMap.get(t)??null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(t){let e,n;return this.nodeMap.forEach(i=>{if(t>i.node.rowIndex){(n==null||n.node.rowIndex<i.node.rowIndex)&&(n=i);return}if(e==null||e.node.rowIndex>i.node.rowIndex){e=i;return}}),!n&&!e?null:{previousNode:n,nextNode:e}}getDisplayIndexFromStoreIndex(t){let e=this.nodeMap.getBy("index",t);if(e)return e.node.rowIndex;let n,i;if(this.nodeMap.forEach(o=>{if(t>o.index){(i==null||i.index<o.index)&&(i=o);return}if(n==null||n.index>o.index){n=o;return}}),!n)return this.store.getDisplayIndexEnd()-(this.numberOfRows-t);if(!i)return this.store.getDisplayIndexStart()+t;let r=t-i.index;return(i.node.childStore?.getDisplayIndexEnd()??i.node.rowIndex)+r}createRowAtIndex(t,e,n){let i=this.nodeMap.getBy("index",t);if(i){let{node:s}=i;if(s.__needsRefreshWhenVisible=!1,this.doesNodeMatch(e,s))return this.blockUtils.updateDataIntoRowNode(s,e),this.nodesToRefresh.delete(s),s;if(this.getRowIdFunc==null&&s.hasChildren()&&s.expanded)return this.nodesToRefresh.delete(s),s;this.destroyRowAtIndex(t)}if(e&&this.getRowIdFunc!=null){let s=this.getRowId(e),o=s&&this.removedNodeCache?.get(s);if(o)return this.removedNodeCache?.delete(s),this.blockUtils.updateDataIntoRowNode(o,e),this.nodeMap.set({id:o.id,node:o,index:t}),this.nodesToRefresh.delete(o),o.__needsRefreshWhenVisible=!1,o;let a=this.nodeMap.getBy("id",s);if(a){this.nodeMap.delete(a);let{node:l,index:c}=a;return this.blockUtils.updateDataIntoRowNode(l,e),this.nodeMap.set({id:l.id,node:l,index:t}),this.nodesToRefresh.delete(l),l.__needsRefreshWhenVisible=!1,this.getBlockStartIndex(c)===this.getBlockStartIndex(t)||this.markBlockForVerify(c),l}}let r=this.blockUtils.createRowNode(this.store.getRowDetails());if(e!=null){let s=this.getPrefixedId(this.store.getIdSequence().next());this.blockUtils.setDataIntoRowNode(r,e,s,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(r),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(r)}return this.nodeMap.set({id:r.id,node:r,index:t}),n&&n(r),r}getBlockStates(){let t={},e={};this.nodeMap.forEach(({node:s,index:o})=>{let a=this.getBlockStartIndex(o);!s.stub&&!s.failedLoad&&(t[a]=(t[a]??0)+1);let l="loaded";s.failedLoad?l="failed":this.lazyBlockLoadingService.isRowLoading(this,a)?l="loading":(this.nodesToRefresh.has(s)||s.stub)&&(l="needsLoading"),e[a]||(e[a]=new Set),e[a].add(l)});let n={loading:4,failed:3,needsLoading:2,loaded:1},i=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),r={};return Object.entries(e).forEach(([s,o])=>{let l=[...o].sort((u,m)=>(n[u]??0)-(n[m]??0))[0],c=Number(s)/this.getBlockSize(),d=i?`${i}-${c}`:String(c);r[d]={blockNumber:c,startRow:Number(s),endRow:Number(s)+this.getBlockSize(),pageStatus:l,loadedRowCount:t[s]??0}}),r}destroyRowAtIndex(t){let e=this.nodeMap.getBy("index",t);e&&(this.nodeMap.delete(e),this.nodeDisplayIndexMap.delete(e.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(e.node.id,e.node):this.blockUtils.destroyRowNode(e.node),this.nodesToRefresh.delete(e.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(t){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+t:t.toString()}markBlockForVerify(t){let[e,n]=this.getBlockBounds(t);this.nodeMap.filter(r=>r.index>=e&&r.index<n).forEach(({node:r})=>{r.__needsRefreshWhenVisible=!0})}doesNodeMatch(t,e){if(e.stub)return!1;let n=this.getRowId(t);return n===null?e.data===t:e.id===n}purgeStubsOutsideOfViewport(){let t=this.rowRenderer.getFirstVirtualRenderedRow(),e=this.rowRenderer.getLastVirtualRenderedRow(),n=this.getBlockStartIndex(t),[,i]=this.getBlockBounds(e);this.nodeMap.forEach(r=>{this.lazyBlockLoadingService.isRowLoading(this,r.index)||r.node.failedLoad||r.node.stub&&(r.index<n||r.index>i)&&this.destroyRowAtIndex(r.index)})}getBlocksDistanceFromRow(t,e){let n={};return t.forEach(({node:i,index:r})=>{let[s,o]=this.getBlockBounds(r);if(s in n)return;let a=Math.abs(i.rowIndex-e),l,c=this.nodeMap.getBy("index",[o-1]);c&&(l=Math.abs(c.node.rowIndex-e));let d=l==null||a<l?a:l;n[s]=d}),Object.entries(n)}purgeExcessRows(){if(this.purgeStubsOutsideOfViewport(),this.store.getDisplayIndexEnd()==null||this.storeParams.maxBlocksInCache==null)return;let t=this.rowRenderer.getFirstVirtualRenderedRow(),e=this.rowRenderer.getLastVirtualRenderedRow(),n=new Set,i=new Set;this.nodeMap.forEach(({index:f,node:_})=>{let x=this.getBlockStartIndex(f);n.add(x),_.rowIndex>=t&&_.rowIndex<=e&&i.add(x)});let r=Math.max(i.size,this.storeParams.maxBlocksInCache??0),o=n.size-r;if(o<=0)return;let a=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;i.forEach(f=>{a>f&&(a=f),l<f&&(l=f)});let c=this.nodeMap.filter(({node:f,index:_})=>{let x=this.getBlockStartIndex(_);return!(x>=a&&x<=l)&&!this.isNodeCached(f)});if(c.length===0)return;let d=t+(e-t)/2,u=this.getBlocksDistanceFromRow(c,d),m=this.getBlockSize();u.sort((f,_)=>Math.sign(_[1]-f[1]));for(let f=0;f<Math.min(o,u.length);f++){let _=Number(u[f][0]);for(let x=_;x<_+m;x++){let D=this.nodeMap.getBy("index",x);!D||this.isNodeCached(D.node)||this.destroyRowAtIndex(x)}}}isNodeFocused(t){let e=this.focusService.getFocusCellToUseAfterRefresh();return!e||e.rowPinned!=null?!1:e.rowIndex===t.rowIndex}isNodeCached(t){let e=this.gos.get("groupAllowUnbalanced")&&t.key==="";return t.isExpandable()&&t.expanded||this.isNodeFocused(t)||e}extractDuplicateIds(t){if(this.getRowIdFunc==null)return[];let e=new Set,n=new Set;return t.forEach(i=>{let r=this.getRowId(i);if(e.has(r)){n.add(r);return}e.add(r)}),[...n]}onLoadSuccess(t,e,n){if(!this.live)return;let i=n.groupLevelInfo;if(this.store.setStoreInfo(i),this.getRowIdFunc!=null){let o=this.extractDuplicateIds(n.rowData);if(o.length>0){let a=o.join(", ");wt(`Unable to display rows as duplicate row ids (${a}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`),this.onLoadFailed(t,e);return}}n.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(n.pivotResultFields);let r=this.nodesToRefresh.size>0;if(n.rowData.forEach((o,a)=>{let l=t+a,c=this.nodeMap.getBy("index",l);if(c?.node?.stub){this.createRowAtIndex(l,o);return}if(c&&this.doesNodeMatch(o,c.node)){this.blockUtils.updateDataIntoRowNode(c.node,o),this.nodesToRefresh.delete(c.node),c.node.__needsRefreshWhenVisible=!1;return}this.createRowAtIndex(l,o)}),n.rowCount!=null&&n.rowCount!==-1)this.numberOfRows=n.rowCount,this.isLastRowKnown=!0;else if(e>n.rowData.length)this.numberOfRows=t+n.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){let o=t+n.rowData.length+1;o>this.numberOfRows&&(this.numberOfRows=o)}this.isLastRowKnown&&this.nodeMap.filter(a=>a.index>=this.numberOfRows).forEach(a=>this.destroyRowAtIndex(a.index)),this.fireStoreUpdatedEvent();let s=this.nodesToRefresh.size===0;r&&s&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){this.nodesToRefresh.size===0&&(this.removedNodeCache.forEach(e=>{this.blockUtils.destroyRowNode(e)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){let t=this.isLastRowKnown,e=this.nodeMap.getSize()===this.numberOfRows;if(!t||!e||this.nodesToRefresh.size>0)return;let n=-1;return this.nodeMap.find(r=>(n+=1,!!(r.index!==n||r.node.__needsRefreshWhenVisible||r.node.stub)))==null}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(t,e){if(!this.live)return;let n=this.nodesToRefresh.size>0;for(let r=t;r<t+e&&r<this.getRowCount();r++){let{node:s}=this.nodeMap.getBy("index",r)??{};s&&this.nodesToRefresh.delete(s),(!s||!s.stub)&&(s&&!s.stub&&this.destroyRowAtIndex(r),s=this.createRowAtIndex(r)),s.__needsRefreshWhenVisible=!1,s.failedLoad=!0}let i=this.nodesToRefresh.size===0;n&&i&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}markNodesForRefresh(){this.nodeMap.forEach(t=>{t.node.stub&&!t.node.failedLoad||this.nodesToRefresh.add(t.node)}),this.lazyBlockLoadingService.queueLoadCheck(),this.isLastRowKnown&&this.numberOfRows===0&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(t){return!!this.nodeMap.getBy("id",t)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(t){if(this.getRowIdFunc==null)return null;let{level:e}=this.store.getRowDetails(),n=this.store.getParentNode().getGroupKeys();return this.getRowIdFunc({data:t,parentKeys:n.length>0?n:void 0,level:e})}getOrderedNodeMap(){let t={};return this.nodeMap.forEach(e=>t[e.index]=e),t}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){let t=this.sortController.getSortOptions();if(!t.some(r=>r.sort!=null))return;let n=new Array(this.nodeMap.getSize());this.nodeMap.forEach(r=>n[r.index]=r.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(n,t).forEach((r,s)=>{this.nodeMap.set({id:r.id,node:r,index:s})})}updateRowNodes(t){if(this.getRowIdFunc==null)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");let e=[];return t.forEach(n=>{let i=this.getRowId(n),r=this.nodeMap.getBy("id",i);r&&(this.blockUtils.updateDataIntoRowNode(r.node,n),e.push(r.node))}),e}insertRowNodes(t,e){let n=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),i=e==null&&this.isLastRowKnown?n:e;if(i==null||n<i)return[];if(this.getRowIdFunc==null)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");let r={};t.forEach(l=>{let c=this.getRowId(l);c&&this.isNodeInCache(c)||(r[c]=l)});let s=Object.values(r),o=s.length;if(o===0)return[];let a=this.nodeMap.filter(l=>l.index>=i);return a.forEach(l=>this.nodeMap.delete(l)),a.forEach(l=>{this.nodeMap.set({node:l.node,index:l.index+o,id:l.id})}),this.numberOfRows+=o,s.map((l,c)=>this.createRowAtIndex(i+c,l))}removeRowNodes(t){if(this.getRowIdFunc==null)throw new Error("AG Grid: Transactions can only be applied when row ids are supplied.");let e=[],n=[],i=0,r=[...t],s=this.getOrderedNodeMap(),o=-1;for(let a in s){o+=1;let l=s[a],c=r.findIndex(u=>u===l.id);if(c!==-1){r.splice(c,1),this.destroyRowAtIndex(Number(a)),e.push(l.node),i+=1;continue}if(i===0)continue;let d=Number(a);o!==d&&n.push(l.node),this.nodeMap.delete(s[a]),this.nodeMap.set({id:l.id,node:l.node,index:d-i})}return this.numberOfRows-=this.isLastRowIndexKnown()?t.length:i,r.length>0&&n.length>0&&(n.forEach(a=>a.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingService.queueLoadCheck()),e}getBlockSize(){return this.storeParams.cacheBlockSize||Vat.DEFAULT_BLOCK_SIZE}getBlockStartIndex(t){let e=this.getBlockSize();return t-t%e}getBlockBounds(t){let e=this.getBlockStartIndex(t),n=this.getBlockSize();return[e,e+n]}},lW=class extends Ot{constructor(t,e,n){super(),this.idSequence=new c1,this.ssrmParams=t,this.parentRowNode=n,this.storeParams=e,this.level=n.level+1,this.group=t.rowGroupCols?this.level<t.rowGroupCols.length:!1,this.leafGroup=t.rowGroupCols?this.level===t.rowGroupCols.length-1:!1,this.info={}}wireBeans(t){this.blockUtils=t.ssrmBlockUtils,this.storeUtils=t.ssrmStoreUtils,this.selectionService=t.selectionService,this.funcColsService=t.funcColsService}postConstruct(){let t=1;if(this.level===0&&(t=this.storeUtils.getServerSideInitialRowCount()??1,this.eventService.dispatchEventOnce({type:"rowCountReady"})),this.cache=this.createManagedBean(new Pxe(this,t,!1,this.storeParams)),!this.gos.get("treeData")&&this.group){let n=this.ssrmParams.rowGroupCols[this.level];this.groupField=n.field,this.rowGroupColumn=this.funcColsService.getRowGroupColumns()[this.level]}}destroy(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache),super.destroy()}applyRowData(t,e,n){this.cache.onLoadSuccess(e,n,t)}applyTransaction(t){let e=this.gos.getRowIdCallback();if(!e)return wt("getRowId callback must be implemented for transactions to work. Transaction was ignored."),{status:U1.Cancelled};let n=this.gos.getCallback("isApplyServerSideTransaction");if(n){let d={transaction:t,parentNode:this.parentRowNode,groupLevelInfo:this.info};if(!n(d))return{status:U1.Cancelled}}let i=this.cache.isStoreFullyLoaded(),r;t.update?.length&&(r=this.cache.updateRowNodes(t.update));let s;if(t.add?.length){let d=t.addIndex;d!=null&&d<0&&(d=void 0),s=this.cache.insertRowNodes(t.add,d)}let o;if(t.remove?.length){let d=t.remove.map(m=>e({level:this.level,parentKeys:this.parentRowNode.getGroupKeys(),data:m})),u=[...new Set(d)];o=this.cache.removeRowNodes(u)}let a=this.gos.get("serverSideEnableClientSideSort"),l=r?.length||s?.length;return i&&a&&l&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(r,o),{status:U1.Applied,update:r,add:s,remove:o}}updateSelectionAfterTransaction(t,e){let n=[];t?.forEach(i=>{i.isSelected()&&!i.selectable&&n.push(i)}),e?.forEach(i=>{i.isSelected()&&n.push(i)}),n.length&&this.selectionService.setNodesSelected({newValue:!1,clearSelection:!1,nodes:n,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(t=>this.blockUtils.clearDisplayIndex(t.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(t,e){this.cache.setRowCount(t,e)}isDisplayIndexInStore(t){return this.cache.getRowCount()===0?!1:this.displayIndexStart<=t&&t<this.getDisplayIndexEnd()}setDisplayIndexes(t,e,n){this.displayIndexStart=t.peek(),this.topPx=e.value;let i=this.parentRowNode.level>-1&&this.gos.getGroupTotalRowCallback()({node:this.parentRowNode});i||this.parentRowNode.destroyFooter(),i==="top"&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,t,e,n)),this.cache.setDisplayIndexes(t,e,n),i==="bottom"&&(this.parentRowNode.createFooter(),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,t,e,n)),this.displayIndexEnd=t.peek(),this.heightPx=e.value-this.topPx}forEachStoreDeep(t,e=new c1){t(this,e.next()),this.cache.getNodes().forEach(n=>{let i=n.node.childStore;i&&i.forEachStoreDeep(t,e)})}forEachNodeDeep(t,e=new c1){this.cache.getNodes().forEach(n=>{t(n.node,e.next());let i=n.node.childStore;i&&i.forEachNodeDeep(t,e)})}forEachNodeDeepAfterFilterAndSort(t,e=new c1,n=!1){let i=this.parentRowNode.level>-1&&this.gos.getGroupTotalRowCallback()({node:this.parentRowNode});i==="top"&&t(this.parentRowNode.sibling,e.next());let r=this.cache.getOrderedNodeMap();for(let s in r){let o=r[s];t(o.node,e.next());let a=o.node.childStore;a&&a.forEachNodeDeepAfterFilterAndSort(t,e,n)}i==="bottom"&&t(this.parentRowNode.sibling,e.next())}retryLoads(){this.cache.getNodes().forEach(({node:t})=>{t.failedLoad&&(t.failedLoad=!1,t.__needsRefreshWhenVisible=!0,t.stub=!0)}),this.forEachChildStoreShallow(t=>t.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(t){return this.parentRowNode.sibling&&t===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(t)}getRowBounds(t){if(!this.isDisplayIndexInStore(t))return null;let e=this.cache.getNodeCachedByDisplayIndex(t);if(e){let a=this.blockUtils.extractRowBounds(e,t);if(a)return a}let{previousNode:n,nextNode:i}=this.cache.getSurroundingNodesByDisplayIndex(t)??{};if(n){let a=this.blockUtils.extractRowBounds(n.node,t);if(a!=null)return a}let r=this.gos.getRowHeightAsNumber();if(i){let a=(i.node.rowIndex-t)*r;return{rowTop:i.node.rowTop-a,rowHeight:r}}let s=this.topPx+this.heightPx,o=(this.getDisplayIndexEnd()-t)*r;return{rowTop:s-o,rowHeight:r}}isPixelInRange(t){return t>=this.topPx&&t<this.topPx+this.heightPx}getRowIndexAtPixel(t){if(t<this.topPx)return this.getDisplayIndexStart();if(t>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&t>this.parentRowNode.sibling.rowTop&&t<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let e=Number.MAX_SAFE_INTEGER,n=null,i=Number.MAX_SAFE_INTEGER,r=null;if(this.cache.getNodes().forEach(({node:l})=>{let c=Math.abs(t-l.rowTop);if(l.rowTop<t){c<e&&(e=c,n=l);return}c<i&&(i=c,r=l)}),n=n,r=r,n){let l=this.blockUtils.getIndexAtPixel(n,t);if(l!=null)return l}let s=this.gos.getRowHeightAsNumber();if(r){let l=r.rowTop,c=Math.ceil((l-t)/s);return r.rowIndex-c}let o=this.topPx+this.heightPx,a=Math.floor((o-t)/s);return this.getDisplayIndexEnd()-a}getChildStore(t){return this.storeUtils.getChildStore(t,this,e=>{let n=this.cache.getNodes().find(i=>i.node.key==e);return n?n.node:null})}forEachChildStoreShallow(t){this.cache.getNodes().forEach(({node:e})=>{e.childStore&&t(e.childStore)})}refreshAfterSort(t){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,t)){let n=this.cache.isStoreFullyLoaded(),i=this.gos.get("serverSideEnableClientSideSort");if(!(n&&i)){let s=this.cache.getRowCount(),o=this.cache.isLastRowIndexKnown();this.destroyBean(this.cache),this.cache=this.createManagedBean(new Pxe(this,s,o,this.storeParams));return}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(n=>n.refreshAfterSort(t))}refreshAfterFilter(t){if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,t)){this.refreshStore(!0);return}this.forEachChildStoreShallow(n=>n.refreshAfterFilter(t))}refreshStore(t){if(t){this.destroyBean(this.cache),this.cache=this.createManagedBean(new Pxe(this,1,!1,this.storeParams)),this.fireStoreUpdatedEvent();return}this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(t){return this.cache.getDisplayIndexFromStoreIndex(t)??t}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(t,e){return this.cache.getNodes().filter(({node:n})=>n.rowIndex>=t.rowIndex&&n.rowIndex<=e.rowIndex).map(({node:n})=>n)}addStoreStates(t){t.push({suppressInfiniteScroll:!1,route:this.parentRowNode.getGroupKeys(),rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(e=>e.addStoreStates(t))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(t){t&&Object.assign(this.info,t)}fireStoreUpdatedEvent(){this.eventService.dispatchEvent({type:"storeUpdated"})}fireRefreshFinishedEvent(){this.eventService.dispatchEvent({type:"storeRefreshed",route:this.parentRowNode.getRoute()})}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}},n9i=class extends Ot{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=Ap(this.onRowHeightChanged.bind(this),100),this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService,this.filterManager=t.filterManager,this.sortController=t.sortController,this.rowRenderer=t.rowRenderer,this.nodeManager=t.ssrmNodeManager,this.storeFactory=t.ssrmStoreFactory,this.beans=t,this.pivotColDefService=t.pivotColDefService}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}postConstruct(){let t=this.resetRootStore.bind(this);this.addManagedEventListeners({newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onStoreUpdated.bind(this),columnValueChanged:t,columnPivotChanged:t,columnRowGroupChanged:t,columnPivotModeChanged:t}),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","suppressServerSideInfiniteScroll","cacheBlockSize"],t),this.addManagedPropertyListener("groupAllowUnbalanced",()=>this.onStoreUpdated()),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){let t=this.gos.get("serverSideDatasource");t&&this.setDatasource(t)}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&wt("initialGroupOrderComparator cannot be used with Server Side Row Model."),this.gos.isRowSelection()&&!this.gos.exists("getRowId")&&wt("getRowId callback must be provided for Server Side Row Model selection to work correctly.")}setDatasource(t){this.started&&(this.destroyDatasource(),this.datasource=t,this.resetRootStore())}applyRowData(t,e,n){let i=this.getRootStore();if(!i)return;let r=i.getChildStore(n);r&&(r instanceof lW?r.applyRowData(t,e,t.rowData.length):r instanceof qxe&&r.processServerResult(t))}isLastRowIndexKnown(){let t=this.getRootStore();return t?t.isLastRowIndexKnown():!1}onColumnEverything(){if(!this.storeParams){this.resetRootStore();return}let t=this.columnsToValueObjects(this.funcColsService.getRowGroupColumns()),e=this.columnsToValueObjects(this.funcColsService.getValueColumns()),n=this.columnsToValueObjects(this.funcColsService.getPivotColumns()),i=c=>{let d={};c.oldCols.forEach(f=>d[f.id]=f);let u=c.newCols.every(f=>{let _=d[f.id];return _&&delete d[f.id],_&&_.field===f.field&&_.aggFunc===f.aggFunc}),m=!c.allowRemovedColumns&&!!Object.values(d).length;return u&&!m},r=!mD(this.storeParams.sortModel,this.sortController.getSortModel()),s=!i({oldCols:this.storeParams.rowGroupCols,newCols:t}),o=!i({oldCols:this.storeParams.pivotCols,newCols:n}),a=!!t?.length&&!i({oldCols:this.storeParams.valueCols,newCols:e,allowRemovedColumns:!0});if(r||s||o||a)this.resetRootStore();else{let c=this.createStoreParams();this.storeParams.rowGroupCols=c.rowGroupCols,this.storeParams.pivotCols=c.pivotCols,this.storeParams.valueCols=c.valueCols}}destroyRootStore(){!this.rootNode||!this.rootNode.childStore||(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(t,e){this.storeParams&&(this.storeParams.sortModel=t);let n=this.getRootStore();n&&(n.refreshAfterSort(e),this.onStoreUpdated())}generateSecondaryColumns(t){if(!this.pivotColDefService){Sa.__assertRegistered(wr.RowGroupingModule,"pivotResultFields",this.gridId);return}let e=this.pivotColDefService.createColDefsFromFields(t);this.managingPivotResultColumns=!0,this.pivotResultColsService.setPivotResultCols(e,"rowModelUpdated")}resetRowHeights(){let t=this.resetRowHeightsForAllRowNodes(),e=this.gos.getRowHeightForNode(this.rootNode);if(this.rootNode.setRowHeight(e.height,e.estimated),this.rootNode.sibling){let n=this.gos.getRowHeightForNode(this.rootNode.sibling);this.rootNode.sibling.setRowHeight(n.height,n.estimated)}t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let t=!1;return this.forEachNode(e=>{let n=this.gos.getRowHeightForNode(e);e.setRowHeight(n.height,n.estimated);let i=e.detailNode;if(i){let r=this.gos.getRowHeightForNode(i);i.setRowHeight(r.height,r.estimated)}if(e.sibling){let r=this.gos.getRowHeightForNode(e.sibling);i.setRowHeight(r.height,r.estimated)}t=!0}),t}resetRootStore(){this.destroyRootStore(),this.rootNode=new Pp(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.pivotResultColsService.setPivotResultCols(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(t){return t.map(e=>({id:e.getId(),aggFunc:e.getAggFunc(),displayName:this.columnNameService.getDisplayNameForColumn(e,"model"),field:e.getColDef().field}))}createStoreParams(){let t=this.columnsToValueObjects(this.funcColsService.getRowGroupColumns()),e=this.columnsToValueObjects(this.funcColsService.getValueColumns()),n=this.columnsToValueObjects(this.funcColsService.getPivotColumns()),i=this.gos.isGetRowHeightFunction();return{valueCols:e,rowGroupCols:t,pivotCols:n,pivotMode:this.columnModel.isPivotMode(),filterModel:this.filterManager?.isAdvancedFilterEnabled()?this.filterManager?.getAdvancedFilterModel():this.filterManager?.getFilterModel()??{},sortModel:this.sortController.getSortModel(),datasource:this.datasource,lastAccessedSequence:new c1,dynamicRowHeight:i}}getParams(){return this.storeParams}dispatchModelUpdated(t=!1){this.eventService.dispatchEvent({type:"modelUpdated",animate:!t,keepRenderedRows:!t,newPage:!1,newData:!1})}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){let t=this.getRootStore();t&&t.setDisplayIndexes(new c1,{value:0},0)}retryLoads(){let t=this.getRootStore();t&&(t.retryLoads(),this.onStoreUpdated())}getRow(t){let e=this.getRootStore();if(e)return e.getRowUsingDisplayIndex(t)}setPaused(t){this.pauseStoreUpdateListening=t}expandAll(t){this.pauseStoreUpdateListening=!0,this.forEachNode(e=>{e.stub||e.hasChildren()&&e.setExpanded(t)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(t,e){this.storeParams&&(this.storeParams.filterModel=t);let n=this.getRootStore();n&&(n.refreshAfterFilter(e),this.onStoreUpdated())}getRootStore(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore}getRowCount(){let t=this.getRootStore();return t?t.getDisplayIndexEnd():0}getTopLevelRowCount(){let t=this.getRootStore();return t?t.getRowCount():1}getTopLevelRowDisplayedIndex(t){let e=this.getRootStore();return e?e.getTopLevelRowDisplayedIndex(t):t}getRowBounds(t){let e=this.getRootStore();return e?e.getRowBounds(t):{rowTop:0,rowHeight:this.gos.getRowHeightAsNumber()}}getBlockStates(){let t=this.getRootStore();if(!t)return;let e={};return t.forEachStoreDeep(n=>{if(n instanceof qxe){let{id:i,state:r}=n.getBlockStateJson();e[i]=r}else if(n instanceof lW)Object.entries(n.getBlockStates()).forEach(([i,r])=>{e[i]=r});else throw new Error("AG Grid: Unsupported store type")}),e}getRowIndexAtPixel(t){let e=this.getRootStore();return t<=0||!e?0:e.getRowIndexAtPixel(t)}isEmpty(){return!1}isRowsToRender(){return this.getRootStore()!=null&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(t){let e=this.getRootStore();e&&e.forEachNodeDeep(t)}forEachNodeAfterFilterAndSort(t,e=!1){let n=this.getRootStore();n&&n.forEachNodeDeepAfterFilterAndSort(t,void 0,e)}executeOnStore(t,e){if(!this.started)return!1;let n=this.getRootStore();if(!n)return!0;let i=n.getChildStore(t);return i&&e(i),!0}refreshStore(t={}){let e=t.route?t.route:[];this.executeOnStore(e,n=>n.refreshStore(t.purge==!0))}getStoreState(){let t=[],e=this.getRootStore();return e&&e.addStoreStates(t),t}getNodesInRangeForSelection(t,e){let n=t.rowIndex,i=e.rowIndex;if(n===null&&i===null)return[];if(i===null)return t?[t]:[];if(n===null)return[e];let r=[],[s,o]=[n,i].sort((a,l)=>a-l);return this.forEachNode(a=>{let l=a.rowIndex;l==null||a.stub||l>=s&&l<=o&&r.push(a)}),r.length!==o-s+1?t?[t,e]:[]:r}getRowNode(t){let e;return this.forEachNode(n=>{n.id===t&&(e=n),n.detailNode&&n.detailNode.id===t&&(e=n.detailNode)}),e}isRowPresent(t){return!!this.getRowNode(t.id)}setRowCount(t,e){let n=this.getRootStore();if(n){if(n instanceof lW){n.setRowCount(t,e);return}Do("Infinite scrolling must be enabled in order to set the row count.")}}destroy(){this.destroyDatasource(),this.destroyRootStore(),super.destroy()}};p9i=class extends l4e{constructor(){super(...arguments),this.beanName="expansionService",this.queuedRowIds=new Set}wireBeans(t){super.wireBeans(t),this.serverSideRowModel=t.rowModel}postConstruct(){super.postConstruct(),this.addManagedEventListeners({columnRowGroupChanged:()=>{this.queuedRowIds.clear()}})}checkOpenByDefault(t){if(!t.isExpandable())return;if(this.queuedRowIds.has(t.id)){this.queuedRowIds.delete(t.id),t.setExpanded(!0);return}let e=this.gos.getCallback("isServerSideGroupOpenByDefault");if(!e)return;let n={data:t.data,rowNode:t};e(n)&&t.setExpanded(!0)}expandRows(t){t.forEach(e=>{let n=this.serverSideRowModel.getRowNode(e);n?n.setExpanded(!0):this.queuedRowIds.add(e)})}expandAll(t){this.serverSideRowModel.expandAll(t)}onGroupExpandedOrCollapsed(){}},Bat=class{constructor(){this.root=null,this.end=null,this.cachedRange=[]}init(t){this.rowModel=t}reset(){this.root=null,this.end=null,this.cachedRange.length=0}setRoot(t){this.root=t,this.end=null,this.cachedRange.length=0}setEndRange(t){this.end=t,this.cachedRange.length=0}getRoot(){return this.root}getRange(){if(this.cachedRange.length===0){let t=this.root?this.rowModel.getRowNode(this.root):void 0,e=this.end?this.rowModel.getRowNode(this.end):void 0;if(t==null||e==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(t,e)}return this.cachedRange}isInRange(t){return this.root===null?!1:this.getRange().some(e=>e.id===t)}truncate(t){let e=this.getRange();if(e.length===0)return{keep:[],discard:[]};let n=e[0].id===this.root,i=e.findIndex(r=>r.id===t);if(i>-1){let r=e.slice(0,i),s=e.slice(i+1);return this.setEndRange(t),n?{keep:r,discard:s}:{keep:s,discard:r}}else return{keep:e,discard:[]}}extend(t,e=!1){if(this.root==null){let s=this.getRange().slice(),o=this.rowModel.getRowNode(t);return o&&(e&&o.depthFirstSearch(a=>!a.group&&s.push(a)),s.push(o)),this.setRoot(t),{keep:s,discard:[]}}let n=this.rowModel.getRowNode(t),i=this.rowModel.getRowNode(this.root);if(n==null)return{keep:this.getRange(),discard:[]};if(i==null)return{keep:this.getRange().concat(n),discard:[]};if(this.rowModel.getNodesInRangeForSelection(i,n).find(s=>s.id===this.end))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{let s=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:s}}}},Gst=class extends Ot{constructor(){super(...arguments),this.selectionCtx=new Bat,this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectAllUsed=!1,this.selectedNodes={}}wireBeans(t){this.rowModel=t.rowModel}postConstruct(){this.selectionCtx.init(this.rowModel),this.rowSelection=this.gos.get("rowSelection"),this.addManagedPropertyListener("rowSelection",t=>{this.rowSelection=t.currentValue})}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(t){let e={selectAll:!1,toggledNodes:new Set};if(typeof t!="object")return Do("The provided selection state should be an object.");if(!("selectAll"in t))return Do("Invalid selection state. The state must conform to `IServerSideSelectionState`.");if(typeof t.selectAll=="boolean")e.selectAll=t.selectAll;else return Do("selectAll must be of boolean type.");if("toggledNodes"in t&&Array.isArray(t.toggledNodes))t.toggledNodes.forEach(n=>{typeof n=="string"?e.toggledNodes.add(n):wt(`Provided ids must be of string type. Invalid id provided: ${n}`)});else return wt("`toggledNodes` must be an array of string ids.");this.selectedState=e}deleteSelectionStateFromParent(t,e){if(this.selectedState.toggledNodes.size===0)return!1;let n=!1;return e.forEach(i=>{this.selectedState.toggledNodes.delete(i)&&(n=!0)}),n}overrideSelectionValue(t,e){if(!tz(e))return t;let n=this.selectionCtx.getRoot(),i=n?this.rowModel.getRowNode(n):null;return i?i.isSelected()??!1:!0}setNodesSelected(t){let{nodes:e,clearSelection:n,newValue:i,rangeSelect:r,source:s}=t;if(e.length===0)return 0;let o=n&&i&&!r;if(this.rowSelection!=="multiple"||o){if(e.length>1)throw new Error("AG Grid: cannot select multiple rows when rowSelection is set to 'single'");let l=e[0];return i&&l.selectable?(this.selectedNodes={[l.id]:l},this.selectedState={selectAll:!1,toggledNodes:new Set([l.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),l.selectable&&this.selectionCtx.setRoot(l.id),1}let a=(l,c=i)=>{c&&l.selectable?this.selectedNodes[l.id]=l:delete this.selectedNodes[l.id],c===this.selectedState.selectAll||!l.selectable?this.selectedState.toggledNodes.delete(l.id):this.selectedState.toggledNodes.add(l.id)};if(r){if(e.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");let l=e[0],c=this.overrideSelectionValue(i,s);if(this.selectionCtx.isInRange(l.id)){let d=this.selectionCtx.truncate(l.id);c&&d.discard.forEach(u=>a(u,!1)),d.keep.forEach(u=>a(u,c))}else if(this.selectionCtx.getRoot()!==l.id){let m=this.selectionCtx.extend(l.id);c&&m.discard.forEach(f=>a(f,!1)),m.keep.forEach(f=>a(f,c))}return 1}return e.forEach(l=>a(l)),this.selectionCtx.setRoot(Ar(e).id),1}processNewRow(t){this.selectedNodes[t.id]&&(this.selectedNodes[t.id]=t)}isNodeSelected(t){let e=this.selectedState.toggledNodes.has(t.id);return this.selectedState.selectAll?!e:e}getSelectedNodes(){return this.selectAllUsed&&wt("getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.\n                Use `api.getServerSideSelectionState()` instead."),Object.values(this.selectedNodes)}getSelectedRows(){return this.getSelectedNodes().map(t=>t.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}clearOtherNodes(t,e){let n=this.selectedState.selectAll?1:this.selectedState.toggledNodes.size-1;return this.selectedState={selectAll:!1,toggledNodes:new Set([t.id])},this.rowModel.forEachNode(i=>{i!==t&&i.selectThisNode(!1,void 0,e)}),this.eventService.dispatchEvent({type:"selectionChanged",source:e}),n}isEmpty(){return!this.selectedState.selectAll&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.selectedState={selectAll:!0,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed=!0,this.selectionCtx.reset()}deselectAllRowNodes(){this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectedNodes={},this.selectionCtx.reset()}getSelectAllState(){return this.selectedState.selectAll?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},Wst=class extends Ot{constructor(){super(...arguments),this.selectionCtx=new Bat,this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}wireBeans(t){this.rowModel=t.rowModel,this.funcColsService=t.funcColsService,this.filterManager=t.filterManager,this.selectionService=t.selectionService}postConstruct(){this.addManagedEventListeners({modelUpdated:()=>this.removeRedundantState(),columnRowGroupChanged:()=>this.selectionService.reset("rowGroupChanged")}),this.selectionCtx.init(this.rowModel)}getSelectedState(){let t=this.gos.get("treeData"),e=(n,i,r)=>{let s={nodeId:r};if((t||i<=this.funcColsService.getRowGroupColumns().length)&&(s.selectAllChildren=n.selectAllChildren),n.toggledNodes.size){let o=[];n.toggledNodes.forEach((a,l)=>{let c=e(a,i+1,l);o.push(c)}),s.toggledNodes=o}return s};return e(this.selectedState,0)}setSelectedState(t){if("selectAll"in t)return Do("Invalid selection state. When `groupSelectsChildren` is enabled, the state must conform to `IServerSideGroupSelectionState`.");let e=(n,i)=>{if(typeof n!="object")throw new Error("Each provided state object must be an object.");if("selectAllChildren"in n&&typeof n.selectAllChildren!="boolean")throw new Error("`selectAllChildren` must be a boolean value or undefined.");if("toggledNodes"in n){if(!Array.isArray(n.toggledNodes))throw new Error("`toggledNodes` must be an array.");if(!n.toggledNodes.every(l=>typeof l=="object"&&"nodeId"in l&&typeof l.nodeId=="string"))throw new Error("Every `toggledNode` requires an associated string id.")}let r=n.selectAllChildren??!i,s=n.toggledNodes?.map(a=>[a.nodeId,e(a,r)]);if(s?.some(([,a])=>r===a.selectAllChildren&&a.toggledNodes.size===0))throw new Error(`
                    Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
                    Please rebuild the selection state and reapply it.
                `);return{selectAllChildren:r,toggledNodes:new Map(s)}};try{this.selectedState=e(t,!!t.selectAllChildren)}catch(n){Do(n.message)}}deleteSelectionStateFromParent(t,e){let n=this.selectedState,i=[...t];for(;n&&i.length;)n=n.toggledNodes.get(i.pop());if(!n)return!1;let r=!1;return e.forEach(s=>{n?.toggledNodes.delete(s)&&(r=!0)}),r&&this.removeRedundantState(),r}overrideSelectionValue(t,e){if(!tz(e))return t;let n=this.selectionCtx.getRoot(),i=n?this.rowModel.getRowNode(n):null;return i?i.isSelected()??!1:!0}setNodesSelected({nodes:t,newValue:e,rangeSelect:n,clearSelection:i,source:r}){if(t.length===0)return 0;if(n){if(t.length>1)throw new Error("AG Grid: cannot select multiple rows when using rangeSelect");let o=t[0],a=this.overrideSelectionValue(e,r);if(this.selectionCtx.isInRange(o.id)){let l=this.selectionCtx.truncate(o.id);return a&&this.selectRange(l.discard,!1),this.selectRange(l.keep,a),1}else if(this.selectionCtx.getRoot()!==o.id){let d=this.selectionCtx.extend(o.id,!0);return a&&this.selectRange(d.discard,!1),this.selectRange(d.keep,a),1}return 1}let s=i&&e&&!n;if(this.gos.get("rowSelection")!=="multiple"||s){if(t.length>1)throw new Error("AG Grid: cannot select multiple rows when rowSelection is set to 'single'");this.deselectAllRowNodes()}return t.forEach(o=>{let a=this.getRouteToNode(o);this.recursivelySelectNode(a,this.selectedState,e)}),this.removeRedundantState(),this.selectionCtx.setRoot(Ar(t).id),1}selectRange(t,e){let n=t.map(this.getRouteToNode).sort((r,s)=>s.length-r.length),i=new Set;n.forEach(r=>{i.has(Ar(r))||(r.forEach(s=>i.add(s)),this.recursivelySelectNode(r,this.selectedState,e))}),this.removeRedundantState()}isNodeSelected(t){let e=this.getRouteToNode(t);return this.isNodePathSelected(e,this.selectedState)}isNodePathSelected([t,...e],n){if(e.length===0){let i=n.toggledNodes.has(t.id);if(t.hasChildren()){let r=n.toggledNodes.get(t.id);if(r&&r.toggledNodes.size)return}return n.selectAllChildren?!i:i}if(n.toggledNodes.has(t.id)){let i=n.toggledNodes.get(t.id);if(i)return this.isNodePathSelected(e,i)}return n.selectAllChildren}getRouteToNode(t){let e=[],n=t;for(;n.parent;)e.push(n),n=n.parent;return e.reverse()}removeRedundantState(){if(this.filterManager?.isAnyFilterPresent())return;let t=(e=this.selectedState,n,i)=>{if(e.toggledNodes.forEach((o,a)=>{t(o,a,e)}),n){let a=this.rowModel.getRowNode(n)?.childStore;if(a?.isLastRowIndexKnown()&&e.toggledNodes.size>=a.getRowCount()){for(let d of e.toggledNodes.entries()){let[u,m]=d;if(m.toggledNodes.size>0||!this.rowModel.getRowNode(u))return}e.selectAllChildren=!e.selectAllChildren,e.toggledNodes.clear()}}let r=e.toggledNodes.size===0,s=i?.selectAllChildren===e.selectAllChildren;r&&s&&i?.toggledNodes.delete(n)};t()}recursivelySelectNode([t,...e],n,i){if(!t)return;if(!e.length){let a=t.selectable;if(n.selectAllChildren===i||!a){n.toggledNodes.delete(t.id);return}let c={selectAllChildren:i,toggledNodes:new Map};n.toggledNodes.set(t.id,c);return}let s=n.toggledNodes.has(t.id),o=n.toggledNodes.get(t.id)??{selectAllChildren:n.selectAllChildren,toggledNodes:new Map};s||n.toggledNodes.set(t.id,o),this.recursivelySelectNode(e,o,i),n.selectAllChildren===o.selectAllChildren&&o.toggledNodes.size===0&&n.toggledNodes.delete(t.id)}getSelectedNodes(){wt("`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model.\n            Use `api.getServerSideSelectionState()` instead.");let t=[];return this.rowModel.forEachNode(e=>{e.isSelected()&&t.push(e)}),t}processNewRow(){}getSelectedRows(){return this.getSelectedNodes().map(t=>t.data)}getSelectionCount(){return-1}isEmpty(){return!this.selectedState.selectAllChildren&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.selectedState={selectAllChildren:!0,toggledNodes:new Map},this.selectionCtx.reset()}deselectAllRowNodes(){this.selectedState={selectAllChildren:!1,toggledNodes:new Map},this.selectionCtx.reset()}getSelectAllState(){return this.selectedState.selectAllChildren?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},m9i=class extends Ot{constructor(){super(...arguments),this.beanName="selectionService"}wireBeans(t){this.rowModel=t.rowModel}postConstruct(){let t=this.gos.get("groupSelectsChildren");this.addManagedPropertyListener("groupSelectsChildren",n=>{this.destroyBean(this.selectionStrategy);let i=n.currentValue?Wst:Gst;this.selectionStrategy=this.createManagedBean(new i),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api")}),this.addManagedPropertyListener("rowSelection",()=>this.deselectAllRowNodes({source:"api"}));let e=t?Wst:Gst;this.selectionStrategy=this.createManagedBean(new e)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(t,e){Array.isArray(t)||(this.selectionStrategy.setSelectedState(t),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged(e))}setNodesSelected(t){let o=t,{nodes:e}=o,n=al(o,["nodes"]),i=this.gos.get("rowSelection");if(e.length>1&&i!=="multiple")return wt("cannot multi select while rowSelection='single'"),0;if(e.length>1&&t.rangeSelect)return wt("cannot use range selection when multi selecting rows"),0;let r=ve({nodes:e.filter(a=>a.selectable)},n);if(!r.nodes.length)return 0;let s=this.selectionStrategy.setNodesSelected(r);return this.shotgunResetNodeSelectionState(r.source),this.dispatchSelectionChanged(r.source),s}deleteSelectionStateFromParent(t,e){this.selectionStrategy.deleteSelectionStateFromParent(t,e)&&(this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}shotgunResetNodeSelectionState(t){this.rowModel.forEachNode(e=>{if(e.stub)return;let n=this.selectionStrategy.isNodeSelected(e);n!==e.isSelected()&&e.selectThisNode(n,void 0,t)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(t){this.selectionStrategy.processNewRow(t);let e=this.selectionStrategy.isNodeSelected(t);if(e!=!1&&!t.selectable){this.selectionStrategy.setNodesSelected({nodes:[t],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api");return}t.setSelectedInitialValue(e)}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"})}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(){return!0}selectAllRowNodes(t){Ust(t),this.selectionStrategy.selectAllRowNodes(t),this.rowModel.forEachNode(e=>{e.stub||e.selectThisNode(!0,void 0,t.source)}),this.dispatchSelectionChanged(t.source)}deselectAllRowNodes(t){Ust(t),this.selectionStrategy.deselectAllRowNodes(t),this.rowModel.forEachNode(e=>{e.stub||e.selectThisNode(!1,void 0,t.source)}),this.dispatchSelectionChanged(t.source)}getSelectAllState(t,e){return this.selectionStrategy.getSelectAllState(t,e)}updateGroupsFromChildrenSelections(){return!1}getBestCostNodeSelection(){wt("calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.")}filterFromSelection(){}dispatchSelectionChanged(t){this.eventService.dispatchEvent({type:"selectionChanged",source:t})}};f9i=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmStoreFactory"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}createStore(t,e){let n=this.getStoreParams(t,e),i=n.suppressInfiniteScroll?qxe:lW;return new i(t,n,e)}getStoreParams(t,e){let n=this.getLevelSpecificParams(e),i=this.isInfiniteScroll(n),r=this.getBlockSize(i,n),s=this.getMaxBlocksInCache(i,t,n);return{suppressInfiniteScroll:!i,cacheBlockSize:r,maxBlocksInCache:s}}getMaxBlocksInCache(t,e,n){if(!t)return;let i=n&&n.maxBlocksInCache!=null?n.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(i!=null&&i>=0){if(e.dynamicRowHeight){wt("Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.");return}if(this.columnModel.isAutoRowHeightActive()){wt("Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.");return}return i}}getBlockSize(t,e){if(!t)return;let n=e&&e.cacheBlockSize!=null?e.cacheBlockSize:this.gos.get("cacheBlockSize");return n!=null&&n>0?n:100}getLevelSpecificParams(t){let e=this.gos.getCallback("getServerSideGroupLevelParams");if(!e)return;let n={level:t.level+1,parentRowNode:t.level>=0?t:void 0,rowGroupColumns:this.funcColsService.getRowGroupColumns(),pivotColumns:this.funcColsService.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()};return e(n)}isInfiniteScroll(t){return!(t&&t.suppressInfiniteScroll!=null?t.suppressInfiniteScroll:this.isSuppressServerSideInfiniteScroll())}isSuppressServerSideInfiniteScroll(){return this.gos.get("suppressServerSideInfiniteScroll")}},g9i=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmStoreUtils"}wireBeans(t){this.columnModel=t.columnModel,this.serverSideRowModel=t.rowModel,this.storeFactory=t.ssrmStoreFactory}loadFromDatasource(t){let{storeParams:e,parentBlock:n,parentNode:i}=t,r=i.getGroupKeys();if(!e.datasource)return;let s={startRow:t.startRow,endRow:t.endRow,rowGroupCols:e.rowGroupCols,valueCols:e.valueCols,pivotCols:e.pivotCols,pivotMode:e.pivotMode,groupKeys:r,filterModel:e.filterModel,sortModel:e.sortModel},o=this.gos.addGridCommonParams({success:t.success,fail:t.fail,request:s,parentNode:t.parentNode});window.setTimeout(()=>{if(!e.datasource||!n.isAlive()){t.fail();return}e.datasource.getRows(o)},0)}getChildStore(t,e,n){if(Gd(t))return e;let i=t[0],r=n(i);if(r){if(t.length===1&&!r.childStore){let a=this.serverSideRowModel.getParams();r.childStore=this.createBean(this.storeFactory.createStore(a,r))}let s=t.slice(1,t.length),o=r.childStore;return o?o.getChildStore(s):null}return null}isServerRefreshNeeded(t,e,n){if(n.valueColChanged||n.secondaryColChanged)return!0;let i=t.level+1;if(!(i<e.length))return!0;let o=e[i].id;return n.changedColumns.indexOf(o)>-1?!0:this.columnModel.getCols().filter(d=>d.getColDef().showRowGroup&&n.changedColumns.includes(d.getId())).map(d=>d.getColDef().showRowGroup).some(d=>d===!0||d===o)}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}assertRowModelIsServerSide(t){return this.gos.isRowModelType("serverSide")?!0:(wt(`The '${t}' property can only be used with the Server Side Row Model.`),!1)}assertNotTreeData(t){return this.gos.get("treeData")?(wt(`The '${t}' property cannot be used while using tree data.`),!1):!0}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&this.assertRowModelIsServerSide("serverSideSortAllLevels")}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&this.assertRowModelIsServerSide("serverSideOnlyRefreshFilteredGroups")}isServerSideSortOnServer(){return this.gos.get("serverSideSortOnServer")&&this.assertRowModelIsServerSide("serverSideSortOnServer")&&this.assertNotTreeData("serverSideSortOnServer")}isServerSideFilterOnServer(){return this.gos.get("serverSideFilterOnServer")&&this.assertRowModelIsServerSide("serverSideFilterOnServer")&&this.assertNotTreeData("serverSideFilterOnServer")}},v9i=class extends Ot{constructor(){super(...arguments),this.beanName="ssrmTransactionManager",this.asyncTransactions=[]}wireBeans(t){this.valueCache=t.valueCache,this.serverSideRowModel=t.rowModel,this.selectionService=t.selectionService}postConstruct(){this.gos.isRowModelType("serverSide")}applyTransactionAsync(t,e){this.asyncTransactionsTimeout==null&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:t,callback:e})}scheduleExecuteAsync(){let t=this.gos.getAsyncTransactionWaitMillis();this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},t)}executeAsyncTransactions(){if(!this.asyncTransactions)return;let t=[],e=[],n=[],i=!1;this.asyncTransactions.forEach(r=>{let s;if(this.serverSideRowModel.executeOnStore(r.transaction.route,l=>{s=l.applyTransaction(r.transaction)})?s==null&&(s={status:U1.StoreNotFound}):s={status:U1.StoreNotStarted},e.push(s),s.status==U1.StoreLoading){n.push(r);return}r.callback&&t.push(()=>r.callback(s)),s.status===U1.Applied&&(i=!0)}),t.length>0&&window.setTimeout(()=>{t.forEach(r=>r())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=n,i&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:"storeUpdated"})),e.length>0&&this.eventService.dispatchEvent({type:"asyncTransactionsFlushed",results:e})}flushAsyncTransactions(){this.asyncTransactionsTimeout!=null&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(t){let e;if(this.serverSideRowModel.executeOnStore(t.route,i=>{e=i.applyTransaction(t)}))if(e){if(this.valueCache.onDataChanged(),e.remove){let i=e.remove.map(r=>r.id);this.selectionService.deleteSelectionStateFromParent(t.route||[],i)}return this.eventService.dispatchEvent({type:"storeUpdated"}),e}else return{status:U1.StoreNotFound};else return{status:U1.StoreNotStarted}}},kbe="32.1.0",zat={version:kbe,moduleName:`${wr.ServerSideRowModelModule}-core`,rowModel:"serverSide",beans:[n9i,XSi,e9i,g9i,ZSi,t9i,v9i,QSi,f9i,JSi,m9i,p9i,Vat],dependantModules:[y1,u4e]},y9i={version:kbe,moduleName:`${wr.ServerSideRowModelModule}-api`,beans:[QZ],apiFunctions:{getServerSideSelectionState:r9i,setServerSideSelectionState:s9i,applyServerSideTransaction:o9i,applyServerSideTransactionAsync:l9i,applyServerSideRowData:a9i,retryServerSideLoads:c9i,flushServerSideAsyncTransactions:d9i,refreshServerSide:u9i,getServerSideGroupLevelState:h9i},dependantModules:[zat,g4e,v4e]},Hat={version:kbe,moduleName:wr.ServerSideRowModelModule,dependantModules:[zat,y9i]},O3=(()=>{let t=class{};return t.SELECT_ALL="__AG_SELECT_ALL__",t.ADD_SELECTION_TO_FILTER="__AG_ADD_SELECTION_TO_FILTER__",t})(),_9i={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},C9i=class extends ai{constructor(t){super(t.isGroup?`
            <div class="ag-set-filter-item" aria-hidden="true">
                <span class="ag-set-filter-group-icons">
                    <span class="ag-set-filter-group-closed-icon" data-ref="eGroupClosedIcon"></span>
                    <span class="ag-set-filter-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
                    <span class="ag-set-filter-group-indeterminate-icon" data-ref="eGroupIndeterminateIcon"></span>
                </span>
                <ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>
            </div>`:`
            <div class="ag-set-filter-item">
                <ag-checkbox data-ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>
            </div>`,[d1]),this.eCheckbox=Bt,this.eGroupOpenedIcon=Bt,this.eGroupClosedIcon=Bt,this.eGroupIndeterminateIcon=Bt,this.focusWrapper=t.focusWrapper,this.value=t.value,this.params=t.params,this.translate=t.translate,this.valueFormatter=t.valueFormatter,this.item=t.item,this.isSelected=t.isSelected,this.isTree=t.isTree,this.depth=t.depth??0,this.isGroup=t.isGroup,this.groupsExist=t.groupsExist,this.isExpanded=t.isExpanded,this.hasIndeterminateExpandState=t.hasIndeterminateExpandState}wireBeans(t){this.valueService=t.valueService,this.userComponentFactory=t.userComponentFactory}postConstruct(){this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),C5(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),!this.params.readOnly&&this.eCheckbox.onValueChange(t=>this.onCheckboxChanged(!!t))}getFocusableElement(){return this.focusWrapper}setupExpansion(){this.eGroupClosedIcon.appendChild($y("setFilterGroupClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild($y("setFilterGroupOpen",this.gos,null));let t=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:t}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:t}),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild($y("setFilterGroupIndeterminate",this.gos,null)),this.addManagedElementListeners(this.eGroupIndeterminateIcon,{click:t})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(t,e){if(this.isGroup&&t!==this.isExpanded){this.isExpanded=t;let n={type:"expandedChanged",isExpanded:!!t,item:this.item};e||this.dispatchLocalEvent(n),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){Vn(this.eGroupClosedIcon,this.hasIndeterminateExpandState?this.isExpanded===!1:!this.isExpanded),Vn(this.eGroupOpenedIcon,this.isExpanded===!0),this.hasIndeterminateExpandState&&Vn(this.eGroupIndeterminateIcon,this.isExpanded===void 0)}onCheckboxChanged(t){this.isSelected=t;let e={type:"selectionChanged",isSelected:t,item:this.item};this.dispatchLocalEvent(e),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(t,e){this.isSelected=t,this.eCheckbox.setValue(t,e),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;let t=this.localeService.getLocaleTextFunc(),e=this.eCheckbox.getValue(),n=e===void 0?t("ariaIndeterminate","indeterminate"):e?t("ariaVisible","visible"):t("ariaHidden","hidden"),i=t("ariaToggleVisibility","Press SPACE to toggle visibility");jy(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${i} (${n})`)}setupFixedAriaLabels(t){if(!this.isTree)return;let n=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();hl(i,`${t} ${n}`),D7(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){let t=this.getAriaElement();lGe(t,this.eCheckbox.getValue())}refreshAriaExpanded(){ip(this.getAriaElement(),!!this.isExpanded)}refresh(t,e,n){if(this.item=t,e!==this.isSelected&&this.setSelected(e,!0),this.setExpanded(n,!0),this.valueFunction){let i=this.valueFunction();this.setTooltipAndCellRendererParams(i,i),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}if(this.cellRendererComponent&&!this.cellRendererComponent.refresh?.(this.cellRendererParams)){let r=this.cellRendererComponent;this.renderCell(),this.destroyBean(r)}}render(){let{params:{column:t}}=this,{value:e}=this,n=null;typeof e=="function"?(this.valueFunction=e,n=this.valueFunction(),e=n):this.isTree?n=G1(e):n=this.getFormattedValue(t,e),this.setTooltipAndCellRendererParams(e,n),this.renderCell()}setTooltipAndCellRendererParams(t,e){let n=this.gos.get("tooltipShowMode")==="whenTruncated";if(this.params.showTooltips&&(!n||!this.params.cellRenderer)){let i=e??G1(t),r;n&&(r=()=>{let s=this.eCheckbox.getGui().querySelector(".ag-label");return s?s.scrollWidth>s.clientWidth:!0}),this.setTooltip({newTooltipText:i,location:"setFilterValue",getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,shouldDisplayTooltip:r})}this.cellRendererParams=this.gos.addGridCommonParams({value:t,valueFormatted:e,colDef:this.params.colDef,column:this.params.column,setTooltip:(i,r)=>{this.setTooltip({newTooltipText:i,getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,location:"setFilterValue",shouldDisplayTooltip:r})}})}getTooltipParams(){let t=super.getTooltipParams();return t.location="setFilterValue",t.colDef=this.getComponentHolder(),this.isTree&&(t.level=this.depth),t}getFormattedValue(t,e){return this.valueService.formatValue(t,null,e,this.valueFormatter,!1)}renderCell(){let t=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),e=t?t.newAgStackInstance():void 0;if(e==null){this.renderCellWithoutCellRenderer();return}e.then(n=>{n&&(this.cellRendererComponent=n,this.eCheckbox.setLabel(n.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(n))})}renderCellWithoutCellRenderer(){let t=(this.cellRendererParams.valueFormatted==null?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)??this.translate("blanks");typeof t!="string"&&(wt(`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects. See ${this.getFrameworkOverrides().getDocLink("filter-set-filter-list/#filter-value-types")}`),t=""),this.eCheckbox.setLabel(t),this.setupFixedAriaLabels(t)}getComponentHolder(){return this.params.column.getColDef()}},Gat=class{getModelAsString(t,e){let{values:n}=t||e.getModel()||{},i=e.getValueModel();if(n==null||i==null)return"";let r=n.filter(a=>i.isKeyAvailable(a)),s=r.length,o=r.slice(0,10).map(a=>e.getFormattedValue(a));return`(${s}) ${o.join(",")}${s>10?",...":""}`}};x9i=class{constructor(t,e,n,i,r,s,o,a,l,c,d){this.rowModel=t,this.filterParams=e,this.createKey=n,this.caseFormat=i,this.funcColsService=r,this.valueService=s,this.treeDataOrGrouping=o,this.treeData=a,this.getDataPath=l,this.groupAllowUnbalanced=c,this.addManagedEventListeners=d}extractUniqueValuesAsync(t,e){return new io(n=>{if(this.rowModel.isRowDataLoaded())n(this.extractUniqueValues(t,e));else{let[i]=this.addManagedEventListeners({rowCountReady:()=>{i?.(),n(this.extractUniqueValues(t,e))}})}})}extractUniqueValues(t,e){let n=new Map,i=this.extractExistingFormattedKeys(e),r=new Set,s=this.treeData&&!!this.getDataPath,o=this.funcColsService.getRowGroupColumns(),a=(l,c)=>{let d=this.caseFormat(l);if(!r.has(d)){r.add(d);let u=l,m=xu(c),f=i?.get(d);f!=null&&(u=f,m=e.get(f)),n.set(u,m)}};return this.rowModel.forEachLeafNode(l=>{if(!l.data||!t(l))return;if(this.treeDataOrGrouping){this.addValueForTreeDataOrGrouping(l,s,o,a);return}let c=this.getValue(l);c!=null&&Array.isArray(c)?(c.forEach(d=>{a(this.createKey(d,l),d)}),c.length===0&&a(null,null)):a(this.createKey(c,l),c)}),n}addValueForTreeDataOrGrouping(t,e,n,i){let r;if(e){if(t.childrenAfterGroup?.length)return;r=this.getDataPath(t.data)}else r=n.map(o=>this.valueService.getKeyForNode(o,t)),r.push(this.getValue(t));let s=Zxe(r,e,this.groupAllowUnbalanced);i(this.createKey(s),s)}getValue(t){return this.filterParams.getValue(t)}extractExistingFormattedKeys(t){if(!t)return null;let e=new Map;return t.forEach((n,i)=>{e.set(this.caseFormat(i),i)}),e}},b9i=class{constructor({caseFormat:t}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=t}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}noAppliedFilteringKeys(){return this.hasNoAppliedFilteringKeys}setFilteringKeys(t){this.filteringKeys=new Set(t),this.hasNoAppliedFilteringKeys=!this.filteringKeys||this.filteringKeys.size===0,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(e=>this.filteringKeysCaseFormatted.add(this.caseFormat(e)))}addFilteringKey(t){this.filteringKeys==null&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(t),this.filteringKeysCaseFormatted.add(this.caseFormat(t)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(t){return this.filteringKeysCaseFormatted.has(this.caseFormat(t))}hasFilteringKey(t){return this.filteringKeys.has(t)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},w9i=class{constructor(t,e,n,i){this.valueService=t,this.valueFormatter=e,this.formatter=n,this.column=i,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(t,e,n){this.displayedKeys=Array.from(n)}updateDisplayedValuesToMatchMiniFilter(t,e,n,i,r){this.displayedKeys=[];for(let s of n)if(s==null)r&&this.displayedKeys.push(s);else{let o=t(s),a=this.valueService.formatValue(this.column,null,o,this.valueFormatter,!1),l=this.formatter(a);i(l)&&this.displayedKeys.push(s)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(t){return this.displayedKeys[t]}getSelectAllItem(){return O3.SELECT_ALL}getAddSelectionToFilterItem(){return O3.ADD_SELECTION_TO_FILTER}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(t){this.displayedKeys.forEach(t)}someDisplayedKey(t){return this.displayedKeys.some(t)}hasGroups(){return!1}refresh(){}},S9i=t=>t?[String(t.getFullYear()),String(t.getMonth()+1),String(t.getDate())]:null,T9i=class{constructor(t,e,n,i){this.formatter=t,this.treeListPathGetter=e,this.treeListFormatter=n,this.treeDataOrGrouping=i,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:O3.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:O3.SELECT_ALL,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:O3.ADD_SELECTION_TO_FILTER,expanded:!0,key:O3.ADD_SELECTION_TO_FILTER,parentTreeKeys:[]}}updateDisplayedValuesToAllAvailable(t,e,n,i){i==="reload"?this.generateItemTree(t,e,n):i==="otherFilter"?(this.updateAvailable(n),this.updateExpandAll()):i==="miniFilter"&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(t,e,n,i,r,s){s==="reload"?this.generateItemTree(t,e,n):s==="otherFilter"&&this.updateAvailable(n),this.updateFilter(i,r),this.updateExpandAll(),this.flattenItems()}generateItemTree(t,e,n){this.allDisplayedItemsTree=[],this.groupsExist=!1;let i=this.getTreeListPathGetter(t,n);for(let r of e){let s=t(r),o=i(s)??[null];o.length>1&&(this.groupsExist=!0);let a=n.has(r),l=this.allDisplayedItemsTree,c,d=[];o.forEach((u,m)=>{l||(l=[],c.children=l),c=l.find(f=>f.treeKey?.toUpperCase()===u?.toUpperCase()),c||(c={treeKey:u,depth:m,filterPasses:!0,expanded:!1,available:a,parentTreeKeys:d},m===o.length-1&&(c.key=r),l.push(c)),l=c.children,d=[...d,u]})}this.updateAvailable(n),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(t,e){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return i=>i;let n=!1;for(let i of e){let r=t(i);if(r instanceof Date){n=!0;break}else if(r!=null)break}return n?S9i:(wt("property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date."),i=>[String(i)])}flattenItems(){this.activeDisplayedItemsFlat=[];let t=e=>{e.forEach(n=>{!n.filterPasses||!n.available||(this.activeDisplayedItemsFlat.push(n),n.children&&n.expanded&&t(n.children))})};t(this.allDisplayedItemsTree)}resetFilter(){let t=e=>{e.children&&e.children.forEach(n=>{t(n)}),e.filterPasses=!0};this.allDisplayedItemsTree.forEach(e=>t(e))}updateFilter(t,e){let n=i=>i.available?i.treeKey==null?e:t(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)):!1;this.allDisplayedItemsTree.forEach(i=>this.recursiveItemCheck(i,!1,n,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(t){return this.activeDisplayedItemsFlat[t]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){let t=[];return this.forEachDisplayedKey(e=>t.push(e)),t}forEachDisplayedKey(t){let e=(n,i)=>{n.children?(!n.expanded||!i)&&n.children.forEach(r=>{r.filterPasses&&e(r,!1)}):t(n.key)};this.activeDisplayedItemsFlat.forEach(n=>e(n,!0))}someDisplayedKey(t){let e=(n,i)=>{if(n.children){if(!n.expanded||!i)return n.children.some(r=>r.filterPasses?e(r,!1):!1)}else return t(n.key);return!1};return this.activeDisplayedItemsFlat.some(n=>e(n,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){let t=(n,i,r)=>{for(let s of n){if(!s.filterPasses||!s.available||!s.children)continue;if(i=i||!!s.expanded,r=r||!s.expanded,i&&r)return;let o=t(s.children,i,r);if(o===void 0)return;o?i=!0:r=!0}return i&&r?void 0:i},e=this.getSelectAllItem();e.expanded=t(e.children,!1,!1)}recursiveItemCheck(t,e,n,i){let r=!1;t.children&&t.children.forEach(o=>{let a=this.recursiveItemCheck(o,e||n(t),n,i);r=r||a});let s=e||r||n(t);return t[i]=s,s}updateAvailable(t){let e=n=>t.has(n.key);this.allDisplayedItemsTree.forEach(n=>this.recursiveItemCheck(n,!1,e,"available"))}},D9i=class{constructor(t){this.localEventService=new y5,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;let{usingComplexObjects:e,funcColsService:n,valueService:i,treeDataTreeList:r,groupingTreeList:s,filterParams:o,gos:a,valueFormatter:l,addManagedEventListeners:c}=t,{column:d,colDef:u,textFormatter:m,doesRowPassOtherFilter:f,suppressSorting:_,comparator:x,rowModel:D,values:E,caseSensitive:M,treeList:I,treeListPathGetter:z,treeListFormatter:G}=o;this.filterParams=o,this.gos=a,this.setIsLoading=t.setIsLoading,this.translate=t.translate,this.caseFormat=t.caseFormat,this.createKey=t.createKey,this.usingComplexObjects=!!t.usingComplexObjects,this.formatter=m??(pe=>pe??null),this.doesRowPassOtherFilters=f,this.suppressSorting=_||!1,this.filteringKeys=new b9i({caseFormat:this.caseFormat});let A=x??u.comparator,Y=!!r||!!s;this.compareByValue=!!(e&&A||Y||I&&!z),Y&&!A?this.entryComparator=this.createTreeDataOrGroupingComparator():I&&!z&&!A?this.entryComparator=([pe,ce],[ie,le])=>UB(ce,le):this.entryComparator=([pe,ce],[ie,le])=>A(ce,le),this.keyComparator=A??UB,this.caseSensitive=!!M;let X=a.get("getDataPath"),ne=a.get("groupAllowUnbalanced");D.getType()==="clientSide"&&(this.clientSideValuesExtractor=new x9i(D,this.filterParams,this.createKey,this.caseFormat,n,i,Y,!!r,X,ne,c)),E==null?this.valuesType=2:(this.valuesType=Array.isArray(E)?0:1,this.providedValues=E),this.displayValueModel=I?new T9i(this.formatter,z,G,r||s):new w9i(i,l,this.formatter,d),this.updateAllValues().then(pe=>this.resetSelectionState(pe||[]))}addEventListener(t,e,n){this.localEventService.addEventListener(t,e,n)}removeEventListener(t,e,n){this.localEventService.removeEventListener(t,e,n)}updateOnParamsChange(t){return new io(e=>{let{values:n,textFormatter:i,suppressSorting:r}=t,s=this.providedValues,o=this.suppressSorting;if(this.filterParams=t,this.formatter=i??(a=>a??null),this.suppressSorting=r||!1,this.providedValues=n??null,this.providedValues!==s||this.suppressSorting!==o){!n||n.length===0?(this.valuesType=2,this.providedValues=null):this.valuesType=Array.isArray(n)?0:1;let a=this.getModel();this.updateAllValues().then(()=>{this.setModel(a).then(()=>e())})}else e()})}refreshValues(){return new io(t=>{this.allValuesPromise.then(()=>{let e=this.getModel();this.updateAllValues(),this.setModel(e).then(()=>t())})})}overrideValues(t){return new io(e=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=t,this.refreshValues().then(()=>e())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(t=>(this.updateAvailableKeys(t??[],"otherFilter"),!0)):io.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new io(t=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(e=>t(this.processAllValues(e)));break;case 0:{t(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break}case 1:{this.setIsLoading(!0);let e=this.providedValues,{column:n,colDef:i}=this.filterParams,r=this.gos.addGridCommonParams({success:s=>{this.setIsLoading(!1),t(this.processAllValues(this.uniqueValues(this.validateProvidedValues(s))))},colDef:i,column:n});window.setTimeout(()=>e(r),0);break}default:throw new Error("Unrecognised valuesType")}}),this.allValuesPromise.then(t=>this.updateAvailableKeys(t||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(t){let e=this.sortKeys(t);return this.allValues=t??new Map,e}validateProvidedValues(t){if(this.usingComplexObjects&&t?.length){let e=t[0];e&&typeof e!="object"&&typeof e!="function"&&(this.createKey(e)==null?wt("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types"):wt("Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?"))}return t}setValuesType(t){this.valuesType=t}getValuesType(){return this.valuesType}isKeyAvailable(t){return this.availableKeys.has(t)}showAvailableOnly(){return this.valuesType===2}updateAvailableKeys(t,e){let n=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):t;this.availableKeys=new Set(n),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(e,t)}sortKeys(t){let e=t??new Map;if(this.suppressSorting)return Array.from(e.keys());let n;return this.compareByValue?n=Array.from(e.entries()).sort(this.entryComparator).map(([i])=>i):n=Array.from(e.keys()).sort(this.keyComparator),this.filterParams.excelMode&&e.has(null)&&(n=n.filter(i=>i!=null),n.push(null)),n}getParamsForValuesFromRows(t=!1){if(!this.clientSideValuesExtractor)return Do("Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values"),null;let e=i=>!t||this.doesRowPassOtherFilters(i),n=t&&!this.caseSensitive?this.allValues:void 0;return{predicate:e,existingValues:n}}getValuesFromRows(t=!1){let e=this.getParamsForValuesFromRows(t);return e?this.clientSideValuesExtractor.extractUniqueValues(e.predicate,e.existingValues):null}getValuesFromRowsAsync(t=!1){let e=this.getParamsForValuesFromRows(t);return e?this.clientSideValuesExtractor.extractUniqueValuesAsync(e.predicate,e.existingValues):io.resolve(null)}setMiniFilter(t){return t=xu(t),this.miniFilterText===t?!1:(t===null&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=t,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(t,e){if(t==="expansion"){this.displayValueModel.refresh();return}if(this.miniFilterText==null){this.displayValueModel.updateDisplayedValuesToAllAvailable(s=>this.getValue(s),e,this.availableKeys,t);return}let n=this.caseFormat(this.formatter(this.miniFilterText)||""),i=s=>s!=null&&this.caseFormat(s).indexOf(n)>=0,r=!!this.filterParams.excelMode&&i(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(s=>this.getValue(s),e,this.availableKeys,i,r,t)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(t){return this.displayValueModel.getDisplayedItem(t)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(t){return this.allValues.get(t)}setAddCurrentSelectionToFilter(t){this.addCurrentSelectionToFilter=t}isInWindowsExcelMode(){return this.filterParams.excelMode==="windows"}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&Di(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(t=!1){this.miniFilterText==null?this.selectedKeys=new Set(this.allValues.keys()):(t&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.add(e)))}deselectAllMatchingMiniFilter(){this.miniFilterText==null?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(t=>this.selectedKeys.delete(t))}selectKey(t){this.selectedKeys.add(t)}deselectKey(t){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(t)}isKeySelected(t){return this.selectedKeys.has(t)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(t=>!this.isKeySelected(t))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(t=>this.isKeySelected(t))}getModel(){if(!this.hasSelections())return null;let t=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(t&&t.size>0){if(this.selectedKeys){let e=new Set([...Array.from(t),...Array.from(this.selectedKeys).filter(n=>!t.has(n))]);return Array.from(e)}return Array.from(t)}return Array.from(this.selectedKeys)}setModel(t){return this.allValuesPromise.then(e=>{if(t==null)this.resetSelectionState(e??[]);else{this.selectedKeys.clear();let n=new Map;this.allValues.forEach((i,r)=>{n.set(this.caseFormat(r),r)}),t.forEach(i=>{let r=this.caseFormat(xu(i)),s=n.get(r);s!==void 0&&this.selectKey(s)})}})}uniqueValues(t){let e=new Map,n=new Set;return(t??[]).forEach(i=>{let r=xu(i),s=this.createKey(r),o=this.caseFormat(s);n.has(o)||(n.add(o),e.set(s,r))}),e}resetSelectionState(t){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(t)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([t,e],[n,i])=>{if(e==null)return i==null?0:-1;if(i==null)return 1;for(let r=0;r<e.length;r++){if(r>=i.length)return 1;let s=UB(e[r],i[r]);if(s!==0)return s}return 0}}setAppliedModelKeys(t){this.filteringKeys.setFilteringKeys(t)}addToAppliedModelKeys(t){this.filteringKeys.addFilteringKey(t)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(t){return this.filteringKeys.hasCaseFormattedFilteringKey(t)}hasAnyAppliedModelKey(){return!this.filteringKeys.noAppliedFilteringKeys()}},Ibe=class extends EA{constructor(){super("setFilter"),this.eMiniFilter=Bt,this.eFilterLoading=Bt,this.eSetFilterList=Bt,this.eFilterNoMatches=Bt,this.valueModel=null,this.setFilterParams=null,this.virtualList=null,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new Gat,this.updateSetFilterOnParamsChange=t=>{this.setFilterParams=t,this.caseSensitive=!!t.caseSensitive;let e=t.keyCreator??t.colDef.keyCreator;this.setValueFormatter(t.valueFormatter,e,!!t.treeList,!!t.colDef.refData);let n=t.column.getId().startsWith(Xv);this.treeDataTreeList=this.gos.get("treeData")&&!!t.treeList&&n,this.getDataPath=this.gos.get("getDataPath"),this.groupingTreeList=!!this.funcColsService.getRowGroupColumns().length&&!!t.treeList&&n,this.createKey=this.generateCreateKey(e,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(t){super.wireBeans(t),this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.dataTypeService=t.dataTypeService}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return`
            <div class="ag-set-filter">
                <div data-ref="eFilterLoading" class="ag-filter-loading ag-hidden">${this.translateForSetFilter("loadingOoo")}</div>
                <ag-input-text-field class="ag-mini-filter" data-ref="eMiniFilter"></ag-input-text-field>
                <div data-ref="eFilterNoMatches" class="ag-filter-no-matches ag-hidden">${this.translateForSetFilter("noMatches")}</div>
                <div data-ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>
            </div>`}getAgComponents(){return[xf]}handleKeyDown(t){if(super.handleKeyDown(t),!t.defaultPrevented)switch(t.key){case It.SPACE:this.handleKeySpace(t);break;case It.ENTER:this.handleKeyEnter(t);break;case It.LEFT:this.handleKeyLeft(t);break;case It.RIGHT:this.handleKeyRight(t);break}}handleKeySpace(t){this.getComponentForKeyEvent(t)?.toggleSelected()}handleKeyEnter(t){if(!this.setFilterParams)return;let{excelMode:e,readOnly:n}=this.setFilterParams||{};!e||n||(t.preventDefault(),this.onBtApply(!1,!1,t),this.setFilterParams.excelMode==="mac"&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(t){this.getComponentForKeyEvent(t)?.setExpanded(!1)}handleKeyRight(t){this.getComponentForKeyEvent(t)?.setExpanded(!0)}getComponentForKeyEvent(t){if(!this.eSetFilterList.contains(this.gos.getActiveDomElement())||!this.virtualList)return;let e=this.virtualList.getLastFocusedRow();if(e==null)return;let n=this.virtualList.getComponentAt(e);if(n==null)return;t.preventDefault();let{readOnly:i}=this.setFilterParams??{};if(!i)return n}getCssIdentifier(){return"set-filter"}setModel(t){return t==null&&this.valueModel?.getModel()==null?(this.setMiniFilter(null),io.resolve()):super.setModel(t)}refresh(t){return this.applyExcelModeOptions(t),!super.refresh(t)||["treeList","treeListFormatter","treeListPathGetter","caseSensitive","comparator","suppressSelectAll","excelMode"].some(n=>t[n]!==this.setFilterParams?.[n])||this.haveColDefParamsChanged(t)?!1:(super.updateParams(t),this.updateSetFilterOnParamsChange(t),this.updateMiniFilter(),(t.cellRenderer!==this.setFilterParams?.cellRenderer||t.valueFormatter!==this.setFilterParams?.valueFormatter)&&this.checkAndRefreshVirtualList(),this.valueModel?.updateOnParamsChange(t).then(()=>{this.refreshFilterValues()}),!0)}haveColDefParamsChanged(t){let{colDef:e,keyCreator:n}=t,{colDef:i,keyCreator:r}=this.setFilterParams??{},s=n??e.keyCreator;return e.filterValueGetter!==i?.filterValueGetter||s!==(r??i?.keyCreator)||!!this.dataTypeService&&this.dataTypeService.getFormatValue(e.cellDataType)===s&&e.valueFormatter!==i?.valueFormatter}setModelAndRefresh(t){return this.valueModel?this.valueModel.setModel(t).then(()=>this.checkAndRefreshVirtualList()):io.resolve()}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(t){this.setMiniFilter(null);let e=t==null?null:t.values;return this.setModelAndRefresh(e)}getModelFromUi(){if(!this.valueModel)throw new Error("Value model has not been created.");let t=this.valueModel.getModel();return t?{values:t,filterType:this.getFilterType()}:null}getFilterType(){return"set"}getValueModel(){return this.valueModel}areModelsEqual(t,e){return t==null&&e==null?!0:t!=null&&e!=null&&Cf(t.values,e.values)}setParams(t){this.applyExcelModeOptions(t),super.setParams(t),this.updateSetFilterOnParamsChange(t);let e=t.keyCreator??t.colDef.keyCreator;this.valueModel=new D9i({filterParams:t,setIsLoading:n=>this.setIsLoading(n),translate:n=>this.translateForSetFilter(n),caseFormat:n=>this.caseFormat(n),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!e,gos:this.gos,funcColsService:this.funcColsService,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:n=>this.addManagedEventListeners(n)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(t){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setAddCurrentSelectionToFilter(t)}setValueFormatter(t,e,n,i){let r=t;if(!r){if(e&&!n)throw new Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator");this.noValueFormatterSupplied=!0,i||(r=s=>G1(s.value))}this.valueFormatter=r}generateCreateKey(t,e){if(e&&!t)throw new Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return t?(n,i=null)=>{let r=this.getKeyCreatorParams(n,i);return xu(t(r))}:n=>xu(G1(n))}getFormattedValue(t){let e=this.valueModel.getValue(t);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(e)&&(e=Ar(e));let n=this.valueService.formatValue(this.setFilterParams.column,null,e,this.valueFormatter,!1);return n??G1(e)??this.translateForSetFilter("blanks")}applyExcelModeOptions(t){t.excelMode==="windows"?(t.buttons||(t.buttons=["apply","cancel"]),t.closeOnApply==null&&(t.closeOnApply=!0)):t.excelMode==="mac"&&(t.buttons||(t.buttons=["reset"]),t.applyMiniFilterWhileTyping==null&&(t.applyMiniFilterWhileTyping=!0),t.debounceMs==null&&(t.debounceMs=500)),t.excelMode&&t.defaultToNothingSelected&&(t.defaultToNothingSelected=!1,wt('The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.'))}addEventListenersForDataChanges(){this.isValuesTakenFromGrid()&&(this.addManagedEventListeners({cellValueChanged:t=>{this.setFilterParams&&t.column===this.setFilterParams.column&&this.syncAfterDataChange()}}),this.addManagedPropertyListeners(["treeData","getDataPath","groupAllowUnbalanced"],()=>{this.syncAfterDataChange()}))}syncAfterDataChange(){if(!this.valueModel)throw new Error("Value model has not been created.");return this.valueModel.refreshValues().then(()=>{this.checkAndRefreshVirtualList(),(!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi()))&&this.onBtApply(!1,!0)})}setIsLoading(t){Vn(this.eFilterLoading,t),t||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter()}initVirtualList(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");let e=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),n=!!this.setFilterParams.treeList,i=this.virtualList=this.createBean(new YE({cssIdentifier:"filter",ariaRole:n?"tree":"listbox",listName:e})),r=this.eSetFilterList;n&&r.classList.add("ag-set-filter-tree-list"),r&&r.appendChild(i.getGui());let{cellHeight:s}=this.setFilterParams;s!=null&&i.setRowHeight(s);let o=(c,d)=>this.createSetListItem(c,n,d);i.setComponentCreator(o);let a=(c,d)=>this.updateSetListItem(c,d);i.setComponentUpdater(a);let l;this.setFilterParams.suppressSelectAll?l=new E9i(this.valueModel):l=new M9i(this.valueModel,()=>this.isSelectAllSelected()),n&&(l=new k9i(l)),i.setModel(l)}getSelectAllLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");let t=this.valueModel.getMiniFilter()==null||!this.setFilterParams.excelMode?"selectAll":"selectAllSearchResults";return this.translateForSetFilter(t)}getAddSelectionToFilterLabel(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(t,e,n){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");let i=this.valueModel.hasGroups(),{isSelected:r,isExpanded:s}=this.isSelectedExpanded(t),{value:o,depth:a,isGroup:l,hasIndeterminateExpandState:c,selectedListener:d,expandedListener:u}=this.newSetListItemAttributes(t),m={focusWrapper:n,value:o,params:this.setFilterParams,translate:_=>this.translateForSetFilter(_),valueFormatter:this.valueFormatter,item:t,isSelected:r,isTree:e,depth:a,groupsExist:i,isGroup:l,isExpanded:s,hasIndeterminateExpandState:c},f=this.createBean(new C9i(m));return f.addEventListener("selectionChanged",d),u&&f.addEventListener("expandedChanged",u),f}newSetTreeItemAttributes(t){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");let e=this.valueModel.hasGroups();return t.key===O3.SELECT_ALL?{value:()=>this.getSelectAllLabel(),isGroup:e,depth:t.depth,hasIndeterminateExpandState:!0,selectedListener:n=>this.onSelectAll(n.isSelected),expandedListener:n=>this.onExpandAll(n.item,n.isExpanded)}:t.key===O3.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),depth:t.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:n=>{this.onAddCurrentSelectionToFilterChange(n.isSelected)}}:t.children?{value:this.setFilterParams.treeListFormatter?.(t.treeKey,t.depth,t.parentTreeKeys)??t.treeKey,depth:t.depth,isGroup:!0,selectedListener:n=>this.onGroupItemSelected(n.item,n.isSelected),expandedListener:n=>this.onExpandedChanged(n.item,n.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(t.treeKey,t.depth,t.parentTreeKeys)??t.treeKey,depth:t.depth,selectedListener:n=>this.onItemSelected(n.item.key,n.isSelected)}}newSetListItemAttributes(t){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");return this.isSetFilterModelTreeItem(t)?this.newSetTreeItemAttributes(t):t===O3.SELECT_ALL?{value:()=>this.getSelectAllLabel(),selectedListener:e=>this.onSelectAll(e.isSelected)}:t===O3.ADD_SELECTION_TO_FILTER?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:e=>{this.onAddCurrentSelectionToFilterChange(e.isSelected)}}:{value:this.valueModel.getValue(t),selectedListener:e=>this.onItemSelected(e.item,e.isSelected)}}updateSetListItem(t,e){let{isSelected:n,isExpanded:i}=this.isSelectedExpanded(t);e.refresh(t,n,i)}isSelectedExpanded(t){let e,n;return this.isSetFilterModelTreeItem(t)?(n=t.expanded,t.key===O3.SELECT_ALL?e=this.isSelectAllSelected():t.key===O3.ADD_SELECTION_TO_FILTER?e=this.valueModel.isAddCurrentSelectionToFilterChecked():t.children?e=this.areAllChildrenSelected(t):e=this.valueModel.isKeySelected(t.key)):t===O3.SELECT_ALL?e=this.isSelectAllSelected():t===O3.ADD_SELECTION_TO_FILTER?e=this.valueModel.isAddCurrentSelectionToFilterChecked():e=this.valueModel.isKeySelected(t),{isSelected:e,isExpanded:n}}isSetFilterModelTreeItem(t){return t?.treeKey!==void 0}initMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");let{eMiniFilter:t,localeService:e}=this,n=e.getLocaleTextFunc();t.setDisplayed(!this.setFilterParams.suppressMiniFilter),t.setValue(this.valueModel.getMiniFilter()),t.onValueChange(()=>this.onMiniFilterInput()),t.setInputAriaLabel(n("ariaSearchFilterValues","Search filter values")),this.addManagedElementListeners(t.getInputElement(),{keydown:i=>this.onMiniFilterKeyDown(i)})}updateMiniFilter(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");let{eMiniFilter:t}=this;t.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&t.setDisplayed(!this.setFilterParams.suppressMiniFilter);let e=this.valueModel.getMiniFilter();t.getValue()!==e&&t.setValue(e)}afterGuiAttached(t){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");super.afterGuiAttached(t),this.resetExpansion(),this.refreshVirtualList();let{eMiniFilter:e}=this;e.setInputPlaceholder(this.translateForSetFilter("searchOoo")),(!t||!t.suppressFocus)&&(e.isDisplayed()?e.getFocusableElement().focus():this.virtualList?.focusRow(0))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams?.excelMode&&this.resetMiniFilter();let t=this.getModel();(this.setFilterParams?.excelMode||!this.areModelsEqual(t,this.getModelFromUi()))&&(this.resetUiToActiveModel(t),this.showOrHideResults())}applyModel(t="api"){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");this.setFilterParams.excelMode&&t!=="rowDataUpdated"&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();let e=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(e&&!this.getModel())return!1;let n=super.applyModel(t),i=this.getModel();return i?(e||this.valueModel.setAppliedModelKeys(new Set),i.values.forEach(r=>{this.valueModel.addToAppliedModelKeys(r)})):e||this.valueModel.setAppliedModelKeys(null),n}isModelValid(t){return this.setFilterParams&&this.setFilterParams.excelMode?t==null||t.values.length>0:!0}doesFilterPass(t){if(!this.setFilterParams||!this.valueModel||!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;let{node:e,data:n}=t;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(e,n);if(this.groupingTreeList)return this.doesFilterPassForGrouping(e);let i=this.getValueFromNode(e);return i!=null&&Array.isArray(i)?i.length===0?this.valueModel.hasAppliedModelKey(null):i.some(r=>this.isInAppliedModel(this.createKey(r,e))):this.isInAppliedModel(this.createKey(i,e))}doesFilterPassForTreeData(t,e){return t.childrenAfterGroup?.length?!1:this.isInAppliedModel(this.createKey(Zxe(this.getDataPath(e),!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(t){let e=this.funcColsService.getRowGroupColumns().map(n=>this.valueService.getKeyForNode(n,t));return e.push(this.getValueFromNode(t)),this.isInAppliedModel(this.createKey(Zxe(e,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(t){return this.valueModel.hasAppliedModelKey(t)}getValueFromNode(t){return this.setFilterParams.getValue(t)}getKeyCreatorParams(t,e=null){return{value:t,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:e,data:e?.data,api:this.setFilterParams.api,context:this.setFilterParams.context}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return this.valueModel?this.valueModel.getValuesType()===2:!1}setFilterValues(t){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.overrideValues(t).then(()=>{this.checkAndRefreshVirtualList(),this.onUiChanged()})}resetFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged()})}onAnyFilterChanged(){setTimeout(()=>{if(this.isAlive()){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.refreshAfterAnyFilterChanged().then(t=>{t&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})}},0)}onMiniFilterInput(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;let{applyMiniFilterWhileTyping:t,readOnly:e}=this.setFilterParams||{};!e&&t?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");let{excelMode:t,readOnly:e}=this.setFilterParams||{};t==null||e?this.checkAndRefreshVirtualList():this.valueModel.getMiniFilter()==null?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){if(!this.valueModel)throw new Error("Value model has not been created.");let t=this.valueModel.getMiniFilter()!=null&&this.valueModel.getDisplayedValueCount()<1;Vn(this.eFilterNoMatches,t),Vn(this.eSetFilterList,!t)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel?.setMiniFilter(null)}resetUiToActiveModel(t,e){this.setModelAndRefresh(t==null?null:t.values).then(()=>{this.onUiChanged(!1,"prevent"),e?.()})}handleCancelEnd(t){this.setMiniFilter(null),super.handleCancelEnd(t)}onMiniFilterKeyDown(t){let{excelMode:e,readOnly:n}=this.setFilterParams||{};t.key===It.ENTER&&!e&&!n&&this.filterOnAllVisibleValues()}filterOnAllVisibleValues(t=!0){let{readOnly:e}=this.setFilterParams||{};if(!this.valueModel)throw new Error("Value model has not been created.");if(e)throw new Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,t?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(t){t!=null&&window.setTimeout(()=>{if(!this.virtualList)throw new Error("Virtual list has not been created.");this.isAlive()&&this.virtualList.focusRow(t)},0)}onSelectAll(t){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");t?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(t,e){let n=i=>{i.children?i.children.forEach(r=>n(r)):this.selectItem(i.key,e)};n(t),this.refreshAfterSelection()}onItemSelected(t,e){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");this.selectItem(t,e),this.refreshAfterSelection()}selectItem(t,e){e?this.valueModel.selectKey(t):this.valueModel.deselectKey(t)}onExpandAll(t,e){let n=i=>{i.filterPasses&&i.available&&i.children&&(i.children.forEach(r=>n(r)),i.expanded=e)};n(t),this.refreshAfterExpansion()}onExpandedChanged(t,e){t.expanded=e,this.refreshAfterExpansion()}refreshAfterExpansion(){let t=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(t)}refreshAfterSelection(){let t=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(t)}setMiniFilter(t){this.eMiniFilter.setValue(t),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel?this.valueModel.getMiniFilter():null}checkAndRefreshVirtualList(){if(!this.virtualList)throw new Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel?this.valueModel.getKeys():[]}getFilterValues(){return this.valueModel?this.valueModel.getValues():[]}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(t){return this.localeService.getLocaleTextFunc()(t,_9i[t])}isSelectAllSelected(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(t){let e=n=>{if(n.children){let i=!1,r=!1;return n.children.some(o=>{if(!o.filterPasses||!o.available)return!1;let a=e(o);return a===void 0?!0:(a?i=!0:r=!0,i&&r)})?void 0:i}else return this.valueModel.isKeySelected(n.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&e(t):e(t)}destroy(){this.virtualList!=null&&(this.virtualList.destroy(),this.virtualList=null),super.destroy()}caseFormat(t){return t==null||typeof t!="string"||this.caseSensitive?t:t.toUpperCase()}resetExpansion(){if(!this.setFilterParams?.treeList)return;let t=this.valueModel?.getSelectAllItem();if(this.isSetFilterModelTreeItem(t)){let e=n=>{n.children&&(n.children.forEach(i=>e(i)),n.expanded=!1)};e(t),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(t){return this.filterModelFormatter.getModelAsString(t,this)}getPositionableElement(){return this.eSetFilterList}},E9i=class{constructor(t){this.model=t}getRowCount(){return this.model.getDisplayedValueCount()}getRow(t){return this.model.getDisplayedItem(t)}areRowsEqual(t,e){return t===e}},M9i=class{constructor(t,e){this.model=t,this.isSelectAllSelected=e}getRowCount(){let e=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+e}getRow(t){if(t===0)return this.model.getSelectAllItem();let e=this.model.showAddCurrentSelectionToFilter(),n=e?2:1;return t===1&&e?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(t-n)}areRowsEqual(t,e){return t===e}},k9i=class{constructor(t){this.model=t}getRowCount(){return this.model.getRowCount()}getRow(t){return this.model.getRow(t)}areRowsEqual(t,e){return t==null&&e==null?!0:t!=null&&e!=null&&t.treeKey===e.treeKey&&t.depth===e.depth}},I9i=class extends ai{constructor(){super(`
            <div class="ag-floating-filter-input ag-set-floating-filter-input" role="presentation">
                <ag-input-text-field data-ref="eFloatingFilterText"></ag-input-text-field>
            </div>`,[xf]),this.eFloatingFilterText=Bt,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new Gat}wireBeans(t){this.columnNameService=t.columnNameService}destroy(){super.destroy()}init(t){this.params=t,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(t)}setParams(t){let e=this.columnNameService.getDisplayNameForColumn(t.column,"header",!0),n=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${e} ${n("ariaFilterInput","Filter Input")}`)}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams(t)}onParentModelChanged(t){this.updateFloatingFilterText(t)}parentSetFilterInstance(t){this.params.parentFilterInstance(e=>{if(!(e instanceof Ibe))throw new Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");t(e)})}addAvailableValuesListener(){this.parentSetFilterInstance(t=>{let e=t.getValueModel();e&&this.addManagedListeners(e,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(t){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(e=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(t,e))})}},Abe="32.1.0",Wat={version:Abe,moduleName:`${wr.SetFilterModule}-core`,userComponents:[{name:"agSetColumnFilter",classImp:Ibe}],dependantModules:[y1,e6]},A9i={version:Abe,moduleName:"@ag-grid-enterprise/set-floating-filter",userComponents:[{name:"agSetColumnFloatingFilter",classImp:I9i}],dependantModules:[Wat,YZ]},Uat={version:Abe,moduleName:wr.SetFilterModule,dependantModules:[Wat,A9i]};P9i=`
.ag-sparkline-tooltip-wrapper {
    position: absolute;
    user-select: none;
    pointer-events: none;
}

.ag-sparkline-tooltip {
    position: relative;
    font: 12px arial,sans-serif;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);
    line-height: 1.7em;
    overflow: hidden;
    white-space: nowrap;
    z-index: 99999;
    background-color: rgb(255, 255, 255);
    color: rgba(0,0,0, 0.67);
}

.ag-sparkline-tooltip-content {
    padding: 0 7px;
    opacity: 1;
}

.ag-sparkline-tooltip-title {
    padding-left: 7px;
    opacity: 1;
}

.ag-sparkline-tooltip-wrapper-hidden {
    top: -10000px !important;
}

.ag-sparkline-wrapper {
    box-sizing: border-box;
    overflow: hidden;
}
`,{extent:R9i,isNumber:iW,isString:F9i,isStringObject:L9i,isDate:$st,createId:O9i,Padding:N9i}=Zl,{LinearScale:Rxe,BandScale:V9i,TimeScale:Kst}=O6,B9i=class{constructor(){this.type="category",this.stroke="rgb(204, 214, 235)",this.strokeWidth=1}},z9i=(()=>{let t=class Xxe{constructor(){this.id=O9i(this),this.seriesRect={x:0,y:0,width:0,height:0},this._context=void 0,this._container=void 0,this._data=void 0,this.padding=new N9i(3),this.xKey="x",this.yKey="y",this.dataType=void 0,this.xData=[],this.yData=[],this.min=void 0,this.max=void 0,this.yScale=new Rxe,this.axis=new B9i,this.highlightStyle={size:6,fill:"yellow",stroke:"silver",strokeWidth:1},this._width=100,this._height=100,this.smallestInterval=void 0,this.layoutId=0,this.defaultDateFormatter=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),this._onMouseMove=this.onMouseMove.bind(this),this._onMouseOut=this.onMouseOut.bind(this);let n=new Wi.Group;this.rootGroup=n;let i=document.createElement("div");i.setAttribute("class","ag-sparkline-wrapper");let r=new Wi.Scene({});this.scene=r,this.canvasElement=r.canvas.element,r.setRoot(n),r.setContainer(i),this.resizeAndSetDimensions(this.width,this.height),Xxe.tooltipDocuments.includes(document)||this.initialiseTooltipStyles(),this.setupDomEventListeners(this.canvasElement)}set context(n){this._context!==n&&(this._context=n)}get context(){return this._context}set container(n){if(this._container!==n){let{parentNode:i}=this.canvasElement;i?.removeChild(this.canvasElement),n&&n.appendChild(this.canvasElement),this._container=n}}get container(){return this._container}set data(n){this._data!==n&&(this._data=n,this.processData(),this.mouseMoveEvent&&this.highlightedDatum&&this.updateHitPoint(this.mouseMoveEvent))}get data(){return this._data}resizeAndSetDimensions(n,i){this.scene.resize(n,i),this.seriesRect.width=n,this.seriesRect.height=i}initialiseTooltipStyles(){let n=document.createElement("style");n.innerHTML=P9i,document.head.insertBefore(n,document.head.querySelector("style")),Xxe.tooltipDocuments.push(document)}set width(n){this._width!==n&&(this._width=n,this.scene.resize(n,this.height),this.scheduleLayout())}get width(){return this._width}set height(n){this._height!==n&&(this._height=n,this.scene.resize(this.width,n),this.scheduleLayout())}get height(){return this._height}update(){}updateYScale(){this.updateYScaleRange(),this.updateYScaleDomain()}updateYScaleDomain(){}updateYScaleRange(){let{yScale:n,seriesRect:i}=this;n.range=[i.height,0]}updateXScale(){let{type:n}=this.axis;this.xScale=this.getXScale(n),this.updateXScaleRange(),this.updateXScaleDomain()}updateXScaleRange(){this.xScale.range=[0,this.seriesRect.width]}updateXScaleDomain(){let{xData:n,xScale:i}=this,r;(i instanceof Rxe||i instanceof Kst)&&(r=R9i(n)),this.xScale.domain=r?r.slice():n}getXScale(n="category"){switch(n){case"number":return new Rxe;case"time":return new Kst;case"category":default:return new V9i}}updateAxisLine(){}updateAxes(){this.updateYScale(),this.updateXScale(),this.updateAxisLine()}updateCrosshairs(){this.updateXCrosshairLine(),this.updateYCrosshairLine()}generateNodeData(){return[]}getNodeData(){return[]}updateNodes(){}updateXCrosshairLine(){}updateYCrosshairLine(){}highlightDatum(n){this.updateNodes()}dehighlightDatum(){this.highlightedDatum=void 0,this.updateNodes(),this.updateCrosshairs()}onMouseMove(n){this.mouseMoveEvent=n,this.updateHitPoint(n)}renderScene(){this.scene.render().catch(n=>Do("chart rendering failed",n))}updateHitPoint(n){let i=this.pickClosestSeriesNodeDatum(n.offsetX,n.offsetY);if(!i)return;let r=this.highlightedDatum;this.highlightedDatum=i,(this.highlightedDatum&&!r||this.highlightedDatum&&r&&this.highlightedDatum!==r)&&(this.highlightDatum(i),this.updateCrosshairs(),this.renderScene()),(this.processedOptions?.tooltip?.enabled??!0)&&this.handleTooltip(n,i)}onMouseOut(n){this.dehighlightDatum(),this.tooltip.toggle(!1),this.renderScene()}processData(){let{data:n,yData:i,xData:r}=this;if(!n||this.invalidData(this.data))return;i.length=0,r.length=0;let s=n.length,o=this.getDataType(n);this.dataType=o;let{type:a}=this.axis,l=a!=="number"&&a!=="time"?"category":a,c=l==="number"||l==="time",d=(m,f)=>{this.smallestInterval==null&&(this.smallestInterval={x:1/0,y:1/0});let{x:_}=this.smallestInterval,x=Math.abs(m-f);x>0&&x<_&&(this.smallestInterval.x=x)},u;if(o==="number")for(let m=0;m<s;m++){let f=m,_=n[m],x=this.getDatum(f,l),D=this.getDatum(_,"number");c&&d(x,u),r.push(x),i.push(D),u=x}else if(o==="array")for(let m=0;m<s;m++){let f=n[m];if(Array.isArray(f)){let _=f[0],x=f[1],D=this.getDatum(_,l),E=this.getDatum(x,"number");if(D==null)continue;c&&d(D,u),r.push(D),i.push(E),u=D}}else if(o==="object"){let{yKey:m,xKey:f}=this;for(let _=0;_<s;_++){let x=n[_];if(typeof x=="object"&&!Array.isArray(x)){let D=x[f],E=x[m],M=this.getDatum(D,l),I=this.getDatum(E,"number");if(M==null)continue;c&&d(M,u),r.push(M),i.push(I),u=M}}}this.updateAxes(),this.immediateLayout()}getDataType(n){for(let i of n)if(i!=null){if(iW(i))return"number";if(Array.isArray(i))return"array";if(typeof i=="object")return"object"}}getDatum(n,i){if(i==="number"&&iW(n)||i==="time"&&(iW(n)||$st(n)))return n;if(i==="category"){if(F9i(n)||$st(n)||iW(n))return{toString:()=>String(n)};if(L9i(n))return n}}get layoutScheduled(){return!!this.layoutId}scheduleLayout(){this.layoutId&&cancelAnimationFrame(this.layoutId),this.layoutId=requestAnimationFrame(()=>{this.immediateLayout(),this.layoutId=0})}immediateLayout(){this.setSparklineDimensions(),!this.invalidData(this.data)&&(this.updateXScaleRange(),this.updateYScaleRange(),this.updateAxisLine(),this.update(),this.renderScene())}setSparklineDimensions(){let{width:n,height:i,padding:r,seriesRect:s,rootGroup:o}=this,a=n-r.left-r.right,l=i-r.top-r.bottom;s.width=a,s.height=l,s.x=r.left,s.y=r.top,o.translationX=s.x,o.translationY=s.y}pickClosestSeriesNodeDatum(n,i){let r=1/0,s,o=this.rootGroup.transformPoint(n,i),a=this.getNodeData();for(let l=0;l<a.length;l++){let c=a[l];if(!c.point)return;let d=this.getDistance(o,c.point);d<=r&&(r=d,s=c)}return s}getDistance(n,i){return Math.abs(n.x-i.x)}handleTooltip(n,i){let{seriesDatum:r}=i,{canvasElement:s}=this,{clientX:o,clientY:a}=n,l=this.processedOptions?.tooltip,c={pageX:o,pageY:a,position:{xOffset:l?.xOffset,yOffset:l?.yOffset},container:l?.container};c.container==null&&(c.container=s);let d=r.y,u=r.x,m=l?.enabled??!0,f=l?.renderer;if(f){let x=f({context:this.context,datum:r,yValue:d,xValue:u});m=typeof x!="string"&&x.enabled!==void 0?x.enabled:m}let _=m&&r.y!==void 0&&this.getTooltipHtml(i);_&&this.tooltip.show(c,_)}formatNumericDatum(n){return String(Math.round(n*10)/10)}formatDatum(n){let i=this.axis.type||"category";return i==="number"&&typeof n=="number"?this.formatNumericDatum(n):i==="time"&&(n instanceof Date||iW(n))?this.defaultDateFormatter.format(n):String(n)}setupDomEventListeners(n){n.addEventListener("mousemove",this._onMouseMove),n.addEventListener("mouseout",this._onMouseOut)}cleanupDomEventListeners(n){n.removeEventListener("mousemove",this._onMouseMove),n.removeEventListener("mouseout",this._onMouseOut)}invalidData(n){return!n||!Array.isArray(n)}destroy(){this.cleanupDomEventListeners(this.canvasElement),this.scene.destroy(),this.container=void 0}};return t.tooltipDocuments=[],t})(),Pbe=z9i;tb="ag-sparkline-tooltip",H9i=class{constructor(){this.created=!1,this.element=document.createElement("div")}isVisible(){let{element:t}=this;if(t.classList)return!t.classList.contains(`${tb}-wrapper-hidden`);let e=t.getAttribute("class");return e?e.split(" ").indexOf(`${tb}-wrapper-hidden`)<0:!1}updateClass(t){this.created||(document.body.appendChild(this.element),this.created=!0);let e=[`${tb}-wrapper`];t!==!0&&e.push(`${tb}-wrapper-hidden`),this.element.setAttribute("class",e.join(" "))}show(t,e){this.toggle(!1);let{element:n}=this;if(e!==void 0)n.innerHTML=e;else if(!n.innerHTML)return;let i=t.position?.xOffset??10,r=t.position?.yOffset??0,s=t.pageX+i,o=t.pageY+r,a=n.getBoundingClientRect(),l=window.innerWidth-a.width;if(t.container){let c=t.container.getBoundingClientRect();l=c.left+(c.width-a.width)}s>l&&(s=t.pageX-n.clientWidth-i),typeof scrollX<"u"&&(s+=scrollX),typeof scrollY<"u"&&(o+=scrollY),n.style.left=`${Math.round(s)}px`,n.style.top=`${Math.round(o)}px`,this.toggle(!0)}toggle(t){this.updateClass(t)}destroy(){let{parentNode:t}=this.element;t&&t.removeChild(this.element)}},{extent:G9i}=Zl,{BandScale:W9i}=O6,U9i=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},j9i=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},$9i=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},K9i=class extends Pbe{constructor(){super(),this.fill="rgba(124, 181, 236, 0.25)",this.strokePath=new Wi.Path,this.fillPath=new Wi.Path,this.xCrosshairLine=new Wi.Line,this.yCrosshairLine=new Wi.Line,this.areaSparklineGroup=new Wi.Group,this.xAxisLine=new Wi.Line,this.markers=new Wi.Group,this.markerSelection=Wi.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new U9i,this.line=new j9i,this.crosshairs=new $9i,this.rootGroup.append(this.areaSparklineGroup),this.xAxisLine.zIndex=500,this.fillPath.zIndex=50,this.strokePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.areaSparklineGroup.append([this.fillPath,this.xAxisLine,this.strokePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}markerFactory(){let{shape:t}=this.marker,e=jat(t);return new e}getNodeData(){return this.markerSelectionData}update(){let t=this.generateNodeData();if(!t)return;let{nodeData:e,fillData:n,strokeData:i}=t;this.markerSelectionData=e,this.updateSelection(e),this.updateNodes(),this.updateStroke(i),this.updateFill(n)}updateYScaleDomain(){let{yData:t,yScale:e}=this,n=G9i(t),i=0,r=1;n!==void 0&&(i=this.min=n[0],r=this.max=n[1]),i=i<0?i:0,r=r<0?0:r,e.domain=[i,r]}generateNodeData(){let{data:t,yData:e,xData:n,xScale:i,yScale:r}=this;if(!t)return;let s=!(i instanceof W9i),o=s?0:i.bandwidth/2,a=e.length,l=[],c=[],d=[],u,m,f,_,x=r.convert(0);for(let D=0;D<a;D++){let E=e[D],M=n[D],I=i.convert(s?i.toDomain(M):M)+o,z=E===void 0?NaN:r.convert(E);D+1<a&&(_=i.convert(s?i.toDomain(n[D+1]):n[D+1])+o),d.push({seriesDatum:{x:M,y:E},point:{x:I,y:z}}),E===void 0&&f!==void 0?(c.push({seriesDatum:void 0,point:{x:f,y:x}}),_!==void 0&&c.push({seriesDatum:void 0,point:{x:_,y:x}})):E!==void 0&&(c.push({seriesDatum:{x:M,y:E},point:{x:I,y:z}}),l.push({seriesDatum:{x:M,y:E},point:{x:I,y:z}}),u=u!==void 0?u:I,m=I),f=I}return c.push({seriesDatum:void 0,point:{x:m,y:x}},{seriesDatum:void 0,point:{x:u,y:x}}),{nodeData:l,fillData:c,strokeData:d}}updateAxisLine(){let{xScale:t,yScale:e,axis:n,xAxisLine:i}=this;i.x1=t.range[0],i.x2=t.range[1],i.y1=i.y2=0,i.stroke=n.stroke,i.strokeWidth=n.strokeWidth;let r=e.convert(0);i.translationY=r}updateSelection(t){this.markerSelection.update(t)}updateNodes(){let{highlightedDatum:t,highlightStyle:e,marker:n}=this,{size:i,fill:r,stroke:s,strokeWidth:o}=e,a=n.formatter;this.markerSelection.each((l,c,d)=>{let{point:u,seriesDatum:m}=c;if(!u)return;let f=c===t,_=f&&r!==void 0?r:n.fill,x=f&&s!==void 0?s:n.stroke,D=f&&o!==void 0?o:n.strokeWidth,E=f&&i!==void 0?i:n.size,M;if(a){let I=d===0,z=d===this.markerSelectionData.length-1,G=m.y===this.min,A=m.y===this.max;M=a({datum:c,xValue:m.x,yValue:m.y,min:G,max:A,first:I,last:z,fill:_,stroke:x,strokeWidth:D,size:E,highlighted:f})}l.size=M&&M.size!=null?M.size:E,l.fill=M&&M.fill!=null?M.fill:_,l.stroke=M&&M.stroke!=null?M.stroke:x,l.strokeWidth=M&&M.strokeWidth!=null?M.strokeWidth:D,l.translationX=u.x,l.translationY=u.y,l.visible=M&&M.enabled!=null?M.enabled:n.enabled&&l.size>0})}updateStroke(t){let{strokePath:e,yData:n,line:i}=this,r=e.path;if(r.clear(),n.length<2)return;let s=t.length,o=!0;for(let a=0;a<s;a++){let{point:l,seriesDatum:c}=t[a],d=l.x,u=l.y;c.y==null?o=!0:o?(r.moveTo(d,u),o=!1):r.lineTo(d,u)}e.lineJoin=e.lineCap="round",e.fill=void 0,e.stroke=i.stroke,e.strokeWidth=i.strokeWidth}updateFill(t){let{fillPath:e,yData:n,fill:i}=this,r=e.path,s=t.length;if(r.clear(),!(n.length<2)){for(let o=0;o<s;o++){let{point:a}=t[o],l=a.x,c=a.y;o>0?r.lineTo(l,c):r.moveTo(l,c)}r.closePath(),e.lineJoin="round",e.stroke=void 0,e.fill=i}}updateXCrosshairLine(){let{yScale:t,xCrosshairLine:e,highlightedDatum:n,crosshairs:{xLine:i}}=this;if(!i.enabled||n==null){e.strokeWidth=0;return}e.y1=t.range[0],e.y2=t.range[1],e.x1=e.x2=0,e.stroke=i.stroke,e.strokeWidth=i.strokeWidth??1,e.lineCap=i.lineCap==="round"||i.lineCap==="square"?i.lineCap:void 0;let{lineDash:r}=i;e.lineDash=Array.isArray(r)?r:gie(e.lineCap,i.lineDash),e.translationX=n.point.x}updateYCrosshairLine(){let{xScale:t,yCrosshairLine:e,highlightedDatum:n,crosshairs:{yLine:i}}=this;if(!i.enabled||n==null){e.strokeWidth=0;return}e.x1=t.range[0],e.x2=t.range[1],e.y1=e.y2=0,e.stroke=i.stroke,e.strokeWidth=i.strokeWidth??1,e.lineCap=i.lineCap==="round"||i.lineCap==="square"?i.lineCap:void 0;let{lineDash:r}=i;e.lineDash=Array.isArray(r)?r:gie(e.lineCap,i.lineDash),e.translationY=n.point.y}getTooltipHtml(t){let{dataType:e}=this,{seriesDatum:n}=t,i=n.y,r=n.x,s=this.formatNumericDatum(i),o=e==="array"||e==="object"?this.formatDatum(r):void 0,a={content:s,title:o},l=this.processedOptions?.tooltip?.renderer;return l?qR(l({context:this.context,datum:n,yValue:i,xValue:r}),a):qR(a)}},Y9i=class{constructor(){this.enabled=!0,this.fontSize=8,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"}},{extent:q9i}=Zl,Z9i=class extends Y9i{constructor(){super(...arguments),this.formatter=void 0,this.placement="insideEnd"}},$at=class extends Pbe{constructor(){super(),this.fill="rgb(124, 181, 236)",this.stroke="silver",this.strokeWidth=0,this.paddingInner=.1,this.paddingOuter=.2,this.valueAxisDomain=void 0,this.formatter=void 0,this.axisLine=new Wi.Line,this.bandWidth=0,this.sparklineGroup=new Wi.Group,this.rectGroup=new Wi.Group,this.labelGroup=new Wi.Group,this.rectSelection=Wi.Selection.select(this.rectGroup,Wi.Rect),this.labelSelection=Wi.Selection.select(this.labelGroup,Wi.Text),this.nodeSelectionData=[],this.label=new Z9i,this.rootGroup.append(this.sparklineGroup),this.rectGroup.zIndex=50,this.axisLine.zIndex=500,this.labelGroup.zIndex=1500,this.sparklineGroup.append([this.rectGroup,this.axisLine,this.labelGroup]),this.axisLine.lineCap="round",this.label.enabled=!1}getNodeData(){return this.nodeSelectionData}update(){this.updateSelections(),this.updateNodes()}updateSelections(){let t=this.generateNodeData();t&&(this.nodeSelectionData=t,this.updateRectSelection(t),this.updateLabelSelection(t))}updateNodes(){this.updateRectNodes(),this.updateLabelNodes()}calculateStep(t){let{xScale:e,paddingInner:n,paddingOuter:i,smallestInterval:r}=this,o=(e.domain[1]-e.domain[0])/(r?.x??1)+1,l=Math.min(o,50),c=l-1;return t/Math.max(1,2*i+c*n+l)}updateYScaleDomain(){let{yScale:t,yData:e,valueAxisDomain:n}=this,i=q9i(e),r=0,s=1;i!==void 0&&(r=this.min=i[0],s=this.max=i[1]),r=r<0?r:0,s=s<0?0:s,n&&(n[1]<s&&(n[1]=s),n[0]>r&&(n[0]=r)),t.domain=n||[r,s]}updateRectSelection(t){this.rectSelection.update(t)}updateRectNodes(){let{highlightedDatum:t,formatter:e,fill:n,stroke:i,strokeWidth:r}=this,{fill:s,stroke:o,strokeWidth:a}=this.highlightStyle;this.rectSelection.each((l,c,d)=>{let u=c===t,m=u&&s!==void 0?s:n,f=u&&o!==void 0?o:i,_=u&&a!==void 0?a:r,x,{x:D,y:E,width:M,height:I,seriesDatum:z}=c;if(e){let G=d===0,A=d===this.nodeSelectionData.length-1,Y=z.y===this.min,X=z.y===this.max;x=e({datum:c,xValue:z.x,yValue:z.y,width:M,height:I,min:Y,max:X,first:G,last:A,fill:m,stroke:f,strokeWidth:_,highlighted:u})}l.fill=x&&x.fill||m,l.stroke=x&&x.stroke||f,l.strokeWidth=x&&x.strokeWidth||_,l.x=l.y=0,l.width=M,l.height=I,l.visible=l.height>0,l.translationX=D,l.translationY=E})}updateLabelSelection(t){this.labelSelection.update(t,e=>{e.tag=1,e.pointerEvents=Wi.PointerEvents.None})}updateLabelNodes(){let{label:{enabled:t,fontStyle:e,fontWeight:n,fontSize:i,fontFamily:r,color:s}}=this;this.labelSelection.each((o,a)=>{let l=a.label;l&&t?(o.fontStyle=e,o.fontWeight=n,o.fontSize=i,o.fontFamily=r,o.textAlign=l.textAlign,o.textBaseline=l.textBaseline,o.text=l.text,o.x=l.x,o.y=l.y,o.fill=s,o.visible=!0):o.visible=!1})}getTooltipHtml(t){let{dataType:e}=this,{seriesDatum:n}=t,i=n.y,r=n.x,s=this.formatNumericDatum(i),o=e==="array"||e==="object"?this.formatDatum(r):void 0,a={content:s,title:o},l=this.processedOptions?.tooltip?.renderer;return l?qR(l({context:this.context,datum:n,yValue:i,xValue:r}),a):qR(a)}formatLabelValue(t){return t%1!==0?t.toFixed(1):t.toFixed(0)}},{isNumber:X9i}=Zl,{BandScale:Yst}=O6,Q9i=class extends $at{updateYScaleRange(){let{seriesRect:t,yScale:e}=this;e.range=[0,t.width]}updateXScaleRange(){let{xScale:t,seriesRect:e,paddingOuter:n,paddingInner:i}=this;if(t instanceof Yst)t.range=[0,e.height],t.paddingInner=i,t.paddingOuter=n;else{let r=this.calculateStep(e.height),s=r*n;this.bandWidth=r*(1-i),t.range=[s,e.height-s-this.bandWidth]}}updateAxisLine(){let{yScale:t,axis:e,axisLine:n,seriesRect:i}=this,{strokeWidth:r}=e;n.x1=0,n.x2=0,n.y1=0,n.y2=i.height,n.stroke=e.stroke,n.strokeWidth=r+(r%2===1?1:0);let s=t.convert(0);n.translationX=s}generateNodeData(){let{data:t,yData:e,xData:n,xScale:i,yScale:r,fill:s,stroke:o,strokeWidth:a,label:l}=this;if(!t)return;let{fontStyle:c,fontWeight:d,fontSize:u,fontFamily:m,color:f,formatter:_,placement:x}=l,D=[],E=r.convert(0),M=!(i instanceof Yst);for(let I=0,z=e.length;I<z;I++){let G=e[I],A=n[I],Y=G===void 0;Y&&(G=0);let X=i.convert(M?i.toDomain(A):A),ne=Math.min(G===void 0?NaN:r.convert(G),E),pe=Math.max(G===void 0?NaN:r.convert(G),E),ce=M?this.bandWidth:i.bandwidth,ie=pe-ne,le={x:E,y:X},Se;_?Se=_({value:G}):Se=G!==void 0&&X9i(G)?this.formatLabelValue(G):"";let je=X+ce/2,ze,Ge="middle",Ae,Ye=G!==void 0&&G>=0,ft=4;if(x==="center")ze=ne+ie/2,Ae="center";else if(x==="outsideEnd")ze=ne+(Ye?ie+ft:-ft),Ae=Ye?"start":"end";else if(x==="insideEnd"){ze=ne+(Ye?ie-ft:ft),Ae=Ye?"end":"start";let Tt=R3.CachedTextMeasurerPool.measureText(Se,{font:m}).width||20,at=E+Tt,yt=E-Tt;(Ye&&ze<at||!Ye&&ze>yt)&&(ze=E+ft*(Ye?1:-1),Ae=Ye?"start":"end")}else ze=E+ft*(Ye?1:-1),Ae=Ye?"start":"end";D.push({x:ne,y:X,width:ie,height:ce,fill:s,stroke:o,strokeWidth:a,seriesDatum:{x:A,y:Y?void 0:G},point:le,label:{x:ze,y:je,text:Se,fontStyle:c,fontWeight:d,fontSize:u,fontFamily:m,textAlign:Ae,textBaseline:Ge,fill:f}})}return D}getDistance(t,e){return Math.abs(t.y-e.y)}},{isNumber:J9i}=Zl,{BandScale:qst}=O6,eTi=class extends $at{updateYScaleRange(){let{seriesRect:t,yScale:e}=this;e.range=[t.height,0]}updateXScaleRange(){let{xScale:t,seriesRect:e,paddingOuter:n,paddingInner:i}=this;if(t instanceof qst)t.range=[0,e.width],t.paddingInner=i,t.paddingOuter=n;else{let r=this.calculateStep(e.width),s=r*n;this.bandWidth=r*(1-i),t.range=[s,e.width-s-this.bandWidth]}}updateAxisLine(){let{yScale:t,axis:e,axisLine:n,seriesRect:i}=this,{strokeWidth:r}=e;n.x1=0,n.x2=i.width,n.y1=0,n.y2=0,n.stroke=e.stroke,n.strokeWidth=r+(r%2===1?1:0);let s=t.convert(0);n.translationY=s}generateNodeData(){let{data:t,yData:e,xData:n,xScale:i,yScale:r,fill:s,stroke:o,strokeWidth:a,label:l}=this;if(!t)return;let{fontStyle:c,fontWeight:d,fontSize:u,fontFamily:m,color:f,formatter:_,placement:x}=l,D=[],E=r.convert(0),M=!(i instanceof qst);for(let I=0,z=e.length;I<z;I++){let G=e[I],A=n[I],Y=G===void 0;Y&&(G=0);let X=Math.min(G===void 0?NaN:r.convert(G),E),ne=i.convert(M?i.toDomain(A):A),pe=Math.max(G===void 0?NaN:r.convert(G),E),ce=M?this.bandWidth:i.bandwidth,ie=pe-X,le={x:ne+ce/2,y:E},Se;_?Se=_({value:G}):Se=G!==void 0&&J9i(G)?this.formatLabelValue(G):"";let je=ne+ce/2,ze,Ge="center",Ae,Ye=G!==void 0&&G>=0,ft=2;if(x==="center")ze=X+ie/2,Ae="middle";else if(x==="outsideEnd")ze=X+(Ye?-ft:ie+ft),Ae=Ye?"bottom":"top";else if(x==="insideEnd"){ze=X+(Ye?ft:ie-ft),Ae=Ye?"top":"bottom";let Tt=R3.CachedTextMeasurerPool.measureText(Se,{font:m}).height||10,at=E-Tt,yt=E+Tt;(Ye&&ze>at||!Ye&&ze<yt)&&(ze=E+ft*(Ye?-1:1),Ae=Ye?"bottom":"top")}else ze=E+ft*(Ye?-1:1),Ae=Ye?"bottom":"top";D.push({x:ne,y:X,width:ce,height:ie,fill:s,stroke:o,strokeWidth:a,seriesDatum:{x:A,y:Y?void 0:G},point:le,label:{x:je,y:ze,text:Se,fontStyle:c,fontWeight:d,fontSize:u,fontFamily:m,textAlign:Ge,textBaseline:Ae,fill:f}})}return D}},{extent:tTi}=Zl,{BandScale:Zst}=O6,iTi=class{constructor(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0}},nTi=class{constructor(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1}},rTi=class{constructor(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}}},sTi=class extends Pbe{constructor(){super(),this.linePath=new Wi.Path,this.xCrosshairLine=new Wi.Line,this.yCrosshairLine=new Wi.Line,this.lineSparklineGroup=new Wi.Group,this.markers=new Wi.Group,this.markerSelection=Wi.Selection.select(this.markers,()=>this.markerFactory()),this.markerSelectionData=[],this.marker=new iTi,this.line=new nTi,this.crosshairs=new rTi,this.rootGroup.append(this.lineSparklineGroup),this.linePath.zIndex=1e3,this.xCrosshairLine.zIndex=2e3,this.yCrosshairLine.zIndex=2e3,this.markers.zIndex=2500,this.lineSparklineGroup.append([this.linePath,this.xCrosshairLine,this.yCrosshairLine,this.markers])}getNodeData(){return this.markerSelectionData}markerFactory(){let{shape:t}=this.marker,e=jat(t);return new e}onMarkerShapeChange(){this.markerSelection=this.markerSelection.clear(),this.scheduleLayout()}update(){let t=this.generateNodeData();t&&(this.markerSelectionData=t,this.updateSelection(t),this.updateNodes(),this.updateLine())}updateYScaleDomain(){let{yData:t,yScale:e}=this,n=tTi(t),i=0,r=1;if(n!==void 0&&(i=this.min=n[0],r=this.max=n[1]),i===r){let s=Math.abs(i*.01);i-=s,r+=s}e.domain=[i,r]}generateNodeData(){let{data:t,yData:e,xData:n,xScale:i,yScale:r}=this;if(!t)return;let s=!(i instanceof Zst),o=s?0:i.bandwidth/2,a=[];for(let l=0;l<e.length;l++){let c=e[l],d=n[l];if(c==null)continue;let u=i.convert(s?i.toDomain(d):d)+o,m=c===void 0?NaN:r.convert(c);a.push({seriesDatum:{x:d,y:c},point:{x:u,y:m}})}return a}updateSelection(t){this.markerSelection.update(t)}updateNodes(){let{highlightedDatum:t,highlightStyle:e,marker:n}=this,{size:i,fill:r,stroke:s,strokeWidth:o}=e,a=n.formatter;this.markerSelection.each((l,c,d)=>{let u=c===t,m=u&&r!==void 0?r:n.fill,f=u&&s!==void 0?s:n.stroke,_=u&&o!==void 0?o:n.strokeWidth,x=u&&i!==void 0?i:n.size,D,{seriesDatum:E,point:M}=c;if(a){let I=d===0,z=d===this.markerSelectionData.length-1,G=E.y===this.min,A=E.y===this.max;D=a({datum:c,xValue:E.x,yValue:E.y,min:G,max:A,first:I,last:z,fill:m,stroke:f,strokeWidth:_,size:x,highlighted:u})}l.size=D&&D.size!=null?D.size:x,l.fill=D&&D.fill!=null?D.fill:m,l.stroke=D&&D.stroke!=null?D.stroke:f,l.strokeWidth=D&&D.strokeWidth!=null?D.strokeWidth:_,l.translationX=M.x,l.translationY=M.y,l.visible=D&&D.enabled!=null?D.enabled:n.enabled&&l.size>0})}updateLine(){let{linePath:t,yData:e,xData:n,xScale:i,yScale:r,line:s}=this,o=t.path;if(o.clear(),e.length<2)return;let a=!(i instanceof Zst),l=e.length,c=a?0:i.bandwidth/2,d=!0;for(let u=0;u<l;u++){let m=n[u],f=e[u],_=i.convert(a?i.toDomain(m):m)+c,x=f===void 0?NaN:r.convert(f);f==null?d=!0:d?(o.moveTo(_,x),d=!1):o.lineTo(_,x)}t.fill=void 0,t.stroke=s.stroke,t.strokeWidth=s.strokeWidth}updateXCrosshairLine(){let{yScale:t,xCrosshairLine:e,highlightedDatum:n,crosshairs:{xLine:i}}=this;if(!i.enabled||n==null){e.strokeWidth=0;return}e.y1=t.range[0],e.y2=t.range[1],e.x1=e.x2=0,e.stroke=i.stroke,e.strokeWidth=i.strokeWidth??1,e.lineCap=i.lineCap==="round"||i.lineCap==="square"?i.lineCap:void 0;let{lineDash:r}=i;e.lineDash=Array.isArray(r)?r:gie(e.lineCap,i.lineDash),e.translationX=n.point.x}updateYCrosshairLine(){let{xScale:t,yCrosshairLine:e,highlightedDatum:n,crosshairs:{yLine:i}}=this;if(!i.enabled||n==null){e.strokeWidth=0;return}e.x1=t.range[0],e.x2=t.range[1],e.y1=e.y2=0,e.stroke=i.stroke,e.strokeWidth=i.strokeWidth??1,e.lineCap=i.lineCap==="round"||i.lineCap==="square"?i.lineCap:void 0;let{lineDash:r}=i;e.lineDash=Array.isArray(r)?r:gie(e.lineCap,i.lineDash),e.translationY=n.point.y}getTooltipHtml(t){let{dataType:e}=this,{seriesDatum:n}=t,i=n.y,r=n.x,s=this.formatNumericDatum(i),o=e==="array"||e==="object"?this.formatDatum(r):void 0,a={content:s,title:o},l=this.processedOptions?.tooltip?.renderer;return l?qR(l({context:this.context,datum:n,yValue:i,xValue:r}),a):qR(a)}},{isNumber:oTi}=Zl,aTi=class{static create(t,e){t=Zl.deepClone(t);let n=lTi(t.type);return e&&(n.tooltip=e),dTi(n,t),cTi(n,t),t.data&&(n.data=t.data),n.processedOptions=t,n}};Jst=(t,e,n)=>oTi(e)?!0:(wt(`${t} must be a number, the value you provided is not a valid number. Using the default of ${n}px.`),!1),vTi={xOffset:Jst,yOffset:Jst};yTi=class extends ai{constructor(){super(`<div class="ag-sparkline-wrapper">
            <span data-ref="eSparkline"></span>
        </div>`),this.eSparkline=Bt}wireBeans(t){this.resizeObserverService=t.resizeObserverService,this.sparklineTooltipSingleton=t.sparklineTooltipSingleton}init(t){let e=!0,n=()=>{let{clientWidth:r,clientHeight:s}=this.getGui();if(!(r===0||s===0))if(e){let o=ve({data:t.value,width:r,height:s,context:{data:t.data}},t.sparklineOptions);this.sparkline=aTi.create(o,this.sparklineTooltipSingleton.getSparklineTooltip()),this.eSparkline.appendChild(this.sparkline.canvasElement),e=!1}else this.sparkline.width=r,this.sparkline.height=s},i=this.resizeObserverService.observeResize(this.getGui(),n);this.addDestroyFunc(()=>i())}refresh(t){return this.sparkline?(this.sparkline.data=t.value,!0):!1}destroy(){this.sparkline&&this.sparkline.destroy(),super.destroy()}},_Ti=class extends Ot{constructor(){super(...arguments),this.beanName="sparklineTooltipSingleton"}postConstruct(){this.tooltip=new H9i}getSparklineTooltip(){return this.tooltip}destroy(){this.tooltip&&this.tooltip.destroy(),super.destroy()}},CTi="32.1.0",Zat={version:CTi,moduleName:wr.SparklinesModule,beans:[_Ti],userComponents:[{name:"agSparklineCellRenderer",classImp:yTi}],dependantModules:[y1]},fW=class extends ai{constructor(){super(`<div class="ag-status-name-value">
            <span data-ref="eLabel"></span>:&nbsp;
            <span data-ref="eValue" class="ag-status-name-value-value"></span>
        </div>`),this.eLabel=Bt,this.eValue=Bt}setLabel(t,e){this.setDisplayed(!1);let n=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=n(t,e)}setValue(t){this.eValue.innerHTML=t}},xTi={selector:"AG-NAME-VALUE",component:fW},bTi=class extends ai{constructor(){super(`<div class="ag-status-panel ag-status-panel-aggregations">
            <ag-name-value data-ref="avgAggregationComp"></ag-name-value>
            <ag-name-value data-ref="countAggregationComp"></ag-name-value>
            <ag-name-value data-ref="minAggregationComp"></ag-name-value>
            <ag-name-value data-ref="maxAggregationComp"></ag-name-value>
            <ag-name-value data-ref="sumAggregationComp"></ag-name-value>
        </div>`,[xTi]),this.sumAggregationComp=Bt,this.countAggregationComp=Bt,this.minAggregationComp=Bt,this.maxAggregationComp=Bt,this.avgAggregationComp=Bt}wireBeans(t){this.valueService=t.valueService,this.cellNavigationService=t.cellNavigationService,this.rowModel=t.rowModel,this.cellPositionUtils=t.cellPositionUtils,this.rowPositionUtils=t.rowPositionUtils,this.rangeService=t.rangeService}destroy(){super.destroy()}postConstruct(){if(!this.isValidRowModel()){wt("agAggregationComponent should only be used with the client and server side row model.");return}this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedEventListeners({rangeSelectionChanged:this.onRangeSelectionChanged.bind(this),modelUpdated:this.onRangeSelectionChanged.bind(this)})}isValidRowModel(){let t=this.rowModel.getType();return t==="clientSide"||t==="serverSide"}init(t){this.params=t}refresh(t){return this.params=t,this.onRangeSelectionChanged(),!0}setAggregationComponentValue(t,e,n){let i=this.getAllowedAggregationValueComponent(t);if(Di(i)&&i){let r=this.localeService.getLocaleTextFunc(),s=r("thousandSeparator",","),o=r("decimalSeparator",".");i.setValue(GGe(e,s,o)),i.setDisplayed(n)}else this.getAggregationValueComponent(t)?.setDisplayed(!1)}getAllowedAggregationValueComponent(t){let{aggFuncs:e}=this.params;return!e||e.includes(t)?this.getAggregationValueComponent(t):null}getAggregationValueComponent(t){let e=`${t}AggregationComp`;return this[e]}onRangeSelectionChanged(){let t=this.rangeService?.getCellRanges(),e=0,n=0,i=0,r=null,s=null,o={};if(t&&!Gd(t)&&this.rangeService)for(let c=0;c<t.length;c++){let d=t[c],u=this.rangeService.getRangeStartRow(d),m=this.rangeService.getRangeEndRow(d);for(;!(Ls(u)||!u||this.rowPositionUtils.before(m,u)||!u||!d.columns);)d.columns.forEach(_=>{if(u===null)return;let x=this.cellPositionUtils.createId({rowPinned:u.rowPinned,column:_,rowIndex:u.rowIndex});if(o[x])return;o[x]=!0;let D=this.rowPositionUtils.getRowNode(u);if(Ls(D))return;let E=this.valueService.getValue(_,D);Ls(E)||E===""||(n++,!(typeof E=="object"&&"value"in E&&(E=E.value,E===""))&&(typeof E=="string"&&(E=Number(E)),typeof E=="number"&&!isNaN(E)&&(e+=E,(s===null||E>s)&&(s=E),(r===null||E<r)&&(r=E),i++)))}),u=this.cellNavigationService.getRowBelow(u)}let a=n>1,l=i>1;this.setAggregationComponentValue("count",n,a),this.setAggregationComponentValue("sum",e,l),this.setAggregationComponentValue("min",r,l),this.setAggregationComponentValue("max",s,l),this.setAggregationComponentValue("avg",e/i,l)}},wTi=class extends fW{wireBeans(t){this.rowModel=t.rowModel}postConstruct(){if(this.setLabel("filteredRows","Filtered"),this.rowModel.getType()!=="clientSide"){wt("agFilteredRowCountComponent should only be used with the client side row model.");return}this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);let t=this.onDataChanged.bind(this);this.addManagedEventListeners({modelUpdated:t}),t()}onDataChanged(){let t=this.getTotalRowCountValue(),e=this.getFilteredRowCountValue(),n=this.localeService.getLocaleTextFunc(),i=n("thousandSeparator",","),r=n("decimalSeparator",".");this.setValue(Yy(e,i,r)),this.setDisplayed(t!==e)}getTotalRowCountValue(){let t=0;return this.rowModel.forEachNode(()=>t+=1),t}getFilteredRowCountValue(){let t=0;return this.rowModel.forEachNodeAfterFilter(e=>{e.group||(t+=1)}),t}init(){}refresh(){return!0}destroy(){super.destroy()}},STi=class extends fW{wireBeans(t){this.rowModel=t.rowModel,this.selectionService=t.selectionService}postConstruct(){if(!this.isValidRowModel()){wt("agSelectedRowCountComponent should only be used with the client and server side row model.");return}this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();let t=this.onRowSelectionChanged.bind(this);this.addManagedEventListeners({modelUpdated:t,selectionChanged:t})}isValidRowModel(){let t=this.rowModel.getType();return t==="clientSide"||t==="serverSide"}onRowSelectionChanged(){let t=this.selectionService.getSelectionCount();if(t<0){this.setValue("?"),this.setDisplayed(!0);return}let e=this.localeService.getLocaleTextFunc(),n=e("thousandSeparator",","),i=e("decimalSeparator",".");this.setValue(Yy(t,n,i)),this.setDisplayed(t>0)}init(){}refresh(){return!0}destroy(){super.destroy()}},TTi=class extends fW{wireBeans(t){this.rowModel=t.rowModel}postConstruct(){if(this.rowModel.getType()!=="clientSide"){wt("agTotalAndFilteredRowCountComponent should only be used with the client side row model.");return}this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)}),this.onDataChanged()}onDataChanged(){let t=this.localeService.getLocaleTextFunc(),e=t("thousandSeparator",","),n=t("decimalSeparator","."),i=Yy(this.getFilteredRowCountValue(),e,n),r=Yy(this.getTotalRowCount(),e,n);if(i===r)this.setValue(i);else{let s=this.localeService.getLocaleTextFunc();this.setValue(`${i} ${s("of","of")} ${r}`)}}getFilteredRowCountValue(){let t=0;return this.rowModel.forEachNodeAfterFilter(e=>{e.group||t++}),t}getTotalRowCount(){let t=0;return this.rowModel.forEachNode(e=>{e.group||t++}),t}init(){}refresh(){return!0}destroy(){super.destroy()}},DTi=class extends fW{wireBeans(t){this.rowModel=t.rowModel}postConstruct(){if(this.setLabel("totalRows","Total Rows"),this.rowModel.getType()!=="clientSide"){wt("agTotalRowCountComponent should only be used with the client side row model.");return}this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)}),this.onDataChanged()}onDataChanged(){let t=this.localeService.getLocaleTextFunc(),e=t("thousandSeparator",","),n=t("decimalSeparator",".");this.setValue(Yy(this.getRowCountValue(),e,n))}getRowCountValue(){let t=0;return this.rowModel.forEachLeafNode(()=>t+=1),t}init(){}refresh(){return!0}destroy(){super.destroy()}};MTi=class extends ai{constructor(){super(`<div class="ag-status-bar">
            <div data-ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>
            <div data-ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>
            <div data-ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>
        </div>`),this.updateQueued=!1,this.panelsPromise=io.resolve(),this.eStatusBarLeft=Bt,this.eStatusBarCenter=Bt,this.eStatusBarRight=Bt,this.compDestroyFunctions={}}wireBeans(t){this.userComponentFactory=t.userComponentFactory,this.statusBarService=t.statusBarService}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))}processStatusPanels(t){let e=this.gos.get("statusBar")?.statusPanels;if(e){let n=e.filter(s=>s.align==="left"),i=e.filter(s=>s.align==="center"),r=e.filter(s=>!s.align||s.align==="right");this.panelsPromise=io.all([this.createAndRenderComponents(n,this.eStatusBarLeft,t),this.createAndRenderComponents(i,this.eStatusBarCenter,t),this.createAndRenderComponents(r,this.eStatusBarRight,t)])}else this.setDisplayed(!1)}handleStatusBarChanged(){this.updateQueued||(this.updateQueued=!0,this.panelsPromise.then(()=>{this.updateStatusBar(),this.updateQueued=!1}))}updateStatusBar(){let t=this.gos.get("statusBar")?.statusPanels,e=Array.isArray(t)&&t.length>0;this.setDisplayed(e);let n=new Map;e&&t.forEach(i=>{let r=i.key??i.statusPanel,s=this.statusBarService.getStatusPanel(r);if(s?.refresh){let o=this.gos.addGridCommonParams(i.statusPanelParams??{});s.refresh(o)&&(n.set(r,s),delete this.compDestroyFunctions[r],dc(s.getGui()))}}),this.resetStatusBar(),e&&this.processStatusPanels(n)}resetStatusBar(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()}destroy(){this.destroyComponents(),super.destroy()}destroyComponents(){Object.values(this.compDestroyFunctions).forEach(t=>t()),this.compDestroyFunctions={}}createAndRenderComponents(t,e,n){let i=[];return t.forEach(r=>{let s=r.key||r.statusPanel,o=n.get(s),a;if(o)a=io.resolve(o);else{let l={};if(a=this.userComponentFactory.getStatusPanelCompDetails(r,l).newAgStackInstance(),a==null)return}i.push({key:s,promise:a})}),io.all(i.map(r=>r.promise)).then(()=>{i.forEach(r=>{r.promise.then(s=>{let o=()=>{this.destroyBean(s)};this.isAlive()?(this.statusBarService.registerStatusPanel(r.key,s),e.appendChild(s.getGui()),this.compDestroyFunctions[r.key]=o):o()})})})}},kTi={selector:"AG-STATUS-BAR",component:MTi},ITi=class extends Ot{constructor(){super(),this.beanName="statusBarService",this.allComponents=new Map}registerStatusPanel(t,e){this.allComponents.set(t,e)}unregisterStatusPanel(t){this.allComponents.delete(t)}unregisterAllComponents(){this.allComponents.clear()}getStatusPanel(t){return this.allComponents.get(t)}getStatusPanelSelector(){return kTi}destroy(){this.unregisterAllComponents(),super.destroy()}},Rbe="32.1.0",Xat={version:Rbe,moduleName:`${wr.StatusBarModule}-core`,beans:[ITi],userComponents:[{name:"agAggregationComponent",classImp:bTi},{name:"agSelectedRowCountComponent",classImp:STi},{name:"agTotalRowCountComponent",classImp:DTi},{name:"agFilteredRowCountComponent",classImp:wTi},{name:"agTotalAndFilteredRowCountComponent",classImp:TTi}],dependantModules:[y1]},ATi={version:Rbe,moduleName:`${wr.StatusBarModule}-api`,apiFunctions:{getStatusPanel:ETi},dependantModules:[Xat]},Qat={version:Rbe,moduleName:wr.StatusBarModule,dependantModules:[Xat,ATi]},PTi="32.1.0",RTi=class extends Ot{constructor(){super(...arguments),this.beanName="rowModel",this.firstRow=-1,this.lastRow=-1,this.rowCount=-1,this.rowNodesByIndex={}}wireBeans(t){this.rowRenderer=t.rowRenderer,this.focusService=t.focusService,this.beans=t}ensureRowHeightsValid(t,e,n,i){return!1}postConstruct(){this.rowHeight=this.gos.getRowHeightAsNumber(),this.addManagedEventListeners({viewportChanged:this.onViewportChanged.bind(this)}),this.addManagedPropertyListener("viewportDatasource",()=>this.updateDatasource()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.updateRowHeights()})}start(){this.updateDatasource()}isLastRowIndexKnown(){return!0}destroy(){this.destroyDatasource(),super.destroy()}destroyDatasource(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)}updateDatasource(){let t=this.gos.get("viewportDatasource");t&&this.setViewportDatasource(t)}getViewportRowModelPageSize(){return this.gos.get("viewportRowModelPageSize")}getViewportRowModelBufferSize(){return this.gos.get("viewportRowModelBufferSize")}calculateFirstRow(t){let e=this.getViewportRowModelBufferSize(),n=this.getViewportRowModelPageSize(),i=t-e;return i<0?0:Math.floor(i/n)*n}calculateLastRow(t){if(t===-1)return t;let e=this.getViewportRowModelBufferSize(),n=this.getViewportRowModelPageSize(),i=t+e,r=Math.ceil(i/n)*n,s=this.rowCount-1;return Math.min(r,s)}onViewportChanged(t){let e=this.calculateFirstRow(t.firstRow),n=this.calculateLastRow(t.lastRow);(this.firstRow!==e||this.lastRow!==n)&&(this.firstRow=e,this.lastRow=n,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))}purgeRowsNotInViewport(){Object.keys(this.rowNodesByIndex).forEach(t=>{let e=parseInt(t,10);if(e<this.firstRow||e>this.lastRow){if(this.isRowFocused(e))return;delete this.rowNodesByIndex[e]}})}isRowFocused(t){let e=this.focusService.getFocusCellToUseAfterRefresh();return!e||e.rowPinned!=null?!1:e.rowIndex===t}setViewportDatasource(t){this.destroyDatasource(),this.viewportDatasource=t,this.rowCount=-1,t.init?t.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):wt("viewport is missing init method.")}getType(){return"viewport"}getRow(t){return this.rowNodesByIndex[t]||(this.rowNodesByIndex[t]=this.createBlankRowNode(t)),this.rowNodesByIndex[t]}getRowNode(t){let e;return this.forEachNode(n=>{n.id===t&&(e=n)}),e}getRowCount(){return this.rowCount===-1?0:this.rowCount}getRowIndexAtPixel(t){return this.rowHeight!==0?Math.floor(t/this.rowHeight):0}getRowBounds(t){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*t}}updateRowHeights(){this.forEachNode(t=>{t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*t.rowIndex)}),this.eventService.dispatchEvent({type:"modelUpdated",newData:!1,newPage:!1,keepRenderedRows:!0,animate:!1})}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(t){return t}isEmpty(){return this.rowCount>0}isRowsToRender(){return this.rowCount>0}getNodesInRangeForSelection(t,e){let n=t.rowIndex,i=e.rowIndex,r=n<this.firstRow||n>this.lastRow,s=i<this.firstRow||i>this.lastRow;if(r||s)return[];let o=[],a=n<=i?n:i,l=n<=i?i:n;for(let c=a;c<=l;c++)o.push(this.rowNodesByIndex[c]);return o}forEachNode(t){let e=0;Object.keys(this.rowNodesByIndex).forEach(n=>{let i=parseInt(n,10),r=this.rowNodesByIndex[i];t(r,e),e++})}setRowData(t){Rh(t,(e,n)=>{let i=parseInt(e,10);if(i>=this.firstRow&&i<=this.lastRow){let r=this.rowNodesByIndex[i];Ls(r)&&(r=this.createBlankRowNode(i),this.rowNodesByIndex[i]=r),r.setDataAndId(n,i.toString())}})}createBlankRowNode(t){let e=new Pp(this.beans);return e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*t),e.setRowIndex(t),e}setRowCount(t,e=!1){t!==this.rowCount&&(this.rowCount=t,this.eventService.dispatchEventOnce({type:"rowCountReady"}),this.eventService.dispatchEvent({type:"modelUpdated",newData:!1,newPage:!1,keepRenderedRows:e,animate:!1}))}isRowPresent(t){return!!this.getRowNode(t.id)}},Jat={version:PTi,moduleName:wr.ViewportRowModelModule,rowModel:"viewport",beans:[RTi],dependantModules:[y1]};iot(not,obe);Sa.__registerModules([ZZ,_4e,T4e,rz,hot,vbe,tat,uat,Sat,Eat,Iat,Rat,Oat,lbe,Nat,xbe,Hat,Uat,bie,Zat,Qat,Jat],!1,void 0)});function V3(t,e,n,i,r,s,o,a){return V3.fromTZ(V3.tp(t,e,n,i,r,s,o),a)}function Fbe(t,e=new Date){let n=e.toLocaleString("en-US",{timeZone:t,timeZoneName:"shortOffset"}).split(" ").slice(-1)[0],i=e.toLocaleString("en-US").replace(/[\u202f]/," ");return Date.parse(`${i} GMT`)-Date.parse(`${i} ${n}`)}function FTi(t,e){let n=new Date(Date.parse(t));if(isNaN(n))throw new Error("minitz: Invalid ISO8601 passed to parser.");let i=t.substring(9);return t.includes("Z")||i.includes("-")||i.includes("+")?V3.tp(n.getUTCFullYear(),n.getUTCMonth()+1,n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),"Etc/UTC"):V3.tp(n.getFullYear(),n.getMonth()+1,n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),e)}function LTi(t){if(t===void 0&&(t={}),delete t.name,t.legacyMode=t.legacyMode===void 0?!0:t.legacyMode,t.paused=t.paused===void 0?!1:t.paused,t.maxRuns=t.maxRuns===void 0?1/0:t.maxRuns,t.catch=t.catch===void 0?!1:t.catch,t.interval=t.interval===void 0?0:parseInt(t.interval,10),t.utcOffset=t.utcOffset===void 0?void 0:parseInt(t.utcOffset,10),t.unref=t.unref===void 0?!1:t.unref,t.startAt&&(t.startAt=new _1(t.startAt,t.timezone)),t.stopAt&&(t.stopAt=new _1(t.stopAt,t.timezone)),t.interval!==null){if(isNaN(t.interval))throw new Error("CronOptions: Supplied value for interval is not a number");if(t.interval<0)throw new Error("CronOptions: Supplied value for interval can not be negative")}if(t.utcOffset!==void 0){if(isNaN(t.utcOffset))throw new Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(t.utcOffset<-870||t.utcOffset>870)throw new Error("CronOptions: utcOffset out of bounds.");if(t.utcOffset!==void 0&&t.timezone)throw new Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(t.unref!==!0&&t.unref!==!1)throw new Error("CronOptions: Unref should be either true, false or undefined(false).");return t}function B3(t,e){this.pattern=t,this.timezone=e,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.lastDayOfMonth=!1,this.starDOM=!1,this.starDOW=!1,this.parse()}function _1(t,e){if(this.tz=e,t&&t instanceof Date)if(!isNaN(t))this.fromDate(t);else throw new TypeError("CronDate: Invalid date passed to CronDate constructor");else if(t===void 0)this.fromDate(new Date);else if(t&&typeof t=="string")this.fromString(t);else if(t instanceof _1)this.fromCronDate(t);else throw new TypeError("CronDate: Invalid type ("+typeof t+") passed to CronDate constructor")}function wie(t){return Object.prototype.toString.call(t)==="[object Function]"||typeof t=="function"||t instanceof Function}function OTi(t){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer(t):t&&typeof t.unref<"u"&&t.unref()}function op(t,e,n){if(!(this instanceof op))return new op(t,e,n);let i,r;if(wie(e))r=e;else if(typeof e=="object")i=e;else if(e!==void 0)throw new Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(wie(n))r=n;else if(typeof n=="object")i=n;else if(n!==void 0)throw new Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=i?i.name:void 0,this.options=LTi(i),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:i?i.maxRuns:void 0,paused:i?i.paused:!1,pattern:void 0},t&&(t instanceof Date||typeof t=="string"&&t.indexOf(":")>0)?this._states.once=new _1(t,this.options.timezone||this.options.utcOffset):this._states.pattern=new B3(t,this.options.timezone),this.name){if(vW.find(o=>o.name===this.name))throw new Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");vW.push(this)}return r!==void 0&&(this.fn=r,this.schedule()),this}var Lbe,gW,ilt,nlt,sb,tlt,vW,rlt=Q(()=>{V3.fromTZISO=(t,e,n)=>V3.fromTZ(FTi(t,e),n);V3.fromTZ=function(t,e){let n=new Date(Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)),i=Fbe(t.tz,n),r=new Date(n.getTime()-i),s=Fbe(t.tz,r);if(s-i===0)return r;{let o=new Date(n.getTime()-s),a=Fbe(t.tz,o);if(a-s===0)return o;if(!e&&a-s>0)return o;if(e)throw new Error("Invalid date passed to fromTZ()");return r}};V3.toTZ=function(t,e){let n=t.toLocaleString("en-US",{timeZone:e}).replace(/[\u202f]/," "),i=new Date(n);return{y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate(),h:i.getHours(),i:i.getMinutes(),s:i.getSeconds(),tz:e}};V3.tp=(t,e,n,i,r,s,o)=>({y:t,m:e,d:n,h:i,i:r,s,tz:o});V3.minitz=V3;Lbe=32,gW=31|Lbe,ilt=[1,2,4,16,16];B3.prototype.parse=function(){if(!(typeof this.pattern=="string"||this.pattern.constructor===String))throw new TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.replace(/\s+/g," ").split(" ");if(t.length<5||t.length>6)throw new TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exacly five or six space separated parts required.");if(t.length===5&&t.unshift("0"),t[3].indexOf("L")>=0&&(t[3]=t[3].replace("L",""),this.lastDayOfMonth=!0),t[3]=="*"&&(this.starDOM=!0),t[4].length>=3&&(t[4]=this.replaceAlphaMonths(t[4])),t[5].length>=3&&(t[5]=this.replaceAlphaDays(t[5])),t[5]=="*"&&(this.starDOW=!0),this.pattern.indexOf("?")>=0){let e=new _1(new Date,this.timezone).getDate(!0);t[0]=t[0].replace("?",e.getSeconds()),t[1]=t[1].replace("?",e.getMinutes()),t[2]=t[2].replace("?",e.getHours()),this.starDOM||(t[3]=t[3].replace("?",e.getDate())),t[4]=t[4].replace("?",e.getMonth()+1),this.starDOW||(t[5]=t[5].replace("?",e.getDay()))}this.throwAtIllegalCharacters(t),this.partToArray("second",t[0],0,1),this.partToArray("minute",t[1],0,1),this.partToArray("hour",t[2],0,1),this.partToArray("day",t[3],-1,1),this.partToArray("month",t[4],-1,1),this.partToArray("dayOfWeek",t[5],0,gW),this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])};B3.prototype.partToArray=function(t,e,n,i){let r=this[t],s=t==="day"&&this.lastDayOfMonth;if(e===""&&!s)throw new TypeError("CronPattern: configuration entry "+t+" ("+e+") is empty, check for trailing spaces.");if(e==="*")return r.fill(i);let o=e.split(",");if(o.length>1)for(let a=0;a<o.length;a++)this.partToArray(t,o[a],n,i);else e.indexOf("-")!==-1&&e.indexOf("/")!==-1?this.handleRangeWithStepping(e,t,n,i):e.indexOf("-")!==-1?this.handleRange(e,t,n,i):e.indexOf("/")!==-1?this.handleStepping(e,t,n,i):e!==""&&this.handleNumber(e,t,n,i)};B3.prototype.throwAtIllegalCharacters=function(t){for(let e=0;e<t.length;e++)if((e===5?/[^/*0-9,\-#L]+/:/[^/*0-9,-]+/).test(t[e]))throw new TypeError("CronPattern: configuration entry "+e+" ("+t[e]+") contains illegal characters.")};B3.prototype.handleNumber=function(t,e,n,i){let r=this.extractNth(t,e),s=parseInt(r[0],10)+n;if(isNaN(s))throw new TypeError("CronPattern: "+e+" is not a number: '"+t+"'");this.setPart(e,s,r[1]||i)};B3.prototype.setPart=function(t,e,n){if(!Object.prototype.hasOwnProperty.call(this,t))throw new TypeError("CronPattern: Invalid part specified: "+t);if(t==="dayOfWeek"){if(e===7&&(e=0),(e<0||e>6)&&e!=="L")throw new RangeError("CronPattern: Invalid value for dayOfWeek: "+e);this.setNthWeekdayOfMonth(e,n);return}if(t==="second"||t==="minute"){if(e<0||e>=60)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="hour"){if(e<0||e>=24)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="day"){if(e<0||e>=31)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="month"&&(e<0||e>=12))throw new RangeError("CronPattern: Invalid value for "+t+": "+e);this[t][e]=n};B3.prototype.handleRangeWithStepping=function(t,e,n,i){let r=this.extractNth(t,e),s=r[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(s===null)throw new TypeError("CronPattern: Syntax error, illegal range with stepping: '"+t+"'");let[,o,a,l]=s;if(o=parseInt(o,10)+n,a=parseInt(a,10)+n,l=parseInt(l,10),isNaN(o))throw new TypeError("CronPattern: Syntax error, illegal lower range (NaN)");if(isNaN(a))throw new TypeError("CronPattern: Syntax error, illegal upper range (NaN)");if(isNaN(l))throw new TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");if(l===0)throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");if(l>this[e].length)throw new TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[e].length+")");if(o>a)throw new TypeError("CronPattern: From value is larger than to value: '"+t+"'");for(let c=o;c<=a;c+=l)this.setPart(e,c,r[1]||i)};B3.prototype.extractNth=function(t,e){let n=t,i;if(n.includes("#")){if(e!=="dayOfWeek")throw new Error("CronPattern: nth (#) only allowed in day-of-week field");i=n.split("#")[1],n=n.split("#")[0]}return[n,i]};B3.prototype.handleRange=function(t,e,n,i){let r=this.extractNth(t,e),s=r[0].split("-");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal range: '"+t+"'");let o=parseInt(s[0],10)+n,a=parseInt(s[1],10)+n;if(isNaN(o))throw new TypeError("CronPattern: Syntax error, illegal lower range (NaN)");if(isNaN(a))throw new TypeError("CronPattern: Syntax error, illegal upper range (NaN)");if(o>a)throw new TypeError("CronPattern: From value is larger than to value: '"+t+"'");for(let l=o;l<=a;l++)this.setPart(e,l,r[1]||i)};B3.prototype.handleStepping=function(t,e,n,i){let r=this.extractNth(t,e),s=r[0].split("/");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal stepping: '"+t+"'");let o=0;s[0]!=="*"&&(o=parseInt(s[0],10)+n);let a=parseInt(s[1],10);if(isNaN(a))throw new TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");if(a===0)throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");if(a>this[e].length)throw new TypeError("CronPattern: Syntax error, max steps for part is ("+this[e].length+")");for(let l=o;l<this[e].length;l+=a)this.setPart(e,l,r[1]||i)};B3.prototype.replaceAlphaDays=function(t){return t.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")};B3.prototype.replaceAlphaMonths=function(t){return t.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")};B3.prototype.handleNicknames=function(t){let e=t.trim().toLowerCase();return e==="@yearly"||e==="@annually"?"0 0 1 1 *":e==="@monthly"?"0 0 1 * *":e==="@weekly"?"0 0 * * 0":e==="@daily"?"0 0 * * *":e==="@hourly"?"0 * * * *":t};B3.prototype.setNthWeekdayOfMonth=function(t,e){if(e==="L")this.dayOfWeek[t]=this.dayOfWeek[t]|Lbe;else if(e<6&&e>0)this.dayOfWeek[t]=this.dayOfWeek[t]|ilt[e-1];else if(e===gW)this.dayOfWeek[t]=gW;else throw new TypeError(`CronPattern: nth weekday of of range, should be 1-5 or L. Value: ${e}`)};nlt=[31,28,31,30,31,30,31,31,30,31,30,31],sb=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]];_1.prototype.isNthWeekdayOfMonth=function(t,e,n,i){let s=new Date(Date.UTC(t,e,n)).getUTCDay(),o=0;for(let a=1;a<=n;a++)new Date(Date.UTC(t,e,a)).getUTCDay()===s&&o++;if(i&gW&&ilt[o-1]&i)return!0;if(i&Lbe){let a=new Date(Date.UTC(t,e+1,0)).getUTCDate();for(let l=n+1;l<=a;l++)if(new Date(Date.UTC(t,e,l)).getUTCDay()===s)return!1;return!0}return!1};_1.prototype.fromDate=function(t){if(this.tz!==void 0)if(typeof this.tz=="number")this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes()+this.tz,this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),this.apply();else{let e=V3.toTZ(t,this.tz);this.ms=t.getMilliseconds(),this.second=e.s,this.minute=e.i,this.hour=e.h,this.day=e.d,this.month=e.m-1,this.year=e.y}else this.ms=t.getMilliseconds(),this.second=t.getSeconds(),this.minute=t.getMinutes(),this.hour=t.getHours(),this.day=t.getDate(),this.month=t.getMonth(),this.year=t.getFullYear()};_1.prototype.fromCronDate=function(t){this.tz=t.tz,this.year=t.year,this.month=t.month,this.day=t.day,this.hour=t.hour,this.minute=t.minute,this.second=t.second,this.ms=t.ms};_1.prototype.apply=function(){if(this.month>11||this.day>nlt[this.month]||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let t=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes(),this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),!0}else return!1};_1.prototype.fromString=function(t){return this.fromDate(V3.fromTZISO(t,this.tz))};_1.prototype.findNext=function(t,e,n,i){let r=this[e],s;n.lastDayOfMonth&&(this.month!==1?s=nlt[this.month]:s=new Date(Date.UTC(this.year,this.month+1,0,0,0,0,0)).getUTCDate());let o=!n.starDOW&&e=="day"?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0;for(let a=this[e]+i;a<n[e].length;a++){let l=n[e][a];if(e==="day"&&n.lastDayOfMonth&&a-i==s&&(l=!0),e==="day"&&!n.starDOW){let c=n.dayOfWeek[(o+(a-i-1))%7];if(c&&c&gW)c=this.isNthWeekdayOfMonth(this.year,this.month,a-i,c);else if(c)throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${c}`);t.legacyMode&&!n.starDOM?l=l||c:l=l&&c}if(l)return this[e]=a-i,r!==this[e]?2:1}return 3};_1.prototype.recurse=function(t,e,n){let i=this.findNext(e,sb[n][0],t,sb[n][2]);if(i>1){let r=n+1;for(;r<sb.length;)this[sb[r][0]]=-sb[r][2],r++;if(i===3)return this[sb[n][1]]++,this[sb[n][0]]=-sb[n][2],this.apply(),this.recurse(t,e,0);if(this.apply())return this.recurse(t,e,n-1)}return n+=1,n>=sb.length?this:this.year>=3e3?null:this.recurse(t,e,n)};_1.prototype.increment=function(t,e,n){return this.second+=e.interval>1&&n?e.interval:1,this.ms=0,this.apply(),this.recurse(t,e,0)};_1.prototype.getDate=function(t){return t||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz=="number"?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):V3(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz)};_1.prototype.getTime=function(){return this.getDate().getTime()};tlt=30*1e3,vW=[];op.prototype.nextRun=function(t){let e=this._next(t);return e?e.getDate():null};op.prototype.nextRuns=function(t,e){t>this._states.maxRuns&&(t=this._states.maxRuns);let n=[],i=e||this._states.currentRun;for(;t--&&(i=this.nextRun(i));)n.push(i);return n};op.prototype.getPattern=function(){return this._states.pattern?this._states.pattern.pattern:void 0};op.prototype.isRunning=function(){let t=this.nextRun(this._states.currentRun),e=!this._states.paused,n=this.fn!==void 0,i=!this._states.kill;return e&&n&&i&&t!==null};op.prototype.isStopped=function(){return this._states.kill};op.prototype.isBusy=function(){return this._states.blocking};op.prototype.currentRun=function(){return this._states.currentRun?this._states.currentRun.getDate():null};op.prototype.previousRun=function(){return this._states.previousRun?this._states.previousRun.getDate():null};op.prototype.msToNext=function(t){t=t||new Date;let e=this._next(t);return e?e.getTime()-t.getTime():null};op.prototype.stop=function(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let t=vW.indexOf(this);t>=0&&vW.splice(t,1)};op.prototype.pause=function(){return this._states.paused=!0,!this._states.kill};op.prototype.resume=function(){return this._states.paused=!1,!this._states.kill};op.prototype.schedule=function(t){if(t&&this.fn)throw new Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");t&&(this.fn=t);let e=this.msToNext(),n=this.nextRun(this._states.currentRun);return e===null||n===null?this:(e>tlt&&(e=tlt),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(n),e),this._states.currentTimeout&&this.options.unref&&OTi(this._states.currentTimeout),this)};op.prototype._trigger=function(t){return O(this,null,function*(){if(this._states.blocking=!0,this._states.currentRun=new _1(void 0,this.options.timezone||this.options.utcOffset),this.options.catch)try{yield this.fn(this,this.options.context)}catch(e){wie(this.options.catch)&&this.options.catch(e,this)}else yield this.fn(this,this.options.context);this._states.previousRun=new _1(t,this.options.timezone||this.options.utcOffset),this._states.blocking=!1})};op.prototype.trigger=function(){return O(this,null,function*(){yield this._trigger()})};op.prototype._checkTrigger=function(t){let e=new Date,n=!this._states.paused&&e.getTime()>=t,i=this._states.blocking&&this.options.protect;n&&!i?(this._states.maxRuns--,this._trigger()):n&&i&&wie(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()};op.prototype._next=function(t){let e=!!(t||this._states.currentRun);t=new _1(t,this.options.timezone||this.options.utcOffset),this.options.startAt&&t&&t.getTime()<this.options.startAt.getTime()&&(t=this.options.startAt);let n=this._states.once||new _1(t,this.options.timezone||this.options.utcOffset).increment(this._states.pattern,this.options,e);return this._states.once&&this._states.once.getTime()<=t.getTime()||n===null||this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&n.getTime()>=this.options.stopAt.getTime()?null:n};op.Cron=op;op.scheduledJobs=vW});var Af,yW=Q(()=>{Yc();pa();Af=(()=>{let e=class e{static get moneys(){return Sr.clone(e._moneys)}static get moneysReverse(){return Sr.clone(e.moneys).sort(Hr.arrayNumbers(!0))}static get moneysReverseRandom(){return Sr.clone(e.moneys).sort(Hr.random())}static getMoneyWidth(i,r){return e.getMoneyWidthPercent(i)*r}static getMoneyHeight(i,r){return e.getMoneyHeightPercent(i)*r}static getMoneyWidthPercent(i){switch(i){case 200:return 140;case 100:return 138;case 50:return 136;case 20:return 134;case 10:return 132;case 5:return 130;case 2:return 40;case 1:return 38;case .5:return 38;case .2:return 36;case .1:return 34;case .05:return 34;case .02:return 32;case .01:return 30}return 100}static getMoneyHeightPercent(i){switch(i){case 200:return 140;case 100:return 138;case 50:return 136;case 20:return 134;case 10:return 125;case 5:return 120;case 2:return 80;case 1:return 75;case .5:return 76;case .2:return 72;case .1:return 68;case .05:return 64;case .02:return 60;case .01:return 58}return 100}static getPreviousCoin(i){let r=this.moneys.findIndex(s=>s===i);if(r>0)return this.moneys[r-1]}};e._moneys=[.01,.02,.05,.1,.2,.5,1,2,5,10,20,50,100,200];let t=e;return t})()});var tF,ca,pC=Q(()=>{yW();kl();pa();Ov();zn();tF=Gs(Q9());Zh();Ul();ca=(()=>{let e=class e{static getCombinedDummiesDeep3(){if(e._dummies3)return e._dummies3;e._dummies3=[];for(let i of e.dummies)for(let r of e.dummies)for(let s of e.dummies){let o={reduce:e.combineMoneyStacks([i.reduce,r.reduce,s.reduce]),add:e.combineMoneyStacks([i.add,r.add,s.add])};for(let a of oa(o.reduce))o.reduce[a]===0&&delete o.reduce[a];for(let a of oa(o.add))o.add[a]===0&&delete o.add[a];e._dummies3.push(o)}return e._dummies3}static getCombinedDummiesDeep2(){if(e._dummies2)return e._dummies2;e._dummies2=[];for(let i of e.dummies)for(let r of e.dummies){let s={reduce:e.combineMoneyStacks([i.reduce,r.reduce]),add:e.combineMoneyStacks([i.add,r.add])};for(let o of oa(s.reduce))s.reduce[o]===0&&delete s.reduce[o];for(let o of oa(s.add))s.add[o]===0&&delete s.add[o];e._dummies2.push(s)}return e._dummies2}static getCombinedDummiesDeep2Array(){if(e._dummies2Array)return e._dummies2Array;e._dummies2Array=[];for(let i of e.dummies)for(let r of e.dummies)e._dummies2Array.push({reduce:[i.reduce,r.reduce],add:[i.add,r.add]});return e._dummies2Array}static getSum(i,r=!1){return e.getTotalValueFromMoneyStack(i,r)}static getTotalValueFromMoneyStack(i,r=!1){let s=0;if(i)for(let o of Af.moneys)(!r||o>=5)&&Es.isNumber(i[o])&&(s+=i[o]*o);return fn.roundMoney(s)}static getEmptyMoneyStack(){let i={};for(let r of Af.moneys)i[r]=0;return i}static canReduceMultiFromMoneyStack(i,r,s){let o=[],a=e.getSum(i);o.push("Summe vom Stack: "+a.toMoneyString());let l=r.reduce((u,m)=>u+m.value,0);o.push("Summe von Values : "+l.toMoneyString());let c=so(i),d=e.reduceMultiFromMoneyStack(c,r,s);return d.log=[...o,...d.log],d}static reduceMultiFromMoneyStack(i,r,s){let o=Ie.formatNow("yyyy-MM-dd"),a=e._reduceMultiFromMoneyStack(i,r,s,o);return a||(o=Date.now().dateAddDays(1).dateFormat("yyyy-MM-dd"),a=e._reduceMultiFromMoneyStack(i,r,s,o)),a||(o=Date.now().dateAddDays(2).dateFormat("yyyy-MM-dd"),a=e._reduceMultiFromMoneyStack(i,r,s,o)),a}static _reduceMultiFromMoneyStack(i,r,s,o){let a=[];s&&(r=e.setArtistPrio(r,s,o));let l=!0,c=Sr.clone(r);for(let u of c){let m=so(i),f=e.reduceFromMoneyStack(i,u.value);if(!f.possible){let _=e.getSum(m);a.push("not possible for "+u.id+`
`+u.value.toMoneyString()+`
moneyStackBeforeSum: `+_.toMoneyString()+`
`+Qn.stringify(e.onlyValues(m)))}u.moneyStack=f.getMoneyStack,f.possible||(u.missingMoney=f.missingMoney,l=!1)}let d=c.reduce((u,m)=>fn.roundMoney(u+(m.missingMoney??0)),0);return{values:c,possible:l,missingMoneySum:d,log:a}}static combineMoneyStacks(i){let r=e.getEmptyMoneyStack();for(let s of i)for(let o of Af.moneys)Es.isNumber(s[o])&&(r[o]+=s[o]);return r}static getMoneyStackText(i,r=" "){let s=[];for(let o of Af.moneysReverse)i[o]>0&&s.push(i[o]+"\xD7"+o);return s.join(r)}static reduceFromMoneyStack(i,r,s=!0,o=0){let l=Sr.clone(i),c=r,d=e.getEmptyMoneyStack(),u=Af.moneysReverse;o>0&&(u=Af.moneysReverseRandom);for(let m of u)for(;r>0;)try{if(r>=m&&m>=.01)if(l[m]>0)l[m]=Math.round(l[m]-1),d[m]=Math.round(d[m]+1),r-=fn.roundMoney(m),r=fn.roundMoney(r);else break;else break}catch(f){throw Error(`reduceFromMoneyStack failed
`+f.message)}return r===0?(Object.assign(i,l),{getMoneyStack:d,possible:!0}):o<100?e.reduceFromMoneyStack(i,c,s,o+1):(Object.assign(i,l),{getMoneyStack:d,missingMoney:fn.roundMoney(r),possible:!1})}static setArtistPrio(i,r,s){for(let[o,a]of r.entries())i.find(l=>l.id===a)&&(i.find(l=>l.id===a)._sortValue=o);return wc.sortRandomByIndicator(i,"id",s)}static getSumFromValues(i){return i.reduce((r,s)=>r+s.value,0)}static removeEmptyCoins(i){for(let r of Object.keys(i))i[r]===0&&delete i[r]}static getProposalChanges(i,r){for(let s of e.dummies){let o=Sr.clone(i);for(let a=0;a<10;a++)if(e.reduceMoneyStackFromMoneyStack(o,s.reduce)&&(o=e.combineMoneyStacks([o,s.add]),e.reduceFromMoneyStack(o,r,!1).possible)){let c=Sr.clone(s);return tF.default.keys(c.reduce).forEach(d=>c.reduce[d]*=a+1),tF.default.keys(c.add).forEach(d=>c.add[d]*=a+1),c}}}static getProposalChangesMulti(i,r,s=0){let o=[],a=e.dummies;s===1&&(a=e.getCombinedDummiesDeep2()),s===2&&(a=e.getCombinedDummiesDeep3());for(let l of a){let c=Sr.clone(i),d=0;if(e.reduceMoneyStackFromMoneyStack(c,l.reduce)){c=e.combineMoneyStacks([c,l.add]);let u=!0,m,f=Sr.clone(c);for(let _ of r)if(e.reduceFromMoneyStack(f,_,!1).possible){let D=Sr.clone(l);tF.default.keys(D.reduce).forEach(E=>D.reduce[E]*=d+1),tF.default.keys(D.add).forEach(E=>D.add[E]*=d+1),m=D}else u=!1;u&&m&&(o.find(_=>e.isSame(_.reduce,m.reduce)&&e.isSame(_.add,m.add))||o.push(m))}}for(let l of o)l.sortValue=e.getSortValueFromChangeProposal(l);return o.length===0&&s===0?e.getProposalChangesMulti(i,r,1):o.length===0&&s===1?e.getProposalChangesMultiViaArray(i,r):o.sortNumber("sortValue")}static getProposalChangesMultiViaArray(i,r){let s=[],o=e.getCombinedDummiesDeep2Array();for(let a of o){let l=Sr.clone(i),c=0;if(e.reduceMoneyStackFromMoneyStack(l,a.reduce[0])&&(l=e.combineMoneyStacks([l,a.add[0]]),e.reduceMoneyStackFromMoneyStack(l,a.reduce[1]))){l=e.combineMoneyStacks([l,a.add[1]]);let d=!0,u,m=Sr.clone(l);for(let f of r)e.reduceFromMoneyStack(m,f,!1).possible?u=e.getMoneyStackDiff(i,l):d=!1;d&&u&&(s.find(f=>e.isSame(f.reduce,u.reduce)&&e.isSame(f.add,u.add))||s.push(u))}}for(let a of s)a.sortValue=e.getSortValueFromChangeProposal(a);return s.sortNumber("sortValue")}static reduceMoneyStackFromMoneyStack(i,r){for(let s of tF.default.keys(r))if(i[s]>=r[s])i[s]-=r[s];else return!1;return!0}static getSortValueFromChangeProposal(i){let r=oa(i.reduce).length+oa(i.add).length,s=0;for(let o of oa(i.reduce))s+=i.reduce[o];for(let o of oa(i.add))s+=i.add[o];return r+s+oa(i.add).length}static test3(){let i=Qn.parse(`{
  "1": 0,
  "2": 0,
  "5": 0,
  "10": 0,
  "20": 20,
  "50": 3,
  "100": 0,
  "200": 0,
  "0.01": 1,
  "0.02": 1,
  "0.05": 4,
  "0.1": 8,
  "0.2": 6,
  "0.5": 0
}`),r=e.reduceFromMoneyStack(so(i),380),s=e.reduceFromMoneyStack(so(i),380),o=e.reduceFromMoneyStack(so(i),380),a=e.reduceFromMoneyStack(so(i),380),l=e.reduceFromMoneyStack(so(i),380),c=e.reduceFromMoneyStack(so(i),380),d=e.reduceFromMoneyStack(so(i),380),u=e.reduceFromMoneyStack(so(i),380);console.log(r),console.log(s),console.log(o),console.log(a),console.log(l),console.log(c),console.log(d),console.log(u)}static test2(){}static test(){let i=Qn.parse('{"1":0,"2":0,"5":0,"10":0,"20":2,"50":0,"100":0,"200":0,"0.01":0,"0.02":0,"0.05":0,"0.1":0,"0.2":0,"0.5":0}'),r=e.canReduceMultiFromMoneyStack(i,[{id:"x",value:630}],[]),s=e.getTotalValueFromMoneyStack(i);console.log(s);for(let o of e.dummies){for(let l of oa(o.reduce))if(o.reduce[l]%1!==0)debugger;for(let l of oa(o.reduce))if(o.reduce[l]%1!==0)debugger;if(e.getTotalValueFromMoneyStack(o.reduce)!==e.getTotalValueFromMoneyStack(o.add)){debugger;throw new Error(`MoneyStackTools.dummies is not correct
`+o)}let a=0;for(let l of e.dummies)e.isSame(o.reduce,l.reduce)&&e.isSame(o.add,l.add)&&a++;if(a>1)debugger}}static isSame(i,r){let s=e.getTotalValueFromMoneyStack(i),o=e.getTotalValueFromMoneyStack(r);if(s===o){for(let a of oa(i))if(i[a]!==r[a])return!1;for(let a of oa(r))if(i[a]!==r[a])return!1;return!0}return!1}static getMoneyStackDiff(i,r){e.fillMoneyStackEmptyCoins(i);let s={reduce:{},add:{}};for(let o of Af.moneys)i[o]>r[o]&&(s.reduce[o]=i[o]-r[o]),i[o]<r[o]&&(s.add[o]=r[o]-i[o]);return s}static fillMoneyStackEmptyCoins(i){for(let r of Af.moneys)i[r]||(i[r]=0)}static onlyValues(i){let r=so(i);for(let s of oa(r))r[s]===0&&delete r[s];return r}};e.dummies=[{reduce:{200:1},add:{100:2}},{reduce:{200:1},add:{50:4}},{reduce:{200:1},add:{100:1,50:2}},{reduce:{200:1},add:{100:1,50:1,20:2,10:1}},{reduce:{200:1},add:{100:1,50:1,20:1,10:2,5:2}},{reduce:{200:1},add:{100:1,50:1,20:1,10:2,5:1,2:2,1:1}},{reduce:{200:1},add:{100:1,50:1,10:3,5:3,2:2,1:1}},{reduce:{100:2},add:{20:8,10:4}},{reduce:{100:2},add:{20:9,10:2}},{reduce:{100:1},add:{50:2}},{reduce:{100:1},add:{50:1,20:2,10:1}},{reduce:{100:1},add:{20:5}},{reduce:{100:1},add:{20:4,10:2}},{reduce:{100:1},add:{20:3,10:4}},{reduce:{100:1},add:{20:2,10:6}},{reduce:{100:1},add:{20:1,10:8}},{reduce:{100:1},add:{10:10}},{reduce:{100:1},add:{50:1,20:1,10:2,5:2}},{reduce:{100:1},add:{50:1,20:1,10:2,5:1,2:2,1:1}},{reduce:{100:1},add:{50:1,10:3,5:3,2:2,1:1}},{reduce:{100:1},add:{50:1,20:1,10:1,5:2,2:4,1:1,.5:1,.2:1,.1:2,.05:2}},{reduce:{50:1},add:{20:2,5:2}},{reduce:{50:1},add:{10:5}},{reduce:{50:1},add:{10:4,5:2}},{reduce:{50:1},add:{10:4,5:1,2:2,1:1}},{reduce:{50:1},add:{20:1,10:1,5:4}},{reduce:{50:1},add:{10:3,5:3,2:2,1:1}},{reduce:{50:1},add:{20:2,10:1}},{reduce:{50:1},add:{20:1,2:10,5:2}},{reduce:{20:1},add:{10:1,5:2}},{reduce:{20:1},add:{10:1,5:1,2:2,1:1}},{reduce:{20:1},add:{5:3,2:2,1:1}},{reduce:{20:1},add:{2:10}},{reduce:{20:1},add:{5:4}},{reduce:{10:1},add:{5:2}},{reduce:{10:1},add:{5:1,2:2,1:1}},{reduce:{10:1},add:{2:5}},{reduce:{10:1},add:{5:1,1:1,.5:7,.2:2,.1:1}},{reduce:{10:1},add:{5:1,1:1,.5:6,.2:4,.1:2}},{reduce:{10:1},add:{2:4,1:1,.1:5,.05:10}},{reduce:{5:1},add:{2:2,1:1}},{reduce:{5:1},add:{1:5}},{reduce:{5:1},add:{2:2,.5:2}},{reduce:{5:1},add:{2:1,1:2,.5:2}},{reduce:{5:1},add:{1:1,.5:7,.2:2,.1:1}},{reduce:{2:1},add:{1:2}},{reduce:{1:1},add:{.5:2}},{reduce:{.5:1},add:{.2:2,.1:1}},{reduce:{.2:1},add:{.1:2}},{reduce:{.1:1},add:{.05:2}},{reduce:{2:1},add:{1:1,.5:1,.2:2,.1:1}},{reduce:{2:1},add:{1:1,.1:5,.05:10}},{reduce:{1:1},add:{.1:10}},{reduce:{1:1},add:{.1:5,.05:10}},{reduce:{.5:1},add:{.1:5}},{reduce:{.5:1},add:{.05:10}},{reduce:{.05:1},add:{.01:3,.02:1}}];let t=e;return t})()});var Sie,slt=Q(()=>{Ci();n6();Sie=class{constructor(e,n){this.router=e,this.dialogService=n,this.showLoading=!1,this.winningGame={text:"Gewinnspiel",icon:"close",click:()=>this.router.navigateByUrl("/win")},this.jsonData={text:"Event JSON data",icon:"close",click:()=>O(this,null,function*(){let i=this.dialogService.showComponentFull(nu)})},this.newEvent={text:"neuer Termin",click:()=>this.router.navigateByUrl("/eventedit-overrides/%5Bnull,null,%2220191023T040000%22,%2220191023T050000%22,%22ZW1wZmFuZ0BueHQtbHZsLmluaw%22,null,null,%5B%5D,null,null,null,null,null,null,null,null,null,null,null,%5B%5D,null,%5B%5D%5D")},this.testEvent={text:"test Termin",click:()=>{}},this.toggleLoading={text:"Lade...",click:()=>{this.showLoading?this.dialogService.showLoading(_n.Test,"Kalender wird aktualisiert..."):this.dialogService.hideLoading(_n.Test),this.showLoading=!this.showLoading}},this.cashToday={text:"Kasse heute",click:()=>{window.open("http://192.168.5.2:82/api/getPayments","Kasse heute","width=600,height=400,status=yes,scrollbars=yes,resizable=yes").focus()}},this.markDublicateContacts={text:"doppelte Kontakte name markieren",click:()=>{window.open("http://192.168.5.2:82/api/getDuplicateContacts","doppelte Kontakte","width=600,height=400,status=yes,scrollbars=yes,resizable=yes").focus()}},this.showDoubleContactsPhone={text:"doppelte Kontakte phone",click:()=>{window.open("http://192.168.5.2:82/api/getDuplicateContactsPhone","doppelte Kontakte Telefonnummer","width=600,height=400,status=yes,scrollbars=yes,resizable=yes").focus()}},this.bodyPuts={text:"K\xF6rperstellen",click:()=>{window.open("http://jsoneditoronline.org/?id=efddcc1c8fb94d5ba7d0f011f25db9f2","K\xF6rperstellen","width=600,height=400,status=yes,scrollbars=yes,resizable=yes").focus()}},this.bodyPutsTranslate={text:"K\xF6rperstellen \xFCbers.",click:()=>{window.open("http://jsoneditoronline.org/?id=4aa958fd7311465eb42fd7540f65f28b","K\xF6rperstellen \xFCbers.","width=600,height=400,status=yes,scrollbars=yes,resizable=yes").focus()}},this.showDebugPage={text:"debug",click:()=>this.router.navigateByUrl("/debug")}}}});var Tie,Obe=Q(()=>{me();L1();Tie=(()=>{let e=class e{constructor(i){this.httpClient=i}};e.\u0275fac=function(r){return new(r||e)(it(Uc))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function VTi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",4,1),F("click",function(){V(n);let r=w();return B(r.menuClicked())}),y(2,"more_vert "),ee(3,"mat-icon"),p()}if(t&2){w();let n=pr(2);b("matMenuTriggerFor",n)}}function BTi(t,e){if(t&1){let n=re();h(0,"button",6)(1,"mat-icon"),y(2),p(),h(3,"span",7),F("click",function(){let r=V(n).$implicit;return B(r.click())}),y(4),p()()}if(t&2){let n=e.$implicit;g(2),ye(n.icon),g(2),ye(n.text)}}function zTi(t,e){if(t&1&&(h(0,"div"),W(1,BTi,5,2,"button",5),p()),t&2){let n=w();g(),b("ngForOf",n.buttons)}}var NTi,alt,llt=Q(()=>{slt();gu();fx();Ja();ls();ri();me();Ci();ma();gu();Obe();NTi=["menuTrigger"];alt=(()=>{let e=class e{constructor(i,r,s,o){this.dialogService=i,this.router=r,this.shortcutService=s,this.versionService=o,this.showLoading=!1,this.normalButtons=[],this.debugButtons=[],this.menuClickedCounter=0,this.showMenuButton=!1,this.version="",this.shortcutService.onKeyPress.subscribe(a=>{a===Pn.CtrlM&&(this.showMenuButton=!this.showMenuButton)}),this.menuButtons=new Sie(r,i),this.initButtons(),this.buttons=this.normalButtons}ngOnInit(){}menuClicked(){this.menuClickedCounter++,setTimeout(()=>this.menuClickedCounter=0,800),this.menuClickedCounter===3&&(this.removeDebugButtons(),this.addDebugButtons())}addDebugButtons(){this.buttons=[...this.normalButtons,...this.debugButtons]}removeDebugButtons(){this.buttons=this.normalButtons}initButtons(){this.normalButtons=[this.menuButtons.bodyPuts,this.menuButtons.bodyPutsTranslate,this.menuButtons.markDublicateContacts,this.menuButtons.showDoubleContactsPhone,this.menuButtons.jsonData],this.debugButtons=[this.menuButtons.cashToday,this.menuButtons.showDebugPage,this.menuButtons.testEvent,this.menuButtons.toggleLoading,this.menuButtons.winningGame,this.menuButtons.newEvent]}};e.\u0275fac=function(r){return new(r||e)(R(vt),R(Ll),R(fu),R(Tie))},e.\u0275cmp=_e({type:e,selectors:[["nxt-app-menu"]],viewQuery:function(r,s){if(r&1&&ei(NTi,7,Zy),r&2){let o;Pt(o=Rt())&&(s.menuTrigger=o.first)}},standalone:!0,features:[xe],decls:4,vars:2,consts:[["menu","matMenu"],["menuTrigger",""],["mat-icon-button","","aria-label","Men\xFC","class","menu-button",3,"matMenuTriggerFor","click",4,"ngIf"],[4,"ngIf"],["mat-icon-button","","aria-label","Men\xFC",1,"menu-button",3,"click","matMenuTriggerFor"],["mat-menu-item","",4,"ngFor","ngForOf"],["mat-menu-item",""],[3,"click"]],template:function(r,s){r&1&&(W(0,VTi,4,1,"nxt-button-icon",2),h(1,"mat-menu",null,0),W(3,zTi,2,1,"div",3),p()),r&2&&(b("ngIf",s.showMenuButton),g(3),b("ngIf",s.buttons))},dependencies:[Ct,an,Zy,Zr,d3,Hi,_g],styles:[".menu-button[_ngcontent-%COMP%]{position:fixed;top:0;left:-16px;z-index:100000}"]});let t=e;return t})()});var q4,iF=Q(()=>{jo();zn();dT();q4=class t{static getHoursPerWeek(e,n,i){let r=n.dateParse();if(!e.hoursPerWeek)return 0;let s=e.hoursPerWeek.find(o=>{let a=r>=o.startDateString?.dateParse()||0,l=!o.endDateString||r<=o.endDateString.dateParse();return a&&l});if(s?.value){let o=0;return i&&(o=this.getPublicHolidayCountInWeek(e,n,i)*8),s.value-o}return 0}static getFreeDays(e,n){e.givenName==="Salome"&&n==="2024-08-12"&&console.log("getFreeDays",e,n);let i=n.dateParse();if(e.endDateString&&i>=e.endDateString.dateParse())return[];let r=e.freeDays?.find(s=>{let o=i>=s.startDateString?.dateParse()||0,a=!s.endDateString||i<=s.endDateString.dateParse();return o&&a});return r?.value?r.value:[]}static getPublicHolidayCountInWeek(e,n,i){let r=Ie.getMondayBefore(n,0),s=r.dateAddDays(6),o=0,a=t.getFreeDays(e,n);return Ie.forEachDay(r.dateFormatDate(),s.dateFormatDate(),l=>{if(kv.getPublicHoliday(l,i)){let c=Ie.getDayOfWeek(l);a.includes(c)||o++}}),o}static getEmpty(){return{givenName:"",familyName:"",fullName:"",abbreviation:"",birthday:"",mobile:"",hoursPerWeek:[],shouldPlanWork:!1,color:"",appUserUid:"",timeTrackOnlyFromStudio:!1,doTimeTrack:!1,seeWorkTime:!1,freeDays:[],telegramChatId:0,startDateString:"",endDateString:"",holidayCount:[],earliestStartDependOnWorkplace:!1,hasLeft:!1}}static getEmptyEmployeeEvent(){return{dateString:"",date:0,employeeId:"",start:0,end:0,type:"work",employeeName:"",workplaces:[],studio:"",label:"",infos:[]}}static test(){let e=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("01:00")),"HH:mm"),n=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("02:00")),"HH:mm"),i=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("03:00")),"HH:mm"),r=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("04:15")),"HH:mm"),s=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("05:30")),"HH:mm"),o=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("09:00")),"HH:mm"),a=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("09:15")),"HH:mm"),l=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("09:29")),"HH:mm"),c=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("09:31")),"HH:mm"),d=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("09:45")),"HH:mm"),u=Qt.format(t.getMinBreakFromDayWorkDuration(Qt.parse("09:46")),"HH:mm")}static getMinBreakFromDayWorkDuration(e){return e>Qt.DURATION_1HOUR*9+Qt.DURATION_1MINUTE*30?Qt.DURATION_1MINUTE*45:e>Qt.DURATION_1HOUR*6+Qt.DURATION_1MINUTE*15?Qt.DURATION_1MINUTE*30:e>Qt.DURATION_1HOUR*2?Qt.DURATION_1MINUTE*15:0}static fixHolidayOrSickDayDuration(e,n){return n>Qt.DURATION_1HOUR*7?Qt.DURATION_1HOUR*8:n>Qt.DURATION_1HOUR*4?Qt.DURATION_1HOUR*4:n}}});var clt,dlt=Q(()=>{me();$n();me();clt=(()=>{let e=class e{constructor(){this.onFocusChanged=new nt,this.activeElement=new qs(document.activeElement)}checkFocusElement(i){this.lastFocusElement!==i&&(this.activeElement.next(i),this.onFocusChanged.emit({lastFocusElement:this.lastFocusElement,focusElement:i}),this.lastFocusElement=i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Die,ult=Q(()=>{ef();Lj();Die=class{get inventorySourcesOfSupply(){return this._inventorySourcesOfSupply.sortString("text")}constructor(e,n,i){this.collection=e,this.getUsername=n,this.studio=i,this.inventoryLocations=[{text:"Studio",value:"studio"},{text:"Piercing",value:"piercing"},{text:"K\xFCche",value:"kitchen"},{text:"Reinigung",value:"cleaning"}],this._inventorySourcesOfSupply=[{text:"ALDI",value:"ALDI"},{text:"Amazon",value:"Amazon"},{text:"DM / Rossmann",value:"DM / Rossmann"},{text:"Hygi",value:"Hygi"},{text:"Killer Ink",value:"Killer Ink"},{text:"Office Discount",value:"Office Discount"},{text:"Magic Moon",value:"Magic Moon"},{text:"Rezwan Haque",value:"Rezwan Haque"},{text:"Sorry Mom Mallorca",value:"Sorry Mom Mallorca",printEn:!0},{text:"Osman",value:"Osman"},{text:"Flyeralarm",value:"Flyeralarm"},{text:"WIRmachenDRUCK",value:"WIRmachenDRUCK"},{text:"Onlineprinters",value:"Onlineprinters"},{text:"Rezwan",value:"Rezwan"},{text:"Mercadona",value:"Mercadona"},{text:"Flaschenpost",value:"Flaschenpost"},{text:"Sonstige",value:"Sonstige"},{text:"Rex-Rotary",value:"Rex-Rotary"},{text:"Franz Mensch",value:"Franz Mensch"},{text:"TattooKing",value:"TattooKing"},{text:"Suministros Clinicos Baleares S.L",value:"Suministros Clinicos Baleares S.L"},{text:"Sharon",value:"Sharon",viewOrderListText:!0},{text:"GO2",value:"GO2",specialButton:"go2export"}],this.inventoryStockRawItemsLoaded=!1,this._inventoryStockRawItems=new R9([]),this.clearIsRunning=!1,this.studio==="Aachen"&&(this.studio="Villa"),i==="Brudis"&&(this.inventoryLocations=[{text:"Bar",value:"bar"},{text:"Barlager",value:"bar-stock"},{text:"K\xFCche",value:"kitchen"},{text:"K\xFCchenlager",value:"kitchen-stock"}],this._inventorySourcesOfSupply=[{text:"Distribuidora Rotger",value:"Distribuidora Rotger"},{text:"Lavazza",value:"Lavazza"},{text:"Giovanni L.",value:"Giovanni L."},{text:"Disbal Voldis",value:"Disbal Voldis"},{text:"Distribuidora Tunel",value:"Distribuidora Tunel"},{text:"Mercadona",value:"Mercadona"},{text:"Knapp",value:"Knapp"},{text:"Garcimar",value:"Garcimar"},{text:"Palmafruit",value:"Palmafruit"},{text:"Makro",value:"Makro"},{text:"A.A.Dunn",value:"A.A.Dunn"},{text:"Ille",value:"Ille"}])}get inventoryStockItems(){return this._inventoryStockItems||(this._inventoryStockItems=new R9([]),this.inventoryStockSubscription?.unsubscribe(),this.inventoryStockSubscription=this.inventoryStockValueChanges().subscribe(e=>{this._inventoryStockRawItems.next(e),this.inventoryStockRawItemsLoaded=!0;let n=this.mergeInventoryItemsAndStock(this.inventoryItems.value,e);this._inventoryStockItems.next(n)}),this.inventoryItemsInternSubscription?.unsubscribe(),this.inventoryItemsInternSubscription=this.inventoryItems.subscribe(e=>{let n=this.mergeInventoryItemsAndStock(e,this._inventoryStockRawItems.value);this.inventoryStockRawItemsLoaded&&this._inventoryStockItems.next(n)})),this._inventoryStockItems}get inventoryItems(){return this._inventoryItems||(this._inventoryItems=new R9([]),this.inventoryItemsSubscription=this.inventoryItemsValueChanges().subscribe(e=>{e.forEach(n=>{n.packages||(n.packages=[]),(typeof n.amountAlarm!="number"||Number.isNaN(n.amountAlarm))&&(n.amountAlarm=0),(typeof n.amountFull!="number"||Number.isNaN(n.amountFull))&&(n.amountFull=0)}),this._inventoryItems.next(e)})),this._inventoryItems}mergeStockItemWithItem(e,n){n||(n={amount:0,studio:this.studio});let i=ve({},n);return i.id=e.id,i.name=e.name,i.nameEn=e.nameEn,i.nameBySource=e.nameBySource,i.amountPerPackage=e.amountPerPackage,i.location=e.location,i.deleted=e.deleted,i.orderValue=e.orderValue,i.deleted=!!e.deleted,i.unitOfMeasure=e.unitOfMeasure,i.nfcId=e.nfcId,i.sourceOfSupply=e.sourceOfSupply,i.sourceOfSupplyUrl=e.sourceOfSupplyUrl,i.sourceOfSupply2=e.sourceOfSupply2,i.sourceOfSupply2Url=e.sourceOfSupply2Url,i.amountFull=e.amountFull,i.amountAlarm=e.amountAlarm,i.responsibility=e.responsibility,i.responsibility2=e.responsibility2,i.orderedByAc=e.orderedByAc,i.onlyFullOrEmptyInfo=e.onlyFullOrEmptyInfo,i.onlyFullOrEmpty=e.onlyFullOrEmpty,i.packages=e.packages,i.notOrderBefore=e.notOrderBefore,i}getSourceText(e){return this.inventorySourcesOfSupply.find(n=>n.value===e)?.text}getSourceValue(e){return this.inventorySourcesOfSupply.find(n=>n.text===e)?.value}destroy(){this.unsubscribeAll()}unsubscribeAll(){this.inventoryStockSubscription?.unsubscribe(),this.inventoryItemsInternSubscription?.unsubscribe(),this.inventoryItemsSubscription?.unsubscribe()}mergeInventoryItemsAndStock(e,n){let i=[];if(e.length===0)return[];for(let s of e){let o=n.find(a=>a.id===s.id&&a.studio===this.studio);i.push(this.mergeStockItemWithItem(s,o))}return i.filter(s=>!s.deleted)}upsertInventoryItem(e,n){return O(this,null,function*(){if(e.lastOrders){delete e.lastOrders;debugger}if(e.studio){delete e.studio;debugger}if(e.amount){delete e.amount;debugger}e.onlyFullOrEmpty||(e.onlyFullOrEmpty=!1),e.onlyFullOrEmptyInfo||(e.onlyFullOrEmptyInfo="");let i="",r;return e.id?(i="update",r=yield this.collection("inventory-items").doc(e.id).set(e)):(e.id=ua.generate(),i="create",r=yield this.collection("inventory-items").doc(e.id).set(e)),this.collection("history/inventory-items/"+e.id).add({data:JSON.stringify(e),created:new Date,user:n,action:i}),r})}book(e,n,i){return O(this,null,function*(){try{let r=this.inventoryStockItems.value.find(_=>_.id===e);if(!r)throw Error("inventoryItem "+e+" not found");r&&r.onlyFullOrEmpty&&(r.amount===1&&i>0&&(i=0),r.amount===0&&i<0&&(i=0));let s=this._inventoryStockRawItems.value.find(_=>_.id===e&&_.studio===n),o,a="",l=0,c=0,d;if(typeof i=="string"&&(i=parseInt(i,10)),s){typeof s.amount=="string"&&(s.amount=parseInt(s.amount,10)),l=s.amount,c=s.amount+i,r.onlyFullOrEmpty&&(c>0?c=1:c<1&&(c=0)),a=s.id+"_"+n;let _={amount:c,updatedAt:new Date,updatedBy:yield this.getUsername()};d=yield this.collection("inventory-stock").doc(s.id+"_"+n).update(_)}else o=this.inventoryItems.value.find(_=>_.id===e),o.amount=i,c=o.amount,o.studio=n,a=o.id+"_"+n,o.updatedAt=new Date,o.updatedFrom=yield this.getUsername(),d=yield this.collection("inventory-stock").doc(o.id+"_"+n).set(o);let u={createdBy:yield this.getUsername(),id:a,stockItemId:e,studio:n,createdAt:new Date,oldAmount:l,newAmount:c},m=yield this.collection("history/inventory-stock/"+a).doc(ua.generate()).set(u),f=s||o;return d}catch(r){throw new Error(`inventory-list.service.book failed
`+r.message)}})}inventoryItemsValueChanges(){if(this.collection)return this.collection("inventory-items").valueChanges()}inventoryStockValueChanges(){if(this.collection)return this.collection("inventory-stock").valueChanges()}}});var z3,Gw=Q(()=>{ult();me();zy();Kr();Cs();R7();z3=(()=>{let e=class e extends Die{constructor(i,r,s,o){super(i.collection.bind(i),r.getUsername.bind(r),s.config.value.studiosWithoutSideCash.find(a=>!["Alsdorf","Brand"].includes(a.name)).name),this.firestoreService=i,this.loginService=r,this.configService=s,this.telegramService=o}upsertInventoryItem(i,r){return super.upsertInventoryItem(i,r)}};e.\u0275fac=function(r){return new(r||e)(it(ff),it(Fi),it(Xi),it(p3))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Eie,Nbe=Q(()=>{me();zy();Gw();Kr();Eie=(()=>{let e=class e{constructor(i,r,s){this.firestoreService=i,this.inventoryService=r,this.loginService=s}resetOrderValueInCollection(i,r){return O(this,null,function*(){let s=(yield this.firestoreService.collection(i,o=>o.orderBy(r)).get().toPromise()).docs;for(let[o,a]of s.entries()){let l=a.data(),c=(o+1)*1e5;l.orderValue!==c&&(l.orderValue=c,yield this.inventoryService.upsertInventoryItem(l,this.loginService.getUsername()))}})}};e.\u0275fac=function(r){return new(r||e)(it(ff),it(z3),it(Fi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var plt,mlt=Q(()=>{me();plt=(()=>{let e=class e{constructor(i,r,s){this.componentFactoryResolver=i,this.appRef=r,this.injector=s}appendComponentToBody(i){let r=this.componentFactoryResolver.resolveComponentFactory(i).create(this.injector);this.appRef.attachView(r.hostView);let s=r.hostView.rootNodes[0];document.body.appendChild(s)}};e.\u0275fac=function(r){return new(r||e)(it(yy),it(Cy),it($o))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var B6,ZE=Q(()=>{me();B6=(()=>{let e=class e{constructor(){}flash(){let i=document.querySelector("#hiddenElectronCommand");i&&(i.value="_flash")}show(){let i=document.querySelector("#hiddenElectronCommand");i&&(i.value="_show")}openExternal(i){this.send("openExternal",[i])||window.open(i,"_blank")}send(i,r){let s=document.querySelector("#hiddenElectronCommand");return s?s.value?!1:(s.value=JSON.stringify({channel:i,args:r}),!0):!1}getApp(){let i=document.querySelector("#nxtApp");if(i)return i.value}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var flt,glt=Q(()=>{Vbe();jo();ef();B8();me();yi();Kr();Ci();ZE();flt=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.loginService=r,this.dialogService=s,this.electronService=o,this.lastCheck=0,this.isEnabledRestartOnFrozen=!1,this.idleStart=0,this.isEnabledRestartOnIdle=!1,this.lastMouseCounter=0,this.id=ua.generate(),setInterval(()=>{this.check()},5e3)}enableRestartOnIdle(){this.isEnabledRestartOnIdle=!0}disableRestartOnIdle(){this.isEnabledRestartOnIdle=!1}enableRestartOnFrozen(){this.isEnabledRestartOnFrozen=!0}disableRestartOnFrozen(){this.isEnabledRestartOnFrozen=!1}check(){if(this.lastCheck>0){let i=Date.now()-this.lastCheck;i>Qt.DURATION_1MINUTE&&this.wasFrozen(i)}this.lastCheck=Date.now(),rF.mouseMoveCounter===this.lastMouseCounter?this.idleStart===0&&(this.idleStart=Date.now()):this.idleStart=0,this.isEnabledRestartOnIdle&&this.idleStart>0&&Date.now()-this.idleStart>30*Qt.DURATION_1MINUTE&&(this.socketService.sendTelegramAdmin(this.loginService.getUsername()+` ist seit 30 Minuten idle -> reload
`+window.location.href),setTimeout(()=>{Cm.reload("idle")},3e3))}wasFrozen(i){this.isEnabledRestartOnFrozen&&(this.dialogService.showOk("Frozen-Reload"),this.socketService.sendTelegramAdmin(this.id+`
`+this.loginService.getUsername()+" is frozen ("+i+`) -> reload
`+window.location.href),setTimeout(()=>Cm.reload("wasFrozen"),1e3))}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(Fi),it(vt),it(B6))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var vlt,ylt=Q(()=>{zn();jo();pZ();me();yi();Kr();Ci();vlt=(()=>{let e=class e{constructor(i,r,s){this.socketService=i,this.loginService=r,this.dialogService=s,this.wrongTimeCounter=0,this.timeCheckIsRunning=!1,setTimeout(()=>this.init())}init(){this.checkTime()}checkTime(){return O(this,null,function*(){let i=6e4;if(this.socketService.state.value.authenticated&&!this.timeCheckIsRunning){this.timeCheckIsRunning=!0;try{let r=Date.now(),s=yield this.socketService.getTime2();if(Date.now()-r>1e3)return;if(Wy.serverDiff=s-r,Math.abs(s-Date.now())>Qt.DURATION_1MINUTE*2?this.wrongTimeCounter++:this.wrongTimeCounter=0,this.wrongTimeCounter>3){let a=`Die Uhrzeit an deinem PC ist falsch eingestellt, bitte richtig einstellen

Dein PC: `+Ie.formatNow("dd.MM.yyyy HH:mm")+`

Richtig:`+s.dateFormat("dd.MM.yyyy HH:mm");this.socketService.sendTelegramAdmin("Falsche Uhrzeit bei "+this.loginService.getUsername()+`
`+Ie.formatNow("dd.MM.yyyy HH:mm")),yield this.dialogService.showOk(a),this.wrongTimeCounter=0}}catch{}this.timeCheckIsRunning=!1}else i=1e4;setTimeout(()=>this.checkTime(),i)})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(Fi),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var _lt,Clt=Q(()=>{me();yi();_lt=(()=>{let e=class e{constructor(i){this.socketService=i,this.lastActive=0}setIsActive(){Date.now()-this.lastActive>5e3&&(this.lastActive=Date.now())}};e.\u0275fac=function(r){return new(r||e)(it(lt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var xlt,blt=Q(()=>{me();Ci();IX();me();xlt=(()=>{let e=class e{constructor(){this.dialogService=Ve(vt),setTimeout(()=>this.init())}init(){return O(this,null,function*(){this.dialogService.showShopOrder.subscribe(i=>O(this,null,function*(){this.showShopOrder(i)}))})}showShopOrder(i){this.dialogService.showComponentDialog(zA,{shopOrderId:i}).componentInstance.load().then()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function KTi(t,e){t&1&&(h(0,"div",7),y(1,"HIER IST DIE APP COMPONENT"),p())}function YTi(t,e){if(t&1){let n=re();h(0,"div",11),F("dblclick",function(){V(n);let r=w(2);return B(r.setClientId())}),y(1),p()}if(t&2){let n=w(2);g(),Ke(" ",n.version," ")}}function qTi(t,e){if(t&1){let n=re();h(0,"div",12),Ce(1,"async"),F("dblclick",function(){V(n);let r=w(2);return B(r.disconnect())}),y(2," C "),p()}if(t&2){let n=w(2);jr((tt(1,2,n.socketService.state).connected?"background-green":"background-red")+" info-char no-select")}}function ZTi(t,e){if(t&1){let n=re();h(0,"div",12),Ce(1,"async"),F("dblclick",function(){V(n);let r=w(2);return B(r.disconnect())}),y(2," A "),p()}if(t&2){let n=w(2);jr((tt(1,2,n.socketService.state).authenticated?"background-green":"background-red")+" info-char no-select")}}function XTi(t,e){if(t&1){let n=re();h(0,"div",12),Ce(1,"async"),F("dblclick",function(){V(n);let r=w(2);return B(r.disconnect())}),y(2," G "),p()}if(t&2){let n=w(2);jr((tt(1,2,n.firebaseLoginService.isLoggedIn)?"background-green":"background-red")+" info-char no-select")}}function QTi(t,e){if(t&1&&(h(0,"div",8),W(1,YTi,2,1,"div",9)(2,qTi,3,4,"div",10)(3,ZTi,3,4,"div",10)(4,XTi,3,4,"div",10),p()),t&2){let n=w();g(),b("ngIf",n.showVersionInfo&&!1),g(),b("ngIf",n.showVersionInfo),g(),b("ngIf",n.showVersionInfo),g(),b("ngIf",n.showVersionInfo)}}var Bbe,mC,rF,Vbe=Q(()=>{me();Bbe=Gs(Jm());a4();$n();yi();Ci();Kr();ma();Ld();Gi();gu();elt();VX();VN();zn();jo();rlt();Nu();My();pC();oz();bl();llt();ri();ls();$D();Ul();B8();iF();aV();me();Jk();yi();Ci();Kr();od();w4();q_e();gu();dlt();z1();o1();j5();Nbe();Obe();ma();oV();mlt();Cs();glt();ylt();Clt();fN();blt();Vt();mC=class mC extends bt{constructor(e,n,i,r,s,o,a,l,c,d,u,m,f,_,x,D,E,M,I,z,G,A,Y,X,ne,pe,ce){super(),this.firebaseLoginService=e,this.socketService=n,this.dialogService=i,this.loginService=r,this.sanitizer=s,this.clipboardService=o,this.routeService=a,this.shortCutService=l,this.focusService=c,this.bodyPutService=d,this.cacheService=u,this.downloadService=m,this.manualDataOrderService=f,this.versionService=_,this.route=x,this.router=D,this.firestore=E,this.domService=M,this.configService=I,this.idleService=z,this.serverService=G,this.userActiveTrackService=A,this.screenService=Y,this.localeId=X,this.matDateLocaleId=ne,this.shopOrderService=pe,this.cdRef=ce,this.debounceAllButFirst$=new Mi,this.inputStream$=new Mi,this.title="ng-nxtlvlink",this.showAccountBar=!1,this.version="",this.showVersionInfo=!0,this.isFirstRoute=!0,this.lastMouseMove=0,this.lastErrorMessageSent="";let ie=G8.generateNxt();mC.cdRef=this.cdRef;let le=Bbe.default.localeData("de");console.log("----------------------"),console.log("----------------------"),console.log("----------------------"),console.log("----------------------"),console.log("localeDe",le),console.log("----------------------"),console.log("----------------------"),console.log("----------------------"),console.log("----------------------"),this.streamTest(),m4.test(),Ie.test(),Qt.test(),cr.test(),Kc.test(),ca.test(),q4.test(),op("0 6 * * *",()=>O(this,null,function*(){setTimeout(()=>{Ie.formatNow("HH")==="06"&&Cm.reload("6 Uhr morgens")},3e3)})),this.checkReloadOldPage(),this.socketService.registerOn("server-error",Se=>O(this,null,function*(){let je=zi.instance.showIframe("server-error","Error");yield this.dialogService.showOk(Se,{title:"Fehler"}),je===_v.Hide&&zi.instance.hideIframe("server-info")})),this.socketService.registerOn("server-message",Se=>O(this,null,function*(){let je=zi.instance.showIframe("server-info","Error");yield this.dialogService.showOk(Se,{buttonText:"OK"}),je===_v.Hide&&zi.instance.hideIframe("server-info")})),this.socketService.registerOn("welcome-message",Se=>O(this,null,function*(){let je=zi.instance.showIframe("server-info","Error");yield this.dialogService.showOk(Se,{buttonText:"Let's go!"}),this.socketService.setWelcomeMessageRead(),je===_v.Hide&&zi.instance.hideIframe("server-info")})),this.socketService.registerOn("pre-update",Se=>O(this,null,function*(){this.dialogService.updateIsPreparing=!0,this.dialogService.showLoading(_n.PreUpdate,"Update wird vorbereitet..."),setTimeout(()=>{this.dialogService.hideLoading(_n.PreUpdate)},Qt.DURATION_1MINUTE*5),zi.instance.showIframe("server-info","Error")===_v.Hide&&zi.instance.hideIframe("server-info")})),this.socketService.registerOn("pre-pre-update",Se=>O(this,null,function*(){let je=zi.instance.showIframe("server-info","Error");yield this.dialogService.showOk(`Ank\xFCndigung eines Updates in ca. 2 Min.
Hast du was zu speicher? Mach es jetzt!`,{timeoutSeconds:120}),je===_v.Hide&&zi.instance.hideIframe("server-info")})),this.socketService.registerOn("server-restart",Se=>O(this,null,function*(){if(this.dialogService.updateIsPreparing)return;let je=zi.instance.showIframe("server-info","Error");this.dialogService.showLoading(_n.ServerDoRestart,"kurze Wartezeit..."),je===_v.Hide&&zi.instance.hideIframe("server-info")})),this.bodyPutService.init(),window.addEventListener("focus",this.windowFocus.bind(this),!0),window.addEventListener("blur",this.windowBlur.bind(this),!0),this.shortCutService.init(),this.firebaseLoginService.init(),Gn.onSocketError.subscribe(Se=>{this.dialogService.showOk(Se,{title:"Fehler"})}),Gn.onError.subscribe(Se=>O(this,null,function*(){try{this.dialogService.hideLoading(void 0,!0);let je=!0;if(this.checkShowError(Se)){if(typeof Se?.message=="string"&&Se.message.indexOf("$ServerErrorStart$")>-1){let ze=Qn.parse(Se.message.substring(Se.message.indexOf("$ServerErrorStart$")+18,Se.message.indexOf("$ServerErrorEnd$")));this.dialogService.showOk(ze.message,{title:ze.title})}else if(Se.errorId){let ze=yx.getTitle(Se),Ge=yx.getMessage(Se);Ge&&this.dialogService.showOk(Ge,{title:ze}),je=Se.isError}else if(!(Se.message==="Missing or insufficient permissions."&&!this.firebaseLoginService.isLoggedIn.getValue()))if(Se.message.includes("The password is invalid or the user does not have a password"))this.dialogService.showOk("Falsches Passwort",{title:"Login Fehlgeschlagen"});else{let[ze,Ge]=Se.message.split("[Stack]"),Ae=ze;this.loginService.isJulian()&&(Ae=ze+'<div class="text-80">Julian: '+Ge+"</div>"),this.dialogService.showOk(Ae,{title:"Fehler",timeoutSeconds:20}),this.loginService.getUsername()==="Artist-foto-info"&&Cm.reload("Fehler bei Artist-Foto-TV")}je&&(Se.stack?this.sendErrorToServer(Se.message+`

`+Se.stack):this.sendErrorToServer(Se.message))}}catch(je){console.error(je)}})),D.events.subscribe(Se=>{Se instanceof YN,Se instanceof Av&&this.isFirstRoute&&!Se.url.startsWith("/login?")&&(this.checkRouteChildData(),this.isFirstRoute=!1)}),zi.instance=new zi(this.socketService),Bbe.default.locale("de"),this.imageUrls=[],this.lastObjectUrl="",this.shortCutService.onKeyPress.subscribe(Se=>{Se===Pn.CtrlL&&(this.showAccountBar=!this.showAccountBar)}),vie.prototype.validateLicense=function(){this.isDisplayWatermark=()=>!1}}nxtOnDestroy(){}windowFocus(){this.focusService.checkFocusElement(document.activeElement)}windowBlur(){this.focusService.checkFocusElement(document.activeElement)}onResize(){this.screenService.calc()}onMousemove(e){this.userActiveTrackService.setIsActive()}onKeyPress(e){this.userActiveTrackService.setIsActive()}pastListener(e){this.clipboardService.handlePaste(e)}mousemove(e){this.lastMouseMove=Date.now(),mC.mouseMoveCounter++}ngOnInit(){return O(this,null,function*(){this.registerFirebaseLoginListener(),this.showVersion()})}handleKey(e){Gn.info(e)}registerConnectionListener(){this.connectionChangeListenerSubscription&&this.connectionChangeListenerSubscription.unsubscribe(),this.connectionChangeListenerSubscription=this.socketService.state.subscribe(e=>{typeof e.connected>"u"||(e.connected&&(Gn.info("CLOSE OFFLINE-DIALOG"),this.dialogService.hideConnectionListDialog()),setTimeout(()=>{!this.socketService.state.getValue().connected&&this.firebaseLoginService.isLoggedIn.getValue()&&(this.lastDisconnect=Date.now(),this.dialogService.showConnectionLostDialog())},5e3))})}registerFirebaseLoginListener(){this.pushSubscription=this.firebaseLoginService.onLoginChanged.subscribe(e=>{e?this.accountInfoText=e.name+" ("+e.email+")":this.accountInfoText="anmelden"})}showVersion(){return O(this,null,function*(){})}checkRouteChildData(){let e=this.route?.snapshot?.firstChild?.data;e?.hideVersionInfo?this.showVersionInfo=!1:this.showVersionInfo=!0,e?.disableSocket?this.socketService.disableSocket=!0:(this.registerConnectionListener(),this.socketService.startReconnectInterval())}sendErrorToServer(e){try{if(this.lastErrorMessageSent===e){setTimeout(()=>{this.lastErrorMessageSent=""},3e4);return}this.lastErrorMessageSent=e;let n=Fi.instance.getUsername().toUpperCase();n+=`
`+Fi.instance.getStudio().toUpperCase(),n+=`
`+window.location.href,n+=`
`+e,lt.instance.sendTelegramError(n)}catch{}}checkShowError(e){return e?.message!=="Cannot read property 'get' of null"}setClientId(){return O(this,null,function*(){let e=yield(yield this.dialogService.showInputOld({message:"Eindeutiger Name des Computers",prompt:this.socketService.storageClientId.value})).afterClosed().toPromise();e&&this.socketService.setClientId(e)})}disconnect(){this.socketService.disconnectSocket()}streamTest(){this.inputStream$=new Mi,this.inputStream$.pipe(A7(800)).subscribe(n=>{console.log("subscribe: "+n)})}checkReloadOldPage(){}};mC.startup=Date.now(),mC.mouseMoveCounter=0,mC.\u0275fac=function(n){return new(n||mC)(R(q_),R(lt),R(vt),R(Fi),R(Uo),R(ep),R(iee),R(fu),R(clt),R(Oc),R(cc),R(X1),R(Eie),R(Tie),R(gs),R(Ll),R(Zk),R(plt),R(Xi),R(flt),R(vlt),R(_lt),R(Z9),R(Z0),R(k8),R(xlt),R(Kt))},mC.\u0275cmp=_e({type:mC,selectors:[["nxt-root"]],hostBindings:function(n,i){n&1&&F("resize",function(s){return i.onResize(s)},!1,vy)("mousemove",function(s){return i.onMousemove(s)},!1,k9)("keypress",function(s){return i.onKeyPress(s)},!1,k9)("paste",function(s){return i.pastListener(s)})("mousemove",function(s){return i.mousemove(s)})},standalone:!0,features:[et,xe],decls:11,vars:2,consts:[[2,"position","fixed","left","-500px"],[1,"material-symbols-outlined","icon-image-preview"],[1,"wrapper"],[1,"app-button"],["style","font-size: 100px; color: red",4,"ngIf"],[3,"keydown.ctrl.a"],["fxLayout","row","class","mini-info-bar",4,"ngIf"],[2,"font-size","100px","color","red"],["fxLayout","row",1,"mini-info-bar"],["class","version-info",3,"dblclick",4,"ngIf"],[3,"class","dblclick",4,"ngIf"],[1,"version-info",3,"dblclick"],[3,"dblclick"]],template:function(n,i){n&1&&(h(0,"div",0)(1,"nxt-button-icon"),y(2,"fullscreen"),p(),h(3,"span",1),y(4,"shopping_cart"),p()(),h(5,"div",2)(6,"div",3),ee(7,"nxt-app-menu"),p(),W(8,KTi,2,0,"div",4),h(9,"router-outlet",5),F("keydown.ctrl.a",function(s){return i.handleKey(s)}),p()(),W(10,QTi,5,4,"div",6)),n&2&&(g(8),b("ngIf",!1),g(2),b("ngIf",i.showVersionInfo))},dependencies:[wme,alt,an,Xu,Ct,At,Yt],styles:["[_nghost-%COMP%]{padding-bottom:1px}.wrapper[_ngcontent-%COMP%]{height:100%;overflow:hidden}.mini-info-bar[_ngcontent-%COMP%]{position:fixed;top:0;right:0;z-index:100}.version-info[_ngcontent-%COMP%]{color:#bbb;border-radius:3px;z-index:10000;font-size:7pt;background-color:#2a2a2a;padding:0 3px;border:0px solid gray;cursor:pointer}.info-char[_ngcontent-%COMP%]{cursor:pointer;margin:0 0 0 2px;z-index:9999999999;font-size:6pt;opacity:.7;border-radius:3px;padding:0;text-align:center;color:#fff}"]});rF=mC});var _W,wlt=Q(()=>{_W=function(){return _W=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},_W.apply(this,arguments)}});function ao(t){let e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}var pd=Q(()=>{});function a0(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}var fC=Q(()=>{});function sF(t,e){let n=ao(t);return isNaN(e)?a0(t,NaN):(e&&n.setDate(n.getDate()+e),n)}var Mie=Q(()=>{pd();fC()});function kie(t,e){let n=ao(t);if(isNaN(e))return a0(t,NaN);if(!e)return n;let i=n.getDate(),r=a0(t,n.getTime());r.setMonth(n.getMonth()+e+1,0);let s=r.getDate();return i>=s?r:(n.setFullYear(r.getFullYear(),r.getMonth(),i),n)}var zbe=Q(()=>{pd();fC()});var Slt=Q(()=>{});var Tlt=Q(()=>{});var Dlt=Q(()=>{});var Elt=Q(()=>{});var Mlt=Q(()=>{});function oF(t,e){let n=+ao(t);return a0(t,n+e)}var CW=Q(()=>{pd();fC()});var JTi,Xgr,klt,Ilt,Iie,Alt,eDi,Plt,Qgr,tDi,iDi,Jgr,aF=Q(()=>{JTi=Math.pow(10,8)*24*60*60*1e3,Xgr=-JTi,klt=6048e5,Ilt=864e5,Iie=6e4,Alt=36e5,eDi=3600,Plt=eDi*24,Qgr=Plt*7,tDi=Plt*365.2425,iDi=tDi/12,Jgr=iDi*3});function Rlt(t,e){return oF(t,e*Alt)}var Flt=Q(()=>{CW();aF()});function Aie(){return nDi}var nDi,Hbe=Q(()=>{nDi={}});function Pie(t,e){let n=Aie(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=ao(t),s=r.getDay(),o=(s<i?7:0)+s-i;return r.setDate(r.getDate()-o),r.setHours(0,0,0,0),r}var Gbe=Q(()=>{pd();Hbe()});function XE(t){return Pie(t,{weekStartsOn:1})}var xW=Q(()=>{Gbe()});function Llt(t){let e=ao(t),n=e.getFullYear(),i=a0(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);let r=XE(i),s=a0(t,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);let o=XE(s);return e.getTime()>=r.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}var Wbe=Q(()=>{fC();xW();pd()});function Ww(t){let e=ao(t);return e.setHours(0,0,0,0),e}var Rie=Q(()=>{pd()});function Ube(t){let e=ao(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}var Olt=Q(()=>{pd()});function Nlt(t,e){let n=Ww(t),i=Ww(e),r=+n-Ube(n),s=+i-Ube(i);return Math.round((r-s)/Ilt)}var jbe=Q(()=>{aF();Rie();Olt()});function Vlt(t){let e=Llt(t),n=a0(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),XE(n)}var $be=Q(()=>{Wbe();xW();fC()});var Blt=Q(()=>{});var zlt=Q(()=>{});function Hlt(t,e){return oF(t,e*Iie)}var Glt=Q(()=>{CW();aF()});var Wlt=Q(()=>{});function Ult(t,e){return oF(t,e*1e3)}var jlt=Q(()=>{CW()});function Fie(t,e){let n=e*7;return sF(t,n)}var Kbe=Q(()=>{Mie()});var $lt=Q(()=>{});var Klt=Q(()=>{});function Ylt(t){let e;return t.forEach(function(n){let i=ao(n);(e===void 0||e<i||isNaN(Number(i)))&&(e=i)}),e||new Date(NaN)}var qlt=Q(()=>{pd()});var Zlt=Q(()=>{});var Xlt=Q(()=>{});var Qlt=Q(()=>{});var Jlt=Q(()=>{});var ect=Q(()=>{});var tct=Q(()=>{});var ict=Q(()=>{});function nct(t,e){let n=Ww(t),i=Ww(e);return+n==+i}var rct=Q(()=>{Rie()});var sct=Q(()=>{});var oct=Q(()=>{});var act=Q(()=>{});var lct=Q(()=>{});var cct=Q(()=>{});var dct=Q(()=>{});var uct=Q(()=>{});var hct=Q(()=>{});var pct=Q(()=>{});var mct=Q(()=>{});function gct(t,e){let n=ao(t),i=ao(e),r=fct(n,i),s=Math.abs(Nlt(n,i));n.setDate(n.getDate()-r*s);let o=+(fct(n,i)===-r),a=r*(s-o);return a===0?0:a}function fct(t,e){let n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}var vct=Q(()=>{jbe();pd()});function Lie(t){return e=>{let i=(t?Math[t]:Math.trunc)(e);return i===0?0:i}}var Ybe=Q(()=>{});function Oie(t,e){return+ao(t)-+ao(e)}var Nie=Q(()=>{pd()});var yct=Q(()=>{});var _ct=Q(()=>{});var Cct=Q(()=>{});function xct(t,e,n){let i=Oie(t,e)/Iie;return Lie(n?.roundingMethod)(i)}var bct=Q(()=>{Ybe();aF();Nie()});function wct(t){let e=ao(t);return e.setHours(23,59,59,999),e}var Sct=Q(()=>{pd()});function Tct(t){let e=ao(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}var Dct=Q(()=>{pd()});var Ect=Q(()=>{});var Mct=Q(()=>{});var kct=Q(()=>{});function Ict(t,e,n){let i=Oie(t,e)/1e3;return Lie(n?.roundingMethod)(i)}var Act=Q(()=>{Ybe();Nie()});var Pct=Q(()=>{});var Rct=Q(()=>{});var Fct=Q(()=>{});var Lct=Q(()=>{});function Oct(t){let e=ao(t);return e.setSeconds(0,0),e}var Nct=Q(()=>{pd()});var Vct=Q(()=>{});var Bct=Q(()=>{});var zct=Q(()=>{});var Hct=Q(()=>{});var Gct=Q(()=>{});var Wct=Q(()=>{});function Uct(t){let e=ao(t);return e.setDate(1),e.setHours(0,0,0,0),e}var jct=Q(()=>{pd()});var $ct=Q(()=>{});var Kct=Q(()=>{});var Yct=Q(()=>{});var qct=Q(()=>{});var Zct=Q(()=>{});var Xct=Q(()=>{});var Qct=Q(()=>{});function Jct(t,e){let n=Aie(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=ao(t),s=r.getDay(),o=(s<i?-7:0)+6-(s-i);return r.setDate(r.getDate()+o),r.setHours(23,59,59,999),r}var edt=Q(()=>{pd();Hbe()});var tdt=Q(()=>{});var idt=Q(()=>{});var ndt=Q(()=>{});var rdt=Q(()=>{});var sdt=Q(()=>{});var odt=Q(()=>{});var adt=Q(()=>{});var ldt=Q(()=>{});var cdt=Q(()=>{});function ddt(t){let e=ao(t),n=+XE(e)-+Vlt(e);return Math.round(n/klt)+1}var udt=Q(()=>{aF();xW();$be();pd()});var hdt=Q(()=>{});var pdt=Q(()=>{});var mdt=Q(()=>{});var fdt=Q(()=>{});var gdt=Q(()=>{});var vdt=Q(()=>{});var ydt=Q(()=>{});var _dt=Q(()=>{});var Cdt=Q(()=>{});var xdt=Q(()=>{});var bdt=Q(()=>{});var wdt=Q(()=>{});var Sdt=Q(()=>{});var Tdt=Q(()=>{});var Ddt=Q(()=>{});var Edt=Q(()=>{});function Mdt(t){return ao(t).getDate()}var kdt=Q(()=>{pd()});function Idt(t){return ao(t).getDay()}var Adt=Q(()=>{pd()});function Pdt(t){let e=ao(t),n=e.getFullYear(),i=e.getMonth(),r=a0(t,0);return r.setFullYear(n,i+1,0),r.setHours(0,0,0,0),r.getDate()}var qbe=Q(()=>{pd();fC()});var Rdt=Q(()=>{});var Fdt=Q(()=>{});var Ldt=Q(()=>{});var Odt=Q(()=>{});function Ndt(t){return ao(t).getHours()}var Vdt=Q(()=>{pd()});var Bdt=Q(()=>{});var zdt=Q(()=>{});var Hdt=Q(()=>{});function Gdt(t){return ao(t).getMinutes()}var Wdt=Q(()=>{pd()});function Udt(t){return ao(t).getMonth()}var jdt=Q(()=>{pd()});var $dt=Q(()=>{});var Kdt=Q(()=>{});var Ydt=Q(()=>{});var qdt=Q(()=>{});var Zdt=Q(()=>{});var Xdt=Q(()=>{});var Qdt=Q(()=>{});function Jdt(t){return ao(t).getFullYear()}var eut=Q(()=>{pd()});var tut=Q(()=>{});var iut=Q(()=>{});var nut=Q(()=>{});var rut=Q(()=>{});var sut=Q(()=>{});var out=Q(()=>{});var aut=Q(()=>{});var lut=Q(()=>{});var cut=Q(()=>{});var dut=Q(()=>{});var uut=Q(()=>{});var hut=Q(()=>{});var put=Q(()=>{});var mut=Q(()=>{});var fut=Q(()=>{});var gut=Q(()=>{});var vut=Q(()=>{});var yut=Q(()=>{});var _ut=Q(()=>{});var Cut=Q(()=>{});var xut=Q(()=>{});var but=Q(()=>{});var wut=Q(()=>{});var Sut=Q(()=>{});var Tut=Q(()=>{});var Dut=Q(()=>{});var Eut=Q(()=>{});var Mut=Q(()=>{});var kut=Q(()=>{});function Iut(t,e){let n=ao(t),i=ao(e);return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()}var Aut=Q(()=>{pd()});var Put=Q(()=>{});function Zbe(t){let e=ao(t);return e.setMilliseconds(0),e}var Xbe=Q(()=>{pd()});function Rut(t,e){let n=Zbe(t),i=Zbe(e);return+n==+i}var Fut=Q(()=>{Xbe()});var Lut=Q(()=>{});var Out=Q(()=>{});var Nut=Q(()=>{});var Vut=Q(()=>{});var But=Q(()=>{});var zut=Q(()=>{});var Hut=Q(()=>{});var Gut=Q(()=>{});var Wut=Q(()=>{});var Uut=Q(()=>{});var jut=Q(()=>{});var $ut=Q(()=>{});var Kut=Q(()=>{});var Yut=Q(()=>{});var qut=Q(()=>{});function Zut(t,e){return sF(t,-e)}var Xut=Q(()=>{Mie()});var Qut=Q(()=>{});var Jut=Q(()=>{});var eht=Q(()=>{});var tht=Q(()=>{});var iht=Q(()=>{});var nht=Q(()=>{});var rht=Q(()=>{});var sht=Q(()=>{});var oht=Q(()=>{});var aht=Q(()=>{});var lht=Q(()=>{});var cht=Q(()=>{});var dht=Q(()=>{});var uht=Q(()=>{});var hht=Q(()=>{});var pht=Q(()=>{});var mht=Q(()=>{});var fht=Q(()=>{});var ght=Q(()=>{});var vht=Q(()=>{});var yht=Q(()=>{});var _ht=Q(()=>{});var Cht=Q(()=>{});var xht=Q(()=>{});var bht=Q(()=>{});var wht=Q(()=>{});var Sht=Q(()=>{});var Tht=Q(()=>{});var Dht=Q(()=>{});var Eht=Q(()=>{});var Mht=Q(()=>{});var kht=Q(()=>{});var Iht=Q(()=>{});var Aht=Q(()=>{});var Pht=Q(()=>{});var Rht=Q(()=>{});var Fht=Q(()=>{});var Lht=Q(()=>{});var Oht=Q(()=>{});var Nht=Q(()=>{});var Vht=Q(()=>{});function Bht(t,e){let n=ao(t),i=n.getFullYear(),r=n.getDate(),s=a0(t,0);s.setFullYear(i,e,15),s.setHours(0,0,0,0);let o=Pdt(s);return n.setMonth(e,Math.min(r,o)),n}var zht=Q(()=>{fC();qbe();pd()});var Hht=Q(()=>{});function Ght(t,e){let n=ao(t);return n.setDate(e),n}var Wht=Q(()=>{pd()});var Uht=Q(()=>{});var jht=Q(()=>{});function $ht(t,e){let n=ao(t);return n.setHours(e),n}var Kht=Q(()=>{pd()});var Yht=Q(()=>{});function qht(t,e){let n=ao(t);return n.setMinutes(e),n}var Zht=Q(()=>{pd()});var Xht=Q(()=>{});var Qht=Q(()=>{});var Jht=Q(()=>{});function ept(t,e){let n=ao(t);return isNaN(+n)?a0(t,NaN):(n.setFullYear(e),n)}var tpt=Q(()=>{fC();pd()});var ipt=Q(()=>{});var npt=Q(()=>{});var rpt=Q(()=>{});var spt=Q(()=>{});function opt(t,e){return kie(t,-e)}var apt=Q(()=>{zbe()});var lpt=Q(()=>{});var cpt=Q(()=>{});var dpt=Q(()=>{});var upt=Q(()=>{});var hpt=Q(()=>{});var ppt=Q(()=>{});var mpt=Q(()=>{});function fpt(t,e){return Fie(t,-e)}var gpt=Q(()=>{Kbe()});var vpt=Q(()=>{});var ypt=Q(()=>{});var _pt=Q(()=>{});var Cpt=Q(()=>{});var xpt=Q(()=>{});var Qbe=Q(()=>{Slt();Mlt();Mie();Flt();zlt();CW();Glt();zbe();Wlt();jlt();Kbe();$lt();Klt();Xlt();Qlt();Jlt();ect();tct();fC();ict();act();jbe();lct();cct();dct();hct();pct();mct();vct();yct();Cct();Nie();bct();Mct();kct();Act();Pct();Rct();Fct();Lct();Vct();Bct();Hct();Gct();Wct();$ct();qct();Zct();Sct();Xct();Qct();tdt();idt();ndt();Dct();rdt();sdt();odt();adt();edt();Kct();ldt();fdt();gdt();vdt();ydt();_dt();Cdt();xdt();bdt();wdt();Sdt();Tdt();Ddt();Edt();kdt();Adt();cdt();qbe();Fdt();Ldt();Odt();Vdt();Bdt();udt();Wbe();zdt();Hdt();Wdt();jdt();$dt();uct();Kdt();Ydt();qdt();mdt();Zdt();hdt();Qdt();eut();tut();iut();nut();rut();sut();out();aut();lut();cut();sct();dut();uut();hut();put();mut();Ect();Rdt();xut();but();wut();rct();Tut();Eut();Mut();kut();Aut();Put();Fut();Dut();Lut();Tlt();Dlt();Out();Nut();Vut();But();zut();Hut();Gut();Wut();Uut();jut();$ut();Kut();oct();Yut();Elt();qut();Qut();Jut();tht();iht();Xdt();nht();eht();rht();sht();qlt();oht();aht();lht();cht();Zlt();dht();uht();hht();pht();mht();fht();ght();vht();yht();_ht();Cht();xht();bht();Cut();wht();Sht();Tht();Dht();Eht();Mht();kht();Iht();Aht();Pht();Rht();Fht();Lht();Oht();Nht();Vht();Hht();Wht();yut();Uht();jht();Kht();_ut();vut();Blt();Yht();Zht();zht();Xht();Qht();gut();Jht();tpt();Rie();ipt();Sut();xW();$be();Nct();jct();zct();Xbe();npt();rpt();Gbe();pdt();Yct();spt();lpt();cpt();Xut();dpt();_ct();upt();hpt();apt();ppt();mpt();gpt();vpt();pd();fut();ypt();_pt();Cpt();xpt()});function rDi(t){return new Date(t).getTimezoneOffset()}function bpt(){return{addDays:sF,addHours:Rlt,addMinutes:Hlt,addSeconds:Ult,differenceInDays:gct,differenceInMinutes:xct,differenceInSeconds:Ict,endOfDay:wct,endOfMonth:Tct,endOfWeek:Jct,getDay:Idt,getMonth:Udt,isSameDay:nct,isSameMonth:Iut,isSameSecond:Rut,max:Ylt,setHours:$ht,setMinutes:qht,startOfDay:Ww,startOfMinute:Oct,startOfMonth:Uct,startOfWeek:Pie,getHours:Ndt,getMinutes:Gdt,getTimezoneOffset:rDi}}var wpt=Q(()=>{Qbe()});function Spt(){return _W(_W({},bpt()),{addWeeks:Fie,addMonths:kie,subDays:Zut,subWeeks:fpt,subMonths:opt,getISOWeek:ddt,setDate:Ght,setMonth:Bht,setYear:ept,getDate:Mdt,getYear:Jdt})}var Tpt=Q(()=>{wlt();wpt();Qbe()});function Jbe(t,e,n,i,r){var s=Array.isArray(n)?n:n.split(oDi),o=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=e.classList,l=function(D){var E=D.split("-"),M=E[0],I=E[1],z=[];return r&&(z.push(r+"-"+M),I&&z.push(r+"-"+M+"-"+I),z.forEach(function(G){a.add(G)})),z};r&&o.forEach(function(D){a.remove(r+"-"+D)});var c=s.findIndex(function(D){return D==="auto"});c>=0&&o.forEach(function(D){s.find(function(E){return E.search("^"+D)!==-1})==null&&s.splice(c++,1,D)});var d=e.style;d.position="absolute",d.top="0",d.left="0",d["will-change"]="transform";for(var u,m=!1,f=0,_=s;f<_.length;f++){u=_[f];var x=l(u);if(Dpt.positionElements(t,e,u,i)){m=!0;break}r&&x.forEach(function(D){a.remove(D)})}return m||(u=s[0],l(u),Dpt.positionElements(t,e,u,i)),u}var sDi,oDi,Dpt,Ept=Q(()=>{sDi=function(){function t(){}return t.prototype.getAllStyles=function(e){return window.getComputedStyle(e)},t.prototype.getStyle=function(e,n){return this.getAllStyles(e)[n]},t.prototype.isStaticPositioned=function(e){return(this.getStyle(e,"position")||"static")==="static"},t.prototype.offsetParent=function(e){for(var n=e.offsetParent||document.documentElement;n&&n!==document.documentElement&&this.isStaticPositioned(n);)n=n.offsetParent;return n||document.documentElement},t.prototype.position=function(e,n){n===void 0&&(n=!0);var i,r={width:0,height:0,top:0,bottom:0,left:0,right:0};if(this.getStyle(e,"position")==="fixed")i=e.getBoundingClientRect(),i={top:i.top,bottom:i.bottom,left:i.left,right:i.right,height:i.height,width:i.width};else{var s=this.offsetParent(e);i=this.offset(e,!1),s!==document.documentElement&&(r=this.offset(s,!1)),r.top+=s.clientTop,r.left+=s.clientLeft}return i.top-=r.top,i.bottom-=r.top,i.left-=r.left,i.right-=r.left,n&&(i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i},t.prototype.offset=function(e,n){n===void 0&&(n=!0);var i=e.getBoundingClientRect(),r={top:window.pageYOffset-document.documentElement.clientTop,left:window.pageXOffset-document.documentElement.clientLeft},s={height:i.height||e.offsetHeight,width:i.width||e.offsetWidth,top:i.top+r.top,bottom:i.bottom+r.top,left:i.left+r.left,right:i.right+r.left};return n&&(s.height=Math.round(s.height),s.width=Math.round(s.width),s.top=Math.round(s.top),s.bottom=Math.round(s.bottom),s.left=Math.round(s.left),s.right=Math.round(s.right)),s},t.prototype.positionElements=function(e,n,i,r){var s=i.split("-"),o=s[0],a=o===void 0?"top":o,l=s[1],c=l===void 0?"center":l,d=r?this.offset(e,!1):this.position(e,!1),u=this.getAllStyles(n),m=parseFloat(u.marginTop),f=parseFloat(u.marginBottom),_=parseFloat(u.marginLeft),x=parseFloat(u.marginRight),D=0,E=0;switch(a){case"top":D=d.top-(n.offsetHeight+m+f);break;case"bottom":D=d.top+d.height;break;case"left":E=d.left-(n.offsetWidth+_+x);break;case"right":E=d.left+d.width;break}switch(c){case"top":D=d.top;break;case"bottom":D=d.top+d.height-n.offsetHeight;break;case"left":E=d.left;break;case"right":E=d.left+d.width-n.offsetWidth;break;case"center":a==="top"||a==="bottom"?E=d.left+d.width/2-n.offsetWidth/2:D=d.top+d.height/2-n.offsetHeight/2;break}n.style.transform="translate("+Math.round(E)+"px, "+Math.round(D)+"px)";var M=n.getBoundingClientRect(),I=document.documentElement,z=window.innerHeight||I.clientHeight,G=window.innerWidth||I.clientWidth;return M.left>=0&&M.top>=0&&M.right<=G&&M.bottom<=z},t}(),oDi=/\s+/,Dpt=new sDi});var Mpt=Q(()=>{Ept()});function kpt(t,e){var n=e.startDate,i=e.seconds,r=e.excluded,s=e.precision;if(r.length<1)return 0;for(var o=t.addSeconds,a=t.getDay,l=t.addDays,c=o(n,i-1),d=a(n),u=a(c),m=0,f=n,_=function(){var x=a(f);r.some(function(D){return D===x})&&(m+=lDi(t,{dayStart:d,dayEnd:u,day:x,precision:s,startDate:n,endDate:c})),f=l(f,1)};f<c;)_();return m}function lDi(t,e){var n=e.precision,i=e.day,r=e.dayStart,s=e.dayEnd,o=e.startDate,a=e.endDate,l=t.differenceInSeconds,c=t.endOfDay,d=t.startOfDay;if(n==="minutes"){if(i===r)return l(c(o),o)+1;if(i===s)return l(a,d(a))+1}return Uw}function cDi(t,e){var n=e.event,i=e.offset,r=e.startOfWeekDate,s=e.excluded,o=e.precision,a=e.totalDaysInView,l=t.max,c=t.differenceInSeconds,d=t.addDays,u=t.endOfDay,m=t.differenceInDays,f=Uw,_=l([n.start,r]);if(n.end)switch(o){case"minutes":f=c(n.end,_);break;default:f=m(d(u(n.end),1),_)*Uw;break}var x=i*Uw,D=x+f,E=a*Uw;return D>E&&(f=E-x),f-=kpt(t,{startDate:_,seconds:f,excluded:s,precision:o}),f/Uw}function dDi(t,e){var n=e.event,i=e.startOfWeek,r=e.excluded,s=e.precision,o=t.differenceInDays,a=t.startOfDay,l=t.differenceInSeconds;if(n.start<i)return 0;var c=0;switch(s){case"days":c=o(a(n.start),i)*Uw;break;case"minutes":c=l(n.start,i);break}return c-=kpt(t,{startDate:i,seconds:c,excluded:r,precision:s}),Math.abs(c/Uw)}function uDi(t,e){var n=e.event,i=e.periodStart,r=e.periodEnd,s=t.isSameSecond,o=n.start,a=n.end||n.start;return!!(o>i&&o<r||a>i&&a<r||o<i&&a>r||s(o,i)||s(o,r)||s(a,i)||s(a,r))}function bW(t,e){var n=e.events,i=e.periodStart,r=e.periodEnd;return n.filter(function(s){return uDi(t,{event:s,periodStart:i,periodEnd:r})})}function Ipt(t,e){var n=e.date,i=e.weekendDays,r=i===void 0?aDi:i,s=t.startOfDay,o=t.isSameDay,a=t.getDay,l=s(new Date),c=a(n);return{date:n,day:c,isPast:n<l,isToday:o(n,l),isFuture:n>l,isWeekend:r.indexOf(c)>-1}}function Wie(t,e){for(var n=e.viewDate,i=e.weekStartsOn,r=e.excluded,s=r===void 0?[]:r,o=e.weekendDays,a=e.viewStart,l=a===void 0?t.startOfWeek(n,{weekStartsOn:i}):a,c=e.viewEnd,d=c===void 0?t.addDays(l,t7e):c,u=t.addDays,m=t.getDay,f=[],_=l;_<d;)s.some(function(x){return m(_)===x})||f.push(Ipt(t,{date:_,weekendDays:o})),_=u(_,1);return f}function hDi(t,e){for(var n=e.date1,i=e.date2,r=e.excluded,s=n,o=0;s<i;)r.indexOf(t.getDay(s))===-1&&o++,s=t.addDays(s,1);return o}function pDi(t,e){var n=e.events,i=n===void 0?[]:n,r=e.excluded,s=r===void 0?[]:r,o=e.precision,a=o===void 0?"days":o,l=e.absolutePositionedEvents,c=l===void 0?!1:l,d=e.viewStart,u=e.viewEnd;d=t.startOfDay(d),u=t.endOfDay(u);var m=t.differenceInSeconds,f=t.differenceInDays,_=hDi(t,{date1:d,date2:u,excluded:s}),x=f(u,d)+1,D=i.filter(function(I){return I.allDay}).map(function(I){var z=dDi(t,{event:I,startOfWeek:d,excluded:s,precision:a}),G=cDi(t,{event:I,offset:z,startOfWeekDate:d,excluded:s,precision:a,totalDaysInView:x});return{event:I,offset:z,span:G}}).filter(function(I){return I.offset<_}).filter(function(I){return I.span>0}).map(function(I){return{event:I.event,offset:I.offset,span:I.span,startsBeforeWeek:I.event.start<d,endsAfterWeek:(I.event.end||I.event.start)>u}}).sort(function(I,z){var G=m(I.event.start,z.event.start);return G===0?m(z.event.end||z.event.start,I.event.end||I.event.start):G}),E=[],M=[];return D.forEach(function(I,z){if(M.indexOf(I)===-1){M.push(I);var G=I.span+I.offset,A=D.slice(z+1).filter(function(ne){if(ne.offset>=G&&G+ne.span<=x&&M.indexOf(ne)===-1){var pe=ne.offset-G;return c||(ne.offset=pe),G+=ne.span+pe,M.push(ne),!0}}),Y=e7e([I],A,!0),X=Y.filter(function(ne){return ne.event.id}).map(function(ne){return ne.event.id}).join("-");E.push(m_({row:Y},X?{id:X}:{}))}}),E}function mDi(t,e){var n=e.events,i=e.viewDate,r=e.hourSegments,s=e.hourDuration,o=e.dayStart,a=e.dayEnd,l=e.weekStartsOn,c=e.excluded,d=e.weekendDays,u=e.segmentHeight,m=e.viewStart,f=e.viewEnd,_=e.minimumEventHeight,x=gDi(t,{viewDate:i,hourSegments:r,hourDuration:s,dayStart:o,dayEnd:a}),D=Wie(t,{viewDate:i,weekStartsOn:l,excluded:c,weekendDays:d,viewStart:m,viewEnd:f}),E=t.setHours,M=t.setMinutes,I=t.getHours,z=t.getMinutes;return D.map(function(G){var A=fDi(t,{events:n,viewDate:G.date,hourSegments:r,dayStart:o,dayEnd:a,segmentHeight:u,eventWidth:1,hourDuration:s,minimumEventHeight:_}),Y=x.map(function(pe){var ce=pe.segments.map(function(ie){var le=M(E(G.date,I(ie.date)),z(ie.date));return m_(m_({},ie),{date:le})});return m_(m_({},pe),{segments:ce})});function X(pe,ce){var ie=Math.max.apply(Math,ce.map(function(Se){return Se.left+1})),le=pe.filter(function(Se){return Se.left>=ie}).filter(function(Se){return Bie(ce,Se.top,Se.top+Se.height).length>0});return le.length>0?X(pe,le):ie}var ne=A.events.map(function(pe){var ce=X(A.events,Bie(A.events,pe.top,pe.top+pe.height)),ie=100/ce;return m_(m_({},pe),{left:pe.left*ie,width:ie})});return{hours:Y,date:G.date,events:ne.map(function(pe){var ce=Bie(ne.filter(function(ie){return ie.left>pe.left}),pe.top,pe.top+pe.height);return ce.length>0?m_(m_({},pe),{width:Math.min.apply(Math,ce.map(function(ie){return ie.left}))-pe.left}):pe})}})}function Apt(t,e){var n=e.events,i=n===void 0?[]:n,r=e.viewDate,s=e.weekStartsOn,o=e.excluded,a=o===void 0?[]:o,l=e.precision,c=l===void 0?"days":l,d=e.absolutePositionedEvents,u=d===void 0?!1:d,m=e.hourSegments,f=e.hourDuration,_=e.dayStart,x=e.dayEnd,D=e.weekendDays,E=e.segmentHeight,M=e.minimumEventHeight,I=e.viewStart,z=I===void 0?t.startOfWeek(r,{weekStartsOn:s}):I,G=e.viewEnd,A=G===void 0?t.endOfWeek(r,{weekStartsOn:s}):G;i||(i=[]);var Y=t.startOfDay,X=t.endOfDay;z=Y(z),A=X(A);var ne=bW(t,{events:i,periodStart:z,periodEnd:A}),pe=Wie(t,{viewDate:r,weekStartsOn:s,excluded:a,weekendDays:D,viewStart:z,viewEnd:A});return{allDayEventRows:pDi(t,{events:ne,excluded:a,precision:c,absolutePositionedEvents:u,viewStart:z,viewEnd:A}),period:{events:ne,start:pe[0].date,end:X(pe[pe.length-1].date)},hourColumns:mDi(t,{events:i,viewDate:r,hourSegments:m,hourDuration:f,dayStart:_,dayEnd:x,weekStartsOn:s,excluded:a,weekendDays:D,segmentHeight:E,viewStart:z,viewEnd:A,minimumEventHeight:M})}}function Ppt(t,e){var n=e.events,i=n===void 0?[]:n,r=e.viewDate,s=e.weekStartsOn,o=e.excluded,a=o===void 0?[]:o,l=e.viewStart,c=l===void 0?t.startOfMonth(r):l,d=e.viewEnd,u=d===void 0?t.endOfMonth(r):d,m=e.weekendDays;i||(i=[]);for(var f=t.startOfWeek,_=t.endOfWeek,x=t.differenceInDays,D=t.startOfDay,E=t.addHours,M=t.endOfDay,I=t.isSameMonth,z=t.getDay,G=f(c,{weekStartsOn:s}),A=_(u,{weekStartsOn:s}),Y=bW(t,{events:i,periodStart:G,periodEnd:A}),X=[],ne,pe=function(Ae){var Ye;if(ne?(Ye=D(E(ne,i7e)),ne.getTime()===Ye.getTime()&&(Ye=D(E(ne,i7e+1))),ne=Ye):Ye=ne=G,!a.some(function(Tt){return z(Ye)===Tt})){var ft=Ipt(t,{date:Ye,weekendDays:m}),Ft=bW(t,{events:Y,periodStart:D(Ye),periodEnd:M(Ye)});ft.inMonth=I(Ye,r),ft.events=Ft,ft.badgeTotal=Ft.length,X.push(ft)}},ce=0;ce<x(A,G)+1;ce++)pe(ce);var ie=[],le=t7e-a.length;if(le<t7e)for(var ce=0;ce<X.length;ce+=le){var Se=X.slice(ce,ce+le),je=Se.some(function(Ye){return c<=Ye.date&&Ye.date<u});je&&(ie=e7e(e7e([],ie,!0),Se,!0))}else ie=X;for(var ze=Math.floor(ie.length/le),Ge=[],ce=0;ce<ze;ce++)Ge.push(ce*le);return{rowOffsets:Ge,totalDaysVisibleInWeek:le,days:ie,period:{start:ie[0].date,end:M(ie[ie.length-1].date),events:Y}}}function Bie(t,e,n){return t.filter(function(i){var r=i.top,s=i.top+i.height;return e<s&&s<n||e<r&&r<n?!0:r<=e&&n<=s})}function fDi(t,e){var n=e.events,i=e.viewDate,r=e.hourSegments,s=e.dayStart,o=e.dayEnd,a=e.eventWidth,l=e.segmentHeight,c=e.hourDuration,d=e.minimumEventHeight,u=t.setMinutes,m=t.setHours,f=t.startOfDay,_=t.startOfMinute,x=t.endOfDay,D=t.differenceInMinutes,E=u(m(f(i),Hie(s.hour)),Gie(s.minute)),M=u(m(_(x(i)),Hie(o.hour)),Gie(o.minute));M.setSeconds(59,999);var I=[],z=bW(t,{events:n.filter(function(X){return!X.allDay}),periodStart:E,periodEnd:M}),G=z.sort(function(X,ne){return X.start.valueOf()-ne.start.valueOf()}).map(function(X){var ne=X.start,pe=X.end||ne,ce=ne<E,ie=pe>M,le=r*l/(c||Vie),Se=0;if(ne>E){var je=t.getTimezoneOffset(ne),ze=t.getTimezoneOffset(E),Ge=ze-je;Se+=D(ne,E)+Ge}Se*=le,Se=Math.floor(Se);var Ae=ce?E:ne,Ye=ie?M:pe,ft=t.getTimezoneOffset(Ae)-t.getTimezoneOffset(Ye),Ft=D(Ye,Ae)+ft;X.end?Ft*=le:Ft=l,d&&Ft<d&&(Ft=d),Ft=Math.floor(Ft);for(var Tt=Se+Ft,at=Bie(I,Se,Tt),yt=0;at.some(function(Re){return Re.left===yt});)yt+=a;var _t={event:X,height:Ft,width:a,top:Se,left:yt,startsBeforeDay:ce,endsAfterDay:ie};return I.push(_t),_t}),A=Math.max.apply(Math,G.map(function(X){return X.left+X.width})),Y=bW(t,{events:n.filter(function(X){return X.allDay}),periodStart:f(E),periodEnd:x(M)});return{events:G,width:A,allDayEvents:Y,period:{events:z,start:E,end:M}}}function Hie(t){return Math.max(Math.min(23,t),0)}function Gie(t){return Math.max(Math.min(59,t),0)}function gDi(t,e){var n=e.viewDate,i=e.hourSegments,r=e.hourDuration,s=e.dayStart,o=e.dayEnd,a=t.setMinutes,l=t.setHours,c=t.startOfDay,d=t.startOfMinute,u=t.endOfDay,m=t.addMinutes,f=t.addDays,_=[],x=a(l(c(n),Hie(s.hour)),Gie(s.minute)),D=a(l(d(u(n)),Hie(o.hour)),Gie(o.minute)),E=(r||Vie)/i,M=c(n),I=u(n),z=function(pe){return pe};t.getTimezoneOffset(M)!==t.getTimezoneOffset(I)&&(M=f(M,1),x=f(x,1),D=f(D,1),z=function(pe){return f(pe,-1)});for(var G=r?i7e*60/r:Vie,A=0;A<G;A++){for(var Y=[],X=0;X<i;X++){var ne=m(m(x,A*(r||Vie)),X*E);ne>=x&&ne<D&&Y.push({date:z(ne),displayDate:ne,isStart:X===0})}Y.length>0&&_.push({segments:Y})}return _}function Rpt(t,e){var n=!0;function i(r,s){e(r,s),n=!1}return Array.isArray(t)?(t.forEach(function(r){r.start?r.start instanceof Date||i(lF.StartPropertyNotDate,r):i(lF.StartPropertyMissing,r),r.end&&(r.end instanceof Date||i(lF.EndPropertyNotDate,r),r.start>r.end&&i(lF.EndsBeforeStart,r))}),n):(e(lF.NotArray,t),!1)}var m_,e7e,zie,aDi,t7e,i7e,Vie,Uw,lF,n7e=Q(()=>{m_=function(){return m_=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},m_.apply(this,arguments)},e7e=function(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,s;i<r;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},zie=function(t){return t[t.SUNDAY=0]="SUNDAY",t[t.MONDAY=1]="MONDAY",t[t.TUESDAY=2]="TUESDAY",t[t.WEDNESDAY=3]="WEDNESDAY",t[t.THURSDAY=4]="THURSDAY",t[t.FRIDAY=5]="FRIDAY",t[t.SATURDAY=6]="SATURDAY",t}(zie||{}),aDi=[zie.SUNDAY,zie.SATURDAY],t7e=7,i7e=24,Vie=60,Uw=60*60*24;lF=function(t){return t.NotArray="Events must be an array",t.StartPropertyMissing="Event is missing the `start` property",t.StartPropertyNotDate="Event `start` property should be a javascript date object. Do `new Date(event.start)` to fix it.",t.EndPropertyNotDate="Event `end` property should be a javascript date object. Do `new Date(event.end)` to fix it.",t.EndsBeforeStart="Event `start` property occurs after the `end`",t}(lF||{})});function vDi(t,e){return typeof t>"u"?typeof e>"u"?t:e:t}function a7e(t,e){return t=vDi(t,e),typeof t=="function"?function(){for(var i=arguments,r=arguments.length,s=Array(r),o=0;o<r;o++)s[o]=i[o];return!!t.apply(this,s)}:t?function(){return!0}:function(){return!1}}function Opt(t,e){if(e=d7e(e,!0),!Lpt(e))return-1;for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}function l7e(t,e){return Opt(t,e)!==-1}function yDi(t,e){for(var n=0;n<e.length;n++)l7e(t,e[n])||t.push(e[n]);return e}function _Di(t){for(var e=arguments,n=[],i=arguments.length-1;i-- >0;)n[i]=e[i+1];return n=n.map(d7e),yDi(t,n)}function CDi(t){for(var e=arguments,n=[],i=arguments.length-1;i-- >0;)n[i]=e[i+1];return n.map(d7e).reduce(function(r,s){var o=Opt(t,s);return o!==-1?r.concat(t.splice(o,1)):r},[])}function d7e(t,e){if(typeof t=="string")try{return document.querySelector(t)}catch(n){throw n}if(!Lpt(t)&&!e)throw new TypeError(t+" is not a DOM element.");return t}function xDi(t,e){e=e||{};var n=a7e(e.allowUpdate,!0);return function(r){if(r=r||window.event,t.target=r.target||r.srcElement||r.originalTarget,t.element=this,t.type=r.type,!!n(r)){if(r.targetTouches)t.x=r.targetTouches[0].clientX,t.y=r.targetTouches[0].clientY,t.pageX=r.targetTouches[0].pageX,t.pageY=r.targetTouches[0].pageY,t.screenX=r.targetTouches[0].screenX,t.screenY=r.targetTouches[0].screenY;else{if(r.pageX===null&&r.clientX!==null){var s=r.target&&r.target.ownerDocument||document,o=s.documentElement,a=s.body;t.pageX=r.clientX+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),t.pageY=r.clientY+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.clientTop||0)}else t.pageX=r.pageX,t.pageY=r.pageY;t.x=r.clientX,t.y=r.clientY,t.screenX=r.screenX,t.screenY=r.screenY}t.clientX=t.x,t.clientY=t.y}}}function bDi(){var t={top:{value:0,enumerable:!0},left:{value:0,enumerable:!0},right:{value:window.innerWidth,enumerable:!0},bottom:{value:window.innerHeight,enumerable:!0},width:{value:window.innerWidth,enumerable:!0},height:{value:window.innerHeight,enumerable:!0},x:{value:0,enumerable:!0},y:{value:0,enumerable:!0}};if(Object.create)return Object.create({},t);var e={};return Object.defineProperties(e,t),e}function Npt(t){if(t===window)return bDi();try{var e=t.getBoundingClientRect();return e.x===void 0&&(e.x=e.left,e.y=e.top),e}catch{throw new TypeError("Can't call getBoundingClientRect on "+t)}}function wDi(t,e){var n=Npt(e);return t.y>n.top&&t.y<n.bottom&&t.x>n.left&&t.x<n.right}function TDi(t){var e={screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1,button:0,buttons:1,relatedTarget:null,region:null};t!==void 0&&t.addEventListener("mousemove",n);function n(s){for(var o=0;o<QE.length;o++)e[QE[o]]=s[QE[o]]}var i=function(){if(MouseEvent)return function(o,a,l){var c=new MouseEvent("mousemove",s7e(e,a));return o7e(c,l),o.dispatchEvent(c)};if(typeof document.createEvent=="function")return function(o,a,l){var c=s7e(e,a),d=document.createEvent("MouseEvents");return d.initMouseEvent("mousemove",!0,!0,window,0,c.screenX,c.screenY,c.clientX,c.clientY,c.ctrlKey,c.altKey,c.shiftKey,c.metaKey,c.button,c.relatedTarget),o7e(d,l),o.dispatchEvent(d)};if(typeof document.createEventObject=="function")return function(o,a,l){var c=document.createEventObject(),d=s7e(e,a);for(var u in d)c[u]=d[u];return o7e(c,l),o.dispatchEvent(c)}}();function r(){t&&t.removeEventListener("mousemove",n,!1),e=null}return{destroy:r,dispatch:i}}function s7e(t,e){e=e||{};for(var n=SDi(t),i=0;i<QE.length;i++)e[QE[i]]!==void 0&&(n[QE[i]]=e[QE[i]]);return n}function o7e(t,e){console.log("data ",e),t.data=e||{},t.dispatched="mousemove"}function DDi(t,e){e===void 0&&(e={});var n=this,i=4,r=!1;if(typeof e.margin!="object"){var s=e.margin||-1;this.margin={left:s,right:s,top:s,bottom:s}}else this.margin=e.margin;this.scrollWhenOutside=e.scrollWhenOutside||!1;var o={},a=xDi(o),l=TDi(),c=!1;window.addEventListener("mousemove",a,!1),window.addEventListener("touchmove",a,!1),isNaN(e.maxSpeed)||(i=e.maxSpeed),typeof i!="object"&&(i={left:i,right:i,top:i,bottom:i}),this.autoScroll=a7e(e.autoScroll),this.syncMove=a7e(e.syncMove,!1),this.destroy=function(ce){window.removeEventListener("mousemove",a,!1),window.removeEventListener("touchmove",a,!1),window.removeEventListener("mousedown",x,!1),window.removeEventListener("touchstart",x,!1),window.removeEventListener("mouseup",D,!1),window.removeEventListener("touchend",D,!1),window.removeEventListener("pointerup",D,!1),window.removeEventListener("mouseleave",M,!1),window.removeEventListener("mousemove",G,!1),window.removeEventListener("touchmove",G,!1),window.removeEventListener("scroll",_,!0),t=[],ce&&E()},this.add=function(){for(var ce=[],ie=arguments.length;ie--;)ce[ie]=arguments[ie];return _Di.apply(void 0,[t].concat(ce)),this},this.remove=function(){for(var ce=[],ie=arguments.length;ie--;)ce[ie]=arguments[ie];return CDi.apply(void 0,[t].concat(ce))};var d=null,u;Object.prototype.toString.call(t)!=="[object Array]"&&(t=[t]),function(ce){t=[],ce.forEach(function(ie){ie===window?d=window:n.add(ie)})}(t),Object.defineProperties(this,{down:{get:function(){return c}},maxSpeed:{get:function(){return i}},point:{get:function(){return o}},scrolling:{get:function(){return r}}});var m=null,f;window.addEventListener("mousedown",x,!1),window.addEventListener("touchstart",x,!1),window.addEventListener("mouseup",D,!1),window.addEventListener("touchend",D,!1),window.addEventListener("pointerup",D,!1),window.addEventListener("mousemove",G,!1),window.addEventListener("touchmove",G,!1),window.addEventListener("mouseleave",M,!1),window.addEventListener("scroll",_,!0);function _(ce){for(var ie=0;ie<t.length;ie++)if(t[ie]===ce.target){r=!0;break}r&&wW(function(){return r=!1})}function x(){c=!0}function D(){c=!1,E()}function E(){cF(f),cF(u)}function M(){c=!1}function I(ce){if(!ce)return null;if(m===ce||l7e(t,ce))return ce;for(;ce=ce.parentNode;)if(l7e(t,ce))return ce;return null}function z(){for(var ce=null,ie=0;ie<t.length;ie++)Fpt(o,t[ie])&&(ce=t[ie]);return ce}function G(ce){if(n.autoScroll()&&!ce.dispatched){var ie=ce.target,le=document.body;m&&!Fpt(o,m)&&(n.scrollWhenOutside||(m=null)),ie&&ie.parentNode===le?ie=z():(ie=I(ie),ie||(ie=z())),ie&&ie!==m&&(m=ie),d&&(cF(u),u=wW(A)),m&&(cF(f),f=wW(Y))}}function A(){X(d),cF(u),u=wW(A)}function Y(){m&&(X(m),cF(f),f=wW(Y))}function X(ce){var ie=Npt(ce),le,Se;o.x<ie.left+n.margin.left?le=Math.floor(Math.max(-1,(o.x-ie.left)/n.margin.left-1)*n.maxSpeed.left):o.x>ie.right-n.margin.right?le=Math.ceil(Math.min(1,(o.x-ie.right)/n.margin.right+1)*n.maxSpeed.right):le=0,o.y<ie.top+n.margin.top?Se=Math.floor(Math.max(-1,(o.y-ie.top)/n.margin.top-1)*n.maxSpeed.top):o.y>ie.bottom-n.margin.bottom?Se=Math.ceil(Math.min(1,(o.y-ie.bottom)/n.margin.bottom+1)*n.maxSpeed.bottom):Se=0,n.syncMove()&&l.dispatch(ce,{pageX:o.pageX+le,pageY:o.pageY+Se,clientX:o.x+le,clientY:o.y+Se}),setTimeout(function(){Se&&ne(ce,Se),le&&pe(ce,le)})}function ne(ce,ie){ce===window?window.scrollTo(ce.pageXOffset,ce.pageYOffset+ie):ce.scrollTop+=ie}function pe(ce,ie){ce===window?window.scrollTo(ce.pageXOffset+ie,ce.pageYOffset):ce.scrollLeft+=ie}}function EDi(t,e){return new DDi(t,e)}function Fpt(t,e,n){return n?t.y>n.top&&t.y<n.bottom&&t.x>n.left&&t.x<n.right:wDi(t,e)}var r7e,Lpt,c7e,SDi,QE,SW,wW,cF,Vpt,Bpt=Q(()=>{r7e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol?"symbol":typeof t},Lpt=function(t){return t!=null&&(typeof t>"u"?"undefined":r7e(t))==="object"&&t.nodeType===1&&r7e(t.style)==="object"&&r7e(t.ownerDocument)==="object"};c7e=void 0;typeof Object.create!="function"?c7e=function(t){var e=function(){};return function(n,i){if(n!==Object(n)&&n!==null)throw TypeError("Argument must be an object, or null");e.prototype=n||{};var r=new e;return e.prototype=null,i!==t&&Object.defineProperties(r,i),n===null&&(r.__proto__=null),r}}():c7e=Object.create;SDi=c7e,QE=["altKey","button","buttons","clientX","clientY","ctrlKey","metaKey","movementX","movementY","offsetX","offsetY","pageX","pageY","region","relatedTarget","screenX","screenY","shiftKey","which","x","y"];SW=["webkit","moz","ms","o"],wW=function(){if(typeof window>"u")return function(){};for(var t=0,e=SW.length;t<e&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[SW[t]+"RequestAnimationFrame"];if(!window.requestAnimationFrame){var n=0;window.requestAnimationFrame=function(i){var r=new Date().getTime(),s=Math.max(0,16-r-n),o=window.setTimeout(function(){return i(r+s)},s);return n=r+s,o}}return window.requestAnimationFrame.bind(window)}(),cF=function(){if(typeof window>"u")return function(){};for(var t=0,e=SW.length;t<e&&!window.cancelAnimationFrame;++t)window.cancelAnimationFrame=window[SW[t]+"CancelAnimationFrame"]||window[SW[t]+"CancelRequestAnimationFrame"];return window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){window.clearTimeout(n)}),window.cancelAnimationFrame.bind(window)}();Vpt=EDi});function u7e(t,e,n){n&&n.split(" ").forEach(i=>t.addClass(e.nativeElement,i))}function Uie(t,e,n){n&&n.split(" ").forEach(i=>t.removeClass(e.nativeElement,i))}function zpt(t,e,n){return t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}var Hpt,Gpt,Wpt,h7e,TW,p7e=Q(()=>{me();me();$n();Cl();ri();Bpt();Hpt=(()=>{class t{constructor(){this.currentDrag=new Mi}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Gpt=(()=>{class t{constructor(n){this.elementRef=n}}return t.\u0275fac=function(n){return new(n||t)(R(fi))},t.\u0275dir=mi({type:t,selectors:[["","mwlDraggableScrollContainer",""]]}),t})(),Wpt=(()=>{class t{constructor(n,i,r,s,o,a,l){this.element=n,this.renderer=i,this.draggableHelper=r,this.zone=s,this.vcr=o,this.scrollContainer=a,this.document=l,this.dragAxis={x:!0,y:!0},this.dragSnapGrid={},this.ghostDragEnabled=!0,this.showOriginalElementWhileDragging=!1,this.dragCursor="",this.autoScroll={margin:20},this.dragPointerDown=new nt,this.dragStart=new nt,this.ghostElementCreated=new nt,this.dragging=new nt,this.dragEnd=new nt,this.pointerDown$=new Mi,this.pointerMove$=new Mi,this.pointerUp$=new Mi,this.eventListenerSubscriptions={},this.destroy$=new Mi,this.timeLongPress={timerBegin:0,timerEnd:0}}ngOnInit(){this.checkEventListeners();let n=this.pointerDown$.pipe(Ks(()=>this.canDrag()),Zf(i=>{i.event.stopPropagation&&!this.scrollContainer&&i.event.stopPropagation();let r=this.renderer.createElement("style");this.renderer.setAttribute(r,"type","text/css"),this.renderer.appendChild(r,this.renderer.createText(`
          body * {
           -moz-user-select: none;
           -ms-user-select: none;
           -webkit-user-select: none;
           user-select: none;
          }
        `)),requestAnimationFrame(()=>{this.document.head.appendChild(r)});let s=this.getScrollPosition(),o=new Qa(f=>{let _=this.scrollContainer?this.scrollContainer.elementRef.nativeElement:"window";return this.renderer.listen(_,"scroll",x=>f.next(x))}).pipe(ll(s),lr(()=>this.getScrollPosition())),a=new Mi,l=new b9;this.dragPointerDown.observers.length>0&&this.zone.run(()=>{this.dragPointerDown.next({x:0,y:0})});let c=ra(this.pointerUp$,this.pointerDown$,l,this.destroy$).pipe(W2()),d=P_([this.pointerMove$,o]).pipe(lr(([f,_])=>({currentDrag$:a,transformX:f.clientX-i.clientX,transformY:f.clientY-i.clientY,clientX:f.clientX,clientY:f.clientY,scrollLeft:_.left,scrollTop:_.top,target:f.event.target})),lr(f=>(this.dragSnapGrid.x&&(f.transformX=Math.round(f.transformX/this.dragSnapGrid.x)*this.dragSnapGrid.x),this.dragSnapGrid.y&&(f.transformY=Math.round(f.transformY/this.dragSnapGrid.y)*this.dragSnapGrid.y),f)),lr(f=>(this.dragAxis.x||(f.transformX=0),this.dragAxis.y||(f.transformY=0),f)),lr(f=>{let _=f.scrollLeft-s.left,x=f.scrollTop-s.top;return St(ve({},f),{x:f.transformX+_,y:f.transformY+x})}),Ks(({x:f,y:_,transformX:x,transformY:D})=>!this.validateDrag||this.validateDrag({x:f,y:_,transform:{x,y:D}})),Mr(c),W2()),u=d.pipe(ic(1),W2()),m=d.pipe(CO(1),W2());return u.subscribe(({clientX:f,clientY:_,x,y:D})=>{if(this.dragStart.observers.length>0&&this.zone.run(()=>{this.dragStart.next({cancelDrag$:l})}),this.scroller=Vpt([this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.defaultView],St(ve({},this.autoScroll),{autoScroll(){return!0}})),u7e(this.renderer,this.element,this.dragActiveClass),this.ghostDragEnabled){let E=this.element.nativeElement.getBoundingClientRect(),M=this.element.nativeElement.cloneNode(!0);if(this.showOriginalElementWhileDragging||this.renderer.setStyle(this.element.nativeElement,"visibility","hidden"),this.ghostElementAppendTo?this.ghostElementAppendTo.appendChild(M):this.element.nativeElement.parentNode.insertBefore(M,this.element.nativeElement.nextSibling),this.ghostElement=M,this.document.body.style.cursor=this.dragCursor,this.setElementStyles(M,{position:"fixed",top:`${E.top}px`,left:`${E.left}px`,width:`${E.width}px`,height:`${E.height}px`,cursor:this.dragCursor,margin:"0",willChange:"transform",pointerEvents:"none"}),this.ghostElementTemplate){let I=this.vcr.createEmbeddedView(this.ghostElementTemplate);M.innerHTML="",I.rootNodes.filter(z=>z instanceof Node).forEach(z=>{M.appendChild(z)}),m.subscribe(()=>{this.vcr.remove(this.vcr.indexOf(I))})}this.ghostElementCreated.observers.length>0&&this.zone.run(()=>{this.ghostElementCreated.emit({clientX:f-x,clientY:_-D,element:M})}),m.subscribe(()=>{M.parentElement.removeChild(M),this.ghostElement=null,this.renderer.setStyle(this.element.nativeElement,"visibility","")})}this.draggableHelper.currentDrag.next(a)}),m.pipe(Zf(f=>{let _=l.pipe(kTe(),ic(1),lr(x=>St(ve({},f),{dragCancelled:x>0})));return l.complete(),_})).subscribe(({x:f,y:_,dragCancelled:x})=>{this.scroller.destroy(),this.dragEnd.observers.length>0&&this.zone.run(()=>{this.dragEnd.next({x:f,y:_,dragCancelled:x})}),Uie(this.renderer,this.element,this.dragActiveClass),a.complete()}),ra(c,m).pipe(ic(1)).subscribe(()=>{requestAnimationFrame(()=>{this.document.head.removeChild(r)})}),d}),W2());ra(n.pipe(ic(1),lr(i=>[,i])),n.pipe(R_())).pipe(Ks(([i,r])=>i?i.x!==r.x||i.y!==r.y:!0),lr(([i,r])=>r)).subscribe(({x:i,y:r,currentDrag$:s,clientX:o,clientY:a,transformX:l,transformY:c,target:d})=>{this.dragging.observers.length>0&&this.zone.run(()=>{this.dragging.next({x:i,y:r})}),requestAnimationFrame(()=>{if(this.ghostElement){let u=`translate3d(${l}px, ${c}px, 0px)`;this.setElementStyles(this.ghostElement,{transform:u,"-webkit-transform":u,"-ms-transform":u,"-moz-transform":u,"-o-transform":u})}}),s.next({clientX:o,clientY:a,dropData:this.dropData,target:d})})}ngOnChanges(n){n.dragAxis&&this.checkEventListeners()}ngOnDestroy(){this.unsubscribeEventListeners(),this.pointerDown$.complete(),this.pointerMove$.complete(),this.pointerUp$.complete(),this.destroy$.next()}checkEventListeners(){let n=this.canDrag(),i=Object.keys(this.eventListenerSubscriptions).length>0;n&&!i?this.zone.runOutsideAngular(()=>{this.eventListenerSubscriptions.mousedown=this.renderer.listen(this.element.nativeElement,"mousedown",r=>{this.onMouseDown(r)}),this.eventListenerSubscriptions.mouseup=this.renderer.listen("document","mouseup",r=>{this.onMouseUp(r)}),this.eventListenerSubscriptions.touchstart=this.renderer.listen(this.element.nativeElement,"touchstart",r=>{this.onTouchStart(r)}),this.eventListenerSubscriptions.touchend=this.renderer.listen("document","touchend",r=>{this.onTouchEnd(r)}),this.eventListenerSubscriptions.touchcancel=this.renderer.listen("document","touchcancel",r=>{this.onTouchEnd(r)}),this.eventListenerSubscriptions.mouseenter=this.renderer.listen(this.element.nativeElement,"mouseenter",()=>{this.onMouseEnter()}),this.eventListenerSubscriptions.mouseleave=this.renderer.listen(this.element.nativeElement,"mouseleave",()=>{this.onMouseLeave()})}):!n&&i&&this.unsubscribeEventListeners()}onMouseDown(n){n.button===0&&(this.eventListenerSubscriptions.mousemove||(this.eventListenerSubscriptions.mousemove=this.renderer.listen("document","mousemove",i=>{this.pointerMove$.next({event:i,clientX:i.clientX,clientY:i.clientY})})),this.pointerDown$.next({event:n,clientX:n.clientX,clientY:n.clientY}))}onMouseUp(n){n.button===0&&(this.eventListenerSubscriptions.mousemove&&(this.eventListenerSubscriptions.mousemove(),delete this.eventListenerSubscriptions.mousemove),this.pointerUp$.next({event:n,clientX:n.clientX,clientY:n.clientY}))}onTouchStart(n){let i,r,s;if(this.touchStartLongPress&&(this.timeLongPress.timerBegin=Date.now(),r=!1,s=this.hasScrollbar(),i=this.getScrollPosition()),!this.eventListenerSubscriptions.touchmove){let o=bh(this.document,"contextmenu").subscribe(l=>{l.preventDefault()}),a=bh(this.document,"touchmove",{passive:!1}).subscribe(l=>{this.touchStartLongPress&&!r&&s&&(r=this.shouldBeginDrag(n,l,i)),(!this.touchStartLongPress||!s||r)&&(l.preventDefault(),this.pointerMove$.next({event:l,clientX:l.targetTouches[0].clientX,clientY:l.targetTouches[0].clientY}))});this.eventListenerSubscriptions.touchmove=()=>{o.unsubscribe(),a.unsubscribe()}}this.pointerDown$.next({event:n,clientX:n.touches[0].clientX,clientY:n.touches[0].clientY})}onTouchEnd(n){this.eventListenerSubscriptions.touchmove&&(this.eventListenerSubscriptions.touchmove(),delete this.eventListenerSubscriptions.touchmove,this.touchStartLongPress&&this.enableScroll()),this.pointerUp$.next({event:n,clientX:n.changedTouches[0].clientX,clientY:n.changedTouches[0].clientY})}onMouseEnter(){this.setCursor(this.dragCursor)}onMouseLeave(){this.setCursor("")}canDrag(){return this.dragAxis.x||this.dragAxis.y}setCursor(n){this.eventListenerSubscriptions.mousemove||this.renderer.setStyle(this.element.nativeElement,"cursor",n)}unsubscribeEventListeners(){Object.keys(this.eventListenerSubscriptions).forEach(n=>{this.eventListenerSubscriptions[n](),delete this.eventListenerSubscriptions[n]})}setElementStyles(n,i){Object.keys(i).forEach(r=>{this.renderer.setStyle(n,r,i[r])})}getScrollElement(){return this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.body}getScrollPosition(){return this.scrollContainer?{top:this.scrollContainer.elementRef.nativeElement.scrollTop,left:this.scrollContainer.elementRef.nativeElement.scrollLeft}:{top:window.pageYOffset||this.document.documentElement.scrollTop,left:window.pageXOffset||this.document.documentElement.scrollLeft}}shouldBeginDrag(n,i,r){let s=this.getScrollPosition(),o={top:Math.abs(s.top-r.top),left:Math.abs(s.left-r.left)},a=Math.abs(i.targetTouches[0].clientX-n.touches[0].clientX)-o.left,l=Math.abs(i.targetTouches[0].clientY-n.touches[0].clientY)-o.top,c=a+l,d=this.touchStartLongPress;return(c>d.delta||o.top>0||o.left>0)&&(this.timeLongPress.timerBegin=Date.now()),this.timeLongPress.timerEnd=Date.now(),this.timeLongPress.timerEnd-this.timeLongPress.timerBegin>=d.delay?(this.disableScroll(),!0):!1}enableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow",""),this.renderer.setStyle(this.document.body,"overflow","")}disableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow","hidden"),this.renderer.setStyle(this.document.body,"overflow","hidden")}hasScrollbar(){let n=this.getScrollElement(),i=n.scrollWidth>n.clientWidth,r=n.scrollHeight>n.clientHeight;return i||r}}return t.\u0275fac=function(n){return new(n||t)(R(fi),R(Ac),R(Hpt),R(pn),R(Na),R(Gpt,8),R(Lr))},t.\u0275dir=mi({type:t,selectors:[["","mwlDraggable",""]],inputs:{dropData:"dropData",dragAxis:"dragAxis",dragSnapGrid:"dragSnapGrid",ghostDragEnabled:"ghostDragEnabled",showOriginalElementWhileDragging:"showOriginalElementWhileDragging",validateDrag:"validateDrag",dragCursor:"dragCursor",dragActiveClass:"dragActiveClass",ghostElementAppendTo:"ghostElementAppendTo",ghostElementTemplate:"ghostElementTemplate",touchStartLongPress:"touchStartLongPress",autoScroll:"autoScroll"},outputs:{dragPointerDown:"dragPointerDown",dragStart:"dragStart",ghostElementCreated:"ghostElementCreated",dragging:"dragging",dragEnd:"dragEnd"},features:[yn]}),t})();h7e=(()=>{class t{constructor(n,i,r,s,o){this.element=n,this.draggableHelper=i,this.zone=r,this.renderer=s,this.scrollContainer=o,this.dragEnter=new nt,this.dragLeave=new nt,this.dragOver=new nt,this.drop=new nt}ngOnInit(){this.currentDragSubscription=this.draggableHelper.currentDrag.subscribe(n=>{u7e(this.renderer,this.element,this.dragActiveClass);let i={updateCache:!0},r=this.renderer.listen(this.scrollContainer?this.scrollContainer.elementRef.nativeElement:"window","scroll",()=>{i.updateCache=!0}),s,o=n.pipe(lr(({clientX:c,clientY:d,dropData:u,target:m})=>{s={clientX:c,clientY:d,dropData:u,target:m},i.updateCache&&(i.rect=this.element.nativeElement.getBoundingClientRect(),this.scrollContainer&&(i.scrollContainerRect=this.scrollContainer.elementRef.nativeElement.getBoundingClientRect()),i.updateCache=!1);let f=zpt(c,d,i.rect),_=!this.validateDrop||this.validateDrop({clientX:c,clientY:d,target:m,dropData:u});return i.scrollContainerRect?f&&_&&zpt(c,d,i.scrollContainerRect):f&&_})),a=o.pipe(qg()),l;a.pipe(Ks(c=>c)).subscribe(()=>{l=!0,u7e(this.renderer,this.element,this.dragOverClass),this.dragEnter.observers.length>0&&this.zone.run(()=>{this.dragEnter.next(s)})}),o.pipe(Ks(c=>c)).subscribe(()=>{this.dragOver.observers.length>0&&this.zone.run(()=>{this.dragOver.next(s)})}),a.pipe(R_(),Ks(([c,d])=>c&&!d)).subscribe(()=>{l=!1,Uie(this.renderer,this.element,this.dragOverClass),this.dragLeave.observers.length>0&&this.zone.run(()=>{this.dragLeave.next(s)})}),n.subscribe({complete:()=>{r(),Uie(this.renderer,this.element,this.dragActiveClass),l&&(Uie(this.renderer,this.element,this.dragOverClass),this.drop.observers.length>0&&this.zone.run(()=>{this.drop.next(s)}))}})})}ngOnDestroy(){this.currentDragSubscription&&this.currentDragSubscription.unsubscribe()}}return t.\u0275fac=function(n){return new(n||t)(R(fi),R(Hpt),R(pn),R(Ac),R(Gpt,8))},t.\u0275dir=mi({type:t,selectors:[["","mwlDroppable",""]],inputs:{dragOverClass:"dragOverClass",dragActiveClass:"dragActiveClass",validateDrop:"validateDrop"},outputs:{dragEnter:"dragEnter",dragLeave:"dragLeave",dragOver:"dragOver",drop:"drop"}}),t})(),TW=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({}),t})()});function kDi(t){let e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();return e.removeAttribute("id"),n.forEach(r=>{r.removeAttribute("id")}),i==="canvas"?$pt(t,e):(i==="input"||i==="select"||i==="textarea")&&jpt(t,e),Upt("canvas",t,e,$pt),Upt("input, textarea, select",t,e,jpt),e}function Upt(t,e,n,i){let r=e.querySelectorAll(t);if(r.length){let s=n.querySelectorAll(t);for(let o=0;o<r.length;o++)i(r[o],s[o])}}function jpt(t,e){e.type!=="file"&&(e.value=t.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${IDi++}`)}function $pt(t,e){let n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch{}}function Kpt(t,e,n,i){let r={top:t.top,bottom:t.bottom,left:t.left,right:t.right};return e.top&&(r.top+=i),e.bottom&&(r.bottom+=i),e.left&&(r.left+=n),e.right&&(r.right+=n),r.height=r.bottom-r.top,r.width=r.right-r.left,r}function ADi(t,e){let n=0,i=0,r=t.nativeElement.style,o=["transform","-ms-transform","-moz-transform","-o-transform"].map(a=>r[a]).find(a=>!!a);if(o&&o.includes("translate")&&(n=o.replace(/.*translate3?d?\((-?[0-9]*)px, (-?[0-9]*)px.*/,"$1"),i=o.replace(/.*translate3?d?\((-?[0-9]*)px, (-?[0-9]*)px.*/,"$2")),e==="absolute")return{height:t.nativeElement.offsetHeight,width:t.nativeElement.offsetWidth,top:t.nativeElement.offsetTop-i,bottom:t.nativeElement.offsetHeight+t.nativeElement.offsetTop-i,left:t.nativeElement.offsetLeft-n,right:t.nativeElement.offsetWidth+t.nativeElement.offsetLeft-n};{let a=t.nativeElement.getBoundingClientRect();return{height:a.height,width:a.width,top:a.top-i,bottom:a.bottom-i,left:a.left-n,right:a.right-n,scrollTop:t.nativeElement.scrollTop,scrollLeft:t.nativeElement.scrollLeft}}}function qpt(t,e){return t.left&&t.top?e.topLeft:t.right&&t.top?e.topRight:t.left&&t.bottom?e.bottomLeft:t.right&&t.bottom?e.bottomRight:t.left||t.right?e.leftOrRight:t.top||t.bottom?e.topOrBottom:""}function jie({edges:t,initialRectangle:e,newRectangle:n}){let i={};return Object.keys(t).forEach(r=>{i[r]=(n[r]||0)-(e[r]||0)}),i}var JE,IDi,Ypt,Zpt,PDi,RDi,f7e,m7e,Xpt,g7e,v7e=Q(()=>{me();me();ri();$n();Cl();JE=typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;IDi=0;Ypt=Object.freeze({topLeft:"nw-resize",topRight:"ne-resize",bottomLeft:"sw-resize",bottomRight:"se-resize",leftOrRight:"col-resize",topOrBottom:"row-resize"});Zpt="resize-active",PDi="resize-ghost-element",RDi=50,f7e=(()=>{class t{constructor(n,i,r,s){this.platformId=n,this.renderer=i,this.elm=r,this.zone=s,this.enableGhostResize=!1,this.resizeSnapGrid={},this.resizeCursors=Ypt,this.ghostElementPositioning="fixed",this.allowNegativeResizes=!1,this.mouseMoveThrottleMS=RDi,this.resizeStart=new nt,this.resizing=new nt,this.resizeEnd=new nt,this.mouseup=new Mi,this.mousedown=new Mi,this.mousemove=new Mi,this.destroy$=new Mi,this.pointerEventListeners=m7e.getInstance(i,s)}ngOnInit(){let n=ra(this.pointerEventListeners.pointerDown,this.mousedown),i=ra(this.pointerEventListeners.pointerMove,this.mousemove).pipe(ac(({event:c})=>{s&&c.cancelable&&c.preventDefault()}),W2()),r=ra(this.pointerEventListeners.pointerUp,this.mouseup),s,o=()=>{s&&s.clonedNode&&(this.elm.nativeElement.parentElement.removeChild(s.clonedNode),this.renderer.setStyle(this.elm.nativeElement,"visibility","inherit"))},a=()=>ve(ve({},Ypt),this.resizeCursors);n.pipe(Zf(c=>{function d(f){return{clientX:f.clientX-c.clientX,clientY:f.clientY-c.clientY}}let u=()=>{let f={x:1,y:1};return s&&(this.resizeSnapGrid.left&&s.edges.left?f.x=+this.resizeSnapGrid.left:this.resizeSnapGrid.right&&s.edges.right&&(f.x=+this.resizeSnapGrid.right),this.resizeSnapGrid.top&&s.edges.top?f.y=+this.resizeSnapGrid.top:this.resizeSnapGrid.bottom&&s.edges.bottom&&(f.y=+this.resizeSnapGrid.bottom)),f};function m(f,_){return{x:Math.ceil(f.clientX/_.x),y:Math.ceil(f.clientY/_.y)}}return ra(i.pipe(ic(1)).pipe(lr(f=>[,f])),i.pipe(R_())).pipe(lr(([f,_])=>[f&&d(f),d(_)])).pipe(Ks(([f,_])=>{if(!f)return!0;let x=u(),D=m(f,x),E=m(_,x);return D.x!==E.x||D.y!==E.y})).pipe(lr(([,f])=>{let _=u();return{clientX:Math.round(f.clientX/_.x)*_.x,clientY:Math.round(f.clientY/_.y)*_.y}})).pipe(Mr(ra(r,n)))})).pipe(Ks(()=>!!s)).pipe(lr(({clientX:c,clientY:d})=>Kpt(s.startingRect,s.edges,c,d))).pipe(Ks(c=>this.allowNegativeResizes||!!(c.height&&c.width&&c.height>0&&c.width>0))).pipe(Ks(c=>this.validateResize?this.validateResize({rectangle:c,edges:jie({edges:s.edges,initialRectangle:s.startingRect,newRectangle:c})}):!0),Mr(this.destroy$)).subscribe(c=>{s&&s.clonedNode&&(this.renderer.setStyle(s.clonedNode,"height",`${c.height}px`),this.renderer.setStyle(s.clonedNode,"width",`${c.width}px`),this.renderer.setStyle(s.clonedNode,"top",`${c.top}px`),this.renderer.setStyle(s.clonedNode,"left",`${c.left}px`)),this.resizing.observers.length>0&&this.zone.run(()=>{this.resizing.emit({edges:jie({edges:s.edges,initialRectangle:s.startingRect,newRectangle:c}),rectangle:c})}),s.currentRect=c}),n.pipe(lr(({edges:c})=>c||{}),Ks(c=>Object.keys(c).length>0),Mr(this.destroy$)).subscribe(c=>{s&&o();let d=ADi(this.elm,this.ghostElementPositioning);s={edges:c,startingRect:d,currentRect:d};let u=a(),m=qpt(s.edges,u);this.renderer.setStyle(document.body,"cursor",m),this.setElementClass(this.elm,Zpt,!0),this.enableGhostResize&&(s.clonedNode=kDi(this.elm.nativeElement),this.elm.nativeElement.parentElement.appendChild(s.clonedNode),this.renderer.setStyle(this.elm.nativeElement,"visibility","hidden"),this.renderer.setStyle(s.clonedNode,"position",this.ghostElementPositioning),this.renderer.setStyle(s.clonedNode,"left",`${s.startingRect.left}px`),this.renderer.setStyle(s.clonedNode,"top",`${s.startingRect.top}px`),this.renderer.setStyle(s.clonedNode,"height",`${s.startingRect.height}px`),this.renderer.setStyle(s.clonedNode,"width",`${s.startingRect.width}px`),this.renderer.setStyle(s.clonedNode,"cursor",qpt(s.edges,u)),this.renderer.addClass(s.clonedNode,PDi),s.clonedNode.scrollTop=s.startingRect.scrollTop,s.clonedNode.scrollLeft=s.startingRect.scrollLeft),this.resizeStart.observers.length>0&&this.zone.run(()=>{this.resizeStart.emit({edges:jie({edges:c,initialRectangle:d,newRectangle:d}),rectangle:Kpt(d,{},0,0)})})}),r.pipe(Mr(this.destroy$)).subscribe(()=>{s&&(this.renderer.removeClass(this.elm.nativeElement,Zpt),this.renderer.setStyle(document.body,"cursor",""),this.renderer.setStyle(this.elm.nativeElement,"cursor",""),this.resizeEnd.observers.length>0&&this.zone.run(()=>{this.resizeEnd.emit({edges:jie({edges:s.edges,initialRectangle:s.startingRect,newRectangle:s.currentRect}),rectangle:s.currentRect})}),o(),s=null)})}ngOnDestroy(){Sy(this.platformId)&&this.renderer.setStyle(document.body,"cursor",""),this.mousedown.complete(),this.mouseup.complete(),this.mousemove.complete(),this.destroy$.next()}setElementClass(n,i,r){r?this.renderer.addClass(n.nativeElement,i):this.renderer.removeClass(n.nativeElement,i)}}return t.\u0275fac=function(n){return new(n||t)(R(Fu),R(Ac),R(fi),R(pn))},t.\u0275dir=mi({type:t,selectors:[["","mwlResizable",""]],inputs:{validateResize:"validateResize",enableGhostResize:"enableGhostResize",resizeSnapGrid:"resizeSnapGrid",resizeCursors:"resizeCursors",ghostElementPositioning:"ghostElementPositioning",allowNegativeResizes:"allowNegativeResizes",mouseMoveThrottleMS:"mouseMoveThrottleMS"},outputs:{resizeStart:"resizeStart",resizing:"resizing",resizeEnd:"resizeEnd"},exportAs:["mwlResizable"]}),t})(),m7e=class t{constructor(e,n){this.pointerDown=new Qa(i=>{let r,s;return n.runOutsideAngular(()=>{r=e.listen("document","mousedown",o=>{i.next({clientX:o.clientX,clientY:o.clientY,event:o})}),JE&&(s=e.listen("document","touchstart",o=>{i.next({clientX:o.touches[0].clientX,clientY:o.touches[0].clientY,event:o})}))}),()=>{r(),JE&&s()}}).pipe(W2()),this.pointerMove=new Qa(i=>{let r,s;return n.runOutsideAngular(()=>{r=e.listen("document","mousemove",o=>{i.next({clientX:o.clientX,clientY:o.clientY,event:o})}),JE&&(s=e.listen("document","touchmove",o=>{i.next({clientX:o.targetTouches[0].clientX,clientY:o.targetTouches[0].clientY,event:o})}))}),()=>{r(),JE&&s()}}).pipe(W2()),this.pointerUp=new Qa(i=>{let r,s,o;return n.runOutsideAngular(()=>{r=e.listen("document","mouseup",a=>{i.next({clientX:a.clientX,clientY:a.clientY,event:a})}),JE&&(s=e.listen("document","touchend",a=>{i.next({clientX:a.changedTouches[0].clientX,clientY:a.changedTouches[0].clientY,event:a})}),o=e.listen("document","touchcancel",a=>{i.next({clientX:a.changedTouches[0].clientX,clientY:a.changedTouches[0].clientY,event:a})}))}),()=>{r(),JE&&(s(),o())}}).pipe(W2())}static getInstance(e,n){return t.instance||(t.instance=new t(e,n)),t.instance}},Xpt=(()=>{class t{constructor(n,i,r,s){this.renderer=n,this.element=i,this.zone=r,this.resizableDirective=s,this.resizeEdges={},this.eventListeners={},this.destroy$=new Mi}ngOnInit(){this.zone.runOutsideAngular(()=>{this.listenOnTheHost("mousedown").subscribe(n=>{this.onMousedown(n,n.clientX,n.clientY)}),this.listenOnTheHost("mouseup").subscribe(n=>{this.onMouseup(n.clientX,n.clientY)}),JE&&(this.listenOnTheHost("touchstart").subscribe(n=>{this.onMousedown(n,n.touches[0].clientX,n.touches[0].clientY)}),ra(this.listenOnTheHost("touchend"),this.listenOnTheHost("touchcancel")).subscribe(n=>{this.onMouseup(n.changedTouches[0].clientX,n.changedTouches[0].clientY)}))})}ngOnDestroy(){this.destroy$.next(),this.unsubscribeEventListeners()}onMousedown(n,i,r){n.cancelable&&n.preventDefault(),this.eventListeners.touchmove||(this.eventListeners.touchmove=this.renderer.listen(this.element.nativeElement,"touchmove",s=>{this.onMousemove(s,s.targetTouches[0].clientX,s.targetTouches[0].clientY)})),this.eventListeners.mousemove||(this.eventListeners.mousemove=this.renderer.listen(this.element.nativeElement,"mousemove",s=>{this.onMousemove(s,s.clientX,s.clientY)})),this.resizable.mousedown.next({clientX:i,clientY:r,edges:this.resizeEdges})}onMouseup(n,i){this.unsubscribeEventListeners(),this.resizable.mouseup.next({clientX:n,clientY:i,edges:this.resizeEdges})}get resizable(){return this.resizableDirective||this.resizableContainer}onMousemove(n,i,r){this.resizable.mousemove.next({clientX:i,clientY:r,edges:this.resizeEdges,event:n})}unsubscribeEventListeners(){Object.keys(this.eventListeners).forEach(n=>{this.eventListeners[n](),delete this.eventListeners[n]})}listenOnTheHost(n){return bh(this.element.nativeElement,n).pipe(Mr(this.destroy$))}}return t.\u0275fac=function(n){return new(n||t)(R(Ac),R(fi),R(pn),R(f7e,8))},t.\u0275dir=mi({type:t,selectors:[["","mwlResizeHandle",""]],inputs:{resizeEdges:"resizeEdges",resizableContainer:"resizableContainer"}}),t})(),g7e=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({}),t})()});function NDi(t,e){if(t&1){let n=re();h(0,"a",5),Ce(1,"calendarA11y"),F("mwlClick",function(r){let s=V(n).$implicit,o=w(2).event;return B(s.onClick({event:o,sourceEvent:r}))})("mwlKeydownEnter",function(r){let s=V(n).$implicit,o=w(2).event;return B(s.onClick({event:o,sourceEvent:r}))}),p()}if(t&2){let n=e.$implicit;b("ngClass",n.cssClass)("innerHtml",n.label,Pi),Bn("aria-label",Nt(1,3,sn(6,ODi,n),"actionButtonLabel"))}}function VDi(t,e){if(t&1&&(h(0,"span",3),W(1,NDi,2,8,"a",4),p()),t&2){let n=w(),i=n.event,r=n.trackByActionId;g(),b("ngForOf",i.actions)("ngForTrackBy",r)}}function BDi(t,e){if(t&1&&W(0,VDi,2,2,"span",2),t&2){let n=e.event;b("ngIf",n.actions)}}function zDi(t,e){}function GDi(t,e){if(t&1&&(ee(0,"span",2),Ce(1,"calendarEventTitle"),Ce(2,"calendarA11y")),t&2){let n=e.event,i=e.view;b("innerHTML",Xf(1,2,n.title,i,n),Pi),Bn("aria-hidden",Nt(2,6,bn(9,Zie),"hideEventTitle"))}}function WDi(t,e){}function jDi(t,e){if(t&1&&(h(0,"div",2),ee(1,"div",3)(2,"div",4),p()),t&2){let n=e.contents,i=e.placement;b("ngClass","cal-tooltip-"+i),g(2),b("innerHtml",n,Pi)}}function $Di(t,e){}function qDi(t,e){if(t&1){let n=re();h(0,"div",4),F("mwlClick",function(r){let s=V(n).$implicit,o=w().dayHeaderClicked;return B(o.emit({day:s,sourceEvent:r}))})("drop",function(r){let s=V(n).$implicit,o=w().eventDropped;return B(o.emit({event:r.dropData.event,newStart:s.date}))})("dragEnter",function(){let r=V(n).$implicit,s=w().dragEnter;return B(s.emit({date:r.date}))}),h(1,"b"),y(2),Ce(3,"calendarDate"),p(),ee(4,"br"),h(5,"span"),y(6),Ce(7,"calendarDate"),p()()}if(t&2){let n=e.$implicit,i=w().locale;ki("cal-past",n.isPast)("cal-today",n.isToday)("cal-future",n.isFuture)("cal-weekend",n.isWeekend),b("ngClass",n.cssClass),g(2),ye(Xf(3,11,n.date,"weekViewColumnHeader",i)),g(4),ye(Xf(7,15,n.date,"weekViewColumnSubHeader",i))}}function ZDi(t,e){if(t&1&&(h(0,"div",2),W(1,qDi,8,19,"div",3),p()),t&2){let n=e.days,i=e.trackByWeekDayHeaderDate;g(),b("ngForOf",n)("ngForTrackBy",i)}}function XDi(t,e){}function eEi(t,e){if(t&1){let n=re();h(0,"div",2),Ce(1,"calendarEventTitle"),Ce(2,"calendarA11y"),F("mwlClick",function(r){let s=V(n).eventClicked;return B(s.emit({sourceEvent:r}))})("mwlKeydownEnter",function(r){let s=V(n).eventClicked;return B(s.emit({sourceEvent:r}))}),ee(3,"mwl-calendar-event-actions",3),y(4," "),ee(5,"mwl-calendar-event-title",4),p()}if(t&2){let n=e.weekEvent,i=e.tooltipPlacement,r=e.tooltipTemplate,s=e.tooltipAppendToBody,o=e.tooltipDisabled,a=e.tooltipDelay,l=e.daysInWeek,c=w();b("ngStyle",Qm(20,JDi,n.event.color==null?null:n.event.color.secondaryText,n.event.color==null?null:n.event.color.secondary,n.event.color==null?null:n.event.color.primary))("mwlCalendarTooltip",o?"":Xf(1,13,n.event.title,l===1?"dayTooltip":"weekTooltip",n.tempEvent||n.event))("tooltipPlacement",i)("tooltipEvent",n.tempEvent||n.event)("tooltipTemplate",r)("tooltipAppendToBody",s)("tooltipDelay",a),Bn("aria-label",Nt(2,17,bs(24,KDi,n.tempEvent||n.event,c.locale),"eventDescription")),g(3),b("event",n.tempEvent||n.event)("customTemplate",c.eventActionsTemplate),g(2),b("event",n.tempEvent||n.event)("customTemplate",c.eventTitleTemplate)("view",l===1?"day":"week")}}function tEi(t,e){}function nEi(t,e){if(t&1&&(h(0,"div",4),y(1),Ce(2,"calendarDate"),p()),t&2){let n=w(),i=n.segment,r=n.locale,s=n.daysInWeek;g(),Ke(" ",Xf(2,1,i.displayDate,s===1?"dayViewHour":"weekViewHour",r)," ")}}function rEi(t,e){if(t&1&&(h(0,"div",2),Ce(1,"calendarA11y"),W(2,nEi,3,5,"div",3),p()),t&2){let n=e.segment,i=e.segmentHeight,r=e.isTimeLabel,s=e.daysInWeek;mo("height",i,"px"),ki("cal-hour-start",n.isStart)("cal-after-hour-start",!n.isStart),b("ngClass",n.cssClass),Bn("aria-hidden",Nt(1,9,bn(12,Zie),s===1?"hideDayHourSegment":"hideWeekHourSegment")),g(2),b("ngIf",r)}}function sEi(t,e){}function aEi(t,e){if(t&1&&ee(0,"div",3),t&2){let n=w().topPx;mo("top",n,"px")}}function lEi(t,e){if(t&1&&W(0,aEi,1,2,"div",2),t&2){let n=e.isVisible;b("ngIf",n)}}function cEi(t,e){}function vEi(t,e){t&1&&eu(0)}function yEi(t,e){if(t&1){let n=re();h(0,"div",17),F("drop",function(r){let s=V(n).$implicit,o=w(2);return B(o.eventDropped(r,s.date,!0))})("dragEnter",function(){let r=V(n).$implicit,s=w(2);return B(s.dateDragEnter(r.date))}),p()}}function _Ei(t,e){t&1&&ee(0,"div",24),t&2&&b("resizeEdges",bn(1,hEi))}function CEi(t,e){t&1&&ee(0,"div",25),t&2&&b("resizeEdges",bn(1,pEi))}function xEi(t,e){if(t&1){let n=re();h(0,"div",20,3),F("resizeStart",function(r){let s=V(n).$implicit;w();let o=pr(1),a=w(2);return B(a.allDayEventResizeStarted(o,s,r))})("resizing",function(r){let s=V(n).$implicit,o=w(3);return B(o.allDayEventResizing(s,r,o.dayColumnWidth))})("resizeEnd",function(){let r=V(n).$implicit,s=w(3);return B(s.allDayEventResizeEnded(r))})("dragStart",function(){let r=V(n).$implicit,s=pr(1);w();let o=pr(1),a=w(2);return B(a.dragStarted(o,s,r,!1))})("dragging",function(){V(n);let r=w(3);return B(r.allDayEventDragMove())})("dragEnd",function(r){let s=V(n).$implicit,o=w(3);return B(o.dragEnded(s,r,o.dayColumnWidth))}),W(2,_Ei,1,2,"div",21),h(3,"mwl-calendar-week-view-event",22),F("eventClicked",function(r){let s=V(n).$implicit,o=w(3);return B(o.eventClicked.emit({event:s.event,sourceEvent:r.sourceEvent}))}),p(),W(4,CEi,1,2,"div",23),p()}if(t&2){let n=e.$implicit,i=w(3);mo("width",100/i.days.length*n.span,"%")("margin-left",i.rtl?null:100/i.days.length*n.offset,"%")("margin-right",i.rtl?100/i.days.length*n.offset:null,"%"),ki("cal-draggable",n.event.draggable&&i.allDayEventResizes.size===0)("cal-starts-within-week",!n.startsBeforeWeek)("cal-ends-within-week",!n.endsAfterWeek),b("ngClass",n.event==null?null:n.event.cssClass)("resizeCursors",i.resizeCursors)("resizeSnapGrid",bs(33,dEi,i.dayColumnWidth,i.dayColumnWidth))("validateResize",i.validateResize)("dropData",bs(36,emt,n.event,i.calendarId))("dragAxis",bs(39,_7e,n.event.draggable&&i.allDayEventResizes.size===0,!i.snapDraggedEvents&&n.event.draggable&&i.allDayEventResizes.size===0))("dragSnapGrid",i.snapDraggedEvents?sn(42,uEi,i.dayColumnWidth):bn(44,Zie))("validateDrag",i.validateDrag)("touchStartLongPress",bn(45,Jpt)),g(2),b("ngIf",(n.event==null||n.event.resizable==null?null:n.event.resizable.beforeStart)&&!n.startsBeforeWeek),g(),b("locale",i.locale)("weekEvent",n)("tooltipPlacement",i.tooltipPlacement)("tooltipTemplate",i.tooltipTemplate)("tooltipAppendToBody",i.tooltipAppendToBody)("tooltipDelay",i.tooltipDelay)("customTemplate",i.eventTemplate)("eventTitleTemplate",i.eventTitleTemplate)("eventActionsTemplate",i.eventActionsTemplate)("daysInWeek",i.daysInWeek),g(),b("ngIf",(n.event==null||n.event.resizable==null?null:n.event.resizable.afterEnd)&&!n.endsAfterWeek)}}function bEi(t,e){if(t&1&&(h(0,"div",18,2),W(2,xEi,5,46,"div",19),p()),t&2){let n=e.$implicit,i=w(2);g(2),b("ngForOf",n.row)("ngForTrackBy",i.trackByWeekAllDayEvent)}}function wEi(t,e){if(t&1){let n=re();h(0,"div",12,1),F("dragEnter",function(){V(n);let r=w();return B(r.dragEnter("allDay"))})("dragLeave",function(){V(n);let r=w();return B(r.dragLeave("allDay"))}),h(2,"div",10)(3,"div",13),W(4,vEi,1,0,"ng-container",14),p(),W(5,yEi,1,0,"div",15),p(),W(6,bEi,3,2,"div",16),p()}if(t&2){let n=w();g(4),b("ngTemplateOutlet",n.allDayEventsLabelTemplate),g(),b("ngForOf",n.days)("ngForTrackBy",n.trackByWeekDayHeaderDate),g(),b("ngForOf",n.view.allDayEventRows)("ngForTrackBy",n.trackById)}}function SEi(t,e){if(t&1&&ee(0,"mwl-calendar-week-view-hour-segment",29),t&2){let n=e.$implicit,i=w(3);mo("height",i.hourSegmentHeight,"px"),b("segment",n)("segmentHeight",i.hourSegmentHeight)("locale",i.locale)("customTemplate",i.hourSegmentTemplate)("isTimeLabel",!0)("daysInWeek",i.daysInWeek)}}function TEi(t,e){if(t&1&&(h(0,"div",27),W(1,SEi,1,8,"mwl-calendar-week-view-hour-segment",28),p()),t&2){let n=e.$implicit,i=e.odd,r=w(2);ki("cal-hour-odd",i),g(),b("ngForOf",n.segments)("ngForTrackBy",r.trackByHourSegment)}}function DEi(t,e){if(t&1&&(h(0,"div",13),W(1,TEi,2,4,"div",26),p()),t&2){let n=w();g(),b("ngForOf",n.view.hourColumns[0].hours)("ngForTrackBy",n.trackByHour)}}function EEi(t,e){t&1&&ee(0,"div",24),t&2&&b("resizeEdges",bn(1,fEi))}function MEi(t,e){}function kEi(t,e){if(t&1){let n=re();h(0,"mwl-calendar-week-view-event",36),F("eventClicked",function(r){V(n);let s=w().$implicit,o=w(2);return B(o.eventClicked.emit({event:s.event,sourceEvent:r.sourceEvent}))}),p()}if(t&2){let n=w().$implicit,i=w().$implicit,r=w();b("locale",r.locale)("weekEvent",n)("tooltipPlacement",r.tooltipPlacement)("tooltipTemplate",r.tooltipTemplate)("tooltipAppendToBody",r.tooltipAppendToBody)("tooltipDisabled",r.dragActive||r.timeEventResizes.size>0)("tooltipDelay",r.tooltipDelay)("customTemplate",r.eventTemplate)("eventTitleTemplate",r.eventTitleTemplate)("eventActionsTemplate",r.eventActionsTemplate)("column",i)("daysInWeek",r.daysInWeek)}}function IEi(t,e){t&1&&ee(0,"div",25),t&2&&b("resizeEdges",bn(1,gEi))}function AEi(t,e){if(t&1){let n=re();h(0,"div",34,3),F("resizeStart",function(r){let s=V(n).$implicit,o=w(2),a=pr(6);return B(o.timeEventResizeStarted(a,s,r))})("resizing",function(r){let s=V(n).$implicit,o=w(2);return B(o.timeEventResizing(s,r))})("resizeEnd",function(){let r=V(n).$implicit,s=w(2);return B(s.timeEventResizeEnded(r))})("dragStart",function(){let r=V(n).$implicit,s=pr(1),o=w(2),a=pr(6);return B(o.dragStarted(a,s,r,!0))})("dragging",function(r){let s=V(n).$implicit,o=w(2);return B(o.dragMove(s,r))})("dragEnd",function(r){let s=V(n).$implicit,o=w(2);return B(o.dragEnded(s,r,o.dayColumnWidth,!0))}),W(2,EEi,1,2,"div",21)(3,MEi,0,0,"ng-template",35)(4,kEi,1,12,"ng-template",null,4,Cc)(6,IEi,1,2,"div",23),p()}if(t&2){let n=e.$implicit,i=pr(5),r=w(2);mo("top",n.top,"px")("height",n.height,"px")("left",n.left,"%")("width",n.width,"%"),ki("cal-draggable",n.event.draggable&&r.timeEventResizes.size===0)("cal-starts-within-day",!n.startsBeforeDay)("cal-ends-within-day",!n.endsAfterDay),b("ngClass",n.event.cssClass)("hidden",n.height===0&&n.width===0)("resizeCursors",r.resizeCursors)("resizeSnapGrid",Sb(30,mEi,r.dayColumnWidth,r.dayColumnWidth,r.eventSnapSize||r.hourSegmentHeight,r.eventSnapSize||r.hourSegmentHeight))("validateResize",r.validateResize)("allowNegativeResizes",!0)("dropData",bs(35,emt,n.event,r.calendarId))("dragAxis",bs(38,_7e,n.event.draggable&&r.timeEventResizes.size===0,n.event.draggable&&r.timeEventResizes.size===0))("dragSnapGrid",r.snapDraggedEvents?bs(41,_7e,r.dayColumnWidth,r.eventSnapSize||r.hourSegmentHeight):bn(44,Zie))("touchStartLongPress",bn(45,Jpt))("ghostDragEnabled",!r.snapDraggedEvents)("ghostElementTemplate",i)("validateDrag",r.validateDrag),g(2),b("ngIf",(n.event==null||n.event.resizable==null?null:n.event.resizable.beforeStart)&&!n.startsBeforeDay),g(),b("ngTemplateOutlet",i),g(3),b("ngIf",(n.event==null||n.event.resizable==null?null:n.event.resizable.afterEnd)&&!n.endsAfterDay)}}function PEi(t,e){if(t&1){let n=re();h(0,"mwl-calendar-week-view-hour-segment",38),F("mwlClick",function(r){let s=V(n).$implicit,o=w(3);return B(o.hourSegmentClicked.emit({date:s.date,sourceEvent:r}))})("drop",function(r){let s=V(n).$implicit,o=w(3);return B(o.eventDropped(r,s.date,!1))})("dragEnter",function(){let r=V(n).$implicit,s=w(3);return B(s.dateDragEnter(r.date))}),p()}if(t&2){let n=e.$implicit,i=w(3);mo("height",i.hourSegmentHeight,"px"),b("segment",n)("segmentHeight",i.hourSegmentHeight)("locale",i.locale)("customTemplate",i.hourSegmentTemplate)("daysInWeek",i.daysInWeek)("clickListenerDisabled",i.hourSegmentClicked.observers.length===0)("dragOverClass",!i.dragActive||!i.snapDraggedEvents?"cal-drag-over":null)("isTimeLabel",i.daysInWeek===1)}}function REi(t,e){if(t&1&&(h(0,"div",27),W(1,PEi,1,10,"mwl-calendar-week-view-hour-segment",37),p()),t&2){let n=e.$implicit,i=e.odd,r=w(2);ki("cal-hour-odd",i),g(),b("ngForOf",n.segments)("ngForTrackBy",r.trackByHourSegment)}}function FEi(t,e){if(t&1&&(h(0,"div",30),ee(1,"mwl-calendar-week-view-current-time-marker",31),h(2,"div",32),W(3,AEi,7,46,"div",33),p(),W(4,REi,2,4,"div",26),p()),t&2){let n=e.$implicit,i=w();g(),b("columnDate",n.date)("dayStartHour",i.dayStartHour)("dayStartMinute",i.dayStartMinute)("dayEndHour",i.dayEndHour)("dayEndMinute",i.dayEndMinute)("hourSegments",i.hourSegments)("hourDuration",i.hourDuration)("hourSegmentHeight",i.hourSegmentHeight)("customTemplate",i.currentTimeMarkerTemplate),g(2),b("ngForOf",n.events)("ngForTrackBy",i.trackByWeekTimeEvent),g(),b("ngForOf",n.hours)("ngForTrackBy",i.trackByHour)}}function nmt(t,e){return Math.floor(t.left)<=Math.ceil(e.left)&&Math.floor(e.left)<=Math.ceil(t.right)&&Math.floor(t.left)<=Math.ceil(e.right)&&Math.floor(e.right)<=Math.ceil(t.right)}function zEi(t,e){return Math.floor(t.top)<=Math.ceil(e.top)&&Math.floor(e.top)<=Math.ceil(t.bottom)&&Math.floor(t.top)<=Math.ceil(e.bottom)&&Math.floor(e.bottom)<=Math.ceil(t.bottom)}function HEi(t,e){return nmt(t,e)&&zEi(t,e)}function rmt(t,e){return Math.round(t/e)*e}function KEi(t,e,n){return(n||$Ei)/(t*e)}function y7e(t,e,n,i,r){let s=rmt(t,i||n),o=KEi(e,n,r);return s*o}function Qpt(t,e,n){return e.end?e.end:t.addMinutes(e.start,n)}function eM(t,e,n,i){let r=0,s=0,o=n<0?t.subDays:t.addDays,a=e;for(;s<=Math.abs(n);){a=o(e,r);let l=t.getDay(a);i.indexOf(l)===-1&&s++,r++}return a}function YEi(t,e,n){let i=e||t;return n.start<=t&&t<=n.end||n.start<=i&&i<=n.end}function qEi(t,e,n,i){return t.dropData&&t.dropData.event&&(t.dropData.calendarId!==i||t.dropData.event.allDay&&!n||!t.dropData.event.allDay&&n)}function C7e(t,e,n,i=[],r){let s=r?t.startOfDay(e):t.startOfWeek(e,{weekStartsOn:n}),o=t.endOfWeek(e,{weekStartsOn:n});for(;i.indexOf(t.getDay(s))>-1&&s<o;)s=t.addDays(s,1);if(r){let a=t.endOfDay(eM(t,s,r-1,i));return{viewStart:s,viewEnd:a}}else{let a=o;for(;i.indexOf(t.getDay(a))>-1&&a>s;)a=t.subDays(a,1);return{viewStart:s,viewEnd:a}}}function ZEi({x:t,y:e}){return Math.abs(t)>1||Math.abs(e)>1}var LDi,ODi,HDi,Zie,UDi,_7e,Jpt,KDi,YDi,QDi,JDi,iEi,oEi,dEi,emt,uEi,hEi,pEi,mEi,fEi,gEi,Xie,tmt,$ie,Qie,LEi,DW,imt,OEi,NEi,VEi,BEi,smt,GEi,WEi,UEi,jEi,$Ei,jw,XEi,Kie,omt,w7e,n7r,tM,iM,r7r,Yie,x7e,b7e,QEi,JEi,eMi,tMi,nM,f_,Jie,qie,amt,$w=Q(()=>{me();me();ri();ri();$n();Cl();Mpt();n7e();n7e();p7e();p7e();ng();v7e();v7e();LDi=(t,e)=>({event:t,trackByActionId:e}),ODi=t=>({action:t});HDi=(t,e)=>({event:t,view:e}),Zie=()=>({});UDi=(t,e,n)=>({contents:t,placement:e,event:n});_7e=(t,e)=>({x:t,y:e}),Jpt=()=>({delay:300,delta:30}),KDi=(t,e)=>({event:t,locale:e}),YDi=(t,e,n,i,r,s)=>({days:t,locale:e,dayHeaderClicked:n,eventDropped:i,dragEnter:r,trackByWeekDayHeaderDate:s});QDi=(t,e,n,i,r,s,o,a,l)=>({weekEvent:t,tooltipPlacement:e,eventClicked:n,tooltipTemplate:i,tooltipAppendToBody:r,tooltipDisabled:s,tooltipDelay:o,column:a,daysInWeek:l}),JDi=(t,e,n)=>({color:t,backgroundColor:e,borderColor:n});iEi=(t,e,n,i,r)=>({segment:t,locale:e,segmentHeight:n,isTimeLabel:i,daysInWeek:r});oEi=(t,e,n,i,r,s,o)=>({columnDate:t,dayStartHour:e,dayStartMinute:n,dayEndHour:i,dayEndMinute:r,isVisible:s,topPx:o});dEi=(t,e)=>({left:t,right:e}),emt=(t,e)=>({event:t,calendarId:e}),uEi=t=>({x:t}),hEi=()=>({left:!0}),pEi=()=>({right:!0}),mEi=(t,e,n,i)=>({left:t,right:e,top:n,bottom:i}),fEi=()=>({left:!0,top:!0}),gEi=()=>({right:!0,bottom:!0});Xie=(()=>{class t{constructor(n,i,r){this.renderer=n,this.elm=i,this.document=r,this.clickListenerDisabled=!1,this.click=new nt,this.destroy$=new Mi}ngOnInit(){this.clickListenerDisabled||this.listen().pipe(Mr(this.destroy$)).subscribe(n=>{n.stopPropagation(),this.click.emit(n)})}ngOnDestroy(){this.destroy$.next()}listen(){return new Qa(n=>this.renderer.listen(this.elm.nativeElement,"click",i=>{n.next(i)}))}}return t.\u0275fac=function(n){return new(n||t)(R(Ac),R(fi),R(Lr))},t.\u0275dir=mi({type:t,selectors:[["","mwlClick",""]],inputs:{clickListenerDisabled:"clickListenerDisabled"},outputs:{click:"mwlClick"}}),t})(),tmt=(()=>{class t{constructor(n,i,r){this.host=n,this.ngZone=i,this.renderer=r,this.keydown=new nt,this.keydownListener=null}ngOnInit(){this.ngZone.runOutsideAngular(()=>{this.keydownListener=this.renderer.listen(this.host.nativeElement,"keydown",n=>{(n.keyCode===13||n.which===13||n.key==="Enter")&&(n.preventDefault(),n.stopPropagation(),this.ngZone.run(()=>{this.keydown.emit(n)}))})})}ngOnDestroy(){this.keydownListener!==null&&(this.keydownListener(),this.keydownListener=null)}}return t.\u0275fac=function(n){return new(n||t)(R(fi),R(pn),R(Ac))},t.\u0275dir=mi({type:t,selectors:[["","mwlKeydownEnter",""]],outputs:{keydown:"mwlKeydownEnter"}}),t})(),$ie=(()=>{class t{constructor(n){this.i18nPlural=n}monthCell({day:n,locale:i}){return n.badgeTotal>0?`
        ${nf(n.date,"EEEE MMMM d",i)},
        ${this.i18nPlural.transform(n.badgeTotal,{"=0":"No events","=1":"One event",other:"# events"})},
         click to expand
      `:`${nf(n.date,"EEEE MMMM d",i)}`}openDayEventsLandmark({date:n,locale:i}){return`
      Beginning of expanded view for ${nf(n,"EEEE MMMM dd",i)}
    `}openDayEventsAlert({date:n,locale:i}){return`${nf(n,"EEEE MMMM dd",i)} expanded`}eventDescription({event:n,locale:i}){if(n.allDay===!0)return this.allDayEventDescription({event:n,locale:i});let r=`
      ${nf(n.start,"EEEE MMMM dd",i)},
      ${n.title}, from ${nf(n.start,"hh:mm a",i)}
    `;return n.end?r+` to ${nf(n.end,"hh:mm a",i)}`:r}allDayEventDescription({event:n,locale:i}){let r=`
      ${n.title}, event spans multiple days:
      start time ${nf(n.start,"MMMM dd hh:mm a",i)}
    `;return n.end?r+`, stop time ${nf(n.end,"MMMM d hh:mm a",i)}`:r+", no stop time"}actionButtonLabel({action:n}){return n.a11yLabel}monthCellTabIndex(){return 0}hideMonthCellEvents(){return!0}hideEventTitle(){return!0}hideWeekHourSegment(){return!0}hideDayHourSegment(){return!0}}return t.\u0275fac=function(n){return new(n||t)(it(Xj))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),Qie=(()=>{class t{constructor(n,i){this.calendarA11y=n,this.locale=i}transform(n,i){if(n.locale=n.locale||this.locale,typeof this.calendarA11y[i]>"u"){let r=Object.getOwnPropertyNames(Object.getPrototypeOf($ie.prototype)).filter(s=>s!=="constructor");throw new Error(`${i} is not a valid a11y method. Can only be one of ${r.join(", ")}`)}return this.calendarA11y[i](n)}}return t.\u0275fac=function(n){return new(n||t)(R($ie,16),R(Z0,16))},t.\u0275pipe=kr({name:"calendarA11y",type:t,pure:!0}),t})(),LEi=(()=>{class t{constructor(){this.trackByActionId=(n,i)=>i.id?i.id:i}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-event-actions"]],inputs:{event:"event",customTemplate:"customTemplate"},decls:3,vars:5,consts:[["defaultTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","cal-event-actions",4,"ngIf"],[1,"cal-event-actions"],["class","cal-event-action","href","javascript:;","tabindex","0","role","button",3,"ngClass","innerHtml","mwlClick","mwlKeydownEnter",4,"ngFor","ngForOf","ngForTrackBy"],["href","javascript:;","tabindex","0","role","button",1,"cal-event-action",3,"mwlClick","mwlKeydownEnter","ngClass","innerHtml"]],template:function(n,i){if(n&1&&W(0,BDi,1,1,"ng-template",null,0,Cc)(2,zDi,0,0,"ng-template",1),n&2){let r=pr(1);g(2),b("ngTemplateOutlet",i.customTemplate||r)("ngTemplateOutletContext",bs(2,LDi,i.event,i.trackByActionId))}},dependencies:[_s,Hi,Ct,rf,Xie,tmt,Qie],encapsulation:2}),t})(),DW=class{month(e,n){return e.title}monthTooltip(e,n){return e.title}week(e,n){return e.title}weekTooltip(e,n){return e.title}day(e,n){return e.title}dayTooltip(e,n){return e.title}},imt=(()=>{class t{constructor(n){this.calendarEventTitle=n}transform(n,i,r){return this.calendarEventTitle[i](r,n)}}return t.\u0275fac=function(n){return new(n||t)(R(DW,16))},t.\u0275pipe=kr({name:"calendarEventTitle",type:t,pure:!0}),t})(),OEi=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-event-title"]],inputs:{event:"event",customTemplate:"customTemplate",view:"view"},decls:3,vars:5,consts:[["defaultTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"cal-event-title",3,"innerHTML"]],template:function(n,i){if(n&1&&W(0,GDi,3,10,"ng-template",null,0,Cc)(2,WDi,0,0,"ng-template",1),n&2){let r=pr(1);g(2),b("ngTemplateOutlet",i.customTemplate||r)("ngTemplateOutletContext",bs(2,HDi,i.event,i.view))}},dependencies:[rf,imt,Qie],encapsulation:2}),t})(),NEi=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-tooltip-window"]],inputs:{contents:"contents",placement:"placement",event:"event",customTemplate:"customTemplate"},decls:3,vars:6,consts:[["defaultTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"cal-tooltip",3,"ngClass"],[1,"cal-tooltip-arrow"],[1,"cal-tooltip-inner",3,"innerHtml"]],template:function(n,i){if(n&1&&W(0,jDi,3,2,"ng-template",null,0,Cc)(2,$Di,0,0,"ng-template",1),n&2){let r=pr(1);g(2),b("ngTemplateOutlet",i.customTemplate||r)("ngTemplateOutletContext",Qm(2,UDi,i.contents,i.placement,i.event))}},dependencies:[_s,rf],encapsulation:2}),t})(),VEi=(()=>{class t{constructor(n,i,r,s,o,a){this.elementRef=n,this.injector=i,this.renderer=r,this.viewContainerRef=o,this.document=a,this.placement="auto",this.delay=null,this.cancelTooltipDelay$=new Mi,this.tooltipFactory=s.resolveComponentFactory(NEi)}ngOnChanges(n){this.tooltipRef&&(n.contents||n.customTemplate||n.event)&&(this.tooltipRef.instance.contents=this.contents,this.tooltipRef.instance.customTemplate=this.customTemplate,this.tooltipRef.instance.event=this.event,this.tooltipRef.changeDetectorRef.markForCheck(),this.contents||this.hide())}ngOnDestroy(){this.hide()}onMouseOver(){(this.delay===null?Fr("now"):uj(this.delay)).pipe(Mr(this.cancelTooltipDelay$)).subscribe(()=>{this.show()})}onMouseOut(){this.hide()}show(){!this.tooltipRef&&this.contents&&(this.tooltipRef=this.viewContainerRef.createComponent(this.tooltipFactory,0,this.injector,[]),this.tooltipRef.instance.contents=this.contents,this.tooltipRef.instance.customTemplate=this.customTemplate,this.tooltipRef.instance.event=this.event,this.appendToBody&&this.document.body.appendChild(this.tooltipRef.location.nativeElement),requestAnimationFrame(()=>{this.positionTooltip()}))}hide(){this.tooltipRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.tooltipRef.hostView)),this.tooltipRef=null),this.cancelTooltipDelay$.next()}positionTooltip(n=[]){this.tooltipRef&&(this.tooltipRef.changeDetectorRef.detectChanges(),this.tooltipRef.instance.placement=Jbe(this.elementRef.nativeElement,this.tooltipRef.location.nativeElement.children[0],this.placement,this.appendToBody),n.indexOf(this.tooltipRef.instance.placement)===-1&&this.positionTooltip([...n,this.tooltipRef.instance.placement]))}}return t.\u0275fac=function(n){return new(n||t)(R(fi),R($o),R(Ac),R(yy),R(Na),R(Lr))},t.\u0275dir=mi({type:t,selectors:[["","mwlCalendarTooltip",""]],hostBindings:function(n,i){n&1&&F("mouseenter",function(){return i.onMouseOver()})("mouseleave",function(){return i.onMouseOut()})},inputs:{contents:[0,"mwlCalendarTooltip","contents"],placement:[0,"tooltipPlacement","placement"],customTemplate:[0,"tooltipTemplate","customTemplate"],event:[0,"tooltipEvent","event"],appendToBody:[0,"tooltipAppendToBody","appendToBody"],delay:[0,"tooltipDelay","delay"]},features:[yn]}),t})(),BEi=t=>Rpt(t,(...n)=>console.warn("angular-calendar",...n));smt=(t,e)=>e.date.toISOString(),GEi=(t,e)=>e.date.toISOString(),WEi=(t,e)=>e.segments[0].date.toISOString(),UEi=(t,e)=>e.event.id?e.event.id:e.event,jEi=(t,e)=>e.event.id?e.event.id:e.event,$Ei=60;jw=class{},XEi=(()=>{class t{constructor(n){this.dateAdapter=n}monthViewColumnHeader({date:n,locale:i}){return nf(n,"EEEE",i)}monthViewDayNumber({date:n,locale:i}){return nf(n,"d",i)}monthViewTitle({date:n,locale:i}){return nf(n,"LLLL y",i)}weekViewColumnHeader({date:n,locale:i}){return nf(n,"EEEE",i)}weekViewColumnSubHeader({date:n,locale:i}){return nf(n,"MMM d",i)}weekViewTitle({date:n,locale:i,weekStartsOn:r,excludeDays:s,daysInWeek:o}){let{viewStart:a,viewEnd:l}=C7e(this.dateAdapter,n,r,s,o),c=(d,u)=>nf(d,"MMM d"+(u?", yyyy":""),i);return`${c(a,a.getUTCFullYear()!==l.getUTCFullYear())} - ${c(l,!0)}`}weekViewHour({date:n,locale:i}){return nf(n,"h a",i)}dayViewHour({date:n,locale:i}){return nf(n,"h a",i)}dayViewTitle({date:n,locale:i}){return nf(n,"EEEE, MMMM d, y",i)}}return t.\u0275fac=function(n){return new(n||t)(it(jw))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),Kie=(()=>{class t extends XEi{}return t.\u0275fac=(()=>{let e;return function(i){return(e||(e=Wo(t)))(i||t)}})(),t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),omt=(()=>{class t{constructor(n,i){this.dateFormatter=n,this.locale=i}transform(n,i,r=this.locale,s=0,o=[],a){if(typeof this.dateFormatter[i]>"u"){let l=Object.getOwnPropertyNames(Object.getPrototypeOf(Kie.prototype)).filter(c=>c!=="constructor");throw new Error(`${i} is not a valid date formatter. Can only be one of ${l.join(", ")}`)}return this.dateFormatter[i]({date:n,locale:r,weekStartsOn:s,excludeDays:o,daysInWeek:a})}}return t.\u0275fac=function(n){return new(n||t)(R(Kie,16),R(Z0,16))},t.\u0275pipe=kr({name:"calendarDate",type:t,pure:!0}),t})(),w7e=(()=>{class t{constructor(n){this.dateAdapter=n}getMonthView(n){return Ppt(this.dateAdapter,n)}getWeekViewHeader(n){return Wie(this.dateAdapter,n)}getWeekView(n){return Apt(this.dateAdapter,n)}}return t.\u0275fac=function(n){return new(n||t)(it(jw))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),n7r=new Ri("Moment"),tM=function(t){return t.Drag="drag",t.Drop="drop",t.Resize="resize",t}(tM||{}),iM=(()=>{class t{static forRoot(n,i={}){return{ngModule:t,providers:[n,i.eventTitleFormatter||DW,i.dateFormatter||Kie,i.utils||w7e,i.a11y||$ie]}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({providers:[Xj],imports:[sd]}),t})(),r7r=Nd("collapse",[bc("void",So({height:0,overflow:"hidden","padding-top":0,"padding-bottom":0})),bc("*",So({height:"*",overflow:"hidden","padding-top":"*","padding-bottom":"*"})),cl("* => void",Ml("150ms ease-out")),cl("void => *",Ml("150ms ease-in"))]),Yie=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({imports:[sd,TW,iM,TW]}),t})(),x7e=class{constructor(e,n){this.dragContainerElement=e,this.startPosition=n.getBoundingClientRect()}validateDrag({x:e,y:n,snapDraggedEvents:i,dragAlreadyMoved:r,transform:s}){let o=ZEi({x:e,y:n})||r;if(i){let a=Object.assign({},this.startPosition,{left:this.startPosition.left+s.x,right:this.startPosition.right+s.x,top:this.startPosition.top+s.y,bottom:this.startPosition.bottom+s.y});if(o){let l=this.dragContainerElement.getBoundingClientRect(),c=l.top<a.top&&a.top<l.bottom,d=l.top<a.bottom&&a.bottom<l.bottom;return nmt(l,a)&&(c||d)}return!1}else return o}},b7e=class{constructor(e,n,i){this.resizeContainerElement=e,this.minWidth=n,this.rtl=i}validateResize({rectangle:e,edges:n}){return this.rtl&&(typeof n.left<"u"?(e.left-=n.left,e.right+=n.left):typeof n.right<"u"&&(e.left+=n.right,e.right-=n.right),e.width=e.right-e.left),this.minWidth&&Math.ceil(e.width)<Math.ceil(this.minWidth)?!1:HEi(this.resizeContainerElement.getBoundingClientRect(),e)}},QEi=(()=>{class t{constructor(){this.dayHeaderClicked=new nt,this.eventDropped=new nt,this.dragEnter=new nt,this.trackByWeekDayHeaderDate=smt}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-week-view-header"]],inputs:{days:"days",locale:"locale",customTemplate:"customTemplate"},outputs:{dayHeaderClicked:"dayHeaderClicked",eventDropped:"eventDropped",dragEnter:"dragEnter"},decls:3,vars:9,consts:[["defaultTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["role","row",1,"cal-day-headers"],["class","cal-header","mwlDroppable","","dragOverClass","cal-drag-over","tabindex","0","role","columnheader",3,"cal-past","cal-today","cal-future","cal-weekend","ngClass","mwlClick","drop","dragEnter",4,"ngFor","ngForOf","ngForTrackBy"],["mwlDroppable","","dragOverClass","cal-drag-over","tabindex","0","role","columnheader",1,"cal-header",3,"mwlClick","drop","dragEnter","ngClass"]],template:function(n,i){if(n&1&&W(0,ZDi,2,2,"ng-template",null,0,Cc)(2,XDi,0,0,"ng-template",1),n&2){let r=pr(1);g(2),b("ngTemplateOutlet",i.customTemplate||r)("ngTemplateOutletContext",_j(2,YDi,i.days,i.locale,i.dayHeaderClicked,i.eventDropped,i.dragEnter,i.trackByWeekDayHeaderDate))}},dependencies:[_s,Hi,rf,h7e,Xie,omt],encapsulation:2}),t})(),JEi=(()=>{class t{constructor(){this.eventClicked=new nt}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-week-view-event"]],inputs:{locale:"locale",weekEvent:"weekEvent",tooltipPlacement:"tooltipPlacement",tooltipAppendToBody:"tooltipAppendToBody",tooltipDisabled:"tooltipDisabled",tooltipDelay:"tooltipDelay",customTemplate:"customTemplate",eventTitleTemplate:"eventTitleTemplate",eventActionsTemplate:"eventActionsTemplate",tooltipTemplate:"tooltipTemplate",column:"column",daysInWeek:"daysInWeek"},outputs:{eventClicked:"eventClicked"},decls:3,vars:12,consts:[["defaultTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["tabindex","0","role","application",1,"cal-event",3,"mwlClick","mwlKeydownEnter","ngStyle","mwlCalendarTooltip","tooltipPlacement","tooltipEvent","tooltipTemplate","tooltipAppendToBody","tooltipDelay"],[3,"event","customTemplate"],[3,"event","customTemplate","view"]],template:function(n,i){if(n&1&&W(0,eEi,6,27,"ng-template",null,0,Cc)(2,tEi,0,0,"ng-template",1),n&2){let r=pr(1);g(2),b("ngTemplateOutlet",i.customTemplate||r)("ngTemplateOutletContext",sDe(2,QDi,[i.weekEvent,i.tooltipPlacement,i.eventClicked,i.tooltipTemplate,i.tooltipAppendToBody,i.tooltipDisabled,i.tooltipDelay,i.column,i.daysInWeek]))}},dependencies:[rf,rr,LEi,OEi,VEi,Xie,tmt,imt,Qie],encapsulation:2}),t})(),eMi=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-week-view-hour-segment"]],inputs:{segment:"segment",segmentHeight:"segmentHeight",locale:"locale",isTimeLabel:"isTimeLabel",daysInWeek:"daysInWeek",customTemplate:"customTemplate"},decls:3,vars:8,consts:[["defaultTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"cal-hour-segment",3,"ngClass"],["class","cal-time",4,"ngIf"],[1,"cal-time"]],template:function(n,i){if(n&1&&W(0,rEi,3,13,"ng-template",null,0,Cc)(2,sEi,0,0,"ng-template",1),n&2){let r=pr(1);g(2),b("ngTemplateOutlet",i.customTemplate||r)("ngTemplateOutletContext",yj(2,iEi,i.segment,i.locale,i.segmentHeight,i.isTimeLabel,i.daysInWeek))}},dependencies:[_s,Ct,rf,omt,Qie],encapsulation:2}),t})(),tMi=(()=>{class t{constructor(n,i){this.dateAdapter=n,this.zone=i,this.columnDate$=new qs(void 0),this.marker$=this.zone.onStable.pipe(Fl(()=>zM(60*1e3)),ll(0),xO(this.columnDate$),lr(r=>{let s=this.dateAdapter.setMinutes(this.dateAdapter.setHours(r,this.dayStartHour),this.dayStartMinute),o=this.dateAdapter.setMinutes(this.dateAdapter.setHours(r,this.dayEndHour),this.dayEndMinute),a=this.hourSegments*this.hourSegmentHeight/(this.hourDuration||60),l=new Date;return{isVisible:this.dateAdapter.isSameDay(r,l)&&l>=s&&l<=o,top:this.dateAdapter.differenceInMinutes(l,s)*a}}))}ngOnChanges(n){n.columnDate&&this.columnDate$.next(n.columnDate.currentValue)}}return t.\u0275fac=function(n){return new(n||t)(R(jw),R(pn))},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-week-view-current-time-marker"]],inputs:{columnDate:"columnDate",dayStartHour:"dayStartHour",dayStartMinute:"dayStartMinute",dayEndHour:"dayEndHour",dayEndMinute:"dayEndMinute",hourSegments:"hourSegments",hourDuration:"hourDuration",hourSegmentHeight:"hourSegmentHeight",customTemplate:"customTemplate"},features:[yn],decls:5,vars:14,consts:[["defaultTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","cal-current-time-marker",3,"top",4,"ngIf"],[1,"cal-current-time-marker"]],template:function(n,i){if(n&1&&(W(0,lEi,1,1,"ng-template",null,0,Cc)(2,cEi,0,0,"ng-template",1),Ce(3,"async"),Ce(4,"async")),n&2){let r,s=pr(1);g(2),b("ngTemplateOutlet",i.customTemplate||s)("ngTemplateOutletContext",rDe(6,oEi,i.columnDate,i.dayStartHour,i.dayStartMinute,i.dayEndHour,i.dayEndMinute,(r=tt(3,2,i.marker$))==null?null:r.isVisible,(r=tt(4,4,i.marker$))==null?null:r.top))}},dependencies:[Ct,rf,Xu],encapsulation:2}),t})(),nM=(()=>{class t{constructor(n,i,r,s,o){this.cdr=n,this.utils=i,this.dateAdapter=s,this.element=o,this.events=[],this.excludeDays=[],this.tooltipPlacement="auto",this.tooltipAppendToBody=!0,this.tooltipDelay=null,this.precision="days",this.snapDraggedEvents=!0,this.hourSegments=2,this.hourSegmentHeight=30,this.minimumEventHeight=30,this.dayStartHour=0,this.dayStartMinute=0,this.dayEndHour=23,this.dayEndMinute=59,this.dayHeaderClicked=new nt,this.eventClicked=new nt,this.eventTimesChanged=new nt,this.beforeViewRender=new nt,this.hourSegmentClicked=new nt,this.allDayEventResizes=new Map,this.timeEventResizes=new Map,this.eventDragEnterByType={allDay:0,time:0},this.dragActive=!1,this.dragAlreadyMoved=!1,this.calendarId=Symbol("angular calendar week view id"),this.rtl=!1,this.trackByWeekDayHeaderDate=smt,this.trackByHourSegment=GEi,this.trackByHour=WEi,this.trackByWeekAllDayEvent=UEi,this.trackByWeekTimeEvent=jEi,this.trackByHourColumn=(a,l)=>l.hours[0]?l.hours[0].segments[0].date.toISOString():l,this.trackById=(a,l)=>l.id,this.locale=r}ngOnInit(){this.refresh&&(this.refreshSubscription=this.refresh.subscribe(()=>{this.refreshAll(),this.cdr.markForCheck()}))}ngOnChanges(n){let i=n.viewDate||n.excludeDays||n.weekendDays||n.daysInWeek||n.weekStartsOn,r=n.viewDate||n.dayStartHour||n.dayStartMinute||n.dayEndHour||n.dayEndMinute||n.hourSegments||n.hourDuration||n.weekStartsOn||n.weekendDays||n.excludeDays||n.hourSegmentHeight||n.events||n.daysInWeek||n.minimumEventHeight;i&&this.refreshHeader(),n.events&&BEi(this.events),r&&this.refreshBody(),(i||r)&&this.emitBeforeViewRender()}ngOnDestroy(){this.refreshSubscription&&this.refreshSubscription.unsubscribe()}ngAfterViewInit(){this.rtl=typeof window<"u"&&getComputedStyle(this.element.nativeElement).direction==="rtl",this.cdr.detectChanges()}timeEventResizeStarted(n,i,r){this.timeEventResizes.set(i.event,r),this.resizeStarted(n,i)}timeEventResizing(n,i){this.timeEventResizes.set(n.event,i);let r=new Map,s=[...this.events];this.timeEventResizes.forEach((o,a)=>{let l=this.getTimeEventResizedDates(a,o),c=ve(ve({},a),l);r.set(c,a);let d=s.indexOf(a);s[d]=c}),this.restoreOriginalEvents(s,r,!0)}timeEventResizeEnded(n){this.view=this.getWeekView(this.events);let i=this.timeEventResizes.get(n.event);if(i){this.timeEventResizes.delete(n.event);let r=this.getTimeEventResizedDates(n.event,i);this.eventTimesChanged.emit({newStart:r.start,newEnd:r.end,event:n.event,type:tM.Resize})}}allDayEventResizeStarted(n,i,r){this.allDayEventResizes.set(i,{originalOffset:i.offset,originalSpan:i.span,edge:typeof r.edges.left<"u"?"left":"right"}),this.resizeStarted(n,i,this.getDayColumnWidth(n))}allDayEventResizing(n,i,r){let s=this.allDayEventResizes.get(n),o=this.rtl?-1:1;if(typeof i.edges.left<"u"){let a=Math.round(+i.edges.left/r)*o;n.offset=s.originalOffset+a,n.span=s.originalSpan-a}else if(typeof i.edges.right<"u"){let a=Math.round(+i.edges.right/r)*o;n.span=s.originalSpan+a}}allDayEventResizeEnded(n){let i=this.allDayEventResizes.get(n);if(i){let r=i.edge==="left",s;r?s=n.offset-i.originalOffset:s=n.span-i.originalSpan,n.offset=i.originalOffset,n.span=i.originalSpan;let o=this.getAllDayEventResizedDates(n.event,s,r);this.eventTimesChanged.emit({newStart:o.start,newEnd:o.end,event:n.event,type:tM.Resize}),this.allDayEventResizes.delete(n)}}getDayColumnWidth(n){return Math.floor(n.offsetWidth/this.days.length)}dateDragEnter(n){this.lastDragEnterDate=n}eventDropped(n,i,r){qEi(n,i,r,this.calendarId)&&this.lastDragEnterDate.getTime()===i.getTime()&&(!this.snapDraggedEvents||n.dropData.event!==this.lastDraggedEvent)&&this.eventTimesChanged.emit({type:tM.Drop,event:n.dropData.event,newStart:i,allDay:r}),this.lastDraggedEvent=null}dragEnter(n){this.eventDragEnterByType[n]++}dragLeave(n){this.eventDragEnterByType[n]--}dragStarted(n,i,r,s){this.dayColumnWidth=this.getDayColumnWidth(n);let o=new x7e(n,i);this.validateDrag=({x:a,y:l,transform:c})=>{let d=this.allDayEventResizes.size===0&&this.timeEventResizes.size===0&&o.validateDrag({x:a,y:l,snapDraggedEvents:this.snapDraggedEvents,dragAlreadyMoved:this.dragAlreadyMoved,transform:c});if(d&&this.validateEventTimesChanged){let u=this.getDragMovedEventTimes(r,{x:a,y:l},this.dayColumnWidth,s);return this.validateEventTimesChanged({type:tM.Drag,event:r.event,newStart:u.start,newEnd:u.end})}return d},this.dragActive=!0,this.dragAlreadyMoved=!1,this.lastDraggedEvent=null,this.eventDragEnterByType={allDay:0,time:0},!this.snapDraggedEvents&&s&&this.view.hourColumns.forEach(a=>{let l=a.events.find(c=>c.event===r.event&&c!==r);l&&(l.width=0,l.height=0)}),this.cdr.markForCheck()}dragMove(n,i){let r=this.getDragMovedEventTimes(n,i,this.dayColumnWidth,!0),s=n.event,o=ve(ve({},s),r),a=this.events.map(l=>l===s?o:l);this.restoreOriginalEvents(a,new Map([[o,s]]),this.snapDraggedEvents),this.dragAlreadyMoved=!0}allDayEventDragMove(){this.dragAlreadyMoved=!0}dragEnded(n,i,r,s=!1){this.view=this.getWeekView(this.events),this.dragActive=!1,this.validateDrag=null;let{start:o,end:a}=this.getDragMovedEventTimes(n,i,r,s);(this.snapDraggedEvents||this.eventDragEnterByType[s?"time":"allDay"]>0)&&YEi(o,a,this.view.period)&&(this.lastDraggedEvent=n.event,this.eventTimesChanged.emit({newStart:o,newEnd:a,event:n.event,type:tM.Drag,allDay:!s}))}refreshHeader(){this.days=this.utils.getWeekViewHeader(ve({viewDate:this.viewDate,weekStartsOn:this.weekStartsOn,excluded:this.excludeDays,weekendDays:this.weekendDays},C7e(this.dateAdapter,this.viewDate,this.weekStartsOn,this.excludeDays,this.daysInWeek)))}refreshBody(){this.view=this.getWeekView(this.events)}refreshAll(){this.refreshHeader(),this.refreshBody(),this.emitBeforeViewRender()}emitBeforeViewRender(){this.days&&this.view&&this.beforeViewRender.emit(ve({header:this.days},this.view))}getWeekView(n){return this.utils.getWeekView(ve({events:n,viewDate:this.viewDate,weekStartsOn:this.weekStartsOn,excluded:this.excludeDays,precision:this.precision,absolutePositionedEvents:!0,hourSegments:this.hourSegments,hourDuration:this.hourDuration,dayStart:{hour:this.dayStartHour,minute:this.dayStartMinute},dayEnd:{hour:this.dayEndHour,minute:this.dayEndMinute},segmentHeight:this.hourSegmentHeight,weekendDays:this.weekendDays,minimumEventHeight:this.minimumEventHeight},C7e(this.dateAdapter,this.viewDate,this.weekStartsOn,this.excludeDays,this.daysInWeek)))}getDragMovedEventTimes(n,i,r,s){let o=rmt(i.x,r)/r*(this.rtl?-1:1),a=s?y7e(i.y,this.hourSegments,this.hourSegmentHeight,this.eventSnapSize,this.hourDuration):0,l=this.dateAdapter.addMinutes(eM(this.dateAdapter,n.event.start,o,this.excludeDays),a),c;return n.event.end&&(c=this.dateAdapter.addMinutes(eM(this.dateAdapter,n.event.end,o,this.excludeDays),a)),{start:l,end:c}}restoreOriginalEvents(n,i,r=!0){let s=this.view;r&&(this.view=this.getWeekView(n));let o=n.filter(a=>i.has(a));this.view.hourColumns.forEach((a,l)=>{s.hourColumns[l].hours.forEach((c,d)=>{c.segments.forEach((u,m)=>{a.hours[d].segments[m].cssClass=u.cssClass})}),o.forEach(c=>{let d=i.get(c),u=a.events.find(m=>m.event===(r?c:d));if(u)u.event=d,u.tempEvent=c,r||(u.height=0,u.width=0);else{let m={event:d,left:0,top:0,height:0,width:0,startsBeforeDay:!1,endsAfterDay:!1,tempEvent:c};a.events.push(m)}})}),i.clear()}getTimeEventResizedDates(n,i){let r={start:n.start,end:Qpt(this.dateAdapter,n,this.minimumEventHeight)},c=n,{end:s}=c,o=al(c,["end"]),a={start:this.dateAdapter.addMinutes(r.end,this.minimumEventHeight*-1),end:Qpt(this.dateAdapter,o,this.minimumEventHeight)},l=this.rtl?-1:1;if(typeof i.edges.left<"u"){let d=Math.round(+i.edges.left/this.dayColumnWidth)*l,u=eM(this.dateAdapter,r.start,d,this.excludeDays);u<a.start?r.start=u:r.start=a.start}else if(typeof i.edges.right<"u"){let d=Math.round(+i.edges.right/this.dayColumnWidth)*l,u=eM(this.dateAdapter,r.end,d,this.excludeDays);u>a.end?r.end=u:r.end=a.end}if(typeof i.edges.top<"u"){let d=y7e(i.edges.top,this.hourSegments,this.hourSegmentHeight,this.eventSnapSize,this.hourDuration),u=this.dateAdapter.addMinutes(r.start,d);u<a.start?r.start=u:r.start=a.start}else if(typeof i.edges.bottom<"u"){let d=y7e(i.edges.bottom,this.hourSegments,this.hourSegmentHeight,this.eventSnapSize,this.hourDuration),u=this.dateAdapter.addMinutes(r.end,d);u>a.end?r.end=u:r.end=a.end}return r}resizeStarted(n,i,r){this.dayColumnWidth=this.getDayColumnWidth(n);let s=new b7e(n,r,this.rtl);this.validateResize=({rectangle:o,edges:a})=>{let l=s.validateResize({rectangle:ve({},o),edges:a});if(l&&this.validateEventTimesChanged){let c;if(!r)c=this.getTimeEventResizedDates(i.event,{rectangle:o,edges:a});else{let d=this.rtl?-1:1;if(typeof a.left<"u"){let u=Math.round(+a.left/r)*d;c=this.getAllDayEventResizedDates(i.event,u,!this.rtl)}else{let u=Math.round(+a.right/r)*d;c=this.getAllDayEventResizedDates(i.event,u,this.rtl)}}return this.validateEventTimesChanged({type:tM.Resize,event:i.event,newStart:c.start,newEnd:c.end})}return l},this.cdr.markForCheck()}getAllDayEventResizedDates(n,i,r){let s=n.start,o=n.end||n.start;return r?s=eM(this.dateAdapter,s,i,this.excludeDays):o=eM(this.dateAdapter,o,i,this.excludeDays),{start:s,end:o}}}return t.\u0275fac=function(n){return new(n||t)(R(Kt),R(w7e),R(Z0),R(jw),R(fi))},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-week-view"]],inputs:{viewDate:"viewDate",events:"events",excludeDays:"excludeDays",refresh:"refresh",locale:"locale",tooltipPlacement:"tooltipPlacement",tooltipTemplate:"tooltipTemplate",tooltipAppendToBody:"tooltipAppendToBody",tooltipDelay:"tooltipDelay",weekStartsOn:"weekStartsOn",headerTemplate:"headerTemplate",eventTemplate:"eventTemplate",eventTitleTemplate:"eventTitleTemplate",eventActionsTemplate:"eventActionsTemplate",precision:"precision",weekendDays:"weekendDays",snapDraggedEvents:"snapDraggedEvents",hourSegments:"hourSegments",hourDuration:"hourDuration",hourSegmentHeight:"hourSegmentHeight",minimumEventHeight:"minimumEventHeight",dayStartHour:"dayStartHour",dayStartMinute:"dayStartMinute",dayEndHour:"dayEndHour",dayEndMinute:"dayEndMinute",hourSegmentTemplate:"hourSegmentTemplate",eventSnapSize:"eventSnapSize",allDayEventsLabelTemplate:"allDayEventsLabelTemplate",daysInWeek:"daysInWeek",currentTimeMarkerTemplate:"currentTimeMarkerTemplate",validateEventTimesChanged:"validateEventTimesChanged",resizeCursors:"resizeCursors"},outputs:{dayHeaderClicked:"dayHeaderClicked",eventClicked:"eventClicked",eventTimesChanged:"eventTimesChanged",beforeViewRender:"beforeViewRender",hourSegmentClicked:"hourSegmentClicked"},features:[yn],decls:8,vars:9,consts:[["dayColumns",""],["allDayEventsContainer",""],["eventRowContainer",""],["event",""],["weekEventTemplate",""],["role","grid",1,"cal-week-view"],[3,"dayHeaderClicked","eventDropped","dragEnter","days","locale","customTemplate"],["class","cal-all-day-events","mwlDroppable","",3,"dragEnter","dragLeave",4,"ngIf"],["mwlDroppable","",1,"cal-time-events",3,"dragEnter","dragLeave"],["class","cal-time-label-column",4,"ngIf"],[1,"cal-day-columns"],["class","cal-day-column",4,"ngFor","ngForOf","ngForTrackBy"],["mwlDroppable","",1,"cal-all-day-events",3,"dragEnter","dragLeave"],[1,"cal-time-label-column"],[4,"ngTemplateOutlet"],["class","cal-day-column","mwlDroppable","","dragOverClass","cal-drag-over",3,"drop","dragEnter",4,"ngFor","ngForOf","ngForTrackBy"],["class","cal-events-row",4,"ngFor","ngForOf","ngForTrackBy"],["mwlDroppable","","dragOverClass","cal-drag-over",1,"cal-day-column",3,"drop","dragEnter"],[1,"cal-events-row"],["class","cal-event-container","mwlResizable","","mwlDraggable","","dragActiveClass","cal-drag-active",3,"cal-draggable","cal-starts-within-week","cal-ends-within-week","ngClass","width","marginLeft","marginRight","resizeCursors","resizeSnapGrid","validateResize","dropData","dragAxis","dragSnapGrid","validateDrag","touchStartLongPress","resizeStart","resizing","resizeEnd","dragStart","dragging","dragEnd",4,"ngFor","ngForOf","ngForTrackBy"],["mwlResizable","","mwlDraggable","","dragActiveClass","cal-drag-active",1,"cal-event-container",3,"resizeStart","resizing","resizeEnd","dragStart","dragging","dragEnd","ngClass","resizeCursors","resizeSnapGrid","validateResize","dropData","dragAxis","dragSnapGrid","validateDrag","touchStartLongPress"],["class","cal-resize-handle cal-resize-handle-before-start","mwlResizeHandle","",3,"resizeEdges",4,"ngIf"],[3,"eventClicked","locale","weekEvent","tooltipPlacement","tooltipTemplate","tooltipAppendToBody","tooltipDelay","customTemplate","eventTitleTemplate","eventActionsTemplate","daysInWeek"],["class","cal-resize-handle cal-resize-handle-after-end","mwlResizeHandle","",3,"resizeEdges",4,"ngIf"],["mwlResizeHandle","",1,"cal-resize-handle","cal-resize-handle-before-start",3,"resizeEdges"],["mwlResizeHandle","",1,"cal-resize-handle","cal-resize-handle-after-end",3,"resizeEdges"],["class","cal-hour",3,"cal-hour-odd",4,"ngFor","ngForOf","ngForTrackBy"],[1,"cal-hour"],[3,"height","segment","segmentHeight","locale","customTemplate","isTimeLabel","daysInWeek",4,"ngFor","ngForOf","ngForTrackBy"],[3,"segment","segmentHeight","locale","customTemplate","isTimeLabel","daysInWeek"],[1,"cal-day-column"],[3,"columnDate","dayStartHour","dayStartMinute","dayEndHour","dayEndMinute","hourSegments","hourDuration","hourSegmentHeight","customTemplate"],[1,"cal-events-container"],["class","cal-event-container","mwlResizable","","mwlDraggable","","dragActiveClass","cal-drag-active",3,"cal-draggable","cal-starts-within-day","cal-ends-within-day","ngClass","hidden","top","height","left","width","resizeCursors","resizeSnapGrid","validateResize","allowNegativeResizes","dropData","dragAxis","dragSnapGrid","touchStartLongPress","ghostDragEnabled","ghostElementTemplate","validateDrag","resizeStart","resizing","resizeEnd","dragStart","dragging","dragEnd",4,"ngFor","ngForOf","ngForTrackBy"],["mwlResizable","","mwlDraggable","","dragActiveClass","cal-drag-active",1,"cal-event-container",3,"resizeStart","resizing","resizeEnd","dragStart","dragging","dragEnd","ngClass","hidden","resizeCursors","resizeSnapGrid","validateResize","allowNegativeResizes","dropData","dragAxis","dragSnapGrid","touchStartLongPress","ghostDragEnabled","ghostElementTemplate","validateDrag"],[3,"ngTemplateOutlet"],[3,"eventClicked","locale","weekEvent","tooltipPlacement","tooltipTemplate","tooltipAppendToBody","tooltipDisabled","tooltipDelay","customTemplate","eventTitleTemplate","eventActionsTemplate","column","daysInWeek"],["mwlDroppable","","dragActiveClass","cal-drag-active",3,"height","segment","segmentHeight","locale","customTemplate","daysInWeek","clickListenerDisabled","dragOverClass","isTimeLabel","mwlClick","drop","dragEnter",4,"ngFor","ngForOf","ngForTrackBy"],["mwlDroppable","","dragActiveClass","cal-drag-active",3,"mwlClick","drop","dragEnter","segment","segmentHeight","locale","customTemplate","daysInWeek","clickListenerDisabled","dragOverClass","isTimeLabel"]],template:function(n,i){if(n&1){let r=re();h(0,"div",5)(1,"mwl-calendar-week-view-header",6),F("dayHeaderClicked",function(o){return V(r),B(i.dayHeaderClicked.emit(o))})("eventDropped",function(o){return V(r),B(i.eventDropped({dropData:o},o.newStart,!0))})("dragEnter",function(o){return V(r),B(i.dateDragEnter(o.date))}),p(),W(2,wEi,7,5,"div",7),h(3,"div",8),F("dragEnter",function(){return V(r),B(i.dragEnter("time"))})("dragLeave",function(){return V(r),B(i.dragLeave("time"))}),W(4,DEi,2,2,"div",9),h(5,"div",10,0),W(7,FEi,5,13,"div",11),p()()()}n&2&&(g(),b("days",i.days)("locale",i.locale)("customTemplate",i.headerTemplate),g(),b("ngIf",i.view.allDayEventRows.length>0),g(2),b("ngIf",i.view.hourColumns.length>0&&i.daysInWeek!==1),g(),ki("cal-resize-active",i.timeEventResizes.size>0),g(2),b("ngForOf",i.view.hourColumns)("ngForTrackBy",i.trackByHourColumn))},dependencies:[_s,Hi,Ct,rf,f7e,Xpt,Wpt,h7e,Xie,QEi,JEi,eMi,tMi],encapsulation:2}),t})(),f_=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({imports:[sd,g7e,TW,iM,g7e,TW]}),t})(),Jie=(()=>{class t{constructor(){this.events=[],this.hourSegments=2,this.hourSegmentHeight=30,this.minimumEventHeight=30,this.dayStartHour=0,this.dayStartMinute=0,this.dayEndHour=23,this.dayEndMinute=59,this.tooltipPlacement="auto",this.tooltipAppendToBody=!0,this.tooltipDelay=null,this.snapDraggedEvents=!0,this.eventClicked=new nt,this.hourSegmentClicked=new nt,this.eventTimesChanged=new nt,this.beforeViewRender=new nt}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=_e({type:t,selectors:[["mwl-calendar-day-view"]],inputs:{viewDate:"viewDate",events:"events",hourSegments:"hourSegments",hourSegmentHeight:"hourSegmentHeight",hourDuration:"hourDuration",minimumEventHeight:"minimumEventHeight",dayStartHour:"dayStartHour",dayStartMinute:"dayStartMinute",dayEndHour:"dayEndHour",dayEndMinute:"dayEndMinute",refresh:"refresh",locale:"locale",eventSnapSize:"eventSnapSize",tooltipPlacement:"tooltipPlacement",tooltipTemplate:"tooltipTemplate",tooltipAppendToBody:"tooltipAppendToBody",tooltipDelay:"tooltipDelay",hourSegmentTemplate:"hourSegmentTemplate",eventTemplate:"eventTemplate",eventTitleTemplate:"eventTitleTemplate",eventActionsTemplate:"eventActionsTemplate",snapDraggedEvents:"snapDraggedEvents",allDayEventsLabelTemplate:"allDayEventsLabelTemplate",currentTimeMarkerTemplate:"currentTimeMarkerTemplate",validateEventTimesChanged:"validateEventTimesChanged",resizeCursors:"resizeCursors"},outputs:{eventClicked:"eventClicked",hourSegmentClicked:"hourSegmentClicked",eventTimesChanged:"eventTimesChanged",beforeViewRender:"beforeViewRender"},decls:1,vars:27,consts:[[1,"cal-day-view",3,"eventClicked","hourSegmentClicked","eventTimesChanged","beforeViewRender","daysInWeek","viewDate","events","hourSegments","hourDuration","hourSegmentHeight","minimumEventHeight","dayStartHour","dayStartMinute","dayEndHour","dayEndMinute","refresh","locale","eventSnapSize","tooltipPlacement","tooltipTemplate","tooltipAppendToBody","tooltipDelay","resizeCursors","hourSegmentTemplate","eventTemplate","eventTitleTemplate","eventActionsTemplate","snapDraggedEvents","allDayEventsLabelTemplate","currentTimeMarkerTemplate","validateEventTimesChanged"]],template:function(n,i){n&1&&(h(0,"mwl-calendar-week-view",0),F("eventClicked",function(s){return i.eventClicked.emit(s)})("hourSegmentClicked",function(s){return i.hourSegmentClicked.emit(s)})("eventTimesChanged",function(s){return i.eventTimesChanged.emit(s)})("beforeViewRender",function(s){return i.beforeViewRender.emit(s)}),p()),n&2&&b("daysInWeek",1)("viewDate",i.viewDate)("events",i.events)("hourSegments",i.hourSegments)("hourDuration",i.hourDuration)("hourSegmentHeight",i.hourSegmentHeight)("minimumEventHeight",i.minimumEventHeight)("dayStartHour",i.dayStartHour)("dayStartMinute",i.dayStartMinute)("dayEndHour",i.dayEndHour)("dayEndMinute",i.dayEndMinute)("refresh",i.refresh)("locale",i.locale)("eventSnapSize",i.eventSnapSize)("tooltipPlacement",i.tooltipPlacement)("tooltipTemplate",i.tooltipTemplate)("tooltipAppendToBody",i.tooltipAppendToBody)("tooltipDelay",i.tooltipDelay)("resizeCursors",i.resizeCursors)("hourSegmentTemplate",i.hourSegmentTemplate)("eventTemplate",i.eventTemplate)("eventTitleTemplate",i.eventTitleTemplate)("eventActionsTemplate",i.eventActionsTemplate)("snapDraggedEvents",i.snapDraggedEvents)("allDayEventsLabelTemplate",i.allDayEventsLabelTemplate)("currentTimeMarkerTemplate",i.currentTimeMarkerTemplate)("validateEventTimesChanged",i.validateEventTimesChanged)},dependencies:[nM],encapsulation:2}),t})(),qie=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({imports:[sd,iM,f_]}),t})(),amt=(()=>{class t{static forRoot(n,i={}){return{ngModule:t,providers:[n,i.eventTitleFormatter||DW,i.dateFormatter||Kie,i.utils||w7e,i.a11y||$ie]}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({imports:[iM,Yie,f_,qie,iM,Yie,f_,qie]}),t})()});function dMi(t){return t.getTime()}function uMi(t){return new Date(t)}function pMi(t){return Math.floor((t.getTime()-sft)/fM)}function mMi(t){return new Date(sft+t*fM)}function gMi(t){return Math.floor((t.getTime()-aft)/Hg)}function vMi(t){return new Date(aft+t*Hg)}function _Mi(t){return Math.floor((t.getTime()-cft)/_C)}function CMi(t){return new Date(cft+t*_C)}function bMi(t){let e=t.getTimezoneOffset()*Hg;return Math.floor((t.getTime()-e)/Jw)}function wMi(t){let e=new Date(1970,0,1);return e.setDate(e.getDate()+t),e}function xM(t){let n=(7+t-4)%7;function i(s){let o=s.getTimezoneOffset()*Hg;return Math.floor((s.getTime()-o)/IW-n/7)}function r(s){let o=new Date(1970,0,1);return o.setDate(o.getDate()+s*7+n),o}return new nv(i,r)}function PMi(t){return t.getFullYear()*12+t.getMonth()}function RMi(t){let e=Math.floor(t/12),n=t-e*12;return new Date(e,n,1)}function LMi(t){return t.getFullYear()}function OMi(t){let e=new Date;return e.setFullYear(t),e.setMonth(0,1),e.setHours(0,0,0,0),e}function VMi(t){return Math.floor(t.getTime()/Hg)}function BMi(t){return new Date(t*Hg)}function HMi(t){return Math.floor(t.getTime()/_C)}function GMi(t){return new Date(t*_C)}function UMi(t){return Math.floor(t.getTime()/Jw)}function jMi(t){let e=new Date(0);return e.setUTCDate(e.getUTCDate()+t),e.setUTCHours(0,0,0,0),e}function KMi(t){return t.getUTCFullYear()*12+t.getUTCMonth()}function YMi(t){let e=Math.floor(t/12),n=t-e*12;return new Date(Date.UTC(e,n,1))}function ZMi(t){return t.getUTCFullYear()}function XMi(t){let e=new Date;return e.setUTCFullYear(t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0),e}function gC(t){let e=xC.find(n=>t.type===n.type&&t.optionsKey===n.optionsKey&&t.identifier===n.identifier);if(e){if(t.packageType==="enterprise"&&e.packageType==="community"){let n=xC.indexOf(e);xC.splice(n,1,t)}}else xC.push(t)}function Nne(){return xC.some(t=>t.packageType==="enterprise")}function fft(t,e){_we.set(t,e)}function EC(t){let{length:e}=t;if(e===0)return;let n=1/0,i=-1/0;for(let s=0;s<e;s++){let o=t[s];o instanceof Date&&(o=o.getTime()),typeof o=="number"&&(o<n&&(n=o),o>i&&(i=o))}let r=[n,i];if(!r.some(s=>!isFinite(s)))return r}function gft(t,e,n){return bU(t,e,n).extent}function bU(t,e,n){var i;let r=!1;return t.length>2&&(t=(i=EC(t))!=null?i:[NaN,NaN]),isNaN(e)||(r||(r=e>t[0]),t=[e,t[1]]),isNaN(n)||(r||(r=n<t[1]),t=[t[0],n]),t[0]>t[1]&&(t=[]),{extent:t,clipped:r}}function qW(t,e){if(t==null||e==null||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(Array.isArray(t[n])&&Array.isArray(e[n])){if(!qW(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function xne(t){return typeof t>"u"?[]:Array.isArray(t)?t:[t]}function JMi(t){return Array.from(new Set(t))}function umt(t,e){dmt[e]||(t(),dmt[e]=!0)}function V7e(t){let e=typeof window<"u"?window:void 0;return e?.[t]}function iki(t,e){Object.getOwnPropertyDescriptor(t,hF)==null&&Object.defineProperty(t,hF,{value:{}});let n=t[hF],i=e.toString();if(typeof n[i]<"u")return n[i];let r=new WeakMap;n[i]={setters:[],getters:[],valuesMap:r};let s=Object.getOwnPropertyDescriptor(t,e),o=s?.set,a=s?.get;return Object.defineProperty(t,e,{set:function(d){let{setters:u}=n[i],m;u.some(f=>f.length>2)&&(m=a?a.call(this):r.get(this));for(let f of u)if(d=f(this,e,d,m),d===bne)return;o?o.call(this,d):r.set(this,d)},get:function(){let d=a?a.call(this):r.get(this);for(let u of n[i].getters)if(d=u(this,e,d),d===bne)return;return d},enumerable:!0,configurable:!1}),n[i]}function cb(t,e,n){return(i,r)=>{let s=iki(i,r);s.setters.push(t),e&&s.getters.unshift(e),n&&Object.assign(s,n)}}function Vne(t){return typeof t<"u"&&hF in t}function pF(t){let e=new Set;for(;Vne(t);)e.add(t?.[hF]),t=Object.getPrototypeOf(t);return Array.from(e).flatMap(n=>Object.keys(n))}function nki(t){return pF(t).reduce((e,n)=>{var i;return e[n]=(i=t[n])!=null?i:null,e},{})}function rki(t,e){let n=e.toString();for(;Vne(t);){let i=t[hF];if(Object.hasOwn(i,n))return i[n];t=Object.getPrototypeOf(t)}}function Cwe(){return(t,e)=>{let n=[`Property [${t}] is deprecated.`,e].filter(Boolean).join(" ");Ns.warnOnce(n)}}function ski(t,e){let n=Cwe(),i=e?.default;return cb((r,s,o)=>(o!==i&&n(s.toString(),t),o))}function oki(t,e){let n=Cwe();return cb((i,r,s)=>(s!==i[t]&&(n(r.toString(),`Use [${t}] instead.`),i[t]=e?e(s):s),bne),(i,r)=>(n(r.toString(),`Use [${t}] instead.`),i[t]))}function aki(){try{return new Function("return true"),!0}catch{return!1}}function js(t){let{changeCb:e,convertor:n}=t??{};return function(i,r){let s=`__${r}`;i[r]||(lki&&e==null&&n==null?cki(i,r,s,t):dki(i,r,s,t))}}function cki(t,e,n,i){let{redraw:r=1,type:s="normal",checkDirtyOnAssignment:o=!1}=i??{},a=new Function("value",`
        const oldValue = this.${n};
        if (value !== oldValue) {
            this.${n} = value;
            ${s==="normal"?`this.markDirty(this, ${r});`:""}
            ${s==="transform"?`this.markDirtyTransform(${r});`:""}
            ${s==="path"?`if (!this._dirtyPath) { this._dirtyPath = true; this.markDirty(this, ${r}); }`:""}
            ${s==="font"?`if (!this._dirtyFont) { this._dirtyFont = true; this.markDirty(this, ${r}); }`:""}
        }
        ${o?"if (value != null && value._dirty > 0) { this.markDirty(value, value._dirty); }":""}
`),l=new Function(`return this.${n};`);Object.defineProperty(t,e,{set:a,get:l,enumerable:!0,configurable:!0})}function dki(t,e,n,i){let{redraw:r=1,type:s="normal",changeCb:o,convertor:a,checkDirtyOnAssignment:l=!1}=i??{};Object.defineProperty(t,e,{set:function(u){let m=this[n];u=a?a(u):u,u!==m&&(this[n]=u,s==="normal"&&this.markDirty(this,r),s==="transform"&&this.markDirtyTransform(r),s==="path"&&!this._dirtyPath&&(this._dirtyPath=!0,this.markDirty(this,r)),s==="font"&&!this._dirtyFont&&(this._dirtyFont=!0,this.markDirty(this,r)),o&&o(this)),l&&u!=null&&u._dirty>0&&this.markDirty(u,u._dirty)},get:function(){return this[n]},enumerable:!0,configurable:!0})}function iU(t){return t!=null}function iv(t){return Array.isArray(t)}function yft(t){return typeof t=="boolean"}function xwe(t){return t instanceof Date}function bwe(t){return xwe(t)&&!isNaN(Number(t))}function Bne(t){return typeof t=="function"}function vM(t){return typeof t=="object"&&t!==null&&!iv(t)}function uki(t){return typeof t=="object"&&t!==null}function bF(t){return typeof t=="object"&&t!==null&&t.constructor===Object}function mF(t){return typeof t=="string"}function bC(t){return typeof t=="number"}function wU(t){return bC(t)&&Number.isFinite(t)}function _ft(t){return typeof window<"u"&&t instanceof HTMLElement}function H6(t){return t instanceof A2||t instanceof zne}function SC(t,e){if(iv(e)){if(!iv(t)||t.length!==e.length||e.some((n,i)=>SC(t[i],n)!=null))return e}else if(vM(e)){if(!vM(t)||!bF(e))return e;let n={},i=new Set([...Object.keys(t),...Object.keys(e)]);for(let r of i)if(t[r]!==e[r])if(typeof t[r]!=typeof e[r])n[r]=e[r];else{let s=SC(t[r],e[r]);s!==null&&(n[r]=s)}return Object.keys(n).length?n:null}else if(t!==e)return e;return null}function nU(t){return iv(t)?t.map(nU):bF(t)?Object.entries(t).reduce((e,[n,i])=>(e[n]=nU(i),e),{}):t}function zm(t,e){var n;let i=(n=e?.avoidDeepClone)!=null?n:[];if(t.map(a=>fF(a)).some(a=>a==="array")){let a=t[t.length-1];return Array.isArray(a)?a.map(l=>{let c=fF(l);return c==="array"?zm([[],l],e):c==="object"?zm([{},l],e):l}):a}let s={},o=new Set(t.map(a=>a!=null?Object.keys(a):[]).reduce((a,l)=>a.concat(l),[]));for(let a of o){let l=t.map(m=>m!=null&&typeof m=="object"&&a in m?m[a]:pmt).filter(m=>m!==pmt);if(l.length===0)continue;let c=l[l.length-1];if(c===G6)continue;let d=l.map(m=>fF(m)),u=d[0];if(d.some(m=>m!==u)){s[a]=c;continue}(u==="array"||u==="object")&&!i.includes(a)?s[a]=zm(l,e):u==="array"?s[a]=[...c]:s[a]=c}return s}function ZW(t,e,n={}){var i,r,s;let{path:o,matcherPath:a=o?o.replace(/(\[[0-9+]+])/i,"[]"):void 0,skip:l=[],constructors:c={},constructedArrays:d=new WeakMap,allowedTypes:u={},idx:m}=n;if(t==null)throw new Error(`AG Charts - target is uninitialised: ${o??"<root>"}`);if(e==null)return t;if(H6(t))return t.set(e);let f=t;m!=null&&"_declarationOrder"in f&&(f._declarationOrder=m);let _=fF(t);for(let x in e){let D=`${a?a+".":""}${x}`;if(l.indexOf(D)>=0)continue;let E=e[x],M=`${o?o+".":""}${x}`,I=f.constructor,z=f[x],G=(i=c[D])!=null?i:c[x];try{let A=fF(z),Y=fF(E);if(_===one&&!(x in t||Object.hasOwn(f,x))){Ns.warn(`unable to set [${M}] in ${I?.name} - property is unknown`);continue}let X=(r=u[D])!=null?r:[A];if(!(A===one&&Y==="object")){if(A!=null&&Y!=null&&!X.includes(Y)){Ns.warn(`unable to set [${M}] in ${I?.name} - can't apply type of [${Y}], allowed types are: [${X}]`);continue}}if(Y==="array")if(G=(s=G??d.get(z))!=null?s:c[`${D}[]`],H6(f[x]))f[x].set(E);else if(G!=null){let ne=E;f[x]=ne.map((pe,ce)=>ZW(new G,pe,cs(Ai({},n),{path:M,matcherPath:D+"[]",idx:ce})))}else f[x]=E;else if(Y===one)f[x]=E;else if(Y==="object")if(z!=null)ZW(z,E,cs(Ai({},n),{path:M,matcherPath:D,idx:void 0}));else if(H6(f[x]))f[x].set(E);else if(G!=null){let ne=new G;H6(ne)?f[x]=ne.set(E):f[x]=ZW(ne,E,cs(Ai({},n),{path:M,matcherPath:D,idx:void 0}))}else f[x]=E;else H6(f[x])?f[x].set(E):f[x]=E}catch(A){Ns.warn(`unable to set [${M}] in [${I?.name}]; nested error is: ${A.message}`)}}return t}function yM(t,e,n,...i){var r;if(iv(t))e(t,...i),t.forEach((s,o)=>{yM(s,e,n,...mmt(i,o))});else if(bF(t)){e(t,...i);for(let s of Object.keys(t)){if((r=n?.skip)!=null&&r.includes(s))continue;let o=t[s];(iv(o)||bF(o))&&yM(o,e,n,...mmt(i,s))}}}function mmt(t,e){return t.map(n=>n?.[e])}function fF(t){return t==null?null:_ft(t)||xwe(t)?"primitive":iv(t)?"array":vM(t)?bF(t)?"object":one:Bne(t)?"function":"primitive"}function k2(t){return t%=wC,t+=wC,t%=wC,t}function hki(t){return t%=wC,t+=wC,t!==wC&&(t%=wC),t}function wne(t){return t%=wC,t<-Math.PI?t+=wC:t>=Math.PI&&(t-=wC),t}function tv(t){return t/180*Math.PI}function pki(t){return t/Math.PI*180}function mki(t,e){return t=k2(t),e=k2(e),e-t+(t>e?2*Math.PI:0)}function T7e(t,e,n){return Math.max(e,Math.min(n,t))}function ev(t,e,n){return Math.min(n,Math.max(t,e))}function Sne(t,e){return ev(Math.min(...e),t,Math.max(...e))}function Tne(t,e,n=1e-10){return Math.abs(t-e)<n}function SU(t){return Math.sign(t)<0||Object.is(t,-0)}function Hne(t){return isFinite(t)&&!isNaN(t)}function wwe(t,e=2){let n=Math.pow(10,e);return Math.round(t*n)/n}function Swe(t,e=2){let n=Math.floor(Math.log(Math.abs(t))/Math.LN10);return n>=0||!isFinite(n)?t.toFixed(e):t.toFixed(Math.abs(n)-1+e)}function Dne(t){return Hne(t)?t:0}function Twe(t,e){return t>=0?Math.floor(t%e):Math.floor(t%e+e)}function ut(t,e={}){let{optional:n=!1}=e;return cb((i,r,s)=>{var o;let a=cs(Ai({},e),{target:i,property:r});if(n&&typeof s>"u"||t(s,a))return H6(i[r])&&!H6(s)?(i[r].set(s),i[r]):s;let l=String(r).replace(/^_*/,""),c=(o=i.constructor.className)!=null?o:i.constructor.name.replace(/Properties$/,"");return Ns.warn(`Property [${l}] of [${c}] cannot be set to [${XW(s)}]${t.message?`; expecting ${EU(t,a)}`:""}, ignoring.`),bne},void 0,{optional:n})}function Gm(t,e="a"){return cu(n=>t.includes(n),`${e} keyword such as ${xki(t)}`)}function cu(t,e){return t.message=e,t}function xki(t){let e=t.map(i=>`'${i}'`);if(e.length===1)return e[0];let n=e.pop();return`${e.join(", ")} or ${n}`}function EU(t,e){return Bne(t.message)?t.message(e):t.message}function bki(t){return e=>EU(e,t)}function wki(t){return Object.assign(t,{restrict({length:e,minLength:n}={}){return cu(i=>iv(i)&&(bC(e)?i.length===e:!0)&&(bC(n)?i.length>=n:!0),bC(n)&&n>0?"a non-empty array":bC(e)?`an array of length ${e}`:"an array")}})}function Ski(t){return Object.assign(t,{restrict({min:e,max:n}={}){let i=["a number"],r=bC(e),s=bC(n);return r&&s?i.push(`between ${e} and ${n} inclusive`):r?i.push(`greater than or equal to ${e}`):s&&i.push(`less than or equal to ${n}`),cu(o=>wU(o)&&(r?o>=e:!0)&&(s?o<=n:!0),i.join(" "))}})}function Tki(t){return Object.assign(t,{restrict(e){let n=i=>H6(i)&&i instanceof e;return cu((i,r)=>n(i)||vM(i)&&n(r.target[r.property]),i=>{var r;return(r=EU(t,i))!=null?r:"an object"})}})}function XW(t){if(typeof t=="number"){if(isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity"}return JSON.stringify(t)}function Ift(){for(let t in Mne)delete Mne[t]}function kC(t){var e;let n=t.constructor,i=Object.hasOwn(n,"className")?n.className:n.name;if(!i)throw new Error(`The ${n} is missing the 'className' property.`);let r=((e=Mne[i])!=null?e:0)+1;return Mne[i]=r,i+"-"+r}function Aft(t,e,n=1/0){let i={nearest:void 0,distanceSquared:n};for(let r of e){let s=r.distanceSquared(t);if(s===0)return{nearest:r,distanceSquared:0};s<i.distanceSquared&&(i.nearest=r,i.distanceSquared=s)}return i}function Dki(t,e,n=1/0){let i=e.transformPoint(t.x,t.y),r={nearest:void 0,distanceSquared:n};for(let s of e.children){let{nearest:o,distanceSquared:a}=s.nearestSquared(i,r.distanceSquared);if(a===0)return{nearest:o,distanceSquared:a};a<r.distanceSquared&&(r.nearest=o,r.distanceSquared=a)}return r}function Lft(){if(typeof navigator>"u")return!1;let t=navigator.userAgent.match(/\(iPhone; CPU iPhone OS (\d+_\d+_\d+) like Mac OS X\)/);if(t==null)return!1;let e=t[1].split("_"),n=Number(e[0]);return n>16?!1:n===16?Number(e[1])<6:!0}function Une(t){let{redraw:e=3,changeCb:n}=t??{};return js({redraw:e,type:"font",changeCb:n})}function Iki(t){let e=new Map,n=r=>dm.getTextSize(r,t);return{size:n,width:r=>{if(e.has(r))return e.get(r);let{width:s}=n(r);return e.set(r,s),s}}}function eS(t){let{fontFamily:e,fontSize:n,fontStyle:i,fontWeight:r}=t;return[i??"",r??"",n+"px",e].join(" ").trim()}function Aki(t,e,n,i){return dm.has.textMetrics?Oft(t,e,n,i):Nft(t,e,n,i)}function Oft(t,e,n,i){var r,s;let o=0,a=0,l=0,c=0,d=0,u=eS(i),{lineHeight:m,textBaseline:f=Wu.defaultStyles.textBaseline,textAlign:_=Wu.defaultStyles.textAlign}=i;for(let x=0;x<t.length;x++){let D=dm.measureText(t[x],u,f,_);o=Math.max(o,D.actualBoundingBoxLeft),l=Math.max(l,D.width),x==0?(a+=D.actualBoundingBoxAscent,c+=D.actualBoundingBoxAscent):d+=(r=D.fontBoundingBoxAscent)!=null?r:D.emHeightAscent,x==t.length-1?c+=D.actualBoundingBoxDescent:d+=(s=D.fontBoundingBoxDescent)!=null?s:D.emHeightDescent}return m!==void 0&&(d=(t.length-1)*m),c+=d,a+=d*Vft(f),new ml(e-o,n-a,l,c)}function Nft(t,e,n,i){let r=0,s=0,o=0,a=eS(i),{lineHeight:l,textBaseline:c=Wu.defaultStyles.textBaseline,textAlign:d=Wu.defaultStyles.textAlign}=i;if(t.length>0){let u=dm.getTextSize(t[0],a);r=u.width,s=u.height}for(let u=1;u<t.length;u++){let m=dm.getTextSize(t[u],a);r=Math.max(r,m.width),o+=l??m.height}switch(d){case"end":case"right":e-=r;break;case"center":e-=r/2}switch(c){case"alphabetic":n-=s*.7+o*.5;break;case"middle":n-=s*.45+o*.5;break;case"ideographic":n-=s+o;break;case"hanging":n-=s*.2+o*.5;break;case"bottom":n-=s+o;break}return new ml(e,n,r,s+o)}function Vft(t){switch(t){case"top":case"hanging":return 0;case"bottom":case"alphabetic":case"ideographic":return 1;case"middle":return .5}}function Bft(t){return typeof t=="string"?t.split(/\r?\n/g):[]}function Pki(...t){let e=t[t.length-1];if(t.length===1)return cb((i,r,s)=>(i[e]=s,s),(i,r)=>i[e]);let n=i=>{let r=i;for(let s=0;s<t.length-1;s+=1)r=r[t[s]];return r};return cb((i,r,s)=>(n(i)[e]=s,s),(i,r)=>n(i)[e])}function Rki(t){return cb((e,n,i)=>(e[t]=i,i))}function Uu(t,e){return cb((n,i,r)=>(n[t][e??i]=r,r))}function R2(t){let{newValue:e,oldValue:n,changeValue:i}=t;return cb((r,s,o,a)=>(o!==a&&(a!==void 0&&n?.call(r,a),o!==void 0&&e?.call(r,o),i?.call(r,o,a)),o))}function Rwe(t,e){let n=t.createElement("style");n.innerHTML=e,t.head.insertBefore(n,t.head.querySelector("style"))}function rU(t,e){var n,i,r;if(typeof t=="string")return t;let{content:s=(n=e?.content)!=null?n:"",title:o=e?.title,color:a=(i=e?.color)!=null?i:"white",backgroundColor:l=(r=e?.backgroundColor)!=null?r:"#888"}=t,c=o?`<div class="${Vp}-title"
        style="color: ${a}; background-color: ${l}">${o}</div>`:"",d=s?`<div class="${Vp}-content">${s}</div>`:"";return`${c}${d}`}function Hft(t,e){var n;(n=sU.constructedArrays)==null||n.set(t,e)}function Lki(t){class e extends Hm{constructor(){super(),this.registerInteraction(t)}}return{constructors:Ai(cs(Ai({},gmt.constructors),{title:e,subtitle:e,footnote:e}),sU.constructors),constructedArrays:sU.constructedArrays,allowedTypes:Ai({},gmt.allowedTypes)}}function Gft(t,e){let n=0;return typeof t=="number"&&typeof e=="number"?n=t-e:typeof t=="string"&&typeof e=="string"?n=t.localeCompare(e):t==null&&e==null||(t==null?n=-1:e==null?n=1:n=String(t).localeCompare(String(e))),n}function Wft(t,e,n){let i=r=>typeof r=="function"?r():r;for(let r in t){let s=n(i(t[r]),i(e[r]));if(s!==0)return s}return 0}function kne(t){let{parallelFlipRotation:e=0,regularFlipRotation:n=0}=t,i=t.rotation?k2(tv(t.rotation)):0,r=!i&&e>=0&&e<=Math.PI?-1:1,s=!i&&n>=0&&n<=Math.PI?-1:1,o=0;return t.parallel?o=r*Math.PI/2:s===-1&&(o=Math.PI),{configuredRotation:i,defaultRotation:o,parallelFlipFlag:r,regularFlipFlag:s}}function Oki(t,e){return isNaN(t)?e?0:10:t}function Nki(t,e,n,i){return t&&!e?n*i===-1?"hanging":"bottom":"middle"}function M7e(t,e,n,i,r){let s=e>0&&e<=Math.PI,o=n>0&&n<=Math.PI,a=s||o?-1:1;if(t)if(e||n){if(i*a===-1)return"end"}else return"center";else if(i*r===-1)return"end";return"start"}function Vki(t,e,n,i,r){let{width:s,height:o}=e,a=new ml(n,i,0,0);r.transformBBox(a,e);let{x:l=0,y:c=0}=e;return e.width=s,e.height=o,{point:{x:l,y:c,size:0},label:{width:s,height:o,text:t}}}function K7e(t,e){let n={};if(Array.isArray(e))for(let i=0;i<t.length;i++)n[`${t[i]}`]=e[i];else for(let i=0;i<t.length;i++)n[`${t[i]}`]=e;return n}function PW(t,e){return n=>Number(t)*(1-n)+Number(e)*n}function zki(t,e){if(typeof t=="string")try{t=CC.fromString(t)}catch{t=CC.fromArray([0,0,0])}if(typeof e=="string")try{e=CC.fromString(e)}catch{e=CC.fromArray([0,0,0])}let n=PW(t.r,e.r),i=PW(t.g,e.g),r=PW(t.b,e.b),s=PW(t.a,e.a);return o=>CC.fromArray([n(o),i(o),r(o),s(o)]).toRgbaString()}function $ki(t){return t.every(e=>e instanceof IF)}function jne(t){return $ki(t)?{nodes:t,selections:[]}:{nodes:[],selections:t}}function Vm(t,e,n,i,r,s,o){let{defaultDuration:a}=n,{fromFn:l,toFn:c,intermediateFn:d}=r,{nodes:u,selections:m}=jne(i),f={added:{},removed:{}};s&&o&&(f.added=K7e(o.added,!0),f.removed=K7e(o.removed,!0));let _=(D,E)=>{var M,I;let z,G=0,A=0;for(let Y of E){let X=D[G]===Y,ne={last:A>=E.length-1,lastLive:G>=D.length-1,prev:E[A-1],prevFromProps:z,prevLive:D[G-1],next:E[A+1],nextLive:D[G+(X?1:0)]},pe=`${t}_${e}_${Y.id}`;n.stopByAnimationId(pe);let ce="unknown";X?s&&o&&(ce=Kki(Y,Y.datum,s,f)):ce="removed";let ie=l(Y,Y.datum,ce,ne),{animationDelay:le,animationDuration:Se,start:je={},finish:ze={}}=ie,Ge=W3(ie,["animationDelay","animationDuration","start","finish"]),Ae=c(Y,Y.datum,ce,ne),{animationDelay:Ye,animationDuration:ft,start:Ft={},finish:Tt={}}=Ae,at=W3(Ae,["animationDelay","animationDuration","start","finish"]);n.animate({id:pe,groupId:t,from:Ge,to:at,ease:oU,onPlay:()=>{Y.setProperties(Ai(Ai({},je),Ft))},onUpdate(yt){Y.setProperties(yt),d&&Y.setProperties(d(Y,Y.datum,ce,ne))},onStop:()=>{Y.setProperties(Ai(Ai(Ai({},at),ze),Tt))},duration:((M=Se??ft)!=null?M:1)*a,delay:((I=le??Ye)!=null?I:0)*a}),X&&G++,A++,z=Ge}},x=0;for(let D of m){let E=D.nodes(),M=E.filter(I=>!D.isGarbage(I));_(M,E),n.animate({id:`${t}_${e}_selection_${x}`,groupId:t,from:0,to:1,ease:oU,onStop(){D.cleanup()}}),x++}_(u,u)}function fb(t,e,n,i,r,s,o={}){let{nodes:a,selections:l}=jne(i),{animationDelay:c=0,animationDuration:d=1,start:u={},finish:m={}}=o,{defaultDuration:f}=n;n.animate({id:`${t}_${e}`,groupId:t,from:r,to:s,ease:oU,onPlay:()=>{for(let _ of a)_.setProperties(u);for(let _ of l)for(let x of _.nodes())x.setProperties(u)},onUpdate(_){for(let x of a)x.setProperties(_);for(let x of l)for(let D of x.nodes())D.setProperties(_)},onStop:()=>{for(let _ of a)_.setProperties(Ai(Ai({},s),m));for(let _ of l)for(let x of _.nodes())x.setProperties(Ai(Ai({},s),m))},duration:d*f,delay:c*f})}function Kki(t,e,n,i){let r=n(t,e);return i.added[r]?"added":i.removed[r]?"removed":"updated"}function x1(t,e){let{nodes:n,selections:i}=jne(t);for(let r of i){for(let s of r.nodes()){let o=e(s,s.datum);s.setProperties(o)}r.cleanup()}for(let r of n){let s=e(r,r.datum);r.setProperties(s)}}function Yki(t,e){let n=-e/t;return t!==0&&n>=0&&n<=1?[n]:[]}function qki(t,e,n){if(t===0)return Yki(e,n);let i=e*e-4*t*n,r=[];if(i===0){let s=-e/(2*t);s>=0&&s<=1&&r.push(s)}else if(i>0){let s=Math.sqrt(i),o=(-e-s)/(2*t),a=(-e+s)/(2*t);o>=0&&o<=1&&r.push(o),a>=0&&a<=1&&r.push(a)}return r}function Zki(t,e,n,i){if(t===0)return qki(e,n,i);let r=e/t,s=n/t,o=i/t,a=(3*s-r*r)/9,l=(9*r*s-27*o-2*r*r*r)/54,c=a*a*a+l*l,d=1/3,u=[];if(c>=0){let m=Math.sqrt(c),f=Math.sign(l+m)*Math.pow(Math.abs(l+m),d),_=Math.sign(l-m)*Math.pow(Math.abs(l-m),d),x=Math.abs(Math.sqrt(3)*(f-_)/2),D=-d*r+(f+_);if(D>=0&&D<=1&&u.push(D),x===0){let E=-d*r-(f+_)/2;E>=0&&E<=1&&u.push(E)}}else{let m=Math.acos(l/Math.sqrt(-a*a*a)),f=d*r,_=2*Math.sqrt(-a),x=_*Math.cos(d*m)-f,D=_*Math.cos(d*(m+2*Math.PI))-f,E=_*Math.cos(d*(m+4*Math.PI))-f;x>=0&&x<=1&&u.push(x),D>=0&&D<=1&&u.push(D),E>=0&&E<=1&&u.push(E)}return u}function QW(t,e,n,i,r,s,o,a){let l=(n-t)*(a-s)-(i-e)*(o-r);if(l===0)return null;let c=((o-r)*(e-s)-(t-r)*(a-s))/l,d=((n-t)*(e-s)-(i-e)*(t-r))/l;return c>=0&&c<=1&&d>=0&&d<=1?{x:t+c*(n-t),y:e+c*(i-e)}:null}function Xki(t,e,n,i,r,s,o,a,l,c,d,u){let m=[],f=c-u,_=d-l,x=l*(u-c)-c*(d-l),D=ymt(t,n,r,o),E=ymt(e,i,s,a),M=f*D[0]+_*E[0],I=f*D[1]+_*E[1],z=f*D[2]+_*E[2],G=f*D[3]+_*E[3]+x,A=Zki(M,I,z,G);for(let Y of A){let X=Y*Y,ne=Y*X,pe=D[0]*ne+D[1]*X+D[2]*Y+D[3],ce=E[0]*ne+E[1]*X+E[2]*Y+E[3],ie;l!==d?ie=(pe-l)/(d-l):ie=(ce-c)/(u-c),ie>=0&&ie<=1&&m.push({x:pe,y:ce})}return m}function ymt(t,e,n,i){return[-t+3*e-3*n+i,3*t-6*e+3*n,-3*t+3*e,t]}function r1t(t,e,n,i,r,s,o,a,l,c){let d=(c-a)/(l-o),u=a-d*o,m=Math.pow(d,2)+1,f=2*(d*(u-e)-t),_=Math.pow(t,2)+Math.pow(u-e,2)-Math.pow(n,2),x=Math.pow(f,2)-4*m*_;if(x<0)return[];let D=(-f+Math.sqrt(x))/2/m,E=(-f-Math.sqrt(x))/2/m,M=[];return[D,E].forEach(I=>{if(!(I>=Math.min(o,l)&&I<=Math.max(o,l)))return;let G=d*I+u,A=k2(i),Y=k2(r),X=k2(Math.atan2(G,I));Y<=A&&(Y+=2*Math.PI),X<A&&(X+=2*Math.PI),s!==(X>=A&&X<=Y)&&M.push({x:I,y:G})}),M}function ed(t){let{redraw:e=3,changeCb:n,convertor:i}=t??{};return js({redraw:e,type:"path",convertor:i,changeCb:n})}function s1t(t,e,n){let i=Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),{innerRadius:r,outerRadius:s}=n;if(n.startAngle===n.endAngle||i<Math.min(r,s)||i>Math.max(r,s))return!1;let o=wne(n.startAngle),a=wne(n.endAngle),l=Math.atan2(e,t);return o<a?l<=a&&l>=o:l<=a&&l>=-Math.PI||l>=o&&l<=Math.PI}function xmt(t,e){let{startAngle:n,endAngle:i,innerRadius:r,outerRadius:s}=e,o={x:s*Math.cos(n),y:s*Math.sin(n)},a={x:s*Math.cos(i),y:s*Math.sin(i)},l=r===0?{x:0,y:0}:{x:r*Math.cos(n),y:r*Math.sin(n)},c=r===0?{x:0,y:0}:{x:r*Math.cos(i),y:r*Math.sin(i)};return QW(t.start.x,t.start.y,t.end.x,t.end.y,o.x,o.y,l.x,l.y)!=null||QW(t.start.x,t.start.y,t.end.x,t.end.y,a.x,a.y,c.x,c.y)!=null||r1t(0,0,s,n,i,!0,t.start.x,t.start.y,t.end.x,t.end.y).length>0}function Jki(t,e){let n={x:t.x,y:t.y},i={x:t.x+t.width,y:t.y},r={x:t.x,y:t.y+t.height},s={x:t.x+t.width,y:t.y+t.height};return xmt({start:n,end:i},e)||xmt({start:r,end:s},e)}function o1t(t){let e,n,i=tIi.exec(t);i&&([,e,t,n]=i);let r=eIi.exec(t);if(!r)throw new Error(`The number formatter is invalid: ${t}`);let[,s,o,a,l,c,d,u,m,f,_]=r;return{fill:s,align:o,sign:a,symbol:l,zero:c,width:parseInt(d),comma:u,precision:parseInt(m),trim:!!f,type:_,prefix:e,suffix:n}}function a1t(t){let e=typeof t=="string"?o1t(t):t,{fill:n,align:i,sign:r="-",symbol:s,zero:o,width:a,comma:l,type:c,prefix:d="",suffix:u="",precision:m}=e,{trim:f}=e,_=m===void 0||isNaN(m),x;if(!c)x=J4.g,f=!0;else if(c in J4&&c in uF)x=_?uF[c]:J4[c];else if(c in J4)x=J4[c];else if(c in uF)x=uF[c];else throw new Error(`The number formatter type is invalid: ${c}`);let D;return m==null||_?D=c?6:12:D=m,E=>{let M=x(E,D);return f&&(M=iIi(M)),l&&(M=nIi(M,l)),M=aIi(E,M,r),s&&s!=="#"&&(M=`${s}${M}`),s==="#"&&c==="x"&&(M=`0x${M}`),c==="s"&&(M=`${M}${rIi(E)}`),(c==="%"||c==="p")&&(M=`${M}%`),a!=null&&!isNaN(a)&&(M=lIi(M,a,n??o,i)),M=`${d}${M}${u}`,M}}function iIi(t){return t.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function nIi(t,e){let n=t.indexOf(".");n<0&&(n=t.length);let i=t.substring(0,n).split(""),r=t.substring(n);for(let s=i.length-3;s>0;s-=3)i.splice(s,0,e);return`${i.join("")}${r}`}function rIi(t){return sIi[l1t(t)]}function l1t(t){let e=Math.log10(Math.abs(t)),n=Math.floor(e/3)*3;return Math.max(c1t,Math.min(d1t,n))}function aIi(t,e,n=""){if(n==="(")return t>=0?e:`(${e})`;let i=n==="+"?"+":"";return`${t>=0?i:oIi}${e}`}function lIi(t,e,n=" ",i=">"){let r=t;if(i===">"||!i)r=r.padStart(e,n);else if(i==="<")r=r.padEnd(e,n);else if(i==="^"){let s=Math.max(0,e-r.length),o=Math.ceil(s/2),a=Math.floor(s/2);r=r.padStart(o+r.length,n),r=r.padEnd(a+r.length,n)}return r}function u1t(t,e){let n=o1t(e??",f"),{precision:i}=n;(i==null||isNaN(i))&&(n.type==="f"||n.type==="%"?n.precision=Math.max(...t.map(s=>{if(typeof s!="number"||s===0)return 0;let o=Math.floor(Math.log10(Math.abs(s))),a=n.type?6:12,l=s.toExponential(a-1).replace(/\.?0+e/,"e"),c=l.indexOf(".");if(c<0)return o>=0?0:-o;let d=l.indexOf("e")-c;return Math.max(0,d-o-1)})):(!n.type||n.type in J4)&&(n.precision=Math.max(...t.map(s=>{if(typeof s!="number")return 0;let o=s.toExponential((n.type?6:12)-1).replace(/\.?0+e/,"e");return o.substring(0,o.indexOf("e")).replace(".","").length}))));let r=a1t(n);return s=>r(Number(s))}function Kne(t,e,n,i,r){if(n<2)return cU(t,e,e-t);let s=wF(t,e,n,i,r);return isNaN(s)?lU(0):(t=Math.ceil(t/s)*s,e=Math.floor(e/s)*s,cU(t,e,s))}function wF(t,e,n,i=0,r=1/0){let s=Math.abs(e-t),o=s/n,a=Math.floor(Math.log10(o)),l=Math.pow(10,a),c=h1t.map(d=>{let u=d*l,m=Math.ceil(s/u),f=m>=i&&m<=r,_=Math.abs(m-n);return{multiplier:d,isWithinBounds:f,diffCount:_}}).sort((d,u)=>d.isWithinBounds!==u.isWithinBounds?d.isWithinBounds?-1:1:d.diffCount-u.diffCount)[0].multiplier;return!c||isNaN(c)?NaN:c*l}function cIi(t,e){let n=Math.abs(e-t),i=Math.floor(Math.log10(n)),r=Math.pow(10,i),s=t>e?Math.ceil:Math.floor,o=e<t?Math.floor:Math.ceil;return h1t.map(a=>{let l=a*r,c=s(t/l)*l,d=o(e/l)*l;return{error:1-n/Math.abs(d-c),domain:[c,d]}}).sort((a,l)=>a.error-l.error)[0].domain}function cU(t,e,n){let i=Math.min(t,e),r=Math.max(t,e),s=Dwe(n),o=Math.pow(10,s),a=Math.ceil((r-i)/n),l=lU(s);for(let c=0;c<=a;c++){let d=i+n*c;l.push(Math.round(d*o)/o)}return l}function _1t(t){return typeof t=="string"&&vIi.includes(t)}function sS(t=dU){return _1t(t)?y1t[t]:typeof t=="function"?t:dU}function x1t(t){return Owe(t)||C1t(t)}function Nwe(t){let e=i=>!!i&&Object.hasOwn(i,"valueOf")&&H3(i.valueOf()),n=i=>i instanceof Date&&!isNaN(+i);return H3(t)||e(t)||n(t)}function uU(t,e){if(e&&Nwe(t))return t;if(!e)return x1t(t)?t:String(t)}function wmt({yDirection:t,padding:e=0,position:n="top",bbox:i}){let r=t?CIi:xIi,{xTranslationDirection:s,yTranslationDirection:o}=r[n],a=t?i.width:i.height,l=t?i.height:i.width,c=s*(e+a/2),d=o*(e+l/2);return{xTranslation:c,yTranslation:d}}function bIi({yDirection:t,bbox:e,padding:n=0,position:i="top"}){let r={};return i.startsWith("inside")||(i==="top"&&!t?r.top=n+e.height:i==="bottom"&&!t?r.bottom=n+e.height:i==="left"&&t?r.left=n+e.width:i==="right"&&t&&(r.right=n+e.width)),r}function zwe(t,e=new Date(t.getFullYear(),0,1)){let n=t.getTimezoneOffset()-e.getTimezoneOffset(),i=t.getTime()-e.getTime()+n*6e4,r=36e5*24;return Math.floor(i/r)}function Pmt(t,e){let i=new Date(t.getFullYear(),0,1).getDay(),r=(e-i+7)%7,s=new Date(t.getFullYear(),0,r+1);return s<=t?Math.floor(zwe(t,s)/7)+1:0}function E1t(t,e=t.getFullYear()){let i=new Date(e,0,1).getDay(),r=(Rmt-i+7)%7,s=new Date(e,0,r-(Rmt-D1t)+1);return s<=t?Math.floor(zwe(t,s)/7)+1:E1t(t,e-1)}function EIi(t){let e=t.getTimezoneOffset(),n=Math.abs(e);return`${e>0?"-":"+"}${G0(Math.floor(n/60),2,"0")}${G0(Math.floor(n%60),2,"0")}`}function G0(t,e,n){let i=String(Math.floor(t));return i.length>=e?i:`${n.repeat(e-i.length)}${i}`}function Z7e(t){let e=[];for(;t.length>0;){let n=t.indexOf("%");if(n!==0){let a=n>0?t.substring(0,n):t;e.push(a)}if(n<0)break;let i=t[n+1],r=kIi[i];r!=null&&n++;let s=t[n+1],o=MIi[s];if(typeof o=="function")e.push([o,r]);else if(typeof o=="string"){let a=Z7e(o);e.push([a,r])}else e.push(`${r??""}${s}`);t=t.substring(n+2)}return n=>{let i=typeof n=="number"?new Date(n):n;return e.map(r=>typeof r=="string"?r:r[0](i,r[1])).join("")}}function Z4(t){return t instanceof Date?t.getTime():t}function lp(t){if(t!=null)return t===""?"":(MW??(MW=document.createElement("div")),MW.textContent=String(t),MW.innerHTML)}function AIi(t,e){return t.length===e.length&&t.every((n,i)=>Number(n)===Number(e[i]))}function PIi(t,e,n,i,r){let s=t.x;t.x<e?s=e:t.x>e+i&&(s=e+i);let o=t.y;t.y<n?o=n:t.y>n+r&&(o=n+r);let a=t.x-s,l=t.y-o;return Math.sqrt(a*a+l*l)<=t.size*.5}function M1t(t,e,n,i,r){let s=t.x+t.width>e&&t.x<e+i,o=t.y+t.height>n&&t.y<n+r;return s&&o}function RIi(t,e,n,i,r){return e+i<t.x+t.width&&e>t.x&&n>t.y&&n+r<t.y+t.height}function FIi(t){return t!=null&&typeof t.point=="object"&&typeof t.label=="object"}function LIi(t,e,n=5){let i=[];t=t.map(r=>r.slice().sort((s,o)=>o.point.size-s.point.size));for(let r=0;r<t.length;r++){let s=i[r]=[],o=t[r];if(o?.length&&o[0].label)for(let a=0,l=o.length;a<l;a++){let c=o[a],d=c.label,u=c.point.size*.5,m=c.point.x-d.width*.5,f=c.point.y-u-d.height-n,{width:_,height:x}=d;!(!e||RIi(e,m,f,_,x))||t.some(I=>I.some(z=>PIi(z.point,m,f,_,x)))||i.some(I=>I.some(z=>M1t(z,m,f,_,x)))||s.push({index:a,text:d.text,x:m,y:f,width:_,height:x,datum:c})}}return i}function OIi(t,e){let n=[];for(let i=0;i<t.length;i++){let r=t[i],{point:{x:s,y:o},label:{text:a}}=r,{label:{width:l,height:c}}=r;if(l+=e??0,c+=e??0,n.some(u=>M1t(u,s,o,l,c)))return!0;n.push({index:i,text:a,x:s,y:o,width:l,height:c,datum:r})}return!1}function gb(t,e=[void 0]){return cb((n,i,r)=>e.includes(r)?t:r)}function X7e(t){let e=Math.min(...t.range),n=Math.max(...t.range),i=Math.floor(e),r=Math.ceil(n);return{min:i,max:r,visible:i!==r}}function HIi(t,e){return Math.abs(e-t)<zIi?e:t>e?e+Q7e:e-Q7e}function k1t(t){let e=(a,l)=>{let c=l!=null?Math.min(...l):t.min,d=l!=null?Math.max(...l):t.max;return a<c||a>d},n=(a,l,c)=>c!=="removed"&&e(a.translationY,a.datum.range)?"removed":c!=="added"&&e(l.translationY,l.range)?"added":c;return{tick:{fromFn(a,l,c){let d=a.y1+a.translationY,u=a.opacity;return(c==="added"||e(a.datum.translationY,a.datum.range))&&(d=l.translationY,u=0),Ai({y:0,translationY:d,opacity:u},I2[c])},toFn(a,l,c){let d=l.translationY,u=1;return c==="removed"&&(u=0),{y:0,translationY:d,opacity:u,finish:{y:d,translationY:0}}},intermediateFn(a,l,c){return{visible:!e(a.y)}}},line:{fromFn(a,l){var c;return Ai(Ai({},(c=a.previousDatum)!=null?c:l),I2.updated)},toFn(a,l){return Ai({},l)}},label:{fromFn(a,l,c){var d;let u=(d=a.previousDatum)!=null?d:l;c=n(a,l,c);let m=u.x,f=u.y,_=u.rotationCenterX,x=Math.round(a.translationY),D=u.rotation,E=a.opacity;return c==="removed"||e(u.y,u.range)||(c==="added"||e(a.datum.y,a.datum.range))&&(x=Math.round(u.translationY),E=0,D=l.rotation),Ai({x:m,y:f,rotationCenterX:_,translationY:x,rotation:D,opacity:E},I2[c])},toFn(a,l,c){var d,u;let m=l.x,f=l.y,_=l.rotationCenterX,x=Math.round(l.translationY),D=0,E=1;return c=n(a,l,c),c==="added"?(E=1,D=l.rotation):c==="removed"?(E=0,D=l.rotation):D=HIi((u=(d=a.previousDatum)==null?void 0:d.rotation)!=null?u:l.rotation,l.rotation),{x:m,y:f,rotationCenterX:_,translationY:x,rotation:D,opacity:E,finish:{rotation:l.rotation}}}},group:{fromFn(a,l){let{rotation:c,translationX:d,translationY:u}=a;return Ai({rotation:c,translationX:d,translationY:u},I2.updated)},toFn(a,l){let{rotation:c,translationX:d,translationY:u}=l;return{rotation:c,translationX:d,translationY:u}}}}}function I1t(){return(t,e)=>({rotation:e.rotation,rotationCenterX:e.rotationCenterX,rotationCenterY:e.rotationCenterY,translationX:e.translationX,translationY:e.translationY})}function A1t(t){let{visible:e,min:n,max:i}=t;return(r,s)=>{let o=s.translationY,a=e&&o>=n&&o<=i;return{y:o,translationY:0,opacity:1,visible:a}}}function P1t(){return(t,e)=>({x:e.x,y:e.y,translationY:e.translationY,rotation:e.rotation,rotationCenterX:e.rotationCenterX})}function R1t(){return(t,e)=>Ai({},e)}function GIi(t,e=!0){let n=new O1t,i=0;return e&&t.forEach(r=>i=Math.max(i,r.labels.length)),t.forEach(r=>{if(e)for(;r.labels.length<i;)r.labels.unshift("");WIi(n,r)}),n}function WIi(t,e){let n=e.labels.slice().reverse(),i=n.length-1;n.forEach((r,s)=>{let o=t.children,a=o.find(c=>c.label===r),l=s!==i;if(a&&l)t=a;else{let c=new O1t(r,t);c.number=o.length,o.push(c),l&&(t=c)}})}function UIi(t,e,n){let i=e.number-t.number,r=n/i;e.change-=r,e.shift+=n,t.change+=r,e.prelim+=n,e.mod+=n}function jIi(t,e,n){return e.getSiblings().indexOf(t.ancestor)>=0?t.ancestor:n}function $Ii(t){let e=t.children;if(e){let n=0,i=0;for(let r=e.length-1;r>=0;r--){let s=e[r];s.prelim+=n,s.mod+=n,i+=s.change,n+=s.shift+i}}}function KIi(t,e,n){let i=t.getLeftSibling();if(i){let r=t,s=t,o=i,a=s.getLeftmostSibling(),l=s.mod,c=r.mod,d=o.mod,u=a.mod;for(;o.nextRight()&&s.nextLeft();){o=o.nextRight(),s=s.nextLeft(),a=a.nextLeft(),r=r.nextRight(),r.ancestor=t;let m=o.prelim+d-(s.prelim+l)+n;m>0&&(UIi(jIi(o,t,e),t,m),l+=m,c+=m),d+=o.mod,l+=s.mod,u+=a.mod,c+=r.mod}o.nextRight()&&!r.nextRight()?(r.thread=o.nextRight(),r.mod+=d-c):(s.nextLeft()&&!a.nextLeft()&&(a.thread=s.nextLeft(),a.mod+=l-u),e=t)}return e}function N1t(t,e){let n=t.children;if(n.length){let i=n[0];n.forEach(o=>{N1t(o,e),i=KIi(o,i,e)}),$Ii(t);let r=(n[0].prelim+n[n.length-1].prelim)/2,s=t.getLeftSibling();s?(t.prelim=s.prelim+e,t.mod=t.prelim-r):t.prelim=r}else{let i=t.getLeftSibling();t.prelim=i?i.prelim+e:0}}function V1t(t,e,n){t.x=t.prelim+e,t.y=t.depth,n.update(t),t.children.forEach(i=>V1t(i,e+t.mod,n))}function B1t(t){let e=t.children,n=0;e.forEach(i=>{B1t(i),i.children.length?n+=i.leafCount:n++}),t.leafCount=n,e.length?(t.subtreeLeft=e[0].subtreeLeft,t.subtreeRight=e[t.children.length-1].subtreeRight,t.x=(t.subtreeLeft+t.subtreeRight)/2):(t.subtreeLeft=t.x,t.subtreeRight=t.x)}function YIi(t){let e=new qIi;return N1t(t,1),V1t(t,-t.prelim,e),B1t(t),e}function ZIi(t){return new Promise(e=>{setTimeout(()=>e(void 0),t)})}function JIi(t){return G1t((e,n)=>requestAnimationFrame(e),t)}function eAi(t){return G1t((e,n=0)=>setTimeout(e,n),t)}function G1t(t,e){let n=0,i=!1,r,s,o=()=>i,a=()=>{i=!1,s?.(),s=void 0,r=void 0,n>0&&t(l)},l=()=>{let c=n;n=0,i=!0;let d=e({count:c});if(!d){a();return}d.then(a).catch(a)};return{schedule(c){n===0&&!o()&&t(l,c),n++},await(){return mr(this,null,function*(){if(o())for(r==null&&(r=new Promise(c=>{s=c}));o();)yield r})}}}function FW(t,e=[1/0,-1/0]){for(let n of t)typeof n=="number"&&(n<e[0]&&(e[0]=n),n>e[1]&&(e[1]=n));return e}function tAi(t){return t.map(e=>e==null||typeof e=="number"||typeof e=="string"||typeof e=="boolean"?e:typeof e=="object"?JSON.stringify(e):e).join("-")}function iAi(t){return Number.isInteger(t)?t:Math.abs(t)>1e4?Math.trunc(t):Math.round(t*1e4)/1e4}function nAi(t){if(t===void 0)return[];let[e,n]=t;return e=+e,n=+n,e===0&&n===0?[0,1]:e===1/0&&n===-1/0?[]:(e===1/0&&(e=0),n===-1/0&&(n=0),H3(e)&&H3(n)?[e,n]:[])}function Gg(t,e){var n;let i=nAi(t);if(i.length===0)return i;let[r,s]=i;if(r===s){let[o,a]=(n=e?.calculatePadding(r,s,e.isReversed()))!=null?n:[1,1];r-=o,s+=a}return[r,s]}function rAi(t){var e,n;let i=(r,s)=>{s.length>0&&(Ns.log(`DataModel.processData() - ${r}`),Ns.table(s))};if(Ns.log("DataModel.processData() - processedData",t),i("Key Domains",t.domain.keys),i("Group Domains",(e=t.domain.groups)!=null?e:[]),i("Value Domains",t.domain.values),i("Aggregate Domains",(n=t.domain.aggValues)!=null?n:[]),t.type==="grouped"){let r=t.data.reduce((s,o)=>{var a,l;let c=(a=o.keys)!=null?a:[],d=(l=o.aggValues)!=null?l:[],u=o.keys.map(()=>{}),m=d?.map(()=>{});return s.push(...o.values.map((f,_)=>[..._===0?c:u,...f??[],..._==0?d:m])),s},[]);i("Values",r)}else{let r=t.data.reduce((s,o)=>{var a;let l=(a=o.aggValues)!=null?a:[];return s.push([...o.keys,...o.values,...l]),s},[]);i("Values",r)}}function aAi({orientation:t,bboxes:e,maxHeight:n,maxWidth:i,itemPaddingY:r=0,itemPaddingX:s=0,forceResult:o=!1}){let a=t==="horizontal",l={max:a?i:n,fn:a?m=>m.width:m=>m.height,padding:a?s:r},c={max:a?n:i,fn:a?m=>m.height:m=>m.width,padding:a?r:s},d=0,u=[];for(;d<e.length;){let m=e.slice(d),f=lAi(m,d,l,c,o);if(!f)return;d+=f.processedBBoxCount,u.push(f.pageIndices)}return dAi(u,t,e,r,s)}function lAi(t,e,n,i,r){let o=hAi(t,n);if(o<1){if(!r)return;o=1}for(let a=o;a>=1;a--){let l=cAi(t,e,a,n,i,r);if(l==null&&a<=1)return;if(l==null)continue;if(typeof l=="number"){if(l<=1)return;a=l<a&&l>1?l:a;continue}return{processedBBoxCount:l.length*l[0].length,pageIndices:l}}}function cAi(t,e,n,i,r,s){var o;let a=[],l=0,c=0,d=[],u=[];for(let m=0;m<t.length;m++){let f=(m+n)%n;f===0&&(l+=c,c=0,d.length>0&&a.push(d),d=[]);let _=i.fn(t[m])+i.padding;u[f]=Math.max((o=u[f])!=null?o:0,_),c=Math.max(c,r.fn(t[m])+r.padding);let x=l+c,D=!s||a.length>0;if(x>r.max&&D){d=[];break}if(u.reduce((M,I)=>M+I,0)>i.max&&!s)return u.length<n?u.length:void 0;d.push(m+e)}return d.length>0&&a.push(d),a.length>0?a:void 0}function dAi(t,e,n,i,r){let s=0,o=0;return{pages:t.map(l=>{e==="horizontal"&&(l=uAi(l));let c=0,d=l.map(f=>{let _=f.map(E=>(c=Math.max(E,c),n[E])),x=0,D=0;return _.forEach(E=>{x+=E.height+i,D=Math.max(D,E.width+r)}),{indices:f,bboxes:_,columnHeight:Math.ceil(x),columnWidth:Math.ceil(D)}}),u=0,m=0;return d.forEach(f=>{u+=f.columnWidth,m=Math.max(m,f.columnHeight)}),s=Math.max(u,s),o=Math.max(m,o),{columns:d,startIndex:l[0][0],endIndex:c,pageWidth:u,pageHeight:m}}),maxPageWidth:s,maxPageHeight:o}}function uAi(t){let e=[];for(let n of t[0])e.push([]);return t.forEach((n,i)=>{n.forEach((r,s)=>{e[s][i]=r})}),e}function hAi(t,e){let n=t.length,i=0;for(let r=0;r<n;r++)if(i+=e.fn(t[r])+e.padding,i>e.max)return n/r<2?Math.ceil(n/2):r;return n}function Q4(t,e){if(zmt(t)&&zmt(e)){let n={};return Object.keys(t).forEach(i=>{i in e?n[i]=Q4(t[i],e[i]):n[i]=t[i]}),Object.keys(e).forEach(i=>{i in t||(n[i]=e[i])}),n}return Array.isArray(t)&&!Array.isArray(e)||ewe(t)&&!ewe(e)?t:e}function ewe(t){return typeof t=="object"&&t!==null}function twe(t){return ewe(t)&&!Array.isArray(t)}function zmt(t){return twe(t)&&t.constructor===Object}function U3(...t){var e;let n={};for(let i of t){if(!i)continue;let r=Vne(i)?pF(i):Object.keys(i);for(let s of r)twe(n[s])&&twe(i[s])?n[s]=U3(n[s],i[s]):(e=n[s])!=null||(n[s]=i[s])}return n}function fAi(t,e,n){if(n===void 0)return e;for(let i of t){let r=n[i];r!==void 0&&(e[i]=r)}return e}function Xne(t,e=[0,0]){for(let n of t)typeof n=="number"&&(n<0&&(e[0]+=n),n>0&&(e[1]+=n));return e}function gAi(t,e,n){return{id:e,scopes:[t.id],matchGroupIds:[n],type:"aggregate",aggregateFunction:r=>Xne(r)}}function e0t(t,e,n){return{id:e,scopes:[t.id],type:"aggregate",matchGroupIds:n?[n]:void 0,aggregateFunction:i=>Xne(i),groupAggregateFunction:(i,r=[0,0])=>{var s,o;return r[0]+=(s=i?.[0])!=null?s:0,r[1]+=(o=i?.[1])!=null?o:0,r}}}function t0t(t,e,n){return{id:e,scopes:[t.id],matchGroupIds:[n],type:"aggregate",aggregateFunction:r=>FW(r)}}function vAi(t,e){return{id:e,scopes:[t.id],type:"aggregate",aggregateFunction:()=>[0,1]}}function iwe(t,e){return{id:e,scopes:[t.id],type:"aggregate",aggregateFunction:()=>[0,1],groupAggregateFunction:(n,i=[0,0])=>{var r,s;return i[0]+=(r=n?.[0])!=null?r:0,i[1]+=(s=n?.[1])!=null?s:0,i}}}function yAi(t,e,n){return{id:e,scopes:[t.id],matchGroupIds:[n],type:"aggregate",aggregateFunction:r=>Xne(r).map(s=>s/r.length)}}function i0t(t,e,n){return{id:e,scopes:[t.id],matchGroupIds:n?[n]:void 0,type:"aggregate",aggregateFunction:r=>Xne(r),groupAggregateFunction:(r,s=[0,0,-1])=>{var o,a;return s[0]+=(o=r?.[0])!=null?o:0,s[1]+=(a=r?.[1])!=null?a:0,s[2]++,s},finalFunction:(r=[0,0,0])=>{let s=r[0]+r[1];return s>=0?[0,s/r[2]]:[s/r[2],0]}}}function nwe(t,e,n,i){let r={id:e,scopes:[t.id],matchGroupIds:i?[i]:void 0,type:"aggregate",aggregateFunction:(s,o=[])=>{let a=o[1]-o[0];return n.aggregateFunction(s).map(l=>l/a)}};return n.groupAggregateFunction&&(r.groupAggregateFunction=n.groupAggregateFunction),r}function n0t(t){return()=>{let e=0;return n=>typeof n!="number"||isNaN(n)?n:(e+=t?Math.max(0,n):n,e)}}function r0t(){return()=>{let t=0;return e=>{if(typeof e!="number"||isNaN(e))return e;let n=t;return t+=e,n}}}function Ane(t,e){var n,i,r;let s=JSON.stringify(t,null,0);return kW.has(e)||kW.set(e,new Map),(n=kW.get(e))!=null&&n.has(s)||(i=kW.get(e))==null||i.set(s,e(t)),(r=kW.get(e))==null?void 0:r.get(s)}function CAi({normaliseTo:t,mode:e}){let n=(i,r)=>{let s=i*t/r;return s>=0?Math.min(t,s):Math.max(-t,s)};return()=>()=>(i,r)=>{let s=[0,0];for(let a of r){let l=i[a],c=l<0?0:1;e==="sum"?s[c]+=l:c===0?s[c]=Math.min(s[c],l):s[c]=Math.max(s[c],l)}let o=Math.max(Math.abs(s[0]),s[1]);for(let a of r)i[a]=n(i[a],o)}}function Pne(t,e,n,i="sum"){return{scopes:[t.id],type:"group-value-processor",matchGroupIds:e,adjust:Ane({normaliseTo:n,mode:i},CAi)}}function xAi({normaliseTo:t,zeroDomain:e,rangeMin:n,rangeMax:i}){let r=t[1]-t[0],s=(o,a,l)=>{let c=t[0]+(o-a)/l*r;return l===0?e:c>=t[1]?t[1]:c<t[0]?t[0]:c};return()=>(o,a)=>{let[l,c]=o.domain.values[a];n!=null&&(l=n),i!=null&&(c=i);let d=c-l;o.domain.values[a]=[t[0],t[1]];for(let u of o.data){let m=u.values;o.type==="ungrouped"&&(m=[m]);for(let f of m)f[a]=s(f[a],l,d)}}}function swe(t,e,n,i,r,s){return{scopes:[t.id],type:"property-value-processor",property:e,adjust:Ane({normaliseTo:n,rangeMin:r,rangeMax:s,zeroDomain:i},xAi)}}function LU(t,e=[]){return{type:"processor",scopes:[t.id],property:"animationValidation",calculate(n){var i;let{keys:r,values:s}=n.defs,{input:o,data:a}=n,l=!0,c=!0,d=[];for(let m=0;m<s.length;m++)(i=s[m].scopes)!=null&&i.some(f=>f===t.id)&&e.some(f=>s[m].id===f)&&d.push([m,s[m]]);let u=(m,f,_)=>{var x;if(f.valueType==="category"){let E=n.domain[_][m];l&&(l=E.length===o.count);return}let D=(x=a[0])==null?void 0:x[_][m];for(let E=1;(l||c)&&E<a.length;E++){let M=a[E][_][m];c&&(c=D<=M),l&&(l=D!==M),D=M}};for(let m=0;(l||c)&&m<r.length;m++)u(m,r[m],"keys");for(let m=0;(l||c)&&m<d.length;m++){let[f,_]=d[m];u(f,_,"values")}return{uniqueKeys:l,orderedKeys:c}}}}function bAi({mode:t,separateNegative:e}){return()=>()=>(n,i)=>{let r=[0,0];for(let s of i){let o=n[s],a=SU(o)&&e?0:1;typeof o!="number"||isNaN(o)||(t==="normal"&&(r[a]+=o),n[s]=r[a],t==="trailing"&&(r[a]+=o))}}}function wAi({mode:t,sum:e}){return()=>{let n=[],i=!0;return()=>(r,s)=>{let o=0;for(let a of s){let l=r[a],c=i&&e==="current"?0:n[a];n[a]=l;let d=e==="current"?l:c;if(typeof l!="number"||isNaN(l)){r[a]=o;continue}if(typeof c!="number"||isNaN(c)){r[a]=o;continue}t==="normal"&&(o+=d),r[a]=o,t==="trailing"&&(o+=d)}i=!1}}}function o0t(t,e,n,i,r=!1){let s;if(n.startsWith("window")){let o=n.endsWith("-trailing")?"trailing":"normal";s=Ane({mode:o,sum:i},wAi)}else s=Ane({mode:n,separateNegative:r},bAi);return{scopes:[t.id],type:"group-value-processor",matchGroupIds:[e],adjust:s}}function FF(t,e=!0){return{type:"processor",property:"diff",calculate:n=>{let i={changed:!1,moved:[],added:[],updated:[],removed:[],addedIndices:[],updatedIndices:[],removedIndices:[]},r=new Map,s=new Map,o=new Map,a=new Map,l=new Map,c=new Map,d=new Map;for(let u=0;u<Math.max(t.data.length,n.data.length);u++){let m=t.data[u],f=n.data[u],_=m?SF(m.keys):"",x=f?SF(f.keys):"";if(_===x){qW(m.values,f.values)||(o.set(x,f),c.set(x,u));continue}a.has(x)?((e||!qW(a.get(x).values,f.values))&&(o.set(x,f),c.set(x,u),r.set(x,f)),a.delete(x),d.delete(x)):f&&(s.set(x,f),l.set(x,u)),s.has(_)?((e||!qW(s.get(_).values,m.values))&&(o.set(_,m),c.set(_,u),r.set(_,m)),s.delete(_),l.delete(_)):m&&(o.delete(_),c.delete(_),a.set(_,m),d.set(_,u))}return i.added=Array.from(s.keys()),i.updated=Array.from(o.keys()),i.removed=Array.from(a.keys()),i.moved=Array.from(r.keys()),i.addedIndices=Array.from(l.values()),i.updatedIndices=Array.from(c.values()),i.removedIndices=Array.from(d.values()),i.changed=i.added.length>0||i.updated.length>0||i.removed.length>0,i}}}function SF(t){return t.join("___")}function $we(t){return uU(t,!0)!=null}function l0t(t){return uU(t,!1)!=null}function G3(t,e,n,i={}){return Ai({scopes:[t.id],property:e,type:"key",valueType:n?"range":"category",validation:n?$we:l0t},i)}function cp(t,e,n,i={}){return Ai({scopes:[t.id],property:e,type:"value",valueType:n?"range":"category",validation:n?$we:l0t},i)}function c0t(t,e,n={}){let i=n,{min:r=-1/0,max:s=1/0}=i,o=W3(i,["min","max"]);return Ai({scopes:[t.id],type:"value",property:e,valueType:"range",validation:$we,processor:()=>a=>typeof a!="number"||isNaN(a)?a:Math.min(Math.max(a,r),s)},o)}function SAi(t,e,n,i={}){return cs(Ai({},cp(t,e,n,i)),{processor:d0t()})}function d0t(){return()=>{let t=0;return e=>{let n=t;return t=e,n}}}function u0t(t,e,n,i={}){let r=i,{onlyPositive:s}=r,o=W3(r,["onlyPositive"]);return cs(Ai({},cp(t,e,n,o)),{processor:n0t(s)})}function TAi(t,e,n,i={}){return cs(Ai({},cp(t,e,n,i)),{processor:r0t()})}function Zw(t,e,n,i,r="current",s){return[cp(t,e,n,s),o0t(t,s.groupId,i,r,s.separateNegative),...s.rangeId!=null?[t0t(t,s.rangeId,s.groupId)]:[]]}function kAi(t){let e;if(t.window!=null)e=t.window;else if(typeof window<"u")e=window;else if(typeof global<"u")e=global.window;else throw new Error("AG Charts - unable to resolve global window");let n;if(t.document!=null)n=t.document;else if(typeof document<"u")n=document;else if(typeof global<"u")n=global.document;else throw new Error("AG Charts - unable to resolve global document");return{document:n,window:e,overrideDevicePixelRatio:t.overrideDevicePixelRatio,sceneMode:t.sceneMode}}function FAi(t,e,n){let i=Math.floor(Math.min(t[0],t[1])),r=Math.max(t[0],t[1]);i=LAi(i,r,e);let s=NAi(i,r,e),o=e-1;r=i+o*s;let a=n?[r,i]:[i,r],l=OAi(i,s,e);return[a,l]}function LAi(t,e,n){let i=Math.abs(e-t)/(n-1),r=Math.floor(Math.log10(i)),s=Math.pow(10,r);return Math.floor(t/s)*s}function OAi(t,e,n){let i=Math.floor(Math.log10(e)),r=e>0&&e<1?Math.abs(i):0,s=Math.pow(10,r),o=lU(r);for(let a=0;a<n;a++){let l=t+e*a;o[a]=Math.round(l*s)/s}return o}function NAi(t,e,n){let i=n-1,r=(e-t)/i;return VAi(r)}function VAi(t){let e=Math.floor(Math.log10(t)),n=Math.pow(10,e),i=t/n*10;return i>0&&i<=1?n/10:i>1&&i<=2?2*n/10:i>1&&i<=5?5*n/10:i>5&&i<=10?10*n/10:i>10&&i<=20?20*n/10:i>20&&i<=40?40*n/10:i>40&&i<=50?50*n/10:i>50&&i<=100?100*n/10:i}function zAi(t,e){Rne[t]=e}function HAi(t,e){let n=Rne[t];if(n)return new n(e);throw new Error(`AG Charts - unknown axis type: ${t}`)}function Gmt(t,e){x0t[t]=e}function GAi(t){var e;return(e=x0t[t])!=null?e:{}}function b0t(t){return LF.some(e=>e.type==="series"&&e.identifier===t)}function qwe(t){var e;return(e=LF.find(n=>n.type==="series"&&n.identifier===t))==null?void 0:e.chartTypes}function WAi(t){var e,n;return((n=(e=LF.find(i=>i.type==="series"&&i.identifier===t))==null?void 0:e.useCount)!=null?n:0)>0}function UAi(t){var e;return((e=qwe(t))==null?void 0:e.find(i=>i==="cartesian"))==="cartesian"}function jAi(t){var e;return((e=qwe(t))==null?void 0:e.find(i=>i==="polar"))==="polar"}function $Ai(t){var e;return((e=qwe(t))==null?void 0:e.find(i=>i==="hierarchy"))==="hierarchy"}function KAi(t){var e;if(t.packageType!=="enterprise")throw new Error("AG Charts - internal configuration error, only enterprise modules need verification.");let n=LF.find(i=>i.type===t.type&&i.optionsKey===t.optionsKey&&i.identifier===t.identifier&&t.chartTypes.every(r=>i.chartTypes.includes(r)));return n&&((e=n.useCount)!=null||(n.useCount=0),n.useCount++),n!=null}function YAi(){return LF.filter(({useCount:t})=>t==null||t===0)}function ZAi(t,e,n,i){qAi[t]=n,w0t[t]=e,S0t[e]=i}function XAi(){return S0t}function QAi(){return w0t}function tre(t,e){t!==e&&(this.dirtyPath=!0)}function fPi(t,e){mM[t]=e}function gPi(t,e){var n;lwe[t]=zm([(n=lwe[t])!=null?n:{},e])}function Umt(t){var e;return(e=lwe[t])!=null?e:{}}function vPi(t){var e;return(e=mM[t])!=null?e:"unknown"}function EM(t){var e,n,i;return(i=(n=(e=t.series)==null?void 0:e[0])==null?void 0:n.type)!=null?i:"line"}function OF(t){let e=EM(t);return e==null?!0:e==="cartesian"?(Ns.warnOnce(`type '${e}' is deprecated, use a series type instead`),!0):W6.isCartesian(e)||UAi(e)}function ire(t){let e=EM(t);return e==null?!1:e==="hierarchy"?(Ns.warnOnce(`type '${e}' is deprecated, use a series type instead`),!0):W6.isHierarchy(e)||$Ai(e)}function nre(t){let e=EM(t);return e==null?!1:e==="polar"?(Ns.warnOnce(`type '${e}' is deprecated, use a series type instead`),!0):W6.isPolar(e)||jAi(e)}function yPi(t){return t==null?!1:W6.has(t)}function _Pi(t){return t==null?!1:Ywe.has(t)}function CPi(t){var e;if(!OF(t))return t;let[n,i]=(e=t.axes)!=null?e:[];return cs(Ai({},t),{axes:[cs(Ai({},n),{position:i.position}),cs(Ai({},i),{position:n.position})]})}function xPi(t){var e,n,i,r;let s={};for(let[o,a]of _we.entries())if(!(t[o]==null||!a.length)){(e=s[o])!=null||(s[o]={});for(let l of a)(n=t[o])!=null&&n.enabled&&((i=t[l])!=null&&i.enabled)?(Ns.warnOnce(`the [${o}] module can not be used at the same time as [${l}], it will be disabled.`),s[o].enabled=!1):s[o].enabled=(r=t[o])==null?void 0:r.enabled}return s}function V0t(t,e,n,i,r){let{defaultDuration:s}=n,{addPhaseFn:o,updatePhaseFn:a,removePhaseFn:l}=r,c=(d,u,m)=>{n.animate({id:`${t}_${e}_${u.id}_${d}`,groupId:t,from:0,to:1,ease:oU,onUpdate(f,_){_&&d!=="removed"||(u.path.clear({trackChanges:!0}),m(f,u),u.checkPathDirty())},onStop(){d==="added"&&(u.path.clear({trackChanges:!0}),m(1,u),u.checkPathDirty())},duration:I2[d].animationDuration*s,delay:I2[d].animationDelay*s})};for(let d of i)n.isSkipped()||(c("removed",d,l),c("updated",d,a)),c("added",d,o)}function cm({id:t},e,n,i){fb(t,e,n,i,{opacity:0},{opacity:1},kU)}function lne({id:t},e,n,i){fb(t,e,n,i,{opacity:1},{opacity:0},kU)}function dS(t){return{opacity:1}}function wPi({id:t},e,n,i="unknown"){let r=Ai({},I2[i]);fb(t,"markers",e,n,{opacity:0},{opacity:1},r),n.forEach(s=>s.cleanup())}function iSe({id:t},e,n){fb(t,"markers",e,n,{scalingX:0,scalingY:0},{scalingX:1,scalingY:1}),n.forEach(i=>i.cleanup())}function nSe({id:t,nodeDataDependencies:e},n,i){let r=e.seriesRectWidth;Vm(t,"markers",n,i,{fromFn:(a,l)=>{var c,d;let u=(d=(c=l.midPoint)==null?void 0:c.x)!=null?d:r,m=ev(0,Yft(u/r),1),f=Nm.check("animationImmediateMarkerSwipeScaleIn")?0:Lwe;return{scalingX:0,scalingY:0,animationDelay:m,animationDuration:f}},toFn:()=>({scalingX:1,scalingY:1})})}function BU(t){return{opacity:1,scalingX:1,scalingY:1}}function vU(t,e){var n,i,r,s;return{translationX:(i=(n=e.point)==null?void 0:n.x)!=null?i:NaN,translationY:(s=(r=e.point)==null?void 0:r.y)!=null?s:NaN}}function rSe(t,e){let n=(o,a)=>{let l=t[a][o];return Array.isArray(l)?l[0]:l},i=o=>{let{xValue:a}=o;return t.moved[a]?{point:n(a,"moved"),status:"updated"}:t.removed[a]?{point:n(a,"removed"),status:"removed"}:t.added[a]?{point:n(a,"added"),status:"added"}:{status:"unknown"}};return{fromFn:(o,a)=>{var l,c,d,u,m,f;let{status:_,point:x}=i(a);if(_==="unknown")return{opacity:0};let D=Ai({translationX:(c=(l=x?.from)==null?void 0:l.x)!=null?c:o.translationX,translationY:(u=(d=x?.from)==null?void 0:d.y)!=null?u:o.translationY,opacity:o.opacity},I2[_]);return e==="added"?Ai(cs(Ai({},D),{opacity:0,translationX:(m=x?.to)==null?void 0:m.x,translationY:(f=x?.to)==null?void 0:f.y}),I2.added):(_==="added"&&(D.opacity=0),D)},toFn:(o,a)=>{var l,c;let{status:d,point:u}=i(a);if(d==="unknown")return{opacity:0};let m=Ai({translationX:a.point.x,translationY:a.point.y,opacity:1},I2[d]);return d==="removed"||e==="removed"?Ai(cs(Ai({},m),{translationX:(l=u?.to)==null?void 0:l.x,translationY:(c=u?.to)==null?void 0:c.y,opacity:0}),I2.removed):m}}}function cwe(t){return t.reduce(({min:e,max:n},i)=>((e==null||e.point.x>i.point.x)&&(e=i),(n==null||n.point.x<i.point.x)&&(n=i),{min:e,max:n}),{})}function jmt(t,e,n){let i=(e.y-t.y)/(e.x-t.x),r=(n-t.x)*i+t.y;return{x:n,y:r}}function $mt(t,e,n,i){let r=-1,s=0,o=[];for(;s<t.length;){if(t[s].change===e){o.push(t[s]),s++;continue}if(t[s].change===n){s++;continue}o.length>0&&(i(o,r,s),o.length=0),r=s,s++}o.length>0&&i(o,r,s)}function sSe(t,e){$mt(t,"out","in",(n,i,r)=>{var s,o;i===-1&&t[r]?n.forEach(a=>a.to=t[r].from):r===t.length&&t[i]?n.forEach(a=>a.to=t[i].from):e==="intersect"&&((s=t[i])!=null&&s.from)&&((o=t[r])!=null&&o.from)?n.forEach(a=>a.to=jmt(t[i].from,t[r].from,a.from.x)):n.forEach(a=>a.to=a.from)}),$mt(t,"in","out",(n,i,r)=>{var s,o;i===-1&&t[r]?n.forEach(a=>a.from=t[r].to):r===t.length&&t[i]?n.forEach(a=>a.from=t[i].to):e==="intersect"&&((s=t[i])!=null&&s.to)&&((o=t[r])!=null&&o.to)?n.forEach(a=>a.from=jmt(t[i].to,t[r].to,a.to.x)):n.forEach(a=>a.from=a.to)})}function Kmt(t,e,n){let i=isNaN(t.x)?e.x:t.x,r=isNaN(t.y)?e.y:t.y,s=e.x-t.x,o=e.y-t.y,a=isNaN(s)?0:s*n,l=isNaN(o)?0:o*n;return{x:i+a,y:r+l}}function oSe(t,e,n){let{path:i}=n,r;for(let s of t){let o=e[s.change];if(o==null)continue;let{from:a,to:l}=s;if(a==null||l==null)continue;let{x:c,y:d}=Kmt(a,l,o);if(s.moveTo===!1)i.lineTo(c,d);else if(s.moveTo===!0||!r)i.moveTo(c,d);else if(r){let u=s.moveTo==="in"?o:1-o,{x:m,y:f}=Kmt(r,{x:c,y:d},u);i.lineTo(m,f),i.moveTo(c,d)}r={x:c,y:d}}}function aSe({id:t,visible:e},n,i){fb(t,"path_properties",n,i,{clipScalingX:0},{clipScalingX:1},{start:{clipMode:"normal",visible:e},finish:{clipMode:void 0,visible:e}})}function z0t({id:t},e,n,i){fb(t,e,n,i,{opacity:0},{opacity:1},kU)}function SPi({id:t},e,n,i){fb(t,e,n,i,{opacity:1},{opacity:0},kU)}function lSe(t){return e=>({opacity:t.getOpacity(),clipScalingX:1,clipMode:void 0})}function Lne({nodeDataDependencies:t},e){var n,i;let{seriesRectHeight:r,seriesRectWidth:s}=t;e.clipPath==null&&(e.clipPath=new aU,e.clipScalingX=1,e.clipScalingY=1),(n=e.clipPath)==null||n.clear({trackChanges:!0}),(i=e.clipPath)==null||i.rect(-25,-25,Dne(s)+50,Dne(r)+50)}function Ymt(t){return t.type==="continuous"||t.type==="log"}function qmt(t){return t.type==="category"}function Zmt(t,e){return t.domain.length===e.domain.length&&t.range.length===e.range.length&&t.domain.every((n,i)=>n===e.domain[i])&&t.range.every((n,i)=>n===e.range[i])}function Xmt(t,e){return t===void 0||e===void 0?t!==void 0||e!==void 0:Ymt(t)&&Ymt(e)?t.type===e.type&&Zmt(t,e):qmt(t)&&qmt(e)?Zmt(t,e):!1}function sne(t,e){if(!e)return NaN;if(t instanceof Date&&(t=t.getTime()),e.type==="continuous"&&typeof t=="number")return(t-e.domain[0])/(e.domain[1]-e.domain[0])*(e.range[1]-e.range[0])+e.range[0];if(e.type==="log"&&typeof t=="number")return e.convert(t);let n=e.domain.findIndex(i=>i===t);return n>=0?e.range[n]:NaN}function TPi(t,e){return!Xmt(t.scales.x,e.scales.x)||!Xmt(t.scales.y,e.scales.y)}function DPi(t,e){let n=Number(t),i=Number(e);return!isNaN(n)&&!isNaN(i)?Math.abs(i-n)<.25:t===e}function H0t(t=!1,e=!1){return t===e?!!t:t?"in":"out"}function yU(t,e,n={}){var i,r,s,o;let{backfillSplitMode:a="intersect"}=n,l=I=>{var z,G;return{x:sne((z=I.xValue)!=null?z:NaN,t.scales.x),y:sne((G=I.yValue)!=null?G:NaN,t.scales.y)}},c=I=>{var z,G;return{x:sne((z=I.xValue)!=null?z:NaN,e.scales.x),y:sne((G=I.yValue)!=null?G:NaN,e.scales.y)}},d=[],u={added:{},moved:{},removed:{}},m=(I,z,G,A="move")=>{I&&(isNaN(I.point.x)||isNaN(I.point.y))&&(I=z);let Y={from:I?.point,to:z?.point,moveTo:H0t(I?.point.moveTo,z?.point.moveTo),change:A};A==="move"?(u.moved[G]=Y,E++,M++):A==="in"?(u.added[G]=Y,M++):A==="out"&&(u.removed[G]=Y,E++),d.push(Y)},{min:f,max:_}=cwe(e.nodeData),{min:x,max:D}=cwe(t.nodeData),E=0,M=0;for(;E<e.nodeData.length||M<t.nodeData.length;){let I=e.nodeData[E],z=t.nodeData[M],G=I?l(I):void 0,A=z?c(z):void 0,Y=void 0;if(G&&DPi(G.x,z?.point.x))m(I,z,z.xValue,"move");else if(G&&G.x<((i=x?.point.x)!=null?i:-1/0))m(I,Y,I.xValue,"out");else if(G&&G.x>((r=D?.point.x)!=null?r:1/0))m(I,Y,I.xValue,"out");else if(A&&A.x<((s=f?.point.x)!=null?s:-1/0))m(Y,z,z.xValue,"in");else if(A&&A.x>((o=_?.point.x)!=null?o:1/0))m(Y,z,z.xValue,"in");else if(G&&G.x<z?.point.x)m(I,Y,I.xValue,"out");else if(A&&A.x<I?.point.x)m(Y,z,z.xValue,"in");else if(I)m(I,Y,I.xValue,"out");else if(z)m(Y,z,z.xValue,"in");else throw new Error("Unable to process points")}return sSe(d,a),{result:d,resultMap:u}}function _U(t,e,n,i={}){var r,s,o;let{backfillSplitMode:a="intersect",multiDatum:l=!1}=i,c=[],d={added:{},moved:{},removed:{}},u={added:{},moved:{},removed:{}},m,f,_=(I,z)=>{var G,A;let Y=z.change==="move"?"moved":z.change==="in"?"added":"removed";l?((A=(G=u[Y])[I])!=null||(G[I]=[]),u[Y][I].push(z)):d[Y][I]=z,m=z,f=I},x=0,D=0,E=!1;for(;x<e.nodeData.length||D<t.nodeData.length;){let I=e.nodeData[x],z=t.nodeData[D],G;if(I?.xValue===z?.xValue)G={change:"move",moveTo:H0t((r=I.point.moveTo)!=null?r:!1,z.point.moveTo),from:I.point,to:z.point},_(I.xValue,G),x++,D++;else if(n!==void 0&&n.removed.indexOf(I?.xValue)>=0)G={change:"out",moveTo:(s=I.point.moveTo)!=null?s:!1,from:I.point},_(I.xValue,G),x++;else if(n!==void 0&&n.added.indexOf(z?.xValue)>=0)G={change:"in",moveTo:(o=z.point.moveTo)!=null?o:!1,to:z.point},_(z.xValue,G),D++;else if(l&&m&&f===I?.xValue)G=Ai({},m),_(I.xValue,G),x++;else if(l&&m&&f===z?.xValue)G=Ai({},m),_(z.xValue,G),D++;else{E=!0;break}c.push(G)}let M=-1/0;return E||(E=c.some(I=>{let{change:z,to:{x:G=-1/0}={}}=I;if(z==="out")return;let A=G<M;return M=G,A})),E?{result:void 0,resultMap:void 0}:(sSe(c,a),l?{result:c,resultMap:u}:{result:c,resultMap:d})}function G0t(t,e){let n="updated",i=r=>r.visible;return!i(e)&&i(t)?n="added":i(e)&&!i(t)&&(n="removed"),n}function EPi(t,e){let n=e==="none"?"updated":t,i={fromFn:r=>{let s;return t==="removed"?s={finish:{visible:!1}}:t==="added"?s={start:{visible:!0}}:s={},Ai(Ai({},I2[n]),s)},toFn:r=>Ai({},I2[n])};return e==="fade"?{fromFn:r=>{let s=t==="added"?0:r.opacity;return Ai({opacity:s},i.fromFn(r))},toFn:r=>Ai({opacity:t==="removed"?0:1},i.toFn(r))}:i}function cSe(t,e,n,i,r){let s=G0t(t,e),o=(d,u)=>{r(n,{move:0,out:d},u)},a=(d,u)=>{r(n,{move:d},u)},l=(d,u)=>{r(n,{move:1,in:d},u)},c=EPi(s,i);return{status:s,path:{addPhaseFn:l,updatePhaseFn:a,removePhaseFn:o},pathProperties:c}}function W0t(t,e,n){var i,r;let s=((i=t.scales.x)==null?void 0:i.type)==="category",{result:o,resultMap:a}=s?_U(t,e,n):yU(t,e),l="updated";if(e.visible&&!t.visible?l="removed":!e.visible&&t.visible&&(l="added"),o===void 0||a===void 0)return;let c=((r=n?.changed)!=null?r:!0)||TPi(t,e),d=cSe(t,e,o,"fade",oSe),u=rSe(a,l);return cs(Ai({},d),{marker:u,hasMotion:c})}function One(t){let{points:e}=t.fillData;return{top:e.slice(0,e.length/2),bottom:e.slice(e.length/2).reverse()}}function Xw(t,e,n){return{scales:e.scales,nodeData:n[t],visible:e.visible}}function MPi(t,e,n){let i=One(e),r=One(t),s={multiDatum:!0};return{top:_U(Xw("top",t,r),Xw("top",e,i),n,s),bottom:_U(Xw("bottom",t,r),Xw("bottom",e,i),n,s)}}function kPi(t,e){let n=One(e),i=One(t);return{top:yU(Xw("top",t,i),Xw("top",e,n)),bottom:yU(Xw("bottom",t,i),Xw("bottom",e,n))}}function j0t(t,e,n){var i;let r=((i=t.scales.x)==null?void 0:i.type)==="category",s="updated";e.visible&&!t.visible?s="removed":!e.visible&&t.visible&&(s="added");let o=()=>r?_U(t,e,n,{backfillSplitMode:"static",multiDatum:!0}):yU(t,e,{backfillSplitMode:"static"}),a=()=>r?MPi(t,e,n):kPi(t,e),{resultMap:l}=o(),{top:c,bottom:d}=a();if(l===void 0||c.result===void 0||d.result===void 0)return;let u=[...c.result,...d.result.reverse()],m=cSe(t,e,u,"none",oSe),f=rSe(l,s);return{fill:m,marker:f}}function q0t({rect:t,config:e}){let{crisp:n=!0,fill:i,stroke:r,strokeWidth:s,fillOpacity:o,strokeOpacity:a,lineDash:l,lineDashOffset:c,fillShadow:d,cornerRadius:u=0,topLeftCornerRadius:m,topRightCornerRadius:f,bottomRightCornerRadius:_,bottomLeftCornerRadius:x,cornerRadiusBbox:D,visible:E=!0}=e;t.crisp=n,t.fill=i,t.stroke=r,t.strokeWidth=s,t.fillOpacity=o,t.strokeOpacity=a,t.lineDash=l,t.lineDashOffset=c,t.fillShadow=d,t.topLeftCornerRadius=m?u:0,t.topRightCornerRadius=f?u:0,t.bottomRightCornerRadius=_?u:0,t.bottomLeftCornerRadius=x?u:0,t.cornerRadiusBbox=D,t.visible=E}function Z0t(t){var e=t,{datum:n,isHighlighted:i,style:r,highlightStyle:s,formatter:o,seriesId:a,ctx:{callbackCache:l}}=e,c=W3(e,["datum","isHighlighted","style","highlightStyle","formatter","seriesId","ctx"]),d,u,m,f,_,x;let{fill:D,fillOpacity:E,stroke:M,strokeWidth:I}=U3(i&&s,r),{strokeOpacity:z,fillShadow:G,lineDash:A,lineDashOffset:Y,cornerRadius:X=0,topLeftCornerRadius:ne=!0,topRightCornerRadius:pe=!0,bottomRightCornerRadius:ce=!0,bottomLeftCornerRadius:ie=!0,cornerRadiusBbox:le}=r,Se;return o&&(Se=l.call(o,Ai({datum:n.datum,xKey:n.xKey,fill:D,stroke:M,strokeWidth:I,cornerRadius:X,highlighted:i,seriesId:a},c))),{fill:(d=Se?.fill)!=null?d:D,stroke:(u=Se?.stroke)!=null?u:M,strokeWidth:(m=Se?.strokeWidth)!=null?m:I,fillOpacity:(f=Se?.fillOpacity)!=null?f:E,strokeOpacity:(_=Se?.strokeOpacity)!=null?_:z,lineDash:A,lineDashOffset:Y,fillShadow:G,cornerRadius:(x=Se?.cornerRadius)!=null?x:X,topLeftCornerRadius:ne,topRightCornerRadius:pe,bottomRightCornerRadius:ce,bottomLeftCornerRadius:ie,cornerRadiusBbox:le}}function X0t(t=[]){let[e,n]=t;return!(e!==0||n!==1)}function CU(t,e){let{startingX:n,startingY:i}=FPi(t,e),r=o=>{var a;return SU((a=o.yValue)!=null?a:0)};return{isVertical:t,calculate:(o,a)=>{let l=t?o.x:n,c=t?i:o.y,d=t?o.width:0,u=t?0:o.height;return a&&(isNaN(l)||isNaN(c))&&({x:l,y:c}=a,d=t?a.width:0,u=t?0:a.height,t&&!r(a)?c+=a.height:!t&&r(a)&&(l+=a.width)),{x:l,y:c,width:d,height:u}}}}function RPi(t){return{isVertical:t,calculate:e=>({x:t?e.x:e.x+e.width/2,y:t?e.y+e.height/2:e.y,width:t?e.width:0,height:t?0:e.height})}}function xU(t){let e=r=>r==null||isNaN(r.x)||isNaN(r.y);return{toFn:(r,s,o)=>o==="removed"||e(s)?t.calculate(s,r.previousDatum):{x:s.x,y:s.y,width:s.width,height:s.height},fromFn:(r,s,o)=>{o==="updated"&&e(s)?o="removed":o==="updated"&&e(r.previousDatum)&&(o="added");let a={x:r.x,y:r.y,width:r.width,height:r.height};return(o==="unknown"||o==="added")&&(a=t.calculate(s,r.previousDatum)),Ai(Ai({},a),I2[o])}}}function FPi(t,e){let n=e[t?"y":"x"],i=1/0,r=0;return n?(t?r=n.scale.convert(lu.is(n.scale)?0:Math.max(...n.range)):i=n.scale.convert(lu.is(n.scale)?0:Math.min(...n.range)),{startingX:i,startingY:r}):{startingX:i,startingY:r}}function uSe(t,{x:e,y:n,width:i,height:r}){return{x:e,y:n,width:i,height:r}}function Q0t(t,e,n){if(e.enabled&&n){let{x:i,y:r,text:s,textAlign:o,textBaseline:a}=n,{color:l,fontStyle:c,fontWeight:d,fontSize:u,fontFamily:m}=e;t.setProperties({visible:!0,x:i,y:r,text:s,fill:l,fontStyle:c,fontWeight:d,fontSize:u,fontFamily:m,textAlign:o,textBaseline:a})}else t.visible=!1}function J0t({isPositive:t,isVertical:e,placement:n,padding:i=0,rect:r}){let s=r.x+r.width/2,o=r.y+r.height/2,a="center",l="middle";switch(n){case"start":{e?(o=t?r.y+r.height+i:r.y-i,l=t?"top":"bottom"):(s=t?r.x-i:r.x+r.width+i,a=t?"start":"end");break}case"outside":case"end":{e?(o=t?r.y-i:r.y+r.height+i,l=t?"bottom":"top"):(s=t?r.x+r.width+i:r.x-i,a=t?"start":"end");break}}return{x:s,y:o,textAlign:a,textBaseline:l}}function R7e(t,e,n,i){let r=[n.convert(0),n.convert(1)],s=[i.convert(0),i.convert(1)],o=Math.PI/-2+tv(e),a=({radius:m})=>({innerRadius:r[0],outerRadius:r[0]+(r[1]-r[0])*m}),l=({radius:m})=>({innerRadius:s[0],outerRadius:s[0]+(s[1]-s[0])*m});return{nodes:{toFn:(m,f,_,{prevLive:x})=>{var D,E;let{startAngle:M,endAngle:I,innerRadius:z,outerRadius:G}=f,{stroke:A,fill:Y}=f.sectorFormat;if(_==="removed"&&x?(M=(D=x.datum)==null?void 0:D.endAngle,I=(E=x.datum)==null?void 0:E.endAngle):_==="removed"&&!x&&(M=o,I=o),_==="removed"){let X=a(f);z=X.innerRadius,G=X.outerRadius}return{startAngle:M,endAngle:I,outerRadius:G,innerRadius:z,stroke:A,fill:Y}},fromFn:(m,f,_,{prevFromProps:x})=>{var D,E,M,I,z,G;let{startAngle:A,endAngle:Y,innerRadius:X,outerRadius:ne}=m,{fill:pe,stroke:ce}=f.sectorFormat;if(_==="unknown"||_==="added"&&!x?(A=o,Y=o,X=f.innerRadius,ne=f.outerRadius):_==="added"&&x&&(A=(D=x.endAngle)!=null?D:o,Y=(E=x.endAngle)!=null?E:o,X=(M=x.innerRadius)!=null?M:f.innerRadius,ne=(I=x.outerRadius)!=null?I:f.outerRadius),_==="added"&&!t){let ie=l(f);X=ie.innerRadius,ne=ie.outerRadius}return _==="updated"&&(pe=(z=m.fill)!=null?z:pe,ce=(G=m.stroke)!=null?G:ce),{startAngle:A,endAngle:Y,innerRadius:X,outerRadius:ne,fill:pe,stroke:ce}}},innerCircle:{fromFn:(m,f)=>{var _,x,D;return{size:(D=(x=(_=m.previousDatum)==null?void 0:_.radius)!=null?x:m.size)!=null?D:0}},toFn:(m,f)=>{var _;return{size:(_=f.radius)!=null?_:0}}}}}function XPi(t,e){return{startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,fill:e.sectorFormat.fill,stroke:e.sectorFormat.stroke}}function eRi(){gC(T0t),gC(iPi),gC(PPi),gC(NPi),gC(HPi),gC(KPi),gC(ZPi),gC(JPi),gC(UPi)}function iRi(...t){for(let e of t)if(e instanceof Wg){let{x:n,y:i,width:r,height:s}=e;e.setProperties({x:i,y:n,width:s,height:r})}else if(e instanceof l0){let{x1:n,y1:i,x2:r,y2:s}=e;e.setProperties({x1:i,y1:n,x2:s,y2:r})}}function oRi(t,e,n,i,r,s,o,a,l,c,d,u,m){l2t[t]=n,c2t[t]=i,v2t(t,r,s),o&&cRi(t,o),a&&pRi(t),l&&mRi(t),c&&hRi(t),d&&fRi(t),u&&gRi(t,u),m&&vRi(t,m),fPi(t,e)}function v2t(t,e,n={}){let i=dwe[t];dwe[t]=zm([i,e]),d2t[t]=zm([i,e,n])}function aRi(t,e){let n=l2t[t];if(n)return new n(e);throw new Error(`AG Charts - unknown series type: ${t}`)}function Jmt(t){return c2t[t]}function lRi(t){return Nne()?d2t[t]:dwe[t]}function cRi(t,e){u2t[t]=e}function dRi(t){return u2t[t]}function une(t){return h2t.has(t)}function hwe(t){return p2t.has(t)}function pwe(t){return m2t.has(t)}function uRi(t){return f2t.has(t)}function hRi(t){m2t.add(t)}function pRi(t){h2t.add(t)}function mRi(t){p2t.add(t)}function fRi(t){f2t.add(t)}function gRi(t,e){uwe[t]=e}function vRi(t,e){g2t[t]=e}function yRi(t){var e,n;let i;for(let r of(e=t.series)!=null?e:[]){let{type:s="line"}=r,o=(n=uwe[s])==null?void 0:n.call(uwe,r);if(o!=null){if(i!=null&&i!=o)throw new Error("AG Charts - The provided series have incompatible directions");i=o}}return i}function _Ri(t,e){var n;let i=e;for(let r of(n=t.series)!=null?n:[]){let{type:s}=r,o=s!=null?g2t[s]:void 0;o!==void 0&&(i=Ai(Ai({},i),o(r)))}return i}function CRi(){var t;for(let e of xC){if(e.packageType==="enterprise"&&!KAi(e)&&Ns.errorOnce("Unexpected enterprise module registered: "+e.identifier),sU.constructors!=null&&e.optionConstructors!=null&&Object.assign(sU.constructors,e.optionConstructors),e.type==="root"&&e.themeTemplate)for(let n of e.chartTypes)gPi(n,e.themeTemplate);if(e.type==="root"&&((t=e.conflicts)!=null&&t.length)&&fft(e.optionsKey,e.conflicts),e.type==="series"){if(e.chartTypes.length>1)throw new Error("AG Charts - Module definition error: "+e.identifier);oRi(e.identifier,e.chartTypes[0],e.instanceConstructor,e.seriesDefaults,e.themeTemplate,e.enterpriseThemeTemplate,e.paletteFactory,e.solo,e.stackable,e.groupable,e.stackedByDefault,e.swapDefaultAxesCondition,e.customDefaultsFunction)}if(e.type==="series-option"&&e.themeTemplate)for(let n of e.seriesTypes)v2t(n,e.themeTemplate);if(e.type==="axis-option"&&e.themeTemplate)for(let n of e.axisTypes){let i=e.themeTemplate[n],r=Ai(Ai({},e.themeTemplate),typeof i=="object"?i:{});for(let s of e.axisTypes)delete r[s];Gmt(n,r)}e.type==="axis"&&(zAi(e.identifier,e.instanceConstructor),e.themeTemplate&&Gmt(e.identifier,e.themeTemplate)),e.type==="legend"&&ZAi(e.identifier,e.optionsKey,e.instanceConstructor,e.themeTemplate)}if(Nne()){let e=YAi();e.length>0&&Ns.errorOnce("Enterprise modules expected but not registered: ",e)}}function bRi(t){var e,n,i,r;let s=[],o=vPi(EM(t));for(let{type:a,chartTypes:l,optionsKey:c,optionsInnerKey:d,identifier:u}of LF)if(!(o!=="unknown"&&!l.includes(o))){if(a==="root"||a==="legend"){let m=t[c];if(m==null)continue;d?m[d]&&(s.push(`${c}.${d}`),delete m[d]):(s.push(c),delete t[c])}else if(a==="axis"){if(!("axes"in t)||!((e=t.axes)!=null&&e.some(m=>m.type===u)))continue;s.push(`axis[type=${u}]`),t.axes=t.axes.filter(m=>m.type!==u)}else if(a==="axis-option"){if(!("axes"in t)||!((n=t.axes)!=null&&n.some(m=>m[c])))continue;s.push(`axis.${c}`),t.axes.forEach(m=>{m[c]&&delete m[c]})}else if(a==="series"){if(!((i=t.series)!=null&&i.some(m=>m.type===u)))continue;s.push(`series[type=${u}]`),t.series=t.series.filter(m=>m.type!==u)}else if(a==="series-option"){if(!((r=t.series)!=null&&r.some(m=>m[c])))continue;s.push(`series.${c}`),t.series.forEach(m=>{m[c]&&delete m[c]})}}s.length>0&&Ns.warnOnce(["unable to use these enterprise features as 'ag-charts-enterprise' has not been loaded:","",...s,"","See: https://charts.ag-grid.com/javascript/installation/"].join(`
`))}function C2t(t,e){var n,i;return t==null?null:{fills:(n=t.fills)!=null?n:e.fills,strokes:(i=t.strokes)!=null?i:e.strokes}}function TRi(t){var e,n,i;let r={},s={},o="default-ag-charts-group",a=[];for(let l of t){let c=(e=l.type)!=null?e:"line",d=hwe(c),u=pwe(c);if(!d&&!u){a.push({type:"ungrouped",opts:[l]});continue}let{stacked:m,stackGroup:f,grouped:_=void 0,xKey:x}=l,D=f!=null||m===!0,E=_===!0,M=[f??(m===!0?"stacked":void 0),E?"grouped":void 0].filter(z=>z!=null).join("-");M||(M=o);let I=`${c}-${x}-${M}`;if(D&&d){let z=(n=s[I])!=null?n:s[I]={type:"stack",opts:[]};z.opts.length===0&&a.push(z),z.opts.push(l)}else if(E&&u){let z=(i=r[I])!=null?i:r[I]={type:"group",opts:[]};z.opts.length===0&&a.push(z),z.opts.push(l)}else a.push({type:"ungrouped",opts:[l]})}return a}function DRi(t,e){var n;let i=[],r=e.map(c=>{var d;let u=(d=c.type)!=null?d:"line",m=pwe(u),f=hwe(u),_=uRi(u);if(c.grouped&&!m&&Ns.warnOnce(`unsupported grouping of series type: ${u}`),c.stacked&&!f&&Ns.warnOnce(`unsupported stacking of series type: ${u}`),!m&&!f)return c;let x=!1,D=!1;return c.stacked===void 0&&c.grouped===void 0?(x=f&&_,D=m&&!x):c.stacked===void 0?(x=f&&_&&!(c.grouped&&m),D=m&&!x&&!!c.grouped):c.grouped===void 0?(x=f&&c.stacked,D=m&&!x):(x=f&&c.stacked,D=m&&!x&&c.grouped),cs(Ai({},c),{stacked:x,grouped:D})}),s=TRi(r),o=s.reduce((c,d)=>{var u,m;if(d.type==="ungrouped")return c;let f=(u=d.opts[0].type)!=null?u:"line";return(m=c[f])!=null||(c[f]=0),c[f]+=d.type==="stack"?1:d.opts.length,c},{}),a={},l=c=>{var d,u;let m=0,f=(d=c.opts[0].type)!=null?d:"line";if((u=a[f])!=null||(a[f]=0),c.type==="stack"){for(let _ of c.opts)_.seriesGrouping={groupIndex:a[f],groupCount:o[f],stackIndex:m++,stackCount:c.opts.length};a[f]++}else if(c.type==="group")for(let _ of c.opts)_.seriesGrouping={groupIndex:a[f],groupCount:o[f],stackIndex:0,stackCount:0},a[f]++;else for(let _ of c.opts)_.seriesGrouping=void 0;return c.opts};Nm.create(!0,"opts")("processSeriesOptions() - series grouping: ",s);for(let c of s){let d=(n=c.opts[0].type)!=null?n:"line";pwe(d)||hwe(d)?i.push(...l(c)):i.push(...c.opts)}return i}function ZRi(t){if(t===null)return;let e=!0,{baseTheme:n,palette:i,overrides:r}=t;if(n!==void 0&&typeof n!="string"&&typeof n!="object"&&(Ns.warn(`invalid theme.baseTheme type ${typeof n}, expected (string | object).`),e=!1),r!==void 0&&typeof r!="object"&&(Ns.warn(`invalid theme.overrides type ${typeof r}, expected object.`),e=!1),typeof i=="object"){if(i!==null){let{fills:s,strokes:o}=i;s!==void 0&&!Array.isArray(s)&&(Ns.warn("theme.overrides.fills must be undefined or an array"),e=!1),o!==void 0&&!Array.isArray(o)&&(Ns.warn("theme.overrides.strokes must be undefined or an array"),e=!1)}}else i!==void 0&&(Ns.warn(`invalid theme.palette type ${typeof i}, expected object.`),e=!1);if(e)return t}function XRi(t){if(t===void 0||typeof t=="string"||t instanceof _b)return t;if(typeof t=="object")return ZRi(t);Ns.warn(`invalid theme value type ${typeof t}, expected object.`)}function vSe(t){var e;let n=XRi(t);if(n instanceof _b)return n;if(n===void 0||typeof n=="string"){let a=x2t[n];return a?a():(Ns.warnOnce(`the theme [${n}] is invalid, using [ag-default] instead.`),eU())}let i=[],r;for(;typeof n=="object";)i.push((e=n.overrides)!=null?e:{}),n.palette&&r==null&&(r=n.palette),n=n.baseTheme;i.reverse();let s=Ai({baseTheme:n,overrides:zm(i)},r?{palette:r}:{}),o=s.baseTheme?vSe(s.baseTheme):eU();return new o.constructor(s)}function eft(t,e,n){let i=[];for(let r=0;r<n;r++)i.push(e[(r+t.colourIndex)%e.length]);return i}function QRi(t){if(t===void 0||typeof t!="object"||t===null)return{};let{type:e,xOffset:n,yOffset:i}=t,r={pointer:!0,node:!0},s={};return typeof e=="string"&&(a=>Object.keys(r).includes(a))(e)&&(s.type=e),typeof n=="number"&&!isNaN(n)&&isFinite(n)&&(s.xOffset=n),typeof i=="number"&&!isNaN(i)&&isFinite(i)&&(s.yOffset=i),s}function JRi(t){var e,n,i,r;eFi(t);let s=EM(t),o=E=>{if(E!=null&&!(yPi(E)||b0t(E)||Jmt(E)))throw new Error(`AG Charts - unknown series type: ${E}; expected one of: ${W6.seriesTypes}`)};for(let{type:E}of(e=t.series)!=null?e:[])E!=null&&o(E);t=iFi(t);let a="line";OF(t)?a="line":ire(t)?a="treemap":nre(t)&&(a="pie");let l=Jmt(s);yRi(t)&&(l=CPi(l)),l=_Ri(t,l);let c=xPi(t);cFi(t);let d=QRi((n=t.tooltip)==null?void 0:n.position),{context:u,mergedOptions:m,axesThemes:f,seriesThemes:_,theme:x}=rFi(l,t,c);m.series=DRi(m,((i=m.series)!=null?i:[]).map(E=>{var M;let I=(M=E.type)!=null?M:a,z=nFi(E,I,_,d);return I==="pie"&&hFi(_.pie,E,z),z})).map(E=>oFi(u,E)).map(E=>x.templateTheme(E));let D=E=>{let M=_Pi(E);return M||Ns.warnOnce(`unknown axis type: ${E}; expected one of: ${Ywe.axesTypes}, ignoring.`),M};if("axes"in m){let E=!0;for(let{type:I}of(r=m.axes)!=null?r:[])E&&(E=D(I));let M=E?m.axes:l.axes;m.axes=M?.map(I=>{var z,G,A,Y,X;let ne=I.type,pe;E&&(pe=(z=l.axes)==null?void 0:z.find(({type:ie})=>ie===ne));let ce=zm([(G=f[ne])!=null?G:{},(X=(Y=f[ne])==null?void 0:Y[(A=I.position)!=null?A:"unknown"])!=null?X:{},pe]);return lFi(I,ce)}),dFi(t,m)}return uFi(t,m),m}function eFi(t){Object.entries({yKeys:"yKey",yNames:"yName"}).forEach(([n,i])=>{var r;(r=t.series)!=null&&r.some(s=>s[n]!=null)&&Ns.warnOnce(`Property [series.${n}] is deprecated, please use [series.${i}] and multiple series instead.`)})}function tFi(t){return t.some(e=>une(e.type))}function iFi(t){if(t.series===void 0||t.series.length<=1||!tFi(t.series))return t;let e=[...t.series];if(une(e[0].type))Ns.warn(`series[0] of type '${e[0].type}' is incompatible with other series types. Only processing series[0]`),e=e.slice(0,1);else{let n=Array.from(new Set(e.filter(i=>une(i.type)).map(i=>i.type)));Ns.warnOnce(`Unable to mix these series types with the lead series type: ${n}`),e=e.filter(i=>!une(i.type))}return cs(Ai({},t),{series:e})}function nFi(t,e,n,i){var r,s;let o=zm([Ai({},i),(r=t.tooltip)==null?void 0:r.position],CM);return zm([(s=n[e])!=null?s:{},cs(Ai({},t),{type:e,tooltip:cs(Ai({},t.tooltip),{position:o})})],CM)}function rFi(t,e,n){let{theme:i,cleanedTheme:r,axesThemes:s,seriesThemes:o,userPalette:a}=sFi(e),l=C2t(a,i.palette),c={colourIndex:0,palette:i.palette,userPalette:l,theme:i};t=i.templateTheme(t);let d=zm([t,r,e,n],CM);return Cne.isEnterprise||bRi(d),{context:c,mergedOptions:d,axesThemes:s,seriesThemes:o,theme:i}}function sFi(t){var e;let n=vSe(t.theme),i=n.config[EM(t)],r=Object.entries(n.config).reduce((a,[l,{series:c}])=>(a[l]=c,a),{}),s=t.theme,o=typeof s=="object"&&s.palette?s.palette:null;return{theme:n,axesThemes:(e=i?.axes)!=null?e:{},seriesThemes:r,cleanedTheme:zm([i??{},{axes:G6,series:G6}]),userPalette:o}}function oFi(t,e,...n){let i=aFi(t,e),r={stacked:G6,grouped:G6};return zm([...n,i,e,r],CM)}function aFi(t,e){let n=dRi(e.type);if(!n)return{};let{palette:{fills:i=[],strokes:r=[]},userPalette:s,theme:o}=t,a=Math.max(i.length,r.length);return n({userPalette:s,themeTemplateParameters:o.getTemplateParameters(),colorsCount:a,takeColors:l=>{let c={fills:eft(t,i,l),strokes:eft(t,r,l)};return t.colourIndex+=l,c}})}function lFi(t,e){var n,i;let r={top:G6,bottom:G6,left:G6,right:G6};t.crossLines&&(Array.isArray(t.crossLines)||(Ns.warn("axis[].crossLines should be an array."),t.crossLines=[]),t.crossLines=t.crossLines.map(a=>{var l;return zm([(l=e.crossLines)!=null?l:{},a])}));let s=(n=e.gridLine)==null?void 0:n.style;return((i=t.gridLine)==null?void 0:i.style)!==void 0&&s!==void 0&&s.length>0&&(Array.isArray(t.gridLine.style)||(Ns.warn("axis[].gridLine.style should be an array."),t.gridLine.style=[]),t.gridLine.style=t.gridLine.style.map((a,l)=>{if(a.stroke===void 0&&a.lineDash===void 0)return a;let c=s[l%s.length];return zm([c,a])})),zm([e,{crossLines:G6},t,r],CM)}function cFi(t){yM(t,e=>{"enabled"in e&&e.enabled===!1&&Object.keys(e).forEach(n=>{n!=="enabled"&&delete e[n]})},{skip:["data","theme"]})}function dFi(t,e){var n,i,r,s;!iU((n=t.legend)==null?void 0:n.enabled)&&!iU((i=e.legend)==null?void 0:i.enabled)&&((r=e.legend)!=null||(e.legend={}),e.legend.enabled=((s=t.series)!=null?s:[]).length>1)}function uFi(t,e){yM(t,(n,i)=>{i&&"enabled"in i&&!i._enabledFromTheme&&n.enabled==null&&(i.enabled=!0)},{skip:["data","theme"]},e),yM(e,n=>{n._enabledFromTheme!=null&&delete n._enabledFromTheme},{skip:["data","theme"]})}function hFi(t,e,n){iv(e.innerLabels)?n.innerLabels=e.innerLabels.map(i=>zm([t.innerLabels,i])):n.innerLabels=G6}function mFi(t){return b2t.includes(t.type)}function fFi(t){return b2t.includes(t.type)}function gFi(t){return typeof t=="string"&&pFi.includes(t)}function tft(t){if(OF(t))return"cartesian";if(nre(t))return"polar";if(ire(t))return"hierarchy";throw new Error(`AG Chart - unknown type of chart for options with type: ${t.type}`)}function xFi(t,e,n){var i,r,s;let o=zm([(i=t.processedOptions)!=null?i:{},e],CM),a=bFi(t,o),l=["type","data","series","listeners","theme","legend.listeners"];if(OF(e)||nre(e))l.push("axes");else if(!ire(e))throw new Error(`AG Charts - couldn't apply configuration, check type of options and chart: ${e.type}`);e.listeners&&T2t(t,e.listeners),_Se(t,t.getModuleContext(),e,{skip:l});let c=!1,d=!1;e.series&&e.series.length>0&&(d=wFi(t,e),c=!0),"axes"in o&&Array.isArray(o.axes)&&SFi(t,o,d)&&(c=!0);let u=e.series,m=!!e.data||u?.some(M=>M.data!=null),f=QAi(),_=Object.values(f).some(M=>e[M]!=null),x=e.title!=null&&e.subtitle!=null;c=c||m||_||x,e.data&&(t.data=e.data),(r=e.legend)!=null&&r.listeners&&Object.assign(t.legend.listeners,e.legend.listeners),e.listeners&&t.updateAllSeriesListeners(),t.processedOptions=o,t.userOptions=zm([(s=t.userOptions)!=null?s:{},n],CM);let E=c||a?1:2;Qw("AgChartV2.applyChartOptions() - update type",pU[E]),t.update(E,{forceNodeDataRefresh:c,newAnimationBatch:!0})}function bFi(t,e){let n=({chartTypes:r})=>t instanceof g0t&&r.includes("cartesian")||t instanceof S2t&&r.includes("polar")||t instanceof _2t&&r.includes("hierarchy"),i=!1;for(let r of xC){if(r.type!=="root"&&r.type!=="legend")continue;let s=n(r)&&e[r.optionsKey]!=null,o=t.isModuleEnabled(r);s!==o&&(s?(t.addModule(r),t[r.optionsKey]=t.modules.get(r.optionsKey)):(t.removeModule(r),delete t[r.optionsKey]),i=!0)}return i}function wFi(t,e){let n=e.series;if(!n)return!1;let i=["direction","xKey","yKey","sizeKey","angleKey","stacked","stackGroup"],r=t.series.length===n.length;for(let s=0;s<t.series.length&&r;s++){r&&(r=t.series[s].type===n[s].type);for(let o of i)r&&(r=t.series[s].properties[o]===n[s][o])}return r?(t.series.forEach((s,o)=>{var a,l,c,d;let u=(c=(l=(a=t.processedOptions)==null?void 0:a.series)==null?void 0:l[o])!=null?c:{},m=SC(u,(d=n[o])!=null?d:{});m&&(Qw(`AgChartV2.applySeries() - applying series diff idx ${o}`,m),D2t(s,m),s.markNodeDataDirty())}),!1):(Qw("AgChartV2.applySeries() - creating new series instances"),t.series=TFi(t,n),!0)}function SFi(t,e,n){let i=e.axes;if(!i)return!1;if(!n&&t.axes.length===i.length&&t.axes.every((s,o)=>s.type===i[o].type)){let s=t.processedOptions,o=t.getModuleContext();if(OF(s))return t.axes.forEach((a,l)=>{var c,d;let u=(d=(c=s.axes)==null?void 0:c[l])!=null?d:{},m=SC(u,i[l]);Qw(`AgChartV2.applyAxes() - applying axis diff idx ${l}`,m);let f=`axes[${l}]`;_Se(a,o,m,{path:f,skip:["axes[].type"]})}),!0}return t.axes=EFi(t,i),!0}function TFi(t,e){var n;let i=[],r=t.getModuleContext();for(let s of e??[]){let o=(n=s.type)!=null?n:"unknown";if(b0t(o)&&!WAi(o))continue;let a=aRi(o,r);DFi(a,s),D2t(a,s),i.push(a)}return i}function DFi(t,e){let n=xC.filter(s=>s.type==="series-option"),i=t.createModuleContext(),r=t.getModuleMap();for(let s of n){let o=s.seriesTypes;s.optionsKey in e&&o.includes(t.type)&&(r.addModule(s,a=>new a.instanceConstructor(i)),t[s.optionsKey]=r.getModule(s))}}function EFi(t,e){let n=new vFi,i=t.getModuleContext(),r=["axes[].type"],s=0;for(let o of e??[]){let a=HAi(o.type,i),l=`axes[${s++}]`;MFi(a,o),_Se(a,i,o,{path:l,skip:r}),n.push(a,o)}return n.guessInvalidPositions()}function MFi(t,e){let n=!1,i=xC.filter(s=>s.type==="axis-option"),r=t.createModuleContext();for(let s of i){let o=e[s.optionsKey]!=null,a=t.getModuleMap(),l=a.isModuleEnabled(s);o!==l&&(n=!0,o?(a.addModule(s,c=>new c.instanceConstructor(r)),t[s.optionsKey]=a.getModule(s)):(a.removeModule(s),delete t[s.optionsKey]))}return n}function T2t(t,e){t.clearEventListeners();let n=Object.entries(e??{});for(let[i,r]of n)typeof r=="function"&&t.addEventListener(i,r)}function _Se(t,e,n,{skip:i,path:r}={}){let s=Ai(cs(Ai({},Lki(e)),{skip:i}),r?{path:r}:{});return ZW(t,n,s)}function D2t(t,e){let n=t.getModuleMap(),i=e,{type:r,data:s,errorBar:o,listeners:a,seriesGrouping:l}=i,c=W3(i,["type","data","errorBar","listeners","seriesGrouping"]);t.properties.set(c),"data"in e&&(t.data=e.data),"errorBar"in e&&n.isModuleEnabled("errorBar")&&n.getModule("errorBar").properties.set(e.errorBar),e?.listeners!=null&&T2t(t,e.listeners),"seriesGrouping"in e&&(t.seriesGrouping=l?Object.freeze(Ai(Ai({},t.seriesGrouping),l)):void 0)}var vwe,iMi,nMi,rMi,_ne,sMi,ift,nft,oMi,S7e,ap,cmt,Ai,cs,W3,db,Be,ub,mr,aMi,lMi,cMi,tU,nv,rft,hMi,a7r,fM,Hg,_C,Jw,IW,EW,ene,sft,oft,fMi,aft,lft,yMi,cft,dft,xMi,uft,SMi,hft,TMi,DMi,EMi,MMi,kMi,IMi,AMi,pft,FMi,mft,NMi,zMi,WMi,$Mi,qMi,QMi,Cne,ywe,xC,_we,dmt,Ns,eki,hmt,tki,Nm,bne,hF,qw,lki,vft,A2,zne,one,G6,pmt,wC,j3,TC,Dwe,D7e,E7e,Ewe,CC,j6,hb,Vc,Ua,MC,Ps,lh,EF,es,Bh,MF,kF,TU,pb,Ene,DU,bM,Mwe,kwe,xft,Jc,mb,fki,Gne,bft,gki,wft,Sft,vki,tS,Iwe,iS,nS,Wne,Tft,yki,_ki,Dft,Eft,Awe,Mft,Cki,kft,Mne,B7e,ml,H7e,g_,Pft,Rft,rv,IF,Pwe,dm,Eki,Mki,kki,sv,U6,W7e,P2,Wu,Vp,fmt,Fki,MU,wM,zft,Hm,__,sU,gmt,rS,lu,Uft,da,IC,U0,jft,Bki,$ft,Fwe,Kft,Hki,oU,Gki,Wki,Uki,jki,Yft,Lwe,qft,Zft,Xft,Qft,kU,Jft,e1t,t1t,I2,i1t,AC,vmt,k7e,I7e,n1t,Bm,aU,$6,PC,l0,_mt,Qki,SM,$ne,Cmt,tne,ine,A7e,Wg,RC,gF,ob,bmt,eIi,tIi,nne,uF,J4,c1t,d1t,sIi,oIi,lU,h1t,gM,K6,vF,dIi,uIi,hIi,f1t,pIi,mIi,fIi,dU,gIi,yF,y1t,vIi,AF,yIi,Owe,C1t,_Ii,H3,Vwe,b1t,CIi,xIi,Y7e,Smt,Tmt,Dmt,wIi,Emt,Mmt,kmt,Imt,SIi,TIi,Y6,C_,q7e,w1t,IU,Amt,S1t,Bwe,rne,DIi,D1t,Rmt,MIi,kIi,rM,Hwe,IIi,oS,MW,NIi,VIi,Yne,Pf,AU,BIi,x_,Q7e,zIi,F1t,PU,Gwe,Wwe,TM,_M,O1t,Fmt,qIi,z1t,hU,XIi,QIi,H1t,Lmt,W1t,pU,P7e,sM,U1t,j1t,qne,RU,Omt,$1t,Nmt,K1t,Y1t,q1t,Vmt,Bmt,sAi,Uwe,Z1t,J7e,X1t,oAi,Q1t,b1,PF,lb,Zne,pAi,aS,FU,jwe,RF,J1t,FC,Ine,mAi,kW,rwe,_Ai,s0t,a0t,Qne,OU,Hmt,DAi,EAi,MAi,h0t,owe,awe,ov,p0t,vb,Jne,m0t,NU,LC,IAi,AAi,Kwe,lS,cS,PAi,RAi,g0t,OW,y0t,mU,_0t,TF,BAi,C0t,fU,Rne,Ywe,x0t,LF,qAi,w0t,S0t,ere,T0t,Wmt,JAi,DC,DM,ePi,tPi,Zwe,iPi,Xwe,VU,Yw,DF,Qwe,nPi,rPi,v_,sPi,oPi,aPi,lPi,y_,cPi,dPi,uPi,hPi,pPi,mPi,mM,lwe,W6,D0t,E0t,M0t,k0t,I0t,A0t,P0t,R0t,F0t,L0t,yb,NF,O0t,C1,W0,N0t,VF,_F,Fne,ane,JW,gU,BF,b_,w_,S_,T_,Jwe,D_,eSe,tSe,bPi,$3,B0t,av,c0,U0t,IPi,APi,PPi,dSe,K0t,Y0t,w1,LPi,OPi,NPi,hSe,j0,VPi,BPi,zPi,HPi,S1,Qmt,GPi,WPi,UPi,Ug,jPi,$Pi,KPi,jg,YPi,qPi,ZPi,ab,CF,s2t,pSe,mSe,zF,fSe,rre,Dc,gSe,QPi,o2t,JPi,tRi,nRi,dne,rRi,uS,a2t,xF,sRi,l2t,c2t,dwe,d2t,u2t,h2t,p2t,m2t,f2t,uwe,g2t,xRi,_2t,F7e,wRi,mwe,SRi,z6,_b,L7e,aM,hne,ERi,zU,lM,pne,MRi,kRi,cM,mne,IRi,ARi,zW,fwe,PRi,RRi,FRi,LRi,GW,gwe,ORi,NRi,VRi,BRi,dM,fne,zRi,HRi,uM,gne,GRi,WRi,hM,vne,URi,jRi,pM,yne,$Ri,KRi,eU,O7e,YRi,qRi,x2t,CM,pFi,b2t,vFi,yFi,S2t,Qw,_Fi,ySe,N7e,CFi,dF,kFi,IFi,AFi,E2t=Q(()=>{vwe=Object.defineProperty,iMi=Object.defineProperties,nMi=Object.getOwnPropertyDescriptor,rMi=Object.getOwnPropertyDescriptors,_ne=Object.getOwnPropertySymbols,sMi=Object.getPrototypeOf,ift=Object.prototype.hasOwnProperty,nft=Object.prototype.propertyIsEnumerable,oMi=Reflect.get,S7e=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),ap=Math.pow,cmt=(t,e,n)=>e in t?vwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ai=(t,e)=>{for(var n in e||(e={}))ift.call(e,n)&&cmt(t,n,e[n]);if(_ne)for(var n of _ne(e))nft.call(e,n)&&cmt(t,n,e[n]);return t},cs=(t,e)=>iMi(t,rMi(e)),W3=(t,e)=>{var n={};for(var i in t)ift.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&_ne)for(var i of _ne(t))e.indexOf(i)<0&&nft.call(t,i)&&(n[i]=t[i]);return n},db=(t,e)=>{for(var n in e)vwe(t,n,{get:e[n],enumerable:!0})},Be=(t,e,n,i)=>{for(var r=i>1?void 0:i?nMi(e,n):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(r=(i?o(e,n,r):o(r))||r);return i&&r&&vwe(e,n,r),r},ub=(t,e,n)=>oMi(sMi(t),n,e),mr=(t,e,n)=>new Promise((i,r)=>{var s=l=>{try{a(n.next(l))}catch(c){r(c)}},o=l=>{try{a(n.throw(l))}catch(c){r(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,o);a((n=n.apply(t,e)).next())}),aMi=function(t,e){this[0]=t,this[1]=e},lMi=t=>{var e=t[S7e("asyncIterator")],n=!1,i,r={};return e==null?(e=t[S7e("iterator")](),i=s=>r[s]=o=>e[s](o)):(e=e.call(t),i=s=>r[s]=o=>{if(n){if(n=!1,s==="throw")throw o;return o}return n=!0,{done:!1,value:new aMi(new Promise(a=>{var l=e[s](o);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),r[S7e("iterator")]=()=>r,i("next"),"throw"in e?i("throw"):r.throw=s=>{throw s},"return"in e&&i("return"),r},cMi={};db(cMi,{day:()=>uft,friday:()=>kMi,hour:()=>dft,millisecond:()=>rft,minute:()=>lft,monday:()=>TMi,month:()=>pft,saturday:()=>IMi,second:()=>oft,sunday:()=>hft,thursday:()=>MMi,tuesday:()=>DMi,utcDay:()=>$Mi,utcHour:()=>WMi,utcMinute:()=>zMi,utcMonth:()=>qMi,utcYear:()=>QMi,wednesday:()=>EMi,year:()=>mft});tU=class{constructor(t,e,n){this._encode=t,this._decode=e,this._rangeCallback=n}floor(t){let e=new Date(t),n=this._encode(e);return this._decode(n)}ceil(t){let e=new Date(Number(t)-1),n=this._encode(e);return this._decode(n+1)}range(t,e,n){var i;let r=(i=this._rangeCallback)==null?void 0:i.call(this,t,e),s=this._encode(n?this.floor(t):this.ceil(t)),o=this._encode(n?this.ceil(e):this.floor(e));if(o<s)return[];let a=[];for(let l=s;l<=o;l++){let c=this._decode(l);a.push(c)}return r?.(),a}},nv=class extends tU{getOffset(t,e){let n=typeof t=="number"||t instanceof Date?this._encode(new Date(t)):0;return Math.floor(n)%e}every(t,e){let n=0,i,{snapTo:r="start"}=e??{};if(typeof r=="string"){let a=n;i=(l,c)=>{let d=r==="start"?l:c;return n=this.getOffset(d,t),()=>n=a}}else typeof r=="number"?n=this.getOffset(new Date(r),t):r instanceof Date&&(n=this.getOffset(r,t));let s=a=>{let l=this._encode(a);return Math.floor((l-n)/t)},o=a=>this._decode(a*t+n);return new tU(s,o,i)}};rft=new nv(dMi,uMi),hMi=rft,a7r=new Date(0).getFullYear(),fM=1e3,Hg=fM*60,_C=Hg*60,Jw=_C*24,IW=Jw*7,EW=Jw*30,ene=Jw*365,sft=new Date().getTimezoneOffset()*Hg;oft=new nv(pMi,mMi),fMi=oft,aft=new Date().getTimezoneOffset()*Hg;lft=new nv(gMi,vMi),yMi=lft,cft=new Date().getTimezoneOffset()*Hg;dft=new nv(_Mi,CMi),xMi=dft;uft=new nv(bMi,wMi),SMi=uft;hft=xM(0),TMi=xM(1),DMi=xM(2),EMi=xM(3),MMi=xM(4),kMi=xM(5),IMi=xM(6),AMi=hft;pft=new nv(PMi,RMi),FMi=pft;mft=new nv(LMi,OMi),NMi=mft;zMi=new nv(VMi,BMi);WMi=new nv(HMi,GMi);$Mi=new nv(UMi,jMi);qMi=new nv(KMi,YMi);QMi=new nv(ZMi,XMi),Cne={isEnterprise:!1},ywe=class{constructor(){this.destroyFns=[]}destroy(){for(let t of this.destroyFns)t()}},xC=[];_we=new Map;dmt={};Ns={log(...t){console.log(...t)},warn(t,...e){console.warn(`AG Charts - ${t}`,...e)},error(t,...e){typeof t=="object"?console.error("AG Charts error",t,...e):console.error(`AG Charts - ${t}`,...e)},table(...t){console.table(...t)},warnOnce(t,...e){umt(()=>Ns.warn(t,...e),`Logger.warn: ${t}`)},errorOnce(t,...e){umt(()=>Ns.error(t,...e),`Logger.error: ${t}`)}};eki=2e3,hmt=Date.now(),tki=()=>{let t=Date.now()-hmt;if(t>eki){let e=(Math.floor(t/100)/10).toFixed(1);Ns.log(`**** ${e}s since last log message ****`)}hmt=Date.now()},Nm={create(...t){return(...e)=>{Nm.check(...t)&&(typeof e[0]=="function"&&(e=xne(e[0]())),tki(),Ns.log(...e))}},check(...t){return t.length===0&&t.push(!0),xne(V7e("agChartsDebug")).some(n=>t.includes(n))}},bne=Symbol("BREAK"),hF="__decorator_config";qw=(t=>(t[t.NONE=0]="NONE",t[t.TRIVIAL=1]="TRIVIAL",t[t.MINOR=2]="MINOR",t[t.MAJOR=3]="MAJOR",t))(qw||{});lki=aki();vft=class{constructor(){this._dirty=3}markDirty(t,e=1){this._dirty>e||(this._dirty=e)}markClean(t){this._dirty=0}isDirty(){return this._dirty>0}};A2=class extends vft{constructor(t){super(),this.className=t}set(t){let e=new Set(Object.keys(t));for(let n of pF(this))if(e.has(n)){let i=t[n],r=this;H6(r[n])?r[n]=r[n]instanceof zne?r[n].reset(i):r[n].set(i):r[n]=i,e.delete(n)}for(let n of e){let{className:i=this.constructor.name}=this;Ns.warn(`unable to set [${n}] in ${i} - property is unknown`)}return this}isValid(){return pF(this).every(t=>{let{optional:e}=rki(this,t);return e||typeof this[t]<"u"})}toJson(){return pF(this).reduce((t,e)=>(t[e]=this[e],t),{})}},zne=class Cft extends Array{constructor(e,...n){super(n.length),Object.defineProperty(this,"itemFactory",{value:e,enumerable:!1,configurable:!1}),this.set(n)}set(e){if(iv(e)){this.length=e.length;for(let n=0;n<e.length;n++)this[n]=new this.itemFactory().set(e[n])}return this}reset(e){return new Cft(this.itemFactory,...e)}};one="class-instance";G6=Symbol("<delete-property>"),pmt=Symbol("<unspecified-property>");wC=Math.PI*2;j3=(t,e)=>{let n=Symbol(String(e));t[n]=void 0,Object.defineProperty(t,e,{get(){return this[n]},set(i){this[n]!==i&&(this[n]=i,this.invalid=!0)},enumerable:!0,configurable:!1})};TC=class{constructor(){this.type="band",this.invalid=!0,this.interval=1,this.index=new Map,this.ordinalRange=[],this._domain=[],this.range=[0,1],this._bandwidth=1,this._step=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0,this.round=!1}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&Ns.warnOnce("Expected update to not invalidate scale"))}set domain(t){this.invalid=!0;let e=[];this.index=new Map;let n=this.index;t.forEach(i=>{n.get(i)===void 0&&n.set(i,e.push(i)-1)}),this._domain=e}get domain(){return this._domain}ticks(){this.refresh();let{interval:t=1}=this,e=Math.abs(Math.round(t));return this._domain.filter((n,i)=>i%e===0)}convert(t){this.refresh();let e=this.index.get(t);if(e===void 0)return NaN;let n=this.ordinalRange[e];return n===void 0?NaN:n}invert(t){this.refresh();let e=this.ordinalRange.findIndex(n=>n===t);return this.domain[e]}get bandwidth(){return this.refresh(),this._bandwidth}get step(){return this.refresh(),this._step}get rawBandwidth(){return this.refresh(),this._rawBandwidth}set padding(t){t=T7e(t,0,1),this._paddingInner=t,this._paddingOuter=t}get padding(){return this._paddingInner}set paddingInner(t){this._paddingInner=T7e(t,0,1)}get paddingInner(){return this._paddingInner}set paddingOuter(t){this._paddingOuter=T7e(t,0,1)}get paddingOuter(){return this._paddingOuter}update(){let t=this._domain.length;if(t===0)return;let e=this.round,n=this._paddingInner,i=this._paddingOuter,[r,s]=this.range,o=s-r,a=o/Math.max(1,t+2*i-n),l=e?Math.floor(a):a,c=l*(t-n),d=r+(o-c)/2,u=e?Math.round(d):d,m=l*(1-n),f=e?Math.round(m):m,_=a*(1-n),x=[];for(let D=0;D<t;D++)x.push(u+l*D);this._bandwidth=f,this._rawBandwidth=_,this._step=l,this.ordinalRange=x}};Be([j3],TC.prototype,"interval",2);Be([j3],TC.prototype,"range",2);Be([j3],TC.prototype,"round",2);Dwe=(t,e=10)=>{let n=(Math.abs(t)%1).toFixed(e);for(let i=n.length-1;i>=2;i-=1)if(n[i]!=="0")return e-(n.length-1-i);return 0},D7e=t=>{let e=t<0?-1:1,n=Math.abs(t);return n<=.04045?t/12.92:e*ap((n+.055)/1.055,2.4)},E7e=t=>{let e=t<0?-1:1,n=Math.abs(t);return n>.0031308?e*(1.055*ap(n,1/2.4)-.055):12.92*t},Ewe=class Nc{constructor(e,n,i,r=1){this.r=ev(0,e||0,1),this.g=ev(0,n||0,1),this.b=ev(0,i||0,1),this.a=ev(0,r||0,1)}static validColorString(e){return e.indexOf("#")>=0?!!Nc.parseHex(e):e.indexOf("rgb")>=0?!!Nc.stringToRgba(e):!!Nc.nameToHex[e.toLowerCase()]}static fromString(e){if(e.indexOf("#")>=0)return Nc.fromHexString(e);let n=Nc.nameToHex[e.toLowerCase()];if(n)return Nc.fromHexString(n);if(e.indexOf("rgb")>=0)return Nc.fromRgbaString(e);throw new Error(`Invalid color string: '${e}'`)}static tryParseFromString(e){try{return Nc.fromString(e)}catch{return Ns.warnOnce(`invalid color string: '${e}'.`),Nc.fromArray([0,0,0])}}static parseHex(e){e=e.replace(/ /g,"").slice(1);let n;switch(e.length){case 6:case 8:n=[];for(let i=0;i<e.length;i+=2)n.push(parseInt(`${e[i]}${e[i+1]}`,16));break;case 3:case 4:n=e.split("").map(i=>parseInt(i,16)).map(i=>i+i*16);break}if(n?.length>=3&&n.every(i=>i>=0))return n.length===3&&n.push(255),n}static fromHexString(e){let n=Nc.parseHex(e);if(n){let[i,r,s,o]=n;return new Nc(i/255,r/255,s/255,o/255)}throw new Error(`Malformed hexadecimal color string: '${e}'`)}static stringToRgba(e){let[n,i]=[NaN,NaN];for(let a=0;a<e.length;a++){let l=e[a];if(!n&&l==="(")n=a;else if(l===")"){i=a;break}}let r=n&&i&&e.substring(n+1,i);if(!r)return;let s=r.split(","),o=[];for(let a=0;a<s.length;a++){let l=s[a],c=parseFloat(l);if(isNaN(c))return;l.indexOf("%")>=0?(c=Math.max(0,Math.min(100,c)),c/=100):a===3?c=Math.max(0,Math.min(1,c)):(c=Math.max(0,Math.min(255,c)),c/=255),o.push(c)}return o}static fromRgbaString(e){let n=Nc.stringToRgba(e);if(n){if(n.length===3)return new Nc(n[0],n[1],n[2]);if(n.length===4)return new Nc(n[0],n[1],n[2],n[3])}throw new Error(`Malformed rgb/rgba color string: '${e}'`)}static fromArray(e){if(e.length===4)return new Nc(e[0],e[1],e[2],e[3]);if(e.length===3)return new Nc(e[0],e[1],e[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")}static fromHSB(e,n,i,r=1){let s=Nc.HSBtoRGB(e,n,i);return new Nc(s[0],s[1],s[2],r)}static fromHSL(e,n,i,r=1){let s=Nc.HSLtoRGB(e,n,i);return new Nc(s[0],s[1],s[2],r)}static fromOKLCH(e,n,i,r=1){let s=Nc.OKLCHtoRGB(e,n,i);return new Nc(s[0],s[1],s[2],r)}static padHex(e){return e.length===1?"0"+e:e}toHexString(){let e="#"+Nc.padHex(Math.round(this.r*255).toString(16))+Nc.padHex(Math.round(this.g*255).toString(16))+Nc.padHex(Math.round(this.b*255).toString(16));return this.a<1&&(e+=Nc.padHex(Math.round(this.a*255).toString(16))),e}toRgbaString(e=3){let n=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255)],i=Math.pow(10,e);return this.a!==1?(n.push(Math.round(this.a*i)/i),`rgba(${n.join(", ")})`):`rgb(${n.join(", ")})`}toString(){return this.a===1?this.toHexString():this.toRgbaString()}toHSB(){return Nc.RGBtoHSB(this.r,this.g,this.b)}static RGBtoOKLCH(e,n,i){let r=D7e(e),s=D7e(n),o=D7e(i),a=Math.cbrt(.4122214708*r+.5363325363*s+.0514459929*o),l=Math.cbrt(.2119034982*r+.6806995451*s+.1073969566*o),c=Math.cbrt(.0883024619*r+.2817188376*s+.6299787005*o),d=.2104542553*a+.793617785*l-.0040720468*c,u=1.9779984951*a-2.428592205*l+.4505937099*c,m=.0259040371*a+.7827717662*l-.808675766*c,f=Math.atan2(m,u)*180/Math.PI,_=d,x=Math.hypot(u,m),D=f>=0?f:f+360;return[_,x,D]}static OKLCHtoRGB(e,n,i){let r=e,s=n*Math.cos(i*Math.PI/180),o=n*Math.sin(i*Math.PI/180),a=ap(r+.3963377774*s+.2158037573*o,3),l=ap(r-.1055613458*s-.0638541728*o,3),c=ap(r-.0894841775*s-1.291485548*o,3),d=4.0767416621*a-3.3077115913*l+.2309699292*c,u=-1.2684380046*a+2.6097574011*l-.3413193965*c,m=-.0041960863*a-.7034186147*l+1.707614701*c,f=E7e(d),_=E7e(u),x=E7e(m);return[f,_,x]}static RGBtoHSL(e,n,i){let r=Math.min(e,n,i),s=Math.max(e,n,i),o=(s+r)/2,a,l;if(s===r)a=NaN,l=0;else{let c=s-r;l=o>.5?c/(2-s-r):c/(s+r),s===e?a=(n-i)/c+(n<i?6:0):s===n?a=(i-e)/c+2:a=(e-n)/c+4,a*=360/6}return[a,l,o]}static HSLtoRGB(e,n,i){if(n===0)return[i,i,i];let r=i<.5?i*(1+n):i+n-i*n,s=2*i-r;function o(d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?s+(r-s)*6*d:d<1/2?r:d<2/3?s+(r-s)*(2/3-d)*6:s}let a=o(e/360+1/3),l=o(e/360),c=o(e/360-1/3);return[a,l,c]}static RGBtoHSB(e,n,i){let r=Math.min(e,n,i),s=Math.max(e,n,i),o=s!==0?(s-r)/s:0,a=NaN;if(r!==s){let l=s-r,c=(s-e)/l,d=(s-n)/l,u=(s-i)/l;e===s?a=u-d:n===s?a=2+c-u:a=4+d-c,a/=6,a<0&&(a=a+1)}return[a*360,o,s]}static HSBtoRGB(e,n,i){isNaN(e)&&(e=0),e=(e%360+360)%360/360;let r=0,s=0,o=0;if(n===0)r=s=o=i;else{let a=(e-Math.floor(e))*6,l=a-Math.floor(a),c=i*(1-n),d=i*(1-n*l),u=i*(1-n*(1-l));switch(a>>0){case 0:r=i,s=u,o=c;break;case 1:r=d,s=i,o=c;break;case 2:r=c,s=i,o=u;break;case 3:r=c,s=d,o=i;break;case 4:r=u,s=c,o=i;break;case 5:r=i,s=c,o=d;break}}return[r,s,o]}derive(e,n,i,r){let s=Nc.RGBtoHSB(this.r,this.g,this.b),o=s[2];o==0&&i>1&&(o=.05);let a=((s[0]+e)%360+360)%360,l=Math.max(Math.min(s[1]*n,1),0);o=Math.max(Math.min(o*i,1),0);let c=Math.max(Math.min(this.a*r,1),0),d=Nc.HSBtoRGB(a,l,o);return d.push(c),Nc.fromArray(d)}brighter(){return this.derive(0,1,1/.7,1)}darker(){return this.derive(0,1,.7,1)}static interpolate(e,n){let i=Nc.tryParseFromString(e),r=Nc.tryParseFromString(n);return s=>{let o=(l,c)=>l*(1-s)+c*s;return new Nc(o(i.r,r.r),o(i.g,r.g),o(i.b,r.b),o(i.a,r.a)).toString()}}};Ewe.didDebug=!1;Ewe.nameToHex=Object.freeze({aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",transparent:"#00000000",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"});CC=Ewe;j6=(...t)=>{let e=[];return cu((n,i)=>(e.length=0,t.every(r=>{let s=r(n,i);return s||e.push(EU(r,i)),s})),()=>e.filter(Boolean).join(" AND "))},hb=(...t)=>cu((e,n)=>t.some(i=>i(e,n)),e=>t.map(bki(e)).filter(Boolean).join(" OR ")),Vc=Tki(cu((t,e)=>H6(t)||vM(t)&&H6(e.target[e.property]),"an object")),Ua=cu(yft,"a boolean"),MC=cu(Bne,"a function"),Ps=cu(mF,"a string"),lh=Ski(cu(wU,"a number")),EF=cu(t=>bC(t)&&isNaN(t),"NaN"),es=lh.restrict({min:0}),Bh=lh.restrict({min:0,max:1}),MF=lh.restrict({min:-360,max:360}),kF=hb(lh,EF),TU=wki(cu(iv,"an array")),pb=(t,e)=>cu((n,i)=>iv(n)&&n.every(r=>t(r,i)),n=>{var i;let r=(i=EU(TU,n))!=null?i:"";return e?`${r} of ${e}`:r}),Ene=t=>wU(t)||bwe(t),DU=t=>cu((e,n)=>!Ene(e)||!Ene(n.target[t])||e<n.target[t],`expected to be less than ${t}`),bM=t=>cu((e,n)=>!Ene(e)||!Ene(n.target[t])||e>n.target[t],`expected to be greater than ${t}`),Mwe=cu(bwe,"Date object"),kwe=hb(Mwe,es),xft="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",Jc=cu(t=>mF(t)&&CC.validColorString(t),`color String. ${xft}`),mb=cu(pb(Jc),`color strings. ${xft}`),fki=pb(Ua,"boolean values"),Gne=pb(lh,"numbers"),bft=pb(Ps,"strings"),gki=cu(pb(Mwe),"Date objects"),wft=cu(pb(Vc),"objects"),Sft=Gm(["butt","round","square"],"a line cap"),vki=Gm(["round","bevel","miter"],"a line join"),tS=cu(pb(es),"numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),Iwe=Gm(["top","right","bottom","left"],"a position"),iS=Gm(["normal","italic","oblique"],"a font style"),nS=hb(Gm(["normal","bold","bolder","lighter"],"a font weight"),lh.restrict({min:1,max:1e3})),Wne=Gm(["never","always","hyphenate","on-space"],"a text wrap strategy"),Tft=Gm(["left","center","right"],"a text align"),yki=Gm(["top","middle","bottom"],"a vertical align"),_ki=Gm(["ellipsis","hide"],"an overflow strategy"),Dft=Gm(["horizontal","vertical"],"a direction"),Eft=Gm(["inside","outside"],"a placement"),Awe=hb(Gm(["exact","nearest"],"interaction range"),lh);Mft=hb(j6(lh.restrict({min:1}),DU("maxSpacing")),EF),Cki=hb(j6(lh.restrict({min:1}),bM("minSpacing")),EF);kft=(t=>(t.X="x",t.Y="y",t))(kft||{}),Mne={};B7e=class z7e{constructor(e,n,i,r){this.x=e,this.y=n,this.width=i,this.height=r}clone(){let{x:e,y:n,width:i,height:r}=this;return new z7e(e,n,i,r)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}containsPoint(e,n){return e>=this.x&&e<=this.x+this.width&&n>=this.y&&n<=this.y+this.height}collidesBBox(e){return this.x<e.x+e.width&&this.x+this.width>e.x&&this.y<e.y+e.height&&this.y+this.height>e.y}isInfinite(){return Math.abs(this.x)===1/0||Math.abs(this.y)===1/0||Math.abs(this.width)===1/0||Math.abs(this.height)===1/0}distanceSquared(e){if(this.containsPoint(e.x,e.y))return 0;let n=e.x-Math.max(this.x,Math.min(e.x,this.x+this.width)),i=e.y-Math.max(this.y,Math.min(e.y,this.y+this.height));return n*n+i*i}static nearestBox(e,n){return Aft(e,n)}shrink(e,n){let i=(r,s)=>{switch(r){case"top":this.y+=s;case"bottom":this.height-=s;break;case"left":this.x+=s;case"right":this.width-=s;break;case"vertical":this.y+=s,this.height-=s*2;break;case"horizontal":this.x+=s,this.width-=s*2;break;case void 0:this.x+=s,this.width-=s*2,this.y+=s,this.height-=s*2;break;default:}};return typeof e=="number"?i(n,e):typeof e=="object"&&Object.entries(e).forEach(([r,s])=>i(r,s)),this}grow(e,n){if(typeof e=="number")this.shrink(-e,n);else{let i=Ai({},e);for(let r in i)i[r]*=-1;this.shrink(i)}return this}static merge(e){let n=1/0,i=1/0,r=-1/0,s=-1/0;return e.forEach(o=>{o.x<n&&(n=o.x),o.y<i&&(i=o.y),o.x+o.width>r&&(r=o.x+o.width),o.y+o.height>s&&(s=o.y+o.height)}),new z7e(n,i,r-n,s-i)}};B7e.zero=new B7e(0,0,0,0);ml=B7e,H7e=class AW{get e(){return[...this.elements]}constructor(e=[1,0,0,1,0,0]){this.elements=e}setElements(e){let n=this.elements;return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],this}get identity(){let e=this.elements;return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0}AxB(e,n,i){let r=e[0]*n[0]+e[2]*n[1],s=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],l=e[0]*n[4]+e[2]*n[5]+e[4],c=e[1]*n[4]+e[3]*n[5]+e[5];i=i??e,i[0]=r,i[1]=s,i[2]=o,i[3]=a,i[4]=l,i[5]=c}multiplySelf(e){return this.AxB(this.elements,e.elements),this}multiply(e){let n=new Array(6);return this.AxB(this.elements,e.elements,n),new AW(n)}preMultiplySelf(e){return this.AxB(e.elements,this.elements,this.elements),this}inverse(){let e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=1/(n*s-i*r);return n*=l,i*=l,r*=l,s*=l,new AW([s,-i,-r,n,r*a-s*o,i*o-n*a])}inverseTo(e){let n=this.elements,i=n[0],r=n[1],s=n[2],o=n[3],a=n[4],l=n[5],c=1/(i*o-r*s);return i*=c,r*=c,s*=c,o*=c,e.setElements([o,-r,-s,i,s*l-o*a,r*a-i*l]),this}invertSelf(){let e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=1/(n*s-i*r);return n*=l,i*=l,r*=l,s*=l,e[0]=s,e[1]=-i,e[2]=-r,e[3]=n,e[4]=r*a-s*o,e[5]=i*o-n*a,this}transformPoint(e,n){let i=this.elements;return{x:e*i[0]+n*i[2]+i[4],y:e*i[1]+n*i[3]+i[5]}}transformBBox(e,n){let i=this.elements,r=i[0],s=i[1],o=i[2],a=i[3],l=e.width*.5,c=e.height*.5,d=e.x+l,u=e.y+c,m=Math.abs(l*r)+Math.abs(c*o),f=Math.abs(l*s)+Math.abs(c*a);return n||(n=new ml(0,0,0,0)),n.x=d*r+u*o+i[4]-m,n.y=d*s+u*a+i[5]-f,n.width=m+m,n.height=f+f,n}toContext(e){if(this.identity)return;let n=this.elements;e.transform(n[0],n[1],n[2],n[3],n[4],n[5])}static flyweight(e){return AW.instance.setElements(e.elements)}static updateTransformMatrix(e,n,i,r,s,o,a){let[l,c]=[0,0],d=n,u=i,m,f;d===1&&u===1?(m=0,f=0):(m=a?.scalingCenterX==null?l:a?.scalingCenterX,f=a?.scalingCenterY==null?c:a?.scalingCenterY);let _=r,x=Math.cos(_),D=Math.sin(_),E,M;_===0?(E=0,M=0):(E=a?.rotationCenterX==null?l:a?.rotationCenterX,M=a?.rotationCenterY==null?c:a?.rotationCenterY);let I=s,z=o,G=m*(1-d)-E,A=f*(1-u)-M;return e.setElements([x*d,D*d,-D*u,x*u,x*G-D*A+E+I,D*G+x*A+M+z]),e}static fromContext(e){let n=e.getTransform();return new AW([n.a,n.b,n.c,n.d,n.e,n.f])}};H7e.instance=new H7e;g_=H7e,Pft=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(Pft||{}),Rft=t=>{t.parent&&(t.parent.dirtyZIndex=!0),t.zIndexChanged()},rv=(()=>{let t=class Fft extends vft{constructor({isVirtual:n,tag:i}={}){super(),this.serialNumber=Fft._nextSerialNumber++,this.id=kC(this),this.isContainerNode=!1,this._virtualChildren=[],this._children=[],this.childSet={},this.matrix=new g_,this.inverseMatrix=new g_,this.dirtyTransform=!1,this.scalingX=1,this.scalingY=1,this.scalingCenterX=null,this.scalingCenterY=null,this.rotationCenterX=null,this.rotationCenterY=null,this.rotation=0,this.translationX=0,this.translationY=0,this.visible=!0,this.dirtyZIndex=!1,this.zIndex=0,this.zIndexSubOrder=void 0,this.pointerEvents=0,this.isVirtual=n??!1,this.tag=i??NaN}get datum(){var n,i;return(i=this._datum)!=null?i:(n=this._parent)==null?void 0:n.datum}get previousDatum(){return this._previousDatum}set datum(n){this._datum!==n&&(this._previousDatum=this._datum),this._datum=n}_setLayerManager(n){this._layerManager=n,this._debug=n?.debug;for(let i of this._children)i._setLayerManager(n);for(let i of this._virtualChildren)i._setLayerManager(n)}get layerManager(){return this._layerManager}get parent(){return this._parent}get children(){if(this._virtualChildren.length===0)return this._children;let n=[...this._children];for(let i of this._virtualChildren)n.push(...i.children);return n}get virtualChildren(){return this._virtualChildren}hasVirtualChildren(){return this._virtualChildren.length>0}setProperties(n,i){let r=i??Object.keys(n);for(let s of r)this[s]=n[s];return this}append(n){Array.isArray(n)||(n=[n]);for(let i of n){if(i.parent)throw new Error(`${i} already belongs to another parent: ${i.parent}.`);if(i.layerManager)throw new Error(`${i} already belongs to a scene: ${i.layerManager}.`);if(this.childSet[i.id])throw new Error(`Duplicate ${i.constructor.name} node: ${i}`);i.isVirtual?this._virtualChildren.push(i):this._children.push(i),this.childSet[i.id]=!0,i._parent=this,i._setLayerManager(this.layerManager)}this.dirtyZIndex=!0,this.markDirty(this,3)}appendChild(n){return this.append(n),n}removeChild(n){let i=()=>{throw new Error("The node to be removed is not a child of this node.")};if(n.parent!==this&&i(),n.isVirtual){let r=this._virtualChildren.indexOf(n);r<0&&i(),this._virtualChildren.splice(r,1)}else{let r=this._children.indexOf(n);r<0&&i(),this._children.splice(r,1)}return delete this.childSet[n.id],n._parent=void 0,n._setLayerManager(),this.dirtyZIndex=!0,this.markDirty(n,3),n}calculateCumulativeMatrix(){this.computeTransformMatrix();let n=g_.flyweight(this.matrix),i=this.parent;for(;i;)i.computeTransformMatrix(),n.preMultiplySelf(i.matrix),i=i.parent;return n}transformPoint(n,i){return this.calculateCumulativeMatrix().invertSelf().transformPoint(n,i)}inverseTransformPoint(n,i){return this.calculateCumulativeMatrix().transformPoint(n,i)}transformBBox(n){return this.calculateCumulativeMatrix().invertSelf().transformBBox(n)}inverseTransformBBox(n){return this.calculateCumulativeMatrix().transformBBox(n)}markDirtyTransform(){this.dirtyTransform=!0,this.markDirty(this,3)}containsPoint(n,i){return!1}pickNode(n,i){var r;if(!this.visible||this.pointerEvents===1||!this.containsPoint(n,i))return;let s=this.children;if(s.length>1e3)for(let o=s.length-1;o>=0;o--){let a=s[o],c=((r=a.computeTransformedBBox())==null?void 0:r.containsPoint(n,i))?a.pickNode(n,i):void 0;if(c)return c}else if(s.length)for(let o=s.length-1;o>=0;o--){let a=s[o].pickNode(n,i);if(a)return a}else if(!this.isContainerNode)return this}findNodes(n){let i=n(this)?[this]:[];for(let r of this.children){let s=r.findNodes(n);s&&i.push(...s)}return i}computeBBox(){}computeTransformedBBox(){let n=this.computeBBox();if(!n)return;this.computeTransformMatrix();let i=g_.flyweight(this.matrix),r=this.parent;for(;r;)r.computeTransformMatrix(),i.preMultiplySelf(r.matrix),r=r.parent;return i.transformBBox(n,n),n}computeTransformMatrix(){if(!this.dirtyTransform)return;let{matrix:n,scalingX:i,scalingY:r,rotation:s,translationX:o,translationY:a,scalingCenterX:l,scalingCenterY:c,rotationCenterX:d,rotationCenterY:u}=this;g_.updateTransformMatrix(n,i,r,s,o,a,{scalingCenterX:l,scalingCenterY:c,rotationCenterX:d,rotationCenterY:u}),n.inverseTo(this.inverseMatrix),this.dirtyTransform=!1}render(n){let{stats:i}=n;this._dirty=0,i&&i.nodesRendered++}clearBBox(n){let i=this.computeBBox();if(i==null)return;let{x:r,y:s,width:o,height:a}=i,l=this.transformPoint(r,s),c=this.transformPoint(r+o,s+a);n.clearRect(l.x,l.y,c.x-l.x,c.y-l.y)}markDirty(n,i=1,r=i){this._dirty>i||this._dirty===i&&i===r||(this._dirty=i,this.parent?this.parent.markDirty(this,r):this.layerManager&&this.layerManager.markDirty())}get dirty(){return this._dirty}markClean(n){let{force:i=!1,recursive:r=!0}=n??{};if(!(this._dirty===0&&!i)){if(this._dirty=0,r!==!1)for(let s of this._virtualChildren)s.markClean({force:i});if(r===!0)for(let s of this._children)s.markClean({force:i})}}visibilityChanged(){}get nodeCount(){let n=1,i=this._dirty>=0||this.dirtyTransform?1:0,r=this.visible?1:0,s=o=>{let{count:a,visibleCount:l,dirtyCount:c}=o.nodeCount;n+=a,r+=l,i+=c};for(let o of this._children)s(o);for(let o of this._virtualChildren)s(o);return{count:n,visibleCount:r,dirtyCount:i}}zIndexChanged(){}};return t._nextSerialNumber=0,t})();Be([js({type:"transform"})],rv.prototype,"scalingX",2);Be([js({type:"transform"})],rv.prototype,"scalingY",2);Be([js({type:"transform"})],rv.prototype,"scalingCenterX",2);Be([js({type:"transform"})],rv.prototype,"scalingCenterY",2);Be([js({type:"transform"})],rv.prototype,"rotationCenterX",2);Be([js({type:"transform"})],rv.prototype,"rotationCenterY",2);Be([js({type:"transform"})],rv.prototype,"rotation",2);Be([js({type:"transform"})],rv.prototype,"translationX",2);Be([js({type:"transform"})],rv.prototype,"translationY",2);Be([js({redraw:3,changeCb:t=>t.visibilityChanged()})],rv.prototype,"visible",2);Be([js({redraw:1,changeCb:Rft})],rv.prototype,"zIndex",2);Be([js({redraw:1,changeCb:Rft})],rv.prototype,"zIndexSubOrder",2);IF=rv;Pwe=class G7e{constructor(e){this._enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0;let{document:n,window:i,width:r=600,height:s=300,domLayer:o=!1,zIndex:a=0,name:l=void 0,overrideDevicePixelRatio:c=void 0}=e;this.document=n,this.window=i,G7e.document=n,this.element=n.createElement("canvas"),this.element.width=r,this.element.height=s,this.realContext=this.element.getContext("2d"),this.imageSource=this.realContext.canvas;let{style:d}=this.element;d.userSelect="none",d.display="block",o&&(d.position="absolute",d.zIndex=String(a),d.top="0",d.left="0",d.pointerEvents="none",d.opacity="1",l&&(this.element.id=l)),this.context=this.setPixelRatio(c),this.resize(r,s)}set container(e){this._container!==e&&(this.remove(),e&&e.appendChild(this.element),this._container=e)}get container(){return this._container}set enabled(e){this.element.style.display=e?"block":"none",this._enabled=!!e}get enabled(){return this._enabled}remove(){let{parentNode:e}=this.element;e?.removeChild(this.element)}destroy(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)}snapshot(){}clear(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}toImage(){let e=this.document.createElement("img");return e.src=this.getDataURL(),e}getDataURL(e){return this.element.toDataURL(e)}download(e,n="image/png"){e=(e??"").trim()||"image";let i=this.getDataURL(n),r=this.document,s=r.createElement("a");s.href=i,s.download=e,s.style.display="none",r.body.appendChild(s),s.click(),r.body.removeChild(s)}get pixelRatio(){return this._pixelRatio}setPixelRatio(e){let n=e??this.window.devicePixelRatio;return Lft()&&(n=1),this._pixelRatio=n,G7e.overrideScale(this.realContext,n)}set pixelated(e){this.element.style.imageRendering=e?"pixelated":"auto"}get pixelated(){return this.element.style.imageRendering==="pixelated"}get width(){return this._width}get height(){return this._height}resize(e,n){if(!(e>0&&n>0))return;let{element:i,context:r,pixelRatio:s}=this;i.width=Math.round(e*s),i.height=Math.round(n*s),i.style.width=e+"px",i.style.height=n+"px",r.resetTransform(),this._width=e,this._height=n}static get textMeasuringContext(){if(this._textMeasuringContext)return this._textMeasuringContext;let e=this.document.createElement("canvas");return this._textMeasuringContext=e.getContext("2d"),this._textMeasuringContext}static get svgText(){if(this._svgText)return this._svgText;let e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"svg");n.setAttribute("width","100"),n.setAttribute("height","100"),n.classList?n.classList.add("text-measuring-svg"):n.setAttribute("class","text-measuring-svg"),n.style.position="absolute",n.style.top="-1000px",n.style.visibility="hidden";let i=document.createElementNS(e,"text");return i.setAttribute("x","0"),i.setAttribute("y","30"),i.setAttribute("text","black"),n.appendChild(i),document.body.appendChild(n),this._svgText=i,i}static get has(){if(this._has)return this._has;let e=typeof navigator>"u"||navigator.userAgent.indexOf("Chrome")>-1,n=typeof navigator<"u"&&navigator.userAgent.indexOf("Firefox")>-1,i=!e&&typeof navigator<"u"&&navigator.userAgent.indexOf("Safari")>-1;return this._has=Object.freeze({textMetrics:this.textMeasuringContext.measureText("test").actualBoundingBoxDescent!==void 0&&!n&&!i,getTransform:this.textMeasuringContext.getTransform!==void 0}),this._has}static measureText(e,n,i,r){let s=this.textMeasuringContext;return s.font=n,s.textBaseline=i,s.textAlign=r,s.measureText(e)}static getTextSize(e,n){if(this.has.textMetrics){let i=this.textMeasuringContext;i.font=n;let r=i.measureText(e);return{width:r.width,height:r.actualBoundingBoxAscent+r.actualBoundingBoxDescent}}else return this.measureSvgText(e,n)}static measureSvgText(e,n){let i=this.textSizeCache,r=i[n];if(r){let l=r[e];if(l)return l}else i[n]={};let s=this.svgText;s.style.font=n,s.textContent=e;let o=s.getBBox(),a={width:o.width,height:o.height};return i[n][e]=a,a}static overrideScale(e,n){let i=0,r={save(){this.$save(),i++},restore(){if(i>0)this.$restore(),i--;else throw new Error("AG Charts - Unable to restore() past depth 0")},setTransform(s,o,a,l,c,d){typeof s=="object"?this.$setTransform(s):this.$setTransform(s*n,o*n,a*n,l*n,c*n,d*n)},resetTransform(){this.$setTransform(n,0,0,n,0,0)},verifyDepthZero(){if(i!==0)throw new Error("AG Charts - Save/restore depth is non-zero: "+i)}};for(let s in r)Object.hasOwn(r,s)&&(e["$"+s]||(e["$"+s]=e[s]),e[s]=r[s]);return e}};Pwe.document=globalThis.document;Pwe.textSizeCache={};dm=Pwe,Eki=class{constructor(){this.stops=[]}},Mki=class extends Eki{constructor(){super(...arguments),this.angle=0}createGradient(t,e){let{stops:i,angle:r}=this,s=k2(tv(r+90)),o=Math.cos(s),a=Math.sin(s),l=e.width,c=e.height,d=e.x+l*.5,u=e.y+c*.5;if(l>0&&c>0){let m=Math.sqrt(c*c+l*l)/2,f=Math.atan2(c,l),_;s<Math.PI/2?_=s:s<Math.PI?_=Math.PI-s:s<3*Math.PI/2?_=s-Math.PI:_=2*Math.PI-s;let x=m*Math.abs(Math.cos(_-f)),D=t.createLinearGradient(d+o*x,u+a*x,d-o*x,u-a*x);return i.forEach(E=>{D.addColorStop(E.offset,E.color)}),D}return"black"}},kki=/^linear-gradient\((.*?)deg,\s*(.*?)\s*\)$/i,sv=class vC extends IF{constructor(){super(...arguments),this.fillOpacity=1,this.strokeOpacity=1,this.fill=vC.defaultStyles.fill,this.stroke=vC.defaultStyles.stroke,this.strokeWidth=vC.defaultStyles.strokeWidth,this.lineDash=vC.defaultStyles.lineDash,this.lineDashOffset=vC.defaultStyles.lineDashOffset,this.lineCap=vC.defaultStyles.lineCap,this.lineJoin=vC.defaultStyles.lineJoin,this.opacity=vC.defaultStyles.opacity,this.fillShadow=vC.defaultStyles.fillShadow}restoreOwnStyles(){let e=this.constructor.defaultStyles,n=Object.getOwnPropertyNames(e);for(let i=0,r=n.length;i<r;i++){let s=n[i];this[s]=e[s]}}updateGradient(){let{fill:e}=this,n;if(e?.startsWith("linear-gradient")&&(n=kki.exec(e))){let i=parseFloat(n[1]),r=[],s=n[2],o=/(#[0-9a-f]+)|(rgba?\(.+?\))|([a-z]+)/gi,a;for(;a=o.exec(s);)r.push(a[0]);this.gradient=new Mki,this.gradient.angle=i,this.gradient.stops=r.map((l,c)=>({offset:c/(r.length-1),color:l}))}else this.gradient=void 0}align(e,n){var i,r,s;let o=(s=(r=(i=this.layerManager)==null?void 0:i.canvas)==null?void 0:r.pixelRatio)!=null?s:1,a=Math.round(e*o)/o;return n==null?a:n===0?0:n<1?Math.ceil(n*o)/o:Math.round((n+e)*o)/o-a}fillStroke(e){this.renderFill(e),this.renderStroke(e)}renderFill(e){if(this.fill){let{globalAlpha:n}=e;this.applyFill(e),this.applyFillAlpha(e),this.applyShadow(e),e.fill(),e.globalAlpha=n}e.shadowColor="rgba(0, 0, 0, 0)"}applyFill(e){this.gradient?e.fillStyle=this.gradient.createGradient(e,this.computeBBox()):e.fillStyle=this.fill}applyFillAlpha(e){let{globalAlpha:n}=e;e.globalAlpha=n*this.opacity*this.fillOpacity}applyShadow(e){var n,i;let r=(i=(n=this.layerManager)==null?void 0:n.canvas.pixelRatio)!=null?i:1,s=this.fillShadow;s?.enabled&&(e.shadowColor=s.color,e.shadowOffsetX=s.xOffset*r,e.shadowOffsetY=s.yOffset*r,e.shadowBlur=s.blur*r)}renderStroke(e){if(this.stroke&&this.strokeWidth){let{globalAlpha:n}=e;e.strokeStyle=this.stroke,e.globalAlpha=n*this.opacity*this.strokeOpacity,e.lineWidth=this.strokeWidth,this.lineDash&&e.setLineDash(this.lineDash),this.lineDashOffset&&(e.lineDashOffset=this.lineDashOffset),this.lineCap&&(e.lineCap=this.lineCap),this.lineJoin&&(e.lineJoin=this.lineJoin),e.stroke(),e.globalAlpha=n}}containsPoint(e,n){return this.isPointInPath(e,n)}};sv.defaultStyles=Object.assign({},{fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0});Be([js({redraw:2})],sv.prototype,"fillOpacity",2);Be([js({redraw:2})],sv.prototype,"strokeOpacity",2);Be([js({redraw:2,changeCb:t=>t.updateGradient()})],sv.prototype,"fill",2);Be([js({redraw:2})],sv.prototype,"stroke",2);Be([js({redraw:2})],sv.prototype,"strokeWidth",2);Be([js({redraw:2})],sv.prototype,"lineDash",2);Be([js({redraw:2})],sv.prototype,"lineDashOffset",2);Be([js({redraw:2})],sv.prototype,"lineCap",2);Be([js({redraw:2})],sv.prototype,"lineJoin",2);Be([js({redraw:2,convertor:t=>Math.min(1,Math.max(0,t))})],sv.prototype,"opacity",2);Be([js({redraw:2,checkDirtyOnAssignment:!0})],sv.prototype,"fillShadow",2);U6=sv,W7e="\u2026";P2=class X4 extends U6{constructor(){super(...arguments),this.x=0,this.y=0,this.lines=[],this.text=void 0,this._dirtyFont=!0,this.fontSize=10,this.fontFamily="sans-serif",this.textAlign=X4.defaultStyles.textAlign,this.textBaseline=X4.defaultStyles.textBaseline,this.lineHeight=void 0}_setLines(){this.lines=Bft(this.text)}get font(){return(this._font==null||this._dirtyFont)&&(this._dirtyFont=!1,this._font=eS(this)),this._font}computeBBox(){return dm.has.textMetrics?Oft(this.lines,this.x,this.y,this):Nft(this.lines,this.x,this.y,this)}getLineHeight(e){var n,i;if(this.lineHeight)return this.lineHeight;if(dm.has.textMetrics){let r=dm.measureText(e,this.font,this.textBaseline,this.textAlign);return((n=r.fontBoundingBoxAscent)!=null?n:r.emHeightAscent)+((i=r.fontBoundingBoxDescent)!=null?i:r.emHeightDescent)}return dm.getTextSize(e,this.font).height}isPointInPath(e,n){let i=this.transformPoint(e,n),r=this.computeBBox();return r?r.containsPoint(i.x,i.y):!1}render(e){let{ctx:n,forceRender:i,stats:r}=e;if(this.dirty===0&&!i){r&&(r.nodesSkipped+=this.nodeCount.count);return}if(!this.lines.length||!this.layerManager){r&&(r.nodesSkipped+=this.nodeCount.count);return}this.computeTransformMatrix(),this.matrix.toContext(n);let{fill:s,stroke:o,strokeWidth:a}=this;n.font=this.font,n.textAlign=this.textAlign,n.textBaseline=this.textBaseline;let l=this.layerManager.canvas.pixelRatio||1,{globalAlpha:c}=n;if(s){n.fillStyle=s,n.globalAlpha=c*this.opacity*this.fillOpacity;let{fillShadow:d}=this;d?.enabled&&(n.shadowColor=d.color,n.shadowOffsetX=d.xOffset*l,n.shadowOffsetY=d.yOffset*l,n.shadowBlur=d.blur*l),this.renderLines((u,m,f)=>n.fillText(u,m,f))}if(o&&a){n.strokeStyle=o,n.lineWidth=a,n.globalAlpha=c*this.opacity*this.strokeOpacity;let{lineDash:d,lineDashOffset:u,lineCap:m,lineJoin:f}=this;d&&n.setLineDash(d),u&&(n.lineDashOffset=u),m&&(n.lineCap=m),f&&(n.lineJoin=f),this.renderLines((_,x,D)=>n.strokeText(_,x,D))}super.render(e)}renderLines(e){let{lines:n,x:i,y:r}=this,s=this.lines.map(l=>this.getLineHeight(l)),a=-(s.reduce((l,c)=>l+c,0)-s[0])*Vft(this.textBaseline);for(let l=0;l<n.length;l++)e(n[l],i,r+a),a+=s[l]}static wrapLines(e,n,i,r,s,o){let a=o!=="hide",l=eS(r),c=Iki(l),d=e.split(/\r?\n/g);if(d.length===0)return{lines:void 0,truncated:!1};if(s==="never"){let{text:_,truncated:x}=X4.truncateLine(d[0],n,c,a?"auto":"never");return{lines:_!=null?[_]:void 0,truncated:x}}let u=[],m=0,f=!1;for(let _ of d){let x=X4.wrapLine(_,n,i,c,r,s,m,a);if(x==null)return{lines:void 0,truncated:!1};if(u.push(...x.result),m=x.cumulativeHeight,x.truncated){f=!0;break}}return{lines:u,truncated:f}}static wrap(e,n,i,r,s,o="ellipsis"){let{lines:a,truncated:l}=X4.wrapLines(e,n,i,r,s,o);return{text:a!=null?a.join(`
`).trim():"",truncated:l}}static wrapLine(e,n,i,r,s,o,a,l){if(e=e.trim(),!e)return{result:[],truncated:!1,cumulativeHeight:a};let c=r.size(e);if(c.width<=n)return{result:[e],truncated:!1,cumulativeHeight:a+c.height};if(c.height>i||r.width("W")>n)return l?{result:[],truncated:!0,cumulativeHeight:a}:void 0;let d=e.split(/\s+/g),u=X4.wrapLineSequentially(d,n,i,r,s,o,a,l);if(u==null)return;a=u.cumulativeHeight;let{lines:m}=u;if(!(u.wordsBrokenOrTruncated||u.linesTruncated)){let _=u.lines.length,x=X4.wrapLineBalanced(d,n,r,_);x.length===m.length&&(m=x)}return{result:m.map(_=>_.join(" ")),truncated:u.linesTruncated,cumulativeHeight:a}}static breakWord(e,n,i,r,s){let o=f=>X4.punctuationMarks.includes(e[f]),a=r?s.width("-"):0,l=[],c=0,d=0;for(let f=0;f<e.length;f++){let _=e[f],x=s.width(_),D=d===0?n:i;c+x+a>D&&(l.push(f),c=0,d++),c+=x}let u=[],m=0;for(let f of l){let _=e.substring(m,f);r&&_.length>0&&!o(f-1)&&!o(f)&&(_+="-"),u.push(_),m=f}return u.push(e.substring(m)),u}static truncateLine(e,n,i,r){e=e.trimEnd();let s=i.width(e);if(s>n&&r==="never")return{text:void 0,truncated:!1};if(s<=n&&r!=="force")return{text:e,truncated:!1};let o=i.width(W7e),a=e,l=s;for(;a.length>0&&l+o>n;)a=a.slice(0,-1).trimEnd(),l=i.width(a);return l+o<=n?{text:`${a}${W7e}`,truncated:!0}:{text:void 0,truncated:!1}}static wrapLineSequentially(e,n,i,r,s,o,a,l){let{fontSize:c=0,lineHeight:d=c*X4.defaultLineHeightRatio}=s,u=o==="always"||o==="hyphenate",m=o==="hyphenate",f=r.width(" "),_=!1,x=!1,D=[],E=[],M=0,I=()=>({lines:D,linesTruncated:x,wordsBrokenOrTruncated:_,cumulativeHeight:a}),z=()=>{if(!l)return;let A=E.join(" "),{text:Y}=X4.truncateLine(A,n,r,"force");if(Y!=null)return E.splice(0,E.length,Y),x=!0,I()},G=()=>{let A=a+d;return A>=i?!1:(E=[],M=0,a=A,D.push(E),!0)};if(!G())return z();for(let A=0;A<e.length;A++){let Y=e[A],X=r.width(Y),ne=E.length===0?0:f,pe=M+ne+X;if(pe<=n){E.push(Y),M=pe;continue}if(X<=n){if(!G())return z();E.push(Y),M=X;continue}if(_=!0,u){let ce=n-M-ne,ie=X4.breakWord(Y,ce,n,m,r);for(let le=0;le<ie.length;le++){let Se=ie[le];if(Se&&E.push(Se),le===ie.length-1)M=r.width(Se);else if(!G())return z()}}else if(l){if(!G())return z();let{text:ce}=X4.truncateLine(Y,n,r,"force");if(ce==null)return;E.push(ce),A<e.length-1&&(x=!0);break}else return}return I()}static wrapLineBalanced(e,n,i,r){let s=e.reduce((f,_)=>f+i.width(_),0),o=i.width(" "),a=o*(e.length-r-2),l=(s+a)/r,c=[],d=[],u=i.width(e[0]),m=!0;for(let f of e){let _=i.width(f);if(m){d=[],d.push(f),u=_,m=!1,c.push(d);continue}let x=u+o+_;x<=l?(d.push(f),u=x):x<=n?(d.push(f),m=!0):(d=[f],u=_,c.push(d))}return c}setFont(e){this.fontFamily=e.fontFamily,this.fontSize=e.fontSize,this.fontStyle=e.fontStyle,this.fontWeight=e.fontWeight}setAlign(e){this.textAlign=e.textAlign,this.textBaseline=e.textBaseline}};P2.className="Text";P2.defaultLineHeightRatio=1.15;P2.defaultStyles=Object.assign({},U6.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"});P2.ellipsis=W7e;P2.punctuationMarks=[".",",","-",":",";","!","?","'",'"',"(",")"];Be([js({redraw:3})],P2.prototype,"x",2);Be([js({redraw:3})],P2.prototype,"y",2);Be([js({redraw:3,changeCb:t=>t._setLines()})],P2.prototype,"text",2);Be([Une()],P2.prototype,"fontStyle",2);Be([Une()],P2.prototype,"fontWeight",2);Be([Une()],P2.prototype,"fontSize",2);Be([Une()],P2.prototype,"fontFamily",2);Be([js({redraw:3})],P2.prototype,"textAlign",2);Be([js({redraw:3})],P2.prototype,"textBaseline",2);Be([js({redraw:3})],P2.prototype,"lineHeight",2);Wu=P2;Vp="ag-chart-tooltip",fmt="ag-chart-dark-tooltip",Fki=`
.${Vp} {
    transition: transform 0.1s ease;
    max-width: 100%;
    position: fixed;
    left: 0px;
    top: 0px;
    z-index: 99999;
    font: 12px Verdana, sans-serif;
    color: rgb(70, 70, 70);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.${Vp}-wrap-always {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: none;
}

.${Vp}-wrap-hyphenate {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.${Vp}-wrap-on-space {
    overflow-wrap: normal;
    word-break: normal;
}

.${Vp}-wrap-never {
    white-space: pre;
    text-overflow: ellipsis;
}

.${Vp}-no-interaction {
    pointer-events: none;
    user-select: none;
}

.${Vp}-no-animation {
    transition: none !important;
}

.${Vp}-hidden {
    visibility: hidden;
}

.${Vp}-title {
    overflow: hidden;
    position: relative;
    padding: 8px 14px;
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
    color: white;
    background-color: #888888;
    z-index: 1;
    text-overflow: inherit;
}

.${Vp}-title:only-child {
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
}

.${Vp}-content {
    overflow: hidden;
    padding: 6px 14px;
    line-height: 1.7em;
    background: white;
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    overflow: hidden;
    text-overflow: inherit;
}

.${Vp}-arrow::before {
    content: "";

    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    border: 5px solid #d9d9d9;

    border-left-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;

    width: 0;
    height: 0;

    margin: 0 auto;
}

.${Vp}-arrow::after {
    content: "";

    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    transform: translateX(-50%);

    border: 5px solid white;

    border-left-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;

    width: 0;
    height: 0;

    margin: 0 auto;
}

.${Vp}.${fmt} {
    color: white;
    background: #15181c;
}

.${Vp}.${fmt} .${Vp}-content {
    border-color: rgba(255, 255, 255, 0.15);
}

.ag-chart-wrapper {
    box-sizing: border-box;
    overflow: hidden;
}
`;MU=class extends A2{constructor(){super(...arguments),this.type="pointer",this.xOffset=0,this.yOffset=0}};Be([ut(Gm(["pointer","node"],"a position type"))],MU.prototype,"type",2);Be([ut(lh)],MU.prototype,"xOffset",2);Be([ut(lh)],MU.prototype,"yOffset",2);wM=(()=>{let t=class U7e{constructor(n,i,r,s){this.enableInteraction=!1,this.enabled=!0,this.showArrow=void 0,this.class=void 0,this.lastClass=void 0,this.delay=0,this.range="nearest",this.wrapping="hyphenate",this.lastVisibilityChange=Date.now(),this.position=new MU,this.showTimeout=0,this._showArrow=!0,this.tooltipRoot=s,this.window=r;let o=i.createElement("div");if(this.element=this.tooltipRoot.appendChild(o),this.element.classList.add(Vp),this.canvasElement=n,typeof IntersectionObserver<"u"){let a=new IntersectionObserver(l=>{for(let c of l)c.target===this.canvasElement&&c.intersectionRatio===0&&this.toggle(!1)},{root:this.tooltipRoot});a.observe(this.canvasElement),this.observer=a}U7e.tooltipDocuments.indexOf(i)<0&&(Rwe(i,Fki),U7e.tooltipDocuments.push(i))}destroy(){let{parentNode:n}=this.element;n&&n.removeChild(this.element),this.observer&&this.observer.unobserve(this.canvasElement)}isVisible(){let{element:n}=this;return!n.classList.contains(Vp+"-hidden")}updateClass(n,i,r=!0){let{element:s,class:o,lastClass:a,enableInteraction:l,lastVisibilityChange:c}=this,d=this.isVisible(),u=!!n,m=1/0;if(d!==u){let E=Date.now();m=E-c,this.lastVisibilityChange=E}let f=(E,M)=>{let I=`${Vp}-${E}`;M?s.classList.add(I):s.classList.remove(I)},_=100,x=5,D=!d&&u&&m>_;m>x&&f("no-animation",D),f("no-interaction",!l),f("hidden",!n),f("arrow",!!i),this.updateWrapping(),r?(o!==a&&(a&&s.classList.remove(a),o&&s.classList.add(o)),this.lastClass=o):(a&&s.classList.remove(a),this.lastClass=void 0)}updateWrapping(){let{element:n,wrapping:i}=this,r={always:!1,hyphenate:!1,"on-space":!1,never:!1};r[i]=!0,Object.entries(r).forEach(([s,o])=>{n.classList.toggle(`${Vp}-wrap-${s}`,o)})}show(n,i,r=!1){var s,o,a,l,c,d,u;let{element:m,canvasElement:f}=this;if(i!==void 0)m.innerHTML=i;else if(!m.innerHTML){this.toggle(!1);return}let _=(ie,le,Se)=>Math.max(Math.min(le,Se),ie),x=(o=(s=n.position)==null?void 0:s.xOffset)!=null?o:0,D=(l=(a=n.position)==null?void 0:a.yOffset)!=null?l:0,E=f.getBoundingClientRect(),M=E.left+n.offsetX-m.clientWidth/2+x,I=E.top+n.offsetY-m.clientHeight-8+D,z=this.getWindowBoundingBox(),G=z.x+z.width-m.clientWidth-1,A=z.y+z.height-m.clientHeight,Y=_(z.x,M,G),X=_(z.y,I,A),pe=!(Y!==M||X!==I)&&!x&&!D,ce=(d=(c=n.showArrow)!=null?c:this.showArrow)!=null?d:pe;if(this.updateShowArrow(ce),m.style.transform=`translate(${Math.round(Y)}px, ${Math.round(X)}px)`,this.enableInteraction=(u=n.enableInteraction)!=null?u:!1,this.delay>0&&!r){this.toggle(!1),this.showTimeout=this.window.setTimeout(()=>{this.toggle(!0,n.addCustomClass)},this.delay);return}this.toggle(!0,n.addCustomClass)}getWindowBoundingBox(){return new ml(0,0,this.window.innerWidth,this.window.innerHeight)}toggle(n,i){n||this.window.clearTimeout(this.showTimeout),this.updateClass(n,this._showArrow,i)}pointerLeftOntoTooltip(n){var i;if(!this.enableInteraction)return!1;let r=(i=n.sourceEvent.relatedTarget)==null?void 0:i.classList,o=!!["","-title","-content"].filter(a=>r?.contains(`${Vp}${a}`));return r!==void 0&&o}updateShowArrow(n){this._showArrow=n}};return t.tooltipDocuments=[],t})();Be([ut(Ua)],wM.prototype,"enabled",2);Be([ut(Ua,{optional:!0})],wM.prototype,"showArrow",2);Be([ut(Ps,{optional:!0})],wM.prototype,"class",2);Be([ut(es)],wM.prototype,"delay",2);Be([ut(Awe)],wM.prototype,"range",2);Be([ut(Wne)],wM.prototype,"wrapping",2);zft=wM,Hm=(()=>{let t=class extends A2{constructor(){super(...arguments),this.id=kC(this),this.node=new Wu().setProperties({textAlign:"center",pointerEvents:1}),this.enabled=!1,this.textAlign="center",this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always",this.truncated=!1}registerInteraction(e){return e.interactionManager.addListener("hover",n=>this.handleMouseMove(e,n))}computeTextWrap(e,n){var i,r;let{text:s,wrapping:o}=this,a=Math.min((i=this.maxWidth)!=null?i:1/0,e),l=(r=this.maxHeight)!=null?r:n;if(!isFinite(a)&&!isFinite(l)){this.node.text=s;return}let{text:c,truncated:d}=Wu.wrap(s??"",a,l,this,o);this.node.text=c,this.truncated=d}handleMouseMove(e,n){if(!this.enabled)return;let i=this.node.computeBBox(),{pageX:r,pageY:s,offsetX:o,offsetY:a}=n;if(!(this.node.visible&&i.containsPoint(o,a))){e.tooltipManager.removeTooltip(this.id);return}if(n.consume(),!this.truncated){e.tooltipManager.removeTooltip(this.id);return}e.tooltipManager.updateTooltip(this.id,{pageX:r,pageY:s,offsetX:o,offsetY:a,event:n,showArrow:!1,addCustomClass:!1},rU({content:this.text}))}};return t.SMALL_PADDING=10,t.LARGE_PADDING=20,t})();Be([ut(Ua)],Hm.prototype,"enabled",2);Be([ut(Ps,{optional:!0}),Uu("node")],Hm.prototype,"text",2);Be([ut(Tft,{optional:!0}),Uu("node")],Hm.prototype,"textAlign",2);Be([ut(iS,{optional:!0}),Uu("node")],Hm.prototype,"fontStyle",2);Be([ut(nS,{optional:!0}),Uu("node")],Hm.prototype,"fontWeight",2);Be([ut(es),Uu("node")],Hm.prototype,"fontSize",2);Be([ut(Ps),Uu("node")],Hm.prototype,"fontFamily",2);Be([ut(Jc,{optional:!0}),Uu("node","fill")],Hm.prototype,"color",2);Be([ut(es,{optional:!0})],Hm.prototype,"spacing",2);Be([ut(es,{optional:!0})],Hm.prototype,"lineHeight",2);Be([ut(es,{optional:!0})],Hm.prototype,"maxWidth",2);Be([ut(es,{optional:!0})],Hm.prototype,"maxHeight",2);Be([ut(Wne)],Hm.prototype,"wrapping",2);__=class{constructor(){this.enabled=!1,this.spacing=Hm.SMALL_PADDING,this.fontSize=10,this.fontFamily="sans-serif",this.wrapping="always"}};Be([ut(Ua)],__.prototype,"enabled",2);Be([ut(Ps,{optional:!0})],__.prototype,"text",2);Be([ut(es,{optional:!0})],__.prototype,"spacing",2);Be([ut(iS,{optional:!0})],__.prototype,"fontStyle",2);Be([ut(nS,{optional:!0})],__.prototype,"fontWeight",2);Be([ut(es)],__.prototype,"fontSize",2);Be([ut(Ps)],__.prototype,"fontFamily",2);Be([ut(Jc,{optional:!0})],__.prototype,"color",2);Be([ut(Wne)],__.prototype,"wrapping",2);Be([ut(MC,{optional:!0})],__.prototype,"formatter",2);sU={constructors:{},constructedArrays:new WeakMap};gmt={constructors:{"axes[].title":__},allowedTypes:{"legend.pagination.marker.shape":["primitive","function"],"axis[].tick.count":["primitive","class-instance"]}};rS=(()=>{let t=class j7e{constructor(n,i){this.invalid=!0,this.nice=!1,this.interval=void 0,this.tickCount=j7e.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=[],this.defaultClampMode="raw",this.domain=n,this.range=i}static is(n){return n instanceof j7e}transform(n){return n}transformInvert(n){return n}calcBandwidth(n=1){let i=this.getDomain(),r=Math.max(...this.range),s=Math.abs(i[1]-i[0])/n+1,o=Math.floor(r),a=Math.min(s,o);return r/Math.max(1,a)}fromDomain(n){return typeof n=="number"?n:n instanceof Date?n.getTime():NaN}getDomain(){return this.nice&&(this.refresh(),this.niceDomain.length)?this.niceDomain:this.domain}convert(n,i){var r;let s=(r=i?.clampMode)!=null?r:this.defaultClampMode;if(!this.domain||this.domain.length<2)return NaN;this.refresh();let o=this.getDomain().map(m=>this.transform(m)),[a,l]=o,{range:c}=this,[d,u]=c;if(n=this.transform(n),s==="clamped"){let m=Math.min(this.fromDomain(a),this.fromDomain(l)),f=Math.max(this.fromDomain(a),this.fromDomain(l));if(this.fromDomain(n)<m)return d;if(this.fromDomain(n)>f)return u}return a===l?(d+u)/2:n===a?d:n===l?u:d+(this.fromDomain(n)-this.fromDomain(a))/(this.fromDomain(l)-this.fromDomain(a))*(u-d)}invert(n){this.refresh();let i=this.getDomain().map(f=>this.transform(f)),[r,s]=i,{range:o}=this,[a,l]=o,c=a>l,d=c?l:a,u=c?a:l,m;return n<d?c?s:r:n>u?c?r:s:(a===l?m=this.toDomain((this.fromDomain(r)+this.fromDomain(s))/2):m=this.toDomain(this.fromDomain(r)+(n-a)/(l-a)*(this.fromDomain(s)-this.fromDomain(r))),this.transformInvert(m))}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&Ns.warnOnce("Expected update to not invalidate scale"))}getPixelRange(){let n=this.range.slice().sort((i,r)=>i-r);return n[1]-n[0]}isDenseInterval({start:n,stop:i,interval:r,count:s}){let o=i-n,a=this.getPixelRange();return s??(s=o/(typeof r=="number"?r:1)),s>=a?(Ns.warn("the configured interval results in more than 1 item per pixel, ignoring. Supply a larger interval or omit this configuration"),!0):!1}};return t.defaultTickCount=5,t.defaultMaxTickCount=6,t})();Be([j3],rS.prototype,"domain",2);Be([j3],rS.prototype,"range",2);Be([j3],rS.prototype,"nice",2);Be([j3],rS.prototype,"interval",2);Be([j3],rS.prototype,"tickCount",2);Be([j3],rS.prototype,"minTickCount",2);Be([j3],rS.prototype,"maxTickCount",2);lu=rS;Uft=(()=>{let t=class $7e extends IF{constructor(n){var i;super({isVirtual:n?.isVirtual}),this.opts=n,this.opacity=1,this.lastBBox=void 0;let{zIndex:r,zIndexSubOrder:s}=n??{};this.isContainerNode=!0,r!==void 0&&(this.zIndex=r),s!==void 0&&(this.zIndexSubOrder=s),this.name=(i=this.opts)==null?void 0:i.name}zIndexChanged(){var n;this.layer&&((n=this._layerManager)==null||n.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder))}isLayer(){return this.layer!=null}_setLayerManager(n){var i,r;if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw new Error("AG Charts - unable to deregister scene rendering layer!");if(super._setLayerManager(n),n&&((i=this.opts)!=null&&i.layer)){let{zIndex:s,zIndexSubOrder:o,name:a}=(r=this.opts)!=null?r:{},l=()=>this.getComputedOpacity(),c=()=>this.getVisibility();this.layer=n.addLayer({zIndex:s,zIndexSubOrder:o,name:a,getComputedOpacity:l,getVisibility:c})}}getComputedOpacity(){let n=1,i=this;do i instanceof $7e&&(n*=i.opacity);while(i=i.parent);return n}getVisibility(){let n=this,i=this.visible;for(;n=n.parent;)n.visible||(i=n.visible);return i}visibilityChanged(){this.layer&&(this.layer.enabled=this.visible)}markDirty(n,i=1){if(this.isVirtual){super.markDirty(n,i);return}let r=i;(i<2||this.layer!=null)&&(r=1),super.markDirty(n,i,r)}containsPoint(n,i){return!0}computeBBox(){return this.computeTransformMatrix(),$7e.computeBBox(this.children)}computeTransformedBBox(){return this.computeBBox()}render(n){var i,r;let{opts:{name:s=void 0}={},_debug:o=()=>{}}=this,{dirty:a,dirtyZIndex:l,layer:c,children:d,clipRect:u,dirtyTransform:m}=this,{ctx:f,forceRender:_,clipBBox:x}=n,{resized:D,stats:E}=n,M=f.getTransform(),I=a>=2||l||D,z=I,G=!1;for(let ce of d)if(z||(z=ce.layerManager==null&&ce.dirty>=1),G||(G=ce.layerManager!=null&&ce.dirty>=1),z)break;if(s&&o({name:s,group:this,isDirty:I,isChildDirty:z,dirtyTransform:m,renderCtx:n,forceRender:_}),m)_="dirtyTransform";else if(c){let ce=this.computeBBox();(this.lastBBox===void 0||!this.lastBBox.equals(ce))&&(_="dirtyTransform",this.lastBBox=ce)}if(!I&&!z&&!G&&!_){s&&E&&o({name:s,result:"skipping",renderCtx:n,counts:this.nodeCount,group:this}),c&&E&&(E.layersSkipped++,E.nodesSkipped+=this.nodeCount.count),this.markClean({recursive:!1});return}let A=this.visible;if(c){if(f=c.context,f.save(),f.resetTransform(),_!=="dirtyTransform"&&(_=z||l),_&&c.clear(),x){let{width:ce,height:ie,x:le,y:Se}=x;o(()=>({name:s,clipBBox:x,ctxTransform:f.getTransform(),renderCtx:n,group:this})),this.clipCtx(f,le,Se,ce,ie)}f.setTransform(M)}else f.globalAlpha*=this.opacity;if(this.computeTransformMatrix(),this.matrix.toContext(f),u){let{x:ce,y:ie,width:le,height:Se}=u;f.save(),o(()=>({name:s,clipRect:u,ctxTransform:f.getTransform(),renderCtx:n,group:this})),this.clipCtx(f,ce,ie,le,Se),x=this.matrix.transformBBox(u)}let Y=this.hasVirtualChildren();l?(this.sortChildren(d),_!=="dirtyTransform"&&(_=!0)):Y&&this.sortChildren(d);let ne=_!==n.forceRender||x!==n.clipBBox||f!==n.ctx?cs(Ai({},n),{ctx:f,forceRender:_,clipBBox:x}):n,pe=0;for(let ce of d){if(!ce.visible||!A){ce.markClean(),E&&(pe+=ce.nodeCount.count);continue}if(!_&&ce.dirty===0){E&&(pe+=ce.nodeCount.count);continue}f.save(),ce.render(ne),f.restore()}if(E&&(E.nodesSkipped+=pe),super.render(n),u&&f.restore(),Y)for(let ce of this.virtualChildren)ce.markClean({recursive:"virtual"});c&&(E&&E.layersRendered++,f.restore(),_&&c.snapshot(),(r=(i=c.context).verifyDepthZero)==null||r.call(i)),s&&E&&o({name:s,result:"rendered",skipped:pe,renderCtx:n,counts:this.nodeCount,group:this})}sortChildren(n){this.dirtyZIndex=!1,n.sort((i,r)=>{var s,o;return Wft([i.zIndex,...(s=i.zIndexSubOrder)!=null?s:[void 0,void 0],i.serialNumber],[r.zIndex,...(o=r.zIndexSubOrder)!=null?o:[void 0,void 0],r.serialNumber],Gft)})}clipCtx(n,i,r,s,o){n.beginPath(),n.moveTo(i,r),n.lineTo(i+s,r),n.lineTo(i+s,r+o),n.lineTo(i,r+o),n.closePath(),n.clip()}static computeBBox(n){let i=1/0,r=-1/0,s=1/0,o=-1/0;return n.forEach(a=>{if(!a.visible)return;let l=a.computeTransformedBBox();if(!l)return;let c=l.x,d=l.y;c<i&&(i=c),d<s&&(s=d),c+l.width>r&&(r=c+l.width),d+l.height>o&&(o=d+l.height)}),new ml(i,s,r-i,o-s)}setClipRectInGroupCoordinateSpace(n){this.clipRect=n?this.transformBBox(n):void 0}};return t.className="Group",t})();Be([js({redraw:3,convertor:t=>Math.min(1,Math.max(0,t))})],Uft.prototype,"opacity",2);da=Uft,IC=class extends U6{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.startLine=!1,this.endLine=!1,this.isRange=!1,this.restoreOwnStyles()}computeBBox(){return new ml(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)}isPointInPath(t,e){return!1}render(t){var e;let{ctx:n,forceRender:i,stats:r}=t;if(this.dirty===0&&!i){r&&(r.nodesSkipped+=this.nodeCount.count);return}this.computeTransformMatrix(),this.matrix.toContext(n);let{x1:s,y1:o,x2:a,y2:l}=this;s=this.align(s),o=this.align(o),a=this.align(a),l=this.align(l);let{fill:c,opacity:d,isRange:u}=this;if(!!(u&&c)){let{fillOpacity:M}=this;n.fillStyle=c,n.globalAlpha=d*M,n.beginPath(),n.moveTo(s,o),n.lineTo(a,o),n.lineTo(a,l),n.lineTo(s,l),n.closePath(),n.fill()}let{stroke:f,strokeWidth:_,startLine:x,endLine:D}=this;if(!!((x||D)&&f&&_)){let{strokeOpacity:M,lineDash:I,lineDashOffset:z,lineCap:G,lineJoin:A}=this;n.strokeStyle=f,n.globalAlpha=d*M,n.lineWidth=_,I&&n.setLineDash(I),z&&(n.lineDashOffset=z),G&&(n.lineCap=G),A&&(n.lineJoin=A),n.beginPath(),x&&(n.moveTo(s,o),n.lineTo(a,o)),D&&(n.moveTo(a,l),n.lineTo(s,l)),n.stroke()}(e=this.fillShadow)==null||e.markClean(),super.render(t)}};IC.className="Range";IC.defaultStyles=cs(Ai({},U6.defaultStyles),{strokeWidth:1});Be([js({redraw:2})],IC.prototype,"x1",2);Be([js({redraw:2})],IC.prototype,"y1",2);Be([js({redraw:2})],IC.prototype,"x2",2);Be([js({redraw:2})],IC.prototype,"y2",2);Be([js({redraw:2})],IC.prototype,"startLine",2);Be([js({redraw:2})],IC.prototype,"endLine",2);Be([js({redraw:2})],IC.prototype,"isRange",2);U0=class extends A2{constructor(){super(...arguments),this.enabled=!0,this.color="#464646",this.fontSize=12,this.fontFamily="Verdana, sans-serif"}getFont(){return eS(this)}};Be([ut(Ua)],U0.prototype,"enabled",2);Be([ut(Jc)],U0.prototype,"color",2);Be([ut(iS,{optional:!0})],U0.prototype,"fontStyle",2);Be([ut(nS,{optional:!0})],U0.prototype,"fontWeight",2);Be([ut(es)],U0.prototype,"fontSize",2);Be([ut(Ps)],U0.prototype,"fontFamily",2);Be([ut(MC,{optional:!0})],U0.prototype,"formatter",2);jft=(t=>(t[t.SERIES_BACKGROUND_ZINDEX=0]="SERIES_BACKGROUND_ZINDEX",t[t.AXIS_GRID_ZINDEX=1]="AXIS_GRID_ZINDEX",t[t.AXIS_ZINDEX=2]="AXIS_ZINDEX",t[t.SERIES_CROSSLINE_RANGE_ZINDEX=3]="SERIES_CROSSLINE_RANGE_ZINDEX",t[t.SERIES_LAYER_ZINDEX=4]="SERIES_LAYER_ZINDEX",t[t.AXIS_FOREGROUND_ZINDEX=5]="AXIS_FOREGROUND_ZINDEX",t[t.SERIES_CROSSHAIR_ZINDEX=6]="SERIES_CROSSHAIR_ZINDEX",t[t.SERIES_LABEL_ZINDEX=7]="SERIES_LABEL_ZINDEX",t[t.SERIES_CROSSLINE_LINE_ZINDEX=8]="SERIES_CROSSLINE_LINE_ZINDEX",t[t.LEGEND_ZINDEX=9]="LEGEND_ZINDEX",t))(jft||{}),Bki={};db(Bki,{Arc:()=>PC,BBox:()=>ml,BandScale:()=>TC,Caption:()=>Hm,Circle:()=>vF,ContinuousScale:()=>lu,Diamond:()=>f1t,DropShadow:()=>AC,Group:()=>da,HdpiCanvas:()=>dm,Image:()=>AF,Label:()=>U0,Line:()=>l0,LinearGradientFill:()=>$ne,LinearScale:()=>gM,Marker:()=>K6,Node:()=>IF,Path:()=>$6,Path2D:()=>aU,PointerEvents:()=>Pft,Rect:()=>Wg,RedrawType:()=>qw,Scene:()=>n1t,SceneChangeDetection:()=>js,ScenePathChangeDetection:()=>ed,Sector:()=>RC,Selection:()=>Bm,Shape:()=>U6,Square:()=>dU,Text:()=>Wu,Tooltip:()=>zft,Triangle:()=>yF,easing:()=>Fwe,getFont:()=>eS,getMarker:()=>sS,motion:()=>yIi,nearestSquared:()=>Aft,nearestSquaredInContainer:()=>Dki,toRadians:()=>tv,toTooltipHtml:()=>rU});$ft={};db($ft,{FROM_TO_MIXINS:()=>I2,NODE_UPDATE_PHASES:()=>t1t,fromToMotion:()=>Vm,staticFromToMotion:()=>fb});Fwe={};db(Fwe,{easeIn:()=>Hki,easeInOut:()=>Gki,easeInOutQuad:()=>jki,easeInQuad:()=>Wki,easeOut:()=>oU,easeOutQuad:()=>Uki,inverseEaseOut:()=>Yft,linear:()=>Kft});Kft=t=>t,Hki=t=>1-Math.cos(t*Math.PI/2),oU=t=>Math.sin(t*Math.PI/2),Gki=t=>-(Math.cos(t*Math.PI)-1)/2,Wki=t=>t*t,Uki=t=>1-ap(1-t,2),jki=t=>t<.5?2*t*t:1-ap(-2*t+2,2)/2,Yft=t=>2*Math.asin(t)/Math.PI,Lwe=.2,qft={animationDuration:1,animationDelay:0},Zft={animationDuration:.25,animationDelay:0},Xft={animationDuration:.5,animationDelay:.25},Qft={animationDuration:.25,animationDelay:.75},kU={animationDuration:Lwe,animationDelay:1},Jft=(t=>(t.Loop="loop",t.Reverse="reverse",t))(Jft||{});e1t=class{constructor(t){this.elapsed=0,this.iteration=0,this.isPlaying=!1,this.isReverse=!1;var e,n,i,r,s,o,a,l,c,d;this.id=t.id,this.groupId=t.groupId,this.autoplay=(e=t.autoplay)!=null?e:!0,this.delay=(n=t.delay)!=null?n:0,this.duration=(i=t.duration)!=null?i:1e3,this.ease=(r=t.ease)!=null?r:Kft,this.repeat=(s=t.repeat)!=null?s:0,this.repeatType=(o=t.repeatType)!=null?o:"loop",this.onComplete=t.onComplete,this.onPlay=t.onPlay,this.onStop=t.onStop,this.onRepeat=t.onRepeat,this.onUpdate=t.onUpdate,this.interpolate=this.createInterpolator(t.from,t.to),t.skip===!0?((a=this.onUpdate)==null||a.call(this,t.to,!1,this),(l=this.onStop)==null||l.call(this,this),(c=this.onComplete)==null||c.call(this,this)):this.autoplay&&(this.play(),(d=this.onUpdate)==null||d.call(this,t.from,!0,this))}play(){var t;return this.isPlaying||(this.isPlaying=!0,(t=this.onPlay)==null||t.call(this,this)),this}pause(){return this.isPlaying&&(this.isPlaying=!1),this}stop(){var t;return this.isPlaying&&(this.isPlaying=!1,(t=this.onStop)==null||t.call(this,this)),this}reset(t){let e=this.interpolate(this.isReverse?1-this.delta:this.delta);return this.interpolate=this.createInterpolator(e,t.to),this.elapsed=0,this.iteration=0,typeof t.delay=="number"&&(this.delay=t.delay),typeof t.duration=="number"&&(this.duration=t.duration),typeof t.ease=="function"&&(this.ease=t.ease),this}update(t){var e,n,i;if(this.elapsed+=t,this.elapsed<=this.delay)return this;let r=this.interpolate(this.isReverse?1-this.delta:this.delta);return(e=this.onUpdate)==null||e.call(this,r,!1,this),this.elapsed-this.delay>=this.duration&&(this.iteration<this.repeat?(this.iteration++,this.elapsed=(this.elapsed-this.delay)%this.duration+this.delay,this.repeatType==="reverse"&&(this.isReverse=!this.isReverse),(n=this.onRepeat)==null||n.call(this,this)):(this.stop(),(i=this.onComplete)==null||i.call(this,this))),this}get delta(){return this.ease(ev(0,(this.elapsed-this.delay)/this.duration,1))}createInterpolator(t,e){if(typeof e!="object")return this.interpolateValue(t,e);let n=[];for(let i in e){let r=this.interpolateValue(t[i],e[i]);r!=null&&n.push([i,r])}return i=>{let r={};for(let[s,o]of n)r[s]=o(i);return r}}interpolateValue(t,e){if(!(t===void 0||e===void 0)){try{switch(typeof t){case"number":return PW(t,e);case"string":return zki(t,e)}}catch{}throw new Error(`Unable to interpolate values: ${t}, ${e}`)}}},t1t=["removed","updated","added"],I2={added:Qft,updated:Xft,removed:Zft,unknown:qft};i1t={};db(i1t,{resetMotion:()=>x1});AC=class extends A2{constructor(){super(...arguments),this.enabled=!0,this.color="rgba(0, 0, 0, 0.5)",this.xOffset=0,this.yOffset=0,this.blur=5}};Be([ut(Ua),js({redraw:3})],AC.prototype,"enabled",2);Be([ut(Jc),js({redraw:3})],AC.prototype,"color",2);Be([ut(lh),js({redraw:3})],AC.prototype,"xOffset",2);Be([ut(lh),js({redraw:3})],AC.prototype,"yOffset",2);Be([ut(es),js({redraw:3})],AC.prototype,"blur",2);vmt=class{constructor({width:t=600,height:e=300,overrideDevicePixelRatio:n}){this.enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0,this.canvas=new OffscreenCanvas(t,e),this.realContext=this.canvas.getContext("2d"),this.imageSource=this.canvas.transferToImageBitmap(),this.context=this.setPixelRatio(n),this.resize(t,e)}static isSupported(){return typeof OffscreenCanvas<"u"&&OffscreenCanvas.prototype.transferToImageBitmap!=null}snapshot(){this.imageSource.close(),this.imageSource=this.canvas.transferToImageBitmap()}destroy(){this.imageSource.close(),this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0)}clear(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()}get pixelRatio(){return this._pixelRatio}setPixelRatio(t){let e=t??window.devicePixelRatio;return Lft()&&(e=1),this._pixelRatio=e,dm.overrideScale(this.realContext,e)}get width(){return this._width}get height(){return this._height}resize(t,e){if(!(t>0&&e>0))return;let{canvas:n,context:i,pixelRatio:r}=this;n.width=Math.round(t*r),n.height=Math.round(e*r),i.resetTransform(),this._width=t,this._height=e}},k7e="adv-composite",I7e="dom-composite",n1t=(()=>{let t=class{constructor(e){this.id=kC(this),this.layers=[],this._nextZIndex=0,this._nextLayerId=0,this._dirty=!1,this._root=null,this.debug=Nm.create(!0,"scene");var n;let{document:i,window:r,mode:s=(n=V7e("agChartsSceneRenderModel"))!=null?n:k7e,width:o,height:a,overrideDevicePixelRatio:l=void 0}=e;this.overrideDevicePixelRatio=l,this.opts={document:i,window:r,mode:s},this.canvas=new dm({document:i,window:r,width:o,height:a,overrideDevicePixelRatio:l})}set container(e){this.canvas.container=e}get container(){return this.canvas.container}download(e,n){this.canvas.download(e,n)}getDataURL(e){return this.canvas.getDataURL(e)}get width(){return this.pendingSize?this.pendingSize[0]:this.canvas.width}get height(){return this.pendingSize?this.pendingSize[1]:this.canvas.height}resize(e,n){e=Math.round(e),n=Math.round(n);let i=e<=0||n<=0,r=isNaN(e)||isNaN(n);return e===this.width&&n===this.height||r||i?!1:(this.pendingSize=[e,n],this.markDirty(),!0)}addLayer(e){var n;let{mode:i}=this.opts;if(!["composite",I7e,k7e].includes(i))return;let{zIndex:s=this._nextZIndex++,name:o,zIndexSubOrder:a,getComputedOpacity:l,getVisibility:c}=e,{width:d,height:u,overrideDevicePixelRatio:m}=this,f=i===I7e,x=!(i===k7e)||!vmt.isSupported()?new dm({document:this.opts.document,window:this.opts.window,width:d,height:u,domLayer:f,zIndex:s,name:o,overrideDevicePixelRatio:m}):new vmt({width:d,height:u,overrideDevicePixelRatio:m}),D={id:this._nextLayerId++,name:o,zIndex:s,zIndexSubOrder:a,canvas:x,getComputedOpacity:l,getVisibility:c};if(s>=this._nextZIndex&&(this._nextZIndex=s+1),this.layers.push(D),this.sortLayers(),f){let E=this.layers.map(z=>z.canvas).filter(z=>z instanceof dm),M=E.findIndex(z=>z===x);((n=E[M-1])!=null?n:this.canvas).element.insertAdjacentElement("afterend",x.element)}return this.debug("Scene.addLayer() - layers",this.layers),D.canvas}removeLayer(e){let n=this.layers.findIndex(i=>i.canvas===e);n>=0&&(this.layers.splice(n,1),e.destroy(),this.markDirty(),this.debug("Scene.removeLayer() -  layers",this.layers))}moveLayer(e,n,i){let r=this.layers.find(s=>s.canvas===e);r&&(r.zIndex=n,r.zIndexSubOrder=i,this.sortLayers(),this.markDirty(),this.debug("Scene.moveLayer() -  layers",this.layers))}sortLayers(){this.layers.sort((e,n)=>{var i,r;return Wft([e.zIndex,...(i=e.zIndexSubOrder)!=null?i:[void 0,void 0],e.id],[n.zIndex,...(r=n.zIndexSubOrder)!=null?r:[void 0,void 0],n.id],Gft)})}markDirty(){this._dirty=!0}get dirty(){return this._dirty}set root(e){var n;e!==this._root&&((n=this._root)==null||n._setLayerManager(),this._root=e,e&&e._setLayerManager({addLayer:i=>this.addLayer(i),moveLayer:(...i)=>this.moveLayer(...i),removeLayer:(...i)=>this.removeLayer(...i),markDirty:()=>this.markDirty(),canvas:this.canvas,debug:Nm.create("scene")}),this.markDirty())}get root(){return this._root}strip(){let{layers:e}=this;for(let n of e)n.canvas.destroy(),delete n.canvas;e.splice(0,e.length),this.root=null,this._dirty=!1,this.canvas.context.resetTransform()}destroy(){this.container=void 0,this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0,ctx:void 0})}render(e){return mr(this,null,function*(){var n,i;let{debugSplitTimes:r={start:performance.now()},extraDebugStats:s={}}=e??{},{canvas:o,canvas:{context:a},root:l,layers:c,pendingSize:d,opts:{mode:u}}=this;if(d&&(this.canvas.resize(...d),this.layers.forEach(_=>_.canvas.resize(...d)),this.pendingSize=void 0),l&&!l.visible){this._dirty=!1;return}if(l&&!this.dirty){this.debug("Scene.render() - no-op",{redrawType:qw[l.dirty],tree:this.buildTree(l)}),this.debugStats(r,a,void 0,s);return}let m={ctx:a,devicePixelRatio:(n=this.canvas.pixelRatio)!=null?n:1,forceRender:!0,resized:!!d,debugNodes:{}};Nm.check("scene:stats:verbose")&&(m.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0});let f=!1;if((!l||l.dirty>=1)&&(f=!0,o.clear()),l){let{dirtyTree:_,paths:x}=this.buildDirtyTree(l);Nm.create("scene:dirtyTree")("Scene.render() - dirtyTree",{dirtyTree:_,paths:x})}l&&f&&(this.debug("Scene.render() - before",{redrawType:qw[l.dirty],canvasCleared:f,tree:this.buildTree(l)}),l.visible&&(a.save(),l.render(m),a.restore())),r["\u270D\uFE0F"]=performance.now(),u!==I7e&&c.length>0&&f&&(this.sortLayers(),a.save(),a.setTransform(1/o.pixelRatio,0,0,1/o.pixelRatio,0,0),c.forEach(({canvas:{imageSource:_,enabled:x},getComputedOpacity:D,getVisibility:E})=>{!x||!E()||(a.globalAlpha=D(),a.drawImage(_,0,0))}),a.restore(),r["\u26D9"]=performance.now()),(i=a.verifyDepthZero)==null||i.call(a),this._dirty=!1,this.debugStats(r,a,m.stats,s),this.debugSceneNodeHighlight(a,m.debugNodes),l&&this.debug("Scene.render() - after",{redrawType:qw[l.dirty],canvasCleared:f,tree:this.buildTree(l)})})}debugStats(e,n,i,r={}){if(Nm.check("scene:stats","scene:stats:verbose")){let s=performance.now(),o=e.start;e.end=performance.now();let a=(A,Y)=>{let X=A+Y;return`${A} / ${X} (${Math.round(100*A/X)}%)`},l=(A,Y,X)=>`${A}: ${Math.round((X-Y)*100)/100}ms`,{layersRendered:c=0,layersSkipped:d=0,nodesRendered:u=0,nodesSkipped:m=0}=i??{},f=0,_=Object.entries(e).filter(([A])=>A!=="end").map(([A,Y],X)=>{let ne=X>0?l(A,f,Y):null;return f=Y,ne}).filter(A=>A!=null).join(" + "),x=Object.entries(r).map(([A,Y])=>`${A}: ${Y}`).join(" ; "),D=Nm.check("scene:stats:verbose"),M=[`${l("\u23F1\uFE0F",o,s)} (${_})`,`${x}`,`Layers: ${D?a(c,d):this.layers.length}`,D?`Nodes: ${a(u,m)}`:null].filter(A=>A!=null).map(A=>[A,dm.getTextSize(A,n.font)]),I=Math.max(...M.map(([,{width:A}])=>A)),z=M.reduce((A,[,{height:Y}])=>A+Y,0);n.save(),n.fillStyle="white",n.fillRect(0,0,I,z),n.fillStyle="black";let G=0;for(let[A,Y]of M)G+=Y.height,n.fillText(A,2,G);n.restore()}}debugSceneNodeHighlight(e,n){var i;let r=a=>l=>a.test(l.id)?!0:l instanceof da&&l.name!=null&&a.test(l.name),s=a=>l=>a===l.id?!0:l instanceof da&&l.name!=null&&a===l.name,o=xne(V7e("agChartsSceneDebug")).flatMap(a=>a==="layout"?["seriesRoot","legend","root",/.*Axis-\d+-axis.*/]:a);for(let a of o){if(typeof a=="string"&&n[a]!=null)continue;let l=typeof a=="string"?s(a):r(a),c=(i=this.root)==null?void 0:i.findNodes(l);if(!c||c.length===0){Ns.log(`Scene.render() - no debugging node with id [${a}] in scene graph.`);continue}for(let d of c)d instanceof da&&d.name?n[d.name]=d:n[d.id]=d}e.save();for(let[a,l]of Object.entries(n)){let c=l.computeTransformedBBox();if(!c){Ns.log(`Scene.render() - no bbox for debugged node [${a}].`);continue}e.globalAlpha=.8,e.strokeStyle="red",e.lineWidth=1,e.strokeRect(c.x,c.y,c.width,c.height),e.fillStyle="red",e.strokeStyle="white",e.font="16px sans-serif",e.textBaseline="top",e.textAlign="left",e.lineWidth=2,e.strokeText(a,c.x,c.y,c.width),e.fillText(a,c.x,c.y,c.width)}e.restore()}buildTree(e){var n,i;let r=(n=e instanceof da?e.name:null)!=null?n:e.id;return Ai(Ai({name:r,node:e,dirty:qw[e.dirty]},(i=e.parent)!=null&&i.isVirtual?{virtualParentDirty:qw[e.parent.dirty],virtualParent:e.parent}:{}),e.children.map(s=>this.buildTree(s)).reduce((s,o)=>{let{name:a}=o,{node:{visible:l,opacity:c,zIndex:d,zIndexSubOrder:u},node:m,virtualParent:f}=o;(!l||c<=0)&&(a=`(${a})`),m instanceof da&&m.isLayer()&&(a=`*${a}*`);let _=[`${a??"<unknown>"}`,`z: ${d}`,u&&`zo: ${u.map(E=>typeof E=="function"?`${E()} (fn)`:E).join(" / ")}`,f&&"(virtual parent)"].filter(E=>!!E).join(" "),x=_,D=1;for(;s[x]!=null&&D<100;)x=`${_} (${D++})`;return s[x]=o,s},{}))}buildDirtyTree(e){var n;if(e.dirty===0)return{dirtyTree:{},paths:[]};let i=e.children.map(o=>this.buildDirtyTree(o)).filter(o=>o.paths.length>0),r=(n=e instanceof da?e.name:null)!=null?n:e.id,s=i.length===0?[r]:i.map(o=>o.paths).reduce((o,a)=>o.concat(a),[]).map(o=>`${r}.${o}`);return{dirtyTree:Ai({name:r,node:e,dirty:qw[e.dirty]},i.map(o=>o.dirtyTree).filter(o=>o.dirty!==void 0).reduce((o,a)=>{var l;return o[(l=a.name)!=null?l:"<unknown>"]=a,o},{})),paths:s}}};return t.className="Scene",t})(),Bm=class oM{constructor(e,n,i=!0){this.parentNode=e,this.autoCleanup=i,this.garbageBin=new Set,this._nodesMap=new Map,this._nodes=[],this.data=[],this.debug=Nm.create(!0,"scene","scene:selections"),this.nodeFactory=Object.prototype.isPrototypeOf.call(IF,n)?()=>new n:n}static select(e,n,i=!0){return new oM(e,n,i)}static selectAll(e,n){let i=[],r=s=>{n(s)&&i.push(s),s.children.forEach(r)};return r(e),i}static selectByClass(e,n){return oM.selectAll(e,i=>i instanceof n)}static selectByTag(e,n){return oM.selectAll(e,i=>i.tag===n)}createNode(e,n,i){let r=this.nodeFactory(e);return r.datum=e,n?.(r),i!=null?this._nodes.splice(i,0,r):this._nodes.push(r),this.parentNode.appendChild(r),r}update(e,n,i){if(this.garbageBin.size>0&&this.debug(`Selection - update() called with pending garbage: ${e}`),i){let r=new Map(e.map((s,o)=>[i(s),[s,o]]));for(let[s,o]of this._nodesMap.entries())if(r.has(o)){let[a]=r.get(o);s.datum=a,this.garbageBin.delete(s),r.delete(o)}else this.garbageBin.add(s);for(let[s,[o,a]]of r.entries())this._nodesMap.set(this.createNode(o,n,a),s)}else{let r=Math.max(e.length,this.data.length);for(let s=0;s<r;s++)s>=e.length?this.garbageBin.add(this._nodes[s]):s>=this._nodes.length?this.createNode(e[s],n):(this._nodes[s].datum=e[s],this.garbageBin.delete(this._nodes[s]))}return this.data=e.slice(),this.autoCleanup&&this.cleanup(),this}cleanup(){return this.garbageBin.size===0?this:(this._nodes=this._nodes.filter(e=>this.garbageBin.has(e)?(this._nodesMap.delete(e),this.garbageBin.delete(e),this.parentNode.removeChild(e),!1):!0),this)}clear(){return this.update([]),this}isGarbage(e){return this.garbageBin.has(e)}hasGarbage(){return this.garbageBin.size>0}each(e){return this._nodes.forEach((n,i)=>e(n,n.datum,i)),this}*[Symbol.iterator](){for(let e=0;e<this._nodes.length;e++){let n=this._nodes[e],i=this._nodes[e].datum;yield{node:n,datum:i,index:e}}}select(e){return oM.selectAll(this.parentNode,e)}selectByClass(e){return oM.selectByClass(this.parentNode,e)}selectByTag(e){return oM.selectByTag(this.parentNode,e)}nodes(){return this._nodes}};aU=class{constructor(){this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this._closedPath=!1}isDirty(){if(this._closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commands.length||this.previousParams.length!==this.params.length)return!0;for(let t=0;t<this.commands.length;t++)if(this.commands[t]!==this.previousCommands[t])return!0;for(let t=0;t<this.params.length;t++)if(this.params[t]!==this.previousParams[t])return!0;return!1}draw(t){let e=this.commands,n=this.params,i=0;t.beginPath();for(let r of e)switch(r){case 0:t.moveTo(n[i++],n[i++]);break;case 1:t.lineTo(n[i++],n[i++]);break;case 3:t.bezierCurveTo(n[i++],n[i++],n[i++],n[i++],n[i++],n[i++]);break;case 2:t.arc(n[i++],n[i++],n[i++],n[i++],n[i++],n[i++]===1);break;case 4:t.closePath();break}e.length===0&&t.closePath()}moveTo(t,e){this.xy?(this.xy[0]=t,this.xy[1]=e):this.xy=[t,e],this.commands.push(0),this.params.push(t,e)}lineTo(t,e){this.xy?(this.commands.push(1),this.params.push(t,e),this.xy[0]=t,this.xy[1]=e):this.moveTo(t,e)}rect(t,e,n,i){this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+i),this.lineTo(t,e+i),this.closePath()}roundRect(t,e,n,i,r){r=Math.min(r,n/2,i/2),this.moveTo(t,e+r),this.arc(t+r,e+r,r,Math.PI,3*Math.PI/2),this.lineTo(t+r,e),this.lineTo(t+n-r,e),this.arc(t+n-r,e+r,r,3*Math.PI/2,2*Math.PI),this.lineTo(t+n,e+r),this.lineTo(t+n,e+i-r),this.arc(t+n-r,e+i-r,r,0,Math.PI/2),this.lineTo(t+n-r,e+i),this.lineTo(t+r,e+i),this.arc(t+ +r,e+i-r,r,Math.PI/2,Math.PI),this.lineTo(t,e+i-r),this.closePath()}arc(t,e,n,i,r,s=!1){let o=t+n*Math.cos(r),a=e+n*Math.sin(r);this.xy?(this.xy[0]=o,this.xy[1]=a):this.xy=[o,a],this.commands.push(2),this.params.push(t,e,n,i,r,s?1:0)}cubicCurveTo(t,e,n,i,r,s){this.xy||this.moveTo(t,e),this.commands.push(3),this.params.push(t,e,n,i,r,s),this.xy&&(this.xy[0]=r,this.xy[1]=s)}get closedPath(){return this._closedPath}closePath(){this.xy&&(this.xy=void 0,this.commands.push(4),this._closedPath=!0)}clear({trackChanges:t}={trackChanges:!1}){t?(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this._closedPath,this.commands=[],this.params=[]):(this.commands.length=0,this.params.length=0),this.xy=void 0,this._closedPath=!1}isPointInPath(t,e){let n=this.commands,i=this.params,r=n.length,s=-1e4,o=-1e4,a=NaN,l=NaN,c=0,d=0,u=0;for(let m=0,f=0;m<r;m++)switch(n[m]){case 0:!isNaN(a)&&QW(a,l,c,d,s,o,t,e)&&u++,c=i[f++],a=c,d=i[f++],l=d;break;case 1:QW(c,d,i[f++],i[f++],s,o,t,e)&&u++,c=i[f-2],d=i[f-1];break;case 3:u+=Xki(c,d,i[f++],i[f++],i[f++],i[f++],i[f++],i[f++],s,o,t,e).length,c=i[f-2],d=i[f-1];break;case 2:let _=i[f++],x=i[f++],D=i[f++],E=i[f++],M=i[f++],I=!!i[f++];u+=r1t(_,x,D,E,M,I,s,o,t,e).length,c=_+Math.cos(M)*D,d=x+Math.sin(M)*D;break;case 4:!isNaN(a)&&QW(a,l,c,d,s,o,t,e)&&u++;break}return u%2===1}getPoints(){let{commands:t,params:e}=this,n=[],i=0;for(let r=0;r<t.length;r++)switch(t[r]){case 0:case 1:n.push({x:e[i++],y:e[i++]});break;case 3:i+=4,n.push({x:e[i++],y:e[i++]});break;case 2:n.push({x:e[i++],y:e[i++]}),i+=4;break;case 4:break}return n}};$6=(()=>{let t=class extends U6{constructor(){super(...arguments),this.path=new aU,this.clipScalingX=1,this.clipScalingY=1,this._dirtyPath=!0}set dirtyPath(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,3))}get dirtyPath(){return this._dirtyPath}checkPathDirty(){var e,n,i,r;this._dirtyPath||(this.dirtyPath=this.path.isDirty()||((n=(e=this.fillShadow)==null?void 0:e.isDirty())!=null?n:!1)||((r=(i=this.clipPath)==null?void 0:i.isDirty())!=null?r:!1))}isPointInPath(e,n){let i=this.transformPoint(e,n);return this.path.closedPath&&this.path.isPointInPath(i.x,i.y)}isDirtyPath(){return!1}updatePath(){}clip(e,n){let i=e.getTransform(),r=this.clipScalingX!==1||this.clipScalingY!==1;r&&e.scale(this.clipScalingX,this.clipScalingY),n(),r&&e.setTransform(i)}render(e){var n;let{ctx:i,forceRender:r,stats:s}=e;if(this.dirty===0&&!r){s&&(s.nodesSkipped+=this.nodeCount.count);return}this.computeTransformMatrix(),this.matrix.toContext(i),(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.clipPath&&this.clipMode!=null?(i.save(),this.clipMode==="normal"&&this.clip(i,()=>{var o;(o=this.clipPath)==null||o.draw(i),i.clip()}),this.clipScalingX>0&&this.clipScalingY>0&&(this.path.draw(i),this.fillStroke(i)),this.clipMode==="punch-out"&&this.clip(i,()=>{var o,a;(o=this.clipPath)==null||o.draw(i),i.clip();let{x:l=-1e4,y:c=-1e4,width:d=2e4,height:u=2e4}=(a=this.computeBBox())!=null?a:{};i.clearRect(l,c,d,u)}),i.restore()):(this.path.draw(i),this.fillStroke(i)),(n=this.fillShadow)==null||n.markClean(),super.render(e)}};return t.className="Path",t})();Be([ed()],$6.prototype,"clipPath",2);Be([ed()],$6.prototype,"clipMode",2);Be([ed()],$6.prototype,"clipScalingX",2);Be([ed()],$6.prototype,"clipScalingY",2);PC=class extends $6{constructor(){super(),this.centerX=0,this.centerY=0,this.radius=10,this.startAngle=0,this.endAngle=Math.PI*2,this.counterClockwise=!1,this.type=0,this.restoreOwnStyles()}get fullPie(){return Tne(k2(this.startAngle),k2(this.endAngle))}updatePath(){let t=this.path;t.clear(),t.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===1?t.closePath():this.type===2&&!this.fullPie&&(t.lineTo(this.centerX,this.centerY),t.closePath())}computeBBox(){return new ml(this.centerX-this.radius,this.centerY-this.radius,this.radius*2,this.radius*2)}isPointInPath(t,e){let n=this.transformPoint(t,e),i=this.computeBBox();return this.type!==0&&i.containsPoint(n.x,n.y)&&this.path.isPointInPath(n.x,n.y)}};PC.className="Arc";PC.defaultStyles=Object.assign({},U6.defaultStyles,{lineWidth:1,fillStyle:null});Be([ed()],PC.prototype,"centerX",2);Be([ed()],PC.prototype,"centerY",2);Be([ed()],PC.prototype,"radius",2);Be([ed()],PC.prototype,"startAngle",2);Be([ed()],PC.prototype,"endAngle",2);Be([ed()],PC.prototype,"counterClockwise",2);Be([ed()],PC.prototype,"type",2);l0=class extends U6{constructor(t={}){super(t),this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.restoreOwnStyles()}set x(t){this.x1=t,this.x2=t}set y(t){this.y1=t,this.y2=t}computeBBox(){return new ml(Math.min(this.x1,this.x2),Math.min(this.y1,this.y2),Math.abs(this.x2-this.x1),Math.abs(this.y2-this.y1))}isPointInPath(t,e){if(this.x1===this.x2||this.y1===this.y2){let{x:n,y:i}=this.transformPoint(t,e);return this.computeBBox().grow(this.strokeWidth/2).containsPoint(n,i)}return!1}render(t){var e;let{ctx:n,forceRender:i,stats:r,devicePixelRatio:s}=t;if(this.dirty===0&&!i){r&&(r.nodesSkipped+=this.nodeCount.count);return}this.computeTransformMatrix(),this.matrix.toContext(n);let{x1:o,y1:a,x2:l,y2:c}=this;if(o===l){let{strokeWidth:d}=this,u=Math.round(o*s)/s+Math.trunc(d*s)%2/(s*2);o=u,l=u}else if(a===c){let{strokeWidth:d}=this,u=Math.round(a*s)/s+Math.trunc(d*s)%2/(s*2);a=u,c=u}n.beginPath(),n.moveTo(o,a),n.lineTo(l,c),this.fillStroke(n),(e=this.fillShadow)==null||e.markClean(),super.render(t)}};l0.className="Line";l0.defaultStyles=Object.assign({},U6.defaultStyles,{fill:void 0,strokeWidth:1});Be([js({redraw:3})],l0.prototype,"x1",2);Be([js({redraw:3})],l0.prototype,"y1",2);Be([js({redraw:3})],l0.prototype,"x2",2);Be([js({redraw:3})],l0.prototype,"y2",2);_mt=t=>{let e=CC.fromString(t),[n,i,r]=CC.RGBtoOKLCH(e.r,e.g,e.b);return{l:n,c:i,h:r,a:e.a}},Qki=(t,e,n)=>{n=Math.min(Math.max(n,0),1);let i,r;if(Number.isNaN(t.h)&&Number.isNaN(e.h))i=0,r=0;else if(Number.isNaN(t.h))i=e.h,r=e.c;else if(Number.isNaN(e.h))i=t.h,r=t.c;else{let a=t.h,l=e.h,c=e.h-t.h;c>180?l-=360:c<-180&&(l+=360),i=a*(1-n)+l*n,r=t.c*(1-n)+e.c*n}let s=t.l*(1-n)+e.l*n,o=t.a*(1-n)+e.a*n;return CC.fromOKLCH(s,r,i,o)},SM=class{constructor(){this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.parsedRange=this.range.map(_mt)}update(){let{domain:t,range:e}=this;t.length<2&&(Ns.warnOnce("`colorDomain` should have at least 2 values."),t.length===0?t.push(0,1):t.length===1&&t.push(t[0]+1));for(let n=1;n<t.length;n++){let i=t[n-1],r=t[n];if(i>=r){Ns.warnOnce("`colorDomain` values should be supplied in ascending order."),t.sort((s,o)=>s-o);break}}if(e.length<t.length)for(let n=e.length;n<t.length;n++)e.push(e.length>0?e[0]:"black");this.parsedRange=this.range.map(_mt)}convert(t){this.refresh();let{domain:e,range:n,parsedRange:i}=this,r=e[0],s=e[e.length-1],o=n[0],a=n[n.length-1];if(t<=r)return o;if(t>=s)return a;let l,c;if(e.length===2){let m=(t-r)/(s-r),f=1/(n.length-1);l=n.length<=2?0:Math.min(Math.floor(m*(n.length-1)),n.length-2),c=(m-l*f)/f}else{for(l=0;l<e.length-2&&!(t<e[l+1]);l++);let m=e[l],f=e[l+1];c=(t-m)/(f-m)}let d=i[l],u=i[l+1];return Qki(d,u,c).toRgbaString()}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&Ns.warnOnce("Expected update to not invalidate scale"))}};Be([j3],SM.prototype,"domain",2);Be([j3],SM.prototype,"range",2);$ne=class extends U6{constructor(){super(...arguments),this.direction="to-right",this.stops=void 0,this._mask=void 0}get mask(){return this._mask}set mask(t){this._mask!=null&&this.removeChild(this._mask),t!=null&&this.appendChild(t),this._mask=t}isPointInPath(t,e){var n,i;return(i=(n=this.mask)==null?void 0:n.isPointInPath(t,e))!=null?i:!1}computeBBox(){var t;return(t=this.mask)==null?void 0:t.computeBBox()}render(t){let{mask:e,stops:n}=this,{ctx:i,devicePixelRatio:r}=t,s=1/r,o=e?.computeTransformedBBox();if(e==null||n==null||o==null)return;e.dirtyPath&&(e.updatePath(),e.dirtyPath=!1),i.save(),i.beginPath(),e.path.draw(i),i.clip(),i.resetTransform();let a=Math.floor(o.x),l=Math.ceil(o.x+o.width),c=Math.floor(o.y),d=Math.ceil(o.y+o.height),u=new SM,[m,f]=this.direction==="to-right"?[a,l]:[c,d];if(u.domain=n.map((_,x)=>m+(f-m)*x/(n.length-1)),u.range=n,u.update(),this.direction==="to-right"){let _=d-c;for(let x=a;x<=l;x+=s)i.fillStyle=u.convert(x),i.fillRect(x,c,s,_)}else{let _=l-a;for(let x=c;x<=d;x+=s)i.fillStyle=u.convert(x),i.fillRect(a,x,_,s)}i.restore()}};Be([js({redraw:3})],$ne.prototype,"direction",2);Be([js({redraw:3})],$ne.prototype,"stops",2);Be([js({redraw:3})],$ne.prototype,"_mask",2);Cmt=1e-6,tne=(t,e,n,i,r)=>{let s=!1,o=!1,a=i-Math.sqrt(Math.max(ap(r,2)-ap(n,2),0)),l=0,c=0,d=n-Math.sqrt(Math.max(ap(r,2)-ap(i,2),0));return a>t?(s=!0,a=t,l=n-Math.sqrt(Math.max(ap(r,2)-ap(i-t,2)))):a<Cmt&&(a=0),d>e?(o=!0,c=i-Math.sqrt(Math.max(ap(r,2)-ap(n-e,2))),d=e):d<Cmt&&(d=0),{leading0:a,leading1:l,trailing0:c,trailing1:d,leadingClipped:s,trailingClipped:o}},ine=(t,{x0:e,y0:n,x1:i,y1:r,cx:s,cy:o},a,l)=>{if(l&&t.moveTo(e,n),e!==i||n!==r){let c=Math.atan2(n-o,e-s),d=Math.atan2(r-o,i-s);t.arc(s,o,a,c,d)}else t.lineTo(e,n)},A7e=(t,e,n,i,r,s,o)=>{let{topLeft:a,topRight:l,bottomRight:c,bottomLeft:d}=s,u=Math.max(a+d,l+c),m=Math.max(a+l,d+c);if(u<=0&&m<=0){t.rect(e,n,i,r);return}else if(o==null&&a===l&&a===c&&a===d){t.roundRect(e,n,i,r,a);return}if(i<0&&(e+=i,i=Math.abs(i)),r<0&&(n+=r,r=Math.abs(r)),o!=null){let Y=Math.max(e,o.x),X=Math.min(e+i,o.x+o.width),ne=Math.max(n,o.y),pe=Math.min(n+r,o.y+o.height);e=Y,n=ne,i=X-Y,r=pe-ne}if(i<=0||r<=0)return;o??(o=new ml(e,n,i,r));let f=Math.max(u/o.height,m/o.width,1);f>1&&(a/=f,l/=f,c/=f,d/=f);let _=!0,x=!0,D=!0,E=!0,M,I,z,G;if(_){let Y=tne(r,i,Math.max(o.x+a-e,0),Math.max(o.y+a-n,0),a);Y.leadingClipped&&(E=!1),Y.trailingClipped&&(x=!1);let X=Math.max(e+Y.leading1,e),ne=Math.max(n+Y.leading0,n),pe=Math.max(e+Y.trailing1,e),ce=Math.max(n+Y.trailing0,n),ie=o.x+a,le=o.y+a;M={x0:X,y0:ne,x1:pe,y1:ce,cx:ie,cy:le}}if(x){let Y=tne(i,r,Math.max(o.y+l-n,0),Math.max(e+i-(o.x+o.width-l),0),l);Y.leadingClipped&&(_=!1),Y.trailingClipped&&(D=!1);let X=Math.min(e+i-Y.leading0,e+i),ne=Math.max(n+Y.leading1,n),pe=Math.min(e+i-Y.trailing0,e+i),ce=Math.max(n+Y.trailing1,n),ie=o.x+o.width-l,le=o.y+l;I={x0:X,y0:ne,x1:pe,y1:ce,cx:ie,cy:le}}if(D){let Y=tne(r,i,Math.max(e+i-(o.x+o.width-c),0),Math.max(n+r-(o.y+o.height-c),0),c);Y.leadingClipped&&(x=!1),Y.trailingClipped&&(E=!1);let X=Math.min(e+i-Y.leading1,e+i),ne=Math.min(n+r-Y.leading0,n+r),pe=Math.min(e+i-Y.trailing1,e+i),ce=Math.min(n+r-Y.trailing0,n+r),ie=o.x+o.width-c,le=o.y+o.height-c;z={x0:X,y0:ne,x1:pe,y1:ce,cx:ie,cy:le}}if(E){let Y=tne(i,r,Math.max(n+r-(o.y+o.height-d),0),Math.max(o.x+d-e,0),d);Y.leadingClipped&&(D=!1),Y.trailingClipped&&(_=!1);let X=Math.max(e+Y.leading0,e),ne=Math.min(n+r-Y.leading1,n+r),pe=Math.max(e+Y.trailing0,e),ce=Math.min(n+r-Y.trailing1,n+r),ie=o.x+d,le=o.y+o.height-d;G={x0:X,y0:ne,x1:pe,y1:ce,cx:ie,cy:le}}let A=!1;_&&M!=null&&(ine(t,M,a,!A),A||(A=!0)),x&&I!=null&&(ine(t,I,l,!A),A||(A=!0)),D&&z!=null&&(ine(t,z,c,!A),A||(A=!0)),E&&G!=null&&(ine(t,G,d,!A),A||(A=!0)),t.closePath()},Wg=(()=>{let t=class extends $6{constructor(){super(...arguments),this.borderPath=new aU,this.x=0,this.y=0,this.width=10,this.height=10,this.topLeftCornerRadius=0,this.topRightCornerRadius=0,this.bottomRightCornerRadius=0,this.bottomLeftCornerRadius=0,this.cornerRadiusBbox=void 0,this.crisp=!1,this.lastUpdatePathStrokeWidth=U6.defaultStyles.strokeWidth,this.effectiveStrokeWidth=U6.defaultStyles.strokeWidth,this.microPixelEffectOpacity=1}set cornerRadius(e){this.topLeftCornerRadius=e,this.topRightCornerRadius=e,this.bottomRightCornerRadius=e,this.bottomLeftCornerRadius=e}isDirtyPath(){var e;return this.lastUpdatePathStrokeWidth!==this.strokeWidth?!0:!!(this.path.isDirty()||this.borderPath.isDirty()||(e=this.clipPath)!=null&&e.isDirty())}updatePath(){var e,n,i;let{path:r,borderPath:s,crisp:o,topLeftCornerRadius:a,topRightCornerRadius:l,bottomRightCornerRadius:c,bottomLeftCornerRadius:d}=this,{x:u,y:m,width:f,height:_,strokeWidth:x,cornerRadiusBbox:D}=this,M=1/((n=(e=this.layerManager)==null?void 0:e.canvas.pixelRatio)!=null?n:1),I=1;if(r.clear({trackChanges:!0}),s.clear({trackChanges:!0}),o&&(f<=M&&(I*=f/M),_<=M&&(I*=_/M),f=this.align(u,f),_=this.align(m,_),u=this.align(u),m=this.align(m),D=D!=null?new ml(this.align(D.x),this.align(D.y),this.align(D.x,D.width),this.align(D.y,D.height)):void 0),x)if(f<M){let z=u+M/2;s.moveTo(z,m),s.lineTo(z,m+_),x=M,this.borderClipPath=void 0}else if(_<M){let z=m+M/2;s.moveTo(u,z),s.lineTo(u+f,z),x=M,this.borderClipPath=void 0}else if(x<f&&x<_){let z=x/2;u+=z,m+=z,f-=x,_-=x;let G=D?.clone().shrink(z),A={topLeft:a>0?a-x:0,topRight:l>0?l-x:0,bottomRight:c>0?c-x:0,bottomLeft:d>0?d-x:0};this.borderClipPath=void 0,A7e(r,u,m,f,_,A,G),A7e(s,u,m,f,_,A,G)}else this.borderClipPath=(i=this.borderClipPath)!=null?i:new aU,this.borderClipPath.clear({trackChanges:!0}),this.borderClipPath.rect(u,m,f,_),s.rect(u,m,f,_);else{let z={topLeft:a,topRight:l,bottomRight:c,bottomLeft:d};this.borderClipPath=void 0,A7e(r,u,m,f,_,z,D)}this.effectiveStrokeWidth=x,this.lastUpdatePathStrokeWidth=x,this.microPixelEffectOpacity=I}computeBBox(){let{x:e,y:n,width:i,height:r}=this;return new ml(e,n,i,r)}isPointInPath(e,n){let i=this.transformPoint(e,n);return this.computeBBox().containsPoint(i.x,i.y)}applyFillAlpha(e){let{fillOpacity:n,microPixelEffectOpacity:i,opacity:r}=this,{globalAlpha:s}=e;e.globalAlpha=s*r*n*i}renderStroke(e){let{stroke:n,effectiveStrokeWidth:i,borderPath:r,borderClipPath:s,opacity:o,microPixelEffectOpacity:a}=this;if(!!n&&!!i){let{strokeOpacity:c,lineDash:d,lineDashOffset:u,lineCap:m,lineJoin:f}=this;s&&(s.draw(e),e.clip()),r.draw(e);let{globalAlpha:_}=e;e.strokeStyle=n,e.globalAlpha=_*o*c*a,e.lineWidth=i,d&&e.setLineDash(d),u&&(e.lineDashOffset=u),m&&(e.lineCap=m),f&&(e.lineJoin=f),e.stroke(),e.globalAlpha=_}}};return t.className="Rect",t})();Be([ed()],Wg.prototype,"x",2);Be([ed()],Wg.prototype,"y",2);Be([ed()],Wg.prototype,"width",2);Be([ed()],Wg.prototype,"height",2);Be([ed()],Wg.prototype,"topLeftCornerRadius",2);Be([ed()],Wg.prototype,"topRightCornerRadius",2);Be([ed()],Wg.prototype,"bottomRightCornerRadius",2);Be([ed()],Wg.prototype,"bottomLeftCornerRadius",2);Be([ed()],Wg.prototype,"cornerRadiusBbox",2);Be([ed()],Wg.prototype,"crisp",2);RC=(()=>{let t=class extends $6{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.innerRadius=10,this.outerRadius=20,this.startAngle=0,this.endAngle=Math.PI*2,this.angleOffset=0,this.inset=0}computeBBox(){let e=this.outerRadius;return new ml(this.centerX-e,this.centerY-e,e*2,e*2)}updatePath(){let e=this.path,{angleOffset:n,inset:i}=this,r=this.startAngle+n,s=this.endAngle+n,o=r<=s?s-r:Math.PI*2-(r-s),a=Math.max(Math.min(this.innerRadius,this.outerRadius)+i,0),l=Math.max(Math.max(this.innerRadius,this.outerRadius)-i,0),c=o>=2*Math.PI,d=this.centerX,u=this.centerY;if(e.clear(),c)e.arc(d,u,l,r,s),a>i&&(e.moveTo(d+a*Math.cos(s),u+a*Math.sin(s)),e.arc(d,u,a,s,r,!0));else{let m=a>0?i/a:0,f=l>0?i/l:0;if(o<2*f)return;let x=a<=i||o<2*m;if(x){let D=o<Math.PI*.5?i*(1+Math.cos(o))/Math.sin(o):NaN,E;D>0&&D<l?E=Math.max(Math.hypot(i,D),a):E=a;let M=r+o*.5;e.moveTo(d+E*Math.cos(M),u+E*Math.sin(M))}else e.moveTo(d+a*Math.cos(r+m),u+a*Math.sin(r+m));e.arc(d,u,l,r+f,s-f),x||(a>0?e.arc(d,u,a,s-m,r+m,!0):e.lineTo(d,u))}e.closePath(),this.dirtyPath=!1}isPointInPath(e,n){let{angleOffset:i}=this,r=this.startAngle+i,s=this.endAngle+i,o=Math.min(this.innerRadius,this.outerRadius),a=Math.max(this.innerRadius,this.outerRadius),l=this.transformPoint(e,n);return s1t(l.x,l.y,{startAngle:r,endAngle:s,innerRadius:o,outerRadius:a})}};return t.className="Sector",t})();Be([ed()],RC.prototype,"centerX",2);Be([ed()],RC.prototype,"centerY",2);Be([ed()],RC.prototype,"innerRadius",2);Be([ed()],RC.prototype,"outerRadius",2);Be([ed()],RC.prototype,"startAngle",2);Be([ed()],RC.prototype,"endAngle",2);Be([ed()],RC.prototype,"angleOffset",2);Be([ed()],RC.prototype,"inset",2);gF=t=>`(${t})`,ob=t=>`${gF(t)}?`,bmt=t=>ob(`?:${t}`),eIi=(()=>{let t=".",e="[<>=^]",n="[+\\-( ]",i="[$\u20AC\xA3\xA5\u20A3\u20B9#]",r="0",s="\\d+",o=",",a="\\d+",l="~",c="[%a-z]";return new RegExp(["^",bmt(`${ob(t)}${gF(e)}`),ob(n),ob(i),ob(r),ob(s),ob(o),bmt(`\\.${gF(a)}`),ob(l),ob(c),"$"].join(""),"i")})(),tIi=(()=>{let t=".*?",e=".+?",n=".*?";return new RegExp(["^",gF(t),`#\\{${gF(e)}\\}`,gF(n),"$"].join(""))})();nne=t=>Math.floor(Math.abs(t)),uF={b:t=>nne(t).toString(2),c:t=>String.fromCharCode(t),d:t=>Math.round(Math.abs(t)).toFixed(0),o:t=>nne(t).toString(8),x:t=>nne(t).toString(16),X:t=>uF.x(t).toUpperCase(),n:t=>uF.d(t),"%":t=>`${nne(t*100).toFixed(0)}`},J4={e:(t,e)=>Math.abs(t).toExponential(e),E:(t,e)=>J4.e(t,e).toUpperCase(),f:(t,e)=>Math.abs(t).toFixed(e),F:(t,e)=>J4.f(t,e).toUpperCase(),g:(t,e)=>{if(t===0)return"0";let n=Math.abs(t),i=Math.floor(Math.log10(n));return i>=-4&&i<e?n.toFixed(e-1-i):n.toExponential(e-1)},G:(t,e)=>J4.g(t,e).toUpperCase(),n:(t,e)=>J4.g(t,e),p:(t,e)=>J4.r(t*100,e),r:(t,e)=>{if(t===0)return"0";let n=Math.abs(t),r=Math.floor(Math.log10(n))-(e-1);if(r<=0)return n.toFixed(-r);let s=Math.pow(10,r);return(Math.round(n/s)*s).toFixed()},s:(t,e)=>{let n=l1t(t);return J4.r(t/Math.pow(10,n),e)},"%":(t,e)=>J4.f(t*100,e)};c1t=-24,d1t=24,sIi={[c1t]:"y",[-21]:"z",[-18]:"a",[-15]:"f",[-12]:"p",[-9]:"n",[-6]:"\xB5",[-3]:"m",0:"",3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",[d1t]:"Y"},oIi="\u2212";lU=(t,e=[])=>Object.assign(e,{fractionDigits:t});h1t=[1,2,5,10];gM=class extends lu{constructor(){super([0,1],[0,1]),this.type="linear"}toDomain(t){return t}ticks(){var t;let e=(t=this.tickCount)!=null?t:lu.defaultTickCount;if(!this.domain||this.domain.length<2||e<1||this.domain.some(s=>!isFinite(s)))return[];this.refresh();let[n,i]=this.getDomain(),{interval:r}=this;if(r){let s=Math.abs(r);if(!this.isDenseInterval({start:n,stop:i,interval:s}))return cU(n,i,s)}return Kne(n,i,e,this.minTickCount,this.maxTickCount)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}getTickStep(t,e){var n,i;let r=(n=this.tickCount)!=null?n:lu.defaultTickCount;return(i=this.interval)!=null?i:wF(t,e,r,this.minTickCount,this.maxTickCount)}updateNiceDomain(){var t;let e=(t=this.tickCount)!=null?t:lu.defaultTickCount;if(e<1){this.niceDomain=[...this.domain];return}let[n,i]=this.domain;if(e===1)[n,i]=cIi(n,i);else{let r=n>i?Math.ceil:Math.floor,s=i<n?Math.floor:Math.ceil,o=4;for(let a=0;a<o;a++){let l=n,c=i,d=this.getTickStep(n,i),[u,m]=this.domain;if(d>=1)n=r(u/d)*d,i=s(m/d)*d;else{let f=1/d;n=r(u*f)/f,i=s(m*f)/f}if(n===l&&i===c)break}}this.niceDomain=[n,i]}tickFormat({ticks:t,specifier:e}){return u1t(t??this.ticks(),e)}},K6=class extends $6{constructor(){super(...arguments),this.x=0,this.y=0,this.size=12}computeBBox(){let{x:t,y:e,size:n}=this,i=n/2;return new ml(t-i,e-i,n,n)}applyPath(t,e){let{path:n}=this,{x:i,y:r}=this;n.clear();for(let{x:s,y:o,t:a}of e)i+=s*t,r+=o*t,a==="move"?n.moveTo(i,r):n.lineTo(i,r);n.closePath()}};Be([ed()],K6.prototype,"x",2);Be([ed()],K6.prototype,"y",2);Be([ed({convertor:Math.abs})],K6.prototype,"size",2);vF=(()=>{let t=class extends K6{updatePath(){let{x:e,y:n,path:i,size:r}=this,s=r/2;i.clear(),i.arc(e,n,s,0,Math.PI*2),i.closePath()}};return t.className="Circle",t})(),dIi=(()=>{let t=class p1t extends K6{updatePath(){let n=this.size/4.2;super.applyPath(n,p1t.moves)}};return t.className="Cross",t.moves=[{x:-1,y:0,t:"move"},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:-1,y:1},{x:-1,y:-1}],t})(),uIi=dIi,hIi=(()=>{let t=class m1t extends K6{updatePath(){let n=this.size/2;super.applyPath(n,m1t.moves)}};return t.className="Diamond",t.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}],t})(),f1t=hIi,pIi=(()=>{let t=class extends K6{rad(e){return e/180*Math.PI}updatePath(){let{x:e,path:n,size:i,rad:r}=this,s=i/4,o=this.y+s/2;n.clear(),n.arc(e-s,o-s,s,r(130),r(330)),n.arc(e+s,o-s,s,r(220),r(50)),n.lineTo(e,o+s),n.closePath()}};return t.className="Heart",t})(),mIi=(()=>{let t=class g1t extends K6{updatePath(){let n=this.size/3;super.applyPath(n,g1t.moves)}};return t.className="Plus",t.moves=[{x:-.5,y:-.5,t:"move"},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:-1},{x:-1,y:0},{x:0,y:-1}],t})(),fIi=mIi,dU=(()=>{let t=class extends K6{updatePath(){let{path:e,x:n,y:i}=this,r=this.size/2;e.clear(),e.moveTo(this.align(n-r),this.align(i-r)),e.lineTo(this.align(n+r),this.align(i-r)),e.lineTo(this.align(n+r),this.align(i+r)),e.lineTo(this.align(n-r),this.align(i+r)),e.closePath()}};return t.className="Square",t})(),gIi=(()=>{let t=class v1t extends K6{updatePath(){let n=this.size*1.1;super.applyPath(n,v1t.moves)}};return t.className="Triangle",t.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}],t})(),yF=gIi,y1t={circle:vF,cross:uIi,diamond:f1t,heart:pIi,plus:fIi,square:dU,triangle:yF},vIi=Object.keys(y1t);AF=class extends IF{constructor(t){super(),this.x=0,this.y=0,this.width=0,this.height=0,this.opacity=1,this.sourceImage=t}render(t){let{ctx:e,forceRender:n,stats:i}=t;if(this.dirty===0&&!n){i&&i.nodesSkipped++;return}this.computeTransformMatrix(),this.matrix.toContext(e);let r=this.sourceImage;e.globalAlpha=this.opacity,e.drawImage(r,0,0,r.width,r.height,this.x,this.y,this.width,this.height),super.render(t)}};Be([js({redraw:3})],AF.prototype,"x",2);Be([js({redraw:3})],AF.prototype,"y",2);Be([js({redraw:3})],AF.prototype,"width",2);Be([js({redraw:3})],AF.prototype,"height",2);Be([js({redraw:3})],AF.prototype,"opacity",2);yIi=Ai(Ai({},$ft),i1t),Owe=t=>typeof t=="string",C1t=t=>!!t&&Object.hasOwn(t,"toString")&&Owe(t.toString()),_Ii=t=>t instanceof Date&&!isNaN(+t);H3=t=>typeof t=="number"&&Number.isFinite(t),Vwe=t=>t==="value"?cu((e,n)=>n.target.type==="line",e=>e.target.type==="range"?"crossLine type 'range' to have a 'range' property instead of 'value'":"crossLine property 'type' to be 'line'"):cu((e,n)=>n.target.type==="range",e=>e.target.type==="line"?"crossLine type 'line' to have a 'value' property instead of 'range'":"crossLine property 'type' to be 'range'"),b1t=(t,e,n,i)=>{let r=t==="line"&&e!==void 0,s=t==="range"&&n!==void 0;if(!r&&!s)return!0;let[o,a]=n??[e,void 0],l=lu.is(i),c=uU(o,l)!=null&&!isNaN(i.convert(o)),d=uU(a,l)!=null&&!isNaN(i.convert(a));if(r&&c||s&&c&&d)return!0;let u=["Expecting crossLine"];return s?(c||u.push(`range start ${XW(o)}`),d||u.push(`${c?"":"and "}range end ${XW(a)}`)):u.push(`value ${XW(o)}`),u.push("to match the axis scale domain."),Ns.warnOnce(u.join(" ")),!1},CIi={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},topLeft:{xTranslationDirection:1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:-1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:1},bottomRight:{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:1,yTranslationDirection:0},insideRight:{xTranslationDirection:-1,yTranslationDirection:0},insideTop:{xTranslationDirection:0,yTranslationDirection:1},insideBottom:{xTranslationDirection:0,yTranslationDirection:-1},insideTopLeft:{xTranslationDirection:1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomRight:{xTranslationDirection:-1,yTranslationDirection:-1}},xIi={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},topLeft:{xTranslationDirection:-1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},bottomRight:{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:0,yTranslationDirection:1},insideRight:{xTranslationDirection:0,yTranslationDirection:-1},insideTop:{xTranslationDirection:-1,yTranslationDirection:0},insideBottom:{xTranslationDirection:1,yTranslationDirection:0},insideTopLeft:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:-1},insideBottomRight:{xTranslationDirection:1,yTranslationDirection:-1}};Y7e=({yDirection:t,xEnd:e,yStart:n,yEnd:i})=>t?{x:e/2,y:n}:{x:e,y:isNaN(i)?n:(n+i)/2},Smt=({yDirection:t,xStart:e,xEnd:n,yStart:i,yEnd:r})=>t?{x:e,y:isNaN(r)?i:(i+r)/2}:{x:n/2,y:i},Tmt=({yDirection:t,xEnd:e,yStart:n,yEnd:i})=>t?{x:e,y:isNaN(i)?n:(n+i)/2}:{x:e/2,y:isNaN(i)?n:i},Dmt=({yDirection:t,xStart:e,xEnd:n,yStart:i,yEnd:r})=>t?{x:n/2,y:isNaN(r)?i:r}:{x:e,y:isNaN(r)?i:(i+r)/2},wIi=({xEnd:t,yStart:e,yEnd:n})=>({x:t/2,y:isNaN(n)?e:(e+n)/2}),Emt=({yDirection:t,xStart:e,xEnd:n,yStart:i})=>t?{x:e/2,y:i}:{x:n,y:i},Mmt=({yDirection:t,xStart:e,yStart:n,yEnd:i})=>t?{x:e,y:isNaN(i)?n:i}:{x:e,y:n},kmt=({yDirection:t,xEnd:e,yStart:n,yEnd:i})=>t?{x:e,y:n}:{x:e,y:isNaN(i)?n:i},Imt=({yDirection:t,xStart:e,xEnd:n,yStart:i,yEnd:r})=>t?{x:n,y:isNaN(r)?i:r}:{x:e,y:isNaN(r)?i:r},SIi={top:{c:Y7e},bottom:{c:Dmt},left:{c:Smt},right:{c:Tmt},topLeft:{c:Emt},topRight:{c:kmt},bottomLeft:{c:Mmt},bottomRight:{c:Imt},inside:{c:wIi},insideLeft:{c:Smt},insideRight:{c:Tmt},insideTop:{c:Y7e},insideBottom:{c:Dmt},insideTopLeft:{c:Emt},insideBottomLeft:{c:Mmt},insideTopRight:{c:kmt},insideBottomRight:{c:Imt}},TIi=Gm(["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],"crossLine label position"),Y6=class{constructor(){this.enabled=void 0,this.text=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)",this.position=void 0,this.rotation=void 0,this.parallel=void 0}};Be([ut(Ua,{optional:!0})],Y6.prototype,"enabled",2);Be([ut(Ps,{optional:!0})],Y6.prototype,"text",2);Be([ut(iS,{optional:!0})],Y6.prototype,"fontStyle",2);Be([ut(nS,{optional:!0})],Y6.prototype,"fontWeight",2);Be([ut(es)],Y6.prototype,"fontSize",2);Be([ut(Ps)],Y6.prototype,"fontFamily",2);Be([ut(lh)],Y6.prototype,"padding",2);Be([ut(Jc,{optional:!0})],Y6.prototype,"color",2);Be([ut(TIi,{optional:!0})],Y6.prototype,"position",2);Be([ut(MF,{optional:!0})],Y6.prototype,"rotation",2);Be([ut(Ua,{optional:!0})],Y6.prototype,"parallel",2);C_=(()=>{let t=class RW{constructor(){this.id=kC(this),this.enabled=void 0,this.type=void 0,this.range=void 0,this.value=void 0,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.label=new Y6,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction="x",this.group=new da({name:`${this.id}`,layer:!0,zIndex:RW.LINE_LAYER_ZINDEX}),this.labelGroup=new da({name:`${this.id}`,layer:!0,zIndex:RW.LABEL_LAYER_ZINDEX}),this.crossLineRange=new IC,this.crossLineLabel=new Wu,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1;let{group:n,labelGroup:i,crossLineRange:r,crossLineLabel:s}=this;n.append(r),i.append(s),r.pointerEvents=1}update(n){let{enabled:i,data:r,type:s,value:o,range:a,scale:l}=this;if(!s||!l||!i||!n||!b1t(s,o,a,l)||r.length===0){this.group.visible=!1,this.labelGroup.visible=!1;return}this.group.visible=n,this.labelGroup.visible=n,this.group.zIndex=this.getZIndex(this.isRange),this.updateNodes()}calculateLayout(n,i){if(!n||!this.createNodeData(i))return;let{sideFlag:s,gridLength:o,data:a}=this,l=[],c=0,d=s*o,u=a[0],m=a[1],f=new ml(Math.min(c,d),Math.min(u,m),Math.abs(c-d),Math.abs(u-m));l.push(f);let _=this.computeLabelBBox();return _&&l.push(_),ml.merge(l)}updateNodes(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())}createNodeData(n){var i,r,s;let{scale:o,gridLength:a,sideFlag:l,direction:c,label:{position:d="top"},clippedRange:u,strokeWidth:m=0}=this;if(this.data=[],!o)return!1;let f=(i=o.bandwidth)!=null?i:0,_=(r=o.step)!=null?r:0,x=(n?-1:1)*(o instanceof TC?(_-f)/2:0),[D,E]=[0,l*a],[M,I]=this.getRange(),[z,G]=[Number(o.convert(M,{clampMode:"clamped"}))-x,o.convert(I,{clampMode:"clamped"})+f+x];z=Sne(z,u),G=Sne(G,u),[M,I]=[Number(o.convert(M)),o.convert(I)+f];let A=(M===z||I===G||z!==G)&&Math.abs(G-z)>0;if(A&&z>G&&([z,G]=[G,z],[M,I]=[I,M]),M-x>=z&&(M-=x),I+x<=G&&(I+=x),this.isRange=A,this.startLine=m>0&&M>=z&&M<=z+x,this.endLine=m>0&&I>=G-f-x&&I<=G,!A&&!this.startLine&&!this.endLine)return!1;if(this.data=[z,G],this.label.enabled){let Y=c==="y",{c:X=Y7e}=(s=SIi[d])!=null?s:{},{x:ne,y:pe}=X({yDirection:Y,xStart:D,xEnd:E,yStart:z,yEnd:G});this.labelPoint={x:ne,y:pe}}return!0}updateRangeNode(){var n;let{crossLineRange:i,sideFlag:r,gridLength:s,data:o,startLine:a,endLine:l,isRange:c,fill:d,fillOpacity:u,stroke:m,strokeWidth:f,lineDash:_}=this;i.x1=0,i.x2=r*s,i.y1=o[0],i.y2=o[1],i.startLine=a,i.endLine=l,i.isRange=c,i.fill=d,i.fillOpacity=u??1,i.stroke=m,i.strokeWidth=f??1,i.strokeOpacity=(n=this.strokeOpacity)!=null?n:1,i.lineDash=_}updateLabel(){let{crossLineLabel:n,label:i}=this;i.text&&(n.fontStyle=i.fontStyle,n.fontWeight=i.fontWeight,n.fontSize=i.fontSize,n.fontFamily=i.fontFamily,n.fill=i.color,n.text=i.text)}positionLabel(){let{crossLineLabel:n,labelPoint:{x:i=void 0,y:r=void 0}={},label:{parallel:s,rotation:o,position:a="top",padding:l=0},direction:c,parallelFlipRotation:d,regularFlipRotation:u}=this;if(i===void 0||r===void 0)return;let{defaultRotation:m,configuredRotation:f}=kne({rotation:o,parallel:s,regularFlipRotation:u,parallelFlipRotation:d});n.rotation=m+f,n.textBaseline="middle",n.textAlign="center";let _=n.computeTransformedBBox();if(!_)return;let x=c==="y",{xTranslation:D,yTranslation:E}=wmt({yDirection:x,padding:l,position:a,bbox:_});n.translationX=i+D,n.translationY=r+E}getZIndex(n=!1){return n?RW.RANGE_LAYER_ZINDEX:RW.LINE_LAYER_ZINDEX}getRange(){var n;let{value:i,range:r,scale:s}=this,o=lu.is(s),a=(n=r?.[0])!=null?n:i,l=r?.[1];return!o&&l===void 0&&(l=a),o&&a===l&&(l=void 0),[a,l]}computeLabelBBox(){let{label:n}=this;if(!n.enabled)return;let i=new Wu;i.fontFamily=n.fontFamily,i.fontSize=n.fontSize,i.fontStyle=n.fontStyle,i.fontWeight=n.fontWeight,i.text=n.text;let{labelPoint:{x:r=void 0,y:s=void 0}={},label:{parallel:o,rotation:a,position:l="top",padding:c=0},direction:d,parallelFlipRotation:u,regularFlipRotation:m}=this;if(r===void 0||s===void 0)return;let{configuredRotation:f}=kne({rotation:a,parallel:o,regularFlipRotation:m,parallelFlipRotation:u});i.rotation=f,i.textBaseline="middle",i.textAlign="center";let _=i.computeTransformedBBox();if(!_)return;let x=d==="y",{xTranslation:D,yTranslation:E}=wmt({yDirection:x,padding:c,position:l,bbox:_});return i.translationX=r+D,i.translationY=s+E,i.computeTransformedBBox()}calculatePadding(n){var i,r,s,o,a,l,c,d;let{isRange:u,startLine:m,endLine:f,direction:_,label:{padding:x=0,position:D="top"}}=this;if(!u&&!m&&!f)return;let E=this.computeLabelBBox(),M=E?.x,I=E?.y;if(!E||M==null||I==null)return;let z=bIi({yDirection:_==="y",padding:x,position:D,bbox:E});n.left=Math.max((i=n.left)!=null?i:0,(r=z.left)!=null?r:0),n.right=Math.max((s=n.right)!=null?s:0,(o=z.right)!=null?o:0),n.top=Math.max((a=n.top)!=null?a:0,(l=z.top)!=null?l:0),n.bottom=Math.max((c=n.bottom)!=null?c:0,(d=z.bottom)!=null?d:0)}};return t.LINE_LAYER_ZINDEX=8,t.RANGE_LAYER_ZINDEX=3,t.LABEL_LAYER_ZINDEX=7,t.className="CrossLine",t})();Be([ut(Ua,{optional:!0})],C_.prototype,"enabled",2);Be([ut(Gm(["range","line"],"a crossLine type"),{optional:!0})],C_.prototype,"type",2);Be([ut(j6(Vwe("range"),TU.restrict({length:2})),{optional:!0})],C_.prototype,"range",2);Be([ut(Vwe("value"),{optional:!0})],C_.prototype,"value",2);Be([ut(Jc,{optional:!0})],C_.prototype,"fill",2);Be([ut(Bh,{optional:!0})],C_.prototype,"fillOpacity",2);Be([ut(Jc,{optional:!0})],C_.prototype,"stroke",2);Be([ut(lh,{optional:!0})],C_.prototype,"strokeWidth",2);Be([ut(Bh,{optional:!0})],C_.prototype,"strokeOpacity",2);Be([ut(tS,{optional:!0})],C_.prototype,"lineDash",2);q7e=C_,w1t=class{constructor(){this.moduleMap=new Map}addModule(t,e){if(this.moduleMap.has(t.optionsKey))throw new Error(`AG Charts - module already initialised: ${t.optionsKey}`);this.moduleMap.set(t.optionsKey,e(t))}removeModule(t){var e;let n=mF(t)?t:t.optionsKey;(e=this.moduleMap.get(n))==null||e.destroy(),this.moduleMap.delete(n)}isModuleEnabled(t){return this.moduleMap.has(mF(t)?t:t.optionsKey)}getModule(t){return this.moduleMap.get(mF(t)?t:t.optionsKey)}get modules(){return this.moduleMap.values()}mapValues(t){return Array.from(this.moduleMap.values()).map(t)}destroy(){for(let t of this.moduleMap.keys())this.removeModule({optionsKey:t})}},IU=class{constructor(t,e,n){this.states=e,this.preTransitionCb=n,this.debug=Nm.create(!0,"animation"),this.state=t,this.debug(`%c${this.constructor.name} | init -> ${t}`,"color: green")}transition(t,e){var n,i;let r=this.states[this.state],s=r?.[t];if(!s){this.debug(`%c${this.constructor.name} | ${this.state} -> ${t} -> ${this.state}`,"color: grey");return}let o=this.state;return typeof s=="string"?o=s:typeof s=="object"&&(o=s.target),this.debug(`%c${this.constructor.name} | ${this.state} -> ${t} -> ${o}`,"color: green"),(n=this.preTransitionCb)==null||n.call(this,this.state,o),this.state=o,typeof s=="function"?s(e):typeof s=="object"&&((i=s.action)==null||i.call(s,e)),this.state}},Amt=t=>t,S1t=class T1t extends lu{constructor(){super([1,10],[0,1]),this.type="log",this.base=10,this.baseLog=Amt,this.basePow=Amt,this.log=e=>Math.min(this.domain[0],this.domain[1])>=0?this.baseLog(e):-this.baseLog(-e),this.pow=e=>Math.min(this.domain[0],this.domain[1])>=0?this.basePow(e):-this.basePow(-e),this.defaultClampMode="clamped"}toDomain(e){return e}transform(e){return Math.min(this.domain[0],this.domain[1])>=0?Math.log(e):-Math.log(-e)}transformInvert(e){return Math.min(this.domain[0],this.domain[1])>=0?Math.exp(e):-Math.exp(-e)}refresh(){this.base<=0&&(this.base=0,Ns.warnOnce("expecting a finite Number greater than to 0")),super.refresh()}update(){!this.domain||this.domain.length<2||(this.updateLogFn(),this.updatePowFn(),this.nice&&this.updateNiceDomain())}updateLogFn(){let{base:e}=this,n;if(e===10)n=Math.log10;else if(e===Math.E)n=Math.log;else if(e===2)n=Math.log2;else{let i=Math.log(e);n=r=>Math.log(r)/i}this.baseLog=n}updatePowFn(){let{base:e}=this,n;e===10?n=T1t.pow10:e===Math.E?n=Math.exp:n=i=>Math.pow(e,i),this.basePow=n}updateNiceDomain(){let[e,n]=this.domain,i=e>n?Math.ceil:Math.floor,r=n<e?Math.floor:Math.ceil,s=this.pow(i(this.log(e))),o=this.pow(r(this.log(n)));this.niceDomain=[s,o]}static pow10(e){return e>=0?Math.pow(10,e):1/Math.pow(10,-e)}ticks(){var e;let n=(e=this.tickCount)!=null?e:10;if(!this.domain||this.domain.length<2||n<1)return[];this.refresh();let i=this.base,[r,s]=this.getDomain(),o=Math.min(r,s),a=Math.max(r,s),l=this.log(o),c=this.log(a);if(this.interval){let M=Math.abs(this.interval),I=Math.abs(c-l),z=cU(l,c,Math.min(I,M));if(z=lU(z.fractionDigits,z.map(G=>this.pow(G)).filter(G=>G>=o&&G<=a)),!this.isDenseInterval({start:o,stop:a,interval:M,count:z.length}))return z}let d=i%1===0,u=c-l>=n;if(!d||u){let M=Kne(l,c,Math.min(c-l,n));return M=lU(M.fractionDigits,M.map(I=>this.pow(I))),M}let m=[],f=o>0;l=Math.floor(l)-1,c=Math.round(c)+1;let _=Math.min(...this.range),D=(Math.max(...this.range)-_)/n,E=1/0;for(let M=l;M<=c;M++){let I=this.convert(this.pow(M+1));for(let z=1;z<i;z++){let G=f?z:i-z+1,A=this.pow(M)*G,Y=this.convert(A),X=Math.abs(E-Y),ne=Math.abs(Y-I),pe=X>=D&&ne>=D;A>=o&&A<=a&&(z===1||pe)&&(m.push(A),E=Y)}}return m}tickFormat({count:e,ticks:n,specifier:i}){let{base:r}=this;return i==null&&(i=r===10?".0e":","),typeof i=="string"&&(i=a1t(i)),e===1/0?i:(n==null&&this.ticks(),s=>i(s))}};Be([j3],S1t.prototype,"base",2);Bwe=S1t,rne={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};DIi=0,D1t=1,Rmt=4;MIi={a:t=>rne.shortDays[t.getDay()],A:t=>rne.days[t.getDay()],b:t=>rne.shortMonths[t.getMonth()],B:t=>rne.months[t.getMonth()],c:"%x, %X",d:(t,e)=>G0(t.getDate(),2,e??"0"),e:"%_d",f:(t,e)=>G0(t.getMilliseconds()*1e3,6,e??"0"),H:(t,e)=>G0(t.getHours(),2,e??"0"),I:(t,e)=>{let n=t.getHours()%12;return n===0?"12":G0(n,2,e??"0")},j:(t,e)=>G0(zwe(t)+1,3,e??"0"),m:(t,e)=>G0(t.getMonth()+1,2,e??"0"),M:(t,e)=>G0(t.getMinutes(),2,e??"0"),L:(t,e)=>G0(t.getMilliseconds(),3,e??"0"),p:t=>t.getHours()<12?"AM":"PM",Q:t=>String(t.getTime()),s:t=>String(Math.floor(t.getTime()/1e3)),S:(t,e)=>G0(t.getSeconds(),2,e??"0"),u:t=>{let e=t.getDay();return e<1&&(e+=7),String(e%7)},U:(t,e)=>G0(Pmt(t,DIi),2,e??"0"),V:(t,e)=>G0(E1t(t),2,e??"0"),w:(t,e)=>G0(t.getDay(),2,e??"0"),W:(t,e)=>G0(Pmt(t,D1t),2,e??"0"),x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:(t,e)=>G0(t.getFullYear()%100,2,e??"0"),Y:(t,e)=>G0(t.getFullYear(),4,e??"0"),Z:t=>EIi(t),"%":()=>"%"},kIi={_:" ",0:"0","-":""};rM={0:".%L",1:":%S",2:"%I:%M",3:"%I %p",4:"%a",5:"%b %d",6:"%B",7:"%y",8:"%Y"};Hwe=class extends lu{constructor(){super([new Date(2022,11,7),new Date(2022,11,8)],[0,1]),this.type="time",this.year=NMi,this.month=FMi,this.week=AMi,this.day=SMi,this.hour=xMi,this.minute=yMi,this.second=fMi,this.millisecond=hMi,this.tickIntervals=[[this.second,1,fM],[this.second,5,5*fM],[this.second,15,15*fM],[this.second,30,30*fM],[this.minute,1,Hg],[this.minute,5,5*Hg],[this.minute,15,15*Hg],[this.minute,30,30*Hg],[this.hour,1,_C],[this.hour,3,3*_C],[this.hour,6,6*_C],[this.hour,12,12*_C],[this.day,1,Jw],[this.day,2,2*Jw],[this.week,1,IW],[this.week,2,2*IW],[this.week,3,3*IW],[this.month,1,EW],[this.month,2,2*EW],[this.month,3,3*EW],[this.month,4,4*EW],[this.month,6,6*EW],[this.year,1,ene]]}toDomain(t){return new Date(t)}calculateDefaultTickFormat(t=[]){let e=8,n=l=>{l<e&&(e=l)};for(let l of t){let c=this.getLowestGranularityFormat(l);n(c)}let i=Z4(t[0]),r=Z4(t[t.length-1]),s=new Date(i).getFullYear(),a=new Date(r).getFullYear()-s>0;return this.buildFormatString(e,a)}buildFormatString(t,e){let n=[rM[t]],i=0,r=this.getDomain(),s=Math.min(...r.map(Z4)),a=Math.max(...r.map(Z4))-s;switch(t){case 1:a/Hg>1&&n.push(rM[2]);case 2:a/_C>1&&n.push(rM[3]);case 3:i=n.length,a/Jw>1&&n.push(rM[4]);case 4:if(a/IW>1||e){let l=n.indexOf(rM[4]);l>-1&&n.splice(l,1,rM[5])}case 5:case 6:(a/ene>1||e)&&n.push(rM[8]);default:break}return i<n.length&&(n=[...n.slice(0,i),n.slice(i).join(" ")]),i>0&&(n=[...n.slice(0,i).reverse(),...n.slice(i)],i<n.length&&n.splice(i,0," ")),n.join("")}getLowestGranularityFormat(t){return this.second.floor(t)<t?0:this.minute.floor(t)<t?1:this.hour.floor(t)<t?2:this.day.floor(t)<t?3:this.month.floor(t)<t?this.week.floor(t)<t?4:5:this.year.floor(t)<t?6:8}defaultTickFormat(t){let e=this.calculateDefaultTickFormat(t);return n=>Z7e(e)(n)}getTickInterval({start:t,stop:e,count:n,minCount:i,maxCount:r}){let{tickIntervals:s}=this,o,a,l=n??lu.defaultTickCount,c=Math.abs(e-t)/Math.max(l,1),d=0;for(;d<s.length&&c>s[d][2];)d++;if(d===0)a=Math.max(wF(t,e,l,i,r),1),o=this.millisecond;else if(d===s.length){let u=t/ene,m=e/ene;a=wF(u,m,l,i,r),o=this.year}else{let u=c-s[d-1][2],m=s[d][2]-c,f=u<m?d-1:d;[o,a]=s[f]}return o.every(a)}invert(t){return new Date(super.invert(t))}ticks(){if(!this.domain||this.domain.length<2)return[];this.refresh();let[t,e]=this.getDomain().map(Z4),n=Math.min(t,e),i=Math.max(t,e);if(this.interval!==void 0)return this.getTicksForInterval({start:n,stop:i});if(this.nice){let{tickCount:r}=this;if(r===2)return this.niceDomain;if(r===1)return this.niceDomain.slice(0,1)}return this.getDefaultTicks({start:n,stop:i})}getDefaultTicks({start:t,stop:e}){let n=this.getTickInterval({start:t,stop:e,count:this.tickCount,minCount:this.minTickCount,maxCount:this.maxTickCount});return n?n.range(new Date(t),new Date(e)):[]}getTicksForInterval({start:t,stop:e}){let{interval:n,tickIntervals:i}=this;if(!n)return[];if(n instanceof tU){let d=n.range(new Date(t),new Date(e));return this.isDenseInterval({start:t,stop:e,interval:n,count:d.length})?this.getDefaultTicks({start:t,stop:e}):d}let r=Math.abs(n);if(this.isDenseInterval({start:t,stop:e,interval:r}))return this.getDefaultTicks({start:t,stop:e});let s=[...i];s.reverse();let o=s.find(d=>r%d[2]===0);if(o)return o[0].every(r/(o[2]/o[1])).range(new Date(t),new Date(e));let a=new Date(t),l=new Date(e),c=[];for(;a<=l;)c.push(a),a=new Date(a),a.setMilliseconds(a.getMilliseconds()+r);return c}tickFormat({ticks:t,specifier:e}){return e==null?this.defaultTickFormat(t):Z7e(e)}update(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()}updateNiceDomain(){let[e,n]=this.domain;for(let i=0;i<4;i++){this.updateNiceDomainIteration(e,n);let[r,s]=this.niceDomain;if(Z4(e)===Z4(r)&&Z4(n)===Z4(s))break;e=r,n=s}}updateNiceDomainIteration(t,e){let n=Math.min(Z4(t),Z4(e)),i=Math.max(Z4(t),Z4(e)),r=t>e,{interval:s}=this,o;if(s instanceof tU)o=s;else{let a=typeof s=="number"?(i-n)/Math.max(s,1):this.tickCount;o=this.getTickInterval({start:n,stop:i,count:a,minCount:this.minTickCount,maxCount:this.maxTickCount})}if(o){let a=o.range(new Date(n),new Date(i),!0),l=r?[...a].reverse():a,c=l[0],d=l[l.length-1];this.niceDomain=[c,d]}}},IIi={};db(IIi,{Color:()=>CC,DELETE:()=>G6,Logger:()=>Ns,Padding:()=>oS,angleBetween:()=>mki,checkDatum:()=>uU,clamp:()=>ev,clampArray:()=>Sne,countFractionDigits:()=>Dwe,createId:()=>kC,extent:()=>EC,isContinuous:()=>Nwe,isDate:()=>_Ii,isDiscrete:()=>x1t,isEqual:()=>Tne,isNegative:()=>SU,isNumber:()=>H3,isNumberEqual:()=>Tne,isReal:()=>Hne,isString:()=>Owe,isStringObject:()=>C1t,jsonApply:()=>ZW,jsonClone:()=>nU,jsonDiff:()=>SC,jsonMerge:()=>zm,jsonWalk:()=>yM,mod:()=>Twe,normalisedExtent:()=>gft,normalisedExtentWithMetadata:()=>bU,normalizeAngle180:()=>wne,normalizeAngle360:()=>k2,normalizeAngle360Inclusive:()=>hki,range:()=>cU,resetIds:()=>Ift,round:()=>wwe,sanitizeHtml:()=>lp,tickFormat:()=>u1t,tickStep:()=>wF,ticks:()=>Kne,toDegrees:()=>pki,toFixed:()=>Swe,toRadians:()=>tv,toReal:()=>Dne,zipObject:()=>K7e});oS=class{constructor(t=0,e=t,n=t,i=e){this.top=t,this.right=e,this.bottom=n,this.left=i}clear(){this.top=this.right=this.bottom=this.left=0}};Be([ut(es)],oS.prototype,"top",2);Be([ut(es)],oS.prototype,"right",2);Be([ut(es)],oS.prototype,"bottom",2);Be([ut(es)],oS.prototype,"left",2);MW=null;NIi=["stroke","lineDash"],VIi=pb(t=>vM(t)&&Object.keys(t).every(e=>NIi.includes(e)),"objects with gridline style properties such as 'stroke' or 'lineDash'"),Yne=class{constructor(){this.enabled=!0,this.width=1,this.style=[{stroke:void 0,lineDash:[]}]}};Be([ut(Ua)],Yne.prototype,"enabled",2);Be([ut(es)],Yne.prototype,"width",2);Be([ut(VIi)],Yne.prototype,"style",2);Pf=class{constructor(){this.enabled=!0,this.autoWrap=!1,this.maxWidth=void 0,this.maxHeight=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="rgba(87, 87, 87, 1)",this.rotation=void 0,this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1,this.formatter=void 0}getSideFlag(){return this.mirrored?1:-1}getFont(){return eS(this)}};Be([ut(Ua)],Pf.prototype,"enabled",2);Be([ut(Ua,{optional:!0})],Pf.prototype,"autoWrap",2);Be([ut(es,{optional:!0})],Pf.prototype,"maxWidth",2);Be([ut(es,{optional:!0})],Pf.prototype,"maxHeight",2);Be([ut(iS,{optional:!0})],Pf.prototype,"fontStyle",2);Be([ut(nS,{optional:!0})],Pf.prototype,"fontWeight",2);Be([ut(lh.restrict({min:1}))],Pf.prototype,"fontSize",2);Be([ut(Ps)],Pf.prototype,"fontFamily",2);Be([ut(es)],Pf.prototype,"padding",2);Be([ut(kF),gb(NaN)],Pf.prototype,"minSpacing",2);Be([ut(Jc,{optional:!0})],Pf.prototype,"color",2);Be([ut(MF,{optional:!0})],Pf.prototype,"rotation",2);Be([ut(Ua)],Pf.prototype,"avoidCollisions",2);Be([ut(Ua)],Pf.prototype,"mirrored",2);Be([ut(Ua)],Pf.prototype,"parallel",2);Be([ut(Ps,{optional:!0})],Pf.prototype,"format",2);AU=class{constructor(){this.enabled=!0,this.width=1,this.color=void 0}};Be([ut(Ua)],AU.prototype,"enabled",2);Be([ut(es)],AU.prototype,"width",2);Be([ut(Jc,{optional:!0})],AU.prototype,"color",2);BIi=cu(t=>wU(t)&&t>0||t instanceof tU,"a non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),x_=class{constructor(){this.enabled=!0,this.width=1,this.size=6,this.color=void 0,this.interval=void 0,this.values=void 0,this.minSpacing=NaN}};Be([ut(Ua)],x_.prototype,"enabled",2);Be([ut(es)],x_.prototype,"width",2);Be([ut(es)],x_.prototype,"size",2);Be([ut(Jc,{optional:!0})],x_.prototype,"color",2);Be([ut(BIi,{optional:!0})],x_.prototype,"interval",2);Be([ut(TU,{optional:!0})],x_.prototype,"values",2);Be([ut(Mft),gb(NaN)],x_.prototype,"minSpacing",2);Q7e=Math.PI*2,zIi=Q7e/2;F1t=(t=>(t[t.TickLine=0]="TickLine",t[t.TickLabel=1]="TickLabel",t[t.GridLine=2]="GridLine",t[t.GridArc=3]="GridArc",t[t.AxisLine=4]="AxisLine",t))(F1t||{}),PU=(()=>{let t=class L1t{constructor(n,i){this.moduleCtx=n,this.scale=i,this.id=kC(this),this.nice=!0,this.reverse=void 0,this.dataDomain={domain:[],clipped:!1},this.keys=[],this.boundSeries=[],this.includeInvisibleDomains=!1,this.axisGroup=new da({name:`${this.id}-axis`,zIndex:2}),this.lineNode=this.axisGroup.appendChild(new l0),this.tickLineGroup=this.axisGroup.appendChild(new da({name:`${this.id}-Axis-tick-lines`,zIndex:2})),this.tickLabelGroup=this.axisGroup.appendChild(new da({name:`${this.id}-Axis-tick-labels`,zIndex:2})),this.crossLineGroup=new da({name:`${this.id}-CrossLines`}),this.gridGroup=new da({name:`${this.id}-Axis-grid`}),this.gridLineGroup=this.gridGroup.appendChild(new da({name:`${this.id}-gridLines`,zIndex:1})),this.tickLineGroupSelection=Bm.select(this.tickLineGroup,l0,!1),this.tickLabelGroupSelection=Bm.select(this.tickLabelGroup,Wu,!1),this.gridLineGroupSelection=Bm.select(this.gridLineGroup,l0,!1),this.line=new AU,this.tick=this.createTick(),this.gridLine=new Yne,this.label=this.createLabel(),this.defaultTickMinSpacing=L1t.defaultTickMinSpacing,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{fractionDigits:0,padding:this.label.padding,format:this.label.format}},this.destroyFns=[],this.range=[0,1],this.visibleRange=[0,1],this.title=void 0,this._titleCaption=new Hm,this._gridLength=0,this.fractionDigits=0,this.gridPadding=0,this.seriesAreaPadding=0,this.tickGenerationResult=void 0,this.maxThickness=1/0,this.moduleMap=new w1t,this.refreshScale(),this._titleCaption.registerInteraction(this.moduleCtx),this._titleCaption.node.rotation=-Math.PI/2,this.axisGroup.appendChild(this._titleCaption.node),this.destroyFns.push(n.interactionManager.addListener("hover",s=>this.checkAxisHover(s))),this.animationManager=n.animationManager,this.animationState=new IU("empty",{empty:{update:{target:"ready",action:()=>this.resetSelectionNodes()}},ready:{update:s=>this.animateReadyUpdate(s),resize:()=>this.resetSelectionNodes()}}),this._crossLines=[],this.assignCrossLineArrayConstructor(this._crossLines);let r;this.destroyFns.push(n.layoutService.addListener("layout-complete",s=>{r!=null&&SC(s.chart,r)!=null&&this.animationState.transition("resize"),r=Ai({},s.chart)})),this.destroyFns.push(n.updateService.addListener("update-complete",s=>{this.minRect=s.minRect}))}get type(){var n;return(n=this.constructor.type)!=null?n:""}set crossLines(n){var i,r;(i=this._crossLines)==null||i.forEach(s=>this.detachCrossLine(s)),n&&this.assignCrossLineArrayConstructor(n),this._crossLines=n,(r=this._crossLines)==null||r.forEach(s=>{this.attachCrossLine(s),this.initCrossLine(s)})}get crossLines(){return this._crossLines}attachCrossLine(n){this.crossLineGroup.appendChild(n.group),this.crossLineGroup.appendChild(n.labelGroup)}detachCrossLine(n){this.crossLineGroup.removeChild(n.group),this.crossLineGroup.removeChild(n.labelGroup)}destroy(){this.moduleMap.destroy(),this.destroyFns.forEach(n=>n())}refreshScale(){var n;this.range=this.scale.range.slice(),(n=this.crossLines)==null||n.forEach(i=>{this.initCrossLine(i)})}updateRange(){var n;let{range:i,visibleRange:r,scale:s}=this,o=(i[1]-i[0])/(r[1]-r[0]),a=o*r[0],l=i[0]-a;s.range=[l,l+o],(n=this.crossLines)==null||n.forEach(c=>{c.clippedRange=[i[0],i[1]]})}setCrossLinesVisible(n){this.crossLineGroup.visible=n}attachAxis(n,i){i.appendChild(this.gridGroup),n.appendChild(this.axisGroup),n.appendChild(this.crossLineGroup)}detachAxis(n,i){i.removeChild(this.gridGroup),n.removeChild(this.axisGroup),n.removeChild(this.crossLineGroup)}inRange(n,i=0,r=0){let s=Math.min(...this.range),o=Math.max(...this.range);return n+i>=s-r&&n<=o+r}onLabelFormatChange(n,i){let{scale:r,fractionDigits:s}=this,a=!(r instanceof Bwe)&&s>0?l=>typeof l=="number"?l.toFixed(s):String(l):l=>String(l);if(i&&r&&r.tickFormat)try{this.labelFormatter=r.tickFormat({ticks:n,specifier:i})}catch{this.labelFormatter=a,Ns.warnOnce(`the axis label format string ${i} is invalid. No formatting will be applied`)}else this.labelFormatter=a}setDomain(){let{scale:n,dataDomain:{domain:i}}=this;n.domain=i}setTickInterval(n){var i;this.scale.interval=(i=this.tick.interval)!=null?i:n}setTickCount(n,i,r){let{scale:s}=this;if(n&&lu.is(s)){if(typeof n=="number"){s.tickCount=n,s.minTickCount=i??0,s.maxTickCount=r??1/0;return}s instanceof Hwe&&this.setTickInterval(n)}}set gridLength(n){var i;(this._gridLength&&!n||!this._gridLength&&n)&&this.gridLineGroupSelection.clear(),this._gridLength=n,(i=this.crossLines)==null||i.forEach(r=>{this.initCrossLine(r)})}get gridLength(){return this._gridLength}createTick(){return new x_}createLabel(){return new Pf}checkAxisHover(n){this.computeBBox().containsPoint(n.offsetX,n.offsetY)&&this.moduleCtx.chartEventManager.axisHover(this.id,this.direction)}update(n){if(!this.tickGenerationResult)return;let{rotation:i,parallelFlipRotation:r,regularFlipRotation:s}=this.calculateRotations(),o=this.label.getSideFlag();this.updatePosition();let a=this.getAxisLineCoordinates(),l=this.tickGenerationResult,{tickData:c,combinedRotation:d,textBaseline:u,textAlign:m}=l,f=W3(l,["tickData","combinedRotation","textBaseline","textAlign"]),_=this.tickLabelGroupSelection.nodes().map(x=>x.datum.tickId);if(this.updateSelections(a,c.ticks,{combinedRotation:d,textAlign:m,textBaseline:u,range:this.scale.range}),this.animationManager.isSkipped())this.resetSelectionNodes();else{let x=this.calculateUpdateDiff(_,c);this.animationState.transition("update",x)}return this.updateAxisLine(),this.updateLabels(),this.updateVisibility(),this.updateGridLines(o),this.updateTickLines(),this.updateTitle({anyTickVisible:c.ticks.length>0}),this.updateCrossLines({rotation:i,parallelFlipRotation:r,regularFlipRotation:s}),this.updateLayoutState(),n=f.primaryTickCount,n}getAxisLineCoordinates(){let{range:[n,i]}=this,r=0,s=Math.min(n,i),o=Math.max(n,i);return{x:r,y1:s,y2:o}}getTickLineCoordinates(n){let{label:i}=this,s=i.getSideFlag()*this.getTickSize(),o=Math.min(0,s),a=o+Math.abs(s),l=n.translationY;return{x1:o,x2:a,y:l}}getTickLabelProps(n,i){let{label:r}=this,{combinedRotation:s,textBaseline:o,textAlign:a,range:l}=i,c=n.tickLabel,u=r.getSideFlag()*(this.getTickSize()+r.padding+this.seriesAreaPadding),m=c!==""&&c!=null;return{tickId:n.tickId,translationY:n.translationY,fill:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontWeight:r.fontWeight,rotation:s,rotationCenterX:u,text:c,textAlign:a,textBaseline:o,visible:m,x:u,y:0,range:l}}getTickSize(){return this.tick.enabled?this.tick.size:this.createTick().size}setTitleProps(n,i){var r;let{title:s}=this;if(!s){n.enabled=!1;return}if(n.color=s.color,n.fontFamily=s.fontFamily,n.fontSize=s.fontSize,n.fontStyle=s.fontStyle,n.fontWeight=s.fontWeight,n.enabled=s.enabled,n.wrapping=s.wrapping,s.enabled){let o=n.node,a=((r=s.spacing)!=null?r:0)+i.spacing,l=this.label.getSideFlag(),c=k2(this.rotation),d=l===-1&&c>Math.PI&&c<Math.PI*2?-1:1,u=d*l*Math.PI/2,m=d===1?"bottom":"top",{range:f}=this,_=Math.floor(d*l*(f[0]+f[1])/2),x=Math.floor(l===-1?d*-a:-a),{callbackCache:D}=this.moduleCtx,{formatter:E=I=>I.defaultValue}=s,M=D.call(E,this.getTitleFormatterParams());o.setProperties({rotation:u,text:M,textBaseline:m,visible:!0,x:_,y:x})}}calculateLayout(n){var i;let{rotation:r,parallelFlipRotation:s,regularFlipRotation:o}=this.calculateRotations(),a=this.label.getSideFlag(),l=a*(this.getTickSize()+this.label.padding+this.seriesAreaPadding);this.updateScale(),this.tickGenerationResult=this.generateTicks({primaryTickCount:n,parallelFlipRotation:s,regularFlipRotation:o,labelX:l,sideFlag:a}),this.updateLayoutState();let c=this.tickGenerationResult,{tickData:d,combinedRotation:u,textBaseline:m,textAlign:f}=c,_=W3(c,["tickData","combinedRotation","textBaseline","textAlign"]),x=[],{x:D,y1:E,y2:M}=this.getAxisLineCoordinates(),I=new ml(D+Math.min(a*this.seriesAreaPadding,0),E,this.seriesAreaPadding,M-E);x.push(I);let{tick:z}=this;z.enabled&&d.ticks.forEach(ce=>{let{x1:ie,x2:le,y:Se}=this.getTickLineCoordinates(ce),je=new ml(ie,Se,le-ie,0);x.push(je)});let{label:G}=this;if(G.enabled){let ce=new Wu;d.ticks.forEach(ie=>{let le=this.getTickLabelProps(ie,{combinedRotation:u,textAlign:f,textBaseline:m,range:this.scale.range});if(!le.visible)return;ce.setProperties(cs(Ai({},le),{translationY:Math.round(ie.translationY)}));let Se=ce.computeTransformedBBox();Se&&x.push(Se)})}let A=ce=>{let ie=new g_,{rotation:le,translationX:Se,translationY:je,rotationCenterX:ze,rotationCenterY:Ge}=this.getAxisTransform();return g_.updateTransformMatrix(ie,1,1,le,Se,je,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:ze,rotationCenterY:Ge}),ie.transformBBox(ce)},{title:Y}=this;if(Y?.enabled){let ce=new Hm,ie=ml.merge(x).width;this.setTitleProps(ce,{spacing:ie});let Se=ce.node.computeTransformedBBox();Se&&x.push(Se)}let X=ml.merge(x),ne=A(X),pe=this.isAnySeriesActive();return(i=this.crossLines)==null||i.forEach(ce=>{var ie;ce.sideFlag=-a,ce.direction=r===-Math.PI/2?"x":"y",ce instanceof q7e&&(ce.label.parallel=(ie=ce.label.parallel)!=null?ie:this.label.parallel),ce.parallelFlipRotation=s,ce.regularFlipRotation=o,ce.calculateLayout(pe,this.reverse)}),n=_.primaryTickCount,{primaryTickCount:n,bbox:ne}}updateLayoutState(){this.layout.label={fractionDigits:this.fractionDigits,padding:this.label.padding,format:this.label.format}}updateScale(){this.updateRange(),this.calculateDomain(),this.setDomain(),this.setTickInterval(this.tick.interval);let{scale:n,nice:i}=this;lu.is(n)&&(n.nice=i,n.update())}calculateRotations(){let n=tv(this.rotation),i=k2(n),r=k2(n-Math.PI/2);return{rotation:n,parallelFlipRotation:i,regularFlipRotation:r}}generateTicks({primaryTickCount:n,parallelFlipRotation:i,regularFlipRotation:r,labelX:s,sideFlag:o}){var a;let{scale:l,tick:c,label:{parallel:d,rotation:u,fontFamily:m,fontSize:f,fontStyle:_,fontWeight:x}}=this,D=n!==void 0,{defaultRotation:E,configuredRotation:M,parallelFlipFlag:I,regularFlipFlag:z}=kne({rotation:u,parallel:d,regularFlipRotation:r,parallelFlipRotation:i}),G=M+E,A=new g_,{maxTickCount:Y}=this.estimateTickCount({minSpacing:c.minSpacing,maxSpacing:(a=c.maxSpacing)!=null?a:NaN}),ne=!lu.is(l)||isNaN(Y)?10:Y,pe=M7e(d,M,0,o,z),ce=Nki(d,M,o,I),ie={fontFamily:m,fontSize:f,fontStyle:_,fontWeight:x,textBaseline:ce,textAlign:pe},le={rawTicks:[],ticks:[],labelCount:0},Se=0,je=0,ze=!0,Ge=!1;for(;ze&&Se<=ne&&!Ge;){je=0,pe=M7e(d,M,0,o,z);let Ye=this.getTickStrategies({secondaryAxis:D,index:Se});for(let ft of Ye){({tickData:le,index:Se,autoRotation:je,terminate:Ge}=ft({index:Se,tickData:le,textProps:ie,labelOverlap:ze,terminate:Ge,primaryTickCount:n}));let Ft=M!==0||je!==0,Tt=G+je;pe=M7e(d,M,je,o,z),ze=this.checkLabelOverlap(Tt,Ft,A,le.ticks,s,cs(Ai({},ie),{textAlign:pe}))}}let Ae=E+M+je;return!D&&le.rawTicks.length>0&&(n=le.rawTicks.length),{tickData:le,primaryTickCount:n,combinedRotation:Ae,textBaseline:ce,textAlign:pe}}getTickStrategies({index:n,secondaryAxis:i}){let{scale:r,label:s,tick:o}=this,a=lu.is(r),l=s.enabled&&s.avoidCollisions,c=!a&&n!==0&&l,d=s.autoRotate===!0&&s.rotation===void 0,u=[],m;this.tick.values?m=3:i?m=1:c?m=2:m=0;let f=({index:_,tickData:x,primaryTickCount:D,terminate:E})=>this.createTickData(m,_,x,E,D);if(u.push(f),!a&&!isNaN(o.minSpacing)){let _=({index:x,tickData:D,primaryTickCount:E,terminate:M})=>this.createTickData(2,x,D,M,E);u.push(_)}if(!l)return u;if(s.autoWrap){let _=({index:x,tickData:D,textProps:E})=>this.wrapLabels(D,x,E);u.push(_)}else if(d){let _=({index:x,tickData:D,labelOverlap:E,terminate:M})=>({index:x,tickData:D,autoRotation:this.getAutoRotation(E),terminate:M});u.push(_)}return u}createTickData(n,i,r,s,o){var a;let{scale:l,tick:c}=this,{maxTickCount:d,minTickCount:u,defaultTickCount:m}=this.estimateTickCount({minSpacing:c.minSpacing,maxSpacing:(a=c.maxSpacing)!=null?a:NaN}),f=lu.is(l),_=!f||isNaN(d)?10:d,x=f?Math.max(m-i,u):d,D=c.interval===void 0&&c.values===void 0&&x>u&&(f||n===2),E=!0;for(;E&&i<=_;){let I=r.rawTicks;x=f?Math.max(m-i,u):d;let{rawTicks:z,ticks:G,labelCount:A}=this.getTicks({tickGenerationType:n,previousTicks:I,tickCount:x,minTickCount:u,maxTickCount:d,primaryTickCount:o});r.rawTicks=z,r.ticks=G,r.labelCount=A,E=D?AIi(z,I):!1,i++}let M=c.interval!==void 0||c.values!==void 0;return s||(s=M),{tickData:r,index:i,autoRotation:0,terminate:s}}checkLabelOverlap(n,i,r,s,o,a){g_.updateTransformMatrix(r,1,1,n,0,0);let l=this.createLabelData(s,o,a,r),c=Oki(this.label.minSpacing,i);return OIi(l,c)}createLabelData(n,i,r,s){let o=[];for(let a of n){let{tickLabel:l,translationY:c}=a;if(l===""||l==null)continue;let d=Bft(l),{width:u,height:m}=Aki(d,i,c,r),f=new ml(i,c,u,m),_=Vki(l,f,i,c,s);o.push(_)}return o}getAutoRotation(n){var i;return n?k2(tv((i=this.label.autoRotateAngle)!=null?i:0)):0}getTicks({tickGenerationType:n,previousTicks:i,tickCount:r,minTickCount:s,maxTickCount:o,primaryTickCount:a}){var l;let{range:c,scale:d,visibleRange:u}=this,m=[];switch(n){case 3:if(lu.is(d)){let I=d.getDomain(),z=d.fromDomain(I[0]),G=d.fromDomain(I[1]),A=Math.min(z,G),Y=Math.max(z,G);m=this.tick.values.filter(X=>X>=A&&X<=Y).sort((X,ne)=>X-ne)}else m=this.tick.values;break;case 1:m=this.updateSecondaryAxisTicks(a);break;case 2:m=this.filterTicks(i,r);break;default:m=this.createTicks(r,s,o);break}this.fractionDigits=m.fractionDigits>=0?m.fractionDigits:0,this.onLabelFormatChange(m,this.label.format);let f=((l=d.bandwidth)!=null?l:0)/2,_=[],x=0,D=new Map,E=Math.max(0,Math.floor(u[0]*m.length)),M=Math.min(m.length,Math.ceil(u[1]*m.length));for(let I=E;I<M;I++){let z=m[I],G=d.convert(z)+f;if(c.length>0&&!this.inRange(G,0,.001))continue;let A=this.formatTick(z,I),Y=A;if(D.has(Y)){let X=D.get(Y);D.set(Y,X+1),Y=`${Y}_${X}`}else D.set(Y,1);_.push({tick:z,tickId:Y,tickLabel:A,translationY:G}),!(A===""||A==null)&&x++}return{rawTicks:m,ticks:_,labelCount:x}}filterTicks(n,i){var r;let o=!isNaN(this.tick.minSpacing)||!isNaN((r=this.tick.maxSpacing)!=null?r:NaN)?Math.ceil(n.length/i):2;return n.filter((a,l)=>l%o===0)}createTicks(n,i,r){var s,o,a;return this.setTickCount(n,i,r),(a=(o=(s=this.scale).ticks)==null?void 0:o.call(s))!=null?a:[]}estimateTickCount({minSpacing:n,maxSpacing:i}){let{minRect:r}=this,s=this.calculateRangeWithBleed(),o=Math.max(this.defaultTickMinSpacing,s/lu.defaultMaxTickCount),a=!isNaN(i);isNaN(n)&&(n=o),isNaN(i)&&(i=s),n>i&&(n===o?n=i:i=n);let l=r?this.direction==="x"?r.width:r.height:1;a&&(a=l<o);let c=ev(1,Math.floor(s/n),a?Math.floor(s/l):1/0),d=Math.min(c,Math.ceil(s/i)),u=ev(d,lu.defaultTickCount,c);return{minTickCount:d,maxTickCount:c,defaultTickCount:u}}updateVisibility(){this.moduleCtx.animationManager.isSkipped()&&this.resetSelectionNodes(),this.tickLineGroup.visible=this.tick.enabled,this.gridLineGroup.visible=this.gridLine.enabled,this.tickLabelGroup.visible=this.label.enabled}updateCrossLines({rotation:n,parallelFlipRotation:i,regularFlipRotation:r}){var s;let o=this.label.getSideFlag(),a=this.isAnySeriesActive();(s=this.crossLines)==null||s.forEach(l=>{var c;l.sideFlag=-o,l.direction=n===-Math.PI/2?"x":"y",l instanceof q7e&&(l.label.parallel=(c=l.label.parallel)!=null?c:this.label.parallel),l.parallelFlipRotation=i,l.regularFlipRotation=r,l.update(a)})}updateTickLines(){let{tick:n,label:i}=this,r=i.getSideFlag();this.tickLineGroupSelection.each(s=>{s.strokeWidth=n.width,s.stroke=n.color,s.x1=r*this.getTickSize(),s.x2=0})}calculateAvailableRange(){let{range:n}=this,i=Math.min(...n);return Math.max(...n)-i}calculateRangeWithBleed(){let{visibleRange:n}=this,i=1/(n[1]-n[0]);return wwe(this.calculateAvailableRange()*i,2)}calculateDomain(){if(this.linkedTo)this.dataDomain=this.linkedTo.dataDomain;else{let i=this.boundSeries.filter(o=>this.includeInvisibleDomains||o.isEnabled()).flatMap(o=>o.getDomain(this.direction)),{domain:r,clipped:s}=this.normaliseDataDomain(i);this.dataDomain={domain:this.reverse?[...r].reverse():r,clipped:s}}}getAxisTransform(){return{rotation:tv(this.rotation),rotationCenterX:0,rotationCenterY:0,translationX:Math.floor(this.translation.x),translationY:Math.floor(this.translation.y)}}updatePosition(){let{crossLineGroup:n,axisGroup:i,gridGroup:r,translation:s,gridLineGroupSelection:o,gridPadding:a,gridLength:l}=this,{rotation:c}=this.calculateRotations(),d=this.label.getSideFlag(),u=Math.floor(s.x),m=Math.floor(s.y);n.setProperties({rotation:c,translationX:u,translationY:m}),i.datum=this.getAxisTransform(),r.setProperties({rotation:c,translationX:u,translationY:m}),o.each(f=>{f.x1=a,f.x2=-d*l+a})}updateSecondaryAxisTicks(n){throw new Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")}updateSelections(n,i,r){this.lineNode.datum=n,this.gridLineGroupSelection.update(this.gridLength?i:[],s=>s.append(new l0({tag:2})),s=>s.tickId),this.tickLineGroupSelection.update(i,s=>s.appendChild(new l0({tag:0})),s=>s.tickId),this.tickLabelGroupSelection.update(i.map(s=>this.getTickLabelProps(s,r)),s=>s.appendChild(new Wu({tag:1})),s=>s.tickId)}updateAxisLine(){let{line:n}=this,i=n.enabled?n.width:0;this.lineNode.setProperties({stroke:n.color,strokeWidth:i})}updateGridLines(n){let{gridLine:{style:i,width:r},gridPadding:s,gridLength:o}=this;o===0||i.length===0||this.gridLineGroupSelection.each((a,l,c)=>{let{stroke:d,lineDash:u}=i[c%i.length];a.setProperties({x1:s,x2:-n*o+s,fill:void 0,stroke:d,strokeWidth:r,lineDash:u})})}updateLabels(){let{label:n}=this;n.enabled&&this.tickLabelGroupSelection.each((i,r)=>{i.setProperties(r,["fill","fontFamily","fontSize","fontStyle","fontWeight","text","textAlign","textBaseline"])})}wrapLabels(n,i,r){let{parallel:s,maxWidth:o,maxHeight:a}=this.label,l=this.maxThickness,c=Math.round(this.calculateAvailableRange()/n.labelCount);return s&&([l,c]=[c,l]),n.ticks.forEach(d=>{let{text:u}=Wu.wrap(d.tickLabel,o??l,a??c,r,"hyphenate");d.tickLabel=u}),{tickData:n,index:i,autoRotation:0,terminate:!0}}updateTitle(n){let{rotation:i,title:r,_titleCaption:s,lineNode:o,tickLineGroup:a,tickLabelGroup:l}=this;if(!r){s.enabled=!1;return}let c=0;if(r.enabled&&n.anyTickVisible){let d=da.computeBBox([a,l,o]),u=i===0?d.width:d.height;c+=u+(this.tickLabelGroup.visible?0:this.seriesAreaPadding)}this.setTitleProps(s,{spacing:c})}formatTick(n,i){var r,s;let{label:o,labelFormatter:a,fractionDigits:l,moduleCtx:{callbackCache:c}}=this;if(o.formatter){let d=l>0?n:String(n);return(r=c.call(o.formatter,{value:d,index:i,fractionDigits:l,formatter:a}))!=null?r:d}else if(a)return(s=c.call(a,n))!=null?s:String(n);return String(n)}formatDatum(n){return String(n)}computeBBox(){return this.axisGroup.computeBBox()}initCrossLine(n){n.scale=this.scale,n.gridLength=this.gridLength}isAnySeriesActive(){return this.boundSeries.some(n=>this.includeInvisibleDomains||n.isEnabled())}clipTickLines(n,i,r,s){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new ml(n,i,r,s))}clipGrid(n,i,r,s){this.gridGroup.setClipRectInGroupCoordinateSpace(new ml(n,i,r,s))}calculatePadding(n,i,r){let s=r?i:n;return[Math.abs(s*.01),Math.abs(s*.01)]}getTitleFormatterParams(){var n;let i=this.boundSeries.reduce((r,s)=>{let o=s.getKeys(this.direction),a=s.getNames(this.direction);for(let l=0;l<o.length;l++)r.push({key:o[l],name:a[l]});return r},[]);return{direction:this.direction,boundSeries:i,defaultValue:(n=this.title)==null?void 0:n.text}}normaliseDataDomain(n){return{domain:n,clipped:!1}}getLayoutState(){return Ai({rect:this.computeBBox(),gridPadding:this.gridPadding,seriesAreaPadding:this.seriesAreaPadding,tickSize:this.getTickSize()},this.layout)}getModuleMap(){return this.moduleMap}createModuleContext(){var n;return(n=this.axisContext)!=null||(this.axisContext=this.createAxisContext()),cs(Ai({},this.moduleCtx),{parent:this.axisContext})}createAxisContext(){return{axisId:this.id,direction:this.direction,continuous:lu.is(this.scale),keys:()=>this.boundSeries.flatMap(n=>n.getKeys(this.direction)),scaleValueFormatter:n=>{var i,r;return(r=(i=this.scale).tickFormat)==null?void 0:r.call(i,{specifier:n})},scaleBandwidth:()=>{var n;return(n=this.scale.bandwidth)!=null?n:0},scaleConvert:n=>this.scale.convert(n),scaleInvert:n=>{var i,r;return(r=(i=this.scale).invert)==null?void 0:r.call(i,n)}}}animateReadyUpdate(n){let{animationManager:i}=this.moduleCtx,r=X7e(this),s=k1t(r);Vm(this.id,"axis-group",i,[this.axisGroup],s.group),Vm(this.id,"line",i,[this.lineNode],s.line),Vm(this.id,"line-paths",i,[this.gridLineGroupSelection,this.tickLineGroupSelection],s.tick,(o,a)=>a.tickId,n),Vm(this.id,"tick-labels",i,[this.tickLabelGroupSelection],s.label,(o,a)=>a.tickId,n)}resetSelectionNodes(){let{gridLineGroupSelection:n,tickLineGroupSelection:i,tickLabelGroupSelection:r,lineNode:s}=this,o=X7e(this);x1([this.axisGroup],I1t()),x1([n,i],A1t(o)),x1([r],P1t()),x1([s],R1t())}calculateUpdateDiff(n,i){let r=new Set,s=new Set,o={},a=Math.max(n.length,i.ticks.length);for(let l=0;l<a;l++){let c=i.ticks[l],d=n[l],u=c?.tickId;o[u??d]=c,d!==u&&(s.has(u)?s.delete(u):u&&r.add(u),r.has(d)?r.delete(d):d&&s.add(d))}return{changed:r.size>0||s.size>0,added:[...r.values()],removed:[...s.values()]}}isReversed(){return!!this.reverse}};return t.defaultTickMinSpacing=50,t})();Be([ut(Ua)],PU.prototype,"nice",2);Be([ut(Ua,{optional:!0})],PU.prototype,"reverse",2);Be([ut(bft)],PU.prototype,"keys",2);Be([ut(cu(t=>typeof t=="object","Title object"),{optional:!0})],PU.prototype,"title",2);Gwe=PU,Wwe=class extends Pf{constructor(){super(...arguments),this.autoRotateAngle=335}};Be([ut(Ua,{optional:!0})],Wwe.prototype,"autoRotate",2);Be([ut(MF)],Wwe.prototype,"autoRotateAngle",2);TM=class extends Gwe{constructor(){super(...arguments),this.thickness=0,this.position="left"}get direction(){return["top","bottom"].includes(this.position)?"x":"y"}updateDirection(){switch(this.position){case"top":this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1;break}this.axisContext&&(this.axisContext.position=this.position,this.axisContext.direction=this.direction)}update(t){return this.updateDirection(),super.update(t)}calculateLayout(t){return this.updateDirection(),super.calculateLayout(t)}createAxisContext(){return cs(Ai({},super.createAxisContext()),{position:this.position})}assignCrossLineArrayConstructor(t){Hft(t,q7e)}createLabel(){return new Wwe}};Be([ut(es)],TM.prototype,"thickness",2);Be([ut(Iwe)],TM.prototype,"position",2);_M=(()=>{let t=class extends TM{constructor(e){super(e,new TC),this._paddingOverrideEnabled=!1,this.groupPaddingInner=.1,this.includeInvisibleDomains=!0}set paddingInner(e){this._paddingOverrideEnabled=!0,this.scale.paddingInner=e}get paddingInner(){return this._paddingOverrideEnabled=!0,this.scale.paddingInner}set paddingOuter(e){this.scale.paddingOuter=e}get paddingOuter(){return this.scale.paddingOuter}normaliseDataDomain(e){let n=[],i=new Set;for(let r of e){let s=r instanceof Date?r.getTime():r;i.has(s)||(i.add(s),n.push(r))}return{domain:n,clipped:!1}}calculateDomain(){if(!this._paddingOverrideEnabled){let e=this.boundSeries.map(n=>{var i;return(i=n.getBandScalePadding)==null?void 0:i.call(n)}).filter(n=>n!=null);e.length>0&&(this.scale.paddingInner=Math.min(...e.map(n=>n.inner)),this.scale.paddingOuter=Math.max(...e.map(n=>n.outer)))}return super.calculateDomain()}};return t.className="CategoryAxis",t.type="category",t})();Be([ut(Bh)],_M.prototype,"groupPaddingInner",2);O1t=class{constructor(t="",e,n=0){this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=t,this.parent=e,this.depth=e?e.depth+1:0,this.number=n}getLeftSibling(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0}getLeftmostSibling(){return this.number>0&&this.parent?this.parent.children[0]:void 0}nextLeft(){return this.children?this.children[0]:this.thread}nextRight(){return this.children?this.children[this.children.length-1]:this.thread}getSiblings(){return this.parent?this.parent.children.filter((t,e)=>e!==this.number):[]}};Fmt=class{constructor(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}update(t,e){let{x:n,y:i}=e(t);n>this.right&&(this.right=n),n<this.left&&(this.left=n),i>this.bottom&&(this.bottom=i),i<this.top&&(this.top=i)}};qIi=class{constructor(){this.dimensions=new Fmt,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}update(t){this.dimensions.update(t,e=>({x:e.x,y:e.y})),t.children.length?this.nonLeafNodes.push(t):(this.leafCount++,this.leafNodes.push(t)),t.depth>this.depth&&(this.depth=t.depth),this.nodes.push(t)}resize(t,e,n=0,i=0,r=!1){let s=this.leafCount-1,o=this.depth,a=this.dimensions,l=1,c=1;if(t>0&&s){let f=(a.right-a.left)/s;l=t/s/f,r&&(l=-l)}if(e>0&&o){let f=(a.bottom-a.top)/o;c=e/o/f}let d=new Fmt;this.nodes.forEach(f=>{f.screenX=f.x*l,f.screenY=f.y*c,d.update(f,_=>({x:_.screenX,y:_.screenY}))});let u=-d.left,m=-d.top;this.nodes.forEach(f=>{f.screenX+=u+n,f.screenY+=m+i})}},z1t=class extends Pf{constructor(){super(...arguments),this.grid=!1}};Be([ut(Ua)],z1t.prototype,"grid",2);hU=(()=>{let t=class extends TM{constructor(e){super(e,new TC),this.tickScale=new TC,this.line=new AU,this.label=new z1t,this.labelColor="rgba(87, 87, 87, 1)",this.includeInvisibleDomains=!0;let{tickLineGroup:n,tickLabelGroup:i,gridLineGroup:r,tickScale:s,scale:o}=this;o.paddingOuter=.1,o.paddingInner=o.paddingOuter*2,this.range=o.range.slice(),this.refreshScale(),s.paddingInner=1,s.paddingOuter=0,this.gridLineSelection=Bm.select(r,l0),this.axisLineSelection=Bm.select(n,l0),this.separatorSelection=Bm.select(n,l0),this.labelSelection=Bm.select(i,Wu)}updateRange(){let{range:e,visibleRange:n,scale:i}=this,r=(e[1]-e[0])/(n[1]-n[0]),s=r*n[0],o=e[0]-s;this.tickScale.range=i.range=[o,o+r],this.resizeTickTree()}resizeTickTree(){var e;let n=this.scale,i=n.domain.length?[n.convert(n.domain[0]),n.convert(n.domain[n.domain.length-1])]:n.range,r=this.tickTreeLayout,s=this.lineHeight;r&&r.resize(Math.abs(i[1]-i[0]),r.depth*s,(Math.min(i[0],i[1])||0)+((e=n.bandwidth)!=null?e:0)/2,-r.depth*s,i[1]-i[0]<0)}get lineHeight(){return this.label.fontSize*1.5}set gridLength(e){(this._gridLength&&!e||!this._gridLength&&e)&&(this.gridLineSelection.clear(),this.labelSelection.clear()),this._gridLength=e}get gridLength(){return this._gridLength}calculateDomain(){var e;let{direction:n}=this,i=[],r;this.boundSeries.filter(d=>d.visible).forEach(d=>{if(n==="x")if(r===void 0){let u=d.getDomain(n);i.push(u),r=typeof u[0]=="number"}else r&&i.push(d.getDomain(n));else i.push(d.getDomain(n))});let s=new Array().concat(...i),o=(e=EC(s))!=null?e:s,a=this.reverse?[...o].reverse():o,{domain:l,clipped:c}=this.normaliseDataDomain(a);this.dataDomain={domain:l,clipped:c},this.scale.domain=l}normaliseDataDomain(e){let n=e.filter((s,o,a)=>a.indexOf(s)===o),i=GIi(n);this.tickTreeLayout=YIi(i);let r=n.slice();return r.push(""),this.tickScale.domain=r,this.resizeTickTree(),{domain:n,clipped:!1}}update(){this.computedLayout&&(this.updatePosition(),this.updateTitleCaption(),this.updateCategoryLabels(),this.updateSeparators(),this.updateAxisLines(),this.updateCategoryGridLines(),this.resetSelectionNodes())}updateTitleCaption(){let{_titleCaption:e}=this;e.node.visible=!1}updateCategoryLabels(){if(!this.computedLayout)return;let{tickLabelLayout:e}=this.computedLayout;this.labelSelection.update(e).each((i,r)=>{i.setProperties(r)})}updateSeparators(){if(!this.computedLayout)return;let{separatorLayout:e}=this.computedLayout,{range:n}=this,i=1e-7;this.separatorSelection.update(e).each((s,o)=>{s.x1=o.x1,s.x2=o.x2,s.y1=o.y,s.y2=o.y,s.visible=o.y>=n[0]-i&&o.y<=n[1]+i,s.stroke=this.tick.color,s.fill=void 0,s.strokeWidth=1})}updateAxisLines(){if(!this.computedLayout)return;let{axisLineLayout:e}=this.computedLayout;this.axisLineSelection.update(e).each((i,r)=>{i.setProperties(cs(Ai({},r),{stroke:this.line.color,strokeWidth:this.line.width})),i.x1=r.x,i.x2=r.x,i.y1=r.y1,i.y2=r.y2,i.strokeWidth=this.line.width,i.stroke=this.line.color})}updateCategoryGridLines(){let{gridLength:e,gridLine:n,label:i,range:r,tickScale:s}=this,o=s.ticks(),a=i.getSideFlag(),l=this.gridLineSelection.update(e?o:[]);if(e){let{width:c,style:d}=n,u=d.length;l.each((m,f,_)=>{let x=Math.round(s.convert(f));m.x1=0,m.x2=-a*e,m.y1=x,m.y2=x,m.visible=x>=r[0]&&x<=r[1];let{stroke:D,lineDash:E}=d[_%u];m.stroke=D,m.strokeWidth=c,m.lineDash=E,m.fill=void 0})}}computeLayout(){this.updateDirection(),this.calculateDomain(),this.updateRange();let{scale:e,label:n,label:{parallel:i},moduleCtx:{callbackCache:r},range:s,title:o,title:{formatter:a=Re=>Re.defaultValue}={}}=this,l=e.range[0],c=e.range[1],u=Math.abs(c-l)/e.domain.length||0,m=tv(this.rotation),f=Math.abs(Math.cos(m))<1e-8,_=n.getSideFlag(),x=this.lineHeight,D=this.tickTreeLayout,E=e.ticks(),M=D?D.nodes:[],I=D?D.depth>1:!1,{defaultRotation:z,configuredRotation:G,parallelFlipFlag:A}=kne({rotation:n.rotation,parallel:i,regularFlipRotation:k2(m-Math.PI/2),parallelFlipRotation:k2(m)}),Y=[],X=Re=>({fill:Re.fill,fontFamily:Re.fontFamily,fontSize:Re.fontSize,fontStyle:Re.fontStyle,fontWeight:Re.fontWeight,rotation:Re.rotation,rotationCenterX:Re.rotationCenterX,rotationCenterY:Re.rotationCenterY,text:Re.text,textAlign:Re.textAlign,textBaseline:Re.textBaseline,translationX:Re.translationX,translationY:Re.translationY,visible:Re.visible,x:Re.x,y:Re.y}),ne=new Map,pe=0,ce=new Wu,ie=(Re,ot)=>{var jt;if(ce.setProperties({fill:n.color,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontWeight:n.fontWeight,textAlign:"center",textBaseline:A===-1?"bottom":"hanging",translationX:Re.screenY-n.fontSize*.25,translationY:Re.screenX}),ot===0){if(!(o?.enabled&&E.length>0))return!1;let qt=r.call(a,this.getTitleFormatterParams());ce.setProperties({fill:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,text:qt,textBaseline:"hanging",translationX:Re.screenY-n.fontSize*.25,translationY:Re.screenX})}else{if(!(Re.screenX>=s[0]&&Re.screenX<=s[1]))return!1;n.formatter?ce.text=(jt=r.call(n.formatter,{value:String(Re.label),index:ot}))!=null?jt:String(Re.label):ce.text=String(Re.label)}return!0};M.forEach((Re,ot)=>{if(ie(Re,ot)){let zt=ce.computeTransformedBBox();zt&&(ne.set(ot,zt),!Re.children.length&&zt.width>pe&&(pe=zt.width))}});let le=_*n.padding,Se=this.label.grid,je=[];M.forEach((Re,ot)=>{let jt=ie(Re,ot),zt=ot;ce.x=le,ce.rotationCenterX=le;let qt=!Re.children.length;if(qt){ce.rotation=G,ce.textAlign="end",ce.textBaseline="middle";let _i=ne.get(zt);_i&&_i.height>u&&(jt=!1,ne.delete(zt))}else{ce.translationX-=pe-x+this.label.padding;let _i=Re.leafCount*u,ln=ne.get(zt);ln&&ln.width>_i?(jt=!1,ne.delete(zt)):f?ce.rotation=z:ce.rotation=-Math.PI/2}if(Re.parent&&I){let _i=qt?Re.screenX-u/2:Re.screenX-Re.leafCount*u/2;if(qt)(Re.number!==Re.children.length-1||Se)&&je.push({y:_i,x1:0,x2:-pe-this.label.padding*2});else{let ln=-pe-this.label.padding*2+Re.screenY;je.push({y:_i,x1:ln+x,x2:ln})}}let ui;if(jt){let _i=ce.computeTransformedBBox();_i&&ne.set(ot,_i),ui=cs(Ai({},X(ce)),{visible:jt})}else ne.delete(ot),ui={visible:jt};Y.push(ui)});let ze=0;je.forEach(Re=>ze=Math.min(ze,Re.x2)),je.push({y:Math.max(l,c),x1:0,x2:ze});let Ge=[],Ae=[],Ye=1e-7;je.forEach(Re=>{if(Re.y>=s[0]-Ye&&Re.y<=s[1]+Ye){let{x1:ot,x2:jt,y:zt}=Re,qt=new ml(Math.min(ot,jt),zt,Math.abs(ot-jt),0);Ae.push(qt),Ge.push({x1:ot,x2:jt,y:zt})}});let ft=[],Ft=[],Tt=D?D.depth+1:1;for(let Re=0;Re<Tt;Re++){let ot=E.length>0&&(Re===0||Se&&I),jt=Re>0?-pe-this.label.padding*2-(Re-1)*x:0,zt=new ml(jt,Math.min(...s),0,Math.abs(s[1]-s[0]));Ft.push(zt),ft.push({x:jt,y1:s[0],y2:s[1],visible:ot})}let at=Re=>{let ot=new g_,{rotation:jt,translationX:zt,translationY:qt,rotationCenterX:ui,rotationCenterY:_i}=this.getAxisTransform();return g_.updateTransformMatrix(ot,1,1,jt,zt,qt,{scalingCenterX:0,scalingCenterY:0,rotationCenterX:ui,rotationCenterY:_i}),ot.transformBBox(Re)},yt=ml.merge([...ne.values(),...Ae,...Ft]);return{bbox:at(yt),tickLabelLayout:Y,separatorLayout:Ge,axisLineLayout:ft}}calculateLayout(){let{axisLineLayout:e,separatorLayout:n,tickLabelLayout:i,bbox:r}=this.computeLayout();return this.computedLayout={axisLineLayout:e,separatorLayout:n,tickLabelLayout:i},{bbox:r,primaryTickCount:void 0}}};return t.className="GroupedCategoryAxis",t.type="grouped-category",t})();Be([ut(Jc,{optional:!0})],hU.prototype,"labelColor",2);XIi=class{constructor(){this.cache=new WeakMap}call(t,...e){let n,i=this.cache.get(t),r=()=>{try{let s=t(...e);return i&&n!=null&&i.set(n,s),s}catch(s){Ns.warnOnce("User callback errored, ignoring",s);return}};try{n=JSON.stringify(e)}catch{return r()}return i==null&&(i=new Map,this.cache.set(t,i)),i.has(n)?i.get(n):r()}invalidateCache(){this.cache=new WeakMap}},QIi=class{constructor(){this.available=!0,this.acquireQueue=[]}acquire(t){return new Promise(e=>{this.acquireQueue.push([t,e]),this.available&&this.dispatchNext()})}acquireImmediately(t){return mr(this,null,function*(){return this.available?(yield this.acquire(t),!0):!1})}waitForClearAcquireQueue(){return mr(this,null,function*(){return this.acquire(()=>mr(this,null,function*(){}))})}dispatchNext(){return mr(this,null,function*(){var t,e;this.available=!1;let[n,i]=(t=this.acquireQueue.shift())!=null?t:[];for(;n;){try{yield n(),i?.()}catch(r){Ns.error("mutex callback error",r),i?.()}[n,i]=(e=this.acquireQueue.shift())!=null?e:[]}this.available=!0})}},H1t=class{constructor(){this.eventListeners=new Map}addEventListener(t,e){if(typeof e!="function")throw new Error("AG Charts - listener must be a Function");let n=this.eventListeners.get(t);n?n.add(e):this.eventListeners.set(t,new Set([e]))}removeEventListener(t,e){var n;(n=this.eventListeners.get(t))==null||n.delete(e),this.eventListeners.size===0&&this.eventListeners.delete(t)}hasEventListener(t){return this.eventListeners.has(t)}clearEventListeners(){this.eventListeners.clear()}fireEvent(t){var e;(e=this.eventListeners.get(t.type))==null||e.forEach(n=>n(t))}};Lmt=(()=>{let t=class{static init(e){var n;if(typeof ResizeObserver<"u")this.resizeObserver=new ResizeObserver(i=>{for(let r of i){let{width:s,height:o}=r.contentRect;this.checkSize(this.elements.get(r.target),r.target,s,o)}});else{let i=()=>{this.elements.forEach((r,s)=>{this.checkClientSize(s,r)})};this.pollerHandler=(n=e.defaultView)==null?void 0:n.setInterval(i,100)}this.ownerDocument=e,this.ready=!0,this.documentReady=e.readyState!=="loading",!this.documentReady&&(this.readyEventFn=()=>{let i=e.readyState!=="loading",r=this.documentReady;if(this.documentReady=i,!!i&&i!==r){for(let[s,o]of this.queuedObserveRequests)this.observe(s,o);this.queuedObserveRequests.length=0}},e.addEventListener("DOMContentLoaded",this.readyEventFn))}static destroy(){var e,n;this.pollerHandler!=null&&(clearInterval(this.pollerHandler),this.pollerHandler=void 0),this.readyEventFn&&((e=this.ownerDocument)==null||e.removeEventListener("DOMContentLoaded",this.readyEventFn),this.readyEventFn=void 0),(n=this.resizeObserver)==null||n.disconnect(),this.resizeObserver=void 0,this.ready=!1,this.ownerDocument=void 0}static checkSize(e,n,i,r){e&&(!e.size||i!==e.size.width||r!==e.size.height)&&(e.size={width:i,height:r},e.cb(e.size,n))}static observe(e,n){if(this.ready||this.init(e.ownerDocument),!this.documentReady){this.queuedObserveRequests.push([e,n]);return}this.unobserve(e,!1),this.resizeObserver&&this.resizeObserver.observe(e),this.elements.set(e,{cb:n})}static unobserve(e,n=!0){this.resizeObserver&&this.resizeObserver.unobserve(e),this.elements.delete(e),this.queuedObserveRequests=this.queuedObserveRequests.filter(([i])=>i===e),n&&this.elements.size===0&&this.destroy()}static checkClientSize(e,n){var i,r;let s=(i=e.clientWidth)!=null?i:0,o=(r=e.clientHeight)!=null?r:0;this.checkSize(n,e,s,o)}};return t.elements=new Map,t.ready=!1,t.documentReady=!1,t.queuedObserveRequests=[],t})(),W1t=class{constructor(){this.range="tooltip"}};Be([ut(Gm(["tooltip","node"],"a range"))],W1t.prototype,"range",2);pU=(t=>(t[t.FULL=0]="FULL",t[t.PROCESS_DATA=1]="PROCESS_DATA",t[t.PERFORM_LAYOUT=2]="PERFORM_LAYOUT",t[t.SERIES_UPDATE=3]="SERIES_UPDATE",t[t.TOOLTIP_RECALCULATION=4]="TOOLTIP_RECALCULATION",t[t.SCENE_RENDER=5]="SCENE_RENDER",t[t.NONE=6]="NONE",t))(pU||{}),P7e=class{constructor(t){this.type=t,this.continuousDomain=[1/0,-1/0],this.discreteDomain=new Set}extend(t){this.type==="discrete"?this.discreteDomain.add(t):this.type==="continuous"&&(this.continuousDomain[0]>t&&(this.continuousDomain[0]=t),this.continuousDomain[1]<t&&(this.continuousDomain[1]=t))}getDomain(){if(this.type==="discrete")return this.discreteDomain;if(this.type==="continuous")return this.continuousDomain;throw new Error("AG Charts - Unsupported data domain type: "+this.type)}};sM=Symbol("invalid"),U1t=class{constructor(t){let{props:e,mode:n="standalone"}=t;this.mode=n;let i=!0;for(let o of e){if(o.type==="key"&&!i)throw new Error("AG Charts - internal config error: keys must come before values.");o.type==="value"&&i&&(i=!1)}this.opts=Ai({dataVisible:!0},t),this.keys=e.filter(o=>o.type==="key").map((o,a)=>cs(Ai({},o),{index:a,missing:0})),this.values=e.filter(o=>o.type==="value").map((o,a)=>cs(Ai({},o),{index:a,missing:0})),this.aggregates=e.filter(o=>o.type==="aggregate").map((o,a)=>cs(Ai({},o),{index:a})),this.groupProcessors=e.filter(o=>o.type==="group-value-processor").map((o,a)=>cs(Ai({},o),{index:a})),this.propertyProcessors=e.filter(o=>o.type==="property-value-processor").map((o,a)=>cs(Ai({},o),{index:a})),this.reducers=e.filter(o=>o.type==="reducer").map((o,a)=>cs(Ai({},o),{index:a})),this.processors=e.filter(o=>o.type==="processor").map((o,a)=>cs(Ai({},o),{index:a}));for(let o of this.values)if(o.property==null)throw new Error(`AG Charts - internal config error: no properties specified for value definitions: ${JSON.stringify(o)}`);let r=({matchGroupIds:o})=>{for(let a of o??[])if(!this.values.some(l=>l.groupId===a))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${a}).`)},s=({matchIds:o})=>{for(let a of o??[])if(!this.values.some(l=>{var c;return(c=l.ids)==null?void 0:c.some(([d,u])=>d===a[0]&&u===a[1])}))throw new Error(`AG Charts - internal config error: matchGroupIds properties must match defined groups (${a}).`)};for(let o of[...this.groupProcessors,...this.aggregates])s(o),r(o)}resolveProcessedDataIndexById(t,e){var n;let{index:i,def:r}=(n=this.resolveProcessedDataDefById(t,e))!=null?n:{};return{index:i,def:r}}resolveProcessedDataIndicesById(t,e){return this.resolveProcessedDataDefsById(t,e).map(({index:n,def:i})=>({index:n,def:i}))}resolveProcessedDataDefById(t,e){return this.resolveProcessedDataDefsById(t,e)[0]}resolveProcessedDataDefsByIds(t,e){let n=[];for(let i of e)n.push([i,this.resolveProcessedDataDefsById(t,i)]);return n}resolveProcessedDataDefsValues(t,{keys:e,values:n}){let i={};for(let[r,[{index:s,def:o}]]of t){let a=o.type==="key"?e:n;i[r]=a[s]}return i}resolveProcessedDataDefsById(t,e){let{keys:n,values:i,aggregates:r,groupProcessors:s,reducers:o}=this,a=d=>{let{ids:u,scopes:m}=d;return u==null||t!=null&&!m?.some(f=>f===t.id)?!1:u.some(([f,_])=>f===t.id&&(typeof e=="string"?_===e:e.test(_)))},l=[n,i,r,s,o],c=[];for(let d of l)c.push(...d.filter(a).map(u=>({index:u.index,def:u})));if(c.length>0)return c;throw new Error(`AG Charts - didn't find property definition for [${e}, ${t.id}]`)}getDomain(t,e,n="value",i){var r,s,o,a;let l;try{l=this.resolveProcessedDataIndicesById(t,e)}catch(m){if(typeof e!="string"&&/didn't find property definition/.test(m.message))return[];throw m}let c;switch(n){case"key":c="keys";break;case"value":c="values";break;case"aggregate":c="aggValues";break;case"group-value-processor":c="groups";break;default:return[]}let d=(s=(r=i.domain[c])==null?void 0:r[l[0].index])!=null?s:[];if(l.length===1)return d;let u=[...d];for(let m of l.slice(1))FW((a=(o=i.domain[c])==null?void 0:o[m.index])!=null?a:[],u);return u}processData(t,e){let{opts:{groupByKeys:n,groupByFn:i},aggregates:r,groupProcessors:s,reducers:o,processors:a,propertyProcessors:l}=this,c=performance.now();for(let m of[...this.keys,...this.values])m.missing=0;if(n&&this.keys.length===0)return;let d=this.extractData(t,e);n?d=this.groupData(d):i&&(d=this.groupData(d,i(d))),s.length>0&&this.postProcessGroups(d),r.length>0&&this.aggregateData(d),l.length>0&&this.postProcessProperties(d),o.length>0&&this.reduceData(d),a.length>0&&this.postProcessData(d);for(let m of[...this.keys,...this.values])t.length>0&&m.missing>=t.length&&Ns.warnOnce(`the key '${m.property}' was not found in any data element.`);let u=performance.now();return d.time=u-c,Nm.check(!0,"data-model")&&rAi(d),d}valueGroupIdxLookup({matchGroupIds:t,matchIds:e}){return this.values.map((n,i)=>({def:n,index:i})).filter(({def:n})=>t&&(n.groupId==null||!t.includes(n.groupId))?!1:e?n.ids==null?!1:e.some(([i,r])=>{var s;return(s=n.ids)==null?void 0:s.some(([o,a])=>o===i&&a===r)}):!0).map(({index:n})=>n)}valueIdxLookup(t,e){let n=t==null||t.length===0,i=a=>{if(a==null)return!0;let c=a==null||a.length===0;return n===c?!0:a?.some(d=>t.includes(d))},r=typeof e=="string"?e:e.id,s=([a,l])=>i([a])&&l===r,o=this.values.findIndex(a=>{var l;return i(a.scopes)&&(((l=a.ids)==null?void 0:l.some(c=>s(c)))||a.property===r||a.id===r)});if(o>=0)return o;throw new Error(`AG Charts - configuration error, unknown property ${JSON.stringify(e)} in scope(s) ${JSON.stringify(t)}`)}extractData(t,e){var n,i,r,s,o,a;let{keys:l,values:c,opts:{dataVisible:d}}=this,{dataDomain:u,processValue:m,scopes:f,allScopesHaveSameDefs:_}=this.initDataDomainProcessor(),x=new Array(d?t.length:0),D=0,E=0;for(let[I,z]of t.entries()){let G={},A=f.size>0?new Set(f):void 0,Y=d?new Array(l.length):void 0,X=0,ne;for(let le of l){if(ne=m(le,z,ne),ne===sM)break;Y&&(Y[X++]=ne)}if(ne===sM)continue;let pe=d&&c.length>0?new Array(c.length):void 0,ce,ie={};for(let le of e??[])ie[le.id]=le;for(let[le,Se]of c.entries()){for(let je of(n=Se.scopes)!=null?n:f){let ze=ie[je],Ge=(i=ze?.data[I])!=null?i:z;ce=m(Se,Ge,ce),!(ce===sM||!pe)&&(ze!==void 0&&((s=G[r=ze.id])!=null||(G[r]={}),G[ze.id][Se.property]=ce),Se.useScopedValues?((o=pe[le])!=null||(pe[le]={}),pe[le][je]=ce):pe[le]=ce)}if(ce===sM){if(_)break;for(let je of(a=Se.scopes)!=null?a:f)A?.delete(je);if(A?.size===0)break}}if(!(ce===sM&&_)&&A?.size!==0&&d){let le={datum:Ai(Ai({},z),G),keys:Y,values:pe};!_&&A&&A.size<f.size&&(E++,le.validScopes=[...A]),x[D++]=le}}x.length=D;let M=I=>{let z=u.get(I).getDomain();return Array.isArray(z)&&z[0]>z[1]?[]:[...z]};return{type:"ungrouped",input:{count:t.length},data:x,domain:{keys:l.map(I=>M(I)),values:c.map(I=>M(I))},defs:{allScopesHaveSameDefs:_,keys:l,values:c},partialValidDataCount:E,time:0}}groupData(t,e){var n,i,r,s;let o=new Map;for(let d of t.data){let{keys:u,values:m,datum:f,validScopes:_}=d,x=e?e(d):u,D=tAi(x);if(o.has(D)){let E=o.get(D);if(E.values.push(m),E.datum.push(f),_!=null)for(let M=0;M<((i=(n=E.validScopes)==null?void 0:n.length)!=null?i:0);M++){let I=(r=E.validScopes)==null?void 0:r[M];_.some(z=>z===I)||(s=E.validScopes)==null||s.splice(M,1)}}else o.set(D,{keys:x,values:[m],datum:[f],validScopes:_})}let a=new Array(o.size),l=new Array(o.size),c=0;for(let[,{keys:d,values:u,datum:m,validScopes:f}]of o.entries())f?.length!==0&&(l[c]=d,a[c++]={keys:d,values:u,datum:m,validScopes:f});return cs(Ai({},t),{type:"grouped",data:a,domain:cs(Ai({},t.domain),{groups:l})})}aggregateData(t){var e,n,i,r,s,o,a,l;let{aggregates:c}=this;if(!c)return;let d=c.map(()=>[1/0,-1/0]),u=c.map(x=>this.valueGroupIdxLookup(x)),m=c.map(x=>x.aggregateFunction),f=c.map(x=>x.groupAggregateFunction),_=c.map(x=>x.finalFunction);for(let x of t.data){let{values:D}=x,{validScopes:E}=x;(e=x.aggValues)!=null||(x.aggValues=new Array(u.length)),t.type==="ungrouped"&&(D=[D]);let M=0;for(let I of u){if(!((n=E?.some(Y=>{var X;return(X=c[M].matchScopes)==null?void 0:X.some(ne=>Y===ne)}))!=null?n:!0)){M++;continue}let G=(r=(i=f[M])==null?void 0:i.call(f))!=null?r:FW([]);for(let Y of D){let X=I.map(pe=>Y[pe]),ne=m[M](X,x.keys);ne&&(G=(o=(s=f[M])==null?void 0:s.call(f,ne,G))!=null?o:FW(ne,G))}let A=((l=(a=_[M])==null?void 0:a.call(_,G))!=null?l:G).map(Y=>iAi(Y));FW(A,d[M]),x.aggValues[M++]=A}}t.domain.aggValues=d}postProcessGroups(t){var e,n,i,r,s;let{groupProcessors:o}=this;if(!o)return;let a=new Set,l=new Map,c=new Map,d=new Map;for(let m of o){let f=this.valueGroupIdxLookup(m);c.set(m,f),d.set(m,m.adjust());for(let _ of f){let x=this.values[_];a.add(_),l.set(_,new P7e(x.valueType==="category"?"discrete":"continuous"))}}let u=m=>{var f;for(let _ of a)(f=l.get(_))==null||f.extend(m[_])};for(let m of t.data){for(let f of o){if(!((n=(e=m.validScopes)==null?void 0:e.some(E=>{var M;return(M=f.matchScopes)==null?void 0:M.some(I=>E===I)}))!=null?n:!0))continue;let x=(i=c.get(f))!=null?i:[],D=(s=(r=d.get(f))==null?void 0:r())!=null?s:()=>{};if(t.type==="grouped"){for(let E of m.values)E&&D(E,x);continue}m.values&&D(m.values,x)}if(t.type==="grouped")for(let f of m.values)u(f);else u(m.values)}for(let[m,f]of l)t.domain.values[m]=[...f.getDomain()]}postProcessProperties(t){let{propertyProcessors:e}=this;if(e)for(let{adjust:n,property:i,scopes:r}of e)n()(t,this.valueIdxLookup(r??[],i))}reduceData(t){var e,n,i;let{reducers:r}=this,s=r.map(l=>l.scopes),o=r.map(l=>l.reducer()),a=r.map(l=>l.initialValue);for(let l of t.data){let c=0;for(let d of o){if(!((n=(e=l.validScopes)==null?void 0:e.some(m=>{var f;return(f=s[c])==null?void 0:f.some(_=>m===_)}))!=null?n:!0)){c++;continue}a[c]=d(a[c],l),c++}}for(let l=0;l<a.length;l++)(i=t.reduced)!=null||(t.reduced={}),t.reduced[r[l].property]=a[l]}postProcessData(t){var e;let{processors:n}=this;for(let i of n)(e=t.reduced)!=null||(t.reduced={}),t.reduced[i.property]=i.calculate(t)}initDataDomainProcessor(){var t;let{keys:e,values:n}=this,i=new Set;for(let m of n)for(let f of(t=m.scopes)!=null?t:[])i.add(f);let r=i.size,s=new Map,o=new Map,a=!0,l=(m,f,_=s)=>{var x;f==="category"?_.set(m,new P7e("discrete")):(_.set(m,new P7e("continuous")),a&&(a=((x=m.scopes)!=null?x:[]).length===r))},c=()=>{e.forEach(m=>l(m,m.valueType)),n.forEach(m=>l(m,m.valueType))};c();let d=this.buildAccessors(...e,...n);return{dataDomain:s,processValue:(m,f,_)=>{var x,D,E,M;let I=m.property in d,z=!1,G;if(I){try{G=d[m.property](f)}catch{}z=G!==void 0}else z=m.property in f,G=z?f[m.property]:m.missingValue;m.forceValue!=null&&(G=z&&SU(G)?-1*m.forceValue:m.forceValue,z=!0);let A="missingValue"in m;if(!z&&!A&&m.missing++,s.has(m)||c(),z&&!((D=(x=m.validation)==null?void 0:x.call(m,G,f))!=null?D:!0))if("invalidValue"in m)G=m.invalidValue;else return this.mode!=="integrated"&&Ns.warnOnce(`invalid value of type [${typeof G}] ignored:`,`[${G}]`),sM;return m.processor&&(o.has(m)||o.set(m,m.processor()),G=(E=o.get(m))==null?void 0:E(G,_!==sM?_:void 0)),(M=s.get(m))==null||M.extend(G),G},initDataDomain:c,scopes:i,allScopesHaveSameDefs:a}}buildAccessors(...t){let e={};if(this.mode==="integrated")return e;for(let n of t){if(!(n.property.indexOf(".")>=0||n.property.indexOf("[")>=0))continue;let r;n.property.startsWith("[")?r=`return datum${n.property};`:r=`return datum.${n.property};`,e[n.property]=new Function("datum",r)}return e}};j1t=class{constructor(t){this.mode=t,this.debug=Nm.create(!0,"data-model"),this.requested=[],this.status="setup"}request(t,e,n){return mr(this,null,function*(){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");return new Promise((i,r)=>{this.requested.push({id:t,opts:n,data:e,resultCb:i,reject:r})})})}execute(){return mr(this,null,function*(){if(this.status!=="setup")throw new Error("AG Charts - data request after data setup phase.");this.status="executed",this.debug("DataController.execute() - requested",this.requested);let{valid:t,invalid:e}=this.validateRequests(this.requested);this.debug("DataController.execute() - validated",t);let n=this.mergeRequested(t);this.debug("DataController.execute() - merged",n);let i=Nm.check(!0,"data-model");i&&(window.processedData=[]);let r=t.some(s=>s.data!=null);for(let{opts:s,data:o,resultCbs:a,rejects:l,ids:c}of n){let d=r||s.props.some(u=>{var m;return u.type!=="value"&&u.type!=="key"?!1:(m=u.useScopedValues)!=null?m:!1});try{let u=new U1t(cs(Ai({},s),{mode:this.mode})),m=u.processData(o,t);i&&window.processedData.push(m),m&&m.partialValidDataCount===0?a.forEach((f,_)=>{let x=c[_],D=m;d&&(D=this.extractScopedData(x,m)),f({dataModel:u,processedData:D})}):m?this.splitResult(u,m,c,a):l.forEach(f=>f(new Error("AG Charts - no processed data generated")))}catch(u){l.forEach(m=>m(u))}}e.forEach(({error:s,reject:o})=>o(s))})}extractScopedData(t,e){let n=r=>Array.isArray(r)?r.map(n):Ai(Ai({},r),r[t]),i=r=>{var s;return Array.isArray(r)?r.map(i):(s=r?.[t])!=null?s:r};return cs(Ai({},e),{data:e.data.map(r=>cs(Ai({},r),{datum:n(r.datum),values:r.values.map(i)}))})}validateRequests(t){let e=[],n=[];for(let[i,r]of t.entries())i>0&&r.data.length!==t[0].data.length&&r.opts.groupByData===!1?n.push(cs(Ai({},r),{error:new Error("all series[].data arrays must be of the same length and have matching keys.")})):e.push(r);return{valid:e,invalid:n}}mergeRequested(t){let e=[],n=l=>l.filter(c=>c.type==="key").map(c=>c.property).join(";"),i=({opts:l,data:c})=>d=>(l.groupByData===!1||d[0].data===c)&&d[0].opts.groupByKeys===l.groupByKeys&&d[0].opts.dataVisible===l.dataVisible&&d[0].opts.groupByFn===l.groupByFn&&n(d[0].opts.props)===n(l.props),r=l=>c=>{var d;if(c.type!==l.type)return!1;let u=(d=SC(c,l))!=null?d:{};return delete u.scopes,delete u.id,delete u.ids,"useScopedValues"in u&&delete u.useScopedValues,Object.keys(u).length===0},s=l=>{var c;if(l.type!=="key"&&l.type!=="value")return;let d=new Set((c=l.scopes)!=null?c:[]);l.useScopedValues=d.size>1},o=l=>cs(Ai({},l[0]),{props:l.reduce((c,d)=>{var u,m,f,_,x,D;for(let E of d.props){E.id!=null&&((u=E.ids)!=null||(E.ids=[]),(m=E.scopes)==null||m.forEach(I=>{var z;return(z=E.ids)==null?void 0:z.push([I,E.id])}));let M=c.find(r(E));if(!M){s(E),c.push(E);continue}(f=M.scopes)!=null||(M.scopes=[]),M.scopes.push(...(_=E.scopes)!=null?_:[]),s(E),!(M.type!=="key"&&M.type!=="value")&&((D=M.ids)==null||D.push(...(x=E.ids)!=null?x:[]))}return c},[])}),a=l=>({ids:l.map(({id:c})=>c),resultCbs:l.map(({resultCb:c})=>c),rejects:l.map(({reject:c})=>c),data:l[0].data,opts:o(l.map(({opts:c})=>c))});for(let l of t){let c=e.find(i(l));c?c.push(l):e.push([l])}return e.map(a)}splitResult(t,e,n,i){for(let r=0;r<n.length;r++){let s=n[r],o=i[r];o({dataModel:t,processedData:cs(Ai({},e),{data:e.data.filter(({validScopes:a})=>a==null||a.some(l=>l===s))})})}}},qne=class{constructor(){this.registeredListeners=new Map}addListener(t,e,n){let i={symbol:Symbol(t),handler:e,meta:n};return this.registeredListeners.has(t)?this.registeredListeners.get(t).push(i):this.registeredListeners.set(t,[i]),()=>this.removeListener(i.symbol)}removeListener(t){for(let[e,n]of this.registeredListeners.entries()){let i=n.findIndex(r=>r.symbol===t);if(i>=0){n.splice(i,1),n.length===0&&this.registeredListeners.delete(e);break}}}dispatch(t,...e){for(let n of this.getListenersByType(t))try{n.handler(...e)}catch(i){Ns.errorOnce(i)}}dispatchWrapHandlers(t,e,...n){for(let i of this.getListenersByType(t))try{e(i.handler,i.meta,...n)}catch(r){Ns.errorOnce(r)}}getListenersByType(t){var e;return(e=this.registeredListeners.get(t))!=null?e:[]}},RU=class{constructor(){this.listeners=new qne}addListener(t,e,n){return this.listeners.addListener(t,e,n)}removeListener(t){this.listeners.removeListener(t)}},Omt=[!0,"animation"],$1t=class extends RU{constructor(t,e){super(),this.interactionManager=t,this.chartUpdateMutex=e,this.defaultDuration=1e3,this.batch=new Nmt,this.debug=Nm.create(...Omt),this.isPlaying=!1,this.requestId=null,this.skipAnimations=!1}animate(t){var e=t,{disableInteractions:n=!0,immutable:i=!0}=e,r=W3(e,["disableInteractions","immutable"]),s,o;let{batch:a}=this;try{if(r.id!=null&&a.controllers.has(r.id)){if(!i)return a.controllers.get(r.id).reset(r);a.controllers.get(r.id).stop(),this.debug(`Skipping animation batch due to update of existing animation: ${r.id}`),this.batch.skip()}}catch(d){this.failsafeOnError(d);return}let l=(s=r.id)!=null?s:Math.random().toString(),c=this.isSkipped();return c&&this.debug("AnimationManager - skipping animation"),new e1t(cs(Ai({},r),{id:l,skip:c,autoplay:this.isPlaying?r.autoplay:!1,duration:(o=r.duration)!=null?o:this.defaultDuration,onPlay:d=>{var u;a.controllers.set(l,d),this.requestAnimation(),n&&this.interactionManager.pause("animation"),(u=r.onPlay)==null||u.call(d,d)},onStop:d=>{var u;a.controllers.delete(l),n&&this.interactionManager.resume("animation"),(u=r.onStop)==null||u.call(d,d)}}))}play(){if(!this.isPlaying){this.isPlaying=!0,this.debug("AnimationManager.play()");for(let t of this.batch.controllers.values())try{t.play()}catch(e){this.failsafeOnError(e)}this.requestAnimation()}}pause(){if(this.isPlaying){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.pause()");for(let t of this.batch.controllers.values())try{t.pause()}catch(e){this.failsafeOnError(e)}}}stop(){this.isPlaying=!1,this.cancelAnimation(),this.debug("AnimationManager.stop()");for(let t of this.batch.controllers.values())try{t.stop()}catch(e){this.failsafeOnError(e,!1)}}stopByAnimationId(t){var e;try{t!=null&&this.batch.controllers.has(t)&&((e=this.batch.controllers.get(t))==null||e.stop())}catch(n){this.failsafeOnError(n);return}}stopByAnimationGroupId(t){for(let e of this.batch.controllers.values())e.groupId===t&&this.stopByAnimationId(e.id)}reset(){this.isPlaying?(this.stop(),this.play()):this.stop()}skip(t=!0){this.skipAnimations=t}isSkipped(){return this.skipAnimations||this.batch.isSkipped()}isActive(){return this.isPlaying&&this.batch.isActive()}skipCurrentBatch(){Nm.check(...Omt)&&this.debug("AnimationManager - skipCurrentBatch()",{stack:new Error().stack}),this.batch.skip()}isSkippingFrames(){return!0}scheduleAnimationFrame(t){this.requestId=requestAnimationFrame(t)}requestAnimation(){if(!this.batch.isActive()||this.requestId!==null)return;let t,e=n=>mr(this,null,function*(){let i=()=>mr(this,null,function*(){let r=n-(t??n);t=n,this.debug("AnimationManager - onAnimationFrame()",{controllersCount:this.batch.controllers.size});for(let s of this.batch.controllers.values())try{s.update(r)}catch(o){this.failsafeOnError(o)}this.listeners.dispatch("animation-frame",{type:"animation-frame",deltaMs:r})});this.isSkippingFrames()?yield this.chartUpdateMutex.acquireImmediately(i):yield this.chartUpdateMutex.acquire(i),this.batch.isActive()&&this.scheduleAnimationFrame(e)});this.scheduleAnimationFrame(e)}cancelAnimation(){this.requestId!==null&&(cancelAnimationFrame(this.requestId),this.requestId=null,this.startBatch())}failsafeOnError(t,e=!0){Ns.error("Error during animation, skipping animations",t),e&&this.cancelAnimation()}startBatch(t){this.debug(`AnimationManager - startBatch() with skipAnimations=${t}.`),this.reset(),this.batch.destroy(),this.batch=new Nmt,t===!0&&this.batch.skip()}endBatch(){this.debug(`AnimationManager - endBatch() with ${this.batch.controllers.size} animations; skipped: ${this.batch.isSkipped()}.`),this.batch.isSkipped()&&!this.batch.isActive()&&this.batch.skip(!1)}},Nmt=class{constructor(){this.controllers=new Map,this.skipAnimations=!1}isActive(){return this.controllers.size>0}skip(t=!0){if(this.skipAnimations===!1&&t===!0){for(let e of this.controllers.values())e.stop();this.controllers.clear()}this.skipAnimations=t}isSkipped(){return this.skipAnimations}destroy(){}},K1t=class extends RU{legendItemClick(t,e,n,i){let r={type:"legend-item-click",series:t,itemId:e,enabled:n,legendItemName:i};this.listeners.dispatch("legend-item-click",r)}legendItemDoubleClick(t,e,n,i,r){let s={type:"legend-item-double-click",series:t,itemId:e,enabled:n,legendItemName:r,numVisibleItems:i};this.listeners.dispatch("legend-item-double-click",s)}axisHover(t,e){let n={type:"axis-hover",axisId:t,direction:e};this.listeners.dispatch("axis-hover",n)}},Y1t=class{constructor(t){this.states={},this.element=t}updateCursor(t,e){delete this.states[t],e!=null&&(this.states[t]={style:e}),this.applyStates()}applyStates(){let t="default";Object.entries(this.states).reverse().slice(0,1).forEach(([e,{style:n}])=>t=n),this.element.style.cursor=t}getCursor(){return this.element.style.cursor}},q1t=class extends RU{constructor(){super(...arguments),this.highlightStates=new Map,this.pickedStates=new Map}updateHighlight(t,e){this.highlightStates.delete(t),e!=null&&this.highlightStates.set(t,e),this.applyHighlightStates()}getActiveHighlight(){return this.activeHighlight}updatePicked(t,e){this.pickedStates.delete(t),e!=null&&this.pickedStates.set(t,e),this.applyPickedStates()}getActivePicked(){return this.activePicked}applyHighlightStates(){let{activeHighlight:t}=this;this.activeHighlight=Array.from(this.highlightStates.values()).pop(),this.isEqual(this.activeHighlight,t)||this.listeners.dispatch("highlight-change",{type:"highlight-change",currentHighlight:this.activeHighlight,previousHighlight:t})}applyPickedStates(){this.activePicked=Array.from(this.pickedStates.values()).pop()}isEqual(t,e){return t===e||t?.series===e?.series&&t?.itemId===e?.itemId&&t?.datum===e?.datum}},Vmt=["pagehide","mousemove","mouseup"],Bmt=["click","dblclick","contextmenu","mousedown","mouseout","mouseenter","touchstart","touchmove","touchend","touchcancel","wheel"],sAi=`
.ag-chart-wrapper {
    touch-action: none;
}
`,Uwe=class LW extends RU{constructor(e,n,i){super(),this.eventHandler=r=>this.processEvent(r),this.mouseDown=!1,this.touchDown=!1,this.pausers={animation:0,"context-menu":0},this.rootElement=n.body,this.element=e,this.window=i;for(let r of Bmt)r.startsWith("touch")?e.addEventListener(r,this.eventHandler,{passive:!0}):r==="wheel"?e.addEventListener(r,this.eventHandler,{passive:!1}):e.addEventListener(r,this.eventHandler);for(let r of Vmt)this.window.addEventListener(r,this.eventHandler);LW.interactionDocuments.includes(n)||(Rwe(n,sAi),LW.interactionDocuments.push(n))}destroy(){for(let e of Vmt)this.window.removeEventListener(e,this.eventHandler);for(let e of Bmt)this.element.removeEventListener(e,this.eventHandler)}resume(e){this.pausers[e]--}pause(e){this.pausers[e]++}processEvent(e){let n=this.decideInteractionEventTypes(e);n.length>0&&this.dispatchEvent(e,n).catch(i=>Ns.errorOnce(i))}dispatchEvent(e,n){return mr(this,null,function*(){let i=this.calculateCoordinates(e);if(i==null)return;let r=Object.entries(this.pausers).filter(([,s])=>s>0).map(([s])=>s);for(let s of n)this.listeners.dispatchWrapHandlers(s,(o,a,l)=>{var c;r.length>0&&!((c=a?.bypassPause)!=null&&c.some(d=>r.includes(d)))||l.consumed||o(l)},this.buildEvent(Ai({type:s,event:e,pauses:r},i)))})}decideInteractionEventTypes(e){let n="drag-start";switch(e.type){case"click":return["click"];case"dblclick":return["dblclick"];case"contextmenu":return["contextmenu"];case"mousedown":return this.mouseDown=!0,this.dragStartElement=e.target,[n];case"touchstart":return this.touchDown=!0,this.dragStartElement=e.target,[n];case"touchmove":case"mousemove":return!this.mouseDown&&!this.touchDown&&!this.isEventOverElement(e)?[]:this.mouseDown||this.touchDown?["drag"]:["hover"];case"mouseup":return!this.mouseDown&&!this.isEventOverElement(e)?[]:(this.mouseDown=!1,this.dragStartElement=void 0,["drag-end"]);case"touchend":return!this.touchDown&&!this.isEventOverElement(e)?[]:(this.touchDown=!1,this.dragStartElement=void 0,["drag-end"]);case"mouseout":case"touchcancel":return["leave"];case"mouseenter":let i=e instanceof MouseEvent&&(e.buttons&1)===1;return this.mouseDown!==i?(this.mouseDown=i,[i?n:"drag-end"]):[];case"pagehide":return["page-left"];case"wheel":return["wheel"]}return[]}isEventOverElement(e){var n;return e.target===this.element||((n=e.target)==null?void 0:n.parentElement)===this.element}calculateCoordinates(e){var n;if(e instanceof MouseEvent){let{clientX:i,clientY:r,pageX:s,pageY:o,offsetX:a,offsetY:l}=e;return this.fixOffsets(e,{clientX:i,clientY:r,pageX:s,pageY:o,offsetX:a,offsetY:l})}else if(typeof TouchEvent<"u"&&e instanceof TouchEvent){let i=(n=e.touches[0])!=null?n:e.changedTouches[0],{clientX:r,clientY:s,pageX:o,pageY:a}=i;return cs(Ai({},LW.NULL_COORDS),{clientX:r,clientY:s,pageX:o,pageY:a})}else if(e instanceof PageTransitionEvent)return e.persisted?void 0:LW.NULL_COORDS}fixOffsets(e,n){let i=r=>{let s=0,o=0;for(;r;)s+=r.offsetLeft,o+=r.offsetTop,r=r.offsetParent;return{x:s,y:o}};if(this.dragStartElement!=null&&e.target!==this.dragStartElement){let r=i(this.dragStartElement),s=i(e.target);n.offsetX-=r.x-s.x,n.offsetY-=r.y-s.y}return n}buildEvent(e){let{type:n,event:i,clientX:r,clientY:s,pauses:o}=e,{offsetX:a,offsetY:l,pageX:c,pageY:d}=e;if(!H3(a)||!H3(l)){let m=this.element.getBoundingClientRect();a=r-m.left,l=s-m.top}if(!H3(c)||!H3(d)){let m=this.rootElement.getBoundingClientRect();c=r-m.left,d=s-m.top}let u={type:n,offsetX:a,offsetY:l,pageX:c,pageY:d,sourceEvent:i,consumed:!1,pauses:o,consume(){u.consumed=!0}};return u}};Uwe.interactionDocuments=[];Uwe.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0};Z1t=Uwe,J7e=class{constructor(t,e){this.states={},this.exclusiveAreas={},this.destroyFns=[],this.tooltip=t,this.destroyFns.push(e.addListener("hover",n=>this.checkExclusiveRects(n)))}getRange(){return this.tooltip.range}updateTooltip(t,e,n){var i;n==null&&(n=(i=this.states[t])==null?void 0:i.content),this.states[t]={content:n,meta:e},this.applyStates()}updateExclusiveRect(t,e){e?this.exclusiveAreas[t]=e:delete this.exclusiveAreas[t]}removeTooltip(t){delete this.states[t],this.applyStates()}getTooltipMeta(t){var e;return(e=this.states[t])==null?void 0:e.meta}destroy(){for(let t of this.destroyFns)t()}checkExclusiveRects(t){let e;for(let[n,i]of Object.entries(this.exclusiveAreas))if(i.containsPoint(t.offsetX,t.offsetY)){e=n;break}e!==this.appliedExclusiveArea&&(this.appliedExclusiveArea=e,this.applyStates())}applyStates(){var t;let e=this.appliedExclusiveArea?[this.appliedExclusiveArea]:Object.keys(this.states),n,i;if(e.reverse(),e.slice(0,1).forEach(r=>{var s;let{content:o,meta:a}=(s=this.states[r])!=null?s:{};n=o,i=a}),i===void 0||n===void 0){this.appliedState=void 0,this.tooltip.toggle(!1);return}if(((t=this.appliedState)==null?void 0:t.content)===n){let r=this.tooltip.isVisible();this.tooltip.show(i,void 0,r)}else this.tooltip.show(i,n);this.appliedState={content:n,meta:i}}static makeTooltipMeta(t,e,n,i){var r,s,o,a;let{pageX:l,pageY:c,offsetX:d,offsetY:u}=t,{tooltip:m}=n.series.properties,f={xOffset:m.position.xOffset,yOffset:m.position.yOffset},_={pageX:l,pageY:c,offsetX:d,offsetY:u,event:t,showArrow:m.showArrow,position:f},x=(s=(r=n.yBar)==null?void 0:r.upperPoint)!=null?s:n.midPoint;if(m.position.type==="node"&&x){let{x:D,y:E}=x,M=n.series.contentGroup.inverseTransformPoint(D,E),I=e.element.getBoundingClientRect();return cs(Ai({},_),{pageX:Math.round(I.left+i.scrollX+M.x),pageY:Math.round(I.top+i.scrollY+M.y),offsetX:Math.round(M.x),offsetY:Math.round(M.y)})}return _.enableInteraction=(a=(o=m.interaction)==null?void 0:o.enabled)!=null?a:!1,_}},X1t=class extends RU{constructor(){super(...arguments),this.axes={}}updateAxes(t){var e;let n=new Set(Object.keys(this.axes));t.forEach(i=>{var r,s,o;n.delete(i.id),(o=(r=this.axes)[s=i.id])!=null||(r[s]=new oAi(i))}),n.forEach(i=>{delete this.axes[i]}),(e=this.initialZoom)!=null&&e.newZoom&&this.updateZoom(this.initialZoom.callerId,this.initialZoom.newZoom),this.initialZoom=void 0}updateZoom(t,e){if(Object.keys(this.axes).length===0){this.initialZoom={callerId:t,newZoom:e};return}Object.values(this.axes).forEach(n=>{n.updateZoom(t,e?.[n.getDirection()])}),this.applyStates()}updateAxisZoom(t,e,n){var i;(i=this.axes[e])==null||i.updateZoom(t,n),this.applyStates()}getZoom(){let t,e;if(Object.values(this.axes).forEach(n=>{n.getDirection()==="x"?t=n.getZoom():n.getDirection()==="y"&&(e=n.getZoom())}),t||e)return{x:t,y:e}}getAxisZoom(t){var e;return(e=this.axes[t])==null?void 0:e.getZoom()}getAxisZooms(){let t={};for(let[e,n]of Object.entries(this.axes))t[e]={direction:n.getDirection(),zoom:n.getZoom()};return t}applyStates(){if(!Object.values(this.axes).map(i=>i.applyStates()).some(Boolean))return;let e=this.getZoom(),n={};for(let[i,r]of Object.entries(this.axes))n[i]=r.getZoom();this.listeners.dispatch("zoom-change",cs(Ai({type:"zoom-change"},e??{}),{axes:n}))}},oAi=class{constructor(t){this.states={},this.axis=t;let[e=0,n=1]=t.visibleRange;this.currentZoom={min:e,max:n},this.states.__initial__=this.currentZoom}getDirection(){return this.axis.direction}updateZoom(t,e){delete this.states[t],e!=null&&(this.states[t]=Ai({},e))}getZoom(){return this.currentZoom}applyStates(){var t,e;let n=this.currentZoom,i=Object.keys(this.states)[Object.keys(this.states).length-1];return this.currentZoom=Ai({},this.states[i]),n?.min!==((t=this.currentZoom)==null?void 0:t.min)||n?.max!==((e=this.currentZoom)==null?void 0:e.max)}},Q1t=class extends qne{constructor(){super(...arguments),this.layoutComplete="layout-complete"}addListener(t,e){if(this.isLayoutStage(t)||this.isLayoutComplete(t))return super.addListener(t,e);throw new Error(`AG Charts - unsupported listener type: ${t}`)}dispatchPerformLayout(t,e){return this.isLayoutStage(t)?this.getListenersByType(t).reduce((n,i)=>{try{return i.handler(n)}catch(r){return Ns.errorOnce(r),n}},e):e}dispatchLayoutComplete(t){this.dispatch(this.layoutComplete,t)}isLayoutStage(t){return t!==this.layoutComplete}isLayoutComplete(t){return t===this.layoutComplete}};b1=(()=>{let t=class extends da{constructor(){super({name:"markerLabelGroup"}),this.label=new Wu,this.line=new l0,this._marker=new dU,this._markerSize=15,this._spacing=8;let{marker:e,label:n,line:i}=this;n.textBaseline="middle",n.fontSize=12,n.fontFamily="Verdana, sans-serif",n.fill="black",n.y=dm.has.textMetrics?1:0,this.append([i,e,n]),this.update()}set marker(e){this._marker!==e&&(this.removeChild(this._marker),this._marker=e,this.appendChild(e),this.update())}get marker(){return this._marker}set markerSize(e){this._markerSize!==e&&(this._markerSize=e,this.update())}get markerSize(){return this._markerSize}set spacing(e){this._spacing!==e&&(this._spacing=e,this.update())}get spacing(){return this._spacing}setSeriesStrokeOffset(e){let n=this.marker.size/2+e;this.line.x1=-n,this.line.x2=n,this.line.y1=0,this.line.y2=0,this.line.markDirtyTransform(),this.update()}update(){this.marker.size=this.markerSize;let e=this.line.visible?this.line.x2:-1/0,n=this.markerSize/2;this.label.x=Math.max(e,n)+this.spacing}render(e){this.marker.opacity=this.opacity,this.label.opacity=this.opacity,this.line.opacity=this.opacity,super.render(e)}};return t.className="MarkerLabel",t})();Be([Uu("label")],b1.prototype,"text",2);Be([Uu("label")],b1.prototype,"fontStyle",2);Be([Uu("label")],b1.prototype,"fontWeight",2);Be([Uu("label")],b1.prototype,"fontSize",2);Be([Uu("label")],b1.prototype,"fontFamily",2);Be([Uu("label","fill")],b1.prototype,"color",2);Be([Uu("marker","fill")],b1.prototype,"markerFill",2);Be([Uu("marker","stroke")],b1.prototype,"markerStroke",2);Be([Uu("marker","strokeWidth")],b1.prototype,"markerStrokeWidth",2);Be([Uu("marker","fillOpacity")],b1.prototype,"markerFillOpacity",2);Be([Uu("marker","strokeOpacity")],b1.prototype,"markerStrokeOpacity",2);Be([Uu("marker","visible")],b1.prototype,"markerVisible",2);Be([Uu("line","stroke")],b1.prototype,"lineStroke",2);Be([Uu("line","strokeWidth")],b1.prototype,"lineStrokeWidth",2);Be([Uu("line","strokeOpacity")],b1.prototype,"lineStrokeOpacity",2);Be([Uu("line","lineDash")],b1.prototype,"lineLineDash",2);Be([Uu("line","visible")],b1.prototype,"lineVisible",2);PF=class{constructor(){this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}};Be([ut(Jc)],PF.prototype,"color",2);Be([ut(iS,{optional:!0})],PF.prototype,"fontStyle",2);Be([ut(nS,{optional:!0})],PF.prototype,"fontWeight",2);Be([ut(es)],PF.prototype,"fontSize",2);Be([ut(Ps)],PF.prototype,"fontFamily",2);lb=class{constructor(){this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}};Be([ut(es)],lb.prototype,"size",2);Be([ut(Jc,{optional:!0})],lb.prototype,"fill",2);Be([ut(Bh,{optional:!0})],lb.prototype,"fillOpacity",2);Be([ut(Jc,{optional:!0})],lb.prototype,"stroke",2);Be([ut(es)],lb.prototype,"strokeWidth",2);Be([ut(Bh)],lb.prototype,"strokeOpacity",2);Zne=class{constructor(t){this.parent=t,this.shape=yF,this.size=15,this.padding=8}};Be([R2({changeValue(){this.parent.marker===this&&this.parent.onMarkerShapeChange()}})],Zne.prototype,"shape",2);Be([ut(es)],Zne.prototype,"size",2);Be([ut(es)],Zne.prototype,"padding",2);pAi=(()=>{let t=class{constructor(e,n,i,r){this.chartUpdateCallback=e,this.pageUpdateCallback=n,this.interactionManager=i,this.cursorManager=r,this.id=kC(this),this.group=new da({name:"pagination"}),this.labelNode=new Wu,this.marker=new Zne(this),this.activeStyle=new lb,this.inactiveStyle=new lb,this.highlightStyle=new lb,this.label=new PF,this.totalPages=0,this.currentPage=0,this.translationX=0,this.translationY=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this._nextButton=new yF,this._previousButton=new yF;let{labelNode:s}=this;s.textBaseline="middle",s.fontSize=12,s.fontFamily="Verdana, sans-serif",s.fill="black",s.y=dm.has.textMetrics?1:0,this.group.append([this.nextButton,this.previousButton,s]),this.interactionManager.addListener("click",o=>this.onPaginationClick(o)),this.interactionManager.addListener("hover",o=>this.onPaginationMouseMove(o)),this.update(),this.updateMarkers()}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible}set orientation(e){switch(this._orientation=e,e){case"horizontal":{this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2;break}case"vertical":default:this.previousButton.rotation=0,this.nextButton.rotation=Math.PI}}get orientation(){return this._orientation}set nextButton(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))}get nextButton(){return this._nextButton}set previousButton(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))}get previousButton(){return this._previousButton}update(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()}updatePositions(){this.group.translationX=this.translationX,this.group.translationY=this.translationY,this.updateLabelPosition(),this.updateNextButtonPosition()}updateLabelPosition(){let{size:e,padding:n}=this.marker;this.nextButton.size=e,this.previousButton.size=e,this.labelNode.x=e/2+n}updateNextButtonPosition(){let e=this.labelNode.computeBBox();this.nextButton.translationX=e.x+e.width+this.marker.size/2+this.marker.padding}updateLabel(){let{currentPage:e,totalPages:n,labelNode:i,label:{color:r,fontStyle:s,fontWeight:o,fontSize:a,fontFamily:l}}=this;i.text=`${e+1} / ${n}`,i.fill=r,i.fontStyle=s,i.fontWeight=o,i.fontSize=a,i.fontFamily=l}updateMarkers(){let{nextButton:e,previousButton:n,nextButtonDisabled:i,previousButtonDisabled:r,activeStyle:s,inactiveStyle:o,highlightStyle:a,highlightActive:l}=this,c=(d,u)=>u?o:d===l?a:s;this.updateMarker(e,c("next",i)),this.updateMarker(n,c("previous",r))}updateMarker(e,n){var i;let{size:r}=this.marker;e.size=r,e.fill=n.fill,e.fillOpacity=(i=n.fillOpacity)!=null?i:1,e.stroke=n.stroke,e.strokeWidth=n.strokeWidth,e.strokeOpacity=n.strokeOpacity}enableOrDisableButtons(){let{currentPage:e,totalPages:n}=this,i=n===0,r=e===n-1,s=e===0;this.nextButtonDisabled=r||i,this.previousButtonDisabled=s||i}nextButtonContainsPoint(e,n){return!this.nextButtonDisabled&&this.nextButton.containsPoint(e,n)}previousButtonContainsPoint(e,n){return!this.previousButtonDisabled&&this.previousButton.containsPoint(e,n)}onPaginationClick(e){let{offsetX:n,offsetY:i}=e;this.nextButtonContainsPoint(n,i)?(this.incrementPage(),this.onPaginationChanged(),e.consume()):this.previousButtonContainsPoint(n,i)&&(this.decrementPage(),this.onPaginationChanged(),e.consume())}onPaginationMouseMove(e){let{offsetX:n,offsetY:i}=e;this.nextButtonContainsPoint(n,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"):this.previousButtonContainsPoint(n,i)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0),this.updateMarkers(),this.chartUpdateCallback(5)}onPaginationChanged(){this.pageUpdateCallback(this.currentPage)}incrementPage(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)}decrementPage(){this.currentPage=Math.max(this.currentPage-1,0)}onMarkerShapeChange(){let e=sS(this.marker.shape||yF);this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(5)}attachPagination(e){e.append(this.group)}computeBBox(){return this.group.computeBBox()}};return t.className="Pagination",t})(),aS=class{constructor(){this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.formatter=void 0}};Be([ut(es,{optional:!0})],aS.prototype,"maxLength",2);Be([ut(Jc)],aS.prototype,"color",2);Be([ut(iS,{optional:!0})],aS.prototype,"fontStyle",2);Be([ut(nS,{optional:!0})],aS.prototype,"fontWeight",2);Be([ut(es)],aS.prototype,"fontSize",2);Be([ut(Ps)],aS.prototype,"fontFamily",2);Be([ut(MC,{optional:!0})],aS.prototype,"formatter",2);FU=class{constructor(){this.size=15,this._shape=void 0,this.padding=8,this.strokeWidth=void 0,this.enabled=!0}set shape(t){var e;this._shape=t,(e=this.parent)==null||e.onMarkerShapeChange()}get shape(){return this._shape}};Be([ut(es)],FU.prototype,"size",2);Be([ut(es)],FU.prototype,"padding",2);Be([ut(es,{optional:!0})],FU.prototype,"strokeWidth",2);Be([ut(Ua,{optional:!0})],FU.prototype,"enabled",2);jwe=class{constructor(){this.strokeWidth=void 0,this.length=void 0}};Be([ut(es,{optional:!0})],jwe.prototype,"strokeWidth",2);Be([ut(es,{optional:!0})],jwe.prototype,"length",2);RF=class{constructor(){this.marker=new FU,this.label=new aS,this.line=new jwe,this.maxWidth=void 0,this.paddingX=16,this.paddingY=8,this.toggleSeriesVisible=!0,this.showSeriesStroke=!1}};Be([ut(es,{optional:!0})],RF.prototype,"maxWidth",2);Be([ut(es)],RF.prototype,"paddingX",2);Be([ut(es)],RF.prototype,"paddingY",2);Be([ut(Ua)],RF.prototype,"toggleSeriesVisible",2);Be([ut(Ua)],RF.prototype,"showSeriesStroke",2);J1t=class{constructor(){this.legendItemClick=void 0,this.legendItemDoubleClick=void 0}};Be([ut(MC,{optional:!0})],J1t.prototype,"legendItemClick",2);FC=(()=>{let t=class{constructor(e){this.ctx=e,this.id=kC(this),this.group=new da({name:"legend",layer:!0,zIndex:9}),this.itemSelection=Bm.select(this.group,b1),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.item=new RF,this.listeners=new J1t,this.truncatedItems=new Set,this._data=[],this._enabled=!0,this.position="bottom",this.maxWidth=void 0,this.maxHeight=void 0,this.reverseOrder=void 0,this.preventHidingAll=void 0,this.destroyFns=[],this.spacing=20,this.characterWidths=new Map,this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new pAi(i=>e.updateService.update(i),i=>this.updatePageNumber(i),e.interactionManager,e.cursorManager),this.pagination.attachPagination(this.group),this.item.marker.parent=this;let n={bypassPause:["animation"]};this.destroyFns.push(e.interactionManager.addListener("click",i=>this.checkLegendClick(i),n),e.interactionManager.addListener("dblclick",i=>this.checkLegendDoubleClick(i),n),e.interactionManager.addListener("hover",i=>this.handleLegendMouseMove(i)),e.layoutService.addListener("start-layout",i=>this.positionLegend(i.shrinkRect)),()=>this.detachLegend())}set data(e){this._data=e,this.updateGroupVisibility()}get data(){return this._data}set enabled(e){this._enabled=e,this.updateGroupVisibility()}get enabled(){return this._enabled}getOrientation(){if(this.orientation!==void 0)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}}destroy(){this.destroyFns.forEach(e=>e())}onMarkerShapeChange(){this.itemSelection.clear(),this.group.markDirty(this.group,2)}getCharacterWidths(e){let{characterWidths:n}=this;if(n.has(e))return n.get(e);let i={"...":dm.getTextSize("...",e).width};return n.set(e,i),i}set visible(e){this._visible=e,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){this.group.visible=this.enabled&&this.visible&&this.data.length>0}attachLegend(e){e.append(this.group)}detachLegend(){var e;(e=this.group.parent)==null||e.removeChild(this.group)}getItemLabel(e){let{ctx:{callbackCache:n}}=this,{formatter:i}=this.item.label;return i?n.call(i,{itemId:e.itemId,value:e.label.text,seriesId:e.seriesId}):e.label.text}performLayout(e,n){let{paddingX:i,paddingY:r,label:s,maxWidth:o,marker:{size:a,padding:l,shape:c},label:{maxLength:d=1/0,fontStyle:u,fontWeight:m,fontSize:f,fontFamily:_},line:x,showSeriesStroke:D}=this.item,E=[...this.data];this.reverseOrder&&E.reverse(),this.itemSelection.update(E);let M=[],I=eS(s),G=o??e*.8,A=a+l+i;if(this.itemSelection.each((Se,je)=>{var ze,Ge,Ae;let Ye=sS(c??je.marker.shape),ft=(ze=je.marker.enabled)!=null?ze:this.item.marker.enabled;Se.marker&&Se.marker instanceof Ye||(Se.marker=new Ye),Se.markerSize=a,Se.spacing=l,Se.fontStyle=u,Se.fontWeight=m,Se.fontSize=f,Se.fontFamily=_;let Ft=(Ge=je.itemId)!=null?Ge:je.id,Tt=this.getItemLabel(je),at=(Tt??"<unknown>").replace(/\r?\n/g," ");Se.text=this.truncate(at,d,G,A,I,Ft),D&&je.line!==void 0?(Se.lineVisible=!0,Se.markerVisible=ft,Se.setSeriesStrokeOffset((Ae=x.length)!=null?Ae:5)):(Se.lineVisible=!1,Se.markerVisible=!0),M.push(Se.computeBBox())}),e=Math.max(1,e),n=Math.max(1,n),!isFinite(e))return!1;let Y=this.size,X=this.oldSize;Y[0]=e,Y[1]=n,(Y[0]!==X[0]||Y[1]!==X[1])&&(X[0]=Y[0],X[1]=Y[1]);let{pages:ne,maxPageHeight:pe,maxPageWidth:ce}=this.updatePagination(M,e,n);this.pages=ne,this.maxPageSize=[ce-i,pe-r];let ie=this.pagination.currentPage,le=this.pages[ie];if(this.pages.length<1||!le){this.visible=!1;return}this.visible=!0,this.updatePositions(ie),this.update()}truncate(e,n,i,r,s,o){let a="...",l=e.split(""),c=!1;if(e.length>n&&(e=`${e.substring(0,n)}`,c=!0),Math.floor(r+dm.getTextSize(e,s).width)>i){let u="",m=this.getCharacterWidths(s),f=r+m[a];for(let _ of l){if(m[_]||(m[_]=dm.getTextSize(_,s).width),f+=m[_],f>i)break;u+=_}e=u,c=!0}return c?(e+=a,this.truncatedItems.add(o)):this.truncatedItems.delete(o),e}updatePagination(e,n,i){let r=this.getOrientation(),s=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=r,this.pagination.translationX=0,this.pagination.translationY=0;let{pages:o,maxPageHeight:a,maxPageWidth:l,paginationBBox:c,paginationVertical:d}=this.calculatePagination(e,n,i),u=o.findIndex(I=>I.endIndex>=s);this.pagination.currentPage=Math.min(Math.max(u,0),o.length-1);let{paddingX:m,paddingY:f}=this.item,_=8,x=l-m,D=a-f,E=0,M=-c.y-this.item.marker.size/2;return d?M+=D+_:(E+=-c.x+x+_,M+=(D-c.height)/2),this.pagination.translationX=E,this.pagination.translationY=M,this.pagination.update(),this.pagination.updateMarkers(),{maxPageHeight:a,maxPageWidth:l,pages:o}}calculatePagination(e,n,i){var r,s,o;let{paddingX:a,paddingY:l}=this.item,c=this.getOrientation(),d=["left","right"].includes(this.position),u=this.pagination.computeBBox(),m=new ml(0,0,0,0),f=[],_=0,x=0,D=0,E=I=>{let{width:z,height:G}=I;return z===u.width&&G===u.height},M=this.maxWidth!==void 0||this.maxHeight!==void 0;do{if(D++>10){Ns.warn("unable to find stable legend layout.");break}u=m;let I=n-(d?0:u.width),z=i-(d?u.height:0),G=aAi({orientation:c,bboxes:e,maxHeight:z,maxWidth:I,itemPaddingY:l,itemPaddingX:a,forceResult:M});f=(r=G?.pages)!=null?r:[],_=(s=G?.maxPageWidth)!=null?s:0,x=(o=G?.maxPageHeight)!=null?o:0;let A=f.length;if(this.pagination.visible=A>1,this.pagination.totalPages=A,this.pagination.update(),m=this.pagination.computeBBox(),!this.pagination.visible)break}while(!E(m));return{maxPageWidth:_,maxPageHeight:x,pages:f,paginationBBox:u,paginationVertical:d}}updatePositions(e=0){let{item:{paddingY:n},itemSelection:i,pages:r}=this;if(r.length<1||!r[e])return;let{columns:s,startIndex:o,endIndex:a}=r[e],l=0,c=0,d=s.length,u=s[0].indices.length,m=this.getOrientation()==="horizontal",f=s[0].bboxes[0].height+n,_=[];i.each((x,D,E)=>{var M,I;if(E<o||E>a){x.visible=!1;return}let z=E-o,G=0,A=0;m?(G=z%d,A=Math.floor(z/d)):(G=Math.floor(z/u),A=z%u),x.visible=!0;let Y=s[G];Y&&(c=f*A,l=(M=_[A])!=null?M:0,_[A]=((I=_[A])!=null?I:0)+Y.columnWidth,x.translationX=Math.floor(l),x.translationY=Math.floor(c))})}updatePageNumber(e){let{pages:n}=this,{startIndex:i,endIndex:r}=n[e];i===0?this.paginationTrackingIndex=0:e===n.length-1?this.paginationTrackingIndex=r:this.paginationTrackingIndex=Math.floor((i+r)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.ctx.updateService.update(5)}update(){let{label:{color:e},marker:n,line:i,showSeriesStroke:r}=this.item;this.itemSelection.each((s,o)=>{var a,l;let c=o.marker;s.markerFill=c.fill,s.markerStroke=c.stroke,s.markerStrokeWidth=(a=n.strokeWidth)!=null?a:Math.min(2,c.strokeWidth),s.markerFillOpacity=c.fillOpacity,s.markerStrokeOpacity=c.strokeOpacity,s.opacity=o.enabled?1:.5,s.color=e;let{line:d}=o;r&&d!==void 0&&(s.lineStroke=d.stroke,s.lineStrokeOpacity=d.strokeOpacity,s.lineStrokeWidth=(l=i.strokeWidth)!=null?l:Math.min(2,d.strokeWidth),s.lineLineDash=d.lineDash)})}getDatumForPoint(e,n){let i=[],r={dist:1/0,datum:void 0};for(let o of this.group.children){if(!o.visible||!(o instanceof b1))continue;let a=o.computeBBox();if(a.grow(this.item.paddingX/2,"horizontal"),a.grow(this.item.paddingY/2,"vertical"),a.containsPoint(e,n))return o.datum;let l=e-a.x-this.item.paddingX/2,c=n-a.y-this.item.paddingY/2,d=ap(l,2)+ap(c,2);l>=0&&c>=0&&d<r.dist&&(r.dist=d,r.datum=o.datum),i.push(a)}if(ml.merge(i).containsPoint(e,n))return r.datum}computeBBox(){return this.group.computeBBox()}computePagedBBox(){let e=this.group.computeBBox();if(this.pages.length<=1)return e;let[n,i]=this.maxPageSize;return e.height=Math.max(i,e.height),e.width=Math.max(n,e.width),e}checkLegendClick(e){let{listeners:{legendItemClick:n},ctx:{chartService:i,highlightManager:r},item:{toggleSeriesVisible:s},preventHidingAll:o}=this,{offsetX:a,offsetY:l}=e,c=this.computeBBox(),d=this.group.visible&&c.containsPoint(a,l),u=this.getDatumForPoint(a,l);if(!d||!u)return;let{id:m,itemId:f,enabled:_}=u,x=i.series.find(E=>E.id===m);if(!x)return;e.consume();let D=_;s&&(D=!_,o&&!D&&i.series.flatMap(M=>M.getLegendData("category")).filter(M=>M.enabled).length<2&&(D=!0),this.ctx.chartEventManager.legendItemClick(x,f,D,u.legendItemName)),D?r.updateHighlight(this.id,{series:x,itemId:f,datum:void 0}):r.updateHighlight(this.id),this.ctx.updateService.update(1,{forceNodeDataRefresh:!0}),n?.({type:"click",enabled:D,itemId:f,seriesId:x.id})}checkLegendDoubleClick(e){var n;let{listeners:{legendItemDoubleClick:i},ctx:{chartService:r},item:{toggleSeriesVisible:s}}=this,{offsetX:o,offsetY:a}=e;if(r.mode==="integrated")return;let l=this.computeBBox(),c=this.group.visible&&l.containsPoint(o,a),d=this.getDatumForPoint(o,a);if(!c||!d)return;let{id:u,itemId:m,seriesId:f}=d,_=r.series.find(x=>x.id===u);if(_){if(e.consume(),s){let x=r.series.flatMap(M=>M.getLegendData("category")),D=x.filter(M=>M.enabled).length,E=x.find(M=>M.itemId===m&&M.seriesId===f);this.ctx.chartEventManager.legendItemDoubleClick(_,m,(n=E?.enabled)!=null?n:!1,D,E?.legendItemName)}this.ctx.updateService.update(1,{forceNodeDataRefresh:!0}),i?.({type:"dblclick",enabled:!0,itemId:m,seriesId:_.id})}}handleLegendMouseMove(e){var n;let{enabled:i,item:{toggleSeriesVisible:r},listeners:s}=this;if(!i)return;let o=this.computeBBox(),{pageX:a,pageY:l,offsetX:c,offsetY:d}=e,u=this.group.visible&&o.containsPoint(c,d);if(!u){this.ctx.cursorManager.updateCursor(this.id),this.ctx.highlightManager.updateHighlight(this.id),this.ctx.tooltipManager.removeTooltip(this.id);return}e.consume();let m=this.getDatumForPoint(c,d);if(!(u&&m!==void 0)){this.ctx.cursorManager.updateCursor(this.id),this.ctx.highlightManager.updateHighlight(this.id);return}let _=m?this.ctx.chartService.series.find(x=>x.id===m?.id):void 0;m&&this.truncatedItems.has((n=m.itemId)!=null?n:m.id)?this.ctx.tooltipManager.updateTooltip(this.id,{pageX:a,pageY:l,offsetX:c,offsetY:d,event:e,showArrow:!1,addCustomClass:!1},rU({content:this.getItemLabel(m)})):this.ctx.tooltipManager.removeTooltip(this.id),(r||s.legendItemClick!=null||s.legendItemDoubleClick!=null)&&this.ctx.cursorManager.updateCursor(this.id,"pointer"),m?.enabled&&_?this.ctx.highlightManager.updateHighlight(this.id,{series:_,itemId:m?.itemId,datum:void 0}):this.ctx.highlightManager.updateHighlight(this.id)}positionLegend(e){let n=e.clone();if(!this.enabled||!this.data.length)return{shrinkRect:n};let[i,r]=this.calculateLegendDimensions(e);this.group.translationX=0,this.group.translationY=0,this.performLayout(i,r);let s=this.computePagedBBox(),o=()=>{switch(this.position){case"top":case"left":return 0;case"bottom":return e.height-s.height;case"right":default:return e.width-s.width}};if(this.visible){let a,l;switch(this.position){case"top":case"bottom":a=(e.width-s.width)/2,l=o(),n.shrink(s.height,this.position);break;case"left":case"right":default:a=o(),l=(e.height-s.height)/2,n.shrink(s.width,this.position)}this.group.translationX=Math.floor(-s.x+e.x+a),this.group.translationY=Math.floor(-s.y+e.y+l)}if(this.visible&&this.enabled&&this.data.length){let a=this.spacing;n.shrink(a,this.position);let l=s.clone();l.x+=this.group.translationX,l.y+=this.group.translationY,this.ctx.tooltipManager.updateExclusiveRect(this.id,l)}else this.ctx.tooltipManager.updateExclusiveRect(this.id);return{shrinkRect:n}}calculateLegendDimensions(e){let{width:n,height:i}=e,r=n/i,s=.5,o=.2,a=.25,l,c;switch(this.position){case"top":case"bottom":let d=r<1?Math.min(s,o*(1/r)):o;l=this.maxWidth?Math.min(this.maxWidth,n):n,c=this.maxHeight?Math.min(this.maxHeight,i):Math.round(i*d);break;case"left":case"right":default:let u=r>1?Math.min(s,a*r):a;l=this.maxWidth?Math.min(this.maxWidth,n):Math.round(n*u),c=this.maxHeight?Math.min(this.maxHeight,i):i}return[l,c]}};return t.className="Legend",t})();Be([ut(Ua)],FC.prototype,"_enabled",2);Be([ut(Iwe)],FC.prototype,"position",2);Be([ut(es,{optional:!0})],FC.prototype,"maxWidth",2);Be([ut(es,{optional:!0})],FC.prototype,"maxHeight",2);Be([ut(Ua,{optional:!0})],FC.prototype,"reverseOrder",2);Be([ut(Gm(["horizontal","vertical"],"an orientation"),{optional:!0})],FC.prototype,"orientation",2);Be([ut(Ua,{optional:!0})],FC.prototype,"preventHidingAll",2);Be([ut(es)],FC.prototype,"spacing",2);Ine=class{constructor(t,e){this.className=t,this.parentElement=e}show(t){var e,n;this.element||(this.element=this.createElement("div"),this.element.className=this.className);let{element:i}=this;if(i.style.position="absolute",i.style.left=`${t.x}px`,i.style.top=`${t.y}px`,i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,this.renderer)i.innerHTML=this.renderer();else{let r=this.createElement("div");r.style.alignItems="center",r.style.boxSizing="border-box",r.style.display="flex",r.style.justifyContent="center",r.style.margin="8px",r.style.height="100%",r.style.font="12px Verdana, sans-serif",r.innerText=(e=this.text)!=null?e:"No data to display",i.replaceChildren(r)}(n=this.parentElement)==null||n.append(i)}hide(){var t;(t=this.element)==null||t.remove(),this.element=void 0}createElement(t,e){return this.parentElement.ownerDocument.createElement(t,e)}};Be([ut(MC,{optional:!0})],Ine.prototype,"renderer",2);Be([ut(Ps,{optional:!0})],Ine.prototype,"text",2);mAi=class{constructor(t){this.noData=new Ine("ag-chart-no-data-overlay",t),this.noVisibleSeries=new Ine("ag-chart-no-visible-series",t),this.noVisibleSeries.text="No visible series"}destroy(){this.noData.hide(),this.noVisibleSeries.hide()}};kW=new Map;rwe={type:"reducer",property:"smallestKeyInterval",initialValue:1/0,reducer:()=>{let t=NaN;return(e=1/0,n)=>{let i=n.keys[0],r=Math.abs(i-t);return t=i,!isNaN(r)&&r>0&&r<e?r:e}}},_Ai={type:"processor",property:"aggValuesExtent",calculate:t=>{var e,n,i,r;let s=[...(n=(e=t.domain.aggValues)==null?void 0:e[0])!=null?n:[0,0]];for(let[o,a]of(r=(i=t.domain.aggValues)==null?void 0:i.slice(1))!=null?r:[])o<s[0]&&(s[0]=o),a>s[1]&&(s[1]=a);return s}},s0t={type:"processor",property:"sortedGroupDomain",calculate:({domain:{groups:t}})=>{if(t!=null)return[...t].sort((e,n)=>{for(let i=0;i<e.length;i++){let r=e[i]-n[i];if(r!==0)return r}return 0})}};a0t=(t=>(t[t.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",t[t.NEAREST_BY_MAIN_AXIS_FIRST=1]="NEAREST_BY_MAIN_AXIS_FIRST",t[t.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",t[t.NEAREST_NODE=3]="NEAREST_NODE",t))(a0t||{});Qne=class{constructor(t,e,{datum:n},i){this.type=t,this.event=e,this.datum=n,this.seriesId=i.id}},OU=(()=>{let t=class extends H1t{constructor(e){super(),this.destroyFns=[],this.seriesGrouping=void 0,this.NodeClickEvent=Qne,this.internalId=kC(this),this.rootGroup=new da({name:"seriesRoot",isVirtual:!0}),this.axes={x:void 0,y:void 0},this.directions=["x","y"],this.nodeDataRefresh=!0,this.moduleMap=new w1t,this._declarationOrder=-1,this.seriesListeners=new qne;let{moduleCtx:n,useLabelLayer:i=!1,pickModes:r=[1],directionKeys:s={},directionNames:o={},contentGroupVirtual:a=!0,canHaveAxes:l=!1}=e;this.ctx=n,this.directionKeys=s,this.directionNames=o,this.canHaveAxes=l,this.contentGroup=this.rootGroup.appendChild(new da({name:`${this.internalId}-content`,layer:!a,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data")})),this.highlightGroup=new da({name:`${this.internalId}-highlight`,layer:!a,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("highlight")}),this.highlightNode=this.highlightGroup.appendChild(new da({name:"highlightNode",zIndex:0})),this.highlightLabel=this.highlightGroup.appendChild(new da({name:"highlightLabel",zIndex:10})),this.pickModes=r,this.labelGroup=this.rootGroup.appendChild(new da({name:`${this.internalId}-series-labels`,layer:i,zIndex:7})),this.annotationGroup=new da({name:`${this.id}-annotation`,layer:!a,isVirtual:a,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("annotation")})}get id(){var e,n;return(n=(e=this.properties)==null?void 0:e.id)!=null?n:this.internalId}get type(){var e;return(e=this.constructor.type)!=null?e:""}set data(e){this._data=e,this.onDataChange()}get data(){var e;return(e=this._data)!=null?e:this._chartData}set visible(e){this.properties.visible=e,this.visibleChanged()}get visible(){return this.properties.visible}onDataChange(){this.nodeDataRefresh=!0}setChartData(e){this._chartData=e,this.data===e&&this.onDataChange()}hasData(){let{data:e}=this;return e&&(!Array.isArray(e)||e.length>0)}onSeriesGroupingChange(e,n){let{internalId:i,type:r,visible:s,rootGroup:o,highlightGroup:a,annotationGroup:l}=this;e&&this.ctx.seriesStateManager.deregisterSeries({id:i,type:r}),n&&this.ctx.seriesStateManager.registerSeries({id:i,type:r,visible:s,seriesGrouping:n}),this.rootGroup.parent!=null&&this.ctx.seriesLayerManager.changeGroup({internalId:i,type:r,rootGroup:o,highlightGroup:a,annotationGroup:l,getGroupZIndexSubOrder:c=>this.getGroupZIndexSubOrder(c),seriesGrouping:n,oldGrouping:e})}getBandScalePadding(){return{inner:1,outer:0}}getGroupZIndexSubOrder(e,n=0){let i=0;switch(e){case"data":case"paths":break;case"labels":i+=2e4;break;case"marker":i+=1e4;break;case"highlight":n+=15e3;break;case"annotation":i+=15e3;break}return[()=>this._declarationOrder+i,n]}addListener(e,n){return this.seriesListeners.addListener(e,n)}dispatch(e,n){this.seriesListeners.dispatch(e,n)}addChartEventListeners(){}destroy(){this.destroyFns.forEach(e=>e()),this.ctx.seriesStateManager.deregisterSeries(this),this.ctx.seriesLayerManager.releaseGroup(this)}getDirectionValues(e,n){let i=this.resolveKeyDirection(e),r=n?.[i],s=[];if(!r)return s;let o=(...a)=>{for(let l of a)Array.isArray(l)?o(...l):typeof l=="object"?o(...Object.values(l)):s.push(l)};return o(...r.map(a=>this.properties[a])),s}getKeys(e){return this.getDirectionValues(e,this.directionKeys)}getNames(e){return this.getDirectionValues(e,this.directionNames)}resolveKeyDirection(e){return e}getDomain(e){let n=this.getSeriesDomain(e),i=this.moduleMap.mapValues(r=>r.getDomain(e));return n.concat(i.flat())}markNodeDataDirty(){this.nodeDataRefresh=!0}visibleChanged(){this.ctx.seriesStateManager.registerSeries(this)}getOpacity(){let{dimOpacity:n=1,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||n===1)return 1;switch(this.isItemIdHighlighted()){case 0:case 1:return 1;case 2:default:return n}}getStrokeWidth(e){let{strokeWidth:n,enabled:i=!0}=this.properties.highlightStyle.series;if(!i||n===void 0)return e;switch(this.isItemIdHighlighted()){case 1:return n;case 0:case 2:return e}}isItemIdHighlighted(){var e,n;let{series:i}=(n=(e=this.ctx.highlightManager)==null?void 0:e.getActiveHighlight())!=null?n:{};return i==null?0:i!==this?2:1}getModuleTooltipParams(){return this.moduleMap.mapValues(n=>n.getTooltipParams()).reduce((n,i)=>Ai(Ai({},i),n),{})}pickNode(e,n){let{pickModes:i,visible:r,rootGroup:s}=this;if(!(!r||!s.visible))for(let o of i){if(n&&!n.includes(o))continue;let a;switch(o){case 0:a=this.pickNodeExactShape(e);break;case 1:case 2:a=this.pickNodeMainAxisFirst(e,o===2);break;case 3:a=this.pickNodeClosestDatum(e);break}if(a)return{pickMode:o,match:a.datum,distance:a.distance}}}pickNodeExactShape(e){let n=this.contentGroup.pickNode(e.x,e.y);return n&&{datum:n.datum,distance:0}}pickNodeClosestDatum(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")}pickNodeMainAxisFirst(e,n){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")}fireNodeClickEvent(e,n){this.fireEvent(new this.NodeClickEvent("nodeClick",e,n,this))}fireNodeDoubleClickEvent(e,n){this.fireEvent(new this.NodeClickEvent("nodeDoubleClick",e,n,this))}toggleSeriesItem(e,n){this.visible=n,this.nodeDataRefresh=!0,this.dispatch("visibility-changed",{itemId:e,enabled:n})}isEnabled(){return this.visible}getModuleMap(){return this.moduleMap}createModuleContext(){return cs(Ai({},this.ctx),{series:this})}getLabelText(e,n,i=String){var r;return e.formatter&&(r=this.ctx.callbackCache.call(e.formatter,Ai({seriesId:this.id},n)))!=null?r:i(n.value)}getMarkerStyle(e,n,i=e.getStyle()){var r,s;let o={size:(s=(r=n.datum.point)==null?void 0:r.size)!=null?s:0},a=U3(o,i);if(e.formatter){let l=this.ctx.callbackCache.call(e.formatter,cs(Ai(Ai({seriesId:this.id},a),n),{datum:n.datum.datum}));return U3(l,a)}return a}updateMarkerStyle(e,n,i,r=n.getStyle(),{applyTranslation:s=!0}={}){let{point:o}=i.datum,a=this.getMarkerStyle(n,i,r),l=this.visible&&a.size>0&&o&&!isNaN(o.x)&&!isNaN(o.y);s?e.setProperties(cs(Ai({visible:l},a),{translationX:o?.x,translationY:o?.y})):e.setProperties(Ai({visible:l},a)),typeof n.shape=="function"&&!e.dirtyPath&&(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())}getMinRect(){}get nodeDataDependencies(){var e;return(e=this._nodeDataDependencies)!=null?e:{seriesRectWidth:NaN,seriesRectHeight:NaN}}checkResize(e){let{width:n,height:i}=e??{width:NaN,height:NaN},r=e?{seriesRectWidth:n,seriesRectHeight:i}:void 0,s=SC(this.nodeDataDependencies,r)!=null;return s&&(this._nodeDataDependencies=r,this.markNodeDataDirty()),s}};return t.highlightedZIndex=1e12,t})();Be([R2({changeValue:function(t,e){this.onSeriesGroupingChange(e,t)}})],OU.prototype,"seriesGrouping",2);Hmt=30,DAi=class{constructor(t){this.groups={},this.series={},this.expectedSeriesCount=1,this.mode="normal",this.rootGroup=t}setSeriesCount(t){this.expectedSeriesCount=t}requestGroup(t){var e,n,i,r;let{internalId:s,type:o,rootGroup:a,highlightGroup:l,annotationGroup:c,seriesGrouping:d}=t,{groupIndex:u=s}=d??{};if(this.series[s]!=null)throw new Error(`AG Charts - series already has an allocated layer: ${this.series[s]}`);Object.keys(this.series).length===0&&(this.mode=this.expectedSeriesCount>=Hmt?"aggressive-grouping":"normal"),(n=(e=this.groups)[o])!=null||(e[o]={});let m=this.lookupIdx(u),f=this.groups[o][m];return f||(f=(r=(i=this.groups[o])[m])!=null?r:i[m]={seriesIds:[],group:this.rootGroup.appendChild(new da({name:`${o}-content`,layer:!0,zIndex:4,zIndexSubOrder:t.getGroupZIndexSubOrder("data")})),highlight:this.rootGroup.appendChild(new da({name:`${o}-highlight`,layer:!0,zIndex:4,zIndexSubOrder:t.getGroupZIndexSubOrder("highlight")})),annotation:this.rootGroup.appendChild(new da({name:`${o}-annotation`,layer:!0,zIndex:4,zIndexSubOrder:t.getGroupZIndexSubOrder("annotation")}))}),this.series[s]={layerState:f,seriesConfig:t},f.seriesIds.push(s),f.group.appendChild(a),f.highlight.appendChild(l),f.annotation.appendChild(c),f.group}changeGroup(t){var e,n;let{internalId:i,seriesGrouping:r,type:s,rootGroup:o,highlightGroup:a,annotationGroup:l,oldGrouping:c}=t,{groupIndex:d=i}=r??{};(n=(e=this.groups[s])==null?void 0:e[d])!=null&&n.seriesIds.includes(i)||(this.series[i]!=null&&this.releaseGroup({internalId:i,seriesGrouping:c,type:s,rootGroup:o,highlightGroup:a,annotationGroup:l}),this.requestGroup(t))}releaseGroup(t){var e,n,i,r,s;let{internalId:o,seriesGrouping:a,rootGroup:l,highlightGroup:c,annotationGroup:d,type:u}=t,{groupIndex:m=o}=a??{};if(this.series[o]==null)throw new Error(`AG Charts - series doesn't have an allocated layer: ${o}`);let f=this.lookupIdx(m),_=(i=(e=this.groups[u])==null?void 0:e[f])!=null?i:(n=this.series[o])==null?void 0:n.layerState;if(_&&(_.seriesIds=_.seriesIds.filter(x=>x!==o),_.group.removeChild(l),_.highlight.removeChild(c),_.annotation.removeChild(d)),_?.seriesIds.length===0)this.rootGroup.removeChild(_.group),this.rootGroup.removeChild(_.highlight),this.rootGroup.removeChild(_.annotation),delete this.groups[u][f],delete this.groups[u][o];else if(_?.seriesIds.length>0){let x=(s=this.series[(r=_?.seriesIds)==null?void 0:r[0]])==null?void 0:s.seriesConfig;_.group.zIndexSubOrder=x?.getGroupZIndexSubOrder("data"),_.highlight.zIndexSubOrder=x?.getGroupZIndexSubOrder("highlight"),_.annotation.zIndexSubOrder=x?.getGroupZIndexSubOrder("annotation")}delete this.series[o]}lookupIdx(t){return this.mode==="normal"?t:typeof t=="string"&&(t=Number(t.split("-").slice(-1)[0]),!t)?0:Math.floor(Math.max(Math.min(t/this.expectedSeriesCount,1),0)*Hmt)}destroy(){for(let t of Object.values(this.groups))for(let e of Object.values(t))this.rootGroup.removeChild(e.group),this.rootGroup.removeChild(e.highlight),this.rootGroup.removeChild(e.annotation);this.groups={},this.series={}}},EAi=class{constructor(){this.groups={}}registerSeries({id:t,seriesGrouping:e,visible:n,type:i}){var r,s;e&&((s=(r=this.groups)[i])!=null||(r[i]={}),this.groups[i][t]={grouping:e,visible:n})}deregisterSeries({id:t,type:e}){this.groups[e]&&delete this.groups[e][t],this.groups[e]&&Object.keys(this.groups[e]).length===0&&delete this.groups[e]}getVisiblePeerGroupIndex({type:t,seriesGrouping:e}){var n;if(!e)return{visibleGroupCount:1,index:0};let i=[...Object.entries((n=this.groups[t])!=null?n:{}).filter(([r,s])=>s.visible).reduce((r,[s,o])=>(o.visible&&r.add(o.grouping.groupIndex),r),new Set).values()];return i.sort((r,s)=>r-s),{visibleGroupCount:i.length,index:i.indexOf(e.groupIndex)}}},MAi=class{constructor(t,e){this.chartLike=t,this.layoutService=e,this.destroyFns=[],this.destroyFns.push(this.layoutService.addListener("layout-complete",n=>this.layoutComplete(n)),this.layoutService.addListener("start-layout",n=>this.positionPadding(n.shrinkRect)),this.layoutService.addListener("start-layout",n=>this.positionCaptions(n.shrinkRect)))}destroy(){this.destroyFns.forEach(t=>t())}layoutComplete({clipSeries:t,series:{paddedRect:e}}){let{seriesArea:n,seriesRoot:i}=this.chartLike;n.clip||t?i.setClipRectInGroupCoordinateSpace(e):i.setClipRectInGroupCoordinateSpace()}positionPadding(t){let{padding:e}=this.chartLike;return t.shrink(e.left,"left"),t.shrink(e.top,"top"),t.shrink(e.right,"right"),t.shrink(e.bottom,"bottom"),{shrinkRect:t}}positionCaptions(t){var e,n,i,r;let{title:s,subtitle:o,footnote:a}=this.chartLike,l=t.clone(),c=f=>{var _;let x=t.height/10,D=(_=f.lineHeight)!=null?_:f.fontSize*Wu.defaultLineHeightRatio,E=t.width,M=Math.max(D,x);f.computeTextWrap(E,M)},d=f=>f==="left"?l.x:f==="right"?l.x+l.width:(f!=="center"&&Ns.error(`invalid textAlign value: ${f}`),l.x+l.width/2),u=(f,_)=>{let x=l.y;f.node.x=d(f.textAlign),f.node.y=x,f.node.textBaseline="top",c(f);let D=f.node.computeBBox(),E=Math.ceil(D.y-x+D.height+_);l.shrink(E,"top")},m=(f,_)=>{let x=l.y+l.height;f.node.x=d(f.textAlign),f.node.y=x,f.node.textBaseline="bottom",c(f);let D=f.node.computeBBox(),E=Math.ceil(x-D.y+_);l.shrink(E,"bottom")};if(o&&(o.node.visible=(e=o.enabled)!=null?e:!1),s&&(s.node.visible=s.enabled,s.node.visible)){let f=o?.node.visible?Hm.SMALL_PADDING:Hm.LARGE_PADDING,_=(n=s.spacing)!=null?n:f;u(s,_)}return o&&o.node.visible&&u(o,(i=o.spacing)!=null?i:0),a&&(a.node.visible=a.enabled,a.node.visible&&m(a,(r=a.spacing)!=null?r:0)),{shrinkRect:l}}},h0t=class extends qne{constructor(t){super(),this.updateCallback=t}update(t=0,{forceNodeDataRefresh:e=!1,skipAnimations:n=!1}={}){this.updateCallback(t,{forceNodeDataRefresh:e,skipAnimations:n})}dispatchUpdateComplete(t){let e={type:"update-complete",minRect:t};this.dispatch("update-complete",e)}};owe=class{constructor(){this.clip=void 0,this.padding=new oS(0)}};Be([ut(Ua,{optional:!0})],owe.prototype,"clip",2);awe=new WeakMap,ov=class extends H1t{constructor(t,e){var n;super(),this.id=kC(this),this.processedOptions={},this.userOptions={},this.queuedUserOptions=[],this.seriesRoot=new da({name:`${this.id}-Series-root`}),this.debug=Nm.create(),this.extraDebugStats={},this.container=void 0,this.data=[],this._firstAutoSize=!0,this.padding=new oS(20),this._seriesArea=new owe,this.title=void 0,this.subtitle=void 0,this.footnote=void 0,this.mode="standalone",this._destroyed=!1,this._destroyFns=[],this.modules=new Map,this.legends=new Map,this.processors=[],this._pendingFactoryUpdatesCount=0,this._performUpdateNoRenderCount=0,this._performUpdateType=6,this._performUpdateSkipAnimations=!1,this.updateShortcutCount=0,this.seriesToUpdate=new Set,this.updateMutex=new QIi,this.updateRequestors={},this.performUpdateTrigger=eAi(c=>mr(this,[c],function*({count:d}){this._destroyed||this.updateMutex.acquire(()=>mr(this,null,function*(){try{yield this.performUpdate(d)}catch(u){this._lastPerformUpdateError=u,Ns.error("update error",u)}}))})),this._axes=[],this._series=[],this.lastInteractionEvent=void 0,this.pointerScheduler=JIi(()=>{this.lastInteractionEvent&&this.handlePointer(this.lastInteractionEvent),this.lastInteractionEvent=void 0}),this.onSeriesNodeClick=c=>{let d=cs(Ai({},c),{type:"seriesNodeClick"});Object.defineProperty(d,"series",{enumerable:!1,get:()=>c.series}),this.fireEvent(d)},this.onSeriesNodeDoubleClick=c=>{let d=cs(Ai({},c),{type:"seriesNodeDoubleClick"});this.fireEvent(d)},this.specialOverrides=kAi(t);let{window:i,document:r}=this.specialOverrides,s=e?.scene,o=(n=e?.element)!=null?n:r.createElement("div"),a=e?.container,l=new da({name:"root"});l.visible=!1,l.append(this.seriesRoot),this.axisGridGroup=new da({name:"Axes-Grids",layer:!0,zIndex:1}),l.appendChild(this.axisGridGroup),this.axisGroup=new da({name:"Axes",layer:!0,zIndex:2}),l.appendChild(this.axisGroup),this.element=o,o.classList.add("ag-chart-wrapper"),o.style.position="relative",this.scene=s??new n1t(this.specialOverrides),this.scene.root=l,this.scene.container=o,this.autoSize=!0,this.chartEventManager=new K1t,this.cursorManager=new Y1t(o),this.highlightManager=new q1t,this.interactionManager=new Z1t(o,r,i),this.zoomManager=new X1t,this.layoutService=new Q1t,this.updateService=new h0t((c=0,{forceNodeDataRefresh:d,skipAnimations:u})=>this.update(c,{forceNodeDataRefresh:d,skipAnimations:u})),this.seriesStateManager=new EAi,this.seriesLayerManager=new DAi(this.seriesRoot),this.callbackCache=new XIi,this.animationManager=new $1t(this.interactionManager,this.updateMutex),this.animationManager.skip(),this.animationManager.play(),this.processors=[new MAi(this,this.layoutService)],this.tooltip=new zft(this.scene.canvas.element,r,i,r.body),this.tooltipManager=new J7e(this.tooltip,this.interactionManager),this.overlays=new mAi(this.element),this.highlight=new W1t,this.container=a,Lmt.observe(this.element,c=>this.rawResize(c)),this._destroyFns.push(this.interactionManager.addListener("click",c=>this.onClick(c)),this.interactionManager.addListener("dblclick",c=>this.onDoubleClick(c)),this.interactionManager.addListener("hover",c=>this.onMouseMove(c)),this.interactionManager.addListener("leave",c=>this.onLeave(c)),this.interactionManager.addListener("page-left",()=>this.destroy()),this.interactionManager.addListener("wheel",()=>this.disablePointer()),this.interactionManager.addListener("drag-start",()=>this.disablePointer()),this.animationManager.addListener("animation-frame",c=>{this.update(5)}),this.highlightManager.addListener("highlight-change",c=>this.changeHighlightDatum(c)),this.zoomManager.addListener("zoom-change",c=>this.update(1,{forceNodeDataRefresh:!0,skipAnimations:!0}))),this.attachLegend("category",FC),this.legend=this.legends.get("category")}static getInstance(t){return awe.get(t)}getOptions(){var t;let{queuedUserOptions:e}=this,n=(t=e[e.length-1])!=null?t:this.userOptions;return nU(n)}autoSizeChanged(t){let{style:e}=this.element;if(t){if(e.display="block",e.width="100%",e.height="100%",!this._lastAutoSize)return;this.resize(void 0,void 0,"autoSize option")}else e.display="inline-block",e.width="auto",e.height="auto"}download(t,e){this.scene.download(t,e)}get seriesArea(){return this._seriesArea}set seriesArea(t){t?this._seriesArea=t:this._seriesArea=new owe}get destroyed(){return this._destroyed}addModule(t){if(this.modules.has(t.optionsKey))throw new Error(`AG Charts - module already initialised: ${t.optionsKey}`);let e=new t.instanceConstructor(this.getModuleContext());if(t.type==="legend"){let n=e;this.legends.set(t.identifier,n),n.attachLegend(this.scene.root)}this.modules.set(t.optionsKey,e)}removeModule(t){var e;t.type==="legend"&&this.legends.delete(t.identifier),(e=this.modules.get(t.optionsKey))==null||e.destroy(),this.modules.delete(t.optionsKey)}attachLegend(t,e){let n=new e(this.getModuleContext());this.legends.set(t,n),n.attachLegend(this.scene.root)}isModuleEnabled(t){return this.modules.has(t.optionsKey)}getModuleContext(){let{scene:t,animationManager:e,chartEventManager:n,cursorManager:i,highlightManager:r,interactionManager:s,tooltipManager:o,zoomManager:a,layoutService:l,updateService:c,seriesStateManager:d,seriesLayerManager:u,callbackCache:m,specialOverrides:{window:f,document:_}}=this;return{window:f,document:_,scene:t,animationManager:e,chartEventManager:n,cursorManager:i,highlightManager:r,interactionManager:s,tooltipManager:o,zoomManager:a,chartService:this,layoutService:l,updateService:c,seriesStateManager:d,seriesLayerManager:u,callbackCache:m}}destroy(t){if(this._destroyed)return;let e=t?.keepTransferableResources,n;this._performUpdateType=6,this._destroyFns.forEach(i=>i()),this.processors.forEach(i=>i.destroy()),this.tooltipManager.destroy(),this.tooltip.destroy(),this.legends.forEach(i=>i.destroy()),this.legends.clear(),this.overlays.destroy(),Lmt.unobserve(this.element);for(let{instance:i}of Object.values(this.modules))this.removeModule(i);return this.interactionManager.destroy(),this.animationManager.stop(),e?(this.scene.strip(),n={container:this.container,scene:this.scene,element:this.element}):(this.scene.destroy(),this.container=void 0),this.removeAllSeries(),this.seriesLayerManager.destroy(),this.axes.forEach(i=>i.destroy()),this.axes=[],this.callbackCache.invalidateCache(),this._destroyed=!0,n}disablePointer(t=!1){t||this.tooltipManager.removeTooltip(this.id),this.highlightManager.updateHighlight(this.id),this.lastInteractionEvent&&(this.lastInteractionEvent=void 0)}requestFactoryUpdate(t){this._pendingFactoryUpdatesCount++,this.updateMutex.acquire(()=>mr(this,null,function*(){yield t(),this._pendingFactoryUpdatesCount--}))}get performUpdateType(){return this._performUpdateType}get lastPerformUpdateError(){return this._lastPerformUpdateError}update(t=0,e){var n,i;let{forceNodeDataRefresh:r=!1,skipAnimations:s,seriesToUpdate:o=this.series,newAnimationBatch:a}=e??{};r&&this.series.forEach(l=>l.markNodeDataDirty());for(let l of o)this.seriesToUpdate.add(l);if(s&&(this.animationManager.skipCurrentBatch(),this._performUpdateSkipAnimations=!0),a&&(this.animationManager.isActive()?this._performUpdateSkipAnimations=!0:(n=this._performUpdateSkipAnimations)!=null||(this._performUpdateSkipAnimations=!1)),Nm.check(!0)){let l=(i=new Error().stack)!=null?i:"<unknown>";l=l.replace(/\([^)]*/g,""),this.updateRequestors[l]=t}t<this._performUpdateType&&(this._performUpdateType=t,this.performUpdateTrigger.schedule(e?.backOffMs))}performUpdate(t){return mr(this,null,function*(){var e;let{_performUpdateType:n,extraDebugStats:i}=this,r=[...this.seriesToUpdate];this._performUpdateType=6,this.seriesToUpdate.clear(),this.updateShortcutCount===0&&n<5&&this.animationManager.startBatch(this._performUpdateSkipAnimations),this.debug("Chart.performUpdate() - start",pU[n]);let s={start:performance.now()};switch(n){case 0:case 1:yield this.processData(),this.disablePointer(!0),s["\u{1F3ED}"]=performance.now();case 2:if(this.checkUpdateShortcut(2)||!this.checkFirstAutoSize(r))break;yield this.processLayout(),s["\u2316"]=performance.now();case 3:if(this.checkUpdateShortcut(3))break;let{seriesRect:a}=this,l=[...r].map(u=>u.update({seriesRect:a}));yield Promise.all(l),s["\u{1F914}"]=performance.now();case 4:if(this.checkUpdateShortcut(4))break;let c=this.tooltipManager.getTooltipMeta(this.id),d=((e=c?.event)==null?void 0:e.type)==="hover";n<=3&&d&&this.handlePointer(c.event),s["\u2196"]=performance.now();case 5:if(this.checkUpdateShortcut(5))break;i.updateShortcutCount=this.updateShortcutCount,yield this.scene.render({debugSplitTimes:s,extraDebugStats:i}),this.extraDebugStats={};case 6:this.updateShortcutCount=0,this.updateRequestors={},this._performUpdateSkipAnimations=void 0,this.animationManager.endBatch()}this.updateService.dispatchUpdateComplete(this.getMinRect());let o=performance.now();this.debug("Chart.performUpdate() - end",{chart:this,durationMs:Math.round((o-s.start)*100)/100,count:t,performUpdateType:pU[n]})})}checkUpdateShortcut(t){return this.updateShortcutCount>3?(Ns.warn("exceeded the maximum number of simultaneous updates (4), discarding changes and rendering",this.updateRequestors),!1):this.performUpdateType<=t?(this.updateShortcutCount++,!0):!1}checkFirstAutoSize(t){if(this.autoSize&&!this._lastAutoSize){let e=this._performUpdateNoRenderCount++,n=(e^2)*10;if(e<8)return this.update(2,{seriesToUpdate:t,backOffMs:n}),this.debug("Chart.checkFirstAutoSize() - backing off until first size update",n),!1;this.debug("Chart.checkFirstAutoSize() - timeout for first size update.")}return this._performUpdateNoRenderCount=0,!0}set axes(t){let e=new Set;this._axes.forEach(n=>{n.detachAxis(this.axisGroup,this.axisGridGroup),e.add(n)}),this._axes=t.filter(n=>!n.linkedTo).concat(t.filter(n=>n.linkedTo)),this._axes.forEach(n=>{n.attachAxis(this.axisGroup,this.axisGridGroup),e.delete(n)}),this.zoomManager.updateAxes(this._axes),e.forEach(n=>n.destroy())}get axes(){return this._axes}set series(t){this.removeAllSeries(),this.seriesLayerManager.setSeriesCount(t.length),t.forEach(e=>this.addSeries(e))}get series(){return this._series}addSeries(t){let{series:e}=this;return e.indexOf(t)<0?(e.push(t),t.rootGroup.parent==null&&this.seriesLayerManager.requestGroup(t),this.initSeries(t),!0):!1}initSeries(t){let e=this;t.chart={get mode(){return e.mode},get seriesRect(){return e.seriesRect},placeLabels(){return e.placeLabels()}},t.setChartData(this.data),this.addSeriesListeners(t),t.addChartEventListeners()}removeAllSeries(){this.series.forEach(t=>{t.removeEventListener("nodeClick",this.onSeriesNodeClick),t.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),t.destroy(),t.chart=void 0}),this._series=[]}addSeriesListeners(t){this.hasEventListener("seriesNodeClick")&&t.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&t.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick)}updateAllSeriesListeners(){this.series.forEach(t=>{t.removeEventListener("nodeClick",this.onSeriesNodeClick),t.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick),this.addSeriesListeners(t)})}assignSeriesToAxes(){this.axes.forEach(t=>{t.boundSeries=this.series.filter(e=>e.axes[t.direction]===t)})}assignAxesToSeries(){let t={};this.axes.forEach(e=>{var n;let i=e.direction;((n=t[i])!=null?n:t[i]=[]).push(e)}),this.series.forEach(e=>{e.directions.forEach(n=>{let i=t[n];if(!i){Ns.warnOnce(`no available axis for direction [${n}]; check series and axes configuration.`);return}let r=e.getKeys(n),s=this.findMatchingAxis(i,r);if(!s){Ns.warnOnce(`no matching axis for direction [${n}] and keys [${r}]; check series and axes configuration.`);return}e.axes[n]=s})})}findMatchingAxis(t,e){for(let n of t){let i=n.keys;if(!i.length)return n;if(e){for(let r of e)if(i.indexOf(r)>=0)return n}}}rawResize(t){var e;let{width:n,height:i}=t;if(n=Math.floor(n),i=Math.floor(i),!this.autoSize||n===0&&i===0)return;let[r=0,s=0]=(e=this._lastAutoSize)!=null?e:[];r===n&&s===i||(this._lastAutoSize=[n,i],this.resize(void 0,void 0,"SizeMonitor"))}resize(t,e,n){var i,r,s,o;if(t??(t=(r=this.width)!=null?r:this.autoSize?(i=this._lastAutoSize)==null?void 0:i[0]:this.scene.canvas.width),e??(e=(o=this.height)!=null?o:this.autoSize?(s=this._lastAutoSize)==null?void 0:s[1]:this.scene.canvas.height),this.debug(`Chart.resize() from ${n}`,{width:t,height:e,stack:new Error().stack}),!(!t||!e||!Number.isFinite(t)||!Number.isFinite(e))&&this.scene.resize(t,e)){this.disablePointer(),this.animationManager.reset();let a=!0;this.autoSize&&this._firstAutoSize&&(a=!1,this._firstAutoSize=!1),this.update(2,{forceNodeDataRefresh:!0,skipAnimations:a})}}processData(){return mr(this,null,function*(){this.series.some(n=>n.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes());let t=new j1t(this.mode),e=this.series.map(n=>n.processData(t));yield t.execute(),yield Promise.all(e),yield this.updateLegend()})}placeLabels(){let t=[],e=[];for(let l of this.series){if(!l.visible)continue;let c=l.getLabelData();c&&FIi(c[0])&&(e.push(c),t.push(l))}let{seriesRect:n}=this,{top:i,right:r,bottom:s,left:o}=this.seriesArea.padding,a=n&&e.length>0?LIi(e,{x:-o,y:-i,width:n.width+o+r,height:n.height+i+s}):[];return new Map(a.map((l,c)=>[t[c],l]))}updateLegend(){return mr(this,null,function*(){this.legends.forEach((t,e)=>{let n=r=>r.every(s=>s.legendType==="category"),i=this.series.filter(r=>r.properties.showInLegend).flatMap(r=>r.getLegendData(e));n(i)&&this.validateCategoryLegendData(i),t.data=i})})}validateCategoryLegendData(t){let e={};t.forEach(n=>{var i,r,s,o,a;let l=(i=this.series.find(c=>c.id===n.seriesId))==null?void 0:i.type;l&&((r=e[l])!=null||(e[l]={}),(a=(s=e[l])[o=n.label.text])!=null||(s[o]=new Set),n.marker.fill!=null&&e[l][n.label.text].add(n.marker.fill))});for(let n of Object.values(e))for(let[i,r]of Object.entries(n))r.size>1&&Ns.warnOnce(`legend item '${i}' has multiple fill colors, this may cause unexpected behaviour.`)}processLayout(){return mr(this,null,function*(){var t;let e=this.animationRect;yield this.performLayout(),e&&!((t=this.animationRect)!=null&&t.equals(e))&&this.animationManager.skipCurrentBatch(),this.handleOverlays(),this.debug("Chart.performUpdate() - seriesRect",this.seriesRect)})}performLayout(){return mr(this,null,function*(){this.scene.root&&(this.scene.root.visible=!0);let{width:t,height:e}=this.scene,n={shrinkRect:new ml(0,0,t,e)};return n=this.layoutService.dispatchPerformLayout("start-layout",n),n=this.layoutService.dispatchPerformLayout("before-series",n),n.shrinkRect})}pickSeriesNode(t,e,n){var i,r;let s=performance.now(),o=e?[0]:void 0,a=[...this.series].reverse(),l;for(let c of a){if(!c.visible||!c.rootGroup.visible)continue;let{match:d,distance:u}=(i=c.pickNode(t,o))!=null?i:{};if(!(!d||u==null)&&((!l||l.distance>u)&&u<=(n??1/0)&&(l={series:c,distance:u,datum:d}),u===0))break}return this.extraDebugStats.pickSeriesNode=Math.round(((r=this.extraDebugStats.pickSeriesNode)!=null?r:0)+(performance.now()-s)),l}onMouseMove(t){this.lastInteractionEvent=t,this.pointerScheduler.schedule(),this.extraDebugStats.mouseX=t.offsetX,this.extraDebugStats.mouseY=t.offsetY,this.update(5)}onLeave(t){this.tooltip.pointerLeftOntoTooltip(t)||(this.disablePointer(),this.update(5))}handlePointer(t){let{lastPick:e,hoverRect:n}=this,{offsetX:i,offsetY:r}=t,s=(o=!1)=>{e&&this.disablePointer(o)};if(!n?.containsPoint(i,r)){s();return}this.handlePointerTooltip(t,s),this.handlePointerNode(t)}handlePointerTooltip(t,e){let{lastPick:n,tooltip:i}=this,{range:r}=i,{offsetX:s,offsetY:o}=t,a;typeof r=="number"&&Number.isFinite(r)&&(a=r);let l=this.pickSeriesNode({x:s,y:o},r==="exact",a);if(!l){this.tooltipManager.removeTooltip(this.id),this.highlight.range==="tooltip"&&e(!0);return}let c=this.highlight.range==="node"||!n||n.datum!==l.datum,d;c?(d=l.series.getTooltipHtml(l.datum),this.highlight.range==="tooltip"&&this.highlightManager.updateHighlight(this.id,l.datum)):n&&(n.event=t.sourceEvent);let u=a!=null,m=this.tooltip.enabled&&l.series.properties.tooltip.enabled,f=r==="exact"&&l.distance===0,x=m&&(r==="nearest"||u||f)&&(!c||d!==void 0),D=J7e.makeTooltipMeta(t,this.scene.canvas,l.datum,this.specialOverrides.window);x&&this.tooltipManager.updateTooltip(this.id,D,d)}handlePointerNode(t){this.checkSeriesNodeRange(t,(n,i)=>{(n.hasEventListener("nodeClick")||n.hasEventListener("nodeDoubleClick"))&&this.cursorManager.updateCursor("chart","pointer"),this.highlight.range==="node"&&this.highlightManager.updateHighlight(this.id,i)})||(this.cursorManager.updateCursor("chart"),this.highlight.range==="node"&&this.highlightManager.updateHighlight(this.id))}onClick(t){if(this.checkSeriesNodeClick(t)){this.update(3);return}this.fireEvent({type:"click",event:t.sourceEvent})}onDoubleClick(t){if(this.checkSeriesNodeDoubleClick(t)){this.update(3);return}this.fireEvent({type:"doubleClick",event:t.sourceEvent})}checkSeriesNodeClick(t){return this.checkSeriesNodeRange(t,(e,n)=>e.fireNodeClickEvent(t.sourceEvent,n))}checkSeriesNodeDoubleClick(t){return this.checkSeriesNodeRange(t,(e,n)=>e.fireNodeDoubleClickEvent(t.sourceEvent,n))}checkSeriesNodeRange(t,e){let n=this.pickSeriesNode({x:t.offsetX,y:t.offsetY},!1),i=n?.datum,r=i?.series.properties.nodeClickRange,s;typeof r=="number"&&Number.isFinite(r)&&(s=r);let o=this.pickSeriesNode({x:t.offsetX,y:t.offsetY},!0);if(o?this.highlightManager.updatePicked(this.id,o.datum):this.highlightManager.updatePicked(this.id),i&&r==="nearest")return e(i.series,i),!0;if(r!=="exact"&&(o=this.pickSeriesNode({x:t.offsetX,y:t.offsetY},!1,s)),!o)return!1;let a=s!=null,l=r==="exact"&&o.distance===0;return a||l?(e(o.series,o.datum),!0):!1}changeHighlightDatum(t){var e,n;let i=new Set,{series:r=void 0,datum:s}=(e=t.currentHighlight)!=null?e:{},{series:o=void 0,datum:a}=(n=t.previousHighlight)!=null?n:{};o&&i.add(o),r&&i.add(r),o?.properties.cursor&&a&&this.cursorManager.updateCursor(o.id),r?.properties.cursor&&s&&this.cursorManager.updateCursor(r.id,r.properties.cursor),this.lastPick=t.currentHighlight?{datum:t.currentHighlight}:void 0,r==null||o==null?this.update(3):this.update(3,{seriesToUpdate:i})}waitForUpdate(t=5e3){return mr(this,null,function*(){let e=performance.now();for(this._pendingFactoryUpdatesCount>0&&(yield this.updateMutex.waitForClearAcquireQueue());this._performUpdateType!==6;){if(performance.now()-e>t)throw new Error("waitForUpdate() timeout reached.");yield ZIi(5)}yield this.updateMutex.waitForClearAcquireQueue()})}handleOverlays(){let t=!this.series.some(e=>e.hasData());if(this.toggleOverlay(this.overlays.noData,t),!t){let e=!this.series.some(n=>n.visible);this.toggleOverlay(this.overlays.noVisibleSeries,e)}}toggleOverlay(t,e){e&&this.seriesRect?t.show(this.seriesRect):t.hide()}getMinRect(){let t=this.series.map(e=>e.getMinRect()).filter(e=>e!==void 0);if(t.length)return new ml(0,0,t.reduce((e,n)=>Math.max(e,n.width),0),t.reduce((e,n)=>Math.max(e,n.height),0))}};Be([R2({newValue(t){this.destroyed||(t.setAttribute("data-ag-charts",""),t.appendChild(this.element),awe.set(t,this))},oldValue(t){t.removeAttribute("data-ag-charts"),t.removeChild(this.element),awe.delete(t)}})],ov.prototype,"container",2);Be([R2({newValue(t){var e;(e=this.series)==null||e.forEach(n=>{n.setChartData(t)})}})],ov.prototype,"data",2);Be([R2({newValue(t){this.resize(t,void 0,"width option")}})],ov.prototype,"width",2);Be([R2({newValue(t){this.resize(void 0,t,"height option")}})],ov.prototype,"height",2);Be([R2({changeValue(t){this.autoSizeChanged(t)}}),ut(Ua)],ov.prototype,"autoSize",2);Be([R2({newValue(t){var e;(e=this.scene.root)==null||e.appendChild(t.node)},oldValue(t){var e;(e=this.scene.root)==null||e.removeChild(t.node)}})],ov.prototype,"title",2);Be([R2({newValue(t){var e;(e=this.scene.root)==null||e.appendChild(t.node)},oldValue(t){var e;(e=this.scene.root)==null||e.removeChild(t.node)}})],ov.prototype,"subtitle",2);Be([R2({newValue(t){var e;(e=this.scene.root)==null||e.appendChild(t.node)},oldValue(t){var e;(e=this.scene.root)==null||e.removeChild(t.node)}})],ov.prototype,"footnote",2);Be([ut(Gm(["standalone","integrated"],"a chart mode"))],ov.prototype,"mode",2);p0t=class extends OU{isContinuous(){var t,e;let n=lu.is((t=this.axes.x)==null?void 0:t.scale),i=lu.is((e=this.axes.y)==null?void 0:e.scale);return{isContinuousX:n,isContinuousY:i}}getModulePropertyDefinitions(){return this.moduleMap.mapValues(t=>t.getPropertyDefinitions(this.isContinuous())).flat()}requestDataModel(t,e,n){return mr(this,null,function*(){n.props.push(...this.getModulePropertyDefinitions());let{dataModel:i,processedData:r}=yield t.request(this.id,e??[],n);return this.dataModel=i,this.processedData=r,this.dispatch("data-processed",{dataModel:i,processedData:r}),{dataModel:i,processedData:r}})}isProcessedDataAnimatable(){var t,e;let n=(e=(t=this.processedData)==null?void 0:t.reduced)==null?void 0:e.animationValidation;if(!n)return!0;let{orderedKeys:i,uniqueKeys:r}=n;return i&&r}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}},vb=class extends A2{constructor(){super(...arguments),this.fill="rgba(255,255,255, 0.33)",this.stroke="rgba(0, 0, 0, 0.4)",this.strokeWidth=2}};Be([ut(Jc,{optional:!0})],vb.prototype,"fill",2);Be([ut(Bh,{optional:!0})],vb.prototype,"fillOpacity",2);Be([ut(Jc,{optional:!0})],vb.prototype,"stroke",2);Be([ut(es,{optional:!0})],vb.prototype,"strokeWidth",2);Be([ut(Bh,{optional:!0})],vb.prototype,"strokeOpacity",2);Be([ut(tS,{optional:!0})],vb.prototype,"lineDash",2);Be([ut(es,{optional:!0})],vb.prototype,"lineDashOffset",2);Jne=class extends A2{};Be([ut(es,{optional:!0})],Jne.prototype,"strokeWidth",2);Be([ut(Bh,{optional:!0})],Jne.prototype,"dimOpacity",2);Be([ut(Ua,{optional:!0})],Jne.prototype,"enabled",2);m0t=class extends A2{constructor(){super(...arguments),this.color="black"}};Be([ut(Jc,{optional:!0})],m0t.prototype,"color",2);NU=class extends A2{constructor(){super(...arguments),this.item=new vb,this.series=new Jne,this.text=new m0t}};Be([ut(Vc)],NU.prototype,"item",2);Be([ut(Vc)],NU.prototype,"series",2);Be([ut(Vc)],NU.prototype,"text",2);LC=class extends A2{constructor(){super(...arguments),this.visible=!0,this.showInLegend=!0,this.cursor="default",this.nodeClickRange="exact",this.highlightStyle=new NU}};Be([ut(Ps,{optional:!0})],LC.prototype,"id",2);Be([ut(Ua)],LC.prototype,"visible",2);Be([ut(Ua)],LC.prototype,"showInLegend",2);Be([ut(Ps)],LC.prototype,"cursor",2);Be([ut(Awe)],LC.prototype,"nodeClickRange",2);Be([ut(Vc)],LC.prototype,"highlightStyle",2);IAi={x:["xKey"],y:["yKey"]},AAi={x:["xName"],y:["yName"]},Kwe=class extends Qne{constructor(t,e,n,i){super(t,e,n,i),this.xKey=i.properties.xKey,this.yKey=i.properties.yKey}},lS=class extends LC{};Be([ut(Ps,{optional:!0})],lS.prototype,"legendItemName",2);cS=class extends p0t{constructor(t){var e=t,{pathsPerSeries:n=1,hasMarkers:i=!1,hasHighlightedLabels:r=!1,pathsZIndexSubOrderOffset:s=[],directionKeys:o=IAi,directionNames:a=AAi,datumSelectionGarbageCollection:l=!0,markerSelectionGarbageCollection:c=!0,animationResetFns:d}=e,u=W3(e,["pathsPerSeries","hasMarkers","hasHighlightedLabels","pathsZIndexSubOrderOffset","directionKeys","directionNames","datumSelectionGarbageCollection","markerSelectionGarbageCollection","animationResetFns"]);super(Ai({directionKeys:o,directionNames:a,useSeriesGroupLayer:!0,canHaveAxes:!0},u)),this._contextNodeData=[],this.NodeClickEvent=Kwe,this.highlightSelection=Bm.select(this.highlightNode,()=>this.opts.hasMarkers?this.markerFactory():this.nodeFactory()),this.highlightLabelSelection=Bm.select(this.highlightLabel,Wu),this.annotationSelections=new Set,this.subGroups=[],this.subGroupId=0,this.debug=Nm.create(),this.opts={pathsPerSeries:n,hasMarkers:i,hasHighlightedLabels:r,pathsZIndexSubOrderOffset:s,directionKeys:o,directionNames:a,animationResetFns:d,datumSelectionGarbageCollection:l,markerSelectionGarbageCollection:c},this.animationState=new IU("empty",{empty:{update:{target:"ready",action:m=>this.animateEmptyUpdateReady(m)}},ready:{updateData:"waiting",clear:"clearing",highlight:m=>this.animateReadyHighlight(m),highlightMarkers:m=>this.animateReadyHighlightMarkers(m),resize:m=>this.animateReadyResize(m)},waiting:{update:{target:"ready",action:m=>this.animateWaitingUpdateReady(m)}},clearing:{update:{target:"empty",action:m=>this.animateClearingUpdateEmpty(m)}}},()=>this.checkProcessedDataAnimatable())}get contextNodeData(){return this._contextNodeData.slice()}addChartEventListeners(){this.destroyFns.push(this.ctx.chartEventManager.addListener("legend-item-click",t=>this.onLegendItemClick(t)),this.ctx.chartEventManager.addListener("legend-item-double-click",t=>this.onLegendItemDoubleClick(t)))}destroy(){super.destroy(),this._contextNodeData.splice(0,this._contextNodeData.length),this.subGroups.splice(0,this.subGroups.length)}update(t){return mr(this,arguments,function*({seriesRect:e}){var n,i;let{visible:r,_contextNodeData:s}=this,{series:o}=(i=(n=this.ctx.highlightManager)==null?void 0:n.getActiveHighlight())!=null?i:{},a=o?o===this:void 0,l=this.checkResize(e),c=yield this.updateHighlightSelection(a);yield this.updateSelections(r),yield this.updateNodes(c,a,r);let d=this.getAnimationData(e,s);l&&this.animationState.transition("resize",d),this.animationState.transition("update",d)})}updateSelections(t){return mr(this,null,function*(){if(!(!t&&this.ctx.animationManager.isSkipped())&&!(!this.nodeDataRefresh&&!this.isPathOrSelectionDirty())){if(this.nodeDataRefresh){this.nodeDataRefresh=!1,this.debug("CartesianSeries.updateSelections() - calling createNodeData() for",this.id),this._contextNodeData=yield this.createNodeData();let e=this.isProcessedDataAnimatable();this._contextNodeData.forEach(r=>{var s;(s=r.animationValid)!=null||(r.animationValid=e)}),yield this.updateSeriesGroups();let{dataModel:n,processedData:i}=this;n!==void 0&&i!==void 0&&this.dispatch("data-update",{dataModel:n,processedData:i})}yield Promise.all(this.subGroups.map((e,n)=>this.updateSeriesGroupSelections(e,n)))}})}updateSeriesGroupSelections(t,e,n){return mr(this,null,function*(){let{datumSelection:i,labelSelection:r,markerSelection:s,paths:o}=t,a=this._contextNodeData[e],{nodeData:l,labelData:c,itemId:d}=a;yield this.updatePaths({seriesHighlighted:n,itemId:d,contextData:a,paths:o,seriesIdx:e}),t.datumSelection=yield this.updateDatumSelection({nodeData:l,datumSelection:i,seriesIdx:e}),t.labelSelection=yield this.updateLabelSelection({labelData:c,labelSelection:r,seriesIdx:e}),s&&(t.markerSelection=yield this.updateMarkerSelection({nodeData:l,markerSelection:s,seriesIdx:e}))})}markerFactory(){let t=sS();return new t}updateSeriesGroups(){return mr(this,null,function*(){let{_contextNodeData:t,contentGroup:e,subGroups:n,opts:{pathsPerSeries:i,hasMarkers:r,datumSelectionGarbageCollection:s,markerSelectionGarbageCollection:o}}=this;if(t.length===n.length)return;t.length<n.length&&n.splice(t.length).forEach(({dataNodeGroup:l,markerGroup:c,labelGroup:d,paths:u})=>{e.removeChild(l),c&&e.removeChild(c),d&&e.removeChild(d);for(let m of u)e.removeChild(m)});let a=t.length;for(;a>n.length;){let c=this.subGroupId++,d=new da({name:`${this.id}-series-sub${c}-dataNodes`,layer:!1,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("data",c)}),u=r?new da({name:`${this.id}-series-sub${this.subGroupId++}-markers`,layer:!1,zIndex:4,zIndexSubOrder:this.getGroupZIndexSubOrder("marker",c)}):void 0,m=new da({name:`${this.id}-series-sub${this.subGroupId++}-labels`,layer:!1,zIndex:7,zIndexSubOrder:this.getGroupZIndexSubOrder("labels",c)});e.appendChild(d),e.appendChild(m),u&&e.appendChild(u);let f=[];for(let _=0;_<i;_++)f[_]=new $6,f[_].zIndex=4,f[_].zIndexSubOrder=this.getGroupZIndexSubOrder("paths",_),e.appendChild(f[_]);n.push({paths:f,dataNodeGroup:d,markerGroup:u,labelGroup:m,labelSelection:Bm.select(m,Wu),datumSelection:Bm.select(d,()=>this.nodeFactory(),s),markerSelection:u?Bm.select(u,()=>this.markerFactory(),o):void 0})}})}getGroupZIndexSubOrder(t,e=0){var n;let i=super.getGroupZIndexSubOrder(t,e);if(t==="paths"){let r=(n=this.opts.pathsZIndexSubOrderOffset[e])!=null?n:0,s=i[0];typeof s=="function"?i[0]=()=>+s()+r:i[0]=+s+r}return i}updateNodes(t,e,n){return mr(this,null,function*(){var i;let{highlightSelection:r,highlightLabelSelection:s,opts:{hasMarkers:o,hasHighlightedLabels:a}}=this,l=!this.ctx.animationManager.isSkipped(),c=this.visible&&((i=this._contextNodeData)==null?void 0:i.length)>0&&n;this.rootGroup.visible=l||c,this.contentGroup.visible=l||c,this.highlightGroup.visible=(l||c)&&!!e;let d=this.getOpacity();o?(yield this.updateMarkerNodes({markerSelection:r,isHighlight:!0,seriesIdx:-1}),this.animationState.transition("highlightMarkers",r)):(yield this.updateDatumNodes({datumSelection:r,isHighlight:!0,seriesIdx:-1}),this.animationState.transition("highlight",r)),a&&(yield this.updateLabelNodes({labelSelection:s,seriesIdx:-1})),yield Promise.all(this.subGroups.map((u,m)=>mr(this,null,function*(){let{dataNodeGroup:f,markerGroup:_,datumSelection:x,labelSelection:D,markerSelection:E,paths:M,labelGroup:I}=u,{itemId:z}=this.contextNodeData[m],G=c;f.opacity=d,f.visible=l||G,I.visible=G,_&&(_.opacity=d,_.zIndex=f.zIndex>=4?f.zIndex:f.zIndex+1,_.visible=G),I&&(I.opacity=d),yield this.updatePathNodes({seriesHighlighted:e,itemId:z,paths:M,seriesIdx:m,opacity:d,visible:G,animationEnabled:l}),f.visible&&(yield this.updateDatumNodes({datumSelection:x,highlightedItems:t,isHighlight:!1,seriesIdx:m}),yield this.updateLabelNodes({labelSelection:D,seriesIdx:m}),o&&E&&(yield this.updateMarkerNodes({markerSelection:E,isHighlight:!1,seriesIdx:m})))})))})}getHighlightLabelData(t,e){let n=t.filter(i=>i.datum===e.datum&&i.itemId===e.itemId);return n.length!==0?n:void 0}getHighlightData(t,e){return e?[e]:void 0}updateHighlightSelection(t){return mr(this,null,function*(){var e;let{highlightSelection:n,highlightLabelSelection:i,_contextNodeData:r}=this,s=(e=this.ctx.highlightManager)==null?void 0:e.getActiveHighlight(),o=t&&s?.datum?s:void 0,a,l;if(o!=null){let c=this.isLabelEnabled();for(let{labelData:d,nodeData:u}of r)if(l=this.getHighlightData(u,o),a=c?this.getHighlightLabelData(d,o):void 0,(!c||a!=null)&&l!=null)break}return this.highlightSelection=yield this.updateHighlightSelectionItem({items:l,highlightSelection:n}),this.highlightLabelSelection=yield this.updateHighlightSelectionLabel({items:a,highlightLabelSelection:i}),l})}pickNodeExactShape(t){var e;let n=super.pickNodeExactShape(t);if(n)return n;let{x:i,y:r}=t,{opts:{hasMarkers:s}}=this,o;for(let{dataNodeGroup:a,markerGroup:l}of this.subGroups){let c=a.pickNode(i,r);if(!c&&s&&(c=l?.pickNode(i,r)),c)break}if(o)return{datum:o.datum,distance:0};for(let a of this.moduleMap.modules){let{datum:l}=(e=a.pickNodeExact(t))!=null?e:{};if(l!==void 0)return{datum:l,distance:0}}}pickNodeClosestDatum(t){var e,n;let{x:i,y:r}=t,{axes:s,rootGroup:o,_contextNodeData:a}=this,l=s.x,c=s.y,d=o.transformPoint(i,r),u=1/0,m;for(let f of a)for(let _ of f.nodeData){let{point:{x=NaN,y:D=NaN}={}}=_;if(isNaN(x)||isNaN(D)||!(l?.inRange(x)&&c?.inRange(D)))continue;let M=Math.max(ap(d.x-x,2)+ap(d.y-D,2),0);M<u&&(u=M,m=_)}for(let f of this.moduleMap.modules){let _=f.pickNodeNearest(t);if(_!==void 0&&_.distanceSquared<u){u=_.distanceSquared,m=_.datum;break}}if(m){let f=Math.max(Math.sqrt(u)-((n=(e=m.point)==null?void 0:e.size)!=null?n:0),0);return{datum:m,distance:f}}}pickNodeMainAxisFirst(t,e){var n,i;let{x:r,y:s}=t,{axes:o,rootGroup:a,_contextNodeData:l}=this,c=o.x,d=o.y,u=[c,d].filter(E=>E instanceof _M).map(E=>E.direction);if(e&&u.length===0)return;let[m="x"]=u,f=a.transformPoint(r,s),_=m==="x"?[f.x,f.y]:[f.y,f.x],x=[1/0,1/0],D;for(let E of l)for(let M of E.nodeData){let{point:{x:I=NaN,y:z=NaN}={}}=M;if(isNaN(I)||isNaN(z)||!(c?.inRange(I)&&d?.inRange(z)))continue;let A=m==="x"?[I,z]:[z,I],Y=!0;for(let X=0;X<A.length;X++){let ne=Math.abs(A[X]-_[X]);if(ne>x[X]){Y=!1;break}ne<x[X]&&(x[X]=ne,x.fill(1/0,X+1,x.length))}Y&&(D=M)}if(D){let E=Math.max(ap(x[0],2)+ap(x[1],2)-((i=(n=D.point)==null?void 0:n.size)!=null?i:0),0);for(let M of this.moduleMap.modules){let I=M.pickNodeMainAxisFirst(t);if(I!==void 0&&I.distanceSquared<E){D=I.datum,E=I.distanceSquared;break}}return{datum:D,distance:Math.sqrt(E)}}}onLegendItemClick(t){let{legendItemName:e}=this.properties,{enabled:n,itemId:i,series:r}=t,s=e!=null&&e===t.legendItemName;(r.id===this.id||s)&&this.toggleSeriesItem(i,n)}onLegendItemDoubleClick(t){let{enabled:e,itemId:n,series:i,numVisibleItems:r}=t,{legendItemName:s}=this.properties,o=s!=null&&s===t.legendItemName;i.id===this.id||o?this.toggleSeriesItem(n,!0):e&&r===1?this.toggleSeriesItem(n,!0):this.toggleSeriesItem(n,!1)}isPathOrSelectionDirty(){return!1}getLabelData(){return[]}shouldFlipXY(){return!1}getMinRect(){let[t]=this._contextNodeData;if(!t?.nodeData.length)return;let e=t.nodeData.map(({midPoint:i})=>{var r;return(r=i?.x)!=null?r:0}).sort((i,r)=>i-r).reduce((i,r,s,o)=>s>0?Math.max(i,r-o[s-1]):i,0),n=t.nodeData.map(({midPoint:i})=>{var r;return(r=i?.y)!=null?r:0}).sort((i,r)=>i-r).reduce((i,r,s,o)=>s>0?Math.max(i,r-o[s-1]):i,0);return new ml(0,0,e,n)}updateHighlightSelectionItem(t){return mr(this,null,function*(){let{opts:{hasMarkers:e}}=this,{items:n,highlightSelection:i}=t,r=n??[];if(e){let s=i;return this.updateMarkerSelection({nodeData:r,markerSelection:s,seriesIdx:-1})}else return this.updateDatumSelection({nodeData:r,datumSelection:i,seriesIdx:-1})})}updateHighlightSelectionLabel(t){return mr(this,null,function*(){var e;return this.updateLabelSelection({labelData:(e=t.items)!=null?e:[],labelSelection:t.highlightLabelSelection,seriesIdx:-1})})}updateDatumSelection(t){return mr(this,null,function*(){return t.datumSelection})}updateDatumNodes(t){return mr(this,null,function*(){})}updateMarkerSelection(t){return mr(this,null,function*(){return t.markerSelection})}updateMarkerNodes(t){return mr(this,null,function*(){})}updatePaths(t){return mr(this,null,function*(){t.paths.forEach(e=>e.visible=!1)})}updatePathNodes(t){return mr(this,null,function*(){let{paths:e,opacity:n,visible:i}=t;for(let r of e)r.opacity=n,r.visible=i})}resetAllAnimation(t){var e,n;let{path:i,datum:r,label:s,marker:o}=(n=(e=this.opts)==null?void 0:e.animationResetFns)!=null?n:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),i&&t.paths.forEach(a=>{x1(a,i)}),r&&x1(t.datumSelections,r),s&&x1(t.labelSelections,s),o&&x1(t.markerSelections,o),t.contextData.some(a=>a.animationValid===!1)&&this.ctx.animationManager.skipCurrentBatch()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){var e,n;let{datum:i}=(n=(e=this.opts)==null?void 0:e.animationResetFns)!=null?n:{};i&&x1([t],i)}animateReadyHighlightMarkers(t){var e,n;let{marker:i}=(n=(e=this.opts)==null?void 0:e.animationResetFns)!=null?n:{};i&&x1([t],i)}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(t,e){return{datumSelections:this.subGroups.map(({datumSelection:i})=>i),markerSelections:this.subGroups.filter(({markerSelection:i})=>i!==void 0).map(({markerSelection:i})=>i),labelSelections:this.subGroups.map(({labelSelection:i})=>i),annotationSelections:[...this.annotationSelections],contextData:this._contextNodeData,previousContextData:e,paths:this.subGroups.map(({paths:i})=>i),seriesRect:t}}calculateScaling(){let t={},e=n=>{let i=this.axes[n];if(i){if(i.scale instanceof Bwe){let{range:r,domain:s}=i.scale;t[n]={type:"log",convert:o=>i.scale.convert(o),domain:[s[0],s[1]],range:[r[0],r[1]]}}else if(i.scale instanceof lu){let{range:r}=i.scale,s=i.scale.getDomain();t[n]={type:"continuous",domain:[s[0],s[1]],range:[r[0],r[1]]}}else if(i.scale){let{domain:r}=i.scale;t[n]={type:"category",domain:r,range:r.map(s=>i.scale.convert(s))}}}};return e("x"),e("y"),t}},PAi=["top","right","bottom","left"],RAi=(()=>{let t=class f0t extends ov{constructor(n,i){super(n,i),this.paired=!0,this._lastCrossLineIds=void 0,this._lastAxisWidths={top:0,bottom:0,left:0,right:0},this._lastVisibility={crossLines:!0,series:!0}}performLayout(){return mr(this,null,function*(){let n=yield ub(f0t.prototype,this,"performLayout").call(this),{animationRect:i,seriesRect:r,visibility:s,clipSeries:o}=this.updateAxes(n);this.seriesRoot.visible=s.series,this.seriesRect=r,this.animationRect=i,this.seriesRoot.translationX=Math.floor(r.x),this.seriesRoot.translationY=Math.floor(r.y);let{seriesArea:{padding:a}}=this,l=r.clone().grow({top:a.top,right:a.right,bottom:a.bottom,left:a.left});return this.hoverRect=l,this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:o,series:{rect:r,paddedRect:l,visible:s.series,shouldFlipXY:this.shouldFlipXY()},axes:this.axes.map(c=>Ai({id:c.id},c.getLayoutState()))}),n})}updateAxes(n){var i;let r=this.axes.flatMap(M=>{var I;return(I=M.crossLines)!=null?I:[]}).map(M=>M.id),s=this._lastCrossLineIds!=null&&this._lastCrossLineIds.length===r.length&&this._lastCrossLineIds.every((M,I)=>r[I]===M),o,a;s?(o=Ai({},this._lastAxisWidths),a=Ai({},this._lastVisibility)):(o={top:0,bottom:0,left:0,right:0},a={crossLines:!0,series:!0},this._lastCrossLineIds=r);let l=new Set(this._axes.map(M=>M.position));for(let M of Object.keys(o))l.has(M)||delete o[M];let c=(M,I)=>Object.keys(M).some(z=>o[z]==null)?!1:a.crossLines===I.crossLines&&a.series===I.series&&Object.entries(o).every(([z,G])=>{let A=M[z];return G!=null||A!=null?G===A:!0}),d=M=>Object.entries(M).reduce((I,[z,G])=>(G&&Math.abs(G)===1/0&&(G=0),I[z]=G!=null?Math.ceil(G):G,I),{}),u={},m={},f=!1,_=(i=this.seriesRect)==null?void 0:i.clone(),x=0,D={};do{Object.assign(o,u),Object.assign(a,m);let M=this.updateAxesPass(o,n.clone(),_);if(u=d(M.axisWidths),m=M.visibility,f=M.clipSeries,_=M.seriesRect,D=M.primaryTickCounts,x++>10){Ns.warn("unable to find stable axis layout.");break}}while(!c(u,m));this.axes.forEach(M=>{let{direction:I}=M,z=D[I];M.update(z)});let E=5;return this.axes.forEach(M=>{if(M.setCrossLinesVisible(a.crossLines),!!_)switch(M.clipGrid(_.x,_.y,_.width+E,_.height+E),M.position){case"left":case"right":M.clipTickLines(n.x,_.y,n.width+E,_.height+E);break;case"top":case"bottom":M.clipTickLines(_.x,n.y,_.width+E,n.height+E);break}}),this._lastAxisWidths=o,this._lastVisibility=a,{seriesRect:_,animationRect:n,visibility:a,clipSeries:f}}updateAxesPass(n,i,r){let{axes:s}=this,o={},a={},l={series:!0,crossLines:!0},c=!1,d={},u=this.applySeriesPadding(i),m=r?this.buildCrossLinePadding(n):{},f=this.buildAxisBound(u,n,m,l),_=this.buildSeriesRect(f,n);return s.forEach(x=>{var D,E;let{position:M="left"}=x,{clipSeries:I,axisThickness:z,axisOffset:G}=this.calculateAxisDimensions({axis:x,seriesRect:_,paddedBounds:u,axisWidths:n,newAxisWidths:a,primaryTickCounts:d,clipSeries:c,addInterAxisPadding:((D=o[M])!=null?D:0)>0});o[M]=((E=o[M])!=null?E:0)+1,c=c||I,this.positionAxis({axis:x,axisBound:f,axisOffset:G,axisThickness:z,axisWidths:n,primaryTickCounts:d,seriesRect:_})}),{clipSeries:c,seriesRect:_,axisWidths:a,visibility:l,primaryTickCounts:d}}buildCrossLinePadding(n){var i;let r={};this.axes.forEach(s=>{s.crossLines&&s.crossLines.forEach(o=>{o.calculatePadding(r)})});for(let[s,o=0]of Object.entries(r))r[s]=Math.max(o-((i=n[s])!=null?i:0),0);return r}applySeriesPadding(n){let i=n.clone(),r=this.axes.slice().reverse();return PAi.forEach(s=>{let o=this.seriesArea.padding[s],a=r.find(l=>l.position===s);a?a.seriesAreaPadding=o:i.shrink(o,s)}),i}buildAxisBound(n,i,r,s){var o,a,l,c;let d=n.clone(),{top:u=0,right:m=0,bottom:f=0,left:_=0}=r,x=_+m,D=u+f,E=((o=i.left)!=null?o:0)+((a=i.right)!=null?a:0)+x,M=((l=i.top)!=null?l:0)+((c=i.bottom)!=null?c:0)+D;return d.width<=E||d.height<=M?(s.crossLines=!1,s.series=!1,d):(d.x+=_,d.y+=u,d.width-=x,d.height-=D,d)}buildSeriesRect(n,i){let r=n.clone(),{top:s,bottom:o,left:a,right:l}=i;return r.x+=a??0,r.y+=s??0,r.width-=(a??0)+(l??0),r.height-=(s??0)+(o??0),r.width=Math.max(0,r.width),r.height=Math.max(0,r.height),r}clampToOutsideSeriesRect(n,i,r,s){let{x:o,y:a,width:l,height:c}=n,d=[o,a,o+l,a+c],u=s===1?Math.min:Math.max,m=d[(r==="x"?0:1)+(s===1?0:2)];return u(i,m)}calculateAxisDimensions(n){var i,r,s,o,a;let{axis:l,seriesRect:c,paddedBounds:d,axisWidths:u,newAxisWidths:m,primaryTickCounts:f,addInterAxisPadding:_}=n,{clipSeries:x}=n,{position:D="left",direction:E}=l,M=le=>le instanceof _M||le instanceof hU?[0,c.height]:[c.height,0],I=(i=m[D])!=null?i:0;switch(D){case"top":case"bottom":l.range=[0,c.width],l.gridLength=c.height;break;case"right":case"left":l.range=M(l),l.gridLength=c.width;break}let z=this.zoomManager.getAxisZoom(l.id),{min:G=0,max:A=1}=z??{};l.visibleRange=[G,A];let Y=l.dataDomain.clipped||l.visibleRange[0]>0||l.visibleRange[1]<1;x||(x=Y);let X=l.nice?f[E]:void 0,ne=.3;l.thickness!=null&&l.thickness>0?l.maxThickness=l.thickness:E==="y"?l.maxThickness=d.width*ne:l.maxThickness=d.height*ne;let pe=l.calculateLayout(X);X=pe.primaryTickCount,f[E]=(r=f[E])!=null?r:X;let ce=0;if(l.thickness!=null&&l.thickness>0)ce=l.thickness;else{let{bbox:le}=pe;ce=E==="x"?le.height:le.width}return _&&(ce+=15),ce=Math.ceil(ce),m[D]=((s=m[D])!=null?s:0)+ce,l.gridPadding=((o=u[D])!=null?o:0)-((a=m[D])!=null?a:0),{clipSeries:x,axisThickness:ce,axisOffset:I,primaryTickCount:X}}positionAxis(n){var i,r,s,o;let{axis:a,axisBound:l,axisWidths:c,seriesRect:d,axisOffset:u,axisThickness:m}=n,{position:f}=a;switch(f){case"top":a.translation.x=l.x+((i=c.left)!=null?i:0),a.translation.y=this.clampToOutsideSeriesRect(d,l.y+1+u+m,"y",1);break;case"bottom":a.translation.x=l.x+((r=c.left)!=null?r:0),a.translation.y=this.clampToOutsideSeriesRect(d,l.y+l.height+1-m-u,"y",-1);break;case"left":a.translation.y=l.y+((s=c.top)!=null?s:0),a.translation.x=this.clampToOutsideSeriesRect(d,l.x+u+m,"x",1);break;case"right":a.translation.y=l.y+((o=c.top)!=null?o:0),a.translation.x=this.clampToOutsideSeriesRect(d,l.x+l.width-m-u,"x",-1);break}a.updatePosition({rotation:tv(a.rotation),sideFlag:a.label.getSideFlag()})}shouldFlipXY(){return!this.series.some(n=>!(n instanceof cS&&n.shouldFlipXY()))}};return t.className="CartesianChart",t.type="cartesian",t})(),g0t=RAi,OW=class v0t{constructor(e){this.chart=e}static isInstance(e){var n;return e instanceof v0t||((n=e.constructor)==null?void 0:n.name)==="AgChartInstanceProxy"&&e.chart!=null?!0:e.chart!=null&&this.validateImplementation(e)}static validateImplementation(e){var n,i;let r=["getOptions","destroy"],s=Object.keys((i=(n=e.constructor)==null?void 0:n.prototype)!=null?i:{});return r.every(o=>s.includes(o))}getOptions(){return this.chart.getOptions()}destroy(){this.chart.destroy()}};y0t=class extends x_{constructor(){super(...arguments),this.maxSpacing=NaN}};Be([ut(hb(j6(lh.restrict({min:1}),bM("minSpacing")),EF)),gb(NaN)],y0t.prototype,"maxSpacing",2);mU=(()=>{let t=class extends TM{constructor(e,n=new gM){super(e,n),this.min=NaN,this.max=NaN}normaliseDataDomain(e){let{min:n,max:i}=this,{extent:r,clipped:s}=bU(e,n,i);return{domain:r,clipped:s}}formatDatum(e){return typeof e=="number"?e.toFixed(2):(Ns.warnOnce("data contains Date objects which are being plotted against a number axis, please only use a number axis for numbers."),String(e))}createTick(){return new y0t}updateSecondaryAxisTicks(e){if(this.dataDomain==null)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");if(this.dataDomain.domain.length===0)return[];let[n,i]=FAi(this.dataDomain.domain,e??0,this.reverse);return this.scale.nice=!1,this.scale.domain=n,this.scale.update(),i}};return t.className="NumberAxis",t.type="number",t})();Be([ut(j6(kF,DU("max"))),gb(NaN)],mU.prototype,"min",2);Be([ut(j6(kF,bM("min"))),gb(NaN)],mU.prototype,"max",2);_0t=cu(t=>bC(t)&&t!==0,"a non-zero number"),TF=(()=>{let t=class extends mU{constructor(e){super(e,new Bwe),this.min=NaN,this.max=NaN}normaliseDataDomain(e){let{min:n,max:i}=this,{extent:r,clipped:s}=bU(e,n,i),o=r[0]>r[1],a=r[0]<0&&r[1]>0,l=r[0]===0&&r[1]===0;return(o||a||l)&&(e=[],a?Ns.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):l&&Ns.warn("the data domain has 0 extent, no data is rendered.")),r[0]===0&&(r[0]=1),r[1]===0&&(r[1]=-1),{domain:r,clipped:s}}set base(e){this.scale.base=e}get base(){return this.scale.base}};return t.className="LogAxis",t.type="log",t})();Be([ut(j6(kF,_0t,DU("max"))),gb(NaN)],TF.prototype,"min",2);Be([ut(j6(kF,_0t,bM("min"))),gb(NaN)],TF.prototype,"max",2);BAi=hb(j6(lh.restrict({min:1}),bM("minSpacing")),EF),C0t=class extends x_{constructor(){super(...arguments),this.maxSpacing=NaN}};Be([ut(BAi),gb(NaN)],C0t.prototype,"maxSpacing",2);fU=(()=>{let t=class extends TM{constructor(e){super(e,new Hwe),this.datumFormat="%m/%d/%y, %H:%M:%S",this.min=void 0,this.max=void 0;let{scale:n}=this;this.refreshScale(),this.datumFormatter=n.tickFormat({specifier:this.datumFormat})}normaliseDataDomain(e){var n;let{min:i,max:r}=this,s=!1;return typeof i=="number"&&(i=new Date(i)),typeof r=="number"&&(r=new Date(r)),e.length>2&&(e=((n=EC(e))!=null?n:[0,1e3]).map(o=>new Date(o))),i instanceof Date&&(s||(s=i>e[0]),e=[i,e[1]]),r instanceof Date&&(s||(s=r<e[1]),e=[e[0],r]),e[0]>e[1]&&(e=[]),{domain:e,clipped:s}}createTick(){return new C0t}onLabelFormatChange(e,n){n?super.onLabelFormatChange(e,n):this.labelFormatter=this.scale.tickFormat({ticks:e})}formatDatum(e){var n;return(n=this.moduleCtx.callbackCache.call(this.datumFormatter,e))!=null?n:String(e)}calculatePadding(e,n,i){return i?[1,0]:[0,1]}};return t.className="TimeAxis",t.type="time",t})();Be([ut(j6(kwe,DU("max")),{optional:!0})],fU.prototype,"min",2);Be([ut(j6(kwe,bM("min")),{optional:!0})],fU.prototype,"max",2);Rne={[mU.type]:mU,[_M.type]:_M,[fU.type]:fU,[hU.type]:hU,[TF.type]:TF};Ywe={has(t){return Object.hasOwn(Rne,t)},get axesTypes(){return Object.keys(Rne)}},x0t={};LF=[{type:"root",optionsKey:"animation",chartTypes:["cartesian","polar","hierarchy"]},{type:"root",optionsKey:"background",chartTypes:["cartesian","polar","hierarchy"],optionsInnerKey:"image"},{type:"root",optionsKey:"contextMenu",chartTypes:["cartesian","polar","hierarchy"]},{type:"root",optionsKey:"zoom",chartTypes:["cartesian"]},{type:"legend",optionsKey:"gradientLegend",chartTypes:["cartesian","polar","hierarchy"],identifier:"gradient"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"angle-number"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-category"},{type:"axis",optionsKey:"axes[]",chartTypes:["polar"],identifier:"radius-number"},{type:"axis-option",optionsKey:"crosshair",chartTypes:["cartesian"]},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"box-plot"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"bullet"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"heatmap"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"nightingale"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-area"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radar-line"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-bar"},{type:"series",optionsKey:"series[]",chartTypes:["polar"],identifier:"radial-column"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-area"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"range-bar"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"sunburst"},{type:"series",optionsKey:"series[]",chartTypes:["hierarchy"],identifier:"treemap"},{type:"series",optionsKey:"series[]",chartTypes:["cartesian"],identifier:"waterfall"},{type:"series-option",optionsKey:"errorBar",chartTypes:["cartesian"],identifier:"error-bars"}];qAi={category:FC},w0t={category:"legend"};S0t={};ere=class extends ywe{constructor(t){var e;super(),this.node=new da({name:"background",zIndex:0}),this.rectNode=new Wg,this.visible=!0,this.fill="white",this.image=void 0,this.node.appendChild(this.rectNode),(e=t.scene.root)==null||e.appendChild(this.node),this.destroyFns.push(()=>{var n;return(n=t.scene.root)==null?void 0:n.removeChild(this.node)},t.layoutService.addListener("layout-complete",n=>this.onLayoutComplete(n)))}onLayoutComplete(t){let{width:e,height:n}=t.chart;this.rectNode.width=e,this.rectNode.height=n}};Be([ut(Ua),Uu("node","visible")],ere.prototype,"visible",2);Be([ut(Jc,{optional:!0}),Uu("rectNode","fill")],ere.prototype,"fill",2);T0t={type:"root",optionsKey:"background",packageType:"community",chartTypes:["cartesian","polar","hierarchy"],instanceConstructor:ere},Wmt=class{set fill(t){this.rh.fill=t}get fill(){return this.rh.fill}set stroke(t){this.rh.stroke=t}get stroke(){return this.rh.stroke}set strokeWidth(t){this.rh.strokeWidth=t}get strokeWidth(){return this.rh.strokeWidth}set width(t){this.rh.width=t}get width(){return this.rh.width}set height(t){this.rh.height=t}get height(){return this.rh.height}set gripLineGap(t){this.rh.gripLineGap=t}get gripLineGap(){return this.rh.gripLineGap}set gripLineLength(t){this.rh.gripLineLength=t}get gripLineLength(){return this.rh.gripLineLength}constructor(t){this.rh=t}},JAi=class{set fill(t){this.rm.fill=t}get fill(){return this.rm.fill}set stroke(t){this.rm.stroke=t}get stroke(){return this.rm.stroke}set strokeWidth(t){this.rm.strokeWidth=t}get strokeWidth(){return this.rm.strokeWidth}set fillOpacity(t){this.rm.fillOpacity=t}get fillOpacity(){return this.rm.fillOpacity}constructor(t){this.rm=t}},DC=(()=>{let t=class extends $6{constructor(){super(...arguments),this._fill="#f2f2f2",this._stroke="#999999",this._strokeWidth=1,this._lineCap="square",this._centerX=0,this._centerY=0,this._width=8,this._gripLineGap=2,this._gripLineLength=8,this._height=16}set centerX(e){this._centerX!==e&&(this._centerX=e,this.dirtyPath=!0)}get centerX(){return this._centerX}set centerY(e){this._centerY!==e&&(this._centerY=e,this.dirtyPath=!0)}get centerY(){return this._centerY}set width(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)}get width(){return this._width}set gripLineGap(e){this._gripLineGap!==e&&(this._gripLineGap=e,this.dirtyPath=!0)}get gripLineGap(){return this._gripLineGap}set gripLineLength(e){this._gripLineLength!==e&&(this._gripLineLength=e,this.dirtyPath=!0)}get gripLineLength(){return this._gripLineLength}set height(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)}get height(){return this._height}computeBBox(){let{centerX:e,centerY:n,width:i,height:r}=this,s=e-i/2,o=n-r/2;return new ml(s,o,i,r)}isPointInPath(e,n){let i=this.transformPoint(e,n);return this.computeBBox().containsPoint(i.x,i.y)}updatePath(){let{path:e,centerX:n,centerY:i,width:r,height:s}=this;e.clear();let o=n-r/2,a=i-s/2,l=this.align(o),c=this.align(a),d=l+this.align(o,r),u=c+this.align(a,s);e.moveTo(l,c),e.lineTo(d,c),e.lineTo(d,u),e.lineTo(l,u),e.lineTo(l,c);let m=this.gripLineGap/2,f=this.gripLineLength/2;e.moveTo(this.align(n-m),this.align(i-f)),e.lineTo(this.align(n-m),this.align(i+f)),e.moveTo(this.align(n+m),this.align(i-f)),e.lineTo(this.align(n+m),this.align(i+f))}};return t.className="RangeHandle",t})();Be([ut(Jc)],DC.prototype,"_fill",2);Be([ut(Jc)],DC.prototype,"_stroke",2);Be([ut(es)],DC.prototype,"_strokeWidth",2);Be([ut(Sft)],DC.prototype,"_lineCap",2);Be([ut(es)],DC.prototype,"_width",2);Be([ut(es)],DC.prototype,"_gripLineGap",2);Be([ut(es)],DC.prototype,"_gripLineLength",2);Be([ut(es)],DC.prototype,"_height",2);DM=(()=>{let t=class extends $6{constructor(){super(...arguments),this.x=0,this.y=0,this.width=200,this.height=30,this.minRange=.05,this._min=0,this._max=1}set min(e){var n;e=ev(0,e,this.max-this.minRange),this._min!==e&&!isNaN(e)&&(this._min=e,this.dirtyPath=!0,(n=this.onRangeChange)==null||n.call(this))}get min(){return this._min}set max(e){var n;e=ev(this.min+this.minRange,e,1),this._max!==e&&!isNaN(e)&&(this._max=e,this.dirtyPath=!0,(n=this.onRangeChange)==null||n.call(this))}get max(){return this._max}computeBBox(){let{x:e,y:n,width:i,height:r}=this;return new ml(e,n,i,r)}computeVisibleRangeBBox(){let{x:e,y:n,width:i,height:r,min:s,max:o}=this,a=e+i*s,l=e+i*o;return new ml(a,n,l-a,r)}updatePath(){let{path:e,x:n,y:i,width:r,height:s,min:o,max:a}=this;e.clear();let l=this.align(n),c=this.align(i),d=l+this.align(n,r),u=c+this.align(i,s);e.moveTo(l,c),e.lineTo(d,c),e.lineTo(d,u),e.lineTo(l,u),e.lineTo(l,c);let m=this.align(n+r*o),f=this.align(n+r*a);e.moveTo(m,c),e.lineTo(m,u),e.lineTo(f,u),e.lineTo(f,c),e.lineTo(m,c)}};return t.className="RangeMask",t})();Be([R2({changeValue:tre}),ut(es)],DM.prototype,"x",2);Be([R2({changeValue:tre}),ut(es)],DM.prototype,"y",2);Be([R2({changeValue:tre}),ut(es)],DM.prototype,"width",2);Be([R2({changeValue:tre}),ut(es)],DM.prototype,"height",2);Be([ut(lh)],DM.prototype,"_min",2);Be([ut(lh)],DM.prototype,"_max",2);ePi=(()=>{let t=class Kw extends da{constructor(){super({name:"rangeSelectorGroup"}),this.minHandle=new DC,this.maxHandle=new DC,this.mask=(()=>{let{x:n,y:i,width:r,height:s,min:o,max:a}=Kw.defaults,l=new DM;l.x=n,l.y=i,l.width=r,l.height=s,l.min=o,l.max=a;let{minHandle:c,maxHandle:d}=this;return c.centerX=n,d.centerX=n+r,c.centerY=d.centerY=i+s/2,this.append([l,c,d]),l.onRangeChange=()=>{var u;this.updateHandles(),(u=this.onRangeChange)==null||u.call(this)},l})(),this._x=Kw.defaults.x,this._y=Kw.defaults.y,this._width=Kw.defaults.width,this._height=Kw.defaults.height,this._min=Kw.defaults.min,this._max=Kw.defaults.max,this.isContainerNode=!0}set x(n){this.mask.x=n,this.updateHandles()}get x(){return this.mask.x}set y(n){this.mask.y=n,this.updateHandles()}get y(){return this.mask.y}set width(n){this.mask.width=n,this.updateHandles()}get width(){return this.mask.width}set height(n){this.mask.height=n,this.updateHandles()}get height(){return this.mask.height}set min(n){this.mask.min=n}get min(){return this.mask.min}set max(n){this.mask.max=n}get max(){return this.mask.max}updateHandles(){let{minHandle:n,maxHandle:i,x:r,y:s,width:o,height:a,mask:l}=this;n.centerX=r+o*l.min,i.centerX=r+o*l.max,n.centerY=i.centerY=s+a/2}computeBBox(){return this.mask.computeBBox()}computeVisibleRangeBBox(){return this.mask.computeVisibleRangeBBox()}render(n){let{ctx:i,forceRender:r,stats:s}=n;if(this.dirty===0&&!r){s&&s.nodesSkipped++;return}this.computeTransformMatrix(),this.matrix.toContext(i);let{mask:o,minHandle:a,maxHandle:l}=this;[o,a,l].forEach(c=>{c.visible&&(r||c.dirty>0)&&(i.save(),c.render(cs(Ai({},n),{ctx:i,forceRender:r})),i.restore())}),this.markClean({force:!0}),s&&s.nodesRendered++}};return t.className="Range",t.defaults={x:0,y:0,width:200,height:30,min:0,max:1},t})(),tPi=ePi,Zwe=class extends ywe{constructor(t){var e;super(),this.ctx=t,this.rs=new tPi,this.mask=new JAi(this.rs.mask),this.minHandle=new Wmt(this.rs.minHandle),this.maxHandle=new Wmt(this.rs.maxHandle),this.minHandleDragging=!1,this.maxHandleDragging=!1,this.panHandleOffset=NaN,this.enabled=!1,this.margin=10,this._visible=!0,this.rs.onRangeChange=()=>t.zoomManager.updateZoom("navigator",{x:{min:this.rs.min,max:this.rs.max},y:{min:0,max:1}}),(e=t.scene.root)==null||e.appendChild(this.rs);let n={bypassPause:["animation"]};this.destroyFns.push(t.interactionManager.addListener("drag-start",i=>this.onDragStart(i),n),t.interactionManager.addListener("drag",i=>this.onDrag(i),n),t.interactionManager.addListener("hover",i=>this.onDrag(i),n),t.interactionManager.addListener("drag-end",()=>this.onDragStop(),n),t.layoutService.addListener("before-series",i=>this.layout(i)),t.layoutService.addListener("layout-complete",i=>this.layoutComplete(i)),()=>{var i;return(i=t.scene.root)==null?void 0:i.removeChild(this.rs)},()=>this.ctx.zoomManager.updateZoom("navigator")),this.updateGroupVisibility()}set width(t){this.rs.width=t}get width(){return this.rs.width}set height(t){this.rs.height=t}get height(){return this.rs.height}set min(t){this.rs.min=t}get min(){return this.rs.min}set max(t){this.rs.max=t}get max(){return this.rs.max}set visible(t){this._visible=t,this.updateGroupVisibility()}get visible(){return this._visible}updateGroupVisibility(){let t=this.enabled&&this.visible;this.rs.visible=t,t?this.ctx.zoomManager.updateZoom("navigator",{x:{min:this.rs.min,max:this.rs.max},y:{min:0,max:1}}):this.ctx.zoomManager.updateZoom("navigator")}layout({shrinkRect:t}){if(this.enabled){let e=this.rs.height+this.margin;t.shrink(e,"bottom"),this.rs.y=t.y+t.height+this.margin}return{shrinkRect:t}}layoutComplete({series:{rect:t,visible:e}}){this.enabled&&e&&(this.rs.x=t.x,this.rs.width=t.width),this.visible=e}onDragStart(t){if(!this.enabled)return;let{offsetX:e,offsetY:n}=t,{rs:i}=this,{minHandle:r,maxHandle:s,x:o,width:a,min:l}=i,c=i.computeVisibleRangeBBox();this.minHandleDragging||this.maxHandleDragging||(r.containsPoint(e,n)?this.minHandleDragging=!0:s.containsPoint(e,n)?this.maxHandleDragging=!0:c.containsPoint(e,n)&&(this.panHandleOffset=(e-o)/a-l))}onDrag(t){if(!this.enabled)return;let{rs:e,panHandleOffset:n}=this,{x:i,y:r,width:s,height:o,minHandle:a,maxHandle:l}=e,{offsetX:c,offsetY:d}=t,u=i+s*e.min,m=i+s*e.max,f=new ml(u,r,m-u,o),_=()=>Math.min(Math.max((c-i)/s,0),1);if(a.containsPoint(c,d)||l.containsPoint(c,d)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):f.containsPoint(c,d)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator"),this.minHandleDragging)e.min=_();else if(this.maxHandleDragging)e.max=_();else if(!isNaN(n)){let x=e.max-e.min,D=Math.min(_()-n,1-x);D<=e.min?(e.min=D,e.max=e.min+x):(e.max=D+x,e.min=e.max-x)}}onDragStop(){this.stopHandleDragging()}stopHandleDragging(){this.minHandleDragging=this.maxHandleDragging=!1,this.panHandleOffset=NaN}};Be([R2({changeValue(t){t&&(this.min=0,this.max=1),this.updateGroupVisibility()}}),ut(Ua)],Zwe.prototype,"enabled",2);Be([ut(es)],Zwe.prototype,"margin",2);iPi={type:"root",optionsKey:"navigator",packageType:"community",chartTypes:["cartesian"],instanceConstructor:Zwe,themeTemplate:{navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8}}}},Xwe=({takeColors:t})=>{let{fills:[e],strokes:[n]}=t(1);return{fill:e,stroke:n}},VU=t=>{let{fill:e,stroke:n}=Xwe(t);return{marker:{fill:e,stroke:n}}},Yw={SMALL:12,MEDIUM:13,LARGE:17},DF={NORMAL:"normal",BOLD:"bold",BOLDER:"bolder",LIGHTER:"lighter"},Qwe="bottom",nPi="left",rPi="top",v_={BOTTOM:Qwe,LEFT:nPi,TOP:rPi},sPi="category",oPi="number",aPi="time",lPi="log",y_={CATEGORY:sPi,NUMBER:oPi,TIME:aPi,LOG:lPi},cPi="angle-category",dPi="angle-number",uPi="radius-category",hPi="radius-number",pPi={ANGLE_CATEGORY:cPi,ANGLE_NUMBER:dPi,RADIUS_CATEGORY:uPi,RADIUS_NUMBER:hPi},mPi="circle",mM={},lwe={},W6={has(t){return Object.hasOwn(mM,t)},isCartesian(t){return mM[t]==="cartesian"},isPolar(t){return mM[t]==="polar"},isHierarchy(t){return mM[t]==="hierarchy"},get seriesTypes(){return Object.keys(mM)},get cartesianTypes(){return this.seriesTypes.filter(t=>this.isCartesian(t))},get polarTypes(){return this.seriesTypes.filter(t=>this.isPolar(t))},get hierarchyTypes(){return this.seriesTypes.filter(t=>this.isHierarchy(t))}};D0t={axes:[{type:y_.NUMBER,position:v_.LEFT},{type:y_.CATEGORY,position:v_.BOTTOM}]};E0t=Symbol("extends-chart-defaults"),M0t=Symbol("extends-legend-defaults"),k0t=Symbol("extends-legend-item-defaults"),I0t=Symbol("extends-legend-item-marker-defaults"),A0t=Symbol("extends-axes-defaults"),P0t=Symbol("extends-axes-label-defaults"),R0t=Symbol("extends-axes-line-defaults"),F0t=Symbol("extends-axes-tick-defaults"),L0t=Symbol("extends-axes-grid-line-defaults"),yb=Symbol("extends-series-defaults"),NF=Symbol("extends-cartesian-marker-defaults"),O0t=Symbol("override-series-label-defaults"),C1=Symbol("default-font"),W0=Symbol("default-label-colour"),N0t=Symbol("default-inverted-label-colour"),VF=Symbol("default-inside-series-label-colour"),_F=Symbol("default-muted-label-colour"),Fne=Symbol("default-axis-grid-colour"),ane=Symbol("default-axis-line-colour"),JW=Symbol("default-cross-lines-colour"),gU=Symbol("default-background-colour"),BF=Symbol("default-shadow-colour"),b_=Symbol("default-waterfall-series-positive-colors"),w_=Symbol("default-waterfall-series-negative-colors"),S_=Symbol("default-waterfall-series-total-colors"),T_=Symbol("default-waterfall-series-connector-line-stroke"),Jwe=Symbol("default-polar-series-stroke"),D_=Symbol("default-diverging-series-colour-range"),eSe=Symbol("default-hierarchy-fills"),tSe=Symbol("default-hierarchy-strokes");bPi=cu(t=>_1t(t)||Object.getPrototypeOf(t)===K6,"a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),$3=class extends A2{constructor(){super(...arguments),this.enabled=!0,this.shape=vF,this.size=6,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1}getStyle(){let{size:t,fill:e,fillOpacity:n,stroke:i,strokeWidth:r,strokeOpacity:s}=this;return{size:t,fill:e,fillOpacity:n,stroke:i,strokeWidth:r,strokeOpacity:s}}getDiameter(){return this.size+this.strokeWidth}};Be([ut(Ua),js({redraw:3})],$3.prototype,"enabled",2);Be([ut(bPi),js({redraw:3})],$3.prototype,"shape",2);Be([ut(es),js({redraw:3})],$3.prototype,"size",2);Be([ut(Jc,{optional:!0}),js({redraw:3})],$3.prototype,"fill",2);Be([ut(Bh),js({redraw:3})],$3.prototype,"fillOpacity",2);Be([ut(Jc,{optional:!0}),js({redraw:3})],$3.prototype,"stroke",2);Be([ut(es),js({redraw:3})],$3.prototype,"strokeWidth",2);Be([ut(Bh),js({redraw:3})],$3.prototype,"strokeOpacity",2);Be([ut(MC,{optional:!0}),js({redraw:3})],$3.prototype,"formatter",2);B0t=class extends A2{constructor(){super(...arguments),this.enabled=!1}};Be([ut(Ua)],B0t.prototype,"enabled",2);av=class extends A2{constructor(){super(...arguments),this.enabled=!0,this.interaction=new B0t,this.position=new MU}toTooltipHtml(t,e){return this.renderer?rU(this.renderer(e),t):rU(t)}};Be([ut(Ua)],av.prototype,"enabled",2);Be([ut(Ua,{optional:!0})],av.prototype,"showArrow",2);Be([ut(MC,{optional:!0})],av.prototype,"renderer",2);Be([ut(Vc)],av.prototype,"interaction",2);Be([ut(Vc)],av.prototype,"position",2);c0=class extends lS{constructor(){super(...arguments),this.xName=void 0,this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.shadow=new AC,this.marker=new $3,this.label=new U0,this.tooltip=new av,this.connectMissingData=!1}};Be([ut(Ps)],c0.prototype,"xKey",2);Be([ut(Ps,{optional:!0})],c0.prototype,"xName",2);Be([ut(Ps)],c0.prototype,"yKey",2);Be([ut(Ps,{optional:!0})],c0.prototype,"yName",2);Be([ut(es,{optional:!0})],c0.prototype,"normalizedTo",2);Be([ut(Jc)],c0.prototype,"fill",2);Be([ut(Bh)],c0.prototype,"fillOpacity",2);Be([ut(Jc)],c0.prototype,"stroke",2);Be([ut(es)],c0.prototype,"strokeWidth",2);Be([ut(Bh)],c0.prototype,"strokeOpacity",2);Be([ut(tS)],c0.prototype,"lineDash",2);Be([ut(es)],c0.prototype,"lineDashOffset",2);Be([ut(Vc)],c0.prototype,"shadow",2);Be([ut(Vc)],c0.prototype,"marker",2);Be([ut(Vc)],c0.prototype,"label",2);Be([ut(Vc)],c0.prototype,"tooltip",2);Be([ut(Ua)],c0.prototype,"connectMissingData",2);U0t=(t=>(t[t.Fill=0]="Fill",t[t.Stroke=1]="Stroke",t[t.Marker=2]="Marker",t[t.Label=3]="Label",t))(U0t||{});IPi=(()=>{let t=class $0t extends cS{constructor(n){super({moduleCtx:n,pathsPerSeries:2,pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,markerSelectionGarbageCollection:!1,pickModes:[1,0],animationResetFns:{path:lSe({getOpacity:()=>this.getOpacity()}),label:dS,marker:(i,r)=>Ai(Ai({},BU(i)),vU(i,r))}}),this.properties=new c0}processData(n){return mr(this,null,function*(){if(this.data==null||!this.properties.isValid())return;let{data:i,visible:r,seriesGrouping:{groupIndex:s=this.id,stackCount:o=1}={}}=this,{xKey:a,yKey:l,connectMissingData:c,normalizedTo:d}=this.properties,u=!this.ctx.animationManager.isSkipped(),{isContinuousX:m,isContinuousY:f}=this.isContinuous(),_=[`area-stack-${s}-yValues`,`area-stack-${s}-yValues-trailing`,`area-stack-${s}-yValues-prev`,`area-stack-${s}-yValues-trailing-prev`,`area-stack-${s}-yValues-marker`],x=[];iU(d)&&(x.push(Pne(this,[_[0],_[1],_[4]],d,"range")),x.push(Pne(this,[_[2],_[3]],d,"range"))),!m&&u&&this.processedData&&x.push(FF(this.processedData)),u&&x.push(LU(this));let D={invalidValue:null};c&&o>1&&(D.invalidValue=0),r||(D.forceValue=0),yield this.requestDataModel(n,i,{props:[G3(this,a,m,{id:"xValue"}),cp(this,l,f,Ai({id:"yValueRaw"},D)),...Zw(this,l,f,"window","current",cs(Ai({id:"yValueEnd"},D),{groupId:_[0]})),...Zw(this,l,f,"window-trailing","current",cs(Ai({id:"yValueStart"},D),{groupId:_[1]})),...Zw(this,l,f,"window","last",cs(Ai({id:"yValuePreviousEnd"},D),{groupId:_[2]})),...Zw(this,l,f,"window-trailing","last",cs(Ai({id:"yValuePreviousStart"},D),{groupId:_[3]})),...Zw(this,l,f,"normal","current",cs(Ai({id:"yValueCumulative"},D),{groupId:_[4]})),...x],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")})}getSeriesDomain(n){let{processedData:i,dataModel:r,axes:s}=this;if(!i||!r||i.data.length===0)return[];let o=s.x,a=s.y,l=r.resolveProcessedDataDefById(this,"xValue"),c=r.getDomain(this,"xValue","key",i),d=r.getDomain(this,"yValueEnd","value",i);if(n==="x")return l?.def.type==="key"&&l.def.valueType==="category"?c:Gg(EC(c),o);if(a instanceof TF||a instanceof fU)return Gg(d,a);{let u=[d[0]>0?0:d[0],d[1]<0?0:d[1]];return Gg(u,a)}}createNodeData(){return mr(this,null,function*(){var n;let{axes:i,data:r,processedData:{data:s}={},dataModel:o}=this,a=i.x,l=i.y;if(!a||!l||!r||!o||!this.properties.isValid())return[];let{yKey:c,xKey:d,marker:u,label:m,fill:f,stroke:_,connectMissingData:x}=this.properties,{scale:D}=a,{scale:E}=l,M=lu.is(E),I=((n=D.bandwidth)!=null?n:0)/2,z=o.resolveProcessedDataDefsByIds(this,["yValueStart","yValueEnd","yValueRaw","yValuePreviousStart","yValuePreviousEnd","yValueCumulative"]),G=Ae=>{let Ye=Ae,{point:ft}=Ye,Ft=W3(Ye,["point"]);return cs(Ai({},Ft),{point:cs(Ai({},ft),{moveTo:!0})})},A=(Ae,Ye,ft)=>{let Ft=D.convert(Ae)+I,Tt=E.convert(Ye),at=E.convert(ft);return[{point:{x:Ft,y:at},yValue:ft,xValue:Ae},{point:{x:Ft,y:Tt},yValue:Ye,xValue:Ae}]},Y=(Ae,Ye,ft)=>{let Ft;return(iU(this.properties.normalizedTo)?M&&Nwe(ft):!isNaN(ft))&&(Ft=Ye),{x:D.convert(Ae)+I,y:E.convert(Ft),size:u.size}},X=c,ne=[],pe=[],ce={itemId:X,fillData:{itemId:X,points:[]},strokeData:{itemId:X,points:[]},labelData:ne,nodeData:pe,scales:ub($0t.prototype,this,"calculateScaling").call(this),visible:this.visible},ie=ce.fillData.points,le=[],Se=ce.strokeData.points,je=-1,ze,Ge=-1/0;return s?.forEach(Ae=>{let{keys:Ye,keys:[ft],datum:Ft,values:Tt}=Ae;Tt.forEach((at,yt)=>{var _t,Re,ot;je++;let jt=Ft[yt],zt=o.resolveProcessedDataDefsValues(z,{keys:Ye,values:at}),{yValueRaw:qt,yValueCumulative:ui}=zt,{yValueStart:_i,yValueEnd:ln,yValuePreviousStart:Rn,yValuePreviousEnd:bi}=zt,Mn=qt!=null,Fn=Y(ft,+ui,qt);if(Mn&&u&&pe.push({index:je,series:this,itemId:X,datum:jt,midPoint:{x:Fn.x,y:Fn.y},cumulativeValue:ln,yValue:qt,xValue:ft,yKey:c,xKey:d,point:Fn,fill:(_t=u.fill)!=null?_t:f,stroke:(Re=u.stroke)!=null?Re:_,strokeWidth:(ot=u.strokeWidth)!=null?ot:this.getStrokeWidth(this.properties.strokeWidth)}),Mn&&m){let kn=this.getLabelText(m,{value:qt,datum:jt,xKey:d,yKey:c,xName:this.properties.xName,yName:this.properties.yName},Ts=>H3(Ts)?Ts.toFixed(2):String(Ts));ne.push({index:je,series:this,itemId:c,datum:jt,x:Fn.x,y:Fn.y,label:kn?{text:kn,fontStyle:m.fontStyle,fontWeight:m.fontWeight,fontSize:m.fontSize,fontFamily:m.fontFamily,textAlign:"center",textBaseline:"bottom",fill:m.color}:void 0})}let or=ze!=null&&ft!=null,wn=Ge!=null&&Mn;wn||(_i=_i??0,ln=_i??0,Rn=Rn??0,bi=Rn??0);let[gn,ts]=A(ze,Rn,bi),[no,Ho]=A(ft,_i,ln);or&&(!x||wn)&&(ie.push(gn),le.push(ts),ie.push(no),le.push(Ho)),wn&&je>0&&(Se.push(G(gn)),Se.push(no)),ze=ft,Ge=qt})}),Se.length>0&&(Se[0]=G(Se[0])),le.reverse(),ie.push(...le),[ce]})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){let{shape:n}=this.properties.marker,i=sS(n);return new i}updatePathNodes(n){return mr(this,null,function*(){let{opacity:i,visible:r,animationEnabled:s}=n,[o,a]=n.paths,l=this.getStrokeWidth(this.properties.strokeWidth);a.setProperties({tag:1,fill:void 0,lineJoin:a.lineCap="round",pointerEvents:1,stroke:this.properties.stroke,strokeWidth:l,strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,opacity:i,visible:r}),o.setProperties({tag:0,stroke:void 0,lineJoin:"round",pointerEvents:1,fill:this.properties.fill,fillOpacity:this.properties.fillOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,strokeOpacity:this.properties.strokeOpacity,fillShadow:this.properties.shadow,opacity:i,visible:r||s,strokeWidth:l}),Lne(this,a),Lne(this,o)})}updatePaths(n){return mr(this,null,function*(){this.updateAreaPaths([n.paths],[n.contextData])})}updateAreaPaths(n,i){this.updateFillPath(n,i),this.updateStrokePath(n,i)}updateFillPath(n,i){i.forEach(({fillData:r},s)=>{let[o]=n[s],{path:a}=o;a.clear({trackChanges:!0});for(let{point:l}of r.points)l.moveTo?a.moveTo(l.x,l.y):a.lineTo(l.x,l.y);a.closePath(),o.checkPathDirty()})}updateStrokePath(n,i){i.forEach(({strokeData:r},s)=>{let[,o]=n[s],{path:a}=o;a.clear({trackChanges:!0});for(let{point:l}of r.points)l.moveTo?a.moveTo(l.x,l.y):a.lineTo(l.x,l.y);o.checkPathDirty()})}updateMarkerSelection(n){return mr(this,null,function*(){let{nodeData:i,markerSelection:r}=n;return this.properties.marker.isDirty()&&(r.clear(),r.cleanup()),r.update(this.properties.marker.enabled?i:[])})}updateMarkerNodes(n){return mr(this,null,function*(){let{markerSelection:i,isHighlight:r}=n,{xKey:s,yKey:o,marker:a,fill:l,stroke:c,strokeWidth:d,fillOpacity:u,strokeOpacity:m,highlightStyle:f}=this.properties,_=U3(r&&f.item,a.getStyle(),{fill:l,stroke:c,strokeWidth:d,fillOpacity:u,strokeOpacity:m});i.each((x,D)=>{this.updateMarkerStyle(x,a,{datum:D,highlighted:r,xKey:s,yKey:o},_)}),r||this.properties.marker.markClean()})}updateLabelSelection(n){return mr(this,null,function*(){let{labelData:i,labelSelection:r}=n;return r.update(i,s=>{s.tag=3})})}updateLabelNodes(n){return mr(this,null,function*(){let{labelSelection:i}=n,{enabled:r,fontStyle:s,fontWeight:o,fontSize:a,fontFamily:l,color:c}=this.properties.label;i.each((d,u)=>{let{x:m,y:f,label:_}=u;_&&r&&this.visible?(d.fontStyle=s,d.fontWeight=o,d.fontSize=a,d.fontFamily=l,d.textAlign=_.textAlign,d.textBaseline=_.textBaseline,d.text=_.text,d.x=m,d.y=f-10,d.fill=c,d.visible=!0):d.visible=!1})})}getTooltipHtml(n){let{id:i,axes:r,dataModel:s}=this,{xKey:o,xName:a,yName:l,tooltip:c,marker:d}=this.properties,{yKey:u,xValue:m,yValue:f,datum:_}=n,x=r.x,D=r.y;if(!this.properties.isValid()||!(x&&D&&H3(f))||!s)return"";let E=x.formatDatum(m),M=D.formatDatum(f),I=lp(l),z=lp(E+": "+M),G=U3({fill:this.properties.fill},d.getStyle(),{stroke:this.properties.stroke,strokeWidth:this.properties.strokeWidth}),{fill:A}=this.getMarkerStyle(d,{datum:n,xKey:o,yKey:u,highlighted:!1},G);return c.toTooltipHtml({title:I,content:z,backgroundColor:A},{datum:_,xKey:o,xName:a,yKey:u,yName:l,color:A,title:I,seriesId:i})}getLegendData(n){var i,r,s,o,a,l;if(!((i=this.data)!=null&&i.length)||!this.properties.isValid()||n!=="category")return[];let{yKey:c,yName:d,fill:u,stroke:m,fillOpacity:f,strokeOpacity:_,strokeWidth:x,lineDash:D,marker:E,visible:M}=this.properties;return[{legendType:n,id:this.id,itemId:c,seriesId:this.id,enabled:M,label:{text:d??c},marker:{shape:E.shape,fill:(r=E.fill)!=null?r:u,stroke:(s=E.stroke)!=null?s:m,fillOpacity:(o=E.fillOpacity)!=null?o:f,strokeOpacity:(a=E.strokeOpacity)!=null?a:_,strokeWidth:(l=E.strokeWidth)!=null?l:0,enabled:E.enabled||x<=0},line:{stroke:m,strokeOpacity:_,strokeWidth:x,lineDash:D}}]}animateEmptyUpdateReady(n){let{markerSelections:i,labelSelections:r,contextData:s,paths:o}=n,{animationManager:a}=this.ctx;this.updateAreaPaths(o,s),aSe(this,a,o.flat()),x1(i,vU),nSe(this,a,i),cm(this,"labels",a,r)}animateReadyResize(n){let{contextData:i,paths:r}=n;this.updateAreaPaths(r,i),super.animateReadyResize(n)}animateWaitingUpdateReady(n){var i,r;let{animationManager:s}=this.ctx,{markerSelections:o,labelSelections:a,contextData:l,paths:c,previousContextData:d}=n;if(super.resetAllAnimation(n),l.length===0||!d||d.length===0){s.skipCurrentBatch(),this.updateAreaPaths(c,l);return}let[[u,m]]=c,[f]=l,[_]=d,x=j0t(f,_,(r=(i=this.processedData)==null?void 0:i.reduced)==null?void 0:r.diff);if(x===void 0){s.skipCurrentBatch(),this.updateAreaPaths(c,l);return}Vm(this.id,"marker_update",s,o,x.marker),Vm(this.id,"fill_path_properties",s,[u],x.fill.pathProperties),V0t(this.id,"fill_path_update",s,[u],x.fill.path),this.updateStrokePath(c,l),z0t(this,"stroke",s,[m]),cm(this,"labels",s,a)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new da}};return t.className="AreaSeries",t.type="area",t})(),APi=IPi,PPi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"area",instanceConstructor:APi,stackable:!0,seriesDefaults:D0t,themeTemplate:{__extends__:yb,nodeClickRange:"nearest",tooltip:{position:{type:"node"}},fillOpacity:.8,strokeOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:BF,xOffset:3,yOffset:3,blur:5},marker:{__extends__:NF,enabled:!1,fillOpacity:1,strokeOpacity:1,strokeWidth:0},label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:C1,color:W0,formatter:void 0}},paletteFactory:t=>{let{marker:e}=VU(t);return{fill:e.fill,stroke:e.stroke,marker:e}}},dSe=class extends lS{constructor(){super(...arguments),this.direction="vertical"}};Be([ut(Dft)],dSe.prototype,"direction",2);K0t=class extends cS{getBandScalePadding(){return{inner:.2,outer:.1}}shouldFlipXY(){return!this.isVertical()}isVertical(){return this.properties.direction==="vertical"}getBarDirection(){return this.shouldFlipXY()?"x":"y"}getCategoryDirection(){return this.shouldFlipXY()?"y":"x"}getValueAxis(){let t=this.getBarDirection();return this.axes[t]}getCategoryAxis(){let t=this.getCategoryDirection();return this.axes[t]}},Y0t=class extends U0{constructor(){super(...arguments),this.placement="inside"}};Be([ut(Eft)],Y0t.prototype,"placement",2);w1=class extends dSe{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#874349",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.shadow=new AC,this.label=new Y0t,this.tooltip=new av}};Be([ut(Ps)],w1.prototype,"xKey",2);Be([ut(Ps,{optional:!0})],w1.prototype,"xName",2);Be([ut(Ps)],w1.prototype,"yKey",2);Be([ut(Ps,{optional:!0})],w1.prototype,"yName",2);Be([ut(Ps,{optional:!0})],w1.prototype,"stackGroup",2);Be([ut(lh,{optional:!0})],w1.prototype,"normalizedTo",2);Be([ut(Jc)],w1.prototype,"fill",2);Be([ut(Bh)],w1.prototype,"fillOpacity",2);Be([ut(Jc)],w1.prototype,"stroke",2);Be([ut(es)],w1.prototype,"strokeWidth",2);Be([ut(Bh)],w1.prototype,"strokeOpacity",2);Be([ut(tS)],w1.prototype,"lineDash",2);Be([ut(es)],w1.prototype,"lineDashOffset",2);Be([ut(es)],w1.prototype,"cornerRadius",2);Be([ut(MC,{optional:!0})],w1.prototype,"formatter",2);Be([ut(Vc,{optional:!0})],w1.prototype,"shadow",2);Be([ut(Vc)],w1.prototype,"label",2);Be([ut(Vc)],w1.prototype,"tooltip",2);LPi=(()=>{let t=class e2t extends K0t{constructor(n){super({moduleCtx:n,pickModes:[0],pathsPerSeries:0,hasHighlightedLabels:!0,datumSelectionGarbageCollection:!1,animationResetFns:{datum:uSe,label:dS}}),this.properties=new w1,this.groupScale=new TC,this.smallestDataInterval=void 0}resolveKeyDirection(n){return this.getBarDirection()==="x"?n==="x"?"y":"x":n}processData(n){return mr(this,null,function*(){var i,r,s,o;if(!this.properties.isValid()||!this.data)return;let{seriesGrouping:{groupIndex:a=this.id}={},data:l=[]}=this,{xKey:c,yKey:d,normalizedTo:u}=this.properties,m=!this.ctx.animationManager.isSkipped(),f=Math.abs(u??NaN),_=lu.is((i=this.getCategoryAxis())==null?void 0:i.scale),x=lu.is((r=this.getValueAxis())==null?void 0:r.scale),D=`bar-stack-${a}-yValues`,E=`${D}-trailing`,M=f&&isFinite(f)?f:void 0,I=[];M&&I.push(Pne(this,[D,E],M,"range")),m&&this.processedData&&I.push(FF(this.processedData)),m&&I.push(LU(this));let z=this.visible?{}:{forceValue:0},{processedData:G}=yield this.requestDataModel(n,l,{props:[G3(this,c,_,{id:"xValue"}),cp(this,d,x,Ai({id:"yValue-raw",invalidValue:null},z)),...Zw(this,d,x,"normal","current",Ai({id:"yValue-end",rangeId:"yValue-range",invalidValue:null,missingValue:0,groupId:D,separateNegative:!0},z)),...Zw(this,d,x,"trailing","current",Ai({id:"yValue-start",invalidValue:null,missingValue:0,groupId:E,separateNegative:!0},z)),..._?[rwe]:[],...I],groupByKeys:!0,groupByData:!1});this.smallestDataInterval={x:(o=(s=G.reduced)==null?void 0:s.smallestKeyInterval)!=null?o:1/0,y:1/0},this.animationState.transition("updateData")})}getSeriesDomain(n){var i;let{processedData:r,dataModel:s}=this;if(!r||!s||r.data.length===0)return[];let{reduced:{[rwe.property]:o}={}}=r,a=this.getCategoryAxis(),l=this.getValueAxis(),c=s.resolveProcessedDataDefById(this,"xValue"),d=s.getDomain(this,"xValue","key",r),u=s.getDomain(this,"yValue-end","value",r);if(n===this.getCategoryDirection()){if(c?.def.type==="key"&&c?.def.valueType==="category")return d;let m=o!=null&&isFinite(o)?o:0,f=(i=EC(d))!=null?i:[NaN,NaN],_=a?.isReversed();if(n==="y"){let E=f[0]+(_?0:-m),M=f[1]+(_?m:0);return Gg([E,M],a)}let x=f[0]+(_?-m:0),D=f[1]+(_?0:m);return Gg([x,D],a)}else{if(this.getValueAxis()instanceof TF)return Gg(u,l);{let m=[u[0]>0?0:u[0],u[1]<0?0:u[1]];return Gg(m,l)}}}createNodeData(){return mr(this,null,function*(){let{dataModel:n}=this,i=this.getCategoryAxis(),r=this.getValueAxis();if(!(n&&i&&r&&this.properties.isValid()))return[];let s=i.scale,o=r.scale,{groupScale:a,processedData:l,smallestDataInterval:c,ctx:{seriesStateManager:d}}=this,{xKey:u,yKey:m,xName:f,yName:_,fill:x,stroke:D,strokeWidth:E,cornerRadius:M,legendItemName:I,label:z}=this.properties,G=r.isReversed(),A=lu.is(s)?s.calcBandwidth(c?.x):s.bandwidth,Y=[],{index:X,visibleGroupCount:ne}=d.getVisiblePeerGroupIndex(this);for(let Ae=0;Ae<ne;Ae++)Y.push(String(Ae));a.domain=Y,a.range=[0,A??0],i instanceof _M?a.paddingInner=i.groupPaddingInner:i instanceof hU?a.padding=.1:a.padding=0,a.round=a.padding!==0;let pe=a.bandwidth>=1?a.bandwidth:a.rawBandwidth,ce=n.resolveProcessedDataIndexById(this,"xValue").index,ie=n.resolveProcessedDataIndexById(this,"yValue-raw").index,le=n.resolveProcessedDataIndexById(this,"yValue-start").index,Se=n.resolveProcessedDataIndexById(this,"yValue-end").index,je=n.resolveProcessedDataDefById(this,"yValue-range").index,ze=!this.ctx.animationManager.isSkipped(),Ge=[];return l?.data.forEach(({keys:Ae,datum:Ye,values:ft,aggValues:Ft})=>{ft.forEach((Tt,at)=>{var yt,_t;(yt=Ge[at])!=null||(Ge[at]={itemId:m,nodeData:[],labelData:[],scales:ub(e2t.prototype,this,"calculateScaling").call(this),visible:this.visible||ze});let Re=Ae[ce],ot=s.convert(Re),jt=+Tt[Se],zt=+Tt[le],qt=Tt[ie],ui=qt>=0,_i=ui!==G,ln=(_t=Ft?.[je][ui?1:0])!=null?_t:0,Rn=ot+a.convert(String(X));if(isNaN(jt))return;let bi=o.convert(jt),Mn=o.convert(zt),Fn=this.getBarDirection()==="x",or=o.convert(ln),wn=o.convert(0),gn=new ml(Fn?Math.min(wn,or):Rn,Fn?Rn:Math.min(wn,or),Fn?Math.abs(wn-or):pe,Fn?pe:Math.abs(wn-or)),ts={x:Fn?Math.min(bi,Mn):Rn,y:Fn?Rn:Math.min(bi,Mn),width:Fn?Math.abs(Mn-bi):pe,height:Fn?pe:Math.abs(Mn-bi),cornerRadiusBbox:gn},{fontStyle:no,fontWeight:Ho,fontSize:kn,fontFamily:Ts,color:ea,placement:co}=z,Zn=this.getLabelText(this.properties.label,{datum:Ye[at],value:qt,xKey:u,yKey:m,xName:f,yName:_,legendItemName:I},Xs=>H3(Xs)?Xs.toFixed(2):""),gl=Zn?Ai({text:Zn,fill:ea,fontStyle:no,fontWeight:Ho,fontSize:kn,fontFamily:Ts},J0t({isPositive:ui,isVertical:!Fn,placement:co,rect:ts})):void 0,sc=this.shouldFlipXY()?ts.height:ts.width,Xl={series:this,itemId:m,datum:Ye[at],cumulativeValue:jt,xValue:Re,yValue:qt,yKey:m,xKey:u,capDefaults:{lengthRatioMultiplier:sc,lengthMax:sc},x:ts.x,y:ts.y,width:ts.width,height:ts.height,midPoint:{x:ts.x+ts.width/2,y:ts.y+ts.height/2},fill:x,stroke:D,strokeWidth:E,cornerRadius:M,topLeftCornerRadius:Fn!==_i,topRightCornerRadius:_i,bottomRightCornerRadius:Fn===_i,bottomLeftCornerRadius:!_i,cornerRadiusBbox:gn,label:gl};Ge[at].nodeData.push(Xl),Ge[at].labelData.push(Xl)})}),Ge})}nodeFactory(){return new Wg}updateDatumSelection(n){return mr(this,null,function*(){return n.datumSelection.update(n.nodeData,i=>{i.tag=0},i=>i.xValue)})}updateDatumNodes(n){return mr(this,null,function*(){if(!this.properties.isValid())return;let{yKey:i,stackGroup:r,fill:s,fillOpacity:o,stroke:a,strokeWidth:l,strokeOpacity:c,lineDash:d,lineDashOffset:u,formatter:m,shadow:f,highlightStyle:{item:_}}=this.properties,x=this.axes.x,D=X0t(x?.visibleRange),E=this.getCategoryDirection()==="x";n.datumSelection.each((M,I)=>{let z={fill:s,stroke:a,fillOpacity:o,strokeOpacity:c,lineDash:d,lineDashOffset:u,fillShadow:f,strokeWidth:this.getStrokeWidth(l),cornerRadius:I.cornerRadius,topLeftCornerRadius:I.topLeftCornerRadius,topRightCornerRadius:I.topRightCornerRadius,bottomRightCornerRadius:I.bottomRightCornerRadius,bottomLeftCornerRadius:I.bottomLeftCornerRadius,cornerRadiusBbox:I.cornerRadiusBbox},G=E?I.width>0:I.height>0,A=Z0t({datum:I,ctx:this.ctx,seriesId:this.id,isHighlighted:n.isHighlight,highlightStyle:_,yKey:i,style:z,formatter:m,stackGroup:r});A.crisp=D,A.visible=G,q0t({rect:M,config:A})})})}updateLabelSelection(n){return mr(this,null,function*(){let i=this.isLabelEnabled()?n.labelData:[];return n.labelSelection.update(i,r=>{r.tag=1,r.pointerEvents=1})})}updateLabelNodes(n){return mr(this,null,function*(){n.labelSelection.each((i,r)=>{Q0t(i,this.properties.label,r.label)})})}getTooltipHtml(n){var i;let{id:r,processedData:s,ctx:{callbackCache:o}}=this,a=this.getCategoryAxis(),l=this.getValueAxis();if(!s||!this.properties.isValid()||!a||!l)return"";let{xKey:c,yKey:d,xName:u,yName:m,fill:f,stroke:_,strokeWidth:x,tooltip:D,formatter:E,stackGroup:M}=this.properties,{xValue:I,yValue:z,datum:G}=n,A=a.formatDatum(I),Y=l.formatDatum(z),X=lp(m),ne=lp(A+": "+Y),pe;E&&(pe=o.call(E,{seriesId:r,datum:G,xKey:c,yKey:d,stackGroup:M,fill:f,stroke:_,strokeWidth:this.getStrokeWidth(x),highlighted:!1}));let ce=(i=pe?.fill)!=null?i:f;return D.toTooltipHtml({title:X,content:ne,backgroundColor:ce},Ai({seriesId:r,datum:G,xKey:c,yKey:d,xName:u,yName:m,stackGroup:M,title:X,color:ce},this.getModuleTooltipParams()))}getLegendData(n){var i,r;let{showInLegend:s}=this.properties;if(n!=="category"||!((i=this.data)!=null&&i.length)||!this.properties.isValid()||!s)return[];let{yKey:o,yName:a,fill:l,stroke:c,strokeWidth:d,fillOpacity:u,strokeOpacity:m,legendItemName:f,visible:_}=this.properties;return[{legendType:"category",id:this.id,itemId:o,seriesId:this.id,enabled:_,label:{text:(r=f??a)!=null?r:o},marker:{fill:l,fillOpacity:u,stroke:c,strokeWidth:d,strokeOpacity:m},legendItemName:f}]}animateEmptyUpdateReady({datumSelections:n,labelSelections:i,annotationSelections:r}){let s=xU(CU(this.isVertical(),this.axes));Vm(this.id,"nodes",this.ctx.animationManager,n,s),cm(this,"labels",this.ctx.animationManager,i),cm(this,"annotations",this.ctx.animationManager,r)}animateWaitingUpdateReady(n){var i,r;let{datumSelections:s,labelSelections:o,annotationSelections:a}=n;this.ctx.animationManager.stopByAnimationGroupId(this.id);let l=(r=(i=this.processedData)==null?void 0:i.reduced)==null?void 0:r.diff,c=xU(CU(this.isVertical(),this.axes));Vm(this.id,"nodes",this.ctx.animationManager,s,c,(d,u)=>String(u.xValue),l),cm(this,"labels",this.ctx.animationManager,o),cm(this,"annotations",this.ctx.animationManager,a)}isLabelEnabled(){return this.properties.label.enabled}};return t.className="BarSeries",t.type="bar",t})(),OPi=LPi,NPi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bar",instanceConstructor:OPi,stackable:!0,groupable:!0,seriesDefaults:{axes:[{type:y_.NUMBER,position:v_.LEFT},{type:y_.CATEGORY,position:v_.BOTTOM}]},swapDefaultAxesCondition:t=>t?.direction==="horizontal",themeTemplate:{__extends__:yb,fillOpacity:1,strokeWidth:0,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontStyle:void 0,fontWeight:DF.NORMAL,fontSize:12,fontFamily:C1,color:VF,formatter:void 0,placement:"inside"},shadow:{enabled:!1,color:BF,xOffset:3,yOffset:3,blur:5}},enterpriseThemeTemplate:{errorBar:{cap:{lengthRatio:.3}}},paletteFactory:Xwe},hSe=class extends $3{constructor(){super(...arguments),this.maxSize=30}};Be([ut(es),js({redraw:3})],hSe.prototype,"maxSize",2);Be([ut(Gne,{optional:!0}),js({redraw:3})],hSe.prototype,"domain",2);j0=class extends lS{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.marker=new hSe,this.label=new U0,this.tooltip=new av}};Be([ut(Ps)],j0.prototype,"xKey",2);Be([ut(Ps)],j0.prototype,"yKey",2);Be([ut(Ps)],j0.prototype,"sizeKey",2);Be([ut(Ps,{optional:!0})],j0.prototype,"labelKey",2);Be([ut(Ps,{optional:!0})],j0.prototype,"colorKey",2);Be([ut(Ps,{optional:!0})],j0.prototype,"xName",2);Be([ut(Ps,{optional:!0})],j0.prototype,"yName",2);Be([ut(Ps,{optional:!0})],j0.prototype,"sizeName",2);Be([ut(Ps,{optional:!0})],j0.prototype,"labelName",2);Be([ut(Ps,{optional:!0})],j0.prototype,"colorName",2);Be([ut(Gne,{optional:!0})],j0.prototype,"colorDomain",2);Be([ut(mb)],j0.prototype,"colorRange",2);Be([ut(Ps,{optional:!0})],j0.prototype,"title",2);Be([ut(Vc)],j0.prototype,"marker",2);Be([ut(Vc)],j0.prototype,"label",2);Be([ut(Vc)],j0.prototype,"tooltip",2);VPi=class extends Kwe{constructor(t,e,n,i){super(t,e,n,i),this.sizeKey=i.properties.sizeKey}},BPi=(()=>{let t=class t2t extends cS{constructor(n){super({moduleCtx:n,pickModes:[2,3,0],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{label:dS,marker:BU}}),this.NodeClickEvent=VPi,this.properties=new j0,this.sizeScale=new gM,this.colorScale=new SM}processData(n){return mr(this,null,function*(){var i,r;if(!this.properties.isValid()||this.data==null)return;let{isContinuousX:s,isContinuousY:o}=this.isContinuous(),{xKey:a,yKey:l,sizeKey:c,labelKey:d,colorDomain:u,colorRange:m,colorKey:f,marker:_}=this.properties,{dataModel:x,processedData:D}=yield this.requestDataModel(n,this.data,{props:[G3(this,a,s,{id:"xKey-raw"}),G3(this,l,o,{id:"yKey-raw"}),...d?[G3(this,d,!1,{id:"labelKey-raw"})]:[],cp(this,a,s,{id:"xValue"}),cp(this,l,o,{id:"yValue"}),cp(this,c,!0,{id:"sizeValue"}),...f?[cp(this,f,!0,{id:"colorValue"})]:[],...d?[cp(this,d,!1,{id:"labelValue"})]:[]],dataVisible:this.visible}),E=x.resolveProcessedDataIndexById(this,"sizeValue").index,M=(i=D.domain.values[E])!=null?i:[];if(this.sizeScale.domain=_.domain?_.domain:M,f){let I=x.resolveProcessedDataIndexById(this,"colorValue").index;this.colorScale.domain=(r=u??D.domain.values[I])!=null?r:[],this.colorScale.range=m,this.colorScale.update()}this.animationState.transition("updateData")})}getSeriesDomain(n){let{dataModel:i,processedData:r}=this;if(!r||!i)return[];let s=n==="x"?"xValue":"yValue",o=i.resolveProcessedDataDefById(this,s),a=i.getDomain(this,s,"value",r);if(o?.def.type==="value"&&o?.def.valueType==="category")return a;let l=this.axes[n];return Gg(EC(a),l)}createNodeData(){return mr(this,null,function*(){var n,i,r;let{axes:s,dataModel:o,processedData:a,colorScale:l,sizeScale:c}=this,{xKey:d,yKey:u,sizeKey:m,labelKey:f,xName:_,yName:x,sizeName:D,labelName:E,label:M,colorKey:I,marker:z,visible:G}=this.properties,A=s.x,Y=s.y;if(!(o&&a&&G&&A&&Y))return[];let X=o.resolveProcessedDataIndexById(this,"xValue").index,ne=o.resolveProcessedDataIndexById(this,"yValue").index,pe=m?o.resolveProcessedDataIndexById(this,"sizeValue").index:-1,ce=I?o.resolveProcessedDataIndexById(this,"colorValue").index:-1,ie=f?o.resolveProcessedDataIndexById(this,"labelValue").index:-1,le=A.scale,Se=Y.scale,je=((n=le.bandwidth)!=null?n:0)/2,ze=((i=Se.bandwidth)!=null?i:0)/2,Ge=[];c.range=[z.size,z.maxSize];let Ae=M.getFont();for(let{values:Ye,datum:ft}of(r=a.data)!=null?r:[]){let Ft=Ye[X],Tt=Ye[ne],at=le.convert(Ft)+je,yt=Se.convert(Tt)+ze,_t=this.getLabelText(M,{value:f?Ye[ie]:Tt,datum:ft,xKey:d,yKey:u,sizeKey:m,labelKey:f,xName:_,yName:x,sizeName:D,labelName:E}),Re=dm.getTextSize(String(_t),Ae),ot=m?c.convert(Ye[pe]):z.size,jt=I?l.convert(Ye[ce]):void 0;Ge.push({series:this,itemId:u,yKey:u,xKey:d,datum:ft,xValue:Ft,yValue:Tt,sizeValue:Ye[pe],point:{x:at,y:yt,size:ot},midPoint:{x:at,y:yt},fill:jt,label:Ai({text:_t},Re)})}return[{itemId:u,nodeData:Ge,labelData:Ge,scales:ub(t2t.prototype,this,"calculateScaling").call(this),visible:this.visible}]})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){var n;return(n=this.contextNodeData)==null?void 0:n.reduce((i,r)=>i.concat(r.labelData),[])}markerFactory(){let{shape:n}=this.properties.marker,i=sS(n);return new i}updateMarkerSelection(n){return mr(this,null,function*(){let{nodeData:i,markerSelection:r}=n;this.properties.marker.isDirty()&&(r.clear(),r.cleanup());let s=this.properties.marker.enabled?i:[];return r.update(s,void 0,o=>this.getDatumId(o))})}updateMarkerNodes(n){return mr(this,null,function*(){let{markerSelection:i,isHighlight:r}=n,{xKey:s,yKey:o,sizeKey:a,labelKey:l,marker:c}=this.properties,d=U3(r&&this.properties.highlightStyle.item,c.getStyle());this.sizeScale.range=[c.size,c.maxSize],i.each((u,m)=>{this.updateMarkerStyle(u,c,{datum:m,highlighted:r,xKey:s,yKey:o,sizeKey:a,labelKey:l},d)}),r||this.properties.marker.markClean()})}updateLabelSelection(n){return mr(this,null,function*(){var i,r;let s=this.properties.label.enabled?(r=(i=this.chart)==null?void 0:i.placeLabels().get(this))!=null?r:[]:[];return n.labelSelection.update(s.map(o=>cs(Ai({},o.datum),{point:{x:o.x,y:o.y,size:o.datum.point.size}})))})}updateLabelNodes(n){return mr(this,null,function*(){let{label:i}=this.properties;n.labelSelection.each((r,s)=>{var o,a,l,c;r.text=s.label.text,r.fill=i.color,r.x=(a=(o=s.point)==null?void 0:o.x)!=null?a:0,r.y=(c=(l=s.point)==null?void 0:l.y)!=null?c:0,r.fontStyle=i.fontStyle,r.fontWeight=i.fontWeight,r.fontSize=i.fontSize,r.fontFamily=i.fontFamily,r.textAlign="left",r.textBaseline="top"})})}getTooltipHtml(n){var i;let r=this.axes.x,s=this.axes.y;if(!this.properties.isValid()||!r||!s)return"";let{xKey:o,yKey:a,sizeKey:l,labelKey:c,xName:d,yName:u,sizeName:m,labelName:f,marker:_,tooltip:x}=this.properties,D=(i=this.properties.title)!=null?i:u,E=U3({fill:n.fill,strokeWidth:this.getStrokeWidth(_.strokeWidth)},_.getStyle()),{fill:M="gray"}=this.getMarkerStyle(_,{datum:n,highlighted:!1,xKey:o,yKey:a,sizeKey:l,labelKey:c},E),{datum:I,xValue:z,yValue:G,sizeValue:A,label:{text:Y}}=n,X=lp(r.formatDatum(z)),ne=lp(s.formatDatum(G)),pe=`<b>${lp(d??o)}</b>: ${X}<br><b>${lp(u??a)}</b>: ${ne}`;return l&&(pe+=`<br><b>${lp(m??l)}</b>: ${lp(String(A))}`),c&&(pe=`<b>${lp(f??c)}</b>: ${lp(Y)}<br>`+pe),x.toTooltipHtml({title:D,content:pe,backgroundColor:M},{datum:I,xKey:o,xName:d,yKey:a,yName:u,sizeKey:l,sizeName:m,labelKey:c,labelName:f,title:D,color:M,seriesId:this.id})}getLegendData(){var n,i;if(!((n=this.data)!=null&&n.length)||!this.properties.isValid())return[];let{yKey:r,yName:s,title:o,marker:a,visible:l}=this.properties,{shape:c,fill:d,stroke:u,fillOpacity:m,strokeOpacity:f,strokeWidth:_}=a;return[{legendType:"category",id:this.id,itemId:r,seriesId:this.id,enabled:l,label:{text:(i=o??s)!=null?i:r},marker:{shape:c,fill:d??"rgba(0, 0, 0, 0)",stroke:u??"rgba(0, 0, 0, 0)",fillOpacity:m??1,strokeOpacity:f??1,strokeWidth:_??0}}]}animateEmptyUpdateReady({markerSelections:n,labelSelections:i}){iSe(this,this.ctx.animationManager,n),cm(this,"labels",this.ctx.animationManager,i)}getDatumId(n){return SF([`${n.xValue}`,`${n.yValue}`,n.label.text])}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new da}};return t.className="BubbleSeries",t.type="bubble",t})(),zPi=BPi,HPi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"bubble",instanceConstructor:zPi,seriesDefaults:{axes:[{type:y_.NUMBER,position:v_.BOTTOM},{type:y_.NUMBER,position:v_.LEFT}]},themeTemplate:{__extends__:yb,tooltip:{position:{type:"node"}},marker:{__extends__:NF,maxSize:30,fillOpacity:.8},label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:C1,color:W0}},paletteFactory:VU},S1=class extends lS{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.areaPlot=!1,this.aggregation="sum",this.shadow=new AC,this.label=new U0,this.tooltip=new av}};Be([ut(Ps)],S1.prototype,"xKey",2);Be([ut(Ps,{optional:!0})],S1.prototype,"yKey",2);Be([ut(Ps,{optional:!0})],S1.prototype,"xName",2);Be([ut(Ps,{optional:!0})],S1.prototype,"yName",2);Be([ut(Jc,{optional:!0})],S1.prototype,"fill",2);Be([ut(Bh)],S1.prototype,"fillOpacity",2);Be([ut(Jc,{optional:!0})],S1.prototype,"stroke",2);Be([ut(es)],S1.prototype,"strokeWidth",2);Be([ut(Bh)],S1.prototype,"strokeOpacity",2);Be([ut(tS)],S1.prototype,"lineDash",2);Be([ut(es)],S1.prototype,"lineDashOffset",2);Be([ut(Ua)],S1.prototype,"areaPlot",2);Be([ut(TU,{optional:!0})],S1.prototype,"bins",2);Be([ut(Gm(["count","sum","mean"],"a histogram aggregation"))],S1.prototype,"aggregation",2);Be([ut(es,{optional:!0})],S1.prototype,"binCount",2);Be([ut(Vc)],S1.prototype,"shadow",2);Be([ut(Vc)],S1.prototype,"label",2);Be([ut(Vc)],S1.prototype,"tooltip",2);Qmt=10,GPi=(()=>{let t=class i2t extends cS{constructor(n){super({moduleCtx:n,pickModes:[0],datumSelectionGarbageCollection:!1,animationResetFns:{datum:uSe,label:dS}}),this.properties=new S1,this.calculatedBins=[]}deriveBins(n){if(this.properties.binCount)return this.calculateNiceBins(n,this.properties.binCount);let i=Kne(n[0],n[1],Qmt),r=wF(n[0],n[1],Qmt),[s]=i,o=a=>[a,a+r];return[[s-r,s],...i.map(o)]}calculateNiceBins(n,i){let r=Math.floor(n[0]),s=n[1],o=i||1,{start:a,binSize:l}=this.calculateNiceStart(r,s,o);return this.getBins(a,s,l,o)}getBins(n,i,r,s){let o=[],a=this.calculatePrecision(r);for(let l=0;l<s;l++){let c=Math.round((n+l*r)*a)/a,d=Math.round((n+(l+1)*r)*a)/a;l===s-1&&(d=Math.max(d,i)),o[l]=[c,d]}return o}calculatePrecision(n){let i=10;if(Hne(n)&&n>0)for(;n<1;)i*=10,n*=10;return i}calculateNiceStart(n,i,r){let s=Math.abs(i-n)/r,o=Math.floor(Math.log10(s)),a=Math.pow(10,o);return{start:Math.floor(n/a)*a,binSize:s}}processData(n){return mr(this,null,function*(){var i;let{xKey:r,yKey:s,areaPlot:o,aggregation:a}=this.properties,l=[G3(this,r,!0),s0t];if(s){let d=iwe(this,"groupCount");a==="count"||(a==="sum"?d=e0t(this,"groupAgg"):a==="mean"&&(d=i0t(this,"groupAgg"))),o&&(d=nwe(this,"groupAgg",d)),l.push(cp(this,s,!0,{invalidValue:void 0}),d)}else{let d=iwe(this,"groupAgg");o&&(d=nwe(this,"groupAgg",d)),l.push(d)}let c=d=>{var u;let m=Gg(d.domain.keys[0]);if(m.length===0)return d.domain.groups=[],()=>[];let f=(u=this.properties.bins)!=null?u:this.deriveBins(m),_=f.length;return this.calculatedBins=[...f],x=>{let D=x.keys[0];for(let E=0;E<_;E++){let M=f[E];if(D>=M[0]&&D<M[1]||E===_-1&&D<=M[1])return M}return[]}};!this.ctx.animationManager.isSkipped()&&this.processedData&&l.push(FF(this.processedData,!1)),yield this.requestDataModel(n,(i=this.data)!=null?i:[],{props:l,dataVisible:this.visible,groupByFn:c}),this.animationState.transition("updateData")})}getSeriesDomain(n){var i,r,s,o;let{processedData:a,dataModel:l}=this;if(!a||!l||!this.calculatedBins.length)return[];let c=l.getDomain(this,"groupAgg","aggregate",a),d=(i=this.calculatedBins)==null?void 0:i[0][0],u=(o=this.calculatedBins)==null?void 0:o[((s=(r=this.calculatedBins)==null?void 0:r.length)!=null?s:0)-1][1];return Gg(n==="x"?[d,u]:c)}createNodeData(){return mr(this,null,function*(){var n;let{id:i,axes:r,processedData:s,ctx:{callbackCache:o}}=this,a=r.x,l=r.y;if(!this.visible||!a||!l||!s||s.type!=="grouped")return[];let{scale:c}=a,{scale:d}=l,{xKey:u,yKey:m,xName:f,yName:_,fill:x,stroke:D,strokeWidth:E}=this.properties,{formatter:M=ne=>String(ne.value),fontStyle:I,fontWeight:z,fontSize:G,fontFamily:A,color:Y}=this.properties.label,X=[];return s.data.forEach(ne=>{var pe;let{aggValues:[[ce,ie]]=[[0,0]],datum:le,datum:{length:Se},keys:je,keys:[ze,Ge]}=ne,Ae=c.convert(ze),Ye=c.convert(Ge),ft=ce+ie,Ft=d.convert(0),Tt=d.convert(ft),at=Math.abs(Ye-Ae),yt=Math.abs(Tt-Ft),_t=Math.min(Ae,Ye),Re=Math.min(Ft,Tt),ot=ft!==0?{text:(pe=o.call(M,{value:ft,datum:le,seriesId:i,xKey:u,yKey:m,xName:f,yName:_}))!=null?pe:String(ft),fontStyle:I,fontWeight:z,fontSize:G,fontFamily:A,fill:Y,x:_t+at/2,y:Re+yt/2}:void 0,jt={x:_t+at/2,y:Re+yt/2};X.push({series:this,datum:le,aggregatedValue:ft,frequency:Se,domain:je,yKey:m,xKey:u,x:_t,y:Re,xValue:Ae,yValue:Tt,width:at,height:yt,midPoint:jt,fill:x,stroke:D,strokeWidth:E,label:ot})}),[{itemId:(n=this.properties.yKey)!=null?n:this.id,nodeData:X,labelData:X,scales:ub(i2t.prototype,this,"calculateScaling").call(this),animationValid:!0,visible:this.visible}]})}nodeFactory(){return new Wg}updateDatumSelection(n){return mr(this,null,function*(){let{nodeData:i,datumSelection:r}=n;return r.update(i,s=>{s.tag=0,s.crisp=!0},s=>s.domain.join("_"))})}updateDatumNodes(n){return mr(this,null,function*(){let{isHighlight:i}=n,{fillOpacity:r,strokeOpacity:s,lineDash:o,lineDashOffset:a,shadow:l,highlightStyle:{item:{fill:c,fillOpacity:d=r,stroke:u,strokeWidth:m}}}=this.properties;n.datumSelection.each((f,_,x)=>{var D,E;let M=i&&m!==void 0?m:_.strokeWidth,I=i?d:r;f.fill=(D=i?c:void 0)!=null?D:_.fill,f.stroke=(E=i?u:void 0)!=null?E:_.stroke,f.fillOpacity=I,f.strokeOpacity=s,f.strokeWidth=M,f.lineDash=o,f.lineDashOffset=a,f.fillShadow=l,f.zIndex=i?OU.highlightedZIndex:x,f.visible=_.height>0})})}updateLabelSelection(n){return mr(this,null,function*(){let{labelData:i,labelSelection:r}=n;return r.update(i,s=>{s.tag=1,s.pointerEvents=1,s.textAlign="center",s.textBaseline="middle"})})}updateLabelNodes(n){return mr(this,null,function*(){let i=this.isLabelEnabled();n.labelSelection.each((r,s)=>{let o=s.label;o&&i?(r.text=o.text,r.x=o.x,r.y=o.y,r.fontStyle=o.fontStyle,r.fontWeight=o.fontWeight,r.fontSize=o.fontSize,r.fontFamily=o.fontFamily,r.fill=o.fill,r.visible=!0):r.visible=!1})})}getTooltipHtml(n){let i=this.axes.x,r=this.axes.y;if(!this.properties.isValid()||!i||!r)return"";let{xKey:s,yKey:o,xName:a,yName:l,fill:c,aggregation:d,tooltip:u}=this.properties,{aggregatedValue:m,frequency:f,domain:[_,x]}=n,D=`${lp(a??s)}: ${i.formatDatum(_)} - ${i.formatDatum(x)}`,E=o?`<b>${lp(l??o)} (${d})</b>: ${r.formatDatum(m)}<br>`:"";E+=`<b>Frequency</b>: ${f}`;let M={title:D,backgroundColor:c,content:E};return u.toTooltipHtml(M,{datum:{data:n.datum,aggregatedValue:n.aggregatedValue,domain:n.domain,frequency:n.frequency},xKey:s,xName:a,yKey:o,yName:l,color:c,title:D,seriesId:this.id})}getLegendData(n){var i,r;if(!((i=this.data)!=null&&i.length)||n!=="category")return[];let{xKey:s,yName:o,fill:a,fillOpacity:l,stroke:c,strokeWidth:d,strokeOpacity:u,visible:m}=this.properties;return[{legendType:"category",id:this.id,itemId:s,seriesId:this.id,enabled:m,label:{text:(r=o??s)!=null?r:"Frequency"},marker:{fill:a??"rgba(0, 0, 0, 0)",stroke:c??"rgba(0, 0, 0, 0)",fillOpacity:l,strokeOpacity:u,strokeWidth:d}}]}animateEmptyUpdateReady({datumSelections:n,labelSelections:i}){let r=xU(CU(!0,this.axes));Vm(this.id,"datums",this.ctx.animationManager,n,r),cm(this,"labels",this.ctx.animationManager,i)}animateWaitingUpdateReady(n){var i,r;let s=(r=(i=this.processedData)==null?void 0:i.reduced)==null?void 0:r.diff,o=xU(CU(!0,this.axes));Vm(this.id,"datums",this.ctx.animationManager,n.datumSelections,o,(a,l)=>this.getDatumId(l),s),cm(this,"labels",this.ctx.animationManager,n.labelSelections)}getDatumId(n){return SF(n.domain.map(i=>`${i}`))}isLabelEnabled(){return this.properties.label.enabled}};return t.className="HistogramSeries",t.type="histogram",t})(),WPi=GPi,UPi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"histogram",instanceConstructor:WPi,seriesDefaults:{axes:[{type:y_.NUMBER,position:v_.BOTTOM},{type:y_.NUMBER,position:v_.LEFT}]},themeTemplate:{__extends__:yb,strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:C1,color:VF,formatter:void 0},shadow:{enabled:!1,color:BF,xOffset:3,yOffset:3,blur:5}},paletteFactory:({takeColors:t})=>{let{fills:[e],strokes:[n]}=t(1);return{fill:e,stroke:n}}},Ug=class extends lS{constructor(){super(...arguments),this.stroke="#874349",this.strokeWidth=2,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.marker=new $3,this.label=new U0,this.tooltip=new av,this.connectMissingData=!1}};Be([ut(Ps)],Ug.prototype,"xKey",2);Be([ut(Ps)],Ug.prototype,"yKey",2);Be([ut(Ps,{optional:!0})],Ug.prototype,"xName",2);Be([ut(Ps,{optional:!0})],Ug.prototype,"yName",2);Be([ut(Ps,{optional:!0})],Ug.prototype,"title",2);Be([ut(Jc)],Ug.prototype,"stroke",2);Be([ut(es)],Ug.prototype,"strokeWidth",2);Be([ut(Bh)],Ug.prototype,"strokeOpacity",2);Be([ut(tS)],Ug.prototype,"lineDash",2);Be([ut(es)],Ug.prototype,"lineDashOffset",2);Be([ut(Vc)],Ug.prototype,"marker",2);Be([ut(Vc)],Ug.prototype,"label",2);Be([ut(Vc)],Ug.prototype,"tooltip",2);Be([ut(Ua)],Ug.prototype,"connectMissingData",2);jPi=(()=>{let t=class n2t extends cS{constructor(n){super({moduleCtx:n,hasMarkers:!0,pickModes:[2,3,0],markerSelectionGarbageCollection:!1,animationResetFns:{path:lSe({getOpacity:()=>this.getOpacity()}),label:dS,marker:(i,r)=>Ai(Ai({},BU(i)),vU(i,r))}}),this.properties=new Ug}processData(n){return mr(this,null,function*(){if(!this.properties.isValid()||this.data==null)return;let{xKey:i,yKey:r}=this.properties,s=!this.ctx.animationManager.isSkipped(),{isContinuousX:o,isContinuousY:a}=this.isContinuous(),l=[];o||(l.push(G3(this,i,o,{id:"xKey"})),s&&this.processedData&&l.push(FF(this.processedData))),s&&l.push(LU(this,o?["xValue"]:[])),l.push(cp(this,i,o,{id:"xValue"}),cp(this,r,a,{id:"yValue",invalidValue:void 0})),yield this.requestDataModel(n,this.data,{props:l}),this.animationState.transition("updateData")})}getSeriesDomain(n){let{axes:i,dataModel:r,processedData:s}=this;if(!s||!r)return[];let o=i.x,a=i.y,l=r.resolveProcessedDataDefById(this,"xValue");if(n==="x"){let c=r.getDomain(this,"xValue","value",s);return l?.def.type==="value"&&l.def.valueType==="category"?c:Gg(EC(c),o)}else{let c=r.getDomain(this,"yValue","value",s);return Gg(c,a)}}createNodeData(){return mr(this,null,function*(){var n,i,r;let{processedData:s,dataModel:o,axes:a}=this,l=a.x,c=a.y;if(!s||!o||!l||!c)return[];let{xKey:d,yKey:u,xName:m,yName:f,marker:_,label:x,connectMissingData:D}=this.properties,E=l.scale,M=c.scale,I=((n=E.bandwidth)!=null?n:0)/2,z=((i=M.bandwidth)!=null?i:0)/2,G=[],A=_.enabled?_.size:0,Y=o.resolveProcessedDataIndexById(this,"xValue").index,X=o.resolveProcessedDataIndexById(this,"yValue").index,ne=!0,pe;for(let ce=0;ce<s.data.length;ce++){let{datum:ie,values:le}=pe??s.data[ce],Se=le[Y],je=le[X];if(je===void 0)ne=!D;else{let ze=E.convert(Se)+I;if(isNaN(ze)){ne=!D,pe=void 0;continue}pe=((r=s.data[ce+1])==null?void 0:r.values[X])===void 0?void 0:s.data[ce+1];let Ge=M.convert(je)+z,Ae=this.getLabelText(x,{value:je,datum:ie,xKey:d,yKey:u,xName:m,yName:f},Ye=>H3(Ye)?Ye.toFixed(2):String(Ye));G.push({series:this,datum:ie,yKey:u,xKey:d,point:{x:ze,y:Ge,moveTo:ne,size:A},midPoint:{x:ze,y:Ge},yValue:je,xValue:Se,capDefaults:{lengthRatioMultiplier:this.properties.marker.getDiameter(),lengthMax:1/0},label:Ae?{text:Ae,fontStyle:x.fontStyle,fontWeight:x.fontWeight,fontSize:x.fontSize,fontFamily:x.fontFamily,textAlign:"center",textBaseline:"bottom",fill:x.color}:void 0}),ne=!1}}return[{itemId:u,nodeData:G,labelData:G,scales:ub(n2t.prototype,this,"calculateScaling").call(this),visible:this.visible}]})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}markerFactory(){let{shape:n}=this.properties.marker,i=sS(n);return new i}updatePathNodes(n){return mr(this,null,function*(){let{paths:[i],opacity:r,visible:s,animationEnabled:o}=n;i.setProperties({fill:void 0,lineJoin:"round",pointerEvents:1,opacity:r,stroke:this.properties.stroke,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.properties.strokeOpacity,lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset}),o||(i.visible=s),Lne(this,i)})}updateMarkerSelection(n){return mr(this,null,function*(){let{nodeData:i}=n,{markerSelection:r}=n,{shape:s,enabled:o}=this.properties.marker;return i=s&&o?i:[],this.properties.marker.isDirty()&&(r.clear(),r.cleanup()),r.update(i,void 0,a=>this.getDatumId(a))})}updateMarkerNodes(n){return mr(this,null,function*(){let{markerSelection:i,isHighlight:r}=n,{xKey:s,yKey:o,stroke:a,strokeWidth:l,strokeOpacity:c,marker:d,highlightStyle:u}=this.properties,m=U3(r&&u.item,d.getStyle(),{stroke:a,strokeWidth:l,strokeOpacity:c}),f=this.ctx.animationManager.isSkipped();i.each((_,x)=>{this.updateMarkerStyle(_,d,{datum:x,highlighted:r,xKey:s,yKey:o},m,{applyTranslation:f})}),r||d.markClean()})}updateLabelSelection(n){return mr(this,null,function*(){return n.labelSelection.update(this.isLabelEnabled()?n.labelData:[])})}updateLabelNodes(n){return mr(this,null,function*(){let{enabled:i,fontStyle:r,fontWeight:s,fontSize:o,fontFamily:a,color:l}=this.properties.label;n.labelSelection.each((c,d)=>{let{point:u,label:m}=d;d&&m&&i?(c.fontStyle=r,c.fontWeight=s,c.fontSize=o,c.fontFamily=a,c.textAlign=m.textAlign,c.textBaseline=m.textBaseline,c.text=m.text,c.x=u.x,c.y=u.y-10,c.fill=l,c.visible=!0):c.visible=!1})})}getTooltipHtml(n){var i;let r=this.axes.x,s=this.axes.y;if(!this.properties.isValid()||!r||!s)return"";let{xKey:o,yKey:a,xName:l,yName:c,strokeWidth:d,marker:u,tooltip:m}=this.properties,{datum:f,xValue:_,yValue:x}=n,D=r.formatDatum(_),E=s.formatDatum(x),M=lp((i=this.properties.title)!=null?i:c),I=lp(D+": "+E),z=U3({fill:u.stroke},u.getStyle(),{strokeWidth:d}),{fill:G}=this.getMarkerStyle(u,{datum:n,xKey:o,yKey:a,highlighted:!1},z);return m.toTooltipHtml({title:M,content:I,backgroundColor:G},Ai({datum:f,xKey:o,xName:l,yKey:a,yName:c,title:M,color:G,seriesId:this.id},this.getModuleTooltipParams()))}getLegendData(n){var i,r,s,o,a,l,c,d,u;if(!((i=this.data)!=null&&i.length&&this.properties.isValid()&&n==="category"))return[];let{yKey:m,yName:f,stroke:_,strokeOpacity:x,strokeWidth:D,lineDash:E,title:M,marker:I,visible:z}=this.properties,G="rgba(0, 0, 0, 0)";return[{legendType:"category",id:this.id,itemId:m,seriesId:this.id,enabled:z,label:{text:(r=M??f)!=null?r:m},marker:{shape:I.shape,fill:(s=I.fill)!=null?s:G,stroke:(a=(o=I.stroke)!=null?o:_)!=null?a:G,fillOpacity:(l=I.fillOpacity)!=null?l:1,strokeOpacity:(d=(c=I.strokeOpacity)!=null?c:x)!=null?d:1,strokeWidth:(u=I.strokeWidth)!=null?u:0,enabled:I.enabled},line:{stroke:_??G,strokeOpacity:x,strokeWidth:D,lineDash:E}}]}updatePaths(n){return mr(this,null,function*(){this.updateLinePaths([n.paths],[n.contextData])})}updateLinePaths(n,i){i.forEach(({nodeData:r},s)=>{let[o]=n[s],{path:a}=o;a.clear({trackChanges:!0});for(let l of r)l.point.moveTo?a.moveTo(l.point.x,l.point.y):a.lineTo(l.point.x,l.point.y);o.checkPathDirty()})}animateEmptyUpdateReady(n){let{markerSelections:i,labelSelections:r,annotationSelections:s,contextData:o,paths:a}=n,{animationManager:l}=this.ctx;this.updateLinePaths(a,o),aSe(this,l,a.flat()),x1(i,vU),nSe(this,l,i),cm(this,"labels",l,r),cm(this,"annotations",l,s)}animateReadyResize(n){let{contextData:i,paths:r}=n;this.updateLinePaths(r,i),super.animateReadyResize(n)}animateWaitingUpdateReady(n){var i,r;let{animationManager:s}=this.ctx,{markerSelections:o,labelSelections:a,annotationSelections:l,contextData:c,paths:d,previousContextData:u}=n;if(super.resetAllAnimation(n),c.length===0||!u||u.length===0){s.skipCurrentBatch(),this.updateLinePaths(d,c);return}let[m]=d,[f]=c,[_]=u,x=W0t(f,_,(r=(i=this.processedData)==null?void 0:i.reduced)==null?void 0:r.diff);if(x===void 0){s.skipCurrentBatch(),this.updateLinePaths(d,c);return}Vm(this.id,"marker",s,o,x.marker),Vm(this.id,"path_properties",s,m,x.pathProperties),V0t(this.id,"path_update",s,m,x.path),x.hasMotion&&(cm(this,"labels",s,a),cm(this,"annotations",s,l))}getDatumId(n){return SF([`${n.xValue}`])}isLabelEnabled(){return this.properties.label.enabled}getBandScalePadding(){return{inner:1,outer:.1}}nodeFactory(){return new da}};return t.className="LineSeries",t.type="line",t})(),$Pi=jPi,KPi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"line",instanceConstructor:$Pi,seriesDefaults:D0t,themeTemplate:{__extends__:yb,tooltip:{position:{type:"node"}},strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,marker:{__extends__:NF,fillOpacity:1,strokeOpacity:1,strokeWidth:0},label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:C1,color:W0,formatter:void 0}},enterpriseThemeTemplate:{errorBar:{cap:{lengthRatio:1}}},paletteFactory:t=>{let{marker:e}=VU(t);return{stroke:e.fill,marker:e}}},jg=class extends lS{constructor(){super(...arguments),this.colorRange=["#ffff00","#00ff00","#0000ff"],this.marker=new $3,this.label=new U0,this.tooltip=new av}};Be([ut(Ps)],jg.prototype,"xKey",2);Be([ut(Ps)],jg.prototype,"yKey",2);Be([ut(Ps,{optional:!0})],jg.prototype,"labelKey",2);Be([ut(Ps,{optional:!0})],jg.prototype,"colorKey",2);Be([ut(Ps,{optional:!0})],jg.prototype,"xName",2);Be([ut(Ps,{optional:!0})],jg.prototype,"yName",2);Be([ut(Ps,{optional:!0})],jg.prototype,"labelName",2);Be([ut(Ps,{optional:!0})],jg.prototype,"colorName",2);Be([ut(Gne,{optional:!0})],jg.prototype,"colorDomain",2);Be([ut(mb)],jg.prototype,"colorRange",2);Be([ut(Ps,{optional:!0})],jg.prototype,"title",2);Be([ut(Vc)],jg.prototype,"marker",2);Be([ut(Vc)],jg.prototype,"label",2);Be([ut(Vc)],jg.prototype,"tooltip",2);YPi=(()=>{let t=class r2t extends cS{constructor(n){super({moduleCtx:n,pickModes:[2,3,0],pathsPerSeries:0,hasMarkers:!0,markerSelectionGarbageCollection:!1,animationResetFns:{marker:BU,label:dS}}),this.properties=new jg,this.colorScale=new SM}processData(n){return mr(this,null,function*(){var i;if(!this.properties.isValid()||this.data==null)return;let{isContinuousX:r,isContinuousY:s}=this.isContinuous(),{xKey:o,yKey:a,labelKey:l,colorKey:c,colorDomain:d,colorRange:u}=this.properties,{dataModel:m,processedData:f}=yield this.requestDataModel(n,this.data,{props:[G3(this,o,r,{id:"xKey-raw"}),G3(this,a,s,{id:"yKey-raw"}),...l?[G3(this,l,!1,{id:"labelKey-raw"})]:[],cp(this,o,r,{id:"xValue"}),cp(this,a,s,{id:"yValue"}),...c?[cp(this,c,!0,{id:"colorValue"})]:[],...l?[cp(this,l,!1,{id:"labelValue"})]:[]],dataVisible:this.visible});if(c){let _=m.resolveProcessedDataIndexById(this,"colorValue").index;this.colorScale.domain=(i=d??f.domain.values[_])!=null?i:[],this.colorScale.range=u,this.colorScale.update()}this.animationState.transition("updateData")})}getSeriesDomain(n){let{dataModel:i,processedData:r}=this;if(!r||!i)return[];let s=n==="x"?"xValue":"yValue",o=i.resolveProcessedDataDefById(this,s),a=i.getDomain(this,s,"value",r);if(o?.def.type==="value"&&o?.def.valueType==="category")return a;let l=this.axes[n];return Gg(EC(a),l)}createNodeData(){return mr(this,null,function*(){var n,i,r;let{axes:s,dataModel:o,processedData:a,colorScale:l}=this,{xKey:c,yKey:d,labelKey:u,colorKey:m,xName:f,yName:_,labelName:x,marker:D,label:E,visible:M}=this.properties,I=s.x,z=s.y;if(!(o&&a&&M&&I&&z))return[];let G=o.resolveProcessedDataIndexById(this,"xValue").index,A=o.resolveProcessedDataIndexById(this,"yValue").index,Y=m?o.resolveProcessedDataIndexById(this,"colorValue").index:-1,X=u?o.resolveProcessedDataIndexById(this,"labelValue").index:-1,ne=I.scale,pe=z.scale,ce=((n=ne.bandwidth)!=null?n:0)/2,ie=((i=pe.bandwidth)!=null?i:0)/2,le=[],Se=E.getFont();for(let{values:je,datum:ze}of(r=a.data)!=null?r:[]){let Ge=je[G],Ae=je[A],Ye=ne.convert(Ge)+ce,ft=pe.convert(Ae)+ie,Ft=this.getLabelText(E,{value:u?je[X]:Ae,datum:ze,xKey:c,yKey:d,labelKey:u,xName:f,yName:_,labelName:x}),Tt=dm.getTextSize(Ft,Se),at=m?l.convert(je[Y]):void 0;le.push({series:this,itemId:d,yKey:d,xKey:c,datum:ze,xValue:Ge,yValue:Ae,capDefaults:{lengthRatioMultiplier:D.getDiameter(),lengthMax:1/0},point:{x:Ye,y:ft,size:D.size},midPoint:{x:Ye,y:ft},fill:at,label:Ai({text:Ft},Tt)})}return[{itemId:d,nodeData:le,labelData:le,scales:ub(r2t.prototype,this,"calculateScaling").call(this),visible:this.visible}]})}isPathOrSelectionDirty(){return this.properties.marker.isDirty()}getLabelData(){var n;return(n=this.contextNodeData)==null?void 0:n.reduce((i,r)=>i.concat(r.labelData),[])}markerFactory(){let{shape:n}=this.properties.marker,i=sS(n);return new i}updateMarkerSelection(n){return mr(this,null,function*(){let{nodeData:i,markerSelection:r}=n;return this.properties.marker.isDirty()&&(r.clear(),r.cleanup()),r.update(this.properties.marker.enabled?i:[])})}updateMarkerNodes(n){return mr(this,null,function*(){let{markerSelection:i,isHighlight:r}=n,{xKey:s,yKey:o,labelKey:a,marker:l,highlightStyle:c}=this.properties,d=U3(r&&c.item,l.getStyle());i.each((u,m)=>{this.updateMarkerStyle(u,l,{datum:m,highlighted:r,xKey:s,yKey:o,labelKey:a},d)}),r||l.markClean()})}updateLabelSelection(n){return mr(this,null,function*(){var i,r;let s=this.isLabelEnabled()?(r=(i=this.chart)==null?void 0:i.placeLabels().get(this))!=null?r:[]:[];return n.labelSelection.update(s.map(({datum:o,x:a,y:l})=>cs(Ai({},o),{point:{x:a,y:l,size:o.point.size}})),o=>{o.pointerEvents=1})})}updateLabelNodes(n){return mr(this,null,function*(){let{label:i}=this.properties;n.labelSelection.each((r,s)=>{var o,a,l,c;r.text=s.label.text,r.fill=i.color,r.x=(a=(o=s.point)==null?void 0:o.x)!=null?a:0,r.y=(c=(l=s.point)==null?void 0:l.y)!=null?c:0,r.fontStyle=i.fontStyle,r.fontWeight=i.fontWeight,r.fontSize=i.fontSize,r.fontFamily=i.fontFamily,r.textAlign="left",r.textBaseline="top"})})}getTooltipHtml(n){let i=this.axes.x,r=this.axes.y;if(!this.properties.isValid()||!i||!r)return"";let{xKey:s,yKey:o,labelKey:a,xName:l,yName:c,labelName:d,title:u=c,marker:m,tooltip:f}=this.properties,{datum:_,xValue:x,yValue:D,label:E}=n,M=U3({fill:n.fill,strokeWidth:this.getStrokeWidth(m.strokeWidth)},m.getStyle()),{fill:I="gray"}=this.getMarkerStyle(m,{datum:n,highlighted:!1,xKey:s,yKey:o,labelKey:a},M),z=lp(i.formatDatum(x)),G=lp(r.formatDatum(D)),A=`<b>${lp(l??s)}</b>: ${z}<br><b>${lp(c??o)}</b>: ${G}`;return a&&(A=`<b>${lp(d??a)}</b>: ${lp(E.text)}<br>`+A),f.toTooltipHtml({title:u,content:A,backgroundColor:I},Ai({datum:_,xKey:s,xName:l,yKey:o,yName:c,labelKey:a,labelName:d,title:u,color:I,seriesId:this.id},this.getModuleTooltipParams()))}getLegendData(n){var i,r,s,o,a,l;let{yKey:c,yName:d,title:u,marker:m,visible:f}=this.properties,{fill:_,stroke:x,fillOpacity:D,strokeOpacity:E,strokeWidth:M}=m;return!((i=this.data)!=null&&i.length)||!this.properties.isValid()||n!=="category"?[]:[{legendType:"category",id:this.id,itemId:c,seriesId:this.id,enabled:f,label:{text:(r=u??d)!=null?r:c},marker:{shape:m.shape,fill:(o=(s=m.fill)!=null?s:_)!=null?o:"rgba(0, 0, 0, 0)",stroke:(l=(a=m.stroke)!=null?a:x)!=null?l:"rgba(0, 0, 0, 0)",fillOpacity:D??1,strokeOpacity:E??1,strokeWidth:M??0}}]}animateEmptyUpdateReady(n){let{markerSelections:i,labelSelections:r,annotationSelections:s}=n;iSe(this,this.ctx.animationManager,i),cm(this,"labels",this.ctx.animationManager,r),cm(this,"annotations",this.ctx.animationManager,s)}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new da}};return t.className="ScatterSeries",t.type="scatter",t})(),qPi=YPi,ZPi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["cartesian"],identifier:"scatter",instanceConstructor:qPi,seriesDefaults:{axes:[{type:y_.NUMBER,position:v_.BOTTOM},{type:y_.NUMBER,position:v_.LEFT}]},themeTemplate:{__extends__:yb,tooltip:{position:{type:"node"}},marker:{__extends__:NF,fillOpacity:.8},label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:C1,color:W0}},enterpriseThemeTemplate:{errorBar:{cap:{lengthRatio:1}}},paletteFactory:VU},ab={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},CF={BLUE:"#2b5c95",ORANGE:"#cc6f10",GREEN:"#1e652e",CYAN:"#18859e",YELLOW:"#a69400",VIOLET:"#603c88",GRAY:"#575757",MAGENTA:"#7d2f6d",BROWN:"#4f3508",RED:"#a82529"},s2t=class extends Hm{constructor(){super(...arguments),this.showInLegend=!1}};Be([ut(Ua)],s2t.prototype,"showInLegend",2);pSe=class extends U0{constructor(){super(...arguments),this.margin=2}set(t,e){return super.set(t)}};Be([ut(Ps)],pSe.prototype,"text",2);Be([ut(lh)],pSe.prototype,"margin",2);mSe=class extends A2{constructor(){super(...arguments),this.fill="transparent",this.fillOpacity=1}};Be([ut(Jc)],mSe.prototype,"fill",2);Be([ut(Bh)],mSe.prototype,"fillOpacity",2);zF=class extends U0{constructor(){super(...arguments),this.offset=3,this.minAngle=0,this.minSpacing=4,this.maxCollisionOffset=50,this.avoidCollisions=!0}};Be([ut(es)],zF.prototype,"offset",2);Be([ut(MF)],zF.prototype,"minAngle",2);Be([ut(es)],zF.prototype,"minSpacing",2);Be([ut(es)],zF.prototype,"maxCollisionOffset",2);Be([ut(Ua)],zF.prototype,"avoidCollisions",2);fSe=class extends U0{constructor(){super(...arguments),this.positionOffset=0,this.positionRatio=.5}};Be([ut(lh)],fSe.prototype,"positionOffset",2);Be([ut(Bh)],fSe.prototype,"positionRatio",2);rre=class extends A2{constructor(){super(...arguments),this.length=10,this.strokeWidth=1}};Be([ut(mb,{optional:!0})],rre.prototype,"colors",2);Be([ut(es)],rre.prototype,"length",2);Be([ut(es)],rre.prototype,"strokeWidth",2);Dc=class extends LC{constructor(){super(...arguments),this.fills=Object.values(ab),this.strokes=Object.values(CF),this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.rotation=0,this.outerRadiusOffset=0,this.outerRadiusRatio=1,this.innerRadiusOffset=0,this.innerRadiusRatio=1,this.strokeWidth=1,this.sectorSpacing=void 0,this.innerLabels=new zne(pSe),this.title=new s2t,this.innerCircle=new mSe,this.shadow=new AC,this.calloutLabel=new zF,this.sectorLabel=new fSe,this.calloutLine=new rre,this.tooltip=new av,this.__BACKGROUND_COLOR_DO_NOT_USE=void 0}};Be([ut(Ps)],Dc.prototype,"angleKey",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"angleName",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"radiusKey",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"radiusName",2);Be([ut(es,{optional:!0})],Dc.prototype,"radiusMin",2);Be([ut(es,{optional:!0})],Dc.prototype,"radiusMax",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"calloutLabelKey",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"calloutLabelName",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"sectorLabelKey",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"sectorLabelName",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"legendItemKey",2);Be([ut(mb)],Dc.prototype,"fills",2);Be([ut(mb)],Dc.prototype,"strokes",2);Be([ut(Bh)],Dc.prototype,"fillOpacity",2);Be([ut(Bh)],Dc.prototype,"strokeOpacity",2);Be([ut(tS)],Dc.prototype,"lineDash",2);Be([ut(es)],Dc.prototype,"lineDashOffset",2);Be([ut(MC,{optional:!0})],Dc.prototype,"formatter",2);Be([ut(MF)],Dc.prototype,"rotation",2);Be([ut(lh)],Dc.prototype,"outerRadiusOffset",2);Be([ut(Bh)],Dc.prototype,"outerRadiusRatio",2);Be([ut(lh)],Dc.prototype,"innerRadiusOffset",2);Be([ut(Bh)],Dc.prototype,"innerRadiusRatio",2);Be([ut(es)],Dc.prototype,"strokeWidth",2);Be([ut(es,{optional:!0})],Dc.prototype,"sectorSpacing",2);Be([ut(wft)],Dc.prototype,"innerLabels",2);Be([ut(Vc)],Dc.prototype,"title",2);Be([ut(Vc)],Dc.prototype,"innerCircle",2);Be([ut(Vc)],Dc.prototype,"shadow",2);Be([ut(Vc)],Dc.prototype,"calloutLabel",2);Be([ut(Vc)],Dc.prototype,"sectorLabel",2);Be([ut(Vc)],Dc.prototype,"calloutLine",2);Be([ut(Vc)],Dc.prototype,"tooltip",2);Be([ut(Ps,{optional:!0})],Dc.prototype,"__BACKGROUND_COLOR_DO_NOT_USE",2);gSe=class extends p0t{constructor(t){var e=t,{useLabelLayer:n=!1,pickModes:i=[0],canHaveAxes:r=!1,animationResetFns:s}=e,o=W3(e,["useLabelLayer","pickModes","canHaveAxes","animationResetFns"]);super(cs(Ai({},o),{useLabelLayer:n,pickModes:i,contentGroupVirtual:!1,directionKeys:{x:["angleKey"],y:["radiusKey"]},directionNames:{x:["angleName"],y:["radiusName"]},canHaveAxes:r})),this.sectorGroup=this.contentGroup.appendChild(new da),this.itemSelection=Bm.select(this.sectorGroup,()=>this.nodeFactory(),!1),this.labelSelection=Bm.select(this.labelGroup,Wu,!1),this.highlightSelection=Bm.select(this.highlightGroup,()=>this.nodeFactory()),this.centerX=0,this.centerY=0,this.radius=0,this.sectorGroup.zIndexSubOrder=[()=>this._declarationOrder,1],this.animationResetFns=s,this.animationState=new IU("empty",{empty:{update:{target:"ready",action:a=>this.animateEmptyUpdateReady(a)}},ready:{updateData:"waiting",clear:"clearing",highlight:a=>this.animateReadyHighlight(a),highlightMarkers:a=>this.animateReadyHighlightMarkers(a),resize:a=>this.animateReadyResize(a)},waiting:{update:{target:"ready",action:a=>this.animateWaitingUpdateReady(a)}},clearing:{update:{target:"empty",action:a=>this.animateClearingUpdateEmpty(a)}}},()=>this.checkProcessedDataAnimatable())}getLabelData(){return[]}computeLabelsBBox(t,e){return null}resetAllAnimation(){var t;let{item:e,label:n}=(t=this.animationResetFns)!=null?t:{};this.ctx.animationManager.stopByAnimationGroupId(this.id),e&&x1([this.itemSelection,this.highlightSelection],e),n&&x1([this.labelSelection],n),this.itemSelection.cleanup(),this.labelSelection.cleanup(),this.highlightSelection.cleanup()}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animateReadyHighlight(t){var e;let{item:n}=(e=this.animationResetFns)!=null?e:{};n&&x1([this.highlightSelection],n)}animateReadyHighlightMarkers(t){}animateReadyResize(t){this.resetAllAnimation()}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation()}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(t){return{seriesRect:t}}},QPi=class extends Qne{constructor(t,e,n,i){super(t,e,n,i),this.angleKey=i.properties.angleKey,this.radiusKey=i.properties.radiusKey,this.calloutLabelKey=i.properties.calloutLabelKey,this.sectorLabelKey=i.properties.sectorLabelKey}},o2t=(()=>{let t=class extends gSe{constructor(e){super({moduleCtx:e,useLabelLayer:!0,animationResetFns:{item:XPi,label:dS}}),this.properties=new Dc,this.previousRadiusScale=new gM,this.radiusScale=new gM,this.backgroundGroup=this.rootGroup.appendChild(new da({name:`${this.id}-background`,layer:!0,zIndex:0})),this.zerosumRingsGroup=this.backgroundGroup.appendChild(new da({name:`${this.id}-zerosumRings`})),this.zerosumOuterRing=this.zerosumRingsGroup.appendChild(new vF),this.zerosumInnerRing=this.zerosumRingsGroup.appendChild(new vF),this.innerCircleGroup=this.backgroundGroup.appendChild(new da({name:`${this.id}-innerCircle`})),this.nodeData=[],this.seriesItemEnabled=[],this.surroundingRadius=void 0,this.NodeClickEvent=QPi,this.angleScale=new gM,this.angleScale.domain=[0,1],this.angleScale.range=[-Math.PI,Math.PI].map(s=>s+Math.PI/2);let n=new da({name:"pieCalloutLabels"}),i=new da({name:"pieSectorLabels"}),r=new da({name:"innerLabels"});this.labelGroup.append(n),this.labelGroup.append(i),this.labelGroup.append(r),this.calloutLabelSelection=Bm.select(n,da),this.sectorLabelSelection=Bm.select(i,Wu),this.innerLabelsSelection=Bm.select(r,Wu),this.innerCircleSelection=Bm.select(this.innerCircleGroup,vF);for(let s of[this.zerosumInnerRing,this.zerosumOuterRing])s.fillOpacity=0,s.stroke=this.properties.calloutLabel.color,s.strokeWidth=1,s.strokeOpacity=1}addChartEventListeners(){var e;(e=this.ctx.chartEventManager)==null||e.addListener("legend-item-click",n=>this.onLegendItemClick(n))}visibleChanged(){this.processSeriesItemEnabled()}get visible(){return this.seriesItemEnabled.length?this.seriesItemEnabled.some(e=>e):super.visible}processSeriesItemEnabled(){var e;let{data:n,visible:i}=this;this.seriesItemEnabled=(e=n?.map(()=>i))!=null?e:[]}nodeFactory(){return new RC}getSeriesDomain(e){return e==="x"?this.angleScale.domain:this.radiusScale.domain}processData(e){return mr(this,null,function*(){var n,i,r,s,o;if(this.data==null||!this.properties.isValid())return;let{data:a}=this,{seriesItemEnabled:l}=this,{angleKey:c,radiusKey:d,calloutLabelKey:u,sectorLabelKey:m,legendItemKey:f}=this.properties,_=!this.ctx.animationManager.isSkipped(),x=[],D=[];f?x.push(G3(this,f,!1,{id:"legendItemKey"})):u?x.push(G3(this,u,!1,{id:"calloutLabelKey"})):m&&x.push(G3(this,m,!1,{id:"sectorLabelKey"})),d&&D.push(c0t(this,d,{id:"radiusValue",min:(n=this.properties.radiusMin)!=null?n:0,max:this.properties.radiusMax}),cp(this,d,!0,{id:"radiusRaw"}),swe(this,{id:"radiusValue"},[0,1],1,(i=this.properties.radiusMin)!=null?i:0,this.properties.radiusMax)),u&&D.push(cp(this,u,!1,{id:"calloutLabelValue"})),m&&D.push(cp(this,m,!1,{id:"sectorLabelValue"})),f&&D.push(cp(this,f,!1,{id:"legendItemValue"})),_&&this.processedData&&x.length>0&&D.push(FF(this.processedData)),D.push(LU(this)),a=a.map((E,M)=>l[M]?E:cs(Ai({},E),{[c]:0})),yield this.requestDataModel(e,a,{props:[...x,u0t(this,c,!0,{id:"angleValue",onlyPositive:!0}),cp(this,c,!0,{id:"angleRaw"}),swe(this,{id:"angleValue"},[0,1],0,0),...D]});for(let E of(o=(s=(r=this.processedData)==null?void 0:r.defs)==null?void 0:s.values)!=null?o:[]){let{id:M,missing:I,property:z}=E;M!=="angleRaw"&&I!==void 0&&I>0&&Ns.warnOnce(`no value was found for the key '${String(z)}' on ${I} data element${I>1?"s":""}`)}this.animationState.transition("updateData")})}maybeRefreshNodeData(){return mr(this,null,function*(){if(!this.nodeDataRefresh)return;let[{nodeData:e=[]}={}]=yield this.createNodeData();this.nodeData=e,this.nodeDataRefresh=!1})}getProcessedDataIndexes(e){let n=e.resolveProcessedDataIndexById(this,"angleValue").index,i=this.properties.radiusKey?e.resolveProcessedDataIndexById(this,"radiusValue").index:-1,r=this.properties.calloutLabelKey?e.resolveProcessedDataIndexById(this,"calloutLabelValue").index:-1,s=this.properties.sectorLabelKey?e.resolveProcessedDataIndexById(this,"sectorLabelValue").index:-1,o=this.properties.legendItemKey?e.resolveProcessedDataIndexById(this,"legendItemValue").index:-1;return{angleIdx:n,radiusIdx:i,calloutLabelIdx:r,sectorLabelIdx:s,legendItemIdx:o}}createNodeData(){return mr(this,null,function*(){let{id:e,processedData:n,dataModel:i,angleScale:r}=this,{rotation:s}=this.properties;if(!n||!i||n.type!=="ungrouped")return[];let{angleIdx:o,radiusIdx:a,calloutLabelIdx:l,sectorLabelIdx:c,legendItemIdx:d}=this.getProcessedDataIndexes(i),u=0,m=0,f=n.data.map((_,x)=>{var D;let{datum:E,values:M}=_,I=M[o],z=r.convert(u)+tv(s);u=I,m+=I;let G=r.convert(u)+tv(s),A=Math.abs(G-z),Y=z+A/2,X=M[o+1],ne=a>=0&&(D=M[a])!=null?D:1,pe=a>=0?M[a+1]:void 0,ce=d>=0?M[d]:void 0,ie=this.getLabels(E,Y,A,!0,M[l],M[c],ce),le=this.getSectorFormat(E,x,!1);return Ai({itemId:x,series:this,datum:E,index:x,angleValue:X,midAngle:Y,midCos:Math.cos(Y),midSin:Math.sin(Y),startAngle:z,endAngle:G,sectorFormat:le,radiusValue:pe,radius:ne,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(ne),0),legendItemValue:ce},ie)});return this.zerosumOuterRing.visible=m===0,this.zerosumInnerRing.visible=m===0&&this.properties.innerRadiusRatio!==1&&this.properties.innerRadiusRatio>0,[{itemId:e,nodeData:f,labelData:f}]})}getLabels(e,n,i,r,s,o,a){let{calloutLabel:l,sectorLabel:c,legendItemKey:d}=this.properties,u=!r||l.enabled?this.properties.calloutLabelKey:void 0,m=!r||c.enabled?this.properties.sectorLabelKey:void 0;if(!u&&!m&&!d)return{};let f={datum:e,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName,legendItemKey:this.properties.legendItemKey},_={};return u&&i>tv(l.minAngle)&&(_.calloutLabel=cs(Ai({},this.getTextAlignment(n)),{text:this.getLabelText(l,cs(Ai({},f),{value:s})),hidden:!1,collisionTextAlign:void 0,collisionOffsetY:0,box:void 0})),m&&(_.sectorLabel={text:this.getLabelText(c,cs(Ai({},f),{value:o}))}),d!=null&&a!=null&&(_.legendItem={key:d,text:a}),_}getTextAlignment(e){let n=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],i=wne(e),r=-3*Math.PI/4,s=i-r,o=Math.floor(s/(Math.PI/2)),a=Twe(o,n.length);return n[a]}getSectorFormat(e,n,i){var r,s,o,a,l;let{callbackCache:c,highlightManager:d}=this.ctx,{angleKey:u,radiusKey:m,fills:f,strokes:_,formatter:x,sectorSpacing:D,__BACKGROUND_COLOR_DO_NOT_USE:E}=this.properties,M=d.getActiveHighlight(),I=i&&M?.series===this&&n===M.itemId,{fill:z,fillOpacity:G,stroke:A,strokeWidth:Y,strokeOpacity:X}=U3(I&&this.properties.highlightStyle.item,{fill:f.length>0?f[n%f.length]:void 0,fillOpacity:this.properties.fillOpacity,stroke:D!=null?_.length>0?_[n%_.length]:void 0:_.length>0?_[n%_.length]:E,strokeWidth:this.getStrokeWidth(this.properties.strokeWidth),strokeOpacity:this.getOpacity()}),ne;return x&&(ne=c.call(x,{datum:e,angleKey:u,radiusKey:m,fill:z,stroke:A,fills:f,strokes:_,strokeWidth:Y,highlighted:I,seriesId:this.id})),{fill:(r=ne?.fill)!=null?r:z,fillOpacity:(s=ne?.fillOpacity)!=null?s:G,stroke:(o=ne?.stroke)!=null?o:A,strokeWidth:(a=ne?.strokeWidth)!=null?a:Y,strokeOpacity:(l=ne?.strokeOpacity)!=null?l:X}}getInnerRadius(){let{radius:e}=this,{innerRadiusRatio:n,innerRadiusOffset:i}=this.properties,r=e*n+i;return r===e||r<0?0:r}getOuterRadius(){return Math.max(this.radius*this.properties.outerRadiusRatio+this.properties.outerRadiusOffset,0)}updateRadiusScale(e){let n=[this.getInnerRadius(),this.getOuterRadius()];this.radiusScale.range=n,e&&(this.previousRadiusScale.range=n),this.nodeData=this.nodeData.map(i=>{var r=i,{radius:s}=r,o=W3(r,["radius"]);return cs(Ai({},o),{radius:s,innerRadius:Math.max(this.radiusScale.convert(0),0),outerRadius:Math.max(this.radiusScale.convert(s),0)})})}getTitleTranslationY(){var e,n;let i=Math.max(0,this.radiusScale.range[1]);if(i===0)return NaN;let s=2+((n=(e=this.properties.title)==null?void 0:e.spacing)!=null?n:0),o=Math.max(0,-i);return-i-s-o}update(e){return mr(this,arguments,function*({seriesRect:n}){let{title:i}=this.properties,r={seriesRectWidth:n?.width,seriesRectHeight:n?.height},s=SC(this.nodeDataDependencies,r)!=null;if(s&&(this._nodeDataDependencies=r),yield this.maybeRefreshNodeData(),this.updateTitleNodes(),this.updateRadiusScale(s),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.backgroundGroup.translationX=this.centerX,this.backgroundGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),i){let o=this.getTitleTranslationY(),a=i.node.computeBBox();i.node.visible=i.enabled&&isFinite(o)&&!this.bboxIntersectsSurroundingSeries(a,0,o),i.node.translationY=isFinite(o)?o:0}this.updateNodeMidPoint(),yield this.updateSelections(),yield this.updateNodes(n)})}updateTitleNodes(){var e,n;let{oldTitle:i}=this,{title:r}=this.properties;i!==r&&(i&&((e=this.labelGroup)==null||e.removeChild(i.node)),r&&(r.node.textBaseline="bottom",(n=this.labelGroup)==null||n.appendChild(r.node)),this.oldTitle=r)}updateNodeMidPoint(){this.nodeData.forEach(e=>{let n=e.innerRadius+(e.outerRadius-e.innerRadius)/2;e.midPoint={x:e.midCos*Math.max(0,n),y:e.midSin*Math.max(0,n)}})}updateSelections(){return mr(this,null,function*(){yield this.updateGroupSelection(),this.updateInnerCircleSelection()})}updateGroupSelection(){return mr(this,null,function*(){let{itemSelection:e,highlightSelection:n,calloutLabelSelection:i,sectorLabelSelection:r,innerLabelsSelection:s}=this,o=(a,l)=>{let c=this.nodeData;l&&(c=c.map(d=>cs(Ai({},d),{sectorFormat:Ai({},d.sectorFormat)}))),a.update(c),this.ctx.animationManager.isSkipped()&&a.cleanup()};o(e,!1),o(n,!0),i.update(this.nodeData,a=>{let l=new l0;l.tag=1,l.pointerEvents=1,a.appendChild(l);let c=new Wu;c.tag=2,c.pointerEvents=1,a.appendChild(c)}),r.update(this.nodeData,a=>{a.pointerEvents=1}),s.update(this.properties.innerLabels,a=>{a.pointerEvents=1})})}updateInnerCircleSelection(){let{innerCircle:e}=this.properties,n=0,i=this.getInnerRadius();if(i>0){let s=Math.min(i,this.getOuterRadius());n=Math.ceil(s*2+1)}let r=e?[{radius:n}]:[];this.innerCircleSelection.update(r)}updateNodes(e){return mr(this,null,function*(){let n=this.ctx.highlightManager.getActiveHighlight(),i=this.seriesItemEnabled.indexOf(!0)>=0;this.rootGroup.visible=i,this.backgroundGroup.visible=i,this.contentGroup.visible=i,this.highlightGroup.visible=i&&n?.series===this,this.labelGroup&&(this.labelGroup.visible=i),this.contentGroup.opacity=this.getOpacity(),this.innerCircleSelection.each((s,{radius:o})=>{var a,l;s.setProperties({fill:(a=this.properties.innerCircle)==null?void 0:a.fill,opacity:(l=this.properties.innerCircle)==null?void 0:l.fillOpacity,size:o})});let r=(s,o,a,l)=>{let c=this.getSectorFormat(o.datum,o.itemId,l);o.sectorFormat.fill=c.fill,o.sectorFormat.stroke=c.stroke;let d=this.ctx.animationManager.isSkipped();d&&(s.startAngle=o.startAngle,s.endAngle=o.endAngle,s.innerRadius=o.innerRadius,s.outerRadius=o.outerRadius),(l||d)&&(s.fill=c.fill,s.stroke=c.stroke),s.strokeWidth=c.strokeWidth,s.fillOpacity=c.fillOpacity,s.strokeOpacity=this.properties.strokeOpacity,s.lineDash=this.properties.lineDash,s.lineDashOffset=this.properties.lineDashOffset,s.fillShadow=this.properties.shadow,s.inset=this.properties.sectorSpacing!=null?(this.properties.sectorSpacing+(c.stroke!=null?c.strokeWidth:0))/2:0,s.lineJoin=this.properties.sectorSpacing!=null?"miter":"round"};this.itemSelection.each((s,o,a)=>r(s,o,a,!1)),this.highlightSelection.each((s,o,a)=>{let l=n?.series===this&&s.datum.itemId===n.itemId;r(s,o,a,l),s.visible=l}),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(e),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),this.updateZerosumRings(),this.animationState.transition("update")})}updateCalloutLineNodes(){var e;let{calloutLine:n}=this.properties,i=n.length,r=n.strokeWidth,s=(e=n.colors)!=null?e:this.properties.strokes,{offset:o}=this.properties.calloutLabel;this.calloutLabelSelection.selectByTag(1).forEach((a,l)=>{let c=a.datum,{calloutLabel:d,outerRadius:u}=c;if(d?.text&&!d.hidden&&u!==0){a.visible=!0,a.strokeWidth=r,a.stroke=s[l%s.length],a.fill=void 0;let m=c.midCos*u,f=c.midSin*u,_=c.midCos*(u+i),x=c.midSin*(u+i);if((d.collisionTextAlign||d.collisionOffsetY!==0)&&d.box!=null){let E=d.box,M=_,I=x;_<E.x?M=E.x:_>E.x+E.width&&(M=E.x+E.width),x<E.y?I=E.y:x>E.y+E.height&&(I=E.y+E.height);let z=M-_,G=I-x,A=Math.sqrt(Math.pow(z,2)+Math.pow(G,2)),Y=A-o;Y>0&&(_=_+z*Y/A,x=x+G*Y/A)}a.x1=m,a.y1=f,a.x2=_,a.y2=x}else a.visible=!1})}getLabelOverflow(e,n,i){let r=i.x-this.centerX,s=i.x+i.width-this.centerX,o=i.y-this.centerY,a=i.y+i.height-this.centerY,l=1,c=1;n.x+l<r?c=(n.x+n.width-r)/n.width:n.x+n.width-l>s&&(c=(s-n.x)/n.width);let d=n.y+l<o||n.y+n.height-l>a,u=c===1?e.length:Math.floor(e.length*c)-1,m=this.bboxIntersectsSurroundingSeries(n);return{textLength:u,hasVerticalOverflow:d,hasSurroundingSeriesOverflow:m}}bboxIntersectsSurroundingSeries(e,n=0,i=0){let{surroundingRadius:r}=this;if(r==null)return!1;let s=[{x:e.x+n,y:e.y+i},{x:e.x+e.width+n,y:e.y+i},{x:e.x+e.width+n,y:e.y+e.height+i},{x:e.x+n,y:e.y+e.height+i}],o=ap(r,2);return s.some(a=>ap(a.x,2)+ap(a.y,2)>o)}computeCalloutLabelCollisionOffsets(){let{radiusScale:e}=this,{calloutLabel:n,calloutLine:i}=this.properties,{offset:r,minSpacing:s}=n,o=e.convert(0),a=I=>!I.calloutLabel||I.outerRadius===0,l=this.nodeData,c=this.nodeData.filter(I=>!a(I));if(c.forEach(I=>{let z=I.calloutLabel;z!=null&&(z.hidden=!1,z.collisionTextAlign=void 0,z.collisionOffsetY=0)}),c.length<=1)return;let d=c.filter(I=>I.midCos<0).sort((I,z)=>I.midSin-z.midSin),u=c.filter(I=>I.midCos>=0).sort((I,z)=>I.midSin-z.midSin),m=c.filter(I=>{var z;return I.midSin<0&&((z=I.calloutLabel)==null?void 0:z.textAlign)==="center"}).sort((I,z)=>I.midCos-z.midCos),f=c.filter(I=>{var z;return I.midSin>=0&&((z=I.calloutLabel)==null?void 0:z.textAlign)==="center"}).sort((I,z)=>I.midCos-z.midCos),_=new Wu,x=I=>{var z;let G=I.calloutLabel;if(G==null)return new ml(0,0,0,0);let A=I.outerRadius+i.length+r,Y=I.midCos*A,X=I.midSin*A+G.collisionOffsetY;return _.text=G.text,_.x=Y,_.y=X,_.setFont(this.properties.calloutLabel),_.setAlign({textAlign:(z=G.collisionTextAlign)!=null?z:G.textAlign,textBaseline:G.textBaseline}),_.computeBBox()},D=(I,z,G)=>{let A=x(I).grow(s/2),Y=x(z).grow(s/2);if(A.x<Y.x+Y.width&&A.x+A.width>Y.x&&(G==="to-top"?A.y<Y.y+Y.height:A.y+A.height>Y.y)){let ne=G==="to-top"?A.y-Y.y-Y.height:A.y+A.height-Y.y;z.calloutLabel.collisionOffsetY=ne}},E=I=>{let z=I.slice().sort((A,Y)=>Math.abs(A.midSin)-Math.abs(Y.midSin))[0],G=I.indexOf(z);for(let A=G-1;A>=0;A--){let Y=I[A+1],X=I[A];D(Y,X,"to-top")}for(let A=G+1;A<I.length;A++){let Y=I[A-1],X=I[A];D(Y,X,"to-bottom")}},M=I=>{let z=c.some(pe=>pe.calloutLabel.collisionOffsetY!==0),G=I.map(pe=>x(pe)),A=G.map(pe=>pe.clone().grow(s/2)),Y=!1;for(let pe=0;pe<A.length&&!Y;pe++){let ce=A[pe];for(let ie=pe+1;ie<I.length;ie++){let le=A[ie];if(ce.collidesBBox(le)){Y=!0;break}}}let X=l.map(pe=>{let{startAngle:ce,endAngle:ie,outerRadius:le}=pe;return{startAngle:ce,endAngle:ie,innerRadius:o,outerRadius:le}}),ne=G.some(pe=>X.some(ce=>Jki(pe,ce)));!Y&&!z&&!ne||I.filter(pe=>pe.calloutLabel.textAlign==="center").forEach(pe=>{let ce=pe.calloutLabel;pe.midCos<0?ce.collisionTextAlign="right":pe.midCos>0?ce.collisionTextAlign="left":ce.collisionTextAlign="center"})};E(d),E(u),M(m),M(f)}updateCalloutLabelNodes(e){let{radiusScale:n}=this,{calloutLabel:i,calloutLine:r}=this.properties,s=r.length,{offset:o,color:a}=i,l=new Wu;this.calloutLabelSelection.selectByTag(2).forEach(c=>{var d;let{datum:u}=c,m=u.calloutLabel,f=n.convert(u.radius),_=Math.max(0,f);if(!m?.text||_===0||m.hidden){c.visible=!1;return}let x=_+s+o,D=u.midCos*x,E=u.midSin*x+m.collisionOffsetY,M={textAlign:(d=m.collisionTextAlign)!=null?d:m.textAlign,textBaseline:m.textBaseline};l.text=m.text,l.x=D,l.y=E,l.setFont(this.properties.calloutLabel),l.setAlign(M);let I=l.computeBBox(),z=m.text,G=!0;if(i.avoidCollisions){let{textLength:A,hasVerticalOverflow:Y}=this.getLabelOverflow(m.text,I,e);z=m.text.length===A?m.text:`${m.text.substring(0,A)}\u2026`,G=!Y}c.text=z,c.x=D,c.y=E,c.setFont(this.properties.calloutLabel),c.setAlign(M),c.fill=a,c.visible=G})}computeLabelsBBox(e,n){return mr(this,null,function*(){let{calloutLabel:i,calloutLine:r}=this.properties,s=r.length,{offset:o,maxCollisionOffset:a,minSpacing:l}=i;if(!i.avoidCollisions)return null;yield this.maybeRefreshNodeData(),this.updateRadiusScale(!1),this.computeCalloutLabelCollisionOffsets();let c=[],d=new Wu,u,{title:m}=this.properties;if(m?.text&&m.enabled){let f=this.getTitleTranslationY();isFinite(f)&&(d.text=m.text,d.x=0,d.y=f,d.setFont(m),d.setAlign({textBaseline:"bottom",textAlign:"center"}),u=d.computeBBox(),c.push(u))}return this.nodeData.forEach(f=>{var _;let x=f.calloutLabel;if(!x||f.outerRadius===0)return null;let D=f.outerRadius+s+o,E=f.midCos*D,M=f.midSin*D+x.collisionOffsetY;d.text=x.text,d.x=E,d.y=M,d.setFont(this.properties.calloutLabel),d.setAlign({textAlign:(_=x.collisionTextAlign)!=null?_:x.textAlign,textBaseline:x.textBaseline});let I=d.computeBBox();if(x.box=I,Math.abs(x.collisionOffsetY)>a){x.hidden=!0;return}if(u){let z=n.y-this.centerY,G=new ml(u.x-l,z,u.width+2*l,u.y+u.height+l-z);if(I.collidesBBox(G)){x.hidden=!0;return}}if(e.hideWhenNecessary){let{textLength:z,hasVerticalOverflow:G,hasSurroundingSeriesOverflow:A}=this.getLabelOverflow(x.text,I,n),Y=x.text.length>2&&z<2;if(G||Y||A){x.hidden=!0;return}}x.hidden=!1,c.push(I)}),c.length===0?null:ml.merge(c)})}updateSectorLabelNodes(){let{radiusScale:e}=this,n=e.convert(0),{fontSize:i,fontStyle:r,fontWeight:s,fontFamily:o,positionOffset:a,positionRatio:l,color:c}=this.properties.sectorLabel,d=n>0,u=this.seriesItemEnabled.filter(Boolean).length===1;this.sectorLabelSelection.each((m,f)=>{let{sectorLabel:_,outerRadius:x}=f,D=!1;if(_&&x!==0){let E=n*(1-l)+x*l+a;m.fill=c,m.fontStyle=r,m.fontWeight=s,m.fontSize=i,m.fontFamily=o,m.text=_.text,!d&&u?(m.x=0,m.y=0):(m.x=f.midCos*E,m.y=f.midSin*E),m.textAlign="center",m.textBaseline="middle";let I=m.computeBBox(),z=[[I.x,I.y],[I.x+I.width,I.y],[I.x+I.width,I.y+I.height],[I.x,I.y+I.height]],{startAngle:G,endAngle:A}=f,Y={startAngle:G,endAngle:A,innerRadius:n,outerRadius:x};z.every(([X,ne])=>s1t(X,ne,Y))&&(D=!0)}m.visible=D})}updateInnerLabelNodes(){let e=[],n=[];this.innerLabelsSelection.each((u,m)=>{let{fontStyle:f,fontWeight:_,fontSize:x,fontFamily:D,color:E}=m;u.fontStyle=f,u.fontWeight=_,u.fontSize=x,u.fontFamily=D,u.text=m.text,u.x=0,u.y=0,u.fill=E,u.textAlign="center",u.textBaseline="alphabetic",e.push(u.computeBBox()),n.push(m.margin)});let i=u=>u===0?0:n[u],r=u=>u===n.length-1?0:n[u],s=e.reduce((u,m,f)=>u+m.height+i(f)+r(f),0),o=Math.max(...e.map(u=>u.width)),a=this.getInnerRadius(),c=Math.sqrt(Math.pow(o/2,2)+Math.pow(s/2,2))<=(a>0?a:this.getOuterRadius()),d=[];for(let u=0,m=-s/2;u<e.length;u++){let _=e[u].height+m+i(u);d.push(_),m=_+r(u)}this.innerLabelsSelection.each((u,m,f)=>{u.y=d[f],u.visible=c})}updateZerosumRings(){this.zerosumOuterRing.size=this.getOuterRadius()*2,this.zerosumInnerRing.size=this.getInnerRadius()*2}getDatumLegendName(e){let{angleKey:n,calloutLabelKey:i,sectorLabelKey:r,legendItemKey:s}=this.properties,{sectorLabel:o,calloutLabel:a,legendItem:l}=e;if(s&&l!==void 0)return l.text;if(i&&i!==n&&a?.text!==void 0)return a.text;if(r&&r!==n&&o?.text!==void 0)return o.text}getTooltipHtml(e){var n;if(!this.properties.isValid())return"";let{datum:i,angleValue:r,sectorFormat:{fill:s}}=e,o=lp((n=this.properties.title)==null?void 0:n.text),a=H3(r)?Swe(r):String(r),l=this.getDatumLegendName(e);return this.properties.tooltip.toTooltipHtml({title:o??l,content:o&&l?`${l}: ${a}`:a,backgroundColor:s},{datum:i,title:o,color:s,seriesId:this.id,angleKey:this.properties.angleKey,angleName:this.properties.angleName,radiusKey:this.properties.radiusKey,radiusName:this.properties.radiusName,calloutLabelKey:this.properties.calloutLabelKey,calloutLabelName:this.properties.calloutLabelName,sectorLabelKey:this.properties.sectorLabelKey,sectorLabelName:this.properties.sectorLabelName})}getLegendData(e){var n,i,r,s,o;let{processedData:a,dataModel:l}=this;if(!l||!a?.data.length||e!=="category")return[];let{angleKey:c,calloutLabelKey:d,sectorLabelKey:u,legendItemKey:m}=this.properties;if(!m&&(!d||d===c)&&(!u||u===c))return[];let{calloutLabelIdx:f,sectorLabelIdx:_,legendItemIdx:x}=this.getProcessedDataIndexes(l),D=((n=this.properties.title)==null?void 0:n.showInLegend)&&this.properties.title.text,E=[];for(let M=0;M<a.data.length;M++){let{datum:I,values:z}=a.data[M],G=[];D&&G.push(D);let A=this.getLabels(I,2*Math.PI,2*Math.PI,!1,z[f],z[_],z[x]);if(m&&A.legendItem!==void 0?G.push(A.legendItem.text):d&&d!==c&&((i=A.calloutLabel)==null?void 0:i.text)!==void 0?G.push((r=A.calloutLabel)==null?void 0:r.text):u&&u!==c&&((s=A.sectorLabel)==null?void 0:s.text)!==void 0&&G.push((o=A.sectorLabel)==null?void 0:o.text),G.length===0)continue;let Y=this.getSectorFormat(I,M,!1);E.push({legendType:"category",id:this.id,itemId:M,seriesId:this.id,enabled:this.seriesItemEnabled[M],label:{text:G.join(" - ")},marker:{fill:Y.fill,stroke:Y.stroke,fillOpacity:this.properties.fillOpacity,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth}})}return E}onLegendItemClick(e){let{enabled:n,itemId:i,series:r}=e;r.id===this.id?this.toggleSeriesItem(i,n):r.type==="pie"&&this.toggleOtherSeriesItems(r,i,n)}toggleSeriesItem(e,n){this.seriesItemEnabled[e]=n,this.nodeDataRefresh=!0}toggleOtherSeriesItems(e,n,i){var r,s;if(!this.properties.legendItemKey||!this.dataModel)return;let o=e.properties.legendItemKey&&((r=e.data)==null?void 0:r.find((l,c)=>c===n)[e.properties.legendItemKey]);if(!o)return;let a=this.dataModel.resolveProcessedDataIndexById(this,"legendItemValue").index;(s=this.processedData)==null||s.data.forEach(({values:l},c)=>{l[a]===o&&this.toggleSeriesItem(c,i)})}animateEmptyUpdateReady(e){let{animationManager:n}=this.ctx,i=R7e(!0,this.properties.rotation,this.radiusScale,this.previousRadiusScale);Vm(this.id,"nodes",n,[this.itemSelection,this.highlightSelection],i.nodes),Vm(this.id,"innerCircle",n,[this.innerCircleSelection],i.innerCircle),cm(this,"callout",n,[this.calloutLabelSelection]),cm(this,"sector",n,[this.sectorLabelSelection]),cm(this,"inner",n,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}animateWaitingUpdateReady(){var e,n,i,r,s,o;let{itemSelection:a,highlightSelection:l,processedData:c,radiusScale:d,previousRadiusScale:u}=this,{animationManager:m}=this.ctx,f=(e=c?.reduced)==null?void 0:e.diff;this.ctx.animationManager.stopByAnimationGroupId(this.id);let _=((n=f?.moved.length)!=null?n:0)===0&&f?.addedIndices.every(M=>!f.removedIndices.includes(M)),x=((i=c?.defs.keys.length)!=null?i:0)>0,D=(o=(s=(r=c?.reduced)==null?void 0:r.animationValidation)==null?void 0:s.uniqueKeys)!=null?o:!0;(!_||!x||!D)&&this.ctx.animationManager.skipCurrentBatch();let E=R7e(!1,this.properties.rotation,d,u);Vm(this.id,"nodes",m,[a,l],E.nodes,(M,I)=>this.getDatumId(I),f),Vm(this.id,"innerCircle",m,[this.innerCircleSelection],E.innerCircle),cm(this,"callout",this.ctx.animationManager,[this.calloutLabelSelection]),cm(this,"sector",this.ctx.animationManager,[this.sectorLabelSelection]),cm(this,"inner",this.ctx.animationManager,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}animateClearingUpdateEmpty(){let{itemSelection:e,highlightSelection:n,radiusScale:i,previousRadiusScale:r}=this,{animationManager:s}=this.ctx,o=R7e(!1,this.properties.rotation,i,r);Vm(this.id,"nodes",s,[e,n],o.nodes),Vm(this.id,"innerCircle",s,[this.innerCircleSelection],o.innerCircle),lne(this,"callout",this.ctx.animationManager,[this.calloutLabelSelection]),lne(this,"sector",this.ctx.animationManager,[this.sectorLabelSelection]),lne(this,"inner",this.ctx.animationManager,[this.innerLabelsSelection]),this.previousRadiusScale.range=this.radiusScale.range}getDatumIdFromData(e){var n,i,r;let{calloutLabelKey:s,sectorLabelKey:o,legendItemKey:a}=this.properties;if((r=(i=(n=this.processedData)==null?void 0:n.reduced)==null?void 0:i.animationValidation)!=null&&r.uniqueKeys){if(a)return e[a];if(s)return e[s];if(o)return e[o]}}getDatumId(e){var n;let{index:i}=e;return(n=this.getDatumIdFromData(e.datum))!=null?n:`${i}`}onDataChange(){this.processSeriesItemEnabled()}};return t.className="PieSeries",t.type="pie",t})(),JPi={type:"series",optionsKey:"series[]",packageType:"community",chartTypes:["polar"],identifier:"pie",instanceConstructor:o2t,seriesDefaults:{},themeTemplate:{__extends__:yb,title:{enabled:!0,fontStyle:void 0,fontWeight:DF.NORMAL,fontSize:14,fontFamily:C1,color:_F,spacing:5},calloutLabel:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:C1,color:W0,offset:3,minAngle:0},sectorLabel:{enabled:!0,fontStyle:void 0,fontWeight:DF.NORMAL,fontSize:12,fontFamily:C1,color:VF,positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,rotation:0,outerRadiusOffset:0,innerRadiusOffset:0,shadow:{enabled:!1,color:BF,xOffset:3,yOffset:3,blur:5},innerLabels:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:C1,color:W0,margin:2},__BACKGROUND_COLOR_DO_NOT_USE:gU},paletteFactory:({takeColors:t,colorsCount:e,userPalette:n})=>{let{fills:i,strokes:r}=t(e);return{fills:i,strokes:n?r:[],calloutLine:{colors:r}}}};tRi={};db(tRi,{ADD_PHASE:()=>Qft,AGG_VALUES_EXTENT:()=>_Ai,AND:()=>j6,ARRAY:()=>TU,ARRAY_OF:()=>pb,AbstractBarSeries:()=>K0t,AbstractBarSeriesProperties:()=>dSe,ActionOnSet:()=>R2,Animation:()=>e1t,AnimationManager:()=>$1t,AreaSeriesTag:()=>U0t,Axis:()=>Gwe,AxisLabel:()=>Pf,AxisTick:()=>x_,BOOLEAN:()=>Ua,BOOLEAN_ARRAY:()=>fki,Background:()=>ere,BackgroundModule:()=>T0t,BaseModuleInstance:()=>ywe,BaseProperties:()=>A2,COLOR_STRING:()=>Jc,COLOR_STRING_ARRAY:()=>mb,CartesianAxis:()=>TM,CartesianSeries:()=>cS,CartesianSeriesNodeClickEvent:()=>Kwe,CartesianSeriesProperties:()=>lS,CategoryAxis:()=>_M,ChartAxisDirection:()=>kft,ChartEventManager:()=>K1t,ChartUpdateType:()=>pU,CursorManager:()=>Y1t,DATE:()=>Mwe,DATE_ARRAY:()=>gki,DATE_OR_DATETIME_MS:()=>kwe,DEGREE:()=>MF,DIRECTION:()=>Dft,DataController:()=>j1t,DataModel:()=>U1t,Default:()=>gb,Deprecated:()=>ski,DeprecatedAndRenamedTo:()=>oki,FONT_STYLE:()=>iS,FONT_WEIGHT:()=>nS,FROM_TO_MIXINS:()=>I2,FUNCTION:()=>MC,GREATER_THAN:()=>bM,HierarchyNode:()=>dne,HierarchySeries:()=>rRi,HierarchySeriesProperties:()=>uS,HighlightManager:()=>q1t,HighlightStyle:()=>NU,INITIAL_LOAD:()=>qft,INTERACTION_RANGE:()=>Awe,InteractionManager:()=>Z1t,LABEL_PHASE:()=>kU,LESS_THAN:()=>DU,LINE_CAP:()=>Sft,LINE_DASH:()=>tS,LINE_JOIN:()=>vki,Layers:()=>jft,LayoutService:()=>Q1t,MATCHING_CROSSLINE_TYPE:()=>Vwe,MAX_SPACING:()=>Cki,MIN_SPACING:()=>Mft,MODULE_CONFLICTS:()=>_we,Motion:()=>Fwe,NAN:()=>EF,NODE_UPDATE_PHASES:()=>t1t,NUMBER:()=>lh,NUMBER_ARRAY:()=>Gne,NUMBER_OR_NAN:()=>kF,OBJECT:()=>Vc,OBJECT_ARRAY:()=>wft,OR:()=>hb,OVERFLOW_STRATEGY:()=>_ki,PLACEMENT:()=>Eft,POLAR_AXIS_SHAPE:()=>a2t,POSITION:()=>Iwe,POSITIVE_NUMBER:()=>es,PolarAxis:()=>xF,PolarSeries:()=>gSe,PropertiesArray:()=>zne,ProxyOnWrite:()=>Rki,ProxyProperty:()=>Pki,ProxyPropertyOnWrite:()=>Uu,QUICK_TRANSITION:()=>Lwe,RATIO:()=>Bh,REGISTERED_MODULES:()=>xC,REMOVE_PHASE:()=>Zft,RepeatType:()=>Jft,SMALLEST_KEY_INTERVAL:()=>rwe,SORT_DOMAIN_GROUPS:()=>s0t,STRING:()=>Ps,STRING_ARRAY:()=>bft,Series:()=>OU,SeriesItemHighlightStyle:()=>vb,SeriesMarker:()=>$3,SeriesNodeClickEvent:()=>Qne,SeriesNodePickMode:()=>a0t,SeriesProperties:()=>LC,SeriesTooltip:()=>av,StateMachine:()=>IU,TEXT_ALIGN:()=>Tft,TEXT_WRAP:()=>Wne,Tags:()=>F1t,TooltipManager:()=>J7e,UNION:()=>Gm,UPDATE_PHASE:()=>Xft,UpdateService:()=>h0t,VERTICAL_ALIGN:()=>yki,Validate:()=>ut,ZoomManager:()=>X1t,__FORCE_MODULE_DETECTION:()=>sRi,accumulateGroup:()=>o0t,accumulatedValue:()=>n0t,accumulativeValueProperty:()=>u0t,adjustLabelPlacement:()=>J0t,animationValidation:()=>LU,area:()=>nwe,arraysEqual:()=>qW,assignJsonApplyConstructedArray:()=>Hft,average:()=>yAi,backfillPathPointData:()=>sSe,buildResetPathFn:()=>lSe,checkCrisp:()=>X0t,clamp:()=>ev,clampArray:()=>Sne,collapsedStartingBarPosition:()=>CU,count:()=>vAi,countFractionDigits:()=>Dwe,createDatumId:()=>SF,createDeprecationWarning:()=>Cwe,deconstructSelectionsOrNodes:()=>jne,deepMerge:()=>Q4,determinePathStatus:()=>G0t,diff:()=>FF,enterpriseModule:()=>Cne,extent:()=>EC,extractDecoratedProperties:()=>nki,fixNumericExtent:()=>Gg,fromToMotion:()=>Vm,getRectConfig:()=>Z0t,groupAccumulativeValueProperty:()=>Zw,groupAverage:()=>i0t,groupCount:()=>iwe,groupSum:()=>e0t,hasRegisteredEnterpriseModules:()=>Nne,injectStyle:()=>Rwe,invertShapeDirection:()=>iRi,isArray:()=>iv,isBoolean:()=>yft,isDate:()=>xwe,isDecoratedObject:()=>Vne,isDefined:()=>iU,isEqual:()=>Tne,isFiniteNumber:()=>wU,isFunction:()=>Bne,isHtmlElement:()=>_ft,isNegative:()=>SU,isNumber:()=>bC,isObject:()=>vM,isObjectLike:()=>uki,isPlainObject:()=>bF,isProperties:()=>H6,isReal:()=>Hne,isString:()=>mF,isValidDate:()=>bwe,keyProperty:()=>G3,listDecoratedProperties:()=>pF,markerFadeInAnimation:()=>wPi,markerPaletteFactory:()=>VU,markerScaleInAnimation:()=>iSe,markerSwipeScaleInAnimation:()=>nSe,mergeDefaults:()=>U3,midpointStartingBarPosition:()=>RPi,minMax:()=>cwe,mod:()=>Twe,normaliseGroupTo:()=>Pne,normalisePropertyTo:()=>swe,normalisedExtent:()=>gft,normalisedExtentWithMetadata:()=>bU,pairCategoryData:()=>_U,pairContinuousData:()=>yU,partialAssign:()=>fAi,pathFadeInAnimation:()=>z0t,pathFadeOutAnimation:()=>SPi,pathSwipeInAnimation:()=>aSe,predicateWithMessage:()=>cu,prepareAreaPathAnimation:()=>j0t,prepareAxisAnimationContext:()=>X7e,prepareAxisAnimationFunctions:()=>k1t,prepareBarAnimationFunctions:()=>xU,prepareLinePathAnimation:()=>W0t,prepareLinePathAnimationFns:()=>cSe,prepareMarkerAnimation:()=>rSe,range:()=>t0t,rangedValueProperty:()=>c0t,registerModule:()=>gC,registerModuleConflicts:()=>fft,renderPartialPath:()=>oSe,resetAxisGroupFn:()=>I1t,resetAxisLabelSelectionFn:()=>P1t,resetAxisLineSelectionFn:()=>R1t,resetAxisSelectionFn:()=>A1t,resetBarSelectionsFn:()=>uSe,resetIds:()=>Ift,resetLabelFn:()=>dS,resetMarkerFn:()=>BU,resetMarkerPositionFn:()=>vU,resetMotion:()=>x1,round:()=>wwe,seriesLabelFadeInAnimation:()=>cm,seriesLabelFadeOutAnimation:()=>lne,singleSeriesPaletteFactory:()=>Xwe,staticFromToMotion:()=>fb,stringify:()=>XW,sum:()=>gAi,toArray:()=>xne,toFixed:()=>Swe,toReal:()=>Dne,trailingAccumulatedValue:()=>r0t,trailingAccumulatedValueProperty:()=>TAi,trailingValue:()=>d0t,trailingValueProperty:()=>SAi,unique:()=>JMi,updateClipPath:()=>Lne,updateLabelNode:()=>Q0t,updateRect:()=>q0t,validateCrossLineValues:()=>b1t,valueProperty:()=>cp});nRi=(()=>{let t=class cne{constructor(n,i,r,s,o,a,l,c,d,u,m){this.series=n,this.index=i,this.datum=r,this.size=s,this.colorValue=o,this.fill=a,this.stroke=l,this.sumSize=c,this.depth=d,this.parent=u,this.children=m,this.midPoint={x:0,y:0}}contains(n){let i=n;for(;i!=null&&i.index>=this.index;){if(i===this)return!0;i=i.parent}return!1}walk(n,i=cne.Walk.PreOrder){i===cne.Walk.PreOrder&&n(this),this.children.forEach(r=>{r.walk(n,i)}),i===cne.Walk.PostOrder&&n(this)}*[Symbol.iterator](){yield this;for(let n of this.children)yield*VM(lMi(n))}};return t.Walk={PreOrder:0,PostOrder:1},t})(),dne=nRi,rRi=class extends OU{constructor(t){super({moduleCtx:t,pickModes:[0],contentGroupVirtual:!1}),this.rootNode=new dne(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.colorDomain=[0,0],this.maxDepth=0,this.animationState=new IU("empty",{empty:{update:{target:"ready",action:e=>this.animateEmptyUpdateReady(e)}},ready:{updateData:"waiting",clear:"clearing",highlight:e=>this.animateReadyHighlight(e),resize:e=>this.animateReadyResize(e)},waiting:{update:{target:"ready",action:e=>this.animateWaitingUpdateReady(e)}},clearing:{update:{target:"empty",action:e=>this.animateClearingUpdateEmpty(e)}}},()=>this.checkProcessedDataAnimatable())}hasData(){return Array.isArray(this.data)&&this.data.length>0}processData(){return mr(this,null,function*(){var t,e;let{childrenKey:n,sizeKey:i,colorKey:r,fills:s,strokes:o,colorRange:a}=this.properties,l=0,c=()=>(l+=1,l),d=0,u=1/0,m=-1/0,f=new Array(((e=(t=this.data)==null?void 0:t.length)!=null?e:0)+1).fill(void 0),_=(I,z)=>{let G=c(),A=z.depth!=null?z.depth+1:0,Y=n!=null?I[n]:void 0,X=Y==null||Y.length===0,ne=i!=null?I[i]:void 0;Number.isFinite(ne)?ne=Math.max(ne,0):ne=X?1:0;let pe=ne;d=Math.max(d,A);let ce=r!=null?I[r]:void 0;return typeof ce=="number"&&(f[G]=ce,u=Math.min(u,ce),m=Math.max(m,ce)),x(new dne(this,G,I,ne,ce,void 0,void 0,pe,A,z,[]),Y)},x=(I,z)=>(z?.forEach(G=>{let A=_(G,I);I.children.push(A),I.sumSize+=A.sumSize}),I),D=x(new dne(this,0,void 0,0,void 0,void 0,void 0,0,void 0,void 0,[]),this.data),E=[u,m],M;a!=null&&Number.isFinite(u)&&Number.isFinite(m)&&(M=new SM,M.domain=E,M.range=a,M.update()),D.children.forEach((I,z)=>{I.walk(G=>{let A,Y=f[G.index];Y!=null&&(A=M?.convert(Y)),A??(A=s?.[z%s.length]),G.fill=A,G.stroke=M==null?o?.[z%o.length]:"rgba(0, 0, 0, 0.2)"})}),this.rootNode=D,this.maxDepth=d,this.colorDomain=E})}update(t){return mr(this,arguments,function*({seriesRect:e}){yield this.updateSelections(),yield this.updateNodes();let n=this.getAnimationData();this.checkResize(e)&&this.animationState.transition("resize",n),this.animationState.transition("update",n)})}resetAllAnimation(t){var e;let n=(e=this.animationResetFns)==null?void 0:e.datum;this.ctx.animationManager.stopByAnimationGroupId(this.id),n!=null&&x1(t.datumSelections,n)}animateEmptyUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateWaitingUpdateReady(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animateReadyHighlight(t){var e;let n=(e=this.animationResetFns)==null?void 0:e.datum;n!=null&&x1([t],n)}animateReadyResize(t){this.resetAllAnimation(t)}animateClearingUpdateEmpty(t){this.ctx.animationManager.skipCurrentBatch(),this.resetAllAnimation(t)}animationTransitionClear(){this.animationState.transition("clear",this.getAnimationData())}getAnimationData(){return{datumSelections:[this.groupSelection]}}isProcessedDataAnimatable(){return!0}checkProcessedDataAnimatable(){this.isProcessedDataAnimatable()||this.ctx.animationManager.skipCurrentBatch()}getLabelData(){return[]}getSeriesDomain(){return[NaN,NaN]}getLegendData(t){let{colorKey:e,colorName:n,colorRange:i,visible:r}=this.properties;return t==="gradient"&&e!=null&&i!=null?[{legendType:"gradient",enabled:r,seriesId:this.id,colorName:n,colorRange:i,colorDomain:this.colorDomain}]:[]}getDatumIdFromData(t){return`${t.index}`}getDatumId(t){return this.getDatumIdFromData(t)}},uS=class extends LC{constructor(){super(...arguments),this.childrenKey="children",this.fills=Object.values(ab),this.strokes=Object.values(CF)}};Be([ut(Ps)],uS.prototype,"childrenKey",2);Be([ut(Ps,{optional:!0})],uS.prototype,"sizeKey",2);Be([ut(Ps,{optional:!0})],uS.prototype,"colorKey",2);Be([ut(Ps,{optional:!0})],uS.prototype,"colorName",2);Be([ut(mb)],uS.prototype,"fills",2);Be([ut(mb)],uS.prototype,"strokes",2);Be([ut(mb,{optional:!0})],uS.prototype,"colorRange",2);a2t=Gm(["polygon","circle"],"a polar axis shape"),xF=class extends Gwe{constructor(){super(...arguments),this.shape="polygon",this.innerRadiusRatio=0,this.defaultTickMinSpacing=20}computeLabelsBBox(t,e){return null}};Be([ut(a2t)],xF.prototype,"shape",2);Be([ut(Bh)],xF.prototype,"innerRadiusRatio",2);sRi=0,l2t={},c2t={},dwe={},d2t={},u2t={},h2t=new Set,p2t=new Set,m2t=new Set,f2t=new Set,uwe={},g2t={};xRi=(()=>{let t=class y2t extends ov{constructor(n,i){super(n,i),this._data={}}performLayout(){return mr(this,null,function*(){let n=yield ub(y2t.prototype,this,"performLayout").call(this),{seriesArea:{padding:i},seriesRoot:r}=this,s=n.clone();return n.shrink(i.left,"left"),n.shrink(i.top,"top"),n.shrink(i.right,"right"),n.shrink(i.bottom,"bottom"),this.seriesRect=n,this.animationRect=n,this.hoverRect=n,r.translationX=Math.floor(n.x),r.translationY=Math.floor(n.y),yield Promise.all(this.series.map(o=>mr(this,null,function*(){yield o.update({seriesRect:n})}))),r.visible=this.series[0].visible,r.setClipRectInGroupCoordinateSpace(new ml(n.x,n.y,n.width,n.height)),this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:!1,series:{rect:s,paddedRect:n,visible:!0},axes:[]}),n})}};return t.className="HierarchyChart",t.type="hierarchy",t})(),_2t=xRi;F7e="white",wRi={fills:Array.from(Object.values(ab)),strokes:Array.from(Object.values(CF))},mwe={get cartesian(){return{seriesTypes:W6.cartesianTypes,commonOptions:["zoom","navigator"]}},get polar(){return{seriesTypes:W6.polarTypes,commonOptions:[]}},get hierarchy(){return{seriesTypes:W6.hierarchyTypes,commonOptions:[]}}},SRi=Object.values(mwe).reduce((t,{commonOptions:e})=>[...t,...e],[]);z6=class lm{getPalette(){return wRi}static getAxisDefaults(){return{top:{},right:{},bottom:{},left:{},title:{enabled:!1,text:"Axis Title",spacing:25,fontStyle:void 0,fontWeight:DF.NORMAL,fontSize:Yw.MEDIUM,fontFamily:C1,color:W0},label:{fontStyle:void 0,fontWeight:void 0,fontSize:Yw.SMALL,fontFamily:C1,padding:5,rotation:void 0,color:W0,formatter:void 0,avoidCollisions:!0},line:{enabled:!0,width:1,color:ane},tick:{enabled:!1,width:1,color:ane},gridLine:{enabled:!0,style:[{stroke:Fne,lineDash:[]}]},crossLines:{enabled:!1,fill:JW,stroke:JW,fillOpacity:.1,strokeWidth:1,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:Yw.SMALL,fontFamily:C1,padding:5,color:W0}}}}static getSeriesDefaults(){return{tooltip:{enabled:!0,renderer:void 0},visible:!0,showInLegend:!0,highlightStyle:{item:{fill:"rgba(255,255,255, 0.33)",stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2},series:{dimOpacity:1},text:{color:"black"}},nodeClickRange:"exact"}}static getCartesianSeriesMarkerDefaults(){return{enabled:!0,shape:"circle",size:7,strokeWidth:1,formatter:void 0}}static getLegendItemMarkerDefaults(){return{shape:void 0,size:15,padding:8}}static getCaptionWrappingDefaults(){return"hyphenate"}static getChartDefaults(){return{background:{visible:!0,fill:gU},padding:{top:20,right:20,bottom:20,left:20},title:{enabled:!1,text:"Title",fontStyle:void 0,fontWeight:DF.NORMAL,fontSize:Yw.LARGE,fontFamily:C1,color:W0,wrapping:lm.getCaptionWrappingDefaults()},subtitle:{enabled:!1,text:"Subtitle",spacing:20,fontStyle:void 0,fontWeight:void 0,fontSize:Yw.MEDIUM,fontFamily:C1,color:_F,wrapping:lm.getCaptionWrappingDefaults()},footnote:{enabled:!1,text:"Footnote",spacing:20,fontStyle:void 0,fontWeight:void 0,fontSize:Yw.MEDIUM,fontFamily:C1,color:"rgb(140, 140, 140)",wrapping:lm.getCaptionWrappingDefaults()},legend:{position:Qwe,spacing:30,listeners:{},item:{paddingX:16,paddingY:8,marker:lm.getLegendItemMarkerDefaults(),label:{color:W0,fontStyle:void 0,fontWeight:void 0,fontSize:Yw.SMALL,fontFamily:C1,formatter:void 0}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:W0},inactiveStyle:{fill:_F},highlightStyle:{fill:W0},label:{color:W0}}},tooltip:{enabled:!0,range:"nearest",delay:0},listeners:{}}}constructor(e){var n;e=Q4({},e??{});let{overrides:i=null,palette:r=null}=e,s=this.createChartConfigPerChartType(this.getDefaults());if(i){let{common:a}=i,l=(c,d)=>{if(d)for(let u of c){let m=u;s[m]=Q4(s[m],d)}};for(let[,{seriesTypes:c,commonOptions:d}]of Object.entries(mwe)){let u=Ai({},a);for(let m of SRi)d.includes(m)||delete u[m];l(c,u)}W6.seriesTypes.forEach(c=>{let d=c;i[d]&&(s[d]=Q4(s[d],i[d]))})}let o=this.getPalette();this.palette=(n=C2t(r,o))!=null?n:o,this.config=Object.freeze(this.templateTheme(s))}createChartConfigPerChartType(e){return Object.entries(mwe).forEach(([n,{seriesTypes:i}])=>{let r=Umt(n);i.forEach(s=>{let o=s;e[o]||(e[o]={},Q4(e[o],r))})}),e}getDefaults(){let e={},n=r=>Ai(Ai(Ai({},XAi()),lm.getChartDefaults()),Umt(r)),i=(r,s)=>{var o,a,l,c;let d=n(r),u={};for(let m of s){(o=u[m])!=null||(u[m]=Q4({},d));let f=(l=(a=u[m]).axes)!=null?l:a.axes={},_=lRi(m);_&&(u[m].series=Q4(u[m].series,_));for(let x of Ywe.axesTypes){let D=GAi(x);r==="cartesian"&&(f[x]=Q4(f[x],(c=lm.cartesianAxisDefault[x])!=null?c:{})),D&&(f[x]=Q4(f[x],D))}}return u};return e=Q4(e,i("cartesian",W6.cartesianTypes)),e=Q4(e,i("polar",W6.polarTypes)),e=Q4(e,i("hierarchy",W6.hierarchyTypes)),e}templateTheme(e){let n=nU(e),{extensions:i,properties:r}=this.getTemplateParameters();return yM(n,s=>{if(s.__extends__){let o=s.__extends__,a=i.get(o);if(a==null)throw new Error(`AG Charts - no template variable provided for: ${o}`);Object.keys(a).forEach(l=>{l in s||(s[l]=a[l])}),delete s.__extends__}if(s.__overrides__){let o=s.__overrides__,a=i.get(o);if(a==null)throw new Error(`AG Charts - no template variable provided for: ${o}`);Object.assign(s,a),delete s.__overrides__}if(Array.isArray(s))for(let o=0;o<s.length;o++){let a=s[o];r.has(a)&&(s[o]=r.get(a))}else for(let[o,a]of Object.entries(s))r.has(a)&&(s[o]=r.get(a))}),n}static getWaterfallSeriesDefaultPositiveColors(){return{fill:ab.BLUE,stroke:CF.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:ab.ORANGE,stroke:CF.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:ab.GRAY,stroke:CF.GRAY}}getTemplateParameters(){let e=new Map;e.set(E0t,lm.getChartDefaults()),e.set(A0t,lm.getAxisDefaults()),e.set(M0t,lm.getChartDefaults().legend),e.set(k0t,lm.getChartDefaults().legend.item),e.set(I0t,lm.getLegendItemMarkerDefaults()),e.set(P0t,lm.getAxisDefaults().label),e.set(R0t,lm.getAxisDefaults().line),e.set(F0t,lm.getAxisDefaults().tick),e.set(L0t,lm.getAxisDefaults().gridLine),e.set(yb,lm.getSeriesDefaults()),e.set(O0t,{}),e.set(NF,lm.getCartesianSeriesMarkerDefaults());let n=new Map;return n.set(C1,"Verdana, sans-serif"),n.set(W0,"rgb(70, 70, 70)"),n.set(N0t,"white"),n.set(_F,"rgb(140, 140, 140)"),n.set(Fne,"rgb(224,234,241)"),n.set(ane,"rgb(195, 195, 195)"),n.set(JW,"rgb(70, 70, 70)"),n.set(VF,F7e),n.set(gU,F7e),n.set(BF,"rgba(0, 0, 0, 0.5)"),n.set(D_,[ab.ORANGE,ab.YELLOW,ab.GREEN]),n.set(eSe,["#ffffff","#e0e5ea","#c1ccd5","#a3b4c1","#859cad"]),n.set(tSe,["#ffffff","#c5cbd1","#a4b1bd","#8498a9","#648096"]),n.set(Jwe,F7e),n.set(b_,lm.getWaterfallSeriesDefaultPositiveColors()),n.set(w_,lm.getWaterfallSeriesDefaultNegativeColors()),n.set(S_,lm.getWaterfallSeriesDefaultTotalColors()),n.set(T_,lm.getWaterfallSeriesDefaultTotalColors().stroke),{extensions:e,properties:n}}};z6.cartesianAxisDefault={number:cs(Ai({},z6.getAxisDefaults()),{line:cs(Ai({},z6.getAxisDefaults().line),{enabled:!1})}),log:cs(Ai({},z6.getAxisDefaults()),{base:10,line:cs(Ai({},z6.getAxisDefaults().line),{enabled:!1})}),category:cs(Ai({},z6.getAxisDefaults()),{groupPaddingInner:.1,label:cs(Ai({},z6.getAxisDefaults().label),{autoRotate:!0}),gridLine:cs(Ai({},z6.getAxisDefaults().gridLine),{enabled:!1})}),"grouped-category":Ai({},z6.getAxisDefaults()),time:cs(Ai({},z6.getAxisDefaults()),{gridLine:cs(Ai({},z6.getAxisDefaults().gridLine),{enabled:!1})})};_b=z6;L7e="#192232",aM={BLUE:"#5090dc",ORANGE:"#ffa03a",GREEN:"#459d55",CYAN:"#34bfe1",YELLOW:"#e1cc00",VIOLET:"#9669cb",GRAY:"#b5b5b5",MAGENTA:"#bd5aa7",BROWN:"#8a6224",RED:"#ef5452"},hne={BLUE:"#74a8e6",ORANGE:"#ffbe70",GREEN:"#6cb176",CYAN:"#75d4ef",YELLOW:"#f6e559",VIOLET:"#aa86d8",GRAY:"#a1a1a1",MAGENTA:"#ce7ab9",BROWN:"#997b52",RED:"#ff7872"},ERi={fills:Array.from(Object.values(aM)),strokes:Array.from(Object.values(hne))},zU=class NW extends _b{static getWaterfallSeriesDefaultPositiveColors(){return{fill:aM.BLUE,stroke:hne.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:aM.ORANGE,stroke:hne.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:aM.GRAY,stroke:hne.GRAY}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,NW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,NW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,NW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(T_,NW.getWaterfallSeriesDefaultTotalColors().stroke),e.properties.set(Jwe,L7e),e.properties.set(W0,"white"),e.properties.set(_F,"#7D91A0"),e.properties.set(Fne,"#545A6E"),e.properties.set(JW,"white"),e.properties.set(D_,[aM.ORANGE,aM.YELLOW,aM.GREEN]),e.properties.set(eSe,["#192834","#253746","#324859","#3f596c","#4d6a80"]),e.properties.set(tSe,["#192834","#3b5164","#496275","#577287","#668399"]),e.properties.set(gU,L7e),e.properties.set(VF,L7e),e}getPalette(){return ERi}constructor(e){super(e)}},lM={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},pne={BLUE:"#90CAF9",ORANGE:"#FFCC80",GREEN:"#A5D6A7",CYAN:"#80DEEA",YELLOW:"#FFF9C4",VIOLET:"#B39DDB",GRAY:"#E0E0E0",MAGENTA:"#F48FB1",BROWN:"#A1887F",RED:"#EF9A9A"},MRi={fills:Array.from(Object.values(lM)),strokes:Array.from(Object.values(pne))},kRi=class VW extends zU{static getWaterfallSeriesDefaultPositiveColors(){return{fill:lM.BLUE,stroke:pne.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:lM.RED,stroke:pne.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:lM.GRAY,stroke:pne.GRAY}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,VW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,VW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,VW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(D_,[lM.ORANGE,lM.YELLOW,lM.GREEN]),e.properties.set(T_,VW.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return MRi}},cM={BLUE:"#2196F3",ORANGE:"#FF9800",GREEN:"#4CAF50",CYAN:"#00BCD4",YELLOW:"#FFEB3B",VIOLET:"#7E57C2",GRAY:"#9E9E9E",MAGENTA:"#F06292",BROWN:"#795548",RED:"#F44336"},mne={BLUE:"#1565C0",ORANGE:"#E65100",GREEN:"#2E7D32",CYAN:"#00838F",YELLOW:"#F9A825",VIOLET:"#4527A0",GRAY:"#616161",MAGENTA:"#C2185B",BROWN:"#4E342E",RED:"#B71C1C"},IRi={fills:Array.from(Object.values(cM)),strokes:Array.from(Object.values(mne))},ARi=class BW extends _b{static getWaterfallSeriesDefaultPositiveColors(){return{fill:cM.BLUE,stroke:mne.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:cM.RED,stroke:mne.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:cM.GRAY,stroke:mne.GRAY}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,BW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,BW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,BW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(D_,[cM.ORANGE,cM.YELLOW,cM.GREEN]),e.properties.set(T_,BW.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return IRi}},zW={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},fwe={BLUE:"#6698ff",PURPLE:"#c0a3ff",MAGENTA:"#fc8dfc",PINK:"#ff82b1",RED:"#ff9b70",ORANGE:"#ffcf4e",YELLOW:"#ffff58",GREEN:"#58dd70",CYAN:"#51e2c9",MODERATE_BLUE:"#4fd7ff"},PRi="#bbbbbb",RRi="#eeeeee",FRi={fills:Array.from(Object.values(zW)),strokes:Array.from(Object.values(fwe))},LRi=class HW extends zU{static getWaterfallSeriesDefaultPositiveColors(){return{fill:zW.BLUE,stroke:fwe.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:zW.RED,stroke:fwe.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:PRi,stroke:RRi}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,HW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,HW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,HW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(D_,[zW.BLUE,zW.RED]),e.properties.set(T_,HW.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return FRi}},GW={BLUE:"#436ff4",PURPLE:"#9a7bff",MAGENTA:"#d165d2",PINK:"#f0598b",RED:"#f47348",ORANGE:"#f2a602",YELLOW:"#e9e201",GREEN:"#21b448",CYAN:"#00b9a2",MODERATE_BLUE:"#00aee4"},gwe={BLUE:"#2346c9",PURPLE:"#7653d4",MAGENTA:"#a73da9",PINK:"#c32d66",RED:"#c84b1c",ORANGE:"#c87f00",YELLOW:"#c1b900",GREEN:"#008c1c",CYAN:"#00927c",MODERATE_BLUE:"#0087bb"},ORi="#bbbbbb",NRi="#888888",VRi={fills:Array.from(Object.values(GW)),strokes:Array.from(Object.values(gwe))},BRi=class WW extends _b{static getWaterfallSeriesDefaultPositiveColors(){return{fill:GW.BLUE,stroke:gwe.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:GW.RED,stroke:gwe.RED}}static getWaterfallSeriesDefaultTotalColors(){return{fill:ORi,stroke:NRi}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,WW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,WW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,WW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(D_,[GW.BLUE,GW.RED]),e.properties.set(T_,WW.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return VRi}},dM={BLUE:"#4472C4",ORANGE:"#ED7D31",GRAY:"#A5A5A5",YELLOW:"#FFC000",MODERATE_BLUE:"#5B9BD5",GREEN:"#70AD47",DARK_GRAY:"#7B7B7B",DARK_BLUE:"#264478",VERY_DARK_GRAY:"#636363",DARK_YELLOW:"#997300"},fne={BLUE:"#6899ee",ORANGE:"#ffa55d",GRAY:"#cdcdcd",YELLOW:"#ffea53",MODERATE_BLUE:"#82c3ff",GREEN:"#96d56f",DARK_GRAY:"#a1a1a1",DARK_BLUE:"#47689f",VERY_DARK_GRAY:"#878787",DARK_YELLOW:"#c0993d"},zRi={fills:Array.from(Object.values(dM)),strokes:Array.from(Object.values(fne))},HRi=class UW extends zU{static getWaterfallSeriesDefaultPositiveColors(){return{fill:dM.BLUE,stroke:fne.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:dM.ORANGE,stroke:fne.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:dM.GRAY,stroke:fne.GRAY}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,UW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,UW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,UW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(D_,[dM.ORANGE,dM.YELLOW,dM.GREEN]),e.properties.set(T_,UW.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return zRi}},uM={BLUE:"#5281d5",ORANGE:"#ff8d44",GRAY:"#b5b5b5",YELLOW:"#ffd02f",MODERATE_BLUE:"#6aabe6",GREEN:"#7fbd57",DARK_GRAY:"#8a8a8a",DARK_BLUE:"#335287",VERY_DARK_GRAY:"#717171",DARK_YELLOW:"#a98220"},gne={BLUE:"#214d9b",ORANGE:"#c25600",GRAY:"#7f7f7f",YELLOW:"#d59800",MODERATE_BLUE:"#3575ac",GREEN:"#4b861a",DARK_GRAY:"#575757",DARK_BLUE:"#062253",VERY_DARK_GRAY:"#414141",DARK_YELLOW:"#734f00"},GRi={fills:Array.from(Object.values(uM)),strokes:Array.from(Object.values(gne))},WRi=class jW extends _b{static getWaterfallSeriesDefaultPositiveColors(){return{fill:uM.BLUE,stroke:gne.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:uM.ORANGE,stroke:gne.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:uM.GRAY,stroke:gne.GRAY}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,jW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,jW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,jW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(D_,[uM.ORANGE,uM.YELLOW,uM.GREEN]),e.properties.set(T_,jW.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return GRi}},hM={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},vne={BLUE:"#67b7ff",ORANGE:"#ffc24d",GREEN:"#5cc86f",CYAN:"#54ebff",VIOLET:"#c18aff",YELLOW:"#fff653",GRAY:"#aeaeae",MAGENTA:"#f078d4",BROWN:"#ba8438",RED:"#ff726e"},URi={fills:Array.from(Object.values(hM)),strokes:Array.from(Object.values(vne))},jRi=class $W extends zU{static getWaterfallSeriesDefaultPositiveColors(){return{fill:hM.BLUE,stroke:vne.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:hM.ORANGE,stroke:vne.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:hM.GRAY,stroke:vne.GRAY}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,$W.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,$W.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,$W.getWaterfallSeriesDefaultTotalColors()),e.properties.set(D_,[hM.ORANGE,hM.YELLOW,hM.GREEN]),e.properties.set(T_,$W.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return URi}},pM={BLUE:"#0083ff",ORANGE:"#ff6600",GREEN:"#00af00",CYAN:"#00ccff",YELLOW:"#f7c700",VIOLET:"#ac26ff",GRAY:"#a7a7b7",MAGENTA:"#e800c5",BROWN:"#b54300",RED:"#ff0000"},yne={BLUE:"#0f68c0",ORANGE:"#d47100",GREEN:"#007922",CYAN:"#009ac2",VIOLET:"#bca400",YELLOW:"#753cac",GRAY:"#646464",MAGENTA:"#9b2685",BROWN:"#6c3b00",RED:"#cb0021"},$Ri={fills:Array.from(Object.values(pM)),strokes:Array.from(Object.values(yne))},KRi=class KW extends _b{static getWaterfallSeriesDefaultPositiveColors(){return{fill:pM.BLUE,stroke:yne.BLUE}}static getWaterfallSeriesDefaultNegativeColors(){return{fill:pM.ORANGE,stroke:yne.ORANGE}}static getWaterfallSeriesDefaultTotalColors(){return{fill:pM.GRAY,stroke:yne.GRAY}}getTemplateParameters(){let e=super.getTemplateParameters();return e.properties.set(b_,KW.getWaterfallSeriesDefaultPositiveColors()),e.properties.set(w_,KW.getWaterfallSeriesDefaultNegativeColors()),e.properties.set(S_,KW.getWaterfallSeriesDefaultTotalColors()),e.properties.set(D_,[pM.ORANGE,pM.YELLOW,pM.GREEN]),e.properties.set(T_,KW.getWaterfallSeriesDefaultTotalColors().stroke),e}getPalette(){return $Ri}},eU=()=>new _b,O7e=()=>new zU,YRi={undefined:eU,null:eU,"ag-default":eU,"ag-sheets":()=>new WRi,"ag-polychroma":()=>new BRi,"ag-vivid":()=>new KRi,"ag-material":()=>new ARi},qRi={undefined:O7e,null:O7e,"ag-default-dark":O7e,"ag-sheets-dark":()=>new HRi,"ag-polychroma-dark":()=>new LRi,"ag-vivid-dark":()=>new jRi,"ag-material-dark":()=>new kRi},x2t=Ai(Ai({},qRi),YRi);CM={avoidDeepClone:["data"]};pFi=["top","right","bottom","left"],b2t=["category","grouped-category","number","log","time"];vFi=class{constructor(){this.result=[],this.valid=[],this.invalid=[]}push(t,e){let{result:n,valid:i,invalid:r}=this;fFi(e)&&(gFi(e.position)?i.push(t):r.push(t)),n.push(t)}guessInvalidPositions(){let t=this.valid.filter(n=>mFi(n)).map(n=>n.position).filter(n=>n!==void 0),e=["top","right","bottom","left"];for(let n of this.invalid){let i=e.pop();for(;t.includes(i)&&i!==void 0;)i=e.pop();if(i===void 0)break;n.position=i}return this.result}},yFi=(()=>{let t=class w2t extends ov{constructor(n,i){super(n,i),this.padding=new oS(40),this.axisGroup.zIndex=5}performLayout(){return mr(this,null,function*(){let n=yield ub(w2t.prototype,this,"performLayout").call(this),i=n.clone();return this.computeSeriesRect(n),yield this.computeCircle(n),this.axes.forEach(r=>r.update()),this.hoverRect=n,this.layoutService.dispatchLayoutComplete({type:"layout-complete",chart:{width:this.scene.width,height:this.scene.height},clipSeries:!1,series:{rect:i,paddedRect:n,visible:!0},axes:[]}),n})}updateAxes(n,i,r){var s,o;let a=this.axes.find(m=>m.direction==="x"),l=this.axes.find(m=>m.direction==="y");if(!(a instanceof xF)||!(l instanceof xF))return;let c=a.scale,d=(s=c.ticks)==null?void 0:s.call(c).map(m=>c.convert(m)),u=l.innerRadiusRatio;a.innerRadiusRatio=u,(o=a.computeRange)==null||o.call(a),a.gridLength=r,l.gridAngles=d,l.gridRange=a.range,l.range=[r,r*u],[a,l].forEach(m=>{m.translation.x=n,m.translation.y=i,m.calculateLayout()})}computeSeriesRect(n){let{seriesArea:{padding:i}}=this;n.shrink(i.left,"left"),n.shrink(i.top,"top"),n.shrink(i.right,"right"),n.shrink(i.bottom,"bottom"),this.seriesRect=n,this.animationRect=n}computeCircle(n){return mr(this,null,function*(){let i=this.series.filter(u=>u instanceof gSe),r=this.axes.filter(u=>u instanceof xF),s=(u,m,f)=>{this.updateAxes(u,m,f),i.forEach(x=>{x.centerX=u,x.centerY=m,x.radius=f});let _=i.filter(x=>x instanceof o2t);if(_.length>1){let x=_.map(D=>{let E=D.getInnerRadius();return{series:D,innerRadius:E}}).sort((D,E)=>D.innerRadius-E.innerRadius);x[x.length-1].series.surroundingRadius=void 0;for(let D=0;D<x.length-1;D++)x[D].series.surroundingRadius=x[D+1].innerRadius}},o=n.x+n.width/2,a=n.y+n.height/2,l=Math.max(0,Math.min(n.width,n.height)/2),c=l;s(o,a,c);let d=(...u)=>mr(this,[...u],function*({hideWhenNecessary:m=!1}={}){let f=[];for(let D of[...r,...i]){let E=yield D.computeLabelsBBox({hideWhenNecessary:m},n);E&&f.push(E)}if(f.length===0){s(o,a,l);return}let _=ml.merge(f),x=this.refineCircle(_,c,n);s(x.centerX,x.centerY,x.radius),x.radius!==c&&(c=x.radius)});return yield d(),yield d(),yield d(),yield d({hideWhenNecessary:!0}),yield d({hideWhenNecessary:!0}),{radius:c,centerX:o,centerY:a}})}refineCircle(n,i,r){let o=-i,a=-i,l=i,c=i,d=Math.max(0,o-n.x),u=Math.max(0,a-n.y),m=Math.max(0,n.x+n.width-l),f=Math.max(0,n.y+n.height-c);d=m=Math.max(d,m),u=f=Math.max(u,f);let _=r.width-d-m,x=r.height-u-f,D=Math.min(_,x)/2,E=.5*r.width/2,M=.5*r.height/2,I=Math.min(E,M);if(D<I){D=I;let A=d+m,Y=u+f;if(2*D+Y>r.height){let X=r.height-2*D;Math.min(u,f)*2>X?(u=X/2,f=X/2):u>f?u=X-f:f=X-u}if(2*D+A>r.width){let X=r.width-2*D;Math.min(d,m)*2>X?(d=X/2,m=X/2):d>m?d=X-m:m=X-d}}let z=d+2*D+m,G=u+2*D+f;return{centerX:r.x+(r.width-z)/2+d+D,centerY:r.y+(r.height-G)/2+u+D,radius:D}}};return t.className="PolarChart",t.type="polar",t})(),S2t=yFi,Qw=Nm.create(!0,"opts");_Fi=(()=>{let t=class YW{static licenseCheck(n){var i,r,s,o;this.licenseChecked||(this.licenseManager=(r=(i=Cne).licenseManager)==null?void 0:r.call(i,n),(s=this.licenseManager)==null||s.setLicenseKey(this.licenseKey),(o=this.licenseManager)==null||o.validateLicense(),this.licenseChecked=!0)}static setLicenseKey(n){this.licenseKey=n}static getInstance(n){return dF.getInstance(n)}static create(n){var i,r,s,o;this.licenseCheck(n);let a=dF.createOrUpdate(n);return(i=this.licenseManager)!=null&&i.isDisplayWatermark()&&((o=(s=Cne).injectWatermark)==null||o.call(s,(r=n.document)!=null?r:document,a.chart.element,this.licenseManager.getWatermarkMessage())),a}static update(n,i){if(!OW.isInstance(n))throw new Error(YW.INVALID_CHART_REF_MESSAGE);dF.createOrUpdate(i,n)}static updateDelta(n,i){if(!OW.isInstance(n))throw new Error(YW.INVALID_CHART_REF_MESSAGE);dF.updateUserDelta(n,i)}static download(n,i){if(!(n instanceof OW))throw new Error(YW.INVALID_CHART_REF_MESSAGE);dF.download(n,i)}static getImageDataURL(n,i){if(!(n instanceof OW))throw new Error(YW.INVALID_CHART_REF_MESSAGE);return dF.getImageDataURL(n,i)}};return t.INVALID_CHART_REF_MESSAGE="AG Charts - invalid chart reference passed",t.licenseChecked=!1,t})(),ySe=_Fi,N7e=new WeakMap,CFi=(()=>{let t=class yC{static getInstance(n){let i=ov.getInstance(n);return i!=null?N7e.get(i):void 0}static initialiseModules(){yC.initialised||(eRi(),CRi(),yC.initialised=!0)}static createOrUpdate(n,i){var r;yC.initialiseModules(),Qw(">>> AgChartV2.createOrUpdate() user options",n);let s=n,{overrideDevicePixelRatio:o,document:a,window:l}=s,c=W3(s,["overrideDevicePixelRatio","document","window"]),d={overrideDevicePixelRatio:o,document:a,window:l},u=JRi(c),m=i?.chart;m!=null&&N7e.delete(m),(m==null||tft(c)!==tft(m.processedOptions))&&(m=yC.createChartInstance(u,d,m)),i==null?i=new OW(m):i.chart=m,N7e.set(m,i),Nm.check()&&typeof window<"u"&&((r=window.agChartInstances)!=null||(window.agChartInstances={}),window.agChartInstances[m.id]=m);let f=m;f.queuedUserOptions.push(c);let _=()=>{let x=f.queuedUserOptions.indexOf(c);f.queuedUserOptions.splice(0,x)};return f.requestFactoryUpdate(()=>mr(this,null,function*(){if(f.destroyed)return;let x=SC(f.processedOptions,u);if(x==null){_();return}yield yC.updateDelta(f,x,c),_()})),i}static updateUserDelta(n,i){var r;let{chart:s,chart:{queuedUserOptions:o}}=n,a=(r=o[o.length-1])!=null?r:s.userOptions,l=zm([a,i]);Qw(">>> AgChartV2.updateUserDelta() user delta",i),Qw("AgChartV2.updateUserDelta() - base options",a),yC.createOrUpdate(l,n)}static download(n,i){mr(this,null,function*(){let s=yield yC.prepareResizedChart(n,i),{chart:o}=s;o.scene.download(i?.fileName,i?.fileFormat),s!==n&&s.destroy()}).catch(s=>Ns.errorOnce(s))}static getImageDataURL(n,i){return mr(this,null,function*(){let r=yield yC.prepareResizedChart(n,i),{chart:s}=r,o=s.scene.canvas.getDataURL(i?.fileFormat);return r!==n&&r.destroy(),o})}static prepareResizedChart(n,i){return mr(this,null,function*(){var r;let{chart:s}=n,{width:o,height:a}=i??{},l=s.width,c=s.height;if(o===void 0&&a===void 0||s.scene.canvas.pixelRatio===1&&l===o&&c===a)return n;o??(o=l),a??(a=c);let u=cs(Ai({},s.userOptions),{container:document.createElement("div"),width:o,height:a,autoSize:!1,overrideDevicePixelRatio:1});Nne()&&((r=u.animation)!=null||(u.animation={}),u.animation.enabled=!1);let m=yC.createOrUpdate(u);return yield m.chart.waitForUpdate(),m})}static createChartInstance(n,i,r){let s=r?.destroy({keepTransferableResources:!0});if(OF(n))return new g0t(i,s);if(ire(n))return new _2t(i,s);if(nre(n))return new S2t(i,s);throw new Error("AG Charts - couldn't apply configuration, check options are correctly structured and series types are specified")}static updateDelta(n,i,r){return mr(this,null,function*(){var s;i.type==null&&(i=cs(Ai({},i),{type:(s=n.processedOptions.type)!=null?s:EM(i)})),!n.destroyed&&(Qw("AgChartV2.updateDelta() - applying delta",i),xFi(n,i,r))})}};return t.initialised=!1,t})(),dF=CFi;kFi={};db(kFi,{BOTTOM:()=>Qwe,CARTESIAN_AXIS_POSITIONS:()=>v_,CARTESIAN_AXIS_TYPES:()=>y_,CIRCLE:()=>mPi,ChartTheme:()=>_b,DEFAULT_AXIS_GRID_COLOUR:()=>Fne,DEFAULT_AXIS_LINE_COLOUR:()=>ane,DEFAULT_BACKGROUND_COLOUR:()=>gU,DEFAULT_CROSS_LINES_COLOUR:()=>JW,DEFAULT_DIVERGING_SERIES_COLOUR_RANGE:()=>D_,DEFAULT_FONT_FAMILY:()=>C1,DEFAULT_HIERARCHY_FILLS:()=>eSe,DEFAULT_HIERARCHY_STROKES:()=>tSe,DEFAULT_INSIDE_SERIES_LABEL_COLOUR:()=>VF,DEFAULT_INVERTED_LABEL_COLOUR:()=>N0t,DEFAULT_LABEL_COLOUR:()=>W0,DEFAULT_MUTED_LABEL_COLOUR:()=>_F,DEFAULT_POLAR_SERIES_STROKE:()=>Jwe,DEFAULT_SHADOW_COLOUR:()=>BF,DEFAULT_WATERFALL_SERIES_CONNECTOR_LINE_STROKE:()=>T_,DEFAULT_WATERFALL_SERIES_NEGATIVE_COLOURS:()=>w_,DEFAULT_WATERFALL_SERIES_POSITIVE_COLOURS:()=>b_,DEFAULT_WATERFALL_SERIES_TOTAL_COLOURS:()=>S_,EXTENDS_AXES_DEFAULTS:()=>A0t,EXTENDS_AXES_GRID_LINE_DEFAULTS:()=>L0t,EXTENDS_AXES_LABEL_DEFAULTS:()=>P0t,EXTENDS_AXES_LINE_DEFAULTS:()=>R0t,EXTENDS_AXES_TICK_DEFAULTS:()=>F0t,EXTENDS_CARTESIAN_MARKER_DEFAULTS:()=>NF,EXTENDS_CHART_DEFAULTS:()=>E0t,EXTENDS_LEGEND_DEFAULTS:()=>M0t,EXTENDS_LEGEND_ITEM_DEFAULTS:()=>k0t,EXTENDS_LEGEND_ITEM_MARKER_DEFAULTS:()=>I0t,EXTENDS_SERIES_DEFAULTS:()=>yb,FONT_SIZE:()=>Yw,FONT_WEIGHT:()=>DF,OVERRIDE_SERIES_LABEL_DEFAULTS:()=>O0t,POLAR_AXIS_TYPES:()=>pPi,getChartTheme:()=>vSe,themes:()=>IFi});IFi=Object.entries(x2t).reduce((t,[e,n])=>(t[e]=n(),t),{}),AFi={};db(AFi,{BandScale:()=>TC,ColorScale:()=>SM,ContinuousScale:()=>lu,Invalidating:()=>j3,LinearScale:()=>gM,TimeScale:()=>Hwe})});var M2t,sre,ore=Q(()=>{me();me();E2t();M2t=(()=>{class t{constructor(n){this._initialised=!1,this.options={},this.onChartReady=new nt,this._nativeElement=n.nativeElement}ngAfterViewInit(){let n=this.applyContainerIfNotSet(this.options);this.chart=ySe.create(n),this._initialised=!0,this.chart.chart.waitForUpdate().then(()=>{this.onChartReady.emit(this.chart)})}ngOnChanges(n){!this._initialised||!this.chart||ySe.update(this.chart,this.applyContainerIfNotSet(this.options))}ngOnDestroy(){this._initialised&&this.chart&&(this.chart.destroy(),this.chart=void 0,this._initialised=!1)}applyContainerIfNotSet(n){return n.container?n:St(ve({},n),{container:this._nativeElement})}}return t.\u0275fac=function(n){return new(n||t)(R(fi))},t.\u0275cmp=_e({type:t,selectors:[["ag-charts-angular"]],inputs:{options:"options"},outputs:{onChartReady:"onChartReady"},features:[yn],decls:0,vars:0,template:function(n,i){},encapsulation:2}),t})(),sre=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=en({type:t}),t.\u0275inj=Ji({}),t})()});function FFi(t,e){t&1&&Ln(0)}var RFi,CSe,xSe,LFi,Cb,bSe,are,lre,k2t,I2t=Q(()=>{Xh();Th();Th();Zg();me();me();Wc();$n();Cl();RFi=["*"];CSe=(()=>{let e=class e{constructor(i){this._elementRef=i}focus(){this._elementRef.nativeElement.focus()}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"],standalone:!0});let t=e;return t})(),xSe=(()=>{let e=class e{constructor(i){this.template=i}};e.\u0275fac=function(r){return new(r||e)(R(Ma))},e.\u0275dir=mi({type:e,selectors:[["","cdkStepLabel",""]],standalone:!0});let t=e;return t})(),LFi=0,Cb={NUMBER:"number",EDIT:"edit",DONE:"done",ERROR:"error"},bSe=new Ri("STEPPER_GLOBAL_OPTIONS"),are=(()=>{let e=class e{get completed(){return this._completedOverride==null?this._getDefaultCompleted():this._completedOverride}set completed(i){this._completedOverride=i}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return this._customError==null?this._getDefaultError():this._customError}set hasError(i){this._customError=i}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(i,r){this._stepper=i,this.interacted=!1,this.interactedStream=new nt,this.editable=!0,this.optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=r||{},this._displayDefaultIndicatorType=this._stepperOptions.displayDefaultIndicatorType!==!1}select(){this._stepper.selected=this}reset(){this.interacted=!1,this._completedOverride!=null&&(this._completedOverride=!1),this._customError!=null&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??this._customError!=null}};e.\u0275fac=function(r){return new(r||e)(R(_c(()=>lre)),R(bSe,8))},e.\u0275cmp=_e({type:e,selectors:[["cdk-step"]],contentQueries:function(r,s,o){if(r&1&&_o(o,xSe,5),r&2){let a;Pt(a=Rt())&&(s.stepLabel=a.first)}},viewQuery:function(r,s){if(r&1&&ei(Ma,7),r&2){let o;Pt(o=Rt())&&(s.content=o.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],state:"state",editable:[2,"editable","editable",mn],optional:[2,"optional","optional",mn],completed:[2,"completed","completed",mn],hasError:[2,"hasError","hasError",mn]},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],standalone:!0,features:[Bs,yn,xe],ngContentSelectors:RFi,decls:1,vars:0,template:function(r,s){r&1&&(gr(),W(0,FFi,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let t=e;return t})(),lre=(()=>{let e=class e{get selectedIndex(){return this._selectedIndex}set selectedIndex(i){this.steps&&this._steps?(this._isValidIndex(i),this.selected?._markAsInteracted(),this._selectedIndex!==i&&!this._anyControlsInvalidOrPending(i)&&(i>=this._selectedIndex||this.steps.toArray()[i].editable)&&this._updateSelectedItemIndex(i)):this._selectedIndex=i}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(i){this.selectedIndex=i&&this.steps?this.steps.toArray().indexOf(i):-1}get orientation(){return this._orientation}set orientation(i){this._orientation=i,this._keyManager&&this._keyManager.withVerticalOrientation(i==="vertical")}constructor(i,r,s){this._dir=i,this._changeDetectorRef=r,this._elementRef=s,this._destroyed=new Mi,this.steps=new o4,this._sortedHeaders=new o4,this.linear=!1,this._selectedIndex=0,this.selectionChange=new nt,this.selectedIndexChange=new nt,this._orientation="horizontal",this._groupId=LFi++}ngAfterContentInit(){this._steps.changes.pipe(ll(this._steps),Mr(this._destroyed)).subscribe(i=>{this.steps.reset(i.filter(r=>r._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe(ll(this._stepHeader),Mr(this._destroyed)).subscribe(i=>{this._sortedHeaders.reset(i.toArray().sort((r,s)=>r._elementRef.nativeElement.compareDocumentPosition(s._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new Ib(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation(this._orientation==="vertical"),(this._dir?this._dir.change:Fr()).pipe(ll(this._layoutDirection()),Mr(this._destroyed)).subscribe(i=>this._keyManager.withHorizontalOrientation(i)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(i=>i.reset()),this._stateChanged()}_getStepLabelId(i){return`cdk-step-label-${this._groupId}-${i}`}_getStepContentId(i){return`cdk-step-content-${this._groupId}-${i}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(i){let r=i-this._selectedIndex;return r<0?this._layoutDirection()==="rtl"?"next":"previous":r>0?this._layoutDirection()==="rtl"?"previous":"next":"current"}_getIndicatorType(i,r=Cb.NUMBER){let s=this.steps.toArray()[i],o=this._isCurrentStep(i);return s._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(s,o):this._getGuidelineLogic(s,o,r)}_getDefaultIndicatorLogic(i,r){return i._showError()&&i.hasError&&!r?Cb.ERROR:!i.completed||r?Cb.NUMBER:i.editable?Cb.EDIT:Cb.DONE}_getGuidelineLogic(i,r,s=Cb.NUMBER){return i._showError()&&i.hasError&&!r?Cb.ERROR:i.completed&&!r?Cb.DONE:i.completed&&r?s:i.editable&&r?Cb.EDIT:s}_isCurrentStep(i){return this._selectedIndex===i}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(i){let r=this.steps.toArray();this.selectionChange.emit({selectedIndex:i,previouslySelectedIndex:this._selectedIndex,selectedStep:r[i],previouslySelectedStep:r[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(i):this._keyManager.updateActiveItem(i),this._selectedIndex=i,this.selectedIndexChange.emit(this._selectedIndex),this._stateChanged()}_onKeydown(i){let r=Pc(i),s=i.keyCode,o=this._keyManager;o.activeItemIndex!=null&&!r&&(s===32||s===13)?(this.selectedIndex=o.activeItemIndex,i.preventDefault()):o.setFocusOrigin("keyboard").onKeydown(i)}_anyControlsInvalidOrPending(i){return this.linear&&i>=0?this.steps.toArray().slice(0,i).some(r=>{let s=r.stepControl;return(s?s.invalid||s.pending||!r.interacted:!r.completed)&&!r.optional&&!r._completedOverride}):!1}_layoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_containsFocus(){let i=this._elementRef.nativeElement,r=B_();return i===r||i.contains(r)}_isValidIndex(i){return i>-1&&(!this.steps||i<this.steps.length)}};e.\u0275fac=function(r){return new(r||e)(R(Va,8),R(Kt),R(fi))},e.\u0275dir=mi({type:e,selectors:[["","cdkStepper",""]],contentQueries:function(r,s,o){if(r&1&&(_o(o,are,5),_o(o,CSe,5)),r&2){let a;Pt(a=Rt())&&(s._steps=a),Pt(a=Rt())&&(s._stepHeader=a)}},inputs:{linear:[2,"linear","linear",mn],selectedIndex:[2,"selectedIndex","selectedIndex",xc],selected:"selected",orientation:"orientation"},outputs:{selectionChange:"selectionChange",selectedIndexChange:"selectedIndexChange"},exportAs:["cdkStepper"],standalone:!0,features:[Bs]});let t=e;return t})(),k2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[xv]});let t=e;return t})()});function OFi(t,e){if(t&1&&eu(0,2),t&2){let n=w();b("ngTemplateOutlet",n.iconOverrides[n.state])("ngTemplateOutletContext",n._getIconContext())}}function NFi(t,e){if(t&1&&(h(0,"span",7),y(1),p()),t&2){let n=w(2);g(),ye(n._getDefaultTextForState(n.state))}}function VFi(t,e){if(t&1&&(h(0,"span",8),y(1),p()),t&2){let n=w(3);g(),ye(n._intl.completedLabel)}}function BFi(t,e){if(t&1&&(h(0,"span",8),y(1),p()),t&2){let n=w(3);g(),ye(n._intl.editableLabel)}}function zFi(t,e){if(t&1&&(W(0,VFi,2,1,"span",8)(1,BFi,2,1,"span",8),h(2,"mat-icon",7),y(3),p()),t&2){let n=w(2);Je(n.state==="done"?0:n.state==="edit"?1:-1),g(3),ye(n._getDefaultTextForState(n.state))}}function HFi(t,e){if(t&1&&W(0,NFi,2,1,"span",7)(1,zFi,4,2,"mat-icon",7),t&2){let n,i=w();Je((n=i.state)==="number"?0:1)}}function GFi(t,e){t&1&&(h(0,"div",4),eu(1,9),p()),t&2&&(g(),b("ngTemplateOutlet",e.template))}function WFi(t,e){if(t&1&&(h(0,"div",4),y(1),p()),t&2){let n=w();g(),ye(n.label)}}function UFi(t,e){if(t&1&&(h(0,"div",5),y(1),p()),t&2){let n=w();g(),ye(n._intl.optionalLabel)}}function jFi(t,e){if(t&1&&(h(0,"div",6),y(1),p()),t&2){let n=w();g(),ye(n.errorMessage)}}function $Fi(t,e){}function KFi(t,e){if(t&1&&(Ln(0),W(1,$Fi,0,0,"ng-template",0)),t&2){let n=w();g(),b("cdkPortalOutlet",n._portal)}}function YFi(t,e){t&1&&Ln(0)}function qFi(t,e){t&1&&ee(0,"div",6)}function ZFi(t,e){if(t&1&&(eu(0,5),W(1,qFi,1,0,"div",6)),t&2){let n=e.$implicit,i=e.$index,r=e.$count;w(2);let s=pr(4);b("ngTemplateOutlet",s)("ngTemplateOutletContext",bs(3,R2t,n,i)),g(),Je(i!==r-1?1:-1)}}function XFi(t,e){if(t&1){let n=re();h(0,"div",7),F("@horizontalStepTransition.done",function(r){V(n);let s=w(2);return B(s._animationDone.next(r))}),eu(1,8),p()}if(t&2){let n=e.$implicit,i=e.$index,r=w(2);ki("mat-horizontal-stepper-content-inactive",r.selectedIndex!==i),b("@horizontalStepTransition",bs(8,L2t,r._getAnimationDirection(i),sn(6,F2t,r._getAnimationDuration())))("id",r._getStepContentId(i)),Bn("aria-labelledby",r._getStepLabelId(i)),g(),b("ngTemplateOutlet",n.content)}}function QFi(t,e){if(t&1&&(h(0,"div",1)(1,"div",2),Kn(2,ZFi,2,6,null,null,sa),p(),h(4,"div",3),Kn(5,XFi,2,11,"div",4,sa),p()()),t&2){let n=w();g(2),Yn(n.steps),g(3),Yn(n.steps)}}function JFi(t,e){if(t&1){let n=re();h(0,"div",9),eu(1,5),h(2,"div",10)(3,"div",11),F("@verticalStepTransition.done",function(r){V(n);let s=w(2);return B(s._animationDone.next(r))}),h(4,"div",12),eu(5,8),p()()()()}if(t&2){let n=e.$implicit,i=e.$index,r=e.$count,s=w(2),o=pr(4);g(),b("ngTemplateOutlet",o)("ngTemplateOutletContext",bs(10,R2t,n,i)),g(),ki("mat-stepper-vertical-line",i!==r-1),g(),ki("mat-vertical-stepper-content-inactive",s.selectedIndex!==i),b("@verticalStepTransition",bs(15,L2t,s._getAnimationDirection(i),sn(13,F2t,s._getAnimationDuration())))("id",s._getStepContentId(i)),Bn("aria-labelledby",s._getStepLabelId(i)),g(2),b("ngTemplateOutlet",n.content)}}function eLi(t,e){if(t&1&&Kn(0,JFi,6,18,"div",9,sa),t&2){let n=w();Yn(n.steps)}}function tLi(t,e){if(t&1){let n=re();h(0,"mat-step-header",13),F("click",function(){let r=V(n).step;return B(r.select())})("keydown",function(r){V(n);let s=w();return B(s._onKeydown(r))}),p()}if(t&2){let n=e.step,i=e.i,r=w();ki("mat-horizontal-stepper-header",r.orientation==="horizontal")("mat-vertical-stepper-header",r.orientation==="vertical"),b("tabIndex",r._getFocusIndex()===i?0:-1)("id",r._getStepLabelId(i))("index",i)("state",r._getIndicatorType(i,n.state))("label",n.stepLabel||n.label)("selected",r.selectedIndex===i)("active",r._stepIsNavigable(i,n))("optional",n.optional)("errorMessage",n.errorMessage)("iconOverrides",r._iconOverrides)("disableRipple",r.disableRipple||!r._stepIsNavigable(i,n))("color",n.color||r.color),Bn("aria-posinset",i+1)("aria-setsize",r.steps.length)("aria-controls",r._getStepContentId(i))("aria-selected",r.selectedIndex==i)("aria-label",n.ariaLabel||null)("aria-labelledby",!n.ariaLabel&&n.ariaLabelledby?n.ariaLabelledby:null)("aria-disabled",r._stepIsNavigable(i,n)?null:!0)}}function iLi(t){return t||new cre}var P2t,R2t,F2t,L2t,wSe,cre,nLi,SSe,O2t,N2t,A2t,rLi,sLi,oLi,V2t,B2t,z2t=Q(()=>{bv();I2t();ri();me();me();bl();bl();Ja();Xh();$n();Th();Cl();ng();Wc();P2t=["*"];R2t=(t,e)=>({step:t,i:e}),F2t=t=>({animationDuration:t}),L2t=(t,e)=>({value:t,params:e});wSe=(()=>{let e=class e extends xSe{};e.\u0275fac=(()=>{let i;return function(s){return(i||(i=Wo(e)))(s||e)}})(),e.\u0275dir=mi({type:e,selectors:[["","matStepLabel",""]],standalone:!0,features:[et]});let t=e;return t})(),cre=(()=>{let e=class e{constructor(){this.changes=new Mi,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();nLi={provide:cre,deps:[[new U2,new mv,cre]],useFactory:iLi},SSe=(()=>{let e=class e extends CSe{constructor(i,r,s,o){super(s),this._intl=i,this._focusMonitor=r,this._intlSubscription=i.changes.subscribe(()=>o.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(i,r){i?this._focusMonitor.focusVia(this._elementRef,i,r):this._elementRef.nativeElement.focus(r)}_stringLabel(){return this.label instanceof wSe?null:this.label}_templateLabel(){return this.label instanceof wSe?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(i){return i=="number"?`${this.index+1}`:i=="edit"?"create":i=="error"?"warning":i}};e.\u0275fac=function(r){return new(r||e)(R(cre),R(qp),R(fi),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],hostVars:2,hostBindings:function(r,s){r&2&&jr("mat-"+(s.color||"primary"))},inputs:{state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple",color:"color"},standalone:!0,features:[et,xe],decls:10,vars:17,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-step-label"],[1,"mat-step-text-label"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[3,"ngTemplateOutlet"]],template:function(r,s){if(r&1&&(ee(0,"div",0),h(1,"div")(2,"div",1),W(3,OFi,1,2,"ng-container",2)(4,HFi,2,1),p()(),h(5,"div",3),W(6,GFi,2,1,"div",4)(7,WFi,2,1,"div",4)(8,UFi,2,1,"div",5)(9,jFi,2,1,"div",6),p()),r&2){let o;b("matRippleTrigger",s._getHostElement())("matRippleDisabled",s.disableRipple),g(),_8("mat-step-icon-state-",s.state," mat-step-icon"),ki("mat-step-icon-selected",s.selected),g(2),Je(s.iconOverrides&&s.iconOverrides[s.state]?3:4),g(2),ki("mat-step-label-active",s.active)("mat-step-label-selected",s.selected)("mat-step-label-error",s.state=="error"),g(),Je((o=s._templateLabel())?6:s._stringLabel()?7:-1,o),g(2),Je(s.optional&&s.state!="error"?8:-1),g(),Je(s.state==="error"?9:-1)}},dependencies:[ym,rf,Zr],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color);border-radius:var(--mat-stepper-header-hover-state-layer-shape, var(--mat-app-corner-medium))}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color);border-radius:var(--mat-stepper-header-focus-state-layer-shape, var(--mat-app-corner-medium))}@media(hover: none){.mat-step-header:hover{background:none}}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color, var(--mat-app-on-surface-variant))}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color, var(--mat-app-surface));background-color:var(--mat-stepper-header-icon-background-color, var(--mat-app-on-surface-variant))}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color);color:var(--mat-stepper-header-error-state-icon-foreground-color, var(--mat-app-error))}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font, var(--mat-app-title-small-font));font-size:var(--mat-stepper-header-label-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-stepper-header-label-text-weight, var(--mat-app-title-small-weight));color:var(--mat-stepper-header-label-text-color, var(--mat-app-on-surface-variant))}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color, var(--mat-app-on-surface-variant))}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color, var(--mat-app-error));font-size:var(--mat-stepper-header-error-state-label-text-size, var(--mat-app-title-small-size))}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size, var(--mat-app-title-small-size));font-weight:var(--mat-stepper-header-selected-state-label-text-weight, var(--mat-app-title-small-weight))}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color, var(--mat-app-primary));color:var(--mat-stepper-header-selected-state-icon-foreground-color, var(--mat-app-on-primary))}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color);color:var(--mat-stepper-header-done-state-icon-foreground-color)}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color, var(--mat-app-primary));color:var(--mat-stepper-header-edit-state-icon-foreground-color, var(--mat-app-on-primary))}'],encapsulation:2,changeDetection:0});let t=e;return t})(),O2t="500ms",N2t="225ms",A2t={horizontalStepTransition:Nd("horizontalStepTransition",[bc("previous",So({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),bc("current",So({transform:"none",visibility:"inherit"})),bc("next",So({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),cl("* => *",eN([Ml("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),iN("@*",tN(),{optional:!0})]),{params:{animationDuration:O2t}})]),verticalStepTransition:Nd("verticalStepTransition",[bc("previous",So({height:"0px",visibility:"hidden"})),bc("next",So({height:"0px",visibility:"hidden"})),bc("current",So({height:"*",visibility:"inherit"})),cl("* <=> current",eN([Ml("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),iN("@*",tN(),{optional:!0})]),{params:{animationDuration:N2t}})])},rLi=(()=>{let e=class e{constructor(i){this.templateRef=i}};e.\u0275fac=function(r){return new(r||e)(R(Ma))},e.\u0275dir=mi({type:e,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:[0,"matStepperIcon","name"]},standalone:!0});let t=e;return t})(),sLi=(()=>{let e=class e{constructor(i){this._template=i}};e.\u0275fac=function(r){return new(r||e)(R(Ma))},e.\u0275dir=mi({type:e,selectors:[["ng-template","matStepContent",""]],standalone:!0});let t=e;return t})(),oLi=(()=>{let e=class e extends are{constructor(i,r,s,o){super(i,o),this._errorStateMatcher=r,this._viewContainerRef=s,this._isSelected=na.EMPTY,this.stepLabel=void 0}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe(Fl(()=>this._stepper.selectionChange.pipe(lr(i=>i.selectedStep===this),ll(this._stepper.selected===this)))).subscribe(i=>{i&&this._lazyContent&&!this._portal&&(this._portal=new of(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(i,r){let s=this._errorStateMatcher.isErrorState(i,r),o=!!(i&&i.invalid&&this.interacted);return s||o}};e.\u0275fac=function(r){return new(r||e)(R(_c(()=>V2t)),R(ig,4),R(Na),R(bSe,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-step"]],contentQueries:function(r,s,o){if(r&1&&(_o(o,wSe,5),_o(o,sLi,5)),r&2){let a;Pt(a=Rt())&&(s.stepLabel=a.first),Pt(a=Rt())&&(s._lazyContent=a.first)}},hostAttrs:["hidden",""],inputs:{color:"color"},exportAs:["matStep"],standalone:!0,features:[as([{provide:ig,useExisting:e},{provide:are,useExisting:e}]),et,xe],ngContentSelectors:P2t,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(r,s){r&1&&(gr(),W(0,KFi,2,1,"ng-template"))},dependencies:[w0],encapsulation:2,changeDetection:0});let t=e;return t})(),V2t=(()=>{let e=class e extends lre{get animationDuration(){return this._animationDuration}set animationDuration(i){this._animationDuration=/^\d+$/.test(i)?i+"ms":i}constructor(i,r,s){super(i,r,s),this._stepHeader=void 0,this._steps=void 0,this.steps=new o4,this.animationDone=new nt,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new Mi,this._animationDuration="",this._isServer=!Ve(Oo).isBrowser;let o=s.nativeElement.nodeName.toLowerCase();this.orientation=o==="mat-vertical-stepper"?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:i,templateRef:r})=>this._iconOverrides[i]=r),this.steps.changes.pipe(Mr(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe(qg((i,r)=>i.fromState===r.fromState&&i.toState===r.toState),Mr(this._destroyed)).subscribe(i=>{i.toState==="current"&&this.animationDone.emit()})}_stepIsNavigable(i,r){return r.completed||this.selectedIndex===i||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:this.orientation==="horizontal"?O2t:N2t}};e.\u0275fac=function(r){return new(r||e)(R(Va,8),R(Kt),R(fi))},e.\u0275cmp=_e({type:e,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(r,s,o){if(r&1&&(_o(o,oLi,5),_o(o,rLi,5)),r&2){let a;Pt(a=Rt())&&(s._steps=a),Pt(a=Rt())&&(s._icons=a)}},viewQuery:function(r,s){if(r&1&&ei(SSe,5),r&2){let o;Pt(o=Rt())&&(s._stepHeader=o)}},hostAttrs:["role","tablist"],hostVars:11,hostBindings:function(r,s){r&2&&(Bn("aria-orientation",s.orientation),ki("mat-stepper-horizontal",s.orientation==="horizontal")("mat-stepper-vertical",s.orientation==="vertical")("mat-stepper-label-position-end",s.orientation==="horizontal"&&s.labelPosition=="end")("mat-stepper-label-position-bottom",s.orientation==="horizontal"&&s.labelPosition=="bottom")("mat-stepper-header-position-bottom",s.headerPosition==="bottom"))},inputs:{disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],standalone:!0,features:[as([{provide:lre,useExisting:e}]),et,xe],ngContentSelectors:P2t,decls:5,vars:2,consts:[["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[1,"mat-horizontal-content-container"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id","mat-horizontal-stepper-content-inactive"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"click","keydown","tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color"]],template:function(r,s){if(r&1&&(gr(),W(0,YFi,1,0)(1,QFi,7,0,"div",1)(2,eLi,2,0)(3,tLi,1,23,"ng-template",null,0,Cc)),r&2){let o;Je(s._isServer?0:-1),g(),Je((o=s.orientation)==="horizontal"?1:o==="vertical"?2:-1)}},dependencies:[rf,SSe],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font, var(--mat-app-body-medium-font));background:var(--mat-stepper-container-color, var(--mat-app-surface))}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color, var(--mat-app-outline))}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color, var(--mat-app-outline))}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color, var(--mat-app-outline));top:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[A2t.horizontalStepTransition,A2t.verticalStepTransition]},changeDetection:0});let t=e;return t})(),B2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[nLi,ig],imports:[zr,sd,c4,k2t,A$,D0,V2t,SSe,zr]});let t=e;return t})()});var H2t,G2t=Q(()=>{me();bl();H2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[Jue,zr,Jue,zr]});let t=e;return t})()});var aLi,W2t,U2t=Q(()=>{me();me();bl();aLi=new Ri("mat-chips-default-options",{providedIn:"root",factory:()=>({separatorKeyCodes:[13]})}),W2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[ig,{provide:aLi,useValue:{separatorKeyCodes:[13]}}],imports:[zr,D0,zr]});let t=e;return t})()});function cLi(){return{useUtc:!1}}function dLi(t,e){let n=Array(t);for(let i=0;i<t;i++)n[i]=e(i);return n}function hLi(t=uLi,e){let n=[{provide:Od,useClass:DSe,deps:[k8,TSe]},{provide:af,useValue:t}];return e&&n.push({provide:TSe,useValue:e}),n}var lLi,j2t,MM,TSe,DSe,uLi,$2t,ESe=Q(()=>{me();me();bl();lLi=Gs(Jm(),1),j2t=Gs(Jm(),1),MM=j2t.default||lLi,TSe=new Ri("MAT_MOMENT_DATE_ADAPTER_OPTIONS",{providedIn:"root",factory:cLi});DSe=(()=>{let e=class e extends Od{constructor(i,r){super(),this._options=r,this.setLocale(i||MM.locale())}setLocale(i){super.setLocale(i);let r=MM.localeData(i);this._localeData={firstDayOfWeek:r.firstDayOfWeek(),longMonths:r.months(),shortMonths:r.monthsShort(),dates:dLi(31,s=>this.createDate(2017,0,s+1).format("D")),longDaysOfWeek:r.weekdays(),shortDaysOfWeek:r.weekdaysShort(),narrowDaysOfWeek:r.weekdaysMin()}}getYear(i){return this.clone(i).year()}getMonth(i){return this.clone(i).month()}getDate(i){return this.clone(i).date()}getDayOfWeek(i){return this.clone(i).day()}getMonthNames(i){return i=="long"?this._localeData.longMonths:this._localeData.shortMonths}getDateNames(){return this._localeData.dates}getDayOfWeekNames(i){return i=="long"?this._localeData.longDaysOfWeek:i=="short"?this._localeData.shortDaysOfWeek:this._localeData.narrowDaysOfWeek}getYearName(i){return this.clone(i).format("YYYY")}getFirstDayOfWeek(){return this._localeData.firstDayOfWeek}getNumDaysInMonth(i){return this.clone(i).daysInMonth()}clone(i){return i.clone().locale(this.locale)}createDate(i,r,s){let o=this._createMoment({year:i,month:r,date:s}).locale(this.locale);return o.isValid(),o}today(){return this._createMoment().locale(this.locale)}parse(i,r){return i&&typeof i=="string"?this._createMoment(i,r,this.locale):i?this._createMoment(i).locale(this.locale):null}format(i,r){return i=this.clone(i),this.isValid(i),i.format(r)}addCalendarYears(i,r){return this.clone(i).add({years:r})}addCalendarMonths(i,r){return this.clone(i).add({months:r})}addCalendarDays(i,r){return this.clone(i).add({days:r})}toIso8601(i){return this.clone(i).format()}deserialize(i){let r;if(i instanceof Date)r=this._createMoment(i).locale(this.locale);else if(this.isDateInstance(i))return this.clone(i);if(typeof i=="string"){if(!i)return null;r=this._createMoment(i,MM.ISO_8601).locale(this.locale)}return r&&this.isValid(r)?this._createMoment(r).locale(this.locale):super.deserialize(i)}isDateInstance(i){return MM.isMoment(i)}isValid(i){return this.clone(i).isValid()}invalid(){return MM.invalid()}_createMoment(i,r,s){let{strict:o,useUtc:a}=this._options||{};return a?MM.utc(i,r,s,o):MM(i,r,s,o)}};e.\u0275fac=function(r){return new(r||e)(it(k8,8),it(TSe,8))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),uLi={parse:{dateInput:"l"},display:{dateInput:"l",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},$2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[hLi()]});let t=e;return t})()});var K2t,Y2t=Q(()=>{me();ri();bl();K2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[sd,zr]});let t=e;return t})()});function pLi(t){return t||new MSe}var DTr,MSe,mLi,q2t,Z2t=Q(()=>{me();me();$n();bl();DTr=ZEe.ENTERING+" "+qEe.STANDARD_CURVE,MSe=(()=>{let e=class e{constructor(){this.changes=new Mi}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();mLi={provide:MSe,deps:[[new U2,new mv,MSe]],useFactory:pLi},q2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[mLi],imports:[zr]});let t=e;return t})()});function fLi(t,e){if(t&1&&(h(0,"mat-option",17),y(1),p()),t&2){let n=e.$implicit;b("value",n),g(),Ke(" ",n," ")}}function gLi(t,e){if(t&1){let n=re();h(0,"mat-form-field",14)(1,"mat-select",16,0),F("selectionChange",function(r){V(n);let s=w(2);return B(s._changePageSize(r.value))}),Kn(3,fLi,2,2,"mat-option",17,sa),p(),h(5,"div",18),F("click",function(){V(n);let r=pr(2);return B(r.open())}),p()()}if(t&2){let n=w(2);b("appearance",n._formFieldAppearance)("color",n.color),g(),b("value",n.pageSize)("disabled",n.disabled)("aria-labelledby",n._pageSizeLabelId)("panelClass",n.selectConfig.panelClass||"")("disableOptionCentering",n.selectConfig.disableOptionCentering),g(2),Yn(n._displayedPageSizeOptions)}}function vLi(t,e){if(t&1&&(h(0,"div",15),y(1),p()),t&2){let n=w(2);g(),ye(n.pageSize)}}function yLi(t,e){if(t&1&&(h(0,"div",3)(1,"div",13),y(2),p(),W(3,gLi,6,7,"mat-form-field",14)(4,vLi,2,1,"div",15),p()),t&2){let n=w();g(),Bn("id",n._pageSizeLabelId),g(),Ke(" ",n._intl.itemsPerPageLabel," "),g(),Je(n._displayedPageSizeOptions.length>1?3:-1),g(),Je(n._displayedPageSizeOptions.length<=1?4:-1)}}function _Li(t,e){if(t&1){let n=re();h(0,"button",19),F("click",function(){V(n);let r=w();return B(r.firstPage())}),$p(),h(1,"svg",8),ee(2,"path",20),p()()}if(t&2){let n=w();b("matTooltip",n._intl.firstPageLabel)("matTooltipDisabled",n._previousButtonsDisabled())("matTooltipPosition","above")("disabled",n._previousButtonsDisabled()),Bn("aria-label",n._intl.firstPageLabel)}}function CLi(t,e){if(t&1){let n=re();h(0,"button",21),F("click",function(){V(n);let r=w();return B(r.lastPage())}),$p(),h(1,"svg",8),ee(2,"path",22),p()()}if(t&2){let n=w();b("matTooltip",n._intl.lastPageLabel)("matTooltipDisabled",n._nextButtonsDisabled())("matTooltipPosition","above")("disabled",n._nextButtonsDisabled()),Bn("aria-label",n._intl.lastPageLabel)}}function xLi(t){return t||new dre}var dre,bLi,wLi,SLi,TLi,DLi,X2t,Q2t=Q(()=>{me();me();$n();P8();gZ();Mp();bl();og();dre=(()=>{let e=class e{constructor(){this.changes=new Mi,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(i,r,s)=>{if(s==0||r==0)return`0 of ${s}`;s=Math.max(s,0);let o=i*r,a=o<s?Math.min(o+r,s):o+r;return`${o+1} \u2013 ${a} of ${s}`}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();bLi={provide:dre,deps:[[new U2,new mv,dre]],useFactory:xLi},wLi=50,SLi=new Ri("MAT_PAGINATOR_DEFAULT_OPTIONS"),TLi=0,DLi=(()=>{let e=class e{get pageIndex(){return this._pageIndex}set pageIndex(i){this._pageIndex=Math.max(i||0,0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(i){this._length=i||0,this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(i){this._pageSize=Math.max(i||0,0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(i){this._pageSizeOptions=(i||[]).map(r=>xc(r,0)),this._updateDisplayedPageSizeOptions()}constructor(i,r,s){if(this._intl=i,this._changeDetectorRef=r,this._pageSizeLabelId=`mat-paginator-page-size-label-${TLi++}`,this._isInitialized=!1,this._initializedStream=new b9(1),this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this.hidePageSize=!1,this.showFirstLastButtons=!1,this.selectConfig={},this.disabled=!1,this.page=new nt,this.initialized=this._initializedStream,this._intlChanges=i.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),s){let{pageSize:o,pageSizeOptions:a,hidePageSize:l,showFirstLastButtons:c}=s;o!=null&&(this._pageSize=o),a!=null&&(this._pageSizeOptions=a),l!=null&&(this.hidePageSize=l),c!=null&&(this.showFirstLastButtons=c)}this._formFieldAppearance=s?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;let i=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(i)}previousPage(){if(!this.hasPreviousPage())return;let i=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(i)}firstPage(){if(!this.hasPreviousPage())return;let i=this.pageIndex;this.pageIndex=0,this._emitPageEvent(i)}lastPage(){if(!this.hasNextPage())return;let i=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(i)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let i=this.getNumberOfPages()-1;return this.pageIndex<i&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(i){let r=this.pageIndex*this.pageSize,s=this.pageIndex;this.pageIndex=Math.floor(r/i)||0,this.pageSize=i,this._emitPageEvent(s)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._isInitialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:wLi),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((i,r)=>i-r),this._changeDetectorRef.markForCheck())}_emitPageEvent(i){this.page.emit({previousPageIndex:i,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}};e.\u0275fac=function(r){return new(r||e)(R(dre),R(Kt),R(SLi,8))},e.\u0275cmp=_e({type:e,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",xc],length:[2,"length","length",xc],pageSize:[2,"pageSize","pageSize",xc],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",mn],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",mn],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",mn]},outputs:{page:"page"},exportAs:["matPaginator"],standalone:!0,features:[Bs,xe],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(r,s){r&1&&(h(0,"div",1)(1,"div",2),W(2,yLi,5,4,"div",3),h(3,"div",4)(4,"div",5),y(5),p(),W(6,_Li,3,5,"button",6),h(7,"button",7),F("click",function(){return s.previousPage()}),$p(),h(8,"svg",8),ee(9,"path",9),p()(),gy(),h(10,"button",10),F("click",function(){return s.nextPage()}),$p(),h(11,"svg",8),ee(12,"path",11),p()(),W(13,CLi,3,5,"button",12),p()()()),r&2&&(g(2),Je(s.hidePageSize?-1:2),g(3),Ke(" ",s._intl.getRangeLabel(s.pageIndex,s.pageSize,s.length)," "),g(),Je(s.showFirstLastButtons?6:-1),g(),b("matTooltip",s._intl.previousPageLabel)("matTooltipDisabled",s._previousButtonsDisabled())("matTooltipPosition","above")("disabled",s._previousButtonsDisabled()),Bn("aria-label",s._intl.previousPageLabel),g(3),b("matTooltip",s._intl.nextPageLabel)("matTooltipDisabled",s._nextButtonsDisabled())("matTooltipPosition","above")("disabled",s._nextButtonsDisabled()),Bn("aria-label",s._intl.nextPageLabel),g(3),Je(s.showFirstLastButtons?13:-1))},dependencies:[M0,kB,z_,A8,dl],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-app-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-app-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-app-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-app-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-app-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-app-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-app-body-small-tracking));--mat-form-field-container-height:var(--mat-paginator-form-field-container-height);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-app-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}"],encapsulation:2,changeDetection:0});let t=e;return t})(),X2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({providers:[bLi],imports:[Ob,fZ,lK,DLi]});let t=e;return t})()});var J2t,egt=Q(()=>{me();bl();J2t=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,zr]});let t=e;return t})()});var tgt,igt=Q(()=>{me();bl();tgt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,zr]});let t=e;return t})()});var ngt,rgt=Q(()=>{me();bl();GO();ri();igt();ngt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[pk,sd,zr,D0,the,tgt]});let t=e;return t})()});var sgt,ogt=Q(()=>{R1();me();bl();sgt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=en({type:e}),e.\u0275inj=Ji({imports:[zr,Q2,Q2,zr]});let t=e;return t})()});function agt(t){return new to(3e3,!1)}function ELi(){return new to(3100,!1)}function MLi(){return new to(3101,!1)}function kLi(t){return new to(3001,!1)}function ILi(t){return new to(3003,!1)}function ALi(t){return new to(3004,!1)}function PLi(t,e){return new to(3005,!1)}function RLi(){return new to(3006,!1)}function FLi(){return new to(3007,!1)}function LLi(t,e){return new to(3008,!1)}function OLi(t){return new to(3002,!1)}function NLi(t,e,n,i,r){return new to(3010,!1)}function VLi(){return new to(3011,!1)}function BLi(){return new to(3012,!1)}function zLi(){return new to(3200,!1)}function HLi(){return new to(3202,!1)}function GLi(){return new to(3013,!1)}function WLi(t){return new to(3014,!1)}function ULi(t){return new to(3015,!1)}function jLi(t){return new to(3016,!1)}function $Li(t,e){return new to(3404,!1)}function KLi(t){return new to(3502,!1)}function YLi(t){return new to(3503,!1)}function qLi(){return new to(3300,!1)}function ZLi(t){return new to(3504,!1)}function XLi(t){return new to(3301,!1)}function QLi(t,e){return new to(3302,!1)}function JLi(t){return new to(3303,!1)}function eOi(t,e){return new to(3400,!1)}function tOi(t){return new to(3401,!1)}function iOi(t){return new to(3402,!1)}function nOi(t,e){return new to(3505,!1)}function hS(t){switch(t.length){case 0:return new Pb;case 1:return t[0];default:return new JO(t)}}function xgt(t,e,n=new Map,i=new Map){let r=[],s=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),d=c==o,u=d&&a||new Map;l.forEach((m,f)=>{let _=f,x=m;if(f!=="offset")switch(_=t.normalizePropertyName(_,r),x){case g$:x=n.get(f);break;case H_:x=i.get(f);break;default:x=t.normalizeStyleValue(f,_,x,r);break}u.set(_,x)}),d||s.push(u),a=u,o=c}),r.length)throw KLi(r);return s}function XSe(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&kSe(n,"start",t)));break;case"done":t.onDone(()=>i(n&&kSe(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&kSe(n,"destroy",t)));break}}function kSe(t,e,n){let i=n.totalTime,r=!!n.disabled,s=QSe(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,i??t.totalTime,r),o=t._data;return o!=null&&(s._data=o),s}function QSe(t,e,n,i,r="",s=0,o){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function cv(t,e,n){let i=t.get(e);return i||t.set(e,i=n),i}function lgt(t){let e=t.indexOf(":"),n=t.substring(1,e),i=t.slice(e+1);return[n,i]}function JSe(t){let e=t.parentNode||t.host||null;return e===rOi?null:e}function sOi(t){return t.substring(1,6)=="ebkit"}function oOi(t){kM||(kM=aOi()||{},cgt=kM.style?"WebkitAppearance"in kM.style:!1);let e=!0;return kM.style&&!sOi(t)&&(e=t in kM.style,!e&&cgt&&(e="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in kM.style)),e}function aOi(){return typeof document<"u"?document.body:null}function bgt(t,e){for(;e;){if(e===t)return!0;e=JSe(e)}return!1}function wgt(t,e,n){if(n)return Array.from(t.querySelectorAll(e));let i=t.querySelector(e);return i?[i]:[]}function xb(t){if(typeof t=="number")return t;let e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:NSe(parseFloat(e[1]),e[2])}function NSe(t,e){switch(e){case"s":return t*lOi;default:return t}}function vre(t,e,n){return t.hasOwnProperty("duration")?t:dOi(t,e,n)}function dOi(t,e,n){let i=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,r,s=0,o="";if(typeof t=="string"){let a=t.match(i);if(a===null)return e.push(agt(t)),{duration:0,delay:0,easing:""};r=NSe(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(s=NSe(parseFloat(l),a[4]));let c=a[5];c&&(o=c)}else r=t;if(!n){let a=!1,l=e.length;r<0&&(e.push(ELi()),a=!0),s<0&&(e.push(MLi()),a=!0),a&&e.splice(l,0,agt(t))}return{duration:r,delay:s,easing:o}}function uOi(t){return t.length?t[0]instanceof Map?t:t.map(e=>new Map(Object.entries(e))):[]}function OC(t,e,n){e.forEach((i,r)=>{let s=t9e(r);n&&!n.has(r)&&n.set(r,t.style[s]),t.style[s]=i})}function AM(t,e){e.forEach((n,i)=>{let r=t9e(i);t.style[r]=""})}function HU(t){return Array.isArray(t)?t.length==1?t[0]:QEe(t):t}function hOi(t,e,n){let i=e.params||{},r=Dgt(t);r.length&&r.forEach(s=>{i.hasOwnProperty(s)||n.push(kLi(s))})}function Dgt(t){let e=[];if(typeof t=="string"){let n;for(;n=VSe.exec(t);)e.push(n[1]);VSe.lastIndex=0}return e}function WU(t,e,n){let i=`${t}`,r=i.replace(VSe,(s,o)=>{let a=e[o];return a==null&&(n.push(ILi(o)),a=""),a.toString()});return r==i?t:r}function t9e(t){return t.replace(pOi,(...e)=>e[1].toUpperCase())}function mOi(t,e){return t===0||e===0}function fOi(t,e,n){if(n.size&&e.length){let i=e[0],r=[];if(n.forEach((s,o)=>{i.has(o)||r.push(o),i.set(o,s)}),r.length)for(let s=1;s<e.length;s++){let o=e[s];r.forEach(a=>o.set(a,i9e(t,a)))}}return e}function lv(t,e,n){switch(e.type){case ka.Trigger:return t.visitTrigger(e,n);case ka.State:return t.visitState(e,n);case ka.Transition:return t.visitTransition(e,n);case ka.Sequence:return t.visitSequence(e,n);case ka.Group:return t.visitGroup(e,n);case ka.Animate:return t.visitAnimate(e,n);case ka.Keyframes:return t.visitKeyframes(e,n);case ka.Style:return t.visitStyle(e,n);case ka.Reference:return t.visitReference(e,n);case ka.AnimateChild:return t.visitAnimateChild(e,n);case ka.AnimateRef:return t.visitAnimateRef(e,n);case ka.Query:return t.visitQuery(e,n);case ka.Stagger:return t.visitStagger(e,n);default:throw ALi(e.type)}}function i9e(t,e){return window.getComputedStyle(t)[e]}function vOi(t,e){let n=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(i=>yOi(i,n,e)):n.push(t),n}function yOi(t,e,n){if(t[0]==":"){let l=_Oi(t,n);if(typeof l=="function"){e.push(l);return}t=l}let i=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return n.push(ULi(t)),e;let r=i[1],s=i[2],o=i[3];e.push(ugt(r,o));let a=r==_re&&o==_re;s[0]=="<"&&!a&&e.push(ugt(o,r))}function _Oi(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,i)=>parseFloat(i)>parseFloat(n);case":decrement":return(n,i)=>parseFloat(i)<parseFloat(n);default:return e.push(jLi(t)),"* => *"}}function ugt(t,e){let n=hre.has(t)||pre.has(t),i=hre.has(e)||pre.has(e);return(r,s)=>{let o=t==_re||t==r,a=e==_re||e==s;return!o&&n&&typeof r=="boolean"&&(o=r?hre.has(t):pre.has(t)),!a&&i&&typeof s=="boolean"&&(a=s?hre.has(e):pre.has(e)),o&&a}}function Mgt(t,e,n,i){return new BSe(t).build(e,n,i)}function xOi(t){let e=!!t.split(/\s*,\s*/).find(n=>n==Egt);return e&&(t=t.replace(COi,"")),t=t.replace(/@\*/g,gre).replace(/@\w+/g,n=>gre+"-"+n.slice(1)).replace(/:animating/g,OSe),[t,e]}function bOi(t){return t?ve({},t):null}function wOi(t){if(typeof t=="string")return null;let e=null;if(Array.isArray(t))t.forEach(n=>{if(n instanceof Map&&n.has("offset")){let i=n;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}return e}function SOi(t,e){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let s=vre(t,e).duration;return ISe(s,0,"")}let n=t;if(n.split(/\s+/).some(s=>s.charAt(0)=="{"&&s.charAt(1)=="{")){let s=ISe(0,0,"");return s.dynamic=!0,s.strValue=n,s}let r=vre(n,e);return ISe(r.duration,r.delay,r.easing)}function IM(t){return t?(t=ve({},t),t.params&&(t.params=bOi(t.params))):t={},t}function ISe(t,e,n){return{duration:t,delay:e,easing:n}}function n9e(t,e,n,i,r,s,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}function kgt(t,e,n,i,r,s=new Map,o=new Map,a,l,c=[]){return new HSe().buildKeyframes(t,e,n,i,r,s,o,a,l,c)}function pgt(t,e=3){let n=Math.pow(10,e-1);return Math.round(t*n)/n}function IOi(t,e){let n=new Map,i;return t.forEach(r=>{if(r==="*"){i??=e.keys();for(let s of i)n.set(s,H_)}else for(let[s,o]of r)n.set(s,o)}),n}function mgt(t,e,n,i,r,s,o,a,l,c,d,u,m){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:u,errors:m}}function AOi(t,e,n,i,r){return t.some(s=>s(e,n,i,r))}function Igt(t,e){let n=ve({},e);return Object.entries(t).forEach(([i,r])=>{r!=null&&(n[i]=r)}),n}function POi(t,e,n){return new jSe(t,e,n)}function ROi(t,e,n){let i=[(o,a)=>!0],r={type:ka.Sequence,steps:[],options:null},s={type:ka.Transition,animation:r,matchers:i,options:null,queryCount:0,depCount:0};return new bre(t,s,e)}function fgt(t,e,n){t.has(e)?t.has(n)||t.set(n,t.get(e)):t.has(n)&&t.set(e,t.get(n))}function HOi(t,e,n){let i=t.get(e);if(i){if(i.length){let r=i.indexOf(n);i.splice(r,1)}i.length==0&&t.delete(e)}return i}function GOi(t){return t??null}function mre(t){return t&&t.nodeType===1}function WOi(t){return t=="start"||t=="done"}function vgt(t,e){let n=t.style.display;return t.style.display=e??"none",n}function ygt(t,e,n,i,r){let s=[];n.forEach(l=>s.push(vgt(l)));let o=[];i.forEach((l,c)=>{let d=new Map;l.forEach(u=>{let m=e.computeStyle(c,u,r);d.set(u,m),(!m||m.length==0)&&(c[E_]=zOi,o.push(c))}),t.set(c,d)});let a=0;return n.forEach(l=>vgt(l,s[a++])),o}function _gt(t,e){let n=new Map;if(t.forEach(a=>n.set(a,[])),e.length==0)return n;let i=1,r=new Set(e),s=new Map;function o(a){if(!a)return i;let l=s.get(a);if(l)return l;let c=a.parentNode;return n.has(c)?l=c:r.has(c)?l=i:l=o(c),s.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==i&&n.get(l).push(a)}),n}function q6(t,e){t.classList?.add(e)}function HF(t,e){t.classList?.remove(e)}function UOi(t,e,n){hS(n).onDone(()=>t.processLeaveNode(e))}function jOi(t){let e=[];return Pgt(t,e),e}function Pgt(t,e){for(let n=0;n<t.length;n++){let i=t[n];i instanceof JO?Pgt(i.players,e):e.push(i)}}function $Oi(t,e){let n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let r=0;r<n.length;r++){let s=n[r];if(!e.hasOwnProperty(s)||t[s]!==e[s])return!1}return!0}function Cgt(t,e,n){let i=n.get(t);if(!i)return!1;let r=e.get(t);return r?i.forEach(s=>r.add(s)):e.set(t,i),n.delete(t),!0}function KOi(t,e){let n=null,i=null;return Array.isArray(e)&&e.length?(n=FSe(e[0]),e.length>1&&(i=FSe(e[e.length-1]))):e instanceof Map&&(n=FSe(e)),n||i?new qSe(t,n,i):null}function FSe(t){let e=null;return t.forEach((n,i)=>{YOi(i)&&(e=e||new Map,e.set(i,n))}),e}function YOi(t){return t==="display"||t==="position"}function qOi(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function ZOi(t){let e=t.indexOf("."),n=t.substring(0,e),i=t.slice(e+1);return[n,i]}var rOi,kM,cgt,e9e,r9e,PM,RM,lOi,Sgt,cOi,Tgt,LSe,ure,gre,dgt,OSe,VSe,pOi,gOi,yre,_re,hre,pre,Egt,COi,hgt,BSe,zSe,UU,TOi,DOi,EOi,MOi,kOi,HSe,Cre,GSe,xre,WSe,ASe,bre,USe,jSe,FOi,$Se,ggt,LOi,PSe,OOi,NOi,VOi,BOi,Agt,zOi,E_,jU,GU,RSe,KSe,YSe,$U,WF,GF,qSe,wre,Sre,fre,Rgt,Tre,ZSe,Dre,s9e=Q(()=>{ng();me();me();rOi=typeof document>"u"?null:document.documentElement;kM=null,cgt=!1;e9e=(()=>{let e=class e{validateStyleProperty(i){return oOi(i)}containsElement(i,r){return bgt(i,r)}getParentElement(i){return JSe(i)}query(i,r,s){return wgt(i,r,s)}computeStyle(i,r,s){return s||""}animate(i,r,s,o,a,l=[],c){return new Pb(s,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})(),r9e=class r9e{};r9e.NOOP=new e9e;PM=r9e,RM=class{},lOi=1e3,Sgt="{{",cOi="}}",Tgt="ng-enter",LSe="ng-leave",ure="ng-trigger",gre=".ng-trigger",dgt="ng-animating",OSe=".ng-animating";VSe=new RegExp(`${Sgt}\\s*(.+?)\\s*${cOi}`,"g");pOi=/-+([a-z0-9])/g;gOi=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),yre=class extends RM{normalizePropertyName(e,n){return t9e(e)}normalizeStyleValue(e,n,i,r){let s="",o=i.toString().trim();if(gOi.has(n)&&i!==0&&i!=="0")if(typeof i=="number")s="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&r.push(PLi(e,i))}return o+s}},_re="*";hre=new Set(["true","1"]),pre=new Set(["false","0"]);Egt=":self",COi=new RegExp(`s*${Egt}s*,?`,"g");hgt="",BSe=class{constructor(e){this._driver=e}build(e,n,i){let r=new zSe(n);return this._resetContextStyleTimingState(r),lv(this,HU(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector=hgt,e.collectedStyles=new Map,e.collectedStyles.set(hgt,new Map),e.currentTime=0}visitTrigger(e,n){let i=n.queryCount=0,r=n.depCount=0,s=[],o=[];return e.name.charAt(0)=="@"&&n.errors.push(RLi()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(n),a.type==ka.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,s.push(this.visitState(l,n))}),l.name=c}else if(a.type==ka.Transition){let l=this.visitTransition(a,n);i+=l.queryCount,r+=l.depCount,o.push(l)}else n.errors.push(FLi())}),{type:ka.Trigger,name:e.name,states:s,transitions:o,queryCount:i,depCount:r,options:null}}visitState(e,n){let i=this.visitStyle(e.styles,n),r=e.options&&e.options.params||null;if(i.containsDynamicStyles){let s=new Set,o=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{Dgt(l).forEach(c=>{o.hasOwnProperty(c)||s.add(c)})})}),s.size&&n.errors.push(LLi(e.name,[...s.values()]))}return{type:ka.State,name:e.name,style:i,options:r?{params:r}:null}}visitTransition(e,n){n.queryCount=0,n.depCount=0;let i=lv(this,HU(e.animation),n),r=vOi(e.expr,n.errors);return{type:ka.Transition,matchers:r,animation:i,queryCount:n.queryCount,depCount:n.depCount,options:IM(e.options)}}visitSequence(e,n){return{type:ka.Sequence,steps:e.steps.map(i=>lv(this,i,n)),options:IM(e.options)}}visitGroup(e,n){let i=n.currentTime,r=0,s=e.steps.map(o=>{n.currentTime=i;let a=lv(this,o,n);return r=Math.max(r,n.currentTime),a});return n.currentTime=r,{type:ka.Group,steps:s,options:IM(e.options)}}visitAnimate(e,n){let i=SOi(e.timings,n.errors);n.currentAnimateTimings=i;let r,s=e.styles?e.styles:So({});if(s.type==ka.Keyframes)r=this.visitKeyframes(s,n);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};i.easing&&(c.easing=i.easing),o=So(c)}n.currentTime+=i.duration+i.delay;let l=this.visitStyle(o,n);l.isEmptyStep=a,r=l}return n.currentAnimateTimings=null,{type:ka.Animate,timings:i,style:r,options:null}}visitStyle(e,n){let i=this._makeStyleAst(e,n);return this._validateStyleAst(i,n),i}_makeStyleAst(e,n){let i=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)typeof a=="string"?a===H_?i.push(a):n.errors.push(OLi(a)):i.push(new Map(Object.entries(a)));let s=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!s)){for(let l of a.values())if(l.toString().indexOf(Sgt)>=0){s=!0;break}}}),{type:ka.Style,styles:i,easing:o,offset:e.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(e,n){let i=n.currentAnimateTimings,r=n.currentTime,s=n.currentTime;i&&s>0&&(s-=i.duration+i.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=n.collectedStyles.get(n.currentQuerySelector),d=c.get(l),u=!0;d&&(s!=r&&s>=d.startTime&&r<=d.endTime&&(n.errors.push(NLi(l,d.startTime,d.endTime,s,r)),u=!1),s=d.startTime),u&&c.set(l,{startTime:s,endTime:r}),n.options&&hOi(a,n.options,n.errors)})})}visitKeyframes(e,n){let i={type:ka.Keyframes,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(VLi()),i;let r=1,s=0,o=[],a=!1,l=!1,c=0,d=e.steps.map(E=>{let M=this._makeStyleAst(E,n),I=M.offset!=null?M.offset:wOi(M.styles),z=0;return I!=null&&(s++,z=M.offset=I),l=l||z<0||z>1,a=a||z<c,c=z,o.push(z),M});l&&n.errors.push(BLi()),a&&n.errors.push(zLi());let u=e.steps.length,m=0;s>0&&s<u?n.errors.push(HLi()):s==0&&(m=r/(u-1));let f=u-1,_=n.currentTime,x=n.currentAnimateTimings,D=x.duration;return d.forEach((E,M)=>{let I=m>0?M==f?1:m*M:o[M],z=I*D;n.currentTime=_+x.delay+z,x.duration=z,this._validateStyleAst(E,n),E.offset=I,i.styles.push(E)}),i}visitReference(e,n){return{type:ka.Reference,animation:lv(this,HU(e.animation),n),options:IM(e.options)}}visitAnimateChild(e,n){return n.depCount++,{type:ka.AnimateChild,options:IM(e.options)}}visitAnimateRef(e,n){return{type:ka.AnimateRef,animation:this.visitReference(e.animation,n),options:IM(e.options)}}visitQuery(e,n){let i=n.currentQuerySelector,r=e.options||{};n.queryCount++,n.currentQuery=e;let[s,o]=xOi(e.selector);n.currentQuerySelector=i.length?i+" "+s:s,cv(n.collectedStyles,n.currentQuerySelector,new Map);let a=lv(this,HU(e.animation),n);return n.currentQuery=null,n.currentQuerySelector=i,{type:ka.Query,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:IM(e.options)}}visitStagger(e,n){n.currentQuery||n.errors.push(GLi());let i=e.timings==="full"?{duration:0,delay:0,easing:"full"}:vre(e.timings,n.errors,!0);return{type:ka.Stagger,animation:lv(this,HU(e.animation),n),timings:i,options:null}}};zSe=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};UU=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,n){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...n)}has(e){return this._map.has(e)}clear(){this._map.clear()}},TOi=1,DOi=":enter",EOi=new RegExp(DOi,"g"),MOi=":leave",kOi=new RegExp(MOi,"g");HSe=class{buildKeyframes(e,n,i,r,s,o,a,l,c,d=[]){c=c||new UU;let u=new GSe(e,n,c,r,s,d,[]);u.options=l;let m=l.delay?xb(l.delay):0;u.currentTimeline.delayNextStep(m),u.currentTimeline.setStyles([o],null,u.errors,l),lv(this,i,u);let f=u.timelines.filter(_=>_.containsAnimation());if(f.length&&a.size){let _;for(let x=f.length-1;x>=0;x--){let D=f[x];if(D.element===n){_=D;break}}_&&!_.allowOnlyTimelineStyles()&&_.setStyles([a],null,u.errors,l)}return f.length?f.map(_=>_.buildKeyframes()):[n9e(n,[],[],[],0,m,"",!1)]}visitTrigger(e,n){}visitState(e,n){}visitTransition(e,n){}visitAnimateChild(e,n){let i=n.subInstructions.get(n.element);if(i){let r=n.createSubContext(e.options),s=n.currentTimeline.currentTime,o=this._visitSubInstructions(i,r,r.options);s!=o&&n.transformIntoNewTimeline(o)}n.previousNode=e}visitAnimateRef(e,n){let i=n.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],n,i),this.visitReference(e.animation,i),n.transformIntoNewTimeline(i.currentTimeline.currentTime),n.previousNode=e}_applyAnimationRefDelays(e,n,i){for(let r of e){let s=r?.delay;if(s){let o=typeof s=="number"?s:xb(WU(s,r?.params??{},n.errors));i.delayNextStep(o)}}}_visitSubInstructions(e,n,i){let s=n.currentTimeline.currentTime,o=i.duration!=null?xb(i.duration):null,a=i.delay!=null?xb(i.delay):null;return o!==0&&e.forEach(l=>{let c=n.appendInstructionToTimeline(l,o,a);s=Math.max(s,c.duration+c.delay)}),s}visitReference(e,n){n.updateOptions(e.options,!0),lv(this,e.animation,n),n.previousNode=e}visitSequence(e,n){let i=n.subContextCount,r=n,s=e.options;if(s&&(s.params||s.delay)&&(r=n.createSubContext(s),r.transformIntoNewTimeline(),s.delay!=null)){r.previousNode.type==ka.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Cre);let o=xb(s.delay);r.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>lv(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),n.previousNode=e}visitGroup(e,n){let i=[],r=n.currentTimeline.currentTime,s=e.options&&e.options.delay?xb(e.options.delay):0;e.steps.forEach(o=>{let a=n.createSubContext(e.options);s&&a.delayNextStep(s),lv(this,o,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>n.currentTimeline.mergeTimelineCollectedStyles(o)),n.transformIntoNewTimeline(r),n.previousNode=e}_visitTiming(e,n){if(e.dynamic){let i=e.strValue,r=n.params?WU(i,n.params,n.errors):i;return vre(r,n.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,n){let i=n.currentAnimateTimings=this._visitTiming(e.timings,n),r=n.currentTimeline;i.delay&&(n.incrementTime(i.delay),r.snapshotCurrentStyles());let s=e.style;s.type==ka.Keyframes?this.visitKeyframes(s,n):(n.incrementTime(i.duration),this.visitStyle(s,n),r.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=e}visitStyle(e,n){let i=n.currentTimeline,r=n.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();let s=r&&r.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(s):i.setStyles(e.styles,s,n.errors,n.options),n.previousNode=e}visitKeyframes(e,n){let i=n.currentAnimateTimings,r=n.currentTimeline.duration,s=i.duration,a=n.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*s),a.setStyles(l.styles,l.easing,n.errors,n.options),a.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(a),n.transformIntoNewTimeline(r+s),n.previousNode=e}visitQuery(e,n){let i=n.currentTimeline.currentTime,r=e.options||{},s=r.delay?xb(r.delay):0;s&&(n.previousNode.type===ka.Style||i==0&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=Cre);let o=i,a=n.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,n.errors);n.currentQueryTotal=a.length;let l=null;a.forEach((c,d)=>{n.currentQueryIndex=d;let u=n.createSubContext(e.options,c);s&&u.delayNextStep(s),c===n.element&&(l=u.currentTimeline),lv(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let m=u.currentTimeline.currentTime;o=Math.max(o,m)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(o),l&&(n.currentTimeline.mergeTimelineCollectedStyles(l),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=e}visitStagger(e,n){let i=n.parentContext,r=n.currentTimeline,s=e.timings,o=Math.abs(s.duration),a=o*(n.currentQueryTotal-1),l=o*n.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime;break}let d=n.currentTimeline;l&&d.delayNextStep(l);let u=d.currentTime;lv(this,e.animation,n),n.previousNode=e,i.currentStaggerTime=r.currentTime-u+(r.startTime-i.currentTimeline.startTime)}},Cre={},GSe=class t{constructor(e,n,i,r,s,o,a,l){this._driver=e,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Cre,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new xre(this._driver,n,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,n){if(!e)return;let i=e,r=this.options;i.duration!=null&&(r.duration=xb(i.duration)),i.delay!=null&&(r.delay=xb(i.delay));let s=i.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(a=>{(!n||!o.hasOwnProperty(a))&&(o[a]=WU(s[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let n=this.options.params;if(n){let i=e.params={};Object.keys(n).forEach(r=>{i[r]=n[r]})}}return e}createSubContext(e=null,n,i){let r=n||this.element,s=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(e),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(e){return this.previousNode=Cre,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,n,i){let r={duration:n??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},s=new WSe(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,n,i,r,s,o){let a=[];if(r&&a.push(this.element),e.length>0){e=e.replace(EOi,"."+this._enterClassName),e=e.replace(kOi,"."+this._leaveClassName);let l=i!=1,c=this._driver.query(this.element,e,l);i!==0&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!s&&a.length==0&&o.push(WLi(n)),a}},xre=class t{constructor(e,n,i,r){this._driver=e,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let n=this._keyframes.size===1&&this._pendingStyles.size;this.duration||n?(this.forwardTime(this.currentTime+e),n&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=TOi,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,n){this._localTimelineStyles.set(e,n),this._globalTimelineStyles.set(e,n),this._styleSummary.set(e,{time:this.currentTime,value:n})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[n,i]of this._globalTimelineStyles)this._backFill.set(n,i||H_),this._currentKeyframe.set(n,H_);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,n,i,r){n&&this._previousKeyframe.set("easing",n);let s=r&&r.params||{},o=IOi(e,this._globalTimelineStyles);for(let[a,l]of o){let c=WU(l,s,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??H_),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,n)=>{this._currentKeyframe.set(n,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,n)=>{this._currentKeyframe.has(n)||this._currentKeyframe.set(n,e)}))}snapshotCurrentStyles(){for(let[e,n]of this._localTimelineStyles)this._pendingStyles.set(e,n),this._updateStyle(e,n)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let n in this._currentKeyframe)e.push(n);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((n,i)=>{let r=this._styleSummary.get(i);(!r||n.time>r.time)&&this._updateStyle(i,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,n=new Set,i=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((d,u)=>{d===g$?e.add(u):d===H_&&n.add(u)}),i||c.set("offset",l/this.duration),r.push(c)});let s=[...e.values()],o=[...n.values()];if(i){let a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return n9e(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}},WSe=class extends xre{constructor(e,n,i,r,s,o,a=!1){super(e,n,o.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:n,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&n){let s=[],o=i+n,a=n/o,l=new Map(e[0]);l.set("offset",0),s.push(l);let c=new Map(e[0]);c.set("offset",pgt(a)),s.push(c);let d=e.length-1;for(let u=1;u<=d;u++){let m=new Map(e[u]),f=m.get("offset"),_=n+f*i;m.set("offset",pgt(_/o)),s.push(m)}i=o,n=0,r="",e=s}return n9e(this.element,e,this.preStyleProps,this.postStyleProps,i,n,r,!0)}};ASe={},bre=class{constructor(e,n,i){this._triggerName=e,this.ast=n,this._stateStyles=i}match(e,n,i,r){return AOi(this.ast.matchers,e,n,i,r)}buildStyles(e,n,i){let r=this._stateStyles.get("*");return e!==void 0&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(n,i):new Map}build(e,n,i,r,s,o,a,l,c,d){let u=[],m=this.ast.options&&this.ast.options.params||ASe,f=a&&a.params||ASe,_=this.buildStyles(i,f,u),x=l&&l.params||ASe,D=this.buildStyles(r,x,u),E=new Set,M=new Map,I=new Map,z=r==="void",G={params:Igt(x,m),delay:this.ast.options?.delay},A=d?[]:kgt(e,n,this.ast.animation,s,o,_,D,G,c,u),Y=0;return A.forEach(X=>{Y=Math.max(X.duration+X.delay,Y)}),u.length?mgt(n,this._triggerName,i,r,z,_,D,[],[],M,I,Y,u):(A.forEach(X=>{let ne=X.element,pe=cv(M,ne,new Set);X.preStyleProps.forEach(ie=>pe.add(ie));let ce=cv(I,ne,new Set);X.postStyleProps.forEach(ie=>ce.add(ie)),ne!==n&&E.add(ne)}),mgt(n,this._triggerName,i,r,z,_,D,A,[...E.values()],M,I,Y))}};USe=class{constructor(e,n,i){this.styles=e,this.defaultParams=n,this.normalizer=i}buildStyles(e,n){let i=new Map,r=Igt(e,this.defaultParams);return this.styles.styles.forEach(s=>{typeof s!="string"&&s.forEach((o,a)=>{o&&(o=WU(o,r,n));let l=this.normalizer.normalizePropertyName(a,n);o=this.normalizer.normalizeStyleValue(a,l,o,n),i.set(a,o)})}),i}};jSe=class{constructor(e,n,i){this.name=e,this.ast=n,this._normalizer=i,this.transitionFactories=[],this.states=new Map,n.states.forEach(r=>{let s=r.options&&r.options.params||{};this.states.set(r.name,new USe(r.style,s,i))}),fgt(this.states,"true","1"),fgt(this.states,"false","0"),n.transitions.forEach(r=>{this.transitionFactories.push(new bre(e,r,this.states))}),this.fallbackTransition=ROi(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,n,i,r){return this.transitionFactories.find(o=>o.match(e,n,i,r))||null}matchStyles(e,n,i){return this.fallbackTransition.buildStyles(e,n,i)}};FOi=new UU,$Se=class{constructor(e,n,i){this.bodyNode=e,this._driver=n,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,n){let i=[],r=[],s=Mgt(this._driver,n,i,r);if(i.length)throw YLi(i);r.length&&void 0,this._animations.set(e,s)}_buildPlayer(e,n,i){let r=e.element,s=xgt(this._normalizer,e.keyframes,n,i);return this._driver.animate(r,s,e.duration,e.delay,e.easing,[],!0)}create(e,n,i={}){let r=[],s=this._animations.get(e),o,a=new Map;if(s?(o=kgt(this._driver,n,s,Tgt,LSe,new Map,new Map,i,FOi,r),o.forEach(d=>{let u=cv(a,d.element,new Map);d.postStyleProps.forEach(m=>u.set(m,null))})):(r.push(qLi()),o=[]),r.length)throw ZLi(r);a.forEach((d,u)=>{d.forEach((m,f)=>{d.set(f,this._driver.computeStyle(u,f,H_))})});let l=o.map(d=>{let u=a.get(d.element);return this._buildPlayer(d,new Map,u)}),c=hS(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let n=this._getPlayer(e);n.destroy(),this._playersById.delete(e);let i=this.players.indexOf(n);i>=0&&this.players.splice(i,1)}_getPlayer(e){let n=this._playersById.get(e);if(!n)throw XLi(e);return n}listen(e,n,i,r){let s=QSe(n,"","","");return XSe(this._getPlayer(e),i,s,r),()=>{}}command(e,n,i,r){if(i=="register"){this.register(e,r[0]);return}if(i=="create"){let o=r[0]||{};this.create(e,n,o);return}let s=this._getPlayer(e);switch(i){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e);break}}},ggt="ng-animate-queued",LOi=".ng-animate-queued",PSe="ng-animate-disabled",OOi=".ng-animate-disabled",NOi="ng-star-inserted",VOi=".ng-star-inserted",BOi=[],Agt={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},zOi={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},E_="__ng_removed",jU=class{get params(){return this.options.params}constructor(e,n=""){this.namespaceId=n;let i=e&&e.hasOwnProperty("value"),r=i?e.value:e;if(this.value=GOi(r),i){let s=e,{value:o}=s,a=al(s,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let n=e.params;if(n){let i=this.options.params;Object.keys(n).forEach(r=>{i[r]==null&&(i[r]=n[r])})}}},GU="void",RSe=new jU(GU),KSe=class{constructor(e,n,i){this.id=e,this.hostElement=n,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,q6(n,this._hostClassName)}listen(e,n,i,r){if(!this._triggers.has(n))throw QLi(i,n);if(i==null||i.length==0)throw JLi(n);if(!WOi(i))throw eOi(i,n);let s=cv(this._elementListeners,e,[]),o={name:n,phase:i,callback:r};s.push(o);let a=cv(this._engine.statesByElement,e,new Map);return a.has(n)||(q6(e,ure),q6(e,ure+"-"+n),a.set(n,RSe)),()=>{this._engine.afterFlush(()=>{let l=s.indexOf(o);l>=0&&s.splice(l,1),this._triggers.has(n)||a.delete(n)})}}register(e,n){return this._triggers.has(e)?!1:(this._triggers.set(e,n),!0)}_getTrigger(e){let n=this._triggers.get(e);if(!n)throw tOi(e);return n}trigger(e,n,i,r=!0){let s=this._getTrigger(n),o=new $U(this.id,n,e),a=this._engine.statesByElement.get(e);a||(q6(e,ure),q6(e,ure+"-"+n),this._engine.statesByElement.set(e,a=new Map));let l=a.get(n),c=new jU(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(n,c),l||(l=RSe),!(c.value===GU)&&l.value===c.value){if(!$Oi(l.params,c.params)){let x=[],D=s.matchStyles(l.value,l.params,x),E=s.matchStyles(c.value,c.params,x);x.length?this._engine.reportError(x):this._engine.afterFlush(()=>{AM(e,D),OC(e,E)})}return}let m=cv(this._engine.playersByElement,e,[]);m.forEach(x=>{x.namespaceId==this.id&&x.triggerName==n&&x.queued&&x.destroy()});let f=s.matchTransition(l.value,c.value,e,c.params),_=!1;if(!f){if(!r)return;f=s.fallbackTransition,_=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:n,transition:f,fromState:l,toState:c,player:o,isFallbackTransition:_}),_||(q6(e,ggt),o.onStart(()=>{HF(e,ggt)})),o.onDone(()=>{let x=this.players.indexOf(o);x>=0&&this.players.splice(x,1);let D=this._engine.playersByElement.get(e);if(D){let E=D.indexOf(o);E>=0&&D.splice(E,1)}}),this.players.push(o),m.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(n=>n.delete(e)),this._elementListeners.forEach((n,i)=>{this._elementListeners.set(i,n.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let n=this._engine.playersByElement.get(e);n&&(n.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,n){let i=this._engine.driver.query(e,gre,!0);i.forEach(r=>{if(r[E_])return;let s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,n,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,n,i,r){let s=this._engine.statesByElement.get(e),o=new Map;if(s){let a=[];if(s.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let d=this.trigger(e,c,GU,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,n,o),i&&hS(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let n=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(n&&i){let r=new Set;n.forEach(s=>{let o=s.name;if(r.has(o))return;r.add(o);let l=this._triggers.get(o).fallbackTransition,c=i.get(o)||RSe,d=new jU(GU),u=new $U(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(e,n){let i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,n),this.triggerLeaveAnimation(e,n,!0))return;let r=!1;if(i.totalAnimations){let s=i.players.length?i.playersByQueriedElement.get(e):[];if(s&&s.length)r=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,n);else{let s=e[E_];(!s||s===Agt)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,n))}}insertNode(e,n){q6(e,this._hostClassName)}drainQueuedTransitions(e){let n=[];return this._queue.forEach(i=>{let r=i.player;if(r.destroyed)return;let s=i.element,o=this._elementListeners.get(s);o&&o.forEach(a=>{if(a.name==i.triggerName){let l=QSe(s,i.triggerName,i.fromState.value,i.toState.value);l._data=e,XSe(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):n.push(i)}),this._queue=[],n.sort((i,r)=>{let s=i.transition.ast.depCount,o=r.transition.ast.depCount;return s==0||o==0?s-o:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(e){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},YSe=class{_onRemovalComplete(e,n){this.onRemovalComplete(e,n)}constructor(e,n,i){this.bodyNode=e,this.driver=n,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,s)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(n=>{n.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,n){let i=new KSe(e,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(i,n):(this.newHostElements.set(n,i),this.collectEnterElement(n)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,n){let i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(n);for(;a;){let l=r.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(e)}else i.push(e);return r.set(n,e),e}register(e,n){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,n)),i}registerTrigger(e,n,i){let r=this._namespaceLookup[e];r&&r.register(n,i)&&this.totalAnimations++}destroy(e,n){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(e);this.namespacesByHostElement.delete(i.hostElement);let r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1),i.destroy(n),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let n=new Set,i=this.statesByElement.get(e);if(i){for(let r of i.values())if(r.namespaceId){let s=this._fetchNamespace(r.namespaceId);s&&n.add(s)}}return n}trigger(e,n,i,r){if(mre(n)){let s=this._fetchNamespace(e);if(s)return s.trigger(n,i,r),!0}return!1}insertNode(e,n,i,r){if(!mre(n))return;let s=n[E_];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;let o=this.collectedLeaveElements.indexOf(n);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(n,i)}r&&this.collectEnterElement(n)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,n){n?this.disabledNodes.has(e)||(this.disabledNodes.add(e),q6(e,PSe)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),HF(e,PSe))}removeNode(e,n,i){if(mre(n)){let r=e?this._fetchNamespace(e):null;r?r.removeNode(n,i):this.markElementAsRemoved(e,n,!1,i);let s=this.namespacesByHostElement.get(n);s&&s.id!==e&&s.removeNode(n,i)}else this._onRemovalComplete(n,i)}markElementAsRemoved(e,n,i,r,s){this.collectedLeaveElements.push(n),n[E_]={namespaceId:e,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:s}}listen(e,n,i,r,s){return mre(n)?this._fetchNamespace(e).listen(n,i,r,s):()=>{}}_buildInstruction(e,n,i,r,s){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,r,e.fromState.options,e.toState.options,n,s)}destroyInnerAnimations(e){let n=this.driver.query(e,gre,!0);n.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(n=this.driver.query(e,OSe,!0),n.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){let n=this.playersByElement.get(e);n&&n.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){let n=this.playersByQueriedElement.get(e);n&&n.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return hS(this.players).onDone(()=>e());e()})}processLeaveNode(e){let n=e[E_];if(n&&n.setForRemoval){if(e[E_]=Agt,n.namespaceId){this.destroyInnerAnimations(e);let i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}e.classList?.contains(PSe)&&this.markElementAsDisabled(e,!1),this.driver.query(e,OOi,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++){let r=this.collectedEnterElements[i];q6(r,NOi)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{n=this._flushAnimations(i,e)}finally{for(let r=0;r<i.length;r++)i[r]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++){let r=this.collectedLeaveElements[i];this.processLeaveNode(r)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],n.length?hS(n).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(e){throw iOi(e)}_flushAnimations(e,n){let i=new UU,r=[],s=new Map,o=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(ze=>{d.add(ze);let Ge=this.driver.query(ze,LOi,!0);for(let Ae=0;Ae<Ge.length;Ae++)d.add(Ge[Ae])});let u=this.bodyNode,m=Array.from(this.statesByElement.keys()),f=_gt(m,this.collectedEnterElements),_=new Map,x=0;f.forEach((ze,Ge)=>{let Ae=Tgt+x++;_.set(Ge,Ae),ze.forEach(Ye=>q6(Ye,Ae))});let D=[],E=new Set,M=new Set;for(let ze=0;ze<this.collectedLeaveElements.length;ze++){let Ge=this.collectedLeaveElements[ze],Ae=Ge[E_];Ae&&Ae.setForRemoval&&(D.push(Ge),E.add(Ge),Ae.hasAnimation?this.driver.query(Ge,VOi,!0).forEach(Ye=>E.add(Ye)):M.add(Ge))}let I=new Map,z=_gt(m,Array.from(E));z.forEach((ze,Ge)=>{let Ae=LSe+x++;I.set(Ge,Ae),ze.forEach(Ye=>q6(Ye,Ae))}),e.push(()=>{f.forEach((ze,Ge)=>{let Ae=_.get(Ge);ze.forEach(Ye=>HF(Ye,Ae))}),z.forEach((ze,Ge)=>{let Ae=I.get(Ge);ze.forEach(Ye=>HF(Ye,Ae))}),D.forEach(ze=>{this.processLeaveNode(ze)})});let G=[],A=[];for(let ze=this._namespaceList.length-1;ze>=0;ze--)this._namespaceList[ze].drainQueuedTransitions(n).forEach(Ae=>{let Ye=Ae.player,ft=Ae.element;if(G.push(Ye),this.collectedEnterElements.length){let ot=ft[E_];if(ot&&ot.setForMove){if(ot.previousTriggersValues&&ot.previousTriggersValues.has(Ae.triggerName)){let jt=ot.previousTriggersValues.get(Ae.triggerName),zt=this.statesByElement.get(Ae.element);if(zt&&zt.has(Ae.triggerName)){let qt=zt.get(Ae.triggerName);qt.value=jt,zt.set(Ae.triggerName,qt)}}Ye.destroy();return}}let Ft=!u||!this.driver.containsElement(u,ft),Tt=I.get(ft),at=_.get(ft),yt=this._buildInstruction(Ae,i,at,Tt,Ft);if(yt.errors&&yt.errors.length){A.push(yt);return}if(Ft){Ye.onStart(()=>AM(ft,yt.fromStyles)),Ye.onDestroy(()=>OC(ft,yt.toStyles)),r.push(Ye);return}if(Ae.isFallbackTransition){Ye.onStart(()=>AM(ft,yt.fromStyles)),Ye.onDestroy(()=>OC(ft,yt.toStyles)),r.push(Ye);return}let _t=[];yt.timelines.forEach(ot=>{ot.stretchStartingKeyframe=!0,this.disabledNodes.has(ot.element)||_t.push(ot)}),yt.timelines=_t,i.append(ft,yt.timelines);let Re={instruction:yt,player:Ye,element:ft};o.push(Re),yt.queriedElements.forEach(ot=>cv(a,ot,[]).push(Ye)),yt.preStyleProps.forEach((ot,jt)=>{if(ot.size){let zt=l.get(jt);zt||l.set(jt,zt=new Set),ot.forEach((qt,ui)=>zt.add(ui))}}),yt.postStyleProps.forEach((ot,jt)=>{let zt=c.get(jt);zt||c.set(jt,zt=new Set),ot.forEach((qt,ui)=>zt.add(ui))})});if(A.length){let ze=[];A.forEach(Ge=>{ze.push(nOi(Ge.triggerName,Ge.errors))}),G.forEach(Ge=>Ge.destroy()),this.reportError(ze)}let Y=new Map,X=new Map;o.forEach(ze=>{let Ge=ze.element;i.has(Ge)&&(X.set(Ge,Ge),this._beforeAnimationBuild(ze.player.namespaceId,ze.instruction,Y))}),r.forEach(ze=>{let Ge=ze.element;this._getPreviousPlayers(Ge,!1,ze.namespaceId,ze.triggerName,null).forEach(Ye=>{cv(Y,Ge,[]).push(Ye),Ye.destroy()})});let ne=D.filter(ze=>Cgt(ze,l,c)),pe=new Map;ygt(pe,this.driver,M,c,H_).forEach(ze=>{Cgt(ze,l,c)&&ne.push(ze)});let ie=new Map;f.forEach((ze,Ge)=>{ygt(ie,this.driver,new Set(ze),l,g$)}),ne.forEach(ze=>{let Ge=pe.get(ze),Ae=ie.get(ze);pe.set(ze,new Map([...Ge?.entries()??[],...Ae?.entries()??[]]))});let le=[],Se=[],je={};o.forEach(ze=>{let{element:Ge,player:Ae,instruction:Ye}=ze;if(i.has(Ge)){if(d.has(Ge)){Ae.onDestroy(()=>OC(Ge,Ye.toStyles)),Ae.disabled=!0,Ae.overrideTotalTime(Ye.totalTime),r.push(Ae);return}let ft=je;if(X.size>1){let Tt=Ge,at=[];for(;Tt=Tt.parentNode;){let yt=X.get(Tt);if(yt){ft=yt;break}at.push(Tt)}at.forEach(yt=>X.set(yt,ft))}let Ft=this._buildAnimation(Ae.namespaceId,Ye,Y,s,ie,pe);if(Ae.setRealPlayer(Ft),ft===je)le.push(Ae);else{let Tt=this.playersByElement.get(ft);Tt&&Tt.length&&(Ae.parentPlayer=hS(Tt)),r.push(Ae)}}else AM(Ge,Ye.fromStyles),Ae.onDestroy(()=>OC(Ge,Ye.toStyles)),Se.push(Ae),d.has(Ge)&&r.push(Ae)}),Se.forEach(ze=>{let Ge=s.get(ze.element);if(Ge&&Ge.length){let Ae=hS(Ge);ze.setRealPlayer(Ae)}}),r.forEach(ze=>{ze.parentPlayer?ze.syncPlayerEvents(ze.parentPlayer):ze.destroy()});for(let ze=0;ze<D.length;ze++){let Ge=D[ze],Ae=Ge[E_];if(HF(Ge,LSe),Ae&&Ae.hasAnimation)continue;let Ye=[];if(a.size){let Ft=a.get(Ge);Ft&&Ft.length&&Ye.push(...Ft);let Tt=this.driver.query(Ge,OSe,!0);for(let at=0;at<Tt.length;at++){let yt=a.get(Tt[at]);yt&&yt.length&&Ye.push(...yt)}}let ft=Ye.filter(Ft=>!Ft.destroyed);ft.length?UOi(this,Ge,ft):this.processLeaveNode(Ge)}return D.length=0,le.forEach(ze=>{this.players.push(ze),ze.onDone(()=>{ze.destroy();let Ge=this.players.indexOf(ze);this.players.splice(Ge,1)}),ze.play()}),le}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,n,i,r,s){let o=[];if(n){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!s||s==GU;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||o.push(c)})}}return(i||r)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),o}_beforeAnimationBuild(e,n,i){let r=n.triggerName,s=n.element,o=n.isRemovalTransition?void 0:e,a=n.isRemovalTransition?void 0:r;for(let l of n.timelines){let c=l.element,d=c!==s,u=cv(i,c,[]);this._getPreviousPlayers(c,d,o,a,n.toState).forEach(f=>{let _=f.getRealPlayer();_.beforeDestroy&&_.beforeDestroy(),f.destroy(),u.push(f)})}AM(s,n.fromStyles)}_buildAnimation(e,n,i,r,s,o){let a=n.triggerName,l=n.element,c=[],d=new Set,u=new Set,m=n.timelines.map(_=>{let x=_.element;d.add(x);let D=x[E_];if(D&&D.removedBeforeQueried)return new Pb(_.duration,_.delay);let E=x!==l,M=jOi((i.get(x)||BOi).map(Y=>Y.getRealPlayer())).filter(Y=>{let X=Y;return X.element?X.element===x:!1}),I=s.get(x),z=o.get(x),G=xgt(this._normalizer,_.keyframes,I,z),A=this._buildPlayer(_,G,M);if(_.subTimeline&&r&&u.add(x),E){let Y=new $U(e,a,x);Y.setRealPlayer(A),c.push(Y)}return A});c.forEach(_=>{cv(this.playersByQueriedElement,_.element,[]).push(_),_.onDone(()=>HOi(this.playersByQueriedElement,_.element,_))}),d.forEach(_=>q6(_,dgt));let f=hS(m);return f.onDestroy(()=>{d.forEach(_=>HF(_,dgt)),OC(l,n.toStyles)}),u.forEach(_=>{cv(r,_,[]).push(f)}),f}_buildPlayer(e,n,i){return n.length>0?this.driver.animate(e.element,n,e.duration,e.delay,e.easing,i):new Pb(e.duration,e.delay)}},$U=class{constructor(e,n,i){this.namespaceId=e,this.triggerName=n,this.element=i,this._player=new Pb,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((n,i)=>{n.forEach(r=>XSe(e,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let n=this._player;n.triggerCallback&&e.onStart(()=>n.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,n){cv(this._queuedCallbacks,e,[]).push(n)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let n=this._player;n.triggerCallback&&n.triggerCallback(e)}};WF=class{constructor(e,n,i){this._driver=n,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,s)=>{},this._transitionEngine=new YSe(e.body,n,i),this._timelineEngine=new $Se(e.body,n,i),this._transitionEngine.onRemovalComplete=(r,s)=>this.onRemovalComplete(r,s)}registerTrigger(e,n,i,r,s){let o=e+"-"+r,a=this._triggerCache[o];if(!a){let l=[],c=[],d=Mgt(this._driver,s,l,c);if(l.length)throw $Li(r,l);c.length&&void 0,a=POi(r,d,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(n,r,a)}register(e,n){this._transitionEngine.register(e,n)}destroy(e,n){this._transitionEngine.destroy(e,n)}onInsert(e,n,i,r){this._transitionEngine.insertNode(e,n,i,r)}onRemove(e,n,i){this._transitionEngine.removeNode(e,n,i)}disableAnimations(e,n){this._transitionEngine.markElementAsDisabled(e,n)}process(e,n,i,r){if(i.charAt(0)=="@"){let[s,o]=lgt(i),a=r;this._timelineEngine.command(s,n,o,a)}else this._transitionEngine.trigger(e,n,i,r)}listen(e,n,i,r,s){if(i.charAt(0)=="@"){let[o,a]=lgt(i);return this._timelineEngine.listen(o,n,a,s)}return this._transitionEngine.listen(e,n,i,r,s)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};GF=class GF{constructor(e,n,i){this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;let r=GF.initialStylesByElement.get(e);r||GF.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&OC(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(OC(this._element,this._initialStyles),this._endStyles&&(OC(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(GF.initialStylesByElement.delete(this._element),this._startStyles&&(AM(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(AM(this._element,this._endStyles),this._endStyles=null),OC(this._element,this._initialStyles),this._state=3)}};GF.initialStylesByElement=new WeakMap;qSe=GF;wre=class{constructor(e,n,i,r){this.element=e,this.keyframes=n,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let n=()=>this._onFinish();this.domPlayer.addEventListener("finish",n),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",n)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let n=[];return e.forEach(i=>{n.push(Object.fromEntries(i))}),n}_triggerWebAnimation(e,n,i){return e.animate(this._convertKeyframesToObject(n),i)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{r!=="offset"&&e.set(r,this._finished?i:i9e(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){let n=e==="start"?this._onStartFns:this._onDoneFns;n.forEach(i=>i()),n.length=0}},Sre=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,n){return bgt(e,n)}getParentElement(e){return JSe(e)}query(e,n,i){return wgt(e,n,i)}computeStyle(e,n,i){return i9e(e,n)}animate(e,n,i,r,s,o=[]){let a=r==0?"both":"forwards",l={duration:i,delay:r,fill:a};s&&(l.easing=s);let c=new Map,d=o.filter(f=>f instanceof wre);mOi(i,r)&&d.forEach(f=>{f.currentSnapshot.forEach((_,x)=>c.set(x,_))});let u=uOi(n).map(f=>new Map(f));u=fOi(e,u,c);let m=KOi(e,u);return new wre(e,u,l,m)}},fre="@",Rgt="@.disabled",Tre=class{constructor(e,n,i,r){this.namespaceId=e,this.delegate=n,this.engine=i,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,n){return this.delegate.createElement(e,n)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,n){this.delegate.appendChild(e,n),this.engine.onInsert(this.namespaceId,n,e,!1)}insertBefore(e,n,i,r=!0){this.delegate.insertBefore(e,n,i),this.engine.onInsert(this.namespaceId,n,e,r)}removeChild(e,n,i){this.parentNode(n)&&this.engine.onRemove(this.namespaceId,n,this.delegate)}selectRootElement(e,n){return this.delegate.selectRootElement(e,n)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,n,i,r){this.delegate.setAttribute(e,n,i,r)}removeAttribute(e,n,i){this.delegate.removeAttribute(e,n,i)}addClass(e,n){this.delegate.addClass(e,n)}removeClass(e,n){this.delegate.removeClass(e,n)}setStyle(e,n,i,r){this.delegate.setStyle(e,n,i,r)}removeStyle(e,n,i){this.delegate.removeStyle(e,n,i)}setProperty(e,n,i){n.charAt(0)==fre&&n==Rgt?this.disableAnimations(e,!!i):this.delegate.setProperty(e,n,i)}setValue(e,n){this.delegate.setValue(e,n)}listen(e,n,i){return this.delegate.listen(e,n,i)}disableAnimations(e,n){this.engine.disableAnimations(e,n)}},ZSe=class extends Tre{constructor(e,n,i,r,s){super(n,i,r,s),this.factory=e,this.namespaceId=n}setProperty(e,n,i){n.charAt(0)==fre?n.charAt(1)=="."&&n==Rgt?(i=i===void 0?!0:!!i,this.disableAnimations(e,i)):this.engine.process(this.namespaceId,e,n.slice(1),i):this.delegate.setProperty(e,n,i)}listen(e,n,i){if(n.charAt(0)==fre){let r=qOi(e),s=n.slice(1),o="";return s.charAt(0)!=fre&&([s,o]=ZOi(s)),this.engine.listen(this.namespaceId,r,s,o,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,i,a)})}return this.delegate.listen(e,n,i)}};Dre=class{constructor(e,n,i){this.delegate=e,this.engine=n,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,n.onRemovalComplete=(r,s)=>{s?.removeChild(null,r)}}createRenderer(e,n){let i="",r=this.delegate.createRenderer(e,n);if(!e||!n?.data?.animation){let c=this._rendererCache,d=c.get(r);if(!d){let u=()=>c.delete(r);d=new Tre(i,r,this.engine,u),c.set(r,d)}return d}let s=n.id,o=n.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(s,o,e,c.name,c)};return n.data.animation.forEach(a),new ZSe(this,o,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,n,i){if(e>=0&&e<this._microtaskId){this._zone.run(()=>n(i));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(s=>{let[o,a]=s;o(a)}),this._animationCallbacksBuffer=[]})}),r.push([n,i])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}});function JOi(){return new yre}function eNi(t,e,n){return new Dre(t,e,n)}function Lgt(){return pj("NgEagerAnimations"),[...tNi]}var QOi,Fgt,tNi,pDr,Ogt=Q(()=>{me();me();od();s9e();s9e();ri();QOi=(()=>{let e=class e extends WF{constructor(i,r,s){super(i,r,s)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(r){return new(r||e)(it(Lr),it(PM),it(RM))},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})();Fgt=[{provide:RM,useFactory:JOi},{provide:WF,useClass:QOi},{provide:hj,useFactory:eNi,deps:[w$,WF,pn]}],tNi=[{provide:PM,useFactory:()=>new Sre},{provide:Ic,useValue:"BrowserAnimations"},...Fgt],pDr=[{provide:PM,useClass:e9e},{provide:Ic,useValue:"NoopAnimations"},...Fgt]});var Z6,Ngt=Q(()=>{Z6={production:!0,backend:"",autoLogin:!1}});var Vgt,Bgt=Q(()=>{me();me();Vgt=(()=>{let e=class e{constructor(){this.nxtLongPress=500,this.nxtOnLongPressed=new nt}ngOnInit(){}ngOnDestroy(){clearInterval(this.mouseDownTimeout)}onMouseUp(i){clearInterval(this.mouseDownTimeout)}onMouseOut(i){clearInterval(this.mouseDownTimeout)}onTouchEnd(i){clearInterval(this.mouseDownTimeout)}onMouseDown(i){this.mouseDownTimeout=setTimeout(()=>{this.nxtOnLongPressed.emit()},this.nxtLongPress)}onTouchStart(i){this.mouseDownTimeout=setTimeout(()=>{this.nxtOnLongPressed.emit()},this.nxtLongPress)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=mi({type:e,selectors:[["","nxtLongPress",""]],hostBindings:function(r,s){r&1&&F("mouseup",function(a){return s.onMouseUp(a)})("mouseout",function(a){return s.onMouseOut(a)})("touchend",function(a){return s.onTouchEnd(a)})("mousedown",function(a){return s.onMouseDown(a)})("touchstart",function(a){return s.onTouchStart(a)})},inputs:{nxtLongPress:"nxtLongPress"},outputs:{nxtOnLongPressed:"nxtOnLongPressed"},standalone:!0});let t=e;return t})()});var iNi,zgt,Hgt=Q(()=>{ng();me();iNi=["*"],zgt=(()=>{let e=class e{constructor(){this.visible=!1}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-smooth-visibility"]],hostVars:1,hostBindings:function(r,s){r&2&&_y("@visible",s.visible)},inputs:{visible:"visible"},standalone:!0,features:[xe],ngContentSelectors:iNi,decls:1,vars:0,template:function(r,s){r&1&&(gr(),Ln(0))},styles:["[_nghost-%COMP%]{opacity:0}"],data:{animation:[Nd("visible",[bc("true",So({opacity:"1"})),bc("false",So({opacity:"0"})),cl("* <=> *",[Ml(".4s ease")])])]}});let t=e;return t})()});function sNi(t,e){if(t&1){let n=re();h(0,"img",19),F("nxtOnLongPressed",function(){V(n);let r=w();return B(r.logoLongPressed())}),p()}if(t&2){let n=w();b("nxtLongPress",1e3)("src",n.logoSrc,Ur)}}function oNi(t,e){if(t&1){let n=re();vs(0),h(1,"nxt-input",20,4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.password,r)||(s.password=r),B(r)}),F("onFocus",function(){V(n);let r=w();return B(r.onFocusPassword())}),p(),h(3,"nxt-slide-toggle",21),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showPassword,r)||(s.showPassword=r),B(r)}),y(4,"Passwort anzeigen"),p(),ys()}if(t&2){let n=w();g(),qe("value",n.password),b("type",n.showPassword?"text":"password"),g(2),qe("value",n.showPassword)}}function aNi(t,e){if(t&1){let n=re();vs(0),h(1,"nxt-input",22,4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.password,r)||(s.password=r),B(r)}),p(),h(3,"nxt-input",23,4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.newPassword1,r)||(s.newPassword1=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.checkCanChangePassword())}),p(),h(5,"nxt-input",24,4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.newPassword2,r)||(s.newPassword2=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.checkCanChangePassword())}),p(),ys()}if(t&2){let n=w();g(),qe("value",n.password),g(2),b("validators",n.passwordValidator),qe("value",n.newPassword1),g(2),b("validators",n.passwordValidator),qe("value",n.newPassword2)}}function lNi(t,e){if(t&1&&(h(0,"div",25),ee(1,"div",26),Ce(2,"safeHtml"),p()),t&2){let n=w();g(),b("innerHTML",tt(2,1,n.errorMessage),Pi)}}var nNi,rNi,o9e,Ggt=Q(()=>{a4();gu();Ci();Ld();Yc();VX();zn();M7();Jr();Yhe();$v();o2();nc();Nu();ha();Zi();aD();rA();Bgt();ri();Hgt();An();Vt();B8();oo();me();ma();yi();gu();Ci();Kr();ag();Cs();Jk();Vt();An();nNi=["loginBtn"],rNi=["inputPassword"];o9e=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d,u,m,f){this.router=i,this.socketService=r,this.route=s,this.shortcutService=o,this.dialogService=a,this.loginService=l,this.storageService=c,this.configService=d,this.firebaseLoginService=u,this.cdRef=m,this.localStorageService=f,this.lastLoginTimestamp=0,this.errorMessage="",this.loginButtonText="Anmelden",this.studio="",this.workplace="",this.username="",this.password="",this.workPlaceTools=Cg,this.logoSrc="",this.passwordStrengthToLow=!1,this.setNewPassword=!1,this.passwordValidator=ii.password,this.newPassword1="",this.newPassword2="",this.disableLoginButton=!1,this.testValue="",this.showPassword=!1,window.location.hostname==="paypal.nxt-lvl.ink"&&(window.location.href="https://nxt-lvl.ink"),this.usernames=this.configService.config.value.users.filter(_=>!_.hidden).sort(Hr.sortString("username")),this.showIframeInterval=setInterval(()=>{zi.instance.showIframe("login","Login")},3e4)}test(){alert("hallo")}reLogin(){return O(this,null,function*(){this.loginService.showLoginDialog=!0,yield za.sleep(500),yield this.firebaseLoginService.logout(),this.socketService.disconnectSocket()})}ngOnInit(){return O(this,null,function*(){this.loadTest(),this.loginService.showLoginDialog=!this.storageService.get("FirebaseLoggedIn",!1),this.logoSrc="/assets/logo/studio/logo_"+this.configService.config.value.studioRegion?.toLowerCase()+"_white.svg",this.route.snapshot.queryParams.setNewPassword&&(this.setNewPassword=!0,this.loginButtonText="neues Passwort setzen",this.disableLoginButton=!0),this.route.snapshot.queryParams.reLogin&&(yield this.reLogin()),this.registerServiceEvents(),this.setLastLoginFromStorage(),this.shortcutSubscription=this.shortcutService.onKeyPress.subscribe(i=>{i===Pn.Enter&&!this.disableLoginButton&&!this.loginRunning&&this.login(!0)}),zi.instance.showIframe("login-init","Calendar"),setTimeout(()=>{this.storageService.get("FirebaseLoggedIn",!1)||(this.loginService.showLoginDialog=!0)},2e3),setTimeout(()=>{this.loginService.showLoginDialog=!0},2500),this.router.url==="/logout"&&(this.firebaseLoginService.logout(),this.loginService.clearSavedLogin(!0,"logout"))})}ngOnDestroy(){this.authSubscription?.unsubscribe(),this.authFailedSubscription?.unsubscribe(),this.shortcutSubscription?.unsubscribe(),this.connectionChangeListenerSubscription?.unsubscribe(),this.firebaseLoginFailedSubscription?.unsubscribe(),Cu.clear(this.showIframeInterval)}registerServiceEvents(){this.firebaseLoginFailedSubscription=this.firebaseLoginService.onLoginFailed.subscribe(i=>{setTimeout(()=>{this.dialogService.hideLoading(_n.Login),this.loginService.showLoginDialog=!0,this.errorMessage=i.message},500)}),this.authSubscription=this.socketService.state.subscribe(i=>O(this,null,function*(){if(i.authenticated){if(this.passwordStrengthToLow||this.setNewPassword)this.setNewPassword?this.newPassword1===this.newPassword2&&(yield this.loginService.setNewPassword(this.newPassword1),yield this.reLogin(),this.setNewPassword=!1,this.password="",this.loginButtonText="Anmelden"):(this.dialogService.hideLoading(_n.Login),yield this.dialogService.showOk("Dein Passwort ist zu schwach, bitte lege ein neues Passwort fest"),this.socketService.state.getValue().authenticated&&(yield this.firebaseLoginService.logout(),this.socketService.disconnectSocket(),this.loginService.clearSavedLogin(!1,"neu Einloggen"),this.setNewPassword=!0,this.cdRef.detectChanges(),this.loginService.showLoginDialog=!0));else{let r=this.getReturnUrl();r&&r.length>1?(Gn.info("LOGIN navigate after login to"+r),zi.instance.hideIframe("calendar-event-edit login",1e3),setTimeout(()=>{let s=r+this.getUrlLoginQuery();this.router.navigateByUrl(s,{skipLocationChange:!1})},100)):this.router.navigateByUrl("/")}this.dialogService.hideLoading(_n.Login)}})),this.authFailedSubscription=this.socketService.onSocketUnauthorized.subscribe(i=>{this.firebaseLoginService.logout(),this.dialogService.hideLoading(_n.Login);let r=yx.getMessage(i);r.includes("Firebase ID token has incorrect")&&Cm.reload("Firebase ID token has incorrect"),this.dialogService.showOk(r),this.loginService.showLoginDialog=!0}),this.authFailedSubscription=this.firebaseLoginService.onLoginChanged.subscribe(i=>O(this,null,function*(){i&&!this.socketService.state.getValue().authenticated&&(this.username&&this.workplace&&this.studio?(this.dialogService.closeButtonChooser(),Ie.dateDiffToNow(this.lastLoginTimestamp)>1500&&this.login(!1)):this.firebaseLoginService.logout())}))}login(i){return O(this,null,function*(){try{if(!this.studio||!this.workplace)return;if(this.loginRunning=!0,this.username=cr.firstCharUppercase(this.username),i&&(this.passwordStrengthToLow=!iT.getPasswordStrength(this.password).ok),(!this.username||!this.studio||!this.workplace)&&this.askNext(),i&&!this.password){this.inputPassword?.setFocus(),this.loginRunning=!1;return}this.lastLoginTimestamp=Date.now(),this.startDelayedLoginTimeout&&clearTimeout(this.startDelayedLoginTimeout),this.loginService.showLoginDialog=!1;let r=1e4;this.dialogService.showLoading(_n.Login,"login...");let s=this.configService.config.value.studios.find(o=>o.name===this.studio).realStudio;yield this.loginService.login(this.username,this.studio,s??this.studio,Cg.getValue(this.workplace),this.password,i),this.password=""}catch{}this.loginRunning=!1})}getReturnUrl(){return this.route.snapshot.queryParams.returnUrl||"/"}askUsername(){return O(this,null,function*(){let i=[this.usernames.map(s=>({text:s.username,color:s.color,backgroundColor:s.backgroundColor}))],r=yield this.dialogService.showButtonChooser({buttonRows:i,title:"Wer bist du?",text:"",minWidth:"80%",value:"",hideBackButton:!0});r&&typeof r!="string"&&r.text&&(this.username!==r.text&&(this.username=r.text,this.studio="",this.workplace="",this.password=""),this.askNext())})}askStudio(){return O(this,null,function*(){if(!this.usernames.find(c=>c.username===this.username))return;let r="",s="";this.loginService.ip==="37.24.101.11"?s="Villa":this.loginService.ip==="37.24.177.51"&&(s="Brand");let o=this.configService.config.value.studios.filter(c=>!["Alsdorf","Alsdorf 2","Brand"].includes(c.name)).map(c=>({text:c.name})),a=this.localStorageService.get("StudioLogins",[]);a.length>0&&(o=o.filter(c=>a.includes(c.text)));let l;if(o.length===1?l=o[0]:l=yield this.dialogService.showButtonChooser({buttonRows:[o],title:"Welche Kasse?",text:"",minWidth:"80%",value:"",hideBackButton:!0}),l)r=l.text,s&&!r.includes(s)&&this.configService.config.value.studios.find(c=>c.name===s)&&((yield this.dialogService.showYesNo("Bist du dir sicher, dich in "+(r==="Villa"?"der ":"")+"<strong>"+r+"</strong> anzumelden, obwohl du dich in "+(s==="Villa"?"der ":"")+"<strong>"+s+"</strong> befindest?"))||(r=""));else return;this.studio=r,r&&this.askNext()})}askWorkplace(){return O(this,null,function*(){if(!this.usernames.find(c=>c.username===this.username))return;let r=this.storageService.get("DisabledWorkplaces",[]),s=[],o=this.configService.config.value.users.find(c=>c.username===this.username);if(!o)return;(!o.workplaces||o.workplaces.includes("reception"))&&s.push({text:"Empfang",value:"reception"}),o.workplaces?.includes("backoffice")&&!r.includes("backoffice")&&s.push({text:"Backoffice",value:"backoffice"});let a=this.localStorageService.get("WorkplaceLogins",[]);a.length>0&&(s=s.filter(c=>a.includes(c.value)));let l;if(s.length===1?l=s[0]:l=yield this.dialogService.showButtonChooser({buttonRows:[s],title:"An welchem Arbeitsplatz bist du?",text:"",minWidth:"80%",value:"",hideBackButton:!0}),l)typeof l!="string"&&l.value&&(this.workplace=l.value.toString(),this.askNext());else return})}getUrlLoginQuery(){let i=this.route.snapshot.queryParams.username,r=this.route.snapshot.queryParams.password,s=this.route.snapshot.queryParams.studio;return i&&r&&s?"?username="+i+"&password="+r+"&studio="+s:""}askNext(){requestAnimationFrame(()=>{this.studio?this.workplace?this.inputPassword?.click():this.askWorkplace():this.askStudio()})}setLastLoginFromStorage(){let i=this.storageService.get("CurrentLogin",null);i&&(this.route.snapshot.queryParams.username?this.username=this.route.snapshot.queryParams.username:this.username=i.username,this.studio=i.studio,this.workplace=i.workplace),this.username&&this.studio&&this.workplace&&this.focusPassword()}focusPassword(){setTimeout(()=>{this.inputPassword?.click()},200)}logoLongPressed(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Welches Handy",{yesText:"Foto 12er",noText:"Foto 13er"}))?this.username="Foto12er":this.username="Foto13er"})}checkCanChangePassword(){this.loginButtonText="neues Passwort setzen",this.disableLoginButton=!1,this.password?this.newPassword1!==this.newPassword2?(this.loginButtonText="Passw\xF6rter stimmen nicht \xFCberein",this.disableLoginButton=!0):this.password===this.newPassword1?(this.loginButtonText="Das neue Passwort darf nicht dein altes Passwort sein",this.disableLoginButton=!0):this.disableLoginButton=!iT.getPasswordStrength(this.newPassword1).ok:this.disableLoginButton=!0}usernameChanged(){this.username!==cr.firstCharUppercase(this.username)&&(this.username=cr.firstCharUppercase(this.username)),this.usernames.find(r=>r.username===this.username)||(this.workplace="",this.studio="")}onFocusPassword(){setTimeout(()=>{this.studio||this.askStudio()},200)}testChanged(){this.storageService.setByString("test",this.testValue)}loadTest(){this.testValue=this.storageService.getByString("test","")}};e.\u0275fac=function(r){return new(r||e)(R(Ll),R(lt),R(gs),R(fu),R(vt),R(Fi),R(vu),R(Xi),R(q_),R(Kt),R(vu))},e.\u0275cmp=_e({type:e,selectors:[["nxt-login"]],viewQuery:function(r,s){if(r&1&&(ei(nNi,5),ei(rNi,5)),r&2){let o;Pt(o=Rt())&&(s.loginButton=o.first),Pt(o=Rt())&&(s.inputPassword=o.first)}},standalone:!0,features:[xe],decls:24,vars:12,consts:[["inputUsername",""],["inputStudio",""],["inputWorkplace",""],["loginButton",""],["inputPassword",""],["fxLayoutAlign","start center","fxLayoutAlign.lt-sm","center center","fxLayout","row",1,"wrapper","nxt-page","w-full"],["fxFlex","20%","fxShow.lt-sm","false",1,"text-120"],["fxFlex","","fxLayoutAlign.lt-sm","center center",3,"visible"],["fxFlex.lt-sm","90","fxFlex.gt-xs","350px","fxLayout","column"],["fxLayoutAlign","center","fxLayout","row",1,"logo-wrapper"],["fxFlex","90","fxFlex.lt-sm","80","style"," padding-bottom: 6vh",3,"nxtLongPress","src","nxtOnLongPressed",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center"],["placeholder","Benutzer",3,"valueChange","value"],["placeholder","Kasse",3,"inputClick","readonly","value"],["placeholder","Arbeitsplatz",3,"inputClick","readonly","value"],[4,"ngIf"],["style","max-width: 300px","class","error-message",4,"ngIf"],["align","center","fxFlex",""],[2,"margin","auto",3,"click","disabled"],["fxFlex","90","fxFlex.lt-sm","80",2,"padding-bottom","6vh",3,"nxtOnLongPressed","nxtLongPress","src"],["placeholder","Passwort",3,"valueChange","onFocus","value","type"],[3,"valueChange","value"],["placeholder","altes Passwort","type","password",3,"valueChange","value"],["placeholder","neues Passwort","type","password",3,"valueChange","validators","value"],["placeholder","neues Passwort wiederholen","type","password",3,"valueChange","validators","value"],[1,"error-message",2,"max-width","300px"],[3,"innerHTML"]],template:function(r,s){if(r&1){let o=re();h(0,"div",5),ee(1,"div",6),h(2,"nxt-smooth-visibility",7)(3,"div",8)(4,"div",9),W(5,sNi,1,2,"img",10),p(),h(6,"div")(7,"div",11)(8,"nxt-input",12,0),Xe("valueChange",function(l){return V(o),Ze(s.username,l)||(s.username=l),B(l)}),F("valueChange",function(){return V(o),B(s.usernameChanged())}),p(),h(10,"nxt-input",13,1),F("inputClick",function(){return V(o),B(s.askStudio())}),p(),h(12,"nxt-input",14,2),F("inputClick",function(){return V(o),B(s.askWorkplace())}),p(),W(14,oNi,5,3,"ng-container",15)(15,aNi,7,5,"ng-container",15),ee(16,"br"),W(17,lNi,3,3,"div",16),ee(18,"br"),h(19,"nxt-row")(20,"nxt-col",17)(21,"nxt-button",18,3),F("click",function(){return V(o),B(s.login(!0))}),y(23),p()()()()()()()()}r&2&&(g(2),b("visible",s.loginService.showLoginDialog),g(3),b("ngIf",s.logoSrc),g(3),qe("value",s.username),g(2),b("readonly",!0)("value",s.studio),g(2),b("readonly",!0)("value",s.workPlaceTools.getText(s.workplace)),g(2),b("ngIf",!s.setNewPassword),g(),b("ngIf",s.setNewPassword),g(2),b("ngIf",s.errorMessage),g(4),b("disabled",s.disableLoginButton||s.loginRunning),g(2),Ke("",s.loginButtonText," "))},dependencies:[At,Yt,oi,qi,Dn,Dv,zgt,Vgt,Yi,d5,jv,Lt,Or,Ct,Nn],styles:[".wrapper[_ngcontent-%COMP%]{background-image:url(/assets/images/login-background-1.jpg);background-position:center;background-repeat:no-repeat;background-size:cover}.login-container[_ngcontent-%COMP%]{position:fixed;inset:0;border:1px solid red}mat-card[_ngcontent-%COMP%]{margin:auto}mat-form-field[_ngcontent-%COMP%]{width:300px}button[_ngcontent-%COMP%]{width:150px}.error-message[_ngcontent-%COMP%]{color:#f55}nxt-input[_ngcontent-%COMP%]{width:100%}"]});let t=e;return t})()});var ur,Wgt=Q(()=>{Ld();me();ma();yi();jl();Ci();ur=(()=>{let e=class e{constructor(i,r,s,o,a){this.router=i,this.socketService=r,this.route=s,this.permissionService=o,this.dialogService=a}canActivate(i,r){return O(this,null,function*(){if(console.log(i.routeConfig.path),console.log(i.routeConfig.path),console.log(i.routeConfig.path),window.location.hostname==="paypal.nxt-lvl.ink"&&(window.location.href="https://nxt-lvl.ink"),e.firstCalledUrl||(e.firstCalledUrl=r.url),this.socketService.state.getValue().authenticated){if(yield this.permissionService.waitForPermissions(),i.data.permission&&!this.permissionService.hasPermission(i.data.permission)){debugger;return this.dialogService.showOk(`Du hast keine Berechtigung f\xFCr diese Seite
`+i.routeConfig.path),this.router.navigate(["/login"])}return Gn.info("AuthGuard -> true"),!0}else return Gn.info("AuthGuard -> false | returnUrl = "+r.url),this.router.navigate(["/login"],{queryParams:this.getQueryParams(r),skipLocationChange:!0})})}getQueryParams(i){let r={returnUrl:i.url},s=this.route.snapshot.queryParams.username,o=this.route.snapshot.queryParams.password,a=this.route.snapshot.queryParams.studio;return s&&o&&a&&(r.username=s,r.password=o,r.studio=a),r}};e.\u0275fac=function(r){return new(r||e)(it(Ll),it(lt),it(gs),it(ws),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Ugt,jgt=Q(()=>{ma();a4();Zi();Vt();me();ma();L1();Ci();z1();Vt();Ugt=(()=>{let e=class e{constructor(i,r,s,o){this.router=i,this.httpClient=r,this.dialogService=s,this.bodyPutService=o}ngOnInit(){}restart(){let i=window.location.origin.split(":")[0]+":"+window.location.origin.split(":")[1];this.httpClient.get(i+":82/api/restart").toPromise()}showBodyPutChooser(){return O(this,null,function*(){let i=yield this.bodyPutService.showBodyPutChooser();alert(JSON.stringify(i))})}test(){return O(this,null,function*(){let i=yield zi.instance.sendGet(P1.getWindow);i.document.querySelector("#iframeWrapper").style.border="5px solid green;"})}};e.\u0275fac=function(r){return new(r||e)(R(Ll),R(Uc),R(vt),R(Oc))},e.\u0275cmp=_e({type:e,selectors:[["nxt-debug"]],standalone:!0,features:[xe],decls:17,vars:0,consts:[["fxLayout","column","fxLayoutAlign","space-evenly center",2,"height","100%","background-color","#2A2A2A"],["routerLink","/e/1ispt6ib0asqb11fijq79dj9mp"],["routerLink","/win"],["routerLink","/set-code"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"nxt-button",1),y(2,"EVENT-EDIT"),p(),h(3,"nxt-button",2),y(4,"Gewinnspiel"),p(),h(5,"nxt-button",3),y(6,"set"),p(),h(7,"nxt-button",4),F("click",function(){return s.restart()}),y(8,"RESTART"),p(),h(9,"nxt-button",4),F("click",function(){return s.dialogService.showLoading(null,"test ...")}),y(10,"show loading"),p(),h(11,"nxt-button",4),F("click",function(){return s.dialogService.hideLoading(null)}),y(12,"hide loading"),p(),h(13,"nxt-button",4),F("click",function(){return s.showBodyPutChooser()}),y(14,"showBodyPutChooser"),p(),h(15,"nxt-button",4),F("click",function(){return s.test()}),y(16,"test"),p()())},dependencies:[At,Yt,oi,Lt,kK],styles:["nxt-button[_ngcontent-%COMP%]{height:40px;width:200px}"]});let t=e;return t})()});var Ere,$gt=Q(()=>{Ere=class{static splitNameToGivenAndFamilyName(e){let n=e.trim().split(" "),i={givenName:"",familyName:""};return n.length===2?(i.givenName=n[0],i.familyName=n[1]):n.length===3&&(i.givenName=n[0]+" "+n[1],i.familyName=n[2]),i}}});var Kgt,Ygt=Q(()=>{a4();Ld();$gt();me();ma();Ci();yi();Kgt=(()=>{let e=class e{constructor(i,r,s){this.route=i,this.dialogService=r,this.socketService=s}ngOnInit(){return O(this,null,function*(){Gn.info(this.generateAddContactUrl());let i=this.trimAllQueryParams(this.route.snapshot.queryParams),r=i.givenName?i.givenName.trim():"",s=i.familyName?i.familyName.trim():"",o=r+" "+s,a={id:"",givenName:r,familyName:s,fullName:o,streetAddress:i.streetAddress?i.streetAddress.trim():"",postalCode:i.postalCode?i.postalCode.trim():"",city:i.city?i.city.trim():"",email:i.email?i.email.toString().toLowerCase():"",mobile:i.mobile?i.mobile.trim():"",birthday:i.birthday?i.birthday.trim():"",taglines:[],canceledEvents:[],events:[],closedEvents:[],createdAt:Date.now(),updatedAt:Date.now(),createdBy:"",updatedBy:""};if(a.mobile.startsWith("49")&&(a.mobile="+"+a.mobile),a.givenName===""&&a.familyName===""&&i.name){let c=Ere.splitNameToGivenAndFamilyName(i.name);a.givenName=c.givenName,a.familyName=c.familyName}zi.instance.showIframe("add-contact","Calendar"),this.editContactDialogRef=this.dialogService.showContactForm(a);let l=yield this.editContactDialogRef.afterClosed().toPromise();zi.instance.hideIframe("add-contact")})}generateAddContactUrl(){let i="https://test.nxt-lvl.ink/#/add-contact?";return i+="givenName="+encodeURIComponent("Julian"),i+="&familyName="+encodeURIComponent("Krafft"),i+="&streetAddress="+encodeURIComponent("Lindenstra\xDFe 3"),i+="&postalCode="+encodeURIComponent("52146"),i+="&city="+encodeURIComponent("W\xFCrselen"),i+="&email="+encodeURIComponent("mail@krafft.solutions"),i+="&mobile="+encodeURIComponent("015120123232"),i}trimAllQueryParams(i){let r=[];for(let s of Object.keys(i))r[s]=i[s].trim();return r}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(vt),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-add-contact"]],standalone:!0,features:[xe],decls:0,vars:0,template:function(r,s){}});let t=e;return t})()});var qgt,Zgt=Q(()=>{me();Ci();yi();qgt=(()=>{let e=class e{constructor(i,r){this.dialogService=i,this.socketService=r}ngOnInit(){return O(this,null,function*(){})}};e.\u0275fac=function(r){return new(r||e)(R(vt),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-julian-start"]],standalone:!0,features:[xe],decls:12,vars:0,consts:[[2,"width","100%","height","100%","display","flex","flex-direction","column"],[2,"display","flex","flex","10%","padding","5px","flex-direction","column","justify-content","center","align-items","center"],[2,"flex","90%","border","1px solid red","display","flex","flex-direction","row","align-items","center","justify-content","center"],[2,"flex","1","height","90%"],[2,"flex","1","height","90%","font-size","x-large"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div")(3,"div"),y(4,"KLEBEBAND"),p()()(),h(5,"div",2)(6,"button",3),y(7,"-"),p(),h(8,"div",4),y(9,"500"),p(),h(10,"button",3),y(11,"+"),p()()())}});let t=e;return t})()});var Xgt,Qgt=Q(()=>{Xgt=(()=>{let e=class e{static getCities(i){return i?this.cities.filter(s=>s.startsWith(i)):this.cities}};e.cities=["Aach","Aacha","Aachen","Aalen","Aalen-Attenhofen","Aalen-Ebnat","Aalen-Essingen","Aalen-Fachsenfeld","Aalen-Unterkochen","Aalen-Unterrombach","Aarbergen","Aarbergen-Michelbach","Aasen","Abbendorf","Abberode","Abenberg","Abenden","Abens","Abensberg","Abensberg Gaden","Abensberg Offenstetten","Abensberg Sandharlanden","Abersfeld","Absberg","Abstatt","Absteinach","Abstetterhof","Abtsgm\xFCnd","Abtsteinach","Abtswind","Ach","Achberg","Achenbach","Achern","Achern/Gamshurst","Achern-M\xF6sbach","Achern-Sasbachried","Achim","Achim-Baden","Achterwehr","Achtrup","Adelberg","Adelebsen","Adelheidsdorf","Adelmannsfelden","Adelsdorf","Adelsdorf-Neuhaus","Adelsheim","Adelshofen","Adelstetten","Adelzhausen","Adenau","Adendorf","Aderstedt","Adlersberg","Adlkofen","Admannshagen","Adolzhausen","Adorf","Adorf/Vogtl","Aerzen","Aerzen-Gro\xDF-Berkel","Affalterbach","Affecking","Affing","Affinghausen","Affing-M\xFChlhausen","Aftholderberg","Agatharied","Agathenburg","Agathsried","Aglasterhausen","Ahaus","Ahausen","Ahaus-Ottenstein","Ahden","Ahlbeck","Ahlden (Aller)","Ahlen","Ahlerstedt","Ahlhorn","Ahlum","Ahnatal","Ahnebeck","Ahneby","Ahnsbeck","Ahnsen","Aholfing","Aholming-Probstschwaig","Ahorn","Ahorntal","Ahrain","Ahrbergen","Ahrbr\xFCck","Ahrensb\xF6k","Ahrensburg","Ahrensburg-Ahrensfelde","Ahrensdorf","Ahrensfelde","Ahrensfelde-Blumberg","Ahrensfelde OT Lindenberg","Ahrenshoop","Ahrweiler","Ahsen","Aich","Aicha","Aichach","Aichach-Ecknach","Aichach-Grie\xDFbeckerzell","Aichach-Unterwittelsbach","Aicha vorm Wald","Aichelberg","Aichen","Aichstetten","Aichtal","Aichwald","Aidenbach","Aidling","Aidlingen","Aindling","Ainring","Ainring - Hammerau","Aitrach","Aitrang","Aken","Aken (Elbe)","Aken OT Kleinzerbst","Albaching","Albaxen","Albbruck","Albersdorf","Albershausen","Albersweiler","Albertshofen","Albisheim","Albshausen","Albstadt","Albstadt-Ebingen","Albstadt-Tailfingen","Aldenhofen","Aldenhoven","Aldersbach","Aldingen","Alendorf","Alerheim","Alfdorf","Alfdorf-Brech","Alfdorf-Brend","Alfdorf-Burgholz","Alfdorf-H\xF6ldis","Alfdorf-Leinhalden","Alfdorf-Mannholz","Alfdorf-Pfahlbronn","Alfdorf-Rienharz","Alfdorf-Schmidh\xF6fle","Alfdorf-Tannhof","Alfeld","Alfeld-Dehnsen","Alfeld (Leine)","Alfeld-Limmer","Alfhausen","Alfstedt","Alfter","Alfter-Oedekoven","Algermissen","Algertshausen","Alheim","Alkersleben","Alkersum","Allach","Allenbach","Allenbach/Birkenfeld","Allenb\xFCttel","Allendorf","Allendorf/Lumda","Allensbach","Allensbach-Langenrain","Allersberg","Allersdorf","Allersehl","Allershagen","Allershausen","Allertshausen","Alletshof","Alling","Allmannshofen","Allmersbach im Tal","Allstedt","Alme","Almena","Alpen","Alpen-Menzelen","Alpirsbach","Alsbach-H\xE4hnlein","Alsdorf","Alsenz","Alsfeld","Alsheim","Alsleben","Alsleben (Saale)","Alsmoos","Altbach","Altbelgern","Alt Bennebek","Altd\xF6bern","Altdorf","Altdorf bei N\xFCrnberg","Altdorf bei N\xFCrtingen","Altdorf b.N\xFCrnberg","Altdorf (Kreis B\xF6blingen)","Alt Duvenstedt","Altef\xE4hr","Alteglofsheim","Altena","Altenahr","Altenau","Altenbach","Altenbamberg","Altenbeken","Altenbeken-Buke","Altenbeken-Kempen","Altenbeken-Schwaney","Altenberg","Altenberga","Altenberge","Altenberg OT Zinnwald-Georgenfeld","Altenbeuthen","Altenbrak","Altenbruch","Altenburg","Altenburg-Kosma","Altenburg/ Ortsteil Paditz","Alten-Buseck","Alten Celle","Altendiez","Altendorf","Altenglan","Altenhagen","Altenhain","Altenhof","Altenholz","Altenkirchen","Altenkirchen (Westerwald)","Altenkrempe","Altenkunstadt","Altenlohe","Altenmarkt","Altenmarkt a.d. Alz","Altenmedingen","Altenmoor","Altenm\xFCnster","Altenstadt","Altenstadt a.d.Waldnaab","Altenstadt a.d. Waldnaab","Altenstadt an der Waldnaab","Altensteig","Altenthann","Altentreptow","Altenwalde","Alterhteim","Altertheim","Alterthiem","Altetenkirchen","Altfeld","Altforweiler","Altfraunhofen","Altfriesack","Alt Garge","Althegnenberg","Altheim","Althengstett","Althof","Althorsb\xFCll","Alth\xFCtte","Alth\xFCtte-Sechselberg","Altingen","Altj\xFChrden","Altkalen","Altkirchen","Altlandsberg","Altlussheim","Altlu\xDFheim","Altmannstein","Alt Meteln","Alt Meteln, OT B\xF6ken","Altmittweida","Alt M\xF6lln","Altm\xFChlm\xFCnster","Altnuifra","Altom\xFCnser","Altom\xFCnster","Altonaer Chaussee","Altottenhain","Alt\xF6tting","Altreichenau","Altrip","Alt Ruppin","Alt-Schadow","Altschweier","Alt Schwerin","Altshausen","Altusried","Altwarp","Altwittenbek","Alt Zauche - Wu\xDFwerk","Alvern","Alvesen - Rosengarten","Alxing","Alzenau","Alzenau\u200E","AlzenauAlzenau","Alzenau-H\xF6rstein","Alzenau-H\xF6rstein (Dettingen)","Alzenau i.UFr.","Alzenau-Michelbach","Alzey","Ambach","Ambach/M\xFCnsing","Amberg","Amberger Stra\xDFe","Amecke","Amelinghausen","Amelingshausen","Amelsen","Amerang","Amesberg","Am Fliederbusch","Am Gro\xDFen Bruch","Ammeldingen","Am Mellensee","Ammerbuch","Ammerbuch-Breitenholz","Ammerbuch - Entringen","Ammerbuch - Pf\xE4ffingen","Ammerbuch - Poltringen","Ammerbuch - Reusten","Ammersbek","Am\xF6nau","Am\xF6neburg","Am\xF6neburg-Ro\xDFdorf","Amorbach","Ampferbach","Ampfing","Amrichshausen","Amrigschwand","Amshausen","Amstetten","Amtmannsdorf","Amtsberg","Amtsberg OT Dittersdorf","Amtzell","Andechs","Andechs-Machtlfing","Andernach","Andernach Miesenheim","Andrup-Lage","Angelbachtal","Angelburg","Angelburg-G\xF6nnern","Angelburg (Lixfeld)","Angelse","Anger","Angerm\xFCnde","Angern","Angersdorf","Anglm\xFChle","Anhausen","Ankershagen","Anklam","Ankum","Annaberg-Buchholz","Annaberg-Buchholz OT Frohnau","Annaburg","Annah\xFCtte","Annweiler","Annweiler am Trifels","Anrath","Anreppen","Anr\xF6chte","Ansbach","Anspach","Antrifttal","Antweiler","Antwort","Anzing","Apeldorn","Apelnstedt","Apen","Apen - Augustfehn","Apen-Augustfehn","Apen - Augustfehn II","Apen - Augustfehn III","Apenburg","Apenburg-Winterfeld","Apen - Nordloh","Apen-Nordloh","Apensen","Apfelst\xE4dt","Apolda","Appelhuelsen","Appeln","Appen","Appenrode","Appenweier","Appolding","Ardesdorf","Ardey","Arendsee","Arendsee (Altmark)","Arensdorf","Arenshausen","Aresing","Arfrade","Argenb\xFChl","Arget","Arholzen","Arlaching","Armsheim","Arnbruck","Arneburg","Arnegg","Arnhofen","Arnis","Arnoltice","Arnsberg","Arnsberg-Bruchhausen","Arnsberg-Holzen","Arnsberg-Niedereimer","Arnschwang","Arnsdorf","Arnsgereuth","Arnsnesta","Arnstadt","Arnstein","Arnstorf","Arpke","Arsbeck","Artelshofen","Artern","Artern/Unstrut","Artlenburg","Arzbach","Arzberg","Asbach","Asbach-B\xE4umenheim","Asbach-Sch\xF6neberg","Asbach / Sickenberg","Asbeck","Aschaffenburg","Aschaffenburg-Damm","Aschaffenburg-Obernau","Aschau","Aschau im Chiemgau","Aschbach","Ascheberg","Ascheberg (Holstein)","Ascheffel","Aschen","Aschendorf","Aschersleben","Aschhausen","Aschheim","Ascholding","Asendorf","Asenham","Aspach","Asperden","Asperg","Assel","Assinghausen","Asslar","A\xDFlar","A\xDFlar-Berghausen","A\xDFlar-Werdorf","A\xDFling","Assmanshausen","Astederfeld","Attendorn","Attenhausen","Attenkirchen","Attenweiler","Atting","Atting-Rinkam","Attlisberg","Au","Au am Inn","Aub","Au (Breisgau)","Aubstadt","Aue","Auenstein","Auerbach","Auerbach in der Oberpfalz","Auerbach/Vogtl.","Auerbach/Vogtl","Auerbach/Vogtland","Auernheim","Auers","Auetal","Aufham","Aufhausen","Aufhofen","Aufkirchen","Aufse\xDF","Augenarzt","Auggen","Augsburg","Augsburg-Bergheim","Augsfeld","Augustdorf","Augustusburg","Augustusburg OT Erdmannsdorf","Au i.d. Hallertau","Aukrug","Aulendorf","Aulzhausen","Auma","Aum\xFChle","Aurach","Aurachtal","Aurich","Aurich-Ogenbargen","Aurich-Plaggenburg","Aurich-Schirum","Auritz","Ausacker","Ausb\xFCttel","Ausleben","Au\xDFernzell","Auw","Aying","Aying-Peiss","Ayl","Aystetten","Azmannsdorf","Baabe","Baalberge","Baar","Baar-Ebenhausen","Baar (Schwaben)","Babelsberg","Babenhausen","Babenhausen-Harpertshausen","Babenhausen (Schwaben)","Babensham","Babst","Babstadt","Bach","Bachanhausen","Bacharach","Bacharach-Neurath","Bacharach-Steeg","Bachhagel","Backknang","Backnang","Backnang-Heiningen","Bad Abbach","Bad Aibling","Bad Arolsen","Bad Arolsen-Landau","Bad Bad T\xF6lz-Kirchbichl","Bad Bayersoien","Bad Bederkesa","Bad Bellingen","Bad Belzig","Bad Bentheim","Badbergen","Bad Bergzabern","Bad Berka","Bad Berleburg","Bad Berneck","Bad Bertrich","Bad Bevensen","Bad Bibra","Bad Birnbach","Bad Blankenburg","Bad Bodendorf","Bad Bodenteich","Bad Boll","Bad Boll-Eckw\xE4lden","Bad Brambach","Bad Bramstedt","Bad Breisig","Bad Br\xFCckenau","Bad Buchau","Bad Camberg","Bad Cannstatt","Bad Colberg-Heldburg","Baddeckenstedt","Bad Ditzenbach","Bad Doberan","Bad Driburg","Bad Driburg-Herste","Bad Driburg-Siebenstern","Bad D\xFCben","Bad Duerkheim","Bad D\xFCrkheim","Bad D\xFCrkheim-Gewerbegebiet Bruch","Bad D\xFCrrenberg","Bad D\xFCrrheim","Bad Eilsen","Badel","Bad Elster","Badem","Bad Ems","Bad Emstal","Baden-Baden","Baden.Baden","Bad Endbach","Badendorf","Bad Endorf","Badenhausen","Badenweiler","Badersleben","B\xE4derstra\xDFe","Bad Essen","Bad Fallingbostel","Bad Feilnbach","Bad Frankenhausen","Bad Frankenhausen/Kyffh\xE4user","Bad Fredeburg","Bad Freienwalde","Bad Freienwalde (Oder)","Bad Friedrichshall","Bad F\xFCssing","Bad Gandersheim","Bad Godesberg","Bad G\xF6gging","Bad Gottleuba","Bad Gottleuba-Berggie\xDFh\xFCbel","Bad Griesbach","Bad Griesbach im Rottal","Bad Griesbach i. Rottal","Bad Gr\xF6nenbach","Bad Grund","Bad Harzburg","Bad Harzburg-B\xFCndheim","Bad Harzburg-Harlingerode","Bad Heibrunn","Bad Heilbrunn","Bad Herrenalb","Bad Herrenalb-Gaistal","Bad Hersfeld","Bad Hesfeld-Allmershausen","Bad Hindelang","Bad Hindelang / Bruck","Bad Hindelang / Gro\xDF","Bad Hindelang / Hinterstein","Bad Hindelang / Liebenstein","Bad Hindelang / Reckenberg","Bad Hindelang / Riedle","Bad Homburg","Bad Homburg von der H\xF6he","Bad Homburg vor der H\xF6he","Bad Honnef","Bad H\xF6nningen","Bad Iburg","Badingen","Badisch Sch\xF6llenbach","Bad Karlshafen","Bad Kissingen","Bad Kleinen","Bad Klosterlausnitz","Bad Kohlgrub","Bad K\xF6nig","Bad K\xF6nig-Etzen Ges\xE4\xDF","Bad K\xF6nig-F\xFCrstengrund","Bad K\xF6nig - Nieder-Kinzig","Bad K\xF6nigshofen","Bad K\xF6nigshofen i Grabfeld","Bad K\xF6sen","Bad K\xF6stritz","Bad K\xF6tzting","Bad K\xF6tzting-Ramsried","Bad Kreuznach","Bad Kreuznach R\xFCdesheim","Bad Kreuznach - R\xFCdesheim","Bad Krozingen","Bad Krozingen-Biengen","Bad Laasphe","Bad Laasphe-Niederlaasphe","Bad Laer","Bad Langenbr\xFCcken","Bad Langensalza","Bad Lauchst\xE4dt","Bad Lausick","Bad Lauterberg","Bad Lauterberg-Barbis","Bad Lauterberg im Harz","Bad Liebenstein","Bad Liebenwerda","Bad Liebenzell","Bad Liebenzell - Monakam","Bad Liebenzell / Unterlengenhardt","Bad Lippspringe","Bad Lipspringe","Bad Lobenstein","Bad Malente","Bad Malente-Gremsm\xFChlen","Bad Marienberg","Bad Marienberg (Westerwald)","Bad Meinberg","Bad Mergentheim","Bad M\xFCnder","Bad M\xFCnder OT Eimbeckhausen","Bad M\xFCnster am Stein-Ebernburg","Bad M\xFCnstereifel","Bad M\xFCnstereifel - Rodert","Bad Muskau","Bad Nauheim","Bad Nenndorf","Bad Neuenahr","Bad Neuenahr-Ahrweiler","Bad Neuenahr-Ahrweiler (Walporzheim)","Bad Neustadt","Bad Neustadt an der Saale","Bad Nieuweschans","Bad Oeynhausaen","Bad Oeynhausen","Bad Oeynhausener","Bad Oldesloe","Bad Orb","Bad Peterstal","Bad Peterstal-Griesbach","Bad Pyrmont","Bad Pyrmont-Eichenborn","Bad Rappenau","Bad Reichenhall","Bad Rippoldsau-Schapbach","Bad Rodach","Bad Rodach-Ro\xDFfeld","Bad Rothenfelde","Bad Saarow","Bad Sachsa","Bad S\xE4ckingen","Bad Salzdetfurth","Bad Salzhausen","Bad Salzschhlirf","Bad Salzschlirf","Bad Salzufen","Bad Salzuflen","Bad Salzungen","Bad Sassendorf","Bad Saulgau","Bad Schandau","Bad Schandau-Krippen","Bad Schandau-Ostrau","Bad Schandau OT Schmilka","Bad Schlema","Bad Schmiedeberg","Bad Schmiedeberg OT Trebitz","Bad Schoenborn (Langenbruecken)","Bad Sch\xF6nborn","Bad Sch\xF6nborn-Mingolsheim","Bad-Sch\xF6nborn Mingolsheim","Bad Schussenried","Bad Schussenried - K\xFCrnbach","Bad Schwalbach","Bad Schwalbach - Fischbach","Bad Schwartau","Bad Segeberg","Bad Sobernheim","Bad Sobernheim - Steinhard","Bad Soden","Bad Soden am Taunus","Bad Soden im Taunus","Bad Soden-Salm\xFCnster","Bad Sooden-Allendorf","Bad Staffelstein","Bad Staffelstein - Unnersdorf","Bad Steben","Bad Stuer","Bad Suderode","Bad Sulza","Bad S\xFClze","Bad Teinach-Zavelstein","Bad Tennstedt","Bad T\xF6lz","Bad Urach","Bad Vilbel","Bad Waldsee","Bad Westernkotten","Bad Wiessee","Bad Wildbad","Bad Wildungen","Bad Wildungen-Albertshausen","Bad Wildungen-Armsfeld","Bad Wildungen-Bergfreiheit","Bad Wildungen-Braunau","Bad Wildungen - Frebershausen","Bad Wildungen-Frebershausen","Bad Wildungen-H\xFCddingen","Bad Wildungen-Hundsdorf","Bad Wildungen-Mandern","Bad Wildungen-Odershausen","Bad Wildungen Reinhardshausen","Bad Wildungen-Reinhardshausen","Bad Wildungen-Reitzenhagen","Bad Wildungen - Wega","Bad Wildungen-Wega","Bad Wilsnachk","Bad Wilsnack","Bad Wimpfen","Bad Windsheim","Bad W\xF6rishofen","Bad-W\xF6rishofen","Bad W\xFCnnenberg","Bad W\xFCnnerbg","Bad Wurzach","Bad Zurach","Bad Zurzach","Bad Zwesten","Bad Zwischenahn","Bad Zwischenahn - Aschhausen","Bad Zwischenahn-Kayhauserfeld","Bad Zwischenahn - Ohrwege","Bad Zwischenahn/Petersfehn","Baesweiler","Bagenkop","Bahlen","Bahlingen","Bahnitz","Bahrdorf","Bahrendorf","Bahrenfleth","Bahretal","Baienfurt","Baierbrunn","Baiern","Baiersbronn","Baiersbronn Huzenbach","Baiersdorf","Baindlkirch","Baisweil","Baitenhausen","B\xE4k","Bakum","Balderschwang","Baldham","Balduinstein","Balesfeld","Balgheim","Balgst\xE4dt","Balingen","Balje","Ballendorf","Ballenstedt","Ballrechten-Dottingen","Ballst\xE4dt","Ballwitz","Balm","Baltmannsweiler","Baltrum","Balve","Balve - Beckum","Balve-Beckum","Balve-Benkamp","Balve - Binolen","Balve-Binolen","Balve - Eisborn","Balve-Eisborn","Balve - Garbeck","Balve-Garbeck","Balve - Gr\xFCckeck","Balve - Haustadt","Balve - Horst","Balve - H\xF6veringhausen","Balve-H\xF6veringhausen","Balve - Langenholthausen","Balve-Langenholthausen","Balve - Leveringhausen","Balve - Mellen","Balve-Mellen","Balve - Volkringhausen","Balve-Volkringhausen","Balzhausen","Bamberg","Bammental","Bandelin","Bandenitz","Bankholzen","Bannewitz","Bansin","Banteln","Banzau","Banzkow","Banzkow-Schwerin","Barbing","Barby","Barby (Elbe)","Barchfeld","Barderup","Bardowick","B\xE4renbach","Barenburg","Barendorf","Barensdorf","B\xE4renstein","B\xE4renstein-Osterzgebirge","Bargau","Bargeshagen","Bargfeld-Stegen","Barghorst","Bargstedt","Bargteheide","Barkelsby","Barkow","Barleben","Barleben OT Ebendorf","Barlohe","Barlt","Barmbek","Barmen","Barmstedt","B\xE4rnau","Barneberg","Barnhausen","B\xE4rnhof","Barnis\u0142aw","Barnst\xE4dt","Barnstedt","Barnstorf","Barntrup","Barntrup-Sonneborn","Barsbek","Barsb\xFCttel","Barsinghausen","Barsinghausen Holtensen","Barsinghausen-Nordgoltern","Bar\xDFel","Bartenbach","Bartenshagen","Bartensleben","Barth","Bartholom\xE4","Barth-Tannenheim","Barum","Baruth/Mark","Baruth/Mark OT Klasdorf","Barver","Basdahl","Basedow","Basel","Bassen","Bassendorf","Bassenheim","Bassum","Bastdorf","Basthorst","Batholom\xE4","Batten","Battenberg","Battweiler","Baumgarten","Baumholder","Baunach","Baunatal","Baunschweig","Bauschlott","Bautzen","Bautzen OT Burk","Bautzen / OT Burk","Bautzen OT Niederkaina","Bautzen / OT Niederkaina","Bavendorf","Bawinkel","Bayerbach","Bayerdilling","Bayerisch Eisenstein","Bayerisch Gemain","Bayerisch Gmain","Bayreuth","Bayreuth-Oberkonnersreuth","Bayrischzell","Bebertal","Bebra","Bechenheim","Becherbach","Bechhofen","Bechhofen-Sachsbach","Bechtolsheim","Bechtsb\xFCttel","Beckdorf","Beckedorf","Beckeln","Beckingen","Beckstedt","Beckum","Beckum-Neubeckum","Beckum-Roland","Bedburg","Bedburg-Hau","Bedburg-Hau-Huisberden","Bedburg-Hau-Louisendorf","Bedheim","Beedenbostel","Beelen","Beelitz","Beelitz-Heilst\xE4tten","Beelitz OT Wittbrietzen","Beerfelde","Beerfelden","Beerfelden-Gammelsbach","Beerfurth","Beerwalde","Beesem","Beeskow","Beesten","Beetzendorf","Beetzsee","Beetzseeheide","Beetzsee OT Brielow","Bega","Behl","Behl bei Pl\xF6n","Behrenhoff","Behrensdorf","Behringen","Behringersdorf","Beicha","Beichlingen","Beidendorf","Beidenfleth","Beienheim","Beierfeld","Beiersdorf","Beilngries","Beilngries-Paulushofen","Beilrode","Beilstein","Beilstein-Gagernberg","Beimerstetten","Beinhausen","Belau","Belau, Dumme","Belgern","Belgershain","Belgershain-K\xF6hra","Belitz","Bellahn","Belle","Belleben","Bellersen","Bellheim","Bellin","Bellingen","Belm","Beltershain","Beltersrot","Belzig","Bendestorf","Bendfeld","Bendorf","Benediktbeuern","Benhausen","Benkendorf","Benneckenstein","Benneckenstein (Harz)","Bennewitz","Bennin","Benningen","Beno","Bensersiel","Benshausen","Bensheim","Bensheim Auerbach","Bensheim-Auerbach","Bensheim-Fehlheim","Bensheim-Langwaden","Bensheim-Sch\xF6nberg","Bensheim-Schwanheim","Bentfeld","Bentwisch","Bentzin","Benz","Beratzhausen","Berching","Berchtesgaden","Berchtesgarden","Berchtesgarden-Oberau","Berelin","Berenbostel","Berg","Berga","Berga/Elster","Berga/ Elster","Bergakmen","Bergatreute","Berg / Aufkirchen","Berge","Berge b. Quakenbr\xFCck","Bergen","Bergen auf R\xFCgen","Bergen/Dumme","Bergenhusen","Bergen im Chiemgau","Bergen-S\xFClze","Bergfeld","Bergfelde","Bergfreiheit","Berggie\xDFh\xFCbel","Bergham","Berghaupten","Berghausen","Bergheim","Bergheim-Paffendorf","Bergirchen","Bergisch Born","Bergisch Gladbach","Bergisch-Gladbach","Bergisch Gladbach - Bensberg","Bergisch Gladbach-Herkenrath","Bergkamen","Bergkirchen","Berglen-Lehnenberg","Bergneustadt","Berg (Pfalz)","Berg/Pfalz","Bergrheinfeld","Bergrothenfels","Berg-Rudolphstein","Bergstrup","Bergtheim","Bergwitz","Beringstedt","Berkach","Berkenbr\xFCck","Berkenthin","Berlebeck","Berlebeck; Detmold","berlin","Berlin","BERLIN","Berlin-Biesdorf","Berlin-Blankenburg","Berlin-Buchholz / Karow","Berlin-Charlottenburg","Berlinchen","Berlin-Franz\xF6sich-Buchholz","Berlin-Friedrichsfelde","Berlin-Karow","Berlin-Kladow","Berlin-Lankwitz","Berlin-Lichtenberg","Berlin-Lichterfelde","Berlin-Mariendorf","Berlin-Marzahn","Berlin Neuk\xF6lln","Berlin - Niedersch\xF6nhausen","Berlin-Pankow","Berlin-Prenzlauer Berg","Berlin-Reinickendorf","Berlin-Sch\xF6nefeld","Berlin-Spandau","Berlin, Spandau, Hakenfelde","Berlin-Steglitz","Berlin-Tegel","Berlin-Tempelhof","Berlin-Tiergarten","Berlin-Wedding","Berlin-Zehlendorf","Berllin","Berlstedt","Bermatingen","Bermatingen-Ahausen","Bermersheim vor der H\xF6he","Bernau","Bernau am Chiemsee","Bernau bei Berlin","Bernau-Dorf","Bernau im Schwarzwald","Bernau OT Sch\xF6now","Bernbeuren","Bernburg","Bernburg (Saale)","Berne","Berne / Neuenkoop","Bernhausen","Bernhof","Bernitt","Bernkastel","Bernkastel-Kues","Bernloh","Bernried","Bernried am Starnberger See","Bernsdorf","Bernshausen","Bernstadt a d Eigen","Bersenbr\xFCck","Bersteland/Niewitz","Berthelsdorf","Bertholdshofen-Hausen","Bertingen","Bertsdorf-H\xF6rnitz","Bescheidt","Beschendorf","Beseland","Beselich","Beselich-Schupbach","Beselin","Besgheim","Besigheim","Bessenbach","Bestensee","Bestwig","Betenbrunn","Bethen","Bettbrunn","Betteldorf","Bettenfeld","Bettenhausen","Bettingen","Bettnang","Betzdorf","Betzendorf","Betzenstein","Betzigau","Betzmannsdorf","Beucha","Beuren","Beuron","Beuron - Hausen im Tal","Beuron-Langenbrunn","Beuron - Thiergarten","Beuta","Beutersitz","Bevern","Beverstedt","Beverstedt-Osterndorf","Beverstedt-Wollingst","Beverungen","Beverungen-Haarbr\xFCck","Beverungen-Lauenf\xF6rde","Bexbach","Bexbach-Oberbexbach","Beyern","Beyharting","Beyrode","Biberach","Biberach an der Ri\xDF","Biberbach","Bibergau","Bibertal","Biblis","Bibow","Biburg","Bichl","Bickenbach","Bickendorf","Bidingen","Biebelried","Bieber","Biebergem\xFCnd","Biebergem\xFCnd-Bieber","Biebergem\xFCnd-Kassel","Biebergem\xFCnd-Wirtheim","Biebertal","Biebertal - K\xF6nigsberg","Biebesheim","Biebrich","Biedenkopf","Biedenkopf-Eckelshausen","Biederbach","Biederitz","Biehla","Bielefeld","Bielefeld-Ummeln","Bielen","Biendorf","Bienenb\xFCtte","Bienenb\xFCttel","Biengen","Biere","Bierenbachtal","Bierstadt","Bierth","Biesenbach","Biesenthal","Biessenhofen","Bietigheim","Bietigheim (Baden)","Bietigheim-Bisingen","Bietigheim - Bissingen","Bietigheim-Bissingen","Bietingen","Bilderlahe","Billerbeck","Billigheim","Billigheim-Ingenheim","Billroda","Bilsen","Binde","Bindlach","Bingen","Bingen am Rhein","Bingen-Sponsheim","Binningen","Binz","Binz de R\xFCgen","Binzenbach","Bippen","Birenbach","Birgelen","Birgel (Vulkaneifel)","Birgland","Birkach","Birkenau","Birkenfeld","Birkenfelde","Birkenhain","Birkenhard","Birkenheide","Birkenhof","Birken-Honigsessen","Birkenh\xF6rdt","Birkenwerder","Birket","Birkholz","Birklar","Birkwitz","Birk, W\xFCrselen,St\xE4dteregion Aachen","Birnbach","Birresborn","Birstein","Bischberg","Bischhausen","Bischheim-H\xE4slich","Bischof","Bischoffen","Bischofsgr\xFCn","Bischofsheim","Bischofsheim an der Rh\xF6n","Bischofsheim/Rh\xF6n","Bischofsmais","Bischofsmais - Habischried","Bischofswerda","Bischofswiesen","Bischofwiesen","Bischweier","Bishausen","Bisingen","Biskirchen","Bismark (Altmark)","Bispingen","Bissee","Bissendorf","Bissingen","Bissingen an der Teck","Bissingen an der Teck-Ochsenwang","bitburg","Bitburg","Bitburg/Biersdorf","Bitburg-Erdorf","Bittelbronn","Bittenfeld","Bitterfeld","Bitterfeld-Wolfen","Bitterfeld-Wolfen OT Bitterfeld","Bittkau a. d. Elbe","Bitz","Bitzenhofen","Bladernheim","Blaibach","Blaichach","Blankenbach","Blankenburg","Blankenburg (Harz)","Blankenfelde","Blankenfelde-Mahlow","Blankenfeld-Mahlow OT J\xFChnsdorf","Blankenhain","Blankenheim","Blankenloch","Blankenrath","Blankenrode","Blankensee","Blankenstein","Blasien","Blattersleben","Blaubeuren","Blaubeuren-Gerhausen","Blaubeuren-Weiler","Blaufelden","Blaustein","Bleckede","Bleckede OT Alt Garge","Bleckede OT Neu Wendischthun","Bleckede OT Radegast","Bleckede OT Walmsburg","Bleckede OT Wendewisch","Bleialf","Bleichenbach","Bleicherode","Bleichheim","Bleidenrod","Blekendorf","Blender","Bliesdalheim","Bliesdorf","Bliesdorf-Strand","Blieskastel","Blieskastel / Biesingen","Bliesmengen-Bolchen","Bliestorf","Blintrop","Blomberg","Blomberg - Cappel","Blomberg / Herrentrup","Blomberg / H\xF6ntrup","Blomberg/Istrup","Blomberg - Kleinenmarpe","Blomberg / Reelkirchen","Blomberg-Tintrup","Blomberg - Wellentrup","Blomesche Wildnis","Bl\xF6nsdorf","Blo\xDFwitz","Blowatz","Bl\xFCcherhof","Blumberg","Blumenberg","Blumenhagen","Blumenthal","Blunk","Bl\xFCtenstra\xDFe 25, Etzenricht","Bl\xFCtlingen","BNad Oeynhausen","Bobengr\xFCn","Bobenhausen II","Bobenheim-Roxheim","Bobenheim-Roxheim (Siedlung)","Bobenneukirchen","Bobingen","B\xF6bingen","Bobitz","B\xF6blingen","B\xF6blingen-Hulb","Boblitz","Bobritzsch","Bobstadt","Bocholt","Bochum","Bochum-Dahlhausen","Bochum-Riemke","Bochum - Wattenscheid","Bochum-Wattenscheid","Bochum-Werne","Bochum/Witten (Heveney)","Bocka","Bockel","Bockelkarthen","Bockelwitz","Bockenem","Bockenem-Gro\xDF Ilde","Bockenheim","Bockholmwik","Bockhorn","Bockhornerfeld","Bockhorn - Grabstede","Bockhorst","Bockhorst, H\xFCmmling","Bockleben","B\xF6cklm\xFChle","Bodelshausen","Boden","Bodenbach","Bodenfelde","Bodenheim","Bodenkirchen","Bodenkirchen-Bonbruck","Bodenmais","Bodenwerder","Bodenw\xF6hr","B\xF6dexen","Bodman","Bodman-Ludwigshafen","Bodmann-Ludwigshafen","Bodnegg","Bodolz","Boecke","B\xF6el","Boffzen","Bogen","Bogen - Brandlberg","Bogen - Furth","B\xF6hen","B\xF6hl","B\xF6hlen","Bohlenbergerfeld","B\xF6hlendorf","B\xF6hl-Iggelheim","Bohlingen","Bohlsbach","Bohlsen","B\xF6hme","B\xF6hmfeld","Bohmte","B\xF6hnhusen","Boitze","Boitzenburger Land","Boitzenhagen","Boizenburg","Boizenburg/Elbe","Bokel","Bokelberge","Bokeloh","Bokelrehm","Bokholt","Bokhorst","B\xF6klund","Boksee","Boldekow","Boldenshagen","Bollberg","B\xF6llen","Bollendorf","Bollschweil","Bollschweil-St. Ulrich","Bollstedt","Bolsterlang","Boltenhagen","Bolzum","Bomlitz","Bonbaden","Bondorf","B\xF6nen","Bonese","B\xF6nitz","Bonlanden","Bonn","Bonn (Bad Godesberg)","Bonn-Bad Godesberg;Bonn","Bonn-Buschdorf","Bonndorf","Bonn / Duisdorf","Bonn-Endernich","B\xF6nnigheim","B\xF6nnigheim OT: Hohenstein","B\xF6nningstedt","Bonn-Ippendorf","Bonn-Plittersdorf","Book","Boostedt","Bopfingen","Bopfingen-Flochberg","Boppard","Borau","Borchen","Borchen-Alfen","Borchen-D\xF6renhagen","Borchen-Kirchborchen","B\xF6rdeland-Biere","B\xF6rdeland - OT Eggersdorf","B\xF6rdeland - OT Welsleben","Bordelum","Bordesholm","Boren","Borgentreich","B\xF6rger","B\xF6rgerende","B\xF6rgerende-Rethwisch","Borgholzhausen","Borghorsterh\xFCtten / Osdorf","Borgisdorf","Borgsdorf","Borgstedt","Borgsum","Borgwedel","Borken","Borken (Hessen)","Borken-Hoxfeld","Borken/Rhedebr\xFCgge","Borkheide","Borkum","B\xF6rln","Born","Borna","Born a. Dar\xDF","Borna-Gestewitz","Borna Stadt","Bornhagen","Bornhagen-Eichsfeld","Bornheim","Bornheim-Merten","Bornheim- Sechtem","Bornheim-Walberberg","Bornh\xF6ved","B\xF6rnichenErzg.","B\xF6rnicke","Bornsdorf","Bornsen","B\xF6rnsen","Bornum","Borov\xE1 Lada","Borrentin","Borsdorf","Borsfleth","B\xF6r\xDFum","Borstel","B\xF6rtlingen","B\xF6rwang","Borxleben","Bosau","B\xF6sdorf","B\xF6sel","B\xF6sen","Bosenbach","B\xF6sensell","B\xF6singen","Boslar","B\xF6sleben-W\xFCllersleben","Bo\xDFdorf","Bostel","B\xF6tersen","B\xF6tersheim","Bothel","Bottendorf","Bottrop","Bottrop-Batenbrock","Bottrop-Kirchhellen","B\xF6tzingen","Bourheim","Bous","Bovenau","Bovenden","Boxberg","Boxberg/O.L.","Boxberg/O.L. OT Tauer","Boxberg/O.L. OT Uhyst/Spree","Boxberg/O.L., OT Uhyst/Spree","Boxberg, OT B\xE4rwalde","Boxdorf","Boye","Bozi Dar","Bo\u017E\xED Dar","Braak","Brachbach","Bracht","Brachttal","Brackel","Brackenheim","Brackenheim-Botenheim","Brackenheim-Haberschlacht","Brackenheim-Hausen","Brackenheim-Meimsheim","Brackenheim-Neipperg","Brackenheim-Stockheim","Brake","Brakek","Brakel","Brakel-Gehrden","Brake (Unterweser)","Bramsche","Bramsche / Engter","Bramsche-Kalkriese","Bramsche-Pente","Bramstedt","Brand","Brandenburg","Brandenburg a. Havel","Brandenburg an der Havel","Brandenburg (Havel)","Brand-Erbisdorf","Brand-Erbisdorf OT Langenau","Brandis","Brandscheid","Brandshagen","Brannenburg","Braschwitz","Brattendorf","Braubach","Braunau am Inn","Braunfels","Braunichswalde","Br\xE4uningshof","Braunlage","Br\xE4unlingen","Braunsbach","Braunsbedra","Braunschweig","Braunschweig Gartenstadt","Braunschweig-Weststadt","Braunsdorf","Braunshof","Brausnschweig","Brebel","Brechen-Niederbrechen","Brechen-Oberbrechen","Brechen, Oberbrechen","Breckerfeld","Breddin","Bredenbek","Bredenfelde","Bredstedt","Breege","Breege/R\xFCgen","Breese im Bruch","Breese in der Marsch","Breesen","Breest","Breetz","Brehna","Breidenbach","Breidenbach-Oberdieten","Breisach","Breisach-Niederrimsingen","Breisach-Oberrimsingen","Breitbrunn a.Chiemsee","Breitenau","Breitenbach","Breitenbach am Herzberg","Breitenberg","Breitenbronn","Breitenbrunn","Breitenbrunn-Antonsthal","Breitenbrunn/Erzgeb","Breitenbrunn-Loppenhausen","Breitenburg","Breitenfeld","Breiteng\xFC\xDFbach","Breitenstein","Breitenworbis","Breith\xFChlen","Breitnau","Breitscheid","Breitscheid-Verscheid","Breitungen","Brekendorf","Breklum","Bremen","Bremen-Grohn","BREMEN HABENHAUSEN","Bremerhaven","Bremerhaven-Fischereihafen","Bremerhaven-Spaden","Bremerhaven Wulsdorf-Bohmsiel","Bremerv\xF6rde","Bremerv\xF6rde / Elm","Bremerv\xF6rde-Pl\xF6njeshausen","Bremm","Brennberg","Brenneckenbr\xFCck","Brennes","Brensbach","Brensbach-Nieder-Kainsbach","Breselenz","Bresewitz","Bretnig","Bretsch","Brettach","Bretten","Bretzfeld","Bretzfeld-Dimbach","Bretzfeld-Schwabbach","Breuberg","Breuna","Breustian","Brewitz","Brey","Brickeln","Briedel","Briescht","Brieselang","Brieselang OT Zeestow","Briesen","Briesen (Mark)","Brieske","Brieskow-Finkenheerd","Brietlingen","Brietlingen-Moorburg","Brietlingen OT L\xFCdershausen","Brietz","Brigachtal","Briggow","Brilon","Brilon-Nehden","Brilon - Scharfenberg","Brinjahe","Britz","Brlin","Brochterbeck","Brockel","Br\xF6ckel","Brockum","Brodau","Brodenbach","Brodersby","Brodersdorf","Broderstorf","Brodowin","Brohl-L\xFCtzing","Broich","Brokdorf","Brokstedt","Brombachtal","Brome","Brome (Flecken)","Bronkow","Brotterode","Brottewitz","Bro\u017Cek","Bruchenbr\xFCcken","Bruchhausen-Vilsen","Bruchhof","Bruchk\xF6bel","Bruchm\xFChlbach-Miesau","Bruchsal","Bruchsal-B\xFCchenau","Bruchsal-Helmsheim","Bruck","Br\xFCck","Bruckbach","Bruckberg","Bruckm\xFChl","Br\xFCckm\xFChl","Bruckm\xFChle","Bruck - Wildenholzen","Br\xFCel","Br\xFCgge","Br\xFCggen","Br\xFCggen Bracht","Br\xFCggen-Bracht","Br\xFCggerholz","Br\xFChl","Br\xFChl / Gewerbegebiet Nord","Brunau","Brunkaten","Br\xFCnkendorf","Br\xFCnlisbach","Brunnen","Brunnthal","Brunsb\xFCttel","Brunsholm","Br\xFCntrup","Br\xFCsewitz","Brusow","Br\xFCssow","Brux","Bubach","Bubenheim","Bubenreuth","Buch","Bucha","Buch am Buchrain","Buch am Erlbach","Buch am Wald","Buchbach","B\xFCchel","B\xFCcheloh","Buchen","B\xFCchen","Buchenbach","B\xFCchenbach","Buchenbach Himmelreich","Buchenberg","B\xFCchenbeuren","Buchen-B\xF6digheim","Buchendorf","Buchen-Hettigenbeuern","Buchenhof","Buchen-Hollerbach","Bucherm\xFChle","Buchet","Buchfart","Buchholz","Buchholz in der Nordheide","Buchloe","Buchwitz","B\xFCckeburg","B\xFCckeburg-R\xF6cke","B\xFCcken","Buckenhof","Buckow","B\xFCckwitz","B\xFCddenstedt","B\xFCdelsdorf","B\xFCden","Budenheim","B\xFCdesheim","B\xFCdingen","B\xFCdlich","Bufleben","Buggenried","Buggingen","B\xFChl","B\xFChl - Altschweier","B\xFChl-Altschweier","B\xFChlertal","B\xFChlerzell","B\xFChl-Hundseck","B\xFChl-Moos","B\xFChl Neusatz","B\xFChl-Sand","Buhlsbach","B\xFChl-Unterstmatt","B\xFChne","B\xFChnsdorf","B\xFChren","Buisdorf","Buke","B\xFClitz","B\xFClkau","Bullay","Bullendorf","Bulleritz","B\xFClow","Bunde","B\xFCnde","Bundenthal","B\xFCnsdorf","Bunsoh","Burbach","Burbach-Holzhausen","B\xFCren","B\xFCren-Brenken","B\xFCren-Harth","B\xFCren-Steinhausen","B\xFCren-Wewelsburg","Burg","Burgau","Burg auf Fehmarn","Burgberg","Burgber i. Allg\xE4u","Burgbernheim","Burgbrohl","Burg/Dithmarschen","Burgdorf","Burgdorf-Ehlershausen","Burgdorf-Otze","Burgebrach","Burgebrach - Ampferbach","B\xFCrgel","B\xFCrgeln","Burgen","Burggriesbach","Burggrub","Burghaslach","Burghasungen","Burghaun","Burghausen","Burgheim","Burg Hohenstein","Burg - Kauper","Burgkirchen","Burgkirchen a.d.Alz","Burgkirchen a. d. Alz","Burgkirchen an der Alz","Burgkunstadt","Burglahr","Burglengenfeld","Burgliebenau","Burgneudorf","Burgoberbach","Burg OT Madel","Burg OT Niegripp","Burg OT Parchau","Burgpreppach","Burgrain","Burgsahr","Burg Schlitz","Burgsinn","Burg (Spreewald)","Burg(Spreewald)","Burg (Spreewald) OT M\xFCschen","Burgst\xE4dt","B\xFCrgstadt","Burgst\xE4dt, OT Mohsdorf","Burgstall","Burg Stargard","Burgstein","Burgstetten","Burgthann","Burgwald","Burgwald-Ernsthausen","Burgwedel","Burgwedel-Fuhrberg","Burgwenden","Burgwindheim","Burhave","Burkardroth","Burkartshain","Burkau","Burkersdorf","Burkhardsdorf","Burkhardswalde","Burkhardtsdorf","Burkhardtsgr\xFCn","Burkheim","Burladingen","Burlage","Burow","Burrweiler","Burscheid","Burschid-Hilgen","B\xFCrstadt","Burtenbach","B\xFCschel","B\xFCschergrund","Buschhof","Buschhoven","Busdorf","Buseck","Busenbach","Busenberg","Busenwurth","B\xFCsingen am Hochrhein","B\xFCsingen bei Schaffhausen","Bussau","B\xFCssen","B\xFCsum","B\xFCsumer Deichhausen","B\xFCsum-Warwerort","Butjadingen","Butjadingen-Burhave","B\xFCtow","B\xFCttelborn","B\xFCttelborn-Klein-Gerau","Buttelstedt","Buttenheim","Buttenwiesen","B\xFCtthard","Buttlar","Buttst\xE4dt","Butzbach","B\xFCtzer","B\xFCtzow","Butzweiler","Buxheim","Buxtehude","Byhleguhre-Byhleguhre","Byhleguhre-Byhlen","Bylderup-Bov","C\xE4ciliengroden","Cadenberge","Cadolzburg","Calau","Calbe","Calberlah","Calbe (Saale)","Calden","Callenberg","Callenberg OT Reichenbach","Calveslage","Calv\xF6rde","Calw","Calw-Holzbronn","Calw-Stammheim","Calw-Wimberg","Cambs","Camburg","Canitz","Canow","Canzow","Cap Kiel","Cappel","Cappeln","Cappeln (Oldenburg)","Caputh","Carlow","Carlsberg","Carlsberg-Hertlingshausen","Caroliensiel","Carolinensiel","Carpin","Carwitz","Castrop Rauxel","Castrop - Rauxel","Castrop-Rauxel","Cavertitz","Celle","Celle / Altenhagen","Celle-Scheuen","Cham","Chamerau","Charlottenthal","Cheine","Chemnitz","Chemnitz (Einsiedel)","Chemnitz OT Rabenstein","Chemnitz R\xF6hrsdorf","Chemnitz-R\xF6hrsdorf","Chieming","Chiemsee","Chorin","Christiansholm","Ch\xFCttlitz","Cinovec","Cismar","Cismar-Gr\xF6nwohldshorst","Clausnitz","Claussnitz","Clau\xDFnitz","Clausthal","Clausthal-Zellerfeld","Cleebronn","Clenze","Cloppenburg","Cobbelsdorf","Coburg","Cochem","Coesfeld","C\xF6lbe","C\xF6lbe-Sch\xF6nstadt","Colbitz","Colditz","Collenberg","Colmberg","Colmnitz","Colno","Colnrade","Cologne","C\xF6lpin","Contwig","Coppenbr\xFCgge","Cornau","Cornberg","Cosel","Cospeda","Cossebaude","Coswig","Coswig (Anhalt)","Coswig (Anhalt) OT Stackelitz","Coswig/Anhalt OT Zieko","Coswig OT Rag\xF6sen","Coswig OT S\xF6rnewitz","Cotbus","Cottbus","COTTBUS","Cottbus-Gro\xDF Gaglow","Cottbus-Kahren","Cottbus-Willmersdorf","Crailsheim","Crailsheim-Jagstheim","Cramonshagen","Creglingen","Cremlingen","Cremlingen - Hemkenrode","Creu\xDFen","Creussen - Lindenhardt","Creuzburg","Crimmitschau","Crimmitschau OT Mannichswalde","Crinitz","Crinitzberg","Crispendorf","Crivitz","Crossen an der Elster","Crosta","Crottendorf","Cumlosen","Cunewalde","Cunewalde-Weigsdorf-K\xF6blitz","Cunnersdorf","Cursdorf","Cuxhaven","D","Daaden","Dabel","Dabergotz","Daberkow","Dabetsweiler","Dachau","Dachrieden","Dachsbach","Dachsberg Wittenschwand","Dachsen","Dachsenhausen","Dachtel","Dadow","Dageb\xFCll","D\xE4geling","Dahl","Dahlem","Dahlem-Frauenkron","Dahlen","Dahlenburg","Dahlen OT Ochsensaal","Dahlewitz","Dahlwitz-Hoppegarten","Dahme","Dahme/Mark","Dahmen","Dahmetal","Dahmsdorf","Dahn","D\xE4hre","Daisendorf","Dalitz","Dallahn","Dalldorf","Dallgow","Dallgow D\xF6beritz","Dallgow - D\xF6beritz","Dallgow-D\xF6beritz","Dallmin","Dalum","Dambeck","Damgarten","Dammdorf","Damme","Dammende","Dammfleth","Dammheim","Damnatz","Damp","Damsdorf","Dangast","Dangenstorf","Dangstetten","D\xE4nischenhagen","Dankenfeld","Dannau","Dannenberg","Dannenberg (Elbe)","Dannenfels","Dannenwalde","Dannstadt","Dannstadt-Schauernheim","Dardesheim","Dargen","Dargun","Darlingerode","Darmsheim","Darmstadt","Darmstadt-Arheilgen","Darmstadt - Arheiligen","Darmstadt Eberstadt","Darmstadt-Eberstadt","Darnebeck","Darrigsdorf","Darry","Darscheid","Darsekau","Darup","Darze","Dasing","Daskow","Dassel","Dassel-Markoldendorf","Dassow","D\xE4tgen","Datteln","Datteln-Meckinghoven","Dattenberg","Daubach","Dauborn","Daubringen","Dauchingen","Daufenbach","Daun","Daun-Boverath","Daun - P\xFCtzborn","Dautphetal","Daverden","Daxweiler","DE","Debring","Dechsendorf","Dechtow","Deckenpfronn","Dedelstorf","Dedensen","Dedesdorf","Deesbach","Degerndorf","Deggendorf","Deggendorf-Fischerdorf","Deggenhausertal","Deggingen","Dehnitz","Deidesheim","Deifeld","Deining","Deining-Bahnhof","Deinsdorf","Deinste","Deisenhofen","Deising","Dei\xDFlingen","Dei\xDFlingen-Lauffen","Deitersen","Deizisau","Delbr\xFCck","Delbr\xFCck-Bentfeld","Delbr\xFCck-Boke","Delbr\xFCck-Ostenland","Delbr\xFCck Westenholz","Delbr\xFCck-Westenholz","Delecke","Delingsdorf","Delitzsch","Delitzsch - Roedgen","Dellfeld","Delligsen","Delling","Dellmensingen","Delmenhorst","Delmenhost","Demen","Demmin","Denkendorf","Denklingen","Densborn","Dentlein","Denzlingen","Depenbeck","Derching","Derenburg","Dergenthin","Derkum","Dermbach","Dernau","Dernbach","Dersau","Dessau","Dessau OT Mildensee","Dessau-Ro\xDFlau","Detern","Detmold","Detmold - Diestelbruch","Detmold-Heiligenkirchen","Detmold-Pivitsheide","Dettelbach","Dettenhausen","Dettenheim","Dettingen","Dettingen an der Emrs","Dettingen an der Erms","Dettingen an der Iller","Dettingen/Iller","Dettingen/Illertal","Dettingen unter Teck","Dettingen Unter Teck","Dettmannsdorf","Dettmannsdorf-K\xF6lzow","Dettum","Detzeln","Deubach","Deuben","Deuna","Deusdorf","Deutenhausen","Deutleben","Deutschbaselitz","Deutscheinsiedel","Deutsch Evern","Deutschneudorf","Deutschneudorf, OT Deutscheinsiedel","Deutzen","Dewangen","Deyelsdorf","Deyelsdorf OT F\xE4sekow","Deyelsdorf OT Stubbendorf/F\xE4sekow","Diahren","Diakonie, Evangelische Gemeinde","Dichtelbach","Dickel","Dieblich","Dieburg","Diedorf","Diedrichshagen","Diefenbach, Gemeinde Sternenfels","Diekhof","Diekholzen","Dielheim","Diemelsee","Diemelsee-Adorf","Diemelsee-Heringhausen","Diemelstadt","Diemelstadt-Neudorf","Diemelstadt-Rhoden","Diemelstadt-Wethen","Diepenau","Diepholz","Diepholz H\xFCde-Burlage","Diepoldsdorf","Diepoltsdorf","Diera-Zehren","Diera-Zehren OT Kleinzadel","Diera-Zehren OT Schieritz","Dierdorf","Dierhagen","Diesbar-Seu\xDFlitz","Diesdorf","Diesenbach","Dieskau","Diespeck","Diespeck - Ehe","Diessen","Die\xDFen","Diessen am Ammersee","Die\xDFen am Ammersee","Diessenhofen","Die\xDFen-Riederau","Diestedde","Diestelbruch","Dietenheim","Dietenhofen","Dietersberg","Dietersburg","Dietersdorf","Dietershausen","Dietersheim","Dieterskirchen","Dietfurt","Dietfurt an der Altm\xFChl","Dietingen","Dietmannsried","Dietmannsried - Schrattenbach","Dietramszell","Dietramszell-Lochen","Dietzenbach","Dietzenrode","Dietzhausen","Dietzh\xF6lztal","Diez","<different>","Dillenburg","Dillenburg-Eibach","Dillenburg-Niederscheld","Dillenburg-Oberscheld","Dillingen","Dillingen a.d. Donau","Dillingen an der Donau","Dillingen/Saar","Dingelsdorf","Dingelst\xE4dt","Dingelstedt am Huy","Dingen","Dingolfing","Dinkelsb\xFChl","Dinkelscherben","Dinklage","Dinslaken","Dinslaken-Hiesfeld","Dippach","Dipperz","Dippmannsdorf","Dippoldiswalde","Dippoldiswalde OT Paulsdorf","Dirlammen","Dirlewang","Dirmstein","Dischingen","Dishley","Dissen","Dissen-Striesow","Ditfurt","Dittelbrunn","Dittelsdorf","Dittenheim","Dittersbach","Dittersdorf","Dittishausen","Dittmannsdorf","Dittrichsh\xFCtte","Dittweiler","Ditzingen","Dobbertin","Dobbin / Linstow OT Neu Dobbin","Dobbrikow","Dobel","D\xF6beln","D\xF6beln OT Technitz","Doberlug-Kirchhain","D\xF6bern","Doberschau","Doberschau-Gau\xDFig","Dobersch\xFCtz","Dobersdorf","Doberstorf","Dobitschen","D\xF6brichau","D\xF6britschen OT Vollradisroda","Dobritz","D\xF6britz","Dockweiler","Dodau","Dohna","Dohren","Dolgow","D\xF6litzsch","Dollbergen","Dolle","Dollenchen","Dollern","Dollerup","D\xF6llnitz","Dollnstein","D\xF6lzig /Schkeuditz","Domb\xFChl","D\xF6mitz","Dommatzen","Dommitzsch","Dommitzsch OT Mahlitzsch","Doms\xFChl","Donaueschingen","Donaustauf","Donauw\xF6rt","Donauw\xF6rth","Donnbronn","Donndorf","Donnersdorf","Donop","D\xF6nsdorf","D\xF6nsel","Donzdorf","Dor","D\xF6renhagen","D\xF6rentrup","D\xF6rentrup / Humfeld","Dorfchemnitz","D\xF6rfel","Dorfen","D\xF6rfleins","D\xF6rfles-Esbach","Dorf Mecklenburg","Dorfprozelten","Dorf Wehlen","Dormagen","Dornach","Dornberg","Dornburg","Dornburg Saale","Dorndorf","Dorndorf-Steudnitz","D\xF6rnfeld an der Ilm","Dornhan","Dornheim","D\xF6rnick","D\xF6rnigheim","D\xF6rnitz","Dornstadt","Dornstetten","Dornum","Dornum-Dornumergrode","Dornumersiel/Westerbur","D\xF6rpen","D\xF6rpstedt","D\xF6rrmorsbach","Dorstadt","Dorsten","Dorsten-Wulfen","Dortelweil","D\xF6rth","Dortmund","Dortmund-Dorstfeld","Dortmund Marten","Dortmund Mengede","Dortmund-Mengede","Dorum","Dorum-Neufeld","D\xF6rverden","D\xF6rverden/Diensthop","D\xF6rverden/Stedebergen","D\xF6rzbach","D\xF6schwitz","D\xF6singen","Dossenheim","Dossnheim","D\xF6tlingen","D\xF6tlingen-Aschenstedt","Dotternhausen","Dottesfeld / Westerwald","Drachhausen","Drachselsried","Drackenstedt","Drage","Drage (Elbe)","Drahnsdorf","Drakenburg","Dramfeld","Drangstedt","Dransau","Dranse","Dransfeld","Dranske","Dranske / Bakenberg","Dranske-Bakenberg","Dranske/Bakenberg","Drantum","Drasdo","Dreba","Drebach","Drebach-OT Vernusberg","Drebber","Drebkau","Drebkau / OT Domsdorf","Dreetz","Dreetz Waldsiedlung","Dreggers","Drei Annen Hohne","Dreieich","Dreieich-Buchschlag","Dreieich-Dreieichenhain","Dreieich-G\xF6tzenhain","Dreieich Offenthal","Dreieich-Offenthal","Dreieich - Sprendlingen","Dreieich-Sprendlingen","Dreieiech","Drei Gleichen","Dreigr\xFCn","Dreileben","Dreis","Dreis-Br\xFCck","Dreitzsch","Drekau","Drense","Drensteinfurt","Drentwede","Dresden","Dresden-Cossebaude","Dresden Gompitz","Dresden Klotzsche","Dresden Langebr\xFCck","Dresden OT Mockritz","Dresden OT Pillnitz","Dresden OT Sch\xF6nfeld","Dresden OT Tolkewitz","Dresden-Wei\xDFig","Driedorf","Dr\xF6bischau","Drochow","Drochtersen","Dr\xF6geheide","Dr\xF6genindorf","Drognitz","Drohe","Drolshagen","Drolshagen-Essinghausen","Dr\xF6nnewitz","Dr\xF6schede","Drosedow","Drosendorf","Drove","Droy\xDFig","Dr\xFCbeck","D\uFFFDsseldorf","Dubro","Ducherow","Dudeldorf","D\xFCdenb\xFCttel-Grefenmoor","Dudendorf","Dudenhofen","Duderstadt","Dudweiler","Duedinghausen","Duesseldorf","Duhnen","Duingen","Duisburg","Duisburg-Hochfeld","Duisburg-Ka\xDFlerfeld","Duisburg-Marxloh","Duisburg-M\xFCndelheim","Duisburg-Neudorf","Duisburg-Neum\xFChl","Duisburg-Obermarxloh","Duisburg-Ruhrort","Duisburg-Walsum","D\xFClken","D\xFCllstadt","D\xFClmen","D\xFCmmer","Dummerstorf","Dummerstorf OT Bandelstorf","Dummerstorf OT Damm","Dummerstorf OT Griebnitz","Dummerstorf OT Gro\xDF Potrems","Dummerstorf OT Gro\xDF Viegeln","Dummerstorf OT Hohen Schwarfs","Dummerstorf OT Kavelstorf","Dummerstorf OT Klein Potrems","Dummerstorf OT Klingendorf","Dummerstorf OT Niex","Dummerstorf OT Pankelow","Dummerstorf OT Prisannewitz","Dummerstorf OT Prisannewitz Ausbau","Dummerstorf OT Reez","Dummerstorf OT Scharstorf","Dummerstorf OT Wendorf","Dunningen","D\xFCnsen","D\xFCnstekoven","D\xFCnzlau","Dunzweiler","Durach","Durbach","D\xFCren","D\xFCren-Arnoldsweiler","D\xFCren-Birgel","D\xFCren-Distelrath","D\xFCren-G\xFCrzenich","D\xFCren-Huchem Stammeln/Industriegebiet","D\xFCren - Lendersdorf","D\xFCren-Lendersdorf","D\xFCren-Mariaweiler","D\xFCren-R\xF6lsdorf","Durlangen","Durmersheim","D\xFCrn","D\xFCrnau","D\xFCrnbach","D\xFCrrhennersdorf","D\xFCrrnhaar","D\xFCrrr\xF6hrsdorf-Dittersbach","D\xFCrrwangen","D\xFCrrweitzschen","D\xFCsedau","D\xFCshorn","D\xFCsseldorf","D\xFCsseldorf-Reisholz","D\xFCsseldorf-Urdenbach","Du\xDFlingen","D\xFCsternbusch","Ebbs","Ebeleben","Ebelsbach","Ebenau","Ebenhausen","Ebens\xE4ge","Ebensfeld","Ebensfeld - Unterneuses","Eberau","Eberbach","Eberdingen","Eberdingen/Nussdorf","Eberfing","Eberg\xF6tzen","Eberhardzell","Eberhardzell-Oberessendorf","Ebermannstadt","Ebermergen","Ebern","Ebernhahn","Ebersbach","Ebersbach an der Fils","Ebersbach/Fils","Ebersbach/Sa.","Ebersberg","Ebersbrunn","Ebersburg","Ebersburg-Thalau","Ebersburg Weyhers","Ebersdorf","Ebershardt","Ebershausen","Eberstadt","Eberstadt-Klingenhof","Eberswalde","Ebhausen","Ebing","Ebnat","Ebnisee","Ebrach","Ebratshofen","Ebringen","Ebsdorfergrund","Ebstorf","Eching","Eching / Dietersheim","Eching, Haselfurth","Eching, Haunwang","Eching, Kronwinkl","Eching, Viecht","Eching, Weixerau","Echterdingen","Echternach","Echternacherbr\xFCck","Echtz","Echzell","Eckartsberga","Eckartshausen","Eckenberg","Eckental","Eckental-Brand","Eckental-Eschenau","Eckental-Forth","Eckernf\xF6rde","Eckersdorf","Eckersm\xFChlen","Eckfeld","Eckhorst","Ecknach","Eddelak","Edderitz","Eddersheim","Edemissen","Edemissen (Alvesse)","Edemissen-Oelheim","Edenkoben","Ederm\xFCnde","Edersleben","Edertal","Edertal-Affoldern","Edertal-Anraff","Edertal-Bergheim","Edertal-B\xF6hne","Edertal - Bringhausen","Edertal-Bringhausen","Edertal-Buhlen","Edertal-Edersee","Edertal-Gellershausen","Edertal-Giflitz","Edertal-Hemfurth","Edertal-Kleinern","Edertal-K\xF6nigshagen","Edertal-Mehlen","Edertal-Rehbach","Edertal-Wellen","Edesheim","edewecht","Edewecht","Edewecht - Friedrichsfehn","Edewecht - Wildenloh","Ediger-Eller","Edingen","Edingen-Nackarhausen","Edingen-Neckarhausen","Edinghausen","Edling","Effelder","Effeldorf","Effeltrich","Effolderbach","Efringen-Kirchen","Egeln","Egelsbach","Egenhausen","Egenhofen","Egesheim","Egestorf","Eggebek","Eggenberg","Eggenfelden","Eggenstein","Eggenstein-Leopoldshafen","Eggenstein-Loepoldshafen","Eggerode","Eggersdorf","Eggersdorf / Siedlung","Eggersheim","Eggesin","Egglham","Egglkofen","Eggst\xE4tt","Eging","Eging am See","Eglasm\xFChle","Egling","Egling an der Paar","Egloffstein","Egmating","Ehekirchen","Ehestorf - Rosengarten","Ehingen","Ehingen-Berg","Ehingen (Donau)","Ehingen - Granheim","Ehlen","Ehlersberg","Ehlershausen","Ehningen","Ehra","Ehra-Lessien","Ehrenberg","Ehrenberg (R\xF6hn)","Ehrenburg","Ehrenfriedersdorf","Ehrenkirchen","Ehringshausen","Eibau","Eibau / OT Walddorf","Eibelshausen","Eibelstadt","Eibenstock","Eibenstock OT Carlsfeld","Eibenstock / OT Carlsfeld","Eich","Eichelberg","Eichelhof","Eichelsdorf","Eichen","Eichenau","Eichenbarleben","Eichenberg","Eichenb\xFChl","Eichendorf","Eichenzell","Eichenzell (OT L\xFCtter)","Eichenzell-Welkers","Eicherloh","Eichholz Stadt Steinheim in Westfalen","Eichigt","Eichlberg","Eichst\xE4tt","Eichst\xE4tt-Wintershof","Eichstetten","Eichstetten am Kaiserstuhl","Eichwalde","Eickendorf","Eickhorst","Eigeltingen","Eigenrode","Eilenburg","Eilmeldingen","Eilsleben","Eilte","Eime","Eimen","Eimke","Einartshausen","Einbeck","Einbeck-Edemissen","Einbeck - Volksen","Eineborn","Einen","Einharding","Einhausen","Ein\xF6d","Einsbach","Einselthum","Einthal","Eischleben","Eiselfing","Eisenach","Eisenacher Stra\xDFe","Eisenach / H\xF6rschel","Eisenbach","Eisenberg","Eisenberg (Pfalz)","Eisenberg/Pfalz","Eisenb\xFChl,Berg","Eisenharz","Eisenhofen","Eisenh\xFCttenstadt","Eisfeld","Eisingen","Eisleben","Eisleben, Lutherstadt","Eislingen","Eislingen/Fils","Eitelborn","Eitensheim","Eiterfeld","Eitorf","Eitorf-Baleroth","Eitting","Eittingermoos","Eiweiler","Ekelsdorf","Ekenis","Elbingerode","Elbingerode (Harz)","Elbrinxen","Elbtal","Elchesheim-Illingen","Elchingen","Eldena","Eldenburg","Elend","Elgersburg","Elgershausen","Elisabethfehn","Elkenroth","Ella","Ellefeld","Ellenbach","Ellenberg","Ellenweiler","Ellenz-Poltersdorf","Ellerau","Ellerbek","Ellerhoop","Ellerm\xFChle","Ellhofen","Ellhofen / Weinsberg","Ellrich","Ellwangen","Ellwangen (Jagst)","Ellwangen/Jagst","Ellwangen-Neunheim","Elmenhorst","Elmenhorst/Lichtenhagen","Elmlohe","Elmshorn","Elmstein","Elmstein-Helmbach","Elpersb\xFCttel","Elpersheim","Elsdorf","Elsdorf-Westerm\xFChlen","Elsen","Elsendorf","Elsenfeld","Elsenz","Elsfleth","Elskop","Elsnig, OT D\xF6bern","Elsteraue","Elsteraue/Tr\xF6glitz","Elsterberg","Elster (Elbe)","Elsterheide","Elsterheide, Ortsteil Geierswalde","Elsterwerda","Elstra","Elterlein","Eltheim","Eltmann","Eltville","Eltville am Rhein","Elxleben","Elz","Elzach","Elze","Elze-W\xFClfingen","Elztal-Dallau","Embsen","Emden","Emden Stadt","Emertsham","Emkendorf","Emleben","Emlichheim","Emmelsb\xFCll","Emmelsb\xFCll-Horsb\xFCll","Emmelshausen","Emmendingen","Emmendorf","Emmerborn","Emmerich","Emmerich am Rhein","Emmering","Emmerke","Emmerszell","Emmerthal","Emmingen-Liptingen","Empel-Rees","Empfingen","Emsb\xFCren","Emsb\xFCren-Leschede","Emsdetten","Emseloh","Emsetal","Emskirchen","Emstek","Emstekerfeld","Emtinghausen","Emtmannsberg","Enderndorf","Endingen","Endingen am Kaiserstuhl","Endlhausen","Engden","Engelade","Engelbostel","Engelbrechtsche Wildnis","Engelbrechtweg","Engeln","Engelsbrand","Engelsdorf","Engelskirchen","Engelstadt","Engelthal","Engen","Engenthal","Enger","Engerda","Enger-Siele","Enge-Sande","Englschalling","Engstingen","Eningen","Eningen unter Achalm","Enkenbach-Alsenborn","Ennabeuren","Ennepetal","Ennepetal-Oelkinghausen","Ennigerloh","Enno Hector Weg 19,Aurich","Ensch","Ensdorf","Ense","Ense-Niederense","Ensingen","Enzberg","Enzenreuth","Enzkl\xF6sterle","Enzweihingen","Epenw\xF6hrden","Epfendorf","Epfenthau","Eppelborn","Eppelheim","Eppelsheim","Eppendorf","Eppertshausen","Eppingen","Eppisburg","Epplings","Eppstein","Erbach","Erbachhof","Erbendorf","Erbenhausen","Erbenheim","Erbshausen","Erching","Erdbach","Erding","Erding / Altenerding","Erding / Pretzen","Erdmannhausen","Erdmannsdorf","Erdmannsweiler","Erdweg","Erfde","Erftstadt","Erftstadt-Friesheim","Erftstadt-K\xF6ttingen","Erfur","Erfurt","Erfurt-B\xFC\xDFleben","Erfurt-Egstedt","Erfurt-Hochheim","Erfurt-Kerspleben","Erfurt-Mittelhausen","Erfurt OT Urbich","Erfweiler","Erfweiler-Ehlingen","Ergenzingen","Ergersheim","Ergoldsbach","Erharting","Ering","Eriskirch","Erkelenz","Erkelsdorf","Erkenbrechtsweiler","Erkerode - Lucklum","Erkerode/Lucklum","Erkheim","Erkner","Erkrath","Erl","Erlabrunn","Erlach","Erlangen","Erlangen-Bruck","Erlangen B\xFCchenbach","Erlangen-B\xFCchenbach","Erlangen-Eltersdorf","Erlangen-Kosbach","Erlau","Erlbach","Erlbach-Kirchberg","Erlenbach","Erlenbach am Main","Erlenbach bei Marktheidenfeld","Erlenbach-Binswangen","Erlenbrunn","Erlensee","Erligheim","Erling","Erlte-Visbek","Ermsleben","Ermstedt","Erndtebr\xFCck","Ernh\xFCll","Ernsbach","Ernsgaden","Ernstthal am Rennsteig","Erolzheim","Erpel","Erpel OT Orsberg","Erpolzheim","Ersdorf","Ertingen","Erwitte","Erxleben","Erzbach","Erzhausen","Eschau","Eschbach","Eschborn","Eschede","Eschelbach","Eschelbronn","Eschenbach","Eschenburg","Eschenfelden","Eschenhahn","Eschenz","Escherndorf","Eschershausen","Eschlkam","Eschollbr\xFCcken","Eschwege","Eschweiler","Eschweiler \xFCber Feld","Eschweiler-Weisweiler","Esenhausen","Esens","Esens-Bensersiel","Esgrus","Eslarn","Eslohe","Eslohe-Bremke","Espelkamp","Espelkamp Isenstedt","Espenhain","Espenhain OT Oelzschau","Espertoftfeld","Esse","Essehof","Esselbach","Essem","Essen","Essen-Altenessen","Essen-Altenessen-S\xFCd","Essenbach","Essen-Bergeborbeck","Essen Bevern","Essen-Bochold","Essenheim","Essen in Oldenburg","Essen i.O.","Essen-Kettwig","Essenrode","Essig","Essing","Essingen","Esslingen","Esslingen am Neckar","Estenfeld","Esterwegen","Esthal","Esting","Estorf","Ettal","Etteln","Ettenbeuren","Ettenb\xFCttel","Ettenheim","Ettenstatt","Ettersdorf","Etterwinden","Ettingshausen","Ettlingen","Ettringen","Etz","Etzel","Etzelwang","Etzgen","Euba","Euerbach","Euerdorf","Euerwang","Eulenberg","Eulsbach","Eurasburg","Euskirchen","Euskirchen-Flamersheim","Euskirchen-Kirchheim","Euskirchen-Kuchenheim","Euskirchen-Palmersheim","Euskirchen-Stotzheim","Eu\xDFenheim","Eutin","Eutingen","Eutingen im G\xE4u","Everode","Evershagen, Rostock","Eversten","Everswinkel","Evessen","Ewersbach","Extertal","Extertal-Almena","Eydelstedt","Eyendorf","Eyrain","Eystrup","Fachbach","Fachbach/Lahn","Fahrdorf","Fahren","Fahrenbach","Fahrenzhausen","Fahrland","F\xE4hrstra\xDFe","Faistenau","Faistenhaar","Faistenoy","Falkenau","Falkenberg","Falkenberg/Elster","Falkendorf","Falkenhagen","Falkenhain","Falkensee","Falkensee / Waldheim","Falkenstein","Falkenstein/Harz","Falkenstein OT Wieserode","Falkenstein/Vogtl","Fallersleben","Fambach / He\xDFles","Farchant","Fargau-Pratjau","Farsleben","Fasendorf","Fa\xDFberg","Faulbach","Faulenrost","Faul\xFCck","Fechingen","Fegenheim","Fehmarn","Fehmarn-Burgstaaken","Fehrbellin","Fehrbellin-Tarmow","Fehrenbach","Fehrenbracht","Feichten","Feilitzsch","Feldafing","Feldatal","Feldatal-Gro\xDF-Felda","Feldberg","Feldberg-B\xE4rental","Feldberger Seenlandschaft","Feldberger Seenlandschaft OT Waldsee","Felde","Felde-Brandsbek","Felde-Klein Nordsee","Feldhorst","Feldkirchen","Feldkirchen-Westerham","Feldrom","Felixsee","Fell","Fellbach","Fellen","Fellheim","Felsberg","Felsberg-Gensungen","Fensterbach","Fensterbach-Freih\xF6ls","Fentbach","Ferdinandshof","Fermerswalde","Fernmittenhausen","Fernwald","Festgel\xE4nde Insel","Feucht","Feucht - Schwarzenbruck","Feuchtwangen","Feuchtwangen-Dorfg\xFCtingen","Feusdorf","Fichtelberg","Fichtelberg / Neubau","Fichtenau","Fickm\xFChlen","Fiefbergen","Filderstadt","Filderstadt-Bonlanden","Filderstadt-Sielmingen","Filsum","Filsum - Lammertsfehn","Finkenwerder","Finnentrop","Finnentrop-Bamenohl","Finnentrop-Fretter","Finnentrop-Heggen","Finning","Finowfurt","Finsing","Finsing / Eicherloh","Finsterau","Finsterbrunnertal","Finsterm\xFChle","Finsterwalde","Fintel","Finthen","Firrel","Fischach","Fischbach","Fischbachau","Fischbachau - Birkenstein","Fischbach bei Dahn","Fischbach Bei Dahn","Fischbachtal","Fischbachtal - Niedernhausen","Fischbek","Fischen","Fischenich","Fischen Langenwang","Fischerbach","Fischerhude","Fischheim","Fischlaken","Fissau","Flachslanden","Flachsmeer","Fladungen","Flaesheim","Flammersfeld","Flarchheim","Flechtingen","Fleckeby","Flecken Zechlin","Fleetmark","Flehingen","Flein","Flensburg","Flerzheim","Flessau","Flessenow","Flieden","Fliegenfelde","Flie\xDFau","Flintbek","Flintsbach am Inn","Fl\xF6ha","Floh-Seligenthal","Flonheim","Fl\xF6rrsheim am Main","Fl\xF6rsbach","Fl\xF6rsbachtal","Fl\xF6rsheim","Fl\xF6rsheim am Main","Fl\xF6rsheim-Dalsheim","Florstadt","Flo\xDF","Fl\xF6\xDFberg","Flossenb\xFCrg","Fl\xFCggendorf","Flughafen Leipzig-Halle","Fluorn-Winzeln","F\xF6ching","Fockbek","Fockendorf OT Pahna","F\xF6ggenbeuern","F\xF6hrden-Barl","F\xF6hren","Fohren-Linden","Forbach","Forbach-Erbersbronn","Forbach-Gausbach","Forbach-Rote Lache","Forchheim","Forchheim - Burk","Forchtenberg","F\xF6rderstedt","F\xF6ritz","F\xF6rrien","Forst","Forstern","Forst - Gro\xDF Jamno","Forstinning","Forst (Lausitz)","Forth","F\xF6rtha","Frabertsham","Frahelsbruck","Frakfurt am Main","Framersheim","Frammersbach","Frankenau","Frankenberg","Frankenberg-OT Sachsenburg","Frankenberg/Sa.","Frankenberg/Sachsen","Frankenhain","Frankenhardt","Frankenheim","Frankenroda","Frankenstein","Frankenstein-Memmendorf","Frankenthal","frankfurt","Frankfurt","Frankfurt a.M.","Frankfurt a. M.","Frankfurt am Main","Frankfurt am Main - Nied","Frankfurt-Bockenheim","Frankfurth am Main","Frankfurt-Hausen","Frankfurt/M","Frankfurt/Main","Frankfurt-Nied","Frankfurt - Niederursel","Frankfurt (Oder)","Frankfurt-Ostend","Frankfurt-R\xF6delheim","Frankfurt-Schwanheim","Frankfurt-Sindlingen","Frankfurt-Sossenheim","Frankfurt-Zeilsheim","Frankleben","Frankroda","Franzenheim","Franzh\xE4uschen","Frasdorf","Frauenau","Frauenchiemsee","Frauenhain","Frauenneuharting","Frauenstein","Frauenwald","Frechen","Frechen-K\xF6nigsdorf","Freckenfeld","Fredeburg","Fredelsloh","Freden","Fredenbeck","Fredersdorf","Fredersdorf-Voglesdorf","Freest","Freiamt","Freiberg","Freiberg am Neckar","Freiberg/Neckar","freiburg","Freiburg","Freiburg/Elbe","Freiburg im Breisgau","Freiburg-Munzingen","Freidling","Freienorla","Freienried","Freienseen","Freiensteinau","Freienwill","Freigericht","Freigericht-Altenmittlau","Freigericht-Bernbach","Freigericht-Horbach","Freigericht-Neuses","Freigericht-Somborn","Freihalden","Freihausen","Freihung","Freilassing","Freileben","Freilingen","Freinberg-Hinding","Freinsheim","Freirachdorf","Freir\xF6ttenbach","Freisen","Freisheim","Freising","Freising-Lerchenfeld","Freismissen","Freistett","Freital","Freital-Wei\xDFig","Frellstedt","Fremdingen","Fremdiswalde","Frenkhausen","Frensdof","Frensdorf","Frensdorf-Herrnsdorf","Frensdorf-Untergreuth","Freren","Fresendorf","Frestedt","Frettenshofen","Fretzdorf","Freudenberg","Freudenberg-Boxtal","Freudenburg","Freudenstadt","Freudenstadt-Kniebis","Freyburg","Freyburg (Unstrut)","Freyburg/Unstrut","Freyburg(Unstrut)","Freyburg( Unstrut)","Freyenstein","Freystadt","Freyung","Frickenhausen","Frickingen","Fridingen a. d. Donau","Fridolfing","Friedberg","Friedberg-Bachern","Friedberg (Hessen)","Friedberg in Hessen","Friedberg-St\xE4tzling","Friedberg-Wiffertshausen","Friedeburg","Friedenfels","Friedenweiler-R\xF6tenbach","Friederikenhof","Friederikenthal","Friedersdorf","Friedewald","Frieding-Andechs","Friedland","Friedland-Gro\xDF Schneen","Friedrich-Augustengroden","Friedrichkoog","Friedrichroda","Friedrichsbrunn","Friedrichsdorf","Friedrichsdorf-Burgholzhausen","Friedrichsdorf im Taunus","Friedrichsgr\xFCn","Friedrichshafen","Friedrichshof","Friedrichsh\xF6he","Friedrichsh\xFCtte","Friedrichskoog","Friedrichsrode","Friedrichsruh","Friedrichsruhe","Friedrichstadt","Friedrichstal","Friedrichsthal","Friedrichswalde","Friedrichswerth","Frielendorf","Frielingsdorf","Friemar","Friemersheim","Frienstedt","Friesack","Friesehagen","Friesen","Friesenhagen","Friesenheim","Friesenried","Friesoythe","Friesoythe-Kamperfehn","Friesoythe-Markhausen","Friesoythe Neuvrees","Friolzheim","Fristingen","Frittlingen","Fritzlar","Fritzlar-Cappel","Fritzlar-Haddamar","Fritzlar-Lohne","Fritzlar-Oberm\xF6llrich","Fritzlar-Rothhelmshausen","Fritzlar-Ungedanken","Fritzlar-Wehren","Fritzlar-Werkel","Fritzlar-Z\xFCschen","Frohburg","Fr\xF6hden","Frohnau","Frohnhausen","Frohnhof","Frohnstetten","Fr\xF6hstockheim","Fronau-Neub\xE4u","Fr\xF6ndenberg","Fr\xF6ndenberg/Ruhr","Fronhausen","Fronreute","Frontenhausen","Frose","Fr\xF6ttmaning","Fr\xF6ttst\xE4dt","Frotzersricht","Fr\xFChlinghausen","Fuchsloch","Fuchsm\xFChl","Fuchsstadt","Fuchstal","Fuhlendorf","Fuhrberg","fulda","Fulda","Fulda Bronnzell","Fuldabr\xFCck","Fulda Istergiesel","Fulda Niederrode","Fulda-S\xFCdend","Fuldatal","Fuldatal-Simmershausen","Fuldatal-Wilhelmshausen","Fulda Zirkenbach","Fulgenkoppel","Fulrda","F\xFCnfseen OT Rogeez","F\xFCrfeld","F\xFCrstenau","F\xFCrstenberg (Havel)","F\xFCrstenberg/Havel","F\xFCrstenfeldbruck","F\xFCrstenhagen","F\xFCrstenhof","F\xFCrstenstein","F\xFCrstenwalde","F\xFCrstenwalde (Spree)","F\xFCrstenwalde/Spree","F\xFCrstenzell","Furth","F\xFCrth","Furth bei Landshut","F\xFCrth Bislohe","Furth im Wald","F\xFCrth-Poppenreuth","F\xFCrth-Zirndorf","Furtwangen","Furtwangen im Schwarzwald","F\xFCsing","Fu\xDFbergmoos","F\xFCssen","Fu\xDFenberg","Fu\xDFg\xF6nheim","Futterkamp","Gaberndorf","Gablingen","Gablingen-L\xFCtzelburg","Gachenbach","Gackenbach","Gadebusch","G\xE4dheim","G\xE4gelow","Gager","Gaggenau","Gaggenau-H\xF6rden","Gaggenau-Michelbach","Gaggenau-Moosbronn","Gahlenz","Gaibach","Gaiberg","Gaienhofen","Gaienhofen/Hemmenhofen","Gaienhofen-Horn","Gaildorf","Gailingen","Gailsbach","Gaimersheim","Gaisheim","Gai\xDFach","Galbergweg","Galenbeck","Gallinchen","Gallin-Kuppentin","Galmsb\xFCll-Kleiseerkoog","Gammelby","Gammellund","Gammelsdorf","Gammelshausen","Gammertingen","Ganderkeese-Stenum","Ganderkesee","Ganderkese-Heide","Gangelt","Gangkofen","G\xE4nsb\xFCgl","Ganse","Ganzer","Garbenteich","Garbsen","Garching","Garching bei M\xFCnchen","Garching b. M\xFCnchen","Garching b. M\xFCnchen / Hochbr\xFCck","Garching-Hochbr\xFCck","Gardelegen","Garding","Garlstorf","Garmisch-Partenkirchen","Garmissen","Garnbach","Garnberg","Garrel","Gars","Garstedt","Garstedt - Wulfsen","Gartenstadt","Gartow","G\xE4rtringen","G\xE4rtringen (Kreis B\xF6blingen)","G\xE4rtringen-Rohrau","Gartz (Oder)","Garvensdorf","Garzau-Garzin","Garz/R\xFCgen","Gaschwitz","Gaste","Gatersleben","Gau-Algesheim","Gauel","G\xE4ufelden","Gauk\xF6nigshofen","Gau-Odernheim","Gauting","Gauting-Unterbrunn","Gebersdorf","Gebesee","Gebratzhofen","Gebsattel","Gebstedt","Gechingen","Gedern","Gedern-Wenings","Gedser","Geeste","Geestgottberg","Geesthacht","Geesthacht OT Tespehude Strand","Gefell","Gefrees","Gegenbach","Gehaus","Gehlberg","Gehlert","Gehofen","Gehrde","Gehrden","Gehren","Geierhut","Geiersthal","Geiersthal-Hartmannsgrub","Geierswalde","Geigant","Geilenkirchen","Geilenkirchen - Lindern","Geilenkirchen-Niederheid","Geilertshausen","Geinsheim","Geisa","Geiselberg","Geiselgasteig","Geiselh\xF6ring","Geiselwind","Geisenfeld","Geisenhain","Geisenhausen","Geisenheim","Geisingen","Geislingen","Geislingen an der Steige","Geislingen-Waldhausen","Geismar","Geissen","Gei\xDF-Nidda","Geithain","Gelbensande","Geldern","Geldern - L\xFCllingen","Geldern-Walbeck","Gelenau","Gelnhausen","Gelnhausen-Hailer","Gelnhausen-Haitz","Gelnhausen-H\xF6chst","Gelnhausen Meerholz","Gelnhausen-Meerholz","Gelnhausen-Roth","Gelsenkirchen","Gelsenkrichen","Geltendorf","Gelting","Gemmingen","Gemmrigheim","Gemunden","Gem\xFCnden","Gem\xFCnden a. Main","Gem\xFCnden am Main","Gem\xFCnden am Main - Wernfeld","Gem\xFCnden (Wohra)","Gengenbach","Gensingen","Gensungen","Genthin","Genzien","Georgenberg","Georgensgm\xFCnd","Georgenthal","Georgsdorf","Georgsmarienh\uFFFDtte","Georgsmarienh\xFCtte","Gera","Gera - Aga","Gera / Aga","Geraberg","Gera Bieblach Ost","Gerabronn","Gerach","Gera Leumnitz","Geraszell","Geratskirchen","Gera-Windischenbernsdorf","Gerbrunn","Gerbstedt","Gerchsheim","Gerdau","Geretsried","Gerhardsberg","Gerichshain","Geringswalde","Gerlingen","Gerlingen-Schillerh\xF6he","Germaringen","Germaringen-Ketterschwang","Germering","Germersberg","Germershausen","Germersheim","Germerswang","Gernlinden","Gernrode","Gernsbach","Gernsheim","Geroda","Geroda-Wittchenstein","Geroldsgr\xFCn","Geroldshausen","Gerolfingen","Gerolsbach","Gerolsheim","Gerolstein","Gerolzhofen","Gersdorf","Gersfeld","Gersfeld - Schachen","Gersheim","Gersprenz","Gerstenb\xFCttel","Gerstetten","Gerstheim","Gersthofen","Gersthofen-Hirblingen","Gersthofen OT Batzenhofen","Gerstungen","Gerstungen-Oberellen","Gerswalde","Gerzen","Geschendorf","Gescher","Gesees","Geseke","Geseke-Eringerfeld","Geslau","Gesmold","Gessertshausen","Getelo","Gettorf","Geunitz","Gevelesberg","Gevelsberg","Gevenich","Gevlinghausen","Geyer","Geyer OT","Geyersdorf","Giebelstadt","Gieboldehausen","Giekau","Gielde","Gielow","Giengen","Giengen an der Brenz","Gierenderh\xF6he","Giersleben","Giesen","Giessen","Gie\xDFen","Gie\xDFen-Allendorf","Gie\xDF\xFCbel","Gifhorn","Gifhorn-Wilsche","Giggenhausen","Gigging","Gilching","Gilching b. M\xFCnchen","Gilde","Gillenfeld","Gillersdorf","Gilsa","Gilserberg","Gilserberg-Sch\xF6nstein","Gimbsheim","Gimbte-Greven","Gingst","Ginhart","Ginsheim","Ginsheim-Gustavsburg","Girkenroth","Girmte","Girod","Girod-Kleinholbach","Gispersleben","Gistenbeck","Gittelde","Gladau","Gladbeck","Gladdenstedt","Gladenbach","Gladenbach-Erdhausen","Gladenbach-Weidenhausen","Gladigau","Glandorf","Glan-M\xFCnchweiler","Glarum","Glasau","Glash\xFCtte","Glash\xFCtten","Glash\xFCtte-Reinhardtsgrimma","Glasin","Glattbach","Glatten","Glaubitz","Glauburg","Glauburg-Stockheim","Glauchau","Glebitzsch-K\xF6ckern","Glehn","Gleichamberg","Gleichen","Gleichen - Bremke","Gleichen - Kerstlingerode","Gleichen - Reinhausen","Gleichen - Rittmarshausen","Gleichen - W\xF6llmarshausen","Gleicherwiesen","Gleidingen","Gleiriitsch","Gleisenau","Gleisweiler","Gleschendorf","Glesien","Gletzow","Glienicke","Glienicke/Nordbahn","Glienke","Glimbach","Glinde","Glindfeld","Globig-Bleddin","Glonn","Gl\xF6tt","Glottertal","Gl\xF6vzin","Glowe","Gl\xFCcksburg","Gl\xFCcksburg (Ostsee)","Gl\xFCckstadt","Gmeinweiler","Gmund","Gmund am Tegernsee","Gmund a.Tegernsee","Gmund a. Tegernsee","Gmund, D\xFCrnbach","Gnarrenburg","Gnarrenburg-Barkhausen","Gnarrenburg-Karlsh\xF6fen","Gneisenaustadt Schildau","Gneven","Gnewitz","Gniebsdorf","Gnoien","Gnotzheim","Gobbin","G\xF6belnrod","G\xF6bitz-Torna","Goch","Goch-Hassum","Goch-Nierswalde","Gochsheim","G\xF6cklingen","G\xF6da","G\xF6da-Dreikretscham","G\xF6ddenstedt","Goethestadt Bad Lauchst\xE4dt","G\xF6ggenhofen","G\xF6ggingen","Gohlau","G\xF6hren","G\xF6hrener Weg","G\xF6hren-Lebbin","Gohrisch","Gokels","Golchen","Goldbach","Goldbach/Unterafferbach","Goldbeck","Goldberg","Goldenbek","Goldenstedt","Goldisthal","Goldscheuer","Golenz","Gollau","G\xF6llen","Gollenberg OT Kle\xDFen","Gollhofen","G\xF6llin","Gollwitz","Golm","Golmbach","G\xF6lsdorf","G\xF6lshausen","Gol\xDFen","Golzheim","Golzow","Golzow (Oderbruch)","Gomadingen","Gomadingen-Offenhausen","Gomaringen","Gommern","Gommern OT Dannigkow","Gommersheim","Gondelsheim","Gondershausen","Gondorf","Gondsroth","Gonenberg","Gonterskirchen","G\xF6pfersdorf","G\xF6ppingen","G\xF6ppingen Betzgenriet","G\xF6ppingen-Bezgenriet","G\xF6ppingen Faurndau","G\xF6ppingen - Faurndau","G\xF6ppingen-Faurndau","G\xF6ppingen-Holzheim","G\xF6ppingen Jebenhausen","G\xF6ppingen - Jebenhausen","G\xF6ppingen-Jebenhausen","G\xF6ppingen- Jebenhausen","G\xF6ppingen-Jebenhausern","G\xF6ppingen-Ursenwang","Gorenzen","G\xF6risried","G\xF6ritz","Gorleben","G\xF6rlitz","G\xF6rlitz OT Hagenwerder","Gorlosen","G\xF6rmin","Gornau","Gornhausen","G\xF6rnitz","G\xF6rschen","G\xF6rsdorf","Gorsleben","G\xF6rwihl","Gorxheimertal","G\xF6rzig","G\xF6rzke","G\xF6schweiler","Gosen-Neu Zittau","Gosheim","Goslar","Goslar-Ba\xDFgeige","Gossa","Go\xDFberg","Go\xDFdorf","G\xF6sselthal","Gosseltshausen","G\xF6ssenheim","Gossersweiler-Stein","G\xF6ssitz","G\xF6\xDFmannsreuth","G\xF6\xDFnitz","G\xF6\xDFweinstein","G\xF6\xDFweinstein-Moritz","Go\xDFwitz-Bucha","Gostorf","Gotha","Goting","G\xF6tschetal","Gottenheim","Gottesgabe","Gottfrieding","Gottfrieding-Frichlkofen","Gotthun","G\xF6ttien","G\xF6ttingen","G\xF6ttingen-Grone","G\xF6ttingen (Weende)","Gottlieben","Gottmadingen","Gottmadingen-Bietingen","Gottmadingen-Randegg","Gottschdorf","G\xF6tzlesberg","Gowens","Gr0\xDFefehn - Fiebing","Graal M\xFCritz","Graal-M\xFCritz","Grabau","Graben","Graben-Neudorf","Grabenst\xE4tt","Grabenst\xE4tt Unterhochst\xE4tt","Grabenstedt","Grabenstra\xDFe","Grabow","Grabowh\xF6fe","Grabstede","Gr\xE4felfing","Gr\xE4felfing bei M\xFCnchen","Grafenau","Grafenberg","Gr\xE4fenberg","Gr\xE4fenberg-Walkersbrunn","Gr\xE4fendorf","Gr\xE4fendorf-Weickersgr\xFCben","Gr\xE4fenhain","Gr\xE4fenhainichen","Grafenhausen","Grafenrheinfeld","Gr\xE4fenroda","Grafenstadl","Gr\xE4fensteinberg","Gr\xE4fenthal","Grafenwiesen","Grafenw\xF6hr","Grafhorst","Grafh\xFCtte","Gr\xE4finau-Angstedt","Grafing","Grafing bei M\xFCnchen","Grafing b. M\xFCnchen","Grafrath","Grafschaft-Gelsdorf","Graftschaft-Gelsdorf","Graftschaft-Holzweiler","Graftschaft-Ringen","Grainau","Grainet","Graitschen","Grambin","Grambow","Gramkow","Grammendorf","Grammentin","Grammersdorf","Grammow","Gramzow","Gr\xE4n","Gransch\xFCtz","Gransee","Granstedt","Granzow","Grappertshofen","Grasberg","Grasbeuren","Grasbrunn","Grasellenbach","Grasellenbach - Hammelbach","Grasellenbach-Oberscharbach","Grasellenbach-Scharbach","Grasellenbach-Wahlen","Grasmannsdorf","Grassau","Gr\xE5sten","Graubau","Graupa","Gravenhorst","Gr\xE4venwiesbach","Grebbin","Grebenau","Grebendorf","Grebenhain","Grebenstein","Grebin","Greding","Greene","Greetsiel","Grefrath","Grefrath-Vinkrath","Greifenberg","Greifenhagen","Greifenhain","Greifenstein","Greifswald","Greifswald-Stadtrandsiedlung","Greifswald-Wieck","Greiling","Greiz","Greiz-Kurtschau","Gremersdorf","Gremsdorf","Grenzach-Wyhlen","Gressow","Grethem","Grethen","Grettstadt","Greu\xDFen","Greu\xDFenheim","Greven","Grevenbroich","Grevenbroich-Allrath","Grevenkop","Grevenkrug","Grevensm\xFChle","Greven / Westf.","Grevesm\xFChlen","Griebelschied","Grieben","Grieben/Hiddensee","Grieben / Insel Hiddensee","Griebnitz","Gries","Griesbeckerzell","Griesheim","Grie\xDFbach","Grie\xDFbeckerzell","Grie\xDFer","Griesst\xE4tt","Grieth","Grillenberg","Grimma","Grimma OT H\xF6fgen","Grimmen","Grimmen-Gewerbegebiet","Grittel","Gr\xF6ben","Gr\xF6benzell","Gr\xF6bzig","Gr\xF6den","Gr\xF6dersby","Gr\xF6ding","Gr\xF6ditz","Gr\xF6gling","Grohn","Grohnde","Groitzsch","Grolsheim","Gr\xF6mitz","Gronau","Gronau (Westfalen)","Gr\xF6ningen","Gr\xF6nwohld","Gr\xF6nwohldshorst","Grosenaspe","Gro\xDFaitingen","Gro\xDF Ammensleben","Gro\xDFbadegast","Gro\xDFbardorf","Gro\xDFbarkau","Gro\xDFbartloff","Gro\xDFbeeren","Gro\xDF Behnitz","Gro\xDF Behnkenhagen","Gro\xDFbellhofen","Gro\xDF Ber\xDFen","Gro\xDF-Bieberau","Gro\xDF Bierstedt","Gro\xDFblumberg","Gro\xDFbodungen","Gro\xDFbothen","Gro\xDFbothen OT F\xF6rstgen","Gro\xDFbottwar","Gro\xDF Breese","Gro\xDF Breesen","Gro\xDFbreitenbach","Gross Briesen","Gro\xDFbuch","Gro\xDFbuchfeld","Gro\xDF Buchwald","Gro\xDFb\xFCllesheim","Gro\xDFbundenbach","Gro\xDFburgwedel","Gro\xDF Dalzig","Gro\xDF Denkte","Gro\xDFderschau","Gro\xDFdeuben","Gro\xDFdingharting","Gro\xDF Disnack","Gro\xDFdittmannsdorf","Gro\xDFdubrau","Gro\xDFdubrau OT Costa","Gro\xDFdubrau, OT G\xF6beln","Gro\xDFdubrau, OT S\xE4rchen","Gro\xDFdubrau OT Spreewiese","Gro\xDFebersdorf","Grossefehn","Gro\xDFefehn","Gro\xDFefehn - Bagband","Gro\xDFefehn - Fiebing","Gro\xDFefehn - Mittegro\xDFefehn","Gro\xDFefehn - Ostgro\xDFefehn","Gro\xDFefehn - Spetzerfehn","Gro\xDFefehn - Strackholt","Gro\xDFefehn - Timmel","Gro\xDFefehn - Westgro\xDFefehn","Gro\xDFeibstadt","Gro\xDFeichenhausen","Gro\xDF Ellenberg","Gro\xDFenaspe","Gro\xDFenaspe-Brokenlande","Gro\xDFenbrode","Gro\xDFenehrich","Gro\xDFengottern","Gro\xDFengsee","Gro\xDFenhain","Gro\xDFenheidorn","Gro\xDFenhub","Gro\xDFenkneten","Gro\xDFenkneten - Ahlhorn","Gro\xDFenkneten/Haschenbrook","Gro\xDFenl\xFCder","Gro\xDFenlupnitz","Gro\xDFenmarpe","Gro\xDFenrade","Gro\xDFensee","Gro\xDFenseebach","Gro\xDFenstein","Gro\xDFenwiehe","Gro\xDFenw\xF6rden","Gro\xDFerkmannsdorf","Gro\xDFfahner","Gro\xDF F\xF6rste","Gro\xDFfurra","Gro\xDF Gaddau","Gro\xDF Garz","Gro\xDF-Gerau","Gro\xDFglattbach","Gro\xDF Glienicke","Gro\xDFgmain","Gro\xDF Godems","Gro\xDFgoltern","Gro\xDF Gr\xE4nau","Gro\xDF Gr\xF6nau","Gro\xDFgundertshausen","Gro\xDFhabersdorf","Gro\xDFhansdorf","Gro\xDFhartau","Gro\xDFharthau","Gro\xDFhartmannsdorf","Gro\xDFhartpenning","Gro\xDFhausen","Gro\xDF Hehlen","Gro\xDFheide","Gro\xDF Heide","Gro\xDFheide-Berumerfehn","Gro\xDFheide-Ostermoordorf","Gro\xDFheirath","Gro\xDFhelfendorf","Gro\xDFhennersdorf","Gro\xDFhennersdorf / OT Neundorf","Gro\xDFheringen","Gro\xDFhesselohe","Gro\xDFheubach","Gro\xDFholzhausen","Grossinzemoos","Gro\xDF Ippener","Gro\xDFjena","Gro\xDFkarlbach","Gro\xDFkarolinenfeld","Gro\xDF Kelle","Gro\xDFk\xF6nigsf\xF6rde","Gro\xDFkorbetha","Gro\xDF K\xF6ris","Gro\xDFkoschen","Gro\xDF Kreutz (Havel)","Gro\xDFkrotzenburg","Gro\xDFlangheim","Gro\xDFlehna","Gro\xDF Lengden","Gro\xDF Liedern","Gro\xDF Lindow","Gro\xDF Lobke","Gro\xDFlohma","Gro\xDFlohra","Gro\xDF L\xFCdershagen","Gro\xDFmaischeid","Gro\xDFmehring","Gro\xDF Miltzow","Gro\xDF Niendorf","Gro\xDF Nordende","Gro\xDF Nordsee","Gro\xDFobringen","Gro\xDF Oesingen","Gro\xDF Offenseth-Aspern","Gro\xDFolbersdorf","Gro\xDF-Olversum","Grossostheim","Gro\xDFostheim","Gro\xDF Pankow (Prignitz)","Gro\xDF Parin","Gro\xDF Plasten","Gro\xDFp\xF6sna","Gro\xDFpostwitz","Gro\xDFpostwitz/O.L.","Gro\xDF Raden","Gro\xDFr\xE4schen","Gro\xDF Rheide","Gro\xDF Ridsenow","Gro\xDFrinderfeld","Gro\xDFrinderfeld-Sch\xF6nfeld","Gro\xDF Roge","Gro\xDFr\xF6hrsdorf","Gro\xDF Rosenburg","Gro\xDFrosseln","Gro\xDFr\xF6ssen","Gro\xDFr\xFCckerswalde OT Steckewalde","Gro\xDFsachsen","Gro\xDF Sarau","Gro\xDF S\xE4rchen","Gro\xDF Schacksdorf - Simmersdorf","Gro\xDF Schacksdorf-Simmersdorf","Gro\xDF Schenkenberg","Gro\xDFschirma","Gro\xDFschirma-Gro\xDFvoigtsberg","Gro\xDFsch\xF6nau","Gro\xDFsch\xF6nau OT Waltersdorf","Gross Schwansee","Gro\xDF Schwa\xDF","Gro\xDFschweidnitz","Gro\xDFsolt","Gro\xDFst\xE4dteln","Gro\xDFsteinberg","Gro\xDFsteinhausen","Gro\xDF Str\xF6mkendorf","Gro\xDF Tessin","Gro\xDF Timmendorf","Gro\xDF Todtshorn","Gro\xDF Tw\xFClpstedt","Gro\xDF-Umstadt","Gro\xDFvillars","Gro\xDFvoigtsberg","Gro\xDF Vollstedt","Gro\xDFwallstadt","Gro\xDF Warnow","Gro\xDFwechsungen","Gro\xDFweil","Gro\xDFweingarten","Gro\xDFweitzschen","Gro\xDFweitzschen-Gewerbepark Mockritz","Gro\xDFwelzheim","Gro\xDF Wittensee","Gro\xDF Wittfeitzen","Gro\xDF Witzeetze","Gro\xDF Wokern","Gro\xDF W\xFCstenfelde","Gro\xDF Zecher","Gro\xDF Zicker","Gro\xDF-Zimmern","Gr\xF6st","Gr\xF6tzingen","Grub","Grube","Grube Louise","Grubsch\xFCtz","Gruibingen","Grumbach","Gruna","Gr\xFCna","Grunbach","Gr\xFCnbach","Gr\xFCnbach-Mulden","Gr\xFCnbach-Muldenberg","Gr\xFCnberg","Gr\xFCnberg-Seenbr\xFCcke","Grund","Gr\xFCndau","Gr\xFCndau-Lieblos","Gr\xFCndau-Mittel-Gr\xFCndau","Gr\xFCndau-Rothenbergen","Grundhof","Grundsheim","Grundsteinheim","Gr\xFCneck","Gr\xFCnenbach","Gr\xFCnental","Gr\xFCnewald","Gr\xFCnewalde","Gr\xFCngr\xE4bchen","Gr\xFCnhain-Beierfeld","Gr\xFCnhainichen","Gr\xFCnheide","Gr\xFCnheide (Mark)","Gr\xFCnheide /OT Kienbaum","Gr\xFCningen-Riedlingen","Gr\xFCnmorsbach","Grunow-Dammendorf","Gr\xFCnreuth","Gr\xFCnsfeld","Gr\xFCnsink","Gr\xFCnstadt","Gr\xFCntal","Gr\xFCnwald","Gr\xFCnwald, M\xFCnchen","Grussendorf","Gr\xFCtz","Gschwend","Gspannberg","Gstadt","Gstadt a.Chiemsee","Guben","Guben-Deulowitz","Gubin","G\xFCby","G\xFCckingen","Gudendorf","Gudensberg","Gudensberg-Deute","Guderhandviertel","Gudersleben","G\xFCdingen","Gudow","G\xFCglingen","G\xFChlen-Glienicke","G\xFChlitz","Guhreitzen","Guhrow","Gulde","G\xFClitz-Reetz","G\xFCllesheim","G\xFCltlingen","G\xFCltstein","G\xFClze","G\xFClzow","G\xFClzow-Pr\xFCzen-M\xFChlengeez","Gummersbach","Gumpelstadt","Gumpolding","G\xFCmse","Gumtow","Gundelfingen","Gundelsby","Gundelsdorf","Gundelshausen","Gundelsheim","Gundelshofen","Gunderath","Gundersheim","Gundheim","G\xFCnding","Gundremmingen","G\xFCntersberge","Guntersblum","G\xFCntersleben","G\xFCnthersdorf","G\xFCnthersleben-Wechmar","G\xFCnzburg","Gunzenhausen","G\xFCnzerode","Gunzesried","Gurtweil","Gusborn","Gusow","Gussow","Gust\xE4vel","Gustebin","G\xFCsten","G\xFCstritz","G\xFCstrow","Gutach","Gutach - Bleibach","Gutach im Breisgau","Gutach (Schwarzwaldbahn)","Guteneck","Gutenstetten-Rockenbach","G\xFCtergl\xFCck","G\xFCtersloh","G\xFCtersloh, Avenwedde Bahnhof","G\xFCtersloh-Isselhorst","Gut kerPanker","G\xFCtlitz-Reetz","Gut Panker","Guttau","Guttau OT Kleinsaubernitz","Guttau OT Wartha","G\xFCttin","Gutweiler","G\xFCtzkow","Guxhagen","Guxhagen-Ellenberg","Gyhum","Haag","Haag a.d. Amper","Haag an der Amper","Haan","Haan-Gruiten","Haar","Haarbach","Haaren","Haarenberg","Haar/Gronsdorf","Haberskirch","Habichsthal","Habichtswald","Habichtswald-Ehlen","Haburg","Haby","Hachenburg","Hackenstedt","Hadamar","Hadamar-Niederzeuzheim","Hadermarkt","Hadersbach","Hadmersleben","Haffkrug","Hage","Hagen","Hagen a.T.W.","Hagenau","Hagenbach","Hagenburg","Hagen-Haspe","Hagenheim","Hagenow","Hagen Westf.","Hagen, Westfalen","Hagermarsch","Haghof","Hagnau","Hagnau am Bodensee","Hagsfeld","Hagstedt","Hahn","Hahnbach","Hahn-Flughafen","H\xE4hnichen","Hahnst\xE4tten","Haibach","Haide","Haidling","Haidm\xFChle","Haiger","Haiger-Kalteiche","Haigerloch","Haigerloch-Trillfingen","Haimbach","Haimhausen","Haiming","Haina","Haina-Battenhausen","Haina-Dodenhausen","Haina-Haddenberg","Haina-H\xFCttenrode","Haina-L\xF6hlbach","Hainburg","Hainburg-Klein Krotzenburg","Hainchen","Hainewalde","Haingr\xFCn","Hainichen","Hainrode","Hainrode/Hainleite","Hainsbach","Haiterbach","Halbendorf","Halberstadt","Halberstadt-Harslebeben","Halblech","Halblech-Buching","Halchter","Haldensleben","Haldenwang","Halen","Halfing","Hallbergmoos","Halle","Halle-Bruckdorf","Halle-Hardingen","Hallein","Halle-K\xFCnsebeck","Hallenberg","Halle-Peissen","Halle-Pei\xDFen","Hallerndorf","Halle Saale","Halle (Saale)","Halle(Saale)","Halle (Westf.)","Halle/Westf.","Halle (Westfalen)","Hallgarten","Hallig Langene\xDF","Hallig Oland","Hallschlag","Hallstadt","Halsbach","Halsbr\xFCcke","Halsdorf","halstenbek","Halstenbek","Haltern","Haltern am See","Haltern am See-Hullern","Halver","Hambach","Hamberg","Hamberge","Hambergen","Hambr\xFCcken","Hamb\xFChren","Hamburg","Hamburg-Bahrenfeld","Hamburg-Bergedorf","Hamburg-Dulsberg","Hamburg-Hamm-S\xFCd","Hamburg-Harburg","Hamburg-Kirchwerder","Hamburg-Lohbr\xFCgge","Hamburg-Moorfleet","Hamburg OT Schnelsen","Hamburg-Schnelsen","Hamburg S\xFClldorf","Hamburg-Tonndorf","Hamburg-Wandsbek","Hamburg-Wilhelmsburg","Hamburg-Wilhelmsburg (Hafen)","Hamdorf","H\xE4melerwald","H\xE4melhausen","Hamelhof","Hameln","Hamlar","Hamm","Hammah","Hamm-Bockum-H\xF6vel","Hammelbach","Hammelburg","Hammerbr\xFCcke","H\xE4mmern","Hammersbach","Hammerschrott","Hammersfeld","Hammerstein","Hamminkeln","Hamminkeln-Br\xFCnen","Hamminkeln-Marienthal","Hamm (Sieg)","Hamm/Sieg","Hanau","Hanau Gro\xDFauheim","Hanau Klein-Auheim","Hanau - Klein-Auheim","Hanau-Klein-Auheim","Hanau-Lamboy","Hanau-Nord","Hanau-Steinheim","Hanchesm\xFChle","Handeloh","Handewitt","Handewitt / OT Jarplund","Handorf","Handthal","Handwerks","Hanerau-Hademarschen","Hanfkolm","Hanger","Hanhofen","H\xE4nigsen","Hankensb\xFCttel","Hann. M\xFCnden","Hann. M\xFCnden-Staufenberg","Hannover","Hannover-Davenstedt","Hannover-Lahe","Hannover OT Kronsberg","Hansen","Hansestadt Salzwedel","Hanstedt","Hanstedt II","Hanstorf","Hans\xFChn","Hanweiler-Rilchingen","Happenbach","Happerg","Happurg","Happurg-F\xF6rrenbach","Happurg-Kainsbach","Harbke","Harburg","Hardeck","Hardegsen","Hardegsen OT Tr\xF6gen","Hardheim","Hardisleben","Hardt","Hardthausen","Haren","Harenberg","Haren (Ems)","Harkerode","Harlachberg","Harlesiel","Harmating","Harmstorf","Harpke","Harpolingen","Harpstedt","Harra","Harrislee","Harschbach","Harsefeld","Harsewinkel","Harsewinkel-Greffen","Harsewinkel-Marienfeld","Harsum","Hartefeld","Hartenholm","Hartenstein","Hartenthal","Hartha","Harthausen","Hartheim","Harting","Hartmannsdorf","Hartmannsdorf-Reichenau","Hartmannshof","Hartschimmel","Harzgerode","Hasberg","Hasbergen","Hasborn","Hasede","Haselbach","Haselbachtal","Haseldorf","Haseloff","Hasel\xFCnne","H\xE4sen","Hasenfeld","Hasenmoor","Hasenmoor-Fuhlenr\xFCe","Hasenwinkel","Haslach","Haslach i.K.","Haslangkreit","H\xE4slingen","Hassel","Hasselberg","Hasselburg","Hasselfelde","Hasselroth-Gondsroth","Hasselroth-Niedermittlau","Ha\xDFfurt","Ha\xDFfurt/Augsfeld","Ha\xDFleben","Ha\xDFloch","Ha\xDFloch/Pfalz","Ha\xDFmersheim","Ha\xDFmersheim-Neckarm\xFChlbach","Ha\xDFmoor","Hastorf","Hatten","Hattenhofen","Hatten - Kirchhatten","Hattersheim","Hattert","Hattimgem","Hattingen","Hattorf","Hattstedt","Hattstedtermarsch","Hatzenb\xFChl","Hatzenport","Hatzenweiler","Hatzfeld","Hauenstein","Haundorf","Hauneck","Hauneck-Unterhaun","Haunersdorf-Simbach","Haunetal","Haunsheim","Haunstetten","Haunswies","Hauptmarkt","Hausach","Hausach-Vordertal","Hausen","Hausen a. d. M\xF6lin","Hausen-Roth","Hausen/Wied","Hausen/Wied (Ortsteil H\xE4hnen)","H\xE4userhof","H\xE4usern","Hausham","Haushausen","Hausmoning","Haustadt","Hauteroda","Hauzenberg","Hauzenberg - F\xFCrsetzing","Hauzenberg-Ra\xDFreuth","Havelaue","Havelberg","Havelsee","H\xE4ven","Havetoft","Havetoftloit","Havixbeck","Havixbeck-Hohenholte","Havixbeck-Tilbeck","Hayingen","Hayingen-Indelhausen","Hayna","Hayn (Harz)","Haynrode","Heber","Heberndorf","Hebertsfelden","Hebertshausen","Hechendorf","Hechendorf a.Pilsensee","Hechingen","Hechingen-Stein","Hechlingen","Hechthausen","Heckelberg-Brunow","Heckendalheim","Hecklingen","Heddesheim","Hedersdorf","Hedersleben","Hedwigenkoog","Heede","Heek","Heerstedt","Heeslingen","Heessel","Heggen","Hegne","Hegwigsburg","Heide","Heideblick","Heideck","heidelberg","Heidelberg","Heidelberg-Altstadt","Heidelberg-Kirchheim","Heidelberg-Pfaffengrund","Heidelberg-Ziegelhausen","Heidelsheim","Heiden","Heidenau","Heidenheim","Heidenheim-Hechlingen am See","Heidenheim-Schnaitheim","Heidenrod","Heidenrod-Kemel","Heidenroth","Heidersdorf","Heidesee","Heidesee (OT Blossin)","Heidesee OT Gr\xE4bendorf","Heidesee (OT Klein Eichholz)","Heidesee OT Prieros","Heidesheim","Heidingsfeld","Heidkate","Heidm\xFChlen","Heigenbr\xFCcken","Heikendorf","Heilbad Heiligenstadt","Heilbronn","Heilbronn-Horkheim","Heilbronn-Kirchhausen","Heilbronn-Neckargartach","Heilbronn-Sontheim","Heilbrunn","Heilgersdorf","Heiligenberg","Heiligenbronn","Heiligendamm","Heiligenfurt","Heiligengrabe","Heiligenhafen","Heiligenhagen","Heiligenhaus","Heiligenhaus-Overath","Heiligenrode","Heiligenroth","Heiligenstadt","Heiligenstadt Heilbad","Heiligenstadt i. OF.","Heiligenstadt i. Ofr.","Heiligenstadt i OFr","Heiligenstadt i. OFr.","Heiligenstedten","Heiligenstedtenerkamp","Heiligenstein","Heilligenstadt","Heilsbronn","Heilshoop","Heimbach","Heimbach-Blens","Heimbach-Hausen","Heimbach-Vlatten","Heimboldshausen","Heimbuchenthal","Heimenegg","Heimerdingen","Heimertingen","Heimerzheim","Heimpersdorf","Heimsheim","Heimstetten","Heindlfeld","Heinersreuth","Heiningen","Heinrichshall","Heinrichsort","Heinsberg","Heinschenwalde","Heinsen","Heinsheim","Heist","Heitersheim","Helbigsdorf","Helbigsdorf-Blankenstein","Helbra","Helden","Heldenbergen","Heldrungen","Helfenberg","Helfersdorf","Helgoland","Hellenthal","Hellingen","Helmbrechts","Helmsheim","Helmstedt","Helmstorf","Helsa","Heltersberg","Hemau","Hemdingen","Hemeln","Hemer","Hemer - H\xFCltershagen","Hemer - Stodt","Hemhofen","Hemishofen","Hemkenrode","Hemmelsdorf","Hemmelte","Hemmingen","Hemmingstedt","Hemmoor","Hemsbach","Hemsb\xFCnde","Hemsloh","Henfenfeld","Heng","Hengersberg","Henglarn","Henneberg","Hennef","Hennef-Br\xF6l","Hennef-Happerschoss","Hennigsdorf","Henningen","Henningsdorf","Hennstedt","Henschleben","Henstedt-Ulzburg","Henzendorf","Hepberg","Heppenheim","Heppenschwand","Hepsisau","Herbern","Herbertingen","Herbertshofen","Herbolzheim","Herborn","Herborn Burg","Herbornseelbach","Herbram","Herbrechtingen","Herbrechtingen-Hausen","Herbstadt","Herbstein","Herbstein-Lanzenhain","Herchsheim","Herdecke","Herdorf","Herdwangen-Sch\xF6nach","Herford","Herforst","Hergatz","Hergensweiler","Hergisdorf","Hering","Heringen","Heringen Helme","Heringen (Werra)","Heringen(Werra)","Heringsand","Heringsdorf","Herkenbosch","Herleshausen","Herlikofen","Hermannsburg","Hermannshagen","Hermaringen","Hermeskeil","Hermsdorf","Herne","Herne-B\xF6rnig","Heroldsbach","Heroldsberg","Heroldsm\xFChle","Heroldstatt","Herongen","Herpf","Herrenberg","Herrenstetten","Herrieden","Herrischied","Herrischried","Herrischried-Gro\xDFherrischwand","Herrnburg","Herrnhut","Herrnhut OT Ruppersdorf","Herrnsdorf","Herrsching","Herrsching am Ammersee","Herrstein","Hersbruck","Herschbach","Herschbroich","Herschdorf","Herscheid","Herten","Herten-Westerholt","Hertingen","Herwigsdorf (Gemeinde Rosenbach)","Herxheim","Herxheim bei Landau","Herxheim-Hayna","Herzberg","Herzberg am Harz","Herzberg (Elster)","Herzberg/Elster","Herzberg - OT Mahdel","Herzberg-P\xF6hlde","Herzebrock-Clarholz","Herzfeld","Herzfelde","Herzhausen","Herzhorn","Herzlake","Herzogenaurach","Herzogenrath","Herzogenrath-Kohlscheid","Herzogenrath-Merkstein","Herzsprung","Hesborn","Hesedorf","Hesel","Hesel - Heseler H\xF6rn","Hesel - Neuemoor","Hespe-Hiddensen","He\xDFdorf","Hesselbach","Hessen","Hesseneck","Hesserode","Hessigheim","Hessisch Lichtenau","Hessisch Oldendorf","Hessisch Oldendorf-Rohdental","Hestedt","Hettenshausen","Hettersroth","Hettstadt","Hettstedt","Hetzdorf","Hetzendorf","Hetzerath","Hetzles","Heubach","Heubach-Beuren","Heubach, Masserberg","Heuchelheim","Heuchelheim-Klingen","Heuchlingen","Heudeber","Heusenstamm","Heustadl","Heusweiler","Heuthen","Hexenagger","Heyerode","Heygendorf","Heynburg","Heynitz","Hiddenhausen","Hiesling","Hilbersdorf","Hilchenbach","Hildburghausen","Hildebrandshausen","Hildebrandstra\xDFe","Hilden","Hilders","Hildesheim","Hildesheimer Wald","Hildesheim Itzum","Hildesheim Marienburg","Hildfeld","Hildrizhausen","Hilgermissen","Hilgermissen (Eitzendorf)","Hilgertshausen","Hilgertshausen-Tandern","Hille","Hillerse","Hillesheim","Hillgroven","Hillscheid","Hilmersdorf","Hilpoldsberg","Hilpoltstein","Hiltenfingen","Hilter","Hilter a.T.W.","Hiltrup","Hilzingen","Himbergen","Himmelgarten","Himmelkron","Himmelpfort","Himmelpforten","Himmighausen","Hindelang","Hindfeld","Hinrichshagen","Hinte","Hinterberg","Hinterhelmhof","Hinterhermsdorf","Hinterhof","Hinterri\xDF","Hinterrod","Hinterskirchen","Hinterweidenthal","Hinterweiler","Hinterwestermurr","Hinterzarten","Hinzdorf","Hipstedt","Hirblingen","Hirrlingen","Hirschaid","Hirschau","Hirschbach","Hirschberg","Hirschberg an der Berstra\xDFe","Hirschberg-Grosssachsen","Hirschberg-Gro\xDFsachsen","Hirschberg-Leutershausen","Hirschfeld","Hirschfelde","Hirschfelden","Hirschhorn","Hirschstein","Hirschstein OT Heyda","Hirschzell","Hirzenhain","Hirzweiler","Hischfeld","Hitzacker","Hitzacker OT Tie\xDFau","Hitzkirchen","Hobbersdorf","H\xF6beck-Restorf","H\xF6chberg","Hochbr\xFCck","Hochburg Ach","Hochdonn","Hochdorf","Hochdorf-Assenheim","H\xF6chenschwand","Hochfeld","Hochheim","H\xF6chheim","Hochheimam Main","Hochkirch","Hochmoor Gescher","Hochspeyer","H\xF6chst","Hochstadt","H\xF6chstadt","H\xF6chst\xE4dt","Hochstadt am Main","H\xF6chst\xE4dt an der Donau","H\xF6chst\xE4dt im Fichtelgebirge","Hochstedt","H\xF6chstenbach","H\xF6chst im Odenwald","Hochstra\xDF","H\xF6ckel","H\xF6ckendorf","H\xF6ckendorf-Ruppendorf","Hockenheim","Hockenheim-Talhaus","Hodenhagen","H\xF6dingen","Hodorf","hoengen","Hof","H\xF6farten","Hofberg","Hofbieber","Hofbieber-Kleinsassen","Hof Buchen","H\xF6fen","H\xF6fen an der Enz","H\xF6fer/Eschede","Hofgeismar","H\xF6fgen","Hofheim","Hofheim am Taunus","Hofheim in Unterfranken","Hofheim/Ufr.","Hofheim-Wallau","Hofhim","Hofkirchen","Hof Lilach","Hofolding","Hofstatt","Hofstetten","H\xF6ggerloh","H\xF6gsdorf","H\xF6hbeck","Hohberg","Hohburg","Hohegeiss","Hohegei\xDF","Hohe Luft","Hohenacker","Hohenahr","Hohenaspe","Hohenau","Hohenberg-Krusemark","Hohenbocka","Hohenb\xF6ddenstedt","Hohenbrunn","Hohenburg","Hohendilching","Hohendubrau OT Thr\xE4na","Hoheneggelsen","Hohenfelde","Hohenfelden","Hohenfels","Hohenfels-Essingen","Hohenhameln","Hohenhameln-Equord","Hohenhaslach","Hohenhof","Hohenholte","Hohenhude","Hohenhude Siedlung","Hohenhude-Siedlung","Hohenkirchen","H\xF6henkirchen","H\xF6henkirchen-Siegertsbrunn","Hohenklingen","Hohenkrug","H\xF6henland","Hohenlangenbeck","Hohenlinden","Hohenlockstedt","Hohenlubast","Hohenmocker","Hohenm\xF6lsen","Hohennauen","Hohen Neudorf","Hohen Neuendorf","Hohenpei\xDFenberg","H\xF6henrain","Hohenraunau","Hohenroda","Hohenroda-Oberbreitzbach","Hohensaaten","Hohensch\xE4ftlarn","Hohen Sch\xF6nberg","Hohenseefeld","Hohen Sprenz OT Klein Sprenz","Hohenstaufen","Hohenstein","Hohenstein_Breithardt","Hohenstein-Er","Hohenstein-Ernstthal","Hohenstein-Mackenrode","Hohen-S\xFClzen","Hohentengen","Hohenthurm","Hohenvolkfien","Hohen Wangelin","Hohenwarsleben","Hohenwart","Hohenwarth","Hohenwarthe","Hohenwestedt","Hohenwutzen","Hohenziatz","Hohenzieritz","Hohes Kreuz","H\xF6hlenkataster Fr\xE4nkische Alb","Hohn","H\xF6hn","Hohndorf","H\xF6hndorf","Hohne","Hohnstein","Hohnstorf","H\xF6hr-Grenzhausen","Hohwacht","Hohwald-Langburkersdorf","Hoinkenbostel","Hoisdorf","H\xF8jer","Holbach","Holdorf","H\xF6lingen","Hollage","Holle","Hollenbach","Hollen\u2013Heise","Hollenstedt","Hollern-Twielenfleth","Hollfeld","H\xF6llriegelskreuth","Hollwege","Holm","Holmer Weg","Holm-Seppensen","Holstendorf","Holstenniendorf","Holsthum","Holtensen","Holthausen","Holthusen","H\xF6ltinghausen","Holtland","Holtsee","Holzappel","Holzdorf","Holzengel","Holzgerlingen","Holzg\xFCnz","Holzhau","Holzhausen","Holzhausen bei Buchloe","Holzheim","Holzheim-Neuhausen","Holzkirchen","Holzmaden","Holzminde","Holzminden","Holzminden-Neuhaus","Holzolling","Holzthaleben","Holzwickede","Hombeer / Markt Taschendorf","Homberg","Homberg (Efze)","Homberg (Efze)-L\xFCtzelwig","Homberg-Nieder-Ofleiden","Homberg (Ohm)","Homburg","Homburg-Erbach","Homburg-Schwarzenbach","Honhardt","Honigsee","H\xF6nisch","Honkling","Honneroth","Hooge","Hoogstede","Hooksiel","Hopfen am See","Hopferau","Hopferbach","Hopfgarten","H\xF6pfigheim","Hoppecke","Hoppecke-Berg","Hoppegarten","Hoppenrade","Hoppst\xE4dten","Hopsten","H\xF6rafing","Hora Svat\xE9 Kateriny","Horb","Horbach","Horb am Neckar","Horben","H\xF6rblach","H\xF6rbranz","Hordorf","Hordorf, Cremlingen","Horgau","Horgenzell","H\xF6rgertshausen","Horhausen","Horhausen (Westerwald)","Horheim","Horka","Horka OT Biehain","H\xF6rlitz","Hormersdorf","Horn","Hornbach","Horn Bad Meinberg","Horn - Bad Meinberg","Horn-Bad Meinberg","Horn-Bad-Meinberg","Horn-Bad Meinberg-Belle","Horn-Bad Meinberg/Leopoldstal","Hornberg","Hornburg","Horneburg","Hornow-Wadelsdorf","Hornstorf","Hornum","H\xF6rnum","Horrem","Horressen","Horsb\xFCll","H\xF6rschel","H\xF6rselberg-Hainich","H\xF6rsingen","Horsmar","Horst","Horstedt","H\xF6rstein","H\xF6rstel","H\xF6rstel-Bevergern","H\xF6rstel-Riesenbeck","Horsten","Horstmar","Horstmar-Leer","Horum","Horumersiel","H\xF6rzhausen","H\xF6sbach","H\xF6sbach-Rottenberg","Hosena","Hosenfeld","H\xF6slwang","Ho\xDFkirch","H\xF6tensleben","H\xF6velhof","H\xF6velhov","H\xF6ver","Howacht","H\xF6xter","H\xF6xter-Albaxen","H\xF6xter - Brenkhausen","H\xF6xter-Ottbergen","Hoya","Hoyahagen","Hoyerhagen","Hoyersburg","Hoyerswerda","Hoyerswerda-Zei\xDFig","Hoym","H\u0159ensko","Huchenfeld","H\xFCckelhoven","H\xFCckelhoven-Baal","H\xFCckeswagen","Huckstorf","Huckstorf OT P\xF6lchow","Hude","H\xFCde","Hude (Oldenburg)","Hude/W\xFCsting","H\xFCffenhardt","H\xFCffler","H\xFCfingen","H\xFCgelsheim","Huglfing","Huisheim","Huje","H\xFClben","Hullern","H\xFCllhorst","Hummeltal","Hunderdorf","Hundersingen","Hundham","Hundhaupten","Hundisburg","Hundorf Seehof","Hundsboden","Hundsm\xFChlen","H\xFCnfeld","H\xFCnfelden","Hungen","H\xFCnxe","H\xFCnxe / Drevenack","Hurlach","H\xFCrtgenwald","H\xFCrtgenwald-Raffelsbrand","H\xFCrtgenwald-Stra\xDF","H\xFCrth","H\xFCrth-Fischenich","H\xFCrup","Husby","Hussenhofen","H\xFCsten","Husum","H\xFCtschenhausen-Katzenbach","H\xFCttenbach","H\xFCttenberg","H\xFCttenberg - Rechtenbach","H\xFCttenberg-Rechtenbach","H\xFCttenberg-Volpertshausen","H\xFCttenberg-Weidenhausen","H\xFCttenhausen","Huttenheim","H\xFCttenreute","H\xFCttersdorf","Hutthurm","Hutzfeld","Ibbenb\xFCren","Ibbenb\xFCren-D\xF6renthe","Ichenhausen","Ichenhausen-Autenried","Icking","Idar Oberstein","Idar-Oberstein","Iden","Idsingen","Idstedt","Idstein","Iffeldorf","Iffezheim","Ifta","Igelsdorf","Igenhausen","Igersheim","Iggelheim","Iggenhausen","Iggingen","Igling","Ihausen, Stadt Westerstede","Ihlienworth","Ihlow","Ihlow-Riepe","Ihmepassage","Ihrhove","Ihringen","Ihrlerstein","Ilberstedt","Illdorf","Illerkirchberg","Illertissen","Illertissen-Betlinshausen","Illesheim","Illingen","Illingen-H\xFCttigweiler","Illmenau","Illmensee","Illschwang","Illsitz","Ilmenau","Ilmenau-Heyda","Ilmenau-Manebach","Ilmenau-Oberp\xF6rlitz","Ilmenau-Roda","Ilmenau-Unterp\xF6rlitz","Ilmm\xFCnster","Ilmtal","Ilmtal-Singen","Ilm\xFCnster","Ilsede","Ilsenburg","Ilsenburg (Harz)","Ilsfeld","Ilshofen","Ilster","Ilvesheim","Immekath","Immendinen","Immendingen","Immenhausen","Immenstaad","Immenstaad-Kippenhausen","Immenstadt","Imsbach","Inchenhofen","Inden","Indersdorf","Indlekofen","industrial","Industriestra\xDFe","Ingelfingen","Ingelheim","Ingelheim-Ost","Ingeln","Ingersheim","Ingersleben","Ingersleben OT Morsleben","Ingolstadt","Ingolstadt Niederfeld","Ingstetten","Inheiden","Innien","Inning","Inning - Stegen","Insel Hiddensee","Insel Poel","Insel Poel / OT Malchow","Insel Poel/Schwarzer Busch","Insingen","Insul","Inzell","Inzlingen","Inzm\xFChlen","Iphofen","Ippesheim","Iptingen","Irlach","Irlenbusch","Irrel","Irresheim","Irrhausen","Irschenberg","Irsee","Isen","Isenb\xFCttel","Iserlohn","Iserlohn-Rheinen","Isernhagen","Isernhagen-HB","Ismaning","Isny","Isny-Bolsternang","Isny im Allg\xE4u","Isny - Neutrauchburg","Ispringen","Israelsdorf","Isselburg","Isselburg-Werth","Isseroda","Issigau","Issum","Istrup","Itterbeck","Ittling","Ittlingen","Itzehoe","Itzgrund","Itzlings","Itzstedt","Ivendorf","Iznang","Iznang, Moos","Jabel","Jabelitz","Jachenau","Jachenhausen","Jacobsdorf","Jade","Jade - Jaderberg","Jaderberg","Jagel","J\xE4gersgr\xFCn","J\xE4gershof","Jagsthausen","Jagstzell","Jahna","Jahnsdorf","Jahnsfelde","Jahnshof","Jakobneuharting","Jakobsthal","Jameln","Janisroda","Janisroda-Neujanisroda","J\xE4nkendorf","Janneby","J\xE4nschwalde","J\xE4nschwalde Ost","Jarlitz","Jarplund","Jarplund-Weding","Jasberg","Jasdorf","Jatznick","J\xE4venitz","Jeber-Bergfrieden","Jebertshausen","Jedesheim","Jeeben","Jeetzel","Jehsen","Jelmstorf","Jelpke","Jembke","Jemgum","Jena","Jena-G\xF6schwitz","Jena-Lobeda","Jena-Maua","Jena-Winzerla","Jengen","Jerchel","Jerichow","Jersbek","Jerstedt","Jerxheim","Jesberg","Jesberg / Densberg","Jesewitz","Jessen","Jessen (Elster)","Jessen-Elster","Jessenitz-Werk","Je\xDFnitz (Anhalt)","Jesteburg","Jestetten","Jettingen","Jettingen-Scheppach","Jevenstedt","Jever","Jever-Moorwarfen","Jiggel","Joachimsthal","Jockgrim","Jocksdorf","Joditz","Johannesberg","Johanngeorgenstadt","Johanniskirchen","J\xF6hlingen","Johnsbach","J\xF6hstadt","Joldelund","J\xF6llenbeck","Jonsdorf","J\xF6rdenstorf","Jork","Jork-Borstel","Jork-K\xF6nigreich","Josbach","Jossgrund","J\xF6\xDFnitz","J\xFCbar","J\xFCbberde","J\xFCbek","J\xFCchen","J\xFCchsen","Judenbach","J\xFCdenstra\xDFe","J\xFChnde","Juist","Julbach","J\xFClich","J\xFClich-Altenburg","Juliushof","Juliusruh","J\xFCngersdorf","Jungingen","J\xFCnkerath","J\xFCrgenshagen","J\xFCrgenstorf","J\xFCterbog","J\xFCtzb\xFCttel","Kaaks","Kaar\xDFen","Kaarst","Kabelsketal","K\xE4bsch\xFCtztal","K\xE4bsch\xFCtztal - OT Jesseritz","K\xE4bsch\xFCtztal - OT Niederjahna","K\xE4bsch\xFCtztal - OT Seebsch\xFCtz","K\xE4bsch\xFCtztal - OT Sieglitz","Kade","Kadenbach","Kagerhof","K\xE4gsdorf","Kahhof","Kahl","Kahla","Kahl a. Main","Kahl am Main","Kahlwinkel","K\xE4hmen","Kahren","Kaikenried","Kail","Kaiseraugst","Kaisersbach","Kaisersesch","Kaiserslautern","Kaisheim","Kakenstorf","Kakerbeck","Kak\xF6hl","Kalbach","Kalbe","Kalbsrieth","Kalchreuth","Kaldenkirchen","Kaldorf","Kalefeld","Kalenborn","Kali\xDF","Kalkar","Kalkar-Appeldorn","Kalkar-Kehrum","Kalkhorst","Kall","Kalletal","Kallm\xFCnz","Kalrsruhe","Kaltbrunn","Kaltenberg","Kaltenborn","Kaltenherberg","Kaltenkirchen","Kaltenlohe","Kaltennordheim","Kaltensundheim","Kaltm\xFChle","Kaltofen","Kal\xFCbbe","Kamen","Kamenz","Kamenz-Wiesa","Kamern","Kamerun","Kamin","Kammerberg","Kammermark","Kammersdorf","Kammerstein","Kamminke","Kammlach","Kampberg","Kamp-Bornhofen","Kampen","Kampen/Sylt","K\xE4mpfelbach","Kamp-Lintfort","Kamsdorf","Kandel","Kandern","Kannawurf","Kapelle","Kapellen","Kappel-Grafenhausen","Kappeln","Kappeln/Kopperby-Heide","Kappelrodeck","Kapsweyer","Karben","Karbow","Karbow-Vietl\xFCbbe","Karby","Kareth","Kargow","Karlsbad","Karlsbad-Langensteinbach","Karlsbrunn","Karlsdorf","Karlsdorf-Neuthard","Karlsfeld","Karlshagen","Karlshuld","Karlsruhe","Karlsruhe-Bergwald","Karlsruhe-Durlach","Karlsruhe-Gr\xF6tzingen","Karlsruhe-Gr\xFCnwettersbach","Karlsruhe-Hagsfeld","Karlsruhe - Hohenwettersbach","Karlsruhe-Hohenwettersbach","Karlsruhe-Knielingen","Karlsruhe-Palmbach","Karlsruhe-Thomashof","Karlsruhe-Wolfartsweier","Karlstadt","Karlstein a.Main","Karlstein am Main","Karlstein am Main\u200E","Karlstein am Main - Dettingen","Karlstein am Main - Gro\xDFwelzheim","Karlstein - Dettingen","Karlstein-Dettingen","Karlsuhe","Karmitz","Karnin","Karow","Karsdorf","Karst\xE4dt","Kartzow","Kasel","Kasel-Golzig","Kasendorf","Kassau","Kassel","Kassel-Harleshausen","Kassel-Waldau","Kastellaun","Kastel-Staadt","Kasten","Kastl","Kastorf","Katemin","K\xE4terhagen","Katlenburg","Katlenburg-Lindau","Kattanhorn","Kattendorf","Katzenelnbogen","Katzenfurt","Katzh\xFCtte","Katzwinkel (Sieg)","Kaub","Kauern","Kaufbeuren","Kaufering","Kaufungen","Kaulsdorf","Kayhude","Kefenrod","Kehl","Kehl - Bodersweier","Kehl-Kork","Kehl-Marlen","Kehl-Neum\xFChl","Kehl-Odelshofen","Kehl-Sundheim","Kehnert","Keitum","Keitum/Sylt-Ost","Kelberg","Kelbra","Kelheim","Kelheim / Donau","Kelheim - Herrnsaal","Kelheim - Kapfelberg","Kelkheim","Kelkheim am Taunus","Kelkheim-Fischbach","Kell am See","Kellenhusen","Kellerh\xF6he","Kellershof","Kellinghusen","Kelsterbach","Keltern","Keltern-Dietlingen","Kemathen","Kemberg","Kemberg OT Bergwitz","Kembs","Kemlitz-Altsorgefeld","Kemmern","Kemnat","Kemnath","Kemnitz","Kempen","Kempen-T\xF6nisberg","Kempfeld","Kempfenbrunn","Kempten","Kempten (Allg\xE4u)","Kenn","Kenzingen","Kerbach","Kerken","Kerken (Aldekerk)","Kerken-Aldekerk","Kerkrade","Kernen","Kernen im Remstal","Kernen i.R.","Kerpen","Kerpen-B\xFCggen","Kerpen (Eifel)","Kerpen-Horrem","Kerpen-T\xFCrnich","Kerspleben","Kerstenhausen","Kesdorf","Kesseling","Kesselsdorf","Kessin","Ketsch","Ketten","Kettig","Ketzerbachtal","Ketzin","Ketzin Havel OT Falkenrehde","Ketzin OT Falkenrehde","Keula","Kevelaer","Kevelaer / Twisteden","Kicklingen","Kiebitzreihe","Kiedrich","Kiedrich / Rheingau","Kiefen","Kiefersfelden","Kiel","Kiel - Hasse","Kiel, im HBF","Kiel-Pries","Kiel - Sophienhof / Querpassage","Kienberg","Kienberg / Holzhausen","Kierspe","Kieselbach","Kiesenhof","Kiesling","Killer","Kindelbr\xFCck","Kinding","Kindsbach","Kinsau","Kipfenberg","Kipfenberg-Arnsberg","Kippenheim","Kirchansch\xF6ring","Kirchardt","Kirchbarkau","Kirchberg","Kirchberg a. d. Iller","Kirchberg an der Iller","Kirchberg / Jagst","Kirchborchen","Kirchb\xFChl","Kirchdorf","Kirchdorf am Inn","Kirchdorf an der Iller","Kirchdorf/Iller","Kirchen","Kirchendemenreuth","Kirchen - Freusburg","Kirchenkirnberg","Kirchenlamitz","Kirchen (Sieg)","Kirchensittenbach","Kirchentellinsfurt","Kirchenthumbach","Kirchgellersen","Kirchhain","Kirchham","Kirchhaslach","Kirchheilingen","Kirchheim","Kirchheim am Neckar","Kirchheim bei M\xFCnchen","Kirchheim b.M\xFCnchen","Kirchheimbolanden","Kirchheim-Heimstetten","Kirchheim unter Teck","Kirchhellen","Kirchhian","Kirchhundem","Kirchlauter","Kirchlengern","Kirchlinteln","Kirchm\xF6ser","Kirchrimbach","Kirchroth","Kirchr\xF6ttenbach","Kirchsahr","Kirchsahr-Binzenbach","Kirchsch\xF6nbach","Kirchseeon","Kirchstrasse","Kirchtimke","Kirchwalsede","Kirchweidach","Kirchweiler","Kirchweyhe","Kirchwistedt","Kirchworbis","Kirchzarten","Kirchzell","Kirkel","Kirn","Kirnitzschtal-Bad Schandau","Kirrlach","Kirrweiler","Kirschau","Kirschroth","Kirtorf","Kisdorf","Kisselbach","Kissenbr\xFCck","Kissing","Kisslegg","Ki\xDFlegg","Kist","Kittendorf","Kittlitz","Kitzingen","Kitzingen-Hoheim","Kitzingen-Repperndorf","Kitzscher","Kl\xE4den","Kladrum","Klaistow","Klamp","Klanxb\xFCll","Klappholz","Klarenthal","Klausdorf","Kleinaitingen","Kleinau","Klein Barkau","Klein Bartelstorf","Kleinbellhofen","Klein Bennebek","Kleinberghofen","Klein Ber\xDFen","Klein Biewende","Kleinblittersdorf","Kleinbottwar","Klein Breese","Klein Brunsrode","Kleinb\xFCllesheim","Klein B\xFCnzow","Klein Ch\xFCden","Klein Disnack","Klein D\xF6bbern","Kleineichenhausen","Kleinenbremen","Kleinenmarpe","Kleineutersdorf","Kleinflintbek","Kleinfurra","Klein Gaddau","Klein Gaglow","Kleingeraszell","Kleingie\xDFh\xFCbel","Kleinglattbach","Kleing\xF6hren","Kleinhartpenning","Klein Heide","Kleinhelfendorf","Kleinhennersdorf","Kleinheppach","Kleinheringen","Kleinhettstedt","Kleinheubach","Kleinh\xF6henkirchen","Kleinich","Klein Ilsede","Klein Jamno Stadt Forst","Klein Jasedow","Kleinjena","Kleinkahl","Kleinkarlbach","Klein Kedingshagen","Kleinkeula","Klein K\xF6nigsf\xF6rde","Klein-K\xF6nigsf\xF6rde","Klein K\xF6ris","Klein K\xFChren","Klein Kussewitz","Kleinlangheim","Klein Lengden","Kleinlesau","Kleinmachnow","Kleinmaischeid","Kleinnaundorf","Klein Nordende","Kleinochsenfurt","Klein Offenseth-Sparrieshoop","Kleinopitz","Kleinostheim","Kleinpienzenau","Klein Rheide","Klein Ridsenow","Klein R\xF6nnau","Kleinr\xF6ssen","Klein Sachau","Klein Scharrel","Klein Schm\xF6len","Klein Schwarfs","Klein Schwa\xDF","Klein Schwechten","Kleinseeham","Klein Stavern","Kleinsteinbach","Klein Tw\xFClpstedt","Klein Veltheim","Kleinvollstedt","Klein Waabs","Kleinwallstadt","Kleinwangen","Kleinwechsungen","Kleinwendern","Klein Wesenberg","Klein-Winternheim","Klein Wittensee","Klein Witzeetze","Kleinwolmsdorf","Kleinzerlang","Klein Zicker","Klempau","Klennow","Klensby","Kletkamp","Klettbach","Klettgau","Klettwitz","kleve","Kleve","Kleve-Donsbr\xFCggen","Klietz","Klinga","Klingberg","Klinge","Klingelbach","Klingen","Klingenberg","Klingenberg a.M.","Klingenbrunn","Klingenm\xFCnster","Klingenthal","Klingenthald","Klink","Klintum","Klipphausen","Klipphausen OT Gauernitz","Klitsche","Klitten","Klitten, OT Tauer","Kl\xF6den","Kloppenheim","Kloschwitz","Kloster","Klosterbuch","Klosterfelde","Kloster/Hiddensee","Kloster Insel Hiddensee","Kloster/Insel Hiddensee","Klosterkumbd","Kloster Lehnin","Klosterseelte","Kl\xF6tze","Kl\xF6tze Altmark","Kl\xFCden","Kluis","Kluse","Kl\xFCsserath","Kl\xFCtz","Knappensee-Gro\xDF S\xE4rchen","Knau","Knautnaundorf","Knesebeck","Knetzgau","Kniebis","Knittingen","Knittlingen","Knorrendorf","Knottenried","Kn\xFCllwald","Kn\xFCllwald - Remsfeld","Kn\xFCllwald-Remsfeld","Kobern-Gondorf","Koblenz","Koblenz-G\xFCls","Koblenz-Kesselheim","Koblenz-Metternich","Kochel","Kochel am See","Kodersdorf","K\xF6ditz","K\xF6dnitz","Koeln","Kogel","K\xF6gl","Kohlberg","K\xF6hlen","Kohlst\xE4dt","K\xF6hn","Kohren-Sahlis","Kolbenm\xFChle","Kolbermoor","Kolborn","Kolitzheim","Kolkau","Kolkwitz","Kollbach","K\xF6lleda","K\xF6lleda-Kiebitzh\xF6he","Kollmar","Kollnburg","K\xF6lln-Reisiek","Kolmbach","k\xF6ln","K\xF6ln","K\xF6ln-Grengel","K\xF6ln-Lind","K\xF6ln-Meschenich","K\xF6ln-Porz","K\xF6ln/Porz","K\xF6ln (Porz-Libur)","K\xF6ln-Porz - Wahnheide","K\xF6ln Rath/Heumar","K\xF6ln-Wahn","K\xF6ln-Wahnheide","K\xF6lpinsee / Loddin","K\xF6lsa","K\xF6lsa-Siedlung","K\xF6lschhausen","K\xF6lzow","K\xF6n","Konerow","K\xF6ngen","K\xF6ngernheim","K\xF6nigerode","K\xF6nigheim","K\xF6nigsbach-Stein","K\xF6nigsberg in Bayern","K\xF6nigsbronn","K\xF6nigsbronn-Itzelberg","K\xF6nigsbronn-Zang","K\xF6nigsbr\xFCck","K\xF6nigsbrunn","K\xF6nigsdorf","K\xF6nigsee","K\xF6nigsfeld","K\xF6nigshain","K\xF6nigshain-Wiederau","K\xF6nigshorst","K\xF6nigslutter","K\xF6nigslutter am Elm","K\xF6nigsmoor","K\xF6nigsmoos","K\xF6nigsschaffhausen","K\xF6nigst\xE4dten","K\xF6nigstein","K\xF6nigstein im Taunus","K\xF6nigstein OT Leupoldishain OT Nikolsdorf","K\xF6nigswalde","K\xF6nigswartha","K\xF6nigswartha OT Niesendorf","K\xF6nigswartha / OT Wartha","K\xF6nigswinter","K\xF6nigs Wusterhausen","Konken","K\xF6nnern","Konnersreuth","Konow","Konradsreuth","Konstan-Oberlohn","Konstanz","Konstanz-Allmannsdorf","Konstanz-Allmansdorf","Konstanz-Altstadt","Konstanz-Dettingen","Konstanz-Dingelsdorf","Konstanz-Egg","Konstanz-F\xFCrstenberg","Konstanz-K\xF6nigsbau","Konstanz-Litzelstetten","Konstanz-Oberdorf","Konstanz-Oberlohn","Konstanz-Petershausen","Konstanz-Staad","Konstanz-Unterlohn","Konstanz-Wallhausen","Konstanz-Wollmatimgen","Konstanz-Wollmatingen","Konz","Konzell","Konz-K\xF6nen","Kopperby","Korabch","Korb","Korbach","K\xF6rbecke","K\xF6rbitz","Korb-Kleinheppach","Korbussen","Korbu\xDFen","K\xF6rchow","Kordel","Korleput","K\xF6rner","Kornhain","Korntal","Korntal-M\xFCnchingen","Kornwestheim","Kornwestheim-Pattonville","K\xF6rperich","K\xF6rrenzig","Korschenbroich","Korswandt","Korvin","K\xF6rzin","K\xF6sching","K\xF6sching Interpark","Kosel","Koserow","Koslar","Kospoda","Kossa","Ko\xDFdorf","K\xF6\xDFlarn","K\xF6\xDFnach","K\xF6thel","K\xF6then","K\xF6then (Anhalt)","Kottgeisering","Kottingw\xF6rth","Kottingw\xF6rtherm\xFChle","Kotzen OT Kriele","K\xF6tzschau","K\xF6tzting-Traidersdorf","Kraase","Krackow","Kradenbach","Kraftsbuch","Kraftsdorf","Kraftsdorf OT T\xF6ppeln","Kraftsdorf-R\xFCdersdorf","Kraiburg","Kraichtal","Kraichtal/Gochsheim","Kraichtal/Menzingen","Kraichtal - Neuenb\xFCrg","Krailling","Krakow","Krakow am See","Krakow am See-OT Charlottenthal","Kr\xE4lingen","Kranenburg","Kranichfeld","Kranklucken","Kranzberg","Kranzegg","Kraslice-Hrani\u010Dn\xE1","Kratzeburg","Krauchenwies","Krauschwitz","Krausnick","Krauthausen","Krautheim","Krautze","Kreba-Neudorf","Krefeld","Krefeld-Diessem","Krefeld-Uerdingen","Krefenrod","Kreiensen","Kreischa","Kreischa, OT Gombsen","Kremmen","Krempdorf","Krempe","Kremperheide","Krempermoor","Krems I","Krenzliner H\xFCtte","Kre\xDFberg","Kre\xDFberg-Marktlustenau","Kressbronn","Kressbronn a.B","Kressbronn a. B.","Kressbronn am Bodensee","Kressbronn / OT Retterschen","Kreut","Kreuth","Kreuzau","Kreuzau-Boich","Kreuzau-Drove","Kreuzau-Obermaubach","Kreuzfeld","Kreuzkamp","Kreuzle","Kreuzlingen","Kreuzsschuh","Kreuzstra\xDFe","Kreuztal","Kreuzwertheim","Kricheldorf","Kriebitzsch","Kriebstein","Kriebstein OT Gr\xFCnlichtenberg","Kriebstein OT H\xF6fchen","Kriegsfeld","Krien","Krieschow","Kriftel","Krimitz","Krina","Kritzkow","Kritzmow","Kritzow","Kriwitz","Krogaspe","Krokau","Kr\xF6lpa","Kr\xF6lpa-Herschdorf","Kromlau","Kronach","Kronau","Kronberg","Kronberg im Taunus","Kronprinzenkoog","Kronsforde","Kronsgaard","Kronshagen","Kronskamp","Kronsmoor","Kronwinkl","Kronwitt","Kroogaspe","Kr\xF6pelin","Kropp","Kroppach","Kroppen","Kr\xF6ppen","Kroppenstedt","Kropp-Heidbunge","Kropst\xE4dt","Kr\xF6slin","Krostitz","Krottenhill","Kruft","Krukow","Krumbach","Krumbach (Schwaben)","Krumbeck","Krumhermersdorf","Krummasel","Krummbek","Krummennaab","Krummesse","Krummh\xF6rn","Krummh\xF6rn - Groothusen","Krummh\xF6rn - Loquard","Krummin","Krummsee","Krummwisch","Krumstedt","Kr\xFCn","Krunkel","Krus\xE5","Kr\xFCzen","Kubsch\xFCtz","Kuchen","Kuchenheim","K\xFCckelheim","Kuden","Kuestelberg","Kufstein","Kuhardt","K\xFChbach","K\xFChbach-Stockensau","K\xFChbach-Winden","Kuhbier","Kuhfelde","Kuhle","K\xFChlungsborn","K\xFChndorf","K\xFChnhausen","K\xFChren","K\xFChrstedt","Kuhs","K\xFChthal","Kukate","K\xFCkel\xFChn","Kulm","Kulmbach","Kulmbhach","K\xFClsheim","Kumhausen","Kummerfeld","Kummerow-Heide","K\xFCmmersbruck","K\xFCmmersbuch","Kumpfhof","Kunrau","Kunreuth","K\xFCnsche","K\xFCntrop","K\xFCnzell","K\xFCnzell-Bachrain","K\xFCnzelsau","K\xFCnzing","Kupferzell","Kuppenheim","Kuppingen","K\xFCps","K\xFCps-Oberlangenstadt","K\xFCrnach","K\xFCrnbach","Kurort Altenberg","Kurort Gohrisch","Kurort Hartha","Kurort Jonsdorf","Kurort Oberwiesenthal","Kurort Oybin","Kurort Rathen","Kurort Seiffen","Kursdorf","K\xFCrten","K\xFCrten-Biesfeld","K\xFCrzell","Kusel","Kusey","K\xFCssaberg","Kussebode","K\xFCstelberg","K\xFCsten","Kusterdingen","K\xFCstriner Vorland","Kutenholz-Mulsum","K\xFCtten","Kyllburg","Kyritz","Laaber","Laage","Laar","Laasdorf","Laatzen","Laberweinting","Laboe","Lachem","Lachen","Lachendorf","Lachen-Speyerdorf","Lachtehausen","Ladbergen","Ladelund","Ladenburg","Laer","Laer-Holthausen","Lage","L\xE4gerdorf","Lagesb\xFCttel","Lage-Waddenhausen","L\xE4hden","Lahnau","Lahnstein","Lahntal","Lahr","Lahstedt","Laichingen","Laipersdorf","Lalendorf","Lalling","Lam","Lambrecht","Lambrechtshagen","Lambsheim","Lambzig","Lamerdingen","Lampertheim","Lampertshofen","Lampertswalde","Lamplm\xFChle","Lamspringe","Lamstedt","Lancken-Granitz","Landau","Landau a.d. Isar","Landau an der Isar","Landau-Arzheim","Landau / Godramstein","Landau in der Pfalz","Landau-M\xF6rlheim","Landensberg","Landesbergen","Landeshaupststadt Schwerin","Landkern","Landolfshausen","Landrecht","Landsberg","Landsberg am Lech","Landsberg/ Lech","Landscheid","Landscheide","Landsham","Landsham Moos","Landshut","Landstuhl","Landturm","Landwedel","Landwehr","Landw\xFCst","Langballig","Langd","Langebr\xFCck","Langeloh","Langelsheim","Langen","Langenapel","Langenargen","Langenau","Langenau-Albeck","Langenbach","Langenbach / Niederhummel","Langenberg","Langenbernsdorf","Langenbochum","Langenbruck","Langenbuch","Langenburg","Langendernbach","Langendorf","Langenenslingen","Langene\xDF","Langenfeld","Langenfeld-Reusrath","Langenfeld (Rheinland)","Langenhagen","Langenhagen OT Kaltenweide","Langenhain","Langenhangen","Langenhennersdorf","Langenhessen","Langen (Hessen)","Langen-Hol\xDFel","Langenhorn","Langenhorst","Langen-Krempel","Langenleuba-Niederhain","Langenlonsheim","L\xE4ngenmoos","Langenmosen","Langennaundorf","Langenneufnach","Langenorla","Langenorla-Kleindembach","Langenpreising","Langenreichenbach","Langenrieth","Langenroda","Langenscheid","Langenselbold","Langensendelbach","Langensteinach","Langenweddingen","Langenwei\xDFbach-Wei\xDFbach","Langenwetzendorf","Langenwolmsdorf","Langenwolmsdorf Stadt Stolpen","Langenzenn","Langeoog","langerwehe","Langerwehe","Langerwisch","Langewiesen","Langf\xF6rden","Langfurth","Langg\xF6ns","Langhagen","Langholz","Langlingen","Langniendorf","Langquaid","Langsdorf","Langstedt","Langst-Kierst","Langsur","Langwedel","Langweid","Langweid am Lech","Lankau","Lanz","Lanzarath","Lanze","Lanzenhaar","Lanzen-Hegge","Lappersdorf","Lardenbach","Lasbek","Lascheid","Lassahn","Lassan","Lastrup","Laststrup / Hemmelte","Latendorf","Latferde","Lathen","Laub","Laubach","Lauben","Laubsdorf","Laucha","Laucha an der Unstrut","Laucha / Unstrut","Lauchhammer","Lauchheim","Lauchheim-R\xF6ttingen","Lauchringen","Lauchr\xF6den","Lauda-K\xF6nigshofen","Lauda-K\xF6nigsofen","Laudenbach","Lauenau","Lauenberg","Lauenbr\xFCck","Lauenburg","Lauenburg/Elbe","Lauenf\xF6rde","Lauenstein","Lauf","Laufach","Lauf a.d.Pegnitz","Lauf a.d. Pegnitz","Lauf a. d.Pegnitz","Lauf a. d. Pegnitz","Lauf an der Pegnitz","Laufdorf","Laufen","Laufenburg","Laufenpark","Laufenselden","Laufersweiler","Lauffen","Lauffen am Neckar","Lauingen","Lauingen (Donau)","Laupheim","Lausa","Lauscha","Lausitz","Laussig","Lau\xDFig OT Kossa OT Pressel","Laussig OT Prist\xE4blich","Lau\xDFnitz","Lauta","Lautenthal","Lauter","Lauterbach","Lauterburg","Lauterecken","Lauterhofen","Lautern","Lautersee","Lauterstein","Lautertal","Lautertal-Oberlauter","Lautertal-Reichenbach","Lautrach","Lautzenhausen","Lawalde","Lebach","Lebenstedt","Lebersberg","Lebrade","Lebus","Lebusa","Lechbruck","Lechbruck am See","Lechlingszell","Leck","Leckwitz","Lederhose","Leeder","Leer","Leer-Loga","Leer/Loga","Leer (Ostfriesland)","Leest","Leezdorf","Leezen","Lefitz","Legan","Legau","Legden","Legefeld","Legelshurst","Legerich","Lehde","Lehe","Lehendorf","Lehenhammer","Lehesten","Lehesten Th\xFCr Wald","Lehmkamp","Lehmkuhlen","Lehnheim","Lehnin","Lehnitz","Lehrberg","Lehre","Lehrensteinsfeld","Lehrte","Lehrte-H\xE4melerwald","Lehrte-H.Wald","Lehrte-Steinwedel","Lehsten","Leiblfing-Obersunzing","Leibsch OT Damm","Leichendorf","Leichlingen","Leidenborn","Leidersbach","Leiferde","Leimbach","Leimbach bei Bad Salzungen","Leimen","Leimersheim","Leina","Leinatal","Leinau","Leinburg","Leinburg - Entenberg","Leinefelde","Leinefelde-Worbis","Leinfelden","Leinfelden-Echterdingen","Leingarten","Leinzell","Leipheim","Leipzig","Leipzig Engelsdorf","Leipzig/Lindenthal","Leipzig-Miltitz","Leipzig OT Markranst\xE4dt","Leipzig-Podelwitz","Leipzig-Sch\xF6nefeld-Ost","Leipzig Sternsiedlung S\xFCdost","Leipzig-Strahmeln","Leisenau","Leisnig","Lei\xDFling","Leisten","Leitershofen","Leitzkau","Leiwen","Lelkendorf","Lemberg","Lembruch","Lemf\xF6rde","Lemgo","Lemgo-Brake","Lemgo-Vo\xDFheide","Lemgow","Lemke","Lemkenhafen","Lemwerder","Lendringsen","Lendsiedel","Lengdorf","Lengede","Lengefeld","Lengefeld/Erzg.","Lengen","Lengenfeld","Lengenfeld OT Irfersgr\xFCn","Lengenfeld unterm Stein","Lengerich","Lengfeld","Lengfurt","Lenggries","Lenggries-Fall","Lengham, Bad Birnbach","Lenglern","Lengloh","Lenkenthal","Lennestadt","Lennestadt-Elspe","Lenningen","Lensahn","Lensian","Lensiedel","Lentf\xF6hrden","Lenthe","Lenting","Lenzen","Lenzen (Elbe)","Lenzen-Elbe","Lenzinghausen","Lenzkirch","Leonberg","Leonberg-Eltingen","Leonberg-H\xF6fingen","Leonberg/Warmbronn","Leopoldshafen","Leopoldsh\xF6he","Leopoldstal","Lepahn","Leppelsdorf","Leppersdorf","Leschede","Letschin","Letschin OT Gro\xDF Neuendorf","Lette","Letter","Letzau","Letzlingen","Leuben-Schleinitz","Leuben-Schleinitz OT Mertitz","Leubsdorf","Leumnitz","Leun","Leuna","Leuna OT G\xFCnthersdorf","Leuna OT K\xF6tschlitz","Leupoldishain","Leutenbach","Leutenberg","Leutenthal","Leutersdorf (OT Spitzkunnersdorf)","Leutershausen","Leutesdorf","Leuth","Leutkirch","Leutzenberg","Levenhagen","Levensau","Leverkusen","Leverkusen-Alkenrath","Leverkusen-Manfort","Leverkusen-Quettingen","Leverkusen-Schlebusch","Leverkusen Wiesdorf","Leverkusen-Wiesdorf","Leversen - Rosengarten","Leveste","Levitzow","Lich","Licherode","Lich-Steinstra\xDF","Lichte","Lichtenau","Lichtenau-Atteln","Lichtenau-Henglarn","Lichtenau-Herbram","Lichtenau-Iggenhausen","Lichtenau-Kleinernberg","Lichtenau OT Garnsdorf","Lichtenau / OT Merzdorf","Lichtenau / OT Niederlichtenau","Lichtenau OT Ottendorf","Lichtenberg","Lichtenberg/Erzgeb.","Lichtenberg/Erzgeb","Lichtenfels","Lichtenfels-Sachsenberg","Lichtenhagen","Lichtenhain","Lichtenow","Lichtenstein","Lichtenstein/Sa.","Lichtentann","Lichtentanne","Lichtenwalde","Lichtenwald-Hegenlohe","Lichterfelde","Liebenau","Liebenburg","Liebenstein","Liebenwalde","Lieberose","Liebertwolkwitz","Lieblm\xFChle","Lieblos","Liebstadt","Liebstadt OT Gro\xDFr\xF6hrsdorf","Liebstadt OT Seitenhain","Liederbach","Liedolsheim","Liegau-Augustusbad","Lienen","Lienen-Kattenvenne","Lienzingen","Liepe","Liepen","Liesborn","Lieschow","Lieser","Lieskau","Lieth","Lietzen","Lietzow","Liggeringen","Liggersdorf","Lilienthal","Lilienthal-Worphausen","Lilling","Lillinghof","Limbach","Limbach (Baden)","Limbach-Heidersbach","Limbach-Oberfrohna","Limbach-Oberfrohna-Plei\xDFa","Limbach / Vogtland","Limburg","Limburg an der Lahn","Limburgerhof","Limburg / Lahn","Limburg-Offheim","Linda","Lindach","Linda-K\xF6thnitz","Lindau","Lindau (Bodensee)","Lindaunis","Lindau-Reutin/Bodensee","Lindberg","Lindelbach","Linden","Lindenau","Lindenberg","Lindenberg im Allg\xE4u","Lindenfels","Lindenfels-Schlierbach","Lindenfels-Winkel","Lindenkreuz","Lindenstrasse 18","Lindenstruth","Linderbach","Lindern","Lindheim","Lindhorst","Lindlar","Lindlar-Hartegasse","Lindlar - Schmitzh\xF6he","Lindloh","Lindow","Lindow (Mark)","Lindstedt","Lindwerder","Lingen","Lingen - Bramsche","Lingen-Darme","Lingen (Ems)","Lingenfeld","Linkenheim","Linkenheim-Hochstetten","Linnich","Linsburg","Linsengericht","Linsengericht-Altenhasslau","Linsengericht-Altenha\xDFlau","Linsengericht-Eidenges\xE4\xDF","Linsengericht-Geislitz","Linsengericht-Gro\xDFenhausen","Linsengericht-L\xFCtzelhausen","Linstow","Linter","Linthe","Lintig","Linum","Linum S\xFCd","Linz","Linz am Rhein","Lipbach","Lippersdorf-Erdmannsdorf","Lippertsm\xFChle","Lippertsreute","Lippetal","Lippetal-Herzfeld","Lippetal-Lippborg","Lippstadt","Lippstadt-Benninghausen","Lippstadt-Cappel","Lippstadt-Esbeck","Lisberg","Lischeid","Lissendorf","List","Listerscheid","Listrup","Litzendorf","L\uFFFDningen","L\xF6bau","L\xF6bej\xFCn","Lobendorf","Lobenfeld","Lobenstein","L\xF6bnitz","Lobsing","Lobst\xE4dt","Loburg","Loch","Lochen","L\xF6chgau","Lochham","Lochhof","Lochhofen","L\xF6cknitz","Loddin","L\xF6derburg","Loffenau","L\xF6ffingen","L\xF6ffingen-Bachheim","L\xF6ffingen - Seppenhofen","Loge","Lohberg","Lohberg / Moosh\xFCtte","Lohe-F\xF6hrden","Lohfelden","Lohmar","Lohmar-Alfenhard","Lohmar-Hausen","Lohmar-H\xF6fferhof","Lohmar-J\xFCchen","Lohmar-Peisel","Lohmar-R\xF6ttgen","Lohmar-Stolzenbach","Lohme","Lohmen","Lohme-Nardevitz","Lohmen / Rothbeck","L\xF6hnberg","Lohnde","Lohne","L\xF6hne","Lohne (Oldenburg)","Lohr","Lohr a. Main","Lohr am Main","Lohr-Ruppertsh\xFCtten","Lohsa","Lohsa OT Gro\xDF S\xE4rchen","Lohstadt","L\xF6hsten","Loissin","Loitsche","Loitz","Lollar","Lomersheim","Lommatzsch","Lommatzsch - OT Daubnitz","Lommatzsch - OT Jessen","Lommatzsch - OT Striegnitz","Lommatzsch OT Trogen","Lommatzsch OT Wuhnitz","Lommatzsch - OT Wuhnitz","Lommersum","Lomnitz","Longuich","L\xF6ningen","L\xF6ningen/Bunnen","Lonnig","L\xF6nnwitz","Lonsee","Loop","Loose","L\xF6ptin","Lorch","Lorchhausen","Lorrach","L\xF6rrach","Lorsch","Lorup","L\xF6rzweiler","Losenried","Losheim","Losheim am See","Lossa","Lo\xDFburg","L\xF6\xDFnitz","Lo\xDFwig","Lostau","Lotte","L\xF6wenberger Land","L\xF6wendorf","L\xF6wensen","L\xF6wenstein","L\xF6wenstein-Rittelhof","Loxstedt","L\xFCbbecke","L\xFCbbecke-Blasheim","L\xFCbbecke-Nettelstedt","L\xFCbben","L\xFCbbenau","L\xFCbbenau-Gro\xDF Beuchow","L\xFCbbenau / Lehde","L\xFCbbenau / OT Lehde","L\xFCbbenau/OT Leipe","L\xFCbbenau/Spreewald","L\xFCbbenau/Spreewald OT Gro\xDF Klessow","L\xFCbbenau Zerkwitz","L\xFCbben (Spreewald)","L\xFCbben/Spreewald","L\xFCbbow","L\xFCbeck","L\xFCbeck-Genin","L\xFCbeck-Krummesse","L\xFCbeck-K\xFCcknitz","L\xFCbeck-Travem\xFCnde","L\xFCbeln","Lubmin","L\xFCbow","L\xFCbs","L\xFCbstorf","L\xFCbtheen","L\xFCbz","Lucas-Cranach-Stra\xDFe","Luchem","L\xFCchfeld","L\xFCchow","L\xFCchow (Wendland)","L\xFCchtringen","Lucka","Luckau","Luckenbach","L\xFCckendorf","Luckenwalde","Luckenwalde-OT Frankenfelde","Luckenwalde OT Kolzenburg","L\xFCckstedt","Ludendorf","L\xFCdenscheid","L\xFCderitz","L\xFCdersdorf","L\xFCdersfeld","L\xFCdershagen","L\xFCdinghausen","L\xFCdingworth","Ludorf","Ludwigsau","Ludwigsau-Tann","Ludwigsburg","Ludwigsfelde","Ludwigshafen","Ludwigshafen am Rhein","Ludwigshafen-Mundenheim","Ludwigshafen-Ruchheim","Ludwigslust","Ludwigsstadt","Ludwigswinkel","Ludwigwslust","L\xFCebbenau / Spreewald","Luedenscheid","Luegde","Luenen","L\xFCftelberg","Lugau","Lugau/Erzgeb.","Lugau / Erzgebirge","L\xFCgde","L\xFCgde - Harzberg","L\xFCgde Hummersen","L\xFCgde - Rischenau","L\xFCgde-Sabbenhausen","L\xFCgde-W\xF6rderfeld","L\xFCggau","Luhdorf","Luhe-Wildenau","Luhm\xFChlen","Luisenthal","L\xFCllingen","Lunden","L\xFCnebach","L\xFCneburg","L\xFCnen","L\xFCnen-Brambauer","L\xFCnne","Lunsen","L\xFCnten","Lunzenau","Luppa","L\xFCptitz","L\xFCrschau","L\xFCsche","Luschendorf","L\xFCsen","Lustadt","L\xFCtau","L\xFCtgenade","Luthe","Lutherstadt Eisleben","Lutherstadt Wittenberg","Lutherstra\xDFe","L\xFCthorst","L\xFCtjenburg","L\xFCtjenholm","L\xFCtjensee","L\xFCtow","Lutten","L\xFCttenmark","Lutter","Lutterbek","Lutterberg-Stauffenberg","Luttowitz","L\xFCtzelbach","L\xFCtzelbach-Haingrund","L\xFCtzelburg","L\xFCtzellinden","L\xFCtzen","L\xFCtzen OT Muschwitz","L\xFCtzen OT Rippach","L\xFCtzens\xF6mmern","Lutzerath","Lutzhorn","L\xFCtzow","Lychen","Maasb\xFCll","Maasholm","Macherbach","Machern","Machern OT L\xFCbsch\xFCtz","Mackenrode","Mackenzell","Maddau","Magdala","Magdeburg","Magdeburg-Ottersleben","Magdeburg-Reform","Magstadt","Mahitzschen","Mahlberg","Mahlberg-Orschweier","Mahlenzien","Mahlow","Mahlsdorf","M\xE4hring","Maibrun","Maichingen","Maidbronn","Maienfels","Maierhofen","Maiersreuth","Maiinz","Maikammer","Mailing","Mainaschaff","Mainau","Mainbach","Mainbernheim","Mainburg","Mainburg-Sandelzhausen","Mainburg-Stra\xDFhof","Mainhardt","Mainhausen-Mainflingen","Mainleus","Maintal","Maintal-Bischofsheim","Maintal-D\xF6rnigheim","Mainz","MAinz","Mainz-Bretzenheim","Mainz Ebersheim","Mainz-Hechtsheim","Mainz-Kastel","Mainz-Kostheim","Mainz-Kostheim (Wiesbaden)","Mainz-Laubenheim","Mainz-Mombach","Mainz-Oberstadt","Mainz-Weisenau","Maisach","Maising","Maitenbeth","Makenhof","Malchen","Malchin","Malchow","Malente","Malgersdorf","Malkwitz","Mallentin","Mallersdorf-Pfaffenberg","Malmsheim","Malsch","Malschwitz","Malsfeld - Beisef\xF6rth","Malsfeld-Beisef\xF6rth","Malsleben","Malter","Malterdingen","Mambach","Mammendorf","Mamming","Mammoi\xDFel","Manching","Mandelbachtal","Manderscheid","M\xE4ndlfeld","Manebach / Ilmenau","Mangolding","Manker","Mannebach","Mannheim","Mannheim-Friedrichsfeld","Mannheim-Friesenheimer Insel","Mannheim (Neckarau)","Mannheim-Sandhofen","Mannheim-Seckenheim","Mansbach","Mansfeld","Mansfeld OT Siebigerode","Mantel","Marbach","Marburg","Marburg-Cappel","Marburg-Michelbach","March","March-Hugstetten","March-Neuershausen","Margetsh\xF6chheim","Mariaposching","Maria-Thann","Marienau","Marienberg","Marienberg OT Lauterbach","Marienfeld","Marienflie\xDF","Marienhafe","Marienhafe-Upgant-Schott","Marienheide","Marienloh","Marienm\xFCnster","Marienm\xFCnster-Bredenborn","Marienm\xFCnster / L\xF6wendorf","Marienrode","Marienstedt","Marienstein","Mariental","Marienwarder","Marina Wendtorf","Marisfeld","Markdorf","Markdorf, Baden","Markelfingen","Markersdorf","Markgr\xF6ningen","Markgr\xF6ningen - Unterriexingen","M\xE4rkisch Buchholz","M\xE4rkische Heide","M\xE4rkische Heide, biebersdorf","M\xE4rkische H\xF6he","M\xE4rkisch Luch","Markkleeberg","Markkleeberg OT Wachau","Marklohe","Markneukirchen","Markneukirschen","Markranst\xE4dt","Markranstaedt OT Frankenheim","Marksuhl","Markt Berolzheim","Markt Bibart","Marktbreit","Markt Einersheim","Markt Erlbach","Marktheidenfeld","Marktheidenfeld-Altfeld","Marktheidenfeld-Zimmern","Markt Indersdorf","Marktl","Marktleugast","Marktl - Stammham","Markt Nordheim","Marktoberdorf","Marktoffingen","Marktredwitz","Markt Rettenbach","Marktrodach","Marktschellenberg","Markt Schwaben","'Markt Schwaben'","Marktsteft","Markt Taschendorf","Markt Wald","Marktzeuln","Marl","Marl-Drewer","Marlesreuth","Marlin","Marlishausen","Marl-Lenkerbeck","Marloffstein","Marlow","Marmagen","Marne","Marnitz","Maroldsweisach","Marpingen","Marpingen-Urexweiler","Marquardt","Marquartstein","Marquatstein","Marsberg","Marsberg-Bredelar","Marsberg-Helminghausen","Marsberg- Obermarsberg","Marsberg-Westheim","Marschacht","Marschall","Martensrade","Martfeld","Martinfeld","Martinroda","Martinsbuch","Martinsried","Martinstein","Martinszell im Allg\xE4u","Martinszell-Oberdorf","Marwede","Marx","Marxen","Marxheim","Marxzell","Marxzell-Pfaffenrot","Marxzell/Pfaffenrot","Marzahna","Marzling","Marzling / Unterberghausen","Maschwitz","Masers","Ma\xDFbach","Massenbachhausen","Massenhausen","Massen-Niederlausitz","Masserberg","Masserberg-Heubach","Masserberg-Schnett","Massing","Massing-Hochholding","Ma\xDFweiler","Mastbruch","Mastholte","Mastholte;Rietberg","Mathildenhof","Mattenhofen","Mattstedt","Matzlow","Maua","Mauderode","Mauer","Mauern","Mauerstetten","Maulbronn","Maulbronn - Jungviehweide","Mauloff","Mausbach","Mausloch","Mauth","Maxain","Maxdorf","Maxen","Maxh\xFCtte-Haidhof","Maxh\xFCtte/Haidhof","Maxh\xFCtte-Leonberg","Maximiliansau","Mayen","Mayscho\xDF","Mechau","Mechernich","Mechernich - Dreim\xFChlen","Mechtersheim","Mechterst\xE4dt","Meckenbeuren","Meckenbeuren-Buch","Meckenbeuren-Kehlen","Meckenheim","Meckenheim-Altendorf","Meckenheim-L\xFCftelberg","Meckesheim","Meckfeld","Meddewade","Medebach","Medebach-Berge","Medebach-Dreislar","Medelby","Medelon","Medingen","Medow","Meeder","Meerane","Meerbeck","Meerbusch","Meerbusch (B\xFCderich)","Meerbusch-B\xFCderich","Meerbusch-Lank","Meerfeld","Meersburg","Meersburg am Bodensee","Meesiger","Mehlfien","Mehlingen","Mehltheuer","Mehren","Mehring","Mehrstetten","Meihern","Meimersdorf","Meine","Meinersen","Meinerzhagen","Meinhard","Meinhard-Grebendorf","Meiningen","Meinnigen","Meisburg","Meisdorf","Meisenheim","Mei\xDFen","Mei\xDFenheim","Mei\xDFner","Meitingen","Meitingen-Herbertshofen","Melbeck","Meldorf","Melle","Melle Bennien","Melle-Buer","Mellen","Mellenbach-Glasbach","Melle - Neuenkirchen","Mellenthin","Melle Riemsloh","Melle-Riemsloh","Melle Wetter","Mellin","Mellingen","Mellrichstadt","Melsdorf","Melsungen","Memleben","Memmelsdorf","Memmelsdorf - Drosendorf","Memmelsdorf - Merkendorf","Memmendorf","Memming","Memmingen","Mendelsohnweg","Menden","Menden (Sauerland)","Mendig","Mengen","Mengen-Ennetach","Mengersgereuth-H\xE4mmern","Mengerskirchen","Mengkofen","Menning","Mennrath","Menslage","Menteroda","Menzingen","Menzlingen","Meppen","Merching","Merchweiler","Merenberg","Merfeld","Mergners","Mering","Merka","Merkendorf","Merklingen","Merseburg","Merseburg (Saale)","Merseburg(Saale)","Mertesdorf","Mertingen","Mertloch","Merzalben","Merzen","Merzenhausen","Merzenich","Merzenich-Golzheim","Merzhausen","Merzig","Meschede","Mescherin","Mescherin/Oder","Mesekenhagen","Me\xDFdorf","Messel","Messingen","Me\xDFkirch","Messstetten","Me\xDFstetten","Mestlin","Metelen","Metlangen","Metten","Mettendorf","Metternich","Metterzimmern","Mettingen","Mettlach","mettmann","Mettmann","Mettmann - neanderthal","Metzelthin","Metzenried","Metzingen","Meuchefitz","Meura","Meuro","Meuselbach-Schwarzm\xFChle","Meuselwitz","Meuspath","Meu\xDFlie\xDFen","Meyenburg","Meyenfeld","Meyerdamm","Michelau","Michelau/Schw\xFCbitz","Michelbach","Michelfeld","Michelfeld-Neunkirchen","Michelsdorf","Michelsneukirchen","Michelstadt","Michelstadt (Steinbuch)","Michendorf","Mickhausen","Mickhausen-Grimoldsried","Middelhagen","Middelsf\xE4hr","Middoge","Midlum","Miehlen","Miel","Mielkendorf","Mienenb\xFCttel","Miesbach","Miesenheim","Miesitz","Mieste","Miesterhorst","Mietenkam","Mihla","Mikul\xE1\u0161ovice","Milda","Mildenau","Mildenau-Arnsfeld","Mildstedt","Milkersdorf","Milmersdorf","Milower Land","Milower Land OT B\xFCtzer","Milower Land OT Gro\xDFwudicke","Milower Land OT Jerchel","Milower Land OT Milow","Milow OT Kleinwudicke","Miltenberg","Miltzow","Milz","Milzau","Mindelheim","Mindelheim-Westernach","Mindelstetten","Minden","MInden","Minkelfeld","Mintraching","Mintraching / Gr\xFCneck","Mintraching (Gr\xFCneck)","Mirbach","Mirow","Misselwarden","Missen","Missen-Wilhams","Missen-Willhams","Missunde","Missunde an der Schlei","Mistelgau","Mistorf","Mittbach","Mittelbach","Mittelberg","Mittelbiberach","Mittelbrunn","Mittelehrenbach","Mittelneufnach","Mittelp\xF6llnitz","Mittelsinn","Mittelstadt","Mittelstetten-Vogach","Mittenwald","Mittenwalde","Mitterdarching","Mitterfirmiansreut","Mitterhaselbach","Mitterskirchen","Mittersthal","Mitterteich","Mittweida","Mittweida OT Falkenhain","Mittweida OT Lauenhain","Mitwitz","Mnn","Mochau","Mochau OT Choren","Mochow","M\xF6ckern","M\xF6ckm\xFChl","Mockrehna","Modautal","Modautal-L\xFCtzelbach","Moers","Moessling","M\xF6geldorf","Mogendorf","M\xF6gglingen","M\xF6glenz","M\xF6glingen","Mohlsdorf","Mohlsdorf OT Kahmer","M\xF6hnesee","M\xF6hnesee-K\xF6rbecke","Mohorn","M\xF6hren","M\xF6hrenbach","M\xF6hrendorf","M\xF6hringen","Mohrkirch","M\xF6hrsdorf","Moisburg","Molbergen","Moldenit","Molfsee","Mollbergen","M\xF6llbergen","M\xF6llen","M\xF6llenbeck","M\xF6llenhagen","M\xF6llenhagen-Wendorf","Mollenstorf-Ave","Mollhagen","M\xF6llmicke","M\xF6lln","M\xF6lschow","Molzhain","Momart","M\xF6mbris","M\xF6mbris-Heimbach","M\xF6mbris-K\xF6nigshofen","M\xF6mbris - Niedersteinbach","M\xF6mlingen","Mommenheim","Monakam","Monbrunn","M\xF6nchberg","M\xF6nchengladbach","M\xF6nchengladbach - Giesenkirchen","M\xF6nchengladbach-Odenkirchen","M\xF6nchengladbach-Rheydt","M\xF6nchenholzhausen","M\xF6nchevahlberg","M\xF6nchhagen","M\xF6nchherrnsdorf","M\xF6nchneversdorf","M\xF6nchsdeggingen","M\xF6nchsondheim","M\xF6nchsroth","M\xF6nchweiler","Monhei am Rhein","Monheim","Monheim am Rein","Monheim am Rhein","Monheim am TRhein","M\xF6ning","M\xF6nkeberg","M\xF6nkebude","M\xF6nkhagen","Monschau","Monschau-Imgenbroich","Monschau Konzen","Monsheim","M\xF6nsheim","Montabaur","Monzelfeld","Monzingen","Moor","Moorenweis","Moorgrund","Moorgrund-Witzelroda","Moorhusen","Moormerland","Moormerland - Boekzetelerfehn","Moormerland - Hatshausen","Moorrege","Moorwarfen","Moos","Moosach","Moosbach","Moosbacherau","Moosburg","Moosburg an der Isar","Moosham","Moosheim","Moosinning","Moos-Langenisarhofen","Moosrain","Moosthenning","Morbach","M\xF6rfelden","M\xF6rfelden-Walldorf","Morgenrot","Morgenr\xF6the-Rautenkranz","Moringen","M\xF6ringen","Moringen - Oldenrode","Moritzburg","Moritzburg/OT Boxdorf","Moritzburg OT Reichenberg","Moritzburg OT Steinbach","M\xF6rlenbach","Morsbach","Morsbach-Alzen","Morschen","Morschreuth","M\xF6rsdorf","Morsum","M\xF6rzheim","Mosbach","Mosbach-Diedesheim","Moschheim","Mose","M\xF6ser","Mossautal","Mossautal (H\xFCttenthal)","M\xF6ssingen","Motten","Motten-Kothen","M\xF6ttingen","Motzenhofen","Moxa","M\xF6zen","M\xDC","Much","Mucheln","M\xFCcheln","M\xFCcheln (Geiseltal)","M\xFCchnen","Muchow","M\xFCcka","M\xFCcke","Muckental","Mudau","Muddenhagen","M\xFCden (Aller)","M\xFCden/\xD6rtze","Mudersbach","M\xFCdisdorf","Muenchen","muenster","Muenster","M\xFCgeln","M\xFCggelheim","Muggenbrunn","M\xFCggenburg","Muggendorf","muggensturm","Muggensturm","M\xFCglitztal","M\xFCglitztal-Burkhardswalde","M\xFChbrook","M\xFChlacker","M\xFChlacker-Enzberg","M\xFChlacker-Lomersheim","M\xFChlanger","M\xFChlau","M\xFChlbach","M\xFChlbeck","M\xFChlberg","M\xFChlberg/Elbe","M\xFChldorf","M\xFChldorf am Inn","M\xFChldorf an der Inn","M\xFChleithen","M\xFChlenbach","M\xFChlenbeck","M\xFChlenberge","M\xFChlen Eichsen","M\xFChlhausen","M\xFChlhausen-Ehingen","M\xFChlhausen, Gemeinde Werneck, Landkreis Schweinfurt, Unterfranken, Bayern","M\xFChlhausen-M\xFCntzerstadt","M\xFChlhausen, Ortsteil Felchta","M\xFChlhausen/Th\xFCringen","M\xFChlheim","M\xFChlheim am Main","M\xFChlheim an der Donau","M\xFChlheim - Niederweiler","M\xFChlingen","M\xFChlried","M\xFChltal","M\xFChltroff","Muhr am See","Mulda","Muldenberg","Muldenhammer","Mulfingen","M\xFClheim","M\xFClheim a. d. Ruhr","M\xFClheim an der Ruhr","M\xFClheim-an der Ruhr","M\xFClheim an der Ruhr-Styrum","M\xFClheim-K\xE4rlich","m\xFCllheim","M\xFCllheim","M\xFCllrose","M\xFClsen","M\xFClsen St. Jacob","M\xFClsen St. Niclas","Mumpf","M\xFCnchberg","M\xFCncheberg","M\xFCnchehof","M\xFCnchehofe","M\xFCnchen","M\xFCnchen\u200E","M\xFCnchenbernsdorf","M\xFCnchen-Flughafen","M\xFCnchen - Oberf\xF6hring","M\xFCnchen-Obermenzing","M\xFCnchen-Riem","M\xFCnchen-Schwabing","M\xFCnchen-Thalkirchen","M\xFCnchen - Trudering","M\xFCnchingen","M\xFCnchsm\xFCnster","M\xFCnchsteinach","M\xFCnchweiler","Mundelsheim","Munderkingen","M\xFCndersbach","Munich","Munkbrarup","M\xFCnnerstadt","M\xFCnschbach","M\xFCnsing","M\xFCnsingen","M\xFCnsingen-Auingen","Munster","M\xFCnster","M\xFCnsterdorf","M\xFCnster-Handorf","M\xFCnsterhausen","M\xFCnster-Hiltrup","M\xFCnstermaifeld","M\xFCnster-Roxel","M\xFCnsterschwarzach Abtei","M\xFCnster/Sprakel","M\xFCnstertal","M\xFCnzenberg","M\xFCnzenberg-Gambach","M\xFCnzesheim","Munzig","Munzingen","Murchin","Murg","Murnau","Murnau am Staffelsee","Murr","Murrhardt","Murrhardt-Fornsbach","Mursewiek","M\xFCschen","M\xFCschenbach","M\xFCschen (Burg)","Muschenheim","M\xFCschne","M\xFCssen","Mustin","Muthen","Mutlangen","Mutterstadt","M\xFCtzen","M\xFCtzenich","M\xFCtzingen","Mutzschen","Mutzschen OT Roda","Mylau","Nabburg","Nabern","Nachrodt-Wiblingwerde","Nackenheim","Nagel","Nagold","Nahe","Nahrendorf","Nahrendorf-Breese","Naichen (Gde. Neuburg a.d.Kammel)","Naila","Naila-Culmitz","Nakendorf","Nalbach","Namborn","Nandlstadt","Narsdorf","Nartum","Nassau","Nassau/Lahn","Nassau-Scheuern","Nassen","Nassenfels","Nassenheide","Nast\xE4tten","Nattheim","Nauden","Nauen","Nauendorf","Nauen OT B\xF6rnicke","Nauheim","Naulitz","Naumburg","Naumburg, OT Bad K\xF6sen","Naumburg (Saale)","Naumburg/Saale","Naundorf","Naunhof","Naunhof OT Albrechtshain","Nauort","Nausitz","Nebel","Nebelsch\xFCtz, OT Miltitz","Nebel-Steenodde","Nebel-S\xFCddorf","Nebra","Nebra (Unstrut)","Nebringen","neckarbischofsheim","Neckarbischofsheim","Neckargem\xFCnd","Neckargerach","Neckarhausen","Neckarrems","Neckarsteinach","Neckarsulm","Neckartentzlingen","Neckartenzlingen","Neckarwestheim","Neckarzimmern","Neddemin","Neddernhof","Nedlitz","Neenstetten","Neerlage","Neermoor","Neetze","Negast","Negenborn","Negenharrie","Neheim","Nehlitz","Neibsheim","Neichen","Neidingen","Neidlingen","Neindorf","Nei\xDFeaue","Nellingen","Nemitz","Nemt","Nendingen","Nenndorf","Nenndorf-Rosengarten","Nennhausen","Nennslingen","Nentershausen","Nenzenheim","Neppermin","Nerchau","Nerdlen","Neresheim","Neresheim-Dorfmerkingen","Neritz","Nerreth","Nersingen","Neschwitz","Neschwitz OT Zescha","Nesse-Apfelst\xE4dt","Nesselwang","Nessendorf","Ne\xDFlach","Ne\xDFmersiel","Nestau","Netphen","Netphen-Lahnhof","Nettelbeck","Nettelkamp","Nettelsee","Nettenscheid","Netterndorf","Nettershausen","Nettersheim","Nettersheim-Marmagen","Nettersheim-Zingsheim","Nettetal","Nettetal-Lobberich","Netzschkau","Neualbenreuth","Neu Anspach","Neu-Anspach","Neu-Anspach-Hausen","Neu Bartelstorf","Neub\xE4u","Neubeuern","Neubiberg","Neubokel","Neu Boltenhagen","Neub\xF6rger","Neubrandenburg","Neubrandenburg-Weitin","Neubrunn","Neubukow","Neubulach","Neubulach - Liebelsberg","Neuburg","Neuburg a.d.Kammel","Neuburg an der Donau","Neuburg / Donau","Neuburg (Mecklenburg)","Neuching","Neuching / Niederneuching","Neuclausnitz","Neu Darchau","Neudenau","Neudietendorf","Neudorf","Neudorf-Bornstein","Neudrossenfeld","Neudrossenfeld-Rohr","Neu-Edingen","Neuenbeken","Neuenbrook","Neuenbrunslar","Neuenbuch","Neuenburg","Neuenb\xFCrg","Neuenburg am Rhein","Neuendeich","Neuendettelsau","Neuendorf","Neuendorf bei Elmshorn","Neuendorf/Hiddensee","Neuenhagen","Neuenhagen b Berlin","Neuenhagen bei Berlin","Neuenhaus","Neuenhinzenhausen","Neuenkirchen","Neuenkirchen bei Greifswald","Neuenkirchen - Brochdorf","Neuenkirchen-Delmsen","Neuenkirchen-V\xF6rden","Neuenmarkt","Neuenrade","Neuenrade-Blintrop","Neuensalz","Neuenstadt","Neuenstadt/K.-Stein","Neuenstein","Neuental","Neuenwalde","Neuerburg","Neuerkirch","Neue Tiefe","Neufahrn","Neufahrn bei Freising","Neufahrn b. Freising","Neufahrn b. Freising / Hetzenhausen","Neufahrn in Niederbayern","Neufarn","Neufeld","Neuffen","Neufinsing","Neuforweiler","Neufrach","Neu Gaarz","Neugattersleben","Neugersdorf","Neugnadenfeld","Neu G\xF6hren","Neuhardenberg","Neuharlingersiel","Neuhaus","Neuhaus a.d.Pegnitz","Neuhaus a. d. Pegnitz","Neuhaus am Rennweg","Neuhaus an der Pegnitz","Neuh\xE4usel","Neuhausen","Neuhausen a.d.F.","Neuhausen a. d. F.","Neuhausen (Erzgeb.)","Neuhausen/Erzgeb.","Neuhausen/Erzgeb","Neuhausen ob Eck","Neuhausen OT Haasow","Neuhausen;Pforzheim","Neuhausen/Spree","Neuh\xE4usl","Neuhaus-Schierschnitz","Neuhengstett","Neuherberg","Neuhimmelreich","Neuhochstadt","Neuhof","Neuhof an der Zenn","Neuhofen","Neu Hohenfelde","Neuh\xFCtten","Neu Isenburg","Neu-Isenburg","Neukalen","Neu Kali\xDF","Neukamperfehn","Neukamp/R\xFCgen","Neu K\xE4terhagen","Neukeferloh","Neukieritzsch","Neukirch","Neukirchen","Neukirchen-Balbini","Neukirchen bei Sulzbach-Rosenberg","Neukirchen/Erzgebirge","Neukirchen-Niep","Neukirchen - Vluyn","Neukirchen-Vluyn","Neukirchen vorm Wald","Neukirch/Lausitz","Neukirchstockach","Neukloster","Neuk\xF6nigsf\xF6rde","Neulehe","Neuleiningen","Neulewin","Neulingen","Neulingen-G\xF6brichen","Neul\xF6gow","Neulu\xDFheim","Neumagen-Dhron","Neumark","Neumarkt","Neumarkt i. d. Opf.","Neumarkt i d OPf","Neumarkt i.d.OPf.","Neumarkt in der Oberpfalz","Neumarkt-Sankt Veit","Neum\xFChlhausen","Neum\xFCnster","Neum\xFCnster-Wittorf","Neunburg","Neunburg vorm Wald","Neundorf","Neundorf-Pahnstangen","Neunkirchen","Neunkirchen am Brand","Neunkirchen am Sand","Neunkirchen a.Sand","Neunkirchen a. Sand","Neunkirchen-Seelscheid","Neunkirchen-Seelscheid-Wolperath","Neunkirchen-Wiebelskirchen","Neu\xF6tting","Neuperlach","Neupotz","Neuputzham","Neuravensburg","Neu Reddevitz","Neureichenau","Neuried","Neuried - Altenheim","Neuried - Dundenheim","Neurittsteig","Neuruppin","Neusalza-Spremberg","Neus\xE4\xDF","Neus\xE4\xDF-Vogelsang","Neus\xE4\xDF-Westheim","Neusatz","Neusatzeck","Neuscharrel","Neusch\xF6nau","Neusch\xF6nburg","Neuschoo - Negenmeerten","Neuses","Neuses am Berg","Neusig","Neusitz","Neusles (OT von Gr\xE4fenberg)","Neusorg","Neuss","Neuss-Holzheim","Neustadl","Neustadt","Neustadt a. d. Aisch","Neustadt a.d.Donau","Neustadt a.d. waldnaab","Neustadt a.d.Waldnaab","Neustadt a.d. Waldnaab","Neustadt am Kulm","Neustadt am Main","Neustadt am Rennsteig","Neustadt am R\xFCbenberge","Neustadt am R\xFCbenberge-Helstorf","Neustadt an der Aisch","Neustadt an der Donau","Neustadt an der Orla","Neustadt an der Waldnaab","Neustadt an der Weinstra\xDFe","Neustadt b.Coburg","Neustadt b. Coburg","Neustadt bei Coburg","Neustadt (Dosse)","Neustadt-Glewe","Neustadtg\xF6dens","Neustadt/Harz","Neustadt in Holstein","Neustadt in Sachsen","Neustadt in Sachsen - OT Rugiswalde","Neustadt Pelzerhaken","Neustadt-Rettin","Neustadt/Weinstra\xDFe","Neustadt (Wied)","Neustadt/Wied","Neustadt-Wiedm\xFChle","Neustadt/Wied-Thalhof","Neustetten","Neustift im M\xFChlkreis","Neustrelitz","Neustrelitz-Klein Trebbow","Neuststten","Neu Tramm","Neutras","Neutraubling","Neutrebbin","Neu Tucheband","Neu-Ulm","Neu-Ulm/Burlafingen","Neu-Ulm/Finningen","Neu-Ulm/Gerlenhofen","Neu-Ulm/Holzschwang","Neu-Ulm/Ludwigsfeld","Neu-Ulm/Offenhausen","Neu-Ulm/Pfuhl","Neu-Ulm/Reutti","Neu-Ulm/Steinheim","Neu-Ulm/Wiley","Neuweiler","Neuweiler-Oberkollwangen","Neuwied","Neuwied Feldkirchen","Neuwied-Gladbach","Neuwied Irlich","Neuwied Rodenbach","Neuwied Segendorf","Neuwittenbek","Neuw\xFChren I","Neuw\xFChren II","Neuw\xFChren III","Neu Wulmstorf","Neu Wulmstrof","Neu Zauche","Neuzelle","Newel","Nichel","Nickenich","Nidda","Nidda - Bad Salzhausen","Nidda-Bad Salzhausen","Nidda-Stornfels","Nidda-Ulfa","Nidderau","Nideggen","Nideggen-Br\xFCck","Nideggen-Embken","Nidorf","Nieblum","Nieb\xFCll","Niederaichbach","Niederarnbach","Niederau","Niederau - Gr\xF6bern","Niederaula","Nieder-Beerbach","Niederbeisheim","Nieder-Bessingen","Niederbobritzsch","Niederbrechen","Niederbrombach","Niederburghoff","Niederb\xFCssau","Niederdorfelden","Niederdorla","Niederdreisbach","Niedere B\xF6rde OT Jersleben","Niederehe","Niederelbert","Niedererbach","Niederer Fl\xE4ming","Niedereschach","Nieder-Eschbach","Niederfeld","Niederfischbach","Niederfrohna","Niederf\xFCllbach","Niedergebra","Niederg\xF6rsdorf","Niederg\xF6rsdorf OT Altes Lager","Niederg\xF6rsdorf - Zellendorf","Niedergottsau","Niedergrunstedt","Niedergurig","Niederhausen","Niederhaverbeck","Niederheimbach","Niederkail","Nieder-Kainsbach","Niederkassel","Niederkassel-Mondorf","Niederkassel-Rheidt","Niederkirchen","Niederkleveez","Nieder Kostenz","Niederkr\xFCchten","Niederkr\xFCchten-Brempt","Niederkr\xFCchten-Elmpt","Niederlangen","Niederlibbach","Niedermanderscheid","Niedermeien","Niedermittlau","Niedermotzing","Niederm\xFClsen","Niedermurach","Niedernberg","Niederndodeleben","Niederndorf","Niedernhausen","Niedernhausen-Engenhahn","Niedernst\xF6cken","Niederntudorf","Niedernw\xF6hren","Nieder-Ohmen","Nieder-Olm","Niederorschel","Niederp\xF6cking","Niederp\xF6llnitz","Nieder-Ramstadt","Niederraunau","Niederrieden","Niederrimsingen","Niederrodenbach","Niedersachswerfen","Niedersch\xF6na","Niedersonthofen","Niederstetten","Niederstotzingen","Niederstra\xDF","Niederstriegis","Niedertrebra","Niederviehbach","Niederwangen","Niederweiler","Nieder-Werbe","Niederwerrn","Niederwiesa","Niederwiesa OT Braunsdorf","Niederwiesa / OT Braunsdorf","Niederwinkling","Niederw\xFCrschnitz","Niederw\xFCrzbach","Niederzier","Niederzissen","Niefern","Niefern-\xD6schelbronn","Nieheim","Nieheim - Entrup","Niemberg","Niemegk","Nienbergen","Nienborg","Nienborstel","Nienburg","Nienburg (Saale)","Nienburg (Weser)","Nienburg/Weser","Nienb\xFCttel","Niendorf","Nienhagen","Nienhorst","Nienst\xE4dt","Niepars","Nierstein","Niese","Niesgrau","Niesky","Niesky OT See","Nieste","Niestetal","Niestetal/Salzmannshausen","Nieuweschans","Nievern","Nikolausberg","Nilkeim","Nindorf","Nischwitz","Nisdorf","Nister","Nistertal","Nittenau","Nittendorf","Nittendorf-Sch\xF6nhofen","Nitzschka","N\xF6bdenitz","Nobitz","N\xF6denitzsch","N\xF6ggenschwiel","Nohfelden","Nohfelden-Gonnesweiler","Nohn","Nohra","Nonnenroth","Nonnevitz","Nonnevitz/R\xFCgen","Nonnweiler","Nonnweiler-Sitzerath","Nordborchen","Norddeich","Norddorf","Norddorf auf Amrum","Nordeck","Norden","Nordenbeck","Nordenberg","Nordenberg / Windelsbach","Nordendorf","Nordenham","Norden-Nad\xF6rst","Norden-Norddeich","Nordenstadt","Norden-S\xFCderneuland","Norderbrarup","Norderheistedt","Nordermeldorf","Norderney","Norderstapel","Norderstedt","Norderw\xF6hrden","Nordhalben","Nordhastedt","Nordhausen","Nordhausen / Rodishain","Nordheim","Nordholz","Nordhorn","Nordhorn-Blanke","Nordkirchen","Nordleda","N\xF6rdlingen","N\xF6rdlngen","Nordrach","Nordstemmen","Nordstemmen-Mahlerten","Nordstrand","Nordwalde","Nordwestuckermark","N\xF6rten - Hardenberg","N\xF6rten-Hardenberg","Northeim","Northeim-H\xF6ckelheim","Northeim-Imbshausen","Nortorf","Nortrup","N\xF6rvenich","Nossen","Nossendorf","Nossen OT Radewitz","Nossentiner H\xFCtte","Nottfeld","Nottuln","N\xF6venthien","N\xFCbel","Nuernberg","Nufringen","N\xFCmbrecht","N\xFCmbrecht-Guxm\xFChlen","N\xFCnchritz","N\xFCnchritz OT Diesbar-Seu\xDFlitz","N\xFCnchritz OT Gr\xF6del","N\xFCnchritz OT Merschwitz","N\xFCnchritz OT Wei\xDFig","N\xFCnschweiler","Nurburg","N\xFCrburg","Nuremberg","N\xFCrnberg","N\xFCrnberg-Altenfurt","N\xFCrnberg-Gibitzenhof","N\xFCrnberg-Sandreuth","N\xFCrtingen","Nu\xDFbach","Nussdorf","Nu\xDFdorf","Nu\xDFdorf am Inn","Nusse","Nussloch","Nu\xDFloch","Nuthetal","Nuthe-Urstromtal","Nuthe-Urstromtal OT Frankenf\xF6rde","Nuthe-Urstromtal OT J\xE4nickendorf","Nuthe-Urstromtal OT Lieb\xE4tz","Nutter","N\xFCtzen","Obenstrohe","Oberachern","Oberaichen","Oberalteich, Bogen","Oberaltmannsrieth","Oberammergau","Oberasbach","Oberau","Oberaudorf","Oberaula","Oberaurach","Oberaurach-Tretzendorf","Oberbachern","Oberbalbach","Oberb\xE4renburg","Oberbergkirchen","Oberbernbach","Oberbessenbach","Ober-Bessingen","Oberbiberg","Oberbobritzsch","Oberboihingen","Obercunnersdorf","Oberdachstetten","Oberderdingen","Oberding","Oberdolling","Oberdorf","Oberdorla","Oberdrees","Oberd\xFCrrbach","Obereisenheim","Oberelchingen","Oberelsbach","Oberelsbach-Ginolfs","Oberelsungen","Oberems","Ober-Ense","Oberer Hahnenkopf","Obererthal","Obereschach","Obereuerheim","Oberferrieden","Oberflockenbach","Oberframmern","Obergolding","Obergries","Obergriesbach","Obergrombach","Obergrunstedt","Obergruppenbach","Oberg\xFCnzburg","Obergurig","Oberhaching","Oberhaid","Oberhamersbach","Oberharmersbach","Oberharnsbach","Oberhaunstadt","Oberhausen","Oberhausen-Osterfeld","Oberhausen-Rheinhausen","Oberhausen-Sterkrade","Oberhausen-Sterkrade-Nord","Oberheimbach","Oberheinriet","Oberheldrungen","Oberhermsdorf","Ober-Hilbersheim","Oberhinkofen","Oberhof","Oberhofen","Oberh\xF6fen","Oberhohenried","Oberhonnefeld","Oberhonnefeld-Gierend","Oberhonnefeld-Gierenderh\xF6he","Oberhonnfeld","Oberickelsheim","Oberisling Stadt Regensburg","Oberjesingen","Oberjettingen","Oberjoch","Oberjoch - Bad Hindelang","Oberkail","Oberkappel","Oberkirch","Oberkleveez","Ober-Klingen","Oberkochen","Oberkorb","Oberkotzau","Oberkr\xE4mer","Oberkr\xE4mer OT B\xE4renklau","Oberkrumbach","Oberlahr","Oberlaindern","Oberland am Rennsteig","Oberlangen","Oberlauterbach","Oberleichtersbach","Oberlungwitz","Obermaiselstein","Obermarchtal","Oberma\xDFfeld-Grimmenthal","Oberm\xE4ssing","Obermaubach","Obermauerbach","Obermeitingen","Obermichelbach","Ober-M\xF6rlen","Obermotzing","Oberm\xFChle","Obernberg am Inn","Obernbreit","Obernburg","Obernburg am Main","Obernburg-Eisenbach","Oberndorf","Oberndorf am Neckar","Oberneukirchen","Obernfeld","Obernhof/Lahn","Obernkirchen","Oberntudorf","Obernwohlde","Obernzell","Obernzenn","Ober-Olm","Oberostendorf","Oberottmarshausen","Oberpfaffenhofen","Oberpframmern","Oberp\xF6ring","Oberrach","Oberraden","Ober-Ramstadt","Ober-Ramstadt Modau","Oberreichenbach","Oberreute","Oberried","Oberriexingen","Oberr\xF6blingen","Oberr\xF6dinghausen","Oberrot","Obersaida","Oberscheidweiler","Oberscheinfeld","Oberscheld","Oberschledorn","Oberschlei\xDFheim","Ober-Schmitten","Oberschneiding","Oberschneitbach","Obersch\xF6na","Obersch\xF6nau","Oberschwarzach","Oberseifersdorf","Obersimten","Obers\xF6chering","Obersontheim","Obersontheim-Hausen","Oberspier","Oberstadt","Oberstaufen","Oberstaufen-Thalkirchdorf","Oberstdorf","Oberstdorf-Reichenbach","Oberstdorf/Rohrmoos","Oberstdorf-Spielmannsau","Oberstdorf-Tiefenbach","Oberstenfeld","Obersulm","Obersulm-Affaltrach","Obersulm-Eschenau","Obersulmetingen","Obersulm-S","Obersulm-S\xFClzbach","Obersulm-Willsbach","Oberteisendorf","Oberteuringen","Oberthal","Oberthulba","Obertiefenbach","Obertraubling","Obertrebra","Obertrubach","Obertshausen","Oberuckersee","Oberuhldingen","Oberursel","Oberursel (Taununs)","Oberursel (Taunus)","Oberviechtach","Obervolkach","Oberweier","Oberweimar","Oberweis","Oberwei\xDFbach","Oberwei\xDFbach Th\xFCr Wald","Oberwerrn","Oberweschnegg","Oberwesel","Oberweser","Oberweser-Gieselwerder","Oberwetz","Oberwiehl","Oberwiesenthal","Oberwirbach","Oberwittelsbach","Oberwolfach","Oberw\xF6ssen","Obing","Ochsenfurt","Ochsenhausen","Ochtendung","Ochtersum","Ochtmannsbruch","Ochtmissen","Ochtrup","Ockenheim","Ockholm","Odderade","Odelzhausen","Odendorf","Odenheim","Odenkirchen","\xD6denpullach","Odenthal","Odenthal-Altenberg","Oderaue","Oderberg","\xD6dernhardt","Odernheim","Oderstra\xDFe","Oderwitz","Odisheim","\xD6dsbach","Oebisfelde","Oebisfelde-Buchhorst","Oechsen","Oed","Oedelsheim","Oederan","Oedheim","Oedt","Oehna","Oehrenstock","Oelde","Oelde-Lette","Oelde-Stromberg","Oelixdorf","Oelsa","Oelsch\xFCtz","Oelsnitz","Oelsnitz/Erzgeb.","Oelsnitz OT Taltitz","Oelsnitz/Vogtl.","Oening","Oepfershausen","Oer-Erkenschwick","Oer-Erkenschwick-Rapen","Oering","Oerlenbach","Oerlinghausen","Oerrel","Oesterdeichstrich","Oestereiden","Oesterwurth","Oestrich-Winkel","Oetisheim","Oettern","Oettersdorf","Oettingen","Oetzen","Oevenum","Oeversee","Offenau","Offenbach","Offenbach a.M.","Offenbach am Main","Offenbach an der Queich","Offenbach-Bieber","Offenbach/Main","offenburg","Offenburg","Offendorf","Offenhausen","Offenthal","Offerschwang","Offingen","Offstein","Ofterdingen","Ofterschwang","Oftersheim","Oggelshausen","Oggenhausen","Oggersheim","Ohlendamm","Ohlsbach","Ohlstadt","\xD6hnb\xF6ck","\xD6hningen","\xD6hningen-Wangen","Ohrdorf","Ohrdruf","Ohrdruf-Gr\xE4fenhain","Ohrenbach","\xD6hringen","\xD6hringen - Michelbach","Olbernhau","Olbernhau/Gr\xFCnthal","Olbersdorf","\xD6lbronn","\xD6lbronn-D\xFCrrn","Olching","oldenburg","Oldenburg,","Oldenburg","Oldenburg - Alexandersfeld","Oldenburg - Etzhorn","Oldenburg in Holstein","Oldenburg - Ofenerdiek","Oldenburg - Ohmstede","Oldenburg(Old)","Oldenburg (Oldenburg)","Oldendorf","Oldenstadt","Oldenswort","Oldsum","Olfen","Olganitz","Ollheim","Olnhausen","Olpe","Olpe-Dahl","Olpe-Stade","Olsberg","Olsberg-Assinghausen","Olsbr\xFCcken","Olszyna","Olzheim","\xD6nsbach","Opfenbach","\xD6pfingen","Oppenau","Oppendorf","Oppenheim","Oppenwehe","Oppenweiler","Oppurg","Oranienbaum","Oranienbaum-W\xF6rlitz","Oranienburg","Orlam\xFCnde","Ormont","Orsingen-Nenzingen","Ortenberg","Ortenburg","Ortmannsdorf","Ortrand","Osann-Monzel","Osburg","Oschatz","\xD6schelbronn","Oschersleben","Oschersleben (Bode)","Osdorf","Oslo\xDF","Osnabr\xFCck","Osnabr\xFCck - Hafen","Osnabr\xFCck - Haste","Osnabr\xFCck-L\xFCstringen","Osnabr\xFCck - Sutthausen","Ossa","O\xDFling","O\xDFmannstedt","Ost-Bargum","Ostbevern","Ostedt","Osteel","Ostelsheim","Osten","Ostenfeld","Osterath","Osterbuch","Osterburg","Osterburg (Altmark)","Osterburken","Ostercappeln","Ostercappeln-Schwagstorf","Ostercappeln-Venne","Osterfeld","Ostergarden","Osterhever","Osterhofen","Osterhofen-G\xF6ttersdorf","Osterholz-Scharmbeck","Osterlinde","Osterndorf","Osternienburg","Osternohe","Osterode","Osterode am Harz","Oster-Ohrstedt","Osterrade","Osterr\xF6nfeld","Osterstader Stra\xDFe","Osterstedt","Osterwald Oberende","Osterwarngau","Osterweddingen","Osterwieck","Osterzell, Stocken","Osterzhausen","Ostfildern","Ostfildern-Scharnhauser Park","Ostgro\xDFefehn","Ostheim","Ostheim vor der Rh\xF6n","Osthofen","Ostin","Ostrach","Ostrau","Ostrhauderfehn","\xD6strich-Winkel","\xD6stringen","Ostritz","Ostrohe","Ostseebad","Ostseebad Ahrenshoop","Ostseebad Baabe","Ostseebad Binz","Ostseebad Binz OT Prora","Ostseebad Boltenhagen","Ostseebad Breege","Ostseebad Dierhagen","Ostseebad Heringsdorf","Ostseebad K\xFChlungsborn","Ostseebad K\xFChlunsborn","Ostseebad Nienhagen","Ostseebad Prerow","Ostseebad Rerik","Ostseebad Rerik / Meschendorf","Ostseebad Sch\xF6nhagen","Ostseebad Sellin","Ostseebad Wustrow","Ostseebad Zingst","Ostseebad Zinnowitz","Ostseeheilbad Ahlbeck","Oststeinbek","Oswaldberg","\xD6tigheim","\xD6tisheim","Ottacker","Ottenau","Ottenb\xFCttel","Ottendichl","Ottendorf","Ottendorf-Okrilla","Ottenhain","Ottenhausen","Ottenheim Gemeinde Schwanau","Ottenhofen","Ottenh\xF6fen","Ottensen","Ottensoos","Ottenstein","Otter","Otterbach","Otterfing","Otterloh","Ottermoor","Otterndorf","Ottersberg","Ottersch\xFCtz","Ottersheim","Otterstadt","Ottersweier","Otterwisch","Otterzhofen","Ottmaring","Ottmarsbocholt","Ottobeuren","Ottobrunn","Ottrau","Ottweiler","Otzberg","Otzberg - Ober-Klingen","Ovelg\xF6nne","Ovelg\xF6nne-Loyermoor","Ovelg\xF6nne/Oldenbrok","Ovendorf","Ovenst\xE4dt","Ovenum","Overath","Overath-Marialinden","Overrath","Owen","Owingen","Owschlag","Oybin","Oybin - Luftkurort L\xFCckendorf (OT)","Oy-Mittelberg","Oyten","Paar","Pabstorf","Packstation 131, 30519 Hannover","Padborg","Paderbor-Benhausen","Paderborn","Paderborn-Benhausen","Paderborn-Borchen","Paderborn-Dahl","Paderborn-Elsen","Paderborn-Marienloh","Paderborn-Neuenbeken","Paderborn-Sande","Paderborn - Schlo\xDF Neuhaus","Paderborn-Schlo\xDF Neuhaus","Paderborn-Sennelager","Paderborn-Wewer","Paderborn-Widey","P\xE4hl","Pahlen","Painten","Palingen","Palling","Palzem","Pampow","Panitzsch","Panker","Panketal","Panketal OT Schwanebeck","Panketal OT Schwanebeck bei Berlin","Panketal OT Zepernick","Pankketal OT Zepernick","Panschwitz-Kuckau","Pansdorf","Panten/Mannhagen","Papenburg","Papendorf","Papendorf OT Gro\xDF Stove","Papendorf OT Niendorf","Papendorf OT Sildemow","Papenhagen","Pappenheim","Papstdorf","Parchen","Parchim","Parey","Parkentin","Parkstetten","Parsau","Parsberg","Parschenberg","Parsdorf","Parsteinsee","Partenheim","Partenstein","Pasewalk","Pasewerk","Paska","Passade","Passau","Passau- Gewerbegebiet Sperrwies","Passau-Grubweg","Passow","Patersberg","Patersdorf-Sch\xF6nberg","Patriching","Pattensen","Pattern","Patzig","Paunzhausen","Pausa","Pautzfeld","Pavelsbach","P\xE4wesin","Pech","Pechau","Peckensen","Pedingworth","Peenem\xFCnde","Pegau","Pegnitz","Pegnitz - B\xFCchenbach","Peheim","Pehlitz","Peickwitz","Peilstein","Peine","Peine-Rosenthal","Peine-V\xF6hrum","Pei\xDF","Pei\xDFen","Peissenberg","Pei\xDFenberg","Peiting","Peitz","Pellworm","Pelm","Pelzerhaken","Pemmering","Penig","Penig OT Niedersteinbach","Penig, OT Thierbach","Penig, OT Zinnberg","Penig-Tauscha","Penkun","Pennewitz","Pennigsehl","Pentling","Penzberg","Penzing","Penzlin","Pepelow","Perasdorf","Perchting","Perdoel","Perd\xF6hl","Perl","Perlach","Perleberg","Perlesreut","Perscheid","Pessin","Pesterwitz","Petersaurach","Petersberg","Petersberg - Marbach","Petersdorf","Petersfehn I","Petershagen","Petershagen-Lahde","Petershausen","Peterslahr","Petrovice","Petting","Petting-K\xFChnhausen","Petting-Ringham","Pettling","Pettstadt","Petzow","Peunting","Peutenhausen","Pfaffenhausen","Pfaffenhofen","Pfaffenhofen an der Ilm","Pfaffenhofen/Ilm","Pfaffenweiler","Pfaffing","Pf\xE4ffingen","Pfaffroda","Pfalzfeld","Pfalzgrafenweiler","Pfarrkirchen","Pfarrweisach","Pfatter","Pfedelbach","Pfeffenhausen","Pfeffingen","Pfenningbach","Pfenninghof","Pfettrach","Pfettrach (Altdorf)","Pfinztal","Pfinztal - Berghausen","Pfinztal-Berghausen","Pfinztal-S\xF6llingen","Pflach","Pflaumheim","Pfl\xFCckuff","Pfofeld - Langlau","Pf\xF6rring","Pfortenwallgasse","Pforzen","Pforzen-Leinau","pforzheim","Pforzheim","Pforzheim-B\xFCchenbronn","Pfraunfeld","Pfreimd","Pfronstetten","Pfronten","Pfronten/Allg\xE4u","Pfronten Kreuzegg","Pfronten Wei\xDFbach","Pfrungen","Pfullendorf","Pfullingen","Pfungstadt","Philippsburg","Philippsburg-Huttenheim","Philippsburg-Rheinsheim","Philippsreut","Philippsthal","Picher","Piding","Piegendorf","Pielenhofen","Piesbach","Piesenkofen","Pilgramsberg-Rattiszell","Pillingsdorf","Pillingsdorf-Burkersdorf","Pillnitz","Pilsach","Pilsting","Pilsting-Kreuth","Pinnau","Pinneberg","Pinnow","Pinzberg","Pirmasens","Pirmasens-Erlenbrunn","Pirmasens-Niedersimten","Pirna","Pirna Liebethal","Pirna OT Copitz","Pirna-Zuschendorf","Pittersberg","Plaaz","Plaidt","Planegg","Plankenfels","Plankstadt","Plate","Platenlaase","Platling","Plattenburg","Plattenhardt","Plattling","Plau","Plau am See","Plaue","Plauen","Plauen-Neundorf","Plech","Pleckhausen","Pleidelsheim","Plein","Pleinfeld","Pleiskirchen","Plei\xDFa","Pleisweiler - Oberhofen","Pleisweiler-Oberhofen","Plessa","Plettenberg","Pleystein","pliening","Pliening","Pliezhausen","Plochingen","Plodda","Ploel","Pl\xF6n","Pl\xF6n am See","Pl\xF6\xDFberg","Pl\xF6\xDFh\xF6fe","Plothen","Pl\xF6tzkau","Pluwig","Pobershau","Pockau","Pocking","P\xF6cking","Podelwitz","Podelzig","Pogeez","P\xF6hl","Pohlheim","Pohlheim-Garbenteich","Pohlitz","P\xF6hl OT M\xF6schwitz","P\xF6hls","Pohnsdorf","Pohrsdorf","Poing","Polch","Polchow","P\xF6lchow","P\xF6lchow OT Wahrstorf","Polle","Polling","P\xF6llsmoos","P\xF6lsen","Polsingen","Polz","Pommelsbrunn","Pommerby","Pommersfelden","Pom\xDFen","Ponholz;Maxh\xFCtte-Haidhof","P\xF6nitz","Poppenb\xFCll","Poppenhausen","Poppenhof","Poppenricht","P\xF6rnbach","Porschdorf","Porschendorf","Porstendorf","Porta Westfalica","Porta Westfalica-Eisbergen","Porta Westfalica-Hausberge","Portenl\xE4ng","Porz","Poschdorf","P\xF6schendorf","Poseritz","Posewald","Possenfelden","Possenhofen-P\xF6cking","P\xF6\xDFneck","P\xF6\xDFneck-Schweinitz","Postau","Postbauer-Heng","Postdam","Postfeld","Postm\xFCnster","P\xF6tenitz","Potsdam","Potsdam-Babelsberg","Potsdam Bornim","Potsdam-Eiche","Potsdam Fahrland","Potsdam; Gro\xDF Glenicke","Potsdam-Gro\xDF Glienicke","Potsdam; Gro\xDF Glienicke","Potsdam Grube","Potsdam / Grube","Potsdam; Grube","Potsdam Krampnitz","Potsdam / Krampnitz","Potsdam / Marquardt","Potsdam Nedlitz","Potsdam; Nedlitz","Potsdam - Neu Fahrland","Potsdam / Neu Fahrland","Potsdam OT Drewitz","Potsdam OT Eiche","Potsdam OT Golm","Potsdam, OT Golm","Potsdam, OT Gro\xDF Glienicke","Potsdam OT Krampnitz","Potsdam OT Marquardt","Potsdam-Sacrow","Pottenau","Pottenstein","Pottenstein-T\xFCchersfeld","P\xF6ttmes","P\xF6ttmes-Gundelsdorf","Potzwenden","Prabstorf","Pracht","Pracht/Niederhausen","Prasdorf","Pratteln","Pred\xF6hl","Preetz","Preisdorf","Preist","Prem","Premnitz","Premslin","Prenzlau","prerow","Prerow","Pressath","Presseck","Pressig","Prettin","Pretzfeld","Pretzier","Pretzsch","Pretzsch (Elbe)","Pretzschendorf","Preussisch Oldendorf","Preu\xDFisch Oldendorf","Preu\xDFisch-Oldendorf","Preu\xDFisch-Oldendorf-Holzhausen","Prezier","Pribbenow","Priborn","Prien","Prien A. Chiemsee","Prien am Chiemsee","Prieschka","Priesendorf","Prie\xDFeck","Prie\xDFnitz","Priestewitz","Primsweiler","Prischwitz","Prisser","Prist\xE4blich","Pritzier","Pritzwalk","Probsteierhagen","Probstzella","Pr\xF6del","Profen","Prohn","Pronsfeld","Pronstorf","Propangas Verteilstelle","Prora","Proseken","Pr\xF6sen","Prosselsheim","Prossen","Pr\xF6tzel","Pruchten","Pr\xFCm","Prutting","Puchheim","Puchheim-Bahnhof","Pudagla","Puderbach","Pudripp","P\xFCggen","Pulheim","Pulheim-Brauweiler","Pullach","Pullach i.Isartal","Pullach i. Isartal","Pullach im Isartal","Pullach im Isartal (Gro\xDFhesselohe)","P\xFCllersreuth","Puls","P\xFClsen","Pulsnitz","Pulverdingen","P\xFCrgen","Purschwitz","Putbus","Putbus/R\xFCgen","Putensen","Putgarten","Putlitz","Puttball","Puttgarten","P\xFCttlingen","P\xFCttlingen-K\xF6llerbach","Putzbrunn","Putzbrunn/Seemannsiedlung","Putzbrunn/Solalinden","Putzbrunn/Waldkolonie","Pyrbaum","Pyrna","Quakenbr\xFCck","Quarnbek","Quartzau","Quassel","Queckborn","Quedlinburg","Quedlinburg OT Morgenrot","Queichhambach","Queienfeld","Quellendorf","Querfurt","Quern","Quernheim","Quickborn","Quierscheid","Quierschied","Quirnheim","Quittelsdorf","Quitz\xF6bel","R","Raa-Besenbek","Rabel","Raben","Rabenau","Rabenau-Geilshausen","Rabenau-Londorf","Rabenau / OT Oelsa","Rabenhorst","Rabenkirchen","Rabenkirchen-Faul\xFCck","Rabenshof","Raben Steinfeld","Rabenstein/ Fl\xE4ming","Rabertshausen","R\xE4bke","Rachelsbach","R\xE4ckelwitz","Rackwitz","Radbruch","Raddestorf","Raddingsdorf","Raddusch","Radeberg","Radebeul","Radeburg","Radegast","Radenbeck","Radersdorf","Radevormwald","Radewitz","Radibor","Radibor (Luppa)","Radis","Radolfzell","Radolfzell am Bodensee","Radolfzell (B\xF6hringen)","Radolfzell-B\xF6hringen","Radolfzell Markelfingen","Radolfzell-Markelfingen","Radolfzell-Mettnau","Radolfzell-M\xF6ggingen","Radolfzell-Stahringen","Raduhn","Raeren","Raesfeld","Raesfeld-Erle","R\xE4gelin","Rag\xF6sen","Ragow","Raguhn","Raguhn-Je\xDFnitz","Rahden","Rahden-Preu\xDFisch Str\xF6hen","Rahden-Wehe","Rahnsdorf","Rahrdum","Rai-Breitenbach","Rain","Rain am Lech","Rainrod","Raisdorf","Raitersaich","Ralbitz","Ralingen","Rambach","Rambin","Ramerberg","Ramersbach","Ramershoven","Ramitz","Rammelsbach","Rammenau","Rammingen","Rampe","Ramsau","Ramsbach","Ramsberg","Ramscheid","Ramsen","Ramstein","Ramstein-Miesenbach","Randersacker","Randowtal","rangendingen","Rangendingen","Rangendingen-Bietenhausen","Rangsdorf","Ranis","Ransbach-Baumbach","Ranstadt-Ober-Mockstadt","Rantrum","Rantum","Rantum/Sylt","Rantzau","Ranzau","Rapperzell","Raschau","Rasdorf","Rassau","Rastatt","Rastdorf","Rastede","Rastede - Barghorn","Rastede - Bekhausen","Rastede - Hahn","Rastede - Hankhausen","Rastede - Hankhausen II","Rastede - Ipwege","Rastede - Lehmden","Rastede - Leuchtenburg","Rastede - Liethe","Rastede - Nethen","Rastede - Neus\xFCdende","Rastede - Wahnbek","Rastenberg","Rastorf","Rastorfer Passau","Rastow","Ratekau","Rathen","Rathenow","Rathenow OT Semlin","Rathenow OT Steckelsdorf","Rathjensdorf","Rathlau","Rathmannsdorf","Ratignen","Ratingen","Ratingen-H\xF6sel","Rattelsdorf","Rattenberg","Rattey","Rattiszell","Ratzbek","Ratzeburg","R\xE4tzlingen","Raubach","Raubling","Rauden","Rauenberg","Rauenstein","Rauhenebrach","Raunheim","Rauschenberg","Rautheim","Ravensburg","Ravensburg-D\xFCrnast","Ravenstein","Rebenstorf","Rebhorn","Rech","Rechberg","Rechberghausen","Rechenberg","Rechenberg-Bienenm\xFChle","Rechlin","Rechtenbach","Rechtenstein","Rechterfeld","Rechtmehring","Rechtsupweg","Recke","Reckendorf","Recklinghausen","Recklinghausen-S\xFCd","Recklinghausen-Suderwich","Reddebeitz","Reddelich","Redefin","Redekin","Rederzhausen","Rednitzhembach","Reepsholt","Rees","Reetz","Reetzow","Reez OT Dummerstorf","Referinghausen","Regelsbach","Regen","Regensburg","Regensburg (im BusinessCenter Regina)","Regensburg/Winzer","Regenstauf","Regenstauf / Steinsberg","Regis-Breitingen","Regnitzlosau","Rehau","Rehbeck","Rehburg-Loccum","Rehden","Rehe","Reher","Rehfeld","Rehfelde","Rehhorst","Rehling","Rehlingen-Siersburg","Rehmen","Rehna","Reibersdorf","Reich","Reichardtsdorf","Reichelsheim","Reichenau","Reichenau Baden","Reichenau-Lindenb\xFChl","Reichenbach","Reichenbach im Vogtland","Reichenbach OL","Reichenbach/O.L.","Reichenbach-Steegen","Reichenberg","Reichenhain","Reichenschwand","Reichertshofen","Reichmannsdorf","Reichshof","Reichshof-Eckenhagen","Reichshof-Wildbergerh\xFCtte","Reichwalde","Reifenstein","Reiffenhausen","Reihne","Reileifzen","Reilingen","Reimsbach","Reinbek","Reinberg","Reinfeld","Reingrub","Reinhardshagen","Reinhardtsdorf","Reinhardtsdorf-Sch\xF6na","Reinhardtsgrimma","Reinhartshofen","Reinhausen","Reinheim","Reinholterode","Reinsberg","Reinsb\xFCttel","Reinsdorf","Reinsfeld","Reinst\xE4dt","Reinstedt","Reinstorf","Reisach","Reisbach","Reisbach-H\xF6tzendorf","Reischach","Reischenhart","Reiselfingen","Reisgang","Reiskirchen","Reiskirchen Ettingshausen","Reit im Winkel","Reit im Winkl","Reitwein","Reken","Reken-Maria Veen","Rellingen","Remagen","Remagen - Oberwinter","remchingen","Remchingen","Remchingen-Singen","Remda-Teichel","Remels","Remels Uplengen","Remlingen","Remmingsheim","Remptendorf","Remscheid","Remscheid-Lennep","Remsch\xFCtz","Remse","Remseck","Remseck am Neckar","Remseck-Pattonville","Remse/ Ortsteil Weidensdorf","Remshalden","Remshalden-Grunbach","Remst\xE4dt","Renchen","Rendsburg","Rengsdorf","Rennerod","Rennertshofen","Renningen","Renthendorf","Renthendorf-Hellborn","Rentweinsdorf","Rentwertshausen","Repke","Reppenstedt","Reppichau","Reptich","Rerik","residential","Rethem","Rethen","Rethwisch","Retschow","Rettenbach","Rettenbach am Auerberg","Rettenberg","Rettenberg-Wolfis","Rettensch\xF6ss","Rettigheim","Rettin","Reuden","Reudern","Reudnitz","Reundorf","Reusch","Reu\xDFenk\xF6ge","Reu\xDFenkoog","Reut","Reute","Reuth","Reutlingen","Reutlingen-Sickenhause","Reutlingen-Sickenhausen","Reut-Taubenbach","Revensdorf","Rexingen","Rhade","Rh\xE4sa","Rhauderfehn","Rhaunen","Rheda-Wiedenbr\xFCck","Rhede","Rheinau","Rheinau-Diersheim","Rheinau-Helmlingen","Rheinau-Honau","Rheinbach","Rheinbach-Flerzheim","Rheinbach-Klein-Altendorf","Rheinbach-Oberdrees","Rheinbach-Peppenhoven","Rheinbach-Ramershoven","Rheinbach-Scherbach","Rheinbach-Todenfeld","Rheinbach-Wormersdorf","Rheinback","Rheinberg","Rheinb\xF6llen","Rheinbreitbach","Rheinbrohl","Rheindahlen","Rheine","Rheine-Eschendorf","Rheine-Industriegebiet Nord","rheinfelden","Rheinfelden","Rheinfelden (Baden)","Rheinhausen","Rheinheim","Rheinm\xFCnster","Rheinm\xFCnster-Stollhofen","Rheinsberg","Rheinsberg - Kleinzerlang","Rheinsheim","Rheinstetten","Rheintetten","Rheinzabern","Rhens","Rheurd","Rheurdt","Rhinow","Rhinow OT Buchhorst","Rh\xF6nblick","Rhynern","Ribbesb\xFCttel","Ribnitz Damgarten","Ribnitz-Damgarten","Richen","Richtenberg","Rickenbach","Rickling","Rieb","Ried","Riedbach","Riedb\xF6hrungen","Riede","Rieden","Rieden am Forggensee","Riedenberg","Riedenburg","Rieden-Ro\xDFhaupten","Riederau","Riederich","Riedering","Riedern","Riedlh\xFCtte","Riedlingen","Riedstadt","Riedstadt-Leeheim","Riegel","Riegelsberg","Riegsee","Riehen","Riekau","Rielasingen","Rielasingen-Worblingen","Rielingshausen","Riemerling","Rieneck","Rienharz","Riepe","Riepen","Riepsdorf","Riepshof","Rierberg","Riesa","Rieschweiler-M\xFChlbach","Rieseby","Rieste","Rieste-Maschort","Rietberg","Rietheim-Weilheim","Riethnordhausen","Rietschen","Rietz","Rietz-Neuendorf","Rietz-Neuendorf OT Ahrensdorf","Rietzneuendorf-Staakow","Riezlern","Riezlerweg","Riez-Neuendorf","Rimbach","Rimbeck","Rimpar","Rimsting","Rinchnach","Rinderb\xFCgen","Ringe","Ringe Neugnadenfeld","Ringenhain","Ringenwald","Ringgau","Ringgau - Netra","Ringleben","Ringsee","Ringsheim","Ringstedt","Ringstra\xDFe","Rinkam","Rinnenthal","Rinteln","Rinteln-Krankenhagen","Rinteln-Westendorf","Ripperterhof","Rischenau","Riskau","Risum-Lindholm","Rittenweier","Ritterhude","Ritterhude-Platjenwerbe","Rittersbach","Rittmarshausen","Ritze","Riveris","Rmershoven","R\xF6bel","R\xF6bel M\xFCritz","R\xF6bel/M\xFCritz","Robern","R\xF6blingen am See","R\xF6bsdorf","Rochau","Rochlitz","R\xF6cken","Rockenhausen","Rockenhausen-Marienthal","Rockenthin","R\xF6ckersb\xFChl","R\xF6cknitz","Rocksdorf","R\xF6ckwitz","Rodalben","Rodalben-M\xFCnchweiler","R\xF8dby","Rodeberg","R\xF6delsee","Roden","Rodenbach","Rodenbach-Oberrodenbach","Rodenbek","Rodenberg","Rodenkirchen","R\xF6dental","R\xF6deraue","R\xF6derland","R\xF6derland Pr\xF6sen","R\xF6derland, Reichenhain","R\xF6derland, Reichenhain, Maiblumengehegen","R\xF6dermark","R\xF6dermark-Waldacker","Rodershausen","Rodewald","Rodewisch","Rodgau","Rodgau Dudenhofen","Rodgau-Dudenhofen","Rodgau-J\xFCgesheim","Rodgau/Nieder-Roden\u200E","Rodheim","Roding","Roding-Altenkreith","R\xF6dinghausen","Roermond","Roetgen","Roffhausen","Roffhausen-Schortens","Rog\xE4sen","Roggenburg","Roggendorf","Roggentin","R\xF6hl","Rohlsdorf","Rohr","Ro\u0308hrach","Rohrbach","Rohrbach (Ilm)","Rohrberg","Rohrdorf","Rohrdorf - Achenm\xFChle","Rohr i.NB","Rohr in Niederbayern","R\xF6hrmoos","R\xF6hrnbach","R\xF6hrsdorf","Rohrsen","Roidham","Roisdorf","Roitzheim","Roitzsch","R\xF6llbach","R\xF6llfeld","Rollhofen","R\xF6merberg","R\xF6merberg Berghausen","R\xF6merberg Heiligenstein","R\xF6merberg Mechtersheim","R\xF6mershofen","R\xF6merstein","R\xF6merstein-Donnstetten","R\xF6mhild","Rommelsbach","Rommerskirchen","R\xF6mnitz","Romrod","Rondeshagen","Ronneburg","Ronnenberg","Ronnenberg-Weetzen","Ronsberg","Ronshausen","R\xF6rischhof","Rosa","Rosbach","Roschbach","Rosche","Rosdorf","Roseburg","Rosenau","Rosenberg","Rosenberg/W\xFCrtt.","Rosendahl","Rosendahl-Osterwick","Rosendorf","Rosendorf-Zwackau","Rosenfeld","Rosengarten","Rosengarten-Nenndorf","Rosenhagen","Rosenheim","Rosenhof","Rosenow","Rosenschwaig","Rosenthal","Rosenthal-Bielatal","Rositz","Roskow","R\xF6slau","R\xF6srath","R\xF6srath, Forsbach","Rossach","Rossau","Rossau OT Greifendorf","Ro\xDFbach","Ro\xDFbach (Wied)","Ro\xDFdorf","Ro\xDFdorf am Forst","Ro\xDFhaupten","Ro\xDFla","Ro\xDFleben","Rossow","Ro\xDFtal","Ro\xDFwag","Ro\xDFwein","Rostock","Rostock-Diedrichshagen","Rostock-Dierkow","Rostock-Gehlsdorf","Rostock-Gro\xDF Klein","Rostock-Hinrichshagen","Rostock-J\xFCrgeshof","Rostock-Krummendorf","Rostock-Lichtenhagen","Rostock-Markgrafenheide","Rostock-Oldendorf","Rostock-R\xF6vershagen","Rostock-Stuthof","Rostock-S\xFCdstadt","Rostock-Toitenwinkel","Rostock-Warnem\xFCnde","Rot am See","Rot an der Rot","Rotenburg","Rotenburg an der Fulda","Rotenburg (W\xFCmme)","R\xF6tgesb\xFCttel","Roth","R\xF6tha","Roth-Eichelburg","Rothemann","Rothem\xFChl","Rothenbach","R\xF6thenbach","R\xF6thenbach a.d.Pegnitz","R\xF6thenbach a.d. Pegnitz","R\xF6thenbach an der Pegnitz","R\xF6thenbach bei St. Wolfgang","R\xF6thenbach-Renzenhof","Rothenberg","Rothenberga","Rothenberg-Finkenbach","Rothenbrg ob der Tauber","Rothenbruck","Rothenburg","Rothenburg ob derTauber","Rothenburg ob der Tauber","Rothenburg  ob der Tauber","Rothenburg/Oberlausitz","Rothenburg o.d.T","Rothenburg/O.L.","Rothenfels","Rothenfels a. Main","Rothenkirchen","Rothenklempenow","Rothensand","Rothesh\xFCtte","Rothes\xFCtte","R\xF6thges","R\xF6thlein","Rothsch\xF6nberg","Roth - Wallesau","Rott","Rotta","Rottach","Rottach-Egern","Rott am Inn","Rottau","Rottau/Grassau","Rottbach","Rottenbach","R\xF6ttenbach","Rottenbauer","Rottenberg","Rottenbuch","Rottenburg","Rottenburg a.d.Laaber","Rottenburg am Neckar","Rottenburg am Neckar - Oberndorf","Rottenburg am Neckar- Wendelsheim","Rottenburg an der Laaber","Rottenburg-Dettingen","Rottendorf","Rotthalm\xFCnster","R\xF6ttingen","Rottleben","Rottleberode","Rottrnburg","Rottweil","Rottweil am Neckar","Rottweil-G\xF6llsdorf","Rott (Westerwald)","R\xF6tz","R\xF6vershagen","R\xFCbeland","R\xFCbenach","Rubenow","R\xFCber","R\xFCckersdorf","R\xFCckholz","R\xFCckmarsdorf","R\xFCddingshausen","R\xFCde","R\xFCden","R\xFCdenhausen","Ruderatshofen","Rudersberg","R\xFCdersdorf","R\xFCdersdorf bei Berlin","Ruderting","R\xFCdesheim","R\xFCdesheim am Rhein","R\xFCdesheim-Assmannshausen","Rudolstadt","Rudolstadt - Schwarza","Rugendorf","R\xFCgge","R\xFCgland","R\xFChen","R\xFChen-Brechtorf","Ruhla","Ruhland","Ruhmannsfelden","R\xFChn","Ruhpolding","R\xFChst\xE4dt","R\xFChst\xE4dt OT Abbendorf","Ruhstorf","Rullstorf","R\xFClzheim","Rumbeck","Rumleshof","Rumohr","Rumpenheim","Runkel","Runkel an der Lahn","Rupboden","Ruppach-Goldhausen","Ruppertsberg","Ruppertsburg","Ruppertsecken","Ruppertsweiler","Ruppichteroth","Ruppichteroth-Br\xF6leck","R\xFCppurr","R\xFCsselhausen","R\xFCsselsheim","Ru\xDFheim","Rust","R\xFCtenbrock","Rutenweg","R\xFCterberg","Rutesheim","R\xFCthen","R\xFCthen-Gewerbegebiet Lindental","R\xFCthen-Kallenhardt","R\xFCthen-Oestereiden","Ruwer","Saal","Saalburg","Saalburg-Ebersdorf","Saalburg-Ebersdorf-Friesau","Saaldorf-Surheim","Saalfeld","Saalfelder H\xF6he","Saalfeld Gorndorf","Saalfeld Saale","Saalfeld/Saale","Saara","Saara/ OT Taupadel","Saarbr\xFCcken","Saarbr\xFCcken-Burbach","Saarbr\xFCcken-Ensheim","Saarbr\xFCcken-Goldene Bremm","Saarbr\xFCcken-Malstatt","Saarbr\xFCcken - St. Arnual","Saarbr\xFCcken / St. Arnual","Saarbruecken","Saarburg","Saarlouis","Saarn","Saarwellingen","Saa\xDFe","Sachsen bei Ansbach","Sachsenburg","Sachsendorf","Sachsenhagen","Sachsenhausen","Sachsenheim","Sachsenheim - Ochsenbach","Sachsenkam","Sacka","Saerbeck","Saffig","Sagar","Sagard","Sage","Sagehorn","Sailauf","Sainbach","Salach","Salching","Salderatzen","Salem","Salem Neufrach","Salem-Neufrach","Salenwang","Salgen-Hausen","Sallahn","Salmannsgrub","Salmtal","Salz","Salzbergen","Salzburg","Salzgitter","Salzgitter-Bad","Salzgitter-Beinum","Salzgitter-Gebhardshagen","Salzgitter-Lebenstedt","Salzhausen","Salzhemmendorf","Salzkotten","Salzkotten-Niederntudorf","Salzkotten-Oberntudorf","Salzkotten-Scharmede","Salzkotten-Th\xFCle","Salzm\xFCnde","Salzwedel","Salzweg","Samerberg","Samern","Samtens","Sand","Sandau (Elbe)","Sandauerholz","Sandausen","Sand bei B\xFChl/Baden","Sandberg","Sande","Sandebeck","Sandelzhausen","Sande-Mariensiel","Sanderbusch","Sandersdorf","Sandersdorf-Brehna","Sandersleben (Anhalt)","Sande - Sanderbusch","Sandhatten","Sandhausen","Sandizell","Sandkrug","Sandstedt","Sandstedt-Rechtenfleth","Sangerhausen","Sanitz","Sankelmark","Sankt Andreasberg","Sankt Andreasberg/Oderbr\xFCck","Sankt Augustin","Sankt Englmar","Sankt Gangloff","Sankt Georgen","Sankt Goarshausen","Sankt Heinrich","Sankt H\xFClfe","Sankt Ingbert","Sankt Julian","Sankt Kilian","Sankt Leon-Rot","Sankt Margarethen","Sankt Martin","Sankt Michaelisdonn","Sankt Peter","Sankt Peter-Ording","Sankt Wendel","Sankt Wolfgang","Sargenroth","Sarmersbach","Sarnow","Sarow","Sarreguemines","Sarstedt","Sarzb\xFCttel","Sasbach","Sasbach am Kaiserstuhl","Sasbach-Obersasbach","Sasbachwalden","Sasel","Sassen","Sassenberg","Sassenberg - F\xFCchtorf","Sassenburg","Sassnitz","Sa\xDFnitz-Mukran","Satemin","Saterland","Saterland-Ramsloh","Satow","Satrup","Satteldorf","S\xE4ttelst\xE4dt","Sattenhausen","Satzkorn","Sauensiek","Sauerlach","Sauldorf-Rast","Saulgau","Saulgrub","Saulheim","Saultitz","Saupsdorf","Sauserhof","Saustrup","Sauzin OT Ziemitz","Sayda","Sazgitter","Schaafhausen","Schaafheim","Schaalby","Schacha","Schacht-Audorf","Schachten","Schachtenbach 921 Meter","Schackendorf","Schadewitz","Schaephuysen","Sch\xE4ferh\xFCtte","Schafflund","Schafst\xE4dt","Schafstedt","Schaftlach","Sch\xE4ftlarn","Schaidt","Schaitdorf","Schalkau","Schalkenmehren","Schalksm\xFChle","Schallstadt","Schambach","Schamhaupten","Schammelsdorf","Schapen","Schaprode","Scharbeutz","Schardenberg","Sch\xE4rding","Scharfenberg","Scharfenberg OT Klipphausen OT Batzdorf","Scharfenstein","Scharmassing","Scharmede","Scharnebeck","Scharnhorst","Scharzfeld","Schashagen","Schattin","Schauenburg","Schauenburg-Breitenbach","Schauenstein","Schauernheim","Schaufenberg","Schechen","Scheden","Schee\xDFel","Schee\xDFel-Abbendorf","Schee\xDFel-Bartelsdorf","Schee\xDFel-Hetzwege","Schee\xDFel-Jeersdorf","Schee\xDFel-Sothel","Schee\xDFel-Westeresch","Schee\xDFel-Westerholz","Schee\xDFel-Westervesede","Schee\xDFel-Wittkopsbostel","Schee\xDFel-Wohlsdorf","Schefflenz","Scheggerott","Scheibe-Alsbach","Scheibenberg","Scheidegg","Scheinfeld","Schelklingen","Schellbronn","Schelldorf","Schellerten","Schellhorn","Schemmerhofen","Schemmerhofen-Altheim","Schemmerhofen-Ingerkingen","Schemmerhofen-Schemmerberg","Schenefeld","Schenkenberg","Schenkend\xF6bern","Schenkenzell","Schenmefeld","Schenningen","Scheppach","Scherbach","Schermbach","Schermbeck","Schermbeck-Bricht","Scherreuth","Scherstetten","Scherzheim","Sche\xDFlitz","Sche\xDFlitz-Demmelsdorf","Scheuer","Scheuerfeld","Scheuring","Schicherhof","Schieder","Schieder-Glash\xFCtte","Schieder-Schwalenberg","Schieder - Schwalenberg / Lothe","Schieder-Schwalenberg / Lothe","Schierensee","Schierke","Schierling","Schierstein","Schifdorf","Schiffdorf","Schifferstadt","Schiffweiler","Schilbach","Schilda","Schildau Gneisenaustadt","Schildow","Schillig","Schillingsf\xFCrst","Schillsdorf","Schiltach","Schiltberg","Schimberg","Schindelberg","Schindhard","Schinditz","Schinkel","Schinne","Schipkau","Schirgiswalde","Schirmitz","Schirnding","Schkeuditz","Schkeuditz OT Hayna","Schkeuditz-Radefeld","Schk\xF6len","Schk\xF6na","Schkopau","Schkopau OT Lochau","Schlacht","Schlachters","Schladen","Schlagsdorf","Schlaitz","Schlammersdorf","Schlangen","Schlangenbad","Schlangen-Oesterholz","Schlannau","Schlanze","Schlat","Schleching","Schlegel","Schlehdorf","Schleid","Schleiden","Schleiden-Gem\xFCnd","Schleiden-Wolfgarten","Schleife","Schleifreisen","Schleiz","Schleiz-Heinrichsruh","Schlepzig","Schlesen","Schleswig","Schletau","Schlettau","Schleusingen","Schleusingerneundorf","Schlich","Schlicht","Schlieben","Schlieckau","Schliengen","Schlier","Schlierbach","Schlierschied","Schliersee","Schliersee-Spitzingsee","Schlipr\xFCthen","Schlittenhart","Schlitz","Schlitzenhausen","Schlossberg","Schlo\xDFberg","Schlo\xDFborn","Schlo\xDF Hamborn","Schlosshof Burgcafe","Schloss Holte-Liemke","Schlo\xDF Holte-Sende","Schlo\xDF Holte-Stukenbrock","Schloss Neuhaus","Schlo\xDF Neuhaus","Schlo\xDFvippach","Schlotheim","Schluchsee","Schluchsee-Aha","Schluchsee/Ortsteil Aha","Schl\xFCchtern","Schl\xFCchtern-Herolz","Schl\xFCchtern-Hutten","Schlungwitz","Schlunzig","Schl\xFCsselfeld","Schmale Stra\xDFe","Schmalfeld","Schmalkalden","Schmalkalden-Mittelstille","Schmalkalden OT Asbach","Schmallenberg","Schmallenberg-Gleidorf","Schmalstede","Schmannewitz","Schmardau","Schmarsau","Schmelz","Schmerkendorf","Schmersau","Schmerz","Schmerzke","Schmidgaden","Schmidgaden-Rottendorf","Schmidham","Schmidm\xFChlen","Schmidt","Schmidtheim","Schmiedeberg","Schmiedefeld","Schmiedefeld am Rennsteig","Schmiedefeld \u2013 Am Rennsteig","Schmilau","Schmilka","Schmitten","Schmitten-Arnoldshain","Schmitten-Brombach","Schmitten-Treisberg","Schmitzingen","Schm\xF6lln","Schm\xF6lln OT Wei\xDFbach","Schmorda","Schmorkau","Schnackenburg","Schnaitsee","Schnaittach","Schnaittach-Hormersdorf","Schnaittenbach","Schnakenbek","Schnarup-Thumby","Schneeberg","Schneeberg OT Lindenau","Schnega","Schneidenbach","Schneiderkrug","Schneizlreuth","Schnelldorf","Schnellmannskreuth","Schneppenheim","Schnerzhofen","Schneverdingen","Schneverdingen-Heber","Schneverdingen-Hemsen","Schneveringen-Heber","Sch\xF6anich","Sch\xF6ffengrund","Sch\xF6fweg","Scholen","Sch\xF6llang","Sch\xF6llbronn","Sch\xF6llenbach","Schollene","Schollene-Ferchels","Sch\xF6llkrippen","Sch\xF6llnach","Sch\xF6mberg","Schonach","Sch\xF6naich","Sch\xF6nau","Sch\xF6nau a.K\xF6nigssee","Sch\xF6nau am K\xF6nigssee","Sch\xF6nau-Berzdorf","Sch\xF6nau- Geb\xFCg","Sch\xF6nbach","Sch\xF6nbek","Sch\xF6nberg","Sch\xF6nberg-Kalifornien","Sch\xF6nb\xF6ken","Sch\xF6nborn","Sch\xF6nbronn","Sch\xF6nbrunn","Sch\xF6nbrunn im Steigerwald","Sch\xF6ndelt","Schondorf","Sch\xF6nebeck","Sch\xF6nebeck (Elbe)","Sch\xF6nebeck-Elbenau","Sch\xF6nebeck OT Frohse","Sch\xF6nebeck OT Pl\xF6tzky","Sch\xF6neberg","Sch\xF6neck","Sch\xF6neck/Vogtl.","Sch\xF6neck Vogtland","Sch\xF6neck/Vogtland","Sch\xF6nefeld","Sch\xF6neiche bei Berlin","Sch\xF6nenbach","Sch\xF6nenberg-K\xFCbelberg","Sch\xF6nerlinde","Sch\xF6nesberg","Sch\xF6newalde","Sch\xF6newerda","Sch\xF6nfeld","Sch\xF6nfels","Sch\xF6nferchen","Schongau","Sch\xF6ngeising","Sch\xF6nhagen","Sch\xF6nhausen (Elbe)","Sch\xF6nheide","Sch\xF6nhorst","Sch\xF6ningen","Sch\xF6nkirchen","Sch\xF6nleiten","Sch\xF6nm\xFChle","Sch\xF6now","Sch\xF6nsee","Sch\xF6nstadt","Sch\xF6nstedt","Schonstett","Sch\xF6ntal","Sch\xF6nthal","Schonungen","Sch\xF6nwald","Sch\xF6nwalde","Sch\xF6nwalde-Glien","Sch\xF6nweide","Sch\xF6nwohld","Sch\xF6nw\xF6lkau","Schopfheim","Schopfheim-Gersbach","Schopfloch","Schopp","Sch\xF6ppenstedt","Sch\xF6ppenstedt-Eitzum","Sch\xF6ppingen","Sch\xF6ps","Sch\xF6pstal","Schorfheide","Schorndorf","Schornsheim","Schorssow","Schortens","Schortens/Ortsteil Roffhausen","Sch\xF6tmar","Schotten","Schozach","Schramberg","Schrampe","Schrecksbach","Schreyahn","Schriesheim","Schriesheim-Altenbach","Schrobenhausen","Schrobenhausen-Sandizell","Schrozberg","Schuby","Schubystrand","Schulenberg","Schulendorf","Schullwitz","Sch\xFClp","Sch\xFClperweide","Schulpforte","Schulpforte OT Naumburg","Schulzendorf","Sch\xFCrens\xF6hlen","Sch\xFCrsdorf","Schuttertal","Schuttertal-D\xF6rlinbach","Schuttertal-Schweighausen","Schutterwald","Sch\xFCttorf","Sch\xFCtzingen, Gemeinde Illingen","Schwaan","Schwabach","Schwabenheim","Schwabenheim an der Selz","Schwabhausen","Schw\xE4bisch Gm\xFCnd","Schw\xE4bisch Gm\xFCnd-Gro\xDFdeinbach","Schw\xE4bisch Hall","Schw\xE4bisch-Hall","Schw\xE4bisch Hall OT Gottwollshausen","Schwabm\xFChlhausen","Schwabm\xFCnchen","schwabsoien","Schwabsoien","Schwabstedt","Schwabstetten","Schwadenloch","Schwaf\xF6rden","Schwagstorf","Schwaig","Schwaig-Behringersdorf","Schwaigern","Schwaikheim","Schwalbach","Schwalbach am Taunus","Schwalbach-Elm","Schwalenberg","Schwalmstadt","Schwalmstadt-Treysa","Schwalmstadt-Ziegenhain","Schwalmtal","Schwalmtal-S","Schwalmtal-Storndorf","Schwanau","Schwandorf","Schwandorf - Wiefelsdorf","Schwanebeck","Schwanewede","Schwanewede-Brundorf","Schwaney","Schwanfeld","Schwangau","Schwansee","Schwanstetten","Schwarme","Schwarmstedt","Schwartbuck","Schwarz","Schwarza","Schwarzach","Schwarzach bei Nabburg","Schwarzbach","Schwarzburg","Schwarzen","Schwarzenbach","Schwarzenbach a.d.Saale","Schwarzenbach am Wald","Schwarzenbach an der Saale","Schwarzenbach a.Wald","Schwarzenbach/Saale","Schwarzenbek","Schwarzenberg","Schwarzenberg OT Crandorf","Schwarzenborn","Schwarzenbruck","Schwarzenfeld","Schwarzenholz","Schwarzhausen","Schwarzheide","Schwarzhofen","Schwebheim","Schwedeneck","Schwedt","Schwedt/Oder","Schwegenheim","Schweich","Schweigen-Rechtenbach","Schweighausen","Schweighofen","Schweinfurt","Schweinheim","Schweinkofen","Schweintal","Schweitenkirchen","Schweix","Schwelm","Schwendi","Schwenningen","Schwentinental","Schwentinetal","Schwepnitz","Schwerborn","Schwerin","Schweringen","Schwerin-Lankow","Schwerinsdorf","Schwerin-Wittenf\xF6rden","Schwerte","Schwerte-Westhofen","Schweskau","Schwetzingen","Schwichteler","Schwieberdingen","Schwielochsee","Schwielowsee","Schwielowsee OT Ferch","Schwielowsee/OT Ferch","Schwiepke","Schwifting","Schwindegg","Schwittersdorf","Schw\xFClper","Sebnitz","Sebnitz OT Sch\xF6nbach","Seboldshausen","Sechendorf","Sechendorfq","Seckach","Seckenheim","Seddin","Sedelsberg","Sedlbrunn","Seebach","Seebad Ahlbeck","Seebad Breege / Juliusruh","Seebad Heringdsdorf","Seebad Heringsdorf","Seebad Juliusruh","Seeben","Seebergen","Seeblick","Seebruck","Seeburg","Seedorf","Seefeld","Seefelder Au\xDFendeich","Seeg","Seegebiet Mansfelder Land","Seehausen","Seehausen (Altmark)","Seehausen a.Staffelsee","Seeheim","Seeheim-Jugenheim","Seeheim- Jugenheim","Seeheim-Jugenheim - Balkenhausen","Seeheim-Jungenheim","Seehof","Seelbach","Seelbach - Sch\xF6nberg","Seelitz","Seelow","Seelow (Mark)","Seelze","Seeon","Seeon / Seebruck","Seerau im Drawehn","Seerau in der Lucie","Seerhausen","Seesen","Seesen-Kirchberg","Seesen / Rh\xFCden","Seeshaupt","Seester","Seesterm\xFChe","Seevetal","Seevetal-Fleestedt","Seevetal-Maschen","Seevetal - Ramelsloh","Seevetla","Seewald","Seewald-Besenfeld","Seewald-Eisenbach","Segalen","Segeletz","Sehestedt","Sehlendorf","Sehmatal-Cranzahl","Sehmatal OT Sehma","Sehnde","Seibersdorf am Inn","Seidenbach","Seidenbuch","Seifersdorf","Seifertshofen","Seiffen","Seiffen OT Oberseiffenbach","Seifhennersdorf","Seisla","Selb","Selbitz","Selent","Selfkant","Selgetsweiler","Selhausen","Seligenstadt","Seligenstadt\u200E","Seligenstadt - Froschhausen","Selk","Sella","Sellin","Sellin / OT Seedorf","Sellin/R\xFCgen","Sellwanger","Selm","Selm-Bork","Selmsdorf","Selpin","Selsingen","Selters","Selters (Westerwald)","Selzen","Semlow","Semmenstedt","Sendelbach","Senden","Senden-B\xF6sensell","Sendenhorst","Senden-Ottmarsbocholt","Senftenberg","Senftenberg OT Gro\xDFkoschen","Senftenberg OT Niemtsch","Senheim","Sennelager","Sennestadt","Sennewitz","Sennfeld","Sensbachtal","Sensweiler","Sereetz","Serlbach","Sermuth","Serres","Sersheim","Se\xDFlach","Setterich","Seubersdorf i d OPf","Seubersdorf i.d.OPf.","Seugast","Seukendorf","Sevelten","Sewekow","Sexau","Seybothenreuth","Seybruch","Seyda","Seyde","Sgro\xDF-Bieberau","Sibbesse","Sichtigvor","Sickte","Sickte Neuerkerode","Siebeldingen","Siebenb\xE4umen","Siebenh\xF6fen","Siebigerode","Siebringhausen","Siedelsbrunn","Siedenburg","Siedlinghausen","Siegbach","Siegburg","Siegelbach","Siegelm\xFChle","Siegelsbach","Siegen","Siegenburg","Siegendorf","Siegen-Kaan-Marienborn","Siegersdorf","Siegertsbrunn","Siegertshofen","Siegsdorf","Siek","Sielbeck","Siele","Sielenbach","Sielmingen","Sien","Sienau","Sienhachenbach","Sierksdorf","Sierksrade","Siersdorf","Siershahn","Sieseby","Sietow","Sietow-Dorf","Sieversdorf","Sieversdorf-Hohenofen","Sievershagen","Sievershausen","Sieversh\xFCtten","Siggelkow","Siggenhofen","Sigmaringen","Sigmaringendorf","Sigmaringen-Laiz","Sigmarszell","Silberh\xFCtte","Silberstedt","Sillenstede","Simander","Simbach","Simbach am Inn","Simbach/Landau","Simmelsdorf","Simmelsdorf-Gro\xDFengsee","Simmelsdorf-Unterachtel","Simmerath","Simmerath-Paustenbach","Simmerath-Rurberg","Simmerath-Woffelsbach","Simmerberg","Simmern","Simmersfeld","Simmershausen","Simmershofen","Simmozheim","Simonswald","Sindeldorf","Sindelfingen","Sindelsdorf","Sindersdorf","Sindorf","Singen","Singenbach","Singen-Friedingen","Singen-Hausen","Singen (Hohentwiel)","Singen-\xDCberlingen","Singhofen","Singwitz","Sinn","Sinning","Sinntal","Sinntal-Jossa","Sinsheim","Sinsheim-Rohrbach","Sinsheim-Steinsfurt","Sinzheim","Sinzhein","Sinzig","Sinzig - Bad Bodendorf","Sinzig-L\xF6hndorf","Sipnitz","Sipplingen","Sittenbach","Sittensen","Sitterswald","Sitzendorf","Sitzenroda","S\u0142ubice","sny im Allg\xE4u","S\xF6chtenau","S\xF6cking","Soderstorf","Soest","S\xF6gel","Sohl","Sohland","Sohland am Rotstein","S\xF6hlbach","S\xF6hlde","Sohren","S\xF6hren","S\xF6hrewald","Solalinden","S\xF6lden","solingen","Solingen","Solingen-Burg","Sollach","Sollern","Sollstedt","Solms","Solms-Burgsolms","Solnhofen","Soltau","Soltendieck","Sommerach","Sommerau","S\xF6mmerda","Sommerfeld","Sommerhausen","Sommerland","Sommersdorf","Sommertshausen","Sonderhofen / S\xE4chsenheim","Sondern","Sondersfeld","Sondershausen","Sondershausen-Berka","Sonneberg","Sonneborn","Sonnefeld","Sonnefeld - Hassenberg","Sonnenb\xFChl","Sonnewalde","Sonsbeck","Sontheim","Sontheim an der Brenz","Sonthofen","Sonthofen-Imberg","Sontra","Sophienhof","S\xF6ren","Sorgbr\xFCck","S\xF6rgenloch","S\xF6rnewitz","Sornzig-Abla\xDF","S\xF6rup","Sosa","Sottrum","Soven","Soyen","Spahnharrenst\xE4tte","Spaichingen","spalt","Spalt","Spaltenstein","Spangdahlem","Spangenberg","Spantekow","Spardorf","Sparwiesen","Spatzenhausen - Hofheim","Spechbach","Speicher","Speichersdorf","Speichersdorf-Wirbenz","Speikern","Speinshart","Spelle","Spenge","Speyer","Spiegel","Spiegelau","Spiegelau - Langdorf","Spiegelberg","Spiegelberg-Jux","Spiekeroog","Spiesen-Elversberg","Spithal","Spitzingsee","Spornitz","Spotendorf","Spraitbach","Sprakensehl","Spranz","Spreckel","Spreda - Vechta","Spreenhagen","Spremberg","Sprendlingen","Springe","Sprockh\xF6vel","Sprockh\xF6vel-Ha\xDFlinghausen","Sprotta-Eilenburg","Spr\xF6tze","St\xE4below","St\xE4below OT Bliesekow","St\xE4below OT Wilsen","Stade","Stadecken-Elsheim","Stadelhofen","Stadensen","Stadland","Stadtallendorf","Stadtbergen","Stadtbergen-Leitershofen","Stadtfurth","Stadthagen","Stadtilm","Stadtlauringen","Stadtlengsfeld","Stadtlohn","Stadtoldendorf","Stadtprozelten","Stadtroda","Stadtsteinach","Stadt Usedom","Stadt Wehlen","Stafelhofen","Stafstedt","Stahnsdorf","Stahnsdorf OT G\xFCterfelde","Stahringen","Stakendorf","Stallwang","Stammbach","Stammham","Stammham am Inn","Stammheim","Stamsried","Standenb\xFChl","St. Andreasberg","Stangendorf","Stangenrod","Stapelfeld","Stappenbach","Stappenbeck","Starbach","Starnberg","Starsow","Starzach","Starzeln","Sta\xDFfurt","Sta\xDFfurt OT Hohenerxleben","St\xE4tzling","Stauchitz","Staudernheim","Staudt","Staufen","Staufenberg","St. Augustin","Staven","Stavenhagen","Stawedder","St\xE4zling","St Blasien","St.Blasien","St. Blasien","Stechlin","Stechlin-Dollgow","Stechow-Ferchesar","Steckborn","Stecklenberg","Stedden","Stederdorf","Stedesdorf","Stedtfeld","Steeg","Steenodde","Steffeln","Steffenberg","Stegaurach","Stegen","Stegen-Attental","St. Egidien","Steibis","Steimbke","Steimke","Stein","Steina","Steinach","Stein a.d.Traun","Steinalben","Stein am Rhein","Steinau","Steinau an der Stra\xDFe","Steinau-Ulmbach","Steinbach","Steinbach am Donnersberg","Steinbach am Glan","Steinbach am Wald","Steinbach a.Wald","Steinbach-Hallenberg","Steinbach (Taunus)","Steinbeck","Stein bei N\xFCrnberg","Steinberg","Steinberg am See","Steinbergkirche","Steinburg","Steine","Steinebach am W\xF6rthsee","Steinen","Steinenbr\xFCck","Steinfeld","Steinfeld (Oldenburg)","Steinfurt","Steinfurt-Borghorst","Steingaden","Steingriff","Steinhagen","Steinhagen-Brockhagen","Steinheid","Steinheim","Steinheim an der Murr","Steinheuterode","Steinh\xF6fel","Steinh\xF6ring","Steinhorst","Steinhude","Steinigtwolmsdorf","Steinkirchen","Steinmauern","Stein-Neukirch","Steinried","Steinsdorf","Steinsfeld","Steinthaleben","Steinweiler","Stei\xDFlingen","Stelle","Stellshagen","Stemwede","Stemwede-Dielingen","Stendal","St Englmar","Stephanskirchen","Stephansposching","Steppach","Sterley-Heide","Sternberg","Sternenfels","Sterup","Stetten","Stetten a.k.M.","Stetten am kalten Markt","Stetternich","Stettfeld","Steuden","Steutz","Steyerberg","St. Florian am Inn","St. Gangloff","St Georgen","St. Georgen","St. Goar","St. Goar - Biebernheim","St Goarshausen","St. Goarshausen","Stgt.-Bad Cannstadt","St. Heinrich","St. Helena","Stiefenhofen","Stierh\xF6fstetten","St. Ilgen","Stimpfach-Randenweiler","St Ingbert","St.Ingbert","St. Ingbert","Stintenburg","St Johann","St. Johann","St Johann-Bleichstetten","St. Johann-Lonsingen","St. Leon","St Leon-Rot","St. Leon-Rot","St M\xE4rgen","St. M\xE4rgen","St. Martin/Pfalz","St. Michaelisdonn","Stockach","Stockach-Hindelwangen","Stockach-Hoppetenzell","Stockdorf","Stockeldorf","Stockelsdorf","Stockheim","St\xF6ckigt","St\xF6ckse","Stocksee","Stockstadt","Stockstadt am Main","Stockstadt am Rhein","St\xF6ckte","St\xF6dtlen","Stoedtlen","Stoetze","St\xF6ffin","St\xF6fs","Stolberg","Stolberg-Breinig","Stolberg (Harz)","Stolberg (Rheinland)","Stollberg","Stollberg/Erzgebirge","Stolpe","Stolpe bei Anklam","Stolpe Dorf","Stolpen","Stolpen OT Helmsdorf","Stolteb\xFCll","Stoltenberg","Stolzenau","Stolzenau-Nendorf","St\xF6rdorf","Storkow","Storkow (Mark)","St\xF6\xDFen","St\xF6tten","St\xF6tten am Auerberg","Stotternheim","St. Ottilien","St\xF6ttwang","St\xF6ttwang-Thalhofen","Stotzard","St Peter","St.Peter-Ording","Straach","Straelen","Strahwalde","Stralendorf","Stralsund","Strande","Strasburg","Stra\xDF","Stra\xDFbach","Stra\xDFberg","Stra\xDFbessenbach","Stra\xDFenhaus","Strassenheim","Stra\xDFgr\xE4bchen","Stra\xDFkirchen","Stra\xDFlach","Stra\xDFlach-Dingharting","Straubenhardt","Straubing","Straufhain","Straupitz","Strausberg","Strau\xDFfurt","Streetz","Stregda","Strehla","Strehla OT Pau\xDFnitz","Streichm\xFChle","Streitberg","Strenglin","Streuben","Streufdorf","Striegistal","Strittberg","Str\xF6beck","Stroga","Str\xF6hen","Strohn","Stromberg","Strotzb\xFCsch","Strullendorf","Struppen","Str\xFCth","Struxdorf","Stubbe","Stubben","Stublang","Stuer","St\xFChlingen","Stuhr","Stuhr - Brinkum","Stuhr / Seckenhausen","Stulln","Stumpertenrod","Stupferich","St\xFCrza","Stutensee","Stutensee-Blankenloch","Stutensee-B\xFCchig","Stutensee - Staffort","Stutgart","stuttgart","Stuttgart","Stuttgart Bad Cannstatt","Stuttgart - Bad Cannstatt","Stuttgart-Bad Cannstatt","Stuttgart-Degerloch","Stuttgart Feuerbach","Stuttgart-Freiberg","Stuttgart-Heumaden","Stuttgart-M\xF6hringen","Stuttgart-M\xF6nchsfeld","Stuttgart-Ost","Stuttgart-Riedenberg","Stuttgart-Rohr","Stuttgart-Sillenbuch","Stuttgart-Uhlbach","Stuttgart-Untert\xFCrkheim","Stuttgart Vaihingen","Stuttgart-Weilimdorf","Stuttgart Zuffenhausen","St\xFCtzengr\xFCn","St\xFCtzengr\xFCn Lichtenau","St\xFCtzerbach","St\xFCtzing","St Wendel","St. Wendel","St. Wilhelm","Stzelbach","S\xFCchteln","S\xFCdbrookmerland","S\xFCddorf","S\xFCderau","S\xFCderbrarup","S\xFCderbraup","Suderburg","S\xFCderende","S\xFCderhastedt","S\xFCderheistedt","S\xFCderholz","S\xFCderl\xFCgum","Sudershausen","S\xFCderstapel","S\xFCdhemmern","S\xFCdkirchen","S\xFCdlohn","Sudrach","Sudwalde","Sufferloh","Sugenheim","Suhl","Suhlendorf","Sukow","S\xFClbeck","S\xFClfeld","Sulingen","S\xFClten","Sulz","Sulz am Neckar","Sulzbach","Sulzbach-Laufen","Sulzbach-Rosenberg","Sulzbach/Saar","Sulzbach (Saar)-Hirschbach","Sulzbach (Taunus)","Sulzberg","Sulzberg-K\xFChbach","Sulzberg-Rappolz","Sulzberg-Ruchis","Sulzberg-Wolfarts","S\xFClzb\xFChren","Sulzburg","Sulzb\xFCrg","Sulzdorf","Sulzemoos","S\xFClzetal","S\xFClzetal OT Dodendorf","S\xFClzetal - OT Langenweddingen","S\xFClzetal - OT Osterweddingen","Sulzfeld","S\xFClzfeld","Sulzfeld im Grabfeld","S\xFClzhayn","Sulzheim","S\xFCnching","Sundern","Sundern-Allendorf","Sundern - Enkhausen","Sundern - Langscheid","Sundern (Sauerland)","Sundern - Tiefenhagen","Sundhausen","Sundsacker","S\xFCnna","S\xFCnzhausen","S\xFCplingen","S\xFCpplingen","S\xFCptitz","Surwold","S\xFCsel","S\xFCseler Baum","S\xFCsel-Ottendorf","S\xFCssen","S\xFC\xDFen","Sustrum","Suthfeld","\u015Awiecko","Swisttal-Essig","Syke","Syke-Barrien","Syke-Okel","Sylbach","Sylt","Sylt-Ost","SZ-Salder","Taarstedt","Tabakried","Tabarz","Tabarz Th\xFCr Wald","Tacherting","Tacherting / Lengloh","Taching","Tading","T\xE4ferrot","T\xE4gerwilen","Tagmersheim","Taimering","Taisnach","Taiting","Talheim","Talkau","Taltitz","Tambach","Tambach-Dietharz","Tambach-Dietharz Th\xFCr Wald","Tamm","Tangeln","Tangerh\xFCtte","Tangerh\xFCtte OT Mahlpfuhl","Tangerm\xFCnde","Tangerm\xFCnde Ortsteil Storkau","Tangstedt","Tann","Tanna","Tanndorf","Tanne","Tannenberg","Tannenbergsthal","T\xE4nnesberg","Tannheim","Tann-Rh\xF6n","Tannweiler","Tantow","Tapfheim","Tappenbeck","Tarmitz","Tarnow","Tarp","Tarup","Tasdorf","Tastrup","Tating","Tauberbischofsheim","Taucha","Tauche","Tauche OT Ranzig","Tauer","Taufkichen","Taufkircen","Taufkirchen","Taufkirchen (Vils)","Taunusstein","Taunusstein-Wehen","Taura","Tautendorf","Tautenhain","Tawern","TE","Techau","Techelsdorf","Techelwitz","Tecklenburg","Tecklenburg-Leeden","Tegernau","Tegernbach","Tegernheim","Tegernsee","Teicha","Teichel","Teichlosen","Teichr\xF6da","Teichwolframsdorf","Teisendorf","Teisnach","Teistungen","Telgte","Telgte-Westbevern","Tellingstedt","Tellow","Teltow","Temmen","Temmen-Ringen","Temmen-Ringenwalde","Templin","Tengen","Tengen-Blumenfeld","Teningen","Tennenlohe","Tensb\xFCttel","Teplingen","Teschow","Tespe","Tessin","Tetenb\xFCll","Teterow","Tettau","Tettenwang","Tettenweis","Tettnang","Tetz","Teublitz","Teuchern","Teufelstein","Teupitz","Teuschnitz","Teutendorf","Teutschenthal","Teutschenthal/ Angersdorf","Teutschenthal OT Angersdorf","Tewswoos","Teyendorf","Thaining","Thal","Thale","Thaleischweiler-Fr\xF6schen","Thale, OT Neinstedt","Thalfang","Thalheim","Thallwitz","Thalmassing","Thalm\xE4ssing","Thalwenden","Thann","Thannhausen","Thansau","Thanstein","Tharandt","Thedinghausen","Thee\xDFen","Theilenhofen","Theilheim","Theisa","Theisseil","Thei\xDFen","Thei\xDFing","Thelkow","Themar","Theresienhof","Thermalbad Wiesenbad","Thermalbad Wiesenbad OT Neundorf","Thermalbad Wiesenbad OT Sch\xF6nfeld","Thermalbad Wiesenbad OT Wiesa","Thermalbad Wiesenbad-Wiesa","Theuma","Thiendorf","Thiendorf, L\xFCttichau-Anbau","Thierhaupten","Thiersee","Thiersheim","Thierstein","Thie\xDFen","Thiessow","Tholey","Tholey-Bergweiler","Tholey-Theley","Thomasburg","Thomsdorf","Thonhausen","Thonlohe","Thr\xE4nitz","Thuine","Th\xFCle","Th\xFClsfelde","Thum","Thum-Jahnsbach","Th\xFCmmlitzwalde","Th\xFCngen","Thunpadel","Thurau","Th\xFCrk","Th\xFCrkow","Thurm","Thurnau","Thyrnau","Tiddische","Tiefenbach","Tiefenbach-Schlo\xDFberg","Tiefenbronn","Tiefengruben","Tiefenort","Tiefenthal","Tiefthal","Tiefurt","Tiengen","Tilleda","Tillyschanz","Timmaspe","Timmdorf","Timmendorf","Timmendorfer Strand","Tinglev","Tinnerting","Tinnum","Tirschenreuth","Tiste","Titisee-Hinterzarten","Titisee-Neustadt","Titisee-Neustadt/Veltishof","Titmaringhausen","Titting","Tittling","Tittmoning","Titz","Titz-R\xF6dingen","Tobringen","Todenb\xFCttel","Todendorf","Todesfelde","Todtenweis","Todtmoos","Todtmoos-Au","Todtnau","Toftum","T\xF6ging","T\xF6ging am Inn","T\xF6ging (Inn)","T\xF6kendorf","Tolk","Tolstefanz","T\xF8nder","Tondorf","T\xF6nisvorst","Tonna","T\xF6nning","T\xF6pen","T\xF6pen/M\xF6dlareuth","Toppenstedt","Torfbr\xFCcke","Torfhaus","Torgau","Torgelow","Tornesch","Tossens","Tostedt","Tosterglope","T\xF6ttelst\xE4dt","Trabelsdorf","Traben Trarbach","Traben-Trarbach","Trabuhn","Trages","Train-Sankt Johann","Trais","Traisa","Traisen","Traitsching","Traitsching / Birnbrunn","Tramm","Trams","Trappenkamp","Trappstadt","Trasadingen","Trassenheide","Traunreut","Traunstein","Traunstein-Thannreit","Traunwalchen","Trauseneck","Trausnitz","Trautskirchen","Travem\xFCnde","Travenbr\xFCck","Traventhal","Trebbin","Trebbin-Klein Schulzendorf","Trebbin/ OT Klein Schulzendorf","Trebel","Trebelshain","Trebendorf","Treben-Serbitz","Trebgast","Trebnitz","Trebsen","Trebsen Mulde","Trebur","Trechtingshausen","Treffentrill","Treffurt","Treia","Treinfeld","Treis","Treis-Karden","Trendelburg","Trendelburg-Sielen","Trennewurth","Trennfurt","Trensahl","Trent","Treppendorf","Treseburg","Trettendorf","Treuchtlingen","Treuchtlinger Stra\xDFe","Treuen","Treuenbrietzen","Treufeld","Triberg","Tribsees","Trieb","Triebel","Triebes","Triebischtahl OT Groitsch","Triebischtahl OT Rothsch\xF6nberg","Triebischtahl OT Seeligstadt","Triebischtal","Triebischtal OT Burkhardswalde","Triebischtal OT Groitzsch","Triebischtal OT Perne","Triebischtal OT Schmiedewalde","Triebischtal OT Tanneberg","Triebischtal - OT Tanneberg","Triefenstein","Triefenstein-Rettersheim","Trienz","Trier","Trier-Eitelsbach","Trier-Filsch","Trier Irsch","Trier-Olewig","Trier-Pfalzel","Trier-Quint","Trier-Ruwer","Trier-Tarforst","Trier-Zewen","Triftern","Tringenstein","Trinkhalle Kutscher","Trinwillershagen","Tripkau","Trippstadt","Triptis","Triptis-Oberp\xF6llnitz","Triptis-Ottmannsdorf","Trittau","Trittenheim","Tr\xF6bsdorf","Trochtelfingen","Trockau","Trockenborn","Trockener Kamp","Troisdorf","Troisdorf-Altenrath","Troisdorf-Eschmar","Troisdorf-Friedrich-Wilhelms-H\xFCtte","Troisdorf-Kriegsdorf","Troisdorf-Mitte","Troisdorf-Oberlar","Troisdorf-Rotter See","Troisdorf-Sieglar","Troisdorf-Spich","Troisdorf-West","Trollenhagen","Tr\xF6ndel","Trosdorf","Trossin","Trossingen","Trostberg","Tr\xFCgleben","Trulben","Trusetal","Tschernitz","T\xFCbingen","T\xFCbingen-Hagelloch","T\xFCbingen-Unterjesingen","Tucheim","T\xFCddern","T\xFClau","Tumichingen","Tuningen","Tuntenhausen","T\xFCrkenfeld","T\xFCrkheim","Turloff","Turnow","Tussenhausen","Tussenhausen-Mattsies","T\xFCssling","T\xFC\xDFling","Tutow","T\xFCtschengereuth","T\xFCttendorf","T\xFCttleben","Tuttlingen","Tuttlingen-M\xF6hringen","Tutzing","Twedt","Twist","Twistetal","Twist / Neuringe","Twistringen","Twist (Sch\xF6ninghsdorf)","Tylsen","(type value here)","\xDCbach-Palenberg","\xDCberacker","\xDCberherrn","\xDCberlinen","\xDCberlingen","\xDCberlingen-Bonndorf","\xDCberlingen-Deisendorf","\xDCberlingen-Nu\xDFdorf","\xDCberlingen/Nu\xDFdorf","\xDCbersee","\xDCbersee-Feldwies","Ubstadt-Weiher","Uchte","Uchtelfangen","\xDCchtelhausen","\xDCchtelhausen Zell","Uckerfelde","\xDCckeritz","Uckerland","Uder","\xDCdersdorf","Udersleben","Udestedt","Uebigau","Uebigau OT M\xFCnchen","Ueckerm\xFCnde","Ueckerm\xFCnde OT Bellin","Uedem","Uelsen","Uelzen","Uengershausen","Uersfeld","Uetersen","Uettingen","Uetze","Uetze-H\xE4nigsen","Uffenheim","Uffing","Uffing am Staffelsee","Uhingen","Uhingen-Holzhausen","Uhldingen","Uhldingen-Muehlhofen","Uhldingen-M\xFChlhofen","\xDChlingen","\xDChlingen-Birkendorf","Uhlsdorf","Uhlst\xE4dt-Kirchhasel","Uhsmannsdorf","Uhyst","Ulla","Ullersdorf","Ullstadt","Ulm","Ulm/Donautal","Ulmen","Ulm/Eselsberg","Ulm-Seligweile","Ulm-Wiblingen","Ulrichshorst","Ulrichshusen","Ulrichstein","Ulsnis","Ulstrupfeld","Umkirch","Ummanz","Ummanz-Haide","Ummanz-Waase","Ummendorf","Umpferstedt","undefined","Undeloh","Ungerhausen","Unholzing","Unkel","Unna","Unseburg","Unset","Unsleben","Unstruttal","Unteraichen","Unterammergau","Unteraurach","Unterbach","Unterbachern","Unterberken","Unterbernbach","Unterbiberg","Unterbrunnenreuth","Unterbuchen","Unterdarching","Unterdie\xDFen","Unterdietfurt","Unterdolling","Unteregg","Untereisesheim","Unterempfenbach","Unterensingen","Untereuerheim","Unterf\xF6hring","Untergermaringen","Unterg\xF6hren","Untergriesbach","Untergrombach","Untergr\xF6ningen","Untergruppenbach","Unterhaching","Unter-Hambach","Unterhaugstett","Unterhausbach","Unterhausen","Unterheinriet","Unterheising","Unterheum\xF6dern","Unterhitzling","Unterhomberg","Unterilzm\xFChle","Unterjettingen","Unterjttingen","Unterkirnach","Unterklausen","Unterkn\xF6ringen","Unterkochen","Unterlauterbach","Unterl\xFC\xDF","Untermaiselstein","Untermeitingen","Untermerzbach","Untermettingen","Unterm\xFCnkheim","Unternbibert","Unterneuhausen","Unterneukirchen","Unterneuses","Unter\xF6wisheim","Unterpleichfeld","Unterreichenbach","Unterreit","Unterreith","Unterreute","Unterriexingen","Unterrot","Unterschalkenbach","<unterschiedlich>","Unterschleissheim","Unterschlei\xDFheim","Unterschlei\xDFheim-Lohhof","Unterschneidheim","Unterschneitbach","Unterschwaningen","Unterschwarzach","Untersdorf","Untersiemau","Unterspreewald","Unterthingau","Untert\xFCrkheim","Unterwattenbach","Unterwei\xDFbach","Unterwei\xDFenbach","Unterwellenborn","Unterwirbach","Unterwittelsbach","Unterw\xF6ssen","Unterw\xFCrschnitz","Untrasried","Upahl","Upgant-Schott","Uplengen","Uplengen - Gro\xDFoldendorf","Uplengen - Gro\xDFsander","Uplengen - J\xFCbberde","Uplengen - Klein-Hollen","Uplengen - Kleinoldendorf","Uplengen - Meinersfehn","Uplengen - Neudorf","Uplengen - Neufirrel","Uplengen - Nordgeorgsfehn","Uplengen - Ockenhausen","Uplengen - Remels","Uplengen-Remels","Uplengen - Selverde","Uplengen - Stapel","Uplengen - Stapelermoor","Uplengen - S\xFCdgeorgsfehn","Urbach","Urbar","Urexweiler","Urlhofen","Urloffen","Urmitz","Urnau","Urnshausen","Ursberg","Ursensollen","Urspringen","Ursprung","Urwies","\xDCrzig","Usedom","User defined","Usingen","Uslar","Utecht","Utersum","Uthm\xF6den","Uttenreuth","Uttenreuth-Weiher","Uttenreuth, Weiher","Uttenweiler","Uttewalde","Utting","Utzenfeld","Vaals","Vacha","Vahlhausen","Vaihingen","Vaihingen an der Enz","Vaihingen an der Enz - Ensingen","Vaihingen an der Enz - Horrheim","Vaihingen an der Enz - Kleinglattbach","Vaihingen Enz","Vaihingen (Enz)","Vaihingen/Enz","Vaihingen(Enz)","Vaihingen/Enz-Ensingen","Vaihingen/Enz-Horrheim","Vaihingen/Enz-Ro\xDFwag","Vaihingen G\xFCndelbach","Vaihingen-Horrheim","Vaihingen-Kleinglattbach","Vaihingen-Riet","Vaihingen - Rosswag","Valepp","Vallendar","Valley","Valley/Kreuzstra\xDFe","Varel","Varel - Jethausermoor","Varel - Streek","Varnsdorf","Varrel","Vaterstetten","Vechelde","Vechta","Vechta-Oythe","Vechtel","Vegesack","Veilsdorf","Veinau","Veitsbronn","Veitsh\xF6chheim","Vejprty","Velbert","Velbert-Neviges","Velbert-T\xF6nisheide","Velburg","Velburg-Lengenfeld","Velden","Veldrom","Velen","Velen-Ramsdorf","Velgast","Vellahn","Vellern","Vellmar","Velpe","Velpke","Velten","Venningen","Ventschow","Venusberg","Verchen","Verden","Verden (Aller)","Verden-Eitze","Verden/Eitze","Veringenstadt","Verl","Verlar","Verl-Bornholte","Verne","Versbach","Versmold","Versmold-Hesselteich","Vestenbergsgreuth","Vestrup","Vetschau / Spreewald","Vetschau/Spreewald","Vetschau / Spreewald OT Flei\xDFdorf","Vetschau/ Spreewald OT M\xE4rkischheide","Vetschau / Spreewald OT Naundorf","Vetschau / Spreewald OT Suschow","Vettelhoven","Vettlehoven","Vettwei\xDF","Vettwei\xDF-Jakobw\xFCllesheim","Vetzberg","Vichtenstein","Viechtach","Viecht, Eching","Viehhofen","Vielank","Vielau","Vienenburg","Viereck","Viereth-Trunstadt","Vierheim","Vierkirchen","Viernau","Viernheim","Viersen","Viersen-D\xFClken","Viersen-S\xFCchteln","Vieselbach","Viesen","Vilgertshofen","Villenbach","Villingen","Villingen-Schwenningen","Villmar","Vils","Vilsbiburg","Vilseck","Vilsheim","Vilshofen","Vilz","Vinningen","Vi\xF6l","Vippachedelhausen","Virneburg","Visbek","Visselh\xF6vede","Vitte","Vitte/Hiddensee","Vitzenburg","Vitzke","Vlotho","Voctorbur","Voerde","Voerde-Gewerbegebiet Grenzstra\xDFe","Voerde (Niederrhein)","Vogelsang-Gommern","Vogelsdorf","V\xF6gelsen","Vogtareuth","Vogtland","Vogtsburg","Vohburg","Vohburg an der Donau","Vohenstrau\xDF","V\xF6hl","V\xF6hl-Asel-S\xFCd","V\xF6hl-Herzhausen","V\xF6hrenbach","V\xF6hringen","Voigtsdorf","Voigtstedt","Voiswinkel","Voitze","Volkach","Volkach - Fahr","Volkenschwand","Volkersdorf","V\xF6lkershain","Volkertshausen","Volkfien","V\xF6lklingen","V\xF6lklingen-Ludweiler","Volkmarsen","Volkmarst","V\xF6lksen","Vollb\xFCttel","Vollersrode","Vollmersdorf","Vollmersweiler","Vollnkirchen","Vollrathsruhe","V\xF6lpke","Volsemenhusen","Voltlage","Volzel","Volzendorf","Volzum","Vomp","Vorbach","V\xF6rden","Vorderhelmhof","Vorderhindelang","Vorderri\xDF","Vorderweidenthal","Vorhelm-T\xF6nnish\xE4uschen","Vorra","Vorrade","V\xF6rstenmoor","V\xF6rstetten","Vorweden","Vossenack","Vreden","Vterstetten","Waabs","Waake","Waakirchen","Waal","Waase","Wabern","Wachau","Wachenbuchen","Wachenheim","Wachenroth","Wacholderbusch","Wachsenburggemeinde","Wachtberg","Wachtendonk","W\xE4chtersbach","W\xE4chtersbach-Aufenau","Wacken","Wackernheim","Wackersberg","Wackersdorf","Waddewarden","Waddeweitz","Waddeweitz / OT Gohlau","Wadern","Wadern-B\xFCschfeld","Wadersloh","Wadgassen","Waffensen","Wagenfeld","Wagenfeld-Str\xF6hen","Wagenhofen","Wagenhoff","Waggum","Wagh\xE4usel","Wagh\xE4usel - Wiesental","Waging","Waging am See","Waging a.S.","Waging a.S","Wahle","Wahlhausen","Wahlitz","Wahlsdorf","Wahlstedt","Wahlstorf","Wahlweiler","Wahlwies","Wahnsdorf","Wahren","Wahrenbr\xFCck","Wahrenholz","Waiblingen","Waiblingen-Hegnach","Waibstadt","Waidhaus","Waischenfeld","Waitzdorf","Waizendorf","Wakendorf II","Walbeck","Walchensee","Walchow","Walchshofen","Walchum","Wald","Waldachtal","Waldaschaff","Waldb\xF6ckelheim","Waldbreitbach","Waldbr\xF6l","Waldbr\xF6l - Escherhof","Waldbronn","Waldbrunn","Waldbrunn/Waldkatzenbach","Waldbuettelbrunn","Waldburg","Waldb\xFCttelbrunn","Walddorfh\xE4slach","Waldeck","Waldems","Waldems - Esch","Waldenbuch","Waldenburg","Walderbach","Waldershof","Waldfeucht","Waldfischbach-Burgalben","W\xE4ldgen","Waldh\xE4user","Waldheim","Waldhufen","Waldhufen, OT J\xE4nkendorf","Waldkappel","Waldkirch","Waldkirchen","Waldk\xF6nigen","Waldkraiburg","Waldlaubersheim","Waldmatt","Wald-Michelbach","Waldmohr","Waldm\xFCnchen","Waldrach","Waldsassen","Waldsassen-M\xFCnchenreuth","Waldsee","Waldshut","Waldshut-Tiengen","Waldsieversdorf","Waldsolms","Waldstetten","Waldthurn","Walheim","Walkendorf","Walkenried","Walkertshofen","Wallau","Walldorf","Walld\xFCrn","Walld\xFCrn-Rippberg","Walle","Wallenborn","Wallenfels","Wallenhorst","Wallenhorst-Lechtingen","Wallenhorst/Lechtingen","Wallerfangen","Wallerfing","Wallersdorf","Wallersheim","Wallerstein","Wallhalben","Wallhausen","Wallmerod","Wallroda","Wallroth","Wallsb\xFCll","Wallstawe","Walluf","Walow","Walporzheim","Wals","Walsdorf","Walshut-Tiengen","Walsleben","Walsrode","Waltenhausen","Waltenhofen","Walterhausen","Waltersdorf","Waltershausen","Walting","waltrop","Waltrop","Walzbachtal","Walzbachtal-W\xF6ssingen","Wandersleben","Wanderup","Wandlitz","Wandlitz-Zerpenschleuse","Wanfried","Wangelnstedt","Wangels","Wangen","WAngen","Wangen im Allg\xE4u","Wangerland","Wangerland - Elisabethgroden","Wangerland - Friedrich-Augustengroden","Wangerland-Hohenkirchen","Wangerland Horumersiel","Wangerland - Neu Augustengroden","Wangerooge","Wanh\xF6den","Wankendorf","Wankum","Wanna","Wannbach","Wannweil","Wanzer","Wanzleben","Warberg","Warbsen","Warburg","Warburg-Germete","Warburg-Menne","Warburg-Ossendorf","Warburg-Rimbeck","Wardenburg","Wardenburg-Oberlethe","Warder","Wardow","Wardow OT Goritz","Waren","Warendorf","Waren M\xFCritz","Waren (M\xFCritz)","Wargolshausen","Warin","Warmbronn","Warmensteinach","Warmsen","Warnem\xFCnde","Warnem\xFCnden-Diedrichshagen","Warngau","Warnsdorf","Warpe","Warrenzin","Warschauer Stra\xDFe","warstein","Warstein","Warstein - Allagen","Warstein-Belecke","Warstein-Hirschberg","Wart","Wartenberg","Wartenberg-Rohrbach","Wartendorf","Wartha","Warthausen","Wartmannsroth","Warwerort","Warza","Wasbek","W\xE4schenbeuren","Wasdow","Wasewitz","Wassenberg","Wasserburg","Wasserburg am Bodensee","Wasserburg am Inn","Wasserburg/Inn","Wasserleben","Wasserliesch","Wasserlosen","Wasserlosen-Brebersdorf","Wassertr\xFCdingen","Wasserzell","Wasungen","Waterneversdorf","Wathlingen","Wattenbek","Wattendorf","Wattenheim","Wattenscheid","Watzdorf","Waxweiler","Weberh\xE4usl","Weberstedt","Wechselburg","Weddel","Weddelbrook","Wedderstedt","Weddingstedt","wedel","Wedel","Wedemark","Wedemark-Berkhof","Wedendorf","Weener","Wees","Weeze","Wefensleben","Weferlingen","Wega","Wegberg","Wegeberg","Wegeleben","Wegenstedt","Wegscheid","Wehingen","Wehldorf","Wehlen","Wehr","Wehrbleck","Wehrda","Wehretal","Wehretal-Hoheneiche","Wehretal-Reichensachsen","Wehrheim","Wehringen","Wehrsdorf","Weibern","Weibersbrunn","Weichendorf","Weichenried","Weichshofen","Weickartshain","Weickelsdorf- Droy\xDFig","Weida","Weiden","Weidenau","Weidenbach","Weidenberg","Weiden i.d. Oberpfalz","Weiden i.d.Opf","Weiden i. d. Opf","Weiden i.d.OPf.","Weiden i.d.OPf","Weiden i.d. OPf.","Weiden in der Oberpfalz","Weidensees","Weidenthal","Weidenwang","Weiersbach","Weifa","Weigendorf","Weigensdorf","Weigmannsdorf","Weihenzell","Weihenzell-Neum\xFChle","Weiher","Weiherbreite","Weiherfeld","Weiherhammer","Weihmichl","Weikersheim","Weil","Weilach","Weil am Rhein","Weil am Rhein - Haltingen","Weilar","Weilbach","Weilburg","Weilburg a. d. Lahn (OT Kubach)","Weil der Stadt","Weil der Stadt - Merklingen","Weiler","Weilerbach","Weiler Simmerberg","Weiler-Simmerberg","Weilerstoffel","Weilerswist","Weilerswist-Schwarzmaar","Weilheim","Weilheim an der Teck","Weilheim in Oberbayern","Weilheim unter Teck","Weilimdorf","Weil im Sch\xF6nbuch","Weilm\xFCnster","Weilrod","Weil/Schwabhausen","Weimar","Weimar-Germershausen","Weimar (Lahn)","Wein\xE4hr","Weinbach","Weinbergen","Weinb\xF6hla","Weingarten","Weinheim","Weinheim-Hohensachsen","Weinheim-L\xFCtzelsachsen","Weinheim-Rippenweier","Weinsberg","Weinsheim","Weinstadt","Weinstadt-Beutelsbach","Weinstadt-Endersbach","Weinstadt-Str\xFCmpfelbach","Weinzierlein","Weipelsdorf","Weischlitz","Weisel","Weisenbach","Weisendorf","Weiskirchen","Weismain","Weissach","Wei\xDFach","Weissach-Flacht","Weissach im Tal","Wei\xDFandt-G\xF6lzau","Wei\xDFenbach","Wei\xDFenberg","Wei\xDFenborn","Wei\xDFenborn/Erzgeb","Wei\xDFenborn-L\xFCderode","Wei\xDFenbrunn","Wei\xDFenburg","Wei\xDFenburg in Bayern","Weissenfeld","Wei\xDFenfeld","Weissenfels","Wei\xDFenfels","Weissenh\xE4user Strand","Wei\xDFenhorn","Weissenhorn (Unterreichenbach)","Wei\xDFenohe","Wei\xDFensberg","Wei\xDFensee","Wei\xDFenseifen","Wei\xDFenstadt","Wei\xDFenstein","Wei\xDFenthurm","Wei\xDFig","Wei\xDFig (O\xDFling)","Wei\xDFling","Wei\xDFwasser","Wei\xDFwasser/Oberlausitz","Wei\xDFwasser/O.L.","Weistropp","Weisweil","Weitenhagen","Weitenung","Weitersburg","Weiterstadt","Weiterstadt-Braunshardt","weitnau","Weitnau","Weitramsdorf","Weitsche","Weixdorf","Welbhausen","Welbrechts","Welden","Welldorf","Welldorf-Serrest","Welle","Wellen","Wellendorf","Wellheim","Wellheim-Konstein","Welschbillig","Welschensteinach","Welschneudorf","Welsleben","Welt","Welver","Welver-Eilmsen","Welxande","Welzheim","Welzow","Wemding","Wendeburg","Wendefurth","Wendelsheim","Wendelstein","Wenden","Wendfeld","Wendgr\xE4ben","Wendhausen","Wendisch Evern","Wendisch Rietz","Wendlingen","Wendlingen am Neckar","Wendorf","Wendtorf","Weng","Wenigenlupnitz","Wenings","Wennerstorf","Wennigsen","Wennigsen/Bredenbeck","Wennigsen Deister","Wennigsen (Deister)","Wenningstedt","Wenningstedt-Braderup","Wenningstedt/Sylt","Wenschdorf","Wense","Wensickendorf","Wensin","Wental","Wentorf","Wentorf bei Hamburg","Wenzenbach","Werbach","Werbellin-Buckowsee","Werben","Werben (Elbe)","Werben OT R\xE4bel","Werbig","Werdau","Werdau-Leubnitz","Werder","Werder-Derwitz","Werder (Havel)","Werder(Havel)","Werder (Havel) OT Glindow","Werder (Havel) OT Petzow","Werdohl","Werl","Werlitzsch","Werlte","Wermelskirchen","Wermelskirchen-Dabringhausen","Wermsdorf","Wermsdorf-Calbitz","Wernau","Wernberg-K\xF6blitz","Wernburg","Werne","Werneck","Werneuchen","Wernigeorde","Wernigerode","Wernigerode OT Reddeber","Wernsdorf","Wernshausen","Weroth","Wershofen","Wertach","Werth","Wertheim","Wertheim-Bestenheid","Werther","Werther b. Nordhausen","Werther (Westfalen)","Wertingen","Weseke","Wesel","Wesel-Bislich","Weseloh","Wesenberg","Wesenbergerheide","Wesendorf","Wesselburen","Wesselburener Deichhausen","Wesselburenerkoog","Wesseling","Wesseln","Wessiszell","We\xDFling","We\xDFling / Oberpfaffenhofen","Wessobrunn","Westbevern","Westendorf","Westenholz","Westensee","Westerau","Westerbeck","Westerburg","Westerb\xFCttel","Westerdeichstrich","Westerhausen","Westerheim","Westerhever","Westerholt","Westerholz","Westerhorn","Westerkappeln","Westerkappeln Ortfeld","Westerkappeln Velpe","Westerkapplen-Velpe","Westerland","Westerland/Sylt","Westermoor","Wester-Ohrstedt","Westerr\xF6nfeld","Westerstede","Westerstede - Burgforde","Westerstede - Eggeloge","Westerstede - Halsbek","Westerstede - Halstrup","Westerstede - Hollriede","Westerstede - Hollwege","Westerstede - Linswege","Westerstede - Moorburg","Westerstede-Moorburg","Westerstede - Neuengland","Westerstetten","Westerweyhe","Westewitz","Westhausen","Westheim","Westhofen","Westkilver","Westoverledingen","Westoverledingen-Ihrhove","Wetschen","Wettelsheim","Wettenberg","Wettenberg-Krofdorf-Gleiberg","Wettenhofen","Wetter","Wetterfeld","Wetter (Hessen)","Wetterling","Wetter (Ruhr)","Wettin","Wettlkam","Wettmershagen","Wettringen","Wettrup","Wettsaasen","Wettstetten","Wetzen","Wetzendorf","Wetzlar","Wetzlar-Dalheim","Wetzlar-Dutenhofen","Wetzlar-M\xFCnchholzhausen","Wetzlar-Naunheim","Wewelsburg","Wewelsfleth","Wewer","Weyarn","Weyerbusch","Weyhausen","Weyhe","Weyhe-Dreye","Weyhe-Erichshof","Wheimar-S\xFC\xDFenborn","Wh\xF6rden","Wibbese","Wiblingen","Wickede","Wickede-Echthausen","Wickede (Ruhr)","Wickers","Wieblingen","Wieck","Wieck am Dar\xDF","Wieck Darss","Wieda","Wiedemar","Wieden","Wiedenbr\xFCgge","Wiedensahl","Wiederau","Wiednitz","Wiefelstede","Wiefelstede - Bokel","Wiefelstede - Borbeck","Wiefelstede - Borbeckerfeld","Wiefelstede - Conneforde","Wiefelstede - Dringenburg","Wiefelstede - Gristede","Wiefelstede - Heidkamp","Wiefelstede - Lehe","Wiefelstede -Metjendorf","Wiefelstede - Metjendorf","Wiefelstede / Metjendorf","Wiefelstede - Neuenkruge","Wiefelstede - Ofenerfeld","Wiefelstede - Spohle","Wiefelstede - Wehnerfeld","Wiefelstede - Westerholtsfelde","Wiegendorf","Wiehe","Wiehl","Wiek","Wielen","Wielenbach","Wiemersdorf","Wienhausen","Wienrode","Wieren","Wiernsheim","Wiesa","Wiesau","Wiesbaden","Wiesbaden (Biebrich)","Wiesbaden-Biebrich","Wiesbaden-Breckenheim","Wiesbaden-Erbenheim","Wiesbaden-Frauenstein","Wiesbaden - Kloppenheim","Wiesbaden-Kloppenheim","Wiesbaden-Schierstein","Wiesemscheid","Wiesen","Wiesenau","Wiesenbach","Wiesenbronn","Wiesenburg","Wiesenburg/Mark","Wieseneck","Wiesenfeld","Wiesenfelden","Wiesengiech","Wiesengrund","Wiesensteig","Wiesent","Wiesental","Wiesenthau","Wiesentheid","Wiesenttal","Wieshof","Wiesloch","Wiesmoor","Wietmarschen","Wietow","Wietze","Wietzen","Wietzendorf","Wiggensbach","Wilberhofen","Wilburgstetten","Wildau","Wildberg","Wildberg-Effringen","Wildberg-Sch\xF6nbronn","Wildeck","Wildemann","Wildenau","Wildenfels","Wildenhorst","Wildenstein","Wildeshausen","Wildflecken","Wildpoldsried","Wildsch\xFCtz","Wilgartswiesen","Wilhelmsdorf","Wilhelmsdorf-Pfrungen","Wilhelmsfeld","Wilhelmshavem","Wilhelmshaven","WILHELMSHAVEN","Wilhelmshaven-Voslapp","Wilhelmsthal","Wilhermsdorf","Wiligrad","Wilischthal","Wilkenburg","Willanzheim","Willebadessen","Willich","Willich-Anrath","Willingen","Willingen-Usseln","Willingen/Westerwald","Willingrade","Willingshausen","Willmsfeld","Willofs","Willst\xE4tt","Wilmersdorf","Wilmsdorf","Wilmshausen","Wilnsdorf","Wilnsdorf-Niederdielfen","Wilnsdorf-Obersdorf","Wilnsdorf-R\xF6dgen","Wilnsdort","Wilschdorf","Wilsdruff","Wilsen","Wilsenroth","Wilstedt","Wilster","Wilsum","Wilthen","Wimsheim","Windach","Windberg","Windbergen","Windeck","Windeck-Au","Windeck-Dattenfeld","Windeck-Mauel","Windeck-Rosbach","Winden am Aign","Windenreute","Windesheim","Windhof","Windischenbach","Windischeschenbach","Windischhausen","Windischholzhausen","Windischleuba","Windorf","Windsbach","Wingst","Winh\xF6ring","Winkeldorf","Winkelhaid","Winkeln","Winkelsett","Winkl","Winklarn","Winn","Winnekendonk","Winnen","Winnenden","Winningen","Winnweiler","Winsen","Winsen Aller","Winsen (Aller)","Winsen (Luhe)","Winsen OT La\xDFr\xF6nne","Winterbach","Winterberg","Winterberg-Elkeringhausen","Winterberg-Mollseifen","Winterberg-Niedersfeld","Winterhausen","Winterkasten","Winterlingen","Wintersdorf","Winterspelt","Winterstein","Winterweyhe","Winzerhausen","Wipfeld","Wipfratal","Wipperdorf","Wipperf\xFCrth","Wipperf\xFCrth-H\xE4mmern","Wippingen","Wippra","Wirdum","Wirges","Wirsberg","Wisch","Wischhafen","Wismar","Wissel","Wissen","Wi\xDFgoldingen","Wissinghausen","Wistedt","Wittd\xFCn","Wittd\xFCn auf Amrum","Wittelshofen","Witten","Wittenbeck","Wittenberg","Wittenberge","Wittenberge OT Garsedow","Wittenberge OT Hinzdorf","Wittenberger Passau","Wittenberg, Lutherstadt","Wittenburg","Wittenf\xF6rden","Wittenhagen","Witterda","Witterschlick","Wittgendorf","Wittgensdorf","Wittibreut","Wittichenau","Wittichenau-Keula","Wittichenau OT Maukendorf","Wittighausen","Wittingen","Wittislingen","Wittlich","Wittmar","Wittmoldt","Wittmund","Wittmund-Webershausen","Wittnau","Wittorf","Wittstock/Dosse","Witzeeze","Witzenhausen","Witzighausen","Witzin","Witzwort","W\xF6bbelin","Wobbenb\xFCllfeld","Wocklum","Woffleben","Wohlbach","Wohlenberg","Wohlsdorf","W\xF6hlsdorf","Wohmbrechts","Wohnfeld","W\xF6hningen","W\xF6hningen, Dumme","Wohnsgehaig","Wohra","Wohratal","W\xF6hrden","Wokrent","Wokuhl-Dabelow","Wolbeck, M\xFCnster","Woldegk","Wolfach","Wolfach-Kirnbach","Wolfegg","Wolfegg-Alttann","Wolfen","Wolfenb\xFCttel","Wolfenb\xFCttel-Halchter","W\xF6lfersheim","Wolfertschwenden","Wolfhagen","Wolflier","Wolframs-Eschenbach","Wolfratshausen","Wolfsbehringen","Wolfsberg","Wolfsburg","Wolfsburg/Nordsteimke","Wolfsburg-Unkeroda","Wolfsburg-Waldhof","Wolfschlugen","Wolfsdorf","Wolfsgrund","Wolfshagen","Wolfsricht","Wolfstein","Wolgast","Wolkau","Wolkenstein","Wolkering","Wolkersdorf","Wolkersfelden","Wolkramshausen","Wollenberg","Wollin","W\xF6llnau","W\xF6llstadt","W\xF6llstein","Wolmersdorf","Wolmirstedt","Wolnzach","Wolpertstetten","Wolpertswende","W\xF6lsendorf","Wolsfeld","Woltersdorf","Wonfurt","Wonneberg","Wonsees","Woppenroth","Worbis","Woringen","W\xF6rlitz","W\xF6rme","Wormersdorf","Worms","Wormstedt","W\xF6rnitz","Worpswede","W\xF6rrstadt","W\xF6rschweiler","W\xF6rth","W\xF6rth a.Main","W\xF6rth a. Main","W\xF6rth am Main","W\xF6rth am Rhein","W\xF6rth an der Donau","W\xF6rth an der Isar","W\xF6rth-Maximiliansau","W\xF6rthsee","W\xF6ssingen","Wotenick","W\xF6tz","Wredenhagen","Wreechen/R\xFCgen","Wremen","Wrestedt","Wriedel","Wriezen","Wriezen OT Altwriezen","Wrisse","Wrist","Wrixum","Wrohe","Wrohm","WT-Tiengen","Wulfen","Wulfenau","Wulfenau-Dinklage","Wulfersdorf","W\xFClfrath","W\xFClfrath; Hahnenfurth","Wulfsdorf","Wulfsen","Wulfshagen","Wulfshagenerh\xFCtten","Wulften am Harz","Wulkenzin","W\xFClknitz","W\xFCmbach","W\xFCnschendorf / Elster","W\xFCnschendorf/Elster","W\xFCnsdorf","Wunsiedel","Wunstorf","Wupperal","wuppertal","Wuppertal","Wuppertal; Dornap","Wuppertal-Elberfeld","Wuppertal-Oberbarmen","Wuppertal Ronsdorf","Wuppertal-Ronsdorf","Wuppertal-Sch\xF6ller","Wuppertal-Vohwinkel","W\xFCrchwitz","W\xFCrgassen","W\xFCrm","Wurmannsquick","Wurmberg","Wurmdorf","W\xFCrrich","W\xFCrselen","Wurzbach","w\xFCrzburg","W\xFCrzburg","W\xFCrzburg-D\xFCrrbach","W\xFCrzburg-Heidingsfeld","W\xFCrzburg-Lengfeld","Wurzen","Wurzen-Roitzsch","Wussegel","W\xFCstenbrand","W\xFCstenhausen","W\xFCstenrot","W\xFCstenrot-Neuh\xFCtten","Wusterhausen","Wusterhausen / Dosse","Wusterhausen/Dosse","Wusterhusen","Wusterhusen OT Gustebin","Wustermark","Wustermark OT Dyrotz","Wustermark OT Elstal","Wustermark OT Priort","Wusterwitz","Wustrow","Wutach","Wutha","Wutha-Farnroda","Wutike","Wut\xF6schingen","Wybelsum","Wyk","Wyk auf F\xF6hr","Wyk/F\xF6hr","Xanten","Xanten-Birten","Xanten-L\xFCttingen","Xanten-Marienbaum","Xanten-M\xF6rmter","Xanten-Vynen","Xanten-Wardt","yes","Zabelsdorf","Zaberfeld","Z\xE4ckericker Loose","Zackerm\xFChle","Zadrau","Zagkwitz","Zahna","Zahna-Elster","Zahna OT Rahnsdorf","Zaisersweiher","Zapfendorf","Zarenthien","Zargleben","Zarpen","Zarrentin","Zarrentin am Schaalsee","Zebelin","Zechin","Zechlinerh\xFCtte","Zeckern","Zeddenick","Zedtlitz","Zeesen","Zeesen; K\xF6nigs Wusterhausen","Zeesen Stadt K\xF6nigs Wusterhausen","Zeetze","Zehdenick","Zehna","Zeibr\xFCcken","Zeil","Zeil am Main","Zeilarn","Zeilsheim","Zeisholz","Zeithain","Zeitlarn","Zeitlofs","Zeitz","Zell","Zell a.d.Mosel","Zella-Mehlis","Zell am Harmersbach","Zella/Rh\xF6n","Zellertal","Zell im Fichtelgebirge","Zell im Wiesental","Zellingen","Zell-Kaimt","Zell Unter Aichelberg","Zell-Unterharmersbach","Zell unterm Aichelberg","Zeltingen-Rachtig","Zemmer","Zempin","Zempow","Zenting","Zepernick","Zerbst","Zerbst/Anhalt","Zerf","Zerkall","Zernien","Zernin","Zernitz-Lohm","Zernsdorf","Zerrenthin","Zescha","Zeschdorf","Zetel","Zetel-Neuenburg","Zethau","Zeulenroda","Zeulenroda - Triebes","Zeulenroda-Triebes","Zeuthen","Zeven","Zeven-Aspe","Zgorzelec","Zichtau","Ziegelberg","Ziegelhausen","Ziegelh\xFCtte","Ziegelroda","Ziegendorf","Ziegenhagen","Ziegenhain","Ziegenr\xFCck","Ziegra-Knobelsdorf","Zielitz","Ziemendorf","Ziemetshausen","Zierenberg","Zierow","Zierzow","Ziesar","Ziesendorf","Ziesendorf OT Buchholz","Ziesendorf OT Buchholz Heide","Zie\xDFau","Ziethen","Zilsdorf","Ziltendorf","Zimmern","Zindelstein","Zingst","Zingst-West","Zinnowitz","Zinnwald","Zirchow","Zirkow","Zirndorf","Zittau","Zittau OT Hirschfelde","Zobbenitz","Z\xF6beritz","Z\xF6bigker","Z\xF6blitz","Z\xF6blitz OT Sorgau","Zollhaus","Zolling","Z\xF6llmen","Z\xF6llnitz","Zollwitz","Zorbau","Z\xF6rbig","Zorge","Zorneding","Z\xF6schen","Zossen","Zotzenbach","Zschaitz-Ottewig","Zscheiplitz","Zschepplin","Zscherndorf","Zschetzsch","Zschocken","Zschopau","Zschorlau","Zschorna","Zschornewitz","Zuchau","Zudar","Zug","Z\xFCllsdorf","Z\xFClow","Z\xFClpich","Zum Erlenanger","Zurow","Zurzach","Z\xFCschen","Z\xFCsedom","Zusmarshausen","Zu\xDFdorf","Z\xFCssow","Zuzenhausen","Zweenfurth","Zweibr\xFCcken","Zweiflingen-Schie\xDFhof","Zwenkau","Zwerweg","Zwethau","Zwheimen","Zwickau","Zwickau-P\xF6lbitz","Zwiefalten","Zwiefelhof","Zwiesel","Zwinge","Zwingenberg","Zwochau","Zw\xF6nitz","Zw\xF6nitz OT Br\xFCnlos","Zwota"];let t=e;return t})()});var Mre,a9e=Q(()=>{me();Mre=(()=>{let e=class e{constructor(i){i.nativeElement.innerHTML="&nbsp;",i.nativeElement.style.width="10px",i.nativeElement.style.height="10px"}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","nxtCardDivider",""]],standalone:!0});let t=e;return t})()});var Jgt,e3t=Q(()=>{me();Jgt=(()=>{let e=class e{constructor(i){this.elementClass="nxt-card"}};e.\u0275fac=function(r){return new(r||e)(R(fi))},e.\u0275dir=mi({type:e,selectors:[["","nxtCard",""]],hostVars:2,hostBindings:function(r,s){r&2&&jr(s.elementClass)},standalone:!0});let t=e;return t})()});var t3t,i3t=Q(()=>{me();t3t=(()=>{let e=class e{constructor(){this.autocompleteService=new google.maps.places.AutocompleteService,this.placesService=new google.maps.places.PlacesService(document.createElement("div"))}find(i){return!i||i.length===0?Promise.resolve([]):new Promise((r,s)=>{this.autocompleteService.getPlacePredictions({types:["address"],input:i,componentRestrictions:{country:"de"}},o=>{r(o)})})}getPostalCode(i){return new Promise((r,s)=>{console.log("start getDetails: "+i),this.placesService.getDetails({placeId:i,fields:["address_component"]},o=>{if(console.log(o),o&&o.address_components&&o.address_components.length>0){let a=o.address_components.find(l=>l.types.indexOf("postal_code")>-1);a&&a.long_name&&(console.log("JAAAAAAAAAAAAA"),console.log("JAAAAAAAAAAAAA"),console.log("JAAAAAAAAAAAAA"),console.log("resolve getDetails",a),r(a.long_name))}})})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var dNi,uNi,hNi,pNi,n3t,r3t=Q(()=>{Ep();Qgt();Zi();Ah();An();ri();a9e();Jr();e3t();Vt();B8();nc();me();qn();Ci();yi();i3t();Vt();An();dNi=["page"],uNi=["placesContainer"],hNi=["houseNumber"],pNi=t=>({display:t}),n3t=(()=>{let e=class e{streetDisplayInOptionWith(i,r){return r(i.description.replace(", Deutschland",""))}test2(){this.googlePlaceService.getPostalCode("EiFKYWtvYnN0cmHDn2UsIEFhY2hlbiwgRGV1dHNjaGxhbmQiLiosChQKEgkBSnx1fpnARxHqWtICxFOQjhIUChIJAUK8it1RqEcRwKtfW0YgIQU").then(i=>{console.log(i)})}constructor(i,r,s,o){this.formBuilder=i,this.dialogService=r,this.socketService=s,this.googlePlaceService=o,this.searchText="",this.searchFormControl=new $t(""),this.lastPlaceId="",this.showPostalCode=!1,this.streetDisplayWith=a=>a&&a.structured_formatting&&a.structured_formatting.main_text?(this.autoPostalCode(a.place_id),a.structured_formatting.main_text):"??",this.filterService=a=>O(this,null,function*(){let l=this.form.get("city").value+", "+a,c=yield this.googlePlaceService.find(l);return c||[]})}get cookies(){return window.document.cookie}ngOnInit(){return O(this,null,function*(){this.initForm(),setInterval(()=>{this.height=window.innerHeight,this.width=window.innerWidth,window.innerWidth>window.innerHeight},1e3),this.cities=Xgt.getCities(),this.placeService=new google.maps.places.AutocompleteService})}initForm(){this.form=this.formBuilder.group({givenName:new $t("",[ii.requiredAndNotNaN]),familyName:new $t("",[ii.requiredAndNotNaN]),email:new $t(""),mobile:new $t("",[ii.requiredAndNotNaN]),city:new $t("",[ii.requiredAndNotNaN]),postalCode:new $t("",[ii.requiredAndNotNaN]),streetAddress:new $t("",[ii.requiredAndNotNaN]),houseNumber:new $t("",[ii.requiredAndNotNaN])}),this.form.valueChanges.subscribe(()=>{this.tempRawData=this.form.getRawValue();let i=this.form.getRawValue();this.form.get("givenName").value&&(i.streetAddress=this.streetDisplayWith(i.streetAddress),this.socketService.setNewContactData(i))})}test(){this.placeService.getPlacePredictions({types:["address"],input:"W\xFCrselen Lindenstra\xDFe 3",componentRestrictions:{country:"DE"}},i=>{this.suggestions=i.map(r=>r.description)})}clickInput(i){this.form.get(i).element.click()}autoPostalCode(i){return O(this,null,function*(){if(this.lastPlaceId!==i){this.lastPlaceId=i;let r=yield this.googlePlaceService.getPostalCode(i);this.form.get("postalCode").setValue(r),this.showPostalCode=!0}})}finished(){return O(this,null,function*(){let i=this.form.get("givenName").value+" "+this.form.get("familyName").value;i+=`
`+this.streetDisplayWith(this.form.get("streetAddress").value)+" "+this.form.get("houseNumber").value,i+=`
`+this.form.get("postalCode").value+" "+this.form.get("city").value,i+=`
Handy: `+this.form.get("mobile").value,(yield this.dialogService.showYesNo(i,{yesText:"Alles richtig, fertig",noText:"korrigieren"}))&&Cm.reload("finished")})}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(vt),R(lt),R(t3t))},e.\u0275cmp=_e({type:e,selectors:[["nxt-new-contact"]],viewQuery:function(r,s){if(r&1&&(ei(dNi,7),ei(uNi,7),ei(hNi,7)),r&2){let o;Pt(o=Rt())&&(s.page=o.first),Pt(o=Rt())&&(s.placesContainer=o.first),Pt(o=Rt())&&(s.houseNumber=o.first)}},standalone:!0,features:[xe],decls:21,vars:17,consts:[["page",""],["street",""],["houseNumber",""],["fxLayout","column",1,"nxt-page",2,"font-size","1.2em","position","fixed","height","auto","width","auto","bottom","0","left","0","top","0","right","0","border","0px solid red"],["fxFlex","35%","nxtCard","","fxLayout","column",2,"padding-top","0.5em"],["fxFlex","","fxLayout","column","fxLayoutAlign","center","placeholder","Vorname","requiredError","verrate uns bitte deinen Vornamen",3,"nxtFormControl"],["fxFlex","","fxLayout","column","fxLayoutAlign","center","placeholder","Nachname","requiredError","bitte gebe deinen Nachname ein",3,"nxtFormControl"],["nxtCardDivider",""],["fxFlex","20%","nxtCard","","fxLayout","column",2,"padding-top","0.5em"],["fxFlex","","fxLayout","column","fxLayoutAlign","center","placeholder","Handy","requiredError","ben\xF6tigen wir f\xFCr eventuelle R\xFCckfragen",3,"nxtFormControl"],["fxFlex","50%","fxLayout","row","fxLayoutAlign","center center"],["fxFlex","30%","placeholder","PLZ",3,"ngStyle","nxtFormControl"],["fxFlex","","fxLayout","column","fxLayoutAlign","center","placeholder","Stadt","nxtMatOptionContainerClass","new-contact-option-container","requiredError","Bitte gebe die Stadt in der du wohnst ein",3,"optionClick","options","nxtFormControl","maxOptionsToShow","minLength"],["fxFlex","70%","placeholder","Strasse",3,"optionClick","filterService","nxtFormControl","displayInOptionWith","displayWith","minLength"],["fxFlex","30%","placeholder","HausNr.",3,"nxtFormControl"],["fxFlex","10%","fxLayout","column",2,"padding-top","0.5em"],[2,"width","100%","height","100%",3,"click"]],template:function(r,s){if(r&1){let o=re();h(0,"div",3,0)(2,"div",4),ee(3,"nxt-input",5)(4,"nxt-input",6),p(),ee(5,"div",7),h(6,"div",8),ee(7,"nxt-input",9),p(),ee(8,"div",7),h(9,"div",4)(10,"div",10),ee(11,"nxt-input",11),h(12,"nxt-autocomplete",12),F("optionClick",function(){return V(o),B(s.clickInput("streetAddress"))}),p()(),h(13,"div",10)(14,"nxt-autocomplete",13,1),F("optionClick",function(){return V(o),B(s.clickInput("houseNumber"))}),p(),ee(16,"nxt-input",14,2),p()(),h(18,"div",15)(19,"nxt-button",16),F("click",function(){return V(o),B(s.finished())}),y(20,"fertig"),p()()()}r&2&&(g(3),b("nxtFormControl",s.form.get("givenName")),g(),b("nxtFormControl",s.form.get("familyName")),g(3),b("nxtFormControl",s.form.get("mobile")),g(4),b("ngStyle",sn(15,pNi,s.showPostalCode?"":"none"))("nxtFormControl",s.form.get("postalCode")),g(),b("options",s.cities)("nxtFormControl",s.form.get("city"))("maxOptionsToShow",5)("minLength",1),g(2),b("filterService",s.filterService)("nxtFormControl",s.form.get("streetAddress"))("displayInOptionWith",s.streetDisplayInOptionWith)("displayWith",s.streetDisplayWith)("minLength",0),g(2),b("nxtFormControl",s.form.get("houseNumber")))},dependencies:[At,Yt,oi,qi,Jgt,Yi,Mre,rr,Dn,rs,Ga,Lt],styles:[".mat-autocomplete-visible{border-width:0;border-top-width:1px;border-style:solid;border-color:#a2a2a2}  .mat-autocomplete-visible mat-option{border:1px solid #a2a2a2;border-top-width:0px;height:3em}"]});let t=e;return t})()});var s3t,o3t=Q(()=>{sA();qn();Vt();me();yi();Kr();Vt();qn();s3t=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.loginService=r,this.imgSrcBoth="",this.imgSrcLetters="",this.imgSrcForms="",this.text="JULIAN",this.letterColor="#303030",this.letterSpace=100,this.fontSize=155,this.svgCodeBoth="",this.svgCodeLetters="",this.svgCodeForms=""}ngOnInit(){return O(this,null,function*(){this.textChanged()})}ngOnDestroy(){}getSvgCode(i,r,s=100,o,a=150){return`<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 1581 764.3" style="enable-background:new 0 0 1581 764.3;" xml:space="preserve">
<style type="text/css">
	.st0{fill:${r};}
	.st1{fill:#B7860F;}
	.white{fill:#FFFFFF;}
</style>
<g id="Ebene_2_1_">
	<g id="logo">
		<path class="st0" d="M125.6,187.2v137h-26L31.3,241v83.2H0v-137h26.2l68.1,83.2v-83.2H125.6z"/>
		<path class="st0" d="M272.9,324.2l-33-47.5L207.3,324h-36.4l50.7-69.4l-48.1-67.5h36l31.5,44.4l30.9-44.4h34.2l-47.7,66.1
			l51.1,70.9h-36.6V324.2z"/>
		<path class="st0" d="M398.6,213h-43.8v-25.8h119.4V213h-43.9v111.2h-31.7V213z"/>
		<path class="st0" d="M620.8,187.2h31.7v111.2h68.7v25.8H620.8V187.2z"/>
		<path class="st0" d="M880.7,187.2l-59.2,137h-31.4l-59.2-137h34.2l41.7,97.8l42.3-97.8H880.7z"/>
		<path class="st0" d="M920.6,187.2h31.7v111.2h68.7v25.8H920.6V187.2L920.6,187.2z"/>
		<path class="st0" d="M1149.6,187.2h31.7v137h-31.7V187.2z"/>
		<path class="st0" d="M1378.6,187.2v137h-26l-68.3-83.2v83.2h-31.4v-137h26.3l68.1,83.2v-83.2H1378.6z"/>
		<path class="st0" d="M1500.1,270.4l-18.4,19.2v34.6h-31.5v-137h31.5v64l60.7-64h35.2l-56.8,61.1l60.1,75.9h-37L1500.1,270.4z"/>
		<rect x="1069.4" y="292.6" class="st1" width="31.7" height="31.7"/>
		<rect x="509.1" y="250.1" class="st1" width="64.1" height="26.3"/>
		<path class="st1" d="M1230,511.6H351V402.2h31.7v77.6h815.6v-77.6h31.7V511.6z"/>
		<polygon class="st1" points="1230,109.3 1198.3,109.3 1198.3,31.7 382.7,31.7 382.7,109.3 351,109.3 351,0 1230,0 		"/>
		<rect y="584.3" class="st1" width="1581" height="180"/>
	</g>
</g>
<text font-size="${a}" class="white" id="svg_15" y="730" x="790" text-anchor="middle"
font-weight="normal" font-style="normal" letter-spacing="${s}" font-family="'Montserrat ExtraBold', 'Montserrat-ExtraBold'">${i}</text>
</svg>`}getSvgCode_old(i,r,s=100,o){let a=`<svg version="1.1" id="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 2014 1172" style="enable-background:new 0 0 2014 1172;" xml:space="preserve">
<style type="text/css">
	.letters{fill:`+r+`;}
	.gold{fill:#b7860f;}
	.name{font-size:154px;font-family:'Montserrat ExtraBold';fill:#FFFFFF; letter-spacing:`+s+`px}
</style>
<title>Name</title>
`;return(o==="letters"||o==="both")&&(a+=`<g>
	<path class="letters" d="M367.3,444.7v137h-26L273,498.5v83.2h-31.3v-137h26.2l68.1,83.2v-83.2H367.3z"/>
	<path class="letters" d="M514.6,581.7l-33-47.5L449,581.5h-36.4l50.7-69.4l-48.1-67.5h36l31.5,44.4l30.9-44.4h34.2l-47.7,66.1l51.1,70.9H514.6z"/>
	<path class="letters" d="M640.3,470.5h-43.8v-25.8h119.4v25.8H672v111.2h-31.7V470.5z"/>
	<path class="letters" d="M862.5,444.7h31.7v111.2h68.7v25.8H862.5V444.7z"/>
	<path class="letters" d="M1122.4,444.7l-59.2,137h-31.4l-59.2-137h34.2l41.7,97.8l42.3-97.8L1122.4,444.7z"/>
	<path class="letters" d="M1162.3,444.7h31.7v111.2h68.7v25.8h-100.4V444.7z"/>
	<path class="letters" d="M1391.3,444.7h31.7v137h-31.7L1391.3,444.7z"/>
	<path class="letters" d="M1620.3,444.7v137h-26l-68.3-83.2v83.2h-31.4v-137h26.3l68.1,83.2v-83.2H1620.3z"/>
	<path class="letters" d="M1741.8,527.9l-18.4,19.2v34.6h-31.5v-137h31.5v64l60.7-64h35.2l-56.8,61.1l60.1,75.9h-37L1741.8,527.9z"/>
</g>
`),(o==="forms"||o==="both")&&(a+=`<rect x="1311.1" y="550.1" class="gold" width="31.7" height="31.7"/>
<rect x="750.8" y="507.6" class="gold" width="64.1" height="26.3"/>
<path class="gold" d="M1471.7,769.1h-879V659.7h31.7v77.6H1440v-77.6h31.7L1471.7,769.1z"/>
<polygon class="gold" points="1471.7,366.8 1440,366.8 1440,289.2 624.4,289.2 624.4,366.8 592.7,366.8 592.7,257.5 1471.7,257.5 "/>
<rect x="241.7" y="841.8" class="gold" width="1581" height="180"/>
`),(o==="letters"||o==="both")&&(a+=`<text text-anchor="middle">
  <tspan  x="1038" y="986" class="name">`+i+`</tspan>
</text>
`),a+="</svg>",a}textChanged(){this.svgCodeBoth=this.getSvgCode(this.text.toUpperCase(),this.letterColor,this.letterSpace,"both",this.fontSize),this.imgSrcBoth="data:image/svg+xml;base64,"+btoa(this.svgCodeBoth),this.imgSrcLetters="data:image/svg+xml;base64,"+btoa(this.svgCodeLetters),this.imgSrcForms="data:image/svg+xml;base64,"+btoa(this.svgCodeForms)}download(i){let r=document.createElement("a"),s;i==="letters"?s=new Blob([this.svgCodeLetters]):i==="forms"?s=new Blob([this.svgCodeForms]):i==="both"&&(s=new Blob([this.svgCodeBoth])),r.download=this.text.toLowerCase()+"_"+i+".svg",r.href=window.URL.createObjectURL(s),r.click(),r.remove()}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-logo"]],standalone:!0,features:[xe],decls:48,vars:7,consts:[["fxLayout","column","fxFlex","",2,"height","100vh"],[2,"font-family","'Montserrat ExtraBold2'"],["type","text",2,"font-size","20px","color","#000000 !important",3,"ngModelChange","keyup","ngModel"],["type","number",2,"font-size","20px","color","#000000 !important",3,"ngModelChange","ngModel"],[2,"font-size","20px","color","#000000 !important",3,"ngModelChange","ngModel"],["value","#303030"],["value","#FFFFFF"],["href","assets/fonts/Montserrat-ExtraBold.otf"],["href","assets/fonts/Montserrat-ExtraBold.ttf"],[3,"click"],["fxLayout","row","fxFlex","","fxLayoutAlign","center center",2,"background-color","#c4ffed"],[2,"width","30vw",3,"src"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"table")(2,"tr")(3,"td",1),y(4,"name"),p(),h(5,"td")(6,"input",2),Xe("ngModelChange",function(a){return Ze(s.text,a)||(s.text=a),a}),F("keyup",function(){return s.textChanged()}),p()()(),h(7,"tr")(8,"td"),y(9,"font-size"),p(),h(10,"td")(11,"input",3),Xe("ngModelChange",function(a){return Ze(s.fontSize,a)||(s.fontSize=a),a}),F("ngModelChange",function(){return s.textChanged()}),p()()(),h(12,"tr")(13,"td"),y(14,"letter-space"),p(),h(15,"td")(16,"input",3),Xe("ngModelChange",function(a){return Ze(s.letterSpace,a)||(s.letterSpace=a),a}),F("ngModelChange",function(){return s.textChanged()}),p()()(),h(17,"tr")(18,"td"),y(19,"logo-letter-color"),p(),h(20,"td")(21,"select",4),Xe("ngModelChange",function(a){return Ze(s.letterColor,a)||(s.letterColor=a),a}),F("ngModelChange",function(){return s.textChanged()}),h(22,"option",5),y(23,"dark"),p(),h(24,"option",6),y(25,"white"),p()()()(),h(26,"tr")(27,"td"),y(28,"OTF"),p(),h(29,"td")(30,"a",7),y(31,"Monsterrat-ExtraBold OTF"),p()()(),h(32,"tr")(33,"td"),y(34,"TTF"),p(),h(35,"td")(36,"a",8),y(37,"Monsterrat-ExtraBold TTF"),p()()(),h(38,"tr")(39,"td"),y(40,"SVG"),p(),h(41,"td")(42,"button",9),F("click",function(){return s.download("both")}),y(43,"LOGO DOWNLOAD"),p(),y(44,"\xA0 "),p()()(),h(45,"div",10),ee(46,"img",11),Ce(47,"safeResourceUrl"),p()()),r&2&&(g(6),qe("ngModel",s.text),g(5),qe("ngModel",s.fontSize),g(5),qe("ngModel",s.letterSpace),g(5),qe("ngModel",s.letterColor),g(25),b("src",tt(47,5,s.imgSrcBoth),Ur))},dependencies:[At,Yt,oi,qi,ko,mIe,gIe,mu,Khe,$$,Ko,Dp,h5],styles:[".wrapper[_ngcontent-%COMP%]{background-color:#2a2a2a;position:fixed;inset:0}.wrapper[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]{position:fixed;inset:0}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:15vw;color:#fff;font-weight:700;position:relative;letter-spacing:5vw;top:-10px}"]});let t=e;return t})()});function mNi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w();g(),ye(n.errorText)}}function fNi(t,e){if(t&1&&(h(0,"tr"),ee(1,"td",17),Ce(2,"safeHtml"),h(3,"td",14),y(4),p(),h(5,"td",14),y(6),Ce(7,"money"),p(),h(8,"td",14),y(9),Ce(10,"money"),p()()),t&2){let n=e.$implicit;g(),b("innerHTML",tt(2,4,n.name),Pi),g(3),ye(n.amount),g(2),ye(tt(7,6,n.unitPrice)),g(3),ye(tt(10,8,n.amount*n.unitPrice))}}function gNi(t,e){if(t&1&&(h(0,"div",8),ee(1,"br")(2,"br")(3,"br")(4,"br")(5,"br")(6,"br")(7,"br"),h(8,"div"),y(9,"\u{1F4C6} DEIN TERMIN \u{1F4C6}"),p(),h(10,"div"),y(11),Ce(12,"nxtDate"),p(),h(13,"div"),y(14),p()()),t&2){let n=w();g(11),Ke("\u231A ",Nt(12,2,n.data.appointment.startDateTime,"dd.MM.yyyy HH:mm")," \u231A"),g(3),Ke("\u{1F4CD} ",n.data.appointment.studioAddress," \u{1F4CD}")}}var a3t,l3t=Q(()=>{Ul();zn();Il();ha();Vt();ri();go();me();ma();yi();Vt();a3t=(()=>{let e=class e{constructor(i,r){this.route=i,this.socketService=r,this.errorText="",this.gbxStreet="Wallstra\xDFe 62",this.gbxPostalCode="52064",this.data={appointment:{startDateTime:Ie.parse("2020-07-09 11:00","yyyy-MM-dd HH:mm"),studio:"Villa",studioAddress:"Aachen Innenstadt, Wallstra\xDFe 62"},receiptValueTotal:100,receiptDateString:"2020-07-02",receiptNo:"000001",customer:{customerName:"Niklas Mollski",customerStreet:"Cityscooter Stra\xDFe",customerHouseNumber:"99z",customerCity:"Netflixhausen",customerPostalCode:"99999"},receiptPositions:[{name:"Kaution",amount:1,unitPrice:100}]},this.vatPercent=16,this.route.snapshot.queryParams.data&&(this.data=Qn.parse(this.route.snapshot.queryParams.data)),this.receiptDate=Ie.parseFormat(this.data.receiptDateString,"yyyy-MM-dd","dd.MM.yyyy")}ngOnInit(){return O(this,null,function*(){})}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-receipt"]],standalone:!0,features:[xe],decls:51,vars:25,consts:[[4,"ngIf"],[1,"receipt-container",2,"border","0px solid black","height","100%","width","100%"],["fxFlex","","fxLayout","column","fxLayoutAlign","center"],["fxFlex","20","fxLayout","column","fxLayoutAlign","start center",2,"border","0px solid red"],["fxFlex","70",2,"border","0px solid yellowgreen","height","80px","margin","15px","margin-top","30px"],["src","/assets/logo/logo_black.svg","alt","",2,"height","80px"],["fxFlex","30",2,"border","0px solid green","font-size","12px"],["fxFlex","80","fxLayout","column","fxLayoutAlign","center",2,"border","0px solid blue"],["fxLayout","column","fxLayoutAlign","center center"],["fxLayout","column","fxFlex","","fxLayoutAlign","start center"],[2,"font-size","12px","width","80vw"],[1,"pos-table"],[4,"ngFor","ngForOf"],["colspan","3"],[1,"cell-align-right"],[2,"font-size","8px","margin-top","3px"],["fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],[2,"width","40%",3,"innerHTML"]],template:function(r,s){r&1&&(W(0,mNi,2,1,"div",0),h(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),ee(5,"img",5),p(),h(6,"div",6),y(7),p()(),h(8,"div",7)(9,"div",8),ee(10,"br")(11,"br"),h(12,"h1"),y(13,"Quittung"),p(),h(14,"div"),y(15),p(),h(16,"div"),y(17),p()(),ee(18,"br"),h(19,"div",9)(20,"div",10),y(21),ee(22,"br"),y(23),ee(24,"br"),y(25),p(),ee(26,"br"),h(27,"table",11)(28,"tr")(29,"th"),y(30,"Bezeichnung"),p(),h(31,"th"),y(32,"Menge"),p(),h(33,"th"),y(34,"Einzel \u20AC"),p(),h(35,"th"),y(36,"Gesamt \u20AC"),p()(),W(37,fNi,11,10,"tr",12),h(38,"tr")(39,"td",13),y(40," Gesamtbetrag* "),p(),h(41,"td",14)(42,"strong"),y(43),Ce(44,"money"),p()()()(),h(45,"div",15),y(46),Ce(47,"money"),Ce(48,"money"),Ce(49,"money"),p(),W(50,gNi,15,5,"div",16),p()()()()),r&2&&(b("ngIf",s.errorText),g(7),cn(" GBX GmbH \xB7 ",s.gbxStreet," \xB7 ",s.gbxPostalCode," Aachen "),g(8),Ke("Nr ",s.data.receiptNo,""),g(2),ye(s.receiptDate),g(4),Ke(" ",s.data.customer.customerName," "),g(2),cn(" ",s.data.customer.customerStreet," ",s.data.customer.customerHouseNumber," "),g(2),cn(" ",s.data.customer.customerPostalCode," ",s.data.customer.customerCity," "),g(12),b("ngForOf",s.data.receiptPositions),g(6),ye(tt(44,17,s.data.receiptValueTotal)),g(3),F_(" * Im Gesamtbetrag von ",tt(47,19,s.data.receiptValueTotal)," (Netto: ",tt(48,21,s.data.receiptValueTotal/(s.vatPercent/100+1)),") sind USt ",s.vatPercent," % (",tt(49,23,s.data.receiptValueTotal-s.data.receiptValueTotal/(s.vatPercent/100+1)),") enthalten. "),g(4),b("ngIf",s.data.appointment))},dependencies:[Ct,At,Yt,oi,qi,Hi,Or,ks,Hn],styles:["h1[_ngcontent-%COMP%]{font-weight:400;margin:0}.pos-table[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:.5px solid black;border-collapse:collapse;font-size:10px}.pos-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:5px}.pos-table[_ngcontent-%COMP%]{width:80%}.cell-align-right[_ngcontent-%COMP%]{text-align:right}"]});let t=e;return t})()});function yNi(t,e){if(t&1){let n=re();h(0,"div",6)(1,"div",7),F("click",function(){V(n);let r=w();return B(r.stop())}),p()()}if(t&2){let n=w();g(),b("innerHTML",n.stopButtonText,Pi)}}var vNi,c3t,d3t=Q(()=>{kl();o2();ri();sg();me();vNi=["codeSpan"];c3t=(()=>{let e=class e{constructor(){this.isRunning=!1,this.fake=["10.000\u20AC","600\u20AC","100\u20AC","80\u20AC","50\u20AC","40\u20AC","30\u20AC","20\u20AC","10\u20AC"],this.real=["50\u20AC","40\u20AC","30\u20AC","20\u20AC","10\u20AC"],this.currentValue="",this.stopButtonText="STOP"}ngOnInit(){return O(this,null,function*(){this.start()})}ngOnDestroy(){this.isRunning=!1}stop(){return O(this,null,function*(){this.isRunning&&(this.isRunning=!1,this.stopButtonText="&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;",clearInterval(this.interval),yield za.sleep(800),this.stopButtonText="&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;",this.generate(this.fake),yield za.sleep(800),this.stopButtonText="&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;",this.generate(this.real),yield za.sleep(1e3),this.currentValue="MAYO",this.stopButtonText="",this.codeSpan.nativeElement.innerHTML='<div style="font-size: 22vw">'+this.currentValue+"</div>",yield za.sleep(200),this.codeSpan.nativeElement.innerHTML="",yield za.sleep(200),this.codeSpan.nativeElement.innerHTML='<div style="font-size: 22vw">'+this.currentValue+"</div>",yield za.sleep(200),this.codeSpan.nativeElement.innerHTML="",yield za.sleep(200),this.codeSpan.nativeElement.innerHTML='<div style="font-size: 22vw">'+this.currentValue+"</div>",yield za.sleep(200),this.codeSpan.nativeElement.innerHTML="",yield za.sleep(200),this.codeSpan.nativeElement.innerHTML='<div style="font-size: 22vw">'+this.currentValue+"</div>")})}start(){this.isRunning||(this.stopButtonText="STOP",this.isRunning=!0,this.interval=setInterval(()=>{this.generate(this.fake)},200))}generate(i){this.currentValue=fn.getRandomFromArray(i),this.codeSpan.nativeElement.innerText=this.currentValue.toUpperCase()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-gift-card-generator"]],viewQuery:function(r,s){if(r&1&&ei(vNi,7),r&2){let o;Pt(o=Rt())&&(s.codeSpan=o.first)}},standalone:!0,features:[xe],decls:8,vars:2,consts:[["codeSpan",""],[1,"wrapper"],["src","assets/logo.svg"],[1,"wrapper-text",3,"nxtOnMultiClick","nxtMultiClick"],[2,"position","relative","left","2%"],["style","position:fixed; bottom: 20px; left: 0; right: 0; color: white; text-align: center; font-size: 5em",4,"ngIf"],[2,"position","fixed","bottom","20px","left","0","right","0","color","white","text-align","center","font-size","5em"],[2,"background-color","#b7860f","display","inline","padding","5px 20px","border-radius","4px","font-weight","bold",3,"click","innerHTML"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div"),ee(2,"img",2),p()(),h(3,"div",3),F("nxtOnMultiClick",function(){return V(o),B(s.start())}),h(4,"div",4),ee(5,"span",null,0),p()(),W(7,yNi,2,1,"div",5)}r&2&&(g(3),b("nxtMultiClick",3),g(4),b("ngIf",s.stopButtonText))},dependencies:[Qu,Ct],styles:["*[_ngcontent-%COMP%]{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none}.wrapper[_ngcontent-%COMP%]{background-color:#2a2a2a;position:fixed;inset:0}.wrapper[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]{position:fixed;inset:0}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:18vw;color:#fff;font-weight:700;position:relative;letter-spacing:5vw;top:-10px}"]});let t=e;return t})()});var u3t,h3t=Q(()=>{me();zy();u3t=(()=>{let e=class e{constructor(i){this.firestoreService=i}init(){this.firestoreService.doc("invoice-numbers/artist").valueChanges().subscribe(i=>{this._artistInvoiceNumbers.next(i)})}get artistInvoiceNumbers(){return this._artistInvoiceNumbers||this.init(),this._artistInvoiceNumbers}};e.\u0275fac=function(r){return new(r||e)(it(ff))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function CNi(t,e){if(t&1&&(h(0,"div"),ee(1,"nxt-datagrid",1),Ce(2,"async"),p()),t&2){let n=w();g(),b("rowData",tt(2,2,n.data))("columnDefs",n.columnDefs)}}var p3t,m3t=Q(()=>{Qo();Pa();ri();me();yi();Kr();zy();h3t();p3t=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.loginService=r,this.firestoreService=s,this.invoiceNumberCollection=o,this.columnDefs=[],this.initColumnDefs()}ngOnInit(){return O(this,null,function*(){this.initData()})}ngOnDestroy(){}initColumnDefs(){this.columnDefs=[{headerName:"Artist",field:"artist",nxtFieldType:Ee.Text},{headerName:"Rechnungsnummer",field:"nextInvoiceNumber",nxtFieldType:Ee.Text}]}initData(){this.invoiceNumberCollection.artistInvoiceNumbers.subscribe(i=>{let r=[];for(let s of Object.keys(i))r.push({numberRange:s,invoiceNumber:i[s]});this.data=r})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Fi),R(ff),R(u3t))},e.\u0275cmp=_e({type:e,selectors:[["nxt-invoice-numbers"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[[4,"ngIf"],[3,"rowData","columnDefs"]],template:function(r,s){r&1&&W(0,CNi,3,4,"div",0),r&2&&b("ngIf",s.data)},dependencies:[Ct,dr,Xu],styles:[".wrapper[_ngcontent-%COMP%]{background-color:#2a2a2a;position:fixed;inset:0}.wrapper[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]{position:fixed;inset:0}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:15vw;color:#fff;font-weight:700;position:relative;letter-spacing:5vw;top:-10px}"]});let t=e;return t})()});function wNi(t,e){if(t&1){let n=re();h(0,"mat-icon",16),F("click",function(r){V(n);let s=w();return B(s.clearInput(r))}),y(1,"clear"),p()}}function SNi(t,e){if(t&1&&ee(0,"mat-datepicker-toggle",17),t&2){w();let n=pr(13);b("for",n)}}var dv,xNi,bNi,TNi,$g,pS=Q(()=>{me();Mv();zn();$n();bl();dv=Gs(Jm());Ld();uZ();Zi();Vt();Ja();qn();An();ri();og();Ay();me();An();qn();Vt();xNi=["rangePicker"],bNi=t=>({width:t});TNi={parse:{dateInput:"dd.MM.yyyy"},display:{dateInput:"dd.MM.yyyy",monthYearLabel:"MMM yyyy",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM yyyy"}},$g=(()=>{let e=class e extends Xp{set value(i){this.nxtFormControl.setValue(i,{emitEvent:!1}),i?.from&&(this.valueFrom=(0,dv.default)(i?.from)),i?.till&&(this.valueTill=(0,dv.default)(i?.till))}constructor(i){super(),this.dateFormats=i,this.showClearIcon=!1,this.valueChange=new nt,this.bottomNoPadding=!1,this.formFieldWidth="100%",this.thisMonthText=Ie.formatNow("MMM yy"),this.monthBack1=Ie.addMonths(Date.now(),-1).dateFormat("MMM yy"),this.monthBack2=Ie.addMonths(Date.now(),-2).dateFormat("MMM yy"),this.monthBack3=Ie.addMonths(Date.now(),-3).dateFormat("MMM yy"),this.monthBack4=Ie.addMonths(Date.now(),-4).dateFormat("MMM yy"),this.monthBack5=Ie.addMonths(Date.now(),-5).dateFormat("MMM yy"),this.yearBack0=Date.now().dateFormat("yyyy"),this.yearBack1=Ie.addYears(Date.now(),-1).dateFormat("yyyy"),this.yearBack2=Ie.addYears(Date.now(),-2).dateFormat("yyyy"),this.yearBack3=Ie.addYears(Date.now(),-3).dateFormat("yyyy"),this.valueChanged$=new Mi}ngOnInit(){this.valueChangedSubscription=this.valueChanged$.pipe(_0(50)).subscribe(()=>{this.valueChange.emit(this.getValue())})}ngOnDestroy(){this.valueChangedSubscription?.unsubscribe()}thisMonthClicked(){this.valueFrom=(0,dv.default)(Date.now()).add(0,"month").startOf("month"),this.valueTill=(0,dv.default)(Date.now()).add(1,"month").startOf("month").add(-1,"day"),this.closeDatePickerPopup(),this.emitChange()}lastXMonthClicked(i){this.valueFrom=(0,dv.default)(Date.now()).add(-1*i,"month").startOf("month"),this.valueTill=(0,dv.default)(Date.now()).add(-1*i+1,"month").startOf("month").add(-1,"day"),this.closeDatePickerPopup(),this.emitChange()}lastXYearClicked(i){let r=parseInt(Date.now().dateFormat("yyyy"),10)-i;this.valueFrom=(0,dv.default)(Ie.parse(r+"-01-01")),this.valueTill=(0,dv.default)(Ie.parse(r+"-12-31")),this.closeDatePickerPopup(),this.emitChange()}thisWeekClicked(){this.valueFrom=(0,dv.default)(Date.now()).add(0,"week").startOf("week"),this.valueTill=(0,dv.default)(Date.now()).add(1,"week").startOf("week").add(-1,"day"),this.closeDatePickerPopup(),this.emitChange()}lastWeekClicked(){this.valueFrom=(0,dv.default)(Date.now()).add(-1,"week").startOf("week"),this.valueTill=(0,dv.default)(Date.now()).add(0,"week").startOf("week").add(-1,"day"),this.closeDatePickerPopup(),this.emitChange()}closeDatePickerPopup(){this.dateRangePicker?.opened&&(this.dateRangePicker.close(),Gn.debug("DATE-PICKER: closeDatePickerPopup"))}emitChange(){this.valueChanged$.next()}getValue(){return{from:Ie.format(this.valueFrom,"yyyy-MM-dd"),till:Ie.format(this.valueTill,"yyyy-MM-dd")}}open(i){this.dateRangePicker.open()}ngOnChanges(i){}clearInput(i){i.stopPropagation(),this.valueFrom=null,this.valueTill=null,this.emitChange()}closed(i){}changed(i){}};e.\u0275fac=function(r){return new(r||e)(R(af))},e.\u0275cmp=_e({type:e,selectors:[["nxt-date-range-picker"]],viewQuery:function(r,s){if(r&1&&ei(xNi,5),r&2){let o;Pt(o=Rt())&&(s.dateRangePicker=o.first)}},inputs:{value:"value",placeholder:"placeholder",onlyMonth:"onlyMonth",showClearIcon:"showClearIcon",bottomNoPadding:"bottomNoPadding"},outputs:{valueChange:"valueChange"},standalone:!0,features:[as([{provide:af,useValue:TNi}]),et,yn,xe],decls:48,vars:25,consts:[["clickElement","","controlElement",""],["rangePicker",""],[3,"nxtFormControl","width"],[1,"mat-form-field-full-width",3,"ngStyle"],[3,"close","change","rangePicker"],["matStartDate","","placeholder","Datum von",3,"ngModelChange","click","readOnly","ngModel"],["matEndDate","","placeholder","Datum bis",3,"ngModelChange","click","readOnly","ngModel"],[2,"position","absolute","right","0","bottom","0"],["aria-hidden","false","aria-label","clear",3,"click",4,"ngIf"],["matSuffix","",3,"for",4,"ngIf"],["fxLayout","column","fxLayoutGap","4px"],["fxLayout","row","fxLayoutAlign","space-between"],[3,"click"],["fxLayout","row","fxLayoutAlign","space-between","fxLayoutGap","4px"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply",""],["aria-hidden","false","aria-label","clear",3,"click"],["matSuffix","",3,"for"]],template:function(r,s){if(r&1){let o=re();h(0,"nxt-form-field-wrapper",2)(1,"mat-form-field",3)(2,"mat-label"),y(3),p(),h(4,"mat-date-range-input",4),F("close",function(l){return V(o),B(s.closed(l))})("change",function(l){return V(o),B(s.changed(l))}),h(5,"input",5,0),Xe("ngModelChange",function(l){return V(o),Ze(s.valueFrom,l)||(s.valueFrom=l),B(l)}),F("ngModelChange",function(){return V(o),B(s.emitChange())})("click",function(l){return V(o),B(s.open(l))}),p(),h(8,"input",6),Xe("ngModelChange",function(l){return V(o),Ze(s.valueTill,l)||(s.valueTill=l),B(l)}),F("ngModelChange",function(){return V(o),B(s.emitChange())})("click",function(l){return V(o),B(s.open(l))}),p()(),h(9,"div",7),W(10,wNi,2,0,"mat-icon",8),p(),W(11,SNi,1,1,"mat-datepicker-toggle",9),h(12,"mat-date-range-picker",null,1)(14,"mat-date-range-picker-actions")(15,"div",10)(16,"div",11)(17,"nxt-button",12),F("click",function(){return V(o),B(s.lastWeekClicked())}),y(18,"letzte Woche"),p(),h(19,"nxt-button",12),F("click",function(){return V(o),B(s.thisWeekClicked())}),y(20,"diese Woche"),p()(),h(21,"div",13)(22,"nxt-button",12),F("click",function(){return V(o),B(s.lastXMonthClicked(5))}),y(23),p(),h(24,"nxt-button",12),F("click",function(){return V(o),B(s.lastXMonthClicked(4))}),y(25),p(),h(26,"nxt-button",12),F("click",function(){return V(o),B(s.lastXMonthClicked(3))}),y(27),p(),h(28,"nxt-button",12),F("click",function(){return V(o),B(s.lastXMonthClicked(2))}),y(29),p(),h(30,"nxt-button",12),F("click",function(){return V(o),B(s.lastXMonthClicked(1))}),y(31),p(),h(32,"nxt-button",12),F("click",function(){return V(o),B(s.thisMonthClicked())}),y(33),p()(),h(34,"div",11)(35,"nxt-button",12),F("click",function(){return V(o),B(s.lastXYearClicked(3))}),y(36),p(),h(37,"nxt-button",12),F("click",function(){return V(o),B(s.lastXYearClicked(2))}),y(38),p(),h(39,"nxt-button",12),F("click",function(){return V(o),B(s.lastXYearClicked(1))}),y(40),p(),h(41,"nxt-button",12),F("click",function(){return V(o),B(s.lastXYearClicked(0))}),y(42),p()(),h(43,"div",11)(44,"nxt-button",14),y(45,"Abbrechen"),p(),h(46,"nxt-button",15),y(47,"OK"),p()()()()()()()}if(r&2){let o=pr(13);jr(s.bottomNoPadding?"bottom-no-padding":""),b("nxtFormControl",s.nxtFormControl)("width",s.width),g(),b("ngStyle",sn(23,bNi,s.formFieldWidth)),g(2),ye(s.placeholder),g(),b("rangePicker",o),g(),b("readOnly",!0),qe("ngModel",s.valueFrom),g(3),b("readOnly",!0),qe("ngModel",s.valueTill),g(2),b("ngIf",s.showClearIcon),g(),b("ngIf",!1),g(12),ye(s.monthBack5),g(2),ye(s.monthBack4),g(2),ye(s.monthBack3),g(2),ye(s.monthBack2),g(2),ye(s.monthBack1),g(2),ye(s.thisMonthText),g(3),ye(s.yearBack3),g(2),ye(s.yearBack2),g(2),ye(s.yearBack1),g(2),ye(s.yearBack0)}},dependencies:[O1,M0,rr,Dn,rs,E0,qze,$ge,ko,mu,Ko,Dp,Kge,Ct,Zr,TB,NN,Zze,Jze,At,Yt,$r,oi,Lt,Qze,Xze],styles:["nxt-button[_ngcontent-%COMP%]{font-size:.8em!important}[_nghost-%COMP%]     input{height:24px!important;text-align:center}[_nghost-%COMP%]     .mat-date-range-input-separator{margin-top:4px;font-size:70%}[_nghost-%COMP%]     .mat-date-range-input-container{height:28px}[_nghost-%COMP%]     .mdc-icon-button__ripple{display:none}[_nghost-%COMP%]     .bottom-no-padding{display:flex;border:0px solid red;padding-top:10px}[_nghost-%COMP%]     .bottom-no-padding .mat-input-element{min-height:1.8em}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-infix{border:none}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-wrapper{padding-bottom:0}[_nghost-%COMP%]     .bottom-no-padding .mat-form-field-underline{position:unset}"]});let t=e;return t})()});function DNi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),p()}}function ENi(t,e){t&1&&(h(0,"div",8),y(1,"Keine Rechnungen gefunden"),p())}function MNi(t,e){if(t&1&&ee(0,"nxt-datagrid",9),t&2){let n=w();b("rowData",n.data)("columnDefs",n.columnDefs)("pagination",!0)}}var kre,l9e=Q(()=>{zn();pS();Qo();Pa();Zi();ls();ri();Vt();me();yi();Kr();zy();Ci();Vt();kre=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.loginService=r,this.firestoreService=s,this.dialogService=o,this.columnDefs=[],this.initColumnDefs()}ngOnInit(){return O(this,null,function*(){setTimeout(()=>{this.nxtDateRangePicker.click()},1e3)})}ngOnDestroy(){}initColumnDefs(){this.columnDefs=[{headerName:"invoiceNumber",field:"invoiceNumber",nxtFieldType:Ee.Text},{headerName:"invoiceDate",field:"invoiceDate",nxtFieldType:Ee.Date_germanDate,sort:"asc"},{headerName:"to",field:"invoiceTo.name",nxtFieldType:Ee.Text},{headerName:"pdf",field:"",nxtFieldType:Ee.Text,cellRenderer:i=>"PDF",nxtOnCellClicked:i=>{this.dialogService.showPdf(i.data.invoiceBase64,i.data.invoiceNumber+".pdf")}}]}initData(){return O(this,null,function*(){this.subscription&&this.subscription.unsubscribe();let i=new Date(Ie.parse(this.dateFromTill.from,"yyyy-MM-dd")),r=new Date(Ie.parse(this.dateFromTill.till,"yyyy-MM-dd"))})}findClicked(){this.checkFilter()&&this.initData()}checkFilter(){return this.dateFromTill?!0:(this.dialogService.showOk("Bitte w\xE4hle einen Monat aus"),!1)}dateChanged(){}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Fi),R(ff),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-invoices"]],viewQuery:function(r,s){if(r&1&&ei($g,5),r&2){let o;Pt(o=Rt())&&(s.nxtDateRangePicker=o.first)}},standalone:!0,features:[xe],decls:8,vars:4,consts:[["fxLayout","column",1,"nxt-page"],["style","position: absolute;right: 10px;","tooltip","schlie\xDFen","icon","close",3,"click",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center"],["fxFlex","350px","placeholder","Rechnungsdatum",3,"valueChange","value"],[3,"click"],["class","nxt-text",4,"ngIf"],["fxFlex","",3,"rowData","columnDefs","pagination",4,"ngIf"],["tooltip","schlie\xDFen","icon","close",2,"position","absolute","right","10px",3,"click"],[1,"nxt-text"],["fxFlex","",3,"rowData","columnDefs","pagination"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,DNi,1,0,"nxt-button-icon",1),h(2,"div",2)(3,"nxt-date-range-picker",3),Xe("valueChange",function(a){return Ze(s.dateFromTill,a)||(s.dateFromTill=a),a}),F("valueChange",function(){return s.dateChanged()}),p(),h(4,"nxt-button",4),F("click",function(){return s.findClicked()}),y(5,"Finden"),p()(),W(6,ENi,2,0,"div",5)(7,MNi,1,3,"nxt-datagrid",6),p()),r&2&&(g(),b("ngIf",s.dialogRef),g(2),qe("value",s.dateFromTill),g(3),b("ngIf",s.data&&s.data.length===0),g(),b("ngIf",s.data&&s.data.length>0))},dependencies:[At,Yt,oi,qi,Ct,an,$g,Lt,dr],styles:[".wrapper[_ngcontent-%COMP%]{background-color:#2a2a2a;position:fixed;inset:0}.wrapper[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]{position:fixed;inset:0}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:15vw;color:#fff;font-weight:700;position:relative;letter-spacing:5vw;top:-10px}"]});let t=e;return t})()});function ANi(t,e){if(t&1&&ee(0,"video",4,0),t&2){let n=w();b("ngStyle",yj(2,INi,n.videoWidth,n.videoHeight,n.visibility,n.videoLeft,n.videoTop))("src",n.videoSrc,Ur)}}var kNi,INi,f3t,g3t=Q(()=>{me();An();ri();Vt();me();yi();Kr();Vt();An();kNi=["videoElement"],INi=(t,e,n,i,r)=>({width:t,height:e,visibility:n,left:i,top:r});f3t=(()=>{let e=class e{set videoComponent(i){i&&(this.video=i.nativeElement,this.video.addEventListener("ended",()=>{this.videoEnd.emit(),this.visibility="hidden",this.show=!1}),this.video.addEventListener("loadeddata",()=>{let r=this.video.videoWidth/this.video.videoHeight,s=window.innerWidth/window.innerHeight;r>s?(this.videoWidth="90%",this.videoHeight="auto"):(this.videoWidth="auto",this.videoHeight="90%"),this.video.play(),this.visibility="visible"}))}constructor(i,r){this.socketService=i,this.loginService=r,this.videoEnd=new nt,this.visibility="hidden",this.videoSrc="",this.show=!1,this.videoWidth="100px",this.videoTop="100px",this.videoLeft="100px",this.videoHeight="100px",this.login()}login(){return O(this,null,function*(){})}ngOnInit(){}playVideo(i){this.videoSrc="/assets/brudi-tv/clips/"+i,setTimeout(()=>{this.show=!0},10)}test2(){this.videoSrc="/assets/brudi-tv/clips/capone_2.mp4",this.show=!0}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-brudi-tv"]],viewQuery:function(r,s){if(r&1&&ei(kNi,5),r&2){let o;Pt(o=Rt())&&(s.videoComponent=o.first)}},standalone:!0,features:[xe],decls:3,vars:1,consts:[["videoElement",""],[1,"background","fix-fullscreen"],["fxLayout","row","fxLayoutAlign","center center",2,"width","100%","height","100%"],["class","video","preload","auto",3,"ngStyle","src",4,"ngIf"],["preload","auto",1,"video",3,"ngStyle","src"]],template:function(r,s){r&1&&(ee(0,"div",1),h(1,"div",2),W(2,ANi,2,8,"video",3),p()),r&2&&(g(2),b("ngIf",s.show))},dependencies:[At,Yt,oi,Ct,rr,Dn,rs],styles:[".fix-fullscreen[_ngcontent-%COMP%]{position:fixed;inset:0;width:100%;height:100%}.background[_ngcontent-%COMP%]{z-index:1;background-image:url(/assets/brudi-tv/logo.jpeg)}.foreground[_ngcontent-%COMP%]{z-index:10}.video[_ngcontent-%COMP%]{z-index:20}"]});let t=e;return t})()});var v3t,y3t=Q(()=>{Zi();Vt();me();yi();Kr();Vt();v3t=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.loginService=r}ngOnInit(){}playClip(i){this.socketService.sendBrudiTvAction({action:"play_video",data:i})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-brudi-tv-dashboard"]],standalone:!0,features:[xe],decls:72,vars:0,consts:[["fxLayout","column","fxLayoutAlign","fill",2,"width","100%","height","100%"],["fxLayout","row","fxFlex",""],[1,"button-wrapper"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"nxt-button",3),F("click",function(){return s.playClip("capone_1.mp4")}),y(4,"Capone"),ee(5,"br"),y(6,"Lacher"),p()(),h(7,"div",2)(8,"nxt-button",3),F("click",function(){return s.playClip("capone_2.mp4")}),y(9,"Capone"),ee(10,"br"),y(11,"Haps"),p()()(),h(12,"div",1)(13,"div",2)(14,"nxt-button",3),F("click",function(){return s.playClip("jule_hitler.mp4")}),y(15,"Jule"),ee(16,"br"),y(17,"Hitler"),p()(),h(18,"div",2)(19,"nxt-button",3),F("click",function(){return s.playClip("jule_deso_dogg.mp4")}),y(20,"Jule"),ee(21,"br"),y(22,"Deso Dogg"),p()(),h(23,"div",2)(24,"nxt-button",3),F("click",function(){return s.playClip("jule_haspler.mp4")}),y(25,"Jule"),ee(26,"br"),y(27,"Haspler"),p()()(),h(28,"div",1)(29,"div",2)(30,"nxt-button",3),F("click",function(){return s.playClip("niklas_knutscher.mp4")}),y(31,"Niklas"),ee(32,"br"),y(33,"Knutscher"),p()(),h(34,"div",2)(35,"nxt-button",3),F("click",function(){return s.playClip("niklas_spritzen.mp4")}),y(36,"Niklas"),ee(37,"br"),y(38,"Spritzen"),p()()(),h(39,"div",1)(40,"div",2)(41,"nxt-button",3),F("click",function(){return s.playClip("timey_brokkoli.mp4")}),y(42,"Timey"),ee(43,"br"),y(44,"Brokkoli"),p()(),h(45,"div",2)(46,"nxt-button",3),F("click",function(){return s.playClip("timey_discusting.mp4")}),y(47,"Timey"),ee(48,"br"),y(49,"Discusting"),p()(),h(50,"div",2)(51,"nxt-button",3),F("click",function(){return s.playClip("timey_lacher.mp4")}),y(52,"Timey"),ee(53,"br"),y(54,"Lacher"),p()()(),h(55,"div",1)(56,"div",2)(57,"nxt-button",3),F("click",function(){return s.playClip("twin_hessen.mp4")}),y(58,"Twin"),ee(59,"br"),y(60,"Hessen"),p()(),h(61,"div",2)(62,"nxt-button",3),F("click",function(){return s.playClip("twin_couch.mp4")}),y(63,"Twin"),ee(64,"br"),y(65,"Couch"),p()()(),h(66,"div",1)(67,"div",2)(68,"nxt-button",3),F("click",function(){return s.playClip("shayan_lacher.mp4")}),y(69,"Shayan"),ee(70,"br"),y(71,"Lacher"),p()()()())},dependencies:[At,Yt,oi,qi,Lt],styles:["nxt-button[_ngcontent-%COMP%]{font-size:1.5em!important;width:100%;height:100%;margin:0}.button-wrapper[_ngcontent-%COMP%]{padding:4px;width:100%;height:100%}"]});let t=e;return t})()});function PNi(t,e){t&1&&ee(0,"img",16)}function RNi(t,e){t&1&&ee(0,"img",17)}function FNi(t,e){if(t&1&&(h(0,"div",2),W(1,PNi,1,0,"img",16)(2,RNi,1,0,"img",17),p()),t&2){let n=w();g(),Je(n.data.value>600?1:2)}}function LNi(t,e){t&1&&(h(0,"div",3),ee(1,"img",18),p())}function ONi(t,e){if(t&1&&(h(0,"div",19),y(1),p()),t&2){let n=w();g(),Ke("WERT: ",n.valueString,"")}}function NNi(t,e){t&1&&(h(0,"div",20)(1,"div",21)(2,"div",22),y(3,"VON"),p(),h(4,"div",22),y(5,"F\xDCR"),p()(),ee(6,"br")(7,"br")(8,"br"),h(9,"div",23)(10,"div",24),y(11,"\xA0"),p(),h(12,"div",24),y(13,"\xA0"),p()()())}function VNi(t,e){t&1&&(h(0,"div",10),y(1,"G\xDCLTIG F\xDCR 2x DAY-SESSIONS"),p())}function BNi(t,e){if(t&1&&W(0,VNi,2,0,"div",11),t&2){let n=w();b("ngIf",n.data.value>600)}}function zNi(t,e){if(t&1&&(h(0,"div",10),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w();g(),cn("",n.data.code," \xB7 G\xDCLTIG BIS: ",Nt(2,2,n.data.validTill,"dd.MM.yyyy")," ")}}function HNi(t,e){if(t&1&&(h(0,"div",10),y(1),ee(2,"br"),y(3),Ce(4,"nxtDate"),Ce(5,"nxtDate"),p()),t&2){let n=w();g(),ye(n.data.code),g(2),cn("G\xDCLTIG AB: ",Nt(4,3,n.data.validFrom,"dd.MM.yyyy")," \xB7 G\xDCLTIG BIS: ",Nt(5,6,n.data.validTill,"dd.MM.yyyy")," ")}}function GNi(t,e){t&1&&(h(0,"div",10),y(1,"Der Gutschein ist nicht auf Tattoos mit einem Aktionspreise einzul\xF6sen "),p())}function WNi(t,e){t&1&&(h(0,"div",10),y(1,"Eine Tagessitzung beginnt um 11 Uhr und endet um 18 Uhr "),p())}var _3t,C3t=Q(()=>{Ul();zn();ri();Vt();go();me();ma();Cs();Vt();_3t=(()=>{let e=class e{constructor(i,r){this.route=i,this.configService=r,this.valueString="",this.route.snapshot.queryParams.data?this.data=Qn.parse(this.route.snapshot.queryParams.data):this.data={code:"X-XXXX-XXXX-XXXX",value:1,createdAt:Date.now(),validFrom:Ie.parse("2021-12-24","yyyy-MM-dd"),validTill:Ie.parse("2021-12-24","yyyy-MM-dd"),disableDiscountPromo:!1,subType:"day-session"},this.valueString=parseInt(this.data.value+"",10)+" EURO"}ngOnInit(){this.route.data.subscribe(i=>{console.log(i)})}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-voucher-pdf"]],standalone:!0,features:[xe],decls:19,vars:10,consts:[[2,"position","fixed","border","0.2cm solid #b7860f","top","1.5cm","right","1.5cm","bottom","4cm","left","1.5cm"],["fxLayout","column",1,"font-montserrat-900",2,"height","100%","padding","2cm 2cm 9cm 2cm","background-color","#ffffff"],["fxLayout","row","fxLayoutAlign","center",2,"position","relative","top","1cm","width","100%"],["fxLayout","row","fxLayoutAlign","center",2,"position","relative","top","1cm","width","120%"],["fxLayout","column","fxLayoutAlign","space-around center",2,"border","0px solid red","height","100%","margin-top","1cm"],["fxLayout","row","fxLayoutAlign","center"],["style","font-size: 32px; font-weight: bold; color:#3c3b3f",4,"ngIf"],["style","width:100%",4,"ngIf"],[1,"flex","flex-col","w-fill","justify-center","items-center","w-full",2,"position","fixed","bottom","1cm","left","0","right","0"],[1,"flex","flex-col","pb-2",2,"text-align","center"],[2,"font-size","14px","font-weight","bold","color","#818588"],["style","font-size: 14px; font-weight: bold; color:#818588",4,"ngIf"],["fxLayout","column",1,"p-relative","flex","flex-column","items-center",2,"border-radius","0.3cm","border","2px solid #b7860f","background-color","white","padding","8px"],["fxLayout","row","fxLayoutAlign","center",2,"padding","0.5cm"],[2,"width","6cm",3,"src"],["fxLayout","row","fxLayoutAlign","center",1,"no-wrap",2,"font-size","14px","letter-spacing","2px","font-weight","900","color","#3c3b3f","text-align","center",3,"innerHTML"],["src","../../../../assets/images/voucher/gift-card-day-session-2x.svg",2,"width","100%"],["src","../../../../assets/images/voucher/gift-card-day-session.svg",2,"width","100%"],["src","../../../../assets/images/voucher/title.svg",2,"width","100%"],[2,"font-size","32px","font-weight","bold","color","#3c3b3f"],[2,"width","100%"],["fxLayout","row","fxLayoutAlign","space-around"],[2,"font-size","24px","font-weight","bold","color","#3c3b3f"],["fxLayout","row","fxLayoutAlign","space-around",2,"width","100%"],[2,"border-top","2px solid #b7860f","width","30vw"]],template:function(r,s){r&1&&(ee(0,"div",0),h(1,"div",1),W(2,FNi,3,1,"div",2)(3,LNi,2,0,"div",3),h(4,"div",4)(5,"div",5),W(6,ONi,2,1,"div",6),p(),W(7,NNi,14,0,"div",7),p(),h(8,"div",8)(9,"div",9),W(10,BNi,1,1,"div",10)(11,zNi,3,5,"div",11)(12,HNi,6,9,"div",11)(13,GNi,2,0,"div",11)(14,WNi,2,0,"div",11),p(),h(15,"div",12)(16,"div",13),ee(17,"img",14),p(),ee(18,"div",15),p()()()),r&2&&(g(2),Je(s.data.subType==="day-session"?2:3),g(4),b("ngIf",!s.data.subType),g(),b("ngIf",!s.data.subType),g(3),Je(s.data.subType==="day-session"?10:-1),g(),b("ngIf",!s.data.validFrom),g(),b("ngIf",s.data.validFrom),g(),b("ngIf",s.data.disableDiscountPromo&&!s.data.subType),g(),b("ngIf",s.data.subType==="day-session"),g(3),b("src","../../../../assets/logo/studio/logo_"+s.configService.config.value.studioRegion.toLowerCase()+"_dark.svg",Ur),g(),b("innerHTML",s.configService.config.value.voucher.address,Pi))},dependencies:[At,Yt,oi,Ct,Hn]});let t=e;return t})()});var b3t=xr((x3t,c9e)=>{(function(t){"use strict";var e=M(),n=I(),i=z(),r=G(),s={imagePlaceholder:void 0,cacheBust:!1},o={toSvg:a,toPng:c,toJpeg:d,toBlob:u,toPixelData:l,impl:{fontFaces:i,images:r,util:e,inliner:n,options:{}}};typeof c9e<"u"?c9e.exports=o:t.domtoimage=o;function a(A,Y){return Y=Y||{},m(Y),Promise.resolve(A).then(function(ne){return _(ne,Y.filter,!0)}).then(x).then(D).then(X).then(function(ne){return E(ne,Y.width||e.width(A),Y.height||e.height(A))});function X(ne){return Y.bgcolor&&(ne.style.backgroundColor=Y.bgcolor),Y.width&&(ne.style.width=Y.width+"px"),Y.height&&(ne.style.height=Y.height+"px"),Y.style&&Object.keys(Y.style).forEach(function(pe){ne.style[pe]=Y.style[pe]}),ne}}function l(A,Y){return f(A,Y||{}).then(function(X){return X.getContext("2d").getImageData(0,0,e.width(A),e.height(A)).data})}function c(A,Y){return f(A,Y||{}).then(function(X){return X.toDataURL()})}function d(A,Y){return Y=Y||{},f(A,Y).then(function(X){return X.toDataURL("image/jpeg",Y.quality||1)})}function u(A,Y){return f(A,Y||{}).then(e.canvasToBlob)}function m(A){typeof A.imagePlaceholder>"u"?o.impl.options.imagePlaceholder=s.imagePlaceholder:o.impl.options.imagePlaceholder=A.imagePlaceholder,typeof A.cacheBust>"u"?o.impl.options.cacheBust=s.cacheBust:o.impl.options.cacheBust=A.cacheBust}function f(A,Y){return a(A,Y).then(e.makeImage).then(e.delay(100)).then(function(ne){var pe=X(A);return pe.getContext("2d").drawImage(ne,0,0),pe});function X(ne){var pe=document.createElement("canvas");if(pe.width=Y.width||e.width(ne),pe.height=Y.height||e.height(ne),Y.bgcolor){var ce=pe.getContext("2d");ce.fillStyle=Y.bgcolor,ce.fillRect(0,0,pe.width,pe.height)}return pe}}function _(A,Y,X){if(!X&&Y&&!Y(A))return Promise.resolve();return Promise.resolve(A).then(ne).then(function(ie){return pe(A,ie,Y)}).then(function(ie){return ce(A,ie)});function ne(ie){return ie instanceof HTMLCanvasElement?e.makeImage(ie.toDataURL()):ie.cloneNode(!1)}function pe(ie,le,Se){var je=ie.childNodes;if(je.length===0)return Promise.resolve(le);return ze(le,e.asArray(je),Se).then(function(){return le});function ze(Ge,Ae,Ye){var ft=Promise.resolve();return Ae.forEach(function(Ft){ft=ft.then(function(){return _(Ft,Ye)}).then(function(Tt){Tt&&Ge.appendChild(Tt)})}),ft}}function ce(ie,le){if(!(le instanceof Element))return le;return Promise.resolve().then(Se).then(je).then(ze).then(Ge).then(function(){return le});function Se(){Ae(window.getComputedStyle(ie),le.style);function Ae(Ye,ft){Ye.cssText?ft.cssText=Ye.cssText:Ft(Ye,ft);function Ft(Tt,at){e.asArray(Tt).forEach(function(yt){at.setProperty(yt,Tt.getPropertyValue(yt),Tt.getPropertyPriority(yt))})}}}function je(){[":before",":after"].forEach(function(Ye){Ae(Ye)});function Ae(Ye){var ft=window.getComputedStyle(ie,Ye),Ft=ft.getPropertyValue("content");if(Ft===""||Ft==="none")return;var Tt=e.uid();le.className=le.className+" "+Tt;var at=document.createElement("style");at.appendChild(yt(Tt,Ye,ft)),le.appendChild(at);function yt(_t,Re,ot){var jt="."+_t+":"+Re,zt=ot.cssText?qt(ot):ui(ot);return document.createTextNode(jt+"{"+zt+"}");function qt(_i){var ln=_i.getPropertyValue("content");return _i.cssText+" content: "+ln+";"}function ui(_i){return e.asArray(_i).map(ln).join("; ")+";";function ln(Rn){return Rn+": "+_i.getPropertyValue(Rn)+(_i.getPropertyPriority(Rn)?" !important":"")}}}}}function ze(){ie instanceof HTMLTextAreaElement&&(le.innerHTML=ie.value),ie instanceof HTMLInputElement&&le.setAttribute("value",ie.value)}function Ge(){le instanceof SVGElement&&(le.setAttribute("xmlns","http://www.w3.org/2000/svg"),le instanceof SVGRectElement&&["width","height"].forEach(function(Ae){var Ye=le.getAttribute(Ae);Ye&&le.style.setProperty(Ae,Ye)}))}}}function x(A){return i.resolveAll().then(function(Y){var X=document.createElement("style");return A.appendChild(X),X.appendChild(document.createTextNode(Y)),A})}function D(A){return r.inlineAll(A).then(function(){return A})}function E(A,Y,X){return Promise.resolve(A).then(function(ne){return ne.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(ne)}).then(e.escapeXhtml).then(function(ne){return'<foreignObject x="0" y="0" width="100%" height="100%">'+ne+"</foreignObject>"}).then(function(ne){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+Y+'" height="'+X+'">'+ne+"</svg>"}).then(function(ne){return"data:image/svg+xml;charset=utf-8,"+ne})}function M(){return{escape:Ge,parseExtension:Y,mimeType:X,dataAsUrl:ze,isDataUrl:ne,canvasToBlob:ce,resolveUrl:ie,getAndEncode:je,uid:le(),delay:Ae,asArray:Ye,escapeXhtml:ft,makeImage:Se,width:Ft,height:Tt};function A(){var yt="application/font-woff",_t="image/jpeg";return{woff:yt,woff2:yt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:_t,jpeg:_t,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function Y(yt){var _t=/\.([^\.\/]*?)$/g.exec(yt);return _t?_t[1]:""}function X(yt){var _t=Y(yt).toLowerCase();return A()[_t]||""}function ne(yt){return yt.search(/^(data:)/)!==-1}function pe(yt){return new Promise(function(_t){for(var Re=window.atob(yt.toDataURL().split(",")[1]),ot=Re.length,jt=new Uint8Array(ot),zt=0;zt<ot;zt++)jt[zt]=Re.charCodeAt(zt);_t(new Blob([jt],{type:"image/png"}))})}function ce(yt){return yt.toBlob?new Promise(function(_t){yt.toBlob(_t)}):pe(yt)}function ie(yt,_t){var Re=document.implementation.createHTMLDocument(),ot=Re.createElement("base");Re.head.appendChild(ot);var jt=Re.createElement("a");return Re.body.appendChild(jt),ot.href=_t,jt.href=yt,jt.href}function le(){var yt=0;return function(){return"u"+_t()+yt++;function _t(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function Se(yt){return new Promise(function(_t,Re){var ot=new Image;ot.onload=function(){_t(ot)},ot.onerror=Re,ot.src=yt})}function je(yt){var _t=3e4;return o.impl.options.cacheBust&&(yt+=(/\?/.test(yt)?"&":"?")+new Date().getTime()),new Promise(function(Re){var ot=new XMLHttpRequest;ot.onreadystatechange=qt,ot.ontimeout=ui,ot.responseType="blob",ot.timeout=_t,ot.open("GET",yt,!0),ot.send();var jt;if(o.impl.options.imagePlaceholder){var zt=o.impl.options.imagePlaceholder.split(/,/);zt&&zt[1]&&(jt=zt[1])}function qt(){if(ot.readyState===4){if(ot.status!==200){jt?Re(jt):_i("cannot fetch resource: "+yt+", status: "+ot.status);return}var ln=new FileReader;ln.onloadend=function(){var Rn=ln.result.split(/,/)[1];Re(Rn)},ln.readAsDataURL(ot.response)}}function ui(){jt?Re(jt):_i("timeout of "+_t+"ms occured while fetching resource: "+yt)}function _i(ln){console.error(ln),Re("")}})}function ze(yt,_t){return"data:"+_t+";base64,"+yt}function Ge(yt){return yt.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function Ae(yt){return function(_t){return new Promise(function(Re){setTimeout(function(){Re(_t)},yt)})}}function Ye(yt){for(var _t=[],Re=yt.length,ot=0;ot<Re;ot++)_t.push(yt[ot]);return _t}function ft(yt){return yt.replace(/#/g,"%23").replace(/\n/g,"%0A")}function Ft(yt){var _t=at(yt,"border-left-width"),Re=at(yt,"border-right-width");return yt.scrollWidth+_t+Re}function Tt(yt){var _t=at(yt,"border-top-width"),Re=at(yt,"border-bottom-width");return yt.scrollHeight+_t+Re}function at(yt,_t){var Re=window.getComputedStyle(yt).getPropertyValue(_t);return parseFloat(Re.replace("px",""))}}function I(){var A=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:pe,shouldProcess:Y,impl:{readUrls:X,inline:ne}};function Y(ce){return ce.search(A)!==-1}function X(ce){for(var ie=[],le;(le=A.exec(ce))!==null;)ie.push(le[1]);return ie.filter(function(Se){return!e.isDataUrl(Se)})}function ne(ce,ie,le,Se){return Promise.resolve(ie).then(function(ze){return le?e.resolveUrl(ze,le):ze}).then(Se||e.getAndEncode).then(function(ze){return e.dataAsUrl(ze,e.mimeType(ie))}).then(function(ze){return ce.replace(je(ie),"$1"+ze+"$3")});function je(ze){return new RegExp(`(url\\(['"]?)(`+e.escape(ze)+`)(['"]?\\))`,"g")}}function pe(ce,ie,le){if(Se())return Promise.resolve(ce);return Promise.resolve(ce).then(X).then(function(je){var ze=Promise.resolve(ce);return je.forEach(function(Ge){ze=ze.then(function(Ae){return ne(Ae,Ge,ie,le)})}),ze});function Se(){return!Y(ce)}}}function z(){return{resolveAll:A,impl:{readAll:Y}};function A(){return Y(document).then(function(X){return Promise.all(X.map(function(ne){return ne.resolve()}))}).then(function(X){return X.join(`
`)})}function Y(){return Promise.resolve(e.asArray(document.styleSheets)).then(ne).then(X).then(function(ce){return ce.map(pe)});function X(ce){return ce.filter(function(ie){return ie.type===CSSRule.FONT_FACE_RULE}).filter(function(ie){return n.shouldProcess(ie.style.getPropertyValue("src"))})}function ne(ce){var ie=[];return ce.forEach(function(le){try{e.asArray(le.cssRules||[]).forEach(ie.push.bind(ie))}catch(Se){console.log("Error while reading CSS rules from "+le.href,Se.toString())}}),ie}function pe(ce){return{resolve:function(){var le=(ce.parentStyleSheet||{}).href;return n.inlineAll(ce.cssText,le)},src:function(){return ce.style.getPropertyValue("src")}}}}}function G(){return{inlineAll:Y,impl:{newImage:A}};function A(X){return{inline:ne};function ne(pe){return e.isDataUrl(X.src)?Promise.resolve():Promise.resolve(X.src).then(pe||e.getAndEncode).then(function(ce){return e.dataAsUrl(ce,e.mimeType(X.src))}).then(function(ce){return new Promise(function(ie,le){X.onload=ie,X.onerror=le,X.src=ce})})}}function Y(X){if(!(X instanceof Element))return Promise.resolve(X);return ne(X).then(function(){return X instanceof HTMLImageElement?A(X).inline():Promise.all(e.asArray(X.childNodes).map(function(pe){return Y(pe)}))});function ne(pe){var ce=pe.style.getPropertyValue("background");return ce?n.inlineAll(ce).then(function(ie){pe.style.setProperty("background",ie,pe.style.getPropertyPriority("background"))}).then(function(){return pe}):Promise.resolve(pe)}}}})(x3t)});function nVi(t,e){if(t&1&&(h(0,"div",15)(1,"div",16,0)(3,"div",17,1),y(5),p(),h(6,"div",17,2),y(8),p()()()),t&2){let n=w();g(),b("ngStyle",bs(5,iVi,n.fontFamily,n.fontWeight)),g(2),b("ngStyle",n.getStyle(0)),g(2),ye(n.blocks[0].text),g(),b("ngStyle",n.getStyle(1)),g(2),ye(n.blocks[1].text)}}var S3t,UNi,jNi,$Ni,KNi,YNi,qNi,w3t,ZNi,XNi,QNi,JNi,eVi,tVi,iVi,Ire,d9e=Q(()=>{S3t=Gs(b3t());Zi();An();ri();ih();Jr();Vt();me();j5();ji();Vt();An();UNi=["block"],jNi=["firstBlock"],$Ni=["secondBlock"],KNi=()=>({value:700,text:"700"}),YNi=()=>({value:800,text:"800"}),qNi=()=>({value:900,text:"900"}),w3t=(t,e,n)=>[t,e,n],ZNi=()=>({value:"#3c3b3f",text:"grau"}),XNi=()=>({value:"#121818",text:"fast schwarz"}),QNi=(t,e)=>[t,e],JNi=()=>({value:.015,text:"wenig"}),eVi=()=>({value:.0225,text:"mittle"}),tVi=()=>({value:.03,text:"viel"}),iVi=(t,e)=>({background:"#b8860b",fontFamily:t,fontWeight:e});Ire=(()=>{let e=class e{set firstBlock(i){this.blocks[0].elementRef=i}set secondBlock(i){this.blocks[1].elementRef=i}get resultMaxHeight(){return this.resultMaxWidth/4}resetPadding(){return new Promise((i,r)=>{requestAnimationFrame(()=>{this.blocks[0].paddingX=0,this.blocks[0].paddingY=0,this.blocks[1].paddingX=this.resultMaxWidth*this.multiplier,this.blocks[1].paddingY=0,i()})})}constructor(i,r){this.downloadService=i,this.dialogRef=r,this.resultMaxWidth=1e3,this.multiplier=.03,this.color2="#3c3b3f",this.blocks=[{text:"Capone",fontSize:50,paddingX:0,paddingY:0},{text:"hat nun Hayat",fontSize:50,paddingX:this.resultMaxWidth*this.multiplier,paddingY:0}],this.fontFamily="Montserrat",this.fontWeight=800}ngOnInit(){return O(this,null,function*(){})}ngOnDestroy(){}getStyle(i){let r={textTransform:"uppercase",lineHeight:1,fontSize:this.blocks[i].fontSize+"px",paddingTop:this.blocks[i].paddingY+"px",paddingBottom:this.blocks[i].paddingY+"px",paddingLeft:this.blocks[i].paddingX+"px",paddingRight:this.blocks[i].paddingX+"px",letterSpace:"10px"};return i===1&&(r.backgroundColor=this.color2),r.marginLeft=this.resultMaxWidth*this.multiplier+"px",r.marginRight=this.resultMaxWidth*this.multiplier+"px",r.marginBottom=this.resultMaxWidth*this.multiplier+"px",r.paddingLeft=this.resultMaxWidth*this.multiplier+"px",r.paddingRight=this.resultMaxWidth*this.multiplier+"px",this.blocks[i].text?r.display="":r.display="none",i===1&&!this.blocks[0].text&&(r.marginLeft="0px",r.marginRight="0px",r.marginBottom="0px"),i===0&&!this.blocks[1].text&&(r.marginLeft="0px",r.marginRight="0px",r.marginBottom="0px"),i===0&&this.blocks[0].text&&this.blocks[1].text&&(r.marginLeft="0px",r.marginRight="0px",r.marginBottom="0px",r.paddingLeft="0",r.paddingRight="0"),r.fontFamily=this.fontFamily,r.fontWeight=this.fontWeight,r}download(i){return O(this,null,function*(){i&&(yield this.autoFormat()),requestAnimationFrame(()=>{S3t.default.toPng(this.blockElement.nativeElement,{quality:1}).then(r=>{let s=new Image;s.src=r,this.downloadService.downloadBase64(this.blocks[0].text+" - "+this.blocks[1].text+".png",r)}).catch(r=>{console.error("oops, something went wrong!",r)})})})}autoFormat(){return O(this,null,function*(){yield this.resetPadding(),this.blocks[0].fontSize=1,this.blocks[1].fontSize=1;let i=this.resultMaxWidth;this.blocks[0].text&&(i=yield this.setFontSize(this.blocks[0],this.resultMaxWidth));let r=this.blocks[0].fontSize,s=i;this.blocks[1].text&&(s=yield this.setFontSize(this.blocks[1],i)),i>s&&this.blocks[0].text&&(yield this.setFontSize(this.blocks[0],s)),this.blocks[0].fontSize>this.blocks[1].fontSize||(this.blocks[1].fontSize+=3)})}setFontSize(i,r){return new Promise((s,o)=>{let a=0;i.elementRef.nativeElement.clientWidth>r?a=-1:i.elementRef.nativeElement.clientWidth<r&&(a=1),i.fontSize+=a,requestAnimationFrame(()=>{let l=Math.abs(i.elementRef.nativeElement.clientWidth-r),c=Math.abs(i.elementRef.nativeElement.clientHeight-this.resultMaxHeight);l>10&&c>10?s(this.setFontSize(i,r)):s(i.elementRef.nativeElement.clientWidth)})})}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(X1),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-header-double-block"]],viewQuery:function(r,s){if(r&1&&(ei(UNi,5),ei(jNi,5),ei($Ni,5)),r&2){let o;Pt(o=Rt())&&(s.blockElement=o.first),Pt(o=Rt())&&(s.firstBlock=o.first),Pt(o=Rt())&&(s.secondBlock=o.first)}},standalone:!0,features:[xe],decls:17,vars:30,consts:[["block",""],["firstBlock",""],["secondBlock",""],["fxLayout","column",1,"nxt-page"],["fxLayout","row","fxLayoutAlign","space-around center"],["fxFlex","35","placeholder","Text oben",3,"valueChange","value"],["fxFlex","35","placeholder","Text unten",3,"valueChange","value"],["placeholder","Schriftdicke","fxFlex","20",3,"valueChange","options","value"],["placeholder","Farbe 2","fxFlex","20",3,"valueChange","options","value"],["placeholder","Abstand","fxFlex","20",3,"valueChange","options","value"],["fxFlex","10","placeholder","Breite (px)",3,"valueChange","isNumber","value"],["fxFlex","100","fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column",1,"bottom-bar"],["fxLayout","row","fxLayoutAlign","space-around center",2,"position","fixed","bottom","25px","left","0","right","0"],[3,"click"],["fxFlex","100","fxLayout","column","fxLayoutAlign","center center"],["fxLayout","column","fxLayoutAlign","center center",1,"block",3,"ngStyle"],[3,"ngStyle"]],template:function(r,s){r&1&&(h(0,"div",3)(1,"div",4)(2,"nxt-input",5),Xe("valueChange",function(a){return Ze(s.blocks[0].text,a)||(s.blocks[0].text=a),a}),p(),h(3,"nxt-input",6),Xe("valueChange",function(a){return Ze(s.blocks[1].text,a)||(s.blocks[1].text=a),a}),p(),h(4,"nxt-select",7),Xe("valueChange",function(a){return Ze(s.fontWeight,a)||(s.fontWeight=a),a}),p(),h(5,"nxt-select",8),Xe("valueChange",function(a){return Ze(s.color2,a)||(s.color2=a),a}),p(),h(6,"nxt-select",9),Xe("valueChange",function(a){return Ze(s.multiplier,a)||(s.multiplier=a),a}),p(),h(7,"nxt-input",10),Xe("valueChange",function(a){return Ze(s.resultMaxWidth,a)||(s.resultMaxWidth=a),a}),p()(),W(8,nVi,9,8,"div",11),h(9,"div",12)(10,"div",13)(11,"nxt-button",14),F("click",function(){return s.autoFormat()}),y(12,"hayat"),p(),h(13,"nxt-button",14),F("click",function(){return s.download(!0)}),y(14,"hayat + herunterladen"),p(),h(15,"nxt-button",14),F("click",function(){return s.close()}),y(16,"schlie\xDFen"),p()()()()),r&2&&(g(2),qe("value",s.blocks[0].text),g(),qe("value",s.blocks[1].text),g(),b("options",Qm(14,w3t,bn(11,KNi),bn(12,YNi),bn(13,qNi))),qe("value",s.fontWeight),g(),b("options",bs(20,QNi,bn(18,ZNi),bn(19,XNi))),qe("value",s.color2),g(),b("options",Qm(26,w3t,bn(23,JNi),bn(24,eVi),bn(25,tVi))),qe("value",s.multiplier),g(),b("isNumber",!0),qe("value",s.resultMaxWidth),g(),b("ngIf",!0))},dependencies:[At,Yt,oi,qi,Yi,$l,Ct,rr,Dn,rs,Lt],styles:["[_nghost-%COMP%]{width:100%;height:100%}.block[_ngcontent-%COMP%]{font-family:Montserrat Black;color:#fff}table[_ngcontent-%COMP%]{text-align:center}"]});let t=e;return t})()});var T3t,D3t=Q(()=>{Ul();go();me();ma();Cs();T3t=(()=>{let e=class e{constructor(i,r){this.route=i,this.configService=r,this.route.snapshot.queryParams.data?this.data=Qn.parse(this.route.snapshot.queryParams.data):this.data={code:"XX-1234-5678-9999",value:100,createdAt:Date.now(),name:"Max Mustermann"}}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-tattoo-ticket-pdf"]],standalone:!0,features:[xe],decls:14,vars:7,consts:[[1,"flex","flex-col","h-full"],[1,"text-[40px]","w-full","text-center"],[1,"flex","flex-row","h-full","justify-center"],[1,"flex","flex-col","justify-center","items-center","h-full"],[2,"height","5cm",3,"src"],[1,"grow","flex","flex-col","justify-center","text-[22px]","gap-4","pl-5"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),y(2,"TATTOO-TICKET"),p(),h(3,"div",2)(4,"div",3),ee(5,"img",4),p(),h(6,"div",5)(7,"div"),y(8),p(),h(9,"div"),y(10),p(),h(11,"div"),y(12),Ce(13,"nxtDate"),p()()()()),r&2&&(g(5),b("src","../../../../assets/logo/studio/logo_"+s.configService.config.value.studioRegion.toLowerCase()+"_dark.svg",Ur),g(3),Ke("Name: ",s.data.name,""),g(2),Ke("Tattoo-Ticket: ",s.data.code,""),g(2),Ke("Bestelldatum: ",Nt(13,4,s.data.createdAt,"dd.MM.yyyy"),""))},dependencies:[Hn],styles:["@page{size:210mm 105mm;margin:10mm}"]});let t=e;return t})()});var Are,E3t=Q(()=>{zn();Vd();jc();BX();Bd();M7();Qo();Are=class{constructor(e){this.backofficeComponent=e,this.newEventsColumnDefs=[{headerName:"",field:"id",nxtFieldType:Ee.ShowCalendarEvent,minWidth:50,maxWidth:50},{headerName:"",field:"id",nxtFieldType:Ee.ShowEventHistory,minWidth:50,maxWidth:50},{headerName:"Erstellt",field:"created",hide:!1,nxtFieldType:Ee.Date_germanTime,sortable:!0},{headerName:"Ersteller",field:"createdBy",hide:!1,sortable:!0},{headerName:"Aktualisiert von",field:"updatedBy",hide:!1,nxtFieldType:Ee.Text,sortable:!0},{headerName:"Arbeitsplatz",field:"createdByWorkplace",hide:!1,valueGetter:n=>Cg.getText(n.data.createdByWorkplace),sortable:!0},{headerName:"Promo",field:"promoOfferId",hide:!1,sortable:!0,nxtFieldType:Ee.Text},{headerName:"Angebot",field:"discountPromotion",valueGetter:n=>{if(n.data.discountPromotion)return n.data.discountPromotion.name},hide:!1,sortable:!0,nxtFieldType:Ee.Text},{headerName:"Studio Erstellt",field:"createdByStudio",sortable:!0},{headerName:"Studio Termin",field:"studio",sortable:!0},{headerName:"Arbeit",field:"workType",valueFormatter:n=>n.value.replace("tattoo","Tattoo").replace("piercing","Piercing")},{headerName:"Termin",field:"start",cellRenderer:n=>Ie.format(n.data.start,"dd.MM.yyyy HH:mm")+" - "+Ie.format(n.data.end,"HH:mm")},{headerName:"T\xE4towierer",field:"artist",sortable:!0},{headerName:"akt. von",field:"updatedBy",hide:!0},{headerName:"aktualisiert",field:"updatedAt",nxtFieldType:Ee.Date_germanDateTime,hide:!0},{headerName:"Wert",field:"valence",nxtFieldType:Ee.Decimal,aggFunc:"sum",sortable:!0},{headerName:"Preis",field:"priceEstimatedFrom",nxtFieldType:Ee.Money,aggFunc:"sum",sortable:!0},{headerName:"Dauer - Preis",field:"",nxtFieldType:Ee.Text,valueGetter:n=>{if(n.data.workType==="tattoo")return F7.timeCheck(n.data.end-n.data.start,n.data.priceEstimatedFrom).calculatedPriceDiff},valueFormatter:n=>{if(n.value)return n.value>0?"+"+Wn.toMoneyString(n.value):Wn.toMoneyString(n.value)},minWidth:110,maxWidth:110,cellStyle:n=>Math.abs(n.value)>50?Math.abs(n.value)>=100?{textAlign:"right",color:xn.Red}:{textAlign:"right",color:xn.Orange}:{textAlign:"right"},hide:!this.backofficeComponent.permissionService.hasPermission(Zt.ShowDurationPriceCheckColumn)},{headerName:"bezahlt",field:"paymentSum",nxtFieldType:Ee.Money,aggFunc:"sum",minWidth:90,maxWidth:90},{headerName:"Artist",field:"artistTotalGet",cellRenderer:n=>{if(n.data.artistTotalGet)return Math.round(n.data.artistPercentage)+" %"}},{headerName:"Kunde",field:"",valueGetter:n=>{if(n.data.customerObj)return n.data.customerObj.givenName+" "+n.data.customerObj.familyName}},{headerName:"Motiv",field:"tattooMotive"},{headerName:"Wichtig",field:"importantInfo",cellStyle:{color:xn.Red}},{headerName:"Titel",field:"title",hide:!0}]}get createdEventsColumnDefs(){return this._createdEventsColumnDefs||(this._createdEventsColumnDefs=[{headerName:"Ge\xE4ndert",field:"updatedAt",hide:!1,nxtFieldType:Ee.Date_germanTime,sortable:!0},...this.newEventsColumnDefs.filter(e=>e.headerName!=="Erstellt")]),this._createdEventsColumnDefs}}});function lVi(t,e){if(t&1&&ee(0,"nxt-datagrid",6,0),t&2){let n=w();b("columnDefs",n.currentView==="created"?n.columnDefs.newEventsColumnDefs:n.columnDefs.createdEventsColumnDefs)("disableAllSort",!0)("quickFilterText",n.quickFilterText)("rowData",n.currentView==="created"?n.backofficeViewData.calendarEventsCreated:n.backofficeViewData.calendarEventsChanged)("showFooter",!0)("showSideBar",!1)("autoSizeColumnOnResize",!0)}}function cVi(t,e){if(t&1&&(h(0,"div")(1,"table",16)(2,"tr")(3,"td"),y(4,"Backoffice"),p(),h(5,"td"),y(6,"|"),p(),h(7,"td"),y(8),p(),h(9,"td"),y(10,"|"),p(),h(11,"td"),y(12),p()(),h(13,"tr")(14,"td"),y(15,"Empfang"),p(),h(16,"td"),y(17,"|"),p(),h(18,"td"),y(19),p(),h(20,"td"),y(21,"|"),p(),h(22,"td"),y(23),p()()()()),t&2){let n=w(2);g(8),cn("",n.newEventCalcData.eventCountBackoffice," Termine / ",n.newEventCalcData.percentageBackoffice," %"),g(4),cn("",n.newEventCalcData.valenceBackoffice," Wert / ",n.newEventCalcData.valencePercentageBackoffice," %"),g(7),cn("",n.newEventCalcData.eventCountReception," Termine / ",n.newEventCalcData.percentageReception," %"),g(4),cn("",n.newEventCalcData.valenceReception," Wert / ",n.newEventCalcData.valencePercentageReception," %")}}function dVi(t,e){if(t&1){let n=re();h(0,"div",7)(1,"div",8)(2,"div",9)(3,"div")(4,"div",10),y(5),p(),h(6,"div",10),y(7),p()(),W(8,cVi,24,8,"div",11),p()(),h(9,"div",12)(10,"nxt-date-picker",13),Xe("nxtModelChange",function(r){V(n);let s=w();return Ze(s.dateString,r)||(s.dateString=r),B(r)}),F("nxtModelChange",function(){V(n);let r=w();return B(r.dateChanged())}),p()(),h(11,"div",8)(12,"div",14)(13,"div")(14,"div",15),y(15),Ce(16,"money"),p(),h(17,"div",15),y(18),p()()()()()}if(t&2){let n=w();g(5),Ke("",n.backofficeViewData==null?null:n.backofficeViewData.calendarEventsCreated.length," Termine davon"),g(2),cn("",n.newEventCalcData.eventCountTattoo," Tattoo | ",n.newEventCalcData.eventCountPiercing," Piercing"),g(),b("ngIf",(n.backofficeViewData==null?null:n.backofficeViewData.calendarEventsCreated.length)>0),g(2),b("showJumpDayButtons",!0),qe("nxtModel",n.dateString),b("showTodayButton",!0),g(5),Ke("Gesamt: ",tt(16,9,n.newEventCalcData.totalPrice),""),g(3),Ke("Wertigkeit: ",n.newEventCalcData.totalValence,"")}}var rVi,sVi,oVi,aVi,Pre,u9e=Q(()=>{Vb();zn();E3t();Pa();kl();Il();th();ri();s3();Vt();Pm();Am();Tf();Im();Df();me();zy();yi();Kr();Ci();GX();jl();ji();Vt();rVi=["newEventsDataGrid"],sVi=()=>({text:"Angelegt",value:"created"}),oVi=()=>({text:"Aktualisiert",value:"changed"}),aVi=(t,e)=>[t,e];Pre=(()=>{let e=class e extends i2{constructor(i,r,s,o,a,l,c){super(),this.firestoreService=i,this.socketService=r,this.loginService=s,this.dialogService=o,this.windowService=a,this.permissionService=l,this.dialogRef=c,this.dateString=Ie.format(Date.now(),"yyyy-MM-dd"),this.columnDefs=new Are(this),this.quickFilterText="",this.totalBank=0,this.total_=0,this.newEventCalcData={totalPrice:0,totalValence:0,reception:0,percentageBackoffice:0,percentageReception:0,valenceBackoffice:0,valencePercentageBackoffice:0,valencePercentageReception:0,valenceReception:0,eventCountBackoffice:0,eventCountReception:0,eventCountTattoo:0,eventCountTattooBackoffice:0,eventCountTattooReception:0,eventCountTattooReceptionPercentage:0,eventCountTattooBackofficePercentage:0,eventCountPiercing:0,eventCountPiercingBackoffice:0,eventCountPiercingReception:0,eventCountPiercingReceptionPercentage:0,eventCountPiercingBackofficePercentage:0},this.currentView="created",this.loadData=()=>O(this,null,function*(){if(this.loginService.isBackoffice()){let d=yield this.socketService.getBackofficeViewData(this.dateString);this.setBackofficeViewData(d)}else this.dialogService.showOk("Keine Berechtigungen (Nur Backoffice)"),this.loginService.reLogin(!1)}),this.windowService.setTitle("Backoffice"),this.initAuthenticationListener(),this.loadData()}ngOnInit(){return O(this,null,function*(){this.subscribeServerData()})}ngOnDestroy(){}subscribeServerData(){return O(this,null,function*(){this.pushSocketSubscription=this.socketService.subscribeNew("getBackofficeViewData",i=>{this.setBackofficeViewData(i)})})}initAuthenticationListener(){this.socketService.state.subscribe(i=>O(this,null,function*(){i.authenticated&&setTimeout(()=>{this.loadData()},1)}))}dateChanged(){this.loadData()}calcNewEventsData(){this.newEventCalcData.totalPrice=this.backofficeViewData.calendarEventsCreated.reduce((r,s)=>r+s.priceEstimatedFrom,0),this.newEventCalcData.totalValence=fn.round(this.backofficeViewData.calendarEventsCreated.reduce((r,s)=>r+s.valence,0),1),this.newEventCalcData.valenceBackoffice=fn.round(this.backofficeViewData.calendarEventsCreated.filter(r=>r.createdByWorkplace==="backoffice").reduce((r,s)=>r+s.valence,0),1),this.newEventCalcData.valenceReception=fn.round(this.newEventCalcData.totalValence-this.newEventCalcData.valenceBackoffice,1),this.newEventCalcData.valencePercentageBackoffice=Math.round(this.newEventCalcData.valenceBackoffice/this.newEventCalcData.totalValence*100),this.newEventCalcData.valencePercentageReception=100-this.newEventCalcData.valencePercentageBackoffice,this.newEventCalcData.eventCountBackoffice=this.backofficeViewData.calendarEventsCreated.filter(r=>r.createdByWorkplace==="backoffice").length;let i=this.backofficeViewData.calendarEventsCreated.length;this.newEventCalcData.eventCountReception=i-this.newEventCalcData.eventCountBackoffice,this.newEventCalcData.percentageBackoffice=Math.round(this.newEventCalcData.eventCountBackoffice/i*100),this.newEventCalcData.percentageReception=100-this.newEventCalcData.percentageBackoffice,this.newEventCalcData.eventCountTattoo=this.backofficeViewData.calendarEventsCreated.filter(r=>r.workType==="tattoo").length,this.newEventCalcData.eventCountTattooBackoffice=this.backofficeViewData.calendarEventsCreated.filter(r=>r.workType==="tattoo"&&r.createdByWorkplace==="backoffice").length,this.newEventCalcData.eventCountTattooReception=this.newEventCalcData.eventCountTattoo-this.newEventCalcData.eventCountTattooBackoffice,this.newEventCalcData.eventCountTattooReceptionPercentage=Math.round(this.newEventCalcData.eventCountTattooReception/this.newEventCalcData.eventCountTattoo*100),this.newEventCalcData.eventCountTattooBackofficePercentage=100-this.newEventCalcData.eventCountTattooReceptionPercentage,this.newEventCalcData.eventCountPiercing=this.backofficeViewData.calendarEventsCreated.length-this.newEventCalcData.eventCountTattoo,this.newEventCalcData.eventCountPiercingBackoffice=this.backofficeViewData.calendarEventsCreated.filter(r=>r.workType==="piercing"&&r.createdByWorkplace==="backoffice").length,this.newEventCalcData.eventCountPiercingReception=this.newEventCalcData.eventCountPiercing-this.newEventCalcData.eventCountPiercingBackoffice,this.newEventCalcData.eventCountPiercingReceptionPercentage=Math.round(this.newEventCalcData.eventCountPiercingReception/this.newEventCalcData.eventCountPiercing*100),this.newEventCalcData.eventCountPiercingBackofficePercentage=100-this.newEventCalcData.eventCountPiercingReceptionPercentage}setBackofficeViewData(i){i.calendarEventsCreated=i.calendarEventsCreated.sortNumber("createdAt",!0),i.calendarEventsChanged=i.calendarEventsChanged.sortNumber("updatedAt",!0),this.backofficeViewData=i,this.calcNewEventsData()}};e.\u0275fac=function(r){return new(r||e)(R(ff),R(lt),R(Fi),R(vt),R(QA),R(ws),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-backoffice"]],viewQuery:function(r,s){if(r&1&&ei(rVi,5),r&2){let o;Pt(o=Rt())&&(s.nxtDataGrid=o.first)}},standalone:!0,features:[et,xe],decls:10,vars:11,consts:[["newEventsDataGrid",""],[3,"dialogRef"],["valueKey","value","direction","row","textKey","text",3,"valueChange","value","options"],["fxFlex","","fxLayout","row",2,"border","0px solid green"],["fxFlex","","name","Backoffice",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","autoSizeColumnOnResize",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center","style","border: 0px solid yellow",4,"ngIf"],["fxFlex","","name","Backoffice",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","autoSizeColumnOnResize"],["fxLayout","row","fxLayoutAlign","center center",2,"border","0px solid yellow"],["fxLayout","column","fxFlex","50","fxLayoutAlign","center"],["fxLayout","row","fxLayoutAlign","space-around center"],[1,"nxt-text-80"],[4,"ngIf"],["fxFlex","300px","fxLayout","column"],[2,"width","305px",3,"nxtModelChange","showJumpDayButtons","nxtModel","showTodayButton"],["fxLayout","row","fxLayoutAlign","space-around"],[1,"nxt-text"],[1,"workplace-data-table","nxt-text-80"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",1)(2,"nxt-page-header-title"),y(3),p(),h(4,"nxt-radio",2),Xe("valueChange",function(a){return Ze(s.currentView,a)||(s.currentView=a),a}),p()(),h(5,"nxt-page-content")(6,"div",3),W(7,lVi,2,7,"nxt-datagrid",4),p(),W(8,dVi,19,11,"div",5),p(),ee(9,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(2),ye(s.currentView==="created"?"Erstellte Termine":"Aktualisierte Termine"),g(),qe("value",s.currentView),b("options",bs(8,aVi,bn(6,sVi),bn(7,oVi))),g(3),b("ngIf",s.backofficeViewData&&s.backofficeViewData.calendarEventsCreated),g(),b("ngIf",s.backofficeViewData))},dependencies:[At,Yt,oi,qi,tm,Ct,dr,tl,ks,Pl,Yl,hc,Al,Kl],styles:[".workplace-data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 3px;text-align:right}.studio-data-table[_ngcontent-%COMP%]{border-collapse:collapse;font-size:90%}.studio-data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){text-align:right}.studio-data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(3){text-align:right}.studio-data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid gray;padding:4px 6px}.tr-small[_ngcontent-%COMP%]{font-size:80%}"]});let t=e;return t})()});var Rre,M3t=Q(()=>{Nu();Qo();Rre=class{constructor(e){this.studioFeeComponent=e,this.dateMoney=[{headerName:"Datum",field:"date",nxtFieldType:Ee.Date_germanDateWithDayOfWeek,cellStyle:{textAlign:"right"},minWidth:150,maxWidth:150},{headerName:"Tresor",field:"_value",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:100,maxWidth:100},{headerName:"Klarna "+cr.arrowRight+" Bank",field:"klarnaIncoming",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:120,maxWidth:120},{headerName:"Kasse "+cr.arrowRight+" Bank",field:"cashToBank",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:120,maxWidth:120},{headerName:"Bank "+cr.arrowRight+" Kasse",field:"bankToCash",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:120,maxWidth:120},{headerName:"Einlage "+cr.arrowRight+" Kasse",field:"privateToCash",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:130,maxWidth:130},{headerName:"Kasse "+cr.arrowRight+" Einlage",field:"cashToPrivate",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:130,maxWidth:130},{headerName:"Paypal",field:"paypalIncoming",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:95,maxWidth:95},{headerName:"Paypal Gutschein",field:"paypalGiftCardIncoming",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:130,maxWidth:130},{headerName:"Paypal R\xFCck-Zahlungen",field:"paypalOutgoing",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:120,maxWidth:120},{headerName:"Bank Zahlungen",field:"bankIncoming",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:130,maxWidth:130},{headerName:"Bank R\xFCck-Zahlungen",field:"bankOutgoing",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:160,maxWidth:160},{headerName:"Gesamt",field:"incomingTotal",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right",fontWeight:"bold"},minWidth:120,maxWidth:120}],this.cashOutgoings=[{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateTime,minWidth:140,maxWidth:140},{headerName:"Betrag",field:"value",nxtFieldType:Ee.Money,minWidth:90,maxWidth:90},{headerName:"Beschreibung",field:"description",valueGetter:n=>(n.data._?"_":"")+n.data.description,minWidth:150,maxWidth:150},{headerName:"Steuersatz",field:"vatPercentage",nxtFieldType:Ee.Percentage,minWidth:80,maxWidth:80},{headerName:"Erfasst von",field:"createdBy",nxtFieldType:Ee.Text},{headerName:"Beleg von",field:"originalCreatedBy",nxtFieldType:Ee.Text}]}}});function uVi(t,e){t&1&&(h(0,"div",7)(1,"div",8),y(2,"lade PDF..."),p()())}function hVi(t,e){if(t&1&&(ee(0,"object",9),Ce(1,"safeResourceUrl")),t&2){let n=w();b("data",tt(1,1,n.iframeSrc),y8)}}var Fre,h9e=Q(()=>{Ci();zn();sA();Zi();ri();Vt();me();ji();yi();Ci();Kr();Vt();Fre=(()=>{let e=class e{constructor(i,r,s,o){this.dialogRef=i,this.socketService=r,this.dialogService=s,this.loginService=o}getInvoiceExternStudio(i){return O(this,null,function*(){try{let r=yield this.socketService.getInvoiceExternStudio(i);this.iframeSrc="data:application/pdf;base64,"+r,this.pdfBase64=r.base64;let s=Ie.parseFormat(i.invoiceDateString,"dd.MM.yyyy","yyyy-MM-dd");this.filename=i.invoiceNumber+".pdf"}catch(r){if(r.message&&r.message.indexOf("_Es kann keine")===0)this.dialogService.showOk(r.message,{title:"Info"});else throw r}})}getInvoiceFromInvoiceForm(i){return O(this,null,function*(){try{let r=yield this.socketService.getInvoiceFromInvoiceForm(i);this.iframeSrc="data:application/pdf;base64,"+r,this.pdfBase64=r.base64,this.filename=i.invoiceNumber+".pdf"}catch(r){if(r.message&&r.message.indexOf("_Es kann keine")===0)this.dialogService.showOk(r.message,{title:"Info"});else throw r}})}download(){let i=this.iframeSrc,r=document.createElement("a"),s=this.filename;r.href=i,r.download=s,r.click()}ngOnInit(){return O(this,null,function*(){})}loadData(){return O(this,null,function*(){})}close(){this.dialogRef.close()}print(){return O(this,null,function*(){this.dialogService.showLoading(_n.PrintPdf,"Wird gedruckt...");let i=yield this.socketService.printPdf({studio:this.loginService.getStudio(),pdfBase64:this.pdfBase64});i==="OK"&&(i="Erfolgreich zum Drucker gesendet"),this.dialogService.hideLoading(_n.PrintPdf),yield this.dialogService.showOk(i)})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-pdf-loader"]],standalone:!0,features:[xe],decls:15,vars:5,consts:[["fxLayout","column",1,"nxt-page-modal",2,"width","70vw","height","90vh","border-radius","4px"],["fxFlex","","fxLayoutAlign","center center",4,"ngIf"],["fxFlex","","type","application/pdf",3,"data",4,"ngIf"],[2,"height","16px"],["fxLayout","row","fxLayoutAlign","space-between"],[1,"flex","justify-center","items-center","gap-2"],[3,"click"],["fxFlex","","fxLayoutAlign","center center"],[2,"font-size","24px"],["fxFlex","","type","application/pdf",3,"data"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2),Ce(3,"json"),p(),W(4,uVi,3,0,"div",1)(5,hVi,2,3,"object",2),ee(6,"div",3),h(7,"div",4)(8,"div",5)(9,"nxt-button",6),F("click",function(){return s.download()}),y(10,"herunterladen"),p(),h(11,"nxt-button",6),F("click",function(){return s.print()}),y(12,"drucken"),p(),h(13,"nxt-button",6),F("click",function(){return s.close()}),y(14,"schlie\xDFen"),p()()()()),r&2&&(g(2),ye(tt(3,3,s.filename)),g(2),b("ngIf",!s.iframeSrc),g(),b("ngIf",s.iframeSrc))},dependencies:[At,Yt,oi,qi,Ct,Lt,nk,h5],styles:["[_nghost-%COMP%]     body{overflow-y:scroll}div[_ngcontent-%COMP%]{font-size:11px}.events-header[_ngcontent-%COMP%]{font-size:12px}.artist[_ngcontent-%COMP%]{font-size:14px}"]});let t=e;return t})()});function pVi(t,e){if(t&1){let n=re();h(0,"div",18)(1,"nxt-button-icon",15),F("click",function(){V(n);let r=w();return B(r.close())}),y(2,"close"),p()()}}function mVi(t,e){if(t&1){let n=re();h(0,"div",14)(1,"div",19),y(2),h(3,"nxt-button-icon",15),F("click",function(){let r=V(n).index,s=w();return B(s.removePos(r))}),y(4,"delete"),p()(),ee(5,"nxt-input",20)(6,"nxt-input",21)(7,"nxt-input",22),p()}if(t&2){let n=e.$implicit,i=e.index;g(2),Ke("",i+1," "),g(3),b("nxtFormControl",n.get("name")),g(),b("isNumber",!0)("nxtFormControl",n.get("amount")),g(),b("isMoney",!0)("nxtFormControl",n.get("unitPrice"))}}var UF,Lre=Q(()=>{qn();Ep();h9e();tp();Zi();ox();th();Jr();ls();ri();Vt();nc();me();ji();qn();yi();Ci();Vt();UF=(()=>{let e=class e{constructor(i,r,s,o){this.dialogRef=i,this.formBuilder=r,this.socketService=s,this.dialogService=o,this.positions=[],this.form=this.formBuilder.group({invoiceNumber:new $t(null,[ii.requiredAndNotNaN],"Rechnungsnummer"),invoiceDate:new $t(null,[ii.requiredAndNotNaN],"Rechnungsdatum"),recipientSalutation:new $t(null,[ii.requiredAndNotNaN],"Anrede"),recipientName:new $t(null,[ii.requiredAndNotNaN],"Name"),recipientName2:new $t(null,[],"Name zweite Zeile"),recipientStreet:new $t(null,[ii.requiredAndNotNaN],"Stra\xDFe"),recipientPostalCode:new $t(null,[ii.requiredAndNotNaN],"PLZ"),recipientCity:new $t(null,[ii.requiredAndNotNaN],"Ort"),customerNumber:new $t(null,[ii.requiredAndNotNaN],"Kundennummer")})}addPos(i="",r=1,s){this.positions.push(this.formBuilder.group({name:new $t(i,[ii.requiredAndNotNaN],"Position-Name"),amount:new $t(r,[ii.requiredAndNotNaN],"Menge"),unitPrice:new $t(s,[ii.requiredAndNotNaN],"Einzelpreis")}))}generateInvoice(){return O(this,null,function*(){let i=[];if(this.positions.length===0&&i.push("Mindestens eine Position"),this.positions.forEach(a=>i.push(...Is.getErrors(a))),!Is.showErrorsTrueIfNoError(this.form,this.dialogService,i))return;let r=this.form.getRawValue(),s={invoiceTitle:"Rechnung",invoiceDate:r.invoiceDate,invoiceNumber:r.invoiceNumber,positions:this.positions.map((a,l)=>St(ve({},a.getRawValue()),{posNumber:l+1})),to:{name:r.recipientName,name2:r.recipientName2,salutation:r.recipientSalutation,city:r.recipientCity,countryCode:"DE",customerNumber:r.customerNumber,street:r.recipientStreet,postalCode:r.recipientPostalCode}};this.dialogService.showComponentDialog(Fre).componentInstance.getInvoiceFromInvoiceForm(s).then()})}removePos(i){this.positions=this.positions.filter((r,s)=>i!==s)}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(ad),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-invoice-form"]],standalone:!0,features:[xe],decls:25,vars:11,consts:[["fxLayout","column",1,"nxt-page",2,"overflow","auto"],["fxLayoutAlign","end","fxLayout","row",4,"ngIf"],["fxLayout","row","fxLayoutGap","15px"],["placeholder","Rechnungsnummer",3,"nxtFormControl"],["placeholder","Kundennummer",3,"nxtFormControl"],["width","350px","placeholder","Rechnungsdatum",3,"nxtFormControl"],[3,"formControl"],["value","Frau",1,"mx-3"],["value","Herrn",1,"mx-3"],["placeholder","Name",3,"nxtFormControl"],["placeholder","Name Zweite Zeile",3,"nxtFormControl"],["placeholder","Stra\xDFe + Nummer",3,"nxtFormControl"],["placeholder","PLZ",3,"nxtFormControl"],["placeholder","Ort",3,"nxtFormControl"],["fxLayout","row","fxLayoutAlign","center start"],[3,"click"],["fxLayout","row","fxLayoutAlign","center start",4,"ngFor","ngForOf"],["fxFlex","","fxLayout","row","fxLayoutAlign","center start"],["fxLayoutAlign","end","fxLayout","row"],["fxLayout","row","fxLayoutAlign","center center",1,"nxt-text","pos-number"],["placeholder","Bezeichnung",3,"nxtFormControl"],["placeholder","Menge",3,"isNumber","nxtFormControl"],["placeholder","Einzelpreis",3,"isMoney","nxtFormControl"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,pVi,3,0,"div",1),h(2,"div",2),ee(3,"nxt-input",3)(4,"nxt-input",4)(5,"nxt-date-picker",5),p(),h(6,"mat-radio-group",6)(7,"mat-radio-button",7),y(8,"Frau"),p(),h(9,"mat-radio-button",8),y(10,"Herr"),p()(),h(11,"div",2),ee(12,"nxt-input",9)(13,"nxt-input",10),p(),ee(14,"nxt-input",11),h(15,"div",2),ee(16,"nxt-input",12)(17,"nxt-input",13),p(),h(18,"div",14)(19,"nxt-button",15),F("click",function(){return s.addPos()}),y(20,"Neue Position"),p()(),W(21,mVi,8,6,"div",16),h(22,"div",17)(23,"nxt-button",15),F("click",function(){return s.generateInvoice()}),y(24,"Rechnung erstellen"),p()()()),r&2&&(g(),b("ngIf",s.dialogRef),g(2),b("nxtFormControl",s.form.get("invoiceNumber")),g(),b("nxtFormControl",s.form.get("customerNumber")),g(),b("nxtFormControl",s.form.get("invoiceDate")),g(),b("formControl",s.form.get("recipientSalutation")),g(6),b("nxtFormControl",s.form.get("recipientName")),g(),b("nxtFormControl",s.form.get("recipientName2")),g(),b("nxtFormControl",s.form.get("recipientStreet")),g(2),b("nxtFormControl",s.form.get("recipientPostalCode")),g(),b("nxtFormControl",s.form.get("recipientCity")),g(4),b("ngForOf",s.positions))},dependencies:[At,Yt,$r,oi,qi,Ct,an,Yi,tl,hg,ko,Ko,Ia,$c,h2,Lt,Hi],styles:[".pos-number[_ngcontent-%COMP%]{padding:1em}"]});let t=e;return t})()});function fVi(t,e){if(t&1){let n=re();h(0,"nxt-button",1),F("click",function(){V(n);let r=w();return B(r.createClicked())}),y(1,"Weiter"),p()}}var k3t,I3t=Q(()=>{Gi();ri();Zi();pS();me();ji();yi();k3t=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.dialogRef=i,this.cdRef=r,this.socketService=s}ngOnInit(){}nxtOnDestroy(){}createClicked(){return O(this,null,function*(){this.dialogRef.close(this.dateRange)})}closeClicked(){return O(this,null,function*(){this.dialogRef.close()})}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Kt),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-studio-fee-klarna-invoice"]],standalone:!0,features:[et,xe],decls:7,vars:2,consts:[[3,"valueChange","value"],[3,"click"],[3,"click",4,"ngIf"]],template:function(r,s){r&1&&(h(0,"div")(1,"div"),y(2,"Klarna Rechnung erstellen"),p(),h(3,"nxt-date-range-picker",0),Xe("valueChange",function(a){return Ze(s.dateRange,a)||(s.dateRange=a),a}),p(),h(4,"nxt-button",1),F("click",function(){return s.closeClicked()}),y(5,"Abbrechen"),p(),W(6,fVi,2,0,"nxt-button",2),p()),r&2&&(g(3),qe("value",s.dateRange),g(3),b("ngIf",s.dateRange))},dependencies:[$g,Lt,Ct],changeDetection:0});let t=e;return t})()});function gVi(t,e){if(t&1){let n=re();h(0,"div",1),ee(1,"nxt-datagrid",2),h(2,"div",3)(3,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(4,"schlie\xDFen"),p(),h(5,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.createInvoiceClicked())}),y(6,"Rechnung erstellen"),p()()()}if(t&2){let n=w();g(),b("columnDefs",n.columnDefs)("rowData",n.shopOrders)("showFooter",!0)}}var A3t,P3t=Q(()=>{Qo();Lre();zn();Zi();Pa();Vt();ri();me();E8();Ci();Cs();Vt();A3t=(()=>{let e=class e{constructor(i,r,s){this.dialogRef=i,this.dialogService=r,this.configService=s,this.columnDefs=[{headerName:"Name",valueGetter:o=>o.data.billingFirstName+" "+o.data.billingLastName},{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDate},{headerName:"Wert",valueGetter:o=>o.data.lineItems.reduce((a,l)=>a+l.value,0),nxtFieldType:Ee.Money},{headerName:"Beschreibung",valueGetter:o=>o.data.lineItems.map(a=>a.name),nxtFieldType:Ee.Text},{headerName:"Rabatt",field:"discountTotal",nxtFieldType:Ee.Money},{headerName:"Rabatt %",valueGetter:o=>{let a=o.data.lineItems.reduce((l,c)=>l+c.value,0);return 100-a/(a+o.data.discountTotal)*100},nxtFieldType:Ee.Percentage},{headerName:"Bezahlt",field:"paymentValue",nxtFieldType:Ee.Money},{headerName:"R\xFCckerstattung",valueGetter:o=>o.data.klarnaRawOrder?.refunded_amount?o.data.klarnaRawOrder.refunded_amount/100:0,nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"}},{headerName:"R\xFCckerstattung am",valueGetter:o=>o.data.klarnaRawOrder?.refunded_amount?o.data.klarnaRawOrder.refunds[0].refunded_at.dateFormat("dd.MM.yyyy"):"",nxtFieldType:Ee.Text,cellStyle:{textAlign:"right"}},{headerName:"Shop-ID",field:"id",nxtFieldType:Ee.Text,nxtOnCellDoubleClicked:o=>{let a=this.configService.config.value.shopUrl+"/wp-admin/post.php?post="+o.data.id+"&action=edit";window.open(a,"_blank")}}]}ngOnInit(){debugger;console.log(this.shopOrders),console.log(this.dateRange)}createInvoiceClicked(){let i=this.dialogService.showComponentFull(UF);i.componentInstance.form.get("recipientName").setValue("Oliver Peters"),i.componentInstance.form.get("recipientName2").setValue("NXT-LVL.INK Aschaffenburg"),i.componentInstance.form.get("recipientStreet").setValue("Seestra\xDFe 3"),i.componentInstance.form.get("recipientPostalCode").setValue("63741"),i.componentInstance.form.get("recipientCity").setValue("Aschaffenburg"),i.componentInstance.form.get("recipientSalutation").setValue("Herr"),i.componentInstance.form.get("invoiceDate").setValue(Ie.formatNowDate());let r=this.shopOrders.reduce((s,o)=>o.paymentValue-o.klarnaRawOrder.refunded_amount/100+s,0);i.componentInstance.addPos("Klarna Umsatz "+this.dateRange.from.dateFormat("dd.MM.yyyy")+" - "+this.dateRange.till.dateFormat("dd.MM.yyyy"),1,r)}};e.\u0275fac=function(r){return new(r||e)(R(Jf,8),R(vt),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-studio-fee-klarna-orders-component"]],inputs:{shopOrders:"shopOrders",dateRange:"dateRange"},standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","h-100 w-full","fxLayout","column",4,"ngIf"],["fxLayout","column",1,"h-100","w-full"],["excelExportName","Studio-Abgaben Klarna-Zahlungen",1,"h-100",3,"columnDefs","rowData","showFooter"],["fxLayout","row","fxLayoutAlign","center center",1,"pt-2"],[3,"click"]],template:function(r,s){r&1&&W(0,gVi,7,3,"div",0),r&2&&b("ngIf",s.shopOrders)},dependencies:[Ct,At,Yt,oi,dr,Lt]});let t=e;return t})()});var R3t,F3t=Q(()=>{me();Gi();qn();g2();Jr();Zi();ji();ef();Ci();tp();nc();me();R3t=(()=>{let e=class e extends bt{constructor(){super(),this.itemsSafe=["Gehalt (angestellt)","Reinigung","Getr\xE4nke"],this.itemsNormal=["Gehalt (angestellt)","Miete","Reinigung","Nebenkosten","Werbung","Versicherung","Geb\xFChren (PP, etc)","Stuff","Sonstiges"],this.isNewCost=gt(!1),this.isSafe=gt(!1),this.dialogRef=Ve(Gt),this.dialogService=Ve(vt),this.form=new Wl({id:new Cn("",[],"ID"),description:new Cn("",[ii.requiredAndNotNaN],"Beschreibung"),value:new Cn(null,[ii.requiredAndNotNaN],"Betrag")})}ngOnInit(){}nxtOnDestroy(){}setData(i,r){this.isSafe.set(r),this.isNewCost.set(!i.id),i.id||(i.id=ua.generate()),this.form.setValue(i)}cancelClicked(){this.dialogRef.close()}saveClicked(){Is.showErrorsTrueIfNoError(this.form,this.dialogService)&&this.dialogRef.close(this.form.getRawValue())}descriptionClicked(){return O(this,null,function*(){let i=this.isSafe()?this.itemsSafe:this.itemsNormal;this.form.controls.description.value&&(i.includes(this.form.controls.description.value)||i.push(this.form.controls.description.value));let r=yield this.dialogService.showButtonChooser({title:"Beschreibung",buttonRows:[i]});if(r)if(r==="Sonstiges"){let s=yield this.dialogService.showInput({message:"Beschreibung"});if(s.toLowerCase()==="gesamt")return;s&&this.form.controls.description.setValue(s)}else this.form.controls.description.setValue(r.toString())})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-studio-fee-cost-edit"]],standalone:!0,features:[et,xe],decls:11,vars:4,consts:[[1,"flex","flex-col"],[3,"click","readonly","nxtFormControl"],[3,"isMoney","nxtFormControl"],[1,"flex","flex-row","justify-between","p-2"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div")(2,"div")(3,"nxt-input",1),F("click",function(){return s.descriptionClicked()}),p()(),h(4,"div"),ee(5,"nxt-input",2),p()(),h(6,"div",3)(7,"nxt-button",4),F("click",function(){return s.cancelClicked()}),y(8,"Abbrechen"),p(),h(9,"nxt-button",4),F("click",function(){return s.saveClicked()}),y(10,"Speichern"),p()()()),r&2&&(g(3),b("readonly",!0)("nxtFormControl",s.form.controls.description),g(2),b("isMoney",!0)("nxtFormControl",s.form.controls.value))},dependencies:[Yi,Lt],changeDetection:0});let t=e;return t})()});function vVi(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.addNewCostClicked())}),y(1,"Neue Ausgabe hinzuf\xFCgen"),p()}}var L3t,O3t=Q(()=>{me();Gi();Pa();Qo();Ph();Ci();F3t();$n();Zi();ji();P0();pa();ri();me();L3t=(()=>{let e=class e extends bt{constructor(){super(),this.costs=gt([]),this.canEdit=gt(!0),this.title=gt(""),this.isSafe=gt(!1),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt),this.costTypes=["Gehalt","Miete","Reinigung","Nebenkosten"],this.columnDefs=[{headerName:"",nxtFieldType:Ee.Icon,nxtIcon:Ir.Material.Edit,nxtOnCellClicked:i=>this.editClicked(i.data),hide:!this.canEdit()},{headerName:"",nxtFieldType:Ee.Icon,nxtIcon:Ir.Material.Delete,nxtOnCellClicked:i=>this.deleteClicked(i.data),hide:!this.canEdit()},{headerName:"Beschreibung",field:"description",nxtFieldType:Ee.Text},{headerName:"Betrag",field:"value",nxtFieldType:Ee.Money,maxWidth:100,minWidth:100}]}setData(i,r,s,o){this.costs.set(i||[]),this.title.set(s),this.canEdit.set(r),this.isSafe.set(o)}ngOnInit(){}nxtOnDestroy(){}editClicked(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(R3t);r.componentInstance.setData(i,this.isSafe());let s=yield Sn(r.afterClosed());s&&this.costs.update(o=>(o=o.filter(a=>a.id!==i.id),o.push(s),o))})}addNewCostClicked(){this.editClicked({id:"",value:null,description:""})}closeClicked(){this.dialogRef.close(this.costs())}testAdd(){this.costs.update(i=>(i.push({id:"abc",description:"Test abc hier dies",value:1299.91}),so(i)))}deleteClicked(i){return O(this,null,function*(){(yield this.dialogService.showYesNo(i.value.toMoneyString()+" "+i.description+" l\xF6schen?"))&&this.costs.update(s=>s.filter(o=>o.id!==i.id))})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-studio-fee-costs"]],standalone:!0,features:[et,xe],decls:9,vars:5,consts:[[1,"flex","flex-col"],[1,"text-120","p-2"],[1,"w-[500px]","h-[400px]"],[3,"rowData","columnDefs","sizeColumnsToFit"],[1,"flex","flex-row","justify-around","pt-3"],[3,"click"],[3,"click",4,"ngIf"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),y(2),p(),h(3,"div",2),ee(4,"nxt-datagrid",3),p(),h(5,"div",4)(6,"nxt-button",5),F("click",function(){return s.closeClicked()}),y(7,"Schlie\xDFen"),p(),W(8,vVi,2,0,"nxt-button",6),p()()),r&2&&(g(2),ye(s.title()),g(2),b("rowData",s.costs())("columnDefs",s.columnDefs)("sizeColumnsToFit",!0),g(4),b("ngIf",s.canEdit()))},dependencies:[dr,Lt,Ct]});let t=e;return t})()});function yVi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",13),F("click",function(){V(n);let r=w();return B(r.showBottom=!1)}),y(1,"arrow_downward"),p()}}function _Vi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",13),F("click",function(){V(n);let r=w();return B(r.showBottom=!0)}),y(1,"arrow_upward"),p()}}function CVi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",17),F("click",function(){V(n);let r=w();return B(r.downloadOutgoingImages())}),y(1,"download"),p()}}function xVi(t,e){if(t&1){let n=re();h(0,"div",18)(1,"nxt-slide-toggle",9),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.useFix,r)||(s.useFix=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.show())}),y(2,"korrektur"),p(),h(3,"nxt-slide-toggle",9),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.useFix_2022_11_19,r)||(s.useFix_2022_11_19=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.show())}),y(4,"fix 2022-11"),p(),h(5,"nxt-slide-toggle",9),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.useFix_2023_03_16,r)||(s.useFix_2023_03_16=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.show())}),y(6,"fix 2023-02"),p()()}if(t&2){let n=w();g(),qe("value",n.useFix),g(2),qe("value",n.useFix_2022_11_19),g(2),qe("value",n.useFix_2023_03_16)}}function bVi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",13),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function wVi(t,e){if(t&1&&ee(0,"nxt-datagrid",19),t&2){let n=w();b("columnDefs",n.columnDefs.dateMoney)("disableAllSort",!0)("quickFilterText",n.quickFilterText)("rowData",n.data.dates)("showFooter",!0)("showSideBar",!1)}}function SVi(t,e){if(t&1&&ee(0,"nxt-datagrid",20),t&2){let n=w();b("fxFlex",n.showOnlyOutgoings?"":"400px")("columnDefs",n.columnDefs.cashOutgoings)("disableAllSort",!0)("quickFilterText",n.quickFilterText)("rowData",n.data.cashOutgoings)("showFooter",!0)("showSideBar",!1)}}function TVi(t,e){if(t&1){let n=re();h(0,"div")(1,"table")(2,"tr")(3,"th",28),y(4,"TAGESSUMMEN"),p()(),h(5,"tr")(6,"td"),y(7,"_Kassen ausgaben"),p(),h(8,"td"),y(9),Ce(10,"money"),p()(),h(11,"tr")(12,"td"),y(13,"_Umsatz nach Kassenausgaben"),p(),h(14,"td"),y(15),Ce(16,"money"),p()(),h(17,"tr"),ee(18,"td",28),p(),h(19,"tr")(20,"td"),y(21,"Kasse -> Bank"),p(),h(22,"td"),y(23),Ce(24,"money"),p()(),h(25,"tr")(26,"td"),y(27,"Bank Kunden-Zahlungen"),p(),h(28,"td"),y(29),Ce(30,"money"),p()(),h(31,"tr")(32,"td"),y(33,"Klarna -> Bank"),p(),h(34,"td"),y(35),Ce(36,"money"),p()(),h(37,"tr")(38,"td"),y(39,"Paypal Kunden-Zahlungen"),p(),h(40,"td"),y(41),Ce(42,"money"),p()(),h(43,"tr")(44,"td"),y(45,"Paypal Gutscheine"),p(),h(46,"td"),y(47),Ce(48,"money"),p()(),h(49,"tr")(50,"td"),y(51,"Paypal Kunden-R\xFCckzahlungen"),p(),h(52,"td"),y(53),Ce(54,"money"),p()(),h(55,"tr")(56,"td"),y(57,"Bank -> Kasse"),p(),h(58,"td"),y(59),Ce(60,"money"),p()(),h(61,"tr")(62,"td"),y(63,"Kassen ausgaben"),p(),h(64,"td"),y(65),Ce(66,"money"),p()(),h(67,"tr")(68,"td"),y(69,"Umsatz nach Kassenausgaben"),p(),h(70,"td",13),F("click",function(){V(n);let r=w(3);return B(r.showIncomingGrossText())}),y(71),Ce(72,"money"),p()(),h(73,"tr"),ee(74,"td"),p(),h(75,"tr")(76,"td"),y(77,"Umsatz Gesamt"),p(),h(78,"td"),y(79),Ce(80,"money"),p()()()()}if(t&2){let n=w(3);g(9),Ke("- ",tt(10,12,n.data.cashOutgoingsValue_),""),g(6),ye(tt(16,14,n.data._value)),g(8),ye(tt(24,16,n.data.cashToBank)),g(6),ye(tt(30,18,n.data.bankIncoming)),g(6),ye(tt(36,20,n.data.klarnaIncoming)),g(6),ye(tt(42,22,n.data.paypalIncoming)),g(6),ye(tt(48,24,n.data.paypalGiftCardIncoming)),g(6),ye(tt(54,26,n.data.paypalOutgoing)),g(6),Ke("\xB1 ",tt(60,28,n.data.bankToCash),""),g(6),Ke("- ",tt(66,30,n.data.cashOutgoingsValue),""),g(6),ye(tt(72,32,n.data.incomingTotalGross-n.data._value)),g(8),ye(tt(80,34,n.data.incomingTotalGross))}}function DVi(t,e){if(t&1){let n=re();h(0,"nxt-input",40),Xe("valueChange",function(r){V(n);let s=w(4);return Ze(s.data.monthData.sideMoney,r)||(s.data.monthData.sideMoney=r),B(r)}),F("change",function(){V(n);let r=w(4);return B(r.monthDataChanged())}),p()}if(t&2){let n=w(4);b("readonly",n.data.monthData.dataInputFinished)("isMoney",!0),qe("value",n.data.monthData.sideMoney)}}function EVi(t,e){if(t&1){let n=re();h(0,"nxt-button",13),F("click",function(){V(n);let r=w(4);return B(r.dataInputFinish())}),y(1,"Ausgaben fertig"),p()}}function MVi(t,e){if(t&1){let n=re();h(0,"nxt-button",41),F("click",function(){V(n);let r=w(4);return B(r.dataInputOpen())}),y(1,"Ausgaben \xF6ffnen"),p()}}function kVi(t,e){t&1&&y(0," Rechnung ist bezahlt \u2705 ")}function IVi(t,e){t&1&&y(0," Tresor ist bezahlt \u2705 ")}function AVi(t,e){if(t&1){let n=re();h(0,"nxt-button",13),F("click",function(){V(n);let r=w(4);return B(r.finishMonth())}),y(1,"Rechnung als bezahlt markieren"),p()}}function PVi(t,e){if(t&1){let n=re();h(0,"nxt-button",13),F("click",function(){V(n);let r=w(4);return B(r.safeClosedClicked())}),y(1,"Tresor als bezahlt markieren"),p()}}function RVi(t,e){if(t&1){let n=re();h(0,"div",29)(1,"div",30)(2,"div",31),y(3,"Ausgaben"),p(),h(4,"nxt-input",32),Xe("valueChange",function(r){V(n);let s=w(3);return Ze(s.data.monthData.costsGross,r)||(s.data.monthData.costsGross=r),B(r)}),F("click",function(){V(n);let r=w(3);return B(r.costsGrossClicked())}),p(),h(5,"nxt-input",33),Xe("valueChange",function(r){V(n);let s=w(3);return Ze(s.data.monthData.costs_,r)||(s.data.monthData.costs_=r),B(r)}),F("click",function(){V(n);let r=w(3);return B(r.costs_Clicked())}),p(),h(6,"nxt-input",34),Xe("valueChange",function(r){V(n);let s=w(3);return Ze(s.data.monthData.privateCosts_,r)||(s.data.monthData.privateCosts_=r),B(r)}),F("change",function(){V(n);let r=w(3);return B(r.monthDataChanged())}),p(),W(7,DVi,1,3,"nxt-input",35)(8,EVi,2,0,"nxt-button",3)(9,MVi,2,0,"nxt-button",36),p(),h(10,"div",37)(11,"nxt-input",38),Xe("valueChange",function(r){V(n);let s=w(3);return Ze(s.data.monthData.discountGross,r)||(s.data.monthData.discountGross=r),B(r)}),F("change",function(){V(n);let r=w(3);return B(r.monthDataChanged())}),p(),W(12,kVi,1,0)(13,IVi,1,0)(14,AVi,2,0,"nxt-button",3)(15,PVi,2,0,"nxt-button",3),h(16,"nxt-button",13),F("click",function(){V(n);let r=w(3);return B(r.createInvoice())}),y(17,"Rechnung erstellen"),p(),h(18,"nxt-button",13),F("click",function(){V(n);let r=w(3);return B(r.export())}),y(19,"Daten exportieren"),p()(),ee(20,"div",39),p()}if(t&2){let n=w(3);g(4),b("readonly",!0)("isMoney",!0),qe("value",n.data.monthData.costsGross),g(),b("readonly",!0)("isMoney",!0),qe("value",n.data.monthData.costs_),g(),b("readonly",n.data.monthData.dataInputFinished)("isMoney",!0),qe("value",n.data.monthData.privateCosts_),g(),b("ngIf",!n.useKlarnaApi),g(),b("ngIf",!n.data.monthData.dataInputFinished),g(),b("ngIf",n.data.monthData.dataInputFinished),g(2),b("readonly",n.data.monthData.closed)("isMoney",!0),qe("value",n.data.monthData.discountGross),g(),Je(n.data.monthData.closed?12:-1),g(),Je(n.data.monthData.safeClosed?13:-1),g(),b("ngIf",!n.data.monthData.closed),g(),b("ngIf",!n.data.monthData.safeClosed)}}function FVi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Abgabe %"),p(),h(3,"td"),y(4),p()()),t&2){let n=w().$implicit;g(4),Ke("",n.feePercentage," %")}}function LVi(t,e){if(t&1&&(h(0,"tr",45)(1,"td"),y(2,"NXT Abgabe NXT"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w().$implicit;g(4),ye(tt(5,1,n.feeGross))}}function OVi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Brutto Gewinn nach Abgaben"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w().$implicit;g(4),ye(tt(5,1,n.profitAfterFeeGross))}}function NVi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"E-St"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w().$implicit;g(4),ye(tt(5,1,n.incomingTax))}}function VVi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Tasche"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w().$implicit;g(4),ye(tt(5,1,n.privateMoney))}}function BVi(t,e){if(t&1&&(h(0,"tr",45)(1,"td"),y(2,"NXT _Abgabe NXT"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w().$implicit;g(4),ye(tt(5,1,n.fee_))}}function zVi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"_ Tasche"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w().$implicit;g(4),ye(tt(5,1,n.privateMoney_))}}function HVi(t,e){t&1&&(h(0,"tr"),ee(1,"td",28),p())}function GVi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Tasche Gesamt"),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=w().$implicit;g(4),ye(tt(5,1,n.privateMoney+n.privateMoney_))}}function WVi(t,e){if(t&1&&(h(0,"div",42)(1,"table")(2,"tr")(3,"th",28),y(4),p()(),h(5,"tr")(6,"td"),y(7,"Gewinn Brutto"),p(),h(8,"td"),y(9),Ce(10,"money"),p()(),W(11,FVi,5,1,"tr",24)(12,LVi,6,3,"tr",43)(13,OVi,6,3,"tr",24),h(14,"tr")(15,"td"),y(16,"MwSt."),p(),h(17,"td"),y(18),Ce(19,"money"),p()(),h(20,"tr")(21,"td"),y(22,"Netto Gewinn nach Abgaben"),p(),h(23,"td"),y(24),Ce(25,"money"),p()(),W(26,NVi,6,3,"tr",24)(27,VVi,6,3,"tr",24),h(28,"tr"),ee(29,"td",28),p(),h(30,"tr")(31,"td"),y(32,"_Gewinn"),p(),h(33,"td"),y(34),Ce(35,"money"),p()(),h(36,"tr")(37,"td")(38,"strong"),y(39,"Gewinn Gesamt Brutto"),p()(),h(40,"td")(41,"strong"),y(42),Ce(43,"money"),p()()(),h(44,"tr",44)(45,"td")(46,"strong"),y(47,"Gewinn Gesamt Brutto ohne Kassenausgaben"),p()(),h(48,"td")(49,"strong"),y(50),Ce(51,"money"),p()()(),W(52,BVi,6,3,"tr",43)(53,zVi,6,3,"tr",24)(54,HVi,2,0,"tr",24)(55,GVi,6,3,"tr",24),p()()),t&2){let n=e.$implicit,i=e.index,r=w(3);g(4),ye(i===0&&r.data.feeCalcData.length>1?"AKTUELL":"ENDE VOM MONAT"),g(5),ye(tt(10,16,n.profitGross)),g(2),b("ngIf",n.feePercentage>0),g(),b("ngIf",n.feeGross>=.01),g(),b("ngIf",n.feePercentage>0),g(5),ye(tt(19,18,n.profitAfterFeeGross-n.profitAfterFeeNet)),g(6),ye(tt(25,20,n.profitAfterFeeNet)),g(2),b("ngIf",n.feePercentage>0),g(),b("ngIf",n.feePercentage>0),g(7),ye(tt(35,22,n.profit_)),g(8),ye(tt(43,24,n.profit_+n.profitGross)),g(8),ye(tt(51,26,n.profitWithoutOutgoings_+n.profitGrossWithoutOutgoings)),g(2),b("ngIf",n.fee_>=.01),g(),b("ngIf",n.profit_!==n.privateMoney_),g(),b("ngIf",n.fee_>=.01),g(),b("ngIf",n.fee_>=.01)}}function UVi(t,e){if(t&1){let n=re();h(0,"div",42)(1,"table")(2,"tr")(3,"th",28),y(4,"KOMMT NOCH REIN"),p()(),h(5,"tr")(6,"td"),y(7,"Gewinn Brutto"),p(),h(8,"td",46),F("contextmenu",function(r){V(n);let s=w(3);return B(s.copyForExcel(r,s.data.feeCalcData[1].profitGross-s.data.feeCalcData[0].profitGross))}),y(9),Ce(10,"money"),p()(),h(11,"tr")(12,"td"),y(13,"_Gewinn"),p(),h(14,"td",46),F("contextmenu",function(r){V(n);let s=w(3);return B(s.copyForExcel(r,s.data.feeCalcData[1].profit_-s.data.feeCalcData[0].profit_))}),y(15),Ce(16,"money"),p()()()()}if(t&2){let n=w(3);g(9),Ke("",tt(10,2,n.data.feeCalcData[1].profitGross-n.data.feeCalcData[0].profitGross)," "),g(6),Ke("",tt(16,4,n.data.feeCalcData[1].profit_-n.data.feeCalcData[0].profit_)," ")}}function jVi(t,e){if(t&1&&(h(0,"div",23),W(1,TVi,81,36,"div",24)(2,RVi,21,19,"div",25)(3,WVi,56,28,"div",26)(4,UVi,17,6,"div",27),p()),t&2){let n=w(2);g(),b("ngIf",n.data),g(),b("ngIf",n.monthYearString),g(),b("ngForOf",n.data.feeCalcData),g(),b("ngIf",n.data.feeCalcData.length>1)}}function $Vi(t,e){if(t&1&&(h(0,"div",21),W(1,jVi,5,4,"div",22),p()),t&2){let n=w();g(),b("ngIf",n.data)}}var Ore,p9e=Q(()=>{Ci();Vb();zn();M3t();h9e();Ul();Lre();kl();Yc();I3t();$n();P3t();Il();Zi();Jr();UA();Ja();Pa();il();oo();Mp();ls();ri();pS();Vt();O3t();me();yi();Kr();Ci();ma();R7();Cs();ug();ji();j5();Vt();Ore=(()=>{let e=class e extends i2{constructor(i,r,s,o,a,l,c,d,u){super(),this.socketService=i,this.loginService=r,this.dialogService=s,this.router=o,this.telegramService=a,this.configService=l,this.clipboard=c,this.dialogRef=d,this.downloadService=u,this.useKlarnaApi=!0,this.columnDefs=new Rre(this),this.monthYearString=Ie.format(Date.now(),"yyyy-MM"),this.costs=0,this.feePercentage=0,this.showBottom=!0,this.useFix=!0,this.useFix_2022_11_19=!0,this.useFix_2023_03_16=!0,this.dateFromTill={from:Ie.getFirstOfMonth(Date.now()).dateFormat("yyyy-MM-dd"),till:Ie.getLastDayOfMonth(Date.now()).dateFormat("yyyy-MM-dd")},this.showOnlyOutgoings=!1}ngOnInit(){return O(this,null,function*(){this.show()})}ngOnDestroy(){}show(){return O(this,null,function*(){this.loginService.isJulian()||(this.useFix_2022_11_19=!0,this.useFix_2023_03_16=!0),this.dialogService.showLoading(_n.StudioFeeLoading,"Lade Daten...");let i={useFix:this.useFix,useFix_2022_11_19:this.useFix_2022_11_19,useFix_2023_03_16:this.useFix_2023_03_16,useKlarnaApi:this.useKlarnaApi,appendKlarnaData:!0};i.fromDateString=this.dateFromTill.from,i.tillDateString=this.dateFromTill.till,this.data=yield this.socketService.getStudioFeeData(i),this.calcFee(),this.dialogService.hideLoading(_n.StudioFeeLoading)})}calcFee(){let i=this.data.incomingTotalGross-this.data.monthData.costsGross-this.data.monthData.costs_;i<2e4?this.feePercentage=20:i<3e4?this.feePercentage=.001*i+10:this.feePercentage=40}finishMonth(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Rechnung f\xFCr "+Ie.parseFormat(this.monthYearString,"yyyy-MM","MMMM yyyy")+" bezahlt?"))&&(this.data.monthData.closed=!0,yield this.socketService.setStudioFeeMonthData(St(ve({},this.data.monthData),{monthYear:this.monthYearString})),this.show(),this.dialogService.showOk("TipTop"))})}calcIncomingTax(i){return i<=9408?0:i<=14532?(972.87*(i-9408)/1e4+1400)*(i-9408)/1e4:i<=57051?(212.02*(i-14532)/1e4+2397)*(i-14532)/1e4+972.79:i<=270500?.42*i-8963.74:.45*i-17078.74}monthPickerChanged(i){i!==this.monthYearString&&(this.monthYearString=i,this.router.navigateByUrl("/studio-fee/"+this.monthYearString),this.show())}createInvoice(){return O(this,null,function*(){let i=yield(yield this.dialogService.showInputOld({message:"Rechnungsnummer",prompt:"RE"+this.configService.config.value.studioRegion+"00XX"})).afterClosed().toPromise();if(!i)return;let r=yield(yield this.dialogService.showInputOld({message:"Rechnungsdatum",prompt:Ie.format(Date.now(),"dd.MM.yyyy")})).afterClosed().toPromise();if(!r)return;let s=Ie.parseFormat(this.monthYearString,"yyyy-MM","MM/yyyy");this.dialogService.showComponentDialog(Fre).componentInstance.getInvoiceExternStudio({invoiceNumber:i,invoiceDateString:r,monthYearString:s,shouldBeValue:this.data.feeCalcData[0].feeGross,studio:this.configService.config.value.studioRegion,discountGross:this.data.monthData.discountGross}).then(),this.export()})}export(){let i=document.createElement("a"),r=Qn.stringifyFormat(ve({exportDate:Ie.todayDateString},this.data));i.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(r)),i.setAttribute("download","export_"+this.configService.config.value.studioRegion+"_"+this.monthYearString+".json"),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}dataInputFinish(){return O(this,null,function*(){let i=Ie.parseFormat(this.monthYearString,"yyyy-MM","MMMM yyyy");if(yield this.dialogService.showYesNo("Ausgaben f\xFCr "+i+" fertig eingetragen?")){let s=this.data.feeCalcData[this.data.feeCalcData.length-1].fee_,o=this.data.feeCalcData[this.data.feeCalcData.length-1].feeGross;this.telegramService.sendBackofficeHeads("Ausgaben f\xFCr "+i+` wurden best\xE4tigt! -> Rechnung erstellen!
_: `+s.toMoneyString()+`
normal: `+o.toMoneyString()),this.data.monthData.dataInputFinished=!0,yield this.socketService.setStudioFeeMonthData(St(ve({},this.data.monthData),{monthYear:this.monthYearString})),this.show(),this.dialogService.showOk("Viele Dank!")}})}dataInputOpen(){return O(this,null,function*(){let i=Ie.parseFormat(this.monthYearString,"yyyy-MM","MMMM yyyy");(yield this.dialogService.showYesNo("Ausgaben f\xFCr "+i+" wieder \xF6ffnen?"))&&(this.telegramService.sendBackofficeHeads("Ausgaben f\xFCr "+i+" wurden wieder ge\xF6ffnet"),this.data.monthData.dataInputFinished=!1,yield this.socketService.setStudioFeeMonthData(St(ve({},this.data.monthData),{monthYear:this.monthYearString})),this.show())})}invoiceForm(){this.dialogService.showComponentFull(UF)}showKlarnaInvoiceClicked(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(k3t),r=yield Sn(i.afterClosed());if(r){let s=yield this.socketService.getKlarnaShopOrdersBetweenWithRaw(r.from,r.till);this.dialogService.showComponentDialog(A3t,{shopOrders:s,dateRange:r},{minWidth:"70vw",minHeight:"70vh"})}})}showKlarna(){if(this.useKlarnaApi){let i=[];i.push('<table class="nxt-table">'),i.push("<tr><th>Studio</th><th>Auszahlung</th><th>R\xFCckzahlungen</th><th>Geb\xFChren<br/>(Anteilig)</th></tr>");for(let[r,s]of this.data.klarnaApiPayouts.sort(Hr.sortString("dateString")).entries()){let o='<tr><td colspan="5" style="text-align: center;">';o+='<div class="text-120">'+s.date.dateFormat("dd.MM.yyyy")+"</div>",o+="Auszahlung: "+s.totals.settlementAmount.toMoneyString(),o+=" | Bestellungen: "+s.totals.saleAmount.toMoneyString(),o+=" | R\xFCckzahlungen: "+s.totals.returnAmount.toMoneyString(),o+=" | Kosten: "+s.totals.costs.toMoneyString(),o+="</td></tr>",i.push(o);for(let a of s.studios)i.push("<tr>"),i.push("<td>"+a.studio+"</td>"),i.push('<td class="text-right">'+a.payoutValue.toMoneyString()+"</td>"),i.push('<td class="text-right">'+a.returnsAmountEuro.toMoneyString()+"</td>"),i.push('<td class="text-right">'+a.costsEuro.toMoneyString()+"</td>"),i.push("</tr>");r<this.data.klarnaApiPayouts.length-1&&i.push('<tr><td colspan="5">&nbsp;</td></tr>')}i.push("</table>"),this.dialogService.showOk(i.join(""))}}showIncomingGrossText(){this.dialogService.showOk(this.data.incomingGrossText)}copyForExcel(i,r){i.stopPropagation(),i.preventDefault(),this.clipboard.copy(fn.roundMoney(r).toString().replace(".",","))}downloadOutgoingImages(){return O(this,null,function*(){this.dialogService.showLoading(_n.Download,"Belege werden heruntergeladen...");let i=yield this.socketService.getOutgoingsImagesZip(this.data.cashOutgoings.map(r=>r.id));i.length>0?(this.downloadService.downloadBase64(this.loginService.getStudio()+"_Belege_"+this.monthYearString+".zip",i.zipBase64),setTimeout(()=>{this.dialogService.hideLoading(_n.Download)},3e3)):(this.dialogService.hideLoading(_n.Download),this.dialogService.showOk("Es gibt keine Belege"))})}ifFullMonth(){return this.dateFromTill.from===Ie.getFirstOfMonth(this.dateFromTill.from).dateFormat("yyyy-MM-dd")&&this.dateFromTill.till===Ie.getLastDayOfMonth(this.dateFromTill.till).dateFormat("yyyy-MM-dd")}dateRangeChanged(){this.monthYearString="",this.ifFullMonth()&&(this.monthYearString=this.dateFromTill.from.dateParse().dateFormat("yyyy-MM")),this.show()}monthDataChanged(){return O(this,null,function*(){yield this.socketService.setStudioFeeMonthData(St(ve({},this.data.monthData),{monthYear:this.monthYearString})),this.dateRangeChanged()})}toggleOutgoingsClicked(){this.showOnlyOutgoings=!this.showOnlyOutgoings}costsGrossClicked(){return O(this,null,function*(){this.editCosts(!1)})}editCosts(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(L3t),s=i?"Aufgeschl\xFCsselte Kosten (Safe)":"Aufgeschl\xFCsselte Studiokosten Brutto (Miete, Stuff)",o=i?this.data.monthData.costs_Detail:this.data.monthData.costsGrossDetail;r.componentInstance.setData(o,!this.data.monthData.dataInputFinished,s,i);let a=yield Sn(r.afterClosed());a&&(i?(this.data.monthData.costs_Detail=a,this.data.monthData.costs_=a.reduce((l,c)=>l+c.value,0)):(this.data.monthData.costsGrossDetail=a,this.data.monthData.costsGross=a.reduce((l,c)=>l+c.value,0)),this.monthDataChanged())})}costs_Clicked(){this.editCosts(!0)}safeClosedClicked(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Tresor f\xFCr "+Ie.parseFormat(this.monthYearString,"yyyy-MM","MMMM yyyy")+" bezahlt?"))&&(this.data.monthData.safeClosed=!0,yield this.socketService.setStudioFeeMonthData(St(ve({},this.data.monthData),{monthYear:this.monthYearString})),this.show())})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Fi),R(vt),R(Ll),R(p3),R(Xi),R(_u),R(Gt,8),R(X1))},e.\u0275cmp=_e({type:e,selectors:[["nxt-studio-fee"]],standalone:!0,features:[et,xe],decls:28,vars:12,consts:[["fxLayout","column",1,"nxt-page","nxt-text",2,"border","0px solid red"],["fxLayout","row","fxLayoutAlign","center center"],["placeholder","Von - Bis",3,"valueChange","value"],[3,"click",4,"ngIf"],["fxLayout","row"],["matTooltip","Rechnung erstellen",3,"click"],["matTooltip","Klarna Auszahlungen",3,"click"],["matTooltip","Klarna Buchungen",3,"click"],["matTooltip","Belege herunterladen",3,"click",4,"ngIf"],[3,"valueChange","value"],["nxtPermission","IsJulian",4,"ngIf"],["fxFlex","","fxLayout","row"],["fxFlex","","name","studioFeeOutgoings","uniqueRowDataKey","dateString","excelExportName","Studio-Abgaben Zahlen",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar",4,"ngIf"],[3,"click"],["name","cashOutgoings","excelExportName","Studio-Abgaben Ausgaben",3,"fxFlex","columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar",4,"ngIf"],[3,"trigger"],["class","text-80","style","overflow: auto;",4,"ngIf"],["matTooltip","Belege herunterladen",3,"click"],["nxtPermission","IsJulian"],["fxFlex","","name","studioFeeOutgoings","uniqueRowDataKey","dateString","excelExportName","Studio-Abgaben Zahlen",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar"],["name","cashOutgoings","excelExportName","Studio-Abgaben Ausgaben",3,"fxFlex","columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar"],[1,"text-80",2,"overflow","auto"],["fxLayout","row","style","padding-top:1em","fxLayoutGap","1em",4,"ngIf"],["fxLayout","row","fxLayoutGap","1em",2,"padding-top","1em"],[4,"ngIf"],["class","flex flex-row items-center justify-center gap-3",4,"ngIf"],["fxLayoutAlign","top center","fxLayout","column",4,"ngFor","ngForOf"],["fxLayoutAlign","top center","fxLayout","column",4,"ngIf"],["colspan","2"],[1,"flex","flex-row","items-center","justify-center","gap-3"],[1,"flex","h-full","flex-col","items-center","justify-center","gap-3","p-3","h-100","w-[180px]",2,"border","1px solid gray"],[1,"nxt-text-110",2,"text-align","center","padding","0.5em"],["placeholder","Studiokosten Brutto (Miete, Stuff)",3,"valueChange","click","readonly","isMoney","value"],["placeholder","Safe Kosten nach Kasse",3,"valueChange","click","readonly","isMoney","value"],["placeholder","private _ Ausgaben aus Kasse",3,"valueChange","change","readonly","isMoney","value"],["placeholder","Mehr durch Klarna",3,"readonly","isMoney","value","valueChange","change",4,"ngIf"],["nxtPermission","StudioFee_Admin",3,"click",4,"ngIf"],[1,"flex","h-full","flex-col","items-center","justify-center","gap-3","p-3","h-100","w-[210px]",2,"border","1px solid gray"],["placeholder","Rabatt",3,"valueChange","change","readonly","isMoney","value"],["fxFlex",""],["placeholder","Mehr durch Klarna",3,"valueChange","change","readonly","isMoney","value"],["nxtPermission","StudioFee_Admin",3,"click"],["fxLayoutAlign","top center","fxLayout","column"],["class","gold",4,"ngIf"],["nxtPermission","IsNoFranchise"],[1,"gold"],[3,"contextmenu"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"nxt-date-range-picker",2),Xe("valueChange",function(a){return Ze(s.dateFromTill,a)||(s.dateFromTill=a),a}),F("valueChange",function(){return s.dateRangeChanged()}),p(),h(3,"div"),W(4,yVi,2,0,"nxt-button-icon",3)(5,_Vi,2,0,"nxt-button-icon",3),p(),h(6,"div",4)(7,"nxt-button-icon",5),F("click",function(){return s.invoiceForm()}),y(8,"receipt_long"),p(),h(9,"nxt-button-icon",6),F("click",function(){return s.showKlarna()}),y(10,"attach_money"),p(),h(11,"nxt-button-icon",7),F("click",function(){return s.showKlarnaInvoiceClicked()}),y(12,"post_add"),p(),W(13,CVi,2,0,"nxt-button-icon",8),p(),h(14,"div")(15,"nxt-slide-toggle",9),Xe("valueChange",function(a){return Ze(s.useKlarnaApi,a)||(s.useKlarnaApi=a),a}),F("valueChange",function(){return s.show()}),y(16,"Neue Klarna Berechnung"),p()(),W(17,xVi,7,3,"div",10)(18,bVi,2,0,"nxt-button-icon",3),p(),h(19,"div",11),W(20,wVi,1,6,"nxt-datagrid",12),h(21,"div"),y(22,"\xA0"),p(),h(23,"mat-icon",13),F("click",function(){return s.toggleOutgoingsClicked()}),y(24),p(),W(25,SVi,1,7,"nxt-datagrid",14),p(),h(26,"nxt-smooth-height",15),W(27,$Vi,2,1,"div",16),p()()),r&2&&(g(2),qe("value",s.dateFromTill),g(2),b("ngIf",s.showBottom),g(),b("ngIf",!s.showBottom),g(8),b("ngIf",s.monthYearString),g(2),qe("value",s.useKlarnaApi),g(2),b("ngIf",!1),g(),b("ngIf",s.dialogRef),g(2),b("ngIf",s.data&&!s.showOnlyOutgoings),g(4),ye(s.showOnlyOutgoings?"arrow_right":"arrow_left"),g(),b("ngIf",s.data),g(),b("trigger",s.showBottom),g(),b("ngIf",s.showBottom))},dependencies:[At,Yt,$r,oi,qi,$g,Ct,an,dl,Nn,Zs,dr,Zr,A5,Yi,Lt,Hi,ks],styles:["table[_ngcontent-%COMP%]{border-collapse:collapse;font-size:90%}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){text-align:right}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(3){text-align:right}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{border:1px solid gray;padding:4px 6px}"]});let t=e;return t})()});var KVi,Nre,m9e=Q(()=>{Gi();ED();Ul();Yc();DD();Qo();ls();Vt();sx();me();yi();z1();Cs();ji();Vt();KVi=()=>["update","create"],Nre=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.socketService=i,this.bodyPutService=r,this.configService=s,this.dialogRef=o,this.propDefs=[{field:"birthday",name:"Sprache",type:Ee.Date_germanDate},{field:"lang",name:"Sprache",type:Ee.Text,valueGetter:a=>vf.getTextByCode(a)},{field:"telegramChatId",name:"Telegram",type:Ee.Text,valueGetter:a=>a?"verbunden":"nicht verbunden ("+a+")"},{field:"idNumber",name:"Ausweisnummer",type:Ee.Text},{field:"skills",name:"F\xE4higkeiten",type:Ee.Text,valueGetter:a=>Qn.stringify(a),textGetter:a=>{if(console.log(a),a.diff.op==="update"&&a.diff.val&&a.diff.oldVal){let l=Qn.parse(a.diff.oldVal),c=Qn.parse(a.diff.val),d=R0.getDiff(l,c);return d.length===0?"keine \xC4nderungen":(d.length>1?"<br />":"")+d.map(u=>typeof u.newValue=="boolean"?u.skill+" "+(u.oldValue?"Ja":"Nein")+" -> "+(u.newValue?"Ja":"Nein"):u.skill+" "+u.oldValue+" -> "+u.newValue).join("<br/>")}if(a.diff.op==="add"){let l=Qn.parse(a.value),c=[];c.push("Speed: "+l.speed);for(let d of l.skillValues)c.push(d.description+": "+d.value);for(let d of l.boolSkillValues)c.push(d.description+": "+(d.value?"Ja":"Nein"));return"<br />"+c.sort().join("<br/>")}}}],this.hiddenProps=["eventId","seqId","updatedBy","updatedAt","createdAt","createdBy"],this.debugProps=[],this.showTitle=!1,this.showDebug=!1,this.artistId="7d4f03bd-6b90-4bfd-b969-c11e8cf50c0a",this.hiddenProps.push(...this.debugProps)}setData(i){this.artistId=i}ngOnInit(){this.propDefs=this.propDefs.sort(Hr.sortString("name"))}nxtOnDestroy(){}prepareRawData(i){return i}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Oc),R(Xi),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-history"]],viewQuery:function(r,s){if(r&1&&ei($1,5),r&2){let o;Pt(o=Rt())&&(s.historyComponent=o.first)}},standalone:!0,features:[et,xe],decls:6,vars:6,consts:[["historyComponent",""],["fxLayout","column",1,"nxt-page","w-full","h-100"],["fxLayout","row","fxLayoutAlign","end"],[3,"click"],["table","artists",1,"w-full","h-100",3,"id","actions","propDefs","prepareRawData","hiddenProps"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"nxt-button-icon",3),F("click",function(){return V(o),B(s.close())}),y(3,"close"),p()(),ee(4,"nxt-history",4,0),p()}r&2&&(g(4),b("id",s.artistId)("actions",bn(5,KVi))("propDefs",s.propDefs)("prepareRawData",s.prepareRawData)("hiddenProps",s.hiddenProps))},dependencies:[At,Yt,oi,an,$1]});let t=e;return t})()});function YVi(t,e){if(t&1){let n=re();h(0,"nxt-datagrid",6),F("rowDoubleClick",function(r){V(n);let s=w();return B(s.rowDoubleClicked(r))}),p()}if(t&2){let n=w();b("columnDefs",n.columnDefs)("disableAllSort",!1)("quickFilterText",n.quickFilterText)("rowData",n.artistsFiltered)("showFooter",!1)("showSideBar",!1)("suppressCellSelection",!0)("enableRangeSelection",!1)("suppressRowHoverHighlight",!0)}}var Vre,f9e=Q(()=>{Pa();Ci();qA();Yc();jc();Ph();ive();Ep();qn();m9e();Qo();ls();ri();oo();Jr();il();Zi();Vt();Pm();Am();Tf();Im();Df();DD();me();yi();Ci();ji();j5();qn();Vt();Vre=(()=>{let e=class e{constructor(i,r,s,o,a){this.socketService=i,this.dialogService=r,this.dialogRef=s,this.downloadService=o,this.formBuilder=a,this.showSkills=!1,this.showInvoiceData=!1,this.showDisabledArtists=!1,this.filterArtistSkill=[],this.load(),this.columnDefs=this.getStaticColDefs()}getStars(i){let r="";for(let s=0;s<5;s++)i/2>=s+1?r+='<img src="/assets/images/grid-cell-renderer/star.svg"/>':i/2>=s+.5?r+='<img src="/assets/images/grid-cell-renderer/star_half.svg"/>':r+='<img src="/assets/images/grid-cell-renderer/star_border.svg"/>';return r}getHearts(i){let r="";for(let s=0;s<5;s++)i>=s+1?r+='<img src="/assets/images/grid-cell-renderer/heart.svg"/>':r+='<img src="/assets/images/grid-cell-renderer/heart_border.svg"/>';return r}getHtml(i,r,s){return`
        <div style="height:22px" fxLayout="row" fxLayoutAlign="start center">
            ${this.getStars(r)}
        </div>
    `}ngOnDestroy(){}ngOnInit(){}load(){return O(this,null,function*(){this.artistsAll=(yield this.socketService.getArtists()).sort(Hr.sortString("calendarNumber")),this.filterArtists()})}rowDoubleClicked(i){this.editArtist(i.data)}editArtist(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(Xy,null,{minHeight:"95vh",minWidth:"95vw"});i?r.componentInstance.setData(i.id):r.componentInstance.setData("new"),r.afterClosed().subscribe(s=>{s?.syncArtistFromAc&&this.syncFromAc(),this.load()})})}getStaticColDefs(){return[{headerName:"B",nxtOnCellClicked:r=>this.editArtist(r.data),cellStyle:{textAlign:"center"},cellRenderer:r=>Ir.Material.Edit,minWidth:60,maxWidth:60},{headerName:"H",nxtOnCellClicked:r=>this.showHistory(r.data),cellStyle:{textAlign:"center"},cellRenderer:r=>Ir.Material.History,minWidth:60,maxWidth:60},{headerName:"Kalender",field:"calendarNumber",cellStyle:r=>({color:r.data.disabled?xn.Red:"",textAlign:"center"}),nxtFieldType:Ee.Text,minWidth:80,maxWidth:80},{headerName:"Vertrag",nxtOnCellClicked:r=>this.downloadContract(r.data),cellStyle:{textAlign:"center"},cellRenderer:r=>Ir.Material.Download,minWidth:70,maxWidth:70},{headerName:"Fotos",field:"googlePhotosAlbumShareLink",cellStyle:{textAlign:"center"},cellRenderer:r=>r.data.googlePhotosAlbumShareLink?Ir.Material.Image:"",nxtFieldType:Ee.Icon,nxtOnCellClicked:r=>{r.data.googlePhotosAlbumShareLink&&window.open(r.data.googlePhotosAlbumShareLink,"_blank")}},{headerName:"K\xFCnstlername",field:"name",nxtFieldType:Ee.Text},{headerName:"Name",field:"invoiceData.name",nxtFieldType:Ee.Text},{headerName:"RE",field:"invoiceData.numberRange",nxtFieldType:Ee.Text},{headerName:"Geburtstag",field:"birthday",nxtFieldType:Ee.Date_germanDate},{headerName:"Handy",field:"mobile",nxtFieldType:Ee.Text},{headerName:"Instagram",field:"instagram",nxtFieldType:Ee.Text,nxtOnCellClicked:r=>{window.open("https://instagram.com/"+r.value,"_blank")}},{headerName:"Vertrag",field:"contractSigned",nxtFieldType:Ee.Boolean},{colId:"Farbe",headerName:"Farbe",nxtFieldType:Ee.Text,minWidth:70,maxWidth:70,cellRenderer:r=>this.getBoolSkillCellValue(r.data,"Farbe"),hide:!0},{colId:"Farbe Fineline",headerName:"Farbe Finel.",nxtFieldType:Ee.Text,minWidth:100,maxWidth:100,cellRenderer:r=>this.getBoolSkillCellValue(r.data,"Farbe Fineline"),hide:!0},{colId:"Gesichtstattoo",headerName:"Gesichtst.",nxtFieldType:Ee.Text,minWidth:90,maxWidth:90,cellRenderer:r=>this.getBoolSkillCellValue(r.data,"Gesichtstattoos"),hide:!0},{colId:"Lippentattoos",headerName:"Lippent.",nxtFieldType:Ee.Text,minWidth:85,maxWidth:85,cellRenderer:r=>this.getBoolSkillCellValue(r.data,"Lippentattoos"),hide:!0},{colId:"Portrait 1zu1",headerName:"Portrait 1zu1",nxtFieldType:Ee.Text,minWidth:105,maxWidth:105,cellRenderer:r=>this.getBoolSkillCellValue(r.data,"Portrait 1zu1"),hide:!0},{headerName:"speed",valueGetter:r=>r.data.skills.speed*10,field:"skills.speed",hide:!this.showSkills,minWidth:120,width:120,nxtFieldType:Ee.Number,cellRenderer:"barCellRenderer"}]}filterArtists(){this.artistsFiltered=this.artistsAll.filter(i=>!(!this.showDisabledArtists&&i.disabled))}syncFromAc(){return O(this,null,function*(){this.dialogService.showLoading(_n.SyncArtistAc,"Syncronisiere Artists...");let i=yield this.socketService.syncArtistsFromAc();if(i.success){let r="Sync erfolgreich";i.resultObj.allErrorLines.length>0&&(r='<div class="red">'+i.resultObj.allErrorLines.join("<br/>")+"</div>"),i.resultObj.syncedLines.length>0&&(r+='<div class="green">'+i.resultObj.syncedLines.join("<br/>")+"</div>"),this.dialogService.hideLoading(_n.SyncArtistAc),this.dialogService.showOk(r)}else this.dialogService.hideLoading(_n.SyncArtistAc),this.dialogService.showOk(i.error);this.load()})}downloadContract(i){return O(this,null,function*(){let r=yield this.socketService.getArtistContract(i.id);this.downloadService.downloadBase64("Platzmietvertrag_"+i.name+".pdf",r)})}getBoolSkillCellValue(i,r){let s=i.skills?.boolSkillValues?.find(o=>o.description===r);return s?s.value?"Ja":"Nein":"nicht gesetzt"}showArtistSkillFilterClicked(){let i=this.formBuilder.group({speed:new $t(5,_m.min(0),"Geschwindigkeit"),boolSkillValues:this.formBuilder.array(R0.boolSkills.map(s=>this.formBuilder.group({description:new $t(s.description),value:new $t(0,[],"Skill "+s.description)}))),skillValues:this.formBuilder.array(R0.skills.map(s=>this.formBuilder.group({description:new $t(s.description),value:new $t(0,_m.min(0),"Skill "+s.description)})))}),r=this.dialogService.showComponentDialog(zX);r.componentInstance.nxtFormControl=i}showHistory(i){this.dialogService.showComponentFull(Nre).componentInstance.setData(i.id)}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(Gt,8),R(X1),R(tT))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artists"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.dataGrid=o.first)}},standalone:!0,features:[xe],decls:16,vars:5,consts:[[3,"dialogRef"],[3,"click"],["placeholder","Suche",3,"valueChange","noPadding","value"],[3,"valueChange","value"],["nxtPermission","IsJulian",3,"click"],["fxFlex","","name","newEvents",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","suppressCellSelection","enableRangeSelection","suppressRowHoverHighlight","rowDoubleClick",4,"ngIf"],["fxFlex","","name","newEvents",3,"rowDoubleClick","columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","suppressCellSelection","enableRangeSelection","suppressRowHoverHighlight"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Artists"),p(),h(4,"nxt-button",1),F("click",function(){return s.editArtist()}),y(5,"neuer Artist"),p(),h(6,"nxt-button",1),F("click",function(){return s.syncFromAc()}),y(7,"Artist aus Aachen synchronisieren"),p(),h(8,"nxt-input",2),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p(),h(9,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.showDisabledArtists,a)||(s.showDisabledArtists=a),a}),F("valueChange",function(){return s.filterArtists()}),y(10,"Deaktivierte Artists"),p(),h(11,"nxt-button",4),F("click",function(){return s.showArtistSkillFilterClicked()}),y(12,"nach Skill filtern"),p()(),h(13,"nxt-page-content"),W(14,YVi,1,9,"nxt-datagrid",5),p(),ee(15,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(7),b("noPadding",!0),qe("value",s.quickFilterText),g(),qe("value",s.showDisabledArtists),g(5),b("ngIf",s.artistsFiltered&&s.columnDefs))},dependencies:[At,qi,Lt,Zs,Yi,Nn,Ct,dr,Pl,Yl,hc,Al,Kl],styles:["[_nghost-%COMP%]{height:100%;width:100%;position:relative}"]});let t=e;return t})()});var N3t,V3t=Q(()=>{me();ma();yi();Cs();qn();N3t=(()=>{let e=class e{constructor(i,r,s,o){this.route=i,this.socketService=r,this.configService=s,this.fb=o,this.data=null}ngOnInit(){return O(this,null,function*(){})}formGet(i){return this.form.get(i)}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(lt),R(Xi),R(ad))},e.\u0275cmp=_e({type:e,selectors:[["nxt-invoice-builder"]],standalone:!0,features:[xe],decls:2,vars:0,template:function(r,s){r&1&&(h(0,"div"),y(1,` works
`),p())},styles:[".borders[_ngcontent-%COMP%]{border-width:0px!important}.fontsize1[_ngcontent-%COMP%]{font-size:28px}.fontsize2[_ngcontent-%COMP%]{font-size:24px}.fontsize3[_ngcontent-%COMP%]{font-size:20px}.fontsize4[_ngcontent-%COMP%]{font-size:16px}.fontsize5[_ngcontent-%COMP%]{font-size:14px}.wrapper[_ngcontent-%COMP%]{padding:2cm 2cm .5cm}table[_ngcontent-%COMP%]{width:100%}.header-data-table[_ngcontent-%COMP%]{border-collapse:collapse}.header-data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 0}.header-data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){text-align:right}.header-company-address-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 0;text-align:right}table[_ngcontent-%COMP%], th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{border-collapse:collapse}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:5px}.address-from[_ngcontent-%COMP%]{font-size:12px;margin-bottom:5px}.address[_ngcontent-%COMP%]{margin-bottom:0}.pos-table[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid black;border-collapse:collapse}.cell-align-right[_ngcontent-%COMP%]{text-align:right}"]});let t=e;return t})()});var Bre,B3t=Q(()=>{Bre=class{static getEmptyUser(){return{id:"",permissions:[],username:"",cashReportCreator:!1,disableDailyLogin:!1,startPage:"",backgroundColor:"",color:"",realName:"",workplaces:[],lastLogin:0,lastLoginManual:0,disabled:!1,hidden:!1,photoDeviceName:"",birthday:null,mobileBusiness:"",mobilePrivate:"",noPerson:!1,canSafeMoneyGet:!1}}}});function QVi(t,e){if(t&1&&(h(0,"div",30),y(1),p()),t&2){let n=w(2).$implicit,i=w(4);g(),Ke("",i.getPermissionIdTextDetail(n.id).join(" | ")," ")}}function JVi(t,e){if(t&1){let n=re();h(0,"div",27)(1,"nxt-slide-toggle",28),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.granted,r)||(s.granted=r),B(r)}),y(2),p(),W(3,QVi,2,1,"div",29),p()}if(t&2){let n=w().$implicit,i=w(4);g(),b("matTooltip",n.onlySuperAdminCanChange&&!i.currentUserIsSuperAdmin?"K\xF6nnen nur Super-Admins \xE4ndern":"")("disabled",n.onlySuperAdminCanChange&&!i.currentUserIsSuperAdmin),qe("value",n.granted),g(),Ke(" ",i.getPermissionIdText(n.id)," "),g(),b("ngIf",i.getPermissionIdTextDetail(n.id).length>0)}}function eBi(t,e){if(t&1&&(vs(0),W(1,JVi,4,5,"div",26),ys()),t&2){let n=e.$implicit;g(),b("ngIf",n.show)}}function tBi(t,e){if(t&1&&(h(0,"div",25)(1,"div"),y(2),p(),W(3,eBi,2,1,"ng-container",20),p()),t&2){let n=w().$implicit;g(2),ye(n.text),g(),b("ngForOf",n.permissions)}}function iBi(t,e){if(t&1&&(vs(0),W(1,tBi,4,2,"div",24),ys()),t&2){let n=e.$implicit;g(),b("ngIf",n.show)}}function nBi(t,e){if(t&1){let n=re();h(0,"nxt-button",22),F("click",function(){V(n);let r=w(2);return B(r.delete())}),y(1,"BENUTZER L\xD6SCHEN"),p()}}function rBi(t,e){if(t&1){let n=re();h(0,"nxt-button",22),F("click",function(){V(n);let r=w(2);return B(r.resetPassword())}),y(1,"Passwort zur\xFCcksetzen"),p()}}function sBi(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2)(2,"div",3),ee(3,"nxt-input",4)(4,"nxt-input",5),h(5,"nxt-slide-toggle",6),y(6,"Keine Person"),p(),ee(7,"nxt-date-picker",7),p(),h(8,"div",8)(9,"div",9),ee(10,"nxt-input",10),p(),h(11,"div",9),ee(12,"nxt-input",11),p(),h(13,"div",9),ee(14,"nxt-select",12),p()(),h(15,"div",13)(16,"nxt-slide-toggle",14),y(17,"Deaktiviert"),p(),h(18,"nxt-slide-toggle",14),y(19,"Versteckt"),p(),h(20,"nxt-slide-toggle",14),y(21,"kein t\xE4gliches Login n\xF6tig "),p(),h(22,"nxt-slide-toggle",14),y(23,"Erstellt Kassenberichte "),p(),h(24,"nxt-slide-toggle",14),y(25,"Tresor-Geld empfangen "),p(),ee(26,"nxt-input",15)(27,"nxt-input",16),p(),h(28,"div",17)(29,"nxt-input",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.permissionSearchText,r)||(s.permissionSearchText=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.filterPermissions$.next())}),p(),h(30,"div",19),W(31,iBi,2,1,"ng-container",20),p()(),h(32,"div",21)(33,"nxt-button",22),F("click",function(){V(n);let r=w();return B(r.close())}),y(34,"ABBRECHEN"),p(),W(35,nBi,2,0,"nxt-button",23)(36,rBi,2,0,"nxt-button",23),h(37,"nxt-button",22),F("click",function(){V(n);let r=w();return B(r.save())}),y(38,"SPEICHERN"),p()()()()}if(t&2){let n=w();g(3),b("readonly",n.isEdit)("nxtFormControl",n.form.get("username")),g(),b("nxtFormControl",n.form.get("realName")),g(),b("nxtFormControl",n.form.get("noPerson")),g(2),b("nxtFormControl",n.form.get("birthday")),g(3),b("nxtFormControl",n.form.get("mobilePrivate")),g(2),b("nxtFormControl",n.form.get("mobileBusiness")),g(2),b("multiple",!0)("nxtFormControl",n.form.get("workplaces"))("options",bs(24,XVi,bn(22,qVi),bn(23,ZVi))),g(2),b("nxtFormControl",n.form.get("disabled")),g(2),b("nxtFormControl",n.form.get("hidden")),g(2),b("nxtFormControl",n.form.get("disableDailyLogin")),g(2),b("nxtFormControl",n.form.get("cashReportCreator")),g(2),b("nxtFormControl",n.form.get("canSafeMoneyGet")),g(2),b("nxtFormControl",n.form.get("startPage")),g(),b("nxtFormControl",n.form.get("photoDeviceName")),g(2),b("clearIcon",!0),qe("value",n.permissionSearchText),g(2),b("ngForOf",n.permissionModules),g(4),b("ngIf",n.isEdit),g(),b("ngIf",n.isEdit)}}var z3t,qVi,ZVi,XVi,KU,H3t=Q(()=>{Pa();Ep();tp();Bd();B3t();pa();Yc();zn();z3t=Gs(Jm());nc();Zi();Mp();il();ih();th();oo();Jr();Vt();ri();$n();Gi();me();qn();Ci();yi();Kr();jl();ji();Vt();qVi=()=>({text:"Backoffice",value:"backoffice"}),ZVi=()=>({text:"Empfang",value:"reception"}),XVi=(t,e)=>[t,e];KU=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l){if(super(),this.formBuilder=i,this.dialogService=r,this.socketService=s,this.loginService=o,this.permissionService=a,this.dialogRef=l,this.filterPermissions$=new Mi,this.getPermissionIdText=Ope,this.getPermissionIdTextDetail=uPe,this.color="#fff",this.isEdit=!0,this.currentUserIsSuperAdmin=this.permissionService.hasPermission(Zt.SuperAdmin),this.permissionSearchText="",this.permissionModules=[{text:"Allgemein",permissions:[{id:Zt.Admin,onlySuperAdminCanChange:!0},{id:Zt.SuperAdmin,onlySuperAdminCanChange:!0},{id:Zt.ShowDurationPriceCheckColumn},{id:Zt.DisableGlobal_,onlySuperAdminCanChange:!0},{id:Zt.ExcelExport,onlySuperAdminCanChange:!0},{id:Zt.GoogleSmsCode,onlySuperAdminCanChange:!0},{id:Zt.DefaultDashboard,onlySuperAdminCanChange:!0}]},{text:"Gutscheine",permissions:[{id:Zt.GiftCard_SeeCodes,onlySuperAdminCanChange:!0},{id:Zt.GiftCard_ForceAllGiftCards},{id:Zt.GiftCards_Download}]},{text:"Kassen",permissions:[{id:Zt.MoneyAccount_Admin,onlySuperAdminCanChange:!0},{id:Zt.MoneyAccount_Transactions,onlySuperAdminCanChange:!0}]},{text:"Zahlungen",permissions:[{id:Zt.CanRefund,onlySuperAdminCanChange:!0},{id:Zt.NotAssignedPayments_View,onlySuperAdminCanChange:!0},{id:Zt.NotAssignedPayments_Assign,onlySuperAdminCanChange:!0},{id:Zt.NotAssignedPayments_Delete,onlySuperAdminCanChange:!0},{id:Zt.NotAssignedBankTransfer_Assign,onlySuperAdminCanChange:!0},{id:Zt.PayPalSMSCode}]},{text:"Auswertungen",permissions:[{id:Zt.Analysis_DiscountPromotions},{id:Zt.Analysis_StudioFee,onlySuperAdminCanChange:!0},{id:Zt.Analysis_Events,onlySuperAdminCanChange:!0},{id:Zt.Analysis_EventsCreatedOrUpdated}]},{text:"Artists",permissions:[{id:Zt.Artists_Read},{id:Zt.Artists_NewSpot,onlySuperAdminCanChange:!0},{id:Zt.Artists_CanEditSkillsOutsideFromAc,onlySuperAdminCanChange:!0},{id:Zt.Artists_DeleteNotes},{id:Zt.Artists_EditKeySafeCode}]},{text:"Mitarbeiter",permissions:[{id:Zt.Employees_EditEvents},{id:Zt.Employees_Works},{id:Zt.Employees_Edit,onlySuperAdminCanChange:!0},{id:Zt.Employees_EditTimeTracks,onlySuperAdminCanChange:!0},{id:Zt.Employees_Payout,onlySuperAdminCanChange:!0}]},{text:"Men\xFC",permissions:[{id:Zt.DiscountPromotionsEdit},{id:Zt.DayFinishLog,onlySuperAdminCanChange:!0}]},{text:"Kalender",permissions:[{id:Zt.Calendar}]},{text:"Cash-Report",permissions:[{id:Zt.StudioCashReport},{id:Zt.StudioCashReport_DatePicker},{id:Zt.StudioCashReport_ToggleBlockDayFinish,onlySuperAdminCanChange:!0},{id:Zt.StudioCashReport_CanEditIncoming},{id:Zt.StudioCashReport_CanEditOutgoing},{id:Zt.StudioCashReport_SwitchStudios},{id:Zt.StudioCashReport_Switch_},{id:Zt.StudioCashReport_SeeMoneyEndOfDay},{id:Zt.StudioCashReport_EditIncomingOutgoing_CanEdit_,onlySuperAdminCanChange:!0},{id:Zt.StudioCashReport_CanEditGiftCard},{id:Zt.StudioCashReport_ShowAllCashRegisters},{id:Zt.StudioCashReport_CanEditEndMoney,onlySuperAdminCanChange:!0},{id:Zt.StudioCashReport_PrePayedOutInvoices},{id:Zt.StudioCashReport_CanSetWalkIn}]},{text:"Termin",permissions:[{id:Zt.CalendarEventEdit_canMoveEventEarlierThan3Days},{id:Zt.CalendarEventEdit_canEdit_},{id:Zt.CalendarEventEdit_ChangeWorkType},{id:Zt.CalendarEventEdit_DisableFollowEventInfo},{id:Zt.CalendarEventEdit_SaveWithoutChecks},{id:Zt.CalendarEventEdit_EditPayments,onlySuperAdminCanChange:!0},{id:Zt.CalendarEventEdit_ShowBankDepositQrCode},{id:Zt.CalendarEventEdit_canReOpen},{id:Zt.EventPhoto_Delete},{id:Zt.SkillCheck_Disable}]},{text:"Studio Abgaben",permissions:[{id:Zt.StudioFee,onlySuperAdminCanChange:!0},{id:Zt.StudioFee_Admin,onlySuperAdminCanChange:!0}]},{text:"WhatsApp",permissions:[{id:Zt.WhatsAppFastAnswers_Edit},{id:Zt.WhatsAppBroadcast},{id:Zt.WhatApp_ChatRecheck}]},{text:"Benutzer",permissions:[{id:Zt.EditUsers}]},{text:"Inventar",permissions:[{id:Zt.Inventory_CanDeleteAllOrders,onlySuperAdminCanChange:!0}]},{text:"Kunden",permissions:[{id:Zt.ContactForm_WithoutBirthday},{id:Zt.ContactsDelete}]},{text:"Promo-App",permissions:[{id:Zt.Promo_PromotersList,onlySuperAdminCanChange:!0}]},{text:"Piercing-Manager",permissions:[{id:Zt.PiercingManager_AddInfo}]},{text:"Tattoo-Bewertung",permissions:[{id:Zt.EventRating_Edit},{id:Zt.EventRating_Delete}]}],this.permissionModules=this.permissionModules.sort(Hr.sortString("text")),!this.permissionService.hasPermission(Zt.SuperAdmin)&&!this.loginService.isJulian()&&!this.loginService.isNiklas()&&!this.loginService.isCapone())for(let c of this.permissionModules)c.permissions=c.permissions.filter(d=>d.id!==Zt.SuperAdmin);this.pushSubscription=this.filterPermissions$.pipe(_0(200)).subscribe(()=>{this.applyFilter()}),this.applyFilter()}applyFilter(){this.permissionModules.forEach(i=>{i.text.toLowerCase().includes(this.permissionSearchText.toLowerCase())?(i.permissions.forEach(r=>{r.show=!0}),i.show=!0):(i.permissions.forEach(r=>{r.show=Ope(r.id).toLowerCase().includes(this.permissionSearchText.toLowerCase())}),i.show=i.permissions.some(r=>r.show))})}ngOnInit(){return O(this,null,function*(){})}buildFormFromUser(i){this.form=this.formBuilder.group({username:new $t(i.username,[ii.requiredAndNotNaN],"Username"),disableDailyLogin:new $t(!!i.disableDailyLogin,[]),realName:new $t(i.realName,ii.requiredAndNotNaN),color:new $t("#bbb",ii.requiredAndNotNaN),cashReportCreator:new $t(i.cashReportCreator,ii.requiredAndNotNaN),startPage:new $t(i.startPage,[]),photoDeviceName:new $t(i.photoDeviceName,[]),workplaces:new $t(i.workplaces,ii.requiredAndNotNaN),disabled:new $t(!!i.disabled,[]),hidden:new $t(!!i.hidden,[]),birthday:new $t(i.birthday?(0,z3t.default)(i.birthday):null,[ii.requiredAndNotNaN]),mobilePrivate:new $t(i.mobilePrivate,[ii.requiredAndNotNaN,ii.mobile]),mobileBusiness:new $t(i.mobileBusiness,[ii.mobile]),noPerson:new $t(!!i.noPerson),canSafeMoneyGet:new $t(!!i.canSafeMoneyGet)}),this.fillPermissionsToForm(),this.registerFormChanges()}save(){return O(this,null,function*(){if(yield this.checkFormErrors(this.user)){let i=Sr.combineWithDefaultOptions(this.form.getRawValue(),this.user);this.fillPermissionsToUser(i),i.birthday=Ie.parse(i.birthday).dateFormat("yyyy-MM-dd"),this.isEdit?yield this.socketService.upsertUser(i):(yield this.socketService.createUser(i,"1234"),this.dialogService.showOk("Das Passwort lautet: 1234, gib es genau so dem neuen Mitarbeiter, er wird es beim ersten einloggen \xE4nder m\xFCssen")),this.dialogRef.close(!0)}})}close(){this.dialogRef.close(!1)}checkFormErrors(i){return O(this,null,function*(){return this.form.get("disabled").value?!0:(this.form.markAllAsTouched(),Is.showErrorsTrueIfNoError(this.form,this.dialogService,yield this.getAdditionalErrors(this.user)))})}getAdditionalErrors(i){return O(this,null,function*(){return[]})}registerFormChanges(){this.form.get("noPerson").valueChanges.subscribe(i=>{this.form.get("realName").setValidators(i?[]:[ii.requiredAndNotNaN]),this.form.get("realName").updateValueAndValidity(),this.form.get("mobilePrivate").setValidators(i?[]:[ii.requiredAndNotNaN]),this.form.get("mobilePrivate").updateValueAndValidity()})}test(){let i=this.form.get("workplaces").value;console.log(i)}formGet(i){return this.form.get(i)}loadUser(i){return O(this,null,function*(){this.isEdit=!0,this.user=yield this.socketService.getUser(i),this.buildFormFromUser(this.user),console.log(this.user)})}newUser(){this.isEdit=!1,this.user=Bre.getEmptyUser(),this.buildFormFromUser(this.user)}fillPermissionsToForm(){let i=Object.keys(Zt);for(let r of this.permissionModules)for(let s of r.permissions){let o=this.user.permissions.find(a=>a.id===s.id);o&&(s.granted=o.granted),i=i.filter(a=>a!==s.id&&!["Empty","IsBackoffice","IsReception","IsJulian","IsNiklas","IsCapone","SuperAdmin","IsAc","IsDu","IsMa","IsNotAc","IsFranchise","IsNoFranchise"].includes(a))}i.length>0&&this.dialogService.showOk("Folgende Permissions sind nicht im Formular: "+i.join(`
`))}fillPermissionsToUser(i){for(let r of this.permissionModules)for(let s of r.permissions){let o=this.user.permissions.find(a=>a.id===s.id);o?o.granted=!!s.granted:i.permissions.push({id:s.id,granted:!!s.granted})}}delete(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Benutzer wirklich l\xF6schen?"))&&(yield this.socketService.deleteUser(this.user.id),this.close())})}newUserFrom(i){this.isEdit=!1,this.user=i,this.user.id=null,this.user.username="",this.user.realName="",this.user.lastLogin=0,this.user.mobilePrivate="",this.user.mobileBusiness="",this.buildFormFromUser(this.user)}nxtOnDestroy(){}resetPassword(){return O(this,null,function*(){let i=yield this.socketService.resetUserPassword(this.user.id);this.dialogService.showOk(`Passwort wurde zur\xFCckgesetzt
Das neue Passwort lautet: `+i)})}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(vt),R(lt),R(Fi),R(ws),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-user-edit"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.dataGrid=o.first)}},standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["class","nxt-page","fxFlex","","fxLayout","row","fxLayoutAlign","center",4,"ngIf"],["fxFlex","","fxLayout","row","fxLayoutAlign","center",1,"nxt-page"],["fxFlex","70","fxLayout","column",1,"pt-4"],["fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","15px"],["fxFlex","","placeholder","Username",3,"readonly","nxtFormControl"],["fxFlex","","placeholder","Vollst\xE4ndiger Name",3,"nxtFormControl"],[3,"nxtFormControl"],["placeholder","Geburtstag",3,"nxtFormControl"],["fxLayout","row","fxLayoutGap","15px",1,"w-full"],["fxFlex",""],["fxFlex","","placeholder","Handy privat",3,"nxtFormControl"],["fxFlex","","placeholder","Handy gesch\xE4ftlich",3,"nxtFormControl"],["placeholder","Arbeitspl\xE4tze",3,"multiple","nxtFormControl","options"],["fxLayout","row","fxLayoutGap","15px"],[1,"py-3",3,"nxtFormControl"],["placeholder","startPage",3,"nxtFormControl"],["nxtPermission","IsJulian","placeholder","PhoneDevice",3,"nxtFormControl"],["fxFlex","","fxLayout","column",1,"pl-2"],["placeholder","Suche",1,"w-1/3",3,"valueChange","clearIcon","value"],["fxFlex","",2,"overflow","auto"],[4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center","fxLayoutGap","2em",2,"padding-top","1em"],[3,"click"],[3,"click",4,"ngIf"],["class","pb-3",4,"ngIf"],[1,"pb-3"],["class","p-1","fxLayout","row","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center",1,"p-1"],[3,"valueChange","matTooltip","disabled","value"],["class","nxt-text-70",4,"ngIf"],[1,"nxt-text-70"]],template:function(r,s){r&1&&W(0,sBi,39,27,"div",0),r&2&&b("ngIf",s.form&&s.user)},dependencies:[Ct,At,Yt,$r,oi,qi,Yi,Nn,tl,$l,Zs,Hi,dl,Lt],styles:["[_nghost-%COMP%]{height:100%}.color-picker[_ngcontent-%COMP%]{position:inherit;border:1px solid gray;border-radius:4px;height:40px;width:100px;text-align:center}"]});let t=e;return t})()});function oBi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",4),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function aBi(t,e){if(t&1){let n=re();h(0,"nxt-datagrid",8),F("rowDoubleClick",function(r){V(n);let s=w();return B(s.rowDoubleClicked(r))}),p()}if(t&2){let n=w();b("columnDefs",n.columnDefs)("disableAllSort",!0)("quickFilterText",n.quickFilterText)("rowData",n.users)("showFooter",!1)("showSideBar",!1)("suppressCellSelection",!0)("enableRangeSelection",!1)("suppressRowHoverHighlight",!0)}}var YU,g9e=Q(()=>{Pa();H3t();Bd();Ph();Yc();Qo();ls();ri();Jr();Zi();Vt();me();yi();Ci();Cs();ma();ji();Vt();YU=(()=>{let e=class e{constructor(i,r,s,o,a){this.socketService=i,this.dialogService=r,this.configService=s,this.activatedRoute=o,this.dialogRef=a,this.columnDefs=[{headerName:"Name",field:"username",nxtFieldType:Ee.Text},{headerName:"Bearbeiten",maxWidth:68,minWidth:68,nxtFieldType:Ee.Text,cellRenderer:()=>Ir.Material.Edit,cellStyle:{textAlign:"center"},nxtOnCellClicked:l=>O(this,null,function*(){let c=this.dialogService.showComponentDialog(KU,null,{minHeight:"95vh",minWidth:"95vw"});c.componentInstance.loadUser(l.data.id),yield c.afterClosed().toPromise(),this.load()})},{headerName:"Klonen",maxWidth:68,minWidth:68,nxtFieldType:Ee.Text,cellRenderer:()=>Ir.Material.ContentCopy,cellStyle:{textAlign:"center"},nxtOnCellClicked:l=>O(this,null,function*(){let c=this.dialogService.showComponentDialog(KU,null,{minHeight:"95vh",minWidth:"95vw"});c.componentInstance.newUserFrom(l.data),yield c.afterClosed().toPromise(),this.load()})},{headerName:"Vor- & Nachname",field:"realName",nxtFieldType:Ee.Text},{headerName:"Handy privat",field:"mobilePrivate",nxtFieldType:Ee.Text},{headerName:"Geburtstag",field:"birthday",nxtFieldType:Ee.Date_germanDate},{headerName:"startPage",field:"startPage",nxtFieldType:Ee.Text},{headerName:"Erstellt Kassenberichte",field:"cashReportCreator",nxtFieldType:Ee.Boolean},{headerName:"kein t\xE4gliches Login n\xF6tig",field:"disableDailyLogin",nxtFieldType:Ee.Boolean},{headerName:"Kalender",nxtFieldType:Ee.Boolean,valueGetter:l=>l.data.permissions.find(c=>c.id===Zt.Calendar)?.granted},{headerName:"CashReport",nxtFieldType:Ee.Boolean,valueGetter:l=>l.data.permissions.find(c=>c.id===Zt.StudioCashReport)?.granted}],this.quickFilterText="",this.load(),this.activatedRoute.snapshot.paramMap.get("userId")}ngOnDestroy(){}ngOnInit(){}rowDoubleClicked(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(KU,null,{minHeight:"95vh",minWidth:"95vw"});r.componentInstance.loadUser(i.data.id),yield r.afterClosed().toPromise(),this.load()})}load(){return O(this,null,function*(){this.users=(yield this.socketService.getUsers()).sort(Hr.sortString("username"))})}addUser(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(KU,null,{minHeight:"95vh",minWidth:"95vw"});i.componentInstance.newUser(),yield i.afterClosed().toPromise(),this.load()})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(Xi),R(gs),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-artists"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.dataGrid=o.first)}},standalone:!0,features:[xe],decls:10,vars:3,consts:[["fxFlex","","fxLayout","column","fxLayoutAlign","stretch",1,"nxt-page","nxt-text"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px"],[1,"page-header"],[3,"click"],["placeholder","Suche",3,"valueChange","value"],[3,"click",4,"ngIf"],["fxFlex","","name","newEvents",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","suppressCellSelection","enableRangeSelection","suppressRowHoverHighlight","rowDoubleClick",4,"ngIf"],["fxFlex","","name","newEvents",3,"rowDoubleClick","columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","suppressCellSelection","enableRangeSelection","suppressRowHoverHighlight"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"Benutzer"),p(),h(5,"nxt-button",4),F("click",function(){return s.addUser()}),y(6,"neuer Benutzer"),p(),h(7,"nxt-input",5),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p()(),W(8,oBi,2,0,"nxt-button-icon",6),p(),W(9,aBi,1,9,"nxt-datagrid",7),p()),r&2&&(g(7),qe("value",s.quickFilterText),g(),b("ngIf",s.dialogRef),g(),b("ngIf",s.columnDefs))},dependencies:[At,Yt,$r,oi,qi,Lt,Yi,Ct,an,dr],styles:["[_nghost-%COMP%]{height:100%;width:100%;position:relative}"]});let t=e;return t})()});var G3t,W3t=Q(()=>{Ov();me();L1();G3t=(()=>{let e=class e{constructor(i){this.httpClient=i,this.getDiffs()}getDiffs(){return O(this,null,function*(){let i=yield this.httpClient.get("assets/2021.json").toPromise();console.log(i);let r=i.filter(o=>o?.Buchungstext).map(o=>o.Buchungstext);r=wc.unique(r);let s=[];return r.forEach(o=>{let a=i.filter(d=>d&&d.Buchungstext===o),l=0,c=0;a.forEach(d=>{d["Umsatz Soll"]&&(l+=d["Umsatz Soll"]),d["Umsatz Haben"]&&(c+=d["Umsatz Haben"])}),l!==c&&s.push({text:o,soll:l,haben:c,diff:c-l})}),s=s.sortNumber("diff",!0),s})}};e.\u0275fac=function(r){return new(r||e)(it(Uc))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var U3t,j3t=Q(()=>{Qo();Il();Pa();qn();ox();Jr();Vt();me();yi();W3t();Vt();qn();U3t=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.yearFinishService=r,this.columnDefs=[{headerName:"Datum",field:"date",nxtFieldType:Ee.Date_germanDate},{headerName:"Name",field:"name",nxtFieldType:Ee.Text},{headerName:"Betrag",field:"value",nxtFieldType:Ee.Money},{headerName:"method",field:"method",nxtFieldType:Ee.Text},{headerName:"type",field:"type",nxtFieldType:Ee.Text},{headerName:"eventId",field:"eventId",nxtFieldType:Ee.ShowCalendarEvent,hide:!0},{headerName:"info",field:"info",nxtFieldType:Ee.Text},{headerName:"info2",field:"info2",nxtFieldType:Ee.Text}],this.sum=0,this.quickFilterText="",this.year="2020",this.more=!1,this.load()}load(){return O(this,null,function*(){this.data=yield this.socketService.getYearFinish({year:this.year,more:this.more}),this.sum=this.data.reduce((i,r)=>i+r.value,0)})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(G3t))},e.\u0275cmp=_e({type:e,selectors:[["nxt-year-finish"]],standalone:!0,features:[xe],decls:18,vars:12,consts:[["fxFlex","","fxLayout","column",1,"h-100","nxt-page"],["fxFlex","","fxLayout","row"],[3,"valueChange","value"],[2,"display","flex","flex-direction","column","margin","0 10px",3,"ngModelChange","ngModel"],["value","2020",1,"studio-radio-button",2,"margin","10px 0"],["value","2021",1,"studio-radio-button",2,"margin","10px 0"],[1,"studio-radio-button",2,"margin","10px 0",3,"value"],[1,"h-100",3,"columnDefs","rowData","showFooter","quickFilterText"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div")(2,"div"),y(3),Ce(4,"money"),p(),h(5,"div",1)(6,"nxt-input",2),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p(),h(7,"mat-radio-group",3),Xe("ngModelChange",function(a){return Ze(s.year,a)||(s.year=a),a}),F("ngModelChange",function(){return s.load()}),h(8,"mat-radio-button",4),y(9,"2020"),p(),h(10,"mat-radio-button",5),y(11,"2021"),p()(),h(12,"mat-radio-group",3),Xe("ngModelChange",function(a){return Ze(s.more,a)||(s.more=a),a}),F("ngModelChange",function(){return s.load()}),h(13,"mat-radio-button",6),y(14,"mehr"),p(),h(15,"mat-radio-button",6),y(16,"weniger"),p()()()(),ee(17,"nxt-datagrid",7),p()),r&2&&(g(3),Ke("Summe: ",tt(4,10,s.sum),""),g(3),qe("value",s.quickFilterText),g(),qe("ngModel",s.year),g(5),qe("ngModel",s.more),g(),b("value",!0),g(2),b("value",!1),g(2),b("columnDefs",s.columnDefs)("rowData",s.data)("showFooter",!0)("quickFilterText",s.quickFilterText))},dependencies:[At,Yt,qi,Yi,hg,ko,Ko,Dp,h2,dr,ks],styles:["[_nghost-%COMP%]{height:100%}"]});let t=e;return t})()});function cBi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w();g(),ye(n.errorText)}}function dBi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(3);g(),ye(n.data.invoiceTo.name2)}}function uBi(t,e){if(t&1&&(h(0,"div",23)(1,"div")(2,"div",24),y(3),p(),h(4,"div",25),y(5),ee(6,"br"),W(7,dBi,2,1,"div",0),y(8),ee(9,"br"),y(10),ee(11,"br"),p()()()),t&2){let n=w(2);g(3),ye(n.getFrom()),g(2),cn(" ",n.data.invoiceTo.salutation," ",n.data.invoiceTo.name,""),g(2),b("ngIf",n.data.invoiceTo.name2),g(),Ke(" ",n.data.invoiceTo.street,""),g(2),vv(" ",n.data.invoiceTo.countryCode,"-",n.data.invoiceTo.postalCode," ",n.data.invoiceTo.city,"")}}function hBi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"RE-Nr.:"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(2);g(4),ye(n.data.invoiceNumber)}}function pBi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p()()),t&2){let n=w(2);g(2),ye(n.configService.config.value.invoiceData.fromCompany2)}}function mBi(t,e){if(t&1&&(h(0,"tr")(1,"td",26),y(2),p(),ee(3,"td",27),Ce(4,"safeHtml"),h(5,"td",28),y(6),p(),h(7,"td",29),y(8),Ce(9,"money"),p(),h(10,"td",29),y(11),Ce(12,"money"),p()()),t&2){let n=e.$implicit;g(2),ye(n.posNumber),g(),b("innerHTML",tt(4,5,n.name),Pi),g(3),ye(n.amount),g(2),ye(tt(9,7,n.unitPrice)),g(3),ye(tt(12,9,n.amount*n.unitPrice))}}function fBi(t,e){if(t&1&&(h(0,"tr")(1,"td",30),y(2," Gesamtbetrag* "),p(),h(3,"td",31),y(4),Ce(5,"money"),p()()),t&2){let n=w(2);g(4),ye(tt(5,1,n.data.invoiceValueTotal))}}function gBi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),Ce(3,"money"),Ce(4,"money"),p()),t&2){let n=w(3);g(),F_(" * Im Gesamtbetrag von ",tt(2,4,n.data.invoiceValueTotalForTax)," (Netto: ",tt(3,6,n.getNet()),") sind USt ",n.vatPercent," % (",tt(4,8,n.getTax()),") enthalten. ")}}function vBi(t,e){if(t&1&&(h(0,"div"),W(1,gBi,5,10,"div",0),ee(2,"br")(3,"br")(4,"br")(5,"br")(6,"br")(7,"br")(8,"br"),p()),t&2){let n=w(2);g(),b("ngIf",n.showTotalTaxInfo)}}function yBi(t,e){if(t&1&&(h(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6),ee(5,"img",7),p(),W(6,uBi,12,8,"div",8),p(),h(7,"div",9)(8,"div",10)(9,"div",11)(10,"div",12),y(11),p(),ee(12,"br"),h(13,"table",13),W(14,hBi,5,1,"tr",0),h(15,"tr")(16,"td"),y(17,"Kundennr.:"),p(),h(18,"td"),y(19),p()(),h(20,"tr")(21,"td"),y(22,"Datum:"),p(),h(23,"td"),y(24),Ce(25,"nxtDate"),p()(),h(26,"tr")(27,"td"),y(28,"Seite:"),p(),h(29,"td"),y(30),p()()()(),ee(31,"br")(32,"br"),h(33,"table",14)(34,"tr")(35,"td"),y(36),p()(),W(37,pBi,3,1,"tr",0),h(38,"tr")(39,"td"),y(40),p()(),h(41,"tr")(42,"td"),y(43),p()()()()()(),ee(44,"div",15),h(45,"div",16),ee(46,"br"),h(47,"table",17)(48,"tr")(49,"th"),y(50,"Pos."),p(),h(51,"th"),y(52,"Bezeichnung"),p(),h(53,"th"),y(54,"Menge"),p(),h(55,"th"),y(56,"Einzel \u20AC"),p(),h(57,"th"),y(58,"Gesamt \u20AC"),p()(),W(59,mBi,13,11,"tr",18)(60,fBi,6,3,"tr",0),p(),ee(61,"br"),W(62,vBi,9,1,"div",0),h(63,"div"),y(64),p()(),h(65,"div",19)(66,"div",20)(67,"div",21)(68,"div"),y(69),ee(70,"br"),y(71),ee(72,"br"),y(73),p(),h(74,"div"),y(75),ee(76,"br"),y(77),ee(78,"br"),y(79),p()(),h(80,"div",22),ee(81,"br"),y(82),p()()()()()),t&2){let n=w();g(2),b("fxFlex",n.data.pageCountCurrent===1?30:18),g(4),b("ngIf",n.data.pageCountCurrent===1),g(5),ye(n.data.invoiceTitle),g(3),b("ngIf",n.data.invoiceNumber),g(5),ye(n.data.invoiceTo.customerNumber),g(5),ye(Nt(25,28,n.data.invoiceDate,"dd.MM.yyyy")),g(6),cn("",n.data.pageCountCurrent,"/",n.data.pageCountTotal,""),g(6),ye(n.configService.config.value.invoiceData.fromCompany),g(),b("ngIf",n.configService.config.value.invoiceData.fromCompany2),g(3),ye(n.configService.config.value.invoiceData.fromStreet),g(3),cn("DE-",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity,""),g(2),b("fxFlex",n.data.pageCountCurrent===1?60:72),g(14),b("ngForOf",n.data.invoicePositions),g(),b("ngIf",n.data.pageCountCurrent===n.data.pageCountTotal),g(2),b("ngIf",n.data.pageCountCurrent===n.data.pageCountTotal),g(2),Ke(" Zahlungsziel: ",n.termOfPayment," "),g(5),Ke(" ",n.configService.config.value.invoiceData.fromCompany," "),g(2),Ke(" ",n.configService.config.value.invoiceData.fromStreet," "),g(2),cn(" DE-",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity," "),g(2),Ke(" USt-IdNr.: ",n.configService.config.value.invoiceData.fromVATNumber," "),g(2),Ke(" Steuernummer: ",n.configService.config.value.invoiceData.fromTaxId," "),g(2),cn(" ",n.configService.config.value.invoiceData.fromBank,": ",n.configService.config.value.invoiceData.fromBankIBAN," "),g(3),cn(" Seite ",n.data.pageCountCurrent,"/",n.data.pageCountTotal," ")}}var $3t,K3t=Q(()=>{Ul();zn();Il();ha();Vt();ri();go();me();ma();yi();Cs();Vt();$3t=(()=>{let e=class e{constructor(i,r,s){this.route=i,this.socketService=r,this.configService=s,this.errorText="",this.showSigning=!0,this.showTotalTaxInfo=!0,this.vatPercent=19,this.termOfPayment="";try{if(this.route.snapshot.queryParams.data)this.data=this.getInvoiceData(Qn.parse(this.route.snapshot.queryParams.data)),this.calc();else{this.errorText="Date fehlen!";return}}catch(o){this.errorText=o.message}}ngOnInit(){return O(this,null,function*(){})}getNet(){return this.data.invoiceValueTotalForTax/(this.vatPercent/100+1)}getTax(){return this.data.invoiceValueTotalForTax-this.getNet()}getFrom(){let i=this.configService.config.value.invoiceData.fromCompany;return i+=", "+this.configService.config.value.invoiceData.fromStreet,i+=", DE-"+this.configService.config.value.invoiceData.fromPostalCode+" "+this.configService.config.value.invoiceData.fromCity,i}calc(){this.data.invoiceValueTotal=this.data.invoicePositions.reduce((i,r)=>i+r.amount*r.unitPrice,0),this.data.invoiceValueTotalForTax=this.data.invoiceValueTotal,this.termOfPayment=Ie.parse(this.data.invoiceDate,"yyyy.MM.dd").dateAddDays(14).dateFormat("dd.MM.yyyy")}getInvoiceData(i){let r=this.getInvoiceTo(i.studio);if(!r)throw Error("missing franchise invoice to");let s={invoiceDate:i.invoiceDateString.dateParse("dd.MM.yyyy"),invoiceNumber:i.invoiceNumber,invoiceTo:r,invoicePositions:[{posNumber:1,name:"NXT-LVL.INK Lizenzgeb\xFChr "+i.monthYearString,amount:1,unitPrice:999,isInvoice:!0,type:"license-fee"},{posNumber:2,name:"NXT-LVL.INK Softwarenutzung "+i.monthYearString,amount:Math.round((i.shouldBeValue-999)/.19),unitPrice:.19,isInvoice:!0,type:"software-usage"}],pageCountCurrent:1,pageCountTotal:1,invoiceValueTotal:0,invoiceValueTotalForTax:0,invoiceTitle:"Rechnung"};return i.discountGross>0&&s.invoicePositions.push({posNumber:3,name:"Rabatt",amount:1,unitPrice:i.discountGross*-1,isInvoice:!0,type:"discount"}),s}getInvoiceTo(i){switch(i){case"FFM":return{salutation:"Herrn",name:"Sven Hennemann",name2:"NXT-LVL.INK Frankfurt",street:"Berger Str. 288",postalCode:"60385",city:"Frankfurt",customerNumber:"S00001",numberRange:"FFM",countryCode:"DE",artistName:"",idNumber:""};case"AB":return{salutation:"Herrn",name:"Oliver Peters",name2:"NXT-LVL.INK Aschaffenburg",street:"Seestra\xDFe 3",postalCode:"63741",city:"Aschaffenburg",customerNumber:"S00002",numberRange:"AB",countryCode:"DE",artistName:"",idNumber:""};case"NU":return{salutation:"Herrn",name:"Oliver Peters",name2:"NXT-LVL.INK N\xFCrnberg",street:"Freyst\xE4dter Str. 137",postalCode:"90475",city:"N\xFCrnberg",customerNumber:"S00003",numberRange:"NU",countryCode:"DE",artistName:"",idNumber:""}}}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(lt),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-invoice-extern-studio-pdf"]],standalone:!0,features:[xe],decls:2,vars:2,consts:[[4,"ngIf"],["class","fontsize5 wrapper borders","style","width:100%; height: 100%; border: 3px solid black",4,"ngIf"],[1,"fontsize5","wrapper","borders",2,"width","100%","height","100%","border","3px solid black"],["fxFlex","","fxLayout","column",1,"borders",2,"width","100%","height","100%","border","3px solid red"],["fxLayout","row",1,"borders",2,"border","3px solid blue","width","100%",3,"fxFlex"],["fxFlex","65","fxLayout","column",1,"borders",2,"border","3px solid yellow"],["fxFlex",""],["src","assets/logo/logo_black.svg","alt","",2,"max-height","70%","max-width","60%"],["fxFlex","","class","address borders","fxLayout","column","fxLayoutAlign","end start","style","border: 3px solid red;",4,"ngIf"],["fxFlex","35","fxLayoutAlign","end start","fxLayout","row",1,"borders",2,"border","3px solid magenta"],["fxFlex","","fxLayout","column","fxLayoutAlign","start end",1,"borders",2,"border","3px solid green"],["fxFlex","","fxLayoutAlign","end end","fxLayout","column",1,"borders",2,"border","3px solid orange","width","100%"],[1,"fontsize2"],[1,"header-data-table"],[1,"header-company-address-table"],["fxFlex","5"],[3,"fxFlex"],[1,"pos-table"],[4,"ngFor","ngForOf"],["fxFlex","10"],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","space-around"],["fxLayoutAlign","center"],["fxFlex","","fxLayout","column","fxLayoutAlign","end start",1,"address","borders",2,"border","3px solid red"],[1,"address-from","fontsize5"],[1,"address-to","fontsize4"],[1,"cell-align-right",2,"width","7%"],[2,"width","59%",3,"innerHTML"],[1,"cell-align-right","no-wrap",2,"width","10%"],[1,"cell-align-right","no-wrap",2,"width","12%"],["colspan","4"],[1,"cell-align-right"]],template:function(r,s){r&1&&W(0,cBi,2,1,"div",0)(1,yBi,83,31,"div",1),r&2&&(b("ngIf",s.errorText),g(),b("ngIf",!s.errorText))},dependencies:[Ct,At,Yt,oi,qi,Hi,Or,ks,Hn],styles:[".borders[_ngcontent-%COMP%]{border-width:0px!important}.fontsize1[_ngcontent-%COMP%]{font-size:28px}.fontsize2[_ngcontent-%COMP%]{font-size:24px}.fontsize3[_ngcontent-%COMP%]{font-size:20px}.fontsize4[_ngcontent-%COMP%]{font-size:16px}.fontsize5[_ngcontent-%COMP%]{font-size:14px}.wrapper[_ngcontent-%COMP%]{padding:2cm 2cm .5cm}table[_ngcontent-%COMP%]{width:100%}.header-data-table[_ngcontent-%COMP%]{border-collapse:collapse}.header-data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 0}.header-data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){text-align:right}.header-company-address-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 0;text-align:right}table[_ngcontent-%COMP%], th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{border-collapse:collapse}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:5px}.address-from[_ngcontent-%COMP%]{font-size:12px;margin-bottom:5px}.address[_ngcontent-%COMP%]{margin-bottom:0}.pos-table[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid black;border-collapse:collapse}.cell-align-right[_ngcontent-%COMP%]{text-align:right}"]});let t=e;return t})()});function _Bi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w();g(),ye(n.errorText)}}function CBi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2);g(),ye(n.data.to.name2)}}function xBi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"RE-Nr.:"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(2);g(4),ye(n.data.invoiceNumber)}}function bBi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Kundennr.:"),p(),h(3,"td"),y(4),p()()),t&2){let n=w(2);g(4),ye(n.data.to.customerNumber)}}function wBi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p()()),t&2){let n=w(2);g(2),ye(n.configService.config.value.invoiceData.fromCompany2)}}function SBi(t,e){if(t&1&&(h(0,"tr")(1,"td",26),y(2),p(),ee(3,"td",27),Ce(4,"safeHtml"),h(5,"td",28),y(6),p(),h(7,"td",29),y(8),Ce(9,"money"),p(),h(10,"td",29),y(11),Ce(12,"money"),p()()),t&2){let n=e.$implicit;g(2),ye(n.posNumber),g(),b("innerHTML",tt(4,5,n.name),Pi),g(3),ye(n.amount),g(2),ye(tt(9,7,n.unitPrice)),g(3),ye(tt(12,9,n.amount*n.unitPrice))}}function TBi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),Ce(3,"money"),Ce(4,"money"),p()),t&2){let n=w(2);g(),F_(" * Im Gesamtbetrag von ",tt(2,4,n.totalGross)," (Netto: ",tt(3,6,n.getNet()),") sind USt ",n.vatPercent," % (",tt(4,8,n.vatTax),") enthalten. ")}}function DBi(t,e){if(t&1&&(h(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6),ee(5,"img",7),Ce(6,"lowercase"),p(),h(7,"div",8)(8,"div")(9,"div",9),y(10),p(),h(11,"div",10),y(12),ee(13,"br"),W(14,CBi,2,1,"div",0),y(15),ee(16,"br"),y(17),ee(18,"br"),p()()()(),h(19,"div",11)(20,"div",12)(21,"div",13)(22,"div",14),y(23),p(),ee(24,"br"),h(25,"table",15),W(26,xBi,5,1,"tr",0)(27,bBi,5,1,"tr",0),h(28,"tr")(29,"td"),y(30,"Datum:"),p(),h(31,"td"),y(32),Ce(33,"nxtDate"),p()()()(),ee(34,"br")(35,"br"),h(36,"table",16)(37,"tr")(38,"td"),y(39),p()(),W(40,wBi,3,1,"tr",0),h(41,"tr")(42,"td"),y(43),p()(),h(44,"tr")(45,"td"),y(46),p()()()()()(),ee(47,"div",17),h(48,"div",6),ee(49,"br"),h(50,"table",18)(51,"tr")(52,"th"),y(53,"Pos."),p(),h(54,"th"),y(55,"Bezeichnung"),p(),h(56,"th"),y(57,"Menge"),p(),h(58,"th"),y(59,"Einzel \u20AC"),p(),h(60,"th"),y(61,"Gesamt \u20AC"),p()(),W(62,SBi,13,11,"tr",19),h(63,"tr")(64,"td",20),y(65," Gesamtbetrag* "),p(),h(66,"td",21),y(67),Ce(68,"money"),p()()(),ee(69,"br"),h(70,"div"),W(71,TBi,5,10,"div",0),ee(72,"br")(73,"br")(74,"br")(75,"br")(76,"br")(77,"br")(78,"br"),p()(),h(79,"div",22)(80,"div",23)(81,"div",24)(82,"div"),y(83),ee(84,"br"),y(85),ee(86,"br"),y(87),p(),h(88,"div"),y(89),ee(90,"br"),y(91),ee(92,"br"),y(93),p()(),h(94,"div",25),ee(95,"br"),y(96," Seite 1 / 1 "),p()()()()()),t&2){let n=w();g(2),b("fxFlex",30),g(3),b("src","assets/logo/invoice/logo_"+tt(6,30,n.studio)+".png",Ur),g(5),ye(n.getFrom()),g(2),cn(" ",n.data.to.salutation," ",n.data.to.name,""),g(2),b("ngIf",n.data.to.name2),g(),Ke(" ",n.data.to.street,""),g(2),vv(" ",n.data.to.countryCode,"-",n.data.to.postalCode," ",n.data.to.city,""),g(6),ye(n.data.invoiceTitle),g(3),b("ngIf",n.data.invoiceNumber),g(),b("ngIf",n.data.to.customerNumber),g(5),ye(Nt(33,32,n.data.invoiceDate,"dd.MM.yyyy")),g(7),ye(n.configService.config.value.invoiceData.fromCompany),g(),b("ngIf",n.configService.config.value.invoiceData.fromCompany2),g(3),ye(n.configService.config.value.invoiceData.fromStreet),g(3),cn("DE-",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity,""),g(16),b("ngForOf",n.data.positions),g(5),ye(tt(68,35,n.totalGross)),g(4),b("ngIf",n.showTotalTaxInfo),g(12),Ke(" ",n.configService.config.value.invoiceData.fromCompany," "),g(2),Ke(" ",n.configService.config.value.invoiceData.fromStreet," "),g(2),cn(" DE-",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity," "),g(2),Ke(" USt-IdNr.: ",n.configService.config.value.invoiceData.fromVATNumber," "),g(2),Ke(" Steuernummer: ",n.configService.config.value.invoiceData.fromTaxId," "),g(2),cn(" ",n.configService.config.value.invoiceData.fromBank,": ",n.configService.config.value.invoiceData.fromBankIBAN," ")}}var Y3t,q3t=Q(()=>{Ul();kl();Il();ha();Vt();ri();go();me();ma();yi();Cs();Vt();Y3t=(()=>{let e=class e{constructor(i,r,s){if(this.route=i,this.socketService=r,this.configService=s,this.errorText="",this.showSigning=!0,this.showTotalTaxInfo=!0,this.vatPercent=19,this.totalGross=0,this.totalNet=0,this.vatTax=0,this.studio="Aachen",this.configService.config.value.studios.length===1&&(this.studio=this.configService.config.value.studios[0].name),this.route.snapshot.queryParams.data)this.data=Qn.parse(this.route.snapshot.queryParams.data),this.calcTotalGross();else{this.errorText="Date fehlen!";return}}ngOnInit(){return O(this,null,function*(){})}getNet(){return this.totalGross/(this.vatPercent/100+1)}getTax(){}getFrom(){let i=this.configService.config.value.invoiceData.fromCompany;return i+=", "+this.configService.config.value.invoiceData.fromStreet,i+=", DE-"+this.configService.config.value.invoiceData.fromPostalCode+" "+this.configService.config.value.invoiceData.fromCity,i}calcTotalGross(){this.totalGross=fn.round(this.data?.positions?.reduce((i,r)=>i+r.amount*r.unitPrice,0),2),this.totalNet=fn.round(this.totalGross/(this.vatPercent/100+1),2),this.vatTax=fn.round(this.totalGross-this.totalNet,2)}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(lt),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-invoice-extern-studio-pdf"]],standalone:!0,features:[xe],decls:2,vars:2,consts:[[4,"ngIf"],["class","fontsize5 wrapper borders","style","width:100%; height: 100%; border: 3px solid black",4,"ngIf"],[1,"fontsize5","wrapper","borders",2,"width","100%","height","100%","border","3px solid black"],["fxFlex","","fxLayout","column",1,"borders",2,"width","100%","height","100%","border","3px solid red"],["fxLayout","row",1,"borders",2,"border","3px solid blue","width","100%",3,"fxFlex"],["fxFlex","65","fxLayout","column",1,"borders",2,"border","3px solid yellow"],["fxFlex",""],["alt","",2,"max-height","70%","max-width","60%",3,"src"],["fxFlex","","fxLayout","column","fxLayoutAlign","center start",1,"address","borders",2,"border","3px solid red"],[1,"address-from","fontsize5"],[1,"address-to","fontsize4"],["fxFlex","35","fxLayoutAlign","end start","fxLayout","row",1,"borders",2,"border","3px solid magenta"],["fxFlex","","fxLayout","column","fxLayoutAlign","start end",1,"borders",2,"border","3px solid green"],["fxFlex","","fxLayoutAlign","end end","fxLayout","column",1,"borders",2,"border","3px solid orange","width","100%"],[1,"fontsize2"],[1,"header-data-table"],[1,"header-company-address-table"],["fxFlex","5"],[1,"pos-table"],[4,"ngFor","ngForOf"],["colspan","4"],[1,"cell-align-right"],["fxFlex","10"],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","space-around"],["fxLayoutAlign","center"],[1,"cell-align-right",2,"width","7%"],[2,"width","59%",3,"innerHTML"],[1,"cell-align-right","no-wrap",2,"width","10%"],[1,"cell-align-right","no-wrap",2,"width","12%"]],template:function(r,s){r&1&&W(0,_Bi,2,1,"div",0)(1,DBi,97,37,"div",1),r&2&&(b("ngIf",s.errorText),g(),b("ngIf",!s.errorText))},dependencies:[Ct,At,Yt,oi,qi,Hi,mEe,Or,ks,Hn],styles:[".borders[_ngcontent-%COMP%]{border-width:0px!important}.fontsize1[_ngcontent-%COMP%]{font-size:28px}.fontsize2[_ngcontent-%COMP%]{font-size:24px}.fontsize3[_ngcontent-%COMP%]{font-size:20px}.fontsize4[_ngcontent-%COMP%]{font-size:16px}.fontsize5[_ngcontent-%COMP%]{font-size:14px}.wrapper[_ngcontent-%COMP%]{padding:2cm 2cm .5cm}table[_ngcontent-%COMP%]{width:100%}.header-data-table[_ngcontent-%COMP%]{border-collapse:collapse}.header-data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 0}.header-data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){text-align:right}.header-company-address-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 0;text-align:right}table[_ngcontent-%COMP%], th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{border-collapse:collapse}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:5px}.address-from[_ngcontent-%COMP%]{font-size:12px;margin-bottom:5px}.address[_ngcontent-%COMP%]{margin-bottom:0}.pos-table[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid black;border-collapse:collapse}.cell-align-right[_ngcontent-%COMP%]{text-align:right}"]});let t=e;return t})()});var zre,v9e=Q(()=>{zn();me();zre=(()=>{let e=class e{constructor(){}getFirstText(i){let r="Hallo "+i.givenName+",";return r+=`
vielen Dank f\xFCr deine Anfrage.`,r+=`

Deine Anfrage:`,r+=`
`+i.text,r+=`
Studio: `+i.studio,i.imageUrl&&(r+=`
Dein Bild: `+i.imageUrl.replace(/\s/g,"%20")),r}getFirstTextEmailSubject(i){return"Deine Tattoo-Preisanfrage vom "+Ie.format(i.createdAt,"dd.MM.yyyy")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function EBi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",7),F("click",function(){V(n);let r=w(2);return B(r.dialogRef.close())}),y(1,"close"),p()}}function MBi(t,e){if(t&1&&(h(0,"div",1)(1,"div",2)(2,"div",3),y(3,"Terminanfragen"),p(),W(4,EBi,2,0,"nxt-button-icon",4),p(),h(5,"div",5),ee(6,"nxt-datagrid",6),p()()),t&2){let n=w();g(4),b("ngIf",n.dialogRef),g(2),b("columnDefs",n.columnDefs)("rowData",n.webFormSubmits)("showSideBar",!1)("suppressCellSelection",!0)("enableRangeSelection",!1)}}var jF,Hre,Gre=Q(()=>{zn();Qo();Pa();ls();Vt();ri();Gi();me();ji();yi();Ci();w4();v9e();Vt();jF=function(t){return t.new="Neu",t.writtenTo="Angeschrieben",t.close="Fertig",t}(jF||{}),Hre=(()=>{let e=class e extends bt{constructor(i,r,s,o,a){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.clipboardService=o,this.webFormSubmitService=a,this.closeIfEmpty=!1,this.columnDefs=[{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateTime,nxtOnCellClicked:l=>this.showInfo(l)},{headerName:"Status",field:"statusText",nxtFieldType:Ee.Text,nxtOnCellClicked:l=>this.showInfo(l)},{headerName:"Name",valueGetter:l=>l.data.givenName+" "+l.data.familyName,nxtFieldType:Ee.Text,nxtOnCellClicked:l=>this.showInfo(l)},{headerName:"Ort",valueGetter:l=>l.data.city,nxtFieldType:Ee.Text,nxtOnCellClicked:l=>this.showInfo(l)},{headerName:"Handy",field:"mobile",nxtFieldType:Ee.Text,nxtOnCellClicked:l=>this.showInfo(l)},{headerName:"E-Mail",valueGetter:l=>l.data.email,nxtFieldType:Ee.Text,nxtOnCellClicked:l=>this.showInfo(l)},{headerName:"via",field:"contactVia",nxtFieldType:Ee.Text,nxtOnCellClicked:l=>this.showInfo(l)},{headerName:"Bild",field:"imageUrl",nxtFieldType:Ee.ShowImage,cellStyle:{textAlign:"center"}},{headerName:"Text",field:"text",nxtFieldType:Ee.Text,nxtOnCellClicked:l=>this.showInfo(l)}],this.load()}nxtOnDestroy(){}load(){return O(this,null,function*(){this.pushSocketSubscription=this.socketService.subscribeNew("getOpenWebFormSubmits",i=>{this.webFormSubmits=i,this.closeIfEmpty&&this.webFormSubmits.length===0&&this.dialogRef.close()},{emitInitial:!0})})}showInfo(i){return O(this,null,function*(){let r=i.data;this.clipboardService.copyToClipboard(r.givenName+" "+r.familyName);let s=Ie.format(r.createdAt,"HH:mm dd.MM.yyyy");s+=`
`+r.givenName+" "+r.familyName,s+=`
`+r.city,s+=`

`+r.text;let o=this.webFormSubmitService.getFirstText(r),a=this.webFormSubmitService.getFirstTextEmailSubject(r);r.contactVia==="E-Mail"&&(s+=`

<a href="mailto:`+r.email+"?subject="+a+"&body="+encodeURIComponent(o)+'">E-Mail schreiben</a>'),r.statusText===jF.new?(yield this.dialogService.showYesNo(s,{yesText:"ich habe angeschreiben",noText:"ok"}))&&this.socketService.updateWebFormSubmit(St(ve({},r),{statusText:jF.writtenTo})):r.statusText===jF.writtenTo&&(yield this.dialogService.showYesNo(s,{yesText:"ANFRAGE FERTIG",noText:"ok"}))&&this.socketService.updateWebFormSubmit(St(ve({},r),{isClosed:!0}))})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt),R(ep),R(zre))},e.\u0275cmp=_e({type:e,selectors:[["nxt-web-form-submits"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["class","nxt-page","fxFlex","","fxLayout","column",4,"ngIf"],["fxFlex","","fxLayout","column",1,"nxt-page"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],[1,"ml-2","text-120"],[3,"click",4,"ngIf"],["fxFlex",""],[1,"h-100",3,"columnDefs","rowData","showSideBar","suppressCellSelection","enableRangeSelection"],[3,"click"]],template:function(r,s){r&1&&W(0,MBi,7,6,"div",0),r&2&&b("ngIf",s.webFormSubmits)},dependencies:[Ct,At,Yt,oi,qi,an,dr],styles:["[_nghost-%COMP%]{height:100%}"]});let t=e;return t})()});function kBi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"async"),p()),t&2){let n=w();g(),Ke("data3: ",tt(2,1,n.$data3),"")}}var X3t,Q3t=Q(()=>{Zi();ri();me();yi();X3t=(()=>{let e=class e{constructor(i){this.socketService=i,this.data1="",this.data2="",this.$data3=this.socketService.getObservable("subscriptionTest"),this.showData3=!0,this.observersLength=0}ngOnInit(){setInterval(()=>{},100)}subscribe1(){this.subscription1?.unsubscribe(),this.subscription1=this.socketService.subscribeNew("subscriptionTest",i=>{this.data1=i},{emitInitial:!0})}subscribe2(){this.subscription2?.unsubscribe(),this.subscription2=this.socketService.subscribeNew("subscriptionTest",i=>{this.data2=i},{emitInitial:!0})}trigger(){this.socketService.triggerSubscriptionTest()}unsubscribe1(){this.subscription1?.unsubscribe()}unsubscribe2(){this.subscription2?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-subscription-test"]],standalone:!0,features:[xe],decls:30,vars:4,consts:[[1,"nxt-page","nxt-text"],[4,"ngIf"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2),p(),h(3,"div"),y(4),p(),W(5,kBi,3,3,"div",1),ee(6,"br"),h(7,"div"),y(8),p(),ee(9,"br")(10,"br"),h(11,"nxt-button",2),F("click",function(){return s.showData3=!s.showData3}),y(12,"switch data3"),p(),ee(13,"br")(14,"br"),h(15,"nxt-button",2),F("click",function(){return s.trigger()}),y(16,"trigger"),p(),ee(17,"br")(18,"br"),h(19,"nxt-button",2),F("click",function(){return s.subscribe1()}),y(20,"subscribe 1"),p(),h(21,"nxt-button",2),F("click",function(){return s.subscribe2()}),y(22,"subscribe 2"),p(),ee(23,"br")(24,"br"),h(25,"nxt-button",2),F("click",function(){return s.unsubscribe1()}),y(26,"unsubscribe 1"),p(),h(27,"nxt-button",2),F("click",function(){return s.unsubscribe2()}),y(28,"unsubscribe 2"),p(),ee(29,"br"),p()),r&2&&(g(2),Ke("data1: ",s.data1,""),g(2),Ke("data2: ",s.data2,""),g(),b("ngIf",s.showData3),g(3),Ke("observersLength: ",s.observersLength,""))},dependencies:[Ct,Lt,Xu]});let t=e;return t})()});function IBi(t,e){if(t&1&&(h(0,"div",4),ee(1,"img",5),p()),t&2){let n=w(2);g(),b("src",n.webformSubmit.imageUrl,Ur)}}function ABi(t,e){if(t&1&&(h(0,"div",1),ee(1,"br")(2,"br")(3,"br"),h(4,"table")(5,"tr")(6,"td"),y(7,"Datum"),p(),h(8,"td"),y(9),Ce(10,"date"),p()(),h(11,"tr")(12,"td"),y(13,"Studio"),p(),h(14,"td"),y(15),p()(),h(16,"tr")(17,"td"),y(18,"Name"),p(),h(19,"td"),y(20),p()(),h(21,"tr")(22,"td"),y(23,"Telefon"),p(),h(24,"td"),y(25),p()(),h(26,"tr")(27,"td"),y(28,"Text"),p(),h(29,"td"),y(30),p()()(),ee(31,"br"),W(32,IBi,2,1,"div",2),ee(33,"br")(34,"br")(35,"br")(36,"br")(37,"br"),h(38,"div",3)(39,"div"),y(40,"Kunde wurde angerufen von: _________________________________"),p()()()),t&2){let n=w();g(9),ye(Nt(10,7,n.webformSubmit.createdAt,"HH:mm dd.MM.yyyy")),g(6),ye(n.webformSubmit.studio),g(5),cn("",n.webformSubmit.givenName," ",n.webformSubmit.familyName,""),g(5),ye(n.webformSubmit.mobile),g(5),ye(n.webformSubmit.text),g(2),b("ngIf",n.webformSubmit.imageUrl)}}var J3t,e4t=Q(()=>{Vt();ri();me();ma();yi();Vt();J3t=(()=>{let e=class e{constructor(i,r){this.activatedRoute=i,this.socketService=r}ngOnInit(){return O(this,null,function*(){let i=this.activatedRoute.snapshot.paramMap.get("id");if(i){let r=yield this.socketService.getOpenWebFormSubmits();this.webformSubmit=r.find(s=>s.id.toString()===i)}setTimeout(()=>{window.print()},2e3)})}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-web-form-submit-print"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full","fxLayout","column",4,"ngIf"],["fxLayout","column",1,"w-full"],["fxLayoutAlign","center center","class","w-full",4,"ngIf"],["fxLayoutAlign","center center"],["fxLayoutAlign","center center",1,"w-full"],[2,"width","80%",3,"src"]],template:function(r,s){r&1&&W(0,ABi,41,10,"div",0),r&2&&b("ngIf",s.webformSubmit)},dependencies:[Ct,At,Yt,oi,Zj],styles:["table[_ngcontent-%COMP%]{border-collapse:collapse}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid black;padding:4px}"]});let t=e;return t})()});function PBi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",18),F("click",function(){V(n);let r=w();return B(r.cancelAssignment())}),y(2,"Zuweisung Abbrechen"),p()()}}function RBi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",18),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}var Wre,y9e=Q(()=>{Gi();$n();zn();i3();Cl();Ph();Pa();Bd();Vd();Qo();ls();Zi();ri();Jr();ox();Vt();me();o1();yi();Ci();jl();Kr();ji();Vt();Wre=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c){super(),this.cacheService=i,this.socketService=r,this.ngZone=s,this.dialogService=o,this.permissionService=a,this.loginService=l,this.dialogRef=c,this.notAssignedPaymentsFiltered$=new Mi,this.notAssignedPayments$=new Mi,this.directionFilter$=new qs(""),this.paymentTypeFilter$=new qs(""),this.quickFilterText="",this.sourcePayment$=new qs(null),this.columnDefs=[{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateTime,minWidth:150,maxWidth:150},{headerName:"Zahlart",field:"paymentType",nxtFieldType:Ee.Text,valueFormatter:d=>Xo.getPaymentTypeText(d.value),minWidth:100,maxWidth:100},{headerName:"Richtung",field:"direction",nxtFieldType:Ee.Text,minWidth:100,maxWidth:100},{headerName:"Name",field:"name",nxtFieldType:Ee.Text,minWidth:300,maxWidth:300},{headerName:"Info",field:"info",nxtFieldType:Ee.Text,minWidth:300,maxWidth:300},{headerName:"Betrag",field:"value",nxtFieldType:Ee.Money,minWidth:100,maxWidth:100,cellStyle:{textAlign:"right"}},{headerName:"ID",field:"value",nxtFieldType:Ee.Text,valueGetter:d=>d.data.id,hide:!this.loginService.isJulian()},{colId:"select-source",headerName:"Zuweisen",field:"value",nxtFieldType:Ee.Text,valueGetter:d=>Ir.Material.Logout,nxtOnCellClicked:d=>this.startSelectDestination(d.data),cellStyle:{textAlign:"center"},minWidth:110,maxWidth:110,hide:!0},{colId:"select-destination",headerName:"Zuweisen",field:"value",nxtFieldType:Ee.Text,valueGetter:d=>Ir.Material.Login,nxtOnCellClicked:d=>this.setDestination(d.data),cellStyle:{textAlign:"center"},hide:!0,minWidth:110,maxWidth:110},{colId:"delete",headerName:"L\xF6schen",field:"value",nxtFieldType:Ee.Text,valueGetter:d=>Ir.Material.Delete,nxtOnCellClicked:d=>{this.delete(d.data)},cellStyle:{textAlign:"center"},hide:!this.permissionService.hasPermission(Zt.NotAssignedPayments_Delete),minWidth:100,maxWidth:100}],this.registerData(),P_([this.notAssignedPayments$,this.directionFilter$,this.paymentTypeFilter$]).pipe(lr(this.filter)).subscribe(this.notAssignedPaymentsFiltered$)}ngAfterViewInit(){this.dataGrid.gridIsReady.subscribe(()=>{this.sourcePayment$.next(null)})}ngOnInit(){this.sourcePayment$.subscribe(i=>{this.permissionService.hasPermission(Zt.NotAssignedPayments_Assign)&&(this.dataGrid?.api?.setColumnVisible("select-source",!i),this.dataGrid?.api?.setColumnVisible("select-destination",!!i))})}nxtOnDestroy(){}registerData(){this.pushSubscription=P_([this.socketService.getObservable("getNotAssignedBankTransactions"),this.socketService.getObservable("getNotAssignedKlarnaOrders"),this.socketService.getObservable("getNotAssignedPaypalTransactions")]).subscribe(([i,r,s])=>{let o=[];o.push(...i.map(a=>this.parseBankPayment(a))),o.push(...r.map(a=>this.parseKlarnaPayment(a))),o.push(...s.map(a=>this.parsePaypalPayment(a))),this.notAssignedPayments$.next(o.sortNumber("createdAt"))})}parseBankPayment(i){return{paymentType:"Bank",value:i.value,paymentValue:i.paymentValue,name:i.additionalInfo,direction:i.direction,createdAt:Ie.parse(i.createdAt),id:i.id,info:i.additionalInfo2}}parseKlarnaPayment(i){return{paymentType:"Klarna",value:i.value,paymentValue:i.paymentValue,name:i.fullName,direction:i.direction==="out"?"out":"in",createdAt:Ie.parse(i.createdAt),id:i.orderId,info:""}}parsePaypalPayment(i){return{paymentType:"PayPal",value:i.value,paymentValue:i.value,name:i.from,direction:i.direction,createdAt:Ie.parse(i.transactionTime),id:i.transactionId,info:i.transactionNote}}trigger(i){this.socketService.triggerSubscription(i)}filter([i,r,s]){return i.filter(o=>!r||o.direction===r).filter(o=>!s||o.paymentType===s)}startSelectDestination(i){return O(this,null,function*(){let r=yield this.dialogService.showYesNoCancel("W\xE4hle nun die Gegenzahlung aus",{yesText:"Gegenzahlung w\xE4hlen",noText:"Es gibt keine Gegenzahlung",cancelText:"Abbrechen"});if(typeof r=="boolean")if(r)i.direction==="in"?this.directionFilter$.next("out"):this.directionFilter$.next("in"),this.dataGrid.api.setColumnVisible("assign",!1),this.sourcePayment$.next(i);else{let s=[{value:null,text:"Abbrechen"}];i.direction==="in"?s.push({value:"withheld-deposit",text:"Einbehaltene Kaution"}):s.push({value:"repayment-goodwill",text:"R\xFCckzahlung aus Kulanz"});let o=yield this.dialogService.showButtons("Grund",{buttons:s});if(o?.value){let a=yield this.dialogService.showTextarea({message:"Bitte schreibe noch eine Info dazu",prompt:o.text+`
`});a&&(yield this.socketService.assignOpenPayment(i,o.value,a),this.directionFilter$.next(""))}}})}cancelAssignment(){this.sourcePayment$.next(null),this.directionFilter$.next("")}setDestination(i){return O(this,null,function*(){let r=this.sourcePayment$.getValue(),s=yield this.dialogService.showInput({message:"Betrag",okButtonText:"Zuweisen",isMoney:!0,prompt:r.value<i.value?r.value:i.value});if(s!==null){if(s>r.value||s>i.value){this.dialogService.showOk("So viel geht nicht du Otto \u{1F926}\u{1F3FD}\u200D\u2642\uFE0F");return}let o=r.direction==="in"?r:i,a=r.direction==="out"?r:i,l=[],c=o.paymentType+`
`+Ie.format(o.createdAt,"dd.MM.yyyy HH:mm")+`
`+o.name,d=a.paymentType+`
`+Ie.format(a.createdAt,"dd.MM.yyyy HH:mm")+`
`+a.name,u='<table><tr><td style="text-align: center; padding-bottom: 20px; font-size: 130%" colspan="3">'+Wn.toMoneyString(s)+"</td></tr><tr><td>"+c+'</td><td class="icon-size-3">&nbsp;&nbsp;'+Ir.Material.ArrowRight+"&nbsp;&nbsp;</td><td>"+d+"</td></tr>";if((yield this.dialogService.showYesNo(u,{yesText:"Ja, zuweisen!",noText:"Abbrechen"}))&&(yield this.dialogService.showYesNo('<div style="font-size: 150%">Check es nochmal!</div><br/>'+u,{yesText:"Ja, zuweisen!",noText:"Abbrechen"}))){let m=s;if(r.paymentValue&&i.paymentValue){let f=r.paymentValue/r.value,_=i.paymentValue/i.value;if(f!==_){this.dialogService.showOk(`Die Zahlungen haben unterschiedlichen Rabatt, das geht nicht
Info an Julian`);return}m=s*f}yield this.socketService.assignSourceDestPayments(r,i,s,m)}}this.sourcePayment$.next(null),this.directionFilter$.next("")})}delete(i){return O(this,null,function*(){if((yield this.dialogService.showYesNo("Willst du die Zahlung wirklich l\xF6schen?"))&&(yield this.dialogService.showYesNo("Wirklich wirklich wirklich l\xF6schen?")))if(i.paymentType==="Bank")yield this.socketService.deletePaymentPossibilityRecord(i.id);else{if(i.paymentType==="Klarna")throw Error("geht nicht!");if(i.paymentType==="PayPal")throw Error("geht nicht!")}})}};e.\u0275fac=function(r){return new(r||e)(R(cc),R(lt),R(pn),R(vt),R(ws),R(Fi),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-not-assigned-payments"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.dataGrid=o.first)}},standalone:!0,features:[et,xe],decls:37,vars:21,consts:[["fxLayout","column",1,"nxt-page","nxt-text"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px","fxLayoutAlign","start center"],[1,"page-header"],["fxLayout","column","fxLayoutAlign","start center"],[2,"display","flex","flex-direction","row",3,"change","disabled","value"],["value","",1,"studio-radio-button",2,"padding-right","15px"],["value","in",1,"studio-radio-button",2,"padding-right","15px"],["value","out",1,"studio-radio-button"],[2,"display","flex","flex-direction","row",3,"change","value"],["value","PayPal",1,"studio-radio-button",2,"padding-right","15px"],["value","Bank",1,"studio-radio-button",2,"padding-right","15px"],["value","Klarna",1,"studio-radio-button",2,"padding-right","15px"],["fxFlex","250px"],["placeholder","Suche",3,"valueChange","bottomNoPadding","value"],[4,"ngIf"],[3,"click",4,"ngIf"],[1,"h-100","w-full",3,"quickFilterText","columnDefs","rowData","showSideBar"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"Offene Zahlungen"),p(),h(5,"div",4)(6,"div"),y(7,"Richtung"),p(),h(8,"mat-radio-group",5),Ce(9,"async"),Ce(10,"async"),F("change",function(a){return s.directionFilter$.next(a.value)}),h(11,"mat-radio-button",6),y(12,"Alle"),p(),h(13,"mat-radio-button",7),y(14,"In"),p(),h(15,"mat-radio-button",8),y(16,"Out"),p()()(),h(17,"div",4)(18,"div"),y(19,"Zahlungstyp"),p(),h(20,"mat-radio-group",9),Ce(21,"async"),F("change",function(a){return s.paymentTypeFilter$.next(a.value)}),h(22,"mat-radio-button",6),y(23,"Alle"),p(),h(24,"mat-radio-button",10),y(25,"PayPal"),p(),h(26,"mat-radio-button",11),y(27,"Bank"),p(),h(28,"mat-radio-button",12),y(29,"Klarna"),p()()(),h(30,"div",13)(31,"nxt-input",14),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p()(),W(32,PBi,3,0,"div",15),Ce(33,"async"),p(),W(34,RBi,2,0,"nxt-button-icon",16),p(),ee(35,"nxt-datagrid",17),Ce(36,"async"),p()),r&2&&(g(8),b("disabled",!!tt(9,11,s.sourcePayment$))("value",tt(10,13,s.directionFilter$)),g(12),b("value",tt(21,15,s.paymentTypeFilter$)),g(11),b("bottomNoPadding",!0),qe("value",s.quickFilterText),g(),b("ngIf",tt(33,17,s.sourcePayment$)),g(2),b("ngIf",s.dialogRef),g(),b("quickFilterText",s.quickFilterText)("columnDefs",s.columnDefs)("rowData",tt(36,19,s.notAssignedPaymentsFiltered$))("showSideBar",!1))},dependencies:[At,Yt,$r,oi,qi,hg,h2,Yi,Ct,Lt,an,dr,Xu]});let t=e;return t})()});var t4t,_9e=Q(()=>{me();t4t=(()=>{let e=class e{constructor(){}transform(i,r,s){try{return i.length<s?i:i.substring(r,s)}catch{}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtSubstr",type:e,pure:!0,standalone:!0});let t=e;return t})()});var i4t=Q(()=>{});var n4t,r4t=Q(()=>{me();n4t=(()=>{let e=class e{constructor(){}transform(i){return i.lastBodyCustomerTimestamp>i.lastBodyMeTimestamp?i.name.startsWith("+")?i.name:i.name.split(" ")[0]:i.lastBodyMeUser}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtWhatsappChatUsername",type:e,pure:!0,standalone:!0});let t=e;return t})()});var s4t,o4t=Q(()=>{me();s4t=(()=>{let e=class e{constructor(){}transform(i){return i.lastBodyCustomerTimestamp>i.lastBodyMeTimestamp?i.lastBodyCustomer:i.lastBodyMe}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtWhatsappChatLastBody",type:e,pure:!0,standalone:!0});let t=e;return t})()});function FBi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",11),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function LBi(t,e){if(t&1&&(h(0,"div",17),y(1),Ce(2,"nxtWhatsappChatUsername"),p()),t&2){let n=w().$implicit;g(),Ke("",tt(2,1,n),":")}}function OBi(t,e){if(t&1){let n=re();h(0,"div",12),F("click",function(){let r=V(n).$implicit,s=w();return B(s.showChat(r))}),h(1,"div",13),y(2),p(),h(3,"div",13),y(4),Ce(5,"fromNowText"),p(),h(6,"div",14),W(7,LBi,3,3,"div",15),Ce(8,"nxtWhatsappChatUsername"),h(9,"div",16),y(10),Ce(11,"nxtWhatsappChatLastBody"),p()()()}if(t&2){let n=e.$implicit;g(2),ye(n.name),g(2),ye(tt(5,4,n.timestamp)),g(3),b("ngIf",tt(8,6,n)),g(3),ye(tt(11,8,n))}}var $F,Ure=Q(()=>{Gi();I7();$n();B1();ls();Jr();oo();ox();Vt();An();ri();_9e();i4t();r4t();o4t();me();ji();yi();Ci();An();Vt();$F=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.chats=[],this.chatsFiltered=[],this.sinceMinutes$=new qs(120),this.quickFilter="",this.onlyUnread=!1,this.showArtists=!1,this.onlyLastFromCustomer=!1}ngOnInit(){return O(this,null,function*(){this.load(),this.pushSocketSubscription=this.socketService.subscribeNew("eventWhatsAppChatChanged",()=>{this.load()},{emitInitial:!0}),this.sinceMinutes$.subscribe(i=>{this.load()})})}load(){return O(this,null,function*(){this.sinceMinutes$.value===-1?this.chats=yield this.socketService.getLatestWhatsAppMessages(void 0,"2023-01-30 20:00:00".dateParse()):this.chats=yield this.socketService.getLatestWhatsAppMessages(this.sinceMinutes$.value),this.filterChanged(this.quickFilter)})}showChat(i){let r=this.dialogService.showComponentFull(h3);r.componentInstance.loadChat(i.id),r.componentInstance.title=i.name,r.componentInstance.currentArtist=null}filterChanged(i){this.chatsFiltered=this.chats.filter(r=>{let s=!i||r.name.replace(/\s/g,"").toLowerCase().indexOf(i.toLowerCase().replace(/\s/g,""))>-1,o=!this.onlyUnread||r.unreadCount>0,a=this.showArtists||!r.name.includes("Artist_"),l=!this.onlyLastFromCustomer||!r.lastMessageFromMe;return s&&o&&a&&l})}onlyUnreadChanged(){this.filterChanged(this.quickFilter)}showArtistsChanged(){this.filterChanged(this.quickFilter)}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-chats"]],standalone:!0,features:[et,xe],decls:25,vars:14,consts:[["ngClass","nxt-page nxt-text","fxFlex","","fxLayout","column","fxLayoutAlign","stretch"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px","fxLayoutAlign","start center",1,"py-2"],[1,"page-header"],["fxLayout","row","fxLayout.lt-sm","column","fxLayoutAlign","center center",2,"padding-left","15px",3,"change","value"],[1,"studio-radio-button",2,"padding-right","15px",3,"value"],["fxHide.lt-sm","",3,"valueChange","value"],["fxHide.lt-sm","","placeholder","Suche",2,"width","300px",3,"valueChange","bottomNoPadding","value"],[3,"click",4,"ngIf"],["fxFlex","",1,"scrollable"],["fxLayoutAlign","start","fxLayout","row","fxLayout.lt-sm","column","class","chat-item text-90",3,"click",4,"ngFor","ngForOf"],[3,"click"],["fxLayoutAlign","start","fxLayout","row","fxLayout.lt-sm","column",1,"chat-item","text-90",3,"click"],["fxFlex","20%"],[1,"flex","flex-col","justify-center"],["class","break-word text-90","style","color: gray",4,"ngIf"],[1,"break-word"],[1,"break-word","text-90",2,"color","gray"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"WhatsApp Chats"),p(),h(5,"mat-radio-group",4),Ce(6,"async"),F("change",function(a){return s.sinceMinutes$.next(a.value)}),h(7,"mat-radio-button",5),y(8,"2 Stunden"),p(),h(9,"mat-radio-button",5),y(10,"12 Stunden"),p(),h(11,"mat-radio-button",5),y(12,"1 Tag"),p(),h(13,"mat-radio-button",5),y(14,"1 Woche"),p()(),h(15,"nxt-slide-toggle",6),Xe("valueChange",function(a){return Ze(s.onlyLastFromCustomer,a)||(s.onlyLastFromCustomer=a),a}),F("valueChange",function(){return s.onlyUnreadChanged()}),y(16,"vom Kunden zu letzt"),p(),h(17,"nxt-slide-toggle",6),Xe("valueChange",function(a){return Ze(s.onlyUnread,a)||(s.onlyUnread=a),a}),F("valueChange",function(){return s.onlyUnreadChanged()}),y(18,"ungelesen"),p(),h(19,"nxt-slide-toggle",6),Xe("valueChange",function(a){return Ze(s.showArtists,a)||(s.showArtists=a),a}),F("valueChange",function(){return s.showArtistsChanged()}),y(20,"mit Artists"),p(),h(21,"nxt-input",7),Xe("valueChange",function(a){return Ze(s.quickFilter,a)||(s.quickFilter=a),a}),F("valueChange",function(a){return s.filterChanged(a)}),p()(),W(22,FBi,2,0,"nxt-button-icon",8),p(),h(23,"div",9),W(24,OBi,12,10,"div",10),p()()),r&2&&(g(5),b("value",tt(6,12,s.sinceMinutes$)),g(2),b("value",120),g(2),b("value",720),g(2),b("value",1440),g(2),b("value",10080),g(2),qe("value",s.onlyLastFromCustomer),g(2),qe("value",s.onlyUnread),g(2),qe("value",s.showArtists),g(2),b("bottomNoPadding",!0),qe("value",s.quickFilter),g(),b("ngIf",s.dialogRef),g(2),b("ngForOf",s.chatsFiltered))},dependencies:[_s,Dn,Dv,No,At,Yt,$r,oi,qi,hg,h2,Nn,Yi,Ct,an,Hi,Xu,ld,n4t,s4t],styles:["[_nghost-%COMP%]{height:100%}[_nghost-%COMP%]   .chat-item[_ngcontent-%COMP%]{cursor:pointer;padding:10px;border-radius:4px;margin:5px 15px;border:1px solid #a2a2a2}"]});let t=e;return t})()});function zBi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",10),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function HBi(t,e){t&1&&(h(0,"div"),y(1,"*"),p())}function GBi(t,e){if(t&1){let n=re();h(0,"nxt-input",21),F("valueChange",function(){V(n);let r=w().$implicit,s=w();return B(s.setChanged(r))}),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.discountPercentage,r)||(s.discountPercentage=r),B(r)}),p()}if(t&2){let n=w().$implicit;qe("value",n.discountPercentage),b("bottomNoPadding",!0)("isPercent",!0)("disabled",!n.isNew)}}function WBi(t,e){if(t&1){let n=re();h(0,"nxt-input",22),F("valueChange",function(){V(n);let r=w().$implicit,s=w();return B(s.setChanged(r))}),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.priceFixValue,r)||(s.priceFixValue=r),B(r)}),p()}if(t&2){let n=w().$implicit;qe("value",n.priceFixValue),b("bottomNoPadding",!0)("isMoney",!0)("disabled",!n.isNew)}}function UBi(t,e){if(t&1){let n=re();h(0,"nxt-input",23),F("valueChange",function(){V(n);let r=w().$implicit,s=w();return B(s.setChanged(r))}),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.artistGet,r)||(s.artistGet=r),B(r)}),p()}if(t&2){let n=w().$implicit;qe("value",n.artistGet),b("bottomNoPadding",!0)("isMoney",!0)}}function jBi(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",5),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.staticPromoCode,r)||(s.staticPromoCode=r),B(r)}),y(1," Fester"),ee(2,"br"),y(3,"Promocode "),p()}if(t&2){let n=w().$implicit;qe("value",n.staticPromoCode)}}function $Bi(t,e){if(t&1){let n=re();h(0,"div",24)(1,"nxt-autocomplete",25),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.staticPromoCodePromoterId,r)||(s.staticPromoCodePromoterId=r),B(r)}),F("valueChange",function(){V(n);let r=w().$implicit,s=w();return B(s.setChanged(r))}),p(),h(2,"nxt-autocomplete",26),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.staticPromoCodePromoId,r)||(s.staticPromoCodePromoId=r),B(r)}),F("valueChange",function(){V(n);let r=w().$implicit,s=w();return B(s.setChanged(r))}),p()()}if(t&2){let n=w().$implicit,i=w();g(),b("options",i.promoPromoters)("displayInOptionWith",i.promoterDisplayWith)("displayWith",i.promoterDisplayWith)("filterFields",bn(10,VBi)),qe("value",n.staticPromoCodePromoterId),g(),b("options",i.promoPromotions)("displayInOptionWith",i.promotionDisplayWith)("displayWith",i.promotionDisplayWith)("filterFields",bn(11,BBi)),qe("value",n.staticPromoCodePromoId)}}function KBi(t,e){if(t&1){let n=re();h(0,"div",11),W(1,HBi,2,0,"div",12),h(2,"nxt-slide-toggle",5),F("valueChange",function(){let r=V(n).$implicit,s=w();return r.disabled=!r.disabled,B(s.setChanged(r))}),y(3,"Aktiv "),p(),h(4,"nxt-input",13),F("valueChange",function(){let r=V(n).$implicit,s=w();return B(s.setChanged(r))}),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.name,r)||(s.name=r),B(r)}),p(),h(5,"nxt-slide-toggle",14),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.priceFix,r)||(s.priceFix=r),B(r)}),F("valueChange",function(){let r=V(n).$implicit,s=w();return B(s.setChanged(r))}),y(6,"Preis"),ee(7,"br"),y(8,"anstatt Rabatt "),p(),h(9,"nxt-slide-toggle",14),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.priceLike,r)||(s.priceLike=r),B(r)}),F("valueChange",function(){let r=V(n).$implicit,s=w();return B(s.setChanged(r))}),y(10,"Ca. Preis "),p(),W(11,GBi,1,4,"nxt-input",15)(12,WBi,1,4,"nxt-input",16)(13,UBi,1,3,"nxt-input",17),h(14,"nxt-slide-toggle",5),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.disableDiscountedGiftCards,r)||(s.disableDiscountedGiftCards=r),B(r)}),F("valueChange",function(){let r=V(n).$implicit,s=w();return B(s.setChanged(r))}),y(15,"Keine rabattierten"),ee(16,"br"),y(17,"Gutscheine "),p(),h(18,"nxt-slide-toggle",5),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.additionalPayAfterEnd,r)||(s.additionalPayAfterEnd=r),B(r)}),F("valueChange",function(){let r=V(n).$implicit,s=w();return B(s.setChanged(r))}),y(19,"Nachkassieren "),p(),h(20,"nxt-slide-toggle",5),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.onlyWithPromoCode,r)||(s.onlyWithPromoCode=r),B(r)}),F("valueChange",function(){let r=V(n).$implicit,s=w();return B(s.setChanged(r))}),y(21,"Nur mit"),ee(22,"br"),y(23,"Promo-Code "),p(),W(24,jBi,4,1,"nxt-slide-toggle",18)(25,$Bi,3,12,"div",19),h(26,"nxt-button-icon",20),F("click",function(){let r=V(n).$implicit,s=w();return B(s.copyId(r))}),y(27,"content_copy"),p()()}if(t&2){let n=e.$implicit;g(),b("ngIf",n.changed),g(),b("value",!n.disabled),g(2),qe("value",n.name),b("bottomNoPadding",!0),g(),qe("value",n.priceFix),b("disabled",!n.isNew),g(4),qe("value",n.priceLike),b("disabled",!n.isNew),g(2),b("ngIf",!n.priceFix),g(),b("ngIf",n.priceFix),g(),b("ngIf",n.priceFix),g(),qe("value",n.disableDiscountedGiftCards),g(4),qe("value",n.additionalPayAfterEnd),g(2),qe("value",n.onlyWithPromoCode),g(4),b("ngIf",n.onlyWithPromoCode),g(),b("ngIf",n.staticPromoCode)}}function YBi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",10),F("click",function(){V(n);let r=w();return B(r.newItem())}),y(1,"add"),p()}}var NBi,VBi,BBi,jre,C9e=Q(()=>{lD();Ci();Zi();il();Ah();ls();ri();oo();Jr();Vt();me();ji();yi();qn();Kr();Ci();w4();Vt();NBi=["scrollWrapper"],VBi=()=>["name"],BBi=()=>["title"];jre=(()=>{let e=class e{constructor(i,r,s,o,a,l){this.dialogRef=i,this.socketService=r,this.formBuilder=s,this.loginService=o,this.dialogService=a,this.clipboardService=l,this.showDisabled=!1,this.loadTimestamp=0,this.quickSearchText="",this.promoterDisplayWith=c=>c?.name??"",this.promotionDisplayWith=c=>c?.title??"",this.load()}load(){return O(this,null,function*(){this.loadPromoters(),this.discountPromotions=yield this.socketService.getDynamicData(o3.DiscountPromotion),this.discountPromotions.forEach(i=>i.changed=!1),this.setFilter(),this.loadTimestamp=Date.now(),this.discountPromotions.forEach(i=>delete i.isNew),this.showDisabled||(this.discountPromotions=this.discountPromotions.filter(i=>!i.disabled),this.setFilter())})}newItem(){this.discountPromotions.push({id:null,discountPercentage:null,name:"",disabled:!1,createdAt:Date.now(),updatedAt:Date.now(),updatedBy:this.loginService.getUsername(),createdBy:this.loginService.getUsername(),changed:!0,type:o3.DiscountPromotion,priceFix:!1,priceFixValue:null,isNew:!0,additionalPayAfterEnd:!1,disableDiscountedGiftCards:!1,artistGet:null,staticPromoCode:!1,staticPromoCodePromoterId:"",staticPromoCodePromoId:"",priceLike:!1,maxHours:null,onlyWithPromoCode:!1}),this.setFilter(),requestAnimationFrame(()=>{this.scrollWrapper.nativeElement.scrollTo({top:999999999,behavior:"smooth"})})}save(){return O(this,null,function*(){let i=this.discountPromotions.filter(r=>r.changed);i.forEach(r=>delete r.isNew);for(let r of i){if(r.staticPromoCode&&!r.staticPromoCodePromoterId){this.dialogService.showOk("Es Fehlt der Promoter!");return}if(r.staticPromoCode&&!r.staticPromoCodePromoId){this.dialogService.showOk("Es Fehlt das Promo-Angebot!");return}}this.dialogService.showLoading(_n.DynamicDataSave,"Speichern..."),yield this.socketService.upsertDynamicDataBatch(i),this.discountPromotions.forEach(r=>r.changed=!1),this.load(),this.dialogService.hideLoading(_n.DynamicDataSave)})}setChanged(i){Date.now()-this.loadTimestamp>1e3&&(i.changed=!0)}copyId(i){this.dialogService.showOk("ID: "+i.id,{buttonText:"Ab in die Zwischenablage"}),this.clipboardService.copyToClipboard(i.id)}loadPromoters(){return O(this,null,function*(){this.promoPromoters=yield this.socketService.getPromoUsers(),this.promoPromotions=yield this.socketService.getPromoPromotions()})}quickSearchTextChanged(){this.setFilter()}setFilter(){this.discountPromotions&&(this.discountPromotionsFiltered=this.discountPromotions.filter(i=>i.name.toLowerCase().includes(this.quickSearchText.toLowerCase())))}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(ad),R(Fi),R(vt),R(ep))},e.\u0275cmp=_e({type:e,selectors:[["nxt-discount-promotions"]],viewQuery:function(r,s){if(r&1&&ei(NBi,5),r&2){let o;Pt(o=Rt())&&(s.scrollWrapper=o.first)}},standalone:!0,features:[xe],decls:17,vars:5,consts:[["scrollWrapper",""],[1,"nxt-page"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px"],[1,"page-header"],[3,"valueChange","value"],[3,"click",4,"ngIf"],[1,"o-auto","text-80"],["fxLayout","row","fxLayoutAlign","center center","class","p-3",4,"ngFor","ngForOf"],["fxLayout","column","fxLayoutAlign","center center"],[3,"click"],["fxLayout","row","fxLayoutAlign","center center",1,"p-3"],[4,"ngIf"],["placeholder","Name",2,"min-width","200px",3,"valueChange","value","bottomNoPadding"],[3,"valueChange","value","disabled"],["fxFlex","300px","placeholder","Rabatt (%)",3,"value","bottomNoPadding","isPercent","disabled","valueChange",4,"ngIf"],["fxFlex","150px","placeholder","Fixpreis",3,"value","bottomNoPadding","isMoney","disabled","valueChange",4,"ngIf"],["fxFlex","150px","placeholder","Artist bekommt",3,"value","bottomNoPadding","isMoney","valueChange",4,"ngIf"],[3,"value","valueChange",4,"ngIf"],["fxLayout","column","style","min-width: 250px",4,"ngIf"],["nxtPermission","Admin",3,"click"],["fxFlex","300px","placeholder","Rabatt (%)",3,"valueChange","value","bottomNoPadding","isPercent","disabled"],["fxFlex","150px","placeholder","Fixpreis",3,"valueChange","value","bottomNoPadding","isMoney","disabled"],["fxFlex","150px","placeholder","Artist bekommt",3,"valueChange","value","bottomNoPadding","isMoney"],["fxLayout","column",2,"min-width","250px"],["placeholder","Promoter","valueField","promoterId",3,"valueChange","options","displayInOptionWith","displayWith","filterFields","value"],["placeholder","Promo-Angebot","valueField","id",3,"valueChange","options","displayInOptionWith","displayWith","filterFields","value"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),y(4,"Rabatte"),p(),h(5,"nxt-input",5),Xe("valueChange",function(l){return V(o),Ze(s.quickSearchText,l)||(s.quickSearchText=l),B(l)}),F("valueChange",function(){return V(o),B(s.quickSearchTextChanged())}),y(6,"Suche"),p(),h(7,"nxt-slide-toggle",5),Xe("valueChange",function(l){return V(o),Ze(s.showDisabled,l)||(s.showDisabled=l),B(l)}),F("valueChange",function(){return V(o),B(s.load())}),y(8,"Inaktive einblenden"),p()(),W(9,zBi,2,0,"nxt-button-icon",6),p(),h(10,"div",7,0),W(12,KBi,28,16,"div",8),p(),h(13,"div",9),W(14,YBi,2,0,"nxt-button-icon",6),h(15,"nxt-button",10),F("click",function(){return V(o),B(s.save())}),y(16,"Speichern"),p()()()}r&2&&(g(5),qe("value",s.quickSearchText),g(2),qe("value",s.showDisabled),g(2),b("ngIf",s.dialogRef),g(3),b("ngForOf",s.discountPromotionsFiltered),g(2),b("ngIf",!s.quickSearchText))},dependencies:[At,Yt,$r,oi,qi,Yi,Nn,Ct,an,Hi,Ga,Zs,Lt],encapsulation:2});let t=e;return t})()});var a4t,x9e=Q(()=>{a4t=(()=>{let e=class e{};e.Loading=`<div style="width: 24px;margin: auto"><svg version="1.1" id="L9" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="12 12 75 75" enable-background="new 0 0 0 0" xml:space="preserve">
    <path fill="#fff" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
      <animateTransform attributeName="transform" attributeType="XML" type="rotate" dur="1s" from="0 50 50" to="360 50 50" repeatCount="indefinite"></animateTransform>
  </path>
</svg></div>`;let t=e;return t})()});var mS,KF,l4t=Q(()=>{Nu();mS=function(t){return t[t.Same=0]="Same",t[t.Version1Higher=1]="Version1Higher",t[t.Version2Higher=2]="Version2Higher",t}(mS||{}),KF=class t{static compare(e,n){let i=t.versionToNumber(e),r=t.versionToNumber(n);return i===r?mS.Same:i>r?mS.Version1Higher:mS.Version2Higher}static versionToNumber(e){let n=e.split(".");if(n.length!==3)throw Error(e+" is not a valid Version");let i=cr.fill(n[0],3,"0",!1)+cr.fill(n[1],3,"0",!1)+cr.fill(n[2],5,"0",!1);return parseInt(i,10)}}});var fS,$re,c4t=Q(()=>{fS=function(t){return t.Admin="admin",t.StudioInfo="studioInfo",t.Error="error",t.DayFinish="dayFinish",t.Deposit="deposit",t.EventArtistInfos="eventArtistInfos",t.AvailableArtists="availableArtists",t}(fS||{}),$re=class{static getGroupDescription(e){switch(e){case fS.EventArtistInfos:return"TERMINE / ARTISTS";case fS.AvailableArtists:return"VERF\xDCGBARE ARTISTS";case fS.StudioInfo:return"STUDIO INFO";case fS.DayFinish:return"ABRECHNUNG / BANK";case fS.Deposit:return"KAUTIONEN";case fS.Admin:return"ADMIN";case fS.Error:return"ERROR"}return"UNBEKANNT ("+e+")"}static parseMobile(e,n=!1){return e=e.replace("+",""),e=e.replace(/\s/g,""),e.indexOf("0")===0&&(e="49"+e.substring(1)),n?"+"+e:e}}});function qBi(t,e){if(t&1){let n=re();h(0,"table",1)(1,"tr")(2,"td"),y(3,"E-Mail"),p(),h(4,"td")(5,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.config.email,r)||(s.config.email=r),B(r)}),p()()(),h(6,"tr")(7,"td"),y(8,"Client ID"),p(),h(9,"td")(10,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.config.clientId,r)||(s.config.clientId=r),B(r)}),p()()(),h(11,"tr")(12,"td"),y(13,"Secret"),p(),h(14,"td")(15,"div",3)(16,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.config.secret,r)||(s.config.secret=r),B(r)}),p(),h(17,"nxt-button-icon",4),F("click",function(){V(n);let r=w();return B(r.openPaypalDevSite())}),y(18,"info"),p()()()(),h(19,"tr")(20,"td"),y(21,"Benutzen"),p(),h(22,"td")(23,"div",3)(24,"nxt-slide-toggle",5),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.config.use,r)||(s.config.use=r),B(r)}),p()()()(),ee(25,"tr"),h(26,"tr")(27,"td",6),ee(28,"br"),h(29,"nxt-button",7),F("click",function(){V(n);let r=w();return B(r.testPaypalImport())}),y(30,"Paypal-Import testen"),p()()()()}if(t&2){let n=w();g(5),qe("value",n.config.email),b("noPadding",!0),g(5),qe("value",n.config.clientId),b("noPadding",!0),g(6),qe("value",n.config.secret),b("noPadding",!0),g(8),qe("value",n.config.use)}}var d4t,u4t=Q(()=>{Ci();Zi();oo();ls();Vt();Jr();ri();me();ZE();yi();Ci();Vt();d4t=(()=>{let e=class e{constructor(i,r,s){this.electronService=i,this.socketService=r,this.dialogService=s}ngOnInit(){}openPaypalDevSite(){this.electronService.openExternal("https://developer.paypal.com/dashboard/applications/edit")}testPaypalImport(){return O(this,null,function*(){this.dialogService.showLoading(_n.ImportTest,"Paypal-Import Test l\xE4uft...");try{let i=yield this.socketService.paypalImportTest(this.config);typeof i=="number"&&(this.dialogService.hideLoading(_n.ImportTest),this.dialogService.showOk(`Paypal-Import war erfolgreich
Aktuelles Guthaben: `+i.toMoneyString()))}catch{this.dialogService.hideLoading(_n.ImportTest)}})}};e.\u0275fac=function(r){return new(r||e)(R(B6),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-settings-paypal-import"]],inputs:{config:"config"},standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full",4,"ngIf"],[1,"w-full"],[3,"valueChange","value","noPadding"],["fxLayout","row"],[3,"click"],[3,"valueChange","value"],["colspan","2"],[2,"width","100%",3,"click"]],template:function(r,s){r&1&&W(0,qBi,31,7,"table",0),r&2&&b("ngIf",s.config)},dependencies:[Ct,Yi,At,Yt,an,Nn,Lt],styles:["[_nghost-%COMP%]{width:100%}"]});let t=e;return t})()});function ZBi(t,e){if(t&1){let n=re();h(0,"table",1)(1,"tr")(2,"td"),y(3,"Bank"),p(),h(4,"td")(5,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.bankName,r)||(s.data.config.bankName=r),B(r)}),p()()(),h(6,"tr")(7,"td"),y(8,"Kontonummer"),p(),h(9,"td")(10,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.account,r)||(s.data.config.account=r),B(r)}),p()()(),h(11,"tr")(12,"td"),y(13,"BLZ"),p(),h(14,"td")(15,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.BLZ,r)||(s.data.config.BLZ=r),B(r)}),p()()(),h(16,"tr")(17,"td"),y(18,"BIC"),p(),h(19,"td")(20,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.bic,r)||(s.data.config.bic=r),B(r)}),p()()(),h(21,"tr")(22,"td"),y(23,"IBAN"),p(),h(24,"td")(25,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.iban,r)||(s.data.config.iban=r),B(r)}),p()()(),h(26,"tr")(27,"td"),y(28,"Login-Name"),p(),h(29,"td")(30,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.loginName,r)||(s.data.config.loginName=r),B(r)}),p()()(),h(31,"tr")(32,"td"),y(33,"PIN"),p(),h(34,"td")(35,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.pin,r)||(s.data.config.pin=r),B(r)}),p()()(),h(36,"tr")(37,"td"),y(38,"Bank URL"),p(),h(39,"td")(40,"div",4)(41,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.bankFintsURL,r)||(s.data.config.bankFintsURL=r),B(r)}),p(),h(42,"nxt-button-icon",5),F("click",function(){V(n);let r=w();return B(r.openFintsSite())}),y(43,"info"),p()()()(),h(44,"tr")(45,"td"),y(46,"Import-Timer"),p(),h(47,"td")(48,"nxt-input",6),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.timer,r)||(s.data.timer=r),B(r)}),p()()(),h(49,"tr")(50,"td",7),ee(51,"br"),h(52,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.testBankImport())}),y(53,"Bank-Import testen"),p()()()()}if(t&2){let n=w();g(5),qe("value",n.data.config.bankName),b("noPadding",!0),g(5),qe("value",n.data.config.account),b("noPadding",!0),g(5),qe("value",n.data.config.BLZ),b("noPadding",!0),g(5),qe("value",n.data.config.bic),b("noPadding",!0),g(5),qe("value",n.data.config.iban),b("noPadding",!0),g(5),qe("value",n.data.config.loginName),b("noPadding",!0),g(5),qe("value",n.data.config.pin),b("noPadding",!0),g(6),qe("value",n.data.config.bankFintsURL),b("noPadding",!0),g(7),b("isNumber",!0),qe("value",n.data.timer),b("noPadding",!0)}}var h4t,p4t=Q(()=>{Ci();Zi();ls();Vt();Jr();ri();me();ZE();yi();Ci();Vt();h4t=(()=>{let e=class e{constructor(i,r,s){this.electronService=i,this.socketService=r,this.dialogService=s}ngOnInit(){}openFintsSite(){this.electronService.openExternal("https://docs.google.com/spreadsheets/d/1ohqm3EbAJY-BqMHN74wFmB6EilzxG7U90SDVZ4wczYg/edit#gid=0")}testBankImport(){return O(this,null,function*(){this.dialogService.showLoading(_n.ImportTest,"Bank-Import Test l\xE4uft...");try{let i=yield this.socketService.bankImportTest(this.data.config);if(i){let r=i.balances.map(s=>s.Amt.toMoneyString()).join(", ");this.dialogService.hideLoading(_n.ImportTest),this.dialogService.showOk(`Bank-Import war erfolgreich
`+r)}}catch{this.dialogService.hideLoading(_n.ImportTest)}})}};e.\u0275fac=function(r){return new(r||e)(R(B6),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-settings-bank-import"]],inputs:{data:"data"},standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full",4,"ngIf"],[1,"w-full"],[3,"valueChange","value","noPadding"],["type","password",3,"valueChange","value","noPadding"],["fxLayout","row"],[3,"click"],[3,"valueChange","isNumber","value","noPadding"],["colspan","2"],[2,"width","100%",3,"click"]],template:function(r,s){r&1&&W(0,ZBi,54,19,"table",0),r&2&&b("ngIf",s.data)},dependencies:[Ct,Yi,At,Yt,an,Lt],styles:["[_nghost-%COMP%]{width:100%}"]});let t=e;return t})()});function XBi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Hauptkassenname"),p(),h(3,"td")(4,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.studio.realStudio,r)||(s.studio.realStudio=r),B(r)}),p()()()}if(t&2){let n=w(2);g(4),qe("value",n.studio.realStudio),b("noPadding",!0)}}function QBi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Adresse"),p(),h(3,"td")(4,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.studio.addressOneLine,r)||(s.studio.addressOneLine=r),B(r)}),p()()()}if(t&2){let n=w(2);g(4),qe("value",n.studio.addressOneLine),b("noPadding",!0)}}function JBi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Google Maps Link"),p(),h(3,"td")(4,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.studio.googleMapsLink,r)||(s.studio.googleMapsLink=r),B(r)}),p()()()}if(t&2){let n=w(2);g(4),qe("value",n.studio.googleMapsLink),b("noPadding",!0)}}function ezi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Link Einver. Tattoo"),p(),h(3,"td")(4,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.studio.acceptanceLinkTattoo,r)||(s.studio.acceptanceLinkTattoo=r),B(r)}),p()()()}if(t&2){let n=w(2);g(4),qe("value",n.studio.acceptanceLinkTattoo),b("noPadding",!0)}}function tzi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Link Einver. Piercing"),p(),h(3,"td")(4,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.studio.acceptanceLinkPiercing,r)||(s.studio.acceptanceLinkPiercing=r),B(r)}),p()()()}if(t&2){let n=w(2);g(4),qe("value",n.studio.acceptanceLinkPiercing),b("noPadding",!0)}}function izi(t,e){if(t&1){let n=re();h(0,"table",1)(1,"tr")(2,"td"),y(3,"Name"),p(),h(4,"td")(5,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.studio.name,r)||(s.studio.name=r),B(r)}),p()()(),h(6,"tr")(7,"td"),y(8,"Seitenkasse"),p(),h(9,"td",3)(10,"nxt-slide-toggle",4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.studio.onlyCash,r)||(s.studio.onlyCash=r),B(r)}),p()()(),W(11,XBi,5,2,"tr",5)(12,QBi,5,2,"tr",5)(13,JBi,5,2,"tr",5),h(14,"tr")(15,"td"),y(16,"Kurzname"),p(),h(17,"td")(18,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.studio.shortName,r)||(s.studio.shortName=r),B(r)}),p()()(),W(19,ezi,5,2,"tr",5)(20,tzi,5,2,"tr",5),h(21,"tr")(22,"td"),y(23,"Debug (f\xFCr Julian)"),p(),h(24,"td")(25,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.studio.debug,r)||(s.studio.debug=r),B(r)}),p()()()()}if(t&2){let n=w();g(5),qe("value",n.studio.name),b("noPadding",!0),g(5),qe("value",n.studio.onlyCash),g(),b("ngIf",n.studio.onlyCash),g(),b("ngIf",!n.studio.onlyCash),g(),b("ngIf",!n.studio.onlyCash),g(5),qe("value",n.studio.shortName),b("noPadding",!0),g(),b("ngIf",!n.studio.onlyCash),g(),b("ngIf",!n.studio.onlyCash),g(5),qe("value",n.studio.debug),b("noPadding",!0)}}var m4t,f4t=Q(()=>{oo();Jr();ri();me();m4t=(()=>{let e=class e{constructor(){}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-settings-ng-config-studio"]],inputs:{studio:"studio"},standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full",4,"ngIf"],[1,"w-full"],[3,"valueChange","value","noPadding"],[2,"padding-top","7px","padding-bottom","7px"],[3,"valueChange","value"],[4,"ngIf"]],template:function(r,s){r&1&&W(0,izi,26,12,"table",0),r&2&&b("ngIf",s.studio)},dependencies:[Ct,Yi,Nn],styles:["[_nghost-%COMP%]{width:100%}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{white-space:nowrap}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){width:100%}"]});let t=e;return t})()});var nzi,g4t,v4t=Q(()=>{me();sZ();Ep();Ah();me();nzi=()=>["name"],g4t=(()=>{let e=class e{constructor(){this.valueChange=new nt,this.countries=sD.list,this.placeholder="",this.displayInOptionWithCountry=(i,r)=>i?r(i.name):"",this.displayWithCountry=i=>i?i.name??i.name:""}set nxtFormControl(i){this._nxtFormControl=i,this.initFormControlListener()}set value(i){this._nxtFormControl||(this.nxtFormControl=new $t(i)),this.autocompleteValue?.code!==i&&this._nxtFormControl.setValue(i)}ngOnInit(){}optionClicked(i){let r=i.option.value.code;r!==this.autocompleteValue?.code&&this._nxtFormControl.setValue(r)}initFormControlListener(){this._nxtFormControl.valueChanges.subscribe(i=>{i!==this.autocompleteValue?.code&&(this.autocompleteValue=sD.list.find(r=>r.code===i),this.valueChange.emit(i))})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-country-select-component"]],inputs:{nxtFormControl:"nxtFormControl",value:"value",placeholder:"placeholder"},outputs:{valueChange:"valueChange"},standalone:!0,features:[xe],decls:1,vars:8,consts:[["panelWidth","300px",3,"optionClick","placeholder","value","options","displayWith","displayInOptionWith","maxOptionsToShow","filterFields"]],template:function(r,s){r&1&&(h(0,"nxt-autocomplete",0),F("optionClick",function(a){return s.optionClicked(a)}),p()),r&2&&b("placeholder",s.placeholder)("value",s.autocompleteValue)("options",s.countries)("displayWith",s.displayWithCountry)("displayInOptionWith",s.displayInOptionWithCountry)("maxOptionsToShow",-1)("filterFields",bn(7,nzi))},dependencies:[Ga],styles:["[_nghost-%COMP%]{width:100%}"]});let t=e;return t})()});function rzi(t,e){if(t&1){let n=re();h(0,"table",1)(1,"tr")(2,"td"),y(3,"Bankname"),p(),h(4,"td",2)(5,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromBank,r)||(s.ngConfig.invoiceData.fromBank=r),B(r)}),p()()(),h(6,"tr")(7,"td"),y(8,"IBAN"),p(),h(9,"td")(10,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromBankIBAN,r)||(s.ngConfig.invoiceData.fromBankIBAN=r),B(r)}),p()()(),h(11,"tr")(12,"td"),y(13,"Stadt"),p(),h(14,"td")(15,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromCity,r)||(s.ngConfig.invoiceData.fromCity=r),B(r)}),p()()(),h(16,"tr")(17,"td"),y(18,"Firma"),p(),h(19,"td")(20,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromCompany,r)||(s.ngConfig.invoiceData.fromCompany=r),B(r)}),p()()(),h(21,"tr")(22,"td"),y(23,"Firma Zusatz"),p(),h(24,"td")(25,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromCompany2,r)||(s.ngConfig.invoiceData.fromCompany2=r),B(r)}),p()()(),h(26,"tr")(27,"td"),y(28,"PLZ"),p(),h(29,"td")(30,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromPostalCode,r)||(s.ngConfig.invoiceData.fromPostalCode=r),B(r)}),p()()(),h(31,"tr")(32,"td"),y(33,"Land"),p(),h(34,"td")(35,"nxt-country-select-component",4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromCountryCode,r)||(s.ngConfig.invoiceData.fromCountryCode=r),B(r)}),p()()(),h(36,"tr")(37,"td"),y(38,"Bundesland (nw, by, ...)"),p(),h(39,"td")(40,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromRegion,r)||(s.ngConfig.invoiceData.fromRegion=r),B(r)}),p()()(),h(41,"tr")(42,"td"),y(43,"Stra\xDFe"),p(),h(44,"td")(45,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromStreet,r)||(s.ngConfig.invoiceData.fromStreet=r),B(r)}),p()()(),h(46,"tr")(47,"td"),y(48,"Steuernummer"),p(),h(49,"td")(50,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromTaxId,r)||(s.ngConfig.invoiceData.fromTaxId=r),B(r)}),p()()(),h(51,"tr")(52,"td"),y(53,"MwSt.-Nummer"),p(),h(54,"td")(55,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.fromVATNumber,r)||(s.ngConfig.invoiceData.fromVATNumber=r),B(r)}),p()()(),h(56,"tr")(57,"td"),y(58,"MwSt. Steuersatz"),p(),h(59,"td")(60,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.vatPercent,r)||(s.ngConfig.invoiceData.vatPercent=r),B(r)}),p()()(),h(61,"tr")(62,"td"),y(63,"AGB Stand"),p(),h(64,"td")(65,"nxt-date-picker",5),Xe("nxtModelChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.dateOfCondition,r)||(s.ngConfig.invoiceData.dateOfCondition=r),B(r)}),p()()(),h(66,"tr")(67,"td"),y(68,"RE Sprache (DE, ES)"),p(),h(69,"td")(70,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.invoiceData.lang,r)||(s.ngConfig.invoiceData.lang=r),B(r)}),p()()()()}if(t&2){let n=w();g(5),qe("value",n.ngConfig.invoiceData.fromBank),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromBankIBAN),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromCity),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromCompany),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromCompany2),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromPostalCode),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromCountryCode),g(5),qe("value",n.ngConfig.invoiceData.fromRegion),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromStreet),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromTaxId),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.fromVATNumber),b("noPadding",!0),g(5),qe("value",n.ngConfig.invoiceData.vatPercent),b("noPadding",!0),g(5),qe("nxtModel",n.ngConfig.invoiceData.dateOfCondition),g(5),qe("value",n.ngConfig.invoiceData.lang),b("noPadding",!0)}}var y4t,_4t=Q(()=>{th();v4t();Jr();ri();me();y4t=(()=>{let e=class e{constructor(){}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-settings-ng-config-invoice-data"]],inputs:{ngConfig:"ngConfig"},standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full",4,"ngIf"],[1,"w-full"],[2,"width","100%"],[3,"valueChange","value","noPadding"],[3,"valueChange","value"],[3,"nxtModelChange","nxtModel"]],template:function(r,s){r&1&&W(0,rzi,71,26,"table",0),r&2&&b("ngIf",s.ngConfig)},dependencies:[Ct,Yi,g4t,tl],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]   table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{white-space:nowrap}"]});let t=e;return t})()});function szi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Auto-Antwort nach"),p(),h(3,"td")(4,"div",5)(5,"nxt-time-picker",6),Ce(6,"duration"),F("valueChange",function(r){V(n);let s=w(2);return B(s.setLastIncomingMessageThreshold(r))}),p(),h(7,"div"),y(8,"Stunden wiederholen"),p()()()()}if(t&2){let n=w(2);g(5),b("value",Nt(6,1,n.whatsApp.autoResponse.lastIncomingMessageThreshold,"HH:mm"))}}function ozi(t,e){if(t&1){let n=re();h(0,"div",10)(1,"nxt-input",11),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.mobileStartsWith,r)||(s.mobileStartsWith=r),B(r)}),p(),h(2,"nxt-textarea",3),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.message,r)||(s.message=r),B(r)}),p()()}if(t&2){let n=e.$implicit;g(),qe("value",n.mobileStartsWith),b("noPadding",!0),g(),qe("value",n.message)}}function azi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Auto-Antwort Texte"),p(),h(3,"td"),W(4,ozi,3,3,"div",7),h(5,"div",8)(6,"nxt-button-icon",9),F("click",function(){V(n);let r=w(2);return B(r.addMessage())}),y(7,"add"),p(),h(8,"nxt-button-icon",9),F("click",function(){V(n);let r=w(2);return B(r.removeMessage())}),y(9,"remove"),p()()()()}if(t&2){let n=w(2);g(4),b("ngForOf",n.whatsApp.autoResponse.messages)}}function lzi(t,e){if(t&1){let n=re();h(0,"table",1)(1,"tr")(2,"td"),y(3,"Auto-Antwort"),p(),h(4,"td",2)(5,"nxt-slide-toggle",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.whatsApp.autoResponse.enable,r)||(s.whatsApp.autoResponse.enable=r),B(r)}),p()()(),W(6,szi,9,4,"tr",4)(7,azi,10,1,"tr",4),p()}if(t&2){let n=w();g(5),qe("value",n.whatsApp.autoResponse.enable),g(),b("ngIf",n.whatsApp.autoResponse.enable),g(),b("ngIf",n.whatsApp.autoResponse.enable)}}var C4t,x4t=Q(()=>{jo();Lv();ls();n1();Jr();Ly();Vt();oo();ri();me();Vt();C4t=(()=>{let e=class e{constructor(){}ngOnInit(){}addMessage(){this.whatsApp.autoResponse.messages.push({mobileStartsWith:"",message:""})}removeMessage(){this.whatsApp.autoResponse.messages.length>0&&(this.whatsApp.autoResponse.messages.length-=1)}setLastIncomingMessageThreshold(i){i&&(this.whatsApp.autoResponse.lastIncomingMessageThreshold=Qt.parse(i))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-settings-whatsapp"]],inputs:{whatsApp:"whatsApp"},standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full",4,"ngIf"],[1,"w-full"],[2,"width","100%"],[3,"valueChange","value"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center"],[2,"width","100px","display","block",3,"valueChange","value"],["fxLayout","row","fxLayoutAlign","center center",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center",1,"w-full"],[3,"click"],["fxLayout","row","fxLayoutAlign","center center"],["placeholder","Handy f\xE4ngt an mit",3,"valueChange","value","noPadding"]],template:function(r,s){r&1&&W(0,lzi,8,3,"table",0),r&2&&b("ngIf",s.whatsApp)},dependencies:[Ct,Nn,At,Yt,oi,cf,Hi,Yi,yu,an,lf],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]   table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{white-space:nowrap}"]});let t=e;return t})()});function czi(t,e){if(t&1){let n=re();h(0,"table",1)(1,"tr")(2,"td"),y(3,"IBAN"),p(),h(4,"td")(5,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.iban,r)||(s.data.config.iban=r),B(r)}),p()()(),h(6,"tr")(7,"td"),y(8,"Kennung"),p(),h(9,"td")(10,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.identifier,r)||(s.data.config.identifier=r),B(r)}),p()()(),h(11,"tr")(12,"td"),y(13,"Geheimschl\xFCssel"),p(),h(14,"td")(15,"nxt-input",2),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.config.secret,r)||(s.data.config.secret=r),B(r)}),p()()(),h(16,"tr")(17,"td"),y(18,"Import-Timer"),p(),h(19,"td")(20,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.data.timer,r)||(s.data.timer=r),B(r)}),p()()()()}if(t&2){let n=w();g(5),qe("value",n.data.config.iban),b("noPadding",!0),g(5),qe("value",n.data.config.identifier),b("noPadding",!0),g(5),qe("value",n.data.config.secret),b("noPadding",!0),g(5),b("isNumber",!0),qe("value",n.data.timer),b("noPadding",!0)}}var b4t,w4t=Q(()=>{Zi();ls();Vt();Jr();ri();me();ZE();yi();Ci();b4t=(()=>{let e=class e{constructor(i,r,s){this.electronService=i,this.socketService=r,this.dialogService=s}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)(R(B6),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-settings-qonto"]],inputs:{data:"data"},standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full",4,"ngIf"],[1,"w-full"],[3,"valueChange","value","noPadding"],[3,"valueChange","isNumber","value","noPadding"]],template:function(r,s){r&1&&W(0,czi,21,9,"table",0),r&2&&b("ngIf",s.data)},dependencies:[Ct,Yi,At],styles:["[_nghost-%COMP%]{width:100%}"]});let t=e;return t})()});function dzi(t,e){if(t&1){let n=re();h(0,"nxt-input",20),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.mustEventRatingMin,r)||(s.mustEventRatingMin=r),B(r)}),p()}if(t&2){let n=w(2);qe("value",n.mustEventRatingMin),b("isNumber",!0)}}function uzi(t,e){if(t&1){let n=re();h(0,"div",5)(1,"div",6)(2,"div",7),y(3,"ALLGEMEIN"),p(),h(4,"div",14)(5,"nxt-time-picker",15),Ce(6,"duration"),F("valueChange",function(r){V(n);let s=w();return B(s.setStudioWorkStart(r))}),p(),h(7,"nxt-time-picker",16),Ce(8,"duration"),F("valueChange",function(r){V(n);let s=w();return B(s.setStudioWorkEnd(r))}),p()(),h(9,"div",17)(10,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.workOnSunday,r)||(s.ngConfig.workOnSunday=r),B(r)}),y(11,"Sonntags ge\xF6ffnet"),p()(),h(12,"div",17)(13,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.sendArtistWorkTimeInfo,r)||(s.sendArtistWorkTimeInfo=r),B(r)}),y(14,"Arbeitszeiten an Artist schicken"),p()(),h(15,"div",17)(16,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.isWalkInToday,r)||(s.ngConfig.isWalkInToday=r),B(r)}),y(17,"Ist Walk-In"),p()(),h(18,"div",17)(19,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.printSecondWalkInNoIfArtistOpen,r)||(s.ngConfig.printSecondWalkInNoIfArtistOpen=r),B(r)}),y(20,"2x Walk-In drucken wenn Artist offen"),p()(),h(21,"div",17)(22,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.enableArtistConfirm,r)||(s.ngConfig.enableArtistConfirm=r),B(r)}),y(23,"Artist Empfangsbest\xE4tigung"),p()(),h(24,"div",17)(25,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.sendToArtistViaTelegram,r)||(s.ngConfig.sendToArtistViaTelegram=r),B(r)}),y(26,"Artists via Telegram"),p()(),h(27,"div",17)(28,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.printAllCashPaymentReceipts,r)||(s.printAllCashPaymentReceipts=r),B(r)}),y(29,"Belegdrucker"),p()(),h(30,"div",17)(31,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.ngConfig.cashReportHideArtistGetValues,r)||(s.ngConfig.cashReportHideArtistGetValues=r),B(r)}),y(32,"CashReport: Artists-Geld ausblenden (Empfang)"),p()(),h(33,"div",17)(34,"nxt-slide-toggle",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.mustEventRating,r)||(s.mustEventRating=r),B(r)}),y(35,"Tattoo-Bewertungen"),p(),W(36,dzi,1,2,"nxt-input",19),p(),ee(37,"br"),p()()}if(t&2){let n=w();g(5),b("noPadding",!0)("value",Nt(6,14,n.ngConfig.studioWorkStart,"HH:mm")),g(2),b("noPadding",!0)("value",Nt(8,17,n.ngConfig.studioWorkEnd,"HH:mm")),g(3),qe("value",n.ngConfig.workOnSunday),g(3),qe("value",n.sendArtistWorkTimeInfo),g(3),qe("value",n.ngConfig.isWalkInToday),g(3),qe("value",n.ngConfig.printSecondWalkInNoIfArtistOpen),g(3),qe("value",n.ngConfig.enableArtistConfirm),g(3),qe("value",n.ngConfig.sendToArtistViaTelegram),g(3),qe("value",n.printAllCashPaymentReceipts),g(3),qe("value",n.ngConfig.cashReportHideArtistGetValues),g(3),qe("value",n.mustEventRating),g(2),Je(n.mustEventRating?36:-1)}}function hzi(t,e){if(t&1){let n=re();h(0,"table",9)(1,"tr")(2,"td"),y(3,"Text unter Logo"),p(),h(4,"td",23)(5,"nxt-input",24),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.ngConfig.voucher.logoTitle,r)||(s.ngConfig.voucher.logoTitle=r),B(r)}),p()()(),h(6,"tr")(7,"td"),y(8,"Adresstext"),p(),h(9,"td",23)(10,"nxt-input",24),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.ngConfig.voucher.address,r)||(s.ngConfig.voucher.address=r),B(r)}),p()()()()}if(t&2){let n=w(2);g(5),qe("value",n.ngConfig.voucher.logoTitle),b("noPadding",!0),g(5),qe("value",n.ngConfig.voucher.address),b("noPadding",!0)}}function pzi(t,e){if(t&1&&(h(0,"div",5)(1,"div",21)(2,"div",7),y(3,"GUTSCHEINE"),p(),h(4,"div",8),W(5,hzi,11,4,"table",22),p()()()),t&2){let n=w();g(5),b("ngIf",n.ngConfig)}}function mzi(t,e){if(t&1&&(h(0,"div",5)(1,"div",6)(2,"div",7),y(3,"WHATSAPP"),p(),h(4,"div",8),ee(5,"nxt-settings-whatsapp",25),p()()()),t&2){let n=w();g(5),b("whatsApp",n.whatsApp)}}function fzi(t,e){if(t&1&&(h(0,"div",5)(1,"div",6)(2,"div",7),y(3,"RECHNUNGSDATEN"),p(),h(4,"div",8),ee(5,"nxt-settings-ng-config-invoice-data",26),p()()()),t&2){let n=w();g(5),b("ngConfig",n.ngConfig)}}function gzi(t,e){if(t&1&&(h(0,"div",29)(1,"div",8),ee(2,"nxt-settings-ng-config-studio",30),p()()),t&2){let n=e.$implicit;g(2),b("studio",n)}}function vzi(t,e){if(t&1&&(h(0,"div",5)(1,"div",27)(2,"div",7),y(3,"STUDIOS"),p(),W(4,gzi,3,1,"div",28),p()()),t&2){let n=w();g(4),b("ngForOf",n.ngConfig.studios)}}function yzi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2),p(),h(3,"td")(4,"nxt-input",31),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.groupId,r)||(s.groupId=r),B(r)}),p()()()}if(t&2){let n=e.$implicit;g(2),ye(n.description),g(2),b("isNumber",!0),qe("value",n.groupId),b("noPadding",!0)}}function _zi(t,e){if(t&1&&(h(0,"div",5)(1,"div",27)(2,"div",7),y(3,"BANK-IMPORT"),p(),h(4,"div",8),ee(5,"nxt-settings-bank-import",32),p()()()),t&2){let n=w();g(5),b("data",n.bankData)}}function Czi(t,e){if(t&1&&(h(0,"div",5)(1,"div",27)(2,"div",7),y(3,"QONTO"),p(),h(4,"div",8),ee(5,"nxt-settings-qonto",32),p()()()),t&2){let n=w();g(5),b("data",n.qontoData)}}function xzi(t,e){if(t&1){let n=re();h(0,"div",36),ee(1,"nxt-settings-paypal-import",37),h(2,"nxt-button-icon",13),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.removePaypal(r))}),y(3,"remove"),p()()}if(t&2){let n=e.$implicit;g(),b("config",n)}}function bzi(t,e){if(t&1){let n=re();h(0,"div",5)(1,"div",27)(2,"div",7),y(3,"PAYPAL-ACCOUNTS"),p(),h(4,"div",33),W(5,xzi,4,1,"div",34),h(6,"nxt-button-icon",13),F("click",function(){V(n);let r=w();return B(r.newPaypal())}),y(7,"add"),p(),h(8,"nxt-input",35),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.paypalData.timer,r)||(s.paypalData.timer=r),B(r)}),p()()()()}if(t&2){let n=w();g(5),b("ngForOf",n.paypalData.configs),g(3),b("isNumber",!0),qe("value",n.paypalData.timer),b("noPadding",!0)}}function wzi(t,e){if(t&1){let n=re();h(0,"div",5)(1,"div",27)(2,"div",7),y(3,"GOOGLE KALENDER"),p(),h(4,"div",8)(5,"nxt-input",38),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.googleCalendar.password,r)||(s.googleCalendar.password=r),B(r)}),p()()()()}if(t&2){let n=w();g(5),qe("value",n.googleCalendar.password)}}function Szi(t,e){if(t&1){let n=re();h(0,"div",5)(1,"div",27)(2,"div",7),y(3,"FOTO ICLOUD"),p(),h(4,"div",39)(5,"nxt-input",40),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.icloudSync.appleId,r)||(s.icloudSync.appleId=r),B(r)}),p(),h(6,"nxt-input",38),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.icloudSync.password,r)||(s.icloudSync.password=r),B(r)}),p()()()()}if(t&2){let n=w();g(5),qe("value",n.icloudSync.appleId),g(),qe("value",n.icloudSync.password)}}var S4t,T4t=Q(()=>{c4t();Ci();Yc();zn();jo();Lv();Zi();ls();u4t();p4t();f4t();_4t();x4t();Jr();oo();Ly();ri();Vt();w4t();me();yi();Ci();Vt();S4t=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.dialogService=r,this.telegramGroups=[]}ngOnInit(){this.load()}load(){return O(this,null,function*(){this.loadTelegramGroups(),this.loadNgConfig(),this.loadICloud(),this.loadWhatsApp(),this.loadBankImport(),this.loadQonto(),this.loadPaypalImport(),this.loadGoogleCalendar(),this.loadSendArtistWorkTimeInfo(),this.loadPrintAllCashPaymentReceipts(),this.loadMustEventRating(),this.loadServiceConfigs()})}save(){return O(this,null,function*(){this.isValid()&&(this.dialogService.showLoading(_n.SaveSettings,"Daten werden gespeichert"),yield this.socketService.setGlobalConfig("TelegramGroups",this.getTelegramGroupsFromForm()),this.ngConfig.invoiceData.dateOfCondition=Ie.parseFormat(this.ngConfig.invoiceData.dateOfCondition,"yyyy-MM-dd"),this.dialogService.updateLoadingText(`Daten werden gespeichert
NgConfig`),yield this.socketService.setGlobalConfig("NgConfig",this.ngConfig),this.dialogService.updateLoadingText(`Daten werden gespeichert
Bank Import`),yield this.saveBankImport(),yield this.saveQontoImport(),this.dialogService.updateLoadingText(`Daten werden gespeichert
PayPal Import`),yield this.savePaypalImport(),this.dialogService.updateLoadingText(`Daten werden gespeichert
Google-Kalender`),yield this.saveGoogleCalendar(),yield this.saveWhatsApp(),yield this.saveSendArtistWorkTimeInfo(),yield this.savePrintAllCashPaymentReceipts(),yield this.saveMustEventRating(),yield this.saveIcloudSync(),yield this.saveServiceConfigs(),this.dialogService.hideLoading(_n.SaveSettings),this.dialogService.showOk("Erfolgreich gespeichert"))})}loadTelegramGroups(){return O(this,null,function*(){let i=yield this.socketService.getGlobalConfig("TelegramGroups");this.telegramGroups=[];for(let r of Object.keys(i))this.telegramGroups.push({key:r,groupId:i[r],description:$re.getGroupDescription(r)});this.telegramGroups=this.telegramGroups.sort(Hr.sortString("description"))})}getTelegramGroupsFromForm(){let i={};for(let r of this.telegramGroups)i[r.key]=r.groupId;return i}loadNgConfig(){return O(this,null,function*(){this.ngConfig=yield this.socketService.getGlobalConfig("NgConfig")})}loadICloud(){return O(this,null,function*(){this.icloudSync=yield this.socketService.getGlobalConfig("IcloudSync"),this.icloudSync||(this.icloudSync={appleId:"",password:""})})}loadWhatsApp(){return O(this,null,function*(){this.whatsApp=yield this.socketService.getGlobalConfig("WhatsApp")})}loadServiceConfigs(){return O(this,null,function*(){this.serviceConfigs=yield this.socketService.getServerConfig("ServiceConfigs")})}loadGoogleCalendar(){return O(this,null,function*(){this.googleCalendar=yield this.socketService.getGlobalConfig("GoogleCalendar"),this.googleCalendar||(this.googleCalendar={password:""})})}loadBankImport(){return O(this,null,function*(){this.bankData={timer:yield this.socketService.getServerConfig("TimerManager_BankingTimer_intervalSeconds"),config:yield this.socketService.getGlobalConfig("BankImport")},this.bankData.config||(this.bankData.config={bankFintsURL:"",pin:"",BLZ:"",loginName:"",iban:"",bic:"",account:"",bankName:""})})}loadQonto(){return O(this,null,function*(){this.qontoData={timer:yield this.socketService.getServerConfig("TimerManager_QontoTimer_intervalSeconds"),config:yield this.socketService.getGlobalConfig("Qonto")},this.qontoData.config||(this.qontoData.config={iban:"",identifier:"",secret:""})})}loadPaypalImport(){return O(this,null,function*(){this.paypalData={timer:yield this.socketService.getServerConfig("TimerManager_PaypalTimer_intervalSeconds"),configs:yield this.socketService.getGlobalConfig("PaypalImports")},(!this.paypalData.configs||this.paypalData.configs.length===0)&&(this.paypalData.configs=[yield this.socketService.getGlobalConfig("PaypalImport")])})}savePaypalImport(){return O(this,null,function*(){yield this.socketService.setGlobalConfig("PaypalImports",this.paypalData.configs),yield this.socketService.setServerConfig({key:"TimerManager_PaypalTimer_intervalSeconds",value:this.paypalData.timer})})}saveBankImport(){return O(this,null,function*(){yield this.socketService.setGlobalConfig("BankImport",this.bankData.config),yield this.socketService.setServerConfig({key:"TimerManager_BankingTimer_intervalSeconds",value:this.bankData.timer})})}saveQontoImport(){return O(this,null,function*(){yield this.socketService.setGlobalConfig("Qonto",this.qontoData.config),yield this.socketService.setServerConfig({key:"TimerManager_QontoTimer_intervalSeconds",value:this.qontoData.timer})})}saveWhatsApp(){return O(this,null,function*(){yield this.socketService.setGlobalConfig("WhatsApp",this.whatsApp)})}saveGoogleCalendar(){return O(this,null,function*(){yield this.socketService.setGlobalConfig("GoogleCalendar",this.googleCalendar)})}setStudioWorkStart(i){this.ngConfig.studioWorkStart=Qt.parse(i)}setStudioWorkEnd(i){i==="0:00"?this.ngConfig.studioWorkEnd=Qt.DURATION_1DAY:this.ngConfig.studioWorkEnd=Qt.parse(i)}loadSendArtistWorkTimeInfo(){return O(this,null,function*(){this.sendArtistWorkTimeInfo=yield this.socketService.getServerConfig("SendArtistWorkTimeInfo")})}loadPrintAllCashPaymentReceipts(){return O(this,null,function*(){this.printAllCashPaymentReceipts=!!(yield this.socketService.getGlobalConfig("PrintAllCashPaymentReceipts"))})}loadMustEventRating(){return O(this,null,function*(){this.mustEventRating=!!(yield this.socketService.getGlobalConfig("MustEventRating")),this.mustEventRatingMin=yield this.socketService.getGlobalConfig("MustEventRatingMin")})}saveMustEventRating(){return O(this,null,function*(){yield this.socketService.setGlobalConfig("MustEventRating",this.mustEventRating),yield this.socketService.setGlobalConfig("MustEventRatingMin",this.mustEventRatingMin)})}saveIcloudSync(){return O(this,null,function*(){yield this.socketService.setGlobalConfig("IcloudSync",this.icloudSync)})}savePrintAllCashPaymentReceipts(){return O(this,null,function*(){yield this.socketService.setGlobalConfig("PrintAllCashPaymentReceipts",this.printAllCashPaymentReceipts)})}saveSendArtistWorkTimeInfo(){return O(this,null,function*(){yield this.socketService.setServerConfig({key:"SendArtistWorkTimeInfo",value:!!this.sendArtistWorkTimeInfo})})}saveServiceConfigs(){return O(this,null,function*(){yield this.socketService.setServerConfig({key:"ServiceConfigs",value:this.serviceConfigs})})}newPaypal(){this.paypalData.configs.push({email:"",clientId:"",secret:""})}removePaypal(i){this.paypalData.configs=this.paypalData.configs.filter(r=>r!==i)}isValid(){return this.paypalData.configs.length>0&&this.paypalData.configs.filter(i=>i.use).length!==1?(this.dialogService.showOk("Bitte genau einen PayPal-Account benutzen"),!1):!0}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-settings"]],standalone:!0,features:[xe],decls:25,vars:11,consts:[["fxLayout","column",1,"w-full","text-90"],["fxFlex","","fxLayout","row","fxLayoutGap","0.5rem",1,"w-full","scrollable"],["fxFlex","40%","fxLayout","column"],["class","w-full py-2","fxLayout","column",4,"ngIf"],["fxFlex","20%","fxLayout","column"],["fxLayout","column",1,"w-full","py-2"],["fxLayout","column","fxLayoutAlign","start center",1,"w-full",2,"border","1px solid gray"],["fxLayout","row","fxLayoutAlign","center",1,"p-2","text-120"],["fxLayout","row",1,"w-full","p-2"],[1,"w-full"],[4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center"],[1,"p-2"],[3,"click"],["fxLayout","row","fxLayoutAlign","start center",1,"w-full","px-4"],["placeholder","Beginn","minTime","08:00","maxTime","12:00",2,"width","120px",3,"valueChange","noPadding","value"],["placeholder","Ende","minTime","00:00","maxTime","23:00",2,"width","120px",3,"valueChange","noPadding","value"],["fxLayout","row","fxLayoutAlign","start center",1,"w-full","px-4","pt-2"],[3,"valueChange","value"],["placeholder","Min Bewertungen",3,"value","isNumber"],["placeholder","Min Bewertungen",3,"valueChange","value","isNumber"],["fxLayout","column","fxLayoutAlign","start center",1,"w-full",2,"border","1px solid rgb(128,128,128)"],["class","w-full",4,"ngIf"],[2,"width","100%"],[3,"valueChange","value","noPadding"],[3,"whatsApp"],[3,"ngConfig"],["fxLayout","column","fxLayoutAlign","start center",1,"w-full","p-2",2,"border","1px solid gray"],["class","w-full","style","border: 1px solid gray",4,"ngFor","ngForOf"],[1,"w-full",2,"border","1px solid gray"],[3,"studio"],[3,"valueChange","isNumber","value","noPadding"],[3,"data"],["fxLayout","column",1,"w-full","p-2"],["style","border: 1px solid gray;","class","mb-3 p-2",4,"ngFor","ngForOf"],["placeholder","Timer",3,"valueChange","isNumber","value","noPadding"],[1,"mb-3","p-2",2,"border","1px solid gray"],[3,"config"],["type","password","placeholder","Passwort",3,"valueChange","value"],[1,"flex","w-full","flex-col","p-2"],["placeholder","Apple ID",3,"valueChange","value"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),W(3,uzi,38,20,"div",3)(4,pzi,6,1,"div",3)(5,mzi,6,1,"div",3)(6,fzi,6,1,"div",3)(7,vzi,5,1,"div",3),p(),h(8,"div",4)(9,"div",5)(10,"div",6)(11,"div",7),y(12,"TELEGRAM-GRUPPEN"),p(),h(13,"div",8)(14,"table",9),W(15,yzi,5,4,"tr",10),p()()()(),W(16,_zi,6,1,"div",3)(17,Czi,6,1,"div",3)(18,bzi,9,4,"div",3)(19,wzi,6,1,"div",3)(20,Szi,7,2,"div",3),p()(),h(21,"div",11)(22,"div",12)(23,"nxt-button",13),F("click",function(){return s.save()}),y(24,"speichern"),p()()()()),r&2&&(g(3),b("ngIf",s.ngConfig),g(),b("ngIf",s.ngConfig),g(),b("ngIf",s.ngConfig),g(),b("ngIf",s.ngConfig),g(),b("ngIf",s.ngConfig),g(8),b("ngForOf",s.telegramGroups),g(),b("ngIf",s.ngConfig),g(),b("ngIf",s.ngConfig),g(),b("ngIf",s.paypalData),g(),b("ngIf",s.googleCalendar),g(),b("ngIf",s.icloudSync))},dependencies:[At,Yt,$r,oi,qi,Ct,cf,Nn,Yi,C4t,y4t,Hi,m4t,h4t,d4t,an,Lt,lf,b4t],styles:["[_nghost-%COMP%]{display:flex}"]});let t=e;return t})()});function Tzi(t,e){if(t&1&&ee(0,"img",4),t&2){let n=w();b("src",n.src(),Ur)}}function Dzi(t,e){t&1&&(h(0,"div"),y(1,"WhatsApp wird geladen"),p())}var D4t,E4t=Q(()=>{me();Gi();$n();yi();Zi();ls();ji();me();D4t=(()=>{let e=class e extends bt{constructor(){super(),this.src=gt(""),this.timeText=gt(""),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogRef=Ve(Gt),this.reloadTimestamp=0,this.destroyed=!1,this.pushSubscription=zM(1e3).subscribe(()=>{this.reloadTime()}),this.load()}ngOnInit(){}nxtOnDestroy(){this.destroyed=!0}load(){return O(this,null,function*(){try{this.src.set(yield this.socketService.getWhatsAppScreenshot()),this.reloadTimestamp=Date.now()}catch{debugger}this.destroyed||setTimeout(()=>{this.load()},5e3)})}reloadTime(){this.src()&&this.timeText.set("vor "+Math.round((Date.now()-this.reloadTimestamp)/1e3)+" Sekunden")}closeClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-screenshot"]],standalone:!0,features:[et,xe],decls:9,vars:2,consts:[[1,"flex","flex-col"],[1,"flex","flex-row","justify-between","mb-3"],[1,"flex","flex-row","justify-center","text-3xl","flex-grow"],[3,"click"],[3,"src"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),y(3),p(),h(4,"nxt-button-icon",3),F("click",function(){return s.closeClicked()}),y(5,"close"),p()(),h(6,"div",0),W(7,Tzi,1,1,"img",4)(8,Dzi,2,0,"div"),p()()),r&2&&(g(3),ye(s.timeText()),g(4),Je(s.src()?7:8))},dependencies:[an],changeDetection:0});let t=e;return t})()});function Ezi(t,e){if(t&1){let n=re();h(0,"div",0)(1,"div",1)(2,"div",0),ee(3,"qrcode",2),p(),h(4,"div",3)(5,"table")(6,"tr")(7,"td"),y(8,"1."),p(),h(9,"td"),y(10,"Scanne mit dem Foto-iPhone diesen QR-Code."),p()(),h(11,"tr")(12,"td"),y(13,"2."),p(),h(14,"td"),y(15,"Fertig"),p()()()()(),h(16,"div",4)(17,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(18,"Schlie\xDFen"),p()()()}if(t&2){let n=w();g(3),b("qrdata",n.qrCode())("width",300)}}var M4t,k4t=Q(()=>{me();Gi();Zi();d2();ji();yi();me();d2();M4t=(()=>{let e=class e extends bt{constructor(){super(),this.qrCode=gt(""),this.cdRef=Ve(Kt),this.dialogRef=Ve(Gt),this.socketService=Ve(lt)}ngOnInit(){}nxtOnDestroy(){}setModel(i){return O(this,null,function*(){let r=yield this.socketService.getEventQrCodeSecret(),s=encodeURI(window.location.origin+"/event-qr-2/"+i+"/"+r);this.qrCode.set(s)})}closeClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-photo-iphone-init-qr-code"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","flex-col"],[1,"flex","flex-col","md:flex-row"],["errorCorrectionLevel","M","colorDark","#FFF","colorLight","#2A2A2A",3,"qrdata","width"],[1,"flex","flex-col","justify-center","pt-3"],[1,"flex","flex-row","justify-center","pt-4"],[3,"click"]],template:function(r,s){r&1&&W(0,Ezi,19,2,"div",0),r&2&&Je(s.qrCode()?0:-1)},dependencies:[Lt,c2,r3],styles:["table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-left:10px}"],changeDetection:0});let t=e;return t})()});function kzi(t,e){if(t&1&&(h(0,"div",1),y(1),p()),t&2){let n=w();ki("dark",n.bg()=="dark"),g(),ye(n.headerText())}}var Mzi,Kre,b9e=Q(()=>{me();Gi();me();Mzi=["*"];Kre=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.headerText=br(""),this.bg=br("normal")}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-box"]],inputs:{headerText:[1,"headerText"],bg:[1,"bg"]},standalone:!0,features:[et,xe],ngContentSelectors:Mzi,decls:2,vars:1,consts:[[1,"header-text",3,"dark"],[1,"header-text"]],template:function(r,s){r&1&&(gr(),W(0,kzi,2,3,"div",0),Ln(1)),r&2&&Je(s.headerText?0:-1)},styles:["[_nghost-%COMP%]{position:relative;display:flex;padding:1.25rem .75rem .75rem;border:1px solid #a2a2a2;border-radius:4px}[_nghost-%COMP%]   .header-text[_ngcontent-%COMP%]{width:fit-content;padding:0 3px;background-color:#404040;position:absolute;top:-12px}[_nghost-%COMP%]   .header-text.dark[_ngcontent-%COMP%]{background-color:#2a2a2a}"],changeDetection:0});let t=e;return t})()});var Yre,w9e=Q(()=>{me();Ci();yi();Cs();j5();me();Yre=(()=>{let e=class e{constructor(){this.dialogService=Ve(vt),this.socketService=Ve(lt),this.configService=Ve(Xi),this.downloadService=Ve(X1),setTimeout(()=>this.init())}init(){return O(this,null,function*(){})}downloadDeclarationOfConsentTattoo(i,r,s){return O(this,null,function*(){this.dialogService.showLoading(_n.Download,"Tattoo-Einwilligungserkl\xE4rung wird erstellt...");let o=yield this.socketService.getDeclarationOfConsentTattoo(i,r,s),a="Einwilligungserkl\xE4rung_Tattoo_"+r+"_"+this.configService.config.value.studioName+".pdf";i!==-1&&(a="Einwilligungserkl\xE4rung_Tattoo_"+r+"_"+this.configService.config.value.studioName+"_"+i+".pdf"),this.dialogService.showPdf(o,a,{askPrintCount:!0}),this.dialogService.hideLoading(_n.Download)})}downloadDeclarationOfConsentPiercing(i,r,s){return O(this,null,function*(){this.dialogService.showLoading(_n.Download,"Piercing-Einwilligungserkl\xE4rung wird erstellt...");let o=yield this.socketService.getDeclarationOfConsentPiercing(i,!1,r,s),a="Einwilligungserkl\xE4rung_Piercing_"+this.configService.config.value.studioName+".pdf";i!==-1&&(a="Einwilligungserkl\xE4rung_Piercing_"+this.configService.config.value.studioName+"_"+i+".pdf"),this.dialogService.showPdf(o,a,{askPrintCount:!0}),this.dialogService.hideLoading(_n.Download)})}downloadAfterCareInstructionTattoo(i=-1){return O(this,null,function*(){this.dialogService.showLoading(_n.Download,"Tattoo-Pflegehinweise wird erstellt...");let r=yield this.socketService.getAfterCareInstructionTattoo(i),s="Pflegehinweise_Tattoo_"+this.configService.config.value.studioName+".pdf";i!==-1&&(s="Pflegehinweise_Tattoo_"+this.configService.config.value.studioName+"_"+i+".pdf"),this.dialogService.showPdf(r,s,{askPrintCount:!0}),this.dialogService.hideLoading(_n.Download)})}downloadAfterCareInstructionPiercing(i=-1){return O(this,null,function*(){this.dialogService.showLoading(_n.Download,"Piercing-Pflegehinweise wird erstellt...");let r=yield this.socketService.getAfterCareInstructionPiercing(i),s="Pflegehinweise_Piercing_"+this.configService.config.value.studioName+".pdf";i!==-1&&(s="Pflegehinweise_Piercing_"+this.configService.config.value.studioName+"_"+i+".pdf"),this.dialogService.showPdf(r,s,{askPrintCount:!0}),this.dialogService.hideLoading(_n.Download)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function Azi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",20),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function Pzi(t,e){if(t&1&&(h(0,"div",27),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w();g(),cn("letzter Scan: ",n.lastPhotoDevice().device," (",Nt(2,2,n.lastPhotoDevice().createdAt,"dd.MM.yyyy HH:mm"),")")}}var A4t,Izi,qre,S9e=Q(()=>{me();x9e();Vb();Ph();l4t();$v();Pa();jc();YA();Qo();A4t=Gs(P7());T4t();oo();ih();th();Zi();Jr();ls();ri();Vt();sx();E4t();k4t();go();b9e();pa();vX();me();qn();yi();Ci();Kr();o1();Cs();ji();ag();j5();w9e();Vt();Izi=["devicesDatagridComponent"];qre=(()=>{let e=class e extends i2{constructor(i,r,s,o,a,l,c,d,u,m){super(),this.fb=i,this.socketService=r,this.dialogService=s,this.loginService=o,this.cacheService=a,this.configService=l,this.dialogRef=c,this.localStorageService=d,this.downloadService=u,this.documentService=m,this.lastPhotoDevice=gt(null),this.quickFilterText="",this.columnDefsConnections=[{headerName:"selber",field:"self",cellRenderer:f=>f.value?Ir.Material.Face:"",nxtCellStyle:{textAlign:"center"}},{headerName:"Benutzer",field:"username"},{headerName:"",cellRenderer:()=>Ir.Material.Chat,nxtOnCellClicked:f=>O(this,null,function*(){let _=yield this.dialogService.showTextarea({message:"Nachricht"});if(_){let x=yield this.socketService.sendMessageToClient(f.data.clientId,_);this.dialogService.showOk(x)}})},{headerName:"Studio",field:"studio"},{headerName:"Arbeitsplatz",field:"workplace",nxtFieldType:Ee.Workplace},{headerName:"IP",field:"ip",nxtFieldType:Ee.Text},{headerName:"Verbunden seit",field:"connectedTimestamp",nxtFieldType:Ee.Date_germanDateWithToNowText},{headerName:"Aktiv",field:"lastActive",nxtFieldType:Ee.Date_germanDateWithToNowText},{headerName:"isWhatsAppViewer",field:"isWhatsAppViewer",nxtFieldType:Ee.Boolean},{headerName:"isCalendarViewer",field:"isCalendarViewer",nxtFieldType:Ee.Boolean},{headerName:"studioCashReportDate",field:"studioCashReportDate",nxtFieldType:Ee.Text}],this.columnDefsConnectionsServer=[{headerName:"ID",field:"data.machineId",nxtFieldType:Ee.Text,maxWidth:150,hide:!0},{headerName:"Info",field:"data.description",nxtFieldType:Ee.Text,editable:!0,onCellValueChanged:f=>this.setServerDescription(f),cellStyle:f=>f.data.live?.uptime?{}:{color:xn.Red}},{headerName:"Hostname",field:"data.hostname",nxtFieldType:Ee.Text,cellStyle:f=>f.data.live?.uptime?{}:{color:xn.Red}},{headerName:"npm i",cellRenderer:()=>Ir.Material.InputCircle,nxtOnCellClicked:f=>this.serverNpmI(f.data),cellClass:"nxt-cell-flex-center",sortable:!1,suppressMenu:!0,maxWidth:80,hide:!0},{headerName:"Update",cellRenderer:()=>Ir.Material.Update,nxtOnCellClicked:f=>this.serverUpdate(f.data),cellClass:"nxt-cell-flex-center",sortable:!1,suppressMenu:!0,maxWidth:75},{headerName:"Neustart",cellRenderer:()=>Ir.Material.Reset,nxtOnCellClicked:f=>this.serverRestart(f.data),cellClass:"nxt-cell-flex-center",sortable:!1,suppressMenu:!0,maxWidth:80},{headerName:"Version",field:"data.version",nxtFieldType:Ee.Text,maxWidth:90},{headerName:"Node",field:"data.nodeVersion",nxtFieldType:Ee.Text,maxWidth:90},{headerName:"letztes Lebenszeichen",field:"data.serverTimestamp",nxtFieldType:Ee.DurationStringToNow,nxtFieldTypeParams:{pastPrefix:"vor"}},{headerName:"Server start",field:"data.serverUptime",nxtFieldType:Ee.DurationStringToNow,nxtFieldTypeParams:{pastPrefix:"vor"}},{headerName:"App start",field:"live.uptime",nxtFieldType:Ee.DurationStringToNow,nxtFieldTypeParams:{pastPrefix:"vor"}},{headerName:"Verbunden seit",field:"live.connectedSince",nxtFieldType:Ee.DurationStringToNow,nxtFieldTypeParams:{pastPrefix:"seit"}},{headerName:"\xD6ffentliche IP",field:"live.ip",nxtFieldType:Ee.Text,maxWidth:125},{headerName:"lokale IP",field:"data.localIps",nxtFieldType:Ee.Array,valueGetter:f=>f.data.data.localIps.filter(_=>!_.startsWith("172")&&!_.startsWith("169"))},{headerName:"Speicher",field:"data.diskInfoObj",cellRenderer:f=>f.value?.map(_=>_.path+" "+_.usedPercentage+" % belegt").join("<br/>"),autoHeight:!0}],this.deleteShopId="",this.reSendShopId="",this.version=this.configService.config.value.serverVersion,this.resetInvoicesDateString="",this.resetDayFinishString="",this.selectedTab=this.localStorageService.getByString("adminTab",0),this.declarationOfConsentOptions=[{text:"Alle Seiten",value:-1},{text:"0 - Infoblatt",value:0},{text:"1 - Seite 1",value:1},{text:"2 - Seite 2",value:2},{text:"3 - Zusatzinfos",value:3},{text:"4 - Minderj\xE4hrig",value:4}],this.declarationOfConsentPiercingOptions=[{text:"Alle Seiten",value:-1},{text:"1 - Seite 1",value:1},{text:"2 - Seite 2",value:2},{text:"3 - Minderj\xE4hrig",value:3}],this.afterCareInstructionPiercingOptions=[{text:"Alle Seiten",value:-1},{text:"1 - Seite 1",value:1},{text:"2 - Seite 2",value:2},{text:"3 - Seite 3",value:3}],this.afterCareInstructionTattooOptions=[{text:"Alle Seiten",value:-1},{text:"1 - Seite 1",value:1},{text:"2 - Seite 2",value:2}],this.declarationOfConsentPage=-1,this.declarationOfConsentPiercingPage=-1,this.afterCareInstructionPiercingPage=-1,this.afterCareInstructionTattooPage=-1,this.declarationOfConsentPiercingEmployed=!1,this.additionalBankTransactionNoteIncluded="",this.studioOptions=this.configService.config.value.studios.map(f=>({value:f.name,text:f.name})),this.workplaceOptions=[{value:"reception",text:"Empfang"},{value:"backoffice",text:"Backoffice"}],this.studioLogins=this.localStorageService.get("StudioLogins",[]),this.workplaceLogins=this.localStorageService.get("WorkplaceLogins",[]),this.abc=()=>"declarations-of-consent",this.pushSocketSubscription=this.socketService.subscribeNew("getClientConnections",f=>{this.clientConnections=f},{emitInitial:!0}),this.pushSocketSubscription=this.socketService.subscribeNew("getClientServerConnections",f=>{let _=A4t.default.sortBy(f,["data.description"]);this.serverClientConnections=_},{emitInitial:!0,emitAfterReconnect:!0})}ngOnDestroy(){Cu.clear(this.refreshInterval),super.onDestroy()}ngOnInit(){return O(this,null,function*(){setTimeout(()=>{this.datagridComponent.gridOptions.suppressRowTransform=!0},2e3),this.refreshInterval=setInterval(()=>{this.serverClientConnections=so(this.serverClientConnections)},5e3),this.lastPhotoDevice.set(yield this.socketService.getLastPhotoDevice())})}restartServer(){this.socketService.restartServer()}invalidate(i){return O(this,null,function*(){(yield this.socketService.invalidate(i))?this.dialogService.showOk("OK"):this.dialogService.showOk("FEHLER")})}fakeWhatsAppStatus(){this.socketService.fakeWhatsAppStatus()}serverNpmI(i){return O(this,null,function*(){yield this.socketService.clientServerRunNpmI(i.live.id),this.dialogService.showOk("npm i erfolgreich zu dem Ger\xE4t gesendet")})}serverUpdate(i){return O(this,null,function*(){if(i.data.version&&(KF.compare("2.1.0",i.data.version)===mS.Version1Higher&&!(yield this.dialogService.showYesNo(`Geht erst ab Version 2.1.0
Trotzdem ausf\xFChren?`))||KF.compare(this.configService.config.value.serverVersion,i.data.version)===mS.Version2Higher&&!(yield this.dialogService.showYesNo("Ger\xE4te-Version ist bereits h\xF6her als die Server-Version "+this.configService.config.value.serverVersion+`
Trotzdem ausf\xFChren?`))||KF.compare(this.configService.config.value.serverVersion,i.data.version)===mS.Same&&!(yield this.dialogService.showYesNo("Ger\xE4te-Version ist bereits die neuste Version "+this.configService.config.value.serverVersion+`
Trotzdem ausf\xFChren?`))))return;(yield this.socketService.clientServerRunUpdate(i.live.id))&&this.dialogService.showOk("Update erfolgreich zu dem Ger\xE4t gesendet")})}serverRestart(i){this.socketService.clientServerRestart(i.id)}setServerDescription(i){i.data.data.machineId?this.socketService.setClientServerDescription(i.data.data.machineId,i.newValue):alert("geht nicht ohne maschine id")}resetInvoicesDate2(){return O(this,null,function*(){if(this.resetDayFinishString){let i=yield this.dialogService.showYesNo("Mit fr\xFChzeitigen Auszahlungen?");if(i&&!(yield this.dialogService.showYesNo("WIRKLICH mit fr\xFChzeitig???")))return;let r=yield this.socketService.resetDayFinish2(this.resetDayFinishString,i);this.resetDayFinishString=null}})}selectedTabChanged(i){this.localStorageService.setByString("adminTab",i.index)}downloadDeclarationOfConsentTattoo(){return O(this,null,function*(){let i=yield this.dialogService.showSelect("In welche Sprache?",vf.languageCodes.map(r=>({text:r.name,value:r.code})),{focusInputOnInit:!0,closeOnOptionSelected:!0,okButtonText:""});i&&this.documentService.downloadDeclarationOfConsentTattoo(this.declarationOfConsentPage,i,!0)})}downloadDeclarationOfConsentPiercing(){return O(this,null,function*(){let i=yield this.dialogService.showSelect("In welche Sprache?",vf.languageCodes.map(r=>({text:r.name,value:r.code})),{focusInputOnInit:!0,closeOnOptionSelected:!0,okButtonText:""});i&&this.documentService.downloadDeclarationOfConsentPiercing(this.declarationOfConsentPiercingPage,i,!0)})}downloadAfterCareInstructionPiercing(){return O(this,null,function*(){this.documentService.downloadAfterCareInstructionPiercing(this.afterCareInstructionPiercingPage)})}downloadAfterCareInstructionTattoo(){return O(this,null,function*(){this.documentService.downloadAfterCareInstructionTattoo(this.afterCareInstructionTattooPage)})}readBankTransaction(){this.socketService.importAdditionalBankTransaction(this.additionalBankTransactionNoteIncluded)}studioLoginChanged(){this.localStorageService.set("StudioLogins",this.studioLogins)}workplaceLoginChanged(){this.localStorageService.set("WorkplaceLogins",this.workplaceLogins)}whatsAppDeleteClicked(){return O(this,null,function*(){if(yield this.dialogService.showYesNo("WhatsApp Daten l\xF6schen und QR-Code neu scannen?")){this.dialogService.showLoading("WhatsApp wird zur\xFCck gesetzt...");let i=yield this.socketService.whatsAppDelete();this.dialogService.hideLoading(),this.dialogService.showOk(i)}})}showWhatsAppScreenShotClicked(){return O(this,null,function*(){this.dialogService.showComponentDialog(D4t)})}setupPhotoIphoneClicked(){return O(this,null,function*(){let i=[{text:"iPhone 12",value:"iPhone 12"},{text:"iPhone 12 Pro",value:"iPhone 12 Pro"},{text:"iPhone 12 Pro Max",value:"iPhone 12 Pro Max"},{text:"iPhone 13",value:"iPhone 13"},{text:"iPhone 13 Pro",value:"iPhone 13 Pro"},{text:"iPhone 13 Pro Max",value:"iPhone 13 Pro Max"},{text:"iPhone 14",value:"iPhone 14"},{text:"iPhone 14 Plus",value:"iPhone 14 Plus"},{text:"iPhone 14 Pro",value:"iPhone 14 Pro"},{text:"iPhone 14 Pro Max",value:"iPhone 14 Pro Max"},{text:"iPhone 15",value:"iPhone 15"},{text:"iPhone 15 Plus",value:"iPhone 15 Plus"},{text:"iPhone 15 Pro",value:"iPhone 15 Pro"},{text:"iPhone 15 Pro Max",value:"iPhone 15 Pro Max"}],r=yield this.dialogService.showSelect("W\xE4hle das Modell aus",i);r&&this.dialogService.showComponentDialog(M4t).componentInstance.setModel(r)})}showIcloudStateClicked(){this.dialogService.showComponentDialog(NA)}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(lt),R(vt),R(Fi),R(cc),R(Xi),R(Gt,8),R(vu),R(X1),R(Yre))},e.\u0275cmp=_e({type:e,selectors:[["nxt-admin"]],viewQuery:function(r,s){if(r&1&&ei(Izi,5),r&2){let o;Pt(o=Rt())&&(s.datagridComponent=o.first)}},standalone:!0,features:[et,xe],decls:82,vars:28,consts:[["devicesDatagridComponent",""],["fxLayout","column",1,"nxt-page","nxt-text"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px"],[1,"page-header"],[3,"click",4,"ngIf"],["fxFlex","",1,"h-100",2,"overflow","hidden"],["dynamicHeight","",1,"h-100",3,"selectedTabChange","selectedIndex"],["label","User Verbindungen","fxLayout","column",1,"h-100"],["name","Admin - User Verbindungen","fxFlex","","uniqueRowDataKey","socketId",1,"h-100",3,"columnDefs","rowData","autoSizeColumnOnResize"],["label","Ger\xE4te","fxLayout","column",1,"h-100"],["name","Admin - Ger\xE4te","fxFlex","",1,"h-100",3,"uniqueRowDataKey","columnDefs","rowData","autoSizeColumnOnResize"],["label","Aktionen","fxLayout","column",1,"h-100"],[1,"flex","h-full","flex-col","gap-10","overflow-auto","p-4"],["bg","dark","headerText","Abrechnung",1,"w-fit"],["fxLayout","column","fxLayoutAlign","center center",1,"pt-3"],[1,"p-2"],["fxLayout","row","fxLayoutAlign","center center"],[3,"nxtModelChange","nxtModel"],[1,"pl-4"],[3,"click"],["bg","dark","headerText","Bank",1,"w-fit"],["placeholder","Verwendungszweck enth\xE4lt",1,"w-[250px]",3,"valueChange","value"],["bg","dark","headerText","Server",1,"w-fit"],["bg","dark","headerText","WhatsApp",1,"flex","w-fit","flex-col","gap-3"],["bg","dark","headerText","iCloud",1,"flex","w-fit","flex-col","gap-3"],["bg","dark","headerText","Foto-Handy",1,"flex","w-fit","flex-col"],[1,"pt-2","text-sm"],["fxLayout","column",1,"pt-3"],[1,"pt-2"],["fxLayout","row"],["bg","dark","headerText","Downloads",1,"w-fit"],[1,"flex","flex-col"],[2,"width","200px",3,"valueChange","options","value"],[3,"valueChange","value"],["label","Einstellungen","fxLayout","column",1,"h-100",2,"overflow","scroll"],[1,"w-full","h-100",2,"border","0px solid yellow","overflow-y","auto"],["label","Lokale Einstellungen","fxLayout","column",1,"h-100",2,"overflow","scroll"],[1,"mt-3","flex","flex-col","items-center","justify-center","gap-3"],["placeholder","Anmeldung Kasse",1,"w-[300px]",3,"valueChange","multiple","options","value"],["placeholder","Anmeldung Arbeitsplatz",1,"w-[300px]",3,"valueChange","multiple","options","value"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),y(4),p()(),W(5,Azi,2,0,"nxt-button-icon",5),p(),h(6,"div",6)(7,"mat-tab-group",7),F("selectedTabChange",function(l){return V(o),B(s.selectedTabChanged(l))}),h(8,"mat-tab",8),ee(9,"nxt-datagrid",9),p(),h(10,"mat-tab",10),ee(11,"nxt-datagrid",11,0),p(),h(13,"mat-tab",12)(14,"div",13)(15,"nxt-box",14)(16,"div",15)(17,"div",16),y(18,"Abrechnung zur\xFCck setzen"),p(),h(19,"div",17)(20,"nxt-date-picker",18),Xe("nxtModelChange",function(l){return V(o),Ze(s.resetDayFinishString,l)||(s.resetDayFinishString=l),B(l)}),p(),h(21,"div",19)(22,"nxt-button",20),F("click",function(){return V(o),B(s.resetInvoicesDate2())}),y(23,"zur\xFCck setzen"),p()()()()(),h(24,"nxt-box",21)(25,"div",15)(26,"div",16),y(27,"Bank-Zahlung importieren"),p(),h(28,"div",17)(29,"nxt-input",22),Xe("valueChange",function(l){return V(o),Ze(s.additionalBankTransactionNoteIncluded,l)||(s.additionalBankTransactionNoteIncluded=l),B(l)}),p(),h(30,"div",19)(31,"nxt-button",20),F("click",function(){return V(o),B(s.readBankTransaction())}),y(32,"Einlesen"),p()()()()(),h(33,"nxt-box",23)(34,"nxt-button",20),F("click",function(){return V(o),B(s.restartServer())}),y(35,"Server neu starten"),p()(),h(36,"nxt-box",24)(37,"nxt-button",20),F("click",function(){return V(o),B(s.showWhatsAppScreenShotClicked())}),y(38,"WhatsApp anzeigen"),p(),h(39,"nxt-button",20),F("click",function(){return V(o),B(s.whatsAppDeleteClicked())}),y(40,"WhatsApp neu verbinden (Qr-Code scannen)"),p()(),h(41,"nxt-box",25)(42,"nxt-button",20),F("click",function(){return V(o),B(s.showIcloudStateClicked())}),y(43,"iCloud status anzeigen"),p()(),h(44,"nxt-box",26)(45,"nxt-button",20),F("click",function(){return V(o),B(s.setupPhotoIphoneClicked())}),y(46,"Foto Handy einrichten"),p(),W(47,Pzi,3,5,"div",27),p(),h(48,"div",28)(49,"div",29),y(50,"Invalidate"),p(),h(51,"div",30)(52,"nxt-button",20),F("click",function(){return V(o),B(s.invalidate("cachedCalendarEvents"))}),y(53,"CalendarEvents"),p(),h(54,"nxt-button",20),F("click",function(){return V(o),B(s.invalidate("cachedNotAssignedPaypalTransactions"))}),y(55," NotAssignedPaypalTransactions "),p()()(),h(56,"nxt-box",31)(57,"div",32)(58,"div",30)(59,"nxt-select",33),Xe("valueChange",function(l){return V(o),Ze(s.declarationOfConsentPage,l)||(s.declarationOfConsentPage=l),B(l)}),p(),h(60,"nxt-button",20),F("click",function(){return V(o),B(s.downloadDeclarationOfConsentTattoo())}),y(61,"Einwilligungserkl\xE4rung-Tattoo download"),p()(),h(62,"div",30)(63,"nxt-select",33),Xe("valueChange",function(l){return V(o),Ze(s.declarationOfConsentPiercingPage,l)||(s.declarationOfConsentPiercingPage=l),B(l)}),p(),h(64,"nxt-slide-toggle",34),Xe("valueChange",function(l){return V(o),Ze(s.declarationOfConsentPiercingEmployed,l)||(s.declarationOfConsentPiercingEmployed=l),B(l)}),y(65,"Angestellt"),p(),h(66,"nxt-button",20),F("click",function(){return V(o),B(s.downloadDeclarationOfConsentPiercing())}),y(67,"Einwilligungserkl\xE4rung-Piercing download"),p()(),h(68,"div",30)(69,"nxt-select",33),Xe("valueChange",function(l){return V(o),Ze(s.afterCareInstructionPiercingPage,l)||(s.afterCareInstructionPiercingPage=l),B(l)}),p(),h(70,"nxt-button",20),F("click",function(){return V(o),B(s.downloadAfterCareInstructionPiercing())}),y(71,"Pflegehinweise-Piercing download"),p()(),h(72,"div",30)(73,"nxt-select",33),Xe("valueChange",function(l){return V(o),Ze(s.afterCareInstructionTattooPage,l)||(s.afterCareInstructionTattooPage=l),B(l)}),p(),h(74,"nxt-button",20),F("click",function(){return V(o),B(s.downloadAfterCareInstructionTattoo())}),y(75,"Pflegehinweise-Tattoo download"),p()()()()()(),h(76,"mat-tab",35),ee(77,"nxt-settings",36),p(),h(78,"mat-tab",37)(79,"div",38)(80,"nxt-select",39),Xe("valueChange",function(l){return V(o),Ze(s.studioLogins,l)||(s.studioLogins=l),B(l)}),F("valueChange",function(){return V(o),B(s.studioLoginChanged())}),p(),h(81,"nxt-select",40),Xe("valueChange",function(l){return V(o),Ze(s.workplaceLogins,l)||(s.workplaceLogins=l),B(l)}),F("valueChange",function(){return V(o),B(s.workplaceLoginChanged())}),p()()()()()()}r&2&&(g(4),Ke("Super Admin ",s.version,""),g(),b("ngIf",s.dialogRef),g(2),b("selectedIndex",s.selectedTab),g(2),b("columnDefs",s.columnDefsConnections)("rowData",s.clientConnections)("autoSizeColumnOnResize",!0),g(2),b("uniqueRowDataKey","data.machineId")("columnDefs",s.columnDefsConnectionsServer)("rowData",s.serverClientConnections)("autoSizeColumnOnResize",!0),g(9),qe("nxtModel",s.resetDayFinishString),g(9),qe("value",s.additionalBankTransactionNoteIncluded),g(18),Je(s.lastPhotoDevice()?47:-1),g(12),b("options",s.declarationOfConsentOptions),qe("value",s.declarationOfConsentPage),g(4),b("options",s.declarationOfConsentPiercingOptions),qe("value",s.declarationOfConsentPiercingPage),g(),qe("value",s.declarationOfConsentPiercingEmployed),g(5),b("options",s.afterCareInstructionPiercingOptions),qe("value",s.afterCareInstructionPiercingPage),g(4),b("options",s.afterCareInstructionTattooOptions),qe("value",s.afterCareInstructionTattooPage),g(7),b("multiple",!0)("options",s.studioOptions),qe("value",s.studioLogins),g(),b("multiple",!0)("options",s.workplaceOptions),qe("value",s.workplaceLogins))},dependencies:[At,Yt,$r,oi,qi,Ct,an,L7,_x,dr,Yi,Lt,tl,$l,Nn,S4t,Hn,Kre],styles:["[_nghost-%COMP%]     .mat-tab-body-wrapper{height:100%}"]});let t=e;return t})()});function Rzi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function Fzi(t,e){if(t&1&&ee(0,"nxt-datagrid",8),t&2){let n=w();b("columnDefs",n.columnDefs)("disableAllSort",!0)("quickFilterText",n.quickFilterText)("rowData",n.discountPromotions)("showFooter",!1)("showSideBar",!1)("suppressCellSelection",!0)("enableRangeSelection",!1)("suppressRowHoverHighlight",!0)}}var Zre,T9e=Q(()=>{Pa();Ci();Qo();ls();ri();pS();Vt();me();yi();Ci();Cs();ma();ji();Vt();Zre=(()=>{let e=class e{constructor(i,r,s,o,a){this.socketService=i,this.dialogService=r,this.configService=s,this.activatedRoute=o,this.dialogRef=a,this.columnDefs=[{headerName:"ID",field:"discountPromotion.id",nxtFieldType:Ee.Text,hide:!0},{headerName:"Rabatt Aktion",field:"discountPromotion.name",nxtFieldType:Ee.Text,valueFormatter:l=>l.value?l.value:"Keine Rabatt Aktion"},{headerName:"Wertigkeit",field:"valence",nxtFieldType:Ee.Number,sort:"desc"},{headerName:"Studio Wertigkeit",field:"valenceStudio",nxtFieldType:Ee.Number,valueFormatter:l=>l.value+" ("+l.data.valenceStudioPercentage+" %)"},{headerName:"Anzahl Termine",field:"eventCount",nxtFieldType:Ee.Number}]}ngOnDestroy(){}ngOnInit(){}load(){return O(this,null,function*(){if(this.dateFromTill?.from&&this.dateFromTill?.till){this.dialogService.showLoading(_n.Default,"Lade Daten...");let i=yield this.socketService.getDiscountAnalysis({startDateString:this.dateFromTill.from,endDateString:this.dateFromTill.till});this.discountPromotions=i,this.dialogService.hideLoading(_n.Default)}})}dateChanged(){this.load()}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(Xi),R(gs),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-discount-analysis"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.dataGrid=o.first)}},standalone:!0,features:[xe],decls:8,vars:4,consts:[["fxFlex","","fxLayout","column","fxLayoutAlign","stretch",1,"nxt-page","nxt-text"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px"],[1,"page-header"],["fxFlex","350px","placeholder","Von - Bis",3,"valueChange","value","bottomNoPadding"],[3,"click",4,"ngIf"],["fxFlex","","name","newEvents",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","suppressCellSelection","enableRangeSelection","suppressRowHoverHighlight",4,"ngIf"],[3,"click"],["fxFlex","","name","newEvents",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","suppressCellSelection","enableRangeSelection","suppressRowHoverHighlight"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"Rabatt Auswertung"),p(),h(5,"nxt-date-range-picker",4),Xe("valueChange",function(a){return Ze(s.dateFromTill,a)||(s.dateFromTill=a),a}),F("valueChange",function(){return s.dateChanged()}),p()(),W(6,Rzi,2,0,"nxt-button-icon",5),p(),W(7,Fzi,1,9,"nxt-datagrid",6),p()),r&2&&(g(5),qe("value",s.dateFromTill),b("bottomNoPadding",!0),g(),b("ngIf",s.dialogRef),g(),b("ngIf",s.columnDefs))},dependencies:[At,Yt,$r,oi,qi,$g,Ct,an,dr],styles:["[_nghost-%COMP%]{height:100%;width:100%;position:relative}"]});let t=e;return t})()});var gS,Xre,P4t=Q(()=>{gS=class{static parseIntToRoman(e){return typeof e!="number"&&(e=parseInt(e,10)),new Xre().parseIntToRoman(e).toUpperCase()}static parseRomanToInt(e){return new Xre().parseRomanToInt(e,!0)}},Xre=class{constructor(){this.counter={},this.romans={I:1,V:5,X:10,K:50,C:100,D:500,M:1e3},this.subs={I:!0,X:!0,C:!0,M:!0},this.getChar=["I","V","X","L","C","D","M"]}createError(e,n){let i=new Error;throw i.name=e,i.message=n,i}checkRom(e,n,i,r,s){this.romans[e]===void 0||this.romans[n]===void 0&&r+1<s?this.createError("InputError","Keine r\xF6mische Zahl"):this.romans[e]>=i&&this.createError("InputError","Not a Properly Formed Numeral")}testSub(e,n,i){if(this.romans[e]<this.romans[n])if(this.romans[i]===this.romans[n]&&this.subs[n]!==!0)this.createError("InputError","Not a Properly Formed Numeral");else{if(this.subs[e]===!0&&10*this.romans[e]>=this.romans[n])return!0;this.createError("InputError","Not a Properly Formed Numeral")}return!1}testRom(e){return this.counter[e]<3?!0:(this.createError("InputError","Not a Properly Formed Numeral"),!1)}parseRomanToInt(e,n){this.counter.I=0,this.counter.V=2,this.counter.X=0,this.counter.L=2,this.counter.C=0,this.counter.D=2,this.counter.M=Number.NEGATIVE_INFINITY;let i=0,r=Number.POSITIVE_INFINITY,s=0,o=Number.POSITIVE_INFINITY;e=e.toString().toUpperCase();for(let a=0;a<e.length;a++){let l=e.charAt(a),c=e.charAt(a+1),d=e.charAt(a-1);try{n!==!1?(this.checkRom(l,c,o,a,e.length),this.testSub(l,c,d)===!0?(s=this.romans[c]-this.romans[l],a++,o=this.romans[l]):this.testRom(l)===!0&&(s=this.romans[l],this.counter[l]++),s>r?this.createError("InputError","Not a Properly Formed Numeral"):(i+=s,r=s)):(this.romans[l]===void 0||this.romans[c]===void 0&&a+1<e.length?this.createError("InputError","Keine r\xF6mische Zahl"):this.romans[l]<this.romans[c]?(s=this.romans[c]-this.romans[l],a++):s=this.romans[l],i+=s)}catch{i=-1;break}}return i}ints(e,n){let i="",r=2*e;if(e>2)for(let s=0;s<n*Math.pow(10,e-3);s++)i+="M";else if(n<4)for(let s=0;s<n;s++)i+=this.getChar[r];else if(n===4)i=this.getChar[r]+this.getChar[r+1];else if(n<9){i=this.getChar[r+1];for(let s=0;s<n-5;s++)i+=this.getChar[r]}else n===9&&(i=this.getChar[r]+this.getChar[r+2]);return i}parseIntToRoman(e,n=1){let i,r="";if(parseInt(e,10)!==e||parseInt(e,10)<0)try{n===0?this.createError("InputError","Cannot create a valid Roman Numeral"):this.createError("InputError","Not a positive Integer")}catch(s){r=s?.name.toString()+": "+s?.message.toString()}else{e=parseInt(e,10).toString();for(let s=0;s<e.length;s++){let o=parseInt(e.charAt(e.length-(s+1)),10);i=r,r=this.ints(s,o)+i}}return r}}});function Lzi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",11),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function Ozi(t,e){if(t&1){let n=re();h(0,"div",12)(1,"nxt-date-picker",13),F("nxtModelChange",function(r){V(n);let s=w();return B(s.dateChanged(r))}),p()()}t&2&&(g(),b("disableOpenOnClickInput",!0))}function Nzi(t,e){if(t&1&&(h(0,"div",14)(1,"table",15)(2,"tr")(3,"td"),y(4),Ce(5,"nxtDate"),p(),h(6,"td"),y(7),Ce(8,"nxtDate"),p()(),h(9,"tr")(10,"td"),y(11),p(),h(12,"td"),y(13),p()()()()),t&2){let n=w();g(4),ye(Nt(5,4,n.date,"dd.MM.yyyy")),g(3),ye(Nt(8,7,n.date,"yyyy-MM-dd")),g(4),ye(n.romanDateGerman),g(2),ye(n.romanDateUs)}}function Vzi(t,e){if(t&1){let n=re();h(0,"div",12)(1,"nxt-input",16),F("keyup",function(r){V(n);let s=w();return B(s.romanNumberChanged(r))}),p()()}}function Bzi(t,e){if(t&1&&(h(0,"div")(1,"table",15)(2,"tr")(3,"td"),y(4),p()(),h(5,"tr")(6,"td"),y(7),p()()()()),t&2){let n=w(2);g(4),ye(n.romanNumberConverted),g(3),ye(n.romanNumber)}}function zzi(t,e){t&1&&(h(0,"div"),y(1,"<- Keine r\xF6mische Zahl"),p())}function Hzi(t,e){if(t&1&&(h(0,"div",14),W(1,Bzi,8,2,"div",17)(2,zzi,2,0,"div",17),p()),t&2){let n=w();g(),b("ngIf",n.romanNumberConverted>0),g(),b("ngIf",n.romanNumberConverted==-1)}}function Gzi(t,e){if(t&1){let n=re();h(0,"div",12)(1,"nxt-input",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.decimalNumber,r)||(s.decimalNumber=r),B(r)}),F("keyup",function(){V(n);let r=w();return B(r.decimalNumberChanged())}),p()()}if(t&2){let n=w();g(),b("isNumber",!0),qe("value",n.decimalNumber)}}function Wzi(t,e){if(t&1&&(h(0,"div",19)(1,"table",15)(2,"tr")(3,"td"),y(4),p()(),h(5,"tr")(6,"td"),y(7),p()()()()),t&2){let n=w();g(4),ye(n.decimalNumber),g(3),ye(n.decimalNumberConverted)}}function Uzi(t,e){if(t&1){let n=re();h(0,"div",20)(1,"nxt-button",11),F("click",function(){V(n);let r=w();return B(r.print())}),y(2,"DRUCKEN"),p()()}}var Qre,D9e=Q(()=>{P4t();go();Zi();Jr();th();ls();ri();Vt();me();ji();Vt();Qre=(()=>{let e=class e{constructor(i){this.dialogRef=i,this.date="",this.romanNumber="",this.romanNumberConverted=0,this.romanDateGerman="",this.romanDateUs="",this.decimalNumber=null,this.decimalNumberConverted="",this.showInputs=!0}romanNumberChanged(i){this.romanNumber=i.target.value,this.romanNumberConverted=gS.parseRomanToInt(this.romanNumber)}dateChanged(i){let r=i.split("-");if(r.length>1){this.date=i;let s=gS.parseIntToRoman(r[0]),o=gS.parseIntToRoman(r[1]),a=gS.parseIntToRoman(r[2]);this.romanDateGerman=a+"."+o+"."+s,this.romanDateUs=s+"-"+o+"-"+a}else this.romanDateGerman="",this.romanDateUs=""}romanDateChanged(){}fixRoman(){}decimalNumberChanged(){typeof this.decimalNumber=="number"?(this.decimalNumber>9999&&(this.decimalNumber=9999),this.decimalNumberConverted=gS.parseIntToRoman(this.decimalNumber)):this.decimalNumberConverted=""}print(){this.showInputs=!1,requestAnimationFrame(()=>{window.print(),this.showInputs=!0})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-roman-numerals"]],standalone:!0,features:[xe],decls:17,vars:8,consts:[[1,"nxt-page","h-100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px"],[1,"page-header"],[3,"click",4,"ngIf"],["fxFlex","","fxLayout","column"],["fxFlex","","fxLayout","row","fxLayoutAlign","center center"],["fxFlex","50%","class","p-4",4,"ngIf"],["class","text-250","fxLayoutAlign","center center",4,"ngIf"],["fxFlex","","class","text-250","fxLayoutAlign","center center",4,"ngIf"],["fxLayoutAlign","center","class","pb-4",4,"ngIf"],[3,"click"],["fxFlex","50%",1,"p-4"],["placeholder","Datum",3,"nxtModelChange","disableOpenOnClickInput"],["fxLayoutAlign","center center",1,"text-250"],[1,"default-table"],["placeholder","R\xF6mische Zahl",3,"keyup"],[4,"ngIf"],["placeholder","Dezimalzahl",3,"valueChange","keyup","isNumber","value"],["fxFlex","","fxLayoutAlign","center center",1,"text-250"],["fxLayoutAlign","center",1,"pb-4"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"R\xF6mische Zahlen / Daten"),p()(),W(5,Lzi,2,0,"nxt-button-icon",4),p(),h(6,"div",5)(7,"div",6),W(8,Ozi,2,1,"div",7)(9,Nzi,14,10,"div",8),p()(),h(10,"div",6),W(11,Vzi,2,0,"div",7)(12,Hzi,3,2,"div",8),p(),h(13,"div",6),W(14,Gzi,2,2,"div",7)(15,Wzi,8,2,"div",9),p(),W(16,Uzi,3,0,"div",10),p()),r&2&&(g(5),b("ngIf",s.dialogRef),g(3),b("ngIf",s.showInputs),g(),b("ngIf",s.romanDateGerman),g(2),b("ngIf",s.showInputs),g(),b("ngIf",s.romanNumberConverted!==0),g(2),b("ngIf",s.showInputs),g(),b("ngIf",s.decimalNumberConverted),g(),b("ngIf",s.showInputs&&(s.decimalNumberConverted||s.romanNumberConverted!==0||s.romanDateGerman)))},dependencies:[At,Yt,$r,oi,qi,Ct,an,tl,Yi,Lt,Hn],styles:["table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{text-align:center}"]});let t=e;return t})()});function $zi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function Kzi(t,e){if(t&1&&(h(0,"div",8),ee(1,"nxt-datagrid",9,0),p()),t&2){let n=w();g(),b("columnDefs",n.columnDefs)("rowData",n.data.artists)}}var jzi,R4t,F4t=Q(()=>{jc();Pa();zn();Vd();Qo();ls();ri();Vt();me();ji();yi();Vt();jzi=["prePayoutGrid"];R4t=(()=>{let e=class e{constructor(i,r){this.dialogRef=i,this.socketService=r,this.columnDefs=[{headerName:"Artist",field:"name",nxtFieldType:Ee.Text},{headerName:"NxtFactor",nxtFieldType:Ee.Number,valueGetter:s=>{let o=s.data.nxtFactor.pointsForPayout;return o+=s.data.nxtFactor.pointsForPayoutPerTimePlanned,o+=s.data.nxtFactor.pointsForPayoutPerTimeReal,Math.round(o)},cellStyle:s=>s.value<24?{color:xn.Red}:s.value<26?{color:xn.Orange}:{color:xn.Green},sort:"asc"},{headerName:"Payout",field:"totalPayout",nxtFieldType:Ee.Money},{headerName:"Payout geplant",field:"totalPayoutPlanned",nxtFieldType:Ee.Money},{headerName:"Prozente",field:"totalPercentage",nxtFieldType:Ee.Percentage},{headerName:"Termine",nxtFieldType:Ee.CalendarEvents,valueGetter:s=>s.data.events,nxtFieldTypeParams:{getButtonText:s=>{let o=Ie.format(s.start,"HH:mm")+" - "+Ie.format(s.end,"HH:mm");return s.customerObj&&(o+=`
`+s.customerObj.givenName+" "+s.customerObj.familyName),s.priceFix?o+=`
Fix: `+Wn.toMoneyString(s.priceEstimatedFrom):(o+=`
ca. `+Wn.toMoneyString(s.priceEstimatedFrom),s.priceEstimatedTill&&(o+=" - "+Wn.toMoneyString(s.priceEstimatedTill))),s.paymentSum&&(o+=`
bezahlt: `+Wn.toMoneyString(s.paymentSum)),o}}},{headerName:"\u20AC/Std geplant",field:"moneyPerHourPlanned",nxtFieldType:Ee.Money},{headerName:"\u20AC/Std ist",field:"moneyPerHourReal",nxtFieldType:Ee.Money},{headerName:"Dauer geplant",field:"totalDurationPlanned",nxtFieldType:Ee.Duration},{headerName:"Dauer ist",field:"totalDurationReal",nxtFieldType:Ee.Duration}]}load(i){return O(this,null,function*(){this.dateString=Ie.format(i,"dd.MM.yyyy"),this.data=yield this.socketService.getPrePayoutData(i),console.log(this.data)})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-pre-payout"]],viewQuery:function(r,s){if(r&1&&ei(jzi,5),r&2){let o;Pt(o=Rt())&&(s.prePayoutGrid=o.first)}},standalone:!0,features:[xe],decls:7,vars:3,consts:[["prePayoutGrid",""],[1,"nxt-page","h-100","w-full"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px"],[1,"page-header"],[3,"click",4,"ngIf"],["fxLayout","column","class","h-100",4,"ngIf"],[3,"click"],["fxLayout","column",1,"h-100"],[1,"h-100",3,"columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),y(4),p()(),W(5,$zi,2,0,"nxt-button-icon",5),p(),W(6,Kzi,3,2,"div",6),p()),r&2&&(g(4),Ke("Artist-Auszahlungen am ",s.dateString,""),g(),b("ngIf",s.dialogRef),g(),b("ngIf",s.data))},dependencies:[At,Yt,$r,oi,Ct,an,dr]});let t=e;return t})()});function qzi(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.start())}),y(1,"START"),p()}if(t&2){let n=w();b("disabled",n.status&&(!n.broadcastId||!n.messageId||n.status.isRunning))}}function Zzi(t,e){if(t&1){let n=re();h(0,"nxt-button",21),F("click",function(){V(n);let r=w();return B(r.abort())}),y(1,"Abbrechen"),p()}}function Xzi(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",11),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.customFilter.use,r)||(s.customFilter.use=r),B(r)}),y(1,"CUSTOM!"),p()}if(t&2){let n=w();b("disabled",n.status==null?null:n.status.isRunning),qe("value",n.customFilter.use)}}function Qzi(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",11),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.weekly,r)||(s.weekly=r),B(r)}),y(1,"WEEKLY"),p()}if(t&2){let n=w();b("disabled",n.status==null?null:n.status.isRunning),qe("value",n.weekly)}}function Jzi(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",11),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.sortMostEvents,r)||(s.sortMostEvents=r),B(r)}),y(1,"Kunden mit den meist geschlossenen zu erst"),p()}if(t&2){let n=w();b("disabled",n.status==null?null:n.status.isRunning),qe("value",n.sortMostEvents)}}function eHi(t,e){if(t&1){let n=re();vs(0),h(1,"nxt-date-picker",28),Xe("nxtModelChange",function(r){V(n);let s=w(2);return Ze(s.customFilter.eventFrom,r)||(s.customFilter.eventFrom=r),B(r)}),p(),h(2,"nxt-date-picker",29),Xe("nxtModelChange",function(r){V(n);let s=w(2);return Ze(s.customFilter.eventTill,r)||(s.customFilter.eventTill=r),B(r)}),p(),h(3,"nxt-input",30),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.customFilter.minPriceEstimatedFrom,r)||(s.customFilter.minPriceEstimatedFrom=r),B(r)}),p(),h(4,"nxt-input",31),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.customFilter.maxPriceEstimatedFrom,r)||(s.customFilter.maxPriceEstimatedFrom=r),B(r)}),p(),h(5,"nxt-input",32),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.customFilter.artistCalendarNumber,r)||(s.customFilter.artistCalendarNumber=r),B(r)}),p(),ys()}if(t&2){let n=w(2);g(),qe("nxtModel",n.customFilter.eventFrom),g(),b("showJumpDayButtons",!0),qe("nxtModel",n.customFilter.eventTill),g(),b("bottomNoPadding",!0)("isMoney",!0),qe("value",n.customFilter.minPriceEstimatedFrom),g(),b("bottomNoPadding",!0)("isMoney",!0),qe("value",n.customFilter.maxPriceEstimatedFrom),g(),qe("value",n.customFilter.artistCalendarNumber)}}function tHi(t,e){if(t&1){let n=re();h(0,"div",22)(1,"div",23)(2,"nxt-slide-toggle",24),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.customFilter.hadEvents,r)||(s.customFilter.hadEvents=r),B(r)}),y(3,"Hat Termin(e)"),p(),W(4,eHi,6,10,"ng-container",25),p(),h(5,"div",26)(6,"nxt-slide-toggle",24),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.customFilter.noFixArtist,r)||(s.customFilter.noFixArtist=r),B(r)}),y(7,"keine Fix-Artists"),p(),h(8,"nxt-slide-toggle",24),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.customFilter.invertResult,r)||(s.customFilter.invertResult=r),B(r)}),y(9,"Filter invertieren"),p(),h(10,"nxt-slide-toggle",24),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.customFilter.noEventsInFuture,r)||(s.customFilter.noEventsInFuture=r),B(r)}),y(11,"Keine zuk\xFCnftigen Termine"),p(),h(12,"nxt-slide-toggle",24),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.customFilter.malleImport,r)||(s.customFilter.malleImport=r),B(r)}),y(13,"Malleimport"),p(),h(14,"nxt-autocomplete",27),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.customFilter.customerLanguage,r)||(s.customFilter.customerLanguage=r),B(r)}),p()()()}if(t&2){let n=w();g(2),qe("value",n.customFilter.hadEvents),g(2),b("ngIf",n.customFilter.hadEvents),g(2),qe("value",n.customFilter.noFixArtist),g(2),qe("value",n.customFilter.invertResult),g(2),qe("value",n.customFilter.noEventsInFuture),g(2),qe("value",n.customFilter.malleImport),g(2),b("options",n.languages)("displayWith",n.DisplayWithTools.displayWithName)("displayInOptionWith",n.DisplayWithTools.displayWithName),qe("value",n.customFilter.customerLanguage)}}function iHi(t,e){if(t&1&&(h(0,"div",33)(1,"table",34)(2,"tr")(3,"th"),y(4,"Status"),p(),h(5,"th"),y(6,"Gesamt"),p(),h(7,"th"),y(8,"Verschickt"),p(),h(9,"th"),y(10,"Offen"),p(),h(11,"th"),y(12,"Fortschritt"),p(),h(13,"th"),y(14,"Restdauer"),p()(),h(15,"tr")(16,"td"),y(17),p(),h(18,"td"),y(19),p(),h(20,"td"),y(21),p(),h(22,"td"),y(23),p(),h(24,"td"),y(25),p(),h(26,"td"),y(27),Ce(28,"duration"),p()()()()),t&2){let n=w();g(17),ye(n.status!=null&&n.status.isRunning?"l\xE4uft":"l\xE4uft nicht"),g(2),ye(n.alreadySentCount+n.toSendCount),g(2),ye(n.alreadySentCount),g(2),ye(n.toSendCount),g(2),Ke("",n.sentPercentage," %"),g(2),ye(tt(28,6,n.restDuration))}}function nHi(t,e){if(t&1&&ee(0,"img",38),t&2){let n=w(2);b("src",n.imageSrc,Ur)}}function rHi(t,e){if(t&1&&(h(0,"div",35),W(1,nHi,1,1,"img",36),ee(2,"div",37),Ce(3,"safeHtml"),p()),t&2){let n=w();g(),b("ngIf",n.imageSrc),g(),b("innerHTML",tt(3,2,n.message.body),Pi)}}var Yzi,L4t,O4t=Q(()=>{Vb();Pa();kl();Ci();zn();Ld();sx();C4();Qo();Lv();ha();Ah();th();oo();ri();Zi();Jr();Vt();Ph();me();yi();Ci();Vt();Yzi=["statusGrid"];L4t=(()=>{let e=class e extends i2{constructor(i,r){super(),this.socketService=i,this.dialogService=r,this.unknownChats=!1,this.live=!0,this.weekly=!1,this.broadcastId="",this.messageId="",this.statusStack=[],this.columnDefs=[{headerName:"Datum",field:"timestamp",nxtFieldType:Ee.Date_germanDateTimeWithSeconds,minWidth:180},{headerName:"Index",valueGetter:s=>s.data.currentIndex+1+" / "+s.data.totalContacts,nxtFieldType:Ee.Text,minWidth:100},{headerName:"Prozent",valueGetter:s=>s.data.currentIndex/s.data.totalContacts*100,nxtFieldType:Ee.Percentage,minWidth:100},{headerName:"Chat",cellRenderer:()=>Ir.Material.Chat,nxtOnCellClicked:s=>{window.open("/chat/"+s.data.mobile,"_blank")}},{headerName:"Text",field:"message",nxtFieldType:Ee.Text,minWidth:800}],this.columnDefsContacts=[{headerName:"Name",field:"name",nxtFieldType:Ee.Text,minWidth:180,nxtOnCellClicked:s=>{this.dialogService.showEventsByContact(s.data.id)}},{headerName:"Abges.",field:"canceledEventsCount",nxtFieldType:Ee.Number},{headerName:"geschl.",field:"closedEventsCount",nxtFieldType:Ee.Number},{headerName:"zukunft",field:"eventsCount",nxtFieldType:Ee.Number}],this.alreadySentCount=-1,this.toSendCount=-1,this.sentPercentage=-1,this.imageSrc="",this.sortMostEvents=!0,this.customFilter={use:!1,eventFrom:"2023-12-24",eventTill:"2023-12-26",minPriceEstimatedFrom:10,maxPriceEstimatedFrom:1e3,noFixArtist:!1,invertResult:!1,noEventsInFuture:!1,customerLanguage:"",malleImport:!1,hadEvents:!1,artistCalendarNumber:""},this.restDuration=0,this.sleepBetweenMessages=16,this.stopTime="20:00",this.languages=vf.nxtUsed,this.DisplayWithTools=Qh}ngOnInit(){return O(this,null,function*(){let i=yield this.socketService.getLastBroadcast();i&&(this.broadcastId=i.broadcastId,this.messageId=i.messageId,i.options&&i.options.customFilter&&(this.customFilter=i.options.customFilter,this.weekly=i?.options?.weekly,this.live=i?.options?.live,this.sortMostEvents=i?.options?.sortMostEvents)),this.pushSocketSubscription=this.socketService.subscribeNew("getWhatsAppBroadcastStatus",r=>O(this,null,function*(){if(r.isRunning){if(r.options?.sleepBetweenMessages&&(this.sleepBetweenMessages=r.options.sleepBetweenMessages/1e3),r.toSendCount&&(this.toSendCount=r.toSendCount),r.alreadySentCount&&(this.alreadySentCount=r.alreadySentCount,this.sentPercentage=fn.round(this.alreadySentCount/(this.alreadySentCount+this.toSendCount)*100,1),this.restDuration=this.toSendCount*(this.sleepBetweenMessages*1e3)),this.statusStack.length===0){let s=yield this.socketService.getWhatsAppBroadcastStatusStack();this.statusStack=s.stack,this.message=s.message,this.imageSrc="",this.message.image&&(this.imageSrc=this.getImageSrc(this.message.image))}r.broadCastId&&(this.broadcastId=r.broadCastId,this.messageId=r.messageId),this.nxtDatagridComponent&&this.nxtDatagridComponent.api&&this.nxtDatagridComponent.api.applyTransaction({add:[r],addIndex:0}),r.contactId&&this.openContacts&&(this.openContacts=this.openContacts.filter(s=>s.id!==r.contactId))}this.status=r}),{emitInitial:!0})})}addRow(){if(this.addItems(),this.nxtDatagridComponent){let i={timestamp:0,currentIndex:100,totalContacts:5,message:"declarations-of-consent",isRunning:!1};this.statusStack.push(i)}}addItems(i=0){let r={timestamp:0,currentIndex:100,totalContacts:5,message:"declarations-of-consent",isRunning:!1},s=[r,r,r];this.nxtDatagridComponent.api.applyTransaction({add:s,addIndex:i})}start(){return O(this,null,function*(){if((yield this.dialogService.showYesNo("Wir in dem Broadcast eine Aktion beworben?"))&&!(yield this.dialogService.showYesNo("Gibt es zu der / den Aktion(en) einen angelegten Rabatt im System?"))){this.dialogService.showOk("Bitte lege einen Rabatt an und starte den Broadcast erneut");return}if(this.sleepBetweenMessages<=14){this.dialogService.showOk("Mindestens 14 Sekunden!");return}this.statusStack=[];let i=this.stopTime?Ie.parse(Ie.formatNow("yyyy-MM-dd")+" "+this.stopTime+":00"):0;this.socketService.startWhatsAppBroadcast(this.broadcastId.toUpperCase(),this.messageId,{live:this.live,weekly:this.weekly,customFilter:this.customFilter,sortMostEvents:this.sortMostEvents,sleepBetweenMessages:this.sleepBetweenMessages*1e3,stopDateTime:i,unknownChats:this.unknownChats}).then()})}abort(){this.socketService.abortWhatsAppBroadcast()}loadBroadcast(i=!1){return O(this,null,function*(){this.dialogService.showLoading(_n.BroadcastLoading,"Broadcast wird geladen");try{this.imageSrc="",this.message="",this.alreadySentCount=-1;let r=yield this.socketService.loadWhatsAppBroadcast(this.broadcastId.toUpperCase(),this.messageId,{live:this.live,weekly:this.weekly,customFilter:this.customFilter,sortMostEvents:this.sortMostEvents,sleepBetweenMessages:this.sleepBetweenMessages*1e3,getContacts:i,unknownChats:this.unknownChats});this.openContacts=r.contacts,this.alreadySentCount=r.alreadySentCount,this.toSendCount=r.toSendCount,this.sentPercentage=fn.round(this.alreadySentCount/(this.alreadySentCount+this.toSendCount)*100,1),this.message=r.message,this.imageSrc="",this.message.image&&(this.imageSrc=this.getImageSrc(this.message.image)),this.restDuration=this.toSendCount*(this.sleepBetweenMessages*1e3)}catch(r){Gn.error(r)}this.dialogService.hideLoading(_n.BroadcastLoading)})}getImageSrc(i){return i.data?"data:"+i.mimetype+";base64,"+i.data:""}sleepBetweenMessagesChanged(){this.restDuration=this.toSendCount*(this.sleepBetweenMessages*1e3)}unknownChatsChanged(){this.customFilter.use=!1,this.sortMostEvents=!1}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-broadcast"]],viewQuery:function(r,s){if(r&1&&ei(Yzi,5),r&2){let o;Pt(o=Rt())&&(s.nxtDatagridComponent=o.first)}},standalone:!0,features:[et,xe],decls:29,vars:29,consts:[["statusGrid",""],["fxLayout","column",1,"nxt-page"],["fxLayout","row","fxLayoutAlign","center center"],["fxFlex","300px","placeholder","Broadcast-Name",3,"valueChange","disabled","value"],["fxFlex","300px","placeholder","Message-Id",3,"valueChange","disabled","value"],[3,"click","disabled"],[3,"disabled","click",4,"ngIf"],[3,"click",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center",1,"pb-3"],["leftText","TEST",3,"valueChange","disabled","value"],[3,"disabled","value","valueChange",4,"ngIf"],[3,"valueChange","disabled","value"],["fxFlex","200px","placeholder","Wartezeit",3,"valueChange","bottomNoPadding","isNumber","value"],["fxFlex","100px","placeholder","Stop",3,"valueChange","clearIcon","bottomNoPadding","isTimePicker","value"],["fxLayout","column","class","p-2","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column",4,"ngIf"],["fxFlex","","fxLayout","row",1,"o-hidden"],["fxFlex","30%"],[1,"w-full","h-100",3,"columnDefs","rowData"],["fxFlex","70%"],["class","o-auto","fxFlex","30%","fxLayout","column","fxLayoutAlign","start center",4,"ngIf"],[3,"click"],["fxLayout","column","fxLayoutAlign","center center",1,"p-2"],[1,"flex","flex-row","gap-4"],[3,"valueChange","value"],[4,"ngIf"],[1,"flex","flex-row","gap-3"],["fxFlex","150px","placeholder","Kundensprache","valueField","code",3,"valueChange","options","displayWith","displayInOptionWith","value"],["fxFlex","200px","placeholder","start",1,"date-picker--bottom-no-padding",3,"nxtModelChange","nxtModel"],["fxFlex","260px","placeholder","end",1,"date-picker--bottom-no-padding",3,"nxtModelChange","showJumpDayButtons","nxtModel"],["fxFlex","150px","placeholder","Min. Preis",3,"valueChange","bottomNoPadding","isMoney","value"],["fxFlex","150px","placeholder","Max. Preis",3,"valueChange","bottomNoPadding","isMoney","value"],["placeholder","Artist-Kalender-Nummer",2,"width","120px",3,"valueChange","value"],["fxLayout","column"],[1,"nxt-table","mb-1"],["fxFlex","30%","fxLayout","column","fxLayoutAlign","start center",1,"o-auto"],["style","width: 50%; padding-bottom: 8px",3,"src",4,"ngIf"],[3,"innerHTML"],[2,"width","50%","padding-bottom","8px",3,"src"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"nxt-input",3),Xe("valueChange",function(l){return V(o),Ze(s.broadcastId,l)||(s.broadcastId=l),B(l)}),p(),h(3,"nxt-input",4),Xe("valueChange",function(l){return V(o),Ze(s.messageId,l)||(s.messageId=l),B(l)}),p(),h(4,"nxt-button",5),F("click",function(){return V(o),B(s.loadBroadcast(!1))}),y(5,"Lade Broadcast"),p(),h(6,"nxt-button",5),F("click",function(){return V(o),B(s.loadBroadcast(!0))}),y(7,"Lade Broadcast mit Kontakten"),p(),W(8,qzi,2,1,"nxt-button",6)(9,Zzi,2,0,"nxt-button",7),p(),h(10,"div",8)(11,"nxt-slide-toggle",9),Xe("valueChange",function(l){return V(o),Ze(s.live,l)||(s.live=l),B(l)}),y(12,"LIVE"),p(),W(13,Xzi,2,2,"nxt-slide-toggle",10)(14,Qzi,2,2,"nxt-slide-toggle",10),h(15,"nxt-slide-toggle",11),Xe("valueChange",function(l){return V(o),Ze(s.unknownChats,l)||(s.unknownChats=l),B(l)}),F("valueChange",function(){return V(o),B(s.unknownChatsChanged())}),y(16,"Unbekannte Chats"),p(),W(17,Jzi,2,2,"nxt-slide-toggle",10),h(18,"nxt-input",12),Xe("valueChange",function(l){return V(o),Ze(s.sleepBetweenMessages,l)||(s.sleepBetweenMessages=l),B(l)}),F("valueChange",function(){return V(o),B(s.sleepBetweenMessagesChanged())}),p(),h(19,"nxt-input",13),Xe("valueChange",function(l){return V(o),Ze(s.stopTime,l)||(s.stopTime=l),B(l)}),p()(),W(20,tHi,15,10,"div",14)(21,iHi,29,8,"div",15),h(22,"div",16)(23,"div",17),ee(24,"nxt-datagrid",18),p(),h(25,"div",19),ee(26,"nxt-datagrid",18,0),p(),W(28,rHi,4,4,"div",20),p()()}r&2&&(g(2),b("disabled",s.status==null?null:s.status.isRunning),qe("value",s.broadcastId),g(),b("disabled",s.status==null?null:s.status.isRunning),qe("value",s.messageId),g(),b("disabled",!s.broadcastId||!s.messageId||(s.status==null?null:s.status.isRunning)),g(2),b("disabled",!s.broadcastId||!s.messageId||(s.status==null?null:s.status.isRunning)),g(2),b("ngIf",s.message),g(),b("ngIf",s.status==null?null:s.status.isRunning),g(2),b("disabled",s.status==null?null:s.status.isRunning),qe("value",s.live),g(2),b("ngIf",!s.unknownChats),g(),b("ngIf",!s.unknownChats),g(),b("disabled",s.status==null?null:s.status.isRunning),qe("value",s.unknownChats),g(2),b("ngIf",!s.unknownChats),g(),b("bottomNoPadding",!0)("isNumber",!0),qe("value",s.sleepBetweenMessages),g(),b("clearIcon",!0)("bottomNoPadding",!0)("isTimePicker",!0),qe("value",s.stopTime),g(),b("ngIf",s.customFilter.use),g(),b("ngIf",s.alreadySentCount>-1),g(3),b("columnDefs",s.columnDefsContacts)("rowData",s.openContacts),g(2),b("columnDefs",s.columnDefs)("rowData",s.statusStack),g(2),b("ngIf",s.message))},dependencies:[At,Yt,oi,qi,Yi,Lt,Ct,Nn,tl,Ga,dr,Or,lf]});let t=e;return t})()});function sHi(t,e){if(t&1&&(h(0,"div",3),y(1,"Stencil"),p(),ee(2,"div",4)),t&2){let n=w();g(2),b("innerHTML",n.stencilInstruction,Pi)}}function oHi(t,e){if(t&1&&(h(0,"div",3),y(1,"Pre-Tattoo"),p(),ee(2,"div",4)),t&2){let n=w();g(2),b("innerHTML",n.preTattooInstruction,Pi)}}function aHi(t,e){if(t&1&&(h(0,"div",3),y(1,"Tattoo"),p(),ee(2,"div",4)(3,"br")(4,"div",5)),t&2){let n=w();g(2),b("innerHTML",n.tattooInstruction,Pi),g(2),b("innerHTML",n.minText,Pi)}}function lHi(t,e){if(t&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),y(3),p(),W(4,sHi,3,1)(5,oHi,3,1)(6,aHi,5,2),p()()),t&2){let n=w();g(3),Ke("Hello ",e.artist,"!"),g(),Je(n.type()==="stencil"?4:-1),g(),Je(n.type()==="preTattoo"?5:-1),g(),Je(n.type()==="tattoo"?6:-1)}}var N4t,V4t=Q(()=>{me();Vt();me();ma();Vt();N4t=(()=>{let e=class e{constructor(i,r){this.activatedRoute=i,this.router=r,this.type=gt(null),this.eventQrCodePreData=gt(null),this.eventQrCodePreData.set(this.router.getCurrentNavigation().extras.state.eventQrCodePreData),this.type.set(this.router.getCurrentNavigation().extras.state.type),console.log(this.eventQrCodePreData()),console.log(this.type())}ngOnInit(){}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(Ll))},e.\u0275cmp=_e({type:e,selectors:[["nxt-event-qr-ok"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[["fxLayout","column","fxLayoutAlign","center center",1,"w-full","nxt-page","h-100"],["fxLayout","column","fxLayoutAlign","center center"],[1,"pb-2","text-250",2,"text-align","center"],[1,"font-bold","text-[150%]","pb-4"],[1,"text-170",2,"text-align","center",3,"innerHTML"],[1,"text-250","red","animate__animated","animate__tada","center",2,"text-align","center",3,"innerHTML"]],template:function(r,s){if(r&1&&W(0,lHi,7,4,"div",0),r&2){let o;Je((o=s.eventQrCodePreData())?0:-1,o)}},dependencies:[At,Yt,oi],changeDetection:0});let t=e;return t})()});var B4t,z4t=Q(()=>{zn();Zi();th();Jr();Vt();me();ji();Ci();Vt();B4t=(()=>{let e=class e{constructor(i,r){this.dialogRef=i,this.dialogService=r,this.minDate=Ie.todayDateString,this.date="",this.text=""}close(){this.dialogRef?.close()}setDate(i){this.date=Ie.format(Ie.addDays(Date.now(),i),"yyyy-MM-dd")}save(){return O(this,null,function*(){yield this.dialogService.showOk("Sorry das geht nocht nicht, kommt die Tage!"),this.close()})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-add-tagline-unknown"]],standalone:!0,features:[xe],decls:26,vars:5,consts:[["fxLayout","column"],[1,"pl-2","pt-2"],["placeholder","Info",3,"valueChange","value"],["fxLayout","row","fxLayoutAlign","start center",1,"pl-2"],["fxFlex","300px"],[3,"nxtModelChange","nxtModel","minDate"],[3,"click"],["fxLayout","row","fxLayoutAlign","space-around",1,"pt-3"],[3,"click","disabled"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),y(2),p(),ee(3,"br"),h(4,"nxt-input",2),Xe("valueChange",function(a){return Ze(s.text,a)||(s.text=a),a}),p(),h(5,"div",3)(6,"div"),y(7,"Wann soll daran erinnert werden:"),p(),h(8,"div",4)(9,"nxt-date-picker",5),Xe("nxtModelChange",function(a){return Ze(s.date,a)||(s.date=a),a}),p()(),h(10,"div")(11,"nxt-button",6),F("click",function(){return s.setDate(1)}),y(12,"Morgen"),p(),h(13,"nxt-button",6),F("click",function(){return s.setDate(2)}),y(14,"\xDCbermorgen"),p(),h(15,"nxt-button",6),F("click",function(){return s.setDate(3)}),y(16,"in 3 Tagen"),p(),h(17,"nxt-button",6),F("click",function(){return s.setDate(7)}),y(18,"1 Woche"),p(),h(19,"nxt-button",6),F("click",function(){return s.setDate(14)}),y(20,"2 Woche"),p()()(),h(21,"div",7)(22,"nxt-button",6),F("click",function(){return s.close()}),y(23,"Abbrechen"),p(),h(24,"nxt-button",8),F("click",function(){return s.save()}),y(25,"Speichern"),p()()()),r&2&&(g(2),Ke("Wiedervorlage f\xFCr ",s.mobileNumber,""),g(2),qe("value",s.text),g(5),qe("nxtModel",s.date),b("minDate",s.minDate),g(15),b("disabled",!s.text||!s.date))},dependencies:[At,Yt,oi,qi,Yi,tl,Lt],encapsulation:2});let t=e;return t})()});var E9e,H4t=Q(()=>{ef();Zi();n1();s3();Jr();Vt();me();ji();Cs();yi();Ci();Vt();E9e=(()=>{let e=class e{constructor(i,r,s,o){this.dialogRef=i,this.configService=r,this.socketService=s,this.dialogService=o,this.langs=this.configService.config.value.langs,this.currentLang="de"}ngOnInit(){this.whatsappFastAnswer||(this.whatsappFastAnswer={id:ua.generate(),shortcut:"",texts:{}});for(let i of this.langs)this.whatsappFastAnswer.texts[i.value]||(this.whatsappFastAnswer.texts[i.value]="")}save(){return O(this,null,function*(){this.validate()&&(this.isNew?yield this.socketService.insertWhatsappFastAnswer(this.whatsappFastAnswer):yield this.socketService.updateWhatsappFastAnswer(this.whatsappFastAnswer),this.dialogRef.close())})}validate(){let i=[];this.whatsappFastAnswer.shortcut||i.push("K\xFCrzel fehlt");for(let r of this.langs)this.whatsappFastAnswer.texts[r.value]||i.push("Text in "+r.text+" fehlt");return i.length>0?(this.dialogService.showOk(i.join(`
`)),!1):!0}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(Xi),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-fast-answer-edit"]],inputs:{whatsappFastAnswer:"whatsappFastAnswer",isNew:"isNew",allWhatsappFastAnswers:"allWhatsappFastAnswers"},standalone:!0,features:[xe],decls:12,vars:4,consts:[["fxLayout","column"],[1,"nxt-page-header"],["fxFlex",""],["placeholder","K\xFCrzel",3,"valueChange","esc","value"],["direction","row","valueKey","value",3,"valueChange","value","options"],["rows","10",3,"valueChange","value"],["fxLayout","row","fxLayoutAlign","center","fxLayoutGap","10px"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),y(2,"Neuer WhatsApp-Text"),p(),h(3,"div",2)(4,"nxt-input",3),Xe("valueChange",function(a){return Ze(s.whatsappFastAnswer.shortcut,a)||(s.whatsappFastAnswer.shortcut=a),a}),F("esc",function(){return s.dialogRef.close()}),p(),h(5,"nxt-radio",4),Xe("valueChange",function(a){return Ze(s.currentLang,a)||(s.currentLang=a),a}),p(),h(6,"nxt-textarea",5),Xe("valueChange",function(a){return Ze(s.whatsappFastAnswer.texts[s.currentLang],a)||(s.whatsappFastAnswer.texts[s.currentLang]=a),a}),p()(),h(7,"div",6)(8,"nxt-button",7),F("click",function(){return s.dialogRef.close()}),y(9,"Abbrechen"),p(),h(10,"nxt-button",7),F("click",function(){return s.save()}),y(11,"Speichern"),p()()()),r&2&&(g(4),qe("value",s.whatsappFastAnswer.shortcut),g(),qe("value",s.currentLang),b("options",s.langs),g(),qe("value",s.whatsappFastAnswer.texts[s.currentLang]))},dependencies:[At,Yt,$r,oi,qi,Yi,tm,yu,Lt]});let t=e;return t})()});var G4t,W4t=Q(()=>{me();od();G4t=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i,r){return i==null||i.length===0||r?.length<2?i:this.highlight(i,r)}escapeRegExp(i){let r=["$","^","*","(",")","+","[","]","{","}","\\","|",".","?","/"],s=new RegExp("(\\"+r.join("|\\")+")","g");return i.replace(s,"\\$1")}highlight(i,r){if(r&&i){let s=i.replace(new RegExp(this.escapeRegExp(r),"gi"),o=>`<mark class="highlight">${o}</mark>`);return console.log(s),s}return i}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"highlight",type:e,pure:!0,standalone:!0});let t=e;return t})()});function dHi(t,e){if(t&1&&(h(0,"div",3),y(1),p()),t&2){let n=w();g(),Ke("an ",n.contact.fullName,"")}}function uHi(t,e){if(t&1&&(h(0,"div",3),y(1),p()),t&2){let n=w();g(),Ke("an ",n.mobile,"")}}function hHi(t,e){if(t&1){let n=re();h(0,"tr",18),ee(1,"td",19),Ce(2,"highlight"),Ce(3,"safeHtml"),h(4,"td",20),ee(5,"div",21),Ce(6,"highlight"),Ce(7,"safeHtml"),p(),h(8,"td",22)(9,"div",23)(10,"nxt-button-icon",16),F("click",function(){let r=V(n).$implicit,s=w();return B(s.edit(r))}),y(11,"edit"),p()()()()}if(t&2){let n=e.$implicit,i=e.index,r=w();b("ngClass",sn(14,cHi,i===r.selectIndex))("id","item_"+i),g(),b("innerHTML",tt(3,7,Nt(2,4,n.shortcut,r.quickFilter)),Pi),g(4),b("innerHTML",tt(7,12,Nt(6,9,n.texts[r.currentLang],r.quickFilter)),Pi)}}var cHi,vS,qU=Q(()=>{H4t();gu();Gi();$n();W4t();ha();Zi();ls();An();il();s3();Jr();ri();Vt();me();ji();yi();Ci();Cs();gu();ag();Kr();Vt();An();cHi=t=>({"selected-row":t});vS=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.configService=o,this.shortcutService=a,this.storageService=l,this.loginService=c,this.whatsappFastAnswers=[],this.whatsappFastAnswersFiltered=[],this.currentLang="de",this.langs=this.configService.config.value.langs,this.quickFilter="",this.selectIndex=0,this.load(),this.pushSubscription=this.shortcutService.onKeyPress.subscribe(d=>{d===Pn.Esc&&this.dialogRef.close(),this.contact||this.mobile,d===Pn.Down?(this.selectIndex++,document.querySelector("#item_"+this.selectIndex)?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),this.selectIndex>=this.whatsappFastAnswersFiltered.length&&(this.selectIndex=this.whatsappFastAnswersFiltered.length-1)):d===Pn.Up?(this.selectIndex--,this.selectIndex<0&&(this.selectIndex=0),document.querySelector("#item_"+this.selectIndex)?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})):d===Pn.Enter&&this.send()})}setFilter(){this.selectIndex=0,this.whatsappFastAnswers.forEach(i=>{i.shortcut.toLowerCase().startsWith(this.quickFilter.toLowerCase())?i.filterCounter=100:i.shortcut.toLowerCase().includes(this.quickFilter.toLowerCase())?i.filterCounter=50:i.texts[this.currentLang].toLowerCase().includes(this.quickFilter.toLowerCase())?i.filterCounter=30:i.filterCounter=0}),this.whatsappFastAnswersFiltered=this.whatsappFastAnswers.filter(i=>i.filterCounter>0).sort((i,r)=>{if(i.filterCounter>r.filterCounter)return-1;if(i.filterCounter<r.filterCounter)return 1;if(i.shortcut.length<r.shortcut.length)return-1;if(i.shortcut.length>r.shortcut.length)return 1}),this.contact&&(this.selectIndex=0)}load(){return O(this,null,function*(){this.whatsappFastAnswers=yield this.socketService.getWhatsappFastAnswers(),this.setFilter(),!this.contact&&!this.mobile&&(this.selectIndex=-2)})}ngOnInit(){}createNew(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(E9e,{whatsappFastAnswer:null,allWhatsappFastAnswers:this.whatsappFastAnswers,isNew:!0});yield Sn(i.afterClosed()),this.load()})}send(){return O(this,null,function*(){if(this.selectIndex<0)return;let i="";if(this.contact?.mobileFormatted?i=this.contact?.mobileFormatted:this.mobile&&(i=this.mobile),i){if(!this.whatsappFastAnswersFiltered[this.selectIndex])return;let r=this.whatsappFastAnswersFiltered[this.selectIndex].texts[this.currentLang];r=this.replacePlaceholders(r),this.dialogRef.close({text:r,whatsappFastAnswers:this.whatsappFastAnswers})}else this.dialogService.showOk("Kontakt konnte nicht geladen werden")})}edit(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(E9e,{whatsappFastAnswer:i,allWhatsappFastAnswers:this.whatsappFastAnswers});yield Sn(r.afterClosed()),this.load()})}replacePlaceholders(i){return i.replaceAll("{{paypal-email}}",this.configService.config.value.paypalEmail)}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt),R(Xi),R(fu),R(vu),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-fast-answers"]],standalone:!0,features:[et,xe],decls:28,vars:6,consts:[["fxLayout","column",1,"h-100","w-full"],["fxLayout","row","fxLayoutAlign","center",1,"p3"],["fxLayout","column"],[1,"nxt-page-header"],["class","nxt-page-header",4,"ngIf"],["fxLayout","column",1,"nxt-page-body","h-100"],["fxLayout","row"],["fxFlex","300px"],["placeholder","K\xFCrzel",3,"esc","valueChange","value"],["direction","row","valueKey","value",3,"valueChange","value","options"],["fxFlex","","fxLayout","column",1,"pt-3","o-hidden","h-100"],["fxLayout","column",1,"o-auto","h-100"],[1,"nxt-table"],["nxtPermission","WhatsAppFastAnswers_Edit"],[3,"ngClass","id",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center",1,"p-2"],[3,"click"],["nxtPermission","WhatsAppFastAnswers_Edit",3,"click"],[3,"ngClass","id"],[2,"width","30%","text-align","center",3,"innerHTML"],[2,"font-size","75%"],[3,"innerHTML"],["nxtPermission","WhatsAppFastAnswers_Edit",2,"width","30px"],["fxLayout","row","fxLayoutAlign","center"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"WhatsApp Texte"),p(),W(5,dHi,2,1,"div",4)(6,uHi,2,1,"div",4),p()(),h(7,"div",5)(8,"div",6)(9,"div",7)(10,"nxt-input",8),F("esc",function(){return s.dialogRef.close()}),Xe("valueChange",function(a){return Ze(s.quickFilter,a)||(s.quickFilter=a),a}),F("valueChange",function(){return s.setFilter()}),p()(),h(11,"nxt-radio",9),Xe("valueChange",function(a){return Ze(s.currentLang,a)||(s.currentLang=a),a}),p()(),h(12,"div",10)(13,"div",11)(14,"table",12)(15,"tr")(16,"th"),y(17,"K\xFCrzel"),p(),h(18,"th"),y(19,"Text"),p(),h(20,"th",13),y(21,"Bearbeiten"),p()(),W(22,hHi,12,16,"tr",14),p()()()(),h(23,"div",15)(24,"nxt-button",16),F("click",function(){return s.dialogRef.close()}),y(25,"Abbrechen"),p(),h(26,"nxt-button",17),F("click",function(){return s.createNew()}),y(27,"Neuer Text anlegen"),p()()()),r&2&&(g(5),b("ngIf",s.contact),g(),b("ngIf",s.mobile),g(4),qe("value",s.quickFilter),g(),qe("value",s.currentLang),b("options",s.langs),g(11),b("ngForOf",s.whatsappFastAnswersFiltered))},dependencies:[At,Yt,oi,qi,Ct,Yi,tm,Zs,Hi,_s,Dn,No,an,Lt,Or,G4t],styles:["[_nghost-%COMP%]{display:flex;height:100%;min-width:80vw;min-height:80vh}.selected-row[_ngcontent-%COMP%]{background-color:gray;color:#000}"]});let t=e;return t})()});function pHi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.dialogRef.close(r.images))}),y(1,"close"),p()}}function mHi(t,e){if(t&1){let n=re();h(0,"div")(1,"div",8)(2,"img",9),F("click",function(){let r=V(n).$implicit,s=w();return B(s.imageClicked(r))}),p()()()}if(t&2){let n=e.$implicit;g(2),b("src",n.base64,Ur)}}function fHi(t,e){t&1&&(h(0,"div",10),y(1," Keine Bilder als Vorlage gespeichert "),p())}var Jre,M9e=Q(()=>{Gi();lD();ls();ri();Vt();me();ji();yi();Ci();Vt();Jre=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s}ngOnInit(){return O(this,null,function*(){this.load()})}load(){return O(this,null,function*(){this.images=yield this.socketService.getDynamicData(o3.WhatsAppImageSend)})}nxtOnDestroy(){}imageClicked(i){return O(this,null,function*(){let r=yield this.dialogService.showYesNoCancel('<div style="width:100%; text-align: center;"><img src="'+i.base64+'" style="max-height: 50vh"></div>',{yesText:"Bild senden",noText:"Bild l\xF6schen",cancelText:"Abbrechen"});typeof r=="boolean"&&(r?(yield this.send(i),this.dialogRef?.close(this.images)):(yield this.socketService.deleteDynamicData(i.id),this.load()))})}send(i){return O(this,null,function*(){let r="";if(this.contact?.mobileFormatted?r=this.contact?.mobileFormatted:this.mobile&&(r=this.mobile),r)return this.socketService.forwardWhatsAppImageToMobile(i.whatsAppMessageId,r,!0),!0;yield this.dialogService.showOk("Handynummer nicht gefunden")})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-image-send"]],standalone:!0,features:[et,xe],decls:7,vars:3,consts:[[1,"h-100","p-relative"],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","end",2,"right","0px","top","0px","margin-top","-10px","margin-right","-10px"],[3,"click",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","center center",1,"h-100"],[4,"ngFor","ngForOf"],["fxLayout","row","class","p-4",4,"ngIf"],[3,"click"],[1,"p-1"],[2,"max-width","250px",3,"click","src"],["fxLayout","row",1,"p-4"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),W(3,pHi,2,0,"nxt-button-icon",3),p(),h(4,"div",4),W(5,mHi,3,1,"div",5),p(),W(6,fHi,2,0,"div",6),p()()),r&2&&(g(3),b("ngIf",s.dialogRef),g(2),b("ngForOf",s.images),g(),b("ngIf",s.images.length===0))},dependencies:[At,Yt,oi,Ct,an,Hi]});let t=e;return t})()});var ese,k9e=Q(()=>{Zi();oo();Jr();Vt();me();ji();Vt();ese=(()=>{let e=class e{constructor(i){this.dialogRef=i,this.priceStart=void 0,this.discountPercentage=20,this.priceEnd=0,this.fixPriceStart=!1,this.fixPriceEnd=!1,this.fixDiscountPercentage=!0}fixPriceEndChanged(){this.fixPriceEnd?(this.fixPriceStart=!1,this.fixDiscountPercentage=!1):requestAnimationFrame(()=>this.fixPriceEnd=!0)}fixDiscountPercentageChanged(){this.fixDiscountPercentage?(this.fixPriceEnd=!1,this.fixPriceStart=!1):requestAnimationFrame(()=>this.fixDiscountPercentage=!0)}fixPriceStartChanged(){this.fixPriceStart?(this.fixPriceEnd=!1,this.fixDiscountPercentage=!1):requestAnimationFrame(()=>this.fixPriceStart=!0)}priceEndChanged(){requestAnimationFrame(()=>{this.fixDiscountPercentage?this.calcPriceStart():this.calcDiscountPercentage()})}priceStartChanged(){requestAnimationFrame(()=>{this.fixDiscountPercentage?this.calcPriceEnd():this.calcDiscountPercentage()})}discountPercentageChanged(){requestAnimationFrame(()=>{this.fixPriceStart?this.calcPriceEnd():this.calcPriceStart()})}calcPriceStart(){this.priceStart=this.priceEnd/((100-this.discountPercentage)/100)}calcPriceEnd(){this.priceEnd=this.priceStart-this.priceStart*this.discountPercentage/100}calcDiscountPercentage(){this.discountPercentage=Math.round(100-this.priceEnd/this.priceStart*100),this.discountPercentage<0&&(this.discountPercentage=0)}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-calc"]],standalone:!0,features:[xe],decls:13,vars:9,consts:[["fxFlex","","fxLayout","column"],["fxFlex","","fxLayout","row","fxLayoutAlign","center center"],["placeholder","Vorher",3,"valueChange","keyup","value","isMoney"],[3,"valueChange","value"],["placeholder","Rabatt",3,"valueChange","keyup","value","isPercent"],["placeholder","Endpreis",3,"valueChange","keyup","value","isMoney"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"nxt-input",2),Xe("valueChange",function(a){return Ze(s.priceStart,a)||(s.priceStart=a),a}),F("keyup",function(){return s.priceStartChanged()}),p(),h(3,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.fixPriceStart,a)||(s.fixPriceStart=a),a}),F("valueChange",function(){return s.fixPriceStartChanged()}),p()(),h(4,"div",1)(5,"nxt-input",4),Xe("valueChange",function(a){return Ze(s.discountPercentage,a)||(s.discountPercentage=a),a}),F("keyup",function(){return s.discountPercentageChanged()}),p(),h(6,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.fixDiscountPercentage,a)||(s.fixDiscountPercentage=a),a}),F("valueChange",function(){return s.fixDiscountPercentageChanged()}),p()(),h(7,"div",1)(8,"nxt-input",5),Xe("valueChange",function(a){return Ze(s.priceEnd,a)||(s.priceEnd=a),a}),F("keyup",function(){return s.priceEndChanged()}),p(),h(9,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.fixPriceEnd,a)||(s.fixPriceEnd=a),a}),F("valueChange",function(){return s.fixPriceEndChanged()}),p()(),h(10,"div",1)(11,"nxt-button",6),F("click",function(){return s.close()}),y(12,"OK"),p()()()),r&2&&(g(2),qe("value",s.priceStart),b("isMoney",!0),g(),qe("value",s.fixPriceStart),g(2),qe("value",s.discountPercentage),b("isPercent",!0),g(),qe("value",s.fixDiscountPercentage),g(2),qe("value",s.priceEnd),b("isMoney",!0),g(),qe("value",s.fixPriceEnd))},dependencies:[At,Yt,oi,qi,Yi,Nn,Lt]});let t=e;return t})()});var tse,I9e=Q(()=>{me();yi();$n();zn();wD();Kr();jo();M7();Ci();RA();jc();me();tse=(()=>{let e=class e{get topBarItems(){return this.initDone||this.init(),this._topBarItems.asObservable()}constructor(){this.initDone=!1,this.dialogService=Ve(vt),this.reminderService=Ve(T5),this._topBarItems=new qs([]),this.socketService=Ve(lt),this.loginService=Ve(Fi),this.itemCss={minWidth:"150px",color:"#bbb",width:"fit-content",padding:"0 5px 5px 5px",height:"100%",boxSizing:"border-box",maxWidth:"300px",borderRadius:"4px",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},this.textBoxCss={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},this.textCss={"-webkit-line-clamp":"3",display:"-webkit-box","-webkit-box-orient":"vertical",overflow:"hidden",lineHeight:"14px",fontSize:"12px",maxHeight:"48px"},this.headerCss={padding:"2px",display:"flex",fontSize:"12px"},this.reminders=[],this.remindersFiltered=[]}init(){this.initDone=!0,this.socketService.onAuthenticated.subscribe(()=>this.loadFromServer()),this.socketService.subscribeNew("onReminderUpdate",()=>O(this,null,function*(){this.loadFromServer().then()}),{emitInitial:!0}),this.loadFromServer().then(),setInterval(()=>this.refreshView(),Qt.DURATION_1MINUTE),setInterval(()=>this.loadFromServer().then(),Qt.DURATION_1MINUTE*10),this.socketService.state.subscribe(()=>this.refreshView())}loadFromServer(){return O(this,null,function*(){this.reminders=yield this.socketService.getRemindersByDate({dateString:Ie.formatNowDate(),appendRef:!0,withOldOpen:!0}),this.reminders&&(this.reminders.sort(t6.sortReminders),this.refreshView())})}startTest(){for(let i of this.remindersFiltered)t6.GetReminderColor(i)===xn.RedDark&&this.highlightReminder(i)}highlightReminder(i){return new Promise((r,s)=>{let o=document.querySelector("#reminder_"+i.id);o.style.transform="scale(3) translate(33%, 33%)",o.style.transition="transform 400ms ease-in-out",setTimeout(()=>{o.style.transform="",r()},400)})}getHtmlContent(i){let r=$('<div id="reminder_'+i.id+'"></div>');r.css(this.itemCss);let s=t6.GetReminderColor(i);s?s===xn.RedDark&&r.addClass("reminder-overdue"):s="#424242",r.css("backgroundColor",s);let o=i.reminderDateTime.dateFormat("HH:mm"),a=i.toDoByUser;i.toDoByWorkplace&&(a=Cg.getText(i.toDoByWorkplace));let l=$("<div><div>"+a+"</div><div>"+o+"</div></div>");l.css({padding:"0 3px",fontSize:"10px",width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"}),r.css(this.headerCss);let c=$("<div></div>");c.css(this.textBoxCss);let d=$("<div>"+i.description.replaceAll(`
`,"<br/>")+"</div>");return d.css(this.textCss),c.append(d),r.append(l),r.append(c),r.prop("outerHTML")}refreshView(){this.filterReminders();let i=[];for(let r of this.remindersFiltered)i.push({id:r.id,htmlContent:this.getHtmlContent(r)});this.socketService.state.getValue().authenticated?this._topBarItems.next(i):this._topBarItems.next([])}filterReminders(){let i=this.loginService.getUsername(),r=this.loginService.getWorkplace();this.reminders&&(this.remindersFiltered=this.reminders.filter(s=>{let o=s.toDoByUser===i||s.toDoByWorkplace===r,a=!s.hideIfNotOverDue||s.reminderDateTime-Qt.DURATION_1MINUTE*15<Date.now();return o&&a}))}itemClicked(i){return O(this,null,function*(){let r=this.reminders.find(s=>s.id===i);return this.reminderService.reminderClicked(r)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var j4t,$4t=Q(()=>{qge();a4();zn();Gre();I7();jc();z4t();Yc();jo();$n();gu();qU();sx();M9e();lD();k9e();Gi();uX();Zi();me();w4();Ci();yi();I9e();v9e();Kr();BA();R7();gu();cX();H4e();j4t=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d,u,m,f){super(),this.clipboardService=i,this.dialogService=r,this.socketService=s,this.topBarService=o,this.webFormSubmitService=a,this.loginService=l,this.contactService=c,this.telegramService=d,this.shortcutService=u,this.paypalCheckoutService=m,this.whatsappDialogService=f,this.priceDialogIsOpen=!1,this.currentWebFormSubmitters=[],this.whatsappFastAnswersComponentIsVisible=!1,setTimeout(()=>{},1e3),this.shortcutService.onKeyPress.subscribe(_=>{this.onKeyPress(_)})}nxtOnDestroy(){}ngOnInit(){return O(this,null,function*(){this.registerWebFormSubmits(),this.registerWhatsAppChatsPinned(),this.whatsappFastAnswersCache=yield this.socketService.getWhatsappFastAnswers(),this.whatsappImageSendCache=yield this.socketService.getDynamicData(o3.WhatsAppImageSend),zi.instance.messageFromElectron.subscribe(i=>{i.type==="setWhatsAppImage"&&this.socketService.setWhatsAppImage(i.data)}),zi.instance.addRequestListener("showAddContact",i=>{this.socketService.addContactFromWhatsApp(i)}),zi.instance.addRequestListener("processWhatsAppMessage",i=>{this.socketService.processWhatsAppMessage(i,"parseContacts")}),zi.instance.addRequestListener("onKey",i=>O(this,null,function*(){this.onKeyPress(i.key)})),zi.instance.addRequestListener("setCurrentWhatsAppContact",i=>O(this,null,function*(){this.currentWhatsAppContact=i})),zi.instance.addRequestListener("beforeWhatsAppClientMessageSent",i=>O(this,null,function*(){this.socketService.beforeWhatsAppClientMessageSent(i)})),zi.instance.addRequestListener("setCurrentWhatsAppMobile",i=>O(this,null,function*(){this.currentWhatsAppMobile=i})),zi.instance.addRequestListener("getCanceledEventsByContactId",i=>O(this,null,function*(){return(yield this.socketService.getCanceledEventsByContactId(i)).map(s=>({start:s.start,date:Ie.format(s.start,"dd.MM.yyyy"),eventId:s.id}))})),zi.instance.addRequestListener("usernameClicked",i=>{zi.instance.showIframe("usernameClicked","WhatsApp"),this.loginService.reLogin(!0)}),zi.instance.addRequestListener("calendarContextClicked",i=>{this.telegramService.sendAdmin(this.loginService.getUsername()+" hat im Kalender Rechts-Klick-Trick gestartet")}),zi.instance.addRequestListener("showWhatsAppSidebar",()=>{this.showWhatsAppSidebar()}),zi.instance.addRequestListener("translate",i=>O(this,null,function*(){if(i.to||(zi.instance.showIframe("whats-app translateToClipboard","WhatsApp"),i.to=yield this.dialogService.showSelect("In welche Sprache?",vf.languageCodes.map(r=>({text:r.name,value:r.code})),{focusInputOnInit:!0,closeOnOptionSelected:!0,okButtonText:""}),zi.instance.hideIframe("whats-app translateToClipboard")),i.to)return yield this.socketService.translate(i.text,i.to)})),zi.instance.addRequestListener("translateToClipboard",i=>O(this,null,function*(){let r=yield this.socketService.translate(i.text,i.to);return zi.instance.showIframe("whats-app translateToClipboard","WhatsApp"),yield this.dialogService.showOk(r.text),this.clipboardService.copyToClipboard(r.text),zi.instance.hideIframe("whats-app translateToClipboard"),r})),zi.instance.addRequestListener("showEvents",i=>O(this,null,function*(){zi.instance.showIframe("whats-app showEvents","WhatsApp");let r=this.dialogService.showEventsByContact(i);yield Sn(r.afterClosed()),zi.instance.hideIframe("whats-app showEvents")})),zi.instance.addRequestListener("webFormSubmitterClicked",i=>O(this,null,function*(){let r=i.firstText;i.isArtistMissingChat&&(r="Hi "+i.familyName+`!
When you will work in our shop, you will get the tattoo pictures from this number.
See you soon :)
Dear NXT-LVL.INK Team`),zi.instance.writeInWhatsAppChat(r),zi.instance.showIframe("whats-app webFormSubmitterClicked","WhatsApp"),yield this.dialogService.showOk(r),this.clipboardService.copyToClipboard(r),zi.instance.hideIframe("whats-app webFormSubmitterClicked")})),zi.instance.addRequestListener("sendToWebFormSubmitter",i=>O(this,null,function*(){this.socketService.sendWhatsAppMessage(i.mobile,i.firstText)})),zi.instance.addRequestListener("topBarItemClicked",i=>O(this,null,function*(){zi.instance.showIframe("whats-app topBarItemClicked","WhatsApp"),yield this.topBarService.itemClicked(i),zi.instance.hideIframe("whats-app topBarItemClicked")})),zi.instance.addRequestListener("topBarAddButtonClicked",i=>O(this,null,function*(){zi.instance.showIframe("whats-app topBarAddButtonClicked","WhatsApp");let r=this.dialogService.showComponentDialog(FA);r.componentInstance.newReminder(),yield Sn(r.afterClosed()),zi.instance.hideIframe("whats-app topBarAddButtonClicked")})),zi.instance.addRequestListener("webFormSubmitterDoneClicked",i=>O(this,null,function*(){zi.instance.showIframe("whats-app webFormSubmitterDoneClicked","WhatsApp"),i.isArtistMissingChat?this.socketService.updateMissingArtistWhatsAppChat(i.familyName):(yield this.dialogService.showYesNo("Du hast "+i.givenName+" angeschrieben?",{yesText:"Ja, ich habe angeschreiben",noText:"zur\xFCck"}))&&this.socketService.updateWebFormSubmit(St(ve({},i),{statusText:jF.writtenTo})),zi.instance.hideIframe("whats-app webFormSubmitterDoneClicked")})),zi.instance.addRequestListener("getUsername",()=>O(this,null,function*(){return{username:this.loginService.getUsername(),studio:this.loginService.getStudio(),color:"#FFF"}})),zi.instance.addRequestListener("getTaglinesFromUnknowns",()=>O(this,null,function*(){return yield this.socketService.getTaglinesFromUnknowns()})),zi.instance.addRequestListener("getOpenWebFormSubmits",()=>O(this,null,function*(){return yield this.socketService.getOpenWebFormSubmits()})),zi.instance.addRequestListener("showAddTaglineDialog",i=>O(this,null,function*(){return yield this.showAddTaglineDialog(i)})),zi.instance.addRequestListener("showAddTaglineUnknownDialog",i=>O(this,null,function*(){return yield this.showAddTaglineUnknownDialog(i)})),zi.instance.addRequestListener("showRemoveTaglineDialog",i=>O(this,null,function*(){return yield this.showRemoveTaglineDialog(i)})),zi.instance.addRequestListener("requestPaypalCheckout",i=>O(this,null,function*(){zi.instance.showIframe("whats-app showCreatePaypalPayment","WhatsApp");let r=yield this.paypalCheckoutService.showCreatePaypalPayment({value:null,name:i.name,mobile:i.mobile,contactId:i.contact?.id,infoInternal:i.name});zi.instance.hideIframe("whats-app showCreatePaypalPayment")})),zi.instance.addRequestListener("showWhatsAppChat",i=>O(this,null,function*(){zi.instance.showIframe("whats-app showWhatsAppChat","WhatsApp");let r=this.dialogService.showComponentFull(h3);r.componentInstance.loadChat(i),r.afterClosed().subscribe(()=>{zi.instance.hideIframe("whats-app showWhatsAppChat")})})),zi.instance.addRequestListener("showWhatsAppChatContact",i=>O(this,null,function*(){zi.instance.showIframe("whats-app showWhatsAppChat","WhatsApp"),(yield this.contactService.showWhatsAppChat(i)).afterClosed().subscribe(()=>{zi.instance.hideIframe("whats-app showWhatsAppChat")})})),zi.instance.addRequestListener("getContactsByMobile",i=>O(this,null,function*(){return yield this.socketService.getContactsByMobile(i)})),zi.instance.addRequestListener("editContact",i=>O(this,null,function*(){zi.instance.showIframe("whats-app editContact","WhatsApp");let r=yield this.getContactByWhatsAppCustomerName(i);if(r){let s=this.dialogService.showComponentDialog(DB);s.afterClosed().subscribe(()=>{zi.instance.hideIframe("whats-app editContact")}),s.componentInstance.loadFormFromObject(r)}else yield this.dialogService.showOk("Kunde nicht gefunden"),zi.instance.hideIframe("whats-app editContact")})),zi.instance.addRequestListener("editContactId",i=>O(this,null,function*(){zi.instance.showIframe("whats-app editContactId","WhatsApp");let r=yield this.socketService.getContactById(i);if(r){let s=this.dialogService.showComponentDialog(DB);s.afterClosed().subscribe(()=>{zi.instance.hideIframe("whats-app editContact")}),s.componentInstance.loadFormFromObject(r)}else yield this.dialogService.showOk("Kunde nicht gefunden"),zi.instance.hideIframe("whats-app editContactId")})),zi.instance.addRequestListener("setChatPinnedState",i=>O(this,null,function*(){let r=this.currentWhatsAppChatsPinned.find(s=>s.mobile===i.mobileWithoutPlus);zi.instance.showIframe("whats-app setChatPinnedState","WhatsApp"),yield this.whatsappDialogService.setChatPinnedState(i),zi.instance.hideIframe("whats-app showWhatsAppChat")})),zi.instance.addRequestListener("getContactInfoTemplateFn",()=>((r,s,o)=>{let a="";if(o.birthday){let c=new Date(o.birthday).setFullYear(new Date().getFullYear()),d=new Date;d.setHours(0,0,0,0),c<d.getTime()-864e6&&(c=new Date(o.birthday).setFullYear(new Date().getFullYear()+1));let u=Math.floor((c-Date.now())/1e3/60/60/24)+1;u<0&&u<-2?a=" \u{1F382} vor "+Math.abs(u)+" Tagen":u===-2?a=" \u{1F382} VORGESTERN \u{1F382}":u===-1?a=" \u{1F382} GESTERN \u{1F382}":u===0?a=" \u{1F389}\u{1F382} HEUTE \u{1F382}\u{1F389}":u===1?a=" \u{1F382} MORGEN \u{1F382}":u<=7&&(a=" \u{1F382} in "+u+" Tagen")}s=s.filter(c=>c.start>=Date.now());let l=[];return r.length>2?l.push('<div style="color:'+xn.Red+'; display: inline-block" title="'+r.map(c=>new Date(c.start).toLocaleDateString("de")).join(" \xB7 ")+'">&nbsp;&nbsp;'+r.length+"&nbsp;&nbsp;</div>"):l.push(r.map(c=>'<div style="color:'+xn.Red+'; display: inline-block">'+new Date(c.start).toLocaleDateString("de")+"</div>").join(" \xB7 ")),s.length>0&&l.push(s.map(c=>'<div style="color:green; display: inline-block">'+new Date(c.start).toLocaleDateString("de")+"</div>").join(" \xB7 ")),'<div id="event-info" style="margin-left: 8px;font-size: 12px;">'+l.join(" \xB7 ")+" "+a+"</div>"}).toString()),zi.instance.addRequestListener("getContactByWhatsAppName",i=>{let r=null;if(this.contactsWithEventsIndexed){let s=i.replace(",","").replace(/\s/g,"");r=this.contactsWithEventsIndexed[s]}return r}),zi.instance.addRequestListener("getContactListInfo",i=>{if(!this.contactsWithEventsIndexed)return"";let r=i.replace(", ","").replace(/\s/g,""),s=this.contactsWithEventsIndexed[r],o=[],a=!1,l=!1;return s&&(a=this.currentWhatsAppChatsPinned.some(c=>c.name.replace(/\s/g,"")===s.fullName.replace(/\s/g,"")+s.suffix.replace(/\s/g,"")),l=s.events.some(c=>c.start.dateFormatDate()===Ie.formatNowDate())),a||(a=this.currentWhatsAppChatsPinned.some(c=>c.mobile.replace(/\s/g,"").replace(/\+/g,"")===i.replace(/\s/g,"").replace(/\+/g,""))),a&&o.push("\u{1F4CC}"),l&&o.push("\u2B50"),o.join("");return""}),zi.instance.addRequestListener("correctGrammar",i=>O(this,null,function*(){return yield this.socketService.correctGrammar(i)})),this.socketService.registerAsApp("WhatsApp"),this.pushSocketSubscription=this.socketService.subscribeNew("getContactsWithEventsIndexed",i=>{this.contactsWithEventsIndexed=i,zi.instance.send("contactsUpdated")},{emitInitial:!0,emitAfterReconnect:!0}),setTimeout(()=>{zi.instance.send("ng-nxtlvlink-loggedIn",!0)},2e3),zi.instance.send("setUsername",{username:this.loginService.getUsername(),studio:this.loginService.getStudio(),color:"#FFF"})})}loadDialog(i){return O(this,null,function*(){if(i!=="0"){zi.instance.showIframe("whats-app loadDialog","WhatsApp"),this.editContactDialogRef=this.dialogService.showContactForm(i);let r=yield this.editContactDialogRef.afterClosed().toPromise();zi.instance.hideIframe("whats-app loadDialog")}})}showAddTaglineDialog(i){return O(this,null,function*(){zi.instance.showIframe("whats-app showAddTaglineDialog","WhatsApp");let r=yield this.dialogService.showInputWhatsApp("Info hinzuf\xFCgen",{showColorPicker:!0,prompt:"info zum Kunden erfassen"});zi.instance.hideIframe("whats-app showAddTaglineDialog");let s="";if(typeof r=="string")s=r;else{let o=`background-color:${r?.color.backgroundColor};color:${r?.color.fontColor};padding: 2px 4px; border: none; border-radius: 3px; display: inline;`;r?.text&&(s=`<button style="${o}">${r?.text}</button>`)}return s&&this.socketService.addTaglineToNxtContact({contactId:i,tagline:s}),s})}showAddTaglineUnknownDialog(i){return O(this,null,function*(){return zi.instance.showIframe("whats-app showAddTaglineUnknownDialog","WhatsApp"),yield(yield this.dialogService.showComponentDialog(B4t,{mobileNumber:i},{minWidth:"50vw"})).afterClosed().toPromise(),zi.instance.hideIframe("whats-app showAddTaglineUnknownDialog"),"hat geklappt"})}showRemoveTaglineDialog(i){return O(this,null,function*(){zi.instance.showIframe("whats-app showRemoveTaglineDialog","WhatsApp");let r=yield this.dialogService.showYesNo(i.tagline+" entfernen?");return r&&this.socketService.removeTaglineFromNxtContact(i),zi.instance.hideIframe("whats-app showRemoveTaglineDialog"),r})}showWhatsAppSidebar(){}registerWhatsAppChatsPinned(){zi.instance.addRequestListener("getWhatsAppChatsPinned",()=>O(this,null,function*(){return this.appendDateTimeStringToWhatsAppChatsPinned(),this.currentWhatsAppChatsPinned})),this.pushSocketSubscription=this.socketService.subscribeNew("getWhatsAppChatsPinned",i=>{this.currentWhatsAppChatsPinned=i,this.appendDateTimeStringToWhatsAppChatsPinned(),this.currentWhatsAppChatsPinned=i.sort(this.sortPinnedChats.bind(this)),zi.instance.send("setPinnedChats",this.currentWhatsAppChatsPinned)},{emitInitial:!0}),this.topBarService.topBarItems.subscribe(i=>{zi.instance.send("getTopBarItems",i)})}appendDateTimeStringToWhatsAppChatsPinned(){this.currentWhatsAppChatsPinned?.forEach(i=>{Ie.format(i.createdAt,"yyyy-MM-dd")===Ie.formatNow("yyyy-MM-dd")?(i.dateTimeString=Ie.format(i.createdAt,"HH:mm")+" ("+Ie.dateDiffToNowText(i.createdAt,!0)+")",i.dateTimeStringColorClass="text-color"):(i.dateTimeString=Ie.dateDiffToNowOnlyDaysText(i.createdAt)+" um "+Ie.format(i.createdAt,"HH:mm"),i.dateTimeStringColorClass="text-color-orange"),i.mustWrite&&(i.mustWrite>Date.now()?(i.mustWriteStringColorClass="text-color-green",i.mustWrite.dateFormat("yyyy-MM-dd")===Ie.formatNow("yyyy-MM-dd")?i.mustWriteString="Heute ab "+i.mustWrite.dateFormat("HH:mm")+" anschreiben":i.mustWriteString=Ie.dateDiffToNowText(i.mustWrite)+" anschreiben"):(i.mustWriteString=Ie.dateDiffToNowText(i.mustWrite)+" anschreiben",i.mustWriteStringColorClass="text-color-red")),i.remindAgainAt>Date.now()&&(i.additionalInfo="Anschreiben in<br/>"+Ie.dateDiffToNowOnlyDaysText(i.remindAgainAt))})}registerWebFormSubmits(){zi.instance.addRequestListener("getWebFormSubmitters",()=>O(this,null,function*(){return this.currentWebFormSubmitters})),this.pushSocketSubscription=this.socketService.subscribeNew("getOpenWebFormSubmits",i=>{this.setOpenWebFormSubmits(i)},{emitInitial:!0}),setInterval(()=>O(this,null,function*(){let i=yield this.socketService.getOpenWebFormSubmits();i&&this.setOpenWebFormSubmits(i)}),1e3*60*3)}getCurrentWhatsAppChatTitle(){return zi.instance.sendEval(P1.whatsApp_getCurrentChatTitle)}getContactByWhatsAppCustomerName(i){return O(this,null,function*(){return(yield this.socketService.findContactsWithEvents(i)).find(o=>(o.fullName.trim()+" "+o.suffix.trim()).trim()===i.trim())})}showWhatsappFastAnswers(){return O(this,null,function*(){if(this.whatsappFastAnswersComponentIsVisible)return;this.whatsappFastAnswersComponentIsVisible=!0,zi.instance.showIframe("onKey","WhatsApp");let i=yield this.dialogService.showComponentDialog(vS,{contact:this.currentWhatsAppContact,mobile:this.currentWhatsAppMobile});i.componentInstance.whatsappFastAnswers=this.whatsappFastAnswersCache;let r=yield Sn(i.afterClosed());return r?.whatsappFastAnswers&&(this.whatsappFastAnswersCache=r.whatsappFastAnswers),r?.text&&zi.instance.writeInWhatsAppChat(r.text),zi.instance.hideIframe("onKey"),this.whatsappFastAnswersComponentIsVisible=!1,"ok"})}showWhatsAppImageSend(){return O(this,null,function*(){if(this.whatsappFastAnswersComponentIsVisible)return;this.whatsappFastAnswersComponentIsVisible=!0,zi.instance.showIframe("onKey showWhatsAppImageSend","WhatsApp");let i=yield this.dialogService.showComponentDialog(Jre,{contact:this.currentWhatsAppContact,mobile:this.currentWhatsAppMobile});i.componentInstance.images=this.whatsappImageSendCache;let r=yield Sn(i.afterClosed());return r?.images&&(this.whatsappImageSendCache=r.images),zi.instance.hideIframe("onKey showWhatsAppImageSend"),this.whatsappFastAnswersComponentIsVisible=!1,"ok"})}sortPinnedChats(i,r){let s=i.receivedPaypalCheckout?i.createdAt+Qt.DURATION_1YEAR:i.createdAt;return(r.receivedPaypalCheckout?r.createdAt+Qt.DURATION_1YEAR:r.createdAt)-s}setOpenWebFormSubmits(i){i.forEach(r=>{r.dateTimeString=Ie.format(r.createdAt,"HH:mm"),Ie.format(r.createdAt,"yyyy-MM-dd")!==Ie.formatNow("yyyy-MM-dd")&&(r.dateTimeString='<div style="color:'+xn.Red+';">'+Ie.format(r.createdAt,"dd.MM HH:mm")+"</div>"),r.isArtistMissingChat&&(r.dateTimeString='<div style="color:'+xn.Red+';">ARTIST</div>'),r.firstText=this.webFormSubmitService.getFirstText(r),r.firstTextEmailSubject=this.webFormSubmitService.getFirstTextEmailSubject(r),r.contactVia==="Telefon"&&(r.printUrl=window.location.origin+"/web-form-submit-print/"+r.id)}),this.currentWebFormSubmitters=i.sort(Hr.sortDate("createdAt")),zi.instance.send("setWebFormSubmitters",this.currentWebFormSubmitters)}showPriceDialog(){return O(this,null,function*(){if(this.priceDialogIsOpen)return;this.priceDialogIsOpen=!0,zi.instance.showIframe("showPriceDialog","WhatsApp");let i=this.whatsappDialogService.showPriceDialog(),r=yield Sn(i.afterClosed());r&&zi.instance.writeInWhatsAppChat(r),zi.instance.hideIframe("showPriceDialog"),this.priceDialogIsOpen=!1})}onKeyPress(i){return O(this,null,function*(){if(i===Pn.F8)return this.showPriceDialog();i===Pn.F9?this.showWhatsappFastAnswers():i===Pn.CtrlShiftB?this.showWhatsappFastAnswers():i===Pn.F10?this.showWhatsAppImageSend():i===Pn.AltP&&this.showCalc()})}showCalc(){return O(this,null,function*(){zi.instance.showIframe("onKey showWhatsAppImageSend","WhatsApp");let i=this.dialogService.showComponentDialog(ese,{});yield Sn(i.afterClosed()),zi.instance.hideIframe("onKey showWhatsAppImageSend")})}};e.\u0275fac=function(r){return new(r||e)(R(ep),R(vt),R(lt),R(tse),R(zre),R(Fi),R(D5),R(p3),R(fu),R(PA),R(lX))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-extension"]],standalone:!0,features:[et,xe],decls:1,vars:0,template:function(r,s){r&1&&ee(0,"div")}});let t=e;return t})()});function yHi(t,e){if(t&1&&ee(0,"img",8),t&2){let n=w();b("src",n.logoSrc,Ur)}}function _Hi(t,e){if(t&1&&(h(0,"div",17),y(1),p()),t&2){let n=w(3);g(),ye(n.checkoutData.text)}}function CHi(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){V(n);let r=w(3);return B(r.agbOk=!0)}),y(1,"Hiermit best\xE4tige ich AGB"),p()}}function xHi(t,e){if(t&1){let n=re();h(0,"div",19)(1,"nxt-slide-toggle",20),Xe("valueChange",function(r){V(n);let s=w(3);return Ze(s.agbOk,r)||(s.agbOk=r),B(r)}),y(2,"Hiermit best\xE4tige ich"),ee(3,"br"),y(4),h(5,"a",14)(6,"strong"),y(7,"AGB"),p()()()()}if(t&2){let n=w(3);g(),qe("value",n.agbOk),g(3),Ke("die ",n.studio==="br"?"Brudis":"NXT-LVL.INK"," "),g(),b("href","https://"+n.studio+".nxt-lvl.ink/agb",Ur)}}function bHi(t,e){if(t&1&&(h(0,"div",12)(1,"div"),y(2),p(),W(3,_Hi,2,1,"div",13),h(4,"div"),y(5),Ce(6,"money"),p(),h(7,"a",14)(8,"strong"),y(9,"AGB"),p()(),W(10,CHi,2,0,"nxt-button",15)(11,xHi,8,3,"div",16),p()),t&2){let n=w(2);g(2),Ke("Hallo ",n.checkoutData.name,"!"),g(),b("ngIf",n.checkoutData.text),g(2),Ke("Betrag: ",tt(6,6,n.checkoutData.value),""),g(2),b("href","https://"+n.studio+".nxt-lvl.ink/agb",Ur),g(3),b("ngIf",!n.agbOk),g(),b("ngIf",!1)}}function wHi(t,e){t&1&&(h(0,"div",21)(1,"div"),y(2,"Vielen Dank f\xFCr deine Zahlung!"),p(),ee(3,"br"),h(4,"div"),y(5,"Du kannst diese Seite nun schlie\xDFen"),p()())}function SHi(t,e){if(t&1&&(h(0,"div",9),ee(1,"br"),W(2,bHi,12,8,"div",10)(3,wHi,6,0,"div",11),p()),t&2){let n=w();g(2),b("ngIf",n.status==="selectPaymentMethod"),g(),b("ngIf",n.status==="payed")}}var gHi,vHi,K4t,Y4t=Q(()=>{$n();Il();oo();Zi();An();ri();Vt();me();ma();L1();Vt();An();gHi=t=>({brudis:t}),vHi=(t,e)=>({height:t,visibility:e});K4t=(()=>{let e=class e{constructor(i,r,s){this.router=i,this.route=r,this.httpClient=s,this.useSandbox=!0,this.status="selectPaymentMethod",this.captureId="",this.linkId="",this.agbOk=!1,this.footerText="",this.ngConfig=window.ngConfig,this.logoSrc=""}ngOnInit(){return O(this,null,function*(){this.studio=this.route.snapshot.params.studio,this.logoSrc="/assets/logo/studio/logo_"+this.studio+"_white.svg",this.linkId=this.route.snapshot.params.id,this.checkoutData=yield this.getCheckoutData(),this.loadScript(this.checkoutData.paypalClientId),this.checkoutData||alert("nicht gefunden"),this.footerText=this.checkoutData.studioAddress})}loadScript(i){let r=document.createElement("script");r.innerHTML="",r.src="https://www.paypal.com/sdk/js?client-id="+i+"&currency=EUR",r.async=!0,r.defer=!0,document.body.appendChild(r)}waitForPaypalScript(){return O(this,null,function*(){return new Promise((i,r)=>{window.paypal?i():setTimeout(()=>{i(this.waitForPaypalScript())},100)})})}refund(){this.router.navigate(["/paypal-refund/"+this.captureId])}getCheckoutData(){return O(this,null,function*(){return window.location.origin.includes("localhost"),yield Sn(this.httpClient.get("https://"+this.studio+".nxt-lvl.ink/get-paypal-checkout-data?id="+this.linkId))})}sendCheckoutDataToServer(i){return O(this,null,function*(){if(window.location.origin.includes("localhost")){let r=yield Sn(this.httpClient.post("http://localhost:444/paypal-checkout-done",i))}else{let r=yield Sn(this.httpClient.post("https://"+this.studio+".nxt-lvl.ink/paypal-checkout-done",i))}})}ngAfterViewInit(){return O(this,null,function*(){yield this.waitForPaypalScript(),yield paypal.Buttons({createOrder:(i,r)=>r.order.create({purchase_units:[{reference_id:this.linkId,custom_id:this.linkId,description:"Tattoo-Kaution",amount:{value:this.checkoutData.value}}]}),onApprove:(i,r)=>r.order.capture().then(s=>{this.captureId=s.purchase_units[0].payments.captures[0].id,this.status="payed",this.sendCheckoutDataToServer({orderData:s,linkId:this.linkId})})}).render("#paypal-button-container")})}};e.\u0275fac=function(r){return new(r||e)(R(Ll),R(gs),R(Uc))},e.\u0275cmp=_e({type:e,selectors:[["nxt-paypal-checkout"]],standalone:!0,features:[xe],decls:11,vars:10,consts:[["fxLayout","column","fxLayoutAlign","center center",1,"nxt-page","w-full","h-100","p-0","wrapper",3,"ngClass"],["fxFlex","","fxLayout","column","fxLayoutAlign","start center",1,"o-auto","w-full",2,"scrollbar-width","10px"],["fxLayoutAlign","center","fxLayout","row",1,"logo-wrapper"],["style","width: 100%",3,"src",4,"ngIf"],["style","font-size: 120%",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center"],["id","paypal-button-container",2,"padding-top","5px",3,"ngStyle"],[1,"pb-2","footer","center"],[2,"width","100%",3,"src"],[2,"font-size","120%"],["fxLayout","column","fxLayoutGap","0.8em","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutGap","1em","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutGap","0.8em","fxLayoutAlign","center center"],["style","text-align: center",4,"ngIf"],["target","_blank",3,"href"],[3,"click",4,"ngIf"],["style","font-size: 80%",4,"ngIf"],[2,"text-align","center"],[3,"click"],[2,"font-size","80%"],[3,"valueChange","value"],["fxLayout","column","fxLayoutGap","1em","fxLayoutAlign","center center"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),W(3,yHi,1,1,"img",3),p(),W(4,SHi,4,2,"div",4),ee(5,"br")(6,"br"),h(7,"div",5),ee(8,"div",6),p()(),h(9,"div",7),y(10),p()()),r&2&&(b("ngClass",sn(5,gHi,s.studio==="br")),g(3),b("ngIf",s.logoSrc),g(),b("ngIf",s.checkoutData),g(4),b("ngStyle",bs(7,vHi,s.status!=="selectPaymentMethod"||!s.agbOk?"5px":"",s.status==="selectPaymentMethod"&&s.agbOk?"":"hidden")),g(2),ye(s.footerText))},dependencies:[At,Yt,$r,oi,qi,_s,Dn,No,rs,Ct,Lt,Nn,rr,ks],styles:["#paypal-button-container[_ngcontent-%COMP%]{text-align:center;overflow:hidden}.logo-wrapper[_ngcontent-%COMP%]{padding-top:1.7em;width:320px;max-width:60vw}.wrapper[_ngcontent-%COMP%]{z-index:0;background-image:url(/assets/images/login-background-1-darker.jpg);background-position:center;background-repeat:no-repeat;background-size:cover}.wrapper.brudis[_ngcontent-%COMP%]{background-image:none!important;background-color:#171717!important}[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px!important}.footer[_ngcontent-%COMP%]{font-size:85%}"]});let t=e;return t})()});var X6,ZU=Q(()=>{X6=(()=>{let e=class e{};e.articleGroups=[{id:"care",description:"Pflegeprodukt"},{id:"jewelry",description:"Schmuck"}],e.articlesIncoming=[{id:"after_care_creme",shortDescription:"Tattoo Pflege Creme",description:"Tattoo Pflege Creme",price:10,_:!1},{id:"after_care_creme",shortDescription:"Prontolind Spray",description:"Prontolind Spray",price:10,_:!1},{id:"after_care_creme",shortDescription:"Tattoo Pflege Creme",description:"Tattoo Pflege Creme",price:5,_:!1},{id:"after_care_creme",shortDescription:"Tattoo Pflege Creme",description:"Tattoo Pflege Creme",price:0,_:!1},{id:"piercing_jewelry",shortDescription:"Piercingschmuck",description:"Piercingschmuck",price:-1,_:!1},{id:"piercing_aftercare",shortDescription:"Piercing-Aftercare",description:"Piercing-Aftercare",price:5,_:!1},{id:"piercing_aftercare",shortDescription:"Piercing-Aftercare",description:"Piercing-Aftercare",price:0,_:!1},{id:"",shortDescription:"Sonstiges Tresor",description:"Sonstiges Tresor",price:-1,_:!0}],e._articlesOutgoingTransfer=[{id:"transfer_villa",shortDescription:"Kasse Villa",description:"Kasse Villa",price:-1,_:!1},{id:"transfer_villa_",shortDescription:"Kasse Villa _",description:"Kasse Villa _",price:-1,_:!0}],e.articlesIncomingTransfer=[{id:"bank",shortDescription:"Bank",description:"Bank",price:-1,_:!1}],e.articlesIncomingPaypal=[{id:"piercing_jewelry",shortDescription:"Piercingschmuck",description:"Piercingschmuck",price:-1,_:!1},{id:"",shortDescription:"Sonstiges",description:"Sonstiges",price:-1,_:!1}],e.articlesOutgoing=[{id:"aldi_purchase",shortDescription:"ALDI",description:"ALDI",price:-1,_:!1},{id:"killer_ink_purchase",shortDescription:"Killer Ink",description:"Killer Ink",price:-1,_:!1},{id:"rossmann_purchase",shortDescription:"Rossmann",description:"Rossmann",price:-1,_:!1},{id:"",shortDescription:"Sonstiges",description:"Sonstiges",price:-1,_:!1},{id:"beverages",shortDescription:"Getr\xE4nke Tresor",description:"Getr\xE4nke Tresor",price:-1,_:!0},{id:"",shortDescription:"Sonstiges Tresor",description:"SonstigesSafe",price:-1,_:!0}];let t=e;return t})()});function RHi(t,e){if(t&1&&(h(0,"div",12)(1,"div"),y(2,"MwSt."),p(),ee(3,"nxt-radio",2),p()),t&2){let n=w();g(3),b("nxtFormControl",n.form.controls.vat)("options",Sb(6,PHi,bn(2,MHi),bn(3,kHi),bn(4,IHi),bn(5,AHi)))}}var THi,DHi,EHi,MHi,kHi,IHi,AHi,PHi,q4t,Z4t=Q(()=>{qn();g2();ef();nc();Zi();oo();ri();Jr();s3();UA();Vt();Ah();ZU();C4();il();me();qn();yi();Vt();THi=()=>({text:"Einnahme",value:"in"}),DHi=()=>({text:"Ausgabe",value:"out"}),EHi=(t,e)=>[t,e],MHi=()=>({text:"0 %",value:0}),kHi=()=>({text:"7 %",value:7}),IHi=()=>({text:"19 %",value:19}),AHi=()=>({text:"21 %",value:21}),PHi=(t,e,n,i)=>[t,e,n,i];q4t=(()=>{let e=class e{constructor(i,r){this.formBuilder=i,this.socketService=r,this.form=new Wl({id:new Cn("",[],"ID"),name:new Cn("",[ii.requiredAndNotNaN],"Name"),articleGroup:new Cn("",[ii.hasProperty("id")],"Artikelgruppe"),vat:new Cn(null,[],"MwSt."),is_:new Cn(!1,[],"Tresor"),postingAccountNo:new Cn(null,[],"Buchungskonto"),disabled:new Cn(!1,[],"Deaktiviert"),proposalValue:new Cn(null,[],"Vorgeschlagener Betrag"),direction:new Cn("in",[],"Ein oder Ausgabe"),invoiceRequired:new Cn(!1,[],"Rechnungs-Scan")}),this.articleGroupOptions=X6.articleGroups,this.DisplayWithTools=Qh}ngOnInit(){}fillForm(i){this.form.setValue(i)}loadById(i){return O(this,null,function*(){if(this.originalArticle=yield this.socketService.getArticle(i),this.originalArticle)this.fillForm(this.originalArticle);else throw Error("article "+i+" not found")})}loadEmptyArticle(){let i={id:ua.generate(),proposalValue:null,is_:!1,vat:19,disabled:!1,postingAccountNo:"",articleGroup:"",name:"",direction:"in",invoiceRequired:!1,createdAt:Date.now(),createdBy:"",updatedAt:Date.now(),updatedBy:""};this.fillForm(i)}newArticle(){this.loadEmptyArticle()}save(){this.socketService.upsertArticle(ve(ve({},this.originalArticle),this.form.getRawValue())),console.log(this.form.value),console.log(this.form.value),console.log(this.form.value)}};e.\u0275fac=function(r){return new(r||e)(R(tT),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-article-edit"]],standalone:!0,features:[xe],decls:17,vars:19,consts:[["fxLayout","column","fxLayoutAlign","start center",1,"wrapper",2,"min-width","500px"],["fxLayout","column","fxLayoutAlign","start center",1,"w-full",3,"trigger"],["direction","row","valueKey","value",3,"nxtFormControl","options"],[3,"nxtFormControl"],[3,"options","nxtFormControl","displayInOptionWith","displayWith"],[3,"isMoney","nxtFormControl"],["fxLayout","row","fxLayoutAlign","center center","class","pb-3",4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-between center",1,"w-full"],["fxLayoutAlign","center","nxtPermission","IsJulian"],["fxLayoutAlign","center"],["fxLayout","row",1,"pt-3"],[3,"click"],["fxLayout","row","fxLayoutAlign","center center",1,"pb-3"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"nxt-smooth-height",1),ee(2,"nxt-radio",2)(3,"nxt-input",3)(4,"nxt-autocomplete",4)(5,"nxt-input",5),W(6,RHi,4,11,"div",6),h(7,"div",7)(8,"div",8),ee(9,"nxt-slide-toggle",3),p(),h(10,"div",9),ee(11,"nxt-slide-toggle",3),p(),h(12,"div",9),ee(13,"nxt-slide-toggle",3),p()(),h(14,"div",10)(15,"nxt-button",11),F("click",function(){return s.save()}),y(16,"Anlegen"),p()()()()),r&2&&(g(),b("trigger",s.form.value),g(),b("nxtFormControl",s.form.controls.direction)("options",bs(16,EHi,bn(14,THi),bn(15,DHi))),g(),b("nxtFormControl",s.form.controls.name),g(),b("options",s.articleGroupOptions)("nxtFormControl",s.form.controls.articleGroup)("displayInOptionWith",s.DisplayWithTools.displayWithDescription)("displayWith",s.DisplayWithTools.displayWithDescription),g(),b("isMoney",!0)("nxtFormControl",s.form.controls.proposalValue),g(),b("ngIf",!s.form.value.is_),g(3),b("nxtFormControl",s.form.controls.is_),g(2),b("nxtFormControl",s.form.controls.invoiceRequired),g(2),b("nxtFormControl",s.form.controls.disabled))},dependencies:[At,Yt,oi,A5,tm,Yi,Ct,Nn,Lt,Ga,Zs]});let t=e;return t})()});var X4t,Q4t=Q(()=>{me();yi();Ci();Z4t();Zi();Pa();Vt();Am();Im();Df();Pm();me();ji();X4t=(()=>{let e=class e{constructor(i){this.dialogRef=i,this.socketService=Ve(lt),this.dialogService=Ve(vt),this.columnDefs=[{headerName:"id",field:"id"},{headerName:"articleGroup",field:"articleGroup"},{headerName:"articleId",field:"articleId"},{headerName:"vat",field:"vat"},{headerName:"description",field:"description"},{headerName:"is_",field:"is_"},{headerName:"postingAccountNo",field:"postingAccountNo"},{headerName:"disabled",field:"disabled"},{headerName:"proposalValue",field:"proposalValue"},{headerName:"direction",field:"direction"},{headerName:"invoiceRequired",field:"invoiceRequired"}],this.load()}ngOnInit(){}load(){return O(this,null,function*(){this.articles=yield this.socketService.getArticles(),console.log(this.articles)})}newArticle(){this.dialogService.showComponentDialog(q4t).componentInstance.newArticle()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-articles"]],standalone:!0,features:[xe],decls:10,vars:3,consts:[[3,"dialogRef"],[3,"click"],[1,"h-full","w-full",3,"rowData","columnDefs"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"div"),y(3,"Artikel"),p(),h(4,"nxt-button",1),F("click",function(){return s.newArticle()}),y(5,"Neuer Artikel"),p()(),h(6,"nxt-page-content"),ee(7,"nxt-datagrid",2),p(),h(8,"nxt-page-footer"),y(9,"ich bin der footer"),p()()),r&2&&(g(),b("dialogRef",s.dialogRef),g(6),b("rowData",s.articles)("columnDefs",s.columnDefs))},dependencies:[At,dr,Lt,Yl,Al,Kl,Pl]});let t=e;return t})()});function FHi(t,e){if(t&1&&(h(0,"div",2),ee(1,"div",3),p()),t&2){let n=w();g(),b("innerHTML",n.infoText,Pi)}}function LHi(t,e){t&1&&(h(0,"div",10)(1,"div"),y(2,"EINGEL\xD6ST"),p()())}function OHi(t,e){if(t&1){let n=re();h(0,"div",4)(1,"div",5),W(2,LHi,3,0,"div",6),ee(3,"img",7),p(),h(4,"div",8)(5,"nxt-button",9),F("click",function(){V(n);let r=w();return B(r.download())}),y(6,"Download"),p()()()}if(t&2){let n=w();g(2),b("ngIf",n.alreadyUsed),g(),b("ngClass.lt-sm","img-mobile")("src",n.result.base64,Ur)}}var J4t,evt=Q(()=>{$n();dve();Zi();An();Vt();ri();me();ma();L1();Ci();Kr();ag();j5();Vt();An();J4t=(()=>{let e=class e{constructor(i,r,s,o,a,l,c){this.activatedRoute=i,this.httpClient=r,this.dialogService=s,this.router=o,this.loginService=a,this.storageService=l,this.downloadService=c,this.state="wait",this.alreadyUsed=!1,this.infoText="Dein pers\xF6nliches Angebot wird erstellt"}ngOnInit(){this.id=this.activatedRoute.snapshot.paramMap.get("id"),setTimeout(()=>{this.loadDiscountQr()},100)}loadDiscountQr(){return O(this,null,function*(){if(this.id){let i=this.id.split("_")[1],r=this.storageService.getByString("qr-code-"+i),s;window.location.origin.includes("localhost")?s="http://localhost:444/promoLoadDiscountQr":s=window.location.origin+"/promoLoadDiscountQr";try{let o=yield Sn(this.httpClient.post(s,{id:this.id,alreadyCode:r}));o?.error?this.infoText=o?.error:(this.result=o,this.alreadyUsed=this.result.state!==uz.Open,this.storageService.setByString("qr-code-"+i,this.result.code))}catch{this.infoText=`Es ist ein Fehler aufgetreten
Versuch es noch einmal`}}})}download(){this.downloadService.downloadBase64("NXT-LVL.INK Angebot.jpg",this.result.base64)}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(Uc),R(vt),R(Ll),R(Fi),R(vu),R(X1))},e.\u0275cmp=_e({type:e,selectors:[["nxt-event-qr"]],standalone:!0,features:[xe],decls:2,vars:2,consts:[["class","nxt-page w-full h-100","fxLayoutAlign","center center",4,"ngIf"],["class","nxt-page w-full h-100 p-0","fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["fxLayoutAlign","center center",1,"nxt-page","w-full","h-100"],[1,"text-150",2,"text-align","center",3,"innerHTML"],["fxLayout","column","fxLayoutAlign","center center",1,"nxt-page","w-full","h-100","p-0"],["fxFlex","","fxLayout","column","fxLayoutAlign","center center",1,"scrollable","w-full","h-100"],["class","already-used","fxLayoutAlign","center center",4,"ngIf"],[3,"ngClass.lt-sm","src"],["fxLayout","row","fxLayoutAlign","center center"],[3,"click"],["fxLayoutAlign","center center",1,"already-used"]],template:function(r,s){r&1&&W(0,FHi,2,1,"div",0)(1,OHi,7,3,"div",1),r&2&&(b("ngIf",!s.result),g(),b("ngIf",s.result))},dependencies:[Ct,At,Yt,oi,qi,Dn,No,Lt],styles:["[_nghost-%COMP%]{height:100%}[_nghost-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar{width:0px}.img-mobile[_ngcontent-%COMP%]{width:100%}.already-used[_ngcontent-%COMP%]{position:fixed;inset:0;color:red;font-size:150%}"]});let t=e;return t})()});function NHi(t,e){if(t&1&&(h(0,"div",6),y(1),Ce(2,"duration"),p()),t&2){let n=w(3);g(),ye(Nt(2,1,n.restTime,"mm:ss"))}}function VHi(t,e){if(t&1&&(h(0,"div",7),y(1),Ce(2,"duration"),p()),t&2){let n=w(3);g(),ye(Nt(2,1,n.restTime,"mm:ss"))}}function BHi(t,e){if(t&1&&(h(0,"div",1)(1,"div",3),y(2),p(),W(3,NHi,3,4,"div",4)(4,VHi,3,4,"div",5),p()),t&2){let n=w(2);g(2),ye(n.result.artist),g(),b("ngIf",!n.showTime),g(),b("ngIf",n.showTime)}}function zHi(t,e){t&1&&(h(0,"div",8)(1,"div",9),y(2,"NO PHOTOS!"),p()())}function HHi(t,e){if(t&1&&(h(0,"div",1),W(1,BHi,5,3,"div",0)(2,zHi,3,0,"div",2),p()),t&2){let n=w();g(),b("ngIf",n.isInTime),g(),b("ngIf",!n.isInTime)}}var tvt,ivt=Q(()=>{Gi();jo();Lv();Vt();ri();me();yi();Vt();tvt=(()=>{let e=class e extends bt{constructor(i){super(),this.socketService=i,this.isInTime=!1,this.restTime=0,this.showTime=!1,this.startInterval()}ngOnInit(){this.load(),this.socketService.state.subscribe(i=>O(this,null,function*(){i.authenticated&&(this.result=yield this.socketService.getCurrentArtistPhoto("iPhone 12 Pro Max"),this.calc())}))}load(){return O(this,null,function*(){this.result=yield this.socketService.getCurrentArtistPhoto("iPhone 12 Pro Max"),this.calc(),this.pushSocketSubscription=this.socketService.subscribeNew("getCurrentArtistPhoto",i=>{this.result=i,this.calc()},{emitInitial:!0})})}calc(){this.result&&(this.restTime=this.result.createdAt+Qt.DURATION_1MINUTE*this.result.artistPhotoTimeDurationMin-Date.now(),this.isInTime=this.restTime>0,this.showTime=this.restTime<Qt.DURATION_1MINUTE*5)}startInterval(){setInterval(()=>this.calc(),1e3)}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-current-artist-photo-component"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center"],["fxLayout","column",4,"ngIf"],[1,"artist-name"],["class","time-left-small",4,"ngIf"],["class","time-left",4,"ngIf"],[1,"time-left-small"],[1,"time-left"],["fxLayout","column"],[1,"no-photo"]],template:function(r,s){r&1&&W(0,HHi,3,2,"div",0),r&2&&b("ngIf",s.result)},dependencies:[Ct,At,Yt,oi,lf],styles:["[_nghost-%COMP%]{color:#9f9f9f;display:flex;height:100%;width:100%;justify-content:center;align-items:center;background-image:url(/assets/images/login-background-1.jpg);background-position:center;background-repeat:no-repeat;background-size:cover;background-color:#00000080;background-blend-mode:darken}[_nghost-%COMP%]   .artist-name[_ngcontent-%COMP%]{font-size:1200%;color:#fff}[_nghost-%COMP%]   .time-left[_ngcontent-%COMP%]{font-size:500%;color:#fff}[_nghost-%COMP%]   .time-left-small[_ngcontent-%COMP%]{font-size:200%;color:#fff}[_nghost-%COMP%]   .no-photo[_ngcontent-%COMP%]{font-size:1200%;color:#fff}"]});let t=e;return t})()});var GHi,nvt,rvt=Q(()=>{Ld();me();yi();Kr();GHi=["codeSpan"],nvt=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.loginService=r,this.isRunning=!1}ngOnInit(){return O(this,null,function*(){this.isRunning=!0,this.run(),this.setFullScreen()})}setFullScreen(i=document.body){try{let r=i.requestFullscreen||i.webkitRequestFullScreen||i.mozRequestFullscreen||i.msRequestFullscreen;r&&r.call(i)}catch(r){Gn.error("ScreenService.setFullScreen failed",r)}}run(){return O(this,null,function*(){let i=2e3;try{Gn.info("start getCode");let{code:r,interval:s}=yield this.socketService.getCode();i=s,Gn.info("code: "+r+" interval: "+s),this.codeSpan.nativeElement.innerText=r.toUpperCase()}catch{}this.isRunning&&setTimeout(()=>this.run(),i)})}ngOnDestroy(){this.isRunning=!1}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-draw"]],viewQuery:function(r,s){if(r&1&&ei(GHi,7),r&2){let o;Pt(o=Rt())&&(s.codeSpan=o.first)}},standalone:!0,features:[xe],decls:8,vars:0,consts:[["codeSpan",""],[1,"wrapper"],["src","assets/logo.svg"],[1,"wrapper-text",3,"dblclick"],[2,"position","relative","left","2%"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div"),ee(2,"img",2),p()(),h(3,"div",3),F("dblclick",function(){return V(o),B(s.setFullScreen())}),h(4,"div",4)(5,"span",null,0),y(7,"3BJHD32"),p()()()}},styles:[".wrapper[_ngcontent-%COMP%]{background-color:#2a2a2a;position:fixed;inset:0}.wrapper[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]{position:fixed;inset:0}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.wrapper-text[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-family:Open Sans;font-size:15vw;color:#fff;font-weight:700;position:relative;letter-spacing:5vw;top:-10px}"]});let t=e;return t})()});function WHi(t,e){if(t&1){let n=re();h(0,"div",8),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.setWidth(r))}),y(1),p()}if(t&2){let n=e.$implicit;g(),Ke("\xA0",n,"\xA0")}}function UHi(t,e){if(t&1){let n=re();h(0,"div",8),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.setHeight(r))}),y(1),p()}if(t&2){let n=e.$implicit;g(),Ke("\xA0",n,"\xA0")}}function jHi(t,e){if(t&1&&(h(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div"),y(6),p()(),h(7,"div",1),W(8,WHi,2,1,"div",6),p()(),h(9,"div",4)(10,"div",5)(11,"div"),y(12),p()(),h(13,"div",1),W(14,UHi,2,1,"div",6),p()()(),h(15,"div",1)(16,"nxt-button"),y(17,"Benutzen"),p()()(),h(18,"div"),ee(19,"img",7),Ce(20,"safeResourceUrl"),p()()),t&2){let n=w();g(6),Ke("Breite: ",n.width?n.width:"?","cm"),g(2),b("ngForOf",n.widthSteps),g(4),Ke("H\xF6he: ",n.height?n.height:"?","cm"),g(2),b("ngForOf",n.heightSteps),g(5),b("src",tt(20,5,"data:"+n.fullImage.mimeType+";base64,"+n.fullImage.base64),Ur)}}var svt,ovt=Q(()=>{Gi();sA();Zi();Vt();ri();me();yi();Vt();svt=(()=>{let e=class e extends bt{constructor(i){super(),this.socketService=i,this.widthSteps=[1,2,3,4,5,6,7,8,9,10,12,15,20,25,30],this.heightSteps=[1,2,3,4,5,6,7,8,9,10,12,15,20,25,30]}ngOnInit(){return O(this,null,function*(){this.fullImage=yield this.socketService.getGoogleDriveFile(this.photo.id),setTimeout(()=>{},200)})}nxtOnDestroy(){}setWidth(i){this.width=i}setHeight(i){this.height=i}};e.\u0275fac=function(r){return new(r||e)(R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-price-builder-photo-viewer"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["fxLayout","row",4,"ngIf"],["fxLayout","row"],["fxLayout","column",1,"h-100"],["fxFlex","","fxLayout","column","fxLayoutGap","10px"],["fxLayout","column"],[2,"text-align","center"],["class","mouse-pointer",3,"click",4,"ngFor","ngForOf"],["id","img",1,"img",3,"src"],[1,"mouse-pointer",3,"click"]],template:function(r,s){r&1&&W(0,jHi,21,7,"div",0),r&2&&b("ngIf",s.fullImage)},dependencies:[Ct,At,Yt,$r,qi,Hi,Lt,h5],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]   .img[_ngcontent-%COMP%]{max-height:90vh;max-width:90vw}"]});let t=e;return t})()});function $Hi(t,e){if(t&1){let n=re();h(0,"div")(1,"div",11),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.photoClicked(r))}),ee(2,"img",12),p()()}if(t&2){let n=e.$implicit;g(2),b("src","data:image/jpeg;base64,"+n.base64,Ur)}}function KHi(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),ee(2,"div",3),Ce(3,"safeHtml"),p(),h(4,"div",4)(5,"div",5)(6,"div",6),W(7,$Hi,3,1,"div",7),p()()(),h(8,"div",8)(9,"nxt-button-icon",9),F("click",function(){V(n);let r=w();return B(r.prev())}),y(10,"arrow_back_ios_new"),p(),h(11,"div",10),y(12,"\xA0"),p(),h(13,"nxt-button-icon",9),F("click",function(){V(n);let r=w();return B(r.next())}),y(14,"arrow_forward_ios"),p()()()}if(t&2){let n=w();g(2),b("innerHTML",tt(3,4,n.title),Pi),g(5),b("ngForOf",n.data.photos),g(2),b("size",40),g(4),b("size",40)}}var avt,lvt=Q(()=>{Gi();ovt();ha();ls();Vt();ri();me();yi();z1();Ci();Vt();avt=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.socketService=i,this.bodyPutService=r,this.dialogService=s,this.imgSrc="",this.photosStack=[],this.currentIndex=-1,this.nextIsRunning=!1,this.title="hallo"}ngOnInit(){this.next()}loadNewPhotos(){return O(this,null,function*(){let i=yield this.socketService.getPriceBuilderRandomPrePhotos();this.photosStack.push(i),this.shrinkStack()})}nxtOnDestroy(){}prev(){this.currentIndex>0&&(this.currentIndex--,this.setCurrentIndex())}next(){return O(this,null,function*(){this.nextIsRunning||(this.nextIsRunning=!0,this.currentIndex++,this.currentIndex>this.photosStack.length-1&&(yield this.loadNewPhotos()),this.setCurrentIndex(),this.nextIsRunning=!1)})}shrinkStack(){if(this.photosStack.length>10){let i=this.photosStack.length-10;this.photosStack.splice(0,i),this.currentIndex-=i,this.setCurrentIndex()}}setCurrentIndex(){this.data=this.photosStack[this.currentIndex],this.setInfo()}setInfo(){let i=[];this.title="";for(let r of this.data.event.bodyPuts.tattoo)i.push(r.motive+" auf "+this.bodyPutService.getGermanPath(r.bodyPut));this.title=i.join(`
`)+`
`+this.data.event.paymentSum.toMoneyString()}photoClicked(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(svt);r.componentInstance.data=this.data,r.componentInstance.photo=i})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Oc),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-price-builder-pre-image"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["class","nxt-page w-full h-100","fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center",1,"nxt-page","w-full","h-100"],["fxLayout","row","fxLayoutAlign","center center"],["fxLayoutAlign","center center",1,"text-150","py-4",2,"text-align","center",3,"innerHTML"],["fxFlex","","fxLayout","row","fxLayoutAlign","center center",1,"w-full","o-hidden"],["fxLayout","column","fxLayoutAlign","start center",1,"scrollable","max-h-100"],["fxLayout","column","fxLayoutAlign","center center","fxLayout","row wrap"],[4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center",1,"p-4"],[3,"click","size"],[2,"width","200px"],[1,"img-wrapper","mouse-pointer",3,"click"],[1,"preview-image",3,"src"]],template:function(r,s){r&1&&W(0,KHi,15,6,"div",0),r&2&&b("ngIf",s.data)},dependencies:[Ct,At,Yt,oi,qi,Hi,an,Or],styles:["[_nghost-%COMP%]   .img-wrapper[_ngcontent-%COMP%]{padding:8px}[_nghost-%COMP%]   .preview-image[_ngcontent-%COMP%]{width:240px}"]});let t=e;return t})()});var cvt,dvt=Q(()=>{Vt();me();Vt();cvt=(()=>{let e=class e{constructor(){this.logoSrc="/assets/logo/studio/logo_ac_white.svg",this.ngConfig=window.ngConfig,this.footerText=this.ngConfig.invoiceData.fromCompany+" - "+this.ngConfig.invoiceData.fromStreet+" - "+this.ngConfig.invoiceData.fromPostalCode+" "+this.ngConfig.invoiceData.fromCity+" "}ngOnInit(){return O(this,null,function*(){})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-to-whatsapp"]],standalone:!0,features:[xe],decls:15,vars:1,consts:[[1,"nxt-page","w-full","h-100","p-0","wrapper"],["fxFlex","",1,"content"],[1,"logo-wrapper"],["src","/src/assets/logo/studio/logo_ac_white_old.svg",2,"width","100%"],["fxLayout","column",2,"font-size","40px","padding-top","50px"],["fxLayout","row","fxLayoutAlign","center center",2,"background-color","#3c3b3f77","border-radius","5px","padding","12px 12px"],[1,"img-wrapper"],["src","/assets/icons/whatsapp.png",2,"height","50px"],[2,"color","#fff","padding","8px"],["href","https://wa.me/4917645663664","target","_blank"],[1,"pb-2","footer"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),ee(3,"img",3),p(),h(4,"div",4)(5,"div",5)(6,"div",6),ee(7,"img",7),p(),h(8,"div",8)(9,"a",9),y(10,"AACHEN"),p()()()(),ee(11,"br")(12,"br"),p(),h(13,"div",10),y(14),p()()),r&2&&(g(14),ye(s.footerText))},dependencies:[At,Yt,oi,qi],styles:["#paypal-button-container[_ngcontent-%COMP%]{text-align:center;width:80vw;overflow:hidden}.wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:0;background-image:url(/assets/images/login-background-1-darker.jpg);background-position:center;background-repeat:no-repeat;background-size:cover}.wrapper[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{overflow:auto;width:100%;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;scrollbar-width:10px}.wrapper[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .logo-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;padding-top:1.7em;width:320px;max-width:60vw}[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px!important}.footer[_ngcontent-%COMP%]{font-size:85%}.img-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}"]});let t=e;return t})()});var ise,$0,YF,A9e=Q(()=>{zn();iZ();Rv();jo();ise=function(t){return t.CustomerStencilSeenMessage="CustomerStencilSeenMessage",t.AfterCareInstructionSentMessage="AfterCareInstructionSentMessage",t.AppointmentReminder="AppointmentReminder",t}(ise||{}),$0=class $0{static generateReminderText(e,n,i,r,s){let o=n.customerObj?.givenName??"",a=Ie.format(n.start,"dd.MM.yyyy"),l=Ie.format(n.start,"HH:mm")+" bis ca. "+Ie.format(n.end,"HH:mm"),c=Ie.format(n.start,"EEEE, dd.MM.yyyy HH:mm")+" bis ca. "+Ie.format(n.end,"HH:mm"),d=i.addressOneLine;return i.googleMapsLink&&(d+=" "+i.googleMapsLink),n.workType==="tattoo"?(e=e.replace("{{einverst\xE4ndniserkl\xE4rung_link}}",i.acceptanceLinkTattoo),e=e.replace("{{aftercare_link}}","https://aftercare.nxt-lvl.ink/"+r+"/tattoo-"+s+".pdf")):n.workType==="piercing"&&(e=e.replace("{{einverst\xE4ndniserkl\xE4rung_link}}",i.acceptanceLinkPiercing),e=e.replace("{{aftercare_link}}","https://aftercare.nxt-lvl.ink/"+r+"/piercing-"+s+".pdf")),e=e.replace("{{uhr_icon}}",rD.getClock(n.start)),e=e.replace(/{{kunde_name}}/g,o),e=e.replace(/{{termin_datum}}/g,a),e=e.replace(/{{termin_uhrzeit}}/g,l),e=e.replace(/{{studio_adresse}}/g,d),e=e.replace(/{{einverständniserklärung_link}}/g,d),e=e.replace(/{{datum_uhrzeit}}/g,c),e}};$0.variables={whatsAppMessageId:{name:"whatsapp-message-id"}},$0.placeholders={customerGivenNameFromEvent:{placeholder:"customer-given-name",refObjField:"customerObj.givenName",refObj:"event"},customerGivenNameFromContact:{placeholder:"customer-given-name",refObjField:"givenName",refObj:"contact"},startDateFromEvent:{placeholder:"appointment-start-date",refObjField:"startDate",refObj:"event",valueFormat:(e,n)=>new Date(e).toLocaleDateString(n)},startTimeFromEvent:{placeholder:"appointment-start-date",refObjField:"startTime",refObj:"event",valueFormat:(e,n)=>e.dateFormat("HH:mm")},studioAddressOneLine:{placeholder:"studio-address-one-line",refObj:"ngConfigStudio",refObjField:"addressOneLine"}},$0.blockConfigs={orSkill:{placeholder:"skills-or",description:"",refObj:"event",fn:(e,n)=>O($0,null,function*(){let i=Vu.getSkillsCombined(n);for(let r of e.split(","))if(i.includes(r.trim()))return!0;return!1})},timeBetween:{placeholder:"time-now-between",description:"",refObj:"datetimeNow",fn:(e,n)=>O($0,null,function*(){let[i,r]=e.split(",");i.includes(":")||(i+=":00"),r.includes(":")||(r+=":00");let s=Qt.parse(i.trim()),o=Qt.parse(r.trim()),a=n-n.clearTime();return a>=s&&a<o})}},$0.TextTemplateDefs=[{type:ise.CustomerStencilSeenMessage,description:"Wird an den Kunden verschickt, sobald der Stencil gesehen wurde",availablePlaceholders:[$0.placeholders.customerGivenNameFromEvent],availableBlockConfigs:[$0.blockConfigs.orSkill],availableVariables:[]},{type:ise.AfterCareInstructionSentMessage,description:"Wird an den Kunden verschickt, nach dem die Pflegehinweise geschickt wurden",availablePlaceholders:[$0.placeholders.customerGivenNameFromContact],availableVariables:[$0.variables.whatsAppMessageId],availableBlockConfigs:[$0.blockConfigs.timeBetween]},{type:ise.AppointmentReminder,description:"Wird ein Tag vor dem Termin an den Kunden geschickt",availablePlaceholders:[$0.placeholders.customerGivenNameFromContact,$0.placeholders.startDateFromEvent,$0.placeholders.startTimeFromEvent,$0.placeholders.studioAddressOneLine],availableVariables:[],availableBlockConfigs:[]}];YF=$0});function qHi(t,e){if(t&1){let n=re();h(0,"div",14)(1,"mat-icon",15),F("click",function(){let r=V(n).$implicit,s=w(4);return B(s.toClipboard("{{"+r.placeholder+"}}"))}),y(2,"content_copy"),p(),y(3," \xA0 "),h(4,"div"),y(5),p()()}if(t&2){let n=e.$implicit;g(5),ye("{{"+n.placeholder+"}}")}}function ZHi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"M\xF6gliche Platzhalter:"),p(),h(3,"td")(4,"div",12),W(5,qHi,6,1,"div",13),p()()()),t&2){let n=w(3);g(5),b("ngForOf",n.textTemplateDef.availablePlaceholders)}}function XHi(t,e){t&1&&ee(0,"tr",16)}function QHi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=e.$implicit;g(),cn(" ","{{"+n.placeholder+"-start:Wert1,Wert2 }}"," ... ","{{"+n.placeholder+"-end }}"," ")}}function JHi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"M\xF6gliche Bl\xF6cke:"),p(),h(3,"td")(4,"div",12),W(5,QHi,2,2,"div",17),p()()()),t&2){let n=w(3);g(5),b("ngForOf",n.textTemplateDef.availableBlockConfigs)}}function eGi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=e.$implicit;g(),Ke(" ","["+n.name+":Wert1,Wert2]"," ")}}function tGi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"M\xF6gliche Variable:"),p(),h(3,"td")(4,"div",12),W(5,eGi,2,1,"div",17),p()()()),t&2){let n=w(3);g(5),b("ngForOf",n.textTemplateDef.availableVariables)}}function iGi(t,e){if(t&1&&(h(0,"table"),W(1,ZHi,6,1,"tr",4)(2,XHi,1,0,"tr",11)(3,JHi,6,1,"tr",4)(4,tGi,6,1,"tr",4),p()),t&2){let n=w(2);g(),b("ngIf",n.textTemplateDef.availablePlaceholders),g(),b("ngIf",n.textTemplateDef.availablePlaceholders&&n.textTemplateDef.availableBlockConfigs),g(),b("ngIf",n.textTemplateDef.availableBlockConfigs),g(),b("ngIf",n.textTemplateDef.availableVariables)}}function nGi(t,e){if(t&1){let n=re();h(0,"nxt-button",9),F("click",function(){V(n);let r=w().index,s=w(2);return B(s.delete(r))}),y(1,"L\xF6schen"),p()}}function rGi(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",18)(2,"div",19)(3,"nxt-autocomplete",20),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.lang,r)||(s.lang=r),B(r)}),p(),h(4,"nxt-slide-toggle",21),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.disabled,r)||(s.disabled=r),B(r)}),y(5,"Deaktiviert"),p(),h(6,"div",22),W(7,nGi,2,0,"nxt-button",23),p()(),h(8,"nxt-textarea",24),Xe("valueChange",function(r){let s=V(n).$implicit;return Ze(s.text,r)||(s.text=r),B(r)}),p()()()}if(t&2){let n=e.$implicit,i=e.index,r=w(2);g(3),b("options",r.langs)("displayWith",r.displayWith)("displayInOptionWith",r.displayWith)("maxOptionsToShow",999),qe("value",n.lang),b("filterFields",bn(12,YHi))("bottomNoPadding",!0),g(),qe("value",n.disabled),g(3),b("ngIf",i>0),g(),qe("value",n.text),b("rows",10)("spellcheck",!1)}}function sGi(t,e){t&1&&(h(0,"div"),y(1,"Noch kein Text hinterlegt"),p())}function oGi(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),y(2),p(),h(3,"div",3),W(4,iGi,5,4,"table",4),p(),h(5,"div",5)(6,"div",6),W(7,rGi,9,13,"div",7),p()(),W(8,sGi,2,0,"div",4),h(9,"div",8)(10,"nxt-button",9),F("click",function(){V(n);let r=w();return B(r.close())}),y(11,"Abbrechen"),p(),h(12,"nxt-button",9),F("click",function(){V(n);let r=w();return B(r.addTextTemplate())}),y(13,"neuer Text"),p(),h(14,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.importFromAc())}),y(15,"Aus Aachen importieren"),p(),h(16,"nxt-button",9),F("click",function(){V(n);let r=w();return B(r.save())}),y(17,"Speichern"),p()()()}if(t&2){let n=w();g(2),ye(n.textTemplateDef.description),g(2),b("ngIf",n.textTemplateDef.availablePlaceholders||n.textTemplateDef.availableBlockConfigs),g(3),b("ngForOf",n.textTemplates),g(),b("ngIf",n.textTemplates&&n.textTemplates.length===0)}}var YHi,uvt,hvt=Q(()=>{Gi();A9e();sx();C4();il();n1();Zi();oo();Ah();Ja();Vt();ri();me();ji();yi();Ci();ug();Vt();YHi=()=>["text"];uvt=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.clipboard=o,this.displayWith=Qh.displayWithText,this.langs=vf.languageCodes.map(a=>({text:a.name,value:a.code}))}ngOnInit(){this.textTemplateDef=YF.TextTemplateDefs.find(i=>i.type===this.type)}nxtOnDestroy(){}load(i){return O(this,null,function*(){this.type=i,this.textTemplates=yield this.socketService.getTextTemplatesByType(i)})}addTextTemplate(){this.textTemplates.push({type:this.type,id:"",lang:"",text:""})}save(){return O(this,null,function*(){if(this.textTemplates.some(i=>!i.lang)){this.dialogService.showOk("Sprache fehlt");return}if(this.textTemplates.some(i=>!i.text)){this.dialogService.showOk("Text fehlt");return}yield this.socketService.updateAllTextTemplateTypes(this.type,this.textTemplates),this.dialogRef.close()})}close(){this.dialogRef.close()}delete(i){this.textTemplates.splice(i,1)}importFromAc(){return O(this,null,function*(){let i=yield this.socketService.getTextTemplatesFromAc(this.type),r=[],s=[];for(let o of i)this.textTemplates.find(a=>a.id===o.id&&a.text)?r.push(o):s.push(o);r.length>0&&this.dialogService.showOk(r.map(o=>vf.getTextByCode(o.lang)).join(", ")+" wird nicht \xFCberschrieben");for(let o of s){let a=this.textTemplates.find(l=>l.id===o.id);a?a.text=o.text:this.textTemplates.push(o)}})}toClipboard(i){this.clipboard.copy(i)}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt),R(_u))},e.\u0275cmp=_e({type:e,selectors:[["nxt-text-template-edit"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["fxLayout","column",4,"ngIf"],["fxLayout","column"],["fxLayout","row",1,"text-140","pb-4"],["fxLayout","row",1,"pb-3"],[4,"ngIf"],["fxLayout","column",2,"overflow","hidden"],["fxLayout","column",2,"overflow","auto"],["fxLayout","column",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","space-around",1,"w-full","pt-4"],[3,"click"],["nxtPermission","IsNotAc",3,"click"],["style","height: 15px;",4,"ngIf"],["fxLayout","column",1,"pl-4","consolas"],["class","flex flex-row items-center",4,"ngFor","ngForOf"],[1,"flex","flex-row","items-center"],[1,"text-[18px]","!w-[18px]","!h-[18px]","cursor-pointer",3,"click"],[2,"height","15px"],[4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center center"],["fxLayout","column","fxLayoutAlign","center center"],["placeholder","Sprache","valueField","value",2,"width","182px",3,"valueChange","options","displayWith","displayInOptionWith","maxOptionsToShow","value","filterFields","bottomNoPadding"],[3,"valueChange","value"],[1,"pt-3"],[3,"click",4,"ngIf"],[2,"width","50vw",3,"valueChange","value","rows","spellcheck"]],template:function(r,s){r&1&&W(0,oGi,18,4,"div",0),r&2&&b("ngIf",s.textTemplateDef)},dependencies:[Ct,At,Yt,oi,Hi,Zr,Ga,Nn,Lt,yu,Zs],styles:["[_nghost-%COMP%]{display:flex;height:100%}[_nghost-%COMP%]     textarea{font-size:70%;font-family:Consolas,serif}"]});let t=e;return t})()});function aGi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",8),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}function lGi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td",9),F("click",function(){let r=V(n).$implicit,s=w();return B(s.edit(r))}),h(2,"div",10)(3,"nxt-button-icon"),y(4,"edit"),p()()(),h(5,"td",6),y(6),p(),h(7,"td"),y(8),p()()}if(t&2){let n=e.$implicit;g(6),ye(n.type),g(2),ye(n.description)}}var nse,P9e=Q(()=>{Gi();A9e();hvt();il();ls();ri();Vt();me();ji();yi();Ci();Vt();nse=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.textTemplateDefs=YF.TextTemplateDefs,this.load()}ngOnInit(){}nxtOnDestroy(){}load(){return O(this,null,function*(){})}edit(i){return O(this,null,function*(){this.dialogService.showComponentDialog(uvt).componentInstance.load(i.type)})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-text-templates"]],standalone:!0,features:[et,xe],decls:14,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start",1,"nxt-page"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],[1,"ml-2","text-120"],[3,"click",4,"ngIf"],["fxLayout","row",1,"w-full"],[1,"w-full","nxt-table-new"],["nxtPermission","IsJulian"],[4,"ngFor","ngForOf"],[3,"click"],[2,"text-align","center",3,"click"],["fxLayoutAlign","center center"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),y(3,"Textvorlagen"),p(),W(4,aGi,2,0,"nxt-button-icon",3),p(),h(5,"div",4)(6,"table",5)(7,"tr"),ee(8,"th"),h(9,"th",6),y(10,"ID"),p(),h(11,"th"),y(12,"Beschreibung"),p()(),W(13,lGi,9,2,"tr",7),p()()()),r&2&&(g(4),b("ngIf",s.dialogRef),g(9),b("ngForOf",s.textTemplateDefs))},dependencies:[At,Yt,oi,Ct,an,Zs,Hi]});let t=e;return t})()});var cGi,rse,R9e=Q(()=>{Gi();ED();Qo();ls();oo();Vt();me();yi();z1();Cs();Gw();ji();Vt();cGi=()=>["update","create"],rse=(()=>{let e=class e extends bt{constructor(i,r,s,o,a){super(),this.socketService=i,this.bodyPutService=r,this.configService=s,this.inventoryService=o,this.dialogRef=a,this.propDefs=[{field:"name",name:"Name",type:Ee.Text},{field:"amountAlarm",name:"Alarm-Bestand",type:Ee.Text},{field:"amountFull",name:"Soll-Bestand",type:Ee.Text},{field:"amountPerPackage",name:"Menge pro Packung",type:Ee.Text},{field:"unitOfMeasure",name:"Mengeneinheit",type:Ee.Text},{field:"deleted",name:"Gel\xF6scht",type:Ee.Text,deleteInCompareData:l=>!l.value},{field:"nameBySource",name:"Bezeichnung bei Bezugsquelle",type:Ee.Text},{field:"nameEn",name:"Bezeichnung engl.",type:Ee.Text},{field:"orderedByAc",name:"Aachen bestellt",type:Ee.Boolean},{field:"location",name:"Ort",type:Ee.Text},{field:"responsibility",name:"Zust\xE4ndig",type:Ee.Text},{field:"responsibility2",name:"Zust\xE4ndig Vertretung",type:Ee.Text},{field:"sourceOfSupply",name:"1. Bezugsquelle",type:Ee.Text,deleteInCompareData:l=>!l.value,valueGetter:l=>this.inventoryService.getSourceText(l)},{field:"sourceOfSupplyUrl",name:"1. Bezugsquelle Link",type:Ee.Text,deleteInCompareData:l=>!l.value},{field:"sourceOfSupply2",name:"2. Bezugsquelle",type:Ee.Text,deleteInCompareData:l=>!l.value,valueGetter:l=>this.inventoryService.getSourceText(l)},{field:"sourceOfSupply2Url",name:"2. Bezugsquelle Link",type:Ee.Text,deleteInCompareData:l=>!l.value},{field:"xxx",name:"xxx",type:Ee.Text},{field:"xxx",name:"xxx",type:Ee.Text},{field:"xxx",name:"xxx",type:Ee.Text}],this.hiddenProps=["studioValues","studiosAmounts"],this.debugProps=["id","orderValue","nfcId"],this.showTitle=!1,this.showDebug=!1,this.id="",this.hiddenProps.push(...this.debugProps)}ngOnInit(){}nxtOnDestroy(){}filterItem(i){return i.user!=="Media-Count-Fix"}prepareRawData(i){return i}showDebugChanged(){this.hiddenProps=this.hiddenProps.filter(i=>!this.debugProps.includes(i)),this.showDebug||this.hiddenProps.push(...this.debugProps),this.historyComponent.load()}getCustomer(i){return O(this,null,function*(){return(yield this.socketService.getContactById(i))?.fullName})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Oc),R(Xi),R(z3),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-inventory-item-history"]],viewQuery:function(r,s){if(r&1&&ei($1,5),r&2){let o;Pt(o=Rt())&&(s.historyComponent=o.first)}},standalone:!0,features:[et,xe],decls:9,vars:8,consts:[["historyComponent",""],["fxLayout","column",1,"nxt-page","w-full","h-100"],["fxLayout","row","fxLayoutAlign","space-between center"],[3,"valueChange","value"],[3,"click"],["table","inventory-items",1,"w-full","h-100",3,"id","actions","propDefs","prepareRawData","filterItem","hiddenProps"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"div")(3,"nxt-slide-toggle",3),Xe("valueChange",function(l){return V(o),Ze(s.showDebug,l)||(s.showDebug=l),B(l)}),F("valueChange",function(){return V(o),B(s.showDebugChanged())}),y(4,"Julian"),p()(),h(5,"nxt-button-icon",4),F("click",function(){return V(o),B(s.dialogRef.close())}),y(6,"close"),p()(),ee(7,"nxt-history",5,0),p()}r&2&&(g(3),qe("value",s.showDebug),g(4),b("id",s.id)("actions",bn(7,cGi))("propDefs",s.propDefs)("prepareRawData",s.prepareRawData)("filterItem",s.filterItem)("hiddenProps",s.hiddenProps))},dependencies:[At,Yt,oi,Nn,an,$1]});let t=e;return t})()});function dGi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td",8)(2,"label",9),F("click",function(){let r=V(n).$implicit,s=w();return r.checked=!r.checked,B(s.checkChanged())}),y(3),p()(),h(4,"td",10)(5,"mat-slide-toggle",11),Xe("ngModelChange",function(r){let s=V(n).$implicit;return Ze(s.checked,r)||(s.checked=r),B(r)}),F("ngModelChange",function(){V(n);let r=w();return B(r.checkChanged())}),p()()()}if(t&2){let n=e.$implicit;g(3),Ke(" ",n.name," "),g(2),qe("ngModel",n.checked)}}var FM,F9e=Q(()=>{Zi();qn();oY();ri();Vt();me();ji();Vt();qn();FM=(()=>{let e=class e{constructor(i){this.dialogRef=i,this.allCheckedToFinish=!1,this.allItemsChecked=!1}checkChanged(){this.allItemsChecked=!this.checkItems.some(i=>!i.checked)}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-check-list"]],inputs:{title:"title",checkItems:"checkItems",allCheckedToFinish:"allCheckedToFinish"},standalone:!0,features:[xe],decls:11,vars:5,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutGap","3em","fxLayoutAlign","center"],["fxFlex","","fxLayout","row","fxFlex",""],["fxFlex","","fxLayout","column"],[1,"w-full"],[4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center"],[3,"click","disabled"],["fxFlex",""],[1,"mouse-pointer",3,"click"],["fxLayoutAlign","end"],["color","primary","labelPosition","before",3,"ngModelChange","ngModel"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"h3"),y(3),p()(),h(4,"div",2)(5,"div",3)(6,"table",4),W(7,dGi,6,2,"tr",5),p()()(),h(8,"div",6)(9,"nxt-button",7),F("click",function(){return s.close()}),y(10,"Checklist abgeschlossen"),p()()()),r&2&&(g(3),ye(s.title),g(2),mo("padding",2,"em"),g(2),b("ngForOf",s.checkItems),g(2),b("disabled",!s.allItemsChecked&&s.allCheckedToFinish))},dependencies:[At,Yt,$r,oi,qi,Hi,sI,ko,Ko,Dp,Lt],styles:["table[_ngcontent-%COMP%]{border-collapse:collapse}table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{border:1px solid gray}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1em}"]});let t=e;return t})()});function hGi(t,e){if(t&1&&(h(0,"div",6)(1,"div",7),y(2),p(),h(3,"div",8),y(4),p(),h(5,"div",9),y(6),p()()),t&2){let n=w();g(2),ye(n.dateText),g(),b("ngStyle",sn(4,uGi,n.toOld?n.colorTools.Red:"")),g(),ye(n.dateFromNowText),g(2),ye(n.code)}}function pGi(t,e){t&1&&(h(0,"div",10),y(1," Kein SMS-Code vorhanden "),p())}function mGi(t,e){if(t&1){let n=re();h(0,"nxt-button",11),F("click",function(){V(n);let r=w();return B(r.copyAndClose())}),y(1,"In die Zwischenablage"),p()}}function fGi(t,e){if(t&1){let n=re();h(0,"nxt-button",11),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"OK"),p()}}var uGi,sse,L9e=Q(()=>{Gi();zn();jo();Zi();An();ri();Vt();me();yi();w4();E8();Vt();An();uGi=t=>({color:t});sse=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.socketService=i,this.clipboardService=r,this.dialogRef=s,this.dateText="",this.dateFromNowText="",this.code="",this.toOld=!1}nxtOnDestroy(){}ngOnInit(){this.type&&this.load(this.type)}load(i){this.type=i,i==="PayPal"?this.pushSocketSubscription=this.socketService.subscribeNew("getPaypalSmsCode",r=>{this.codeReceived(r)},{emitInitial:!0}):i==="Klarna"?this.pushSocketSubscription=this.socketService.subscribeNew("getKlarnaSmsCode",r=>{this.codeReceived(r)},{emitInitial:!0}):i==="Google"&&(this.pushSocketSubscription=this.socketService.subscribeNew("getGoogleSmsCode",r=>{this.codeReceived(r)},{emitInitial:!0}))}copyAndClose(){this.clipboardService.copyToClipboard(this.code),this.dialogRef.close()}codeReceived(i){i?.createdAt&&(this.dateText=i.createdAt.dateFormat("dd.MM.yyyy HH:mm:ss"),this.toOld=Date.now()-Qt.DURATION_1MINUTE*3>i.createdAt,this.dateFromNowText=Ie.dateDiffToNowText(i.createdAt,!0),this.code=i.code,this.clipboardService.copyToClipboard(this.code))}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(ep),R(Jf,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-sms-code"]],standalone:!0,features:[et,xe],decls:9,vars:5,consts:[["fxLayout","row","fxLayoutAlign","center center",1,"text-120","p-3"],["fxLayout","column","fxLayoutAlign","center center"],["class","pb-3","fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["class","pb-3",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center"],[3,"click",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center",1,"pb-3"],[1,"pb-2"],[3,"ngStyle"],[1,"text-150","p-3",2,"font-weight","bold"],[1,"pb-3"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2),p()(),h(3,"div",1),W(4,hGi,7,6,"div",2)(5,pGi,2,0,"div",3),p(),h(6,"div",4),W(7,mGi,2,0,"nxt-button",5)(8,fGi,2,0,"nxt-button",5),p()),r&2&&(g(2),Ke(" ",s.type," SMS-Code "),g(2),b("ngIf",s.dateText),g(),b("ngIf",!s.dateText),g(2),b("ngIf",s.dateText),g(),b("ngIf",!s.dateText))},dependencies:[At,Yt,oi,Ct,rr,Dn,rs,Lt]});let t=e;return t})()});function yGi(t,e){if(t&1&&(vs(0),y(1),Ce(2,"money"),ys()),t&2){let n=w().$implicit,i=w();g(),Ke(" = ",tt(2,1,i.moneyStack[n]*n)," ")}}function _Gi(t,e){t&1&&(vs(0),y(1," - "),ys())}function CGi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td")(2,"div",8),ee(3,"img",9),p()(),h(4,"td",10)(5,"nxt-button-icon",11),F("click",function(){let r=V(n).$implicit,s=w();return B(s.removeMoney(r))}),y(6,"remove_circle"),p()(),h(7,"td",12),F("click",function(){let r=V(n).$implicit,s=w();return B(s.setMoneyCount(r))}),y(8),p(),h(9,"td",10)(10,"nxt-button-icon",11),F("click",function(){let r=V(n).$implicit,s=w();return B(s.addMoney(r))}),y(11,"add_circle"),p()(),h(12,"td",13),W(13,yGi,3,3,"ng-container",5)(14,_Gi,2,0,"ng-container",5),p()()}if(t&2){let n=e.$implicit,i=w();g(3),b("ngStyle",sn(5,vGi,i.getMoneyHeight(n,.04)+"vh"))("src","assets/money/"+n+".png",Ur),g(5),Ke(" \xA0\xA0",i.moneyStack[n],"\xA0\xA0 "),g(5),b("ngIf",i.moneyStack[n]*n>0),g(),b("ngIf",i.moneyStack[n]*n===0)}}function xGi(t,e){t&1&&(h(0,"td"),y(1,"SOLL"),p())}function bGi(t,e){t&1&&(h(0,"td"),y(1,"DIFFERENZ"),p())}function wGi(t,e){if(t&1&&(h(0,"td",6),y(1),Ce(2,"money"),p()),t&2){let n=w();b("ngStyle",sn(4,pvt,n.totalMoneyShouldValueColor)),g(),ye(tt(2,2,n.totalMoneyShouldValue))}}function SGi(t,e){if(t&1&&(h(0,"td",6),y(1),Ce(2,"money"),p()),t&2){let n=w();b("ngStyle",sn(5,pvt,n.totalMoneyDiffValueColor)),g(),cn("",n.totalMoneyDiffValue>0?"+":"","",tt(2,3,n.totalMoneyDiffValue),"")}}var gGi,vGi,pvt,mvt,fvt=Q(()=>{me();yW();jc();Vd();pC();kl();Zh();Il();sg();ls();An();ri();Vt();me();Ci();Vt();An();gGi=t=>({color:t,textAlign:"center"}),vGi=t=>({margin:"4px",height:t}),pvt=t=>({color:t,textAlign:"right"});mvt=(()=>{let e=class e{constructor(i){this.dialogService=i,this.showShould=!0,this.totalMoneyShouldValue=0,this.moneyStackChange=new nt,this.totalMoneyValue=0,this.totalMoneyValueChange=new nt,this.getMoneyWidth=Af.getMoneyWidth,this.getMoneyHeight=Af.getMoneyHeight,this.moneys=Af.moneysReverse,this.totalMoneyValueColor="",this.totalMoneyShouldValueColor="",this.totalMoneyDiffValueColor="",this.totalMoneyDiffValue=0}ngOnInit(){this.calcTotalMoneyValue()}getMoneyCount(i){return this.moneyStack[i]}setMoneyCount(i){return O(this,null,function*(){let r=this.moneyStack[i]!==0?this.moneyStack[i].toString():"0",o=yield(yield this.dialogService.showInputOld({isMoney:!1,prompt:r,message:'Anzahl von <span class="text-lg font-bold">'+Wn.toMoneyString(i)+"</span>",okButtonText:"OK",selectPrompt:!0})).afterClosed().toPromise(),a=!1;if(!Number.isNaN(o)&&o>=0&&(this.moneyStack[i]=Number.parseInt(o,10),a=!0),this.calcTotalMoneyValue(),this.moneyStackChange.emit(this.moneyStack),a){let l=Af.getPreviousCoin(i);Es.isNumber(l)&&requestAnimationFrame(()=>{this.setMoneyCount(l)})}})}addMoney(i){return O(this,null,function*(){(!this.beforeAddMoney||(yield this.beforeAddMoney(i)))&&(this.moneyStack[i]++,this.calcTotalMoneyValue(),this.moneyStackChange.emit(this.moneyStack))})}removeMoney(i){return O(this,null,function*(){this.moneyStack[i]>0&&(!this.beforeRemoveMoney||(yield this.beforeRemoveMoney(i)))&&(this.moneyStack[i]--,this.calcTotalMoneyValue(),this.moneyStackChange.emit(this.moneyStack))})}calcTotalMoneyValue(){this.totalMoneyValue=ca.getTotalValueFromMoneyStack(this.moneyStack),fn.round(this.totalMoneyShouldValue,2)!==this.totalMoneyValue?this.totalMoneyDiffValueColor=xn.Red:this.totalMoneyDiffValueColor=xn.Green,this.totalMoneyDiffValue=this.totalMoneyValue-this.totalMoneyShouldValue}ngAfterViewInit(){}};e.\u0275fac=function(r){return new(r||e)(R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-counter-2"]],inputs:{showShould:"showShould",moneyStack:"moneyStack",totalMoneyShouldValue:"totalMoneyShouldValue",beforeRemoveMoney:"beforeRemoveMoney",beforeAddMoney:"beforeAddMoney"},outputs:{moneyStackChange:"moneyStackChange",totalMoneyValueChange:"totalMoneyValueChange"},standalone:!0,features:[xe],decls:15,vars:12,consts:[["fxLayout","column","fxLayoutAlign","center center",2,"width","fit-content"],[1,"money-table"],[4,"ngFor","ngForOf"],[1,"value-table",2,"width","100%","text-align","center"],[3,"nxtOnMultiClick","nxtMultiClick"],[4,"ngIf"],[3,"ngStyle"],[3,"ngStyle",4,"ngIf"],["fxLayoutAlign","center center"],[3,"ngStyle","src"],[2,"text-align","center"],[3,"click"],[2,"width","50px","text-align","center","cursor","pointer",3,"click"],[1,"no-wrap",2,"min-width","120px","text-align","right"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"table",1),W(2,CGi,15,7,"tr",2),p(),h(3,"table",3)(4,"tr")(5,"td",4),F("nxtOnMultiClick",function(){return s.showShould=!s.showShould}),y(6,"IST"),p(),W(7,xGi,2,0,"td",5)(8,bGi,2,0,"td",5),p(),h(9,"tr")(10,"td",6),y(11),Ce(12,"money"),p(),W(13,wGi,3,6,"td",7)(14,SGi,3,7,"td",7),p()()()),r&2&&(g(2),b("ngForOf",s.moneys),g(3),b("nxtMultiClick",3),g(2),b("ngIf",s.showShould),g(),b("ngIf",s.showShould),g(2),b("ngStyle",sn(10,gGi,s.totalMoneyValueColor)),g(),ye(tt(12,8,s.totalMoneyValue)),g(2),b("ngIf",s.showShould),g(),b("ngIf",s.showShould))},dependencies:[At,Yt,oi,Hi,rr,Dn,rs,an,Ct,Qu,ks],styles:["table[_ngcontent-%COMP%]{border-collapse:collapse}.money-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid #808080;padding:0 15px}.value-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid #808080;padding:5px 15px}"]});let t=e;return t})()});function MGi(t,e){if(t&1&&(h(0,"div",14),y(1),Ce(2,"money"),p()),t&2){let n=w();b("ngClass",sn(4,DGi,n.currentMoneyStackValue!==n.startValue)),g(),Ke(" Geldwechseln, du musst mit ",tt(2,2,n.startValue)," beenden ")}}function kGi(t,e){if(t&1&&(h(0,"tr",18)(1,"td"),y(2),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=e.$implicit;b("ngClass",sn(5,EGi,n.missingMoney>0)),g(2),ye(n.id),g(2),ye(tt(5,3,n.value))}}function IGi(t,e){if(t&1&&(h(0,"div",15)(1,"table",16),W(2,kGi,6,7,"tr",17),p()()),t&2){let n=w();g(2),b("ngForOf",n.canReduceResult.values)}}function AGi(t,e){t&1&&(h(0,"div",19),y(1,"\xA0"),p())}function PGi(t,e){t&1&&(h(0,"div",19),y(1,"\xA0"),p())}function RGi(t,e){t&1&&(h(0,"div"),y(1," Es gibt leider keine Wechselvorschl\xE4ge "),p())}function FGi(t,e){if(t&1&&(h(0,"tr",27)(1,"td",24),y(2),p()()),t&2){let n=w().$implicit;g(2),ye(n.sortValue)}}function LGi(t,e){t&1&&(h(0,"tr")(1,"td",28),y(2,"ODER"),p()())}function OGi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit,i=w().$implicit;g(),cn(" ",i.reduce[n]," x ",n," \u20AC ")}}function NGi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit;g(),Ke(" ",n," \u20AC ")}}function VGi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit,i=w().$implicit;g(),cn(" ",i.reduce[n]," x ",n*100," Cent ")}}function BGi(t,e){if(t&1&&(h(0,"div"),W(1,OGi,2,2,"div",22)(2,NGi,2,1,"div",22)(3,VGi,2,2,"div",22),p()),t&2){let n=e.$implicit,i=w().$implicit;g(),b("ngIf",n>=1&&i.reduce[n]>1),g(),b("ngIf",n>=1&&i.reduce[n]===1),g(),b("ngIf",n<1)}}function zGi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit,i=w().$implicit;g(),cn(" ",i.add[n]," x ",n," \u20AC ")}}function HGi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit,i=w().$implicit;g(),cn(" ",i.add[n]," x ",n*100," Cent ")}}function GGi(t,e){if(t&1&&(h(0,"div"),W(1,zGi,2,2,"div",22)(2,HGi,2,2,"div",22),p()),t&2){let n=e.$implicit;g(),b("ngIf",n>=1),g(),b("ngIf",n<1)}}function WGi(t,e){if(t&1){let n=re();vs(0),W(1,FGi,3,1,"tr",26)(2,LGi,3,0,"tr",22),h(3,"tr")(4,"td"),W(5,BGi,4,3,"div",25),p(),h(6,"td"),y(7,"ZU"),p(),h(8,"td"),W(9,GGi,3,2,"div",25),p(),h(10,"td")(11,"nxt-button",12),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.useProposalClicked(r))}),y(12,"anwenden"),p()()(),ys()}if(t&2){let n=e.$implicit,i=e.index,r=w(3);g(),b("ngIf",!1),g(),b("ngIf",i>0),g(3),b("ngForOf",r.keysSortNumber(n.reduce)),g(4),b("ngForOf",r.keysSortNumber(n.add))}}function UGi(t,e){if(t&1&&(h(0,"table",16)(1,"tr")(2,"th",24),y(3,"Wechselvorschl\xE4ge"),p()(),W(4,WGi,13,4,"ng-container",25),p()),t&2){let n=w(2);g(4),b("ngForOf",n.changeProposals)}}function jGi(t,e){if(t&1&&(h(0,"div",20),ee(1,"div",21),Ce(2,"safeHtml"),h(3,"div"),W(4,RGi,2,0,"div",22)(5,UGi,5,1,"table",23),p()()),t&2){let n=w();g(),b("innerHTML",tt(2,3,n.moneyStackInfoText),Pi),g(3),b("ngIf",n.changeProposals.length===0),g(),b("ngIf",n.changeProposals.length>0)}}function $Gi(t,e){if(t&1){let n=re();h(0,"nxt-button",12),F("click",function(){V(n);let r=w();return B(r.undoUseProposalClicked())}),y(1,"Wechselvorgang r\xFCckg\xE4ngig machen"),p()}}var TGi,DGi,EGi,qF,O9e=Q(()=>{jc();pC();Yc();pa();kl();Ul();Il();ha();Zi();il();fvt();An();ri();Vt();me();yi();Ci();Kr();ji();Vt();An();TGi=t=>({flex:t}),DGi=t=>({red:t}),EGi=t=>({red:t});qF=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.dialogService=r,this.loginService=s,this.dialogRef=o,this.currentMoneyStack={},this.colorTools=xn,this.mustCorrect=!1,this.currentMoneyStackValue=0,this.suppressValueChange=!1,this.suppressValueChangeErrorMessage="Der IST-Wert darf sich nicht \xE4ndern",this.startValue=0,this.moneyStackInfoText="",this.keys=oa,this.beforeAddOrRemoveMoney=a=>O(this,null,function*(){return this.options.canOnlyUseChangeProposals&&this.changeProposals.length>0&&this.startValue===this.options.totalMoneyShouldValue?(this.dialogService.showOk("Du kannst nur Wechselvorschl\xE4ge verwenden"),!1):!0})}keysSortNumber(i){return Object.keys(i).map(r=>parseFloat(r)).sort(Hr.arrayNumbers(!0))}ngOnInit(){return O(this,null,function*(){})}ngOnDestroy(){}getKeys(i){return Object.keys(i).map(r=>parseFloat(r)).sort(Hr.arrayNumbers())}setData(i){this.options=Sr.combineWithDefaultOptions(i,{}),i.moneyStack?(this.currentMoneyStack=Sr.clone(i.moneyStack),this.startValue=ca.getTotalValueFromMoneyStack(this.currentMoneyStack)):this.currentMoneyStack=ca.getEmptyMoneyStack(),this.currentMoneyStackValue=ca.getTotalValueFromMoneyStack(this.currentMoneyStack),this.startValue>0&&this.calcReduceData(),this.suppressValueChange=!!i.suppressValueChange}save(){return O(this,null,function*(){if(!(this.options.payoutData&&(this.calcReduceData(),this.moneyStackInfoText))){if(this.suppressValueChange&&this.startValue!==ca.getTotalValueFromMoneyStack(this.currentMoneyStack)){yield this.dialogService.showOk(this.suppressValueChangeErrorMessage+`
`+this.startValue.toMoneyString());return}if(this.options.canNotExitWithWrongShouldValue&&this.options.totalMoneyShouldValue!==ca.getTotalValueFromMoneyStack(this.currentMoneyStack)){yield this.dialogService.showOk("Du kannst nur genau mit "+this.options.totalMoneyShouldValue.toMoneyString()+" beenden");return}this.dialogRef.close(this.currentMoneyStack)}})}close(){this.dialogRef.close()}moneyStackChanged(i,r=!0){this.currentMoneyStackValue=ca.getTotalValueFromMoneyStack(i),this.moneyStackInfoText&&this.calcReduceData(),r&&(this.stackBeforeUseProposal=null)}calcReduceData(){let i=ca.getTotalValueFromMoneyStack(this.currentMoneyStack);if(!(this.suppressValueChange&&this.startValue!==i)&&(this.moneyStackInfoText="",this.changeProposals=[],this.options.payoutData)){let r=fn.roundMoney(this.options.payoutData.values.reduce((s,o)=>s+o.value,0));if(r>i)this.moneyStackInfoText=`Das reicht nicht zum Auszahlen,
es m\xFCssen `+(r-i).toMoneyString()+" eingelegt werden";else{this.canReduceResult=ca.canReduceMultiFromMoneyStack(this.currentMoneyStack,this.options.payoutData.values,this.options.payoutData.prioIds);let s=[];for(let o of this.canReduceResult.values)o.missingMoney&&o.missingMoney>0&&s.push('<tr><td class="p-1">'+o.id+'</td><td class="p-1">'+o.missingMoney.toMoneyString()+"</td></tr>");if(s.length>0){let o=Sr.clone(this.currentMoneyStack);this.changeProposals=ca.getProposalChangesMulti(o,this.options.payoutData.values.map(a=>a.value)),this.changeProposals.length>5&&(this.changeProposals.length=5),this.moneyStackInfoText="Leider kannst du so nicht auszahlen.\u2757",this.changeProposals.length===0&&(this.moneyStackInfoText+="<br/>Es fehlen dir:<br/><br/><table>"+s.join("")+"</table>",this.socketService.sendTelegramAdmin(`Keine Wechselvorschlag gefunden:

`+Qn.stringify(o)+`

suche nach
0x34456455

`+Qn.stringify(this.options.payoutData.values.map(a=>a.value))))}}}}useProposalClicked(i){this.stackBeforeUseProposal=so(this.currentMoneyStack),this.currentMoneyStack=ca.combineMoneyStacks([this.currentMoneyStack,i.add]),ca.reduceMoneyStackFromMoneyStack(this.currentMoneyStack,i.reduce),this.moneyStackChanged(this.currentMoneyStack,!1)}undoUseProposalClicked(){this.currentMoneyStack=so(this.stackBeforeUseProposal),this.moneyStackChanged(this.stackBeforeUseProposal),this.stackBeforeUseProposal=null,this.calcReduceData()}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(Fi),R(Gt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-counter-wrapper2"]],standalone:!0,features:[xe],decls:19,vars:16,consts:[["fxFlex","","fxLayout","column","fxLayoutAlign","stretch",2,"height","100%"],["fxFlex","","fxLayout","row","fxLayoutAlign","center center"],["fxLayout","column",1,"w-full"],["fxLayoutAlign","center center",1,"headline","text-150"],["fxLayoutAlign","center center","fxFlex","","class","p-4",3,"ngClass",4,"ngIf"],["fxLayout","row"],["fxLayout","row","fxLayoutAlign","end start","fxFlex","",4,"ngIf"],["fxFlex","20px",4,"ngIf"],["fxLayout","row",2,"border","0px solid red",3,"ngStyle","fxLayoutAlign"],[3,"moneyStackChange","moneyStack","totalMoneyShouldValue","showShould","beforeAddMoney","beforeRemoveMoney"],["fxFlex","","fxLayout","column",4,"ngIf"],["fxFlex","","fxLayoutAlign","center center"],[3,"click"],[3,"click",4,"ngIf"],["fxLayoutAlign","center center","fxFlex","",1,"p-4",3,"ngClass"],["fxLayout","row","fxLayoutAlign","end start","fxFlex",""],[1,"nxt-table"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],["fxFlex","20px"],["fxFlex","","fxLayout","column"],[1,"text-120","pb-2",3,"innerHTML"],[4,"ngIf"],["class","nxt-table",4,"ngIf"],["colspan","4"],[4,"ngFor","ngForOf"],["nxtPermission","IsJulian",4,"ngIf"],["nxtPermission","IsJulian"],["colspan","4",1,"center"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4),p(),W(5,MGi,3,6,"div",4),h(6,"div",5),W(7,IGi,3,1,"div",6)(8,AGi,2,0,"div",7),h(9,"div",8)(10,"nxt-money-counter-2",9),Xe("moneyStackChange",function(a){return Ze(s.currentMoneyStack,a)||(s.currentMoneyStack=a),a}),F("moneyStackChange",function(a){return s.moneyStackChanged(a)}),p()(),W(11,PGi,2,0,"div",7)(12,jGi,6,5,"div",10),p()()(),h(13,"div",11)(14,"nxt-button",12),F("click",function(){return s.close()}),y(15,"Abbrechen"),p(),W(16,$Gi,2,0,"nxt-button",13),h(17,"nxt-button",12),F("click",function(){return s.save()}),y(18,"speichern"),p()()()),r&2&&(g(4),ye(s.options.title),g(),b("ngIf",s.suppressValueChange),g(2),b("ngIf",s.moneyStackInfoText&&(s.options==null||s.options.payoutData==null?null:s.options.payoutData.values)),g(),b("ngIf",s.moneyStackInfoText),g(),b("ngStyle",sn(14,TGi,s.moneyStackInfoText?"":"1 1 0%"))("fxLayoutAlign",s.moneyStackInfoText?"end":"center"),g(),qe("moneyStack",s.currentMoneyStack),b("totalMoneyShouldValue",s.options.totalMoneyShouldValue)("showShould",s.options.showShould)("beforeAddMoney",s.beforeAddOrRemoveMoney)("beforeRemoveMoney",s.beforeAddOrRemoveMoney),g(),b("ngIf",s.moneyStackInfoText),g(),b("ngIf",s.moneyStackInfoText),g(4),b("ngIf",s.stackBeforeUseProposal))},dependencies:[At,Yt,oi,qi,Ct,_s,Dn,No,rs,Hi,rr,mvt,Zs,Lt,Or,ks],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}.img-money[_ngcontent-%COMP%]{height:50px;margin:0 10px}.img-money-small[_ngcontent-%COMP%]{height:30px;margin:0 10px}.headline[_ngcontent-%COMP%]{margin-bottom:5px}.money-value[_ngcontent-%COMP%]{font-size:1.5em;text-align:right}.payout-table[_ngcontent-%COMP%]{border-collapse:collapse}.payout-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], .payout-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{border:1px solid #808080;padding:10px}"]});let t=e;return t})()});var gvt=Q(()=>{ag()});var vvt=Q(()=>{Gi();hZ();gvt();yi();fN();jl()});var ose,N9e=Q(()=>{me();yi();kl();Kr();Cs();me();ose=(()=>{let e=class e{constructor(){this.socketService=Ve(lt),this.loginService=Ve(Fi),this.configService=Ve(Xi),setTimeout(()=>this.init())}init(){return O(this,null,function*(){})}playJuergen(){new Audio("assets/sounds/juergen.ogg").play()}playBase64(i,r){let s="data:"+r+";base64,"+i;new Audio(s).play()}playReminderNotification(){return O(this,null,function*(){let i=yield this.socketService.tts(this.getReminderNotificationText());this.playBase64(i.base64,i.mimeType)})}getReminderNotificationText(){let i="",r="",s='"'+this.loginService.getUsername()+'"';window.location.pathname.startsWith("/studio-cash-report")?r+='"'+this.configService.config.value.studioName+' CashReport"':window.location.pathname.startsWith("/main")?r+='"'+this.configService.config.value.studioName+' Dashboard"':r+='"'+window.location.pathname+'"';let o=[r+" an "+s+", bitte kommen.","Hallo "+this.loginService.getUsername()+" "+r+" meldet sich.","Huhu "+s+", "+r+" m\xF6chte deine Aufmerksamkeit.","Hey "+s+", "+r+" muss dir auf die Eier gehen."];i+=fn.getRandomFromArray(o),i+=" ";let a=[i+"Du hast noch offene Aufgaben. Zack zack erledigen! Aber verliere die Wertigkeit nicht aus den Augen!",i+"Check mal deine Aufgaben! ame nack. over and out!",i+"behalte deine Aufgaben im Blick, check sie ab, erledige Sie, dann bist du krass!",i+"sei kein Frosch, erledige deine Aufgaben! sobald sie erledigt sind, lasse ich dich auch in Ruhe, HA HA HA",i+"Guck mal laan, du hast aufgaben, mach sie auf erledigt, dann ist haiat sii keerrem."];return this.loginService.getUsername()==="Marcel"&&a.push(i+" du hast noch offene Aufgaben. Wir sind hier nicht beim Bund, hier wird gearbeitet. HAHA HAHA HAHA"),fn.getRandomFromArray(a)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function KGi(t,e){if(t&1){let n=re();h(0,"div",0),ee(1,"img",2),h(2,"div",3),y(3),p(),h(4,"div",4)(5,"nxt-button",5),y(6,"CashReport"),p(),h(7,"nxt-button",6),y(8,"Fotos"),p(),h(9,"nxt-button",7),y(10,"Kalender"),p(),h(11,"nxt-button",8),y(12,"Studio-Abgaben"),p(),h(13,"nxt-button",9),y(14,"Termin-Bewertung"),p()(),h(15,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.logout())}),y(16,"AUSLOGGEN"),p()()}if(t&2){let n=w();g(3),ye(n.loginService.getUsername())}}function YGi(t,e){if(t&1&&(h(0,"nxt-button",35),y(1),p()),t&2){let n=w().$implicit;b("routerLink",n),g(),ye(n.substring(0,20))}}function qGi(t,e){if(t&1&&(h(0,"nxt-button",35),y(1),p()),t&2){let n=w().$implicit;b("routerLink",n),g(),ye(n)}}function ZGi(t,e){if(t&1&&W(0,YGi,2,2,"nxt-button",35)(1,qGi,2,2,"nxt-button",35),t&2){let n=e.$implicit;Je(n.length>20?0:1)}}function XGi(t,e){if(t&1&&(h(0,"div",12),Kn(1,ZGi,2,1,null,null,sa),p()),t&2){let n=w(2);g(),Yn(n.localLastUrls())}}function QGi(t,e){t&1&&ee(0,"nxt-time-picker",36)}function JGi(t,e){if(t&1){let n=re();h(0,"nxt-button",10),F("click",function(){V(n);let r=w(2);return B(r.newContact())}),y(1,"neuer Kunde"),p()}}function eWi(t,e){if(t&1){let n=re();h(0,"nxt-button",10),F("click",function(){V(n);let r=w(2);return B(r.showLoading())}),y(1,"LoadingTest"),p()}}function tWi(t,e){if(t&1){let n=re();h(0,"nxt-button",10),F("click",function(){V(n);let r=w(2);return B(r.userIsActive())}),y(1,"User is Active Whats-App"),p()}}function iWi(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",11),W(2,XGi,3,0,"div",12),h(3,"div",13)(4,"div",14),F("click",function(){V(n);let r=w();return B(r.logout())}),y(5),p(),h(6,"div"),y(7),p()(),h(8,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showAll=!1)}),y(9,"dashboard"),p(),h(10,"div",15)(11,"nxt-button",16),y(12,"CASH-REPORT"),p(),h(13,"nxt-button",17),y(14,"KALENDER"),p(),h(15,"nxt-button",18),y(16,"MITARBEITER"),p(),h(17,"nxt-button",19),y(18,"MITARBEITER-KALENDER"),p(),h(19,"nxt-button",20),y(20,"MITARBEITER-ARBEIT"),p(),h(21,"nxt-button",21),y(22,"KASSEN"),p(),h(23,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.grammarTest())}),y(24,"GRAMMAR"),p()(),h(25,"div",15)(26,"nxt-button",22),F("click",function(){V(n);let r=w();return B(r.showSmsCode("PayPal"))}),y(27,"SMS PayPal"),p(),h(28,"nxt-button",22),F("click",function(){V(n);let r=w();return B(r.showSmsCode("Klarna"))}),y(29,"SMS Klarna"),p(),h(30,"nxt-button",23),F("click",function(){V(n);let r=w();return B(r.showSmsCode("Google"))}),y(31,"SMS Google"),p()(),h(32,"div",15)(33,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showBroadcast())}),y(34,"BROADCAST"),p(),h(35,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showBackoffice())}),y(36,"BACKOFFICE"),p(),h(37,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showStudioFee())}),y(38,"STUDIO-ABGABEN"),p(),h(39,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.testReminder())}),y(40,"REMINDER"),p(),h(41,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showWhatsAppQr())}),y(42,"WHATSAPP-CONNECT"),p(),h(43,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showVideo())}),y(44,"VIDEO"),p()(),h(45,"div",15)(46,"table",24)(47,"tr")(48,"td"),y(49,"EventId"),p(),h(50,"td")(51,"input",25),F("change",function(r){V(n);let s=w();return B(s.idChanged(r))}),p()()(),h(52,"tr")(53,"td"),y(54,"Handy"),p(),h(55,"td")(56,"input",25),F("change",function(r){V(n);let s=w();return B(s.mobileChanged(r))}),p()()(),h(57,"tr")(58,"td"),y(59,"History"),p(),h(60,"td")(61,"input",25),F("change",function(r){V(n);let s=w();return B(s.historyChanged(r))}),p()()()()(),h(62,"div")(63,"div",15)(64,"div"),y(65,"SEITEN"),p(),h(66,"nxt-button",26),y(67,"SUCHE"),p(),h(68,"nxt-button",27),y(69,"BENUTZER"),p(),h(70,"nxt-button",28),y(71,"ARTISTS"),p(),h(72,"nxt-button",29),y(73,"INVENTAR"),p(),h(74,"nxt-button",30),y(75,"GIFT-CARDS"),p(),h(76,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.soundTest())}),y(77,"SOUND TEST"),p()()(),ee(78,"br"),h(79,"div",15)(80,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.headerDoubleBlockClicked())}),y(81,"Grafik-Header"),p(),h(82,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.invoices())}),y(83,"Rechnungen"),p()(),W(84,QGi,1,0,"nxt-time-picker",31),h(85,"div",15)(86,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.newEvent(!0))}),y(87,"neuer Termin"),p(),h(88,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.newEvent(!1))}),y(89,"neuer Termin"),ee(90,"br"),y(91,"mit Terminfinder"),p(),h(92,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.newEventInNewWindow())}),y(93,"neuer Termin neues Fenster"),p(),W(94,JGi,2,0,"nxt-button",32),h(95,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.backoffice())}),y(96,"BACKOFFICE"),p()(),h(97,"div",15)(98,"nxt-button",33),y(99,"ADMIN"),p(),h(100,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.chat())}),y(101,"CHAT mit Julian"),p(),h(102,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.sendToJulian())}),y(103,"send to Julian"),p(),h(104,"nxt-button",34),y(105,"whats-app-latest-messages"),p()(),h(106,"div",15),W(107,eWi,2,0,"nxt-button",32),h(108,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.newPassword())}),y(109,"Neues Passwort"),p(),W(110,tWi,2,0,"nxt-button",32),p(),h(111,"div")(112,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.throwErrorToolsInfo())}),y(113,"ErrorToolsInfo"),p(),h(114,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.throwErrorToolsError())}),y(115,"ErrorToolsError"),p(),h(116,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.throwError())}),y(117,"ThrowError"),p()(),h(118,"div",15)(119,"div"),y(120,"INPUTS / DIALOGS"),p(),h(121,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showInputTest())}),y(122,"InputTest"),p(),h(123,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showInputDialog())}),y(124,"InputDialog"),p(),h(125,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showYesNo())}),y(126,"Yes No"),p(),h(127,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showOk())}),y(128,"OK"),p(),h(129,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showSelect())}),y(130,"SELECT"),p()(),h(131,"div",15)(132,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.wtest())}),y(133,"whatsapp-preis"),p(),h(134,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.fastAnswer())}),y(135,"fastAnswer"),p(),h(136,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.moneyStackTest())}),y(137,"MoneyStackTest"),p(),h(138,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.showCombineContacts())}),y(139,"showCombineContacts"),p()(),h(140,"div")(141,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.emitUserChanged())}),y(142,"emit userChanged"),p(),h(143,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.errorTest())}),y(144,"ErrorTest"),p()()()()}if(t&2){let n=w();g(2),Je(n.localLastUrls()?2:-1),g(3),Ke("Hallo ",n.loginService.getUserPrefix(),""),g(2),Ke("Version: ",n.version,""),g(77),b("ngIf",!1),g(10),b("ngIf",!1),g(13),b("ngIf",!0),g(3),b("ngIf",!1)}}var _vt,V9e,Cvt=Q(()=>{me();Ep();Ci();ma();zn();yi();F9e();kl();I7();WA();$n();a4();jo();L9e();gu();_vt=Gs(QI());z4e();qU();Ul();O9e();n6();Ly();ih();il();Zi();Vt();vvt();ri();ha();uX();Jr();a3();Bd();e6e();jP();me();Kr();Ci();ma();yi();Cs();w4();cX();gu();L1();BA();I9e();jl();N9e();Vt();V9e=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d,u,m,f,_,x){this.loginService=i,this.dialogService=r,this.router=s,this.socketService=o,this.configService=a,this.clipboardService=l,this.paypalCheckoutService=c,this.shortcutService=d,this.httpClient=u,this.contactService=m,this.topBarService=f,this.permissionService=_,this.audioService=x,this.showCreateNewGrid=!1,this.showAll=!1,this.version=lt.NODE_SERVER_VERSION,this.testValue=100,this.testFormControl=new $t(100),this.otherStudios=this.configService.config.value.allStudios,this.nxtFormControl=new $t,this.multilineText=`Hallo
du
Schlumpf
wie
gehts
dirso?`,this.testValue1=null,this.testOptions=[{text:"abc",value:"abc"},{text:"def",value:"def"}],this.selectDisabled=!0,this.topBarItems=[],this.text="",this.isDisabled=!0,this.showImg=!1,this.localLastUrls=gt([]),this.dynamicGridName=new $t,this.shortcutService.registerKey(Pn.Shift7,{propagate:!0})}ngOnInit(){this.localLastUrls.set(Qn.parse(localStorage.getItem("localLastUrls"))||[]),this.showAll=this.permissionService.hasPermission(Zt.DefaultDashboard),this.socketService.currentUser$.value.photoDeviceName&&(this.showAll=!1);let i=this.configService.config.value.users.find(r=>r.username===this.loginService.getUsername());i.startPage&&this.router.navigateByUrl(i.startPage),this.topBarService.topBarItems.subscribe(r=>{this.topBarItems=r}),this.username=this.loginService.getUsername()}test(){return O(this,null,function*(){alert("joo")})}newReportClicked(){}showStudioCashReport(){this.router.navigateByUrl("studio-cash-report")}showStudioCashReport2(){this.router.navigateByUrl("studio-cash-report-2")}showStudioCashReportNewWindow(i){window.open("/studio-cash-report/"+i,"_blank")}newEvent(i){let r=Ie.format(Date.now(),"yyyyMMddT100000"),s=Ie.format(Date.now(),"yyyyMMddT110000");this.router.navigateByUrl("/e/new")}idChanged(i){let r=i.target.value;r.includes("/")&&(r=r.split("/").pop()),window.location.href="e/"+r}idChanged2(i){window.location.href="e2/"+i.target.value}mobileChanged(i){window.location.href="chat/"+i.target.value}showInventory(){this.router.navigateByUrl("/inventory")}syncTest(){this.router.navigateByUrl("/sync-test")}logout(){this.loginService.reLogin(!0)}invoices(){this.router.navigateByUrl("/invoices")}showBrudiTvDashboard(){this.router.navigateByUrl("/brudi-tv-dashboard")}showArtists(){this.router.navigateByUrl("/artists")}headerDoubleBlockClicked(){this.router.navigateByUrl("/header-double-block")}backoffice(){this.router.navigateByUrl("/backoffice")}eventFinder(){this.router.navigateByUrl("/event-finder")}showStudioFee(){this.router.navigateByUrl("/studio-fee")}checkListTest(){this.dialogService.showComponentDialog(FM,{title:"TestCheckbox",allCheckedToFinish:!0,checkItems:[{name:"TV im Hauptraum aus",checked:!1},{name:"Terrassent\xFCr abgeschlossen",checked:!1},{name:"Alle Tattoolichter aus / oder Artist die Info geben wenn noch gearbeitet wird",checked:!1},{name:"Handy ans Ladeger\xE4t",checked:!1},{name:"Abrechnung abgeheftet",checked:!1},{name:"Ich bringe nun direkt das Geld zur Bank",checked:!1}]},{minWidth:"40vw"})}clipboardTest(){let i=["https://artists.nxt-lvl.ink/#/artists/Alberto%202","https://artists.nxt-lvl.ink/#/artists/Alberto","https://artists.nxt-lvl.ink/#/artists/Anestis","https://artists.nxt-lvl.ink/#/artists/Jorge%20Maori","https://artists.nxt-lvl.ink/#/artists/Sebastian"];this.clipboardService.copyToClipboard(fn.getRandomFromArray(i))}chat(){return O(this,null,function*(){this.router.navigateByUrl("/chat/+4915120123232")})}sendToJulian(){this.socketService.sendToJulian()}eventFinderFromGoogleUrl(){let i=this.dialogService.showComponentFull(nu),r="/calendar/u/1/r/week/2022/6/22",s="/calendar/u/1/r/custom/3/d/2022/6/22";i.componentInstance.showEventFinder({pathName:"/calendar/u/1/r/day/2022/6/22"})}showInputDialog(){this.dialogService.showInput({message:"hier rein",width:"40vw",okButtonText:"Anpinnen",stringCanEmpty:!1})}showYesNo(){return O(this,null,function*(){let i=yield this.dialogService.showYesNo("TEST");alert(i)})}showSelect(){this.dialogService.showSelect("Selct mal was",[{text:"abc",value:"abc"},{text:"def",value:"def"}],{title:"hansi"})}showOk(){this.dialogService.showOk("TEST",{buttonText:"button text anderer",timeoutSeconds:1e3,minWidth:"600px"})}showSearch(){return O(this,null,function*(){let i=this.dialogService.showComponentFull(I5);yield Sn(i.afterClosed())})}newEventInNewWindow(){window.open("e/2j60582vije28dcj3vmionejqc","_blank")}showLoading(){this.dialogService.showLoading(_n.Default,"App wird aktualisiert"),this.dialogService.updateLoadingAllowCancel()}newPassword(){this.loginService.clearSavedLogin(!1,"neu Einloggen"),this.loginService.navigateToLogin({reLogin:!0,setNewPassword:!0})}userIsActive(){zi.instance.userIsActiveTest()}clicked(i){alert(i)}showInputTime(){this.dialogService.showInput({message:"Wann?",prompt:"19:00",isTime:!0,isTimeParams:{minTime:(Date.now()+Qt.DURATION_1DAY).dateFormat("HH")+":00",maxTime:"19:00"}})}showContactEvents(){this.dialogService.showEventsByContact("people/c6266708952696678077")}showInputTest(){return O(this,null,function*(){let i=yield this.dialogService.showInput({message:"Geld eingeben",isMoney:!0});this.dialogService.showOk("type: "+typeof i+`

`+i)})}showSmsCode(i){this.dialogService.showComponentDialog(sse,{type:i})}createPaypalLink(){return O(this,null,function*(){let i=yield this.paypalCheckoutService.showCreatePaypalPayment({value:null,name:"Julian",mobile:"+4915120123232",infoInternal:"Telegram info dies das"})})}translate(){return O(this,null,function*(){})}photoSyncReimportUnknown(){}showTextArea(){this.dialogService.showTextareaOld({message:"test"})}showBroadcast(){this.router.navigateByUrl("/broadcast")}showBackoffice(){this.router.navigateByUrl("/backoffice")}qr(){return O(this,null,function*(){let i=window.location.origin+"/event-qr/outgoing-scanxxxxxxxxxxxxx",r=yield _vt.toDataURL(i,{width:500,color:{dark:"#ffffff",light:"#2A2A2A"}});this.dialogService.showOk('<div style="width: 100%; text-align: center;"><br/><img src="'+r+'" /></div>',{title:"Rechnung f\xFCr Ausgabe fotografieren!"})})}preUpdate(i){this.httpClient.get("https://"+i+".nxt-lvl.ink/pre-pre-update").subscribe()}newContact(){this.dialogService.showContactForm()}emitUserChanged(){this.socketService.emitUserChanged()}test123(){alert("2024-01-01".dateParse().dateFormat("MMM yy"))}showChat(){this.contactService.showWhatsAppChat("people/c2904602201128383241")}wtest(){return this.dialogService.showComponentDialog(aX)}fastAnswer(){this.dialogService.showComponentDialog(vS)}moneyStackTest(){return O(this,null,function*(){let i=Qn.parse('{"1":1,"2":2,"5":0,"10":0,"20":3,"50":7,"100":0,"200":0,"0.01":7,"0.02":20,"0.05":26,"0.1":6,"0.2":1,"0.5":0}'),r=Qn.parse("[1850.62]");(yield this.dialogService.showComponentFull(qF)).componentInstance.setData({showShould:!0,moneyStack:i,title:"Testz\xE4hlung"})})}showCombineContacts(){return O(this,null,function*(){let i=yield this.dialogService.showCombineContacts(["people/c6768937824501444099","people/c4285440395132638452"])})}errorTest(){this.socketService.assignSourceDestPayments(null,null,null,null)}clickTest(){setTimeout(()=>{this.testValue1=5.25},2e3)}showEvents(){this.router.navigateByUrl("/events")}testReminder(){this.dialogService.showComponentDialog(FA).componentInstance.newReminder()}highlightReminders(){this.topBarService.startTest()}combineContacts(){this.dialogService.showCombineContacts(["people/c1389072887783766958","people/c4427429052640335265"])}throwErrorToolsInfo(){this.socketService.throwErrorToolsInfo()}throwErrorToolsError(){this.socketService.throwErrorToolsError()}throwError(){this.socketService.throwError()}soundTest(){return O(this,null,function*(){this.audioService.playReminderNotification()})}showWhatsAppQr(){this.dialogService.showConnectWhatsApp()}showVideo(){return O(this,null,function*(){let r=(yield this.socketService.getCalendarEventWithCustomer("rp2ftwe5fxvy1b")).files.find(s=>s.type==="video");r&&this.dialogService.showComponentFull($5).componentInstance.loadDriveVideo(r)})}grammarTest(){return O(this,null,function*(){let i=yield this.dialogService.showInput({message:"text"}),r=Date.now(),s=yield this.socketService.correctGrammar(i),o=Date.now();this.dialogService.showOk("Dauer: "+(o-r)+`ms

`+s)})}historyChanged(i){this.dialogService.showHistory("artistSpot",i.target.value)}};e.\u0275fac=function(r){return new(r||e)(R(Fi),R(vt),R(Ll),R(lt),R(Xi),R(ep),R(PA),R(fu),R(Uc),R(D5),R(tse),R(ws),R(ose))},e.\u0275cmp=_e({type:e,selectors:[["nxt-dashboard"]],standalone:!0,features:[xe],decls:2,vars:1,consts:[[1,"flex","h-full","w-full","flex-col","items-center","justify-center","gap-7",2,"background-color","#000","color","#fff"],["fxLayout","row",1,"wrapper"],["src","assets/logo/logo_white.svg",1,"w-1/2","md:max-w-[400px]"],[1,"text-4xl","uppercase","tracking-[0.25em]",2,"font-family","'Montserrat',serif","font-weight","700"],[1,"flex","flex-col","items-center","justify-center","gap-3","md:flex-row","md:gap-2"],["routerLink","/studio-cash-report","nxtPermission","StudioCashReport"],["routerLink","/photos"],["routerLink","/calendar","nxtPermission","Calendar"],["routerLink","/studio-fee","nxtPermission","StudioFee"],["routerLink","/events-rating","nxtPermission","EventRating_Edit"],[3,"click"],["fxLayout","column",1,"item",2,"overflow","auto"],[1,"flex","flex-row","gap-4"],[1,"hidden","md:block",2,"padding","8px"],[1,"font-size-1",2,"width","fit-content",3,"click"],[1,"my-2","flex","flex-row","gap-2"],["routerLink","/studio-cash-report"],["routerLink","/calendar"],["routerLink","/employees"],["routerLink","/employee-calendar"],["routerLink","/employee-works"],["routerLink","/money-accounts"],["nxtPermission","PayPalSMSCode",3,"click"],["nxtPermission","GoogleSmsCode",3,"click"],[1,"my-3"],[2,"width","600px","font-size","18px","background-color","#444444","border-radius","4px","border","1px solid #6a6a6a","padding","4px",3,"change"],["routerLink","/search"],["routerLink","/users"],["routerLink","/artists"],["routerLink","/inventory"],["routerLink","/discount-gift-cards"],["value","","placeholder","Hallo dies das",4,"ngIf"],[3,"click",4,"ngIf"],["routerLink","/admin"],["routerLink","/whats-app-latest-messages"],[3,"routerLink"],["value","","placeholder","Hallo dies das"]],template:function(r,s){r&1&&W(0,KGi,17,1,"div",0)(1,iWi,145,7,"div",1),r&2&&Je(s.showAll?1:0)},dependencies:[Ct,At,Yt,Lt,Zs,kK,cf],styles:[".small-buttons[_ngcontent-%COMP%]   nxt-button[_ngcontent-%COMP%]{font-size:12px!important}.wrapper[_ngcontent-%COMP%]{height:100%;background-color:#2a2a2a}.item[_ngcontent-%COMP%]{width:100%;padding:20px;color:#bbb}.font-size-1[_ngcontent-%COMP%]{font-size:32px}.font-size-2[_ngcontent-%COMP%]{font-size:24px;padding-bottom:8px}.dynamic-height[_ngcontent-%COMP%]{display:grid;grid-template-rows:1fr;transition:grid-template-rows 2s ease-in}.dynamic-height.hide[_ngcontent-%COMP%]{grid-template-rows:0fr}"]});let t=e;return t})()});var XU,xvt=Q(()=>{jo();Yc();XU=class{static resort(e){if(e){for(let n of e)n.fastWalkInNo===-1&&(n.start-Qt.DURATION_1MINUTE*10>Date.now()?n.sortValue=n.start.toString():n.sortValue="0000");e.sort(Hr.sortString("sortValue"))}}}});function nWi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td"),y(4),p()()),t&2){let n=e.$implicit;g(2),Ke(" ",n.name," "),g(2),Ke(" ",n.amount," ")}}var bvt,wvt=Q(()=>{Gi();Zi();ri();me();ji();bvt=(()=>{let e=class e extends bt{constructor(i,r){super(),this.dialogRef=i,this.cdRef=r,this.inventoryItems=[]}ngOnInit(){}nxtOnDestroy(){}backClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-piercing-manager-inventory-check"]],standalone:!0,features:[et,xe],decls:17,vars:1,consts:[[1,"w-full","h-full","flex","flex-col","border-1-red"],[1,"flex","flex-row","w-full","justify-center"],[1,"flex","flex-row","grow","border-2-blue"],[1,"nxt-table","h-fit"],[4,"ngFor","ngForOf"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div"),y(3,"What material did you use?"),p()(),h(4,"div",2)(5,"table",3)(6,"tr")(7,"td"),y(8,"Name"),p(),h(9,"td"),y(10,"aktuelle Menge"),p()(),W(11,nWi,5,2,"tr",4),p()(),h(12,"div")(13,"nxt-button",5),F("click",function(){return s.backClicked()}),y(14,"Back"),p(),h(15,"nxt-button"),y(16,"Finished"),p()()()),r&2&&(g(11),b("ngForOf",s.inventoryItems))},dependencies:[Hi,Lt]});let t=e;return t})()});function sWi(t,e){if(t&1){let n=re();h(0,"div",2)(1,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.window.location.reload())}),y(2,"reload"),p()()}}function oWi(t,e){if(t&1){let n=re();h(0,"div",22),F("click",function(){V(n);let r=w(3);return B(r.cancelClicked())}),h(1,"mat-icon",21),y(2,"cancel"),p()()}}function aWi(t,e){t&1&&(h(0,"div",23),y(1,"in progress..."),p())}function lWi(t,e){t&1&&(h(0,"div",23),y(1,"in pause..."),p())}function cWi(t,e){if(t&1&&(h(0,"div",24)(1,"div",25),y(2),p()()),t&2){let n=w(3);g(2),Ke("Walk-In ",n.data.currentCustomer.fastWalkInNo,"")}}function dWi(t,e){if(t&1&&(h(0,"div",24)(1,"div",26),y(2),Ce(3,"nxtDate"),p()()),t&2){let n=w(3);g(2),Ke("Appointment ",Nt(3,1,n.data.currentCustomer.start,"HH:mm"),"")}}function uWi(t,e){if(t&1&&(h(0,"div",27),y(1),p()),t&2){let n=w(3);g(),ye(n.data.currentCustomer.fullName)}}function hWi(t,e){t&1&&(h(0,"div",28),y(1,"START WORK \u279E"),p())}function pWi(t,e){if(t&1&&(h(0,"div",29),y(1),p()),t&2){let n=e.$implicit,i=w(3);b("ngStyle",sn(2,rWi,i.data.currentCustomer.bodyPuts.length<3?"100%":"65%")),g(),Ke(" ",n," ")}}function mWi(t,e){if(t&1){let n=re();h(0,"div",12),W(1,oWi,3,0,"div",13),h(2,"div",14),F("click",function(){V(n);let r=w(2);return B(r.currentCustomerClicked())}),W(3,aWi,2,0,"div",15)(4,lWi,2,0,"div",15)(5,cWi,3,1,"div",16)(6,dWi,4,4,"div",16)(7,uWi,2,1,"div",17)(8,hWi,2,0,"div",18)(9,pWi,2,4,"div",19),p(),h(10,"div",20),F("click",function(){V(n);let r=w(2);return B(r.nextClicked())}),h(11,"mat-icon",21),y(12,"task_alt"),p()()()}if(t&2){let n=w(2);g(),b("ngIf",n.showCancel&&n.data.currentCustomer.fastWalkInNo!==0),g(2),b("ngIf",n.data.currentCustomer.fastWalkInNo!==0),g(),b("ngIf",n.data.currentCustomer.fastWalkInNo===0),g(),b("ngIf",n.data.currentCustomer.fastWalkInNo>0),g(),b("ngIf",n.data.currentCustomer.fastWalkInNo===-1),g(),b("ngIf",n.data.currentCustomer.fastWalkInNo!==0),g(),b("ngIf",n.data.currentCustomer.fastWalkInNo===0),g(),b("ngForOf",n.data.currentCustomer.bodyPuts)}}function fWi(t,e){if(t&1&&(h(0,"div",32),y(1),p()),t&2){let n=w().$implicit;g(),Ke("Walk-In ",n.fastWalkInNo,"")}}function gWi(t,e){if(t&1&&(h(0,"div",32),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w().$implicit;g(),ye(Nt(2,1,n.start,"dd.MM HH:mm"))}}function vWi(t,e){if(t&1&&(h(0,"div",37)(1,"div"),y(2),p()()),t&2){let n=e.$implicit;g(2),ye(n)}}function yWi(t,e){if(t&1&&(h(0,"div")(1,"div",30)(2,"div",31),W(3,fWi,2,1,"div",32)(4,gWi,3,4,"div",32),p(),h(5,"div",33)(6,"div",25)(7,"div",34),y(8),p()(),h(9,"div",35),W(10,vWi,3,1,"div",36),p()()()()),t&2){let n=e.$implicit;g(3),Je(n.fastWalkInNo>-1?3:4),g(5),ye(n.fullName),g(2),b("ngForOf",n.bodyPuts)}}function _Wi(t,e){if(t&1){let n=re();h(0,"div",4)(1,"div",5)(2,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.clearSession())}),y(3,"Session l\xF6schen"),p(),h(4,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.reOpenEvents())}),y(5,"Alle Termine \xF6ffnen"),p(),h(6,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.clearSortValues())}),y(7,"Sortierung wiederherstellen"),p(),h(8,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.setEventsToToday())}),y(9,"Termine auf heute"),p()(),h(10,"div",6)(11,"div",7),y(12),p()(),h(13,"div",8),W(14,mWi,13,8,"div",9),p(),h(15,"div",10),W(16,yWi,11,3,"div",11),p()()}if(t&2){let n=w();g(12),Ke("Hello ",n.artistSession==null?null:n.artistSession.artistName,""),g(2),b("ngIf",n.data.currentCustomer),g(2),b("ngForOf",n.data.nextPossibleCustomers)}}var rWi,Svt,Tvt=Q(()=>{Gi();jo();$v();xvt();wvt();$n();go();An();Ja();il();Zi();Vt();ri();B8();Bd();me();yi();Ci();Kr();jl();Vt();An();rWi=t=>({fontSize:t});Svt=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.socketService=i,this.dialogService=r,this.loginService=s,this.permissionService=o,this.window=window,this.showCancel=!0}ngOnInit(){return O(this,null,function*(){this.startResortInterval(),this.startUp(),this.piercingInventoryStockItems=yield this.socketService.getPiercingInventoryStockItems()})}startUp(){return O(this,null,function*(){if((yield this.socketService.piercingManagerGetSession())||(yield this.dialogService.showYesNo("No Piercing-Session started",{yesText:"Start",noText:"Cancel",fontSize:"200%"}))&&(yield this.socketService.piercingManagerStartSession()),this.artistSession=yield this.socketService.piercingManagerGetArtistSession(),!this.artistSession){let r=yield this.socketService.piercingManagerGetAvailableArtists();if(r.length===0){this.dialogService.showOk("No available artists");return}else{let s=yield this.dialogService.showButtonChooserNew({buttonRows:[r.map(o=>({value:o,text:o}))],title:"Who are you?",hideBackButton:!0});s?.value&&(this.artistSession=yield this.socketService.piercingManagerStartArtistSession(s.value))}}this.dataSubscription?.unsubscribe(),this.dataSubscription=this.socketService.subscribeNew("getPiercingManagerData",r=>O(this,null,function*(){this.data=r,XU.resort(this.data.nextPossibleCustomers),this.artistSession=r.artistSession,this.artistSession?.artistName||(this.dialogService.showOk("Wrong login"),this.startUp())}),{emitInitial:!0,emitAfterReconnect:!0}),this.artistSession&&this.artistSession.state==="search-next-customer"&&this.startNextCustomer()})}nxtOnDestroy(){this.dataSubscription?.unsubscribe(),Cu.clear(this.resortInterval)}nextClicked(){return O(this,null,function*(){let i="";if(this.data.currentCustomer.fastWalkInNo>0?i+="Walk-In "+this.data.currentCustomer.fastWalkInNo:i+="Appointment "+this.data.currentCustomer.start.dateFormat("HH:mm"),i+=`
<strong>`+this.data.currentCustomer.fullName+`</strong>
finished?`,this.data.currentCustomer.fastWalkInNo===0||(yield this.dialogService.showYesNo(i,{yesText:"Yes",noText:"No",fontSize:"250%",textAlign:"center"}))){if(this.data.currentCustomer.fastWalkInNo!==0&&!(yield this.checkInventoryCurrentCustomer()))return;this.data.currentCustomer.eventId&&(yield this.socketService.piercingManagerEventFinished(this.data.currentCustomer.eventId)),this.startNextCustomer()}})}startNextCustomer(){return O(this,null,function*(){let i=yield this.socketService.piercingManagerGetNextCustomer();if(i){if(i.fastWalkInNo===-2){this.dialogService.showOk("No more customers");return}let r="No. "+i.fastWalkInNo+`
`+i.fullName+`
<small>`+i.bodyPuts.join(`
`)+"</small>";i.fastWalkInNo===-1&&(r="Start: "+i.start.dateFormat("HH:mm")+`
`+i.fullName+`
<small>`+i.bodyPuts.join(`
`)+"</small>");let s=yield this.dialogService.showYesNoCancel(r,{yesText:"START",noText:"NOT HERE",fontSize:"250%",textAlign:"center",title:"NEXT",cancelText:"PAUSE"});if(typeof s=="boolean")if(s){let o=yield this.socketService.piercingManagerStartCustomer(i.eventId);o.canStart||(yield this.dialogService.showOk(o.text),this.startNextCustomer())}else{let o=yield this.dialogService.showInput({message:"Um wieviel Pl\xE4tze verschieben?",prompt:1,isNumber:!0});o&&(yield this.socketService.piercingManagerNotHere(this.data.nextPossibleCustomers[0].eventId,o)),this.startNextCustomer()}else yield this.socketService.piercingManagerStartPause()}})}clearSession(){return O(this,null,function*(){yield this.socketService.piercingManagerClearSession(),Cm.reload("Clear Session")})}reOpenEvents(){return O(this,null,function*(){yield this.socketService.piercingManagerReOpenEvents()})}clearSortValues(){return O(this,null,function*(){yield this.socketService.piercingManagerClearSortValues()})}setEventsToToday(){return O(this,null,function*(){let i=yield this.dialogService.showInput({message:"Termin von",prompt:"2023-08-07"});i&&(yield this.socketService.piercingManagerSetEventsToToday(i))})}startResortInterval(){this.resortInterval=setInterval(()=>{this.data&&XU.resort(this.data.nextPossibleCustomers)},Qt.DURATION_1MINUTE*3)}checkInventoryCurrentCustomer(){return O(this,null,function*(){if(window.location.hostname!=="localhost")return!0;let i=this.dialogService.showComponentFull(bvt);return this.piercingInventoryStockItems=yield this.socketService.getPiercingInventoryStockItems(),i.componentInstance.inventoryItems=this.piercingInventoryStockItems,yield Sn(i.afterClosed()),!1})}cancelClicked(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Cancel?",{yesText:"Cancel",noText:"BACK",fontSize:"200%"}))&&this.startNextCustomer()})}currentCustomerClicked(){return O(this,null,function*(){if(!this.permissionService.hasPermission(Zt.PiercingManager_AddInfo)||!this.data.currentCustomer.eventId)return;let i=[];i.push({value:"add-info",text:"Info zum Termin"});let r=yield this.dialogService.showButtonChooserNew({buttonRows:[i],title:"",hideBackButton:!0});if(r)if(r.value==="add-info"){let s=yield this.dialogService.showTextarea({message:"Info zum Termin",prompt:"",buttonText:"Speichern"});s&&(s=this.loginService.getUsername()+": "+s,this.socketService.piercingManagerAddInfo(this.data.currentCustomer.eventId,s))}else r.value==="change"&&this.dialogService.showOk("Kommt noch ;)")})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(Fi),R(ws))},e.\u0275cmp=_e({type:e,selectors:[["nxt-piercing-manager"]],standalone:!0,features:[et,xe],decls:2,vars:2,consts:[["class","nxt-page w-full h-100","fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["class","nxt-page","fxLayout","column",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center",1,"nxt-page","w-full","h-100"],[3,"click"],["fxLayout","column",1,"nxt-page"],["fxLayout","row","nxtPermission","IsJulian"],["fxLayout","row","fxLayoutAlign","center",1,"w-full"],[1,"text-180"],["fxFlex","","fxLayout","row","clasS","w-full","fxLayoutAlign","center center"],["class","current-user-box","fxLayout","row",4,"ngIf"],["fxLayout","row","fxLayoutGap","10px","fxLayoutAlign","start center",1,"scrollable","w-full"],[4,"ngFor","ngForOf"],["fxLayout","row",1,"current-user-box"],["fxFlex","15%","class","border-left button-cancel background-red mouse-pointer","fxLayoutAlign","center center",3,"click",4,"ngIf"],["fxFlex","","fxLayout","column","fxLayoutAlign","center center",1,"current-user-text",3,"click"],["class","text-70",4,"ngIf"],["class","text-130 w-full pt-1","style","line-height: 0.8",4,"ngIf"],["class","text-140",4,"ngIf"],["class","text-140 py-5",4,"ngIf"],[3,"ngStyle",4,"ngFor","ngForOf"],["fxFlex","15%","fxLayoutAlign","center center",1,"border-right","button-finish","background-green","mouse-pointer",3,"click"],[2,"font-size","80px","width","fit-content","height","fit-content"],["fxFlex","15%","fxLayoutAlign","center center",1,"border-left","button-cancel","background-red","mouse-pointer",3,"click"],[1,"text-70"],[1,"text-130","w-full","pt-1",2,"line-height","0.8"],["fxLayoutAlign","center"],["fxLayoutAlign","center",1,"text-70"],[1,"text-140"],[1,"text-140","py-5"],[3,"ngStyle"],[1,"next-possible-customer"],["fxLayoutAlign","center","fxLayout","column"],[1,"text-120","center","bold"],["fxLayout","column"],[1,"text-120","pb-2"],["fxFlex","","fxLayout","column","fxLayoutAlign","center center"],["style","text-align: center;",4,"ngFor","ngForOf"],[2,"text-align","center"]],template:function(r,s){r&1&&W(0,sWi,3,0,"div",0)(1,_Wi,17,3,"div",1),r&2&&(b("ngIf",!s.data),g(),b("ngIf",s.data))},dependencies:[Ct,At,Yt,$r,oi,qi,Lt,Zs,Zr,Hi,rr,Dn,rs,Hn],styles:["[_nghost-%COMP%]   .border-left[_ngcontent-%COMP%]{border-top-left-radius:15px;border-bottom-left-radius:15px}[_nghost-%COMP%]   .border-top[_ngcontent-%COMP%]{border-top-left-radius:15px;border-top-right-radius:15px}[_nghost-%COMP%]   .border-bottom[_ngcontent-%COMP%]{border-bottom-left-radius:15px;border-bottom-right-radius:15px}[_nghost-%COMP%]   .border-right[_ngcontent-%COMP%]{border-top-right-radius:15px;border-bottom-right-radius:15px}[_nghost-%COMP%]   .current-user-box[_ngcontent-%COMP%]{font-size:300%;background-color:#5a5a5a;border-radius:15px;width:90%}[_nghost-%COMP%]   .current-user-box[_ngcontent-%COMP%]   .current-user-text[_ngcontent-%COMP%]{padding:10px}[_nghost-%COMP%]   .next-possible-customer[_ngcontent-%COMP%]{min-height:30vh;min-width:200px;background-color:#5a5a5a;white-space:nowrap;border-radius:15px;padding:8px}[_nghost-%COMP%]   .next-possible-customer[_ngcontent-%COMP%]   .number-view[_ngcontent-%COMP%]{border-top-left-radius:15px;border-bottom-left-radius:15px}[_nghost-%COMP%]   .fast-walk-in-no[_ngcontent-%COMP%]{background-color:#4b4b4b}"]});let t=e;return t})()});var ase,B9e=Q(()=>{Gi();Qo();Pa();ls();Jr();Vt();Rv();M7();me();ji();yi();Ci();Vt();ase=(()=>{let e=class e extends bt{constructor(i,r,s){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.columnDefs=[{headerName:"Text",field:"description",maxWidth:500},{headerName:"F\xFCr",valueGetter:o=>o.data.toDoByUser?o.data.toDoByUser:Cg.getText(o.data.toDoByWorkplace)},{headerName:"Erstellt",field:"createdAt",nxtFieldType:Ee.Date_germanDateTime},{headerName:"F\xE4llig original",field:"originalReminderDateTime",nxtFieldType:Ee.Date_germanDateTime},{headerName:"F\xE4llig",field:"reminderDateTime",nxtFieldType:Ee.Date_germanDateTime},{headerName:"Erledigt von",field:"doneBy",nxtFieldType:Ee.Text},{headerName:"Erledigt",field:"doneAt",nxtFieldType:Ee.Date_germanDateTime},{headerName:"Typ",field:"type"},{headerName:"Info",field:"refType",cellRenderer:o=>{if(o.value==="event")return o.data?.refObj?.title||"Termin"},nxtOnCellClicked:o=>{o.data.refType==="event"&&this.dialogService.showEvent(o.data.refId)},getQuickFilterText:o=>{if(o.data.refType==="event"&&Vu.isEvent(o.data?.refObj))return o.data?.refObj?.title}}],this.quickFilterText=""}ngOnInit(){return O(this,null,function*(){this.reminders=yield this.socketService.getRemindersSince(Date.now().dateAddDays(-5).dateFormat("yyyy-MM-dd"),!0),this.reminders=this.reminders.sortNumber("originalReminderDateTime",!0)})}nxtOnDestroy(){}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-reminders"]],standalone:!0,features:[et,xe],decls:9,vars:4,consts:[["fxLayout","column",1,"nxt-page","w-full","h-100"],["fxLayout","row","fxLayoutAlign","between"],["fxFlex",""],["placeholder","Suche",3,"valueChange","value"],[3,"click"],["fxFlex","","fxLayout","row"],[1,"h-100","w-full",3,"quickFilterText","columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"nxt-input",3),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p()(),h(4,"div")(5,"nxt-button-icon",4),F("click",function(){return s.close()}),y(6,"close"),p()()(),h(7,"div",5),ee(8,"nxt-datagrid",6),p()()),r&2&&(g(3),qe("value",s.quickFilterText),g(5),b("quickFilterText",s.quickFilterText)("columnDefs",s.columnDefs)("rowData",s.reminders))},dependencies:[At,Yt,oi,qi,Yi,an,dr]});let t=e;return t})()});var lse,Dvt=Q(()=>{ef();zn();lse=class{static getDateOfExpiry(e){let n=new Date(Ie.parse(e));return n.setMonth(0),n.setDate(1),n.setFullYear(n.getFullYear()+4),n.getTime()}static generateCode(e){let n=ua.generate().substr(0,30).toUpperCase().replace(/-/g,"");return n=n.substr(0,4)+"-"+n.substr(16,4)+"-"+n.substr(20,4),e+"-"+n}static getSubTypeFromLineItem(e){if(e.name.toLowerCase().includes("daysession")||e.name.toLowerCase().includes("doublesession"))return"day-session"}}});function DWi(t,e){if(t&1){let n=re();vs(0),h(1,"div",25)(2,"nxt-radio",26),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.discountAction,r)||(s.discountAction=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.discountChanged())}),p()(),ys()}if(t&2){let n=w();g(2),qe("value",n.discountAction),b("options",n.discountActions)}}function EWi(t,e){if(t&1&&ee(0,"nxt-date-picker",27),t&2){let n=w();b("readonly",!0)("nxtFormControl",n.form.get("createdAt"))}}function MWi(t,e){if(t&1&&ee(0,"nxt-input",28),t&2){let n=w();b("nxtFormControl",n.form.get("discountReason"))}}function kWi(t,e){if(t&1&&ee(0,"nxt-autocomplete",29),t&2){let n=w();b("nxtFormControl",n.form.get("paymentPaypalTransaction"))("options",n.notAssignedPaypalPayments)("displayWith",n.displayPaypalTransactionFn)("displayInOptionWith",n.displayPaypalTransactionOptionFn)("maxOptionsToShow",20)("filterFields",bn(6,TWi))}}function IWi(t,e){if(t&1&&(h(0,"mat-radio-group",30)(1,"mat-radio-button",31),y(2,"normaler Gutschein"),p(),h(3,"mat-radio-button",32),y(4,"nur f\xFCr Tagessession"),p(),h(5,"mat-radio-button",33),y(6,"Mindestpreis festlegen"),p(),h(7,"mat-radio-button",34),y(8,"Google Bewertung"),p()()),t&2){let n=w();b("formControl",n.form.get("additionalPrintText"))}}function AWi(t,e){if(t&1&&ee(0,"nxt-input",35),t&2){let n=w();b("isMoney",!0)("nxtFormControl",n.form.get("customRestrictionValue"))}}function PWi(t,e){t&1&&(h(0,"div",36),y(1,"DRUCKER IST NICHT AN! --> ANSCHALTEN"),p())}function RWi(t,e){t&1&&(h(0,"div",37),y(1,"DRUCKER IST AN!"),p())}var Evt,CWi,xWi,bWi,wWi,SWi,TWi,cse,z9e=Q(()=>{qn();Ci();Ld();Ep();Jr();tp();Vd();ef();Yc();Evt=Gs(Jm());zn();kl();Bd();ji();Zi();aD();rA();ox();Ah();oo();ih();th();s3();ri();Vt();Dvt();J4e();nc();me();qn();ji();yi();Ci();Kr();j5();jl();Cs();Vt();CWi=["valueInput"],xWi=t=>({name:"autorenew",tooltip:"neu generieren",click:t}),bWi=()=>({text:"Kasse",value:"cash"}),wWi=()=>({text:"Paypal",value:"paypal"}),SWi=(t,e)=>[t,e],TWi=()=>["from","message","value","transactionTime"];cse=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d,u){this.fb=i,this.dialogRef=r,this.data=s,this.socketService=o,this.dialogService=a,this.loginService=l,this.downloadService=c,this.permissionService=d,this.configService=u,this.discountActions=[],this.discountPercentage=0,this.notAssignedPaypalPayments=[],this.buttonOkDisabled=!1,this.printerIsAvailable=-1,this.checkPrinterTimeoutIsRunning=!1,this.enableRestriction=!1,this.disableRestriction=!1,this.giftCardCount="1",this.showCustomRestriction=!1,this.form_name=new $t(this.getRandomId()),this.payments=this.fb.array([]),this.disableDiscountPromo=!1,this.refreshInInputClicked=()=>{this.generateGiftCardNumber()},document.body.style.backgroundColor="transparent !important",this.loadNotAssignedPaypalPayments(),this.form=this.getFormGroup(),this.form.get("value").valueChanges.subscribe(m=>{this.discountAction?.percentage?this.calcPaymentValue():this.discountPercentageChanged()}),this.form.get("paymentValue").valueChanges.subscribe(m=>{!m||parseFloat(m)===0?(this.enableRestriction=!0,this.generateGiftCardNumber()):(this.enableRestriction=!1,this.form.get("additionalPrintText").setValue(""),this.form.get("customRestrictionValue").setValue(""),this.showCustomRestriction=!1,this.generateGiftCardNumber()),this.discountAction?.percentage?this.calcValue():this.calcDiscountPercentage()}),this.form.get("additionalPrintText").valueChanges.subscribe(m=>{m==="custom"?this.showCustomRestriction=!0:(this.showCustomRestriction=!1,this.form.get("customRestrictionValue").setValue("")),this.generateGiftCardNumber(),m==="Google Bewertung"&&!this.form.get("discountReason").value&&(this.form.get("discountReason").setValue(m),this.form.get("customRestrictionValue").setValue(100))}),this.configService.config.value.studioRegion==="AC"||this.configService.config.value.studioRegion,this.discountActions=[{name:"XMAS15",percentage:15,minPaymentValue:5,validFrom:"2024-01-01".dateParse(),disableDiscountPromo:!0}],this.configService.config.value.studioRegion==="STAGING"&&(this.discountActions=[{name:"XMAS15",percentage:15,minPaymentValue:5,validFrom:"2024-01-01".dateParse(),disableDiscountPromo:!0}])}getFormGroup(){let i=this.fb.group({id:new $t(ua.generate()),name:this.form_name,createdAt:new $t(new Date,[ii.requiredAndNotNaN]),customer:new $t,value:new $t(null,[ii.requiredAndNotNaN]),paymentValue:new $t(null,[ii.requiredAndNotNaN]),additionalInfo:new $t(""),additionalPrintText:new $t(""),customRestrictionValue:new $t(""),paymentMethod:new $t("cash"),discountReason:new $t(""),paymentPaypalTransaction:new $t(null)});return i.get("name"),i}ngOnInit(){}ngAfterViewInit(){}ngOnDestroy(){}saveAndClose(){return O(this,null,function*(){if(this.form.get("paymentMethod").value==="paypal"&&!this.form.get("paymentPaypalTransaction").value.id){this.dialogService.showOk("Du musst eine PayPal-Zahlung ausw\xE4hlen");return}if(this.discountAction?.minPaymentValue&&this.form.get("paymentValue").value<this.discountAction?.minPaymentValue){this.dialogService.showOk("Erst ab "+this.discountAction?.minPaymentValue.toMoneyString());return}let i=parseInt(this.giftCardCount,10),r="kein Gutschein generiert",s=0;for(let o=0;o<i&&(s=o+1,r=yield this.save(),r==="OK");o++)this.generateGiftCardNumber(),this.form.get("id").setValue(ua.generate());r==="OK"?this.close(r):typeof r=="string"&&(i>1?this.dialogService.showOk("Fehler beim generieren "+s+" / "+i+`
`+r):this.dialogService.showOk(r))})}displayPaypalTransactionOptionFn(i,r){if(typeof i=="string")return i;if(i&&i.from){let{from:s,transactionTime:o,value:a,originalValue:l,message:c}=i,d="";return i&&(d="<div>",d+=`<span style="font-size: larger">${r(s)}</span>`,d+=`<br/>${r(Ie.format(o,"dd.MM.yyyy HH:mm"))} - ${r((0,Evt.default)(o).fromNow())}`,l&&a!==l?d+=`<br/>${Wn.toMoneyString(a)} von ${Wn.toMoneyString(l)}`:d+=`<br/>${Wn.toMoneyString(a)}`,d+=`<br/>${r(c)}`,d+="</div>"),d}}displayPaypalTransactionFn(i){return i?Wn.roundToString(i.value,2)+" \u20AC - "+i.from:void 0}check(){return O(this,null,function*(){if(Is.getErrors(this.form).length>0)return yield this.dialogService.showOk("\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F Eingabe fehlt \u{1F926}\u{1F3FC}\u200D\u2642\uFE0F"),!1;if(this.form.get("additionalPrintText").value==="custom"&&!this.form.get("customRestrictionValue").value)return yield this.dialogService.showOk('\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F Bruder, wenn du "Mindespreis festlegen" anklickst, musst du auch einen eintragen \u{1F926}\u{1F3FC}\u200D\u2642\uFE0F'),!1;if(this.form.get("paymentPaypalTransaction").value){let i=this.form.get("paymentPaypalTransaction").value,r=fn.roundMoney(this.form.get("paymentValue").value),s=i.value;if(s<r)return this.dialogService.showOk("Habibi der Kunde hat nur "+Wn.toMoneyString(s)+` bezahlt...
Versuchs nochmal`),!1}return!0})}save(){return O(this,null,function*(){if(yield this.check()){let i;try{let r=!0;this.permissionService.hasPermission(Zt.GiftCards_Download)&&(r=yield this.dialogService.showYesNo("Drucken oder Herunterladen?",{yesText:"Drucken",noText:"Herunterladen"}));let s=St(ve({},this.form.getRawValue()),{type:"gift-card",assignments:[],assigned:!1,createdBy:this.loginService.getUsername(),studio:this.loginService.getStudio()});if(s.paymentMethod==="paypal"&&(s.paymentMethodId=this.form.get("paymentPaypalTransaction").value.transactionId,delete s.paymentPaypalTransaction),s.createdAt=Date.now(),this.form.get("customRestrictionValue").value&&(s.additionalPrintText=this.getAdditionalPrintTextFromCustomValue(this.form.get("customRestrictionValue").value)),s.additionalPrintText==="daySession"&&(s.additionalPrintText=`Einzul\xF6sen nur in Verbindung
mit einer Tagessesion
Angebote ausgenommen`),s.additionalPrintText==="thankYou"&&(s.additionalPrintText=""),s.validTill=lse.getDateOfExpiry(Date.now()),s.validFrom=Date.now(),this.discountAction?(s.additionalInfo=this.discountAction.name,s.validFrom=this.discountAction.validFrom,s.disableDiscountPromo=this.discountAction.disableDiscountPromo,s.additionalPrintText=`Nicht auf Tattoos mit
einem Aktionspreise einzul\xF6sen`):(s.disableDiscountPromo=this.disableDiscountPromo,s.disableDiscountPromo&&(s.additionalPrintText=`Nicht auf Tattoos mit
einem Aktionspreise einzul\xF6sen`)),s.discountPercentage=GA.getDiscountPercentage(s.value,s.paymentValue),s.originalValue=s.value,s.originalPaymentValue=s.paymentValue,i=yield this.socketService.createPaymentPossibilityRecord(s,r),Gn.info(i),!r){this.dialogService.showLoading(_n.DownloadVoucher,"lade Gutschein...");let o=yield this.socketService.getVoucherPdfByCode(s.name);this.downloadService.downloadBase64("Gutschein.pdf",o.base64),this.dialogService.hideLoading(_n.DownloadVoucher),this.dialogService.showOk(`ACHTUNG - ACHTUNG - ACHTUNG

Du hast ein Gutschein heruntergeladen, sei dir zu 100% sicher, dass du die richtige Datei verschickst!`,{buttonText:"JA ICH KONTROLLIERE DAS ANHAND DES DATEI-ERSTELL-DATUMS"})}}catch(r){Gn.error(r),this.form.get("createdAt").disable()}return i}return!1})}closeClicked(){return O(this,null,function*(){this.close(!1)})}close(i){return O(this,null,function*(){this.dialogRef.close(i)})}getRandomId(){let i=ua.generate().substr(0,30).toUpperCase().replace(/-/g,"");return i=i.substr(0,4)+"-"+i.substr(16,4)+"-"+i.substr(20,4),this.form&&this.form.get("additionalPrintText").value==="thankYou"?"GD-"+i:this.form&&this.form.get("paymentValue").value===0?"F-"+i:this.form&&this.form.get("paymentValue").value<this.form.get("value").value?"R-"+i:"G-"+i}generateGiftCardNumber(){let i=this.getRandomId();this.form.get("name").setValue(i)}checkPrinterAvailable(){return O(this,null,function*(){this.printerIsAvailable=(yield this.socketService.isPrinterAvailable(this.loginService.getStudio()))?1:0,this.checkPrinterTimeoutIsRunning&&(this.checkPrinterTimeout=setTimeout(()=>O(this,null,function*(){return this.checkPrinterAvailable()}),3e3))})}buttonOkClicked(){return O(this,null,function*(){this.buttonOkDisabled===!1&&(this.buttonOkDisabled=!0,yield this.saveAndClose(),this.buttonOkDisabled=!1)})}getAdditionalPrintTextFromCustomValue(i){return`Einzul\xF6sen bei einem
Mindestpreis von `+Wn.toMoneyString(i,"\u20AC",!1)}downloadPdf(){return O(this,null,function*(){if(this.form.get("value").value){let i=yield this.socketService.getVoucherPdf(this.form.get("value").value,this.form.get("name").value,Date.now());this.downloadService.downloadBase64("Gutschein.pdf",i)}})}discountPercentageChanged(){this.discountPercentage>100&&(this.discountPercentage=100),this.discountPercentage<=0&&(this.discountPercentage=0);let i=this.form.get("value").value,r=fn.roundMoney(i-i*this.discountPercentage/100);this.form.get("paymentValue").value!==r&&this.form.get("paymentValue").setValue(r,{onlySelf:!0,emitEvent:!1}),this.discountPercentage>0?this.form.get("discountReason").setValidators([ii.requiredAndNotNaN]):this.form.get("discountReason").setValidators([]),this.form.get("discountReason").updateValueAndValidity({emitEvent:!1}),this.calcDisableDiscountPromo()}paymentMethodChange(){this.form.get("paymentMethod").value==="paypal"?this.form.get("paymentPaypalTransaction").setValidators([ii.requiredAndNotNaN]):this.form.get("paymentPaypalTransaction").setValidators([]),this.form.get("paymentPaypalTransaction").updateValueAndValidity({emitEvent:!1})}paypalPaymentsChange(){}loadNotAssignedPaypalPayments(){return O(this,null,function*(){let i=Hr.sort(yield this.socketService.getNotAssignedPaypalTransactions(),"transactionTime",!0);this.notAssignedPaypalPayments=i.filter(r=>r.direction==="in")})}discountChanged(){this.discountAction&&(this.form.get("discountReason").setValue(this.discountAction.name),this.discountPercentage=this.discountAction.percentage,this.discountPercentageChanged(),this.disableDiscountPromo=!0),this.generateGiftCardNumber()}calcValue(){let i=this.form.get("paymentValue").value,r=fn.roundMoney(i/((100-this.discountPercentage)/100));this.form.get("value").value!==r&&this.form.get("value").setValue(r,{onlySelf:!0,emitEvent:!1})}calcDiscountPercentage(){let i=this.form.get("value").value,r=this.form.get("paymentValue").value,s=0;r<i&&(s=Math.round((i-r)/i*100)),this.discountPercentage!==s&&(this.discountPercentage=s)}calcPaymentValue(){let i=this.form.get("value").value,r=this.form.get("paymentValue").value,s=i/100*(100-this.discountPercentage);s!==this.form.get("paymentValue").value&&this.form.get("paymentValue").setValue(s,{onlySelf:!0,emitEvent:!1})}calcDisableDiscountPromo(){this.discountPercentage===100||this.discountPercentage===0?this.disableDiscountPromo=!1:this.disableDiscountPromo=!0}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(Gt),R(Ou),R(lt),R(vt),R(Fi),R(X1),R(ws),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-gift-card-form"]],viewQuery:function(r,s){if(r&1&&ei(CWi,5),r&2){let o;Pt(o=Rt())&&(s.valueInput=o.first)}},standalone:!0,features:[xe],decls:33,vars:33,consts:[["valueInput",""],[2,"min-width","35vw",3,"formGroup"],["fxLayout","column"],["fxLayout","row"],["placeholder","Gutschein-Nummer","width","100%",3,"disableFocusOnInit","nxtFormControl","icon"],["fxFlex","","placeholder","Wert",3,"isMoney","nxtFormControl"],["fxLayout","row","fxLayoutAlign","space-between"],["fxLayoutGap","15px","fxLayoutAlign","center"],["fxFlex","200px","placeholder","Bezahlt",3,"isMoney","nxtFormControl"],["fxFlex","150px","placeholder","% Rabatt",3,"valueChange","disabled","isPercent","value"],[4,"ngIf"],["fxFlex","","placeholder","Datum",3,"readonly","nxtFormControl",4,"ngIf"],["fxFlex","","placeholder","Info (intern)",3,"nxtFormControl"],["fxFlex","","placeholder","Rabattgrund",3,"nxtFormControl",4,"ngIf"],["placeholder","Zahlart",3,"valueChange","nxtFormControl","options"],[3,"valueChange","disabled","value"],["nxtMatOptionClass","paypal-option","placeholder","Paypalzahlung","label","Paypalzahlung",3,"nxtFormControl","options","displayWith","displayInOptionWith","maxOptionsToShow","filterFields",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start end"],["style","display: flex;flex-direction: column;margin: 0 10px;",3,"formControl",4,"ngIf"],["placeholder","Mindestpreis",3,"isMoney","nxtFormControl",4,"ngIf"],["fxFlex",""],["style","color: red;",4,"ngIf"],["style","color: green;",4,"ngIf"],[2,"margin","auto",3,"click"],[2,"margin","auto",3,"click","disabled"],[1,"pb-3"],["direction","column","textKey","name",3,"valueChange","value","options"],["fxFlex","","placeholder","Datum",3,"readonly","nxtFormControl"],["fxFlex","","placeholder","Rabattgrund",3,"nxtFormControl"],["nxtMatOptionClass","paypal-option","placeholder","Paypalzahlung","label","Paypalzahlung",3,"nxtFormControl","options","displayWith","displayInOptionWith","maxOptionsToShow","filterFields"],[2,"display","flex","flex-direction","column","margin","0 10px",3,"formControl"],["value","",1,"studio-radio-button",2,"margin","10px 0"],["value","daySession",1,"studio-radio-button",2,"margin","10px 0"],["value","custom",1,"studio-radio-button",2,"margin","10px 0"],["value","Google Bewertung",1,"studio-radio-button",2,"margin","10px 0"],["placeholder","Mindestpreis",3,"isMoney","nxtFormControl"],[2,"color","red"],[2,"color","green"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2)(2,"div",3),ee(3,"nxt-input",4),p(),ee(4,"nxt-input",5,0),h(6,"div",6)(7,"div",7),ee(8,"nxt-input",8),h(9,"nxt-input",9),Xe("valueChange",function(l){return V(o),Ze(s.discountPercentage,l)||(s.discountPercentage=l),B(l)}),F("valueChange",function(){return V(o),B(s.discountPercentageChanged())}),p()(),W(10,DWi,3,2,"ng-container",10),p(),W(11,EWi,1,2,"nxt-date-picker",11),ee(12,"nxt-input",12),W(13,MWi,1,1,"nxt-input",13),h(14,"nxt-select",14),F("valueChange",function(){return V(o),B(s.paymentMethodChange())}),p(),h(15,"nxt-slide-toggle",15),Xe("valueChange",function(l){return V(o),Ze(s.disableDiscountPromo,l)||(s.disableDiscountPromo=l),B(l)}),y(16,"nicht bei Rabatt-Aktionen"),p(),W(17,kWi,1,7,"nxt-autocomplete",16),h(18,"div",17),W(19,IWi,9,1,"mat-radio-group",18)(20,AWi,1,2,"nxt-input",19),p(),h(21,"nxt-row")(22,"nxt-col",20),W(23,PWi,2,0,"div",21)(24,RWi,2,0,"div",22),p()(),ee(25,"br"),h(26,"nxt-row")(27,"nxt-col",20)(28,"nxt-button",23),F("click",function(){return V(o),B(s.closeClicked())}),y(29,"ABBRECHEN"),p()(),h(30,"nxt-col",20)(31,"nxt-button",24),F("click",function(){return V(o),B(s.buttonOkClicked())}),y(32),p()()()()()}r&2&&(b("formGroup",s.form),g(3),b("disableFocusOnInit",!0)("nxtFormControl",s.form.get("name"))("icon",sn(26,xWi,s.refreshInInputClicked)),g(),b("isMoney",!0)("nxtFormControl",s.form.get("value")),g(4),b("isMoney",!0)("nxtFormControl",s.form.get("paymentValue")),g(),b("disabled",!!s.discountAction)("isPercent",!0),qe("value",s.discountPercentage),g(),b("ngIf",s.discountActions.length>0),g(),b("ngIf",!1),g(),b("nxtFormControl",s.form.get("additionalInfo")),g(),b("ngIf",s.discountPercentage>0),g(),b("nxtFormControl",s.form.get("paymentMethod"))("options",bs(30,SWi,bn(28,bWi),bn(29,wWi))),g(),b("disabled",!!s.discountAction),qe("value",s.disableDiscountPromo),g(2),b("ngIf",s.form.get("paymentMethod").value==="paypal"),g(2),b("ngIf",!s.disableRestriction&&s.enableRestriction),g(),b("ngIf",s.showCustomRestriction),g(3),b("ngIf",s.printerIsAvailable===0),g(),b("ngIf",s.printerIsAvailable===1),g(7),b("disabled",s.buttonOkDisabled),g(),Ke("",s.buttonOkDisabled?"BITTE WARTEN...":"SPEICHERN"," "))},dependencies:[ko,Ko,$_,Ia,$c,e1,At,Yt,$r,oi,qi,Yi,Ct,tm,tl,$l,Nn,Ga,hg,h2,d5,jv,Lt],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}"]});let t=e;return t})()});function FWi(t,e){if(t&1&&(h(0,"div",28),y(1),p()),t&2){let n=w(4);g(),ye(n.form.get("bankConfirmedManualReason").value)}}function LWi(t,e){if(t&1&&(h(0,"div",26),y(1,"Einzahlung von Bank best\xE4tigt"),p(),W(2,FWi,2,1,"div",27)),t&2){let n=w(3);g(2),b("ngIf",n.form.get("bankConfirmedManualReason").value)}}function OWi(t,e){t&1&&(h(0,"div",25),y(1,"Einzahlung von Bank NICHT best\xE4tigt"),p())}function NWi(t,e){if(t&1&&(h(0,"div",24),W(1,LWi,3,1)(2,OWi,2,0,"div",25),p()),t&2){let n=w(2);g(),Je(n.form.get("bankConfirmed").value?1:2)}}function VWi(t,e){t&1&&(h(0,"div"),y(1,"Ben\xF6tigt kein Beleg"),p())}function BWi(t,e){if(t&1&&(ee(0,"img",33),Ce(1,"safeResourceUrl")),t&2){let n=w().$implicit;b("src",tt(1,1,"data:"+n.mimeType+";base64,"+n.base64),Ur)}}function zWi(t,e){if(t&1&&(ee(0,"img",33),Ce(1,"safeResourceUrl")),t&2){let n=w().$implicit;b("src",tt(1,1,n.thumbnailLink),Ur)}}function HWi(t,e){if(t&1){let n=re();h(0,"div",21),F("click",function(){V(n);let r=w(3);return B(r.openGoogleDrive())}),W(1,BWi,2,3,"img",32)(2,zWi,2,3,"img",32),p()}if(t&2){let n=e.$implicit;g(),b("ngIf",n.base64),g(),b("ngIf",!n.base64)}}function GWi(t,e){if(t&1&&(h(0,"div",29)(1,"div",30),W(2,HWi,3,2,"div",31),p()()),t&2){let n=w(2);g(2),b("ngForOf",n.files)}}function WWi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",21),F("click",function(){V(n);let r=w(2);return B(r.reUpload())}),y(2,"BELEG"),ee(3,"br"),y(4,"HOCHLADEN"),p()()}}function UWi(t,e){if(t&1){let n=re();h(0,"div",23)(1,"nxt-button",21),F("click",function(){V(n);let r=w(2);return B(r.noUploadNeededClicked())}),y(2,"BEN\xD6TIGT"),ee(3,"br"),y(4,"KEIN BELEG"),p()()}t&2&&b("permissionOr",bn(1,dse))}function jWi(t,e){if(t&1){let n=re();h(0,"div",23)(1,"nxt-button",21),F("click",function(){V(n);let r=w(2);return B(r.setBankConfirmedClicked())}),y(2,"BANK"),ee(3,"br"),y(4,"BEST\xC4TIGEN"),p()()}t&2&&b("permissionOr",bn(1,dse))}function $Wi(t,e){if(t&1){let n=re();h(0,"div",2)(1,"nxt-row")(2,"nxt-col",3)(3,"nxt-select",4),F("valueChange",function(r){V(n);let s=w();return B(s.articleChanged(r))}),p()()(),h(4,"nxt-row")(5,"nxt-col",3),ee(6,"nxt-input",5),p()(),h(7,"nxt-row")(8,"nxt-col",3),ee(9,"nxt-input",6),h(10,"div",7)(11,"nxt-slide-toggle",8),y(12," Tresor "),p()()()(),h(13,"nxt-row")(14,"nxt-col",3),ee(15,"nxt-date-picker",9),p(),h(16,"nxt-col",3),ee(17,"nxt-input",10),p()(),h(18,"nxt-row")(19,"nxt-col",3),ee(20,"nxt-select",11),p()(),h(21,"nxt-row")(22,"nxt-col",3),ee(23,"nxt-select",12),p()(),h(24,"nxt-row")(25,"nxt-col",3),ee(26,"nxt-input",13),p(),h(27,"nxt-col",3),ee(28,"nxt-input",14),p()(),h(29,"nxt-row")(30,"nxt-col",3),ee(31,"nxt-input",15),p(),h(32,"nxt-col",3),ee(33,"nxt-input",16),p()(),W(34,NWi,3,1,"div",17)(35,VWi,2,0,"div",18)(36,GWi,3,1,"div",19),h(37,"div",20)(38,"div")(39,"nxt-button",21),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(40,"ABBRECHEN"),p()(),W(41,WWi,5,0,"div",18)(42,UWi,5,2,"div",22)(43,jWi,5,2,"div",22),h(44,"div",23)(45,"nxt-button",21),F("click",function(){V(n);let r=w();return B(r.deleteClicked())}),y(46,"L\xD6SCHEN"),p()(),h(47,"div",23)(48,"nxt-button",21),F("click",function(){V(n);let r=w();return B(r.saveAndClose())}),y(49,"SPEICHERN"),p()()()()}if(t&2){let n=w();b("formGroup",n.form),g(3),b("options",n.articles)("nxtFormControl",n.form.get("articleId")),g(3),b("nxtFormControl",n.form.get("description")),g(3),b("nxtFormControl",n.form.get("value"))("isMoney",!0),g(2),b("nxtFormControl",n.form.get("_")),g(4),b("nxtFormControl",n.form.get("date")),g(2),b("nxtFormControl",n.form.get("time")),g(3),b("nxtFormControl",n.form.get("studio"))("options",n.studios),g(3),b("nxtFormControl",n.form.get("studioReal"))("options",n.studios),g(3),b("nxtFormControl",n.form.get("originalCreatedBy")),g(2),b("nxtFormControl",n.form.get("createdBy")),g(3),b("nxtFormControl",n.form.get("editedAt")),g(2),b("nxtFormControl",n.form.get("editedBy")),g(),b("ngIf",n.form.get("articleId").value==="transfer_bank"&&n.cashType==="outgoing"),g(),b("ngIf",n.googleDriveFolderId==="not-needed"),g(),b("ngIf",n.googleDriveFolderId),g(5),b("ngIf",n.canReupload),g(),b("ngIf",!n.googleDriveFolderId),g(),b("ngIf",!n.form.get("bankConfirmed").value),g(),b("permissionOr",bn(25,dse)),g(3),b("permissionOr",bn(26,dse))}}var Mvt,dse,H9e,kvt=Q(()=>{qn();Ld();Ep();zn();tp();ZU();Vd();Mvt=Gs(QI());pa();sA();Zi();th();mg();Jr();ih();aD();rA();ri();il();Vt();oo();nc();me();qn();ji();yi();Ci();Kr();Cs();KP();Vt();dse=()=>["IsJulian","IsNiklas","IsCapone"];H9e=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d){this.fb=i,this.dialogRef=r,this.socketService=s,this.dialogService=o,this.loginService=a,this.configService=l,this.cashReportCashService=c,this.cdRef=d,this.studios=this.configService.config.value.studios.map(u=>({value:u.name,text:u.name})),this.showDescription=!0,this.googleDriveFolderId="",this.canReupload=!1,this.noUploadNeeded=!1}loadFormId(i,r){return O(this,null,function*(){this.id=r,this.cashType=i,this.cashType==="incoming"?(this.allArticles=X6.articlesIncoming,this.articles=X6.articlesIncoming.filter(o=>o.id!=="").map(o=>({text:o.id,value:o.id}))):(this.allArticles=X6.articlesOutgoing,this.articles=X6.articlesOutgoing.filter(o=>o.id!=="").map(o=>({text:o.description+(o.price>-1?" - "+Wn.toMoneyString(o.price):""),value:o.id})));let s=yield this.cashReportCashService.getById(r,this.cashType);if(this.originalData=Sr.clone(s),!s)throw Error("no cash-report-cash found for id "+r+" and type "+this.cashType);this.articles.find(o=>o.value===s.articleId)||(this.showDescription=!0,this.articles.push({text:s.articleId,value:s.articleId})),this.googleDriveFolderId=s.googleDriveFolderId,this.googleDriveFolderId&&this.googleDriveFolderId!=="not-needed"&&setTimeout(()=>O(this,null,function*(){let o=window.location.origin.includes("localhost");this.files=yield this.socketService.getGoogleDriveFolder(this.googleDriveFolderId),this.cdRef.detectChanges()})),this.form=this.fb.group({id:new $t(s.id,[ii.requiredAndNotNaN]),articleId:new $t(s.articleId),date:new $t(new Date(Ie.parse(s.createdAt)),[ii.requiredAndNotNaN]),time:new $t(Ie.format(s.createdAt,"HH:mm"),[ii.requiredAndNotNaN]),studio:new $t(s.studio),studioReal:new $t(s.studioReal),createdAtDateString:new $t(s.createdAtDateString,[ii.requiredAndNotNaN]),createdBy:new $t(s.createdBy),value:new $t(s.value),description:new $t(s.description),editedAt:new $t(Ie.format(s.editedAt,"dd.MM.yyyy HH:mm:ss")),editedBy:new $t(s.editedBy),originalCreatedBy:new $t(s.originalCreatedBy),bankConfirmed:new $t(s.bankConfirmed),bankConfirmedManualReason:new $t(s.bankConfirmedManualReason),_:new $t(s._)}),this.loginService.isJulian()||this.form.get("createdBy").disable(),this.form.get("editedAt").disable(),this.form.get("editedBy").disable(),this.cashType==="outgoing"&&!s._&&!s.googleDriveFolderId&&(this.canReupload=!0),this.cdRef.detectChanges()})}ngOnInit(){return O(this,null,function*(){document.body.style.backgroundColor="transparent !important"})}ngOnDestroy(){}saveAndClose(){return O(this,null,function*(){if(!(yield this.canBook()))return;let i=yield this.save();i&&this.close(i)})}save(){return O(this,null,function*(){if(yield this.checkFormErrors())try{let r=this.form.getRawValue();return r.createdAtDateString=Ie.format(this.form.get("date").value,"yyyy-MM-dd"),r.createdAt||(r.createdAt=Ie.parse(r.createdAtDateString+" "+this.form.get("time").value,"yyyy-MM-dd HH:mm")),r.editedBy=this.loginService.getUsername(),r.value=parseFloat(r.value.toString().replace(",",".")),r.editedAt=Date.now(),this.noUploadNeeded&&(r.googleDriveFolderId="not-needed"),yield this.cashReportCashService.upsert(this.cashType,ve(ve({},this.originalData),r)),!0}catch(r){Gn.error(r)}return!1})}closeClicked(){return O(this,null,function*(){this.close(!1)})}close(i){return O(this,null,function*(){this.dialogRef.close(i)})}checkFormErrors(){return O(this,null,function*(){return this.form.markAllAsTouched(),Is.getErrors(this.form).length>0?(yield this.dialogService.showOk("Eingabe fehlt"),!1):!0})}deleteClicked(){return O(this,null,function*(){if(!(yield this.canBook()))return;(yield this.dialogService.showYesNo("Eintrag l\xF6schen?",{yesText:"Ja, l\xF6schen"}))&&(yield this.cashReportCashService.deleteById(this.form.get("id").value,this.cashType),this.close("deleted"))})}articleChanged(i){let r=this.allArticles.find(s=>s.id===i);r&&this.form.get("description").setValue(r.description)}openGoogleDrive(){window.open("https://drive.google.com/drive/u/0/folders/"+this.googleDriveFolderId,"_blank")}reUpload(){return O(this,null,function*(){let i=window.location.origin+"/event-qr/outgoing-scan"+this.form.get("id").value,r=yield Mvt.toDataURL(i,{width:500,color:{dark:"#ffffff",light:"#2A2A2A"}}),s=!0;this.configService.config.value.studioRegion,s?(this.socketService.setNextDocScanWithoutQrCodeData({refId:this.form.get("id").value,refType:"outgoing-scan"}),this.dialogService.showOk(`Benutze bitte den Scanner um den Beleg zu scannen, du hast 5 Minuten Zeit daf\xFCr.

Auch quer, so wie die Einwilligungserkl\xE4rungen

Bei kleinen Rechnungen benutze das Flachbett.`,{title:"ACHTUNG NEU!"})):this.dialogService.showOk('<div style="width: 100%; text-align: center;"><br/><img src="'+r+'" /></div>',{title:"Rechnung f\xFCr Ausgabe fotografieren!"}),this.dialogRef.close()})}canBook(){return O(this,null,function*(){let i="";if(this.originalData?.createdAt&&(i=yield this.socketService.canBook(Ie.parse(this.originalData.createdAt),this.originalData.studio)),!i){let r=Ie.format(this.form.get("date").value,"yyyy-MM-dd"),s=Ie.parse(r+" "+this.form.get("time").value,"yyyy-MM-dd HH:mm");i=yield this.socketService.canBook(s,this.originalData.studio)}return i?!!(yield this.dialogService.showOkWithForceIfJulian(i)):!0})}noUploadNeededClicked(){this.noUploadNeeded=!0,this.saveAndClose()}setBankConfirmedClicked(){return O(this,null,function*(){let i=yield this.dialogService.showInput({message:"Bitte den Grund f\xFCr die Best\xE4tigung eingeben",title:"Best\xE4tigung"});this.form.get("bankConfirmed").setValue(!0),this.form.get("bankConfirmedManualReason").setValue(this.loginService.getUsername()+": "+i);let r=yield this.save();r&&this.close(r)})}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(Gt),R(lt),R(vt),R(Fi),R(Xi),R(K5),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-cash-report-incoming-outgoing-form"]],standalone:!0,features:[xe],decls:3,vars:2,consts:[["fxLayout","row","nxtPermission","IsJulian"],["fxLayout","column",3,"formGroup",4,"ngIf"],["fxLayout","column",3,"formGroup"],["fxFlex",""],["placeholder","Typ","placeholder","articleId",3,"valueChange","options","nxtFormControl"],["label","Bezeichnung",3,"nxtFormControl"],["placeholder","Betrag",3,"nxtFormControl","isMoney"],["fxLayout","column","fxLayoutAlign","center","nxtPermission","StudioCashReport_EditIncomingOutgoing_CanEdit_"],[3,"nxtFormControl"],["placeholder","Datum",3,"nxtFormControl"],["placeholder","Uhrzeit",3,"nxtFormControl"],["placeholder","Studio",3,"nxtFormControl","options"],["placeholder","Studio-Real",3,"nxtFormControl","options"],["placeholder","Beleg von",3,"nxtFormControl"],["placeholder","erstellt von",3,"nxtFormControl"],["placeholder","ge\xE4ndert am",3,"nxtFormControl"],["placeholder","ge\xE4ndert von",3,"nxtFormControl"],["class","pb-2",4,"ngIf"],[4,"ngIf"],["fxLayout","column",4,"ngIf"],[1,"flex","flex-row","justify-center","gap-2","px-1"],[3,"click"],["nxtPermission","",3,"permissionOr",4,"ngIf"],["nxtPermission","",3,"permissionOr"],[1,"pb-2"],[1,"red"],[1,"green"],["class","text-80",4,"ngIf"],[1,"text-80"],["fxLayout","column"],["fxLayout","row"],[3,"click",4,"ngFor","ngForOf"],[3,"src",4,"ngIf"],[3,"src"]],template:function(r,s){r&1&&(h(0,"div",0),y(1),p(),W(2,$Wi,50,27,"div",1)),r&2&&(g(),ye(s.id),g(),b("ngIf",s.form))},dependencies:[At,Yt,oi,qi,Zs,Ct,ko,$_,Ia,e1,d5,jv,$l,Yi,tl,Hi,Lt,h5,Nn],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}"],changeDetection:0});let t=e;return t})()});function KWi(t,e){if(t&1&&(h(0,"div",9),y(1),p()),t&2){let n=w(2);g(),Ke(" ",n.paymentPossibilityRecord.discountReason," ")}}function YWi(t,e){if(t&1){let n=re();h(0,"div",11)(1,"div",12),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.showEvent(r.eventId))}),y(2,"Termin anzeigen"),p(),h(3,"div"),y(4),Ce(5,"money"),p()()}if(t&2){let n=e.$implicit;g(4),Ke("Zugewiesen: ",tt(5,1,n.value),"")}}function qWi(t,e){if(t&1&&(h(0,"div",9),W(1,YWi,6,3,"div",10),p()),t&2){let n=w(2);g(),b("ngForOf",n.paymentPossibilityRecord.assignments)}}function ZWi(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),y(2,"Gutschein bearbeiten"),p(),h(3,"div",3)(4,"div"),y(5),p(),h(6,"div"),y(7),Ce(8,"money"),p()(),W(9,KWi,2,1,"div",4)(10,qWi,2,1,"div",4),h(11,"div",5)(12,"nxt-input",6),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.paymentPossibilityRecord.paymentValue,r)||(s.paymentPossibilityRecord.paymentValue=r),B(r)}),p()(),h(13,"div",7)(14,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.close())}),y(15,"abbrechen"),p(),h(16,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.deleteClicked())}),y(17,"l\xF6schen"),p(),h(18,"nxt-button",8),F("click",function(){V(n);let r=w();return B(r.save())}),y(19,"speichern"),p()()()}if(t&2){let n=w();g(5),ye(n.paymentPossibilityRecord.name),g(2),ye(tt(8,7,n.paymentPossibilityRecord.value)),g(2),b("ngIf",n.paymentPossibilityRecord.discountReason),g(),b("ngIf",n.paymentPossibilityRecord.assigned),g(2),b("selectOnInit",!0)("isMoney",!0),qe("value",n.paymentPossibilityRecord.paymentValue)}}var Ivt,Avt=Q(()=>{ji();n6();Il();Zi();Jr();Vt();ri();me();ji();yi();Ci();Kr();Cs();Vt();Ivt=(()=>{let e=class e{constructor(i,r,s,o,a,l){this.dialogRef=i,this.data=r,this.socketService=s,this.dialogService=o,this.loginService=a,this.configService=l,this.showPdf=this.loginService.getUsername()==="Niklas"||this.loginService.getUsername()==="Julian",this.discountPercentage=0,this.notAssignedPaypalPayments=[]}ngOnInit(){}ngAfterViewInit(){}ngOnDestroy(){}save(){return O(this,null,function*(){if(this.paymentPossibilityRecord.assigned){this.dialogService.showOk(`Gutschein ist bereits zugewiesen, dann geht das leider nicht mehr
Wende dich ans Backoffice`);return}if(typeof this.paymentPossibilityRecord.paymentValue!="number"){yield this.dialogService.showOk("Eingabe fehlt!");return}if(this.paymentPossibilityRecord.paymentValue>this.paymentPossibilityRecord.value){yield this.dialogService.showOk("Der Kunde hat nicht mehr bezahlt als der Gutschein wert ist!");return}this.paymentPossibilityRecord.originalPaymentValue=this.paymentPossibilityRecord.paymentValue,yield this.socketService.updateGiftCardPaymentValue(this.paymentPossibilityRecord.id,this.paymentPossibilityRecord.paymentValue),this.close()})}close(){return O(this,null,function*(){this.dialogRef.close()})}load(i){return O(this,null,function*(){this.paymentPossibilityRecord=yield this.socketService.getPaymentPossibilityRecord(i),this.paymentPossibilityRecord||(yield this.dialogService.showOk("Gutschein nicht gefunden"),this.close()),this.paymentPossibilityRecord.paymentMethod!=="cash"&&(yield this.dialogService.showOk("Nur Bar bezahlte Gutscheine k\xF6nnen bearbeitet werden"),this.close())})}showEvent(i){let r=this.dialogService.showComponentFull(nu);setTimeout(()=>{r.componentInstance.loadEvent({eventId:i})},500)}deleteClicked(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Gutschein l\xF6schen?"))&&(yield this.socketService.deleteGiftCard(this.paymentPossibilityRecord.id),this.dialogRef.close())})}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Ou),R(lt),R(vt),R(Fi),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-gift-card-edit"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[["fxLayout","column","style","width: 350px;",4,"ngIf"],["fxLayout","column",2,"width","350px"],["fxLayout","row","fxLayoutAlign","center",1,"text-130",2,"padding-top","0.5em"],["fxLayout","row","fxLayoutAlign","space-around",1,"text-110",2,"padding-top","1em"],["fxLayout","row","fxLayoutAlign","space-around","style","padding-top:1em",4,"ngIf"],["fxLayout","row",2,"padding-top","1em"],["placeholder","Bezahlt","width","100%",3,"valueChange","selectOnInit","isMoney","value"],["fxLayout","row","fxLayoutAlign","space-around"],[3,"click"],["fxLayout","row","fxLayoutAlign","space-around",2,"padding-top","1em"],["fxLayout","column","fxLayoutAlign","center","fxLayoutGap","0.5em","class","w-full","style","border: 1px solid #787878; border-radius: 3px; padding: 0.5em; margin: 0 1em",4,"ngFor","ngForOf"],["fxLayout","column","fxLayoutAlign","center","fxLayoutGap","0.5em",1,"w-full",2,"border","1px solid #787878","border-radius","3px","padding","0.5em","margin","0 1em"],[1,"mouse-pointer",3,"click"]],template:function(r,s){r&1&&W(0,ZWi,20,9,"div",0),r&2&&b("ngIf",s.paymentPossibilityRecord)},dependencies:[Ct,At,Yt,$r,oi,Hi,Yi,Lt,ks],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}"]});let t=e;return t})()});var Rs,G9e,QU=Q(()=>{Rs=function(t){return t._0_Error="error",t._1_Open="open",t._3_CalcCashRegister1="calc-cash-register-1",t._4_CalcCashRegister2="calc-cash-register-2",t._5_CalcCashRegister3="calc-cash-register-3",t._6_ChangeMoney="change-money",t._7_ArtistPayoutCanBook="artist-payout-can-book",t._8_ArtistPayoutBooking="artist-payout-booking",t._9_CreateInvoices="create-invoices",t._10_PreparingPayouts="preparing-payouts",t._11_SetSafeMoneyDestination="set-safe-money-destination",t._12_InvoicesPrinting="invoices-printing",t._13_PayoutsRunning="payouts-running",t._14_ClosingWorkSession="closing-work-session",t._29_SideCashRegisterBookTransfers="side-cash-register-book-transfers",t._30_SideCashRegisterPrintDayFinishReport="side-cash-register-print-day-finish-report",t._99_Closed="closed",t}(Rs||{}),G9e=function(t){return t.Open="open",t.Closed="closed",t.Closing="closing",t.Dummy="dummy",t.CanStart="can-start",t}(G9e||{})});var uv,JU=Q(()=>{QU();uv=class t{static isCashRegisterStateBefore(e,n){let i=t.getNumberFromCashRegisterState(e),r=t.getNumberFromCashRegisterState(n);return i<r}static getNumberFromCashRegisterState(e){for(let n in Rs)if(Rs[n]===e)return parseInt(n.split("_")[1],10);return-1}static getCashRegisterStateText(e,n=!1){let i=t.getCashRegisterStateTextDebug(e);return n&&(i=i.split("- ")[1]),i}static getCashRegisterStateTextDebug(e){switch(e){case Rs._0_Error:return"0 - Fehler!";case Rs._1_Open:return"1 - Kasse offen";case Rs._3_CalcCashRegister1:return"3 - Erste Kassenz\xE4hlung";case Rs._4_CalcCashRegister2:return"4 - Zweite Kassenz\xE4hlung";case Rs._5_CalcCashRegister3:return"5 - Dritte Kassenz\xE4hlung weil Differenz zu gro\xDF";case Rs._6_ChangeMoney:return"6 - Geld wechseln";case Rs._7_ArtistPayoutCanBook:return"7 - Artist-Auszahlungen k\xF6nnen gebucht werden";case Rs._8_ArtistPayoutBooking:return"8 - Artist-Auszahlungen werden gebucht";case Rs._9_CreateInvoices:return"9 - Umschl\xE4ge werden gepackt (Rechnungen werden noch erstellt)";case Rs._10_PreparingPayouts:return"10 - Umschl\xE4ge werden gepackt";case Rs._11_SetSafeMoneyDestination:return"11 - Tresor-Geld abgeben";case Rs._12_InvoicesPrinting:return"12 - Rechnungen drucken";case Rs._13_PayoutsRunning:return"13 - Artists bekommen ihre Moneten";case Rs._14_ClosingWorkSession:return"14 - Vor dem Feierabend";case Rs._30_SideCashRegisterPrintDayFinishReport:return"30 - Kassenbericht drucken";case Rs._29_SideCashRegisterBookTransfers:return"29 - Transfer zur Hauptkasse";case Rs._99_Closed:return"99 - Kasse geschlossen";default:debugger;return"X - Status fehlt: "+e}}}});var use,Pvt=Q(()=>{QU();dz();$v();zn();Ci();Zh();JU();Yc();pC();Bd();$n();oz();kl();Ov();Nu();Ld();me();use=class{constructor(e,n,i,r,s,o,a,l,c,d){this.socketService=e,this.loginService=n,this.dialogService=i,this.configService=r,this.workSessionService=s,this.permissionService=o,this.dayFinishService=a,this.cashPaymentService=l,this.walkInService=c,this.artistConfirmService=d,this.showPostponedEvents=!1,this.cashRegisterRadioButtons=[],this.dateString=Ie.format(new Date,"yyyy-MM-dd"),this.data$=new qs(null),this.showAllCashRegisters=!1,this.loginIsMainCashRegister=!1,this.showDateInGrid=new qs(!1),this.debouncedReload=new Mi,this.viewFilter={artist:"",cashState:"all",hideClosedEvents:!1},this.showNotLoggedInView=gt(!1),this.debouncedReload.pipe(A7(500)).subscribe(()=>{this.reloadData()})}onOpenStudioCashReport(){this.startMinuteInterval(),this.newDataSubscription=this.socketService.subscribeNew("studioCashReport2GetData",e=>{this.setData(e)},{emitInitial:!0,emitAfterReconnect:!0,emitInitialData:{dateString:this.dateString,studio:this.studioView}}),this.loginIsMainCashRegister=!this.configService.config.value.studios.find(e=>e.name===this.loginService.getStudio()).onlyCash}onCloseStudioCashReport(){Cu.clear(this.minuteInterval),this.newDataSubscription.unsubscribe()}setData(e){if(e&&e.otherOpenWorkSession&&(!this.permissionService.hasPermission(Zt.StudioCashReport_DatePicker)||!e.otherOpenWorkSession.askUserIfManualDateChange)){this.dateString=e.otherOpenWorkSession.openWorkSessionDateString,this.reloadData();return}e&&(this.data=e),this.data.foundByAdditionalDateString&&(this.dateString=this.data.workSession.dateString),this.incomingDataView=this.data.cashPayments.filter(n=>n.direction==="in"),this.outgoingDataView=this.data.cashPayments.filter(n=>n.direction==="out"),this.data.calculatedData.cashRegisters.map(n=>n.show=!1),this.cashRegisterView=null,this.showAllCashRegisters?(this.totalIncomingView=this.data.calculatedData.cashRegisters.map(n=>n.incomingPaymentsSum+n.incomingPaymentsSum_).reduce((n,i)=>n+i,0),this.totalOutgoingView=this.data.calculatedData.cashRegisters.map(n=>n.outgoingPaymentsSum+n.outgoingPaymentsSum_).reduce((n,i)=>n+i,0),this.data.calculatedData.cashRegisters.map(n=>n.show=!0)):(this.incomingDataView=this.incomingDataView.filter(n=>n.studio===this.studioView),this.outgoingDataView=this.outgoingDataView.filter(n=>n.studio===this.studioView),this.totalIncomingView=this.data.calculatedData.cashRegisters.filter(n=>n.studio===this.studioView).map(n=>n.incomingPaymentsSum+n.incomingPaymentsSum_).reduce((n,i)=>n+i,0),this.totalOutgoingView=this.data.calculatedData.cashRegisters.filter(n=>n.studio===this.studioView).map(n=>n.outgoingPaymentsSum+n.outgoingPaymentsSum_).reduce((n,i)=>n+i,0),this.data.calculatedData.cashRegisters.map(n=>n.show=n.studio===this.studioView),this.cashRegisterView=this.data.workSession.cashRegisters.find(n=>n.studio===this.studioView),this.cashRegisterViewCalc=this.data.calculatedData.cashRegisters.find(n=>n.studio===this.studioView)),this.showPostponedEvents?this.calendarEventsView=this.data.postponedEvents:this.calendarEventsView=this.data.events,this.myLoginCashRegister=this.data.workSession.cashRegisters.find(n=>n.studio===this.loginService.getStudio()),this.calcArtistData(),this.applyViewFilters(),this.setCashRegisterRadioButtons(),this.calcShowColumnsInGrid(),this.calcShowNotLoggedInView(),this.checkArtistConfirms(),this.data$.next(this.data)}calcShowColumnsInGrid(){let e=wc.unique(this.data.events.map(s=>s.startDateString)),n=wc.unique(this.data.cashPayments.map(s=>s.createdAtDateString)),r=wc.unique([...e,...n]).length>1;r!==this.showDateInGrid.value&&this.showDateInGrid.next(r)}calcArtistData(){this.artistData=bf.calcArtists(this.data.workSession,this.data.events,this.data.postponedEvents,this.data.availableArtists)}startMinuteInterval(){this.minuteInterval=setInterval(()=>{this.runMinuteInterval()},1e3*60)}runMinuteInterval(){this.calcArtistData()}reloadData(e=!1){return O(this,null,function*(){this.setData(yield this.socketService.studioCashReport2GetData(this.dateString,this.studioView,e))})}isWorkSessionOpenMyLoginCashRegister(e){return!this.myLoginCashRegister||this.myLoginCashRegister.state!==Rs._1_Open?(e&&this.dialogService.showOk("Deine Kasse ist nicht offen"),!1):!0}startWorkSession(){return this.workSessionService.startWorkSession(this.dateString)}startCashRegister(){return O(this,null,function*(){let e=yield this.dialogService.showInput({message:"Z\xE4hle das Geld in deiner Kasse",isMoney:!0,placeholder:"Startgeld"});Es.isNumber(e)&&(yield this.workSessionService.startCashRegister(this.dateString,e))})}refreshView(){this.setData()}setViewedCashRegisterState(e){this.cashRegisterView.state!==e&&(this.log("Kassen-Status wird auf "+uv.getCashRegisterStateTextDebug(e)+" gesetzt"),this.cashRegisterView.state=e,this.logCashRegisterState(),this.updateWorkSessionCashRegister(this.cashRegisterView))}updateWorkSessionCashRegister(e){this.socketService.workSessionUpdateCashRegister(e)}setArtistFilter(e){this.viewFilter.artist===e?this.viewFilter.artist="":this.viewFilter.artist=e,this.setData()}applyViewFilters(){this.viewFilter.artist&&(this.calendarEventsView=this.calendarEventsView.filter(e=>e.artist===this.viewFilter.artist),this.incomingDataView=this.incomingDataView.filter(e=>e.artist===this.viewFilter.artist),this.outgoingDataView=this.outgoingDataView.filter(e=>e.artist===this.viewFilter.artist)),this.viewFilter.cashState==="t"&&(this.calendarEventsView=this.calendarEventsView.filter(e=>e.visibility==="private"),this.incomingDataView=this.incomingDataView.filter(e=>e.isPrivate),this.outgoingDataView=this.outgoingDataView.filter(e=>e.isPrivate),this.totalIncomingView=this.data.calculatedData.cashRegisters.filter(e=>e.show).map(e=>e.incomingPaymentsSum_).reduce((e,n)=>e+n,0),this.totalOutgoingView=this.data.calculatedData.cashRegisters.filter(e=>e.show).map(e=>e.outgoingPaymentsSum_).reduce((e,n)=>e+n,0)),this.viewFilter.cashState==="n"&&(this.calendarEventsView=this.calendarEventsView.filter(e=>e.visibility!=="private"),this.incomingDataView=this.incomingDataView.filter(e=>!e.isPrivate),this.outgoingDataView=this.outgoingDataView.filter(e=>!e.isPrivate),this.totalIncomingView=this.data.calculatedData.cashRegisters.filter(e=>e.show).map(e=>e.incomingPaymentsSum).reduce((e,n)=>e+n,0),this.totalOutgoingView=this.data.calculatedData.cashRegisters.filter(e=>e.show).map(e=>e.outgoingPaymentsSum).reduce((e,n)=>e+n,0)),this.viewFilter.hideClosedEvents&&(this.calendarEventsView=this.calendarEventsView.filter(e=>!e.closed))}getArtistPayouts(e){return bf.getArtistPayouts(this.data,{calcType:"pre-calc",withEarlyPayout:!1})}setCashRegisterRadioButtons(){this.cashRegisterRadioButtons=this.data.workSession.cashRegisters.map(e=>{let n='<div class="flex flex-col">';return n+="<div>"+e.studio+"<div>",n+='<div class="text-60" style="line-height: 1.5">',e.currentUser?n+="<div>"+e.currentUser+"\u30FB"+uv.getCashRegisterStateText(e.state,!0)+"</div>":n+="<div>"+uv.getCashRegisterStateText(e.state,!0)+"</div>",e.missingValue&&(e.missingValue>0?n+='<div class="red-light">'+e.missingValue.toMoneyString()+" zu wenig</div>":n+='<div class="red-light">'+Math.abs(e.missingValue).toMoneyString()+" zu viel</div>"),n+="</div>",{text:n,value:e.studio}}).sort(Hr.sortString("value"))}setPreCalcCashRegisterMoneyStackxXX(e){return O(this,null,function*(){})}canPayoutPreCalcCashRegister(){let e=this.getArtistPayouts(!0),n={prioIds:[],values:e.artists.map(s=>({id:s.artistName,value:s.payoutValueTotal}))},i=this.getSaveValueForMoneyCashCalc();return i&&(n.values.push(i),n.prioIds.push(i.id)),ca.canReduceMultiFromMoneyStack(this.cashRegisterView.moneyStackInternal,n.values,n.prioIds).possible}bookBankAndSafe(e,n,i){return O(this,null,function*(){let r=fn.roundTo(e,5,!1),s=yield this.dialogService.showInput({isMoney:!0,message:"Wie viel Geld geht zur Bank?"});if(!Es.isNumber(s))return!1;if(s=fn.roundMoney(s),s>e){let o=`So viel Geld kannst du nicht zur Bank bringen.

 Maximal auf dem Tisch: `+e.toMoneyString()+`

 Maximal zur Bank: `+r.toMoneyString()+`

Wenn du mehr Geld auf dem Tisch liegen hast, fehlt Geld in einem Umschlag!`;return this.logDialog(o),yield this.dialogService.showOk(o),!1}if(s%5>0){let o="Wie willst du "+s.toMoneyString()+` bei der Bank einzahlen?
Du kannst nur Scheine zur Bank bringen.`;return this.logDialog(o),yield this.dialogService.showOk(o),!1}return yield this.socketService.bookBankAndSafe(this.dateString,s,n,i),this.log("Bank ("+s.toMoneyString()+") und Tresor ("+n.toMoneyString()+") wird gebucht [shouldValueBeforePayoutsWithoutSafe: "+i.toMoneyString()+"]"),!0})}getArtistReduceProposals(e){let n=[...this.data.events,...this.data.postponedEvents],i=n.filter(a=>e.includes(a.id)),r=n.filter(a=>!e.includes(a.id)),s=bf.calcArtists(this.data.workSession,r,i,this.data.availableArtists),o=[];for(let a of s){let l=0,c=a.payoutValue%10,d="";if(a.payoutValue%10!==0){let m=fn.round(c/a.payoutValue*100,1);m<=5?(d=`${c.toMoneyString()} abziehen, das sind ${m}% von ${a.payoutValue.toMoneyString()} ist OK`,l=fn.roundMoney(c)):(c=a.payoutValue%5,c!==0&&(m=fn.round(c/a.payoutValue*100,1),m<=5&&(d=`Zieh ${c.toMoneyString()} abziehen, das sind ${m}% von ${a.payoutValue.toMoneyString()} ist OK`,l=fn.roundMoney(c))))}d||(d="\u2705 Nichts abziehen");let u=this.getBestEventsToArtistReduce(a.name,r);o.push({artist:a.name,payoutSum:a.payoutValue,text:d,toReduce:l,events:u.events,eventCount:u.totalEventCount})}return o.filter(a=>a.eventCount>0&&a.payoutSum>0).sortString("artist")}getBestEventsToArtistReduce(e,n){let i=n.filter(s=>s.artist===e&&!s.payments.some(o=>o.earlyPayout)&&s.priceEstimatedFrom>0).map(s=>({eventId:s.id,artistGet:s.artistTotalGet,sortValue:s.visibility==="private"?s.artistTotalGet*1e3:s.artistTotalGet,isPrivate:s.visibility==="private",text:s.paymentSum.toMoneyString()+" "+cr.arrowRight+" "+s.artistTotalGet.toMoneyString()+" ("+Math.round(s.artistPercentage)+" %)",customerName:s.customerObj.fullName})).sortNumber("sortValue",!0),r=i.length;return i.length>3&&(i.length=3),{totalEventCount:r,events:i}}log(e){this.dayFinishService.log({message:e,cashRegisterView:this.cashRegisterView.studio,workSessionDateString:this.dateString})}logDialog(e){this.log("Info wird gezeigt: "+e)}getSaveValueForMoneyCashCalc(){if(this.data.calculatedData.endOfDayCash.value_>0)return{id:"Tresor",value:this.data.calculatedData.endOfDayCash.value_};if(this.cashRegisterView.safeCashPayment)return{id:"Tresor",value:this.cashRegisterView.safeCashPayment.value}}workSessionPrintAllInvoices(){return O(this,null,function*(){return this.socketService.printInvoices(this.data.workSession.invoices.map(e=>e.invoiceNumber))})}workSessionPrintDayFinishReports(e){return O(this,null,function*(){return this.socketService.printDayFinishReports(this.dateString,this.cashRegisterView.studio,e)})}showMergedInvoices(e){return O(this,null,function*(){try{this.dialogService.showLoading(_n.LoadPdfs,"PDF wird erstellt...");let n=yield this.socketService.getMergedInvoices(this.data.workSession.invoices.map(i=>i.invoiceNumber));this.dialogService.hideLoading(_n.LoadPdfs),this.dialogService.showPdf(n,"Rechnungen_"+this.dateString+".pdf",{showPrintLocalInfo:e})}catch(n){Gn.error(n)}})}showMergedDayFinishReports(e,n){return O(this,null,function*(){try{this.dialogService.showLoading(_n.LoadPdfs,"PDF wird erstellt...");let i=yield this.socketService.getMergedDayFinishReports(this.dateString,this.cashRegisterView.studio,e);this.dialogService.hideLoading(_n.LoadPdfs),this.dialogService.showPdf(i,"Kassenberichte_"+this.dateString+".pdf",{showPrintLocalInfo:n})}catch(i){Gn.error(i)}})}askDayFinishReportEmployee(){return O(this,null,function*(){let e=this.configService.config.value.users.filter(i=>i.cashReportCreator).map(i=>i.realName),n=yield this.dialogService.showButtonChooser({buttonRows:[e],title:"Wer soll auf dem Kassenbericht stehen?",text:"",minWidth:"80%",value:""});return typeof n=="string"?n:""})}walkInClicked(e){return O(this,null,function*(){this.walkInService.startWalkIn()})}logCashRegisterState(){this.log("Kassen-Status wird auf "+uv.getCashRegisterStateTextDebug(this.cashRegisterView.state)+" gesetzt")}createHandover(e,n,i,r){return this.socketService.createCashRegisterHandover({dateString:this.dateString,studio:this.cashRegisterView.studio,toUsername:e,shouldValue:n,value:i,moneyStack:r})}calcShowNotLoggedInView(){let e=!1;this.cashRegisterView&&this.cashRegisterView.state===Rs._1_Open&&this.loginService.isReception()&&this.cashRegisterView.currentUser&&this.loginService.getUsername()!==this.cashRegisterView.currentUser&&(e=!0),this.showNotLoggedInView.set(e)}checkArtistConfirms(){let e=this.data.artistConfirms.find(n=>n.state==="pending");e&&this.artistConfirmService.waitForArtistConfirm(e)}}});var Rvt,Fvt=Q(()=>{pa();Zh();Yc();Nu();me();Rvt=(()=>{let e=class e{constructor(){}transform(i){let r=[];try{for(let s of oa(i).map(o=>parseFloat(o)).sort(Hr.arrayNumbers(!0)))Es.isNumber(i[s])&&i[s]>0&&(s>=1?r.push(i[s]+cr.multiply+s.toString()+" \u20AC"):r.push(i[s]+cr.multiply+(s*100).toString()+" Cent"),i[s]=0)}catch{r.push("?")}return r.join("&nbsp;&nbsp;&nbsp;")}transformAlt(i){let r=[];try{for(let s of oa(i).sort(Hr.arrayParseNumbers(!0)))Es.isNumber(i[s])&&i[s]>0&&(r.push(i[s]+cr.multiply+s),i[s]=0)}catch{r.push("?")}return r.join("&nbsp;&nbsp;")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"moneyStack",type:e,pure:!0,standalone:!0});let t=e;return t})()});var Lvt,Ovt=Q(()=>{JU();me();od();Lvt=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i){return uv.getCashRegisterStateText(i)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"cashRegisterState",type:e,pure:!0,standalone:!0});let t=e;return t})()});var Nvt,Vvt=Q(()=>{F9e();$n();me();Kr();Ci();R7();Cs();Nvt=(()=>{let e=class e{constructor(i,r,s,o){this.loginService=i,this.dialogService=r,this.telegramService=s,this.configService=o}startReception(){return O(this,null,function*(){if(this.configService.config.value.studioRegion==="AC"||this.configService.config.value.studioRegion==="STAGING")yield this.dialogService.showComponentDialog(FM,{title:"Villa Theke Feierabend",allCheckedToFinish:!0,checkItems:[{name:"FOTO-HANDY Galerie \xF6ffnen ->SYNC!",checked:!1},{name:"TV im Hauptraum aus",checked:!1},{name:"Markise eingefahren",checked:!1},{name:"Terrassent\xFCr abgeschlossen",checked:!1},{name:"Einwilligungserkl\xE4rungen alle gescannt",checked:!1},{name:"Alle Tattoo-Lichter aus",checked:!1},{name:"Handy ans Ladeger\xE4t",checked:!1},{name:"Terrassent\xFCre-Backoffice zu",checked:!1},{name:"Abrechnung abgeheftet",checked:!1},{name:"Ich bringe nun direkt das Geld zur Bank",checked:!1}]},{minWidth:"40vw"}).afterClosed().toPromise(),this.telegramService.sendTelegramDayFinish("hat die Feierabend-Checkliste best\xE4tigt");else if(this.configService.config.value.isFranchise){let i=this.dialogService.showComponentDialog(FM,{title:"FFM Theke Feierabend",allCheckedToFinish:!0,checkItems:[{name:"Post",checked:!1},{name:"Kautionen checken",checked:!1},{name:"Infos weitergeben",checked:!1}]},{minWidth:"40vw"});yield Sn(i.afterClosed()),this.telegramService.sendTelegramDayFinish("hat die Feierabend-Checkliste best\xE4tigt")}else if(this.configService.config.value.studioRegion==="MA"){let i=this.dialogService.showComponentDialog(FM,{title:"Malle Theke Feierabend",allCheckedToFinish:!0,checkItems:[{name:"alle Ringlichter aus",checked:!1},{name:"alle Fenster geschlossen",checked:!1},{name:"alle Fensterl\xE4den geschlossen",checked:!1},{name:"alle Balkont\xFCren geschlossen",checked:!1},{name:"Eingangst\xFCre verankert",checked:!1},{name:"private Balkont\xFCre verankert",checked:!1},{name:"Stencil Drucker",checked:!1},{name:"Markise eingefahren",checked:!1},{name:"Hauptschalter (Alumbrado SALA 1) unten",checked:!1}]},{minWidth:"40vw"});yield Sn(i.afterClosed()),this.telegramService.sendTelegramDayFinish("hat die Feierabend-Checkliste best\xE4tigt")}else if(this.configService.config.value.studioRegion==="DU"){let i=this.dialogService.showComponentDialog(FM,{title:"D\xFCsseldorf Theke Feierabend",allCheckedToFinish:!0,checkItems:[{name:"Alle Dokumente sind gescannt",checked:!1},{name:"Alle Lichter aus",checked:!1},{name:"Stencildrucker aus",checked:!1},{name:"Geld im Tresor",checked:!1},{name:"Kassenbericht unterschrieben und abgeheftet",checked:!1},{name:"Kundenstopper, B\xE4nke & Aschenbecher drinnen",checked:!1},{name:"Stuff Schublade aufgef\xFCllt",checked:!1},{name:"Handys am Ladekabel",checked:!1},{name:"Flur T\xFCr abgeschlossen",checked:!1}]},{minWidth:"40vw"});yield Sn(i.afterClosed()),this.telegramService.sendTelegramDayFinish("hat die Feierabend-Checkliste best\xE4tigt")}})}};e.\u0275fac=function(r){return new(r||e)(it(Fi),it(vt),it(p3),it(Xi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function eUi(t,e){if(t&1){let n=re();h(0,"div",13)(1,"div",14)(2,"div",15),y(3),Ce(4,"nxtDate"),p(),ee(5,"img",16),h(6,"div",17)(7,"nxt-button",18),F("click",function(){V(n);let r=w();return B(r.hideCamClicked())}),y(8,"Kamera ausblenden"),p()()()()}if(t&2){let n=w();g(3),Ke("",Nt(4,3,n.camTimestamp,"dd.MM.yyyy HH:mm:ss")," "),g(2),b("src",n.camImgSrc,Ur),g(2),b("smallButton",!0)}}function tUi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=e.$implicit;g(2),ye(n.id),g(2),ye(tt(5,2,n.value))}}function iUi(t,e){if(t&1&&(h(0,"table",19),W(1,tUi,6,4,"tr",20),p()),t&2){let n=w();g(),b("ngForOf",n.payouts)}}function nUi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td"),y(4),Ce(5,"money"),p()()),t&2){let n=e.$implicit;g(2),ye(n.id),g(2),ye(tt(5,2,n.value))}}function rUi(t,e){if(t&1&&(h(0,"table",19),W(1,nUi,6,4,"tr",20),p()),t&2){let n=w();g(),b("ngForOf",n.myService.cashRegisterView.payouts)}}function sUi(t,e){if(t&1&&(h(0,"div",23),y(1),p()),t&2){let n=w(2);g(),ye(n.loadingText)}}function oUi(t,e){if(t&1&&(h(0,"div",21),ee(1,"nxt-spinner"),W(2,sUi,2,1,"div",22),p()),t&2){let n=w();g(2),b("ngIf",n.loadingText)}}function aUi(t,e){if(t&1&&(ee(0,"div",30),Ce(1,"safeHtml")),t&2){let n=w(2);b("innerHTML",tt(1,1,n.myService.cashRegisterView.errorMessage),Pi)}}function lUi(t,e){if(t&1){let n=re();vs(0),h(1,"div")(2,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.countCashRegisterBeforeStart(1))}),y(3,"1. Gesamte Kasse z\xE4hlen"),p()(),ys()}}function cUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"nxt-button",32),y(3,"1. Gesamte Kasse wurde gez\xE4hlt"),p(),h(4,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.countCashRegisterBeforeStart(2))}),y(5,"2. Gesamte Kasse erneut z\xE4hlen"),p()(),ys()}t&2&&(g(2),b("disabled",!0))}function dUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"nxt-button",32),y(3,"1. Gesamte Kasse wurde gez\xE4hlt"),p(),h(4,"nxt-button",32),y(5,"2. Gesamte Kasse wurde gez\xE4hlt"),p(),h(6,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.countCashRegisterBeforeStart(3))}),y(7,"3. Gesamte Kasse erneut z\xE4hlen"),p()(),ys()}t&2&&(g(2),b("disabled",!0),g(2),b("disabled",!0))}function uUi(t,e){if(t&1){let n=re();vs(0),h(1,"div"),y(2,"Um fort zu fahren, musst du Geld wechseln"),p(),h(3,"div",33)(4,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.countCashRegisterChange())}),y(5,"Geld wechseln"),p()(),ys()}}function hUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"div"),y(3,"Buche die Artist-Auszahlungen"),p(),h(4,"div",33)(5,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.bookArtistPayouts())}),y(6,"Artist-Auszahlungen buchen"),p()()(),ys()}}function pUi(t,e){if(t&1){let n=re();h(0,"td",42),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.showInvoice(r))}),y(1),p()}if(t&2){let n=w().$implicit;g(),Ke(" ",n.invoiceNumber," ")}}function mUi(t,e){t&1&&ee(0,"td")}function fUi(t,e){if(t&1&&(h(0,"tr",39)(1,"td"),y(2),p(),h(3,"td"),y(4),p(),h(5,"td",4),y(6),Ce(7,"money"),p(),ee(8,"td",40),Ce(9,"moneyStack"),W(10,pUi,2,1,"td",41)(11,mUi,1,0,"td",29),p()),t&2){let n=e.$implicit,i=e.index,r=w(4);b("ngClass",sn(12,JWi,r.currentPayoutRow===i)),g(2),ye(i+1),g(2),ye(n.id),g(2),ye(Nt(7,7,n.value,!1)),g(2),b("innerHTML",tt(9,10,n.moneyStack),Pi),g(2),b("ngIf",n.invoiceNumber),g(),b("ngIf",!n.invoiceNumber)}}function gUi(t,e){if(t&1&&(vs(0),h(1,"div",37),y(2,"Benutze die Pfeil-Tasten \u2191 \u2193 auf der Tastatur"),p(),h(3,"table",19),W(4,fUi,12,14,"tr",38),p(),ys()),t&2){let n=w(3);g(4),b("ngForOf",n.payouts)}}function vUi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Bank"),p(),h(3,"td",4),y(4),Ce(5,"money"),p()()),t&2){let n=w(3);g(4),Ke("- ",tt(5,1,n.myService.cashRegisterView.bankCashPayment.value),"")}}function yUi(t,e){if(t&1&&(vs(0),h(1,"tr")(2,"td"),y(3,"Rest"),p(),h(4,"td",43),y(5),Ce(6,"money"),p()(),h(7,"tr")(8,"td",44),y(9),Ce(10,"money"),p()(),ys()),t&2){let n=w(3);g(5),ye(tt(6,2,n.moneyStackTotalValue-n.payoutsTotalSumSafeIncluded)),g(4),Ke("Wenn du jetzt nicht ",tt(10,4,n.moneyStackTotalValue-n.payoutsTotalSumSafeIncluded)," hast, sind die Umschl\xE4ge falsch bef\xFCllt. ")}}function _Ui(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Rest"),p(),h(3,"td",43),y(4),Ce(5,"money"),p()()),t&2){let n=w(3);g(4),Ke(" ",tt(5,1,n.moneyStackTotalValue-n.payoutsTotalSumSafeIncluded-n.myService.cashRegisterView.bankCashPayment.value)," ")}}function CUi(t,e){if(t&1){let n=re();h(0,"div",37)(1,"nxt-button",31),F("click",function(){V(n);let r=w(3);return B(r.bookBankClicked())}),y(2," Bank buchen "),p()()}}function xUi(t,e){if(t&1){let n=re();h(0,"div",33)(1,"nxt-button",31),F("click",function(){V(n);let r=w(3);return B(r.bookEndMoney())}),y(2,"Kassen-Endbestand z\xE4hlen"),p()()}}function bUi(t,e){if(t&1&&(vs(0),h(1,"div",8),W(2,gUi,5,1,"ng-container",29),h(3,"table",34)(4,"tr")(5,"td"),y(6,"Kasse vor den Umschl\xE4gen"),ee(7,"br"),y(8,"(hast du gez\xE4hlt)"),p(),h(9,"td",4),y(10),Ce(11,"money"),p()(),h(12,"tr")(13,"td"),y(14,"Summe aller Umschl\xE4ge"),p(),h(15,"td",4),y(16),Ce(17,"money"),p()(),W(18,vUi,6,3,"tr",29)(19,yUi,11,6,"ng-container",29)(20,_Ui,6,3,"tr",29),p(),W(21,CUi,3,0,"div",35)(22,xUi,3,0,"div",36),p(),ys()),t&2){let n=w(2);g(2),b("ngIf",n.payouts&&!n.myService.cashRegisterView.bankCashPayment),g(),b("ngClass",sn(13,QWi,n.currentPayoutRow===(n.payouts==null?null:n.payouts.length))),g(7),ye(tt(11,9,n.moneyStackTotalValue)),g(6),ye(tt(17,11,n.payoutsTotalSumSafeIncluded)),g(2),b("ngIf",n.myService.cashRegisterView.bankCashPayment),g(),b("ngIf",!n.myService.cashRegisterView.bankCashPayment),g(),b("ngIf",n.myService.cashRegisterView.bankCashPayment),g(),b("ngIf",!n.myService.cashRegisterView.bankCashPayment),g(),b("ngIf",n.myService.cashRegisterView.bankCashPayment)}}function wUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"div"),y(3,"Zahle die Artists aus"),p(),h(4,"div",33)(5,"nxt-button",45),F("click",function(){V(n);let r=w(2);return B(r.countCashRegisterChange())}),y(6,"Geld wechseln"),p()()(),ys()}t&2&&(g(5),b("disabled",!0))}function SUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"div"),y(3,"Wem hast du das Tresor-Geld in h\xF6he von "),h(4,"strong"),y(5),Ce(6,"money"),p(),y(7," gegeben? "),p(),h(8,"nxt-select",46),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.myService.cashRegisterView.safeMoneyGet,r)||(s.myService.cashRegisterView.safeMoneyGet=r),B(r)}),p(),h(9,"div",47)(10,"nxt-button",45),F("click",function(){V(n);let r=w(2);return B(r.setSafeMoneyDestination())}),y(11," Weiter "),p()()(),ys()}if(t&2){let n=w(2);g(5),ye(tt(6,4,n.myService.cashRegisterView.safeCashPayment.value)),g(3),qe("value",n.myService.cashRegisterView.safeMoneyGet),b("options",n.users),g(2),b("disabled",!n.myService.cashRegisterView.safeMoneyGet)}}function TUi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",31),F("click",function(){V(n);let r=w(3);return B(r.printInvoicesClicked())}),y(2,"Alle Rechnungen drucken"),p(),y(3," oder "),h(4,"nxt-button",31),F("click",function(){V(n);let r=w(3);return B(r.showInvoicesClicked(!0))}),y(5,"Alle Rechnungen anzeigen"),p()()}}function DUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"div",37),y(3,"Kassenbericht drucken"),p(),h(4,"div",48),W(5,TUi,6,0,"div",29),h(6,"div")(7,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.printDayFinishReportClicked())}),y(8,"Kassenbericht drucken"),p(),y(9," oder "),h(10,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.showDayFinishReportClicked(!0))}),y(11,"Kassenbericht anzeigen"),p()(),h(12,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.printingFinishedClicked())}),y(13,"weiter"),p()()(),ys()}t&2&&(g(5),b("ngIf",!1))}function EUi(t,e){if(t&1){let n=re();h(0,"td",42),F("click",function(){V(n);let r=w().$implicit,s=w(4);return B(s.showInvoice(r))}),y(1),p()}if(t&2){let n=w().$implicit;g(),Ke(" ",n.invoiceNumber," ")}}function MUi(t,e){t&1&&ee(0,"td")}function kUi(t,e){if(t&1){let n=re();h(0,"div",56),ee(1,"nxt-spinner",57),h(2,"div"),y(3),p(),ee(4,"nxt-spinner",57),p(),h(5,"nxt-button",58),F("click",function(){V(n);let r=w(2).$implicit,s=w(4);return B(s.startArtistConfirm(r))}),y(6,"\u{1F4F2} Best\xE4tigung erneut anfordern \u{1F4F2}"),p(),h(7,"nxt-button",58),F("click",function(){V(n);let r=w(2).$implicit,s=w(4);return B(s.cancelArtistConfirm(r))}),y(8,"\u274C Best\xE4tigung abbrechen \u274C"),p()}if(t&2){let n=w(2).$implicit;g(),b("size",24),g(2),Ke("\xA0",n.id," muss den Betrag best\xE4tigen\xA0"),g(),b("size",24)}}function IUi(t,e){t&1&&(h(0,"div"),y(1,"\u2705 Betrag vom Artist best\xE4tigt \u2705"),p())}function AUi(t,e){if(t&1){let n=re();h(0,"div"),y(1,"\u2757Umschlag wurde nicht \xFCbergeben\u2757"),p(),h(2,"nxt-button",59),F("click",function(){V(n);let r=w(2).$implicit,s=w(4);return B(s.startArtistConfirm(r))}),y(3,"\u{1F4F2} Best\xE4tigung anfordern \u{1F4F2}"),p()}}function PUi(t,e){if(t&1&&(h(0,"div",55),W(1,kUi,9,3)(2,IUi,2,0,"div")(3,AUi,4,0),p()),t&2){let n=w().$implicit;g(),Je(n.confirmState==="pending"?1:n.confirmState==="confirmed"?2:3)}}function RUi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-slide-toggle",60),F("valueChange",function(r){V(n);let s=w().$implicit;return B(r?s.confirmState="confirmed":s.confirmState="none")}),y(2,"Umschlag \xFCbergeben "),p()()}if(t&2){let n=w().$implicit;g(),b("value",n.confirmState==="confirmed")}}function FUi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td",4),y(4),Ce(5,"money"),p(),W(6,EUi,2,1,"td",41)(7,MUi,1,0,"td",29),h(8,"td"),W(9,PUi,4,1,"div",55)(10,RUi,3,1,"div"),p()()),t&2){let n=e.$implicit,i=w(4);g(2),ye(n.id),g(2),ye(Nt(5,5,n.value,!1)),g(2),b("ngIf",n.invoiceNumber),g(),b("ngIf",!n.invoiceNumber),g(2),Je(i.useArtistConfirm()?9:10)}}function LUi(t,e){if(t&1&&(h(0,"table",19),W(1,FUi,11,8,"tr",20),p()),t&2){let n=w(3);g(),b("ngForOf",n.payouts)}}function OUi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),Ce(3,"nxtDate"),p(),h(4,"td"),y(5),p(),h(6,"td"),y(7),p()()),t&2){let n=e.$implicit;g(2),ye(Nt(3,3,n.start,"HH:mm")),g(3),ye(n.customerObj.fullName),g(2),ye(n.artist)}}function NUi(t,e){if(t&1&&(h(0,"table",61)(1,"tr")(2,"td",62),y(3,"Verschobene Termine"),p()(),W(4,OUi,8,6,"tr",20),p()),t&2){let n=w(3);g(4),b("ngForOf",n.myService.data.postponedEvents)}}function VUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",49),y(2,"\u2757DIE ABRECHNUNG IST NOCH NICHT FERTIG\u2757"),p(),h(3,"div",50),y(4,"1. Gehe nun wieder an die Theke und \xF6ffne von dort die Abrechnung. "),p(),h(5,"div",51)(6,"strong"),y(7,"Neu bei jedem Artist"),p(),ee(8,"br"),y(9,"Bevor du das Geld gibts: "),ee(10,"br"),y(11,"kontrolliere sein Arbeitsplatz und seine Arbeitsstation"),ee(12,"br"),y(13,"\u279E ES MUSS ALLES SAUBER SEIN! "),p(),h(14,"div",52)(15,"span",13),y(16,"4. "),p(),y(17,"\xDCbergebe nun die Umschl\xE4ge"),p(),h(18,"div",53),W(19,LUi,2,1,"table",5)(20,NUi,5,1,"table",54),h(21,"div",37)(22,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.payoutsFinishedClicked())}),y(23,"WEITER"),p()()(),ys()}if(t&2){let n=w(2);g(19),b("ngIf",n.payouts),g(),b("ngIf",(n.myService==null||n.myService.data==null?null:n.myService.data.postponedEvents.length)>0)}}function BUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"div",37),y(3,"Transfer buchen"),p(),h(4,"div",48)(5,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.bookSideCashRegisterTransfer())}),y(6),Ce(7,"money"),p()()(),ys()}if(t&2){let n=w(2);g(6),Ke("Transfer \xFCber ",tt(7,1,n.shouldBeforeDayFinishTotalValue-n.myService.cashRegisterView.missingValue)," buchen ")}}function zUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"div",37),y(3,"Kassenbericht drucken"),p(),h(4,"div",48)(5,"div")(6,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.printDayFinishReportClicked())}),y(7,"Kassenbericht drucken"),p(),y(8," oder "),h(9,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.showDayFinishReportClicked(!0))}),y(10,"Kassenbericht anzeigen"),p()(),h(11,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.printingFinishedClicked())}),y(12,"fertig"),p()()(),ys()}}function HUi(t,e){if(t&1){let n=re();h(0,"nxt-button",31),F("click",function(){V(n);let r=w(3);return B(r.showCheckListClicked())}),y(1," Checkliste \xF6ffnen "),p()}}function GUi(t,e){if(t&1){let n=re();h(0,"nxt-button",31),F("click",function(){V(n);let r=w(3);return B(r.closeDayFinishClicked())}),y(1," Abrechnung schlie\xDFen "),p()}}function WUi(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"div",48),W(3,HUi,2,0,"nxt-button",63)(4,GUi,2,0,"nxt-button",63),h(5,"nxt-button",64),F("click",function(){V(n);let r=w(2);return B(r.showDayFinishReportClicked(!1))}),y(6," Kassenbericht anzeigen (J) "),p()()(),ys()}if(t&2){let n=w(2);g(3),b("ngIf",!n.myService.cashRegisterView.checkListDone),g(),b("ngIf",n.myService.cashRegisterView.checkListDone)}}function UUi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),Ce(3,"nxtDate"),p(),h(4,"td"),y(5),p(),h(6,"td"),y(7),p()()),t&2){let n=e.$implicit;g(2),ye(Nt(3,3,n.start,"HH:mm")),g(3),ye(n.customerObj.fullName),g(2),ye(n.artist)}}function jUi(t,e){if(t&1&&(h(0,"table",61)(1,"tr")(2,"td",62),y(3),p()(),W(4,UUi,8,6,"tr",20),p()),t&2){let n=w(3);g(3),Ke("Termin-Auszahlung verschoben (",n.myService.data.postponedEvents.length,")"),g(),b("ngForOf",n.myService.data.postponedEvents)}}function $Ui(t,e){if(t&1){let n=re();vs(0),h(1,"div",8)(2,"div",37),y(3,"Die Abrechnung ist abgeschlossen"),p(),h(4,"div",37),y(5),p(),h(6,"div",48)(7,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.closeClicked())}),y(8,"schlie\xDFen"),p(),h(9,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.showDayFinishReportClicked(!1))}),y(10,"Kassenbericht anzeigen"),p(),h(11,"nxt-button",31),F("click",function(){V(n);let r=w(2);return B(r.showInvoicesClicked(!1))}),y(12,"Rechnungen anzeigen"),p()(),h(13,"div",65),W(14,jUi,5,2,"table",54),p()(),ys()}if(t&2){let n=w(2);g(5),Ke("Verbleib des Tresor-Umschlags: ",n.myService.cashRegisterView.safeMoneyGet,""),g(9),b("ngIf",(n.myService==null||n.myService.data==null?null:n.myService.data.postponedEvents.length)>0)}}function KUi(t,e){if(t&1&&(h(0,"div",24)(1,"div",25)(2,"div",26)(3,"div",27),W(4,aUi,2,3,"div",28)(5,lUi,4,0,"ng-container",29)(6,cUi,6,1,"ng-container",29)(7,dUi,8,2,"ng-container",29)(8,uUi,6,0,"ng-container",29)(9,hUi,7,0,"ng-container",29)(10,bUi,23,15,"ng-container",29)(11,wUi,7,1,"ng-container",29)(12,SUi,12,6,"ng-container",29)(13,DUi,14,1,"ng-container",29)(14,VUi,24,2,"ng-container",29)(15,BUi,8,3,"ng-container",29)(16,zUi,13,0,"ng-container",29)(17,WUi,7,2,"ng-container",29)(18,$Ui,15,2,"ng-container",29),p()()()()),t&2){let n=w();g(4),b("ngIf",n.myService.cashRegisterView.errorMessage),g(),b("ngIf",n.myService.myLoginCashRegister.state===n.NxtWorkSessionCashRegisterState._3_CalcCashRegister1),g(),b("ngIf",n.myService.myLoginCashRegister.state===n.NxtWorkSessionCashRegisterState._4_CalcCashRegister2),g(),b("ngIf",n.myService.myLoginCashRegister.state===n.NxtWorkSessionCashRegisterState._5_CalcCashRegister3),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._6_ChangeMoney),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._7_ArtistPayoutCanBook),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._9_CreateInvoices||n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._10_PreparingPayouts),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._8_ArtistPayoutBooking),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._11_SetSafeMoneyDestination),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._12_InvoicesPrinting),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._13_PayoutsRunning),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._29_SideCashRegisterBookTransfers),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._30_SideCashRegisterPrintDayFinishReport),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._14_ClosingWorkSession),g(),b("ngIf",n.myService.cashRegisterView.state===n.NxtWorkSessionCashRegisterState._99_Closed)}}var QWi,JWi,Bvt,zvt=Q(()=>{me();Gi();Ci();O9e();$n();QU();pC();kl();Ld();Yc();gu();i3();JU();Nu();Fvt();My();Ovt();Il();ha();go();oo();ih();An();Zi();Gy();ls();ri();il();Vt();Ul();$v();$A();me();ji();yi();Ci();gu();zy();KP();Kr();Cs();jl();Vvt();L1();Vt();An();QWi=t=>({"current-table":t}),JWi=t=>({"current-row":t});Bvt=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d,u,m,f){super(),this.dialogRef=i,this.socketService=r,this.dialogService=s,this.shortcutService=o,this.firestoreService=a,this.cashPaymentService=l,this.loginService=c,this.configService=d,this.permissionService=u,this.checkListService=m,this.httpClient=f,this.moneyStackTotalValue=0,this.payoutsTotalSumSafeIncluded=0,this.shouldBeforeDayFinishTotalValue=0,this.shouldBeforeDayFinishValueWithoutSafe=0,this.showLoadingUntilNextChange=!1,this.safeText=this.permissionService.isAc()?"Safe hinten":"Safe",this.users=[{value:"Safe",text:this.safeText},...this.configService.config.value.users.filter(_=>_.canSafeMoneyGet).map(_=>({text:_.username,value:_.username})).sort()],this.bigPayoutArtists=new qs(null),this.NxtWorkSessionCashRegisterState=Rs,this.allPayoutsAreBooked=!1,this.allEventsAreClosed=!1,this.currentLoadingMessage="",this.currentPayoutRow=0,this.loadingText="Artist werden ausgezahlt",this.camTimestamp=0,this.showCam=!0,this.useArtistConfirm=gt(!0),this.preload(),this.permissionService.isAc()&&(this.users=[{value:"pre-safe",text:"Safe bei Niklas"},...this.users]),this.pushSubscription=this.shortcutService.onKeyPress.subscribe(_=>{_===Pn.Down?this.nextArtist():_===Pn.Up&&this.prevArtist()})}preload(){return O(this,null,function*(){this.bigPayoutArtists.next(yield this.socketService.getBigPayoutArtists())})}ngOnInit(){this.pushSubscription=this.myService.data$.subscribe(i=>{this.showLoadingUntilNextChange=!1,this.loadingText="",this.myService.cashRegisterView.state===Rs._8_ArtistPayoutBooking?(this.showLoadingUntilNextChange=!0,this.loadingText="Artist-Auszahlungen werden gebucht"):(this.myService.cashRegisterView.state,Rs._9_CreateInvoices),this.calc()}),this.startCamInterval()}calc(){return O(this,null,function*(){if(yield this.waitForBigPayoutArtists(),uv.isCashRegisterStateBefore(this.myService.cashRegisterView.state,Rs._10_PreparingPayouts)&&(this.myService.cashRegisterView.safeCashPaymentId||this.myService.cashRegisterView.bankCashPaymentId)&&(this.dialogService.showOk(`Zu diesem Zeitpunkt darf es noch keine Bank- oder Tresor-Buchung geben
Abrechnung wird abgebrochen`),this.dialogRef.close()),this.shouldBeforeDayFinishTotalValue=this.getTotalShouldValue(),this.shouldBeforeDayFinishValueWithoutSafe=this.getTotalShouldValueWithoutSafe(),this.payoutsTotalSumSafeIncluded=this.getTotalPayoutValueTresorIncludedFromEvents(!0),this.moneyStackTotalValue=ca.getTotalValueFromMoneyStack(this.myService.cashRegisterView.moneyStackInternal),this.allEventsAreClosed=!this.myService.data.events.some(i=>!i.closed),this.allEventsAreClosed=!0,this.allPayoutsAreBooked=!this.myService.data.events.some(i=>i.artistToGet>0),this.allPayoutsAreBooked&&this.myService.myLoginCashRegister.state===Rs._7_ArtistPayoutCanBook&&(this.showLoadingUntilNextChange=!0,this.bookArtistPayouts()),this.myService.cashRegisterView.state===Rs._9_CreateInvoices||this.myService.cashRegisterView.state===Rs._10_PreparingPayouts||this.myService.cashRegisterView.state===Rs._12_InvoicesPrinting||this.myService.cashRegisterView.state===Rs._13_PayoutsRunning){let i=[],r=this.myService.artistData.filter(a=>!a.isEarlyPaidOut).map(a=>({id:a.name,value:a.payoutValue})),s=this.myService.getSaveValueForMoneyCashCalc();s&&(i.push(s.id),r.push(s));for(let a of r)this.bigPayoutArtists.value.includes(a.id)&&(i.includes(a.id)||i.push(a.id));let o=ca.canReduceMultiFromMoneyStack(this.myService.cashRegisterView.moneyStackInternal,r,i);if(o.possible){this.payouts=o.values.filter(c=>c.value>0).sort(Hr.sortString("id",!1,{first:"Tresor"}));for(let c of this.payouts){c.confirmState="none";let d=this.myService.data.artistConfirms.find(u=>u.artist===c.id);d&&(c.confirmState=d.state)}let a=this.myService.data.artistConfirms.find(c=>c.state==="pending");this.payoutsTotalSumSafeIncluded=fn.roundMoney(this.payouts.reduce((c,d)=>c+d.value,0));let l=this.getTotalPayoutValueTresorIncludedFromEvents(!0);if(l!==this.payoutsTotalSumSafeIncluded){let c=this.getTotalPayoutValueTresorIncludedFromEvents(!1),d=this.getPayoutsByArtistFromEvents(),u=0;this.myService.cashRegisterView.safeCashPayment?u=this.myService.cashRegisterView.safeCashPayment.value:u=this.myService.data.calculatedData.endOfDayCash.value_;let m="RECHENFEHLER_2!!!";m+=`
erwartet: `+l+" == "+this.payoutsTotalSumSafeIncluded,m+=`
totalPayoutValueTresorIncludedFromEvents == payoutsTotalSumSafeIncluded`,m+=`
Differnz: `+Math.abs(l-this.payoutsTotalSumSafeIncluded),m+=`
Auszahlungen aus den Terminen + Tresor  = `+l,m+=`
Payouts = `+this.payoutsTotalSumSafeIncluded,m+=`
payoutFromEvents = `+c,m+=`
Sollte Tresor: `+u,m+=`

Auszahlungen aus den Terminen
`+Qn.stringifyFormat(d),yield this.dialogService.showOk(m),this.dialogRef.close();debugger}}else{let a=ca.getSum(this.myService.cashRegisterView.moneyStackInternal),l=r.reduce((c,d)=>c+d.value,0);Gn.error(`Money-Stack ist nicht mehr aufteilbar
stackSum: `+a.toMoneyString()+`
valueSum: `+l.toMoneyString()+`
MoneyStackInternal: `+Qn.stringifyFormat(this.myService.cashRegisterView.moneyStackInternal)+`

Values: `+Qn.stringifyFormat(r))}if(this.myService.data.workSession.invoices)for(let a of this.payouts){let l=this.myService.data.workSession.invoices.find(c=>c.invoiceTo.artistName===a.id);l&&(a.invoiceNumber=l.invoiceNumber)}this.myService.cashRegisterView.state===Rs._13_PayoutsRunning&&(this.currentPayoutRow=-1,this.payouts=this.payouts.filter(a=>a.id!=="Tresor"))}})}nxtOnDestroy(){Cu.clear(this.camInterval)}countCashRegisterBeforeStart(i){return O(this,null,function*(){this.myService.log(i+". Kassenz\xE4hlung gestartet");let r=yield this.dialogService.showComponentFull(qF);r.componentInstance.setData({showShould:!1,moneyStack:ca.getEmptyMoneyStack(),title:"Gesamte Kasse z\xE4hlen"});let s=yield Sn(r.afterClosed()),o=ca.getTotalValueFromMoneyStack(s),a=fn.roundMoney(this.shouldBeforeDayFinishTotalValue-o),l=a>0?"Fehlbetrag":"\xDCberschuss";if(s){if(this.myService.log(i+". Kassenz\xE4hlung fertig "+cr.arrowRight+" "+o.toMoneyString()+" ("+l+" "+Math.abs(a).toMoneyString()+")"),this.myService.cashRegisterView.state===Rs._3_CalcCashRegister1){if(Math.abs(a)>=100){this.myService.log("Die Kassendifferenz betr\xE4gt mehr als 100\u20AC, so gehts nicht weiter");let c="Ein "+l+" von "+Math.abs(a).toMoneyString()+" ist nicht zul\xE4ssig, bitte nochmal z\xE4hlen!";this.myService.logDialog(c),yield this.dialogService.showOk(c);return}this.myService.cashRegisterView.moneyStackInternal=s,this.myService.cashRegisterView.state=Rs._4_CalcCashRegister2,this.myService.logCashRegisterState(),this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView)}else if(this.myService.cashRegisterView.state===Rs._4_CalcCashRegister2)if(ca.isSame(this.myService.cashRegisterView.moneyStackInternal,s)){if(!this.myService.cashRegisterView.moneyStackInternal)throw Error("moneyStackPreCalcCashRegister muss hier gesetzt sein");Math.abs(a)>0?yield this.showMissingDialog(a):yield this.countingProcessCashRegisterFinished(a)}else{this.myService.cashRegisterView.moneyStackInternal=ca.getEmptyMoneyStack(),this.myService.cashRegisterView.state=Rs._3_CalcCashRegister1,this.myService.logCashRegisterState();let c="Die Erste und Zweite Kassenz\xE4hlung stimmt nicht \xFCberein, bitte wiederholen.";this.myService.logDialog(c),this.dialogService.showOk(c)}else if(this.myService.cashRegisterView.state===Rs._5_CalcCashRegister3)if(!ca.isSame(this.myService.cashRegisterView.moneyStackInternal,s))this.myService.cashRegisterView.moneyStackInternal=ca.getEmptyMoneyStack(),this.myService.cashRegisterView.state=Rs._3_CalcCashRegister1,this.myService.logCashRegisterState(),yield this.dialogService.showOk("Die Erste und Zweite Z\xE4hlung stimmen nicht mit der Dritten \xFCberein, bitte wiederholen.");else{let c="",d="";if(a>0&&(c="Du hast leider zu wenig Geld, es fehlen dir "+a.toMoneyString(),d="Mit dem Fehlbetrag weiter machen"),a<0&&(c="Du hast "+Math.abs(a).toMoneyString()+" zu viel Geld gez\xE4hlt.",d="Mit dem \xDCberschuss weiter machen"),c&&(yield this.dialogService.showYesNo(c,{yesText:"Ich z\xE4hle das Geld nochmal",noText:d}))){this.myService.setViewedCashRegisterState(Rs._3_CalcCashRegister1);return}yield this.countingProcessCashRegisterFinished(a)}this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView)}})}getTotalShouldValue(){let i=this.myService.data.calculatedData.cashRegisters.find(s=>s.studio===this.myService.cashRegisterView.studio),r=i.incomingPaymentsSum+i.incomingPaymentsSum_;if(r-=i.outgoingPaymentsSum+i.outgoingPaymentsSum_,r+=this.myService.cashRegisterView.startMoney,this.myService.cashRegisterView.isMainCashRegister){let s=this.myService.data.events.filter(o=>!o.payments.some(a=>a.earlyPayout)).reduce((o,a)=>o+Xo.getPaymentSumByPaymentType(a.payments,"payout"),0);r+=s,this.myService.cashRegisterView.bankCashPayment&&(r+=this.myService.cashRegisterView.bankCashPayment.value),this.myService.cashRegisterView.safeCashPaymentId&&(r+=this.myService.cashRegisterView.safeCashPayment.value)}else{let s=this.myService.data.workSession.cashRegisters.find(l=>l.isMainCashRegister).studio,a=this.myService.data.cashPayments.filter(l=>l.direction==="out"&&l.studio===this.myService.cashRegisterView.studio&&l.articleId?.startsWith("transfer_"+s.toLowerCase())).reduce((l,c)=>l+c.paymentValue,0);r+=a}return r.roundMoney()}getTotalShouldValueWithoutSafe(){let i=this.myService.data.calculatedData.cashRegisters.find(s=>s.studio===this.myService.cashRegisterView.studio),r=i.incomingPaymentsSum;if(r-=i.outgoingPaymentsSum,r+=this.myService.cashRegisterView.startMoney,this.myService.cashRegisterView.isMainCashRegister){let s=this.myService.data.events.filter(a=>a.visibility!=="private"&&!a.payments.some(l=>l.earlyPayout)),o=this.myService.data.events.filter(a=>a.visibility!=="private"&&!a.payments.some(l=>l.earlyPayout)).reduce((a,l)=>a+Xo.getPaymentSumByPaymentType(l.payments,"payout"),0);r+=o,this.myService.cashRegisterView.bankCashPayment&&(r+=this.myService.cashRegisterView.bankCashPayment.value),this.myService.cashRegisterView.safeCashPaymentId}else{let s=this.myService.data.workSession.cashRegisters.find(l=>l.isMainCashRegister).studio,a=this.myService.data.cashPayments.filter(l=>l.direction==="out"&&!l.isPrivate&&l.studio===this.myService.cashRegisterView.studio&&l.articleId?.startsWith("transfer_"+s.toLowerCase())).reduce((l,c)=>l+c.paymentValue,0);r+=a}return r.roundMoney()}getPayoutsByArtistFromEvents(){let i={},r=this.myService.data.events.filter(s=>!s.payments.some(o=>o.earlyPayout));for(let s of r)s.artistTotalGet>0&&(i[s.artist]||(i[s.artist]=0),i[s.artist]+=s.artistTotalGet);return i}getTotalPayoutValueTresorIncludedFromEvents(i){let r=this.myService.data.events.filter(o=>!o.payments.some(a=>a.earlyPayout)).reduce((o,a)=>o+a.artistTotalGet,0),s=0;return i?this.myService.cashRegisterView.safeCashPayment?s=fn.roundMoney(r+this.myService.cashRegisterView.safeCashPayment.value):s=fn.roundMoney(r+this.myService.data.calculatedData.endOfDayCash.value_):s=r,s}countCashRegisterChange(){return O(this,null,function*(){this.myService.log("Geldwechseln gestartet");let i=this.dialogService.showComponentFull(qF),r=this.myService.getArtistPayouts(!0),s={prioIds:[],values:r.artists.map(a=>({id:a.artistName,value:a.payoutValueTotal}))};this.myService.data.calculatedData.endOfDayCash.value_>0&&(s.values.push({id:"Tresor",value:this.myService.data.calculatedData.endOfDayCash.value_}),s.prioIds=["Tresor",...s.prioIds]);for(let a of r.artists)this.bigPayoutArtists.value.includes(a.artistName)&&(s.prioIds.includes(a.artistName)||s.prioIds.push(a.artistName));i.componentInstance.setData({showShould:!0,moneyStack:this.myService.cashRegisterView.moneyStackInternal,title:"Geld wechseln",totalMoneyShouldValue:ca.getTotalValueFromMoneyStack(this.myService.cashRegisterView.moneyStackInternal),payoutData:s,suppressValueChange:!0,canOnlyUseChangeProposals:!0});let o=yield Sn(i.afterClosed());o?(this.myService.log("Geldwechseln erfolgreich beendet"),this.myService.cashRegisterView.moneyStackInternal=o,this.myService.cashRegisterView.state=Rs._7_ArtistPayoutCanBook,this.myService.logCashRegisterState(),this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView)):this.myService.log("Geldwechseln abgebrochen")})}bookArtistPayouts(){this.showLoadingUntilNextChange=!0,this.myService.log("Artist-Auszahlungen werden gebucht"),this.socketService.addArtistPayouts2(this.myService.dateString)}nextArtist(){(this.myService.myLoginCashRegister.state===Rs._9_CreateInvoices||this.myService.myLoginCashRegister.state===Rs._10_PreparingPayouts)&&this.payouts.length>this.currentPayoutRow+(this.myService.myLoginCashRegister.state===Rs._10_PreparingPayouts?0:1)&&(this.currentPayoutRow++,this.payouts[this.currentPayoutRow]&&this.myService.log('Umschlag von "'+this.payouts[this.currentPayoutRow].id+'" ('+this.payouts[this.currentPayoutRow].value.toMoneyString()+") wird gepackt"))}prevArtist(){(this.myService.myLoginCashRegister.state===Rs._9_CreateInvoices||this.myService.myLoginCashRegister.state===Rs._10_PreparingPayouts)&&this.currentPayoutRow>0&&(this.currentPayoutRow--,this.myService.log('Umschlag von "'+this.payouts[this.currentPayoutRow].id+'" ('+this.payouts[this.currentPayoutRow].value.toMoneyString()+") wird gepackt"))}showInvoice(i){return O(this,null,function*(){let r=yield this.socketService.getArtistInvoice(i.invoiceNumber);this.dialogService.showPdf(r.invoiceBase64,r.invoiceNumber+".pdf")})}bookSideCashRegisterTransfer(){let i=this.shouldBeforeDayFinishValueWithoutSafe-this.myService.cashRegisterView.missingValue,r=this.shouldBeforeDayFinishTotalValue-this.shouldBeforeDayFinishValueWithoutSafe;this.socketService.bookSideCashRegisterTransfer(this.myService.dateString,this.myService.cashRegisterView.studio,i,r),this.showLoadingUntilNextChange=!0}countingProcessCashRegisterFinished(i){return O(this,null,function*(){if(this.myService.cashRegisterView.isMainCashRegister)if(this.payoutsTotalSumSafeIncluded>this.moneyStackTotalValue){let r=fn.roundTo(this.payoutsTotalSumSafeIncluded-this.moneyStackTotalValue,10),s=`Da du ein Fehlbetrag hast, ist eine Auszahlung aller Artists nicht mehr m\xF6glich.


Es m\xFCssen <strong>`+r.toMoneyString()+`</strong> von der Bank geholt werden

Die Abrechnung wird abgebrochen`;yield this.dialogService.showOk(s,{title:"Abrechnung nicht m\xF6glich"}),this.myService.cashRegisterView.state=Rs._1_Open,this.myService.logCashRegisterState();let o=`Abrechnung wird abgebrochen!
Der Fehlbetrag von `+i.toMoneyString()+` hat eine Bank-Einlage zur Folge.

Es m\xFCssen `+r.toMoneyString()+" von der Bank geholt werden.";this.socketService.sendBackofficeHeads(o),setTimeout(()=>this.dialogRef.close(),1e3)}else this.myService.canPayoutPreCalcCashRegister()?(this.myService.cashRegisterView.state=Rs._7_ArtistPayoutCanBook,this.myService.logCashRegisterState()):(this.myService.cashRegisterView.state=Rs._6_ChangeMoney,this.myService.logCashRegisterState()),this.myService.logCashRegisterState(),this.myService.log("Fehlbetrag (missingValue) wird auf "+i+" gesetzt"),this.myService.cashRegisterView.missingValue=i;else{let r=this.myService.data.workSession.cashRegisters.find(s=>s.isMainCashRegister);if(this.myService.cashRegisterView.moneyStackEnd=ca.getEmptyMoneyStack(),this.myService.cashRegisterView.endMoney=0,this.myService.cashRegisterView.endMoneyDateTime=Date.now(),this.myService.cashRegisterView.shouldValueBeforePayoutsWithoutSafe=this.shouldBeforeDayFinishValueWithoutSafe,this.myService.cashRegisterView.shouldValueBeforePayoutsWithoutSafe<0)throw this.myService.log("shouldValueBeforePayoutsWithoutSafe ist kleiner 0, das darf nicht sein -> Fehler"),Error("Es fehlt zu viel Geld um fortzufahren");this.myService.log("Fehlbetrag (missingValue) wird auf "+i+" gesetzt"),this.myService.cashRegisterView.missingValue=i,this.myService.cashRegisterView.state=Rs._29_SideCashRegisterBookTransfers,this.myService.logCashRegisterState(),this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView)}})}test4(){return O(this,null,function*(){this.myService.cashRegisterView.safeCashPaymentId&&(yield this.cashPaymentService.deleteById(this.myService.cashRegisterView.safeCashPaymentId,"outgoing")),this.myService.cashRegisterView.bankCashPaymentId&&(yield this.cashPaymentService.deleteById(this.myService.cashRegisterView.bankCashPaymentId,"outgoing"))})}bookBankClicked(){return O(this,null,function*(){if(this.myService.cashRegisterView.state===Rs._9_CreateInvoices){this.dialogService.showOk("Rechnungen werden noch erstellt, bitte warten bis die Rechnungen erstellt wurden.");return}let i=fn.roundMoney(this.moneyStackTotalValue-this.payoutsTotalSumSafeIncluded),r=this.payouts.find(s=>s.id==="Tresor")?.value||0;this.showLoadingUntilNextChange=!0,(yield this.myService.bookBankAndSafe(i,r,this.shouldBeforeDayFinishValueWithoutSafe))||(this.showLoadingUntilNextChange=!1)})}bookEndMoney(){return O(this,null,function*(){this.myService.log("starte die Z\xE4hlung des Kassenbestandes");let i=fn.roundMoney(this.moneyStackTotalValue-this.payoutsTotalSumSafeIncluded-this.myService.cashRegisterView.bankCashPayment.value),r=this.dialogService.showComponentFull(qF);r.componentInstance.setData({showShould:!0,moneyStack:ca.getEmptyMoneyStack(),title:"Kassen-Endbestand z\xE4hlen",totalMoneyShouldValue:i,canNotExitWithWrongShouldValue:!0});let s=yield Sn(r.afterClosed());if(s){let o=ca.getTotalValueFromMoneyStack(s);this.myService.log("Kassenbestandes von "+o.toMoneyString()+" wird gebucht"),this.myService.cashRegisterView.moneyStackEnd=s,this.myService.cashRegisterView.endMoney=o,this.myService.cashRegisterView.endMoneyDateTime=Date.now();let a=this.shouldBeforeDayFinishTotalValue-this.shouldBeforeDayFinishValueWithoutSafe;this.myService.log("shouldBeforeDayFinishValue: "+this.shouldBeforeDayFinishTotalValue),this.myService.log("shouldBeforeDayFinishValueWithoutSafe: "+this.shouldBeforeDayFinishValueWithoutSafe),a>0?(this.myService.cashRegisterView.state=Rs._11_SetSafeMoneyDestination,this.myService.logCashRegisterState()):(this.myService.cashRegisterView.state=Rs._12_InvoicesPrinting,this.myService.cashRegisterView.payouts=this.payouts,this.myService.logCashRegisterState()),this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView)}else this.myService.log("Z\xE4hlung des Kassenbestandes abgebrochen")})}setSafeMoneyDestination(){let i=this.myService.cashRegisterView.safeMoneyGet;this.configService.config.value.studioRegion==="AC"&&(i=i.replace("pre-safe","Safe bei Niklas"));let r="Tresor-Umschlag "+this.myService.cashRegisterView.safeCashPayment.value.toMoneyString()+' wird an "'+i+'" \xFCbergeben';this.configService.config.value.isFranchise||(this.socketService.sendWhatsAppMessage(Kc.Numbers.Julian,r),this.socketService.sendWhatsAppMessage(Kc.Numbers.CaponePrivat,r)),this.myService.cashRegisterView.state=Rs._12_InvoicesPrinting,this.myService.cashRegisterView.payouts=this.payouts,this.myService.logCashRegisterState(),this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView),this.showLoadingUntilNextChange=!0,this.myService.log(r)}printInvoicesClicked(){return O(this,null,function*(){try{this.dialogService.showLoading(_n.PrintPdf,"Rechnungen werden gedruckt"),this.myService.log("Alle Rechnungen drucken"),yield this.myService.workSessionPrintAllInvoices(),this.myService.log("Alle Rechnungen wurden gedruckt"),this.dialogService.hideLoading(_n.PrintPdf)}catch(i){this.myService.log(`Fehler beim drucken der Rechnungen
`+i.message),this.dialogService.hideLoading(_n.PrintPdf),(yield this.dialogService.showYesNo("Fehler beim drucken der Rechnungen",{yesText:"Alle Rechnungen lokal drucken",noText:"Abbrechen"}))&&this.myService.showMergedInvoices(!0)}})}showInvoicesClicked(i){return O(this,null,function*(){this.myService.showMergedInvoices(i)})}printDayFinishReportClicked(){return O(this,null,function*(){let i=yield this.myService.askDayFinishReportEmployee();try{i&&(this.dialogService.showLoading(_n.PrintPdf,"Kassenbericht wird erstellt"),this.myService.log("Kassenbericht(e) wird erstellt"),yield this.myService.workSessionPrintDayFinishReports(i),this.myService.log("Kassenbericht(e) wurden gedruckt"),this.dialogService.hideLoading(_n.PrintPdf))}catch(r){this.myService.log(`Fehler beim drucken des Kassenberichts
`+r.message),this.dialogService.hideLoading(_n.PrintPdf),(yield this.dialogService.showYesNo(`Fehler beim drucken des Kassenberichts

<small>`+r.message+"</small>",{yesText:"Kassenbericht lokal drucken",noText:"Abbrechen",title:"\u{1F612} Fehler \u{1F612}"}))&&this.myService.showMergedDayFinishReports(i,!0)}})}showDayFinishReportClicked(i){return O(this,null,function*(){let r=yield this.myService.askDayFinishReportEmployee();r&&this.myService.showMergedDayFinishReports(r,i)})}printingFinishedClicked(){this.showLoadingUntilNextChange=!0,this.myService.cashRegisterView.isMainCashRegister?this.myService.setViewedCashRegisterState(Rs._13_PayoutsRunning):(this.myService.cashRegisterView.closedBy=this.loginService.getUsername(),this.myService.setViewedCashRegisterState(Rs._99_Closed))}payoutsFinishedClicked(){return O(this,null,function*(){if(this.myService.data.artistConfirms.some(i=>i.state==="pending")){yield this.dialogService.showOk("Es gibt noch Artisten die ihre Umschl\xE4ge nicht best\xE4tigt haben, bitte warte bis alle Artisten ihre Umschl\xE4ge best\xE4tigt haben.");return}if(!(!this.configService.config.value.isFranchise&&(!(yield this.dialogService.showYesNo("Ja ich habe verstanden, dass ich jeden Arbeitsplatz kontrollieren soll, das mach ich auch bei jedem Artist bevor ich ihm seinen Umschlag gebe.",{yesText:"Ja, ich habe verstanden",noText:"Nein, ich habe nicht verstanden"}))||!(yield this.dialogService.showYesNo("Und wenn ich es vergesse",{yesText:"Dann zahle ich pro Arbeitsplatz 50 \u20AC",noText:"Dann passiert nix"}))))){for(let i of this.payouts)i.artistGotMoney=i.confirmState==="confirmed";this.showLoadingUntilNextChange=!0,this.myService.cashRegisterView.payouts=this.payouts,this.myService.cashRegisterView.checkListDone=!1,this.myService.cashRegisterView.state=Rs._14_ClosingWorkSession,this.myService.logCashRegisterState(),this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView)}})}showCheckListClicked(){return O(this,null,function*(){yield this.checkListService.startReception(),this.myService.cashRegisterView.checkListDone=!0,this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView),this.showLoadingUntilNextChange=!0})}closeDayFinishClicked(){this.myService.cashRegisterView.state=Rs._99_Closed,this.myService.cashRegisterView.closedBy=this.loginService.getUsername(),this.myService.logCashRegisterState(),this.myService.updateWorkSessionCashRegister(this.myService.cashRegisterView),this.dialogRef.close()}closeClicked(){this.dialogRef.close()}showMissingDialog(i){return O(this,null,function*(){let r="",s="Fehlbetrag";i>0?r="Es fehlen "+i.toMoneyString()+" in der Kasse!":(r="Es sind "+Math.abs(i).toMoneyString()+" zu viel in der Kasse!",s="\xDCberschuss"),i>-50&&i<50?(yield this.dialogService.showYesNo(r,{yesText:"Ich z\xE4hle nochmal von vorne",noText:"Mit dem "+s+" weiter machen"}))?(this.myService.cashRegisterView.state=Rs._3_CalcCashRegister1,this.myService.logCashRegisterState(),this.myService.log(r+" -> Ich z\xE4hle nochmal von vorne das Geld nochmal")):(this.myService.log(r+" -> Mit dem Fehlbetrag weiter machen"),yield this.countingProcessCashRegisterFinished(i)):(yield this.dialogService.showOk(r,{buttonText:"Ich z\xE4hle das Geld nochmal"}),this.myService.log(r+" -> Muss von vorne z\xE4hlen"),this.myService.cashRegisterView.state=Rs._3_CalcCashRegister1,this.myService.logCashRegisterState())})}startCamInterval(){return O(this,null,function*(){let i=yield this.socketService.getIp();(i==="1"||i==="37.24.101.11")&&(this.camInterval=setInterval(()=>O(this,null,function*(){this.loadCamImage()}),3e3),this.loadCamImage())})}loadCamImage(){return O(this,null,function*(){let i=yield Sn(this.httpClient.get("https://test.nxt-lvl.ink/empfang-bild-9ksfwjv9buz4dlwqg628nc",{responseType:"arraybuffer"})),r=new Uint8Array(i),s=new Blob([r],{type:"image/jpeg"}),o=window.URL||window.webkitURL;this.camImgSrc=o.createObjectURL(s),this.camTimestamp=Date.now()})}hideCamClicked(){xg.clear(this.showCamTimeout),this.showCam=!1,this.showCamTimeout=setTimeout(()=>{this.showCam=!0},15e3)}waitForBigPayoutArtists(){return O(this,null,function*(){return new Promise((i,r)=>{Array.isArray(this.bigPayoutArtists)?i():this.bigPayoutArtists.pipe(Jd(s=>Array.isArray(s))).subscribe(()=>i())})})}startArtistConfirm(i){return O(this,null,function*(){let r=this.myService.data.artistConfirms.find(s=>s.state==="pending"&&s.artist!==i.id);if(r){yield this.dialogService.showOk("Warte bis Der Artist "+r.artist+" best\xE4tigt hat");return}this.myService.log("Betrag-Best\xE4tigungs-Link wird an "+i.id+" geschickt"),yield this.socketService.createArtistConfirm({artist:i.id,value:i.value,workSessionDateString:this.myService.dateString,state:"pending",earlyPayout:!1})})}cancelArtistConfirm(i){return O(this,null,function*(){let r=this.myService.data.artistConfirms.find(s=>s.artist===i.id);yield this.socketService.cancelArtistConfirm(r.id)})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(vt),R(fu),R(ff),R(K5),R(Fi),R(Xi),R(ws),R(Nvt),R(Uc))},e.\u0275cmp=_e({type:e,selectors:[["nxt-day-finish-view-2"]],standalone:!0,features:[et,xe],decls:54,vars:28,consts:[["fxLayout","column",1,"nxt-page"],["nxtPermission","IsAc",4,"ngIf"],["nxtPermission","IsJulian","fxLayout","column",1,"p-absolute"],[1,"nxt-table",2,"font-size","75%"],[1,"right"],["class","nxt-table",4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-between",1,"p-relative"],["fxFlex","","fxLayoutAlign","center"],["fxLayout","column","fxLayoutAlign","center center"],[1,"text-150"],[1,"dialog-close-button",3,"click"],["class","h-100","fxLayout","column","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","class","scrollable h-100",4,"ngIf"],["nxtPermission","IsAc"],[2,"width","30%","position","absolute","right","18px","top","53px","overflow","hidden","border-radius","8px"],[2,"position","absolute","right","0","z-index","1","background-color","#313131cc","padding","0 3px"],[2,"transform","scale(1.5)","transform-origin","bottom left",3,"src"],[1,"flex","flex-row","justify-end","pt-1"],[3,"click","smallButton"],[1,"nxt-table"],[4,"ngFor","ngForOf"],["fxLayout","column","fxLayoutAlign","center center",1,"h-100"],["class","pt-2",4,"ngIf"],[1,"pt-2"],["fxLayout","column",1,"scrollable","h-100"],["fxFlex","","fxLayout","column","fxLayoutAlign","start center",1,"pt-4"],["fxLayoutAlign","strech",1,"h-100"],["fxLayout","column","fxLayoutAlign","center center",1,"text-100"],["class","red text-150",3,"innerHTML",4,"ngIf"],[4,"ngIf"],[1,"red","text-150",3,"innerHTML"],[3,"click"],[3,"disabled"],[1,"p-4"],[1,"mt-3","nxt-table",3,"ngClass"],["class","p-3",4,"ngIf"],["class","p-4",4,"ngIf"],[1,"p-3"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[3,"innerHTML"],["class","mouse-pointer",3,"click",4,"ngIf"],[1,"mouse-pointer",3,"click"],[1,"right","bold"],["colspan","2"],[3,"click","disabled"],[3,"valueChange","value","options"],["fxLayout","row"],["fxLayout","column","fxLayoutGap","10px","fxLayoutAlign","center center"],["nxtPermission","IsAc",1,"p-3","text-120"],["nxtPermission","IsAc",1,"p-3"],["nxtPermission","IsAc",1,"pb-3","text-150","red",2,"text-align","center"],[1,"pb-3"],["fxLayout","column","fxLayoutAlign","center center",1,"pt-2"],["class","mt-2 nxt-table",4,"ngIf"],[1,"flex","flex-col","items-center","justify-center"],[1,"flex","flex-row","pt-3"],[3,"size"],[1,"pt-3",3,"click"],[1,"py-2",3,"click"],[3,"valueChange","value"],[1,"mt-2","nxt-table"],["colspan","3",1,"text-center"],[3,"click",4,"ngIf"],["nxtPermission","IsJulian",3,"click"],[1,"text-80"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,eUi,9,6,"div",1),h(2,"div",2)(3,"table",3)(4,"tr")(5,"td"),y(6,"Gesamt Soll"),p(),h(7,"td",4),y(8),Ce(9,"money"),p(),h(10,"td",4),y(11),p()(),h(12,"tr")(13,"td"),y(14,"Gesamt Soll Normal"),p(),h(15,"td",4),y(16),Ce(17,"money"),p(),h(18,"td",4),y(19),p()(),h(20,"tr")(21,"td"),y(22,"Gesamt Soll Tresor"),p(),h(23,"td",4),y(24),Ce(25,"money"),p(),h(26,"td",4),y(27),p()(),h(28,"tr")(29,"td"),y(30,"shouldBeforeDayFinishValue"),p(),h(31,"td",4),y(32),Ce(33,"money"),p()(),h(34,"tr")(35,"td"),y(36,"shouldBeforeDayFinishValueWithoutSafe"),p(),h(37,"td",4),y(38),Ce(39,"money"),p()()(),W(40,iUi,2,1,"table",5)(41,rUi,2,1,"table",5),p(),h(42,"div",6)(43,"div",7)(44,"div",8)(45,"div",9),y(46),p(),h(47,"div"),y(48),Ce(49,"cashRegisterState"),p()()(),h(50,"nxt-button-icon",10),F("click",function(){return s.dialogRef.close()}),y(51,"close"),p()(),W(52,oUi,3,1,"div",11)(53,KUi,19,15,"div",12),p()),r&2&&(g(),b("ngIf",s.showCam),g(7),ye(tt(9,16,s.shouldBeforeDayFinishTotalValue)),g(3),ye(s.shouldBeforeDayFinishTotalValue),g(5),ye(tt(17,18,s.shouldBeforeDayFinishValueWithoutSafe)),g(3),ye(s.shouldBeforeDayFinishValueWithoutSafe),g(5),ye(tt(25,20,s.shouldBeforeDayFinishTotalValue-s.shouldBeforeDayFinishValueWithoutSafe)),g(3),cn("",s.shouldBeforeDayFinishTotalValue," - ",s.shouldBeforeDayFinishValueWithoutSafe,""),g(5),ye(tt(33,22,s.shouldBeforeDayFinishTotalValue)),g(6),ye(tt(39,24,s.shouldBeforeDayFinishValueWithoutSafe)),g(2),b("ngIf",s.payouts),g(),b("ngIf",!s.payouts&&s.myService.cashRegisterView.payouts),g(5),Ke("Abrechnung ",s.myService.cashRegisterView.studio,""),g(2),ye(tt(49,26,s.myService.cashRegisterView.state)),g(4),b("ngIf",s.showLoadingUntilNextChange),g(),b("ngIf",!s.showLoadingUntilNextChange))},dependencies:[At,Yt,$r,oi,qi,Zs,Ct,Hi,an,yf,Lt,_s,Dn,No,$l,Nn,Hn,Or,ks,Lvt,Rvt],styles:["table[_ngcontent-%COMP%]   .current-row[_ngcontent-%COMP%]{color:#ccc}table[_ngcontent-%COMP%]   .current-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(-n+4):not(:first-child){font-size:200%}table[_ngcontent-%COMP%]   .current-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:2px solid #ccc}.current-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:2px solid #ccc;font-size:130%;color:#ccc}"]});let t=e;return t})()});function YUi(t,e){if(t&1){let n=re();h(0,"div",10),F("dblclick",function(){let r=V(n).$implicit,s=w(2);return B(s.additionalEventIdClicked(r))}),h(1,"div"),y(2),p()()}if(t&2){let n=e.$implicit,i=w(2);g(2),ye(i.getEventText(n))}}function qUi(t,e){if(t&1&&(h(0,"div")(1,"div"),y(2),Ce(3,"nxtDate"),p()()),t&2){let n=e.$implicit;g(2),ye(Nt(3,1,n,"dd.MM.yyyy"))}}function ZUi(t,e){if(t&1){let n=re();h(0,"div",0)(1,"div",1)(2,"div"),y(3),Ce(4,"date"),p()(),h(5,"div",2)(6,"div"),y(7,"Start"),p(),h(8,"nxt-date-picker",3),Xe("nxtModelChange",function(r){let s=V(n);return Ze(s.startAtDateString,r)||(s.startAtDateString=r),B(r)}),F("nxtModelChange",function(){V(n);let r=w();return B(r.calcFullDays())}),p(),h(9,"nxt-time-picker",4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.startTime,r)||(s.startTime=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.calcFullDays())}),p()(),h(10,"div",2)(11,"div"),y(12,"End"),p(),h(13,"nxt-date-picker",3),Xe("nxtModelChange",function(r){let s=V(n);return Ze(s.endAtDateString,r)||(s.endAtDateString=r),B(r)}),F("nxtModelChange",function(){V(n);let r=w();return B(r.calcFullDays())}),p(),h(14,"nxt-time-picker",4),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.endTime,r)||(s.endTime=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.calcFullDays())}),p()(),h(15,"div")(16,"div"),y(17,"Zus\xE4tzliche Termine"),p(),h(18,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.newAdditionalEventClicked())}),y(19,"neuer Zus\xE4tzlicher"),p(),h(20,"div"),Kn(21,YUi,3,1,"div",6,sa),p()(),h(23,"div",7)(24,"div"),y(25,"Voll Tage"),p(),W(26,qUi,4,4,"div",8),p(),h(27,"div",9)(28,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.cancelClicked())}),y(29,"Abbrechen"),p(),h(30,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.saveClicked())}),y(31,"Speichern"),p()()()}if(t&2){let n=e,i=w();g(3),Ke("WorkSession ",Nt(4,6,n.dateString,"dd.MM.yyyy"),""),g(5),qe("nxtModel",n.startAtDateString),g(),qe("value",i.startTime),g(4),qe("nxtModel",n.endAtDateString),g(),qe("value",i.endTime),g(7),Yn(n.additionalEventIds),g(5),b("ngForOf",n.additionalDateStrings)}}var Hvt,Gvt=Q(()=>{me();Gi();jo();Zi();Ly();th();Vt();ri();go();zn();Ci();me();ji();yi();Vt();Hvt=(()=>{let e=class e extends bt{constructor(i,r){super(),this.dialogRef=i,this.socketService=r,this.dialogService=Ve(vt),this.startTime="",this.endTime=""}ngOnInit(){this.pushSubscription=this.myService.data$.subscribe(i=>{this.data=i,this.startTime=Qt.format(this.data.workSession.startAt-this.data.workSession.startAt.clearTime(),"HH:mm"),this.endTime=Qt.format(this.data.workSession.endAt-this.data.workSession.endAt.clearTime(),"HH:mm"),this.calcFullDays()})}nxtOnDestroy(){}cancelClicked(){this.dialogRef.close()}calcFullDays(){this.data.workSession.startAt=(this.data.workSession.startAtDateString+" "+this.startTime+":00").dateParse(),this.data.workSession.endAt=(this.data.workSession.endAtDateString+" "+this.endTime+":00").dateParse(),this.data.workSession.additionalDateStrings=[];let i=Ie.dayDiff(this.data.workSession.endAt,this.data.workSession.startAt);for(let r=1;r<i;r++){let s=this.data.workSession.startAt.dateAddDays(r).dateFormat("yyyy-MM-dd");this.data.workSession.additionalDateStrings.includes(s)||this.data.workSession.additionalDateStrings.push(s)}}saveClicked(){return O(this,null,function*(){this.data.workSession.startAt=(this.data.workSession.startAtDateString+" "+this.startTime+":00").dateParse(),this.data.workSession.endAt=(this.data.workSession.endAtDateString+" "+this.endTime+":00").dateParse(),this.calcFullDays(),yield this.socketService.workSessionUpdateWorkSession(this.data.workSession),this.dialogRef.close()})}additionalEventIdClicked(i){return O(this,null,function*(){let r=this.getEventText(i);(yield this.dialogService.showYesNo(r+`

Termin aus zus\xE4tzlichen Terminen entfernen?`))&&(this.data.workSession.additionalEventIds=this.data.workSession.additionalEventIds.filter(s=>s!==i),yield this.socketService.workSessionUpdateWorkSession(this.data.workSession))})}getEventText(i){let r=this.myService.data.events.find(s=>s.id===i);if(r){let s=r.payments.some(o=>o.paymentType==="payout");return r.startDateString+" | "+r.artist+" | "+r.invoiceNumber+" | "+s+" | "+r.id}return"?"}newAdditionalEventClicked(){return O(this,null,function*(){let i=yield this.dialogService.showInput({message:"neue EventID"});i&&(this.data.workSession.additionalEventIds.includes(i)||(this.data.workSession.additionalEventIds.push(i),yield this.socketService.workSessionUpdateWorkSession(this.data.workSession)))})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-work-session-edit"]],standalone:!0,features:[et,xe],decls:2,vars:3,consts:[[1,"flex","w-full","flex-col","items-center"],["fxLayout","row","fxLayoutAlign","center",1,"w-full","text-120"],[1,"flex","flex-row","items-center","gap-4"],[3,"nxtModelChange","nxtModel"],[3,"valueChange","value"],[3,"click"],[1,"text-[80%]"],["fxLayout","column","fxLayoutAlign","center center"],[4,"ngFor","ngForOf"],[1,"flex","flex-row","justify-around","pt-2"],[1,"text-[80%]",3,"dblclick"]],template:function(r,s){if(r&1&&(W(0,ZUi,32,9,"div",0),Ce(1,"async")),r&2){let o;Je((o=tt(1,1,s.myService.data$).workSession)?0:-1,o)}},dependencies:[At,Yt,oi,tl,cf,Hi,Lt,Zj,Hn,Xu],styles:["[_nghost-%COMP%]{display:flex;width:600px}"],changeDetection:0});let t=e;return t})()});function eji(t,e){if(t&1){let n=re();h(0,"button",11),F("click",function(){V(n);let r=w();return B(r.earlyArtistPayout())}),h(1,"mat-icon"),y(2,"euro"),p(),h(3,"span"),y(4,"Jetzt auszahlen"),p()()}t&2&&b("permissionOr",bn(1,JUi))}function tji(t,e){if(t&1){let n=re();h(0,"button",10),F("click",function(){V(n);let r=w();return B(r.invoice())}),h(1,"mat-icon"),y(2,"article"),p(),h(3,"span"),y(4,"Rechnung"),p()()}}var XUi,QUi,JUi,NC,W9e,Wvt=Q(()=>{me();Gi();fx();Ja();ri();Vt();il();me();Vt();XUi=["artistGetMenuTriggerWrapper"],QUi=["artistGetMenuTrigger"],JUi=()=>["IsReception","IsJulian"];NC=function(t){return t.EarlyPayout="earlyPayout",t.SetTimeWindow="setTimeWindow",t.Invoice="invoice",t.ResetEarlyArtistPayout="resetEarlyArtistPayout",t}(NC||{}),W9e=(()=>{let e=class e extends bt{constructor(){super(),this.onMenuItemClicked=new nt}clickedOut(){this.artistGetMenuTrigger.closeMenu()}ngOnInit(){}nxtOnDestroy(){}show(i,r){i.stopPropagation(),i.preventDefault(),this.artist=r,this.artistGetMenuTriggerWrapper.nativeElement.style.left=i.x+"px",this.artistGetMenuTriggerWrapper.nativeElement.style.top=i.y+"px",this.artistGetMenuTrigger.closeMenu(),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.artistGetMenuTrigger.openMenu(),requestAnimationFrame(()=>{this.artistGetMenuTriggerWrapper.nativeElement.style.left="0px",this.artistGetMenuTriggerWrapper.nativeElement.style.top="0px"})})})})},100)}stopPropagation(i){i.stopPropagation(),i.preventDefault()}earlyArtistPayout(){this.onMenuItemClicked.emit({artist:this.artist,menuItem:NC.EarlyPayout})}setArtistTimeWindow(){this.onMenuItemClicked.emit({artist:this.artist,menuItem:NC.SetTimeWindow})}invoice(){this.onMenuItemClicked.emit({artist:this.artist,menuItem:NC.Invoice})}resetEarlyArtistPayoutClicked(){this.onMenuItemClicked.emit({artist:this.artist,menuItem:NC.ResetEarlyArtistPayout})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-scr-artist-context-menu"]],viewQuery:function(r,s){if(r&1&&(ei(XUi,5),ei(QUi,5)),r&2){let o;Pt(o=Rt())&&(s.artistGetMenuTriggerWrapper=o.first),Pt(o=Rt())&&(s.artistGetMenuTrigger=o.first)}},hostBindings:function(r,s){r&1&&F("click",function(){return s.clickedOut()},!1,k9)},outputs:{onMenuItemClicked:"onMenuItemClicked"},standalone:!0,features:[et,xe],decls:21,vars:7,consts:[["artistGetMenuTriggerWrapper",""],["artistGetMenuTrigger","matMenuTrigger"],["artistGetMenu",""],[1,"artistGetMenuTriggerWrapper",3,"contextmenu"],[3,"matMenuTriggerFor"],[3,"hasBackdrop"],["fxLayout","row","fxLayoutAlign","center center",1,"pb-2","artist-get-menu-artist-title"],["nxtPermission","","mat-menu-item","",3,"permissionOr","click",4,"ngIf"],["mat-menu-item","",3,"click",4,"ngIf"],["nxtPermission","IsJulian","mat-menu-item","",3,"click"],["mat-menu-item","",3,"click"],["nxtPermission","","mat-menu-item","",3,"click","permissionOr"]],template:function(r,s){if(r&1){let o=re();h(0,"div",3,0),F("contextmenu",function(l){return V(o),B(s.stopPropagation(l))}),ee(2,"div",4,1),p(),h(4,"mat-menu",5,2)(6,"div",6),y(7),Ce(8,"uppercase"),p(),W(9,eji,5,2,"button",7)(10,tji,5,0,"button",8),h(11,"button",9),F("click",function(){return V(o),B(s.resetEarlyArtistPayoutClicked())}),h(12,"mat-icon"),y(13,"article"),p(),h(14,"span"),y(15,"Auszahlung zur\xFCck setzen"),p()(),h(16,"button",10),F("click",function(){return V(o),B(s.setArtistTimeWindow())}),h(17,"mat-icon"),y(18,"schedule"),p(),h(19,"span"),y(20,"Verf\xFCgbarkeit"),p()()()}if(r&2){let o=pr(5);g(2),b("matMenuTriggerFor",o),g(2),b("hasBackdrop",!1),g(3),Ke(" ",tt(8,5,s.artist==null?null:s.artist.name)," "),g(2),b("ngIf",!(s.artist!=null&&s.artist.isEarlyPaidOut)),g(),b("ngIf",s.artist==null?null:s.artist.isEarlyPaidOut)}},dependencies:[Zy,d3,At,Yt,oi,Ct,_g,Zr,V_,Zs],styles:[".artistGetMenuTriggerWrapper[_ngcontent-%COMP%]{position:fixed;height:1px;width:1px;top:0;left:0}"]});let t=e;return t})()});function iji(t,e){t&1&&(h(0,"div"),y(1,"ALLE TERMINE"),p())}function nji(t,e){t&1&&(h(0,"div"),y(1,"LAUFENDE & ARTIST SCHON WEG"),p())}function rji(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",21),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.showAllEventsToPostpone,r)||(s.showAllEventsToPostpone=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.calcEventsCanPostpone())}),y(1,"Zeige alle Termine "),p()}if(t&2){let n=w(2);qe("value",n.showAllEventsToPostpone)}}function sji(t,e){t&1&&(h(0,"div",27),y(1,"kein Vorher-Foto"),p())}function oji(t,e){if(t&1&&W(0,sji,2,0,"div",27),t&2){let n=w(2).$implicit;Je(n.mediaCount.preTattooPhoto===0?0:-1)}}function aji(t,e){t&1&&(h(0,"div",27),y(1,"kein Stencil-Foto"),p())}function lji(t,e){if(t&1&&W(0,aji,2,0,"div",27),t&2){let n=w(2).$implicit;Je(n.mediaCount.stencil===0?0:-1)}}function cji(t,e){t&1&&(h(0,"div",27),y(1,"kein Tattoo-Foto"),p())}function dji(t,e){if(t&1&&W(0,oji,1,1)(1,lji,1,1)(2,cji,2,0,"div",27),t&2){let n=w().$implicit;Je(n.improve?0:1),g(2),Je(n.mediaCount.tattooPhoto===0?2:-1)}}function uji(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",21),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.postpone,r)||(s.postpone=r),B(r)}),F("valueChange",function(){V(n);let r=w(3);return B(r.eventPostponeChanged())}),p()}if(t&2){let n=w().$implicit;qe("value",n.postpone)}}function hji(t,e){}function pji(t,e){if(t&1){let n=re();h(0,"tr")(1,"td")(2,"div",22)(3,"mat-icon",23),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.openEventClicked(r.id))}),y(4,"edit"),p()()(),h(5,"td"),y(6),p(),h(7,"td"),y(8),Ce(9,"nxtRound"),Ce(10,"money2"),p(),h(11,"td"),W(12,dji,3,2),p(),h(13,"td"),y(14),p(),h(15,"td",24),y(16),p(),h(17,"td"),y(18),p(),h(19,"td"),y(20),Ce(21,"money2"),p(),h(22,"td"),y(23),Ce(24,"nxtDate"),Ce(25,"nxtDate"),p(),h(26,"td",25),Ce(27,"safeHtml"),F("nxtOnMultiClick",function(){let r=V(n).$implicit,s=w(2);return B(s.enablePostPoneHack(r))}),p(),h(28,"td")(29,"div",7),W(30,uji,1,1,"nxt-slide-toggle",26)(31,hji,0,0),p()()()}if(t&2){let n=e.$implicit,i=w(2);jr(n.cssClass),g(6),ye(n.artist),g(2),cn("",Nt(9,18,n.artistPercentage,0),"% \u279E ",tt(10,21,n.artistTotalGet),""),g(4),Je(n.workType==="tattoo"?12:-1),g(),ki("red",n.ratingValue<5),g(),ye(n.ratingValue),g(2),ye(n.customerObj==null?null:n.customerObj.fullName),g(2),cn("",n.visibility==="private"?"T":""," ",i.EventTools.getPriceText(n),""),g(2),ye(tt(21,23,n.paymentSum)),g(3),cn("",Nt(24,25,n.start,"dd.MM.yyyy HH:mm")," - ",Nt(25,28,n.end,"HH:mm"),""),g(3),b("nxtMultiClick",3)("innerHTML",tt(27,31,n.postponeInfo),Pi),g(4),Je(n.canPostpone?30:31)}}function mji(t,e){if(t&1){let n=re();h(0,"div",12)(1,"table",2)(2,"tr")(3,"th",13)(4,"div",14),W(5,iji,2,0,"div")(6,nji,2,0,"div"),h(7,"nxt-button",15),F("click",function(){V(n);let r=w();return B(r.autoPostponeClicked())}),y(8,"AUTO Verschieben "),p(),W(9,rji,2,1,"nxt-slide-toggle",16),p()()(),h(10,"tr")(11,"td",17),y(12,"T"),p(),h(13,"td",18),y(14,"Artist"),p(),h(15,"td",17),y(16,"Fotos"),p(),h(17,"td",17),y(18,"Bew."),p(),h(19,"td",19),y(20,"Kunde"),p(),h(21,"td",17),y(22,"Preis"),p(),h(23,"td",17),y(24,"Bezahlt"),p(),h(25,"td",17),y(26,"Zeit"),p(),h(27,"td",17),y(28,"Info"),p(),h(29,"td",17),y(30,"Versch"),p()(),W(31,pji,32,33,"tr",20),p()()}if(t&2){let n=w();g(5),Je(n.showAllEventsToPostpone?5:6),g(2),b("smallButton",!0),g(2),b("ngIf",!1),g(22),b("ngForOf",n.eventsToPostpone())}}function fji(t,e){if(t&1&&(ee(0,"div",31),Ce(1,"safeHtml")),t&2){let n=w().$implicit;b("innerHTML",tt(1,1,n.text),Pi)}}function gji(t,e){if(t&1){let n=re();h(0,"nxt-button",15),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.autoReduceArtistClicked(r))}),y(1),p()}if(t&2){let n=w().$implicit;b("smallButton",!0),g(),Ke("",n.text," ")}}function vji(t,e){if(t&1){let n=re();h(0,"td")(1,"div",34),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.showEventClicked(r.eventId))}),h(2,"div"),y(3),p(),h(4,"div",32),y(5),p(),h(6,"div"),y(7),p()()()}if(t&2){let n=e.$implicit;g(2),jr(n.isPrivate?"green":"orange"),g(),Ke("Tresor: ",n.isPrivate?"JA":"NEIN",""),g(2),ye(n.customerName),g(2),ye(n.text)}}function yji(t,e){if(t&1&&(h(0,"tr"),ee(1,"td",31),Ce(2,"safeHtml"),h(3,"td")(4,"div",1)(5,"div",32),y(6),p(),h(7,"div"),y(8),Ce(9,"money"),p()()(),h(10,"td",32),W(11,fji,2,3,"div",31)(12,gji,2,2,"nxt-button",33),p(),W(13,vji,8,5,"td",30),p()),t&2){let n=e.$implicit;g(),b("innerHTML",tt(2,5,n.artist),Pi),g(5),Ke("",n.eventCount," Termine"),g(2),ye(tt(9,7,n.payoutSum)),g(3),Je(n.toReduce===0?11:12),g(2),b("ngForOf",n.events)}}function _ji(t,e){if(t&1&&(h(0,"div",28)(1,"table",2)(2,"tr")(3,"th",29)(4,"div"),y(5,"Artist-Auszahlungen k\xFCrzen"),p()()(),W(6,yji,14,9,"tr",30),p()()),t&2){let n=w();g(6),b("ngForOf",n.artistReduces)}}function Cji(t,e){if(t&1){let n=re();h(0,"td",27)(1,"div",39),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.openEventClicked(r.refId))}),y(2,"Termin \xF6ffnen"),p()()}}function xji(t,e){if(t&1){let n=re();h(0,"td",40),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.eventRatingClicked(r.refId))}),y(1," bewerten "),p()}}function bji(t,e){if(t&1&&(h(0,"tr"),ee(1,"td",36),Ce(2,"safeHtml"),W(3,Cji,3,0,"td",37)(4,xji,2,0,"td",38),p()),t&2){let n=e.$implicit;g(),b("innerHTML",tt(2,3,n.text),Pi),g(2),b("ngIf",n.refType==="event"),g(),Je(n.type==="missing-event-rating"?4:-1)}}function wji(t,e){if(t&1&&(h(0,"table",2)(1,"tr")(2,"th",35),y(3," Noch zu erledigen "),p()(),W(4,bji,5,5,"tr",30),p()),t&2){let n=w();g(4),b("ngForOf",n.canNotFinishReasons)}}function Sji(t,e){if(t&1){let n=re();h(0,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.unblockClicked())}),y(1,"Abrechnung freigeben"),p()}}var Uvt,jvt=Q(()=>{me();Gi();pa();Yc();kl();Il();ha();go();Zi();oo();An();ri();Vt();Ja();Ov();sg();Rv();wz();Ph();$P();Zh();me();ji();Ci();yi();vZ();Cs();Vt();An();Uvt=(()=>{let e=class e extends bt{constructor(i,r,s,o,a){super(),this.dialogRef=i,this.dialogService=r,this.socketService=s,this.workingDayService=o,this.configService=a,this.forceShowAllArtistsAndCanPostponeAll=!1,this.additionalCanNotFinishReasons=[],this.additionalCanNotFinishReasonsLocal=[],this.canUnblock=gt(!1),this.eventsToPostpone=gt([]),this.endOfDayValue=gt(0),this.endOfDayValue_=gt(0),this.canNotFinishReasons=[],this.canNotFinishReasonsLocal=gt([]),this.showAllEventsToPostpone=!0,this.EventTools=Vu,this.IconTools=Ir}ngOnInit(){this.pushSubscription=this.myService.data$.subscribe(()=>O(this,null,function*(){yield this.getArtistAvailableNextWorkingDay(),this.calcEventsCanPostpone(),this.calcEndOfDayCash(),this.calcCanUnblock(),this.calcArtistReduces()}))}calcArtistReduces(){this.artistReduces=this.myService.getArtistReduceProposals(this.eventsToPostpone().filter(i=>i.postpone).map(i=>i.id))}nxtOnDestroy(){}cancelClicked(){this.dialogRef.close(!1)}unblockClicked(){let i=this.eventsToPostpone().filter(r=>r.postpone).map(r=>r.id);this.dialogRef.close({doUnblock:!0,postponeEventIds:i})}openEventClicked(i){this.dialogService.showEvent(i,"StudioCashReport")}showEventClicked(i){this.dialogService.showEvent(i,"StudioCashReport")}calcCanUnblock(i=!1){return O(this,null,function*(){i&&(this.additionalCanNotFinishReasons=yield this.socketService.getAdditionalCanNotFinishReasons(this.myService.dateString)),this.additionalCanNotFinishReasonsLocal=this.getLocalAdditionalCanNotFinishReasons(),this.canNotFinishReasons=[...this.additionalCanNotFinishReasons,...this.myService.cashRegisterViewCalc.canNotFinishReasons,...this.additionalCanNotFinishReasonsLocal];let r=this.canNotFinishReasons.length===0,s=this.endOfDayValue()>=0&&this.endOfDayValue_()>=0;this.canUnblock.set(r&&s)})}getLocalAdditionalCanNotFinishReasons(){return this.configService.config.value.mustEventRating?this.eventsToPostpone().filter(r=>{let s=r.workType==="tattoo",o=!r.postpone,a=!Es.isNumber(r.ratingValue)||r.ratings.length<this.configService.config.value.mustEventRatingMin;return s&&o&&a}).map(r=>({text:"Zu wenige Tattoo-Bewertungen",type:"missing-event-rating",refType:"event",refId:r.id})):[]}calcEventsCanPostpone(){let i=[],r=wc.unique(this.myService.data.events.filter(a=>a.payments.some(l=>l.paymentType==="payout"&&l.earlyPayout)).map(a=>a.artist));this.forceShowAllArtistsAndCanPostponeAll&&(r=[]),this.eventsToPostpone()&&i.push(...this.eventsToPostpone().filter(a=>a.postpone).map(a=>a.id)),this.eventsToPostpone.set(so(this.myService.data.events.filter(a=>!r.includes(a.artist))));for(let a of this.myService.data.postponedEvents)this.eventsToPostpone().find(l=>l.id===a.id)||this.eventsToPostpone.update(l=>{let c=St(ve({},a),{postpone:!0,alreadyPostponed:!0,canPostpone:!0,postponeInfo:"",cssClass:"",artistAway:!1,artistLastDay:!1,isAdditionalEvent:!1});return[...l,c]});this.eventsToPostpone().filter(a=>i.includes(a.id)).forEach(a=>a.postpone=!0);for(let a of this.eventsToPostpone()){let l=this.myService.data.postponedEvents.some(u=>u.id===a.id),c=this.availableArtistNextWorkingDay?.artists.some(u=>u.name===a.artist),d=this.myService.data.workSession.additionalEventIds.includes(a.id);this.configService.config.value.studioRegion==="STAGING"?a.canPostpone=c:a.canPostpone=c&&!d,a.canPostpone,a.artistLastDay=!c,a.isAdditionalEvent=d,this.forceShowAllArtistsAndCanPostponeAll&&(a.canPostpone=!0)}this.eventsToPostpone.update(a=>[...a].sort(Hr.sortString("artist")));let s="normal",o="";for(let a of this.eventsToPostpone()){a.artist!==o&&(s=s==="row-dark"?"":"row-dark"),a.cssClass=s,o=a.artist;let l=[];if(a.canPostpone){let c=this.myService.data.availableArtists.artists.find(d=>d.name===a.artist);c&&c.workTimeWindow.end>0&&(l.push("Artist weg"),a.artistAway=!0)}a.isAdditionalEvent&&l.push("nicht von heute"),a.closed||l.push("offen"),a.artistLastDay&&l.push("letzter Tag"),a.postponeInfo=l.join(`
`)}this.calcCanUnblock(!0)}calcEndOfDayCash(){let i=this.eventsToPostpone().filter(a=>a.postpone&&a.visibility!=="private"&&!a.alreadyPostponed).reduce((a,l)=>a+l.artistTotalGet,0),r=this.eventsToPostpone().filter(a=>a.postpone&&a.visibility==="private"&&!a.alreadyPostponed).reduce((a,l)=>a+l.artistTotalGet,0),s=this.eventsToPostpone().filter(a=>!a.postpone&&a.visibility!=="private"&&a.alreadyPostponed).reduce((a,l)=>a+l.artistTotalGet,0),o=this.eventsToPostpone().filter(a=>!a.postpone&&a.visibility==="private"&&a.alreadyPostponed).reduce((a,l)=>a+l.artistTotalGet,0);this.endOfDayValue.set(fn.roundMoney(this.myService.data.calculatedData.endOfDayCash.value+i-s)),this.endOfDayValue_.set(fn.roundMoney(this.myService.data.calculatedData.endOfDayCash.value_+r-o))}eventPostponeChanged(){this.calcEndOfDayCash(),this.calcCanUnblock(),this.calcArtistReduces()}autoPostponeClicked(){this.showAllEventsToPostpone?this.autoPostpone():(this.showAllEventsToPostpone=!this.showAllEventsToPostpone,this.calcEventsCanPostpone(),this.calcArtistReduces(),requestAnimationFrame(()=>this.autoPostpone()))}autoPostpone(){for(let i of this.eventsToPostpone())i.postpone=!1,i.canPostpone&&(i.postpone=i.artistAway||!i.closed);this.calcEndOfDayCash(),this.calcCanUnblock().then(),this.calcArtistReduces()}autoReduceArtistClicked(i){return O(this,null,function*(){if(yield this.dialogService.showYesNo(i.text)){let s=i.events.find(o=>o.artistGet>5);s&&this.socketService.reduceArtistPayout(s.eventId,i.toReduce).then()}})}getArtistAvailableNextWorkingDay(){return O(this,null,function*(){let i=this.workingDayService.addDaysUntilWorkingDay(this.myService.data$.value.workSession.endAtDateString);this.availableArtistNextWorkingDay=yield this.socketService.getAvailableArtistsDay(i.dateFormatDate())})}onlyPostPone(){let i=this.eventsToPostpone().filter(r=>r.postpone).map(r=>r.id);this.dialogRef.close({doUnblock:!1,postponeEventIds:i})}enablePostPoneHack(i){i.isAdditionalEvent||(i.canPostpone=!0)}eventRatingClicked(i){this.dialogService.showEventRating(i,"StudioCashReport")}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(vt),R(lt),R(lA),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-scr-pre-start-day-finish"]],standalone:!0,features:[et,xe],decls:26,vars:18,consts:[[1,"flex","h-full","flex-col","text-sm"],["fxLayout","column","fxLayoutAlign","center center"],[1,"nxt-table"],[3,"ngClass"],[1,"flex","h-full","flex-col","overflow-auto"],["fxLayout","column","class","p-3","fxLayoutAlign","center",4,"ngIf"],["fxLayout","row","class","p-3","fxLayoutAlign","center",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center"],["class","nxt-table",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center",1,"gap-3","pt-3"],[3,"click"],[3,"click",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center",1,"p-3"],["colspan","11",1,"uppercase"],[1,"flex","flex-row","items-center","justify-between"],["iconLeft","brightness_auto","iconRight","brightness_auto",3,"click","smallButton"],[3,"value","valueChange",4,"ngIf"],[1,"center"],["colspan","2",1,"center"],[1,"hidden","center","md:table-cell"],[3,"class",4,"ngFor","ngForOf"],[3,"valueChange","value"],[1,"flex","h-full","w-full","items-center","justify-center"],[1,"cursor-pointer",2,"font-size","18px","height","18px","width","18px",3,"click"],[1,"hidden","md:table-cell"],[3,"nxtOnMultiClick","nxtMultiClick","innerHTML"],[3,"value"],[1,"red"],["fxLayout","row","fxLayoutAlign","center",1,"p-3"],["colspan","7",1,"uppercase"],[4,"ngFor","ngForOf"],[3,"innerHTML"],[1,"text-80"],["iconLeft","brightness_auto","iconRight","brightness_auto",3,"smallButton"],["fxLayout","column","fxLayoutAlign","center center",1,"mouse-pointer",3,"click"],["colspan","3",1,"uppercase","red"],[1,"red",3,"innerHTML"],["class","red",4,"ngIf"],[1,"cursor-pointer"],[1,"mouse-pointer",3,"click"],[1,"cursor-pointer",3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"table",2)(3,"tr",3)(4,"td"),y(5,"N"),p(),h(6,"td"),y(7),Ce(8,"money"),p()(),h(9,"tr",3)(10,"td"),y(11,"T"),p(),h(12,"td"),y(13),Ce(14,"money"),p()()()(),h(15,"div",4),W(16,mji,32,4,"div",5)(17,_ji,7,1,"div",6),h(18,"div",7),W(19,wji,5,1,"table",8),p(),h(20,"div",9)(21,"nxt-button",10),F("click",function(){return s.cancelClicked()}),y(22,"Zur\xFCck"),p(),h(23,"nxt-button",10),F("click",function(){return s.onlyPostPone()}),y(24,"Verschobene Termine speichern"),p(),W(25,Sji,2,0,"nxt-button",11),p()()()),r&2&&(g(3),b("ngClass",s.endOfDayValue()<0?"red":"green"),g(4),ye($de(8,8,s.endOfDayValue(),!0,!1,!0)),g(2),b("ngClass",s.endOfDayValue_()<0?"red":"green"),g(4),ye($de(14,13,s.endOfDayValue_(),!0,!1,!0)),g(3),b("ngIf",s.eventsToPostpone().length>0),g(),b("ngIf",s.artistReduces),g(2),b("ngIf",s.canNotFinishReasons.length>0),g(6),b("ngIf",s.canUnblock()))},dependencies:[At,Yt,oi,_s,Dn,No,Ct,Nn,Hi,Lt,Hn,Or,ks,Zr,Qu,N7,rw],changeDetection:0});let t=e;return t})()});var ZF,ej=Q(()=>{M7();me();ZF=(()=>{let e=class e{constructor(){}transform(i){return Cg.getText(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"workplace",type:e,pure:!0,standalone:!0});let t=e;return t})()});function Tji(t,e){if(t&1&&ee(0,"nxt-datagrid",7),t&2){let n=w();b("columnDefs",n.columnDefs)("rowData",n.showDoubleNumbers?n.contactsWithEventsDouble:n.contactsWithEvents)("quickFilterText",n.quickFilterText)("showSideBar",!1)}}var hse,U9e=Q(()=>{jo();zn();Ph();Gi();ji();Qo();Zi();Pa();ri();Jr();oo();Vt();me();qn();ji();yi();Ci();Kr();o1();Vt();hse=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c){super(),this.fb=i,this.dialogRef=r,this.data=s,this.socketService=o,this.dialogService=a,this.loginService=l,this.cacheService=c,this.columnDefs=[{nxtOnCellClicked:d=>this.dialogService.showContactForm(d.data),nxtIcon:Ir.Material.Edit,getQuickFilterText:()=>""},{nxtFieldType:Ee.ShowContactHistory,headerName:"",field:"id",getQuickFilterText:()=>""},{headerName:"_id",field:"_id",nxtFieldType:Ee.Text,hide:!0,getQuickFilterText:()=>""},{headerName:"Vorname",field:"givenName",nxtFieldType:Ee.Text},{headerName:"Nachname",field:"familyName",nxtFieldType:Ee.Text},{headerName:"Geburtstag",field:"birthday",nxtFieldType:Ee.Date_germanDate,valueFormatter:d=>{if(d.value)return Ie.format(d.value,"dd.MM.yyyy")+" ("+Qt.getAge(d.value)+")"}},{headerName:"geschl. Termindauer",valueGetter:d=>d.data?.closedEvents?.map(f=>f.end-f.start)?.reduce((f,_)=>f+_,0),valueFormatter:d=>{if(d.value)return Qt.getTotalHoursAndMinutes(d.value)},nxtFieldType:Ee.Text,minWidth:60,getQuickFilterText:d=>""},{headerName:"abgesagte Termine",field:"canceledEvents",nxtFieldType:Ee.CalendarEvents,minWidth:60,getQuickFilterText:d=>""},{headerName:"fertige Termine",field:"closedEvents",nxtFieldType:Ee.CalendarEvents,minWidth:60,getQuickFilterText:d=>""},{headerName:"offene Termine",field:"events",nxtFieldType:Ee.CalendarEvents,minWidth:60,getQuickFilterText:d=>""},{headerName:"Handy formatiert",field:"mobileFormatted",nxtFieldType:Ee.Text},{headerName:"Handy",field:"mobile",nxtFieldType:Ee.Text,getQuickFilterText:d=>""},{headerName:"Stra\xDFe",field:"streetAddress",nxtFieldType:Ee.Text,minWidth:150},{headerName:"PLZ",field:"postalCode",nxtFieldType:Ee.Text},{headerName:"Ort",field:"city",nxtFieldType:Ee.Text,minWidth:150},{headerName:"E-Mail",field:"email",nxtFieldType:Ee.Text,minWidth:200},{headerName:"id",field:"id",nxtFieldType:Ee.Text,getQuickFilterText:d=>""}],this.quickFilterText="",this.showDoubleNumbers=!1}ngOnInit(){this.pushSocketSubscription=this.socketService.subscribeNew("getContactsWithEvents",i=>{this.contactsWithEvents=i},{emitInitial:!0})}close(){this.dialogRef.close()}showDoubleNumbersChanged(){this.showDoubleNumbers&&(this.contactsWithEventsDouble=this.contactsWithEvents.filter(i=>i.mobileFormatted?.startsWith("+")&&this.contactsWithEvents.filter(r=>r.mobileFormatted===i.mobileFormatted&&r.id!==i.id).length>0))}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(Gt,8),R(Ou,8),R(lt),R(vt),R(Fi),R(cc))},e.\u0275cmp=_e({type:e,selectors:[["nxt-contact"]],standalone:!0,features:[et,xe],decls:10,vars:4,consts:[["fxLayout","column",2,"height","100%","width","100%"],["fxLayout","row","fxLayoutAlign","center"],[3,"valueChange","value"],["placeholder","Suche","width","100%",3,"valueChange","value"],["fxFlex","",3,"columnDefs","rowData","quickFilterText","showSideBar",4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-around center",2,"margin-top","5px"],[3,"click"],["fxFlex","",3,"columnDefs","rowData","quickFilterText","showSideBar"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div"),y(3),p(),h(4,"nxt-slide-toggle",2),Xe("valueChange",function(a){return Ze(s.showDoubleNumbers,a)||(s.showDoubleNumbers=a),a}),F("valueChange",function(){return s.showDoubleNumbersChanged()}),p()(),h(5,"nxt-input",3),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p(),W(6,Tji,1,4,"nxt-datagrid",4),h(7,"div",5)(8,"nxt-button",6),F("click",function(){return s.close()}),y(9,"schlie\xDFen"),p()()()),r&2&&(g(3),Ke("",s.showDoubleNumbers?s.contactsWithEventsDouble.length:s.contactsWithEvents==null?null:s.contactsWithEvents.length," Kunden"),g(),qe("value",s.showDoubleNumbers),g(),qe("value",s.quickFilterText),g(),b("ngIf",s.contactsWithEvents&&s.columnDefs))},dependencies:[At,Yt,oi,qi,Nn,Yi,Ct,dr,Lt],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}"]});let t=e;return t})()});function kji(t,e){if(t&1&&(h(0,"div",10),ee(1,"nxt-date-picker",11)(2,"nxt-date-picker",0)(3,"nxt-input",12),p()),t&2){let n=e.$implicit,i=w();g(),b("minDate",i.minFrom)("nxtFormControl",n.controls.startDateString),g(),b("nxtFormControl",n.controls.endDateString),g(),b("isPercent",!0)("nxtFormControl",n.controls.percentage)}}var Dji,Eji,Mji,j9e,$vt=Q(()=>{Gi();qn();g2();tp();zn();Zi();ls();th();ri();n1();oo();ih();sg();Jr();nc();me();qn();ji();Kr();yi();Ci();Dji=()=>({value:"MA",text:"Mallorca"}),Eji=()=>({value:"AC",text:"Aachen"}),Mji=(t,e)=>[t,e];j9e=(()=>{let e=class e extends bt{constructor(i,r,s,o,a){super(),this.fb=i,this.dialogRef=r,this.loginService=s,this.socketService=o,this.dialogService=a,this.form=new Wl({id:new Cn("",[],"ID"),promoterId:new Cn("",[],"Promoter-ID"),infoInternal:new Cn("",[],"Interne Info"),name:new Cn("",[ii.requiredAndNotNaN],"Name"),studio:new Cn(null,[ii.requiredAndNotNaN],"Studio"),email:new Cn("",[],"E-Mail"),isNxtPromoter:new Cn(!1,[],"NXT-Promoter"),promoterPercentages:this.fb.array([]),disabled:new Cn(!1,[],"Deaktiviert")}),this.minFrom=new Date(Date.now().dateAddDays(-3)),this.form.valueChanges.subscribe(()=>this.formChanged())}ngOnInit(){this.user.promoterPercentages?.sortString("startDateString"),Is.setForm(this.form,this.user,{promoterPercentages:this.getPromoterPercentagesControl.bind(this)}),this.form.controls.promoterPercentages.controls.forEach(i=>i.disable()),this.form.controls.email.disable(),this.form.controls.promoterId.disable()}getPromoterPercentagesControl(i){let r=new Wl({startDateString:new Cn(i.startDateString,[ii.requiredAndNotNaN],"Von"),endDateString:new Cn(i.endDateString,[],"Bis"),percentage:new Cn(i.percentage,[ii.requiredAndNotNaN],"Provision")});return this.registerFormGroupValueChanges(r),r}addPercentage(){console.log(this.form.controls.promoterPercentages.controls);let i=this.getPromoterPercentagesControl({startDateString:"",endDateString:"",percentage:null});i.controls.endDateString.disable(),this.form.controls.promoterPercentages.push(i)}nxtOnDestroy(){}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){if(this.getPromoterFromForm(),this.form.getRawValue().promoterPercentages.some(r=>r.percentage>15)){this.dialogService.showOk("Maximal 15%!");return}let i=ve(ve({},this.user),this.form.getRawValue());yield this.socketService.upsertPromoUser(i),this.dialogRef.close(!0)})}registerFormGroupValueChanges(i){}enablePromoterId(){this.loginService.isJulian()&&this.form.controls.isNxtPromoter.enable()}formChanged(){for(let[i,r]of this.form.controls.promoterPercentages.controls.entries())if(!(i===this.form.controls.promoterPercentages.controls.length-1)){let o=this.form.controls.promoterPercentages.controls[i+1].value.startDateString;o&&(o=Ie.format(Ie.parse(o).dateAddDays(-1),"yyyy-MM-dd"),r.controls.endDateString.value!==o&&this.form.controls.promoterPercentages.controls[i].patchValue({endDateString:o}))}}getPromoterFromForm(){this.user=ve(ve({},this.user),this.form.getRawValue());for(let i of this.user.promoterPercentages)i.startDateString=Ie.parse(i.startDateString).dateFormatDate(),i.endDateString&&(i.endDateString=Ie.parse(i.endDateString).dateFormatDate())}};e.\u0275fac=function(r){return new(r||e)(R(tT),R(Gt,8),R(Fi),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-promo-user-edit"]],inputs:{user:"user"},standalone:!0,features:[et,xe],decls:20,vars:15,consts:[[3,"nxtFormControl"],[3,"nxtOnMultiClick","nxtMultiClick","nxtFormControl"],[3,"options","nxtFormControl"],[1,"flex","pb-3"],[1,"flex","w-full",3,"nxtFormControl"],[1,"mt-5","mb-3"],["class","flex flex-row gap-3",4,"ngFor","ngForOf"],[1,"flex","flex-row","justify-center"],[3,"click"],[1,"flex","flex-row","justify-around"],[1,"flex","flex-row","gap-3"],[3,"minDate","nxtFormControl"],[3,"isPercent","nxtFormControl"]],template:function(r,s){r&1&&(h(0,"div"),ee(1,"nxt-input",0)(2,"nxt-input",0),h(3,"nxt-input",1),F("nxtOnMultiClick",function(){return s.enablePromoterId()}),p(),ee(4,"nxt-select",2),h(5,"div",3),ee(6,"nxt-slide-toggle",0)(7,"nxt-slide-toggle",0),p(),ee(8,"nxt-textarea",4),h(9,"div",5),y(10,"Provision"),p(),W(11,kji,4,5,"div",6),h(12,"div",7)(13,"nxt-button-icon",8),F("click",function(){return s.addPercentage()}),y(14,"add"),p()()(),h(15,"div",9)(16,"nxt-button",8),F("click",function(){return s.cancelClicked()}),y(17,"Abbrechen"),p(),h(18,"nxt-button",8),F("click",function(){return s.saveClicked()}),y(19,"Speichern"),p()()),r&2&&(g(),b("nxtFormControl",s.form.controls.email),g(),b("nxtFormControl",s.form.controls.name),g(),b("nxtMultiClick",3)("nxtFormControl",s.form.controls.promoterId),g(),b("options",bs(12,Mji,bn(10,Dji),bn(11,Eji)))("nxtFormControl",s.form.controls.studio),g(2),b("nxtFormControl",s.form.controls.isNxtPromoter),g(),b("nxtFormControl",s.form.controls.disabled),g(),b("nxtFormControl",s.form.controls.infoInternal),g(3),b("ngForOf",s.form.controls.promoterPercentages.controls))},dependencies:[Yi,Qu,$l,Nn,yu,Hi,tl,an,Lt],styles:["[_nghost-%COMP%]{max-width:500px;display:flex;flex-direction:column}"]});let t=e;return t})()});var Iji,Aji,Pji,Rji,pse,$9e=Q(()=>{Gi();Ph();Yc();$vt();$n();Qo();Pa();ls();Zi();ih();Jr();Vt();il();me();yi();Ci();ji();Cs();Vt();Iji=()=>({value:"all",text:"Alle"}),Aji=()=>({value:"deactivated",text:"Inaktiv"}),Pji=()=>({value:"activated",text:"Aktiv"}),Rji=(t,e,n)=>[t,e,n],pse=(()=>{let e=class e extends bt{constructor(i,r,s,o){super(),this.socketService=i,this.dialogService=r,this.dialogRef=s,this.configService=o,this.columnDefs=[{headerName:"",field:"",cellRenderer:()=>Ir.Material.Edit,cellStyle:{textAlign:"center"},nxtOnCellClicked:a=>this.editUser(a.data)},{headerName:"",field:"",cellRenderer:()=>Ir.Material.History,cellStyle:{textAlign:"center"}},{headerName:"Name",field:"name",nxtFieldType:Ee.Text},{headerName:"NXT-Promoter",field:"isNxtPromoter",nxtFieldType:Ee.Boolean},{headerName:"Dabei seit",field:"createdAt",nxtFieldType:Ee.Date_germanDate,cellStyle:{textAlign:"right"},headerClass:"text-right"},{headerName:"Deaktiviert",field:"disabled",nxtFieldType:Ee.Boolean},{headerName:"Id",field:"promoterId",nxtFieldType:Ee.Text},{headerName:"E-Mail",field:"email",nxtFieldType:Ee.Text},{headerClass:"text-right",headerName:"%",field:"promoterPercentage",valueGetter:a=>a.data.promoterPercentages&&a.data.promoterPercentages.length>0?a.data.promoterPercentages.sort(Hr.sortString("startDateString",!0))[0].percentage+" %":a.data.promoterPercentage+" %",nxtFieldType:Ee.Text,cellStyle:{textAlign:"right"}}],this.promoters=[],this.promotersFiltered=[],this.quickFilterText="",this.filterState="all"}ngOnInit(){return O(this,null,function*(){this.load()})}nxtOnDestroy(){}editUser(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(j9e,{user:i});(yield Sn(r.afterClosed()))&&this.load()})}load(){return O(this,null,function*(){this.promoters=yield this.socketService.getPromoUsers(),this.setFilters()})}closeClicked(){this.dialogRef.close()}filterStateChanged(){this.setFilters()}setFilters(){this.promotersFiltered=this.promoters.filter(i=>!(this.filterState==="activated"&&i.disabled||this.filterState==="deactivated"&&!i.disabled))}newDummy(){return O(this,null,function*(){let i={id:"",promoterId:"",disabled:!1,createdAt:Date.now(),email:"",studio:this.configService.config.value.studioRegion,isNxtPromoter:!1,name:"",photoURL:"",promoterPercentage:0,team:"",domain:"",mobile:"",permissions:[],infoInternal:"",promoterPercentages:[],isDummy:!0},r=this.dialogService.showComponentDialog(j9e,{user:i});(yield Sn(r.afterClosed()))&&this.load()})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(Gt,8),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-promo-users"]],standalone:!0,features:[et,xe],decls:12,vars:15,consts:[[1,"nxt-page","h-100"],[1,"flex","flex-row","justify-between"],["fxLayout","row","fxLayoutGap","50px"],[1,"page-header"],["placeholder","Suche",1,"flex","w-52",3,"valueChange","clearIcon","value"],[1,"flex","w-52",3,"valueChange","value","options"],["nxtPermission","IsJulian",3,"click"],[3,"click"],[1,"h-100",3,"quickFilterText","autoSizeColumnOnResize","columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"Promoter"),p(),h(5,"nxt-input",4),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p(),h(6,"nxt-select",5),Xe("valueChange",function(a){return Ze(s.filterState,a)||(s.filterState=a),a}),F("valueChange",function(){return s.filterStateChanged()}),p(),h(7,"nxt-button",6),F("click",function(){return s.newDummy()}),y(8,"Neuer Promoter (Dummy)"),p()(),h(9,"nxt-button-icon",7),F("click",function(){return s.closeClicked()}),y(10,"close"),p()(),ee(11,"nxt-datagrid",8),p()),r&2&&(g(5),b("clearIcon",!0),qe("value",s.quickFilterText),g(),qe("value",s.filterState),b("options",Qm(11,Rji,bn(8,Iji),bn(9,Aji),bn(10,Pji))),g(5),b("quickFilterText",s.quickFilterText)("autoSizeColumnOnResize",!0)("columnDefs",s.columnDefs)("rowData",s.promotersFiltered))},dependencies:[At,Yt,$r,Yi,$l,Lt,an,dr,Zs]});let t=e;return t})()});var mse,K9e=Q(()=>{Gi();zn();Qo();Pa();ls();th();Vt();me();yi();ji();Vt();mse=(()=>{let e=class e extends bt{constructor(i,r){super(),this.socketService=i,this.dialogRef=r,this.dateString="",this.logs=[],this.columnDefs=[{headerName:"Zeit",field:"createdAt",nxtFieldType:Ee.Date_germanDateTime},{headerName:"Benutzer",field:"createdBy",nxtFieldType:Ee.Text},{headerName:"Kasse",field:"cashRegisterView",nxtFieldType:Ee.Text},{headerName:"Info",field:"message",nxtFieldType:Ee.Text}]}ngOnInit(){this.dateString=Ie.formatNowDate(),this.pushSocketSubscription=this.socketService.subscribeNew("getDayFinishLog",i=>{this.logs=i},{emitAfterReconnect:!0,emitInitial:!0,emitInitialData:this.dateString})}load(){return O(this,null,function*(){this.logs=yield this.socketService.getDayFinishLog(this.dateString)})}nxtOnDestroy(){}deleteClicked(){this.socketService.dayFinishDeleteLog(this.dateString)}closeClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-day-finish-log"]],standalone:!0,features:[et,xe],decls:8,vars:4,consts:[["fxLayout","column",1,"nxt-page","h-100"],[1,"flex","row","justify-between"],[1,"text-2xl"],[3,"nxtModelChange","nxtModel","showJumpDayButtons"],[3,"click"],[1,"h-100",3,"columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),y(3,"Abrechnungs-Log"),p(),h(4,"nxt-date-picker",3),Xe("nxtModelChange",function(a){return Ze(s.dateString,a)||(s.dateString=a),a}),F("nxtModelChange",function(){return s.load()}),p(),h(5,"nxt-button-icon",4),F("click",function(){return s.closeClicked()}),y(6,"close"),p()(),ee(7,"nxt-datagrid",5),p()),r&2&&(g(4),qe("nxtModel",s.dateString),b("showJumpDayButtons",!0),g(3),b("columnDefs",s.columnDefs)("rowData",s.logs))},dependencies:[At,Yt,tl,an,dr]});let t=e;return t})()});function Lji(t,e){t&1&&(h(0,"div",4),ee(1,"nxt-spinner"),p())}function Oji(t,e){if(t&1){let n=re();h(0,"div",5)(1,"div",6),y(2),p(),h(3,"div"),y(4,"W\xE4hle die richtigen Daten aus!"),p(),h(5,"nxt-button",7),F("click",function(){V(n);let r=w();return B(r.deleteSelectedContactsClicked())}),y(6,"Markierte Kontakte l\xF6schen"),p(),h(7,"nxt-input",8),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.quickFilterText,r)||(s.quickFilterText=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.quickFilterTextChanged())}),p(),h(8,"nxt-button-icon",7),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(9,"close"),p()()}if(t&2){let n=w();g(2),Ke("Kontakte zusammenf\xFChren (",n.mobiles?n.mobiles.length:"",")"),g(5),qe("value",n.quickFilterText)}}function Nji(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit;g(),ye(n.postalCode)}}function Vji(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit;g(),ye(n.city)}}function Bji(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit;g(),ye(n.country)}}function zji(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit;g(),ye(n.email)}}function Hji(t,e){if(t&1){let n=re();h(0,"tr")(1,"td",13),Ce(2,"safeHtml"),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.editClicked(r))}),p(),h(3,"td",14),y(4),p(),h(5,"td",14),y(6),Ce(7,"nxtDate"),p(),h(8,"td")(9,"div",15),W(10,Nji,2,1,"div",16)(11,Vji,2,1,"div",16)(12,Bji,2,1,"div",16)(13,zji,2,1,"div",16),p()(),h(14,"td",13),Ce(15,"safeHtml"),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.showChatClicked(r))}),p(),h(16,"td",13),Ce(17,"safeHtml"),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.showHistoryClicked(r))}),p(),h(18,"td",17)(19,"table",18)(20,"tr",19),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.showEventClicked("geschlossene",r.closedEvents))}),h(21,"td"),y(22,"Fertige"),p(),h(23,"td"),y(24),p()(),h(25,"tr",19),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.showEventClicked("abgesagte",r.canceledEvents))}),h(26,"td"),y(27,"Abgesagte"),p(),h(28,"td"),y(29),p()(),h(30,"tr",19),F("click",function(){let r=V(n).$implicit,s=w(3);return B(s.showEventClicked("zuk\xFCnftige",r.events))}),h(31,"td"),y(32,"Zuk\xFCnftige"),p(),h(33,"td"),y(34),p()()()()()}if(t&2){let n=e.$implicit,i=w(3);g(),b("innerHTML",tt(2,18,i.IconTools.Material.Edit),Pi),g(2),b("ngClass",sn(27,Kvt,n.sameName)),g(),ye(n.fullName),g(),b("ngClass",sn(29,Kvt,n.sameBirthday)),g(),ye(Nt(7,20,n.birthday,"dd.MM.yyyy")),g(4),b("ngIf",n.postalCode),g(),b("ngIf",n.city),g(),b("ngIf",n.country),g(),b("ngIf",n.email),g(),b("innerHTML",tt(15,23,i.IconTools.Material.Chat),Pi),g(2),b("innerHTML",tt(17,25,i.IconTools.Material.History),Pi),g(2),b("ngClass",sn(31,Fji,n.noEvents)),g(2),b("ngClass",sn(33,Y9e,(n.closedEvents==null?null:n.closedEvents.length)>0)),g(4),ye(n.closedEvents.length),g(),b("ngClass",sn(35,Y9e,(n.canceledEvents==null?null:n.canceledEvents.length)>0)),g(4),ye(n==null||n.canceledEvents==null?null:n.canceledEvents.length),g(),b("ngClass",sn(37,Y9e,(n.events==null?null:n.events.length)>0)),g(4),ye(n==null||n.events==null?null:n.events.length)}}function Gji(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2),p(),h(3,"td",12)(4,"table"),W(5,Hji,35,39,"tr",11),p()(),h(6,"td")(7,"nxt-button",7),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.combineContactsClicked(r.contacts))}),y(8,"Zusammenf\xFChren"),p()()()}if(t&2){let n=e.$implicit;g(2),Ke(" ",n.mobile," "),g(3),b("ngForOf",n.contacts)}}function Wji(t,e){if(t&1&&(h(0,"div",9)(1,"table",10)(2,"tr")(3,"th"),y(4,"Mobile"),p(),h(5,"th"),y(6,"Kunden"),p(),h(7,"th"),y(8,"Aktion"),p()(),W(9,Gji,9,2,"tr",11),p()()),t&2){let n=w();g(9),b("ngForOf",n.mobilesFiltered)}}var Kvt,Fji,Y9e,fse,q9e=Q(()=>{me();Gi();ZA();Ph();zn();Ci();$n();pa();n6();ha();An();ls();Jr();Zi();oo();Gy();ri();go();me();yi();Ci();BA();ji();Cs();An();Kvt=t=>({green:t}),Fji=t=>({red:t}),Y9e=t=>({"mouse-pointer":t});fse=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l){super(),this.socketService=i,this.dialogService=r,this.cdr=s,this.contactService=o,this.dialogRef=a,this.configService=l,this.newContactsAvailable=new nt,this.IconTools=Ir,this.quickFilterText="",this.deleteContact=!1,this.contactsToDelete={},this.setFilter$=new Mi,this.setFilter$.pipe(_0(2e3)).subscribe(()=>this.setFilter())}ngOnInit(){return O(this,null,function*(){this.registerOnNewContacts()})}setContacts(i){return O(this,null,function*(){this.cdr.detectChanges(),this.contacts=i,this.groupContacts(),this.cdr.detectChanges(),this.dialogService.hideLoading(_n.LoadingContacts),this.newContactsAvailable.emit()})}nxtOnDestroy(){}groupContacts(){this.contacts=this.contacts.filter(r=>!!r.mobile);let i=m3.groupObjectArray(this.contacts,"mobile");this.mobiles=m3.groupToObjectArray(i,"mobile","contacts");for(let r of this.mobiles){r.contacts=r.contacts.sortString("id");for(let a of r.contacts)a.events.length===0&&a.canceledEvents.length===0&&a.closedEvents.length===0&&(a.noEvents=!0);let s=!1,o=!1;for(let a=1;a<r.contacts.length;a++)r.contacts[a].fullName===r.contacts[0].fullName&&(s=!0,r.contacts[a].sameName=!0),r.contacts[a].birthday===r.contacts[0].birthday&&(o=!0,r.contacts[a].sameBirthday=!0);s&&(r.contacts[0].sameName=!0),o&&(r.contacts[0].sameBirthday=!0)}this.mobiles=this.mobiles.filter(r=>r.mobile&&r.contacts.length>1),this.mobiles=this.mobiles.sortString("mobile"),this.setFilter()}showChatClicked(i){this.contactService.showWhatsAppChat(i.id)}showHistoryClicked(i){}showEventClicked(i,r){return O(this,null,function*(){if(r&&r.length>0){let s=r.map(l=>({text:Ie.format(l.start,"dd.MM.yyyy"),value:l.eventId})),o="Welchen "+i+" Termin(e) m\xF6chtest du dir ansehen?",a=yield this.dialogService.showButtonChooser({buttonRows:[s],title:o,text:"",minWidth:"80%",value:""});if(typeof a!="string"&&a?.value){let l=this.dialogService.showComponentFull(nu);setTimeout(()=>{l.componentInstance.loadEvent({eventId:a.value})},500)}}})}editClicked(i){return O(this,null,function*(){let r=this.dialogService.showContactForm(i);(yield Sn(r.afterClosed()))&&this.dialogService.showLoading(_n.LoadingContacts,"Kontakte werden geladen...")})}combineContactsClicked(i){return O(this,null,function*(){yield this.dialogService.showCombineContacts(i.map(r=>r.id)),this.cdr.detectChanges()})}deleteClicked(i,r=!1){return O(this,null,function*(){if(i.events&&i.events.length>0||i.canceledEvents&&i.canceledEvents.length>0||i.closedEvents&&i.closedEvents.length>0){yield this.dialogService.showOk("Kontakt "+i.fullName+" kann nicht gel\xF6scht werden, er hat noch Termine");return}(r||(yield this.dialogService.showYesNo(i.fullName+" wirklich l\xF6schen?")))&&(yield this.socketService.deleteContact(i.id),this.dialogService.showLoading(_n.LoadingContacts,'"'+i.fullName+'" wird gel\xF6scht...'))})}registerOnNewContacts(){this.pushSocketSubscription=this.socketService.subscribeNew("getContactsWithEvents",i=>this.setContacts(i),{emitInitial:!0})}quickFilterTextChanged(){this.setFilter$.next()}setFilter(){this.quickFilterText?this.mobilesFiltered=this.mobiles.filter(i=>{let r=i.mobile.toLowerCase().includes(this.quickFilterText.toLowerCase()),s=i.contacts.some(o=>o.fullName.toLowerCase().includes(this.quickFilterText.toLowerCase()));return r||s}):(this.mobilesFiltered=so(this.mobiles),this.mobilesFiltered.length>100&&(this.mobilesFiltered.length=100))}closeClicked(){this.dialogRef?.close()}deleteSelectedContactsClicked(){return O(this,null,function*(){for(let i of oa(this.contactsToDelete))if(this.contactsToDelete[i]){let r=this.contacts.find(s=>s.id===i);if(r)yield this.deleteClicked(r,!0);else debugger}this.contactsToDelete={}})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(Kt),R(D5),R(Gt,8),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-contacts-same-mobile"]],standalone:!0,features:[et,xe],decls:4,vars:3,consts:[[1,"nxt-page","h-100"],["class","w-100 h-100 flex justify-center items-center",4,"ngIf"],["class","flex justify-between items-center",4,"ngIf"],["class","scrollable h-100",4,"ngIf"],[1,"w-100","h-100","flex","justify-center","items-center"],[1,"flex","justify-between","items-center"],[1,"text-2xl"],[3,"click"],["placeholder","Suche",1,"w-64",3,"valueChange","value"],[1,"scrollable","h-100"],[1,"nxt-table"],[4,"ngFor","ngForOf"],[2,"padding","0"],[3,"click","innerHTML"],[3,"ngClass"],[1,"text-xs"],[4,"ngIf"],[2,"padding","0",3,"ngClass"],[1,"nxt-table-small-padding",2,"font-size","75%"],[3,"click","ngClass"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,Lji,2,0,"div",1)(2,Oji,10,2,"div",2)(3,Wji,10,1,"div",3),p()),r&2&&(g(),b("ngIf",!s.mobilesFiltered),g(),b("ngIf",s.mobilesFiltered),g(),b("ngIf",s.mobilesFiltered))},dependencies:[Ct,yf,Lt,Yi,an,Hi,_s,Dn,No,Or,Hn],changeDetection:0});let t=e;return t})()});function Uji(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.deleteClicked())}),y(1,"L\xF6schen"),p()}}var Yvt,qvt=Q(()=>{Gi();ef();ri();Zi();Jr();n1();ih();me();ji();Yvt=(()=>{let e=class e extends bt{constructor(i,r){super(),this.dialogRef=i,this.cdRef=r}ngOnInit(){}nxtOnDestroy(){}load(i,r){this.package=i,this.sourceOfSupplies=r.map(s=>({text:s,value:s}))}saveClicked(){this.package.name&&this.package.sourceOfSupply&&this.package.amount&&(this.package.id||(this.package.id=ua.generate()),this.dialogRef.close(this.package))}closeClicked(){this.dialogRef.close()}deleteClicked(){this.dialogRef.close({id:this.package.id,delete:!0})}};e.\u0275fac=function(r){return new(r||e)(R(Gt),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-inventory-package-edit"]],standalone:!0,features:[et,xe],decls:11,vars:8,consts:[["placeholder","Bezugsquelle",3,"valueChange","options","value"],["placeholder","Beschreibung",3,"valueChange","value"],["placeholder","Menge pro Packung",3,"valueChange","isNumber","value"],["placeholder","Preis netto Pro Packung",3,"valueChange","isMoney","value"],[1,"flex","flex-row","w-full","justify-around","mt-3"],[3,"click"],[3,"click",4,"ngIf"]],template:function(r,s){r&1&&(h(0,"div")(1,"nxt-select",0),Xe("valueChange",function(a){return Ze(s.package.sourceOfSupply,a)||(s.package.sourceOfSupply=a),a}),p(),h(2,"nxt-textarea",1),Xe("valueChange",function(a){return Ze(s.package.name,a)||(s.package.name=a),a}),p(),h(3,"nxt-input",2),Xe("valueChange",function(a){return Ze(s.package.amount,a)||(s.package.amount=a),a}),p(),h(4,"nxt-input",3),Xe("valueChange",function(a){return Ze(s.package.packagePriceNet,a)||(s.package.packagePriceNet=a),a}),p(),h(5,"div",4)(6,"nxt-button",5),F("click",function(){return s.closeClicked()}),y(7,"Abbrechen"),p(),W(8,Uji,2,0,"nxt-button",6),h(9,"nxt-button",5),F("click",function(){return s.saveClicked()}),y(10,"Speichern"),p()()()),r&2&&(g(),b("options",s.sourceOfSupplies),qe("value",s.package.sourceOfSupply),g(),qe("value",s.package.name),g(),b("isNumber",!0),qe("value",s.package.amount),g(),b("isMoney",!0),qe("value",s.package.packagePriceNet),g(4),b("ngIf",s.package.id))},dependencies:[$l,yu,Yi,Lt,Ct],changeDetection:0});let t=e;return t})()});function jji(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),y(2),p(),ee(3,"nxt-datagrid",3),h(4,"div",4)(5,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(6,"Zur\xFCck"),p(),h(7,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.newPackageClicked())}),y(8,"Neues Paket"),p()()()}if(t&2){let n=w();g(2),Ke('Pakete f\xFCr "',n.item.name,'"'),g(),b("columnDefs",n.colDefs)("rowData",n.item.packages)("autoSizeColumnOnResize",!0)}}var Zvt,Xvt=Q(()=>{Gi();Ph();qvt();$n();Qo();Zi();Pa();ri();me();ji();Gw();Ci();Kr();Zvt=(()=>{let e=class e extends bt{constructor(i,r,s,o,a){super(),this.cdRef=i,this.dialogRef=r,this.inventoryService=s,this.dialogService=o,this.loginService=a,this.colDefs=[{headerName:"",field:"name",cellRenderer:()=>Ir.Material.Edit,nxtOnCellClicked:l=>this.editItemClicked(l.data),minWidth:45,maxWidth:45,cellStyle:{textAlign:"center"}},{headerName:"Quelle",field:"sourceOfSupply",nxtFieldType:Ee.Text},{headerName:"Bezeichnung",field:"name",nxtFieldType:Ee.Text},{headerName:"Menge",field:"amount",nxtFieldType:Ee.Text},{headerName:"Preis (netto)",field:"packagePriceNet",nxtFieldType:Ee.Money}]}ngOnInit(){this.pushSubscription=this.inventoryService.inventoryItems.subscribe(()=>{this.reload()})}nxtOnDestroy(){}load(i){this.itemId=i,this.reload()}reload(){this.item=this.inventoryService.inventoryItems.getValue().find(i=>i.id===this.itemId),this.cdRef.detectChanges()}editItemClicked(i){return O(this,null,function*(){this.showInventoryItemPackageEdit(i)})}showInventoryItemPackageEdit(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(Yvt);r.componentInstance.load(i,this.getSourceOfSupplies());let s=yield Sn(r.afterClosed());s&&(this.item.packages=this.item.packages.filter(o=>!!o.id),this.item.packages=this.item.packages.filter(o=>o.id!==s.id),s.delete||this.item.packages.push(s),this.item.packages=this.item.packages.sortNumber("amount"),this.inventoryService.upsertInventoryItem(this.item,this.loginService.getUsername()),this.cdRef.detectChanges())})}newPackageClicked(){return O(this,null,function*(){let i={id:"",name:"",amount:null,sourceOfSupply:""};this.showInventoryItemPackageEdit(i)})}getSourceOfSupplies(){let i=[];return this.item.sourceOfSupply&&i.push(this.item.sourceOfSupply),this.item.sourceOfSupply2&&i.push(this.item.sourceOfSupply2),i}closeClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(Gt),R(z3),R(vt),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-inventory-packages"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["class","flex flex-col w-full h-full",4,"ngIf"],[1,"flex","flex-col","w-full","h-full"],[1,"text-130","center","w-full","mb-3"],[1,"flex","w-full","h-full","min-h-40","min-w-[500px]",3,"columnDefs","rowData","autoSizeColumnOnResize"],[1,"flex","flex-row","w-full","justify-around","mt-3"],[3,"click"]],template:function(r,s){r&1&&W(0,jji,9,4,"div",0),r&2&&b("ngIf",s.item)},dependencies:[Ct,dr,Lt],styles:["[_nghost-%COMP%]{display:flex;min-width:700px;width:100%;height:100%}"],changeDetection:0});let t=e;return t})()});function $ji(t,e){if(t&1&&ee(0,"nxt-input",26),t&2){let n=w(2);b("nxtFormControl",n.form.get("name"))}}function Kji(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-input",31),Xe("valueChange",function(r){let s=V(n).index,o=w(3);return Ze(o.piercingData.attributes[s],r)||(o.piercingData.attributes[s]=r),B(r)}),F("valueChange",function(){V(n);let r=w(3);return B(r.piercingDataChanged())}),p()()}if(t&2){let n=e.$implicit,i=e.index,r=w(3);g(),b("isNumber",!0)("placeholder",n.name),qe("value",r.piercingData.attributes[i])}}function Yji(t,e){if(t&1){let n=re();h(0,"div",27)(1,"div",28),y(2),p(),h(3,"nxt-input",29),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.piercingData.name,r)||(s.piercingData.name=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.piercingDataChanged())}),p(),W(4,Kji,2,3,"div",30),p()}if(t&2){let n=w(2);g(2),ye(n.form.get("name").value),g(),qe("value",n.piercingData.name),g(),b("ngForOf",n.piercingAttributes)}}function qji(t,e){if(t&1&&(h(0,"div",32),y(1),p()),t&2){let n=w(2);g(),cn(" = 1 Packung beinhaltet ",n.form.get("amountPerPackage").value," ",n.form.get("unitOfMeasure").value," ")}}function Zji(t,e){if(t&1&&(vs(0),ee(1,"nxt-input",33),ys()),t&2){let n=w(2);g(),b("nxtFormControl",n.form.get("onlyFullOrEmptyInfo"))}}function Xji(t,e){if(t&1&&(h(0,"div",32),y(1),p()),t&2){let n=w(3);g(),cn(" = Alarm ab ",n.form.get("amountAlarm").value*n.form.get("amountPerPackage").value," ",n.form.get("unitOfMeasure").value," ")}}function Qji(t,e){if(t&1&&(h(0,"div",32),y(1),p()),t&2){let n=w(3);g(),cn(" = Voll bei ",n.form.get("amountFull").value*n.form.get("amountPerPackage").value," ",n.form.get("unitOfMeasure").value," ")}}function Jji(t,e){if(t&1&&(vs(0),h(1,"div",34),ee(2,"nxt-input",35),W(3,Xji,2,2,"div",20),p(),ee(4,"div",36),h(5,"div",34),ee(6,"nxt-input",37),W(7,Qji,2,2,"div",20),p(),ee(8,"div"),ys()),t&2){let n=w(2);g(2),b("nxtFormControl",n.form.get("amountAlarm"))("isNumber",!0)("isNumberMin",0),g(),b("ngIf",n.form.get("amountAlarm").value&&n.form.get("amountPerPackage").value),g(3),b("nxtFormControl",n.form.get("amountFull"))("isNumber",!0)("isNumberMin",0),g(),b("ngIf",n.form.get("amountFull").value&&n.form.get("amountPerPackage").value)}}function e$i(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),y(2),p(),h(3,"div",3),W(4,$ji,1,1,"nxt-input",4)(5,Yji,5,3,"div",5),h(6,"div",6),ee(7,"nxt-select",7),p()(),h(8,"div",3),ee(9,"nxt-input",8)(10,"nxt-input",9),p(),h(11,"div",3),ee(12,"nxt-autocomplete",10)(13,"nxt-autocomplete",11),h(14,"nxt-slide-toggle",12),y(15,"Aachen bestellt"),p()(),h(16,"div",13),ee(17,"nxt-select",14)(18,"nxt-input",15),p(),h(19,"div",3),ee(20,"nxt-select",16)(21,"nxt-input",17),p(),h(22,"div",13),ee(23,"nxt-input",18)(24,"nxt-input",19),W(25,qji,2,2,"div",20),p(),h(26,"div",13)(27,"nxt-slide-toggle",12),y(28,'Nur "Voll" oder "Nachbestellen" '),p(),W(29,Zji,2,1,"ng-container",21)(30,Jji,9,8,"ng-container",21),p(),h(31,"div",22),ee(32,"nxt-date-picker",23),p(),h(33,"div",24)(34,"div")(35,"nxt-button",25),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(36,"ABBRECHEN"),p()(),h(37,"div")(38,"nxt-button",25),F("click",function(){V(n);let r=w();return B(r.showPackagesClicked())}),y(39,"PAKETE"),p()(),h(40,"div")(41,"nxt-button",25),F("click",function(){V(n);let r=w();return B(r.delete())}),y(42,"L\xD6SCHEN"),p()(),h(43,"div")(44,"nxt-button",25),F("click",function(){V(n);let r=w();return B(r.saveAndClose())}),y(45,"SPEICHERN"),p()()()()}if(t&2){let n=w();b("formGroup",n.form),g(2),ye(n.data==null?null:n.data.id),g(2),b("ngIf",n.piercingAttributes.length===0),g(),b("ngIf",n.piercingAttributes.length>0),g(2),b("nxtFormControl",n.form.get("location"))("options",n.inventoryService.inventoryLocations),g(2),b("nxtFormControl",n.form.get("nameEn")),g(),b("placeholder","Bezeichnung bei "+(n.form.get("sourceOfSupply").value?n.inventoryService.getSourceText(n.form.get("sourceOfSupply").value):"Bezugsquelle"))("nxtFormControl",n.form.get("nameBySource")),g(2),b("options",n.users)("nxtFormControl",n.form.get("responsibility"))("maxOptionsToShow",9999),g(),b("options",n.users)("nxtFormControl",n.form.get("responsibility2"))("maxOptionsToShow",9999),g(),b("nxtFormControl",n.form.get("orderedByAc")),g(3),b("nxtFormControl",n.form.get("sourceOfSupply"))("options",n.inventoryService.inventorySourcesOfSupply),g(),b("nxtFormControl",n.form.get("sourceOfSupplyUrl")),g(2),b("nxtFormControl",n.form.get("sourceOfSupply2"))("options",n.inventoryService.inventorySourcesOfSupply),g(),b("nxtFormControl",n.form.get("sourceOfSupply2Url")),g(2),b("nxtFormControl",n.form.get("unitOfMeasure")),g(),b("nxtFormControl",n.form.get("amountPerPackage"))("isNumber",!0)("isNumberMin",1),g(),b("ngIf",n.form.get("amountPerPackage").value&&n.form.get("unitOfMeasure").value),g(2),b("nxtFormControl",n.form.get("onlyFullOrEmpty")),g(2),b("ngIf",n.form.get("onlyFullOrEmpty").value),g(),b("ngIf",!n.form.get("onlyFullOrEmpty").value),g(2),b("nxtFormControl",n.form.get("notOrderBefore"))}}var Qvt,gse,Jvt=Q(()=>{qn();Ld();Ep();tp();C4();kl();pa();Xvt();Zi();oo();Ah();ih();Jr();il();Vt();ri();th();Qvt=Gs(Jm());zn();nc();me();qn();ji();yi();Ci();Gw();Kr();Cs();Vt();gse=(()=>{let e=class e{constructor(i,r,s,o,a,l,c){this.fb=i,this.dialogRef=r,this.socketService=s,this.dialogService=o,this.inventoryService=a,this.loginService=l,this.configService=c,this.amountFullText="",this.users=this.configService.config.value.users.map(d=>d.username).sort(),this.displayWithUsername=Qh.displayWith("text"),this.piercingAttributes=[],this.piercingData={name:"",attributes:[]}}loadFromId(i){let r=this.inventoryService.inventoryItems.getValue().find(s=>s.id===i);this.loadFormFromObject(r)}ngOnInit(){return O(this,null,function*(){document.body.style.backgroundColor="transparent !important",this.sourceOfSupplyValueChangesSubscription=this.form.get("sourceOfSupply").valueChanges.subscribe(()=>{this.calcNameEnRequired()})})}ngOnDestroy(){this.sourceOfSupplyValueChangesSubscription.unsubscribe()}calcNameEnRequired(){let i=[];this.form.get("sourceOfSupply").value&&this.inventoryService.inventorySourcesOfSupply.find(r=>r.value===this.form.get("sourceOfSupply").value)?.printEn&&(i=[ii.requiredAndNotNaN]),this.form.get("nameEn").setValidators(i),this.form.get("nameEn").updateValueAndValidity({emitEvent:!1})}loadFormFromObject(i){this.data=i;let r=!1;i.unitOfMeasure||(i.unitOfMeasure="Stk"),this.form=this.fb.group({id:new $t(i.id?i.id:""),name:new $t(i.name?i.name:"",[ii.requiredAndNotNaN]),location:new $t(i.location?i.location:"",[ii.requiredAndNotNaN]),amountPerPackage:new $t(i.amountPerPackage?i.amountPerPackage:1,[ii.requiredAndNotNaN]),orderValue:new $t(i.orderValue),deleted:new $t(i.deleted),unitOfMeasure:new $t(i.unitOfMeasure,[ii.requiredAndNotNaN]),amountAlarm:new $t(i.amountAlarm),sourceOfSupply:new $t(i.sourceOfSupply),sourceOfSupply2:new $t(i.sourceOfSupply2),sourceOfSupplyUrl:new $t(i.sourceOfSupplyUrl),sourceOfSupply2Url:new $t(i.sourceOfSupply2Url),amountFull:new $t(i.amountFull),nfcId:new $t(i.nfcId),nameEn:new $t(i.nameEn?i.nameEn:"",r?[ii.requiredAndNotNaN]:[]),nameBySource:new $t(i.nameBySource??"",[ii.requiredAndNotNaN]),responsibility:new $t(i.responsibility??"",[ii.requiredAndNotNaN]),responsibility2:new $t(i.responsibility2??"",[ii.requiredAndNotNaN]),orderedByAc:new $t(!!i.orderedByAc,[ii.requiredAndNotNaN]),onlyFullOrEmptyInfo:new $t(i.onlyFullOrEmptyInfo??"",[]),onlyFullOrEmpty:new $t(!!i.onlyFullOrEmpty,[]),notOrderBefore:new $t(i.notOrderBefore?(0,Qvt.default)(i.notOrderBefore):null,[])}),this.calcNameEnRequired(),this.form.get("location").valueChanges.subscribe(s=>{this.calcPiercingAttributes()}),this.calcPiercingAttributes()}saveAndClose(){return O(this,null,function*(){let i=yield this.save();i&&this.close(i)})}save(){return O(this,null,function*(){let i=Is.getErrors(this.form);if(i.length>0){let r=`Na, hast du nicht was vergessen einzutragen?

`+this.getErrorText(i);return yield this.dialogService.showOk(r,{title:"Fehlende Eingaben!"}),!1}else try{let r=ve(ve({},this.data),this.form.getRawValue());return r.notOrderBefore&&(r.notOrderBefore=Ie.parse(r.notOrderBefore).dateFormatDate()),r.onlyFullOrEmpty&&(r.amountAlarm=0,r.amountFull=1),r.orderValue||(r.orderValue=fn.random(0,5e3)),yield this.inventoryService.upsertInventoryItem(r,this.loginService.getUsername()),!0}catch(r){return Gn.error(r),!1}})}getErrorText(i){let r={name:"Bezeichnung",location:"Ort",amountPerPackage:"Menge pro Packung",responsibility:"Zust\xE4ndig",responsibility2:"Zust\xE4ndig Vertretung"};return"- "+i.map(s=>r[s]?r[s]:s).join(`
- `)}closeClicked(){return O(this,null,function*(){this.close(!1)})}close(i){return O(this,null,function*(){this.dialogRef.close(i)})}delete(){return O(this,null,function*(){(yield this.dialogService.showYesNo("Wirklich l\xF6schen?",{yesText:"Ja, l\xF6schen"}))&&(yield this.inventoryService.upsertInventoryItem(St(ve({},this.form.value),{deleted:!0}),this.loginService.getUsername()),this.close(!0))})}getStudiosAmounts(){return this.form.get("studiosAmounts").controls}newItem(){this.loadFormFromObject({})}calcPiercingAttributes(){if(this.form.get("location").value==="piercing")if(this.form.get("name").value&&this.form.get("name").value.toString().includesAll(["dermal","anchor"])?this.setPiercingAttributes([{name:"L\xE4nge (mm)",shortName:"L\xE4nge"},{name:"Breite (mm)",shortName:"Breite"},{name:"Kugelgr\xF6\xDFe (mm)",shortName:"Kugel"}]):this.setPiercingAttributes([{name:"Stabdurchmesser (mm)",shortName:"Durch"},{name:"Stabl\xE4nge (mm)",shortName:"L\xE4nge"},{name:"Kugelgr\xF6\xDFe (mm)",shortName:"Kugel"}]),this.piercingData.attributes.length===0&&this.form.get("name").value.includes(" | ")){let i=this.form.get("name").value.split(" | ");this.piercingData.name=i[0];for(let[r,s]of i.slice(1).entries()){let o=s.split(":");this.piercingAttributes[r]&&this.piercingData.attributes.push(o[1])}}else this.piercingData.name=this.form.get("name").value.split(" | ")[0];else this.piercingAttributes=[]}piercingDataChanged(){requestAnimationFrame(()=>{let i=this.piercingData.name;for(let[r,s]of this.piercingAttributes.entries())this.piercingData.attributes[r]&&(i+=" | "+s.shortName+":"+this.piercingData.attributes[r]);this.form.get("name").setValue(i),this.calcPiercingAttributes()})}setPiercingAttributes(i){Sr.equal(this.piercingAttributes,i)||(this.piercingAttributes=i)}showPackagesClicked(){this.dialogService.showComponentDialog(Zvt).componentInstance.load(this.data.id)}};e.\u0275fac=function(r){return new(r||e)(R(ad),R(Gt),R(lt),R(vt),R(z3),R(Fi),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-inventory-item-form"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full","fxLayout","column",3,"formGroup",4,"ngIf"],["fxLayout","column",1,"w-full",3,"formGroup"],["nxtPermission","IsJulian",1,"text-60"],["fxLayout","row","fxLayoutGap","15px"],["placeholder","Bezeichnung",3,"nxtFormControl",4,"ngIf"],["class","flex w-1/2 flex-col",4,"ngIf"],[1,"flex","w-1/2"],["placeholder","Ort","requiredError","Ort bitte angeben!",3,"nxtFormControl","options"],["placeholder","Bezeichnung engl.",3,"nxtFormControl"],[3,"placeholder","nxtFormControl"],["placeholder","Zust\xE4ndig",3,"options","nxtFormControl","maxOptionsToShow"],["placeholder","Zust\xE4ndig Vertretung",3,"options","nxtFormControl","maxOptionsToShow"],[3,"nxtFormControl"],["fxLayout","row","fxLayoutAlign","center center","fxLayoutGap","15px"],["fxFlex","30","placeholder","1. Bezugsquelle","requiredError","",3,"nxtFormControl","options"],["fxFlex","70","placeholder","1. Bezugsquelle Url","requiredError","",2,"font-size","80%","margin-top","8px",3,"nxtFormControl"],["fxFlex","30","placeholder","2. Bezugsquelle","requiredError","",3,"nxtFormControl","options"],["fxFlex","70","placeholder","2. Bezugsquelle Url","requiredError","",2,"font-size","80%","margin-top","8px",3,"nxtFormControl"],["placeholder","Mengeneinheit",3,"nxtFormControl"],["placeholder","Menge pro Packung",3,"nxtFormControl","isNumber","isNumberMin"],["class","no-wrap",4,"ngIf"],[4,"ngIf"],[1,"flex","flex-row","justify-center"],["width","220px","placeholder","Nicht bestelle vor",3,"nxtFormControl"],["fxLayout","row","fxLayoutAlign","space-around",1,"pt-3"],[3,"click"],["placeholder","Bezeichnung",3,"nxtFormControl"],[1,"flex","w-1/2","flex-col"],[1,"pb-5","text-xl"],["placeholder","Bezeichnung",3,"valueChange","value"],[4,"ngFor","ngForOf"],[3,"valueChange","isNumber","placeholder","value"],[1,"no-wrap"],["placeholder","Inventarinfo",3,"nxtFormControl"],["fxLayout","row","fxFlex","","fxLayoutAlign","center center"],["placeholder","Alarm ab Menge",3,"nxtFormControl","isNumber","isNumberMin"],[2,"width","100px"],["placeholder","Sollbestand",3,"nxtFormControl","isNumber","isNumberMin"]],template:function(r,s){r&1&&W(0,e$i,46,31,"div",0),r&2&&b("ngIf",s.form)},dependencies:[Ct,At,Yt,$r,oi,qi,ko,$_,Ia,e1,Zs,Yi,Hi,$l,Ga,Nn,Lt,tl],styles:["[_nghost-%COMP%]{min-width:1200px;display:flex}[_nghost-%COMP%]   mat-dialog-content[_ngcontent-%COMP%]{width:100%}mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}"]});let t=e;return t})()});function t$i(t,e){if(t&1){let n=re();h(0,"nxt-radio",16),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.currentSingleOrTotalPriceOptions,r)||(s.currentSingleOrTotalPriceOptions=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.calcNetGross())}),p()}if(t&2){let n=w();b("options",n.singleOrTotalPriceOptions),qe("value",n.currentSingleOrTotalPriceOptions)}}function i$i(t,e){if(t&1){let n=re();h(0,"div",6)(1,"nxt-input",17),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.totalPrice,r)||(s.totalPrice=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.calcNetGross())}),p(),h(2,"nxt-radio",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.currentNetGrossOption,r)||(s.currentNetGrossOption=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.calcNetGross())}),p()()}if(t&2){let n=w();g(),b("noPadding",!0),qe("value",n.totalPrice),b("isMoney",!0)("placeholder","Gesamtpreis "+(n.currentNetGrossOption?"("+n.currentNetGrossOption.text+") ":"")+(n.orderAmount?n.orderAmount+" x "+n.item.amountPerPackage+" "+n.item.unitOfMeasure:"")),g(),b("options",n.netGrossOptions),qe("value",n.currentNetGrossOption)}}function n$i(t,e){if(t&1){let n=re();h(0,"div",6)(1,"nxt-input",17),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.unitPrice,r)||(s.unitPrice=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.calcNetGross())}),p(),h(2,"nxt-radio",18),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.currentNetGrossOption,r)||(s.currentNetGrossOption=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.calcNetGross())}),p()()}if(t&2){let n=w();g(),b("noPadding",!0),qe("value",n.unitPrice),b("isMoney",!0)("placeholder","Einzelpreis "+(n.currentNetGrossOption?"("+n.currentNetGrossOption.text+") ":"")+" 1 x "+n.item.amountPerPackage+" "+n.item.unitOfMeasure),g(),b("options",n.netGrossOptions),qe("value",n.currentNetGrossOption)}}function r$i(t,e){if(t&1&&(h(0,"div")(1,"div")(2,"div"),y(3),Ce(4,"money"),p(),h(5,"div"),y(6),Ce(7,"money"),p()()()),t&2){let n=w();g(3),Ke("Netto-Gesamt: ",tt(4,2,n.totalPriceNet),""),g(3),Ke("Brutto-Gesamt: ",tt(7,4,n.totalPriceNet*(n.vat+1)),"")}}function s$i(t,e){if(t&1&&(h(0,"div",25),y(1),Ce(2,"money"),p()),t&2){let n=w().$implicit;g(),Ke("f\xFCr ",tt(2,1,n.packagePriceNet)," netto")}}function o$i(t,e){if(t&1){let n=re();h(0,"div",22),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.packageClicked(r))}),ee(1,"div",23),Ce(2,"safeHtml"),W(3,s$i,3,3,"div",24),h(4,"div",25),y(5),p()()}if(t&2){let n=e.$implicit;g(),b("innerHTML",tt(2,3,n.name),Pi),g(2),b("ngIf",n.packagePriceNet),g(2),Ke("bei ",n.sourceOfSupply,"")}}function a$i(t,e){if(t&1&&(h(0,"div",19)(1,"div",20),y(2,"Pakete"),p(),W(3,o$i,6,5,"div",21),p()),t&2){let n=w();g(3),b("ngForOf",n.item.packages)}}var e6t,t6t=Q(()=>{zn();ef();kl();jo();B1();Il();ha();go();Zi();ls();ri();s3();Jr();ih();Vt();me();ji();Gw();yi();Kr();Ci();Vt();e6t=(()=>{let e=class e{constructor(i,r,s,o,a){this.dialogRef=i,this.inventoryService=r,this.socketService=s,this.loginService=o,this.dialogService=a,this.saveButtonText="wurde bestellt",this.vat=.19,this.dateOfOrder=Ie.formatNow("yyyy-MM-dd HH:mm"),this.shouldArrivedAt=Date.now().dateAddDays(3),this.netGrossOptions=[{text:"Netto",value:"net"},{text:"Brutto",value:"gross"}],this.currentNetGrossOption=null,this.singleOrTotalPriceOptions=[{text:"Einzelpreis",value:"single"},{text:"Gesamtpreis",value:"total"}],this.currentSingleOrTotalPriceOptions=null,this.totalPriceNet=0,this.unitPriceNet=0,this.shouldOrderAmount=-1,Ie.getDayOfWeek(this.shouldArrivedAt)===Aa.Sunday&&this.changeShouldArrivedAt(1)}ngOnInit(){this.sourceOfSupplyOptions=[],this.item.sourceOfSupply&&this.sourceOfSupplyOptions.push({value:this.item.sourceOfSupply,text:this.inventoryService.inventorySourcesOfSupply.find(i=>i.value===this.item.sourceOfSupply)?.text}),this.item.sourceOfSupply2&&this.sourceOfSupplyOptions.push({value:this.item.sourceOfSupply2,text:this.inventoryService.inventorySourcesOfSupply.find(i=>i.value===this.item.sourceOfSupply2)?.text})}createOrder(){if(!this.currentSingleOrTotalPriceOptions){this.dialogService.showOk("Preis fehlt");return}if(!this.currentNetGrossOption){this.dialogService.showOk(`Ist der Gesamtpreis
- Netto (weniger)
- Brutto (mehr)`);return}if(!this.sourceOfSupply){this.dialogService.showOk("Bezugsquelle fehlt");return}if(!this.orderAmount){this.dialogService.showOk("Menge fehlt");return}if(!this.totalPrice){this.dialogService.showOk("Gesamtpreis fehlt");return}let i={createdBy:this.loginService.getUsername(),id:ua.generate(),arrived:!1,itemId:this.item.id,studio:this.item.studio,createdAt:Date.now(),orderAmount:this.orderAmount,sourceOfSupply:this.sourceOfSupply,arrivedBy:"",arrivedAt:0,unitPrice:this.unitPriceNet,unitPriceNet:this.unitPriceNet,vat:this.vat,totalPriceNet:fn.roundMoney(this.totalPriceNet),shouldArrivedAt:this.shouldArrivedAt};this.socketService.upsertInventoryOrder(i),this.dialogRef.close()}changeShouldArrivedAt(i){this.shouldArrivedAt=Ie.addDays(this.shouldArrivedAt,i),this.shouldArrivedAt<Date.now()&&(this.shouldArrivedAt=Date.now()+Qt.DURATION_1DAY),Ie.getDayOfWeek(this.shouldArrivedAt)===Aa.Sunday&&this.changeShouldArrivedAt(i)}packageClicked(i){return O(this,null,function*(){let r=i.packagePriceNet;if(r||(r=yield this.dialogService.showInput({message:`Was kostet ein Paket (netto)
`+i.name,isMoney:!0})),r){let s=`Wie viel Pakete bestellt du?
(Menge im Online-Shop)`,o=this.shouldOrderAmount/i.amount;o%1>.3&&o++,o===0&&o++,o=Math.floor(o),this.shouldOrderAmount>0&&(o===1?s+=`

Nimm 1 Paket, vertrau mir \u{1F609}`:s+=`

Nimm `+o+" Pakete, vertrau mir \u{1F609}");let a=yield this.dialogService.showInput({message:s,placeholder:"Anzahl Pakete",isNumber:!0,prompt:o,selectPrompt:!0});a&&(this.currentNetGrossOption=this.netGrossOptions.find(l=>l.value==="net"),this.orderAmount=a*i.amount,this.totalPrice=a*r,this.sourceOfSupply=i.sourceOfSupply)}})}calcNetGross(){return O(this,null,function*(){this.currentSingleOrTotalPriceOptions.value==="single"?this.unitPrice&&(this.totalPriceNet=fn.roundMoney(this.unitPrice*this.orderAmount),this.unitPriceNet=this.totalPrice/this.orderAmount,this.currentNetGrossOption&&this.currentNetGrossOption.value==="gross"&&(this.totalPriceNet=fn.roundMoney(this.totalPrice/(this.vat+1)),this.unitPriceNet=this.unitPriceNet/(this.vat+1)),this.totalPrice=this.unitPrice*this.orderAmount):this.totalPrice&&(this.totalPriceNet=fn.roundMoney(this.totalPrice),this.unitPriceNet=this.totalPrice/this.orderAmount,this.currentNetGrossOption&&this.currentNetGrossOption.value==="gross"&&(this.totalPriceNet=fn.roundMoney(this.totalPrice/(this.vat+1)),this.unitPriceNet=this.unitPriceNet/(this.vat+1)),this.unitPrice=fn.roundMoney(this.totalPrice/this.orderAmount))})}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(z3),R(lt),R(Fi),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-inventory-list-order-create"]],standalone:!0,features:[xe],decls:42,vars:22,consts:[["fxLayout","column"],[1,"text-140","p-2","flex","flex-col","justify-center","items-center"],[1,"text-80"],[1,"flex","flex-row"],["fxLayout","column",1,"w-[400px]"],["placeholder","Bezugsquelle",3,"valueChange","value","options"],["fxLayout","row","fxLayoutAlign","center center"],["placeholder","Menge",3,"valueChange","isNumber","value"],[1,"no-wrap"],["style","padding: 0 0 0 8px","class","flex grow-1","textKey","text","direction","row",3,"options","value","valueChange",4,"ngIf"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center",1,"pt-6"],[1,"flex","flex-row","justify-center","items-center","center"],[3,"click"],["class","grid grid-cols-1 gap-4 pl-12 h-fit",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center",1,"mt-4"],["textKey","text","direction","row",1,"flex","grow-1",2,"padding","0 0 0 8px",3,"valueChange","options","value"],[3,"valueChange","noPadding","value","isMoney","placeholder"],["textKey","text","direction","column",1,"flex","grow-1",2,"padding","0 0 0 8px",3,"valueChange","options","value"],[1,"grid","grid-cols-1","gap-4","pl-12","h-fit"],[1,"w-full","center","text-120"],["class","cursor-pointer flex justify-center items-center center flex-col","style","border: 1px solid #5b5b5b; border-radius: 4px; padding: 8px; background: #363636",3,"click",4,"ngFor","ngForOf"],[1,"cursor-pointer","flex","justify-center","items-center","center","flex-col",2,"border","1px solid #5b5b5b","border-radius","4px","padding","8px","background","#363636",3,"click"],[1,"center",3,"innerHTML"],["style","font-size: 75%",4,"ngIf"],[2,"font-size","75%"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div"),y(3,"Neue Bestellung"),p(),h(4,"div"),y(5),p(),h(6,"div")(7,"div",2),y(8),p()()(),h(9,"div",3)(10,"div",4)(11,"div")(12,"nxt-select",5),Xe("valueChange",function(a){return Ze(s.sourceOfSupply,a)||(s.sourceOfSupply=a),a}),p()(),h(13,"div",6)(14,"nxt-input",7),Xe("valueChange",function(a){return Ze(s.orderAmount,a)||(s.orderAmount=a),a}),p(),h(15,"div"),y(16,"\xA0x\xA0"),p(),h(17,"div",8),y(18),p()(),W(19,t$i,1,2,"nxt-radio",9)(20,i$i,3,6,"div",6)(21,n$i,3,6,"div",6)(22,r$i,8,6,"div",10),h(23,"div",11)(24,"div",12)(25,"nxt-button-icon",13),F("click",function(){return s.changeShouldArrivedAt(-1)}),y(26,"remove"),p(),h(27,"div"),y(28," Sollte ankommen:"),ee(29,"br"),y(30),Ce(31,"nxtDate"),Ce(32,"fromNowText"),p(),h(33,"nxt-button-icon",13),F("click",function(){return s.changeShouldArrivedAt(1)}),y(34,"add"),p()()()(),W(35,a$i,4,1,"div",14),p(),h(36,"div",15)(37,"nxt-button",13),F("click",function(){return s.dialogRef.close()}),y(38,"Abbrechen"),p(),h(39,"nxt-button",13),F("click",function(){return s.createOrder()}),y(40),p()(),ee(41,"div"),p()),r&2&&(g(5),cn("",s.item.name," in ",s.item.studio,""),g(3),Ke("Du sollst eine Menge von ",s.shouldOrderAmount," bestellen"),g(4),qe("value",s.sourceOfSupply),b("options",s.sourceOfSupplyOptions),g(2),b("isNumber",!0),qe("value",s.orderAmount),g(4),cn("",s.item.amountPerPackage," ",s.item.unitOfMeasure,""),g(),b("ngIf",s.orderAmount),g(),Je((s.currentSingleOrTotalPriceOptions==null?null:s.currentSingleOrTotalPriceOptions.value)==="total"?20:(s.currentSingleOrTotalPriceOptions==null?null:s.currentSingleOrTotalPriceOptions.value)==="single"?21:-1),g(2),b("ngIf",s.currentNetGrossOption&&s.orderAmount&&s.totalPrice),g(8),cn("",Nt(31,16,s.shouldArrivedAt,"EEE dd.MM.yyyy")," ",Nt(32,19,s.shouldArrivedAt,!0)," "),g(5),b("ngIf",s.item.packages),g(5),ye(s.saveButtonText))},dependencies:[At,Yt,oi,$l,Yi,tm,Ct,an,Hi,Lt,Hn,Or,ks,ld]});let t=e;return t})()});function l$i(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Angekommen"),p(),h(3,"td")(4,"div"),y(5),Ce(6,"nxtDate"),p()()()),t&2){let n=w().$implicit;g(5),ye(Nt(6,1,n.arrivedAt,"dd.MM.yyyy HH:mm"))}}function c$i(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Angenommen von"),p(),h(3,"td")(4,"div"),y(5),p()()()),t&2){let n=w().$implicit;g(5),ye(n.arrivedBy)}}function d$i(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Preis pro Packung (netto)"),p(),h(3,"td")(4,"div"),y(5),Ce(6,"money"),p()()()),t&2){let n=w().$implicit;g(5),ye(tt(6,1,n.unitPrice))}}function u$i(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Gesamtpreis"),p(),h(3,"td")(4,"div"),y(5),Ce(6,"money"),p()()()),t&2){let n=w().$implicit;g(5),ye(tt(6,1,n.unitPrice*n.orderAmount))}}function h$i(t,e){if(t&1){let n=re();h(0,"tr")(1,"td"),y(2,"Sollte Ankommen"),p(),h(3,"td")(4,"div",9)(5,"mat-icon",10),F("click",function(){V(n);let r=w().$implicit,s=w();return B(s.changeShouldArrivedAt(r,-1))}),y(6,"remove"),p(),h(7,"div",11),y(8),Ce(9,"nxtDate"),Ce(10,"fromNowText"),p(),h(11,"mat-icon",10),F("click",function(){V(n);let r=w().$implicit,s=w();return B(s.changeShouldArrivedAt(r,1))}),y(12,"add"),p()()()()}if(t&2){let n=w().$implicit;g(8),cn("",Nt(9,2,n.shouldArrivedAt,"dd.MM.yyyy")," ",Nt(10,5,n.shouldArrivedAt,!0),"")}}function p$i(t,e){if(t&1){let n=re();h(0,"tr")(1,"td",12)(2,"nxt-button",5),F("click",function(){V(n);let r=w().$implicit,s=w();return B(s.deleteOrder(r))}),y(3,"Bestellung L\xF6schen"),p(),h(4,"nxt-button",5),F("click",function(){V(n);let r=w().$implicit,s=w();return B(s.setNotArrivedOrder(r))}),y(5,"Bestellung doch nicht angekommen"),p()()()}}function m$i(t,e){if(t&1&&(h(0,"div",6)(1,"table",7)(2,"tr")(3,"td"),y(4,"Bestellung aufgegeben"),p(),h(5,"td")(6,"div"),y(7),Ce(8,"nxtDate"),p(),h(9,"div"),y(10),Ce(11,"fromNowText"),p()()(),h(12,"tr")(13,"td"),y(14,"Bestellt von"),p(),h(15,"td")(16,"div"),y(17),p()()(),h(18,"tr")(19,"td"),y(20,"Bestellt bei"),p(),h(21,"td")(22,"div"),y(23),p()()(),h(24,"tr")(25,"td"),y(26,"Bestellmenge"),p(),h(27,"td")(28,"div"),y(29),p()()(),W(30,l$i,7,4,"tr",8)(31,c$i,6,1,"tr",8)(32,d$i,7,3,"tr",8)(33,u$i,7,3,"tr",8)(34,h$i,13,8,"tr",8)(35,p$i,6,0,"tr",8),p()()),t&2){let n=e.$implicit,i=w();g(7),ye(Nt(8,15,n.createdAt,"EE dd.MM.yyyy HH:mm")),g(3),ye(tt(11,18,n.createdAt)),g(7),ye(n.createdBy),g(6),ye(n.sourceOfSupplyText),g(6),vj("",n.orderAmount," x ",i.item.amountPerPackage," ",i.item.unitOfMeasure," = ",n.orderAmount*i.item.amountPerPackage," ",i.item.unitOfMeasure," "),g(),b("ngIf",n.arrived),g(),b("ngIf",n.arrived),g(),b("ngIf",n.unitPrice),g(),b("ngIf",n.unitPrice),g(),b("ngIf",n.shouldArrivedAt&&i.onlyNotArrived),g(),b("ngIf",i.showDeleteButton[n.id])}}var Z9e,i6t=Q(()=>{jo();Bd();B1();Il();Zi();Ja();ri();Vt();go();me();ji();Gw();yi();Ci();jl();Kr();Vt();Z9e=(()=>{let e=class e{constructor(i,r,s,o,a,l){this.dialogRef=i,this.inventoryService=r,this.socketService=s,this.dialogService=o,this.permissionService=a,this.loginService=l,this.orders=[],this.title="",this.showDeleteButton={}}ngOnInit(){this.onlyNotArrived?(this.orders=this.item.lastOrders.filter(i=>!i.arrived),this.orders.map(i=>{i.sourceOfSupplyText=this.inventoryService.getSourceText(i.sourceOfSupply)}),this.title="Offene Bestellungen "+this.item.name):(this.orders=this.item.lastOrders.filter(i=>i.arrived).sortNumber("arrivedAt",!0),this.orders.map(i=>{i.sourceOfSupplyText=this.inventoryService.getSourceText(i.sourceOfSupply)}),this.title="Angekommene Bestellungen "+this.item.name),this.orders.forEach(i=>{let r=i.createdAt+Qt.DURATION_1DAY>Date.now(),s=i.createdBy===this.loginService.getUsername(),o=this.permissionService.hasPermission(Zt.Inventory_CanDeleteAllOrders);this.showDeleteButton[i.id]=r&&s||o}),this.orders.filter(i=>!i.shouldArrivedAt).forEach(i=>{i.shouldArrivedAt=Date.now().dateAddDays(4)})}deleteOrder(i){return O(this,null,function*(){let r=`M\xF6chtest du die Bestellung
`+i.orderAmount+" x "+this.item.amountPerPackage+" "+this.item.unitOfMeasure+" "+this.item.name+`
l\xF6schen?`;(yield this.dialogService.showYesNo(r,{title:"Bestellung l\xF6schen"}))&&(yield this.socketService.deleteInventoryOrder(i),this.dialogRef.close())})}changeShouldArrivedAt(i,r){i.shouldArrivedAt=i.shouldArrivedAt.dateAddDays(r),this.socketService.upsertInventoryOrder(i)}setNotArrivedOrder(i){i.arrived=!1,i.arrivedAt=0,this.socketService.upsertInventoryOrder(i),this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(z3),R(lt),R(vt),R(ws),R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-inventory-list-orders"]],standalone:!0,features:[xe],decls:8,vars:2,consts:[["fxLayout","column",1,"h-full"],["fxLayoutAlign","center center",1,"text-140","pb-2"],["fxLayout","column","fxLayoutAlign","start center","fxLayoutGap","10px",1,"p-2","scrollable","h-100"],["fxLayout","column","class","p-2","style","border: 0 solid red",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center center"],[3,"click"],["fxLayout","column",1,"p-2",2,"border","0 solid red"],[1,"nxt-table"],[4,"ngIf"],[1,"flex","flex-row","justify-center","items-center","center"],[1,"mouse-pointer",3,"click"],[1,"mx-2"],["colspan","2",1,"center"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),y(2),p(),h(3,"div",2),W(4,m$i,36,20,"div",3),p(),h(5,"div",4)(6,"nxt-button",5),F("click",function(){return s.dialogRef.close()}),y(7,"Schlie\xDFen"),p()()()),r&2&&(g(2),Ke(" ",s.title," "),g(2),b("ngForOf",s.orders))},dependencies:[At,Yt,$r,oi,Hi,Ct,Zr,Lt,ks,ld,Hn]});let t=e;return t})()});var n6t,r6t=Q(()=>{Qo();Pa();ls();Vt();me();dB();yi();Ci();Vt();n6t=(()=>{let e=class e{constructor(i,r,s){this.angularFire=i,this.socketService=r,this.dialogService=s,this.columnDefs=[],this.columnDefs=[{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateTimeWithDayOfWeek},{headerName:"Benutzer",field:"createdBy",nxtFieldType:Ee.Text},{headerName:"Menge",field:"",cellRenderer:o=>o.data.oldAmount+" -> "+o.data.newAmount}]}ngOnInit(){return O(this,null,function*(){})}loadData(i,r){return O(this,null,function*(){let s=yield this.angularFire.collection("/history/inventory-stock/"+i+"_"+r,a=>a.limit(20).orderBy("createdAt","desc")).get().toPromise(),o=[];for(let a of s.docs)o.push(a.data());o=o.sortNumber("createdAt",!0),this.historyData=o})}setDialog(i){this.dialog=i}closeDialog(){this.dialogEventEdit&&this.dialogEventEdit.close(),this.dialog.close()}};e.\u0275fac=function(r){return new(r||e)(R(XT),R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-history-items"]],standalone:!0,features:[xe],decls:5,vars:3,consts:[["fxLayout","column",2,"height","100%"],["tooltip","schlie\xDFen",2,"float","right",3,"click"],["fxFlex","",3,"columnDefs","rowData","showSideBar"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div")(2,"nxt-button-icon",1),F("click",function(){return s.closeDialog()}),y(3,"close"),p()(),ee(4,"nxt-datagrid",2),p()),r&2&&(g(4),b("columnDefs",s.columnDefs)("rowData",s.historyData)("showSideBar",!1))},dependencies:[At,Yt,qi,an,dr]});let t=e;return t})()});var s6t,o6t=Q(()=>{me();yi();me();s6t=(()=>{let e=class e{constructor(){this.socketService=Ve(lt),setTimeout(()=>this.init())}init(){return O(this,null,function*(){})}runGo2Inject(i){function r(o){document.querySelectorAll("input").forEach(c=>c.value="");let a=Array.from(document.querySelectorAll("td"));for(let c of o)a.filter(u=>u.innerText===c.name).forEach(u=>{let m=u.parentNode,f=Array.from(m.querySelectorAll("td"));if(f.find(x=>x.innerText===c.size)){let x=m.querySelector("input"),D=f.find(E=>E.innerText.includes("\u20AC"));x&&(x.value=c.amount,c.ok=!0,c.price=D.innerText)}});let l=!1;for(let c of o)c.ok||(alert("Achtung: Artikel nicht gefunden:"+c.name+" | "+c.size),l=!0);l?(alert("Es wurden nicht alle Artikel gefunden, daher passiert hier nix :("),document.querySelectorAll("input").forEach(c=>c.value="")):(navigator.clipboard.writeText(JSON.stringify(o)),alert("Alles in den Warenkorb legen, ergebnis ist in der Zwischenablage"))}$(".nxt-button").remove();let s=$('<button style="padding: 10px; font-size: 200%; position: absolute; right: 0; top:0">NXT-Start</button>');s.click(()=>r(i)),$(document.body).append(s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function g$i(t,e){if(t&1&&(h(0,"mat-radio-button",15),y(1),p()),t&2){let n=e.$implicit;b("value",n),g(),ye(n)}}function v$i(t,e){if(t&1&&(h(0,"mat-radio-button",15),y(1),p()),t&2){let n=e.$implicit;b("value",n.value),g(),Ke("",n.text," ")}}function y$i(t,e){if(t&1){let n=re();h(0,"nxt-button",13),F("click",function(){let r=V(n).$implicit,s=w();return B(s.specialButtonClicked(r))}),y(1),p()}if(t&2){let n=e.$implicit;g(),ye(n)}}function _$i(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){V(n);let r=w(2);return B(r.print())}),y(1,"Alles DRUCKEN"),p()}t&2&&b("smallButton",!0)}function C$i(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.sendWhatsApp(r))}),y(1),ee(2,"br"),y(3,"WhatsApp Capone "),p()}if(t&2){let n=w().$implicit;b("smallButton",!0),g(),ye(n)}}function x$i(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.sendWhatsApp(r))}),y(1),ee(2,"br"),y(3,"WhatsApp Mandy "),p()}if(t&2){let n=w().$implicit;b("smallButton",!0),g(),ye(n)}}function b$i(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){V(n);let r=w().$implicit,s=w(2);return B(s.print(r))}),y(1),ee(2,"br"),y(3,"Drucken"),p()}if(t&2){let n=w().$implicit;b("smallButton",!0),g(),ye(n)}}function w$i(t,e){if(t&1&&(vs(0),W(1,C$i,4,2,"nxt-button",16)(2,x$i,4,2,"nxt-button",16)(3,b$i,4,2,"nxt-button",16),ys()),t&2){let n=e.$implicit;g(),b("ngIf",n==="Osman"),g(),b("ngIf",n==="Sorry Mom Mallorca"),g(),b("ngIf",n!=="Osman")}}function S$i(t,e){if(t&1&&(h(0,"div"),W(1,_$i,2,1,"nxt-button",16)(2,w$i,4,3,"ng-container",17),p()),t&2){let n=w();g(),b("ngIf",n.showEmptyItems),g(),b("ngForOf",n.printButtons)}}function T$i(t,e){if(t&1){let n=re();h(0,"nxt-button",18),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.showOrderTextClicked(r))}),y(1),p()}if(t&2){let n=e.$implicit;b("smallButton",!0),g(),Ke("",n," ")}}function D$i(t,e){if(t&1&&(h(0,"div"),W(1,T$i,2,2,"nxt-button",19),p()),t&2){let n=w();g(),b("ngForOf",n.showOrderTexts)}}function E$i(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w();g(),ye(n.inventoryDataFiltered[n.studio].length)}}function M$i(t,e){if(t&1){let n=re();h(0,"nxt-button",13),F("click",function(){V(n);let r=w();return B(r.reorder())}),y(1,"REORDER"),p()}}function k$i(t,e){if(t&1){let n=re();h(0,"nxt-button",13),F("click",function(){V(n);let r=w();return B(r.redraw())}),y(1,"REDRAW"),p()}}function I$i(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",20),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close "),p()}}var vse,X9e=Q(()=>{qn();Pa();Ph();Jvt();jc();zn();jo();Nu();Ci();pa();o2();R9e();Ul();t6t();i6t();Ov();Qo();r6t();ls();a9e();Zi();oo();Jr();ri();ox();Vt();me();yi();Ci();Gw();Kr();ji();Nbe();ZE();Cs();jl();ug();o6t();Vt();qn();vse=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d,u,m,f){this.socketService=i,this.dialogService=r,this.inventoryService=s,this.loginService=o,this.dialogRef=a,this.manualDataOrderService=l,this.electronService=c,this.configService=d,this.permissionService=u,this.clipboard=m,this.inventorySpecialButtonService=f,this.inventoryData={},this.inventoryDataFiltered={},this.inventoryFilter={},this.quickFilterText=this.permissionService.isJulian()?"Julian":"",this.inventoryDataSubscriptions={},this.studios=this.configService.config.value.studios.filter(_=>!_.onlyCash&&!["Alsdorf","Brand"].includes(_.name)).map(_=>_.name),this.studio=this.studios[0],this.showEmptyItems=!1,this.showEmptyItemsAc=!1,this.inventoryStockColumnDef=[{headerName:"Id",field:"id",nxtFieldType:Ee.Text,hide:!0,sortable:!1},{rowDrag:!0,maxWidth:50,minWidth:50,cellStyle:{textAlign:"center"},cellClass:"single-drag-row"},{headerName:"",cellRenderer:()=>Ir.Material.Edit,nxtOnCellClicked:_=>{this.dialogService.showComponentDialog(gse).componentInstance.loadFromId(_.data.id)},maxWidth:45,minWidth:45,cellStyle:{textAlign:"center"}},{headerName:"",nxtOnCellClicked:_=>this.showHistory(_.data.id,_.data.studio),cellRenderer:()=>Ir.Material.History,sortable:!1,cellStyle:{textAlign:"center"},maxWidth:45,minWidth:45,hide:!this.loginService.isBackoffice()},{colId:"createOrder",headerName:"",cellRenderer:()=>Ir.Material.ShoppingCart,tooltipValueGetter:()=>"Bestellung erstellen",cellStyle:{textAlign:"center"},maxWidth:45,minWidth:45,nxtOnCellClicked:_=>{this.createNewOrder(_.data)},hide:!1},{headerName:"Bezeichnung",field:"name",cellRenderer:_=>_.data.name+" ("+_.data.amountPerPackage+" "+_.data.unitOfMeasure+")",nxtFieldType:Ee.Text,sortable:!0,nxtOnCellDoubleClicked:_=>this.dialogService.showComponentDialog(gse).componentInstance.loadFromId(_.data.id),width:350,suppressAutoSize:!0},{headerName:"order",field:"orderValue",nxtFieldType:Ee.Text,sortable:!1,hide:!this.loginService.isJulian()},{headerName:"Zust\xE4ndig",field:"responsibility",nxtFieldType:Ee.Text,sortable:!1},{headerName:"Vertr.",field:"responsibility2",nxtFieldType:Ee.Text,sortable:!1,hide:!0},{headerName:"Menge",field:"amount",nxtFieldType:Ee.Number,cellStyle:_=>({textAlign:"right"}),editable:!0,singleClickEdit:!0,sortable:!1,maxWidth:80,minWidth:80,cellRenderer:_=>_.data.onlyFullOrEmpty?_.data.amount===0?Ir.Material.Warning:Ir.Material.Check:_.value},{headerName:"",cellRenderer:_=>"-",cellStyle:_=>({textAlign:"center"}),nxtFieldType:Ee.Text,nxtOnCellClicked:this.bookOutgoingClicked.bind(this),sortable:!1,maxWidth:50,minWidth:50},{headerName:"",cellRenderer:_=>"+",cellStyle:_=>({textAlign:"center"}),nxtFieldType:Ee.Text,nxtOnCellClicked:this.bookIncomingClicked.bind(this),sortable:!1,maxWidth:50,minWidth:50},{headerName:"",nxtOnCellClicked:_=>{let x=this.dialogService.showComponentDialog(n6t,{},{minHeight:"50vh",minWidth:"30vw"});x.componentInstance.setDialog(x),x.componentInstance.loadData(_.data.id,_.data.studio)},cellRenderer:()=>Ir.Material.History,sortable:!1,cellStyle:{textAlign:"center"},maxWidth:50,minWidth:50},{headerName:"Min",field:"amountAlarm",nxtFieldType:Ee.Number,cellStyle:_=>({textAlign:"right"}),editable:!1,singleClickEdit:!1,sortable:!1,maxWidth:80,minWidth:80,hide:!0},{headerName:"Max",field:"amountFull",nxtFieldType:Ee.Number,cellStyle:_=>({textAlign:"right"}),editable:!1,singleClickEdit:!1,sortable:!1,maxWidth:80,minWidth:80,hide:!0},{headerName:"\xFCber",valueGetter:_=>_.data.amount-_.data.amountAlarm,nxtFieldType:Ee.Number,cellStyle:_=>({textAlign:"right"}),editable:!1,singleClickEdit:!1,sortable:!1,maxWidth:80,minWidth:80,hide:!0},{headerName:"Bei Bezugsquelle",field:"nameBySource",nxtFieldType:Ee.Text,width:200,suppressAutoSize:!0},{headerName:"bestellen",valueGetter:_=>{let x=_.data.amountFull-_.data.amount;if(x>0&&_.data.amount<=_.data.amountAlarm)return x},valueFormatter:_=>_.value>0?_.value:"",nxtFieldType:Ee.Number,cellStyle:_=>({textAlign:"right"}),editable:!1,singleClickEdit:!1,sortable:!1,maxWidth:80,minWidth:80},{headerName:"Bezugsquelle 1",field:"sourceOfSupply",colId:"sourceOfSupply",valueFormatter:_=>this.inventoryService.inventorySourcesOfSupply.find(x=>x.value===_.data.sourceOfSupply)?.text,sortable:!0,suppressAutoSize:!0,width:150,nxtOnCellDoubleClicked:_=>{_.data.sourceOfSupplyUrl&&this.electronService.openExternal(_.data.sourceOfSupplyUrl)},cellStyle:_=>({color:_.data.sourceOfSupplyUrl?"":xn.Red})},{headerName:"Bezugsquelle 2",field:"sourceOfSupply2",colId:"sourceOfSupply2",suppressAutoSize:!0,width:150,valueFormatter:_=>this.inventoryService.inventorySourcesOfSupply.find(x=>x.value===_.data.sourceOfSupply2)?.text,sortable:!0,nxtOnCellDoubleClicked:_=>{_.data.sourceOfSupply2Url&&this.electronService.openExternal(_.data.sourceOfSupply2Url)},cellStyle:_=>({color:_.data.sourceOfSupplyUrl?"":xn.Red})},{headerName:"letzte Aktual.",field:"updatedAt",cellRenderer:_=>Ie.dateDiffToNowText(_.data.updatedAt),sortable:!0,minWidth:150,maxWidth:150,cellStyle:_=>{let x=xn.Red,D=Ie.dateDiffToNow(_.data.updatedAt);return D<Qt.DURATION_1DAY?x=xn.Green:D<Qt.DURATION_1DAY*2&&(x=xn.Orange),{color:x}}},{headerName:"offene Bestellungen",cellRenderer:_=>{let x=_.data.lastOrders?.filter(D=>!D.arrived);if(x&&x.length>0)return"<div>"+x.map(D=>{let E="";D.shouldArrivedAt?D.shouldArrivedAt<Date.now()&&(E=xn.Red):Date.now()-D.createdAt>Qt.DURATION_1DAY*4&&(E=xn.Red);let M="";return E&&(M+="color: "+E+'";'),x.length>1&&(M+="line-height: 1.3;"),'<div style="'+M+'">'+D.createdAt.dateFormat("dd.MM")+":&nbsp;&nbsp;&nbsp;"+D.orderAmount+" x "+_.data.amountPerPackage+" "+_.data.unitOfMeasure+"</div>"}).join("")+"</div>"},nxtOnCellClicked:_=>{this.showOrders(_.data)},autoHeight:!0},{headerName:"letzte angekommene Best.",valueGetter:_=>{let x=_.data.lastOrders?.filter(D=>D.arrived).sortNumber("arrivedAt",!0);if(x&&x.length>0)return x[0].arrivedAt.dateFormat("yyyy-MM-dd")},cellRenderer:_=>{let x=_.data.lastOrders?.filter(D=>D.arrived).sortNumber("arrivedAt",!0);if(x&&x.length>0)return"<div>"+x[0].createdAt.dateFormat("dd.MM")+" "+cr.arrowRight+" "+x[0].arrivedAt.dateFormat("dd.MM")+":&nbsp;&nbsp;&nbsp;"+x[0].orderAmount+" x "+_.data.amountPerPackage+" "+_.data.unitOfMeasure+"</div>"},nxtOnCellClicked:_=>{this.showArrivedOrders(_.data)},autoHeight:!0}],this.printButtons=[],this.specialButtons=[],this.showOrderTexts=[]}bookOutgoingClicked(i){i.data.amount>0&&this.inventoryService.book(i.data.id,i.data.studio,-1)}bookIncomingClicked(i){this.inventoryService.book(i.data.id,i.data.studio,1)}ngOnInit(){return O(this,null,function*(){document.body.style.backgroundColor="transparent !important",setTimeout(()=>{let i={};for(let r of this.studios)this.inventoryData[r]=[],this.inventoryDataSubscriptions&&this.inventoryDataSubscriptions[r]&&this.inventoryDataSubscriptions[r].unsubscribe(),this.inventoryDataSubscriptions[r]||(this.inventoryDataSubscriptions[r]=null),this.inventoryDataSubscriptions[r]=this.inventoryService.inventoryStockItems.subscribe(s=>O(this,null,function*(){this.inventoryData[r]=Sr.clone(s.filter(o=>o.studio===r)).sortNumber("orderValue"),this.inventoryFilterItems=this.inventoryService.inventoryLocations,this.inventoryFilterItems.length>0&&(this.inventoryFilter[r]||(this.inventoryFilter[r]=this.inventoryFilterItems[0].value),this.inventoryFilterChanged(),yield za.sleep(100),this.dataGrid.api.redrawRows())}))},200)})}ngOnDestroy(){Object.keys(this.inventoryDataSubscriptions).forEach(i=>{this.inventoryDataSubscriptions[i].unsubscribe()})}showItems(){}close(){return O(this,null,function*(){this.dialogRef.close()})}showHistory(i,r){return O(this,null,function*(){let s=this.dialogService.showComponentFull(rse);s.componentInstance.id=i})}cellEditingStopped(i){if(i.column.colId==="amount"){let r=parseInt(i.value,10);if(Number.isNaN(r))this.dialogService.showOk(i.data.amount+" ist keine Zahl du Otto"),i.data.amount=this.editAmountOld,i.node.setData(i.data);else{let s=r-this.editAmountOld;s!==0&&this.inventoryService.book(i.data.id,i.data.studio,s)}}i.value=0}cellEditingStarted(i){i.column.colId==="amount"&&(this.editAmountOld=parseInt(i.data.amount,10))}inventoryFilterChanged(){return O(this,null,function*(){for(let i of this.studios)this.inventoryData[i]&&(this.inventoryDataFiltered[i]=this.inventoryData[i].filter(r=>{typeof r.location>"u"&&(r.location="undefined");let s=r.location===this.inventoryFilter[i];return s&&(this.showEmptyItems&&((r.amountFull===0||r.amount-r.amountAlarm>0)&&(s=!1),r.notOrderBefore&&r.notOrderBefore.dateParse()>Date.now()&&(s=!1)),this.showEmptyItemsAc&&!r.orderedByAc)?!1:s}),console.log(this.inventoryDataFiltered[i].length));this.calcShowOrderTexts()})}rowDragEnd(i){return O(this,null,function*(){let r=this.inventoryService.inventoryItems.value.find(s=>s.id===i.node.data.id);r.orderValue===i.newOrderValue?(this.dialogService.showLoading(_n.InventorySort,"Inventar wird strukturiert, bitte warten"),yield this.manualDataOrderService.resetOrderValueInCollection("inventory-items","orderValue"),this.dialogService.hideLoading(_n.InventorySort)):(r.orderValue=i.newOrderValue,this.inventoryService.upsertInventoryItem(r,this.loginService.getUsername()))})}reorder(){return O(this,null,function*(){let i=yield this.dialogService.showYesNoCancel("Dies schmei\xDFt die Sortierung weg! Achtung!",{yesText:"A-Z",noText:"Nur Sortierungszahlen neu vergeben"});typeof i=="boolean"&&(i?(yield this.dialogService.showYesNo("Sicher? das zerst\xF6rt die manuelle Sortierung!"))&&(yield this.manualDataOrderService.resetOrderValueInCollection("inventory-items","name")):yield this.manualDataOrderService.resetOrderValueInCollection("inventory-items","orderValue"))})}redraw(){this.dataGrid.api.redrawRows()}addItem(){this.dialogService.showComponentDialog(gse).componentInstance.newItem()}showEmptyItemsChanged(i,r){r?(this.showEmptyItems=!0,this.showEmptyItemsAc=i):(this.showEmptyItems=i,this.showEmptyItemsAc=!1),this.printButtons=[],this.specialButtons=[],this.showEmptyItems&&this.checkUpdatedAt(),this.inventoryFilterChanged(),this.showEmptyItems&&(this.generatePrintButtons(),this.generateSpecialButtons()),this.showEmptyItems?this.dataGrid.api.applyColumnState({state:[{colId:"sourceOfSupply",sort:"asc",sortIndex:0}]}):this.dataGrid.api.resetColumnState()}checkUpdatedAt(){this.inventoryDataFiltered[this.studio].filter(r=>{let s=r.location===this.inventoryFilter[this.studio],o=Ie.dateDiffToNow(r.updatedAt)>Qt.DURATION_1DAY*3;return s&&o}).length>0&&this.dialogService.showOk("Achtung der Bestand ist zum Teil \xE4lter als 3 Tage")}print(i){let r=this.getToPrint(i);window.open("/inventory-to-order-print?data="+decodeURIComponent(Qn.stringify(r)),"_blank")}getToPrint(i){let r=this.inventoryService.inventorySourcesOfSupply.find(a=>a.text===i),s="name";if(r?.printEn){s="nameEn";let a=this.inventoryDataFiltered[this.studio].filter(l=>!l.nameEn);if(a.length>0){this.dialogService.showOk(`\xDCbersetzungen fehlen:
`+a.map(l=>l.name).join(`
`));return}}return{studio:this.studio,date:Date.now(),lines:this.inventoryDataFiltered[this.studio].filter(a=>!r||a.sourceOfSupply===r.value).map(a=>({name:a[s]+" ("+a.amountPerPackage+" "+a.unitOfMeasure+")",amount:a.amountFull-a.amount}))}}sendWhatsApp(i){if(i==="Sorry Mom Mallorca"){let s=this.getToPrint(i).lines.map(o=>o.amount+" x "+o.name).join(`
`);this.socketService.sendWhatsAppMessage("+34676359836",s),this.socketService.sendTelegramAdmin(`Sorry Mom Mallorca Bestellung

`+s)}else{let s=this.getToPrint(i).lines.map(o=>o.amount+" x "+o.name).join(`
`);this.socketService.sendWhatsAppMessage("+4917683296085",s)}}createNewOrder(i){let r=this.dialogService.showComponentDialog(e6t),s=0;i.amountFull-i.amount>0&&i.amount<=i.amountAlarm&&(s=i.amountFull-i.amount),r.componentInstance.item=i,r.componentInstance.shouldOrderAmount=s}showOrders(i){this.dialogService.showComponentDialog(Z9e,{item:i,onlyNotArrived:!0})}showArrivedOrders(i){this.dialogService.showComponentDialog(Z9e,{item:i,onlyNotArrived:!1})}generateSpecialButtons(){this.inventoryDataFiltered[this.studio].map(r=>r.sourceOfSupply).includes("GO2")&&this.specialButtons.push("GO2")}generatePrintButtons(){}showCreateOrderColumn(i){this.dataGrid.api?.setColumnVisible("createOrder",i)}showOrderTextClicked(i){let r=[],s=0;for(let a of this.inventoryDataFiltered[this.studio]){let l=a.lastOrders.filter(c=>c.sourceOfSupply===i&&!c.arrived&&c.createdAt>Date.now()-Qt.DURATION_1DAY);for(let c of l){let d=this.inventoryDataFiltered[this.studio].find(u=>u.id===c.itemId);r.push(d.name+": "+c.orderAmount+" x "+d.amountPerPackage+" "+d.unitOfMeasure+" f\xFCr "+c.totalPriceNet.toMoneyString()+" netto"),s+=c.totalPriceNet}}let o="Bestellung f\xFCr "+this.configService.config.value.studioName+`
`+r.join(`
`)+`

Gesamtbetrag: `+s.toMoneyString();this.clipboard.copy(o),this.dialogService.showOk(o,{buttonText:"In die Zwischenablage"})}calcShowOrderTexts(){let i=[];for(let r of this.inventoryDataFiltered[this.studio])if(r.lastOrders){let s=r.lastOrders.filter(o=>!o.arrived&&o.createdAt>Date.now()-Qt.DURATION_1DAY);i.push(...s.map(o=>o.sourceOfSupply))}i=wc.unique(i),i=i.filter(r=>this.inventoryService.inventorySourcesOfSupply.find(s=>s.text===r&&s.viewOrderListText)),this.showOrderTexts=wc.unique(i)}specialButtonClicked(i){if(i==="GO2"){let r=[];for(let l of this.inventoryDataFiltered[this.studio])if(l.sourceOfSupply==="GO2"){let c="",d="";if(l.nameBySource.includes("	")){let u=l.nameBySource.split("	");c=u[0],d=u[1]}else c=l.nameBySource.substring(0,l.nameBySource.indexOf(" ")).trim(),d=l.nameBySource.substring(l.nameBySource.indexOf(" ")+1).trim();r.push({id:l.id,name:c,size:d,amount:l.amount.toString()})}let s="function "+this.inventorySpecialButtonService.runGo2Inject.toString(),a="const go2Items = JSON.parse('"+JSON.stringify(r)+"');"+`

`+s+`

runGo2Inject(go2Items)`;this.clipboard.copy(a)}}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(z3),R(Fi),R(Gt,8),R(Eie),R(B6),R(Xi),R(ws),R(_u),R(s6t))},e.\u0275cmp=_e({type:e,selectors:[["nxt-inventory-list"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.dataGrid=o.first)}},standalone:!0,features:[xe],decls:31,vars:20,consts:[["fxFlex","","fxLayout","column","fxLayoutAlign","stretch",1,"nxt-page"],["fxLayout","row",2,"height","100%"],["fxFlex","100","fxLayout","column","fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","space-around center",2,"width","100%"],["layout","row",2,"margin-bottom","5px",3,"ngModelChange","ngModel"],["style","margin-right: 12px;",3,"value",4,"ngFor","ngForOf"],["placeholder","Suche",2,"width","300px",3,"valueChange","value","clearIcon"],[3,"valueChange","value"],[4,"ngIf"],["fxFlex","","uniqueRowDataKey","id","dragOrderFieldName","orderValue","excelExportName","Inventar",2,"width","100%",3,"cellEditingStopped","cellEditingStarted","rowDragEnd","columnDefs","rowData","showSideBar","disableAllSort","quickFilterText","autoSizeColumnOnResize"],["nxtCardDivider",""],["fxLayout","row","fxLayoutAlign","center"],[3,"click",4,"ngIf"],[3,"click"],["style","position: absolute;right: 10px;","tooltip","schlie\xDFen",3,"click",4,"ngIf"],[2,"margin-right","12px",3,"value"],[3,"smallButton","click",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"click","smallButton"],[3,"smallButton","click",4,"ngFor","ngForOf"],["tooltip","schlie\xDFen",2,"position","absolute","right","10px",3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"mat-radio-group",4),Xe("ngModelChange",function(a){return Ze(s.studio,a)||(s.studio=a),a}),F("ngModelChange",function(){return s.inventoryFilterChanged()}),W(5,g$i,2,2,"mat-radio-button",5),p(),h(6,"nxt-input",6),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p(),h(7,"mat-radio-group",4),Xe("ngModelChange",function(a){return Ze(s.inventoryFilter[s.studio],a)||(s.inventoryFilter[s.studio]=a),a}),F("ngModelChange",function(){return s.inventoryFilterChanged()}),W(8,v$i,2,2,"mat-radio-button",5),p(),h(9,"div")(10,"nxt-slide-toggle",7),F("valueChange",function(a){return s.showEmptyItemsChanged(a,!1)}),y(11,"Bestellen"),p(),h(12,"nxt-slide-toggle",7),F("valueChange",function(a){return s.showEmptyItemsChanged(a,!0)}),y(13,"Bestellen AC"),p()()(),h(14,"div")(15,"div"),Kn(16,y$i,2,1,"nxt-button",null,sa),p(),W(18,S$i,3,2,"div",8)(19,D$i,2,1,"div",8),p(),W(20,E$i,2,1,"div",8),h(21,"nxt-datagrid",9),F("cellEditingStopped",function(a){return s.cellEditingStopped(a)})("cellEditingStarted",function(a){return s.cellEditingStarted(a)})("rowDragEnd",function(a){return s.rowDragEnd(a)}),p()()(),ee(22,"div",10),h(23,"div",11),W(24,M$i,2,0,"nxt-button",12)(25,k$i,2,0,"nxt-button",12),h(26,"nxt-button",13),F("click",function(){return s.addItem()}),y(27,"NEUES TEIL"),p(),h(28,"nxt-button",13),F("click",function(){return s.close()}),y(29,"schlie\xDFen"),p()(),W(30,I$i,2,0,"nxt-button-icon",14),p()),r&2&&(g(4),qe("ngModel",s.studio),g(),b("ngForOf",s.studios),g(),qe("value",s.quickFilterText),b("clearIcon",!0),g(),qe("ngModel",s.inventoryFilter[s.studio]),g(),b("ngForOf",s.inventoryFilterItems),g(2),b("value",s.showEmptyItems),g(2),b("value",s.showEmptyItemsAc),g(4),Yn(s.specialButtons),g(2),b("ngIf",!1),g(),b("ngIf",s.showEmptyItems),g(),b("ngIf",!1),g(),b("columnDefs",s.inventoryStockColumnDef)("rowData",s.inventoryDataFiltered[s.studio])("showSideBar",!1)("disableAllSort",!1)("quickFilterText",s.quickFilterText)("autoSizeColumnOnResize",!0),g(3),b("ngIf",s.loginService.isJulian()),g(),b("ngIf",s.loginService.isJulian()),g(5),b("ngIf",s.dialogRef))},dependencies:[At,Yt,oi,qi,hg,ko,Ko,Dp,Hi,h2,Yi,Nn,Ct,Lt,dr,Mre,an],styles:["[_nghost-%COMP%]{height:100%}mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}"]});let t=e;return t})()});var yse,Q9e=Q(()=>{me();Gi();Pa();yi();ZA();Qo();oo();pS();W_();Ci();Il();me();yse=(()=>{let e=class e extends bt{constructor(){super(),this.totalValue=gt(0),this.openValue=gt(0),this.paymentValue=gt(0),this.discountGiftCardItems=gt([]),this.fromTill=gt({from:"",till:""}),this.show20Percentage=gt(!0),this.show40Percentage=gt(!0),this.show50Percentage=gt(!0),this.showDaySessionCards=gt(!0),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.columnDefs=[{headerName:"Gesamtwert",field:"totalValue",nxtFieldType:Ee.Money},{headerName:"Bezahlt",field:"paymentValue",nxtFieldType:Ee.Money},{headerName:"Typ",field:"type",nxtFieldType:Ee.Text},{headerName:"Rabatt",field:"discountPercentage",nxtFieldType:Ee.Percentage},{headerName:"nicht zugewiesen",field:"openValue",nxtFieldType:Ee.Money},{headerName:"Erstellt",field:"createdAt",nxtFieldType:Ee.Date_germanDate},{headerName:"Info",field:"info"},{headerName:"Shop-kauf",field:"shopOrderId",nxtOnCellClicked:i=>this.showShopOrder(i.data.shopOrderId)}],Tp(this.show20Percentage).subscribe(()=>this.load()),Tp(this.show40Percentage).subscribe(()=>this.load()),Tp(this.show50Percentage).subscribe(()=>this.load()),Tp(this.showDaySessionCards).subscribe(()=>this.load())}ngOnInit(){}nxtOnDestroy(){}load(){return O(this,null,function*(){if(!this.fromTill().from||!this.fromTill().till)return;let i=[],r=yield this.socketService.getDiscountedOrDaySessionGiftCards(this.fromTill().from,this.fromTill().till),s=m3.reGroupObjectArray(r,"name");for(let o of s){let a=o.value,l=o.list.find(I=>!I.originalId),c=o.list.filter(I=>!I.assigned).reduce((I,z)=>I+z.value,0),d=l.originalValue,u=l.originalPaymentValue,m=l.discountPercentage,f=l.paymentMethod,_=l.shopOrderId,x=l.additionalInfo,D=m+"%";x||(x=l.createSource+": "+l.discountReason),m===0&&(d===550&&(D="DaySessionCard"),d===1e3&&(D="DaySessionCard"));let E=l.createdAt;(m===20&&this.show20Percentage()||m===40&&this.show40Percentage()||m===50&&this.show50Percentage()||l.giftCardSubType==="day-session"&&this.showDaySessionCards())&&i.push({name:a,openValue:c,totalValue:d,info:x,paymentValue:u,discountPercentage:m,createdAt:E,shopOrderId:_,type:D})}this.discountGiftCardItems.set(i.sortNumber("createdAt")),this.totalValue.set(i.reduce((o,a)=>o+a.totalValue,0)),this.openValue.set(i.reduce((o,a)=>o+a.openValue,0)),this.paymentValue.set(i.reduce((o,a)=>o+a.paymentValue,0))})}fromTillChanged(i){this.fromTill.set(i),this.load()}showShopOrder(i){this.dialogService.showShopOrder.emit(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-discount-gift-cards"]],standalone:!0,features:[et,xe],decls:34,vars:17,consts:[[1,"nxt-page","flex","h-full","flex-col"],[1,"flex","flex-col"],[1,"flex","flex-row"],[3,"valueChange","value"],[1,"nxt-table"],[1,"flex","h-full"],[1,"h-full",3,"rowData","columnDefs","showFooter"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"nxt-date-range-picker",3),F("valueChange",function(a){return s.fromTillChanged(a)}),p(),h(4,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.show20Percentage,a)||(s.show20Percentage=a),a}),y(5,"20%"),p(),h(6,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.show40Percentage,a)||(s.show40Percentage=a),a}),y(7,"40%"),p(),h(8,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.show50Percentage,a)||(s.show50Percentage=a),a}),y(9,"50%"),p(),h(10,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.showDaySessionCards,a)||(s.showDaySessionCards=a),a}),y(11,"Day-Session-Cards"),p()(),h(12,"div")(13,"table",4)(14,"tr")(15,"td"),y(16,"Gesamtwert"),p(),h(17,"td"),y(18),Ce(19,"money"),p()(),h(20,"tr")(21,"td"),y(22,"Bezahlt"),p(),h(23,"td"),y(24),Ce(25,"money"),p()(),h(26,"tr")(27,"td"),y(28,"nicht zugewiesen"),p(),h(29,"td"),y(30),Ce(31,"money"),p()()()()(),h(32,"div",5),ee(33,"nxt-datagrid",6),p()()),r&2&&(g(3),b("value",s.fromTill()),g(),qe("value",s.show20Percentage),g(2),qe("value",s.show40Percentage),g(2),qe("value",s.show50Percentage),g(2),qe("value",s.showDaySessionCards),g(8),ye(tt(19,11,s.totalValue())),g(6),ye(tt(25,13,s.paymentValue())),g(6),ye(tt(31,15,s.openValue())),g(3),b("rowData",s.discountGiftCardItems())("columnDefs",s.columnDefs)("showFooter",!0))},dependencies:[dr,Nn,$g,ks],styles:["[_nghost-%COMP%]{height:100%}"],changeDetection:0});let t=e;return t})()});function A$i(t,e){if(t&1){let n=re();h(0,"nxt-date-picker-2",10),F("valueChange",function(){V(n);let r=w(2);return B(r._formChanged())}),p()}if(t&2){let n=w().$implicit;b("readonly",!0)("nxtFormControl",n.controls.endDateString)}}function P$i(t,e){if(t&1&&ee(0,"nxt-select",7),t&2){let n=w(),i=n.$implicit,r=n.$index,s=n.$count,o=w();b("disabled",o.added()?r!==s-1:!0)("multiple",o.multiSelect())("nxtFormControl",i.controls.value)("options",o.options())("placeholder",o.placeholder())}}function R$i(t,e){if(t&1){let n=re();h(0,"nxt-input",11),F("valueChange",function(){V(n);let r=w(2);return B(r._formChanged())}),p()}if(t&2){let n=w(),i=n.$implicit,r=n.$index,s=n.$count,o=w();b("readonly",o.added()?r!==s-1:!0)("isNumber",o.isNumber())("nxtFormControl",i.controls.value)("placeholder",o.placeholder())}}function F$i(t,e){if(t&1){let n=re();h(0,"div",2)(1,"nxt-date-picker-2",5),F("valueChange",function(){V(n);let r=w();return B(r._formChanged())}),p(),W(2,A$i,1,2,"nxt-date-picker-2",6)(3,P$i,1,5,"nxt-select",7)(4,R$i,1,4,"nxt-input",8),h(5,"nxt-button-icon",9),F("click",function(){let r=V(n).$index,s=w();return B(s.removeClicked(r))}),y(6,"remove"),p()()}if(t&2){let n=e.$implicit,i=e.$index,r=e.$count,s=w();g(),b("readonly",s.added()?i!==r-1:!0)("nxtFormControl",n.controls.startDateString)("placeholder",i===r-1?"Ab":"Von"),g(),Je(i!==r-1?2:-1),g(),Je(s.options()?3:4)}}var tj,a6t=Q(()=>{me();Gi();qn();g2();th();Jr();ls();a3();ih();il();Ci();nc();me();tj=(()=>{let e=class e extends bt{constructor(){super(),this.nxtFormControl=br.required(),this.placeholder=br.required(),this.options=br(null),this.multiSelect=br(!1),this.requiredValue=br(!0),this.isNumber=br(!1),this.headerText=br.required(),this.formChanged=j2(),this.cdRef=Ve(Kt),this.dialogService=Ve(vt),this.added=gt(!1)}static getFormGroup(i,r){return new Wl({value:new Cn(i.value,r?[ii.requiredAndNotNaN]:[]),startDateString:new Cn(i.startDateString,[ii.requiredAndNotNaN],"Ab"),endDateString:new Cn(i.endDateString,[],"Bis")})}ngDoCheck(){this.cdRef.detectChanges()}ngOnInit(){}_formChanged(){for(let[i,r]of this.nxtFormControl().controls.entries())if(i===this.nxtFormControl().controls.length-1&&this.nxtFormControl().controls.length>1&&r.controls.startDateString.value){let o=r.controls.startDateString.value.dateAddDays(-1).dateFormatDate();o!==this.nxtFormControl().controls[i-1].controls.endDateString.value&&this.nxtFormControl().controls[i-1].controls.endDateString.setValue(o)}for(let[i,r]of this.nxtFormControl().controls.entries()){let s=i===this.nxtFormControl().controls.length-1;r.controls.startDateString.value&&r.controls.endDateString.value&&r.controls.startDateString.value>=r.controls.endDateString.value?(r.controls.startDateString.setErrors({startEndToShort:"Zwischen Start und Ende m\xFCssen Tage liegen"}),r.controls.endDateString.setErrors({startEndToShort:"Zwischen Start und Ende m\xFCssen Tage liegen"})):(r.controls.startDateString.value&&r.controls.startDateString.setErrors(null),(r.controls.endDateString.value||s)&&r.controls.endDateString.setErrors(null))}this.formChanged.emit(),this.cdRef.detectChanges()}nxtOnDestroy(){}addClicked(){let i=e.getFormGroup({value:null,startDateString:null,endDateString:null},this.requiredValue());i.controls.endDateString.hasValidator(ii.requiredAndNotNaN),this.pushSubscription=i.valueChanges.subscribe(()=>this._formChanged()),this.nxtFormControl().controls.push(i),this.added.set(!0)}removeClicked(i){this.nxtFormControl().controls.splice(i,1),this.nxtFormControl().controls.length>0&&this.nxtFormControl().controls[0].controls.endDateString.setValue(null)}test123(i){console.log(i);let r=i.hasValidator(ii.requiredAndNotNaN);console.log(r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-multi-from-till"]],inputs:{nxtFormControl:[1,"nxtFormControl"],placeholder:[1,"placeholder"],options:[1,"options"],multiSelect:[1,"multiSelect"],requiredValue:[1,"requiredValue"],isNumber:[1,"isNumber"],headerText:[1,"headerText"]},outputs:{formChanged:"formChanged"},standalone:!0,features:[et,xe],decls:8,vars:1,consts:[[1,"w-full","p-3","pt-6","wrapper"],[1,"header-text"],[1,"flex","flex-row","gap-3"],[1,"flex","flex-row","w-full","justify-center"],[3,"click"],[3,"valueChange","readonly","nxtFormControl","placeholder"],[3,"readonly","nxtFormControl"],[3,"disabled","multiple","nxtFormControl","options","placeholder"],[3,"readonly","isNumber","nxtFormControl","placeholder"],["nxtPermission","IsJulian",3,"click"],[3,"valueChange","readonly","nxtFormControl"],[3,"valueChange","readonly","isNumber","nxtFormControl","placeholder"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),y(2),p(),Kn(3,F$i,7,5,"div",2,sa),h(5,"div",3)(6,"nxt-button-icon",4),F("click",function(){return s.addClicked()}),y(7,"add"),p()()()),r&2&&(g(2),ye(s.headerText()),g(),Yn(s.nxtFormControl().controls))},dependencies:[Yi,an,_f,$l,Zs],styles:["[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]{border:1px solid #a2a2a2;border-radius:4px;position:relative}[_nghost-%COMP%]   .wrapper[_ngcontent-%COMP%]   .header-text[_ngcontent-%COMP%]{width:fit-content;padding:0 3px;background-color:#404040;position:absolute;top:-12px}"],changeDetection:0});let t=e;return t})()});function W$i(t,e){t&1&&y(0," Farbe w\xE4hlen ")}function U$i(t,e){if(t&1){let n=re();h(0,"div",0)(1,"div",1),ee(2,"nxt-input",2)(3,"nxt-input",3)(4,"nxt-input",3),p(),h(5,"div",4),ee(6,"nxt-date-picker-2",5)(7,"nxt-date-picker-2",3)(8,"nxt-date-picker-2",3),p(),h(9,"div",6)(10,"div",7),F("click",function(){V(n);let r=w();return B(r.setColorClicked())}),W(11,W$i,1,0),p(),ee(12,"nxt-autocomplete",8),p(),h(13,"div",9)(14,"nxt-multi-from-till",10),F("formChanged",function(){V(n);let r=w();return B(r.formChanged())}),p(),h(15,"nxt-multi-from-till",11),F("formChanged",function(){V(n);let r=w();return B(r.formChanged())}),p(),h(16,"nxt-multi-from-till",12),F("formChanged",function(){V(n);let r=w();return B(r.formChanged())}),p()(),h(17,"nxt-box",13)(18,"div",14),ee(19,"nxt-slide-toggle",3)(20,"nxt-slide-toggle",3)(21,"nxt-slide-toggle",3),p(),h(22,"div",15),ee(23,"nxt-slide-toggle",16)(24,"nxt-time-picker",17),h(25,"div",18),ee(26,"nxt-time-picker",19),h(27,"mat-icon",20),F("click",function(){V(n);let r=w();return B(r.showTimeTrackEndTimeIfMissingInfoClicked())}),y(28,"info"),p()()()(),h(29,"div",21)(30,"nxt-button",22),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(31,"Abbrechen"),p(),h(32,"nxt-button",22),F("click",function(){V(n);let r=w();return B(r.saveClicked())}),y(33,"Speichern"),p()()()}if(t&2){let n=w();g(2),b("disabled",!0)("nxtFormControl",n.form.controls.abbreviation),g(),b("nxtFormControl",n.form.controls.givenName),g(),b("nxtFormControl",n.form.controls.familyName),g(2),b("nxtFormControl",n.form.controls.birthday),g(),b("nxtFormControl",n.form.controls.startDateString),g(),b("nxtFormControl",n.form.controls.endDateString),g(2),mo("background-color",n.form.controls.color.value),g(),Je(n.form.controls.color.value?-1:11),g(),b("options",n.appUsers)("showClearIcon",!0)("nxtFormControl",n.form.controls.appUserUid)("displayWith",n.displayWithAppUser)("displayInOptionWith",n.displayWithAppUser)("filterFields",bn(31,L$i)),g(2),b("isNumber",!0)("nxtFormControl",n.form.controls.hoursPerWeek),g(),b("options",_j(44,G$i,sn(32,O$i,n.DayOfWeek.Monday),sn(34,N$i,n.DayOfWeek.Tuesday),sn(36,V$i,n.DayOfWeek.Wednesday),sn(38,B$i,n.DayOfWeek.Thursday),sn(40,z$i,n.DayOfWeek.Friday),sn(42,H$i,n.DayOfWeek.Saturday)))("multiSelect",!0)("requiredValue",!1)("nxtFormControl",n.form.controls.freeDays),g(),b("isNumber",!0)("nxtFormControl",n.form.controls.holidayCount),g(3),b("nxtFormControl",n.form.controls.doTimeTrack),g(),b("nxtFormControl",n.form.controls.timeTrackOnlyFromStudio),g(),b("nxtFormControl",n.form.controls.seeWorkTime),g(2),b("nxtFormControl",n.form.controls.earliestStartDependOnWorkplace),g(),b("nxtFormControl",n.form.controls.earliestStartTime)("placeholder",n.form.controls.earliestStartDependOnWorkplace.value?"Fr\xFChstens stempeln, wenn nicht geplant":"Fr\xFChstens stempeln"),g(2),b("nxtFormControl",n.form.controls.timeTrackEndTimeIfMissing)}}var L$i,O$i,N$i,V$i,B$i,z$i,H$i,G$i,J9e,l6t=Q(()=>{me();Gi();yi();iF();qn();g2();Jr();Zi();tp();Ci();a3();oo();a6t();pa();Ah();C4();Ly();zn();b9e();Ja();nc();me();E8();L$i=()=>["name"],O$i=t=>({text:"Mo.",value:t}),N$i=t=>({text:"Di.",value:t}),V$i=t=>({text:"Mi.",value:t}),B$i=t=>({text:"Do.",value:t}),z$i=t=>({text:"Fr.",value:t}),H$i=t=>({text:"Sa.",value:t}),G$i=(t,e,n,i,r,s)=>[t,e,n,i,r,s];J9e=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.employees=[],this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.form=new Wl({abbreviation:new Cn("",[],"K\xFCrzel"),givenName:new Cn("",[ii.requiredAndNotNaN],"Name"),familyName:new Cn("",[ii.requiredAndNotNaN],"Nachname"),birthday:new Cn(null,[ii.requiredAndNotNaN],"Geburtstag"),color:new Cn("",[ii.requiredAndNotNaN],"Farbe"),shouldPlanWork:new Cn(null,[],"Dienstplanung"),appUserUid:new Cn(null,[],"Name in der App"),hoursPerWeek:new j_([]),holidayCount:new j_([]),earliestStartTime:new Cn("",[],"Fr\xFChstens stempeln"),timeTrackEndTimeIfMissing:new Cn("",[],"Ausstempeln vergessen, wenn nicht geplant"),timeTrackOnlyFromStudio:new Cn(!1,[],"Stempeln nur im Studio"),seeWorkTime:new Cn(!1,[],"Arbeitsplan in App"),doTimeTrack:new Cn(!1,[],"muss Stempeln"),freeDays:new j_([]),startDateString:new Cn("",[ii.requiredAndNotNaN],"Eintrittsdatum"),endDateString:new Cn("",[],"Austrittsdatum"),earliestStartDependOnWorkplace:new Cn(!1,[],"Fr\xFChstens stempeln 30 min vor geplant")}),this.DisplayWithTools=Qh,this.DateTools=Ie,this.DayOfWeek=Aa,this.displayWithAppUser=r=>r?r.name+" ("+r.loginContext+")":""}ngOnInit(){return O(this,null,function*(){this.appUsers=yield this.socketService.getAppUsers(),this.form.valueChanges.subscribe(()=>{this.formChanged()}),this.pushSocketSubscription=this.socketService.subscribeNew("eventEmployeeChanged",i=>{i.record.id===this.originalEmployee.id&&this.socketService.connectionClientId.value!==i.userContext.connectionClientId&&(this.dialogService.showOk("Der Mitarbeiter wurde eben von "+i.userContext.username+` ge\xE4ndert.
Bitte neu \xF6ffnen`),this.dialogRef.close())})})}calcAbbreviation(){if(this.form.controls.givenName.value&&this.form.controls.familyName.value){let i=(this.form.controls.givenName.value.charAt(0)+this.form.controls.familyName.value).slice(0,3).toUpperCase();this.form.controls.abbreviation.value!==i&&this.form.controls.abbreviation.setValue(i)}}nxtOnDestroy(){}load(i){return O(this,null,function*(){this.dialogService.showLoading("Lade Mitarbeiter"),yield Sr.waitFor(()=>this.appUsers,"load(employeeId)"),i==="new"?this.originalEmployee=q4.getEmpty():(this.originalEmployee=yield this.socketService.getEmployee(i),this.form.controls.abbreviation.disable()),this.setFormFromEmployee(this.originalEmployee),this.dialogService.hideLoading()})}closeClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)){let i=this.getEmployeeFromForm();yield this.socketService.upsertEmployee(i),this.dialogRef.close()}})}getEmployeeFromForm(){let i=ve(ve({},so(this.originalEmployee)),this.form.getRawValue());return i.appUserUid=this.form.controls.appUserUid?.value?.uid||"",i}setFormFromEmployee(i){Is.setForm(this.form,i,{hoursPerWeek:tj.getFormGroup.bind(this),freeDays:tj.getFormGroup.bind(this),holidayCount:tj.getFormGroup.bind(this)}),this.form.controls.appUserUid.setValue(this.appUsers.find(r=>r.uid===i.appUserUid)),this.cdRef.detectChanges()}test(){this.cdRef.detectChanges()}formChanged(){this.calcAbbreviation()}setColorClicked(){return O(this,null,function*(){let i={};this.employees.filter(r=>r.id!==this.originalEmployee.id).forEach(r=>i[r.color]=r.givenName),this.form.controls.color.setValue(yield this.dialogService.showColorPicker("Farbe f\xFCr "+this.form.controls.givenName.value,this.form.controls.color.value,i)),this.cdRef.detectChanges()})}showTimeTrackEndTimeIfMissingInfoClicked(){this.dialogService.showOk("Ist der Mitarbeiter geplant und vergisst auszustempeln, wird die Ende-Zeit auf Plan-Ende gesetzt, ist er nicht geplant wird diese Zeit genommen.")}};e.\u0275fac=function(r){return new(r||e)(R(Jf,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-edit"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","flex-col","gap-4"],[1,"flex","flex-row","gap-3"],[1,"w-[110px]",3,"disabled","nxtFormControl"],[3,"nxtFormControl"],[1,"flex","flex-row","justify-around","gap-4"],["startYear","1990",3,"nxtFormControl"],[1,"flex","flex-row"],[1,"mr-3",2,"width","50px","height","25px","border-radius","4px",3,"click"],[3,"options","showClearIcon","nxtFormControl","displayWith","displayInOptionWith","filterFields"],[1,"mb-4","flex","flex-row","gap-4"],["headerText","Stunden pro Woche","placeholder","Stunden pro Woche",2,"min-width","500px",3,"formChanged","isNumber","nxtFormControl"],["headerText","Freie Tage","placeholder","Freier Tag",2,"min-width","500px",3,"formChanged","options","multiSelect","requiredValue","nxtFormControl"],["headerText","Urlaubstage pro Jahr","placeholder","Urlaubstage pro Jahr",2,"min-width","400px",3,"formChanged","isNumber","nxtFormControl"],["headerText","Stempeln",1,"flex","w-full","flex-row"],[1,"flex","w-1/2","flex-col","items-center","gap-4","pt-2"],[1,"flex","w-1/2","flex-col","items-center"],[1,"mb-3",3,"nxtFormControl"],["width","300px",3,"nxtFormControl","placeholder"],[1,"flex","flex-row","items-center"],["width","300px",3,"nxtFormControl"],[1,"cursor-pointer",3,"click"],[1,"mt-5","flex","flex-row","justify-around","gap-3"],[3,"click"]],template:function(r,s){r&1&&W(0,U$i,34,51,"div",0),r&2&&Je(0)},dependencies:[Yi,Lt,_f,Nn,tj,Ga,cf,Kre,Zr],changeDetection:0});let t=e;return t})()});function j$i(t,e){if(t&1){let n=re();h(0,"div",0)(1,"div",1)(2,"div",0)(3,"table")(4,"tr")(5,"td"),y(6,"1."),p(),h(7,"td"),y(8),p()(),h(9,"tr")(10,"td"),y(11,"2."),p(),h(12,"td"),y(13,"Vollst\xE4ndig bei Telegram anmelden."),p()(),h(14,"tr")(15,"td"),y(16,"3."),p(),h(17,"td"),y(18),p()(),h(19,"tr")(20,"td"),y(21,"4."),p(),h(22,"td"),y(23,"Es \xF6ffnet sich Telegram."),ee(24,"br"),y(25,'Unten ist ein "Start" Button zu sehen, hier muss er/sie drauf klicken.'),p()(),h(26,"tr")(27,"td"),y(28,"5."),p(),h(29,"td"),y(30,"Sobald er Start geklickt hat, schlie\xDFt sich dieses Fenster hier ;)"),p()()()(),h(31,"div",0),ee(32,"qrcode",2),p()(),h(33,"div",3)(34,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.cancelClicked())}),y(35,"Abbrechen"),p()()()}if(t&2){let n=e,i=w();g(8),Ke('Bitte "',n.givenName,'", das er/sie sich Telegram auf dem Handy installiert.'),g(10),Ke('"',n.givenName,'" danach diesen QR-Code scannen lassen.'),g(14),b("qrdata",i.qrCode())("width",300)}}var c6t,d6t=Q(()=>{me();Gi();d2();yi();ji();Zi();il();me();d2();c6t=(()=>{let e=class e extends bt{constructor(){super(),this.qrCode=gt(""),this.employee=gt(null),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogRef=Ve(Gt)}ngOnInit(){this.pushSocketSubscription=this.socketService.subscribeNew("eventEmployeeChanged",i=>O(this,null,function*(){this.employee().id===i.record.id&&i.record.telegramChatId&&this.dialogRef.close()}))}nxtOnDestroy(){}setEmployee(i){return O(this,null,function*(){this.employee.set(yield this.socketService.getEmployee(i)),this.employee()&&this.qrCode.set("https://t.me/nxtlvlink_bot?start="+btoa("Employee:"+this.employee().id))})}cancelClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-telegram-artist-start-chat"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","flex-col"],[1,"flex","flex-row"],["errorCorrectionLevel","M","colorDark","#FFF","colorLight","#2A2A2A",3,"qrdata","width"],[1,"flex","flex-row","justify-center"],[3,"click"]],template:function(r,s){if(r&1&&W(0,j$i,36,4,"div",0),r&2){let o;Je((o=s.employee())?0:-1,o)}},dependencies:[c2,r3,Lt],styles:["table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:10px;vertical-align:baseline}"],changeDetection:0});let t=e;return t})()});var _se,eTe=Q(()=>{me();Gi();Pm();Pa();Qo();Ph();Zi();Am();Ci();l6t();Im();Tf();yi();iF();zn();d6t();oo();Jr();jc();me();ji();_se=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.employees=gt([]),this.cdRef=Ve(Kt),this.dialogService=Ve(vt),this.socketService=Ve(lt),this.columnDefs=[{headerName:"",nxtFieldType:Ee.Icon,nxtIcon:Ir.Material.Edit,nxtOnCellClicked:r=>this.editClicked(r.data)},{headerName:"",nxtFieldType:Ee.Icon,nxtIcon:Ir.Material.History,nxtOnCellClicked:r=>this.historyClicked(r.data)},{headerName:"K\xFCrzel",field:"abbreviation",nxtFieldType:Ee.Text,cellStyle:r=>({backgroundColor:r.data.color})},{headerName:"Name",field:"fullName",nxtFieldType:Ee.Text,cellStyle:r=>{if(r.data.endDateString&&r.data.endDateString.dateParse()<Date.now())return{color:xn.Red}}},{headerName:"Start",field:"startDateString",nxtFieldType:Ee.Date_germanDate},{headerName:"Std / W",valueGetter:r=>q4.getHoursPerWeek(r.data,Ie.formatNowDate(),null),nxtFieldType:Ee.Number},{headerName:"App",valueGetter:r=>!!r.data.appUserUid,nxtFieldType:Ee.Boolean},{headerName:"Stempeln",field:"doTimeTrack",nxtFieldType:Ee.Boolean},{headerName:"Arbeitsplan in App",field:"seeWorkTime",nxtFieldType:Ee.Boolean},{headerName:"Nur im Studio",field:"timeTrackOnlyFromStudio",nxtFieldType:Ee.Boolean},{headerName:"Fr\xFChste Zeit",field:"earliestStartTime",nxtFieldType:Ee.Text,valueFormatter:r=>{let s=[];return r.data.earliestStartDependOnWorkplace&&s.push("30 min vor Arbeit"),r.data.earliestStartTime&&s.push(r.data.earliestStartTime),s.join(" oder ")}},{headerName:"Freier Tag(e)",valueFormatter:r=>q4.getFreeDays(r.data,Ie.formatNowDate()).map(o=>Ie.getDayOfWeekTextShort(o)).join(", ")},{headerName:"Auto Logout",field:"timeTrackEndTimeIfMissing",nxtFieldType:Ee.Text},{headerName:"Telegram",field:"telegramChatId",nxtFieldType:Ee.Text,valueFormatter:r=>r.value?"Ja":"Nein",nxtOnCellClicked:r=>this.connectTelegramClicked(r.data)}],this.showOldEmployees=gt(!1),this.quickFilterText=gt(""),this.employeesFiltered=vr(()=>this.employees().filter(r=>this.showOldEmployees()||!r.endDateString||r.endDateString.dateParse()>Date.now()))}ngOnInit(){this.pushSocketSubscription=this.socketService.subscribeNew("eventEmployeeChanged",i=>{this.load().then()}),this.load().then()}nxtOnDestroy(){}load(){return O(this,null,function*(){this.employees.set((yield this.socketService.getEmployees()).sortString("givenName"))})}newEmployeeClicked(){let i=this.dialogService.showComponentDialog(J9e);i.componentInstance.employees=this.employees(),i.componentInstance.load("new").then()}editClicked(i){let r=this.dialogService.showComponentDialog(J9e);r.componentInstance.employees=this.employees(),r.componentInstance.load(i.id).then()}historyClicked(i){this.dialogService.showHistory("employee",i.id)}connectTelegramClicked(i){this.dialogService.showComponentDialog(c6t).componentInstance.setEmployee(i.id)}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-employees"]],standalone:!0,features:[et,xe],decls:11,vars:8,consts:[[3,"dialogRef"],[3,"click"],["placeholder","Suche",3,"valueChange","noPadding","value","clearIcon"],[1,"whitespace-nowrap",3,"valueChange","value"],[3,"columnDefs","rowData","quickFilterText"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Mitarbeiter"),p(),h(4,"nxt-button",1),F("click",function(){return s.newEmployeeClicked()}),y(5,"Neuer Mitarbeiter"),p(),h(6,"nxt-input",2),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p(),h(7,"nxt-slide-toggle",3),Xe("valueChange",function(a){return Ze(s.showOldEmployees,a)||(s.showOldEmployees=a),a}),y(8,"Alte Mitarbeiter"),p()(),h(9,"nxt-page-content"),ee(10,"nxt-datagrid",4),p()()),r&2&&(g(),b("dialogRef",s.dialogRef),g(5),b("noPadding",!0),qe("value",s.quickFilterText),b("clearIcon",!0),g(),qe("value",s.showOldEmployees),g(3),b("columnDefs",s.columnDefs)("rowData",s.employeesFiltered())("quickFilterText",s.quickFilterText()))},dependencies:[Pl,Yl,Al,Lt,dr,hc,Nn,Yi],changeDetection:0});let t=e;return t})()});function u6t(t,e){let n=Array(t);for(let i=0;i<t;i++)n[i]=e(i);return n}var CJr,xJr,bJr,h6t,p6t=Q(()=>{me();me();CJr=new Ri("mtx-datetime-formats"),xJr=u6t(24,t=>String(t)),bJr=u6t(60,t=>String(t));h6t=(()=>{let e=class e{transform(i){return i instanceof Ma}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"isTemplateRef",type:e,pure:!0,standalone:!0});let t=e;return t})()});function Y$i(t,e){}function q$i(t,e){if(t&1&&W(0,Y$i,0,0,"ng-template",3),t&2){let n=w();b("ngTemplateOutlet",n.message)("ngTemplateOutletContext",sn(2,K$i,n.tooltipContext))}}function Z$i(t,e){if(t&1&&y(0),t&2){let n=w();Ke(" ",n.message," ")}}function m6t(t){return Error(`Tooltip position "${t}" is invalid.`)}function J$i(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var $$i,K$i,X$i,Q$i,eKi,f6t,g6t,tKi,iKi,nKi,rKi,sKi,yS,oKi,jJr,ij=Q(()=>{me();me();ri();Xh();Qf();Qf();p6t();J0();Zg();Wc();Wc();bv();$n();Cl();Th();ng();$$i=["tooltip"],K$i=t=>({$implicit:t});X$i=20;Q$i=new Ri("mtx-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let t=Ve(xl);return()=>t.scrollStrategies.reposition({scrollThrottle:X$i})}});eKi=new Ri("mtx-tooltip-default-options",{providedIn:"root",factory:J$i}),f6t="tooltip-panel",g6t=Sh({passive:!0}),tKi=500,iKi=8,nKi=8,rKi=24,sKi=200,yS=(()=>{let e=class e{get position(){return this._position}set position(i){i!==this._position&&(this._position=i,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(i){this._positionAtOrigin=Y2(i),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(i){this._disabled=Y2(i),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(i){this._showDelay=Q0(i)}get hideDelay(){return this._hideDelay}set hideDelay(i){this._hideDelay=Q0(i),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(i){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=i instanceof Ma?i:i!=null?`${i}`.trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipContext(){return this._tooltipContext}set tooltipContext(i){this._tooltipContext=i,this._setTooltipContext(this._tooltipContext)}get tooltipClass(){return this._tooltipClass}set tooltipClass(i){this._tooltipClass=i,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(i,r,s,o,a,l,c,d,u,m,f,_){this._overlay=i,this._elementRef=r,this._scrollDispatcher=s,this._viewContainerRef=o,this._ngZone=a,this._platform=l,this._ariaDescriber=c,this._focusMonitor=d,this._dir=m,this._defaultOptions=f,this._overlayRef=null,this._tooltipInstance=null,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=oKi,this._viewportMargin=8,this._cssClassPrefix="mtx-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Mi,this._scrollStrategy=u,this._document=_,f&&(this._showDelay=f.showDelay,this._hideDelay=f.hideDelay,f.position&&(this.position=f.position),f.positionAtOrigin&&(this.positionAtOrigin=f.positionAtOrigin),f.touchGestures&&(this.touchGestures=f.touchGestures)),m.change.pipe(Mr(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=iKi}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Mr(this._destroyed)).subscribe(i=>{i?i==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let i=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([r,s])=>{i.removeEventListener(r,s,g6t)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(i,this.message,"tooltip"),this._focusMonitor.stopMonitoring(i)}show(i=this.showDelay,r){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let s=this._createOverlay(r);this._detach(),this._portal=this._portal||new e2(this._tooltipComponent,this._viewContainerRef);let o=this._tooltipInstance=s.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(Mr(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._setTooltipContext(this._tooltipContext),this._updateTooltipMessage(),o.show(i)}hide(i=this.hideDelay){let r=this._tooltipInstance;r&&(r.isVisible()?r.hide(i):(r._cancelPendingAnimations(),this._detach()))}toggle(i){this._isTooltipVisible()?this.hide():this.show(void 0,i)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(i){if(this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!i)&&o._origin instanceof fi)return this._overlayRef;this._detach()}let r=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),s=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin?i||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(r);return s.positionChanges.pipe(Mr(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:s,panelClass:`${this._cssClassPrefix}-${f6t}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Mr(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Mr(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Mr(this._destroyed)).subscribe(o=>{this._isTooltipVisible()&&o.keyCode===27&&!Pc(o)&&(o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(i){let r=i.getConfig().positionStrategy,s=this._getOrigin(),o=this._getOverlayPosition();r.withPositions([this._addOffset(ve(ve({},s.main),o.main)),this._addOffset(ve(ve({},s.fallback),o.fallback))])}_addOffset(i){let r=nKi,s=!this._dir||this._dir.value=="ltr";return i.originY==="top"?i.offsetY=-r:i.originY==="bottom"?i.offsetY=r:i.originX==="start"?i.offsetX=s?-r:r:i.originX==="end"&&(i.offsetX=s?r:-r),i}_getOrigin(){let i=!this._dir||this._dir.value=="ltr",r=this.position,s;if(r=="above"||r=="below")s={originX:"center",originY:r=="above"?"top":"bottom"};else if(r=="before"||r=="left"&&i||r=="right"&&!i)s={originX:"start",originY:"center"};else if(r=="after"||r=="right"&&i||r=="left"&&!i)s={originX:"end",originY:"center"};else throw m6t(r);let{x:o,y:a}=this._invertPosition(s.originX,s.originY);return{main:s,fallback:{originX:o,originY:a}}}_getOverlayPosition(){let i=!this._dir||this._dir.value=="ltr",r=this.position,s;if(r=="above")s={overlayX:"center",overlayY:"bottom"};else if(r=="below")s={overlayX:"center",overlayY:"top"};else if(r=="before"||r=="left"&&i||r=="right"&&!i)s={overlayX:"end",overlayY:"center"};else if(r=="after"||r=="right"&&i||r=="left"&&!i)s={overlayX:"start",overlayY:"center"};else throw m6t(r);let{x:o,y:a}=this._invertPosition(s.overlayX,s.overlayY);return{main:s,fallback:{overlayX:o,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(ic(1),Mr(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipContext(i){this._tooltipInstance&&(this._tooltipInstance.tooltipContext=i,this._tooltipInstance._markForCheck())}_setTooltipClass(i){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=i,this._tooltipInstance._markForCheck())}_invertPosition(i,r){return this.position==="above"||this.position==="below"?r==="top"?r="bottom":r==="bottom"&&(r="top"):i==="end"?i="start":i==="start"&&(i="end"),{x:i,y:r}}_updateCurrentPositionClass(i){let{overlayY:r,originX:s,originY:o}=i,a;if(r==="center"?this._dir&&this._dir.value==="rtl"?a=s==="end"?"left":"right":a=s==="start"?"left":"right":a=r==="bottom"&&o==="top"?"above":"below",a!==this._currentPosition){let l=this._overlayRef;if(l){let c=`${this._cssClassPrefix}-${f6t}-`;l.removePanelClass(c+this._currentPosition),l.addPanelClass(c+a)}this._currentPosition=a}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",i=>{this._setupPointerExitEventsIfNeeded();let r;i.x!==void 0&&i.y!==void 0&&(r=i),this.show(void 0,r)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",i=>{let r=i.targetTouches?.[0],s=r?{x:r.clientX,y:r.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,s),tKi)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let i=[];if(this._platformSupportsMouseEvents())i.push(["mouseleave",r=>{let s=r.relatedTarget;(!s||!this._overlayRef?.overlayElement.contains(s))&&this.hide()}],["wheel",r=>this._wheelListener(r)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let r=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};i.push(["touchend",r],["touchcancel",r])}this._addListeners(i),this._passiveListeners.push(...i)}_addListeners(i){i.forEach(([r,s])=>{this._elementRef.nativeElement.addEventListener(r,s,g6t)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(i){if(this._isTooltipVisible()){let r=this._document.elementFromPoint(i.clientX,i.clientY),s=this._elementRef.nativeElement;r!==s&&!s.contains(r)&&this.hide()}}_disableNativeGesturesIfNecessary(){let i=this.touchGestures;if(i!=="off"){let r=this._elementRef.nativeElement,s=r.style;(i==="on"||r.nodeName!=="INPUT"&&r.nodeName!=="TEXTAREA")&&(s.userSelect=s.msUserSelect=s.webkitUserSelect=s.MozUserSelect="none"),(i==="on"||!r.draggable)&&(s.webkitUserDrag="none"),s.touchAction="none",s.webkitTapHighlightColor="transparent"}}};e.\u0275fac=function(r){return new(r||e)(R(xl),R(fi),R(T8),R(Na),R(pn),R(Oo),R(c$),R(qp),R(Q$i),R(Va),R(eKi,8),R(Lr))},e.\u0275dir=mi({type:e,selectors:[["","mtxTooltip",""]],hostAttrs:[1,"mtx-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(r,s){r&2&&ki("mtx-mdc-tooltip-disabled",s.disabled)},inputs:{position:[0,"mtxTooltipPosition","position"],positionAtOrigin:[0,"mtxTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"mtxTooltipDisabled","disabled"],showDelay:[0,"mtxTooltipShowDelay","showDelay"],hideDelay:[0,"mtxTooltipHideDelay","hideDelay"],touchGestures:[0,"mtxTooltipTouchGestures","touchGestures"],message:[0,"mtxTooltip","message"],tooltipContext:[0,"mtxTooltipContext","tooltipContext"],tooltipClass:[0,"mtxTooltipClass","tooltipClass"]},exportAs:["mtxTooltip"],standalone:!0});let t=e;return t})(),oKi=(()=>{let e=class e{constructor(i,r,s){this._changeDetectorRef=i,this._elementRef=r,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Mi,this._showAnimation="mtx-mdc-tooltip-show",this._hideAnimation="mtx-mdc-tooltip-hide",this._animationsDisabled=s==="NoopAnimations"}show(i){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},i)}hide(i){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},i)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:i}){(!i||!this._triggerElement.contains(i))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let i=this._elementRef.nativeElement.getBoundingClientRect();return i.height>rKi&&i.width>=sKi}_handleAnimationEnd({animationName:i}){(i===this._showAnimation||i===this._hideAnimation)&&this._finalizeAnimation(i===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(i){i?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(i){let r=this._tooltip.nativeElement,s=this._showAnimation,o=this._hideAnimation;if(r.classList.remove(i?o:s),r.classList.add(i?s:o),this._isVisible=i,i&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(r);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}i&&this._onShow(),this._animationsDisabled&&(r.classList.add("_mtx-animation-noopable"),this._finalizeAnimation(i))}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(fi),R(Ic,8))},e.\u0275cmp=_e({type:e,selectors:[["mtx-tooltip-component"]],viewQuery:function(r,s){if(r&1&&ei($$i,7),r&2){let o;Pt(o=Rt())&&(s._tooltip=o.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(r,s){r&1&&F("mouseleave",function(a){return s._handleMouseLeave(a)}),r&2&&mo("zoom",s.isVisible()?1:null)},standalone:!0,features:[xe],decls:6,vars:6,consts:[["tooltip",""],[1,"mdc-tooltip","mdc-tooltip--shown","mtx-mdc-tooltip",3,"animationend","ngClass"],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1,0),F("animationend",function(l){return V(o),B(s._handleAnimationEnd(l))}),h(2,"div",2),W(3,q$i,1,4,null,3),Ce(4,"isTemplateRef"),W(5,Z$i,1,1),p()()}r&2&&(ki("mdc-tooltip--multiline",s._isMultiline),b("ngClass",s.tooltipClass),g(3),Je(tt(4,4,s.message)?3:5))},dependencies:[_s,rf,h6t],styles:[`.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip--showing-transition .mdc-tooltip__surface-animation{transition:opacity .15s 0ms cubic-bezier(0,0,.2,1),transform .15s 0ms cubic-bezier(0,0,.2,1)}.mdc-tooltip--hide-transition .mdc-tooltip__surface-animation{transition:opacity 75ms 0ms cubic-bezier(.4,0,1,1)}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface:before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface:before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:184px;margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:304px;align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;outline:1px solid transparent;z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mtx-mdc-tooltip .mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color)}.mtx-mdc-tooltip .mdc-tooltip__surface,.mtx-mdc-tooltip .mdc-tooltip__caret-surface-top,.mtx-mdc-tooltip .mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape)}.mtx-mdc-tooltip .mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color)}.mtx-mdc-tooltip .mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font);line-height:var(--mdc-plain-tooltip-supporting-text-line-height);font-size:var(--mdc-plain-tooltip-supporting-text-size);font-weight:var(--mdc-plain-tooltip-supporting-text-weight);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking)}.mdc-tooltip.mat-mdc-tooltip,.mdc-tooltip.mtx-mdc-tooltip{position:relative}.mtx-mdc-tooltip{position:relative;transform:scale(0)}.mtx-mdc-tooltip:before{content:"";inset:0;z-index:-1;position:absolute}.mtx-mdc-tooltip-panel-below .mtx-mdc-tooltip:before{top:-8px}.mtx-mdc-tooltip-panel-above .mtx-mdc-tooltip:before{bottom:-8px}.mtx-mdc-tooltip-panel-right .mtx-mdc-tooltip:before{left:-8px}.mtx-mdc-tooltip-panel-left .mtx-mdc-tooltip:before{right:-8px}.mtx-mdc-tooltip._mtx-animation-noopable{animation:none;transform:scale(1)}.mtx-mdc-tooltip-panel.mtx-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mtx-mdc-tooltip-show{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes mtx-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}.mtx-mdc-tooltip-show{animation:mtx-mdc-tooltip-show .15s cubic-bezier(0,0,.2,1) forwards}.mtx-mdc-tooltip-hide{animation:mtx-mdc-tooltip-hide 75ms cubic-bezier(.4,0,1,1) forwards}
`],encapsulation:2,changeDetection:0});let t=e;return t})(),jJr={tooltipState:Nd("state",[bc("initial, void, hidden",So({opacity:0,transform:"scale(0.8)"})),bc("visible",So({transform:"scale(1)"})),cl("* => visible",Ml("150ms cubic-bezier(0, 0, 0.2, 1)")),cl("* => hidden",Ml("75ms cubic-bezier(0.4, 0, 1, 1)"))])}});function aKi(t,e){if(t&1&&(h(0,"div",2)(1,"div",3),y(2),Ce(3,"nxtDate"),p()()),t&2){let n=w();g(),ki("offset",!n.isFirstTimeLabel())("first-time-label",n.isFirstTimeLabel()),g(),ye(Nt(3,5,n.date(),"HH"))}}function lKi(t,e){if(t&1&&(h(0,"div",7),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w(2);g(),ye(Nt(2,1,n.date(),"dd.MM.yyyy"))}}function cKi(t,e){if(t&1&&(h(0,"div",7),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w(2);g(),ye(Nt(2,1,n.date(),"dd.MM"))}}function dKi(t,e){if(t&1&&(h(0,"div",6),y(1),Ce(2,"fromNowText"),p()),t&2){let n=w(2);g(),ye(Nt(2,1,n.date(),!0))}}function uKi(t,e){if(t&1&&(h(0,"div",4)(1,"div",5)(2,"div",6),y(3),Ce(4,"nxtDate"),p(),W(5,lKi,3,4,"div",7)(6,cKi,3,4,"div",7)(7,dKi,3,4,"div",8),p(),h(8,"div",9),y(9),Ce(10,"nxtDate"),p()()),t&2){let n=w();g(3),ye(Nt(4,4,n.date(),"EEEE")),g(2),Je(n.showYear()?5:6),g(2),b("ngIf",n.showFromNowText()),g(2),ye(Nt(10,7,n.date(),"HH:mm"))}}var Cse,nj=Q(()=>{me();Gi();ri();go();ij();B1();zn();me();Cse=(()=>{let e=class e extends bt{constructor(){super(),this.isTimeLabel=br.required(),this.dayStartHour=br.required(),this.daysInWeek=br.required(),this.daysCount=br.required(),this.date=br.required(),this.segmentHeight=br.required(),this.isStart=br.required(),this.cssClass=br.required(),this.disableTooltip=br(!1),this.showFromNowText=vr(()=>Ie.parse(this.date())<Date.now().dateAddDays(30)),this.isFirstTimeLabel=vr(()=>this.dayStartHour()===parseInt(this.date().dateFormat("HH"),10)),this.isFullHour=vr(()=>this.date().dateFormat("mm")==="00"),this.showYear=vr(()=>Ie.parse(this.date()).dateFormat("yyyy")!==Date.now().dateFormat("yyyy")),this.isToday=gt(!1)}ngOnInit(){this.isToday.set(Ie.isToday(this.date()))}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-hour-segment"]],inputs:{isTimeLabel:[1,"isTimeLabel"],dayStartHour:[1,"dayStartHour"],daysInWeek:[1,"daysInWeek"],daysCount:[1,"daysCount"],date:[1,"date"],segmentHeight:[1,"segmentHeight"],isStart:[1,"isStart"],cssClass:[1,"cssClass"],disableTooltip:[1,"disableTooltip"]},standalone:!0,features:[et,xe],decls:4,vars:13,consts:[["tooltipTemplate",""],["mtxTooltipPosition","after","mtxTooltipClass","mat-tooltip-offset-right",1,"nxt-calendar-hour",3,"mtxTooltip","mtxTooltipDisabled","mtxTooltipPositionAtOrigin","ngClass"],[1,"w-[70px]","flex","flex-col","justify-start","items-center","!p-0","text-color"],[1,"time-label"],[1,"flex","flex-col","justify-center","items-center","text","whitespace-nowrap"],[1,"flex","flex-col"],[1,"text-70"],[1,"font-bold","text-130"],["class","text-70",4,"ngIf"],[1,"text-160","font-bold"]],template:function(r,s){if(r&1&&(h(0,"div",1),W(1,aKi,4,8,"div",2),p(),W(2,uKi,11,10,"ng-template",null,0,Cc)),r&2){let o=pr(3);mo("height",s.segmentHeight(),"px"),ki("mark-on-hover",!s.isTimeLabel()||s.daysCount()===1)("mouse-pointer",!s.isTimeLabel()||s.daysCount()===1)("today",!s.isTimeLabel()&&s.isToday()),b("mtxTooltip",!s.isTimeLabel()||s.daysCount()===1?o:"")("mtxTooltipDisabled",s.disableTooltip())("mtxTooltipPositionAtOrigin",s.daysCount()===1)("ngClass",s.cssClass()),g(),Je(s.isTimeLabel()&&s.isFullHour()?1:-1)}},dependencies:[_s,Hn,Ct,yS,ld],styles:[".time-label[_ngcontent-%COMP%]{padding:0 3px;position:relative}.time-label.first-time-label[_ngcontent-%COMP%]{top:-5px}.time-label.offset[_ngcontent-%COMP%]{top:-14px;background-color:#404040}"],changeDetection:0});let t=e;return t})()});function mKi(t,e){if(t&1&&(h(0,"mat-button-toggle",17),y(1),p()),t&2){let n=e.$implicit;b("value",n.value),g(),ye(n.text)}}function fKi(t,e){if(t&1&&(h(0,"div")(1,"mat-button-toggle-group",4),Kn(2,mKi,2,2,"mat-button-toggle",17,hKi),p()(),h(4,"div",18)(5,"mat-button-toggle-group",19)(6,"mat-button-toggle",20),y(7,"Backoffice"),p(),h(8,"mat-button-toggle",21),y(9,"WhatsApp"),p(),h(10,"mat-button-toggle",22),y(11,"WhatsApp Franchise"),p(),h(12,"mat-button-toggle",23),y(13,"Theke"),p(),h(14,"mat-button-toggle",24),y(15,"Handwerk"),p(),h(16,"mat-button-toggle",25),y(17,"Piercing"),p(),h(18,"mat-button-toggle",26),y(19,"Terminbewertung"),p()()()),t&2){let n=w(2);g(),b("formControl",n.form.controls.studio),g(),Yn(n.studioOptions()),g(3),b("multiple",!0)("formControl",n.form.controls.workplaces)}}function gKi(t,e){if(t&1){let n=re();h(0,"div",14)(1,"nxt-checkbox",27),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.selectedDates[0],r)||(s.selectedDates[0]=r),B(r)}),p(),h(2,"nxt-checkbox",28),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.selectedDates[1],r)||(s.selectedDates[1]=r),B(r)}),p(),h(3,"nxt-checkbox",29),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.selectedDates[2],r)||(s.selectedDates[2]=r),B(r)}),p(),h(4,"nxt-checkbox",30),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.selectedDates[3],r)||(s.selectedDates[3]=r),B(r)}),p(),h(5,"nxt-checkbox",31),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.selectedDates[4],r)||(s.selectedDates[4]=r),B(r)}),p(),h(6,"nxt-checkbox",32),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.selectedDates[5],r)||(s.selectedDates[5]=r),B(r)}),p(),h(7,"nxt-checkbox",33),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.selectedDates[6],r)||(s.selectedDates[6]=r),B(r)}),p()()}if(t&2){let n=w(2);g(),qe("value",n.selectedDates[0]),g(),qe("value",n.selectedDates[1]),g(),qe("value",n.selectedDates[2]),g(),qe("value",n.selectedDates[3]),g(),qe("value",n.selectedDates[4]),g(),qe("value",n.selectedDates[5]),g(),qe("value",n.selectedDates[6])}}function vKi(t,e){if(t&1){let n=re();h(0,"div")(1,"div",0),y(2),Ce(3,"nxtDate"),p(),h(4,"div",1),ee(5,"nxt-autocomplete",2),Ce(6,"async"),p(),h(7,"div",3)(8,"div")(9,"mat-button-toggle-group",4)(10,"mat-button-toggle",5),y(11,"Arbeit"),p(),h(12,"mat-button-toggle",6),y(13,"Urlaub"),p(),h(14,"mat-button-toggle",7),y(15,"Frei"),p(),h(16,"mat-button-toggle",8),y(17,"Krank"),p()()(),W(18,fKi,20,3),p(),h(19,"div",9)(20,"div",10),ee(21,"nxt-time-picker",11),h(22,"nxt-button",12),F("click",function(){V(n);let r=w();return B(r.setTime("10:00","18:00"))}),y(23,"10:00 - 18:00"),p(),h(24,"nxt-button",12),F("click",function(){V(n);let r=w();return B(r.setTime("11:00","20:00"))}),y(25,"11:00 - 20:00"),p(),ee(26,"nxt-time-picker",11),p(),h(27,"div",10)(28,"nxt-button",13),F("click",function(){V(n);let r=w();return B(r.setTime("11:00","15:30"))}),y(29,"11:00 - 15:30"),p(),h(30,"nxt-button",13),F("click",function(){V(n);let r=w();return B(r.setTime("15:30","20:00"))}),y(31,"15:30 - 20:00"),p()(),W(32,gKi,8,7,"div",14),p(),h(33,"div",15)(34,"nxt-button",16),F("click",function(){V(n);let r=w();return B(r.closeClicked())}),y(35,"Abbrechen"),p(),h(36,"nxt-button",16),F("click",function(){V(n);let r=w();return B(r.deleteClicked())}),y(37,"L\xF6schen"),p(),h(38,"nxt-button",16),F("click",function(){V(n);let r=w();return B(r.saveClicked())}),y(39,"Speichern"),p()()()}if(t&2){let n=w();g(2),ye(Nt(3,15,n.originalEmployeeEvent.dateString,"EEEE dd.MM.yyyy")),g(3),b("nxtFormControl",n.form.controls.employee)("filterFields",bn(20,pKi))("displayInOptionWith",n.displayWithEmployee)("displayWith",n.displayWithEmployee)("options",tt(6,18,n.employees)),g(4),b("formControl",n.form.controls.type),g(9),Je(n.form.controls.type.value==="work"?18:-1),g(3),b("nxtFormControl",n.form.controls.startTime),g(),b("smallButton",!0),g(2),b("smallButton",!0),g(2),b("nxtFormControl",n.form.controls.endTime),g(2),b("smallButton",!0),g(2),b("smallButton",!0),g(2),Je(n.originalEmployeeEvent&&!n.originalEmployeeEvent.id?32:-1)}}var hKi,pKi,tTe,v6t=Q(()=>{me();Gi();qn();g2();o1();Ah();ri();th();Ly();tp();iF();zn();Zi();yi();i6();Ci();nc();Cs();mg();go();Cl();me();E8();qn();hKi=(t,e)=>e.value,pKi=()=>["fullName","id"];tTe=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.selectedDates={},this.studioOptions=gt([]),this.cdRef=Ve(Kt),this.cacheService=Ve(cc),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.configService=Ve(Xi),this.form=new Wl({id:new Cn("",[],"ID"),employee:new Cn(null,[ii.hasProperty("id")],"Mitarbeiter"),dateString:new Cn(null,[ii.requiredAndNotNaN],"Datum"),startTime:new Cn(null,[ii.requiredAndNotNaN],"Start"),endTime:new Cn(null,[ii.requiredAndNotNaN],"Ende"),type:new Cn(null,[ii.requiredAndNotNaN],"Typ"),studio:new Cn(null,[ii.requiredAndNotNaN],"Studio"),workplaces:new Cn([],[ii.requiredAndNotNaN],"Arbeitsplatz")}),this.displayWithEmployee=r=>r?r.abbreviation+" - "+r.fullName:"",this.employees=this.cacheService.employees.pipe(lr(r=>r.filter(s=>!s.hasLeft)))}ngOnInit(){this.configService.config.value.studioRegion==="AC"?this.studioOptions.set([{text:"Aachen",value:"ac"},{text:"D\xFCsseldorf",value:"du"}]):this.configService.config.value.studioRegion==="MA"&&this.studioOptions.set([{text:"Mallorca",value:"ma"}]),this.registerChangeListener()}nxtOnDestroy(){}new(i,r){this.originalEmployeeEvent=q4.getEmptyEmployeeEvent(),this.originalEmployeeEvent.dateString=i,this.originalEmployeeEvent.start=(i+" "+r).dateParse(),this.setForm()}load(i){return O(this,null,function*(){this.originalEmployeeEvent=yield this.socketService.getEmployeeEvent(i),this.originalEmployeeEvent&&this.setForm()})}setForm(){return O(this,null,function*(){yield this.cacheService.waitForEmployees(),Is.setForm(this.form,{employee:this.cacheService.employees.value.find(i=>i.id===this.originalEmployeeEvent.employeeId),dateString:this.originalEmployeeEvent.dateString,startTime:this.originalEmployeeEvent.start>0?this.originalEmployeeEvent.start.dateFormat("HH:mm"):null,endTime:this.originalEmployeeEvent.end>0?this.originalEmployeeEvent.end.dateFormat("HH:mm"):null,type:this.originalEmployeeEvent.type,studio:this.originalEmployeeEvent.studio,workplaces:this.originalEmployeeEvent.workplaces}),this.originalEmployeeEvent.id||(this.selectedDates[Ie.getDayOfWeek(this.originalEmployeeEvent.dateString)]=!0),this.cdRef.detectChanges()})}getFromForm(){let i=St(ve({},this.originalEmployeeEvent),{employeeId:this.form.controls.employee.value.id,start:Ie.parse(this.originalEmployeeEvent.dateString+" "+this.form.controls.startTime.value+":00"),end:Ie.parse(this.originalEmployeeEvent.dateString+" "+this.form.controls.endTime.value+":00"),dateString:this.form.controls.dateString.value,type:this.form.controls.type.value,studio:this.form.controls.studio.value,workplaces:this.form.controls.workplaces.value});return i.end<i.start&&(i.end=i.end.dateAddDays(1)),i}saveClicked(){return O(this,null,function*(){if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)){let i=this.getFromForm();if(this.originalEmployeeEvent.id)yield this.socketService.upsertEmployeeEvent(i);else{let r=i.dateString,s=Ie.getDayOfWeek(i.dateString);for(let o=Aa.Monday;o<=Aa.Sunday;o++)this.selectedDates[o]&&(i.dateString=r.dateAddDays(o-s).dateFormatDate(),i.start=Ie.parse(i.dateString+" "+this.form.controls.startTime.value+":00"),i.end=Ie.parse(i.dateString+" "+this.form.controls.endTime.value+":00"),yield this.socketService.upsertEmployeeEvent(i))}this.dialogRef.close()}})}setTime(i,r){this.form.controls.startTime.setValue(i),this.form.controls.endTime.setValue(r)}closeClicked(){this.dialogRef.close()}deleteClicked(){return O(this,null,function*(){(yield this.dialogService.showYesNo("L\xF6schen?"))&&(this.socketService.deleteEmployeeEvent(this.originalEmployeeEvent.id),this.dialogRef.close())})}registerChangeListener(){this.form.controls.type.valueChanges.subscribe(i=>{this.form.controls.studio.setErrors(null),this.form.controls.workplaces.setErrors(null),this.form.controls.studio.setValidators(this.form.controls.type.value==="work"?[ii.requiredAndNotNaN]:[]),this.form.controls.workplaces.setValidators(this.form.controls.type.value==="work"?[ii.requiredAndNotNaN]:[]),i!=="work"&&(this.form.controls.studio.setValue(null),this.form.controls.workplaces.setValue([]))})}};e.\u0275fac=function(r){return new(r||e)(R(Jf,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-event-edit"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","w-full","flex-row","justify-center"],[1,"flex","flex-row"],[3,"nxtFormControl","filterFields","displayInOptionWith","displayWith","options"],[1,"mt-2","mb-5","flex","flex-col","items-center","justify-center","gap-3"],[3,"formControl"],["value","work"],["value","holiday"],["value","notHere",1,"leading-none"],["value","sick"],[1,"flex","w-full","flex-col","justify-around"],[1,"flex","flex-row","justify-around"],[3,"nxtFormControl"],[1,"self-center",3,"click","smallButton"],[3,"click","smallButton"],[1,"flex","w-full","flex-row","justify-center","gap-4","pt-3"],[1,"mt-5","flex","flex-row","justify-between","gap-3"],[3,"click"],[3,"value"],[1,"pr-1"],[3,"multiple","formControl"],["value","backoffice"],["value","whatsapp"],["value","whatsappFranchise"],["value","reception"],["value","craft"],["value","piercing"],["value","eventRating"],["label","Mo",3,"valueChange","value"],["label","Di",3,"valueChange","value"],["label","Mi",3,"valueChange","value"],["label","Do",3,"valueChange","value"],["label","Fr",3,"valueChange","value"],["label","Sa",3,"valueChange","value"],["label","So",3,"valueChange","value"]],template:function(r,s){r&1&&W(0,vKi,40,21,"div"),r&2&&Je(s.originalEmployeeEvent?0:-1)},dependencies:[Ga,Xu,cf,Lt,Dm,nm,Ia,Ko,$c,H1,Hn],styles:["[_nghost-%COMP%]  mat-button-toggle button{height:100%}"],changeDetection:0});let t=e;return t})()});function CKi(t,e){t&1&&(h(0,"div",3),y(1,"\u{1F3E0} in der Wohnung"),p())}var yKi,_Ki,y6t,xse=Q(()=>{me();Gi();go();zn();ri();jc();me();yKi=t=>({borderColor:t}),_Ki=(t,e)=>({backgroundColor:t,color:e});y6t=(()=>{let e=class e extends bt{constructor(i){super(),this.cdRef=i,this.artistColor="",this.untilText=gt(""),this.color=""}ngOnInit(){}nxtOnDestroy(){}ngOnChanges(i){i.artistSpot&&(this.artistSpot.start<Date.now()&&this.artistSpot.end>Date.now()?Ie.dayDiff(this.artistSpot.end,this.artistSpot.start)<=30&&this.untilText.set("noch "+Ie.dayDiff(this.artistSpot.end,this.artistSpot.start)+" Tage da"):this.artistSpot.start>Date.now()?this.untilText.set("reist "+Ie.dateDiffToNowOnlyDaysText(this.artistSpot.start)+" an"):this.artistSpot.start===this.artistSpot.end&&this.untilText.set("nur heute")),i.artistColor&&(this.color=xn.getLightOrDarkFontColorByBackground(i.artistColor.currentValue))}};e.\u0275fac=function(r){return new(r||e)(R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-artist-spot-tooltip"]],inputs:{artistSpot:"artistSpot",artistColor:"artistColor"},standalone:!0,features:[et,yn,xe],decls:11,vars:18,consts:[[1,"tooltip","flex","flex-col","justify-center","items-center",3,"ngStyle"],[1,"artist",3,"ngStyle"],[1,"content"],[1,"text-80"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),y(2),p(),h(3,"div",2)(4,"div"),y(5),Ce(6,"nxtDate"),Ce(7,"nxtDate"),p(),h(8,"div",3),y(9),p(),W(10,CKi,2,0,"div",3),p()()),r&2&&(b("ngStyle",sn(13,yKi,s.artistColor)),g(),b("ngStyle",bs(15,_Ki,s.artistColor,s.color)),g(),ye(s.artistSpot.artist),g(3),cn("",Nt(6,7,s.artistSpot.start,"dd.MM.yyyy")," - ",Nt(7,10,s.artistSpot.end,"dd.MM.yyyy"),""),g(4),ye(s.untilText()),g(),Je(s.artistSpot.artistIsInApartment?10:-1))},dependencies:[Hn,rr],styles:["[_nghost-%COMP%]{font-size:140%;line-height:1.2;display:flex;border-radius:7px;color:#bbb;background-color:#404040}[_nghost-%COMP%]   .tooltip[_ngcontent-%COMP%]{border-radius:4px;border:3px solid #fff}[_nghost-%COMP%]   .tooltip[_ngcontent-%COMP%]   .artist[_ngcontent-%COMP%]{width:100%;padding:3px}[_nghost-%COMP%]   .tooltip[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:5px 10px}"],changeDetection:0});let t=e;return t})()});function bKi(t,e){t&1&&y(0," \u{1F3E0} ")}function wKi(t,e){if(t&1&&(h(0,"div"),ee(1,"nxt-calendar-artist-spot-tooltip",4),p()),t&2){let n=w();g(),b("artistSpot",n.event().meta.artistSpot)("artistColor",n.event().color.primary)}}var xKi,_6t,iTe=Q(()=>{me();Gi();ij();ri();jc();xse();me();xKi=(t,e)=>({color:t,backgroundColor:e});_6t=(()=>{let e=class e extends bt{constructor(){super(),this.event=br.required(),this.textColor=vr(()=>this.event().color?.primary?xn.getLightOrDarkFontColorByBackground(this.event().color.primary):""),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-artist-spot"]],inputs:{event:[1,"event"]},standalone:!0,features:[et,xe],decls:6,vars:8,consts:[["tooltipTemplate",""],["mtxTooltipClass","no-style mat-tooltip-width-content mat-tooltip-offset-right","mtxTooltipPosition","after","tabindex","0","role","application",1,"event-all-day",3,"mtxTooltip","mtxTooltipPositionAtOrigin","ngStyle"],[1,"flex","flex-row",2,"word-wrap","break-word","text-wrap","initial","line-height","1"],[3,"innerHTML"],[3,"artistSpot","artistColor"]],template:function(r,s){if(r&1&&(h(0,"div",1)(1,"div",2),ee(2,"div",3),W(3,bKi,1,0),p()(),W(4,wKi,2,2,"ng-template",null,0,Cc)),r&2){let o,a=pr(5);b("mtxTooltip",a)("mtxTooltipPositionAtOrigin",!0)("ngStyle",bs(5,xKi,s.textColor(),(o=s.event().color)==null?null:o.primary)),g(2),b("innerHTML",s.event().title,Pi),g(),Je(s.event().meta.artistSpot.artistIsInApartment?3:-1)}},dependencies:[yS,rr,y6t],styles:[".event-all-day[_ngcontent-%COMP%]{padding-left:4px;border-bottom:1px solid #404040!important;height:15px;font-size:70%;width:100%;overflow:hidden;display:flex;flex-direction:row;align-items:center}"],changeDetection:0});let t=e;return t})()});var C6t,x6t=Q(()=>{me();od();z1();C6t=(()=>{let e=class e{constructor(i,r){this.sanitizer=i,this.bodyPutService=r}transform(i,r=""){return r+this.bodyPutService.getTextFromEvent(i).join("<br/>"+r)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16),R(Oc,16))},e.\u0275pipe=kr({name:"calendarBodyPuts",type:e,pure:!0,standalone:!0});let t=e;return t})()});function DKi(t,e){if(t&1&&(h(0,"div",5),y(1),Ce(2,"fromNowText2"),p()),t&2){let n=w();g(),Ke("erstellt: ",tt(2,1,n.event.createdAt),"")}}function EKi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p()),t&2){let n=w();g(),Ke("fix ",tt(2,1,n.event.priceEstimatedFrom),"")}}function MKi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),Ce(3,"money"),p()),t&2){let n=w(2);g(),cn("",tt(2,2,n.event.priceEstimatedFrom)," bis ",tt(3,4,n.event.priceEstimatedTill),"")}}function kKi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p()),t&2){let n=w(2);g(),Ke("ca. ",tt(2,1,n.event.priceEstimatedFrom),"")}}function IKi(t,e){if(t&1&&W(0,MKi,4,6,"div")(1,kKi,3,3,"div"),t&2){let n=w();Je(n.event.priceEstimatedTill?0:1)}}function AKi(t,e){if(t&1&&(h(0,"div",8)(1,"div",12),y(2),p()()),t&2){let n=w();g(2),ye(n.event.importantInfo)}}function PKi(t,e){if(t&1&&(h(0,"div",9),y(1),p()),t&2){let n=w();g(),Ke("Absagegrund: ",n.event.canceledReason,"")}}var SKi,TKi,b6t,bse=Q(()=>{Gi();x6t();Il();go();An();ri();jc();gX();wz();me();An();SKi=(t,e)=>({backgroundColor:t,color:e}),TKi=t=>({borderColor:t});b6t=(()=>{let e=class e extends bt{constructor(i){super(),this.cdRef=i,this.artistColor=""}ngOnInit(){}nxtOnDestroy(){}ngOnChanges(i){i.artistColor&&(this.color=xn.getLightOrDarkFontColorByBackground(i.artistColor.currentValue,"#eee","#222"))}};e.\u0275fac=function(r){return new(r||e)(R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-tooltip-calendar-event"]],inputs:{event:"event",artistColor:"artistColor"},standalone:!0,features:[et,yn,xe],decls:25,vars:29,consts:[[1,"flex","flex-col","items-center","justify-center","tooltip"],[1,"flex","w-full","flex-row","justify-between","time-artist",3,"ngStyle"],[1,"time"],[1,"artist"],[1,"flex","w-full","flex-col","items-center","p-2","content",3,"ngStyle"],[1,"text-xl","no-wrap"],[1,"text-l"],[1,"mt-1","flex","w-full","flex-col","gap-1"],[1,"flex","w-full","red-light"],[1,"text-sm","no-wrap","red"],[1,"flex","w-full"],[1,"text-sm","no-wrap",3,"innerHTML"],[1,"text-sm","no-wrap"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),y(3),Ce(4,"nxtDate"),Ce(5,"nxtDate"),p(),h(6,"div",3),y(7),p()(),h(8,"div",4),W(9,DKi,3,3,"div",5),h(10,"div",5),y(11),p(),h(12,"div",5),y(13),Ce(14,"money2"),p(),h(15,"div",6),W(16,EKi,3,3,"div")(17,IKi,2,1),p(),h(18,"div",7),W(19,AKi,3,1,"div",8)(20,PKi,2,1,"div",9),ee(21,"div"),h(22,"div",10),ee(23,"div",11),Ce(24,"calendarBodyPuts"),p()()()()),r&2&&(g(),b("ngStyle",bs(24,SKi,s.artistColor,s.color)),g(2),cn("",Nt(4,13,s.event.start,"HH:mm")," - ",Nt(5,16,s.event.end,"HH:mm"),""),g(4),cn("",s.event.artist,"",s.event.artistFix?" (fix)":"",""),g(),b("ngStyle",sn(27,TKi,s.artistColor)),g(),Je(s.event.status==="canceled"?9:-1),g(2),ye((s.event==null||s.event.customerObj==null?null:s.event.customerObj.fullName)||"?"),g(2),Ke("bereits bezahlt: ",tt(14,19,s.event.paymentSum),""),g(3),Je(s.event.priceFix?16:17),g(3),Je(s.event.importantInfo?19:-1),g(),Je(s.event.canceledReason?20:-1),g(3),b("innerHTML",Nt(24,21,s.event,"- "),Pi))},dependencies:[rr,Dn,rs,Hn,ks,C6t,fX,N7],styles:["[_nghost-%COMP%]{font-size:140%;line-height:1.2;color:#bbb;background-color:#404040;display:flex;border-radius:4px;position:relative}[_nghost-%COMP%]   .tooltip[_ngcontent-%COMP%]{border-radius:6px}[_nghost-%COMP%]   .time-artist[_ngcontent-%COMP%]{border-top-right-radius:4px;border-top-left-radius:4px;white-space:nowrap;padding:4px 6px}[_nghost-%COMP%]   .time-artist[_ngcontent-%COMP%]   .time[_ngcontent-%COMP%]{text-align:left}[_nghost-%COMP%]   .time-artist[_ngcontent-%COMP%]   .artist[_ngcontent-%COMP%]{text-align:right;padding-left:12px}[_nghost-%COMP%]   .content[_ngcontent-%COMP%]{width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-left:3px solid #b7860f;border-right:3px solid #b7860f;border-bottom:3px solid #b7860f}"]});let t=e;return t})()});function FKi(t,e){t&1&&(h(0,"div",3),y(1,"FIX"),p())}function LKi(t,e){if(t&1&&(h(0,"div"),ee(1,"nxt-tooltip-calendar-event",5),p()),t&2){let n=w();g(),b("event",n.event().meta.event)("artistColor",n.event().color.primary)}}var RKi,w6t,nTe=Q(()=>{me();Gi();bse();ij();ri();jc();dz();me();RKi=(t,e)=>({color:t,backgroundColor:e});w6t=(()=>{let e=class e extends bt{constructor(){super(),this.event=br.required(),this.artistOpenPiercing=vr(()=>this.event().meta?.event?.artist===bf.getArtistOpenPiercing().name),this.artistOpenTattoo=vr(()=>this.event().meta?.event?.artist===bf.getArtistOpenTattoo().name),this.textColor=vr(()=>this.event().color?.primary?xn.getLightOrDarkFontColorByBackground(this.event().color.primary):""),this.tooltipClass=vr(()=>this.event().allDay?"no-style mat-tooltip-width-content mat-tooltip-offset-right":"no-style mat-tooltip-width-content")}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-event-template"]],inputs:{event:[1,"event"]},standalone:!0,features:[et,xe],decls:6,vars:12,consts:[["tooltipTemplate",""],["m","","mtxTooltipClass","no-style mat-tooltip-width-content","tabindex","0","role","application",1,"event",3,"mtxTooltip","mtxTooltipPosition","ngStyle"],[2,"word-wrap","break-word","text-wrap","initial","line-height","1"],[1,"w-full","text-center","font-bold"],[3,"innerHTML"],[3,"event","artistColor"]],template:function(r,s){if(r&1&&(h(0,"div",1)(1,"div",2),W(2,FKi,2,0,"div",3),ee(3,"div",4),p()(),W(4,LKi,2,2,"ng-template",null,0,Cc)),r&2){let o,a,l=pr(5);ki("artist-open-piercing",s.artistOpenPiercing())("artist-open-tattoo",s.artistOpenTattoo()),b("mtxTooltip",l)("mtxTooltipPosition",s.event().allDay?"after":"above")("ngStyle",bs(9,RKi,s.textColor(),(o=s.event().color)==null?null:o.primary)),g(2),Je(!((a=s.event().meta)==null||a.event==null)&&a.event.artistFix?2:-1),g(),b("innerHTML",s.event().title,Pi)}},dependencies:[b6t,yS,rr],styles:["[_nghost-%COMP%]   .event[_ngcontent-%COMP%]{padding:0;border-radius:3px;font-size:70%;height:calc(100% - 2px);width:calc(100% - 1px);overflow:hidden}[_nghost-%COMP%]   .event-all-day[_ngcontent-%COMP%]{padding-left:4px;border-bottom:1px solid #404040!important;height:15px;font-size:70%;width:100%;overflow:hidden;display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%]   .artist-open-piercing[_ngcontent-%COMP%]{--color-1: #008a0b;--color-2: #009f0a;--distance: 5px;color:#fff!important;background-image:repeating-linear-gradient(45deg,var(--color-1) 0px,var(--color-1) 10px,var(--color-2) 10px,var(--color-2) 20px)}[_nghost-%COMP%]   .artist-open-tattoo[_ngcontent-%COMP%]{--color-1: #001c87;--color-2: #0020a8;--distance: 5px;color:#fff!important;background-image:repeating-linear-gradient(45deg,var(--color-1) 0px,var(--color-1) 10px,var(--color-2) 10px,var(--color-2) 20px)}"],changeDetection:0});let t=e;return t})()});var wse,rTe=Q(()=>{zn();me();wse=(()=>{let e=class e{constructor(){}transform(i,r=!1){try{let s=Ie.format(i,"HH:mm");return r&&(s=s.replace(":00","")),s}catch{return"?"}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtTime",type:e,pure:!0,standalone:!0});let t=e;return t})()});var S6t,sTe=Q(()=>{me();S6t=(()=>{let e=class e{constructor(){}transform(i){switch(i){case"work":return"Arbeit";case"holiday":return"Urlaub";case"timeTrack":return"Zeiterfassung";case"notHere":return"Frei"}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtEmployeeEventType",type:e,pure:!0,standalone:!0});let t=e;return t})()});function OKi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(),i=w();g(),ye(i.WorkplaceTools.getText(n.workplaces))}}function NKi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"nxtTime"),Ce(3,"nxtTime"),p()),t&2){let n=w();g(),cn("",Nt(2,2,n.start,!0)," - ",Nt(3,5,n.end,!0)," Uhr")}}function VKi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w();g(),Ke("l\xE4uft seit ",Nt(2,1,n.start,"HH:mm"),"")}}function BKi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=e.$implicit;g(),ye(n)}}function zKi(t,e){if(t&1&&Kn(0,BKi,2,1,"div",null,sa),t&2){let n=w();Yn(n.infos)}}function HKi(t,e){if(t&1&&(h(0,"div",0)(1,"div"),y(2),Ce(3,"nxtEmployeeEventType"),p(),W(4,OKi,2,1,"div"),h(5,"div"),y(6),p(),W(7,NKi,4,8,"div")(8,VKi,3,4,"div"),h(9,"div"),y(10),Ce(11,"duration"),p(),h(12,"div",1),W(13,zKi,2,0),p()()),t&2){let n=e,i=w();g(2),ye(tt(3,7,n.type)),g(2),Je(n.type==="work"?4:-1),g(2),cn("",i.employee().abbreviation," - ",i.employee().fullName,""),g(),Je(n.end?7:8),g(3),Ke("Dauer: ",Nt(11,9,i.duration(),"HH:mm"),""),g(3),Je(n.infos?13:-1)}}var T6t,D6t=Q(()=>{me();Gi();sTe();go();rTe();Lv();M7();me();T6t=(()=>{let e=class e extends bt{constructor(){super(),this.employeeEvent=br.required(),this.employee=br.required(),this.duration=vr(()=>this.employeeEvent().end?this.employeeEvent().end-this.employeeEvent().start:Date.now()-this.employeeEvent().start),this.cdRef=Ve(Kt),this.WorkplaceTools=Cg}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-calendar-event-tooltip"]],inputs:{employeeEvent:[1,"employeeEvent"],employee:[1,"employee"]},standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","flex-col","p-5","text-xl","tooltip"],[1,"flex","flex-col"]],template:function(r,s){if(r&1&&W(0,HKi,14,12,"div",0),r&2){let o;Je((o=s.employeeEvent())?0:-1,o)}},dependencies:[S6t,Hn,wse,lf],styles:[".tooltip[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #b7860f;text-align:center}"],changeDetection:0});let t=e;return t})()});function WKi(t,e){if(t&1&&(h(0,"div",2)(1,"div"),y(2),p()()),t&2){let n=w();g(2),Ke("",n.meta.employee.abbreviation," \u231A")}}function UKi(t,e){t&1&&(h(0,"div",8),y(1,"\u{1F6CE}\uFE0F"),p())}function jKi(t,e){t&1&&(h(0,"div",8),y(1,"\u{1F5A5}\uFE0F"),p())}function $Ki(t,e){t&1&&(h(0,"div",8),y(1,"\u{1FAA1}"),p())}function KKi(t,e){t&1&&(h(0,"div",8),y(1,"\u{1F4C8}"),p())}function YKi(t,e){t&1&&(h(0,"div",8),y(1,"\u{1F4C9}"),p())}function qKi(t,e){t&1&&(h(0,"div",8),y(1,"\u{1F528}"),p())}function ZKi(t,e){t&1&&(h(0,"div",8),y(1,"\u{1F50E}"),p())}function XKi(t,e){if(t&1&&(W(0,UKi,2,0,"div",8)(1,jKi,2,0,"div",8)(2,$Ki,2,0,"div",8)(3,KKi,2,0,"div",8)(4,YKi,2,0,"div",8)(5,qKi,2,0,"div",8)(6,ZKi,2,0,"div",8),h(7,"div",7),y(8),Ce(9,"uppercase"),p()),t&2){let n=w(2);Je(!(n.meta.employeeEvent==null||n.meta.employeeEvent.workplaces==null)&&n.meta.employeeEvent.workplaces.includes("reception")?0:-1),g(),Je(!(n.meta.employeeEvent==null||n.meta.employeeEvent.workplaces==null)&&n.meta.employeeEvent.workplaces.includes("backoffice")?1:-1),g(),Je(!(n.meta.employeeEvent==null||n.meta.employeeEvent.workplaces==null)&&n.meta.employeeEvent.workplaces.includes("piercing")?2:-1),g(),Je(!(n.meta.employeeEvent==null||n.meta.employeeEvent.workplaces==null)&&n.meta.employeeEvent.workplaces.includes("whatsapp")?3:-1),g(),Je(!(n.meta.employeeEvent==null||n.meta.employeeEvent.workplaces==null)&&n.meta.employeeEvent.workplaces.includes("whatsappFranchise")?4:-1),g(),Je(!(n.meta.employeeEvent==null||n.meta.employeeEvent.workplaces==null)&&n.meta.employeeEvent.workplaces.includes("craft")?5:-1),g(),Je(!(n.meta.employeeEvent==null||n.meta.employeeEvent.workplaces==null)&&n.meta.employeeEvent.workplaces.includes("eventRating")?6:-1),g(2),ye(tt(9,8,n.meta.employeeEvent.studio))}}function QKi(t,e){t&1&&(h(0,"div",8),y(1,"\u{1F637}"),p())}function JKi(t,e){t&1&&(h(0,"div",8),y(1,"\u2708\uFE0F"),p())}function eYi(t,e){t&1&&(h(0,"div",8),y(1,"\u231A"),p())}function tYi(t,e){t&1&&(h(0,"div",8),y(1,"\u{1F193}"),p())}function iYi(t,e){if(t&1&&(h(0,"div",3)(1,"div"),y(2),p(),h(3,"div",4)(4,"div"),y(5),Ce(6,"nxtTime"),p(),h(7,"div"),y(8),Ce(9,"nxtTime"),p()(),h(10,"div",5)(11,"div",6),y(12),p()(),W(13,XKi,10,10,"div",7)(14,QKi,2,0,"div",8)(15,JKi,2,0,"div",8)(16,eYi,2,0,"div",8)(17,tYi,2,0,"div",8),p()),t&2){let n=w();g(2),ye(n.meta.employee.abbreviation),g(3),ye(Nt(6,9,n.meta.employeeEvent.start,!0)),g(3),ye(Nt(9,12,n.meta.employeeEvent.end,!0)),g(4),ye(n.meta.employee.givenName),g(),Je(n.meta.employeeEvent.type==="work"?13:-1),g(),Je(n.meta.employeeEvent.type==="sick"?14:-1),g(),Je(n.meta.employeeEvent.type==="holiday"?15:-1),g(),Je(n.meta.employeeEvent.type==="timeTrack"?16:-1),g(),Je(n.meta.employeeEvent.type==="notHere"?17:-1)}}function nYi(t,e){if(t&1&&ee(0,"nxt-employee-calendar-event-tooltip",9),t&2){let n=w();b("employeeEvent",n.meta.employeeEvent)("employee",n.meta.employee)}}function rYi(t,e){if(t&1&&(h(0,"div",1),W(1,WKi,3,1,"div",2)(2,iYi,18,15,"div",3),p(),W(3,nYi,1,2,"ng-template",null,0,Cc)),t&2){let n=e,i=pr(4),r=w();ki("p-3",r.duration()>r.DurationTools.DURATION_1HOUR)("all-center",r.duration()<r.DurationTools.DURATION_1HOUR),b("mtxTooltip",i)("mtxTooltipPosition",n.allDay?"after":"above")("ngStyle",bs(8,GKi,r.textColor(),n.meta.employee.color)),g(),Je(r.duration()<r.DurationTools.DURATION_1HOUR?1:n.allDay?-1:2)}}var GKi,E6t,Sse=Q(()=>{me();Gi();ij();ri();bse();jc();P0();go();rTe();sTe();jo();D6t();me();GKi=(t,e)=>({color:t,backgroundColor:e});E6t=(()=>{let e=class e extends bt{constructor(){super(),this.event=br.required(),this.textColor=vr(()=>{if(this.event().meta.employee)return xn.getLightOrDarkFontColorByBackground(this.event().meta.employee.color);debugger}),this.duration=vr(()=>this.event().meta.employeeEvent.end?this.event().meta.employeeEvent.end-this.event().meta.employeeEvent.start:Date.now()-this.event().meta.employeeEvent.start),this.tooltipClass=vr(()=>this.event().allDay?"no-style mat-tooltip-width-content mat-tooltip-offset-right":"no-style mat-tooltip-width-content"),this.DurationTools=Qt}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-calendar-event"]],inputs:{event:[1,"event"]},standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["tooltipTemplate",""],["mtxTooltipClass","no-style mat-tooltip-width-content",1,"flex","h-full","w-full","flex-col","items-center","event",3,"mtxTooltip","mtxTooltipPosition","ngStyle"],[1,"flex","text-[70%]"],[1,"flex","flex-col","items-center","text-[80%]"],[1,"flex","flex-col","text-xs","center"],[1,"mt-2","text-xs","h-[40px]"],[1,"absolute","left-0","w-full","center",2,"width","calc(100% - 3px)","overflow","hidden","word-break","break-all"],[1,"mt-3","text-xs"],[1,"state-icon"],[3,"employeeEvent","employee"]],template:function(r,s){if(r&1&&W(0,rYi,5,11),r&2){let o;Je((o=s.event())?0:-1,o)}},dependencies:[yS,rr,V_,wse,T6t],styles:["[_nghost-%COMP%]{display:flex;height:100%;width:100%;overflow:hidden;padding-right:2px}[_nghost-%COMP%]   .event[_ngcontent-%COMP%]{border-radius:8px}[_nghost-%COMP%]   .event.all-center[_ngcontent-%COMP%]{justify-content:center;align-items:center}[_nghost-%COMP%]   .event[_ngcontent-%COMP%]   .state-icon[_ngcontent-%COMP%]{margin-top:3px;border-radius:2px}"],changeDetection:0});let t=e;return t})()});var sYi,oTe,M6t=Q(()=>{me();Gi();qn();g2();o1();Ah();ri();th();Ly();tp();iF();zn();Zi();yi();Ci();n1();Kr();nc();me();E8();sYi=()=>["fullName","id"],oTe=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.cdRef=Ve(Kt),this.cacheService=Ve(cc),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.loginService=Ve(Fi),this.form=new Wl({id:new Cn("",[],"ID"),employee:new Cn(null,[ii.requiredAndNotNaN],"Mitarbeiter"),dateString:new Cn(null,[ii.requiredAndNotNaN],"Datum"),startTime:new Cn(null,[ii.requiredAndNotNaN],"Start"),endTime:new Cn(null,[ii.requiredAndNotNaN],"Ende"),type:new Cn("timeTrack",[ii.requiredAndNotNaN],"Typ")}),this.displayWithEmployee=r=>r?r.abbreviation+" - "+r.fullName:""}ngOnInit(){}nxtOnDestroy(){}new(i,r){this.originalEmployeeEvent=q4.getEmptyEmployeeEvent(),this.originalEmployeeEvent.dateString=i,this.originalEmployeeEvent.start=(i+" "+r).dateParse(),this.form.controls.endTime.setErrors(null),this.form.controls.endTime.setValidators([ii.requiredAndNotNaN]),this.setForm()}load(i){return O(this,null,function*(){this.originalEmployeeEvent=yield this.socketService.getEmployeeEvent(i),this.originalEmployeeEvent&&(this.form.controls.endTime.setErrors(null),this.form.controls.endTime.setValidators([]),this.setForm())})}setForm(){return O(this,null,function*(){yield this.cacheService.waitForEmployees(),Is.setForm(this.form,{employee:this.cacheService.employees.value.find(i=>i.id===this.originalEmployeeEvent.employeeId),dateString:this.originalEmployeeEvent.dateString,startTime:this.originalEmployeeEvent.start>0?this.originalEmployeeEvent.start.dateFormat("HH:mm"):null,endTime:this.originalEmployeeEvent.end>0?this.originalEmployeeEvent.end.dateFormat("HH:mm"):null,type:this.originalEmployeeEvent.type,studio:this.originalEmployeeEvent.studio,workplaces:this.originalEmployeeEvent.workplaces})})}getFromForm(){return St(ve({},this.originalEmployeeEvent),{employeeId:this.form.controls.employee.value.id,start:Ie.parse(this.originalEmployeeEvent.dateString+" "+this.form.controls.startTime.value+":00"),end:Ie.parse(this.originalEmployeeEvent.dateString+" "+this.form.controls.endTime.value+":00"),dateString:this.form.controls.dateString.value,manualTimeTrack:!this.originalEmployeeEvent.id,type:"timeTrack"})}saveClicked(){return O(this,null,function*(){if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)){let i=this.getFromForm(),r=yield this.dialogService.showInput({message:"Info zu deiner \xC4nderung",stringCanEmpty:this.loginService.isJulian()});(r||this.loginService.isJulian())&&(i.infos||(i.infos=[]),r&&i.infos.push(Date.now().dateFormat("dd.MM.yyyy HH:mm:ss")+" "+this.loginService.getUsername()+": "+r),yield this.socketService.upsertEmployeeEvent(i),this.dialogRef.close())}})}setTime(i,r){this.form.controls.startTime.setValue(i),this.form.controls.endTime.setValue(r)}closeClicked(){this.dialogRef.close()}deleteClicked(){return O(this,null,function*(){(yield this.dialogService.showYesNo("L\xF6schen?"))&&(this.socketService.deleteEmployeeEvent(this.originalEmployeeEvent.id),this.dialogRef.close())})}};e.\u0275fac=function(r){return new(r||e)(R(Jf,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-event-timetrack-edit"]],standalone:!0,features:[et,xe],decls:24,vars:13,consts:[[1,"flex","flex-row"],[3,"nxtFormControl","filterFields","displayInOptionWith","displayWith","options"],[1,"flex","flex-col","w-full","justify-around"],[1,"flex","flex-row","justify-around"],[3,"nxtFormControl"],[1,"self-center",3,"click","smallButton"],[3,"click","smallButton"],[1,"flex","flex-row","mt-5","justify-between","gap-3"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div")(1,"div"),y(2,"Stempelzeit"),p(),h(3,"div",0),ee(4,"nxt-autocomplete",1),Ce(5,"async"),p(),h(6,"div",2)(7,"div",3),ee(8,"nxt-time-picker",4),h(9,"nxt-button",5),F("click",function(){return s.setTime("11:30","20:00")}),y(10,"11:30 - 20:00"),p(),ee(11,"nxt-time-picker",4),p(),h(12,"div",3)(13,"nxt-button",6),F("click",function(){return s.setTime("11:00","15:15")}),y(14,"11:00 - 15:15"),p(),h(15,"nxt-button",6),F("click",function(){return s.setTime("15:45","20:00")}),y(16,"15:45 - 20:00"),p()()(),h(17,"div",7)(18,"nxt-button",8),F("click",function(){return s.closeClicked()}),y(19,"Abbrechen"),p(),h(20,"nxt-button",8),F("click",function(){return s.deleteClicked()}),y(21,"L\xF6schen"),p(),h(22,"nxt-button",8),F("click",function(){return s.saveClicked()}),y(23,"Speichern"),p()()()),r&2&&(g(4),b("nxtFormControl",s.form.controls.employee)("filterFields",bn(12,sYi))("displayInOptionWith",s.displayWithEmployee)("displayWith",s.displayWithEmployee)("options",tt(5,10,s.cacheService.employees)),g(4),b("nxtFormControl",s.form.controls.startTime),g(),b("smallButton",!0),g(2),b("nxtFormControl",s.form.controls.endTime),g(2),b("smallButton",!0),g(2),b("smallButton",!0))},dependencies:[Ga,Xu,cf,Lt,Ia],changeDetection:0});let t=e;return t})()});function aYi(t,e){if(t&1&&(h(0,"div",5),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w().$implicit;g(),ye(Nt(2,1,n.date,"EE dd.MM"))}}function lYi(t,e){if(t&1&&(h(0,"div",5),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w().$implicit;g(),ye(Nt(2,1,n.date,"EE dd.MM.yyyy"))}}function cYi(t,e){if(t&1&&(h(0,"div",8),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w().$implicit,i=w();g(),ye(i.publicHolidays()[Nt(2,1,n.date,"yyyy-MM-dd")].name)}}function dYi(t,e){if(t&1&&(h(0,"div",9),y(1),p()),t&2){let n=w().$implicit,i=w();g(),Ke("F: ",i.employeesFreeDaysByDateString()[n.date.dateFormatDate()].join(", "),"")}}function uYi(t,e){if(t&1&&(ee(0,"div",10),Ce(1,"safeHtml")),t&2){let n=w().$implicit,i=w();b("innerHTML",tt(1,1,i.dayCheckRed()[n.date.dateFormatDate()]),Pi)}}function hYi(t,e){if(t&1&&(ee(0,"div",11),Ce(1,"safeHtml")),t&2){let n=w().$implicit,i=w();b("innerHTML",tt(1,1,i.dayCheckOrange()[n.date.dateFormatDate()]),Pi)}}function pYi(t,e){if(t&1){let n=re();h(0,"div",2)(1,"div",3)(2,"div",4),F("click",function(){let r=V(n).$implicit,s=w();return B(s.dateHeaderClicked.emit(r.date.dateFormatDate()))}),W(3,aYi,3,4,"div",5),Ce(4,"nxtDate"),W(5,lYi,3,4,"div",5),h(6,"div",6),y(7),Ce(8,"fromNowText"),p()(),h(9,"div",7),W(10,cYi,3,4,"div",8),Ce(11,"nxtDate"),W(12,dYi,2,1,"div",9)(13,uYi,2,3,"div",10)(14,hYi,2,3,"div",11),p()()()}if(t&2){let n=e.$implicit,i=w();ki("cal-past",n.isPast)("cal-today",n.isToday)("cal-future",n.isFuture)("cal-weekend",n.isWeekend),g(3),Je(Nt(4,14,n.date,"yyyy")===i.thisYear?3:5),g(4),ye(Nt(8,17,n.date,!0)),g(3),Je(i.publicHolidays()[Nt(11,20,n.date,"yyyy-MM-dd")]?10:-1),g(2),Je(i.employeesFreeDaysByDateString()[n.date.dateFormatDate()]?12:-1),g(),Je(i.dayCheckRed()[n.date.dateFormatDate()]?13:-1),g(),Je(i.dayCheckOrange()[n.date.dateFormatDate()]?14:-1)}}var oYi,k6t,I6t=Q(()=>{me();Gi();go();ri();$P();B1();dT();zn();ha();me();Cs();oYi=()=>({width:"calc(100% - 16px)"});k6t=(()=>{let e=class e extends bt{constructor(i){super(),this.configService=i,this.days=br.required(),this.events=br.required(),this.employeesFreeDays=br.required(),this.dateHeaderClicked=j2(),this.dailyNoteClicked=j2(),this.employeesFreeDaysByDateString=vr(()=>{let r={};for(let s of this.days())for(let o of this.employeesFreeDays())o.freeDays.includes(Ie.getDayOfWeek(s.date))&&(r[s.date.dateFormatDate()]||(r[s.date.dateFormatDate()]=[]),r[s.date.dateFormatDate()].push(o.giveName));return r}),this.publicHolidays=vr(()=>{let r={};for(let s of this.days()){let o=kv.getPublicHoliday(s.date.dateFormatDate(),this.configService.config.value.invoiceData.fromRegion);o&&(r[s.date.dateFormat("yyyy-MM-dd")]=o)}return r}),this.thisYear=Ie.formatNow("yyyy"),this.dayCheckRed=gt({}),this.dayCheckOrange=gt({}),qh(()=>{if(this.events().length===0)return{};let r={},s={};for(let o of this.days()){if(Ie.getDayOfWeek(o.date)===Aa.Sunday&&!this.configService.config.value.workOnSunday)continue;let a=this.events().filter(l=>l.dateString===o.date.dateFormatDate());if(a.length===0)return{};if(this.configService.config.value.studioRegion==="AC"){let l=[],c=[],d=a.filter(x=>x.studio==="ac"&&x.workplaces.includes("reception")),u=a.filter(x=>x.studio==="du"&&x.workplaces.includes("reception")),m=a.filter(x=>x.workplaces.includes("whatsapp")),f=a.filter(x=>x.workplaces.includes("whatsappFranchise")),_=a.filter(x=>x.workplaces.includes("eventRating"));d.length===0&&l.push("Empfang AC fehlt"),d.length>2&&c.push("Empfang AC evtl. zu viel?"),u.length===0&&l.push("Empfang DU fehlt"),m.length===0&&l.push("WhatsApp fehlt"),f.length===0&&a.some(x=>x.employeeName.startsWith("Mandy")&&x.type==="holiday")&&l.push("WhatsApp Franchise fehlt"),_.length<2&&o.date.getTime()>"2024-09-17".dateParse()&&l.push("Terminbewertung zu wenig"),r[o.date.dateFormatDate()]=l.join(`
`),s[o.date.dateFormatDate()]=c.join(`
`)}}this.dayCheckRed.set(r),this.dayCheckOrange.set(s)},{allowSignalWrites:!0})}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-calendar-header"]],inputs:{days:[1,"days"],events:[1,"events"],employeesFreeDays:[1,"employeesFreeDays"]},outputs:{dateHeaderClicked:"dateHeaderClicked",dailyNoteClicked:"dailyNoteClicked"},standalone:!0,features:[et,xe],decls:2,vars:3,consts:[["role","row",1,"cal-day-headers",3,"ngStyle"],["class","cal-header p-relative","tabindex","0","role","columnheader",3,"cal-past","cal-today","cal-future","cal-weekend",4,"ngFor","ngForOf"],["tabindex","0","role","columnheader",1,"cal-header","p-relative"],[1,"flex","flex-col","leading-tight","relative"],[1,"date-info","flex","flex-row","justify-center","items-center","gap-3","whitespace-break-spaces",3,"click"],[1,"bold","text-[25px]"],[1,"text-80"],[1,"flex","flex-col"],[1,"public-holiday","p-2"],[1,"text-[80%]","pt-1","pb-2"],[1,"text-[80%]","pt-1","pb-2","background-red","m-3","rounded",3,"innerHTML"],[1,"text-[80%]","pt-1","pb-2","background-orange","m-3","rounded",2,"color","#000",3,"innerHTML"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,pYi,15,23,"div",1),p()),r&2&&(b("ngStyle",bn(2,oYi)),g(),b("ngForOf",s.days()))},dependencies:[Hn,rr,Hi,ld,Or],styles:[".artist-info-and-daily-notes[_ngcontent-%COMP%]{border-radius:4px;overflow:hidden;margin:4px;white-space:wrap!important}.artist-info-and-daily-notes[_ngcontent-%COMP%]   .daily-notes[_ngcontent-%COMP%]{background-color:#222;color:#bbb}.artist-info-and-daily-notes[_ngcontent-%COMP%]   .daily-notes[_ngcontent-%COMP%]   .daily-note[_ngcontent-%COMP%]{padding:4px}.artist-info-and-daily-notes[_ngcontent-%COMP%]   .artist-infos[_ngcontent-%COMP%]{padding:4px;background-color:#b7860f;color:#000}.date-info[_ngcontent-%COMP%]{padding:4px}.public-holiday[_ngcontent-%COMP%]{background-color:#792929;padding:4px;font-size:100%}"],changeDetection:0});let t=e;return t})()});function fYi(t,e){if(t&1&&(h(0,"mat-button-toggle",8),y(1),p()),t&2){let n=e.$implicit;b("value",n.value),g(),ye(n.text)}}function gYi(t,e){if(t&1&&(h(0,"td"),y(1),p()),t&2){let n=e.$implicit;g(),ye(n.employeeName)}}function vYi(t,e){if(t&1&&(h(0,"td"),y(1),p()),t&2){let n=e.$implicit;g(),ye(n.plannedH)}}function yYi(t,e){if(t&1&&(h(0,"td"),y(1),p()),t&2){let n=e.$implicit;g(),ye(n.shouldH)}}function _Yi(t,e){if(t&1&&(h(0,"td"),y(1),p()),t&2){let n=e.$implicit;ki("red",n.doTimeTrack&&n.plannedH-n.shouldH<0),g(),ye(n.plannedH-n.shouldH)}}function CYi(t,e){if(t&1&&(h(0,"table",17)(1,"tr")(2,"td"),y(3,"Mitarbeiter"),p(),Kn(4,gYi,2,1,"td",null,Tse),p(),h(6,"tr")(7,"td"),y(8,"Geplant"),p(),Kn(9,vYi,2,1,"td",null,Tse),p(),h(11,"tr")(12,"td"),y(13,"Soll"),p(),Kn(14,yYi,2,1,"td",null,Tse),p(),h(16,"tr")(17,"td"),y(18,"Differenz"),p(),Kn(19,_Yi,2,3,"td",19,Tse),p()()),t&2){let n=e;g(4),Yn(n.checks),g(5),Yn(n.checks),g(5),Yn(n.checks),g(5),Yn(n.checks)}}function xYi(t,e){if(t&1){let n=re();h(0,"mwl-calendar-week-view",20,3),F("hourSegmentClicked",function(r){V(n);let s=w();return B(s.hourSegmentClicked(r))}),p()}if(t&2){let n=w(),i=pr(29),r=pr(31),s=pr(33);b("daysInWeek",7)("viewDate",n.date())("dayStartHour",9)("dayEndHour",24)("headerTemplate",r)("hourSegmentTemplate",i)("eventTemplate",s)("events",n.events)}}function bYi(t,e){if(t&1&&ee(0,"nxt-calendar-hour-segment",21),t&2){let n=e.segment,i=e.segmentHeight,r=e.isTimeLabel,s=e.daysInWeek;b("cssClass",n.cssClass)("date",n.date)("isStart",n.isStart)("segmentHeight",i)("isTimeLabel",r)("daysInWeek",s)("daysCount",7)("dayStartHour",9)("disableTooltip",!1)}}function wYi(t,e){if(t&1&&ee(0,"nxt-employee-calendar-header",22),t&2){let n=e.days,i=w();b("employeesFreeDays",i.employeesFreeDays())("events",i.employeeEvents)("days",n)}}function SYi(t,e){if(t&1){let n=re();h(0,"nxt-employee-calendar-event",23),F("click",function(){let r=V(n).weekEvent,s=w();return B(s.eventClicked(r.event))}),p()}if(t&2){let n=e.weekEvent;b("event",n.event)}}var mYi,Tse,Dse,aTe=Q(()=>{me();Gi();$w();yi();nj();go();Ci();v6t();iTe();nTe();ri();Sse();o1();i6();qn();Pm();Tf();Am();Im();Df();a3();zn();oo();M6t();jl();Bd();I6t();Cs();me();ji();$w();qn();mYi=(t,e)=>e.value,Tse=(t,e)=>e.employeeId;Dse=(()=>{let e=class e extends bt{constructor(i){super(),this.dialogRef=i,this.workplaceFilter=gt(["backoffice","reception","craft","piercing","whatsapp","whatsappFranchise"]),this.studioFilter=gt([]),this.eventTypeFilter=gt(["work","holiday","sick","notHere"]),this.showTimeTracks=gt(!1),this.employeeChecks=gt(null),this.dateString=gt(Ie.getMondayBefore(Date.now(),0).dateFormatDate()),this.employeesFreeDays=gt([]),this.studioOptions=gt([]),this.date=vr(()=>new Date(this.dateString().dateFormatDate())),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.cacheService=Ve(cc),this.permissionService=Ve(ws),this.configService=Ve(Xi),this.employeeEvents=[],qh(()=>{this.dateString(),this.load()}),qh(()=>{this.eventTypeFilter(),this.workplaceFilter(),this.studioFilter(),this.refreshView()})}ngOnInit(){this.configService.config.value.studioRegion==="AC"?this.studioOptions.set([{text:"Aachen",value:"ac"},{text:"D\xFCsseldorf",value:"du"}]):this.configService.config.value.studioRegion==="MA"&&this.studioOptions.set([{text:"Mallorca",value:"ma"}]),this.pushSocketSubscription=this.socketService.subscribeNew("eventEmployeeEventChanged",()=>this.load(),{emitAfterReconnect:!0})}load(){return O(this,null,function*(){yield this.cacheService.waitForEmployees();let i=Ie.getMondayBefore(this.dateString().dateParse(),0),r=i.dateAddDays(6),s=yield this.socketService.getEmployeeEvents(i.dateFormatDate(),r.dateFormatDate());this.employeeEvents=s.employeeEvents,this.employeesFreeDays.set(s.employeesFreeDays),this.employeeChecks.set(yield this.socketService.checkEmployeeEvents(i.dateFormatDate())),this.refreshView()})}refreshView(){let i=this.employeeEvents.filter(r=>{let s=this.workplaceFilter().some(l=>r.workplaces.includes(l))||r.type!=="work",o=this.studioFilter().includes(r.studio)||this.studioFilter().length===0||r.type!=="work",a=this.eventTypeFilter().includes(r.type);return s&&o&&a});this.events=i.map(r=>({start:new Date(r.start),end:r.end?new Date(r.end):new Date,title:r.employeeId,meta:{employeeEvent:r,employee:this.cacheService.employees.value.find(s=>s.id===r.employeeId)}})),this.events.sort((r,s)=>r.start<s.start?-1:r.start>s.start?1:r.meta.employee.givenName.localeCompare(s.meta.employee.givenName)),this.cdRef.detectChanges()}nxtOnDestroy(){}eventClicked(i){i.meta.employeeEvent.type==="timeTrack"?this.dialogService.showComponentDialog(oTe).componentInstance.load(i.meta.employeeEvent.id):this.dialogService.showComponentDialog(tTe).componentInstance.load(i.meta.employeeEvent.id)}hourSegmentClicked(i){this.showTimeTracks()?this.permissionService.hasPermission(Zt.Employees_EditTimeTracks)&&this.dialogService.showComponentDialog(oTe).componentInstance.new(i.date.dateFormatDate(),i.date.dateFormat("HH:mm")):this.dialogService.showComponentDialog(tTe).componentInstance.new(i.date.dateFormatDate(),i.date.dateFormat("HH:mm"))}valuechanged(i){debugger}workplaceFilterChanged(i){}datePickerChanged(i){this.dateString.set(Ie.getMondayBefore(i,0).dateFormatDate())}showTimeTracksChanged(){this.showTimeTracks()?this.eventTypeFilter.set(["timeTrack"]):this.eventTypeFilter.set(["work","holiday","sick"])}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8))},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-calendar"]],standalone:!0,features:[et,xe],decls:35,vars:12,consts:[["hourSegmentTemplate",""],["headerTemplate",""],["eventTemplate",""],["calendarWeekViewComponent",""],[3,"dialogRef"],[1,"flex","flex-row","gap-3","items-center"],[3,"valueChange","jumpWeeks","noPadding","jumpToday","value"],[3,"ngModelChange","ngModel","multiple"],[3,"value"],[3,"valueChange","value"],["value","backoffice"],["value","whatsapp"],["value","whatsappFranchise"],["value","reception"],["value","craft"],["value","piercing"],[1,"flex","flex-col","justify-center","items-center","w-full","pb-2"],[1,"nxt-table","nxt-table-small-padding","w-fit"],["class","h-full flex w-full o-hidden",3,"daysInWeek","viewDate","dayStartHour","dayEndHour","headerTemplate","hourSegmentTemplate","eventTemplate","events","hourSegmentClicked",4,"ngIf"],[3,"red"],[1,"h-full","flex","w-full","o-hidden",3,"hourSegmentClicked","daysInWeek","viewDate","dayStartHour","dayEndHour","headerTemplate","hourSegmentTemplate","eventTemplate","events"],[3,"cssClass","date","isStart","segmentHeight","isTimeLabel","daysInWeek","daysCount","dayStartHour","disableTooltip"],[3,"employeesFreeDays","events","days"],[3,"click","event"]],template:function(r,s){if(r&1){let o=re();h(0,"nxt-page")(1,"nxt-page-header",4)(2,"nxt-page-header-title"),y(3,"Mitarbeiter-Kalender"),p(),h(4,"div",5)(5,"nxt-date-picker-2",6),F("valueChange",function(l){return V(o),B(s.datePickerChanged(l))}),p(),h(6,"mat-button-toggle-group",7),Xe("ngModelChange",function(l){return V(o),Ze(s.studioFilter,l)||(s.studioFilter=l),B(l)}),Kn(7,fYi,2,2,"mat-button-toggle",8,mYi),p(),h(9,"nxt-slide-toggle",9),Xe("valueChange",function(l){return V(o),Ze(s.showTimeTracks,l)||(s.showTimeTracks=l),B(l)}),F("valueChange",function(){return V(o),B(s.showTimeTracksChanged())}),y(10,"Stempeln"),p(),h(11,"mat-button-toggle-group",7),Xe("ngModelChange",function(l){return V(o),Ze(s.workplaceFilter,l)||(s.workplaceFilter=l),B(l)}),h(12,"mat-button-toggle",10),y(13,"Backoffice"),p(),h(14,"mat-button-toggle",11),y(15,"WhatsApp"),p(),h(16,"mat-button-toggle",12),y(17,"WhatsApp Franchise"),p(),h(18,"mat-button-toggle",13),y(19,"Theke"),p(),h(20,"mat-button-toggle",14),y(21,"Handwerk"),p(),h(22,"mat-button-toggle",15),y(23,"Piercing"),p()()()(),h(24,"nxt-page-content")(25,"div",16),W(26,CYi,21,0,"table",17),p(),W(27,xYi,2,8,"mwl-calendar-week-view",18)(28,bYi,1,9,"ng-template",null,0,Cc)(30,wYi,1,3,"ng-template",null,1,Cc)(32,SYi,1,1,"ng-template",null,2,Cc),p(),ee(34,"nxt-page-footer"),p()}if(r&2){let o;g(),b("dialogRef",s.dialogRef),g(4),b("jumpWeeks",!0)("noPadding",!0)("jumpToday",!0)("value",s.dateString()),g(),qe("ngModel",s.studioFilter),b("multiple",!0),g(),Yn(s.studioOptions()),g(2),qe("value",s.showTimeTracks),g(2),qe("ngModel",s.workplaceFilter),b("multiple",!0),g(15),Je((o=s.employeeChecks())?26:-1,o),g(),b("ngIf",!0)}},dependencies:[f_,nM,Cse,E6t,nm,Dm,Ct,ko,Ko,Dp,Pl,hc,Yl,Al,Kl,_f,Nn,k6t],styles:["[_nghost-%COMP%]     .cal-day-headers{width:calc(100% - 16px)}"],changeDetection:0});let t=e;return t})()});var A6t,P6t=Q(()=>{me();Gi();Jr();Zi();yi();ji();me();A6t=(()=>{let e=class e extends bt{constructor(){super(),this.code1=gt(""),this.code2=gt(""),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogRef=Ve(Gt)}ngOnInit(){return O(this,null,function*(){let i=yield this.socketService.getArtistKeySafeCodes();for(let r of i)r.safeNumber===1&&this.code1.set(r.code),r.safeNumber===2&&this.code2.set(r.code)})}nxtOnDestroy(){}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){let i=yield this.socketService.getArtistKeySafeCodes();for(let r of i)r.safeNumber===1&&(r.code=this.code1()),r.safeNumber===2&&(r.code=this.code2());yield this.socketService.setArtistKeySafeCodes(i),this.dialogRef.close()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-key-safe-code"]],standalone:!0,features:[et,xe],decls:10,vars:2,consts:[["placeholder","Links",3,"valueChange","value"],["placeholder","Rechts",3,"valueChange","value"],[1,"flex","flex-row","justify-around"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div")(1,"div"),y(2,"Schl\xFCssel-Tresor-Codes"),p(),h(3,"nxt-input",0),Xe("valueChange",function(a){return Ze(s.code1,a)||(s.code1=a),a}),p(),h(4,"nxt-input",1),Xe("valueChange",function(a){return Ze(s.code2,a)||(s.code2=a),a}),p(),h(5,"div",2)(6,"nxt-button",3),F("click",function(){return s.cancelClicked()}),y(7,"Abbrechen"),p(),h(8,"nxt-button",3),F("click",function(){return s.saveClicked()}),y(9,"Speichern"),p()()()),r&2&&(g(3),qe("value",s.code1),g(),qe("value",s.code2))},dependencies:[Yi,Lt],changeDetection:0});let t=e;return t})()});var Ese,lTe=Q(()=>{me();Gi();Pm();nj();$w();a3();Sse();Im();Df();Am();Tf();Pa();yi();Qo();ji();jc();Ph();Ci();jo();kl();jl();Bd();Jr();ih();me();Ese=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.permissionService=Ve(ws),this.dialogRef=Ve(Gt,{optional:!0}),this.daysColumnDefs=[{headerName:"Datum",field:"dateString",nxtFieldType:Ee.Date_germanDate},{headerName:"Mitarbeiter",valueGetter:i=>this.employees[i.data.employeeId].fullName},{headerName:"Arbeit",field:"workDuration",nxtFieldType:Ee.Duration},{headerName:"Pause",field:"breakDuration",nxtFieldType:Ee.Duration},{headerName:"Krank",field:"sickDuration",nxtFieldType:Ee.Duration},{headerName:"Urlaub",field:"holidayDuration",nxtFieldType:Ee.Duration},{headerName:"Info",valueGetter:i=>i.data.events.filter(r=>r.infos&&r.infos.length>0).map(r=>r.infos).flat().join(" - "),nxtFieldType:Ee.Text}],this.employees={},this.workWeeksFiltered=vr(()=>this.selectedMonth()?this.workWeeks().filter(i=>i.dateString.startsWith(this.selectedMonth())):this.workWeeks()),this.workWeeks=gt([]),this.employeeData=gt([]),this.employeeDataColumnDefs=[{headerName:"Mitarbeiter",field:"employeeFullName",nxtFieldType:Ee.Text},{headerName:"Arbeit",field:"workDays",valueFormatter:i=>{if(i.value>0)return i.value===1?i.value+" Tag":i.value+" Tage"},nxtFieldType:Ee.Number},{headerName:"Krank",valueGetter:i=>i.data.sickDuration/(Qt.DURATION_1HOUR*8),valueFormatter:i=>{if(i.value>0)return i.value+" Tage"},nxtFieldType:Ee.Text},{headerName:"Urlaub",valueGetter:i=>i.data.holidayDuration/(Qt.DURATION_1HOUR*8),valueFormatter:i=>i.value+" Tage",nxtFieldType:Ee.Text},{headerName:"\xDCberstd.",field:"moreDuration",nxtFieldType:Ee.Duration,cellRenderer:i=>i.value>0?"+"+i.valueFormatted:i.valueFormatted,cellStyle:i=>({textAlign:"right",color:i.data.moreDuration<0?xn.Red:xn.Green})}],this.weeksColumnDefs=[{headerName:"Woche",field:"start",nxtFieldType:Ee.Date_germanDate},{headerName:"Mitarbeiter",valueGetter:i=>this.employees[i.data.employeeId].fullName},{headerName:"Arbeitstage",field:"workDays",nxtFieldType:Ee.Number},{headerName:"Arbeit",field:"workDuration",nxtFieldType:Ee.Duration},{headerName:"Soll",field:"shouldDuration",nxtFieldType:Ee.Duration},{headerName:"Krank",valueGetter:i=>i.data.sickDuration/(Qt.DURATION_1HOUR*8),valueFormatter:i=>{if(i.value>0)return i.value===1?i.value+" Tag":i.value+" Tage"},nxtFieldType:Ee.Text},{headerName:"Urlaub",valueGetter:i=>i.data.holidayDuration/(Qt.DURATION_1HOUR*8),valueFormatter:i=>{if(i.value>0)return i.value===1?i.value+" Tag":i.value+" Tage"}},{headerName:"Bezahlt",field:"payoutDuration",nxtFieldType:Ee.Duration},{headerName:"\xDCberstd.",field:"moreDuration",nxtFieldType:Ee.Duration,cellRenderer:i=>i.value>0?"+"+i.valueFormatted:i.valueFormatted,cellStyle:i=>({textAlign:"right",color:i.data.moreDuration<0?xn.Red:xn.Green})},{headerName:"",nxtFieldType:Ee.Icon,valueGetter:i=>i.data.payoutValue?i.data.payoutValue:0,cellRenderer:i=>{if(i.data.payoutValue)return i.data.payoutValue.toMoneyString();if(i.data.moreDuration>0)return Ir.Material.Euro},nxtOnCellClicked:i=>this.payoutClicked(i.data),hide:!this.permissionService.hasPermission(Zt.Employees_Payout)}],this.quickFilterText=gt(""),this.selectedMonth=gt(""),this.monthOptions=gt(this.generateMonthOptions())}generateMonthOptions(){let i=new Date,r=i.getMonth(),s=[];for(let o=0;o<6;o++)i.setMonth(r-o),s.push({text:i.dateFormat("MMM yyyy"),value:i.dateFormat("yyyy-MM")});return s}ngOnInit(){this.generateMonthOptions(),this.load()}nxtOnDestroy(){}load(){return O(this,null,function*(){let i=yield this.socketService.getEmployeeWorks();for(let r of i.employees)this.employees[r.id]=r,r.doTimeTrack||(i.workWeeks=i.workWeeks.filter(s=>s.employeeId!==r.id));this.employeeData.set(i.employeeData),this.workWeeks.set(i.workWeeks.sortString("dateString"))})}payoutClicked(i){return O(this,null,function*(){if((Date.now()-i.dateString.dateParse())/Qt.DURATION_1DAY<7){this.dialogService.showOk("Die Woche ist noch nicht vorbei").then();return}if(i.moreDuration<=0){this.dialogService.showOk("Es gibts nix zum Auszahlen").then();return}let r=this.employees[i.employeeId].fullName+`

`+Qt.format(i.moreDuration,"HH:mm")+` Std ausbezahlen

\u20ACuro pro Std?`,s=yield this.dialogService.showInput({message:r,isMoney:!0});s&&(yield this.socketService.createEmployeeWorkWeekPayout({employeeId:i.employeeId,dateString:i.dateString,payoutDuration:i.moreDuration,payoutValue:fn.roundMoney(i.moreDuration/Qt.DURATION_1HOUR*s)}),this.load().then())})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-employee-works"]],standalone:!0,features:[et,xe],decls:18,vars:13,consts:[[3,"dialogRef"],["placeholder","Suche",1,"w-[250px]",3,"valueChange","clearIcon","value"],["placeholder","Monat",1,"w-[200px]",3,"valueChange","showClearIcon","options","value"],[1,"flex","h-full","w-full","flex-col"],[1,"flex","h-full","flex-row"],[1,"flex","h-full","w-full","flex-col","items-center"],[1,"h-full","w-full",3,"quickFilterText","columnDefs","rowData","showFooter"],["uniqueRowDataKey","employeeId",1,"h-full","w-full",3,"quickFilterText","columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Mitarbeiter-Zeiten"),p(),h(4,"nxt-input",1),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p(),h(5,"nxt-select",2),Xe("valueChange",function(a){return Ze(s.selectedMonth,a)||(s.selectedMonth=a),a}),p()(),h(6,"nxt-page-content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"div"),y(11,"Wochen"),p(),ee(12,"nxt-datagrid",6),p(),h(13,"div",5)(14,"div"),y(15,"Gesamt"),p(),ee(16,"nxt-datagrid",7),p()()()(),ee(17,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(3),b("clearIcon",!0),qe("value",s.quickFilterText),g(),b("showClearIcon",!0)("options",s.monthOptions()),qe("value",s.selectedMonth),g(7),b("quickFilterText",s.quickFilterText())("columnDefs",s.weeksColumnDefs)("rowData",s.workWeeksFiltered())("showFooter",!0),g(4),b("quickFilterText",s.quickFilterText())("columnDefs",s.employeeDataColumnDefs)("rowData",s.employeeData()))},dependencies:[Pl,f_,Al,Kl,Yl,hc,dr,Yi,$l],changeDetection:0});let t=e;return t})()});var LM,rj,TYi,XF,R6t,cTe,F6t,lrs,VC,crs,drs,urs,hrs,prs,L6t=Q(()=>{LM=Object.freeze({Linear:Object.freeze({None:function(t){return t},In:function(t){return t},Out:function(t){return t},InOut:function(t){return t}}),Quadratic:Object.freeze({In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}}),Cubic:Object.freeze({In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}}),Quartic:Object.freeze({In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}}),Quintic:Object.freeze({In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}}),Sinusoidal:Object.freeze({In:function(t){return 1-Math.sin((1-t)*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return .5*(1-Math.sin(Math.PI*(.5-t)))}}),Exponential:Object.freeze({In:function(t){return t===0?0:Math.pow(1024,t-1)},Out:function(t){return t===1?1:1-Math.pow(2,-10*t)},InOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}}),Circular:Object.freeze({In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}}),Elastic:Object.freeze({In:function(t){return t===0?0:t===1?1:-Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI)},Out:function(t){return t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t-.1)*5*Math.PI)+1},InOut:function(t){return t===0?0:t===1?1:(t*=2,t<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1)*5*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin((t-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(t){var e=1.70158;return t===1?1:t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return t===0?0:--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}}),Bounce:Object.freeze({In:function(t){return 1-LM.Bounce.Out(1-t)},Out:function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375},InOut:function(t){return t<.5?LM.Bounce.In(t*2)*.5:LM.Bounce.Out(t*2-1)*.5+.5}}),generatePow:function(t){return t===void 0&&(t=4),t=t<Number.EPSILON?Number.EPSILON:t,t=t>1e4?1e4:t,{In:function(e){return Math.pow(e,t)},Out:function(e){return 1-Math.pow(1-e,t)},InOut:function(e){return e<.5?Math.pow(e*2,t)/2:(1-Math.pow(2-e*2,t))/2+.5}}}}),rj=function(){return performance.now()},TYi=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},t.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},t.prototype.update=function(e,n){e===void 0&&(e=rj()),n===void 0&&(n=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<i.length;r++){var s=this._tweens[i[r]],o=!n;s&&s.update(e,o)===!1&&!n&&delete this._tweens[i[r]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),XF={Linear:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),s=XF.Utils.Linear;return e<0?s(t[0],t[1],i):e>1?s(t[n],t[n-1],n-i):s(t[r],t[r+1>n?n:r+1],i-r)},Bezier:function(t,e){for(var n=0,i=t.length-1,r=Math.pow,s=XF.Utils.Bernstein,o=0;o<=i;o++)n+=r(1-e,i-o)*r(e,o)*t[o]*s(i,o);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),s=XF.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),s(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],i-r)):e<0?t[0]-(s(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(s(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):s(t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2],i-r)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=XF.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:function(){var t=[1];return function(e){var n=1;if(t[e])return t[e];for(var i=e;i>1;i--)n*=i;return t[e]=n,n}}(),CatmullRom:function(t,e,n,i,r){var s=(n-t)*.5,o=(i-e)*.5,a=r*r,l=r*a;return(2*e-2*n+s+o)*l+(-3*e+3*n-2*s-o)*a+s*r+e}}},R6t=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),cTe=new TYi,F6t=function(){function t(e,n){n===void 0&&(n=cTe),this._object=e,this._group=n,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=LM.Linear.None,this._interpolationFunction=XF.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=R6t.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.getDuration=function(){return this._duration},t.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},t.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},t.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},t.prototype.start=function(e,n){if(e===void 0&&(e=rj()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var r={};for(var s in this._valuesEnd)r[s]=this._valuesEnd[s];this._valuesEnd=r}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},t.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},t.prototype._setupProperties=function(e,n,i,r,s){for(var o in i){var a=e[o],l=Array.isArray(a),c=l?"array":typeof a,d=!l&&Array.isArray(i[o]);if(!(c==="undefined"||c==="function")){if(d){var u=i[o];if(u.length===0)continue;for(var m=[a],f=0,_=u.length;f<_;f+=1){var x=this._handleRelativeValue(a,u[f]);if(isNaN(x)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}m.push(x)}d&&(i[o]=m)}if((c==="object"||l)&&a&&!d){n[o]=l?[]:{};var D=a;for(var E in D)n[o][E]=D[E];r[o]=l?[]:{};var u=i[o];if(!this._isDynamic){var M={};for(var E in u)M[E]=u[E];i[o]=u=M}this._setupProperties(D,n[o],u,r[o],s)}else(typeof n[o]>"u"||s)&&(n[o]=a),l||(n[o]*=1),d?r[o]=i[o].slice().reverse():r[o]=n[o]||0}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(e){return e===void 0&&(e=rj()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this),this)},t.prototype.resume=function(e){return e===void 0&&(e=rj()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},t.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},t.prototype.group=function(e){return e===void 0&&(e=cTe),this._group=e,this},t.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},t.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},t.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},t.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},t.prototype.easing=function(e){return e===void 0&&(e=LM.Linear.None),this._easingFunction=e,this},t.prototype.interpolation=function(e){return e===void 0&&(e=XF.Linear),this._interpolationFunction=e,this},t.prototype.chain=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._chainedTweens=e,this},t.prototype.onStart=function(e){return this._onStartCallback=e,this},t.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},t.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},t.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},t.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},t.prototype.onStop=function(e){return this._onStopCallback=e,this},t.prototype.update=function(e,n){var i;if(e===void 0&&(e=rj()),n===void 0&&(n=!0),this._isPaused)return!0;var r=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>r)return!1;n&&this.start(e,!0)}if(this._goToEnd=!1,e<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=e-this._startTime,o=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),a=this._duration+this._repeat*o,l=this._calculateElapsedPortion(s,o,a),c=this._easingFunction(l),d=this._calculateCompletionStatus(s,o);if(d==="repeat"&&this._processRepetition(s,o),this._updateProperties(this._object,this._valuesStart,this._valuesEnd,c),d==="about-to-repeat"&&this._processRepetition(s,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),d==="repeat"||d==="about-to-repeat")this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1;else if(d==="completed"){this._isPlaying=!1,this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var u=0,m=this._chainedTweens.length;u<m;u++)this._chainedTweens[u].start(this._startTime+this._duration,!1)}return d!=="completed"},t.prototype._calculateElapsedPortion=function(e,n,i){if(this._duration===0||e>i)return 1;var r=e%n,s=Math.min(r/this._duration,1);return s===0&&e!==0&&e%this._duration===0?1:s},t.prototype._calculateCompletionStatus=function(e,n){return this._duration!==0&&e<this._duration?"playing":this._repeat<=0?"completed":e===this._duration?"about-to-repeat":"repeat"},t.prototype._processRepetition=function(e,n){var i=Math.min(Math.trunc((e-this._duration)/n)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=i);for(var r in this._valuesStartRepeat){var s=this._valuesEnd[r];!this._yoyo&&typeof s=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(s)),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r]}this._yoyo&&(this._reversed=!this._reversed),this._startTime+=n*i},t.prototype._updateProperties=function(e,n,i,r){for(var s in i)if(n[s]!==void 0){var o=n[s]||0,a=i[s],l=Array.isArray(e[s]),c=Array.isArray(a),d=!l&&c;d?e[s]=this._interpolationFunction(a,r):typeof a=="object"&&a?this._updateProperties(e[s],o,a,r):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(e[s]=o+(a-o)*r))}},t.prototype._handleRelativeValue=function(e,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?e+parseFloat(n):parseFloat(n)},t.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],i=this._valuesEnd[e];typeof i=="string"?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(i):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},t}(),lrs=R6t.nextId,VC=cTe,crs=VC.getAll.bind(VC),drs=VC.removeAll.bind(VC),urs=VC.add.bind(VC),hrs=VC.remove.bind(VC),prs=VC.update.bind(VC)});function PYi(){return{checkResizeInterval:1e3,modifyOverflowStyleOfParentScroll:!0,resizeBypassRefreshThreshold:5,scrollAnimationTime:750,scrollDebounceTime:0,scrollThrottlingTime:0,stripedTable:!1}}var EYi,MYi,kYi,IYi,AYi,O6t,N6t=Q(()=>{me();L6t();me();EYi=["header"],MYi=["container"],kYi=["content"],IYi=["invisiblePadding"],AYi=["*"];O6t=(()=>{let e=class e{get viewPortInfo(){let i=this.previousViewPort||{};return{startIndex:i.startIndex||0,endIndex:i.endIndex||0,scrollStartPosition:i.scrollStartPosition||0,scrollEndPosition:i.scrollEndPosition||0,maxScrollPosition:i.maxScrollPosition||0,startIndexWithBuffer:i.startIndexWithBuffer||0,endIndexWithBuffer:i.endIndexWithBuffer||0}}get enableUnequalChildrenSizes(){return this._enableUnequalChildrenSizes}set enableUnequalChildrenSizes(i){this._enableUnequalChildrenSizes!==i&&(this._enableUnequalChildrenSizes=i,this.minMeasuredChildWidth=void 0,this.minMeasuredChildHeight=void 0)}get bufferAmount(){return typeof this._bufferAmount=="number"&&this._bufferAmount>=0?this._bufferAmount:this.enableUnequalChildrenSizes?5:0}set bufferAmount(i){this._bufferAmount=i}get scrollThrottlingTime(){return this._scrollThrottlingTime}set scrollThrottlingTime(i){this._scrollThrottlingTime=i,this.updateOnScrollFunction()}get scrollDebounceTime(){return this._scrollDebounceTime}set scrollDebounceTime(i){this._scrollDebounceTime=i,this.updateOnScrollFunction()}get checkResizeInterval(){return this._checkResizeInterval}set checkResizeInterval(i){this._checkResizeInterval!==i&&(this._checkResizeInterval=i,this.addScrollEventHandlers())}get items(){return this._items}set items(i){i!==this._items&&(this._items=i||[],this.refresh_internal(!0))}get horizontal(){return this._horizontal}set horizontal(i){this._horizontal=i,this.updateDirection()}get parentScroll(){return this._parentScroll}set parentScroll(i){if(this._parentScroll===i)return;this.revertParentOverscroll(),this._parentScroll=i,this.addScrollEventHandlers();let r=this.getScrollElement();this.modifyOverflowStyleOfParentScroll&&r!==this.element.nativeElement&&(this.oldParentScrollOverflow={x:r.style["overflow-x"],y:r.style["overflow-y"]},r.style["overflow-y"]=this.horizontal?"visible":"auto",r.style["overflow-x"]=this.horizontal?"auto":"visible")}constructor(i,r,s,o){this.element=i,this.renderer=r,this.zone=s,this.changeDetectorRef=o,this.window=window,this.executeRefreshOutsideAngularZone=!1,this._enableUnequalChildrenSizes=!1,this.RTL=!1,this.useMarginInsteadOfTranslate=!1,this.ssrViewportWidth=1920,this.ssrViewportHeight=1080,this._items=[],this.vsUpdate=new nt,this.vsChange=new nt,this.vsStart=new nt,this.vsEnd=new nt,this.calculatedScrollbarWidth=0,this.calculatedScrollbarHeight=0,this.padding=0,this.previousViewPort={},this.cachedPageSize=0,this.previousScrollNumberElements=0,this.compareItems=(l,c)=>l===c;let a=PYi();this.isAngularUniversalSSR=!1,this.checkResizeInterval=a.checkResizeInterval,this.modifyOverflowStyleOfParentScroll=a.modifyOverflowStyleOfParentScroll,this.resizeBypassRefreshThreshold=a.resizeBypassRefreshThreshold,this.scrollAnimationTime=a.scrollAnimationTime,this.scrollDebounceTime=a.scrollDebounceTime,this.scrollThrottlingTime=a.scrollThrottlingTime,this.scrollbarHeight=a.scrollbarHeight,this.scrollbarWidth=a.scrollbarWidth,this.stripedTable=a.stripedTable,this.horizontal=!1,this.resetWrapGroupDimensions()}updateOnScrollFunction(){this.scrollDebounceTime?this.onScroll=this.debounce(()=>{this.refresh_internal(!1)},this.scrollDebounceTime):this.scrollThrottlingTime?this.onScroll=this.throttleTrailing(()=>{this.refresh_internal(!1)},this.scrollThrottlingTime):this.onScroll=()=>{this.refresh_internal(!1)}}revertParentOverscroll(){let i=this.getScrollElement();i&&this.oldParentScrollOverflow&&(i.style["overflow-y"]=this.oldParentScrollOverflow.y,i.style["overflow-x"]=this.oldParentScrollOverflow.x),this.oldParentScrollOverflow=void 0}ngOnInit(){this.addScrollEventHandlers()}ngOnDestroy(){this.removeScrollEventHandlers(),this.revertParentOverscroll()}ngOnChanges(i){let r=this.cachedItemsLength!==this.items.length;this.cachedItemsLength=this.items.length;let s=!i.items||!i.items.previousValue||i.items.previousValue.length===0;this.refresh_internal(r||s)}ngDoCheck(){if(this.cachedItemsLength!==this.items.length){this.cachedItemsLength=this.items.length,this.refresh_internal(!0);return}if(this.previousViewPort&&this.viewPortItems&&this.viewPortItems.length>0){let i=!1;for(let r=0;r<this.viewPortItems.length;++r)if(!this.compareItems(this.items[this.previousViewPort.startIndexWithBuffer+r],this.viewPortItems[r])){i=!0;break}i&&this.refresh_internal(!0)}}refresh(){this.refresh_internal(!0)}invalidateAllCachedMeasurements(){this.wrapGroupDimensions={maxChildSizePerWrapGroup:[],numberOfKnownWrapGroupChildSizes:0,sumOfKnownWrapGroupChildWidths:0,sumOfKnownWrapGroupChildHeights:0},this.minMeasuredChildWidth=void 0,this.minMeasuredChildHeight=void 0,this.refresh_internal(!1)}invalidateCachedMeasurementForItem(i){if(this.enableUnequalChildrenSizes){let r=this.items&&this.items.indexOf(i);r>=0&&this.invalidateCachedMeasurementAtIndex(r)}else this.minMeasuredChildWidth=void 0,this.minMeasuredChildHeight=void 0;this.refresh_internal(!1)}invalidateCachedMeasurementAtIndex(i){if(this.enableUnequalChildrenSizes){let r=this.wrapGroupDimensions.maxChildSizePerWrapGroup[i];r&&(this.wrapGroupDimensions.maxChildSizePerWrapGroup[i]=void 0,--this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths-=r.childWidth||0,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights-=r.childHeight||0)}else this.minMeasuredChildWidth=void 0,this.minMeasuredChildHeight=void 0;this.refresh_internal(!1)}scrollInto(i,r=!0,s=0,o,a){let l=this.items.indexOf(i);l!==-1&&this.scrollToIndex(l,r,s,o,a)}scrollToIndex(i,r=!0,s=0,o,a){let l=5,c=()=>{if(--l,l<=0){a&&a();return}let d=this.calculateDimensions(),u=Math.min(Math.max(i,0),d.itemCount-1);if(this.previousViewPort.startIndex===u){a&&a();return}this.scrollToIndex_internal(i,r,s,0,c)};this.scrollToIndex_internal(i,r,s,o,c)}scrollToIndex_internal(i,r=!0,s=0,o,a){o=o===void 0?this.scrollAnimationTime:o;let l=this.calculateDimensions(),c=this.calculatePadding(i,l)+s;r||(c-=l.wrapGroupsPerPage*l[this._childScrollDim]),this.scrollToPosition(c,o,a)}scrollToPosition(i,r,s){i+=this.getElementsOffset(),r=r===void 0?this.scrollAnimationTime:r;let o=this.getScrollElement(),a;if(this.currentTween&&(this.currentTween.stop(),this.currentTween=void 0),!r){this.renderer.setProperty(o,this._scrollType,i),this.refresh_internal(!1,s);return}let l={scrollPosition:o[this._scrollType]},c=new F6t(l).to({scrollPosition:i},r).easing(LM.Quadratic.Out).onUpdate(u=>{isNaN(u.scrollPosition)||(this.renderer.setProperty(o,this._scrollType,u.scrollPosition),this.refresh_internal(!1))}).onStop(()=>{cancelAnimationFrame(a)}).start(),d=u=>{if(c.isPlaying()){if(c.update(u),l.scrollPosition===i){this.refresh_internal(!1,s);return}this.zone.runOutsideAngular(()=>{a=requestAnimationFrame(d)})}};d(),this.currentTween=c}getElementSize(i){let r=i.getBoundingClientRect(),s=getComputedStyle(i),o=parseInt(s["margin-top"],10)||0,a=parseInt(s["margin-bottom"],10)||0,l=parseInt(s["margin-left"],10)||0,c=parseInt(s["margin-right"],10)||0;return{top:r.top+o,bottom:r.bottom+a,left:r.left+l,right:r.right+c,width:r.width+l+c,height:r.height+o+a}}checkScrollElementResized(){let i=this.getElementSize(this.getScrollElement()),r;if(!this.previousScrollBoundingRect)r=!0;else{let s=Math.abs(i.width-this.previousScrollBoundingRect.width),o=Math.abs(i.height-this.previousScrollBoundingRect.height);r=s>this.resizeBypassRefreshThreshold||o>this.resizeBypassRefreshThreshold}r&&(this.previousScrollBoundingRect=i,i.width>0&&i.height>0&&this.refresh_internal(!1))}updateDirection(){this.horizontal?(this._childScrollDim="childWidth",this._invisiblePaddingProperty="scaleX",this._marginDir="margin-left",this._offsetType="offsetLeft",this._pageOffsetType="pageXOffset",this._scrollType="scrollLeft",this._translateDir="translateX"):(this._childScrollDim="childHeight",this._invisiblePaddingProperty="scaleY",this._marginDir="margin-top",this._offsetType="offsetTop",this._pageOffsetType="pageYOffset",this._scrollType="scrollTop",this._translateDir="translateY")}debounce(i,r){let s=this.throttleTrailing(i,r),o=function(){s.cancel(),s.apply(this,arguments)};return o.cancel=()=>{s.cancel()},o}throttleTrailing(i,r){let s,o=arguments,a=function(){let l=this;o=arguments,!s&&(r<=0?i.apply(l,o):s=setTimeout(()=>{s=void 0,i.apply(l,o)},r))};return a.cancel=()=>{s&&(clearTimeout(s),s=void 0)},a}refresh_internal(i,r,s=2){if(i&&this.previousViewPort&&this.previousViewPort.scrollStartPosition>0){let o=this.previousViewPort,a=this.viewPortItems,l=r;r=()=>{let c=this.previousViewPort.scrollLength-o.scrollLength;if(c>0&&this.viewPortItems){let d=a[0],u=this.items.findIndex(m=>this.compareItems(d,m));if(u>this.previousViewPort.startIndexWithBuffer){let m=!1;for(let f=1;f<this.viewPortItems.length;++f)if(!this.compareItems(this.items[u+f],a[f])){m=!0;break}if(!m){this.scrollToPosition(this.previousViewPort.scrollStartPosition+c,0,l);return}}}l&&l()}}this.zone.runOutsideAngular(()=>{requestAnimationFrame(()=>{i&&this.resetWrapGroupDimensions();let o=this.calculateViewport(),a=i||o.startIndex!==this.previousViewPort.startIndex,l=i||o.endIndex!==this.previousViewPort.endIndex,c=o.scrollLength!==this.previousViewPort.scrollLength,d=o.padding!==this.previousViewPort.padding,u=o.scrollStartPosition!==this.previousViewPort.scrollStartPosition||o.scrollEndPosition!==this.previousViewPort.scrollEndPosition||o.maxScrollPosition!==this.previousViewPort.maxScrollPosition;if(this.previousViewPort=o,c&&(this.renderer.setStyle(this.invisiblePaddingElementRef.nativeElement,"transform",`${this._invisiblePaddingProperty}(${o.scrollLength})`),this.renderer.setStyle(this.invisiblePaddingElementRef.nativeElement,"webkitTransform",`${this._invisiblePaddingProperty}(${o.scrollLength})`)),d&&(this.useMarginInsteadOfTranslate?this.renderer.setStyle(this.contentElementRef.nativeElement,this._marginDir,`${o.padding}px`):(this.renderer.setStyle(this.contentElementRef.nativeElement,"transform",`${this._translateDir}(${o.padding}px)`),this.renderer.setStyle(this.contentElementRef.nativeElement,"webkitTransform",`${this._translateDir}(${o.padding}px)`))),this.headerElementRef){let f=this.getScrollElement()[this._scrollType],_=this.getElementsOffset(),x=Math.max(f-o.padding-_+this.headerElementRef.nativeElement.clientHeight,0);this.renderer.setStyle(this.headerElementRef.nativeElement,"transform",`${this._translateDir}(${x}px)`),this.renderer.setStyle(this.headerElementRef.nativeElement,"webkitTransform",`${this._translateDir}(${x}px)`)}let m=a||l?{startIndex:o.startIndex,endIndex:o.endIndex,scrollStartPosition:o.scrollStartPosition,scrollEndPosition:o.scrollEndPosition,startIndexWithBuffer:o.startIndexWithBuffer,endIndexWithBuffer:o.endIndexWithBuffer,maxScrollPosition:o.maxScrollPosition}:void 0;if(a||l||u){let f=()=>{if(this.viewPortItems=o.startIndexWithBuffer>=0&&o.endIndexWithBuffer>=0?this.items.slice(o.startIndexWithBuffer,o.endIndexWithBuffer+1):[],this.vsUpdate.emit(this.viewPortItems),a&&this.vsStart.emit(m),l&&this.vsEnd.emit(m),(a||l)&&(this.changeDetectorRef.markForCheck(),this.vsChange.emit(m)),s>0){this.refresh_internal(!1,r,s-1);return}r&&r()};this.executeRefreshOutsideAngularZone?f():this.zone.run(f)}else{if(s>0&&(c||d)){this.refresh_internal(!1,r,s-1);return}r&&r()}})})}getScrollElement(){return this.parentScroll instanceof Window?document.scrollingElement||document.documentElement||document.body:this.parentScroll||this.element.nativeElement}addScrollEventHandlers(){if(this.isAngularUniversalSSR)return;let i=this.getScrollElement();this.removeScrollEventHandlers(),this.zone.runOutsideAngular(()=>{this.parentScroll instanceof Window?(this.disposeScrollHandler=this.renderer.listen("window","scroll",this.onScroll),this.disposeResizeHandler=this.renderer.listen("window","resize",this.onScroll)):(this.disposeScrollHandler=this.renderer.listen(i,"scroll",this.onScroll),this._checkResizeInterval>0&&(this.checkScrollElementResizedTimer=setInterval(()=>{this.checkScrollElementResized()},this._checkResizeInterval)))})}removeScrollEventHandlers(){this.checkScrollElementResizedTimer&&clearInterval(this.checkScrollElementResizedTimer),this.disposeScrollHandler&&(this.disposeScrollHandler(),this.disposeScrollHandler=void 0),this.disposeResizeHandler&&(this.disposeResizeHandler(),this.disposeResizeHandler=void 0)}getElementsOffset(){if(this.isAngularUniversalSSR)return 0;let i=0;if(this.containerElementRef&&this.containerElementRef.nativeElement&&(i+=this.containerElementRef.nativeElement[this._offsetType]),this.parentScroll){let r=this.getScrollElement(),s=this.getElementSize(this.element.nativeElement),o=this.getElementSize(r);this.horizontal?i+=s.left-o.left:i+=s.top-o.top,this.parentScroll instanceof Window||(i+=r[this._scrollType])}return i}countItemsPerWrapGroup(){if(this.isAngularUniversalSSR)return Math.round(this.horizontal?this.ssrViewportHeight/this.ssrChildHeight:this.ssrViewportWidth/this.ssrChildWidth);let i=this.horizontal?"offsetLeft":"offsetTop",r=(this.containerElementRef&&this.containerElementRef.nativeElement||this.contentElementRef.nativeElement).children,s=r?r.length:0;if(s===0)return 1;let o=r[0][i],a=1;for(;a<s&&o===r[a][i];)++a;return a}getScrollStartPosition(){let i;return this.parentScroll instanceof Window&&(i=window[this._pageOffsetType]),i||this.getScrollElement()[this._scrollType]||0}resetWrapGroupDimensions(){let i=this.wrapGroupDimensions;if(this.invalidateAllCachedMeasurements(),!this.enableUnequalChildrenSizes||!i||i.numberOfKnownWrapGroupChildSizes===0)return;let r=this.countItemsPerWrapGroup();for(let s=0;s<i.maxChildSizePerWrapGroup.length;++s){let o=i.maxChildSizePerWrapGroup[s];if(!o||!o.items||!o.items.length)continue;if(o.items.length!==r)return;let a=!1,l=r*s;for(let c=0;c<r;++c)if(!this.compareItems(o.items[c],this.items[l+c])){a=!0;break}a||(++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths+=o.childWidth||0,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights+=o.childHeight||0,this.wrapGroupDimensions.maxChildSizePerWrapGroup[s]=o)}}calculateDimensions(){let i=this.getScrollElement(),r=25;this.calculatedScrollbarHeight=Math.max(Math.min(i.offsetHeight-i.clientHeight,r),this.calculatedScrollbarHeight),this.calculatedScrollbarWidth=Math.max(Math.min(i.offsetWidth-i.clientWidth,r),this.calculatedScrollbarWidth);let s=i.offsetWidth-(this.scrollbarWidth||this.calculatedScrollbarWidth||(this.horizontal?0:r)),o=i.offsetHeight-(this.scrollbarHeight||this.calculatedScrollbarHeight||(this.horizontal?r:0)),a=this.containerElementRef&&this.containerElementRef.nativeElement||this.contentElementRef.nativeElement,l=this.countItemsPerWrapGroup(),c,d,u;if(this.isAngularUniversalSSR){s=this.ssrViewportWidth,o=this.ssrViewportHeight,d=this.ssrChildWidth,u=this.ssrChildHeight;let z=Math.max(Math.ceil(s/d),1),G=Math.max(Math.ceil(o/u),1);c=this.horizontal?z:G}else if(this.enableUnequalChildrenSizes){let z=i[this._scrollType]-(this.previousViewPort?this.previousViewPort.padding:0),G=this.previousViewPort.startIndexWithBuffer||0,A=Math.ceil(G/l),Y=0,X=0,ne=0,pe=0;c=0;for(let le of a.children){++G;let Se=this.getElementSize(le);if(Y=Math.max(Y,Se.width),X=Math.max(X,Se.height),G%l===0){let je=this.wrapGroupDimensions.maxChildSizePerWrapGroup[A];je&&(--this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths-=je.childWidth||0,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights-=je.childHeight||0),++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;let ze=this.items.slice(G-l,G);if(this.wrapGroupDimensions.maxChildSizePerWrapGroup[A]={childWidth:Y,childHeight:X,items:ze},this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths+=Y,this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights+=X,this.horizontal){let Ge=Math.min(Y,Math.max(s-ne,0));if(z>0){let Ae=Math.min(z,Ge);Ge-=Ae,z-=Ae}ne+=Ge,Ge>0&&s>=ne&&++c}else{let Ge=Math.min(X,Math.max(o-pe,0));if(z>0){let Ae=Math.min(z,Ge);Ge-=Ae,z-=Ae}pe+=Ge,Ge>0&&o>=pe&&++c}++A,Y=0,X=0}}let ce=this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths/this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes,ie=this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights/this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;d=this.childWidth||ce||s,u=this.childHeight||ie||o,this.horizontal?s>ne&&(c+=Math.ceil((s-ne)/d)):o>pe&&(c+=Math.ceil((o-pe)/u))}else{if(a.children.length>0){(!this.childWidth||!this.childHeight)&&(!this.minMeasuredChildWidth&&s>0&&(this.minMeasuredChildWidth=s),!this.minMeasuredChildHeight&&o>0&&(this.minMeasuredChildHeight=o));let A=a.children[0],Y=this.getElementSize(A);this.minMeasuredChildWidth=Math.min(this.minMeasuredChildWidth,Y.width),this.minMeasuredChildHeight=Math.min(this.minMeasuredChildHeight,Y.height)}d=this.childWidth||this.minMeasuredChildWidth||s,u=this.childHeight||this.minMeasuredChildHeight||o;let z=Math.max(Math.ceil(s/d),1),G=Math.max(Math.ceil(o/u),1);c=this.horizontal?z:G}let m=this.items.length,f=l*c,_=m/f,x=Math.ceil(m/l),D=0,E=this.horizontal?d:u;if(this.enableUnequalChildrenSizes){let z=0;for(let G=0;G<x;++G){let A=this.wrapGroupDimensions.maxChildSizePerWrapGroup[G]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[G][this._childScrollDim];A?D+=A:++z}D+=Math.round(z*E)}else D=x*E;this.headerElementRef&&(D+=this.headerElementRef.nativeElement.clientHeight);let M=this.horizontal?s:o,I=Math.max(D-M,0);return{childHeight:u,childWidth:d,itemCount:m,itemsPerPage:f,itemsPerWrapGroup:l,maxScrollPosition:I,pageCount_fractional:_,scrollLength:D,viewportLength:M,wrapGroupsPerPage:c}}calculatePadding(i,r){if(r.itemCount===0)return 0;let s=r[this._childScrollDim],o=Math.floor(i/r.itemsPerWrapGroup)||0;if(!this.enableUnequalChildrenSizes)return s*o;let a=0,l=0;for(let c=0;c<o;++c){let d=this.wrapGroupDimensions.maxChildSizePerWrapGroup[c]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[c][this._childScrollDim];d?l+=d:++a}return l+=Math.round(a*s),l}calculatePageInfo(i,r){let s=0;if(this.enableUnequalChildrenSizes){let _=Math.ceil(r.itemCount/r.itemsPerWrapGroup),x=0,D=r[this._childScrollDim];for(let E=0;E<_;++E){let M=this.wrapGroupDimensions.maxChildSizePerWrapGroup[E]&&this.wrapGroupDimensions.maxChildSizePerWrapGroup[E][this._childScrollDim];if(M?x+=M:x+=D,i<x){s=E/_;break}}}else s=i/r.scrollLength;let o=Math.min(Math.max(s*r.pageCount_fractional,0),r.pageCount_fractional)*r.itemsPerPage,a=r.itemCount-r.itemsPerPage-1,l=Math.min(Math.floor(o),a);if(l-=l%r.itemsPerWrapGroup,this.stripedTable){let _=2*r.itemsPerWrapGroup;l%_!==0&&(l=Math.max(l-l%_,0))}let c=Math.ceil(o)+r.itemsPerPage-1,d=(c+1)%r.itemsPerWrapGroup;d>0&&(c+=r.itemsPerWrapGroup-d),isNaN(l)&&(l=0),isNaN(c)&&(c=0),l=Math.min(Math.max(l,0),r.itemCount-1),c=Math.min(Math.max(c,0),r.itemCount-1);let u=this.bufferAmount*r.itemsPerWrapGroup,m=Math.min(Math.max(l-u,0),r.itemCount-1),f=Math.min(Math.max(c+u,0),r.itemCount-1);return{startIndex:l,endIndex:c,startIndexWithBuffer:m,endIndexWithBuffer:f,scrollStartPosition:i,scrollEndPosition:i+r.viewportLength,maxScrollPosition:r.maxScrollPosition}}calculateViewport(){let i=this.calculateDimensions(),r=this.getElementsOffset(),s=this.getScrollStartPosition();s>i.scrollLength+r&&!(this.parentScroll instanceof Window)?s=i.scrollLength:s-=r,s=Math.max(0,s);let o=this.calculatePageInfo(s,i),a=this.calculatePadding(o.startIndexWithBuffer,i),l=i.scrollLength;return{startIndex:o.startIndex,endIndex:o.endIndex,startIndexWithBuffer:o.startIndexWithBuffer,endIndexWithBuffer:o.endIndexWithBuffer,padding:Math.round(a),scrollLength:Math.round(l),scrollStartPosition:o.scrollStartPosition,scrollEndPosition:o.scrollEndPosition,maxScrollPosition:o.maxScrollPosition}}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Ac),R(pn),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["virtual-scroller"],["","virtualScroller",""]],contentQueries:function(r,s,o){if(r&1&&(_o(o,EYi,5,fi),_o(o,MYi,5,fi)),r&2){let a;Pt(a=Rt())&&(s.headerElementRef=a.first),Pt(a=Rt())&&(s.containerElementRef=a.first)}},viewQuery:function(r,s){if(r&1&&(ei(kYi,7,fi),ei(IYi,7,fi)),r&2){let o;Pt(o=Rt())&&(s.contentElementRef=o.first),Pt(o=Rt())&&(s.invisiblePaddingElementRef=o.first)}},hostVars:8,hostBindings:function(r,s){r&2&&ki("horizontal",s.horizontal)("vertical",!s.horizontal)("selfScroll",!s.parentScroll)("rtl",s.RTL)},inputs:{enableUnequalChildrenSizes:"enableUnequalChildrenSizes",bufferAmount:"bufferAmount",scrollThrottlingTime:"scrollThrottlingTime",scrollDebounceTime:"scrollDebounceTime",checkResizeInterval:"checkResizeInterval",items:"items",horizontal:"horizontal",parentScroll:"parentScroll",executeRefreshOutsideAngularZone:"executeRefreshOutsideAngularZone",RTL:"RTL",useMarginInsteadOfTranslate:"useMarginInsteadOfTranslate",modifyOverflowStyleOfParentScroll:"modifyOverflowStyleOfParentScroll",stripedTable:"stripedTable",scrollbarWidth:"scrollbarWidth",scrollbarHeight:"scrollbarHeight",childWidth:"childWidth",childHeight:"childHeight",ssrChildWidth:"ssrChildWidth",ssrChildHeight:"ssrChildHeight",ssrViewportWidth:"ssrViewportWidth",ssrViewportHeight:"ssrViewportHeight",scrollAnimationTime:"scrollAnimationTime",resizeBypassRefreshThreshold:"resizeBypassRefreshThreshold",compareItems:"compareItems"},outputs:{vsUpdate:"vsUpdate",vsChange:"vsChange",vsStart:"vsStart",vsEnd:"vsEnd"},exportAs:["virtualScroller"],standalone:!0,features:[yn,xe],ngContentSelectors:AYi,decls:5,vars:0,consts:[["invisiblePadding",""],["content",""],[1,"total-padding"],[1,"scrollable-content"]],template:function(r,s){r&1&&(gr(),ee(0,"div",2,0),h(2,"div",3,1),Ln(4),p())},styles:["[_nghost-%COMP%]{position:relative;display:block;-webkit-overflow-scrolling:touch}.horizontal.selfScroll[_nghost-%COMP%]{overflow-y:visible;overflow-x:auto}.horizontal.selfScroll.rtl[_nghost-%COMP%]{transform:scaleX(-1)}.vertical.selfScroll[_nghost-%COMP%]{overflow-y:auto;overflow-x:visible}.scrollable-content[_ngcontent-%COMP%]{top:0;left:0;width:100%;height:100%;max-width:100vw;max-height:100vh;position:absolute}.scrollable-content[_ngcontent-%COMP%]    >*{box-sizing:border-box}.horizontal[_nghost-%COMP%]{white-space:nowrap}.horizontal[_nghost-%COMP%]   .scrollable-content[_ngcontent-%COMP%]{display:flex}.horizontal[_nghost-%COMP%]   .scrollable-content[_ngcontent-%COMP%]    >*{flex-shrink:0;flex-grow:0;white-space:initial}.horizontal.rtl[_nghost-%COMP%]   .scrollable-content[_ngcontent-%COMP%]    >*{transform:scaleX(-1)}.total-padding[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;opacity:0}.horizontal[_nghost-%COMP%]   .total-padding[_ngcontent-%COMP%]{height:100%}"]});let t=e;return t})()});var V6t,B6t=Q(()=>{me();Gi();me();V6t=(()=>{let e=class e extends bt{constructor(){super(),this.chat=br.required(),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-messenger-chat-list-item"]],inputs:{chat:[1,"chat"]},standalone:!0,features:[et,xe],decls:2,vars:1,template:function(r,s){r&1&&(h(0,"div"),y(1),p()),r&2&&(g(),Ke(" ",s.chat().lastMessage.text,`
`))},changeDetection:0});let t=e;return t})()});function FYi(t,e){if(t&1&&ee(0,"nxt-messenger-chat-list-item",2),t&2){let n=e.$implicit;b("chat",n)}}var RYi,z6t,dTe=Q(()=>{me();Gi();N6t();B6t();me();RYi=(t,e)=>e.id;z6t=(()=>{let e=class e extends bt{constructor(){super(),this.chats=gt([]),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-messenger-chat-list"]],standalone:!0,features:[et,xe],decls:5,vars:2,consts:[["scroll",""],[1,"d-flex","w-full","h-full",3,"items","checkResizeInterval"],[3,"chat"]],template:function(r,s){if(r&1&&(h(0,"div")(1,"virtual-scroller",1,0),Kn(3,FYi,1,1,"nxt-messenger-chat-list-item",2,RYi),p()()),r&2){let o=pr(2);g(),b("items",s.chats())("checkResizeInterval",0),g(2),Yn(o.viewPortItems)}},dependencies:[O6t,V6t],changeDetection:0});let t=e;return t})()});var QF,uTe=Q(()=>{QF=class{static getEmpty(){return{name:"",type:"cash",balance:0,balanceTimestamp:0,userIds:[],cashRegisterName:"",receiveCashRegisterSafe:!1,receiveCashRegisterSafeStudio:""}}static getMoneyAccountTypeText(e){switch(e){case"cash":return"Bar";case"bank":return"Bank";case"credit-card":return"Kreditkarte";case"other":return"Sonstiges";default:return""}}}});var H6t,G6t=Q(()=>{me();Gi();ji();Jr();uTe();yi();qn();g2();tp();ih();Zi();Ci();pa();Ah();Cs();oo();nc();me();H6t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.configService=Ve(Xi),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.moneyAccountTypeOptions=[{text:"Bar",value:"cash"},{text:"Bank",value:"bank"}],this.otherStudios=[{text:"Mallorca",value:"ma"},{text:"D\xFCsseldorf",value:"du"}],this.form=new Wl({name:new Cn("",[],"Name"),type:new Cn(null,[ii.requiredAndNotNaN],"Typ"),userIds:new Cn([],[],"Zugriff"),cashRegisterName:new Cn(null,[],"Ladenkasse"),receiveCashRegisterSafe:new Cn(null,[],"Empf\xE4ngt Tresor aus Ladenkasse"),receiveCashRegisterSafeStudio:new Cn(null,[],"Empf\xE4ngt Tresor aus anderem Studio")}),this.userOptions=gt([]),this.regionOptions=gt([]),this.cashRegisterOptions=vr(()=>{let i=this.configService.config.value.studios.map(r=>({text:r.name,value:r.name}));return this.configService.config.value.studioRegion==="AC"&&(i.push({text:"D\xFCsseldorf",value:"D\xFCsseldorf"}),i.push({text:"Mallorca",value:"Mallorca"})),i})}ngOnInit(){this.loadUsers()}loadUsers(){return O(this,null,function*(){let i=(yield this.socketService.getUsers()).filter(r=>!r.noPerson).sortString("username").map(r=>({text:r.username,value:r.id}));this.userOptions.set(i)})}loadRegions(){return O(this,null,function*(){let i=(yield this.socketService.getUsers()).filter(r=>!r.noPerson).sortString("username").map(r=>({text:r.username,value:r.id}));this.userOptions.set(i)})}nxtOnDestroy(){}new(){return O(this,null,function*(){this.originalMoneyAccount=QF.getEmpty(),this.setFormFromMoneyAccount(this.originalMoneyAccount)})}load(i){return O(this,null,function*(){this.originalMoneyAccount=i,this.setFormFromMoneyAccount(this.originalMoneyAccount)})}setFormFromMoneyAccount(i){Is.setForm(this.form,i)}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)){let i=this.getMoneyAccountFromForm();yield this.socketService.upsertMoneyAccount(i),this.dialogRef.close()}this.dialogRef.close()})}getMoneyAccountFromForm(){return ve(ve({},so(this.originalMoneyAccount)),this.form.getRawValue())}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-account-edit"]],standalone:!0,features:[et,xe],decls:13,vars:12,consts:[[1,"flex","flex-col"],[1,"flex","flex-col","min-w-[400px]"],[3,"nxtFormControl"],[3,"nxtFormControl","options"],[3,"multiple","options","nxtFormControl"],[3,"options","nxtFormControl"],[1,"mb-4",3,"nxtFormControl"],[3,"showClearIcon","nxtFormControl","options"],[1,"flex","flex-row","justify-around"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1),ee(2,"nxt-input",2)(3,"nxt-select",3)(4,"nxt-select",4)(5,"nxt-select",5)(6,"nxt-slide-toggle",6)(7,"nxt-select",7),p(),h(8,"div",8)(9,"nxt-button",9),F("click",function(){return s.cancelClicked()}),y(10,"Abbrechen"),p(),h(11,"nxt-button",9),F("click",function(){return s.saveClicked()}),y(12,"Speichern"),p()()()),r&2&&(g(2),b("nxtFormControl",s.form.controls.name),g(),b("nxtFormControl",s.form.controls.type)("options",s.moneyAccountTypeOptions),g(),b("multiple",!0)("options",s.userOptions())("nxtFormControl",s.form.controls.userIds),g(),b("options",s.cashRegisterOptions())("nxtFormControl",s.form.controls.cashRegisterName),g(),b("nxtFormControl",s.form.controls.receiveCashRegisterSafe),g(),b("showClearIcon",!0)("nxtFormControl",s.form.controls.receiveCashRegisterSafeStudio)("options",s.otherStudios))},dependencies:[Yi,$l,Lt,Nn],changeDetection:0});let t=e;return t})()});function LYi(t,e){if(t&1){let n=re();h(0,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.deleteClicked())}),y(1,"L\xF6schen"),p()}}var W6t,U6t=Q(()=>{me();Gi();Jr();Zi();ih();yi();Ci();ji();qn();g2();tp();pa();n1();oo();nc();me();W6t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.form=new Wl({name:new Cn("",[ii.requiredAndNotNaN],"Name"),description:new Cn("",[],"Beschreibung"),isTransfer:new Cn(!1,[],"Transfer aus anderer Kasse")})}ngOnInit(){}nxtOnDestroy(){}new(){return O(this,null,function*(){this.originalTransactionCategory={name:"",description:""},this.setForm(this.originalTransactionCategory)})}load(i){return O(this,null,function*(){this.originalTransactionCategory=i,this.setForm(this.originalTransactionCategory)})}setForm(i){Is.setForm(this.form,i)}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)){let i=this.getFromForm();yield this.socketService.upsertMoneyTransactionCategory(i),this.dialogRef.close()}})}getFromForm(){return ve(ve({},so(this.originalTransactionCategory)),this.form.getRawValue())}deleteClicked(){this.socketService.deleteMoneyTransactionCategory(this.originalTransactionCategory.id),this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-transaction-category-edit"]],standalone:!0,features:[et,xe],decls:13,vars:4,consts:[[1,"flex","flex-col"],[3,"nxtFormControl"],[1,"mb-4",3,"nxtFormControl"],[1,"flex","flex-row","justify-around","gap-3"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2,"Kategorie"),p(),h(3,"div",0),ee(4,"nxt-input",1)(5,"nxt-input",1)(6,"nxt-slide-toggle",2),p(),h(7,"div",3)(8,"nxt-button",4),F("click",function(){return s.cancelClicked()}),y(9,"Abbrechen"),p(),W(10,LYi,2,0,"nxt-button"),h(11,"nxt-button",4),F("click",function(){return s.saveClicked()}),y(12,"Speichern"),p()()()),r&2&&(g(4),b("nxtFormControl",s.form.controls.name),g(),b("nxtFormControl",s.form.controls.description),g(),b("nxtFormControl",s.form.controls.isTransfer),g(4),Je(s.originalTransactionCategory!=null&&s.originalTransactionCategory.id?10:-1))},dependencies:[Yi,Lt,Nn],changeDetection:0});let t=e;return t})()});function OYi(t,e){if(t&1){let n=re();h(0,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.deleteClicked())}),y(1,"L\xF6schen"),p()}}var j6t,$6t=Q(()=>{me();Gi();Jr();Zi();ih();yi();Ci();ji();qn();g2();tp();pa();n1();nc();me();j6t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.form=new Wl({name:new Cn("",[ii.requiredAndNotNaN],"Name"),description:new Cn("",[],"Beschreibung")})}ngOnInit(){}nxtOnDestroy(){}new(){return O(this,null,function*(){this.originalTransactionLabel={name:"",description:""},this.setForm(this.originalTransactionLabel)})}load(i){return O(this,null,function*(){this.originalTransactionLabel=i,this.setForm(this.originalTransactionLabel)})}setForm(i){Is.setForm(this.form,i)}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)){let i=this.getFromForm();yield this.socketService.upsertMoneyTransactionLabel(i),this.dialogRef.close()}})}getFromForm(){return ve(ve({},so(this.originalTransactionLabel)),this.form.getRawValue())}deleteClicked(){this.socketService.deleteMoneyTransactionLabel(this.originalTransactionLabel.id),this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-transaction-label-edit"]],standalone:!0,features:[et,xe],decls:12,vars:3,consts:[[1,"flex","flex-col"],[3,"nxtFormControl"],[1,"flex","flex-row","justify-around","gap-3"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2,"Kategorie"),p(),h(3,"div",0),ee(4,"nxt-input",1)(5,"nxt-input",1),p(),h(6,"div",2)(7,"nxt-button",3),F("click",function(){return s.cancelClicked()}),y(8,"Abbrechen"),p(),W(9,OYi,2,0,"nxt-button"),h(10,"nxt-button",3),F("click",function(){return s.saveClicked()}),y(11,"Speichern"),p()()()),r&2&&(g(4),b("nxtFormControl",s.form.controls.name),g(),b("nxtFormControl",s.form.controls.description),g(4),Je(s.originalTransactionLabel.id?9:-1))},dependencies:[Yi,Lt],changeDetection:0});let t=e;return t})()});function NYi(t,e){if(t&1){let n=re();h(0,"nxt-button",3),F("click",function(){V(n);let r=w();return B(r.deleteClicked())}),y(1,"L\xF6schen"),p()}}var K6t,Y6t=Q(()=>{me();Gi();Jr();Zi();ih();yi();Ci();ji();qn();g2();tp();pa();n1();nc();me();K6t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.form=new Wl({name:new Cn("",[ii.requiredAndNotNaN],"Name"),description:new Cn("",[],"Beschreibung")})}ngOnInit(){}nxtOnDestroy(){}new(){return O(this,null,function*(){this.originalTransactionRegion={name:"",description:""},this.setForm(this.originalTransactionRegion)})}load(i){return O(this,null,function*(){this.originalTransactionRegion=i,this.setForm(this.originalTransactionRegion)})}setForm(i){Is.setForm(this.form,i)}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)){let i=this.getFromForm();yield this.socketService.upsertMoneyTransactionRegion(i),this.dialogRef.close()}})}getFromForm(){return ve(ve({},so(this.originalTransactionRegion)),this.form.getRawValue())}deleteClicked(){this.socketService.deleteMoneyTransactionRegion(this.originalTransactionRegion.id),this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-transaction-category-edit"]],standalone:!0,features:[et,xe],decls:12,vars:3,consts:[[1,"flex","flex-col"],[3,"nxtFormControl"],[1,"flex","flex-row","justify-around","gap-3"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2,"Region"),p(),h(3,"div",0),ee(4,"nxt-input",1)(5,"nxt-input",1),p(),h(6,"div",2)(7,"nxt-button",3),F("click",function(){return s.cancelClicked()}),y(8,"Abbrechen"),p(),W(9,NYi,2,0,"nxt-button"),h(10,"nxt-button",3),F("click",function(){return s.saveClicked()}),y(11,"Speichern"),p()()()),r&2&&(g(4),b("nxtFormControl",s.form.controls.name),g(),b("nxtFormControl",s.form.controls.description),g(4),Je(s.originalTransactionRegion.id?9:-1))},dependencies:[Yi,Lt],changeDetection:0});let t=e;return t})()});function VYi(t,e){if(t&1&&ee(0,"nxt-autocomplete",1),t&2){let n=w();b("options",n.otherAccounts())("nxtFormControl",n.form.controls.fromAccount)("filterFields",bn(5,hTe))("displayWith",n.DisplayWithTools.displayWithName)("displayInOptionWith",n.DisplayWithTools.displayWithName)}}var hTe,q6t,Z6t=Q(()=>{me();Gi();qn();g2();yi();Ci();ji();Ah();C4();Zi();Jr();tp();pa();i6();n1();nc();me();qn();hTe=()=>["name"];q6t=(()=>{let e=class e extends bt{constructor(){super(),this.accounts=gt([]),this.otherAccounts=vr(()=>this.accounts().filter(i=>i.id!==this.form.controls.account.value.id)),this.regions=gt([]),this.categories=gt([]),this.labels=gt([]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.form=new Wl({account:new Cn(null,[ii.requiredAndNotNaN],"Konto"),fromAccount:new Cn(null,[],"Gegenkonto"),direction:new Cn(null,[ii.requiredAndNotNaN],"Richtung"),dateString:new Cn(null,[],"Datum"),info:new Cn("",[],"Info"),region:new Cn(null,[ii.requiredAndNotNaN],"Region"),category:new Cn(null,[ii.requiredAndNotNaN],"Kategorie"),labels:new Cn([],[],"Labels"),value:new Cn(null,[ii.requiredAndNotNaN],"Betrag")}),this.DisplayWithTools=Qh}ngOnInit(){return O(this,null,function*(){let i=yield this.socketService.getMoneyAccounts();this.accounts.set(i.accounts),this.regions.set(i.regions),this.categories.set(i.categories),this.labels.set(i.labels),this.originalTransaction.accountId&&this.form.controls.account.setValue(this.accounts().find(r=>r.id===this.originalTransaction.accountId)),this.pushSubscription=this.form.controls.category.valueChanges.subscribe(r=>{this.form.controls.fromAccount.clearValidators(),this.form.controls.fromAccount.setErrors(null),this.form.controls.fromAccount.setValidators(r?.isTransfer?[ii.requiredAndNotNaN]:[])})})}nxtOnDestroy(){}new(i){this.originalTransaction={accountId:"",direction:"in",extId:"",peerText:"",peerName:"",peerId:"",datetime:0,dateString:"",value:0,info:"",categoryId:"",regionId:"",labelIds:[],balanceAfter:0,isTransfer:!1},this.originalTransaction.accountId=i}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){if(Is.showErrorsTrueIfNoError(this.form,this.dialogService)){let i=this.getFromForm(),r=!1;i.isTransfer&&this.form.controls.fromAccount.value.type==="cash"&&(r=yield this.dialogService.showYesNo('Soll die Gegenbuchung auf "'+this.form.controls.fromAccount.value.name+'" automatisch gebucht werden?')),yield this.socketService.upsertMoneyTransaction(i,r),this.dialogRef.close()}})}getFromForm(){let i=so(this.originalTransaction);return i.value=this.form.controls.value.value,i.accountId=this.form.controls.account.value.id,i.regionId=this.form.controls.region.value.id,i.info=this.form.controls.info.value,i.direction=this.form.controls.direction.value,i.categoryId=this.form.controls.category.value.id,i.isTransfer=this.form.controls.category.value.isTransfer,this.form.controls.category.value.isTransfer&&(i.peerId=this.form.controls.fromAccount.value.id),i.labelIds=this.form.controls.labels.value.map(r=>r.id),i}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-transaction-edit"]],standalone:!0,features:[et,xe],decls:21,vars:18,consts:[[1,"flex","flex-col"],[3,"options","nxtFormControl","filterFields","displayWith","displayInOptionWith"],[1,"flex","flex-row","justify-between","items-center"],["placeholder","Betrag",1,"w-[150px]",3,"isMoney","nxtFormControl"],[3,"formControl"],["value","in"],["value","out"],[1,"w-[350px]",3,"nxtFormControl"],[1,"flex","flex-row","justify-around","w-full"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2),p(),h(3,"div",0),ee(4,"nxt-autocomplete",1)(5,"nxt-autocomplete",1),W(6,VYi,1,6,"nxt-autocomplete",1),h(7,"div",2),ee(8,"nxt-input",3),h(9,"mat-button-toggle-group",4)(10,"mat-button-toggle",5),y(11,"REIN"),p(),h(12,"mat-button-toggle",6),y(13,"RAUS"),p()()(),h(14,"div"),ee(15,"nxt-textarea",7),p()(),h(16,"div",8)(17,"nxt-button",9),F("click",function(){return s.cancelClicked()}),y(18,"Abbrechen"),p(),h(19,"nxt-button",9),F("click",function(){return s.saveClicked()}),y(20,"Speichern"),p()()()),r&2&&(g(2),Ke("Transaktion f\xFCr ",s.form.controls.account==null||s.form.controls.account.value==null?null:s.form.controls.account.value.name,""),g(2),b("options",s.categories())("nxtFormControl",s.form.controls.category)("filterFields",bn(16,hTe))("displayWith",s.DisplayWithTools.displayWithName)("displayInOptionWith",s.DisplayWithTools.displayWithName),g(),b("options",s.regions())("nxtFormControl",s.form.controls.region)("filterFields",bn(17,hTe))("displayWith",s.DisplayWithTools.displayWithName)("displayInOptionWith",s.DisplayWithTools.displayWithName),g(),Je(!(s.form.controls.category==null||s.form.controls.category.value==null)&&s.form.controls.category.value.isTransfer?6:-1),g(2),b("isMoney",!0)("nxtFormControl",s.form.controls.value),g(),b("formControl",s.form.controls.direction),g(6),b("nxtFormControl",s.form.controls.info))},dependencies:[Ga,Lt,Yi,nm,Dm,Ia,Ko,$c,yu],changeDetection:0});let t=e;return t})()});function BYi(t,e){if(t&1){let n=re();h(0,"div",0)(1,"div"),y(2,"Transaktion annehmen"),p(),h(3,"div",1),y(4),p(),h(5,"div",0),ee(6,"nxt-autocomplete",2)(7,"nxt-autocomplete",2),h(8,"div",3)(9,"div"),y(10),p(),h(11,"div"),y(12),Ce(13,"money"),p()(),h(14,"div"),ee(15,"nxt-textarea",4),p()(),h(16,"div",5)(17,"nxt-button",6),F("click",function(){V(n);let r=w();return B(r.cancelClicked())}),y(18,"Abbrechen"),p(),h(19,"nxt-button",6),F("click",function(){V(n);let r=w();return B(r.saveClicked())}),y(20,"Speichern"),p()()()}if(t&2){let n=e,i=w();g(4),ye(n.info),g(2),b("options",i.categories())("nxtFormControl",i.form.controls.category)("filterFields",bn(16,X6t))("displayWith",i.DisplayWithTools.displayWithName)("displayInOptionWith",i.DisplayWithTools.displayWithName),g(),b("options",i.regions())("nxtFormControl",i.form.controls.region)("filterFields",bn(17,X6t))("displayWith",i.DisplayWithTools.displayWithName)("displayInOptionWith",i.DisplayWithTools.displayWithName),g(3),ye(n.transaction.direction),g(2),ye(tt(13,14,n.transaction.value)),g(3),b("nxtFormControl",i.form.controls.info)}}var X6t,Q6t,J6t=Q(()=>{me();Gi();qn();g2();yi();Ci();ji();Ah();C4();Zi();Jr();tp();n1();Il();$n();nc();me();X6t=()=>["name"];Q6t=(()=>{let e=class e extends bt{constructor(){super(),this.originalPreTransaction=gt(null),this.loaded$=new qs(!1),this.accounts=gt([]),this.regions=gt([]),this.categories=gt([]),this.labels=gt([]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.form=new Wl({info:new Cn("",[],"Info"),region:new Cn(null,[ii.requiredAndNotNaN],"Region"),category:new Cn(null,[ii.requiredAndNotNaN],"Kategorie"),labels:new Cn([],[],"Labels")}),this.DisplayWithTools=Qh}ngOnInit(){return O(this,null,function*(){let i=yield this.socketService.getMoneyAccounts();this.accounts.set(i.accounts),this.regions.set(i.regions),this.categories.set(i.categories),this.labels.set(i.labels),this.loaded$.next(!0)})}nxtOnDestroy(){}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){Is.showErrorsTrueIfNoError(this.form,this.dialogService)&&(yield this.socketService.acceptMoneyPreTransaction(this.originalPreTransaction().id,this.form.controls.region.value.id,this.form.controls.category.value.id,this.form.controls.info.value),this.dialogRef.close())})}load(i){return O(this,null,function*(){yield this.waitForLoad(),this.originalPreTransaction.set(i),this.originalPreTransaction().transaction.categoryId&&this.form.controls.category.setValue(this.categories().find(r=>r.id===this.originalPreTransaction().transaction.categoryId)),this.originalPreTransaction().transaction.info&&this.form.controls.info.setValue(this.originalPreTransaction().transaction.info)})}waitForLoad(){return O(this,null,function*(){return new Promise((i,r)=>{this.loaded$.value?i():this.loaded$.pipe(Jd(s=>s)).subscribe(s=>{i()})})})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-pre-transaction-accept"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[[1,"flex","flex-col"],[1,"mb-4"],[3,"options","nxtFormControl","filterFields","displayWith","displayInOptionWith"],[1,"flex","flex-row","justify-around","items-center"],[1,"w-[350px]",3,"nxtFormControl"],[1,"flex","flex-row","justify-around","w-full"],[3,"click"]],template:function(r,s){if(r&1&&W(0,BYi,21,18,"div",0),r&2){let o;Je((o=s.originalPreTransaction())?0:-1,o)}},dependencies:[Ga,Lt,Ia,yu,ks],changeDetection:0});let t=e;return t})()});var eyt,tyt=Q(()=>{me();Gi();Pm();Tf();Am();Pa();Zi();Ci();Z6t();yi();Df();Im();ji();Qo();Ph();Il();J6t();$n();Jr();me();eyt=(()=>{let e=class e extends bt{constructor(){super(),this.moneyTransactions=gt([]),this.moneyPreTransactions=gt([]),this.accountName=gt(""),this.accountBalance=gt(0),this.cdRef=Ve(Kt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.socketService=Ve(lt),this.columnDefs=[{headerName:"",nxtFieldType:Ee.Icon,cellRenderer:()=>Ir.Material.Update,nxtOnCellClicked:i=>this.reCalcTransactionClicked(i.data)},{headerName:"",nxtFieldType:Ee.Icon,cellRenderer:()=>Ir.Material.Delete,nxtOnCellClicked:i=>this.deleteTransactionClicked(i.data)},{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateTimeWithSeconds},{headerName:"Richtung",field:"direction",nxtFieldType:Ee.Text,valueFormatter:i=>i.value==="in"?"Einnahme":"Ausgabe"},{headerName:"Betrag",field:"value",nxtFieldType:Ee.Money},{headerName:"Kassenstand",field:"balanceAfter",nxtFieldType:Ee.Money},{headerName:"Region",field:"regionId",valueFormatter:i=>this.data.regions.find(r=>r.id===i.value)?.name},{headerName:"Kategorie",field:"categoryId",valueFormatter:i=>this.data.categories.find(r=>r.id===i.value)?.name},{headerName:"Erstellt",field:"createdBy",nxtFieldType:Ee.Text},{headerName:"Gegenseite",nxtFieldType:Ee.Text,valueGetter:i=>i.data.isTransfer?"Kasse: "+this.data.accountNames[i.data.peerId]:i.data.peerId},{headerName:"Info",field:"info",nxtFieldType:Ee.Text}],this.preTransactionColumnDefs=[{headerName:"",nxtFieldType:Ee.Icon,nxtIcon:Ir.Material.Check,nxtOnCellClicked:i=>this.acceptPreTransactionClicked(i.data)},{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateTimeWithSeconds},{headerName:"Richtung",field:"transaction.direction",nxtFieldType:Ee.Text,valueFormatter:i=>i.value==="in"?"Einnahme":"Ausgabe"},{headerName:"Betrag",field:"transaction.value",nxtFieldType:Ee.Money},{headerName:"Region",field:"transaction.regionId",valueFormatter:i=>this.data.regions.find(r=>r.id===i.value)?.name},{headerName:"Kategorie",field:"transaction.categoryId",valueFormatter:i=>this.data.categories.find(r=>r.id===i.value)?.name},{headerName:"Erstellt",field:"createdBy",nxtFieldType:Ee.Text},{headerName:"Gegenseite",nxtFieldType:Ee.Text,valueGetter:i=>i.data.transaction.isTransfer?"Kasse: "+this.data.accountNames[i.data.transaction.peerId]:i.data.transaction.peerId},{headerName:"Info",field:"info",nxtFieldType:Ee.Text}],this.moneyAccountId="",this.quickFilterText=""}ngOnInit(){return O(this,null,function*(){this.pushSocketSubscription=this.socketService.subscribeNew("eventMoneyTransactionChanged",i=>{i.record.accountId===this.moneyAccountId&&this.load(this.moneyAccountId)}),this.pushSocketSubscription=this.socketService.subscribeNew("eventMoneyAccountChanged",i=>{i.record.id===this.moneyAccountId&&this.load(this.moneyAccountId)})})}nxtOnDestroy(){}newTransactionClicked(){this.dialogService.showComponentDialog(q6t).componentInstance.new(this.moneyAccountId)}load(i){return O(this,null,function*(){this.data=yield this.socketService.getMoneyAccounts(),this.moneyAccountId=i;let r=this.data.accounts.find(o=>o.id===i);r&&(this.accountName.set(r.name),this.accountBalance.set(r.balance));let s=yield this.socketService.getMoneyTransactionsWithPre(i);this.moneyTransactions.set(s.transactions.sortNumber("datetime",!0)),this.moneyPreTransactions.set(s.preTransactions.sortNumber("createdAt"))})}deleteTransactionClicked(i){return O(this,null,function*(){(yield this.dialogService.showYesNo("M\xF6chtest du die Transaktion wirklich l\xF6schen?"))&&(yield this.socketService.deleteMoneyTransaction(i.id))})}reCalcTransactionClicked(i){return this.socketService.reCalcAccountBalance(i.accountId,i.datetime)}acceptPreTransactionClicked(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(Q6t);r.componentInstance.load(i).then(),yield Sn(r.afterClosed()),this.load(this.moneyAccountId)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-transactions"]],standalone:!0,features:[et,xe],decls:16,vars:12,consts:[[3,"dialogRef"],[3,"click"],["placeholder","Suche",3,"valueChange","value","clearIcon"],[3,"columnDefs","quickFilterText","rowData"],[1,"text-center","text-2xl","mt-4","mb-2"],[3,"columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3),Ce(4,"money"),p(),h(5,"nxt-button",1),F("click",function(){return s.newTransactionClicked()}),y(6,"Neue Transaktion"),p(),y(7," hier "),h(8,"nxt-input",2),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p()(),h(9,"nxt-page-content"),ee(10,"nxt-datagrid",3),p(),h(11,"nxt-page-content")(12,"div",4),y(13,"Offene Buchungen"),p(),ee(14,"nxt-datagrid",5),p(),ee(15,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(2),cn("",s.accountName(),"\xA0\xA0\xA0",tt(4,10,s.accountBalance()),""),g(5),qe("value",s.quickFilterText),b("clearIcon",!0),g(2),b("columnDefs",s.columnDefs)("quickFilterText",s.quickFilterText)("rowData",s.moneyTransactions()),g(4),b("columnDefs",s.preTransactionColumnDefs)("rowData",s.moneyPreTransactions()))},dependencies:[Pl,hc,Yl,Kl,dr,Al,Lt,ks,Yi],changeDetection:0});let t=e;return t})()});var Mse,pTe=Q(()=>{me();Gi();Pm();dTe();Im();Df();Am();Tf();ji();Pa();Qo();yi();Zi();Ci();G6t();uTe();U6t();$n();$6t();Y6t();Ph();tyt();Bd();il();jl();me();Mse=(()=>{let e=class e extends bt{constructor(){super(),this.moneyAccounts=gt([]),this.regions=gt([]),this.labels=gt([]),this.categories=gt([]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.permissionService=Ve(ws),this.dialogRef=Ve(Gt,{optional:!0}),this.accountColumnDefs=[{headerName:"",valueFormatter:()=>Ir.Material.Edit,nxtFieldType:Ee.Icon,nxtOnCellClicked:i=>this.upsertAccount(i.data),hide:!this.permissionService.hasPermission(Zt.MoneyAccount_Admin)},{headerName:"",valueFormatter:()=>Ir.Material.Eye,nxtFieldType:Ee.Icon,nxtOnCellClicked:i=>this.accountClicked(i.data)},{headerName:"Name",field:"name",nxtFieldType:Ee.Text},{headerName:"Typ",field:"type",nxtFieldType:Ee.Text,valueFormatter:i=>QF.getMoneyAccountTypeText(i.value)},{headerName:"Letzter Eintrag",field:"balanceTimestamp",nxtFieldType:Ee.Date_germanDateTime},{headerName:"aktueller Stand",field:"balance",nxtFieldType:Ee.Money},{headerName:"Zugriff",field:"userIds",nxtFieldType:Ee.Text,valueGetter:i=>{if(i.data.userIds)return i.data.userIds.map(r=>this.users.find(s=>s.id===r).username).sort().join(", ")},hide:!this.permissionService.hasPermission(Zt.MoneyAccount_Admin)}],this.regionColumnDefs=[{headerName:"",valueFormatter:()=>Ir.Material.Edit,nxtFieldType:Ee.Icon,nxtOnCellClicked:i=>this.upsertRegion(i.data)},{headerName:"Name",field:"name",nxtFieldType:Ee.Text},{headerName:"Beschreibung",field:"description",nxtFieldType:Ee.Text}],this.labelColumnDefs=[{headerName:"",valueFormatter:()=>Ir.Material.Edit,nxtFieldType:Ee.Icon,nxtOnCellClicked:i=>this.upsertLabel(i.data)},{headerName:"Name",field:"name",nxtFieldType:Ee.Text},{headerName:"Beschreibung",field:"description",nxtFieldType:Ee.Text}],this.categoryColumnDefs=[{headerName:"",valueFormatter:()=>Ir.Material.Edit,nxtFieldType:Ee.Icon,nxtOnCellClicked:i=>this.upsertCategory(i.data)},{headerName:"Name",field:"name",nxtFieldType:Ee.Text},{headerName:"Beschreibung",field:"description",nxtFieldType:Ee.Text}]}ngOnInit(){this.load()}nxtOnDestroy(){}load(){return O(this,null,function*(){this.users=yield this.socketService.getUsers();let i=yield this.socketService.getMoneyAccounts();this.moneyAccounts.set(i.accounts.sortString("name")),this.regions.set(i.regions),this.categories.set(i.categories),this.labels.set(i.labels)})}upsertLabel(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(j6t);i&&r.componentInstance.load(i),yield Sn(r.afterClosed()),this.load()})}upsertCategory(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(W6t);i?r.componentInstance.load(i):r.componentInstance.new(),yield Sn(r.afterClosed()),this.load()})}upsertAccount(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(H6t);i?r.componentInstance.load(i):r.componentInstance.new(),yield Sn(r.afterClosed()),this.load()})}upsertRegion(i){let r=this.dialogService.showComponentDialog(K6t);i?r.componentInstance.load(i):r.componentInstance.new(),r.afterClosed().subscribe(()=>this.load())}accountClicked(i){this.dialogService.showComponentFull(eyt).componentInstance.load(i.id)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-accounts"]],standalone:!0,features:[et,xe],decls:37,vars:9,consts:[[3,"dialogRef"],[1,"flex","flex-row","h-full","gap-3","justify-center"],[1,"flex","flex-col","w-1/2"],[1,"flex","flex-col","w-full","h-full"],[1,"flex","flex-row","justify-between","p-2"],["nxtPermission","MoneyAccount_Admin",3,"click"],[3,"rowDoubleClickNew","columnDefs","rowData"],["nxtPermission","MoneyAccount_Admin",1,"flex","flex-col","w-full","h-full"],[3,"click"],[3,"columnDefs","rowData"],["nxtPermission","MoneyAccount_Admin",1,"flex","flex-col","w-1/2"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Kassen"),p()(),h(4,"nxt-page-content")(5,"div",1)(6,"div",2)(7,"div",3)(8,"div",4)(9,"div"),y(10,"Kassen"),p(),h(11,"nxt-button",5),F("click",function(){return s.upsertAccount()}),y(12,"Neue Kasse"),p()(),h(13,"nxt-datagrid",6),F("rowDoubleClickNew",function(a){return s.accountClicked(a.data)}),p()(),h(14,"div",7)(15,"div",4)(16,"div"),y(17,"Regionen"),p(),h(18,"nxt-button",8),F("click",function(){return s.upsertRegion()}),y(19,"Neue Region"),p()(),ee(20,"nxt-datagrid",9),p()(),h(21,"div",10)(22,"div",3)(23,"div",4)(24,"div"),y(25,"Kategorien"),p(),h(26,"nxt-button",8),F("click",function(){return s.upsertCategory()}),y(27,"Neue Kategorie"),p()(),ee(28,"nxt-datagrid",9),p(),h(29,"div",3)(30,"div",4)(31,"div"),y(32,"Label"),p(),h(33,"nxt-button",8),F("click",function(){return s.upsertLabel()}),y(34,"Neues Label"),p()(),ee(35,"nxt-datagrid",9),p()()()(),ee(36,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(12),b("columnDefs",s.accountColumnDefs)("rowData",s.moneyAccounts()),g(7),b("columnDefs",s.regionColumnDefs)("rowData",s.regions()),g(8),b("columnDefs",s.categoryColumnDefs)("rowData",s.categories()),g(7),b("columnDefs",s.labelColumnDefs)("rowData",s.labels()))},dependencies:[Pl,Al,Kl,Yl,hc,dr,Lt,Zs],changeDetection:0});let t=e;return t})()});function zYi(t,e){t&1&&(h(0,"div",7),ee(1,"nxt-spinner"),p())}function HYi(t,e){if(t&1&&ee(0,"nxt-datagrid",8),t&2){let n=w();b("columnDefs",n.pivotColumnDefs())("rowData",n.pivotData())}}var kse,mTe=Q(()=>{me();Gi();Pm();Am();Tf();Im();Df();ji();yi();Pa();kl();jc();Ci();qA();o1();Gy();oo();pa();$n();DD();me();kse=(()=>{let e=class e extends bt{constructor(){super(),this.rowData=gt([]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.cacheService=Ve(cc),this.dialogRef=Ve(Gt,{optional:!0}),this.columnDefs=[{headerName:"Artist",field:"artist",pivot:!0}],this.pivotColumnDefs=vr(()=>{let i=[];i.push({headerName:"Skill",field:"skill",pinned:!0});for(let r of this.rowData())i.push({nxtCellStyle:{textAlign:"center"},colId:r.artist,headerName:r.artist,valueGetter:s=>{if(s.data[r.artist])return s.data[r.artist]},valueFormatter:s=>{if(s.value?.skillDiff)return fn.round(s.value?.skillDiff,1).toString()},tooltipValueGetter:s=>{if(s.value){let o=s.colDef.headerName,a="Skill: "+s.value.skill;a+=`
Artist: `+s.value.artistSkill,a+=`
Bewertung: `+s.value.rating,a+=`
Grundlage: `+s.value.events.length+" Termine";let l=s.value.skillDiff>0?-1:1,c=0;return s.value.todo.startsWith("must")&&(Math.abs(s.value.skillDiff)>1?c=2:c=1,c&&(a+=`

VORSCHLAG:
`+o+`
`+s.value.skill+`
`+s.value.artistSkill+" \u279E "+(s.value.artistSkill-c*l))),a}},cellStyle:s=>{switch(s.value?.todo){case"mustDown":return{backgroundColor:xn.Red,color:"#fff"};case"canDown":return{color:xn.Red};case"mustUp":return{backgroundColor:xn.Green,color:"#fff"};case"canUp":return{color:xn.Green}}},nxtOnCellDoubleClicked:s=>{this.artistClicked(s.colDef.headerName)}});return i}),this.pivotData=vr(()=>{let i=[];for(let r of this.columnDefs.filter(s=>s.field!=="artist")){let s={skill:r.field};for(let o of this.rowData())o.eventRatings[r.field]&&(s[o.artist]=St(ve({},o.eventRatings[r.field]),{skill:r.field}));i.push(s)}return i}),this.showOnlyTodos=gt(!1),qh(()=>{let i=this.showOnlyTodos();setTimeout(()=>{if(this.datagrid?.api)for(let r of this.pivotColumnDefs().filter(s=>s.field!=="skill")){let s=r.colId;console.log(s);let o=this.rowData().find(l=>l.artist===s),a=!1;if(o)for(let l of oa(o.eventRatings))o.eventRatings[l].todo.startsWith("must")&&(a=!0);this.datagrid.api.setColumnsVisible([s],a||!i)}})})}ngOnInit(){let i=this.cacheService.artists.value;this.columnDefs.push(...this.getSkillColDefs()),this.load()}nxtOnDestroy(){}load(){return O(this,null,function*(){let i=yield this.socketService.calcArtistRating("2024-08-01",Date.now().dateAddDays(1).dateFormatDate());this.rowData.set(i),console.log(i),console.log(i),console.log(i)})}getSkillColDefs(){let i=[];for(let r of R0.skills)i.push({headerName:r.description,field:r.description,valueGetter:s=>{if(s.data.eventRatings[r.description]){let o=s.data.eventRatings[r.description].skillDiff;return fn.round(o,1)}},tooltipValueGetter:s=>{if(s.data.eventRatings[r.description]){let o=s.data.eventRatings[r.description].rating,a=s.data.eventRatings[r.description].skillDiff,l=s.data.eventRatings[r.description].artistSkill,c=s.data.eventRatings[r.description].ratings.length;return"Artist: "+l+`
Bewertung: `+o+`
Grundlage : `+c+" Termine"}}});return i}artistClicked(i){return O(this,null,function*(){let r=this.dialogService.showComponentDialog(Xy),s=this.cacheService.artists.value.find(o=>o.name===i)?.id;r.componentInstance.setData(s).then(),r.componentInstance.selectedIndex.set(Xy.TabIndex_Skills),yield Sn(r.afterClosed()),this.load().then()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-artist-ratings"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.datagrid=o.first)}},standalone:!0,features:[et,xe],decls:18,vars:3,consts:[[3,"dialogRef"],[1,"flex","flex-col"],[1,"background-green",2,"color","white"],[1,"green"],[1,"red"],[1,"background-red",2,"color","white"],["placeholder","Nur soll Anpassungen",3,"valueChange","value"],[1,"flex","h-full","w-full","items-center","justify-center"],["uniqueRowDataKey","skill",3,"columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Artist-Skills anpassen"),p(),h(4,"div",1)(5,"div",2),y(6,"Gr\xFCner Hintergrund = Artist Skill soll hoch"),p(),h(7,"div",3),y(8,"Gr\xFCne Schrift = Artist Skill evtl. hoch"),p(),h(9,"div",4),y(10,"Rote Schrift = Artist Skill evtl. runter"),p(),h(11,"div",5),y(12,"Roter Hintergrund = Artist Skill soll runter"),p()(),h(13,"nxt-slide-toggle",6),Xe("valueChange",function(a){return Ze(s.showOnlyTodos,a)||(s.showOnlyTodos=a),a}),p()(),h(14,"nxt-page-content"),W(15,zYi,2,0,"div",7)(16,HYi,1,2,"nxt-datagrid",8),p(),ee(17,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(12),qe("value",s.showOnlyTodos),g(2),Je(s.rowData().length===0?15:16))},dependencies:[Pl,Yl,hc,Al,Kl,dr,yf,Nn],changeDetection:0});let t=e;return t})()});var JF,iyt=Q(()=>{Ov();ZA();Qo();k4e();JF=class t{static isNxtEventCalcItemList(e){return e&&e.items&&e.name}static isNxtEventCalcItemListArray(e){return Array.isArray(e)}static formatValues(e){if(t.isNxtEventCalcItemList(e))for(let n of e.items)n.valueFormatted=IA.formatValueByNxtFieldType(n.value,n.type);else if(t.isNxtEventCalcItemListArray(e))for(let n of e)t.formatValues(n);return e}static calcWorkType(e,n){let i=e.filter(s=>s.workType===n),r=t.getEventsCalc(i);return t.formatValues({name:n.toUpperCase(),items:r,sortValue:n})}static calcArtists(e){let n=m3.groupObjectArray(e,"artist"),i=m3.groupToObjectArray(n,"artist","events"),r=[];for(let s of i){let o=t.getEventsCalc(s.events);r.push({items:o,name:s.artist,sortValue:o.find(a=>a.id==="artistsGet")?.value})}return r=r.sortNumber("sortValue",!0),t.formatValues(r)}static getEventsCalc(e){let n=e.filter(D=>D.status==="canceled"),i=e.filter(D=>D.status==="closed"),r=e.filter(D=>D.status==="future"),s=wc.flatten(n.map(D=>D.bodyPuts?.piercing||[])),o=wc.flatten(i.map(D=>D.bodyPuts?.piercing||[])),a=wc.flatten(r.map(D=>D.bodyPuts?.piercing||[])),l=wc.flatten(n.map(D=>D.bodyPuts?.tattoo||[])),c=wc.flatten(i.map(D=>D.bodyPuts?.tattoo||[])),d=wc.flatten(r.map(D=>D.bodyPuts?.tattoo||[])),u=e.reduce((D,E)=>D+E.artistPaymentSum,0),m=n.reduce((D,E)=>D+(E.paymentSum-E.artistPaymentSum),0),f=i.reduce((D,E)=>D+(E.paymentSum-E.artistPaymentSum),0),_=r.reduce((D,E)=>D+(E.paymentSum-E.artistPaymentSum),0);return[{id:"customerCountCanceled",name:"Kundenanzahl abgesagt",value:n.length,type:Ee.Number,hideIfZero:!0},{id:"customerCountClosed",name:"Kundenanzahl fertig",value:i.length,type:Ee.Number,hideIfZero:!0},{id:"customerCountFuture",name:"Kundenanzahl offen",value:r.length,type:Ee.Number,hideIfZero:!0},{id:"piercingCountCanceled",name:"Piercings abgesagt",value:s.length,type:Ee.Number,hideIfZero:!0},{id:"piercingCountClosed",name:"Piercings fertig",value:o.length,type:Ee.Number,hideIfZero:!0},{id:"piercingCountFuture",name:"Piercings offen",value:a.length,type:Ee.Number,hideIfZero:!0},{id:"tattooCountCanceled",name:"Tattoos abgesagt",value:l.length,type:Ee.Number,hideIfZero:!0},{id:"tattooCountClosed",name:"Tattoos fertig",value:c.length,type:Ee.Number,hideIfZero:!0},{id:"tattooCountFuture",name:"Tattoos offen",value:d.length,type:Ee.Number,hideIfZero:!0},{id:"artistsGet",name:"Artist",value:u,type:Ee.Money},{id:"studioGetCanceled",name:"Studio abgesagt",value:m,type:Ee.Money},{id:"studioGetClosed",name:"Studio fertig",value:f,type:Ee.Money},{id:"studioGetFuture",name:"Studio offen",value:_,type:Ee.Money},{id:"firstEvent",name:"Erstes Termin",value:e.length>0?e[0].start:0,type:Ee.Date_germanDateTime},{id:"lastEvent",name:"Letzter Termin",value:e.length>0?e[e.length-1].start:0,type:Ee.Date_germanDateTime}]}}});function GYi(t,e){t&1&&eu(0)}function WYi(t,e){t&1&&eu(0)}function UYi(t,e){if(t&1){let n=re();vs(0),h(1,"div",6),W(2,GYi,1,0,"ng-container",7)(3,WYi,1,0,"ng-container",7),p(),h(4,"div",8)(5,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.currentItemLists=r.artist)}),y(6,"Artists"),p()(),ys()}if(t&2){let n=w(),i=pr(10);g(2),b("ngTemplateOutlet",i)("ngTemplateOutletContext",sn(4,fTe,n.piercings)),g(),b("ngTemplateOutlet",i)("ngTemplateOutletContext",sn(6,fTe,n.tattoo))}}function jYi(t,e){t&1&&eu(0)}function $Yi(t,e){if(t&1&&(vs(0),eu(1),W(2,jYi,1,0,"ng-container",7),ys()),t&2){let n=e.$implicit;w(2);let i=pr(10);g(2),b("ngTemplateOutlet",i)("ngTemplateOutletContext",sn(2,fTe,n))}}function KYi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",4),F("click",function(){V(n);let r=w();return B(r.currentItemLists=null)}),y(2,"zur\xFCck"),p(),h(3,"div",9),W(4,$Yi,3,4,"ng-container",10),p()()}if(t&2){let n=w();g(4),b("ngForOf",n.currentItemLists)}}function YYi(t,e){if(t&1&&(h(0,"div"),ee(1,"ag-charts-angular",11),p()),t&2){let n=w();g(),b("options",n.chartOptions)}}function qYi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td"),y(4),p()()),t&2){let n=w().$implicit;g(2),ye(n.name),g(2),ye(n.valueFormatted)}}function ZYi(t,e){if(t&1&&(vs(0),W(1,qYi,5,2,"tr"),ys()),t&2){let n=e.$implicit;g(),Je(!n.hideIfZero||n.value!==0?1:-1)}}function XYi(t,e){if(t&1&&(h(0,"table",12)(1,"tr")(2,"th",13),y(3),p()(),W(4,ZYi,2,1,"ng-container",10),p()),t&2){let n=e.list;g(3),ye(n.name),g(),b("ngForOf",n.items)}}var fTe,Ise,gTe=Q(()=>{Gi();iyt();Qo();ha();ore();Zi();ri();ls();me();ji();ore();fTe=t=>({list:t});Ise=(()=>{let e=class e extends bt{constructor(i,r){super(),this.dialogRef=i,this.cdRef=r,this.title="",this.NxtFieldType=Ee,this.currentItemLists=null,this.chartOptions={theme:"ag-default-dark",axes:[{type:"category",position:"bottom"},{type:"number",position:"left",keys:["geld1","geld2"],title:{text:"Euro"},label:{formatter:s=>s.value/1e3+"M"}},{type:"number",position:"right",keys:["eventCount"],title:{enabled:!0,text:"Anzahl"},label:{formatter:s=>s.value/1e3+"k"}}],data:[{artist:"Hans",geld1:1480,geld2:3843,eventCount:105311},{artist:"Peter",geld1:1440,geld2:3868,eventCount:112260},{artist:"Willhelm",geld1:1457,geld2:3900,eventCount:100491},{artist:"2016",geld1:1460,geld2:3895,eventCount:110428},{artist:"2017",geld1:1456,geld2:3891,eventCount:105601},{artist:"2018",geld1:1425,geld2:3837,eventCount:110508},{artist:"2019",geld1:1371,geld2:3775,eventCount:135198}],series:[{type:"bar",xKey:"artist",yKey:"geld1",yName:"Geld 1"},{type:"bar",xKey:"artist",yKey:"geld2",yName:"Geld 2"},{type:"bar",xKey:"artist",yKey:"eventCount",yName:"Anzahl Termine"}]}}ngOnInit(){}nxtOnDestroy(){}calc(i,r){i.sortNumber("start"),this.tattoo=JF.calcWorkType(i,"tattoo"),this.piercings=JF.calcWorkType(i,"piercing"),this.artist=JF.calcArtists(i),this.title=r}buildChart(i){let r=i[0].items.filter(o=>o.type===Ee.Money).map(o=>o.type),s={theme:"ag-default-dark",axes:[],data:[],series:[]}}close(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-events-infos"]],standalone:!0,features:[et,xe],decls:11,vars:6,consts:[["itemListTemplate",""],[1,"flex","flex-col","items-center"],[1,"flex","flex-row","justify-between","w-full"],[3,"innerHTML"],[3,"click"],[4,"ngIf"],[1,"grid","grid-cols-2","gap-4"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"pt-1"],[1,"grid","grid-cols-6","gap-4"],[4,"ngFor","ngForOf"],[2,"height","100%",3,"options"],[1,"nxt-table"],["colspan","2"]],template:function(r,s){if(r&1){let o=re();h(0,"div",1)(1,"div",2),ee(2,"div",3),Ce(3,"safeHtml"),h(4,"nxt-button-icon",4),F("click",function(){return V(o),B(s.close())}),y(5,"close"),p()(),W(6,UYi,7,8,"ng-container",5)(7,KYi,5,1,"div",5)(8,YYi,2,1,"div",5)(9,XYi,5,2,"ng-template",null,0,Cc),p()}r&2&&(g(2),b("innerHTML",tt(3,4,s.title),Pi),g(4),b("ngIf",!s.currentItemLists&&s.piercings),g(),b("ngIf",s.currentItemLists),g(),b("ngIf",!1))},dependencies:[an,Ct,rf,Lt,Hi,sre,M2t,Or],styles:[".nxt-table[_ngcontent-%COMP%]{color:#bbb;border-collapse:collapse;border:1px solid #808080}.nxt-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .nxt-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:80%;width:auto;border:1px solid #808080;padding:3px 7px}"],changeDetection:0});let t=e;return t})()});function JYi(t,e){if(t&1){let n=re();h(0,"nxt-select",12),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.value,r)||(s.value=r),B(r)}),p()}if(t&2){let n=w().$implicit;b("showClearIcon",!0)("showListAfterClear",!1)("placeholder",n.name)("options",n.options),qe("value",n.value)}}function eqi(t,e){if(t&1){let n=re();h(0,"nxt-autocomplete",13),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.value,r)||(s.value=r),B(r)}),p()}if(t&2){let n=w().$implicit;b("showClearIcon",!0)("showListAfterClear",!1)("placeholder",n.name)("options",n.options),qe("value",n.value),b("filterFields",bn(7,QYi))("maxOptionsToShow",999)}}function tqi(t,e){if(t&1){let n=re();h(0,"nxt-date-range-picker",14),Xe("valueChange",function(r){V(n);let s=w().$implicit;return Ze(s.value,r)||(s.value=r),B(r)}),p()}if(t&2){let n=w().$implicit;b("showClearIcon",!0),qe("value",n.value),b("placeholder",n.name)}}function iqi(t,e){if(t&1&&(h(0,"div",8),W(1,JYi,1,5,"nxt-select",9)(2,eqi,1,8,"nxt-autocomplete",10)(3,tqi,1,3,"nxt-date-range-picker",11),p()),t&2){let n,i=e.$implicit;g(),Je((n=i.controlType)==="select"?1:n==="search-select"?2:n==="date-range"?3:-1)}}function nqi(t,e){if(t&1){let n=re();h(0,"nxt-button",2),F("click",function(){V(n);let r=w();return B(r.showInfos())}),y(1,"Infos"),p()}}var QYi,nyt,ryt=Q(()=>{Gi();Yc();Zh();zn();Rv();gTe();Pa();Qo();Zi();pS();Ah();ih();ri();ls();me();yi();Ci();ag();ji();QYi=()=>["text"];nyt=(()=>{let e=class e extends bt{constructor(i,r,s,o,a){super(),this.socketService=i,this.dialogService=r,this.localStorageService=s,this.dialogRef=o,this.cdRef=a,this.filters=[],this.columnDef=[{field:"id",headerName:"",nxtFieldType:Ee.ShowCalendarEvent},{headerName:"Termin",field:"start",cellRenderer:l=>l.data.start.dateFormat("dd.MM.yyyy HH:mm")+" - "+l.data.end.dateFormat("HH:mm")},{headerName:"Artist",field:"artist"},{headerName:"Kunde",field:"customerObj.fullName"},{headerName:"Preis",field:"priceEstimatedFrom",nxtFieldType:Ee.Money},{headerName:"Bezahlt",field:"paymentSum",nxtFieldType:Ee.Money},{headerName:"R\xFCckzahlung",field:"paymentDepositBack",nxtFieldType:Ee.Money},{headerName:"Artist",field:"artistPaymentSum",nxtFieldType:Ee.Money},{headerName:"Stellen",valueGetter:l=>Vu.getTattooOrPiercingCount(l.data)},{headerName:"Typ",field:"workType"}],this.events=[],this.maxResults=4e3}setFiltersFromLocalStorage(){let i=this.localStorageService.getByString("events-filter");if(i)for(let r of i){let s=this.filters.find(o=>o.field===r.field);s&&(s.value=r.value)}}setFiltersToLocalStorage(){this.localStorageService.setByString("events-filter",this.filters)}ngOnInit(){return O(this,null,function*(){yield this.initFilters(),this.setFiltersFromLocalStorage()})}nxtOnDestroy(){}initFilters(){return O(this,null,function*(){let i=(yield this.socketService.getArtists()).map(r=>({text:r.name,value:r.name})).sort(Hr.sortString("text"));i=[{text:"Artist offen",value:"Artist offen"},{text:"Piercing offen",value:"Piercing offen"},...i],this.filters=[{controlType:"date-range",name:"Datum",field:"start",value:null,options:i,parseValue:r=>[Ie.parse(r.from),Ie.parse(r.till)],operator:"between"},{controlType:"select",name:"Status",field:"status",value:"",options:[{text:"Offen",value:"future"},{text:"Geschlossen",value:"closed"},{text:"Abgesagt",value:"canceled"}],operator:"=="},{controlType:"select",name:"Typ",field:"workType",value:null,options:[{text:"Piercing",value:"piercing"},{text:"Tattoo",value:"tattoo"}],operator:"=="},{controlType:"search-select",name:"Artist",field:"artist",value:"",options:i,operator:"=="}],this.cdRef.detectChanges()})}getActiveFilters(){return this.filters.map(i=>({field:i.field,value:i.parseValue?i.parseValue(i.value):i.value,operator:i.operator,controlType:i.controlType,name:i.name})).filter(i=>Es.isArray(i.value)&&!i.value[0]?!1:!!i.value)}load(){return O(this,null,function*(){if(this.getActiveFilters().length===0){this.dialogService.showOk("Bitte w\xE4hle einen Filter aus");return}this.dialogService.showLoading("Termine werden geladen"),this.events=yield this.socketService.eventList({filters:this.getActiveFilters(),maxResults:this.maxResults}),this.setFiltersToLocalStorage(),this.events.length===this.maxResults&&((yield this.dialogService.showYesNo("Dein Filter ist zu schwach, es werden max "+this.maxResults+" Termine geladen. Bitte filtere weiter.",{noText:"OK",yesText:`Trotzdem weiter!
Ich mach es auch nicht oft!
es l\xE4d dann etwas l\xE4nger...`}))?this.events=yield this.socketService.eventList({filters:this.getActiveFilters(),maxResults:2e4}):this.events=[]),this.events.length===2e4&&(this.dialogService.showOk("Es sind leider immer noch zu viele Daten, filtere weiter!"),this.events=[]),this.dialogService.hideLoading(),this.cdRef.detectChanges()})}showInfos(){let i=this.dialogService.showComponentDialog(Ise),r=[];this.nxtDatagridComponent.api.forEachNodeAfterFilter(s=>{r.push(s.data)}),i.componentInstance.calc(r,this.getFilterText())}getFilterText(){let i=[],r=this.getActiveFilters();for(let s of r)switch(s.controlType){case"date-range":i.push(s.name+" von "+s.value[0].dateFormat("dd.MM.yyyy")+" bis "+s.value[1].dateFormat("dd.MM.yyyy"));break;default:i.push(s.name+" "+s.operator+" "+s.value);break}return i.join(`
`)}closeClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(vu),R(Gt),R(Kt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-events"]],viewQuery:function(r,s){if(r&1&&ei(dr,5),r&2){let o;Pt(o=Rt())&&(s.nxtDatagridComponent=o.first)}},standalone:!0,features:[et,xe],decls:14,vars:5,consts:[[1,"flex","flex-col","nxt-page"],[1,"flex","flex-row","justify-between"],[3,"click"],[1,"grid","grid-cols-4","gap-4"],["class","w-full",4,"ngFor","ngForOf"],[1,"flex","flex-row","justify-around","pb-3"],[3,"click",4,"ngIf"],[1,"flex","grow-1","h-full","w-fill",3,"columnDefs","rowData","showFooter"],[1,"w-full"],[3,"showClearIcon","showListAfterClear","placeholder","options","value"],["valueField","value",3,"showClearIcon","showListAfterClear","placeholder","options","value","filterFields","maxOptionsToShow"],[3,"showClearIcon","value","placeholder"],[3,"valueChange","showClearIcon","showListAfterClear","placeholder","options","value"],["valueField","value",3,"valueChange","showClearIcon","showListAfterClear","placeholder","options","value","filterFields","maxOptionsToShow"],[3,"valueChange","showClearIcon","value","placeholder"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div"),y(3,"Termine auswerten"),p(),h(4,"nxt-button-icon",2),F("click",function(){return s.closeClicked()}),y(5,"close"),p()(),h(6,"div",3),W(7,iqi,4,1,"div",4),p(),h(8,"div",5)(9,"nxt-button",2),F("click",function(){return s.load()}),y(10,"Anzeigen"),p(),W(11,nqi,2,0,"nxt-button",6),p(),ee(12,"nxt-datagrid",7)(13,"div"),p()),r&2&&(g(7),b("ngForOf",s.filters),g(4),b("ngIf",s.events.length>0),g(),b("columnDefs",s.columnDef)("rowData",s.events)("showFooter",!0))},dependencies:[an,Hi,$l,Ga,$g,Lt,Ct,dr],changeDetection:0});let t=e;return t})()});var Ase,vTe=Q(()=>{me();Gi();Pm();Am();Tf();Im();Df();ji();yi();Qo();Ph();Pa();Jr();Ci();I7();me();Ase=(()=>{let e=class e extends bt{constructor(){super(),this.chats=gt([]),this.quickFilterText=gt(""),this.chatsView=vr(()=>this.chats().map(i=>{let r="";return i.lastMessageFromMe?r=i.lastBodyMeUser+": "+i.lastBodyMe:r="Kunde: "+i.lastBodyCustomer,St(ve({},i),{message:r})})),this.columnDefs=gt([{headerName:"",nxtFieldType:Ee.Icon,nxtIcon:Ir.Material.Eye,nxtOnCellClicked:i=>this.openChatClicked(i.data)},{headerName:"Name",field:"name",minWidth:250,nxtFieldType:Ee.Text},{headerName:"",nxtFieldType:Ee.Icon,nxtIcon:Ir.Material.Check,nxtOnCellClicked:i=>this.recheckDoneClicked(i.data)},{headerName:"",minWidth:120,field:"timestamp",nxtFieldType:Ee.DurationStringToNow},{headerName:"Nachricht",minWidth:500,maxWidth:1e3,field:"message",nxtFieldType:Ee.Text}]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0})}ngOnInit(){this.load().then(),this.socketService.subscribeNew("eventWhatsAppChatChanged",()=>{this.load().then()},{})}load(){return O(this,null,function*(){this.chats.set(yield this.socketService.getChatsToRecheck())})}nxtOnDestroy(){}openChatClicked(i){let r=this.dialogService.showComponentFull(h3);r.componentInstance.loadChat(i.id),r.componentInstance.title=i.name}recheckDoneClicked(i){this.socketService.setChatRecheck(i.id,!1)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-chats-to-recheck"]],standalone:!0,features:[et,xe],decls:8,vars:6,consts:[[3,"dialogRef"],["placeholder","Suche",3,"valueChange","value"],[3,"columnDefs","rowData","quickFilterText"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3),p(),h(4,"nxt-input",1),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p()(),h(5,"nxt-page-content"),ee(6,"nxt-datagrid",2),p(),ee(7,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(2),Ke("WhatsApp Chats pr\xFCfen - ",s.chatsView().length,""),g(),qe("value",s.quickFilterText),g(2),b("columnDefs",s.columnDefs())("rowData",s.chatsView())("quickFilterText",s.quickFilterText()))},dependencies:[Pl,Yl,hc,Al,Kl,dr,Yi],changeDetection:0});let t=e;return t})()});var syt,oyt=Q(()=>{$n();me();yi();Ci();syt=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.dialogService=r}showEditCareInstructionsTattooText(i,r){return O(this,null,function*(){let s=yield this.socketService.getCareInstructionsText({lang:r,workType:i}),o=yield this.dialogService.showTextareaOld({message:"<strong>PFLEGEHINWEISTEXT "+i+"</strong> - {{kunde_name}} - {{aftercare_link}}",placeholder:"",prompt:s}),a=yield Sn(o.afterClosed());a&&this.socketService.setCareInstructionsText(a,i,r)})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var ayt,lyt=Q(()=>{me();yi();Ci();ayt=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.dialogService=r,this.defaultText=""}showEditAppointmentReminderText(){return O(this,null,function*(){let i=yield this.socketService.getCustomerAppointmentReminderMessageTemplate();i||(i=this.defaultText);let s=yield(yield this.dialogService.showTextareaOld({message:"<strong>TERMINERINNERUNG</strong> - {{kunde_name}} {{uhr_icon}} {{termin_datum}} {{termin_uhrzeit}} {{datum_uhrzeit}} {{studio_adresse}} {{einverst\xE4ndniserkl\xE4rung_link}}",placeholder:"",prompt:i})).afterClosed().toPromise();s&&this.socketService.setCustomerAppointmentReminderMessageTemplate(s)})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var cyt,dyt=Q(()=>{me();yi();Ci();cyt=(()=>{let e=class e{constructor(i,r){this.socketService=i,this.dialogService=r,this.defaultText=""}showEditBirthdayMessage(){return O(this,null,function*(){let i=yield this.socketService.getCustomerBirthdayMessageTemplate();i||(i=this.defaultText);let s=yield(yield this.dialogService.showTextareaOld({message:"<strong>KUNDEN GEBURTSTAGS SMS</strong> - {{given-name}}  {{gift-card}}",placeholder:"",prompt:i})).afterClosed().toPromise();s&&this.socketService.setCustomerBirthdayMessageTemplate(s)})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function cqi(t,e){if(t&1&&(vs(0),y(1),Ce(2,"money"),ys()),t&2){let n=w().$implicit,i=w();g(),Ke(" ",tt(2,1,i.moneyStack[n]*n)," ")}}function dqi(t,e){t&1&&(vs(0),y(1," - "),ys())}function uqi(t,e){if(t&1){let n=re();h(0,"tr")(1,"td")(2,"div",8),ee(3,"img",9),p()(),h(4,"td",10)(5,"nxt-button-icon",11),F("click",function(){let r=V(n).$implicit,s=w();return B(s.removeMoney(r))}),y(6,"remove_circle"),p()(),h(7,"td",12),F("click",function(){let r=V(n).$implicit,s=w();return B(s.setMoneyCount(r))}),y(8),p(),h(9,"td",10)(10,"nxt-button-icon",11),F("click",function(){let r=V(n).$implicit,s=w();return B(s.addMoney(r))}),y(11,"add_circle"),p()(),h(12,"td",13),W(13,cqi,3,3,"ng-container",5)(14,dqi,2,0,"ng-container",5),p()()}if(t&2){let n=e.$implicit,i=w();g(3),b("ngStyle",sn(5,lqi,i.getMoneyHeight(n,.04)+"vh"))("src","assets/money/"+n+".png",Ur),g(5),Ke(" \xA0\xA0",i.moneyStack[n],"\xA0\xA0 "),g(5),b("ngIf",i.moneyStack[n]*n>0),g(),b("ngIf",i.moneyStack[n]*n===0)}}function hqi(t,e){t&1&&(h(0,"td"),y(1,"SOLL"),p())}function pqi(t,e){t&1&&(h(0,"td"),y(1,"DIFFERENZ"),p())}function mqi(t,e){if(t&1&&(h(0,"td",6),y(1),Ce(2,"money"),p()),t&2){let n=w();b("ngStyle",sn(4,uyt,n.totalMoneyShouldValueColor)),g(),ye(tt(2,2,n.totalMoneyShouldValue))}}function fqi(t,e){if(t&1&&(h(0,"td",6),y(1),Ce(2,"money"),p()),t&2){let n=w();b("ngStyle",sn(5,uyt,n.totalMoneyDiffValueColor)),g(),cn("",n.totalMoneyDiffValue>0?"+":"","",tt(2,3,n.totalMoneyDiffValue),"")}}var aqi,lqi,uyt,hyt,pyt=Q(()=>{me();yW();jc();Vd();pC();kl();Il();sg();ls();An();ri();Vt();me();Ci();Vt();An();aqi=t=>({color:t,textAlign:"center"}),lqi=t=>({margin:"4px",height:t}),uyt=t=>({color:t,textAlign:"right"});hyt=(()=>{let e=class e{constructor(i){this.dialogService=i,this.showShould=!0,this.totalMoneyShouldValue=0,this.moneyStackChange=new nt,this.totalMoneyValue=0,this.totalMoneyValueChange=new nt,this.getMoneyWidth=Af.getMoneyWidth,this.getMoneyHeight=Af.getMoneyHeight,this.moneys=Af.moneysReverse,this.totalMoneyValueColor="",this.totalMoneyShouldValueColor="",this.totalMoneyDiffValueColor="",this.totalMoneyDiffValue=0}ngOnInit(){this.calcTotalMoneyValue()}getMoneyCount(i){return this.moneyStack[i]}setMoneyCount(i){return O(this,null,function*(){let r=this.moneyStack[i]!==0?this.moneyStack[i].toString():"",o=yield(yield this.dialogService.showInputOld({isMoney:!1,prompt:r,message:"Anzahl von "+Wn.toMoneyString(i),okButtonText:"OK"})).afterClosed().toPromise();!Number.isNaN(o)&&o>=0&&(this.moneyStack[i]=Number.parseInt(o,10)),this.calcTotalMoneyValue(),this.moneyStackChange.emit(this.moneyStack)})}addMoney(i){this.moneyStack[i]++,this.calcTotalMoneyValue(),this.moneyStackChange.emit(this.moneyStack)}removeMoney(i){this.moneyStack[i]>0&&(this.moneyStack[i]--,this.calcTotalMoneyValue(),this.moneyStackChange.emit(this.moneyStack))}calcTotalMoneyValue(){this.totalMoneyValue=ca.getTotalValueFromMoneyStack(this.moneyStack),fn.round(this.totalMoneyShouldValue,2)!==this.totalMoneyValue?this.totalMoneyDiffValueColor=xn.Red:this.totalMoneyDiffValueColor=xn.Green,this.totalMoneyDiffValue=this.totalMoneyValue-this.totalMoneyShouldValue}ngAfterViewInit(){}};e.\u0275fac=function(r){return new(r||e)(R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-money-counter"]],inputs:{showShould:"showShould",moneyStack:"moneyStack",totalMoneyShouldValue:"totalMoneyShouldValue"},outputs:{moneyStackChange:"moneyStackChange",totalMoneyValueChange:"totalMoneyValueChange"},standalone:!0,features:[xe],decls:15,vars:12,consts:[["fxLayout","column","fxLayoutAlign","center center"],[1,"money-table"],[4,"ngFor","ngForOf"],[1,"value-table",2,"width","100%","text-align","center"],[3,"nxtOnMultiClick","nxtMultiClick"],[4,"ngIf"],[3,"ngStyle"],[3,"ngStyle",4,"ngIf"],["fxLayoutAlign","center center"],[3,"ngStyle","src"],[2,"text-align","center"],[3,"click"],[2,"width","50px","text-align","center","cursor","pointer",3,"click"],[1,"no-wrap",2,"min-width","120px","font-size","22px","text-align","right"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"table",1),W(2,uqi,15,7,"tr",2),p(),h(3,"table",3)(4,"tr")(5,"td",4),F("nxtOnMultiClick",function(){return s.showShould=!s.showShould}),y(6,"IST"),p(),W(7,hqi,2,0,"td",5)(8,pqi,2,0,"td",5),p(),h(9,"tr")(10,"td",6),y(11),Ce(12,"money"),p(),W(13,mqi,3,6,"td",7)(14,fqi,3,7,"td",7),p()()()),r&2&&(g(2),b("ngForOf",s.moneys),g(3),b("nxtMultiClick",3),g(2),b("ngIf",s.showShould),g(),b("ngIf",s.showShould),g(2),b("ngStyle",sn(10,aqi,s.totalMoneyValueColor)),g(),ye(tt(12,8,s.totalMoneyValue)),g(2),b("ngIf",s.showShould),g(),b("ngIf",s.showShould))},dependencies:[At,Yt,oi,Hi,rr,Dn,rs,an,Ct,Qu,ks],styles:["table[_ngcontent-%COMP%]{border-collapse:collapse}.money-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid #808080;padding:0 15px}.value-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid #808080;padding:5px 15px}"]});let t=e;return t})()});function vqi(t,e){if(t&1&&(h(0,"div",12),y(1),Ce(2,"money"),p()),t&2){let n=w();b("ngClass",sn(4,gqi,n.currentMoneyStackValue!==n.startValue)),g(),Ke("Geldwechseln, du musst mit ",tt(2,2,n.startValue)," beenden")}}function yqi(t,e){if(t&1){let n=re();h(0,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.save())}),y(1,"speichern"),p()}}var gqi,yTe,myt=Q(()=>{jc();Yc();pC();pa();kl();Il();Zi();sg();pyt();An();ri();Vt();me();yi();Ci();Kr();ji();Vt();An();gqi=t=>({red:t});yTe=(()=>{let e=class e{constructor(i,r,s,o){this.socketService=i,this.dialogService=r,this.loginService=s,this.dialogRef=o,this.currentMoneyStack={},this.totalMoneyShouldValue=0,this.colorTools=xn,this.title="",this.showShould=!0,this.mustCorrect=!1,this.currentMoneyStackValue=0,this.suppressValueChange=!1,this.suppressValueChangeErrorMessage="Der Wert darf sich nicht \xE4ndern",this.startValue=0,this.moneyStackInfoText="",this.forceForce=!1,this.payoutPrios=[]}ngOnInit(){return O(this,null,function*(){document.body.style.backgroundColor="transparent !important",this.initMoneys()})}ngOnDestroy(){}initMoneys(){(!this.currentMoneyStack||Object.keys(this.currentMoneyStack).length===0)&&(this.currentMoneyStack=ca.getEmptyMoneyStack())}getKeys(i){return Object.keys(i).map(r=>parseFloat(r)).sort(Hr.arrayNumbers())}setData(i,r,s){this.totalMoneyShouldValue=fn.roundMoney(i),s&&(this.currentMoneyStack=Sr.clone(s),this.startValue=ca.getTotalValueFromMoneyStack(this.currentMoneyStack)),this.title=r,this.currentMoneyStackValue=ca.getTotalValueFromMoneyStack(s),this.startValue>0&&this.calcReduceData()}save(){return O(this,null,function*(){if(!(this.reduceData&&(this.calcReduceData(),this.moneyStackInfoText))){if(this.suppressValueChange&&this.startValue!==ca.getTotalValueFromMoneyStack(this.currentMoneyStack)){yield this.dialogService.showOk(this.suppressValueChangeErrorMessage+`
`+this.startValue.toMoneyString());return}this.dialogRef.close(this.currentMoneyStack)}})}close(){this.dialogRef.close()}moneyStackChanged(i){this.currentMoneyStackValue=ca.getTotalValueFromMoneyStack(i),this.moneyStackInfoText&&this.calcReduceData()}calcReduceData(){if(this.moneyStackInfoText="",this.reduceData){let i=ca.combineMoneyStacks([this.reduceData.otherMoneyStack,this.currentMoneyStack]),r=ca.reduceMultiFromMoneyStack(i,this.reduceData.values,this.payoutPrios),s=[],o=[];for(let a of r.values)a.missingMoney&&a.missingMoney>0&&(s.push(a.missingMoney),o.push('<tr><td class="p-1">'+a.id+'</td><td class="p-1">'+a.missingMoney.toMoneyString()+"</td></tr>"));o.length>0&&!this.forceForce&&(this.moneyStackInfoText="Leider kannst du so nicht auszahlen.<br/>Es fehlen dir:<br/><br/><table>"+o.join("")+"</table>")}}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(Fi),R(Gt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-cash-money-counter"]],standalone:!0,features:[xe],decls:15,vars:8,consts:[["fxFlex","","fxLayout","column","fxLayoutAlign","stretch",2,"height","100%"],["fxFlex","","fxLayout","row","fxLayoutAlign","center center",2,"font-size","1.4em"],["fxLayout","column",1,"w-full"],["fxLayoutAlign","center center",1,"headline"],["fxLayoutAlign","center center","fxFlex","","class","pl-3 pt-4","style","font-size: 90%",3,"ngClass",4,"ngIf"],["fxLayout","row"],["fxFlex",""],[2,"margin-left","20px",3,"moneyStackChange","moneyStack","totalMoneyShouldValue","showShould"],["fxFlex","",1,"red","pl-3","pt-4",2,"font-size","90%",3,"nxtOnMultiClick","nxtMultiClick","innerHTML"],[1,"flex","flex-row","justify-center","gap-3"],[3,"click"],[3,"click",4,"ngIf"],["fxLayoutAlign","center center","fxFlex","",1,"pl-3","pt-4",2,"font-size","90%",3,"ngClass"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4),p(),W(5,vqi,3,6,"div",4),h(6,"div",5),ee(7,"div",6),h(8,"div",6)(9,"nxt-money-counter",7),Xe("moneyStackChange",function(a){return Ze(s.currentMoneyStack,a)||(s.currentMoneyStack=a),a}),F("moneyStackChange",function(a){return s.moneyStackChanged(a)}),p()(),h(10,"div",8),F("nxtOnMultiClick",function(){return s.forceForce=!0}),p()()()(),h(11,"div",9)(12,"nxt-button",10),F("click",function(){return s.close()}),y(13,"Abbrechen"),p(),W(14,yqi,2,0,"nxt-button",11),p()()),r&2&&(g(4),ye(s.title),g(),b("ngIf",s.suppressValueChange),g(4),qe("moneyStack",s.currentMoneyStack),b("totalMoneyShouldValue",s.totalMoneyShouldValue)("showShould",s.showShould),g(),b("nxtMultiClick",4)("innerHTML",s.moneyStackInfoText,Pi),g(4),b("ngIf",!s.mustCorrect||s.currentMoneyStackValue===s.totalMoneyShouldValue))},dependencies:[At,Yt,oi,qi,Ct,_s,Dn,No,hyt,Qu,Lt,ks],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-width:600px}.img-money[_ngcontent-%COMP%]{height:50px;margin:0 10px}.img-money-small[_ngcontent-%COMP%]{height:30px;margin:0 10px}.headline[_ngcontent-%COMP%]{margin-bottom:5px}.money-value[_ngcontent-%COMP%]{font-size:1.5em;text-align:right}.payout-table[_ngcontent-%COMP%]{border-collapse:collapse}.payout-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], .payout-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{border:1px solid #808080;padding:10px}"]});let t=e;return t})()});var fyt,gyt=Q(()=>{myt();pC();$n();Vd();kl();me();Ci();jl();Kr();yi();fyt=(()=>{let e=class e{constructor(i,r,s,o){this.dialogService=i,this.permissionService=r,this.loginService=s,this.socketService=o}startHandover(i,r=!0){return O(this,null,function*(){if(i.cashRegisterView.currentUser!==this.loginService.getUsername()){yield this.dialogService.showOk("Du f\xFChrst diese Kasse nicht");return}this.studioCashReport2Service=i;let s=this.studioCashReport2Service.cashRegisterView.startMoney+this.studioCashReport2Service.cashRegisterViewCalc.incomingPaymentsSum+this.studioCashReport2Service.cashRegisterViewCalc.incomingPaymentsSum_-this.studioCashReport2Service.cashRegisterViewCalc.outgoingPaymentsSum-this.studioCashReport2Service.cashRegisterViewCalc.outgoingPaymentsSum_;if(r&&!(yield this.dialogService.showYesNo("Du m\xF6chtest eine Kassen\xFCbergabe starten?")))return;this.studioCashReport2Service.log("Kassen\xFCbergabe gestartet");let o=yield this.dialogService.showComponentFull(yTe);o.componentInstance.setData(s,"Kasse z\xE4hlen "+this.loginService.getUsername(),ca.getEmptyMoneyStack()),o.componentInstance.showShould=!1;let a=yield Sn(o.afterClosed());if(a){let l=ca.getTotalValueFromMoneyStack(a),c=fn.roundMoney(s-l);if(this.studioCashReport2Service.log("Kassen\xFCbergabe: "+l.toMoneyString()+" gez\xE4hlt"),c!==0){let u=c>0?"zu wenig":"zu viel";if(Math.abs(c)>40){let m=`Die Kasse stimmt nicht.

Du hast `+Math.abs(c).toMoneyString()+" "+u+", damit gehts nicht weiter";this.studioCashReport2Service.log("Kassen\xFCbergabe: "+m),yield this.dialogService.showOk(m);return}else if(yield this.dialogService.showYesNo(`Die Kasse stimmt nicht.

Du hast `+Math.abs(c)+" "+u,{noText:"Weiter",yesText:"Ich z\xE4hle nochmal"}))return this.startHandover(i,!1)}let d=yield this.loginService.chooseUsername("An wen wird die Kasse \xFCbergeben?");if(d){if(this.studioCashReport2Service.log("Kassen\xFCbergabe: \xDCbergabe an "+d),d===this.loginService.getUsername()){yield this.dialogService.showOk("Du kannst die Kasse nicht an dich selbst \xFCbergeben"),this.studioCashReport2Service.log("Kassen\xFCbergabe: Du kannst die Kasse nicht an dich selbst \xFCbergeben");return}let u=!0;for(;u;){let m=yield this.dialogService.showComponentFull(yTe);m.componentInstance.setData(l,"Kasse z\xE4hlen "+d,ca.getEmptyMoneyStack()),m.componentInstance.showShould=!1;let f=yield Sn(m.afterClosed());if(f){let _=ca.getTotalValueFromMoneyStack(f);if(this.studioCashReport2Service.log("Kassen\xFCbergabe: "+d+" hat "+_.toMoneyString()+" gez\xE4hlt"),ca.isSame(a,f))this.studioCashReport2Service.log("Kassen\xFCbergabe fertig"),yield this.studioCashReport2Service.createHandover(d,s,l,a),this.loginService.userChange(d,this.loginService.getStudio()),this.socketService.logoutUsernameAll(),u=!1;else{let x=this.loginService.getUsername()+" hat "+Wn.toMoneyString(l)+" gez\xE4hlt";if(l===_&&(x="Die gez\xE4hlten Scheine / M\xFCnzen stimmen nicht \xFCberein"),u=yield this.dialogService.showYesNo(x,{noText:this.loginService.getUsername()+" z\xE4hlt nochmal",yesText:d+" z\xE4hlt nochmal"}),!u)return this.startHandover(i,!1)}}else return}}}})}};e.\u0275fac=function(r){return new(r||e)(it(vt),it(ws),it(Fi),it(lt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function Tqi(t,e){if(t&1){let n=re();h(0,"button",22),F("click",function(){V(n);let r=w();return B(r.menuItemClicked(r.MenuItem.CashRegisterDoCount))}),h(1,"mat-icon"),y(2,"calculate"),p(),h(3,"span"),y(4,"Kasse z\xE4hlen"),p()()}}var Cqi,xqi,bqi,wqi,Sqi,fl,vyt,yyt=Q(()=>{Gi();S9e();C9e();g9e();y9e();d9e();z9e();l9e();Gre();P9e();L9e();qU();U9e();f9e();dA();p9e();T9e();B9e();Ure();$9e();K9e();q9e();X9e();ri();Ja();il();fx();ls();Q9e();eTe();aTe();P6t();lTe();sx();pTe();u9e();mTe();ryt();vTe();me();nZ();oyt();lyt();Ci();dyt();gyt();Kr();w9e();Cqi=()=>["Analysis_DiscountPromotions","Analysis_StudioFee","Analysis_EventsCreatedOrUpdated"],xqi=()=>["MoneyAccount_Transactions","MoneyAccount_Admin"],bqi=()=>["Artists_Read","Artists_NewSpot"],wqi=()=>["Employees_Edit","Employees_EditEvents"],Sqi=()=>["EditUsers"];fl=function(t){return t[t.Admin=0]="Admin",t[t.DiscountPromotions=1]="DiscountPromotions",t[t.Users=2]="Users",t[t.NotAssignedPayments=3]="NotAssignedPayments",t[t.GraphicHeader=4]="GraphicHeader",t[t.NewGiftCard=5]="NewGiftCard",t[t.Inventory=6]="Inventory",t[t.Invoices=7]="Invoices",t[t.WebFormSubmits=8]="WebFormSubmits",t[t.TextTemplates=9]="TextTemplates",t[t.PayPalSms=10]="PayPalSms",t[t.WhatsappFastAnswers=11]="WhatsappFastAnswers",t[t.Contacts=12]="Contacts",t[t.NewContact=13]="NewContact",t[t.Artists=14]="Artists",t[t.NewArtistSpot=15]="NewArtistSpot",t[t.StudioFee=16]="StudioFee",t[t.Analysis=17]="Analysis",t[t.CashRegisterDoCount=18]="CashRegisterDoCount",t[t.Handover=19]="Handover",t[t.Reminders=20]="Reminders",t[t.EditBirthdayMessage=21]="EditBirthdayMessage",t[t.WhatsappChats=22]="WhatsappChats",t[t.PromoPromoUsers=23]="PromoPromoUsers",t[t.DayFinishLog=24]="DayFinishLog",t[t.CombineContacts=25]="CombineContacts",t[t.AnalysisEvents=26]="AnalysisEvents",t[t.SetNewPassword=27]="SetNewPassword",t[t.DiscountGiftCards=28]="DiscountGiftCards",t[t.DeclarationOfConsentTattoo=29]="DeclarationOfConsentTattoo",t[t.DeclarationOfConsentPiercing=30]="DeclarationOfConsentPiercing",t[t.AfterCareTattoo=31]="AfterCareTattoo",t[t.AfterCarePiercing=32]="AfterCarePiercing",t[t.Employees=33]="Employees",t[t.EmployeeCalendar=34]="EmployeeCalendar",t[t.ArtistsEditKeySafeCode=35]="ArtistsEditKeySafeCode",t[t.EmployeeWorks=36]="EmployeeWorks",t[t.MoneyAccounts=37]="MoneyAccounts",t[t.AnalysisEventsCreatedOrUpdated=38]="AnalysisEventsCreatedOrUpdated",t[t.ArtistsRatings=39]="ArtistsRatings",t[t.WhatsAppChatRecheck=40]="WhatsAppChatRecheck",t}(fl||{}),vyt=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d){super(),this.appointmentConfirmationService=i,this.careInstructionsService=r,this.appointmentReminderService=s,this.dialogService=o,this.birthdayService=a,this.handoverService=l,this.loginService=c,this.documentService=d,this.MenuItem=fl}ngOnInit(){}nxtOnDestroy(){}menuItemClicked(i){return O(this,null,function*(){let s=[{menuItem:fl.Admin,componentType:qre,full:!0},{menuItem:fl.DiscountPromotions,componentType:jre,full:!0},{menuItem:fl.Users,componentType:YU,full:!0},{menuItem:fl.NotAssignedPayments,componentType:Wre,full:!0},{menuItem:fl.GraphicHeader,componentType:Ire,full:!0},{menuItem:fl.NewGiftCard,componentType:cse,full:!1},{menuItem:fl.Inventory,componentType:vse,full:!0},{menuItem:fl.Invoices,componentType:kre,full:!0},{menuItem:fl.WebFormSubmits,componentType:Hre,full:!0},{menuItem:fl.TextTemplates,componentType:nse,full:!0},{menuItem:fl.WhatsappFastAnswers,componentType:vS,full:!0},{menuItem:fl.Contacts,componentType:hse,full:!0},{menuItem:fl.Artists,componentType:Vre,full:!0},{menuItem:fl.StudioFee,componentType:Ore,full:!0},{menuItem:fl.Reminders,componentType:ase,full:!0},{menuItem:fl.WhatsappChats,componentType:$F,full:!0},{menuItem:fl.PromoPromoUsers,componentType:pse,full:!0},{menuItem:fl.DayFinishLog,componentType:mse,full:!0},{menuItem:fl.CombineContacts,componentType:fse,full:!0},{menuItem:fl.AnalysisEvents,componentType:nyt,full:!0},{menuItem:fl.AnalysisEventsCreatedOrUpdated,componentType:Pre,full:!0},{menuItem:fl.DiscountGiftCards,componentType:yse,full:!0},{menuItem:fl.Employees,componentType:_se,full:!0},{menuItem:fl.EmployeeCalendar,componentType:Dse,full:!0},{menuItem:fl.ArtistsEditKeySafeCode,componentType:A6t,full:!1},{menuItem:fl.ArtistsRatings,componentType:kse,full:!0},{menuItem:fl.EmployeeWorks,componentType:Ese,full:!0},{menuItem:fl.MoneyAccounts,componentType:Mse,full:!0},{menuItem:fl.WhatsAppChatRecheck,componentType:Ase,full:!0}].find(o=>o.menuItem===i);if(s){s.full?this.dialogService.showComponentFull(s.componentType):this.dialogService.showComponentDialog(s.componentType);return}switch(i){case fl.PayPalSms:this.dialogService.showComponentDialog(sse,{type:"PayPal"});break;case fl.NewContact:this.dialogService.showContactForm();break;case fl.NewArtistSpot:this.dialogService.showComponentDialog(Uy).componentInstance.load("new");break;case fl.Analysis:this.dialogService.showComponentDialog(Zre,{},{minWidth:"50vw",minHeight:"80vh"});break;case fl.EditBirthdayMessage:this.birthdayService.showEditBirthdayMessage();break;case fl.Handover:this.handoverService.startHandover(this.studioCashReport2Service);break;case fl.SetNewPassword:this.loginService.newPassword();break;case fl.DeclarationOfConsentPiercing:let a=yield this.dialogService.showSelect("In welcher Sprache?",vf.languageCodes.map(u=>({text:u.name,value:u.code})),{focusInputOnInit:!0,closeOnOptionSelected:!1,value:"de",okButtonText:"Erstellen"}),l=yield this.dialogService.showYesNo("Mit Erziehungsberechtigt?");a&&this.documentService.downloadDeclarationOfConsentPiercing(-1,a,l).then();break;case fl.DeclarationOfConsentTattoo:let c=yield this.dialogService.showSelect("In welcher Sprache?",vf.languageCodes.map(u=>({text:u.name,value:u.code})),{focusInputOnInit:!0,closeOnOptionSelected:!1,value:"de",okButtonText:"Erstellen"}),d=yield this.dialogService.showYesNo("Mit Erziehungsberechtigt?");c&&this.documentService.downloadDeclarationOfConsentTattoo(-1,c,d).then();break;case fl.AfterCarePiercing:this.documentService.downloadAfterCareInstructionPiercing().then();break;case fl.AfterCareTattoo:this.documentService.downloadAfterCareInstructionTattoo().then();break}})}};e.\u0275fac=function(r){return new(r||e)(R(tA),R(syt),R(ayt),R(vt),R(cyt),R(fyt),R(Fi),R(Yre))},e.\u0275cmp=_e({type:e,selectors:[["nxt-studio-cash-report-2-menu"]],inputs:{studioCashReport2Service:"studioCashReport2Service"},standalone:!0,features:[et,xe],decls:352,vars:22,consts:[["menu",""],["whatsappMenu",""],["cash",""],["analysis",""],["artists",""],["employees",""],["customer",""],["customer_careInstructions",""],["customer_appointmentConfirmation",""],["customer_appointmentConfirmationCanceled",""],["promo",""],["documents",""],[3,"matMenuTriggerFor"],["nxtPermission","","mat-menu-item","",3,"click"],["nxtPermission","","mat-menu-item","",3,"permissionOr","matMenuTriggerFor"],["nxtPermission","","mat-menu-item","",3,"click","permissionOr"],["nxtPermission","WhatApp_ChatRecheck","mat-menu-item","",3,"click"],["nxtPermission","SuperAdmin","mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],["nxtPermission","DiscountPromotionsEdit","mat-menu-item","",3,"click"],["nxtPermission","Promo_PromotersList","mat-menu-item","",3,"matMenuTriggerFor"],["nxtPermission","NotAssignedPayments_View","mat-menu-item","",3,"click"],["mat-menu-item","",3,"click"],["nxtPermission","Admin","mat-menu-item","",3,"click"],["mat-menu-item","","nxtPermission","IsReception",3,"click"],["nxtPermission","PayPalSMSCode","mat-menu-item","",3,"click"],["nxtPermission","DayFinishLog","mat-menu-item","",3,"click"],["nxtPermission","WhatsAppFastAnswers_Edit","mat-menu-item","",3,"click"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","","nxtPermission","SuperAdmin",3,"click"],["nxtPermission","Artists_NewSpot","mat-menu-item","",3,"click"],["nxtPermission","Artists_Read","mat-menu-item","",3,"click"],["nxtPermission","Artists_EditKeySafeCode","mat-menu-item","",3,"click"],["nxtPermission","Employees_Edit","mat-menu-item","",3,"click"],["nxtPermission","Employees_EditEvents","mat-menu-item","",3,"click"],["nxtPermission","Employees_Works","mat-menu-item","",3,"click"],["mat-menu-item","","nxtPermission","IsJulian",3,"click"],["nxtPermission","Admin","mat-menu-item","",3,"matMenuTriggerFor"]],template:function(r,s){if(r&1){let o=re();h(0,"nxt-button-icon",12),y(1,"menu"),p(),h(2,"mat-menu",null,0)(4,"button",13),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.SetNewPassword))}),h(5,"mat-icon"),y(6,"password"),p(),h(7,"span"),y(8,"Passwort neu setzen"),p()(),h(9,"button",14)(10,"mat-icon"),y(11,"analytics"),p(),h(12,"span"),y(13,"Auswertungen"),p()(),h(14,"button",15),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.MoneyAccounts))}),h(15,"mat-icon"),y(16,"euro_symbol"),p(),h(17,"span"),y(18,"Kassen"),p()(),h(19,"button",16),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.WhatsAppChatRecheck))}),h(20,"mat-icon"),y(21,"task_alt"),p(),h(22,"span"),y(23,"Chat-Kontrolle"),p()(),h(24,"button",17),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Admin))}),h(25,"mat-icon"),y(26,"admin_panel_settings"),p(),h(27,"span"),y(28,"Super Admin"),p()(),h(29,"button",14)(30,"mat-icon"),y(31,"person_apron"),p(),h(32,"span"),y(33,"Artists"),p()(),h(34,"button",14)(35,"mat-icon"),y(36,"badge"),p(),h(37,"span"),y(38,"Mitarbeiter"),p()(),h(39,"button",18)(40,"mat-icon"),y(41,"text_snippet"),p(),h(42,"span"),y(43,"Dokumente"),p()(),h(44,"button",19),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.DiscountPromotions))}),h(45,"mat-icon"),y(46,"percent"),p(),h(47,"span"),y(48,"Rabatte"),p()(),h(49,"button",20)(50,"mat-icon"),y(51,"celebration"),p(),h(52,"span"),y(53,"Promo-App"),p()(),h(54,"button",15),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Users))}),h(55,"mat-icon"),y(56,"people_outline"),p(),h(57,"span"),y(58,"Benutzer"),p()(),h(59,"button",21),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.NotAssignedPayments))}),h(60,"mat-icon"),y(61,"payments"),p(),h(62,"span"),y(63,"Offene Zahlungen"),p()(),h(64,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.GraphicHeader))}),h(65,"mat-icon"),y(66,"vertical_distribute"),p(),h(67,"span"),y(68,"Grafiktitel"),p()(),h(69,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.NewGiftCard))}),h(70,"mat-icon"),y(71,"receipt_long"),p(),h(72,"span"),y(73,"Gutschein erfassen"),p()(),h(74,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Inventory))}),h(75,"mat-icon"),y(76,"assignment"),p(),h(77,"span"),y(78,"Inventar"),p()(),h(79,"button",23),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Invoices))}),h(80,"mat-icon"),y(81,"receipt"),p(),h(82,"span"),y(83,"Rechnungen"),p()(),h(84,"button",18)(85,"mat-icon"),y(86,"people"),p(),h(87,"span"),y(88,"Kunden"),p()(),h(89,"button",24),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Handover))}),h(90,"mat-icon"),y(91,"logout"),p(),h(92,"span"),y(93,"Kassen\xFCbergabe"),p()(),h(94,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.WebFormSubmits))}),h(95,"mat-icon"),y(96,"contact_mail"),p(),h(97,"span"),y(98,"Terminanfragen"),p()(),h(99,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.TextTemplates))}),h(100,"mat-icon"),y(101,"edit_note"),p(),h(102,"span"),y(103,"Textvorlagen"),p()(),h(104,"button",25),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.PayPalSms))}),h(105,"mat-icon"),y(106,"sms"),p(),h(107,"span"),y(108,"PayPal SMS-Code"),p()(),h(109,"button",18)(110,"mat-icon"),y(111,"euro"),p(),h(112,"span"),y(113,"WhatsApp"),p()(),h(114,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Reminders))}),h(115,"mat-icon"),y(116,"notifications"),p(),h(117,"span"),y(118,"Aufgabenliste"),p()(),h(119,"button",26),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.DayFinishLog))}),h(120,"mat-icon"),y(121,"manage_search"),p(),h(122,"span"),y(123,"Abrechnungs-Log"),p()()(),h(124,"mat-menu",null,1)(126,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.WhatsappChats))}),h(127,"mat-icon"),y(128,"chat"),p(),h(129,"span"),y(130,"WhatsApp-Chats"),p()(),h(131,"button",27),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.WhatsappFastAnswers))}),h(132,"mat-icon"),y(133,"format_list_bulleted"),p(),h(134,"span"),y(135,"WhatsApp-Texte"),p()()(),h(136,"mat-menu",null,2)(138,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Handover))}),h(139,"mat-icon"),y(140,"logout"),p(),h(141,"span"),y(142,"Kassen\xFCbergabe"),p()(),W(143,Tqi,5,0,"button",28),p(),h(144,"mat-menu",null,3)(146,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.AnalysisEvents))}),h(147,"mat-icon"),y(148,"calendar_view_day"),p(),h(149,"span"),y(150,"Termine"),p()(),h(151,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.AnalysisEventsCreatedOrUpdated))}),h(152,"mat-icon"),y(153,"calendar_view_day"),p(),h(154,"span"),y(155,"Termine erstellt oder aktualisiert"),p()(),h(156,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Analysis))}),h(157,"mat-icon"),y(158,"percent"),p(),h(159,"span"),y(160,"Rabatte"),p()(),h(161,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.StudioFee))}),h(162,"mat-icon"),y(163,"savings"),p(),h(164,"span"),y(165,"Studio-Abgaben"),p()(),h(166,"button",29),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.DiscountGiftCards))}),h(167,"mat-icon"),y(168,"receipt_long"),p(),h(169,"span"),y(170,"Rabattierte Gutscheine"),p()()(),h(171,"mat-menu",null,4)(173,"button",30),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.NewArtistSpot))}),h(174,"mat-icon"),y(175,"add"),p(),h(176,"span"),y(177,"Neuer Guest-Spot"),p()(),h(178,"button",31),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Artists))}),h(179,"mat-icon"),y(180,"person_apron"),p(),h(181,"span"),y(182,"Artistliste"),p()(),h(183,"button",32),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.ArtistsEditKeySafeCode))}),h(184,"mat-icon"),y(185,"person_apron"),p(),h(186,"span"),y(187,"Schl\xFCssel-Codes"),p()(),h(188,"button",31),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.ArtistsRatings))}),h(189,"mat-icon"),y(190,"person_apron"),p(),h(191,"span"),y(192,"Artist-Rating-Skills"),p()()(),h(193,"mat-menu",null,5)(195,"button",33),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Employees))}),h(196,"mat-icon"),y(197,"badge"),p(),h(198,"span"),y(199,"Mitarbeiter"),p()(),h(200,"button",34),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.EmployeeCalendar))}),h(201,"mat-icon"),y(202,"calendar_month"),p(),h(203,"span"),y(204,"Mitarbeiter Kalender"),p()(),h(205,"button",35),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.EmployeeWorks))}),h(206,"mat-icon"),y(207,"timer"),p(),h(208,"span"),y(209,"Mitarbeiter-Zeiten"),p()()(),h(210,"mat-menu",null,6)(212,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.NewContact))}),h(213,"mat-icon"),y(214,"person_add"),p(),h(215,"span"),y(216,"neuer Kunde"),p()(),h(217,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.CombineContacts))}),h(218,"mat-icon"),y(219,"merge"),p(),h(220,"span"),y(221,"Zusammenf\xFChren"),p()(),h(222,"button",36),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.Contacts))}),h(223,"mat-icon"),y(224,"people"),p(),h(225,"span"),y(226,"Kundenliste"),p()(),h(227,"button",23),F("click",function(){return V(o),B(s.appointmentReminderService.showEditAppointmentReminderText())}),h(228,"mat-icon"),y(229,"notifications"),p(),h(230,"span"),y(231,"Terminerinner. WhatsApp"),p()(),h(232,"button",37)(233,"mat-icon"),y(234,"spa"),p(),h(235,"span"),y(236,"Pflegehinweis WhatsApp"),p()(),h(237,"button",37)(238,"mat-icon"),y(239,"people"),p(),h(240,"span"),y(241,"Terminbest\xE4tigung"),p()(),h(242,"button",37)(243,"mat-icon"),y(244,"people"),p(),h(245,"span"),y(246,"Absage-Best\xE4tigung"),p()(),h(247,"button",23),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.EditBirthdayMessage))}),h(248,"mat-icon"),y(249,"people"),p(),h(250,"span"),y(251,"Geburtstagsnachricht"),p()()(),h(252,"mat-menu",null,7)(254,"button",23),F("click",function(){return V(o),B(s.careInstructionsService.showEditCareInstructionsTattooText("tattoo","de"))}),h(255,"mat-icon"),y(256,"fact_check"),p(),h(257,"span"),y(258,"Tattoo DE"),p()(),h(259,"button",23),F("click",function(){return V(o),B(s.careInstructionsService.showEditCareInstructionsTattooText("piercing","de"))}),h(260,"mat-icon"),y(261,"fact_check"),p(),h(262,"span"),y(263,"Piercing DE"),p()(),h(264,"button",23),F("click",function(){return V(o),B(s.careInstructionsService.showEditCareInstructionsTattooText("tattoo","en"))}),h(265,"mat-icon"),y(266,"fact_check"),p(),h(267,"span"),y(268,"Tattoo EN"),p()(),h(269,"button",23),F("click",function(){return V(o),B(s.careInstructionsService.showEditCareInstructionsTattooText("piercing","en"))}),h(270,"mat-icon"),y(271,"fact_check"),p(),h(272,"span"),y(273,"Piercing EN"),p()(),h(274,"button",23),F("click",function(){return V(o),B(s.careInstructionsService.showEditCareInstructionsTattooText("tattoo","nl"))}),h(275,"mat-icon"),y(276,"fact_check"),p(),h(277,"span"),y(278,"Tattoo NL"),p()(),h(279,"button",23),F("click",function(){return V(o),B(s.careInstructionsService.showEditCareInstructionsTattooText("tattoo","es"))}),h(280,"mat-icon"),y(281,"fact_check"),p(),h(282,"span"),y(283,"Tattoo ES"),p()(),h(284,"button",23),F("click",function(){return V(o),B(s.careInstructionsService.showEditCareInstructionsTattooText("tattoo","fr"))}),h(285,"mat-icon"),y(286,"fact_check"),p(),h(287,"span"),y(288,"Tattoo FR"),p()()(),h(289,"mat-menu",null,8)(291,"button",23),F("click",function(){return V(o),B(s.appointmentConfirmationService.showEditAppointmentConfirmationText("de"))}),h(292,"mat-icon"),y(293,"fact_check"),p(),h(294,"span"),y(295,"Text DE"),p()(),h(296,"button",23),F("click",function(){return V(o),B(s.appointmentConfirmationService.showEditAppointmentConfirmationText("en"))}),h(297,"mat-icon"),y(298,"fact_check"),p(),h(299,"span"),y(300,"Text EN"),p()(),h(301,"button",23),F("click",function(){return V(o),B(s.appointmentConfirmationService.showEditAppointmentConfirmationStudioText("de"))}),h(302,"mat-icon"),y(303,"fact_check"),p(),h(304,"span"),y(305,"StudioText DE"),p()(),h(306,"button",23),F("click",function(){return V(o),B(s.appointmentConfirmationService.showEditAppointmentConfirmationStudioText("en"))}),h(307,"mat-icon"),y(308,"fact_check"),p(),h(309,"span"),y(310,"StudioText EN"),p()()(),h(311,"mat-menu",null,9)(313,"button",23),F("click",function(){return V(o),B(s.appointmentConfirmationService.showEditAppointmentConfirmationTextCanceled("de"))}),h(314,"mat-icon"),y(315,"fact_check"),p(),h(316,"span"),y(317,"Text DE"),p()(),h(318,"button",23),F("click",function(){return V(o),B(s.appointmentConfirmationService.showEditAppointmentConfirmationTextCanceled("en"))}),h(319,"mat-icon"),y(320,"fact_check"),p(),h(321,"span"),y(322,"Text EN"),p()()(),h(323,"mat-menu",null,10)(325,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.PromoPromoUsers))}),h(326,"mat-icon"),y(327,"people_outline"),p(),h(328,"span"),y(329,"Promoter"),p()()(),h(330,"mat-menu",null,11)(332,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.DeclarationOfConsentTattoo))}),h(333,"mat-icon"),y(334,"text_snippet"),p(),h(335,"span"),y(336,"Einwilligungen Tattoo"),p()(),h(337,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.DeclarationOfConsentPiercing))}),h(338,"mat-icon"),y(339,"text_snippet"),p(),h(340,"span"),y(341,"Einwilligungen Piercing"),p()(),h(342,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.AfterCareTattoo))}),h(343,"mat-icon"),y(344,"text_snippet"),p(),h(345,"span"),y(346,"Pflege Tattoo"),p()(),h(347,"button",22),F("click",function(){return V(o),B(s.menuItemClicked(s.MenuItem.AfterCarePiercing))}),h(348,"mat-icon"),y(349,"text_snippet"),p(),h(350,"span"),y(351,"Pflege Piercing"),p()()()}if(r&2){let o=pr(3),a=pr(125),l=pr(145),c=pr(172),d=pr(194),u=pr(211),m=pr(253),f=pr(290),_=pr(312),x=pr(324),D=pr(331);b("matMenuTriggerFor",o),g(9),b("permissionOr",bn(17,Cqi))("matMenuTriggerFor",l),g(5),b("permissionOr",bn(18,xqi)),g(15),b("permissionOr",bn(19,bqi))("matMenuTriggerFor",c),g(5),b("permissionOr",bn(20,wqi))("matMenuTriggerFor",d),g(5),b("matMenuTriggerFor",D),g(10),b("matMenuTriggerFor",x),g(5),b("permissionOr",bn(21,Sqi)),g(30),b("matMenuTriggerFor",u),g(25),b("matMenuTriggerFor",a),g(34),b("ngIf",!1),g(89),b("matMenuTriggerFor",m),g(5),b("matMenuTriggerFor",f),g(5),b("matMenuTriggerFor",_)}},dependencies:[an,Zy,d3,Zs,_g,Zr,Ct]});let t=e;return t})()});var _yt,Cyt=Q(()=>{zn();me();_yt=(()=>{let e=class e{constructor(){}transform(i,r,s="HH:mm:ss"){return Ie.formatTime(i,r,s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=kr({name:"nxtTime",type:e,pure:!0,standalone:!0});let t=e;return t})()});var xyt,byt=Q(()=>{wD();me();od();xyt=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i){switch(t6.GetReminderColor(i)){case"red":return"background-dark-red";case"orange":return"background-orange-dark"}}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"reminderDateTimeClass",type:e,pure:!0,standalone:!0});let t=e;return t})()});function Eqi(t,e){if(t&1&&(h(0,"div",9)(1,"div",10),y(2,"Alles erledigt"),p(),h(3,"div",10),y(4),p()()),t&2){let n=w();g(4),ye(n.goodEmojis)}}function Mqi(t,e){t&1&&(h(0,"div",10),y(1,"Eine Aufgabe"),p())}function kqi(t,e){if(t&1){let n=re();h(0,"div",14),F("click",function(){V(n);let r=w(2);return B(r.showImportantRemindersDialog())}),y(1),p()}if(t&2){let n=w(2);g(),Ke("",n.reminders.length," Aufgaben")}}function Iqi(t,e){if(t&1&&(h(0,"div",11),W(1,Mqi,2,0,"div",12)(2,kqi,2,1,"div",13),p()),t&2){let n=w();g(),b("ngIf",n.reminders.length===1),g(),b("ngIf",n.reminders.length>1)}}function Aqi(t,e){if(t&1){let n=re();h(0,"div",17),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.reminderGroupClicked(r))})("contextmenu",function(r){let s=V(n).$implicit,o=w(2);return B(o.reminderGroupContextClicked(s,r))}),h(1,"div",18)(2,"div",19),y(3),p(),h(4,"div",20),y(5),p()()()}if(t&2){let n=e.$implicit,i=w(2);mo("background-color",n.color),b("ngClass",sn(5,Dqi,i.currentReinderGroup===n.text)),g(3),ye(n.count),g(2),ye(n.text)}}function Pqi(t,e){if(t&1&&(h(0,"div",15),W(1,Aqi,6,7,"div",16),p()),t&2){let n=w();g(),b("ngForOf",n.remindersGrouped)}}function Rqi(t,e){t&1&&ee(0,"div",21)}function Fqi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"workplace"),p()),t&2){let n=w().$implicit;g(),cn("",n.createdBy!=="System"?n.createdBy+" \u279E ":"","",tt(2,2,n.toDoByWorkplace),"")}}function Lqi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w().$implicit;g(),cn("",n.createdBy!=="System"?n.createdBy+" \u279E ":"","",n.toDoByUser,"")}}function Oqi(t,e){t&1&&(h(0,"div"),y(1,"Alle"),p())}function Nqi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w(2).$implicit;g(),Ke("",Nt(2,1,n==null||n.refObj==null?null:n.refObj.start,"dd.MM")," ")}}function Vqi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2).$implicit;g(),Ke("#",n==null||n.refObj==null?null:n.refObj.fastWalkInNo,"\xA0")}}function Bqi(t,e){if(t&1&&(h(0,"div",37)(1,"div",38)(2,"div",26)(3,"div"),W(4,Nqi,3,4,"div",39),h(5,"div"),y(6),Ce(7,"nxtTime"),Ce(8,"nxtTime"),p()(),h(9,"div"),y(10),p()(),h(11,"div",40),W(12,Vqi,2,1,"div",39),h(13,"div"),y(14),p()()()()),t&2){let n=w().$implicit,i=w(2);g(4),b("ngIf",(n==null||n.refObj==null?null:n.refObj.startDateString)&&n.refObj.startDateString!==i.todayDateString),g(2),cn("",Xf(7,6,n==null||n.refObj==null?null:n.refObj.start,!0,"HH:mm"),"-",Xf(8,10,n==null||n.refObj==null?null:n.refObj.end,!0,"HH:mm"),""),g(4),ye(n==null||n.refObj==null?null:n.refObj.artist),g(2),b("ngIf",n==null||n.refObj==null?null:n.refObj.fastWalkInNo),g(2),ye(n==null||n.refObj==null||n.refObj.customerObj==null?null:n.refObj.customerObj.fullName)}}function zqi(t,e){if(t&1&&(h(0,"div",41)(1,"div",42)(2,"div"),y(3),p(),h(4,"div"),y(5),Ce(6,"fromNowText"),Ce(7,"nxtDate"),p()()()),t&2){let n=w().$implicit;g(3),ye(n.createdBy),g(2),cn("",Nt(6,3,n.createdAt,!0)," ",Nt(7,6,n.createdAt,"HH:mm"),"")}}function Hqi(t,e){if(t&1){let n=re();h(0,"div",24)(1,"div",25),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.reminderClicked(r))}),h(2,"div",26)(3,"div",27)(4,"div"),y(5),p(),W(6,Fqi,3,4,"div")(7,Lqi,2,2,"div")(8,Oqi,2,0,"div"),p(),h(9,"div",28),Ce(10,"reminderDateTimeClass"),h(11,"div",29),y(12),Ce(13,"nxtDate"),p()()(),h(14,"div",30),y(15),Ce(16,"fromNowText"),p()(),h(17,"div",31),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.reminderClicked(r))}),W(18,Bqi,15,14,"div",32),p(),h(19,"div",33),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.reminderClicked(r))}),h(20,"div",34),ee(21,"div",35),Ce(22,"safeHtml"),p()(),W(23,zqi,8,9,"div",36),p()}if(t&2){let n=e.$implicit,i=e.index,r=w(2);mo("background-color",n.color),g(5),Ke("",i+1,"."),g(),Je(n.toDoByWorkplace?6:n.toDoByUser?7:8),g(3),jr(tt(10,11,n)),g(3),ye(Nt(13,13,n.reminderDateTime,"HH:mm")),g(3),ye(tt(16,16,n.reminderDateTime)),g(3),b("ngIf",n.refType===r.NxtReminderRefType.Event),g(3),b("innerHTML",tt(22,18,n.description),Pi),g(2),b("ngIf",!1)}}function Gqi(t,e){if(t&1&&(h(0,"div",22),W(1,Hqi,24,20,"div",23),p()),t&2){let n=w();g(),b("ngForOf",n.remindersFiltered)}}var Dqi,wyt,Syt=Q(()=>{me();Gi();zn();wD();jo();$v();pa();iZ();$A();Bd();jc();Cyt();byt();B1();ha();go();An();ri();Vt();oo();W_();ej();me();yi();Ci();hX();Kr();jl();RA();N9e();Cs();Vt();An();Dqi=t=>({"current-reminder-group":t});wyt=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d){super(),this.socketService=i,this.dialogService=r,this.stencilService=s,this.loginService=o,this.permissionService=a,this.reminderService=l,this.audioService=c,this.configService=d,this.dataChanged=new nt,this.NxtReminderRefType=u3,this.goodEmojis="",this.todayDateString=Ie.formatNowDate(),this.remindersGrouped=[],this.currentReinderGroup="",this.filterOnlyMe=gt(!0),this.load(!1),Tp(this.filterOnlyMe).subscribe(()=>this.load(!1)),this.audioInterval=setInterval(()=>this.notificationInterval(),Qt.DURATION_1MINUTE*5)}ngOnInit(){this.pushSocketSubscription=this.socketService.subscribeNew("onReminderUpdate",()=>{this.load(!1)},{emitInitial:!0}),this.startAutoReload()}nxtOnDestroy(){this.stopIntervalls()}stopIntervalls(){Cu.clear(this.autoReloadInterval),Cu.clear(this.checkForHighlightInterval),Cu.clear(this.audioInterval)}load(i){return O(this,null,function*(){this.setReminders(yield this.socketService.getRemindersByDate({dateString:Ie.formatNowDate(),appendRef:!0,withOldOpen:!0})),this.refreshReminders(),this.goodEmojis=rD.getNice(2),i&&this.showImportantRemindersDialog()})}startAutoReload(){this.stopIntervalls(),window.location.hostname!=="localhost"&&(this.autoReloadInterval=setInterval(()=>this.load(!0),Qt.DURATION_1MINUTE*4),this.checkForHighlightInterval=setInterval(()=>this.refreshReminders(),Qt.DURATION_1MINUTE))}checkForHighlight(){let i=!1;for(let r of this.reminders)r.reminderDateTime<Date.now()&&(i=!0);this.sideBar&&(this.sideBar?.highlight(i),i&&this.sideBar.expand())}refreshReminders(){this.reminders&&(this.reminders.forEach(i=>{i.color=t6.GetReminderColor(i),i.sortValue=t6.GetReminderSortValue(i)}),this.setReminders(Sr.clone(this.reminders)),this.checkForHighlight()),this.dataChanged.emit()}reminderClicked(i){return O(this,null,function*(){this.reminderService.reminderClicked(i)})}postpone(i,r){return O(this,null,function*(){if(r.stopPropagation(),r.preventDefault(),i.maxPostponesReached){this.dialogService.showOk("Mehr als "+i.maxPostpones+` mal verschieben ist nicht m\xF6glich!

Bitte erledige jetzt diese Aufgabe!`);return}i.postponeDurations||(i.postponeDurations=[Qt.DURATION_1MINUTE*10]);let s=yield this.dialogService.showButtons(i.description,{buttons:i.postponeDurations.map(o=>({text:Qt.toText(o)+" verschieben",value:o})),textAlign:"center",showCancelButton:!0});s?.value&&this.socketService.postponeReminder({reminderId:i.id,postponeDuration:s.value}).then()})}setReminders(i){if(!i)return;this.filterOnlyMe()&&(i=i.filter(o=>{if(!this.filterOnlyMe())return!0;let a=!o.toDoByWorkplace||o.toDoByWorkplace===this.loginService.getWorkplace(),l=!o.toDoByUser||o.toDoByUser===this.loginService.getUsername();return a&&l})),i.forEach(o=>{o.priority||(o.priority=0)}),this.reminders=i.filter(o=>!(o.reminderDateTime-Qt.DURATION_1MINUTE*15>Date.now()&&o.hideIfNotOverDue)).sort(t6.sortReminders),this.remindersGrouped=[];let r={},s={};for(let o of this.reminders)o.groupName||(o.groupName=o.description),r[o.groupName]||(s[o.groupName]="",r[o.groupName]=0),r[o.groupName]++,o.color===xn.RedDark?s[o.groupName]=xn.RedDark:o.color===xn.OrangeDark&&s[o.groupName]!==xn.RedDark&&(s[o.groupName]=xn.OrangeDark);for(let o of Object.keys(r)){let a=o.length>20?o.substring(0,20)+"...":o;this.remindersGrouped.push({text:o,count:r[o],textShort:a,color:s[o]})}this.setFilteredReminders()}sendStencilRequest(i,r){r.stopPropagation(),r.preventDefault(),this.stencilService.showStencilRequestDialog(i.refId).then()}setFilteredReminders(){this.currentReinderGroup&&(this.remindersGrouped.find(i=>i.text===this.currentReinderGroup)||(this.currentReinderGroup=null)),this.remindersFiltered=this.reminders.filter(i=>this.currentReinderGroup?i.groupName===this.currentReinderGroup:!(i.priority<30&&i.color!=="red"))}showImportantRemindersDialog(){this.loginService.isReception()&&this.reminders.filter(r=>r.color==="red").length>0&&this.dialogService.showOk(`<div class="text-200">Es gibt \xFCberf\xE4llige rote Aufgaben!

Bitte erledige Sie!</div>`,{title:'<div class="text-250">\u{1F4E3}\u{1F4E3}\u{1F4E3}</div>',timeoutSeconds:40,buttonText:"JA, mache ich jetzt direkt!"})}reminderGroupClicked(i){xg.clear(this.clearReminderGroupFilterTimeout),this.currentReinderGroup===i.text?this.currentReinderGroup="":(this.currentReinderGroup=i.text,this.clearReminderGroupFilterTimeout=setTimeout(()=>{this.currentReinderGroup="",this.setFilteredReminders()},Qt.DURATION_1MINUTE*3)),this.setFilteredReminders()}reminderGroupContextClicked(i,r){return O(this,null,function*(){if(r.stopPropagation(),r.preventDefault(),this.permissionService.hasPermission(Zt.SuperAdmin)){let s=this.reminders.filter(o=>o.description===i.text);if(yield this.dialogService.showYesNo(s.length+` Aufgaben auf erledigt setzen?

`+i.text))for(let o of s)this.socketService.setReminderDone(o.id,!0)}})}notificationInterval(){return O(this,null,function*(){this.loginService.isBackoffice()&&this.socketService.state.value.authenticated&&this.remindersFiltered.some(i=>i.reminderDateTime+Qt.DURATION_1MINUTE*3<Date.now())&&this.audioService.playReminderNotification()})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt),R(LA),R(Fi),R(ws),R(T5),R(ose),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-studio-cash-report-side-bar"]],inputs:{sideBar:"sideBar"},outputs:{dataChanged:"dataChanged"},standalone:!0,features:[et,xe],decls:12,vars:6,consts:[["fxLayout","column",1,"pb-2","px-2","w-full","h-100",2,"border","0 solid yellow"],["fxLayout","column","fxLayoutAlign","start center",1,"header","w-full","h-100",2,"border","0px solid red"],[1,"no-wrap","pb-2",3,"valueChange","value"],["fxLayout","column","fxLayoutAlign","center center","class","w-full",4,"ngIf"],[1,"text-[32px]","cursor-pointer",3,"click"],["fxLayout","column","fxLayoutAlign","center center","class","w-full pb-2",4,"ngIf"],["class","w-full pb-2","fxLayoutGap","3px","fxLayout","column","fxLayoutAlign","center",4,"ngIf"],["class","py-1 w-full","style","border-top:1px solid #ffff",4,"ngIf"],["fxLayout","column","class","w-full","fxLayoutGap","5px","style","border: 0px solid blue; overflow: auto",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center",1,"w-full"],["fxFlex",""],["fxLayout","column","fxLayoutAlign","center center",1,"w-full","pb-2"],["fxFlex","",4,"ngIf"],["fxFlex","",3,"click",4,"ngIf"],["fxFlex","",3,"click"],["fxLayoutGap","3px","fxLayout","column","fxLayoutAlign","center",1,"w-full","pb-2"],["class","p-1 mouse-pointer w-full reminder-group text-center","fxLayout","column",3,"ngClass","background-color","click","contextmenu",4,"ngFor","ngForOf"],["fxLayout","column",1,"p-1","mouse-pointer","w-full","reminder-group","text-center",3,"click","contextmenu","ngClass"],["fxLayout","row","fxLayoutAlign","start center"],[1,"text-80","px-1"],[1,"text-60","no-wrap","o-dots"],[1,"py-1","w-full",2,"border-top","1px solid #ffff"],["fxLayout","column","fxLayoutGap","5px",1,"w-full",2,"border","0px solid blue","overflow","auto"],["fxLayout","column","class","reminder w-full",3,"background-color",4,"ngFor","ngForOf"],["fxLayout","column",1,"reminder","w-full"],[1,"reminder-header","pt-1","flex","flex-col","items-center",3,"click"],["fxLayout","row","fxLayoutAlign","space-between",1,"w-full"],["fxLayout","row",1,"no-wrap"],["fxLayout","column","fxLayoutAlign","start end"],[2,"text-align","right"],[1,"flex","pt-1"],["fxLayout","column",1,"reminder-type","px-1","py-1",3,"click"],["style","font-size: 60%","fxLayout","column",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center",1,"reminder-body","px-1","py-1","max-w-full","overflow-hidden",3,"click"],["fxLayoutAlign","center center",1,"max-w-full","overflow-hidden",2,"text-align","center","overflow","hidden"],[1,"reminder-body-html",3,"innerHTML"],["class","reminder-footer","fxLayout","column",4,"ngIf"],["fxLayout","column",2,"font-size","60%"],["fxLayout","column","fxLayoutAlign","center center"],[4,"ngIf"],["fxLayout","row"],["fxLayout","column",1,"reminder-footer"],["fxLayout","row","fxLayoutAlign","space-between center"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div")(3,"nxt-slide-toggle",2),F("valueChange",function(a){return s.filterOnlyMe.set(a)}),y(4,"nur f\xFCr Mich"),p()(),W(5,Eqi,5,1,"div",3),h(6,"div",4),F("click",function(){return s.reminderService.showCreateReminder()}),y(7,"+"),p(),W(8,Iqi,3,2,"div",5)(9,Pqi,2,1,"div",6)(10,Rqi,1,0,"div",7)(11,Gqi,2,1,"div",8),p()()),r&2&&(g(3),b("value",s.filterOnlyMe()),g(2),b("ngIf",s.reminders&&s.reminders.length===0),g(3),b("ngIf",s.reminders&&s.reminders.length>0),g(),b("ngIf",s.reminders&&s.reminders.length>0),g(),b("ngIf",s.reminders&&s.reminders.length>2),g(),b("ngIf",s.reminders))},dependencies:[At,Yt,$r,oi,qi,Ct,Hi,_s,Dn,No,Hn,Or,ld,xyt,_yt,Nn,ZF],styles:["[_nghost-%COMP%]{height:100%}[_nghost-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar{width:0px}.reminder-group[_ngcontent-%COMP%]{cursor:pointer;border-radius:3px;background-color:#404040}.reminder[_ngcontent-%COMP%]{cursor:pointer;color:#bbb;background-color:#404040;border-radius:3px}.reminder[_ngcontent-%COMP%]   .reminder-header[_ngcontent-%COMP%]{padding:2px 3px 0;font-size:60%}.reminder[_ngcontent-%COMP%]   .reminder-body[_ngcontent-%COMP%]{display:block;word-wrap:break-word;font-size:75%;overflow:hidden}.reminder[_ngcontent-%COMP%]   .reminder-body[_ngcontent-%COMP%]   .reminder-body-html[_ngcontent-%COMP%]{word-wrap:break-word;display:block;overflow:hidden;max-width:100%}.reminder[_ngcontent-%COMP%]   .reminder-buttons[_ngcontent-%COMP%]{font-size:50%}.reminder[_ngcontent-%COMP%]   .reminder-buttons[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px}.reminder[_ngcontent-%COMP%]   .reminder-footer[_ngcontent-%COMP%]{font-size:50%;padding:2px}.current-reminder-group[_ngcontent-%COMP%]{font-size:120%;color:#fff;font-weight:700;border:1px solid #eee}"]});let t=e;return t})()});function Kqi(t,e){t&1&&(h(0,"div",8),Ln(1),p())}var Wqi,Uqi,jqi,$qi,Tyt,Dyt=Q(()=>{Gi();$n();uve();Ja();hZ();An();ri();me();Kr();An();Wqi=["toggleBackground"],Uqi=["*"],jqi=t=>({left:t}),$qi=t=>({width:t});Tyt=(()=>{let e=class e extends bt{constructor(i){super(),this.loginService=i,this.toggleHighlight=!1,this.expandedWidth=150,this.state=new qs("collapsed"),this.collapsedWidth=0,this.currentWidth=0,this.toggleExpandedAnimation="shakeX",this.state.subscribe(r=>{this.checkWidth()})}ngOnInit(){this.checkWidth()}nxtOnDestroy(){}toggle(){this.state.value==="collapsed"?this.state.next("expanded"):this.state.next("collapsed")}highlight(i){this.toggleHighlight=i}expand(){this.state.next("expanded")}collapse(){this.state.next("collapsed")}checkWidth(){this.state.value==="collapsed"?this.currentWidth=this.collapsedWidth:this.currentWidth=this.expandedWidth}};e.\u0275fac=function(r){return new(r||e)(R(Fi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-side-bar-left"]],viewQuery:function(r,s){if(r&1&&ei(Wqi,5),r&2){let o;Pt(o=Rt())&&(s.toggleBackground=o.first)}},inputs:{toggleHighlight:"toggleHighlight",expandedWidth:"expandedWidth",collapsedWidth:"collapsedWidth"},standalone:!0,features:[et,xe],ngContentSelectors:Uqi,decls:13,vars:22,consts:[["toggleBackground",""],[1,"toggle-wrapper",3,"ngStyle","nxtAnimate","nxtInterval"],[3,"click"],[1,"toggle-background"],[1,"toggle-icon"],[1,"h-100",2,"border","0px solid white",3,"duration","trigger"],[1,"h-100",2,"border","0px solid green",3,"ngStyle"],["class","h-100","style","border: 0px solid orange",4,"ngIf"],[1,"h-100",2,"border","0px solid orange"]],template:function(r,s){if(r&1){let o=re();gr(),h(0,"div",1)(1,"div",2),Ce(2,"async"),F("click",function(){return V(o),B(s.toggle())}),ee(3,"div",3,0),h(5,"mat-icon",4),y(6),Ce(7,"async"),p()()(),h(8,"nxt-smooth-width",5),Ce(9,"async"),h(10,"div",6),W(11,Kqi,2,0,"div",7),Ce(12,"async"),p()()}r&2&&(b("ngStyle",sn(18,jqi,s.currentWidth-14+"px"))("nxtAnimate",s.toggleHighlight&&s.state.value==="collapsed"?s.toggleExpandedAnimation:"")("nxtInterval",1e4),g(),jr("toggle toggle-"+tt(2,10,s.state)+" "+(s.toggleHighlight?"toggle-highlight":"")),g(5),ye(tt(7,12,s.state)==="expanded"?"arrow_left":"arrow_right"),g(2),b("duration",.1)("trigger",tt(9,14,s.state)),g(2),b("ngStyle",sn(20,$qi,s.currentWidth+"px")),g(),b("ngIf",tt(12,16,s.state)==="expanded"))},dependencies:[rr,Dn,rs,EB,Zr,UX,Ct,Xu],styles:[".toggle-collapsed.toggle-highlight[_ngcontent-%COMP%]{transform:scale(2) translate(-6px)}.toggle-collapsed.toggle-highlight[_ngcontent-%COMP%]   .toggle-background[_ngcontent-%COMP%]{background-color:#ff3737!important}.toggle-collapsed.toggle-highlight[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{transform:translate(5px)}.toggle-wrapper[_ngcontent-%COMP%]{z-index:99;position:fixed;top:calc(50% - 45px)}.toggle-wrapper[_ngcontent-%COMP%]   .toggle[_ngcontent-%COMP%]{cursor:pointer;width:34px;height:34px;display:flex;justify-content:center;align-items:center;z-index:100}.toggle-wrapper[_ngcontent-%COMP%]   .toggle[_ngcontent-%COMP%]   .toggle-background[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;font-size:28px;width:28px;height:28px;background-color:#ffffff80;border-radius:50%;z-index:101}.toggle-wrapper[_ngcontent-%COMP%]   .toggle[_ngcontent-%COMP%]   .toggle-icon[_ngcontent-%COMP%]{position:relative;left:-1px;top:1px;color:#2a2a2a;font-size:34px;width:34px;height:34px;z-index:102}"]});let t=e;return t})()});var Myt=xr((kus,Eyt)=>{var Yqi=Eyt.exports=function(t){this.top=t.top,this.left=t.left,this.width=t.width,this.spacing=t.spacing,this.targetRowHeight=t.targetRowHeight,this.targetRowHeightTolerance=t.targetRowHeightTolerance,this.minAspectRatio=this.width/t.targetRowHeight*(1-t.targetRowHeightTolerance),this.maxAspectRatio=this.width/t.targetRowHeight*(1+t.targetRowHeightTolerance),this.edgeCaseMinRowHeight=t.edgeCaseMinRowHeight,this.edgeCaseMaxRowHeight=t.edgeCaseMaxRowHeight,this.widowLayoutStyle=t.widowLayoutStyle,this.isBreakoutRow=t.isBreakoutRow,this.items=[],this.height=0};Yqi.prototype={addItem:function(t){var e=this.items.concat(t),n=this.width-(e.length-1)*this.spacing,i=e.reduce(function(l,c){return l+c.aspectRatio},0),r=n/this.targetRowHeight,s,o,a;return this.isBreakoutRow&&this.items.length===0&&t.aspectRatio>=1?(this.items.push(t),this.completeLayout(n/t.aspectRatio,"justify"),!0):i<this.minAspectRatio?(this.items.push(Object.assign({},t)),!0):i>this.maxAspectRatio?this.items.length===0?(this.items.push(Object.assign({},t)),this.completeLayout(n/i,"justify"),!0):(s=this.width-(this.items.length-1)*this.spacing,o=this.items.reduce(function(l,c){return l+c.aspectRatio},0),a=s/this.targetRowHeight,Math.abs(i-r)>Math.abs(o-a)?(this.completeLayout(s/o,"justify"),!1):(this.items.push(Object.assign({},t)),this.completeLayout(n/i,"justify"),!0)):(this.items.push(Object.assign({},t)),this.completeLayout(n/i,"justify"),!0)},isLayoutComplete:function(){return this.height>0},completeLayout:function(t,e){var n=this.left,i=this.width-(this.items.length-1)*this.spacing,r,s,o,a,l,c;(typeof e>"u"||["justify","center","left"].indexOf(e)<0)&&(e="left"),s=Math.max(this.edgeCaseMinRowHeight,Math.min(t,this.edgeCaseMaxRowHeight)),t!==s?(this.height=s,r=i/s/(i/t)):(this.height=t,r=1),this.items.forEach(function(d){d.top=this.top,d.width=d.aspectRatio*this.height*r,d.height=this.height,d.left=n,n+=d.width+this.spacing},this),e==="justify"?(n-=this.spacing+this.left,o=(n-this.width)/this.items.length,a=this.items.map(function(d,u){return Math.round((u+1)*o)}),this.items.length===1?(l=this.items[0],l.width-=Math.round(o)):this.items.forEach(function(d,u){u>0?(d.left-=a[u-1],d.width-=a[u]-a[u-1]):d.width-=a[u]})):e==="center"&&(c=(this.width-n)/2,this.items.forEach(function(d){d.left+=c+this.spacing},this))},forceComplete:function(t,e){typeof e=="number"?this.completeLayout(e,this.widowLayoutStyle):this.completeLayout(this.targetRowHeight,this.widowLayoutStyle)},getItems:function(){return this.items}}});var Iyt=xr((Ius,kyt)=>{"use strict";var qqi=Myt();function _Te(t,e){var n;return t.fullWidthBreakoutRowCadence!==!1&&(e._rows.length+1)%t.fullWidthBreakoutRowCadence===0&&(n=!0),new qqi({top:e._containerHeight,left:t.containerPadding.left,width:t.containerWidth-t.containerPadding.left-t.containerPadding.right,spacing:t.boxSpacing.horizontal,targetRowHeight:t.targetRowHeight,targetRowHeightTolerance:t.targetRowHeightTolerance,edgeCaseMinRowHeight:.5*t.targetRowHeight,edgeCaseMaxRowHeight:2*t.targetRowHeight,rightToLeft:!1,isBreakoutRow:n,widowLayoutStyle:t.widowLayoutStyle})}function CTe(t,e,n){return e._rows.push(n),e._layoutItems=e._layoutItems.concat(n.getItems()),e._containerHeight+=n.height+t.boxSpacing.vertical,n.items}function Zqi(t,e,n){var i=[],r,s,o;return t.forceAspectRatio&&n.forEach(function(a){a.forcedAspectRatio=!0,a.aspectRatio=t.forceAspectRatio}),n.some(function(a,l){if(isNaN(a.aspectRatio))throw new Error("Item "+l+" has an invalid aspect ratio");if(s||(s=_Te(t,e)),r=s.addItem(a),s.isLayoutComplete()){if(i=i.concat(CTe(t,e,s)),e._rows.length>=t.maxNumRows)return s=null,!0;if(s=_Te(t,e),!r&&(r=s.addItem(a),s.isLayoutComplete())){if(i=i.concat(CTe(t,e,s)),e._rows.length>=t.maxNumRows)return s=null,!0;s=_Te(t,e)}}}),s&&s.getItems().length&&t.showWidows&&(e._rows.length?(e._rows[e._rows.length-1].isBreakoutRow?o=e._rows[e._rows.length-1].targetRowHeight:o=e._rows[e._rows.length-1].height,s.forceComplete(!1,o)):s.forceComplete(!1),i=i.concat(CTe(t,e,s)),t._widowCount=s.getItems().length),e._containerHeight=e._containerHeight-t.boxSpacing.vertical,e._containerHeight=e._containerHeight+t.containerPadding.bottom,{containerHeight:e._containerHeight,widowCount:t._widowCount,boxes:e._layoutItems}}kyt.exports=function(t,e){var n={},i={},r={containerWidth:1060,containerPadding:10,boxSpacing:10,targetRowHeight:320,targetRowHeightTolerance:.25,maxNumRows:Number.POSITIVE_INFINITY,forceAspectRatio:!1,showWidows:!0,fullWidthBreakoutRowCadence:!1,widowLayoutStyle:"left"},s={},o={};return e=e||{},n=Object.assign(r,e),s.top=isNaN(parseFloat(n.containerPadding.top))?n.containerPadding:n.containerPadding.top,s.right=isNaN(parseFloat(n.containerPadding.right))?n.containerPadding:n.containerPadding.right,s.bottom=isNaN(parseFloat(n.containerPadding.bottom))?n.containerPadding:n.containerPadding.bottom,s.left=isNaN(parseFloat(n.containerPadding.left))?n.containerPadding:n.containerPadding.left,o.horizontal=isNaN(parseFloat(n.boxSpacing.horizontal))?n.boxSpacing:n.boxSpacing.horizontal,o.vertical=isNaN(parseFloat(n.boxSpacing.vertical))?n.boxSpacing:n.boxSpacing.vertical,n.containerPadding=s,n.boxSpacing=o,i._layoutItems=[],i._awakeItems=[],i._inViewportItems=[],i._leadingOrphans=[],i._trailingOrphans=[],i._containerHeight=n.containerPadding.top,i._rows=[],i._orphans=[],n._widowCount=0,Zqi(n,i,t.map(function(a){return a.width&&a.height?{aspectRatio:a.width/a.height}:{aspectRatio:a}}))}});function Qqi(t,e){if(t&1&&(h(0,"mat-button-toggle",17),y(1),Ce(2,"nxtStudio"),p()),t&2){let n=e.$implicit;b("value",n),g(),ye(tt(2,2,n))}}function Jqi(t,e){if(t&1){let n=re();h(0,"div",1)(1,"mat-button-toggle-group",16),Xe("ngModelChange",function(r){V(n);let s=w();return Ze(s.filterStudio,r)||(s.filterStudio=r),B(r)}),Kn(2,Qqi,3,4,"mat-button-toggle",17,sa),p()()}if(t&2){let n=w();g(),qe("ngModel",n.filterStudio),b("multiple",!0),g(),Yn(n.studioOptions())}}function eZi(t,e){if(t&1){let n=re();h(0,"div"),y(1),p(),h(2,"div",3)(3,"mat-slider",18)(4,"input",19),Xe("ngModelChange",function(r){V(n);let s=w();return Ze(s.filterRatingMin,r)||(s.filterRatingMin=r),B(r)}),p(),h(5,"input",20),Xe("ngModelChange",function(r){V(n);let s=w();return Ze(s.filterRatingMax,r)||(s.filterRatingMax=r),B(r)}),p()()()}if(t&2){let n=w();g(),cn("Bewertung ",n.filterRatingMin()," bis ",n.filterRatingMax(),""),g(2),b("showTickMarks",!0)("step",1),g(),qe("ngModel",n.filterRatingMin),g(),qe("ngModel",n.filterRatingMax)}}function tZi(t,e){if(t&1&&y(0),t&2){let n=w();Ke(" ",n.filterSkillsText()," ")}}function iZi(t,e){t&1&&y(0," Kein Skill ausgew\xE4hlt ")}function nZi(t,e){if(t&1){let n=re();h(0,"div",13)(1,"nxt-date-picker-2",21),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.filterDateMin,r)||(s.filterDateMin=r),B(r)}),p(),h(2,"nxt-date-picker-2",22),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.filterDateMax,r)||(s.filterDateMax=r),B(r)}),p()()}if(t&2){let n=w();g(),qe("value",n.filterDateMin),g(),qe("value",n.filterDateMax)}}var Xqi,Pse,xTe=Q(()=>{me();Gi();i6();qn();SD();P0();Ah();o1();C4();pve();pa();$n();Ci();a3();$_e();Zi();ji();Jr();oo();il();ag();oQ();Cs();me();qn();Xqi=()=>["text"];Pse=(()=>{let e=class e extends bt{constructor(){super(),this.studioOptions=gt([]),this.artistOptions=gt([]),this.filterStudio=gt([]),this.filterMotive=gt(null),this.filterRating=gt(!0),this.filterRatingMin=gt(1),this.filterRatingMax=gt(10),this.filterArtist=gt(null),this.filterSkills=gt({}),this.filterBoolSkills=gt({}),this.filterDateMin=gt(null),this.filterDateMax=gt(null),this.filterDateType=gt("today"),this.filterSkillsText=vr(()=>[...oa(this.filterBoolSkills()),...oa(this.filterSkills())].join(", ")),this.cdRef=Ve(Kt),this.cacheService=Ve(cc),this.configService=Ve(Xi),this.localStorageService=Ve(vu),this.dialogService=Ve(vt),this.matDialogRef=Ve(Gt,{optional:!0}),this.DisplayWithTools=Qh,this.resetFilter(),this.load()}getStudioOptions(){switch(this.configService.config.value.studioRegion){case"AC":return["ac","du","ma","ffm","ab","nu"];case"DU":return["du","ac","ma","ffm","ab","nu"];case"MA":return["ma","ac","du","ffm","ab","nu"];case"FFM":return["ffm","ab","nu"];case"AB":return["ffm","ab","nu"];case"NU":return["ffm","ab","nu"]}return[]}load(){this.pushSubscription=this.cacheService.artists.subscribe(i=>{this.artistOptions.set(i.map(r=>({text:r.name,value:r.id})).sortString("text"))})}ngOnInit(){this.studioOptions.set(this.getStudioOptions())}nxtOnDestroy(){}selectSkillsClicked(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog($X);i.componentInstance.noChecks=!0,i.componentInstance.currentSkills=so(this.filterSkills()),i.componentInstance.currentBoolSkills=so(this.filterBoolSkills());let r=yield Sn(i.afterClosed());r&&(this.filterSkills.set(r.skills),this.filterBoolSkills.set(r.boolSkills))})}cancelClicked(){this.matDialogRef.close()}getFilter(){let i={};return this.filterArtist()&&(i.artist=this.filterArtist().text),this.filterMotive()&&(i.tattooMotive=this.filterMotive()),this.filterRating()&&(i.rating={},this.filterRatingMin()&&(i.rating.min=this.filterRatingMin()),this.filterRatingMax()&&(i.rating.max=this.filterRatingMax())),this.filterStudio()&&(i.studios=this.filterStudio()),this.filterSkills()&&(i.skills=oa(this.filterSkills())),this.filterBoolSkills()&&(i.boolSkills=oa(this.filterBoolSkills())),this.filterDateMin()&&(i.eventDate=i.eventDate||{},i.eventDate.min=this.filterDateMin()),this.filterDateMax()&&(i.eventDate=i.eventDate||{},i.eventDate.max=this.filterDateMax()),this.filterDateType()&&(i.eventDate=i.eventDate||{},i.eventDate.type=this.filterDateType()),i}okClicked(){this.matDialogRef.close(this.getFilter())}resetFilter(){this.filterDateMin.set(null),this.filterDateMax.set(null),this.filterRating.set(!1),this.filterRatingMin.set(1),this.filterRatingMax.set(10),this.filterStudio.set([]),this.filterArtist.set(null),this.filterSkills.set({}),this.filterBoolSkills.set({})}setFilter(i){return O(this,null,function*(){if(i.eventDate&&i.eventDate.min&&this.filterDateMin.set(i.eventDate.min),i.eventDate&&i.eventDate.max&&this.filterDateMax.set(i.eventDate.max),i.eventDate.type&&this.filterDateType.set(i.eventDate.type),i.rating&&i.rating.min&&(this.filterRatingMin.set(i.rating.min),this.filterRating.set(!0)),i.rating&&i.rating.max&&(this.filterRatingMax.set(i.rating.max),this.filterRating.set(!0)),i.studios&&this.filterStudio.set(i.studios),i.skills)for(let r of i.skills)this.filterSkills.set({[r]:!0});if(i.boolSkills)for(let r of i.boolSkills)this.filterBoolSkills.set({[r]:!0});if(i.tattooMotive&&this.filterMotive.set(i.tattooMotive),yield this.cacheService.waitForArtists(),i.artist){let r=this.artistOptions().find(s=>s.text===i.artist);this.filterArtist.set(r)}})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-event-filter"]],standalone:!0,features:[et,xe],decls:40,vars:15,consts:[[1,"flex","w-full","flex-col","gap-3","p-3"],[1,"filter-control"],["placeholder","Bewertung",3,"valueChange","value"],[1,"flex","w-full","flex-row"],["placeholder","Artist",3,"valueChange","value","options","displayInOptionWith","filterFields","showClearIcon"],["nxtClickAnimation","",1,"filter-skill-box","center",3,"click"],["placeholder","Motiv",3,"valueChange","noPadding","clearIcon","value"],[3,"ngModelChange","ngModel"],["value","range"],[1,"flex","h-full","justify-center","leading-snug"],["value","today"],["value","last7Days"],["value","last30Days"],[1,"mt-3","flex","flex-row","gap-4"],[1,"flex","flex-row","items-center","justify-around"],[3,"click"],[1,"flex","!flex-col","md:!flex-row","!border-0",3,"ngModelChange","ngModel","multiple"],[3,"value"],["min","1","max","10",1,"w-full",3,"showTickMarks","step"],["value","1","matSliderStartThumb","",3,"ngModelChange","ngModel"],["value","10","matSliderEndThumb","",3,"ngModelChange","ngModel"],["placeholder","Termin von",3,"valueChange","value"],["placeholder","Termin bis",3,"valueChange","value"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,Jqi,4,2,"div",1),h(2,"div",1)(3,"nxt-slide-toggle",2),Xe("valueChange",function(a){return Ze(s.filterRating,a)||(s.filterRating=a),a}),p(),W(4,eZi,6,6),p(),h(5,"div",1)(6,"div",3)(7,"nxt-autocomplete",4),Xe("valueChange",function(a){return Ze(s.filterArtist,a)||(s.filterArtist=a),a}),p()()(),h(8,"div",1)(9,"div",5),F("click",function(){return s.selectSkillsClicked()}),W(10,tZi,1,1)(11,iZi,1,0),p()(),h(12,"div",1)(13,"nxt-input",6),Xe("valueChange",function(a){return Ze(s.filterMotive,a)||(s.filterMotive=a),a}),p()(),h(14,"div",1)(15,"mat-button-toggle-group",7),Xe("ngModelChange",function(a){return Ze(s.filterDateType,a)||(s.filterDateType=a),a}),h(16,"mat-button-toggle",8)(17,"div",9),y(18,"Zeitraum"),ee(19,"br"),y(20,"Ausw\xE4hlen"),p()(),h(21,"mat-button-toggle",10)(22,"div",9),y(23,"Heute"),p()(),h(24,"mat-button-toggle",11)(25,"div",9),y(26,"Letzten"),ee(27,"br"),y(28,"7 Tage"),p()(),h(29,"mat-button-toggle",12)(30,"div",9),y(31,"letzten"),ee(32,"br"),y(33,"30 Tage"),p()()(),W(34,nZi,3,2,"div",13),p(),h(35,"div",14)(36,"nxt-button",15),F("click",function(){return s.cancelClicked()}),y(37,"Abbrechen"),p(),h(38,"nxt-button",15),F("click",function(){return s.okClicked()}),y(39,"OK"),p()()()),r&2&&(g(),Je(s.studioOptions().length>0?1:-1),g(2),qe("value",s.filterRating),g(),Je(s.filterRating()?4:-1),g(3),qe("value",s.filterArtist),b("options",s.artistOptions())("displayInOptionWith",s.DisplayWithTools.displayWithText)("filterFields",bn(14,Xqi))("showClearIcon",!0),g(3),Je(s.filterSkillsText()?10:11),g(3),b("noPadding",!0)("clearIcon",!0),qe("value",s.filterMotive),g(2),qe("ngModel",s.filterDateType),g(19),Je(s.filterDateType()==="range"?34:-1))},dependencies:[nm,Dm,ko,mu,Ko,Dp,M5,Q4e,Ga,_f,tee,Lt,Yi,Nn,iP],styles:["[_nghost-%COMP%]{display:flex;height:100%;width:100%;color:#bbb;background-color:#404040;padding:5px}[_nghost-%COMP%]   .filter-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;justify-content:center;align-items:center}[_nghost-%COMP%]   .filter-skill-box[_ngcontent-%COMP%]{border-radius:.5rem;border:1px solid #6a6a6a;padding:.25rem .5rem;cursor:pointer}[_nghost-%COMP%]   mat-slider[_ngcontent-%COMP%]{width:100%}"],changeDetection:0});let t=e;return t})()});var sj,Ayt=Q(()=>{sj=class{static getText(e){let n=[];e.eventDate&&(e.eventDate.type==="today"?n.push("Heute"):e.eventDate.type==="last7Days"?n.push("Letzte 7 Tage"):e.eventDate.type==="last30Days"?n.push("Letzte 30 Tage"):e.eventDate.type==="range"&&(e.eventDate.min&&e.eventDate.max?n.push(e.eventDate.min.dateFormat("dd.MM.yyyy")+" - "+e.eventDate.max.dateFormat("dd.MM.yyyy")):e.eventDate.min?n.push("Ab "+e.eventDate.min.dateFormat("dd.MM.yyyy")):e.eventDate.max&&n.push("Bis "+e.eventDate.max.dateFormat("dd.MM.yyyy")))),e.rating&&(e.rating.min&&e.rating.max?n.push("Bewertung: "+e.rating.min+"-"+e.rating.max):e.rating.min?n.push("Bewertung ab "+e.rating.min):e.rating.max&&n.push("Bewertung bis "+e.rating.max)),e.studios&&e.studios.length>0&&n.push(e.studios.join(" ")),e.artist&&n.push(e.artist);let i=[...e.skills||[],...e.boolSkills||[]];return i.length>0&&n.push(i.join(" \xB7 ")),e.tattooMotive&&n.push(e.tattooMotive),n}}});function aZi(t,e){t&1&&ee(0,"nxt-spinner",4),t&2&&b("size",28)}function lZi(t,e){if(t&1){let n=re();h(0,"nxt-button",10),F("click",function(){V(n);let r=w();return B(r.filterClicked())}),y(1),p()}if(t&2){let n=w();g(),ye(n.filterText())}}function cZi(t,e){if(t&1&&(h(0,"div",16),y(1),Ce(2,"uppercase"),p()),t&2){let n=w();g(),ye(tt(2,1,n.studio))}}function dZi(t,e){if(t&1&&(h(0,"div",13)(1,"div",15),y(2),p(),W(3,cZi,3,3,"div",16),p()),t&2){let n=w(3);g(2),Ke(" ",e.ratingValue," "),g(),Je(n.filter().studios&&n.filter().studios.length>0?3:-1)}}function uZi(t,e){if(t&1&&(h(0,"a",12),Ce(1,"nxtEventFile"),W(2,dZi,4,2,"div",13),ee(3,"img",14),Ce(4,"nxtEventFile"),p()),t&2){let n,i=w().$implicit,r=w();b("href",tt(1,12,i.file.id),Ur)("id",i.file.id),Bn("data-pswp-width",i.file.width)("data-custom","abc")("data-pswp-height",i.file.height),g(2),Je((n=!1)?2:-1,n),g(),mo("width",100,"%")("height",100,"%"),b("src",Nt(4,14,i.file.id,!0),Ur),Bn("loading","lazy")}}function hZi(t,e){if(t&1){let n=re();h(0,"mat-icon",17),F("click",function(){V(n);let r=w().$implicit,s=w();return B(s.videoClicked(r.file))}),y(1," play_circle "),p(),h(2,"img",18),Ce(3,"nxtEventFile"),F("click",function(){V(n);let r=w().$implicit,s=w();return B(s.videoClicked(r.file))}),p()}if(t&2){let n=w().$implicit;g(2),mo("width",100,"%")("height",100,"%"),b("src",Nt(3,6,n.file.id,!0),Ur),Bn("loading","lazy")}}function pZi(t,e){if(t&1&&(h(0,"div",11),W(1,uZi,5,17,"a",12)(2,hZi,4,9),p()),t&2){let n=e.$implicit;mo("width",n.width,"px")("height",n.height,"px")("transform","translate("+n.left+"px,"+n.top+"px)"),g(),Je(n.file.type==="image"?1:n.file.type==="video"?2:-1)}}function mZi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"nxtStudio"),p()),t&2){let n=w();g(),ye(tt(2,1,n.studio))}}function fZi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w();g(),Ke("Bewertung: ",n.ratingValue,"")}}function gZi(t,e){if(t&1&&(h(0,"div",19),W(1,mZi,3,3,"div")(2,fZi,2,1,"div"),h(3,"div"),y(4),Ce(5,"nxtDate"),p()()),t&2){let n=w().$implicit,i=w();g(),Je(i.showStudioInfo()?1:-1),g(),Je(e.ratingValue?2:-1),g(2),ye(Nt(5,3,n.fileCreatedAt,"dd.MM.yyyy HH:mm"))}}function vZi(t,e){if(t&1&&W(0,gZi,6,6,"div",19),t&2){let n,i=e.$implicit,r=w();Je((n=r.eventsById()[i.eventId])?0:-1,n)}}var Pyt,rZi,sZi,oZi,Rse,bTe=Q(()=>{me();Gi();yi();Pyt=Gs(Iyt());ri();aQ();Tz();jP();Ci();Ja();Df();Tf();Im();ji();Am();Pm();$n();PH();Zi();xTe();Gy();Cs();P0();go();Ayt();ag();xse();oQ();ma();Ul();ug();ls();me();rZi=["container"],sZi=["scroller"],oZi=(t,e)=>e.file.id;Rse=(()=>{let e=class e extends bt{constructor(){super(),this.eventFilesWithEventId=gt([]),this.cdRef=Ve(Kt),this.configService=Ve(Xi),this.socketService=Ve(lt),this.clipboard=Ve(_u),this.route=Ve(gs),this.localStorageService=Ve(vu),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.filter=gt({rating:{min:8,max:10},hasEventFiles:!0,eventDate:{type:"today",min:Date.now().dateAddMonths(-1).dateFormatDate(),max:Date.now().dateFormatDate()}}),this.showSpinner=gt(!1),this.events=gt([]),this.eventsById=vr(()=>{let i={};for(let r of this.events())i[r.id]=r;return i}),this.showStudioInfo=vr(()=>this.filter().studios&&this.filter().studios.length>0),this.layoutItems=[],this.containerWidth=0,this.galleryHeight=0,this.EventQueryTools=sj,this.filterText=vr(()=>sj.getText(this.filter()).join(" \xB7 ")),this.configService.config.value.mustEventRating||this.filter.set(St(ve({},this.filter()),{rating:void 0})),qh(()=>{this.localStorageService.set("PhotosEventQuery",this.filter())})}ngOnInit(){return O(this,null,function*(){if(this.filter.set(this.localStorageService.get("PhotosEventQuery",this.filter())),this.route.snapshot.queryParams.q){let i=Qn.parse(atob(this.route.snapshot.queryParams.q));this.filter.set(i)}this.load()})}copyToClipboard(){let i=btoa(Qn.stringifyFormat(this.filter()));this.clipboard.copy(window.location.origin+window.location.pathname+"?q="+i)}load(){return O(this,null,function*(){this.showSpinner.set(!0);let i={id:1,studio:1,files:1,paymentSum:1,start:1,end:1,artist:1};this.filter.set(St(ve({},this.filter()),{projection:i})),this.events.set((yield this.socketService.eventQuery(this.filter())).sortNumber("start",!0));let r=this.events().map(s=>this.getPhotosFromEvent(s)).filter(s=>!!s).flat().sortNumber("fileCreatedAt",!0);r=r.filter(s=>{try{let o=s.type==="image"&&s.subType==="tattooPhoto",a=s.type==="video"&&s.subType==="tattooVideo"&&s.mimetype==="video/mp4";return o||a}catch{console.log(r),console.log(r),console.log(r);debugger}}),r.length>1e4&&(this.dialogService.showOk("Deine Suche hat "+r.length+" Fotos gefunden. Es werden nur die ersten 10.000 Fotos angezeigt."),r=r.slice(0,1e4)),this.eventFilesWithEventId.set(r),this.calculateContainerWidth(),this.calculateLayout(),this.showSpinner.set(!1)})}nxtOnDestroy(){}onResize(){this.calculateContainerWidth(),this.calculateLayout()}calculateContainerWidth(){this.containerWidth=this.container.nativeElement.clientWidth}calculateLayout(){let i=this.eventFilesWithEventId().map(s=>({width:220*(s.width/s.height),height:220})),r=(0,Pyt.default)(i,{containerWidth:this.containerWidth,boxSpacing:0,targetRowHeight:200,containerPadding:0});this.layoutItems=r.boxes.map((s,o)=>St(ve({},s),{file:this.eventFilesWithEventId()[o]})),this.galleryHeight=r.containerHeight,this.cdRef.detectChanges()}videoClicked(i){this.dialogService.showComponentFull($5).componentInstance.loadDriveVideo(i)}editClicked(i){return O(this,null,function*(){requestAnimationFrame(()=>{let r=this.dialogService.showComponentFull(Px);r.componentInstance.fileId=i.id})})}filterClicked(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(Pse);i.componentInstance.setFilter(this.filter());let r=yield Sn(i.afterClosed());r&&(this.filter.set(r),this.filter.set(St(ve({},this.filter()),{hasEventFiles:!0})),this.load())})}getPhotosFromEvent(i){return i.files.map(r=>St(ve({},r),{eventId:i.id}))}shareClicked(i){this.dialogService.showOk("Kommt die tage")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-photos"]],viewQuery:function(r,s){if(r&1&&(ei(rZi,5),ei(sZi,5)),r&2){let o;Pt(o=Rt())&&(s.container=o.first),Pt(o=Rt())&&(s.scroller=o.first)}},hostBindings:function(r,s){r&1&&F("resize",function(){return s.onResize()},!1,vy)},standalone:!0,features:[et,xe],decls:18,vars:9,consts:[["scroller",""],["container",""],["tooltip",""],[3,"dialogRef"],[3,"size"],[1,"text-[80%]","md:text-[100%]"],["fontSet","material-symbols-outlined",1,"cursor-pointer","mat-icon-lg",3,"click"],[1,"flex","h-full","flex-col","overflow-auto","md:pr-4",2,"border","0px solid red","overflow","scroll !important"],["nxtPhotoSwipe","",1,"gallery",3,"nxtPhotoSwipeOnEditClicked","nxtPhotoSwipeOnShareClicked","nxtPhotoSwipeEventFiles","nxtPhotoSwipeEvents","nxtPhotoSwipeShowEditIcon","nxtPhotoSwipeShowShareIcon"],[1,"photo",3,"width","height","transform"],[1,"text-[80%]","md:text-[100%]",3,"click"],[1,"photo"],[3,"href","id"],[1,"item-top-bar"],[3,"src"],[1,"rating"],[1,"studio"],[1,"cursor-pointer",2,"color","#fff","position","absolute","right","4px","top","4px","opacity","0.5",3,"click"],[1,"cursor-pointer",3,"click","src"],[1,"flex","flex-col","text-[80%]"]],template:function(r,s){if(r&1){let o=re();h(0,"nxt-page")(1,"nxt-page-header",3)(2,"nxt-page-header-title"),y(3),p(),W(4,aZi,1,1,"nxt-spinner",4)(5,lZi,2,1,"nxt-button",5),h(6,"mat-icon",6),F("click",function(){return V(o),B(s.copyToClipboard())}),y(7,"content_copy"),p()(),h(8,"nxt-page-content")(9,"div",7,0)(11,"div",8,1),F("nxtPhotoSwipeOnEditClicked",function(l){return V(o),B(s.editClicked(l))})("nxtPhotoSwipeOnShareClicked",function(l){return V(o),B(s.shareClicked(l))}),Kn(13,pZi,3,7,"div",9,oZi),p()()(),ee(15,"nxt-page-footer"),p(),W(16,vZi,1,1,"ng-template",null,2,Cc)}r&2&&(g(),b("dialogRef",s.dialogRef),g(2),Ke("",s.layoutItems.length," Fotos / Videos"),g(),Je(s.showSpinner()?4:5),g(7),mo("height",s.galleryHeight,"px"),b("nxtPhotoSwipeEventFiles",s.eventFilesWithEventId())("nxtPhotoSwipeEvents",s.events())("nxtPhotoSwipeShowEditIcon",!0)("nxtPhotoSwipeShowShareIcon",!1),g(2),Yn(s.layoutItems))},dependencies:[nP,V7,Zr,Pl,Yl,hc,Al,Kl,Lt,yf,Hn,V_,iP],styles:[".gallery[_ngcontent-%COMP%]{position:relative}.photo[_ngcontent-%COMP%]{position:absolute;overflow:hidden}.photo[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{display:block;width:100%;height:100%;object-fit:cover}.item-top-bar[_ngcontent-%COMP%]{width:100%;position:absolute;display:flex;flex-direction:row;justify-content:space-between}.item-top-bar[_ngcontent-%COMP%]   .rating[_ngcontent-%COMP%], .item-top-bar[_ngcontent-%COMP%]   .studio[_ngcontent-%COMP%]{font-size:75%;padding:2px 4px;border-bottom-right-radius:.25rem;background-color:#000000b3}"],changeDetection:0});let t=e;return t})()});var Ryt,Fyt=Q(()=>{me();yi();Ryt=(()=>{let e=class e{constructor(i){this.socketService=i}log(i){return O(this,null,function*(){return this.socketService.dayFinishCreateLog(i)})}};e.\u0275fac=function(r){return new(r||e)(it(lt))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Lyt,Oyt=Q(()=>{Nu();me();Kr();Cs();Lyt=(()=>{let e=class e{constructor(i,r){this.loginService=i,this.configService=r}getPrivateToCashName(){switch(this.configService.config.value.studioRegion){case"AC":return"Julian Krafft";case"MA":return"Julian Krafft";case"DU":return"Julian Krafft";case"FFM":return"Sven Hennemann";case"AB":return"Oliver Peters";case"NU":return"Oliver Peters"}}getIncomingTransferArticles(i,r){let s=[],o=this.configService.config.value.studios.filter(a=>a.name!==i&&!["Brand","Alsdorf"].includes(a.realStudio)&&!["Brand","Alsdorf"].includes(a.name));r&&s.push({id:"bank",shortDescription:"Bank",description:"Bank",price:-1,isArtistDayPrice:!1,_:!1}),s.push({id:"private_to_cash",shortDescription:`Einlage von 
`+this.getPrivateToCashName(),description:`Einlage von 
`+this.getPrivateToCashName(),price:-1,isArtistDayPrice:!1,_:!1}),this.configService.config.value.studioRegion==="AC"&&s.push({id:"credit_card_to_cash_jkr",shortDescription:"Kredit-Karte Krafft",description:"Kredit-Karte Krafft",price:-1,isArtistDayPrice:!1,_:!1}),this.configService.config.value.studioRegion==="MA"&&s.push({id:"safe_house",shortDescription:"Tresor Kasse NXT LVL",description:"Tresor Kasse NXT LVL",price:-1,isArtistDayPrice:!1,_:!1});for(let a of o)s.push(this.getStudioArticle(a.name,!1)),s.push(this.getStudioArticle(a.name,!0));return s}getOutgoingTransferArticles(i,r){let s=[],o=this.configService.config.value.studios.filter(a=>a.name!==i&&!["Brand","Alsdorf"].includes(a.realStudio)&&!["Brand","Alsdorf"].includes(a.name));r&&s.push({id:"bank",shortDescription:"Bank",description:"Bank",price:-1,isArtistDayPrice:!1,_:!1}),s.push({id:"cash_to_private",shortDescription:`Einlage R\xFCckzahlung an
`+this.getPrivateToCashName(),description:`Einlage R\xFCckzahlung an
`+this.getPrivateToCashName(),price:-1,isArtistDayPrice:!1,_:!1}),s.push({id:"pre_transfer_bank",shortDescription:"Fr\xFChzeitig Bank",description:"Fr\xFChzeitig Bank",price:-1,isArtistDayPrice:!1,_:!1}),s.push({id:"pre_transfer_safe",shortDescription:"Fr\xFChzeitig Tresor",description:"Fr\xFChzeitig Tresor",price:-1,isArtistDayPrice:!1,_:!0}),this.configService.config.value.studioRegion==="MA"&&s.push({id:"pre_transfer_safe",shortDescription:"Tresor Kasse NXT LVL",description:"Tresor Kasse NXT LVL",price:-1,isArtistDayPrice:!1,_:!1});for(let a of o)s.push(this.getStudioArticle(a.name,!1)),s.push(this.getStudioArticle(a.name,!0));return s}getStudioArticle(i,r){return{id:"transfer_"+cr.toSnakeCase(i),shortDescription:"Kasse "+i+(r?" _":""),description:"Kasse "+i+(r?" _":""),price:-1,isArtistDayPrice:!1,_:r}}};e.\u0275fac=function(r){return new(r||e)(it(Fi),it(Xi))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var Nyt,Vyt,Byt=Q(()=>{ZU();pa();Vd();zn();Nyt=Gs(QI());Bd();me();Oyt();Ci();yi();Cs();R7();Kr();KP();jl();Vyt=(()=>{let e=class e{constructor(i,r,s,o,a,l,c,d){this.articleService=i,this.dialogService=r,this.socketService=s,this.configService=o,this.telegramService=a,this.loginService=l,this.cashPaymentService=c,this.permissionService=d}newIncomingOutgoingClicked(i,r,s,o){return O(this,null,function*(){let a,l,c="";i==="incoming-transfer"?(l=Sr.clone(this.articleService.getIncomingTransferArticles(r,!0)),c="Neuer Eingangs-Transfer erfassen"):i==="incoming"?(l=Sr.clone(X6.articlesIncoming),c="Neue Einnahme erfassen"):i==="outgoing"?(l=Sr.clone(X6.articlesOutgoing),c="Neue Ausgabe erfassen"):i==="outgoing-transfer"&&(l=Sr.clone(this.articleService.getOutgoingTransferArticles(r,!1)),c="Neuer Ausgangs-Transfer erfassen"),this.permissionService.hasPermission(Zt.DisableGlobal_)&&(l=l.filter(u=>!u._)),a=l.map(u=>({value:u,text:u.shortDescription+(u.price>-1?"<br/>"+Wn.toMoneyString(u.price):"")}));let d=yield this.dialogService.showButtonChooser({hideBackButton:!0,buttonRows:[a],title:c,text:"",minWidth:"80%",value:""});if(d&&typeof d!="string"&&d.value){let u=d.value;if(u.id===""){let D={okButtonText:"weiter",isMoney:!1,message:"Gib eine Bezeichnung f\xFCr die "+(i.includes("incoming")?"Einnahme":"Ausgabe")+" an",placeholder:"Bezeichnung",prompt:""},M=yield(yield this.dialogService.showInputOld(D)).afterClosed().toPromise();if(!M)return;u.id=M,u.description=M,u.shortDescription=M}if(i==="outgoing"){let D=[{value:"direct",text:"direkt von "+u.description},...this.configService.config.value.users.filter(M=>!M.noPerson).map(M=>({text:M.username,value:M.username})).sort()],E=yield this.dialogService.showSelect("Wer hat dir den Beleg gegeben?",D,{allowCustomString:!0});u.originalCreatedBy=E}if(!i.includes("transfer")){for(let D of["bank","kasse"])if(u.description.toLowerCase().includes(D)){this.dialogService.showOk("Kassen- oder Bank- Buchungen bitte \xFCber Transfer buchen!");return}}let m=-1;if(u.price===-1){let D={isMoney:!0,message:"Preis f\xFCr "+u.description,placeholder:"Betrag in Euro"},E=yield this.dialogService.showInput(D);if(!E)return;m=E}else m=u.price;let f=-1;if(!u._&&i==="outgoing"&&this.configService.config.value.cashOutgoingAskVatPercentage){let D=yield this.dialogService.showButtons("Umsatzsteuersatz",{buttons:[{text:"0 %",value:0},{text:"7 %",value:7},{text:"19 %",value:19}]});typeof D!="string"&&(f=D.value)}if(i==="outgoing"){if(u._){if(m>o){this.telegramService.sendAdmin(` will eine _ Ausgabe buchen, obwohl die _ Kasse das nicht hergibt:
`+u.description+": "+Wn.toMoneyString(m)),this.dialogService.showOk("Es ist nicht genug Geld in der Kasse!");return}}else if(m>s){this.telegramService.sendAdmin(` will eine Ausgabe buchen, obwohl die Kasse das nicht hergibt:
`+u.description+": "+Wn.toMoneyString(m)),this.dialogService.showOk("Es ist nicht genug Geld in der Kasse!");return}}let _={id:"",articleId:u.id,createdAtDateString:Ie.format(Date.now(),"yyyy-MM-dd"),createdAt:Date.now(),createdBy:this.loginService.getUsername(),studio:this.loginService.getStudio(),studioReal:this.loginService.getStudioReal(),description:u.description,originalCreatedBy:u.originalCreatedBy,bankConfirmed:!1,value:m,_:u._,vatPercentage:f},x=i.includes("incoming")?"incoming":"outgoing";if(this.dialogService.showLoading("Einnahme wird erfasst..."),_=yield this.cashPaymentService.upsert(x,_),this.dialogService.hideLoading(),i==="outgoing"&&!u._){let D=window.location.origin+"/event-qr/outgoing-scan"+_.id,E=yield Nyt.toDataURL(D,{width:500,color:{dark:"#ffffff",light:"#2A2A2A"}}),M=!0;this.configService.config.value.studioRegion==="MA"&&(M=yield this.dialogService.showYesNo("Scannen oder Foto?",{yesText:"Scannen",noText:"Foto"})),M?(this.socketService.setNextDocScanWithoutQrCodeData({refId:_.id,refType:"outgoing-scan"}),this.dialogService.showOk(`Benutze bitte den Scanner um den Beleg zu scannen, du hast 5 Minuten Zeit daf\xFCr.

Auch quer, so wie die Einwilligungserkl\xE4rungen

Bei kleinen Rechnungen benutze das Flachbett.`,{title:"ACHTUNG NEU!"})):this.dialogService.showOk('<div style="width: 100%; text-align: center;"><br/><img src="'+E+'" /></div>',{title:"Rechnung f\xFCr Ausgabe fotografieren!"})}}})}};e.\u0275fac=function(r){return new(r||e)(it(Lyt),it(vt),it(lt),it(Xi),it(p3),it(Fi),it(K5),it(ws))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});var zyt,Hyt=Q(()=>{zn();jo();Vd();ZU();pa();ef();Bd();me();yi();Ci();jl();zyt=(()=>{let e=class e{constructor(i,r,s){this.socketService=i,this.dialogService=r,this.permissionService=s}newPaypalSale(){return O(this,null,function*(){let i=yield this.socketService.getNotAssignedPaypalTransactions(),r=Qt.DURATION_1HOUR*4;this.permissionService.hasPermission(Zt.GiftCards_Download)&&(r=Qt.DURATION_1DAY*7),i=i.filter(c=>Ie.parse(c.transactionTime)>Date.now()-r);let s=i.map(c=>({value:c,text:Ie.dateDiffToNowText(c.transactionTime)+"<br/> "+Wn.toMoneyString(c.value)+" | "+c.from,smallerText:!0})),o=yield this.dialogService.showButtonChooser({hideBackButton:!0,buttonRows:[s],title:"W\xE4hle die Paypal Zahlung aus",text:"",minWidth:"80%",value:""});if(!o||typeof o=="string")return;let a=o.value;s=Sr.clone(X6.articlesIncomingPaypal).map(c=>({value:c,text:c.shortDescription+(c.price>-1?"<br/>"+Wn.toMoneyString(c.price):"")}));let l=yield this.dialogService.showButtonChooser({hideBackButton:!0,buttonRows:[s],title:"Artikel w\xE4hlen",text:"",minWidth:"80%",value:""});if(l&&typeof l!="string"&&l.value){let c=l.value;if(c.id===""){let u={okButtonText:"weiter",isMoney:!1,message:"Gib eine Bezeichnung f\xFCr die Ausgabe an",placeholder:"Bezeichnung",prompt:""},f=yield(yield this.dialogService.showInputOld(u)).afterClosed().toPromise();if(!f)return;c.id=f,c.description=f,c.shortDescription=f}let d=c.description;if(d+=`
`+Wn.toMoneyString(a.value),d+=`
`+a.from,yield this.dialogService.showYesNo(d)){let u={id:ua.generate(),value:a.value,createdAt:new Date,createdAtDateString:Ie.todayDateString,paypalTransaction:a,discountPercentage:0,paymentMethod:"paypal",description:c.description};this.socketService.addSale(u)}}})}};e.\u0275fac=function(r){return new(r||e)(it(lt),it(vt),it(ws))},e.\u0275prov=Et({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})()});function FZi(t,e){if(t&1&&(h(0,"div",5),y(1),Ce(2,"async"),p()),t&2){let n=w();g(),vv(" ",tt(2,3,n.socketService.openSubscriptions)," | ",n.myService.data.calcId," | ",n.myService.data.calcDuration,`
`)}}function LZi(t,e){t&1&&(h(0,"div",6)(1,"div"),y(2," Daten werden geladen... "),p()())}function OZi(t,e){if(t&1){let n=re();h(0,"div",10)(1,"div",87),y(2,"DU BIST NICHT AN DIESER KASSE ANGEMELDET!"),p(),h(3,"div"),y(4),p(),h(5,"div"),y(6),p(),h(7,"nxt-button",43),F("click",function(){V(n);let r=w(2);return B(r.loginService.reLogin(!1))}),y(8,"OK"),p()()}if(t&2){let n=w(2);g(4),Ke("",n.myService.cashRegisterView.currentUser," ist angemeldet"),g(2),Ke("Wenn du weiter die Kassen \xFCbernehmen m\xF6chtest, muss ",n.myService.cashRegisterView.currentUser," sich einloggen und eine Kassen\xFCbergabe starten")}}function NZi(t,e){t&1&&(h(0,"div",19)(1,"div"),y(2,"Klarna:\xA0"),p(),h(3,"div"),y(4),Ce(5,"money"),p(),h(6,"div"),y(7,"\xA0\xA0"),p()()),t&2&&(g(4),ye(Nt(5,1,e,!1)))}function VZi(t,e){t&1&&(h(0,"div",19)(1,"div"),y(2,"Gutscheine:\xA0"),p(),h(3,"div"),y(4),Ce(5,"money"),p(),h(6,"div"),y(7,"\xA0\xA0"),p()()),t&2&&(g(4),ye(Nt(5,1,e,!1)))}function BZi(t,e){t&1&&(h(0,"div",19)(1,"div"),y(2,"Bank:\xA0"),p(),h(3,"div"),y(4),Ce(5,"money"),p(),h(6,"div"),y(7,"\xA0\xA0"),p()()),t&2&&(g(4),ye(Nt(5,1,e,!1)))}function zZi(t,e){t&1&&(h(0,"div",19)(1,"div"),y(2,"PayPal:\xA0"),p(),h(3,"div"),y(4),Ce(5,"money"),p(),h(6,"div"),y(7,"\xA0\xA0"),p()()),t&2&&(g(4),ye(Nt(5,1,e,!1)))}function HZi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p()),t&2){let n=w(3);g(),Ke("",Nt(2,1,n.myService.totalIncomingView,!1)," ")}}function GZi(t,e){if(t&1&&(h(0,"div",88),W(1,HZi,3,4,"div",53),p()),t&2){let n=w(2);g(),b("ngIf",n.myService.data)}}function WZi(t,e){if(t&1){let n=re();h(0,"nxt-button",89),F("click",function(){V(n);let r=w(2);return B(r.acceptTransferClicked())}),y(1," Transfer annehmen "),p()}}function UZi(t,e){if(t&1){let n=re();h(0,"div",90)(1,"nxt-button-icon",91),F("click",function(){V(n);let r=w(2);return B(r.newPaypalIncomingClicked())}),p(),h(2,"nxt-button-icon",92),F("click",function(){V(n);let r=w(2);return B(r.newIncomingOutgoingClicked("incoming-transfer"))}),y(3,"move_down "),p(),h(4,"nxt-button-icon",93),F("click",function(){V(n);let r=w(2);return B(r.newIncomingOutgoingClicked("incoming"))}),y(5," add "),p()()}}function jZi(t,e){if(t&1){let n=re();h(0,"div",94)(1,"nxt-button-icon",95),F("click",function(){V(n);let r=w(2);return B(r.newIncomingOutgoingClicked("outgoing-transfer"))}),y(2,"move_up "),p(),h(3,"nxt-button-icon",96),F("click",function(){V(n);let r=w(2);return B(r.newIncomingOutgoingClicked("outgoing"))}),y(4,"add "),p()()}}function $Zi(t,e){if(t&1){let n=re();h(0,"div",97)(1,"nxt-slide-toggle",66),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.myService.showAllCashRegisters,r)||(s.myService.showAllCashRegisters=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.showAllCashRegistersChanged())}),h(2,"div",98),y(3,"Alle"),ee(4,"br"),y(5,"Kassen"),p()()()}if(t&2){let n=w(2);g(),qe("value",n.myService.showAllCashRegisters)}}function KZi(t,e){if(t&1){let n=re();h(0,"nxt-button",43),F("click",function(){V(n);let r=w(2);return B(r.startWorkSessionClicked())}),y(1," ARBEITSTAG STARTEN "),p()}}function YZi(t,e){if(t&1){let n=re();h(0,"nxt-button",43),F("click",function(){V(n);let r=w(2);return B(r.startCashRegisterClicked())}),y(1," KASSE STARTEN "),p()}}function qZi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"money"),p()),t&2){let n=w(3);g(),Ke("Ende: ",tt(2,1,n.myService.cashRegisterView.endMoney),"")}}function ZZi(t,e){if(t&1&&(h(0,"div")(1,"div"),y(2),Ce(3,"money"),p(),W(4,qZi,3,3,"div",53),p()),t&2){let n=w(2);g(2),Ke("Start: ",tt(3,2,n.myService.cashRegisterView.startMoney),""),g(2),b("ngIf",n.myService.cashRegisterView.moneyStackEnd)}}function XZi(t,e){t&1&&(h(0,"span"),y(1,"+"),p())}function QZi(t,e){t&1&&(h(0,"span"),y(1,"+"),p())}function JZi(t,e){t&1&&(vs(0),h(1,"div",104),y(2,"Fehlende Nachstech-Gutscheine"),p(),ys())}function eXi(t,e){t&1&&(h(0,"div"),y(1,"Bank nicht n\xF6tig"),p())}function tXi(t,e){if(t&1&&(h(0,"div",105)(1,"div",108),y(2,"von Bank\xA0 "),h(3,"div",109),y(4),Ce(5,"money"),p()()()),t&2){let n=w(5);g(4),ye(tt(5,1,n.myService.data.calculatedData.endOfDayCash.toGetFromBank))}}function iXi(t,e){if(t&1&&W(0,tXi,6,3,"div",107),t&2){let n=w(4);b("ngIf",n.myService.data.calculatedData.endOfDayCash.toGetFromBank>0)}}function nXi(t,e){t&1&&(h(0,"div",104),y(1,"Fehlende Nachstech-Gutscheine"),p())}function rXi(t,e){if(t&1&&(h(0,"div")(1,"div",101),W(2,eXi,2,0,"div",53)(3,iXi,1,1,"div",105)(4,nXi,2,0,"div",106),p()()),t&2){let n=w(3);g(),b("ngClass",n.myService.data.calculatedData.endOfDayCash.toGetFromBank>0?"red":"green-light"),g(),b("ngIf",n.myService.data.calculatedData.endOfDayCash.toGetFromBank<=0),g(),Je(n.loginService.isBackoffice()||n.permissionService.hasPermission(n.NxtPermissionId.IsFranchise)?3:-1),g(),b("ngIf",n.myService.data.calculatedData.missingImproveArtistShouldGetMoney)}}function sXi(t,e){if(t&1&&(h(0,"div",99)(1,"table",100)(2,"tr",101)(3,"td",102),y(4,"N"),p(),h(5,"td",103)(6,"div"),W(7,XZi,2,0,"span",53),y(8),Ce(9,"money"),p()()(),h(10,"tr",101)(11,"td",102),y(12,"T"),p(),h(13,"td",103)(14,"div"),W(15,QZi,2,0,"span",53),y(16),Ce(17,"money"),p()()()(),W(18,JZi,3,0,"ng-container",53)(19,rXi,5,4,"div",53),p()),t&2){let n=w(2);g(2),b("ngClass",n.myService.data.calculatedData.endOfDayCash.value<0?"red":"green-light"),g(5),b("ngIf",n.myService.data.calculatedData.endOfDayCash.value>0),g(),Ke(" ",tt(9,8,n.myService.data.calculatedData.endOfDayCash.value)," "),g(2),b("ngClass",n.myService.data.calculatedData.endOfDayCash.value_<0?"red":"green-light"),g(5),b("ngIf",n.myService.data.calculatedData.endOfDayCash.value_>0),g(),Ke(" ",tt(17,10,n.myService.data.calculatedData.endOfDayCash.value_)," "),g(2),b("ngIf",n.myService.data.calculatedData.missingImproveArtistShouldGetMoney),g(),b("ngIf",!n.myService.data.calculatedData.missingImproveArtistShouldGetMoney)}}function oXi(t,e){if(t&1&&ee(0,"div",60),t&2){let n=w(2);b("innerHTML",((n.myService.calendarEventsView==null?null:n.myService.calendarEventsView.length)||0)+" Termine",Pi)}}function aXi(t,e){if(t&1&&(h(0,"div",110),y(1),p()),t&2){let n=w(2);g(),Ke("",n.myService.data.postponedEvents.length+" verschoben"," ")}}function lXi(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",64),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.myService.showPostponedEvents,r)||(s.myService.showPostponedEvents=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.myService.refreshView())}),h(1,"div",65),y(2,"verschobene"),ee(3,"br"),y(4,"Termine"),p()()}if(t&2){let n=w(2);qe("value",n.myService.showPostponedEvents)}}function cXi(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",66),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.showFilterToggle["payment-some-giftcard-discounted-50"],r)||(s.showFilterToggle["payment-some-giftcard-discounted-50"]=r),B(r)}),F("valueChange",function(r){V(n);let s=w(2);return B(s.quickFilterFormControl.setValue(r?"payment-some-giftcard-discounted-50":""))}),h(1,"div",65),y(2,"Gutscheine 50"),p()()}if(t&2){let n=w(2);qe("value",n.showFilterToggle["payment-some-giftcard-discounted-50"])}}function dXi(t,e){if(t&1){let n=re();h(0,"div",111)(1,"mat-icon",112),F("click",function(){V(n);let r=w(2);return B(r.showArtistMoneyClicked())}),y(2,"euro "),p()()}}function uXi(t,e){t&1&&y(0," \u274C\u274C\u274C ")}function hXi(t,e){t&1&&(h(0,"span",117),y(1,"\xA0bezahlt"),p())}function pXi(t,e){if(t&1&&(h(0,"div",115)(1,"div"),y(2),Ce(3,"money"),W(4,hXi,2,0,"span",116),p()()),t&2){let n=w().$implicit;g(2),ye(Nt(3,2,n.payoutValue,!1)),g(2),b("ngIf",n.isEarlyPaidOut)}}function mXi(t,e){if(t&1){let n=re();h(0,"div",113),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.artistClicked(r.name))})("contextmenu",function(r){let s=V(n).$implicit,o=w(2);return B(o.scrArtistContextMenuComponent.show(r,s))}),W(1,uXi,1,0),h(2,"div",88)(3,"div"),y(4),p()(),W(5,pXi,5,5,"div",114),h(6,"div"),y(7),p()()}if(t&2){let n=e.$implicit,i=w(2);jr("artist-get-box no-wrap mouse-pointer "+n.state),b("ngClass",sn(8,RZi,i.myService.viewFilter.artist===n.name))("matTooltip",n.stateText),g(),Je(n.state==="error"?1:-1),g(3),ye(n.name.replace("(Piercing)","(P)")),g(),b("ngIf",i.showArtistGetValues),g(2),ye(n.workTimeText)}}function fXi(t,e){if(t&1){let n=re();vs(0),h(1,"nxt-button-icon",118),F("click",function(){V(n);let r=w(3);return B(r.toggleDayFinishClicked())}),y(2," block "),p(),ys()}}function gXi(t,e){if(t&1){let n=re();vs(0),h(1,"nxt-button-icon",119),F("click",function(){V(n);let r=w(3);return B(r.toggleDayFinishClicked())}),y(2," verified "),p(),ys()}}function vXi(t,e){if(t&1){let n=re();vs(0),h(1,"nxt-button-icon",120),F("click",function(){V(n);let r=w(3);return B(r.dayFinishClicked())}),y(2,"payments "),p(),ys()}}function yXi(t,e){if(t&1&&(vs(0),W(1,fXi,3,0,"ng-container",53)(2,gXi,3,0,"ng-container",53)(3,vXi,3,0,"ng-container",53),ys()),t&2){let n=w(2);g(),b("ngIf",(n.myService.cashRegisterView==null?null:n.myService.cashRegisterView.state)===n.NxtWorkSessionCashRegisterState._1_Open),g(),b("ngIf",(n.myService.cashRegisterView==null?null:n.myService.cashRegisterView.state)===n.NxtWorkSessionCashRegisterState._3_CalcCashRegister1||(n.myService.cashRegisterView==null?null:n.myService.cashRegisterView.state)===n.NxtWorkSessionCashRegisterState._3_CalcCashRegister1),g(),b("ngIf",(n.myService.cashRegisterView==null?null:n.myService.cashRegisterView.state)!==n.NxtWorkSessionCashRegisterState._1_Open)}}function _Xi(t,e){if(t&1){let n=re();h(0,"div",7),F("click",function(){V(n);let r=w();return B(r.componentClicked())}),h(1,"nxt-side-bar-left",8,0)(3,"nxt-studio-cash-report-side-bar",9),F("dataChanged",function(){V(n);let r=w();return B(r.sideBarDataChanged())}),p()(),W(4,OZi,9,2,"div",10),h(5,"div",11)(6,"div",12)(7,"div",13)(8,"div",14)(9,"div",15)(10,"div",16)(11,"div",17),F("nxtOnMultiClick",function(){V(n);let r=w();return B(r.triggerNewOldVersionButton())}),y(12),p(),h(13,"div",18),W(14,NZi,8,4,"div",19)(15,VZi,8,4,"div",19)(16,BZi,8,4,"div",19)(17,zZi,8,4,"div",19),p(),W(18,GZi,2,1,"div",20),p()(),h(19,"div",21)(20,"div",22),ee(21,"nxt-datagrid",23),h(22,"div",24),W(23,WZi,2,0,"nxt-button",25),p()(),W(24,UZi,6,0,"div",26),p()(),h(25,"div",27)(26,"div",28)(27,"div",29),y(28),p(),h(29,"div"),y(30),Ce(31,"money"),p()(),h(32,"div",30),W(33,jZi,5,0,"div",31),ee(34,"nxt-datagrid",32),p()()(),h(35,"div",33),ee(36,"div",34),h(37,"div",35)(38,"div",36),F("click",function(){V(n);let r=w();return B(r.logout())}),h(39,"div"),y(40),p(),h(41,"div",37),y(42),p(),h(43,"div",37),y(44),Ce(45,"workplace"),p()()(),h(46,"div",38)(47,"div",39)(48,"nxt-date-picker",40),Xe("nxtModelChange",function(r){V(n);let s=w();return Ze(s.myService.dateString,r)||(s.myService.dateString=r),B(r)}),F("nxtModelChange",function(){V(n);let r=w();return B(r.datePickerChanged())}),p(),h(49,"div")(50,"div",41),F("click",function(){V(n);let r=w();return B(r.workSessionClicked())}),y(51),Ce(52,"nxtDate"),Ce(53,"nxtDate"),p()()(),h(54,"div",42)(55,"nxt-button-icon",43),F("click",function(){V(n);let r=w();return B(r.myService.reloadData(!0))}),y(56,"sync"),p()(),h(57,"div",44)(58,"nxt-radio",45),F("nxtOnMultiClick",function(r){V(n);let s=w();return B(s.setCashRegisterStateClicked(r))}),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.myService.studioView,r)||(s.myService.studioView=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.studioChanged())}),p()(),h(59,"div",18),W(60,$Zi,6,1,"div",46),h(61,"div")(62,"nxt-button",47),F("click",function(){V(n);let r=w();return B(r.switchFilterCashState())}),y(63),p()()(),h(64,"div",48),ee(65,"nxt-input",49)(66,"nxt-input",50),p(),h(67,"div")(68,"nxt-slide-toggle",51),Ce(69,"async"),F("valueChange",function(){V(n);let r=w();return B(r.setWalkIn())}),y(70," Walk-In "),p()(),h(71,"div"),W(72,KZi,2,0,"nxt-button",52)(73,YZi,2,0,"nxt-button",52),p(),W(74,ZZi,5,4,"div",53),h(75,"div",18),W(76,sXi,20,12,"div",54),p()()(),h(77,"div",55)(78,"div",56)(79,"div",57)(80,"div",58)(81,"div",59),W(82,oXi,1,1,"div",60)(83,aXi,2,1,"div",61),p(),h(84,"div",62),W(85,lXi,5,1,"nxt-slide-toggle",63),h(86,"nxt-slide-toggle",64),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.myService.viewFilter.hideClosedEvents,r)||(s.myService.viewFilter.hideClosedEvents=r),B(r)}),F("valueChange",function(){V(n);let r=w();return B(r.myService.refreshView())}),h(87,"div",65),y(88,"offene"),ee(89,"br"),y(90,"Termine"),p()(),h(91,"nxt-slide-toggle",64),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showFilterToggle["fehlende Fotos"],r)||(s.showFilterToggle["fehlende Fotos"]=r),B(r)}),F("valueChange",function(r){V(n);let s=w();return B(s.quickFilterFormControl.setValue(r?"fehlende Fotos":""))}),h(92,"div",65),y(93,"ohne"),ee(94,"br"),y(95,"fotos"),p()(),h(96,"nxt-slide-toggle",64),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showFilterToggle["Walk-In"],r)||(s.showFilterToggle["Walk-In"]=r),B(r)}),F("valueChange",function(r){V(n);let s=w();return B(s.quickFilterFormControl.setValue(r?"Walk-In":""))}),h(97,"div",65),y(98,"Walk"),ee(99,"br"),y(100,"In"),p()(),h(101,"nxt-slide-toggle",66),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showFilterToggle["payment-some-giftcard-discounted"],r)||(s.showFilterToggle["payment-some-giftcard-discounted"]=r),B(r)}),F("valueChange",function(r){V(n);let s=w();return B(s.quickFilterFormControl.setValue(r?"payment-some-giftcard-discounted":""))}),h(102,"div",65),y(103,"Rabattierte"),ee(104,"br"),y(105,"Gutscheine"),p()(),W(106,cXi,3,1,"nxt-slide-toggle",67),h(107,"nxt-slide-toggle",66),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showFilterToggle["payment-some-giftcard"],r)||(s.showFilterToggle["payment-some-giftcard"]=r),B(r)}),F("valueChange",function(r){V(n);let s=w();return B(s.quickFilterFormControl.setValue(r?"payment-some-giftcard":""))}),h(108,"div",65),y(109,"Gutscheine"),p()(),h(110,"nxt-slide-toggle",64),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.showFilterToggle.Aktionen,r)||(s.showFilterToggle.Aktionen=r),B(r)}),F("valueChange",function(r){V(n);let s=w();return B(s.quickFilterFormControl.setValue(r?"Aktionen":""))}),h(111,"div",65),y(112,"Aktionen"),p()()(),h(113,"div",68),ee(114,"div",69),Ce(115,"safeHtml"),W(116,dXi,3,0,"div",70),h(117,"div",71)(118,"nxt-scr-artist-context-menu",72),F("onMenuItemClicked",function(r){V(n);let s=w();return B(s.artistContextClicked(r))}),p(),W(119,mXi,8,10,"div",73),p()()()(),h(120,"div",74)(121,"nxt-datagrid",75,1),F("rowDoubleClickNew",function(r){V(n);let s=w();return B(s.eventRowClicked(r))}),p()()()()(),h(123,"div",76)(124,"div",77)(125,"div",78),ee(126,"nxt-studio-cash-report-2-menu",79),h(127,"nxt-button-icon",80),F("click",function(){V(n);let r=w();return B(r.showLatestChats())}),y(128,"chat"),p(),h(129,"nxt-button-icon",81),F("click",function(){V(n);let r=w();return B(r.newGiftCardClick())}),y(130,"receipt_long "),p(),h(131,"nxt-button-icon",82),F("click",function(){V(n);let r=w();return B(r.startEventRatingClicked())}),y(132,"thumbs_up_down "),p(),h(133,"nxt-button-icon",83),F("click",function(){V(n);let r=w();return B(r.showPhotosClicked())}),y(134,"image "),p(),h(135,"nxt-button-icon",84),F("click",function(){V(n);let r=w();return B(r.showSearch())}),y(136,"search "),p(),h(137,"nxt-button-icon",85),F("click",function(){V(n);let r=w();return B(r.showRoman())}),y(138,"numbers "),p(),h(139,"nxt-button-icon",86),F("click",function(){V(n);let r=w();return B(r.myService.walkInClicked(r.studioReal))}),y(140,"directions_run "),p(),W(141,yXi,4,3,"ng-container",53),p()()()()()}if(t&2){let n,i,r,s,o,a=pr(2),l=w();b("ngStyle.lt-sm",bn(98,EZi)),g(),b("collapsedWidth",10),g(2),b("sideBar",a),g(),Je(l.myService.showNotLoggedInView()?4:-1),g(),b("ngStyle.lt-sm",bn(99,MZi)),g(6),b("nxtMultiClick",3),g(),Ke("EINNAHMEN ",l.myService.studioView," "),g(2),Je((n=l.myService.showPostponedEvents?l.myService.data.calculatedData.payments.reception.klarnaPostponed:l.myService.data.calculatedData.payments.reception.klarna)?14:-1,n),g(),Je((i=l.myService.showPostponedEvents?l.myService.data.calculatedData.payments.reception.giftCardPostponed:l.myService.data.calculatedData.payments.reception.giftCard)?15:-1,i),g(),Je((r=l.myService.showPostponedEvents?l.myService.data.calculatedData.payments.reception.bankPostponed:l.myService.data.calculatedData.payments.reception.bank)?16:-1,r),g(),Je((s=l.myService.showPostponedEvents?l.myService.data.calculatedData.payments.reception.paypalPostponed:l.myService.data.calculatedData.payments.reception.paypal)?17:-1,s),g(),b("ngIf",l.canShowTotalMoney),g(3),b("columnDefs",l.incomingColumnDefs)("disableAllSort",!0)("quickFilterText",l.quickFilterText)("rowData",l.myService.incomingDataView)("showFooter",!0)("showSideBar",!1)("localTextOverwrite",bn(100,kZi)),g(2),b("ngIf",(l.myService.cashRegisterView==null||l.myService.cashRegisterView.openCashRegisterTransfersToReceived==null?null:l.myService.cashRegisterView.openCashRegisterTransfersToReceived.length)>0),g(),b("ngIf",(l.myService.cashRegisterView==null?null:l.myService.cashRegisterView.state)===l.NxtWorkSessionCashRegisterState._1_Open),g(4),Ke("AUSGABEN ",l.myService.studioView,""),g(2),ye(Nt(31,83,l.myService.totalOutgoingView,!1)),g(3),b("ngIf",(l.myService.cashRegisterView==null?null:l.myService.cashRegisterView.state)===l.NxtWorkSessionCashRegisterState._1_Open),g(),b("columnDefs",l.outgoingColumnDefs)("disableAllSort",!0)("quickFilterText",l.quickFilterText)("rowData",l.myService.outgoingDataView)("showFooter",!0)("showSideBar",!1)("localTextOverwrite",bn(101,IZi)),g(6),ye(l.loginService.getUsername()),g(2),ye(l.loginService.getStudio()),g(2),ye(tt(45,86,l.loginService.getWorkplace())),g(4),b("noPadding",!0)("showJumpDayButtons",!0),qe("nxtModel",l.myService.dateString),b("showTodayButton",!0)("noPlaceholder",!0),g(3),cn(" ",Nt(52,88,l.myService.data.workSession.startAt,"dd.MM HH:mm")," - ",Nt(53,91,l.myService.data.workSession.endAt,"dd.MM HH:mm")," "),g(7),b("nxtMultiClick",3)("ngStyle",sn(102,AZi,l.myService.showAllCashRegisters?"hidden":""))("options",l.myService.cashRegisterRadioButtons),qe("value",l.myService.studioView),g(2),b("ngIf",l.myService.cashRegisterRadioButtons.length>1),g(2),b("noBorder",!0),g(),ye(l.myService.viewFilter.cashState),g(2),b("noPadding",!0)("nxtFormControl",l.quickFilterFormControl)("clearIcon",!0),g(),b("noPadding",!0)("nxtFormControl",l.walkInFilterText)("clearIcon",!0),g(2),b("value",(o=tt(69,94,l.configService.config))==null?null:o.isWalkInToday),g(4),b("ngIf",l.myService.loginIsMainCashRegister&&l.myService.data.workSession.state===l.NxtWorkSessionState.CanStart),g(),b("ngIf",l.myService.data.workSession.state==="open"&&!l.myService.myLoginCashRegister),g(),b("ngIf",l.myService.cashRegisterView),g(2),b("ngIf",l.myService.data&&(!l.myService.cashRegisterView||l.myService.cashRegisterView.state===l.NxtWorkSessionCashRegisterState._1_Open)),g(6),Je(l.myService.showPostponedEvents?-1:82),g(),b("ngIf",l.myService.data.postponedEvents.length>0),g(2),b("ngIf",l.myService.data.postponedEvents.length>0),g(),qe("value",l.myService.viewFilter.hideClosedEvents),g(5),qe("value",l.showFilterToggle["fehlende Fotos"]),g(5),qe("value",l.showFilterToggle["Walk-In"]),g(5),qe("value",l.showFilterToggle["payment-some-giftcard-discounted"]),g(5),b("ngIf",!1),g(),qe("value",l.showFilterToggle["payment-some-giftcard"]),g(3),qe("value",l.showFilterToggle.Aktionen),g(4),b("innerHTML",tt(115,96,l.eventDetails),Pi),g(2),b("ngIf",l.cashReportHideArtistGetValues),g(3),b("ngForOf",l.myService.artistData),g(2),b("columnDefs",l.calendarEventColDefs)("disableAllSort",!0)("quickFilterText",l.quickFilterText)("rowData",l.myService.calendarEventsView)("showFooter",!0)("showSideBar",!1)("autoSizeColumnOnResize",!0)("localTextOverwrite",bn(104,PZi)),g(5),b("studioCashReport2Service",l.myService),g(11),b("fxHide.lt-sm",!0),g(4),b("ngIf",l.myService.cashRegisterView)}}var bZi,wZi,SZi,TZi,DZi,EZi,MZi,kZi,IZi,AZi,PZi,RZi,oj,Gyt=Q(()=>{me();zn();jo();x9e();Ci();$n();Ep();Pa();Vd();z9e();i3();jc();BX();o2();gu();kvt();Vb();LX();Ph();k9e();Bd();Ure();Avt();Nu();D9e();Rv();WA();dA();$A();t6e();Pvt();QU();zvt();Gvt();pa();Wvt();jvt();JU();I4e();Qo();n6();xB();ej();Il();ha();go();yyt();Ja();Jr();oo();s3();th();il();Mp();ls();Zi();sg();Syt();Dyt();An();Vt();ri();kl();mg();cee();Zh();bTe();me();yi();Kr();Ci();ma();ZE();gu();Cs();Fyt();jl();tve();hX();X_e();KP();ag();Byt();Hyt();z1();oee();pX();Vt();An();bZi=["calendarEventsDataGrid"],wZi=["menuNew"],SZi=["artistGetMenu"],TZi=["artistGetMenuTrigger"],DZi=["artistGetMenuTriggerWrapper"],EZi=()=>({fontSize:"70%"}),MZi=()=>({maxWidth:"calc(100vw - 10px)"}),kZi=()=>({totalAndFilteredRows:"Einnahmen",totalRows:"Alle Einnahmen"}),IZi=()=>({totalAndFilteredRows:"Ausgaben",totalRows:"Alle Ausgaben"}),AZi=t=>({visibility:t}),PZi=()=>({totalAndFilteredRows:"Termine",totalRows:"Alle Termine"}),RZi=t=>({selected:t});oj=(()=>{let e=class e extends i2{constructor(i,r,s,o,a,l,c,d,u,m,f,_,x,D,E,M,I,z,G,A,Y){super(),this.cdr=i,this.socketService=r,this.loginService=s,this.dialogService=o,this.activatedRoute=a,this.electronService=l,this.router=c,this.shortCutService=d,this.configService=u,this.dayFinishService=m,this.permissionService=f,this.eventService=_,this.stencilService=x,this.workSessionService=D,this.cashPaymentService=E,this.localStorageService=M,this.newIncomingOutgoingService=I,this.saleService=z,this.bodyPutService=G,this.walkInService=A,this.artistConfirmService=Y,this.showPostponedEvents=gt(!0),this.initDone=!1,this.NxtWorkSessionCashRegisterState=Rs,this.canShowTotalMoney=!this.permissionService.hasPermission(Zt.IsAc)||this.loginService.isBackoffice(),this.eventDetails="",this.cashReportHideArtistGetValues=this.configService.config.value.cashReportHideArtistGetValues&&this.loginService.isReception(),this.quickFilterFormControl=new $t(""),this.walkInFilterText=new $t(""),this.quickFilterText="",this.showFilterToggle={},this.showArtistGetValues=!this.configService.config.value.cashReportHideArtistGetValues||!this.loginService.isReception(),this.showOldVersionButton=!1,this.NxtWorkSessionState=G9e,this.testIsRunning=!1,this.NxtPermissionId=Zt,this.myService=new use(this.socketService,this.loginService,this.dialogService,this.configService,this.workSessionService,this.permissionService,this.dayFinishService,this.cashPaymentService,this.walkInService,this.artistConfirmService),this.initShortCuts(),this.initAuthenticationListener(),this.activatedRoute.snapshot.paramMap.get("studio")?this.setStudioCash(this.activatedRoute.snapshot.paramMap.get("studio")):this.myService.studioView||this.setStudioCash(this.loginService.getStudio()),this.activatedRoute.snapshot.queryParamMap.get("date")&&(this.permissionService.hasPermission(Zt.StudioCashReport_DatePicker)?this.myService.dateString=this.activatedRoute.snapshot.queryParamMap.get("date"):this.router.navigate([],{queryParams:{date:null},queryParamsHandling:"merge",replaceUrl:!0}).then()),this.registerEventListeners(),this.myService.showDateInGrid.subscribe(X=>O(this,null,function*(){if(yield Sr.waitFor(()=>this.nxtDataGrids&&this.nxtDataGrids.length>0,"nxtDataGrids"),this.nxtDataGrids)for(let ne of this.nxtDataGrids)ne.api?.setColumnVisible("date",X);this.detectChanges()})),this.showOldVersionButton=this.localStorageService.get("ShowOldNewVersionButton",!1),this.registerDetectChangesEvents()}ngAfterViewInit(){this.detectChanges()}initAuthenticationListener(){}ngOnInit(){return O(this,null,function*(){this.initDone=!0,this.myService.onOpenStudioCashReport(),setTimeout(()=>{this.setColumnDefs()},100),this.quickFilterFormControl.valueChanges.subscribe(i=>{this.quickFilterText=i;for(let r of Object.keys(this.showFilterToggle))i!==r&&(this.showFilterToggle[r]=!1)}),this.walkInFilterText.valueChanges.subscribe(i=>{if(i){let r={tw:{filterType:"text",type:"contains",filter:i}};this.calendarEventsDataGrid.api.setFilterModel(r)}else this.calendarEventsDataGrid.api.setFilterModel({})}),this.detectChanges()})}initShortCuts(){this.shortCutService.onKeyPress.subscribe(i=>{i===Pn.AltP&&this.showCalc()})}ngOnDestroy(){this.myService.onCloseStudioCashReport(),this.onDestroy(),this.unsubscribe([this.cashReportIncomingSubscription,this.cashReportOutgoingSubscription]),clearInterval(this.autoSizeAllColumnsInterval)}logout(){this.loginService.reLogin(!0).then()}checkCloseEventReminder(i,r){let s=r/1e3/60;s%30===0&&(this.electronService.show(),this.dialogService.showOk(`Der Termin
`+i.title+`
ist `+s+" Minuten \xFCberf\xE4llig").then())}calendarEventHastPayMore(i){return!i.closed&&i.end<Date.now()}newGiftCardClick(){this.dialogService.showComponentDialog(cse)}editOutgoingClicked(i){if(i.data.paymentType==="cash-report-outgoing")i.data.paymentType==="cash-report-outgoing"&&this.dialogService.showComponentDialog(H9e).componentInstance.loadFormId("outgoing",i.data.paymentUuid).then();else if(i.data.eventId){let r=this.dialogService.showComponentFull(nu);setTimeout(()=>{r.componentInstance.loadEvent({eventId:i.data.eventId}).then()},500)}}editIncomingClicked(i){return O(this,null,function*(){if(i.data.paymentType==="gift-card-sold")this.permissionService.hasPermission(Zt.StudioCashReport_CanEditGiftCard)&&this.dialogService.showComponentDialog(Ivt).componentInstance.load(i.data.paymentUuid).then();else if(i.data.paymentType==="cash-report-incoming")this.permissionService.hasPermission(Zt.StudioCashReport_CanEditIncoming)&&this.dialogService.showComponentDialog(H9e).componentInstance.loadFormId("incoming",i.data.paymentUuid).then();else if(i.data.eventId){let r=this.dialogService.showComponentFull(nu);setTimeout(()=>{r.componentInstance.loadEvent({eventId:i.data.eventId})},500)}})}setColumnDefs(){this.incomingColumnDefs=[{colId:"date",headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateShort,minWidth:70,maxWidth:70,cellStyle:i=>({textAlign:"center",color:i.data.isPrivate?xn.GridTextLighter:""}),hide:!this.myService.showDateInGrid.value},{headerName:"Zeit",field:"createdAt",nxtFieldType:Ee.Date_germanTime,minWidth:65,maxWidth:65,cellStyle:i=>({textAlign:"center",color:i.data.isPrivate?xn.GridTextLighter:""})},{colId:"edit",headerName:"",nxtFieldType:Ee.Text,maxWidth:50,minWidth:50,nxtOnCellClicked:i=>this.editIncomingClicked(i),cellStyle:{textAlign:"center"},cellRenderer:i=>{if(i.data.paymentType==="gift-card-sold"){if(this.permissionService.hasPermission(Zt.StudioCashReport_CanEditGiftCard))return Ir.Material.Edit}else if(i.data.paymentType==="cash-report-incoming"){if(this.permissionService.hasPermission(Zt.StudioCashReport_CanEditIncoming))return Ir.Material.Edit}else return Ir.Material.EditCalendar}},{headerName:"Erfasst",field:"createdBy",nxtFieldType:Ee.Text,maxWidth:90},{headerName:"Zahlung",field:"paymentType",nxtFieldType:Ee.PaymentType,minWidth:100,maxWidth:160},{headerName:"Betrag",field:"paymentValue",nxtFieldType:Ee.Money,maxWidth:95,cellStyle:{textAlign:"right"}},{headerName:"Artist",field:"artist",nxtFieldType:Ee.Text},{headerName:"Termin",field:"eventId",nxtFieldType:Ee.ShowCalendarEvent,maxWidth:70,cellStyle:{textAlign:"center"},hide:!0},{headerName:"_m\xF6gl",field:"isPrivate",valueGetter:i=>{if(i.data.isPrivate&&i.data.isPrivate.toString()==="loading")return"loading";if(i.data.isPrivate)return"ist";if(this.myService.data.workSession&&i.data.createdAt>this.myService.data.workSession.startAt&&i.data.createdAt<this.myService.data.workSession.endAt)return["complete"].indexOf(i.data.paymentType)>-1?"m\xF6gl.":""},minWidth:70,maxWidth:70,cellStyle:{textAlign:"center"},nxtOnCellDoubleClicked:i=>O(this,null,function*(){i.value==="m\xF6gl."?this.permissionService.hasPermission(Zt.StudioCashReport_Switch_)&&setTimeout(()=>O(this,null,function*(){i.node.setDataValue("isPrivate","loading"),(yield this.setEventTo_FromPayment(i.data)).success||i.node.setDataValue("isPrivate","")})):i.value==="ist"&&this.permissionService.hasPermission(Zt.StudioCashReport_Switch_)&&(i.node.setDataValue("isPrivate","loading"),(yield this.setEventBackFrom_FromPayment(i.data)).success||i.node.setDataValue("isPrivate","private"))}),hide:!this.permissionService.hasPermission(Zt.StudioCashReport_Switch_),cellRenderer:i=>i.data.eventInvoiceNumber?"R. da":i.value==="loading"?a4t.Loading:i.value},{headerName:"Info",field:"eventCustomerName",nxtFieldType:Ee.Text,maxWidth:500,valueGetter:i=>i.data.eventCustomerName||i.data.cashIncomingOutgoingDescription||i.data.giftCardDescription,cellRenderer:i=>(i.data.isPrivate?"_":"")+i.valueFormatted}],this.outgoingColumnDefs=[{colId:"date",headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateShort,minWidth:68,maxWidth:68,cellStyle:i=>({textAlign:"center",color:i.data.isPrivate?xn.GridTextLighter:""}),hide:!this.myService.showDateInGrid.value},{headerName:"Zeit",field:"createdAt",nxtFieldType:Ee.Date_germanTime,minWidth:68,maxWidth:68,cellStyle:i=>({textAlign:"center",color:i.data.isPrivate?xn.GridTextLighter:""})},{headerName:"",nxtFieldType:Ee.Text,maxWidth:50,minWidth:50,nxtOnCellClicked:i=>this.editOutgoingClicked(i),cellStyle:{textAlign:"center"},cellRenderer:i=>{if(i.data.paymentType==="cash-report-outgoing"){if(this.permissionService.hasPermission(Zt.StudioCashReport_CanEditOutgoing))return Ir.Material.Edit}else return Ir.Material.EditCalendar}},{headerName:"B",field:"attachment",nxtFieldType:Ee.Text,width:45,maxWidth:45,cellStyle:{textAlign:"center"},nxtOnCellClicked:i=>{i.data.paymentType==="cash-report-outgoing"&&!i.data.isPrivate&&this.editOutgoingClicked(i)},cellRenderer:i=>{if(i.data.paymentType==="cash-report-outgoing"){if(i.value)return Ir.Material.Check;if(!i.data.isPrivate&&!i.data.articleId.includes("bank")&&!i.data.articleId.includes("transfer")&&!i.data.articleId.includes("cash_to_private"))return"\u{1F534}"}}},{headerName:"Erfasst",field:"createdBy",nxtFieldType:Ee.Text,maxWidth:90},{headerName:"An",field:"artist",nxtFieldType:Ee.Text,width:90},{headerName:"Zahlung",field:"paymentType",nxtFieldType:Ee.PaymentType,minWidth:130,maxWidth:170},{headerName:"Betrag",field:"paymentValue",nxtFieldType:Ee.Money,maxWidth:95,cellStyle:{textAlign:"right"}},{headerName:"Termin",field:"eventId",nxtFieldType:Ee.ShowCalendarEvent,maxWidth:70,cellStyle:{textAlign:"center"},hide:!0},{headerName:"Info",field:"eventCustomerName",nxtFieldType:Ee.Text,maxWidth:500,valueGetter:i=>i.data.eventCustomerName||i.data.cashIncomingOutgoingDescription||i.data.giftCardDescription,cellRenderer:i=>{let r;i.data.eventId?r="person":r=Ir.getIconName(i.value),!r&&i.data.paymentType==="cash-report-outgoing"&&(r="logout");let s=i.valueFormatted;return i.data.paymentType&&i.data.paymentType==="cash-report-outgoing"&&i.data.originalCreatedBy&&(s+=" (Beleg von "+i.data.originalCreatedBy+")"),r&&(s='<div style="display:flex; align-items:center;"><span style="font-size:18px; line-height: 24px;" class="material-icons icon-image-preview">'+r+"</span>&nbsp;<span>"+(i.data.isPrivate?"_":"")+s+"</span></div>"),i.data.isPrivate,s}}],this.calendarEventColDefs=[{hide:this.loginService.isReception(),headerName:"RE",headerTooltip:"Rechnung",field:"invoiceNumber",nxtOnCellDoubleClicked:i=>O(this,null,function*(){this.loginService.isJulian()&&(xg.clear(this.eventRowClickedTimeout),i.data.invoiceNumber="",yield this.setInvoiceNumber(i.data,""),i.node.setDataValue("invoiceNumber",""))}),nxtOnCellClicked:i=>O(this,null,function*(){if(i.data.invoiceNumber){let r=yield this.socketService.getArtistInvoice(i.data.invoiceNumber);this.dialogService.showPdf(r.invoiceSignedBase64||r.invoiceBase64,r.invoiceNumber+".pdf")}})},{headerName:"",field:"id",nxtFieldType:Ee.ShowCalendarEvent,minWidth:50,maxWidth:50,getQuickFilterText:i=>this.getQuickFilterTextForEvent(i.data),valueGetter:i=>i.data.id,cellStyle:{textAlign:"center"}},{headerName:"",colId:"tw",field:"id",tooltipValueGetter:i=>i.data.fastWalkInNo?i.data.workType==="piercing"?"Piercing Walk-In Nr. "+i.data.fastWalkInNo:"Tattoo Walk-In Nr. "+i.data.fastWalkInNo:i.data.followUp?"Folgetermin "+(i.data.followUp.index+1)+" von "+i.data.followUp.total:"",nxtFieldType:Ee.Text,minWidth:70,maxWidth:70,valueGetter:i=>i.data.fastWalkInNo?i.data.workType==="piercing"?"P-"+i.data.fastWalkInNo:"T-"+i.data.fastWalkInNo:i.data.followUp?i.data.followUp.index+1+" / "+i.data.followUp.total:"",nxtOnCellClicked:i=>O(this,null,function*(){if(i.data.workType==="piercing"&&i.data.fastWalkInNo){let r=[{text:"PiercingLink erneut verschicken",value:"resend"},{text:"WalkIn-Nr l\xF6schen (Uhrzeit z\xE4hlt dann)",value:"deleteFastWalkIn"},{text:"Abbrechen",value:"cancel"}],s=yield this.dialogService.showButtons("Was willst du machen?",{buttons:r});s?.value==="resend"?this.socketService.piercingManagerSendRegisterLink(i.data.id).then():s?.value==="deleteFastWalkIn"&&this.socketService.setEventToNoWalkIn(i.data.id).then()}}),cellStyle:i=>(this.configService.config.value.studioRegion==="AC"||this.configService.config.value.studioRegion==="STAGING")&&i.data.workType==="piercing"&&i.data.fastWalkInRegisteredAt===0?{textAlign:"center",color:xn.Red}:{textAlign:"center"},getQuickFilterText:i=>i.data.fastWalkInNo||Vu.isWalkIn(i.data,this.myService.dateString)?"walk-in":""},{headerName:"V\xB7S\xB7T\xB7V",colId:"photos",nxtFieldType:Ee.Text,headerTooltip:"Vorlage \xB7 Stencil \xB7 Tattoo \xB7 Video",minWidth:85,maxWidth:85,valueGetter:i=>{if(i.data.workType==="piercing")return"";let r="";if(i.data.files){let s=i.data.files.filter(c=>c.subType.startsWith("template")).length,o=i.data.files.filter(c=>c.subType.startsWith("stencil")).length,a=i.data.files.filter(c=>c.subType==="tattooPhoto").length,l=i.data.files.filter(c=>c.subType==="tattooVideo").length;r+='<div class="flex flex-row items-center justify-center">'+s+'<div style="padding:2px;">\xB7</div>'+o+'<div style="padding:2px;">\xB7</div>'+a+'<div style="padding:2px;">\xB7</div>'+l+"</div>"}else(i.data.photoFolderId||i.data.closed)&&(r+='<div class="flex flex-row items-center justify-center">'+(i.data.mediaCount.templatePhoto||0)+'<div style="padding:2px;">\xB7</div>'+(i.data.mediaCount.stencil||0)+'<div style="padding:2px;">\xB7</div>'+(i.data.mediaCount.tattooPhoto||0)+'<div style="padding:2px;">\xB7</div>'+(i.data.mediaCount.tattooVideo||0)+"</div>");return r},tooltipValueGetter:i=>{if(i.data.workType==="piercing")return"";if(i.data.files){let r=i.data.files.filter(l=>l.subType.startsWith("template")).length,s=i.data.files.filter(l=>l.subType.startsWith("stencil")).length,o=i.data.files.filter(l=>l.subType==="tattooPhoto").length,a=i.data.files.filter(l=>l.subType==="tattooVideo").length;return"Vorlage: "+r+`
Stencil: `+s+`
Tattoo-Fotos: `+o+`
Tattoo-Videos: `+a}if(i.data.start<"2024-08-15".dateParse()){if(i.data.photoFolderId&&i.data.mediaCount){let r=[],s=[];return i.data.mediaCount.photo===1?s.push("1 Foto"):i.data.mediaCount.photo>1&&s.push(i.data.mediaCount.photo+" Fotos"),i.data.mediaCount.video===1?s.push("1 Video"):i.data.mediaCount.video>1&&s.push(i.data.mediaCount.video+" Videos"),r.length>0?r+`
`+s.join(" & "):s.join(" & ")}}else if(i.data.mediaCount){let r=[];return i.data.mediaCount.templatePhoto===0?r.push("\u2757Vorlage fehlt\u2757"):r.push("Vorlage:  "+(i.data.mediaCount.templatePhoto||0)),i.data.mediaCount.stencil===0?r.push("\u2757Stencil-Foto fehlt\u2757"):r.push("Stencil: "+(i.data.mediaCount.stencil||0)),r.push("Tattoo-Fotos: "+(i.data.mediaCount.tattooPhoto||0)),r.push("Tattoo-Videos: "+(i.data.mediaCount.tattooVideo||0)),r.join(`
`)}else return"Vorlage fehlt";return""},cellStyle:i=>{if(i.data.workType==="piercing"||!i.data.closed)return;let r={textAlign:"center"};if(i.data.files){let s=i.data.files.filter(c=>c.subType.startsWith("template")).length,o=i.data.files.filter(c=>c.subType.startsWith("stencil")).length,a=i.data.files.filter(c=>c.subType==="tattooPhoto").length,l=i.data.files.filter(c=>c.subType==="tattooVideo").length;a===0&&(r.color=xn.Red),o===0&&(r.color=xn.Orange)}return r},nxtOnCellClicked:i=>{i.data.photoFolderId&&i.data.mediaCount.photo+i.data.mediaCount.video>0&&window.open("https://drive.google.com/drive/folders/"+i.data.photoFolderId,"_blank")},getQuickFilterText:i=>{let r=0;return i.data.workType==="piercing"||!i.data.mediaCount?"":(i.data.mediaCount.photo&&(r+=i.data.mediaCount.photo),i.data.mediaCount.video&&(r+=i.data.mediaCount.video),r===0?"fehlende fotos":"")}},{headerName:"E",headerTooltip:"Einwilligung",colId:"e",nxtFieldType:Ee.Text,minWidth:45,maxWidth:45,valueGetter:i=>i.data.closed?P5.hasConsent(i.data)?P5.hastCorrectPageCount2(i.data)?"correct":"wrong":"missing":"",valueFormatter:i=>{switch(i.value){case"":return"";case"missing":return"\u{1F534}";case"correct":return Ir.Material.CheckNoPointer;case"wrong":return"\u{1F7E0}"}},tooltipValueGetter:i=>i.data.closed?P5.hasConsent(i.data)?P5.hastCorrectPageCount2(i.data)?"Einwilligung korrekt":"Einwilligung falsche Seitenanzahl":"Einwilligung fehlt":"",getQuickFilterText:()=>""},{headerName:"S",headerTooltip:"Stencil gesehen",colId:"stencilSeen",nxtFieldType:Ee.Text,minWidth:45,maxWidth:45,tooltipValueGetter:i=>i.data.workType==="piercing"?"":i?.data?.stencilSeen?.seen?i?.data?.stencilSeen?.seenBy+" "+Ie.dateDiffToNowText(i?.data?.stencilSeen?.seenAt):"noch nicht gesehen!",valueGetter:i=>i.data.workType==="piercing"?"":i?.data?.stencilSeen?.seen?Ir.Material.Check:"\u{1F534}",getQuickFilterText:i=>i.data.stencilSeen.seen?"":"Stencil fehlt",nxtOnCellClicked:i=>O(this,null,function*(){if(i.data.workType==="piercing")return"";let r=yield this.stencilService.showStencilSeenDialog(i.data.id);r&&(i.data.stencilSeen=r),i.node.setDataValue("stencilSeen",i.data.stencilSeen)})},{headerName:"B",field:"ratings",headerTooltip:"Bewertung",hide:!this.configService.config.value.mustEventRating,colId:"rating",nxtFieldType:Ee.Text,nxtCellStyle:{textAlign:"center"},minWidth:70,maxWidth:70,tooltipValueGetter:i=>{if(i.data.workType==="piercing")return"";if(Es.isNumber(i.data.ratingValue)&&i.data.ratings&&i.data.ratings.length>0){let r=i.data.ratingValue.round(1)+`
`;return r+=i.data.ratings.map(s=>s.username+": "+s.value).join(`
`),r}else if(i.data.closed)return"Bewertung fehlt noch";return""},cellRenderer:i=>{if(i.data.workType==="piercing")return"";if(i.data.ratings&&i.data.ratings.length>0)return'<div class="flex flex-row items-center justify-center"><div style="position: absolute; right: 4px; top: 2px" class="leading-none text-[70%]"> '+i.data.ratings.length+"</div><div>"+fn.round(i.data.ratingValue,1)+"</div></div>";if(i.data.closed)return"\u{1F534}"},nxtOnCellClicked:i=>O(this,null,function*(){this.permissionService.hasPermission(Zt.EventRating_Edit)&&this.dialogService.showEventRating(i.data.id)})},{headerName:"sortColumn",field:"start",valueGetter:i=>i.data.start+i.data.artist,hide:!0},{headerName:"Artist",field:"artist",nxtFieldType:Ee.Text,cellRenderer:i=>i.data.artistFix?i.data.artist+" (fix)":i.data.artist},{headerName:"Kunde",nxtFieldType:Ee.Text,valueFormatter:i=>i.data.customerObj&&Uv.isFirstAppointment(i.data.customerObj,this.myService.dateString.dateParse())?"<strong>*"+i.value+"</strong>":i.value,tooltipValueGetter:i=>{if(i.data.customerObj&&Uv.isFirstAppointment(i.data.customerObj,this.myService.dateString.dateParse()))return`NEUKUNDE!
`+i.value},valueGetter:i=>{let r=i?.data?.customerObj;if(r){let s;if(r?.birthday){let o=Ie.parse(r.birthday),a=vx.getBirthdayInfo(o);s=r.givenName+" "+r.familyName+" ("+a.age+")",a.daysToBirthday>-3&&a.daysToBirthday<=3&&(s+=" "+a.text)}else s=r.givenName+" "+r.familyName;return i.data.importantInfo?s="\u2757"+s:i.data.durationPriceInfo&&(s="\u23F0 "+s),s}return"UNBEKANNT?"}},{hide:!0,headerName:"Start",field:"start",nxtFieldType:Ee.Date_germanTime,valueFormatter:i=>Ie.format(i.data.start,"HH:mm")+" - "+Ie.format(i.data.end,"HH:mm"),maxWidth:65,cellStyle:i=>({textAlign:"center",color:i.data.visibility==="private"?xn.GridTextLighter:""})},{colId:"date",headerName:"Datum",field:"start",nxtFieldType:Ee.Date_germanDateShort,minWidth:70,maxWidth:70,cellStyle:i=>({textAlign:"center",color:i.data.visibility==="private"?xn.GridTextLighter:""}),hide:!this.myService.showDateInGrid.value},{headerName:"Termin",nxtFieldType:Ee.Text,valueGetter:i=>{let r=Ie.format(i.data.start,"HH:mm"),s=Ie.format(i.data.end,"HH:mm");return r+" - "+s+" ("+Qt.format(i.data.end-i.data.start,"H:mm")+")"},cellRenderer:i=>{let r=0;if(Date.now()>i.data.start){let a=i.data.end-i.data.start;r=(Date.now()-i.data.start)/a*100}r>100&&(r=100);let s=xn.Green;!i.data.closed&&i.data.end<Date.now()&&(s=xn.Orange2);let o='<div style="position:absolute; z-index: 1; padding-left: 11px">';return o+=i.value,o+='</div><div style="width:100%; position:absolute"><div style="width:'+r+"%; background-color: "+s+'">&nbsp;</div></div>',o},cellStyle:()=>({paddingLeft:0,paddingRight:0,border:"none"}),minWidth:145,maxWidth:145},{headerName:"Status",field:"closed",nxtFieldType:Ee.Text,cellRenderer:i=>i.data.closed?"Fertig":i.data.start<Date.now()?i.data.end<Date.now()?"\xDCberf\xE4llig":"L\xE4uft":"Offen",cellStyle:i=>{if(this.calendarEventHastPayMore(i.data))return{backgroundColor:xn.Orange2};if(i.data.closed)return{backgroundColor:xn.Green}},minWidth:65,maxWidth:65,nxtOnCellClicked:i=>O(this,null,function*(){(yield this.eventService.closeEventDialog(i.data))&&(i.data.closed=!i.data.closed,i.node.setDataValue("closed",i.data.closed))})},{headerName:"W",headerTooltip:"Wertigkeit",field:"valence",nxtFieldType:Ee.Decimal,hide:!this.loginService.isBackoffice(),maxWidth:55,minWidth:55},{headerName:"aktion",hide:!0,getQuickFilterText:i=>i.data.discountPromotion&&i.data.discountPromotion.id!=="none"?i.data.discountPromotion?.additionalPayAfterEnd?"Aktionen nachkassieren":"Aktionen":""},{headerName:"Preis",field:"priceEstimatedFrom",tooltipValueGetter:i=>{let r=[];return i.data.discountPromotion&&i.data.discountPromotion.id!=="none"&&r.push(i.data.discountPromotion.name),i.data.priceEstimatedFrom<i.data.priceEstimatedTill?r.push(i.data.priceEstimatedFrom.toMoneyString("",!1)+" bis "+i.data.priceEstimatedTill.toMoneyString("\u20AC",!1)):typeof i.data.priceEstimatedFrom!="number"?r.push("\u2757Preis fehlt noch\u2757"):i.data.priceFix?r.push("Fix "+i.data.priceEstimatedFrom.toMoneyString("\u20AC",!1)):r.push("ca. "+i.data.priceEstimatedFrom.toMoneyString("\u20AC",!1)),r.join(`
`)},valueFormatter:i=>{if(typeof i.data.priceEstimatedFrom!="number")return"FEHLT NOCH";let r=!i.data.priceEstimatedTill,s=Wn.toMoneyString(i.value,r?"\u20AC":"",!1),o=[];return i.data.discountPromotion&&i.data.discountPromotion.id!=="none"?o.push("\u2B50"):i.data.priceFix?o.push("fix"):i.data.priceEstimatedTill||o.push("ca."),o.length>0&&(s=o.join("")+" "+s),i.data.priceEstimatedFrom<i.data.priceEstimatedTill&&(s+=" - "+Wn.toMoneyString(i.data.priceEstimatedTill,"\u20AC",!1)),s},nxtOnCellClicked:i=>{if(i.data.priceChanges.length>0){let s=i.data.priceChanges.map(o=>o.u+" "+o.t.dateFormat("dd.MM.yyyy HH:mm")+`
`+o.from.toMoneyString()+" "+cr.arrowRight+" "+o.to.toMoneyString()+`
`+o.i);s.length>0&&this.dialogService.showOk(s.join(`

`),{title:"Preis\xE4nderungen"}).then()}},minWidth:120,maxWidth:120,cellStyle:i=>{let r={textAlign:"right",color:i.data.visibility==="private"?xn.GridTextLighter:""};return typeof i.data.priceEstimatedFrom!="number"&&(r.color=xn.Red),r}},{headerName:"",valueGetter:i=>{if(i.data.promoOfferCreatedAt)return i.data.createdAt-i.data.promoOfferCreatedAt},cellRenderer:i=>{if(i.value/Qt.DURATION_1MINUTE<180)return Qt.format(i.value,"HH:mm")},maxWidth:70,minWidth:70,hide:this.configService.config.value.studioRegion!=="MA"},{headerName:"cashEndOfDay",field:"cashEndOfDay",nxtFieldType:Ee.Money,cellStyle:{textAlign:"right"},minWidth:90,maxWidth:90,hide:!0},{headerName:"Dauer-Preis",nxtFieldType:Ee.Text,valueGetter:i=>{if(i.data.workType==="tattoo")return F7.timeCheck(i.data.end-i.data.start,i.data.priceEstimatedFrom).calculatedPriceDiff},valueFormatter:i=>{if(i.value)return i.value>0?"+"+Wn.toMoneyString(i.value,"\u20AC",!1):Wn.toMoneyString(i.value,"\u20AC",!1)},minWidth:85,maxWidth:85,cellStyle:i=>Math.abs(i.value)>50?Math.abs(i.value)>=100?{textAlign:"right",color:xn.Red}:{textAlign:"right",color:xn.Orange}:{textAlign:"right"},hide:!this.permissionService.hasPermission(Zt.ShowDurationPriceCheckColumn)},{colId:"payMore",headerName:"Nachbezahlen",valueGetter:i=>{if(this.calendarEventHastPayMore(i.data)){let r=Ie.dateDiffToNow(i.data.end),s=Qt.format(r,"HH:mm");this.checkCloseEventReminder(i.data,r);let o=Xo.calcAdditionalPaymentValue(Ie.dateDiffToNow(i.data.end));return s+" = "+Wn.toMoneyString(o,"\u20AC",!1)}},minWidth:0,maxWidth:120,nxtFieldType:Ee.Text,suppressAutoSize:!0,hide:!0},{headerName:"bezahlt",field:"paymentSum",nxtFieldType:Ee.Money,aggFunc:"sum",cellStyle:{textAlign:"right"},minWidth:75,maxWidth:75},{headerName:"offen",field:"toPay",valueGetter:i=>{if(i.data.priceEstimatedTill>i.data.priceEstimatedFrom){let r=i.data.priceEstimatedFrom-i.data.paymentSum,s=i.data.priceEstimatedTill-i.data.paymentSum;r<0&&(r=0),s<0&&(s=0);let o=xn.Red;return r===0&&(o=xn.Orange),s===0&&(o=xn.Green),{text:r.toMoneyString("",!1)+" - "+s.toMoneyString("\u20AC",!1),color:o}}if(typeof i.data.toPay!="number")debugger;return{text:i.data.toPay.toMoneyString("\u20AC",!1),color:i.data.toPay>0?xn.Red:xn.Green}},cellRenderer:i=>i.value.text,nxtFieldType:Ee.Text,aggFunc:"sum",minWidth:100,maxWidth:100,cellStyle:i=>({textAlign:"right",color:i.value.color,fontWeight:"bold"})},{headerName:"Art. noch",field:"artistToGet",nxtFieldType:Ee.MoneyOnlyPositivShort,aggFunc:"sum",cellStyle:{textAlign:"right"},hide:!this.loginService.isBackoffice(),minWidth:80,maxWidth:80},{headerName:"Art. hat",nxtFieldType:Ee.MoneyOnlyPositivShort,aggFunc:"sum",valueGetter:i=>Xo.getPaymentSumByPaymentType(i.data.payments,"payout"),cellStyle:{textAlign:"right"},hide:!this.loginService.isBackoffice(),minWidth:80,maxWidth:80},{headerName:"Kasse+-",field:"cashEndOfDay",nxtFieldType:Ee.Money,aggFunc:"sum",minWidth:85,maxWidth:85,hide:!this.loginService.isBackoffice(),cellStyle:{textAlign:"right"}},{headerName:"Info",field:"title",nxtFieldType:Ee.Text,hide:!0},{headerName:"Art. %",field:"artistPercentage",nxtFieldType:Ee.Number,valueGetter:i=>Math.round(i.data.artistPercentage),cellRenderer:i=>i.value+" %",cellStyle:{textAlign:"right"}},{headerName:"Wichtig",field:"importantInfo",nxtFieldType:Ee.Text,cellStyle:{color:xn.Red,fontWeight:"bold"}},{headerName:"Dauer-Preis Info",field:"durationPriceInfo",hide:!0,nxtFieldType:Ee.Text,cellStyle:{color:xn.Red,fontWeight:"bold"}},{headerName:"Erstellt",field:"createdBy",nxtFieldType:Ee.Text,valueGetter:i=>i.data.createdBy+" ("+Ie.dateDiffToNowText(i.data.createdAt)+")"},{headerName:"Ge\xE4ndert",field:"createdBy",nxtFieldType:Ee.Text,hide:!0,valueGetter:i=>i.data.updatedBy+" ("+Ie.dateDiffToNowText(i.data.updatedAt)+")"}],this.detectChanges()}setInvoiceNumber(i,r){return O(this,null,function*(){yield this.socketService.updateCalendarEventProperty(i.id,{invoiceNumber:r})})}setEventTo_FromPayment(i){return O(this,null,function*(){let r=yield this.socketService.setEventTo_FromPayment2(i);return r.success||this.dialogService.showOk(r.text).then(),r})}setEventBackFrom_FromPayment(i){return O(this,null,function*(){let r=yield this.socketService.setEventBackFrom_FromPayment2(i);return r.success||this.dialogService.showOk(r.text).then(),r})}showCalc(){this.dialogService.showComponentDialog(ese,{})}showLatestChats(){this.dialogService.showComponentFull($F)}setStudioCash(i){this.myService.studioView=i;let r=this.configService.config.value.studios.find(s=>s.name===this.myService.studioView);r?.realStudio?this.studioReal=r?.realStudio:this.studioReal=this.myService.studioView,this.allCashRegisters=this.configService.config.value.studios.filter(s=>s.name.includes(this.studioReal)).map(s=>s.name)}showRoman(){this.dialogService.showComponentFull(Qre)}showSearch(){this.dialogService.showComponentFull(I5)}eventRowClicked(i){this.eventRowClickedTimeout=setTimeout(()=>{this.dialogService.showEvent(i.data.id)},100)}componentClicked(){this.artistGetMenuTrigger?.closeMenu()}stopPropagation(i){i.stopPropagation(),i.preventDefault()}loadData(){return O(this,null,function*(){this.myService.reloadData().then()})}registerEventListeners(){}dateChanged(){this.loadData().then()}studioChanged(){this.myService.refreshView()}artistClicked(i){this.myService.setArtistFilter(i)}datePickerChanged(){this.myService.debouncedReload.next()}detectChanges(){this.cdr.detectChanges()}showArtistMoneyClicked(){this.showArtistGetValues=!0,this.detectChanges(),setTimeout(()=>{this.showArtistGetValues=!1,this.detectChanges()},5e3)}startWorkSessionClicked(){this.myService.startWorkSession()}startCashRegisterClicked(){this.myService.startCashRegister().then()}showAllCashRegistersChanged(){this.myService.refreshView()}showPreDayFinish(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(Uvt);return i.componentInstance.myService=this.myService,yield Sn(i.afterClosed())})}toggleDayFinishClicked(){return O(this,null,function*(){if(this.myService.cashRegisterView.state===Rs._1_Open){if(this.permissionService.hasPermission(Zt.StudioCashReport_ToggleBlockDayFinish)){let i=!0;if(this.myService.cashRegisterView.isMainCashRegister){let r=yield this.showPreDayFinish();if(!r)return;i=r.doUnblock,this.myService.log(r.postponeEventIds.length+" Termin(e) auf morgen verschoben"),yield this.socketService.workSessionSetPostponeEvents(this.myService.dateString,r.postponeEventIds)}i&&(this.myService.log("Abrechnung freigegeben "+this.myService.cashRegisterView.studio),this.myService.setViewedCashRegisterState(Rs._3_CalcCashRegister1))}}else this.myService.cashRegisterView.state===Rs._3_CalcCashRegister1&&this.permissionService.hasPermission(Zt.StudioCashReport_ToggleBlockDayFinish)&&(this.myService.log("Abrechnung blockiert"),this.myService.setViewedCashRegisterState(Rs._1_Open))})}dayFinishClicked(){return O(this,null,function*(){if(this.loginService.isJulian()&&(yield this.dialogService.showYesNo("Voransicht anschauen?"))){let i=yield this.showPreDayFinish();i&&(yield this.socketService.workSessionSetPostponeEvents(this.myService.dateString,i.postponeEventIds))}if(this.myService.studioView!==this.myService.myLoginCashRegister.studio){this.dialogService.showOk("Du bist nicht an dieser Kasse angemeldet!").then();return}this.myService.loginIsMainCashRegister;{let i=this.dialogService.showComponentFull(Bvt);i.componentInstance.myService=this.myService}})}switchFilterCashState(){this.myService.viewFilter.cashState==="all"?this.myService.viewFilter.cashState="t":this.myService.viewFilter.cashState==="t"?this.myService.viewFilter.cashState="n":this.myService.viewFilter.cashState==="n"&&(this.myService.viewFilter.cashState="all"),this.myService.refreshView()}workSessionClicked(){let i=this.dialogService.showComponentDialog(Hvt);i.componentInstance.myService=this.myService}artistContextClicked(i){return O(this,null,function*(){if(i.menuItem===NC.SetTimeWindow){let r=yield this.socketService.getArtistSpotByArtistAndDate(i.artist.name,this.myService.dateString,!0);this.dialogService.showComponentDialog(Uy).componentInstance.load(r.id)}if(i.menuItem===NC.EarlyPayout&&(yield this.dialogService.showYesNo("M\xF6chtest du&nbsp;<strong>"+i.artist.name+"</strong>&nbsp;fr\xFChzeitig Auszahlen?"))){this.dialogService.showLoading(_n.AutoArtistPayout,"Artist-Auszahlungen werden gebucht..."),yield this.socketService.earlyArtistPayout2(this.myService.dateString,i.artist.name),this.dialogService.hideLoading(_n.AutoArtistPayout);let s=yield this.socketService.getArtistConfirmByArtistAndWorkSessionDateTime(i.artist.name,this.myService.dateString);(!s||s.state!=="confirmed")&&this.artistConfirmService.start(i.artist.name,i.artist.payoutValue,this.myService.dateString,!0)}if(i.menuItem===NC.Invoice){let r=this.myService.data.workSession.invoices?.find(a=>a.invoiceTo.artistName===i.artist.name);if(!r){this.dialogService.showOk("Keine Rechnung f\xFCr "+i.artist.name+" gefunden");return}this.dialogService.showLoading(_n.AutoArtistPayout,"Lade Rechnung f\xFCr "+i.artist.name);let s=yield this.socketService.getArtistInvoice(r.invoiceNumber);this.dialogService.hideLoading(_n.AutoArtistPayout);let o=this.dialogService.showPdf(s.invoiceSignedBase64||s.invoiceBase64,s.invoiceNumber+".pdf");yield Sn(o.afterClosed())}i.menuItem===NC.ResetEarlyArtistPayout&&this.socketService.resetEarlyArtistPayout(this.myService.dateString,i.artist.name)})}showPostponedEventsClicked(){return O(this,null,function*(){this.myService.showPostponedEvents=!this.myService.showPostponedEvents,this.myService.refreshView()})}triggerNewOldVersionButton(){this.localStorageService.set("ShowOldNewVersionButton",!this.localStorageService.get("ShowOldNewVersionButton",!1)),this.showOldVersionButton=this.localStorageService.get("ShowOldNewVersionButton",!1),this.detectChanges()}registerDetectChangesEvents(){this.myService.data$.subscribe(()=>{this.initDone&&this.detectChanges()})}newIncomingOutgoingClicked(i){if(this.myService.isWorkSessionOpenMyLoginCashRegister(!0)){let r=this.myService.cashRegisterView.startMoney+this.myService.cashRegisterViewCalc.incomingPaymentsSum-this.myService.cashRegisterViewCalc.outgoingPaymentsSum,s=this.myService.cashRegisterViewCalc.incomingPaymentsSum_-this.myService.cashRegisterViewCalc.outgoingPaymentsSum_;this.newIncomingOutgoingService.newIncomingOutgoingClicked(i,this.myService.studioView,r,s).then()}}newPaypalIncomingClicked(){this.saleService.newPaypalSale().then()}sideBarDataChanged(){this.detectChanges()}setCashRegisterStateClicked(i){return O(this,null,function*(){let r=AA.getTextRecursiveParent(i.target).split(`
`)[0],s=this.myService.data.workSession.cashRegisters.find(o=>o.studio===r);if(s){let o=[];for(let l of oa(Rs))o.push({text:uv.getCashRegisterStateText(Rs[l]),value:Rs[l]});let a=yield this.dialogService.showSelect("Status setzen",o,{value:s.state});a&&a!==s.state&&(s.state=a,this.myService.updateWorkSessionCashRegister(s))}})}acceptTransferClicked(){return O(this,null,function*(){let i=this.myService.cashRegisterView.openCashRegisterTransfersToReceived[0];(yield this.dialogService.showYesNo("Transfer \xFCber "+(i.transferValue+i.transferSafeValue).toMoneyString()+" annehmen?"))&&(this.dialogService.showLoading("Transfer wird angenommen..."),this.socketService.acceptCashRegisterTransfer(this.myService.dateString,i,this.myService.cashRegisterView.studio).then(),this.dialogService.hideLoading())})}startTest(){return O(this,null,function*(){this.testIsRunning?(this.testIsRunning=!1,clearInterval(this.testInterval)):(this.testIsRunning=!0,this.testInterval=setInterval(()=>O(this,null,function*(){let i=fn.getRandomFromArray(this.myService.calendarEventsView),r=this.dialogService.showEvent(i.id);yield za.sleep(1e3),r.close()}),2e3))})}setWalkIn(){this.socketService.setWalkInToday(!this.configService.config.value.isWalkInToday).then()}getQuickFilterTextForEvent(i){let r=[];return r.push(...this.bodyPutService.getTextFromEvent(i)),i.payments.some(s=>s.paymentMethod==="gift-card")&&(r.push("payment-some-giftcard"),i.payments.some(s=>s.paymentMethod==="gift-card"&&s.paymentGiftCard.discountPercentage>0)&&r.push("payment-some-giftcard")),i.payments.some(s=>s.paymentMethod==="gift-card"&&s.paymentGiftCard.discountPercentage>0)&&(r.push("payment-some-giftcard-discounted"),i.payments.some(s=>s.paymentMethod==="gift-card"&&s.paymentGiftCard.discountPercentage===50)&&r.push("payment-some-giftcard-discounted-50")),r.join(" ")}createArtistConfirm(){}startEventRatingClicked(){this.dialogService.showComponentFull(sw).componentInstance.dateString.set(this.myService.dateString)}showPhotosClicked(){let i=this.dialogService.showComponentFull(Rse)}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(lt),R(Fi),R(vt),R(gs),R(B6),R(Ll),R(fu),R(Xi),R(Ryt),R(ws),R(PX),R(LA),R(ree),R(K5),R(vu),R(Vyt),R(zyt),R(Oc),R(YP),R(OA))},e.\u0275cmp=_e({type:e,selectors:[["nxt-studio-cash-report-2"]],viewQuery:function(r,s){if(r&1&&(ei(bZi,5),ei(wZi,5),ei(SZi,5),ei(TZi,5),ei(DZi,5),ei(W9e,5),ei(dr,5)),r&2){let o;Pt(o=Rt())&&(s.calendarEventsDataGrid=o.first),Pt(o=Rt())&&(s.menuNew=o.first),Pt(o=Rt())&&(s.artistGetMenu=o.first),Pt(o=Rt())&&(s.artistGetMenuTrigger=o.first),Pt(o=Rt())&&(s.artistGetMenuTriggerWrapper=o.first),Pt(o=Rt())&&(s.scrArtistContextMenuComponent=o.first),Pt(o=Rt())&&(s.nxtDataGrids=o)}},standalone:!0,features:[et,xe],decls:3,vars:3,consts:[["sideBar",""],["calendarEventsDataGrid",""],["class","text-gray-500 text-[9px]","style","position: fixed; left: 0; z-index: 999",4,"ngIf"],["class","nxt-page","fxLayoutAlign","center center",4,"ngIf"],["class","nxt-page !pl-0 !py-2 !pr-2","fxLayout","row",3,"ngStyle.lt-sm","click",4,"ngIf"],[1,"text-gray-500","text-[9px]",2,"position","fixed","left","0","z-index","999"],["fxLayoutAlign","center center",1,"nxt-page"],["fxLayout","row",1,"nxt-page","!pl-0","!py-2","!pr-2",3,"click","ngStyle.lt-sm"],[3,"collapsedWidth"],[3,"dataChanged","sideBar"],[1,"not-logged-in-view"],["fxFlex","","fxLayout","column","fxFlexAlign","stretch","fxLayoutGap","5px",3,"ngStyle.lt-sm"],["fxFlex","","fxLayout","column","fxFlexAlign","stretch","fxLayoutGap","5px",1,"scroll-view"],["id","oberer-teil","fxLayout","row","fxLayout.lt-sm","column","ngStyle.lt-sm","height: fit-content","fxFlex","","fxLayoutGap","5px"],["id","incomings","fxLayout","column","ngStyle.lt-sm","min-height: 400px",1,"nxt-card","grid-min-height",2,"padding-right","0px"],["fxLayout","row wrap","fxLayoutAlign","space-between center",1,"nxt-card-title",2,"padding-bottom","6px","padding-right","10px"],["fxFlex","","fxShow.lt-sm","false","fxLayout","row wrap","fxLayoutAlign","space-between center",1,"no-wrap"],[2,"padding-right","1em",3,"nxtOnMultiClick","nxtMultiClick"],["fxLayout","row"],["fxLayout","row","fxLayoutAlign","center center",1,"text-80"],["fxLayout","row","fxLayoutAlign","center center",4,"ngIf"],["fxFlex","","fxLayout","row","fxLayoutAlign","center center",1,"nxt-card-content"],[1,"flex","h-full","w-full","flex-col"],["name","incomingPayments","uniqueRowDataKey","paymentUuid","fxFlex","",1,"h-100",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","localTextOverwrite"],[1,"flex","flex-row","justify-center","pt-1"],["class","blink",3,"click",4,"ngIf"],["class","flex flex-col justify-end h-100",4,"ngIf"],["id","outgoings","fxLayout","column","ngStyle.lt-sm","min-height: 400px",1,"nxt-card","grid-min-height",2,"padding-left","0 !important"],["fxLayout","row","fxLayoutAlign","space-between center",1,"nxt-card-title",2,"padding-bottom","6px","padding-left","10px"],["fxFlex",""],[1,"flex","grow","flex-row","nxt-card-content"],["class","flex flex-col justify-end",4,"ngIf"],["name","outgoingPayments","uniqueRowDataKey","paymentUuid","fxFlex","",1,"h-100",3,"columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","localTextOverwrite"],["id","mittlerer-teil","fxLayout","row"],[2,"width","22px"],["fxLayout","column","fxLayoutAlign","center center"],["fxLayoutAlign","start end","fxLayout","column",1,"no-wrap",2,"padding","0 10px","cursor","pointer",3,"click"],[1,"text-80"],["fxLayout","row","fxLayout.lt-sm","column","fxLayoutGap","0px","fxLayoutGap.lt-sm","8px","fxLayoutAlign","space-between center",1,"nxt-card","nxt-text",2,"padding","0 8px  !important"],["nxtPermission","StudioCashReport_DatePicker","fxLayout","column","fxLayoutAlign","center center",1,"date-picker",2,"border","0 solid green"],["width","200px",3,"nxtModelChange","noPadding","showJumpDayButtons","nxtModel","showTodayButton","noPlaceholder"],[1,"mouse-pointer",2,"position","relative","left","-13px","top","-3px","font-size","10.5px",3,"click"],["nxtPermission","IsJulian"],[3,"click"],["nxtPermission","StudioCashReport_SwitchStudios","fxHide.lt-sm","","fxLayout.gt-xs","row","fxLayout.lt-sm","column","fxLayoutAlign","start center",1,"pl-2"],["direction","row","textKey","text","valueKey","value",3,"nxtOnMultiClick","valueChange","nxtMultiClick","ngStyle","options","value"],["nxtPermission","StudioCashReport_ShowAllCashRegisters","fxLayout","row","fxLayoutAlign","center center",4,"ngIf"],["nxtPermission","","permissionNot","DisableGlobal_",3,"click","noBorder"],["fxLayout","row","fxShow.lt-sm","false","fxLayoutAlign","center center","fxLayoutGap","10px"],["placeholder","Suche",3,"noPadding","nxtFormControl","clearIcon"],["placeholder","W-Nr",2,"width","70px",3,"noPadding","nxtFormControl","clearIcon"],["nxtPermission","StudioCashReport_CanSetWalkIn",3,"valueChange","value"],[3,"click",4,"ngIf"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","center end","class","pl-2 text-70","style","line-height: 1.2",4,"ngIf"],["id","unterer-teil","fxLayout","column","fxFlex",""],["fxLayout","column","fxFlex","",1,"nxt-card"],[1,"nxt-card-title"],["fxLayout","row",2,"padding-bottom","6px"],["fxLayout","column","fxLayoutAlign","center start","fxHide.lt-sm","",1,"pr-2"],[3,"innerHTML"],["class","text-70",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center",1,"gap-3","filter-toggles",2,"font-size","14px"],["fxHide.lt-md","",3,"value","valueChange",4,"ngIf"],["fxHide.lt-md","",3,"valueChange","value"],[1,"filter-toggle-text"],[3,"valueChange","value"],[3,"value","valueChange",4,"ngIf"],["fxFlex","","fxShow.lt-sm","false","fxLayout","row","fxLayoutAlign","end center",2,"position","relative"],["fxLayout","row","fxLayoutAlign","end center",3,"innerHTML"],["fxLayoutAlign","center center","class","px-1",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","end center"],[3,"onMenuItemClicked"],["fxLayout","column","fxLayoutAlign","center center",3,"class","ngClass","matTooltip","click","contextmenu",4,"ngFor","ngForOf"],["fxFlex","","fxLayout","column","fxFlexAlign","stretch",1,"nxt-card-content","grid-min-height"],["name","calendarEvents","uniqueRowDataKey","id","fxFlex","",3,"rowDoubleClickNew","columnDefs","disableAllSort","quickFilterText","rowData","showFooter","showSideBar","autoSizeColumnOnResize","localTextOverwrite"],["id","footer"],["fxLayout","row",1,"nxt-card","nxt-text"],["fxFlex","","fxLayout","row","fxLayoutAlign","space-between center",1,"nxt-card-content",2,"border","0 solid red"],[3,"studioCashReport2Service"],["matTooltip","WhatsApp-Chats",3,"click"],["fxHide.lt-sm","","matTooltip","Gutschein erfassen",3,"click"],["nxtPermission","EventRating_Edit","matTooltip","Termine bewerten",3,"click"],["nxtPermission","IsAc","matTooltip","Termin-Fotos",3,"click"],["matTooltip","Suche (Kunden, Artists oder Gutscheine)",3,"click"],["matTooltip","R\xF6mische Zahlen",3,"click","fxHide.lt-sm"],["matTooltip","Walk-In",3,"click"],[1,"text-[120%]"],["fxLayout","row","fxLayoutAlign","center center"],[1,"blink",3,"click"],[1,"flex","flex-col","justify-end","h-100"],["fa","paypal","matTooltip","PayPal Einnahme","matTooltipPosition","left",3,"click"],["matTooltip","Transfer","matTooltipPosition","left",3,"click"],["matTooltip","neue Einnahme","matTooltipPosition","left",3,"click"],[1,"flex","flex-col","justify-end"],["matTooltip","Transfer Ausgabe","matTooltipPosition","right",2,"transform","scaleX(-1)",3,"click"],["matTooltip","neue Ausgabe","matTooltipPosition","right",3,"click"],["nxtPermission","StudioCashReport_ShowAllCashRegisters","fxLayout","row","fxLayoutAlign","center center"],[2,"font-size","80%","line-height","1.2"],["fxLayout","column","fxLayoutAlign","center end",1,"pl-2","text-70",2,"line-height","1.2"],["nxtPermission","StudioCashReport_Switch_"],[3,"ngClass"],[1,"pr-1"],[1,"right"],[1,"red"],["fxLayout","column","fxLayoutAlign","center end",1,"pt-1"],["class","red",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center end","class","pt-1",4,"ngIf"],[1,"flex","flex-row","items-center"],[2,"font-size","120%"],[1,"text-70"],["fxLayoutAlign","center center",1,"px-1"],["fxFLex","",1,"mouse-pointer",2,"font-size","14px","height","14px","width","14px",3,"click"],["fxLayout","column","fxLayoutAlign","center center",3,"click","contextmenu","ngClass","matTooltip"],["class","flex flex-row items-center justify-center",4,"ngIf"],[1,"flex","flex-row","items-center","justify-center"],["style","font-size: 80%;",4,"ngIf"],[2,"font-size","80%"],["matTooltip","Abrechnung freigeben",3,"click"],["matTooltip","Abrechnung wieder blockieren",3,"click"],["matTooltip","Abrechnung",3,"click"]],template:function(r,s){r&1&&W(0,FZi,3,5,"div",2)(1,LZi,3,0,"div",3)(2,_Xi,142,105,"div",4),r&2&&(b("ngIf",s.myService.data),g(),b("ngIf",!s.myService.data),g(),b("ngIf",s.myService.data))},dependencies:[Ct,At,Yt,$r,oi,Vk,qi,Dn,Dv,No,rs,Tyt,wyt,Qu,dr,Lt,an,dl,Zs,tl,tm,rr,Nn,Yi,_s,Zr,W9e,Hi,vyt,Hn,Or,ks,ZF,Xu],styles:[".not-logged-in-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;justify-content:center;align-items:center;z-index:99999;position:fixed;inset:0;background-color:#000c}.nxt-row[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{padding:5px 10px;border:1px solid red}[_nghost-%COMP%]   .date-picker[_ngcontent-%COMP%]     mat-icon{position:relative;top:8px}[_nghost-%COMP%]   .nxt-page[_ngcontent-%COMP%]     .mat-form-field-full-width .mat-form-field-wrapper{padding-bottom:0!important}[_nghost-%COMP%]   .nxt-page[_ngcontent-%COMP%]     .mat-form-field-full-width .mat-form-field-wrapper .mat-form-field-infix{padding:0!important;border:none}[_nghost-%COMP%]   .nxt-page[_ngcontent-%COMP%]     .mat-form-field-full-width .mat-form-field-wrapper .mat-form-field-underline{bottom:0!important}.grid-min-height[_ngcontent-%COMP%]{min-height:280px}.todo-grid[_ngcontent-%COMP%]     .ag-cell{line-height:30px!important}.todo-grid[_ngcontent-%COMP%]     .ag-cell .material-icons{font-size:25px;line-height:30px}nxt-button[_ngcontent-%COMP%]{margin:0}mat-radio-button[_ngcontent-%COMP%]{margin-right:10px}.botton-footer-bar[_ngcontent-%COMP%]   nxt-button[_ngcontent-%COMP%]{margin:0 10px;line-height:1}button[_ngcontent-%COMP%]{text-transform:uppercase;color:var(--nxt-button-text-color)!important}.scroll-view[_ngcontent-%COMP%]{overflow:auto}[_nghost-%COMP%]     .artist-get-box{margin:2px;background-color:#595959;padding:0 3px;border-radius:2px;font-size:70%;min-width:60px}[_nghost-%COMP%]     .artist-get-box.available{background-color:#2b9100;color:#eee}[_nghost-%COMP%]     .artist-get-box.shorten-available{background-color:#b7860f;color:#eee}[_nghost-%COMP%]     .artist-get-box.not-in-work{background-color:#2a2a2a;color:#7a7a7a}[_nghost-%COMP%]     .artist-get-box.not-in-work-session{background-color:#404040;border:1px solid #7a7a7a;color:#bbb}[_nghost-%COMP%]     .artist-get-box.early-paid-out{background-color:#2a2a2a;color:#7a7a7a}[_nghost-%COMP%]     .artist-get-box.selected{font-size:90%;border:1px solid #fff;color:#fff}[_nghost-%COMP%]     .red-button button{background-color:#ff3737}.filter-toggles[_ngcontent-%COMP%]   nxt-slide-toggle[_ngcontent-%COMP%]{padding-left:0}.filter-toggle-text[_ngcontent-%COMP%]{font-size:70%;line-height:1.15}.artist-short-available[_ngcontent-%COMP%]{background-color:#b7860f;color:#1a1a1a;font-weight:700}.artist-not-working[_ngcontent-%COMP%]{background-color:#2a2a2a;color:#a2a2a2;font-weight:700}.artist-available[_ngcontent-%COMP%]{background-color:#2b9100;color:#ccc;font-weight:700}.artist-available-but-open-last-event[_ngcontent-%COMP%]{background-color:#ff3737;color:#ccc;font-weight:700}.artist-get-percentage-bar-wrapper[_ngcontent-%COMP%]{width:100%;height:5px}.artist-get-percentage-bar-wrapper[_ngcontent-%COMP%]   .artist-get-percentage-bar[_ngcontent-%COMP%]{background-color:#fff;border-top-right-radius:4px}.artistGetMenuTriggerWrapper[_ngcontent-%COMP%]{position:fixed;height:1px;width:1px;top:0;left:0}  .mat-menu-panel .artist-get-menu-artist-title{text-transform:uppercase;font-weight:500;font-size:120%;color:#bbb;padding-bottom:4px}"],changeDetection:0});let t=e;return t})()});function CXi(t,e){t&1&&(h(0,"div"),y(1,"KEINE DATEN"),p())}function xXi(t,e){if(t&1&&(ee(0,"div",2),Ce(1,"safeHtml")),t&2){let n=w(2);b("innerHTML",tt(1,1,n.errorText),Pi)}}function bXi(t,e){if(t&1&&(h(0,"tr")(1,"td",18),y(2),p(),h(3,"td",18),y(4),p(),h(5,"td",19),y(6),Ce(7,"money"),p()()),t&2){let n=e.$implicit,i=w(3);g(2),ye(n.eventCustomerName),g(2),ye(i.getPaymentTypeText(n)),g(2),ye(tt(7,3,n.paymentValue))}}function wXi(t,e){if(t&1&&(h(0,"tr")(1,"td",20),y(2,"Summe"),p(),h(3,"td",21)(4,"strong"),y(5),Ce(6,"money"),p()()()),t&2){let n=w(3);g(5),ye(tt(6,1,n.data.cashPaymentsInSum))}}function SXi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td",23),y(4),Ce(5,"money"),p()()),t&2){let n=e.$implicit,i=w(4);g(2),ye(i.getPaymentTypeText(n)),g(2),ye(tt(5,2,n.paymentValue))}}function TXi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2,"Summe"),p(),h(3,"td",23)(4,"strong"),y(5),Ce(6,"money"),p()()()),t&2){let n=w(4);g(5),ye(tt(6,1,n.data.cashPaymentsOutSum))}}function DXi(t,e){if(t&1&&(h(0,"table",22)(1,"tr")(2,"th",12),y(3,"AUSGABEN"),p()(),h(4,"tr")(5,"th"),y(6,"Bezeichnung"),p(),h(7,"th"),y(8,"Betrag"),p()(),W(9,SXi,6,4,"tr",13)(10,TXi,7,3,"tr",14),p()),t&2){let n=w(3);b("ngStyle",sn(3,Wyt,n.outgoingFontSize)),g(9),b("ngForOf",n.data.cashPaymentsOut),g(),b("ngIf",n.showOutgoingSum)}}function EXi(t,e){t&1&&(h(0,"th",28),y(1,"Z\xC4HLPROTOKOLL VOR BANK UND ARTIST-ABRECHNUNG INKL. STARTGELD"),p())}function MXi(t,e){t&1&&(h(0,"th",28),y(1,"Z\xC4HLPROTOKOLL VOR KASSEN-TRANSFER ZUR HAUPTKASSE"),p())}function kXi(t,e){if(t&1&&(h(0,"td"),y(1),p()),t&2){let n=e.$implicit,i=w(5);g(),Ke(" ",i.data.moneyStackBeforePayouts[n]," ")}}function IXi(t,e){if(t&1&&(h(0,"table",26)(1,"tr"),W(2,EXi,2,0,"th",27)(3,MXi,2,0,"th",27),p(),h(4,"tr")(5,"td"),y(6,"0,01 \u20AC"),p(),h(7,"td"),y(8,"0,02 \u20AC"),p(),h(9,"td"),y(10,"0,05 \u20AC"),p(),h(11,"td"),y(12,"0,10 \u20AC"),p(),h(13,"td"),y(14,"0,20 \u20AC"),p(),h(15,"td"),y(16,"0,50 \u20AC"),p(),h(17,"td"),y(18,"1 \u20AC"),p(),h(19,"td"),y(20,"2 \u20AC"),p(),h(21,"td"),y(22,"5 \u20AC"),p(),h(23,"td"),y(24,"10 \u20AC"),p(),h(25,"td"),y(26,"20 \u20AC"),p(),h(27,"td"),y(28,"50 \u20AC"),p(),h(29,"td"),y(30,"100 \u20AC"),p(),h(31,"td"),y(32,"200 \u20AC"),p(),h(33,"td"),y(34,"Summe"),p()(),h(35,"tr"),W(36,kXi,2,1,"td",13),h(37,"td"),y(38),Ce(39,"money"),p()()()),t&2){let n=w(4);g(2),b("ngIf",n.data.isMainCashRegister),g(),b("ngIf",!n.data.isMainCashRegister),g(33),b("ngForOf",n.moneys),g(2),Ke(" ",tt(39,4,n.getTotalValueFromMoneyStack(n.data.moneyStackBeforePayouts))," ")}}function AXi(t,e){if(t&1&&(h(0,"td"),y(1),p()),t&2){let n=e.$implicit,i=w(5);g(),Ke(" ",i.data.moneyStackEnd[n]," ")}}function PXi(t,e){if(t&1&&(h(0,"table",29)(1,"tr")(2,"th",28),y(3,"Z\xC4HLPROTOKOLL KASSE ENDE"),p()(),h(4,"tr")(5,"td"),y(6,"0,01 \u20AC"),p(),h(7,"td"),y(8,"0,02 \u20AC"),p(),h(9,"td"),y(10,"0,05 \u20AC"),p(),h(11,"td"),y(12,"0,10 \u20AC"),p(),h(13,"td"),y(14,"0,20 \u20AC"),p(),h(15,"td"),y(16,"0,50 \u20AC"),p(),h(17,"td"),y(18,"1 \u20AC"),p(),h(19,"td"),y(20,"2 \u20AC"),p(),h(21,"td"),y(22,"5 \u20AC"),p(),h(23,"td"),y(24,"10 \u20AC"),p(),h(25,"td"),y(26,"20 \u20AC"),p(),h(27,"td"),y(28,"50 \u20AC"),p(),h(29,"td"),y(30,"100 \u20AC"),p(),h(31,"td"),y(32,"200 \u20AC"),p(),h(33,"td"),y(34,"Summe"),p()(),h(35,"tr"),W(36,AXi,2,1,"td",13),h(37,"td"),y(38),Ce(39,"money"),p()()()),t&2){let n=w(4);g(36),b("ngForOf",n.moneys),g(2),Ke(" ",tt(39,2,n.getTotalValueFromMoneyStack(n.data.moneyStackEnd))," ")}}function RXi(t,e){if(t&1&&(h(0,"div"),W(1,IXi,40,6,"table",24)(2,PXi,40,4,"table",25),p()),t&2){let n=w(3);g(),b("ngIf",n.data.moneyStackBeforePayouts),g(),b("ngIf",n.data.moneyStackEnd)}}function FXi(t,e){if(t&1&&(h(0,"div"),ee(1,"br")(2,"br")(3,"br"),y(4,"_________________________________________"),ee(5,"br"),y(6),p()),t&2){let n=w(3);g(6),ye(n.data.employeeName)}}function LXi(t,e){if(t&1&&(h(0,"div",30)(1,"div",31)(2,"table",32)(3,"tr")(4,"td",18),y(5,"Start"),p(),h(6,"td",19),y(7),Ce(8,"money"),p()(),h(9,"tr")(10,"td",18),y(11,"Summe Einnahmen"),p(),h(12,"td",19),y(13),Ce(14,"money"),p()(),h(15,"tr")(16,"td",18),y(17,"Summe Ausgaben"),p(),h(18,"td",19),y(19),Ce(20,"money"),p()(),h(21,"tr")(22,"td",18),y(23,"Kassenfehlbetrag -/+"),p(),h(24,"td",19),y(25),Ce(26,"money"),p()(),h(27,"tr")(28,"td",18),y(29,"Bestand Ende"),p(),h(30,"td",19),y(31),Ce(32,"money"),p()()()()()),t&2){let n=w(3);g(7),ye(tt(8,5,n.data.startMoney)),g(6),ye(tt(14,7,n.data.cashPaymentsInSum)),g(6),ye(tt(20,9,n.data.cashPaymentsOutSum)),g(6),ye(tt(26,11,n.data.missingMoney)),g(6),ye(tt(32,13,n.data.endMoney))}}function OXi(t,e){if(t&1&&(h(0,"div",3)(1,"div",4)(2,"div",5),y(3),p(),h(4,"div",6)(5,"table",7)(6,"tr",8)(7,"td"),y(8,"Kassenbericht-Nr:"),p(),h(9,"td"),y(10),p()(),h(11,"tr",8)(12,"td"),y(13,"Datum:"),p(),h(14,"td"),y(15),Ce(16,"nxtDate"),p()(),h(17,"tr",8)(18,"td"),y(19,"Mitarbeiter:"),p(),h(20,"td"),y(21),p()(),h(22,"tr",8)(23,"td"),y(24,"Seite:"),p(),h(25,"td"),y(26),p()()()(),h(27,"div",9)(28,"div",10)(29,"table",11)(30,"tr")(31,"th",12),y(32,"EINNAHMEN"),p()(),h(33,"tr")(34,"th"),y(35,"Kunde"),p(),h(36,"th"),y(37,"Bezeichnung"),p(),h(38,"th"),y(39,"Betrag"),p()(),W(40,bXi,8,5,"tr",13)(41,wXi,7,3,"tr",14),p()(),h(42,"div",15),W(43,DXi,11,5,"table",16),p()(),ee(44,"br"),W(45,RXi,3,2,"div",14)(46,FXi,7,1,"div",14)(47,LXi,33,15,"div",17),p()()),t&2){let n=w(2);g(3),Ke(" KASSENBERICHT - ",n.data.studio.toUpperCase()," "),g(7),ye(n.data.id),g(5),ye(Nt(16,13,n.data.dateString,"dd.MM.yyyy")),g(6),ye(n.data.employeeName),g(5),cn("",n.data.currentPageCount,"/",n.data.totalPageCount,""),g(3),b("ngStyle",sn(16,Wyt,n.incomingFontSize)),g(11),b("ngForOf",n.data.cashPaymentsIn),g(),b("ngIf",n.showIncomingSum),g(2),b("ngIf",n.showOutgoings),g(2),b("ngIf",n.isLastPage),g(),b("ngIf",n.isLastPage),g(),b("ngIf",n.isLastPage)}}function NXi(t,e){if(t&1&&W(0,xXi,2,3,"div",0)(1,OXi,48,18,"div",1),t&2){let n=w();b("ngIf",n.errorText),g(),b("ngIf",!n.errorText)}}var Wyt,Uyt,jyt=Q(()=>{i3();ZA();zn();yW();pC();Nu();Il();ha();go();An();Vt();ri();me();ma();Vt();An();Wyt=t=>({fontSize:t});Uyt=(()=>{let e=class e{constructor(i){this.route=i,this.getTotalValueFromMoneyStack=ca.getTotalValueFromMoneyStack,this.moneys=Af.moneys,this.errorText="",this.showIncomingSum=!0,this.showOutgoingSum=!0,this.showOutgoings=!0,this.incomingFontSize="9px",this.outgoingFontSize="9px",this.isLastPage=!1;try{this.errorText="",window.setData=r=>{try{this.data=this.calcData(r),this.afterDataSet(),this.setFontSize()}catch(s){this.errorText=s.message}}}catch(r){this.errorText=r.message}}ngOnInit(){return O(this,null,function*(){})}getPaymentTypeText(i){let r=Xo.getPaymentTypeInvoiceText(i.paymentType,"tattoo");return i.earlyPayout&&(r+=" (Vorzeitig)"),i.paymentType==="gift-card-sold"&&(r+=" #"+cr.fill(i.refId.toString(),4,"0",!1)),i.paymentType==="cash-report-outgoing"||i.paymentType==="cash-report-incoming"?i.cashIncomingOutgoingDescription.indexOf("Kasse 2")>-1?r="Transfer Kasse 2":r=i.cashIncomingOutgoingDescription:i.paymentType==="payout"?r+=" - "+i.artist:(i.paymentType==="deposit-back"||i.paymentType==="cheaper")&&(r+=" - "+i.eventCustomerName),r}printMoneyStack(i){let r=[];for(let s of Object.keys(i))r.push(i[s]+" x "+s);return r.join(", ")}calcData(i){let r=i.cashPaymentsOut.filter(o=>o.paymentType==="payout"),s=i.cashPaymentsOut.filter(o=>o.paymentType!=="payout");return r=this.groupPayouts(r),i.cashPaymentsOut=i.cashPaymentsOut.filter(o=>o.paymentValue>0),i.cashPaymentsIn=i.cashPaymentsIn.filter(o=>o.paymentValue>0),i.cashPaymentsOut=[...s,...r].sortNumber("createdAt"),i}groupPayouts(i){let r=[],s=m3.groupObjectArray(i,"artist");for(let o of Object.keys(s)){let a=s[o].reduce((c,d)=>c+d.paymentValue,0),l=i.find(c=>c.artist===o).createdAt;r.push({artist:o,createdBy:"",createdAt:l,paymentUuid:"",paymentDate:"",paymentValue:a,paymentType:"payout",createdAtDateString:"",earlyPayout:s[o][0].earlyPayout,direction:"out"})}return r}getDateString(i){return Ie.format(i,"EEE dd.MM.yyyy")}afterDataSet(){this.data.totalPageCount>1&&(this.data.currentPageCount===1?(this.showIncomingSum=!1,this.showOutgoingSum=!0):(this.showIncomingSum=!0,this.showOutgoingSum=!1,this.showOutgoings=!1)),this.isLastPage=this.data.totalPageCount===this.data.currentPageCount}setFontSize(){this.incomingFontSize="9px",this.data.cashPaymentsIn.length>30&&this.data.currentPageCount===this.data.totalPageCount&&(this.incomingFontSize="6px")}};e.\u0275fac=function(r){return new(r||e)(R(gs))},e.\u0275cmp=_e({type:e,selectors:[["nxt-day-finish-report-2"]],standalone:!0,features:[xe],decls:2,vars:2,consts:[["style","margin: 2cm",3,"innerHTML",4,"ngIf"],["id","data","fxLayout","row","class","wrapper","style","width:100%; height: 100%; border: 0px solid black !important;",4,"ngIf"],[2,"margin","2cm",3,"innerHTML"],["id","data","fxLayout","row",1,"wrapper",2,"width","100%","height","100%","border","0px solid black !important"],["fxLayout","column",2,"border","0px solid red","position","relative","width","100%","height","100%"],["fxLayout","row","fxLayoutAlign","center",2,"width","100%","font-size","20px"],["fxLayout","row","fxLayoutAlign","end",2,"width","100%"],[1,"header-table"],[2,"font-size","80%"],["fxLayout","row",2,"width","100%"],["fxFlex",""],["fxFlex","",1,"data-table","data-table-left",3,"ngStyle"],["colspan","3",2,"text-align","center"],[4,"ngFor","ngForOf"],[4,"ngIf"],["fxFlex","","fxLayout","column","fxLayoutAlign","start",2,"border","0px solid red"],["class","data-table data-table-right",3,"ngStyle",4,"ngIf"],["style","position: absolute; left:0; right:0; bottom:25px; border: 0px solid blue",4,"ngIf"],[1,"no-wrap"],[1,"no-wrap","right"],["colspan","2"],[1,"right","no-wrap"],[1,"data-table","data-table-right",3,"ngStyle"],[1,"no-wrap",2,"text-align","right"],["class","money-calc-table","style","margin-bottom: 2px",4,"ngIf"],["class","money-calc-table",4,"ngIf"],[1,"money-calc-table",2,"margin-bottom","2px"],["colspan","15","style","text-align: center",4,"ngIf"],["colspan","15",2,"text-align","center"],[1,"money-calc-table"],[2,"position","absolute","left","0","right","0","bottom","25px","border","0px solid blue"],[2,"width","30%","float","right"],[1,"footer-table",2,"width","100%"]],template:function(r,s){r&1&&W(0,CXi,2,0,"div")(1,NXi,2,2),r&2&&(Je(s.data?-1:0),g(),Je(s.data?1:-1))},dependencies:[Ct,At,Yt,oi,qi,rr,Dn,rs,Hi,Hn,Or,ks],styles:[".borders[_ngcontent-%COMP%]{border-width:1px!important}.wrapper[_ngcontent-%COMP%]{padding:.5cm 2cm}table[_ngcontent-%COMP%], th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{border-collapse:collapse}.header-table[_ngcontent-%COMP%]{margin-bottom:3px;font-size:13px}.header-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{text-align:right;padding:0 5px}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 5px;border:1px solid black}.footer-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .footer-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:5px;border:1px solid black;font-size:10px}.data-table-right[_ngcontent-%COMP%]{margin-left:5px}.data-table-left[_ngcontent-%COMP%]{height:fit-content}.money-calc-table[_ngcontent-%COMP%]{width:100%}.money-calc-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .money-calc-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:2px 5px;text-align:center;border:1px solid black;font-size:10px}"]});let t=e;return t})()});function VXi(t,e){if(t&1&&(h(0,"div",3)(1,"nxt-slide-toggle",5),y(2,"Ca. Preis"),p(),h(3,"div",6),ee(4,"nxt-input",7)(5,"nxt-input",7),p(),ee(6,"nxt-slide-toggle",1)(7,"nxt-input",8),p()),t&2){let n=w();g(),b("nxtFormControl",n.form.controls.priceLike),g(3),b("nxtFormControl",n.form.controls.priceFixValue)("isMoney",!0),g(),b("nxtFormControl",n.form.controls.artistGet)("isMoney",!0),g(),b("nxtFormControl",n.form.controls.additionalPayAfterEnd),g(),b("nxtFormControl",n.form.controls.maxHours)("isNumber",!0)}}function BXi(t,e){if(t&1&&ee(0,"nxt-input",4),t&2){let n=w();b("nxtFormControl",n.form.controls.discountPercentage)("isPercent",!0)}}function zXi(t,e){t&1&&y(0," abc ")}var $yt,Kyt=Q(()=>{me();Gi();yi();qn();g2();Jr();tp();oo();nc();me();$yt=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.form=new Wl({id:new Cn("",[],"ID"),name:new Cn("",[ii.requiredAndNotNaN],"Name"),disabled:new Cn(!1,[],"Deaktiviert"),discountPercentage:new Cn(!1,[],"Rabatt"),priceFixValue:new Cn(null,[],"Fix-Preis-Betrag"),artistGet:new Cn(null,[],"Artist bekommt"),disableDiscountedGiftCards:new Cn(!1,[],"Keine rabattierten Gutscheine"),priceFix:new Cn(!1,[]),priceLike:new Cn(!1,[]),additionalPayAfterEnd:new Cn(!1,[],"Nachkassieren"),maxHours:new Cn(null,[],"Max Std."),onlyWithPromoCode:new Cn(!1,[],"Nur mit Promo-Code"),staticPromoCode:new Cn(!1,[],"Statischer Promo-Code"),staticPromoCodePromoterId:new Cn(!1,[],"Statischer Promo-Code Promoter"),staticPromoCodePromoId:new Cn(!1,[],"Statischer Promo-Code Angebot")}),this.form.valueChanges.subscribe(()=>this.cdRef.detectChanges())}ngOnInit(){}nxtOnDestroy(){}load(i){return O(this,null,function*(){let r=yield this.socketService.getDynamicDataById(i);Is.setForm(this.form,r)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-discount-promotion-edit"]],standalone:!0,features:[et,xe],decls:8,vars:6,consts:[[1,"flex","flex-col","justify-center","items-center"],[3,"nxtFormControl"],["leftText","Rabatt",1,"mb-3",3,"nxtFormControl","noColorChange"],[1,"flex","flex-col","items-center"],[3,"nxtFormControl","isPercent"],["leftText","Fix-Preis",1,"mb-3",3,"nxtFormControl"],[1,"flex","gap-4"],[3,"nxtFormControl","isMoney"],[3,"nxtFormControl","isNumber"]],template:function(r,s){r&1&&(h(0,"div",0),ee(1,"nxt-input",1),h(2,"nxt-slide-toggle",2),y(3,"Preis"),p(),W(4,VXi,8,8,"div",3)(5,BXi,1,2,"nxt-input",4),ee(6,"nxt-slide-toggle",1),W(7,zXi,1,0),p()),r&2&&(g(),b("nxtFormControl",s.form.controls.name),g(),b("nxtFormControl",s.form.controls.priceFix)("noColorChange",!0),g(2),Je(s.form.controls.priceFix.value?4:5),g(2),b("nxtFormControl",s.form.controls.onlyWithPromoCode),g(),Je(s.form.controls.onlyWithPromoCode.value?7:-1))},dependencies:[Yi,Nn],changeDetection:0});let t=e;return t})()});function HXi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",9),F("click",function(){V(n);let r=w();return B(r.dialogRef.close())}),y(1,"close"),p()}}var Yyt,qyt=Q(()=>{lD();Qo();Zi();Pa();ls();ri();oo();Jr();Vt();Ph();Kyt();me();ji();yi();Kr();Ci();Vt();Yyt=(()=>{let e=class e{constructor(i,r,s,o){this.dialogRef=i,this.socketService=r,this.loginService=s,this.dialogService=o,this.showDisabled=!1,this.loadTimestamp=0,this.quickFilterText="",this.rowData=[],this.columnDefs=[{headerName:"",nxtFieldType:Ee.Icon,nxtIcon:Ir.Material.Edit,nxtOnCellClicked:a=>this.editClicked(a.data)},{headerName:"Name",field:"name",nxtFieldType:Ee.Text},{headerName:"Aktiv",field:"disabled",valueGetter:a=>!a.data.disabled,nxtFieldType:Ee.Boolean,cellStyle:{textAlign:"center"},headerClass:"text-right"},{headerName:"Rabatt",field:"discountPercentage",nxtFieldType:Ee.Percentage},{headerName:"Preis",nxtFieldType:Ee.Text,valueGetter:a=>{if(a.data.priceFix)return a.data.priceFixValue;if(a.data.priceLike)return a.data.priceLike},cellRenderer:a=>{if(a.data.priceFix)try{return a.data.priceFixValue.toMoneyString("\u20AC",!1)+" fix"}catch{return"????"}else if(a.data.priceLike)return"ca. "+a.data.priceLike.toMoneyString("\u20AC",!1)}},{headerName:"Artist",field:"artistGet",nxtFieldType:Ee.Money,cellRenderer:a=>a.value?a.value+" \u20AC":""},{headerName:"Nachkassieren",field:"additionalPayAfterEnd",nxtFieldType:Ee.Boolean,cellStyle:{textAlign:"center"},headerClass:"text-right"},{headerName:"Stunden",field:"maxHours",nxtFieldType:Ee.Text,cellRenderer:a=>a.value?a.value+" Std.":""},{headerName:"Nur Promo-Code",field:"onlyWithPromoCode",nxtFieldType:Ee.Boolean,cellStyle:{textAlign:"center"},headerClass:"text-right"},{headerName:"Keine Rabatt-Gutscheine",field:"disableDiscountedGiftCards",nxtFieldType:Ee.Boolean,cellStyle:{textAlign:"center"},headerClass:"text-right"}],this.load()}load(){return O(this,null,function*(){this.discountPromotions=yield this.socketService.getDynamicData(o3.DiscountPromotion),this.discountPromotions.forEach(i=>i.changed=!1),this.loadTimestamp=Date.now(),this.discountPromotions.forEach(i=>delete i.isNew),this.showDisabled||(this.discountPromotions=this.discountPromotions.filter(i=>!i.disabled).sortString("name"))})}editClicked(i){this.dialogService.showComponentDialog($yt).componentInstance.load(i.id)}quickSearchTextChanged(){}newItem(){}addNewClicked(){}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(lt),R(Fi),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-discount-promotions-2"]],standalone:!0,features:[xe],decls:13,vars:9,consts:[[1,"nxt-page"],["fxLayout","row","fxLayoutAlign","space-between center",1,"mb-2"],["fxLayout","row","fxLayoutGap","50px",1,"items-center"],[1,"page-header"],[3,"valueChange","value","clearIcon"],[3,"valueChange","value"],[3,"click","noWrap"],[3,"click",4,"ngIf"],[3,"columnDefs","rowData","autoSizeColumnOnResize","quickFilterText"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"Rabatte"),p(),h(5,"nxt-input",4),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),F("valueChange",function(){return s.quickSearchTextChanged()}),y(6,"Suche"),p(),h(7,"nxt-slide-toggle",5),Xe("valueChange",function(a){return Ze(s.showDisabled,a)||(s.showDisabled=a),a}),F("valueChange",function(){return s.load()}),y(8,"Inaktive einblenden"),p(),h(9,"nxt-button",6),F("click",function(){return s.addNewClicked()}),y(10,"neuer Rabatt"),p()(),W(11,HXi,2,0,"nxt-button-icon",7),p(),ee(12,"nxt-datagrid",8),p()),r&2&&(g(5),qe("value",s.quickFilterText),b("clearIcon",!0),g(2),qe("value",s.showDisabled),g(2),b("noWrap",!0),g(2),b("ngIf",s.dialogRef),g(),b("columnDefs",s.columnDefs)("rowData",s.discountPromotions)("autoSizeColumnOnResize",!0)("quickFilterText",s.quickFilterText))},dependencies:[At,Yt,$r,oi,Yi,Nn,Ct,an,dr,Lt],encapsulation:2});let t=e;return t})()});function UXi(t,e){if(t&1&&ee(0,"img",9),t&2){let n=w();b("src",n.logoSrc,Ur)}}function jXi(t,e){if(t&1&&(h(0,"div",18),y(1),p()),t&2){let n=w(3);g(),ye(n.checkoutData.text)}}function $Xi(t,e){if(t&1){let n=re();h(0,"div",13)(1,"div"),y(2),p(),W(3,jXi,2,1,"div",14),h(4,"div"),y(5),Ce(6,"money"),p(),h(7,"div",15)(8,"nxt-slide-toggle",16),Xe("valueChange",function(r){V(n);let s=w(2);return Ze(s.agbOk,r)||(s.agbOk=r),B(r)}),F("valueChange",function(){V(n);let r=w(2);return B(r.agbOkChanged())}),y(9,"Hiermit best\xE4tige ich"),ee(10,"br"),y(11),h(12,"a",17)(13,"strong"),y(14,"AGB"),p()()()()()}if(t&2){let n=w(2);g(2),Ke("Hallo ",n.checkoutData.name,"!"),g(),b("ngIf",n.checkoutData.text),g(2),Ke("Betrag: ",tt(6,6,n.checkoutData.value),""),g(3),qe("value",n.agbOk),g(3),Ke("die ",n.studio==="br"?"Brudis":"NXT-LVL.INK"," "),g(),b("href","https://"+n.studio+".nxt-lvl.ink/agb",Ur)}}function KXi(t,e){t&1&&(h(0,"div",19)(1,"div"),y(2,"Vielen Dank f\xFCr deine Zahlung!"),p(),ee(3,"br"),h(4,"div"),y(5,"Du kannst diese Seite nun schlie\xDFen"),p()())}function YXi(t,e){if(t&1&&(h(0,"div",10),ee(1,"br"),W(2,$Xi,15,8,"div",11)(3,KXi,6,0,"div",12),p()),t&2){let n=w();g(2),b("ngIf",n.status==="selectPaymentMethod"),g(),b("ngIf",n.status==="payed")}}function qXi(t,e){if(t&1){let n=re();h(0,"nxt-button",20),F("click",function(){V(n);let r=w();return B(r.authorize())}),y(1,"weiter"),p()}}var GXi,WXi,Zyt,Xyt=Q(()=>{$n();Il();Zi();oo();An();ri();Vt();me();ma();L1();Vt();An();GXi=t=>({brudis:t}),WXi=t=>({hidden:t});Zyt=(()=>{let e=class e{constructor(i,r){this.route=i,this.httpClient=r,this.useSandbox=!0,this.status="selectPaymentMethod",this.captureId="",this.linkId="",this.agbOk=!1,this.footerText="",this.ngConfig=window.ngConfig,this.logoSrc="",this.klarnaIsReady=new qs(!1),window.klarnaAsyncCallback=()=>{this.klarnaIsReady.next(!0)}}waitForKlarnaReady(){return O(this,null,function*(){return new Promise((i,r)=>{this.klarnaIsReady.value?i():this.klarnaIsReady.subscribe(s=>{s&&i()})})})}ngOnInit(){return O(this,null,function*(){this.studio=this.route.snapshot.params.studio,this.logoSrc="/assets/logo/studio/logo_"+this.studio+"_white.svg",this.linkId=this.route.snapshot.params.id,this.checkoutData=yield this.getCheckoutData(),this.loadScript(),this.waitForKlarnaReady().then(()=>{Klarna.Payments.init({client_token:this.checkoutData.clientToken}),this.loadKlarna()}),this.footerText=this.checkoutData.studioAddress})}loadKlarna(){requestAnimationFrame(()=>{try{let i={container:"#klarnaPaymentsContainer"},r=Klarna.Payments.load(i);console.log(r)}catch{debugger}})}loadScript(){let i=document.createElement("script");i.innerHTML="",i.src="https://x.klarnacdn.net/kp/lib/v1/api.js",i.async=!0,i.defer=!0,document.body.appendChild(i)}getCheckoutData(){return O(this,null,function*(){return{clientToken:"eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.eyJzZXNzaW9uX2lkIjoiZTNiZTA0NWMtNzJmMS01NDE4LTkxOTQtYjY1Y2EzOGM2Y2ZlIiwiYmFzZV91cmwiOiJodHRwczovL2pzLnBsYXlncm91bmQua2xhcm5hLmNvbS9ldS9rcCIsImRlc2lnbiI6ImtsYXJuYSIsImxhbmd1YWdlIjoiZGUiLCJwdXJjaGFzZV9jb3VudHJ5IjoiREUiLCJlbnZpcm9ubWVudCI6InBsYXlncm91bmQiLCJtZXJjaGFudF9uYW1lIjoiWW91ciBidXNpbmVzcyBuYW1lIiwic2Vzc2lvbl90eXBlIjoiUEFZTUVOVFMiLCJjbGllbnRfZXZlbnRfYmFzZV91cmwiOiJodHRwczovL2V1LnBsYXlncm91bmQua2xhcm5hZXZ0LmNvbSIsInNjaGVtZSI6dHJ1ZSwiZXhwZXJpbWVudHMiOlt7Im5hbWUiOiJrcGMtUFNFTC0zMDk5IiwidmFyaWF0ZSI6InZhcmlhdGUtMSJ9LHsibmFtZSI6ImtwLWNsaWVudC11dG9waWEtcG9wdXAtcmV0cmlhYmxlIiwidmFyaWF0ZSI6InZhcmlhdGUtMSJ9LHsibmFtZSI6ImtwLWNsaWVudC11dG9waWEtc3RhdGljLXdpZGdldCIsInZhcmlhdGUiOiJpbmRleCIsInBhcmFtZXRlcnMiOnsiZHluYW1pYyI6InRydWUifX0seyJuYW1lIjoiaW4tYXBwLXNkay1uZXctaW50ZXJuYWwtYnJvd3NlciIsInBhcmFtZXRlcnMiOnsidmFyaWF0ZV9pZCI6Im5ldy1pbnRlcm5hbC1icm93c2VyLWVuYWJsZSJ9fSx7Im5hbWUiOiJrcC1jbGllbnQtdXRvcGlhLXNkay1mbG93IiwidmFyaWF0ZSI6InZhcmlhdGUtMSJ9LHsibmFtZSI6ImtwLWNsaWVudC11dG9waWEtd2Vidmlldy1mbG93IiwidmFyaWF0ZSI6InZhcmlhdGUtMSJ9LHsibmFtZSI6ImluLWFwcC1zZGstY2FyZC1zY2FubmluZyIsInBhcmFtZXRlcnMiOnsidmFyaWF0ZV9pZCI6ImNhcmQtc2Nhbm5pbmctZW5hYmxlIn19XSwicmVnaW9uIjoiZXUiLCJ1YV9lbmFibGVkX2FuZF9vbmVfcG0iOnRydWUsInZlcnNpb24iOiJ2MS4xMC4wLTE1OTAtZzNlYmMzOTA3In0.Hv3b61Wh9qZLlOagoCQXj6m_2qyVDG1916cihnLTVWBz7Ay1uyC01FFaVM2jwD8vuKrjcYZFt4OrP_0DMojjoT_zkGtNC1w5YnsNOLMwXia3TWKeMMnZrKxQOq5sIz8nU_cxfyP5Q842lOTok5hxHRmD-Bg7uRQrCk-Ht1N_i_buWDvo6ugQvseXkRpICN4KKwC2NdGqiTPGGEMtWP2h2R9kUlmm8yOkp1YRhUnmLfWZHJRr_GLEd3FDDsTwyqblGrNq792vEhuohgueOPXPQKyefLtr7PzagJxvRwQVI-l0ZWXZDjrlyRSdlBlCTJwbBa_mSSJQghR3jGmh9lt9lw",lineItemName:"Termin-Kaution",lineItemRef:"Testprodukt",id:"123",name:"Harry Fullsleeve",text:"Tatto dies das",value:5,alreadyPayed:!1,studioAddress:"dies das bla bla"}})}sendCheckoutDataToServer(i){return O(this,null,function*(){debugger;if(window.location.origin.includes("localhost")){let r=yield Sn(this.httpClient.post("http://localhost:444/paypal-checkout-done",i))}else{let r=yield Sn(this.httpClient.post("https://"+this.studio+".nxt-lvl.ink/paypal-checkout-done",i))}})}ngAfterViewInit(){return O(this,null,function*(){})}authorize(){let i=Math.round(this.checkoutData.value*100);Klarna.Payments.authorize({purchase_country:"DE",purchase_currency:"EUR",locale:"de-DE",order_amount:i,order_tax_amount:0,order_lines:[{name:this.checkoutData.lineItemName,quantity:1,unit_price:i,tax_rate:0,total_amount:i,total_tax_amount:0,type:"physical",reference:this.checkoutData.lineItemRef,quantity_unit:"pcs",total_discount_amount:0}],customer:{date_of_birth:"1970-01-01"}},r=>{debugger;r.approved&&(this.status="payed",this.sendCheckoutDataToServer(r))})}agbOkChanged(){this.agbOk&&setTimeout(()=>{document.querySelector("#klarnaPaymentsContainer").scrollIntoView({behavior:"smooth"})},200)}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(Uc))},e.\u0275cmp=_e({type:e,selectors:[["nxt-klarna-checkout"]],standalone:!0,features:[xe],decls:12,vars:10,consts:[["fxLayout","column","fxLayoutAlign","center center",1,"nxt-page","w-full","h-100","p-0","wrapper",3,"ngClass"],["fxFlex","","fxLayout","column","fxLayoutAlign","start center",1,"o-auto","w-full",2,"scrollbar-width","10px"],["fxLayoutAlign","center","fxLayout","row",1,"logo-wrapper"],["style","width: 100%",3,"src",4,"ngIf"],["style","font-size: 120%",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center",2,"padding","15px","border-radius","4px","background-color","#fff",3,"ngClass"],["id","klarnaPaymentsContainer"],[3,"click",4,"ngIf"],[1,"pb-2","footer","center"],[2,"width","100%",3,"src"],[2,"font-size","120%"],["fxLayout","column","fxLayoutGap","0.8em","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutGap","1em","fxLayoutAlign","center center",4,"ngIf"],["fxLayout","column","fxLayoutGap","0.8em","fxLayoutAlign","center center"],["style","text-align: center",4,"ngIf"],[2,"font-size","80%"],[3,"valueChange","value"],["target","_blank",3,"href"],[2,"text-align","center"],["fxLayout","column","fxLayoutGap","1em","fxLayoutAlign","center center"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),W(3,UXi,1,1,"img",3),p(),W(4,YXi,4,2,"div",4),ee(5,"br")(6,"br"),h(7,"div",5),ee(8,"div",6),p(),W(9,qXi,2,0,"nxt-button",7),p(),h(10,"div",8),y(11),p()()),r&2&&(b("ngClass",sn(6,GXi,s.studio==="br")),g(3),b("ngIf",s.logoSrc),g(),b("ngIf",s.checkoutData),g(3),b("ngClass",sn(8,WXi,!s.agbOk||s.status!=="selectPaymentMethod")),g(2),b("ngIf",s.agbOk&&s.status==="selectPaymentMethod"),g(2),ye(s.footerText))},dependencies:[At,Yt,$r,oi,qi,_s,Dn,No,Ct,Nn,Lt,ks],styles:["#paypal-button-container[_ngcontent-%COMP%]{text-align:center;overflow:hidden}.logo-wrapper[_ngcontent-%COMP%]{padding-top:1.7em;width:320px;max-width:60vw}.wrapper[_ngcontent-%COMP%]{z-index:0;background-image:url(/assets/images/login-background-1-darker.jpg);background-position:center;background-repeat:no-repeat;background-size:cover}.wrapper.brudis[_ngcontent-%COMP%]{background-image:none!important;background-color:#171717!important}[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px!important}.footer[_ngcontent-%COMP%]{font-size:85%}[_nghost-%COMP%]     nxt-button{font-size:120%!important}[_nghost-%COMP%]     nxt-button button{background-color:#ffb3c7!important;color:#000!important;border-radius:6px;font-weight:600!important}.hidden[_ngcontent-%COMP%]{position:fixed;top:-1000px;left:-1000px}"]});let t=e;return t})()});var Qyt,Jyt=Q(()=>{Gi();jo();Qo();Pa();Jr();me();yi();Qyt=(()=>{let e=class e extends bt{constructor(i){super(),this.socketService=i,this.whatsappInstaResponses=[],this.columnDefs=[{headerName:"Name",field:"description",maxWidth:400},{headerName:"Anfragen",field:"responseCount",nxtFieldType:Ee.Number},{headerName:"erste Anfrage",field:"firstResponseAt",nxtFieldType:Ee.Date_germanDateTime},{headerName:"letzte Anfrage",field:"lastResponseAt",nxtFieldType:Ee.Date_germanDateTime},{headerName:"instaUrl",field:"id",nxtFieldType:Ee.Text},{headerName:"Dauer in Tagen",valueGetter:r=>(r.data.lastResponseAt-r.data.firstResponseAt)/Qt.DURATION_1DAY,nxtFieldType:Ee.Number}],this.quickFilterText=""}ngOnInit(){return O(this,null,function*(){this.whatsappInstaResponses=yield this.socketService.getWhatsAppInstaResponses()})}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-whatsapp-insta-responses"]],standalone:!0,features:[et,xe],decls:4,vars:4,consts:[[1,"nxt-page"],[3,"valueChange","value"],[1,"h-100",3,"columnDefs","quickFilterText","rowData"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div")(2,"nxt-input",1),Xe("valueChange",function(a){return Ze(s.quickFilterText,a)||(s.quickFilterText=a),a}),p()(),ee(3,"nxt-datagrid",2),p()),r&2&&(g(2),qe("value",s.quickFilterText),g(),b("columnDefs",s.columnDefs)("quickFilterText",s.quickFilterText)("rowData",s.whatsappInstaResponses))},dependencies:[Yi,dr]});let t=e;return t})()});var Q6,OM=Q(()=>{$n();me();L1();Q6=(()=>{let e=class e{constructor(i,r){this.element=i,this.httpClient=r}ngOnInit(){return O(this,null,function*(){if(this.lang&&this.lang!=="de"){let i=this.element.nativeElement.innerHTML,r=yield Sn(this.httpClient.post("https://ac.nxt-lvl.ink/translate",{to:this.lang,text:i,from:"de"}));if(!r)return;r.text&&(this.element.nativeElement.innerHTML=r.text)}})}};e.\u0275fac=function(r){return new(r||e)(R(fi),R(Uc))},e.\u0275dir=mi({type:e,selectors:[["","nxtTranslate",""]],inputs:{lang:[0,"nxtTranslate","lang"]},standalone:!0});let t=e;return t})()});function ZXi(t,e){t&1&&ee(0,"img",6)}function XXi(t,e){t&1&&ee(0,"div",7)}function QXi(t,e){if(t&1&&(ee(0,"div",8),Ce(1,"safeHtml")),t&2){let n=w();b("innerHTML",tt(1,1,n.textEn),Pi)}}var Fse,wTe=Q(()=>{me();Gi();ha();ri();OM();me();Fse=(()=>{let e=class e extends bt{constructor(){super(),this.lang=br.required()}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-declarations-of-consent-checkbox"]],inputs:{text:"text",lang:[1,"lang"],textEn:"textEn",checked:"checked"},standalone:!0,features:[et,xe],decls:7,vars:7,consts:[[1,"flex","flex-row","items-start","py-1"],["src","../../../assets/images/checked.png","style","width: 16px","class","mr-1",4,"ngIf"],["class","checkbox mr-1 p-relative rounded-full",4,"ngIf"],[1,"flex","flex-col"],[3,"nxtTranslate","innerHTML"],["style","color:#4d4d4d; font-size: 90%",3,"innerHTML",4,"ngIf"],["src","../../../assets/images/checked.png",1,"mr-1",2,"width","16px"],[1,"checkbox","mr-1","p-relative","rounded-full"],[2,"color","#4d4d4d","font-size","90%",3,"innerHTML"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,ZXi,1,0,"img",1)(2,XXi,1,0,"div",2),h(3,"div",3),ee(4,"div",4),Ce(5,"safeHtml"),W(6,QXi,2,3,"div",5),p()()),r&2&&(g(),b("ngIf",s.checked),g(),b("ngIf",!s.checked),g(2),b("nxtTranslate",s.lang())("innerHTML",tt(5,5,s.text),Pi),g(2),b("ngIf",s.textEn))},dependencies:[Ct,Or,Q6],styles:[".checkbox[_ngcontent-%COMP%]{min-width:13px;min-height:13px;border:1px solid #000000}"]});let t=e;return t})()});function eQi(t,e){if(t&1&&(h(0,"div",0)(1,"div",1),ee(2,"div",2),p(),h(3,"div",3),Ln(4),p()()),t&2){let n=w();g(2),b("nxtTranslate",n.lang)("innerHTML",n.titleText,Pi)}}var JXi,_S,aj=Q(()=>{Gi();OM();me();JXi=["*"];_S=(()=>{let e=class e extends bt{constructor(){super(),this.lang="de"}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-declarations-of-consent-section"]],inputs:{titleText:"titleText",lang:"lang"},standalone:!0,features:[et,xe],ngContentSelectors:JXi,decls:1,vars:1,consts:[[1,"flex","flex-col","w-full"],[1,"flex","text-xl","justify-center","section-header"],[1,"text-center",3,"nxtTranslate","innerHTML"],[1,"flex","flex-col","p-2"]],template:function(r,s){r&1&&(gr(),W(0,eQi,5,2,"div",0)),r&2&&Je(s.lang?0:-1)},dependencies:[Q6],styles:["[_nghost-%COMP%]{display:flex;width:100%}.section-header[_ngcontent-%COMP%]{color:#fff;font-weight:600;font-family:Montserrat,serif;background-color:#464748;border-bottom:3px solid #b7860f}"]});let t=e;return t})()});function tQi(t,e){if(t&1&&(h(0,"div",3),y(1,"SEITE"),p(),y(2)),t&2){let n=w();b("nxtTranslate",n.lang),g(2),cn("\xA0",n.pageCountCurrent+1," / ",n.pageCountTotal," ")}}function iQi(t,e){if(t&1&&(h(0,"div",3),y(1,"Zusatzseite"),p()),t&2){let n=w();b("nxtTranslate",n.lang)}}function nQi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2);g(),Ke("NXT-LVL.INK ",n.configService.config.value.studioName.toUpperCase(),"")}}function rQi(t,e){if(t&1&&(h(0,"div",2)(1,"div",15),y(2,"\u30FB"),p(),y(3),p()),t&2){let n=w(2);g(3),Ke(" ",n.configService.config.value.invoiceData.fromCompany2," ")}}function sQi(t,e){if(t&1&&(h(0,"div",10)(1,"div",11)(2,"div"),ee(3,"img",12),p(),h(4,"div",13),W(5,nQi,2,1,"div",8),h(6,"div",2),y(7),p(),W(8,rQi,4,1,"div",14),h(9,"div",2)(10,"div",15),y(11,"\u30FB"),p(),y(12),p(),h(13,"div",2)(14,"div",15),y(15,"\u30FB"),p(),y(16),p()()()()),t&2){let n=w();g(5),b("ngIf",!1),g(2),Ke(" ",n.configService.config.value.invoiceData.fromCompany," "),g(),b("ngIf",n.configService.config.value.invoiceData.fromCompany2),g(4),Ke(" ",n.configService.config.value.invoiceData.fromStreet," "),g(4),cn(" ",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity," ")}}function oQi(t,e){if(t&1&&(h(0,"div",2),y(1),p()),t&2){let n=w(2);g(),Ke(" ",n.configService.config.value.invoiceData.fromCompany2," ")}}function aQi(t,e){if(t&1&&(h(0,"div",16)(1,"div",17)(2,"div"),ee(3,"img",18),p(),h(4,"div",19)(5,"div"),y(6),p(),h(7,"div",2),y(8),p(),W(9,oQi,2,1,"div",14),h(10,"div",2),y(11),p(),h(12,"div",2),y(13),p()()(),h(14,"div",20)(15,"div",21)(16,"div"),y(17,"QR-CODE"),p()()()()),t&2){let n=w();g(6),Ke("NXT-LVL.INK ",n.configService.config.value.invoiceData.fromCity.toUpperCase(),""),g(2),Ke(" ",n.configService.config.value.invoiceData.fromCompany," "),g(),b("ngIf",n.configService.config.value.invoiceData.fromCompany2),g(2),Ke(" ",n.configService.config.value.invoiceData.fromStreet," "),g(2),cn(" ",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity," ")}}function lQi(t,e){if(t&1&&(h(0,"div",22)(1,"div",3),y(2,"EINWILLIGUNGSERKL\xC4RUNG"),p()()),t&2){let n=w();g(),b("nxtTranslate",n.lang)}}function cQi(t,e){if(t&1&&(h(0,"div",23)(1,"div",3),y(2,"EINWILLIGUNG ERZIEHUNGSBERECHTIGTE(R)"),p()()),t&2){let n=w();g(),b("nxtTranslate",n.lang)}}function dQi(t,e){if(t&1&&(h(0,"div"),ee(1,"br")(2,"br"),h(3,"nxt-declarations-of-consent-section",24)(4,"div",25)(5,"table",26)(6,"tr")(7,"td"),y(8,"\u2756\uFE0F"),p(),h(9,"td",3),y(10,"Hat dein Tattoo-Termin einen Fixpreis, ver\xE4ndert sich der Preis nicht,"),ee(11,"br"),y(12," wenn es schneller fertig ist oder etwas l\xE4nger dauert."),ee(13,"br"),y(14," (Brichst du den Termin ab, werden die Fixkosten erneut f\xE4llig)"),ee(15,"br"),p()(),h(16,"tr")(17,"td"),y(18,"\u2756\uFE0F"),p(),h(19,"td",3),y(20,"Hast du eine Tagessession von 11-18 Uhr gebucht,"),ee(21,"br"),y(22,"endet diese um sp\xE4testens 18 Uhr."),ee(23,"br"),y(24," Sollte dein Tattoo nicht fertig sein, kannst du mit unserem Personal einen Folgetermin zu Fertigstellung vereinbaren. "),p()(),h(25,"tr")(26,"td",3),y(27,"\u2756\uFE0F"),p(),h(28,"td",3),y(29,"Bei \xC4nderungen des Motives muss der Preis ggf. angepasst werden"),p()(),h(30,"tr")(31,"td",3),y(32,"\u2756\uFE0F"),p(),h(33,"td",3),y(34,"Dein gew\xFCnschtes Motiv besprechen wir zusammen mit dem Artist"),p()(),h(35,"tr")(36,"td"),y(37,"\u2756\uFE0F"),p(),h(38,"td",3),y(39,"Je nachdem wie gro\xDF dein Tattoo werden soll, dauert die Vorbereitung ca. eine Stunde."),p()(),h(40,"tr")(41,"td"),y(42,"\u2756\uFE0F"),p(),h(43,"td",27),y(44,"Achtung!!! Achte bitte darauf, dass die Tattoo-Vorlage richtig ist (nicht Spiegelverkehrt), die Daten stimmen und Namen richtig geschrieben sind "),p()(),h(45,"tr")(46,"td"),y(47,"\u2756\uFE0F"),p(),h(48,"td",27),y(49,"Achtung!!! Achte bitte darauf, dass das Stencil vor dem Stechen an der von dir gew\xFCnschten Position ist!"),p()(),h(50,"tr")(51,"td"),y(52,"\u2756\uFE0F"),p(),h(53,"td",3),y(54,"W\xE4hrend der Session werden kurze Pausen gemacht, es sei denn du w\xFCnschst l\xE4ngere "),p()(),h(55,"tr")(56,"td",28),y(57,"Wir w\xFCnschen dir viel Spa\xDF bei deinem Tattoo-Termin!"),p()(),h(58,"tr")(59,"td",28),y(60,"Mit deiner Unterschrift best\xE4tigst du, dass du die Information gelesen und verstanden hast. "),p()()()()()()),t&2){let n=w();g(3),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(10),b("nxtTranslate",n.lang),g(7),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(3),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(3),b("nxtTranslate",n.lang),g(3),b("nxtTranslate",n.lang)}}function uQi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",29)(2,"div",30)(3,"div",31)(4,"div",32),y(5,"\xA0"),p(),h(6,"div",33),y(7,"Vor + Nachname"),p()(),h(8,"div",31)(9,"div",32),y(10,"\xA0"),p(),h(11,"div",33),y(12,"Stra\xDFe + Hausnummer"),p()(),h(13,"div",31)(14,"div",32),y(15,"\xA0"),p(),h(16,"div",33),y(17,"PLZ + Ort"),p()()(),h(18,"div",30)(19,"div",31)(20,"div",32),y(21,"\xA0"),p(),h(22,"div",33),y(23,"Geburtsdatum"),p()(),h(24,"div",31)(25,"div",32),y(26,"\xA0"),p(),h(27,"div",33),y(28,"Handy"),p()(),h(29,"div",31)(30,"div",32),y(31,"\xA0"),p(),h(32,"div",33),y(33,"Personalausweisnummer"),p()()()(),h(34,"nxt-declarations-of-consent-section",34)(35,"div")(36,"div",3),y(37,"Um m\xF6gliche individuelle Risiken rechtzeitig erkennen und einsch\xE4tzen zu k\xF6nnen, ist die sorgf\xE4ltige Beantwortung der Fragen unerl\xE4sslich. "),p(),h(38,"div",35),y(39,"Zutreffendes bitte ankreuzen:"),p()(),h(40,"div",2)(41,"div",36),ee(42,"nxt-declarations-of-consent-checkbox",37)(43,"nxt-declarations-of-consent-checkbox",38)(44,"nxt-declarations-of-consent-checkbox",39)(45,"nxt-declarations-of-consent-checkbox",40)(46,"nxt-declarations-of-consent-checkbox",41)(47,"nxt-declarations-of-consent-checkbox",42)(48,"nxt-declarations-of-consent-checkbox",43)(49,"nxt-declarations-of-consent-checkbox",44),p(),h(50,"div",36),ee(51,"nxt-declarations-of-consent-checkbox",45)(52,"nxt-declarations-of-consent-checkbox",46)(53,"nxt-declarations-of-consent-checkbox",47)(54,"nxt-declarations-of-consent-checkbox",48)(55,"nxt-declarations-of-consent-checkbox",49)(56,"nxt-declarations-of-consent-checkbox",50)(57,"nxt-declarations-of-consent-checkbox",51)(58,"nxt-declarations-of-consent-checkbox",52),p()()(),h(59,"nxt-declarations-of-consent-section",53)(60,"div",35),y(61,"Auch bei sachgem\xE4\xDFer Ausf\xFChrung des Tattoos besteht das Risiko folgender, unerw\xFCnschter Nebenerscheinungen: "),p(),h(62,"div",2)(63,"div",36)(64,"div",3),y(65,"\u30FBEntz\xFCndung (R\xF6tung, Schwellung, Lymphknotenschwellung)"),p(),h(66,"div",3),y(67,"\u30FBSchmerzen / Missempfindung"),p(),h(68,"div",3),y(69,"\u30FBKreislaufprobleme"),p(),h(70,"div",3),y(71,"\u30FBAllergien"),p(),h(72,"div",3),y(73,"\u30FBWundheilungsst\xF6rungen"),p()(),h(74,"div",36)(75,"div",3),y(76,"\u30FBInfektionen"),p(),h(77,"div",3),y(78,"\u30FBGewebenekrose"),p(),h(79,"div",3),y(80,"\u30FBBildung von Abszessen"),p(),h(81,"div",3),y(82,"\u30FBBlutung / H\xE4matombildung"),p(),h(83,"div",3),y(84,"\u30FBDauerhafte Narbenbildung"),p()()(),h(85,"div",54),y(86," Ich hatte ausreichend Zeit und Gelegenheit meine Entscheidung zu f\xE4llen. Eine Pflegeanleitung, sowie die ben\xF6tigten Infos von Pflegemitteln wurden mir ausgeh\xE4ndigt. Ich stehe nicht unter dem Einfluss von Drogen, Alkohol oder Medikamenten und bin in vollem Besitz meiner geistigen und k\xF6rperlichen Kr\xE4fte. Sollten Komplikationen in Folge eines Tattoos \xE4rztlich behandelt werden m\xFCssen, so kann es sein, dass die Krankenversicherung mich an den Kosten beteiligt. Durch meine Unterschrift unter dieser Einwilligungserkl\xE4rung stimme ich dem Tattoo ausdr\xFCcklich zu. "),p()(),h(87,"nxt-declarations-of-consent-section",55)(88,"div",35),y(89,"Die Daten auf diesem Erfassungsbogen ben\xF6tigen wir zur ordnungsgem\xE4\xDFen Durchf\xFChrung unserer Arbeit. Mit deiner Unterschrift willigst du in unsere ausliegende DS-Vereinbarung (Stand 22.01.2019) ein. "),p()()()),t&2){let n=w();g(),b("lang",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(4),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(2),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(3),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(),b("nxtTranslate",n.lang)}}function hQi(t,e){if(t&1&&(h(0,"span"),y(1),p()),t&2){let n=w(2);g(),Ke(" ",n.configService.config.value.invoiceData.fromCompany,"")}}function pQi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",56)(2,"div",57),y(3,"Die T\xE4towierer im Tattoo-Studio NXT-LVL.INK sind selbst\xE4ndig t\xE4tig, NXT-LVL.INK stellt lediglich R\xE4ume und Serviceleistungen zur Verf\xFCgung. Wir kl\xE4ren Dich daher hiermit ausdr\xFCcklich dar\xFCber auf, dass das Gesch\xE4ft (Dienstleistungsvertrag f\xFCr die T\xE4towierung) nur zwischen Dir und dem T\xE4towierer abgeschlossen wird. Evtl. Haftungsanspr\xFCche sind an diesen zu stellen. Unabh\xE4ngig davon sind wir, NXT-LVL.INK, um zufriedene Kunden bem\xFCht und nehmen eure Reklamationen im Auftrag der T\xE4towierer gerne entgegen. Evtl. Kompensationen seitens NXT-LVL.INK zu Reklamationen erfolgen jedoch auf Basis von Kulanz ohne Anerkennung einer dementsprechenden Rechtspflicht. "),p()(),h(4,"nxt-declarations-of-consent-section",58)(5,"div",59),y(6,"ERKL\xC4RUNG DES T\xC4TOWIERERS: "),p(),h(7,"div",2)(8,"div",60)(9,"div",3),y(10," Ich best\xE4tige, dass die T\xE4towierung unter hygienischen Bedingungen und der Verwendung von geeigneten, sterilen Instrumenten und sicheren Verfahren nach EN 17169 durchgef\xFChrt wird. "),ee(11,"br"),y(12," F\xFCr diesen Eingriff wird von mir kein Bet\xE4ubungsmittel eingesetzt. "),ee(13,"br"),y(14," Ich best\xE4tige, dass dem Kunden eine Kopie der unterschriebenen Einverst\xE4ndniserkl\xE4rung angeboten wurde. "),p(),ee(15,"br"),h(16,"div",3),y(17," I confirm that the tattoo will be performed under hygienic conditions and using suitable, sterile instruments and safe procedures according to EN 17169. "),ee(18,"br"),y(19," No anesthetic will be used by me for this procedure. "),ee(20,"br"),y(21," I confirm that a copy of the signed consent form was offered to the customer. "),p()(),h(22,"div",61)(23,"div"),ee(24,"div",62),h(25,"div",63)(26,"div",64),ee(27,"img",65),p(),h(28,"div"),y(29,"Signature Artist"),p()()()()()(),h(30,"nxt-declarations-of-consent-section",66)(31,"div",63)(32,"div",57),y(33," Mit meiner Unterschrift best\xE4tige ich, zum Zeitpunkt des Termins: "),p(),h(34,"div",2)(35,"div",67),ee(36,"nxt-declarations-of-consent-checkbox",68)(37,"nxt-declarations-of-consent-checkbox",69)(38,"nxt-declarations-of-consent-checkbox",70)(39,"nxt-declarations-of-consent-checkbox",71)(40,"nxt-declarations-of-consent-checkbox",72),p(),h(41,"div",73),ee(42,"nxt-declarations-of-consent-checkbox",74)(43,"nxt-declarations-of-consent-checkbox",75)(44,"nxt-declarations-of-consent-checkbox",76)(45,"nxt-declarations-of-consent-checkbox",77)(46,"nxt-declarations-of-consent-checkbox",78),p()(),h(47,"div",79)(48,"div",35),y(49,"Ich best\xE4tige, dass die obigen Informationen und Erkl\xE4rungen korrekt und nach bestem Wissen und Gewissen abgegeben wurden. "),p(),h(50,"div",35),y(51,"Ich bin damit einverstanden, wie vom benannten T\xE4towierer beschrieben, t\xE4towiert zu werden. "),p(),h(52,"div",35),y(53),W(54,hQi,2,1,"span",8),y(55),Ce(56,"nxtDate"),p()()()()()),t&2){let n=w();g(),b("lang",n.lang),g(),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(7),b("nxtTranslate",n.lang),g(14),b("lang",n.lang),g(2),b("nxtTranslate",n.lang),g(4),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(2),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(),Ke("Es gelten dar\xFCber hinaus die allgemeinen Gesch\xE4ftsbedingungen von NXT-LVL.INK ",n.configService.config.value.studioName," "),g(),b("ngIf",!n.configService.config.value.isFranchise),g(),Ke(" (",Nt(56,34,n.configService.config.value.invoiceData.dateOfCondition,"dd.MM.yyyy"),"). ")}}function mQi(t,e){if(t&1&&(h(0,"div"),ee(1,"br")(2,"br")(3,"br"),h(4,"nxt-declarations-of-consent-section",80)(5,"div",2)(6,"div",81)(7,"div",63)(8,"strong",3),y(9,"Aufkl\xE4rung \xFCber den T\xE4towiervorgang"),p(),h(10,"div",3),y(11,"Beim T\xE4towieren werden mittels T\xE4towiernadeln Farbpigmente in die 2. Hautschicht gebracht. Dabei handelt es sich um einen schmerzhaften Vorgang, bei dem die Haut verletzt wird. Nach \xA7 223 Abs.1 StGB handelt es sich damit auch um K\xF6rperverletzung, f\xFCr die wir Deine schriftliche Einwilligung ge-m\xE4\xDF \xA7 228 StGB ben\xF6tigen. Bei einer T\xE4towierung handelt es sich um ein Handwerk. Daher kann es zwischen der T\xE4towiervorlage und dem Endergebnis immer zu kleinen Abweichungen hinsichtlich Farbe und Form kommen. Au\xDFerdem unterliegt auch eine T\xE4towierung in gewissem Umfang der Alterung. So k\xF6nnen insbesondere durch starke Sonneneinstrahlung oder Solarienbesuche \xFCber die Jahre die Farben verblassen. Die Konturen werden \xFCber die Jahre ebenfalls unsch\xE4rfer. T\xE4towierungen sind permanent und k\xF6nnen je nach verwendeter Tinte nicht effektiv entfernt wer-den. Cover-Ups Soweit es sich bei der T\xE4towierung um eine \xDCbert\xE4towierung handelt, kann im Vorfeld weder vorher-gesagt werden, ob eine \xDCberdeckung der alten T\xE4towierung \xFCberhaupt zu erzielen ist, noch mit welchem Zeit- und Arbeitsaufwand. Es kann nicht ausgeschlossen werden, dass es zu Wechselwirkungen mit der Farbe der zu \xFCberdeckenden T\xE4towierung kommt. Au\xDFerdem kann die alte T\xE4towierung teil-weise durchscheinen, was sich im Laufe der Jahre durch verschiedene Umwelteinfl\xFCsse noch verst\xE4rken kann. Wurde eine vormals vorhandene T\xE4towierung entfernt oder aufgehellt, besteht bei \xDCberdeckung eine besondere Gefahr, dass die neu zu stechende T\xE4towierung von dem gew\xFCnschten Ergebnis ab-weicht. Die Haut kann in ihrer Farbaufnahme beeintr\xE4chtigt sein oder in besonderem Ma\xDFe zur Narbenbildung neigen. Dasselbe gilt f\xFCr das T\xE4towieren von Dehnungsstreifen oder Narben. Hautbeschaffenheit In ungew\xF6hnlichen F\xE4llen kann die Haut aufgrund ihrer Beschaffenheit die Pigmente der Tattoofarben nur unzureichend aufnehmen. Dies kann zu unbefriedigenden Ergebnissen f\xFChren und ist im Vor-feld leider nicht immer absehbar. M\xF6gliche Ursachen hierf\xFCr sind erhebliche UVExposition sowie Steroidmissbrauch. Wackeln Wir ermahnen Dich als Kunden hiermit ausdr\xFCcklich, auch wenn der T\xE4towiervorgang schmerzhaft ist, still zu halten und ruckartige Bewegungen zu vermeiden! Solche ruckartigen Bewegungen sind f\xFCr den T\xE4towierer unvorhersehbar. Er kann diese trotz leichter Fixierung der Hautpartie nicht g\xE4nzlich verhindern, sondern lediglich versuchen zu minimieren. Je nach Ausma\xDF solcher ruckartigen Bewegungen durch den Kunden kann es zu mehr oder weniger starken Unregelm\xE4\xDFigkeiten insb. in der Linienf\xFChrung kommen. Mitwirkungspflichten Es ist absolut unerl\xE4sslich, dass Du uns vollst\xE4ndig \xFCber Deine f\xFCr die T\xE4towierung relevante Krankengeschichte und Deinen Gesundheitszustand informierst. Dazu geben wir Dir auf unserem Kundenerfassungsbogen eine entsprechende Checkliste! Bitte beantworte diese gewissen-haft und wahrheitsgem\xE4\xDF. Bei m\xF6glichen Risiken bzw. Unklarheiten solltest Du zudem Deinen Arzt konsultieren. "),p()(),ee(12,"br"),h(13,"div",63)(14,"strong",3),y(15,"Vor der T\xE4towierung"),p(),h(16,"div",3),y(17,"Am Tag der T\xE4towierung darfst Du nicht unter Alkohol-, Drogen- oder Medikamenteneinfluss stehen, anderenfalls kann die T\xE4towierung nicht durchgef\xFChrt werden. Wir weisen darauf hin, dass es nicht zuletzt aus hygienischen Gr\xFCnden erforderlich ist, dass die Kleidungsst\xFCcke in dem zu t\xE4towierenden Bereich entfernt werden. "),p()(),ee(18,"br"),h(19,"div",63)(20,"strong",3),y(21,"Nach der T\xE4towierung"),p(),y(22," Um eine optimale Abheilung und letztendlich ein optimales Ergebnis zu erhalten, ist es unbedingt erforderlich, dass Du die Pflegehinweise, die wir Dir \xFCbergeben haben, einh\xE4ltst. Wir weisen darauf hin, dass unsere T\xE4towierer keinerlei Haftung oder Gew\xE4hrleistung bei Nichteinhaltung der Pflegehinweise \xFCbernehmen k\xF6nnen. "),p()(),h(23,"div",81)(24,"strong",3),y(25,"Risiken und Nebenwirkungen"),p(),h(26,"div",3),y(27,"Trotz gr\xF6\xDFter Sorgfalt sowie erprobter Techniken und Arbeitsmaterialien kann es w\xE4hrend oder nach dem T\xE4towieren zu Nebenwirkungen oder Komplikationen kommen. Zu nennen sind: "),p(),h(28,"table",82)(29,"tr")(30,"td"),y(31,"\u30FB"),p(),h(32,"td",3),y(33,"Gelegentlich: Kreislaufprobleme, \xDCbelkeit oder Ohnmacht w\xE4hrend des T\xE4towierens."),p()(),h(34,"tr")(35,"td"),y(36,"\u30FB"),p(),h(37,"td",3),y(38,"Vereinzelt: N\xE4ssen der frischen T\xE4towierung nach dem T\xE4towieren, was in der Regel nach kurzer Zeit abklingt. "),p()(),h(39,"tr")(40,"td"),y(41,"\u30FB"),p(),h(42,"td",3),y(43,"Gelegentlich: Anschwellen der Haut oder anderen Hautirritationen nach dem T\xE4towieren, welche in der Regel nach wenigen Tagen nachlassen. "),p()(),h(44,"tr")(45,"td"),y(46,"\u30FB"),p(),h(47,"td",3),y(48,"Gelegentlich: Juckreiz oder ein leichtes Brennen w\xE4hrend des Abheilprozesses, was in der Regel nach wenigen Tagen nachl\xE4sst. "),p()(),h(49,"tr")(50,"td"),y(51,"\u30FB"),p(),h(52,"td",3),y(53,"Gelegentlich: Ungewollte Farbverl\xE4ufe (sog. Blow-Outs) aufgrund eines ung\xFCnstigen Bindegewebes. "),p()(),h(54,"tr")(55,"td"),y(56,"\u30FB"),p(),h(57,"td",3),y(58,"Es kann nach dem T\xE4towieren zu mehr oder weniger ausgepr\xE4gter Schorf- und Krustenbildung kommen. Dieser Schorf f\xE4llt jedoch nach wenigen Tagen von allein ab. "),p()(),h(59,"tr")(60,"td"),y(61,"\u30FB"),p(),h(62,"td",3),y(63,"In seltenen F\xE4llen: Narbenbildung an der t\xE4towierten Stelle."),p()(),h(64,"tr")(65,"td"),y(66,"\u30FB"),p(),h(67,"td",3),y(68,"In sehr seltenen F\xE4llen: Photosensitivit\xE4t der T\xE4towierung."),p()(),h(69,"tr")(70,"td"),y(71,"\u30FB"),p(),h(72,"td",3),y(73,"In sehr seltenen F\xE4llen: Auftreten von Keloiden oder Sarkoidosen."),p()(),h(74,"tr")(75,"td"),y(76,"\u30FB"),p(),h(77,"td",3),y(78,"In sehr seltenen F\xE4llen: Allergische Reaktionen aufgrund der eingebrachten Farbpigmente bzw. Bindemittel oder aufgrund der verwendeten Salben. "),p()(),h(79,"tr")(80,"td"),y(81,"\u30FB"),p(),h(82,"td",3),y(83,"In sehr seltenen F\xE4llen: Trotz gr\xF6\xDFter Sorgfalt hinsichtlich Sauberkeit und Hygiene - vor allem in-folge unsachgem\xE4\xDFer Nachbehandlung des Tattoos - Entz\xFCndungen, Infektionen und im weiteren Verlauf Keimverschleppung. Bei nicht rechtzeitiger \xE4rztlicher Behandlung k\xF6nnen dauerhafte und ernste Gesundheitssch\xE4den die Folge sein. Bei erheblichen Beeintr\xE4chtigungen empfehlen wir, einen Arzt zu konsultieren. Aufgrund des \xA7 52 Abs. 2 SGB kann es zu Regressforderungen seitens der Krankenkasse kommen. "),p()()(),ee(84,"br"),h(85,"strong",3),y(86,"Einwilligung"),p(),h(87,"div",3),y(88,"Mit deiner Unterschrift auf unserer Einwilligungserkl\xE4rung willigst Du in folgende Punkte ein: "),p(),h(89,"table",82)(90,"tr")(91,"td"),y(92,"\u30FB"),p(),h(93,"td",3),y(94,"Ich wurde \xFCber Nebenwirkungen, potenzielle Risiken und Komplikationen (z. B. Schmerzen, Schwellungen, \xDCbersensibilit\xE4t und Infektionen) informiert, habe diese Information verstanden und wei\xDF, wie diese Risiken minimiert werden k\xF6nnen. "),p()(),h(95,"tr")(96,"td"),y(97,"\u30FB"),p(),h(98,"td",3),y(99,"Die Nachsorge wurde mir klar und deutlich erkl\xE4rt und ich verstehe die Handlungen und Vorsichtsma\xDFnahmen, die ich ergreifen muss. Es wurde mir eine eigene, schriftliche Kopie der Nachsorgeanweisungen ausgeh\xE4ndigt. "),p()(),h(100,"tr")(101,"td"),y(102,"\u30FB"),p(),h(103,"td",3),y(104,"Die Angaben zu meinem Gesundheitszustand sind wahrheitsgem\xE4\xDF und vollst\xE4ndig."),p()(),h(105,"tr")(106,"td"),y(107,"\u30FB"),p(),h(108,"td",3),y(109,"Ich wurde dar\xFCber aufgekl\xE4rt, dass ich bei meinem TattooTermin die Vorlage inkl. Positionierung in Augenschein nehmen und jederzeit noch \xC4nderungsw\xFCnsche \xE4u\xDFern kann. Mit der Durchf\xFChrung des Tattoo-Termins best\xE4tige ich, dass die zu stechende Vorlage gestalterisch sowie von der Positionierung meinem Wunsch entspricht. "),p()(),h(110,"tr")(111,"td"),y(112,"\u30FB"),p(),h(113,"td",3),y(114,"All dies ber\xFCcksichtigend willige ich hiermit in die Durchf\xFChrung der T\xE4towierung, wie vom be-nannten T\xE4towierer beschrieben, nach \xA7 228 StGB ein. "),p()()()()()()()),t&2){let n=w();g(4),b("lang",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(3),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang)}}function fQi(t,e){if(t&1&&(h(0,"div")(1,"div",83),y(2," Bei Minderj\xE4hrigen Personen muss diese Einwilligungserkl\xE4rung von einer erziehungsberechtigten Person unterzeichnet und somit best\xE4tigt werden. Mit der Unterschrift wird die ausgef\xFChrte Behandlung erlaubt und die Richtigkeit der in dieser Erkl\xE4rung gemachten Daten und Angaben best\xE4tigt. "),p(),h(3,"nxt-declarations-of-consent-section",84)(4,"div",85)(5,"div",31)(6,"div",32),y(7,"\xA0"),p(),h(8,"div",33),y(9,"Vor + Nachname"),p()(),h(10,"div",86)(11,"div",32),y(12,"\xA0"),p(),h(13,"div",33),y(14,"Stra\xDFe + Hausnummer"),p()()(),h(15,"div",85)(16,"div",31)(17,"div",32),y(18,"\xA0"),p(),h(19,"div",33),y(20,"PLZ + Ort"),p()(),h(21,"div",86)(22,"div",32),y(23,"\xA0"),p(),h(24,"div",33),y(25,"Geburtsdatum"),p()(),h(26,"div",86)(27,"div",32),y(28,"\xA0"),p(),h(29,"div",33),y(30,"Personalausweisnummer"),p()()()()()),t&2){let n=w();g(),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang)}}function gQi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2);g(),Ke("NXT-LVL.INK ",n.configService.config.value.invoiceData.fromCity,"")}}function vQi(t,e){if(t&1&&(h(0,"div",2)(1,"div",3),y(2,"Seite"),p(),y(3),p()),t&2){let n=w(2);g(),b("nxtTranslate",n.lang),g(2),cn(" ",n.pageCountCurrent+1,"/",n.pageCountTotal," ")}}function yQi(t,e){if(t&1&&(h(0,"div",3),y(1,"Zusatzseite"),p()),t&2){let n=w(2);b("nxtTranslate",n.lang)}}function _Qi(t,e){if(t&1&&(h(0,"div",87)(1,"div",88)(2,"div",63)(3,"div",2)(4,"div",89),y(5),p(),ee(6,"div",90),p(),h(7,"div",3),y(8,"Ort & Datum"),p()(),h(9,"div",91)(10,"div",64),ee(11,"img",92),p(),ee(12,"div",93),p()(),h(13,"div",94),W(14,gQi,2,1,"div",8)(15,vQi,4,3,"div",2)(16,yQi,2,1,"div",3),p()()),t&2){let n=w();g(5),Ke(" ",n.configService.config.value.invoiceData.fromCity,", den "),g(2),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang)("innerHTML",n.signatureName,Pi),g(2),b("ngIf",!1),g(),Je(n.pageCountCurrent+1<=n.pageCountTotal?15:16)}}var e_t,t_t=Q(()=>{Gi();Ul();go();wTe();aj();ri();OM();me();Cs();ma();e_t=(()=>{let e=class e extends bt{constructor(i,r){if(super(),this.configService=i,this.route=r,this.pageCountCurrent=4,this.pageCountTotal=4,this.signatureName="",this.lang="en",this.route.snapshot.queryParams.data){let s=Qn.parse(this.route.snapshot.queryParams.data);this.pageCountCurrent=s.page,this.lang=s.lang||"de"}this.calc()}ngOnInit(){}calc(){[0,1,2,3].includes(this.pageCountCurrent)?this.signatureName="Deine Unterschrift":this.pageCountCurrent===4&&(this.signatureName="Unterschrift Erziehungsberechtigte(r)")}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(Xi),R(gs))},e.\u0275cmp=_e({type:e,selectors:[["nxt-declarations-of-consent"]],standalone:!0,features:[et,xe],decls:17,vars:13,consts:[[1,"flex","flex-col","w-full","h-full","text-[10px]","page-wrapper","p-relative"],[1,"fixed-header","text-xl"],[1,"flex","flex-row"],[3,"nxtTranslate"],["class","flex justify-center p-3",4,"ngIf"],["class","flex justify-around flex-row p-3",4,"ngIf"],["class","flex text-3xl flex-col items-center pb-3 header",4,"ngIf"],["class","flex text-2xl flex-col items-center pb-3 header",4,"ngIf"],[4,"ngIf"],["class","flex flex-col footer justify-center items-center",4,"ngIf"],[1,"flex","justify-center","p-3"],[1,"flex","flex-col","justify-center","items-center"],["src","../../../../assets/logo/logo_black.svg",2,"width","6cm"],[1,"flex","flex-row","mt-1","logo-text"],["class","flex flex-row",4,"ngIf"],[1,"gold"],[1,"flex","justify-around","flex-row","p-3"],[1,"flex","flex-col","justify-center","items-center","grow","w-full",2,"border","0px solid red"],["src","../../../../assets/logo/logo_black.svg",2,"width","8cm"],[1,"flex","flex-col","mt-1","logo-text-left","items-center","w-full","text-[20px]"],[1,"flex","justify-end"],[1,"flex","justify-center","items-center",2,"border","1px dotted black","width","6cm","height","8cm"],[1,"flex","text-3xl","flex-col","items-center","pb-3","header"],[1,"flex","text-2xl","flex-col","items-center","pb-3","header"],["titleText","ALLGEMEINE INFORMATIONEN",3,"lang"],[1,"py-3","px-10"],[1,"w-full","text-[16px]","info-table"],[1,"red",3,"nxtTranslate"],["colspan","2",3,"nxtTranslate"],["titleText","DEINE DATEN",3,"lang"],[1,"flex","flex-row","w-full","gap-3"],[1,"flex","flex-col","w-full"],[1,"flex","w-full","text-2xl",2,"border-bottom","1px solid black"],[1,"flex","text-[9px]",3,"nxtTranslate"],["titleText","DEINE GESUNDHEITSDATEN",3,"lang"],[1,"pb-1",3,"nxtTranslate"],[1,"flex","flex-col","w-1/2"],["text","Es besteht eine Bluterkrankung oder erh\xF6hte Blutungsneigung.",3,"lang"],["text","Es besteht eine Hauterkrankung (Neurodermitis, Schuppenflechte etc.).",3,"lang"],["text","Ich leide an Diabetes.",3,"lang"],["text","Ich leide an Sarkoidose.",3,"lang"],["text","Es bestehen Autoimmunerkrankungen.",3,"lang"],["text","Ich bin Asthmatiker.",3,"lang"],["text","Ich nehme Medikamente zur Blutverd\xFCnnung (Marcumar, Aspirin, Heparin etc.).",3,"lang"],["text","Ich habe eine Herzerkrankung, Herzrhythmusst\xF6rung bzw. trage ein Herzschrittmacher.",3,"lang"],["text","Ich habe einen zu hohen bzw. zu niedrigen Blutdruck.",3,"lang"],["text","Ich habe Kreislaufprobleme und/oder neige zu Ohnmachtsanf\xE4llen.",3,"lang"],["text","Es besteht eine chronische Infektionskrankheit (z.B. AIDS, Hepatitis, MRSA).",3,"lang"],["text","Es bestehen andere schwerwiegende chronische Leiden (z.B. Epilepsie oder L\xE4hmungen).",3,"lang"],["text","Es bestehen Erkrankungen, die zu einem geschw\xE4chten Immunsystem f\xFChren.",3,"lang"],["text","Ich leide an Wundheilst\xF6rung.",3,"lang"],["text","Ich neige zu starker Narbenbildung.",3,"lang"],["text","Ich stehe unter gerichtlicher Betreuung.",3,"lang"],["titleText","M\xD6GLICHE KOMPLIKATIONEN",3,"lang"],[1,"pt-2",3,"nxtTranslate"],["titleText","DATENSCHUTZ",3,"lang"],["titleText","VERTRAGSPARTNER",3,"lang"],[1,"pb-2",3,"nxtTranslate"],["titleText","F\xDCLLT DER T\xC4TOWIERER AUS",3,"lang"],[1,"pb-1","font-bold",3,"nxtTranslate"],[1,"flex","flex-col","w-1/2","pb-1","pr-2"],[1,"flex","flex-col","w-1/2","pb-1","pl-2","h-full","justify-end","items-center"],[2,"height","3cm"],[1,"flex","flex-col"],[2,"border-bottom","1px solid black","width","7cm"],["src","../../../assets/images/sign-here-3.png",2,"width","20px"],["titleText","DU BEST\xC4TIGST",3,"lang"],[1,"flex","w-1/2","pr-2","flex-col"],["text","Ich habe das 18te Lebensjahr vollendet.",3,"lang","checked"],["text","Es bestehen keine akuten Infektionskrankheiten (grippaler Infekt etc.).",3,"lang","checked"],["text","Ich bin nicht schwanger und stille derzeit auch kein Kind.",3,"lang","checked"],["text","Ich habe in den letzten 24 Stunden kein Alkohol und keine Drogen zu mir genommen.",3,"lang","checked"],["text","Ich habe auch keine anderen Substanzen zu mir genommen, die meine Wahrnehmung, meinen freien Willen oder mein Urteilsverm\xF6gen einschr\xE4nken k\xF6nnten.",3,"lang","checked"],[1,"flex","w-1/2","pl-2","flex-col"],["text","Die zu t\xE4towierende Stelle weist kein Narbengewebe (j\xFCnger als 12 Monate) oder Keloidnarben auf.",3,"lang","checked"],["text","Ich habe mich in den letzten 12 Monaten keiner Strahlentherapie unterzogen.",3,"lang","checked"],["text","Ich bin ausgeschlafen und habe ausreichend gegessen und getrunken.",3,"lang","checked"],["text","Mir ist bewusst, dass das Nachstechen bei Hand-, Fu\xDF- und Fingertattoos nicht inklusive (nicht im Preis inbegriffen) ist.",3,"lang","checked"],["text","Ich bin auf die <strong>Aufkl\xE4rung zur Einverst\xE4ndniserkl\xE4rung, Datenschutzbestimmungen</strong> und <strong>AGB</strong> hingewiesen worden.",3,"lang","checked"],[1,"pt-2","flex","flex-col"],["titleText","WEITERE INFORMATIONEN",3,"lang"],[1,"text-[8px]","w-1/2","flex","flex-col","p-5"],[1,"info-table-small"],[1,"p-6","text-[16px]",3,"nxtTranslate"],["titleText","ERZIEHUNGSBERECHTIGTE(R) DATEN",3,"lang"],[1,"flex","flex-row","w-full"],[1,"flex","flex-col","pl-5","w-full"],[1,"flex","flex-col","footer","justify-center","items-center"],[1,"flex","mb-5","flex-row","items-end"],[1,"text-sm",2,"border-bottom","1px solid black"],[1,"text-sm",2,"border-bottom","1px solid black","width","4cm"],[1,"flex","flex-col","ml-2"],["src","../../../assets/images/sign-here-2.png",2,"width","20px"],[3,"nxtTranslate","innerHTML"],[1,"flex","flex-row","justify-end","w-full"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),W(3,tQi,3,3)(4,iQi,2,1,"div",3),p()(),W(5,sQi,17,6,"div",4)(6,aQi,18,6,"div",5)(7,lQi,3,1,"div",6)(8,cQi,3,1,"div",7)(9,dQi,61,13,"div",8)(10,uQi,90,41,"div",8)(11,pQi,57,37,"div",8)(12,mQi,115,26,"div",8)(13,fQi,31,7,"div",8),ee(14,"br"),W(15,_Qi,17,6,"div",9),p(),y(16," ```\n")),r&2&&(g(),ki("center",s.pageCountCurrent===0),g(2),Je(s.pageCountCurrent+1<=s.pageCountTotal?3:4),g(2),b("ngIf",s.pageCountCurrent>0),g(),b("ngIf",s.pageCountCurrent===0),g(),b("ngIf",s.pageCountCurrent>0&&s.pageCountCurrent<=s.pageCountTotal),g(),b("ngIf",s.pageCountCurrent===4),g(),b("ngIf",s.pageCountCurrent===0),g(),b("ngIf",s.pageCountCurrent===1),g(),b("ngIf",s.pageCountCurrent===2),g(),b("ngIf",s.pageCountCurrent===3),g(),b("ngIf",s.pageCountCurrent===4),g(2),b("ngIf",s.signatureName))},dependencies:[Ct,_S,Fse,Hn,Q6],styles:["@page{size:A4;margin:1cm}[_nghost-%COMP%]{color:#000;font-family:Open Sans,sans-serif;-webkit-print-color-adjust:exact}[_nghost-%COMP%]     .mini-info-bar{display:none!important}.page-wrapper[_ngcontent-%COMP%]{padding:0}.footer[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:0}.fixed-header[_ngcontent-%COMP%]{font-weight:600;font-family:Montserrat,serif;color:#b7860f;position:fixed;top:0;right:0}.fixed-header.center[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;justify-content:center;padding-right:6cm}.header[_ngcontent-%COMP%]{font-weight:800;font-family:Montserrat,serif;color:#b7860f}.logo-text[_ngcontent-%COMP%]{padding-top:5px;font-weight:600;font-family:Montserrat,serif;border-bottom:1px solid #b7860f}.logo-text-left[_ngcontent-%COMP%]{padding-top:5px;font-weight:600;font-family:Montserrat,serif}.info-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:baseline;padding-right:8px}.info-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:5px}.info-table-small[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:baseline;padding-right:4px}.info-table-small[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:3px}"]});let t=e;return t})()});var i_t,n_t=Q(()=>{Gi();Ph();Qo();Pa();me();yi();Ci();i_t=(()=>{let e=class e extends bt{constructor(i,r){super(),this.socketService=i,this.dialogService=r,this.columnDefs=[{headerName:"ID",field:"internalId"},{headerName:"Code",field:"name"},{headerName:"Bestellt",field:"createdAt",nxtFieldType:Ee.Date_germanDate},{headerName:"Betrag",field:"value",nxtFieldType:Ee.Money},{headerName:"Name",valueGetter:s=>""},{headerName:"Drucken",valueGetter:s=>Ir.Material.Print,cellStyle:{textAlign:"center"},nxtOnCellClicked:s=>this.print(s.data)}]}ngOnInit(){this.load()}nxtOnDestroy(){}load(){return O(this,null,function*(){this.giftCards=yield this.socketService.getWhatsApp20()})}print(i){return O(this,null,function*(){})}};e.\u0275fac=function(r){return new(r||e)(R(lt),R(vt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-print-gift-cards"]],standalone:!0,features:[et,xe],decls:5,vars:2,consts:[[1,"nxt-page","w-full","flex","flex-col"],[1,"flex","grow"],[3,"columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2," header "),p(),h(3,"div",1),ee(4,"nxt-datagrid",2),p()()),r&2&&(g(4),b("columnDefs",s.columnDefs)("rowData",s.giftCards))},dependencies:[dr]});let t=e;return t})()});function CQi(t,e){if(t&1&&(h(0,"div",8)(1,"div",9),y(2,"SEITE"),p(),h(3,"div"),y(4),p()()),t&2){let n=w();g(),b("nxtTranslate",n.lang),g(3),cn("\xA0",n.pageCountCurrent," / ",n.pageCountTotal,"")}}function xQi(t,e){if(t&1&&(h(0,"div",14)(1,"div",15),y(2,"\u30FB"),p(),y(3),p()),t&2){let n=w(2);g(3),Ke(" ",n.configService.config.value.invoiceData.fromCompany2," ")}}function bQi(t,e){if(t&1&&(h(0,"div",10)(1,"div",11)(2,"div"),ee(3,"img",12),p(),h(4,"div",13)(5,"div"),y(6),p(),h(7,"div",14)(8,"div",15),y(9,"\u30FB"),p(),y(10),p(),W(11,xQi,4,1,"div",16),h(12,"div",14)(13,"div",15),y(14,"\u30FB"),p(),y(15),p(),h(16,"div",14)(17,"div",15),y(18,"\u30FB"),p(),y(19),p()()()()),t&2){let n=w();g(6),Ke("NXT-LVL.INK ",n.configService.config.value.invoiceData.fromCity.toUpperCase(),""),g(4),Ke(" ",n.configService.config.value.invoiceData.fromCompany," "),g(),b("ngIf",n.configService.config.value.invoiceData.fromCompany2),g(4),Ke(" ",n.configService.config.value.invoiceData.fromStreet," "),g(4),cn(" ",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity," ")}}function wQi(t,e){if(t&1&&(h(0,"div",14),y(1),p()),t&2){let n=w(2);g(),Ke(" ",n.configService.config.value.invoiceData.fromCompany2," ")}}function SQi(t,e){if(t&1&&(h(0,"div",17)(1,"div",18)(2,"div"),ee(3,"img",19),p(),h(4,"div",20)(5,"div"),y(6),p(),h(7,"div",14),y(8),p(),W(9,wQi,2,1,"div",16),h(10,"div",14),y(11),p(),h(12,"div",14),y(13),p()()(),h(14,"div",21)(15,"div",22)(16,"div"),y(17,"QR-CODE"),p()()()()),t&2){let n=w();g(6),Ke("NXT-LVL.INK ",n.configService.config.value.invoiceData.fromCity.toUpperCase(),""),g(2),Ke(" ",n.configService.config.value.invoiceData.fromCompany," "),g(),b("ngIf",n.configService.config.value.invoiceData.fromCompany2),g(2),Ke(" ",n.configService.config.value.invoiceData.fromStreet," "),g(2),cn(" ",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity," ")}}function TQi(t,e){if(t&1&&(h(0,"div",23)(1,"div",9),y(2,"EINWILLIGUNGSERKL\xC4RUNG PIERCING"),p()()),t&2){let n=w();g(),b("nxtTranslate",n.lang)}}function DQi(t,e){if(t&1&&(h(0,"div",24)(1,"div",25),y(2,"PIERCING"),ee(3,"br"),y(4,"EINWILLIGUNG ERZIEHUNGSBERECHTIGTE"),p()()),t&2){let n=w();g(),b("nxtTranslate",n.lang)}}function EQi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",26)(2,"div",27)(3,"div",28)(4,"div",29),y(5,"\xA0"),p(),h(6,"div",30),y(7,"Vor + Nachname"),p()(),h(8,"div",28)(9,"div",29),y(10,"\xA0"),p(),h(11,"div",30),y(12,"Stra\xDFe + Hausnummer"),p()(),h(13,"div",28)(14,"div",29),y(15,"\xA0"),p(),h(16,"div",30),y(17,"PLZ + Ort"),p()()(),h(18,"div",27)(19,"div",28)(20,"div",29),y(21,"\xA0"),p(),h(22,"div",30),y(23,"Geburtsdatum"),p()(),h(24,"div",28)(25,"div",29),y(26,"\xA0"),p(),h(27,"div",30),y(28,"Handy"),p()(),h(29,"div",28)(30,"div",29),y(31,"\xA0"),p(),h(32,"div",30),y(33,"Personalausweisnummer"),p()()()(),h(34,"nxt-declarations-of-consent-section",31)(35,"div",14)(36,"div",32),ee(37,"nxt-declarations-of-consent-checkbox",33)(38,"nxt-declarations-of-consent-checkbox",34)(39,"nxt-declarations-of-consent-checkbox",35)(40,"nxt-declarations-of-consent-checkbox",36)(41,"nxt-declarations-of-consent-checkbox",37)(42,"nxt-declarations-of-consent-checkbox",38),p(),h(43,"div",32),ee(44,"nxt-declarations-of-consent-checkbox",39)(45,"nxt-declarations-of-consent-checkbox",40)(46,"nxt-declarations-of-consent-checkbox",41)(47,"nxt-declarations-of-consent-checkbox",42)(48,"nxt-declarations-of-consent-checkbox",43)(49,"nxt-declarations-of-consent-checkbox",44),p()()()()),t&2){let n=w();g(),b("lang",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(3),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(2),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang),g(),b("lang",n.lang)}}function MQi(t,e){if(t&1&&(h(0,"nxt-declarations-of-consent-section",60)(1,"div",61),y(2,"Die Piercer(innen) im Tattoo-Studio NXT-LVL.INK sind selbst\xE4ndig t\xE4tig, NXT-LVL.INK stellt lediglich R\xE4ume und Serviceleistungen zur Verf\xFCgung. Wir kl\xE4ren Dich daher hiermit ausdr\xFCcklich dar\xFCber auf, dass das Gesch\xE4ft (Dienstleistungsvertrag f\xFCr die T\xE4towierung) nur zwischen Dir und dem / der Piercer(in) abgeschlossen wird. Evtl. Haftungsanspr\xFCche sind an diesen zu stellen. Unabh\xE4ngig davon sind wir, NXT-LVL.INK, um zufriedene Kunden bem\xFCht und nehmen eure Reklamationen im Auftrag der T\xE4towierer gerne entgegen. Evtl. Kompensationen seitens NXT-LVL.INK zu Reklamationen erfolgen jedoch auf Basis von Kulanz ohne Anerkennung einer dementsprechenden Rechtspflicht. "),p()()),t&2){let n=w(2);g(),b("nxtTranslate",n.lang)}}function kQi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",45)(2,"div",46),y(3," Das Anbringen eines Piercings stellt laut \xA7224 StGB eine K\xF6rperverletzung dar."),ee(4,"br"),y(5,"Deshalb bedarf es einer Einwilligungserkl\xE4rung, womit durch die Unterschrift der zu piercenden Person die Rechtsgrundlage geschaffen wird."),ee(6,"br"),y(7,"Die zu piercende Person erkl\xE4rt sich im Sinne des \xA7 224 StGB damit einverstanden, dass der / die Piercer(in) bei der Durchf\xFChrung des Piercings einen Eingriff an Ihrem K\xF6rper vornimmt. "),p(),h(8,"div",47)(9,"div",9),y(10," Ich habe den/die Piercer(in) beauftragt, an meinem K\xF6rper \u2013an folgender Stelle- Schmuck durch Body-Piercing anzubringen: "),p(),h(11,"div",48),y(12," K\xF6rperstelle(n) "),p()(),h(13,"div",49),ee(14,"nxt-declarations-of-consent-checkbox",50)(15,"nxt-declarations-of-consent-checkbox",51)(16,"nxt-declarations-of-consent-checkbox",52)(17,"nxt-declarations-of-consent-checkbox",53)(18,"nxt-declarations-of-consent-checkbox",54)(19,"nxt-declarations-of-consent-checkbox",55)(20,"nxt-declarations-of-consent-checkbox",56),p()(),h(21,"nxt-declarations-of-consent-section",57)(22,"div",46),y(23,"Auch bei sachgem\xE4\xDFer Ausf\xFChrung besteht das Risiko folgender, unerw\xFCnschter Nebenerscheinungen: "),p(),h(24,"div",14)(25,"div",32)(26,"div",9),y(27,"\u30FBNachblutungen"),p(),h(28,"div",9),y(29,"\u30FBR\xF6tungen"),p(),h(30,"div",9),y(31,"\u30FBKreislaufst\xF6rungen"),p(),h(32,"div",9),y(33,"\u30FBAllergien"),p(),h(34,"div",9),y(35,"\u30FBEntz\xFCndungen"),p(),h(36,"div",9),y(37,"\u30FBNekrosen"),p()(),h(38,"div",32)(39,"div",9),y(40,"\u30FBHerauswachsen"),p(),h(41,"div",9),y(42,"\u30FBZahnsch\xE4digungen"),p(),h(43,"div",9),y(44,"\u30FBeitrige Infektionen"),p(),h(45,"div",9),y(46,"\u30FBBluterg\xFCsse"),p(),h(47,"div",9),y(48,"\u30FBNarbenbildung"),p(),h(49,"div",9),y(50,"\u30FBSchmerzen"),p()()(),h(51,"div",49),ee(52,"nxt-declarations-of-consent-checkbox",58),p()(),W(53,MQi,3,1,"nxt-declarations-of-consent-section",59),p()),t&2){let n=w();g(),b("lang",n.lang),g(),b("nxtTranslate",n.lang),g(7),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(3),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang)("checked",!0),g(),b("lang",n.lang),g(),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(3),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(3),b("lang",n.lang)("checked",!0),g(),b("ngIf",!n.artistEmployed)}}function IQi(t,e){if(t&1&&(h(0,"div")(1,"div",62),y(2," Bei Minderj\xE4hrigen Personen muss diese Einwilligungserkl\xE4rung von einer erziehungsberechtigten Person unterzeichnet und somit best\xE4tigt werden."),ee(3,"br")(4,"br"),y(5,"Mit der Unterschrift wird die ausgef\xFChrte Behandlung erlaubt und die Richtigkeit der in dieser Erkl\xE4rung gemachten Daten und Angaben best\xE4tigt. "),p(),h(6,"nxt-declarations-of-consent-section",63)(7,"div",64)(8,"div",28)(9,"div",29),y(10,"\xA0"),p(),h(11,"div",30),y(12,"Vor + Nachname"),p()(),h(13,"div",65)(14,"div",29),y(15,"\xA0"),p(),h(16,"div",30),y(17,"Stra\xDFe + Hausnummer"),p()()(),h(18,"div",64)(19,"div",28)(20,"div",29),y(21,"\xA0"),p(),h(22,"div",30),y(23,"PLZ + Ort"),p()(),h(24,"div",65)(25,"div",29),y(26,"\xA0"),p(),h(27,"div",30),y(28,"Geburtsdatum"),p()(),h(29,"div",65)(30,"div",29),y(31,"\xA0"),p(),h(32,"div",30),y(33,"Personalausweisnummer"),p()()()()()),t&2){let n=w();g(),b("nxtTranslate",n.lang),g(5),b("lang",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang)}}function AQi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2);g(),Ke("NXT-LVL.INK ",n.configService.config.value.invoiceData.fromCity,"")}}function PQi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(2);g(),cn("Seite ",n.pageCountCurrent," /",n.pageCountTotal," ")}}function RQi(t,e){if(t&1&&(h(0,"div",66)(1,"div",67)(2,"div",68)(3,"div",14)(4,"div",69),y(5),p(),ee(6,"div",70),p(),h(7,"div",9),y(8,"Ort & Datum"),p()(),h(9,"div",71)(10,"div",72),ee(11,"img",73),p(),ee(12,"div",74),p()(),h(13,"div",75),W(14,AQi,2,1,"div",6)(15,PQi,2,2,"div",6),p()()),t&2){let n=w();g(5),Ke(" ",n.configService.config.value.invoiceData.fromCity,", den "),g(2),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang)("innerHTML",n.signatureName,Pi),g(2),b("ngIf",!1),g(),b("ngIf",n.pageCountCurrent>0&&n.pageCountCurrent<=n.pageCountTotal)}}var r_t,s_t=Q(()=>{Gi();Ul();wTe();aj();ri();OM();me();Cs();ma();r_t=(()=>{let e=class e extends bt{constructor(i,r){if(super(),this.configService=i,this.route=r,this.pageCountCurrent=2,this.pageCountTotal=2,this.signatureName="",this.artistEmployed=!1,this.lang="en",this.route.snapshot.queryParams.data){let s=Qn.parse(this.route.snapshot.queryParams.data);this.pageCountCurrent=s.page,this.lang=s.lang,typeof s.artistEmployed=="boolean"&&(this.artistEmployed=s.artistEmployed)}this.calc()}ngOnInit(){}calc(){[0,1,2].includes(this.pageCountCurrent)?this.signatureName="Deine Unterschrift":this.pageCountCurrent===3&&(this.signatureName="Unterschrift Erziehungsberechtigte")}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(Xi),R(gs))},e.\u0275cmp=_e({type:e,selectors:[["nxt-declarations-of-consent-piercing"]],standalone:!0,features:[et,xe],decls:11,vars:9,consts:[[1,"flex","h-full","w-full","flex-col","text-[10px]","page-wrapper","p-relative"],["class","flex flex-row text-xl fixed-header",4,"ngIf"],["class","flex justify-center p-3",4,"ngIf"],["class","flex flex-row justify-around p-3",4,"ngIf"],["class","flex flex-col items-center pb-3 text-3xl header",4,"ngIf"],["class","flex flex-col items-center pb-3 text-2xl header",4,"ngIf"],[4,"ngIf"],["class","flex flex-col items-center justify-center footer",4,"ngIf"],[1,"flex","flex-row","text-xl","fixed-header"],[3,"nxtTranslate"],[1,"flex","justify-center","p-3"],[1,"flex","flex-col","items-center","justify-center"],["src","../../../../assets/logo/logo_black.svg",2,"width","6cm"],[1,"mt-1","flex","flex-row","logo-text"],[1,"flex","flex-row"],[1,"gold"],["class","flex flex-row",4,"ngIf"],[1,"flex","flex-row","justify-around","p-3"],[1,"flex","w-full","grow","flex-col","items-center","justify-center",2,"border","0px solid red"],["src","../../../../assets/logo/logo_black.svg",2,"width","8cm"],[1,"mt-1","flex","w-full","flex-col","items-center","logo-text-left","text-[20px]"],[1,"flex","justify-end","pt-8"],[1,"flex","items-center","justify-center",2,"border","1px dotted black","width","6cm","height","8.6cm"],[1,"flex","flex-col","items-center","pb-3","text-3xl","header"],[1,"flex","flex-col","items-center","pb-3","text-2xl","header"],[1,"center",3,"nxtTranslate"],["titleText","DEINE DATEN",3,"lang"],[1,"flex","w-full","flex-row","gap-3"],[1,"flex","w-full","flex-col"],[1,"flex","w-full","text-2xl",2,"border-bottom","1px solid black"],[1,"flex","text-[9px]",3,"nxtTranslate"],["titleText","ANAMNESE",3,"lang"],[1,"flex","w-1/2","flex-col"],["text","Ich habe in den letzten 24 Std. Alkohol zu mir genommen","textEn","I have consumed alcohol in the last 24 hours",3,"lang"],["text","Ich habe Hautkrankheiten","textEn","I have skin diseases",3,"lang"],["text","Ich habe Allergien oder \xDCberempfindlichkeitsreaktionen?<br/>z.B.: Pflaster, Medikamente, Nickel\u2026","textEn","I have allergies or hypersensitivity reactions? e.g.: plasters, medicines, nickel\u2026",3,"lang"],["text","Ich habe Kreislaufprobleme","textEn","I have circulatory problems",3,"lang"],["text","Ich habe zu hohen oder zu niedrigen Blutdruck","textEn","My blood pressure is too high or too low",3,"lang"],["text","Ich nehme blutverd\xFCnnende Medikamente","textEn","I take blood thinning medication",3,"lang"],["text","Ich bin Bluter oder Diabetiker","textEn","Am I a hemophiliac or diabetic",3,"lang"],["text","Ich bin Epileptiker oder habe andere Anf\xE4lle","textEn","I am epileptic or have other seizures",3,"lang"],["text","Ich habe eine Hepatitis A oder B Infektion","textEn","I have a hepatitis A or B infection",3,"lang"],["text","Ich habe eine Hepatitis C, HIV oder EbV Infektion","textEn","I have hepatitis C, HIV or EbV infection",3,"lang"],["text","Nur bei Intimpiercing: Ich leide unter einer Geschlechtskrankheit","textEn","Only for genital piercing: I suffer from a sexually transmitted disease",3,"lang"],["text","Ich bin schwanger oder stille aktuell","textEn","I am pregnant or currently breastfeeding",3,"lang"],["titleText","EINWILLIGUNG",3,"lang"],[1,"pb-1",3,"nxtTranslate"],[1,"pt-2"],[1,"mt-12","w-2/3",2,"border-top","1px solid black",3,"nxtTranslate"],[1,"pt-4"],["text","Ich best\xE4tige hiermit, dass ich vollj\xE4hrig bin bzw. ein/e Erziehungsberechtigte/r anwesend ist und vor der Unterzeichnung dieser Erkl\xE4rung in verst\xE4ndlicher Art und Weise aufgekl\xE4rt wurde. Diese Aufkl\xE4rung bezog sich auf die beim Piercen verbundenen Risiken und m\xF6glichen Komplikationen, \xFCber die Art und Weise der Durchf\xFChrung der Anbringung des Schmucks und des Piercingvorgangs sowie \xFCber die Tatsache, dass dies mit der Verursachung von Schmerzen verbunden sein kann.",3,"lang","checked"],["text","Alle meine Fragen wurden vollst\xE4ndig beantwortet. Ich hatte ausreichend Zeit und Gelegenheit, meine Entscheidung zu f\xE4llen.",3,"lang","checked"],["text"," Es ist mir bewusst, dass es trotz aller hygienischer Umst\xE4nde zu Komplikationen kommen kann. \xDCber diese Komplikationen wurde ich ausreichend aufgekl\xE4rt.",3,"lang","checked"],["text","Eine Pflegeanleitung wurde mir ausgeh\xE4ndigt.",3,"lang","checked"],["text","Ich stehe nicht unter dem Einfluss von Drogen, Alkohol oder Medikamenten und bin im vollen Besitz meiner geistigen und k\xF6rperlichen Kr\xE4fte.",3,"lang","checked"],["text","Der Heilungserfolg des Piercings h\xE4ngt in erster Linie von der eigenen Nachbehandlung ab.",3,"lang","checked"],["text","Ich bin auf die Aufkl\xE4rung zur Einverst\xE4ndniserkl\xE4rung, Datenschutzbestimmungen und AGB hingewiesen worden.",3,"lang","checked"],["titleText","M\xD6GLICHE KOMPLIKATIONEN",1,"mt-4",3,"lang"],["text","Ich wurde dar\xFCber aufgekl\xE4rt, dass es trotz steriler Arbeitsweise zu Komplikationen kommen kann.",3,"lang","checked"],["titleText","VERTRAGSPARTNER","class","mt-4",4,"ngIf"],["titleText","VERTRAGSPARTNER",1,"mt-4"],[1,"pb-2",3,"nxtTranslate"],[1,"p-6","text-[14px]",3,"nxtTranslate"],["titleText","ERZIEHUNGSBERECHTIGTE DATEN",3,"lang"],[1,"flex","w-full","flex-row"],[1,"flex","w-full","flex-col","pl-5"],[1,"flex","flex-col","items-center","justify-center","footer"],[1,"mb-5","flex","flex-row","items-end"],[1,"flex","flex-col"],[1,"text-sm",2,"border-bottom","1px solid black"],[1,"text-sm",2,"border-bottom","1px solid black","width","4cm"],[1,"ml-2","flex","flex-col"],[2,"border-bottom","1px solid black","width","7cm"],["src","../../../assets/images/sign-here-2.png",2,"width","20px"],[3,"nxtTranslate","innerHTML"],[1,"flex","w-full","flex-row","justify-end"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,CQi,5,3,"div",1)(2,bQi,20,6,"div",2)(3,SQi,18,6,"div",3)(4,TQi,3,1,"div",4)(5,DQi,5,1,"div",5)(6,EQi,50,20,"div",6)(7,kQi,54,35,"div",6)(8,IQi,34,7,"div",6)(9,RQi,16,6,"div",7),p(),y(10," ```\n")),r&2&&(g(),b("ngIf",s.pageCountCurrent>0&&s.pageCountCurrent<=s.pageCountTotal),g(),b("ngIf",s.pageCountCurrent>1),g(),b("ngIf",s.pageCountCurrent===1),g(),b("ngIf",s.pageCountCurrent>0&&s.pageCountCurrent<=s.pageCountTotal),g(),b("ngIf",s.pageCountCurrent===3),g(),b("ngIf",s.pageCountCurrent===1),g(),b("ngIf",s.pageCountCurrent===2),g(),b("ngIf",s.pageCountCurrent===3),g(),b("ngIf",s.signatureName))},dependencies:[Ct,_S,Fse,Q6],styles:["@page{size:A4;margin:1cm}[_nghost-%COMP%]{font-family:Open Sans,sans-serif;-webkit-print-color-adjust:exact}[_nghost-%COMP%]     .mini-info-bar{display:none!important}.page-wrapper[_ngcontent-%COMP%]{padding:0}.footer[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:0}.fixed-header[_ngcontent-%COMP%]{font-weight:600;font-family:Montserrat,serif;color:#b7860f;position:fixed;top:0;right:0}.header[_ngcontent-%COMP%]{font-weight:800;font-family:Montserrat,serif;color:#b7860f}.logo-text[_ngcontent-%COMP%]{padding-top:5px;font-weight:600;font-family:Montserrat,serif;border-bottom:1px solid #b7860f}.logo-text-left[_ngcontent-%COMP%]{padding-top:5px;font-weight:600;font-family:Montserrat,serif}.info-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:baseline;padding-right:8px}.info-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:5px}.info-table-small[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:baseline;padding-right:4px}.info-table-small[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:3px}.anamnese-table[_ngcontent-%COMP%]{border-collapse:collapse}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid black;padding:3px 6px;font-size:10px}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .small-english[_ngcontent-%COMP%]{font-size:8px}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{line-height:1.2}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .small-english[_ngcontent-%COMP%]{color:#545454}"]});let t=e;return t})()});function FQi(t,e){if(t&1&&(h(0,"div",10)(1,"div",6)(2,"div",11),y(3,"SEITE"),p(),h(4,"div"),y(5),p()()()),t&2){let n=w();g(2),b("nxtTranslate",n.lang),g(3),Ke("\xA0",n.pageCountCurrent+" / "+n.pageCountTotal,"")}}function LQi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",12)(2,"div",13)(3,"table",14)(4,"tr")(5,"td"),y(6,"\u30FB"),p(),h(7,"td",11),y(8,"Vermeide unn\xF6tiges Ber\xFChren des neuen Piercings, um die Keimbelastung zu reduzieren."),p()(),h(9,"tr")(10,"td"),y(11,"\u30FB"),p(),h(12,"td",11),y(13,"Wasche und trockne deine H\xE4nde immer gr\xFCndlich, bevor du dein neues Piercing anfasst oder ziehe beim Reinigen Latex-/Nitrilhandschuhe an. "),p()(),h(14,"tr")(15,"td"),y(16,"\u30FB"),p(),h(17,"td",11),y(18,"Zum desinfizieren deines Piercings verwendest du ein alkoholfreies Desinfektionsmittel. Dies spr\xFChst du zwei mal am Tag auf dein Piercing "),p()(),h(19,"tr")(20,"td"),y(21,"\u30FB"),p(),h(22,"td",11),y(23,"Zur Reinigung von Mundpiercings solltest du eine milde Mundsp\xFClung verwenden, z.B. Dontodent bei DM "),p()(),h(24,"tr")(25,"td"),y(26,"\u30FB"),p(),h(27,"td",11),y(28,"Vermeide es in den ersten 48 Stunden Alkohol zu trinken, da es die Blutung f\xF6rdert und Schwellungen verst\xE4rken kann. "),p()(),h(29,"tr")(30,"td"),y(31,"\u30FB"),p(),h(32,"td",11),y(33,"Bei Mundpiercings kann Rauchen den Heilungsprozess verz\xF6gern. Wenn m\xF6glich, meide das Rauchen bis zu zwei Wochen "),p()(),h(34,"tr")(35,"td"),y(36,"\u30FB"),p(),h(37,"td",11),y(38,"Vermeide es innerhalb der ersten vier Wochen auf die Sonnenbank, ins Schwimmbad und in die Sauna zu gehen. Nutze ebenfalls keine Br\xE4unungscremes und \xE4hnliches. "),p()()()()(),ee(39,"br")(40,"br"),h(41,"nxt-declarations-of-consent-section",15)(42,"div",16)(43,"div",17),y(44,"Ohrl\xE4ppchen-Piercings"),p(),h(45,"table",14)(46,"tr")(47,"td"),y(48,"\u30FB"),p(),h(49,"td",11),y(50,"Lobes brauchen in der Regel etwa 4-6 Wochen, um zu heilen. "),p()(),h(51,"tr")(52,"td"),y(53,"\u30FB"),p(),h(54,"td",11),y(55,"Zum desinfizieren deines Piercings verwendest du ein alkoholfreies Desinfektionsmittel. Dies spr\xFChst du zwei mal am Tag auf dein Piercing. Das Piercing solltest du weder bewegen, drehen noch heraus nehmen. "),p()()()(),h(56,"div",16)(57,"div",18)(58,"div",11),y(59,"Ohrknorpel Piercings"),p(),h(60,"p",11),y(61,"Tragus | Antitragus | Turm | Muschel | Daith | Snug | Industrial |Helix"),p()(),h(62,"table",14)(63,"tr")(64,"td"),y(65,"\u30FB"),p(),h(66,"td",11),y(67,"Bei Knorpelpiercings kann die Heilung 3-6 Monate oder l\xE4nger dauern. "),p()(),h(68,"tr")(69,"td"),y(70,"\u30FB"),p(),h(71,"td",11),y(72,"Zum desinfizieren deines Piercings verwendest du ein alkoholfreies Desinfektionsmittel. Dies spr\xFChst du zwei mal am Tag auf dein Piercing. Das Piercing solltest du weder bewegen, drehen noch heraus nehmen. "),p()(),h(73,"tr")(74,"td"),y(75,"\u30FB"),p(),h(76,"td",11),y(77,"Halte potentiell sch\xE4dliche Gegenst\xE4nde von deinem Piercing fern, pass beim Haare b\xFCrsten auf es nicht zu ber\xFChren, nutze wenn m\xF6glich kein Haarspray in der N\xE4he des Piercings, trage keine Kopfh\xF6rer wenn sie dein Piercing ber\xFChren k\xF6nnten, etc. "),p()()()()()()),t&2){let n=w();g(),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(4),b("lang",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang)}}function OQi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",15)(2,"div",16)(3,"div",18)(4,"div",11),y(5,"Surface-Piercings"),p(),h(6,"p",11),y(7,"Nape (Nacken) | H\xFCften | Handgelenke | Dekolletee | Dermal Anchor"),p()(),h(8,"table",14)(9,"tr")(10,"td"),y(11,"\u30FB"),p(),h(12,"td",11),y(13,"Oberfl\xE4chenpiercings sind in der Regel keine permanenten Piercings. Sie halten ca. zwischen 9 Monaten - 2 Jahren und brauchen etwa 4-6 Monate, um zu heilen. "),p()(),h(14,"tr")(15,"td"),y(16,"\u30FB"),p(),h(17,"td",11),y(18,"Zum desinfizieren deines Piercings verwendest du ein alkoholfreies Desinfektionsmittel. Dies spr\xFChst du zwei mal am Tag auf dein Piercing. Das Piercing solltest du weder bewegen, drehen noch heraus nehmen. "),p()()()(),h(19,"div",16)(20,"div",18)(21,"div",11),y(22,"Mund-Piercings"),p(),h(23,"p",11),y(24,"Zunge | Zungenb\xE4ndchen | Labret (Lippe) | Madonna | Medusa | Wange |Smiley"),p()(),h(25,"table",14)(26,"tr")(27,"td"),y(28,"\u30FB"),p(),h(29,"td",11),y(30,"Die meisten Mundpiercings brauchen 2-3 Monate, um vollst\xE4ndig zu heilen und schwellen innerhalb der ersten Stunden nach Stechen des Piercings an. Bei Wangenpiercings kann die Heilung etwas l\xE4nger dauern, da dieser Gewebebereich dicker ist diese brauchen ca. 10-12 Wochen, um vollst\xE4ndig zu heilen. "),p()(),h(31,"tr")(32,"td"),y(33,"\u30FB"),p(),h(34,"td",11),y(35,"Bei der Pflege eines Mundpiercings wird empfohlen, eine milde, alkoholfreie Mundsp\xFClung als Hauptbestandteil der Nachsorge zu verwenden. Mit dieser solltest du morgens und Abends, sowie nach jedem Essen oder Trinken den Mund aussp\xFClen. "),p()(),h(36,"tr")(37,"td"),y(38,"\u30FB"),p(),h(39,"td",11),y(40,"Die ersten Tage nach dem Stechen solltest du auf Milchprodukte und scharfes Essen verzichten. Achte darauf, dass du nur essen zu dir nimmst, welches nicht am Piercing h\xE4ngen bleiben kann (z.B. lieber Penne anstatt Spaghetti). Am besten nimmst du m\xF6glichst weiche Kost zu dir. Nach dem Essen den Mundraum immer mit einer antibakteriellen L\xF6sung s\xE4ubern. "),p()(),h(41,"tr")(42,"td"),y(43,"\u30FB"),p(),h(44,"td",11),y(45,"Es wird empfohlen, nach einem Oralpiercing 10 Tage lang keinen Oralsex auszu\xFCben, da der Austausch von K\xF6rperfl\xFCssigkeiten das Infektionsrisiko f\xFCr dich und deinen Partner erh\xF6hen kann. "),p()()()(),h(46,"div",16)(47,"div",18)(48,"div",11),y(49,"Gesichts-Piercings"),p(),h(50,"p",11),y(51,"Augenbraue | Br\xFCcke | Nostril | Septum"),p()(),h(52,"table",14)(53,"tr")(54,"td"),y(55,"\u30FB"),p(),h(56,"td",11),y(57,"Die Heilung eines Nostrils (Nasenfl\xFCgelpiercings) dauert etwa 2-3 Monate. F\xFCr Nasenfl\xFCgelpiercings ist es wichtig, die Innenseite des Piercings (d. h. das Nasenloch) sowie die Au\xDFenseite zu reinigen, da sich Bakterien in deinem Nasenloch ansammeln k\xF6nnen. Sei so vorsichtig wie m\xF6glich, wenn du dir die Nase putzt. "),p()(),h(58,"tr")(59,"td"),y(60,"\u30FB"),p(),h(61,"td",11),y(62,"Bei Septum-Piercings dauert die Heilung zwischen 3-6 Monate. "),p()(),h(63,"tr")(64,"td"),y(65,"\u30FB"),p(),h(66,"td",11),y(67,"Bei Augenbrauen- und Bridge Piercings dauert die Heilung zwischen 2-3 Monate. "),p()(),h(68,"tr")(69,"td"),y(70,"\u30FB"),p(),h(71,"td",11),y(72,"Zum desinfizieren deines Piercings verwendest du ein alkoholfreies Desinfektionsmittel. Dies spr\xFChst du zwei mal am Tag auf dein Piercing. Das Piercing solltest du weder bewegen, drehen noch heraus nehmen. "),p()()()()()()),t&2){let n=w();g(),b("lang",n.lang),g(3),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang)}}function NQi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",15)(2,"div",16)(3,"div",18)(4,"div",11),y(5,"Torso-Piercings"),p(),h(6,"p",11),y(7,"Nabel (Bauchnabel) | Nippel"),p()(),h(8,"table",14)(9,"tr")(10,"td"),y(11,"\u30FB"),p(),h(12,"td",11),y(13,"Ein Bauchnabelpiercing braucht etwa 4-6 Monate zum Abheilen. Vermeide es enge oder Highwaist Hosen zu tragen, damit kein Druck auf den Bauchnabel ausge\xFCbt wird. "),p()(),h(14,"tr")(15,"td"),y(16,"\u30FB"),p(),h(17,"td",11),y(18,"Die Heilung von Brustwarzenpiercings kann je nach Art der Wundheilung etwa 3-6 Monate dauern. Deine Oberk\xF6rperbekleidung sollte m\xF6glichst locker sitzen, damit kein Druck auf die Piercings ausge\xFCbt wird. "),p()(),h(19,"tr")(20,"td"),y(21,"\u30FB"),p(),h(22,"td",11),y(23,"Zum desinfizieren deines Piercings verwendest du ein alkoholfreies Desinfektionsmittel. Dies spr\xFChst du zwei mal am Tag auf dein Piercing. Das Piercing solltest du weder bewegen, drehen noch heraus nehmen. "),p()()()(),h(24,"div",16)(25,"div",18)(26,"div",11),y(27,"Intimpiercings im Schleimhautbereich"),p(),h(28,"p",11),y(29,"Christina / KVV / KVH"),p()(),h(30,"table",14)(31,"tr")(32,"td"),y(33,"\u30FB"),p(),h(34,"td",11),y(35,"Die Heilung bei einem Intimpiercing im Schleimhautbereich dauert etwa 4-8 Wochen. "),p()(),h(36,"tr")(37,"td"),y(38,"\u30FB"),p(),h(39,"td",11),y(40,"Zum desinfizieren benutzt du am besten Eigenurin."),p()(),h(41,"tr")(42,"td"),y(43,"\u30FB"),p(),h(44,"td",11),y(45,"Unn\xF6tiger Druck, sowie enge Hosen sollten w\xE4hrend des Heilungsphase vermieden werden."),p()(),h(46,"tr")(47,"td"),y(48,"\u30FB"),p(),h(49,"td",11),y(50,"Fremde K\xF6rperfl\xFCssigkeiten sollten die ersten 14 Tage vermieden werden"),p()(),h(51,"tr")(52,"td"),y(53,"\u30FB"),p(),h(54,"td",11),y(55,"Bewege das Piercing w\xE4hrend der Heilungsphase nicht unn\xF6tig und entferne es nicht."),p()()()()()()),t&2){let n=w();g(),b("lang",n.lang),g(3),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(4),b("nxtTranslate",n.lang),g(2),b("nxtTranslate",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang)}}var o_t,a_t=Q(()=>{Gi();Ul();aj();ri();OM();me();Cs();ma();o_t=(()=>{let e=class e extends bt{constructor(i,r){if(super(),this.configService=i,this.route=r,this.pageCountCurrent=1,this.pageCountTotal=3,this.lang="de",this.route.snapshot.queryParams.page&&(this.pageCountCurrent=parseInt(this.route.snapshot.queryParams.page,10),this.lang=this.route.snapshot.queryParams.lang||"de"),this.route.snapshot.queryParams.data){let s=Qn.parse(this.route.snapshot.queryParams.data);this.pageCountCurrent=s.page,this.lang=s.lang||"de"}}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(Xi),R(gs))},e.\u0275cmp=_e({type:e,selectors:[["nxt-after-care-instruction-piercing"]],standalone:!0,features:[et,xe],decls:25,vars:9,consts:[[1,"flex","flex-col","w-full","h-full","text-[10px]","page-wrapper","p-relative"],["class","fixed-header text-xl",4,"ngIf"],[1,"flex","justify-center","p-3"],[1,"flex","flex-col","justify-center","items-center"],["src","../../../../assets/logo/logo_black.svg",2,"width","6cm"],[1,"flex","flex-row","mt-1","logo-text"],[1,"flex","flex-row"],[1,"gold"],[1,"flex","text-3xl","flex-col","items-center","pb-3","header"],[1,"text-center",3,"nxtTranslate"],[1,"fixed-header","text-xl"],[3,"nxtTranslate"],["titleText","NACHBEHANDLUNG KURZ UND KNAPP",3,"lang"],[1,"py-3","px-10"],[1,"w-full","info-table"],["titleText","EMPFOHLENE HEILZEITEN & TIPPS F\xDCR SCHNELLERE HEILUNG",3,"lang"],[1,"py-2","px-10"],[1,"title-2",3,"nxtTranslate"],[1,"title-2"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,FQi,6,2,"div",1),h(2,"div",2)(3,"div",3)(4,"div"),ee(5,"img",4),p(),h(6,"div",5)(7,"div"),y(8),p(),h(9,"div",6)(10,"div",7),y(11,"\u30FB"),p(),y(12),p(),h(13,"div",6)(14,"div",7),y(15,"\u30FB"),p(),y(16),p()()()(),h(17,"div",8)(18,"div",9),y(19,"PFLEGEHINWEISE PIERCING"),p()(),ee(20,"br")(21,"br"),W(22,LQi,78,17,"div")(23,OQi,73,17,"div")(24,NQi,56,13,"div"),p()),r&2&&(g(),b("ngIf",s.pageCountCurrent>0&&s.pageCountCurrent<=s.pageCountTotal),g(7),Ke("NXT-LVL.INK ",s.configService.config.value.studioName,""),g(4),Ke(" ",s.configService.config.value.invoiceData.fromStreet," "),g(4),cn(" ",s.configService.config.value.invoiceData.fromPostalCode," ",s.configService.config.value.invoiceData.fromCity," "),g(2),b("nxtTranslate",s.lang),g(4),Je(s.pageCountCurrent===1?22:-1),g(),Je(s.pageCountCurrent===2?23:-1),g(),Je(s.pageCountCurrent===3?24:-1))},dependencies:[Ct,_S,Q6],styles:["@page{size:A4;margin:1cm}[_nghost-%COMP%]{font-family:Open Sans,sans-serif;-webkit-print-color-adjust:exact}[_nghost-%COMP%]     .mini-info-bar{display:none!important}.page-wrapper[_ngcontent-%COMP%]{padding:0}.footer[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:0}.fixed-header[_ngcontent-%COMP%]{font-weight:600;font-family:Montserrat,serif;color:#b7860f;position:fixed;top:0;right:0}.header[_ngcontent-%COMP%]{font-weight:800;font-family:Montserrat,serif;color:#b7860f}.logo-text[_ngcontent-%COMP%]{padding-top:5px;font-weight:600;font-family:Montserrat,serif;border-bottom:1px solid #b7860f}.logo-text-left[_ngcontent-%COMP%]{padding-top:5px;font-weight:600;font-family:Montserrat,serif}.title-2[_ngcontent-%COMP%]{display:flex;flex-direction:column;font-size:16px;font-weight:700}.title-2[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:400;font-size:14px}.info-table[_ngcontent-%COMP%]{font-size:12px}.info-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:baseline;padding-right:8px;width:fit-content}.info-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:5px;width:100%}.info-table-small[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:baseline;padding-right:4px}.info-table-small[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:3px}.anamnese-table[_ngcontent-%COMP%]{border-collapse:collapse}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid black;padding:3px 6px;font-size:10px}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .small-english[_ngcontent-%COMP%]{font-size:8px}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{line-height:1.2}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .small-english[_ngcontent-%COMP%]{color:#545454}"]});let t=e;return t})()});function VQi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p(),h(3,"td",5),y(4),p()()),t&2){let n=e.$implicit;g(2),ye(n.name),g(2),ye(n.amount)}}function BQi(t,e){if(t&1&&(h(0,"div",1)(1,"div",2),y(2),Ce(3,"uppercase"),h(4,"small"),y(5),Ce(6,"nxtDate"),p()(),h(7,"table",3)(8,"tr")(9,"th"),y(10,"Bezeichnung"),p(),h(11,"th"),y(12,"Menge"),p()(),W(13,VQi,5,2,"tr",4),p()()),t&2){let n=w();g(2),Ke("",tt(3,3,n.data.studio)," "),g(3),ye(Nt(6,5,n.data.date,"EEEE dd.MM.yyyy")),g(8),b("ngForOf",n.data.lines)}}var l_t,c_t=Q(()=>{Ul();go();ri();me();ma();l_t=(()=>{let e=class e{constructor(i){this.route=i,this.route.snapshot.queryParams.data&&(this.data=Qn.parse(this.route.snapshot.queryParams.data))}ngAfterViewInit(){window.print()}};e.\u0275fac=function(r){return new(r||e)(R(gs))},e.\u0275cmp=_e({type:e,selectors:[["nxt-inventory-list-print"]],standalone:!0,features:[xe],decls:1,vars:1,consts:[["class","w-full h-100 p-3",4,"ngIf"],[1,"w-full","h-100","p-3"],[1,"p-3",2,"font-size","150%","text-align","center","border","1px solid black"],[1,"w-full"],[4,"ngFor","ngForOf"],[2,"text-align","center"]],template:function(r,s){r&1&&W(0,BQi,14,8,"div",0),r&2&&b("ngIf",s.data)},dependencies:[Ct,Hi,V_,Hn],styles:["table[_ngcontent-%COMP%]{width:90%;border-collapse:collapse}table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{border:1px solid black;padding:5px}"]});let t=e;return t})()});function zQi(t,e){if(t&1&&(h(0,"div",2),ee(1,"nxt-datagrid",3)(2,"nxt-datagrid"),p()),t&2){let n=w();g(),b("columnDefs",n.outgoingsColDefs)("rowData",n.data.notAssignedOutgoings)("autoSizeColumnOnResize",!0)}}var d_t,u_t=Q(()=>{Gi();Qo();Pa();ri();me();yi();d_t=(()=>{let e=class e extends bt{constructor(i,r){super(),this.cdRef=i,this.socketService=r,this.outgoingsColDefs=[{headerName:"",checkboxSelection:!0},{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDateTime},{headerName:"Text",field:"description",nxtFieldType:Ee.Text},{headerName:"Ersteller",field:"createdBy",nxtFieldType:Ee.Text},{headerName:"Betrag",field:"value",nxtFieldType:Ee.Money}]}ngOnInit(){this.load()}nxtOnDestroy(){}load(){return O(this,null,function*(){this.data=yield this.socketService.getNotAssignedBankTransfer(),this.data.notAssignedOutgoings.push(...this.data.notAssignedOutgoings),this.cdRef.detectChanges()})}};e.\u0275fac=function(r){return new(r||e)(R(Kt),R(lt))},e.\u0275cmp=_e({type:e,selectors:[["nxt-not-assigned-bank-transactions"]],standalone:!0,features:[et,xe],decls:4,vars:1,consts:[[1,"flex","h-full","flex-col","border-1-red"],["class","flex flex-row h-full",4,"ngIf"],[1,"flex","flex-row","h-full"],["rowSelection","single",3,"columnDefs","rowData","autoSizeColumnOnResize"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div"),y(2," title "),p(),W(3,zQi,3,3,"div",1),p()),r&2&&(g(3),b("ngIf",s.data))},dependencies:[Ct,dr],changeDetection:0});let t=e;return t})()});var NM,Lse=Q(()=>{NM=(()=>{let e=class e{static init(){e.texts.ES={},e.texts.ES.INVOICE_INVOICE="Factura",e.texts.ES.INVOICE_INVOICE_NO="Nr Factura",e.texts.ES.INVOICE_CREDIT="Abono",e.texts.ES.INVOICE_CALC="Liquidaci\xF3n",e.texts.ES.INVOICE_INVOICE_NO="Nr Factura",e.texts.ES.INVOICE_CUSTOMER_NO="Nr Cliente",e.texts.ES.INVOICE_ID_NUMBER="DNI",e.texts.ES.INVOICE_DATE="Fecha",e.texts.ES.INVOICE_PAGE="Pagina",e.texts.ES.INVOICE_POS_DESCRIPTION="Descripcion",e.texts.ES.INVOICE_POS_AMOUNT="Cantidad",e.texts.ES.INVOICE_POS_UNIT_PRICE="Unidad",e.texts.ES.INVOICE_POS_TOTAL="Total",e.texts.ES.INVOICE_TOTAL="Total",e.texts.ES.INVOICE_VAT_INFO="En el Total de {{totalGross}} (Netto: {{totalNet}}) esta incluido el IVA {{vatPercentage}} % ({{vatValue}})",e.texts.ES.INVOICE_GET_IN_CASH="recibido en efectivo",e.texts.ES.INVOICE_VAT_NO="CIF",e.texts.ES.INVOICE_TAX_NO="CIF Intracomunitario",e.texts.ES.INVOICE_POS_SPACE_RENTAL="Alquiler de espacio",e.texts.DE={},e.texts.DE.INVOICE_INVOICE="Rechnung",e.texts.DE.INVOICE_ID_NUMBER="Ausweisnummer",e.texts.DE.INVOICE_CREDIT="Gutschrift",e.texts.DE.INVOICE_CALC="Abrechnung",e.texts.DE.INVOICE_INVOICE_NO="Rechnung-Nr.",e.texts.DE.INVOICE_CUSTOMER_NO="Kundennr.",e.texts.DE.INVOICE_DATE="Datum",e.texts.DE.INVOICE_PAGE="Seite",e.texts.DE.INVOICE_POS_DESCRIPTION="Bezeichnung",e.texts.DE.INVOICE_POS_AMOUNT="Menge",e.texts.DE.INVOICE_POS_UNIT_PRICE="Einzel",e.texts.DE.INVOICE_POS_TOTAL="Gesamt",e.texts.DE.INVOICE_POS_SPACE_RENTAL="Platzmiete",e.texts.DE.INVOICE_TOTAL="Gesamtbetrag",e.texts.DE.INVOICE_VAT_INFO="* Im Gesamtbetrag von {{totalGross}} (Netto: {{totalNet}}) sind USt {{vatPercentage}} % ({{vatValue}}) enthalten.",e.texts.DE.INVOICE_GET_IN_CASH="in bar erhalten",e.texts.DE.INVOICE_VAT_NO="USt-IdNr.",e.texts.DE.INVOICE_TAX_NO="Steuernummer"}static getText(i,r,s){if(e.texts[r]||e.init(),!e.texts[r])throw Error('getTextLang missing lang "'+r+'"');if(typeof e.texts[r][i]>"u")throw Error('getTextLang missing key "'+i+'" in lang "'+r+'"');let o=e.texts[r][i];if(s)for(let a of Object.keys(s)){let l=new RegExp("{{"+a+"}}");o=o.replace(l,s[a])}return o}static test(){e.init();let i=e.getText("INVOICE_VAT_INFO","DE");console.log(i),console.log(i);let r=e.getText("INVOICE_VAT_INFO","ES",{totalGross:"500 \u20AC",totalNet:"30 \u20AC",vatPercentage:"5",vatValue:"4\u20AC"});console.log(r)}};e.texts={};let t=e;return t})()});var h_t,p_t=Q(()=>{Lse();me();od();h_t=(()=>{let e=class e{constructor(i){this.sanitizer=i}transform(i,r,s){return NM.getText(i,r,s)}};e.\u0275fac=function(r){return new(r||e)(R(Uo,16))},e.\u0275pipe=kr({name:"trans",type:e,pure:!0,standalone:!0});let t=e;return t})()});function WQi(t,e){if(t&1&&(h(0,"div",21),y(1),p()),t&2){let n=w(2);g(),ye(n.errorText)}}function UQi(t,e){if(t&1&&(h(0,"div",22)(1,"div")(2,"div",23),y(3),p(),h(4,"div",24),y(5),ee(6,"br"),y(7),ee(8,"br"),y(9),ee(10,"br"),p()()()),t&2){let n=w(2);g(3),ye(n.getFrom()),g(2),cn(" ",n.getSalution(n.data.invoiceTo.salutation)," ",n.data.invoiceTo.name,""),g(2),Ke(" ",n.data.invoiceTo.street,""),g(2),vv(" ",n.data.invoiceTo.countryCode,"-",n.data.invoiceTo.postalCode," ",n.data.invoiceTo.city,"")}}function jQi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),Ce(3,"trans"),p(),h(4,"td"),y(5),p()()),t&2){let n=w(2);g(2),Ke("",Nt(3,2,"INVOICE_INVOICE_NO",n.lang),"\xA0\xA0\xA0"),g(3),ye(n.data.invoiceNumber)}}function $Qi(t,e){if(t&1&&(h(0,"tr",25)(1,"td"),y(2),Ce(3,"trans"),p(),h(4,"td"),y(5),p()()),t&2){let n=w(2);g(2),ye(Nt(3,2,"INVOICE_ID_NUMBER",n.lang)),g(3),ye(n.data.invoiceTo.idNumber)}}function KQi(t,e){if(t&1&&(h(0,"tr")(1,"td"),y(2),p()()),t&2){let n=w(3);g(2),ye(n.configService.config.value.invoiceData.fromCompany2)}}function YQi(t,e){if(t&1&&(h(0,"div",26)(1,"table",27)(2,"tr")(3,"td",28),y(4),p()(),W(5,KQi,3,1,"tr",12),h(6,"tr")(7,"td"),y(8),p()(),h(9,"tr")(10,"td"),y(11),p()()()()),t&2){let n=w(2);g(4),ye(n.configService.config.value.invoiceData.fromCompany),g(),b("ngIf",n.configService.config.value.invoiceData.fromCompany2),g(3),ye(n.configService.config.value.invoiceData.fromStreet),g(3),vv("",n.configService.config.value.invoiceData.fromCountryCode," -",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity," ")}}function qQi(t,e){if(t&1&&(h(0,"tr")(1,"td",29),y(2),p(),ee(3,"td",30),Ce(4,"safeHtml"),h(5,"td",31),y(6),p(),h(7,"td",32),y(8),Ce(9,"money"),p(),h(10,"td",32),y(11),Ce(12,"money"),p()()),t&2){let n=e.$implicit;g(2),ye(n.posNumber),g(),b("innerHTML",tt(4,5,n.name),Pi),g(3),ye(n.amount),g(2),ye(tt(9,7,n.unitPrice)),g(3),ye(tt(12,9,n.amount*n.unitPrice))}}function ZQi(t,e){t&1&&(vs(0),y(1,"*"),ys())}function XQi(t,e){if(t&1&&(h(0,"tr")(1,"td",33)(2,"div"),y(3),Ce(4,"trans"),W(5,ZQi,2,0,"ng-container",12),p()(),h(6,"td",34),y(7),Ce(8,"money"),p()()),t&2){let n=w(2);g(3),Ke("",Nt(4,3,"INVOICE_TOTAL",n.lang)," "),g(2),b("ngIf",n.showTotalTaxInfo),g(2),ye(tt(8,6,n.data.invoiceValueTotal))}}function QQi(t,e){if(t&1&&(h(0,"div"),y(1),Ce(2,"trans"),p()),t&2){let n=w(3);g(),Ke(" ",Xf(2,1,"INVOICE_VAT_INFO",n.lang,n.vatInfoParams)," ")}}function JQi(t,e){if(t&1&&(h(0,"div",37)(1,"table")(2,"tr")(3,"td",38),y(4),Ce(5,"money"),Ce(6,"trans"),p(),ee(7,"td"),p(),h(8,"tr"),ee(9,"td"),h(10,"td",39),y(11),p()()()()),t&2){let n=w(3);g(4),cn("",tt(5,3,n.data.invoiceValueTotal)," ",Nt(6,5,"INVOICE_GET_IN_CASH",n.lang),""),g(7),ye(n.data.invoiceTo.name)}}function eJi(t,e){if(t&1&&(h(0,"div",35),W(1,QQi,3,5,"div",12)(2,JQi,12,8,"div",36),p()),t&2){let n=w(2);g(),b("ngIf",n.showTotalTaxInfo),g(),b("ngIf",n.showSigning)}}function tJi(t,e){if(t&1&&(y(0),Ce(1,"trans")),t&2){let n=w(2);cn(" ",Nt(1,2,"INVOICE_VAT_NO",n.lang),": ",n.configService.config.value.invoiceData.fromVATNumber," ")}}function iJi(t,e){if(t&1&&(y(0),Ce(1,"trans")),t&2){let n=w(2);cn(" ",Nt(1,2,"INVOICE_TAX_NO",n.lang),": ",n.configService.config.value.invoiceData.fromTaxId," ")}}function nJi(t,e){if(t&1&&(W(0,WQi,2,1,"div",1),h(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5),ee(5,"img",6),p(),W(6,UQi,11,7,"div",7),p(),h(7,"div",8)(8,"div",9)(9,"div",10),y(10),p(),ee(11,"br"),h(12,"table",11),W(13,jQi,6,5,"tr",12),h(14,"tr")(15,"td"),y(16),Ce(17,"trans"),p(),h(18,"td"),y(19),p()(),W(20,$Qi,6,5,"tr",13),h(21,"tr")(22,"td"),y(23),Ce(24,"trans"),p(),h(25,"td"),y(26),Ce(27,"nxtDate"),p()(),h(28,"tr")(29,"td"),y(30),Ce(31,"trans"),p(),h(32,"td"),y(33),p()()()(),W(34,YQi,12,6,"div",14),p()(),h(35,"div",15,0)(37,"table",16)(38,"tr")(39,"th"),y(40,"Pos."),p(),h(41,"th"),y(42),Ce(43,"trans"),p(),h(44,"th"),y(45),Ce(46,"trans"),p(),h(47,"th"),y(48),Ce(49,"trans"),p(),h(50,"th"),y(51),Ce(52,"trans"),p()(),W(53,qQi,13,11,"tr",17)(54,XQi,9,8,"tr",12),p(),W(55,eJi,3,2,"div",18),p(),h(56,"div",19)(57,"div"),y(58),ee(59,"br"),y(60),ee(61,"br"),y(62),p(),h(63,"div",20),W(64,tJi,2,5),ee(65,"br"),W(66,iJi,2,5),p()()()),t&2){let n=w();b("ngIf",n.errorText),g(2),b("ngStyle",sn(52,GQi,n.data.pageCountCurrent===1?"2cm":"0.5cm")),g(4),b("ngIf",n.data.pageCountCurrent===1),g(4),ye(n.data.invoiceTitle),g(3),b("ngIf",n.data.invoiceNumber),g(3),ye(Nt(17,28,"INVOICE_CUSTOMER_NO",n.lang)),g(3),ye(n.data.invoiceTo.customerNumber),g(),b("ngIf",n.data.invoiceTo.idNumber),g(3),ye(Nt(24,31,"INVOICE_DATE",n.lang)),g(3),ye(Nt(27,34,n.data.invoiceDate,n.lang==="DE"?"dd.MM.yyyy":"dd/MM/yyyy")),g(4),ye(Nt(31,37,"INVOICE_PAGE",n.lang)),g(3),cn("",n.data.pageCountCurrent,"/",n.data.pageCountTotal,""),g(),b("ngIf",n.data.pageCountCurrent===1),g(8),ye(Nt(43,40,"INVOICE_POS_DESCRIPTION",n.lang)),g(3),ye(Nt(46,43,"INVOICE_POS_AMOUNT",n.lang)),g(3),Ke("",Nt(49,46,"INVOICE_POS_UNIT_PRICE",n.lang)," \u20AC"),g(3),Ke("",Nt(52,49,"INVOICE_POS_TOTAL",n.lang)," \u20AC"),g(2),b("ngForOf",n.data.invoicePositions),g(),b("ngIf",n.data.pageCountCurrent===n.data.pageCountTotal),g(),b("ngIf",n.data.pageCountCurrent===n.data.pageCountTotal),g(3),Ke(" ",n.configService.config.value.invoiceData.fromCompany," "),g(2),Ke(" ",n.configService.config.value.invoiceData.fromStreet," "),g(2),vv(" ",n.configService.config.value.invoiceData.fromCountryCode," -",n.configService.config.value.invoiceData.fromPostalCode," ",n.configService.config.value.invoiceData.fromCity," "),g(2),Je(n.configService.config.value.invoiceData.fromVATNumber?64:-1),g(2),Je(n.configService.config.value.invoiceData.fromTaxId?66:-1)}}var HQi,GQi,m_t,f_t=Q(()=>{zn();Lse();p_t();Il();ha();Vt();An();ri();il();go();me();ma();yi();Cs();An();Vt();HQi=["overflowCheck"],GQi=t=>({marginBottom:t});m_t=(()=>{let e=class e{constructor(i,r,s){this.route=i,this.socketService=r,this.configService=s,this.lang="DE",this.errorText="",this.showSigning=!0,this.showTotalTaxInfo=!0,this.vatInfoParams={totalGross:"? \u20AC",vatPercentage:"99 %",vatValue:"? \u20AC",totalNet:"? \u20AC"},this.lang=this.configService.config.value.invoiceData.lang??"DE",window.setData=o=>{this.setData(o)}}ngOnInit(){return O(this,null,function*(){})}getNetto(){return this.data.invoiceValueTotalForTax/(this.configService.config.value.invoiceData.vatPercent/100+1)}getTax(){return this.data.invoiceValueTotalForTax-this.getNetto()}getFrom(){return this.configService.config.value.invoiceData.fromCompany}getSalution(i){if(this.lang==="ES"){if(i==="Herrn")return"Sr.";if(i==="Frau")return"Sra.";if(i==="Firma")return"Empresa"}return i}setData(i){this.data=i,this.data.invoiceTitle===NM.getText("INVOICE_INVOICE",this.lang)||this.data.invoiceTitle===NM.getText("INVOICE_CREDIT",this.lang)?(this.showTotalTaxInfo=!0,this.showSigning=!1):(this.showTotalTaxInfo=!1,this.showSigning=!0),this.data.invoiceDate<Ie.addDays(Date.now(),-7)&&(this.showSigning=!1),this.showTotalTaxInfo&&(this.vatInfoParams={totalGross:this.data.invoiceValueTotalForTax.toMoneyString(),totalNet:this.getNetto().toMoneyString(),vatPercentage:this.configService.config.value.invoiceData.vatPercent.toString(),vatValue:this.getTax().toMoneyString()})}};e.\u0275fac=function(r){return new(r||e)(R(gs),R(lt),R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-invoice-2-pdf"]],viewQuery:function(r,s){if(r&1&&ei(HQi,5),r&2){let o;Pt(o=Rt())&&(s.overflowCheck=o.first)}},standalone:!0,features:[xe],decls:1,vars:1,consts:[["overflowCheck",""],["class","error-modal",4,"ngIf"],["id","data",1,"flex","flex-col","fontsize5","wrapper","borders",2,"width","100%","height","100%","border","3px solid black"],[1,"flex","w-full","flex-row",2,"border","3px solid yellow",3,"ngStyle"],[1,"flex","grow","flex-col"],[1,"flex","grow"],["src","assets/logo/logo_black.svg","alt","",2,"width","6cm","height","fit-content"],["fxFlex","","class","borders","style","border: 3px solid red;",4,"ngIf"],[1,"flex","flex-col"],["fxFlex","","fxLayoutAlign","end end","fxLayout","column",1,"borders",2,"border","3px solid orange","width","100%"],[1,"fontsize2"],[1,"header-data-table"],[4,"ngIf"],["nxtPermission","IsMa",4,"ngIf"],["class","flex","style","border: 3px solid brown; margin-top: 0.5cm",4,"ngIf"],[1,"grow","o-hidden",2,"border","3px solid #2876ff"],[1,"pos-table"],[4,"ngFor","ngForOf"],["class","mt-4 flex w-full flex-col items-center","style","border:4px solid #ff5555",4,"ngIf"],[1,"flex","flex-row","justify-around",2,"font-size","85%","color","#3f3f3f"],[1,"flex","flex-col","justify-end"],[1,"error-modal"],["fxFlex","",1,"borders",2,"border","3px solid red"],[1,"address-from"],[1,"address-to","fontsize4"],["nxtPermission","IsMa"],[1,"flex",2,"border","3px solid brown","margin-top","0.5cm"],[1,"header-company-address-table"],[1,"no-wrap"],[1,"cell-align-right",2,"width","7%"],[2,"width","59%",3,"innerHTML"],[1,"cell-align-right",2,"width","10%"],[1,"cell-align-right",2,"width","12%"],["colspan","4"],[1,"cell-align-right"],[1,"mt-4","flex","w-full","flex-col","items-center",2,"border","4px solid #ff5555"],["class","w-fit pt-3 signing-field","style","border: 3px solid red; margin-top: 2cm",4,"ngIf"],[1,"w-fit","pt-3","signing-field",2,"border","3px solid red","margin-top","2cm"],[1,"no-wrap",2,"padding-right","0.7cm"],[2,"border-top","1px solid black","width","7cm"]],template:function(r,s){r&1&&W(0,nJi,67,54),r&2&&Je(s.data?0:-1)},dependencies:[Ct,rr,Dn,rs,At,Yt,oi,qi,Hi,Or,ks,h_t,Zs,Hn],styles:["@page{size:A4;margin:1.5cm 1.5cm .6cm}.borders[_ngcontent-%COMP%], .borders[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{border-width:0px!important}.error-modal[_ngcontent-%COMP%]{text-align:center;vertical-align:center;font-size:20px;background-color:#fff;position:fixed;height:100%;width:100%;inset:0}.fontsize1[_ngcontent-%COMP%]{font-size:28px}.fontsize2[_ngcontent-%COMP%]{font-size:24px}.fontsize3[_ngcontent-%COMP%]{font-size:20px}.fontsize4[_ngcontent-%COMP%]{font-size:16px}.fontsize5[_ngcontent-%COMP%]{font-size:14px}.fontsize6[_ngcontent-%COMP%]{font-size:10px}table[_ngcontent-%COMP%]{width:100%}.header-data-table[_ngcontent-%COMP%]{border-collapse:collapse}.header-data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 0}.header-data-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:nth-child(2){text-align:right}.header-company-address-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:1px 0;text-align:right}table[_ngcontent-%COMP%], th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{border-collapse:collapse}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:5px}.address-from[_ngcontent-%COMP%]{font-size:10px;margin-bottom:5px}.pos-table[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%], .pos-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{font-size:95%;border:1px solid black;border-collapse:collapse}.cell-align-right[_ngcontent-%COMP%]{text-align:right}.signing-field[_ngcontent-%COMP%]{position:fixed;bottom:3cm;right:3cm}"]});let t=e;return t})()});function sJi(t,e){if(t&1&&(h(0,"div",5),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w().$implicit;g(),ye(Nt(2,1,n.date,"EE dd.MM"))}}function oJi(t,e){if(t&1&&(h(0,"div",5),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w().$implicit;g(),ye(Nt(2,1,n.date,"EE dd.MM.yy"))}}function aJi(t,e){if(t&1&&(h(0,"div")(1,"div",10),y(2,"Piercing"),p(),h(3,"div"),y(4),Ce(5,"nxtDate"),p()()),t&2){let n=w().$implicit,i=w();g(4),ye(i.piercingCounts()[Nt(5,1,n.date,"yyyy-MM-dd")])}}function lJi(t,e){if(t&1&&(h(0,"div",12),y(1),Ce(2,"nxtDate"),p()),t&2){let n=w().$implicit,i=w();g(),ye(i.publicHolidays()[Nt(2,1,n.date,"yyyy-MM-dd")].name)}}function cJi(t,e){if(t&1){let n=re();h(0,"div",15),F("click",function(){let r=V(n).$implicit,s=w(2);return B(s.dailyNoteClicked.emit(r))}),y(1),p()}if(t&2){let n=e.$implicit;g(),Ke(" ",n.title," ")}}function dJi(t,e){if(t&1){let n=re();h(0,"div",2)(1,"div",3)(2,"div",4),F("click",function(){let r=V(n).$implicit,s=w();return B(s.dateHeaderClicked.emit(r.date.dateFormatDate()))}),W(3,sJi,3,4,"div",5),Ce(4,"nxtDate"),W(5,oJi,3,4,"div",5),h(6,"div",6),y(7),Ce(8,"fromNowText"),p()()(),h(9,"div",7)(10,"div",8)(11,"div",9)(12,"div")(13,"div",10),y(14,"Artists"),p(),h(15,"div"),y(16),Ce(17,"nxtDate"),p()(),W(18,aJi,6,4,"div",11),Ce(19,"nxtDate"),h(20,"div")(21,"div",10),y(22,"Wert"),p(),h(23,"div"),y(24),Ce(25,"nxtDate"),Ce(26,"nxtRound"),p()()()(),W(27,lJi,3,4,"div",12),Ce(28,"nxtDate"),h(29,"div",13),W(30,cJi,2,1,"div",14),Ce(31,"nxtDate"),p()()()}if(t&2){let n=e.$implicit,i=w();ki("cal-past",n.isPast)("cal-today",n.isToday)("cal-future",n.isFuture)("cal-weekend",n.isWeekend),g(3),Je(Nt(4,15,n.date,"yyyy")===i.thisYear?3:5),g(4),ye(Nt(8,18,n.date,!0)),g(9),ye(i.artistCounts()[Nt(17,21,n.date,"yyyy-MM-dd")]),g(2),b("ngIf",i.piercingCounts()[Nt(19,24,n.date,"yyyy-MM-dd")]>0),g(6),ye(Nt(26,30,i.valence()[Nt(25,27,n.date,"yyyy-MM-dd")],1)),g(3),Je(i.publicHolidays()[Nt(28,33,n.date,"yyyy-MM-dd")]?27:-1),g(3),b("ngForOf",i.dailyNotes()[Nt(31,36,n.date,"yyyy-MM-dd")])}}var rJi,g_t,v_t=Q(()=>{me();Gi();go();ri();zn();$P();B1();dT();me();Cs();rJi=t=>({width:t});g_t=(()=>{let e=class e extends bt{constructor(i){super(),this.configService=i,this.days=br.required(),this.dailyNotes=br.required(),this.headerWidth=br.required(),this.artistCounts=br.required(),this.piercingCounts=br.required(),this.valence=br.required(),this.publicHolidays=vr(()=>{let r={};for(let s of this.days()){let o=kv.getPublicHoliday(s.date.dateFormatDate(),this.configService.config.value.invoiceData.fromRegion);o&&(r[s.date.dateFormat("yyyy-MM-dd")]=o)}return r}),this.dateHeaderClicked=j2(),this.dailyNoteClicked=j2(),this.thisYear=Ie.formatNow("yyyy")}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(Xi))},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-header"]],inputs:{days:[1,"days"],dailyNotes:[1,"dailyNotes"],headerWidth:[1,"headerWidth"],artistCounts:[1,"artistCounts"],piercingCounts:[1,"piercingCounts"],valence:[1,"valence"]},outputs:{dateHeaderClicked:"dateHeaderClicked",dailyNoteClicked:"dailyNoteClicked"},standalone:!0,features:[et,xe],decls:2,vars:4,consts:[["role","row",1,"cal-day-headers",3,"ngStyle"],["class","cal-header p-relative","tabindex","0","role","columnheader",3,"cal-past","cal-today","cal-future","cal-weekend",4,"ngFor","ngForOf"],["tabindex","0","role","columnheader",1,"cal-header","p-relative"],[1,"flex","flex-col","leading-tight","relative"],[1,"date-info","flex","flex-row","justify-center","items-center","cursor-pointer","gap-3","whitespace-break-spaces",3,"click"],[1,"bold","text-[25px]"],[1,"text-70"],[1,"artist-info-and-daily-notes"],[1,"artist-infos","flex","flex-col"],[1,"flex","flex-row","justify-around","text-120","leading-tight"],[1,"text-60"],[4,"ngIf"],[1,"public-holiday"],[1,"daily-notes","flex","flex-col"],["class","daily-note cursor-pointer",3,"click",4,"ngFor","ngForOf"],[1,"daily-note","cursor-pointer",3,"click"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,dJi,32,39,"div",1),p()),r&2&&(b("ngStyle",sn(2,rJi,s.headerWidth())),g(),b("ngForOf",s.days()))},dependencies:[Hn,rr,Hi,Ct,rw,ld],styles:[".artist-info-and-daily-notes[_ngcontent-%COMP%]{border-radius:4px;overflow:hidden;margin:4px;white-space:wrap!important}.artist-info-and-daily-notes[_ngcontent-%COMP%]   .daily-notes[_ngcontent-%COMP%]{background-color:#222;color:#bbb}.artist-info-and-daily-notes[_ngcontent-%COMP%]   .daily-notes[_ngcontent-%COMP%]   .daily-note[_ngcontent-%COMP%]{padding:4px}.artist-info-and-daily-notes[_ngcontent-%COMP%]   .artist-infos[_ngcontent-%COMP%]{padding:4px;background-color:#b7860f;color:#000}.date-info[_ngcontent-%COMP%]{padding:4px}.public-holiday[_ngcontent-%COMP%]{background-color:#792929;padding:4px;font-size:100%}"],changeDetection:0});let t=e;return t})()});function uJi(t,e){if(t&1){let n=re();h(0,"nxt-button-icon",16),F("click",function(){V(n);let r=w();return B(r.openGooglePhotos())}),y(1," image "),p()}if(t&2){let n=w();b("size",n.iconSize)}}function hJi(t,e){if(t&1){let n=re();h(0,"nxt-slide-toggle",11),F("valueChange",function(r){V(n);let s=w();return B(s.showOnlyCanceledEventsChanged(r))}),y(1,"nur Abgesagte"),p()}if(t&2){let n=w();b("value",n.filter().showOnlyCanceledEvents)}}var y_t,__t=Q(()=>{me();Gi();mg();Mp();ls();ih();ej();Kr();oo();Zi();ri();il();me();y_t=(()=>{let e=class e extends bt{constructor(){super(),this.iconSize=28,this.filter=mj.required(),this.showDateSelect=new nt,this.jumpDateBack=new nt,this.jumpDateForward=new nt,this.setToday=new nt,this.newArtistSpot=new nt,this.eventFinder=new nt,this.reload=new nt,this.walkIn=new nt,this.showSunday=gt(!0),this.loginService=Ve(Fi),this.daysCountOptions=[{value:1,text:"1 Tag"},{value:3,text:"3 Tage"},{value:7,text:"1 Woche"}]}ngOnInit(){}nxtOnDestroy(){}showOnlyEventsFutureChanged(i){this.filter.update(r=>St(ve({},r),{showOnlyEventsFuture:i,showCanceledEvents:!1}))}showWithPiercingChanged(i){this.filter.update(r=>St(ve({},r),{showEventsWithPiercing:i}))}showCanceledEventsChanged(i){let r=this.filter().showOnlyCanceledEvents;i||(r=!1),this.filter.update(s=>St(ve({},s),{showCanceledEvents:i,showOnlyEventsFuture:!1,showOnlyCanceledEvents:r}))}showOnlyCanceledEventsChanged(i){this.filter.update(r=>St(ve({},r),{showOnlyCanceledEvents:i,showOnlyEventsFuture:!1}))}setDaysCount(i){this.filter.update(r=>St(ve({},r),{daysCount:i}))}logout(){this.loginService.reLogin(!0)}onlyArtistSpotsChanged(i){this.filter.update(r=>St(ve({},r),{onlyArtistSpots:i}))}openGooglePhotos(){window.open("https://photos.google.com","_blank")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-toolbar-top"]],inputs:{filter:[1,"filter"]},outputs:{filter:"filterChange",showDateSelect:"showDateSelect",jumpDateBack:"jumpDateBack",jumpDateForward:"jumpDateForward",setToday:"setToday",newArtistSpot:"newArtistSpot",eventFinder:"eventFinder",reload:"reload",walkIn:"walkIn"},standalone:!0,features:[et,xe],decls:53,vars:33,consts:[[1,"flex","flex-row","items-center","gap-3"],["matTooltip","Datum W\xE4hlen",3,"click","size"],[3,"click","size","matTooltip"],["matTooltip","heute",3,"click","size"],["nxtPermission","Artists_NewSpot","matTooltip","neuer Artist-Spot",3,"click","size"],["matTooltip","Terminfinder",3,"click","size"],["matTooltip","Google-Photos",3,"size","click",4,"ngIf"],["matTooltip","WALK-IN anlegen",3,"click","size"],["matTooltip","neu Laden",3,"click","size"],[1,"flex","flex-row","gap-2","slide-toggle-wrapper"],[1,"flex","flex-col","items-start"],[3,"valueChange","value"],[3,"value"],[1,"flex","flex-row",3,"click"],[1,"flex","flex-row","gap-1"],[3,"click","smallButton"],["matTooltip","Google-Photos",3,"click","size"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"nxt-button-icon",1),F("click",function(){return s.showDateSelect.emit()}),y(2," calendar_month "),p(),h(3,"nxt-button-icon",2),F("click",function(){return s.jumpDateBack.emit()}),y(4," arrow_back_ios_new "),p(),h(5,"nxt-button-icon",2),F("click",function(){return s.jumpDateForward.emit()}),y(6," arrow_forward_ios "),p(),h(7,"nxt-button-icon",3),F("click",function(){return s.setToday.emit()}),y(8," system_update_alt "),p(),h(9,"nxt-button-icon",4),F("click",function(){return s.newArtistSpot.emit()}),y(10," person_add "),p(),h(11,"nxt-button-icon",5),F("click",function(){return s.eventFinder.emit()}),y(12," event_available "),p(),W(13,uJi,2,1,"nxt-button-icon",6),h(14,"nxt-button-icon",7),F("click",function(){return s.walkIn.emit()}),y(15," directions_run "),p(),h(16,"nxt-button-icon",8),F("click",function(){return s.reload.emit()}),y(17," refresh "),p()(),h(18,"div",9)(19,"div",10)(20,"nxt-slide-toggle",11),F("valueChange",function(a){return s.showCanceledEventsChanged(a)}),y(21,"Abgesagte"),p(),W(22,hJi,2,1,"nxt-slide-toggle",12),h(23,"nxt-slide-toggle",11),F("valueChange",function(a){return s.showOnlyEventsFutureChanged(a)}),y(24,"nur Offene"),p()(),h(25,"div",10)(26,"nxt-slide-toggle",11),F("valueChange",function(a){return s.showWithPiercingChanged(a)}),y(27,"mit Piercing"),p(),h(28,"nxt-slide-toggle",11),F("valueChange",function(a){return s.onlyArtistSpotsChanged(a)}),y(29,"Nur Artist-Spots"),p()()(),h(30,"div")(31,"div",13),F("click",function(){return s.logout()}),h(32,"div"),y(33),p(),h(34,"div"),y(35,"\xA0\u30FB\xA0"),p(),h(36,"div"),y(37),Ce(38,"workplace"),p(),h(39,"div"),y(40,"\xA0\u30FB\xA0"),p(),h(41,"div"),y(42),p()()(),h(43,"div")(44,"div",14)(45,"nxt-button",15),F("click",function(){return s.setDaysCount(1)}),y(46,"1"),p(),h(47,"nxt-button",15),F("click",function(){return s.setDaysCount(3)}),y(48,"3"),p(),h(49,"nxt-button",15),F("click",function(){return s.setDaysCount(6)}),y(50,"6"),p(),h(51,"nxt-button",15),F("click",function(){return s.setDaysCount(7)}),y(52,"7"),p()()()),r&2&&(g(),b("size",s.iconSize),g(2),b("size",s.iconSize)("matTooltip",s.filter().daysCount+" Tage zur\xFCck"),g(2),b("size",s.iconSize)("matTooltip",s.filter().daysCount+" Tage vor"),g(2),b("size",s.iconSize),g(2),b("size",s.iconSize),g(2),b("size",s.iconSize),g(2),b("ngIf",!1),g(),b("size",s.iconSize),g(2),b("size",s.iconSize),g(4),b("value",s.filter().showCanceledEvents),g(2),Je(s.filter().showCanceledEvents?22:-1),g(),b("value",s.filter().showOnlyEventsFuture),g(3),b("value",s.filter().showEventsWithPiercing),g(2),b("value",s.filter().onlyArtistSpots),g(5),ye(s.loginService.getUsername()),g(4),ye(tt(38,31,s.loginService.getWorkplace())),g(5),ye(s.loginService.getStudio()),g(3),ki("current-button",s.filter().daysCount===1),b("smallButton",!0),g(2),ki("current-button",s.filter().daysCount===3),b("smallButton",!0),g(2),ki("current-button",s.filter().daysCount===6),b("smallButton",!0),g(2),ki("current-button",s.filter().daysCount===7),b("smallButton",!0))},dependencies:[dl,an,ZF,Nn,Lt,Ct,Zs],styles:["[_nghost-%COMP%]{padding:8px 16px;width:100%;flex-direction:row;justify-content:space-between;align-items:center;display:flex;background-color:#404040;color:#bbb}[_nghost-%COMP%]   .slide-toggle-wrapper[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%]     .current-button button{background:#b7860f!important}[_nghost-%COMP%]     .current-button button span{color:#fff}"],changeDetection:0});let t=e;return t})()});function pJi(t,e){if(t&1){let n=re();h(0,"nxt-button",5),F("click",function(){V(n);let r=w(2);return B(r.deleteClicked())}),y(1,"L\xF6schen"),p()}}function mJi(t,e){if(t&1){let n=re();h(0,"div",1)(1,"div",2),y(2),Ce(3,"nxtDate"),p(),h(4,"div",2),y(5),p(),h(6,"div")(7,"nxt-input",3),Xe("valueChange",function(r){V(n);let s=w();return Ze(s.text,r)||(s.text=r),B(r)}),p()(),h(8,"div",4)(9,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.cancelClicked())}),y(10,"Abbrechen"),p(),W(11,pJi,2,0,"nxt-button"),h(12,"nxt-button",5),F("click",function(){V(n);let r=w();return B(r.saveClicked())}),y(13),p()()()}if(t&2){let n=w();g(2),ye(Nt(3,5,n.dailyNote().dateString,"EEE dd.MM.yyyy")),g(3),ye(n.dailyNote().id?"Tages-Notiz bearbeiten":"Neue Tages-Notiz"),g(2),qe("value",n.text),g(4),Je(n.dailyNote().id?11:-1),g(2),ye(n.dailyNote().id?"Speichern":"Anlegen")}}var STe,C_t=Q(()=>{me();Gi();go();Jr();Zi();ji();yi();Kr();ri();me();STe=(()=>{let e=class e extends bt{constructor(){super(),this.dailyNote=gt(null),this.text="",this.loginService=Ve(Fi),this.cdRef=Ve(Kt),this.dialogRef=Ve(Gt),this.socketService=Ve(lt)}ngOnInit(){}nxtOnDestroy(){}new(i){this.dailyNote.set({id:"",dateString:i,date:i.dateParse(),title:"",createdBy:this.loginService.getUsername(),createdAt:Date.now(),updatedAt:Date.now(),updatedBy:this.loginService.getUsername()})}load(i){return O(this,null,function*(){let r=yield this.socketService.getDailyNote(i);this.dailyNote.set(r),this.text=r.title})}cancelClicked(){this.dialogRef.close()}saveClicked(){return O(this,null,function*(){let i=this.dailyNote();i.title=this.text,yield this.socketService.upsertDailyNote(i),this.dialogRef.close()})}deleteClicked(){return O(this,null,function*(){yield this.socketService.deleteDailyNote(this.dailyNote().id),this.dialogRef.close()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-daily-note-edit"]],standalone:!0,features:[et,xe],decls:1,vars:1,consts:[["class","flex flex-col justify-center items-center",4,"ngIf"],[1,"flex","flex-col","justify-center","items-center"],[1,"text-120"],["placeholder","Text",1,"w-[400px]",3,"valueChange","value"],[1,"flex","flex-row","justify-around","w-full"],[3,"click"]],template:function(r,s){r&1&&W(0,mJi,14,8,"div",0),r&2&&b("ngIf",s.dailyNote())},dependencies:[Hn,Yi,Lt,Ct],changeDetection:0});let t=e;return t})()});function fJi(t,e){if(t&1){let n=re();h(0,"div",7),F("click",function(){let r=V(n).$implicit,s=w().$implicit,o=w();return B(o.setCurrentColor(s,r))}),y(1),p()}if(t&2){let n=e.$implicit,i=w().$implicit,r=w();mo("color",r.ColorTools.getLightOrDarkFontColorByBackground(r.MaterialColors.colors[i][n]))("background-color",r.MaterialColors.colors[i][n]),ki("current",r.currentIndex()===i+n),g(),Ke("\xA0",r.artistColors()[r.MaterialColors.colors[i][n]]," ")}}function gJi(t,e){if(t&1&&(h(0,"div",0),Kn(1,fJi,2,7,"div",6,sa),p()),t&2){let n=w();g(),Yn(n.colorSteps)}}var Ose,x_t,b_t=Q(()=>{me();Gi();Zi();qn();go();n5e();Ose=Gs(P7());yi();ji();jc();dA();Ci();$n();me();x_t=(()=>{let e=class e extends bt{constructor(){super(),this.currentIndex=vr(()=>{for(let i of(0,Ose.keys)(x3.colors))for(let r of(0,Ose.keys)(x3.colors[i]))if(x3.colors[i][r]===this.color())return i+r;return""}),this.artistSpot=gt(null),this.artistColors=gt({}),this.artist=gt(null),this.color=gt("#ab47bc"),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogRef=Ve(Gt),this.dialogService=Ve(vt),this.colors=(0,Ose.keys)(x3.colors),this.colorSteps=["200","300","400","500","600","700","800","900"],this.MaterialColors=x3,this.ColorTools=xn}ngOnInit(){}nxtOnDestroy(){}load(i,r){return O(this,null,function*(){this.artistColors.set(r),this.artistSpot.set(i),this.artist.set(yield this.socketService.getArtistByName(i.artist)),this.color.set(this.artist().color)})}setCurrentColor(i,r){this.color.set(x3.colors[i][r])}canceleClicked(){this.dialogRef.close()}saveClicked(){let i=this.artist();i.color=this.color(),this.socketService.upsertArtist(i),this.dialogRef.close()}editArtistSpot(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(Uy);i.componentInstance.load(this.artistSpot().id),yield Sn(i.afterClosed()),this.dialogRef.close()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar-artist-view"]],standalone:!0,features:[et,xe],decls:16,vars:9,consts:[[1,"flex","flex-col"],[1,"flex","flex-col","items-center"],[1,"text-130","flex","flex-row","p-2"],[3,"click"],[1,"flex","flex-row","p-3"],[1,"flex","flex-row","justify-around"],[1,"flex","text-60","color-item","o-hidden","items-center","justify-center","text-center",2,"width","50px","height","50px","border-radius","4px","margin","1px",3,"color","current","background-color"],[1,"flex","text-60","color-item","o-hidden","items-center","justify-center","text-center",2,"width","50px","height","50px","border-radius","4px","margin","1px",3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",2),y(3),p(),h(4,"nxt-button",3),F("click",function(){return s.editArtistSpot()}),y(5),Ce(6,"nxtDate"),Ce(7,"nxtDate"),p()(),h(8,"div",4),Kn(9,gJi,3,0,"div",0,sa),p(),h(11,"div",5)(12,"nxt-button",3),F("click",function(){return s.canceleClicked()}),y(13,"Abbrechen"),p(),h(14,"nxt-button",3),F("click",function(){return s.saveClicked()}),y(15,"Speichern"),p()()()),r&2&&(g(3),ye(s.artistSpot().artist),g(2),cn("",Nt(6,3,s.artistSpot().start,"dd.MM.yyyy")," - ",Nt(7,6,s.artistSpot().end,"dd.MM.yyyy"),""),g(4),Yn(s.colors))},dependencies:[Lt,ko,Hn],styles:[".color-item[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:4px;margin:1px}.color-item.current[_ngcontent-%COMP%]{transition:transform .2s;outline:3px solid #fff;transform:scale(1.3)}"],changeDetection:0});let t=e;return t})()});function vJi(t,e){if(t&1&&(h(0,"div",4),y(1),Ce(2,"nxtSubstr"),p()),t&2){let n=w();g(),cn("",Xf(2,2,n.data.cacheKey,0,4)," | ",n.data.durationMs,"")}}function yJi(t,e){if(t&1){let n=re();h(0,"div",9)(1,"mwl-calendar-week-view",10,3),F("hourSegmentClicked",function(r){V(n);let s=w(2);return B(s.createEventClicked(r))}),p()()}if(t&2){w();let n=pr(4),i=pr(6),r=pr(8),s=w();g(),ki("only-artist-spots",s.currentFilter().onlyArtistSpots),b("refresh",s.refreshView)("daysInWeek",s.viewParams().daysCountToShow)("viewDate",s.viewParams().dateToShow)("headerTemplate",i)("dayStartHour",s.dayStartHour)("hourSegmentTemplate",n)("eventTemplate",r)("events",s.events())}}function _Ji(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=w(3);g(),Ke("\xA0\u30FB\xA0",n.piercingCounts[n.currentFilter().dateString]+" Piercing","")}}function CJi(t,e){if(t&1){let n=re();h(0,"div",11)(1,"div",12)(2,"div",13)(3,"div"),y(4),Ce(5,"fromNowText"),p(),h(6,"div"),y(7),Ce(8,"nxtDate"),p(),y(9,"\xA0\u30FB\xA0 "),h(10,"div"),y(11),Ce(12,"nxtDate"),p(),y(13,"\xA0\u30FB\xA0 "),h(14,"div"),y(15),p(),W(16,_Ji,2,1,"div",14),p()(),h(17,"mwl-calendar-day-view",15),F("hourSegmentClicked",function(r){V(n);let s=w(2);return B(s.createEventClicked(r))}),p()()}if(t&2){w();let n=pr(4),i=pr(8),r=w();g(4),Ke("",Nt(5,12,r.currentFilter().dateString,!0),"\xA0\u30FB\xA0"),g(3),ye(Nt(8,15,r.currentFilter().dateString,"EEEE")),g(4),ye(Nt(12,18,r.currentFilter().dateString,"dd.MM.yyyy")),g(4),ye(r.artistCounts[r.currentFilter().dateString]+" Artists"),g(),b("ngIf",r.piercingCounts[r.currentFilter().dateString]),g(),b("refresh",r.refreshView)("viewDate",r.viewParams().dateToShow)("dayStartHour",r.dayStartHour)("hourSegmentTemplate",n)("eventTemplate",i)("tooltipAppendToBody",!0)("events",r.events())}}function xJi(t,e){if(t&1&&ee(0,"nxt-calendar-hour-segment",16),t&2){let n=e.segment,i=e.segmentHeight,r=e.isTimeLabel,s=e.daysInWeek,o=w(2);b("cssClass",n.cssClass)("date",n.date)("isStart",n.isStart)("segmentHeight",i)("isTimeLabel",r)("dayStartHour",o.dayStartHour)("daysInWeek",s)("daysCount",o.currentFilter().daysCount)}}function bJi(t,e){if(t&1){let n=re();h(0,"nxt-calendar-header",17),F("dateHeaderClicked",function(r){V(n);let s=w(2);return B(s.dateHeaderClicked(r))})("dailyNoteClicked",function(r){V(n);let s=w(2);return B(s.dailyNoteClicked(r))}),p()}if(t&2){let n=e.days,i=w(2);b("artistCounts",i.artistCounts)("piercingCounts",i.piercingCounts)("valence",i.valence)("days",n)("dailyNotes",i.dailyNotes)("headerWidth",i.headerWidth)}}function wJi(t,e){if(t&1){let n=re();h(0,"nxt-calendar-artist-spot",19),F("click",function(){V(n);let r=w().weekEvent,s=w(2);return B(s.artistSpotClicked(r.event.meta.artistSpot))}),p()}if(t&2){let n=w().weekEvent;b("event",n.event)}}function SJi(t,e){if(t&1){let n=re();h(0,"nxt-calendar-event-template",19),F("click",function(){V(n);let r=w().weekEvent,s=w(2);return B(s.calendarEventClicked(r.event.meta.event))}),p()}if(t&2){let n=w().weekEvent;b("event",n.event)}}function TJi(t,e){if(t&1&&W(0,wJi,1,1,"nxt-calendar-artist-spot",18)(1,SJi,1,1,"nxt-calendar-event-template",18),t&2){let n=e.weekEvent;Je(n.event.meta.artistSpot?0:1)}}function DJi(t,e){if(t&1&&(h(0,"div",6),W(1,yJi,3,10,"div",7)(2,CJi,18,21,"div",8)(3,xJi,1,8,"ng-template",null,0,Cc)(5,bJi,1,6,"ng-template",null,1,Cc)(7,TJi,2,1,"ng-template",null,2,Cc),p()),t&2){let n=w();g(),b("ngIf",n.viewMode()==="week"),g(),b("ngIf",n.viewMode()==="day")}}var w_t,S_t=Q(()=>{me();Gi();$w();zn();$n();An();xse();bse();ri();ls();oo();P0();Zi();ha();oz();yZ();ej();ih();mg();nj();v_t();__t();jo();W_();B1();pa();go();_9e();jc();nTe();dA();C_t();b_t();Jr();n6();iTe();me();ji();yi();Cs();Ci();ma();Kr();ag();z1();oee();$w();w_t=(()=>{let e=class e extends bt{constructor(i,r,s,o,a,l,c,d,u,m){super(),this.cdRef=r,this.socketService=s,this.configService=o,this.dialogService=a,this.route=l,this.loginService=c,this.localStorageService=d,this.bodyPutService=u,this.walkInService=m,this.artistCounts={},this.piercingCounts={},this.dailyNotes={},this.valence={},this.viewMode=vr(()=>this.currentFilter().daysCount===1?"day":this.currentFilter().daysCount<=7?"week":"month"),this.currentFilter=gt({dateString:Date.now().dateFormatDate(),daysCount:7,showCanceledEvents:!1,showEventsWithPiercing:!0,showOnlyEventsFuture:!1,onlyArtistSpots:!1,showOnlyCanceledEvents:!1}),this.events=gt(null),this.headerWidth="calc(100% - 16px)",this.load$=new Mi,this.dayStartHour=this.configService.config.value.studioWorkStart/Qt.DURATION_1HOUR,this.viewParams=gt({dateToShow:new Date,daysCountToShow:1}),this.forceReloadOnSameFilters=!1,this.refreshView=new Mi,this.pushSubscription=Tp(this.currentFilter).subscribe(()=>{this.filterChanged()}),this.registerEventListener(),this.route.queryParams.subscribe(f=>{f.days&&this.currentFilter.update(_=>St(ve({},_),{daysCount:parseInt(f.days,10)}))}),setInterval(()=>{this.refreshView.next(!0)},3e4)}test(){console.log(this.calendarWeekViewComponent.view),console.log(this.calendarWeekViewComponent.view),console.log(this.calendarWeekViewComponent.view)}ngOnInit(){return O(this,null,function*(){this.loadCalendarStateStorage(),this.load$.pipe(A7(500)).subscribe(()=>this.loadFromServer()),this.load$.next()})}nxtOnDestroy(){}calendarEventClicked(i){this.dialogService.showEvent(i.id)}artistSpotClicked(i){if(this.currentFilter().onlyArtistSpots)this.dialogService.showComponentDialog(Uy).componentInstance.load(i.id);else{let r=this.dialogService.showComponentDialog(x_t),s={};this.data.artists.forEach(o=>s[o.color]=o.name),r.componentInstance.load(i,s).then()}}registerEventListener(){this.pushSocketSubscription=this.socketService.subscribeNew("calendarEventChanged",i=>O(this,null,function*(){let r=this.currentFilter().dateString.dateParse(),s=r.dateAddDays(this.currentFilter().daysCount);Ie.betweenDays(i.record.start,r,s)?(this.forceReloadOnSameFilters=!0,this.load$.next()):i.op==="update"&&Ie.betweenDays(i.oldRecord.start,r,s)&&(this.forceReloadOnSameFilters=!0,this.load$.next())})),this.pushSocketSubscription=this.socketService.subscribeNew("eventDailyNoteChanged",i=>O(this,null,function*(){this.forceReloadOnSameFilters=!0,this.load$.next()})),this.pushSocketSubscription=this.socketService.subscribeNew("eventArtistChanged",i=>O(this,null,function*(){this.forceReloadOnSameFilters=!0,this.load$.next()})),this.pushSocketSubscription=this.socketService.subscribeNew("eventArtistSpotChanged",i=>O(this,null,function*(){this.forceReloadOnSameFilters=!0,this.load$.next()})),this.socketService.onAuthenticated.subscribe(()=>{this.forceReloadOnSameFilters=!0,this.load$.next()})}wrap(){let i=document.querySelector(".cal-time-events");i.outerHTML='<div class="wrapper">'+i.outerHTML+"</div>"}createEventClicked(i){this.dialogService.showEventNew({dateString:i.date.dateFormat("yyyy-MM-dd"),timeFromString:i.date.dateFormat("HH:mm"),showEventFinder:!0,askWorkType:!0})}calcDateData(){this.artistCounts={},this.piercingCounts={},this.dailyNotes={};let i=this.currentFilter().dateString.dateParse();for(let r=0;r<this.currentFilter().daysCount;r++){let s=i.dateAddDays(r),o=s.dateFormat("yyyy-MM-dd"),a=this.data.artistSpots.filter(l=>!l.artist.toLowerCase().includes("piercing")&&Ie.betweenDays(s,l.start,l.end));a=a.filter(l=>!l.workTimeWindows||l.workTimeWindows.some(c=>c.dateString===o&&c.start!==-2&&c.end!==-2)),this.artistCounts[o]=a.length,this.piercingCounts[o]=this.data.artistSpots.filter(l=>l.artist.toLowerCase().includes("piercing")&&Ie.betweenDays(s,l.start,l.end)).length,this.valence[o]=this.getValence(s.dateFormatDate()),this.dailyNotes[o]=this.data.dailyNotes.filter(l=>l.dateString===o)}}getCalendarEventTitle(i){let r=i.customerObj?.fullName||"?";if(this.currentFilter().daysCount>2)return r||"?";{i.fastWalkInNo&&(i.workType==="piercing"&&(r="P-"+i.fastWalkInNo+" "+r),i.workType==="tattoo"&&(r="T-"+i.fastWalkInNo+" "+r));let s='<div class="leading-tight"><strong>'+r+"</strong>";return i.priceFix?s+="<br/>fix "+i.priceEstimatedFrom.toMoneyString():i.priceEstimatedTill?s+="<br/>"+i.priceEstimatedFrom.toMoneyString()+" - "+i.priceEstimatedTill.toMoneyString():i.priceEstimatedFrom&&(s+="<br/>ca. "+i.priceEstimatedFrom.toMoneyString()),s+="<br/>"+this.bodyPutService.getTextFromEvent(i,{size:!1}).join("<br/>"),s+="</div>",s}}addCurrentDate(i){let r=this.currentFilter().dateString.dateParse().dateAddDays(i).dateFormatDate();this.currentFilter.update(s=>St(ve({},s),{dateString:r})),this.load$.next()}setToday(){this.currentFilter.update(i=>St(ve({},i),{dateString:Date.now().dateFormatDate()})),this.load$.next()}loadFromServer(){return O(this,null,function*(){if(this.log("start loadFromServer"),this.currentFilter().daysCount===7||this.currentFilter().daysCount===6){let o=Ie.getMondayBefore(this.currentFilter().dateString,0).dateFormatDate();if(this.currentFilter().dateString!==o){this.log("datum ist nicht Montag, wird auf montag gesetzt -> return"),this.currentFilter.update(a=>St(ve({},a),{dateString:o}));return}}this.forceReloadOnSameFilters||!this.data||this.shouldLoadNew()?(this.forceReloadOnSameFilters=!1,this.log("frage Server nach daten f\xFCr "+this.currentFilter().dateString+" | Tage: "+this.currentFilter().daysCount),this.data=yield this.socketService.getCalendarEventsForCalendar(this.currentFilter().dateString,this.currentFilter().daysCount),this.data.filter=so(this.currentFilter())):this.log("keine neuladen notwendig");let i=this.getEventsFromArtistSpots(this.data.artistSpots),r=this.data.events.filter(o=>!(this.currentFilter().showOnlyEventsFuture&&o.status!=="future"||!this.currentFilter().showCanceledEvents&&o.status==="canceled"||!this.currentFilter().showEventsWithPiercing&&o.workType==="piercing"||this.currentFilter().showOnlyCanceledEvents&&o.status!=="canceled")),s=[];if(!this.currentFilter().onlyArtistSpots)for(let o of r){let l=this.data.artists.find(c=>c.name===o.artist)?.color;l||(o.status==="canceled"&&(l="red"),l||(l="#555")),s.push({start:new Date(o.start+0),end:new Date(o.end+0),id:o.id,title:this.getCalendarEventTitle(o),color:{primary:l,secondary:xn.getLightOrDarkFontColorByBackground(l)},meta:{event:o}})}this.calcDateData(),s.sort((o,a)=>o.start<a.start?-1:o.start>a.start?1:o.end>a.end?-1:o.end<a.end?1:o.meta.event.artist.localeCompare(a.meta.event.artist)),this.events.set([...i,...s]),this.cdRef.detectChanges(),this.viewParams.set({dateToShow:new Date(this.currentFilter().dateString),daysCountToShow:this.currentFilter().daysCount}),setTimeout(()=>{this.cdRef.detectChanges()},200)})}showDateSelectClicked(){return O(this,null,function*(){let i=this.dialogService.showComponentDialog(cA);i.componentInstance.selectedMonthString=this.currentFilter().dateString.dateParse().dateFormat("yyyy-MM"),i.componentInstance.markDateRange(this.currentFilter().dateString,this.currentFilter().dateString.dateParse().dateAddDays(this.currentFilter().daysCount).dateFormatDate());let r=yield Sn(i.afterClosed());r&&(this.currentFilter.update(s=>(s.dateString=r,s)),this.load$.next())})}filterChanged(){this.load$.next(),this.setCalendarStateStorage()}setCalendarStateStorage(){this.localStorageService.set("CalendarState",this.currentFilter())}loadCalendarStateStorage(){this.currentFilter.set(ve(ve({},this.currentFilter()),this.localStorageService.get("CalendarState",this.currentFilter())))}jumpDateBackClicked(){let i=-1*(this.currentFilter().daysCount===6?7:this.currentFilter().daysCount);this.addCurrentDate(i)}jumpDateForwardClicked(){let i=this.currentFilter().daysCount===6?7:this.currentFilter().daysCount;this.addCurrentDate(i)}shouldLoadNew(){let i=Sr.getDiff(this.data.filter,this.currentFilter()),r=["showOnlyEventsFuture","showCanceledEvents","showEventsWithPiercing"];i=i.filter(o=>!r.includes(o.path.join())),this.log("shouldLoadNewDiff: "+JSON.stringify(i));let s=i.length>0;return s||(this.log("alteDate",this.data.filter),this.log("neueDate",this.currentFilter())),s}getValence(i){return this.data.events.filter(s=>s.status!=="canceled"&&s.start.dateFormatDate()===i).map(s=>s.valence).reduce((s,o)=>s+o,0)}getEventsFromArtistSpots(i){let r=[];for(let s of i){let o=[],a=!0,l;if(s.workTimeWindows)for(let u of s.workTimeWindows){if(u.start===-2&&u.end===-2){a=!0,l&&(o[o.length-1].end=l.dateString.dateParse());continue}a&&(o.push({start:u.dateString.dateParse(),end:0}),a=!1),l=u}o.length>0&&!o[o.length-1].end&&l&&(o[o.length-1].end=l.dateString.dateParse()),o=o.filter(u=>u.start<=this.currentFilter().dateString.dateParse().dateAddDays(this.currentFilter().daysCount));let c=s.artist,d=this.data.artists.find(u=>u.name===s.artist).color;this.currentFilter().onlyArtistSpots&&(d="#888888"),d||(d="#fff");for(let[u,m]of o.entries())r.push({start:new Date(m.start),end:new Date(m.end),id:s.id+"_"+u,title:c,allDay:!0,color:{primary:d,secondary:d},meta:{artistSpot:s,view:{textColor:xn.getLightOrDarkFontColorByBackground(d)}}})}return r}newArtistSpotClicked(){let i=this.dialogService.showComponentDialog(Uy),r=this.currentFilter().dateString,s=r.dateParse().dateAddDays(6).dateFormatDate();i.componentInstance.load("new",r,s)}dateHeaderClicked(i){this.dialogService.showComponentDialog(STe).componentInstance.new(i)}dailyNoteClicked(i){this.dialogService.showComponentDialog(STe).componentInstance.load(i.id)}eventFinderClicked(){let i=this.dialogService.showComponentFull(nu);i.componentInstance.loadEvent({newEventData:{}}),i.componentInstance.showEventFinder({fromDateString:this.currentFilter().dateString})}reloadClicked(){this.forceReloadOnSameFilters=!0,this.load$.next()}walkInClicked(){this.walkInService.startWalkIn().then()}log(i,...r){console.log("CALENDAR | "+i,...r)}};e.\u0275fac=function(r){return new(r||e)(R(Gt,8),R(Kt),R(lt),R(Xi),R(vt),R(gs),R(Fi),R(vu),R(Oc),R(YP))},e.\u0275cmp=_e({type:e,selectors:[["nxt-calendar"]],viewQuery:function(r,s){if(r&1&&(ei(nM,5),ei(Jie,5)),r&2){let o;Pt(o=Rt())&&(s.calendarWeekViewComponent=o.first),Pt(o=Rt())&&(s.calendarDayViewComponent=o.first)}},standalone:!0,features:[et,xe],decls:3,vars:3,consts:[["hourSegmentTemplate",""],["headerTemplate",""],["eventTemplate",""],["calendarWeekViewComponent",""],[1,"fixed","left-[0]","top-[0]","text-[8px]","gray-0"],[3,"filterChange","jumpDateBack","jumpDateForward","setToday","showDateSelect","newArtistSpot","reload","eventFinder","walkIn","filter"],[1,"flex","h-full","w-full","o-hidden"],["class","flex h-full w-full more-days",4,"ngIf"],["class","flex h-full w-full flex-col one-day",4,"ngIf"],[1,"flex","h-full","w-full","more-days"],[1,"flex","h-full","w-full","o-hidden",3,"hourSegmentClicked","refresh","daysInWeek","viewDate","headerTemplate","dayStartHour","hourSegmentTemplate","eventTemplate","events"],[1,"flex","h-full","w-full","flex-col","one-day"],[1,"flex","flex-row","justify-center","p-3","one-day-header","text-130"],[1,"flex","flex-row","items-center"],[4,"ngIf"],[1,"flex","h-full","w-full","o-hidden",3,"hourSegmentClicked","refresh","viewDate","dayStartHour","hourSegmentTemplate","eventTemplate","tooltipAppendToBody","events"],[3,"cssClass","date","isStart","segmentHeight","isTimeLabel","dayStartHour","daysInWeek","daysCount"],[3,"dateHeaderClicked","dailyNoteClicked","artistCounts","piercingCounts","valence","days","dailyNotes","headerWidth"],[3,"event"],[3,"click","event"]],template:function(r,s){r&1&&(W(0,vJi,3,6,"div",4),h(1,"nxt-calendar-toolbar-top",5),Xe("filterChange",function(a){return Ze(s.currentFilter,a)||(s.currentFilter=a),a}),F("jumpDateBack",function(){return s.jumpDateBackClicked()})("jumpDateForward",function(){return s.jumpDateForwardClicked()})("setToday",function(){return s.setToday()})("showDateSelect",function(){return s.showDateSelectClicked()})("newArtistSpot",function(){return s.newArtistSpotClicked()})("reload",function(){return s.reloadClicked()})("eventFinder",function(){return s.eventFinderClicked()})("walkIn",function(){return s.walkInClicked()}),p(),W(2,DJi,9,2,"div",6)),r&2&&(Je(s.data?0:-1),g(),qe("filter",s.currentFilter),g(),Je(s.events()&&s.viewParams()?2:-1))},dependencies:[Ct,f_,nM,qie,Jie,Dn,iM,Hn,Cse,g_t,y_t,ld,t4t,w6t,Yie,_6t],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column}[_nghost-%COMP%]     mwl-calendar-day-view .cal-events-row{margin:0!important}[_nghost-%COMP%]   .header[_ngcontent-%COMP%]{background-color:#404040;color:#ccc}[_nghost-%COMP%]   .one-day-header[_ngcontent-%COMP%]{background-color:#404040;color:#ccc;border:1px solid #6a6a6a;border-bottom-width:0}"],changeDetection:0});let t=e;return t})()});var T_t,D_t=Q(()=>{me();Gi();Pa();Qo();yi();zn();pS();Il();me();T_t=(()=>{let e=class e extends bt{constructor(){super(),this.klarnaOrders=gt([]),this.columnDefs=gt([{headerName:"Datum",field:"createdAt",nxtFieldType:Ee.Date_germanDate},{headerName:"Betrag",field:"originalPaymentValue",nxtFieldType:Ee.Money},{headerName:"Name",field:"fullName",nxtFieldType:Ee.Text},{headerName:"Artikel",field:"shopOrderLineItem.name",nxtFieldType:Ee.Text},{headerName:"Type",field:"rawOrder.initial_payment_method.type",nxtFieldType:Ee.Text},{headerName:"Typename",field:"rawOrder.initial_payment_method.description",nxtFieldType:Ee.Text}]),this.socketService=Ve(lt),this.date={from:Ie.getFirstOfMonth(Date.now()).dateFormatDate(),till:Ie.getLastDayOfMonth(Date.now()).dateFormatDate()},this.totalValue=gt(0),this.totalValueTattooTickets=gt(0),this.totalValueDaySessions=gt(0),this.totalValueGiftCards=gt(0)}ngOnInit(){this.find()}nxtOnDestroy(){}find(){return O(this,null,function*(){this.klarnaOrders.set((yield this.socketService.getKlarnaOrdersOriginalFromTill(this.date.from,this.date.till)).filter(i=>!i.originalOrderId)),console.log(this.klarnaOrders()),console.log(this.klarnaOrders()),this.totalValue.set(this.klarnaOrders().reduce((i,r)=>i+r.originalPaymentValue,0)),this.totalValueTattooTickets.set(this.klarnaOrders().filter(i=>i.shopOrderLineItem.name.includes("Ticket")).reduce((i,r)=>i+r.originalPaymentValue,0)),this.totalValueDaySessions.set(this.klarnaOrders().filter(i=>i.shopOrderLineItem.name.includes("DAYSESSION")).reduce((i,r)=>i+r.originalPaymentValue,0)),this.totalValueGiftCards.set(this.klarnaOrders().filter(i=>i.shopOrderLineItem.name.includes("Gutschein")).reduce((i,r)=>i+r.originalPaymentValue,0))})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-klarna-orders"]],standalone:!0,features:[et,xe],decls:30,vars:16,consts:[[1,"nxt-page"],[1,"flex","flex-row"],[3,"valueChange","value"],[1,"flex","flex-col","ml-5","items-end","pb-2"],[1,"right"],[1,"pr-3"],[1,"h-full",3,"showFooter","rowData","columnDefs"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"nxt-date-range-picker",2),Xe("valueChange",function(a){return Ze(s.date,a)||(s.date=a),a}),F("valueChange",function(){return s.find()}),p(),h(3,"div",3)(4,"table")(5,"tr")(6,"td"),y(7,"Gesamt"),p(),h(8,"td",4),y(9),Ce(10,"money"),p()(),h(11,"tr")(12,"td",5),y(13,"Tattoo-Tickets"),p(),h(14,"td",4),y(15),Ce(16,"money"),p()(),h(17,"tr")(18,"td"),y(19,"Gutscheine"),p(),h(20,"td",4),y(21),Ce(22,"money"),p()(),h(23,"tr")(24,"td"),y(25,"DaySessions"),p(),h(26,"td",4),y(27),Ce(28,"money"),p()()()()(),ee(29,"nxt-datagrid",6),p()),r&2&&(g(2),qe("value",s.date),g(7),ye(tt(10,8,s.totalValue())),g(6),ye(tt(16,10,s.totalValueTattooTickets())),g(6),ye(tt(22,12,s.totalValueGiftCards())),g(6),ye(tt(28,14,s.totalValueDaySessions())),g(2),b("showFooter",!0)("rowData",s.klarnaOrders())("columnDefs",s.columnDefs()))},dependencies:[dr,$g,ks],changeDetection:0});let t=e;return t})()});function EJi(t,e){if(t&1&&ee(0,"mat-tab",4),t&2){let n=e.$implicit;b("label",n.name)}}function MJi(t,e){if(t&1&&(h(0,"div",6),ee(1,"iframe",7),Ce(2,"safeUrl"),p(),h(3,"div",6),ee(4,"iframe",7),Ce(5,"safeUrl"),p()),t&2){let n=e.$implicit,i=e.$index,r=w();ki("visible",r.selectedIndex===i&&r.showUrl1),g(),b("src",Nt(2,6,n.url1,!0),y8),g(2),ki("visible",r.selectedIndex===i&&!r.showUrl1),g(),b("src",Nt(5,9,n.url2,!0),y8)}}var E_t,M_t,k_t=Q(()=>{me();Gi();Zi();YA();$D();YX();oo();me();Vt();E_t=(t,e)=>e.name;M_t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.studios=[{name:"Aachen",url1:"https://ac.nxt-lvl.ink/#/calendar",url2:"https://ac.nxt-lvl.ink/#/studio-cash-report-2"},{name:"D\xFCsseldorf",url1:"https://du.nxt-lvl.ink/#/calendar",url2:"https://du.nxt-lvl.ink/#/studio-cash-report-2"},{name:"Mallorca",url1:"https://ma.nxt-lvl.ink/#/calendar",url2:"https://ma.nxt-lvl.ink/#/studio-cash-report-2"},{name:"Frankfurt",url1:"https://ffm.nxt-lvl.ink/#/calendar",url2:"https://ffm.nxt-lvl.ink/#/studio-cash-report-2"},{name:"Aschaffenburg",url1:"https://ab.nxt-lvl.ink/#/calendar",url2:"https://ab.nxt-lvl.ink/#/studio-cash-report-2"},{name:"N\xFCrnberg",url1:"https://nu.nxt-lvl.ink/#/calendar",url2:"https://nu.nxt-lvl.ink/#/studio-cash-report-2"}],this.currentStudio="Aachen",this.selectedIndex=0,this.showUrl1=!0}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-multi-view"]],standalone:!0,features:[et,xe],decls:10,vars:3,consts:[[1,"nxt-page","!p-0"],[1,"flex","flex-row","items-center"],["leftText","CashReport",3,"valueChange","noColorChange","value"],[1,"w-full","h-fit",3,"selectedIndexChange","selectedIndex"],["fxLayout","column",1,"w-full","h-fit",3,"label"],[1,"flex","flex-column","w-full","h-full"],[1,"iframe-wrapper"],[1,"w-full","h-full",3,"src"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"nxt-slide-toggle",2),Xe("valueChange",function(a){return Ze(s.showUrl1,a)||(s.showUrl1=a),a}),y(3,"Kalender"),p(),h(4,"mat-tab-group",3),Xe("selectedIndexChange",function(a){return Ze(s.selectedIndex,a)||(s.selectedIndex=a),a}),Kn(5,EJi,1,1,"mat-tab",4,E_t),p()(),h(7,"div",5),Kn(8,MJi,6,12,null,null,E_t),p()()),r&2&&(g(2),b("noColorChange",!0),qe("value",s.showUrl1),g(2),qe("selectedIndex",s.selectedIndex),g(),Yn(s.studios),g(3),Yn(s.studios))},dependencies:[L7,At,Yt,_x,eP,Nn],styles:[".iframe-wrapper[_ngcontent-%COMP%]{position:fixed;inset:48px 0 0;visibility:hidden}.iframe-wrapper.visible[_ngcontent-%COMP%]{visibility:visible}"],changeDetection:0});let t=e;return t})()});function IJi(t,e){if(t&1&&(h(0,"mat-button-toggle",3),y(1),p()),t&2){let n=e.$implicit;b("value",n.url),g(),ye(n.name)}}function AJi(t,e){if(t&1&&ee(0,"mat-tab",6),t&2){let n=e.$implicit;b("label",n.name)}}function PJi(t,e){if(t&1&&(h(0,"div",9)(1,"div"),y(2),p(),ee(3,"iframe",10),Ce(4,"safeUrl"),p()),t&2){let n=e.$implicit,i=w(),r=i.$implicit,s=i.$index,o=w();ki("visible",s===o.studioIndex&&o.currentPage===n.url),g(2),ye(r.url+o.currentPage),g(),b("src",Nt(4,4,r.url+o.currentPage,!0),y8)}}function RJi(t,e){if(t&1&&Kn(0,PJi,5,7,"div",8,kJi),t&2){let n=w();Yn(n.pages)}}var I_t,kJi,A_t,P_t=Q(()=>{me();Gi();Zi();YA();$D();YX();oo();i6();me();Vt();I_t=(t,e)=>e.name,kJi=(t,e)=>e.url;A_t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.currentPage="/calendar",this.pages=[{name:"Kalender",url:"/calendar"},{name:"CashReport",url:"/studio-cash-report-2"},{name:"Broadcast",url:"/broadcast"},{name:"Zahlen",url:"/studio-fee"}],this.studios=[{name:"Aachen",url:"https://ac.nxt-lvl.ink"},{name:"D\xFCsseldorf",url:"https://du.nxt-lvl.ink"},{name:"Mallorca",url:"https://ma.nxt-lvl.ink"},{name:"Frankfurt",url:"https://ffm.nxt-lvl.ink"},{name:"Aschaffenburg",url:"https://ab.nxt-lvl.ink"},{name:"N\xFCrnberg",url:"https://nu.nxt-lvl.ink"}],this.studioIndex=0}ngOnInit(){}nxtOnDestroy(){}buttonChanged(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-multi-view-2"]],standalone:!0,features:[et,xe],decls:12,vars:2,consts:[[1,"nxt-page","!p-0"],[1,"flex","flex-row","justify-stretch","items-center"],[1,"flex",3,"valueChange","value"],[3,"value"],[1,"flex","flex-grow"],[1,"h-fit","w-full",3,"selectedIndexChange","selectedIndex"],["fxLayout","column",1,"w-full","h-fit",3,"label"],[1,"flex","flex-column","w-full","h-full"],[1,"iframe-wrapper",3,"visible"],[1,"iframe-wrapper"],[1,"w-full","h-full",3,"src"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"mat-button-toggle-group",2),Xe("valueChange",function(a){return Ze(s.currentPage,a)||(s.currentPage=a),a}),F("valueChange",function(){return s.buttonChanged()}),Kn(3,IJi,2,2,"mat-button-toggle",3,sa),p(),h(5,"div",4)(6,"mat-tab-group",5),Xe("selectedIndexChange",function(a){return Ze(s.studioIndex,a)||(s.studioIndex=a),a}),Kn(7,AJi,1,1,"mat-tab",6,I_t),p()()(),h(9,"div",7),Kn(10,RJi,2,0,null,null,I_t),p()()),r&2&&(g(2),qe("value",s.currentPage),g(),Yn(s.pages),g(3),qe("selectedIndex",s.studioIndex),g(),Yn(s.studios),g(3),Yn(s.studios))},dependencies:[L7,At,Yt,_x,eP,nm,Dm],styles:[".iframe-wrapper[_ngcontent-%COMP%]{position:fixed;inset:48px 0 0;visibility:hidden}.iframe-wrapper.visible[_ngcontent-%COMP%]{visibility:visible}"],changeDetection:0});let t=e;return t})()});var R_t,F_t=Q(()=>{me();Gi();a3();Ep();Jr();pX();nc();me();R_t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.artistConfirmService=Ve(OA),this.date2FormControl=new $t("2021-01-01",[],"Datum"),this.pwFormControl=new $t("",[ii.requiredAndNotNaN],"Datum"),this.value2="2028-01-02"}ngOnInit(){}nxtOnDestroy(){}test(){this.date2FormControl.setValue("2021-01-02"),this.value2="2028-01-31"}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-test"]],standalone:!0,features:[et,xe],decls:8,vars:5,consts:[["clasS","nxt-page"],[3,"nxtFormControl"],[3,"valueChange","value"],[3,"click"],["type","password",3,"nxtFormControl"]],template:function(r,s){r&1&&(h(0,"div",0),ee(1,"nxt-date-picker-2",1),y(2),h(3,"nxt-date-picker-2",2),Xe("valueChange",function(a){return Ze(s.value2,a)||(s.value2=a),a}),p(),y(4),h(5,"button",3),F("click",function(){return s.test()}),y(6,"createArtistConfirm"),p(),ee(7,"nxt-input",4),p()),r&2&&(g(),b("nxtFormControl",s.date2FormControl),g(),Ke(" value: ",s.date2FormControl.value," "),g(),qe("value",s.value2),g(),Ke(" value2: ",s.value2," "),g(3),b("nxtFormControl",s.pwFormControl))},dependencies:[_f,Yi],changeDetection:0});let t=e;return t})()});function FJi(t,e){if(t&1&&(h(0,"div",10)(1,"div",6)(2,"div",11),y(3,"SEITE"),p(),h(4,"div"),y(5),p()()()),t&2){let n=w();g(2),b("nxtTranslate",n.lang),g(3),Ke("\xA0",n.pageCountCurrent+" / "+n.pageCountTotal,"")}}function LJi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",12)(2,"div",13)(3,"table",14)(4,"tr")(5,"td"),y(6,"\u30FB\uFE0F"),p(),h(7,"td",11),y(8,"Die handels\xFCbliche Frischhaltefolie, mit der dein Tattoo bei uns abgedeckt wurde, solltest du nach 2-3 Stunden maximal entfernen. Im Anschluss muss das Tattoo mit lauwarmen klarem Wasser sauber gemacht werden. Mit einem Zewa kannst du es gerne vorsichtig trocken tupfen. In gar keinem Fall solltest du es mit einem Handtuch trocken reiben. "),p()(),h(9,"tr")(10,"td"),y(11,"\u30FB\uFE0F"),p(),h(12,"td",11),y(13,"Hiernach braucht dein Tattoo keine Folie mehr, da es nichts anderes als eine offene Sch\xFCrfwunde ist, die Luft braucht, um zu heilen. "),p()(),h(14,"tr")(15,"td"),y(16,"\u30FB\uFE0F"),p(),h(17,"td",11),y(18,"In den ersten zwei N\xE4chten kannst du dein Tattoo gerne mit einer Wickelunterlage umwickeln, zum Schutz vor Schmutz und Kleidungsfasern. "),p()()()()(),h(19,"nxt-declarations-of-consent-section",15)(20,"div",13)(21,"table",14)(22,"tr")(23,"td"),y(24,"\u30FB\uFE0F"),p(),h(25,"td",11),y(26,"Es ist absolut wichtig, das Tattoo in der Heilphase von vier bis sechs Wochen regelm\xE4\xDFig einzucremen. "),p()(),h(27,"tr")(28,"td"),y(29,"\u30FB\uFE0F"),p(),h(30,"td",11),y(31,"Innerhalb der ersten 24-48 Stunden nach dem Stechen, allerdings nicht. W\xE4hrend des T\xE4towierens \xF6ffnen sich die Hautporen und es wird eine gro\xDFe Menge Vaseline eingearbeitet. Innerhalb der ersten zwei Tage st\xF6\xDFt die Haut \xFCbersch\xFCssige Tinte und Wundfl\xFCssigkeit ab. Dementsprechend solltest du dein Tattoo bitte innerhalb der ersten 48 Stunden nur ca. viermal t\xE4glich mit klarem Wasser abwaschen und mit Zewa trocken tupfen. Sofern du es doch eincremst, verstopfen die Poren und es kommt zu einer Entz\xFCndung. "),p()(),h(32,"tr")(33,"td"),y(34,"\u30FB\uFE0F"),p(),h(35,"td",11),y(36,"Nach 48 Stunden fangen die Poren an sich zu schlie\xDFen und der Heilungsprozess beginnt. Ab diesem Zeitpunkt solltest du dein Tattoo NACH DEM S\xC4UBERN zwei bis drei mal t\xE4glich hauchd\xFCnn eincremen. "),p()(),h(37,"tr")(38,"td"),y(39,"\u30FB"),p(),h(40,"td",11),y(41,"Zur H\xE4ufigkeit des Cremens gibt es kein Geheimrezept! Jeder Hauttyp ist unterschiedlich. So sollten Menschen mit \xF6liger Haut weniger h\xE4ufig, und Menschen mit eher trockener Haut besser regelm\xE4\xDFiger eincremen. "),p()(),h(42,"tr")(43,"td"),y(44,"\u30FB"),p(),h(45,"td",11),y(46,"Zu h\xE4ufiges, sowie zu dickes Auftragen von Creme, kann zum Aufweichen der Haut und Farbverlust oder Pustelbildung f\xFChren. Cremt man zu wenig, bildet sich eine zu dicke Kruste auf dem Tattoo, die einrei\xDFen oder aufplatzen kann und ebenfalls zu Farbverlust oder sogar Vernarbung f\xFChren kann. "),p()(),h(47,"tr")(48,"td"),y(49,"\u30FB"),p(),h(50,"td",11),y(51,"Verwende bitte eine geeignete Tattoocreme ohne Panthenol, keine Vaseline oder Bepanthen!"),p()()()()(),h(52,"nxt-declarations-of-consent-section",16)(53,"div",13)(54,"table",14)(55,"tr")(56,"td"),y(57,"\u30FB"),p(),h(58,"td",11),y(59,"Reinige das Tattoo nicht mit einer herk\xF6mmlichen Seife oder Duschgel. Diese sind wegen enthaltener Parf\xFCmstoffe und zu hohem ph-Wert nicht geeignet. Du kannst einfach eine handels\xFCbliche Babyseife verwenden. Diese sind in der Regel unparf\xFCmiert. "),p()()()()()()),t&2){let n=w();g(),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(5),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(6),b("nxtTranslate",n.lang)}}function OJi(t,e){if(t&1&&(h(0,"div")(1,"nxt-declarations-of-consent-section",17)(2,"div",13)(3,"table",14)(4,"tr")(5,"td"),y(6,"\u30FB"),p(),h(7,"td",11),y(8,"Schwei\xDF (Bakterien) und Schmutz k\xF6nnen zu Entz\xFCndungen f\xFChren. Deshalb solltest du die Wunde m\xF6glichst sauber halten und vorerst auf Sport und schwei\xDFtreibende Aktivit\xE4ten verzichten, f\xFCr ca. 4 Wochen. "),p()()()()(),h(9,"nxt-declarations-of-consent-section",18)(10,"div",13)(11,"table",14)(12,"tr")(13,"td"),y(14,"\u30FB"),p(),h(15,"td",11),y(16,"Direkte Sonneneinstrahlung ist f\xFCr ca. 4 Wochen ebenfalls zu vermeiden, da die frische Farbe dadurch verblasst und es auf der wunden und d\xFCnnen, Haut leicht zu einem Sonnenbrand kommen kann, durch den sich die Haut, samt Tattoo, absch\xE4len k\xF6nnte "),p()()()()(),h(17,"nxt-declarations-of-consent-section",19)(18,"div",13)(19,"table",14)(20,"tr")(21,"td"),y(22,"\u30FB"),p(),h(23,"td",11),y(24,"Vollb\xE4der oder zu langes Duschen sind w\xE4hrend des Heilungsprozesses zu vermeiden, da das Tattoo aufweichen kann, was zu Farbverlust f\xFChren kann. Vom Baden im Meer, Seen oder Frei-/Hallenb\xE4dern ist komplett abzuraten, da es zu Wundinfektionen f\xFChren kann. "),p()()()()(),h(25,"nxt-declarations-of-consent-section",20)(26,"div",13)(27,"table",14)(28,"tr")(29,"td"),y(30,"\u30FB"),p(),h(31,"td",11),y(32,"W\xE4hrend des Abheilens ist es ganz normal, dass die Haut anfangen kann zu jucken. Kratzen solltest du auf keinen Fall \u2013 dies besch\xE4digt dein Tattoo. "),p()()()()(),h(33,"nxt-declarations-of-consent-section",21)(34,"div",13)(35,"table",14)(36,"tr")(37,"td"),y(38,"\u30FB"),p(),h(39,"td",11),y(40,"Zu enge Kleidung scheuert an der Wunde und reizt das Tattoo. Fusseln, die nicht entfernt werden, k\xF6nnen zu Entz\xFCndungen f\xFChren. Kleidung aus Baumwolle hat sich bew\xE4hrt da es Wundsekrete gut aufnimmt und leicht zu reinigen ist. "),p()()()()(),h(41,"nxt-declarations-of-consent-section",22)(42,"div",13)(43,"table",14)(44,"tr")(45,"td"),y(46,"\u30FB"),p(),h(47,"td",11),y(48,"Lasse die betroffene Stelle in lauwarmen Wasser einweichen und versuche dann die Kleidung langsam und vorsichtig, wieder abl\xF6sen. Danach ist das Tattoo zu reinigen und einzucremen. "),p()()()()(),h(49,"nxt-declarations-of-consent-section",23)(50,"div",13)(51,"table",14)(52,"tr")(53,"td"),y(54,"\u30FB"),p(),h(55,"td",11),y(56,"Gerade w\xE4hrend der Wundheilung sollte man darauf achten, ausreichend Vitamin C zu sich zu nehmen. Zu wenig Vitamin C im K\xF6rper beeintr\xE4chtigt die Wundheilung. Dies ist insbesondere beim Genuss von Alkohol zu beachten, da dieser Vitamine abbaut. "),p()()()()()()),t&2){let n=w();g(),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(8),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(6),b("nxtTranslate",n.lang),g(2),b("lang",n.lang),g(6),b("nxtTranslate",n.lang)}}var L_t,O_t=Q(()=>{Gi();Ul();aj();ri();OM();me();Cs();ma();L_t=(()=>{let e=class e extends bt{constructor(i,r){if(super(),this.configService=i,this.route=r,this.pageCountCurrent=1,this.pageCountTotal=2,this.signatureName="",this.artistEmployed=!1,this.lang="de",this.route.snapshot.queryParams.page&&(this.pageCountCurrent=parseInt(this.route.snapshot.queryParams.page,10),this.lang=this.route.snapshot.queryParams.lang||"de"),this.route.snapshot.queryParams.data){let s=Qn.parse(this.route.snapshot.queryParams.data);this.pageCountCurrent=s.page,typeof s.artistEmployed=="boolean"&&(this.artistEmployed=s.artistEmployed),this.lang=s.lang||"de"}this.calc()}ngOnInit(){}calc(){[0,1,2].includes(this.pageCountCurrent)?this.signatureName="Deine Unterschrift":this.pageCountCurrent===3&&(this.signatureName="Unterschrift Erziehungsberechtigte(r)")}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)(R(Xi),R(gs))},e.\u0275cmp=_e({type:e,selectors:[["nxt-after-care-instruction-tattoo"]],standalone:!0,features:[et,xe],decls:22,vars:8,consts:[[1,"flex","flex-col","w-full","h-full","text-[10px]","page-wrapper","p-relative"],["class","fixed-header text-xl",4,"ngIf"],[1,"flex","justify-center","p-3"],[1,"flex","flex-col","justify-center","items-center"],["src","../../../../assets/logo/logo_black.svg",2,"width","6cm"],[1,"flex","flex-row","mt-1","logo-text"],[1,"flex","flex-row"],[1,"gold"],[1,"flex","text-3xl","flex-col","items-center","pb-3","header"],[1,"text-center",3,"nxtTranslate"],[1,"fixed-header","text-xl"],[3,"nxtTranslate"],["titleText","FOLIE: ANWENDUNG UND HINWEISE",3,"lang"],[1,"py-3","px-10"],[1,"w-full","info-table"],["titleText","CREMEN",3,"lang"],["titleText","WASCHEN/ REINIGEN DES TATTOOS",3,"lang"],["titleText","SCHWEISS/ SCHMUTZ IN DER WUNDE VERMEIDEN",3,"lang"],["titleText","KEINE DIREKTE SONNE ODER SOLARIUM"],["titleText","BADEN/ LANGES DUSCHEN VERMEIDEN",3,"lang"],["titleText","NICHT KRATZEN",3,"lang"],["titleText","FUSSELIGE ODER ENGE KLEIDUNG",3,"lang"],["titleText","KLEIDUNG KLEBT AM TATTOO",3,"lang"],["titleText","RICHTIGE ERN\xC4HRUNG KANN DIE WUNDHEILUNG UNTERST\xDCTZEN",3,"lang"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,FJi,6,2,"div",1),h(2,"div",2)(3,"div",3)(4,"div"),ee(5,"img",4),p(),h(6,"div",5)(7,"div"),y(8),p(),h(9,"div",6)(10,"div",7),y(11,"\u30FB"),p(),y(12),p(),h(13,"div",6)(14,"div",7),y(15,"\u30FB"),p(),y(16),p()()()(),h(17,"div",8)(18,"div",9),y(19,"PFLEGEHINWEISE TATTOO"),p()(),W(20,LJi,60,13,"div")(21,OJi,57,13,"div"),p()),r&2&&(g(),b("ngIf",s.pageCountCurrent>0&&s.pageCountCurrent<=s.pageCountTotal),g(7),Ke("NXT-LVL.INK ",s.configService.config.value.studioName,""),g(4),Ke(" ",s.configService.config.value.invoiceData.fromStreet," "),g(4),cn(" ",s.configService.config.value.invoiceData.fromPostalCode," ",s.configService.config.value.invoiceData.fromCity," "),g(2),b("nxtTranslate",s.lang),g(2),Je(s.pageCountCurrent===1?20:-1),g(),Je(s.pageCountCurrent===2?21:-1))},dependencies:[Ct,_S,Q6],styles:["@page{size:A4;margin:1cm}[_nghost-%COMP%]{font-family:Open Sans,sans-serif;-webkit-print-color-adjust:exact}[_nghost-%COMP%]     .mini-info-bar{display:none!important}.page-wrapper[_ngcontent-%COMP%]{padding:0}.footer[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:0}.fixed-header[_ngcontent-%COMP%]{font-weight:600;font-family:Montserrat,serif;color:#b7860f;position:fixed;top:0;right:0}.header[_ngcontent-%COMP%]{font-weight:800;font-family:Montserrat,serif;color:#b7860f}.logo-text[_ngcontent-%COMP%]{padding-top:5px;font-weight:600;font-family:Montserrat,serif;border-bottom:1px solid #b7860f}.logo-text-left[_ngcontent-%COMP%]{padding-top:5px;font-weight:600;font-family:Montserrat,serif}.title-2[_ngcontent-%COMP%]{font-size:16px;font-weight:700}.title-2[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:400;font-size:14px}.info-table[_ngcontent-%COMP%]{font-size:12px}.info-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:baseline;padding-right:8px}.info-table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:5px}.info-table-small[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{vertical-align:baseline;padding-right:4px}.info-table-small[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding-top:3px}.anamnese-table[_ngcontent-%COMP%]{border-collapse:collapse}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border:1px solid black;padding:3px 6px;font-size:10px}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .small-english[_ngcontent-%COMP%]{font-size:8px}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{line-height:1.2}.anamnese-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .small-english[_ngcontent-%COMP%]{color:#545454}"]});let t=e;return t})()});var N_t,V_t=Q(()=>{me();Gi();Pm();nj();$w();a3();Sse();Im();Df();Am();Tf();dTe();ji();me();N_t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.dialogRef=Ve(Gt)}ngOnInit(){}nxtOnDestroy(){}closeClicked(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-messenger"]],standalone:!0,features:[et,xe],decls:7,vars:1,consts:[[3,"dialogRef"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Messenger"),p()(),h(4,"nxt-page-content"),ee(5,"nxt-messenger-chat-list"),p(),ee(6,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef))},dependencies:[Pl,f_,Al,Kl,Yl,hc,z6t],changeDetection:0});let t=e;return t})()});function VJi(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=e.$implicit;g(),cn("",n.user,": ",n.count,"")}}var B_t,NJi,z_t,H_t=Q(()=>{me();Gi();Am();Pm();Tf();Im();ji();Pa();Qo();yi();Df();B_t=Gs(P7());Ci();me();NJi=(t,e)=>e.user;z_t=(()=>{let e=class e extends bt{constructor(){super(),this.events=gt([]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogService=Ve(vt),this.dialogRef=Ve(Gt,{optional:!0}),this.columnDefs=[{headerName:"",field:"id",nxtFieldType:Ee.ShowCalendarEvent},{headerName:"Datum",field:"start",nxtFieldType:Ee.Date_germanDateTime},{headerName:"Kassiert",field:"firstReceptionPaymentUsername",nxtFieldType:Ee.Text,valueGetter:i=>{let r=i.data.payments.find(s=>s.createdAtDateString===i.data.startDateString&&s.workplace==="reception");return r?r.createdBy:""}},{headerName:"Stencil gesehen",nxtFieldType:Ee.Text,valueGetter:i=>i.data.stencilSeen?.seenBy||""}],this.users=vr(()=>{let i={};return this.events().forEach(r=>{r.firstReceptionPaymentUsername&&(i[r.firstReceptionPaymentUsername]||(i[r.firstReceptionPaymentUsername]=0),i[r.firstReceptionPaymentUsername]++)}),(0,B_t.keys)(i).map(r=>({user:r,count:i[r]}))})}ngOnInit(){return O(this,null,function*(){this.dialogService.showLoading("Lade...");let i=yield this.socketService.getEventsConsentCheckInvalid();i.forEach(r=>{let s=r.payments.find(o=>o.createdAtDateString===r.startDateString&&o.workplace==="reception");s&&(r.firstReceptionPaymentUsername=s.createdBy)}),this.events.set(i.sortNumber("start")),this.dialogService.hideLoading()})}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-consent-check"]],standalone:!0,features:[et,xe],decls:10,vars:3,consts:[[3,"dialogRef"],["excelExportName","Einwilligungs-Check",3,"columnDefs","rowData"],[1,"flex","flex-row","gap-4"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Einwilligungserkl\xE4rungen mit Fehler"),p()(),h(4,"nxt-page-content"),ee(5,"nxt-datagrid",1),p(),h(6,"nxt-page-footer")(7,"div",2),Kn(8,VJi,2,2,"div",null,NJi),p()()()),r&2&&(g(),b("dialogRef",s.dialogRef),g(4),b("columnDefs",s.columnDefs)("rowData",s.events()),g(3),Yn(s.users()))},dependencies:[Pl,Yl,hc,Al,Kl,dr],changeDetection:0});let t=e;return t})()});var G_t,W_t=Q(()=>{me();Gi();Pm();Am();Tf();Im();Df();E8();Ci();Pa();yi();Ul();Qo();q4e();ji();me();G_t=(()=>{let e=class e extends bt{constructor(){super(),this.klarnaDisputes=gt([]),this.cdRef=Ve(Kt),this.dialogRef=Ve(Gt,{optional:!0}),this.dialogService=Ve(vt),this.socketService=Ve(lt),this.columnDefs=[{headerName:"Er\xF6ffnet",field:"openedAt",nxtFieldType:Ee.Date_germanDateTime},{headerName:"Fristablauf",field:"rawDispute.deadline_expires_at",nxtFieldType:Ee.Date_germanDateTime},{headerName:"Id",valueGetter:i=>i.data.id.split(":")[5],hide:!0},{headerName:"Shop",field:"shopOrderId",nxtOnCellClicked:i=>this.showJson(i.data.rawDispute)},{headerName:"Name",field:"name"},{headerName:"Status",field:"rawDispute.status",valueFormatter:i=>gx.getDisputeText("status",i.value)},{headerName:"Info",field:"statusText"},{headerName:"Beanstandet",field:"value",nxtFieldType:Ee.Money},{headerName:"Bekommen",field:"refundValue",nxtFieldType:Ee.Money},{headerName:"Untersuchugsstatus",field:"rawDispute.investigation_status"},{headerName:"\xD6ffnungsgrund",field:"reason",valueFormatter:i=>gx.getDisputeText("reason",i.value)},{headerName:"Ergebnis",field:"rawDispute.closing_reason",valueFormatter:i=>gx.getDisputeText("closing_reason",i.value)},{headerName:"Schlie\xDFungsgrund",field:"rawDispute.closing_reason_detailed",valueFormatter:i=>gx.getDisputeText("closing_reason_detailed",i.value)},{headerName:"Requests",valueGetter:i=>i.data?.rawDispute?.requests.length,nxtOnCellClicked:i=>this.showJson(i.data.rawDispute.requests)},{headerName:"Refunds",valueGetter:i=>i.data?.refunds?.length,nxtOnCellClicked:i=>this.showJson(i.data.refunds)},{headerName:"Chargeback Amount",field:"rawDispute.chargeback_amount.amount"}],this.DialogRef=Jf}ngOnInit(){this.load()}nxtOnDestroy(){}load(){return O(this,null,function*(){this.klarnaDisputes.set((yield this.socketService.getKlarnaDisputes()).sortNumber("openedAt",!0))})}showJson(i){this.dialogService.showOk(Qn.stringifyFormat(i,"	"))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-klarna-disputes"]],standalone:!0,features:[et,xe],decls:7,vars:3,consts:[[3,"dialogRef"],[3,"columnDefs","rowData"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Klarna Beanstandungen"),p()(),h(4,"nxt-page-content"),ee(5,"nxt-datagrid",1),p(),ee(6,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(4),b("columnDefs",s.columnDefs)("rowData",s.klarnaDisputes()))},dependencies:[Pl,Yl,hc,Al,Kl,dr],changeDetection:0});let t=e;return t})()});function BJi(t,e){t&1&&ee(0,"nxt-spinner")}function zJi(t,e){if(t&1&&(h(0,"div",4),y(1,"Einrichtung abgeschlossen"),p(),h(2,"div",5),y(3),p()),t&2){let n=w();g(3),Ke('Das "',n.model(),'" ist bereit.')}}function HJi(t,e){if(t&1&&(ee(0,"div",1),Ce(1,"safeHtml")),t&2){let n=w();b("innerHTML",tt(1,1,n.errorText()),Pi)}}function GJi(t,e){t&1&&(h(0,"div",2),y(1,"Appointment is canceled"),p())}function WJi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",7),F("click",function(){V(n);let r=w(3);return B(r.typeClicked("preTattoo"))}),ee(2,"div",8),Ce(3,"safeHtml"),p()()}if(t&2){let n=w();g(),b("bigButton",!0),g(),b("innerHTML",tt(3,2,n.tattooBeforeButtonText),Pi)}}function UJi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",7),F("click",function(){V(n);let r=w(3);return B(r.typeClicked("stencil"))}),ee(2,"div",8),Ce(3,"safeHtml"),p()()}if(t&2){let n=w();g(),b("bigButton",!0),g(),b("innerHTML",tt(3,2,n.stencilButtonText),Pi)}}function jJi(t,e){if(t&1){let n=re();h(0,"div")(1,"nxt-button",7),F("click",function(){V(n);let r=w(3);return B(r.typeClicked("tattoo"))}),ee(2,"div",8),Ce(3,"safeHtml"),p()()}if(t&2){let n=w();g(),b("bigButton",!0),g(),b("innerHTML",tt(3,2,n.tattooButtonText),Pi)}}function $Ji(t,e){if(t&1&&(ee(0,"div",6),Ce(1,"safeHtml"),W(2,WJi,4,4,"div")(3,UJi,4,4,"div")(4,jJi,4,4,"div")),t&2){let n=e;b("innerHTML",tt(1,4,n.headerText),Pi),g(2),Je(n.tattooBeforeButtonText?2:-1),g(),Je(n.stencilButtonText?3:-1),g(),Je(n.tattooButtonText?4:-1)}}function KJi(t,e){if(t&1&&(h(0,"div",3),W(1,$Ji,5,6),p()),t&2){let n,i=w();g(),Je((n=i.eventQrCodePreData())?1:-1,n)}}function YJi(t,e){if(t&1&&(h(0,"div",11),y(1,"Stencil"),p(),ee(2,"div",12)),t&2){let n=w();g(2),b("innerHTML",n.stencilInstruction,Pi)}}function qJi(t,e){if(t&1&&(h(0,"div",11),y(1,"Pre-Tattoo"),p(),ee(2,"div",12)),t&2){let n=w();g(2),b("innerHTML",n.preTattooInstruction,Pi)}}function ZJi(t,e){if(t&1&&(h(0,"div",11),y(1,"Tattoo"),p(),ee(2,"div",12)(3,"br")(4,"div",13)),t&2){let n=w();g(2),b("innerHTML",n.tattooInstruction,Pi),g(2),b("innerHTML",n.minText,Pi)}}function XJi(t,e){if(t&1&&(h(0,"div",9)(1,"div",10),y(2),p(),W(3,YJi,3,1)(4,qJi,3,1)(5,ZJi,5,2),p()),t&2){let n=w(2);g(2),Ke("Hello ",e.artist,"!"),g(),Je(n.type()==="stencil"?3:-1),g(),Je(n.type()==="preTattoo"?4:-1),g(),Je(n.type()==="tattoo"?5:-1)}}function QJi(t,e){if(t&1&&W(0,XJi,6,4,"div",9),t&2){let n,i=w();Je((n=i.eventQrCodePreData())?0:-1,n)}}var Nse,U_t=Q(()=>{me();Gi();ma();Gy();$n();L1();$D();Zi();ha();Ci();me();Nse=(()=>{let e=class e extends bt{constructor(){super(),this.view=gt("loading"),this.errorText=gt(""),this.eventQrCodePreData=gt(null),this.type=gt(""),this.cdRef=Ve(Kt),this.activatedRoute=Ve(gs),this.httpClient=Ve(Uc),this.dialogService=Ve(vt),this.model=gt(""),this.secret=gt(""),this.eventId=""}ngOnInit(){this.activatedRoute.params.subscribe(i=>{try{i.eventId?this.startEvent(i.eventId).then():i.model&&i.secret&&this.init(i.model,i.secret)}catch(r){this.dialogService.showOk(r.message)}})}nxtOnDestroy(){}startEvent(i){return O(this,null,function*(){try{this.eventId=i,this.model.set(localStorage.getItem("eventQrModel")),this.secret.set(localStorage.getItem("eventQrSecret")),!this.model()||!this.secret()?window.location.href="https://p.nxtlvl.ink/w/"+this.getStudioFromHost()+"/"+i:(this.eventQrCodePreData.set(yield this.getEventQrCodePreData()),this.eventQrCodePreData().canceled?this.view.set("canceled"):this.view.set("showButtons"))}catch(r){r.status===401?this.errorText.set(`Login ung\xFCltig
Bitte in Aachen bei Niklas melden`):this.errorText.set(r.message),this.view.set("error")}})}init(i,r){this.model.set(i),this.secret.set(r),localStorage.setItem("eventQrModel",i),localStorage.setItem("eventQrSecret",r),this.view.set("initDone")}getEventQrCodePreData(){return O(this,null,function*(){let i=window.location.origin+"/getEventQr";return window.location.origin.includes("localhost")&&(i="http://localhost:444/getEventQr"),Sn(this.httpClient.post(i,{eventId:this.eventId,model:this.model(),secret:this.secret()}))})}setEventQrCodePreData(){return O(this,null,function*(){let i=window.location.origin+"/setEventQr2";return window.location.origin.includes("localhost")&&(i="http://localhost:444/setEventQr2"),Sn(this.httpClient.post(i,{eventId:this.eventId,timestamp:Date.now(),type:this.type(),model:this.model(),secret:this.secret()}))})}getStudioFromHost(){let i=window.location.host;return i.includes("localhost")&&(i="ac.nxt-lvl.ink"),i.split(".")[0]}typeClicked(i){return O(this,null,function*(){this.type.set(i),yield this.setEventQrCodePreData(),this.view.set("finished")})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-event-qr-2"]],standalone:!0,features:[et,xe],decls:7,vars:1,consts:[[1,"flex","h-full","w-full","flex-col","items-center","justify-center","nxt-background-image"],[1,"text-2xl","red","center",3,"innerHTML"],[1,"text-2xl","red","center"],[1,"flex","w-full","flex-col","items-center","justify-center","gap-6"],[1,"text-2xl"],[1,"mt-2","px-5","text-xl","center"],[1,"px-6","text-2xl","center",3,"innerHTML"],[3,"click","bigButton"],[3,"innerHTML"],[1,"flex","h-full","w-full","flex-col","items-center","justify-center","px-4"],[1,"pb-2","text-250",2,"text-align","center"],[1,"pb-4","font-bold","text-[150%]"],[1,"text-170",2,"text-align","center",3,"innerHTML"],[1,"text-250","red","animate__animated","animate__tada","center",2,"text-align","center",3,"innerHTML"]],template:function(r,s){r&1&&(h(0,"div",0),W(1,BJi,1,0,"nxt-spinner")(2,zJi,4,1)(3,HJi,2,3,"div",1)(4,GJi,2,0,"div",2)(5,KJi,2,1,"div",3)(6,QJi,1,1),p()),r&2&&(g(),Je(s.view()==="loading"?1:s.view()==="initDone"?2:s.view()==="error"?3:s.view()==="canceled"?4:s.view()==="showButtons"?5:s.view()==="finished"?6:-1))},dependencies:[yf,At,Lt,Or],styles:["[_nghost-%COMP%]{color:#bbb}"],changeDetection:0});let t=e;return t})()});var j_t,$_t=Q(()=>{me();Gi();Zi();n1();Ul();me();j_t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.text=gt("")}ngOnInit(){this.text.set(`
    [
  "<link rel=\\"preconnect\\" href=\\"https://fonts.googleapis.com\\">\\n<link rel=\\"preconnect\\" href=\\"https://fonts.gstatic.com\\" crossorigin>\\n<link href=\\"https://fonts.googleapis.com/css2?family=Covered+By+Your+Grace&family=Edu+AU+VIC+WA+NT+Hand:wght@400..700&family=Macondo&family=Mrs+Saint+Delafield&family=Playwrite+CL:wght@100..400&family=Playwrite+CZ:wght@100..400&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap\\" rel=\\"stylesheet\\">\\ncontent_copy\\nCopy code",
  ".mrs-saint-delafield-regular {\\n  font-family: \\"Mrs Saint Delafield\\", cursive;\\n  font-weight: 400;\\n  font-style: normal;\\n}\\n\\ncontent_copy\\nCopy code",
  "// <uniquifier>: Use a unique and descriptive class name\\n// <weight>: Use a value from 100 to 400\\n\\n.playwrite-cl-<uniquifier> {\\n  font-family: \\"Playwrite CL\\", cursive;\\n  font-optical-sizing: auto;\\n  font-weight: <weight>;\\n  font-style: normal;\\n}\\ncontent_copy\\nCopy code",
  "// <uniquifier>: Use a unique and descriptive class name\\n// <weight>: Use a value from 400 to 700\\n\\n.edu-au-vic-wa-nt-hand-<uniquifier> {\\n  font-family: \\"Edu AU VIC WA NT Hand\\", cursive;\\n  font-optical-sizing: auto;\\n  font-weight: <weight>;\\n  font-style: normal;\\n}\\ncontent_copy\\nCopy code",
  "// <uniquifier>: Use a unique and descriptive class name\\n// <weight>: Use a value from 100 to 400\\n\\n.playwrite-cz-<uniquifier> {\\n  font-family: \\"Playwrite CZ\\", cursive;\\n  font-optical-sizing: auto;\\n  font-weight: <weight>;\\n  font-style: normal;\\n}\\ncontent_copy\\nCopy code",
  ".macondo-regular {\\n  font-family: \\"Macondo\\", cursive;\\n  font-weight: 400;\\n  font-style: normal;\\n}\\n\\ncontent_copy\\nCopy code",
  ".covered-by-your-grace-regular {\\n  font-family: \\"Covered By Your Grace\\", cursive;\\n  font-weight: 400;\\n  font-style: normal;\\n}\\n\\ncontent_copy\\nCopy code",
  ".roboto-thin {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 100;\\n  font-style: normal;\\n}\\n\\n.roboto-light {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 300;\\n  font-style: normal;\\n}\\n\\n.roboto-regular {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 400;\\n  font-style: normal;\\n}\\n\\n.roboto-medium {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 500;\\n  font-style: normal;\\n}\\n\\n.roboto-bold {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 700;\\n  font-style: normal;\\n}\\n\\n.roboto-black {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 900;\\n  font-style: normal;\\n}\\n\\n.roboto-thin-italic {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 100;\\n  font-style: italic;\\n}\\n\\n.roboto-light-italic {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 300;\\n  font-style: italic;\\n}\\n\\n.roboto-regular-italic {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 400;\\n  font-style: italic;\\n}\\n\\n.roboto-medium-italic {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 500;\\n  font-style: italic;\\n}\\n\\n.roboto-bold-italic {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 700;\\n  font-style: italic;\\n}\\n\\n.roboto-black-italic {\\n  font-family: \\"Roboto\\", system-ui;\\n  font-weight: 900;\\n  font-style: italic;\\n}\\n\\ncontent_copy\\nCopy code"
]`)}nxtOnDestroy(){}testClicked(){let i=this.iframe.contentDocument.querySelectorAll("gf-code-snippet");console.log(i),console.log(i),console.log(i)}startClicked(){let i=[],r=Qn.parse(this.text());for(let s of r){let o=this.getHrefs(s);if(o.length>0)for(let a of o){let l=this.splitHrefFonts(a);for(let c of l)i.push({name:"",href:c})}else console.log(s),console.log(s),console.log(s)}}getHrefs(i){let r=/<link href="(.*)" rel="stylesheet"/gi,s,o=[];for(;s=r.exec(i),s!==null;)o.push(s[1]);return o}splitHrefFonts(i){let r=[],s=i.replaceAll("&display=swap","").split("family=");for(let o of s){console.log(o),console.log(o),console.log(o);let a=o.trimChar("&").trimChar("?");a.startsWith("https")||r.push(a)}return r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-font-extractor"]],viewQuery:function(r,s){if(r&1&&ei(HTMLIFrameElement,5),r&2){let o;Pt(o=Rt())&&(s.iframe=o.first)}},standalone:!0,features:[et,xe],decls:5,vars:1,consts:[[3,"click"],[3,"valueChange","value"]],template:function(r,s){r&1&&(h(0,"nxt-button",0),F("click",function(){return s.testClicked()}),y(1,"test"),p(),h(2,"nxt-textarea",1),Xe("valueChange",function(a){return Ze(s.text,a)||(s.text=a),a}),p(),h(3,"nxt-button",0),F("click",function(){return s.startClicked()}),y(4,"Start"),p()),r&2&&(g(2),qe("value",s.text))},dependencies:[Lt,yu],changeDetection:0});let t=e;return t})()});function een(t,e){if(t&1&&(h(0,"div")(1,"div"),y(2),p()(),h(3,"div",1),y(4,"Ich bin der Text Hallo"),p()),t&2){let n=e.$implicit;g(2),ye(n.name),g(),mo("font-family",n.name)}}var JJi,K_t,Y_t=Q(()=>{me();Gi();yi();me();JJi=(t,e)=>e.name;K_t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.fonts=gt([])}ngOnInit(){this.load()}load(){return O(this,null,function*(){let i=yield this.socketService.getFonts();this.fonts.set(i),this.loadFonts()})}nxtOnDestroy(){}loadFonts(){for(let i of this.fonts()){let r="/nxt-font/"+encodeURIComponent(i.name)+"."+i.fileExtension;window.location.hostname==="localhost"&&(r="http://localhost:444/nxt-font/"+encodeURIComponent(i.name)+"."+i.fileExtension),new FontFace(i.name,"url("+r+")").load().then(o=>{document.fonts.add(o)}).catch(function(o){console.error("Schriftart konnte nicht geladen werden:",o)})}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-fonts"]],standalone:!0,features:[et,xe],decls:3,vars:0,consts:[[1,"flex","flex-col","w-full","h-fill","overflow-auto",2,"background","#fff","color","#000"],[1,"text-[250%]"]],template:function(r,s){r&1&&(h(0,"div",0),Kn(1,een,5,3,null,null,JJi),p()),r&2&&(g(),Yn(s.fonts()))},styles:["[_nghost-%COMP%]{display:flex;border:0px solid red;height:100%;width:100%}"],changeDetection:0});let t=e;return t})()});function ten(t,e){if(t&1&&(h(0,"div"),y(1),p()),t&2){let n=e.$implicit;g(),ye(n)}}var q_t,Z_t=Q(()=>{me();Gi();a3();Zi();yi();$v();Pm();Am();Im();Df();ji();Tf();me();q_t=(()=>{let e=class e extends bt{constructor(){super(),this.logs=gt([]),this.cdRef=Ve(Kt),this.dialogRef=Ve(Gt,{optional:!0}),this.socketService=Ve(lt),this.from=gt(""),this.till=gt("")}ngOnInit(){this.interval=window.setInterval(()=>O(this,null,function*(){this.logs.set(yield this.socketService.getDriveMigrationLogs())}),1e3)}nxtOnDestroy(){Cu.clear(this.interval)}startClicked(){this.socketService.startDriveMigration(this.from(),this.till())}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-drive-migration"]],standalone:!0,features:[et,xe],decls:21,vars:3,consts:[[3,"dialogRef"],[1,"flex","flex-col"],[1,"flex","flex-row"],["placeholder","von",3,"valueChange","value"],["placeholder","bis",3,"valueChange","value"],[3,"click"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Messenger"),p()(),h(4,"nxt-page-content")(5,"div",1)(6,"div",2)(7,"nxt-date-picker-2",3),Xe("valueChange",function(a){return Ze(s.from,a)||(s.from=a),a}),p(),h(8,"nxt-date-picker-2",4),Xe("valueChange",function(a){return Ze(s.till,a)||(s.till=a),a}),p()(),h(9,"nxt-button",5),F("click",function(){return s.from.set("2024-06-01"),s.till.set("2024-06-30")}),y(10,"06 2024"),p(),h(11,"nxt-button",5),F("click",function(){return s.from.set("2024-07-01"),s.till.set("2024-07-31")}),y(12,"07 2024"),p(),h(13,"nxt-button",5),F("click",function(){return s.from.set("2024-08-01"),s.till.set("2024-08-31")}),y(14,"08 2024"),p(),h(15,"nxt-button",5),F("click",function(){return s.startClicked()}),y(16,"start"),p(),h(17,"div"),Kn(18,ten,2,1,"div",null,sa),p()()(),ee(20,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(6),qe("value",s.from),g(),qe("value",s.till),g(10),Yn(s.logs()))},dependencies:[_f,Lt,Pl,Yl,hc,Al,Kl],changeDetection:0});let t=e;return t})()});var X_t,Q_t=Q(()=>{me();Gi();d2();yi();ji();Zi();il();Cs();me();d2();X_t=(()=>{let e=class e extends bt{constructor(){super(),this.qrCode=gt(""),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogRef=Ve(Gt,{optional:!0}),this.configService=Ve(Xi)}ngOnInit(){this.qrCode.set("https://t.me/nxtlvlink_bot?start="+btoa("StudioSocialMedia:"+this.configService.config.value.studioRegion.toLowerCase()))}nxtOnDestroy(){}cancelClicked(){this.dialogRef.close()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-telegram-studio-social-media-start-chat"]],standalone:!0,features:[et,xe],decls:24,vars:2,consts:[[1,"flex","flex-col"],[1,"flex","flex-row"],["errorCorrectionLevel","M","colorDark","#FFF","colorLight","#2A2A2A",3,"qrdata","width"],[1,"flex","flex-row","justify-center"],[3,"click"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"div",0)(3,"table")(4,"tr")(5,"td"),y(6,"1."),p(),h(7,"td"),y(8,"auf dem Social-Media-Studio-Handy Telegram installieren und anmelden."),p()(),h(9,"tr")(10,"td"),y(11,"2."),p(),h(12,"td"),y(13,"Bitte mit dem Social-Media-Studio-Handy den QR-Code scannen."),p()(),h(14,"tr")(15,"td"),y(16,"3."),p(),h(17,"td"),y(18,"Fertig."),p()()()(),h(19,"div",0),ee(20,"qrcode",2),p()(),h(21,"div",3)(22,"nxt-button",4),F("click",function(){return s.cancelClicked()}),y(23,"Abbrechen"),p()()()),r&2&&(g(20),b("qrdata",s.qrCode())("width",300))},dependencies:[c2,r3,Lt],styles:["table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:10px;vertical-align:baseline}"],changeDetection:0});let t=e;return t})()});var e5t=xr((Vse,J_t)=>{(function(t,e){typeof Vse=="object"&&typeof J_t<"u"?e(Vse):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.leaflet={}))})(Vse,function(t){"use strict";var e="1.9.4";function n(T){var N,Z,ue,Pe;for(Z=1,ue=arguments.length;Z<ue;Z++){Pe=arguments[Z];for(N in Pe)T[N]=Pe[N]}return T}var i=Object.create||function(){function T(){}return function(N){return T.prototype=N,new T}}();function r(T,N){var Z=Array.prototype.slice;if(T.bind)return T.bind.apply(T,Z.call(arguments,1));var ue=Z.call(arguments,2);return function(){return T.apply(N,ue.length?ue.concat(Z.call(arguments)):arguments)}}var s=0;function o(T){return"_leaflet_id"in T||(T._leaflet_id=++s),T._leaflet_id}function a(T,N,Z){var ue,Pe,st,ti;return ti=function(){ue=!1,Pe&&(st.apply(Z,Pe),Pe=!1)},st=function(){ue?Pe=arguments:(T.apply(Z,arguments),setTimeout(ti,N),ue=!0)},st}function l(T,N,Z){var ue=N[1],Pe=N[0],st=ue-Pe;return T===ue&&Z?T:((T-Pe)%st+st)%st+Pe}function c(){return!1}function d(T,N){if(N===!1)return T;var Z=Math.pow(10,N===void 0?6:N);return Math.round(T*Z)/Z}function u(T){return T.trim?T.trim():T.replace(/^\s+|\s+$/g,"")}function m(T){return u(T).split(/\s+/)}function f(T,N){Object.prototype.hasOwnProperty.call(T,"options")||(T.options=T.options?i(T.options):{});for(var Z in N)T.options[Z]=N[Z];return T.options}function _(T,N,Z){var ue=[];for(var Pe in T)ue.push(encodeURIComponent(Z?Pe.toUpperCase():Pe)+"="+encodeURIComponent(T[Pe]));return(!N||N.indexOf("?")===-1?"?":"&")+ue.join("&")}var x=/\{ *([\w_ -]+) *\}/g;function D(T,N){return T.replace(x,function(Z,ue){var Pe=N[ue];if(Pe===void 0)throw new Error("No value provided for variable "+Z);return typeof Pe=="function"&&(Pe=Pe(N)),Pe})}var E=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"};function M(T,N){for(var Z=0;Z<T.length;Z++)if(T[Z]===N)return Z;return-1}var I="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function z(T){return window["webkit"+T]||window["moz"+T]||window["ms"+T]}var G=0;function A(T){var N=+new Date,Z=Math.max(0,16-(N-G));return G=N+Z,window.setTimeout(T,Z)}var Y=window.requestAnimationFrame||z("RequestAnimationFrame")||A,X=window.cancelAnimationFrame||z("CancelAnimationFrame")||z("CancelRequestAnimationFrame")||function(T){window.clearTimeout(T)};function ne(T,N,Z){if(Z&&Y===A)T.call(N);else return Y.call(window,r(T,N))}function pe(T){T&&X.call(window,T)}var ce={__proto__:null,extend:n,create:i,bind:r,get lastId(){return s},stamp:o,throttle:a,wrapNum:l,falseFn:c,formatNum:d,trim:u,splitWords:m,setOptions:f,getParamString:_,template:D,isArray:E,indexOf:M,emptyImageUrl:I,requestFn:Y,cancelFn:X,requestAnimFrame:ne,cancelAnimFrame:pe};function ie(){}ie.extend=function(T){var N=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},Z=N.__super__=this.prototype,ue=i(Z);ue.constructor=N,N.prototype=ue;for(var Pe in this)Object.prototype.hasOwnProperty.call(this,Pe)&&Pe!=="prototype"&&Pe!=="__super__"&&(N[Pe]=this[Pe]);return T.statics&&n(N,T.statics),T.includes&&(le(T.includes),n.apply(null,[ue].concat(T.includes))),n(ue,T),delete ue.statics,delete ue.includes,ue.options&&(ue.options=Z.options?i(Z.options):{},n(ue.options,T.options)),ue._initHooks=[],ue.callInitHooks=function(){if(!this._initHooksCalled){Z.callInitHooks&&Z.callInitHooks.call(this),this._initHooksCalled=!0;for(var st=0,ti=ue._initHooks.length;st<ti;st++)ue._initHooks[st].call(this)}},N},ie.include=function(T){var N=this.prototype.options;return n(this.prototype,T),T.options&&(this.prototype.options=N,this.mergeOptions(T.options)),this},ie.mergeOptions=function(T){return n(this.prototype.options,T),this},ie.addInitHook=function(T){var N=Array.prototype.slice.call(arguments,1),Z=typeof T=="function"?T:function(){this[T].apply(this,N)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(Z),this};function le(T){if(!(typeof L>"u"||!L||!L.Mixin)){T=E(T)?T:[T];for(var N=0;N<T.length;N++)T[N]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var Se={on:function(T,N,Z){if(typeof T=="object")for(var ue in T)this._on(ue,T[ue],N);else{T=m(T);for(var Pe=0,st=T.length;Pe<st;Pe++)this._on(T[Pe],N,Z)}return this},off:function(T,N,Z){if(!arguments.length)delete this._events;else if(typeof T=="object")for(var ue in T)this._off(ue,T[ue],N);else{T=m(T);for(var Pe=arguments.length===1,st=0,ti=T.length;st<ti;st++)Pe?this._off(T[st]):this._off(T[st],N,Z)}return this},_on:function(T,N,Z,ue){if(typeof N!="function"){console.warn("wrong listener type: "+typeof N);return}if(this._listens(T,N,Z)===!1){Z===this&&(Z=void 0);var Pe={fn:N,ctx:Z};ue&&(Pe.once=!0),this._events=this._events||{},this._events[T]=this._events[T]||[],this._events[T].push(Pe)}},_off:function(T,N,Z){var ue,Pe,st;if(this._events&&(ue=this._events[T],!!ue)){if(arguments.length===1){if(this._firingCount)for(Pe=0,st=ue.length;Pe<st;Pe++)ue[Pe].fn=c;delete this._events[T];return}if(typeof N!="function"){console.warn("wrong listener type: "+typeof N);return}var ti=this._listens(T,N,Z);if(ti!==!1){var Ei=ue[ti];this._firingCount&&(Ei.fn=c,this._events[T]=ue=ue.slice()),ue.splice(ti,1)}}},fire:function(T,N,Z){if(!this.listens(T,Z))return this;var ue=n({},N,{type:T,target:this,sourceTarget:N&&N.sourceTarget||this});if(this._events){var Pe=this._events[T];if(Pe){this._firingCount=this._firingCount+1||1;for(var st=0,ti=Pe.length;st<ti;st++){var Ei=Pe[st],Ui=Ei.fn;Ei.once&&this.off(T,Ui,Ei.ctx),Ui.call(Ei.ctx||this,ue)}this._firingCount--}}return Z&&this._propagateEvent(ue),this},listens:function(T,N,Z,ue){typeof T!="string"&&console.warn('"string" type argument expected');var Pe=N;typeof N!="function"&&(ue=!!N,Pe=void 0,Z=void 0);var st=this._events&&this._events[T];if(st&&st.length&&this._listens(T,Pe,Z)!==!1)return!0;if(ue){for(var ti in this._eventParents)if(this._eventParents[ti].listens(T,N,Z,ue))return!0}return!1},_listens:function(T,N,Z){if(!this._events)return!1;var ue=this._events[T]||[];if(!N)return!!ue.length;Z===this&&(Z=void 0);for(var Pe=0,st=ue.length;Pe<st;Pe++)if(ue[Pe].fn===N&&ue[Pe].ctx===Z)return Pe;return!1},once:function(T,N,Z){if(typeof T=="object")for(var ue in T)this._on(ue,T[ue],N,!0);else{T=m(T);for(var Pe=0,st=T.length;Pe<st;Pe++)this._on(T[Pe],N,Z,!0)}return this},addEventParent:function(T){return this._eventParents=this._eventParents||{},this._eventParents[o(T)]=T,this},removeEventParent:function(T){return this._eventParents&&delete this._eventParents[o(T)],this},_propagateEvent:function(T){for(var N in this._eventParents)this._eventParents[N].fire(T.type,n({layer:T.target,propagatedFrom:T.target},T),!0)}};Se.addEventListener=Se.on,Se.removeEventListener=Se.clearAllEventListeners=Se.off,Se.addOneTimeEventListener=Se.once,Se.fireEvent=Se.fire,Se.hasEventListeners=Se.listens;var je=ie.extend(Se);function ze(T,N,Z){this.x=Z?Math.round(T):T,this.y=Z?Math.round(N):N}var Ge=Math.trunc||function(T){return T>0?Math.floor(T):Math.ceil(T)};ze.prototype={clone:function(){return new ze(this.x,this.y)},add:function(T){return this.clone()._add(Ae(T))},_add:function(T){return this.x+=T.x,this.y+=T.y,this},subtract:function(T){return this.clone()._subtract(Ae(T))},_subtract:function(T){return this.x-=T.x,this.y-=T.y,this},divideBy:function(T){return this.clone()._divideBy(T)},_divideBy:function(T){return this.x/=T,this.y/=T,this},multiplyBy:function(T){return this.clone()._multiplyBy(T)},_multiplyBy:function(T){return this.x*=T,this.y*=T,this},scaleBy:function(T){return new ze(this.x*T.x,this.y*T.y)},unscaleBy:function(T){return new ze(this.x/T.x,this.y/T.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Ge(this.x),this.y=Ge(this.y),this},distanceTo:function(T){T=Ae(T);var N=T.x-this.x,Z=T.y-this.y;return Math.sqrt(N*N+Z*Z)},equals:function(T){return T=Ae(T),T.x===this.x&&T.y===this.y},contains:function(T){return T=Ae(T),Math.abs(T.x)<=Math.abs(this.x)&&Math.abs(T.y)<=Math.abs(this.y)},toString:function(){return"Point("+d(this.x)+", "+d(this.y)+")"}};function Ae(T,N,Z){return T instanceof ze?T:E(T)?new ze(T[0],T[1]):T==null?T:typeof T=="object"&&"x"in T&&"y"in T?new ze(T.x,T.y):new ze(T,N,Z)}function Ye(T,N){if(T)for(var Z=N?[T,N]:T,ue=0,Pe=Z.length;ue<Pe;ue++)this.extend(Z[ue])}Ye.prototype={extend:function(T){var N,Z;if(!T)return this;if(T instanceof ze||typeof T[0]=="number"||"x"in T)N=Z=Ae(T);else if(T=ft(T),N=T.min,Z=T.max,!N||!Z)return this;return!this.min&&!this.max?(this.min=N.clone(),this.max=Z.clone()):(this.min.x=Math.min(N.x,this.min.x),this.max.x=Math.max(Z.x,this.max.x),this.min.y=Math.min(N.y,this.min.y),this.max.y=Math.max(Z.y,this.max.y)),this},getCenter:function(T){return Ae((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,T)},getBottomLeft:function(){return Ae(this.min.x,this.max.y)},getTopRight:function(){return Ae(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(T){var N,Z;return typeof T[0]=="number"||T instanceof ze?T=Ae(T):T=ft(T),T instanceof Ye?(N=T.min,Z=T.max):N=Z=T,N.x>=this.min.x&&Z.x<=this.max.x&&N.y>=this.min.y&&Z.y<=this.max.y},intersects:function(T){T=ft(T);var N=this.min,Z=this.max,ue=T.min,Pe=T.max,st=Pe.x>=N.x&&ue.x<=Z.x,ti=Pe.y>=N.y&&ue.y<=Z.y;return st&&ti},overlaps:function(T){T=ft(T);var N=this.min,Z=this.max,ue=T.min,Pe=T.max,st=Pe.x>N.x&&ue.x<Z.x,ti=Pe.y>N.y&&ue.y<Z.y;return st&&ti},isValid:function(){return!!(this.min&&this.max)},pad:function(T){var N=this.min,Z=this.max,ue=Math.abs(N.x-Z.x)*T,Pe=Math.abs(N.y-Z.y)*T;return ft(Ae(N.x-ue,N.y-Pe),Ae(Z.x+ue,Z.y+Pe))},equals:function(T){return T?(T=ft(T),this.min.equals(T.getTopLeft())&&this.max.equals(T.getBottomRight())):!1}};function ft(T,N){return!T||T instanceof Ye?T:new Ye(T,N)}function Ft(T,N){if(T)for(var Z=N?[T,N]:T,ue=0,Pe=Z.length;ue<Pe;ue++)this.extend(Z[ue])}Ft.prototype={extend:function(T){var N=this._southWest,Z=this._northEast,ue,Pe;if(T instanceof at)ue=T,Pe=T;else if(T instanceof Ft){if(ue=T._southWest,Pe=T._northEast,!ue||!Pe)return this}else return T?this.extend(yt(T)||Tt(T)):this;return!N&&!Z?(this._southWest=new at(ue.lat,ue.lng),this._northEast=new at(Pe.lat,Pe.lng)):(N.lat=Math.min(ue.lat,N.lat),N.lng=Math.min(ue.lng,N.lng),Z.lat=Math.max(Pe.lat,Z.lat),Z.lng=Math.max(Pe.lng,Z.lng)),this},pad:function(T){var N=this._southWest,Z=this._northEast,ue=Math.abs(N.lat-Z.lat)*T,Pe=Math.abs(N.lng-Z.lng)*T;return new Ft(new at(N.lat-ue,N.lng-Pe),new at(Z.lat+ue,Z.lng+Pe))},getCenter:function(){return new at((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new at(this.getNorth(),this.getWest())},getSouthEast:function(){return new at(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(T){typeof T[0]=="number"||T instanceof at||"lat"in T?T=yt(T):T=Tt(T);var N=this._southWest,Z=this._northEast,ue,Pe;return T instanceof Ft?(ue=T.getSouthWest(),Pe=T.getNorthEast()):ue=Pe=T,ue.lat>=N.lat&&Pe.lat<=Z.lat&&ue.lng>=N.lng&&Pe.lng<=Z.lng},intersects:function(T){T=Tt(T);var N=this._southWest,Z=this._northEast,ue=T.getSouthWest(),Pe=T.getNorthEast(),st=Pe.lat>=N.lat&&ue.lat<=Z.lat,ti=Pe.lng>=N.lng&&ue.lng<=Z.lng;return st&&ti},overlaps:function(T){T=Tt(T);var N=this._southWest,Z=this._northEast,ue=T.getSouthWest(),Pe=T.getNorthEast(),st=Pe.lat>N.lat&&ue.lat<Z.lat,ti=Pe.lng>N.lng&&ue.lng<Z.lng;return st&&ti},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(T,N){return T?(T=Tt(T),this._southWest.equals(T.getSouthWest(),N)&&this._northEast.equals(T.getNorthEast(),N)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Tt(T,N){return T instanceof Ft?T:new Ft(T,N)}function at(T,N,Z){if(isNaN(T)||isNaN(N))throw new Error("Invalid LatLng object: ("+T+", "+N+")");this.lat=+T,this.lng=+N,Z!==void 0&&(this.alt=+Z)}at.prototype={equals:function(T,N){if(!T)return!1;T=yt(T);var Z=Math.max(Math.abs(this.lat-T.lat),Math.abs(this.lng-T.lng));return Z<=(N===void 0?1e-9:N)},toString:function(T){return"LatLng("+d(this.lat,T)+", "+d(this.lng,T)+")"},distanceTo:function(T){return Re.distance(this,yt(T))},wrap:function(){return Re.wrapLatLng(this)},toBounds:function(T){var N=180*T/40075017,Z=N/Math.cos(Math.PI/180*this.lat);return Tt([this.lat-N,this.lng-Z],[this.lat+N,this.lng+Z])},clone:function(){return new at(this.lat,this.lng,this.alt)}};function yt(T,N,Z){return T instanceof at?T:E(T)&&typeof T[0]!="object"?T.length===3?new at(T[0],T[1],T[2]):T.length===2?new at(T[0],T[1]):null:T==null?T:typeof T=="object"&&"lat"in T?new at(T.lat,"lng"in T?T.lng:T.lon,T.alt):N===void 0?null:new at(T,N,Z)}var _t={latLngToPoint:function(T,N){var Z=this.projection.project(T),ue=this.scale(N);return this.transformation._transform(Z,ue)},pointToLatLng:function(T,N){var Z=this.scale(N),ue=this.transformation.untransform(T,Z);return this.projection.unproject(ue)},project:function(T){return this.projection.project(T)},unproject:function(T){return this.projection.unproject(T)},scale:function(T){return 256*Math.pow(2,T)},zoom:function(T){return Math.log(T/256)/Math.LN2},getProjectedBounds:function(T){if(this.infinite)return null;var N=this.projection.bounds,Z=this.scale(T),ue=this.transformation.transform(N.min,Z),Pe=this.transformation.transform(N.max,Z);return new Ye(ue,Pe)},infinite:!1,wrapLatLng:function(T){var N=this.wrapLng?l(T.lng,this.wrapLng,!0):T.lng,Z=this.wrapLat?l(T.lat,this.wrapLat,!0):T.lat,ue=T.alt;return new at(Z,N,ue)},wrapLatLngBounds:function(T){var N=T.getCenter(),Z=this.wrapLatLng(N),ue=N.lat-Z.lat,Pe=N.lng-Z.lng;if(ue===0&&Pe===0)return T;var st=T.getSouthWest(),ti=T.getNorthEast(),Ei=new at(st.lat-ue,st.lng-Pe),Ui=new at(ti.lat-ue,ti.lng-Pe);return new Ft(Ei,Ui)}},Re=n({},_t,{wrapLng:[-180,180],R:6371e3,distance:function(T,N){var Z=Math.PI/180,ue=T.lat*Z,Pe=N.lat*Z,st=Math.sin((N.lat-T.lat)*Z/2),ti=Math.sin((N.lng-T.lng)*Z/2),Ei=st*st+Math.cos(ue)*Math.cos(Pe)*ti*ti,Ui=2*Math.atan2(Math.sqrt(Ei),Math.sqrt(1-Ei));return this.R*Ui}}),ot=6378137,jt={R:ot,MAX_LATITUDE:85.0511287798,project:function(T){var N=Math.PI/180,Z=this.MAX_LATITUDE,ue=Math.max(Math.min(Z,T.lat),-Z),Pe=Math.sin(ue*N);return new ze(this.R*T.lng*N,this.R*Math.log((1+Pe)/(1-Pe))/2)},unproject:function(T){var N=180/Math.PI;return new at((2*Math.atan(Math.exp(T.y/this.R))-Math.PI/2)*N,T.x*N/this.R)},bounds:function(){var T=ot*Math.PI;return new Ye([-T,-T],[T,T])}()};function zt(T,N,Z,ue){if(E(T)){this._a=T[0],this._b=T[1],this._c=T[2],this._d=T[3];return}this._a=T,this._b=N,this._c=Z,this._d=ue}zt.prototype={transform:function(T,N){return this._transform(T.clone(),N)},_transform:function(T,N){return N=N||1,T.x=N*(this._a*T.x+this._b),T.y=N*(this._c*T.y+this._d),T},untransform:function(T,N){return N=N||1,new ze((T.x/N-this._b)/this._a,(T.y/N-this._d)/this._c)}};function qt(T,N,Z,ue){return new zt(T,N,Z,ue)}var ui=n({},Re,{code:"EPSG:3857",projection:jt,transformation:function(){var T=.5/(Math.PI*jt.R);return qt(T,.5,-T,.5)}()}),_i=n({},ui,{code:"EPSG:900913"});function ln(T){return document.createElementNS("http://www.w3.org/2000/svg",T)}function Rn(T,N){var Z="",ue,Pe,st,ti,Ei,Ui;for(ue=0,st=T.length;ue<st;ue++){for(Ei=T[ue],Pe=0,ti=Ei.length;Pe<ti;Pe++)Ui=Ei[Pe],Z+=(Pe?"L":"M")+Ui.x+" "+Ui.y;Z+=N?fr.svg?"z":"x":""}return Z||"M0 0"}var bi=document.documentElement.style,Mn="ActiveXObject"in window,Fn=Mn&&!document.addEventListener,or="msLaunchUri"in navigator&&!("documentMode"in document),wn=fd("webkit"),gn=fd("android"),ts=fd("android 2")||fd("android 3"),no=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ho=gn&&fd("Google")&&no<537&&!("AudioNode"in window),kn=!!window.opera,Ts=!or&&fd("chrome"),ea=fd("gecko")&&!wn&&!kn&&!Mn,co=!Ts&&fd("safari"),Zn=fd("phantom"),gl="OTransition"in bi,sc=navigator.platform.indexOf("Win")===0,Xl=Mn&&"transition"in bi,Xs="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ts,Ya="MozPerspective"in bi,qa=!window.L_DISABLE_3D&&(Xl||Xs||Ya)&&!gl&&!Zn,Nl=typeof orientation<"u"||fd("mobile"),zh=Nl&&wn,Hh=Nl&&Xs,Rf=!window.PointerEvent&&window.MSPointerEvent,Id=!!(window.PointerEvent||Rf),aa="ontouchstart"in window||!!window.TouchEvent,jd=!window.L_NO_TOUCH&&(aa||Id),du=Nl&&kn,$i=Nl&&ea,md=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Vl=function(){var T=!1;try{var N=Object.defineProperty({},"passive",{get:function(){T=!0}});window.addEventListener("testPassiveEventSupport",c,N),window.removeEventListener("testPassiveEventSupport",c,N)}catch{}return T}(),Tl=function(){return!!document.createElement("canvas").getContext}(),ja=!!(document.createElementNS&&ln("svg").createSVGRect),Dr=!!ja&&function(){var T=document.createElement("div");return T.innerHTML="<svg/>",(T.firstChild&&T.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Ad=!ja&&function(){try{var T=document.createElement("div");T.innerHTML='<v:shape adj="1"/>';var N=T.firstChild;return N.style.behavior="url(#default#VML)",N&&typeof N.adj=="object"}catch{return!1}}(),ds=navigator.platform.indexOf("Mac")===0,_a=navigator.platform.indexOf("Linux")===0;function fd(T){return navigator.userAgent.toLowerCase().indexOf(T)>=0}var fr={ie:Mn,ielt9:Fn,edge:or,webkit:wn,android:gn,android23:ts,androidStock:Ho,opera:kn,chrome:Ts,gecko:ea,safari:co,phantom:Zn,opera12:gl,win:sc,ie3d:Xl,webkit3d:Xs,gecko3d:Ya,any3d:qa,mobile:Nl,mobileWebkit:zh,mobileWebkit3d:Hh,msPointer:Rf,pointer:Id,touch:jd,touchNative:aa,mobileOpera:du,mobileGecko:$i,retina:md,passiveEvents:Vl,canvas:Tl,svg:ja,vml:Ad,inlineSvg:Dr,mac:ds,linux:_a},Qs=fr.msPointer?"MSPointerDown":"pointerdown",Nr=fr.msPointer?"MSPointerMove":"pointermove",Ql=fr.msPointer?"MSPointerUp":"pointerup",ro=fr.msPointer?"MSPointerCancel":"pointercancel",Ra={touchstart:Qs,touchmove:Nr,touchend:Ql,touchcancel:ro},Ta={touchstart:Ec,touchmove:td,touchend:td,touchcancel:td},$a={},Da=!1;function Gh(T,N,Z){return N==="touchstart"&&Js(),Ta[N]?(Z=Ta[N].bind(this,Z),T.addEventListener(Ra[N],Z,!1),Z):(console.warn("wrong event specified:",N),c)}function Ti(T,N,Z){if(!Ra[N]){console.warn("wrong event specified:",N);return}T.removeEventListener(Ra[N],Z,!1)}function Hs(T){$a[T.pointerId]=T}function Eo(T){$a[T.pointerId]&&($a[T.pointerId]=T)}function Mo(T){delete $a[T.pointerId]}function Js(){Da||(document.addEventListener(Qs,Hs,!0),document.addEventListener(Nr,Eo,!0),document.addEventListener(Ql,Mo,!0),document.addEventListener(ro,Mo,!0),Da=!0)}function td(T,N){if(N.pointerType!==(N.MSPOINTER_TYPE_MOUSE||"mouse")){N.touches=[];for(var Z in $a)N.touches.push($a[Z]);N.changedTouches=[N],T(N)}}function Ec(T,N){N.MSPOINTER_TYPE_TOUCH&&N.pointerType===N.MSPOINTER_TYPE_TOUCH&&Yr(N),td(T,N)}function Wh(T){var N={},Z,ue;for(ue in T)Z=T[ue],N[ue]=Z&&Z.bind?Z.bind(T):Z;return T=N,N.type="dblclick",N.detail=2,N.isTrusted=!1,N._simulated=!0,N}var gd=200;function eo(T,N){T.addEventListener("dblclick",N);var Z=0,ue;function Pe(st){if(st.detail!==1){ue=st.detail;return}if(!(st.pointerType==="mouse"||st.sourceCapabilities&&!st.sourceCapabilities.firesTouchEvents)){var ti=$m(st);if(!(ti.some(function(Ui){return Ui instanceof HTMLLabelElement&&Ui.attributes.for})&&!ti.some(function(Ui){return Ui instanceof HTMLInputElement||Ui instanceof HTMLSelectElement}))){var Ei=Date.now();Ei-Z<=gd?(ue++,ue===2&&N(Wh(st))):ue=1,Z=Ei}}}return T.addEventListener("click",Pe),{dblclick:N,simDblclick:Pe}}function Tu(T,N){T.removeEventListener("dblclick",N.dblclick),T.removeEventListener("click",N.simDblclick)}var dp=ec(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),vd=ec(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ch=vd==="webkitTransition"||vd==="OTransition"?vd+"End":"transitionend";function T1(T){return typeof T=="string"?document.getElementById(T):T}function Wm(T,N){var Z=T.style[N]||T.currentStyle&&T.currentStyle[N];if((!Z||Z==="auto")&&document.defaultView){var ue=document.defaultView.getComputedStyle(T,null);Z=ue?ue[N]:null}return Z==="auto"?null:Z}function ia(T,N,Z){var ue=document.createElement(T);return ue.className=N||"",Z&&Z.appendChild(ue),ue}function Fa(T){var N=T.parentNode;N&&N.removeChild(T)}function up(T){for(;T.firstChild;)T.removeChild(T.firstChild)}function vl(T){var N=T.parentNode;N&&N.lastChild!==T&&N.appendChild(T)}function Jl(T){var N=T.parentNode;N&&N.firstChild!==T&&N.insertBefore(T,N.firstChild)}function Du(T,N){if(T.classList!==void 0)return T.classList.contains(N);var Z=zp(T);return Z.length>0&&new RegExp("(^|\\s)"+N+"(\\s|$)").test(Z)}function uo(T,N){if(T.classList!==void 0)for(var Z=m(N),ue=0,Pe=Z.length;ue<Pe;ue++)T.classList.add(Z[ue]);else if(!Du(T,N)){var st=zp(T);Bp(T,(st?st+" ":"")+N)}}function yl(T,N){T.classList!==void 0?T.classList.remove(N):Bp(T,u((" "+zp(T)+" ").replace(" "+N+" "," ")))}function Bp(T,N){T.className.baseVal===void 0?T.className=N:T.className.baseVal=N}function zp(T){return T.correspondingElement&&(T=T.correspondingElement),T.className.baseVal===void 0?T.className:T.className.baseVal}function id(T,N){"opacity"in T.style?T.style.opacity=N:"filter"in T.style&&Bc(T,N)}function Bc(T,N){var Z=!1,ue="DXImageTransform.Microsoft.Alpha";try{Z=T.filters.item(ue)}catch{if(N===1)return}N=Math.round(N*100),Z?(Z.Enabled=N!==100,Z.Opacity=N):T.style.filter+=" progid:"+ue+"(opacity="+N+")"}function ec(T){for(var N=document.documentElement.style,Z=0;Z<T.length;Z++)if(T[Z]in N)return T[Z];return!1}function yd(T,N,Z){var ue=N||new ze(0,0);T.style[dp]=(fr.ie3d?"translate("+ue.x+"px,"+ue.y+"px)":"translate3d("+ue.x+"px,"+ue.y+"px,0)")+(Z?" scale("+Z+")":"")}function bo(T,N){T._leaflet_pos=N,fr.any3d?yd(T,N):(T.style.left=N.x+"px",T.style.top=N.y+"px")}function ba(T){return T._leaflet_pos||new ze(0,0)}var Bl,Yo,dh;if("onselectstart"in document)Bl=function(){wo(window,"selectstart",Yr)},Yo=function(){rl(window,"selectstart",Yr)};else{var mc=ec(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Bl=function(){if(mc){var T=document.documentElement.style;dh=T[mc],T[mc]="none"}},Yo=function(){mc&&(document.documentElement.style[mc]=dh,dh=void 0)}}function Pd(){wo(window,"dragstart",Yr)}function ju(){rl(window,"dragstart",Yr)}var hp,Uh;function $u(T){for(;T.tabIndex===-1;)T=T.parentNode;T.style&&(Um(),hp=T,Uh=T.style.outlineStyle,T.style.outlineStyle="none",wo(window,"keydown",Um))}function Um(){hp&&(hp.style.outlineStyle=Uh,hp=void 0,Uh=void 0,rl(window,"keydown",Um))}function Ff(T){do T=T.parentNode;while((!T.offsetWidth||!T.offsetHeight)&&T!==document.body);return T}function Hp(T){var N=T.getBoundingClientRect();return{x:N.width/T.offsetWidth||1,y:N.height/T.offsetHeight||1,boundingClientRect:N}}var Eu={__proto__:null,TRANSFORM:dp,TRANSITION:vd,TRANSITION_END:ch,get:T1,getStyle:Wm,create:ia,remove:Fa,empty:up,toFront:vl,toBack:Jl,hasClass:Du,addClass:uo,removeClass:yl,setClass:Bp,getClass:zp,setOpacity:id,testProp:ec,setTransform:yd,setPosition:bo,getPosition:ba,get disableTextSelection(){return Bl},get enableTextSelection(){return Yo},disableImageDrag:Pd,enableImageDrag:ju,preventOutline:$u,restoreOutline:Um,getSizedParentNode:Ff,getScale:Hp};function wo(T,N,Z,ue){if(N&&typeof N=="object")for(var Pe in N)d0(T,Pe,N[Pe],Z);else{N=m(N);for(var st=0,ti=N.length;st<ti;st++)d0(T,N[st],Z,ue)}return this}var uh="_leaflet_events";function rl(T,N,Z,ue){if(arguments.length===1)pp(T),delete T[uh];else if(N&&typeof N=="object")for(var Pe in N)jm(T,Pe,N[Pe],Z);else if(N=m(N),arguments.length===2)pp(T,function(Ei){return M(N,Ei)!==-1});else for(var st=0,ti=N.length;st<ti;st++)jm(T,N[st],Z,ue);return this}function pp(T,N){for(var Z in T[uh]){var ue=Z.split(/\d/)[0];(!N||N(ue))&&jm(T,ue,null,null,Z)}}var Gp={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function d0(T,N,Z,ue){var Pe=N+o(Z)+(ue?"_"+o(ue):"");if(T[uh]&&T[uh][Pe])return this;var st=function(Ei){return Z.call(ue||T,Ei||window.event)},ti=st;!fr.touchNative&&fr.pointer&&N.indexOf("touch")===0?st=Gh(T,N,st):fr.touch&&N==="dblclick"?st=eo(T,st):"addEventListener"in T?N==="touchstart"||N==="touchmove"||N==="wheel"||N==="mousewheel"?T.addEventListener(Gp[N]||N,st,fr.passiveEvents?{passive:!1}:!1):N==="mouseenter"||N==="mouseleave"?(st=function(Ei){Ei=Ei||window.event,Wp(T,Ei)&&ti(Ei)},T.addEventListener(Gp[N],st,!1)):T.addEventListener(N,ti,!1):T.attachEvent("on"+N,st),T[uh]=T[uh]||{},T[uh][Pe]=st}function jm(T,N,Z,ue,Pe){Pe=Pe||N+o(Z)+(ue?"_"+o(ue):"");var st=T[uh]&&T[uh][Pe];if(!st)return this;!fr.touchNative&&fr.pointer&&N.indexOf("touch")===0?Ti(T,N,st):fr.touch&&N==="dblclick"?Tu(T,st):"removeEventListener"in T?T.removeEventListener(Gp[N]||N,st,!1):T.detachEvent("on"+N,st),T[uh][Pe]=null}function nd(T){return T.stopPropagation?T.stopPropagation():T.originalEvent?T.originalEvent._stopped=!0:T.cancelBubble=!0,this}function D1(T){return d0(T,"wheel",nd),this}function Lf(T){return wo(T,"mousedown touchstart dblclick contextmenu",nd),T._leaflet_disable_click=!0,this}function Yr(T){return T.preventDefault?T.preventDefault():T.returnValue=!1,this}function ps(T){return Yr(T),nd(T),this}function $m(T){if(T.composedPath)return T.composedPath();for(var N=[],Z=T.target;Z;)N.push(Z),Z=Z.parentNode;return N}function hh(T,N){if(!N)return new ze(T.clientX,T.clientY);var Z=Hp(N),ue=Z.boundingClientRect;return new ze((T.clientX-ue.left)/Z.x-N.clientLeft,(T.clientY-ue.top)/Z.y-N.clientTop)}var Ku=fr.linux&&fr.chrome?window.devicePixelRatio:fr.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function E1(T){return fr.edge?T.wheelDeltaY/2:T.deltaY&&T.deltaMode===0?-T.deltaY/Ku:T.deltaY&&T.deltaMode===1?-T.deltaY*20:T.deltaY&&T.deltaMode===2?-T.deltaY*60:T.deltaX||T.deltaZ?0:T.wheelDelta?(T.wheelDeltaY||T.wheelDelta)/2:T.detail&&Math.abs(T.detail)<32765?-T.detail*20:T.detail?T.detail/-32765*60:0}function Wp(T,N){var Z=N.relatedTarget;if(!Z)return!0;try{for(;Z&&Z!==T;)Z=Z.parentNode}catch{return!1}return Z!==T}var Dl={__proto__:null,on:wo,off:rl,stopPropagation:nd,disableScrollPropagation:D1,disableClickPropagation:Lf,preventDefault:Yr,stop:ps,getPropagationPath:$m,getMousePosition:hh,getWheelDelta:E1,isExternalTarget:Wp,addListener:wo,removeListener:rl},M1=je.extend({run:function(T,N,Z,ue){this.stop(),this._el=T,this._inProgress=!0,this._duration=Z||.25,this._easeOutPower=1/Math.max(ue||.5,.2),this._startPos=ba(T),this._offset=N.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=ne(this._animate,this),this._step()},_step:function(T){var N=+new Date-this._startTime,Z=this._duration*1e3;N<Z?this._runFrame(this._easeOut(N/Z),T):(this._runFrame(1),this._complete())},_runFrame:function(T,N){var Z=this._startPos.add(this._offset.multiplyBy(T));N&&Z._round(),bo(this._el,Z),this.fire("step")},_complete:function(){pe(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(T){return 1-Math.pow(1-T,this._easeOutPower)}}),Ca=je.extend({options:{crs:ui,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(T,N){N=f(this,N),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(T),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),N.maxBounds&&this.setMaxBounds(N.maxBounds),N.zoom!==void 0&&(this._zoom=this._limitZoom(N.zoom)),N.center&&N.zoom!==void 0&&this.setView(yt(N.center),N.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=vd&&fr.any3d&&!fr.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),wo(this._proxy,ch,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(T,N,Z){if(N=N===void 0?this._zoom:this._limitZoom(N),T=this._limitCenter(yt(T),N,this.options.maxBounds),Z=Z||{},this._stop(),this._loaded&&!Z.reset&&Z!==!0){Z.animate!==void 0&&(Z.zoom=n({animate:Z.animate},Z.zoom),Z.pan=n({animate:Z.animate,duration:Z.duration},Z.pan));var ue=this._zoom!==N?this._tryAnimatedZoom&&this._tryAnimatedZoom(T,N,Z.zoom):this._tryAnimatedPan(T,Z.pan);if(ue)return clearTimeout(this._sizeTimer),this}return this._resetView(T,N,Z.pan&&Z.pan.noMoveStart),this},setZoom:function(T,N){return this._loaded?this.setView(this.getCenter(),T,{zoom:N}):(this._zoom=T,this)},zoomIn:function(T,N){return T=T||(fr.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+T,N)},zoomOut:function(T,N){return T=T||(fr.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-T,N)},setZoomAround:function(T,N,Z){var ue=this.getZoomScale(N),Pe=this.getSize().divideBy(2),st=T instanceof ze?T:this.latLngToContainerPoint(T),ti=st.subtract(Pe).multiplyBy(1-1/ue),Ei=this.containerPointToLatLng(Pe.add(ti));return this.setView(Ei,N,{zoom:Z})},_getBoundsCenterZoom:function(T,N){N=N||{},T=T.getBounds?T.getBounds():Tt(T);var Z=Ae(N.paddingTopLeft||N.padding||[0,0]),ue=Ae(N.paddingBottomRight||N.padding||[0,0]),Pe=this.getBoundsZoom(T,!1,Z.add(ue));if(Pe=typeof N.maxZoom=="number"?Math.min(N.maxZoom,Pe):Pe,Pe===1/0)return{center:T.getCenter(),zoom:Pe};var st=ue.subtract(Z).divideBy(2),ti=this.project(T.getSouthWest(),Pe),Ei=this.project(T.getNorthEast(),Pe),Ui=this.unproject(ti.add(Ei).divideBy(2).add(st),Pe);return{center:Ui,zoom:Pe}},fitBounds:function(T,N){if(T=Tt(T),!T.isValid())throw new Error("Bounds are not valid.");var Z=this._getBoundsCenterZoom(T,N);return this.setView(Z.center,Z.zoom,N)},fitWorld:function(T){return this.fitBounds([[-90,-180],[90,180]],T)},panTo:function(T,N){return this.setView(T,this._zoom,{pan:N})},panBy:function(T,N){if(T=Ae(T).round(),N=N||{},!T.x&&!T.y)return this.fire("moveend");if(N.animate!==!0&&!this.getSize().contains(T))return this._resetView(this.unproject(this.project(this.getCenter()).add(T)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new M1,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),N.noMoveStart||this.fire("movestart"),N.animate!==!1){uo(this._mapPane,"leaflet-pan-anim");var Z=this._getMapPanePos().subtract(T).round();this._panAnim.run(this._mapPane,Z,N.duration||.25,N.easeLinearity)}else this._rawPanBy(T),this.fire("move").fire("moveend");return this},flyTo:function(T,N,Z){if(Z=Z||{},Z.animate===!1||!fr.any3d)return this.setView(T,N,Z);this._stop();var ue=this.project(this.getCenter()),Pe=this.project(T),st=this.getSize(),ti=this._zoom;T=yt(T),N=N===void 0?ti:N;var Ei=Math.max(st.x,st.y),Ui=Ei*this.getZoomScale(ti,N),On=Pe.distanceTo(ue)||1,Wr=1.42,$s=Wr*Wr;function qo(Si){var Tr=Si?-1:1,ae=Si?Ui:Ei,Ds=Ui*Ui-Ei*Ei+Tr*$s*$s*On*On,lo=2*ae*$s*On,Zo=Ds/lo,hr=Math.sqrt(Zo*Zo+1)-Zo,h0=hr<1e-9?-18:Math.log(hr);return h0}function q(Si){return(Math.exp(Si)-Math.exp(-Si))/2}function oe(Si){return(Math.exp(Si)+Math.exp(-Si))/2}function he(Si){return q(Si)/oe(Si)}var de=qo(0);function De(Si){return Ei*(oe(de)/oe(de+Wr*Si))}function Le(Si){return Ei*(oe(de)*he(de+Wr*Si)-q(de))/$s}function xt(Si){return 1-Math.pow(1-Si,1.5)}var Dt=Date.now(),Ut=(qo(1)-de)/Wr,Jt=Z.duration?1e3*Z.duration:1e3*Ut*.8;function gi(){var Si=(Date.now()-Dt)/Jt,Tr=xt(Si)*Ut;Si<=1?(this._flyToFrame=ne(gi,this),this._move(this.unproject(ue.add(Pe.subtract(ue).multiplyBy(Le(Tr)/On)),ti),this.getScaleZoom(Ei/De(Tr),ti),{flyTo:!0})):this._move(T,N)._moveEnd(!0)}return this._moveStart(!0,Z.noMoveStart),gi.call(this),this},flyToBounds:function(T,N){var Z=this._getBoundsCenterZoom(T,N);return this.flyTo(Z.center,Z.zoom,N)},setMaxBounds:function(T){return T=Tt(T),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),T.isValid()?(this.options.maxBounds=T,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(T){var N=this.options.minZoom;return this.options.minZoom=T,this._loaded&&N!==T&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(T):this},setMaxZoom:function(T){var N=this.options.maxZoom;return this.options.maxZoom=T,this._loaded&&N!==T&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(T):this},panInsideBounds:function(T,N){this._enforcingBounds=!0;var Z=this.getCenter(),ue=this._limitCenter(Z,this._zoom,Tt(T));return Z.equals(ue)||this.panTo(ue,N),this._enforcingBounds=!1,this},panInside:function(T,N){N=N||{};var Z=Ae(N.paddingTopLeft||N.padding||[0,0]),ue=Ae(N.paddingBottomRight||N.padding||[0,0]),Pe=this.project(this.getCenter()),st=this.project(T),ti=this.getPixelBounds(),Ei=ft([ti.min.add(Z),ti.max.subtract(ue)]),Ui=Ei.getSize();if(!Ei.contains(st)){this._enforcingBounds=!0;var On=st.subtract(Ei.getCenter()),Wr=Ei.extend(st).getSize().subtract(Ui);Pe.x+=On.x<0?-Wr.x:Wr.x,Pe.y+=On.y<0?-Wr.y:Wr.y,this.panTo(this.unproject(Pe),N),this._enforcingBounds=!1}return this},invalidateSize:function(T){if(!this._loaded)return this;T=n({animate:!1,pan:!0},T===!0?{animate:!0}:T);var N=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var Z=this.getSize(),ue=N.divideBy(2).round(),Pe=Z.divideBy(2).round(),st=ue.subtract(Pe);return!st.x&&!st.y?this:(T.animate&&T.pan?this.panBy(st):(T.pan&&this._rawPanBy(st),this.fire("move"),T.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:N,newSize:Z}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(T){if(T=this._locateOptions=n({timeout:1e4,watch:!1},T),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var N=r(this._handleGeolocationResponse,this),Z=r(this._handleGeolocationError,this);return T.watch?this._locationWatchId=navigator.geolocation.watchPosition(N,Z,T):navigator.geolocation.getCurrentPosition(N,Z,T),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(T){if(this._container._leaflet_id){var N=T.code,Z=T.message||(N===1?"permission denied":N===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:N,message:"Geolocation error: "+Z+"."})}},_handleGeolocationResponse:function(T){if(this._container._leaflet_id){var N=T.coords.latitude,Z=T.coords.longitude,ue=new at(N,Z),Pe=ue.toBounds(T.coords.accuracy*2),st=this._locateOptions;if(st.setView){var ti=this.getBoundsZoom(Pe);this.setView(ue,st.maxZoom?Math.min(ti,st.maxZoom):ti)}var Ei={latlng:ue,bounds:Pe,timestamp:T.timestamp};for(var Ui in T.coords)typeof T.coords[Ui]=="number"&&(Ei[Ui]=T.coords[Ui]);this.fire("locationfound",Ei)}},addHandler:function(T,N){if(!N)return this;var Z=this[T]=new N(this);return this._handlers.push(Z),this.options[T]&&Z.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Fa(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(pe(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var T;for(T in this._layers)this._layers[T].remove();for(T in this._panes)Fa(this._panes[T]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(T,N){var Z="leaflet-pane"+(T?" leaflet-"+T.replace("Pane","")+"-pane":""),ue=ia("div",Z,N||this._mapPane);return T&&(this._panes[T]=ue),ue},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var T=this.getPixelBounds(),N=this.unproject(T.getBottomLeft()),Z=this.unproject(T.getTopRight());return new Ft(N,Z)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(T,N,Z){T=Tt(T),Z=Ae(Z||[0,0]);var ue=this.getZoom()||0,Pe=this.getMinZoom(),st=this.getMaxZoom(),ti=T.getNorthWest(),Ei=T.getSouthEast(),Ui=this.getSize().subtract(Z),On=ft(this.project(Ei,ue),this.project(ti,ue)).getSize(),Wr=fr.any3d?this.options.zoomSnap:1,$s=Ui.x/On.x,qo=Ui.y/On.y,q=N?Math.max($s,qo):Math.min($s,qo);return ue=this.getScaleZoom(q,ue),Wr&&(ue=Math.round(ue/(Wr/100))*(Wr/100),ue=N?Math.ceil(ue/Wr)*Wr:Math.floor(ue/Wr)*Wr),Math.max(Pe,Math.min(st,ue))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new ze(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(T,N){var Z=this._getTopLeftPoint(T,N);return new Ye(Z,Z.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(T){return this.options.crs.getProjectedBounds(T===void 0?this.getZoom():T)},getPane:function(T){return typeof T=="string"?this._panes[T]:T},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(T,N){var Z=this.options.crs;return N=N===void 0?this._zoom:N,Z.scale(T)/Z.scale(N)},getScaleZoom:function(T,N){var Z=this.options.crs;N=N===void 0?this._zoom:N;var ue=Z.zoom(T*Z.scale(N));return isNaN(ue)?1/0:ue},project:function(T,N){return N=N===void 0?this._zoom:N,this.options.crs.latLngToPoint(yt(T),N)},unproject:function(T,N){return N=N===void 0?this._zoom:N,this.options.crs.pointToLatLng(Ae(T),N)},layerPointToLatLng:function(T){var N=Ae(T).add(this.getPixelOrigin());return this.unproject(N)},latLngToLayerPoint:function(T){var N=this.project(yt(T))._round();return N._subtract(this.getPixelOrigin())},wrapLatLng:function(T){return this.options.crs.wrapLatLng(yt(T))},wrapLatLngBounds:function(T){return this.options.crs.wrapLatLngBounds(Tt(T))},distance:function(T,N){return this.options.crs.distance(yt(T),yt(N))},containerPointToLayerPoint:function(T){return Ae(T).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(T){return Ae(T).add(this._getMapPanePos())},containerPointToLatLng:function(T){var N=this.containerPointToLayerPoint(Ae(T));return this.layerPointToLatLng(N)},latLngToContainerPoint:function(T){return this.layerPointToContainerPoint(this.latLngToLayerPoint(yt(T)))},mouseEventToContainerPoint:function(T){return hh(T,this._container)},mouseEventToLayerPoint:function(T){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(T))},mouseEventToLatLng:function(T){return this.layerPointToLatLng(this.mouseEventToLayerPoint(T))},_initContainer:function(T){var N=this._container=T1(T);if(N){if(N._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");wo(N,"scroll",this._onScroll,this),this._containerId=o(N)},_initLayout:function(){var T=this._container;this._fadeAnimated=this.options.fadeAnimation&&fr.any3d,uo(T,"leaflet-container"+(fr.touch?" leaflet-touch":"")+(fr.retina?" leaflet-retina":"")+(fr.ielt9?" leaflet-oldie":"")+(fr.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var N=Wm(T,"position");N!=="absolute"&&N!=="relative"&&N!=="fixed"&&N!=="sticky"&&(T.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var T=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),bo(this._mapPane,new ze(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(uo(T.markerPane,"leaflet-zoom-hide"),uo(T.shadowPane,"leaflet-zoom-hide"))},_resetView:function(T,N,Z){bo(this._mapPane,new ze(0,0));var ue=!this._loaded;this._loaded=!0,N=this._limitZoom(N),this.fire("viewprereset");var Pe=this._zoom!==N;this._moveStart(Pe,Z)._move(T,N)._moveEnd(Pe),this.fire("viewreset"),ue&&this.fire("load")},_moveStart:function(T,N){return T&&this.fire("zoomstart"),N||this.fire("movestart"),this},_move:function(T,N,Z,ue){N===void 0&&(N=this._zoom);var Pe=this._zoom!==N;return this._zoom=N,this._lastCenter=T,this._pixelOrigin=this._getNewPixelOrigin(T),ue?Z&&Z.pinch&&this.fire("zoom",Z):((Pe||Z&&Z.pinch)&&this.fire("zoom",Z),this.fire("move",Z)),this},_moveEnd:function(T){return T&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return pe(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(T){bo(this._mapPane,this._getMapPanePos().subtract(T))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(T){this._targets={},this._targets[o(this._container)]=this;var N=T?rl:wo;N(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&N(window,"resize",this._onResize,this),fr.any3d&&this.options.transform3DLimit&&(T?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){pe(this._resizeRequest),this._resizeRequest=ne(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var T=this._getMapPanePos();Math.max(Math.abs(T.x),Math.abs(T.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(T,N){for(var Z=[],ue,Pe=N==="mouseout"||N==="mouseover",st=T.target||T.srcElement,ti=!1;st;){if(ue=this._targets[o(st)],ue&&(N==="click"||N==="preclick")&&this._draggableMoved(ue)){ti=!0;break}if(ue&&ue.listens(N,!0)&&(Pe&&!Wp(st,T)||(Z.push(ue),Pe))||st===this._container)break;st=st.parentNode}return!Z.length&&!ti&&!Pe&&this.listens(N,!0)&&(Z=[this]),Z},_isClickDisabled:function(T){for(;T&&T!==this._container;){if(T._leaflet_disable_click)return!0;T=T.parentNode}},_handleDOMEvent:function(T){var N=T.target||T.srcElement;if(!(!this._loaded||N._leaflet_disable_events||T.type==="click"&&this._isClickDisabled(N))){var Z=T.type;Z==="mousedown"&&$u(N),this._fireDOMEvent(T,Z)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(T,N,Z){if(T.type==="click"){var ue=n({},T);ue.type="preclick",this._fireDOMEvent(ue,ue.type,Z)}var Pe=this._findEventTargets(T,N);if(Z){for(var st=[],ti=0;ti<Z.length;ti++)Z[ti].listens(N,!0)&&st.push(Z[ti]);Pe=st.concat(Pe)}if(Pe.length){N==="contextmenu"&&Yr(T);var Ei=Pe[0],Ui={originalEvent:T};if(T.type!=="keypress"&&T.type!=="keydown"&&T.type!=="keyup"){var On=Ei.getLatLng&&(!Ei._radius||Ei._radius<=10);Ui.containerPoint=On?this.latLngToContainerPoint(Ei.getLatLng()):this.mouseEventToContainerPoint(T),Ui.layerPoint=this.containerPointToLayerPoint(Ui.containerPoint),Ui.latlng=On?Ei.getLatLng():this.layerPointToLatLng(Ui.layerPoint)}for(ti=0;ti<Pe.length;ti++)if(Pe[ti].fire(N,Ui,!0),Ui.originalEvent._stopped||Pe[ti].options.bubblingMouseEvents===!1&&M(this._mouseEvents,N)!==-1)return}},_draggableMoved:function(T){return T=T.dragging&&T.dragging.enabled()?T:this,T.dragging&&T.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var T=0,N=this._handlers.length;T<N;T++)this._handlers[T].disable()},whenReady:function(T,N){return this._loaded?T.call(N||this,{target:this}):this.on("load",T,N),this},_getMapPanePos:function(){return ba(this._mapPane)||new ze(0,0)},_moved:function(){var T=this._getMapPanePos();return T&&!T.equals([0,0])},_getTopLeftPoint:function(T,N){var Z=T&&N!==void 0?this._getNewPixelOrigin(T,N):this.getPixelOrigin();return Z.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(T,N){var Z=this.getSize()._divideBy(2);return this.project(T,N)._subtract(Z)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(T,N,Z){var ue=this._getNewPixelOrigin(Z,N);return this.project(T,N)._subtract(ue)},_latLngBoundsToNewLayerBounds:function(T,N,Z){var ue=this._getNewPixelOrigin(Z,N);return ft([this.project(T.getSouthWest(),N)._subtract(ue),this.project(T.getNorthWest(),N)._subtract(ue),this.project(T.getSouthEast(),N)._subtract(ue),this.project(T.getNorthEast(),N)._subtract(ue)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(T){return this.latLngToLayerPoint(T).subtract(this._getCenterLayerPoint())},_limitCenter:function(T,N,Z){if(!Z)return T;var ue=this.project(T,N),Pe=this.getSize().divideBy(2),st=new Ye(ue.subtract(Pe),ue.add(Pe)),ti=this._getBoundsOffset(st,Z,N);return Math.abs(ti.x)<=1&&Math.abs(ti.y)<=1?T:this.unproject(ue.add(ti),N)},_limitOffset:function(T,N){if(!N)return T;var Z=this.getPixelBounds(),ue=new Ye(Z.min.add(T),Z.max.add(T));return T.add(this._getBoundsOffset(ue,N))},_getBoundsOffset:function(T,N,Z){var ue=ft(this.project(N.getNorthEast(),Z),this.project(N.getSouthWest(),Z)),Pe=ue.min.subtract(T.min),st=ue.max.subtract(T.max),ti=this._rebound(Pe.x,-st.x),Ei=this._rebound(Pe.y,-st.y);return new ze(ti,Ei)},_rebound:function(T,N){return T+N>0?Math.round(T-N)/2:Math.max(0,Math.ceil(T))-Math.max(0,Math.floor(N))},_limitZoom:function(T){var N=this.getMinZoom(),Z=this.getMaxZoom(),ue=fr.any3d?this.options.zoomSnap:1;return ue&&(T=Math.round(T/ue)*ue),Math.max(N,Math.min(Z,T))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){yl(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(T,N){var Z=this._getCenterOffset(T)._trunc();return(N&&N.animate)!==!0&&!this.getSize().contains(Z)?!1:(this.panBy(Z,N),!0)},_createAnimProxy:function(){var T=this._proxy=ia("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(T),this.on("zoomanim",function(N){var Z=dp,ue=this._proxy.style[Z];yd(this._proxy,this.project(N.center,N.zoom),this.getZoomScale(N.zoom,1)),ue===this._proxy.style[Z]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Fa(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var T=this.getCenter(),N=this.getZoom();yd(this._proxy,this.project(T,N),this.getZoomScale(N,1))},_catchTransitionEnd:function(T){this._animatingZoom&&T.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(T,N,Z){if(this._animatingZoom)return!0;if(Z=Z||{},!this._zoomAnimated||Z.animate===!1||this._nothingToAnimate()||Math.abs(N-this._zoom)>this.options.zoomAnimationThreshold)return!1;var ue=this.getZoomScale(N),Pe=this._getCenterOffset(T)._divideBy(1-1/ue);return Z.animate!==!0&&!this.getSize().contains(Pe)?!1:(ne(function(){this._moveStart(!0,Z.noMoveStart||!1)._animateZoom(T,N,!0)},this),!0)},_animateZoom:function(T,N,Z,ue){this._mapPane&&(Z&&(this._animatingZoom=!0,this._animateToCenter=T,this._animateToZoom=N,uo(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:T,zoom:N,noUpdate:ue}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&yl(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function la(T,N){return new Ca(T,N)}var oc=ie.extend({options:{position:"topright"},initialize:function(T){f(this,T)},getPosition:function(){return this.options.position},setPosition:function(T){var N=this._map;return N&&N.removeControl(this),this.options.position=T,N&&N.addControl(this),this},getContainer:function(){return this._container},addTo:function(T){this.remove(),this._map=T;var N=this._container=this.onAdd(T),Z=this.getPosition(),ue=T._controlCorners[Z];return uo(N,"leaflet-control"),Z.indexOf("bottom")!==-1?ue.insertBefore(N,ue.firstChild):ue.appendChild(N),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Fa(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(T){this._map&&T&&T.screenX>0&&T.screenY>0&&this._map.getContainer().focus()}}),fc=function(T){return new oc(T)};Ca.include({addControl:function(T){return T.addTo(this),this},removeControl:function(T){return T.remove(),this},_initControlPos:function(){var T=this._controlCorners={},N="leaflet-",Z=this._controlContainer=ia("div",N+"control-container",this._container);function ue(Pe,st){var ti=N+Pe+" "+N+st;T[Pe+st]=ia("div",ti,Z)}ue("top","left"),ue("top","right"),ue("bottom","left"),ue("bottom","right")},_clearControlPos:function(){for(var T in this._controlCorners)Fa(this._controlCorners[T]);Fa(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Fs=oc.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(T,N,Z,ue){return Z<ue?-1:ue<Z?1:0}},initialize:function(T,N,Z){f(this,Z),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var ue in T)this._addLayer(T[ue],ue);for(ue in N)this._addLayer(N[ue],ue,!0)},onAdd:function(T){this._initLayout(),this._update(),this._map=T,T.on("zoomend",this._checkDisabledLayers,this);for(var N=0;N<this._layers.length;N++)this._layers[N].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(T){return oc.prototype.addTo.call(this,T),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var T=0;T<this._layers.length;T++)this._layers[T].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(T,N){return this._addLayer(T,N),this._map?this._update():this},addOverlay:function(T,N){return this._addLayer(T,N,!0),this._map?this._update():this},removeLayer:function(T){T.off("add remove",this._onLayerChange,this);var N=this._getLayer(o(T));return N&&this._layers.splice(this._layers.indexOf(N),1),this._map?this._update():this},expand:function(){uo(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var T=this._map.getSize().y-(this._container.offsetTop+50);return T<this._section.clientHeight?(uo(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=T+"px"):yl(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return yl(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var T="leaflet-control-layers",N=this._container=ia("div",T),Z=this.options.collapsed;N.setAttribute("aria-haspopup",!0),Lf(N),D1(N);var ue=this._section=ia("section",T+"-list");Z&&(this._map.on("click",this.collapse,this),wo(N,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var Pe=this._layersLink=ia("a",T+"-toggle",N);Pe.href="#",Pe.title="Layers",Pe.setAttribute("role","button"),wo(Pe,{keydown:function(st){st.keyCode===13&&this._expandSafely()},click:function(st){Yr(st),this._expandSafely()}},this),Z||this.expand(),this._baseLayersList=ia("div",T+"-base",ue),this._separator=ia("div",T+"-separator",ue),this._overlaysList=ia("div",T+"-overlays",ue),N.appendChild(ue)},_getLayer:function(T){for(var N=0;N<this._layers.length;N++)if(this._layers[N]&&o(this._layers[N].layer)===T)return this._layers[N]},_addLayer:function(T,N,Z){this._map&&T.on("add remove",this._onLayerChange,this),this._layers.push({layer:T,name:N,overlay:Z}),this.options.sortLayers&&this._layers.sort(r(function(ue,Pe){return this.options.sortFunction(ue.layer,Pe.layer,ue.name,Pe.name)},this)),this.options.autoZIndex&&T.setZIndex&&(this._lastZIndex++,T.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;up(this._baseLayersList),up(this._overlaysList),this._layerControlInputs=[];var T,N,Z,ue,Pe=0;for(Z=0;Z<this._layers.length;Z++)ue=this._layers[Z],this._addItem(ue),N=N||ue.overlay,T=T||!ue.overlay,Pe+=ue.overlay?0:1;return this.options.hideSingleBase&&(T=T&&Pe>1,this._baseLayersList.style.display=T?"":"none"),this._separator.style.display=N&&T?"":"none",this},_onLayerChange:function(T){this._handlingClick||this._update();var N=this._getLayer(o(T.target)),Z=N.overlay?T.type==="add"?"overlayadd":"overlayremove":T.type==="add"?"baselayerchange":null;Z&&this._map.fire(Z,N)},_createRadioElement:function(T,N){var Z='<input type="radio" class="leaflet-control-layers-selector" name="'+T+'"'+(N?' checked="checked"':"")+"/>",ue=document.createElement("div");return ue.innerHTML=Z,ue.firstChild},_addItem:function(T){var N=document.createElement("label"),Z=this._map.hasLayer(T.layer),ue;T.overlay?(ue=document.createElement("input"),ue.type="checkbox",ue.className="leaflet-control-layers-selector",ue.defaultChecked=Z):ue=this._createRadioElement("leaflet-base-layers_"+o(this),Z),this._layerControlInputs.push(ue),ue.layerId=o(T.layer),wo(ue,"click",this._onInputClick,this);var Pe=document.createElement("span");Pe.innerHTML=" "+T.name;var st=document.createElement("span");N.appendChild(st),st.appendChild(ue),st.appendChild(Pe);var ti=T.overlay?this._overlaysList:this._baseLayersList;return ti.appendChild(N),this._checkDisabledLayers(),N},_onInputClick:function(){if(!this._preventClick){var T=this._layerControlInputs,N,Z,ue=[],Pe=[];this._handlingClick=!0;for(var st=T.length-1;st>=0;st--)N=T[st],Z=this._getLayer(N.layerId).layer,N.checked?ue.push(Z):N.checked||Pe.push(Z);for(st=0;st<Pe.length;st++)this._map.hasLayer(Pe[st])&&this._map.removeLayer(Pe[st]);for(st=0;st<ue.length;st++)this._map.hasLayer(ue[st])||this._map.addLayer(ue[st]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var T=this._layerControlInputs,N,Z,ue=this._map.getZoom(),Pe=T.length-1;Pe>=0;Pe--)N=T[Pe],Z=this._getLayer(N.layerId).layer,N.disabled=Z.options.minZoom!==void 0&&ue<Z.options.minZoom||Z.options.maxZoom!==void 0&&ue>Z.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var T=this._section;this._preventClick=!0,wo(T,"click",Yr),this.expand();var N=this;setTimeout(function(){rl(T,"click",Yr),N._preventClick=!1})}}),_d=function(T,N,Z){return new Fs(T,N,Z)},Go=oc.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(T){var N="leaflet-control-zoom",Z=ia("div",N+" leaflet-bar"),ue=this.options;return this._zoomInButton=this._createButton(ue.zoomInText,ue.zoomInTitle,N+"-in",Z,this._zoomIn),this._zoomOutButton=this._createButton(ue.zoomOutText,ue.zoomOutTitle,N+"-out",Z,this._zoomOut),this._updateDisabled(),T.on("zoomend zoomlevelschange",this._updateDisabled,this),Z},onRemove:function(T){T.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(T){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(T.shiftKey?3:1))},_zoomOut:function(T){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(T.shiftKey?3:1))},_createButton:function(T,N,Z,ue,Pe){var st=ia("a",Z,ue);return st.innerHTML=T,st.href="#",st.title=N,st.setAttribute("role","button"),st.setAttribute("aria-label",N),Lf(st),wo(st,"click",ps),wo(st,"click",Pe,this),wo(st,"click",this._refocusOnMap,this),st},_updateDisabled:function(){var T=this._map,N="leaflet-disabled";yl(this._zoomInButton,N),yl(this._zoomOutButton,N),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||T._zoom===T.getMinZoom())&&(uo(this._zoomOutButton,N),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||T._zoom===T.getMaxZoom())&&(uo(this._zoomInButton,N),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ca.mergeOptions({zoomControl:!0}),Ca.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Go,this.addControl(this.zoomControl))});var k1=function(T){return new Go(T)},H=oc.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(T){var N="leaflet-control-scale",Z=ia("div",N),ue=this.options;return this._addScales(ue,N+"-line",Z),T.on(ue.updateWhenIdle?"moveend":"move",this._update,this),T.whenReady(this._update,this),Z},onRemove:function(T){T.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(T,N,Z){T.metric&&(this._mScale=ia("div",N,Z)),T.imperial&&(this._iScale=ia("div",N,Z))},_update:function(){var T=this._map,N=T.getSize().y/2,Z=T.distance(T.containerPointToLatLng([0,N]),T.containerPointToLatLng([this.options.maxWidth,N]));this._updateScales(Z)},_updateScales:function(T){this.options.metric&&T&&this._updateMetric(T),this.options.imperial&&T&&this._updateImperial(T)},_updateMetric:function(T){var N=this._getRoundNum(T),Z=N<1e3?N+" m":N/1e3+" km";this._updateScale(this._mScale,Z,N/T)},_updateImperial:function(T){var N=T*3.2808399,Z,ue,Pe;N>5280?(Z=N/5280,ue=this._getRoundNum(Z),this._updateScale(this._iScale,ue+" mi",ue/Z)):(Pe=this._getRoundNum(N),this._updateScale(this._iScale,Pe+" ft",Pe/N))},_updateScale:function(T,N,Z){T.style.width=Math.round(this.options.maxWidth*Z)+"px",T.innerHTML=N},_getRoundNum:function(T){var N=Math.pow(10,(Math.floor(T)+"").length-1),Z=T/N;return Z=Z>=10?10:Z>=5?5:Z>=3?3:Z>=2?2:1,N*Z}}),te=function(T){return new H(T)},ge='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',ke=oc.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(fr.inlineSvg?ge+" ":"")+"Leaflet</a>"},initialize:function(T){f(this,T),this._attributions={}},onAdd:function(T){T.attributionControl=this,this._container=ia("div","leaflet-control-attribution"),Lf(this._container);for(var N in T._layers)T._layers[N].getAttribution&&this.addAttribution(T._layers[N].getAttribution());return this._update(),T.on("layeradd",this._addAttribution,this),this._container},onRemove:function(T){T.off("layeradd",this._addAttribution,this)},_addAttribution:function(T){T.layer.getAttribution&&(this.addAttribution(T.layer.getAttribution()),T.layer.once("remove",function(){this.removeAttribution(T.layer.getAttribution())},this))},setPrefix:function(T){return this.options.prefix=T,this._update(),this},addAttribution:function(T){return T?(this._attributions[T]||(this._attributions[T]=0),this._attributions[T]++,this._update(),this):this},removeAttribution:function(T){return T?(this._attributions[T]&&(this._attributions[T]--,this._update()),this):this},_update:function(){if(this._map){var T=[];for(var N in this._attributions)this._attributions[N]&&T.push(N);var Z=[];this.options.prefix&&Z.push(this.options.prefix),T.length&&Z.push(T.join(", ")),this._container.innerHTML=Z.join(' <span aria-hidden="true">|</span> ')}}});Ca.mergeOptions({attributionControl:!0}),Ca.addInitHook(function(){this.options.attributionControl&&new ke().addTo(this)});var He=function(T){return new ke(T)};oc.Layers=Fs,oc.Zoom=Go,oc.Scale=H,oc.Attribution=ke,fc.layers=_d,fc.zoom=k1,fc.scale=te,fc.attribution=He;var Ne=ie.extend({initialize:function(T){this._map=T},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ne.addTo=function(T,N){return T.addHandler(N,this),this};var ct={Events:Se},kt=fr.touch?"touchstart mousedown":"mousedown",Ht=je.extend({options:{clickTolerance:3},initialize:function(T,N,Z,ue){f(this,ue),this._element=T,this._dragStartTarget=N||T,this._preventOutline=Z},enable:function(){this._enabled||(wo(this._dragStartTarget,kt,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ht._dragging===this&&this.finishDrag(!0),rl(this._dragStartTarget,kt,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(T){if(this._enabled&&(this._moved=!1,!Du(this._element,"leaflet-zoom-anim"))){if(T.touches&&T.touches.length!==1){Ht._dragging===this&&this.finishDrag();return}if(!(Ht._dragging||T.shiftKey||T.which!==1&&T.button!==1&&!T.touches)&&(Ht._dragging=this,this._preventOutline&&$u(this._element),Pd(),Bl(),!this._moving)){this.fire("down");var N=T.touches?T.touches[0]:T,Z=Ff(this._element);this._startPoint=new ze(N.clientX,N.clientY),this._startPos=ba(this._element),this._parentScale=Hp(Z);var ue=T.type==="mousedown";wo(document,ue?"mousemove":"touchmove",this._onMove,this),wo(document,ue?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(T){if(this._enabled){if(T.touches&&T.touches.length>1){this._moved=!0;return}var N=T.touches&&T.touches.length===1?T.touches[0]:T,Z=new ze(N.clientX,N.clientY)._subtract(this._startPoint);!Z.x&&!Z.y||Math.abs(Z.x)+Math.abs(Z.y)<this.options.clickTolerance||(Z.x/=this._parentScale.x,Z.y/=this._parentScale.y,Yr(T),this._moved||(this.fire("dragstart"),this._moved=!0,uo(document.body,"leaflet-dragging"),this._lastTarget=T.target||T.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),uo(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(Z),this._moving=!0,this._lastEvent=T,this._updatePosition())}},_updatePosition:function(){var T={originalEvent:this._lastEvent};this.fire("predrag",T),bo(this._element,this._newPos),this.fire("drag",T)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(T){yl(document.body,"leaflet-dragging"),this._lastTarget&&(yl(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),rl(document,"mousemove touchmove",this._onMove,this),rl(document,"mouseup touchend touchcancel",this._onUp,this),ju(),Yo();var N=this._moved&&this._moving;this._moving=!1,Ht._dragging=!1,N&&this.fire("dragend",{noInertia:T,distance:this._newPos.distanceTo(this._startPos)})}});function hi(T,N,Z){var ue,Pe=[1,4,2,8],st,ti,Ei,Ui,On,Wr,$s,qo;for(st=0,Wr=T.length;st<Wr;st++)T[st]._code=gc(T[st],N);for(Ei=0;Ei<4;Ei++){for($s=Pe[Ei],ue=[],st=0,Wr=T.length,ti=Wr-1;st<Wr;ti=st++)Ui=T[st],On=T[ti],Ui._code&$s?On._code&$s||(qo=Ro(On,Ui,$s,N,Z),qo._code=gc(qo,N),ue.push(qo)):(On._code&$s&&(qo=Ro(On,Ui,$s,N,Z),qo._code=gc(qo,N),ue.push(qo)),ue.push(Ui));T=ue}return T}function Li(T,N){var Z,ue,Pe,st,ti,Ei,Ui,On,Wr;if(!T||T.length===0)throw new Error("latlngs not passed");zc(T)||(console.warn("latlngs are not flat! Only the first ring will be used"),T=T[0]);var $s=yt([0,0]),qo=Tt(T),q=qo.getNorthWest().distanceTo(qo.getSouthWest())*qo.getNorthEast().distanceTo(qo.getNorthWest());q<1700&&($s=nn(T));var oe=T.length,he=[];for(Z=0;Z<oe;Z++){var de=yt(T[Z]);he.push(N.project(yt([de.lat-$s.lat,de.lng-$s.lng])))}for(Ei=Ui=On=0,Z=0,ue=oe-1;Z<oe;ue=Z++)Pe=he[Z],st=he[ue],ti=Pe.y*st.x-st.y*Pe.x,Ui+=(Pe.x+st.x)*ti,On+=(Pe.y+st.y)*ti,Ei+=ti*3;Ei===0?Wr=he[0]:Wr=[Ui/Ei,On/Ei];var De=N.unproject(Ae(Wr));return yt([De.lat+$s.lat,De.lng+$s.lng])}function nn(T){for(var N=0,Z=0,ue=0,Pe=0;Pe<T.length;Pe++){var st=yt(T[Pe]);N+=st.lat,Z+=st.lng,ue++}return yt([N/ue,Z/ue])}var Ii={__proto__:null,clipPolygon:hi,polygonCenter:Li,centroid:nn};function Oi(T,N){if(!N||!T.length)return T.slice();var Z=N*N;return T=Ea(T,Z),T=Ao(T,Z),T}function is(T,N,Z){return Math.sqrt(Fo(T,N,Z,!0))}function Io(T,N,Z){return Fo(T,N,Z)}function Ao(T,N){var Z=T.length,ue=typeof Uint8Array<"u"?Uint8Array:Array,Pe=new ue(Z);Pe[0]=Pe[Z-1]=1,sl(T,Pe,N,0,Z-1);var st,ti=[];for(st=0;st<Z;st++)Pe[st]&&ti.push(T[st]);return ti}function sl(T,N,Z,ue,Pe){var st=0,ti,Ei,Ui;for(Ei=ue+1;Ei<=Pe-1;Ei++)Ui=Fo(T[Ei],T[ue],T[Pe],!0),Ui>st&&(ti=Ei,st=Ui);st>Z&&(N[ti]=1,sl(T,N,Z,ue,ti),sl(T,N,Z,ti,Pe))}function Ea(T,N){for(var Z=[T[0]],ue=1,Pe=0,st=T.length;ue<st;ue++)ho(T[ue],T[Pe])>N&&(Z.push(T[ue]),Pe=ue);return Pe<st-1&&Z.push(T[st-1]),Z}var $d;function rd(T,N,Z,ue,Pe){var st=ue?$d:gc(T,Z),ti=gc(N,Z),Ei,Ui,On;for($d=ti;;){if(!(st|ti))return[T,N];if(st&ti)return!1;Ei=st||ti,Ui=Ro(T,N,Ei,Z,Pe),On=gc(Ui,Z),Ei===st?(T=Ui,st=On):(N=Ui,ti=On)}}function Ro(T,N,Z,ue,Pe){var st=N.x-T.x,ti=N.y-T.y,Ei=ue.min,Ui=ue.max,On,Wr;return Z&8?(On=T.x+st*(Ui.y-T.y)/ti,Wr=Ui.y):Z&4?(On=T.x+st*(Ei.y-T.y)/ti,Wr=Ei.y):Z&2?(On=Ui.x,Wr=T.y+ti*(Ui.x-T.x)/st):Z&1&&(On=Ei.x,Wr=T.y+ti*(Ei.x-T.x)/st),new ze(On,Wr,Pe)}function gc(T,N){var Z=0;return T.x<N.min.x?Z|=1:T.x>N.max.x&&(Z|=2),T.y<N.min.y?Z|=4:T.y>N.max.y&&(Z|=8),Z}function ho(T,N){var Z=N.x-T.x,ue=N.y-T.y;return Z*Z+ue*ue}function Fo(T,N,Z,ue){var Pe=N.x,st=N.y,ti=Z.x-Pe,Ei=Z.y-st,Ui=ti*ti+Ei*Ei,On;return Ui>0&&(On=((T.x-Pe)*ti+(T.y-st)*Ei)/Ui,On>1?(Pe=Z.x,st=Z.y):On>0&&(Pe+=ti*On,st+=Ei*On)),ti=T.x-Pe,Ei=T.y-st,ue?ti*ti+Ei*Ei:new ze(Pe,st)}function zc(T){return!E(T[0])||typeof T[0][0]!="object"&&typeof T[0][0]<"u"}function Cd(T){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zc(T)}function Mc(T,N){var Z,ue,Pe,st,ti,Ei,Ui,On;if(!T||T.length===0)throw new Error("latlngs not passed");zc(T)||(console.warn("latlngs are not flat! Only the first ring will be used"),T=T[0]);var Wr=yt([0,0]),$s=Tt(T),qo=$s.getNorthWest().distanceTo($s.getSouthWest())*$s.getNorthEast().distanceTo($s.getNorthWest());qo<1700&&(Wr=nn(T));var q=T.length,oe=[];for(Z=0;Z<q;Z++){var he=yt(T[Z]);oe.push(N.project(yt([he.lat-Wr.lat,he.lng-Wr.lng])))}for(Z=0,ue=0;Z<q-1;Z++)ue+=oe[Z].distanceTo(oe[Z+1])/2;if(ue===0)On=oe[0];else for(Z=0,st=0;Z<q-1;Z++)if(ti=oe[Z],Ei=oe[Z+1],Pe=ti.distanceTo(Ei),st+=Pe,st>ue){Ui=(st-ue)/Pe,On=[Ei.x-Ui*(Ei.x-ti.x),Ei.y-Ui*(Ei.y-ti.y)];break}var de=N.unproject(Ae(On));return yt([de.lat+Wr.lat,de.lng+Wr.lng])}var K={__proto__:null,simplify:Oi,pointToSegmentDistance:is,closestPointOnSegment:Io,clipSegment:rd,_getEdgeIntersection:Ro,_getBitCode:gc,_sqClosestPointOnSegment:Fo,isFlat:zc,_flat:Cd,polylineCenter:Mc},we={project:function(T){return new ze(T.lng,T.lat)},unproject:function(T){return new at(T.y,T.x)},bounds:new Ye([-180,-90],[180,90])},Oe={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Ye([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(T){var N=Math.PI/180,Z=this.R,ue=T.lat*N,Pe=this.R_MINOR/Z,st=Math.sqrt(1-Pe*Pe),ti=st*Math.sin(ue),Ei=Math.tan(Math.PI/4-ue/2)/Math.pow((1-ti)/(1+ti),st/2);return ue=-Z*Math.log(Math.max(Ei,1e-10)),new ze(T.lng*N*Z,ue)},unproject:function(T){for(var N=180/Math.PI,Z=this.R,ue=this.R_MINOR/Z,Pe=Math.sqrt(1-ue*ue),st=Math.exp(-T.y/Z),ti=Math.PI/2-2*Math.atan(st),Ei=0,Ui=.1,On;Ei<15&&Math.abs(Ui)>1e-7;Ei++)On=Pe*Math.sin(ti),On=Math.pow((1-On)/(1+On),Pe/2),Ui=Math.PI/2-2*Math.atan(st*On)-ti,ti+=Ui;return new at(ti*N,T.x*N/Z)}},mt={__proto__:null,LonLat:we,Mercator:Oe,SphericalMercator:jt},vi=n({},Re,{code:"EPSG:3395",projection:Oe,transformation:function(){var T=.5/(Math.PI*Oe.R);return qt(T,.5,-T,.5)}()}),Bi=n({},Re,{code:"EPSG:4326",projection:we,transformation:qt(1/180,1,-1/180,.5)}),jn=n({},_t,{projection:we,transformation:qt(1,0,-1,0),scale:function(T){return Math.pow(2,T)},zoom:function(T){return Math.log(T)/Math.LN2},distance:function(T,N){var Z=N.lng-T.lng,ue=N.lat-T.lat;return Math.sqrt(Z*Z+ue*ue)},infinite:!0});_t.Earth=Re,_t.EPSG3395=vi,_t.EPSG3857=ui,_t.EPSG900913=_i,_t.EPSG4326=Bi,_t.Simple=jn;var Vr=je.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(T){return T.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(T){return T&&T.removeLayer(this),this},getPane:function(T){return this._map.getPane(T?this.options[T]||T:this.options.pane)},addInteractiveTarget:function(T){return this._map._targets[o(T)]=this,this},removeInteractiveTarget:function(T){return delete this._map._targets[o(T)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(T){var N=T.target;if(N.hasLayer(this)){if(this._map=N,this._zoomAnimated=N._zoomAnimated,this.getEvents){var Z=this.getEvents();N.on(Z,this),this.once("remove",function(){N.off(Z,this)},this)}this.onAdd(N),this.fire("add"),N.fire("layeradd",{layer:this})}}});Ca.include({addLayer:function(T){if(!T._layerAdd)throw new Error("The provided object is not a Layer.");var N=o(T);return this._layers[N]?this:(this._layers[N]=T,T._mapToAdd=this,T.beforeAdd&&T.beforeAdd(this),this.whenReady(T._layerAdd,T),this)},removeLayer:function(T){var N=o(T);return this._layers[N]?(this._loaded&&T.onRemove(this),delete this._layers[N],this._loaded&&(this.fire("layerremove",{layer:T}),T.fire("remove")),T._map=T._mapToAdd=null,this):this},hasLayer:function(T){return o(T)in this._layers},eachLayer:function(T,N){for(var Z in this._layers)T.call(N,this._layers[Z]);return this},_addLayers:function(T){T=T?E(T)?T:[T]:[];for(var N=0,Z=T.length;N<Z;N++)this.addLayer(T[N])},_addZoomLimit:function(T){(!isNaN(T.options.maxZoom)||!isNaN(T.options.minZoom))&&(this._zoomBoundLayers[o(T)]=T,this._updateZoomLevels())},_removeZoomLimit:function(T){var N=o(T);this._zoomBoundLayers[N]&&(delete this._zoomBoundLayers[N],this._updateZoomLevels())},_updateZoomLevels:function(){var T=1/0,N=-1/0,Z=this._getZoomSpan();for(var ue in this._zoomBoundLayers){var Pe=this._zoomBoundLayers[ue].options;T=Pe.minZoom===void 0?T:Math.min(T,Pe.minZoom),N=Pe.maxZoom===void 0?N:Math.max(N,Pe.maxZoom)}this._layersMaxZoom=N===-1/0?void 0:N,this._layersMinZoom=T===1/0?void 0:T,Z!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var El=Vr.extend({initialize:function(T,N){f(this,N),this._layers={};var Z,ue;if(T)for(Z=0,ue=T.length;Z<ue;Z++)this.addLayer(T[Z])},addLayer:function(T){var N=this.getLayerId(T);return this._layers[N]=T,this._map&&this._map.addLayer(T),this},removeLayer:function(T){var N=T in this._layers?T:this.getLayerId(T);return this._map&&this._layers[N]&&this._map.removeLayer(this._layers[N]),delete this._layers[N],this},hasLayer:function(T){var N=typeof T=="number"?T:this.getLayerId(T);return N in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(T){var N=Array.prototype.slice.call(arguments,1),Z,ue;for(Z in this._layers)ue=this._layers[Z],ue[T]&&ue[T].apply(ue,N);return this},onAdd:function(T){this.eachLayer(T.addLayer,T)},onRemove:function(T){this.eachLayer(T.removeLayer,T)},eachLayer:function(T,N){for(var Z in this._layers)T.call(N,this._layers[Z]);return this},getLayer:function(T){return this._layers[T]},getLayers:function(){var T=[];return this.eachLayer(T.push,T),T},setZIndex:function(T){return this.invoke("setZIndex",T)},getLayerId:function(T){return o(T)}}),Lo=function(T,N){return new El(T,N)},Er=El.extend({addLayer:function(T){return this.hasLayer(T)?this:(T.addEventParent(this),El.prototype.addLayer.call(this,T),this.fire("layeradd",{layer:T}))},removeLayer:function(T){return this.hasLayer(T)?(T in this._layers&&(T=this._layers[T]),T.removeEventParent(this),El.prototype.removeLayer.call(this,T),this.fire("layerremove",{layer:T})):this},setStyle:function(T){return this.invoke("setStyle",T)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var T=new Ft;for(var N in this._layers){var Z=this._layers[N];T.extend(Z.getBounds?Z.getBounds():Z.getLatLng())}return T}}),yo=function(T,N){return new Er(T,N)},uu=ie.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(T){f(this,T)},createIcon:function(T){return this._createIcon("icon",T)},createShadow:function(T){return this._createIcon("shadow",T)},_createIcon:function(T,N){var Z=this._getIconUrl(T);if(!Z){if(T==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var ue=this._createImg(Z,N&&N.tagName==="IMG"?N:null);return this._setIconStyles(ue,T),(this.options.crossOrigin||this.options.crossOrigin==="")&&(ue.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),ue},_setIconStyles:function(T,N){var Z=this.options,ue=Z[N+"Size"];typeof ue=="number"&&(ue=[ue,ue]);var Pe=Ae(ue),st=Ae(N==="shadow"&&Z.shadowAnchor||Z.iconAnchor||Pe&&Pe.divideBy(2,!0));T.className="leaflet-marker-"+N+" "+(Z.className||""),st&&(T.style.marginLeft=-st.x+"px",T.style.marginTop=-st.y+"px"),Pe&&(T.style.width=Pe.x+"px",T.style.height=Pe.y+"px")},_createImg:function(T,N){return N=N||document.createElement("img"),N.src=T,N},_getIconUrl:function(T){return fr.retina&&this.options[T+"RetinaUrl"]||this.options[T+"Url"]}});function zl(T){return new uu(T)}var Mu=uu.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(T){return typeof Mu.imagePath!="string"&&(Mu.imagePath=this._detectIconPath()),(this.options.imagePath||Mu.imagePath)+uu.prototype._getIconUrl.call(this,T)},_stripUrl:function(T){var N=function(Z,ue,Pe){var st=ue.exec(Z);return st&&st[Pe]};return T=N(T,/^url\((['"])?(.+)\1\)$/,2),T&&N(T,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var T=ia("div","leaflet-default-icon-path",document.body),N=Wm(T,"background-image")||Wm(T,"backgroundImage");if(document.body.removeChild(T),N=this._stripUrl(N),N)return N;var Z=document.querySelector('link[href$="leaflet.css"]');return Z?Z.href.substring(0,Z.href.length-11-1):""}}),Of=Ne.extend({initialize:function(T){this._marker=T},addHooks:function(){var T=this._marker._icon;this._draggable||(this._draggable=new Ht(T,T,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),uo(T,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&yl(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(T){var N=this._marker,Z=N._map,ue=this._marker.options.autoPanSpeed,Pe=this._marker.options.autoPanPadding,st=ba(N._icon),ti=Z.getPixelBounds(),Ei=Z.getPixelOrigin(),Ui=ft(ti.min._subtract(Ei).add(Pe),ti.max._subtract(Ei).subtract(Pe));if(!Ui.contains(st)){var On=Ae((Math.max(Ui.max.x,st.x)-Ui.max.x)/(ti.max.x-Ui.max.x)-(Math.min(Ui.min.x,st.x)-Ui.min.x)/(ti.min.x-Ui.min.x),(Math.max(Ui.max.y,st.y)-Ui.max.y)/(ti.max.y-Ui.max.y)-(Math.min(Ui.min.y,st.y)-Ui.min.y)/(ti.min.y-Ui.min.y)).multiplyBy(ue);Z.panBy(On,{animate:!1}),this._draggable._newPos._add(On),this._draggable._startPos._add(On),bo(N._icon,this._draggable._newPos),this._onDrag(T),this._panRequest=ne(this._adjustPan.bind(this,T))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(T){this._marker.options.autoPan&&(pe(this._panRequest),this._panRequest=ne(this._adjustPan.bind(this,T)))},_onDrag:function(T){var N=this._marker,Z=N._shadow,ue=ba(N._icon),Pe=N._map.layerPointToLatLng(ue);Z&&bo(Z,ue),N._latlng=Pe,T.latlng=Pe,T.oldLatLng=this._oldLatLng,N.fire("move",T).fire("drag",T)},_onDragEnd:function(T){pe(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",T)}}),K0=Vr.extend({options:{icon:new Mu,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(T,N){f(this,N),this._latlng=yt(T)},onAdd:function(T){this._zoomAnimated=this._zoomAnimated&&T.options.markerZoomAnimation,this._zoomAnimated&&T.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(T){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&T.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(T){var N=this._latlng;return this._latlng=yt(T),this.update(),this.fire("move",{oldLatLng:N,latlng:this._latlng})},setZIndexOffset:function(T){return this.options.zIndexOffset=T,this.update()},getIcon:function(){return this.options.icon},setIcon:function(T){return this.options.icon=T,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var T=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(T)}return this},_initIcon:function(){var T=this.options,N="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),Z=T.icon.createIcon(this._icon),ue=!1;Z!==this._icon&&(this._icon&&this._removeIcon(),ue=!0,T.title&&(Z.title=T.title),Z.tagName==="IMG"&&(Z.alt=T.alt||"")),uo(Z,N),T.keyboard&&(Z.tabIndex="0",Z.setAttribute("role","button")),this._icon=Z,T.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&wo(Z,"focus",this._panOnFocus,this);var Pe=T.icon.createShadow(this._shadow),st=!1;Pe!==this._shadow&&(this._removeShadow(),st=!0),Pe&&(uo(Pe,N),Pe.alt=""),this._shadow=Pe,T.opacity<1&&this._updateOpacity(),ue&&this.getPane().appendChild(this._icon),this._initInteraction(),Pe&&st&&this.getPane(T.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&rl(this._icon,"focus",this._panOnFocus,this),Fa(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Fa(this._shadow),this._shadow=null},_setPos:function(T){this._icon&&bo(this._icon,T),this._shadow&&bo(this._shadow,T),this._zIndex=T.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(T){this._icon&&(this._icon.style.zIndex=this._zIndex+T)},_animateZoom:function(T){var N=this._map._latLngToNewLayerPoint(this._latlng,T.zoom,T.center).round();this._setPos(N)},_initInteraction:function(){if(this.options.interactive&&(uo(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Of)){var T=this.options.draggable;this.dragging&&(T=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Of(this),T&&this.dragging.enable()}},setOpacity:function(T){return this.options.opacity=T,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var T=this.options.opacity;this._icon&&id(this._icon,T),this._shadow&&id(this._shadow,T)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var T=this._map;if(T){var N=this.options.icon.options,Z=N.iconSize?Ae(N.iconSize):Ae(0,0),ue=N.iconAnchor?Ae(N.iconAnchor):Ae(0,0);T.panInside(this._latlng,{paddingTopLeft:ue,paddingBottomRight:Z.subtract(ue)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Hc(T,N){return new K0(T,N)}var Rd=Vr.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(T){this._renderer=T.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(T){return f(this,T),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&T&&Object.prototype.hasOwnProperty.call(T,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Nf=Rd.extend({options:{fill:!0,radius:10},initialize:function(T,N){f(this,N),this._latlng=yt(T),this._radius=this.options.radius},setLatLng:function(T){var N=this._latlng;return this._latlng=yt(T),this.redraw(),this.fire("move",{oldLatLng:N,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(T){return this.options.radius=this._radius=T,this.redraw()},getRadius:function(){return this._radius},setStyle:function(T){var N=T&&T.radius||this._radius;return Rd.prototype.setStyle.call(this,T),this.setRadius(N),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var T=this._radius,N=this._radiusY||T,Z=this._clickTolerance(),ue=[T+Z,N+Z];this._pxBounds=new Ye(this._point.subtract(ue),this._point.add(ue))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(T){return T.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function jh(T,N){return new Nf(T,N)}var $h=Nf.extend({initialize:function(T,N,Z){if(typeof N=="number"&&(N=n({},Z,{radius:N})),f(this,N),this._latlng=yt(T),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(T){return this._mRadius=T,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var T=[this._radius,this._radiusY||this._radius];return new Ft(this._map.layerPointToLatLng(this._point.subtract(T)),this._map.layerPointToLatLng(this._point.add(T)))},setStyle:Rd.prototype.setStyle,_project:function(){var T=this._latlng.lng,N=this._latlng.lat,Z=this._map,ue=Z.options.crs;if(ue.distance===Re.distance){var Pe=Math.PI/180,st=this._mRadius/Re.R/Pe,ti=Z.project([N+st,T]),Ei=Z.project([N-st,T]),Ui=ti.add(Ei).divideBy(2),On=Z.unproject(Ui).lat,Wr=Math.acos((Math.cos(st*Pe)-Math.sin(N*Pe)*Math.sin(On*Pe))/(Math.cos(N*Pe)*Math.cos(On*Pe)))/Pe;(isNaN(Wr)||Wr===0)&&(Wr=st/Math.cos(Math.PI/180*N)),this._point=Ui.subtract(Z.getPixelOrigin()),this._radius=isNaN(Wr)?0:Ui.x-Z.project([On,T-Wr]).x,this._radiusY=Ui.y-ti.y}else{var $s=ue.unproject(ue.project(this._latlng).subtract([this._mRadius,0]));this._point=Z.latLngToLayerPoint(this._latlng),this._radius=this._point.x-Z.latLngToLayerPoint($s).x}this._updateBounds()}});function _l(T,N,Z){return new $h(T,N,Z)}var kc=Rd.extend({options:{smoothFactor:1,noClip:!1},initialize:function(T,N){f(this,N),this._setLatLngs(T)},getLatLngs:function(){return this._latlngs},setLatLngs:function(T){return this._setLatLngs(T),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(T){for(var N=1/0,Z=null,ue=Fo,Pe,st,ti=0,Ei=this._parts.length;ti<Ei;ti++)for(var Ui=this._parts[ti],On=1,Wr=Ui.length;On<Wr;On++){Pe=Ui[On-1],st=Ui[On];var $s=ue(T,Pe,st,!0);$s<N&&(N=$s,Z=ue(T,Pe,st))}return Z&&(Z.distance=Math.sqrt(N)),Z},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Mc(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(T,N){return N=N||this._defaultShape(),T=yt(T),N.push(T),this._bounds.extend(T),this.redraw()},_setLatLngs:function(T){this._bounds=new Ft,this._latlngs=this._convertLatLngs(T)},_defaultShape:function(){return zc(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(T){for(var N=[],Z=zc(T),ue=0,Pe=T.length;ue<Pe;ue++)Z?(N[ue]=yt(T[ue]),this._bounds.extend(N[ue])):N[ue]=this._convertLatLngs(T[ue]);return N},_project:function(){var T=new Ye;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,T),this._bounds.isValid()&&T.isValid()&&(this._rawPxBounds=T,this._updateBounds())},_updateBounds:function(){var T=this._clickTolerance(),N=new ze(T,T);this._rawPxBounds&&(this._pxBounds=new Ye([this._rawPxBounds.min.subtract(N),this._rawPxBounds.max.add(N)]))},_projectLatlngs:function(T,N,Z){var ue=T[0]instanceof at,Pe=T.length,st,ti;if(ue){for(ti=[],st=0;st<Pe;st++)ti[st]=this._map.latLngToLayerPoint(T[st]),Z.extend(ti[st]);N.push(ti)}else for(st=0;st<Pe;st++)this._projectLatlngs(T[st],N,Z)},_clipPoints:function(){var T=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(T))){if(this.options.noClip){this._parts=this._rings;return}var N=this._parts,Z,ue,Pe,st,ti,Ei,Ui;for(Z=0,Pe=0,st=this._rings.length;Z<st;Z++)for(Ui=this._rings[Z],ue=0,ti=Ui.length;ue<ti-1;ue++)Ei=rd(Ui[ue],Ui[ue+1],T,ue,!0),Ei&&(N[Pe]=N[Pe]||[],N[Pe].push(Ei[0]),(Ei[1]!==Ui[ue+1]||ue===ti-2)&&(N[Pe].push(Ei[1]),Pe++))}},_simplifyPoints:function(){for(var T=this._parts,N=this.options.smoothFactor,Z=0,ue=T.length;Z<ue;Z++)T[Z]=Oi(T[Z],N)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(T,N){var Z,ue,Pe,st,ti,Ei,Ui=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(T))return!1;for(Z=0,st=this._parts.length;Z<st;Z++)for(Ei=this._parts[Z],ue=0,ti=Ei.length,Pe=ti-1;ue<ti;Pe=ue++)if(!(!N&&ue===0)&&is(T,Ei[Pe],Ei[ue])<=Ui)return!0;return!1}});function Y0(T,N){return new kc(T,N)}kc._flat=Cd;var Up=kc.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Li(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(T){var N=kc.prototype._convertLatLngs.call(this,T),Z=N.length;return Z>=2&&N[0]instanceof at&&N[0].equals(N[Z-1])&&N.pop(),N},_setLatLngs:function(T){kc.prototype._setLatLngs.call(this,T),zc(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zc(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var T=this._renderer._bounds,N=this.options.weight,Z=new ze(N,N);if(T=new Ye(T.min.subtract(Z),T.max.add(Z)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(T))){if(this.options.noClip){this._parts=this._rings;return}for(var ue=0,Pe=this._rings.length,st;ue<Pe;ue++)st=hi(this._rings[ue],T,!0),st.length&&this._parts.push(st)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(T){var N=!1,Z,ue,Pe,st,ti,Ei,Ui,On;if(!this._pxBounds||!this._pxBounds.contains(T))return!1;for(st=0,Ui=this._parts.length;st<Ui;st++)for(Z=this._parts[st],ti=0,On=Z.length,Ei=On-1;ti<On;Ei=ti++)ue=Z[ti],Pe=Z[Ei],ue.y>T.y!=Pe.y>T.y&&T.x<(Pe.x-ue.x)*(T.y-ue.y)/(Pe.y-ue.y)+ue.x&&(N=!N);return N||kc.prototype._containsPoint.call(this,T,!0)}});function Kg(T,N){return new Up(T,N)}var Hl=Er.extend({initialize:function(T,N){f(this,N),this._layers={},T&&this.addData(T)},addData:function(T){var N=E(T)?T:T.features,Z,ue,Pe;if(N){for(Z=0,ue=N.length;Z<ue;Z++)Pe=N[Z],(Pe.geometries||Pe.geometry||Pe.features||Pe.coordinates)&&this.addData(Pe);return this}var st=this.options;if(st.filter&&!st.filter(T))return this;var ti=ol(T,st);return ti?(ti.feature=wi(T),ti.defaultOptions=ti.options,this.resetStyle(ti),st.onEachFeature&&st.onEachFeature(T,ti),this.addLayer(ti)):this},resetStyle:function(T){return T===void 0?this.eachLayer(this.resetStyle,this):(T.options=n({},T.defaultOptions),this._setLayerStyle(T,this.options.style),this)},setStyle:function(T){return this.eachLayer(function(N){this._setLayerStyle(N,T)},this)},_setLayerStyle:function(T,N){T.setStyle&&(typeof N=="function"&&(N=N(T.feature)),T.setStyle(N))}});function ol(T,N){var Z=T.type==="Feature"?T.geometry:T,ue=Z?Z.coordinates:null,Pe=[],st=N&&N.pointToLayer,ti=N&&N.coordsToLatLng||F2,Ei,Ui,On,Wr;if(!ue&&!Z)return null;switch(Z.type){case"Point":return Ei=ti(ue),jp(st,T,Ei,N);case"MultiPoint":for(On=0,Wr=ue.length;On<Wr;On++)Ei=ti(ue[On]),Pe.push(jp(st,T,Ei,N));return new Er(Pe);case"LineString":case"MultiLineString":return Ui=I1(ue,Z.type==="LineString"?0:1,ti),new kc(Ui,N);case"Polygon":case"MultiPolygon":return Ui=I1(ue,Z.type==="Polygon"?1:2,ti),new Up(Ui,N);case"GeometryCollection":for(On=0,Wr=Z.geometries.length;On<Wr;On++){var $s=ol({geometry:Z.geometries[On],type:"Feature",properties:T.properties},N);$s&&Pe.push($s)}return new Er(Pe);case"FeatureCollection":for(On=0,Wr=Z.features.length;On<Wr;On++){var qo=ol(Z.features[On],N);qo&&Pe.push(qo)}return new Er(Pe);default:throw new Error("Invalid GeoJSON object.")}}function jp(T,N,Z,ue){return T?T(N,Z):new K0(Z,ue&&ue.markersInheritOptions&&ue)}function F2(T){return new at(T[1],T[0],T[2])}function I1(T,N,Z){for(var ue=[],Pe=0,st=T.length,ti;Pe<st;Pe++)ti=N?I1(T[Pe],N-1,Z):(Z||F2)(T[Pe]),ue.push(ti);return ue}function q0(T,N){return T=yt(T),T.alt!==void 0?[d(T.lng,N),d(T.lat,N),d(T.alt,N)]:[d(T.lng,N),d(T.lat,N)]}function Mt(T,N,Z,ue){for(var Pe=[],st=0,ti=T.length;st<ti;st++)Pe.push(N?Mt(T[st],zc(T[st])?0:N-1,Z,ue):q0(T[st],ue));return!N&&Z&&Pe.length>0&&Pe.push(Pe[0].slice()),Pe}function li(T,N){return T.feature?n({},T.feature,{geometry:N}):wi(N)}function wi(T){return T.type==="Feature"||T.type==="FeatureCollection"?T:{type:"Feature",properties:{},geometry:T}}var Fe={toGeoJSON:function(T){return li(this,{type:"Point",coordinates:q0(this.getLatLng(),T)})}};K0.include(Fe),$h.include(Fe),Nf.include(Fe),kc.include({toGeoJSON:function(T){var N=!zc(this._latlngs),Z=Mt(this._latlngs,N?1:0,!1,T);return li(this,{type:(N?"Multi":"")+"LineString",coordinates:Z})}}),Up.include({toGeoJSON:function(T){var N=!zc(this._latlngs),Z=N&&!zc(this._latlngs[0]),ue=Mt(this._latlngs,Z?2:N?1:0,!0,T);return N||(ue=[ue]),li(this,{type:(Z?"Multi":"")+"Polygon",coordinates:ue})}}),El.include({toMultiPoint:function(T){var N=[];return this.eachLayer(function(Z){N.push(Z.toGeoJSON(T).geometry.coordinates)}),li(this,{type:"MultiPoint",coordinates:N})},toGeoJSON:function(T){var N=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(N==="MultiPoint")return this.toMultiPoint(T);var Z=N==="GeometryCollection",ue=[];return this.eachLayer(function(Pe){if(Pe.toGeoJSON){var st=Pe.toGeoJSON(T);if(Z)ue.push(st.geometry);else{var ti=wi(st);ti.type==="FeatureCollection"?ue.push.apply(ue,ti.features):ue.push(ti)}}}),Z?li(this,{geometries:ue,type:"GeometryCollection"}):{type:"FeatureCollection",features:ue}}});function dt(T,N){return new Hl(T,N)}var ht=dt,ci=Vr.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(T,N,Z){this._url=T,this._bounds=Tt(N),f(this,Z)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(uo(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Fa(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(T){return this.options.opacity=T,this._image&&this._updateOpacity(),this},setStyle:function(T){return T.opacity&&this.setOpacity(T.opacity),this},bringToFront:function(){return this._map&&vl(this._image),this},bringToBack:function(){return this._map&&Jl(this._image),this},setUrl:function(T){return this._url=T,this._image&&(this._image.src=T),this},setBounds:function(T){return this._bounds=Tt(T),this._map&&this._reset(),this},getEvents:function(){var T={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(T.zoomanim=this._animateZoom),T},setZIndex:function(T){return this.options.zIndex=T,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var T=this._url.tagName==="IMG",N=this._image=T?this._url:ia("img");if(uo(N,"leaflet-image-layer"),this._zoomAnimated&&uo(N,"leaflet-zoom-animated"),this.options.className&&uo(N,this.options.className),N.onselectstart=c,N.onmousemove=c,N.onload=r(this.fire,this,"load"),N.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(N.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),T){this._url=N.src;return}N.src=this._url,N.alt=this.options.alt},_animateZoom:function(T){var N=this._map.getZoomScale(T.zoom),Z=this._map._latLngBoundsToNewLayerBounds(this._bounds,T.zoom,T.center).min;yd(this._image,Z,N)},_reset:function(){var T=this._image,N=new Ye(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),Z=N.getSize();bo(T,N.min),T.style.width=Z.x+"px",T.style.height=Z.y+"px"},_updateOpacity:function(){id(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var T=this.options.errorOverlayUrl;T&&this._url!==T&&(this._url=T,this._image.src=T)},getCenter:function(){return this._bounds.getCenter()}}),Ni=function(T,N,Z){return new ci(T,N,Z)},Qi=ci.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var T=this._url.tagName==="VIDEO",N=this._image=T?this._url:ia("video");if(uo(N,"leaflet-image-layer"),this._zoomAnimated&&uo(N,"leaflet-zoom-animated"),this.options.className&&uo(N,this.options.className),N.onselectstart=c,N.onmousemove=c,N.onloadeddata=r(this.fire,this,"load"),T){for(var Z=N.getElementsByTagName("source"),ue=[],Pe=0;Pe<Z.length;Pe++)ue.push(Z[Pe].src);this._url=Z.length>0?ue:[N.src];return}E(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(N.style,"objectFit")&&(N.style.objectFit="fill"),N.autoplay=!!this.options.autoplay,N.loop=!!this.options.loop,N.muted=!!this.options.muted,N.playsInline=!!this.options.playsInline;for(var st=0;st<this._url.length;st++){var ti=ia("source");ti.src=this._url[st],N.appendChild(ti)}}});function Br(T,N,Z){return new Qi(T,N,Z)}var hn=ci.extend({_initImage:function(){var T=this._image=this._url;uo(T,"leaflet-image-layer"),this._zoomAnimated&&uo(T,"leaflet-zoom-animated"),this.options.className&&uo(T,this.options.className),T.onselectstart=c,T.onmousemove=c}});function us(T,N,Z){return new hn(T,N,Z)}var ns=Vr.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(T,N){T&&(T instanceof at||E(T))?(this._latlng=yt(T),f(this,N)):(f(this,T),this._source=N),this.options.content&&(this._content=this.options.content)},openOn:function(T){return T=arguments.length?T:this._source._map,T.hasLayer(this)||T.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(T){return this._map?this.close():(arguments.length?this._source=T:T=this._source,this._prepareOpen(),this.openOn(T._map)),this},onAdd:function(T){this._zoomAnimated=T._zoomAnimated,this._container||this._initLayout(),T._fadeAnimated&&id(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),T._fadeAnimated&&id(this._container,1),this.bringToFront(),this.options.interactive&&(uo(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(T){T._fadeAnimated?(id(this._container,0),this._removeTimeout=setTimeout(r(Fa,void 0,this._container),200)):Fa(this._container),this.options.interactive&&(yl(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(T){return this._latlng=yt(T),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(T){return this._content=T,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var T={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(T.zoomanim=this._animateZoom),T},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&vl(this._container),this},bringToBack:function(){return this._map&&Jl(this._container),this},_prepareOpen:function(T){var N=this._source;if(!N._map)return!1;if(N instanceof Er){N=null;var Z=this._source._layers;for(var ue in Z)if(Z[ue]._map){N=Z[ue];break}if(!N)return!1;this._source=N}if(!T)if(N.getCenter)T=N.getCenter();else if(N.getLatLng)T=N.getLatLng();else if(N.getBounds)T=N.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(T),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var T=this._contentNode,N=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof N=="string")T.innerHTML=N;else{for(;T.hasChildNodes();)T.removeChild(T.firstChild);T.appendChild(N)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var T=this._map.latLngToLayerPoint(this._latlng),N=Ae(this.options.offset),Z=this._getAnchor();this._zoomAnimated?bo(this._container,T.add(Z)):N=N.add(T).add(Z);var ue=this._containerBottom=-N.y,Pe=this._containerLeft=-Math.round(this._containerWidth/2)+N.x;this._container.style.bottom=ue+"px",this._container.style.left=Pe+"px"}},_getAnchor:function(){return[0,0]}});Ca.include({_initOverlay:function(T,N,Z,ue){var Pe=N;return Pe instanceof T||(Pe=new T(ue).setContent(N)),Z&&Pe.setLatLng(Z),Pe}}),Vr.include({_initOverlay:function(T,N,Z,ue){var Pe=Z;return Pe instanceof T?(f(Pe,ue),Pe._source=this):(Pe=N&&!ue?N:new T(ue,this),Pe.setContent(Z)),Pe}});var _r=ns.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(T){return T=arguments.length?T:this._source._map,!T.hasLayer(this)&&T._popup&&T._popup.options.autoClose&&T.removeLayer(T._popup),T._popup=this,ns.prototype.openOn.call(this,T)},onAdd:function(T){ns.prototype.onAdd.call(this,T),T.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Rd||this._source.on("preclick",nd))},onRemove:function(T){ns.prototype.onRemove.call(this,T),T.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Rd||this._source.off("preclick",nd))},getEvents:function(){var T=ns.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(T.preclick=this.close),this.options.keepInView&&(T.moveend=this._adjustPan),T},_initLayout:function(){var T="leaflet-popup",N=this._container=ia("div",T+" "+(this.options.className||"")+" leaflet-zoom-animated"),Z=this._wrapper=ia("div",T+"-content-wrapper",N);if(this._contentNode=ia("div",T+"-content",Z),Lf(N),D1(this._contentNode),wo(N,"contextmenu",nd),this._tipContainer=ia("div",T+"-tip-container",N),this._tip=ia("div",T+"-tip",this._tipContainer),this.options.closeButton){var ue=this._closeButton=ia("a",T+"-close-button",N);ue.setAttribute("role","button"),ue.setAttribute("aria-label","Close popup"),ue.href="#close",ue.innerHTML='<span aria-hidden="true">&#215;</span>',wo(ue,"click",function(Pe){Yr(Pe),this.close()},this)}},_updateLayout:function(){var T=this._contentNode,N=T.style;N.width="",N.whiteSpace="nowrap";var Z=T.offsetWidth;Z=Math.min(Z,this.options.maxWidth),Z=Math.max(Z,this.options.minWidth),N.width=Z+1+"px",N.whiteSpace="",N.height="";var ue=T.offsetHeight,Pe=this.options.maxHeight,st="leaflet-popup-scrolled";Pe&&ue>Pe?(N.height=Pe+"px",uo(T,st)):yl(T,st),this._containerWidth=this._container.offsetWidth},_animateZoom:function(T){var N=this._map._latLngToNewLayerPoint(this._latlng,T.zoom,T.center),Z=this._getAnchor();bo(this._container,N.add(Z))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var T=this._map,N=parseInt(Wm(this._container,"marginBottom"),10)||0,Z=this._container.offsetHeight+N,ue=this._containerWidth,Pe=new ze(this._containerLeft,-Z-this._containerBottom);Pe._add(ba(this._container));var st=T.layerPointToContainerPoint(Pe),ti=Ae(this.options.autoPanPadding),Ei=Ae(this.options.autoPanPaddingTopLeft||ti),Ui=Ae(this.options.autoPanPaddingBottomRight||ti),On=T.getSize(),Wr=0,$s=0;st.x+ue+Ui.x>On.x&&(Wr=st.x+ue-On.x+Ui.x),st.x-Wr-Ei.x<0&&(Wr=st.x-Ei.x),st.y+Z+Ui.y>On.y&&($s=st.y+Z-On.y+Ui.y),st.y-$s-Ei.y<0&&($s=st.y-Ei.y),(Wr||$s)&&(this.options.keepInView&&(this._autopanning=!0),T.fire("autopanstart").panBy([Wr,$s]))}},_getAnchor:function(){return Ae(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),xa=function(T,N){return new _r(T,N)};Ca.mergeOptions({closePopupOnClick:!0}),Ca.include({openPopup:function(T,N,Z){return this._initOverlay(_r,T,N,Z).openOn(this),this},closePopup:function(T){return T=arguments.length?T:this._popup,T&&T.close(),this}}),Vr.include({bindPopup:function(T,N){return this._popup=this._initOverlay(_r,this._popup,T,N),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(T){return this._popup&&(this instanceof Er||(this._popup._source=this),this._popup._prepareOpen(T||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(T){return this._popup&&this._popup.setContent(T),this},getPopup:function(){return this._popup},_openPopup:function(T){if(!(!this._popup||!this._map)){ps(T);var N=T.layer||T.target;if(this._popup._source===N&&!(N instanceof Rd)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(T.latlng);return}this._popup._source=N,this.openPopup(T.latlng)}},_movePopup:function(T){this._popup.setLatLng(T.latlng)},_onKeyPress:function(T){T.originalEvent.keyCode===13&&this._openPopup(T)}});var xd=ns.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(T){ns.prototype.onAdd.call(this,T),this.setOpacity(this.options.opacity),T.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(T){ns.prototype.onRemove.call(this,T),T.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var T=ns.prototype.getEvents.call(this);return this.options.permanent||(T.preclick=this.close),T},_initLayout:function(){var T="leaflet-tooltip",N=T+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ia("div",N),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+o(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(T){var N,Z,ue=this._map,Pe=this._container,st=ue.latLngToContainerPoint(ue.getCenter()),ti=ue.layerPointToContainerPoint(T),Ei=this.options.direction,Ui=Pe.offsetWidth,On=Pe.offsetHeight,Wr=Ae(this.options.offset),$s=this._getAnchor();Ei==="top"?(N=Ui/2,Z=On):Ei==="bottom"?(N=Ui/2,Z=0):Ei==="center"?(N=Ui/2,Z=On/2):Ei==="right"?(N=0,Z=On/2):Ei==="left"?(N=Ui,Z=On/2):ti.x<st.x?(Ei="right",N=0,Z=On/2):(Ei="left",N=Ui+(Wr.x+$s.x)*2,Z=On/2),T=T.subtract(Ae(N,Z,!0)).add(Wr).add($s),yl(Pe,"leaflet-tooltip-right"),yl(Pe,"leaflet-tooltip-left"),yl(Pe,"leaflet-tooltip-top"),yl(Pe,"leaflet-tooltip-bottom"),uo(Pe,"leaflet-tooltip-"+Ei),bo(Pe,T)},_updatePosition:function(){var T=this._map.latLngToLayerPoint(this._latlng);this._setPosition(T)},setOpacity:function(T){this.options.opacity=T,this._container&&id(this._container,T)},_animateZoom:function(T){var N=this._map._latLngToNewLayerPoint(this._latlng,T.zoom,T.center);this._setPosition(N)},_getAnchor:function(){return Ae(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Gl=function(T,N){return new xd(T,N)};Ca.include({openTooltip:function(T,N,Z){return this._initOverlay(xd,T,N,Z).openOn(this),this},closeTooltip:function(T){return T.close(),this}}),Vr.include({bindTooltip:function(T,N){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(xd,this._tooltip,T,N),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(T){if(!(!T&&this._tooltipHandlersAdded)){var N=T?"off":"on",Z={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?Z.add=this._openTooltip:(Z.mouseover=this._openTooltip,Z.mouseout=this.closeTooltip,Z.click=this._openTooltip,this._map?this._addFocusListeners():Z.add=this._addFocusListeners),this._tooltip.options.sticky&&(Z.mousemove=this._moveTooltip),this[N](Z),this._tooltipHandlersAdded=!T}},openTooltip:function(T){return this._tooltip&&(this instanceof Er||(this._tooltip._source=this),this._tooltip._prepareOpen(T)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(T){return this._tooltip&&this._tooltip.setContent(T),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(T){var N=typeof T.getElement=="function"&&T.getElement();N&&(wo(N,"focus",function(){this._tooltip._source=T,this.openTooltip()},this),wo(N,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(T){var N=typeof T.getElement=="function"&&T.getElement();N&&N.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(T){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var N=this;this._map.once("moveend",function(){N._openOnceFlag=!1,N._openTooltip(T)});return}this._tooltip._source=T.layer||T.target,this.openTooltip(this._tooltip.options.sticky?T.latlng:void 0)}},_moveTooltip:function(T){var N=T.latlng,Z,ue;this._tooltip.options.sticky&&T.originalEvent&&(Z=this._map.mouseEventToContainerPoint(T.originalEvent),ue=this._map.containerPointToLayerPoint(Z),N=this._map.layerPointToLatLng(ue)),this._tooltip.setLatLng(N)}});var bd=uu.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(T){var N=T&&T.tagName==="DIV"?T:document.createElement("div"),Z=this.options;if(Z.html instanceof Element?(up(N),N.appendChild(Z.html)):N.innerHTML=Z.html!==!1?Z.html:"",Z.bgPos){var ue=Ae(Z.bgPos);N.style.backgroundPosition=-ue.x+"px "+-ue.y+"px"}return this._setIconStyles(N,"icon"),N},createShadow:function(){return null}});function Fd(T){return new bd(T)}uu.Default=Mu;var ss=Vr.extend({options:{tileSize:256,opacity:1,updateWhenIdle:fr.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(T){f(this,T)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(T){T._addZoomLimit(this)},onRemove:function(T){this._removeAllTiles(),Fa(this._container),T._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(vl(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Jl(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(T){return this.options.opacity=T,this._updateOpacity(),this},setZIndex:function(T){return this.options.zIndex=T,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var T=this._clampZoom(this._map.getZoom());T!==this._tileZoom&&(this._tileZoom=T,this._updateLevels()),this._update()}return this},getEvents:function(){var T={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),T.move=this._onMove),this._zoomAnimated&&(T.zoomanim=this._animateZoom),T},createTile:function(){return document.createElement("div")},getTileSize:function(){var T=this.options.tileSize;return T instanceof ze?T:new ze(T,T)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(T){for(var N=this.getPane().children,Z=-T(-1/0,1/0),ue=0,Pe=N.length,st;ue<Pe;ue++)st=N[ue].style.zIndex,N[ue]!==this._container&&st&&(Z=T(Z,+st));isFinite(Z)&&(this.options.zIndex=Z+T(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!fr.ielt9){id(this._container,this.options.opacity);var T=+new Date,N=!1,Z=!1;for(var ue in this._tiles){var Pe=this._tiles[ue];if(!(!Pe.current||!Pe.loaded)){var st=Math.min(1,(T-Pe.loaded)/200);id(Pe.el,st),st<1?N=!0:(Pe.active?Z=!0:this._onOpaqueTile(Pe),Pe.active=!0)}}Z&&!this._noPrune&&this._pruneTiles(),N&&(pe(this._fadeFrame),this._fadeFrame=ne(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=ia("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var T=this._tileZoom,N=this.options.maxZoom;if(T!==void 0){for(var Z in this._levels)Z=Number(Z),this._levels[Z].el.children.length||Z===T?(this._levels[Z].el.style.zIndex=N-Math.abs(T-Z),this._onUpdateLevel(Z)):(Fa(this._levels[Z].el),this._removeTilesAtZoom(Z),this._onRemoveLevel(Z),delete this._levels[Z]);var ue=this._levels[T],Pe=this._map;return ue||(ue=this._levels[T]={},ue.el=ia("div","leaflet-tile-container leaflet-zoom-animated",this._container),ue.el.style.zIndex=N,ue.origin=Pe.project(Pe.unproject(Pe.getPixelOrigin()),T).round(),ue.zoom=T,this._setZoomTransform(ue,Pe.getCenter(),Pe.getZoom()),c(ue.el.offsetWidth),this._onCreateLevel(ue)),this._level=ue,ue}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var T,N,Z=this._map.getZoom();if(Z>this.options.maxZoom||Z<this.options.minZoom){this._removeAllTiles();return}for(T in this._tiles)N=this._tiles[T],N.retain=N.current;for(T in this._tiles)if(N=this._tiles[T],N.current&&!N.active){var ue=N.coords;this._retainParent(ue.x,ue.y,ue.z,ue.z-5)||this._retainChildren(ue.x,ue.y,ue.z,ue.z+2)}for(T in this._tiles)this._tiles[T].retain||this._removeTile(T)}},_removeTilesAtZoom:function(T){for(var N in this._tiles)this._tiles[N].coords.z===T&&this._removeTile(N)},_removeAllTiles:function(){for(var T in this._tiles)this._removeTile(T)},_invalidateAll:function(){for(var T in this._levels)Fa(this._levels[T].el),this._onRemoveLevel(Number(T)),delete this._levels[T];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(T,N,Z,ue){var Pe=Math.floor(T/2),st=Math.floor(N/2),ti=Z-1,Ei=new ze(+Pe,+st);Ei.z=+ti;var Ui=this._tileCoordsToKey(Ei),On=this._tiles[Ui];return On&&On.active?(On.retain=!0,!0):(On&&On.loaded&&(On.retain=!0),ti>ue?this._retainParent(Pe,st,ti,ue):!1)},_retainChildren:function(T,N,Z,ue){for(var Pe=2*T;Pe<2*T+2;Pe++)for(var st=2*N;st<2*N+2;st++){var ti=new ze(Pe,st);ti.z=Z+1;var Ei=this._tileCoordsToKey(ti),Ui=this._tiles[Ei];if(Ui&&Ui.active){Ui.retain=!0;continue}else Ui&&Ui.loaded&&(Ui.retain=!0);Z+1<ue&&this._retainChildren(Pe,st,Z+1,ue)}},_resetView:function(T){var N=T&&(T.pinch||T.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),N,N)},_animateZoom:function(T){this._setView(T.center,T.zoom,!0,T.noUpdate)},_clampZoom:function(T){var N=this.options;return N.minNativeZoom!==void 0&&T<N.minNativeZoom?N.minNativeZoom:N.maxNativeZoom!==void 0&&N.maxNativeZoom<T?N.maxNativeZoom:T},_setView:function(T,N,Z,ue){var Pe=Math.round(N);this.options.maxZoom!==void 0&&Pe>this.options.maxZoom||this.options.minZoom!==void 0&&Pe<this.options.minZoom?Pe=void 0:Pe=this._clampZoom(Pe);var st=this.options.updateWhenZooming&&Pe!==this._tileZoom;(!ue||st)&&(this._tileZoom=Pe,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),Pe!==void 0&&this._update(T),Z||this._pruneTiles(),this._noPrune=!!Z),this._setZoomTransforms(T,N)},_setZoomTransforms:function(T,N){for(var Z in this._levels)this._setZoomTransform(this._levels[Z],T,N)},_setZoomTransform:function(T,N,Z){var ue=this._map.getZoomScale(Z,T.zoom),Pe=T.origin.multiplyBy(ue).subtract(this._map._getNewPixelOrigin(N,Z)).round();fr.any3d?yd(T.el,Pe,ue):bo(T.el,Pe)},_resetGrid:function(){var T=this._map,N=T.options.crs,Z=this._tileSize=this.getTileSize(),ue=this._tileZoom,Pe=this._map.getPixelWorldBounds(this._tileZoom);Pe&&(this._globalTileRange=this._pxBoundsToTileRange(Pe)),this._wrapX=N.wrapLng&&!this.options.noWrap&&[Math.floor(T.project([0,N.wrapLng[0]],ue).x/Z.x),Math.ceil(T.project([0,N.wrapLng[1]],ue).x/Z.y)],this._wrapY=N.wrapLat&&!this.options.noWrap&&[Math.floor(T.project([N.wrapLat[0],0],ue).y/Z.x),Math.ceil(T.project([N.wrapLat[1],0],ue).y/Z.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(T){var N=this._map,Z=N._animatingZoom?Math.max(N._animateToZoom,N.getZoom()):N.getZoom(),ue=N.getZoomScale(Z,this._tileZoom),Pe=N.project(T,this._tileZoom).floor(),st=N.getSize().divideBy(ue*2);return new Ye(Pe.subtract(st),Pe.add(st))},_update:function(T){var N=this._map;if(N){var Z=this._clampZoom(N.getZoom());if(T===void 0&&(T=N.getCenter()),this._tileZoom!==void 0){var ue=this._getTiledPixelBounds(T),Pe=this._pxBoundsToTileRange(ue),st=Pe.getCenter(),ti=[],Ei=this.options.keepBuffer,Ui=new Ye(Pe.getBottomLeft().subtract([Ei,-Ei]),Pe.getTopRight().add([Ei,-Ei]));if(!(isFinite(Pe.min.x)&&isFinite(Pe.min.y)&&isFinite(Pe.max.x)&&isFinite(Pe.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var On in this._tiles){var Wr=this._tiles[On].coords;(Wr.z!==this._tileZoom||!Ui.contains(new ze(Wr.x,Wr.y)))&&(this._tiles[On].current=!1)}if(Math.abs(Z-this._tileZoom)>1){this._setView(T,Z);return}for(var $s=Pe.min.y;$s<=Pe.max.y;$s++)for(var qo=Pe.min.x;qo<=Pe.max.x;qo++){var q=new ze(qo,$s);if(q.z=this._tileZoom,!!this._isValidTile(q)){var oe=this._tiles[this._tileCoordsToKey(q)];oe?oe.current=!0:ti.push(q)}}if(ti.sort(function(de,De){return de.distanceTo(st)-De.distanceTo(st)}),ti.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var he=document.createDocumentFragment();for(qo=0;qo<ti.length;qo++)this._addTile(ti[qo],he);this._level.el.appendChild(he)}}}},_isValidTile:function(T){var N=this._map.options.crs;if(!N.infinite){var Z=this._globalTileRange;if(!N.wrapLng&&(T.x<Z.min.x||T.x>Z.max.x)||!N.wrapLat&&(T.y<Z.min.y||T.y>Z.max.y))return!1}if(!this.options.bounds)return!0;var ue=this._tileCoordsToBounds(T);return Tt(this.options.bounds).overlaps(ue)},_keyToBounds:function(T){return this._tileCoordsToBounds(this._keyToTileCoords(T))},_tileCoordsToNwSe:function(T){var N=this._map,Z=this.getTileSize(),ue=T.scaleBy(Z),Pe=ue.add(Z),st=N.unproject(ue,T.z),ti=N.unproject(Pe,T.z);return[st,ti]},_tileCoordsToBounds:function(T){var N=this._tileCoordsToNwSe(T),Z=new Ft(N[0],N[1]);return this.options.noWrap||(Z=this._map.wrapLatLngBounds(Z)),Z},_tileCoordsToKey:function(T){return T.x+":"+T.y+":"+T.z},_keyToTileCoords:function(T){var N=T.split(":"),Z=new ze(+N[0],+N[1]);return Z.z=+N[2],Z},_removeTile:function(T){var N=this._tiles[T];N&&(Fa(N.el),delete this._tiles[T],this.fire("tileunload",{tile:N.el,coords:this._keyToTileCoords(T)}))},_initTile:function(T){uo(T,"leaflet-tile");var N=this.getTileSize();T.style.width=N.x+"px",T.style.height=N.y+"px",T.onselectstart=c,T.onmousemove=c,fr.ielt9&&this.options.opacity<1&&id(T,this.options.opacity)},_addTile:function(T,N){var Z=this._getTilePos(T),ue=this._tileCoordsToKey(T),Pe=this.createTile(this._wrapCoords(T),r(this._tileReady,this,T));this._initTile(Pe),this.createTile.length<2&&ne(r(this._tileReady,this,T,null,Pe)),bo(Pe,Z),this._tiles[ue]={el:Pe,coords:T,current:!0},N.appendChild(Pe),this.fire("tileloadstart",{tile:Pe,coords:T})},_tileReady:function(T,N,Z){N&&this.fire("tileerror",{error:N,tile:Z,coords:T});var ue=this._tileCoordsToKey(T);Z=this._tiles[ue],Z&&(Z.loaded=+new Date,this._map._fadeAnimated?(id(Z.el,0),pe(this._fadeFrame),this._fadeFrame=ne(this._updateOpacity,this)):(Z.active=!0,this._pruneTiles()),N||(uo(Z.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:Z.el,coords:T})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),fr.ielt9||!this._map._fadeAnimated?ne(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(T){return T.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(T){var N=new ze(this._wrapX?l(T.x,this._wrapX):T.x,this._wrapY?l(T.y,this._wrapY):T.y);return N.z=T.z,N},_pxBoundsToTileRange:function(T){var N=this.getTileSize();return new Ye(T.min.unscaleBy(N).floor(),T.max.unscaleBy(N).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var T in this._tiles)if(!this._tiles[T].loaded)return!1;return!0}});function hu(T){return new ss(T)}var Vf=ss.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(T,N){this._url=T,N=f(this,N),N.detectRetina&&fr.retina&&N.maxZoom>0?(N.tileSize=Math.floor(N.tileSize/2),N.zoomReverse?(N.zoomOffset--,N.minZoom=Math.min(N.maxZoom,N.minZoom+1)):(N.zoomOffset++,N.maxZoom=Math.max(N.minZoom,N.maxZoom-1)),N.minZoom=Math.max(0,N.minZoom)):N.zoomReverse?N.minZoom=Math.min(N.maxZoom,N.minZoom):N.maxZoom=Math.max(N.minZoom,N.maxZoom),typeof N.subdomains=="string"&&(N.subdomains=N.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(T,N){return this._url===T&&N===void 0&&(N=!0),this._url=T,N||this.redraw(),this},createTile:function(T,N){var Z=document.createElement("img");return wo(Z,"load",r(this._tileOnLoad,this,N,Z)),wo(Z,"error",r(this._tileOnError,this,N,Z)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(Z.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(Z.referrerPolicy=this.options.referrerPolicy),Z.alt="",Z.src=this.getTileUrl(T),Z},getTileUrl:function(T){var N={r:fr.retina?"@2x":"",s:this._getSubdomain(T),x:T.x,y:T.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var Z=this._globalTileRange.max.y-T.y;this.options.tms&&(N.y=Z),N["-y"]=Z}return D(this._url,n(N,this.options))},_tileOnLoad:function(T,N){fr.ielt9?setTimeout(r(T,this,null,N),0):T(null,N)},_tileOnError:function(T,N,Z){var ue=this.options.errorTileUrl;ue&&N.getAttribute("src")!==ue&&(N.src=ue),T(Z,N)},_onTileRemove:function(T){T.tile.onload=null},_getZoomForUrl:function(){var T=this._tileZoom,N=this.options.maxZoom,Z=this.options.zoomReverse,ue=this.options.zoomOffset;return Z&&(T=N-T),T+ue},_getSubdomain:function(T){var N=Math.abs(T.x+T.y)%this.options.subdomains.length;return this.options.subdomains[N]},_abortLoading:function(){var T,N;for(T in this._tiles)if(this._tiles[T].coords.z!==this._tileZoom&&(N=this._tiles[T].el,N.onload=c,N.onerror=c,!N.complete)){N.src=I;var Z=this._tiles[T].coords;Fa(N),delete this._tiles[T],this.fire("tileabort",{tile:N,coords:Z})}},_removeTile:function(T){var N=this._tiles[T];if(N)return N.el.setAttribute("src",I),ss.prototype._removeTile.call(this,T)},_tileReady:function(T,N,Z){if(!(!this._map||Z&&Z.getAttribute("src")===I))return ss.prototype._tileReady.call(this,T,N,Z)}});function Bf(T,N){return new Vf(T,N)}var K3=Vf.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(T,N){this._url=T;var Z=n({},this.defaultWmsParams);for(var ue in N)ue in this.options||(Z[ue]=N[ue]);N=f(this,N);var Pe=N.detectRetina&&fr.retina?2:1,st=this.getTileSize();Z.width=st.x*Pe,Z.height=st.y*Pe,this.wmsParams=Z},onAdd:function(T){this._crs=this.options.crs||T.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var N=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[N]=this._crs.code,Vf.prototype.onAdd.call(this,T)},getTileUrl:function(T){var N=this._tileCoordsToNwSe(T),Z=this._crs,ue=ft(Z.project(N[0]),Z.project(N[1])),Pe=ue.min,st=ue.max,ti=(this._wmsVersion>=1.3&&this._crs===Bi?[Pe.y,Pe.x,st.y,st.x]:[Pe.x,Pe.y,st.x,st.y]).join(","),Ei=Vf.prototype.getTileUrl.call(this,T);return Ei+_(this.wmsParams,Ei,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+ti},setParams:function(T,N){return n(this.wmsParams,T),N||this.redraw(),this}});function Y3(T,N){return new K3(T,N)}Vf.WMS=K3,Bf.wms=Y3;var Km=Vr.extend({options:{padding:.1},initialize:function(T){f(this,T),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),uo(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var T={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(T.zoomanim=this._onAnimZoom),T},_onAnimZoom:function(T){this._updateTransform(T.center,T.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(T,N){var Z=this._map.getZoomScale(N,this._zoom),ue=this._map.getSize().multiplyBy(.5+this.options.padding),Pe=this._map.project(this._center,N),st=ue.multiplyBy(-Z).add(Pe).subtract(this._map._getNewPixelOrigin(T,N));fr.any3d?yd(this._container,st,Z):bo(this._container,st)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var T in this._layers)this._layers[T]._reset()},_onZoomEnd:function(){for(var T in this._layers)this._layers[T]._project()},_updatePaths:function(){for(var T in this._layers)this._layers[T]._update()},_update:function(){var T=this.options.padding,N=this._map.getSize(),Z=this._map.containerPointToLayerPoint(N.multiplyBy(-T)).round();this._bounds=new Ye(Z,Z.add(N.multiplyBy(1+T*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ym=Km.extend({options:{tolerance:0},getEvents:function(){var T=Km.prototype.getEvents.call(this);return T.viewprereset=this._onViewPreReset,T},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Km.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var T=this._container=document.createElement("canvas");wo(T,"mousemove",this._onMouseMove,this),wo(T,"click dblclick mousedown mouseup contextmenu",this._onClick,this),wo(T,"mouseout",this._handleMouseOut,this),T._leaflet_disable_events=!0,this._ctx=T.getContext("2d")},_destroyContainer:function(){pe(this._redrawRequest),delete this._ctx,Fa(this._container),rl(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var T;this._redrawBounds=null;for(var N in this._layers)T=this._layers[N],T._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Km.prototype._update.call(this);var T=this._bounds,N=this._container,Z=T.getSize(),ue=fr.retina?2:1;bo(N,T.min),N.width=ue*Z.x,N.height=ue*Z.y,N.style.width=Z.x+"px",N.style.height=Z.y+"px",fr.retina&&this._ctx.scale(2,2),this._ctx.translate(-T.min.x,-T.min.y),this.fire("update")}},_reset:function(){Km.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(T){this._updateDashArray(T),this._layers[o(T)]=T;var N=T._order={layer:T,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=N),this._drawLast=N,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(T){this._requestRedraw(T)},_removePath:function(T){var N=T._order,Z=N.next,ue=N.prev;Z?Z.prev=ue:this._drawLast=ue,ue?ue.next=Z:this._drawFirst=Z,delete T._order,delete this._layers[o(T)],this._requestRedraw(T)},_updatePath:function(T){this._extendRedrawBounds(T),T._project(),T._update(),this._requestRedraw(T)},_updateStyle:function(T){this._updateDashArray(T),this._requestRedraw(T)},_updateDashArray:function(T){if(typeof T.options.dashArray=="string"){var N=T.options.dashArray.split(/[, ]+/),Z=[],ue,Pe;for(Pe=0;Pe<N.length;Pe++){if(ue=Number(N[Pe]),isNaN(ue))return;Z.push(ue)}T.options._dashArray=Z}else T.options._dashArray=T.options.dashArray},_requestRedraw:function(T){this._map&&(this._extendRedrawBounds(T),this._redrawRequest=this._redrawRequest||ne(this._redraw,this))},_extendRedrawBounds:function(T){if(T._pxBounds){var N=(T.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Ye,this._redrawBounds.extend(T._pxBounds.min.subtract([N,N])),this._redrawBounds.extend(T._pxBounds.max.add([N,N]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var T=this._redrawBounds;if(T){var N=T.getSize();this._ctx.clearRect(T.min.x,T.min.y,N.x,N.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var T,N=this._redrawBounds;if(this._ctx.save(),N){var Z=N.getSize();this._ctx.beginPath(),this._ctx.rect(N.min.x,N.min.y,Z.x,Z.y),this._ctx.clip()}this._drawing=!0;for(var ue=this._drawFirst;ue;ue=ue.next)T=ue.layer,(!N||T._pxBounds&&T._pxBounds.intersects(N))&&T._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(T,N){if(this._drawing){var Z,ue,Pe,st,ti=T._parts,Ei=ti.length,Ui=this._ctx;if(Ei){for(Ui.beginPath(),Z=0;Z<Ei;Z++){for(ue=0,Pe=ti[Z].length;ue<Pe;ue++)st=ti[Z][ue],Ui[ue?"lineTo":"moveTo"](st.x,st.y);N&&Ui.closePath()}this._fillStroke(Ui,T)}}},_updateCircle:function(T){if(!(!this._drawing||T._empty())){var N=T._point,Z=this._ctx,ue=Math.max(Math.round(T._radius),1),Pe=(Math.max(Math.round(T._radiusY),1)||ue)/ue;Pe!==1&&(Z.save(),Z.scale(1,Pe)),Z.beginPath(),Z.arc(N.x,N.y/Pe,ue,0,Math.PI*2,!1),Pe!==1&&Z.restore(),this._fillStroke(Z,T)}},_fillStroke:function(T,N){var Z=N.options;Z.fill&&(T.globalAlpha=Z.fillOpacity,T.fillStyle=Z.fillColor||Z.color,T.fill(Z.fillRule||"evenodd")),Z.stroke&&Z.weight!==0&&(T.setLineDash&&T.setLineDash(N.options&&N.options._dashArray||[]),T.globalAlpha=Z.opacity,T.lineWidth=Z.weight,T.strokeStyle=Z.color,T.lineCap=Z.lineCap,T.lineJoin=Z.lineJoin,T.stroke())},_onClick:function(T){for(var N=this._map.mouseEventToLayerPoint(T),Z,ue,Pe=this._drawFirst;Pe;Pe=Pe.next)Z=Pe.layer,Z.options.interactive&&Z._containsPoint(N)&&(!(T.type==="click"||T.type==="preclick")||!this._map._draggableMoved(Z))&&(ue=Z);this._fireEvent(ue?[ue]:!1,T)},_onMouseMove:function(T){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var N=this._map.mouseEventToLayerPoint(T);this._handleMouseHover(T,N)}},_handleMouseOut:function(T){var N=this._hoveredLayer;N&&(yl(this._container,"leaflet-interactive"),this._fireEvent([N],T,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(T,N){if(!this._mouseHoverThrottled){for(var Z,ue,Pe=this._drawFirst;Pe;Pe=Pe.next)Z=Pe.layer,Z.options.interactive&&Z._containsPoint(N)&&(ue=Z);ue!==this._hoveredLayer&&(this._handleMouseOut(T),ue&&(uo(this._container,"leaflet-interactive"),this._fireEvent([ue],T,"mouseover"),this._hoveredLayer=ue)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,T),this._mouseHoverThrottled=!0,setTimeout(r(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(T,N,Z){this._map._fireDOMEvent(N,Z||N.type,T)},_bringToFront:function(T){var N=T._order;if(N){var Z=N.next,ue=N.prev;if(Z)Z.prev=ue;else return;ue?ue.next=Z:Z&&(this._drawFirst=Z),N.prev=this._drawLast,this._drawLast.next=N,N.next=null,this._drawLast=N,this._requestRedraw(T)}},_bringToBack:function(T){var N=T._order;if(N){var Z=N.next,ue=N.prev;if(ue)ue.next=Z;else return;Z?Z.prev=ue:ue&&(this._drawLast=ue),N.prev=null,N.next=this._drawFirst,this._drawFirst.prev=N,this._drawFirst=N,this._requestRedraw(T)}}});function Yu(T){return fr.canvas?new Ym(T):null}var mp=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(T){return document.createElement("<lvml:"+T+' class="lvml">')}}catch{}return function(T){return document.createElement("<"+T+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),L2={_initContainer:function(){this._container=ia("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Km.prototype._update.call(this),this.fire("update"))},_initPath:function(T){var N=T._container=mp("shape");uo(N,"leaflet-vml-shape "+(this.options.className||"")),N.coordsize="1 1",T._path=mp("path"),N.appendChild(T._path),this._updateStyle(T),this._layers[o(T)]=T},_addPath:function(T){var N=T._container;this._container.appendChild(N),T.options.interactive&&T.addInteractiveTarget(N)},_removePath:function(T){var N=T._container;Fa(N),T.removeInteractiveTarget(N),delete this._layers[o(T)]},_updateStyle:function(T){var N=T._stroke,Z=T._fill,ue=T.options,Pe=T._container;Pe.stroked=!!ue.stroke,Pe.filled=!!ue.fill,ue.stroke?(N||(N=T._stroke=mp("stroke")),Pe.appendChild(N),N.weight=ue.weight+"px",N.color=ue.color,N.opacity=ue.opacity,ue.dashArray?N.dashStyle=E(ue.dashArray)?ue.dashArray.join(" "):ue.dashArray.replace(/( *, *)/g," "):N.dashStyle="",N.endcap=ue.lineCap.replace("butt","flat"),N.joinstyle=ue.lineJoin):N&&(Pe.removeChild(N),T._stroke=null),ue.fill?(Z||(Z=T._fill=mp("fill")),Pe.appendChild(Z),Z.color=ue.fillColor||ue.color,Z.opacity=ue.fillOpacity):Z&&(Pe.removeChild(Z),T._fill=null)},_updateCircle:function(T){var N=T._point.round(),Z=Math.round(T._radius),ue=Math.round(T._radiusY||Z);this._setPath(T,T._empty()?"M0 0":"AL "+N.x+","+N.y+" "+Z+","+ue+" 0,"+65535*360)},_setPath:function(T,N){T._path.v=N},_bringToFront:function(T){vl(T._container)},_bringToBack:function(T){Jl(T._container)}},um=fr.vml?mp:ln,qm=Km.extend({_initContainer:function(){this._container=um("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=um("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Fa(this._container),rl(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Km.prototype._update.call(this);var T=this._bounds,N=T.getSize(),Z=this._container;(!this._svgSize||!this._svgSize.equals(N))&&(this._svgSize=N,Z.setAttribute("width",N.x),Z.setAttribute("height",N.y)),bo(Z,T.min),Z.setAttribute("viewBox",[T.min.x,T.min.y,N.x,N.y].join(" ")),this.fire("update")}},_initPath:function(T){var N=T._path=um("path");T.options.className&&uo(N,T.options.className),T.options.interactive&&uo(N,"leaflet-interactive"),this._updateStyle(T),this._layers[o(T)]=T},_addPath:function(T){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(T._path),T.addInteractiveTarget(T._path)},_removePath:function(T){Fa(T._path),T.removeInteractiveTarget(T._path),delete this._layers[o(T)]},_updatePath:function(T){T._project(),T._update()},_updateStyle:function(T){var N=T._path,Z=T.options;N&&(Z.stroke?(N.setAttribute("stroke",Z.color),N.setAttribute("stroke-opacity",Z.opacity),N.setAttribute("stroke-width",Z.weight),N.setAttribute("stroke-linecap",Z.lineCap),N.setAttribute("stroke-linejoin",Z.lineJoin),Z.dashArray?N.setAttribute("stroke-dasharray",Z.dashArray):N.removeAttribute("stroke-dasharray"),Z.dashOffset?N.setAttribute("stroke-dashoffset",Z.dashOffset):N.removeAttribute("stroke-dashoffset")):N.setAttribute("stroke","none"),Z.fill?(N.setAttribute("fill",Z.fillColor||Z.color),N.setAttribute("fill-opacity",Z.fillOpacity),N.setAttribute("fill-rule",Z.fillRule||"evenodd")):N.setAttribute("fill","none"))},_updatePoly:function(T,N){this._setPath(T,Rn(T._parts,N))},_updateCircle:function(T){var N=T._point,Z=Math.max(Math.round(T._radius),1),ue=Math.max(Math.round(T._radiusY),1)||Z,Pe="a"+Z+","+ue+" 0 1,0 ",st=T._empty()?"M0 0":"M"+(N.x-Z)+","+N.y+Pe+Z*2+",0 "+Pe+-Z*2+",0 ";this._setPath(T,st)},_setPath:function(T,N){T._path.setAttribute("d",N)},_bringToFront:function(T){vl(T._path)},_bringToBack:function(T){Jl(T._path)}});fr.vml&&qm.include(L2);function u0(T){return fr.svg||fr.vml?new qm(T):null}Ca.include({getRenderer:function(T){var N=T.options.renderer||this._getPaneRenderer(T.options.pane)||this.options.renderer||this._renderer;return N||(N=this._renderer=this._createRenderer()),this.hasLayer(N)||this.addLayer(N),N},_getPaneRenderer:function(T){if(T==="overlayPane"||T===void 0)return!1;var N=this._paneRenderers[T];return N===void 0&&(N=this._createRenderer({pane:T}),this._paneRenderers[T]=N),N},_createRenderer:function(T){return this.options.preferCanvas&&Yu(T)||u0(T)}});var Kh=Up.extend({initialize:function(T,N){Up.prototype.initialize.call(this,this._boundsToLatLngs(T),N)},setBounds:function(T){return this.setLatLngs(this._boundsToLatLngs(T))},_boundsToLatLngs:function(T){return T=Tt(T),[T.getSouthWest(),T.getNorthWest(),T.getNorthEast(),T.getSouthEast()]}});function q3(T,N){return new Kh(T,N)}qm.create=um,qm.pointsToPath=Rn,Hl.geometryToLayer=ol,Hl.coordsToLatLng=F2,Hl.coordsToLatLngs=I1,Hl.latLngToCoords=q0,Hl.latLngsToCoords=Mt,Hl.getFeature=li,Hl.asFeature=wi,Ca.mergeOptions({boxZoom:!0});var Zm=Ne.extend({initialize:function(T){this._map=T,this._container=T._container,this._pane=T._panes.overlayPane,this._resetStateTimeout=0,T.on("unload",this._destroy,this)},addHooks:function(){wo(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){rl(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Fa(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(T){if(!T.shiftKey||T.which!==1&&T.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Bl(),Pd(),this._startPoint=this._map.mouseEventToContainerPoint(T),wo(document,{contextmenu:ps,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(T){this._moved||(this._moved=!0,this._box=ia("div","leaflet-zoom-box",this._container),uo(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(T);var N=new Ye(this._point,this._startPoint),Z=N.getSize();bo(this._box,N.min),this._box.style.width=Z.x+"px",this._box.style.height=Z.y+"px"},_finish:function(){this._moved&&(Fa(this._box),yl(this._container,"leaflet-crosshair")),Yo(),ju(),rl(document,{contextmenu:ps,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(T){if(!(T.which!==1&&T.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var N=new Ft(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(N).fire("boxzoomend",{boxZoomBounds:N})}},_onKeyDown:function(T){T.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ca.addInitHook("addHandler","boxZoom",Zm),Ca.mergeOptions({doubleClickZoom:!0});var Yh=Ne.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(T){var N=this._map,Z=N.getZoom(),ue=N.options.zoomDelta,Pe=T.originalEvent.shiftKey?Z-ue:Z+ue;N.options.doubleClickZoom==="center"?N.setZoom(Pe):N.setZoomAround(T.containerPoint,Pe)}});Ca.addInitHook("addHandler","doubleClickZoom",Yh),Ca.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var A1=Ne.extend({addHooks:function(){if(!this._draggable){var T=this._map;this._draggable=new Ht(T._mapPane,T._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),T.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),T.on("zoomend",this._onZoomEnd,this),T.whenReady(this._onZoomEnd,this))}uo(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){yl(this._map._container,"leaflet-grab"),yl(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var T=this._map;if(T._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var N=Tt(this._map.options.maxBounds);this._offsetLimit=ft(this._map.latLngToContainerPoint(N.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(N.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;T.fire("movestart").fire("dragstart"),T.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(T){if(this._map.options.inertia){var N=this._lastTime=+new Date,Z=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(Z),this._times.push(N),this._prunePositions(N)}this._map.fire("move",T).fire("drag",T)},_prunePositions:function(T){for(;this._positions.length>1&&T-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var T=this._map.getSize().divideBy(2),N=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=N.subtract(T).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(T,N){return T-(T-N)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var T=this._draggable._newPos.subtract(this._draggable._startPos),N=this._offsetLimit;T.x<N.min.x&&(T.x=this._viscousLimit(T.x,N.min.x)),T.y<N.min.y&&(T.y=this._viscousLimit(T.y,N.min.y)),T.x>N.max.x&&(T.x=this._viscousLimit(T.x,N.max.x)),T.y>N.max.y&&(T.y=this._viscousLimit(T.y,N.max.y)),this._draggable._newPos=this._draggable._startPos.add(T)}},_onPreDragWrap:function(){var T=this._worldWidth,N=Math.round(T/2),Z=this._initialWorldOffset,ue=this._draggable._newPos.x,Pe=(ue-N+Z)%T+N-Z,st=(ue+N+Z)%T-N-Z,ti=Math.abs(Pe+Z)<Math.abs(st+Z)?Pe:st;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=ti},_onDragEnd:function(T){var N=this._map,Z=N.options,ue=!Z.inertia||T.noInertia||this._times.length<2;if(N.fire("dragend",T),ue)N.fire("moveend");else{this._prunePositions(+new Date);var Pe=this._lastPos.subtract(this._positions[0]),st=(this._lastTime-this._times[0])/1e3,ti=Z.easeLinearity,Ei=Pe.multiplyBy(ti/st),Ui=Ei.distanceTo([0,0]),On=Math.min(Z.inertiaMaxSpeed,Ui),Wr=Ei.multiplyBy(On/Ui),$s=On/(Z.inertiaDeceleration*ti),qo=Wr.multiplyBy(-$s/2).round();!qo.x&&!qo.y?N.fire("moveend"):(qo=N._limitOffset(qo,N.options.maxBounds),ne(function(){N.panBy(qo,{duration:$s,easeLinearity:ti,noMoveStart:!0,animate:!0})}))}}});Ca.addInitHook("addHandler","dragging",A1),Ca.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Yg=Ne.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(T){this._map=T,this._setPanDelta(T.options.keyboardPanDelta),this._setZoomDelta(T.options.zoomDelta)},addHooks:function(){var T=this._map._container;T.tabIndex<=0&&(T.tabIndex="0"),wo(T,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),rl(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var T=document.body,N=document.documentElement,Z=T.scrollTop||N.scrollTop,ue=T.scrollLeft||N.scrollLeft;this._map._container.focus(),window.scrollTo(ue,Z)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(T){var N=this._panKeys={},Z=this.keyCodes,ue,Pe;for(ue=0,Pe=Z.left.length;ue<Pe;ue++)N[Z.left[ue]]=[-1*T,0];for(ue=0,Pe=Z.right.length;ue<Pe;ue++)N[Z.right[ue]]=[T,0];for(ue=0,Pe=Z.down.length;ue<Pe;ue++)N[Z.down[ue]]=[0,T];for(ue=0,Pe=Z.up.length;ue<Pe;ue++)N[Z.up[ue]]=[0,-1*T]},_setZoomDelta:function(T){var N=this._zoomKeys={},Z=this.keyCodes,ue,Pe;for(ue=0,Pe=Z.zoomIn.length;ue<Pe;ue++)N[Z.zoomIn[ue]]=T;for(ue=0,Pe=Z.zoomOut.length;ue<Pe;ue++)N[Z.zoomOut[ue]]=-T},_addHooks:function(){wo(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){rl(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(T){if(!(T.altKey||T.ctrlKey||T.metaKey)){var N=T.keyCode,Z=this._map,ue;if(N in this._panKeys){if(!Z._panAnim||!Z._panAnim._inProgress)if(ue=this._panKeys[N],T.shiftKey&&(ue=Ae(ue).multiplyBy(3)),Z.options.maxBounds&&(ue=Z._limitOffset(Ae(ue),Z.options.maxBounds)),Z.options.worldCopyJump){var Pe=Z.wrapLatLng(Z.unproject(Z.project(Z.getCenter()).add(ue)));Z.panTo(Pe)}else Z.panBy(ue)}else if(N in this._zoomKeys)Z.setZoom(Z.getZoom()+(T.shiftKey?3:1)*this._zoomKeys[N]);else if(N===27&&Z._popup&&Z._popup.options.closeOnEscapeKey)Z.closePopup();else return;ps(T)}}});Ca.addInitHook("addHandler","keyboard",Yg),Ca.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var hv=Ne.extend({addHooks:function(){wo(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){rl(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(T){var N=E1(T),Z=this._map.options.wheelDebounceTime;this._delta+=N,this._lastMousePos=this._map.mouseEventToContainerPoint(T),this._startTime||(this._startTime=+new Date);var ue=Math.max(Z-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),ue),ps(T)},_performZoom:function(){var T=this._map,N=T.getZoom(),Z=this._map.options.zoomSnap||0;T._stop();var ue=this._delta/(this._map.options.wheelPxPerZoomLevel*4),Pe=4*Math.log(2/(1+Math.exp(-Math.abs(ue))))/Math.LN2,st=Z?Math.ceil(Pe/Z)*Z:Pe,ti=T._limitZoom(N+(this._delta>0?st:-st))-N;this._delta=0,this._startTime=null,ti&&(T.options.scrollWheelZoom==="center"?T.setZoom(N+ti):T.setZoomAround(this._lastMousePos,N+ti))}});Ca.addInitHook("addHandler","scrollWheelZoom",hv);var J6=600;Ca.mergeOptions({tapHold:fr.touchNative&&fr.safari&&fr.mobile,tapTolerance:15});var zf=Ne.extend({addHooks:function(){wo(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){rl(this._map._container,"touchstart",this._onDown,this)},_onDown:function(T){if(clearTimeout(this._holdTimeout),T.touches.length===1){var N=T.touches[0];this._startPos=this._newPos=new ze(N.clientX,N.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(wo(document,"touchend",Yr),wo(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",N))},this),J6),wo(document,"touchend touchcancel contextmenu",this._cancel,this),wo(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function T(){rl(document,"touchend",Yr),rl(document,"touchend touchcancel",T)},_cancel:function(){clearTimeout(this._holdTimeout),rl(document,"touchend touchcancel contextmenu",this._cancel,this),rl(document,"touchmove",this._onMove,this)},_onMove:function(T){var N=T.touches[0];this._newPos=new ze(N.clientX,N.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(T,N){var Z=new MouseEvent(T,{bubbles:!0,cancelable:!0,view:window,screenX:N.screenX,screenY:N.screenY,clientX:N.clientX,clientY:N.clientY});Z._simulated=!0,N.target.dispatchEvent(Z)}});Ca.addInitHook("addHandler","tapHold",zf),Ca.mergeOptions({touchZoom:fr.touch,bounceAtZoomLimits:!0});var ph=Ne.extend({addHooks:function(){uo(this._map._container,"leaflet-touch-zoom"),wo(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){yl(this._map._container,"leaflet-touch-zoom"),rl(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(T){var N=this._map;if(!(!T.touches||T.touches.length!==2||N._animatingZoom||this._zooming)){var Z=N.mouseEventToContainerPoint(T.touches[0]),ue=N.mouseEventToContainerPoint(T.touches[1]);this._centerPoint=N.getSize()._divideBy(2),this._startLatLng=N.containerPointToLatLng(this._centerPoint),N.options.touchZoom!=="center"&&(this._pinchStartLatLng=N.containerPointToLatLng(Z.add(ue)._divideBy(2))),this._startDist=Z.distanceTo(ue),this._startZoom=N.getZoom(),this._moved=!1,this._zooming=!0,N._stop(),wo(document,"touchmove",this._onTouchMove,this),wo(document,"touchend touchcancel",this._onTouchEnd,this),Yr(T)}},_onTouchMove:function(T){if(!(!T.touches||T.touches.length!==2||!this._zooming)){var N=this._map,Z=N.mouseEventToContainerPoint(T.touches[0]),ue=N.mouseEventToContainerPoint(T.touches[1]),Pe=Z.distanceTo(ue)/this._startDist;if(this._zoom=N.getScaleZoom(Pe,this._startZoom),!N.options.bounceAtZoomLimits&&(this._zoom<N.getMinZoom()&&Pe<1||this._zoom>N.getMaxZoom()&&Pe>1)&&(this._zoom=N._limitZoom(this._zoom)),N.options.touchZoom==="center"){if(this._center=this._startLatLng,Pe===1)return}else{var st=Z._add(ue)._divideBy(2)._subtract(this._centerPoint);if(Pe===1&&st.x===0&&st.y===0)return;this._center=N.unproject(N.project(this._pinchStartLatLng,this._zoom).subtract(st),this._zoom)}this._moved||(N._moveStart(!0,!1),this._moved=!0),pe(this._animRequest);var ti=r(N._move,N,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=ne(ti,this,!0),Yr(T)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,pe(this._animRequest),rl(document,"touchmove",this._onTouchMove,this),rl(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Ca.addInitHook("addHandler","touchZoom",ph),Ca.BoxZoom=Zm,Ca.DoubleClickZoom=Yh,Ca.Drag=A1,Ca.Keyboard=Yg,Ca.ScrollWheelZoom=hv,Ca.TapHold=zf,Ca.TouchZoom=ph,t.Bounds=Ye,t.Browser=fr,t.CRS=_t,t.Canvas=Ym,t.Circle=$h,t.CircleMarker=Nf,t.Class=ie,t.Control=oc,t.DivIcon=bd,t.DivOverlay=ns,t.DomEvent=Dl,t.DomUtil=Eu,t.Draggable=Ht,t.Evented=je,t.FeatureGroup=Er,t.GeoJSON=Hl,t.GridLayer=ss,t.Handler=Ne,t.Icon=uu,t.ImageOverlay=ci,t.LatLng=at,t.LatLngBounds=Ft,t.Layer=Vr,t.LayerGroup=El,t.LineUtil=K,t.Map=Ca,t.Marker=K0,t.Mixin=ct,t.Path=Rd,t.Point=ze,t.PolyUtil=Ii,t.Polygon=Up,t.Polyline=kc,t.Popup=_r,t.PosAnimation=M1,t.Projection=mt,t.Rectangle=Kh,t.Renderer=Km,t.SVG=qm,t.SVGOverlay=hn,t.TileLayer=Vf,t.Tooltip=xd,t.Transformation=zt,t.Util=ce,t.VideoOverlay=Qi,t.bind=r,t.bounds=ft,t.canvas=Yu,t.circle=_l,t.circleMarker=jh,t.control=fc,t.divIcon=Fd,t.extend=n,t.featureGroup=yo,t.geoJSON=dt,t.geoJson=ht,t.gridLayer=hu,t.icon=zl,t.imageOverlay=Ni,t.latLng=yt,t.latLngBounds=Tt,t.layerGroup=Lo,t.map=la,t.marker=Hc,t.point=Ae,t.polygon=Kg,t.polyline=Y0,t.popup=xa,t.rectangle=q3,t.setOptions=f,t.stamp=o,t.svg=u0,t.svgOverlay=us,t.tileLayer=Bf,t.tooltip=Gl,t.transformation=qt,t.version=e,t.videoOverlay=Br;var La=window.L;t.noConflict=function(){return window.L=La,this},window.L=t})});var i5t=xr((Bse,t5t)=>{(function(t,e){typeof Bse=="object"&&typeof t5t<"u"?e(Bse):typeof define=="function"&&define.amd?define(["exports"],e):(t=t||self,e((t.Leaflet=t.Leaflet||{},t.Leaflet.markercluster={})))})(Bse,function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(i){L.Util.setOptions(this,i),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var r=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,r?this._withAnimation:this._noAnimation),this._markerCluster=r?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(i){if(i instanceof L.LayerGroup)return this.addLayers([i]);if(!i.getLatLng)return this._nonPointGroup.addLayer(i),this.fire("layeradd",{layer:i}),this;if(!this._map)return this._needsClustering.push(i),this.fire("layeradd",{layer:i}),this;if(this.hasLayer(i))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(i,this._maxZoom),this.fire("layeradd",{layer:i}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var r=i,s=this._zoom;if(i.__parent)for(;r.__parent._zoom>=s;)r=r.__parent;return this._currentShownBounds.contains(r.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(i,r):this._animationAddLayerNonAnimated(i,r)),this},removeLayer:function(i){return i instanceof L.LayerGroup?this.removeLayers([i]):i.getLatLng?this._map?i.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(i)),this._removeLayer(i,!0),this.fire("layerremove",{layer:i}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),i.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(i)&&(this._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,i)&&this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}),this):(this._nonPointGroup.removeLayer(i),this.fire("layerremove",{layer:i}),this)},addLayers:function(i,r){if(!L.Util.isArray(i))return this.addLayer(i);var s=this._featureGroup,o=this._nonPointGroup,a=this.options.chunkedLoading,l=this.options.chunkInterval,c=this.options.chunkProgress,d=i.length,u=0,m=!0,f;if(this._map){var _=new Date().getTime(),x=L.bind(function(){var E=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();u<d;u++){if(a&&u%200===0){var M=new Date().getTime()-E;if(M>l)break}if(f=i[u],f instanceof L.LayerGroup){m&&(i=i.slice(),m=!1),this._extractNonGroupLayers(f,i),d=i.length;continue}if(!f.getLatLng){o.addLayer(f),r||this.fire("layeradd",{layer:f});continue}if(!this.hasLayer(f)&&(this._addLayer(f,this._maxZoom),r||this.fire("layeradd",{layer:f}),f.__parent&&f.__parent.getChildCount()===2)){var I=f.__parent.getAllChildMarkers(),z=I[0]===f?I[1]:I[0];s.removeLayer(z)}}c&&c(u,d,new Date().getTime()-_),u===d?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(x,this.options.chunkDelay)},this);x()}else for(var D=this._needsClustering;u<d;u++){if(f=i[u],f instanceof L.LayerGroup){m&&(i=i.slice(),m=!1),this._extractNonGroupLayers(f,i),d=i.length;continue}if(!f.getLatLng){o.addLayer(f);continue}this.hasLayer(f)||D.push(f)}return this},removeLayers:function(i){var r,s,o=i.length,a=this._featureGroup,l=this._nonPointGroup,c=!0;if(!this._map){for(r=0;r<o;r++){if(s=i[r],s instanceof L.LayerGroup){c&&(i=i.slice(),c=!1),this._extractNonGroupLayers(s,i),o=i.length;continue}this._arraySplice(this._needsClustering,s),l.removeLayer(s),this.hasLayer(s)&&this._needsRemoving.push({layer:s,latlng:s._latlng}),this.fire("layerremove",{layer:s})}return this}if(this._unspiderfy){this._unspiderfy();var d=i.slice(),u=o;for(r=0;r<u;r++){if(s=d[r],s instanceof L.LayerGroup){this._extractNonGroupLayers(s,d),u=d.length;continue}this._unspiderfyLayer(s)}}for(r=0;r<o;r++){if(s=i[r],s instanceof L.LayerGroup){c&&(i=i.slice(),c=!1),this._extractNonGroupLayers(s,i),o=i.length;continue}if(!s.__parent){l.removeLayer(s),this.fire("layerremove",{layer:s});continue}this._removeLayer(s,!0,!0),this.fire("layerremove",{layer:s}),a.hasLayer(s)&&(a.removeLayer(s),s.clusterShow&&s.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(i){i.off(this._childMarkerEventHandlers,this),delete i.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var i=new L.LatLngBounds;this._topClusterLevel&&i.extend(this._topClusterLevel._bounds);for(var r=this._needsClustering.length-1;r>=0;r--)i.extend(this._needsClustering[r].getLatLng());return i.extend(this._nonPointGroup.getBounds()),i},eachLayer:function(i,r){var s=this._needsClustering.slice(),o=this._needsRemoving,a,l,c;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),l=s.length-1;l>=0;l--){for(a=!0,c=o.length-1;c>=0;c--)if(o[c].layer===s[l]){a=!1;break}a&&i.call(r,s[l])}this._nonPointGroup.eachLayer(i,r)},getLayers:function(){var i=[];return this.eachLayer(function(r){i.push(r)}),i},getLayer:function(i){var r=null;return i=parseInt(i,10),this.eachLayer(function(s){L.stamp(s)===i&&(r=s)}),r},hasLayer:function(i){if(!i)return!1;var r,s=this._needsClustering;for(r=s.length-1;r>=0;r--)if(s[r]===i)return!0;for(s=this._needsRemoving,r=s.length-1;r>=0;r--)if(s[r].layer===i)return!1;return!!(i.__parent&&i.__parent._group===this)||this._nonPointGroup.hasLayer(i)},zoomToShowLayer:function(i,r){var s=this._map;typeof r!="function"&&(r=function(){});var o=function(){(s.hasLayer(i)||s.hasLayer(i.__parent))&&!this._inZoomAnimation&&(this._map.off("moveend",o,this),this.off("animationend",o,this),s.hasLayer(i)?r():i.__parent._icon&&(this.once("spiderfied",r,this),i.__parent.spiderfy()))};i._icon&&this._map.getBounds().contains(i.getLatLng())?r():i.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",o,this),this._map.panTo(i.getLatLng())):(this._map.on("moveend",o,this),this.on("animationend",o,this),i.__parent.zoomToBounds())},onAdd:function(i){this._map=i;var r,s,o;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(i),this._nonPointGroup.addTo(i),this._gridClusters||this._generateInitialClusters(),this._maxLat=i.options.crs.projection.MAX_LATITUDE,r=0,s=this._needsRemoving.length;r<s;r++)o=this._needsRemoving[r],o.newlatlng=o.layer._latlng,o.layer._latlng=o.latlng;for(r=0,s=this._needsRemoving.length;r<s;r++)o=this._needsRemoving[r],this._removeLayer(o.layer,!0),o.layer._latlng=o.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),s=this._needsClustering,this._needsClustering=[],this.addLayers(s,!0)},onRemove:function(i){i.off("zoomend",this._zoomEnd,this),i.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(i){for(var r=i;r&&!r._icon;)r=r.__parent;return r||null},_arraySplice:function(i,r){for(var s=i.length-1;s>=0;s--)if(i[s]===r)return i.splice(s,1),!0},_removeFromGridUnclustered:function(i,r){for(var s=this._map,o=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());r>=a&&o[r].removeObject(i,s.project(i.getLatLng(),r));r--);},_childMarkerDragStart:function(i){i.target.__dragStart=i.target._latlng},_childMarkerMoved:function(i){if(!this._ignoreMove&&!i.target.__dragStart){var r=i.target._popup&&i.target._popup.isOpen();this._moveChild(i.target,i.oldLatLng,i.latlng),r&&i.target.openPopup()}},_moveChild:function(i,r,s){i._latlng=r,this.removeLayer(i),i._latlng=s,this.addLayer(i)},_childMarkerDragEnd:function(i){var r=i.target.__dragStart;delete i.target.__dragStart,r&&this._moveChild(i.target,r,i.target._latlng)},_removeLayer:function(i,r,s){var o=this._gridClusters,a=this._gridUnclustered,l=this._featureGroup,c=this._map,d=Math.floor(this._map.getMinZoom());r&&this._removeFromGridUnclustered(i,this._maxZoom);var u=i.__parent,m=u._markers,f;for(this._arraySplice(m,i);u&&(u._childCount--,u._boundsNeedUpdate=!0,!(u._zoom<d));)r&&u._childCount<=1?(f=u._markers[0]===i?u._markers[1]:u._markers[0],o[u._zoom].removeObject(u,c.project(u._cLatLng,u._zoom)),a[u._zoom].addObject(f,c.project(f.getLatLng(),u._zoom)),this._arraySplice(u.__parent._childClusters,u),u.__parent._markers.push(f),f.__parent=u.__parent,u._icon&&(l.removeLayer(u),s||l.addLayer(f))):u._iconNeedsUpdate=!0,u=u.__parent;delete i.__parent},_isOrIsParent:function(i,r){for(;r;){if(i===r)return!0;r=r.parentNode}return!1},fire:function(i,r,s){if(r&&r.layer instanceof L.MarkerCluster){if(r.originalEvent&&this._isOrIsParent(r.layer._icon,r.originalEvent.relatedTarget))return;i="cluster"+i}L.FeatureGroup.prototype.fire.call(this,i,r,s)},listens:function(i,r){return L.FeatureGroup.prototype.listens.call(this,i,r)||L.FeatureGroup.prototype.listens.call(this,"cluster"+i,r)},_defaultIconCreateFunction:function(i){var r=i.getChildCount(),s=" marker-cluster-";return r<10?s+="small":r<100?s+="medium":s+="large",new L.DivIcon({html:"<div><span>"+r+"</span></div>",className:"marker-cluster"+s,iconSize:new L.Point(40,40)})},_bindEvents:function(){var i=this._map,r=this.options.spiderfyOnMaxZoom,s=this.options.showCoverageOnHover,o=this.options.zoomToBoundsOnClick,a=this.options.spiderfyOnEveryZoom;(r||o||a)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),s&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),i.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(i){var r=i.layer,s=r;if(!(i.type==="clusterkeypress"&&i.originalEvent&&i.originalEvent.keyCode!==13)){for(;s._childClusters.length===1;)s=s._childClusters[0];s._zoom===this._maxZoom&&s._childCount===r._childCount&&this.options.spiderfyOnMaxZoom?r.spiderfy():this.options.zoomToBoundsOnClick&&r.zoomToBounds(),this.options.spiderfyOnEveryZoom&&r.spiderfy(),i.originalEvent&&i.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(i){var r=this._map;this._inZoomAnimation||(this._shownPolygon&&r.removeLayer(this._shownPolygon),i.layer.getChildCount()>2&&i.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(i.layer.getConvexHull(),this.options.polygonOptions),r.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var i=this.options.spiderfyOnMaxZoom,r=this.options.showCoverageOnHover,s=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom,a=this._map;(i||s||o)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),r&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),a.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var i=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,i),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),i),this._currentShownBounds=i}},_generateInitialClusters:function(){var i=Math.ceil(this._map.getMaxZoom()),r=Math.floor(this._map.getMinZoom()),s=this.options.maxClusterRadius,o=s;typeof s!="function"&&(o=function(){return s}),this.options.disableClusteringAtZoom!==null&&(i=this.options.disableClusteringAtZoom-1),this._maxZoom=i,this._gridClusters={},this._gridUnclustered={};for(var a=i;a>=r;a--)this._gridClusters[a]=new L.DistanceGrid(o(a)),this._gridUnclustered[a]=new L.DistanceGrid(o(a));this._topClusterLevel=new this._markerCluster(this,r-1)},_addLayer:function(i,r){var s=this._gridClusters,o=this._gridUnclustered,a=Math.floor(this._map.getMinZoom()),l,c;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(i),i.on(this._childMarkerEventHandlers,this);r>=a;r--){l=this._map.project(i.getLatLng(),r);var d=s[r].getNearObject(l);if(d){d._addChild(i),i.__parent=d;return}if(d=o[r].getNearObject(l),d){var u=d.__parent;u&&this._removeLayer(d,!1);var m=new this._markerCluster(this,r,d,i);s[r].addObject(m,this._map.project(m._cLatLng,r)),d.__parent=m,i.__parent=m;var f=m;for(c=r-1;c>u._zoom;c--)f=new this._markerCluster(this,c,f),s[c].addObject(f,this._map.project(d.getLatLng(),c));u._addChild(f),this._removeFromGridUnclustered(d,r);return}o[r].addObject(i,l)}this._topClusterLevel._addChild(i),i.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(i){i instanceof L.MarkerCluster&&i._iconNeedsUpdate&&i._updateIcon()})},_enqueue:function(i){this._queue.push(i),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var i=0;i<this._queue.length;i++)this._queue[i].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var i=Math.round(this._map._zoom);this._processQueue(),this._zoom<i&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,i)):this._zoom>i?(this._animationStart(),this._animationZoomOut(this._zoom,i)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(L.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(i){var r=this._maxLat;return r!==void 0&&(i.getNorth()>=r&&(i._northEast.lat=1/0),i.getSouth()<=-r&&(i._southWest.lat=-1/0)),i},_animationAddLayerNonAnimated:function(i,r){if(r===i)this._featureGroup.addLayer(i);else if(r._childCount===2){r._addToMap();var s=r.getAllChildMarkers();this._featureGroup.removeLayer(s[0]),this._featureGroup.removeLayer(s[1])}else r._updateIcon()},_extractNonGroupLayers:function(i,r){var s=i.getLayers(),o=0,a;for(r=r||[];o<s.length;o++){if(a=s[o],a instanceof L.LayerGroup){this._extractNonGroupLayers(a,r);continue}r.push(a)}return r},_overrideMarkerIcon:function(i){var r=i.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[i]}});return r}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(i,r){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),i),this._topClusterLevel._recursivelyAddChildrenToMap(null,r,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(i,r){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),i),this._topClusterLevel._recursivelyAddChildrenToMap(null,r,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(i,r){this._animationAddLayerNonAnimated(i,r)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(i,r){var s=this._getExpandedVisibleBounds(),o=this._featureGroup,a=Math.floor(this._map.getMinZoom()),l;this._ignoreMove=!0,this._topClusterLevel._recursively(s,i,a,function(c){var d=c._latlng,u=c._markers,m;for(s.contains(d)||(d=null),c._isSingleParent()&&i+1===r?(o.removeLayer(c),c._recursivelyAddChildrenToMap(null,r,s)):(c.clusterHide(),c._recursivelyAddChildrenToMap(d,r,s)),l=u.length-1;l>=0;l--)m=u[l],s.contains(m._latlng)||o.removeLayer(m)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(s,r),o.eachLayer(function(c){!(c instanceof L.MarkerCluster)&&c._icon&&c.clusterShow()}),this._topClusterLevel._recursively(s,i,r,function(c){c._recursivelyRestoreChildPositions(r)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(s,i,a,function(c){o.removeLayer(c),c.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(i,r){this._animationZoomOutSingle(this._topClusterLevel,i-1,r),this._topClusterLevel._recursivelyAddChildrenToMap(null,r,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),i,this._getExpandedVisibleBounds())},_animationAddLayer:function(i,r){var s=this,o=this._featureGroup;o.addLayer(i),r!==i&&(r._childCount>2?(r._updateIcon(),this._forceLayout(),this._animationStart(),i._setPos(this._map.latLngToLayerPoint(r.getLatLng())),i.clusterHide(),this._enqueue(function(){o.removeLayer(i),i.clusterShow(),s._animationEnd()})):(this._forceLayout(),s._animationStart(),s._animationZoomOutSingle(r,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(i,r,s){var o=this._getExpandedVisibleBounds(),a=Math.floor(this._map.getMinZoom());i._recursivelyAnimateChildrenInAndAddSelfToMap(o,a,r+1,s);var l=this;this._forceLayout(),i._recursivelyBecomeVisible(o,s),this._enqueue(function(){if(i._childCount===1){var c=i._markers[0];this._ignoreMove=!0,c.setLatLng(c.getLatLng()),this._ignoreMove=!1,c.clusterShow&&c.clusterShow()}else i._recursively(o,s,a,function(d){d._recursivelyRemoveChildrenFromMap(o,a,r+1)});l._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(i){return new L.MarkerClusterGroup(i)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(i,r,s,o){L.Marker.prototype.initialize.call(this,s?s._cLatLng||s.getLatLng():new L.LatLng(0,0),{icon:this,pane:i.options.clusterPane}),this._group=i,this._zoom=r,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,s&&this._addChild(s),o&&this._addChild(o)},getAllChildMarkers:function(i,r){i=i||[];for(var s=this._childClusters.length-1;s>=0;s--)this._childClusters[s].getAllChildMarkers(i,r);for(var o=this._markers.length-1;o>=0;o--)r&&this._markers[o].__dragStart||i.push(this._markers[o]);return i},getChildCount:function(){return this._childCount},zoomToBounds:function(i){for(var r=this._childClusters.slice(),s=this._group._map,o=s.getBoundsZoom(this._bounds),a=this._zoom+1,l=s.getZoom(),c;r.length>0&&o>a;){a++;var d=[];for(c=0;c<r.length;c++)d=d.concat(r[c]._childClusters);r=d}o>a?this._group._map.setView(this._latlng,a):o<=l?this._group._map.setView(this._latlng,l+1):this._group._map.fitBounds(this._bounds,i)},getBounds:function(){var i=new L.LatLngBounds;return i.extend(this._bounds),i},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(i,r){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(i),i instanceof L.MarkerCluster?(r||(this._childClusters.push(i),i.__parent=this),this._childCount+=i._childCount):(r||this._markers.push(i),this._childCount++),this.__parent&&this.__parent._addChild(i,!0)},_setClusterCenter:function(i){this._cLatLng||(this._cLatLng=i._cLatLng||i._latlng)},_resetBounds:function(){var i=this._bounds;i._southWest&&(i._southWest.lat=1/0,i._southWest.lng=1/0),i._northEast&&(i._northEast.lat=-1/0,i._northEast.lng=-1/0)},_recalculateBounds:function(){var i=this._markers,r=this._childClusters,s=0,o=0,a=this._childCount,l,c,d,u;if(a!==0){for(this._resetBounds(),l=0;l<i.length;l++)d=i[l]._latlng,this._bounds.extend(d),s+=d.lat,o+=d.lng;for(l=0;l<r.length;l++)c=r[l],c._boundsNeedUpdate&&c._recalculateBounds(),this._bounds.extend(c._bounds),d=c._wLatLng,u=c._childCount,s+=d.lat*u,o+=d.lng*u;this._latlng=this._wLatLng=new L.LatLng(s/a,o/a),this._boundsNeedUpdate=!1}},_addToMap:function(i){i&&(this._backupLatlng=this._latlng,this.setLatLng(i)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(i,r,s){this._recursively(i,this._group._map.getMinZoom(),s-1,function(o){var a=o._markers,l,c;for(l=a.length-1;l>=0;l--)c=a[l],c._icon&&(c._setPos(r),c.clusterHide())},function(o){var a=o._childClusters,l,c;for(l=a.length-1;l>=0;l--)c=a[l],c._icon&&(c._setPos(r),c.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(i,r,s,o){this._recursively(i,o,r,function(a){a._recursivelyAnimateChildrenIn(i,a._group._map.latLngToLayerPoint(a.getLatLng()).round(),s),a._isSingleParent()&&s-1===o?(a.clusterShow(),a._recursivelyRemoveChildrenFromMap(i,r,s)):a.clusterHide(),a._addToMap()})},_recursivelyBecomeVisible:function(i,r){this._recursively(i,this._group._map.getMinZoom(),r,null,function(s){s.clusterShow()})},_recursivelyAddChildrenToMap:function(i,r,s){this._recursively(s,this._group._map.getMinZoom()-1,r,function(o){if(r!==o._zoom)for(var a=o._markers.length-1;a>=0;a--){var l=o._markers[a];s.contains(l._latlng)&&(i&&(l._backupLatlng=l.getLatLng(),l.setLatLng(i),l.clusterHide&&l.clusterHide()),o._group._featureGroup.addLayer(l))}},function(o){o._addToMap(i)})},_recursivelyRestoreChildPositions:function(i){for(var r=this._markers.length-1;r>=0;r--){var s=this._markers[r];s._backupLatlng&&(s.setLatLng(s._backupLatlng),delete s._backupLatlng)}if(i-1===this._zoom)for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._restorePosition();else for(var a=this._childClusters.length-1;a>=0;a--)this._childClusters[a]._recursivelyRestoreChildPositions(i)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(i,r,s,o){var a,l;this._recursively(i,r-1,s-1,function(c){for(l=c._markers.length-1;l>=0;l--)a=c._markers[l],(!o||!o.contains(a._latlng))&&(c._group._featureGroup.removeLayer(a),a.clusterShow&&a.clusterShow())},function(c){for(l=c._childClusters.length-1;l>=0;l--)a=c._childClusters[l],(!o||!o.contains(a._latlng))&&(c._group._featureGroup.removeLayer(a),a.clusterShow&&a.clusterShow())})},_recursively:function(i,r,s,o,a){var l=this._childClusters,c=this._zoom,d,u;if(r<=c&&(o&&o(this),a&&c===s&&a(this)),c<r||c<s)for(d=l.length-1;d>=0;d--)u=l[d],u._boundsNeedUpdate&&u._recalculateBounds(),i.intersects(u._bounds)&&u._recursively(i,r,s,o,a)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var i=this.options.opacity;return this.setOpacity(0),this.options.opacity=i,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(i){this._cellSize=i,this._sqCellSize=i*i,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(i,r){var s=this._getCoord(r.x),o=this._getCoord(r.y),a=this._grid,l=a[o]=a[o]||{},c=l[s]=l[s]||[],d=L.Util.stamp(i);this._objectPoint[d]=r,c.push(i)},updateObject:function(i,r){this.removeObject(i),this.addObject(i,r)},removeObject:function(i,r){var s=this._getCoord(r.x),o=this._getCoord(r.y),a=this._grid,l=a[o]=a[o]||{},c=l[s]=l[s]||[],d,u;for(delete this._objectPoint[L.Util.stamp(i)],d=0,u=c.length;d<u;d++)if(c[d]===i)return c.splice(d,1),u===1&&delete l[s],!0},eachObject:function(i,r){var s,o,a,l,c,d,u,m=this._grid;for(s in m){c=m[s];for(o in c)for(d=c[o],a=0,l=d.length;a<l;a++)u=i.call(r,d[a]),u&&(a--,l--)}},getNearObject:function(i){var r=this._getCoord(i.x),s=this._getCoord(i.y),o,a,l,c,d,u,m,f,_=this._objectPoint,x=this._sqCellSize,D=null;for(o=s-1;o<=s+1;o++)if(c=this._grid[o],c){for(a=r-1;a<=r+1;a++)if(d=c[a],d)for(l=0,u=d.length;l<u;l++)m=d[l],f=this._sqDist(_[L.Util.stamp(m)],i),(f<x||f<=x&&D===null)&&(x=f,D=m)}return D},_getCoord:function(i){var r=Math.floor(i/this._cellSize);return isFinite(r)?r:i},_sqDist:function(i,r){var s=r.x-i.x,o=r.y-i.y;return s*s+o*o}},function(){L.QuickHull={getDistant:function(i,r){var s=r[1].lat-r[0].lat,o=r[0].lng-r[1].lng;return o*(i.lat-r[0].lat)+s*(i.lng-r[0].lng)},findMostDistantPointFromBaseLine:function(i,r){var s=0,o=null,a=[],l,c,d;for(l=r.length-1;l>=0;l--){if(c=r[l],d=this.getDistant(c,i),d>0)a.push(c);else continue;d>s&&(s=d,o=c)}return{maxPoint:o,newPoints:a}},buildConvexHull:function(i,r){var s=[],o=this.findMostDistantPointFromBaseLine(i,r);return o.maxPoint?(s=s.concat(this.buildConvexHull([i[0],o.maxPoint],o.newPoints)),s=s.concat(this.buildConvexHull([o.maxPoint,i[1]],o.newPoints)),s):[i[0]]},getConvexHull:function(i){var r=!1,s=!1,o=!1,a=!1,l=null,c=null,d=null,u=null,m=null,f=null,_;for(_=i.length-1;_>=0;_--){var x=i[_];(r===!1||x.lat>r)&&(l=x,r=x.lat),(s===!1||x.lat<s)&&(c=x,s=x.lat),(o===!1||x.lng>o)&&(d=x,o=x.lng),(a===!1||x.lng<a)&&(u=x,a=x.lng)}s!==r?(f=c,m=l):(f=u,m=d);var D=[].concat(this.buildConvexHull([f,m],i),this.buildConvexHull([m,f],i));return D}}}(),L.MarkerCluster.include({getConvexHull:function(){var i=this.getAllChildMarkers(),r=[],s,o;for(o=i.length-1;o>=0;o--)s=i[o].getLatLng(),r.push(s);return L.QuickHull.getConvexHull(r)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var i=this.getAllChildMarkers(null,!0),r=this._group,s=r._map,o=s.latLngToLayerPoint(this._latlng),a;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?a=this._group.options.spiderfyShapePositions(i.length,o):i.length>=this._circleSpiralSwitchover?a=this._generatePointsSpiral(i.length,o):(o.y+=10,a=this._generatePointsCircle(i.length,o)),this._animationSpiderfy(i,a)}},unspiderfy:function(i){this._group._inZoomAnimation||(this._animationUnspiderfy(i),this._group._spiderfied=null)},_generatePointsCircle:function(i,r){var s=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+i),o=s/this._2PI,a=this._2PI/i,l=[],c,d;for(o=Math.max(o,35),l.length=i,c=0;c<i;c++)d=this._circleStartAngle+c*a,l[c]=new L.Point(r.x+o*Math.cos(d),r.y+o*Math.sin(d))._round();return l},_generatePointsSpiral:function(i,r){var s=this._group.options.spiderfyDistanceMultiplier,o=s*this._spiralLengthStart,a=s*this._spiralFootSeparation,l=s*this._spiralLengthFactor*this._2PI,c=0,d=[],u;for(d.length=i,u=i;u>=0;u--)u<i&&(d[u]=new L.Point(r.x+o*Math.cos(c),r.y+o*Math.sin(c))._round()),c+=a/o+u*5e-4,o+=l/c;return d},_noanimationUnspiderfy:function(){var i=this._group,r=i._map,s=i._featureGroup,o=this.getAllChildMarkers(null,!0),a,l;for(i._ignoreMove=!0,this.setOpacity(1),l=o.length-1;l>=0;l--)a=o[l],s.removeLayer(a),a._preSpiderfyLatlng&&(a.setLatLng(a._preSpiderfyLatlng),delete a._preSpiderfyLatlng),a.setZIndexOffset&&a.setZIndexOffset(0),a._spiderLeg&&(r.removeLayer(a._spiderLeg),delete a._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:o}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(i,r){var s=this._group,o=s._map,a=s._featureGroup,l=this._group.options.spiderLegPolylineOptions,c,d,u,m;for(s._ignoreMove=!0,c=0;c<i.length;c++)m=o.layerPointToLatLng(r[c]),d=i[c],u=new L.Polyline([this._latlng,m],l),o.addLayer(u),d._spiderLeg=u,d._preSpiderfyLatlng=d._latlng,d.setLatLng(m),d.setZIndexOffset&&d.setZIndexOffset(1e6),a.addLayer(d);this.setOpacity(.3),s._ignoreMove=!1,s.fire("spiderfied",{cluster:this,markers:i})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(i,r){var s=this,o=this._group,a=o._map,l=o._featureGroup,c=this._latlng,d=a.latLngToLayerPoint(c),u=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),f=m.opacity,_,x,D,E,M,I;for(f===void 0&&(f=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),u?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=f,o._ignoreMove=!0,_=0;_<i.length;_++)x=i[_],I=a.layerPointToLatLng(r[_]),D=new L.Polyline([c,I],m),a.addLayer(D),x._spiderLeg=D,u&&(E=D._path,M=E.getTotalLength()+.1,E.style.strokeDasharray=M,E.style.strokeDashoffset=M),x.setZIndexOffset&&x.setZIndexOffset(1e6),x.clusterHide&&x.clusterHide(),l.addLayer(x),x._setPos&&x._setPos(d);for(o._forceLayout(),o._animationStart(),_=i.length-1;_>=0;_--)I=a.layerPointToLatLng(r[_]),x=i[_],x._preSpiderfyLatlng=x._latlng,x.setLatLng(I),x.clusterShow&&x.clusterShow(),u&&(D=x._spiderLeg,E=D._path,E.style.strokeDashoffset=0,D.setStyle({opacity:f}));this.setOpacity(.3),o._ignoreMove=!1,setTimeout(function(){o._animationEnd(),o.fire("spiderfied",{cluster:s,markers:i})},200)},_animationUnspiderfy:function(i){var r=this,s=this._group,o=s._map,a=s._featureGroup,l=i?o._latLngToNewLayerPoint(this._latlng,i.zoom,i.center):o.latLngToLayerPoint(this._latlng),c=this.getAllChildMarkers(null,!0),d=L.Path.SVG,u,m,f,_,x,D;for(s._ignoreMove=!0,s._animationStart(),this.setOpacity(1),m=c.length-1;m>=0;m--)u=c[m],u._preSpiderfyLatlng&&(u.closePopup(),u.setLatLng(u._preSpiderfyLatlng),delete u._preSpiderfyLatlng,D=!0,u._setPos&&(u._setPos(l),D=!1),u.clusterHide&&(u.clusterHide(),D=!1),D&&a.removeLayer(u),d&&(f=u._spiderLeg,_=f._path,x=_.getTotalLength()+.1,_.style.strokeDashoffset=x,f.setStyle({opacity:0})));s._ignoreMove=!1,setTimeout(function(){var E=0;for(m=c.length-1;m>=0;m--)u=c[m],u._spiderLeg&&E++;for(m=c.length-1;m>=0;m--)u=c[m],u._spiderLeg&&(u.clusterShow&&u.clusterShow(),u.setZIndexOffset&&u.setZIndexOffset(0),E>1&&a.removeLayer(u),o.removeLayer(u._spiderLeg),delete u._spiderLeg);s._animationEnd(),s.fire("unspiderfied",{cluster:r,markers:c})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(i){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(i))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(i){this._spiderfied&&this._spiderfied.unspiderfy(i)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(i){i._spiderLeg&&(this._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow(),i.setZIndexOffset&&i.setZIndexOffset(0),this._map.removeLayer(i._spiderLeg),delete i._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(i){return i?i instanceof L.MarkerClusterGroup?i=i._topClusterLevel.getAllChildMarkers():i instanceof L.LayerGroup?i=i._layers:i instanceof L.MarkerCluster?i=i.getAllChildMarkers():i instanceof L.Marker&&(i=[i]):i=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(i),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(i),this},_flagParentsIconsNeedUpdate:function(i){var r,s;for(r in i)for(s=i[r].__parent;s;)s._iconNeedsUpdate=!0,s=s.__parent},_refreshSingleMarkerModeMarkers:function(i){var r,s;for(r in i)s=i[r],this.hasLayer(s)&&s.setIcon(this._overrideMarkerIcon(s))}}),L.Marker.include({refreshIconOptions:function(i,r){var s=this.options.icon;return L.setOptions(s,i),this.setIcon(s),r&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=n,Object.defineProperty(t,"__esModule",{value:!0})})});var CS,avs,n5t,r5t=Q(()=>{me();Gi();yi();o1();CS=Gs(e5t()),avs=Gs(i5t());ih();me();CS.Icon.Default.mergeOptions({iconRetinaUrl:"../assets/map/marker-icon-2x.png",iconUrl:"../assets/map/marker-icon.png",shadowUrl:"../assets/map/marker-shadow.png"});n5t=(()=>{let e=class e extends bt{constructor(){super(),this.selectedStudios=gt(["ac"]),this.contacts=gt([]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.cacheService=Ve(cc),this.studios=[{value:"ac",text:"Aachen"},{value:"du",text:"D\xFCsseldorf"},{value:"ma",text:"Mallorca"},{value:"ffm",text:"Frankfurt"},{value:"nu",text:"N\xFCrnberg"},{value:"ab",text:"Aschaffenburg"}],qh(()=>{let i=this.contacts().filter(r=>this.selectedStudios().includes(r.studio));this.addCustomerClusters(i)})}ngOnInit(){return O(this,null,function*(){this.initMap(),this.contacts.set(yield this.socketService.getContactsForMap())})}nxtOnDestroy(){}initMap(){this.map=CS.map("map").setView([51.1657,10.4515],6),CS.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"NXT-LVL.INK"}).addTo(this.map)}addCustomerClusters(i){return O(this,null,function*(){this.markers&&this.map.removeLayer(this.markers),this.markers=window.L.markerClusterGroup();for(let r of i){let s=CS.marker([r.latitude,r.longitude]).bindPopup(r.postalCode+" "+r.city);this.markers.addLayer(s)}this.map.addLayer(this.markers)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-map"]],standalone:!0,features:[et,xe],decls:4,vars:3,consts:[[1,"absolute","top-0","left-0","flex","w-full","justify-center",2,"z-index","500"],[2,"background-color","rgba(42,42,42,0.60)","min-width","300px"],[3,"valueChange","multiple","options","value"],["id","map",2,"height","100%","width","100%"]],template:function(r,s){r&1&&(h(0,"div",0)(1,"div",1)(2,"nxt-select",2),Xe("valueChange",function(a){return Ze(s.selectedStudios,a)||(s.selectedStudios=a),a}),p()()(),ee(3,"div",3)),r&2&&(g(2),b("multiple",!0)("options",s.studios),qe("value",s.selectedStudios))},dependencies:[$l],styles:["[_nghost-%COMP%]{background-color:#2a2a2a}[_nghost-%COMP%]     .mat-mdc-select-trigger{justify-content:center}[_nghost-%COMP%]     .mat-mdc-form-field-infix{padding-top:10px!important}[_nghost-%COMP%]     .mat-mdc-select-value{width:auto!important}[_nghost-%COMP%]     .mat-mdc-form-field-subscript-wrapper{display:none}"],changeDetection:0});let t=e;return t})()});var s5t,o5t=Q(()=>{me();Gi();d2();Jr();Am();Pm();Tf();Im();Df();Zi();me();d2();s5t=(()=>{let e=class e extends bt{constructor(){super(),this.value=gt(""),this.cdRef=Ve(Kt)}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-qr-code-generator"]],standalone:!0,features:[et,xe],decls:25,vars:9,consts:[[3,"click"],[3,"valueChange","value"],[1,"flex","h-full","w-full","items-center","justify-center"],[1,"flex","w-fit","flex-row","flex-wrap","items-center","justify-center"],["errorCorrectionLevel","M","colorDark","#000","colorLight","#00000000",3,"qrdata","width"],["errorCorrectionLevel","M","colorDark","#fff","colorLight","#00000000",3,"qrdata","width"],["errorCorrectionLevel","M","colorDark","#b7860f","colorLight","#00000000",3,"qrdata","width"],["errorCorrectionLevel","M","colorDark","#3c3b3f","colorLight","#00000000",3,"qrdata","width"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header")(2,"nxt-page-header-title"),y(3,"QR-Code-Generator"),p(),h(4,"nxt-button",0),F("click",function(){return s.value.set("https://nxt-lvl.ink/ac")}),y(5,"AC"),p(),h(6,"nxt-button",0),F("click",function(){return s.value.set("https://nxt-lvl.ink/ffm")}),y(7,"FFM"),p(),h(8,"nxt-button",0),F("click",function(){return s.value.set("https://nxt-lvl.ink/ab")}),y(9,"AB"),p(),h(10,"nxt-button",0),F("click",function(){return s.value.set("https://nxt-lvl.ink/nu")}),y(11,"NU"),p(),h(12,"nxt-button",0),F("click",function(){return s.value.set("https://nxt-lvl.ink/ma")}),y(13,"MA"),p(),h(14,"nxt-button",0),F("click",function(){return s.value.set("https://nxt-lvl.ink/du")}),y(15,"DU"),p()(),h(16,"nxt-page-content")(17,"nxt-input",1),Xe("valueChange",function(a){return Ze(s.value,a)||(s.value=a),a}),p(),h(18,"div",2)(19,"div",3),ee(20,"qrcode",4)(21,"qrcode",5)(22,"qrcode",6)(23,"qrcode",7),p()()(),ee(24,"nxt-page-footer"),p()),r&2&&(g(17),qe("value",s.value),g(3),b("qrdata",s.value())("width",400),g(),b("qrdata",s.value())("width",400),g(),b("qrdata",s.value())("width",400),g(),b("qrdata",s.value())("width",400))},dependencies:[c2,r3,Yi,Pl,Yl,hc,Al,Kl,Lt],changeDetection:0});let t=e;return t})()});var a5t,l5t=Q(()=>{me();Gi();Tf();Im();Df();Pm();Am();Pa();me();a5t=(()=>{let e=class e extends bt{constructor(){super(),this.cdRef=Ve(Kt),this.columnDefs=gt([{headerName:"Typ",field:"type",valueFormatter:i=>i.value}])}ngOnInit(){}nxtOnDestroy(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-monitor"]],standalone:!0,features:[et,xe],decls:7,vars:1,consts:[[3,"columnDefs"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header")(2,"nxt-page-header-title"),y(3,"Messenger"),p()(),h(4,"nxt-page-content"),ee(5,"nxt-datagrid",0),p(),ee(6,"nxt-page-footer"),p()),r&2&&(g(5),b("columnDefs",s.columnDefs()))},dependencies:[Pl,Yl,hc,Al,Kl,dr],changeDetection:0});let t=e;return t})()});var c5t,d5t=Q(()=>{me();Gi();Pm();ji();Am();Tf();Im();Df();Pa();a3();zn();yi();me();c5t=(()=>{let e=class e extends bt{constructor(){super(),this.dateString=gt(Ie.formatNowDate()),this.transactions=gt([]),this.cdRef=Ve(Kt),this.socketService=Ve(lt),this.dialogRef=Ve(Gt,{optional:!0}),qh(()=>{this.dateString(),this.load()})}ngOnInit(){}nxtOnDestroy(){}load(){return O(this,null,function*(){this.transactions.set(yield this.socketService.getQontoTransactionsByDate(this.dateString()))})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=_e({type:e,selectors:[["nxt-qonto-deposit-import"]],standalone:!0,features:[et,xe],decls:8,vars:2,consts:[[3,"dialogRef"],[3,"valueChange","value"]],template:function(r,s){r&1&&(h(0,"nxt-page")(1,"nxt-page-header",0)(2,"nxt-page-header-title"),y(3,"Messenger"),p(),h(4,"nxt-date-picker-2",1),Xe("valueChange",function(a){return Ze(s.dateString,a)||(s.dateString=a),a}),p()(),h(5,"nxt-page-content"),ee(6,"nxt-datagrid"),p(),ee(7,"nxt-page-footer"),p()),r&2&&(g(),b("dialogRef",s.dialogRef),g(3),qe("value",s.dateString))},dependencies:[Pl,Yl,hc,Al,Kl,dr,_f],changeDetection:0});let t=e;return t})()});function u5t(){let t=window.ngConfig;return[...nen,...ien]}var ien,nen,h5t=Q(()=>{Ggt();Wgt();jgt();Ygt();Zgt();r3t();o3t();l3t();d3t();m3t();l9e();g3t();y3t();C3t();d9e();D3t();u9e();cve();p9e();qA();f9e();V3t();g9e();P4e();j3t();K3t();q3t();Lre();Gre();r5e();I7();Q3t();e4t();y9e();Ure();C9e();S9e();xge();WA();T9e();D9e();F4t();O4t();V4t();$4t();Oge();Y4t();Q4t();Z_e();hve();qU();evt();ivt();rvt();M9e();lvt();dvt();P9e();R9e();Cvt();Tvt();B9e();Gyt();jyt();K9e();$9e();qyt();Xyt();Jyt();q9e();t_t();n_t();s_t();a_t();m9e();X9e();c_t();u_t();gTe();U9e();n6();f_t();KX();S_t();yZ();D_t();Q9e();k_t();P_t();F_t();O_t();eTe();aTe();cee();V_t();lTe();pTe();H_t();W_t();U_t();mTe();jP();vX();bTe();PH();xTe();$_t();Y_t();Z_t();Q_t();r5t();vTe();o5t();l5t();d5t();ien=[{path:"eventedit-new",component:nu,canActivate:[ur]},{path:"eventedit",component:nu,canActivate:[ur]},{path:"eventedit-eventId/:eventId",redirectTo:"e/:eventId",pathMatch:"full"},{path:"e/:eventId",component:nu,canActivate:[ur]},{path:"eventedit-jsondata/:jsondata",component:nu,canActivate:[ur]}],nen=[{path:"",redirectTo:"main",pathMatch:"full"},{path:"new-contact",component:n3t,canActivate:[ur]},{path:"debug",component:Ugt,canActivate:[ur]},{path:"studio-cash-report",component:oj,canActivate:[ur],data:{permission:"StudioCashReport"}},{path:"studio-cash-report-2",component:oj,canActivate:[ur],data:{permission:"StudioCashReport"}},{path:"backoffice",component:Pre,canActivate:[ur]},{path:"studio-cash-report/:studio",component:oj,canActivate:[ur],data:{permission:"StudioCashReport"}},{path:"studio-cash-report-2/:studio",component:oj,canActivate:[ur],data:{permission:"StudioCashReport"}},{path:"whats-app",component:j4t,canActivate:[ur]},{path:"add-contact",component:Kgt,canActivate:[ur]},{path:"inventory",component:vse,canActivate:[ur]},{path:"invoice-numbers",component:p3t,canActivate:[ur]},{path:"invoices",component:kre,canActivate:[ur]},{path:"logout",component:o9e},{path:"login",component:o9e},{path:"main",component:V9e,canActivate:[ur]},{path:"event-finder",component:WX,canActivate:[ur]},{path:"studio-fee",redirectTo:"studio-fee/",pathMatch:"full",data:{permission:"StudioFee"}},{path:"studio-fee/:month",component:Ore,canActivate:[ur],data:{permission:"StudioFee"}},{path:"year-finish",component:U3t,canActivate:[ur]},{path:"artist-edit",component:Xy,canActivate:[ur]},{path:"artists",component:Vre,canActivate:[ur]},{path:"brudi-tv",component:f3t},{path:"brudi-tv-dashboard",component:v3t,canActivate:[ur]},{path:"invoice-builder-pdf",component:N3t,canActivate:[ur]},{path:"users",component:YU,canActivate:[ur]},{path:"users/:userId",component:YU,canActivate:[ur]},{path:"invoice-form",component:UF,canActivate:[ur]},{path:"web-form-submits",component:Hre,canActivate:[ur]},{path:"qr",component:dee,canActivate:[ur]},{path:"subscription-test",component:X3t,canActivate:[ur]},{path:"web-form-submit-print/:id",component:J3t,canActivate:[ur],data:{hideVersionInfo:!0}},{path:"not-assigned-payments",component:Wre,canActivate:[ur]},{path:"whats-app-latest-messages",component:$F,canActivate:[ur]},{path:"discount-promotions",component:jre,canActivate:[ur]},{path:"discount-promotions-2",component:Yyt,canActivate:[ur]},{path:"admin",component:qre,canActivate:[ur],data:{permission:"SuperAdmin"}},{path:"chat/:id",component:h3,canActivate:[ur]},{path:"qr-test",component:Kq,canActivate:[ur]},{path:"search",component:I5,canActivate:[ur]},{path:"promo",component:Zre,canActivate:[ur]},{path:"roman",component:Qre,canActivate:[ur]},{path:"pre-payout",component:R4t,canActivate:[ur]},{path:"broadcast",component:L4t,canActivate:[ur],data:{permission:"WhatsAppBroadcast"}},{path:"events-view",component:rZ,canActivate:[ur]},{path:"articles",component:X4t,canActivate:[ur]},{path:"pb",component:nee,canActivate:[ur]},{path:"pu",component:jX,canActivate:[ur]},{path:"wis",component:Jre,canActivate:[ur]},{path:"wt",component:vS,canActivate:[ur]},{path:"current-artist-photo",component:tvt,canActivate:[ur]},{path:"win",component:nvt,canActivate:[ur]},{path:"pbuild",component:avt,canActivate:[ur]},{path:"text-templates",component:nse,canActivate:[ur]},{path:"e-history",component:JA,canActivate:[ur]},{path:"i-history",component:rse,canActivate:[ur]},{path:"dashboard",component:V9e,canActivate:[ur]},{path:"piercing-manager",component:Svt,canActivate:[ur]},{path:"reminders",component:ase,canActivate:[ur]},{path:"day-finish-log",component:mse,canActivate:[ur]},{path:"promoters",component:pse,canActivate:[ur]},{path:"whatsapp-insta-responses",component:Qyt,canActivate:[ur]},{path:"contacts-same-mobile",component:fse,canActivate:[ur]},{path:"print-gift-cards",component:i_t,canActivate:[ur]},{path:"ah",component:Nre,canActivate:[ur]},{path:"n-a-b-t",component:d_t,canActivate:[ur]},{path:"contacts",component:hse,canActivate:[ur]},{path:"calendar",component:w_t,canActivate:[ur],data:{permission:"Calendar"}},{path:"date-select",component:cA,canActivate:[ur]},{path:"klarna-orders",component:T_t,canActivate:[ur]},{path:"discount-gift-cards",component:yse,canActivate:[ur]},{path:"test",component:R_t},{path:"employees",component:_se,canActivate:[ur]},{path:"employee-calendar",component:Dse,canActivate:[ur]},{path:"events-rating",component:sw,canActivate:[ur]},{path:"events-rating/artist/:artist",component:sw,canActivate:[ur]},{path:"events-rating/:eventId",component:sw,canActivate:[ur]},{path:"messenger",component:N_t,canActivate:[ur]},{path:"employee-works",component:Ese,canActivate:[ur]},{path:"money-accounts",component:Mse,canActivate:[ur]},{path:"consent-check",component:z_t,canActivate:[ur]},{path:"klarna-disputes",component:G_t,canActivate:[ur]},{path:"artist-ratings",component:kse,canActivate:[ur]},{path:"video",component:$5,canActivate:[ur]},{path:"icloud",component:NA,canActivate:[ur]},{path:"photos",component:Rse,canActivate:[ur]},{path:"photo-editor",component:Px,canActivate:[ur]},{path:"photo-editor/:file-id",component:Px,canActivate:[ur]},{path:"event-filter",component:Pse,canActivate:[ur]},{path:"font-extractor",component:j_t,canActivate:[ur]},{path:"fonts",component:K_t,canActivate:[ur]},{path:"drive-migration",component:q_t,canActivate:[ur]},{path:"telegram-studio-social-media-start",component:X_t,canActivate:[ur]},{path:"map",component:n5t,canActivate:[ur]},{path:"chats-to-recheck",component:Ase,canActivate:[ur]},{path:"qr-code-generator",component:s5t,canActivate:[ur]},{path:"monitor",component:a5t,canActivate:[ur]},{path:"qonto-import",component:c5t,canActivate:[ur]},{path:"multi-view-2",component:A_t,canActivate:[ur],data:{hideVersionInfo:!0}},{path:"multi-view",component:M_t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"declarations-of-consent",component:e_t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"declarations-of-consent-piercing",component:r_t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"after-care-instruction-piercing",component:o_t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"after-care-instruction-tattoo",component:L_t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"xx",component:Ise,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"event-qr/:eventId",component:Nse,data:{disableSocket:!1,hideVersionInfo:!1}},{path:"event-qr-2/:eventId",component:Nse,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"event-qr-2/:model/:secret",component:Nse,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"event-qr-ok",component:N4t,data:{disableSocket:!1,hideVersionInfo:!1}},{path:"invoice-extern-studio-pdf",component:$3t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"invoice-2-pdf",component:m_t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"voucher-pdf",component:_3t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"tattoo-ticket-pdf",component:T3t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"inventory-to-order-print",component:l_t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"gift",component:c3t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"invoice-from-invoice-form-pdf",component:Y3t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"julian",component:qgt,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"logo",component:s3t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"receipt",component:a3t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"day-finish-report-2",component:Uyt,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"header-double-block",component:Ire,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"artists-links",component:iX,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"p/:studio/:id",component:K4t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"k/:studio/:id",component:Zyt,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"to-whatsapp",component:cvt,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"p/:id",component:J4t,data:{disableSocket:!0,hideVersionInfo:!0}},{path:"lazy",loadComponent:()=>import("./chunk-RZAHGXXR.js").then(t=>t.LazyComponent),data:{disableSocket:!0,hideVersionInfo:!0}}]});var zse,p5t=Q(()=>{zn();ESe();zse=class extends DSe{constructor(e){super(e)}format(e,n){return Ie.format(e,n)}}});var m5t,f5t=Q(()=>{Ld();me();m5t=(()=>{let e=class e{constructor(){this.noErrorList=["FirebaseError: Firebase: Access to this account has been temporarily disabled due to many failed login attempts","FirebaseError: Firebase: The password is invalid or the user does not have a password. (auth/wrong-password)","The provided value is non-finite"]}handleError(i){for(let r of this.noErrorList)if(i.message&&i.message.includes(r))return;i.message!=="nicht eingeloggt!"&&(i.message&&i.message.startsWith("Uncaught")&&(i.uncaught=!0,i.message=i.message.replace("Uncaught (in promise): ",""),i.message.startsWith("Object: ")&&(i.message=i.message.substr(8))),Gn.error("Uncaught",i))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=Et({token:e,factory:e.\u0275fac});let t=e;return t})()});var v5t=xr((g5t,Hse)=>{(function(t,e){"use strict";typeof Hse=="object"&&typeof Hse.exports=="object"?Hse.exports=t.document?e(t,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return e(n)}:e(t)})(typeof window<"u"?window:g5t,function(t,e){"use strict";var n=[],i=Object.getPrototypeOf,r=n.slice,s=n.flat?function(H){return n.flat.call(H)}:function(H){return n.concat.apply([],H)},o=n.push,a=n.indexOf,l={},c=l.toString,d=l.hasOwnProperty,u=d.toString,m=u.call(Object),f={},_=function(te){return typeof te=="function"&&typeof te.nodeType!="number"&&typeof te.item!="function"},x=function(te){return te!=null&&te===te.window},D=t.document,E={type:!0,src:!0,nonce:!0,noModule:!0};function M(H,te,ge){ge=ge||D;var ke,He,Ne=ge.createElement("script");if(Ne.text=H,te)for(ke in E)He=te[ke]||te.getAttribute&&te.getAttribute(ke),He&&Ne.setAttribute(ke,He);ge.head.appendChild(Ne).parentNode.removeChild(Ne)}function I(H){return H==null?H+"":typeof H=="object"||typeof H=="function"?l[c.call(H)]||"object":typeof H}var z="3.7.1",G=/HTML$/i,A=function(H,te){return new A.fn.init(H,te)};A.fn=A.prototype={jquery:z,constructor:A,length:0,toArray:function(){return r.call(this)},get:function(H){return H==null?r.call(this):H<0?this[H+this.length]:this[H]},pushStack:function(H){var te=A.merge(this.constructor(),H);return te.prevObject=this,te},each:function(H){return A.each(this,H)},map:function(H){return this.pushStack(A.map(this,function(te,ge){return H.call(te,ge,te)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,function(H,te){return(te+1)%2}))},odd:function(){return this.pushStack(A.grep(this,function(H,te){return te%2}))},eq:function(H){var te=this.length,ge=+H+(H<0?te:0);return this.pushStack(ge>=0&&ge<te?[this[ge]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:n.sort,splice:n.splice},A.extend=A.fn.extend=function(){var H,te,ge,ke,He,Ne,ct=arguments[0]||{},kt=1,Ht=arguments.length,hi=!1;for(typeof ct=="boolean"&&(hi=ct,ct=arguments[kt]||{},kt++),typeof ct!="object"&&!_(ct)&&(ct={}),kt===Ht&&(ct=this,kt--);kt<Ht;kt++)if((H=arguments[kt])!=null)for(te in H)ke=H[te],!(te==="__proto__"||ct===ke)&&(hi&&ke&&(A.isPlainObject(ke)||(He=Array.isArray(ke)))?(ge=ct[te],He&&!Array.isArray(ge)?Ne=[]:!He&&!A.isPlainObject(ge)?Ne={}:Ne=ge,He=!1,ct[te]=A.extend(hi,Ne,ke)):ke!==void 0&&(ct[te]=ke));return ct},A.extend({expando:"jQuery"+(z+Math.random()).replace(/\D/g,""),isReady:!0,error:function(H){throw new Error(H)},noop:function(){},isPlainObject:function(H){var te,ge;return!H||c.call(H)!=="[object Object]"?!1:(te=i(H),te?(ge=d.call(te,"constructor")&&te.constructor,typeof ge=="function"&&u.call(ge)===m):!0)},isEmptyObject:function(H){var te;for(te in H)return!1;return!0},globalEval:function(H,te,ge){M(H,{nonce:te&&te.nonce},ge)},each:function(H,te){var ge,ke=0;if(Y(H))for(ge=H.length;ke<ge&&te.call(H[ke],ke,H[ke])!==!1;ke++);else for(ke in H)if(te.call(H[ke],ke,H[ke])===!1)break;return H},text:function(H){var te,ge="",ke=0,He=H.nodeType;if(!He)for(;te=H[ke++];)ge+=A.text(te);return He===1||He===11?H.textContent:He===9?H.documentElement.textContent:He===3||He===4?H.nodeValue:ge},makeArray:function(H,te){var ge=te||[];return H!=null&&(Y(Object(H))?A.merge(ge,typeof H=="string"?[H]:H):o.call(ge,H)),ge},inArray:function(H,te,ge){return te==null?-1:a.call(te,H,ge)},isXMLDoc:function(H){var te=H&&H.namespaceURI,ge=H&&(H.ownerDocument||H).documentElement;return!G.test(te||ge&&ge.nodeName||"HTML")},merge:function(H,te){for(var ge=+te.length,ke=0,He=H.length;ke<ge;ke++)H[He++]=te[ke];return H.length=He,H},grep:function(H,te,ge){for(var ke,He=[],Ne=0,ct=H.length,kt=!ge;Ne<ct;Ne++)ke=!te(H[Ne],Ne),ke!==kt&&He.push(H[Ne]);return He},map:function(H,te,ge){var ke,He,Ne=0,ct=[];if(Y(H))for(ke=H.length;Ne<ke;Ne++)He=te(H[Ne],Ne,ge),He!=null&&ct.push(He);else for(Ne in H)He=te(H[Ne],Ne,ge),He!=null&&ct.push(He);return s(ct)},guid:1,support:f}),typeof Symbol=="function"&&(A.fn[Symbol.iterator]=n[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(H,te){l["[object "+te+"]"]=te.toLowerCase()});function Y(H){var te=!!H&&"length"in H&&H.length,ge=I(H);return _(H)||x(H)?!1:ge==="array"||te===0||typeof te=="number"&&te>0&&te-1 in H}function X(H,te){return H.nodeName&&H.nodeName.toLowerCase()===te.toLowerCase()}var ne=n.pop,pe=n.sort,ce=n.splice,ie="[\\x20\\t\\r\\n\\f]",le=new RegExp("^"+ie+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ie+"+$","g");A.contains=function(H,te){var ge=te&&te.parentNode;return H===ge||!!(ge&&ge.nodeType===1&&(H.contains?H.contains(ge):H.compareDocumentPosition&&H.compareDocumentPosition(ge)&16))};var Se=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function je(H,te){return te?H==="\0"?"\uFFFD":H.slice(0,-1)+"\\"+H.charCodeAt(H.length-1).toString(16)+" ":"\\"+H}A.escapeSelector=function(H){return(H+"").replace(Se,je)};var ze=D,Ge=o;(function(){var H,te,ge,ke,He,Ne=Ge,ct,kt,Ht,hi,Li,nn=A.expando,Ii=0,Oi=0,is=uu(),Io=uu(),Ao=uu(),sl=uu(),Ea=function(Mt,li){return Mt===li&&(He=!0),0},$d="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rd="(?:\\\\[\\da-fA-F]{1,6}"+ie+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Ro="\\["+ie+"*("+rd+")(?:"+ie+"*([*^$|!~]?=)"+ie+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+rd+"))|)"+ie+"*\\]",gc=":("+rd+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Ro+")*)|.*)\\)|)",ho=new RegExp(ie+"+","g"),Fo=new RegExp("^"+ie+"*,"+ie+"*"),zc=new RegExp("^"+ie+"*([>+~]|"+ie+")"+ie+"*"),Cd=new RegExp(ie+"|>"),Mc=new RegExp(gc),K=new RegExp("^"+rd+"$"),we={ID:new RegExp("^#("+rd+")"),CLASS:new RegExp("^\\.("+rd+")"),TAG:new RegExp("^("+rd+"|[*])"),ATTR:new RegExp("^"+Ro),PSEUDO:new RegExp("^"+gc),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ie+"*(even|odd|(([+-]|)(\\d*)n|)"+ie+"*(?:([+-]|)"+ie+"*(\\d+)|))"+ie+"*\\)|)","i"),bool:new RegExp("^(?:"+$d+")$","i"),needsContext:new RegExp("^"+ie+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ie+"*((?:-\\d)?\\d*)"+ie+"*\\)|)(?=[^-]|$)","i")},Oe=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,vi=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Bi=/[+~]/,jn=new RegExp("\\\\[\\da-fA-F]{1,6}"+ie+"?|\\\\([^\\r\\n\\f])","g"),Vr=function(Mt,li){var wi="0x"+Mt.slice(1)-65536;return li||(wi<0?String.fromCharCode(wi+65536):String.fromCharCode(wi>>10|55296,wi&1023|56320))},El=function(){jh()},Lo=Y0(function(Mt){return Mt.disabled===!0&&X(Mt,"fieldset")},{dir:"parentNode",next:"legend"});function Er(){try{return ct.activeElement}catch{}}try{Ne.apply(n=r.call(ze.childNodes),ze.childNodes),n[ze.childNodes.length].nodeType}catch{Ne={apply:function(li,wi){Ge.apply(li,r.call(wi))},call:function(li){Ge.apply(li,r.call(arguments,1))}}}function yo(Mt,li,wi,Fe){var dt,ht,ci,Ni,Qi,Br,hn,us=li&&li.ownerDocument,ns=li?li.nodeType:9;if(wi=wi||[],typeof Mt!="string"||!Mt||ns!==1&&ns!==9&&ns!==11)return wi;if(!Fe&&(jh(li),li=li||ct,Ht)){if(ns!==11&&(Qi=vi.exec(Mt)))if(dt=Qi[1]){if(ns===9)if(ci=li.getElementById(dt)){if(ci.id===dt)return Ne.call(wi,ci),wi}else return wi;else if(us&&(ci=us.getElementById(dt))&&yo.contains(li,ci)&&ci.id===dt)return Ne.call(wi,ci),wi}else{if(Qi[2])return Ne.apply(wi,li.getElementsByTagName(Mt)),wi;if((dt=Qi[3])&&li.getElementsByClassName)return Ne.apply(wi,li.getElementsByClassName(dt)),wi}if(!sl[Mt+" "]&&(!hi||!hi.test(Mt))){if(hn=Mt,us=li,ns===1&&(Cd.test(Mt)||zc.test(Mt))){for(us=Bi.test(Mt)&&Nf(li.parentNode)||li,(us!=li||!f.scope)&&((Ni=li.getAttribute("id"))?Ni=A.escapeSelector(Ni):li.setAttribute("id",Ni=nn)),Br=_l(Mt),ht=Br.length;ht--;)Br[ht]=(Ni?"#"+Ni:":scope")+" "+kc(Br[ht]);hn=Br.join(",")}try{return Ne.apply(wi,us.querySelectorAll(hn)),wi}catch{sl(Mt,!0)}finally{Ni===nn&&li.removeAttribute("id")}}}return q0(Mt.replace(le,"$1"),li,wi,Fe)}function uu(){var Mt=[];function li(wi,Fe){return Mt.push(wi+" ")>te.cacheLength&&delete li[Mt.shift()],li[wi+" "]=Fe}return li}function zl(Mt){return Mt[nn]=!0,Mt}function Mu(Mt){var li=ct.createElement("fieldset");try{return!!Mt(li)}catch{return!1}finally{li.parentNode&&li.parentNode.removeChild(li),li=null}}function Of(Mt){return function(li){return X(li,"input")&&li.type===Mt}}function K0(Mt){return function(li){return(X(li,"input")||X(li,"button"))&&li.type===Mt}}function Hc(Mt){return function(li){return"form"in li?li.parentNode&&li.disabled===!1?"label"in li?"label"in li.parentNode?li.parentNode.disabled===Mt:li.disabled===Mt:li.isDisabled===Mt||li.isDisabled!==!Mt&&Lo(li)===Mt:li.disabled===Mt:"label"in li?li.disabled===Mt:!1}}function Rd(Mt){return zl(function(li){return li=+li,zl(function(wi,Fe){for(var dt,ht=Mt([],wi.length,li),ci=ht.length;ci--;)wi[dt=ht[ci]]&&(wi[dt]=!(Fe[dt]=wi[dt]))})})}function Nf(Mt){return Mt&&typeof Mt.getElementsByTagName<"u"&&Mt}function jh(Mt){var li,wi=Mt?Mt.ownerDocument||Mt:ze;return wi==ct||wi.nodeType!==9||!wi.documentElement||(ct=wi,kt=ct.documentElement,Ht=!A.isXMLDoc(ct),Li=kt.matches||kt.webkitMatchesSelector||kt.msMatchesSelector,kt.msMatchesSelector&&ze!=ct&&(li=ct.defaultView)&&li.top!==li&&li.addEventListener("unload",El),f.getById=Mu(function(Fe){return kt.appendChild(Fe).id=A.expando,!ct.getElementsByName||!ct.getElementsByName(A.expando).length}),f.disconnectedMatch=Mu(function(Fe){return Li.call(Fe,"*")}),f.scope=Mu(function(){return ct.querySelectorAll(":scope")}),f.cssHas=Mu(function(){try{return ct.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),f.getById?(te.filter.ID=function(Fe){var dt=Fe.replace(jn,Vr);return function(ht){return ht.getAttribute("id")===dt}},te.find.ID=function(Fe,dt){if(typeof dt.getElementById<"u"&&Ht){var ht=dt.getElementById(Fe);return ht?[ht]:[]}}):(te.filter.ID=function(Fe){var dt=Fe.replace(jn,Vr);return function(ht){var ci=typeof ht.getAttributeNode<"u"&&ht.getAttributeNode("id");return ci&&ci.value===dt}},te.find.ID=function(Fe,dt){if(typeof dt.getElementById<"u"&&Ht){var ht,ci,Ni,Qi=dt.getElementById(Fe);if(Qi){if(ht=Qi.getAttributeNode("id"),ht&&ht.value===Fe)return[Qi];for(Ni=dt.getElementsByName(Fe),ci=0;Qi=Ni[ci++];)if(ht=Qi.getAttributeNode("id"),ht&&ht.value===Fe)return[Qi]}return[]}}),te.find.TAG=function(Fe,dt){return typeof dt.getElementsByTagName<"u"?dt.getElementsByTagName(Fe):dt.querySelectorAll(Fe)},te.find.CLASS=function(Fe,dt){if(typeof dt.getElementsByClassName<"u"&&Ht)return dt.getElementsByClassName(Fe)},hi=[],Mu(function(Fe){var dt;kt.appendChild(Fe).innerHTML="<a id='"+nn+"' href='' disabled='disabled'></a><select id='"+nn+"-\r\\' disabled='disabled'><option selected=''></option></select>",Fe.querySelectorAll("[selected]").length||hi.push("\\["+ie+"*(?:value|"+$d+")"),Fe.querySelectorAll("[id~="+nn+"-]").length||hi.push("~="),Fe.querySelectorAll("a#"+nn+"+*").length||hi.push(".#.+[+~]"),Fe.querySelectorAll(":checked").length||hi.push(":checked"),dt=ct.createElement("input"),dt.setAttribute("type","hidden"),Fe.appendChild(dt).setAttribute("name","D"),kt.appendChild(Fe).disabled=!0,Fe.querySelectorAll(":disabled").length!==2&&hi.push(":enabled",":disabled"),dt=ct.createElement("input"),dt.setAttribute("name",""),Fe.appendChild(dt),Fe.querySelectorAll("[name='']").length||hi.push("\\["+ie+"*name"+ie+"*="+ie+`*(?:''|"")`)}),f.cssHas||hi.push(":has"),hi=hi.length&&new RegExp(hi.join("|")),Ea=function(Fe,dt){if(Fe===dt)return He=!0,0;var ht=!Fe.compareDocumentPosition-!dt.compareDocumentPosition;return ht||(ht=(Fe.ownerDocument||Fe)==(dt.ownerDocument||dt)?Fe.compareDocumentPosition(dt):1,ht&1||!f.sortDetached&&dt.compareDocumentPosition(Fe)===ht?Fe===ct||Fe.ownerDocument==ze&&yo.contains(ze,Fe)?-1:dt===ct||dt.ownerDocument==ze&&yo.contains(ze,dt)?1:ke?a.call(ke,Fe)-a.call(ke,dt):0:ht&4?-1:1)}),ct}yo.matches=function(Mt,li){return yo(Mt,null,null,li)},yo.matchesSelector=function(Mt,li){if(jh(Mt),Ht&&!sl[li+" "]&&(!hi||!hi.test(li)))try{var wi=Li.call(Mt,li);if(wi||f.disconnectedMatch||Mt.document&&Mt.document.nodeType!==11)return wi}catch{sl(li,!0)}return yo(li,ct,null,[Mt]).length>0},yo.contains=function(Mt,li){return(Mt.ownerDocument||Mt)!=ct&&jh(Mt),A.contains(Mt,li)},yo.attr=function(Mt,li){(Mt.ownerDocument||Mt)!=ct&&jh(Mt);var wi=te.attrHandle[li.toLowerCase()],Fe=wi&&d.call(te.attrHandle,li.toLowerCase())?wi(Mt,li,!Ht):void 0;return Fe!==void 0?Fe:Mt.getAttribute(li)},yo.error=function(Mt){throw new Error("Syntax error, unrecognized expression: "+Mt)},A.uniqueSort=function(Mt){var li,wi=[],Fe=0,dt=0;if(He=!f.sortStable,ke=!f.sortStable&&r.call(Mt,0),pe.call(Mt,Ea),He){for(;li=Mt[dt++];)li===Mt[dt]&&(Fe=wi.push(dt));for(;Fe--;)ce.call(Mt,wi[Fe],1)}return ke=null,Mt},A.fn.uniqueSort=function(){return this.pushStack(A.uniqueSort(r.apply(this)))},te=A.expr={cacheLength:50,createPseudo:zl,match:we,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(Mt){return Mt[1]=Mt[1].replace(jn,Vr),Mt[3]=(Mt[3]||Mt[4]||Mt[5]||"").replace(jn,Vr),Mt[2]==="~="&&(Mt[3]=" "+Mt[3]+" "),Mt.slice(0,4)},CHILD:function(Mt){return Mt[1]=Mt[1].toLowerCase(),Mt[1].slice(0,3)==="nth"?(Mt[3]||yo.error(Mt[0]),Mt[4]=+(Mt[4]?Mt[5]+(Mt[6]||1):2*(Mt[3]==="even"||Mt[3]==="odd")),Mt[5]=+(Mt[7]+Mt[8]||Mt[3]==="odd")):Mt[3]&&yo.error(Mt[0]),Mt},PSEUDO:function(Mt){var li,wi=!Mt[6]&&Mt[2];return we.CHILD.test(Mt[0])?null:(Mt[3]?Mt[2]=Mt[4]||Mt[5]||"":wi&&Mc.test(wi)&&(li=_l(wi,!0))&&(li=wi.indexOf(")",wi.length-li)-wi.length)&&(Mt[0]=Mt[0].slice(0,li),Mt[2]=wi.slice(0,li)),Mt.slice(0,3))}},filter:{TAG:function(Mt){var li=Mt.replace(jn,Vr).toLowerCase();return Mt==="*"?function(){return!0}:function(wi){return X(wi,li)}},CLASS:function(Mt){var li=is[Mt+" "];return li||(li=new RegExp("(^|"+ie+")"+Mt+"("+ie+"|$)"))&&is(Mt,function(wi){return li.test(typeof wi.className=="string"&&wi.className||typeof wi.getAttribute<"u"&&wi.getAttribute("class")||"")})},ATTR:function(Mt,li,wi){return function(Fe){var dt=yo.attr(Fe,Mt);return dt==null?li==="!=":li?(dt+="",li==="="?dt===wi:li==="!="?dt!==wi:li==="^="?wi&&dt.indexOf(wi)===0:li==="*="?wi&&dt.indexOf(wi)>-1:li==="$="?wi&&dt.slice(-wi.length)===wi:li==="~="?(" "+dt.replace(ho," ")+" ").indexOf(wi)>-1:li==="|="?dt===wi||dt.slice(0,wi.length+1)===wi+"-":!1):!0}},CHILD:function(Mt,li,wi,Fe,dt){var ht=Mt.slice(0,3)!=="nth",ci=Mt.slice(-4)!=="last",Ni=li==="of-type";return Fe===1&&dt===0?function(Qi){return!!Qi.parentNode}:function(Qi,Br,hn){var us,ns,_r,xa,xd,Gl=ht!==ci?"nextSibling":"previousSibling",bd=Qi.parentNode,Fd=Ni&&Qi.nodeName.toLowerCase(),ss=!hn&&!Ni,hu=!1;if(bd){if(ht){for(;Gl;){for(_r=Qi;_r=_r[Gl];)if(Ni?X(_r,Fd):_r.nodeType===1)return!1;xd=Gl=Mt==="only"&&!xd&&"nextSibling"}return!0}if(xd=[ci?bd.firstChild:bd.lastChild],ci&&ss){for(ns=bd[nn]||(bd[nn]={}),us=ns[Mt]||[],xa=us[0]===Ii&&us[1],hu=xa&&us[2],_r=xa&&bd.childNodes[xa];_r=++xa&&_r&&_r[Gl]||(hu=xa=0)||xd.pop();)if(_r.nodeType===1&&++hu&&_r===Qi){ns[Mt]=[Ii,xa,hu];break}}else if(ss&&(ns=Qi[nn]||(Qi[nn]={}),us=ns[Mt]||[],xa=us[0]===Ii&&us[1],hu=xa),hu===!1)for(;(_r=++xa&&_r&&_r[Gl]||(hu=xa=0)||xd.pop())&&!((Ni?X(_r,Fd):_r.nodeType===1)&&++hu&&(ss&&(ns=_r[nn]||(_r[nn]={}),ns[Mt]=[Ii,hu]),_r===Qi)););return hu-=dt,hu===Fe||hu%Fe===0&&hu/Fe>=0}}},PSEUDO:function(Mt,li){var wi,Fe=te.pseudos[Mt]||te.setFilters[Mt.toLowerCase()]||yo.error("unsupported pseudo: "+Mt);return Fe[nn]?Fe(li):Fe.length>1?(wi=[Mt,Mt,"",li],te.setFilters.hasOwnProperty(Mt.toLowerCase())?zl(function(dt,ht){for(var ci,Ni=Fe(dt,li),Qi=Ni.length;Qi--;)ci=a.call(dt,Ni[Qi]),dt[ci]=!(ht[ci]=Ni[Qi])}):function(dt){return Fe(dt,0,wi)}):Fe}},pseudos:{not:zl(function(Mt){var li=[],wi=[],Fe=I1(Mt.replace(le,"$1"));return Fe[nn]?zl(function(dt,ht,ci,Ni){for(var Qi,Br=Fe(dt,null,Ni,[]),hn=dt.length;hn--;)(Qi=Br[hn])&&(dt[hn]=!(ht[hn]=Qi))}):function(dt,ht,ci){return li[0]=dt,Fe(li,null,ci,wi),li[0]=null,!wi.pop()}}),has:zl(function(Mt){return function(li){return yo(Mt,li).length>0}}),contains:zl(function(Mt){return Mt=Mt.replace(jn,Vr),function(li){return(li.textContent||A.text(li)).indexOf(Mt)>-1}}),lang:zl(function(Mt){return K.test(Mt||"")||yo.error("unsupported lang: "+Mt),Mt=Mt.replace(jn,Vr).toLowerCase(),function(li){var wi;do if(wi=Ht?li.lang:li.getAttribute("xml:lang")||li.getAttribute("lang"))return wi=wi.toLowerCase(),wi===Mt||wi.indexOf(Mt+"-")===0;while((li=li.parentNode)&&li.nodeType===1);return!1}}),target:function(Mt){var li=t.location&&t.location.hash;return li&&li.slice(1)===Mt.id},root:function(Mt){return Mt===kt},focus:function(Mt){return Mt===Er()&&ct.hasFocus()&&!!(Mt.type||Mt.href||~Mt.tabIndex)},enabled:Hc(!1),disabled:Hc(!0),checked:function(Mt){return X(Mt,"input")&&!!Mt.checked||X(Mt,"option")&&!!Mt.selected},selected:function(Mt){return Mt.parentNode&&Mt.parentNode.selectedIndex,Mt.selected===!0},empty:function(Mt){for(Mt=Mt.firstChild;Mt;Mt=Mt.nextSibling)if(Mt.nodeType<6)return!1;return!0},parent:function(Mt){return!te.pseudos.empty(Mt)},header:function(Mt){return mt.test(Mt.nodeName)},input:function(Mt){return Oe.test(Mt.nodeName)},button:function(Mt){return X(Mt,"input")&&Mt.type==="button"||X(Mt,"button")},text:function(Mt){var li;return X(Mt,"input")&&Mt.type==="text"&&((li=Mt.getAttribute("type"))==null||li.toLowerCase()==="text")},first:Rd(function(){return[0]}),last:Rd(function(Mt,li){return[li-1]}),eq:Rd(function(Mt,li,wi){return[wi<0?wi+li:wi]}),even:Rd(function(Mt,li){for(var wi=0;wi<li;wi+=2)Mt.push(wi);return Mt}),odd:Rd(function(Mt,li){for(var wi=1;wi<li;wi+=2)Mt.push(wi);return Mt}),lt:Rd(function(Mt,li,wi){var Fe;for(wi<0?Fe=wi+li:wi>li?Fe=li:Fe=wi;--Fe>=0;)Mt.push(Fe);return Mt}),gt:Rd(function(Mt,li,wi){for(var Fe=wi<0?wi+li:wi;++Fe<li;)Mt.push(Fe);return Mt})}},te.pseudos.nth=te.pseudos.eq;for(H in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})te.pseudos[H]=Of(H);for(H in{submit:!0,reset:!0})te.pseudos[H]=K0(H);function $h(){}$h.prototype=te.filters=te.pseudos,te.setFilters=new $h;function _l(Mt,li){var wi,Fe,dt,ht,ci,Ni,Qi,Br=Io[Mt+" "];if(Br)return li?0:Br.slice(0);for(ci=Mt,Ni=[],Qi=te.preFilter;ci;){(!wi||(Fe=Fo.exec(ci)))&&(Fe&&(ci=ci.slice(Fe[0].length)||ci),Ni.push(dt=[])),wi=!1,(Fe=zc.exec(ci))&&(wi=Fe.shift(),dt.push({value:wi,type:Fe[0].replace(le," ")}),ci=ci.slice(wi.length));for(ht in te.filter)(Fe=we[ht].exec(ci))&&(!Qi[ht]||(Fe=Qi[ht](Fe)))&&(wi=Fe.shift(),dt.push({value:wi,type:ht,matches:Fe}),ci=ci.slice(wi.length));if(!wi)break}return li?ci.length:ci?yo.error(Mt):Io(Mt,Ni).slice(0)}function kc(Mt){for(var li=0,wi=Mt.length,Fe="";li<wi;li++)Fe+=Mt[li].value;return Fe}function Y0(Mt,li,wi){var Fe=li.dir,dt=li.next,ht=dt||Fe,ci=wi&&ht==="parentNode",Ni=Oi++;return li.first?function(Qi,Br,hn){for(;Qi=Qi[Fe];)if(Qi.nodeType===1||ci)return Mt(Qi,Br,hn);return!1}:function(Qi,Br,hn){var us,ns,_r=[Ii,Ni];if(hn){for(;Qi=Qi[Fe];)if((Qi.nodeType===1||ci)&&Mt(Qi,Br,hn))return!0}else for(;Qi=Qi[Fe];)if(Qi.nodeType===1||ci)if(ns=Qi[nn]||(Qi[nn]={}),dt&&X(Qi,dt))Qi=Qi[Fe]||Qi;else{if((us=ns[ht])&&us[0]===Ii&&us[1]===Ni)return _r[2]=us[2];if(ns[ht]=_r,_r[2]=Mt(Qi,Br,hn))return!0}return!1}}function Up(Mt){return Mt.length>1?function(li,wi,Fe){for(var dt=Mt.length;dt--;)if(!Mt[dt](li,wi,Fe))return!1;return!0}:Mt[0]}function Kg(Mt,li,wi){for(var Fe=0,dt=li.length;Fe<dt;Fe++)yo(Mt,li[Fe],wi);return wi}function Hl(Mt,li,wi,Fe,dt){for(var ht,ci=[],Ni=0,Qi=Mt.length,Br=li!=null;Ni<Qi;Ni++)(ht=Mt[Ni])&&(!wi||wi(ht,Fe,dt))&&(ci.push(ht),Br&&li.push(Ni));return ci}function ol(Mt,li,wi,Fe,dt,ht){return Fe&&!Fe[nn]&&(Fe=ol(Fe)),dt&&!dt[nn]&&(dt=ol(dt,ht)),zl(function(ci,Ni,Qi,Br){var hn,us,ns,_r,xa=[],xd=[],Gl=Ni.length,bd=ci||Kg(li||"*",Qi.nodeType?[Qi]:Qi,[]),Fd=Mt&&(ci||!li)?Hl(bd,xa,Mt,Qi,Br):bd;if(wi?(_r=dt||(ci?Mt:Gl||Fe)?[]:Ni,wi(Fd,_r,Qi,Br)):_r=Fd,Fe)for(hn=Hl(_r,xd),Fe(hn,[],Qi,Br),us=hn.length;us--;)(ns=hn[us])&&(_r[xd[us]]=!(Fd[xd[us]]=ns));if(ci){if(dt||Mt){if(dt){for(hn=[],us=_r.length;us--;)(ns=_r[us])&&hn.push(Fd[us]=ns);dt(null,_r=[],hn,Br)}for(us=_r.length;us--;)(ns=_r[us])&&(hn=dt?a.call(ci,ns):xa[us])>-1&&(ci[hn]=!(Ni[hn]=ns))}}else _r=Hl(_r===Ni?_r.splice(Gl,_r.length):_r),dt?dt(null,Ni,_r,Br):Ne.apply(Ni,_r)})}function jp(Mt){for(var li,wi,Fe,dt=Mt.length,ht=te.relative[Mt[0].type],ci=ht||te.relative[" "],Ni=ht?1:0,Qi=Y0(function(us){return us===li},ci,!0),Br=Y0(function(us){return a.call(li,us)>-1},ci,!0),hn=[function(us,ns,_r){var xa=!ht&&(_r||ns!=ge)||((li=ns).nodeType?Qi(us,ns,_r):Br(us,ns,_r));return li=null,xa}];Ni<dt;Ni++)if(wi=te.relative[Mt[Ni].type])hn=[Y0(Up(hn),wi)];else{if(wi=te.filter[Mt[Ni].type].apply(null,Mt[Ni].matches),wi[nn]){for(Fe=++Ni;Fe<dt&&!te.relative[Mt[Fe].type];Fe++);return ol(Ni>1&&Up(hn),Ni>1&&kc(Mt.slice(0,Ni-1).concat({value:Mt[Ni-2].type===" "?"*":""})).replace(le,"$1"),wi,Ni<Fe&&jp(Mt.slice(Ni,Fe)),Fe<dt&&jp(Mt=Mt.slice(Fe)),Fe<dt&&kc(Mt))}hn.push(wi)}return Up(hn)}function F2(Mt,li){var wi=li.length>0,Fe=Mt.length>0,dt=function(ht,ci,Ni,Qi,Br){var hn,us,ns,_r=0,xa="0",xd=ht&&[],Gl=[],bd=ge,Fd=ht||Fe&&te.find.TAG("*",Br),ss=Ii+=bd==null?1:Math.random()||.1,hu=Fd.length;for(Br&&(ge=ci==ct||ci||Br);xa!==hu&&(hn=Fd[xa])!=null;xa++){if(Fe&&hn){for(us=0,!ci&&hn.ownerDocument!=ct&&(jh(hn),Ni=!Ht);ns=Mt[us++];)if(ns(hn,ci||ct,Ni)){Ne.call(Qi,hn);break}Br&&(Ii=ss)}wi&&((hn=!ns&&hn)&&_r--,ht&&xd.push(hn))}if(_r+=xa,wi&&xa!==_r){for(us=0;ns=li[us++];)ns(xd,Gl,ci,Ni);if(ht){if(_r>0)for(;xa--;)xd[xa]||Gl[xa]||(Gl[xa]=ne.call(Qi));Gl=Hl(Gl)}Ne.apply(Qi,Gl),Br&&!ht&&Gl.length>0&&_r+li.length>1&&A.uniqueSort(Qi)}return Br&&(Ii=ss,ge=bd),xd};return wi?zl(dt):dt}function I1(Mt,li){var wi,Fe=[],dt=[],ht=Ao[Mt+" "];if(!ht){for(li||(li=_l(Mt)),wi=li.length;wi--;)ht=jp(li[wi]),ht[nn]?Fe.push(ht):dt.push(ht);ht=Ao(Mt,F2(dt,Fe)),ht.selector=Mt}return ht}function q0(Mt,li,wi,Fe){var dt,ht,ci,Ni,Qi,Br=typeof Mt=="function"&&Mt,hn=!Fe&&_l(Mt=Br.selector||Mt);if(wi=wi||[],hn.length===1){if(ht=hn[0]=hn[0].slice(0),ht.length>2&&(ci=ht[0]).type==="ID"&&li.nodeType===9&&Ht&&te.relative[ht[1].type]){if(li=(te.find.ID(ci.matches[0].replace(jn,Vr),li)||[])[0],li)Br&&(li=li.parentNode);else return wi;Mt=Mt.slice(ht.shift().value.length)}for(dt=we.needsContext.test(Mt)?0:ht.length;dt--&&(ci=ht[dt],!te.relative[Ni=ci.type]);)if((Qi=te.find[Ni])&&(Fe=Qi(ci.matches[0].replace(jn,Vr),Bi.test(ht[0].type)&&Nf(li.parentNode)||li))){if(ht.splice(dt,1),Mt=Fe.length&&kc(ht),!Mt)return Ne.apply(wi,Fe),wi;break}}return(Br||I1(Mt,hn))(Fe,li,!Ht,wi,!li||Bi.test(Mt)&&Nf(li.parentNode)||li),wi}f.sortStable=nn.split("").sort(Ea).join("")===nn,jh(),f.sortDetached=Mu(function(Mt){return Mt.compareDocumentPosition(ct.createElement("fieldset"))&1}),A.find=yo,A.expr[":"]=A.expr.pseudos,A.unique=A.uniqueSort,yo.compile=I1,yo.select=q0,yo.setDocument=jh,yo.tokenize=_l,yo.escape=A.escapeSelector,yo.getText=A.text,yo.isXML=A.isXMLDoc,yo.selectors=A.expr,yo.support=A.support,yo.uniqueSort=A.uniqueSort})();var Ae=function(H,te,ge){for(var ke=[],He=ge!==void 0;(H=H[te])&&H.nodeType!==9;)if(H.nodeType===1){if(He&&A(H).is(ge))break;ke.push(H)}return ke},Ye=function(H,te){for(var ge=[];H;H=H.nextSibling)H.nodeType===1&&H!==te&&ge.push(H);return ge},ft=A.expr.match.needsContext,Ft=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Tt(H,te,ge){return _(te)?A.grep(H,function(ke,He){return!!te.call(ke,He,ke)!==ge}):te.nodeType?A.grep(H,function(ke){return ke===te!==ge}):typeof te!="string"?A.grep(H,function(ke){return a.call(te,ke)>-1!==ge}):A.filter(te,H,ge)}A.filter=function(H,te,ge){var ke=te[0];return ge&&(H=":not("+H+")"),te.length===1&&ke.nodeType===1?A.find.matchesSelector(ke,H)?[ke]:[]:A.find.matches(H,A.grep(te,function(He){return He.nodeType===1}))},A.fn.extend({find:function(H){var te,ge,ke=this.length,He=this;if(typeof H!="string")return this.pushStack(A(H).filter(function(){for(te=0;te<ke;te++)if(A.contains(He[te],this))return!0}));for(ge=this.pushStack([]),te=0;te<ke;te++)A.find(H,He[te],ge);return ke>1?A.uniqueSort(ge):ge},filter:function(H){return this.pushStack(Tt(this,H||[],!1))},not:function(H){return this.pushStack(Tt(this,H||[],!0))},is:function(H){return!!Tt(this,typeof H=="string"&&ft.test(H)?A(H):H||[],!1).length}});var at,yt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,_t=A.fn.init=function(H,te,ge){var ke,He;if(!H)return this;if(ge=ge||at,typeof H=="string")if(H[0]==="<"&&H[H.length-1]===">"&&H.length>=3?ke=[null,H,null]:ke=yt.exec(H),ke&&(ke[1]||!te))if(ke[1]){if(te=te instanceof A?te[0]:te,A.merge(this,A.parseHTML(ke[1],te&&te.nodeType?te.ownerDocument||te:D,!0)),Ft.test(ke[1])&&A.isPlainObject(te))for(ke in te)_(this[ke])?this[ke](te[ke]):this.attr(ke,te[ke]);return this}else return He=D.getElementById(ke[2]),He&&(this[0]=He,this.length=1),this;else return!te||te.jquery?(te||ge).find(H):this.constructor(te).find(H);else{if(H.nodeType)return this[0]=H,this.length=1,this;if(_(H))return ge.ready!==void 0?ge.ready(H):H(A)}return A.makeArray(H,this)};_t.prototype=A.fn,at=A(D);var Re=/^(?:parents|prev(?:Until|All))/,ot={children:!0,contents:!0,next:!0,prev:!0};A.fn.extend({has:function(H){var te=A(H,this),ge=te.length;return this.filter(function(){for(var ke=0;ke<ge;ke++)if(A.contains(this,te[ke]))return!0})},closest:function(H,te){var ge,ke=0,He=this.length,Ne=[],ct=typeof H!="string"&&A(H);if(!ft.test(H)){for(;ke<He;ke++)for(ge=this[ke];ge&&ge!==te;ge=ge.parentNode)if(ge.nodeType<11&&(ct?ct.index(ge)>-1:ge.nodeType===1&&A.find.matchesSelector(ge,H))){Ne.push(ge);break}}return this.pushStack(Ne.length>1?A.uniqueSort(Ne):Ne)},index:function(H){return H?typeof H=="string"?a.call(A(H),this[0]):a.call(this,H.jquery?H[0]:H):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(H,te){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(H,te))))},addBack:function(H){return this.add(H==null?this.prevObject:this.prevObject.filter(H))}});function jt(H,te){for(;(H=H[te])&&H.nodeType!==1;);return H}A.each({parent:function(H){var te=H.parentNode;return te&&te.nodeType!==11?te:null},parents:function(H){return Ae(H,"parentNode")},parentsUntil:function(H,te,ge){return Ae(H,"parentNode",ge)},next:function(H){return jt(H,"nextSibling")},prev:function(H){return jt(H,"previousSibling")},nextAll:function(H){return Ae(H,"nextSibling")},prevAll:function(H){return Ae(H,"previousSibling")},nextUntil:function(H,te,ge){return Ae(H,"nextSibling",ge)},prevUntil:function(H,te,ge){return Ae(H,"previousSibling",ge)},siblings:function(H){return Ye((H.parentNode||{}).firstChild,H)},children:function(H){return Ye(H.firstChild)},contents:function(H){return H.contentDocument!=null&&i(H.contentDocument)?H.contentDocument:(X(H,"template")&&(H=H.content||H),A.merge([],H.childNodes))}},function(H,te){A.fn[H]=function(ge,ke){var He=A.map(this,te,ge);return H.slice(-5)!=="Until"&&(ke=ge),ke&&typeof ke=="string"&&(He=A.filter(ke,He)),this.length>1&&(ot[H]||A.uniqueSort(He),Re.test(H)&&He.reverse()),this.pushStack(He)}});var zt=/[^\x20\t\r\n\f]+/g;function qt(H){var te={};return A.each(H.match(zt)||[],function(ge,ke){te[ke]=!0}),te}A.Callbacks=function(H){H=typeof H=="string"?qt(H):A.extend({},H);var te,ge,ke,He,Ne=[],ct=[],kt=-1,Ht=function(){for(He=He||H.once,ke=te=!0;ct.length;kt=-1)for(ge=ct.shift();++kt<Ne.length;)Ne[kt].apply(ge[0],ge[1])===!1&&H.stopOnFalse&&(kt=Ne.length,ge=!1);H.memory||(ge=!1),te=!1,He&&(ge?Ne=[]:Ne="")},hi={add:function(){return Ne&&(ge&&!te&&(kt=Ne.length-1,ct.push(ge)),function Li(nn){A.each(nn,function(Ii,Oi){_(Oi)?(!H.unique||!hi.has(Oi))&&Ne.push(Oi):Oi&&Oi.length&&I(Oi)!=="string"&&Li(Oi)})}(arguments),ge&&!te&&Ht()),this},remove:function(){return A.each(arguments,function(Li,nn){for(var Ii;(Ii=A.inArray(nn,Ne,Ii))>-1;)Ne.splice(Ii,1),Ii<=kt&&kt--}),this},has:function(Li){return Li?A.inArray(Li,Ne)>-1:Ne.length>0},empty:function(){return Ne&&(Ne=[]),this},disable:function(){return He=ct=[],Ne=ge="",this},disabled:function(){return!Ne},lock:function(){return He=ct=[],!ge&&!te&&(Ne=ge=""),this},locked:function(){return!!He},fireWith:function(Li,nn){return He||(nn=nn||[],nn=[Li,nn.slice?nn.slice():nn],ct.push(nn),te||Ht()),this},fire:function(){return hi.fireWith(this,arguments),this},fired:function(){return!!ke}};return hi};function ui(H){return H}function _i(H){throw H}function ln(H,te,ge,ke){var He;try{H&&_(He=H.promise)?He.call(H).done(te).fail(ge):H&&_(He=H.then)?He.call(H,te,ge):te.apply(void 0,[H].slice(ke))}catch(Ne){ge.apply(void 0,[Ne])}}A.extend({Deferred:function(H){var te=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],ge="pending",ke={state:function(){return ge},always:function(){return He.done(arguments).fail(arguments),this},catch:function(Ne){return ke.then(null,Ne)},pipe:function(){var Ne=arguments;return A.Deferred(function(ct){A.each(te,function(kt,Ht){var hi=_(Ne[Ht[4]])&&Ne[Ht[4]];He[Ht[1]](function(){var Li=hi&&hi.apply(this,arguments);Li&&_(Li.promise)?Li.promise().progress(ct.notify).done(ct.resolve).fail(ct.reject):ct[Ht[0]+"With"](this,hi?[Li]:arguments)})}),Ne=null}).promise()},then:function(Ne,ct,kt){var Ht=0;function hi(Li,nn,Ii,Oi){return function(){var is=this,Io=arguments,Ao=function(){var Ea,$d;if(!(Li<Ht)){if(Ea=Ii.apply(is,Io),Ea===nn.promise())throw new TypeError("Thenable self-resolution");$d=Ea&&(typeof Ea=="object"||typeof Ea=="function")&&Ea.then,_($d)?Oi?$d.call(Ea,hi(Ht,nn,ui,Oi),hi(Ht,nn,_i,Oi)):(Ht++,$d.call(Ea,hi(Ht,nn,ui,Oi),hi(Ht,nn,_i,Oi),hi(Ht,nn,ui,nn.notifyWith))):(Ii!==ui&&(is=void 0,Io=[Ea]),(Oi||nn.resolveWith)(is,Io))}},sl=Oi?Ao:function(){try{Ao()}catch(Ea){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(Ea,sl.error),Li+1>=Ht&&(Ii!==_i&&(is=void 0,Io=[Ea]),nn.rejectWith(is,Io))}};Li?sl():(A.Deferred.getErrorHook?sl.error=A.Deferred.getErrorHook():A.Deferred.getStackHook&&(sl.error=A.Deferred.getStackHook()),t.setTimeout(sl))}}return A.Deferred(function(Li){te[0][3].add(hi(0,Li,_(kt)?kt:ui,Li.notifyWith)),te[1][3].add(hi(0,Li,_(Ne)?Ne:ui)),te[2][3].add(hi(0,Li,_(ct)?ct:_i))}).promise()},promise:function(Ne){return Ne!=null?A.extend(Ne,ke):ke}},He={};return A.each(te,function(Ne,ct){var kt=ct[2],Ht=ct[5];ke[ct[1]]=kt.add,Ht&&kt.add(function(){ge=Ht},te[3-Ne][2].disable,te[3-Ne][3].disable,te[0][2].lock,te[0][3].lock),kt.add(ct[3].fire),He[ct[0]]=function(){return He[ct[0]+"With"](this===He?void 0:this,arguments),this},He[ct[0]+"With"]=kt.fireWith}),ke.promise(He),H&&H.call(He,He),He},when:function(H){var te=arguments.length,ge=te,ke=Array(ge),He=r.call(arguments),Ne=A.Deferred(),ct=function(kt){return function(Ht){ke[kt]=this,He[kt]=arguments.length>1?r.call(arguments):Ht,--te||Ne.resolveWith(ke,He)}};if(te<=1&&(ln(H,Ne.done(ct(ge)).resolve,Ne.reject,!te),Ne.state()==="pending"||_(He[ge]&&He[ge].then)))return Ne.then();for(;ge--;)ln(He[ge],ct(ge),Ne.reject);return Ne.promise()}});var Rn=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(H,te){t.console&&t.console.warn&&H&&Rn.test(H.name)&&t.console.warn("jQuery.Deferred exception: "+H.message,H.stack,te)},A.readyException=function(H){t.setTimeout(function(){throw H})};var bi=A.Deferred();A.fn.ready=function(H){return bi.then(H).catch(function(te){A.readyException(te)}),this},A.extend({isReady:!1,readyWait:1,ready:function(H){(H===!0?--A.readyWait:A.isReady)||(A.isReady=!0,!(H!==!0&&--A.readyWait>0)&&bi.resolveWith(D,[A]))}}),A.ready.then=bi.then;function Mn(){D.removeEventListener("DOMContentLoaded",Mn),t.removeEventListener("load",Mn),A.ready()}D.readyState==="complete"||D.readyState!=="loading"&&!D.documentElement.doScroll?t.setTimeout(A.ready):(D.addEventListener("DOMContentLoaded",Mn),t.addEventListener("load",Mn));var Fn=function(H,te,ge,ke,He,Ne,ct){var kt=0,Ht=H.length,hi=ge==null;if(I(ge)==="object"){He=!0;for(kt in ge)Fn(H,te,kt,ge[kt],!0,Ne,ct)}else if(ke!==void 0&&(He=!0,_(ke)||(ct=!0),hi&&(ct?(te.call(H,ke),te=null):(hi=te,te=function(Li,nn,Ii){return hi.call(A(Li),Ii)})),te))for(;kt<Ht;kt++)te(H[kt],ge,ct?ke:ke.call(H[kt],kt,te(H[kt],ge)));return He?H:hi?te.call(H):Ht?te(H[0],ge):Ne},or=/^-ms-/,wn=/-([a-z])/g;function gn(H,te){return te.toUpperCase()}function ts(H){return H.replace(or,"ms-").replace(wn,gn)}var no=function(H){return H.nodeType===1||H.nodeType===9||!+H.nodeType};function Ho(){this.expando=A.expando+Ho.uid++}Ho.uid=1,Ho.prototype={cache:function(H){var te=H[this.expando];return te||(te={},no(H)&&(H.nodeType?H[this.expando]=te:Object.defineProperty(H,this.expando,{value:te,configurable:!0}))),te},set:function(H,te,ge){var ke,He=this.cache(H);if(typeof te=="string")He[ts(te)]=ge;else for(ke in te)He[ts(ke)]=te[ke];return He},get:function(H,te){return te===void 0?this.cache(H):H[this.expando]&&H[this.expando][ts(te)]},access:function(H,te,ge){return te===void 0||te&&typeof te=="string"&&ge===void 0?this.get(H,te):(this.set(H,te,ge),ge!==void 0?ge:te)},remove:function(H,te){var ge,ke=H[this.expando];if(ke!==void 0){if(te!==void 0)for(Array.isArray(te)?te=te.map(ts):(te=ts(te),te=te in ke?[te]:te.match(zt)||[]),ge=te.length;ge--;)delete ke[te[ge]];(te===void 0||A.isEmptyObject(ke))&&(H.nodeType?H[this.expando]=void 0:delete H[this.expando])}},hasData:function(H){var te=H[this.expando];return te!==void 0&&!A.isEmptyObject(te)}};var kn=new Ho,Ts=new Ho,ea=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,co=/[A-Z]/g;function Zn(H){return H==="true"?!0:H==="false"?!1:H==="null"?null:H===+H+""?+H:ea.test(H)?JSON.parse(H):H}function gl(H,te,ge){var ke;if(ge===void 0&&H.nodeType===1)if(ke="data-"+te.replace(co,"-$&").toLowerCase(),ge=H.getAttribute(ke),typeof ge=="string"){try{ge=Zn(ge)}catch{}Ts.set(H,te,ge)}else ge=void 0;return ge}A.extend({hasData:function(H){return Ts.hasData(H)||kn.hasData(H)},data:function(H,te,ge){return Ts.access(H,te,ge)},removeData:function(H,te){Ts.remove(H,te)},_data:function(H,te,ge){return kn.access(H,te,ge)},_removeData:function(H,te){kn.remove(H,te)}}),A.fn.extend({data:function(H,te){var ge,ke,He,Ne=this[0],ct=Ne&&Ne.attributes;if(H===void 0){if(this.length&&(He=Ts.get(Ne),Ne.nodeType===1&&!kn.get(Ne,"hasDataAttrs"))){for(ge=ct.length;ge--;)ct[ge]&&(ke=ct[ge].name,ke.indexOf("data-")===0&&(ke=ts(ke.slice(5)),gl(Ne,ke,He[ke])));kn.set(Ne,"hasDataAttrs",!0)}return He}return typeof H=="object"?this.each(function(){Ts.set(this,H)}):Fn(this,function(kt){var Ht;if(Ne&&kt===void 0)return Ht=Ts.get(Ne,H),Ht!==void 0||(Ht=gl(Ne,H),Ht!==void 0)?Ht:void 0;this.each(function(){Ts.set(this,H,kt)})},null,te,arguments.length>1,null,!0)},removeData:function(H){return this.each(function(){Ts.remove(this,H)})}}),A.extend({queue:function(H,te,ge){var ke;if(H)return te=(te||"fx")+"queue",ke=kn.get(H,te),ge&&(!ke||Array.isArray(ge)?ke=kn.access(H,te,A.makeArray(ge)):ke.push(ge)),ke||[]},dequeue:function(H,te){te=te||"fx";var ge=A.queue(H,te),ke=ge.length,He=ge.shift(),Ne=A._queueHooks(H,te),ct=function(){A.dequeue(H,te)};He==="inprogress"&&(He=ge.shift(),ke--),He&&(te==="fx"&&ge.unshift("inprogress"),delete Ne.stop,He.call(H,ct,Ne)),!ke&&Ne&&Ne.empty.fire()},_queueHooks:function(H,te){var ge=te+"queueHooks";return kn.get(H,ge)||kn.access(H,ge,{empty:A.Callbacks("once memory").add(function(){kn.remove(H,[te+"queue",ge])})})}}),A.fn.extend({queue:function(H,te){var ge=2;return typeof H!="string"&&(te=H,H="fx",ge--),arguments.length<ge?A.queue(this[0],H):te===void 0?this:this.each(function(){var ke=A.queue(this,H,te);A._queueHooks(this,H),H==="fx"&&ke[0]!=="inprogress"&&A.dequeue(this,H)})},dequeue:function(H){return this.each(function(){A.dequeue(this,H)})},clearQueue:function(H){return this.queue(H||"fx",[])},promise:function(H,te){var ge,ke=1,He=A.Deferred(),Ne=this,ct=this.length,kt=function(){--ke||He.resolveWith(Ne,[Ne])};for(typeof H!="string"&&(te=H,H=void 0),H=H||"fx";ct--;)ge=kn.get(Ne[ct],H+"queueHooks"),ge&&ge.empty&&(ke++,ge.empty.add(kt));return kt(),He.promise(te)}});var sc=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Xl=new RegExp("^(?:([+-])=|)("+sc+")([a-z%]*)$","i"),Xs=["Top","Right","Bottom","Left"],Ya=D.documentElement,qa=function(H){return A.contains(H.ownerDocument,H)},Nl={composed:!0};Ya.getRootNode&&(qa=function(H){return A.contains(H.ownerDocument,H)||H.getRootNode(Nl)===H.ownerDocument});var zh=function(H,te){return H=te||H,H.style.display==="none"||H.style.display===""&&qa(H)&&A.css(H,"display")==="none"};function Hh(H,te,ge,ke){var He,Ne,ct=20,kt=ke?function(){return ke.cur()}:function(){return A.css(H,te,"")},Ht=kt(),hi=ge&&ge[3]||(A.cssNumber[te]?"":"px"),Li=H.nodeType&&(A.cssNumber[te]||hi!=="px"&&+Ht)&&Xl.exec(A.css(H,te));if(Li&&Li[3]!==hi){for(Ht=Ht/2,hi=hi||Li[3],Li=+Ht||1;ct--;)A.style(H,te,Li+hi),(1-Ne)*(1-(Ne=kt()/Ht||.5))<=0&&(ct=0),Li=Li/Ne;Li=Li*2,A.style(H,te,Li+hi),ge=ge||[]}return ge&&(Li=+Li||+Ht||0,He=ge[1]?Li+(ge[1]+1)*ge[2]:+ge[2],ke&&(ke.unit=hi,ke.start=Li,ke.end=He)),He}var Rf={};function Id(H){var te,ge=H.ownerDocument,ke=H.nodeName,He=Rf[ke];return He||(te=ge.body.appendChild(ge.createElement(ke)),He=A.css(te,"display"),te.parentNode.removeChild(te),He==="none"&&(He="block"),Rf[ke]=He,He)}function aa(H,te){for(var ge,ke,He=[],Ne=0,ct=H.length;Ne<ct;Ne++)ke=H[Ne],ke.style&&(ge=ke.style.display,te?(ge==="none"&&(He[Ne]=kn.get(ke,"display")||null,He[Ne]||(ke.style.display="")),ke.style.display===""&&zh(ke)&&(He[Ne]=Id(ke))):ge!=="none"&&(He[Ne]="none",kn.set(ke,"display",ge)));for(Ne=0;Ne<ct;Ne++)He[Ne]!=null&&(H[Ne].style.display=He[Ne]);return H}A.fn.extend({show:function(){return aa(this,!0)},hide:function(){return aa(this)},toggle:function(H){return typeof H=="boolean"?H?this.show():this.hide():this.each(function(){zh(this)?A(this).show():A(this).hide()})}});var jd=/^(?:checkbox|radio)$/i,du=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,$i=/^$|^module$|\/(?:java|ecma)script/i;(function(){var H=D.createDocumentFragment(),te=H.appendChild(D.createElement("div")),ge=D.createElement("input");ge.setAttribute("type","radio"),ge.setAttribute("checked","checked"),ge.setAttribute("name","t"),te.appendChild(ge),f.checkClone=te.cloneNode(!0).cloneNode(!0).lastChild.checked,te.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!te.cloneNode(!0).lastChild.defaultValue,te.innerHTML="<option></option>",f.option=!!te.lastChild})();var md={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};md.tbody=md.tfoot=md.colgroup=md.caption=md.thead,md.th=md.td,f.option||(md.optgroup=md.option=[1,"<select multiple='multiple'>","</select>"]);function Vl(H,te){var ge;return typeof H.getElementsByTagName<"u"?ge=H.getElementsByTagName(te||"*"):typeof H.querySelectorAll<"u"?ge=H.querySelectorAll(te||"*"):ge=[],te===void 0||te&&X(H,te)?A.merge([H],ge):ge}function Tl(H,te){for(var ge=0,ke=H.length;ge<ke;ge++)kn.set(H[ge],"globalEval",!te||kn.get(te[ge],"globalEval"))}var ja=/<|&#?\w+;/;function Dr(H,te,ge,ke,He){for(var Ne,ct,kt,Ht,hi,Li,nn=te.createDocumentFragment(),Ii=[],Oi=0,is=H.length;Oi<is;Oi++)if(Ne=H[Oi],Ne||Ne===0)if(I(Ne)==="object")A.merge(Ii,Ne.nodeType?[Ne]:Ne);else if(!ja.test(Ne))Ii.push(te.createTextNode(Ne));else{for(ct=ct||nn.appendChild(te.createElement("div")),kt=(du.exec(Ne)||["",""])[1].toLowerCase(),Ht=md[kt]||md._default,ct.innerHTML=Ht[1]+A.htmlPrefilter(Ne)+Ht[2],Li=Ht[0];Li--;)ct=ct.lastChild;A.merge(Ii,ct.childNodes),ct=nn.firstChild,ct.textContent=""}for(nn.textContent="",Oi=0;Ne=Ii[Oi++];){if(ke&&A.inArray(Ne,ke)>-1){He&&He.push(Ne);continue}if(hi=qa(Ne),ct=Vl(nn.appendChild(Ne),"script"),hi&&Tl(ct),ge)for(Li=0;Ne=ct[Li++];)$i.test(Ne.type||"")&&ge.push(Ne)}return nn}var Ad=/^([^.]*)(?:\.(.+)|)/;function ds(){return!0}function _a(){return!1}function fd(H,te,ge,ke,He,Ne){var ct,kt;if(typeof te=="object"){typeof ge!="string"&&(ke=ke||ge,ge=void 0);for(kt in te)fd(H,kt,ge,ke,te[kt],Ne);return H}if(ke==null&&He==null?(He=ge,ke=ge=void 0):He==null&&(typeof ge=="string"?(He=ke,ke=void 0):(He=ke,ke=ge,ge=void 0)),He===!1)He=_a;else if(!He)return H;return Ne===1&&(ct=He,He=function(Ht){return A().off(Ht),ct.apply(this,arguments)},He.guid=ct.guid||(ct.guid=A.guid++)),H.each(function(){A.event.add(this,te,He,ke,ge)})}A.event={global:{},add:function(H,te,ge,ke,He){var Ne,ct,kt,Ht,hi,Li,nn,Ii,Oi,is,Io,Ao=kn.get(H);if(no(H))for(ge.handler&&(Ne=ge,ge=Ne.handler,He=Ne.selector),He&&A.find.matchesSelector(Ya,He),ge.guid||(ge.guid=A.guid++),(Ht=Ao.events)||(Ht=Ao.events=Object.create(null)),(ct=Ao.handle)||(ct=Ao.handle=function(sl){return typeof A<"u"&&A.event.triggered!==sl.type?A.event.dispatch.apply(H,arguments):void 0}),te=(te||"").match(zt)||[""],hi=te.length;hi--;)kt=Ad.exec(te[hi])||[],Oi=Io=kt[1],is=(kt[2]||"").split(".").sort(),Oi&&(nn=A.event.special[Oi]||{},Oi=(He?nn.delegateType:nn.bindType)||Oi,nn=A.event.special[Oi]||{},Li=A.extend({type:Oi,origType:Io,data:ke,handler:ge,guid:ge.guid,selector:He,needsContext:He&&A.expr.match.needsContext.test(He),namespace:is.join(".")},Ne),(Ii=Ht[Oi])||(Ii=Ht[Oi]=[],Ii.delegateCount=0,(!nn.setup||nn.setup.call(H,ke,is,ct)===!1)&&H.addEventListener&&H.addEventListener(Oi,ct)),nn.add&&(nn.add.call(H,Li),Li.handler.guid||(Li.handler.guid=ge.guid)),He?Ii.splice(Ii.delegateCount++,0,Li):Ii.push(Li),A.event.global[Oi]=!0)},remove:function(H,te,ge,ke,He){var Ne,ct,kt,Ht,hi,Li,nn,Ii,Oi,is,Io,Ao=kn.hasData(H)&&kn.get(H);if(!(!Ao||!(Ht=Ao.events))){for(te=(te||"").match(zt)||[""],hi=te.length;hi--;){if(kt=Ad.exec(te[hi])||[],Oi=Io=kt[1],is=(kt[2]||"").split(".").sort(),!Oi){for(Oi in Ht)A.event.remove(H,Oi+te[hi],ge,ke,!0);continue}for(nn=A.event.special[Oi]||{},Oi=(ke?nn.delegateType:nn.bindType)||Oi,Ii=Ht[Oi]||[],kt=kt[2]&&new RegExp("(^|\\.)"+is.join("\\.(?:.*\\.|)")+"(\\.|$)"),ct=Ne=Ii.length;Ne--;)Li=Ii[Ne],(He||Io===Li.origType)&&(!ge||ge.guid===Li.guid)&&(!kt||kt.test(Li.namespace))&&(!ke||ke===Li.selector||ke==="**"&&Li.selector)&&(Ii.splice(Ne,1),Li.selector&&Ii.delegateCount--,nn.remove&&nn.remove.call(H,Li));ct&&!Ii.length&&((!nn.teardown||nn.teardown.call(H,is,Ao.handle)===!1)&&A.removeEvent(H,Oi,Ao.handle),delete Ht[Oi])}A.isEmptyObject(Ht)&&kn.remove(H,"handle events")}},dispatch:function(H){var te,ge,ke,He,Ne,ct,kt=new Array(arguments.length),Ht=A.event.fix(H),hi=(kn.get(this,"events")||Object.create(null))[Ht.type]||[],Li=A.event.special[Ht.type]||{};for(kt[0]=Ht,te=1;te<arguments.length;te++)kt[te]=arguments[te];if(Ht.delegateTarget=this,!(Li.preDispatch&&Li.preDispatch.call(this,Ht)===!1)){for(ct=A.event.handlers.call(this,Ht,hi),te=0;(He=ct[te++])&&!Ht.isPropagationStopped();)for(Ht.currentTarget=He.elem,ge=0;(Ne=He.handlers[ge++])&&!Ht.isImmediatePropagationStopped();)(!Ht.rnamespace||Ne.namespace===!1||Ht.rnamespace.test(Ne.namespace))&&(Ht.handleObj=Ne,Ht.data=Ne.data,ke=((A.event.special[Ne.origType]||{}).handle||Ne.handler).apply(He.elem,kt),ke!==void 0&&(Ht.result=ke)===!1&&(Ht.preventDefault(),Ht.stopPropagation()));return Li.postDispatch&&Li.postDispatch.call(this,Ht),Ht.result}},handlers:function(H,te){var ge,ke,He,Ne,ct,kt=[],Ht=te.delegateCount,hi=H.target;if(Ht&&hi.nodeType&&!(H.type==="click"&&H.button>=1)){for(;hi!==this;hi=hi.parentNode||this)if(hi.nodeType===1&&!(H.type==="click"&&hi.disabled===!0)){for(Ne=[],ct={},ge=0;ge<Ht;ge++)ke=te[ge],He=ke.selector+" ",ct[He]===void 0&&(ct[He]=ke.needsContext?A(He,this).index(hi)>-1:A.find(He,this,null,[hi]).length),ct[He]&&Ne.push(ke);Ne.length&&kt.push({elem:hi,handlers:Ne})}}return hi=this,Ht<te.length&&kt.push({elem:hi,handlers:te.slice(Ht)}),kt},addProp:function(H,te){Object.defineProperty(A.Event.prototype,H,{enumerable:!0,configurable:!0,get:_(te)?function(){if(this.originalEvent)return te(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[H]},set:function(ge){Object.defineProperty(this,H,{enumerable:!0,configurable:!0,writable:!0,value:ge})}})},fix:function(H){return H[A.expando]?H:new A.Event(H)},special:{load:{noBubble:!0},click:{setup:function(H){var te=this||H;return jd.test(te.type)&&te.click&&X(te,"input")&&fr(te,"click",!0),!1},trigger:function(H){var te=this||H;return jd.test(te.type)&&te.click&&X(te,"input")&&fr(te,"click"),!0},_default:function(H){var te=H.target;return jd.test(te.type)&&te.click&&X(te,"input")&&kn.get(te,"click")||X(te,"a")}},beforeunload:{postDispatch:function(H){H.result!==void 0&&H.originalEvent&&(H.originalEvent.returnValue=H.result)}}}};function fr(H,te,ge){if(!ge){kn.get(H,te)===void 0&&A.event.add(H,te,ds);return}kn.set(H,te,!1),A.event.add(H,te,{namespace:!1,handler:function(ke){var He,Ne=kn.get(this,te);if(ke.isTrigger&1&&this[te]){if(Ne)(A.event.special[te]||{}).delegateType&&ke.stopPropagation();else if(Ne=r.call(arguments),kn.set(this,te,Ne),this[te](),He=kn.get(this,te),kn.set(this,te,!1),Ne!==He)return ke.stopImmediatePropagation(),ke.preventDefault(),He}else Ne&&(kn.set(this,te,A.event.trigger(Ne[0],Ne.slice(1),this)),ke.stopPropagation(),ke.isImmediatePropagationStopped=ds)}})}A.removeEvent=function(H,te,ge){H.removeEventListener&&H.removeEventListener(te,ge)},A.Event=function(H,te){if(!(this instanceof A.Event))return new A.Event(H,te);H&&H.type?(this.originalEvent=H,this.type=H.type,this.isDefaultPrevented=H.defaultPrevented||H.defaultPrevented===void 0&&H.returnValue===!1?ds:_a,this.target=H.target&&H.target.nodeType===3?H.target.parentNode:H.target,this.currentTarget=H.currentTarget,this.relatedTarget=H.relatedTarget):this.type=H,te&&A.extend(this,te),this.timeStamp=H&&H.timeStamp||Date.now(),this[A.expando]=!0},A.Event.prototype={constructor:A.Event,isDefaultPrevented:_a,isPropagationStopped:_a,isImmediatePropagationStopped:_a,isSimulated:!1,preventDefault:function(){var H=this.originalEvent;this.isDefaultPrevented=ds,H&&!this.isSimulated&&H.preventDefault()},stopPropagation:function(){var H=this.originalEvent;this.isPropagationStopped=ds,H&&!this.isSimulated&&H.stopPropagation()},stopImmediatePropagation:function(){var H=this.originalEvent;this.isImmediatePropagationStopped=ds,H&&!this.isSimulated&&H.stopImmediatePropagation(),this.stopPropagation()}},A.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},function(H,te){function ge(ke){if(D.documentMode){var He=kn.get(this,"handle"),Ne=A.event.fix(ke);Ne.type=ke.type==="focusin"?"focus":"blur",Ne.isSimulated=!0,He(ke),Ne.target===Ne.currentTarget&&He(Ne)}else A.event.simulate(te,ke.target,A.event.fix(ke))}A.event.special[H]={setup:function(){var ke;if(fr(this,H,!0),D.documentMode)ke=kn.get(this,te),ke||this.addEventListener(te,ge),kn.set(this,te,(ke||0)+1);else return!1},trigger:function(){return fr(this,H),!0},teardown:function(){var ke;if(D.documentMode)ke=kn.get(this,te)-1,ke?kn.set(this,te,ke):(this.removeEventListener(te,ge),kn.remove(this,te));else return!1},_default:function(ke){return kn.get(ke.target,H)},delegateType:te},A.event.special[te]={setup:function(){var ke=this.ownerDocument||this.document||this,He=D.documentMode?this:ke,Ne=kn.get(He,te);Ne||(D.documentMode?this.addEventListener(te,ge):ke.addEventListener(H,ge,!0)),kn.set(He,te,(Ne||0)+1)},teardown:function(){var ke=this.ownerDocument||this.document||this,He=D.documentMode?this:ke,Ne=kn.get(He,te)-1;Ne?kn.set(He,te,Ne):(D.documentMode?this.removeEventListener(te,ge):ke.removeEventListener(H,ge,!0),kn.remove(He,te))}}}),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(H,te){A.event.special[H]={delegateType:te,bindType:te,handle:function(ge){var ke,He=this,Ne=ge.relatedTarget,ct=ge.handleObj;return(!Ne||Ne!==He&&!A.contains(He,Ne))&&(ge.type=ct.origType,ke=ct.handler.apply(this,arguments),ge.type=te),ke}}}),A.fn.extend({on:function(H,te,ge,ke){return fd(this,H,te,ge,ke)},one:function(H,te,ge,ke){return fd(this,H,te,ge,ke,1)},off:function(H,te,ge){var ke,He;if(H&&H.preventDefault&&H.handleObj)return ke=H.handleObj,A(H.delegateTarget).off(ke.namespace?ke.origType+"."+ke.namespace:ke.origType,ke.selector,ke.handler),this;if(typeof H=="object"){for(He in H)this.off(He,te,H[He]);return this}return(te===!1||typeof te=="function")&&(ge=te,te=void 0),ge===!1&&(ge=_a),this.each(function(){A.event.remove(this,H,ge,te)})}});var Qs=/<script|<style|<link/i,Nr=/checked\s*(?:[^=]|=\s*.checked.)/i,Ql=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function ro(H,te){return X(H,"table")&&X(te.nodeType!==11?te:te.firstChild,"tr")&&A(H).children("tbody")[0]||H}function Ra(H){return H.type=(H.getAttribute("type")!==null)+"/"+H.type,H}function Ta(H){return(H.type||"").slice(0,5)==="true/"?H.type=H.type.slice(5):H.removeAttribute("type"),H}function $a(H,te){var ge,ke,He,Ne,ct,kt,Ht;if(te.nodeType===1){if(kn.hasData(H)&&(Ne=kn.get(H),Ht=Ne.events,Ht)){kn.remove(te,"handle events");for(He in Ht)for(ge=0,ke=Ht[He].length;ge<ke;ge++)A.event.add(te,He,Ht[He][ge])}Ts.hasData(H)&&(ct=Ts.access(H),kt=A.extend({},ct),Ts.set(te,kt))}}function Da(H,te){var ge=te.nodeName.toLowerCase();ge==="input"&&jd.test(H.type)?te.checked=H.checked:(ge==="input"||ge==="textarea")&&(te.defaultValue=H.defaultValue)}function Gh(H,te,ge,ke){te=s(te);var He,Ne,ct,kt,Ht,hi,Li=0,nn=H.length,Ii=nn-1,Oi=te[0],is=_(Oi);if(is||nn>1&&typeof Oi=="string"&&!f.checkClone&&Nr.test(Oi))return H.each(function(Io){var Ao=H.eq(Io);is&&(te[0]=Oi.call(this,Io,Ao.html())),Gh(Ao,te,ge,ke)});if(nn&&(He=Dr(te,H[0].ownerDocument,!1,H,ke),Ne=He.firstChild,He.childNodes.length===1&&(He=Ne),Ne||ke)){for(ct=A.map(Vl(He,"script"),Ra),kt=ct.length;Li<nn;Li++)Ht=He,Li!==Ii&&(Ht=A.clone(Ht,!0,!0),kt&&A.merge(ct,Vl(Ht,"script"))),ge.call(H[Li],Ht,Li);if(kt)for(hi=ct[ct.length-1].ownerDocument,A.map(ct,Ta),Li=0;Li<kt;Li++)Ht=ct[Li],$i.test(Ht.type||"")&&!kn.access(Ht,"globalEval")&&A.contains(hi,Ht)&&(Ht.src&&(Ht.type||"").toLowerCase()!=="module"?A._evalUrl&&!Ht.noModule&&A._evalUrl(Ht.src,{nonce:Ht.nonce||Ht.getAttribute("nonce")},hi):M(Ht.textContent.replace(Ql,""),Ht,hi))}return H}function Ti(H,te,ge){for(var ke,He=te?A.filter(te,H):H,Ne=0;(ke=He[Ne])!=null;Ne++)!ge&&ke.nodeType===1&&A.cleanData(Vl(ke)),ke.parentNode&&(ge&&qa(ke)&&Tl(Vl(ke,"script")),ke.parentNode.removeChild(ke));return H}A.extend({htmlPrefilter:function(H){return H},clone:function(H,te,ge){var ke,He,Ne,ct,kt=H.cloneNode(!0),Ht=qa(H);if(!f.noCloneChecked&&(H.nodeType===1||H.nodeType===11)&&!A.isXMLDoc(H))for(ct=Vl(kt),Ne=Vl(H),ke=0,He=Ne.length;ke<He;ke++)Da(Ne[ke],ct[ke]);if(te)if(ge)for(Ne=Ne||Vl(H),ct=ct||Vl(kt),ke=0,He=Ne.length;ke<He;ke++)$a(Ne[ke],ct[ke]);else $a(H,kt);return ct=Vl(kt,"script"),ct.length>0&&Tl(ct,!Ht&&Vl(H,"script")),kt},cleanData:function(H){for(var te,ge,ke,He=A.event.special,Ne=0;(ge=H[Ne])!==void 0;Ne++)if(no(ge)){if(te=ge[kn.expando]){if(te.events)for(ke in te.events)He[ke]?A.event.remove(ge,ke):A.removeEvent(ge,ke,te.handle);ge[kn.expando]=void 0}ge[Ts.expando]&&(ge[Ts.expando]=void 0)}}}),A.fn.extend({detach:function(H){return Ti(this,H,!0)},remove:function(H){return Ti(this,H)},text:function(H){return Fn(this,function(te){return te===void 0?A.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=te)})},null,H,arguments.length)},append:function(){return Gh(this,arguments,function(H){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var te=ro(this,H);te.appendChild(H)}})},prepend:function(){return Gh(this,arguments,function(H){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var te=ro(this,H);te.insertBefore(H,te.firstChild)}})},before:function(){return Gh(this,arguments,function(H){this.parentNode&&this.parentNode.insertBefore(H,this)})},after:function(){return Gh(this,arguments,function(H){this.parentNode&&this.parentNode.insertBefore(H,this.nextSibling)})},empty:function(){for(var H,te=0;(H=this[te])!=null;te++)H.nodeType===1&&(A.cleanData(Vl(H,!1)),H.textContent="");return this},clone:function(H,te){return H=H??!1,te=te??H,this.map(function(){return A.clone(this,H,te)})},html:function(H){return Fn(this,function(te){var ge=this[0]||{},ke=0,He=this.length;if(te===void 0&&ge.nodeType===1)return ge.innerHTML;if(typeof te=="string"&&!Qs.test(te)&&!md[(du.exec(te)||["",""])[1].toLowerCase()]){te=A.htmlPrefilter(te);try{for(;ke<He;ke++)ge=this[ke]||{},ge.nodeType===1&&(A.cleanData(Vl(ge,!1)),ge.innerHTML=te);ge=0}catch{}}ge&&this.empty().append(te)},null,H,arguments.length)},replaceWith:function(){var H=[];return Gh(this,arguments,function(te){var ge=this.parentNode;A.inArray(this,H)<0&&(A.cleanData(Vl(this)),ge&&ge.replaceChild(te,this))},H)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(H,te){A.fn[H]=function(ge){for(var ke,He=[],Ne=A(ge),ct=Ne.length-1,kt=0;kt<=ct;kt++)ke=kt===ct?this:this.clone(!0),A(Ne[kt])[te](ke),o.apply(He,ke.get());return this.pushStack(He)}});var Hs=new RegExp("^("+sc+")(?!px)[a-z%]+$","i"),Eo=/^--/,Mo=function(H){var te=H.ownerDocument.defaultView;return(!te||!te.opener)&&(te=t),te.getComputedStyle(H)},Js=function(H,te,ge){var ke,He,Ne={};for(He in te)Ne[He]=H.style[He],H.style[He]=te[He];ke=ge.call(H);for(He in te)H.style[He]=Ne[He];return ke},td=new RegExp(Xs.join("|"),"i");(function(){function H(){if(hi){Ht.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",hi.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ya.appendChild(Ht).appendChild(hi);var Li=t.getComputedStyle(hi);ge=Li.top!=="1%",kt=te(Li.marginLeft)===12,hi.style.right="60%",Ne=te(Li.right)===36,ke=te(Li.width)===36,hi.style.position="absolute",He=te(hi.offsetWidth/3)===12,Ya.removeChild(Ht),hi=null}}function te(Li){return Math.round(parseFloat(Li))}var ge,ke,He,Ne,ct,kt,Ht=D.createElement("div"),hi=D.createElement("div");hi.style&&(hi.style.backgroundClip="content-box",hi.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle=hi.style.backgroundClip==="content-box",A.extend(f,{boxSizingReliable:function(){return H(),ke},pixelBoxStyles:function(){return H(),Ne},pixelPosition:function(){return H(),ge},reliableMarginLeft:function(){return H(),kt},scrollboxSize:function(){return H(),He},reliableTrDimensions:function(){var Li,nn,Ii,Oi;return ct==null&&(Li=D.createElement("table"),nn=D.createElement("tr"),Ii=D.createElement("div"),Li.style.cssText="position:absolute;left:-11111px;border-collapse:separate",nn.style.cssText="box-sizing:content-box;border:1px solid",nn.style.height="1px",Ii.style.height="9px",Ii.style.display="block",Ya.appendChild(Li).appendChild(nn).appendChild(Ii),Oi=t.getComputedStyle(nn),ct=parseInt(Oi.height,10)+parseInt(Oi.borderTopWidth,10)+parseInt(Oi.borderBottomWidth,10)===nn.offsetHeight,Ya.removeChild(Li)),ct}}))})();function Ec(H,te,ge){var ke,He,Ne,ct,kt=Eo.test(te),Ht=H.style;return ge=ge||Mo(H),ge&&(ct=ge.getPropertyValue(te)||ge[te],kt&&ct&&(ct=ct.replace(le,"$1")||void 0),ct===""&&!qa(H)&&(ct=A.style(H,te)),!f.pixelBoxStyles()&&Hs.test(ct)&&td.test(te)&&(ke=Ht.width,He=Ht.minWidth,Ne=Ht.maxWidth,Ht.minWidth=Ht.maxWidth=Ht.width=ct,ct=ge.width,Ht.width=ke,Ht.minWidth=He,Ht.maxWidth=Ne)),ct!==void 0?ct+"":ct}function Wh(H,te){return{get:function(){if(H()){delete this.get;return}return(this.get=te).apply(this,arguments)}}}var gd=["Webkit","Moz","ms"],eo=D.createElement("div").style,Tu={};function dp(H){for(var te=H[0].toUpperCase()+H.slice(1),ge=gd.length;ge--;)if(H=gd[ge]+te,H in eo)return H}function vd(H){var te=A.cssProps[H]||Tu[H];return te||(H in eo?H:Tu[H]=dp(H)||H)}var ch=/^(none|table(?!-c[ea]).+)/,T1={position:"absolute",visibility:"hidden",display:"block"},Wm={letterSpacing:"0",fontWeight:"400"};function ia(H,te,ge){var ke=Xl.exec(te);return ke?Math.max(0,ke[2]-(ge||0))+(ke[3]||"px"):te}function Fa(H,te,ge,ke,He,Ne){var ct=te==="width"?1:0,kt=0,Ht=0,hi=0;if(ge===(ke?"border":"content"))return 0;for(;ct<4;ct+=2)ge==="margin"&&(hi+=A.css(H,ge+Xs[ct],!0,He)),ke?(ge==="content"&&(Ht-=A.css(H,"padding"+Xs[ct],!0,He)),ge!=="margin"&&(Ht-=A.css(H,"border"+Xs[ct]+"Width",!0,He))):(Ht+=A.css(H,"padding"+Xs[ct],!0,He),ge!=="padding"?Ht+=A.css(H,"border"+Xs[ct]+"Width",!0,He):kt+=A.css(H,"border"+Xs[ct]+"Width",!0,He));return!ke&&Ne>=0&&(Ht+=Math.max(0,Math.ceil(H["offset"+te[0].toUpperCase()+te.slice(1)]-Ne-Ht-kt-.5))||0),Ht+hi}function up(H,te,ge){var ke=Mo(H),He=!f.boxSizingReliable()||ge,Ne=He&&A.css(H,"boxSizing",!1,ke)==="border-box",ct=Ne,kt=Ec(H,te,ke),Ht="offset"+te[0].toUpperCase()+te.slice(1);if(Hs.test(kt)){if(!ge)return kt;kt="auto"}return(!f.boxSizingReliable()&&Ne||!f.reliableTrDimensions()&&X(H,"tr")||kt==="auto"||!parseFloat(kt)&&A.css(H,"display",!1,ke)==="inline")&&H.getClientRects().length&&(Ne=A.css(H,"boxSizing",!1,ke)==="border-box",ct=Ht in H,ct&&(kt=H[Ht])),kt=parseFloat(kt)||0,kt+Fa(H,te,ge||(Ne?"border":"content"),ct,ke,kt)+"px"}A.extend({cssHooks:{opacity:{get:function(H,te){if(te){var ge=Ec(H,"opacity");return ge===""?"1":ge}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(H,te,ge,ke){if(!(!H||H.nodeType===3||H.nodeType===8||!H.style)){var He,Ne,ct,kt=ts(te),Ht=Eo.test(te),hi=H.style;if(Ht||(te=vd(kt)),ct=A.cssHooks[te]||A.cssHooks[kt],ge!==void 0){if(Ne=typeof ge,Ne==="string"&&(He=Xl.exec(ge))&&He[1]&&(ge=Hh(H,te,He),Ne="number"),ge==null||ge!==ge)return;Ne==="number"&&!Ht&&(ge+=He&&He[3]||(A.cssNumber[kt]?"":"px")),!f.clearCloneStyle&&ge===""&&te.indexOf("background")===0&&(hi[te]="inherit"),(!ct||!("set"in ct)||(ge=ct.set(H,ge,ke))!==void 0)&&(Ht?hi.setProperty(te,ge):hi[te]=ge)}else return ct&&"get"in ct&&(He=ct.get(H,!1,ke))!==void 0?He:hi[te]}},css:function(H,te,ge,ke){var He,Ne,ct,kt=ts(te),Ht=Eo.test(te);return Ht||(te=vd(kt)),ct=A.cssHooks[te]||A.cssHooks[kt],ct&&"get"in ct&&(He=ct.get(H,!0,ge)),He===void 0&&(He=Ec(H,te,ke)),He==="normal"&&te in Wm&&(He=Wm[te]),ge===""||ge?(Ne=parseFloat(He),ge===!0||isFinite(Ne)?Ne||0:He):He}}),A.each(["height","width"],function(H,te){A.cssHooks[te]={get:function(ge,ke,He){if(ke)return ch.test(A.css(ge,"display"))&&(!ge.getClientRects().length||!ge.getBoundingClientRect().width)?Js(ge,T1,function(){return up(ge,te,He)}):up(ge,te,He)},set:function(ge,ke,He){var Ne,ct=Mo(ge),kt=!f.scrollboxSize()&&ct.position==="absolute",Ht=kt||He,hi=Ht&&A.css(ge,"boxSizing",!1,ct)==="border-box",Li=He?Fa(ge,te,He,hi,ct):0;return hi&&kt&&(Li-=Math.ceil(ge["offset"+te[0].toUpperCase()+te.slice(1)]-parseFloat(ct[te])-Fa(ge,te,"border",!1,ct)-.5)),Li&&(Ne=Xl.exec(ke))&&(Ne[3]||"px")!=="px"&&(ge.style[te]=ke,ke=A.css(ge,te)),ia(ge,ke,Li)}}}),A.cssHooks.marginLeft=Wh(f.reliableMarginLeft,function(H,te){if(te)return(parseFloat(Ec(H,"marginLeft"))||H.getBoundingClientRect().left-Js(H,{marginLeft:0},function(){return H.getBoundingClientRect().left}))+"px"}),A.each({margin:"",padding:"",border:"Width"},function(H,te){A.cssHooks[H+te]={expand:function(ge){for(var ke=0,He={},Ne=typeof ge=="string"?ge.split(" "):[ge];ke<4;ke++)He[H+Xs[ke]+te]=Ne[ke]||Ne[ke-2]||Ne[0];return He}},H!=="margin"&&(A.cssHooks[H+te].set=ia)}),A.fn.extend({css:function(H,te){return Fn(this,function(ge,ke,He){var Ne,ct,kt={},Ht=0;if(Array.isArray(ke)){for(Ne=Mo(ge),ct=ke.length;Ht<ct;Ht++)kt[ke[Ht]]=A.css(ge,ke[Ht],!1,Ne);return kt}return He!==void 0?A.style(ge,ke,He):A.css(ge,ke)},H,te,arguments.length>1)}});function vl(H,te,ge,ke,He){return new vl.prototype.init(H,te,ge,ke,He)}A.Tween=vl,vl.prototype={constructor:vl,init:function(H,te,ge,ke,He,Ne){this.elem=H,this.prop=ge,this.easing=He||A.easing._default,this.options=te,this.start=this.now=this.cur(),this.end=ke,this.unit=Ne||(A.cssNumber[ge]?"":"px")},cur:function(){var H=vl.propHooks[this.prop];return H&&H.get?H.get(this):vl.propHooks._default.get(this)},run:function(H){var te,ge=vl.propHooks[this.prop];return this.options.duration?this.pos=te=A.easing[this.easing](H,this.options.duration*H,0,1,this.options.duration):this.pos=te=H,this.now=(this.end-this.start)*te+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),ge&&ge.set?ge.set(this):vl.propHooks._default.set(this),this}},vl.prototype.init.prototype=vl.prototype,vl.propHooks={_default:{get:function(H){var te;return H.elem.nodeType!==1||H.elem[H.prop]!=null&&H.elem.style[H.prop]==null?H.elem[H.prop]:(te=A.css(H.elem,H.prop,""),!te||te==="auto"?0:te)},set:function(H){A.fx.step[H.prop]?A.fx.step[H.prop](H):H.elem.nodeType===1&&(A.cssHooks[H.prop]||H.elem.style[vd(H.prop)]!=null)?A.style(H.elem,H.prop,H.now+H.unit):H.elem[H.prop]=H.now}}},vl.propHooks.scrollTop=vl.propHooks.scrollLeft={set:function(H){H.elem.nodeType&&H.elem.parentNode&&(H.elem[H.prop]=H.now)}},A.easing={linear:function(H){return H},swing:function(H){return .5-Math.cos(H*Math.PI)/2},_default:"swing"},A.fx=vl.prototype.init,A.fx.step={};var Jl,Du,uo=/^(?:toggle|show|hide)$/,yl=/queueHooks$/;function Bp(){Du&&(D.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Bp):t.setTimeout(Bp,A.fx.interval),A.fx.tick())}function zp(){return t.setTimeout(function(){Jl=void 0}),Jl=Date.now()}function id(H,te){var ge,ke=0,He={height:H};for(te=te?1:0;ke<4;ke+=2-te)ge=Xs[ke],He["margin"+ge]=He["padding"+ge]=H;return te&&(He.opacity=He.width=H),He}function Bc(H,te,ge){for(var ke,He=(bo.tweeners[te]||[]).concat(bo.tweeners["*"]),Ne=0,ct=He.length;Ne<ct;Ne++)if(ke=He[Ne].call(ge,te,H))return ke}function ec(H,te,ge){var ke,He,Ne,ct,kt,Ht,hi,Li,nn="width"in te||"height"in te,Ii=this,Oi={},is=H.style,Io=H.nodeType&&zh(H),Ao=kn.get(H,"fxshow");ge.queue||(ct=A._queueHooks(H,"fx"),ct.unqueued==null&&(ct.unqueued=0,kt=ct.empty.fire,ct.empty.fire=function(){ct.unqueued||kt()}),ct.unqueued++,Ii.always(function(){Ii.always(function(){ct.unqueued--,A.queue(H,"fx").length||ct.empty.fire()})}));for(ke in te)if(He=te[ke],uo.test(He)){if(delete te[ke],Ne=Ne||He==="toggle",He===(Io?"hide":"show"))if(He==="show"&&Ao&&Ao[ke]!==void 0)Io=!0;else continue;Oi[ke]=Ao&&Ao[ke]||A.style(H,ke)}if(Ht=!A.isEmptyObject(te),!(!Ht&&A.isEmptyObject(Oi))){nn&&H.nodeType===1&&(ge.overflow=[is.overflow,is.overflowX,is.overflowY],hi=Ao&&Ao.display,hi==null&&(hi=kn.get(H,"display")),Li=A.css(H,"display"),Li==="none"&&(hi?Li=hi:(aa([H],!0),hi=H.style.display||hi,Li=A.css(H,"display"),aa([H]))),(Li==="inline"||Li==="inline-block"&&hi!=null)&&A.css(H,"float")==="none"&&(Ht||(Ii.done(function(){is.display=hi}),hi==null&&(Li=is.display,hi=Li==="none"?"":Li)),is.display="inline-block")),ge.overflow&&(is.overflow="hidden",Ii.always(function(){is.overflow=ge.overflow[0],is.overflowX=ge.overflow[1],is.overflowY=ge.overflow[2]})),Ht=!1;for(ke in Oi)Ht||(Ao?"hidden"in Ao&&(Io=Ao.hidden):Ao=kn.access(H,"fxshow",{display:hi}),Ne&&(Ao.hidden=!Io),Io&&aa([H],!0),Ii.done(function(){Io||aa([H]),kn.remove(H,"fxshow");for(ke in Oi)A.style(H,ke,Oi[ke])})),Ht=Bc(Io?Ao[ke]:0,ke,Ii),ke in Ao||(Ao[ke]=Ht.start,Io&&(Ht.end=Ht.start,Ht.start=0))}}function yd(H,te){var ge,ke,He,Ne,ct;for(ge in H)if(ke=ts(ge),He=te[ke],Ne=H[ge],Array.isArray(Ne)&&(He=Ne[1],Ne=H[ge]=Ne[0]),ge!==ke&&(H[ke]=Ne,delete H[ge]),ct=A.cssHooks[ke],ct&&"expand"in ct){Ne=ct.expand(Ne),delete H[ke];for(ge in Ne)ge in H||(H[ge]=Ne[ge],te[ge]=He)}else te[ke]=He}function bo(H,te,ge){var ke,He,Ne=0,ct=bo.prefilters.length,kt=A.Deferred().always(function(){delete Ht.elem}),Ht=function(){if(He)return!1;for(var nn=Jl||zp(),Ii=Math.max(0,hi.startTime+hi.duration-nn),Oi=Ii/hi.duration||0,is=1-Oi,Io=0,Ao=hi.tweens.length;Io<Ao;Io++)hi.tweens[Io].run(is);return kt.notifyWith(H,[hi,is,Ii]),is<1&&Ao?Ii:(Ao||kt.notifyWith(H,[hi,1,0]),kt.resolveWith(H,[hi]),!1)},hi=kt.promise({elem:H,props:A.extend({},te),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},ge),originalProperties:te,originalOptions:ge,startTime:Jl||zp(),duration:ge.duration,tweens:[],createTween:function(nn,Ii){var Oi=A.Tween(H,hi.opts,nn,Ii,hi.opts.specialEasing[nn]||hi.opts.easing);return hi.tweens.push(Oi),Oi},stop:function(nn){var Ii=0,Oi=nn?hi.tweens.length:0;if(He)return this;for(He=!0;Ii<Oi;Ii++)hi.tweens[Ii].run(1);return nn?(kt.notifyWith(H,[hi,1,0]),kt.resolveWith(H,[hi,nn])):kt.rejectWith(H,[hi,nn]),this}}),Li=hi.props;for(yd(Li,hi.opts.specialEasing);Ne<ct;Ne++)if(ke=bo.prefilters[Ne].call(hi,H,Li,hi.opts),ke)return _(ke.stop)&&(A._queueHooks(hi.elem,hi.opts.queue).stop=ke.stop.bind(ke)),ke;return A.map(Li,Bc,hi),_(hi.opts.start)&&hi.opts.start.call(H,hi),hi.progress(hi.opts.progress).done(hi.opts.done,hi.opts.complete).fail(hi.opts.fail).always(hi.opts.always),A.fx.timer(A.extend(Ht,{elem:H,anim:hi,queue:hi.opts.queue})),hi}A.Animation=A.extend(bo,{tweeners:{"*":[function(H,te){var ge=this.createTween(H,te);return Hh(ge.elem,H,Xl.exec(te),ge),ge}]},tweener:function(H,te){_(H)?(te=H,H=["*"]):H=H.match(zt);for(var ge,ke=0,He=H.length;ke<He;ke++)ge=H[ke],bo.tweeners[ge]=bo.tweeners[ge]||[],bo.tweeners[ge].unshift(te)},prefilters:[ec],prefilter:function(H,te){te?bo.prefilters.unshift(H):bo.prefilters.push(H)}}),A.speed=function(H,te,ge){var ke=H&&typeof H=="object"?A.extend({},H):{complete:ge||!ge&&te||_(H)&&H,duration:H,easing:ge&&te||te&&!_(te)&&te};return A.fx.off?ke.duration=0:typeof ke.duration!="number"&&(ke.duration in A.fx.speeds?ke.duration=A.fx.speeds[ke.duration]:ke.duration=A.fx.speeds._default),(ke.queue==null||ke.queue===!0)&&(ke.queue="fx"),ke.old=ke.complete,ke.complete=function(){_(ke.old)&&ke.old.call(this),ke.queue&&A.dequeue(this,ke.queue)},ke},A.fn.extend({fadeTo:function(H,te,ge,ke){return this.filter(zh).css("opacity",0).show().end().animate({opacity:te},H,ge,ke)},animate:function(H,te,ge,ke){var He=A.isEmptyObject(H),Ne=A.speed(te,ge,ke),ct=function(){var kt=bo(this,A.extend({},H),Ne);(He||kn.get(this,"finish"))&&kt.stop(!0)};return ct.finish=ct,He||Ne.queue===!1?this.each(ct):this.queue(Ne.queue,ct)},stop:function(H,te,ge){var ke=function(He){var Ne=He.stop;delete He.stop,Ne(ge)};return typeof H!="string"&&(ge=te,te=H,H=void 0),te&&this.queue(H||"fx",[]),this.each(function(){var He=!0,Ne=H!=null&&H+"queueHooks",ct=A.timers,kt=kn.get(this);if(Ne)kt[Ne]&&kt[Ne].stop&&ke(kt[Ne]);else for(Ne in kt)kt[Ne]&&kt[Ne].stop&&yl.test(Ne)&&ke(kt[Ne]);for(Ne=ct.length;Ne--;)ct[Ne].elem===this&&(H==null||ct[Ne].queue===H)&&(ct[Ne].anim.stop(ge),He=!1,ct.splice(Ne,1));(He||!ge)&&A.dequeue(this,H)})},finish:function(H){return H!==!1&&(H=H||"fx"),this.each(function(){var te,ge=kn.get(this),ke=ge[H+"queue"],He=ge[H+"queueHooks"],Ne=A.timers,ct=ke?ke.length:0;for(ge.finish=!0,A.queue(this,H,[]),He&&He.stop&&He.stop.call(this,!0),te=Ne.length;te--;)Ne[te].elem===this&&Ne[te].queue===H&&(Ne[te].anim.stop(!0),Ne.splice(te,1));for(te=0;te<ct;te++)ke[te]&&ke[te].finish&&ke[te].finish.call(this);delete ge.finish})}}),A.each(["toggle","show","hide"],function(H,te){var ge=A.fn[te];A.fn[te]=function(ke,He,Ne){return ke==null||typeof ke=="boolean"?ge.apply(this,arguments):this.animate(id(te,!0),ke,He,Ne)}}),A.each({slideDown:id("show"),slideUp:id("hide"),slideToggle:id("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(H,te){A.fn[H]=function(ge,ke,He){return this.animate(te,ge,ke,He)}}),A.timers=[],A.fx.tick=function(){var H,te=0,ge=A.timers;for(Jl=Date.now();te<ge.length;te++)H=ge[te],!H()&&ge[te]===H&&ge.splice(te--,1);ge.length||A.fx.stop(),Jl=void 0},A.fx.timer=function(H){A.timers.push(H),A.fx.start()},A.fx.interval=13,A.fx.start=function(){Du||(Du=!0,Bp())},A.fx.stop=function(){Du=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(H,te){return H=A.fx&&A.fx.speeds[H]||H,te=te||"fx",this.queue(te,function(ge,ke){var He=t.setTimeout(ge,H);ke.stop=function(){t.clearTimeout(He)}})},function(){var H=D.createElement("input"),te=D.createElement("select"),ge=te.appendChild(D.createElement("option"));H.type="checkbox",f.checkOn=H.value!=="",f.optSelected=ge.selected,H=D.createElement("input"),H.value="t",H.type="radio",f.radioValue=H.value==="t"}();var ba,Bl=A.expr.attrHandle;A.fn.extend({attr:function(H,te){return Fn(this,A.attr,H,te,arguments.length>1)},removeAttr:function(H){return this.each(function(){A.removeAttr(this,H)})}}),A.extend({attr:function(H,te,ge){var ke,He,Ne=H.nodeType;if(!(Ne===3||Ne===8||Ne===2)){if(typeof H.getAttribute>"u")return A.prop(H,te,ge);if((Ne!==1||!A.isXMLDoc(H))&&(He=A.attrHooks[te.toLowerCase()]||(A.expr.match.bool.test(te)?ba:void 0)),ge!==void 0){if(ge===null){A.removeAttr(H,te);return}return He&&"set"in He&&(ke=He.set(H,ge,te))!==void 0?ke:(H.setAttribute(te,ge+""),ge)}return He&&"get"in He&&(ke=He.get(H,te))!==null?ke:(ke=A.find.attr(H,te),ke??void 0)}},attrHooks:{type:{set:function(H,te){if(!f.radioValue&&te==="radio"&&X(H,"input")){var ge=H.value;return H.setAttribute("type",te),ge&&(H.value=ge),te}}}},removeAttr:function(H,te){var ge,ke=0,He=te&&te.match(zt);if(He&&H.nodeType===1)for(;ge=He[ke++];)H.removeAttribute(ge)}}),ba={set:function(H,te,ge){return te===!1?A.removeAttr(H,ge):H.setAttribute(ge,ge),ge}},A.each(A.expr.match.bool.source.match(/\w+/g),function(H,te){var ge=Bl[te]||A.find.attr;Bl[te]=function(ke,He,Ne){var ct,kt,Ht=He.toLowerCase();return Ne||(kt=Bl[Ht],Bl[Ht]=ct,ct=ge(ke,He,Ne)!=null?Ht:null,Bl[Ht]=kt),ct}});var Yo=/^(?:input|select|textarea|button)$/i,dh=/^(?:a|area)$/i;A.fn.extend({prop:function(H,te){return Fn(this,A.prop,H,te,arguments.length>1)},removeProp:function(H){return this.each(function(){delete this[A.propFix[H]||H]})}}),A.extend({prop:function(H,te,ge){var ke,He,Ne=H.nodeType;if(!(Ne===3||Ne===8||Ne===2))return(Ne!==1||!A.isXMLDoc(H))&&(te=A.propFix[te]||te,He=A.propHooks[te]),ge!==void 0?He&&"set"in He&&(ke=He.set(H,ge,te))!==void 0?ke:H[te]=ge:He&&"get"in He&&(ke=He.get(H,te))!==null?ke:H[te]},propHooks:{tabIndex:{get:function(H){var te=A.find.attr(H,"tabindex");return te?parseInt(te,10):Yo.test(H.nodeName)||dh.test(H.nodeName)&&H.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(A.propHooks.selected={get:function(H){var te=H.parentNode;return te&&te.parentNode&&te.parentNode.selectedIndex,null},set:function(H){var te=H.parentNode;te&&(te.selectedIndex,te.parentNode&&te.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){A.propFix[this.toLowerCase()]=this});function mc(H){var te=H.match(zt)||[];return te.join(" ")}function Pd(H){return H.getAttribute&&H.getAttribute("class")||""}function ju(H){return Array.isArray(H)?H:typeof H=="string"?H.match(zt)||[]:[]}A.fn.extend({addClass:function(H){var te,ge,ke,He,Ne,ct;return _(H)?this.each(function(kt){A(this).addClass(H.call(this,kt,Pd(this)))}):(te=ju(H),te.length?this.each(function(){if(ke=Pd(this),ge=this.nodeType===1&&" "+mc(ke)+" ",ge){for(Ne=0;Ne<te.length;Ne++)He=te[Ne],ge.indexOf(" "+He+" ")<0&&(ge+=He+" ");ct=mc(ge),ke!==ct&&this.setAttribute("class",ct)}}):this)},removeClass:function(H){var te,ge,ke,He,Ne,ct;return _(H)?this.each(function(kt){A(this).removeClass(H.call(this,kt,Pd(this)))}):arguments.length?(te=ju(H),te.length?this.each(function(){if(ke=Pd(this),ge=this.nodeType===1&&" "+mc(ke)+" ",ge){for(Ne=0;Ne<te.length;Ne++)for(He=te[Ne];ge.indexOf(" "+He+" ")>-1;)ge=ge.replace(" "+He+" "," ");ct=mc(ge),ke!==ct&&this.setAttribute("class",ct)}}):this):this.attr("class","")},toggleClass:function(H,te){var ge,ke,He,Ne,ct=typeof H,kt=ct==="string"||Array.isArray(H);return _(H)?this.each(function(Ht){A(this).toggleClass(H.call(this,Ht,Pd(this),te),te)}):typeof te=="boolean"&&kt?te?this.addClass(H):this.removeClass(H):(ge=ju(H),this.each(function(){if(kt)for(Ne=A(this),He=0;He<ge.length;He++)ke=ge[He],Ne.hasClass(ke)?Ne.removeClass(ke):Ne.addClass(ke);else(H===void 0||ct==="boolean")&&(ke=Pd(this),ke&&kn.set(this,"__className__",ke),this.setAttribute&&this.setAttribute("class",ke||H===!1?"":kn.get(this,"__className__")||""))}))},hasClass:function(H){var te,ge,ke=0;for(te=" "+H+" ";ge=this[ke++];)if(ge.nodeType===1&&(" "+mc(Pd(ge))+" ").indexOf(te)>-1)return!0;return!1}});var hp=/\r/g;A.fn.extend({val:function(H){var te,ge,ke,He=this[0];return arguments.length?(ke=_(H),this.each(function(Ne){var ct;this.nodeType===1&&(ke?ct=H.call(this,Ne,A(this).val()):ct=H,ct==null?ct="":typeof ct=="number"?ct+="":Array.isArray(ct)&&(ct=A.map(ct,function(kt){return kt==null?"":kt+""})),te=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()],(!te||!("set"in te)||te.set(this,ct,"value")===void 0)&&(this.value=ct))})):He?(te=A.valHooks[He.type]||A.valHooks[He.nodeName.toLowerCase()],te&&"get"in te&&(ge=te.get(He,"value"))!==void 0?ge:(ge=He.value,typeof ge=="string"?ge.replace(hp,""):ge??"")):void 0}}),A.extend({valHooks:{option:{get:function(H){var te=A.find.attr(H,"value");return te??mc(A.text(H))}},select:{get:function(H){var te,ge,ke,He=H.options,Ne=H.selectedIndex,ct=H.type==="select-one",kt=ct?null:[],Ht=ct?Ne+1:He.length;for(Ne<0?ke=Ht:ke=ct?Ne:0;ke<Ht;ke++)if(ge=He[ke],(ge.selected||ke===Ne)&&!ge.disabled&&(!ge.parentNode.disabled||!X(ge.parentNode,"optgroup"))){if(te=A(ge).val(),ct)return te;kt.push(te)}return kt},set:function(H,te){for(var ge,ke,He=H.options,Ne=A.makeArray(te),ct=He.length;ct--;)ke=He[ct],(ke.selected=A.inArray(A.valHooks.option.get(ke),Ne)>-1)&&(ge=!0);return ge||(H.selectedIndex=-1),Ne}}}}),A.each(["radio","checkbox"],function(){A.valHooks[this]={set:function(H,te){if(Array.isArray(te))return H.checked=A.inArray(A(H).val(),te)>-1}},f.checkOn||(A.valHooks[this].get=function(H){return H.getAttribute("value")===null?"on":H.value})});var Uh=t.location,$u={guid:Date.now()},Um=/\?/;A.parseXML=function(H){var te,ge;if(!H||typeof H!="string")return null;try{te=new t.DOMParser().parseFromString(H,"text/xml")}catch{}return ge=te&&te.getElementsByTagName("parsererror")[0],(!te||ge)&&A.error("Invalid XML: "+(ge?A.map(ge.childNodes,function(ke){return ke.textContent}).join(`
`):H)),te};var Ff=/^(?:focusinfocus|focusoutblur)$/,Hp=function(H){H.stopPropagation()};A.extend(A.event,{trigger:function(H,te,ge,ke){var He,Ne,ct,kt,Ht,hi,Li,nn,Ii=[ge||D],Oi=d.call(H,"type")?H.type:H,is=d.call(H,"namespace")?H.namespace.split("."):[];if(Ne=nn=ct=ge=ge||D,!(ge.nodeType===3||ge.nodeType===8)&&!Ff.test(Oi+A.event.triggered)&&(Oi.indexOf(".")>-1&&(is=Oi.split("."),Oi=is.shift(),is.sort()),Ht=Oi.indexOf(":")<0&&"on"+Oi,H=H[A.expando]?H:new A.Event(Oi,typeof H=="object"&&H),H.isTrigger=ke?2:3,H.namespace=is.join("."),H.rnamespace=H.namespace?new RegExp("(^|\\.)"+is.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,H.result=void 0,H.target||(H.target=ge),te=te==null?[H]:A.makeArray(te,[H]),Li=A.event.special[Oi]||{},!(!ke&&Li.trigger&&Li.trigger.apply(ge,te)===!1))){if(!ke&&!Li.noBubble&&!x(ge)){for(kt=Li.delegateType||Oi,Ff.test(kt+Oi)||(Ne=Ne.parentNode);Ne;Ne=Ne.parentNode)Ii.push(Ne),ct=Ne;ct===(ge.ownerDocument||D)&&Ii.push(ct.defaultView||ct.parentWindow||t)}for(He=0;(Ne=Ii[He++])&&!H.isPropagationStopped();)nn=Ne,H.type=He>1?kt:Li.bindType||Oi,hi=(kn.get(Ne,"events")||Object.create(null))[H.type]&&kn.get(Ne,"handle"),hi&&hi.apply(Ne,te),hi=Ht&&Ne[Ht],hi&&hi.apply&&no(Ne)&&(H.result=hi.apply(Ne,te),H.result===!1&&H.preventDefault());return H.type=Oi,!ke&&!H.isDefaultPrevented()&&(!Li._default||Li._default.apply(Ii.pop(),te)===!1)&&no(ge)&&Ht&&_(ge[Oi])&&!x(ge)&&(ct=ge[Ht],ct&&(ge[Ht]=null),A.event.triggered=Oi,H.isPropagationStopped()&&nn.addEventListener(Oi,Hp),ge[Oi](),H.isPropagationStopped()&&nn.removeEventListener(Oi,Hp),A.event.triggered=void 0,ct&&(ge[Ht]=ct)),H.result}},simulate:function(H,te,ge){var ke=A.extend(new A.Event,ge,{type:H,isSimulated:!0});A.event.trigger(ke,null,te)}}),A.fn.extend({trigger:function(H,te){return this.each(function(){A.event.trigger(H,te,this)})},triggerHandler:function(H,te){var ge=this[0];if(ge)return A.event.trigger(H,te,ge,!0)}});var Eu=/\[\]$/,wo=/\r?\n/g,uh=/^(?:submit|button|image|reset|file)$/i,rl=/^(?:input|select|textarea|keygen)/i;function pp(H,te,ge,ke){var He;if(Array.isArray(te))A.each(te,function(Ne,ct){ge||Eu.test(H)?ke(H,ct):pp(H+"["+(typeof ct=="object"&&ct!=null?Ne:"")+"]",ct,ge,ke)});else if(!ge&&I(te)==="object")for(He in te)pp(H+"["+He+"]",te[He],ge,ke);else ke(H,te)}A.param=function(H,te){var ge,ke=[],He=function(Ne,ct){var kt=_(ct)?ct():ct;ke[ke.length]=encodeURIComponent(Ne)+"="+encodeURIComponent(kt??"")};if(H==null)return"";if(Array.isArray(H)||H.jquery&&!A.isPlainObject(H))A.each(H,function(){He(this.name,this.value)});else for(ge in H)pp(ge,H[ge],te,He);return ke.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var H=A.prop(this,"elements");return H?A.makeArray(H):this}).filter(function(){var H=this.type;return this.name&&!A(this).is(":disabled")&&rl.test(this.nodeName)&&!uh.test(H)&&(this.checked||!jd.test(H))}).map(function(H,te){var ge=A(this).val();return ge==null?null:Array.isArray(ge)?A.map(ge,function(ke){return{name:te.name,value:ke.replace(wo,`\r
`)}}):{name:te.name,value:ge.replace(wo,`\r
`)}}).get()}});var Gp=/%20/g,d0=/#.*$/,jm=/([?&])_=[^&]*/,nd=/^(.*?):[ \t]*([^\r\n]*)$/mg,D1=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lf=/^(?:GET|HEAD)$/,Yr=/^\/\//,ps={},$m={},hh="*/".concat("*"),Ku=D.createElement("a");Ku.href=Uh.href;function E1(H){return function(te,ge){typeof te!="string"&&(ge=te,te="*");var ke,He=0,Ne=te.toLowerCase().match(zt)||[];if(_(ge))for(;ke=Ne[He++];)ke[0]==="+"?(ke=ke.slice(1)||"*",(H[ke]=H[ke]||[]).unshift(ge)):(H[ke]=H[ke]||[]).push(ge)}}function Wp(H,te,ge,ke){var He={},Ne=H===$m;function ct(kt){var Ht;return He[kt]=!0,A.each(H[kt]||[],function(hi,Li){var nn=Li(te,ge,ke);if(typeof nn=="string"&&!Ne&&!He[nn])return te.dataTypes.unshift(nn),ct(nn),!1;if(Ne)return!(Ht=nn)}),Ht}return ct(te.dataTypes[0])||!He["*"]&&ct("*")}function Dl(H,te){var ge,ke,He=A.ajaxSettings.flatOptions||{};for(ge in te)te[ge]!==void 0&&((He[ge]?H:ke||(ke={}))[ge]=te[ge]);return ke&&A.extend(!0,H,ke),H}function M1(H,te,ge){for(var ke,He,Ne,ct,kt=H.contents,Ht=H.dataTypes;Ht[0]==="*";)Ht.shift(),ke===void 0&&(ke=H.mimeType||te.getResponseHeader("Content-Type"));if(ke){for(He in kt)if(kt[He]&&kt[He].test(ke)){Ht.unshift(He);break}}if(Ht[0]in ge)Ne=Ht[0];else{for(He in ge){if(!Ht[0]||H.converters[He+" "+Ht[0]]){Ne=He;break}ct||(ct=He)}Ne=Ne||ct}if(Ne)return Ne!==Ht[0]&&Ht.unshift(Ne),ge[Ne]}function Ca(H,te,ge,ke){var He,Ne,ct,kt,Ht,hi={},Li=H.dataTypes.slice();if(Li[1])for(ct in H.converters)hi[ct.toLowerCase()]=H.converters[ct];for(Ne=Li.shift();Ne;)if(H.responseFields[Ne]&&(ge[H.responseFields[Ne]]=te),!Ht&&ke&&H.dataFilter&&(te=H.dataFilter(te,H.dataType)),Ht=Ne,Ne=Li.shift(),Ne){if(Ne==="*")Ne=Ht;else if(Ht!=="*"&&Ht!==Ne){if(ct=hi[Ht+" "+Ne]||hi["* "+Ne],!ct){for(He in hi)if(kt=He.split(" "),kt[1]===Ne&&(ct=hi[Ht+" "+kt[0]]||hi["* "+kt[0]],ct)){ct===!0?ct=hi[He]:hi[He]!==!0&&(Ne=kt[0],Li.unshift(kt[1]));break}}if(ct!==!0)if(ct&&H.throws)te=ct(te);else try{te=ct(te)}catch(nn){return{state:"parsererror",error:ct?nn:"No conversion from "+Ht+" to "+Ne}}}}return{state:"success",data:te}}A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Uh.href,type:"GET",isLocal:D1.test(Uh.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":hh,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(H,te){return te?Dl(Dl(H,A.ajaxSettings),te):Dl(A.ajaxSettings,H)},ajaxPrefilter:E1(ps),ajaxTransport:E1($m),ajax:function(H,te){typeof H=="object"&&(te=H,H=void 0),te=te||{};var ge,ke,He,Ne,ct,kt,Ht,hi,Li,nn,Ii=A.ajaxSetup({},te),Oi=Ii.context||Ii,is=Ii.context&&(Oi.nodeType||Oi.jquery)?A(Oi):A.event,Io=A.Deferred(),Ao=A.Callbacks("once memory"),sl=Ii.statusCode||{},Ea={},$d={},rd="canceled",Ro={readyState:0,getResponseHeader:function(ho){var Fo;if(Ht){if(!Ne)for(Ne={};Fo=nd.exec(He);)Ne[Fo[1].toLowerCase()+" "]=(Ne[Fo[1].toLowerCase()+" "]||[]).concat(Fo[2]);Fo=Ne[ho.toLowerCase()+" "]}return Fo==null?null:Fo.join(", ")},getAllResponseHeaders:function(){return Ht?He:null},setRequestHeader:function(ho,Fo){return Ht==null&&(ho=$d[ho.toLowerCase()]=$d[ho.toLowerCase()]||ho,Ea[ho]=Fo),this},overrideMimeType:function(ho){return Ht==null&&(Ii.mimeType=ho),this},statusCode:function(ho){var Fo;if(ho)if(Ht)Ro.always(ho[Ro.status]);else for(Fo in ho)sl[Fo]=[sl[Fo],ho[Fo]];return this},abort:function(ho){var Fo=ho||rd;return ge&&ge.abort(Fo),gc(0,Fo),this}};if(Io.promise(Ro),Ii.url=((H||Ii.url||Uh.href)+"").replace(Yr,Uh.protocol+"//"),Ii.type=te.method||te.type||Ii.method||Ii.type,Ii.dataTypes=(Ii.dataType||"*").toLowerCase().match(zt)||[""],Ii.crossDomain==null){kt=D.createElement("a");try{kt.href=Ii.url,kt.href=kt.href,Ii.crossDomain=Ku.protocol+"//"+Ku.host!=kt.protocol+"//"+kt.host}catch{Ii.crossDomain=!0}}if(Ii.data&&Ii.processData&&typeof Ii.data!="string"&&(Ii.data=A.param(Ii.data,Ii.traditional)),Wp(ps,Ii,te,Ro),Ht)return Ro;hi=A.event&&Ii.global,hi&&A.active++===0&&A.event.trigger("ajaxStart"),Ii.type=Ii.type.toUpperCase(),Ii.hasContent=!Lf.test(Ii.type),ke=Ii.url.replace(d0,""),Ii.hasContent?Ii.data&&Ii.processData&&(Ii.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(Ii.data=Ii.data.replace(Gp,"+")):(nn=Ii.url.slice(ke.length),Ii.data&&(Ii.processData||typeof Ii.data=="string")&&(ke+=(Um.test(ke)?"&":"?")+Ii.data,delete Ii.data),Ii.cache===!1&&(ke=ke.replace(jm,"$1"),nn=(Um.test(ke)?"&":"?")+"_="+$u.guid+++nn),Ii.url=ke+nn),Ii.ifModified&&(A.lastModified[ke]&&Ro.setRequestHeader("If-Modified-Since",A.lastModified[ke]),A.etag[ke]&&Ro.setRequestHeader("If-None-Match",A.etag[ke])),(Ii.data&&Ii.hasContent&&Ii.contentType!==!1||te.contentType)&&Ro.setRequestHeader("Content-Type",Ii.contentType),Ro.setRequestHeader("Accept",Ii.dataTypes[0]&&Ii.accepts[Ii.dataTypes[0]]?Ii.accepts[Ii.dataTypes[0]]+(Ii.dataTypes[0]!=="*"?", "+hh+"; q=0.01":""):Ii.accepts["*"]);for(Li in Ii.headers)Ro.setRequestHeader(Li,Ii.headers[Li]);if(Ii.beforeSend&&(Ii.beforeSend.call(Oi,Ro,Ii)===!1||Ht))return Ro.abort();if(rd="abort",Ao.add(Ii.complete),Ro.done(Ii.success),Ro.fail(Ii.error),ge=Wp($m,Ii,te,Ro),!ge)gc(-1,"No Transport");else{if(Ro.readyState=1,hi&&is.trigger("ajaxSend",[Ro,Ii]),Ht)return Ro;Ii.async&&Ii.timeout>0&&(ct=t.setTimeout(function(){Ro.abort("timeout")},Ii.timeout));try{Ht=!1,ge.send(Ea,gc)}catch(ho){if(Ht)throw ho;gc(-1,ho)}}function gc(ho,Fo,zc,Cd){var Mc,K,we,Oe,mt,vi=Fo;Ht||(Ht=!0,ct&&t.clearTimeout(ct),ge=void 0,He=Cd||"",Ro.readyState=ho>0?4:0,Mc=ho>=200&&ho<300||ho===304,zc&&(Oe=M1(Ii,Ro,zc)),!Mc&&A.inArray("script",Ii.dataTypes)>-1&&A.inArray("json",Ii.dataTypes)<0&&(Ii.converters["text script"]=function(){}),Oe=Ca(Ii,Oe,Ro,Mc),Mc?(Ii.ifModified&&(mt=Ro.getResponseHeader("Last-Modified"),mt&&(A.lastModified[ke]=mt),mt=Ro.getResponseHeader("etag"),mt&&(A.etag[ke]=mt)),ho===204||Ii.type==="HEAD"?vi="nocontent":ho===304?vi="notmodified":(vi=Oe.state,K=Oe.data,we=Oe.error,Mc=!we)):(we=vi,(ho||!vi)&&(vi="error",ho<0&&(ho=0))),Ro.status=ho,Ro.statusText=(Fo||vi)+"",Mc?Io.resolveWith(Oi,[K,vi,Ro]):Io.rejectWith(Oi,[Ro,vi,we]),Ro.statusCode(sl),sl=void 0,hi&&is.trigger(Mc?"ajaxSuccess":"ajaxError",[Ro,Ii,Mc?K:we]),Ao.fireWith(Oi,[Ro,vi]),hi&&(is.trigger("ajaxComplete",[Ro,Ii]),--A.active||A.event.trigger("ajaxStop")))}return Ro},getJSON:function(H,te,ge){return A.get(H,te,ge,"json")},getScript:function(H,te){return A.get(H,void 0,te,"script")}}),A.each(["get","post"],function(H,te){A[te]=function(ge,ke,He,Ne){return _(ke)&&(Ne=Ne||He,He=ke,ke=void 0),A.ajax(A.extend({url:ge,type:te,dataType:Ne,data:ke,success:He},A.isPlainObject(ge)&&ge))}}),A.ajaxPrefilter(function(H){var te;for(te in H.headers)te.toLowerCase()==="content-type"&&(H.contentType=H.headers[te]||"")}),A._evalUrl=function(H,te,ge){return A.ajax({url:H,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(ke){A.globalEval(ke,te,ge)}})},A.fn.extend({wrapAll:function(H){var te;return this[0]&&(_(H)&&(H=H.call(this[0])),te=A(H,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&te.insertBefore(this[0]),te.map(function(){for(var ge=this;ge.firstElementChild;)ge=ge.firstElementChild;return ge}).append(this)),this},wrapInner:function(H){return _(H)?this.each(function(te){A(this).wrapInner(H.call(this,te))}):this.each(function(){var te=A(this),ge=te.contents();ge.length?ge.wrapAll(H):te.append(H)})},wrap:function(H){var te=_(H);return this.each(function(ge){A(this).wrapAll(te?H.call(this,ge):H)})},unwrap:function(H){return this.parent(H).not("body").each(function(){A(this).replaceWith(this.childNodes)}),this}}),A.expr.pseudos.hidden=function(H){return!A.expr.pseudos.visible(H)},A.expr.pseudos.visible=function(H){return!!(H.offsetWidth||H.offsetHeight||H.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var la={0:200,1223:204},oc=A.ajaxSettings.xhr();f.cors=!!oc&&"withCredentials"in oc,f.ajax=oc=!!oc,A.ajaxTransport(function(H){var te,ge;if(f.cors||oc&&!H.crossDomain)return{send:function(ke,He){var Ne,ct=H.xhr();if(ct.open(H.type,H.url,H.async,H.username,H.password),H.xhrFields)for(Ne in H.xhrFields)ct[Ne]=H.xhrFields[Ne];H.mimeType&&ct.overrideMimeType&&ct.overrideMimeType(H.mimeType),!H.crossDomain&&!ke["X-Requested-With"]&&(ke["X-Requested-With"]="XMLHttpRequest");for(Ne in ke)ct.setRequestHeader(Ne,ke[Ne]);te=function(kt){return function(){te&&(te=ge=ct.onload=ct.onerror=ct.onabort=ct.ontimeout=ct.onreadystatechange=null,kt==="abort"?ct.abort():kt==="error"?typeof ct.status!="number"?He(0,"error"):He(ct.status,ct.statusText):He(la[ct.status]||ct.status,ct.statusText,(ct.responseType||"text")!=="text"||typeof ct.responseText!="string"?{binary:ct.response}:{text:ct.responseText},ct.getAllResponseHeaders()))}},ct.onload=te(),ge=ct.onerror=ct.ontimeout=te("error"),ct.onabort!==void 0?ct.onabort=ge:ct.onreadystatechange=function(){ct.readyState===4&&t.setTimeout(function(){te&&ge()})},te=te("abort");try{ct.send(H.hasContent&&H.data||null)}catch(kt){if(te)throw kt}},abort:function(){te&&te()}}}),A.ajaxPrefilter(function(H){H.crossDomain&&(H.contents.script=!1)}),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(H){return A.globalEval(H),H}}}),A.ajaxPrefilter("script",function(H){H.cache===void 0&&(H.cache=!1),H.crossDomain&&(H.type="GET")}),A.ajaxTransport("script",function(H){if(H.crossDomain||H.scriptAttrs){var te,ge;return{send:function(ke,He){te=A("<script>").attr(H.scriptAttrs||{}).prop({charset:H.scriptCharset,src:H.url}).on("load error",ge=function(Ne){te.remove(),ge=null,Ne&&He(Ne.type==="error"?404:200,Ne.type)}),D.head.appendChild(te[0])},abort:function(){ge&&ge()}}}});var fc=[],Fs=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var H=fc.pop()||A.expando+"_"+$u.guid++;return this[H]=!0,H}}),A.ajaxPrefilter("json jsonp",function(H,te,ge){var ke,He,Ne,ct=H.jsonp!==!1&&(Fs.test(H.url)?"url":typeof H.data=="string"&&(H.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&Fs.test(H.data)&&"data");if(ct||H.dataTypes[0]==="jsonp")return ke=H.jsonpCallback=_(H.jsonpCallback)?H.jsonpCallback():H.jsonpCallback,ct?H[ct]=H[ct].replace(Fs,"$1"+ke):H.jsonp!==!1&&(H.url+=(Um.test(H.url)?"&":"?")+H.jsonp+"="+ke),H.converters["script json"]=function(){return Ne||A.error(ke+" was not called"),Ne[0]},H.dataTypes[0]="json",He=t[ke],t[ke]=function(){Ne=arguments},ge.always(function(){He===void 0?A(t).removeProp(ke):t[ke]=He,H[ke]&&(H.jsonpCallback=te.jsonpCallback,fc.push(ke)),Ne&&_(He)&&He(Ne[0]),Ne=He=void 0}),"script"}),f.createHTMLDocument=function(){var H=D.implementation.createHTMLDocument("").body;return H.innerHTML="<form></form><form></form>",H.childNodes.length===2}(),A.parseHTML=function(H,te,ge){if(typeof H!="string")return[];typeof te=="boolean"&&(ge=te,te=!1);var ke,He,Ne;return te||(f.createHTMLDocument?(te=D.implementation.createHTMLDocument(""),ke=te.createElement("base"),ke.href=D.location.href,te.head.appendChild(ke)):te=D),He=Ft.exec(H),Ne=!ge&&[],He?[te.createElement(He[1])]:(He=Dr([H],te,Ne),Ne&&Ne.length&&A(Ne).remove(),A.merge([],He.childNodes))},A.fn.load=function(H,te,ge){var ke,He,Ne,ct=this,kt=H.indexOf(" ");return kt>-1&&(ke=mc(H.slice(kt)),H=H.slice(0,kt)),_(te)?(ge=te,te=void 0):te&&typeof te=="object"&&(He="POST"),ct.length>0&&A.ajax({url:H,type:He||"GET",dataType:"html",data:te}).done(function(Ht){Ne=arguments,ct.html(ke?A("<div>").append(A.parseHTML(Ht)).find(ke):Ht)}).always(ge&&function(Ht,hi){ct.each(function(){ge.apply(this,Ne||[Ht.responseText,hi,Ht])})}),this},A.expr.pseudos.animated=function(H){return A.grep(A.timers,function(te){return H===te.elem}).length},A.offset={setOffset:function(H,te,ge){var ke,He,Ne,ct,kt,Ht,hi,Li=A.css(H,"position"),nn=A(H),Ii={};Li==="static"&&(H.style.position="relative"),kt=nn.offset(),Ne=A.css(H,"top"),Ht=A.css(H,"left"),hi=(Li==="absolute"||Li==="fixed")&&(Ne+Ht).indexOf("auto")>-1,hi?(ke=nn.position(),ct=ke.top,He=ke.left):(ct=parseFloat(Ne)||0,He=parseFloat(Ht)||0),_(te)&&(te=te.call(H,ge,A.extend({},kt))),te.top!=null&&(Ii.top=te.top-kt.top+ct),te.left!=null&&(Ii.left=te.left-kt.left+He),"using"in te?te.using.call(H,Ii):nn.css(Ii)}},A.fn.extend({offset:function(H){if(arguments.length)return H===void 0?this:this.each(function(He){A.offset.setOffset(this,H,He)});var te,ge,ke=this[0];if(ke)return ke.getClientRects().length?(te=ke.getBoundingClientRect(),ge=ke.ownerDocument.defaultView,{top:te.top+ge.pageYOffset,left:te.left+ge.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var H,te,ge,ke=this[0],He={top:0,left:0};if(A.css(ke,"position")==="fixed")te=ke.getBoundingClientRect();else{for(te=this.offset(),ge=ke.ownerDocument,H=ke.offsetParent||ge.documentElement;H&&(H===ge.body||H===ge.documentElement)&&A.css(H,"position")==="static";)H=H.parentNode;H&&H!==ke&&H.nodeType===1&&(He=A(H).offset(),He.top+=A.css(H,"borderTopWidth",!0),He.left+=A.css(H,"borderLeftWidth",!0))}return{top:te.top-He.top-A.css(ke,"marginTop",!0),left:te.left-He.left-A.css(ke,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var H=this.offsetParent;H&&A.css(H,"position")==="static";)H=H.offsetParent;return H||Ya})}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(H,te){var ge=te==="pageYOffset";A.fn[H]=function(ke){return Fn(this,function(He,Ne,ct){var kt;if(x(He)?kt=He:He.nodeType===9&&(kt=He.defaultView),ct===void 0)return kt?kt[te]:He[Ne];kt?kt.scrollTo(ge?kt.pageXOffset:ct,ge?ct:kt.pageYOffset):He[Ne]=ct},H,ke,arguments.length)}}),A.each(["top","left"],function(H,te){A.cssHooks[te]=Wh(f.pixelPosition,function(ge,ke){if(ke)return ke=Ec(ge,te),Hs.test(ke)?A(ge).position()[te]+"px":ke})}),A.each({Height:"height",Width:"width"},function(H,te){A.each({padding:"inner"+H,content:te,"":"outer"+H},function(ge,ke){A.fn[ke]=function(He,Ne){var ct=arguments.length&&(ge||typeof He!="boolean"),kt=ge||(He===!0||Ne===!0?"margin":"border");return Fn(this,function(Ht,hi,Li){var nn;return x(Ht)?ke.indexOf("outer")===0?Ht["inner"+H]:Ht.document.documentElement["client"+H]:Ht.nodeType===9?(nn=Ht.documentElement,Math.max(Ht.body["scroll"+H],nn["scroll"+H],Ht.body["offset"+H],nn["offset"+H],nn["client"+H])):Li===void 0?A.css(Ht,hi,kt):A.style(Ht,hi,Li,kt)},te,ct?He:void 0,ct)}})}),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(H,te){A.fn[te]=function(ge){return this.on(te,ge)}}),A.fn.extend({bind:function(H,te,ge){return this.on(H,null,te,ge)},unbind:function(H,te){return this.off(H,null,te)},delegate:function(H,te,ge,ke){return this.on(te,H,ge,ke)},undelegate:function(H,te,ge){return arguments.length===1?this.off(H,"**"):this.off(te,H||"**",ge)},hover:function(H,te){return this.on("mouseenter",H).on("mouseleave",te||H)}}),A.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(H,te){A.fn[te]=function(ge,ke){return arguments.length>0?this.on(te,null,ge,ke):this.trigger(te)}});var _d=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.proxy=function(H,te){var ge,ke,He;if(typeof te=="string"&&(ge=H[te],te=H,H=ge),!!_(H))return ke=r.call(arguments,2),He=function(){return H.apply(te||this,ke.concat(r.call(arguments)))},He.guid=H.guid=H.guid||A.guid++,He},A.holdReady=function(H){H?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=X,A.isFunction=_,A.isWindow=x,A.camelCase=ts,A.type=I,A.now=Date.now,A.isNumeric=function(H){var te=A.type(H);return(te==="number"||te==="string")&&!isNaN(H-parseFloat(H))},A.trim=function(H){return H==null?"":(H+"").replace(_d,"$1")},typeof define=="function"&&define.amd&&define("jquery",[],function(){return A});var Go=t.jQuery,k1=t.$;return A.noConflict=function(H){return t.$===A&&(t.$=k1),H&&t.jQuery===A&&(t.jQuery=Go),A},typeof e>"u"&&(t.jQuery=t.$=A),A})});function ren(t){let e=t,n=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return n===1&&i===0?1:5}var y5t,_5t=Q(()=>{y5t=["de",[["AM","PM"],void 0,void 0],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."],void 0,void 0],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[",",".",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","Euro",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",ren]});var x5t=xr((TTe,C5t)=>{(function(t,e){typeof TTe=="object"&&typeof C5t<"u"&&typeof s4=="function"?e(Jm()):typeof define=="function"&&define.amd?define(["../moment"],e):e(t.moment)})(TTe,function(t){"use strict";function e(i,r,s,o){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[i+" Tage",i+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[i+" Monate",i+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[i+" Jahre",i+" Jahren"]};return r?a[s][0]:a[s][1]}var n=t.defineLocale("de",{months:"Januar_Februar_M\xE4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xE4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n})});function sen(t){let e=t,n=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return n===1&&i===0?1:5}var b5t,w5t=Q(()=>{b5t=["en",[["a","p"],["AM","PM"],void 0],[["AM","PM"],void 0,void 0],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],void 0,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",void 0,"{1} 'at' {0}",void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",sen]});var Gse,S5t=Q(()=>{ma();Gse=class extends pT{parse(e){if(e.startsWith("#/")){debugger;e=e.substring(2)}return super.parse(e)}}});var uen=xr(E5t=>{Vbe();Tpt();$w();ore();iY();Qf();z2t();R1();SD();oY();ox();d2();dB();Qk();o5e();Mp();$D();G2t();$fe();i6();U2t();ESe();ji();Y2t();Z2t();Q2t();Rge();_Z();Wb();egt();rgt();ogt();YA();FX();Ja();P8();fx();L1();uZ();gZ();og();qn();Ogt();Ngt();k5e();h5t();ma();M4e();od();p5t();f5t();me();bl();oV();Cs();var T5t=Gs(v5t());ri();var D5t=Gs(Jm());Lse();_5t();var _5s=Gs(x5t());w5t();B8();S5t();aV();window.$=T5t.default;Sue(y5t);Sue(b5t);D5t.default.locale("de");var BC="";NM.init();switch(Z6.backend.toLowerCase()){case"aschaffenburg":BC="https://ab.nxt-lvl.ink";break;case"frankfurt":BC="https://ffm.nxt-lvl.ink";break;case"aachen":BC="https://ac.nxt-lvl.ink";break;case"nuernberg":BC="https://nu.nxt-lvl.ink";break;case"mallorca":BC="https://ma.nxt-lvl.ink";break;case"duesseldorf":BC="https://du.nxt-lvl.ink";break;case"brudis":BC="https://stock.brudis.es";break;case"local":BC="http://localhost:83";break;case"staging":BC="https://staging.nxt-lvl.ink";break}var oen={url:Z6.production?window.location.origin:BC,options:{}};function aen(t){return t?.config?.value?.fireConfig}var len={parse:{dateInput:"ddd DD.MM.YYYY"},display:{dateInput:"ddd DD.MM.YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};function cen(){let t=window.location.origin+"/ng-config-new";return Z6.backend==="local"?t="http://localhost:82/api/ng-config-new":Z6.backend==="frankfurt"?t="https://ffm.nxt-lvl.ink/ng-config-new":Z6.backend==="aachen"?t="https://ac.nxt-lvl.ink/ng-config-new":Z6.backend==="aschaffenburg"?t="https://ab.nxt-lvl.ink/ng-config-new":Z6.backend==="nuernberg"?t="https://nu.nxt-lvl.ink/ng-config-new":Z6.backend==="mallorca"?t="https://ma.nxt-lvl.ink/ng-config-new":Z6.backend==="duesseldorf"?t="https://du.nxt-lvl.ink/ng-config-new":Z6.backend==="brudis"?t="https://stock.brudis.es/ng-config-new":Z6.backend==="staging"&&(t="https://staging.nxt-lvl.ink/ng-config-new"),t}fetch(cen()).then(t=>t.json()).then(t=>O(E5t,null,function*(){window.ngConfig=t,yield G8.init(),yield den()})).catch(t=>{let e=document.createElement("div");e.innerHTML=`ngConfig konnte nicht geladen werden
`+window.ngConfigUrl+"<br/><br/>"+t.message,window.document.body.append(e),setTimeout(()=>{Cm.reload("ngConfig konnte nicht geladen werden")},3e3)});function den(){return O(this,null,function*(){return TMe(rF,{providers:[OTe(_he,IWe,UJe.forRoot(oen),ko,Ia,lT,fZ,eHe,tUe,Ob,A$,$Ue,uje,sgt,ngt,J2t,oPe,pHe,Tze,X2t,q2t,K2t,nMe,$2t,W2t,pUe,mLe,H2t,bQe,lK,qQe,CRe,tBe,_Re,c2,kze,qFe,XEe,OUe,V9,B2t,HO,z9,OFe,sre,amt.forRoot({provide:jw,useFactory:Spt})),Xi,{provide:$b,deps:[Xi],useFactory:aen},{provide:af,useValue:len},{provide:v8,useClass:m5t},{provide:tV,useClass:Gse},{provide:Z0,useValue:"de"},{provide:k8,useValue:"de"},{provide:Od,useValue:new zse("de")},iRe(u5t()),Lgt(),vMe(yMe())]})})}});export default uen();
